{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "UI8Kit 3 Select primitive (unstyled), from @ui8kit/registry",
  "devDependencies": [],
  "digest": "0.1.0",
  "files": [
    {
      "content": "<!-- Code generated by @ui8kit/codegen. DO NOT EDIT. -->\n<!--\n  Select renders option children from Options, then manual children.\n-->\n<script lang=\"ts\" module>\n  import type { Snippet } from \"svelte\";\n  import type { SelectOptionItem } from \"./select.shared\";\n\n  export type SelectProps = {\n    value?: string;\n    multiple?: boolean;\n    required?: boolean;\n    disabled?: boolean;\n    options?: SelectOptionItem[];\n    class?: string;\n    children?: Snippet;\n    [key: string]: unknown;\n  };\n</script>\n\n<script lang=\"ts\">\n  import { selectClasses } from \"./select.shared\";\n  import { eqStr, safeRest, syncValue } from \"../../utils/expr\";\n\n  let {\n    value,\n    multiple,\n    required,\n    disabled,\n    options,\n    class: className,\n    children,\n    ...rawRest\n  }: SelectProps = $props();\n\n  const rest = $derived(safeRest(rawRest, { blank: [\"id\", \"name\", \"aria-invalid\", \"aria-describedby\"] }));\n  const cls = $derived(selectClasses({ className }));\n</script>\n\n<select {...(cls ? { class: cls } : {})} multiple={multiple || undefined} required={required || undefined} disabled={disabled || undefined} use:syncValue={value} {...rest}>\n  {#each options ?? [] as item}\n    <option value={(item.value) ?? \"\"} selected={eqStr(item.value, value) || undefined} disabled={item.disabled || undefined}>{item.label}</option>\n  {/each}\n  {@render children?.()}\n</select>\n",
      "path": "kit/ui/select/Select.svelte",
      "target": "kit/ui/select/Select.svelte"
    },
    {
      "content": "<!-- Code generated by @ui8kit/codegen. DO NOT EDIT. -->\n<!--\n  SelectOptGroup renders a native optgroup around option children.\n-->\n<script lang=\"ts\" module>\n  import type { Snippet } from \"svelte\";\n\n  export type SelectOptGroupProps = {\n    disabled?: boolean;\n    class?: string;\n    children?: Snippet;\n    [key: string]: unknown;\n  };\n</script>\n\n<script lang=\"ts\">\n  import { safeRest } from \"../../utils/expr\";\n\n  let {\n    disabled,\n    class: className,\n    children,\n    ...rawRest\n  }: SelectOptGroupProps = $props();\n\n  const rest = $derived(safeRest(rawRest, { blank: [\"label\"] }));\n</script>\n\n<optgroup disabled={disabled || undefined} {...rest}>\n  {@render children?.()}\n</optgroup>\n",
      "path": "kit/ui/select/SelectOptGroup.svelte",
      "target": "kit/ui/select/SelectOptGroup.svelte"
    },
    {
      "content": "<!-- Code generated by @ui8kit/codegen. DO NOT EDIT. -->\n<!--\n  SelectOption renders a native option.\n-->\n<script lang=\"ts\" module>\n  import type { Snippet } from \"svelte\";\n\n  export type SelectOptionProps = {\n    selected?: boolean;\n    disabled?: boolean;\n    class?: string;\n    children?: Snippet;\n    [key: string]: unknown;\n  };\n</script>\n\n<script lang=\"ts\">\n  import { safeRest } from \"../../utils/expr\";\n\n  let {\n    selected,\n    disabled,\n    class: className,\n    children,\n    ...rawRest\n  }: SelectOptionProps = $props();\n\n  const rest = $derived(safeRest(rawRest));\n</script>\n\n<option selected={selected || undefined} disabled={disabled || undefined} {...rest}>\n  {@render children?.()}\n</option>\n",
      "path": "kit/ui/select/SelectOption.svelte",
      "target": "kit/ui/select/SelectOption.svelte"
    },
    {
      "content": "// Code generated by @ui8kit/codegen. DO NOT EDIT.\n// ui.select — shared TypeScript contract (types + classes helpers)\n\nimport { cn } from \"../../utils\";\n\nexport type SelectOptionItem = {\n  value?: string;\n  label?: string;\n  disabled?: boolean;\n};\n\n/** Select renders option children from Options, then manual children. */\nexport type SelectBaseProps = {\n  value?: string;\n  multiple?: boolean;\n  required?: boolean;\n  disabled?: boolean;\n  options?: SelectOptionItem[];\n};\n\nexport type SelectClassesInput = {\n  className?: string;\n};\n\n/** Compose Select classes without rendering — the cross-runtime `asChild` substitute. */\nexport function selectClasses(input: SelectClassesInput = {}): string {\n  return cn(\"pr-2\", input.className);\n}\n\n/** SelectOption renders a native option. */\nexport type SelectOptionBaseProps = {\n  selected?: boolean;\n  disabled?: boolean;\n};\n\n/** SelectOptGroup renders a native optgroup around option children. */\nexport type SelectOptGroupBaseProps = {\n  disabled?: boolean;\n};\n",
      "path": "kit/ui/select/select.shared.ts",
      "target": "kit/ui/select/select.shared.ts"
    }
  ],
  "meta": {
    "category": "kit",
    "kind": "primitive",
    "tags": [
      "svelte",
      "primitive"
    ]
  },
  "name": "kit-select",
  "registryDependencies": [
    "utils"
  ],
  "runtime": "svelte",
  "title": "Kit Select",
  "type": "registry:ui"
}
