import { SvelteComponentTyped } from "svelte"; import type { SvelteHTMLElements } from "svelte/elements"; export type CarbonRadioButtonGroupContext = { selectedValue: import("svelte/store").Writable; groupName: import("svelte/store").Readable; groupForm: import("svelte/store").Readable; fallbackName: string; groupRequired: import("svelte/store").Readable; readonly: import("svelte/store").Readable; allowDeselect: import("svelte/store").Readable; helperId: import("svelte/store").Readable; add: (data: { checked: boolean; value: Value }) => void; update: (value: Value) => void; deselect: () => void; }; type $RestProps = SvelteHTMLElements["div"]; type $Props = { /** * Set the selected radio button value. * Follows the field after a reset — becomes the value of whichever radio * is checked in the DOM, or `undefined`. */ selected?: Value | undefined; /** * Set to `true` to disable the radio buttons * @default false */ disabled?: boolean; /** * Set to `true` to require the selection of a radio button. */ required?: boolean | undefined; /** * Specify a name attribute for the radio button inputs. * Overrides each button's own `name`. When neither is set, the buttons * share a generated id so they form one radio group; set a name * explicitly when form submission matters. */ name?: string | undefined; /** * Specify the id of a form element outside the component to associate * the fieldset and radio button inputs with. Overrides each button's own `form`. */ form?: string | undefined; /** * Specify the legend text. * Alternatively, use the named slot "legendChildren". * @example * ```svelte * * Custom Legend * * * * * ``` * @default "" */ legendText?: string; /** * Set to `true` to visually hide the legend * @default false */ hideLegend?: boolean; /** * Specify the helper text * @default "" */ helperText?: string; /** * Set to `true` to indicate an invalid state * @default false */ invalid?: boolean; /** * Specify the invalid state text * @default "" */ invalidText?: string; /** * Set to `true` to indicate a warning state * @default false */ warn?: boolean; /** * Specify the warning state text * @default "" */ warnText?: string; /** * Set to `true` to use the read-only variant * @default false */ readonly?: boolean; /** * Specify the assistive text announced to screen readers when read-only. * Exposed because VoiceOver does not announce `aria-readonly`. * @default "Read-only" */ readonlyText?: string; /** * Set to `true` so clicking an already-selected radio clears the selection * instead of leaving it selected. * @default false */ allowDeselect?: boolean; /** * Specify the label position. * @default "right" */ labelPosition?: "right" | "left"; /** * Specify the orientation of the radio buttons. * @default "horizontal" */ orientation?: "horizontal" | "vertical"; /** * Set an id for the container div element. */ id?: string | undefined; decorator?: (this: void) => void; legendChildren?: (this: void) => void; children?: (this: void) => void; [key: `data-${string}`]: unknown; }; export type RadioButtonGroupProps = Omit<$RestProps, keyof $Props> & $Props; export default class RadioButtonGroup extends SvelteComponentTyped< RadioButtonGroupProps, { /** Dispatched with the selected value, or `null` when the selection is cleared. */ change: CustomEvent; click: WindowEventMap["click"]; mouseenter: WindowEventMap["mouseenter"]; mouseleave: WindowEventMap["mouseleave"]; mouseover: WindowEventMap["mouseover"]; }, { default: Record; decorator: Record; legendChildren: Record; } > {}