import { type ReactNode } from 'react'; /** * Peek's Toast (Figma: Alert) and its provider (2026-09-01), verbatim. * * The pill: five types — `success`, `brand`, `neutral`, `warning`, `error` — * a leading icon that says which (a check, a `!`, an `×`), an optional action * on the right. Under Signal every toast is * the same dark overlay pill; the type lives in the icon's colour and glow, * not the surface. * * The provider sits on Base UI's `Toast` since stage 6 of the migration * (2026-09-14). Base UI owns the portal, the timers, the stack and what a * screen reader hears; this file owns how a toast looks and where the stack * stands (bottom-left). **Up to three show at once** (D7): the newest nearest * the corner, a fourth hides the oldest until one of the three closes. Before * stage 6 a new toast replaced the standing one, and nothing announced either. */ export type ToastType = 'success' | 'brand' | 'neutral' | 'warning' | 'error'; export interface ToastProps { label: string; /** * Which of the five this is. It decides the surface in the light themes, * and under Signal — where every pill is the same dark overlay — the icon * and its colour. * * `warning` and `error` arrived at 0.12.2, for a notice that has to stay up * and for one that reports a failure. Until then the set had no way to say * either, so a caller with bad news passed `leadingIcon: false` rather than * put a tick beside it. */ type?: ToastType; /** Show the leading icon — a check, a `!` or an `×`, per `type`. Defaults to true. */ leadingIcon?: boolean; /** When set together with onAction, renders a clickable action on the right side. */ actionLabel?: string; onAction?: () => void; className?: string; } /** * One toast, drawn in place. What the provider shows is this pill; draw it * yourself only where a page needs a toast's look without its timing — a * story, a picture of the set. */ export declare function Toast({ label, type, leadingIcon, actionLabel, onAction, className }: ToastProps): import("react").JSX.Element; export interface ToastOptions { label: string; /** Which of the five this is — it decides the surface and the leading icon. Defaults to 'neutral'. */ type?: ToastType; /** * Renders an action on the right side. Pressing it runs `onAction`, if * given, and closes this toast — so a Dismiss needs only its label. */ actionLabel?: string; onAction?: () => void; /** Show the leading icon — a check, a `!` or an `×`, per `type`. Defaults to true. */ leadingIcon?: boolean; /** Auto-dismiss after this many ms. Defaults to 5000. Pass 0 to disable. */ durationMs?: number; } interface ToastValue { /** Shows a toast and returns its id, for `dismissToast`. */ showToast: (opts: ToastOptions) => string; /** Closes the toast with this id; with no id, closes every toast on screen. */ dismissToast: (id?: string) => void; } /** Mount once, near the top of an app. It owns the stack, the timers and the * portal every toast goes through, and it is what `useToast` talks to. Three * show at once; a fourth waits for one of them to close. */ export declare function ToastProvider({ children }: { children: ReactNode; }): import("react").JSX.Element; /** How anything under a `ToastProvider` raises a toast (`showToast`) or takes * one away (`dismissToast`). Throws outside a provider. */ export declare function useToast(): ToastValue; export {}; //# sourceMappingURL=Toast.d.ts.map