import { PropertyDeclaration, PropertyValues } from 'lit'; import { SbbFocusTrapController } from '../core/a11y.ts'; import { SbbOpenCloseBaseElement } from '../core/base-elements.ts'; import { SbbEscapableOverlayController, SbbInertController, SbbLanguageController } from '../core/controllers.ts'; import { SbbScrollHandler } from '../core/dom.ts'; import { SbbOverlayCloseEventDetails } from '../core/interfaces.ts'; export declare class SbbOverlayCloseEvent extends CustomEvent { /** * The result associated with the closed overlay. * This is either the result assigned to the `closeTarget` via * `assignOverlayResult` / `assignDialogResult` or the value of the * corresponding close attribute on the `closeTarget` * (e.g. sbb-overlay-close="my-result" or sbb-dialog-close="my-result"). */ readonly result: T | null; /** * The element that was used to close the overlay/dialog, i.e. the element that the * user clicked on that had the close attribute. * Empty if closed programmatically or via Escape press. */ readonly closeTarget: HTMLElement | null; constructor(name: string, { cancelable, closeAttribute, closeTarget, result, }: { cancelable?: boolean; closeAttribute: string; closeTarget?: HTMLElement; result?: any; }); } export declare function assignOverlayResult(element: HTMLElement, result: T): void; export declare const overlayRefs: SbbOverlayBaseElement[]; declare const SbbOverlayBaseElement_base: import('../core/mixins.ts').AbstractConstructor & typeof SbbOpenCloseBaseElement; export declare abstract class SbbOverlayBaseElement extends SbbOverlayBaseElement_base { /** * The element that will trigger the menu overlay. * * For attribute usage, provide an id reference. */ accessor trigger: HTMLElement | null; /** This will be forwarded as aria-label to the relevant nested element to describe the purpose of the overlay. */ accessor accessibilityLabel: string; /** * Whether to skip restoring focus to the previously-focused element when the overlay is closed. * Note that automatic focus restoration is an accessibility feature, and it is recommended that * you provide your own equivalent, if you decide to turn it off. */ accessor skipFocusRestoration: boolean; protected lastFocusedElement?: HTMLElement; protected overlayCloseElement?: HTMLElement; protected openOverlayController?: AbortController; protected focusTrapController: SbbFocusTrapController; protected scrollHandler: SbbScrollHandler; protected returnValue: any; protected language: SbbLanguageController; protected inertController: SbbInertController; protected escapableOverlayController: SbbEscapableOverlayController; private _ariaLiveRefToggle; private _ariaLiveRef?; private _triggerElement; private _triggerAbortController?; protected abstract closeAttribute: string; protected closeTag?: string; protected abstract handleOpening(): void; protected abstract handleClosing(): void; protected abstract isZeroAnimationDuration(): boolean; protected abstract dispatchBeforeCloseEvent(detail?: SbbOverlayCloseEventDetails): boolean; protected abstract dispatchCloseEvent(detail?: SbbOverlayCloseEventDetails): boolean; /** Opens the component. */ open(): void; /** Closes the component. */ close(result?: any): void; /** @deprecated */ close(result?: any, target?: HTMLElement): void; private _close; /** * Check if there is a parent dialog or overlay in the DOM that is closed. * In this case, the overlay should not be opened because it would break the state. * Not nested but stacked overlays are supported so this logic does not apply in this case. */ private _hasClosedParent; connectedCallback(): void; private _configureTrigger; protected firstUpdated(changedProperties: PropertyValues): void; disconnectedCallback(): void; requestUpdate(name?: PropertyKey, oldValue?: unknown, options?: PropertyDeclaration): void; protected attachOpenOverlayEvents(): void; protected removeInstanceFromGlobalCollection(): void; protected closeOnSbbOverlayCloseClick(event: Event): void; protected removeAriaLiveRefContent(): void; protected setAriaLiveRefContent(label?: string): void; protected onOverlayAnimationEnd(event: AnimationEvent): void; } export {}; //# sourceMappingURL=overlay-base-element.d.ts.map