@mond-design-system/react 4.2.0 → 4.3.0

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.
package/dist/index.cjs CHANGED
@@ -1523,34 +1523,42 @@ function ToastProvider({
1523
1523
  const value = react.useMemo(() => ({ toast, dismiss }), [toast, dismiss]);
1524
1524
  return /* @__PURE__ */ jsxRuntime.jsxs(ToastContext.Provider, { value, children: [
1525
1525
  children,
1526
- /* @__PURE__ */ jsxRuntime.jsx("div", { role: "region", "aria-label": regionLabel, className: Toast_module_default.viewport, children: toasts.map((entry) => /* @__PURE__ */ jsxRuntime.jsxs("div", { role: "status", className: cx(Toast_module_default.toast, Toast_module_default[`tone-${entry.tone}`]), children: [
1527
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: Toast_module_default.body, children: [
1528
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: Toast_module_default.title, children: entry.title }),
1529
- entry.description !== void 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: Toast_module_default.description, children: entry.description })
1530
- ] }),
1531
- entry.action !== void 0 && /* @__PURE__ */ jsxRuntime.jsx(
1532
- "button",
1533
- {
1534
- type: "button",
1535
- className: Toast_module_default.action,
1536
- onClick: () => {
1537
- entry.action?.onClick();
1538
- dismiss(entry.id);
1539
- },
1540
- children: entry.action.label
1541
- }
1542
- ),
1543
- /* @__PURE__ */ jsxRuntime.jsx(
1544
- "button",
1545
- {
1546
- type: "button",
1547
- "aria-label": `${dismissLabel}: ${entry.title}`,
1548
- className: Toast_module_default.close,
1549
- onClick: () => dismiss(entry.id),
1550
- children: /* @__PURE__ */ jsxRuntime.jsx(CloseGlyph, { className: Toast_module_default.closeGlyph })
1551
- }
1552
- )
1553
- ] }, entry.id)) })
1526
+ /* @__PURE__ */ jsxRuntime.jsx("div", { role: "region", "aria-label": regionLabel, className: Toast_module_default.viewport, children: toasts.map((entry) => /* @__PURE__ */ jsxRuntime.jsxs(
1527
+ "div",
1528
+ {
1529
+ role: entry.tone === "danger" ? "alert" : "status",
1530
+ className: cx(Toast_module_default.toast, Toast_module_default[`tone-${entry.tone}`]),
1531
+ children: [
1532
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: Toast_module_default.body, children: [
1533
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: Toast_module_default.title, children: entry.title }),
1534
+ entry.description !== void 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: Toast_module_default.description, children: entry.description })
1535
+ ] }),
1536
+ entry.action !== void 0 && /* @__PURE__ */ jsxRuntime.jsx(
1537
+ "button",
1538
+ {
1539
+ type: "button",
1540
+ className: Toast_module_default.action,
1541
+ onClick: () => {
1542
+ entry.action?.onClick();
1543
+ dismiss(entry.id);
1544
+ },
1545
+ children: entry.action.label
1546
+ }
1547
+ ),
1548
+ /* @__PURE__ */ jsxRuntime.jsx(
1549
+ "button",
1550
+ {
1551
+ type: "button",
1552
+ "aria-label": `${dismissLabel}: ${entry.title}`,
1553
+ className: Toast_module_default.close,
1554
+ onClick: () => dismiss(entry.id),
1555
+ children: /* @__PURE__ */ jsxRuntime.jsx(CloseGlyph, { className: Toast_module_default.closeGlyph })
1556
+ }
1557
+ )
1558
+ ]
1559
+ },
1560
+ entry.id
1561
+ )) })
1554
1562
  ] });
1555
1563
  }
1556
1564