import{type PropertyValues,type TemplateResult}from'lit';import{LyraElement}from'../../../internal/lyra-element.js';import{type LyraSize,type LyraVariant}from'../../../internal/variants.js'; /** Shoelace's physical countdown direction. */ export type AlertCountdown='rtl'|'ltr'|undefined; /** Shoelace's alert tones; `primary` resolves through Lyra's shared brand row. */ export type AlertVariant=Exclude |'primary';export interface LyraAlertEventMap{'lr-show':CustomEvent;'lr-after-show':CustomEvent;'lr-hide':CustomEvent;'lr-after-hide':CustomEvent;} /** * `` — a closed-by-default inline alert that can also move into the shared toast stack. * It mirrors the public `` contract under the `lr-` prefix. `lr-show`/`lr-hide` are * cancelable veto points, matching every other Lyra component that emits them; the settled * `lr-after-*` notifications are not. Initial `open` markup establishes state without emitting a * transition event, so it is never vetoable. The light-DOM host owns `role="alert"`; its slotted * message is therefore the one assertive semantic surface for both static and later-open alerts, * without a duplicate shadow or shared live region. The optional icon wrapper remains visible as * decorative chrome while its flattened subtree is inert and hidden from the accessibility tree. * Accepted transitions resume after reconnect and emit at most one matching terminal event; * method promises still settle if a disconnect proves lasting. * * @customElement lr-alert * @slot - The alert's main content. * @slot icon - Optional decorative leading icon. Its flattened subtree remains visible but is * inert and hidden from assistive technology. * @event lr-show - The alert is about to open. Cancelable — `preventDefault()` leaves it * closed and the reflected attribute untouched. * @event lr-after-show - Emitted after the alert's show motion completes. Noncancelable. * @event lr-hide - The alert is about to close, including an auto-hide expiry. Cancelable on * the same terms as `lr-show`. * @event lr-after-hide - Emitted after the alert's hide motion completes. Noncancelable. * @csspart base - The component's base wrapper. * @csspart close-button - The close button. * @csspart close-button__base - Compatibility alias for the close button's base part; it is on * the same native button as `close-button`. * @csspart icon - The optional inert, aria-hidden icon wrapper. * @csspart message - The alert's main-content wrapper. * @cssprop [--lr-alert-close-hover-bg=color-mix(in oklab,transparent,var(--lr-color-mix-partner) var(--lr-color-mix-hover))] - * The close button's hover background, scoped so a consumer can retint just this control * without touching the shared `--lr-color-mix-partner`/`--lr-color-mix-hover` tokens every * other interactive surface in the library also reads. * @cssprop [--lr-alert-close-active-bg=color-mix(in oklab,transparent,var(--lr-color-mix-partner) var(--lr-color-mix-active))] - * The close button's pressed background, independently scoped from `--lr-alert-close-hover-bg`. * @status stable * @since 8.0.0 */ export declare class LyraAlert extends LyraElement{static styles:import("lit").CSSResultGroup[]; /** Light-DOM semantic role for the projected message. Reflected so server renderers can * serialize the default before browser connection; an authored role continues to win. */ role:string|null;private _open; /** * Whether the alert is visible. The attribute reflects method and property changes. * @default false */ get open():boolean;set open(next:boolean);private requestOpenState; /** Enables the localized close action. */ closable:boolean;private _size?; /** Density tier on the library's one size ladder, in either spelling — `2xs`/`xs`/`s`/`m`/`l`/ * `xl`, or Web Awesome's and Shoelace's `small`/`medium`/`large`. A Lyra addition on top of the * pinned Shoelace surface, and opt-in for that reason: with no size the panel keeps the exact * padding and inherited text size it shipped with, so migrated markup renders unchanged. A tier * scales the panel's padding and text together and takes ``'s tier values for both, * keeping the same constant gap, so a tiered alert and a tiered callout of the same size line * up in one column. Their UNSET states are NOT interchangeable, deliberately: with no tier this * panel keeps a fixed gutter and inherits the ambient text size — its exact pre-ladder * rendering — while an untiered `` reads the ambient form-control slots and falls * back to `--lr-space-m` / `--lr-font-size-m`. Pinning a default tier here would resize every * alert that shipped before the ladder reached this component. Unsupported values normalize to * the omitted state and remove the attribute. */ get size():LyraSize|undefined;set size(next:LyraSize|undefined); /** Physical direction in which the optional visual countdown empties. Unsupported values * normalize to the omitted default. */ private _countdown;get countdown():AlertCountdown;set countdown(next:AlertCountdown); /** Milliseconds before automatic dismissal; `Infinity` disables automatic dismissal. */ duration:number; /** Semantic alert tone. Unsupported values normalize to `primary`. */ private _variant;get variant():AlertVariant;set variant(next:AlertVariant);private readonly slotPresence;private transitionToken;private transitionPromise;private openRequest?;private transitionRequest?;private timer?;private timerOwner?;private countdownAnimation?;private hovering;private focused;private focusReturnTarget?;private pendingFocusRepair?;private toastPromise?;private toastResolve?;private toastAfterHide?;private toastConnectionGeneration;private toastLifecycleGeneration;private toastRegionOwner?;private toastRegionActive;private toastActivationStarted;constructor();connectedCallback():void;disconnectedCallback():void;firstUpdated(changed:PropertyValues):void;protected updated(changed:PropertyValues):void; /** Show the alert and resolve after show motion and `lr-after-show` complete. */ show():Promise; /** Hide the alert and resolve after hide motion and `lr-after-hide` complete. */ hide():Promise; /** * Move this alert into Lyra's singleton logical top-end toast region. The returned promise * resolves after the alert hides and is removed, or after a lasting external disconnect; the * same instance can be toasted again later. An already-open alert queued behind the active * window becomes hidden and inert without replaying its show lifecycle when promoted; focus in * that surface is repaired through the shared composed-focus contract before it becomes * unavailable. If its owner document cannot provide an upgraded bounded region controller, the * unavailable request is removed and settled without fallback. */ toast():Promise;private beginToastActivation;private finishToast;private settleTransitionCompletion;private cancelTransition;private finishTransition;private runTransition;private get base();private nextFrame;private waitForMotion;private get safeDuration();private clearAutoHide;private restartAutoHide;private startCountdown;private onPointerEnter;private onPointerLeave;private onFocusIn;private onFocusOut;private close;render():TemplateResult;}declare global{interface HTMLElementTagNameMap{'lr-alert':LyraAlert;}}