{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "select",
  "title": "Select",
  "description": "Astro selection popups with labelled options and data-slot behavior.",
  "dependencies": [
    "@data-slot/select",
    "@lucide/astro",
    "cn"
  ],
  "registryDependencies": [],
  "files": [
    {
      "path": "packages/ui/src/components/ui/select/index.ts",
      "content": "export { default as Select } from './select.astro'\nexport { default as SelectContent } from './select-content.astro'\nexport { default as SelectGroup } from './select-group.astro'\nexport { default as SelectItem } from './select-item.astro'\nexport { default as SelectLabel } from './select-label.astro'\nexport { default as SelectSeparator } from './select-separator.astro'\nexport { default as SelectTrigger } from './select-trigger.astro'\nexport { default as SelectValue } from './select-value.astro'\nexport type { SelectProps, SelectContentProps } from './types.ts'\n",
      "type": "registry:file",
      "target": "~/src/components/ui/select/index.ts"
    },
    {
      "path": "packages/ui/src/components/ui/select/select-content.astro",
      "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"cn\"\nimport type { SelectContentProps } from \"./types.ts\"\n\ntype Props = HTMLAttributes<\"div\"> & SelectContentProps\n\nconst {\n  class: className,\n  hidden = true,\n  position,\n  side,\n  align,\n  sideOffset,\n  alignOffset,\n  avoidCollisions,\n  collisionPadding,\n  ...props\n} = Astro.props\n---\n\n<div data-slot=\"select-portal\">\n  <div\n    data-slot=\"select-positioner\"\n    data-position={position}\n    data-side={side}\n    data-align={align}\n    data-side-offset={sideOffset}\n    data-align-offset={alignOffset}\n    data-avoid-collisions={avoidCollisions}\n    data-collision-padding={collisionPadding}\n    class=\"isolate z-50\"\n  >\n    <div\n      data-slot=\"select-content\"\n      data-position={position}\n      data-align-trigger={position === \"item-aligned\" ? \"true\" : undefined}\n      data-side={side}\n      data-align={align}\n      data-side-offset={sideOffset}\n      data-align-offset={alignOffset}\n      data-avoid-collisions={avoidCollisions}\n      data-collision-padding={collisionPadding}\n      hidden={hidden}\n      class={cn(\"relative max-h-(--available-height) min-w-(--anchor-width) max-w-(--available-width) origin-(--transform-origin) overflow-y-auto rounded-lg text-foreground outline-none border bg-popover not-dark:bg-clip-padding shadow-lg/5 before:pointer-events-none before:absolute before:inset-0 before:shadow-[0_1px_--theme(--color-black/4%)] dark:before:shadow-[0_-1px_--theme(--color-white/6%)] before:rounded-[calc(var(--radius-lg)-1px)] transition-[scale,opacity] duration-200 data-ending-style:scale-98 data-starting-style:scale-98 data-ending-style:opacity-0 data-starting-style:opacity-0 data-[align-trigger=true]:transition-none\", className)}\n      {...props}\n    >\n      <div\n        data-slot=\"select-viewport\"\n        data-position={position}\n        class=\"p-1 data-[position=item-aligned]:w-full data-[position=popper]:min-w-36\"\n      >\n        <slot />\n      </div>\n    </div>\n  </div>\n</div>\n",
      "type": "registry:file",
      "target": "~/src/components/ui/select/select-content.astro"
    },
    {
      "path": "packages/ui/src/components/ui/select/select-group.astro",
      "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"cn\"\n\ntype Props = HTMLAttributes<\"div\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<div\n  data-slot=\"select-group\"\n  class={cn(\"scroll-my-1 p-1\", className)}\n  {...props}\n>\n  <slot />\n</div>\n",
      "type": "registry:file",
      "target": "~/src/components/ui/select/select-group.astro"
    },
    {
      "path": "packages/ui/src/components/ui/select/select-item.astro",
      "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport CheckIcon from \"@lucide/astro/icons/check\"\n\nimport { cn } from \"cn\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n  value?: string\n  disabled?: boolean\n  label?: string\n}\n\nconst { class: className, value, disabled, label, ...props } = Astro.props\n---\n\n<div\n  data-slot=\"select-item\"\n  data-value={value}\n  data-disabled={disabled ? \"true\" : undefined}\n  data-label={label}\n  class={cn(\"grid min-h-8 in-data-[side=none]:min-w-[calc(var(--anchor-width)+1.25rem)] cursor-default grid-cols-[1rem_minmax(0,1fr)] items-center gap-2 rounded-sm py-1 ps-2 pe-4 text-base outline-none data-disabled:pointer-events-none data-highlighted:bg-accent data-highlighted:text-accent-foreground data-disabled:opacity-64 sm:min-h-7 sm:text-sm [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0 relative w-full group/select-item\", className)}\n  {...props}\n>\n  <span data-slot=\"select-item-text\" class=\"col-start-2 row-start-1 flex min-w-0 items-center gap-2 wrap-anywhere\">\n    <slot />\n  </span>\n  <span\n    data-slot=\"select-item-indicator\"\n    aria-hidden=\"true\"\n    class=\"pointer-events-none col-start-1 row-start-1 flex size-4 items-center justify-center opacity-0 group-data-[selected]/select-item:opacity-100\"\n  >\n    <CheckIcon />\n  </span>\n</div>\n",
      "type": "registry:file",
      "target": "~/src/components/ui/select/select-item.astro"
    },
    {
      "path": "packages/ui/src/components/ui/select/select-label.astro",
      "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"cn\"\n\ntype Props = HTMLAttributes<\"div\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<div\n  data-slot=\"select-label\"\n  class={cn(\"px-2 py-1.5 font-medium text-muted-foreground text-xs\", className)}\n  {...props}\n>\n  <slot />\n</div>\n",
      "type": "registry:file",
      "target": "~/src/components/ui/select/select-label.astro"
    },
    {
      "path": "packages/ui/src/components/ui/select/select-separator.astro",
      "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"cn\"\n\ntype Props = HTMLAttributes<\"div\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<div\n  data-slot=\"select-separator\"\n  class={cn(\"mx-2 my-1 h-px bg-border\", className)}\n  {...props}\n></div>\n",
      "type": "registry:file",
      "target": "~/src/components/ui/select/select-separator.astro"
    },
    {
      "path": "packages/ui/src/components/ui/select/select-trigger.astro",
      "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport ChevronsUpDownIcon from \"@lucide/astro/icons/chevrons-up-down\"\n\nimport { cn } from \"cn\"\n\ntype Props = HTMLAttributes<\"button\"> & {\n  size?: \"sm\" | \"default\"\n  showIcon?: boolean\n}\n\nconst {\n  class: className,\n  type = \"button\",\n  size = \"default\",\n  showIcon = true,\n  ...props\n} = Astro.props\n---\n\n<button\n  data-slot=\"select-trigger\"\n  data-size={size}\n  type={type}\n  class={cn(\"relative inline-flex min-h-9 w-full min-w-36 select-none items-center justify-between gap-2 rounded-lg border border-input bg-background not-dark:bg-clip-padding px-[calc(--spacing(3)-1px)] text-left text-base text-foreground shadow-xs/5 outline-none ring-ring/24 transition-shadow before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] not-data-disabled:not-focus-visible:not-aria-invalid:not-data-pressed:before:shadow-[0_1px_--theme(--color-black/4%)] pointer-coarse:after:absolute pointer-coarse:after:size-full pointer-coarse:after:min-h-11 focus-visible:border-ring focus-visible:ring-[3px] aria-invalid:border-destructive/36 focus-visible:aria-invalid:border-destructive/64 focus-visible:aria-invalid:ring-destructive/16 data-disabled:pointer-events-none data-disabled:opacity-64 sm:min-h-8 sm:text-sm dark:bg-input/32 dark:aria-invalid:ring-destructive/24 dark:not-data-disabled:not-focus-visible:not-aria-invalid:not-data-pressed:before:shadow-[0_-1px_--theme(--color-white/6%)] [&_svg:not([class*='opacity-'])]:opacity-80 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0 [[data-disabled],:focus-visible,[aria-invalid=true],[data-pressed]]:shadow-none data-[size=sm]:min-h-8 data-[size=sm]:gap-1.5 data-[size=sm]:px-[calc(--spacing(2.5)-1px)] sm:data-[size=sm]:min-h-7 disabled:pointer-events-none disabled:opacity-64\", className)}\n  {...props}\n>\n  <slot />\n  {showIcon && (\n    <ChevronsUpDownIcon\n      data-slot=\"select-trigger-icon\"\n      class=\"text-muted-foreground pointer-events-none size-4\"\n    />\n  )}\n</button>\n",
      "type": "registry:file",
      "target": "~/src/components/ui/select/select-trigger.astro"
    },
    {
      "path": "packages/ui/src/components/ui/select/select-value.astro",
      "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"cn\"\n\ntype Props = HTMLAttributes<\"span\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<span\n  data-slot=\"select-value\"\n  class={cn(\"flex-1 truncate data-placeholder:text-muted-foreground\", className)}\n  {...props}\n>\n  <slot />\n</span>\n",
      "type": "registry:file",
      "target": "~/src/components/ui/select/select-value.astro"
    },
    {
      "path": "packages/ui/src/components/ui/select/select.astro",
      "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"cn\"\nimport type { SelectProps } from \"./types.ts\"\n\ntype Props = HTMLAttributes<\"div\"> & SelectProps\n\nconst {\n  class: className,\n  defaultValue,\n  defaultOpen,\n  placeholder,\n  mountStrategy,\n  disabled,\n  required,\n  name,\n  position,\n  side,\n  align,\n  sideOffset,\n  alignOffset,\n  avoidCollisions,\n  collisionPadding,\n  highlightItemOnHover,\n  lockScroll,\n  ...props\n} = Astro.props\n---\n\n<div\n  data-slot=\"select\"\n  data-default-value={defaultValue}\n  data-default-open={defaultOpen}\n  data-placeholder={placeholder}\n  data-mount-strategy={mountStrategy}\n  data-disabled={disabled}\n  data-required={required}\n  data-name={name}\n  data-position={position}\n  data-side={side}\n  data-align={align}\n  data-side-offset={sideOffset}\n  data-align-offset={alignOffset}\n  data-avoid-collisions={avoidCollisions}\n  data-collision-padding={collisionPadding}\n  data-highlight-item-on-hover={highlightItemOnHover}\n  data-lock-scroll={lockScroll}\n  class={cn(\n    \"group/select relative inline-flex w-fit flex-col gap-1.5\",\n    className,\n  )}\n  {...props}\n>\n  <slot />\n</div>\n\n<script>\n  import { create } from \"@data-slot/select\"\n  import type { SelectController } from \"@data-slot/select\"\n  // Destroy bindings before a view transition so the next page-load binds once.\n  const controllers: SelectController[] = []\n  const initialize = () => controllers.push(...create())\n  initialize()\n  document.addEventListener(\"astro:page-load\", initialize)\n  document.addEventListener(\"astro:before-swap\", () => {\n    for (const controller of controllers) controller.destroy()\n    controllers.length = 0\n  })\n</script>\n",
      "type": "registry:file",
      "target": "~/src/components/ui/select/select.astro"
    },
    {
      "path": "packages/ui/src/components/ui/select/types.ts",
      "content": "import type { SelectOptions } from '@data-slot/select'\n\n/**\n * Select configuration rendered as data attributes.\n */\nexport type SelectProps = Pick<\n    SelectOptions,\n    | 'defaultValue'\n    | 'defaultOpen'\n    | 'placeholder'\n    | 'mountStrategy'\n    | 'disabled'\n    | 'required'\n    | 'name'\n    | 'position'\n    | 'side'\n    | 'align'\n    | 'sideOffset'\n    | 'alignOffset'\n    | 'avoidCollisions'\n    | 'collisionPadding'\n    | 'highlightItemOnHover'\n    | 'lockScroll'\n>\n\n/** Placement fields for the select popup. */\nexport type SelectContentProps = Pick<\n    SelectOptions,\n    | 'position'\n    | 'side'\n    | 'align'\n    | 'sideOffset'\n    | 'alignOffset'\n    | 'avoidCollisions'\n    | 'collisionPadding'\n>\n",
      "type": "registry:file",
      "target": "~/src/components/ui/select/types.ts"
    }
  ],
  "meta": {
    "framework": "astro",
    "source": "@gnostic/ui",
    "testedDependencies": {
      "@data-slot/select": "^1.1.2",
      "@lucide/astro": "^1.68.0",
      "cn": "0.5.2"
    }
  },
  "docs": "https://ui.gnosticai.com/components/select",
  "categories": [
    "ui"
  ],
  "type": "registry:ui"
}
