{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "select",
  "title": "Select",
  "author": "Poyraz Avsever",
  "description": "Poyraz Soft Glass select component with standardized floating and overlay behavior.",
  "dependencies": [
    "@radix-ui/react-select@^2.2.6",
    "lucide-react@^0.574.0"
  ],
  "registryDependencies": [
    "@poyraz/poyraz-utils",
    "@poyraz/poyraz-theme",
    "@poyraz/poyraz-recipes"
  ],
  "files": [
    {
      "path": "registry/poyraz/ui/phase6/molecules/select.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\nimport { Check, ChevronDown, ChevronUp } from \"lucide-react\";\nimport * as SelectPrimitive from \"@radix-ui/react-select\";\n\nimport { cn } from \"@/lib/utils\";\nimport {\n  fieldVariants,\n  floatingItemVariants,\n  floatingMotion,\n  floatingSurfaceVariants,\n  type FloatingItemProps,\n  type FloatingSurfaceProps,\n} from \"@/components/ui/recipes\";\n\nconst Select = SelectPrimitive.Root;\n\nconst SelectGroup = SelectPrimitive.Group;\n\nconst SelectValue = SelectPrimitive.Value;\n\nconst SelectTrigger = React.forwardRef<\n  React.ElementRef<typeof SelectPrimitive.Trigger>,\n  React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger> & {\n    variant?: \"default\" | \"soft\" | \"glass\";\n    radius?: \"none\" | \"sm\" | \"md\" | \"lg\" | \"xl\" | \"full\";\n    size?: \"sm\" | \"md\" | \"lg\";\n  }\n>(({ className, children, variant, radius, size = \"md\", ...props }, ref) => (\n  <SelectPrimitive.Trigger\n    ref={ref}\n    className={cn(\n      fieldVariants({ variant, radius }),\n      \"group items-center justify-between gap-2 [&>span]:line-clamp-1\",\n      size === \"sm\" && \"h-8 px-2.5 py-1 text-xs\",\n      size === \"md\" && \"h-9 px-3 py-1.5 text-sm\",\n      size === \"lg\" && \"h-11 px-3.5 py-2 text-sm\",\n      className,\n    )}\n    {...props}\n  >\n    {children}\n    <SelectPrimitive.Icon asChild>\n      <ChevronDown className=\"h-4 w-4 opacity-50 transition-transform duration-[var(--poyraz-motion-duration-base)] ease-[var(--poyraz-motion-ease-out)] group-data-[state=open]:rotate-180 group-data-[state=open]:scale-110\" />\n    </SelectPrimitive.Icon>\n  </SelectPrimitive.Trigger>\n));\nSelectTrigger.displayName = SelectPrimitive.Trigger.displayName;\n\nconst SelectScrollUpButton = React.forwardRef<\n  React.ElementRef<typeof SelectPrimitive.ScrollUpButton>,\n  React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollUpButton>\n>(({ className, ...props }, ref) => (\n  <SelectPrimitive.ScrollUpButton\n    ref={ref}\n    className={cn(\"flex cursor-default items-center justify-center py-1\", className)}\n    {...props}\n  >\n    <ChevronUp className=\"h-4 w-4\" />\n  </SelectPrimitive.ScrollUpButton>\n));\nSelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;\n\nconst SelectScrollDownButton = React.forwardRef<\n  React.ElementRef<typeof SelectPrimitive.ScrollDownButton>,\n  React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollDownButton>\n>(({ className, ...props }, ref) => (\n  <SelectPrimitive.ScrollDownButton\n    ref={ref}\n    className={cn(\"flex cursor-default items-center justify-center py-1\", className)}\n    {...props}\n  >\n    <ChevronDown className=\"h-4 w-4\" />\n  </SelectPrimitive.ScrollDownButton>\n));\nSelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;\n\nconst SelectItemContext = React.createContext<{\n  size: NonNullable<FloatingItemProps[\"size\"]>;\n  radius: NonNullable<FloatingItemProps[\"radius\"]>;\n}>({ size: \"md\", radius: \"md\" });\n\nconst SelectContent = React.forwardRef<\n  React.ElementRef<typeof SelectPrimitive.Content>,\n  React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content> &\n    FloatingSurfaceProps & {\n      itemSize?: NonNullable<FloatingItemProps[\"size\"]>;\n      itemRadius?: NonNullable<FloatingItemProps[\"radius\"]>;\n    }\n>(\n  (\n    {\n      className,\n      children,\n      position = \"popper\",\n      surface,\n      radius,\n      itemSize = \"md\",\n      itemRadius = \"md\",\n      collisionPadding = 8,\n      style,\n      ...props\n    },\n    ref,\n  ) => (\n    <SelectPrimitive.Portal>\n      <SelectPrimitive.Content\n        ref={ref}\n        collisionPadding={collisionPadding}\n        style={\n          {\n            \"--poyraz-floating-transform-origin\": \"var(--radix-select-content-transform-origin)\",\n            \"--poyraz-floating-slide\": \"var(--poyraz-floating-slide-distance, 0.5rem)\",\n            ...style,\n          } as React.CSSProperties\n        }\n        className={cn(\n          floatingSurfaceVariants({ surface, radius }),\n          floatingMotion,\n          \"relative z-50 max-h-96 min-w-40\",\n          position === \"popper\" &&\n            \"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1\",\n          className,\n        )}\n        position={position}\n        {...props}\n      >\n        <SelectScrollUpButton />\n        <SelectItemContext.Provider value={{ size: itemSize, radius: itemRadius }}>\n          <SelectPrimitive.Viewport\n            className={cn(\n              \"p-1\",\n              position === \"popper\" &&\n                \"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]\",\n            )}\n          >\n            {children}\n          </SelectPrimitive.Viewport>\n        </SelectItemContext.Provider>\n        <SelectScrollDownButton />\n      </SelectPrimitive.Content>\n    </SelectPrimitive.Portal>\n  ),\n);\nSelectContent.displayName = SelectPrimitive.Content.displayName;\n\nconst SelectLabel = React.forwardRef<\n  React.ElementRef<typeof SelectPrimitive.Label>,\n  React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label>\n>(({ className, ...props }, ref) => (\n  <SelectPrimitive.Label\n    ref={ref}\n    className={cn(\"py-1.5 pl-8 pr-2 text-sm font-semibold\", className)}\n    {...props}\n  />\n));\nSelectLabel.displayName = SelectPrimitive.Label.displayName;\n\nconst SelectItem = React.forwardRef<\n  React.ElementRef<typeof SelectPrimitive.Item>,\n  React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item> &\n    FloatingItemProps & {\n      media?: React.ReactNode;\n      description?: React.ReactNode;\n      trailing?: React.ReactNode;\n    }\n>(({ className, children, size, radius, media, description, trailing, ...props }, ref) => {\n  const defaults = React.useContext(SelectItemContext);\n  return (\n    <SelectPrimitive.Item\n      ref={ref}\n      className={cn(\n        floatingItemVariants({ size: size ?? defaults.size, radius: radius ?? defaults.radius }),\n        \"cursor-default pl-8\",\n        className,\n      )}\n      {...props}\n    >\n      <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n        <SelectPrimitive.ItemIndicator>\n          <Check className=\"h-4 w-4 animate-poyraz-scale-in\" />\n        </SelectPrimitive.ItemIndicator>\n      </span>\n\n      {media && (\n        <span className=\"flex size-9 shrink-0 items-center justify-center overflow-hidden rounded-md bg-surface-subtle [&_img]:size-full [&_img]:object-cover\">\n          {media}\n        </span>\n      )}\n      <span className=\"min-w-0 flex-1\">\n        <SelectPrimitive.ItemText>\n          <span className=\"block truncate font-medium\">{children}</span>\n        </SelectPrimitive.ItemText>\n        {description && (\n          <span className=\"mt-0.5 block line-clamp-2 text-xs text-muted-foreground\">\n            {description}\n          </span>\n        )}\n      </span>\n      {trailing && <span className=\"ml-auto shrink-0 text-muted-foreground\">{trailing}</span>}\n    </SelectPrimitive.Item>\n  );\n});\nSelectItem.displayName = SelectPrimitive.Item.displayName;\n\nconst SelectSeparator = React.forwardRef<\n  React.ElementRef<typeof SelectPrimitive.Separator>,\n  React.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n  <SelectPrimitive.Separator\n    ref={ref}\n    className={cn(\"-mx-1 my-1 h-px bg-accent\", className)}\n    {...props}\n  />\n));\nSelectSeparator.displayName = SelectPrimitive.Separator.displayName;\n\nexport {\n  Select,\n  SelectGroup,\n  SelectValue,\n  SelectTrigger,\n  SelectContent,\n  SelectLabel,\n  SelectItem,\n  SelectSeparator,\n  SelectScrollUpButton,\n  SelectScrollDownButton,\n};\n",
      "type": "registry:ui",
      "target": "@ui/molecules/select.tsx"
    }
  ],
  "meta": {
    "category": "phase-6-interactive",
    "phase": "beta"
  },
  "type": "registry:ui"
}