@sereno-ds/ui 0.25.2 → 0.25.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
3
  import * as React from "react";
4
4
  import { createPortal } from "react-dom";
5
5
  import { Toast } from "./Toast";
@@ -8,11 +8,22 @@ const ToastContext = React.createContext(null);
8
8
  const EXIT_MS = 180;
9
9
  let seq = 0;
10
10
  const nextId = () => `t${Date.now().toString(36)}-${(seq++).toString(36)}`;
11
+ const srOnlyStyle = {
12
+ position: "absolute",
13
+ width: 1,
14
+ height: 1,
15
+ overflow: "hidden",
16
+ clip: "rect(0 0 0 0)",
17
+ clipPath: "inset(50%)",
18
+ whiteSpace: "nowrap"
19
+ };
11
20
  const norm = (msg) => typeof msg === "string" ? { title: msg } : msg;
12
21
  const timed = (ms) => ms > 0 && Number.isFinite(ms);
13
22
  function ToastProvider({ children, position = "bottom-right", max = 3, duration = 4e3 }) {
14
23
  const [entries, setEntries] = React.useState([]);
15
24
  const [pausedIds, setPausedIds] = React.useState(() => /* @__PURE__ */ new Set());
25
+ const [politeMsg, setPoliteMsg] = React.useState("");
26
+ const [assertiveMsg, setAssertiveMsg] = React.useState("");
16
27
  const [mounted, setMounted] = React.useState(false);
17
28
  React.useEffect(() => setMounted(true), []);
18
29
  const timers = React.useRef(/* @__PURE__ */ new Map());
@@ -67,6 +78,9 @@ function ToastProvider({ children, position = "bottom-right", max = 3, duration
67
78
  (opts) => {
68
79
  const id = nextId();
69
80
  const ms = opts.duration ?? duration;
81
+ const announced = [opts.title, opts.description].filter(Boolean).join(". ");
82
+ if (opts.tone === "error") setAssertiveMsg(announced);
83
+ else setPoliteMsg(announced);
70
84
  setEntries((list) => {
71
85
  const next = [...list, { ...opts, id, ms }];
72
86
  while (next.filter((e) => !e.leaving).length > max) {
@@ -143,6 +157,13 @@ function ToastProvider({ children, position = "bottom-right", max = 3, duration
143
157
  });
144
158
  return /* @__PURE__ */ jsxs(ToastContext.Provider, { value, children: [
145
159
  children,
160
+ mounted && createPortal(
161
+ /* @__PURE__ */ jsxs(Fragment, { children: [
162
+ /* @__PURE__ */ jsx("div", { "aria-live": "polite", "aria-atomic": "true", style: srOnlyStyle, children: politeMsg }),
163
+ /* @__PURE__ */ jsx("div", { "aria-live": "assertive", "aria-atomic": "true", style: srOnlyStyle, children: assertiveMsg })
164
+ ] }),
165
+ document.body
166
+ ),
146
167
  mounted && entries.length > 0 && createPortal(
147
168
  /* @__PURE__ */ jsx("div", { role: "region", "aria-label": "Notifications", style: viewport, children: entries.map((e) => /* @__PURE__ */ jsx(
148
169
  "div",
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/feedback/ToastProvider.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { createPortal } from 'react-dom';\nimport { Toast, type ToastProps } from './Toast';\nimport { sx } from '../_internal/style';\n\n/**\n * The toast *system* — a portal viewport plus a queue — layered on top of the\n * presentational `Toast`. Wrap the app once:\n *\n * ```tsx\n * <ToastProvider position=\"bottom-right\">\n * <App />\n * </ToastProvider>\n * ```\n *\n * then fire from anywhere under it:\n *\n * ```tsx\n * const { toast, dismiss } = useToast();\n * toast.success('Booking confirmed', { description: 'The client was notified.' });\n * toast('Link copied'); // neutral, title only\n * const id = toast.info('Syncing…', { duration: 0 }); // sticks until dismiss(id)\n * ```\n *\n * Toasts stack (newest nearest the edge), show a countdown bar, auto-dismiss\n * after `duration`, pause that timer (and the bar) while hovered/focused, and\n * cap at `max` — the oldest drops. Needs the `sereno-toast-*` keyframes from\n * `@sereno-ds/ui/styles.css`.\n */\n\ntype Tone = NonNullable<ToastProps['tone']>;\n\nexport interface ToastOptions {\n title: string;\n description?: string;\n tone?: Tone;\n icon?: React.ReactNode;\n /** Inline control on the right — an \"Undo\" / \"View\" `Button variant=\"link\"`. */\n action?: React.ReactNode;\n /** ms until auto-dismiss. `0` (or `Infinity`) keeps it until dismissed. Defaults to the provider's `duration`. */\n duration?: number;\n}\n\n/** `msg` shorthand: a bare string becomes the `title`; an object is the full options. */\nexport type ToastInput = string | ToastOptions;\n\ntype ToneFn = (msg: ToastInput, opts?: Partial<ToastOptions>) => string;\n\nexport interface ToastApi {\n /** `toast('Saved')` or `toast('Saved', { description, action, duration })`. Neutral tone. */\n (msg: ToastInput, opts?: Partial<ToastOptions>): string;\n success: ToneFn;\n error: ToneFn;\n warning: ToneFn;\n info: ToneFn;\n neutral: ToneFn;\n}\n\nexport interface ToastContextValue {\n toast: ToastApi;\n /** `dismiss(id)` removes one; `dismiss()` clears them all. */\n dismiss: (id?: string) => void;\n}\n\nconst ToastContext = React.createContext<ToastContextValue | null>(null);\n\nexport type ToastPosition =\n | 'bottom-right'\n | 'bottom-left'\n | 'bottom-center'\n | 'top-right'\n | 'top-left'\n | 'top-center';\n\nexport interface ToastProviderProps {\n children: React.ReactNode;\n /** Viewport corner. Default `bottom-right`. */\n position?: ToastPosition;\n /** Most toasts on screen at once; the oldest drops when a new one arrives. Default `3`. */\n max?: number;\n /** Default auto-dismiss, in ms. Default `4000`. */\n duration?: number;\n}\n\ninterface Entry extends ToastOptions {\n id: string;\n /** Resolved auto-dismiss (ms) — `opts.duration ?? provider duration`. `0` / `Infinity` = sticky. */\n ms: number;\n leaving?: boolean;\n}\n\nconst EXIT_MS = 180;\nlet seq = 0;\nconst nextId = () => `t${Date.now().toString(36)}-${(seq++).toString(36)}`;\n\nconst norm = (msg: ToastInput): Partial<ToastOptions> => (typeof msg === 'string' ? { title: msg } : msg);\nconst timed = (ms: number) => ms > 0 && Number.isFinite(ms);\n\nexport function ToastProvider({ children, position = 'bottom-right', max = 3, duration = 4000 }: ToastProviderProps) {\n const [entries, setEntries] = React.useState<Entry[]>([]);\n const [pausedIds, setPausedIds] = React.useState<ReadonlySet<string>>(() => new Set());\n\n const [mounted, setMounted] = React.useState(false);\n // eslint-disable-next-line react-hooks/set-state-in-effect -- portal target is client-only\n React.useEffect(() => setMounted(true), []);\n\n // Per-toast auto-dismiss timers, so hover/focus can pause and resume them.\n const timers = React.useRef(new Map<string, { handle: ReturnType<typeof setTimeout>; endsAt: number; left: number }>());\n\n const forget = React.useCallback((id: string) => {\n setPausedIds((s) => {\n if (!s.has(id)) return s;\n const n = new Set(s);\n n.delete(id);\n return n;\n });\n }, []);\n\n const drop = React.useCallback(\n (id: string) => {\n const t = timers.current.get(id);\n if (t) clearTimeout(t.handle);\n timers.current.delete(id);\n setEntries((list) => list.map((e) => (e.id === id ? { ...e, leaving: true } : e)));\n setTimeout(() => {\n setEntries((list) => list.filter((e) => e.id !== id));\n forget(id);\n }, EXIT_MS);\n },\n [forget],\n );\n\n const arm = React.useCallback(\n (id: string, ms: number) => {\n if (!timed(ms)) return;\n const handle = setTimeout(() => drop(id), ms);\n timers.current.set(id, { handle, endsAt: Date.now() + ms, left: ms });\n },\n [drop],\n );\n\n const pause = React.useCallback((id: string) => {\n const t = timers.current.get(id);\n if (!t) return;\n clearTimeout(t.handle);\n t.left = Math.max(0, t.endsAt - Date.now());\n setPausedIds((s) => (s.has(id) ? s : new Set(s).add(id)));\n }, []);\n\n const resume = React.useCallback(\n (id: string) => {\n const t = timers.current.get(id);\n if (t) {\n t.handle = setTimeout(() => drop(id), t.left);\n t.endsAt = Date.now() + t.left;\n }\n forget(id);\n },\n [drop, forget],\n );\n\n const add = React.useCallback(\n (opts: ToastOptions) => {\n const id = nextId();\n const ms = opts.duration ?? duration;\n setEntries((list) => {\n const next: Entry[] = [...list, { ...opts, id, ms }];\n // Cap: hard-drop the oldest that isn't already leaving.\n while (next.filter((e) => !e.leaving).length > max) {\n const victim = next.find((e) => !e.leaving);\n if (!victim) break;\n const vt = timers.current.get(victim.id);\n if (vt) clearTimeout(vt.handle);\n timers.current.delete(victim.id);\n victim.leaving = true;\n setTimeout(() => {\n setEntries((l) => l.filter((e) => e.id !== victim.id));\n forget(victim.id);\n }, EXIT_MS);\n }\n return next;\n });\n arm(id, ms);\n return id;\n },\n [arm, duration, forget, max],\n );\n\n // Tone-specific methods always paint their tone; bare `toast(...)` respects a\n // `tone` in the message / options and otherwise stays neutral.\n const fire = React.useCallback(\n (msg: ToastInput, opts?: Partial<ToastOptions>, tone?: Tone) =>\n add({ title: '', ...norm(msg), ...opts, ...(tone ? { tone } : {}) } as ToastOptions),\n [add],\n );\n\n /* eslint-disable react-hooks/refs -- `fire` transitively reaches the `timers` ref, but only when a\n consumer invokes toast.*() from an event handler — never during render. `useMemo` just keeps\n the callable API object's identity stable. */\n const toast = React.useMemo<ToastApi>(() => {\n const base = (msg: ToastInput, opts?: Partial<ToastOptions>) => fire(msg, opts);\n const make = (tone: Tone): ToneFn => (msg, opts) => fire(msg, opts, tone);\n return Object.assign(base, {\n success: make('success'),\n error: make('error'),\n warning: make('warning'),\n info: make('info'),\n neutral: make('neutral'),\n }) as ToastApi;\n }, [fire]);\n /* eslint-enable react-hooks/refs */\n\n const dismiss = React.useCallback(\n (id?: string) => {\n if (id) {\n drop(id);\n return;\n }\n entries.forEach((e) => !e.leaving && drop(e.id));\n },\n [drop, entries],\n );\n\n const value = React.useMemo<ToastContextValue>(() => ({ toast, dismiss }), [toast, dismiss]);\n\n // Clear every pending timer on unmount.\n React.useEffect(() => {\n const map = timers.current;\n return () => map.forEach((t) => clearTimeout(t.handle));\n }, []);\n\n const [edge, side] = position.split('-') as ['top' | 'bottom', 'right' | 'left' | 'center'];\n const viewport = sx({\n position: 'fixed',\n zIndex: 1200,\n display: 'flex',\n // Newest nearest the anchored edge: normal flow for bottom, reversed for top.\n flexDirection: edge === 'bottom' ? 'column' : 'column-reverse',\n gap: 'var(--space-3)',\n width: 'min(420px, calc(100vw - var(--space-8)))',\n maxHeight: '100dvh',\n padding: 'var(--space-4)',\n pointerEvents: 'none',\n [edge]: 0,\n // Every toast is full-width of the viewport, so the stack edges line up on\n // any side; `alignItems` only matters if a toast were ever narrower.\n alignItems: 'stretch',\n // An *outer* offset on top of the padding above, not just the padding\n // itself — macOS Safari's overlay scrollbar floats over the page rather\n // than reducing its width, so a left/right edge flush at 0 can end up\n // with the scrollbar painted right where the padding was supposed to be\n // the toast's only clearance from the edge.\n ...(side === 'center' ? { left: '50%', transform: 'translateX(-50%)' } : { [side]: 'var(--space-2)' }),\n });\n\n return (\n <ToastContext.Provider value={value}>\n {children}\n {mounted &&\n entries.length > 0 &&\n createPortal(\n <div role=\"region\" aria-label=\"Notifications\" style={viewport}>\n {entries.map((e) => (\n <div\n key={e.id}\n className=\"sereno-toast-item\"\n data-edge={edge}\n data-leaving={e.leaving ? 'true' : undefined}\n onMouseEnter={() => pause(e.id)}\n onMouseLeave={() => resume(e.id)}\n onFocusCapture={() => pause(e.id)}\n onBlurCapture={() => resume(e.id)}\n style={sx({ pointerEvents: 'auto', width: '100%' })}\n >\n <Toast\n tone={e.tone}\n title={e.title}\n description={e.description}\n icon={e.icon}\n action={e.action}\n role={e.tone === 'error' ? 'alert' : 'status'}\n onClose={() => drop(e.id)}\n progress={timed(e.ms) && !e.leaving ? { ms: e.ms, paused: pausedIds.has(e.id) } : undefined}\n style={{ width: '100%', maxWidth: 'none' }}\n />\n </div>\n ))}\n </div>,\n document.body,\n )}\n </ToastContext.Provider>\n );\n}\n\nexport function useToast(): ToastContextValue {\n const ctx = React.useContext(ToastContext);\n if (!ctx) throw new Error('useToast() must be called inside <ToastProvider>.');\n return ctx;\n}\n"],"mappings":";AAkQI,SAkBY,KAlBZ;AAhQJ,YAAY,WAAW;AACvB,SAAS,oBAAoB;AAC7B,SAAS,aAA8B;AACvC,SAAS,UAAU;AA6DnB,MAAM,eAAe,MAAM,cAAwC,IAAI;AA2BvE,MAAM,UAAU;AAChB,IAAI,MAAM;AACV,MAAM,SAAS,MAAM,IAAI,KAAK,IAAI,EAAE,SAAS,EAAE,CAAC,KAAK,OAAO,SAAS,EAAE,CAAC;AAExE,MAAM,OAAO,CAAC,QAA4C,OAAO,QAA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A;AAAA,cACC,MAAM,EAAE;AAAA,cACR,OAAO,EAAE;AAAA,cACT,aAAa,EAAE;AAAA,cACf,MAAM,EAAE;AAAA,cACR,QAAQ,EAAE;AAAA,cACV,MAAM,EAAE,SAAS,UAAU,UAAU;AAAA,cACrC,SAAS,MAAM,KAAK,EAAE,EAAE;AAAA,cACxB,UAAU,MAAM,EAAE,EAAE,KAAK,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,QAAQ,UAAU,IAAI,EAAE,EAAE,EAAE,IAAI;AAAA,cAClF,OAAO,EAAE,OAAO,QAAQ,UAAU,OAAO;AAAA;AAAA,UAC3C;AAAA;AAAA,QApBK,EAAE;AAAA,MAqBT,CACD,GACH;AAAA,MACA,SAAS;AAAA,IACX;AAAA,KACJ;AAEJ;AAEO,SAAS,WAA8B;AAC5C,QAAM,MAAM,MAAM,WAAW,YAAY;AACzC,MAAI,CAAC,IAAK,OAAM,IAAI,MAAM,mDAAmD;AAC7E,SAAO;AACT;","names":[]}
1
+ {"version":3,"sources":["../../src/feedback/ToastProvider.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { createPortal } from 'react-dom';\nimport { Toast, type ToastProps } from './Toast';\nimport { sx } from '../_internal/style';\n\n/**\n * The toast *system* — a portal viewport plus a queue — layered on top of the\n * presentational `Toast`. Wrap the app once:\n *\n * ```tsx\n * <ToastProvider position=\"bottom-right\">\n * <App />\n * </ToastProvider>\n * ```\n *\n * then fire from anywhere under it:\n *\n * ```tsx\n * const { toast, dismiss } = useToast();\n * toast.success('Booking confirmed', { description: 'The client was notified.' });\n * toast('Link copied'); // neutral, title only\n * const id = toast.info('Syncing…', { duration: 0 }); // sticks until dismiss(id)\n * ```\n *\n * Toasts stack (newest nearest the edge), show a countdown bar, auto-dismiss\n * after `duration`, pause that timer (and the bar) while hovered/focused, and\n * cap at `max` — the oldest drops. Needs the `sereno-toast-*` keyframes from\n * `@sereno-ds/ui/styles.css`.\n */\n\ntype Tone = NonNullable<ToastProps['tone']>;\n\nexport interface ToastOptions {\n title: string;\n description?: string;\n tone?: Tone;\n icon?: React.ReactNode;\n /** Inline control on the right — an \"Undo\" / \"View\" `Button variant=\"link\"`. */\n action?: React.ReactNode;\n /** ms until auto-dismiss. `0` (or `Infinity`) keeps it until dismissed. Defaults to the provider's `duration`. */\n duration?: number;\n}\n\n/** `msg` shorthand: a bare string becomes the `title`; an object is the full options. */\nexport type ToastInput = string | ToastOptions;\n\ntype ToneFn = (msg: ToastInput, opts?: Partial<ToastOptions>) => string;\n\nexport interface ToastApi {\n /** `toast('Saved')` or `toast('Saved', { description, action, duration })`. Neutral tone. */\n (msg: ToastInput, opts?: Partial<ToastOptions>): string;\n success: ToneFn;\n error: ToneFn;\n warning: ToneFn;\n info: ToneFn;\n neutral: ToneFn;\n}\n\nexport interface ToastContextValue {\n toast: ToastApi;\n /** `dismiss(id)` removes one; `dismiss()` clears them all. */\n dismiss: (id?: string) => void;\n}\n\nconst ToastContext = React.createContext<ToastContextValue | null>(null);\n\nexport type ToastPosition =\n | 'bottom-right'\n | 'bottom-left'\n | 'bottom-center'\n | 'top-right'\n | 'top-left'\n | 'top-center';\n\nexport interface ToastProviderProps {\n children: React.ReactNode;\n /** Viewport corner. Default `bottom-right`. */\n position?: ToastPosition;\n /** Most toasts on screen at once; the oldest drops when a new one arrives. Default `3`. */\n max?: number;\n /** Default auto-dismiss, in ms. Default `4000`. */\n duration?: number;\n}\n\ninterface Entry extends ToastOptions {\n id: string;\n /** Resolved auto-dismiss (ms) — `opts.duration ?? provider duration`. `0` / `Infinity` = sticky. */\n ms: number;\n leaving?: boolean;\n}\n\nconst EXIT_MS = 180;\nlet seq = 0;\nconst nextId = () => `t${Date.now().toString(36)}-${(seq++).toString(36)}`;\n\n// Same visually-hidden shape as Table's <caption> (see Table.tsx's srOnlyStyle).\nconst srOnlyStyle: React.CSSProperties = {\n position: 'absolute',\n width: 1,\n height: 1,\n overflow: 'hidden',\n clip: 'rect(0 0 0 0)',\n clipPath: 'inset(50%)',\n whiteSpace: 'nowrap',\n};\n\nconst norm = (msg: ToastInput): Partial<ToastOptions> => (typeof msg === 'string' ? { title: msg } : msg);\nconst timed = (ms: number) => ms > 0 && Number.isFinite(ms);\n\nexport function ToastProvider({ children, position = 'bottom-right', max = 3, duration = 4000 }: ToastProviderProps) {\n const [entries, setEntries] = React.useState<Entry[]>([]);\n const [pausedIds, setPausedIds] = React.useState<ReadonlySet<string>>(() => new Set());\n // A live region announces a *change* to already-present content — a node\n // that mounts fresh with its text already inside it (which is what each\n // visual Toast card below does) is not reliably announced by screen\n // readers, across browsers/AT. So the actual announcement runs through two\n // persistent, visually-hidden regions instead (one polite, one assertive\n // for errors) that stay mounted the whole time `ToastProvider` is, and\n // just get their text replaced on every toast.\n const [politeMsg, setPoliteMsg] = React.useState('');\n const [assertiveMsg, setAssertiveMsg] = React.useState('');\n\n const [mounted, setMounted] = React.useState(false);\n // eslint-disable-next-line react-hooks/set-state-in-effect -- portal target is client-only\n React.useEffect(() => setMounted(true), []);\n\n // Per-toast auto-dismiss timers, so hover/focus can pause and resume them.\n const timers = React.useRef(new Map<string, { handle: ReturnType<typeof setTimeout>; endsAt: number; left: number }>());\n\n const forget = React.useCallback((id: string) => {\n setPausedIds((s) => {\n if (!s.has(id)) return s;\n const n = new Set(s);\n n.delete(id);\n return n;\n });\n }, []);\n\n const drop = React.useCallback(\n (id: string) => {\n const t = timers.current.get(id);\n if (t) clearTimeout(t.handle);\n timers.current.delete(id);\n setEntries((list) => list.map((e) => (e.id === id ? { ...e, leaving: true } : e)));\n setTimeout(() => {\n setEntries((list) => list.filter((e) => e.id !== id));\n forget(id);\n }, EXIT_MS);\n },\n [forget],\n );\n\n const arm = React.useCallback(\n (id: string, ms: number) => {\n if (!timed(ms)) return;\n const handle = setTimeout(() => drop(id), ms);\n timers.current.set(id, { handle, endsAt: Date.now() + ms, left: ms });\n },\n [drop],\n );\n\n const pause = React.useCallback((id: string) => {\n const t = timers.current.get(id);\n if (!t) return;\n clearTimeout(t.handle);\n t.left = Math.max(0, t.endsAt - Date.now());\n setPausedIds((s) => (s.has(id) ? s : new Set(s).add(id)));\n }, []);\n\n const resume = React.useCallback(\n (id: string) => {\n const t = timers.current.get(id);\n if (t) {\n t.handle = setTimeout(() => drop(id), t.left);\n t.endsAt = Date.now() + t.left;\n }\n forget(id);\n },\n [drop, forget],\n );\n\n const add = React.useCallback(\n (opts: ToastOptions) => {\n const id = nextId();\n const ms = opts.duration ?? duration;\n const announced = [opts.title, opts.description].filter(Boolean).join('. ');\n if (opts.tone === 'error') setAssertiveMsg(announced);\n else setPoliteMsg(announced);\n setEntries((list) => {\n const next: Entry[] = [...list, { ...opts, id, ms }];\n // Cap: hard-drop the oldest that isn't already leaving.\n while (next.filter((e) => !e.leaving).length > max) {\n const victim = next.find((e) => !e.leaving);\n if (!victim) break;\n const vt = timers.current.get(victim.id);\n if (vt) clearTimeout(vt.handle);\n timers.current.delete(victim.id);\n victim.leaving = true;\n setTimeout(() => {\n setEntries((l) => l.filter((e) => e.id !== victim.id));\n forget(victim.id);\n }, EXIT_MS);\n }\n return next;\n });\n arm(id, ms);\n return id;\n },\n [arm, duration, forget, max],\n );\n\n // Tone-specific methods always paint their tone; bare `toast(...)` respects a\n // `tone` in the message / options and otherwise stays neutral.\n const fire = React.useCallback(\n (msg: ToastInput, opts?: Partial<ToastOptions>, tone?: Tone) =>\n add({ title: '', ...norm(msg), ...opts, ...(tone ? { tone } : {}) } as ToastOptions),\n [add],\n );\n\n /* eslint-disable react-hooks/refs -- `fire` transitively reaches the `timers` ref, but only when a\n consumer invokes toast.*() from an event handler — never during render. `useMemo` just keeps\n the callable API object's identity stable. */\n const toast = React.useMemo<ToastApi>(() => {\n const base = (msg: ToastInput, opts?: Partial<ToastOptions>) => fire(msg, opts);\n const make = (tone: Tone): ToneFn => (msg, opts) => fire(msg, opts, tone);\n return Object.assign(base, {\n success: make('success'),\n error: make('error'),\n warning: make('warning'),\n info: make('info'),\n neutral: make('neutral'),\n }) as ToastApi;\n }, [fire]);\n /* eslint-enable react-hooks/refs */\n\n const dismiss = React.useCallback(\n (id?: string) => {\n if (id) {\n drop(id);\n return;\n }\n entries.forEach((e) => !e.leaving && drop(e.id));\n },\n [drop, entries],\n );\n\n const value = React.useMemo<ToastContextValue>(() => ({ toast, dismiss }), [toast, dismiss]);\n\n // Clear every pending timer on unmount.\n React.useEffect(() => {\n const map = timers.current;\n return () => map.forEach((t) => clearTimeout(t.handle));\n }, []);\n\n const [edge, side] = position.split('-') as ['top' | 'bottom', 'right' | 'left' | 'center'];\n const viewport = sx({\n position: 'fixed',\n zIndex: 1200,\n display: 'flex',\n // Newest nearest the anchored edge: normal flow for bottom, reversed for top.\n flexDirection: edge === 'bottom' ? 'column' : 'column-reverse',\n gap: 'var(--space-3)',\n width: 'min(420px, calc(100vw - var(--space-8)))',\n maxHeight: '100dvh',\n padding: 'var(--space-4)',\n pointerEvents: 'none',\n [edge]: 0,\n // Every toast is full-width of the viewport, so the stack edges line up on\n // any side; `alignItems` only matters if a toast were ever narrower.\n alignItems: 'stretch',\n // An *outer* offset on top of the padding above, not just the padding\n // itself — macOS Safari's overlay scrollbar floats over the page rather\n // than reducing its width, so a left/right edge flush at 0 can end up\n // with the scrollbar painted right where the padding was supposed to be\n // the toast's only clearance from the edge.\n ...(side === 'center' ? { left: '50%', transform: 'translateX(-50%)' } : { [side]: 'var(--space-2)' }),\n });\n\n return (\n <ToastContext.Provider value={value}>\n {children}\n {mounted &&\n createPortal(\n <>\n <div aria-live=\"polite\" aria-atomic=\"true\" style={srOnlyStyle}>\n {politeMsg}\n </div>\n <div aria-live=\"assertive\" aria-atomic=\"true\" style={srOnlyStyle}>\n {assertiveMsg}\n </div>\n </>,\n document.body,\n )}\n {mounted &&\n entries.length > 0 &&\n createPortal(\n <div role=\"region\" aria-label=\"Notifications\" style={viewport}>\n {entries.map((e) => (\n <div\n key={e.id}\n className=\"sereno-toast-item\"\n data-edge={edge}\n data-leaving={e.leaving ? 'true' : undefined}\n onMouseEnter={() => pause(e.id)}\n onMouseLeave={() => resume(e.id)}\n onFocusCapture={() => pause(e.id)}\n onBlurCapture={() => resume(e.id)}\n style={sx({ pointerEvents: 'auto', width: '100%' })}\n >\n <Toast\n tone={e.tone}\n title={e.title}\n description={e.description}\n icon={e.icon}\n action={e.action}\n role={e.tone === 'error' ? 'alert' : 'status'}\n onClose={() => drop(e.id)}\n progress={timed(e.ms) && !e.leaving ? { ms: e.ms, paused: pausedIds.has(e.id) } : undefined}\n style={{ width: '100%', maxWidth: 'none' }}\n />\n </div>\n ))}\n </div>,\n document.body,\n )}\n </ToastContext.Provider>\n );\n}\n\nexport function useToast(): ToastContextValue {\n const ctx = React.useContext(ToastContext);\n if (!ctx) throw new Error('useToast() must be called inside <ToastProvider>.');\n return ctx;\n}\n"],"mappings":";AA6RU,mBACE,KADF;AA3RV,YAAY,WAAW;AACvB,SAAS,oBAAoB;AAC7B,SAAS,aAA8B;AACvC,SAAS,UAAU;AA6DnB,MAAM,eAAe,MAAM,cAAwC,IAAI;AA2BvE,MAAM,UAAU;AAChB,IAAI,MAAM;AACV,MAAM,SAAS,MAAM,IAAI,KAAK,IAAI,EAAE,SAAS,EAAE,CAAC,KAAK,OAAO,SAAS,EAAE,CAAC;AAGxE,MAAM,cAAmC;AAAA,EACvC,UAAU;AAAA,EACV,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,MAAM;AAAA,EACN,UAAU;AAAA,EACV,YAAY;AACd;AAEA,MAAM,OAAO,CAAC,QAA4C,OAAO,QAAQ,WAAW,EAAE,OAAO,IAAI,IAAI;AACrG,MAAM,QAAQ,CAAC,OAAe,KAAK,KAAK,OAAO,SAAS,EAAE;AAEnD,SAAS,cAAc,EAAE,UAAU,WAAW,gBAAgB,MAAM,GAAG,WAAW,IAAK,GAAuB;AACnH,QAAM,CAAC,SAAS,UAAU,IAAI,MAAM,SAAkB,CAAC,CAAC;AACxD,QAAM,CAAC,WAAW,YA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cAAc,MAAM,OAAO,EAAE,EAAE;AAAA,UAC/B,gBAAgB,MAAM,MAAM,EAAE,EAAE;AAAA,UAChC,eAAe,MAAM,OAAO,EAAE,EAAE;AAAA,UAChC,OAAO,GAAG,EAAE,eAAe,QAAQ,OAAO,OAAO,CAAC;AAAA,UAElD;AAAA,YAAC;AAAA;AAAA,cACC,MAAM,EAAE;AAAA,cACR,OAAO,EAAE;AAAA,cACT,aAAa,EAAE;AAAA,cACf,MAAM,EAAE;AAAA,cACR,QAAQ,EAAE;AAAA,cACV,MAAM,EAAE,SAAS,UAAU,UAAU;AAAA,cACrC,SAAS,MAAM,KAAK,EAAE,EAAE;AAAA,cACxB,UAAU,MAAM,EAAE,EAAE,KAAK,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,QAAQ,UAAU,IAAI,EAAE,EAAE,EAAE,IAAI;AAAA,cAClF,OAAO,EAAE,OAAO,QAAQ,UAAU,OAAO;AAAA;AAAA,UAC3C;AAAA;AAAA,QApBK,EAAE;AAAA,MAqBT,CACD,GACH;AAAA,MACA,SAAS;AAAA,IACX;AAAA,KACJ;AAEJ;AAEO,SAAS,WAA8B;AAC5C,QAAM,MAAM,MAAM,WAAW,YAAY;AACzC,MAAI,CAAC,IAAK,OAAM,IAAI,MAAM,mDAAmD;AAC7E,SAAO;AACT;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sereno-ds/ui",
3
- "version": "0.25.2",
3
+ "version": "0.25.3",
4
4
  "description": "Sereno Design System — React primitives (token-driven, inline styles, no UI base lib).",
5
5
  "license": "MIT",
6
6
  "author": "Sereno",