@mond-design-system/react 4.1.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 +38 -28
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.js +38 -28
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1239,6 +1239,7 @@ function SegmentedControl({
|
|
|
1239
1239
|
fullWidth = false,
|
|
1240
1240
|
size = "md",
|
|
1241
1241
|
bare = false,
|
|
1242
|
+
repick = false,
|
|
1242
1243
|
className
|
|
1243
1244
|
}) {
|
|
1244
1245
|
const name = react.useId();
|
|
@@ -1263,6 +1264,7 @@ function SegmentedControl({
|
|
|
1263
1264
|
value: option.value,
|
|
1264
1265
|
checked: option.value === value,
|
|
1265
1266
|
onChange: () => onChange(option.value),
|
|
1267
|
+
onClick: repick && option.value === value ? () => onChange(option.value) : void 0,
|
|
1266
1268
|
disabled,
|
|
1267
1269
|
className: SegmentedControl_module_default.input
|
|
1268
1270
|
}
|
|
@@ -1521,34 +1523,42 @@ function ToastProvider({
|
|
|
1521
1523
|
const value = react.useMemo(() => ({ toast, dismiss }), [toast, dismiss]);
|
|
1522
1524
|
return /* @__PURE__ */ jsxRuntime.jsxs(ToastContext.Provider, { value, children: [
|
|
1523
1525
|
children,
|
|
1524
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { role: "region", "aria-label": regionLabel, className: Toast_module_default.viewport, children: toasts.map((entry) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
entry.
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
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
|
+
)) })
|
|
1552
1562
|
] });
|
|
1553
1563
|
}
|
|
1554
1564
|
|