{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "v-fieldset-7",
  "description": "Account settings fieldset with timezone select",
  "registryDependencies": [
    "@cnippet/fieldset"
  ],
  "files": [
    {
      "path": "registry/default/variants/v-fieldset-7.tsx",
      "content": "// title: Account settings fieldset with timezone select\n\"use client\";\n\nimport { useState } from \"react\";\nimport { Button } from \"@/registry/default/ui/button\";\nimport {\n  Field,\n  FieldDescription,\n  FieldLabel,\n} from \"@/registry/default/ui/field\";\nimport { Fieldset, FieldsetLegend } from \"@/registry/default/ui/fieldset\";\nimport { Input } from \"@/registry/default/ui/input\";\nimport {\n  Select,\n  SelectItem,\n  SelectPopup,\n  SelectTrigger,\n  SelectValue,\n} from \"@/registry/default/ui/select\";\n\nconst timezones = [\n  { label: \"UTC−8 Pacific Time\", value: \"America/Los_Angeles\" },\n  { label: \"UTC−5 Eastern Time\", value: \"America/New_York\" },\n  { label: \"UTC+0 London\", value: \"Europe/London\" },\n  { label: \"UTC+1 Paris\", value: \"Europe/Paris\" },\n  { label: \"UTC+5:30 Mumbai\", value: \"Asia/Kolkata\" },\n  { label: \"UTC+9 Tokyo\", value: \"Asia/Tokyo\" },\n];\n\nexport function Pattern() {\n  const [saved, setSaved] = useState(false);\n\n  function handleSave() {\n    setSaved(true);\n    setTimeout(() => setSaved(false), 1800);\n  }\n\n  return (\n    <Fieldset className=\"flex w-full max-w-sm flex-col gap-5\">\n      <FieldsetLegend>Account Settings</FieldsetLegend>\n      <Field>\n        <FieldLabel>Display name</FieldLabel>\n        <Input defaultValue=\"Jane Doe\" type=\"text\" />\n        <FieldDescription>Shown on your public profile.</FieldDescription>\n      </Field>\n      <Field>\n        <FieldLabel>Username</FieldLabel>\n        <div className=\"flex items-center overflow-hidden rounded-md border bg-background focus-within:ring-1 focus-within:ring-ring\">\n          <span className=\"border-r bg-muted px-3 py-2 text-muted-foreground text-sm\">\n            @\n          </span>\n          <input\n            className=\"flex-1 bg-transparent px-3 py-2 text-sm outline-none placeholder:text-muted-foreground\"\n            defaultValue=\"janedoe\"\n            type=\"text\"\n          />\n        </div>\n      </Field>\n      <Field>\n        <FieldLabel>Timezone</FieldLabel>\n        <Select defaultValue=\"Europe/London\" items={timezones}>\n          <SelectTrigger>\n            <SelectValue />\n          </SelectTrigger>\n          <SelectPopup>\n            {timezones.map(({ label, value }) => (\n              <SelectItem key={value} value={value}>\n                {label}\n              </SelectItem>\n            ))}\n          </SelectPopup>\n        </Select>\n      </Field>\n      <Button\n        className=\"self-start\"\n        onClick={handleSave}\n        size=\"sm\"\n        variant={saved ? \"outline\" : \"default\"}\n      >\n        {saved ? \"Saved!\" : \"Save changes\"}\n      </Button>\n    </Fieldset>\n  );\n}\n",
      "type": "registry:block"
    }
  ],
  "meta": {
    "className": ""
  },
  "categories": [
    "fieldset"
  ],
  "type": "registry:block"
}