import { EventEmitter } from '../../stencil-public-runtime'; /** * @slot default - Body of the dialog. * @slot trigger - Content to be placed as the trigger, will override the trigger prop. * @slot header - Content to be placed as the header, will override the header prop. * @slot footer - Content to be placed as the footer, will override the footer prop. */ export declare class NvDialog { el: HTMLNvDialogElement; private dialogElement; private backdropElement; private contentElement; private eventsAttached; private form; private triggerElement; private pointerDownTarget; private triggerClickEvents; /****************************************************************************/ /** * @internal * Accepts a reference to the DOM element acting as the header. This should * be used when the slot for the header is not defined. */ headerElement: Element; /** * @internal * Accepts a reference to the DOM element acting as the footer. This should * be used when the slot for the footer is not defined. */ footerElement: Element; /** * Use this prop to toggle the visibility of the dialog. Set to true to show * the dialog and false to hide it. */ open: boolean; /** * If true, the dialog cannot be closed by the user. */ readonly undismissable: boolean; /** * If true, the dialog will be closed when the backdrop is clicked. */ readonly clickOutside: boolean; /** * If true, the dialog visibility is managed manually through methods or the * open prop. */ readonly controlled: boolean; /** * If true, the dialog takes full width styling. */ readonly full: boolean; /** * Controls whether the dialog should automatically focus the first focusable * element when opened. When disabled, prevents unwanted tooltip triggers on * dialog open. */ readonly autofocus: boolean; /****************************************************************************/ /** * Call this method to show the dialog, making it visible on the screen. */ show(): Promise; /** * Call this method to hide the dialog, making it disappear from view. */ close(): Promise; /** * Sets the autofocus on the first focusable element in the dialog. */ private setAutofocus; /** * Attaches event listeners to the dialog. */ private attachEventListeners; /** * Prevents the body from scrolling when the dialog is open. * Compensates for scrollbar width to prevent layout shift. */ private preventScroll; /** * Allows the body to scroll when the dialog is closed. * Removes the applied overflow and padding styles. */ private allowScroll; private ensureFormId; /** * Checks for and sets up form ID if a form is present */ private checkForForm; /** * Handles the native dialog close event. */ private handleDialogClose; /****************************************************************************/ /** * Emitted when the dialog is closing in order to allow for cleanup, data-capture, etc. * @bind open */ openChanged: EventEmitter; /****************************************************************************/ handleDialogOpenChange(isOpen: boolean): Promise; /****************************************************************************/ /** * Handles the keydown event to optionally prevent the native dialog from closing when the escape key is pressed. * @param {KeyboardEvent} event - The keydown event. */ handleKeyDown(event: KeyboardEvent): void; /** * Records the pointer down target to distinguish intentional outside clicks * from drag-out gestures (press inside, release outside). * @param {PointerEvent} event - The pointerdown event. */ private handleDialogPointerDown; /** * Handles the click event to close the dialog when clickOutside is true. * Only closes if both pointerdown and click originated on the backdrop, * preventing accidental closes from drag-out gestures. * @param {MouseEvent} event - The click event. */ private handleDialogClick; private checkForOpenPopovers; /****************************************************************************/ /** * Lifecycle method that runs before the component loads. * Looks for passed header, and footer elements, either by their slot * attribute or by their tag name (for dialog header/footer) */ componentWillLoad(): void; componentDidRender(): void; componentDidLoad(): void; disconnectedCallback(): void; /****************************************************************************/ render(): any; }