@sandlada/mdc
Version:
@sandlada/mdc is an open source component library that follows the Material Design 3 design specifications.
59 lines • 2.62 kB
TypeScript
/**
* @license
* Copyright 2026 Kai-Orion & Sandlada
* SPDX-License-Identifier: MIT
*
* @fileoverview
* Internal base class for `mdc-on-this-page-item` — an in-page navigation link item.
*/
import { LitElement, type PropertyValues, type TemplateResult } from 'lit';
import type { IOnThisPageItem } from '../on-this-page.interface';
export declare const ON_THIS_PAGE_ITEM_REQUEST_ACTIVATE: unique symbol;
declare const BaseOnThisPageItem_base: Omit<typeof LitElement, "prototype"> & (new () => LitElement & object & import("../../../utils/behaviors/element-internals").WithElementInternals & import("../../ripple/ripple-options.mixin").IMixinRippleOptions & import("../../ripple/ripple-options.mixin").IMixinRippleAttributes & import("../../focus-ring/focus-ring-options.mixin").IMixinFocusRingOption);
export declare abstract class BaseOnThisPageItem extends BaseOnThisPageItem_base implements IOnThisPageItem {
static shadowRootOptions: {
clonable?: boolean;
customElementRegistry?: CustomElementRegistry | null;
mode: ShadowRootMode;
serializable?: boolean;
slotAssignment?: SlotAssignmentMode;
delegatesFocus: boolean;
};
/** Destination URL/anchor hash, e.g. "#variants" or "variants". */
href: string;
/** Optional anchor target or section ID without leading `#`. */
target: string;
/** Text label for the item. */
label: string;
/** Whether this item is currently active. */
active: boolean;
/** Whether this item is disabled. */
disabled: boolean;
/** Hierarchy level (1, 2, 3...) for nested headings. */
level: number;
/** Item index within parent container. */
index: number;
protected readonly itemElement: HTMLElement | null;
protected readonly labelElement: HTMLElement | null;
get rippleControl(): HTMLElement | null;
get focusRingControl(): HTMLElement | null;
constructor();
/** Resolves the clean target ID for scrolling. */
get targetId(): string;
/** Returns the DOMRect of the item container element. */
getItemBounds(): DOMRect | null;
/** Returns the DOMRect of the text label element inside the item. */
getLabelBounds(): DOMRect | null;
protected getRenderClasses(): {
[x: string]: boolean;
item: boolean;
active: boolean;
disabled: boolean;
};
protected render(): TemplateResult;
protected updated(changedProperties: PropertyValues<this>): void;
private readonly handleClick;
private readonly handleKeyDown;
}
export {};
//# sourceMappingURL=base-on-this-page-item.d.ts.map