{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "tailwind-radiogroup",
  "type": "registry:ui",
  "title": "RadioGroup",
  "dependencies": [
    "react",
    "react-aria-components",
    "tailwind-variants",
    "tailwindcss-react-aria-components",
    "tw-animate-css"
  ],
  "registryDependencies": [
    "https://react-aria.adobe.com/registry/tailwind-field.json",
    "https://react-aria.adobe.com/registry/tailwind-utils.json"
  ],
  "files": [
    {
      "path": "components/ui/RadioGroup.tsx",
      "type": "registry:ui",
      "content": "'use client';\nimport React, {type ReactNode} from 'react';\nimport {composeRenderProps} from 'react-aria-components/composeRenderProps';\nimport {\n  RadioField,\n  RadioButton,\n  RadioGroup as RACRadioGroup,\n  type RadioGroupProps as RACRadioGroupProps,\n  type RadioFieldProps,\n  type ValidationResult\n} from 'react-aria-components/RadioGroup';\nimport {tv} from 'tailwind-variants';\nimport {Description, FieldError, Label} from '@/registry/react-aria/ui/Field';\nimport {composeTailwindRenderProps, focusRing} from '@/registry/react-aria/lib/react-aria-utils';\n\nexport interface RadioGroupProps extends Omit<RACRadioGroupProps, 'children'> {\n  label?: string;\n  children?: ReactNode;\n  description?: string;\n  errorMessage?: string | ((validation: ValidationResult) => string);\n}\n\nexport function RadioGroup(props: RadioGroupProps) {\n  return (\n    <RACRadioGroup\n      {...props}\n      className={composeTailwindRenderProps(\n        props.className,\n        'group flex flex-col gap-2 font-sans'\n      )}>\n      <Label>{props.label}</Label>\n      <div className=\"flex group-orientation-vertical:flex-col gap-2 group-orientation-horizontal:gap-4\">\n        {props.children}\n      </div>\n      {props.description && <Description>{props.description}</Description>}\n      <FieldError>{props.errorMessage}</FieldError>\n    </RACRadioGroup>\n  );\n}\n\nconst styles = tv({\n  extend: focusRing,\n  base: 'w-4.5 h-4.5 flex-shrink-0 box-border rounded-full border bg-white dark:bg-neutral-900 transition-all',\n  variants: {\n    isSelected: {\n      false:\n        'border-neutral-400 dark:border-neutral-400 group-pressed:border-neutral-500 dark:group-pressed:border-neutral-300',\n      true: 'border-[calc(var(--spacing)*1.5)] border-neutral-700 dark:border-neutral-300 forced-colors:border-[Highlight]! group-pressed:border-neutral-800 dark:group-pressed:border-neutral-200'\n    },\n    isInvalid: {\n      true: 'border-red-700 dark:border-red-600 group-pressed:border-red-800 dark:group-pressed:border-red-700 forced-colors:border-[Mark]!'\n    },\n    isDisabled: {\n      true: 'border-neutral-200 dark:border-neutral-700 forced-colors:border-[GrayText]!'\n    }\n  }\n});\n\nexport interface RadioProps extends RadioFieldProps {\n  description?: string;\n}\n\nexport function Radio(props: RadioProps) {\n  return (\n    <RadioField {...props} className=\"flex flex-col gap-1 group\">\n      <RadioButton\n        className={composeTailwindRenderProps(\n          props.className,\n          'flex relative gap-2 items-center group text-neutral-800 disabled:text-neutral-300 dark:text-neutral-200 dark:disabled:text-neutral-600 forced-colors:disabled:text-[GrayText] text-sm transition [-webkit-tap-highlight-color:transparent]'\n        )}>\n        {composeRenderProps(props.children, (children, renderProps) => (\n          <>\n            <div className={styles(renderProps)} />\n            {children}\n          </>\n        ))}\n      </RadioButton>\n      {props.description && <Description className=\"ms-6.5\">{props.description}</Description>}\n    </RadioField>\n  );\n}\n"
    }
  ],
  "css": {
    "@plugin \"tailwindcss-react-aria-components\"": {},
    "@import \"tw-animate-css\"": {}
  }
}
