import { LuxenElement } from '../../shared/luxen-element.js'; export type TabsVariant = 'enclosed' | 'line'; export type TabsOrientation = 'horizontal' | 'vertical'; /** Fired when the active tab changes. Bubbles; not composed. */ export declare class TabsChangeEvent extends Event { readonly index: number; readonly name: string | null; constructor(index: number, name: string | null); } interface TabsEventMap { change: TabsChangeEvent; } /** * @summary A tabs component that progressively enhances light DOM markup * with ARIA roles, keyboard navigation, and animated indicators. * * @example * Mark the initially-active tab with `aria-selected="true"` so it is styled as * selected before the script upgrades the element (progressive enhancement). * ```html * *
* * *
*
Content 1
*
Content 2
*
* ``` * * @example * A tab button marked `disabled` (or `aria-disabled="true"`) is skipped by * arrow keys, `Home` and `End`, and cannot be selected by a click or by * `value` — it still owns its panel, so the tab/panel order is unchanged. * ```html * * ``` * * @event change - Fired when the active tab changes. Bubbles. Not cancelable. Properties: `index: number`, `name: string | null`. * * @cssproperty [--indicator-color=var(--l-color-text-primary)] - `line` variant: color of the active underline that slides under the selected tab. * @cssproperty [--indicator-thickness=2px] - `line` variant: thickness of the active underline. * @cssproperty [--track-color=var(--l-color-border)] - `line` variant: color of the static bottom border the tabs sit on. * @cssproperty [--track-thickness=1px] - `line` variant: thickness of the static bottom border. * @cssproperty [--hover-color=var(--l-color-bg-state-hover)] - `line` variant: fill of the pill that appears behind a hovered tab label. * @cssproperty [--hover-inset=4px] - `line` variant: block-axis gap between the hover pill and the tab edges, keeping it detached from the bottom border. * * @customElement l-tabs */ export declare class Tabs extends LuxenElement { createRenderRoot(): this; private _initialized; private _setupTimer; private _instanceId; private _tablistEl; private _tabs; private _panels; private _resizeObserver; /** Visual variant. */ variant: TabsVariant; /** Index of the active tab (0-based). */ value: string; /** Stretch tabs to fill container width. */ fullWidth: boolean; /** Tab orientation. */ orientation: TabsOrientation; connectedCallback(): void; disconnectedCallback(): void; /** @returns true when setup ran or was already done; false to schedule a retry. */ private _trySetup; updated(changed: Map): void; private _setup; private _teardown; private _selectTab; /** * Both spellings count, and they behave identically here. `aria-disabled` * leaves the button focusable in principle, but a roving tabindex hands * `tabindex="0"` to the selected tab only — so a tab that can never be * selected is never in the tab sequence either, and the arrow keys skip it * like a native one. It is the escape hatch for consumers who cannot set the * native attribute (a framework binding, a non-`button` element), not a * "reachable but inert" variant. */ private _isDisabled; private _isSelectable; /** Index of the currently selected tab, read back from the DOM. */ private _activeIndex; /** Resolve the initial selection from `value`, falling back to the first enabled tab. */ private _resolveActiveIndex; /** Index of the next enabled tab from `from`, moving by `dir`, wrapping. */ private _nextEnabled; /** Index of the first (`dir` 1) or last (`dir` -1) enabled tab. */ private _edgeEnabled; private _updateIndicator; private _onClick; private _onKeyDown; } export interface Tabs { addEventListener(type: K, listener: (this: Tabs, ev: TabsEventMap[K]) => void, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: Tabs, ev: TabsEventMap[K]) => void, options?: boolean | EventListenerOptions): void; removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; } export {}; //# sourceMappingURL=tabs.d.ts.map