import type { CSSResultGroup } from 'lit'; import DSAIconButton from '../icon-button/icon-button'; import { ShoelaceElement } from '../../internal/shoelace-element'; /** * @summary Tab groups organize content into a container that shows one section at a time. * @documentation https://dsa.service-public-autonomie.fr/latest/librairie-webcomponents/onglets-tabs/groupe-d-onglets-tab-group/web-bfvDOOsP * * @dependency dsa-icon-button * * @slot - Used for grouping tab panels in the tab group. Must be `` elements. * @slot nav - Used for grouping tabs in the tab group. Must be `` elements. * * @event {{ name: String }} dsa-tab-show - Emitted when a tab is shown. * @event {{ name: String }} dsa-tab-hide - Emitted when a tab is hidden. * * @cssproperty [--tab-group-max-width] - Custom value for the tab-group content maximum width * @cssproperty [--tab-group-padding-inline] - Custom value for the tab-group inline padding */ export default class DSATabGroup extends ShoelaceElement { static styles: CSSResultGroup; static dependencies: { 'dsa-icon-button': typeof DSAIconButton; }; private readonly localize; private activeTab?; private mutationObserver; private resizeObserver; private tabs; private panels; tabGroup: HTMLElement; body: HTMLSlotElement; nav: HTMLElement; indicator: HTMLElement; navSlot: HTMLSlotElement; private hasScrollControls; private isStartScrollButtonDisabled; private isEndScrollButtonDisabled; /** * The placement of the tabs. * 2023-05-09: `top` placement is the only supported option. */ private placement; /** * When set to auto, navigating tabs with the arrow keys will instantly show the corresponding tab panel. When set to * manual, the tab will receive focus but will not show until the user presses spacebar or enter. */ activation: 'auto' | 'manual'; /** Whether the tab group is below the page header */ belowPageHeader: boolean; /** Accessible name for the role tablist element */ accessibleName: string; connectedCallback(): void; disconnectedCallback(): void; private awaitAllElementsDefined; private getAllTabs; private getAllPanels; private getActiveTab; private handleClick; private handleKeyDown; private handleScrollToStart; private handleScrollToEnd; private handleNavScroll; private setActiveTab; private setAriaLabels; private repositionIndicator; private syncTabsAndPanels; private handleSlotChange; private updateScrollControls; private updateScrollButtonsStates; syncIndicator(): void; /** Shows the specified tab panel. */ show(panel: string): void; render(): import("lit").TemplateResult<1>; } declare global { interface HTMLElementTagNameMap { 'dsa-tab-group': DSATabGroup; } }