import { BootstrapElement } from '@bootstrap-wc/core'; export type ModalSize = 'sm' | 'md' | 'lg' | 'xl'; export type ModalFullscreen = boolean | '' | 'sm-down' | 'md-down' | 'lg-down' | 'xl-down' | 'xxl-down'; /** * `` — Bootstrap modal dialog with backdrop, focus trap, and ESC close. * * @slot - Modal body. * @slot title - Rendered inside `.modal-title`. * @slot footer - Rendered inside `.modal-footer`. * @fires bs-show / bs-shown / bs-hide / bs-hidden */ export declare class BsModal extends BootstrapElement { open: boolean; heading?: string; size: ModalSize; centered: boolean; scrollable: boolean; staticBackdrop: boolean; noBackdrop: boolean; noCloseOnEscape: boolean; noCloseButton: boolean; /** * Fullscreen mode. * - `true` → `.modal-fullscreen` (always fullscreen) * - `"sm-down"` etc. → `.modal-fullscreen-{breakpoint}-down` * - `false`/absent → regular modal */ fullscreen: ModalFullscreen; /** * Render the dialog inline (not fixed-positioned) for static docs previews. * Adds `.position-static .d-block` and suppresses the backdrop so the * markup can sit in normal document flow. Has no effect on focus trap or * show/hide lifecycle. */ staticPreview: boolean; /** * Alias for `static-preview`. Both `static-display` and `static-preview` * map to the same internal state — the static, no-backdrop, no-focus-trap * render mode. */ staticDisplay: boolean; /** Extra classes for the outer `.modal` element (e.g. `modal-sheet bg-body-secondary p-4`). */ modalClass: string; /** Extra classes for the `.modal-content` wrapper (e.g. `rounded-4 shadow`). */ contentClass: string; /** Extra classes for the `.modal-header` (e.g. `border-bottom-0`). */ headerClass: string; /** Extra classes for the `.modal-body` (e.g. `py-0 p-4 text-center`). */ bodyClass: string; /** Extra classes for the `.modal-footer` (e.g. `flex-column gap-2 border-top-0`). */ footerClass: string; private _animating; private _modal; private _dialog; private _focusTrap; private _prevOverflow; private _originalParent; private _originalNextSibling; connectedCallback(): void; private _applyStaticAttrs; disconnectedCallback(): void; private _teleporting; /** * Move the host into `document.body` so the `.modal` overlay escapes every * ancestor stacking context (Starlight's `.main-pane` uses `isolation: * isolate`, for example, which otherwise caps the z-index of a modal * rendered in-place). Static-preview modals intentionally stay inline. */ private _teleportToBody; /** Restore the host to its author-placed position in the DOM. */ private _restoreFromBody; willUpdate(changed: Map): void; updated(changed: Map): void; show(): void; hide(): void; toggle(): void; private _onOpen; private _onClose; private _restoreBody; private _onKeydown; /** Convert a `"foo bar"` string into a `{foo: true, bar: true}` map. */ private _extraClasses; /** * In `static-display` mode the host IS the visible `.modal` chrome — mirror * `.modal.show.position-static.d-block` (plus any `modal-class` extras) * onto the host so layout rules in the page can target it. */ protected hostClasses(): string; private _onBackdropClick; render(): import("lit-html").TemplateResult<1>; } declare global { interface HTMLElementTagNameMap { 'bs-modal': BsModal; } } //# sourceMappingURL=modal.d.ts.map