import type { ReactElement, HTMLAttributes, Ref } from "react"; import type SlRadioGroupElement from "@shoelace-style/shoelace/dist/components/radio-group/radio-group.js"; import { SlChangeEvent, SlInputEvent, SlInvalidEvent } from "../events"; export type { SlRadioGroupElement }; export type SlRadioGroupChangeEvent = SlChangeEvent; export type SlRadioGroupInputEvent = SlInputEvent; export type SlRadioGroupInvalidEvent = SlInvalidEvent; export interface SlRadioGroupProps extends HTMLAttributes { ref?: Ref; /** * The radio group's label. Required for proper accessibility. If you need to display HTML, use the `label` slot * instead. */ label?: string; /** * The radio groups's help text. If you need to display HTML, use the `help-text` slot instead. */ helpText?: string; /** * The name of the radio group, submitted as a name/value pair with form data. */ name?: string; /** * The current value of the radio group, submitted as a name/value pair with form data. */ value?: string; /** * The radio group's size. This size will be applied to all child radios and radio buttons. */ size?: "small" | "medium" | "large"; /** * By default, form controls are associated with the nearest containing `
` element. This attribute allows you * to place the form control outside of a form and associate it with the form that has this `id`. The form must be in * the same document or shadow root for this to work. */ form?: string; /** * Ensures a child radio is checked before allowing the containing form to submit. */ required?: boolean; /** * Emitted when the radio group's selected value changes. */ onSlChange?: (event: SlRadioGroupChangeEvent) => void; /** * Emitted when the radio group's selected value changes. */ onSlChangeCapture?: (event: SlRadioGroupChangeEvent) => void; /** * Emitted when the radio group receives user input. */ onSlInput?: (event: SlRadioGroupInputEvent) => void; /** * Emitted when the radio group receives user input. */ onSlInputCapture?: (event: SlRadioGroupInputEvent) => void; /** * Emitted when the form control has been checked for validity and its constraints aren't satisfied. */ onSlInvalid?: (event: SlRadioGroupInvalidEvent) => void; /** * Emitted when the form control has been checked for validity and its constraints aren't satisfied. */ onSlInvalidCapture?: (event: SlRadioGroupInvalidEvent) => void; } /** * Radio groups are used to group multiple [radios](/components/radio) or [radio buttons](/components/radio-button) so they function as a single form control. */ export default function SlRadioGroup( props: SlRadioGroupProps, ): ReactElement;