import type { CSSResultGroup } from 'lit'; import DSAIcon from '../icon/icon'; import { ShoelaceElement } from '../../internal/shoelace-element'; /** * @summary Table of Contents provide a way to navigate through the content of a page. * @documentation https://dsa.service-public-autonomie.fr/latest/librairie-webcomponents/table-of-content-sommaire/web-I2vxxyKp * * @dependency dsa-icon * * @slot - Anchor tags pointing to different sections of the page. * @slot label - The table of contents label. Alternatively, you can use the `label` attribute. * @event dsa-show - Emitted when the table of contents opens on mobile. * @event dsa-after-show - Emitted after the table of contents opens on mobile and all animations are complete. * @event dsa-hide - Emitted when the table of contents closes on mobile. * @event dsa-after-hide - Emitted after the table of contents closes on mobile and all animations are complete. * */ export default class DSATableOfContents extends ShoelaceElement { static styles: CSSResultGroup; static dependencies: { 'dsa-icon': typeof DSAIcon; }; private readonly localize; private mutationObserver; private resizeObserver; headerButton: HTMLElement; content: HTMLElement; indicator: HTMLElement; defaultSlot: HTMLSlotElement; allLinks: Element[]; currentSectionLink: Element; progress: number; /** The table of contents label. If you need to display HTML, use the `label` slot instead. */ label: string; /** Whether the table of contents should be displayed on mobile. */ mobile: boolean; /** * Indicates whether or not the table of contents is open (on mobile). You can toggle this attribute to show and hide the table of contents, or you * can use the `show()` and `hide()` methods and this attribute will reflect the table of contents' open state. */ open: boolean; connectedCallback(): void; disconnectedCallback(): void; private addOpenListeners; private removeOpenListeners; firstUpdated(): Promise; private observeAttributeChanges; private observeIndicatorChanges; private cloneSlottedLinks; private updateCurrentSection; private repositionIndicator; private handleSlotChange; private handleHeaderKeydown; private handleDocumentKeyDown; private handleDocumentMouseDown; private handleHeaderClick; private handleLinkClick; handleOpenChange(): Promise; handleMobileChange(): void; /** Shows the content. */ show(): Promise; /** Hides the content */ hide(): Promise; render(): import("lit").TemplateResult<1>; } declare global { interface HTMLElementTagNameMap { 'dsa-table-of-contents': DSATableOfContents; } }