import Tailwind from '../base/tailwind-base'; export type ModalSize = 'sm' | 'md' | 'lg' | 'xl' | '2xl' | 'full'; export type ModalPlacement = 'center' | 'top'; /** * @tag plus-modal * @summary Modal dialog component built on native HTML Dialog API. Displays content in a layer above the page with full keyboard and focus management. * * @slot - Main content area (same as body slot) * @slot header - The header content of the modal * @slot body - The main content of the modal (alternative to default slot) * @slot footer - The footer content of the modal * @slot close - Custom close button (defaults to an X icon) * * @csspart dialog - The native dialog element * @csspart container - The container wrapper for centering and scrolling * @csspart modal - The main modal box * @csspart header - The header section * @csspart header-content - The content wrapper inside header * @csspart body - The main content area * @csspart footer - The footer section * @csspart close-button - The close button element * * @event plus-modal-open - Emitted after the modal has opened * @event plus-modal-close - Emitted after the modal has closed * @event plus-modal-before-open - Emitted before the modal opens (cancelable) * @event plus-modal-before-close - Emitted before the modal closes (cancelable) * * @example * ```html * * *
Modal Title
*
Modal Content
*
* *
*
* * * *
Full Screen
*

Content here

*
* * * *
Can't Close Outside
*

Must use close button

*
* ``` */ export default class PlusModal extends Tailwind { private dialogRef?; /** * The size of the modal * @type {'sm' | 'md' | 'lg' | 'xl' | '2xl' | 'full'} * @default 'md' * @attr size */ size: ModalSize; /** * The placement of the modal on the screen * @type {'center' | 'top'} * @default 'center' * @attr placement */ placement: ModalPlacement; /** * Whether the modal is open * @type {boolean} * @default false * @attr is-open */ isOpen: boolean; /** * Whether the modal should take full width * @type {boolean} * @default false * @attr full-width */ fullWidth: boolean; /** * Makes the modal take the full screen (100vw x 100vh, no border radius) * @type {boolean} * @default false * @attr full-screen */ fullScreen: boolean; /** * Controls backdrop behavior * - true: Shows backdrop, modal can be closed by clicking outside * - false: No backdrop * - 'static': Shows backdrop but prevents closing by clicking outside (triggers shake animation) * @type {boolean | 'static'} * @default true * @attr backdrop */ backdrop: boolean | 'static'; /** * Whether the modal should close when clicking the backdrop * @type {boolean} * @default true * @attr close-on-backdrop */ closeOnBackdrop: boolean; /** * Whether the modal should close when pressing the Escape key * @type {boolean} * @default true * @attr close-on-esc */ closeOnEsc: boolean; /** * Hides the header section completely * @type {boolean} * @default false * @attr no-header */ noHeader: boolean; /** * Hides the footer section completely * @type {boolean} * @default false * @attr no-footer */ noFooter: boolean; /** * The duration of the animation in milliseconds * @type {number} * @default 300 * @attr animation-duration */ animationDuration: number; private isAnimating; private shake; connectedCallback(): void; disconnectedCallback(): void; firstUpdated(): void; updated(changedProperties: Map): void; /** * Shows the modal with animation * @returns {Promise} */ show(): Promise; /** * Hides the modal with animation * @returns {Promise} */ hide(): Promise; /** * Toggles the modal open/closed state * @returns {Promise} */ toggle(): Promise; private handleOpenChange; private handleCloseChange; private handleBeforeOpen; private handleBeforeClose; private handleBackdropClick; private handleDialogCancel; private handleKeydown; private handleClick; private shakeModal; private getModalStyle; render(): import("lit-html").TemplateResult<1>; } export { PlusModal }; //# sourceMappingURL=modal.d.ts.map