@abyss-project/commons-front-core 17.2.1 → 18.0.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/CHANGELOG.md +16 -0
- package/README.md +2 -1
- package/catalog/captures-plan.ts +120 -116
- package/catalog/catalog-entries.ts +149 -148
- package/catalog/pages/AppShell.tsx +18 -9
- package/catalog/pages/CookieConsent.tsx +54 -31
- package/catalog/pages/DeliveryHistory.tsx +66 -66
- package/catalog/pages/DeliverySubscriptions.tsx +110 -110
- package/catalog/pages/ScheduledTasks.tsx +117 -117
- package/catalog/pages/index.ts +166 -165
- package/catalog/playwright.ci.config.ts +4 -3
- package/catalog/specs/captures.spec.ts +145 -145
- package/catalog/specs/cookie-consent-modal.spec.ts +187 -0
- package/catalog/specs/write-capture-index.ts +81 -81
- package/dist/CookieConsentSettings-B7HIIzyI.js +595 -0
- package/dist/{Surface-BDfRxVLj.js → Surface-dziv23sf.js} +56 -51
- package/dist/{Tabs-DEY2HEqj.js → Tabs-_onUZBA-.js} +613 -591
- package/dist/components/business/CookieConsent/AbyssCookieConsentProvider.d.ts +11 -3
- package/dist/components/business/CookieConsent/CookieConsentBanner.d.ts +4 -3
- package/dist/components/business/CookieConsent/CookieConsentPreferences.d.ts +12 -0
- package/dist/components/business/CookieConsent/index.d.ts +2 -0
- package/dist/components/business/CookieConsent/use-banner-portal.d.ts +36 -0
- package/dist/components/inputs/NumberField/NumberField.d.ts +18 -2
- package/dist/components/layers/Toast/toast-clearance.d.ts +5 -0
- package/dist/components/structure/AccountMenu/AccountMenu.d.ts +2 -1
- package/dist/components/structure/AppShell/SpaceSwitcher.d.ts +4 -2
- package/dist/components/structure/AppShell/app-shell.types.d.ts +5 -1
- package/dist/components/structure/FilterBar/FilterBar.d.ts +7 -2
- package/dist/cookie-consent.js +26 -17
- package/dist/{design-theme-Bd0pEPei.js → design-theme-B3C3z1gE.js} +1 -1
- package/dist/{editors-CtkDomwX.js → editors-BhQlONOy.js} +27 -27
- package/dist/editors.js +1 -1
- package/dist/hooks/use-cookie-consent.hook.spec.d.ts +1 -0
- package/dist/hooks/use-rich-intl.hook.d.ts +2 -0
- package/dist/{index-DKsvuaEj.js → index-B6LMTOKG.js} +3 -3
- package/dist/{index-B9avfa3r.js → index-B6w5_TeJ.js} +3 -3
- package/dist/{index-Ch8JqU5w.js → index-BBF-FvT6.js} +2 -2
- package/dist/{index-CqgMX8kF.js → index-BGAZK8Vk.js} +2 -2
- package/dist/{index-DnQguWf1.js → index-BGJobvxw.js} +1 -1
- package/dist/{index-SN7FZBya.js → index-BTDlbjWW.js} +2 -2
- package/dist/{index-Cl3hwdsZ.js → index-BcjlG5TB.js} +2 -2
- package/dist/{index-CSdO6zlX.js → index-BeMiREqf.js} +2 -2
- package/dist/{index-psJ1Q-lU.js → index-ByN6DcaL.js} +2 -2
- package/dist/{index-DtpGwH5a.js → index-CJI1dJrw.js} +3 -3
- package/dist/{index-CEjiERmo.js → index-D1mQgWN3.js} +2 -2
- package/dist/{index-BcXqvMY8.js → index-DLlWMDxB.js} +4 -4
- package/dist/{index-DFZlN4E3.js → index-DNd8NZnu.js} +4 -4
- package/dist/{index-mUtvzoSi.js → index-Dakpr4C1.js} +3 -3
- package/dist/{index-D0EF36wh.js → index-DkZAsKob.js} +2 -2
- package/dist/{index-FUuoLSZ0.js → index-DprTO7yi.js} +4 -4
- package/dist/{index-DZbCUZUp.js → index-N4BwXTyk.js} +2 -2
- package/dist/{index-IVjoNq-p.js → index-V4F4Sk7y.js} +2 -2
- package/dist/{index-DcV2fWbx.js → index-y-TnfE6Z.js} +2 -2
- package/dist/{index-DtncSsmw.js → index-yFJTDKIX.js} +2 -2
- package/dist/{index-DVBqUPxf.js → index-ytgNPz5f.js} +2 -2
- package/dist/index.js +3480 -3417
- package/dist/legacy.js +1728 -1707
- package/dist/translations/en.d.ts +1 -0
- package/dist/translations/fr.d.ts +1 -0
- package/dist/utils/cookie-consent-contract.d.ts +55 -0
- package/dist/utils/cookie-consent-contract.spec.d.ts +1 -0
- package/dist/utils/cookie-storage.utils.d.ts +1 -8
- package/dist/utils/index.d.ts +1 -0
- package/package.json +1 -1
- package/dist/CookieConsentSettings-CtLrSfve.js +0 -505
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { jsxs as x, jsx as i, Fragment as J } from "react/jsx-runtime";
|
|
2
|
-
import { useId as
|
|
2
|
+
import { useId as N, cloneElement as mn, useState as F, useMemo as ge, useRef as Y, 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
|
-
import
|
|
6
|
-
import
|
|
5
|
+
import $e from "@mui/material/InputLabel";
|
|
6
|
+
import Ce from "@mui/material/MenuItem";
|
|
7
7
|
import hn from "@mui/material/Select";
|
|
8
|
-
import { styled as l, useTheme as bn, getContrastRatio as
|
|
9
|
-
import { visuallyHidden as
|
|
10
|
-
import { useIntl as
|
|
11
|
-
import { a as
|
|
8
|
+
import { styled as l, useTheme as bn, getContrastRatio as ke } from "@mui/material/styles";
|
|
9
|
+
import { visuallyHidden as fe } from "@mui/utils";
|
|
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, e as yn, t as De, s as de, g as oe, i as te, M as Pe, c as He, j as vn, B as wn } from "./Surface-dziv23sf.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
13
|
import X from "@mui/material/Button";
|
|
14
14
|
import { byteSizeIEC as Mn } from "@abyss-project/main";
|
|
15
15
|
import On from "@mui/icons-material/FileUploadOutlined";
|
|
16
|
-
import Wn, { autocompleteClasses as
|
|
17
|
-
import
|
|
16
|
+
import Wn, { autocompleteClasses as Se } from "@mui/material/Autocomplete";
|
|
17
|
+
import Ie from "@mui/material/CircularProgress";
|
|
18
18
|
import ae from "@mui/material/IconButton";
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
19
|
+
import me from "@mui/material/OutlinedInput";
|
|
20
|
+
import Fe from "@mui/material/Tooltip";
|
|
21
|
+
import Me 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";
|
|
@@ -36,17 +36,17 @@ import _n from "@mui/icons-material/ChevronRightRounded";
|
|
|
36
36
|
import Bn from "@mui/material/Alert";
|
|
37
37
|
import Vn from "@mui/material/TextField";
|
|
38
38
|
import jn from "@mui/material/Popover";
|
|
39
|
-
import Gn from "@mui/material/
|
|
40
|
-
import
|
|
41
|
-
import { isMuiElement as
|
|
39
|
+
import Gn, { formLabelClasses as qn } from "@mui/material/FormLabel";
|
|
40
|
+
import Un from "@mui/material/InputAdornment";
|
|
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 Yn } from "react-router-dom";
|
|
44
|
+
const Xn = l(Gn)(({ theme: e }) => ({
|
|
45
45
|
display: "block",
|
|
46
46
|
maxWidth: "100%",
|
|
47
47
|
marginBottom: o(e.design.space[2]),
|
|
48
48
|
fontSize: o(e.design.typeScale.small),
|
|
49
|
-
fontWeight:
|
|
49
|
+
fontWeight: A.medium,
|
|
50
50
|
lineHeight: e.typography.caption.lineHeight,
|
|
51
51
|
color: e.design.tokens["text.secondary"],
|
|
52
52
|
"&.Mui-focused": { color: e.design.tokens["text.secondary"] },
|
|
@@ -60,16 +60,16 @@ function Ve({
|
|
|
60
60
|
required: r = !1,
|
|
61
61
|
children: s
|
|
62
62
|
}) {
|
|
63
|
-
const
|
|
63
|
+
const d = N(), a = s.props.id ?? d, c = `${a}-label`, g = n !== void 0 ? `${a}-help` : void 0, C = t != null && t !== !1 && t !== "", y = C && t !== !0, u = y ? `${a}-error` : void 0, h = [s.props["aria-describedby"], g, u].filter((p) => p !== void 0 && p !== "").join(" ") || void 0, m = mn(s, {
|
|
64
64
|
id: a,
|
|
65
65
|
"aria-describedby": h,
|
|
66
|
-
...
|
|
66
|
+
...Kn(s, ["Select"]) && { labelId: c }
|
|
67
67
|
});
|
|
68
|
-
return /* @__PURE__ */ x(le, { fullWidth: !0, error:
|
|
69
|
-
/* @__PURE__ */ i(
|
|
68
|
+
return /* @__PURE__ */ x(le, { fullWidth: !0, error: C, required: r, children: [
|
|
69
|
+
/* @__PURE__ */ i(Xn, { id: c, htmlFor: a, children: e }),
|
|
70
70
|
m,
|
|
71
|
-
n !== void 0 && /* @__PURE__ */ i(se, { id:
|
|
72
|
-
|
|
71
|
+
n !== void 0 && /* @__PURE__ */ i(se, { id: g, error: !1, children: n }),
|
|
72
|
+
y && /* @__PURE__ */ i(se, { id: u, children: t })
|
|
73
73
|
] });
|
|
74
74
|
}
|
|
75
75
|
var je = /* @__PURE__ */ ((e) => (e.Info = "info", e.Success = "success", e.Warning = "warning", e.Danger = "danger", e))(je || {});
|
|
@@ -87,15 +87,15 @@ const Ge = {
|
|
|
87
87
|
solid: "status.danger",
|
|
88
88
|
soft: "status.danger.soft"
|
|
89
89
|
}
|
|
90
|
-
},
|
|
90
|
+
}, Qn = {
|
|
91
91
|
info: $n,
|
|
92
92
|
success: An,
|
|
93
93
|
warning: Dn,
|
|
94
94
|
danger: Ln
|
|
95
|
-
},
|
|
95
|
+
}, Zn = l("div", {
|
|
96
96
|
shouldForwardProp: (e) => e !== "severity"
|
|
97
97
|
})(({ theme: e, severity: n }) => {
|
|
98
|
-
const { tokens: t, space: r, radii: s, fonts:
|
|
98
|
+
const { tokens: t, space: r, radii: s, fonts: d, typeScale: a } = e.design, { solid: c, soft: g } = Ge[n];
|
|
99
99
|
return {
|
|
100
100
|
display: "flex",
|
|
101
101
|
alignItems: "flex-start",
|
|
@@ -103,14 +103,14 @@ const Ge = {
|
|
|
103
103
|
minWidth: 0,
|
|
104
104
|
boxSizing: "border-box",
|
|
105
105
|
padding: `${o(r[3])} ${o(r[3])} ${o(r[3])} ${o(r[4])}`,
|
|
106
|
-
backgroundColor: t[
|
|
107
|
-
border:
|
|
106
|
+
backgroundColor: t[g],
|
|
107
|
+
border: D(t[c]),
|
|
108
108
|
borderRadius: o(s.md),
|
|
109
109
|
color: t["text.primary"],
|
|
110
|
-
fontFamily:
|
|
110
|
+
fontFamily: d.sans,
|
|
111
111
|
fontSize: o(a.body)
|
|
112
112
|
};
|
|
113
|
-
}),
|
|
113
|
+
}), Jn = l("span", {
|
|
114
114
|
shouldForwardProp: (e) => e !== "severity"
|
|
115
115
|
})(({ theme: e, severity: n }) => {
|
|
116
116
|
const { tokens: t, space: r } = e.design;
|
|
@@ -125,7 +125,7 @@ const Ge = {
|
|
|
125
125
|
height: o(r[4] + r[1])
|
|
126
126
|
}
|
|
127
127
|
};
|
|
128
|
-
}),
|
|
128
|
+
}), et = l("div")(({ theme: e }) => ({
|
|
129
129
|
display: "flex",
|
|
130
130
|
flex: "1 1 auto",
|
|
131
131
|
flexWrap: "wrap",
|
|
@@ -137,7 +137,7 @@ const Ge = {
|
|
|
137
137
|
flexDirection: "column",
|
|
138
138
|
alignItems: "flex-start"
|
|
139
139
|
}
|
|
140
|
-
})),
|
|
140
|
+
})), nt = l("div")(({ theme: e }) => ({
|
|
141
141
|
display: "flex",
|
|
142
142
|
flexDirection: "column",
|
|
143
143
|
gap: o(e.design.space[1]),
|
|
@@ -146,41 +146,41 @@ const Ge = {
|
|
|
146
146
|
paddingTop: o(e.design.space[1] / 2),
|
|
147
147
|
lineHeight: e.typography.body2.lineHeight,
|
|
148
148
|
overflowWrap: "anywhere"
|
|
149
|
-
})),
|
|
149
|
+
})), tt = l("strong")({
|
|
150
150
|
display: "block",
|
|
151
|
-
fontWeight:
|
|
152
|
-
}),
|
|
151
|
+
fontWeight: A.semibold
|
|
152
|
+
}), ot = l("div")({
|
|
153
153
|
display: "flex",
|
|
154
154
|
flex: "none",
|
|
155
155
|
alignItems: "center"
|
|
156
|
-
}),
|
|
157
|
-
function
|
|
156
|
+
}), rt = l(ae)(({ theme: e }) => yn(e));
|
|
157
|
+
function it({
|
|
158
158
|
severity: e,
|
|
159
159
|
title: n,
|
|
160
160
|
children: t,
|
|
161
161
|
action: r,
|
|
162
162
|
onClose: s,
|
|
163
|
-
icon:
|
|
163
|
+
icon: d
|
|
164
164
|
}) {
|
|
165
|
-
const a =
|
|
165
|
+
const a = P(), c = N(), g = Qn[e];
|
|
166
166
|
return /* @__PURE__ */ x(
|
|
167
|
-
|
|
167
|
+
Zn,
|
|
168
168
|
{
|
|
169
169
|
severity: e,
|
|
170
170
|
role: e === "danger" ? "alert" : "status",
|
|
171
|
-
"aria-labelledby": n !== void 0 ?
|
|
171
|
+
"aria-labelledby": n !== void 0 ? c : void 0,
|
|
172
172
|
"data-severity": e,
|
|
173
173
|
children: [
|
|
174
|
-
/* @__PURE__ */ i(
|
|
175
|
-
/* @__PURE__ */ x(
|
|
176
|
-
/* @__PURE__ */ x(
|
|
177
|
-
n !== void 0 && /* @__PURE__ */ i(
|
|
174
|
+
/* @__PURE__ */ i(Jn, { severity: e, "aria-hidden": !0, children: d ?? /* @__PURE__ */ i(g, {}) }),
|
|
175
|
+
/* @__PURE__ */ x(et, { children: [
|
|
176
|
+
/* @__PURE__ */ x(nt, { children: [
|
|
177
|
+
n !== void 0 && /* @__PURE__ */ i(tt, { id: c, children: n }),
|
|
178
178
|
/* @__PURE__ */ i("div", { children: t })
|
|
179
179
|
] }),
|
|
180
|
-
r !== void 0 && /* @__PURE__ */ i(
|
|
180
|
+
r !== void 0 && /* @__PURE__ */ i(ot, { children: r })
|
|
181
181
|
] }),
|
|
182
182
|
s !== void 0 && /* @__PURE__ */ i(
|
|
183
|
-
|
|
183
|
+
rt,
|
|
184
184
|
{
|
|
185
185
|
size: "small",
|
|
186
186
|
"aria-label": a.formatMessage({ id: "ds.states.callout.close" }),
|
|
@@ -202,15 +202,15 @@ const U = (e) => e.id ?? e.name, qe = (e, n, t) => (n === void 0 || e.sizeOctet
|
|
|
202
202
|
], ue = l("div", {
|
|
203
203
|
shouldForwardProp: (e) => e !== "selected"
|
|
204
204
|
})(({ theme: e, selected: n }) => {
|
|
205
|
-
const { tokens: t, space: r, radii: s, densityValues:
|
|
205
|
+
const { tokens: t, space: r, radii: s, densityValues: d, density: a, typeScale: c } = e.design;
|
|
206
206
|
return {
|
|
207
207
|
display: "flex",
|
|
208
208
|
alignItems: "center",
|
|
209
209
|
gap: o(r[1]),
|
|
210
|
-
minHeight: o(
|
|
210
|
+
minHeight: o(d[a].control),
|
|
211
211
|
borderRadius: o(s.md),
|
|
212
212
|
backgroundColor: n ? de(t.accent) : "transparent",
|
|
213
|
-
fontSize: o(
|
|
213
|
+
fontSize: o(c.body),
|
|
214
214
|
color: t["text.primary"],
|
|
215
215
|
...De(e)
|
|
216
216
|
};
|
|
@@ -237,7 +237,7 @@ const U = (e) => e.id ?? e.name, qe = (e, n, t) => (n === void 0 || e.sizeOctet
|
|
|
237
237
|
"&:hover": { backgroundColor: n["bg.hover"] },
|
|
238
238
|
"&:focus-visible": te(e)
|
|
239
239
|
};
|
|
240
|
-
}, Ye = l("button")(({ theme: e }) => Ke(e)),
|
|
240
|
+
}, Ye = l("button")(({ theme: e }) => Ke(e)), st = l("label")(({ theme: e }) => Ke(e)), Xe = l("span", {
|
|
241
241
|
shouldForwardProp: (e) => e !== "strong"
|
|
242
242
|
})(({ strong: e }) => ({
|
|
243
243
|
flex: "1 1 auto",
|
|
@@ -245,7 +245,7 @@ const U = (e) => e.id ?? e.name, qe = (e, n, t) => (n === void 0 || e.sizeOctet
|
|
|
245
245
|
overflow: "hidden",
|
|
246
246
|
textOverflow: "ellipsis",
|
|
247
247
|
whiteSpace: "nowrap",
|
|
248
|
-
fontWeight: e ?
|
|
248
|
+
fontWeight: e ? A.medium : A.regular
|
|
249
249
|
})), Qe = l("span")(({ theme: e }) => {
|
|
250
250
|
const { tokens: n, space: t, radii: r } = e.design;
|
|
251
251
|
return {
|
|
@@ -261,7 +261,7 @@ const U = (e) => e.id ?? e.name, qe = (e, n, t) => (n === void 0 || e.sizeOctet
|
|
|
261
261
|
"& svg": { width: o(t[5]), height: o(t[5]) },
|
|
262
262
|
"& img": { width: "100%", height: "100%", objectFit: "cover" }
|
|
263
263
|
};
|
|
264
|
-
}),
|
|
264
|
+
}), at = l(_n, {
|
|
265
265
|
shouldForwardProp: (e) => e !== "open"
|
|
266
266
|
})(({ theme: e, open: n }) => ({
|
|
267
267
|
flex: "none",
|
|
@@ -276,28 +276,28 @@ const U = (e) => e.id ?? e.name, qe = (e, n, t) => (n === void 0 || e.sizeOctet
|
|
|
276
276
|
(e.design.densityValues.touchTarget - e.design.space[5]) / 2
|
|
277
277
|
)
|
|
278
278
|
}
|
|
279
|
-
})),
|
|
279
|
+
})), lt = l("ul")(({ theme: e }) => ({
|
|
280
280
|
margin: 0,
|
|
281
281
|
padding: 0,
|
|
282
282
|
listStyle: "none",
|
|
283
|
-
borderLeft:
|
|
283
|
+
borderLeft: D(e.design.tokens["border.subtle"]),
|
|
284
284
|
marginLeft: o(e.design.space[3])
|
|
285
|
-
})),
|
|
285
|
+
})), Oe = l("li")({ listStyle: "none" });
|
|
286
286
|
function Je({
|
|
287
287
|
folders: e,
|
|
288
288
|
files: n,
|
|
289
289
|
context: t
|
|
290
290
|
}) {
|
|
291
291
|
return /* @__PURE__ */ x(J, { children: [
|
|
292
|
-
e.map((r) => /* @__PURE__ */ i(
|
|
293
|
-
n.filter((r) => qe(r, t.maxSize, t.accept)).map((r) => /* @__PURE__ */ i(
|
|
292
|
+
e.map((r) => /* @__PURE__ */ i(Oe, { children: /* @__PURE__ */ i(ut, { folder: r, context: t }) }, r.id ?? r.name)),
|
|
293
|
+
n.filter((r) => qe(r, t.maxSize, t.accept)).map((r) => /* @__PURE__ */ i(Oe, { children: /* @__PURE__ */ i(ct, { file: r, context: t }) }, U(r)))
|
|
294
294
|
] });
|
|
295
295
|
}
|
|
296
|
-
function
|
|
296
|
+
function dt({
|
|
297
297
|
file: e,
|
|
298
298
|
getFileThumbnailUrl: n
|
|
299
299
|
}) {
|
|
300
|
-
const [t, r] =
|
|
300
|
+
const [t, r] = F(!1), s = e.thumbnailPublicAccessId !== null && !e.isEncrypt && !t ? n(e.thumbnailPublicAccessId) : null;
|
|
301
301
|
return /* @__PURE__ */ i(Qe, { "aria-hidden": !0, children: s !== null ? /* @__PURE__ */ i(
|
|
302
302
|
"img",
|
|
303
303
|
{
|
|
@@ -308,13 +308,13 @@ function lt({
|
|
|
308
308
|
}
|
|
309
309
|
) : /* @__PURE__ */ i(Hn, {}) });
|
|
310
310
|
}
|
|
311
|
-
function
|
|
311
|
+
function ct({
|
|
312
312
|
file: e,
|
|
313
313
|
context: n
|
|
314
314
|
}) {
|
|
315
|
-
const t =
|
|
315
|
+
const t = N(), r = n.selectedIds.has(U(e)), s = () => r ? n.unselect([e]) : n.select([e]), d = /* @__PURE__ */ x(J, { children: [
|
|
316
316
|
/* @__PURE__ */ i(
|
|
317
|
-
|
|
317
|
+
dt,
|
|
318
318
|
{
|
|
319
319
|
file: e,
|
|
320
320
|
getFileThumbnailUrl: n.getFileThumbnailUrl
|
|
@@ -332,26 +332,26 @@ function dt({
|
|
|
332
332
|
onChange: s
|
|
333
333
|
}
|
|
334
334
|
),
|
|
335
|
-
/* @__PURE__ */ i(
|
|
336
|
-
] }) : /* @__PURE__ */ i(ue, { selected: r, children: /* @__PURE__ */ i(Ye, { type: "button", "aria-pressed": r, onClick: s, children:
|
|
335
|
+
/* @__PURE__ */ i(st, { htmlFor: t, children: d })
|
|
336
|
+
] }) : /* @__PURE__ */ i(ue, { selected: r, children: /* @__PURE__ */ i(Ye, { type: "button", "aria-pressed": r, onClick: s, children: d }) });
|
|
337
337
|
}
|
|
338
|
-
function
|
|
338
|
+
function ut({
|
|
339
339
|
folder: e,
|
|
340
340
|
context: n
|
|
341
341
|
}) {
|
|
342
|
-
const t =
|
|
343
|
-
(
|
|
344
|
-
).length,
|
|
342
|
+
const t = P(), r = N(), [s, d] = F(!1), a = Ue(e, n.maxSize, n.accept), c = a.filter(
|
|
343
|
+
(C) => n.selectedIds.has(U(C))
|
|
344
|
+
).length, g = a.length > 0 && c === a.length;
|
|
345
345
|
return /* @__PURE__ */ x(J, { children: [
|
|
346
|
-
/* @__PURE__ */ x(ue, { selected:
|
|
346
|
+
/* @__PURE__ */ x(ue, { selected: g, children: [
|
|
347
347
|
n.multiple && /* @__PURE__ */ i(
|
|
348
348
|
Ze,
|
|
349
349
|
{
|
|
350
350
|
size: "small",
|
|
351
|
-
checked:
|
|
352
|
-
indeterminate:
|
|
351
|
+
checked: g,
|
|
352
|
+
indeterminate: c > 0 && !g,
|
|
353
353
|
disabled: a.length === 0,
|
|
354
|
-
onChange: () =>
|
|
354
|
+
onChange: () => g ? n.unselect(a) : n.select(a),
|
|
355
355
|
inputProps: {
|
|
356
356
|
"aria-label": t.formatMessage(
|
|
357
357
|
{ id: "ds.business.cloud-import.select-folder" },
|
|
@@ -366,16 +366,16 @@ function ct({
|
|
|
366
366
|
type: "button",
|
|
367
367
|
"aria-expanded": s,
|
|
368
368
|
"aria-controls": s ? r : void 0,
|
|
369
|
-
onClick: () =>
|
|
369
|
+
onClick: () => d(!s),
|
|
370
370
|
children: [
|
|
371
|
-
/* @__PURE__ */ i(
|
|
371
|
+
/* @__PURE__ */ i(at, { open: s, "aria-hidden": !0 }),
|
|
372
372
|
/* @__PURE__ */ i(Qe, { "aria-hidden": !0, children: s ? /* @__PURE__ */ i(Ne, {}) : /* @__PURE__ */ i(Nn, {}) }),
|
|
373
|
-
/* @__PURE__ */ i(Xe, { strong:
|
|
373
|
+
/* @__PURE__ */ i(Xe, { strong: g, title: e.name, children: e.name })
|
|
374
374
|
]
|
|
375
375
|
}
|
|
376
376
|
)
|
|
377
377
|
] }),
|
|
378
|
-
s && /* @__PURE__ */ i(
|
|
378
|
+
s && /* @__PURE__ */ i(lt, { id: r, children: /* @__PURE__ */ i(
|
|
379
379
|
Je,
|
|
380
380
|
{
|
|
381
381
|
folders: e.childFolder ?? [],
|
|
@@ -385,36 +385,36 @@ function ct({
|
|
|
385
385
|
) })
|
|
386
386
|
] });
|
|
387
387
|
}
|
|
388
|
-
const
|
|
388
|
+
const We = "shared", Te = {
|
|
389
389
|
"org-common": 0,
|
|
390
390
|
"perso-in-org": 1,
|
|
391
391
|
project: 2,
|
|
392
392
|
personal: 3
|
|
393
|
-
},
|
|
393
|
+
}, pt = l("div")(({ theme: e }) => ({
|
|
394
394
|
display: "flex",
|
|
395
395
|
flexDirection: "column",
|
|
396
396
|
gap: o(e.design.space[3]),
|
|
397
397
|
minWidth: 0
|
|
398
|
-
})),
|
|
398
|
+
})), gt = l("div")(({ theme: e }) => ({
|
|
399
399
|
display: "flex",
|
|
400
400
|
alignItems: "flex-end",
|
|
401
401
|
gap: o(e.design.space[2]),
|
|
402
402
|
minWidth: 0,
|
|
403
403
|
// The Space field takes the room the two icon buttons leave.
|
|
404
|
-
[`& > .${
|
|
405
|
-
[`& > :not(.${
|
|
406
|
-
})),
|
|
404
|
+
[`& > .${Se.root}`]: { flex: "1 1 auto", minWidth: 0 },
|
|
405
|
+
[`& > :not(.${Se.root})`]: { flex: "none" }
|
|
406
|
+
})), ft = l("p")(({ theme: e }) => ({
|
|
407
407
|
margin: 0,
|
|
408
408
|
fontSize: o(e.design.typeScale.small),
|
|
409
409
|
color: e.design.tokens["text.muted"]
|
|
410
|
-
})),
|
|
410
|
+
})), mt = l("ul")(({ theme: e }) => {
|
|
411
411
|
const { tokens: n, space: t, radii: r } = e.design;
|
|
412
412
|
return {
|
|
413
413
|
margin: 0,
|
|
414
414
|
padding: o(t[1]),
|
|
415
415
|
listStyle: "none",
|
|
416
416
|
minHeight: o(t[10] * 3),
|
|
417
|
-
border:
|
|
417
|
+
border: D(n["border.subtle"]),
|
|
418
418
|
borderRadius: o(r.md)
|
|
419
419
|
};
|
|
420
420
|
}), ne = l("div")(({ theme: e }) => {
|
|
@@ -436,7 +436,7 @@ const Oe = "shared", We = {
|
|
|
436
436
|
color: n["text.muted"]
|
|
437
437
|
}
|
|
438
438
|
};
|
|
439
|
-
}),
|
|
439
|
+
}), ht = l("span")(({ theme: e }) => {
|
|
440
440
|
const { tokens: n, space: t, radii: r } = e.design;
|
|
441
441
|
return {
|
|
442
442
|
display: "inline-flex",
|
|
@@ -449,33 +449,33 @@ const Oe = "shared", We = {
|
|
|
449
449
|
color: n["status.warning"],
|
|
450
450
|
"& svg": { width: o(t[6]), height: o(t[6]) }
|
|
451
451
|
};
|
|
452
|
-
}),
|
|
452
|
+
}), bt = l("p")(({ theme: e }) => ({
|
|
453
453
|
margin: 0,
|
|
454
|
-
fontWeight:
|
|
454
|
+
fontWeight: A.semibold,
|
|
455
455
|
color: e.design.tokens["text.primary"]
|
|
456
|
-
})),
|
|
456
|
+
})), yt = l("p")({ margin: 0 }), vt = l("div")(({ theme: e }) => ({
|
|
457
457
|
display: "flex",
|
|
458
458
|
flexWrap: "wrap",
|
|
459
459
|
alignItems: "center",
|
|
460
460
|
justifyContent: "space-between",
|
|
461
461
|
gap: o(e.design.space[3])
|
|
462
|
-
})),
|
|
462
|
+
})), wt = l("span")(({ theme: e }) => ({
|
|
463
463
|
fontSize: o(e.design.typeScale.body),
|
|
464
464
|
color: e.design.tokens["text.secondary"]
|
|
465
|
-
})),
|
|
465
|
+
})), xt = l("li")(({ theme: e }) => ({
|
|
466
466
|
display: "flex",
|
|
467
467
|
alignItems: "center",
|
|
468
468
|
gap: o(e.design.space[2]),
|
|
469
469
|
...De(e)
|
|
470
|
-
})),
|
|
470
|
+
})), Ct = l("span")({
|
|
471
471
|
display: "flex",
|
|
472
472
|
flexDirection: "column",
|
|
473
473
|
minWidth: 0
|
|
474
|
-
}),
|
|
474
|
+
}), kt = l("span")({
|
|
475
475
|
overflow: "hidden",
|
|
476
476
|
textOverflow: "ellipsis",
|
|
477
477
|
whiteSpace: "nowrap"
|
|
478
|
-
}),
|
|
478
|
+
}), St = l("span")(({ theme: e }) => ({
|
|
479
479
|
fontSize: o(e.design.typeScale.caption),
|
|
480
480
|
color: e.design.tokens["text.muted"],
|
|
481
481
|
// A narrow screen wraps it: the scope and the organization tell same-named Spaces apart.
|
|
@@ -493,20 +493,20 @@ const Oe = "shared", We = {
|
|
|
493
493
|
color: n["accent.text"],
|
|
494
494
|
"& > svg": { width: o(t[4]), height: o(t[4]) }
|
|
495
495
|
};
|
|
496
|
-
}),
|
|
496
|
+
}), It = l(en)(({ theme: e }) => ({
|
|
497
497
|
marginRight: o(e.design.space[2])
|
|
498
|
-
})),
|
|
498
|
+
})), Ft = l("li")({ listStyle: "none" }), Mt = l("div")(({ theme: e }) => {
|
|
499
499
|
const { space: n, tokens: t, typeScale: r } = e.design;
|
|
500
500
|
return {
|
|
501
501
|
padding: `${o(n[2])} ${o(n[3])} ${o(n[1])}`,
|
|
502
502
|
fontSize: o(r.caption),
|
|
503
|
-
fontWeight:
|
|
503
|
+
fontWeight: A.semibold,
|
|
504
504
|
letterSpacing: "0.05em",
|
|
505
505
|
textTransform: "uppercase",
|
|
506
506
|
color: t["text.muted"]
|
|
507
507
|
};
|
|
508
|
-
}),
|
|
509
|
-
function
|
|
508
|
+
}), Ot = l("ul")({ margin: 0, padding: 0 });
|
|
509
|
+
function Wt({
|
|
510
510
|
cloudPicker: e,
|
|
511
511
|
onImport: n,
|
|
512
512
|
multiple: t = !1,
|
|
@@ -514,111 +514,111 @@ function Ot({
|
|
|
514
514
|
accept: s
|
|
515
515
|
}) {
|
|
516
516
|
const {
|
|
517
|
-
abyssCloudUrl:
|
|
517
|
+
abyssCloudUrl: d,
|
|
518
518
|
getFileThumbnailUrl: a,
|
|
519
|
-
getSpaceDisplay:
|
|
520
|
-
clouds:
|
|
521
|
-
cloudShares:
|
|
522
|
-
isLoading:
|
|
519
|
+
getSpaceDisplay: c,
|
|
520
|
+
clouds: g,
|
|
521
|
+
cloudShares: C,
|
|
522
|
+
isLoading: y,
|
|
523
523
|
hasError: u,
|
|
524
524
|
refresh: h,
|
|
525
525
|
onCreateCloud: m,
|
|
526
|
-
fetchCloudRepository:
|
|
527
|
-
} = e,
|
|
526
|
+
fetchCloudRepository: p
|
|
527
|
+
} = e, f = P(), [b, v] = F(null), [M, O] = F(null), [W, S] = F(
|
|
528
528
|
"loading"
|
|
529
529
|
/* Loading */
|
|
530
|
-
), [
|
|
531
|
-
const w = [],
|
|
530
|
+
), [T, z] = F([]), [R, ee] = F(!1), [re, _] = F(!1), j = ge(() => {
|
|
531
|
+
const w = [], I = /* @__PURE__ */ new Map(), k = f.formatMessage({
|
|
532
532
|
id: "ds.business.cloud-import.section-organization"
|
|
533
533
|
});
|
|
534
|
-
for (const
|
|
535
|
-
if (!
|
|
536
|
-
w.push(
|
|
534
|
+
for (const E of g ?? []) {
|
|
535
|
+
if (!E.organizationId) {
|
|
536
|
+
w.push(E);
|
|
537
537
|
continue;
|
|
538
538
|
}
|
|
539
|
-
const
|
|
540
|
-
name: (
|
|
539
|
+
const $ = c == null ? void 0 : c(E), B = I.get(E.organizationId) ?? {
|
|
540
|
+
name: ($ == null ? void 0 : $.organizationName) ?? k,
|
|
541
541
|
items: []
|
|
542
542
|
};
|
|
543
|
-
|
|
543
|
+
B.items.push(E), I.set(E.organizationId, B);
|
|
544
544
|
}
|
|
545
|
-
if (
|
|
546
|
-
for (const
|
|
547
|
-
|
|
548
|
-
const
|
|
549
|
-
return
|
|
545
|
+
if (c)
|
|
546
|
+
for (const E of I.values())
|
|
547
|
+
E.items.sort(($, B) => {
|
|
548
|
+
const L = Te[c($).scope ?? "personal"], xe = Te[c(B).scope ?? "personal"];
|
|
549
|
+
return L !== xe ? L - xe : c($).label.localeCompare(c(B).label);
|
|
550
550
|
});
|
|
551
|
-
const
|
|
552
|
-
const
|
|
551
|
+
const H = (E, $) => (B) => {
|
|
552
|
+
const L = c == null ? void 0 : c(B);
|
|
553
553
|
return {
|
|
554
|
-
space:
|
|
555
|
-
sectionKey:
|
|
556
|
-
sectionLabel:
|
|
557
|
-
label: (
|
|
558
|
-
subtitle:
|
|
559
|
-
avatar:
|
|
554
|
+
space: B,
|
|
555
|
+
sectionKey: E,
|
|
556
|
+
sectionLabel: $,
|
|
557
|
+
label: (L == null ? void 0 : L.label) ?? kn(B, f),
|
|
558
|
+
subtitle: L == null ? void 0 : L.subtitle,
|
|
559
|
+
avatar: L == null ? void 0 : L.avatar
|
|
560
560
|
};
|
|
561
561
|
};
|
|
562
562
|
return [
|
|
563
563
|
...w.map(
|
|
564
|
-
|
|
564
|
+
H(
|
|
565
565
|
"personal",
|
|
566
|
-
|
|
566
|
+
f.formatMessage({
|
|
567
567
|
id: "ds.business.cloud-import.section-personal"
|
|
568
568
|
})
|
|
569
569
|
)
|
|
570
570
|
),
|
|
571
|
-
...[...
|
|
572
|
-
([
|
|
571
|
+
...[...I].flatMap(
|
|
572
|
+
([E, $]) => $.items.map(H(`org:${E}`, $.name))
|
|
573
573
|
),
|
|
574
|
-
...(
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
574
|
+
...(C ?? []).map(
|
|
575
|
+
H(
|
|
576
|
+
We,
|
|
577
|
+
f.formatMessage({ id: "ds.business.cloud-import.section-shared" })
|
|
578
578
|
)
|
|
579
579
|
)
|
|
580
580
|
];
|
|
581
|
-
}, [
|
|
582
|
-
|
|
581
|
+
}, [g, C, c, f]), G = j.find((w) => w.space.id === (b == null ? void 0 : b.id)) ?? null, ce = Y(0), he = Y(p);
|
|
582
|
+
he.current = p;
|
|
583
583
|
const ie = Q(async (w) => {
|
|
584
|
-
const
|
|
585
|
-
|
|
584
|
+
const I = ++ce.current;
|
|
585
|
+
S(
|
|
586
586
|
"loading"
|
|
587
587
|
/* Loading */
|
|
588
|
-
),
|
|
588
|
+
), z([]);
|
|
589
589
|
try {
|
|
590
590
|
if (w.id === void 0)
|
|
591
591
|
throw new Error("A Space without an id has no tree");
|
|
592
|
-
const k = await
|
|
593
|
-
|
|
592
|
+
const k = await he.current(w.id);
|
|
593
|
+
I === ce.current && (O(k), S(
|
|
594
594
|
"ready"
|
|
595
595
|
/* Ready */
|
|
596
596
|
));
|
|
597
597
|
} catch {
|
|
598
|
-
|
|
598
|
+
I === ce.current && S(
|
|
599
599
|
"failed"
|
|
600
600
|
/* Failed */
|
|
601
601
|
);
|
|
602
602
|
}
|
|
603
603
|
}, []), dn = Y(h);
|
|
604
|
-
|
|
604
|
+
V(() => {
|
|
605
605
|
dn.current();
|
|
606
|
-
}, []),
|
|
607
|
-
if (
|
|
606
|
+
}, []), V(() => {
|
|
607
|
+
if (b && j.some((k) => k.space.id === b.id))
|
|
608
608
|
return;
|
|
609
|
-
const w = j.map((k) => k.space),
|
|
609
|
+
const w = j.map((k) => k.space), I = w.find(
|
|
610
610
|
(k) => !!k.userId && !k.organizationId && !k.projectId
|
|
611
611
|
);
|
|
612
|
-
|
|
613
|
-
}, [j,
|
|
614
|
-
|
|
615
|
-
}, [
|
|
612
|
+
v(I ?? w[0] ?? null);
|
|
613
|
+
}, [j, b]), V(() => {
|
|
614
|
+
b && ie(b);
|
|
615
|
+
}, [b, ie]);
|
|
616
616
|
const cn = async () => {
|
|
617
|
-
if (
|
|
618
|
-
|
|
617
|
+
if (_(!1), !await h()) {
|
|
618
|
+
_(!0);
|
|
619
619
|
return;
|
|
620
620
|
}
|
|
621
|
-
|
|
621
|
+
b && await ie(b);
|
|
622
622
|
}, un = async () => {
|
|
623
623
|
ee(!0);
|
|
624
624
|
try {
|
|
@@ -630,77 +630,77 @@ function Ot({
|
|
|
630
630
|
multiple: t,
|
|
631
631
|
maxSize: r,
|
|
632
632
|
accept: s,
|
|
633
|
-
selectedIds: new Set(
|
|
633
|
+
selectedIds: new Set(T.map(U)),
|
|
634
634
|
getFileThumbnailUrl: a,
|
|
635
|
-
select: (w) =>
|
|
635
|
+
select: (w) => z((I) => {
|
|
636
636
|
if (!t)
|
|
637
637
|
return w.slice(0, 1);
|
|
638
|
-
const k = new Set(
|
|
638
|
+
const k = new Set(I.map(U));
|
|
639
639
|
return [
|
|
640
|
-
...
|
|
641
|
-
...w.filter((
|
|
640
|
+
...I,
|
|
641
|
+
...w.filter((H) => !k.has(U(H)))
|
|
642
642
|
];
|
|
643
643
|
}),
|
|
644
644
|
unselect: (w) => {
|
|
645
|
-
const
|
|
646
|
-
|
|
647
|
-
(k) => k.filter((
|
|
645
|
+
const I = new Set(w.map(U));
|
|
646
|
+
z(
|
|
647
|
+
(k) => k.filter((H) => !I.has(U(H)))
|
|
648
648
|
);
|
|
649
649
|
}
|
|
650
|
-
}, gn =
|
|
651
|
-
|
|
650
|
+
}, gn = g !== null && C !== null, be = /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ i(
|
|
651
|
+
Ie,
|
|
652
652
|
{
|
|
653
653
|
size: 32,
|
|
654
|
-
"aria-label":
|
|
654
|
+
"aria-label": f.formatMessage({
|
|
655
655
|
id: "ds.business.cloud-import.loading"
|
|
656
656
|
})
|
|
657
657
|
}
|
|
658
658
|
) });
|
|
659
|
-
if (!gn && (
|
|
660
|
-
return
|
|
659
|
+
if (!gn && (y || !u))
|
|
660
|
+
return be;
|
|
661
661
|
if (j.length === 0)
|
|
662
662
|
return /* @__PURE__ */ x(ne, { children: [
|
|
663
|
-
/* @__PURE__ */ i(
|
|
664
|
-
/* @__PURE__ */ i(
|
|
663
|
+
/* @__PURE__ */ i(ht, { "aria-hidden": !0, children: /* @__PURE__ */ i(Tn, {}) }),
|
|
664
|
+
/* @__PURE__ */ i(bt, { children: f.formatMessage({
|
|
665
665
|
id: "ds.business.cloud-import.create-error.title"
|
|
666
666
|
}) }),
|
|
667
|
-
/* @__PURE__ */ i(
|
|
667
|
+
/* @__PURE__ */ i(yt, { children: f.formatMessage({
|
|
668
668
|
id: "ds.business.cloud-import.create-error.description"
|
|
669
669
|
}) }),
|
|
670
670
|
/* @__PURE__ */ i(
|
|
671
671
|
X,
|
|
672
672
|
{
|
|
673
673
|
variant: "contained",
|
|
674
|
-
startIcon: /* @__PURE__ */ i(
|
|
675
|
-
loading:
|
|
674
|
+
startIcon: /* @__PURE__ */ i(Me, { "aria-hidden": !0 }),
|
|
675
|
+
loading: R || y,
|
|
676
676
|
onClick: () => void un(),
|
|
677
|
-
children:
|
|
677
|
+
children: f.formatMessage({
|
|
678
678
|
id: "ds.business.cloud-import.create-error.create-button"
|
|
679
679
|
})
|
|
680
680
|
}
|
|
681
681
|
)
|
|
682
682
|
] });
|
|
683
683
|
if (G === null)
|
|
684
|
-
return
|
|
684
|
+
return be;
|
|
685
685
|
const fn = Cn(
|
|
686
|
-
|
|
686
|
+
d,
|
|
687
687
|
G.space,
|
|
688
|
-
G.sectionKey ===
|
|
689
|
-
),
|
|
688
|
+
G.sectionKey === We
|
|
689
|
+
), ye = f.formatMessage({
|
|
690
690
|
id: "ds.business.cloud-import.refresh"
|
|
691
|
-
}),
|
|
691
|
+
}), ve = f.formatMessage({
|
|
692
692
|
id: "ds.business.cloud-import.open-in-cloud"
|
|
693
|
-
}),
|
|
694
|
-
return /* @__PURE__ */ x(
|
|
693
|
+
}), we = (w) => w.avatar ?? /* @__PURE__ */ i(Me, {});
|
|
694
|
+
return /* @__PURE__ */ x(pt, { children: [
|
|
695
695
|
re && /* @__PURE__ */ i(
|
|
696
|
-
|
|
696
|
+
it,
|
|
697
697
|
{
|
|
698
698
|
severity: je.Danger,
|
|
699
|
-
onClose: () =>
|
|
700
|
-
children:
|
|
699
|
+
onClose: () => _(!1),
|
|
700
|
+
children: f.formatMessage({ id: "ds.business.cloud-import.refresh-error" })
|
|
701
701
|
}
|
|
702
702
|
),
|
|
703
|
-
/* @__PURE__ */ x(
|
|
703
|
+
/* @__PURE__ */ x(gt, { children: [
|
|
704
704
|
/* @__PURE__ */ i(
|
|
705
705
|
Wn,
|
|
706
706
|
{
|
|
@@ -710,152 +710,152 @@ function Ot({
|
|
|
710
710
|
value: G,
|
|
711
711
|
groupBy: (w) => w.sectionLabel,
|
|
712
712
|
getOptionLabel: (w) => w.label,
|
|
713
|
-
isOptionEqualToValue: (w,
|
|
714
|
-
onChange: (w,
|
|
715
|
-
filterOptions: (w, { inputValue:
|
|
716
|
-
const k =
|
|
713
|
+
isOptionEqualToValue: (w, I) => w.space.id === I.space.id,
|
|
714
|
+
onChange: (w, I) => v(I.space),
|
|
715
|
+
filterOptions: (w, { inputValue: I }) => {
|
|
716
|
+
const k = I.trim().toLowerCase();
|
|
717
717
|
return k === "" || k === G.label.toLowerCase() ? w : w.filter(
|
|
718
|
-
(
|
|
719
|
-
(
|
|
718
|
+
(H) => [H.label, H.subtitle ?? ""].some(
|
|
719
|
+
(E) => E.toLowerCase().includes(k)
|
|
720
720
|
)
|
|
721
721
|
);
|
|
722
722
|
},
|
|
723
|
-
renderGroup: (w) => /* @__PURE__ */ x(
|
|
724
|
-
/* @__PURE__ */ i(
|
|
725
|
-
/* @__PURE__ */ i(
|
|
723
|
+
renderGroup: (w) => /* @__PURE__ */ x(Ft, { children: [
|
|
724
|
+
/* @__PURE__ */ i(Mt, { children: w.group }),
|
|
725
|
+
/* @__PURE__ */ i(Ot, { children: w.children })
|
|
726
726
|
] }, w.key),
|
|
727
|
-
renderOption: ({ key: w, ...
|
|
728
|
-
/* @__PURE__ */ i(en, { "aria-hidden": !0, children:
|
|
729
|
-
/* @__PURE__ */ x(
|
|
730
|
-
/* @__PURE__ */ i(
|
|
731
|
-
k.subtitle !== void 0 && /* @__PURE__ */ i(
|
|
727
|
+
renderOption: ({ key: w, ...I }, k) => /* @__PURE__ */ x(xt, { ...I, children: [
|
|
728
|
+
/* @__PURE__ */ i(en, { "aria-hidden": !0, children: we(k) }),
|
|
729
|
+
/* @__PURE__ */ x(Ct, { children: [
|
|
730
|
+
/* @__PURE__ */ i(kt, { children: k.label }),
|
|
731
|
+
k.subtitle !== void 0 && /* @__PURE__ */ i(St, { children: k.subtitle })
|
|
732
732
|
] })
|
|
733
733
|
] }, w),
|
|
734
734
|
renderInput: (w) => /* @__PURE__ */ i(
|
|
735
735
|
Ve,
|
|
736
736
|
{
|
|
737
|
-
label:
|
|
737
|
+
label: f.formatMessage({
|
|
738
738
|
id: "ds.business.cloud-import.space-label"
|
|
739
739
|
}),
|
|
740
740
|
children: /* @__PURE__ */ i(
|
|
741
|
-
|
|
741
|
+
me,
|
|
742
742
|
{
|
|
743
743
|
...w.InputProps,
|
|
744
744
|
id: w.id,
|
|
745
745
|
fullWidth: !0,
|
|
746
746
|
inputProps: w.inputProps,
|
|
747
|
-
startAdornment: /* @__PURE__ */ i(
|
|
747
|
+
startAdornment: /* @__PURE__ */ i(It, { "aria-hidden": !0, children: we(G) })
|
|
748
748
|
}
|
|
749
749
|
)
|
|
750
750
|
}
|
|
751
751
|
)
|
|
752
752
|
}
|
|
753
753
|
),
|
|
754
|
-
/* @__PURE__ */ i(
|
|
754
|
+
/* @__PURE__ */ i(Fe, { title: ye, children: /* @__PURE__ */ i("span", { children: /* @__PURE__ */ i(
|
|
755
755
|
ae,
|
|
756
756
|
{
|
|
757
|
-
"aria-label":
|
|
758
|
-
disabled: W === "loading" ||
|
|
757
|
+
"aria-label": ye,
|
|
758
|
+
disabled: W === "loading" || y,
|
|
759
759
|
onClick: () => void cn(),
|
|
760
760
|
children: /* @__PURE__ */ i(zn, { "aria-hidden": !0 })
|
|
761
761
|
}
|
|
762
762
|
) }) }),
|
|
763
|
-
/* @__PURE__ */ i(
|
|
763
|
+
/* @__PURE__ */ i(Fe, { title: ve, children: /* @__PURE__ */ i(
|
|
764
764
|
ae,
|
|
765
765
|
{
|
|
766
766
|
component: "a",
|
|
767
767
|
href: fn,
|
|
768
768
|
target: "_blank",
|
|
769
769
|
rel: "noreferrer",
|
|
770
|
-
"aria-label":
|
|
770
|
+
"aria-label": ve,
|
|
771
771
|
children: /* @__PURE__ */ i(En, { "aria-hidden": !0 })
|
|
772
772
|
}
|
|
773
773
|
) })
|
|
774
774
|
] }),
|
|
775
|
-
/* @__PURE__ */ i(
|
|
775
|
+
/* @__PURE__ */ i(ft, { children: f.formatMessage({ id: "ds.business.cloud-import.filtered-hint" }) }),
|
|
776
776
|
W === "loading" && /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ i(
|
|
777
|
-
|
|
777
|
+
Ie,
|
|
778
778
|
{
|
|
779
779
|
size: 24,
|
|
780
|
-
"aria-label":
|
|
780
|
+
"aria-label": f.formatMessage({
|
|
781
781
|
id: "ds.business.cloud-import.tree-loading"
|
|
782
782
|
})
|
|
783
783
|
}
|
|
784
784
|
) }),
|
|
785
785
|
W === "failed" && /* @__PURE__ */ x(ne, { role: "alert", children: [
|
|
786
|
-
|
|
786
|
+
f.formatMessage({ id: "ds.business.cloud-import.tree-error" }),
|
|
787
787
|
/* @__PURE__ */ i(
|
|
788
788
|
X,
|
|
789
789
|
{
|
|
790
790
|
variant: "outlined",
|
|
791
791
|
onClick: () => void ie(G.space),
|
|
792
|
-
children:
|
|
792
|
+
children: f.formatMessage({ id: "ds.business.cloud-import.retry" })
|
|
793
793
|
}
|
|
794
794
|
)
|
|
795
795
|
] }),
|
|
796
|
-
W === "ready" &&
|
|
796
|
+
W === "ready" && M !== null && (M.folders.length === 0 && M.files.length === 0 ? /* @__PURE__ */ x(ne, { children: [
|
|
797
797
|
/* @__PURE__ */ i(Ne, { "aria-hidden": !0 }),
|
|
798
|
-
|
|
798
|
+
f.formatMessage({ id: "ds.business.cloud-import.empty-space" })
|
|
799
799
|
] }) : /* @__PURE__ */ i(
|
|
800
|
-
|
|
800
|
+
mt,
|
|
801
801
|
{
|
|
802
|
-
"aria-label":
|
|
802
|
+
"aria-label": f.formatMessage({
|
|
803
803
|
id: "ds.business.cloud-import.tree-label"
|
|
804
804
|
}),
|
|
805
805
|
children: /* @__PURE__ */ i(
|
|
806
806
|
Je,
|
|
807
807
|
{
|
|
808
|
-
folders:
|
|
809
|
-
files:
|
|
808
|
+
folders: M.folders,
|
|
809
|
+
files: M.files,
|
|
810
810
|
context: pn
|
|
811
811
|
}
|
|
812
812
|
)
|
|
813
813
|
}
|
|
814
814
|
)),
|
|
815
|
-
/* @__PURE__ */ x(
|
|
816
|
-
/* @__PURE__ */ i(
|
|
815
|
+
/* @__PURE__ */ x(vt, { children: [
|
|
816
|
+
/* @__PURE__ */ i(wt, { role: "status", children: f.formatMessage(
|
|
817
817
|
{ id: "ds.business.cloud-import.selected" },
|
|
818
|
-
{ count:
|
|
818
|
+
{ count: T.length }
|
|
819
819
|
) }),
|
|
820
820
|
/* @__PURE__ */ i(
|
|
821
821
|
X,
|
|
822
822
|
{
|
|
823
823
|
variant: "contained",
|
|
824
824
|
startIcon: /* @__PURE__ */ i(Rn, { "aria-hidden": !0 }),
|
|
825
|
-
disabled:
|
|
826
|
-
onClick: () => n(G.space,
|
|
827
|
-
children:
|
|
825
|
+
disabled: T.length === 0,
|
|
826
|
+
onClick: () => n(G.space, T),
|
|
827
|
+
children: f.formatMessage({ id: "ds.business.cloud-import.import" })
|
|
828
828
|
}
|
|
829
829
|
)
|
|
830
830
|
] })
|
|
831
831
|
] });
|
|
832
832
|
}
|
|
833
|
-
function
|
|
833
|
+
function Tt({
|
|
834
834
|
open: e,
|
|
835
835
|
onClose: n,
|
|
836
836
|
onImport: t,
|
|
837
837
|
cloudPicker: r,
|
|
838
838
|
multiple: s,
|
|
839
|
-
maxSize:
|
|
839
|
+
maxSize: d,
|
|
840
840
|
accept: a
|
|
841
841
|
}) {
|
|
842
|
-
const
|
|
842
|
+
const c = P();
|
|
843
843
|
return /* @__PURE__ */ i(
|
|
844
844
|
Pe,
|
|
845
845
|
{
|
|
846
846
|
open: e,
|
|
847
847
|
onClose: n,
|
|
848
848
|
size: He.Medium,
|
|
849
|
-
title:
|
|
849
|
+
title: c.formatMessage({ id: "ds.business.cloud-import.title" }),
|
|
850
850
|
children: e && /* @__PURE__ */ i(
|
|
851
|
-
|
|
851
|
+
Wt,
|
|
852
852
|
{
|
|
853
853
|
cloudPicker: r,
|
|
854
854
|
multiple: s,
|
|
855
|
-
maxSize:
|
|
855
|
+
maxSize: d,
|
|
856
856
|
accept: a,
|
|
857
|
-
onImport: (
|
|
858
|
-
t(
|
|
857
|
+
onImport: (g, C) => {
|
|
858
|
+
t(g, C), n();
|
|
859
859
|
}
|
|
860
860
|
}
|
|
861
861
|
)
|
|
@@ -863,32 +863,32 @@ function Wt({
|
|
|
863
863
|
);
|
|
864
864
|
}
|
|
865
865
|
var nn = /* @__PURE__ */ ((e) => (e.Medium = "medium", e.Compact = "compact", e))(nn || {});
|
|
866
|
-
const
|
|
866
|
+
const Rt = ze(
|
|
867
867
|
"medium"
|
|
868
868
|
/* Medium */
|
|
869
|
-
),
|
|
869
|
+
), Et = l(le)(({ theme: e }) => ({
|
|
870
870
|
// Three times the largest spacing step: room for a label and the arrow.
|
|
871
871
|
minWidth: o(e.design.space[10] * 3),
|
|
872
872
|
maxWidth: "100%"
|
|
873
|
-
})),
|
|
873
|
+
})), zt = l($e)(({ theme: e }) => ({
|
|
874
874
|
position: "relative",
|
|
875
875
|
transform: "none",
|
|
876
876
|
maxWidth: "100%",
|
|
877
877
|
pointerEvents: "auto",
|
|
878
878
|
marginBottom: o(e.design.space[2]),
|
|
879
879
|
fontSize: o(e.design.typeScale.small),
|
|
880
|
-
fontWeight:
|
|
880
|
+
fontWeight: A.medium,
|
|
881
881
|
lineHeight: e.typography.caption.lineHeight,
|
|
882
882
|
color: e.design.tokens["text.secondary"],
|
|
883
883
|
"&.Mui-focused": { color: e.design.tokens["text.secondary"] },
|
|
884
884
|
"&.Mui-error": { color: e.design.tokens["status.danger"] },
|
|
885
885
|
"&.Mui-disabled": { color: e.design.tokens["text.muted"] }
|
|
886
|
-
})),
|
|
886
|
+
})), At = l("span")(({ theme: e }) => ({
|
|
887
887
|
display: "flex",
|
|
888
888
|
alignItems: "center",
|
|
889
889
|
gap: o(e.design.space[2]),
|
|
890
890
|
minWidth: 0
|
|
891
|
-
})),
|
|
891
|
+
})), Lt = l("i", {
|
|
892
892
|
shouldForwardProp: (e) => e !== "token"
|
|
893
893
|
})(({ theme: e, token: n }) => ({
|
|
894
894
|
flex: "none",
|
|
@@ -896,11 +896,11 @@ const Tt = Ee(
|
|
|
896
896
|
height: o(e.design.space[2]),
|
|
897
897
|
borderRadius: o(e.design.radii.sm / 2),
|
|
898
898
|
backgroundColor: e.design.tokens[n]
|
|
899
|
-
})),
|
|
899
|
+
})), $t = l("span")({
|
|
900
900
|
display: "flex",
|
|
901
901
|
flexDirection: "column",
|
|
902
902
|
minWidth: 0
|
|
903
|
-
}),
|
|
903
|
+
}), Dt = l("span")(({ theme: e }) => ({
|
|
904
904
|
fontSize: o(e.design.typeScale.caption),
|
|
905
905
|
color: e.design.tokens["text.muted"],
|
|
906
906
|
whiteSpace: "normal"
|
|
@@ -908,27 +908,27 @@ const Tt = Ee(
|
|
|
908
908
|
overflow: "hidden",
|
|
909
909
|
textOverflow: "ellipsis",
|
|
910
910
|
whiteSpace: "nowrap"
|
|
911
|
-
}),
|
|
911
|
+
}), Pt = l(pe)(({ theme: e }) => ({
|
|
912
912
|
color: e.design.tokens["text.muted"]
|
|
913
913
|
}));
|
|
914
|
-
function
|
|
914
|
+
function wr({
|
|
915
915
|
label: e,
|
|
916
916
|
options: n,
|
|
917
917
|
value: t,
|
|
918
918
|
onChange: r,
|
|
919
919
|
multiple: s = !1,
|
|
920
|
-
disabled:
|
|
920
|
+
disabled: d,
|
|
921
921
|
error: a,
|
|
922
|
-
size:
|
|
922
|
+
size: c
|
|
923
923
|
}) {
|
|
924
|
-
const
|
|
925
|
-
return /* @__PURE__ */ x(u, { fullWidth: !
|
|
924
|
+
const g = P(), C = Ae(Rt), y = (c ?? C) === nn.Compact, u = y ? Et : le, h = N(), m = `${h}-label`, p = `${h}-helper`, f = new Map(n.map((v) => [v.value, v]));
|
|
925
|
+
return /* @__PURE__ */ x(u, { fullWidth: !y, disabled: d, error: !!a, children: [
|
|
926
926
|
/* @__PURE__ */ i(
|
|
927
|
-
|
|
927
|
+
zt,
|
|
928
928
|
{
|
|
929
929
|
id: m,
|
|
930
930
|
shrink: !0,
|
|
931
|
-
style:
|
|
931
|
+
style: y ? fe : void 0,
|
|
932
932
|
children: e
|
|
933
933
|
}
|
|
934
934
|
),
|
|
@@ -939,41 +939,41 @@ function yr({
|
|
|
939
939
|
multiple: s,
|
|
940
940
|
value: t,
|
|
941
941
|
displayEmpty: !0,
|
|
942
|
-
renderValue: (
|
|
943
|
-
const
|
|
944
|
-
return
|
|
942
|
+
renderValue: (v) => {
|
|
943
|
+
const M = Array.isArray(v) ? v : [v];
|
|
944
|
+
return y && M.length === 0 ? /* @__PURE__ */ i(Pt, { "aria-hidden": !0, children: e }) : /* @__PURE__ */ i(pe, { children: M.map((O) => {
|
|
945
945
|
var W;
|
|
946
|
-
return ((W =
|
|
946
|
+
return ((W = f.get(O)) == null ? void 0 : W.label) ?? O;
|
|
947
947
|
}).join(", ") });
|
|
948
948
|
},
|
|
949
|
-
"aria-describedby": a ?
|
|
950
|
-
onChange: (
|
|
949
|
+
"aria-describedby": a ? p : void 0,
|
|
950
|
+
onChange: (v) => r(v.target.value),
|
|
951
951
|
children: [
|
|
952
|
-
n.length === 0 && /* @__PURE__ */ i(
|
|
953
|
-
n.map((
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
/* @__PURE__ */ x(
|
|
957
|
-
/* @__PURE__ */ i(pe, { children:
|
|
958
|
-
|
|
952
|
+
n.length === 0 && /* @__PURE__ */ i(Ce, { disabled: !0, value: "", children: g.formatMessage({ id: "ds.inputs.rich-select.empty" }) }),
|
|
953
|
+
n.map((v) => /* @__PURE__ */ i(Ce, { value: v.value, children: /* @__PURE__ */ x(At, { children: [
|
|
954
|
+
v.tone && /* @__PURE__ */ i(Lt, { token: v.tone }),
|
|
955
|
+
v.icon,
|
|
956
|
+
/* @__PURE__ */ x($t, { children: [
|
|
957
|
+
/* @__PURE__ */ i(pe, { children: v.label }),
|
|
958
|
+
v.description && /* @__PURE__ */ i(Dt, { children: v.description })
|
|
959
959
|
] })
|
|
960
|
-
] }) },
|
|
960
|
+
] }) }, v.value))
|
|
961
961
|
]
|
|
962
962
|
}
|
|
963
963
|
),
|
|
964
|
-
a && /* @__PURE__ */ i(se, { id:
|
|
964
|
+
a && /* @__PURE__ */ i(se, { id: p, children: a })
|
|
965
965
|
] });
|
|
966
966
|
}
|
|
967
|
-
const
|
|
967
|
+
const Ht = l("div")(({ theme: e }) => ({
|
|
968
968
|
display: "flex",
|
|
969
969
|
flexDirection: "column",
|
|
970
970
|
gap: o(e.design.space[2]),
|
|
971
971
|
minWidth: 0
|
|
972
|
-
})),
|
|
972
|
+
})), Nt = l("span")(({ theme: e }) => ({
|
|
973
973
|
fontSize: o(e.design.typeScale.small),
|
|
974
|
-
fontWeight:
|
|
974
|
+
fontWeight: A.medium,
|
|
975
975
|
color: e.design.tokens["text.secondary"]
|
|
976
|
-
})),
|
|
976
|
+
})), _t = l("div", {
|
|
977
977
|
shouldForwardProp: (e) => e !== "active"
|
|
978
978
|
})(({ theme: e, active: n }) => {
|
|
979
979
|
const { tokens: t, space: r, radii: s } = e.design;
|
|
@@ -995,7 +995,7 @@ const Pt = l("div")(({ theme: e }) => ({
|
|
|
995
995
|
transition: oe(e, ["border-color", "background-color"]),
|
|
996
996
|
"&:hover": { borderColor: t.accent }
|
|
997
997
|
};
|
|
998
|
-
}),
|
|
998
|
+
}), Bt = l("span")(({ theme: e }) => {
|
|
999
999
|
const { tokens: n, space: t } = e.design;
|
|
1000
1000
|
return {
|
|
1001
1001
|
display: "inline-flex",
|
|
@@ -1008,80 +1008,80 @@ const Pt = l("div")(({ theme: e }) => ({
|
|
|
1008
1008
|
color: n["accent.text"],
|
|
1009
1009
|
"& svg": { width: o(t[5]), height: o(t[5]) }
|
|
1010
1010
|
};
|
|
1011
|
-
}),
|
|
1011
|
+
}), Vt = l("span")(({ theme: e }) => ({
|
|
1012
1012
|
fontSize: o(e.design.typeScale.body),
|
|
1013
1013
|
[Z.down(K.Tablet)]: { display: "none" }
|
|
1014
|
-
})),
|
|
1014
|
+
})), jt = l("div")(({ theme: e }) => ({
|
|
1015
1015
|
display: "flex",
|
|
1016
1016
|
flexWrap: "wrap",
|
|
1017
1017
|
alignItems: "center",
|
|
1018
1018
|
justifyContent: "space-between",
|
|
1019
1019
|
gap: o(e.design.space[2])
|
|
1020
|
-
})),
|
|
1020
|
+
})), Gt = l("span")(({ theme: e }) => ({
|
|
1021
1021
|
fontSize: o(e.design.typeScale.small),
|
|
1022
1022
|
color: e.design.tokens["text.muted"]
|
|
1023
|
-
})),
|
|
1023
|
+
})), qt = l("p")(({ theme: e }) => ({
|
|
1024
1024
|
margin: 0,
|
|
1025
1025
|
fontSize: o(e.design.typeScale.small),
|
|
1026
1026
|
color: e.design.tokens["status.danger"]
|
|
1027
|
-
})),
|
|
1027
|
+
})), Ut = l("img")(({ theme: e }) => ({
|
|
1028
1028
|
width: o(e.design.space[4]),
|
|
1029
1029
|
height: o(e.design.space[4])
|
|
1030
|
-
})),
|
|
1030
|
+
})), Kt = (e) => {
|
|
1031
1031
|
const { value: n, unit: t } = Mn(e);
|
|
1032
1032
|
return `${n} ${t}`;
|
|
1033
1033
|
};
|
|
1034
|
-
function
|
|
1034
|
+
function xr({
|
|
1035
1035
|
onDrop: e,
|
|
1036
1036
|
multiple: n = !0,
|
|
1037
1037
|
accept: t,
|
|
1038
1038
|
maxSize: r,
|
|
1039
1039
|
caption: s,
|
|
1040
|
-
title:
|
|
1040
|
+
title: d,
|
|
1041
1041
|
cloudImport: a,
|
|
1042
|
-
children:
|
|
1042
|
+
children: c
|
|
1043
1043
|
}) {
|
|
1044
|
-
const
|
|
1044
|
+
const g = P(), C = N(), y = N(), [u, h] = F(null), [m, p] = F(!1), f = r === void 0 ? null : Kt(r), b = s ?? (f === null ? null : g.formatMessage(
|
|
1045
1045
|
{ id: "ds.inputs.drop-zone.max-size" },
|
|
1046
|
-
{ size:
|
|
1047
|
-
)),
|
|
1048
|
-
const ee = r === void 0 ? [] :
|
|
1049
|
-
|
|
1050
|
-
(
|
|
1046
|
+
{ size: f, multiple: String(n) }
|
|
1047
|
+
)), v = (z, R) => {
|
|
1048
|
+
const ee = r === void 0 ? [] : z.filter((_) => _.size > r), re = z.filter((_) => !ee.includes(_));
|
|
1049
|
+
R.some(
|
|
1050
|
+
(_) => _.errors.some((j) => j.code === Fn.TooManyFiles)
|
|
1051
1051
|
) ? h(
|
|
1052
1052
|
"too-many"
|
|
1053
1053
|
/* TooMany */
|
|
1054
|
-
) :
|
|
1054
|
+
) : R.length > 0 ? h(
|
|
1055
1055
|
"rejected-type"
|
|
1056
1056
|
/* Rejected */
|
|
1057
1057
|
) : ee.length > 0 ? h(
|
|
1058
|
-
|
|
1058
|
+
z.length === 1 ? "too-big" : "some-too-big"
|
|
1059
1059
|
/* SomeTooBig */
|
|
1060
1060
|
) : h(null), re.length > 0 && e(re);
|
|
1061
|
-
}, { getRootProps:
|
|
1062
|
-
onDrop:
|
|
1061
|
+
}, { getRootProps: M, getInputProps: O, isDragActive: W, open: S } = Sn({
|
|
1062
|
+
onDrop: v,
|
|
1063
1063
|
multiple: n,
|
|
1064
1064
|
accept: t,
|
|
1065
1065
|
// The zone itself is not a control: the button inside is, for the keyboard and screen readers.
|
|
1066
1066
|
noClick: !0,
|
|
1067
1067
|
noKeyboard: !0
|
|
1068
|
-
}),
|
|
1068
|
+
}), T = g.formatMessage(
|
|
1069
1069
|
{ id: "ds.inputs.drop-zone.browse" },
|
|
1070
1070
|
{ multiple: String(n) }
|
|
1071
1071
|
);
|
|
1072
1072
|
return /* @__PURE__ */ x(
|
|
1073
|
-
|
|
1073
|
+
Ht,
|
|
1074
1074
|
{
|
|
1075
1075
|
role: "group",
|
|
1076
|
-
"aria-labelledby":
|
|
1077
|
-
"aria-describedby":
|
|
1076
|
+
"aria-labelledby": d !== void 0 ? C : void 0,
|
|
1077
|
+
"aria-describedby": b !== null ? y : void 0,
|
|
1078
1078
|
children: [
|
|
1079
|
-
|
|
1080
|
-
/* @__PURE__ */ x(
|
|
1081
|
-
/* @__PURE__ */ i("input", { ...
|
|
1082
|
-
|
|
1083
|
-
/* @__PURE__ */ i(
|
|
1084
|
-
/* @__PURE__ */ i(
|
|
1079
|
+
d !== void 0 && /* @__PURE__ */ i(Nt, { id: C, children: d }),
|
|
1080
|
+
/* @__PURE__ */ x(_t, { ...M({ onClick: S }), active: W, children: [
|
|
1081
|
+
/* @__PURE__ */ i("input", { ...O({ "aria-hidden": !0 }) }),
|
|
1082
|
+
c ?? /* @__PURE__ */ x(J, { children: [
|
|
1083
|
+
/* @__PURE__ */ i(Bt, { "aria-hidden": !0, children: /* @__PURE__ */ i(On, {}) }),
|
|
1084
|
+
/* @__PURE__ */ i(Vt, { children: g.formatMessage(
|
|
1085
1085
|
{
|
|
1086
1086
|
id: W ? "ds.inputs.drop-zone.release" : "ds.inputs.drop-zone.prompt"
|
|
1087
1087
|
},
|
|
@@ -1092,41 +1092,41 @@ function vr({
|
|
|
1092
1092
|
X,
|
|
1093
1093
|
{
|
|
1094
1094
|
variant: "outlined",
|
|
1095
|
-
onClick: (
|
|
1096
|
-
|
|
1095
|
+
onClick: (z) => {
|
|
1096
|
+
z.stopPropagation(), S();
|
|
1097
1097
|
},
|
|
1098
|
-
children:
|
|
1098
|
+
children: T
|
|
1099
1099
|
}
|
|
1100
1100
|
)
|
|
1101
1101
|
] }),
|
|
1102
|
-
(a !== void 0 ||
|
|
1102
|
+
(a !== void 0 || b !== null) && /* @__PURE__ */ x(jt, { children: [
|
|
1103
1103
|
a !== void 0 && /* @__PURE__ */ i(
|
|
1104
1104
|
X,
|
|
1105
1105
|
{
|
|
1106
1106
|
variant: "text",
|
|
1107
|
-
startIcon: /* @__PURE__ */ i(
|
|
1108
|
-
onClick: () =>
|
|
1109
|
-
children:
|
|
1107
|
+
startIcon: /* @__PURE__ */ i(Ut, { src: In, alt: "" }),
|
|
1108
|
+
onClick: () => p(!0),
|
|
1109
|
+
children: g.formatMessage({ id: "ds.inputs.drop-zone.cloud" })
|
|
1110
1110
|
}
|
|
1111
1111
|
),
|
|
1112
|
-
|
|
1112
|
+
b !== null && /* @__PURE__ */ i(Gt, { id: y, children: b })
|
|
1113
1113
|
] }),
|
|
1114
|
-
u !== null && /* @__PURE__ */ i(
|
|
1114
|
+
u !== null && /* @__PURE__ */ i(qt, { role: "alert", children: g.formatMessage(
|
|
1115
1115
|
{ id: `ds.inputs.drop-zone.${u}` },
|
|
1116
|
-
{ size:
|
|
1116
|
+
{ size: f ?? "" }
|
|
1117
1117
|
) }),
|
|
1118
1118
|
a !== void 0 && /* @__PURE__ */ i(
|
|
1119
|
-
|
|
1119
|
+
Tt,
|
|
1120
1120
|
{
|
|
1121
1121
|
open: m,
|
|
1122
|
-
onClose: () =>
|
|
1122
|
+
onClose: () => p(!1),
|
|
1123
1123
|
onImport: a.onImport,
|
|
1124
1124
|
cloudPicker: a,
|
|
1125
1125
|
multiple: n,
|
|
1126
1126
|
maxSize: r,
|
|
1127
|
-
accept: t === void 0 ? void 0 : Object.entries(t).flatMap(([
|
|
1128
|
-
|
|
1129
|
-
...
|
|
1127
|
+
accept: t === void 0 ? void 0 : Object.entries(t).flatMap(([z, R]) => [
|
|
1128
|
+
z,
|
|
1129
|
+
...R
|
|
1130
1130
|
])
|
|
1131
1131
|
}
|
|
1132
1132
|
)
|
|
@@ -1134,60 +1134,60 @@ function vr({
|
|
|
1134
1134
|
}
|
|
1135
1135
|
);
|
|
1136
1136
|
}
|
|
1137
|
-
var
|
|
1138
|
-
const
|
|
1137
|
+
var Yt = /* @__PURE__ */ ((e) => (e.Default = "default", e.Danger = "danger", e.Warning = "warning", e))(Yt || {});
|
|
1138
|
+
const Xt = l("form")(({ theme: e }) => ({
|
|
1139
1139
|
display: "flex",
|
|
1140
1140
|
flexDirection: "column",
|
|
1141
1141
|
gap: o(e.design.space[4]),
|
|
1142
1142
|
color: e.design.tokens["text.secondary"],
|
|
1143
1143
|
overflowWrap: "anywhere"
|
|
1144
|
-
})),
|
|
1144
|
+
})), Qt = (e, n) => {
|
|
1145
1145
|
const { paper: t } = e.design.tokens, r = e.design.tokens["paper.on"];
|
|
1146
|
-
return
|
|
1147
|
-
},
|
|
1146
|
+
return ke(n, t) >= ke(n, r) ? t : r;
|
|
1147
|
+
}, Zt = {
|
|
1148
1148
|
default: "primary",
|
|
1149
1149
|
danger: "error",
|
|
1150
1150
|
warning: "warning"
|
|
1151
1151
|
};
|
|
1152
|
-
function
|
|
1152
|
+
function Jt({
|
|
1153
1153
|
open: e,
|
|
1154
1154
|
title: n,
|
|
1155
1155
|
body: t,
|
|
1156
1156
|
confirmLabel: r,
|
|
1157
1157
|
tone: s = "default",
|
|
1158
|
-
confirmationText:
|
|
1158
|
+
confirmationText: d,
|
|
1159
1159
|
onConfirm: a,
|
|
1160
|
-
onCancel:
|
|
1160
|
+
onCancel: c
|
|
1161
1161
|
}) {
|
|
1162
|
-
const
|
|
1163
|
-
e !==
|
|
1164
|
-
const
|
|
1165
|
-
m ||
|
|
1166
|
-
},
|
|
1167
|
-
if (!
|
|
1162
|
+
const g = P(), C = bn(), y = N(), [u, h] = F(""), [m, p] = F(!1), [f, b] = F(!1), [v, M] = F(e);
|
|
1163
|
+
e !== v && (M(e), e && (h(""), b(!1)));
|
|
1164
|
+
const O = !m && (d === void 0 || u === d), W = s !== "default", S = () => {
|
|
1165
|
+
m || c();
|
|
1166
|
+
}, T = () => {
|
|
1167
|
+
if (!O)
|
|
1168
1168
|
return;
|
|
1169
|
-
|
|
1170
|
-
let
|
|
1169
|
+
b(!1);
|
|
1170
|
+
let R;
|
|
1171
1171
|
try {
|
|
1172
|
-
|
|
1172
|
+
R = a();
|
|
1173
1173
|
} catch {
|
|
1174
|
-
|
|
1174
|
+
b(!0);
|
|
1175
1175
|
return;
|
|
1176
1176
|
}
|
|
1177
|
-
|
|
1178
|
-
() =>
|
|
1177
|
+
R instanceof Promise && (p(!0), R.then(
|
|
1178
|
+
() => p(!1),
|
|
1179
1179
|
() => {
|
|
1180
|
-
|
|
1180
|
+
p(!1), b(!0);
|
|
1181
1181
|
}
|
|
1182
1182
|
));
|
|
1183
|
-
},
|
|
1184
|
-
|
|
1183
|
+
}, z = (R) => {
|
|
1184
|
+
R.preventDefault(), T();
|
|
1185
1185
|
};
|
|
1186
1186
|
return /* @__PURE__ */ i(
|
|
1187
1187
|
Pe,
|
|
1188
1188
|
{
|
|
1189
1189
|
open: e,
|
|
1190
|
-
onClose:
|
|
1190
|
+
onClose: S,
|
|
1191
1191
|
size: He.Small,
|
|
1192
1192
|
title: n,
|
|
1193
1193
|
actions: /* @__PURE__ */ x(J, { children: [
|
|
@@ -1196,26 +1196,26 @@ function Zt({
|
|
|
1196
1196
|
{
|
|
1197
1197
|
variant: "outlined",
|
|
1198
1198
|
disabled: m,
|
|
1199
|
-
autoFocus:
|
|
1200
|
-
onClick:
|
|
1201
|
-
children:
|
|
1199
|
+
autoFocus: d === void 0 && W,
|
|
1200
|
+
onClick: S,
|
|
1201
|
+
children: g.formatMessage({ id: "ds.layers.confirm-dialog.cancel" })
|
|
1202
1202
|
}
|
|
1203
1203
|
),
|
|
1204
1204
|
/* @__PURE__ */ i(
|
|
1205
1205
|
X,
|
|
1206
1206
|
{
|
|
1207
1207
|
type: "submit",
|
|
1208
|
-
form:
|
|
1208
|
+
form: y,
|
|
1209
1209
|
variant: "contained",
|
|
1210
|
-
color:
|
|
1211
|
-
disabled: !
|
|
1210
|
+
color: Zt[s],
|
|
1211
|
+
disabled: !O,
|
|
1212
1212
|
loading: m,
|
|
1213
|
-
autoFocus:
|
|
1213
|
+
autoFocus: d === void 0 && !W,
|
|
1214
1214
|
sx: s === "warning" ? {
|
|
1215
1215
|
"&:not(.Mui-disabled)": {
|
|
1216
|
-
color:
|
|
1217
|
-
|
|
1218
|
-
|
|
1216
|
+
color: Qt(
|
|
1217
|
+
C,
|
|
1218
|
+
C.design.tokens["status.warning"]
|
|
1219
1219
|
)
|
|
1220
1220
|
}
|
|
1221
1221
|
} : void 0,
|
|
@@ -1223,74 +1223,74 @@ function Zt({
|
|
|
1223
1223
|
}
|
|
1224
1224
|
)
|
|
1225
1225
|
] }),
|
|
1226
|
-
children: /* @__PURE__ */ x(
|
|
1226
|
+
children: /* @__PURE__ */ x(Xt, { id: y, onSubmit: z, noValidate: !0, children: [
|
|
1227
1227
|
/* @__PURE__ */ i("div", { children: t }),
|
|
1228
|
-
|
|
1228
|
+
d !== void 0 && /* @__PURE__ */ i(
|
|
1229
1229
|
Vn,
|
|
1230
1230
|
{
|
|
1231
|
-
label:
|
|
1231
|
+
label: g.formatMessage(
|
|
1232
1232
|
{ id: "ds.layers.confirm-dialog.type-to-confirm" },
|
|
1233
|
-
{ text:
|
|
1233
|
+
{ text: d }
|
|
1234
1234
|
),
|
|
1235
1235
|
value: u,
|
|
1236
|
-
onChange: (
|
|
1236
|
+
onChange: (R) => h(R.target.value),
|
|
1237
1237
|
disabled: m,
|
|
1238
1238
|
autoFocus: !0,
|
|
1239
1239
|
autoComplete: "off",
|
|
1240
1240
|
fullWidth: !0
|
|
1241
1241
|
}
|
|
1242
1242
|
),
|
|
1243
|
-
|
|
1243
|
+
f && /* @__PURE__ */ i(Bn, { severity: "error", children: g.formatMessage({ id: "ds.layers.confirm-dialog.failed" }) })
|
|
1244
1244
|
] })
|
|
1245
1245
|
}
|
|
1246
1246
|
);
|
|
1247
1247
|
}
|
|
1248
|
-
const tn =
|
|
1249
|
-
function
|
|
1250
|
-
const [n, t] =
|
|
1248
|
+
const tn = ze(null);
|
|
1249
|
+
function Cr({ children: e }) {
|
|
1250
|
+
const [n, t] = F([]), [r, s] = F(null), d = Y(0), a = Y([]);
|
|
1251
1251
|
a.current = n;
|
|
1252
|
-
const
|
|
1253
|
-
|
|
1252
|
+
const c = n.length > 0 ? n[0] : null;
|
|
1253
|
+
c !== null && c !== r && s(c), V(
|
|
1254
1254
|
() => () => {
|
|
1255
1255
|
a.current.forEach((u) => u.resolve(!1));
|
|
1256
1256
|
},
|
|
1257
1257
|
[]
|
|
1258
1258
|
);
|
|
1259
|
-
const
|
|
1259
|
+
const g = Q(
|
|
1260
1260
|
(u) => new Promise((h) => {
|
|
1261
|
-
|
|
1262
|
-
const m = { id:
|
|
1263
|
-
t((
|
|
1261
|
+
d.current += 1;
|
|
1262
|
+
const m = { id: d.current, options: u, resolve: h };
|
|
1263
|
+
t((p) => [...p, m]);
|
|
1264
1264
|
}),
|
|
1265
1265
|
[]
|
|
1266
|
-
),
|
|
1267
|
-
|
|
1268
|
-
},
|
|
1269
|
-
return /* @__PURE__ */ x(tn.Provider, { value:
|
|
1266
|
+
), C = (u) => {
|
|
1267
|
+
c !== null && (c.resolve(u), t((h) => h.filter((m) => m !== c)));
|
|
1268
|
+
}, y = ge(() => ({ confirm: g }), [g]);
|
|
1269
|
+
return /* @__PURE__ */ x(tn.Provider, { value: y, children: [
|
|
1270
1270
|
e,
|
|
1271
1271
|
r !== null && // A new key per request: each one starts from an empty confirmation field.
|
|
1272
1272
|
/* @__PURE__ */ i(
|
|
1273
|
-
|
|
1273
|
+
Jt,
|
|
1274
1274
|
{
|
|
1275
|
-
open:
|
|
1275
|
+
open: c === r,
|
|
1276
1276
|
...r.options,
|
|
1277
|
-
onConfirm: () =>
|
|
1278
|
-
onCancel: () =>
|
|
1277
|
+
onConfirm: () => C(!0),
|
|
1278
|
+
onCancel: () => C(!1)
|
|
1279
1279
|
},
|
|
1280
1280
|
r.id
|
|
1281
1281
|
)
|
|
1282
1282
|
] });
|
|
1283
1283
|
}
|
|
1284
|
-
function
|
|
1285
|
-
const e =
|
|
1284
|
+
function kr() {
|
|
1285
|
+
const e = Ae(tn);
|
|
1286
1286
|
if (e === null)
|
|
1287
1287
|
throw new Error(
|
|
1288
1288
|
"useConfirmDialog must be called inside a ConfirmDialogProvider"
|
|
1289
1289
|
);
|
|
1290
1290
|
return e;
|
|
1291
1291
|
}
|
|
1292
|
-
var
|
|
1293
|
-
const
|
|
1292
|
+
var eo = /* @__PURE__ */ ((e) => (e.BottomStart = "bottom-start", e.BottomEnd = "bottom-end", e))(eo || {});
|
|
1293
|
+
const no = 320, to = l("div")(({ theme: e }) => {
|
|
1294
1294
|
const { tokens: n, space: t } = e.design;
|
|
1295
1295
|
return {
|
|
1296
1296
|
flex: "none",
|
|
@@ -1299,43 +1299,43 @@ const eo = 320, no = l("div")(({ theme: e }) => {
|
|
|
1299
1299
|
justifyContent: "space-between",
|
|
1300
1300
|
gap: o(t[3]),
|
|
1301
1301
|
padding: `${o(t[2])} ${o(t[2])} ${o(t[2])} ${o(t[4])}`,
|
|
1302
|
-
borderBottom:
|
|
1302
|
+
borderBottom: D(n["border.subtle"])
|
|
1303
1303
|
};
|
|
1304
|
-
}),
|
|
1304
|
+
}), oo = l("h2")(({ theme: e }) => ({
|
|
1305
1305
|
margin: 0,
|
|
1306
1306
|
minWidth: 0,
|
|
1307
1307
|
color: e.design.tokens["text.primary"],
|
|
1308
1308
|
fontSize: o(e.design.typeScale.body),
|
|
1309
|
-
fontWeight:
|
|
1309
|
+
fontWeight: A.semibold,
|
|
1310
1310
|
overflowWrap: "anywhere"
|
|
1311
1311
|
})), on = l("div")(({ theme: e }) => ({
|
|
1312
1312
|
display: "flex",
|
|
1313
1313
|
flexDirection: "column",
|
|
1314
1314
|
gap: o(e.design.space[3]),
|
|
1315
1315
|
fontSize: o(e.design.typeScale.body)
|
|
1316
|
-
})),
|
|
1316
|
+
})), ro = l(on)(({ theme: e }) => ({
|
|
1317
1317
|
padding: o(e.design.space[4])
|
|
1318
1318
|
}));
|
|
1319
|
-
function
|
|
1319
|
+
function Sr({
|
|
1320
1320
|
anchorEl: e,
|
|
1321
1321
|
open: n,
|
|
1322
1322
|
onClose: t,
|
|
1323
1323
|
title: r,
|
|
1324
1324
|
placement: s = "bottom-start",
|
|
1325
|
-
width:
|
|
1325
|
+
width: d = no,
|
|
1326
1326
|
children: a
|
|
1327
1327
|
}) {
|
|
1328
|
-
const
|
|
1328
|
+
const c = P(), g = N(), C = vn() === K.Mobile, y = c.formatMessage({
|
|
1329
1329
|
id: "ds.layers.anchored-panel.close"
|
|
1330
1330
|
}), u = n && e !== null;
|
|
1331
|
-
if (
|
|
1331
|
+
if (C)
|
|
1332
1332
|
return /* @__PURE__ */ i(
|
|
1333
1333
|
wn,
|
|
1334
1334
|
{
|
|
1335
1335
|
open: u,
|
|
1336
1336
|
onClose: t,
|
|
1337
1337
|
title: r,
|
|
1338
|
-
closeLabel:
|
|
1338
|
+
closeLabel: y,
|
|
1339
1339
|
children: /* @__PURE__ */ i(on, { children: a })
|
|
1340
1340
|
}
|
|
1341
1341
|
);
|
|
@@ -1352,9 +1352,9 @@ function Cr({
|
|
|
1352
1352
|
paper: {
|
|
1353
1353
|
role: "dialog",
|
|
1354
1354
|
"aria-modal": !0,
|
|
1355
|
-
"aria-labelledby":
|
|
1355
|
+
"aria-labelledby": g,
|
|
1356
1356
|
sx: (m) => ({
|
|
1357
|
-
width: o(
|
|
1357
|
+
width: o(d),
|
|
1358
1358
|
maxWidth: `calc(100vw - ${o(m.design.space[4] * 2)})`,
|
|
1359
1359
|
marginTop: o(m.design.space[1]),
|
|
1360
1360
|
color: m.design.tokens["text.primary"],
|
|
@@ -1363,79 +1363,101 @@ function Cr({
|
|
|
1363
1363
|
}
|
|
1364
1364
|
},
|
|
1365
1365
|
children: [
|
|
1366
|
-
/* @__PURE__ */ x(
|
|
1367
|
-
/* @__PURE__ */ i(
|
|
1368
|
-
/* @__PURE__ */ i(ae, { "aria-label":
|
|
1366
|
+
/* @__PURE__ */ x(to, { children: [
|
|
1367
|
+
/* @__PURE__ */ i(oo, { id: g, children: r }),
|
|
1368
|
+
/* @__PURE__ */ i(ae, { "aria-label": y, onClick: t, children: /* @__PURE__ */ i(_e, { "aria-hidden": !0 }) })
|
|
1369
1369
|
] }),
|
|
1370
|
-
/* @__PURE__ */ i(
|
|
1370
|
+
/* @__PURE__ */ i(ro, { children: a })
|
|
1371
1371
|
]
|
|
1372
1372
|
}
|
|
1373
1373
|
);
|
|
1374
1374
|
}
|
|
1375
|
-
const
|
|
1375
|
+
const io = [32, 160, 8239, 8201].map(
|
|
1376
1376
|
(e) => String.fromCharCode(e)
|
|
1377
|
-
),
|
|
1377
|
+
), so = (e) => {
|
|
1378
1378
|
var t, r;
|
|
1379
1379
|
const n = new Intl.NumberFormat(e).formatToParts(11111.1);
|
|
1380
1380
|
return {
|
|
1381
1381
|
group: ((t = n.find((s) => s.type === "group")) == null ? void 0 : t.value) ?? " ",
|
|
1382
1382
|
decimal: ((r = n.find((s) => s.type === "decimal")) == null ? void 0 : r.value) ?? "."
|
|
1383
1383
|
};
|
|
1384
|
-
},
|
|
1385
|
-
const r = [n.group, ...
|
|
1386
|
-
(
|
|
1384
|
+
}, Re = (e, n) => {
|
|
1385
|
+
const r = [n.group, ...io].reduce(
|
|
1386
|
+
(d, a) => d.split(a).join(""),
|
|
1387
1387
|
e.trim()
|
|
1388
1388
|
).replace(",", ".");
|
|
1389
1389
|
if (r === "" || !/^-?\d*\.?\d+$|^-?\d+\.$/.test(r))
|
|
1390
1390
|
return null;
|
|
1391
1391
|
const s = Number.parseFloat(r);
|
|
1392
1392
|
return Number.isFinite(s) ? s : null;
|
|
1393
|
-
}
|
|
1394
|
-
|
|
1393
|
+
}, ao = l("div", {
|
|
1394
|
+
shouldForwardProp: (e) => e !== "labelHidden"
|
|
1395
|
+
})(({ labelHidden: e }) => ({
|
|
1396
|
+
...e && { [`& .${qn.root}`]: fe }
|
|
1397
|
+
}));
|
|
1398
|
+
function Ir({
|
|
1395
1399
|
label: e,
|
|
1396
1400
|
value: n,
|
|
1397
1401
|
onChange: t,
|
|
1398
1402
|
decimals: r = 0,
|
|
1399
1403
|
min: s = 0,
|
|
1400
|
-
|
|
1401
|
-
|
|
1404
|
+
max: d,
|
|
1405
|
+
hideLabel: a = !1,
|
|
1406
|
+
ariaLabel: c,
|
|
1407
|
+
help: g,
|
|
1408
|
+
error: C,
|
|
1409
|
+
testId: y,
|
|
1410
|
+
disabled: u,
|
|
1411
|
+
adornment: h
|
|
1402
1412
|
}) {
|
|
1403
|
-
const
|
|
1404
|
-
() =>
|
|
1405
|
-
[
|
|
1406
|
-
),
|
|
1407
|
-
(
|
|
1413
|
+
const m = P(), p = ge(
|
|
1414
|
+
() => so(m.locale),
|
|
1415
|
+
[m.locale]
|
|
1416
|
+
), f = Q(
|
|
1417
|
+
(S) => S === null ? "" : m.formatNumber(S, {
|
|
1408
1418
|
minimumFractionDigits: r,
|
|
1409
1419
|
maximumFractionDigits: r
|
|
1410
1420
|
}),
|
|
1411
|
-
[
|
|
1412
|
-
), [b,
|
|
1413
|
-
return
|
|
1414
|
-
b ||
|
|
1415
|
-
}, [n, b,
|
|
1416
|
-
|
|
1421
|
+
[m, r]
|
|
1422
|
+
), [b, v] = F(!1), [M, O] = F(() => f(n));
|
|
1423
|
+
return V(() => {
|
|
1424
|
+
b || O(f(n));
|
|
1425
|
+
}, [n, b, f]), /* @__PURE__ */ i(ao, { labelHidden: a, children: /* @__PURE__ */ i(Ve, { label: e, help: g, error: C, children: /* @__PURE__ */ i(
|
|
1426
|
+
me,
|
|
1417
1427
|
{
|
|
1418
|
-
disabled:
|
|
1419
|
-
value:
|
|
1420
|
-
inputProps: {
|
|
1428
|
+
disabled: u,
|
|
1429
|
+
value: M,
|
|
1430
|
+
inputProps: {
|
|
1431
|
+
inputMode: "decimal",
|
|
1432
|
+
"aria-label": c,
|
|
1433
|
+
"data-testid": y
|
|
1434
|
+
},
|
|
1421
1435
|
onFocus: () => {
|
|
1422
|
-
|
|
1436
|
+
v(!0), n !== null && O(String(n).replace(".", p.decimal));
|
|
1423
1437
|
},
|
|
1424
|
-
onChange: (
|
|
1425
|
-
|
|
1426
|
-
const
|
|
1427
|
-
|
|
1438
|
+
onChange: (S) => {
|
|
1439
|
+
O(S.target.value);
|
|
1440
|
+
const T = Re(S.target.value, p);
|
|
1441
|
+
T !== null ? t(T) : S.target.value === "" && t(null);
|
|
1428
1442
|
},
|
|
1429
1443
|
onBlur: () => {
|
|
1430
|
-
|
|
1431
|
-
let
|
|
1432
|
-
|
|
1444
|
+
v(!1);
|
|
1445
|
+
let S = Re(M, p);
|
|
1446
|
+
if (S !== null) {
|
|
1447
|
+
const T = Math.max(S, s);
|
|
1448
|
+
S = Number.parseFloat(
|
|
1449
|
+
(d === void 0 ? T : Math.min(T, d)).toFixed(
|
|
1450
|
+
r
|
|
1451
|
+
)
|
|
1452
|
+
);
|
|
1453
|
+
}
|
|
1454
|
+
t(S), O(f(S));
|
|
1433
1455
|
},
|
|
1434
|
-
endAdornment:
|
|
1456
|
+
endAdornment: h ? /* @__PURE__ */ i(Un, { position: "end", children: h }) : void 0
|
|
1435
1457
|
}
|
|
1436
|
-
) });
|
|
1458
|
+
) }) });
|
|
1437
1459
|
}
|
|
1438
|
-
const
|
|
1460
|
+
const Fr = { l: 0.72, c: 0.12 }, Mr = [
|
|
1439
1461
|
266,
|
|
1440
1462
|
296,
|
|
1441
1463
|
326,
|
|
@@ -1461,31 +1483,31 @@ const Sr = { l: 0.72, c: 0.12 }, Ir = [
|
|
|
1461
1483
|
"#37bda2",
|
|
1462
1484
|
"#18b9c9",
|
|
1463
1485
|
"#4eb0e5"
|
|
1464
|
-
],
|
|
1465
|
-
const n =
|
|
1486
|
+
], Or = "#767676", Wr = rn[6], Tr = "#111a2f", Rr = "#5674be", lo = /^#?([0-9a-f]{6})$/i, q = (e) => {
|
|
1487
|
+
const n = lo.exec(e.trim());
|
|
1466
1488
|
return n ? `#${n[1].toLowerCase()}` : null;
|
|
1467
|
-
},
|
|
1489
|
+
}, co = l("div")(({ theme: e }) => ({
|
|
1468
1490
|
display: "flex",
|
|
1469
1491
|
alignItems: "center",
|
|
1470
1492
|
gap: o(e.design.space[3])
|
|
1471
|
-
})),
|
|
1493
|
+
})), uo = l("span")(({ theme: e }) => ({
|
|
1472
1494
|
flex: "none",
|
|
1473
1495
|
width: o(e.design.densityValues[e.design.density].control),
|
|
1474
1496
|
height: o(e.design.densityValues[e.design.density].control),
|
|
1475
1497
|
borderRadius: o(e.design.radii.md),
|
|
1476
|
-
border:
|
|
1477
|
-
})),
|
|
1498
|
+
border: D(e.design.tokens["border.control"])
|
|
1499
|
+
})), po = l("div")(({ theme: e }) => ({
|
|
1478
1500
|
display: "flex",
|
|
1479
1501
|
flexWrap: "wrap",
|
|
1480
1502
|
gap: o(e.design.space[2]),
|
|
1481
1503
|
marginTop: o(e.design.space[2])
|
|
1482
|
-
})),
|
|
1504
|
+
})), go = l(Be)(({ theme: e }) => {
|
|
1483
1505
|
const { densityValues: n, density: t, space: r } = e.design, s = n[t].control - r[2];
|
|
1484
1506
|
return {
|
|
1485
1507
|
width: o(s),
|
|
1486
1508
|
height: o(s),
|
|
1487
1509
|
borderRadius: o(e.design.radii.sm),
|
|
1488
|
-
border:
|
|
1510
|
+
border: D(e.design.tokens["border.control"]),
|
|
1489
1511
|
// The chosen swatch carries the ring of the design system (`focus.ring` is the accent).
|
|
1490
1512
|
'&[aria-pressed="true"]': te(e),
|
|
1491
1513
|
"&.Mui-focusVisible": te(e),
|
|
@@ -1495,59 +1517,59 @@ const Sr = { l: 0.72, c: 0.12 }, Ir = [
|
|
|
1495
1517
|
}
|
|
1496
1518
|
};
|
|
1497
1519
|
});
|
|
1498
|
-
function
|
|
1520
|
+
function Er({
|
|
1499
1521
|
label: e,
|
|
1500
1522
|
value: n,
|
|
1501
1523
|
onChange: t,
|
|
1502
1524
|
swatches: r = rn
|
|
1503
1525
|
}) {
|
|
1504
|
-
const s =
|
|
1505
|
-
|
|
1506
|
-
|
|
1526
|
+
const s = P(), d = N(), [a, c] = F(n), g = a !== "" && q(a) === null;
|
|
1527
|
+
V(() => {
|
|
1528
|
+
c(
|
|
1507
1529
|
(u) => q(u) === q(n) ? u : n
|
|
1508
1530
|
);
|
|
1509
1531
|
}, [n]);
|
|
1510
|
-
const
|
|
1511
|
-
|
|
1532
|
+
const C = (u) => {
|
|
1533
|
+
c(u);
|
|
1512
1534
|
const h = q(u);
|
|
1513
1535
|
h !== null && h !== q(n) && t(h);
|
|
1514
|
-
},
|
|
1515
|
-
return /* @__PURE__ */ x(le, { fullWidth: !0, error:
|
|
1516
|
-
/* @__PURE__ */ i(
|
|
1517
|
-
/* @__PURE__ */ x(
|
|
1536
|
+
}, y = q(n);
|
|
1537
|
+
return /* @__PURE__ */ x(le, { fullWidth: !0, error: g, children: [
|
|
1538
|
+
/* @__PURE__ */ i($e, { htmlFor: `${d}-hex`, children: e }),
|
|
1539
|
+
/* @__PURE__ */ x(co, { children: [
|
|
1518
1540
|
/* @__PURE__ */ i(
|
|
1519
|
-
|
|
1541
|
+
uo,
|
|
1520
1542
|
{
|
|
1521
1543
|
"aria-hidden": "true",
|
|
1522
|
-
style: { backgroundColor:
|
|
1544
|
+
style: { backgroundColor: y ?? void 0 }
|
|
1523
1545
|
}
|
|
1524
1546
|
),
|
|
1525
1547
|
/* @__PURE__ */ i(
|
|
1526
|
-
|
|
1548
|
+
me,
|
|
1527
1549
|
{
|
|
1528
|
-
id: `${
|
|
1550
|
+
id: `${d}-hex`,
|
|
1529
1551
|
fullWidth: !0,
|
|
1530
1552
|
value: a,
|
|
1531
|
-
error:
|
|
1553
|
+
error: g,
|
|
1532
1554
|
inputProps: {
|
|
1533
|
-
"aria-describedby":
|
|
1555
|
+
"aria-describedby": g ? `${d}-error` : void 0,
|
|
1534
1556
|
spellCheck: !1,
|
|
1535
1557
|
autoComplete: "off"
|
|
1536
1558
|
},
|
|
1537
|
-
onChange: (u) =>
|
|
1559
|
+
onChange: (u) => C(u.target.value)
|
|
1538
1560
|
}
|
|
1539
1561
|
)
|
|
1540
1562
|
] }),
|
|
1541
|
-
|
|
1563
|
+
g && /* @__PURE__ */ i(se, { id: `${d}-error`, children: s.formatMessage({ id: "ds.inputs.color.invalid" }) }),
|
|
1542
1564
|
/* @__PURE__ */ i(
|
|
1543
|
-
|
|
1565
|
+
po,
|
|
1544
1566
|
{
|
|
1545
1567
|
role: "group",
|
|
1546
1568
|
"aria-label": s.formatMessage({ id: "ds.inputs.color.swatches" }),
|
|
1547
1569
|
children: r.map((u) => /* @__PURE__ */ i(
|
|
1548
|
-
|
|
1570
|
+
go,
|
|
1549
1571
|
{
|
|
1550
|
-
"aria-pressed": q(u) ===
|
|
1572
|
+
"aria-pressed": q(u) === y,
|
|
1551
1573
|
"aria-label": u,
|
|
1552
1574
|
style: { backgroundColor: u },
|
|
1553
1575
|
onClick: () => t(q(u) ?? u)
|
|
@@ -1558,16 +1580,16 @@ function Tr({
|
|
|
1558
1580
|
)
|
|
1559
1581
|
] });
|
|
1560
1582
|
}
|
|
1561
|
-
const
|
|
1583
|
+
const fo = 6, mo = l("div", {
|
|
1562
1584
|
shouldForwardProp: (e) => e !== "edges"
|
|
1563
1585
|
})(({ theme: e, edges: n }) => {
|
|
1564
|
-
const { tokens: t, radii: r, space: s } = e.design,
|
|
1586
|
+
const { tokens: t, radii: r, space: s } = e.design, d = o(s[1] * fo), a = t["text.primary"], c = n.start ? `transparent, ${a} ${d}` : a, g = n.end ? `${a} calc(100% - ${d}), transparent` : a;
|
|
1565
1587
|
return {
|
|
1566
|
-
maskImage: n.start || n.end ? `linear-gradient(to right, ${
|
|
1588
|
+
maskImage: n.start || n.end ? `linear-gradient(to right, ${c}, ${g})` : "none",
|
|
1567
1589
|
display: "inline-flex",
|
|
1568
1590
|
maxWidth: "100%",
|
|
1569
1591
|
minWidth: 0,
|
|
1570
|
-
border:
|
|
1592
|
+
border: D(t["border.subtle"]),
|
|
1571
1593
|
borderRadius: o(r.md),
|
|
1572
1594
|
overflowX: "auto",
|
|
1573
1595
|
overflowY: "hidden",
|
|
@@ -1586,12 +1608,12 @@ const po = 6, go = l("div", {
|
|
|
1586
1608
|
backgroundColor: "transparent"
|
|
1587
1609
|
}
|
|
1588
1610
|
};
|
|
1589
|
-
}),
|
|
1590
|
-
const { tokens: n, space: t, typeScale: r, fonts: s, densityValues:
|
|
1611
|
+
}), ho = l(Be)(({ theme: e }) => {
|
|
1612
|
+
const { tokens: n, space: t, typeScale: r, fonts: s, densityValues: d, radii: a } = e.design;
|
|
1591
1613
|
return {
|
|
1592
1614
|
flex: "none",
|
|
1593
1615
|
gap: o(t[2]),
|
|
1594
|
-
minHeight: o(
|
|
1616
|
+
minHeight: o(d[e.design.density].control),
|
|
1595
1617
|
paddingLeft: o(t[3]),
|
|
1596
1618
|
paddingRight: o(t[3]),
|
|
1597
1619
|
fontFamily: s.sans,
|
|
@@ -1599,57 +1621,57 @@ const po = 6, go = l("div", {
|
|
|
1599
1621
|
whiteSpace: "nowrap",
|
|
1600
1622
|
color: n["text.secondary"],
|
|
1601
1623
|
transition: oe(e, ["background-color", "color"]),
|
|
1602
|
-
"& + &": { borderLeft:
|
|
1624
|
+
"& + &": { borderLeft: D(n["border.subtle"]) },
|
|
1603
1625
|
'&[aria-checked="true"]': {
|
|
1604
1626
|
backgroundColor: n["bg.raised"],
|
|
1605
1627
|
color: n["text.primary"],
|
|
1606
|
-
fontWeight:
|
|
1628
|
+
fontWeight: A.medium
|
|
1607
1629
|
},
|
|
1608
1630
|
"&:hover": { backgroundColor: n["bg.hover"] },
|
|
1609
1631
|
"&.Mui-focusVisible": { ...te(e), outlineOffset: "-2px" },
|
|
1610
1632
|
// A short label (« 1 h », « 7 j ») would leave a segment narrower than a finger. Each segment
|
|
1611
1633
|
// is its own bordered tile once the band wraps.
|
|
1612
1634
|
[Z.down(K.Tablet)]: {
|
|
1613
|
-
minWidth: o(
|
|
1614
|
-
minHeight: o(
|
|
1615
|
-
border:
|
|
1635
|
+
minWidth: o(d.touchTarget),
|
|
1636
|
+
minHeight: o(d.touchTarget),
|
|
1637
|
+
border: D(n["border.subtle"]),
|
|
1616
1638
|
borderRadius: o(a.md),
|
|
1617
1639
|
backgroundColor: n["bg.surface"],
|
|
1618
1640
|
'&[aria-checked="true"]': { backgroundColor: n["bg.raised"] }
|
|
1619
1641
|
}
|
|
1620
1642
|
};
|
|
1621
|
-
}),
|
|
1643
|
+
}), bo = l("span")(({ theme: e }) => ({
|
|
1622
1644
|
display: "inline-flex",
|
|
1623
1645
|
flex: "none",
|
|
1624
1646
|
"& svg": {
|
|
1625
1647
|
width: o(e.design.space[4]),
|
|
1626
1648
|
height: o(e.design.space[4])
|
|
1627
1649
|
}
|
|
1628
|
-
})),
|
|
1650
|
+
})), yo = l("span")(fe), vo = l("span")(({ theme: e }) => ({
|
|
1629
1651
|
fontFamily: e.design.fonts.mono,
|
|
1630
1652
|
fontSize: o(e.design.typeScale.caption),
|
|
1631
1653
|
color: e.design.tokens["text.muted"]
|
|
1632
1654
|
}));
|
|
1633
|
-
function
|
|
1655
|
+
function zr({
|
|
1634
1656
|
options: e,
|
|
1635
1657
|
value: n,
|
|
1636
1658
|
onChange: t,
|
|
1637
1659
|
ariaLabel: r,
|
|
1638
1660
|
testId: s
|
|
1639
1661
|
}) {
|
|
1640
|
-
const
|
|
1641
|
-
const u =
|
|
1662
|
+
const d = Y(null), [a, c] = F({ start: !1, end: !1 }), g = Q(() => {
|
|
1663
|
+
const u = d.current;
|
|
1642
1664
|
if (!u)
|
|
1643
1665
|
return;
|
|
1644
1666
|
const h = u.scrollLeft > 0, m = u.scrollLeft + u.clientWidth < u.scrollWidth - 1;
|
|
1645
|
-
|
|
1646
|
-
(
|
|
1667
|
+
c(
|
|
1668
|
+
(p) => p.start === h && p.end === m ? p : { start: h, end: m }
|
|
1647
1669
|
);
|
|
1648
1670
|
}, []);
|
|
1649
|
-
|
|
1650
|
-
const
|
|
1651
|
-
var
|
|
1652
|
-
const h = e.findIndex((
|
|
1671
|
+
V(() => (g(), window.addEventListener("resize", g), () => window.removeEventListener("resize", g)), [g, e]);
|
|
1672
|
+
const C = (u) => {
|
|
1673
|
+
var p, f;
|
|
1674
|
+
const h = e.findIndex((b) => b.value === n);
|
|
1653
1675
|
let m;
|
|
1654
1676
|
switch (u.key) {
|
|
1655
1677
|
case "ArrowRight":
|
|
@@ -1669,37 +1691,37 @@ function Rr({
|
|
|
1669
1691
|
default:
|
|
1670
1692
|
return;
|
|
1671
1693
|
}
|
|
1672
|
-
u.preventDefault(), t(e[m].value), (
|
|
1673
|
-
},
|
|
1694
|
+
u.preventDefault(), t(e[m].value), (f = (p = d.current) == null ? void 0 : p.querySelectorAll('[role="radio"]')[m]) == null || f.focus();
|
|
1695
|
+
}, y = Math.max(
|
|
1674
1696
|
e.findIndex((u) => u.value === n),
|
|
1675
1697
|
0
|
|
1676
1698
|
);
|
|
1677
1699
|
return /* @__PURE__ */ i(
|
|
1678
|
-
|
|
1700
|
+
mo,
|
|
1679
1701
|
{
|
|
1680
|
-
ref:
|
|
1702
|
+
ref: d,
|
|
1681
1703
|
role: "radiogroup",
|
|
1682
1704
|
"aria-label": r,
|
|
1683
1705
|
"data-testid": s,
|
|
1684
1706
|
edges: a,
|
|
1685
|
-
onKeyDown:
|
|
1686
|
-
onScroll:
|
|
1707
|
+
onKeyDown: C,
|
|
1708
|
+
onScroll: g,
|
|
1687
1709
|
children: e.map((u, h) => {
|
|
1688
1710
|
const m = u.value === n;
|
|
1689
1711
|
return /* @__PURE__ */ x(
|
|
1690
|
-
|
|
1712
|
+
ho,
|
|
1691
1713
|
{
|
|
1692
1714
|
role: "radio",
|
|
1693
1715
|
"aria-checked": m,
|
|
1694
1716
|
"aria-label": u.ariaLabel,
|
|
1695
1717
|
lang: u.lang,
|
|
1696
1718
|
"data-testid": u.testId,
|
|
1697
|
-
tabIndex: h ===
|
|
1719
|
+
tabIndex: h === y ? 0 : -1,
|
|
1698
1720
|
onClick: () => t(u.value),
|
|
1699
1721
|
children: [
|
|
1700
|
-
u.icon !== void 0 && /* @__PURE__ */ i(
|
|
1701
|
-
u.icon !== void 0 && u.iconOnly ? /* @__PURE__ */ i(
|
|
1702
|
-
u.count !== void 0 && /* @__PURE__ */ i(
|
|
1722
|
+
u.icon !== void 0 && /* @__PURE__ */ i(bo, { "aria-hidden": !0, children: u.icon }),
|
|
1723
|
+
u.icon !== void 0 && u.iconOnly ? /* @__PURE__ */ i(yo, { children: u.label }) : u.label,
|
|
1724
|
+
u.count !== void 0 && /* @__PURE__ */ i(vo, { children: u.count })
|
|
1703
1725
|
]
|
|
1704
1726
|
},
|
|
1705
1727
|
u.value
|
|
@@ -1708,31 +1730,31 @@ function Rr({
|
|
|
1708
1730
|
}
|
|
1709
1731
|
);
|
|
1710
1732
|
}
|
|
1711
|
-
const
|
|
1712
|
-
const [r, s] =
|
|
1733
|
+
const wo = 1, xo = (e, n) => n === "vertical" ? e.scrollHeight - e.clientHeight - e.scrollTop : e.scrollWidth - e.clientWidth - e.scrollLeft, Co = (e, n, t) => {
|
|
1734
|
+
const [r, s] = F(!1), d = Q(() => {
|
|
1713
1735
|
const a = e.current;
|
|
1714
|
-
a !== null && s(
|
|
1736
|
+
a !== null && s(xo(a, n) > wo);
|
|
1715
1737
|
}, [e, n]);
|
|
1716
|
-
return
|
|
1738
|
+
return Le(d, [d, t]), V(() => {
|
|
1717
1739
|
const a = e.current;
|
|
1718
1740
|
if (a === null)
|
|
1719
1741
|
return;
|
|
1720
|
-
a.addEventListener("scroll",
|
|
1721
|
-
const
|
|
1722
|
-
return
|
|
1723
|
-
a.removeEventListener("scroll",
|
|
1742
|
+
a.addEventListener("scroll", d, { passive: !0 });
|
|
1743
|
+
const c = typeof ResizeObserver > "u" ? null : new ResizeObserver(d);
|
|
1744
|
+
return c !== null && (c.observe(a), Array.from(a.children).forEach((g) => c.observe(g))), () => {
|
|
1745
|
+
a.removeEventListener("scroll", d), c == null || c.disconnect();
|
|
1724
1746
|
};
|
|
1725
|
-
}, [e,
|
|
1747
|
+
}, [e, d, t]), r;
|
|
1726
1748
|
};
|
|
1727
|
-
var
|
|
1728
|
-
const
|
|
1749
|
+
var ko = /* @__PURE__ */ ((e) => (e.Primary = "primary", e.Secondary = "secondary", e))(ko || {});
|
|
1750
|
+
const So = 2, Io = /* @__PURE__ */ new Set(["Enter", " "]), Fo = l("div", {
|
|
1729
1751
|
shouldForwardProp: (e) => e !== "variant"
|
|
1730
1752
|
})(({ theme: e, variant: n }) => ({
|
|
1731
1753
|
minWidth: 0,
|
|
1732
1754
|
...n === "primary" && {
|
|
1733
|
-
borderBottom:
|
|
1755
|
+
borderBottom: D(e.design.tokens["border.subtle"])
|
|
1734
1756
|
}
|
|
1735
|
-
})), sn = 32,
|
|
1757
|
+
})), sn = 32, Mo = l("div", {
|
|
1736
1758
|
shouldForwardProp: (e) => e !== "variant" && e !== "fade"
|
|
1737
1759
|
})(({ theme: e, variant: n, fade: t }) => {
|
|
1738
1760
|
const s = `linear-gradient(to right, ${e.design.tokens["text.primary"]} calc(100% - ${o(
|
|
@@ -1749,7 +1771,7 @@ const Co = 2, ko = /* @__PURE__ */ new Set(["Enter", " "]), So = l("div", {
|
|
|
1749
1771
|
...t && { maskImage: s, WebkitMaskImage: s }
|
|
1750
1772
|
};
|
|
1751
1773
|
}), an = (e, n) => {
|
|
1752
|
-
const { tokens: t, space: r, radii: s, typeScale:
|
|
1774
|
+
const { tokens: t, space: r, radii: s, typeScale: d, fonts: a, densityValues: c, density: g } = e.design, C = {
|
|
1753
1775
|
position: "relative",
|
|
1754
1776
|
display: "inline-flex",
|
|
1755
1777
|
alignItems: "center",
|
|
@@ -1768,187 +1790,187 @@ const Co = 2, ko = /* @__PURE__ */ new Set(["Enter", " "]), So = l("div", {
|
|
|
1768
1790
|
"&:hover": { color: t["text.primary"] },
|
|
1769
1791
|
'&[aria-selected="true"]': {
|
|
1770
1792
|
color: t["text.primary"],
|
|
1771
|
-
fontWeight:
|
|
1793
|
+
fontWeight: A.medium
|
|
1772
1794
|
},
|
|
1773
1795
|
// Inside the scrolling row, an outer ring would be clipped: it is drawn inside the tab.
|
|
1774
1796
|
"&:focus-visible": { ...te(e), outlineOffset: "-2px" }
|
|
1775
|
-
},
|
|
1797
|
+
}, y = {
|
|
1776
1798
|
[Z.down(K.Tablet)]: {
|
|
1777
|
-
minHeight: o(
|
|
1799
|
+
minHeight: o(c.touchTarget)
|
|
1778
1800
|
}
|
|
1779
1801
|
};
|
|
1780
1802
|
return n === "primary" ? {
|
|
1781
|
-
...
|
|
1782
|
-
minHeight: o(
|
|
1803
|
+
...C,
|
|
1804
|
+
minHeight: o(c[g].control + r[2]),
|
|
1783
1805
|
padding: `0 ${o(r[3])}`,
|
|
1784
|
-
fontSize: o(
|
|
1806
|
+
fontSize: o(d.body),
|
|
1785
1807
|
'&[aria-selected="true"]::after': {
|
|
1786
1808
|
content: '""',
|
|
1787
1809
|
position: "absolute",
|
|
1788
1810
|
left: 0,
|
|
1789
1811
|
right: 0,
|
|
1790
1812
|
bottom: 0,
|
|
1791
|
-
height: o(
|
|
1813
|
+
height: o(So),
|
|
1792
1814
|
backgroundColor: t.accent
|
|
1793
1815
|
},
|
|
1794
|
-
...
|
|
1816
|
+
...y
|
|
1795
1817
|
} : {
|
|
1796
|
-
...
|
|
1797
|
-
minHeight: o(
|
|
1818
|
+
...C,
|
|
1819
|
+
minHeight: o(c.compact.control),
|
|
1798
1820
|
padding: `0 ${o(r[3])}`,
|
|
1799
1821
|
borderRadius: o(s.md),
|
|
1800
|
-
fontSize: o(
|
|
1822
|
+
fontSize: o(d.small),
|
|
1801
1823
|
"&:hover": {
|
|
1802
1824
|
color: t["text.primary"],
|
|
1803
1825
|
backgroundColor: t["bg.hover"]
|
|
1804
1826
|
},
|
|
1805
1827
|
'&[aria-selected="true"]': {
|
|
1806
1828
|
color: t["text.primary"],
|
|
1807
|
-
fontWeight:
|
|
1829
|
+
fontWeight: A.medium,
|
|
1808
1830
|
backgroundColor: t["bg.raised"]
|
|
1809
1831
|
},
|
|
1810
|
-
...
|
|
1832
|
+
...y
|
|
1811
1833
|
};
|
|
1812
|
-
}, ln = (e) => e !== "variant",
|
|
1813
|
-
const { tokens: n, space: t, radii: r, fonts: s, typeScale:
|
|
1834
|
+
}, ln = (e) => e !== "variant", Oo = l(Yn, { shouldForwardProp: ln })(({ theme: e, variant: n }) => an(e, n)), Wo = l("button", { shouldForwardProp: ln })(({ theme: e, variant: n }) => an(e, n)), To = l("span")(({ theme: e }) => {
|
|
1835
|
+
const { tokens: n, space: t, radii: r, fonts: s, typeScale: d } = e.design;
|
|
1814
1836
|
return {
|
|
1815
1837
|
display: "inline-flex",
|
|
1816
1838
|
alignItems: "center",
|
|
1817
1839
|
padding: `0 ${o(t[1])}`,
|
|
1818
1840
|
borderRadius: o(r.sm),
|
|
1819
|
-
border:
|
|
1841
|
+
border: D(n["border.subtle"]),
|
|
1820
1842
|
fontFamily: s.mono,
|
|
1821
|
-
fontSize: o(
|
|
1822
|
-
fontWeight:
|
|
1843
|
+
fontSize: o(d.caption),
|
|
1844
|
+
fontWeight: A.regular,
|
|
1823
1845
|
lineHeight: 1.6,
|
|
1824
1846
|
color: n["text.muted"]
|
|
1825
1847
|
};
|
|
1826
|
-
}),
|
|
1848
|
+
}), Ee = (e, n) => {
|
|
1827
1849
|
const t = n.offsetLeft, r = t + n.offsetWidth + sn;
|
|
1828
1850
|
t < e.scrollLeft ? e.scrollLeft = t : r > e.scrollLeft + e.clientWidth && (e.scrollLeft = r - e.clientWidth);
|
|
1829
1851
|
};
|
|
1830
|
-
function
|
|
1852
|
+
function Ar({
|
|
1831
1853
|
items: e,
|
|
1832
1854
|
value: n,
|
|
1833
1855
|
onChange: t,
|
|
1834
1856
|
variant: r,
|
|
1835
1857
|
"aria-label": s
|
|
1836
1858
|
}) {
|
|
1837
|
-
const
|
|
1859
|
+
const d = P(), a = Y(null), c = e.filter((p) => p.hidden !== !0), g = Co(a, "horizontal", c.length), C = Q(
|
|
1838
1860
|
() => {
|
|
1839
|
-
var
|
|
1861
|
+
var p;
|
|
1840
1862
|
return Array.from(
|
|
1841
|
-
((
|
|
1863
|
+
((p = a.current) == null ? void 0 : p.querySelectorAll('[role="tab"]')) ?? []
|
|
1842
1864
|
);
|
|
1843
1865
|
},
|
|
1844
1866
|
[]
|
|
1845
|
-
),
|
|
1846
|
-
const
|
|
1847
|
-
|
|
1867
|
+
), y = Q(() => {
|
|
1868
|
+
const p = a.current, f = p == null ? void 0 : p.querySelector('[aria-selected="true"]');
|
|
1869
|
+
p && f && Ee(p, f);
|
|
1848
1870
|
}, []);
|
|
1849
|
-
|
|
1850
|
-
const u =
|
|
1851
|
-
|
|
1852
|
-
const
|
|
1853
|
-
if (
|
|
1871
|
+
Le(y, [y, n]);
|
|
1872
|
+
const u = c.map((p) => p.value).join("|");
|
|
1873
|
+
V(() => {
|
|
1874
|
+
const p = a.current;
|
|
1875
|
+
if (p === null || typeof ResizeObserver > "u")
|
|
1854
1876
|
return;
|
|
1855
|
-
const
|
|
1856
|
-
return
|
|
1857
|
-
}, [
|
|
1858
|
-
const h = (
|
|
1859
|
-
const
|
|
1860
|
-
if (
|
|
1877
|
+
const f = new ResizeObserver(y);
|
|
1878
|
+
return f.observe(p), Array.from(p.children).forEach((b) => f.observe(b)), () => f.disconnect();
|
|
1879
|
+
}, [y, u]);
|
|
1880
|
+
const h = (p) => {
|
|
1881
|
+
const f = C(), b = f.findIndex((M) => M === document.activeElement);
|
|
1882
|
+
if (b < 0)
|
|
1861
1883
|
return;
|
|
1862
|
-
if (
|
|
1863
|
-
|
|
1884
|
+
if (Io.has(p.key)) {
|
|
1885
|
+
p.key === " " && f[b] instanceof HTMLAnchorElement && (p.preventDefault(), f[b].click());
|
|
1864
1886
|
return;
|
|
1865
1887
|
}
|
|
1866
|
-
let
|
|
1867
|
-
switch (
|
|
1888
|
+
let v;
|
|
1889
|
+
switch (p.key) {
|
|
1868
1890
|
case "ArrowRight":
|
|
1869
|
-
|
|
1891
|
+
v = (b + 1) % f.length;
|
|
1870
1892
|
break;
|
|
1871
1893
|
case "ArrowLeft":
|
|
1872
|
-
|
|
1894
|
+
v = (b - 1 + f.length) % f.length;
|
|
1873
1895
|
break;
|
|
1874
1896
|
case "Home":
|
|
1875
|
-
|
|
1897
|
+
v = 0;
|
|
1876
1898
|
break;
|
|
1877
1899
|
case "End":
|
|
1878
|
-
|
|
1900
|
+
v = f.length - 1;
|
|
1879
1901
|
break;
|
|
1880
1902
|
default:
|
|
1881
1903
|
return;
|
|
1882
1904
|
}
|
|
1883
|
-
|
|
1905
|
+
p.preventDefault(), f[v].focus(), a.current && Ee(a.current, f[v]);
|
|
1884
1906
|
}, m = Math.max(
|
|
1885
|
-
|
|
1907
|
+
c.findIndex((p) => p.value === n),
|
|
1886
1908
|
0
|
|
1887
1909
|
);
|
|
1888
|
-
return /* @__PURE__ */ i(
|
|
1889
|
-
|
|
1910
|
+
return /* @__PURE__ */ i(Fo, { variant: r, children: /* @__PURE__ */ i(
|
|
1911
|
+
Mo,
|
|
1890
1912
|
{
|
|
1891
1913
|
ref: a,
|
|
1892
1914
|
role: "tablist",
|
|
1893
1915
|
"aria-label": s,
|
|
1894
1916
|
variant: r,
|
|
1895
|
-
fade:
|
|
1896
|
-
"data-overflowing":
|
|
1917
|
+
fade: g,
|
|
1918
|
+
"data-overflowing": g || void 0,
|
|
1897
1919
|
onKeyDown: h,
|
|
1898
|
-
children:
|
|
1899
|
-
const
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
] }),
|
|
1920
|
+
children: c.map((p, f) => {
|
|
1921
|
+
const b = p.value === n, v = /* @__PURE__ */ x(J, { children: [
|
|
1922
|
+
p.label,
|
|
1923
|
+
p.badge !== void 0 && /* @__PURE__ */ i(To, { children: typeof p.badge == "number" ? d.formatNumber(p.badge) : p.badge })
|
|
1924
|
+
] }), M = {
|
|
1903
1925
|
role: "tab",
|
|
1904
|
-
"aria-selected":
|
|
1905
|
-
tabIndex:
|
|
1906
|
-
"data-testid":
|
|
1926
|
+
"aria-selected": b,
|
|
1927
|
+
tabIndex: f === m ? 0 : -1,
|
|
1928
|
+
"data-testid": p.testId,
|
|
1907
1929
|
variant: r,
|
|
1908
|
-
onClick: () => t == null ? void 0 : t(
|
|
1930
|
+
onClick: () => t == null ? void 0 : t(p.value)
|
|
1909
1931
|
};
|
|
1910
|
-
return
|
|
1911
|
-
|
|
1932
|
+
return p.to !== void 0 ? /* @__PURE__ */ i(
|
|
1933
|
+
Oo,
|
|
1912
1934
|
{
|
|
1913
|
-
to:
|
|
1914
|
-
"aria-current":
|
|
1915
|
-
...
|
|
1916
|
-
children:
|
|
1935
|
+
to: p.to,
|
|
1936
|
+
"aria-current": b ? "page" : void 0,
|
|
1937
|
+
...M,
|
|
1938
|
+
children: v
|
|
1917
1939
|
},
|
|
1918
|
-
|
|
1919
|
-
) : /* @__PURE__ */ i(
|
|
1940
|
+
p.value
|
|
1941
|
+
) : /* @__PURE__ */ i(Wo, { type: "button", ...M, children: v }, p.value);
|
|
1920
1942
|
})
|
|
1921
1943
|
}
|
|
1922
1944
|
) });
|
|
1923
1945
|
}
|
|
1924
1946
|
export {
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1947
|
+
Sr as A,
|
|
1948
|
+
it as C,
|
|
1949
|
+
xr as D,
|
|
1928
1950
|
Ve as F,
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1951
|
+
Tt as I,
|
|
1952
|
+
Ir as N,
|
|
1953
|
+
wr as R,
|
|
1954
|
+
zr as S,
|
|
1955
|
+
ko as T,
|
|
1934
1956
|
je as a,
|
|
1935
|
-
|
|
1957
|
+
Rt as b,
|
|
1936
1958
|
nn as c,
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1959
|
+
Yt as d,
|
|
1960
|
+
Jt as e,
|
|
1961
|
+
Co as f,
|
|
1962
|
+
Wt as g,
|
|
1963
|
+
Er as h,
|
|
1964
|
+
eo as i,
|
|
1965
|
+
Cr as j,
|
|
1966
|
+
Ar as k,
|
|
1967
|
+
Fr as l,
|
|
1968
|
+
Mr as m,
|
|
1947
1969
|
q as n,
|
|
1948
1970
|
rn as o,
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1971
|
+
Or as p,
|
|
1972
|
+
Wr as q,
|
|
1973
|
+
Tr as r,
|
|
1974
|
+
Rr as s,
|
|
1975
|
+
kr as u
|
|
1954
1976
|
};
|