import type{PropertyValues}from'lit';import{LyraDialog}from'../dialog/dialog.class.js';import type{RegisteredAnimationSpec}from'../../../internal/registered-animation.js';export type LyraDrawerPlacement='start'|'end'|'top'|'bottom'; /** * `` — a modal panel anchored to one logical edge of the * viewport. It shares Lyra's dialog focus trap, Escape/backdrop dismissal, * scroll lock, top-layer promotion, stacking, accessible naming, * `show()`/`hide()`/`close()` surface, and the whole * `lr-show`/`lr-after-show`/`lr-hide`/`lr-after-hide`/`lr-close` lifecycle — see * `` for all of it. `contained` instead positions within the nearest containing block * as a nonmodal panel: no backdrop, inerting, focus trap, scroll lock, top layer, or global Escape. * Only that mode, the slide animation, `placement`, and the `--size` alias are drawer-specific. * The panel registry names are `drawer.showTop`/`hideTop`, `showEnd`/`hideEnd`, * `showBottom`/`hideBottom`, and `showStart`/`hideStart`; the scrim uses * `drawer.overlay.show`/`drawer.overlay.hide`. * * @customElement lr-drawer * @slot - The drawer body. * @slot label - Rich header content, inherited from ``. * @slot header-actions - Extra header controls, inherited from ``. * @slot footer - Action buttons rendered in the footer row. * @event lr-show - The drawer is about to open. Cancelable. * @event lr-after-show - The drawer is open and has finished sliding in. * @event lr-hide - The drawer is about to close. Cancelable. * @event lr-after-hide - The drawer is closed and has finished sliding out. * @event lr-initial-focus - Inherited cancelable event before automatic modal focus movement. * @event lr-request-close - Inherited cancelable built-in dismissal request with a source detail. * @event lr-close - Inherited conditionally cancelable close event; detail is the dismissal * reason. Ordinary dismissal can be vetoed; an `'unmount'` notification after external removal * cannot be. **The name is not drawer-scoped, so filter by target.** `lr-close` is also emitted * by several components commonly nested inside a drawer body (``, ``/ * ``, ``, ``), and library events bubble * and are composed, so a listener bound directly on `` also receives a descendant's * close. Guard on the target exactly as documented on ``'s own `lr-close`: * `if (event.target !== event.currentTarget) return;`. * It inherits every `` CSS part unchanged, with one deliberate layout exception: * ``'s `[part="body"]` grows to fill the panel once a consumer sets * `--lr-dialog-height`, because that panel is otherwise content-sized. A drawer's panel is * unconditionally a definite size for every `placement`, so this component opts back out of that * growth — `body` keeps its natural content size and `footer` follows immediately after it, * exactly as before `--lr-dialog-height` existed, instead of always being pushed to the panel's * far edge. * The `size` property, inherited unchanged from ``, caps the panel's `max-inline-size` * for `start`/`end` placements on the same six-step ladder documented there (`'m'`'s 32rem cap * exceeds the panel's own 24rem default inline size, so it stays a no-op at the default tier); * `top`/`bottom` placements are unaffected, since those axes are already unconditionally 100%. * Not to be confused with the drawer-specific `--size` CSS custom property below, which maps to * this same panel's own `inline-size`/`block-size` for the active axis. * @cssprop --size - Mapped drawer size for the active axis. * @cssprop --backdrop-filter - Mapped backdrop-filter alias. * @cssprop --spacing - Web Awesome shared region spacing. * @cssprop --header-spacing - Shoelace header padding. * @cssprop --body-spacing - Shoelace body padding. * @cssprop --footer-spacing - Shoelace footer padding. * @cssprop --show-duration - Opening slide duration. * @cssprop --hide-duration - Closing slide duration. * @cssprop --lr-drawer-width - Inline size for start/end drawers. * @cssprop --lr-drawer-height - Block size for top/bottom drawers. * @cssprop [--lr-drawer-enter-x=calc(-1 * var(--lr-size-1rem))] - Horizontal offset the panel * slides in from, and back out to, for start/end drawers. Its private default changes per * placement (and flips under RTL); an inherited or direct public value remains authoritative. * @cssprop [--lr-drawer-enter-y=calc(-1 * var(--lr-size-1rem))] - Vertical offset the panel * slides in from, and back out to, for top/bottom drawers. Its private default becomes * `var(--lr-size-1rem)` for `bottom`; an inherited or direct public value remains authoritative. * @status stable * @since 4.0.0 */ export declare class LyraDrawer extends LyraDialog{static styles:(import("lit").CSSResultGroup[]|import("lit").CSSResult)[]; /** Which edge the drawer slides in from. `end` by default, matching `wa-drawer`; it used to be * `start`, so a mechanical rename silently moved every migrated drawer to the other side. */ placement:LyraDrawerPlacement; /** Positions inside the nearest containing block without modal inerting, focus trapping, * scroll locking, top-layer promotion, backdrop, or Escape dismissal. */ contained:boolean;protected get modalSurface():boolean; /** A mapped drawer's hide request is cancelable on every path, including external removal. */ protected get disconnectHideCancelable():boolean;protected panelAnimationName(showing:boolean):string;protected overlayAnimationName(showing:boolean):string;protected panelAnimationSpec(showing:boolean):RegisteredAnimationSpec;protected willUpdate(changed:PropertyValues):void;protected updated(changed:PropertyValues):void;}declare global{interface HTMLElementTagNameMap{'lr-drawer':LyraDrawer;}}