{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "combobox",
  "type": "registry:ui",
  "dependencies": [
    "@kobalte/core",
    "lucide-solid"
  ],
  "files": [
    {
      "path": "ui/combobox.tsx",
      "content": "import type { Component, JSX, ValidComponent } from \"solid-js\"\nimport { mergeProps, splitProps } from \"solid-js\"\n\nimport * as ComboboxPrimitive from \"@kobalte/core/combobox\"\nimport type { PolymorphicProps } from \"@kobalte/core/polymorphic\"\nimport { Check, ChevronDown } from \"lucide-solid\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst Combobox = <T extends ValidComponent = \"div\">(\n  props: PolymorphicProps<T, ComboboxPrimitive.ComboboxRootProps<any, T>>\n) => {\n  // @ts-expect-error - Complex generic type compatibility issue with Kobalte primitives\n  return <ComboboxPrimitive.Root data-slot=\"combobox\" {...props} />\n}\n\ntype ComboboxInputProps<T extends ValidComponent = \"input\"> =\n  ComboboxPrimitive.ComboboxInputProps<T> & {\n    class?: string | undefined\n  }\n\nconst ComboboxInput = <T extends ValidComponent = \"input\">(\n  props: PolymorphicProps<T, ComboboxInputProps<T>>\n) => {\n  const [local, others] = splitProps(props as ComboboxInputProps, [\"class\"])\n  return (\n    <ComboboxPrimitive.Input\n      class={cn(\n        \"cn-combobox-input flex h-9 w-full rounded-md border border-input bg-transparent py-2 pr-8 pl-3 text-sm shadow-xs outline-none transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[placeholder]:text-muted-foreground dark:bg-input/30 dark:aria-invalid:ring-destructive/40\",\n        local.class\n      )}\n      data-slot=\"combobox-input\"\n      {...others}\n    />\n  )\n}\n\ntype ComboboxTriggerProps<T extends ValidComponent = \"button\"> =\n  ComboboxPrimitive.ComboboxTriggerProps<T> & {\n    class?: string | undefined\n    children?: JSX.Element\n  }\n\nconst ComboboxTrigger = <T extends ValidComponent = \"button\">(\n  props: PolymorphicProps<T, ComboboxTriggerProps<T>>\n) => {\n  const [local, others] = splitProps(props as ComboboxTriggerProps, [\"class\", \"children\"])\n  return (\n    <ComboboxPrimitive.Trigger\n      class={cn(\n        \"cn-combobox-trigger absolute inset-y-0 right-0 flex items-center pr-2\",\n        local.class\n      )}\n      data-slot=\"combobox-trigger\"\n      {...others}\n    >\n      <ComboboxPrimitive.Icon class=\"size-4 opacity-50\">\n        <ChevronDown />\n      </ComboboxPrimitive.Icon>\n    </ComboboxPrimitive.Trigger>\n  )\n}\n\ntype ComboboxContentProps<T extends ValidComponent = \"div\"> =\n  ComboboxPrimitive.ComboboxContentProps<T> & {\n    class?: string | undefined\n  }\n\nconst ComboboxContent = <T extends ValidComponent = \"div\">(\n  rawProps: PolymorphicProps<T, ComboboxContentProps<T>>\n) => {\n  const props = mergeProps({ gutter: 8, sameWidth: true }, rawProps)\n  const [local, others] = splitProps(props as ComboboxContentProps, [\"class\"])\n\n  return (\n    <ComboboxPrimitive.Portal>\n      <ComboboxPrimitive.Content\n        class={cn(\n          \"cn-combobox-content data-[closed]:fade-out-0 data-[expanded]:fade-in-0 data-[closed]:zoom-out-95 data-[expanded]:zoom-in-95 relative z-50 min-w-[8rem] origin-(--kb-combobox-content-transform-origin) overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[closed]:animate-out data-[expanded]:animate-in\",\n          local.class\n        )}\n        data-slot=\"combobox-content\"\n        {...others}\n      >\n        <ComboboxPrimitive.Listbox class=\"max-h-96 overflow-y-auto p-1\" />\n      </ComboboxPrimitive.Content>\n    </ComboboxPrimitive.Portal>\n  )\n}\n\ntype ComboboxItemProps<T extends ValidComponent = \"li\"> = ComboboxPrimitive.ComboboxItemProps<T> & {\n  class?: string | undefined\n  children?: JSX.Element\n}\n\nconst ComboboxItem = <T extends ValidComponent = \"li\">(\n  props: PolymorphicProps<T, ComboboxItemProps<T>>\n) => {\n  const [local, others] = splitProps(props as ComboboxItemProps, [\"class\", \"children\"])\n  return (\n    <ComboboxPrimitive.Item\n      class={cn(\n        \"cn-combobox-item relative flex w-full cursor-default select-none items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n        local.class\n      )}\n      data-slot=\"combobox-item\"\n      {...others}\n    >\n      <ComboboxPrimitive.ItemIndicator class=\"absolute right-2 flex size-4 items-center justify-center\">\n        <Check class=\"size-4\" />\n      </ComboboxPrimitive.ItemIndicator>\n      <ComboboxPrimitive.ItemLabel>{local.children}</ComboboxPrimitive.ItemLabel>\n    </ComboboxPrimitive.Item>\n  )\n}\n\ntype ComboboxControlProps<T extends ValidComponent = \"div\"> =\n  ComboboxPrimitive.ComboboxControlProps<T> & {\n    class?: string | undefined\n  }\n\nconst ComboboxControl = <T extends ValidComponent = \"div\">(\n  props: PolymorphicProps<T, ComboboxControlProps<T>>\n) => {\n  const [local, others] = splitProps(props as ComboboxControlProps, [\"class\"])\n  // @ts-expect-error - Complex generic type compatibility issue with Kobalte primitives\n  return (\n    <ComboboxPrimitive.Control\n      class={cn(\"relative\", local.class)}\n      data-slot=\"combobox-control\"\n      {...others}\n    />\n  )\n}\n\ntype ComboboxLabelProps<T extends ValidComponent = \"label\"> =\n  ComboboxPrimitive.ComboboxLabelProps<T> & {\n    class?: string | undefined\n  }\n\nconst ComboboxLabel = <T extends ValidComponent = \"label\">(\n  props: PolymorphicProps<T, ComboboxLabelProps<T>>\n) => {\n  const [local, others] = splitProps(props as ComboboxLabelProps, [\"class\"])\n  return (\n    <ComboboxPrimitive.Label\n      class={cn(\n        \"cn-combobox-label px-2 py-1.5 font-medium text-muted-foreground text-xs\",\n        local.class\n      )}\n      data-slot=\"combobox-label\"\n      {...others}\n    />\n  )\n}\n\nconst ComboboxDescription: Component<ComboboxPrimitive.ComboboxDescriptionProps> = (props) => {\n  return <ComboboxPrimitive.Description data-slot=\"combobox-description\" {...props} />\n}\n\nconst ComboboxErrorMessage: Component<ComboboxPrimitive.ComboboxErrorMessageProps> = (props) => {\n  return <ComboboxPrimitive.ErrorMessage data-slot=\"combobox-error-message\" {...props} />\n}\n\nconst ComboboxItemDescription: Component<ComboboxPrimitive.ComboboxItemDescriptionProps> = (\n  props\n) => {\n  return <ComboboxPrimitive.ItemDescription data-slot=\"combobox-item-description\" {...props} />\n}\n\nexport {\n  Combobox,\n  ComboboxInput,\n  ComboboxTrigger,\n  ComboboxContent,\n  ComboboxItem,\n  ComboboxControl,\n  ComboboxLabel,\n  ComboboxDescription,\n  ComboboxErrorMessage,\n  ComboboxItemDescription\n}\n",
      "type": "registry:ui"
    }
  ]
}