{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "combo-box-preskok-demo",
  "registryDependencies": [
    "https://ui-three-mu.vercel.app/r/combo-box.json"
  ],
  "files": [
    {
      "path": "registry/preskok/examples/combo-box-preskok-demo.tsx",
      "content": "\"use client\"\n\nimport { useState } from \"react\"\n\nimport {\n  ComboBox,\n  ComboBoxContent,\n  ComboBoxDescription,\n  ComboBoxInput,\n  ComboBoxItem,\n  ComboBoxLabel,\n  ComboBoxSection,\n} from \"@/components/ui/preskok-ui/combo-box\"\nimport { Description, Label } from \"@/components/ui/preskok-ui/field\"\n\nexport function Component() {\n  const [inputValue, setInputValue] = useState(\"\")\n  const [createdTeam, setCreatedTeam] = useState(\"\")\n\n  return (\n    <div className=\"grid w-full max-w-sm gap-3\">\n      <ComboBox\n        name=\"team\"\n        allowsCustomValue\n        allowsEmptyCollection\n        inputValue={inputValue}\n        onInputChange={setInputValue}\n        aria-label=\"Team\"\n      >\n        <Label>Team</Label>\n        <Description>Filter existing teams or create a new one.</Description>\n        <ComboBoxInput placeholder=\"Search teams\" />\n        <ComboBoxContent>\n          {inputValue.length > 0 && (\n            <ComboBoxItem\n              id=\"create-team\"\n              textValue={`Create ${inputValue}`}\n              onAction={() => setCreatedTeam(inputValue)}\n            >\n              <ComboBoxLabel>Create {inputValue}</ComboBoxLabel>\n              <ComboBoxDescription>Add a custom team</ComboBoxDescription>\n            </ComboBoxItem>\n          )}\n          <ComboBoxSection items={teams}>\n            {(item) => (\n              <ComboBoxItem\n                id={item.id}\n                textValue={item.name}\n                isDisabled={item.isDisabled}\n              >\n                <ComboBoxLabel>{item.name}</ComboBoxLabel>\n                <ComboBoxDescription>{item.description}</ComboBoxDescription>\n              </ComboBoxItem>\n            )}\n          </ComboBoxSection>\n        </ComboBoxContent>\n      </ComboBox>\n      {createdTeam && (\n        <p className=\"text-sm text-muted-foreground\">\n          Created team: {createdTeam}\n        </p>\n      )}\n    </div>\n  )\n}\n\nconst teams = [\n  {\n    id: \"design\",\n    name: \"Design systems\",\n    description: \"Components, tokens, and accessibility reviews\",\n  },\n  {\n    id: \"infra\",\n    name: \"Infrastructure\",\n    description: \"Cloud, deployments, observability, and incidents\",\n  },\n  {\n    id: \"growth\",\n    name: \"Growth\",\n    description: \"Experiments, lifecycle, and activation metrics\",\n  },\n  {\n    id: \"finance\",\n    name: \"Finance\",\n    description: \"Locked by workspace policy\",\n    isDisabled: true,\n  },\n]\n",
      "type": "registry:example"
    }
  ],
  "type": "registry:example"
}