import { LitElement, CSSResult, TemplateResult, PropertyValues } from 'lit'; import Modal from './shoelace/modal'; import './modal-template'; import { ModalConfig } from './modal-config'; import { ModalManagerInterface } from './modal-manager-interface'; import { ModalManagerHostBridgeInterface } from './modal-manager-host-bridge-interface'; import { ModalManagerMode } from './modal-manager-mode'; export declare class ModalManager extends LitElement implements ModalManagerInterface { /** * The current mode of the ModalManager * * Current options are `modal` or `closed` * * @type {ModalManagerMode} * @memberof ModalManager */ mode: ModalManagerMode; /** * Custom content to display in the modal's content slot * * @type {(TemplateResult | undefined)} * @memberof ModalManager */ customModalContent?: TemplateResult; /** * This hostBridge handles environmental-specific interactions such as adding classes * to the body tag or event listeners needed to support the modal manager in the host environment. * * There is a default `ModalManagerHostBridge`, but consumers can override it with a custom * `ModalManagerHostBridgeInterface` * * @type {ModalManagerHostBridgeInterface} * @memberof ModalManager */ hostBridge: ModalManagerHostBridgeInterface; /** * Reference to the ModalTemplate DOM element * * @private * @type {ModalTemplate} * @memberof ModalManager */ private modalTemplate?; modal: Modal; firstUpdated(): Promise; disconnectedCallback(): void; /** @inheritdoc */ render(): TemplateResult; /** @inheritdoc */ getMode(): ModalManagerMode; /** @inheritdoc */ closeModal(): void; /** * Whether the modal should close if the user taps on the backdrop * * @private * @memberof ModalManager */ private closeOnBackdropClick; /** * The element that had focus when the modal was opened, so that we can return focus * to it after the modal closes. */ private triggeringElement?; /** * A callback if the user closes the modal * * @private * @memberof ModalManager */ private userClosedModalCallback?; /** * A callback if the user presses the left nav button * * @private * @memberof ModalManager */ private userPressedLeftNavButtonCallback?; /** * Call the userClosedModalCallback and reset it if it exists * * @private * @memberof ModalManager */ private callUserClosedModalCallback; /** * Call the user pressed left nav button callback and reset it if it exists * * @private * @memberof ModalManager */ private callUserPressedLeftNavButtonCallback; /** @inheritdoc */ showModal(options: { config: ModalConfig; customModalContent?: TemplateResult; userClosedModalCallback?: () => void; userPressedLeftNavButtonCallback?: () => void; }): Promise; /** * Sets the triggering element to the one that is currently focused, as deep * within Shadow DOM as possible. */ private captureFocusedElement; /** @inheritdoc */ updated(changed: PropertyValues): void; /** * Called when the backdrop is clicked * * @private * @memberof ModalManager */ private backdropClicked; /** * Handle the mode change * * @private * @memberof ModalManager */ private handleModeChange; /** * Emit a modeChange event * * @private * @memberof ModalManager */ private emitModeChangeEvent; /** * Called when the modal close button is pressed. Closes the modal. * * @private * @memberof ModalManager */ private closeButtonPressed; /** @inheritdoc */ static get styles(): CSSResult; }