import { CSSProperties, ReactNode } from 'react'; /** * Allowed font size values: theme tokens or custom CSS font-size values */ export type FontSizeValue = 'xs' | 'sm' | 'base' | 'md' | 'lg' | 'xl' | CSSProperties['fontSize']; /** * Props for a single Radio component */ export interface RadioProps { /** * The value of the radio option */ value: string | number | boolean; /** * Label for the radio button */ label?: ReactNode; /** * Custom accent color for the radio button when checked. * Overrides the default theme.colors.highlight. */ color?: string; /** * Position of the label relative to the radio * @default 'right' */ labelPosition?: 'left' | 'right'; /** * Whether the radio is checked (controlled mode) */ checked?: boolean; /** * Whether the radio is disabled */ disabled?: boolean; /** * Whether the radio is in error state */ error?: boolean; /** * Name attribute for the radio input */ name?: string; /** * ID attribute for the radio */ id?: string; /** * Accessible label (required if no visible label) */ 'aria-label'?: string; /** * Callback when radio is clicked */ onChange?: (event: React.MouseEvent | React.KeyboardEvent, checked: boolean) => void; /** * Tab index for keyboard navigation */ tabIndex?: number; /** * Error message to display */ errorMessage?: ReactNode; /** * Assistive/help message to display */ assistiveMessage?: ReactNode; /** * Custom className */ className?: string; /** * Test ID for testing purposes */ 'data-testid'?: string; /** * Custom font size for the label text. * Can be a theme token ('xs', 'sm', 'base', 'md', 'lg', 'xl') or a custom CSS value. */ labelFontSize?: FontSizeValue; } /** * Option configuration for RadioGroup */ export interface RadioGroupOption { /** * Unique identifier for the option */ id: string; /** * Value of the option */ value: string | number | boolean; /** * Label to display for the option */ label: ReactNode; /** * Whether this option is disabled */ disabled?: boolean; /** * Whether this option is in error state */ error?: boolean; } /** * Layout orientation for RadioGroup */ export type RadioGroupOrientation = 'horizontal' | 'vertical'; /** * Props for the RadioGroup component */ export interface RadioGroupProps { /** * Name attribute for the radio group */ name?: string; /** * Currently selected value (controlled mode) */ value?: string | number | boolean; /** * Default selected value (uncontrolled mode) */ defaultValue?: string | number | boolean; /** * Callback when selection changes */ onChange?: (value: string | number | boolean, event?: React.MouseEvent | React.KeyboardEvent) => void; /** * Array of radio options to render */ options: RadioGroupOption[]; /** * Whether the entire group is disabled */ disabled?: boolean; /** * Whether the group is in error state */ error?: boolean; /** * Layout orientation * @default 'vertical' */ orientation?: RadioGroupOrientation; /** * Legend/title for the radio group */ legend?: ReactNode; /** * Accessible label (required if no legend) */ 'aria-label'?: string; /** * Whether the field is required */ required?: boolean; /** * Error message to display */ errorMessage?: ReactNode; /** * Assistive/help message to display */ assistiveMessage?: ReactNode; /** * Custom className */ className?: string; /** * Test ID for testing purposes */ 'data-testid'?: string; /** * Custom font size for the group legend/label. * Can be a theme token ('xs', 'sm', 'base', 'md', 'lg', 'xl') or a custom CSS value. */ labelFontSize?: FontSizeValue; /** * Custom font size for individual radio option labels. * Can be a theme token ('xs', 'sm', 'base', 'md', 'lg', 'xl') or a custom CSS value. */ optionsFontSize?: FontSizeValue; } //# sourceMappingURL=Radio.types.d.ts.map