import type { ReactNode, RefAttributes } from "react"; import type { DOMProps } from "../../types/dom"; import type { HTMLElementEvent } from "../../types/events"; import "./Radio.css"; export type RadioElementType = HTMLInputElement; export type RadioOverflowInfo = { vertical: boolean; horizontal: boolean; }; export type AriaRadioProps = { /** * Defines a string value that labels the current element. */ "aria-label"?: string; /** * Identifies the element (or elements) that labels the current element. */ "aria-labelledby"?: string; /** * Identifies the element (or elements) that describes the object. */ "aria-describedby"?: string; /** * Identifies the element (or elements) that provide a detailed, extended description for the object. */ "aria-details"?: string; }; export interface RadioProps extends DOMProps, AriaRadioProps, RefAttributes { children?: ReactNode; className?: string; label?: ReactNode; errorMessage?: string; value: string; isDisabled?: boolean; onChange?: (event: HTMLElementEvent) => void; defaultChecked?: boolean; /** * Callback fired when label overflow state changes. * Only invoked when the Radio is in horizontal orientation to prevent infinite loops with autoStack. * Provides information about vertical and horizontal overflow. */ onOverflow?: (overflow: RadioOverflowInfo) => void; groupDisabled?: boolean; name?: string; selected?: string; setSelected?: React.Dispatch>; isRequired?: boolean; /** * **Internal:** Passed via cloneElement from RadioGroup. * @internal */ orientation?: "horizontal" | "vertical"; } declare function Radio({ ref, ...props }: RadioProps): import("react/jsx-runtime").JSX.Element; declare namespace Radio { var displayName: string; } export { Radio };