{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "select-demo",
  "registryDependencies": [
    "https://ui-three-mu.vercel.app/r/select.json"
  ],
  "files": [
    {
      "path": "registry/preskok/examples/select-demo.tsx",
      "content": "\"use client\"\n\nimport { useState } from \"react\"\nimport type { Key } from \"react-aria-components/Select\"\n\nimport { Description, Label } from \"@/components/ui/preskok-ui/field\"\nimport {\n  Select,\n  SelectContent,\n  SelectDescription,\n  SelectItem,\n  SelectLabel,\n  SelectTrigger,\n} from \"@/components/ui/preskok-ui/select\"\n\nexport default function SelectDemo() {\n  const [value, setValue] = useState(\"growth\")\n\n  function handleChange(value: Key | null) {\n    if (value) {\n      setValue(value.toString())\n    }\n  }\n\n  return (\n    <div className=\"grid w-full max-w-sm gap-3\">\n      <Select\n        placeholder=\"Select a plan\"\n        value={value}\n        onChange={handleChange}\n        aria-label=\"Plan\"\n      >\n        <Label>Plan</Label>\n        <Description>\n          Disabled items stay visible but cannot be selected.\n        </Description>\n        <SelectTrigger />\n        <SelectContent items={plans}>\n          {(item) => (\n            <SelectItem\n              id={item.id}\n              textValue={item.name}\n              isDisabled={item.isDisabled}\n            >\n              <SelectLabel>{item.name}</SelectLabel>\n              <SelectDescription>{item.description}</SelectDescription>\n            </SelectItem>\n          )}\n        </SelectContent>\n      </Select>\n      <p className=\"text-sm text-muted-foreground\">Current value: {value}</p>\n    </div>\n  )\n}\n\nconst plans = [\n  {\n    id: \"starter\",\n    name: \"Starter\",\n    description: \"1 workspace and 3 editors\",\n  },\n  {\n    id: \"growth\",\n    name: \"Growth\",\n    description: \"Unlimited projects with shared analytics\",\n  },\n  {\n    id: \"enterprise\",\n    name: \"Enterprise\",\n    description: \"SSO, audit logs, and custom limits\",\n  },\n  {\n    id: \"legacy\",\n    name: \"Legacy\",\n    description: \"Existing customers only\",\n    isDisabled: true,\n  },\n]\n",
      "type": "registry:example"
    }
  ],
  "type": "registry:example"
}