{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "radio",
  "type": "registry:ui",
  "title": "Radio",
  "description": "Radio is a native radio button for a single option inside a mutually exclusive group.",
  "author": "Skrewww",
  "dependencies": [],
  "registryDependencies": [
    "@skrewww/foundation"
  ],
  "docs": "Host requirements (assumed already present, not installed by this command): react, react-dom.",
  "files": [
    {
      "path": "components/ui/Radio.tsx",
      "content": "/** @skrewww-component radio */\n\"use client\";\n\nimport { forwardRef, type InputHTMLAttributes } from \"react\";\nimport { cn } from \"@/lib/cn\";\nimport styles from \"@/components/ui/radio.module.css\";\n\nexport type RadioProps = Omit<InputHTMLAttributes<HTMLInputElement>, \"type\"> & {\n  label: string;\n};\n\nexport const Radio = forwardRef<HTMLInputElement, RadioProps>(function Radio(\n  { label, disabled, className, ...props },\n  ref,\n) {\n  return (\n    <label className={cn(styles.control, disabled && styles.controlDisabled, className)}>\n      <input ref={ref} type=\"radio\" className={styles.input} disabled={disabled} {...props} />\n      <span className={styles.labelText}>{label}</span>\n    </label>\n  );\n});\n",
      "type": "registry:ui",
      "target": "~/components/ui/Radio.tsx"
    },
    {
      "path": "components/ui/radio.module.css",
      "content": ".control {\n  display: inline-flex;\n  align-items: flex-start;\n  gap: 0.625rem;\n  cursor: pointer;\n  color: var(--semantic-text-primary);\n}\n\n.controlDisabled {\n  cursor: not-allowed;\n}\n\n.input {\n  /* Explicit, not assumed: the docs shell gets border-box from Tailwind's\n     Preflight, but Radio must not depend on that ambient reset — under\n     content-box the 1.5px boundary below would push the control to 19x19\n     instead of the canonical 16x16, and the selected 5px ring to 26x26.\n     Same reasoning as Button. */\n  box-sizing: border-box;\n  position: relative;\n  flex-shrink: 0;\n  width: var(--control-radio-size);\n  height: var(--control-radio-size);\n  margin: 0;\n  margin-top: 0.125rem;\n  appearance: none;\n  /* Radio stays circular regardless of global shape personality */\n  border-radius: 50%;\n  border: 1.5px solid var(--semantic-border-default);\n  background: var(--surface-fill-control);\n  backdrop-filter: var(--glass-backdrop-filter-sm, none);\n  transition:\n    border-color 0.15s ease,\n    box-shadow 0.15s ease;\n}\n\n/* Scoped away from :checked on purpose. This rule's specificity (0,3,0)\n   otherwise beats the .input:checked rule below (0,2,0), so hovering a\n   selected Radio recoloured its whole 5px action-primary dot ring grey. */\n.input:hover:not(:disabled):not(:checked) {\n  border-color: var(--semantic-border-strong);\n}\n\n.input:focus {\n  outline: none;\n}\n\n.input:focus-visible {\n  outline: 2px solid var(--semantic-focus-ring);\n  outline-offset: 2px;\n}\n\n.input:checked {\n  border-color: var(--semantic-action-primary);\n  border-width: 5px;\n}\n\n.input:disabled {\n  cursor: not-allowed;\n  pointer-events: none;\n  border-color: var(--semantic-border-disabled);\n  background: var(--semantic-surface-disabled);\n  opacity: var(--opacity-disabled);\n}\n\n.input[aria-invalid=\"true\"] {\n  border-color: var(--semantic-action-danger);\n}\n\n.input[aria-invalid=\"true\"]:checked {\n  border-color: var(--semantic-action-danger);\n}\n\n.labelText {\n  font-size: 0.875rem;\n  line-height: 1.4;\n}\n\n@media (prefers-reduced-motion: reduce) {\n  .input {\n    transition: none;\n  }\n}\n\n.group {\n  border: 0;\n  margin: 0;\n  padding: 0;\n  min-width: 0;\n}\n\n.legend {\n  font-size: 0.875rem;\n  font-weight: 500;\n  line-height: 1.4;\n  color: var(--semantic-text-primary);\n  margin-bottom: 0.5rem;\n  padding: 0;\n}\n\n.required {\n  margin-left: 0.125rem;\n  color: var(--semantic-text-danger);\n}\n\n.options {\n  display: flex;\n  flex-direction: column;\n  gap: 0.625rem;\n}\n\n.supporting {\n  margin-top: 0.375rem;\n  font-size: 0.8125rem;\n  line-height: 1.4;\n  color: var(--semantic-text-secondary);\n}\n",
      "type": "registry:ui",
      "target": "~/components/ui/radio.module.css"
    },
    {
      "path": "lib/cn.ts",
      "content": "export function cn(...classes: Array<string | false | null | undefined>): string {\n  return classes.filter(Boolean).join(\" \");\n}\n",
      "type": "registry:lib",
      "target": "~/lib/cn.ts"
    }
  ]
}
