import AWCElement from '../../internal/awc-element.js'; import AWCIcon from '../icon/icon.component.js'; import type { CSSResultGroup } from 'lit'; /** * @summary Details show a brief summary and expand to show additional content. * @documentation https://webcomponents.adeliom.io/?path=/docs/components-details--documentation * @status stable * @since 1.0 * * @dependency awc-icon * * @slot - The details' main content. * @slot summary - The details' summary. Alternatively, you can use the `summary` attribute. * @slot expand-icon - Optional expand icon to use instead of the default. Works best with ``. * @slot collapse-icon - Optional collapse icon to use instead of the default. Works best with ``. * * @event awc-show - Emitted when the details opens. * @event awc-after-show - Emitted after the details opens and all animations are complete. * @event awc-hide - Emitted when the details closes. * @event awc-after-hide - Emitted after the details closes and all animations are complete. * * @csspart base - The component's base wrapper. * @csspart header - The header that wraps both the summary and the expand/collapse icon. * @csspart summary - The container that wraps the summary. * @csspart summary-icon - The container that wraps the expand/collapse icons. * @csspart body - The details content wrapper. * @csspart content - The details content. * * @cssproperty [--padding=var(--awc-spacing-medium)] - The details's padding. * @cssproperty [--border-width=1px] - The details's border width. * @cssproperty [--border-radius=var(--awc-card-border-radius)] - The details's border radius. * @cssproperty [--border-color=var(--awc-color-neutral-200)] - The details's border color. * @cssproperty [--background-color=transparent] - The details's background color. * * @animation details.show - The animation to use when showing details. You can use `height: auto` with this animation. * @animation details.hide - The animation to use when hiding details. You can use `height: auto` with this animation. */ export default class AWCDetails extends AWCElement { static styles: CSSResultGroup; static dependencies: { 'awc-icon': typeof AWCIcon; }; private readonly localize; details: HTMLDetailsElement; header: HTMLElement; body: HTMLElement; expandIconSlot: HTMLSlotElement; detailsObserver: MutationObserver; /** * Indicates whether or not the details is open. You can toggle this attribute to show and hide the details, or you * can use the `show()` and `hide()` methods and this attribute will reflect the details' open state. */ open: boolean; /** The summary to show in the header. If you need to display HTML, use the `summary` slot instead. */ summary: string; /** Disables the details so it can't be toggled. */ disabled: boolean; firstUpdated(): void; disconnectedCallback(): void; private handleSummaryClick; private handleSummaryKeyDown; handleOpenChange(): Promise; /** Shows the details. */ show(): Promise; /** Hides the details */ hide(): Promise; render(): import("lit-html").TemplateResult<1>; }