{
  "$schema": "https://blode.co/ui/schema/registry-item.json",
  "name": "radio-group",
  "title": "Radio Group",
  "author": "Matthew Blode",
  "description": "A set of mutually exclusive options where only one can be selected.",
  "dependencies": ["@base-ui/react"],
  "files": [
    {
      "path": "ui/radio-group.tsx",
      "content": "\"use client\";\n\nimport { Radio as RadioPrimitive } from \"@base-ui/react/radio\";\nimport { RadioGroup as RadioGroupPrimitive } from \"@base-ui/react/radio-group\";\nimport { CirclePlaceholderOnIcon } from \"blode-icons-react\";\nimport * as React from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\ntype RadioGroupProps = Omit<\n  React.ComponentProps<typeof RadioGroupPrimitive>,\n  \"defaultValue\" | \"onValueChange\" | \"value\"\n> & {\n  value?: string;\n  defaultValue?: string;\n  onValueChange?: (value: string) => void;\n};\n\ntype RadioGroupItemProps = Omit<React.ComponentProps<typeof RadioPrimitive.Root>, \"value\"> & {\n  value: string;\n};\n\nconst RadioGroup = ({ className, onValueChange, ...props }: RadioGroupProps) => (\n  <RadioGroupPrimitive\n    className={cn(\"grid w-full gap-2\", className)}\n    data-slot=\"radio-group\"\n    onValueChange={(nextValue) =>\n      onValueChange?.(typeof nextValue === \"string\" ? nextValue : String(nextValue ?? \"\"))\n    }\n    {...props}\n  />\n);\n\nconst RadioGroupItem = ({ className, ...props }: RadioGroupItemProps) => (\n  <RadioPrimitive.Root\n    className={cn(\n      \"relative inline-flex aspect-square size-5 shrink-0 cursor-pointer items-center justify-center rounded-full border border-input bg-card align-middle text-primary-foreground shadow-input ring-offset-background hover:border-input-hover\",\n      \"data-checked:border-primary data-checked:bg-primary\",\n      \"focus:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\",\n      \"data-disabled:cursor-not-allowed data-disabled:opacity-50\",\n      className,\n    )}\n    data-slot=\"radio-group-item\"\n    {...props}\n  >\n    <RadioPrimitive.Indicator\n      className=\"pointer-events-none flex items-center justify-center text-current\"\n      data-slot=\"radio-group-indicator\"\n    >\n      <CirclePlaceholderOnIcon className=\"size-2.5 fill-current text-primary-foreground\" />\n    </RadioPrimitive.Indicator>\n  </RadioPrimitive.Root>\n);\n\nexport { RadioGroup, RadioGroupItem };\n",
      "type": "registry:ui",
      "target": ""
    }
  ],
  "type": "registry:ui"
}
