import { EventEmitter } from '../../stencil-public-runtime'; import { ModalPositionType, ModalOverflowType, ModalAnimationStyleType, ModalInteractionType } from './meta/types'; /** * @part action-close - Selects the close button of the modal. * @part dialog - The native `` that covers the viewport and places the window in it * @part window - Selects the default window element of the modal when used. * @slot bottom - Contents that will be placed on bottom of the window. Add `text string`, `HTML elements` or `components` to this slot. * @slot - Contents that will be placed in the center of the window. Add `text string`, `HTML elements` or `components` to this slot. * @slot top - Contents that will be placed on top of the window. Add `text string`, `HTML elements` or `components` to this slot. * @slot window - Use directly a window component if you need it. Add `text string`, `HTML elements` or `components` to this slot. * @category overlays */ export declare class MdsModal { private t; private animationDelayTimeout; private dialogEl?; private bodyOverflow; private cssTransitionDuration; private windowElement; private openAfterRender; private windowContentWrapper?; private touchStartX; private touchStartY; private touchMargin; private entering; private pressedOnBackdrop; private releasedOnBackdrop; host: HTMLMdsModalElement; hasBottom: boolean; hasTop: boolean; hasWindow: boolean; windowHeaderHeight: number; windowFooterHeight: number; /** * The accessible name of the modal: the name a screen reader announces when the window * opens. The `` this component renders is the dialog, so the name goes there. */ readonly accessibleName?: string; /** * Specifies if the modal is opened or not */ opened?: boolean; /** * Hides the modal backdrop */ hideBackdrop?: boolean; /** * Specifies the animation position of the modal window */ position?: ModalPositionType; /** * Specifies the animation style of the modal window */ readonly animation?: ModalAnimationStyleType; /** * Specifies if the component prevents the body from scrolling when modal window is opened */ readonly overflow: ModalOverflowType; /** * Specifies if the component can be closed with close button, or also if the backdrop background is cliccked. * If `strict` is selected only the close button can dismiss the component via UI. * If `relaxed` is selected the component can be dismissed also by clicking the backdrop area: a click * pressed and released on the backdrop, once the window has finished its entry. */ readonly interaction: ModalInteractionType; /** * Emits when a modal is opened, as its intro animation starts: `mdsModalShow` follows once it * is totally visible */ openEvent: EventEmitter; /** * Emits when a modal is totally visible, when the modal intro animation is finished */ showEvent: EventEmitter; /** * Emits when a modal is closed */ closeEvent: EventEmitter; /** * Emits when a modal is totally invisible, can be useful to detach the component when it's hidden and gain memory */ hideEvent: EventEmitter; private updateCSSCustomProps; private stopIntroAnimationWindow; private stopOutroAnimationWindow; private disableOverflow; private enableOverflow; private setContentOverflow; private handleWindowTransitionEnd; private animateOpenWindow; private animateCloseWindow; private setTouchStart; private setTouchEnd; private addMobileEvents; private updateSlots; /** * Measures the header and the footer to pad the content: the states change * only when a measure differs, so the update pass settles after one render. */ private updateWindowPaddings; componentWillLoad(): void; componentDidLoad(): void; componentDidUpdate(): void; disconnectedCallback(): void; private showDialog; private closeDialog; private handleBackdropPointerDown; private handleBackdropPointerUp; private handleBackdropClick; private handleCancel; private handleCloseClick; handleOpenProp(newValue: boolean, oldValue?: boolean): void; handleHideBackdropProp(newValue?: boolean): void; /** * Closes the modal. */ close(): Promise; render(): any; }