{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "comp-156",
  "type": "registry:component",
  "title": "Comp 156",
  "description": "Comp 156",
  "files": [
    {
      "path": "registry/ui-basic/comp-156.tsx",
      "content": "\"use client\";\n\nimport { useEffect, useId, useRef, useState } from \"react\";\n\nimport { Input } from \"@/components/ui/input\";\nimport { Label } from \"@/components/ui/label\";\nimport { RadioGroup, RadioGroupItem } from \"@/components/ui/radio-group\";\n\nexport default function Component() {\n\tconst radioId = useId();\n\tconst inputId = useId();\n\tconst [selectedValue, setSelectedValue] = useState(\"without-expansion\");\n\tconst inputRef = useRef<HTMLInputElement>(null);\n\n\tuseEffect(() => {\n\t\tif (selectedValue === \"with-expansion\" && inputRef.current) {\n\t\t\tinputRef.current.focus();\n\t\t}\n\t}, [selectedValue]);\n\n\treturn (\n\t\t<RadioGroup\n\t\t\tclassName=\"gap-6\"\n\t\t\tvalue={selectedValue}\n\t\t\tonValueChange={setSelectedValue}\n\t\t>\n\t\t\t<div>\n\t\t\t\t<div className=\"flex items-start gap-2\">\n\t\t\t\t\t<RadioGroupItem\n\t\t\t\t\t\tvalue=\"with-expansion\"\n\t\t\t\t\t\tid={`${radioId}-1`}\n\t\t\t\t\t\taria-describedby={`${radioId}-1-description`}\n\t\t\t\t\t\taria-controls={inputId}\n\t\t\t\t\t/>\n\t\t\t\t\t<div className=\"grow\">\n\t\t\t\t\t\t<div className=\"grid grow gap-2\">\n\t\t\t\t\t\t\t<Label htmlFor={`${radioId}-1`}>\n\t\t\t\t\t\t\t\tRadio with expansion\n\t\t\t\t\t\t\t</Label>\n\t\t\t\t\t\t\t<p\n\t\t\t\t\t\t\t\tid={`${radioId}-1-description`}\n\t\t\t\t\t\t\t\tclassName=\"text-muted-foreground text-xs\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\tYou can use this radio with a label and a description.\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t{/* Expandable field */}\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\trole=\"region\"\n\t\t\t\t\t\t\tid={inputId}\n\t\t\t\t\t\t\taria-labelledby={`${radioId}-1`}\n\t\t\t\t\t\t\tclassName=\"grid transition-all ease-in-out data-[state=collapsed]:grid-rows-[0fr] data-[state=collapsed]:opacity-0 data-[state=expanded]:grid-rows-[1fr] data-[state=expanded]:opacity-100\"\n\t\t\t\t\t\t\tdata-state={\n\t\t\t\t\t\t\t\tselectedValue === \"with-expansion\"\n\t\t\t\t\t\t\t\t\t? \"expanded\"\n\t\t\t\t\t\t\t\t\t: \"collapsed\"\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<div className=\"pointer-events-none -m-2 overflow-hidden p-2\">\n\t\t\t\t\t\t\t\t<div className=\"pointer-events-auto mt-3\">\n\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\tref={inputRef}\n\t\t\t\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\t\t\t\tid=\"radio-05-additional-info\"\n\t\t\t\t\t\t\t\t\t\tplaceholder=\"Enter details\"\n\t\t\t\t\t\t\t\t\t\taria-label=\"Additional Information\"\n\t\t\t\t\t\t\t\t\t\tdisabled={selectedValue !== \"with-expansion\"}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t<div className=\"flex items-start gap-2\">\n\t\t\t\t<RadioGroupItem\n\t\t\t\t\tvalue=\"without-expansion\"\n\t\t\t\t\tid={`${radioId}-2`}\n\t\t\t\t\taria-describedby={`${radioId}-2-description`}\n\t\t\t\t/>\n\t\t\t\t<div className=\"grid grow gap-2\">\n\t\t\t\t\t<Label htmlFor={`${radioId}-2`}>Radio without expansion</Label>\n\t\t\t\t\t<p\n\t\t\t\t\t\tid={`${radioId}-2-description`}\n\t\t\t\t\t\tclassName=\"text-muted-foreground text-xs\"\n\t\t\t\t\t>\n\t\t\t\t\t\tYou can use this checkbox with a label and a description.\n\t\t\t\t\t</p>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</RadioGroup>\n\t);\n}\n",
      "type": "registry:ui"
    },
    {
      "path": "components/ui/input.tsx",
      "content": "// SHADCN UI GENERATED CODE\n\nimport React from \"react\";\n\nimport { cn } from \"@/registry/utilities/cn\";\n\nexport interface InputProps\n\textends React.InputHTMLAttributes<HTMLInputElement> {}\n\nconst Input = React.forwardRef<HTMLInputElement, InputProps>(\n\t({ className, type, ...props }, ref) => {\n\t\treturn (\n\t\t\t<input\n\t\t\t\ttype={type}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50\",\n\t\t\t\t\tclassName\n\t\t\t\t)}\n\t\t\t\tref={ref}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t);\n\t}\n);\nInput.displayName = \"Input\";\n\nexport { Input };\n",
      "type": "registry:ui"
    },
    {
      "path": "registry/utilities/cn.ts",
      "content": "import { ClassValue, clsx } from \"clsx\";\r\nimport { twMerge } from \"tailwind-merge\";\r\n\r\nexport function cn(...inputs: ClassValue[]) {\r\n\treturn twMerge(clsx(inputs));\r\n}\r\n",
      "type": "registry:ui"
    },
    {
      "path": "components/ui/label.tsx",
      "content": "\"use client\";\n\nimport React from \"react\";\n\nimport { cn } from \"@/registry/utilities/cn\";\nimport * as LabelPrimitive from \"@radix-ui/react-label\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nconst labelVariants = cva(\n\t\"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70\"\n);\n\nconst Label = React.forwardRef<\n\tReact.ElementRef<typeof LabelPrimitive.Root>,\n\tReact.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> &\n\t\tVariantProps<typeof labelVariants>\n>(({ className, ...props }, ref) => (\n\t<LabelPrimitive.Root\n\t\tref={ref}\n\t\tclassName={cn(labelVariants(), className)}\n\t\t{...props}\n\t/>\n));\nLabel.displayName = LabelPrimitive.Root.displayName;\n\nexport { Label };\n",
      "type": "registry:ui"
    },
    {
      "path": "components/ui/radio-group.tsx",
      "content": "\"use client\";\r\n\r\nimport React from \"react\";\r\n\r\nimport { cn } from \"@/registry/utilities/cn\";\r\nimport * as RadioGroupPrimitive from \"@radix-ui/react-radio-group\";\r\nimport { Circle } from \"lucide-react\";\r\n\r\nconst RadioGroup = React.forwardRef<\r\n\tReact.ElementRef<typeof RadioGroupPrimitive.Root>,\r\n\tReact.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>\r\n>(({ className, ...props }, ref) => {\r\n\treturn (\r\n\t\t<RadioGroupPrimitive.Root\r\n\t\t\tclassName={cn(\"grid gap-2\", className)}\r\n\t\t\t{...props}\r\n\t\t\tref={ref}\r\n\t\t/>\r\n\t);\r\n});\r\nRadioGroup.displayName = RadioGroupPrimitive.Root.displayName;\r\n\r\nconst RadioGroupItem = React.forwardRef<\r\n\tReact.ElementRef<typeof RadioGroupPrimitive.Item>,\r\n\tReact.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>\r\n>(({ className, ...props }, ref) => {\r\n\treturn (\r\n\t\t<RadioGroupPrimitive.Item\r\n\t\t\tref={ref}\r\n\t\t\tclassName={cn(\r\n\t\t\t\t\"aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50\",\r\n\t\t\t\tclassName\r\n\t\t\t)}\r\n\t\t\t{...props}\r\n\t\t>\r\n\t\t\t<RadioGroupPrimitive.Indicator className=\"flex items-center justify-center\">\r\n\t\t\t\t<Circle className=\"h-2.5 w-2.5 fill-current text-current\" />\r\n\t\t\t</RadioGroupPrimitive.Indicator>\r\n\t\t</RadioGroupPrimitive.Item>\r\n\t);\r\n});\r\nRadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;\r\n\r\nexport { RadioGroup, RadioGroupItem };\r\n",
      "type": "registry:ui"
    }
  ]
}