import { CSSProperties, ReactNode } from 'react'; import { FormValidator } from '../../services/formValidation/index.js'; import { SlotClassNames, SlotStyles, HtmlProps } from '../types/slots.types.js'; export type RadioValue = string | number; export declare enum RadioGroupOrientation { Vertical = "vertical", Horizontal = "horizontal" } export interface RadioOption { value: RadioValue; /** Visible label; falls back to `value` when omitted. */ label?: ReactNode; /** Secondary description shown under the label. */ description?: ReactNode; /** Disable just this option. */ disabled?: boolean; } export type RadioGroupSlots = 'root' | 'groupLabel' | 'options' | 'option' | 'radio' | 'dot' | 'label' | 'description'; export interface RadioGroupProps extends Omit { /** The selectable options. */ options: RadioOption[]; /** Visible label above the options. Names the group for screen readers, and the field in its validator's messages. */ label?: string; /** Controlled selected value. Omit for uncontrolled. */ value?: RadioValue; /** Initial value when uncontrolled. */ defaultValue?: RadioValue; /** Fires with the newly selected value. */ onChange?: (value: RadioValue, event?: React.MouseEvent | React.KeyboardEvent) => void; /** Layout direction (default `Vertical`). */ orientation?: RadioGroupOrientation; /** Disable the whole group. */ disabled?: boolean; /** Diameter of the radio circle. Defaults to `1.125em` of `--default-font-size`, 18px at a 16px base. */ size?: string; /** Tab index of the active (roving) option. */ tabIndex?: number; formValidator?: FormValidator | null; /** Manual error message shown in a tooltip (used when there's no `formValidator`, or to force one). */ errorMessage?: string; /** Manual valid state when not using a `formValidator` (default `true`). */ isValid?: boolean; className?: string; style?: CSSProperties; classNames?: SlotClassNames; styles?: SlotStyles; }