@abyss-project/commons-front-core 18.1.3 → 18.1.4
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/CHANGELOG.md +24 -0
- package/README.md +4 -0
- package/catalog/catalog-entries.ts +4 -0
- package/catalog/pages/Callout.tsx +9 -0
- package/catalog/pages/CodeEditor.tsx +52 -0
- package/catalog/pages/DeliveryHistory.tsx +79 -79
- package/catalog/pages/DeliverySubscriptions.tsx +127 -127
- package/catalog/pages/LineChart.tsx +21 -0
- package/catalog/pages/MarkdownEditor.tsx +1 -1
- package/catalog/pages/ScheduledTasks.tsx +117 -117
- package/catalog/pages/SessionErrorScreen.tsx +20 -0
- package/catalog/pages/Toast.tsx +59 -1
- package/catalog/pages/index.ts +4 -0
- package/catalog/playwright.ci.config.ts +2 -2
- package/catalog/specs/captures.spec.ts +145 -145
- package/catalog/specs/global-review-captures.spec.ts +154 -0
- package/catalog/specs/markdown-editor.spec.ts +107 -0
- package/catalog/specs/toast-dialog-foot.spec.ts +83 -0
- package/catalog/specs/write-capture-index.ts +81 -81
- package/dist/{CookieConsentSettings-CLB1Mlv5.js → CookieConsentSettings-D97TY138.js} +53 -53
- package/dist/{Surface-B_wIEB3b.js → Surface-CN1zQYLJ.js} +144 -121
- package/dist/{Tabs-g7OaInVW.js → Tabs-CxD9y18t.js} +235 -229
- package/dist/components/CodeEditor/CodeEditor.component.spec.d.ts +1 -0
- package/dist/components/business/CookieConsent/use-banner-portal.d.ts +0 -17
- package/dist/components/data/LineChart/LineChart.d.ts +21 -2
- package/dist/components/data/LineChart/line-chart-ticks.d.ts +5 -2
- package/dist/components/editors/MarkdownEditor/crepe-styles.d.ts +7 -0
- package/dist/components/editors/MarkdownEditor/crepe-styles.spec.d.ts +1 -0
- package/dist/components/layers/Modal/active-modal.d.ts +14 -0
- package/dist/components/layers/Toast/Toast.d.ts +1 -0
- package/dist/components/layers/Toast/dialog-foot-clearance.d.ts +19 -0
- package/dist/components/layers/Toast/toast-clearance.d.ts +11 -0
- package/dist/cookie-consent.js +2 -2
- package/dist/{design-theme-Bcu3EMIB.js → design-theme-GGVSCauN.js} +1 -1
- package/dist/{editors-DdGMdSh2.js → editors-CJ_6PXoL.js} +30129 -30094
- package/dist/editors.js +1 -1
- package/dist/hooks/use-rich-intl.hook.d.ts +18 -0
- package/dist/{index-cA9H4vaN.js → index-4MsOXuOU.js} +2 -2
- package/dist/{index-CNjQ-GTe.js → index-5BCfqxIs.js} +2 -2
- package/dist/{index-Be4u6vqC.js → index-5HFSSrP-.js} +1 -1
- package/dist/{index-CH4DiDpu.js → index-7M2xC_9h.js} +2 -2
- package/dist/{index-DBctH8lu.js → index-8o9jiKS2.js} +2 -2
- package/dist/{index-DMAlgOv6.js → index-B6QYagVk.js} +2 -2
- package/dist/{index-CYGd_IjS.js → index-BQFouU9U.js} +2 -2
- package/dist/{index-8LPOJLO8.js → index-BQLAeM_n.js} +2 -2
- package/dist/{index-CNx-Ok-t.js → index-BbbyRlLu.js} +2 -2
- package/dist/{index-BFZvgteF.js → index-Bbc0SjAt.js} +2 -2
- package/dist/{index-Cwo-CFS8.js → index-BcsTtdwQ.js} +4 -4
- package/dist/{index-DSIctaR0.js → index-Berc0QsZ.js} +4 -4
- package/dist/{index-DfGQhHnK.js → index-ByRUmH_4.js} +3 -3
- package/dist/{index-CH67WfFq.js → index-CXUHmTse.js} +2 -2
- package/dist/{index-zu64GUZu.js → index-Cl1UafyM.js} +2 -2
- package/dist/{index-BPF_Eb0U.js → index-DQgpUR1S.js} +3 -3
- package/dist/{index-CbH8XAvZ.js → index-Dh1lFi8d.js} +2 -2
- package/dist/{index-_7HwdzPE.js → index-Drwqi2Fr.js} +2 -2
- package/dist/{index-B12llGmk.js → index-Dtfo8fKg.js} +4 -4
- package/dist/{index-Vgp_uo0Y.js → index-VLxkKEWK.js} +3 -3
- package/dist/{index-CJ4-H8Ku.js → index-p3G-JM7E.js} +3 -3
- package/dist/index.js +5850 -5767
- package/dist/legacy.js +6 -6
- package/dist/translations/en.d.ts +9 -0
- package/dist/translations/fr.d.ts +9 -0
- package/package.json +1 -1
- package/dist/commons-front-core.css +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as x, jsx as i, Fragment as J } from "react/jsx-runtime";
|
|
2
|
-
import { useId as N, cloneElement as mn, useState as F, useMemo as ge, useRef as
|
|
2
|
+
import { useId as N, cloneElement as mn, useState as F, useMemo as ge, useRef as X, useCallback as Q, useEffect as V, createContext as ze, useContext as Ae, useLayoutEffect as Le } from "react";
|
|
3
3
|
import le from "@mui/material/FormControl";
|
|
4
4
|
import se from "@mui/material/FormHelperText";
|
|
5
5
|
import $e from "@mui/material/InputLabel";
|
|
@@ -8,17 +8,17 @@ import hn from "@mui/material/Select";
|
|
|
8
8
|
import { styled as l, useTheme as bn, getContrastRatio as ke } from "@mui/material/styles";
|
|
9
9
|
import { visuallyHidden as fe } from "@mui/utils";
|
|
10
10
|
import { useIntl as P } from "react-intl";
|
|
11
|
-
import { a as A, p as o, h as D, d as Z, D as K,
|
|
11
|
+
import { a as A, p as o, h as D, d as Z, D as K, g as yn, t as De, s as de, i as oe, j as te, c as Pe, e as He, k as vn, B as wn } from "./Surface-CN1zQYLJ.js";
|
|
12
12
|
import { i as xn, b as Cn, r as kn, u as Sn, A as In, E as Fn } from "./index-C27b790L.js";
|
|
13
|
-
import
|
|
14
|
-
import { byteSizeIEC as
|
|
15
|
-
import
|
|
13
|
+
import Y from "@mui/material/Button";
|
|
14
|
+
import { byteSizeIEC as Wn } from "@abyss-project/main";
|
|
15
|
+
import Mn from "@mui/icons-material/FileUploadOutlined";
|
|
16
16
|
import On, { autocompleteClasses as Se } from "@mui/material/Autocomplete";
|
|
17
17
|
import Ie from "@mui/material/CircularProgress";
|
|
18
18
|
import ae from "@mui/material/IconButton";
|
|
19
19
|
import me from "@mui/material/OutlinedInput";
|
|
20
20
|
import Fe from "@mui/material/Tooltip";
|
|
21
|
-
import
|
|
21
|
+
import We from "@mui/icons-material/CloudOutlined";
|
|
22
22
|
import Tn from "@mui/icons-material/CloudOffOutlined";
|
|
23
23
|
import Rn from "@mui/icons-material/FileDownloadOutlined";
|
|
24
24
|
import Ne from "@mui/icons-material/FolderOpenOutlined";
|
|
@@ -40,8 +40,8 @@ import Gn, { formLabelClasses as qn } from "@mui/material/FormLabel";
|
|
|
40
40
|
import Un from "@mui/material/InputAdornment";
|
|
41
41
|
import { isMuiElement as Kn } from "@mui/material/utils";
|
|
42
42
|
import Be from "@mui/material/ButtonBase";
|
|
43
|
-
import { Link as
|
|
44
|
-
const
|
|
43
|
+
import { Link as Xn } from "react-router-dom";
|
|
44
|
+
const Yn = l(Gn)(({ theme: e }) => ({
|
|
45
45
|
display: "block",
|
|
46
46
|
maxWidth: "100%",
|
|
47
47
|
marginBottom: o(e.design.space[2]),
|
|
@@ -66,7 +66,7 @@ function Ve({
|
|
|
66
66
|
...Kn(s, ["Select"]) && { labelId: c }
|
|
67
67
|
});
|
|
68
68
|
return /* @__PURE__ */ x(le, { fullWidth: !0, error: C, required: r, children: [
|
|
69
|
-
/* @__PURE__ */ i(
|
|
69
|
+
/* @__PURE__ */ i(Yn, { id: c, htmlFor: a, children: e }),
|
|
70
70
|
m,
|
|
71
71
|
n !== void 0 && /* @__PURE__ */ i(se, { id: g, error: !1, children: n }),
|
|
72
72
|
y && /* @__PURE__ */ i(se, { id: u, children: t })
|
|
@@ -148,15 +148,21 @@ const Ge = {
|
|
|
148
148
|
paddingTop: o(e.design.space[1] / 2),
|
|
149
149
|
lineHeight: e.typography.body2.lineHeight,
|
|
150
150
|
overflowWrap: "anywhere"
|
|
151
|
-
})), tt = l("
|
|
151
|
+
})), tt = l("div")({
|
|
152
|
+
minWidth: 0,
|
|
153
|
+
"& pre": {
|
|
154
|
+
maxWidth: "100%",
|
|
155
|
+
overflowX: "auto"
|
|
156
|
+
}
|
|
157
|
+
}), ot = l("strong")({
|
|
152
158
|
display: "block",
|
|
153
159
|
fontWeight: A.semibold
|
|
154
|
-
}),
|
|
160
|
+
}), rt = l("div")({
|
|
155
161
|
display: "flex",
|
|
156
162
|
flex: "none",
|
|
157
163
|
alignItems: "center"
|
|
158
|
-
}),
|
|
159
|
-
function
|
|
164
|
+
}), it = l(ae)(({ theme: e }) => yn(e));
|
|
165
|
+
function st({
|
|
160
166
|
severity: e,
|
|
161
167
|
title: n,
|
|
162
168
|
children: t,
|
|
@@ -176,13 +182,13 @@ function it({
|
|
|
176
182
|
/* @__PURE__ */ i(Jn, { severity: e, "aria-hidden": !0, children: d ?? /* @__PURE__ */ i(g, {}) }),
|
|
177
183
|
/* @__PURE__ */ x(et, { children: [
|
|
178
184
|
/* @__PURE__ */ x(nt, { children: [
|
|
179
|
-
n !== void 0 && /* @__PURE__ */ i(
|
|
180
|
-
/* @__PURE__ */ i(
|
|
185
|
+
n !== void 0 && /* @__PURE__ */ i(ot, { id: c, children: n }),
|
|
186
|
+
/* @__PURE__ */ i(tt, { children: t })
|
|
181
187
|
] }),
|
|
182
|
-
r !== void 0 && /* @__PURE__ */ i(
|
|
188
|
+
r !== void 0 && /* @__PURE__ */ i(rt, { children: r })
|
|
183
189
|
] }),
|
|
184
190
|
s !== void 0 && /* @__PURE__ */ i(
|
|
185
|
-
|
|
191
|
+
it,
|
|
186
192
|
{
|
|
187
193
|
size: "small",
|
|
188
194
|
"aria-label": a.formatMessage({ id: "ds.states.callout.close" }),
|
|
@@ -239,7 +245,7 @@ const U = (e) => e.id ?? e.name, qe = (e, n, t) => (n === void 0 || e.sizeOctet
|
|
|
239
245
|
"&:hover": { backgroundColor: n["bg.hover"] },
|
|
240
246
|
"&:focus-visible": te(e)
|
|
241
247
|
};
|
|
242
|
-
},
|
|
248
|
+
}, Xe = l("button")(({ theme: e }) => Ke(e)), at = l("label")(({ theme: e }) => Ke(e)), Ye = l("span", {
|
|
243
249
|
shouldForwardProp: (e) => e !== "strong"
|
|
244
250
|
})(({ strong: e }) => ({
|
|
245
251
|
flex: "1 1 auto",
|
|
@@ -263,7 +269,7 @@ const U = (e) => e.id ?? e.name, qe = (e, n, t) => (n === void 0 || e.sizeOctet
|
|
|
263
269
|
"& svg": { width: o(t[5]), height: o(t[5]) },
|
|
264
270
|
"& img": { width: "100%", height: "100%", objectFit: "cover" }
|
|
265
271
|
};
|
|
266
|
-
}),
|
|
272
|
+
}), lt = l(_n, {
|
|
267
273
|
shouldForwardProp: (e) => e !== "open"
|
|
268
274
|
})(({ theme: e, open: n }) => ({
|
|
269
275
|
flex: "none",
|
|
@@ -278,24 +284,24 @@ const U = (e) => e.id ?? e.name, qe = (e, n, t) => (n === void 0 || e.sizeOctet
|
|
|
278
284
|
(e.design.densityValues.touchTarget - e.design.space[5]) / 2
|
|
279
285
|
)
|
|
280
286
|
}
|
|
281
|
-
})),
|
|
287
|
+
})), dt = l("ul")(({ theme: e }) => ({
|
|
282
288
|
margin: 0,
|
|
283
289
|
padding: 0,
|
|
284
290
|
listStyle: "none",
|
|
285
291
|
borderLeft: D(e.design.tokens["border.subtle"]),
|
|
286
292
|
marginLeft: o(e.design.space[3])
|
|
287
|
-
})),
|
|
293
|
+
})), Me = l("li")({ listStyle: "none" });
|
|
288
294
|
function Je({
|
|
289
295
|
folders: e,
|
|
290
296
|
files: n,
|
|
291
297
|
context: t
|
|
292
298
|
}) {
|
|
293
299
|
return /* @__PURE__ */ x(J, { children: [
|
|
294
|
-
e.map((r) => /* @__PURE__ */ i(
|
|
295
|
-
n.filter((r) => qe(r, t.maxSize, t.accept)).map((r) => /* @__PURE__ */ i(
|
|
300
|
+
e.map((r) => /* @__PURE__ */ i(Me, { children: /* @__PURE__ */ i(pt, { folder: r, context: t }) }, r.id ?? r.name)),
|
|
301
|
+
n.filter((r) => qe(r, t.maxSize, t.accept)).map((r) => /* @__PURE__ */ i(Me, { children: /* @__PURE__ */ i(ut, { file: r, context: t }) }, U(r)))
|
|
296
302
|
] });
|
|
297
303
|
}
|
|
298
|
-
function
|
|
304
|
+
function ct({
|
|
299
305
|
file: e,
|
|
300
306
|
getFileThumbnailUrl: n
|
|
301
307
|
}) {
|
|
@@ -310,19 +316,19 @@ function dt({
|
|
|
310
316
|
}
|
|
311
317
|
) : /* @__PURE__ */ i(Hn, {}) });
|
|
312
318
|
}
|
|
313
|
-
function
|
|
319
|
+
function ut({
|
|
314
320
|
file: e,
|
|
315
321
|
context: n
|
|
316
322
|
}) {
|
|
317
323
|
const t = N(), r = n.selectedIds.has(U(e)), s = () => r ? n.unselect([e]) : n.select([e]), d = /* @__PURE__ */ x(J, { children: [
|
|
318
324
|
/* @__PURE__ */ i(
|
|
319
|
-
|
|
325
|
+
ct,
|
|
320
326
|
{
|
|
321
327
|
file: e,
|
|
322
328
|
getFileThumbnailUrl: n.getFileThumbnailUrl
|
|
323
329
|
}
|
|
324
330
|
),
|
|
325
|
-
/* @__PURE__ */ i(
|
|
331
|
+
/* @__PURE__ */ i(Ye, { strong: r, title: e.name, children: e.name })
|
|
326
332
|
] });
|
|
327
333
|
return n.multiple ? /* @__PURE__ */ x(ue, { selected: r, children: [
|
|
328
334
|
/* @__PURE__ */ i(
|
|
@@ -334,10 +340,10 @@ function ct({
|
|
|
334
340
|
onChange: s
|
|
335
341
|
}
|
|
336
342
|
),
|
|
337
|
-
/* @__PURE__ */ i(
|
|
338
|
-
] }) : /* @__PURE__ */ i(ue, { selected: r, children: /* @__PURE__ */ i(
|
|
343
|
+
/* @__PURE__ */ i(at, { htmlFor: t, children: d })
|
|
344
|
+
] }) : /* @__PURE__ */ i(ue, { selected: r, children: /* @__PURE__ */ i(Xe, { type: "button", "aria-pressed": r, onClick: s, children: d }) });
|
|
339
345
|
}
|
|
340
|
-
function
|
|
346
|
+
function pt({
|
|
341
347
|
folder: e,
|
|
342
348
|
context: n
|
|
343
349
|
}) {
|
|
@@ -363,21 +369,21 @@ function ut({
|
|
|
363
369
|
}
|
|
364
370
|
),
|
|
365
371
|
/* @__PURE__ */ x(
|
|
366
|
-
|
|
372
|
+
Xe,
|
|
367
373
|
{
|
|
368
374
|
type: "button",
|
|
369
375
|
"aria-expanded": s,
|
|
370
376
|
"aria-controls": s ? r : void 0,
|
|
371
377
|
onClick: () => d(!s),
|
|
372
378
|
children: [
|
|
373
|
-
/* @__PURE__ */ i(
|
|
379
|
+
/* @__PURE__ */ i(lt, { open: s, "aria-hidden": !0 }),
|
|
374
380
|
/* @__PURE__ */ i(Qe, { "aria-hidden": !0, children: s ? /* @__PURE__ */ i(Ne, {}) : /* @__PURE__ */ i(Nn, {}) }),
|
|
375
|
-
/* @__PURE__ */ i(
|
|
381
|
+
/* @__PURE__ */ i(Ye, { strong: g, title: e.name, children: e.name })
|
|
376
382
|
]
|
|
377
383
|
}
|
|
378
384
|
)
|
|
379
385
|
] }),
|
|
380
|
-
s && /* @__PURE__ */ i(
|
|
386
|
+
s && /* @__PURE__ */ i(dt, { id: r, children: /* @__PURE__ */ i(
|
|
381
387
|
Je,
|
|
382
388
|
{
|
|
383
389
|
folders: e.childFolder ?? [],
|
|
@@ -392,12 +398,12 @@ const Oe = "shared", Te = {
|
|
|
392
398
|
"perso-in-org": 1,
|
|
393
399
|
project: 2,
|
|
394
400
|
personal: 3
|
|
395
|
-
},
|
|
401
|
+
}, gt = l("div")(({ theme: e }) => ({
|
|
396
402
|
display: "flex",
|
|
397
403
|
flexDirection: "column",
|
|
398
404
|
gap: o(e.design.space[3]),
|
|
399
405
|
minWidth: 0
|
|
400
|
-
})),
|
|
406
|
+
})), ft = l("div")(({ theme: e }) => ({
|
|
401
407
|
display: "flex",
|
|
402
408
|
alignItems: "flex-end",
|
|
403
409
|
gap: o(e.design.space[2]),
|
|
@@ -405,11 +411,11 @@ const Oe = "shared", Te = {
|
|
|
405
411
|
// The Space field takes the room the two icon buttons leave.
|
|
406
412
|
[`& > .${Se.root}`]: { flex: "1 1 auto", minWidth: 0 },
|
|
407
413
|
[`& > :not(.${Se.root})`]: { flex: "none" }
|
|
408
|
-
})),
|
|
414
|
+
})), mt = l("p")(({ theme: e }) => ({
|
|
409
415
|
margin: 0,
|
|
410
416
|
fontSize: o(e.design.typeScale.small),
|
|
411
417
|
color: e.design.tokens["text.muted"]
|
|
412
|
-
})),
|
|
418
|
+
})), ht = l("ul")(({ theme: e }) => {
|
|
413
419
|
const { tokens: n, space: t, radii: r } = e.design;
|
|
414
420
|
return {
|
|
415
421
|
margin: 0,
|
|
@@ -438,7 +444,7 @@ const Oe = "shared", Te = {
|
|
|
438
444
|
color: n["text.muted"]
|
|
439
445
|
}
|
|
440
446
|
};
|
|
441
|
-
}),
|
|
447
|
+
}), bt = l("span")(({ theme: e }) => {
|
|
442
448
|
const { tokens: n, space: t, radii: r } = e.design;
|
|
443
449
|
return {
|
|
444
450
|
display: "inline-flex",
|
|
@@ -451,33 +457,33 @@ const Oe = "shared", Te = {
|
|
|
451
457
|
color: n["status.warning"],
|
|
452
458
|
"& svg": { width: o(t[6]), height: o(t[6]) }
|
|
453
459
|
};
|
|
454
|
-
}),
|
|
460
|
+
}), yt = l("p")(({ theme: e }) => ({
|
|
455
461
|
margin: 0,
|
|
456
462
|
fontWeight: A.semibold,
|
|
457
463
|
color: e.design.tokens["text.primary"]
|
|
458
|
-
})),
|
|
464
|
+
})), vt = l("p")({ margin: 0 }), wt = l("div")(({ theme: e }) => ({
|
|
459
465
|
display: "flex",
|
|
460
466
|
flexWrap: "wrap",
|
|
461
467
|
alignItems: "center",
|
|
462
468
|
justifyContent: "space-between",
|
|
463
469
|
gap: o(e.design.space[3])
|
|
464
|
-
})),
|
|
470
|
+
})), xt = l("span")(({ theme: e }) => ({
|
|
465
471
|
fontSize: o(e.design.typeScale.body),
|
|
466
472
|
color: e.design.tokens["text.secondary"]
|
|
467
|
-
})),
|
|
473
|
+
})), Ct = l("li")(({ theme: e }) => ({
|
|
468
474
|
display: "flex",
|
|
469
475
|
alignItems: "center",
|
|
470
476
|
gap: o(e.design.space[2]),
|
|
471
477
|
...De(e)
|
|
472
|
-
})),
|
|
478
|
+
})), kt = l("span")({
|
|
473
479
|
display: "flex",
|
|
474
480
|
flexDirection: "column",
|
|
475
481
|
minWidth: 0
|
|
476
|
-
}),
|
|
482
|
+
}), St = l("span")({
|
|
477
483
|
overflow: "hidden",
|
|
478
484
|
textOverflow: "ellipsis",
|
|
479
485
|
whiteSpace: "nowrap"
|
|
480
|
-
}),
|
|
486
|
+
}), It = l("span")(({ theme: e }) => ({
|
|
481
487
|
fontSize: o(e.design.typeScale.caption),
|
|
482
488
|
color: e.design.tokens["text.muted"],
|
|
483
489
|
// A narrow screen wraps it: the scope and the organization tell same-named Spaces apart.
|
|
@@ -495,9 +501,9 @@ const Oe = "shared", Te = {
|
|
|
495
501
|
color: n["accent.text"],
|
|
496
502
|
"& > svg": { width: o(t[4]), height: o(t[4]) }
|
|
497
503
|
};
|
|
498
|
-
}),
|
|
504
|
+
}), Ft = l(en)(({ theme: e }) => ({
|
|
499
505
|
marginRight: o(e.design.space[2])
|
|
500
|
-
})),
|
|
506
|
+
})), Wt = l("li")({ listStyle: "none" }), Mt = l("div")(({ theme: e }) => {
|
|
501
507
|
const { space: n, tokens: t, typeScale: r } = e.design;
|
|
502
508
|
return {
|
|
503
509
|
padding: `${o(n[2])} ${o(n[3])} ${o(n[1])}`,
|
|
@@ -507,8 +513,8 @@ const Oe = "shared", Te = {
|
|
|
507
513
|
textTransform: "uppercase",
|
|
508
514
|
color: t["text.muted"]
|
|
509
515
|
};
|
|
510
|
-
}),
|
|
511
|
-
function
|
|
516
|
+
}), Ot = l("ul")({ margin: 0, padding: 0 });
|
|
517
|
+
function Tt({
|
|
512
518
|
cloudPicker: e,
|
|
513
519
|
onImport: n,
|
|
514
520
|
multiple: t = !1,
|
|
@@ -526,7 +532,7 @@ function Ot({
|
|
|
526
532
|
refresh: h,
|
|
527
533
|
onCreateCloud: m,
|
|
528
534
|
fetchCloudRepository: p
|
|
529
|
-
} = e, f = P(), [b, v] = F(null), [
|
|
535
|
+
} = e, f = P(), [b, v] = F(null), [W, M] = F(null), [O, S] = F(
|
|
530
536
|
"loading"
|
|
531
537
|
/* Loading */
|
|
532
538
|
), [T, z] = F([]), [R, ee] = F(!1), [re, _] = F(!1), j = ge(() => {
|
|
@@ -580,7 +586,7 @@ function Ot({
|
|
|
580
586
|
)
|
|
581
587
|
)
|
|
582
588
|
];
|
|
583
|
-
}, [g, C, c, f]), G = j.find((w) => w.space.id === (b == null ? void 0 : b.id)) ?? null, ce =
|
|
589
|
+
}, [g, C, c, f]), G = j.find((w) => w.space.id === (b == null ? void 0 : b.id)) ?? null, ce = X(0), he = X(p);
|
|
584
590
|
he.current = p;
|
|
585
591
|
const ie = Q(async (w) => {
|
|
586
592
|
const I = ++ce.current;
|
|
@@ -592,7 +598,7 @@ function Ot({
|
|
|
592
598
|
if (w.id === void 0)
|
|
593
599
|
throw new Error("A Space without an id has no tree");
|
|
594
600
|
const k = await he.current(w.id);
|
|
595
|
-
I === ce.current && (
|
|
601
|
+
I === ce.current && (M(k), S(
|
|
596
602
|
"ready"
|
|
597
603
|
/* Ready */
|
|
598
604
|
));
|
|
@@ -602,7 +608,7 @@ function Ot({
|
|
|
602
608
|
/* Failed */
|
|
603
609
|
);
|
|
604
610
|
}
|
|
605
|
-
}, []), dn =
|
|
611
|
+
}, []), dn = X(h);
|
|
606
612
|
V(() => {
|
|
607
613
|
dn.current();
|
|
608
614
|
}, []), V(() => {
|
|
@@ -662,18 +668,18 @@ function Ot({
|
|
|
662
668
|
return be;
|
|
663
669
|
if (j.length === 0)
|
|
664
670
|
return /* @__PURE__ */ x(ne, { children: [
|
|
665
|
-
/* @__PURE__ */ i(
|
|
666
|
-
/* @__PURE__ */ i(
|
|
671
|
+
/* @__PURE__ */ i(bt, { "aria-hidden": !0, children: /* @__PURE__ */ i(Tn, {}) }),
|
|
672
|
+
/* @__PURE__ */ i(yt, { children: f.formatMessage({
|
|
667
673
|
id: "ds.business.cloud-import.create-error.title"
|
|
668
674
|
}) }),
|
|
669
|
-
/* @__PURE__ */ i(
|
|
675
|
+
/* @__PURE__ */ i(vt, { children: f.formatMessage({
|
|
670
676
|
id: "ds.business.cloud-import.create-error.description"
|
|
671
677
|
}) }),
|
|
672
678
|
/* @__PURE__ */ i(
|
|
673
|
-
|
|
679
|
+
Y,
|
|
674
680
|
{
|
|
675
681
|
variant: "contained",
|
|
676
|
-
startIcon: /* @__PURE__ */ i(
|
|
682
|
+
startIcon: /* @__PURE__ */ i(We, { "aria-hidden": !0 }),
|
|
677
683
|
loading: R || y,
|
|
678
684
|
onClick: () => void un(),
|
|
679
685
|
children: f.formatMessage({
|
|
@@ -692,17 +698,17 @@ function Ot({
|
|
|
692
698
|
id: "ds.business.cloud-import.refresh"
|
|
693
699
|
}), ve = f.formatMessage({
|
|
694
700
|
id: "ds.business.cloud-import.open-in-cloud"
|
|
695
|
-
}), we = (w) => w.avatar ?? /* @__PURE__ */ i(
|
|
696
|
-
return /* @__PURE__ */ x(
|
|
701
|
+
}), we = (w) => w.avatar ?? /* @__PURE__ */ i(We, {});
|
|
702
|
+
return /* @__PURE__ */ x(gt, { children: [
|
|
697
703
|
re && /* @__PURE__ */ i(
|
|
698
|
-
|
|
704
|
+
st,
|
|
699
705
|
{
|
|
700
706
|
severity: je.Danger,
|
|
701
707
|
onClose: () => _(!1),
|
|
702
708
|
children: f.formatMessage({ id: "ds.business.cloud-import.refresh-error" })
|
|
703
709
|
}
|
|
704
710
|
),
|
|
705
|
-
/* @__PURE__ */ x(
|
|
711
|
+
/* @__PURE__ */ x(ft, { children: [
|
|
706
712
|
/* @__PURE__ */ i(
|
|
707
713
|
On,
|
|
708
714
|
{
|
|
@@ -722,15 +728,15 @@ function Ot({
|
|
|
722
728
|
)
|
|
723
729
|
);
|
|
724
730
|
},
|
|
725
|
-
renderGroup: (w) => /* @__PURE__ */ x(
|
|
731
|
+
renderGroup: (w) => /* @__PURE__ */ x(Wt, { children: [
|
|
726
732
|
/* @__PURE__ */ i(Mt, { children: w.group }),
|
|
727
|
-
/* @__PURE__ */ i(
|
|
733
|
+
/* @__PURE__ */ i(Ot, { children: w.children })
|
|
728
734
|
] }, w.key),
|
|
729
|
-
renderOption: ({ key: w, ...I }, k) => /* @__PURE__ */ x(
|
|
735
|
+
renderOption: ({ key: w, ...I }, k) => /* @__PURE__ */ x(Ct, { ...I, children: [
|
|
730
736
|
/* @__PURE__ */ i(en, { "aria-hidden": !0, children: we(k) }),
|
|
731
|
-
/* @__PURE__ */ x(
|
|
732
|
-
/* @__PURE__ */ i(
|
|
733
|
-
k.subtitle !== void 0 && /* @__PURE__ */ i(
|
|
737
|
+
/* @__PURE__ */ x(kt, { children: [
|
|
738
|
+
/* @__PURE__ */ i(St, { children: k.label }),
|
|
739
|
+
k.subtitle !== void 0 && /* @__PURE__ */ i(It, { children: k.subtitle })
|
|
734
740
|
] })
|
|
735
741
|
] }, w),
|
|
736
742
|
renderInput: (w) => /* @__PURE__ */ i(
|
|
@@ -746,7 +752,7 @@ function Ot({
|
|
|
746
752
|
id: w.id,
|
|
747
753
|
fullWidth: !0,
|
|
748
754
|
inputProps: w.inputProps,
|
|
749
|
-
startAdornment: /* @__PURE__ */ i(
|
|
755
|
+
startAdornment: /* @__PURE__ */ i(Ft, { "aria-hidden": !0, children: we(G) })
|
|
750
756
|
}
|
|
751
757
|
)
|
|
752
758
|
}
|
|
@@ -774,7 +780,7 @@ function Ot({
|
|
|
774
780
|
}
|
|
775
781
|
) })
|
|
776
782
|
] }),
|
|
777
|
-
/* @__PURE__ */ i(
|
|
783
|
+
/* @__PURE__ */ i(mt, { children: f.formatMessage({ id: "ds.business.cloud-import.filtered-hint" }) }),
|
|
778
784
|
O === "loading" && /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ i(
|
|
779
785
|
Ie,
|
|
780
786
|
{
|
|
@@ -787,7 +793,7 @@ function Ot({
|
|
|
787
793
|
O === "failed" && /* @__PURE__ */ x(ne, { role: "alert", children: [
|
|
788
794
|
f.formatMessage({ id: "ds.business.cloud-import.tree-error" }),
|
|
789
795
|
/* @__PURE__ */ i(
|
|
790
|
-
|
|
796
|
+
Y,
|
|
791
797
|
{
|
|
792
798
|
variant: "outlined",
|
|
793
799
|
onClick: () => void ie(G.space),
|
|
@@ -795,11 +801,11 @@ function Ot({
|
|
|
795
801
|
}
|
|
796
802
|
)
|
|
797
803
|
] }),
|
|
798
|
-
O === "ready" &&
|
|
804
|
+
O === "ready" && W !== null && (W.folders.length === 0 && W.files.length === 0 ? /* @__PURE__ */ x(ne, { children: [
|
|
799
805
|
/* @__PURE__ */ i(Ne, { "aria-hidden": !0 }),
|
|
800
806
|
f.formatMessage({ id: "ds.business.cloud-import.empty-space" })
|
|
801
807
|
] }) : /* @__PURE__ */ i(
|
|
802
|
-
|
|
808
|
+
ht,
|
|
803
809
|
{
|
|
804
810
|
"aria-label": f.formatMessage({
|
|
805
811
|
id: "ds.business.cloud-import.tree-label"
|
|
@@ -807,20 +813,20 @@ function Ot({
|
|
|
807
813
|
children: /* @__PURE__ */ i(
|
|
808
814
|
Je,
|
|
809
815
|
{
|
|
810
|
-
folders:
|
|
811
|
-
files:
|
|
816
|
+
folders: W.folders,
|
|
817
|
+
files: W.files,
|
|
812
818
|
context: pn
|
|
813
819
|
}
|
|
814
820
|
)
|
|
815
821
|
}
|
|
816
822
|
)),
|
|
817
|
-
/* @__PURE__ */ x(
|
|
818
|
-
/* @__PURE__ */ i(
|
|
823
|
+
/* @__PURE__ */ x(wt, { children: [
|
|
824
|
+
/* @__PURE__ */ i(xt, { role: "status", children: f.formatMessage(
|
|
819
825
|
{ id: "ds.business.cloud-import.selected" },
|
|
820
826
|
{ count: T.length }
|
|
821
827
|
) }),
|
|
822
828
|
/* @__PURE__ */ i(
|
|
823
|
-
|
|
829
|
+
Y,
|
|
824
830
|
{
|
|
825
831
|
variant: "contained",
|
|
826
832
|
startIcon: /* @__PURE__ */ i(Rn, { "aria-hidden": !0 }),
|
|
@@ -832,7 +838,7 @@ function Ot({
|
|
|
832
838
|
] })
|
|
833
839
|
] });
|
|
834
840
|
}
|
|
835
|
-
function
|
|
841
|
+
function Rt({
|
|
836
842
|
open: e,
|
|
837
843
|
onClose: n,
|
|
838
844
|
onImport: t,
|
|
@@ -850,7 +856,7 @@ function Tt({
|
|
|
850
856
|
size: He.Medium,
|
|
851
857
|
title: c.formatMessage({ id: "ds.business.cloud-import.title" }),
|
|
852
858
|
children: e && /* @__PURE__ */ i(
|
|
853
|
-
|
|
859
|
+
Tt,
|
|
854
860
|
{
|
|
855
861
|
cloudPicker: r,
|
|
856
862
|
multiple: s,
|
|
@@ -865,14 +871,14 @@ function Tt({
|
|
|
865
871
|
);
|
|
866
872
|
}
|
|
867
873
|
var nn = /* @__PURE__ */ ((e) => (e.Medium = "medium", e.Compact = "compact", e))(nn || {});
|
|
868
|
-
const
|
|
874
|
+
const Et = ze(
|
|
869
875
|
"medium"
|
|
870
876
|
/* Medium */
|
|
871
|
-
),
|
|
877
|
+
), zt = l(le)(({ theme: e }) => ({
|
|
872
878
|
// Three times the largest spacing step: room for a label and the arrow.
|
|
873
879
|
minWidth: o(e.design.space[10] * 3),
|
|
874
880
|
maxWidth: "100%"
|
|
875
|
-
})),
|
|
881
|
+
})), At = l($e)(({ theme: e }) => ({
|
|
876
882
|
position: "relative",
|
|
877
883
|
transform: "none",
|
|
878
884
|
maxWidth: "100%",
|
|
@@ -885,12 +891,12 @@ const Rt = ze(
|
|
|
885
891
|
"&.Mui-focused": { color: e.design.tokens["text.secondary"] },
|
|
886
892
|
"&.Mui-error": { color: e.design.tokens["status.danger"] },
|
|
887
893
|
"&.Mui-disabled": { color: e.design.tokens["text.muted"] }
|
|
888
|
-
})),
|
|
894
|
+
})), Lt = l("span")(({ theme: e }) => ({
|
|
889
895
|
display: "flex",
|
|
890
896
|
alignItems: "center",
|
|
891
897
|
gap: o(e.design.space[2]),
|
|
892
898
|
minWidth: 0
|
|
893
|
-
})),
|
|
899
|
+
})), $t = l("i", {
|
|
894
900
|
shouldForwardProp: (e) => e !== "token"
|
|
895
901
|
})(({ theme: e, token: n }) => ({
|
|
896
902
|
flex: "none",
|
|
@@ -898,11 +904,11 @@ const Rt = ze(
|
|
|
898
904
|
height: o(e.design.space[2]),
|
|
899
905
|
borderRadius: o(e.design.radii.sm / 2),
|
|
900
906
|
backgroundColor: e.design.tokens[n]
|
|
901
|
-
})),
|
|
907
|
+
})), Dt = l("span")({
|
|
902
908
|
display: "flex",
|
|
903
909
|
flexDirection: "column",
|
|
904
910
|
minWidth: 0
|
|
905
|
-
}),
|
|
911
|
+
}), Pt = l("span")(({ theme: e }) => ({
|
|
906
912
|
fontSize: o(e.design.typeScale.caption),
|
|
907
913
|
color: e.design.tokens["text.muted"],
|
|
908
914
|
whiteSpace: "normal"
|
|
@@ -910,10 +916,10 @@ const Rt = ze(
|
|
|
910
916
|
overflow: "hidden",
|
|
911
917
|
textOverflow: "ellipsis",
|
|
912
918
|
whiteSpace: "nowrap"
|
|
913
|
-
}),
|
|
919
|
+
}), Ht = l(pe)(({ theme: e }) => ({
|
|
914
920
|
color: e.design.tokens["text.muted"]
|
|
915
921
|
}));
|
|
916
|
-
function
|
|
922
|
+
function xr({
|
|
917
923
|
label: e,
|
|
918
924
|
options: n,
|
|
919
925
|
value: t,
|
|
@@ -923,10 +929,10 @@ function wr({
|
|
|
923
929
|
error: a,
|
|
924
930
|
size: c
|
|
925
931
|
}) {
|
|
926
|
-
const g = P(), C = Ae(
|
|
932
|
+
const g = P(), C = Ae(Et), y = (c ?? C) === nn.Compact, u = y ? zt : le, h = N(), m = `${h}-label`, p = `${h}-helper`, f = new Map(n.map((v) => [v.value, v]));
|
|
927
933
|
return /* @__PURE__ */ x(u, { fullWidth: !y, disabled: d, error: !!a, children: [
|
|
928
934
|
/* @__PURE__ */ i(
|
|
929
|
-
|
|
935
|
+
At,
|
|
930
936
|
{
|
|
931
937
|
id: m,
|
|
932
938
|
shrink: !0,
|
|
@@ -942,22 +948,22 @@ function wr({
|
|
|
942
948
|
value: t,
|
|
943
949
|
displayEmpty: !0,
|
|
944
950
|
renderValue: (v) => {
|
|
945
|
-
const
|
|
946
|
-
return y &&
|
|
951
|
+
const W = Array.isArray(v) ? v : [v];
|
|
952
|
+
return y && W.length === 0 ? /* @__PURE__ */ i(Ht, { "aria-hidden": !0, children: e }) : /* @__PURE__ */ i(pe, { children: W.map((M) => {
|
|
947
953
|
var O;
|
|
948
|
-
return ((O = f.get(
|
|
954
|
+
return ((O = f.get(M)) == null ? void 0 : O.label) ?? M;
|
|
949
955
|
}).join(", ") });
|
|
950
956
|
},
|
|
951
957
|
"aria-describedby": a ? p : void 0,
|
|
952
958
|
onChange: (v) => r(v.target.value),
|
|
953
959
|
children: [
|
|
954
960
|
n.length === 0 && /* @__PURE__ */ i(Ce, { disabled: !0, value: "", children: g.formatMessage({ id: "ds.inputs.rich-select.empty" }) }),
|
|
955
|
-
n.map((v) => /* @__PURE__ */ i(Ce, { value: v.value, children: /* @__PURE__ */ x(
|
|
956
|
-
v.tone && /* @__PURE__ */ i(
|
|
961
|
+
n.map((v) => /* @__PURE__ */ i(Ce, { value: v.value, children: /* @__PURE__ */ x(Lt, { children: [
|
|
962
|
+
v.tone && /* @__PURE__ */ i($t, { token: v.tone }),
|
|
957
963
|
v.icon,
|
|
958
|
-
/* @__PURE__ */ x(
|
|
964
|
+
/* @__PURE__ */ x(Dt, { children: [
|
|
959
965
|
/* @__PURE__ */ i(pe, { children: v.label }),
|
|
960
|
-
v.description && /* @__PURE__ */ i(
|
|
966
|
+
v.description && /* @__PURE__ */ i(Pt, { children: v.description })
|
|
961
967
|
] })
|
|
962
968
|
] }) }, v.value))
|
|
963
969
|
]
|
|
@@ -966,16 +972,16 @@ function wr({
|
|
|
966
972
|
a && /* @__PURE__ */ i(se, { id: p, children: a })
|
|
967
973
|
] });
|
|
968
974
|
}
|
|
969
|
-
const
|
|
975
|
+
const Nt = l("div")(({ theme: e }) => ({
|
|
970
976
|
display: "flex",
|
|
971
977
|
flexDirection: "column",
|
|
972
978
|
gap: o(e.design.space[2]),
|
|
973
979
|
minWidth: 0
|
|
974
|
-
})),
|
|
980
|
+
})), _t = l("span")(({ theme: e }) => ({
|
|
975
981
|
fontSize: o(e.design.typeScale.small),
|
|
976
982
|
fontWeight: A.medium,
|
|
977
983
|
color: e.design.tokens["text.secondary"]
|
|
978
|
-
})),
|
|
984
|
+
})), Bt = l("div", {
|
|
979
985
|
shouldForwardProp: (e) => e !== "active"
|
|
980
986
|
})(({ theme: e, active: n }) => {
|
|
981
987
|
const { tokens: t, space: r, radii: s } = e.design;
|
|
@@ -997,7 +1003,7 @@ const Ht = l("div")(({ theme: e }) => ({
|
|
|
997
1003
|
transition: oe(e, ["border-color", "background-color"]),
|
|
998
1004
|
"&:hover": { borderColor: t.accent }
|
|
999
1005
|
};
|
|
1000
|
-
}),
|
|
1006
|
+
}), Vt = l("span")(({ theme: e }) => {
|
|
1001
1007
|
const { tokens: n, space: t } = e.design;
|
|
1002
1008
|
return {
|
|
1003
1009
|
display: "inline-flex",
|
|
@@ -1010,30 +1016,30 @@ const Ht = l("div")(({ theme: e }) => ({
|
|
|
1010
1016
|
color: n["accent.text"],
|
|
1011
1017
|
"& svg": { width: o(t[5]), height: o(t[5]) }
|
|
1012
1018
|
};
|
|
1013
|
-
}),
|
|
1019
|
+
}), jt = l("span")(({ theme: e }) => ({
|
|
1014
1020
|
fontSize: o(e.design.typeScale.body),
|
|
1015
1021
|
[Z.down(K.Tablet)]: { display: "none" }
|
|
1016
|
-
})),
|
|
1022
|
+
})), Gt = l("div")(({ theme: e }) => ({
|
|
1017
1023
|
display: "flex",
|
|
1018
1024
|
flexWrap: "wrap",
|
|
1019
1025
|
alignItems: "center",
|
|
1020
1026
|
justifyContent: "space-between",
|
|
1021
1027
|
gap: o(e.design.space[2])
|
|
1022
|
-
})),
|
|
1028
|
+
})), qt = l("span")(({ theme: e }) => ({
|
|
1023
1029
|
fontSize: o(e.design.typeScale.small),
|
|
1024
1030
|
color: e.design.tokens["text.muted"]
|
|
1025
|
-
})),
|
|
1031
|
+
})), Ut = l("p")(({ theme: e }) => ({
|
|
1026
1032
|
margin: 0,
|
|
1027
1033
|
fontSize: o(e.design.typeScale.small),
|
|
1028
1034
|
color: e.design.tokens["status.danger"]
|
|
1029
|
-
})),
|
|
1035
|
+
})), Kt = l("img")(({ theme: e }) => ({
|
|
1030
1036
|
width: o(e.design.space[4]),
|
|
1031
1037
|
height: o(e.design.space[4])
|
|
1032
|
-
})),
|
|
1033
|
-
const { value: n, unit: t } =
|
|
1038
|
+
})), Xt = (e) => {
|
|
1039
|
+
const { value: n, unit: t } = Wn(e);
|
|
1034
1040
|
return `${n} ${t}`;
|
|
1035
1041
|
};
|
|
1036
|
-
function
|
|
1042
|
+
function Cr({
|
|
1037
1043
|
onDrop: e,
|
|
1038
1044
|
multiple: n = !0,
|
|
1039
1045
|
accept: t,
|
|
@@ -1043,7 +1049,7 @@ function xr({
|
|
|
1043
1049
|
cloudImport: a,
|
|
1044
1050
|
children: c
|
|
1045
1051
|
}) {
|
|
1046
|
-
const g = P(), C = N(), y = N(), [u, h] = F(null), [m, p] = F(!1), f = r === void 0 ? null :
|
|
1052
|
+
const g = P(), C = N(), y = N(), [u, h] = F(null), [m, p] = F(!1), f = r === void 0 ? null : Xt(r), b = s ?? (f === null ? null : g.formatMessage(
|
|
1047
1053
|
{ id: "ds.inputs.drop-zone.max-size" },
|
|
1048
1054
|
{ size: f, multiple: String(n) }
|
|
1049
1055
|
)), v = (z, R) => {
|
|
@@ -1060,7 +1066,7 @@ function xr({
|
|
|
1060
1066
|
z.length === 1 ? "too-big" : "some-too-big"
|
|
1061
1067
|
/* SomeTooBig */
|
|
1062
1068
|
) : h(null), re.length > 0 && e(re);
|
|
1063
|
-
}, { getRootProps:
|
|
1069
|
+
}, { getRootProps: W, getInputProps: M, isDragActive: O, open: S } = Sn({
|
|
1064
1070
|
onDrop: v,
|
|
1065
1071
|
multiple: n,
|
|
1066
1072
|
accept: t,
|
|
@@ -1072,18 +1078,18 @@ function xr({
|
|
|
1072
1078
|
{ multiple: String(n) }
|
|
1073
1079
|
);
|
|
1074
1080
|
return /* @__PURE__ */ x(
|
|
1075
|
-
|
|
1081
|
+
Nt,
|
|
1076
1082
|
{
|
|
1077
1083
|
role: "group",
|
|
1078
1084
|
"aria-labelledby": d !== void 0 ? C : void 0,
|
|
1079
1085
|
"aria-describedby": b !== null ? y : void 0,
|
|
1080
1086
|
children: [
|
|
1081
|
-
d !== void 0 && /* @__PURE__ */ i(
|
|
1082
|
-
/* @__PURE__ */ x(
|
|
1083
|
-
/* @__PURE__ */ i("input", { ...
|
|
1087
|
+
d !== void 0 && /* @__PURE__ */ i(_t, { id: C, children: d }),
|
|
1088
|
+
/* @__PURE__ */ x(Bt, { ...W({ onClick: S }), active: O, children: [
|
|
1089
|
+
/* @__PURE__ */ i("input", { ...M({ "aria-hidden": !0 }) }),
|
|
1084
1090
|
c ?? /* @__PURE__ */ x(J, { children: [
|
|
1085
|
-
/* @__PURE__ */ i(
|
|
1086
|
-
/* @__PURE__ */ i(
|
|
1091
|
+
/* @__PURE__ */ i(Vt, { "aria-hidden": !0, children: /* @__PURE__ */ i(Mn, {}) }),
|
|
1092
|
+
/* @__PURE__ */ i(jt, { children: g.formatMessage(
|
|
1087
1093
|
{
|
|
1088
1094
|
id: O ? "ds.inputs.drop-zone.release" : "ds.inputs.drop-zone.prompt"
|
|
1089
1095
|
},
|
|
@@ -1091,7 +1097,7 @@ function xr({
|
|
|
1091
1097
|
) })
|
|
1092
1098
|
] }),
|
|
1093
1099
|
/* @__PURE__ */ i(
|
|
1094
|
-
|
|
1100
|
+
Y,
|
|
1095
1101
|
{
|
|
1096
1102
|
variant: "outlined",
|
|
1097
1103
|
onClick: (z) => {
|
|
@@ -1101,24 +1107,24 @@ function xr({
|
|
|
1101
1107
|
}
|
|
1102
1108
|
)
|
|
1103
1109
|
] }),
|
|
1104
|
-
(a !== void 0 || b !== null) && /* @__PURE__ */ x(
|
|
1110
|
+
(a !== void 0 || b !== null) && /* @__PURE__ */ x(Gt, { children: [
|
|
1105
1111
|
a !== void 0 && /* @__PURE__ */ i(
|
|
1106
|
-
|
|
1112
|
+
Y,
|
|
1107
1113
|
{
|
|
1108
1114
|
variant: "text",
|
|
1109
|
-
startIcon: /* @__PURE__ */ i(
|
|
1115
|
+
startIcon: /* @__PURE__ */ i(Kt, { src: In, alt: "" }),
|
|
1110
1116
|
onClick: () => p(!0),
|
|
1111
1117
|
children: g.formatMessage({ id: "ds.inputs.drop-zone.cloud" })
|
|
1112
1118
|
}
|
|
1113
1119
|
),
|
|
1114
|
-
b !== null && /* @__PURE__ */ i(
|
|
1120
|
+
b !== null && /* @__PURE__ */ i(qt, { id: y, children: b })
|
|
1115
1121
|
] }),
|
|
1116
|
-
u !== null && /* @__PURE__ */ i(
|
|
1122
|
+
u !== null && /* @__PURE__ */ i(Ut, { role: "alert", children: g.formatMessage(
|
|
1117
1123
|
{ id: `ds.inputs.drop-zone.${u}` },
|
|
1118
1124
|
{ size: f ?? "" }
|
|
1119
1125
|
) }),
|
|
1120
1126
|
a !== void 0 && /* @__PURE__ */ i(
|
|
1121
|
-
|
|
1127
|
+
Rt,
|
|
1122
1128
|
{
|
|
1123
1129
|
open: m,
|
|
1124
1130
|
onClose: () => p(!1),
|
|
@@ -1137,21 +1143,21 @@ function xr({
|
|
|
1137
1143
|
);
|
|
1138
1144
|
}
|
|
1139
1145
|
var Yt = /* @__PURE__ */ ((e) => (e.Default = "default", e.Danger = "danger", e.Warning = "warning", e))(Yt || {});
|
|
1140
|
-
const
|
|
1146
|
+
const Qt = l("form")(({ theme: e }) => ({
|
|
1141
1147
|
display: "flex",
|
|
1142
1148
|
flexDirection: "column",
|
|
1143
1149
|
gap: o(e.design.space[4]),
|
|
1144
1150
|
color: e.design.tokens["text.secondary"],
|
|
1145
1151
|
overflowWrap: "anywhere"
|
|
1146
|
-
})),
|
|
1152
|
+
})), Zt = (e, n) => {
|
|
1147
1153
|
const { paper: t } = e.design.tokens, r = e.design.tokens["paper.on"];
|
|
1148
1154
|
return ke(n, t) >= ke(n, r) ? t : r;
|
|
1149
|
-
},
|
|
1155
|
+
}, Jt = {
|
|
1150
1156
|
default: "primary",
|
|
1151
1157
|
danger: "error",
|
|
1152
1158
|
warning: "warning"
|
|
1153
1159
|
};
|
|
1154
|
-
function
|
|
1160
|
+
function eo({
|
|
1155
1161
|
open: e,
|
|
1156
1162
|
title: n,
|
|
1157
1163
|
body: t,
|
|
@@ -1161,12 +1167,12 @@ function Jt({
|
|
|
1161
1167
|
onConfirm: a,
|
|
1162
1168
|
onCancel: c
|
|
1163
1169
|
}) {
|
|
1164
|
-
const g = P(), C = bn(), y = N(), [u, h] = F(""), [m, p] = F(!1), [f, b] = F(!1), [v,
|
|
1165
|
-
e !== v && (
|
|
1166
|
-
const
|
|
1170
|
+
const g = P(), C = bn(), y = N(), [u, h] = F(""), [m, p] = F(!1), [f, b] = F(!1), [v, W] = F(e);
|
|
1171
|
+
e !== v && (W(e), e && (h(""), b(!1)));
|
|
1172
|
+
const M = !m && (d === void 0 || u === d), O = s !== "default", S = () => {
|
|
1167
1173
|
m || c();
|
|
1168
1174
|
}, T = () => {
|
|
1169
|
-
if (!
|
|
1175
|
+
if (!M)
|
|
1170
1176
|
return;
|
|
1171
1177
|
b(!1);
|
|
1172
1178
|
let R;
|
|
@@ -1194,7 +1200,7 @@ function Jt({
|
|
|
1194
1200
|
title: n,
|
|
1195
1201
|
actions: /* @__PURE__ */ x(J, { children: [
|
|
1196
1202
|
/* @__PURE__ */ i(
|
|
1197
|
-
|
|
1203
|
+
Y,
|
|
1198
1204
|
{
|
|
1199
1205
|
variant: "outlined",
|
|
1200
1206
|
disabled: m,
|
|
@@ -1204,18 +1210,18 @@ function Jt({
|
|
|
1204
1210
|
}
|
|
1205
1211
|
),
|
|
1206
1212
|
/* @__PURE__ */ i(
|
|
1207
|
-
|
|
1213
|
+
Y,
|
|
1208
1214
|
{
|
|
1209
1215
|
type: "submit",
|
|
1210
1216
|
form: y,
|
|
1211
1217
|
variant: "contained",
|
|
1212
|
-
color:
|
|
1213
|
-
disabled: !
|
|
1218
|
+
color: Jt[s],
|
|
1219
|
+
disabled: !M,
|
|
1214
1220
|
loading: m,
|
|
1215
1221
|
autoFocus: d === void 0 && !O,
|
|
1216
1222
|
sx: s === "warning" ? {
|
|
1217
1223
|
"&:not(.Mui-disabled)": {
|
|
1218
|
-
color:
|
|
1224
|
+
color: Zt(
|
|
1219
1225
|
C,
|
|
1220
1226
|
C.design.tokens["status.warning"]
|
|
1221
1227
|
)
|
|
@@ -1225,7 +1231,7 @@ function Jt({
|
|
|
1225
1231
|
}
|
|
1226
1232
|
)
|
|
1227
1233
|
] }),
|
|
1228
|
-
children: /* @__PURE__ */ x(
|
|
1234
|
+
children: /* @__PURE__ */ x(Qt, { id: y, onSubmit: z, noValidate: !0, children: [
|
|
1229
1235
|
/* @__PURE__ */ i("div", { children: t }),
|
|
1230
1236
|
d !== void 0 && /* @__PURE__ */ i(
|
|
1231
1237
|
Vn,
|
|
@@ -1248,8 +1254,8 @@ function Jt({
|
|
|
1248
1254
|
);
|
|
1249
1255
|
}
|
|
1250
1256
|
const tn = ze(null);
|
|
1251
|
-
function
|
|
1252
|
-
const [n, t] = F([]), [r, s] = F(null), d =
|
|
1257
|
+
function kr({ children: e }) {
|
|
1258
|
+
const [n, t] = F([]), [r, s] = F(null), d = X(0), a = X([]);
|
|
1253
1259
|
a.current = n;
|
|
1254
1260
|
const c = n.length > 0 ? n[0] : null;
|
|
1255
1261
|
c !== null && c !== r && s(c), V(
|
|
@@ -1272,7 +1278,7 @@ function Cr({ children: e }) {
|
|
|
1272
1278
|
e,
|
|
1273
1279
|
r !== null && // A new key per request: each one starts from an empty confirmation field.
|
|
1274
1280
|
/* @__PURE__ */ i(
|
|
1275
|
-
|
|
1281
|
+
eo,
|
|
1276
1282
|
{
|
|
1277
1283
|
open: c === r,
|
|
1278
1284
|
...r.options,
|
|
@@ -1283,7 +1289,7 @@ function Cr({ children: e }) {
|
|
|
1283
1289
|
)
|
|
1284
1290
|
] });
|
|
1285
1291
|
}
|
|
1286
|
-
function
|
|
1292
|
+
function Sr() {
|
|
1287
1293
|
const e = Ae(tn);
|
|
1288
1294
|
if (e === null)
|
|
1289
1295
|
throw new Error(
|
|
@@ -1291,8 +1297,8 @@ function kr() {
|
|
|
1291
1297
|
);
|
|
1292
1298
|
return e;
|
|
1293
1299
|
}
|
|
1294
|
-
var
|
|
1295
|
-
const
|
|
1300
|
+
var no = /* @__PURE__ */ ((e) => (e.BottomStart = "bottom-start", e.BottomEnd = "bottom-end", e))(no || {});
|
|
1301
|
+
const to = 320, oo = l("div")(({ theme: e }) => {
|
|
1296
1302
|
const { tokens: n, space: t } = e.design;
|
|
1297
1303
|
return {
|
|
1298
1304
|
flex: "none",
|
|
@@ -1303,7 +1309,7 @@ const no = 320, to = l("div")(({ theme: e }) => {
|
|
|
1303
1309
|
padding: `${o(t[2])} ${o(t[2])} ${o(t[2])} ${o(t[4])}`,
|
|
1304
1310
|
borderBottom: D(n["border.subtle"])
|
|
1305
1311
|
};
|
|
1306
|
-
}),
|
|
1312
|
+
}), ro = l("h2")(({ theme: e }) => ({
|
|
1307
1313
|
margin: 0,
|
|
1308
1314
|
minWidth: 0,
|
|
1309
1315
|
color: e.design.tokens["text.primary"],
|
|
@@ -1315,16 +1321,16 @@ const no = 320, to = l("div")(({ theme: e }) => {
|
|
|
1315
1321
|
flexDirection: "column",
|
|
1316
1322
|
gap: o(e.design.space[3]),
|
|
1317
1323
|
fontSize: o(e.design.typeScale.body)
|
|
1318
|
-
})),
|
|
1324
|
+
})), io = l(on)(({ theme: e }) => ({
|
|
1319
1325
|
padding: o(e.design.space[4])
|
|
1320
1326
|
}));
|
|
1321
|
-
function
|
|
1327
|
+
function Ir({
|
|
1322
1328
|
anchorEl: e,
|
|
1323
1329
|
open: n,
|
|
1324
1330
|
onClose: t,
|
|
1325
1331
|
title: r,
|
|
1326
1332
|
placement: s = "bottom-start",
|
|
1327
|
-
width: d =
|
|
1333
|
+
width: d = to,
|
|
1328
1334
|
children: a
|
|
1329
1335
|
}) {
|
|
1330
1336
|
const c = P(), g = N(), C = vn() === K.Mobile, y = c.formatMessage({
|
|
@@ -1365,18 +1371,18 @@ function Sr({
|
|
|
1365
1371
|
}
|
|
1366
1372
|
},
|
|
1367
1373
|
children: [
|
|
1368
|
-
/* @__PURE__ */ x(
|
|
1369
|
-
/* @__PURE__ */ i(
|
|
1374
|
+
/* @__PURE__ */ x(oo, { children: [
|
|
1375
|
+
/* @__PURE__ */ i(ro, { id: g, children: r }),
|
|
1370
1376
|
/* @__PURE__ */ i(ae, { "aria-label": y, onClick: t, children: /* @__PURE__ */ i(_e, { "aria-hidden": !0 }) })
|
|
1371
1377
|
] }),
|
|
1372
|
-
/* @__PURE__ */ i(
|
|
1378
|
+
/* @__PURE__ */ i(io, { children: a })
|
|
1373
1379
|
]
|
|
1374
1380
|
}
|
|
1375
1381
|
);
|
|
1376
1382
|
}
|
|
1377
|
-
const
|
|
1383
|
+
const so = [32, 160, 8239, 8201].map(
|
|
1378
1384
|
(e) => String.fromCharCode(e)
|
|
1379
|
-
),
|
|
1385
|
+
), ao = (e) => {
|
|
1380
1386
|
var t, r;
|
|
1381
1387
|
const n = new Intl.NumberFormat(e).formatToParts(11111.1);
|
|
1382
1388
|
return {
|
|
@@ -1384,7 +1390,7 @@ const io = [32, 160, 8239, 8201].map(
|
|
|
1384
1390
|
decimal: ((r = n.find((s) => s.type === "decimal")) == null ? void 0 : r.value) ?? "."
|
|
1385
1391
|
};
|
|
1386
1392
|
}, Re = (e, n) => {
|
|
1387
|
-
const r = [n.group, ...
|
|
1393
|
+
const r = [n.group, ...so].reduce(
|
|
1388
1394
|
(d, a) => d.split(a).join(""),
|
|
1389
1395
|
e.trim()
|
|
1390
1396
|
).replace(",", ".");
|
|
@@ -1392,12 +1398,12 @@ const io = [32, 160, 8239, 8201].map(
|
|
|
1392
1398
|
return null;
|
|
1393
1399
|
const s = Number.parseFloat(r);
|
|
1394
1400
|
return Number.isFinite(s) ? s : null;
|
|
1395
|
-
},
|
|
1401
|
+
}, lo = l("div", {
|
|
1396
1402
|
shouldForwardProp: (e) => e !== "labelHidden"
|
|
1397
1403
|
})(({ labelHidden: e }) => ({
|
|
1398
1404
|
...e && { [`& .${qn.root}`]: fe }
|
|
1399
1405
|
}));
|
|
1400
|
-
function
|
|
1406
|
+
function Fr({
|
|
1401
1407
|
label: e,
|
|
1402
1408
|
value: n,
|
|
1403
1409
|
onChange: t,
|
|
@@ -1413,7 +1419,7 @@ function Ir({
|
|
|
1413
1419
|
adornment: h
|
|
1414
1420
|
}) {
|
|
1415
1421
|
const m = P(), p = ge(
|
|
1416
|
-
() =>
|
|
1422
|
+
() => ao(m.locale),
|
|
1417
1423
|
[m.locale]
|
|
1418
1424
|
), f = Q(
|
|
1419
1425
|
(S) => S === null ? "" : m.formatNumber(S, {
|
|
@@ -1421,30 +1427,30 @@ function Ir({
|
|
|
1421
1427
|
maximumFractionDigits: r
|
|
1422
1428
|
}),
|
|
1423
1429
|
[m, r]
|
|
1424
|
-
), [b, v] = F(!1), [
|
|
1430
|
+
), [b, v] = F(!1), [W, M] = F(() => f(n));
|
|
1425
1431
|
return V(() => {
|
|
1426
|
-
b ||
|
|
1427
|
-
}, [n, b, f]), /* @__PURE__ */ i(
|
|
1432
|
+
b || M(f(n));
|
|
1433
|
+
}, [n, b, f]), /* @__PURE__ */ i(lo, { labelHidden: a, children: /* @__PURE__ */ i(Ve, { label: e, help: g, error: C, children: /* @__PURE__ */ i(
|
|
1428
1434
|
me,
|
|
1429
1435
|
{
|
|
1430
1436
|
disabled: u,
|
|
1431
|
-
value:
|
|
1437
|
+
value: W,
|
|
1432
1438
|
inputProps: {
|
|
1433
1439
|
inputMode: "decimal",
|
|
1434
1440
|
"aria-label": c,
|
|
1435
1441
|
"data-testid": y
|
|
1436
1442
|
},
|
|
1437
1443
|
onFocus: () => {
|
|
1438
|
-
v(!0), n !== null &&
|
|
1444
|
+
v(!0), n !== null && M(String(n).replace(".", p.decimal));
|
|
1439
1445
|
},
|
|
1440
1446
|
onChange: (S) => {
|
|
1441
|
-
|
|
1447
|
+
M(S.target.value);
|
|
1442
1448
|
const T = Re(S.target.value, p);
|
|
1443
1449
|
T !== null ? t(T) : S.target.value === "" && t(null);
|
|
1444
1450
|
},
|
|
1445
1451
|
onBlur: () => {
|
|
1446
1452
|
v(!1);
|
|
1447
|
-
let S = Re(
|
|
1453
|
+
let S = Re(W, p);
|
|
1448
1454
|
if (S !== null) {
|
|
1449
1455
|
const T = Math.max(S, s);
|
|
1450
1456
|
S = Number.parseFloat(
|
|
@@ -1453,13 +1459,13 @@ function Ir({
|
|
|
1453
1459
|
)
|
|
1454
1460
|
);
|
|
1455
1461
|
}
|
|
1456
|
-
t(S),
|
|
1462
|
+
t(S), M(f(S));
|
|
1457
1463
|
},
|
|
1458
1464
|
endAdornment: h ? /* @__PURE__ */ i(Un, { position: "end", children: h }) : void 0
|
|
1459
1465
|
}
|
|
1460
1466
|
) }) });
|
|
1461
1467
|
}
|
|
1462
|
-
const
|
|
1468
|
+
const Wr = { l: 0.72, c: 0.12 }, Mr = [
|
|
1463
1469
|
266,
|
|
1464
1470
|
296,
|
|
1465
1471
|
326,
|
|
@@ -1485,25 +1491,25 @@ const Fr = { l: 0.72, c: 0.12 }, Mr = [
|
|
|
1485
1491
|
"#37bda2",
|
|
1486
1492
|
"#18b9c9",
|
|
1487
1493
|
"#4eb0e5"
|
|
1488
|
-
],
|
|
1489
|
-
const n =
|
|
1494
|
+
], Or = "#767676", Tr = rn[6], Rr = "#111a2f", Er = "#5674be", co = /^#?([0-9a-f]{6})$/i, q = (e) => {
|
|
1495
|
+
const n = co.exec(e.trim());
|
|
1490
1496
|
return n ? `#${n[1].toLowerCase()}` : null;
|
|
1491
|
-
},
|
|
1497
|
+
}, uo = l("div")(({ theme: e }) => ({
|
|
1492
1498
|
display: "flex",
|
|
1493
1499
|
alignItems: "center",
|
|
1494
1500
|
gap: o(e.design.space[3])
|
|
1495
|
-
})),
|
|
1501
|
+
})), po = l("span")(({ theme: e }) => ({
|
|
1496
1502
|
flex: "none",
|
|
1497
1503
|
width: o(e.design.densityValues[e.design.density].control),
|
|
1498
1504
|
height: o(e.design.densityValues[e.design.density].control),
|
|
1499
1505
|
borderRadius: o(e.design.radii.md),
|
|
1500
1506
|
border: D(e.design.tokens["border.control"])
|
|
1501
|
-
})),
|
|
1507
|
+
})), go = l("div")(({ theme: e }) => ({
|
|
1502
1508
|
display: "flex",
|
|
1503
1509
|
flexWrap: "wrap",
|
|
1504
1510
|
gap: o(e.design.space[2]),
|
|
1505
1511
|
marginTop: o(e.design.space[2])
|
|
1506
|
-
})),
|
|
1512
|
+
})), fo = l(Be)(({ theme: e }) => {
|
|
1507
1513
|
const { densityValues: n, density: t, space: r } = e.design, s = n[t].control - r[2];
|
|
1508
1514
|
return {
|
|
1509
1515
|
width: o(s),
|
|
@@ -1519,7 +1525,7 @@ const Fr = { l: 0.72, c: 0.12 }, Mr = [
|
|
|
1519
1525
|
}
|
|
1520
1526
|
};
|
|
1521
1527
|
});
|
|
1522
|
-
function
|
|
1528
|
+
function zr({
|
|
1523
1529
|
label: e,
|
|
1524
1530
|
value: n,
|
|
1525
1531
|
onChange: t,
|
|
@@ -1538,9 +1544,9 @@ function Er({
|
|
|
1538
1544
|
}, y = q(n);
|
|
1539
1545
|
return /* @__PURE__ */ x(le, { fullWidth: !0, error: g, children: [
|
|
1540
1546
|
/* @__PURE__ */ i($e, { htmlFor: `${d}-hex`, children: e }),
|
|
1541
|
-
/* @__PURE__ */ x(
|
|
1547
|
+
/* @__PURE__ */ x(uo, { children: [
|
|
1542
1548
|
/* @__PURE__ */ i(
|
|
1543
|
-
|
|
1549
|
+
po,
|
|
1544
1550
|
{
|
|
1545
1551
|
"aria-hidden": "true",
|
|
1546
1552
|
style: { backgroundColor: y ?? void 0 }
|
|
@@ -1564,12 +1570,12 @@ function Er({
|
|
|
1564
1570
|
] }),
|
|
1565
1571
|
g && /* @__PURE__ */ i(se, { id: `${d}-error`, children: s.formatMessage({ id: "ds.inputs.color.invalid" }) }),
|
|
1566
1572
|
/* @__PURE__ */ i(
|
|
1567
|
-
|
|
1573
|
+
go,
|
|
1568
1574
|
{
|
|
1569
1575
|
role: "group",
|
|
1570
1576
|
"aria-label": s.formatMessage({ id: "ds.inputs.color.swatches" }),
|
|
1571
1577
|
children: r.map((u) => /* @__PURE__ */ i(
|
|
1572
|
-
|
|
1578
|
+
fo,
|
|
1573
1579
|
{
|
|
1574
1580
|
"aria-pressed": q(u) === y,
|
|
1575
1581
|
"aria-label": u,
|
|
@@ -1582,10 +1588,10 @@ function Er({
|
|
|
1582
1588
|
)
|
|
1583
1589
|
] });
|
|
1584
1590
|
}
|
|
1585
|
-
const
|
|
1591
|
+
const mo = 6, ho = l("div", {
|
|
1586
1592
|
shouldForwardProp: (e) => e !== "edges"
|
|
1587
1593
|
})(({ theme: e, edges: n }) => {
|
|
1588
|
-
const { tokens: t, radii: r, space: s } = e.design, d = o(s[1] *
|
|
1594
|
+
const { tokens: t, radii: r, space: s } = e.design, d = o(s[1] * mo), a = t["text.primary"], c = n.start ? `transparent, ${a} ${d}` : a, g = n.end ? `${a} calc(100% - ${d}), transparent` : a;
|
|
1589
1595
|
return {
|
|
1590
1596
|
maskImage: n.start || n.end ? `linear-gradient(to right, ${c}, ${g})` : "none",
|
|
1591
1597
|
display: "inline-flex",
|
|
@@ -1610,7 +1616,7 @@ const fo = 6, mo = l("div", {
|
|
|
1610
1616
|
backgroundColor: "transparent"
|
|
1611
1617
|
}
|
|
1612
1618
|
};
|
|
1613
|
-
}),
|
|
1619
|
+
}), bo = l(Be)(({ theme: e }) => {
|
|
1614
1620
|
const { tokens: n, space: t, typeScale: r, fonts: s, densityValues: d, radii: a } = e.design;
|
|
1615
1621
|
return {
|
|
1616
1622
|
flex: "none",
|
|
@@ -1642,26 +1648,26 @@ const fo = 6, mo = l("div", {
|
|
|
1642
1648
|
'&[aria-checked="true"]': { backgroundColor: n["bg.raised"] }
|
|
1643
1649
|
}
|
|
1644
1650
|
};
|
|
1645
|
-
}),
|
|
1651
|
+
}), yo = l("span")(({ theme: e }) => ({
|
|
1646
1652
|
display: "inline-flex",
|
|
1647
1653
|
flex: "none",
|
|
1648
1654
|
"& svg": {
|
|
1649
1655
|
width: o(e.design.space[4]),
|
|
1650
1656
|
height: o(e.design.space[4])
|
|
1651
1657
|
}
|
|
1652
|
-
})),
|
|
1658
|
+
})), vo = l("span")(fe), wo = l("span")(({ theme: e }) => ({
|
|
1653
1659
|
fontFamily: e.design.fonts.mono,
|
|
1654
1660
|
fontSize: o(e.design.typeScale.caption),
|
|
1655
1661
|
color: e.design.tokens["text.muted"]
|
|
1656
1662
|
}));
|
|
1657
|
-
function
|
|
1663
|
+
function Ar({
|
|
1658
1664
|
options: e,
|
|
1659
1665
|
value: n,
|
|
1660
1666
|
onChange: t,
|
|
1661
1667
|
ariaLabel: r,
|
|
1662
1668
|
testId: s
|
|
1663
1669
|
}) {
|
|
1664
|
-
const d =
|
|
1670
|
+
const d = X(null), [a, c] = F({ start: !1, end: !1 }), g = Q(() => {
|
|
1665
1671
|
const u = d.current;
|
|
1666
1672
|
if (!u)
|
|
1667
1673
|
return;
|
|
@@ -1699,7 +1705,7 @@ function zr({
|
|
|
1699
1705
|
0
|
|
1700
1706
|
);
|
|
1701
1707
|
return /* @__PURE__ */ i(
|
|
1702
|
-
|
|
1708
|
+
ho,
|
|
1703
1709
|
{
|
|
1704
1710
|
ref: d,
|
|
1705
1711
|
role: "radiogroup",
|
|
@@ -1711,7 +1717,7 @@ function zr({
|
|
|
1711
1717
|
children: e.map((u, h) => {
|
|
1712
1718
|
const m = u.value === n;
|
|
1713
1719
|
return /* @__PURE__ */ x(
|
|
1714
|
-
|
|
1720
|
+
bo,
|
|
1715
1721
|
{
|
|
1716
1722
|
role: "radio",
|
|
1717
1723
|
"aria-checked": m,
|
|
@@ -1721,9 +1727,9 @@ function zr({
|
|
|
1721
1727
|
tabIndex: h === y ? 0 : -1,
|
|
1722
1728
|
onClick: () => t(u.value),
|
|
1723
1729
|
children: [
|
|
1724
|
-
u.icon !== void 0 && /* @__PURE__ */ i(
|
|
1725
|
-
u.icon !== void 0 && u.iconOnly ? /* @__PURE__ */ i(
|
|
1726
|
-
u.count !== void 0 && /* @__PURE__ */ i(
|
|
1730
|
+
u.icon !== void 0 && /* @__PURE__ */ i(yo, { "aria-hidden": !0, children: u.icon }),
|
|
1731
|
+
u.icon !== void 0 && u.iconOnly ? /* @__PURE__ */ i(vo, { children: u.label }) : u.label,
|
|
1732
|
+
u.count !== void 0 && /* @__PURE__ */ i(wo, { children: u.count })
|
|
1727
1733
|
]
|
|
1728
1734
|
},
|
|
1729
1735
|
u.value
|
|
@@ -1732,10 +1738,10 @@ function zr({
|
|
|
1732
1738
|
}
|
|
1733
1739
|
);
|
|
1734
1740
|
}
|
|
1735
|
-
const
|
|
1741
|
+
const xo = 1, Co = (e, n) => n === "vertical" ? e.scrollHeight - e.clientHeight - e.scrollTop : e.scrollWidth - e.clientWidth - e.scrollLeft, ko = (e, n, t) => {
|
|
1736
1742
|
const [r, s] = F(!1), d = Q(() => {
|
|
1737
1743
|
const a = e.current;
|
|
1738
|
-
a !== null && s(
|
|
1744
|
+
a !== null && s(Co(a, n) > xo);
|
|
1739
1745
|
}, [e, n]);
|
|
1740
1746
|
return Le(d, [d, t]), V(() => {
|
|
1741
1747
|
const a = e.current;
|
|
@@ -1748,8 +1754,8 @@ const wo = 1, xo = (e, n) => n === "vertical" ? e.scrollHeight - e.clientHeight
|
|
|
1748
1754
|
};
|
|
1749
1755
|
}, [e, d, t]), r;
|
|
1750
1756
|
};
|
|
1751
|
-
var
|
|
1752
|
-
const
|
|
1757
|
+
var So = /* @__PURE__ */ ((e) => (e.Primary = "primary", e.Secondary = "secondary", e))(So || {});
|
|
1758
|
+
const Io = 2, Fo = /* @__PURE__ */ new Set(["Enter", " "]), Wo = l("div", {
|
|
1753
1759
|
shouldForwardProp: (e) => e !== "variant"
|
|
1754
1760
|
})(({ theme: e, variant: n }) => ({
|
|
1755
1761
|
minWidth: 0,
|
|
@@ -1812,7 +1818,7 @@ const So = 2, Io = /* @__PURE__ */ new Set(["Enter", " "]), Fo = l("div", {
|
|
|
1812
1818
|
left: 0,
|
|
1813
1819
|
right: 0,
|
|
1814
1820
|
bottom: 0,
|
|
1815
|
-
height: o(
|
|
1821
|
+
height: o(Io),
|
|
1816
1822
|
backgroundColor: t.accent
|
|
1817
1823
|
},
|
|
1818
1824
|
...y
|
|
@@ -1833,7 +1839,7 @@ const So = 2, Io = /* @__PURE__ */ new Set(["Enter", " "]), Fo = l("div", {
|
|
|
1833
1839
|
},
|
|
1834
1840
|
...y
|
|
1835
1841
|
};
|
|
1836
|
-
}, ln = (e) => e !== "variant",
|
|
1842
|
+
}, ln = (e) => e !== "variant", Oo = l(Xn, { shouldForwardProp: ln })(({ theme: e, variant: n }) => an(e, n)), To = l("button", { shouldForwardProp: ln })(({ theme: e, variant: n }) => an(e, n)), Ro = l("span")(({ theme: e }) => {
|
|
1837
1843
|
const { tokens: n, space: t, radii: r, fonts: s, typeScale: d } = e.design;
|
|
1838
1844
|
return {
|
|
1839
1845
|
display: "inline-flex",
|
|
@@ -1851,14 +1857,14 @@ const So = 2, Io = /* @__PURE__ */ new Set(["Enter", " "]), Fo = l("div", {
|
|
|
1851
1857
|
const t = n.offsetLeft, r = t + n.offsetWidth + sn;
|
|
1852
1858
|
t < e.scrollLeft ? e.scrollLeft = t : r > e.scrollLeft + e.clientWidth && (e.scrollLeft = r - e.clientWidth);
|
|
1853
1859
|
};
|
|
1854
|
-
function
|
|
1860
|
+
function Lr({
|
|
1855
1861
|
items: e,
|
|
1856
1862
|
value: n,
|
|
1857
1863
|
onChange: t,
|
|
1858
1864
|
variant: r,
|
|
1859
1865
|
"aria-label": s
|
|
1860
1866
|
}) {
|
|
1861
|
-
const d = P(), a =
|
|
1867
|
+
const d = P(), a = X(null), c = e.filter((p) => p.hidden !== !0), g = ko(a, "horizontal", c.length), C = Q(
|
|
1862
1868
|
() => {
|
|
1863
1869
|
var p;
|
|
1864
1870
|
return Array.from(
|
|
@@ -1880,10 +1886,10 @@ function Ar({
|
|
|
1880
1886
|
return f.observe(p), Array.from(p.children).forEach((b) => f.observe(b)), () => f.disconnect();
|
|
1881
1887
|
}, [y, u]);
|
|
1882
1888
|
const h = (p) => {
|
|
1883
|
-
const f = C(), b = f.findIndex((
|
|
1889
|
+
const f = C(), b = f.findIndex((W) => W === document.activeElement);
|
|
1884
1890
|
if (b < 0)
|
|
1885
1891
|
return;
|
|
1886
|
-
if (
|
|
1892
|
+
if (Fo.has(p.key)) {
|
|
1887
1893
|
p.key === " " && f[b] instanceof HTMLAnchorElement && (p.preventDefault(), f[b].click());
|
|
1888
1894
|
return;
|
|
1889
1895
|
}
|
|
@@ -1909,7 +1915,7 @@ function Ar({
|
|
|
1909
1915
|
c.findIndex((p) => p.value === n),
|
|
1910
1916
|
0
|
|
1911
1917
|
);
|
|
1912
|
-
return /* @__PURE__ */ i(
|
|
1918
|
+
return /* @__PURE__ */ i(Wo, { variant: r, children: /* @__PURE__ */ i(
|
|
1913
1919
|
Mo,
|
|
1914
1920
|
{
|
|
1915
1921
|
ref: a,
|
|
@@ -1922,8 +1928,8 @@ function Ar({
|
|
|
1922
1928
|
children: c.map((p, f) => {
|
|
1923
1929
|
const b = p.value === n, v = /* @__PURE__ */ x(J, { children: [
|
|
1924
1930
|
p.label,
|
|
1925
|
-
p.badge !== void 0 && /* @__PURE__ */ i(
|
|
1926
|
-
] }),
|
|
1931
|
+
p.badge !== void 0 && /* @__PURE__ */ i(Ro, { children: typeof p.badge == "number" ? d.formatNumber(p.badge) : p.badge })
|
|
1932
|
+
] }), W = {
|
|
1927
1933
|
role: "tab",
|
|
1928
1934
|
"aria-selected": b,
|
|
1929
1935
|
tabIndex: f === m ? 0 : -1,
|
|
@@ -1932,47 +1938,47 @@ function Ar({
|
|
|
1932
1938
|
onClick: () => t == null ? void 0 : t(p.value)
|
|
1933
1939
|
};
|
|
1934
1940
|
return p.to !== void 0 ? /* @__PURE__ */ i(
|
|
1935
|
-
|
|
1941
|
+
Oo,
|
|
1936
1942
|
{
|
|
1937
1943
|
to: p.to,
|
|
1938
1944
|
"aria-current": b ? "page" : void 0,
|
|
1939
|
-
...
|
|
1945
|
+
...W,
|
|
1940
1946
|
children: v
|
|
1941
1947
|
},
|
|
1942
1948
|
p.value
|
|
1943
|
-
) : /* @__PURE__ */ i(
|
|
1949
|
+
) : /* @__PURE__ */ i(To, { type: "button", ...W, children: v }, p.value);
|
|
1944
1950
|
})
|
|
1945
1951
|
}
|
|
1946
1952
|
) });
|
|
1947
1953
|
}
|
|
1948
1954
|
export {
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1955
|
+
Ir as A,
|
|
1956
|
+
st as C,
|
|
1957
|
+
Cr as D,
|
|
1952
1958
|
Ve as F,
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1959
|
+
Rt as I,
|
|
1960
|
+
Fr as N,
|
|
1961
|
+
xr as R,
|
|
1962
|
+
Ar as S,
|
|
1963
|
+
So as T,
|
|
1958
1964
|
je as a,
|
|
1959
|
-
|
|
1965
|
+
Et as b,
|
|
1960
1966
|
nn as c,
|
|
1961
1967
|
Yt as d,
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1968
|
+
eo as e,
|
|
1969
|
+
ko as f,
|
|
1970
|
+
Tt as g,
|
|
1971
|
+
zr as h,
|
|
1972
|
+
no as i,
|
|
1973
|
+
kr as j,
|
|
1974
|
+
Lr as k,
|
|
1975
|
+
Wr as l,
|
|
1970
1976
|
Mr as m,
|
|
1971
1977
|
q as n,
|
|
1972
1978
|
rn as o,
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1979
|
+
Or as p,
|
|
1980
|
+
Tr as q,
|
|
1981
|
+
Rr as r,
|
|
1982
|
+
Er as s,
|
|
1983
|
+
Sr as u
|
|
1978
1984
|
};
|