import { ReactNode, CSSProperties } from 'react'; /** * Font size value - can be a theme token key or a CSS value */ export type FontSizeValue = 'xs' | 'sm' | 'base' | 'md' | 'lg' | 'xl' | CSSProperties['fontSize']; /** * Props for a single Checkbox component */ export interface CheckboxProps { /** * Label for the checkbox */ label?: ReactNode; /** * Position of the label relative to the checkbox * @default 'right' */ labelPosition?: 'left' | 'right'; /** * Whether the checkbox is checked (controlled mode) */ checked?: boolean; /** * Whether the checkbox is disabled */ disabled?: boolean; /** * Custom accent color for the checkbox when checked. * Overrides the default theme.colors.highlight. */ color?: string; /** * Whether the checkbox is in error state */ error?: boolean; /** * Whether the checkbox is in indeterminate state (partially checked) */ indeterminate?: boolean; /** * Name attribute for the checkbox input */ name?: string; /** * ID attribute for the checkbox */ id?: string; /** * Accessible label (required if no visible label) */ 'aria-label'?: string; /** * Callback when checkbox 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; /** * Font size for the label text * Can be a theme token key ('xs', 'sm', 'base', 'md', 'lg', 'xl') or CSS value */ labelFontSize?: FontSizeValue; } /** * Option configuration for CheckboxGroup */ export interface CheckboxGroupOption { /** * Unique identifier for the option */ id: string; /** * Label to display for the option */ label: ReactNode; /** * Whether this option is disabled */ disabled?: boolean; /** * Whether this option is in error state */ error?: boolean; /** * Nested child options (for hierarchical checkboxes) */ children?: CheckboxGroupOption[]; } /** * Layout orientation for CheckboxGroup */ export type CheckboxGroupOrientation = 'horizontal' | 'vertical'; /** * State map for tracking checked status of each checkbox */ export type CheckedStateMap = Record; /** * Props for the CheckboxGroup component */ export interface CheckboxGroupProps { /** * Name attribute for the checkbox group */ name?: string; /** * Currently checked values (controlled mode) * Object mapping option IDs to their checked state */ value?: CheckedStateMap; /** * Default checked values (uncontrolled mode) */ defaultValue?: CheckedStateMap; /** * Callback when selection changes */ onChange?: (checkedState: CheckedStateMap) => void; /** * Array of checkbox options to render */ options: CheckboxGroupOption[]; /** * Whether the entire group is disabled */ disabled?: boolean; /** * Whether the group is in error state */ error?: boolean; /** * Layout orientation * @default 'vertical' */ orientation?: CheckboxGroupOrientation; /** * Legend/title for the checkbox 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; /** * Font size for the legend/title * Can be a theme token key ('xs', 'sm', 'base', 'md', 'lg', 'xl') or CSS value */ labelFontSize?: FontSizeValue; /** * Font size for the option labels * Can be a theme token key ('xs', 'sm', 'base', 'md', 'lg', 'xl') or CSS value */ optionsFontSize?: FontSizeValue; } //# sourceMappingURL=Checkbox.types.d.ts.map