import * as React from 'react'; export declare const TOAST_VARIANTS: readonly ["neutral", "success", "warning", "error", "loading"]; export type ToastVariant = (typeof TOAST_VARIANTS)[number]; /** * `default` is the maker-ds card. `demo` is the Figma `.demo-notifications` pill, whose layout * restructures at `md` rather than through a prop. */ export declare const TOAST_PRESENTATIONS: readonly ["default", "demo"]; export type ToastPresentation = (typeof TOAST_PRESENTATIONS)[number]; export interface ToastProps extends React.HTMLAttributes { /** Override the variant's icon. Expects a 24×24 glyph. */ icon?: React.ReactNode; title: string; id?: string; description?: React.ReactNode; /** A single action, usually an undo. Dismisses after running unless told not to. */ actionSlot?: React.ReactNode; /** * @default 'neutral' */ variant?: ToastVariant; /** * `demo` is the Figma `.demo-notifications` treatment: a bordered pill with the title and body inline * from `md` up, stacked below it with the boundary moving onto the title. * @default 'default' */ presentation?: ToastPresentation; onDismiss?: () => void; /** * Dismiss when the action is clicked. Turn it off for an action that starts a * multi-step flow inside the toast. * @default true */ dismissActionOnClick?: boolean; } /** * The root. * * **Written as a `cva` rather than as a conditional appended to a shared base, and that is a correction * rather than a tidy-up.** The first version appended the demo classes to the card's own * `px-padding-horizontal-md py-padding-vertical-md rounded-md shadow-md`, which meant `cn()` resolved the * padding in the CARD's favour: the demo pill measured 70px tall against Figma's 46px, and its own * `p-gap-200` generated nothing at all. Class-name assertions could not see it — both names were present * on the element — and it took `measure-story` to find. Exactly one padding, radius and fill set applies * per presentation now. * * `default` is the maker-ds card. 416px is `w-full max-w-104`, not `w-104`: a fixed 416px is wider than a * 320px viewport, so the toast itself forced horizontal scrolling on every narrow screen — 10 of the 61 * reflow failures the exhaustive audit found were that one class. * * `demo` is Figma `.demo-notifications` (22:5320), whose one real mechanism is a **restructure** rather * than a restyle: at the wide breakpoint the root is a bordered 46px pill with the title and body inline, * and at the narrow one the border moves OFF the root and ONTO the title, which becomes its own pill with * the body beneath it. So the bordered element changes identity across the breakpoint — which is why the * root is borderless below `md` and bordered from `md` up, and the title is the mirror image. * * **The breakpoint is CSS, never a prop.** Figma models it as a `Breakpoint` variant; modelling it as a * prop would make the caller responsible for measuring the viewport, and a caller cannot honour it inside * a container narrower than the page. */ declare const toastStyles: (props?: ({ presentation?: "default" | "demo" | null | undefined; } & import("class-variance-authority/types").ClassProp) | undefined) => string; declare const toastIconStyles: (props?: ({ variant?: "error" | "neutral" | "success" | "warning" | "loading" | null | undefined; presentation?: "default" | "demo" | null | undefined; } & import("class-variance-authority/types").ClassProp) | undefined) => string; /** * A transient message about something that has just happened. * * `role="status"` makes it an implicit polite live region, so it is announced when it * appears without interrupting the user. The icon is decorative — the title carries * the meaning, and a screen reader should not hear "warning icon warning". * * **This is the toast itself, not a toast system.** There is no provider, no queue and * no positioning here, because maker-ds has none either: upstream's toast is a * presentational component that a consumer places and dismisses. Queueing, stacking * and auto-dismiss timing are a design problem rather than a port, and inventing them * inside a port task would ship an API nobody specified. * * @example * @example Retry} /> */ export declare const Toast: React.ForwardRefExoticComponent>; export { toastStyles, toastIconStyles }; //# sourceMappingURL=toast.d.ts.map