import { CheckboxOptions, RadioGroupOptions, SwitchOptions } from './choice.types'; /** * Headless checkbox controller. Wires the `checkbox` ARIA role, tri-state * `aria-checked`, keyboard toggling and `data-state` to an existing element; * it never applies visual styles. * * Markup: * ```html * * ``` */ export declare class Checkbox { private readonly root; private isChecked; private isIndeterminate; private isDisabled; private cleanups; constructor(root: HTMLElement, options?: CheckboxOptions); private init; private render; private emit; /** Toggle the checked state. Clears indeterminate to checked. No-op if disabled. */ toggle(): void; /** Set the checked state explicitly. Clears indeterminate. No-op if disabled. */ setChecked(checked: boolean): void; /** Set the indeterminate ("mixed") state. No-op if disabled. */ setIndeterminate(indeterminate: boolean): void; get checked(): boolean; /** Subscribe to a DOM event on the root element. Returns an unsubscribe fn. */ on(event: string, handler: (event: E) => void): () => void; destroy(): void; } /** * Headless switch controller. Wires the `switch` ARIA role, `aria-checked`, * keyboard toggling and `data-state` to an existing element; it never applies * visual styles. * * Markup: * ```html * * ``` */ export declare class Switch { private readonly root; private isChecked; private isDisabled; private cleanups; constructor(root: HTMLElement, options?: SwitchOptions); private init; private render; private emit; /** Toggle the on/off state. No-op if disabled. */ toggle(): void; /** Set the on/off state explicitly. No-op if disabled or unchanged. */ setChecked(checked: boolean): void; get checked(): boolean; /** Subscribe to a DOM event on the root element. Returns an unsubscribe fn. */ on(event: string, handler: (event: E) => void): () => void; destroy(): void; } /** * Headless radio-group controller. Wires `radiogroup`/`radio` ARIA roles, * roving tabindex, arrow-key navigation and selection to existing markup; it * never applies visual styles. * * Markup: * ```html *
*
A
*
B
*
* ``` */ export declare class RadioGroup { private readonly root; private readonly isDisabled; private radios; private selected; private cleanups; constructor(root: HTMLElement, options?: RadioGroupOptions); private collect; private init; private currentIndex; private select; private onKeydown; private render; private emit; /** Select a radio by value. No-op if already selected, disabled or unknown. */ setValue(value: string): void; get value(): string | null; /** Subscribe to a DOM event on the root element. Returns an unsubscribe fn. */ on(event: string, handler: (event: E) => void): () => void; destroy(): void; }