{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "popover",
  "type": "registry:ui",
  "dependencies": [
    "@kobalte/core"
  ],
  "files": [
    {
      "path": "ui/popover.tsx",
      "content": "import type { Component, ComponentProps, JSX, ParentComponent, ValidComponent } from \"solid-js\"\nimport { mergeProps, splitProps } from \"solid-js\"\n\nimport type { PolymorphicProps } from \"@kobalte/core/polymorphic\"\nimport * as PopoverPrimitive from \"@kobalte/core/popover\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst Popover: Component<PopoverPrimitive.PopoverRootProps> = (props) => (\n  <PopoverPrimitive.Root data-slot=\"popover\" {...props} />\n)\n\nconst PopoverTrigger: ParentComponent<PopoverPrimitive.PopoverTriggerProps> = (props) => (\n  <PopoverPrimitive.Trigger data-slot=\"popover-trigger\" {...props} />\n)\n\nconst PopoverAnchor = <T extends ValidComponent = \"div\">(\n  props: PolymorphicProps<T, PopoverPrimitive.PopoverAnchorProps<T>>\n) => <PopoverPrimitive.Anchor data-slot=\"popover-anchor\" {...props} />\n\ntype PopoverContentProps<T extends ValidComponent = \"div\"> =\n  PopoverPrimitive.PopoverContentProps<T> & {\n    class?: string | undefined\n    children?: JSX.Element\n  }\n\nconst PopoverContent = <T extends ValidComponent = \"div\">(\n  rawProps: PolymorphicProps<T, PopoverContentProps<T>>\n) => {\n  const props = mergeProps({ gutter: 4 }, rawProps)\n  const [local, others] = splitProps(props as PopoverContentProps, [\"class\", \"children\"])\n\n  return (\n    <PopoverPrimitive.Portal>\n      <PopoverPrimitive.Content\n        class={cn(\n          \"cn-popover-content data-[closed]:fade-out-0 data-[expanded]:fade-in-0 data-[closed]:zoom-out-95 data-[expanded]:zoom-in-95 z-50 w-72 origin-(--kb-popover-content-transform-origin) rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-hidden data-[closed]:animate-out data-[expanded]:animate-in\",\n          local.class\n        )}\n        data-slot=\"popover-content\"\n        {...others}\n      >\n        {local.children}\n      </PopoverPrimitive.Content>\n    </PopoverPrimitive.Portal>\n  )\n}\n\nconst PopoverHeader: Component<ComponentProps<\"div\">> = (props) => {\n  const [local, others] = splitProps(props, [\"class\"])\n  return (\n    <div\n      class={cn(\"cn-popover-header flex flex-col gap-1 text-sm\", local.class)}\n      data-slot=\"popover-header\"\n      {...others}\n    />\n  )\n}\n\nconst PopoverTitle: Component<ComponentProps<\"h2\">> = (props) => {\n  const [local, others] = splitProps(props, [\"class\"])\n  return (\n    <h2\n      class={cn(\"cn-popover-title font-medium\", local.class)}\n      data-slot=\"popover-title\"\n      {...others}\n    />\n  )\n}\n\nconst PopoverDescription: Component<ComponentProps<\"p\">> = (props) => {\n  const [local, others] = splitProps(props, [\"class\"])\n  return (\n    <p\n      class={cn(\"cn-popover-description text-muted-foreground\", local.class)}\n      data-slot=\"popover-description\"\n      {...others}\n    />\n  )\n}\n\nexport {\n  Popover,\n  PopoverTrigger,\n  PopoverAnchor,\n  PopoverContent,\n  PopoverHeader,\n  PopoverTitle,\n  PopoverDescription\n}\n",
      "type": "registry:ui"
    }
  ]
}