@movable/ui 1.15.1-alpha.0 → 1.15.1
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/lib/index.mjs +67 -67
- package/lib/index.mjs.map +1 -1
- package/package.json +1 -1
package/lib/index.mjs
CHANGED
|
@@ -2,7 +2,7 @@ var ut = Object.defineProperty;
|
|
|
2
2
|
var dt = (r, n, i) => n in r ? ut(r, n, { enumerable: !0, configurable: !0, writable: !0, value: i }) : r[n] = i;
|
|
3
3
|
var he = (r, n, i) => dt(r, typeof n != "symbol" ? n + "" : n, i);
|
|
4
4
|
import _e, { useRef as Oe, useState as re, useEffect as vr, Children as mr, isValidElement as Be, cloneElement as ir } from "react";
|
|
5
|
-
import { Typography as V, Tooltip as kr, Chip as
|
|
5
|
+
import { Typography as V, Tooltip as kr, Chip as ye, Box as N, Menu as Cr, MenuItem as xe, Button as J, Dialog as pt, IconButton as Mr, Icon as le, DialogTitle as ft, Stack as z, DialogActions as gt, CircularProgress as lr, styled as ht, Drawer as bt, AppBar as yt, useScrollTrigger as xt, Breadcrumbs as vt, Link as mt, RadioGroup as kt, FormControlLabel as jr, Radio as Ct, Card as Mt, Switch as sr, ToggleButton as Ar, ToggleButtonGroup as wr, ListSubheader as jt, FormControl as At, InputLabel as wt, Select as St, FormHelperText as Rt } from "@mui/material";
|
|
6
6
|
import { WarningAmberRounded as Tt, ReportRounded as Et } from "@mui/icons-material";
|
|
7
7
|
import It from "@mui/material/Paper";
|
|
8
8
|
import cr from "@mui/material/Stack";
|
|
@@ -31,9 +31,9 @@ function zt() {
|
|
|
31
31
|
if (pr) return ae;
|
|
32
32
|
pr = 1;
|
|
33
33
|
var r = _e, n = Symbol.for("react.element"), i = Symbol.for("react.fragment"), l = Object.prototype.hasOwnProperty, d = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, c = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
34
|
-
function m(g, p,
|
|
34
|
+
function m(g, p, y) {
|
|
35
35
|
var u, k = {}, h = null, C = null;
|
|
36
|
-
|
|
36
|
+
y !== void 0 && (h = "" + y), p.key !== void 0 && (h = "" + p.key), p.ref !== void 0 && (C = p.ref);
|
|
37
37
|
for (u in p) l.call(p, u) && !c.hasOwnProperty(u) && (k[u] = p[u]);
|
|
38
38
|
if (g && g.defaultProps) for (u in p = g.defaultProps, p) k[u] === void 0 && (k[u] = p[u]);
|
|
39
39
|
return { $$typeof: n, type: g, key: h, ref: C, props: k, _owner: d.current };
|
|
@@ -53,7 +53,7 @@ var ie = {};
|
|
|
53
53
|
var fr;
|
|
54
54
|
function Wt() {
|
|
55
55
|
return fr || (fr = 1, process.env.NODE_ENV !== "production" && function() {
|
|
56
|
-
var r = _e, n = Symbol.for("react.element"), i = Symbol.for("react.portal"), l = Symbol.for("react.fragment"), d = Symbol.for("react.strict_mode"), c = Symbol.for("react.profiler"), m = Symbol.for("react.provider"), g = Symbol.for("react.context"), p = Symbol.for("react.forward_ref"),
|
|
56
|
+
var r = _e, n = Symbol.for("react.element"), i = Symbol.for("react.portal"), l = Symbol.for("react.fragment"), d = Symbol.for("react.strict_mode"), c = Symbol.for("react.profiler"), m = Symbol.for("react.provider"), g = Symbol.for("react.context"), p = Symbol.for("react.forward_ref"), y = Symbol.for("react.suspense"), u = Symbol.for("react.suspense_list"), k = Symbol.for("react.memo"), h = Symbol.for("react.lazy"), C = Symbol.for("react.offscreen"), S = Symbol.iterator, M = "@@iterator";
|
|
57
57
|
function _(e) {
|
|
58
58
|
if (e === null || typeof e != "object")
|
|
59
59
|
return null;
|
|
@@ -81,7 +81,7 @@ function Wt() {
|
|
|
81
81
|
var ve = !1, ce = !1, ue = !1, _r = !1, Or = !1, Fe;
|
|
82
82
|
Fe = Symbol.for("react.module.reference");
|
|
83
83
|
function Br(e) {
|
|
84
|
-
return !!(typeof e == "string" || typeof e == "function" || e === l || e === c || Or || e === d || e ===
|
|
84
|
+
return !!(typeof e == "string" || typeof e == "function" || e === l || e === c || Or || e === d || e === y || e === u || _r || e === C || ve || ce || ue || typeof e == "object" && e !== null && (e.$$typeof === h || e.$$typeof === k || e.$$typeof === m || e.$$typeof === g || e.$$typeof === p || // This needs to include all possible module reference object
|
|
85
85
|
// types supported by any Flight configuration anywhere since
|
|
86
86
|
// we don't know which Flight build this will end up being used
|
|
87
87
|
// with.
|
|
@@ -113,7 +113,7 @@ function Wt() {
|
|
|
113
113
|
return "Profiler";
|
|
114
114
|
case d:
|
|
115
115
|
return "StrictMode";
|
|
116
|
-
case
|
|
116
|
+
case y:
|
|
117
117
|
return "Suspense";
|
|
118
118
|
case u:
|
|
119
119
|
return "SuspenseList";
|
|
@@ -271,17 +271,17 @@ function Wt() {
|
|
|
271
271
|
}
|
|
272
272
|
} catch (W) {
|
|
273
273
|
if (W && b && typeof W.stack == "string") {
|
|
274
|
-
for (var
|
|
274
|
+
for (var x = W.stack.split(`
|
|
275
275
|
`), D = b.stack.split(`
|
|
276
|
-
`), T =
|
|
276
|
+
`), T = x.length - 1, P = D.length - 1; T >= 1 && P >= 0 && x[T] !== D[P]; )
|
|
277
277
|
P--;
|
|
278
278
|
for (; T >= 1 && P >= 0; T--, P--)
|
|
279
|
-
if (
|
|
279
|
+
if (x[T] !== D[P]) {
|
|
280
280
|
if (T !== 1 || P !== 1)
|
|
281
281
|
do
|
|
282
|
-
if (T--, P--, P < 0 ||
|
|
282
|
+
if (T--, P--, P < 0 || x[T] !== D[P]) {
|
|
283
283
|
var U = `
|
|
284
|
-
` +
|
|
284
|
+
` + x[T].replace(" at new ", " at ");
|
|
285
285
|
return e.displayName && U.includes("<anonymous>") && (U = U.replace("<anonymous>", e.displayName)), typeof e == "function" && pe.set(e, U), U;
|
|
286
286
|
}
|
|
287
287
|
while (T >= 1 && P >= 0);
|
|
@@ -309,7 +309,7 @@ function Wt() {
|
|
|
309
309
|
if (typeof e == "string")
|
|
310
310
|
return de(e);
|
|
311
311
|
switch (e) {
|
|
312
|
-
case
|
|
312
|
+
case y:
|
|
313
313
|
return de("Suspense");
|
|
314
314
|
case u:
|
|
315
315
|
return de("SuspenseList");
|
|
@@ -343,17 +343,17 @@ function Wt() {
|
|
|
343
343
|
var A = Function.call.bind(oe);
|
|
344
344
|
for (var v in e)
|
|
345
345
|
if (A(e, v)) {
|
|
346
|
-
var
|
|
346
|
+
var x = void 0;
|
|
347
347
|
try {
|
|
348
348
|
if (typeof e[v] != "function") {
|
|
349
349
|
var D = Error((b || "React class") + ": " + s + " type `" + v + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[v] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
350
350
|
throw D.name = "Invariant Violation", D;
|
|
351
351
|
}
|
|
352
|
-
|
|
352
|
+
x = e[v](a, v, b, s, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
353
353
|
} catch (T) {
|
|
354
|
-
|
|
354
|
+
x = T;
|
|
355
355
|
}
|
|
356
|
-
|
|
356
|
+
x && !(x instanceof Error) && (ge(j), I("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", b || "React class", s, v, typeof x), ge(null)), x instanceof Error && !(x.message in Ne) && (Ne[x.message] = !0, ge(j), I("Failed %s type: %s", s, x.message), ge(null));
|
|
357
357
|
}
|
|
358
358
|
}
|
|
359
359
|
}
|
|
@@ -433,7 +433,7 @@ function Wt() {
|
|
|
433
433
|
}
|
|
434
434
|
}
|
|
435
435
|
var Zr = function(e, a, s, b, j, A, v) {
|
|
436
|
-
var
|
|
436
|
+
var x = {
|
|
437
437
|
// This tag allows us to uniquely identify this as a React Element
|
|
438
438
|
$$typeof: n,
|
|
439
439
|
// Built-in properties that belong on the element
|
|
@@ -444,27 +444,27 @@ function Wt() {
|
|
|
444
444
|
// Record the component responsible for creating this element.
|
|
445
445
|
_owner: A
|
|
446
446
|
};
|
|
447
|
-
return
|
|
447
|
+
return x._store = {}, Object.defineProperty(x._store, "validated", {
|
|
448
448
|
configurable: !1,
|
|
449
449
|
enumerable: !1,
|
|
450
450
|
writable: !0,
|
|
451
451
|
value: !1
|
|
452
|
-
}), Object.defineProperty(
|
|
452
|
+
}), Object.defineProperty(x, "_self", {
|
|
453
453
|
configurable: !1,
|
|
454
454
|
enumerable: !1,
|
|
455
455
|
writable: !1,
|
|
456
456
|
value: b
|
|
457
|
-
}), Object.defineProperty(
|
|
457
|
+
}), Object.defineProperty(x, "_source", {
|
|
458
458
|
configurable: !1,
|
|
459
459
|
enumerable: !1,
|
|
460
460
|
writable: !1,
|
|
461
461
|
value: j
|
|
462
|
-
}), Object.freeze && (Object.freeze(
|
|
462
|
+
}), Object.freeze && (Object.freeze(x.props), Object.freeze(x)), x;
|
|
463
463
|
};
|
|
464
464
|
function Qr(e, a, s, b, j) {
|
|
465
465
|
{
|
|
466
|
-
var A, v = {},
|
|
467
|
-
s !== void 0 && (Je(s),
|
|
466
|
+
var A, v = {}, x = null, D = null;
|
|
467
|
+
s !== void 0 && (Je(s), x = "" + s), Xr(a) && (Je(a.key), x = "" + a.key), Nr(a) && (D = a.ref, qr(a, j));
|
|
468
468
|
for (A in a)
|
|
469
469
|
oe.call(a, A) && !Ur.hasOwnProperty(A) && (v[A] = a[A]);
|
|
470
470
|
if (e && e.defaultProps) {
|
|
@@ -472,11 +472,11 @@ function Wt() {
|
|
|
472
472
|
for (A in T)
|
|
473
473
|
v[A] === void 0 && (v[A] = T[A]);
|
|
474
474
|
}
|
|
475
|
-
if (
|
|
475
|
+
if (x || D) {
|
|
476
476
|
var P = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
477
|
-
|
|
477
|
+
x && Jr(v, P), D && Kr(v, P);
|
|
478
478
|
}
|
|
479
|
-
return Zr(e,
|
|
479
|
+
return Zr(e, x, D, j, b, ne.current, v);
|
|
480
480
|
}
|
|
481
481
|
}
|
|
482
482
|
var Ae = w.ReactCurrentOwner, Qe = w.ReactDebugCurrentFrame;
|
|
@@ -594,12 +594,12 @@ Check the top-level render call using <` + s + ">.");
|
|
|
594
594
|
{
|
|
595
595
|
var v = Br(e);
|
|
596
596
|
if (!v) {
|
|
597
|
-
var
|
|
598
|
-
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (
|
|
597
|
+
var x = "";
|
|
598
|
+
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (x += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
599
599
|
var D = et();
|
|
600
|
-
D ?
|
|
600
|
+
D ? x += D : x += er();
|
|
601
601
|
var T;
|
|
602
|
-
e === null ? T = "null" : Me(e) ? T = "array" : e !== void 0 && e.$$typeof === n ? (T = "<" + (X(e.type) || "Unknown") + " />",
|
|
602
|
+
e === null ? T = "null" : Me(e) ? T = "array" : e !== void 0 && e.$$typeof === n ? (T = "<" + (X(e.type) || "Unknown") + " />", x = " Did you accidentally export a JSX literal instead of a component?") : T = typeof e, I("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", T, x);
|
|
603
603
|
}
|
|
604
604
|
var P = Qr(e, a, s, j, A);
|
|
605
605
|
if (P == null)
|
|
@@ -669,7 +669,7 @@ function Gt({ maxWidth: r = 200, chipProps: n, size: i = "medium" }) {
|
|
|
669
669
|
}
|
|
670
670
|
]
|
|
671
671
|
}
|
|
672
|
-
}, children: t.jsx(
|
|
672
|
+
}, children: t.jsx(ye, { "data-test-chip": n.label, sx: { maxWidth: r }, ref: l, size: i, ...n }) }) : t.jsx(ye, { "data-test-chip": n.label, ref: l, size: i, ...n }) });
|
|
673
673
|
}
|
|
674
674
|
const Lt = {
|
|
675
675
|
"&:hover": {
|
|
@@ -691,12 +691,12 @@ function Oo({ chipList: r, numTagsToDisplay: n, size: i = "medium", maxChipWidth
|
|
|
691
691
|
M.unobserve(_);
|
|
692
692
|
};
|
|
693
693
|
}, []);
|
|
694
|
-
const
|
|
694
|
+
const y = g ? Math.floor(g / l) : Ht, u = n ?? y, k = (M) => {
|
|
695
695
|
M.preventDefault(), c(M.currentTarget);
|
|
696
696
|
}, h = () => {
|
|
697
697
|
c(null);
|
|
698
698
|
}, C = (r == null ? void 0 : r.length) - u, S = !!d;
|
|
699
|
-
return t.jsxs(N, { py: 0.5, sx: { width: "100%" }, ref: m, children: [r == null ? void 0 : r.slice(0, u).map((M, _) => t.jsx(N, { sx: { display: "inline-block", mr: 1, my: 0.5 }, "data-cy": "ink-chip", children: t.jsx(Gt, { chipProps: M, maxWidth: l, size: i }) }, _)), C > 0 && t.jsxs(N, { sx: { display: "inline-block", mr: 0.5, my: 0.5 }, children: [t.jsx(
|
|
699
|
+
return t.jsxs(N, { py: 0.5, sx: { width: "100%" }, ref: m, children: [r == null ? void 0 : r.slice(0, u).map((M, _) => t.jsx(N, { sx: { display: "inline-block", mr: 1, my: 0.5 }, "data-cy": "ink-chip", children: t.jsx(Gt, { chipProps: M, maxWidth: l, size: i }) }, _)), C > 0 && t.jsxs(N, { sx: { display: "inline-block", mr: 0.5, my: 0.5 }, children: [t.jsx(ye, { "data-cy": "more-btn", size: i, label: `${C} more`, onClick: k }), t.jsx(Cr, { id: "basic-menu", "data-cy": "chip-menu", anchorEl: d, open: S, onClose: h, MenuListProps: {
|
|
700
700
|
"aria-labelledby": "basic-button"
|
|
701
701
|
}, slotProps: {
|
|
702
702
|
paper: {
|
|
@@ -704,7 +704,7 @@ function Oo({ chipList: r, numTagsToDisplay: n, size: i = "medium", maxChipWidth
|
|
|
704
704
|
borderRadius: "6px"
|
|
705
705
|
}
|
|
706
706
|
}
|
|
707
|
-
}, children: r == null ? void 0 : r.slice(u).map((M, _) => t.jsx(
|
|
707
|
+
}, children: r == null ? void 0 : r.slice(u).map((M, _) => t.jsx(xe, { sx: Lt, children: t.jsx(ye, { size: i, ...M }) }, _)) })] })] });
|
|
708
708
|
}
|
|
709
709
|
function Vt({ variant: r }) {
|
|
710
710
|
return r === "warning" ? t.jsx(Tt, { color: r, sx: { mr: 1 } }) : r === "destructive" ? t.jsx(Et, { color: "error", sx: { mr: 1 } }) : null;
|
|
@@ -734,7 +734,7 @@ const Sr = (r) => {
|
|
|
734
734
|
}) : r;
|
|
735
735
|
};
|
|
736
736
|
function Bo({ Title: r, Content: n, Actions: i, onClose: l, hideCloseButton: d, ActionsProp: c, ...m }) {
|
|
737
|
-
var p,
|
|
737
|
+
var p, y, u, k, h, C, S;
|
|
738
738
|
let g = i;
|
|
739
739
|
if (i) {
|
|
740
740
|
const M = Sr(i);
|
|
@@ -749,7 +749,7 @@ function Bo({ Title: r, Content: n, Actions: i, onClose: l, hideCloseButton: d,
|
|
|
749
749
|
right: "15px",
|
|
750
750
|
p: "4px",
|
|
751
751
|
color: (M) => M.palette.grey[500]
|
|
752
|
-
}, children: t.jsx(le, { children: "close_filled" }) }), typeof r != "string" ? t.jsx(t.Fragment, { children: r }) : t.jsx(ft, { "data-test": "ink-dialog-title", children: t.jsxs(z, { direction: "row", alignItems: "center", children: [((p = c == null ? void 0 : c.primary) == null ? void 0 : p.variant) && t.jsx(Vt, { variant: c.primary.variant }), t.jsx(V, { variant: "h6", children: t.jsx("strong", { children: r }) })] }) }), n, g, c && t.jsxs(gt, { sx: { m: 1 }, children: [c.cancel && t.jsx(J, { "data-test": "ink-dialog-cancel-action", onClick: c.cancel.onClick, children: (
|
|
752
|
+
}, children: t.jsx(le, { children: "close_filled" }) }), typeof r != "string" ? t.jsx(t.Fragment, { children: r }) : t.jsx(ft, { "data-test": "ink-dialog-title", children: t.jsxs(z, { direction: "row", alignItems: "center", children: [((p = c == null ? void 0 : c.primary) == null ? void 0 : p.variant) && t.jsx(Vt, { variant: c.primary.variant }), t.jsx(V, { variant: "h6", children: t.jsx("strong", { children: r }) })] }) }), n, g, c && t.jsxs(gt, { sx: { m: 1 }, children: [c.cancel && t.jsx(J, { "data-test": "ink-dialog-cancel-action", onClick: c.cancel.onClick, children: (y = c.cancel) == null ? void 0 : y.label }), c.secondary && t.jsx(J, { "data-test": "ink-dialog-secondary-action", color: ((u = c.secondary) == null ? void 0 : u.variant) === "destructive" ? "error" : "primary", endIcon: c.secondary.loading ? t.jsx(lr, { size: 20, color: "inherit" }) : void 0, disabled: c.secondary.disabled || c.secondary.loading, ...c.secondary, variant: (k = c.secondary) != null && k.variant ? "contained" : "text", children: (h = c.secondary) == null ? void 0 : h.label }), c.primary && t.jsx(J, { "data-test": "ink-dialog-primary-action", color: ((C = c.primary) == null ? void 0 : C.variant) === "destructive" ? "error" : "primary", endIcon: c.primary.loading ? t.jsx(lr, { size: 20, color: "inherit" }) : void 0, disabled: c.primary.disabled || c.primary.loading, ...c.primary, variant: "contained", children: (S = c.primary) == null ? void 0 : S.label })] })] });
|
|
753
753
|
}
|
|
754
754
|
const Tr = 280, Yt = ht(N, { shouldForwardProp: (r) => r !== "open" })(({ theme: r, open: n }) => ({
|
|
755
755
|
flexGrow: 1,
|
|
@@ -778,7 +778,7 @@ function Fo({
|
|
|
778
778
|
bottomFilter: m,
|
|
779
779
|
headerLabel: g = "Filters",
|
|
780
780
|
sx: p,
|
|
781
|
-
isComponentLevelDrawer:
|
|
781
|
+
isComponentLevelDrawer: y = !1,
|
|
782
782
|
mainProps: u
|
|
783
783
|
}) {
|
|
784
784
|
return t.jsxs(N, { sx: { display: "flex", width: "100%" }, children: [t.jsx(bt, { sx: {
|
|
@@ -792,7 +792,7 @@ function Fo({
|
|
|
792
792
|
}, PaperProps: {
|
|
793
793
|
style: {
|
|
794
794
|
left: d,
|
|
795
|
-
...
|
|
795
|
+
...y && { position: "absolute" }
|
|
796
796
|
},
|
|
797
797
|
variant: "outlined"
|
|
798
798
|
}, variant: "persistent", anchor: "left", open: r, children: t.jsxs(z, { height: "100%", justifyContent: "space-between", children: [t.jsxs(z, { direction: "column", spacing: 3, sx: { p: 2 }, children: [t.jsxs(z, { direction: "row", alignItems: "center", children: [t.jsxs(z, { direction: "row", alignItems: "center", children: [t.jsx(le, { sx: { color: "text.primary" }, fontSize: "small", children: "filter_list_icon" }), t.jsx(V, { sx: { ml: 1 }, "data-cy": "drawer-header", children: g })] }), t.jsx(kr, { title: "Close", placement: "bottom-end", slotProps: {
|
|
@@ -817,7 +817,7 @@ function Do({ metadata: r }) {
|
|
|
817
817
|
return t.jsx(z, { direction: "row", spacing: 2, children: r.map(({ icon: n, label: i, value: l }) => t.jsxs(z, { direction: "row", alignItems: "center", spacing: 0.5, children: [typeof n == "string" ? t.jsx(le, { sx: { color: "neutral600", fontSize: "1rem" }, children: n }) : n, t.jsx(V, { variant: "body2", color: "text.secondary", children: i }), typeof l == "string" ? t.jsx(V, { variant: "body2", children: l }) : l] }, i)) });
|
|
818
818
|
}
|
|
819
819
|
const Ut = ({ children: r }) => {
|
|
820
|
-
const n =
|
|
820
|
+
const n = xt({
|
|
821
821
|
disableHysteresis: !0,
|
|
822
822
|
threshold: 0
|
|
823
823
|
});
|
|
@@ -826,7 +826,7 @@ const Ut = ({ children: r }) => {
|
|
|
826
826
|
//@nic-steffens - I am not sure elevation works
|
|
827
827
|
position: n ? "sticky" : "static"
|
|
828
828
|
});
|
|
829
|
-
}, Er = ({ children: r, sx: n }) => t.jsx(Ut, { children: ({ elevation: i, position: l }) => t.jsx(
|
|
829
|
+
}, Er = ({ children: r, sx: n }) => t.jsx(Ut, { children: ({ elevation: i, position: l }) => t.jsx(yt, { position: l, sx: {
|
|
830
830
|
p: 0,
|
|
831
831
|
background: (d) => d.palette.neutral00,
|
|
832
832
|
border: "none",
|
|
@@ -855,7 +855,7 @@ function Xt({ label: r }) {
|
|
|
855
855
|
return t.jsx(V, { "data-cy": "page-title", variant: "h5", component: "h1", sx: { wordBreak: "break-word", fontWeight: "600", color: "text.primary" }, children: r });
|
|
856
856
|
}
|
|
857
857
|
function qt({ breadcrumb: r, i: n, onClick: i }) {
|
|
858
|
-
return t.jsx(mt, { href: r.path, ...r.LinkProps, underline: "hover", "data-cy": `breadcrumb-${n}`, variant: "h5", color: "
|
|
858
|
+
return t.jsx(mt, { href: r.path, ...r.LinkProps, underline: "hover", "data-cy": `breadcrumb-${n}`, variant: "h5", color: "action.active", onClick: i, children: r.label });
|
|
859
859
|
}
|
|
860
860
|
function zo({ breadcrumbs: r }) {
|
|
861
861
|
return t.jsx(vt, { sx: Nt, children: r == null ? void 0 : r.map((n, i) => i === r.length - 1 ? t.jsx(Xt, { label: n.label }, `breadcrumb-${i}`) : t.jsx(qt, { breadcrumb: n, i, onClick: n.onClick }, `breadcrumb-${i}`)) });
|
|
@@ -866,7 +866,7 @@ function Wo({ primaryAction: r, secondaryAction: n, dropdownAction: i }) {
|
|
|
866
866
|
d(h.currentTarget);
|
|
867
867
|
}, g = () => {
|
|
868
868
|
d(null);
|
|
869
|
-
}, { internalUseOnlyItems: p, menuOptions:
|
|
869
|
+
}, { internalUseOnlyItems: p, menuOptions: y } = i ?? {}, u = y == null ? void 0 : y.filter((h) => p == null ? void 0 : p.includes(h.label)), k = y == null ? void 0 : y.filter((h) => !(p != null && p.includes(h.label)));
|
|
870
870
|
return t.jsxs(z, { direction: "row", spacing: 1, children: [i && t.jsxs(N, { children: [t.jsx(J, { id: "action-dd", "aria-controls": c ? "action-menu" : void 0, "aria-haspopup": "true", "aria-expanded": c ? "true" : void 0, onClick: m, variant: "contained", color: "inherit", endIcon: t.jsx(le, { children: "arrow_drop_down" }), children: i.label }), t.jsxs(Cr, { id: "action-menu", anchorEl: l, open: c, onClose: g, MenuListProps: {
|
|
871
871
|
"aria-labelledby": "action-dd"
|
|
872
872
|
}, anchorOrigin: {
|
|
@@ -875,9 +875,9 @@ function Wo({ primaryAction: r, secondaryAction: n, dropdownAction: i }) {
|
|
|
875
875
|
}, transformOrigin: {
|
|
876
876
|
vertical: "top",
|
|
877
877
|
horizontal: "right"
|
|
878
|
-
}, ...i.menuProps, children: [k == null ? void 0 : k.map(({ label: h, onClick: C, menuItemProps: S }, M) => t.jsx(
|
|
878
|
+
}, ...i.menuProps, children: [k == null ? void 0 : k.map(({ label: h, onClick: C, menuItemProps: S }, M) => t.jsx(xe, { onClick: () => {
|
|
879
879
|
C(), g();
|
|
880
|
-
}, ...S, children: h }, M)), u && u.length > 0 && t.jsxs(N, { sx: { mt: "12px" }, children: [t.jsx(Jt, { sx: { px: 2 } }), u.map(({ label: h, onClick: C, menuItemProps: S }, M) => t.jsx(
|
|
880
|
+
}, ...S, children: h }, M)), u && u.length > 0 && t.jsxs(N, { sx: { mt: "12px" }, children: [t.jsx(Jt, { sx: { px: 2 } }), u.map(({ label: h, onClick: C, menuItemProps: S }, M) => t.jsx(xe, { onClick: () => {
|
|
881
881
|
C(), g();
|
|
882
882
|
}, ...S, children: h }, M))] })] })] }), n && t.jsx(J, { variant: "contained", color: "inherit", ...n, children: n.label }), r && t.jsx(J, { variant: "contained", ...r, sx: { whiteSpace: "nowrap" }, children: r.label })] });
|
|
883
883
|
}
|
|
@@ -904,9 +904,9 @@ function Ho({ Header: r, Description: n, Icon: i, CTA: l, children: d, ...c }) {
|
|
|
904
904
|
textOverflow: "ellipsis"
|
|
905
905
|
}, children: [typeof r != "string" ? t.jsx(t.Fragment, { children: r }) : t.jsx(ur, { "data-test": "ink-paper-header", variant: "subtitle1", color: "text.primary", component: "strong", fontWeight: 600, children: r }), n && t.jsx(ur, { "data-test": "ink-paper-description", variant: "caption", color: "text.secondary", noWrap: !0, children: n })] }), l] }), d] });
|
|
906
906
|
}
|
|
907
|
-
const Vo = ({ name: r, options: n, value: i, ref: l, direction: d = "row", cardSx: c, fullWidth: m = !0, disabled: g = !1, onChange: p, onBlur:
|
|
907
|
+
const Vo = ({ name: r, options: n, value: i, ref: l, direction: d = "row", cardSx: c, fullWidth: m = !0, disabled: g = !1, onChange: p, onBlur: y }) => {
|
|
908
908
|
const u = (h, C, S) => g ? h ? C : "inherit" : S, k = (h, C, S, M) => g ? h ? C : M : h ? C : S;
|
|
909
|
-
return t.jsx(kt, { name: r, onChange: p, onBlur:
|
|
909
|
+
return t.jsx(kt, { name: r, onChange: p, onBlur: y, value: i, ref: l, "aria-label": r, "aria-readonly": g, "aria-disabled": g, sx: { width: m ? "100%" : "fit-content" }, children: t.jsx(z, { direction: d, spacing: 2, children: n.map(({ value: h, icon: C, title: S, description: M, subDescription: _ }) => t.jsx(jr, { value: h, disabled: g, control: t.jsx(Ct, { sx: { display: "none" } }), sx: {
|
|
910
910
|
width: m ? "100%" : "auto",
|
|
911
911
|
".MuiFormControlLabel-label": {
|
|
912
912
|
width: "100%",
|
|
@@ -979,8 +979,8 @@ function gr({ value: r, label: n, size: i = "medium", ariaLabel: l, ...d }) {
|
|
|
979
979
|
}, children: n || r });
|
|
980
980
|
}
|
|
981
981
|
function Uo({ id: r, toggleButtons: n, ariaLabel: i, value: l = "", size: d = "medium", single: c = !1, sx: m, onChange: g, ...p }) {
|
|
982
|
-
const
|
|
983
|
-
return c ? t.jsx(gr, { value:
|
|
982
|
+
const y = n.find((u) => u.value === l) ?? n[0];
|
|
983
|
+
return c ? t.jsx(gr, { value: y.value, size: d, ariaLabel: y.label, children: y.label }) : t.jsx(wr, { "data-test-ink-toggle-group": r, "aria-label": i, value: l, exclusive: !0, onChange: g, sx: {
|
|
984
984
|
display: "flex",
|
|
985
985
|
columnGap: 0.5,
|
|
986
986
|
width: "max-content",
|
|
@@ -1063,8 +1063,8 @@ function hr({ value: r, size: n = "medium", ariaLabel: i, icon: l, ...d }) {
|
|
|
1063
1063
|
}, children: l });
|
|
1064
1064
|
}
|
|
1065
1065
|
function No({ id: r, toggleButtons: n, ariaLabel: i, size: l = "medium", single: d = !1, value: c = "", onChange: m, sx: g, ...p }) {
|
|
1066
|
-
const
|
|
1067
|
-
return d ? t.jsx(hr, { size: l, ariaLabel:
|
|
1066
|
+
const y = n.find((u) => u.value === c) ?? n[0];
|
|
1067
|
+
return d ? t.jsx(hr, { size: l, ariaLabel: y.value, ...y }) : t.jsx(wr, { "data-test-ink-toggle-group": r, "aria-label": i, value: c, exclusive: !0, onChange: m, sx: {
|
|
1068
1068
|
display: "inline-flex",
|
|
1069
1069
|
columnGap: 0.5,
|
|
1070
1070
|
backgroundColor: "neutral200",
|
|
@@ -1094,7 +1094,7 @@ const br = {
|
|
|
1094
1094
|
fontSizeDescription: 16,
|
|
1095
1095
|
titleVariant: "h5",
|
|
1096
1096
|
descriptionVariant: "body1"
|
|
1097
|
-
},
|
|
1097
|
+
}, yr = {
|
|
1098
1098
|
fontSize: 16,
|
|
1099
1099
|
fontSizeDescription: 14,
|
|
1100
1100
|
titleVariant: "body1",
|
|
@@ -1102,18 +1102,18 @@ const br = {
|
|
|
1102
1102
|
}, Zt = {
|
|
1103
1103
|
page: br,
|
|
1104
1104
|
search: br,
|
|
1105
|
-
paper:
|
|
1106
|
-
data:
|
|
1105
|
+
paper: yr,
|
|
1106
|
+
data: yr
|
|
1107
1107
|
};
|
|
1108
1108
|
function Xo({ title: r, description: n, action: i, variant: l, icon: d, sx: c }) {
|
|
1109
|
-
const m = l === "search" ? "neutral00" : "neutral50", g = Zt[l], { fontSize: p, fontSizeDescription:
|
|
1110
|
-
return t.jsxs(z, { alignItems: "center", justifyContent: "center", my: 6, textAlign: "center", "data-cy": `empty-state-${l}-container`, sx: { backgroundColor: m, p: 5, ...c }, children: [d && t.jsx(Kt, { icon: d, variant: l }), r && t.jsx(V, { variant: u, sx: { fontSize: p }, "data-cy": "empty-state-title", children: t.jsx("strong", { children: r }) }), t.jsx(V, { variant: k, color: "text.secondary", sx: { fontSize:
|
|
1109
|
+
const m = l === "search" ? "neutral00" : "neutral50", g = Zt[l], { fontSize: p, fontSizeDescription: y, titleVariant: u, descriptionVariant: k } = g;
|
|
1110
|
+
return t.jsxs(z, { alignItems: "center", justifyContent: "center", my: 6, textAlign: "center", "data-cy": `empty-state-${l}-container`, sx: { backgroundColor: m, p: 5, ...c }, children: [d && t.jsx(Kt, { icon: d, variant: l }), r && t.jsx(V, { variant: u, sx: { fontSize: p }, "data-cy": "empty-state-title", children: t.jsx("strong", { children: r }) }), t.jsx(V, { variant: k, color: "text.secondary", sx: { fontSize: y }, "data-cy": "empty-state-description", children: n }), i && t.jsx(N, { mt: 3, children: t.jsx(J, { onClick: i.onClick, "data-cy": "empty-state-action-button", children: i.title }) })] });
|
|
1111
1111
|
}
|
|
1112
1112
|
const be = 400, Qt = 50, eo = 250, ro = () => {
|
|
1113
1113
|
const [r, n] = re(be), [i, l] = re("bottom"), d = (g) => {
|
|
1114
1114
|
if (!g)
|
|
1115
1115
|
return { maxHeight: be, placement: "bottom" };
|
|
1116
|
-
const p = window.innerHeight,
|
|
1116
|
+
const p = window.innerHeight, y = g.getBoundingClientRect().bottom, u = p - y;
|
|
1117
1117
|
return u <= eo ? { maxHeight: be, placement: "top" } : {
|
|
1118
1118
|
maxHeight: Math.min(u - Qt, be),
|
|
1119
1119
|
placement: "bottom"
|
|
@@ -1123,21 +1123,21 @@ const be = 400, Qt = 50, eo = 250, ro = () => {
|
|
|
1123
1123
|
menuMaxHeight: r,
|
|
1124
1124
|
menuPlacement: i,
|
|
1125
1125
|
handleMenuOpen: (g) => {
|
|
1126
|
-
const { maxHeight: p, placement:
|
|
1127
|
-
n(p), l(
|
|
1126
|
+
const { maxHeight: p, placement: y } = d(g.current);
|
|
1127
|
+
n(p), l(y);
|
|
1128
1128
|
},
|
|
1129
1129
|
renderMenuItems: (g, p) => {
|
|
1130
1130
|
if (p) {
|
|
1131
|
-
const
|
|
1131
|
+
const y = /* @__PURE__ */ new Map();
|
|
1132
1132
|
p.forEach((k) => {
|
|
1133
1133
|
var C;
|
|
1134
1134
|
const h = k.group || null;
|
|
1135
|
-
|
|
1135
|
+
y.has(h) || y.set(h, []), (C = y.get(h)) == null || C.push(k);
|
|
1136
1136
|
});
|
|
1137
1137
|
const u = [];
|
|
1138
|
-
return
|
|
1138
|
+
return y.forEach((k, h) => {
|
|
1139
1139
|
h !== null && u.push(t.jsx(jt, { children: h }, h)), k.forEach(({ label: C, value: S, sx: M, ..._ }) => {
|
|
1140
|
-
u.push(t.jsx(
|
|
1140
|
+
u.push(t.jsx(xe, { sx: {
|
|
1141
1141
|
fontSize: 16,
|
|
1142
1142
|
color: "text.disabled",
|
|
1143
1143
|
backgroundColor: "neutral.300",
|
|
@@ -1150,13 +1150,13 @@ const be = 400, Qt = 50, eo = 250, ro = () => {
|
|
|
1150
1150
|
}
|
|
1151
1151
|
};
|
|
1152
1152
|
};
|
|
1153
|
-
function qo({ id: r, label: n, menuOptions: i, name: l, control: d, inputProps: c, rules: m, helperText: g, sx: p, variant:
|
|
1153
|
+
function qo({ id: r, label: n, menuOptions: i, name: l, control: d, inputProps: c, rules: m, helperText: g, sx: p, variant: y = "filled", required: u = !1, placeholder: k, children: h, ...C }) {
|
|
1154
1154
|
if (i && h)
|
|
1155
1155
|
throw new Error("Both menuOptions and children cannot be provided. Please use one or the other.");
|
|
1156
1156
|
const S = Oe(null), { menuMaxHeight: M, menuPlacement: _, handleMenuOpen: w, renderMenuItems: I } = ro(), se = `${l}-label`;
|
|
1157
1157
|
return t.jsxs(At, { sx: p, required: u, "data-test-select-root": l, children: [n && t.jsx(wt, { id: se, "data-test-select-label": !0, children: n }), t.jsx(Pt, { name: l, control: d, rules: m, render: ({ field: ve, fieldState: ce }) => {
|
|
1158
1158
|
var ue;
|
|
1159
|
-
return t.jsxs(t.Fragment, { children: [t.jsx(St, { "data-test-select": l, id: r, labelId: se, variant:
|
|
1159
|
+
return t.jsxs(t.Fragment, { children: [t.jsx(St, { "data-test-select": l, id: r, labelId: se, variant: y, label: n, sx: {
|
|
1160
1160
|
"& .MuiSelect-select .notranslate::after": k ? {
|
|
1161
1161
|
content: `"${k}"`,
|
|
1162
1162
|
color: "text.secondary"
|
|
@@ -1928,7 +1928,7 @@ const oo = {
|
|
|
1928
1928
|
}), Ie = ({ theme: r }) => ({
|
|
1929
1929
|
color: r.palette.error.dark,
|
|
1930
1930
|
marginLeft: "1px"
|
|
1931
|
-
}),
|
|
1931
|
+
}), xr = ({ theme: r }) => ({
|
|
1932
1932
|
"&.Mui-disabled": {
|
|
1933
1933
|
color: r.palette.neutral500
|
|
1934
1934
|
},
|
|
@@ -2075,7 +2075,7 @@ const oo = {
|
|
|
2075
2075
|
disableRipple: !0
|
|
2076
2076
|
},
|
|
2077
2077
|
styleOverrides: {
|
|
2078
|
-
root:
|
|
2078
|
+
root: xr
|
|
2079
2079
|
}
|
|
2080
2080
|
},
|
|
2081
2081
|
MuiRadio: {
|
|
@@ -2083,7 +2083,7 @@ const oo = {
|
|
|
2083
2083
|
disableRipple: !0
|
|
2084
2084
|
},
|
|
2085
2085
|
styleOverrides: {
|
|
2086
|
-
root:
|
|
2086
|
+
root: xr
|
|
2087
2087
|
}
|
|
2088
2088
|
}
|
|
2089
2089
|
}, ho = {
|