{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "select",
  "type": "registry:ui",
  "dependencies": [
    "@kobalte/core"
  ],
  "files": [
    {
      "path": "ui/select.tsx",
      "content": "import type { Component, JSX, ValidComponent } from \"solid-js\"\nimport { mergeProps, splitProps } from \"solid-js\"\n\nimport type { PolymorphicProps } from \"@kobalte/core/polymorphic\"\nimport * as SelectPrimitive from \"@kobalte/core/select\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst Select = <Option, OptGroup = never, T extends ValidComponent = \"div\">(\n  props: PolymorphicProps<T, SelectPrimitive.SelectRootProps<Option, OptGroup, T>>\n) => {\n  return <SelectPrimitive.Root data-slot=\"select\" {...props} />\n}\n\nconst SelectValue = <Option, T extends ValidComponent = \"span\">(\n  props: PolymorphicProps<T, SelectPrimitive.SelectValueProps<Option, T>>\n) => {\n  return <SelectPrimitive.Value data-slot=\"select-value\" {...props} />\n}\n\nconst SelectHiddenSelect: Component<SelectPrimitive.SelectHiddenSelectProps> = (props) => {\n  return <SelectPrimitive.HiddenSelect data-slot=\"select-hidden-select\" {...props} />\n}\n\ntype SelectTriggerProps<T extends ValidComponent = \"button\"> =\n  SelectPrimitive.SelectTriggerProps<T> & {\n    class?: string | undefined\n    children?: JSX.Element\n    size?: \"sm\" | \"default\"\n  }\n\nconst SelectTrigger = <T extends ValidComponent = \"button\">(\n  rawProps: PolymorphicProps<T, SelectTriggerProps<T>>\n) => {\n  const props = mergeProps({ size: \"default\" }, rawProps)\n  const [local, others] = splitProps(props as SelectTriggerProps, [\"class\", \"children\", \"size\"])\n\n  return (\n    <SelectPrimitive.Trigger\n      class={cn(\n        \"flex w-full items-center justify-between gap-2 whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 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-[size=default]:h-9 data-[size=sm]:h-8 data-[placeholder]:text-muted-foreground *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 dark:bg-input/30 dark:aria-invalid:ring-destructive/40 dark:hover:bg-input/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-size={local.size}\n      data-slot=\"select-trigger\"\n      {...others}\n    >\n      {local.children}\n      <SelectPrimitive.Icon\n        as=\"svg\"\n        class=\"size-4 opacity-50\"\n        fill=\"none\"\n        stroke=\"currentColor\"\n        stroke-linecap=\"round\"\n        stroke-linejoin=\"round\"\n        stroke-width=\"2\"\n        viewBox=\"0 0 24 24\"\n        xmlns=\"http://www.w3.org/2000/svg\"\n      >\n        <path d=\"M8 9l4 -4l4 4\" />\n        <path d=\"M16 15l-4 4l-4 -4\" />\n      </SelectPrimitive.Icon>\n    </SelectPrimitive.Trigger>\n  )\n}\n\ntype SelectContentProps<T extends ValidComponent = \"div\"> =\n  SelectPrimitive.SelectContentProps<T> & { class?: string | undefined }\n\nconst SelectContent = <T extends ValidComponent = \"div\">(\n  props: PolymorphicProps<T, SelectContentProps<T>>\n) => {\n  const [local, others] = splitProps(props as SelectContentProps, [\"class\"])\n  return (\n    <SelectPrimitive.Portal>\n      <SelectPrimitive.Content\n        class={cn(\n          \"data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 relative z-50 min-w-[8rem] origin-(--kb-select-content-transform-origin) overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in\",\n          local.class\n        )}\n        data-slot=\"select-content\"\n        {...others}\n      >\n        <SelectPrimitive.Listbox class=\"m-0 p-1\" />\n      </SelectPrimitive.Content>\n    </SelectPrimitive.Portal>\n  )\n}\n\ntype SelectItemProps<T extends ValidComponent = \"li\"> = SelectPrimitive.SelectItemProps<T> & {\n  class?: string | undefined\n  children?: JSX.Element\n}\n\nconst SelectItem = <T extends ValidComponent = \"li\">(\n  props: PolymorphicProps<T, SelectItemProps<T>>\n) => {\n  const [local, others] = splitProps(props as SelectItemProps, [\"class\", \"children\"])\n  return (\n    <SelectPrimitive.Item\n      class={cn(\n        \"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 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2\",\n\n        local.class\n      )}\n      data-slot=\"select-item\"\n      {...others}\n    >\n      <SelectPrimitive.ItemIndicator class=\"absolute right-2 flex size-3.5 items-center justify-center\">\n        <svg\n          class=\"size-4\"\n          fill=\"none\"\n          stroke=\"currentColor\"\n          stroke-linecap=\"round\"\n          stroke-linejoin=\"round\"\n          stroke-width=\"2\"\n          viewBox=\"0 0 24 24\"\n          xmlns=\"http://www.w3.org/2000/svg\"\n        >\n          <path d=\"M0 0h24v24H0z\" fill=\"none\" stroke=\"none\" />\n          <path d=\"M5 12l5 5l10 -10\" />\n        </svg>\n      </SelectPrimitive.ItemIndicator>\n      <SelectPrimitive.ItemLabel>{local.children}</SelectPrimitive.ItemLabel>\n    </SelectPrimitive.Item>\n  )\n}\n\nexport { Select, SelectValue, SelectHiddenSelect, SelectTrigger, SelectContent, SelectItem }\n",
      "type": "registry:ui"
    }
  ]
}