import { type IAnimatable } from '../../../Behaviors/Animatable'; import { ToastPosition } from '../../../Types/ToastPosition'; import { OverlayElement } from '../Abstracts/OverlayElement'; import type { IToastElementProps } from './IToastElementProps'; declare const ToastElement_base: (abstract new (...args: Array) => import("../../../Behaviors/Themeable").IThemeableProps) & (abstract new (...args: Array) => import("../../../Behaviors/Animatable").IAnimatableProps & IAnimatable) & (abstract new (...args: Array) => import("../../../Behaviors/Variantable").IVariantableProps) & (abstract new (...args: Array) => import("../../../Behaviors/TextFormattable").ITextFormattableProps) & (abstract new (...args: Array) => import("../../../Behaviors/Busyable").IBusyableProps) & typeof OverlayElement & import("../../../Behaviors/Themeable").IThemeableCtor; /** * Toast - A transient notification that appears briefly, typically near the edge of the screen. * * @description * Displays temporary messages with configurable position, timeout, and progress indicator. * Header and content text must be set via JavaScript. Only `timeout`, `position`, and * `show-progress` are reflected as HTML attributes. * * @name Toast * @element mosaik-toast * @category Overlays * * @slot actions - The actions slot. * * @csspart backdrop - The backdrop part. * @csspart content - The content part. * @csspart header - The header part. * @csspart progressFill - The progress fill bar that animates from right to left during timeout. * @csspart progressRing - The progressRing part. * @csspart root - The root part. * * @cssprop {String} --toast-background-color - The background color CSS custom property. * @cssprop {String} --toast-border - The border CSS custom property. * @cssprop {String} --toast-border-color - The border color CSS custom property. * @cssprop {String} --toast-border-radius - The border radius CSS custom property. * @cssprop {String} --toast-border-style - The border style CSS custom property. * @cssprop {String} --toast-border-width - The border width CSS custom property. * @cssprop {String} --toast-font-family - The font family CSS custom property. * @cssprop {String} --toast-font-letter-spacing - The font letter spacing CSS custom property. * @cssprop {String} --toast-font-line-height - The font line height CSS custom property. * @cssprop {String} --toast-font-size - The font size CSS custom property. * @cssprop {String} --toast-font-text-decoration - The font text decoration CSS custom property. * @cssprop {String} --toast-font-text-transform - The font text transform CSS custom property. * @cssprop {String} --toast-font-weight - The font weight CSS custom property. * @cssprop {String} --toast-foreground-color - The foreground color CSS custom property. * @cssprop {String} --toast-gap - The gap CSS custom property. * @cssprop {String} --toast-padding-bottom - The padding bottom CSS custom property. * @cssprop {String} --toast-padding-left - The padding left CSS custom property. * @cssprop {String} --toast-padding-right - The padding right CSS custom property. * @cssprop {String} --toast-padding-top - The padding top CSS custom property. * @cssprop {String} --toast-offset-y - The vertical edge offset used for top and bottom positions. * @cssprop {String} --toast-progress-fill-color - The progress fill bar color CSS custom property. * @cssprop {String} --toast-progress-ring-fill-color - The progress ring fill color CSS custom property. * @cssprop {String} --toast-shadow - The shadow CSS custom property. * @cssprop {String} --toast-shadow-blur - The shadow blur CSS custom property. * @cssprop {String} --toast-shadow-color - The shadow color CSS custom property. * @cssprop {String} --toast-shadow-offset-x - The shadow offset x CSS custom property. * @cssprop {String} --toast-shadow-offset-y - The shadow offset y CSS custom property. * @cssprop {String} --toast-shadow-spread - The shadow spread CSS custom property. * @cssprop {String} --toast-transition-duration - The transition duration CSS custom property. * @cssprop {String} --toast-transition-mode - The transition mode CSS custom property. * @cssprop {String} --toast-transition-property - The transition property CSS custom property. * @cssprop {String} --toast-translate - The translate CSS custom property. * * @dependency mosaik-backdrop - The Backdrop element. * @dependency mosaik-button - The Button element. * @dependency mosaik-progress-ring - The Progress Ring element. * @dependency mosaik-stack - The Stack element. * @dependency mosaik-text - The Text element. * * @example * Toast at the top with progress: * ```html * * ``` * * @example * Toast at bottom-center: * ```html * * ``` * * @public */ export declare class ToastElement extends ToastElement_base implements IToastElementProps, IAnimatable { private readonly _timer; private _header; private _content; private _timeout; private _position; private _showProgress; private _fillElement; private _fillAnimation; private _mouseOverSubscription; private _mouseOutSubscription; /** * @public */ constructor(); /** * Returns the `is` property. * The `is` property represents natural name of this element. * * @public * @static * @readonly */ static get is(): string; /** * Gets or sets the `header` property. * * @public */ get header(): string; set header(value: string); /** * Gets or sets the `content` property. * * @public */ get content(): string; set content(value: string); /** * Gets or sets the `timeout` property. * The timeout only when the given value is greater than zero. * * @public * @attr */ get timeout(): number; set timeout(value: number); /** * Gets or sets the `position` property. * * @public * @attr */ get position(): ToastPosition; set position(value: ToastPosition); /** * Gets or sets the `showProgress` property. * * @public * @attr */ get showProgress(): boolean; set showProgress(value: boolean); /** * Gets the animation target element. * For the toast, animations are applied to the root template part instead of the host element. * * @public * @override * @readonly */ get animationTarget(): HTMLElement; /** * Handles the `isOpen` property change. * Starts or stops the timer and fill animation accordingly. * * @protected */ protected onIsOpenPropertyChanged(prev: boolean, next: boolean): void; /** * Closes the `ToastElement`. * * @public * @override */ close(): Promise; /** * @public * @override */ connectedCallback(): void; /** * @public * @override */ disconnectedCallback(): void; /** * @protected * @override */ protected onApplyTemplate(): void; /** * Handles the backdrop click event. * Only closes the toast if `clickOutsideToClose` is enabled. * * @private * @template */ onBackdrop(): void; /** * @protected */ protected onShowProgressPropertyChanged(): void; /** * Starts the progress fill animation that shrinks from right to left. * * @private */ private startFillAnimation; /** * Pauses the fill animation. * * @private */ private pauseFillAnimation; /** * Resumes the fill animation. * * @private */ private resumeFillAnimation; /** * Cancels and resets the fill animation. * * @private */ private cancelFillAnimation; } /** * @public */ export declare namespace ToastElement { type Props = IToastElementProps; } /** * @public */ declare global { interface HTMLElementTagNameMap { 'mosaik-toast': ToastElement; } } export {}; //# sourceMappingURL=ToastElement.d.ts.map