import React from 'react'; import type { ChangeEvent } from 'react'; interface RadioButtonProps { /** * Unique ID for the input element */ id: string; /** * Name of the input element */ name?: string; /** * Default value of input element * * @default undefined */ value?: string | number; /** * Text of the label shown next to radio button */ label?: string; /** * On radio button change callback */ onChange?: (e: ChangeEvent) => void; /** * Allows to set the radio button as checked * * @default false */ checked?: boolean; /** * Allows to disable the radio button * * @default false */ disabled?: boolean; /** * Allows to pass a custom className */ className?: string; /** * Allows to pass testid string for testing purposes */ 'data-testid'?: string; } type RadioGroupOption = Omit; type GroupVariant = 'fieldset' | 'radiogroup'; interface RadioButtonGroupProps extends Omit { /** * Unique ID for the radio button group */ id?: string; /** * List of radio options to render * Each option will render a `RadioButtonComponent` */ options?: RadioGroupOption[]; /** * Custom children nodes to render instead of `options` */ children?: React.ReactNode; /** * Label for the group * Will be rendered inside a `` or a `
`, depending on `groupVariant` */ label?: string | React.ReactNode; /** * Helper text shown below the group label */ description?: string; /** * The shared name for all radio inputs in the group */ groupName: string; /** * Defines the group structure and accessibility context * Must be either `'fieldset'` (for use inside forms) or `'radiogroup'` (generic grouping) */ groupVariant: GroupVariant; /** * Allows to pass a custom className to the group container */ className?: string; /** * Allows to pass a `data-testid` string for testing purposes */ 'data-testid'?: string; } declare const RadioButton: (({ "data-testid": dataTestId, ...props }: RadioButtonProps) => React.JSX.Element) & { Group: ({ label, description, groupName, value, onChange, id, options, children, groupVariant, className, "data-testid": dataTestId, }: RadioButtonGroupProps) => React.JSX.Element; }; /** @component */ export default RadioButton;