{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "select",
  "type": "registry:ui",
  "title": "Select",
  "dependencies": [
    "@base-ui-next/react"
  ],
  "registryDependencies": [
    "https://hamur.dev/r/react/utils.json"
  ],
  "files": [
    {
      "path": "react/select.tsx",
      "content": "'use client'\n\nimport type * as React from 'react' // base-ui-next/ui select@0.1.2\nimport { Select as SelectPrimitive } from '@base-ui-next/react/select'\nimport { cn } from '@/lib/utils'\n\nconst selectGroupClassName = 'scroll-my-1 p-1'\n\nconst selectValueClassName = 'flex flex-1 text-left'\n\nconst selectTriggerClassName =\n  \"flex w-fit items-center justify-between gap-1.5 rounded-md border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\"\n\n/** The chevron the trigger renders after its children. */\nconst selectTriggerIconClassName = 'pointer-events-none size-4 text-muted-foreground'\n\nconst selectContentPositionerClassName = 'isolate z-50'\n\nconst selectContentClassName =\n  'relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95'\n\nconst selectLabelClassName = 'px-2 py-1.5 text-xs text-muted-foreground'\n\nconst selectItemClassName =\n  \"relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2\"\n\nconst selectItemTextClassName = 'flex flex-1 shrink-0 gap-2 whitespace-nowrap'\n\nconst selectItemIndicatorClassName =\n  'pointer-events-none absolute right-2 flex size-4 items-center justify-center'\n\n/** The check icon inside the item indicator, and the scroll arrows' chevrons. */\nconst selectIconClassName = 'pointer-events-none'\n\nconst selectSeparatorClassName = 'pointer-events-none -mx-1 my-1 h-px bg-border'\n\nconst selectScrollUpButtonClassName =\n  \"top-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4\"\n\nconst selectScrollDownButtonClassName =\n  \"bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4\"\n\n// lucide's icons, inline and hidden from assistive technology (10 · As built, BN-309). Each\n// passes its props to the `<svg>`, so a Base UI part can render it (`SelectPrimitive.Icon`).\nfunction SvgIcon({ children, ...props }: React.ComponentProps<'svg'>) {\n  return (\n    <svg\n      xmlns=\"http://www.w3.org/2000/svg\"\n      viewBox=\"0 0 24 24\"\n      fill=\"none\"\n      stroke=\"currentColor\"\n      strokeWidth=\"2\"\n      strokeLinecap=\"round\"\n      strokeLinejoin=\"round\"\n      aria-hidden=\"true\"\n      {...props}\n    >\n      {children}\n    </svg>\n  )\n}\n\nfunction ChevronDownIcon(props: React.ComponentProps<'svg'>) {\n  return (\n    <SvgIcon {...props}>\n      <path d=\"m6 9 6 6 6-6\" />\n    </SvgIcon>\n  )\n}\n\nfunction ChevronUpIcon(props: React.ComponentProps<'svg'>) {\n  return (\n    <SvgIcon {...props}>\n      <path d=\"m18 15-6-6-6 6\" />\n    </SvgIcon>\n  )\n}\n\nfunction CheckIcon(props: React.ComponentProps<'svg'>) {\n  return (\n    <SvgIcon {...props}>\n      <path d=\"M20 6 9 17l-5-5\" />\n    </SvgIcon>\n  )\n}\n\nconst Select = SelectPrimitive.Root\n\nfunction SelectGroup({ className, ...props }: SelectPrimitive.Group.Props) {\n  return (\n    <SelectPrimitive.Group\n      data-slot=\"select-group\"\n      className={cn(selectGroupClassName, className)}\n      {...props}\n    />\n  )\n}\n\nfunction SelectValue({ className, ...props }: SelectPrimitive.Value.Props) {\n  return (\n    <SelectPrimitive.Value\n      data-slot=\"select-value\"\n      className={cn(selectValueClassName, className)}\n      {...props}\n    />\n  )\n}\n\nfunction SelectTrigger({\n  className,\n  size = 'default',\n  children,\n  ...props\n}: SelectPrimitive.Trigger.Props & {\n  size?: 'sm' | 'default'\n}) {\n  return (\n    <SelectPrimitive.Trigger\n      data-slot=\"select-trigger\"\n      data-size={size}\n      className={cn(selectTriggerClassName, className)}\n      {...props}\n    >\n      {children}\n      <SelectPrimitive.Icon render={<ChevronDownIcon className={selectTriggerIconClassName} />} />\n    </SelectPrimitive.Trigger>\n  )\n}\n\nfunction SelectContent({\n  className,\n  children,\n  side = 'bottom',\n  sideOffset = 4,\n  align = 'center',\n  alignOffset = 0,\n  alignItemWithTrigger = true,\n  ...props\n}: SelectPrimitive.Popup.Props &\n  Pick<\n    SelectPrimitive.Positioner.Props,\n    'align' | 'alignOffset' | 'side' | 'sideOffset' | 'alignItemWithTrigger'\n  >) {\n  return (\n    <SelectPrimitive.Portal>\n      <SelectPrimitive.Positioner\n        side={side}\n        sideOffset={sideOffset}\n        align={align}\n        alignOffset={alignOffset}\n        alignItemWithTrigger={alignItemWithTrigger}\n        className={selectContentPositionerClassName}\n      >\n        <SelectPrimitive.Popup\n          data-slot=\"select-content\"\n          data-align-trigger={alignItemWithTrigger}\n          className={cn(selectContentClassName, className)}\n          {...props}\n        >\n          <SelectScrollUpButton />\n          <SelectPrimitive.List>{children}</SelectPrimitive.List>\n          <SelectScrollDownButton />\n        </SelectPrimitive.Popup>\n      </SelectPrimitive.Positioner>\n    </SelectPrimitive.Portal>\n  )\n}\n\nfunction SelectLabel({ className, ...props }: SelectPrimitive.GroupLabel.Props) {\n  return (\n    <SelectPrimitive.GroupLabel\n      data-slot=\"select-label\"\n      className={cn(selectLabelClassName, className)}\n      {...props}\n    />\n  )\n}\n\nfunction SelectItem({ className, children, ...props }: SelectPrimitive.Item.Props) {\n  return (\n    <SelectPrimitive.Item\n      data-slot=\"select-item\"\n      className={cn(selectItemClassName, className)}\n      {...props}\n    >\n      <SelectPrimitive.ItemText className={selectItemTextClassName}>\n        {children}\n      </SelectPrimitive.ItemText>\n      <SelectPrimitive.ItemIndicator render={<span className={selectItemIndicatorClassName} />}>\n        <CheckIcon className={selectIconClassName} />\n      </SelectPrimitive.ItemIndicator>\n    </SelectPrimitive.Item>\n  )\n}\n\nfunction SelectSeparator({ className, ...props }: SelectPrimitive.Separator.Props) {\n  return (\n    <SelectPrimitive.Separator\n      data-slot=\"select-separator\"\n      className={cn(selectSeparatorClassName, className)}\n      {...props}\n    />\n  )\n}\n\nfunction SelectScrollUpButton({\n  className,\n  ...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollUpArrow>) {\n  return (\n    <SelectPrimitive.ScrollUpArrow\n      data-slot=\"select-scroll-up-button\"\n      className={cn(selectScrollUpButtonClassName, className)}\n      {...props}\n    >\n      <ChevronUpIcon />\n    </SelectPrimitive.ScrollUpArrow>\n  )\n}\n\nfunction SelectScrollDownButton({\n  className,\n  ...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollDownArrow>) {\n  return (\n    <SelectPrimitive.ScrollDownArrow\n      data-slot=\"select-scroll-down-button\"\n      className={cn(selectScrollDownButtonClassName, className)}\n      {...props}\n    >\n      <ChevronDownIcon />\n    </SelectPrimitive.ScrollDownArrow>\n  )\n}\n\nexport {\n  Select,\n  SelectContent,\n  SelectGroup,\n  SelectItem,\n  SelectLabel,\n  SelectScrollDownButton,\n  SelectScrollUpButton,\n  SelectSeparator,\n  SelectTrigger,\n  SelectValue,\n}\n",
      "type": "registry:ui",
      "target": "@ui/select.tsx"
    }
  ],
  "meta": {
    "baseUiNext": {
      "version": "0.1.2",
      "hash": "9f4177343a9c9b35356a1341ad255b4f4c13ae0f3e9934ac9f4aaae68667266e",
      "files": {
        "@ui/select.tsx": "10e5f5054f8bec2e3c52ffe97964cf6c3d720fe1bce4ad8269ac7968b0d83532"
      }
    }
  }
}
