import { EventEmitter } from '../../stencil-public-runtime'; import type { TabDescriptor, TabsChangeDetail, TabsSize } from './mud-tabs.types'; /** * `mud-tabs` — horizontal tablist that switches the currently visible panel. * * Two composition modes: * 1. **Declarative** (recommended for static menus): slot `` children * into the default slot and matching `
` blocks * into the panel slots. * 2. **Data-driven**: pass a `tabs` array. The component renders each entry * as a child `mud-tab` and exposes panels via `
` * elements supplied by the consumer. * * Pattern A (molecule, slot-based). The host carries `role="tablist"`; the * tabs are rendered children with `role="tab"`; the panels are slotted into * named `panel-{value}` slots and receive `role="tabpanel"` + the matching * `aria-labelledby`. * * Keyboard contract (WAI-ARIA Authoring Practices, automatic activation): * - `Tab` focuses the currently selected tab (single tab stop into the group) * - `ArrowLeft` / `ArrowRight` move selection between enabled tabs (wraps) * - `Home` / `End` jump to the first / last enabled tab * - `Enter` / `Space` activate the focused tab (no-op for selected/disabled) * * Overflow: when the rendered tabs are wider than the host, the component * exposes leading + trailing chevron buttons that scroll the strip. Both * chevrons are mouse-only; their `aria-hidden="true"` keeps them out of the * keyboard order (arrow keys already move selection without overflow help). * * @element mud-tabs * * @slot - Default slot for `` children. * @slot panel-{value} - Tab-panel content keyed by the `value` of the * matching tab. Exactly one panel is visible at a time. */ export declare class MudTabs { /** * Size rung. `md` is 48 px tall; `sm` is 40 px tall (mobile + dense layouts). * @default 'md' */ size: TabsSize; /** * Value of the currently selected tab. Mutable so that uncontrolled usage * (click + keyboard) keeps the host attribute in sync. */ value?: string; /** * Data-driven tab list. When supplied, the component renders one * `` per entry. Mutually compatible with slotted children — the * slotted variant takes precedence when both are present. */ tabs?: TabDescriptor[]; /** * Accessible name for the tablist. Captured into `resolvedAriaLabel` on * mount and the host attribute is stripped to avoid Stencil's * auto-reflection loop. */ ariaLabel?: string; /** Id of an external labelling element (overrides `aria-label`). */ ariaLabelledby?: string; private hasOverflow; private canScrollStart; private canScrollEnd; private resolvedAriaLabel?; private resolvedAriaLabelledby?; /** * Panel slot names projected through the shadow DOM. Tracked separately * from `tabs` so that declarative `` children also project their * matching panels without consumers needing to opt-in. */ private projectedPanelSlots; host: HTMLMudTabsElement; /** Fires when the selected tab changes. `detail.value` is the new selection. */ mudChange: EventEmitter; private readonly instanceId; private readonly groupId; private scrollerEl?; private resizeObserver?; private mutationObserver?; private scrollRafId?; componentWillLoad(): void; componentDidLoad(): void; /** * Stencil auto-reflects `@Prop()` values back onto the host attribute. For * `aria-label` / `aria-labelledby` that creates an observer loop. Capture * each consumer-provided value into a state field, then strip the * attribute so the loop never fires. */ private captureAriaAttrs; handleAriaLabelChange(next: string | undefined): void; handleAriaLabelledbyChange(next: string | undefined): void; componentDidRender(): void; disconnectedCallback(): void; validateSize(next: TabsSize): void; handleValueChange(): void; handleTabsChange(): void; handleTabActivate(ev: CustomEvent<{ value: string; }>): void; handleKeyDown(ev: KeyboardEvent): void; private getTabs; private getEnabledTabs; private getFocusedTab; private activateTab; private syncSelectionToTabs; private syncPanels; private observeChildren; private observeOverflow; private measureOverflow; private handleScroll; private updateScrollAffordances; private scrollByDirection; private setScrollerRef; private renderDataTabs; render(): any; }