import { type EventEmitter } from '../../stencil-public-runtime'; import type { ModalBackdrop } from './types'; import type { Theme } from '../../utils/styles'; /** * @component diwa-modal * * A controlled overlay dialog box for focused interactions. * Follows the PDS controlled-component pattern — the consumer owns open state * and responds to the `dismiss` event to close the modal. * * Design token override API (set on :root or any ancestor): * --diwa-modal-width Panel width (default: 560px) * --diwa-modal-max-height Maximum panel height (default: 85vh) * * Usage: * setOpen(false)}> *

Are you sure you want to delete this item? This action cannot be undone.

*
* Delete * Cancel *
*
* * @slot default — Scrollable body content. * @slot header — Optional sub-header below the title bar (e.g. description, metadata). * @slot footer — Sticky footer content (e.g. action buttons). Hidden when empty. * * @controlled {"props": ["open"], "event": "dismiss"} */ export declare class DiwaModal { host: HTMLElement; private readonly _headingId; private _modalEl?; private _savedFocus; /** * Per-component theme override. * Reflects data-theme onto the host element so the light/dark token * overrides in app.css cascade into the Shadow DOM via CSS inheritance. */ theme: Theme; /** * Whether the modal is open. * * Controlled prop — set `open={true}` to open and `open={false}` to close. * The component emits `dismiss` when the user requests a close; the * consumer must set `open={false}` in response. */ open: boolean; /** Heading text displayed in the modal title bar. */ heading?: string; /** * When false, the dismiss (×) button in the header is hidden. * Pair with a close action in the footer or programmatic `open = false`. */ dismissButton: boolean; /** * When true, clicking the backdrop does not emit `dismiss`. * Use for required confirmations requiring an explicit user choice. */ disableBackdropClick: boolean; /** * Controls the visual style of the backdrop overlay. * * `blur` — frosted glass via backdrop-filter (default). * Use when the modal is opened by direct user interaction (e.g. a button click). * * `shading` — solid dark scrim via --diwa-bg-shading. * Use for system-triggered modals (e.g. session timeout, cookie consent). */ backdrop: ModalBackdrop; /** True when the footer slot contains at least one element. */ private _hasFooter; /** True when the header slot contains at least one element. */ private _hasHeader; /** * Emitted when the user requests the modal to close: * - Clicking the backdrop (unless `disableBackdropClick` is true) * - Pressing the Escape key * - Clicking the dismiss (×) button * * The consumer MUST set `open={false}` in response: * ```html * (this.open = false)} /> * ``` */ dismiss: EventEmitter; componentWillRender(): void; disconnectedCallback(): void; onOpenChange(isOpen: boolean): void; onKeyDown(e: KeyboardEvent): void; private handleDismiss; private handleBackdropClick; render(): any; } //# sourceMappingURL=diwa-modal.d.ts.map