{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "popover",
  "title": "Popover",
  "description": "Astro floating panels opened by a labelled control.",
  "dependencies": [
    "@data-slot/popover",
    "cn"
  ],
  "registryDependencies": [],
  "files": [
    {
      "path": "packages/ui/src/components/ui/popover/index.ts",
      "content": "export { default as Popover } from './popover.astro'\nexport { default as PopoverContent } from './popover-content.astro'\nexport { default as PopoverDescription } from './popover-description.astro'\nexport { default as PopoverHeader } from './popover-header.astro'\nexport { default as PopoverTitle } from './popover-title.astro'\nexport { default as PopoverTrigger } from './popover-trigger.astro'\nexport type { PopoverProps, PopoverContentProps } from './types.ts'\n",
      "type": "registry:file",
      "target": "~/src/components/ui/popover/index.ts"
    },
    {
      "path": "packages/ui/src/components/ui/popover/popover-content.astro",
      "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"cn\"\nimport type { PopoverContentProps } from \"./types.ts\"\n\ntype Props = HTMLAttributes<\"div\"> & PopoverContentProps\n\nconst {\n  class: className,\n  hidden = true,\n  side,\n  align,\n  sideOffset,\n  alignOffset,\n  avoidCollisions,\n  collisionPadding,\n  position,\n  ...props\n} = Astro.props\n---\n\n<div data-slot=\"popover-portal\">\n  <div\n    data-slot=\"popover-positioner\"\n    data-side={side}\n    data-align={align}\n    data-side-offset={sideOffset}\n    data-align-offset={alignOffset}\n    data-avoid-collisions={avoidCollisions}\n    data-collision-padding={collisionPadding}\n    data-position={position}\n    class=\"isolate z-50\"\n  >\n    <div\n      data-slot=\"popover-content\"\n      data-side={side}\n      data-align={align}\n      data-side-offset={sideOffset}\n      data-align-offset={alignOffset}\n      data-avoid-collisions={avoidCollisions}\n      data-collision-padding={collisionPadding}\n      data-position={position}\n      hidden={hidden}\n      class={cn(\"relative flex w-72 origin-(--transform-origin) rounded-lg border bg-popover not-dark:bg-clip-padding text-popover-foreground shadow-lg/5 outline-none transition-[width,height,scale,opacity] before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] before:shadow-[0_1px_--theme(--color-black/4%)] has-data-[slot=calendar]:rounded-xl has-data-[slot=calendar]:before:rounded-[calc(var(--radius-xl)-1px)] data-starting-style:scale-98 data-starting-style:opacity-0 data-ending-style:opacity-0 data-ending-style:scale-98 dark:before:shadow-[0_-1px_--theme(--color-white/6%)] flex-col gap-4 p-4 text-sm duration-200\", className)}\n      {...props}\n    >\n      <slot />\n    </div>\n  </div>\n</div>\n",
      "type": "registry:file",
      "target": "~/src/components/ui/popover/popover-content.astro"
    },
    {
      "path": "packages/ui/src/components/ui/popover/popover-description.astro",
      "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"cn\"\n\ntype Props = HTMLAttributes<\"p\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<p\n  data-slot=\"popover-description\"\n  class={cn(\"text-muted-foreground text-sm\", className)}\n  {...props}\n>\n  <slot />\n</p>\n",
      "type": "registry:file",
      "target": "~/src/components/ui/popover/popover-description.astro"
    },
    {
      "path": "packages/ui/src/components/ui/popover/popover-header.astro",
      "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"cn\"\n\ntype Props = HTMLAttributes<\"div\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<div\n  data-slot=\"popover-header\"\n  class={cn(\"flex flex-col gap-1 text-sm\", className)}\n  {...props}\n>\n  <slot />\n</div>\n",
      "type": "registry:file",
      "target": "~/src/components/ui/popover/popover-header.astro"
    },
    {
      "path": "packages/ui/src/components/ui/popover/popover-title.astro",
      "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"cn\"\n\ntype Props = HTMLAttributes<\"h3\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<h3\n  data-slot=\"popover-title\"\n  class={cn(\"font-semibold text-lg leading-none\", className)}\n  {...props}\n>\n  <slot />\n</h3>\n",
      "type": "registry:file",
      "target": "~/src/components/ui/popover/popover-title.astro"
    },
    {
      "path": "packages/ui/src/components/ui/popover/popover-trigger.astro",
      "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\ntype Props = HTMLAttributes<\"button\">\n\nconst { class: className, type = \"button\", ...props } = Astro.props\n---\n\n<button data-slot=\"popover-trigger\" type={type} class={className} {...props}>\n  <slot />\n</button>\n",
      "type": "registry:file",
      "target": "~/src/components/ui/popover/popover-trigger.astro"
    },
    {
      "path": "packages/ui/src/components/ui/popover/popover.astro",
      "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { PopoverProps } from \"./types.ts\"\n\ntype Props = HTMLAttributes<\"div\"> & PopoverProps\n\nconst {\n  class: className,\n  defaultOpen,\n  side,\n  align,\n  sideOffset,\n  alignOffset,\n  avoidCollisions,\n  collisionPadding,\n  portal,\n  position,\n  closeOnClickOutside,\n  closeOnEscape,\n  ...props\n} = Astro.props\n---\n\n<div\n  data-slot=\"popover\"\n  data-default-open={defaultOpen}\n  data-side={side}\n  data-align={align}\n  data-side-offset={sideOffset}\n  data-align-offset={alignOffset}\n  data-avoid-collisions={avoidCollisions}\n  data-collision-padding={collisionPadding}\n  data-portal={portal}\n  data-position={position}\n  data-close-on-click-outside={closeOnClickOutside}\n  data-close-on-escape={closeOnEscape}\n  class={className}\n  {...props}\n>\n  <slot />\n</div>\n\n<script>\n  import { create } from \"@data-slot/popover\"\n  import type { PopoverController } from \"@data-slot/popover\"\n\n  const controllers: PopoverController[] = []\n  const initialize = () => controllers.push(...create())\n  initialize()\n  document.addEventListener(\"astro:page-load\", initialize)\n  document.addEventListener(\"astro:before-swap\", () => {\n    for (const controller of controllers) controller.destroy()\n    controllers.length = 0\n  })\n</script>\n",
      "type": "registry:file",
      "target": "~/src/components/ui/popover/popover.astro"
    },
    {
      "path": "packages/ui/src/components/ui/popover/types.ts",
      "content": "import type { PopoverOptions } from '@data-slot/popover'\n\n/**\n * Popover configuration rendered as data attributes.\n */\nexport type PopoverProps = Pick<\n    PopoverOptions,\n    | 'defaultOpen'\n    | 'side'\n    | 'align'\n    | 'sideOffset'\n    | 'alignOffset'\n    | 'avoidCollisions'\n    | 'collisionPadding'\n    | 'portal'\n    | 'position'\n    | 'closeOnClickOutside'\n    | 'closeOnEscape'\n>\n\n/** Placement fields for the popover popup. */\nexport type PopoverContentProps = Pick<\n    PopoverOptions,\n    | 'side'\n    | 'align'\n    | 'sideOffset'\n    | 'alignOffset'\n    | 'avoidCollisions'\n    | 'collisionPadding'\n    | 'position'\n>\n",
      "type": "registry:file",
      "target": "~/src/components/ui/popover/types.ts"
    }
  ],
  "meta": {
    "framework": "astro",
    "source": "@gnostic/ui",
    "testedDependencies": {
      "@data-slot/popover": "^1.1.2",
      "cn": "0.5.2"
    }
  },
  "docs": "https://ui.gnosticai.com/components/popover",
  "categories": [
    "ui"
  ],
  "type": "registry:ui"
}
