import type { CSSResultGroup } from 'lit'; import DSADivider from '../divider/divider'; import DSAIcon from '../icon/icon'; import { ShoelaceElement } from '../../internal/shoelace-element'; /** * @summary Accordion show a brief summary and expand to show additional content. * @documentation https://dsa.service-public-autonomie.fr/latest/librairie-webcomponents/accordeon-accordion/web-6JafQttW * * @dependency dsa-icon * @dependency dsa-divider * * @slot - The accordion's main content. * @slot summary - The accordion's summary. Alternatively, you can use the `summary` attribute. * @slot actions - Additional actions, which will be visible in the accordion's header. * * @event dsa-show - Emitted when the accordion opens. * @event dsa-after-show - Emitted after the accordion opens and all animations are complete. * @event dsa-hide - Emitted when the accordion closes. * @event dsa-after-hide - Emitted after the accordion closes and all animations are complete. */ export default class DSAAccordion extends ShoelaceElement { static styles: CSSResultGroup; static dependencies: { 'dsa-icon': typeof DSAIcon; 'dsa-divider': typeof DSADivider; }; private readonly localize; private readonly hasSlotController; 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; /** Optional aria-level of the accordion header */ headerLevel: 1 | 2 | 3 | 4 | 5 | 6; /** Disables the accordion so it can't be toggled. */ disabled: boolean; /** The accordion's expand/collapse icon variant */ icon: 'chevron' | 'box'; /** The card's style variant. */ variant: 'outlined' | 'filled'; /** The card's size. */ size: 'small' | 'medium'; firstUpdated(): void; private handleSummaryClick; private handleSummaryKeyDown; handleOpenChange(): Promise; /** Shows the accordion. */ show(): Promise; /** Hides the accordion */ hide(): Promise; render(): import("lit").TemplateResult<1>; } declare global { interface HTMLElementTagNameMap { 'dsa-accordion': DSAAccordion; } }