import type { ReactNode } from "react"; /** One option in a `ChoiceCardGroup`: a radio card with a label, optional description and leading icon. */ export interface ChoiceCardProps { /** Identifies the card; becomes the group's value when chosen. */ value: string; /** Visible title and the radio's accessible name. */ label: ReactNode; /** Muted line under the label, announced as the radio's description. */ description?: ReactNode; /** Leading icon in a 40px well, hidden from assistive tech. */ icon?: ReactNode; /** Dims the card and skips it for clicks, arrow keys and the tab stop. */ disabled?: boolean; /** Alias of `disabled` for the library's `is*` prop convention; either one disables the card. */ isDisabled?: boolean; "data-testid"?: string; } /** Radiogroup of `ChoiceCard`s: one tab stop; arrows, Home and End move focus and selection together. */ export interface ChoiceCardGroupProps { /** Selected card's `value`; passing it makes the group controlled. */ value?: string; /** Seeds an uncontrolled selection; ignored once `value` is passed. */ defaultValue?: string; /** Called with the newly chosen card's `value`, only when the selection actually changes. */ onValueChange?: (value: string) => void; /** Cards per row; `1` (default) stacks them in a column, more lays them out in an equal-width grid. */ columns?: number; /** Space between cards in theme space units (`3` = 0.75rem). */ gap?: number; /** Direct `ChoiceCard` children; a wrapper component hides their `value` from the tab stop. */ children: ReactNode; /** Name the group with this or `aria-labelledby`. */ "aria-label"?: string; /** Id of an element that names the group; use instead of `aria-label`. */ "aria-labelledby"?: string; "data-testid"?: string; }