import { EventEmitter } from '../../stencil-public-runtime'; import type { SwitchChangeDetail } from './mud-switch.types'; /** * Switch — binary on/off toggle atom (form-associated). * * Pattern B (atom-interactive, form-associated): renders its own * `` inside shadow DOM and paints the * visual track + thumb with CSS. Implements the WAI-ARIA switch pattern, not * the checkbox pattern — `role="switch"` with `aria-checked="true|false"`. * Space toggles per native checkbox semantics; the role swap does not break * keyboard activation. * * The visible track is 48 × 28px; the hit area expands to 32px on * pointer-devices and 40px on touch-devices (via `pointer: coarse`) per the * Figma "Target Sizes" spec, achieved with a `::before` pseudo-element so the * visual footprint stays untouched. * * @element mud-switch * * @slot label - Rich label content, replaces the `label` prop when present. */ export declare class MudSwitch { /** * Whether the switch is currently on. * @default false */ checked: boolean; /** * Disables interactivity. The internal control receives `aria-disabled` * and the native `disabled` attribute. * @default false */ disabled: boolean; /** * Marks the field as mandatory. Sets `aria-required` on the internal control. * @default false */ required: boolean; /** Form-control `name`. Used during form submission. */ name?: string; /** * Value submitted with the form when this switch is on. * @default 'on' */ value?: string; /** * Accessible-name fallback. Used as `aria-label` on the internal input when * no `label` slot is provided. Does NOT render visible text — use the * `label` slot for that. Matches the mud-button / mud-checkbox / mud-radio * convention. */ label?: string; /** * Consumer-set `aria-label` on the host. The component caches the value * (see `resolvedAriaLabel`) and strips the host attribute on mount to * avoid the `aria-prohibited-attr` axe rule on the custom-element host. */ ariaLabel?: string; /** Consumer-set `aria-labelledby`. Same strip + cache pattern as `ariaLabel`. */ ariaLabelledby?: string; private hasLabelSlot; private isFocused; private fieldsetDisabled; private resolvedAriaLabel?; private resolvedAriaLabelledby?; private slottedLabelText; host: HTMLMudSwitchElement; internals: ElementInternals; /** Fires whenever the checked state changes. `detail.checked` is the new state. */ mudChange: EventEmitter; /** Fires when the internal control gains focus. The native `FocusEvent` is forwarded as-is. */ mudFocus: EventEmitter; /** Fires when the internal control loses focus. The native `FocusEvent` is forwarded as-is. */ mudBlur: EventEmitter; private readonly instanceId; private readonly inputId; private readonly labelId; private initialChecked; handleCheckedChange(): void; handleValueChange(): void; syncAriaLabel(next?: string): void; syncAriaLabelledby(next?: string): void; componentWillLoad(): void; /** Mirrors `disabled` from an ancestor `
` without clobbering the consumer-set prop. */ formDisabledCallback(disabled: boolean): void; formResetCallback(): void; formStateRestoreCallback(state: string | File | FormData | null): void; private syncFormValue; private onLabelSlotChange; private handleChange; private handleFocus; private handleBlur; private isInert; render(): any; }