import{type TemplateResult,type PropertyValues}from'lit';import{LyraElement}from'../../../internal/lyra-element.js';import{type LyraSize,type LyraVariant}from'../../../internal/variants.js'; /** The library's one semantic-tone vocabulary. */ export type LyraToastVariant=LyraVariant; /** The library's one size ladder. */ export type LyraToastSize=LyraSize;export interface LyraToastItemEventMap{'lr-show':CustomEvent;'lr-after-show':CustomEvent;'lr-hide':CustomEvent;'lr-after-hide':CustomEvent;} /** * `` — a single toast notification. Its normalized message is announced through a * shared light-DOM sink, leaving the visible close and action controls outside the live subtree. * Contextual close names include rich non-interactive message markup and update with its text. * Referenced labels and open shadow roots actually traversed for their text remain observed outside * the item. Bounded traversal appends an explicit truncation marker to a prefix, or uses a localized * incomplete-content fallback when no prefix fits, instead of presenting partial content as whole. * When a focused toast finishes hiding, focus moves to an adjacent toast or back to the pre-toast * control. An accepted show or hide interrupted by disconnect resumes to one terminal completion * if the same item reconnects. Region-owned items beyond the active window stay hidden, inert, and * timer-paused until FIFO promotion, including an already-visible standalone item reparented into * a full region. * Mirrors the Web Awesome `` API under the `lr-` prefix. * * @customElement lr-toast-item * @slot - The message content. Visible non-interactive text, including through forwarding slots, * stays synchronized with the close button's contextual accessible name. * @slot icon - Optional icon shown at the start. * @event lr-show - The item is about to show. Cancelable — `preventDefault()` suppresses and * releases the toast without starting its auto-dismiss timer. * @event lr-after-show - Fired after the show animation completes. * @event lr-hide - The item is about to hide, including an auto-dismiss expiry. Cancelable — * `preventDefault()` leaves it visible. A vetoed auto-dismiss restarts the full current * normalized duration; a vetoed manual `hide()` leaves any active countdown untouched. * @event lr-after-hide - Fired after the hide animation completes (item then removes itself). * @csspart toast-item - The outer container. * @csspart accent - The colored accent bar. * @csspart icon - The icon wrapper. * @csspart content - The message wrapper. * @csspart close-button - The dismiss button. * @csspart close-icon - The close glyph wrapper. * @csspart close-icon__svg - The close glyph's SVG element. * @csspart progress-ring - The auto-dismiss progress ring around the close glyph. * @csspart progress-ring__base - The progress ring's SVG element. * @csspart progress-ring__indicator - The elapsed-time indicator circle. * @csspart progress-ring__label - The ring's centered close-glyph container. * @csspart progress-ring__track - The progress ring's background circle. * @cssprop --accent-width - Mapped alias for `--lr-toast-accent-width`. * @cssprop --hide-duration - Mapped alias for `--lr-toast-hide-duration`. * @cssprop --padding - Mapped alias for `--lr-toast-padding`. * @cssprop --show-duration - Mapped alias for `--lr-toast-show-duration`. * @cssprop [--lr-toast-accent-width=var(--lr-size-4px)] - Width of the accent bar, and the extra * inline-start padding reserved for it. * @cssprop [--lr-toast-accent-color=var(--lr-color-border)] - Color of the accent bar and the icon. * Its private default follows each non-neutral `variant`'s loud fill from the shared semantic * grid; `neutral` keeps the plain border color, so an informational toast reads as unaccented. * An inherited or direct public value remains authoritative. * @cssprop [--lr-toast-padding=var(--lr-space-m)] - Padding of the item. Its private default follows * `size` across the shared six-step ladder; an inherited or direct public value wins. * @cssprop [--lr-toast-font-size=var(--lr-font-size-m)] - Font size of the item. Its private default * follows `size` across the shared six-step ladder; an inherited or direct public value wins. * @cssprop [--lr-toast-item-gap=var(--lr-space-s)] - Gap between the item icon, message, and close * button. Unlike `--lr-toast-gap`, this does not affect spacing between stacked items. * @cssprop [--lr-toast-item-radius=var(--lr-radius)] - Corner radius of the item surface and its * accent bar's inline-start corners. * Pointer-state hooks are inline fallbacks, so they inherit from the item or an ancestor without * recoloring the item surface or the stack. * @cssprop [--lr-toast-close-button-hover-bg=transparent] - Background of the enabled close button * while hovered. * @cssprop [--lr-toast-close-button-hover-color=var(--lr-color-text)] - Foreground of the enabled * close button while hovered. * @cssprop [--lr-toast-close-button-active-bg=color-mix(in oklab, transparent, var(--lr-color-mix-partner) var(--lr-color-mix-active))] - Background of the enabled close button * while pressed. * @cssprop [--lr-toast-close-button-active-color=var(--lr-color-text)] - Foreground of the enabled * close button while pressed. * @cssprop [--lr-toast-show-duration=var(--lr-transition-base, 180ms ease-out)] - Opacity/transform * transition used while showing. * @cssprop [--lr-toast-hide-duration=var(--lr-transition-base, 180ms ease-out)] - Opacity/transform * transition used while hiding. * @status stable * @since 4.0.0 */ export declare class LyraToastItem extends LyraElement{static styles:import("lit").CSSResultGroup[]; /** Live visible toast surface, or `null` before the render root is populated. */ get toastItemElement():HTMLElement|null; /** Auto-dismiss delay in ms. Set to `Infinity` (or <= 0) to disable. */ duration:number; /** Visual size. Valid upstream `small`/`medium`/`large` values round-trip verbatim while the CSS * maps both spellings onto the same rendered ladder. */ size:LyraToastSize;private get effectiveSize(); /** Severity/variant. */ variant:LyraToastVariant; /** Show the icon slot. */ withIcon:boolean;private timer?;private timerOwner?;private elapsedMs;private startedAt;private timerStarted;private showRafId?;private showRafOwner?;private showGeneration;private showCompletionGeneration;private showCompletionRunning;private showAccepted;private afterShowEmitted;private regionOwner?;private admitted;private requestingRegionAdmission;private cancelShowAnimation?;private cancelHideAnimation?;private hovering;private focused;private pendingFocusRepair?;private focusReturnTarget?;private messageObserver?;private politeSink?;private assertiveSink?;private lastAnnouncedMessage;private readonly onMessageSlotChange;private hideCompletionRunning;private hideGeneration;private afterHideEmitted;private hideRequest?;private messageText;private messageTextTruncated;private hiding;private progressRun;private surfaceMounted;private interactionReady; /** `duration` normalized to a finite, non-negative delay -- *or* `Infinity` verbatim. * `Infinity` is this property's own documented "never auto-dismiss" sentinel (see its doc * comment above), so it must not be coerced into a large-but-finite fallback by * `finiteDuration`'s clamp; only a genuinely invalid raw value (`NaN`, `-Infinity`) falls back * to the constructed default. A finite negative value clamps to `0`, which already means * "disable" per this property's own contract (see `resumeTimer()` below), so that's not a * behavior change either. */ private get safeDuration();protected willUpdate(changed:PropertyValues):void;protected updated(changed:PropertyValues):void;firstUpdated(changed:PropertyValues):void;connectedCallback():void;private requestRegionAdmission;private setSurfaceAvailability;private cancelPendingShow;private scheduleShow;private prepareShow;private completeShow;disconnectedCallback():void;private startTimer;private resumeTimer;private pauseTimer;private clearTimer; /** * Wait for the actual CSS transition/animation on the toast surface. The * computed duration is intentionally read at runtime so a consumer's * `--lr-toast-show-duration`/`--lr-toast-hide-duration` override keeps * lifecycle events and removal in sync with the pixels on screen. A small * timeout remains as a safety net for zero-duration transitions, disabled * animation, and browsers that do not dispatch an end event. */ private waitForVisualCompletion;private onPointerEnter;private onPointerLeave;private onFocusIn;private onFocusOut;private observeMessageNode;private bindMessageObserverTargets;private observeLabelReferenceRoot;private recomputeMessageText;private announceMessage;private get closeLabel(); /** Hide with animation, then remove from the DOM. A vetoed manual request leaves the current * countdown untouched; a vetoed auto-dismiss request restarts the full normalized duration. */ hide():Promise;private requestHide;private completeHide;private repairFocusBeforeRemoval;private adjacentToastOrReturnTarget;private focusAdjacentToastOrReturn;private renderCloseControl;render():TemplateResult;}declare global{interface HTMLElementTagNameMap{'lr-toast-item':LyraToastItem;}}