{
  "$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// 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"
    },
    {
      "content": "// Code generated by @ui8kit/codegen. DO NOT EDIT.\n/**\n * Select is a native dropdown. Flat options come from the Options list;\n * SelectOption / SelectOptGroup children cover grouped or custom markup.\n */\n\nimport { createEffect, splitProps, type JSX, type Component } from \"solid-js\";\nimport { selectClasses, type SelectOptionItem } from \"./select.shared\";\nimport { eqStr, safeRest, syncValue } from \"../../utils/expr\";\n\n/**\n * Select renders option children from Options, then manual children.\n */\nexport type SelectProps = Omit<JSX.SelectHTMLAttributes<HTMLSelectElement>, \"class\" | \"className\" | \"children\" | \"value\" | \"multiple\" | \"required\" | \"disabled\" | \"options\"> & {\n  value?: string;\n  multiple?: boolean;\n  required?: boolean;\n  disabled?: boolean;\n  options?: SelectOptionItem[];\n  class?: string;\n  className?: string;\n  children?: JSX.Element;\n};\n\nexport const Select: Component<SelectProps> = (props) => {\n  const [local, rest] = splitProps(props, [\"value\", \"multiple\", \"required\", \"disabled\", \"options\", \"class\", \"className\", \"children\"]);\n  const cls = () => selectClasses({ className: local.class ?? local.className });\n  return (\n    <select {...(cls() ? { class: cls() } : {})} multiple={local.multiple || undefined} required={local.required || undefined} disabled={local.disabled || undefined} ref={(el) => createEffect(() => syncValue(el, local.value))} {...safeRest(rest, { blank: [\"id\", \"name\", \"aria-invalid\", \"aria-describedby\"] })}>\n      {(local.options ?? []).map((item) => (\n        <option value={(item.value) ?? \"\"} selected={eqStr(item.value, local.value) || undefined} disabled={item.disabled || undefined}>\n          {item.label}\n        </option>\n      ))}\n      {local.children}\n    </select>\n  );\n};\n\n/**\n * SelectOption renders a native option.\n */\nexport type SelectOptionProps = Omit<JSX.OptionHTMLAttributes<HTMLOptionElement>, \"class\" | \"className\" | \"children\" | \"selected\" | \"disabled\"> & {\n  selected?: boolean;\n  disabled?: boolean;\n  class?: string;\n  className?: string;\n  children?: JSX.Element;\n};\n\nexport const SelectOption: Component<SelectOptionProps> = (props) => {\n  const [local, rest] = splitProps(props, [\"selected\", \"disabled\", \"class\", \"className\", \"children\"]);\n  return (\n    <option selected={local.selected || undefined} disabled={local.disabled || undefined} {...safeRest(rest)}>\n      {local.children}\n    </option>\n  );\n};\n\n/**\n * SelectOptGroup renders a native optgroup around option children.\n */\nexport type SelectOptGroupProps = Omit<JSX.OptgroupHTMLAttributes<HTMLOptGroupElement>, \"class\" | \"className\" | \"children\" | \"disabled\"> & {\n  disabled?: boolean;\n  class?: string;\n  className?: string;\n  children?: JSX.Element;\n};\n\nexport const SelectOptGroup: Component<SelectOptGroupProps> = (props) => {\n  const [local, rest] = splitProps(props, [\"disabled\", \"class\", \"className\", \"children\"]);\n  return (\n    <optgroup disabled={local.disabled || undefined} {...safeRest(rest, { blank: [\"label\"] })}>\n      {local.children}\n    </optgroup>\n  );\n};\n",
      "path": "kit/ui/select/select.solid.tsx",
      "target": "kit/ui/select/select.solid.tsx"
    }
  ],
  "meta": {
    "category": "kit",
    "kind": "primitive",
    "tags": [
      "solid",
      "primitive"
    ]
  },
  "name": "kit-select",
  "registryDependencies": [
    "utils"
  ],
  "runtime": "solid",
  "title": "Kit Select",
  "type": "registry:ui"
}
