UNPKG

@sandlada/mdc

Version:

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

40 lines 1.5 kB
/** * @license * Copyright 2026 Kai-Orion & Sandlada * SPDX-License-Identifier: MIT * * @fileoverview * Shared container logic for navigation components. The container propagates * `navigation-scope` to slotted tabs and exposes imperative scope-level APIs. * * @example * ```ts * @customElement('mdc-navigation-bar') * export class NavigationBar extends BaseNavigationContainer {} * * const bar = document.querySelector('mdc-navigation-bar') * bar?.setActive('/home') * ``` */ import { LitElement, type PropertyValues, type TemplateResult } from 'lit'; import { type NavigationEventTrigger } from '../../../utils/navigation/navigation-state-store'; export declare abstract class BaseNavigationContainer extends LitElement { navigationScope: string; private readonly slotElement; /** Current active navigation value in this container scope. */ get activeValue(): string | null; /** * Imperatively activates a value in this container scope. * Tabs in other containers with the same scope and value will sync. */ setActive(value: string, trigger?: NavigationEventTrigger): void; protected firstUpdated(): void; protected updated(changedProperties: PropertyValues<this>): void; protected render(): TemplateResult; protected renderSlot(): TemplateResult<1>; private readonly handleSlotChange; private syncTabsScope; private get tabs(); private normalizeScope; } //# sourceMappingURL=base-navigation-container.d.ts.map