{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "radio",
  "title": "Radio",
  "dependencies": [
    "@base-ui/react"
  ],
  "registryDependencies": [
    "https://ui.hotfix.jobs/r/recipes.json",
    "https://ui.hotfix.jobs/r/tokens.json",
    "https://ui.hotfix.jobs/r/utils.json"
  ],
  "files": [
    {
      "path": "registry/components/ui/radio.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 type * as React from \"react\";\nimport { cn } from \"@/lib/utils\";\nimport { selectionFocus, colorTransition } from \"@/lib/recipes\";\n\nexport function RadioGroup({\n  className,\n  ...props\n}: RadioGroupPrimitive.Props): React.ReactElement {\n  return (\n    <RadioGroupPrimitive\n      className={cn(\"flex flex-col gap-2\", className)}\n      data-slot=\"radio-group\"\n      {...props}\n    />\n  );\n}\n\nexport interface RadioProps extends RadioPrimitive.Root.Props {\n  /** Optional label. When present, the radio is wrapped in a `<label>` so clicking the label selects it. */\n  children?: React.ReactNode;\n  /** Additional classes for the outer `<label>` (only applies when `children` is provided). */\n  wrapperClassName?: string;\n}\n\nexport function Radio({\n  className,\n  wrapperClassName,\n  children,\n  disabled,\n  ...props\n}: RadioProps): React.ReactElement {\n  const dot = (\n    <RadioPrimitive.Root\n      disabled={disabled}\n      className={cn(\n        \"inline-flex size-4 shrink-0 items-center justify-center rounded-full\",\n        \"bg-fill-2 hover:bg-hairline-strong\",\n        \"data-disabled:cursor-not-allowed data-disabled:opacity-50\",\n        colorTransition,\n        selectionFocus,\n        className,\n      )}\n      data-slot=\"radio\"\n      {...props}\n    >\n      <RadioPrimitive.Indicator\n        className=\"flex items-center justify-center\"\n        data-slot=\"radio-indicator\"\n      >\n        <span\n          aria-hidden=\"true\"\n          className=\"!bg-ink size-1.5 rounded-full\"\n        />\n      </RadioPrimitive.Indicator>\n    </RadioPrimitive.Root>\n  );\n\n  if (children == null) return dot;\n\n  return (\n    <label\n      className={cn(\n        \"inline-flex items-center gap-2 text-small text-ink\",\n        disabled && \"cursor-not-allowed opacity-50\",\n        wrapperClassName,\n      )}\n      data-slot=\"radio-label\"\n    >\n      {dot}\n      <span>{children}</span>\n    </label>\n  );\n}\n\nexport { RadioPrimitive, RadioGroupPrimitive };\n",
      "type": "registry:ui",
      "target": "components/ui/radio.tsx"
    }
  ],
  "type": "registry:ui"
}