UNPKG

@sandlada/mdc

Version:

@sandlada/mdc is an open source component library that follows the Material Design 3 design specifications.

41 lines 1.77 kB
/** * @license * Copyright 2026 Kai-Orion & Sandlada * SPDX-License-Identifier: MIT * * @fileoverview * Internal base class for `mdc-list` — the container that owns roving tabindex * and keyboard navigation across its `mdc-list-item` children. * * Items are self-managing views: each item renders its own native root and * reports activation through the composed `request-activation` event. The list * keeps exactly one interactive item in the tab order (roving tabindex), * navigates with Arrow keys / Home / End, and exposes * `activateNextItem()` / `activatePreviousItem()` for external callers. */ import { LitElement, type TemplateResult } from 'lit'; import { type IList, type IListItem } from '../list.interface'; declare const BaseList_base: Omit<typeof LitElement, "prototype"> & (new () => LitElement & object); export declare abstract class BaseList extends BaseList_base implements IList { static styles: import("lit").CSSResult; private readonly assignedItems; private cachedItems; get items(): IListItem[]; constructor(); protected render(): TemplateResult; private readonly handleSlotChange; private readonly handleFocusIn; private readonly handleRequestActivation; private readonly handleKeydown; /** Focuses the next focusable item (wrap-around). */ activateNextItem(): void; /** Focuses the previous focusable item (wrap-around). */ activatePreviousItem(): void; /** Walk from the focused item (or an edge when none is focused) by `delta`. */ private activateRelativeItem; /** Walk from `startIndex` in `step` direction (wrapping) for a focusable item. */ private findNextFocusableItem; private updateTabIndices; } export {}; //# sourceMappingURL=base-list.d.ts.map