import type { CSSResultGroup } from 'lit'; import DSAIcon from '../icon/icon'; import DSATooltip from '../tooltip/tooltip'; import { ShoelaceElement } from '../../internal/shoelace-element'; /** * @summary Menus Accordion show a brief summary and expand to show additional content in a menu. * @documentation https://dsa.service-public-autonomie.fr/latest/librairie-webcomponents/menu/menu-accordion-menu-accordeon/web-IhrYVKWY * * @dependency dsa-icon * @dependency dsa-tooltip * * @slot - The menu-accordion's content, usually a dsa-menu-navigation. * @slot prefix - The menu-accordion's prefix, usually an icon. * @slot summary - The menu-accordion's summary. Alternatively, you can use the `summary` attribute. * @slot badge - The menu-accordion's badge. * * @event dsa-show - Emitted when the menu-accordion opens. * @event dsa-after-show - Emitted after the menu-accordion opens and all animations are complete. * @event dsa-hide - Emitted when the menu-accordion closes. * @event dsa-after-hide - Emitted after the menu-accordion closes and all animations are complete. * */ export default class DSAMenuAccordion extends ShoelaceElement { static styles: CSSResultGroup; static dependencies: { 'dsa-icon': typeof DSAIcon; 'dsa-tooltip': typeof DSATooltip; }; private readonly localize; private readonly hasSlotController; private cachedSummaryText; private cachedSummaryWithBadgeText; private cachedMenuNavigation; defaultSlot: HTMLSlotElement; summarySlot: HTMLSlotElement; badgeSlot: HTMLSlotElement; accordion: HTMLElement; headerButton: HTMLElement; body: HTMLElement; /** * Indicates whether or not the accordion is open. You can toggle this attribute to show and hide the accordion, or you * can use the `show()` and `hide()` methods and this attribute will reflect the accordion' open state. */ open: boolean; /** The summary to show in the header. If you need to display HTML, use the `summary` slot instead. */ summary: string; /** The menu accordion's size. */ size: 'small' | 'medium' | 'large'; /** The level of the menu accordion */ level: 1 | 2; /**@internal When used inside a sidenav, enables to control the collapsed state */ collapsed: boolean; /**@internal When used inside as a sidenav information accordion */ sidenavInfo: boolean; firstUpdated(): void; private handleSummaryClick; private handleSummaryKeyDown; private updateChildrenClassName; private handleDefaultSlotChange; private updateSummaryTextCache; private handleSummarySlotChange; private handleBadgeSlotChange; handleOpenChange(): Promise; handleLevelChange(): void; handleExpandedChange(): Promise; /** Shows the accordion. */ show(): Promise; /** Hides the accordion */ hide(): Promise; focus(options?: FocusOptions): void; blur(): void; click(): void; render(): import("lit").TemplateResult<1>; } declare global { interface HTMLElementTagNameMap { 'dsa-menu-accordion': DSAMenuAccordion; } }