import { ElementType, ChangeEvent, MouseEvent, PointerEvent, ComponentPropsWithoutRef } from 'react'; import { Color } from '../types.js'; export type RadioSize = 'xs' | 'sm' | 'md'; interface RadioOwnProps { /** Controlled checked state. Default `false`. */ checked?: boolean; /** Visually dim the radio and disable interaction. */ disabled?: boolean; /** Block toggling without the disabled visual treatment. */ readOnly?: boolean; /** Native `value` - submitted with the form when `checked`. */ value?: string; /** Native `name` - used to group radios in the same set. */ name?: string; /** Radio size token. Default `'sm'`. */ size?: RadioSize; /** Native `required` - forwarded to the hidden `` for form validation. */ required?: boolean; /** Fires when the user toggles the radio. First arg is the new checked state, second is the raw event. */ onChange?: (checked: boolean, event?: ChangeEvent) => void; /** Fires on click of the root element. Runs before the internal toggle handler. */ onClick?: (e: MouseEvent) => void; /** Fires on pointerdown of the root element. */ onPointerDown?: (e: PointerEvent) => void; /** * When `true` (default), renders a hidden native input for form submission and accessibility. * * When `false`, the component falls back to ARIA roles (`role="radio"`, `aria-checked`, keyboard `Space`/`Enter` toggling) and `onChange` fires from the click handler. */ input?: boolean; /** `id` for the hidden ``. Used to wire an external `