@abyss-project/commons-front-core 16.0.0 → 16.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +27 -0
- package/catalog/captures-plan.ts +1 -0
- package/catalog/catalog-entries.ts +4 -0
- package/catalog/pages/Accordion.tsx +93 -0
- package/catalog/pages/Breadcrumbs.tsx +61 -0
- package/catalog/pages/ComboboxField.tsx +220 -0
- package/catalog/pages/Menu.tsx +3 -1
- package/catalog/pages/Modal.tsx +3 -1
- package/catalog/pages/SegmentedControl.tsx +18 -4
- package/catalog/pages/StatusBadge.tsx +37 -18
- package/catalog/pages/index.ts +6 -0
- package/catalog/specs/write-capture-index.ts +1 -0
- package/dist/{CookieConsentSettings-B7NfjgaI.js → CookieConsentSettings-CTAyLGkm.js} +1 -1
- package/dist/{Surface-BEhoEhyC.js → Surface-76bwVL_Z.js} +376 -323
- package/dist/{Tabs-DJ9_ZFjM.js → Tabs-D2bdAWGo.js} +384 -376
- package/dist/components/data/DataTable/DataTableDesktop.d.ts +1 -1
- package/dist/components/data/DataTable/DataTableMobile.d.ts +1 -1
- package/dist/components/data/DataTable/data-table.types.d.ts +5 -0
- package/dist/components/editors/MarkdownEditor/MarkdownEditor.d.ts +22 -1
- package/dist/components/editors/MarkdownEditor/index.d.ts +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/inputs/ComboboxField/ComboboxField.d.ts +190 -0
- package/dist/components/inputs/ComboboxField/ComboboxField.spec.d.ts +1 -0
- package/dist/components/inputs/DropTargetOverlay/DropTargetOverlay.d.ts +12 -0
- package/dist/components/inputs/DropTargetOverlay/DropTargetOverlay.spec.d.ts +1 -0
- package/dist/components/inputs/SegmentedControl/SegmentedControl.d.ts +8 -0
- package/dist/components/inputs/index.d.ts +2 -0
- package/dist/components/layers/Menu/Menu.d.ts +11 -1
- package/dist/components/layers/Modal/Modal.d.ts +3 -1
- package/dist/components/meaning/StatusBadge/StatusBadge.d.ts +25 -3
- package/dist/components/mobile/BottomSheet/BottomSheet.d.ts +3 -1
- package/dist/components/navigation/Breadcrumbs/Breadcrumbs.d.ts +43 -0
- package/dist/components/navigation/Breadcrumbs/Breadcrumbs.spec.d.ts +1 -0
- package/dist/components/navigation/index.d.ts +1 -0
- package/dist/components/structure/Accordion/Accordion.d.ts +65 -0
- package/dist/components/structure/Accordion/Accordion.spec.d.ts +1 -0
- package/dist/components/structure/PageHeader/PageHeader.d.ts +3 -5
- package/dist/components/structure/index.d.ts +1 -0
- package/dist/components/structure/test-support/structure-test-harness.d.ts +6 -1
- package/dist/cookie-consent.js +2 -2
- package/dist/{design-theme-N9jJSXdK.js → design-theme-B1PgRGnU.js} +96 -91
- package/dist/{editors-QM76tqZI.js → editors-C2rcatuM.js} +6654 -6626
- package/dist/editors.js +1 -1
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/use-file-drop-target.hook.d.ts +34 -0
- package/dist/hooks/use-rich-intl.hook.d.ts +64 -0
- package/dist/{index-pX3CTxFd.js → index-3lv992-d.js} +2 -2
- package/dist/{index-COUUAr5G.js → index-4Yy0aUgK.js} +1 -1
- package/dist/{index-mmrA4ErC.js → index-BFmuZ1fy.js} +2 -2
- package/dist/{index-3-SmpH5N.js → index-BQDShLfx.js} +4 -4
- package/dist/{index-D8ncJrf1.js → index-BT4II8Xn.js} +2 -2
- package/dist/{index-5OVR3WNo.js → index-CNEoRNth.js} +3 -3
- package/dist/{index-4b2f7sdW.js → index-CSuco3OH.js} +2 -2
- package/dist/{index-D1M_muSg.js → index-CV-IfV6z.js} +2 -2
- package/dist/{index-CM5COMvb.js → index-CY7TSo5q.js} +2 -2
- package/dist/{index-DA-HUFp6.js → index-Cv2nccBd.js} +2 -2
- package/dist/{index-C6jhogFt.js → index-CwT2qdxO.js} +2 -2
- package/dist/{index-jZGexiyT.js → index-D0JsaNEm.js} +3 -3
- package/dist/{index-nKbvjf2P.js → index-Dc4AUxs3.js} +2 -2
- package/dist/{index-DW3SBSsW.js → index-Dn53bUXz.js} +2 -2
- package/dist/{index-DCk0q3d7.js → index-DoXNSm4g.js} +3 -3
- package/dist/{index-Taee9VIc.js → index-Ds9SlbVU.js} +2 -2
- package/dist/{index-DmAoL9-1.js → index-N01-gzsR.js} +4 -4
- package/dist/{index-DYXAfA_s.js → index-PFLipTVz.js} +2 -2
- package/dist/{index-Ce0rv5wr.js → index-vvVLoC4J.js} +3 -3
- package/dist/{index-BKAfoA1a.js → index-wZeZLKGl.js} +2 -2
- package/dist/{index-CQU0eEXk.js → index-zLjfdiAC.js} +4 -4
- package/dist/index.d.ts +1 -0
- package/dist/index.js +8049 -7142
- package/dist/legacy/theme/create-theme.d.ts +7 -1
- package/dist/legacy/theme/create-theme.spec.d.ts +1 -0
- package/dist/legacy.js +1319 -1216
- package/dist/motion/Appear.d.ts +25 -0
- package/dist/motion/AppearList.d.ts +31 -0
- package/dist/motion/index.d.ts +4 -0
- package/dist/motion/motion.d.ts +24 -0
- package/dist/motion/motion.spec.d.ts +1 -0
- package/dist/motion/use-added-keys.hook.d.ts +7 -0
- package/dist/motion/use-added-keys.hook.spec.d.ts +1 -0
- package/dist/theme/AbyssThemeProvider.d.ts +2 -1
- package/dist/theme/DesignCssVariables.d.ts +2 -1
- package/dist/theme/augmentation.d.ts +2 -1
- package/dist/theme/create-abyss-theme.d.ts +4 -1
- package/dist/theme/design-theme.d.ts +1 -1
- package/dist/theme/index.d.ts +2 -1
- package/dist/theme/reduced-motion.d.ts +7 -0
- package/dist/theme/reduced-motion.spec.d.ts +1 -0
- package/dist/translations/en.d.ts +16 -0
- package/dist/translations/fr.d.ts +16 -0
- package/package.json +3 -3
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { jsxs as x, jsx as i, Fragment as J } from "react/jsx-runtime";
|
|
2
|
-
import { useId as D, cloneElement as
|
|
2
|
+
import { useId as D, cloneElement as mn, useState as I, useMemo as ge, useRef as Y, useCallback as Q, useEffect as B, createContext as Ee, useContext as ze, useLayoutEffect as Ae } from "react";
|
|
3
3
|
import le from "@mui/material/FormControl";
|
|
4
4
|
import se from "@mui/material/FormHelperText";
|
|
5
5
|
import Le from "@mui/material/InputLabel";
|
|
6
6
|
import xe from "@mui/material/MenuItem";
|
|
7
|
-
import
|
|
8
|
-
import { styled as
|
|
9
|
-
import { visuallyHidden as
|
|
7
|
+
import hn from "@mui/material/Select";
|
|
8
|
+
import { styled as l, useTheme as bn, getContrastRatio as Ce } from "@mui/material/styles";
|
|
9
|
+
import { visuallyHidden as $e } from "@mui/utils";
|
|
10
10
|
import { useIntl as L } from "react-intl";
|
|
11
|
-
import { a as R, p as o, h as A, d as Z, D as K, c as yn, t as
|
|
11
|
+
import { a as R, p as o, h as A, d as Z, D as K, c as yn, t as De, s as de, e as oe, g as te, M as Pe, b as He, i as vn, B as wn } from "./Surface-76bwVL_Z.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
|
-
import
|
|
16
|
-
import
|
|
15
|
+
import On from "@mui/icons-material/FileUploadOutlined";
|
|
16
|
+
import Wn, { autocompleteClasses as ke } from "@mui/material/Autocomplete";
|
|
17
17
|
import Se from "@mui/material/CircularProgress";
|
|
18
18
|
import ae from "@mui/material/IconButton";
|
|
19
19
|
import fe from "@mui/material/OutlinedInput";
|
|
@@ -21,11 +21,11 @@ import Ie from "@mui/material/Tooltip";
|
|
|
21
21
|
import Fe from "@mui/icons-material/CloudOutlined";
|
|
22
22
|
import Tn from "@mui/icons-material/CloudOffOutlined";
|
|
23
23
|
import Rn from "@mui/icons-material/FileDownloadOutlined";
|
|
24
|
-
import
|
|
24
|
+
import Ne from "@mui/icons-material/FolderOpenOutlined";
|
|
25
25
|
import En from "@mui/icons-material/OpenInNewRounded";
|
|
26
26
|
import zn from "@mui/icons-material/RefreshRounded";
|
|
27
27
|
import An from "@mui/icons-material/CheckCircleOutline";
|
|
28
|
-
import
|
|
28
|
+
import _e from "@mui/icons-material/Close";
|
|
29
29
|
import Ln from "@mui/icons-material/ErrorOutline";
|
|
30
30
|
import $n from "@mui/icons-material/InfoOutlined";
|
|
31
31
|
import Dn from "@mui/icons-material/WarningAmber";
|
|
@@ -36,12 +36,12 @@ 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
|
|
39
|
+
import Be from "@mui/material/ButtonBase";
|
|
40
40
|
import Gn from "@mui/material/InputAdornment";
|
|
41
41
|
import qn from "@mui/material/FormLabel";
|
|
42
42
|
import { isMuiElement as Un } from "@mui/material/utils";
|
|
43
43
|
import { Link as Kn } from "react-router-dom";
|
|
44
|
-
const Yn =
|
|
44
|
+
const Yn = l(qn)(({ theme: e }) => ({
|
|
45
45
|
display: "block",
|
|
46
46
|
maxWidth: "100%",
|
|
47
47
|
marginBottom: o(e.design.space[2]),
|
|
@@ -53,27 +53,27 @@ const Yn = d(qn)(({ theme: e }) => ({
|
|
|
53
53
|
"&.Mui-error": { color: e.design.tokens["status.danger"] },
|
|
54
54
|
"&.Mui-disabled": { color: e.design.tokens["text.muted"] }
|
|
55
55
|
}));
|
|
56
|
-
function
|
|
56
|
+
function Ve({
|
|
57
57
|
label: e,
|
|
58
58
|
help: n,
|
|
59
59
|
error: t,
|
|
60
60
|
required: r = !1,
|
|
61
61
|
children: s
|
|
62
62
|
}) {
|
|
63
|
-
const c = D(), a = s.props.id ?? c,
|
|
63
|
+
const c = D(), a = s.props.id ?? c, d = `${a}-label`, f = n !== void 0 ? `${a}-help` : void 0, v = t != null && t !== !1 && t !== "", b = v && t !== !0, u = b ? `${a}-error` : void 0, h = [s.props["aria-describedby"], f, u].filter((g) => g !== void 0 && g !== "").join(" ") || void 0, m = mn(s, {
|
|
64
64
|
id: a,
|
|
65
65
|
"aria-describedby": h,
|
|
66
|
-
...Un(s, ["Select"]) && { labelId:
|
|
66
|
+
...Un(s, ["Select"]) && { labelId: d }
|
|
67
67
|
});
|
|
68
68
|
return /* @__PURE__ */ x(le, { fullWidth: !0, error: v, required: r, children: [
|
|
69
|
-
/* @__PURE__ */ i(Yn, { id:
|
|
69
|
+
/* @__PURE__ */ i(Yn, { id: d, htmlFor: a, children: e }),
|
|
70
70
|
m,
|
|
71
71
|
n !== void 0 && /* @__PURE__ */ i(se, { id: f, error: !1, children: n }),
|
|
72
|
-
b && /* @__PURE__ */ i(se, { id:
|
|
72
|
+
b && /* @__PURE__ */ i(se, { id: u, children: t })
|
|
73
73
|
] });
|
|
74
74
|
}
|
|
75
|
-
var
|
|
76
|
-
const
|
|
75
|
+
var je = /* @__PURE__ */ ((e) => (e.Info = "info", e.Success = "success", e.Warning = "warning", e.Danger = "danger", e))(je || {});
|
|
76
|
+
const Ge = {
|
|
77
77
|
info: { solid: "status.info", soft: "status.info.soft" },
|
|
78
78
|
success: {
|
|
79
79
|
solid: "status.success",
|
|
@@ -92,10 +92,10 @@ const je = {
|
|
|
92
92
|
success: An,
|
|
93
93
|
warning: Dn,
|
|
94
94
|
danger: Ln
|
|
95
|
-
}, Qn =
|
|
95
|
+
}, Qn = l("div", {
|
|
96
96
|
shouldForwardProp: (e) => e !== "severity"
|
|
97
97
|
})(({ theme: e, severity: n }) => {
|
|
98
|
-
const { tokens: t, space: r, radii: s, fonts: c, typeScale: a } = e.design, { solid:
|
|
98
|
+
const { tokens: t, space: r, radii: s, fonts: c, typeScale: a } = e.design, { solid: d, soft: f } = Ge[n];
|
|
99
99
|
return {
|
|
100
100
|
display: "flex",
|
|
101
101
|
alignItems: "flex-start",
|
|
@@ -104,13 +104,13 @@ const je = {
|
|
|
104
104
|
boxSizing: "border-box",
|
|
105
105
|
padding: `${o(r[3])} ${o(r[3])} ${o(r[3])} ${o(r[4])}`,
|
|
106
106
|
backgroundColor: t[f],
|
|
107
|
-
border: A(t[
|
|
107
|
+
border: A(t[d]),
|
|
108
108
|
borderRadius: o(s.md),
|
|
109
109
|
color: t["text.primary"],
|
|
110
110
|
fontFamily: c.sans,
|
|
111
111
|
fontSize: o(a.body)
|
|
112
112
|
};
|
|
113
|
-
}), Zn =
|
|
113
|
+
}), Zn = l("span", {
|
|
114
114
|
shouldForwardProp: (e) => e !== "severity"
|
|
115
115
|
})(({ theme: e, severity: n }) => {
|
|
116
116
|
const { tokens: t, space: r } = e.design;
|
|
@@ -119,13 +119,13 @@ const je = {
|
|
|
119
119
|
flex: "none",
|
|
120
120
|
// Centered on the first line of text.
|
|
121
121
|
paddingTop: o(r[1] / 2),
|
|
122
|
-
color: t[
|
|
122
|
+
color: t[Ge[n].solid],
|
|
123
123
|
"& svg": {
|
|
124
124
|
width: o(r[4] + r[1]),
|
|
125
125
|
height: o(r[4] + r[1])
|
|
126
126
|
}
|
|
127
127
|
};
|
|
128
|
-
}), Jn =
|
|
128
|
+
}), Jn = l("div")(({ theme: e }) => ({
|
|
129
129
|
display: "flex",
|
|
130
130
|
flex: "1 1 auto",
|
|
131
131
|
flexWrap: "wrap",
|
|
@@ -137,7 +137,7 @@ const je = {
|
|
|
137
137
|
flexDirection: "column",
|
|
138
138
|
alignItems: "flex-start"
|
|
139
139
|
}
|
|
140
|
-
})), et =
|
|
140
|
+
})), et = l("div")(({ theme: e }) => ({
|
|
141
141
|
display: "flex",
|
|
142
142
|
flexDirection: "column",
|
|
143
143
|
gap: o(e.design.space[1]),
|
|
@@ -146,14 +146,14 @@ const je = {
|
|
|
146
146
|
paddingTop: o(e.design.space[1] / 2),
|
|
147
147
|
lineHeight: e.typography.body2.lineHeight,
|
|
148
148
|
overflowWrap: "anywhere"
|
|
149
|
-
})), nt =
|
|
149
|
+
})), nt = l("strong")({
|
|
150
150
|
display: "block",
|
|
151
151
|
fontWeight: R.semibold
|
|
152
|
-
}), tt =
|
|
152
|
+
}), tt = l("div")({
|
|
153
153
|
display: "flex",
|
|
154
154
|
flex: "none",
|
|
155
155
|
alignItems: "center"
|
|
156
|
-
}), ot =
|
|
156
|
+
}), ot = l(ae)(({ theme: e }) => yn(e));
|
|
157
157
|
function rt({
|
|
158
158
|
severity: e,
|
|
159
159
|
title: n,
|
|
@@ -162,19 +162,19 @@ function rt({
|
|
|
162
162
|
onClose: s,
|
|
163
163
|
icon: c
|
|
164
164
|
}) {
|
|
165
|
-
const a = L(),
|
|
165
|
+
const a = L(), d = D(), f = Xn[e];
|
|
166
166
|
return /* @__PURE__ */ x(
|
|
167
167
|
Qn,
|
|
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 ? d : void 0,
|
|
172
172
|
"data-severity": e,
|
|
173
173
|
children: [
|
|
174
174
|
/* @__PURE__ */ i(Zn, { severity: e, "aria-hidden": !0, children: c ?? /* @__PURE__ */ i(f, {}) }),
|
|
175
175
|
/* @__PURE__ */ x(Jn, { children: [
|
|
176
176
|
/* @__PURE__ */ x(et, { children: [
|
|
177
|
-
n !== void 0 && /* @__PURE__ */ i(nt, { id:
|
|
177
|
+
n !== void 0 && /* @__PURE__ */ i(nt, { id: d, children: n }),
|
|
178
178
|
/* @__PURE__ */ i("div", { children: t })
|
|
179
179
|
] }),
|
|
180
180
|
r !== void 0 && /* @__PURE__ */ i(tt, { children: r })
|
|
@@ -185,24 +185,24 @@ function rt({
|
|
|
185
185
|
size: "small",
|
|
186
186
|
"aria-label": a.formatMessage({ id: "ds.states.callout.close" }),
|
|
187
187
|
onClick: s,
|
|
188
|
-
children: /* @__PURE__ */ i(
|
|
188
|
+
children: /* @__PURE__ */ i(_e, { "aria-hidden": !0 })
|
|
189
189
|
}
|
|
190
190
|
)
|
|
191
191
|
]
|
|
192
192
|
}
|
|
193
193
|
);
|
|
194
194
|
}
|
|
195
|
-
const U = (e) => e.id ?? e.name,
|
|
195
|
+
const U = (e) => e.id ?? e.name, qe = (e, n, t) => (n === void 0 || e.sizeOctet <= n) && xn(e, t), Ue = (e, n, t) => [
|
|
196
196
|
...(e.childFile ?? []).filter(
|
|
197
|
-
(r) =>
|
|
197
|
+
(r) => qe(r, n, t)
|
|
198
198
|
),
|
|
199
199
|
...(e.childFolder ?? []).flatMap(
|
|
200
|
-
(r) =>
|
|
200
|
+
(r) => Ue(r, n, t)
|
|
201
201
|
)
|
|
202
|
-
], ue =
|
|
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: c, density: a, typeScale:
|
|
205
|
+
const { tokens: t, space: r, radii: s, densityValues: c, density: a, typeScale: d } = e.design;
|
|
206
206
|
return {
|
|
207
207
|
display: "flex",
|
|
208
208
|
alignItems: "center",
|
|
@@ -210,11 +210,11 @@ const U = (e) => e.id ?? e.name, Ge = (e, n, t) => (n === void 0 || e.sizeOctet
|
|
|
210
210
|
minHeight: o(c[a].control),
|
|
211
211
|
borderRadius: o(s.md),
|
|
212
212
|
backgroundColor: n ? de(t.accent) : "transparent",
|
|
213
|
-
fontSize: o(
|
|
213
|
+
fontSize: o(d.body),
|
|
214
214
|
color: t["text.primary"],
|
|
215
|
-
|
|
215
|
+
...De(e)
|
|
216
216
|
};
|
|
217
|
-
}),
|
|
217
|
+
}), Ke = (e) => {
|
|
218
218
|
const { tokens: n, space: t, radii: r, fonts: s } = e.design;
|
|
219
219
|
return {
|
|
220
220
|
flex: "1 1 auto",
|
|
@@ -237,7 +237,7 @@ const U = (e) => e.id ?? e.name, Ge = (e, n, t) => (n === void 0 || e.sizeOctet
|
|
|
237
237
|
"&:hover": { backgroundColor: n["bg.hover"] },
|
|
238
238
|
"&:focus-visible": te(e)
|
|
239
239
|
};
|
|
240
|
-
},
|
|
240
|
+
}, Ye = l("button")(({ theme: e }) => Ke(e)), it = 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",
|
|
@@ -246,7 +246,7 @@ const U = (e) => e.id ?? e.name, Ge = (e, n, t) => (n === void 0 || e.sizeOctet
|
|
|
246
246
|
textOverflow: "ellipsis",
|
|
247
247
|
whiteSpace: "nowrap",
|
|
248
248
|
fontWeight: e ? R.medium : R.regular
|
|
249
|
-
})),
|
|
249
|
+
})), Qe = l("span")(({ theme: e }) => {
|
|
250
250
|
const { tokens: n, space: t, radii: r } = e.design;
|
|
251
251
|
return {
|
|
252
252
|
display: "inline-flex",
|
|
@@ -261,7 +261,7 @@ const U = (e) => e.id ?? e.name, Ge = (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
|
-
}), st =
|
|
264
|
+
}), st = l(_n, {
|
|
265
265
|
shouldForwardProp: (e) => e !== "open"
|
|
266
266
|
})(({ theme: e, open: n }) => ({
|
|
267
267
|
flex: "none",
|
|
@@ -270,27 +270,27 @@ const U = (e) => e.id ?? e.name, Ge = (e, n, t) => (n === void 0 || e.sizeOctet
|
|
|
270
270
|
color: e.design.tokens["text.muted"],
|
|
271
271
|
transform: n ? "rotate(90deg)" : "none",
|
|
272
272
|
transition: oe(e, ["transform"])
|
|
273
|
-
})),
|
|
273
|
+
})), Ze = l(Pn)(({ theme: e }) => ({
|
|
274
274
|
[Z.down(K.Tablet)]: {
|
|
275
275
|
padding: o(
|
|
276
276
|
(e.design.densityValues.touchTarget - e.design.space[5]) / 2
|
|
277
277
|
)
|
|
278
278
|
}
|
|
279
|
-
})), at =
|
|
279
|
+
})), at = l("ul")(({ theme: e }) => ({
|
|
280
280
|
margin: 0,
|
|
281
281
|
padding: 0,
|
|
282
282
|
listStyle: "none",
|
|
283
283
|
borderLeft: A(e.design.tokens["border.subtle"]),
|
|
284
284
|
marginLeft: o(e.design.space[3])
|
|
285
|
-
})), Me =
|
|
286
|
-
function
|
|
285
|
+
})), Me = l("li")({ listStyle: "none" });
|
|
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
292
|
e.map((r) => /* @__PURE__ */ i(Me, { children: /* @__PURE__ */ i(ct, { folder: r, context: t }) }, r.id ?? r.name)),
|
|
293
|
-
n.filter((r) =>
|
|
293
|
+
n.filter((r) => qe(r, t.maxSize, t.accept)).map((r) => /* @__PURE__ */ i(Me, { children: /* @__PURE__ */ i(dt, { file: r, context: t }) }, U(r)))
|
|
294
294
|
] });
|
|
295
295
|
}
|
|
296
296
|
function lt({
|
|
@@ -298,7 +298,7 @@ function lt({
|
|
|
298
298
|
getFileThumbnailUrl: n
|
|
299
299
|
}) {
|
|
300
300
|
const [t, r] = I(!1), s = e.thumbnailPublicAccessId !== null && !e.isEncrypt && !t ? n(e.thumbnailPublicAccessId) : null;
|
|
301
|
-
return /* @__PURE__ */ i(
|
|
301
|
+
return /* @__PURE__ */ i(Qe, { "aria-hidden": !0, children: s !== null ? /* @__PURE__ */ i(
|
|
302
302
|
"img",
|
|
303
303
|
{
|
|
304
304
|
src: s,
|
|
@@ -320,11 +320,11 @@ function dt({
|
|
|
320
320
|
getFileThumbnailUrl: n.getFileThumbnailUrl
|
|
321
321
|
}
|
|
322
322
|
),
|
|
323
|
-
/* @__PURE__ */ i(
|
|
323
|
+
/* @__PURE__ */ i(Xe, { strong: r, title: e.name, children: e.name })
|
|
324
324
|
] });
|
|
325
325
|
return n.multiple ? /* @__PURE__ */ x(ue, { selected: r, children: [
|
|
326
326
|
/* @__PURE__ */ i(
|
|
327
|
-
|
|
327
|
+
Ze,
|
|
328
328
|
{
|
|
329
329
|
id: t,
|
|
330
330
|
size: "small",
|
|
@@ -333,23 +333,23 @@ function dt({
|
|
|
333
333
|
}
|
|
334
334
|
),
|
|
335
335
|
/* @__PURE__ */ i(it, { htmlFor: t, children: c })
|
|
336
|
-
] }) : /* @__PURE__ */ i(ue, { selected: r, children: /* @__PURE__ */ i(
|
|
336
|
+
] }) : /* @__PURE__ */ i(ue, { selected: r, children: /* @__PURE__ */ i(Ye, { type: "button", "aria-pressed": r, onClick: s, children: c }) });
|
|
337
337
|
}
|
|
338
338
|
function ct({
|
|
339
339
|
folder: e,
|
|
340
340
|
context: n
|
|
341
341
|
}) {
|
|
342
|
-
const t = L(), r = D(), [s, c] = I(!1), a =
|
|
342
|
+
const t = L(), r = D(), [s, c] = I(!1), a = Ue(e, n.maxSize, n.accept), d = a.filter(
|
|
343
343
|
(v) => n.selectedIds.has(U(v))
|
|
344
|
-
).length, f = a.length > 0 &&
|
|
344
|
+
).length, f = a.length > 0 && d === a.length;
|
|
345
345
|
return /* @__PURE__ */ x(J, { children: [
|
|
346
346
|
/* @__PURE__ */ x(ue, { selected: f, children: [
|
|
347
347
|
n.multiple && /* @__PURE__ */ i(
|
|
348
|
-
|
|
348
|
+
Ze,
|
|
349
349
|
{
|
|
350
350
|
size: "small",
|
|
351
351
|
checked: f,
|
|
352
|
-
indeterminate:
|
|
352
|
+
indeterminate: d > 0 && !f,
|
|
353
353
|
disabled: a.length === 0,
|
|
354
354
|
onChange: () => f ? n.unselect(a) : n.select(a),
|
|
355
355
|
inputProps: {
|
|
@@ -361,7 +361,7 @@ function ct({
|
|
|
361
361
|
}
|
|
362
362
|
),
|
|
363
363
|
/* @__PURE__ */ x(
|
|
364
|
-
|
|
364
|
+
Ye,
|
|
365
365
|
{
|
|
366
366
|
type: "button",
|
|
367
367
|
"aria-expanded": s,
|
|
@@ -369,14 +369,14 @@ function ct({
|
|
|
369
369
|
onClick: () => c(!s),
|
|
370
370
|
children: [
|
|
371
371
|
/* @__PURE__ */ i(st, { open: s, "aria-hidden": !0 }),
|
|
372
|
-
/* @__PURE__ */ i(
|
|
373
|
-
/* @__PURE__ */ i(
|
|
372
|
+
/* @__PURE__ */ i(Qe, { "aria-hidden": !0, children: s ? /* @__PURE__ */ i(Ne, {}) : /* @__PURE__ */ i(Nn, {}) }),
|
|
373
|
+
/* @__PURE__ */ i(Xe, { strong: f, title: e.name, children: e.name })
|
|
374
374
|
]
|
|
375
375
|
}
|
|
376
376
|
)
|
|
377
377
|
] }),
|
|
378
378
|
s && /* @__PURE__ */ i(at, { id: r, children: /* @__PURE__ */ i(
|
|
379
|
-
|
|
379
|
+
Je,
|
|
380
380
|
{
|
|
381
381
|
folders: e.childFolder ?? [],
|
|
382
382
|
files: e.childFile ?? [],
|
|
@@ -385,17 +385,17 @@ function ct({
|
|
|
385
385
|
) })
|
|
386
386
|
] });
|
|
387
387
|
}
|
|
388
|
-
const
|
|
388
|
+
const Oe = "shared", We = {
|
|
389
389
|
"org-common": 0,
|
|
390
390
|
"perso-in-org": 1,
|
|
391
391
|
project: 2,
|
|
392
392
|
personal: 3
|
|
393
|
-
}, ut =
|
|
393
|
+
}, ut = 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
|
-
})), pt =
|
|
398
|
+
})), pt = l("div")(({ theme: e }) => ({
|
|
399
399
|
display: "flex",
|
|
400
400
|
alignItems: "flex-end",
|
|
401
401
|
gap: o(e.design.space[2]),
|
|
@@ -403,11 +403,11 @@ const We = "shared", Oe = {
|
|
|
403
403
|
// The Space field takes the room the two icon buttons leave.
|
|
404
404
|
[`& > .${ke.root}`]: { flex: "1 1 auto", minWidth: 0 },
|
|
405
405
|
[`& > :not(.${ke.root})`]: { flex: "none" }
|
|
406
|
-
})), gt =
|
|
406
|
+
})), gt = 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
|
-
})), ft =
|
|
410
|
+
})), ft = l("ul")(({ theme: e }) => {
|
|
411
411
|
const { tokens: n, space: t, radii: r } = e.design;
|
|
412
412
|
return {
|
|
413
413
|
margin: 0,
|
|
@@ -417,7 +417,7 @@ const We = "shared", Oe = {
|
|
|
417
417
|
border: A(n["border.subtle"]),
|
|
418
418
|
borderRadius: o(r.md)
|
|
419
419
|
};
|
|
420
|
-
}), ne =
|
|
420
|
+
}), ne = l("div")(({ theme: e }) => {
|
|
421
421
|
const { tokens: n, space: t, typeScale: r } = e.design;
|
|
422
422
|
return {
|
|
423
423
|
display: "flex",
|
|
@@ -436,7 +436,7 @@ const We = "shared", Oe = {
|
|
|
436
436
|
color: n["text.muted"]
|
|
437
437
|
}
|
|
438
438
|
};
|
|
439
|
-
}), mt =
|
|
439
|
+
}), mt = l("span")(({ theme: e }) => {
|
|
440
440
|
const { tokens: n, space: t, radii: r } = e.design;
|
|
441
441
|
return {
|
|
442
442
|
display: "inline-flex",
|
|
@@ -449,38 +449,38 @@ const We = "shared", Oe = {
|
|
|
449
449
|
color: n["status.warning"],
|
|
450
450
|
"& svg": { width: o(t[6]), height: o(t[6]) }
|
|
451
451
|
};
|
|
452
|
-
}), ht =
|
|
452
|
+
}), ht = l("p")(({ theme: e }) => ({
|
|
453
453
|
margin: 0,
|
|
454
454
|
fontWeight: R.semibold,
|
|
455
455
|
color: e.design.tokens["text.primary"]
|
|
456
|
-
})), bt =
|
|
456
|
+
})), bt = l("p")({ margin: 0 }), yt = 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
|
-
})), vt =
|
|
462
|
+
})), vt = l("span")(({ theme: e }) => ({
|
|
463
463
|
fontSize: o(e.design.typeScale.body),
|
|
464
464
|
color: e.design.tokens["text.secondary"]
|
|
465
|
-
})), wt =
|
|
465
|
+
})), wt = l("li")(({ theme: e }) => ({
|
|
466
466
|
display: "flex",
|
|
467
467
|
alignItems: "center",
|
|
468
468
|
gap: o(e.design.space[2]),
|
|
469
|
-
|
|
470
|
-
})), xt =
|
|
469
|
+
...De(e)
|
|
470
|
+
})), xt = l("span")({
|
|
471
471
|
display: "flex",
|
|
472
472
|
flexDirection: "column",
|
|
473
473
|
minWidth: 0
|
|
474
|
-
}), Ct =
|
|
474
|
+
}), Ct = l("span")({
|
|
475
475
|
overflow: "hidden",
|
|
476
476
|
textOverflow: "ellipsis",
|
|
477
477
|
whiteSpace: "nowrap"
|
|
478
|
-
}), kt =
|
|
478
|
+
}), kt = 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.
|
|
482
482
|
overflowWrap: "anywhere"
|
|
483
|
-
})),
|
|
483
|
+
})), en = l("span")(({ theme: e }) => {
|
|
484
484
|
const { tokens: n, space: t, radii: r } = e.design;
|
|
485
485
|
return {
|
|
486
486
|
display: "inline-flex",
|
|
@@ -493,9 +493,9 @@ const We = "shared", Oe = {
|
|
|
493
493
|
color: n["accent.text"],
|
|
494
494
|
"& > svg": { width: o(t[4]), height: o(t[4]) }
|
|
495
495
|
};
|
|
496
|
-
}), St =
|
|
496
|
+
}), St = l(en)(({ theme: e }) => ({
|
|
497
497
|
marginRight: o(e.design.space[2])
|
|
498
|
-
})), It =
|
|
498
|
+
})), It = l("li")({ listStyle: "none" }), Ft = 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])}`,
|
|
@@ -505,8 +505,8 @@ const We = "shared", Oe = {
|
|
|
505
505
|
textTransform: "uppercase",
|
|
506
506
|
color: t["text.muted"]
|
|
507
507
|
};
|
|
508
|
-
}), Mt =
|
|
509
|
-
function
|
|
508
|
+
}), Mt = l("ul")({ margin: 0, padding: 0 });
|
|
509
|
+
function Ot({
|
|
510
510
|
cloudPicker: e,
|
|
511
511
|
onImport: n,
|
|
512
512
|
multiple: t = !1,
|
|
@@ -516,45 +516,45 @@ function Wt({
|
|
|
516
516
|
const {
|
|
517
517
|
abyssCloudUrl: c,
|
|
518
518
|
getFileThumbnailUrl: a,
|
|
519
|
-
getSpaceDisplay:
|
|
519
|
+
getSpaceDisplay: d,
|
|
520
520
|
clouds: f,
|
|
521
521
|
cloudShares: v,
|
|
522
522
|
isLoading: b,
|
|
523
|
-
hasError:
|
|
523
|
+
hasError: u,
|
|
524
524
|
refresh: h,
|
|
525
525
|
onCreateCloud: m,
|
|
526
|
-
fetchCloudRepository:
|
|
527
|
-
} = e,
|
|
526
|
+
fetchCloudRepository: g
|
|
527
|
+
} = e, p = L(), [y, C] = I(null), [F, P] = I(null), [W, H] = I(
|
|
528
528
|
"loading"
|
|
529
529
|
/* Loading */
|
|
530
530
|
), [V, T] = I([]), [M, ee] = I(!1), [re, N] = I(!1), j = ge(() => {
|
|
531
|
-
const w = [], S = /* @__PURE__ */ new Map(), k =
|
|
531
|
+
const w = [], S = /* @__PURE__ */ new Map(), k = p.formatMessage({
|
|
532
532
|
id: "ds.business.cloud-import.section-organization"
|
|
533
533
|
});
|
|
534
|
-
for (const
|
|
535
|
-
if (!
|
|
536
|
-
w.push(
|
|
534
|
+
for (const O of f ?? []) {
|
|
535
|
+
if (!O.organizationId) {
|
|
536
|
+
w.push(O);
|
|
537
537
|
continue;
|
|
538
538
|
}
|
|
539
|
-
const z =
|
|
539
|
+
const z = d == null ? void 0 : d(O), _ = S.get(O.organizationId) ?? {
|
|
540
540
|
name: (z == null ? void 0 : z.organizationName) ?? k,
|
|
541
541
|
items: []
|
|
542
542
|
};
|
|
543
|
-
_.items.push(
|
|
543
|
+
_.items.push(O), S.set(O.organizationId, _);
|
|
544
544
|
}
|
|
545
|
-
if (
|
|
546
|
-
for (const
|
|
547
|
-
|
|
548
|
-
const E =
|
|
549
|
-
return E !== we ? E - we :
|
|
545
|
+
if (d)
|
|
546
|
+
for (const O of S.values())
|
|
547
|
+
O.items.sort((z, _) => {
|
|
548
|
+
const E = We[d(z).scope ?? "personal"], we = We[d(_).scope ?? "personal"];
|
|
549
|
+
return E !== we ? E - we : d(z).label.localeCompare(d(_).label);
|
|
550
550
|
});
|
|
551
|
-
const $ = (
|
|
552
|
-
const E =
|
|
551
|
+
const $ = (O, z) => (_) => {
|
|
552
|
+
const E = d == null ? void 0 : d(_);
|
|
553
553
|
return {
|
|
554
554
|
space: _,
|
|
555
|
-
sectionKey:
|
|
555
|
+
sectionKey: O,
|
|
556
556
|
sectionLabel: z,
|
|
557
|
-
label: (E == null ? void 0 : E.label) ?? kn(_,
|
|
557
|
+
label: (E == null ? void 0 : E.label) ?? kn(_, p),
|
|
558
558
|
subtitle: E == null ? void 0 : E.subtitle,
|
|
559
559
|
avatar: E == null ? void 0 : E.avatar
|
|
560
560
|
};
|
|
@@ -563,23 +563,23 @@ function Wt({
|
|
|
563
563
|
...w.map(
|
|
564
564
|
$(
|
|
565
565
|
"personal",
|
|
566
|
-
|
|
566
|
+
p.formatMessage({
|
|
567
567
|
id: "ds.business.cloud-import.section-personal"
|
|
568
568
|
})
|
|
569
569
|
)
|
|
570
570
|
),
|
|
571
571
|
...[...S].flatMap(
|
|
572
|
-
([
|
|
572
|
+
([O, z]) => z.items.map($(`org:${O}`, z.name))
|
|
573
573
|
),
|
|
574
574
|
...(v ?? []).map(
|
|
575
575
|
$(
|
|
576
|
-
|
|
577
|
-
|
|
576
|
+
Oe,
|
|
577
|
+
p.formatMessage({ id: "ds.business.cloud-import.section-shared" })
|
|
578
578
|
)
|
|
579
579
|
)
|
|
580
580
|
];
|
|
581
|
-
}, [f, v,
|
|
582
|
-
me.current =
|
|
581
|
+
}, [f, v, d, p]), G = j.find((w) => w.space.id === (y == null ? void 0 : y.id)) ?? null, ce = Y(0), me = Y(g);
|
|
582
|
+
me.current = g;
|
|
583
583
|
const ie = Q(async (w) => {
|
|
584
584
|
const S = ++ce.current;
|
|
585
585
|
H(
|
|
@@ -600,9 +600,9 @@ function Wt({
|
|
|
600
600
|
/* Failed */
|
|
601
601
|
);
|
|
602
602
|
}
|
|
603
|
-
}, []),
|
|
603
|
+
}, []), dn = Y(h);
|
|
604
604
|
B(() => {
|
|
605
|
-
|
|
605
|
+
dn.current();
|
|
606
606
|
}, []), B(() => {
|
|
607
607
|
if (y && j.some((k) => k.space.id === y.id))
|
|
608
608
|
return;
|
|
@@ -613,20 +613,20 @@ function Wt({
|
|
|
613
613
|
}, [j, y]), B(() => {
|
|
614
614
|
y && ie(y);
|
|
615
615
|
}, [y, ie]);
|
|
616
|
-
const
|
|
616
|
+
const cn = async () => {
|
|
617
617
|
if (N(!1), !await h()) {
|
|
618
618
|
N(!0);
|
|
619
619
|
return;
|
|
620
620
|
}
|
|
621
621
|
y && await ie(y);
|
|
622
|
-
},
|
|
622
|
+
}, un = async () => {
|
|
623
623
|
ee(!0);
|
|
624
624
|
try {
|
|
625
625
|
await m();
|
|
626
626
|
} finally {
|
|
627
627
|
ee(!1);
|
|
628
628
|
}
|
|
629
|
-
},
|
|
629
|
+
}, pn = {
|
|
630
630
|
multiple: t,
|
|
631
631
|
maxSize: r,
|
|
632
632
|
accept: s,
|
|
@@ -647,24 +647,24 @@ function Wt({
|
|
|
647
647
|
(k) => k.filter(($) => !S.has(U($)))
|
|
648
648
|
);
|
|
649
649
|
}
|
|
650
|
-
},
|
|
650
|
+
}, gn = f !== null && v !== null, he = /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ i(
|
|
651
651
|
Se,
|
|
652
652
|
{
|
|
653
653
|
size: 32,
|
|
654
|
-
"aria-label":
|
|
654
|
+
"aria-label": p.formatMessage({
|
|
655
655
|
id: "ds.business.cloud-import.loading"
|
|
656
656
|
})
|
|
657
657
|
}
|
|
658
658
|
) });
|
|
659
|
-
if (!
|
|
659
|
+
if (!gn && (b || !u))
|
|
660
660
|
return he;
|
|
661
661
|
if (j.length === 0)
|
|
662
662
|
return /* @__PURE__ */ x(ne, { children: [
|
|
663
663
|
/* @__PURE__ */ i(mt, { "aria-hidden": !0, children: /* @__PURE__ */ i(Tn, {}) }),
|
|
664
|
-
/* @__PURE__ */ i(ht, { children:
|
|
664
|
+
/* @__PURE__ */ i(ht, { children: p.formatMessage({
|
|
665
665
|
id: "ds.business.cloud-import.create-error.title"
|
|
666
666
|
}) }),
|
|
667
|
-
/* @__PURE__ */ i(bt, { children:
|
|
667
|
+
/* @__PURE__ */ i(bt, { children: p.formatMessage({
|
|
668
668
|
id: "ds.business.cloud-import.create-error.description"
|
|
669
669
|
}) }),
|
|
670
670
|
/* @__PURE__ */ i(
|
|
@@ -673,8 +673,8 @@ function Wt({
|
|
|
673
673
|
variant: "contained",
|
|
674
674
|
startIcon: /* @__PURE__ */ i(Fe, { "aria-hidden": !0 }),
|
|
675
675
|
loading: M || b,
|
|
676
|
-
onClick: () => void
|
|
677
|
-
children:
|
|
676
|
+
onClick: () => void un(),
|
|
677
|
+
children: p.formatMessage({
|
|
678
678
|
id: "ds.business.cloud-import.create-error.create-button"
|
|
679
679
|
})
|
|
680
680
|
}
|
|
@@ -682,27 +682,27 @@ function Wt({
|
|
|
682
682
|
] });
|
|
683
683
|
if (G === null)
|
|
684
684
|
return he;
|
|
685
|
-
const
|
|
685
|
+
const fn = Cn(
|
|
686
686
|
c,
|
|
687
687
|
G.space,
|
|
688
|
-
G.sectionKey ===
|
|
689
|
-
), be =
|
|
688
|
+
G.sectionKey === Oe
|
|
689
|
+
), be = p.formatMessage({
|
|
690
690
|
id: "ds.business.cloud-import.refresh"
|
|
691
|
-
}), ye =
|
|
691
|
+
}), ye = p.formatMessage({
|
|
692
692
|
id: "ds.business.cloud-import.open-in-cloud"
|
|
693
693
|
}), ve = (w) => w.avatar ?? /* @__PURE__ */ i(Fe, {});
|
|
694
694
|
return /* @__PURE__ */ x(ut, { children: [
|
|
695
695
|
re && /* @__PURE__ */ i(
|
|
696
696
|
rt,
|
|
697
697
|
{
|
|
698
|
-
severity:
|
|
698
|
+
severity: je.Danger,
|
|
699
699
|
onClose: () => N(!1),
|
|
700
|
-
children:
|
|
700
|
+
children: p.formatMessage({ id: "ds.business.cloud-import.refresh-error" })
|
|
701
701
|
}
|
|
702
702
|
),
|
|
703
703
|
/* @__PURE__ */ x(pt, { children: [
|
|
704
704
|
/* @__PURE__ */ i(
|
|
705
|
-
|
|
705
|
+
Wn,
|
|
706
706
|
{
|
|
707
707
|
fullWidth: !0,
|
|
708
708
|
disableClearable: !0,
|
|
@@ -716,7 +716,7 @@ function Wt({
|
|
|
716
716
|
const k = S.trim().toLowerCase();
|
|
717
717
|
return k === "" || k === G.label.toLowerCase() ? w : w.filter(
|
|
718
718
|
($) => [$.label, $.subtitle ?? ""].some(
|
|
719
|
-
(
|
|
719
|
+
(O) => O.toLowerCase().includes(k)
|
|
720
720
|
)
|
|
721
721
|
);
|
|
722
722
|
},
|
|
@@ -725,16 +725,16 @@ function Wt({
|
|
|
725
725
|
/* @__PURE__ */ i(Mt, { children: w.children })
|
|
726
726
|
] }, w.key),
|
|
727
727
|
renderOption: ({ key: w, ...S }, k) => /* @__PURE__ */ x(wt, { ...S, children: [
|
|
728
|
-
/* @__PURE__ */ i(
|
|
728
|
+
/* @__PURE__ */ i(en, { "aria-hidden": !0, children: ve(k) }),
|
|
729
729
|
/* @__PURE__ */ x(xt, { children: [
|
|
730
730
|
/* @__PURE__ */ i(Ct, { children: k.label }),
|
|
731
731
|
k.subtitle !== void 0 && /* @__PURE__ */ i(kt, { children: k.subtitle })
|
|
732
732
|
] })
|
|
733
733
|
] }, w),
|
|
734
734
|
renderInput: (w) => /* @__PURE__ */ i(
|
|
735
|
-
|
|
735
|
+
Ve,
|
|
736
736
|
{
|
|
737
|
-
label:
|
|
737
|
+
label: p.formatMessage({
|
|
738
738
|
id: "ds.business.cloud-import.space-label"
|
|
739
739
|
}),
|
|
740
740
|
children: /* @__PURE__ */ i(
|
|
@@ -755,8 +755,8 @@ function Wt({
|
|
|
755
755
|
ae,
|
|
756
756
|
{
|
|
757
757
|
"aria-label": be,
|
|
758
|
-
disabled:
|
|
759
|
-
onClick: () => void
|
|
758
|
+
disabled: W === "loading" || b,
|
|
759
|
+
onClick: () => void cn(),
|
|
760
760
|
children: /* @__PURE__ */ i(zn, { "aria-hidden": !0 })
|
|
761
761
|
}
|
|
762
762
|
) }) }),
|
|
@@ -764,7 +764,7 @@ function Wt({
|
|
|
764
764
|
ae,
|
|
765
765
|
{
|
|
766
766
|
component: "a",
|
|
767
|
-
href:
|
|
767
|
+
href: fn,
|
|
768
768
|
target: "_blank",
|
|
769
769
|
rel: "noreferrer",
|
|
770
770
|
"aria-label": ye,
|
|
@@ -772,48 +772,48 @@ function Wt({
|
|
|
772
772
|
}
|
|
773
773
|
) })
|
|
774
774
|
] }),
|
|
775
|
-
/* @__PURE__ */ i(gt, { children:
|
|
776
|
-
|
|
775
|
+
/* @__PURE__ */ i(gt, { children: p.formatMessage({ id: "ds.business.cloud-import.filtered-hint" }) }),
|
|
776
|
+
W === "loading" && /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ i(
|
|
777
777
|
Se,
|
|
778
778
|
{
|
|
779
779
|
size: 24,
|
|
780
|
-
"aria-label":
|
|
780
|
+
"aria-label": p.formatMessage({
|
|
781
781
|
id: "ds.business.cloud-import.tree-loading"
|
|
782
782
|
})
|
|
783
783
|
}
|
|
784
784
|
) }),
|
|
785
|
-
|
|
786
|
-
|
|
785
|
+
W === "failed" && /* @__PURE__ */ x(ne, { role: "alert", children: [
|
|
786
|
+
p.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: p.formatMessage({ id: "ds.business.cloud-import.retry" })
|
|
793
793
|
}
|
|
794
794
|
)
|
|
795
795
|
] }),
|
|
796
|
-
|
|
797
|
-
/* @__PURE__ */ i(
|
|
798
|
-
|
|
796
|
+
W === "ready" && F !== null && (F.folders.length === 0 && F.files.length === 0 ? /* @__PURE__ */ x(ne, { children: [
|
|
797
|
+
/* @__PURE__ */ i(Ne, { "aria-hidden": !0 }),
|
|
798
|
+
p.formatMessage({ id: "ds.business.cloud-import.empty-space" })
|
|
799
799
|
] }) : /* @__PURE__ */ i(
|
|
800
800
|
ft,
|
|
801
801
|
{
|
|
802
|
-
"aria-label":
|
|
802
|
+
"aria-label": p.formatMessage({
|
|
803
803
|
id: "ds.business.cloud-import.tree-label"
|
|
804
804
|
}),
|
|
805
805
|
children: /* @__PURE__ */ i(
|
|
806
|
-
|
|
806
|
+
Je,
|
|
807
807
|
{
|
|
808
808
|
folders: F.folders,
|
|
809
809
|
files: F.files,
|
|
810
|
-
context:
|
|
810
|
+
context: pn
|
|
811
811
|
}
|
|
812
812
|
)
|
|
813
813
|
}
|
|
814
814
|
)),
|
|
815
815
|
/* @__PURE__ */ x(yt, { children: [
|
|
816
|
-
/* @__PURE__ */ i(vt, { role: "status", children:
|
|
816
|
+
/* @__PURE__ */ i(vt, { role: "status", children: p.formatMessage(
|
|
817
817
|
{ id: "ds.business.cloud-import.selected" },
|
|
818
818
|
{ count: V.length }
|
|
819
819
|
) }),
|
|
@@ -824,13 +824,13 @@ function Wt({
|
|
|
824
824
|
startIcon: /* @__PURE__ */ i(Rn, { "aria-hidden": !0 }),
|
|
825
825
|
disabled: V.length === 0,
|
|
826
826
|
onClick: () => n(G.space, V),
|
|
827
|
-
children:
|
|
827
|
+
children: p.formatMessage({ id: "ds.business.cloud-import.import" })
|
|
828
828
|
}
|
|
829
829
|
)
|
|
830
830
|
] })
|
|
831
831
|
] });
|
|
832
832
|
}
|
|
833
|
-
function
|
|
833
|
+
function Wt({
|
|
834
834
|
open: e,
|
|
835
835
|
onClose: n,
|
|
836
836
|
onImport: t,
|
|
@@ -839,16 +839,16 @@ function Ot({
|
|
|
839
839
|
maxSize: c,
|
|
840
840
|
accept: a
|
|
841
841
|
}) {
|
|
842
|
-
const
|
|
842
|
+
const d = L();
|
|
843
843
|
return /* @__PURE__ */ i(
|
|
844
|
-
|
|
844
|
+
Pe,
|
|
845
845
|
{
|
|
846
846
|
open: e,
|
|
847
847
|
onClose: n,
|
|
848
|
-
size:
|
|
849
|
-
title:
|
|
848
|
+
size: He.Medium,
|
|
849
|
+
title: d.formatMessage({ id: "ds.business.cloud-import.title" }),
|
|
850
850
|
children: e && /* @__PURE__ */ i(
|
|
851
|
-
|
|
851
|
+
Ot,
|
|
852
852
|
{
|
|
853
853
|
cloudPicker: r,
|
|
854
854
|
multiple: s,
|
|
@@ -862,15 +862,15 @@ function Ot({
|
|
|
862
862
|
}
|
|
863
863
|
);
|
|
864
864
|
}
|
|
865
|
-
var
|
|
865
|
+
var nn = /* @__PURE__ */ ((e) => (e.Medium = "medium", e.Compact = "compact", e))(nn || {});
|
|
866
866
|
const Tt = Ee(
|
|
867
867
|
"medium"
|
|
868
868
|
/* Medium */
|
|
869
|
-
), Rt =
|
|
869
|
+
), Rt = 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
|
-
})), Et =
|
|
873
|
+
})), Et = l(Le)(({ theme: e }) => ({
|
|
874
874
|
position: "relative",
|
|
875
875
|
transform: "none",
|
|
876
876
|
maxWidth: "100%",
|
|
@@ -883,12 +883,12 @@ const Tt = Ee(
|
|
|
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
|
-
})), zt =
|
|
886
|
+
})), zt = 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
|
-
})), At =
|
|
891
|
+
})), At = l("i", {
|
|
892
892
|
shouldForwardProp: (e) => e !== "token"
|
|
893
893
|
})(({ theme: e, token: n }) => ({
|
|
894
894
|
flex: "none",
|
|
@@ -896,22 +896,22 @@ 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
|
-
})), Lt =
|
|
899
|
+
})), Lt = l("span")({
|
|
900
900
|
display: "flex",
|
|
901
901
|
flexDirection: "column",
|
|
902
902
|
minWidth: 0
|
|
903
|
-
}), $t =
|
|
903
|
+
}), $t = l("span")(({ theme: e }) => ({
|
|
904
904
|
fontSize: o(e.design.typeScale.caption),
|
|
905
905
|
color: e.design.tokens["text.muted"],
|
|
906
906
|
whiteSpace: "normal"
|
|
907
|
-
})), pe =
|
|
907
|
+
})), pe = l("span")({
|
|
908
908
|
overflow: "hidden",
|
|
909
909
|
textOverflow: "ellipsis",
|
|
910
910
|
whiteSpace: "nowrap"
|
|
911
|
-
}), Dt =
|
|
911
|
+
}), Dt = l(pe)(({ theme: e }) => ({
|
|
912
912
|
color: e.design.tokens["text.muted"]
|
|
913
913
|
}));
|
|
914
|
-
function
|
|
914
|
+
function yr({
|
|
915
915
|
label: e,
|
|
916
916
|
options: n,
|
|
917
917
|
value: t,
|
|
@@ -919,21 +919,21 @@ function hr({
|
|
|
919
919
|
multiple: s = !1,
|
|
920
920
|
disabled: c,
|
|
921
921
|
error: a,
|
|
922
|
-
size:
|
|
922
|
+
size: d
|
|
923
923
|
}) {
|
|
924
|
-
const f = L(), v = ze(Tt), b = (
|
|
925
|
-
return /* @__PURE__ */ x(
|
|
924
|
+
const f = L(), v = ze(Tt), b = (d ?? v) === nn.Compact, u = b ? Rt : le, h = D(), m = `${h}-label`, g = `${h}-helper`, p = new Map(n.map((C) => [C.value, C]));
|
|
925
|
+
return /* @__PURE__ */ x(u, { fullWidth: !b, disabled: c, error: !!a, children: [
|
|
926
926
|
/* @__PURE__ */ i(
|
|
927
927
|
Et,
|
|
928
928
|
{
|
|
929
929
|
id: m,
|
|
930
930
|
shrink: !0,
|
|
931
|
-
style: b ?
|
|
931
|
+
style: b ? $e : void 0,
|
|
932
932
|
children: e
|
|
933
933
|
}
|
|
934
934
|
),
|
|
935
935
|
/* @__PURE__ */ x(
|
|
936
|
-
|
|
936
|
+
hn,
|
|
937
937
|
{
|
|
938
938
|
labelId: m,
|
|
939
939
|
multiple: s,
|
|
@@ -942,11 +942,11 @@ function hr({
|
|
|
942
942
|
renderValue: (C) => {
|
|
943
943
|
const F = Array.isArray(C) ? C : [C];
|
|
944
944
|
return b && F.length === 0 ? /* @__PURE__ */ i(Dt, { "aria-hidden": !0, children: e }) : /* @__PURE__ */ i(pe, { children: F.map((P) => {
|
|
945
|
-
var
|
|
946
|
-
return ((
|
|
945
|
+
var W;
|
|
946
|
+
return ((W = p.get(P)) == null ? void 0 : W.label) ?? P;
|
|
947
947
|
}).join(", ") });
|
|
948
948
|
},
|
|
949
|
-
"aria-describedby": a ?
|
|
949
|
+
"aria-describedby": a ? g : void 0,
|
|
950
950
|
onChange: (C) => r(C.target.value),
|
|
951
951
|
children: [
|
|
952
952
|
n.length === 0 && /* @__PURE__ */ i(xe, { disabled: !0, value: "", children: f.formatMessage({ id: "ds.inputs.rich-select.empty" }) }),
|
|
@@ -961,19 +961,19 @@ function hr({
|
|
|
961
961
|
]
|
|
962
962
|
}
|
|
963
963
|
),
|
|
964
|
-
a && /* @__PURE__ */ i(se, { id:
|
|
964
|
+
a && /* @__PURE__ */ i(se, { id: g, children: a })
|
|
965
965
|
] });
|
|
966
966
|
}
|
|
967
|
-
const Pt =
|
|
967
|
+
const Pt = 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
|
-
})), Ht =
|
|
972
|
+
})), Ht = l("span")(({ theme: e }) => ({
|
|
973
973
|
fontSize: o(e.design.typeScale.small),
|
|
974
974
|
fontWeight: R.medium,
|
|
975
975
|
color: e.design.tokens["text.secondary"]
|
|
976
|
-
})), Nt =
|
|
976
|
+
})), Nt = 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 = d("div")(({ theme: e }) => ({
|
|
|
995
995
|
transition: oe(e, ["border-color", "background-color"]),
|
|
996
996
|
"&:hover": { borderColor: t.accent }
|
|
997
997
|
};
|
|
998
|
-
}), _t =
|
|
998
|
+
}), _t = l("span")(({ theme: e }) => {
|
|
999
999
|
const { tokens: n, space: t } = e.design;
|
|
1000
1000
|
return {
|
|
1001
1001
|
display: "inline-flex",
|
|
@@ -1008,30 +1008,30 @@ const Pt = d("div")(({ theme: e }) => ({
|
|
|
1008
1008
|
color: n["accent.text"],
|
|
1009
1009
|
"& svg": { width: o(t[5]), height: o(t[5]) }
|
|
1010
1010
|
};
|
|
1011
|
-
}), Bt =
|
|
1011
|
+
}), Bt = l("span")(({ theme: e }) => ({
|
|
1012
1012
|
fontSize: o(e.design.typeScale.body),
|
|
1013
1013
|
[Z.down(K.Tablet)]: { display: "none" }
|
|
1014
|
-
})), Vt =
|
|
1014
|
+
})), Vt = 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
|
-
})), jt =
|
|
1020
|
+
})), jt = l("span")(({ theme: e }) => ({
|
|
1021
1021
|
fontSize: o(e.design.typeScale.small),
|
|
1022
1022
|
color: e.design.tokens["text.muted"]
|
|
1023
|
-
})), Gt =
|
|
1023
|
+
})), Gt = 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
|
-
})), qt =
|
|
1027
|
+
})), qt = l("img")(({ theme: e }) => ({
|
|
1028
1028
|
width: o(e.design.space[4]),
|
|
1029
1029
|
height: o(e.design.space[4])
|
|
1030
1030
|
})), Ut = (e) => {
|
|
1031
1031
|
const { value: n, unit: t } = Mn(e);
|
|
1032
1032
|
return `${n} ${t}`;
|
|
1033
1033
|
};
|
|
1034
|
-
function
|
|
1034
|
+
function vr({
|
|
1035
1035
|
onDrop: e,
|
|
1036
1036
|
multiple: n = !0,
|
|
1037
1037
|
accept: t,
|
|
@@ -1039,11 +1039,11 @@ function br({
|
|
|
1039
1039
|
caption: s,
|
|
1040
1040
|
title: c,
|
|
1041
1041
|
cloudImport: a,
|
|
1042
|
-
children:
|
|
1042
|
+
children: d
|
|
1043
1043
|
}) {
|
|
1044
|
-
const f = L(), v = D(), b = D(), [
|
|
1044
|
+
const f = L(), v = D(), b = D(), [u, h] = I(null), [m, g] = I(!1), p = r === void 0 ? null : Ut(r), y = s ?? (p === null ? null : f.formatMessage(
|
|
1045
1045
|
{ id: "ds.inputs.drop-zone.max-size" },
|
|
1046
|
-
{ size:
|
|
1046
|
+
{ size: p, multiple: String(n) }
|
|
1047
1047
|
)), C = (T, M) => {
|
|
1048
1048
|
const ee = r === void 0 ? [] : T.filter((N) => N.size > r), re = T.filter((N) => !ee.includes(N));
|
|
1049
1049
|
M.some(
|
|
@@ -1058,7 +1058,7 @@ function br({
|
|
|
1058
1058
|
T.length === 1 ? "too-big" : "some-too-big"
|
|
1059
1059
|
/* SomeTooBig */
|
|
1060
1060
|
) : h(null), re.length > 0 && e(re);
|
|
1061
|
-
}, { getRootProps: F, getInputProps: P, isDragActive:
|
|
1061
|
+
}, { getRootProps: F, getInputProps: P, isDragActive: W, open: H } = Sn({
|
|
1062
1062
|
onDrop: C,
|
|
1063
1063
|
multiple: n,
|
|
1064
1064
|
accept: t,
|
|
@@ -1077,13 +1077,13 @@ function br({
|
|
|
1077
1077
|
"aria-describedby": y !== null ? b : void 0,
|
|
1078
1078
|
children: [
|
|
1079
1079
|
c !== void 0 && /* @__PURE__ */ i(Ht, { id: v, children: c }),
|
|
1080
|
-
/* @__PURE__ */ x(Nt, { ...F({ onClick: H }), active:
|
|
1080
|
+
/* @__PURE__ */ x(Nt, { ...F({ onClick: H }), active: W, children: [
|
|
1081
1081
|
/* @__PURE__ */ i("input", { ...P({ "aria-hidden": !0 }) }),
|
|
1082
|
-
|
|
1083
|
-
/* @__PURE__ */ i(_t, { "aria-hidden": !0, children: /* @__PURE__ */ i(
|
|
1082
|
+
d ?? /* @__PURE__ */ x(J, { children: [
|
|
1083
|
+
/* @__PURE__ */ i(_t, { "aria-hidden": !0, children: /* @__PURE__ */ i(On, {}) }),
|
|
1084
1084
|
/* @__PURE__ */ i(Bt, { children: f.formatMessage(
|
|
1085
1085
|
{
|
|
1086
|
-
id:
|
|
1086
|
+
id: W ? "ds.inputs.drop-zone.release" : "ds.inputs.drop-zone.prompt"
|
|
1087
1087
|
},
|
|
1088
1088
|
{ multiple: String(n) }
|
|
1089
1089
|
) })
|
|
@@ -1105,21 +1105,21 @@ function br({
|
|
|
1105
1105
|
{
|
|
1106
1106
|
variant: "text",
|
|
1107
1107
|
startIcon: /* @__PURE__ */ i(qt, { src: In, alt: "" }),
|
|
1108
|
-
onClick: () =>
|
|
1108
|
+
onClick: () => g(!0),
|
|
1109
1109
|
children: f.formatMessage({ id: "ds.inputs.drop-zone.cloud" })
|
|
1110
1110
|
}
|
|
1111
1111
|
),
|
|
1112
1112
|
y !== null && /* @__PURE__ */ i(jt, { id: b, children: y })
|
|
1113
1113
|
] }),
|
|
1114
|
-
|
|
1115
|
-
{ id: `ds.inputs.drop-zone.${
|
|
1116
|
-
{ size:
|
|
1114
|
+
u !== null && /* @__PURE__ */ i(Gt, { role: "alert", children: f.formatMessage(
|
|
1115
|
+
{ id: `ds.inputs.drop-zone.${u}` },
|
|
1116
|
+
{ size: p ?? "" }
|
|
1117
1117
|
) }),
|
|
1118
1118
|
a !== void 0 && /* @__PURE__ */ i(
|
|
1119
|
-
|
|
1119
|
+
Wt,
|
|
1120
1120
|
{
|
|
1121
1121
|
open: m,
|
|
1122
|
-
onClose: () =>
|
|
1122
|
+
onClose: () => g(!1),
|
|
1123
1123
|
onImport: a.onImport,
|
|
1124
1124
|
cloudPicker: a,
|
|
1125
1125
|
multiple: n,
|
|
@@ -1135,7 +1135,7 @@ function br({
|
|
|
1135
1135
|
);
|
|
1136
1136
|
}
|
|
1137
1137
|
var Kt = /* @__PURE__ */ ((e) => (e.Default = "default", e.Danger = "danger", e.Warning = "warning", e))(Kt || {});
|
|
1138
|
-
const Yt =
|
|
1138
|
+
const Yt = l("form")(({ theme: e }) => ({
|
|
1139
1139
|
display: "flex",
|
|
1140
1140
|
flexDirection: "column",
|
|
1141
1141
|
gap: o(e.design.space[4]),
|
|
@@ -1157,12 +1157,12 @@ function Zt({
|
|
|
1157
1157
|
tone: s = "default",
|
|
1158
1158
|
confirmationText: c,
|
|
1159
1159
|
onConfirm: a,
|
|
1160
|
-
onCancel:
|
|
1160
|
+
onCancel: d
|
|
1161
1161
|
}) {
|
|
1162
|
-
const f = L(), v =
|
|
1162
|
+
const f = L(), v = bn(), b = D(), [u, h] = I(""), [m, g] = I(!1), [p, y] = I(!1), [C, F] = I(e);
|
|
1163
1163
|
e !== C && (F(e), e && (h(""), y(!1)));
|
|
1164
|
-
const P = !m && (c === void 0 ||
|
|
1165
|
-
m ||
|
|
1164
|
+
const P = !m && (c === void 0 || u === c), W = s !== "default", H = () => {
|
|
1165
|
+
m || d();
|
|
1166
1166
|
}, V = () => {
|
|
1167
1167
|
if (!P)
|
|
1168
1168
|
return;
|
|
@@ -1174,21 +1174,21 @@ function Zt({
|
|
|
1174
1174
|
y(!0);
|
|
1175
1175
|
return;
|
|
1176
1176
|
}
|
|
1177
|
-
M instanceof Promise && (
|
|
1178
|
-
() =>
|
|
1177
|
+
M instanceof Promise && (g(!0), M.then(
|
|
1178
|
+
() => g(!1),
|
|
1179
1179
|
() => {
|
|
1180
|
-
|
|
1180
|
+
g(!1), y(!0);
|
|
1181
1181
|
}
|
|
1182
1182
|
));
|
|
1183
1183
|
}, T = (M) => {
|
|
1184
1184
|
M.preventDefault(), V();
|
|
1185
1185
|
};
|
|
1186
1186
|
return /* @__PURE__ */ i(
|
|
1187
|
-
|
|
1187
|
+
Pe,
|
|
1188
1188
|
{
|
|
1189
1189
|
open: e,
|
|
1190
1190
|
onClose: H,
|
|
1191
|
-
size:
|
|
1191
|
+
size: He.Small,
|
|
1192
1192
|
title: n,
|
|
1193
1193
|
actions: /* @__PURE__ */ x(J, { children: [
|
|
1194
1194
|
/* @__PURE__ */ i(
|
|
@@ -1196,7 +1196,7 @@ function Zt({
|
|
|
1196
1196
|
{
|
|
1197
1197
|
variant: "outlined",
|
|
1198
1198
|
disabled: m,
|
|
1199
|
-
autoFocus: c === void 0 &&
|
|
1199
|
+
autoFocus: c === void 0 && W,
|
|
1200
1200
|
onClick: H,
|
|
1201
1201
|
children: f.formatMessage({ id: "ds.layers.confirm-dialog.cancel" })
|
|
1202
1202
|
}
|
|
@@ -1210,7 +1210,7 @@ function Zt({
|
|
|
1210
1210
|
color: Qt[s],
|
|
1211
1211
|
disabled: !P,
|
|
1212
1212
|
loading: m,
|
|
1213
|
-
autoFocus: c === void 0 && !
|
|
1213
|
+
autoFocus: c === void 0 && !W,
|
|
1214
1214
|
sx: s === "warning" ? {
|
|
1215
1215
|
"&:not(.Mui-disabled)": {
|
|
1216
1216
|
color: Xt(
|
|
@@ -1232,7 +1232,7 @@ function Zt({
|
|
|
1232
1232
|
{ id: "ds.layers.confirm-dialog.type-to-confirm" },
|
|
1233
1233
|
{ text: c }
|
|
1234
1234
|
),
|
|
1235
|
-
value:
|
|
1235
|
+
value: u,
|
|
1236
1236
|
onChange: (M) => h(M.target.value),
|
|
1237
1237
|
disabled: m,
|
|
1238
1238
|
autoFocus: !0,
|
|
@@ -1240,39 +1240,39 @@ function Zt({
|
|
|
1240
1240
|
fullWidth: !0
|
|
1241
1241
|
}
|
|
1242
1242
|
),
|
|
1243
|
-
|
|
1243
|
+
p && /* @__PURE__ */ i(Bn, { severity: "error", children: f.formatMessage({ id: "ds.layers.confirm-dialog.failed" }) })
|
|
1244
1244
|
] })
|
|
1245
1245
|
}
|
|
1246
1246
|
);
|
|
1247
1247
|
}
|
|
1248
|
-
const
|
|
1249
|
-
function
|
|
1248
|
+
const tn = Ee(null);
|
|
1249
|
+
function wr({ children: e }) {
|
|
1250
1250
|
const [n, t] = I([]), [r, s] = I(null), c = Y(0), a = Y([]);
|
|
1251
1251
|
a.current = n;
|
|
1252
|
-
const
|
|
1253
|
-
|
|
1252
|
+
const d = n.length > 0 ? n[0] : null;
|
|
1253
|
+
d !== null && d !== r && s(d), B(
|
|
1254
1254
|
() => () => {
|
|
1255
|
-
a.current.forEach((
|
|
1255
|
+
a.current.forEach((u) => u.resolve(!1));
|
|
1256
1256
|
},
|
|
1257
1257
|
[]
|
|
1258
1258
|
);
|
|
1259
1259
|
const f = Q(
|
|
1260
|
-
(
|
|
1260
|
+
(u) => new Promise((h) => {
|
|
1261
1261
|
c.current += 1;
|
|
1262
|
-
const m = { id: c.current, options:
|
|
1263
|
-
t((
|
|
1262
|
+
const m = { id: c.current, options: u, resolve: h };
|
|
1263
|
+
t((g) => [...g, m]);
|
|
1264
1264
|
}),
|
|
1265
1265
|
[]
|
|
1266
|
-
), v = (
|
|
1267
|
-
|
|
1266
|
+
), v = (u) => {
|
|
1267
|
+
d !== null && (d.resolve(u), t((h) => h.filter((m) => m !== d)));
|
|
1268
1268
|
}, b = ge(() => ({ confirm: f }), [f]);
|
|
1269
|
-
return /* @__PURE__ */ x(
|
|
1269
|
+
return /* @__PURE__ */ x(tn.Provider, { value: b, 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
|
Zt,
|
|
1274
1274
|
{
|
|
1275
|
-
open:
|
|
1275
|
+
open: d === r,
|
|
1276
1276
|
...r.options,
|
|
1277
1277
|
onConfirm: () => v(!0),
|
|
1278
1278
|
onCancel: () => v(!1)
|
|
@@ -1281,8 +1281,8 @@ function yr({ children: e }) {
|
|
|
1281
1281
|
)
|
|
1282
1282
|
] });
|
|
1283
1283
|
}
|
|
1284
|
-
function
|
|
1285
|
-
const e = ze(
|
|
1284
|
+
function xr() {
|
|
1285
|
+
const e = ze(tn);
|
|
1286
1286
|
if (e === null)
|
|
1287
1287
|
throw new Error(
|
|
1288
1288
|
"useConfirmDialog must be called inside a ConfirmDialogProvider"
|
|
@@ -1290,7 +1290,7 @@ function vr() {
|
|
|
1290
1290
|
return e;
|
|
1291
1291
|
}
|
|
1292
1292
|
var Jt = /* @__PURE__ */ ((e) => (e.BottomStart = "bottom-start", e.BottomEnd = "bottom-end", e))(Jt || {});
|
|
1293
|
-
const eo = 320, no =
|
|
1293
|
+
const eo = 320, no = l("div")(({ theme: e }) => {
|
|
1294
1294
|
const { tokens: n, space: t } = e.design;
|
|
1295
1295
|
return {
|
|
1296
1296
|
flex: "none",
|
|
@@ -1301,22 +1301,22 @@ const eo = 320, no = d("div")(({ theme: e }) => {
|
|
|
1301
1301
|
padding: `${o(t[2])} ${o(t[2])} ${o(t[2])} ${o(t[4])}`,
|
|
1302
1302
|
borderBottom: A(n["border.subtle"])
|
|
1303
1303
|
};
|
|
1304
|
-
}), to =
|
|
1304
|
+
}), to = 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
1309
|
fontWeight: R.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
|
-
})), oo =
|
|
1316
|
+
})), oo = l(on)(({ theme: e }) => ({
|
|
1317
1317
|
padding: o(e.design.space[4])
|
|
1318
1318
|
}));
|
|
1319
|
-
function
|
|
1319
|
+
function Cr({
|
|
1320
1320
|
anchorEl: e,
|
|
1321
1321
|
open: n,
|
|
1322
1322
|
onClose: t,
|
|
@@ -1325,18 +1325,18 @@ function wr({
|
|
|
1325
1325
|
width: c = eo,
|
|
1326
1326
|
children: a
|
|
1327
1327
|
}) {
|
|
1328
|
-
const
|
|
1328
|
+
const d = L(), f = D(), v = vn() === K.Mobile, b = d.formatMessage({
|
|
1329
1329
|
id: "ds.layers.anchored-panel.close"
|
|
1330
|
-
}),
|
|
1330
|
+
}), u = n && e !== null;
|
|
1331
1331
|
if (v)
|
|
1332
1332
|
return /* @__PURE__ */ i(
|
|
1333
1333
|
wn,
|
|
1334
1334
|
{
|
|
1335
|
-
open:
|
|
1335
|
+
open: u,
|
|
1336
1336
|
onClose: t,
|
|
1337
1337
|
title: r,
|
|
1338
1338
|
closeLabel: b,
|
|
1339
|
-
children: /* @__PURE__ */ i(
|
|
1339
|
+
children: /* @__PURE__ */ i(on, { children: a })
|
|
1340
1340
|
}
|
|
1341
1341
|
);
|
|
1342
1342
|
const h = s === "bottom-end" ? "right" : "left";
|
|
@@ -1344,7 +1344,7 @@ function wr({
|
|
|
1344
1344
|
jn,
|
|
1345
1345
|
{
|
|
1346
1346
|
anchorEl: e,
|
|
1347
|
-
open:
|
|
1347
|
+
open: u,
|
|
1348
1348
|
onClose: () => t(),
|
|
1349
1349
|
anchorOrigin: { vertical: "bottom", horizontal: h },
|
|
1350
1350
|
transformOrigin: { vertical: "top", horizontal: h },
|
|
@@ -1365,14 +1365,14 @@ function wr({
|
|
|
1365
1365
|
children: [
|
|
1366
1366
|
/* @__PURE__ */ x(no, { children: [
|
|
1367
1367
|
/* @__PURE__ */ i(to, { id: f, children: r }),
|
|
1368
|
-
/* @__PURE__ */ i(ae, { "aria-label": b, onClick: t, children: /* @__PURE__ */ i(
|
|
1368
|
+
/* @__PURE__ */ i(ae, { "aria-label": b, onClick: t, children: /* @__PURE__ */ i(_e, { "aria-hidden": !0 }) })
|
|
1369
1369
|
] }),
|
|
1370
1370
|
/* @__PURE__ */ i(oo, { children: a })
|
|
1371
1371
|
]
|
|
1372
1372
|
}
|
|
1373
1373
|
);
|
|
1374
1374
|
}
|
|
1375
|
-
const
|
|
1375
|
+
const kr = { l: 0.72, c: 0.12 }, Sr = [
|
|
1376
1376
|
266,
|
|
1377
1377
|
296,
|
|
1378
1378
|
326,
|
|
@@ -1385,7 +1385,7 @@ const xr = { l: 0.72, c: 0.12 }, Cr = [
|
|
|
1385
1385
|
176,
|
|
1386
1386
|
206,
|
|
1387
1387
|
236
|
|
1388
|
-
],
|
|
1388
|
+
], rn = [
|
|
1389
1389
|
"#81a2f0",
|
|
1390
1390
|
"#ab94e7",
|
|
1391
1391
|
"#cb89cd",
|
|
@@ -1398,25 +1398,25 @@ const xr = { l: 0.72, c: 0.12 }, Cr = [
|
|
|
1398
1398
|
"#37bda2",
|
|
1399
1399
|
"#18b9c9",
|
|
1400
1400
|
"#4eb0e5"
|
|
1401
|
-
],
|
|
1401
|
+
], Ir = "#767676", Fr = rn[6], Mr = "#111a2f", Or = "#5674be", ro = /^#?([0-9a-f]{6})$/i, q = (e) => {
|
|
1402
1402
|
const n = ro.exec(e.trim());
|
|
1403
1403
|
return n ? `#${n[1].toLowerCase()}` : null;
|
|
1404
|
-
}, io =
|
|
1404
|
+
}, io = l("div")(({ theme: e }) => ({
|
|
1405
1405
|
display: "flex",
|
|
1406
1406
|
alignItems: "center",
|
|
1407
1407
|
gap: o(e.design.space[3])
|
|
1408
|
-
})), so =
|
|
1408
|
+
})), so = l("span")(({ theme: e }) => ({
|
|
1409
1409
|
flex: "none",
|
|
1410
1410
|
width: o(e.design.densityValues[e.design.density].control),
|
|
1411
1411
|
height: o(e.design.densityValues[e.design.density].control),
|
|
1412
1412
|
borderRadius: o(e.design.radii.md),
|
|
1413
1413
|
border: A(e.design.tokens["border.control"])
|
|
1414
|
-
})), ao =
|
|
1414
|
+
})), ao = l("div")(({ theme: e }) => ({
|
|
1415
1415
|
display: "flex",
|
|
1416
1416
|
flexWrap: "wrap",
|
|
1417
1417
|
gap: o(e.design.space[2]),
|
|
1418
1418
|
marginTop: o(e.design.space[2])
|
|
1419
|
-
})), lo =
|
|
1419
|
+
})), lo = l(Be)(({ theme: e }) => {
|
|
1420
1420
|
const { densityValues: n, density: t, space: r } = e.design, s = n[t].control - r[2];
|
|
1421
1421
|
return {
|
|
1422
1422
|
width: o(s),
|
|
@@ -1432,21 +1432,21 @@ const xr = { l: 0.72, c: 0.12 }, Cr = [
|
|
|
1432
1432
|
}
|
|
1433
1433
|
};
|
|
1434
1434
|
});
|
|
1435
|
-
function
|
|
1435
|
+
function Wr({
|
|
1436
1436
|
label: e,
|
|
1437
1437
|
value: n,
|
|
1438
1438
|
onChange: t,
|
|
1439
|
-
swatches: r =
|
|
1439
|
+
swatches: r = rn
|
|
1440
1440
|
}) {
|
|
1441
|
-
const s = L(), c = D(), [a,
|
|
1441
|
+
const s = L(), c = D(), [a, d] = I(n), f = a !== "" && q(a) === null;
|
|
1442
1442
|
B(() => {
|
|
1443
|
-
|
|
1444
|
-
(
|
|
1443
|
+
d(
|
|
1444
|
+
(u) => q(u) === q(n) ? u : n
|
|
1445
1445
|
);
|
|
1446
1446
|
}, [n]);
|
|
1447
|
-
const v = (
|
|
1448
|
-
|
|
1449
|
-
const h = q(
|
|
1447
|
+
const v = (u) => {
|
|
1448
|
+
d(u);
|
|
1449
|
+
const h = q(u);
|
|
1450
1450
|
h !== null && h !== q(n) && t(h);
|
|
1451
1451
|
}, b = q(n);
|
|
1452
1452
|
return /* @__PURE__ */ x(le, { fullWidth: !0, error: f, children: [
|
|
@@ -1471,7 +1471,7 @@ function Mr({
|
|
|
1471
1471
|
spellCheck: !1,
|
|
1472
1472
|
autoComplete: "off"
|
|
1473
1473
|
},
|
|
1474
|
-
onChange: (
|
|
1474
|
+
onChange: (u) => v(u.target.value)
|
|
1475
1475
|
}
|
|
1476
1476
|
)
|
|
1477
1477
|
] }),
|
|
@@ -1481,26 +1481,26 @@ function Mr({
|
|
|
1481
1481
|
{
|
|
1482
1482
|
role: "group",
|
|
1483
1483
|
"aria-label": s.formatMessage({ id: "ds.inputs.color.swatches" }),
|
|
1484
|
-
children: r.map((
|
|
1484
|
+
children: r.map((u) => /* @__PURE__ */ i(
|
|
1485
1485
|
lo,
|
|
1486
1486
|
{
|
|
1487
|
-
"aria-pressed": q(
|
|
1488
|
-
"aria-label":
|
|
1489
|
-
style: { backgroundColor:
|
|
1490
|
-
onClick: () => t(q(
|
|
1487
|
+
"aria-pressed": q(u) === b,
|
|
1488
|
+
"aria-label": u,
|
|
1489
|
+
style: { backgroundColor: u },
|
|
1490
|
+
onClick: () => t(q(u) ?? u)
|
|
1491
1491
|
},
|
|
1492
|
-
|
|
1492
|
+
u
|
|
1493
1493
|
))
|
|
1494
1494
|
}
|
|
1495
1495
|
)
|
|
1496
1496
|
] });
|
|
1497
1497
|
}
|
|
1498
|
-
const co = 6, uo =
|
|
1498
|
+
const co = 6, uo = l("div", {
|
|
1499
1499
|
shouldForwardProp: (e) => e !== "edges"
|
|
1500
1500
|
})(({ theme: e, edges: n }) => {
|
|
1501
|
-
const { tokens: t, radii: r, space: s } = e.design, c = o(s[1] * co), a = t["text.primary"],
|
|
1501
|
+
const { tokens: t, radii: r, space: s } = e.design, c = o(s[1] * co), a = t["text.primary"], d = n.start ? `transparent, ${a} ${c}` : a, f = n.end ? `${a} calc(100% - ${c}), transparent` : a;
|
|
1502
1502
|
return {
|
|
1503
|
-
maskImage: n.start || n.end ? `linear-gradient(to right, ${
|
|
1503
|
+
maskImage: n.start || n.end ? `linear-gradient(to right, ${d}, ${f})` : "none",
|
|
1504
1504
|
display: "inline-flex",
|
|
1505
1505
|
maxWidth: "100%",
|
|
1506
1506
|
minWidth: 0,
|
|
@@ -1523,7 +1523,7 @@ const co = 6, uo = d("div", {
|
|
|
1523
1523
|
backgroundColor: "transparent"
|
|
1524
1524
|
}
|
|
1525
1525
|
};
|
|
1526
|
-
}), po =
|
|
1526
|
+
}), po = l(Be)(({ theme: e }) => {
|
|
1527
1527
|
const { tokens: n, space: t, typeScale: r, fonts: s, densityValues: c, radii: a } = e.design;
|
|
1528
1528
|
return {
|
|
1529
1529
|
flex: "none",
|
|
@@ -1555,33 +1555,40 @@ const co = 6, uo = d("div", {
|
|
|
1555
1555
|
'&[aria-checked="true"]': { backgroundColor: n["bg.raised"] }
|
|
1556
1556
|
}
|
|
1557
1557
|
};
|
|
1558
|
-
}), go =
|
|
1558
|
+
}), go = l("span")(({ theme: e }) => ({
|
|
1559
|
+
display: "inline-flex",
|
|
1560
|
+
flex: "none",
|
|
1561
|
+
"& svg": {
|
|
1562
|
+
width: o(e.design.space[4]),
|
|
1563
|
+
height: o(e.design.space[4])
|
|
1564
|
+
}
|
|
1565
|
+
})), fo = l("span")($e), mo = l("span")(({ theme: e }) => ({
|
|
1559
1566
|
fontFamily: e.design.fonts.mono,
|
|
1560
1567
|
fontSize: o(e.design.typeScale.caption),
|
|
1561
1568
|
color: e.design.tokens["text.muted"]
|
|
1562
1569
|
}));
|
|
1563
|
-
function
|
|
1570
|
+
function Tr({
|
|
1564
1571
|
options: e,
|
|
1565
1572
|
value: n,
|
|
1566
1573
|
onChange: t,
|
|
1567
1574
|
ariaLabel: r,
|
|
1568
1575
|
testId: s
|
|
1569
1576
|
}) {
|
|
1570
|
-
const c = Y(null), [a,
|
|
1571
|
-
const
|
|
1572
|
-
if (!
|
|
1577
|
+
const c = Y(null), [a, d] = I({ start: !1, end: !1 }), f = Q(() => {
|
|
1578
|
+
const u = c.current;
|
|
1579
|
+
if (!u)
|
|
1573
1580
|
return;
|
|
1574
|
-
const h =
|
|
1575
|
-
|
|
1576
|
-
(
|
|
1581
|
+
const h = u.scrollLeft > 0, m = u.scrollLeft + u.clientWidth < u.scrollWidth - 1;
|
|
1582
|
+
d(
|
|
1583
|
+
(g) => g.start === h && g.end === m ? g : { start: h, end: m }
|
|
1577
1584
|
);
|
|
1578
1585
|
}, []);
|
|
1579
1586
|
B(() => (f(), window.addEventListener("resize", f), () => window.removeEventListener("resize", f)), [f, e]);
|
|
1580
|
-
const v = (
|
|
1581
|
-
var
|
|
1587
|
+
const v = (u) => {
|
|
1588
|
+
var g, p;
|
|
1582
1589
|
const h = e.findIndex((y) => y.value === n);
|
|
1583
1590
|
let m;
|
|
1584
|
-
switch (
|
|
1591
|
+
switch (u.key) {
|
|
1585
1592
|
case "ArrowRight":
|
|
1586
1593
|
case "ArrowDown":
|
|
1587
1594
|
m = (h + 1) % e.length;
|
|
@@ -1599,9 +1606,9 @@ function Wr({
|
|
|
1599
1606
|
default:
|
|
1600
1607
|
return;
|
|
1601
1608
|
}
|
|
1602
|
-
|
|
1609
|
+
u.preventDefault(), t(e[m].value), (p = (g = c.current) == null ? void 0 : g.querySelectorAll('[role="radio"]')[m]) == null || p.focus();
|
|
1603
1610
|
}, b = Math.max(
|
|
1604
|
-
e.findIndex((
|
|
1611
|
+
e.findIndex((u) => u.value === n),
|
|
1605
1612
|
0
|
|
1606
1613
|
);
|
|
1607
1614
|
return /* @__PURE__ */ i(
|
|
@@ -1614,32 +1621,33 @@ function Wr({
|
|
|
1614
1621
|
edges: a,
|
|
1615
1622
|
onKeyDown: v,
|
|
1616
1623
|
onScroll: f,
|
|
1617
|
-
children: e.map((
|
|
1618
|
-
const m =
|
|
1624
|
+
children: e.map((u, h) => {
|
|
1625
|
+
const m = u.value === n;
|
|
1619
1626
|
return /* @__PURE__ */ x(
|
|
1620
1627
|
po,
|
|
1621
1628
|
{
|
|
1622
1629
|
role: "radio",
|
|
1623
1630
|
"aria-checked": m,
|
|
1624
|
-
"aria-label":
|
|
1625
|
-
lang:
|
|
1626
|
-
"data-testid":
|
|
1631
|
+
"aria-label": u.ariaLabel,
|
|
1632
|
+
lang: u.lang,
|
|
1633
|
+
"data-testid": u.testId,
|
|
1627
1634
|
tabIndex: h === b ? 0 : -1,
|
|
1628
|
-
onClick: () => t(
|
|
1635
|
+
onClick: () => t(u.value),
|
|
1629
1636
|
children: [
|
|
1630
|
-
|
|
1631
|
-
|
|
1637
|
+
u.icon !== void 0 && /* @__PURE__ */ i(go, { "aria-hidden": !0, children: u.icon }),
|
|
1638
|
+
u.icon !== void 0 && u.iconOnly ? /* @__PURE__ */ i(fo, { children: u.label }) : u.label,
|
|
1639
|
+
u.count !== void 0 && /* @__PURE__ */ i(mo, { children: u.count })
|
|
1632
1640
|
]
|
|
1633
1641
|
},
|
|
1634
|
-
|
|
1642
|
+
u.value
|
|
1635
1643
|
);
|
|
1636
1644
|
})
|
|
1637
1645
|
}
|
|
1638
1646
|
);
|
|
1639
1647
|
}
|
|
1640
|
-
const
|
|
1648
|
+
const ho = [32, 160, 8239, 8201].map(
|
|
1641
1649
|
(e) => String.fromCharCode(e)
|
|
1642
|
-
),
|
|
1650
|
+
), bo = (e) => {
|
|
1643
1651
|
var t, r;
|
|
1644
1652
|
const n = new Intl.NumberFormat(e).formatToParts(11111.1);
|
|
1645
1653
|
return {
|
|
@@ -1647,7 +1655,7 @@ const fo = [32, 160, 8239, 8201].map(
|
|
|
1647
1655
|
decimal: ((r = n.find((s) => s.type === "decimal")) == null ? void 0 : r.value) ?? "."
|
|
1648
1656
|
};
|
|
1649
1657
|
}, Te = (e, n) => {
|
|
1650
|
-
const r = [n.group, ...
|
|
1658
|
+
const r = [n.group, ...ho].reduce(
|
|
1651
1659
|
(c, a) => c.split(a).join(""),
|
|
1652
1660
|
e.trim()
|
|
1653
1661
|
).replace(",", ".");
|
|
@@ -1656,7 +1664,7 @@ const fo = [32, 160, 8239, 8201].map(
|
|
|
1656
1664
|
const s = Number.parseFloat(r);
|
|
1657
1665
|
return Number.isFinite(s) ? s : null;
|
|
1658
1666
|
};
|
|
1659
|
-
function
|
|
1667
|
+
function Rr({
|
|
1660
1668
|
label: e,
|
|
1661
1669
|
value: n,
|
|
1662
1670
|
onChange: t,
|
|
@@ -1665,70 +1673,70 @@ function Or({
|
|
|
1665
1673
|
disabled: c,
|
|
1666
1674
|
adornment: a
|
|
1667
1675
|
}) {
|
|
1668
|
-
const
|
|
1669
|
-
() =>
|
|
1670
|
-
[
|
|
1676
|
+
const d = L(), f = ge(
|
|
1677
|
+
() => bo(d.locale),
|
|
1678
|
+
[d.locale]
|
|
1671
1679
|
), v = Q(
|
|
1672
|
-
(
|
|
1680
|
+
(p) => p === null ? "" : d.formatNumber(p, {
|
|
1673
1681
|
minimumFractionDigits: r,
|
|
1674
1682
|
maximumFractionDigits: r
|
|
1675
1683
|
}),
|
|
1676
|
-
[
|
|
1677
|
-
), [b,
|
|
1684
|
+
[d, r]
|
|
1685
|
+
), [b, u] = I(!1), [h, m] = I(() => v(n));
|
|
1678
1686
|
return B(() => {
|
|
1679
1687
|
b || m(v(n));
|
|
1680
|
-
}, [n, b, v]), /* @__PURE__ */ i(
|
|
1688
|
+
}, [n, b, v]), /* @__PURE__ */ i(Ve, { label: e, children: /* @__PURE__ */ i(
|
|
1681
1689
|
fe,
|
|
1682
1690
|
{
|
|
1683
1691
|
disabled: c,
|
|
1684
1692
|
value: h,
|
|
1685
1693
|
inputProps: { inputMode: "decimal" },
|
|
1686
1694
|
onFocus: () => {
|
|
1687
|
-
|
|
1695
|
+
u(!0), n !== null && m(String(n).replace(".", f.decimal));
|
|
1688
1696
|
},
|
|
1689
|
-
onChange: (
|
|
1690
|
-
m(
|
|
1691
|
-
const y = Te(
|
|
1692
|
-
y !== null ? t(y) :
|
|
1697
|
+
onChange: (p) => {
|
|
1698
|
+
m(p.target.value);
|
|
1699
|
+
const y = Te(p.target.value, f);
|
|
1700
|
+
y !== null ? t(y) : p.target.value === "" && t(null);
|
|
1693
1701
|
},
|
|
1694
1702
|
onBlur: () => {
|
|
1695
|
-
|
|
1696
|
-
let
|
|
1697
|
-
|
|
1703
|
+
u(!1);
|
|
1704
|
+
let p = Te(h, f);
|
|
1705
|
+
p !== null && (p = Number.parseFloat(Math.max(p, s).toFixed(r))), t(p), m(v(p));
|
|
1698
1706
|
},
|
|
1699
1707
|
endAdornment: a ? /* @__PURE__ */ i(Gn, { position: "end", children: a }) : void 0
|
|
1700
1708
|
}
|
|
1701
1709
|
) });
|
|
1702
1710
|
}
|
|
1703
|
-
const
|
|
1711
|
+
const yo = 1, vo = (e, n) => n === "vertical" ? e.scrollHeight - e.clientHeight - e.scrollTop : e.scrollWidth - e.clientWidth - e.scrollLeft, wo = (e, n, t) => {
|
|
1704
1712
|
const [r, s] = I(!1), c = Q(() => {
|
|
1705
1713
|
const a = e.current;
|
|
1706
|
-
a !== null && s(
|
|
1714
|
+
a !== null && s(vo(a, n) > yo);
|
|
1707
1715
|
}, [e, n]);
|
|
1708
1716
|
return Ae(c, [c, t]), B(() => {
|
|
1709
1717
|
const a = e.current;
|
|
1710
1718
|
if (a === null)
|
|
1711
1719
|
return;
|
|
1712
1720
|
a.addEventListener("scroll", c, { passive: !0 });
|
|
1713
|
-
const
|
|
1714
|
-
return
|
|
1715
|
-
a.removeEventListener("scroll", c),
|
|
1721
|
+
const d = typeof ResizeObserver > "u" ? null : new ResizeObserver(c);
|
|
1722
|
+
return d !== null && (d.observe(a), Array.from(a.children).forEach((f) => d.observe(f))), () => {
|
|
1723
|
+
a.removeEventListener("scroll", c), d == null || d.disconnect();
|
|
1716
1724
|
};
|
|
1717
1725
|
}, [e, c, t]), r;
|
|
1718
1726
|
};
|
|
1719
|
-
var
|
|
1720
|
-
const
|
|
1727
|
+
var xo = /* @__PURE__ */ ((e) => (e.Primary = "primary", e.Secondary = "secondary", e))(xo || {});
|
|
1728
|
+
const Co = 2, ko = /* @__PURE__ */ new Set(["Enter", " "]), So = l("div", {
|
|
1721
1729
|
shouldForwardProp: (e) => e !== "variant"
|
|
1722
1730
|
})(({ theme: e, variant: n }) => ({
|
|
1723
1731
|
minWidth: 0,
|
|
1724
1732
|
...n === "primary" && {
|
|
1725
1733
|
borderBottom: A(e.design.tokens["border.subtle"])
|
|
1726
1734
|
}
|
|
1727
|
-
})),
|
|
1735
|
+
})), sn = 32, Io = l("div", {
|
|
1728
1736
|
shouldForwardProp: (e) => e !== "variant" && e !== "fade"
|
|
1729
1737
|
})(({ theme: e, variant: n, fade: t }) => {
|
|
1730
1738
|
const s = `linear-gradient(to right, ${e.design.tokens["text.primary"]} calc(100% - ${o(
|
|
1731
|
-
|
|
1739
|
+
sn
|
|
1732
1740
|
)}), transparent)`;
|
|
1733
1741
|
return {
|
|
1734
1742
|
position: "relative",
|
|
@@ -1740,8 +1748,8 @@ const wo = 2, xo = /* @__PURE__ */ new Set(["Enter", " "]), Co = d("div", {
|
|
|
1740
1748
|
"&::-webkit-scrollbar": { display: "none" },
|
|
1741
1749
|
...t && { maskImage: s, WebkitMaskImage: s }
|
|
1742
1750
|
};
|
|
1743
|
-
}),
|
|
1744
|
-
const { tokens: t, space: r, radii: s, typeScale: c, fonts: a, densityValues:
|
|
1751
|
+
}), an = (e, n) => {
|
|
1752
|
+
const { tokens: t, space: r, radii: s, typeScale: c, fonts: a, densityValues: d, density: f } = e.design, v = {
|
|
1745
1753
|
position: "relative",
|
|
1746
1754
|
display: "inline-flex",
|
|
1747
1755
|
alignItems: "center",
|
|
@@ -1766,12 +1774,12 @@ const wo = 2, xo = /* @__PURE__ */ new Set(["Enter", " "]), Co = d("div", {
|
|
|
1766
1774
|
"&:focus-visible": { ...te(e), outlineOffset: "-2px" }
|
|
1767
1775
|
}, b = {
|
|
1768
1776
|
[Z.down(K.Tablet)]: {
|
|
1769
|
-
minHeight: o(
|
|
1777
|
+
minHeight: o(d.touchTarget)
|
|
1770
1778
|
}
|
|
1771
1779
|
};
|
|
1772
1780
|
return n === "primary" ? {
|
|
1773
1781
|
...v,
|
|
1774
|
-
minHeight: o(
|
|
1782
|
+
minHeight: o(d[f].control + r[2]),
|
|
1775
1783
|
padding: `0 ${o(r[3])}`,
|
|
1776
1784
|
fontSize: o(c.body),
|
|
1777
1785
|
'&[aria-selected="true"]::after': {
|
|
@@ -1780,13 +1788,13 @@ const wo = 2, xo = /* @__PURE__ */ new Set(["Enter", " "]), Co = d("div", {
|
|
|
1780
1788
|
left: 0,
|
|
1781
1789
|
right: 0,
|
|
1782
1790
|
bottom: 0,
|
|
1783
|
-
height: o(
|
|
1791
|
+
height: o(Co),
|
|
1784
1792
|
backgroundColor: t.accent
|
|
1785
1793
|
},
|
|
1786
1794
|
...b
|
|
1787
1795
|
} : {
|
|
1788
1796
|
...v,
|
|
1789
|
-
minHeight: o(
|
|
1797
|
+
minHeight: o(d.compact.control),
|
|
1790
1798
|
padding: `0 ${o(r[3])}`,
|
|
1791
1799
|
borderRadius: o(s.md),
|
|
1792
1800
|
fontSize: o(c.small),
|
|
@@ -1801,7 +1809,7 @@ const wo = 2, xo = /* @__PURE__ */ new Set(["Enter", " "]), Co = d("div", {
|
|
|
1801
1809
|
},
|
|
1802
1810
|
...b
|
|
1803
1811
|
};
|
|
1804
|
-
},
|
|
1812
|
+
}, ln = (e) => e !== "variant", Fo = l(Kn, { shouldForwardProp: ln })(({ theme: e, variant: n }) => an(e, n)), Mo = l("button", { shouldForwardProp: ln })(({ theme: e, variant: n }) => an(e, n)), Oo = l("span")(({ theme: e }) => {
|
|
1805
1813
|
const { tokens: n, space: t, radii: r, fonts: s, typeScale: c } = e.design;
|
|
1806
1814
|
return {
|
|
1807
1815
|
display: "inline-flex",
|
|
@@ -1816,69 +1824,69 @@ const wo = 2, xo = /* @__PURE__ */ new Set(["Enter", " "]), Co = d("div", {
|
|
|
1816
1824
|
color: n["text.muted"]
|
|
1817
1825
|
};
|
|
1818
1826
|
}), Re = (e, n) => {
|
|
1819
|
-
const t = n.offsetLeft, r = t + n.offsetWidth +
|
|
1827
|
+
const t = n.offsetLeft, r = t + n.offsetWidth + sn;
|
|
1820
1828
|
t < e.scrollLeft ? e.scrollLeft = t : r > e.scrollLeft + e.clientWidth && (e.scrollLeft = r - e.clientWidth);
|
|
1821
1829
|
};
|
|
1822
|
-
function
|
|
1830
|
+
function Er({
|
|
1823
1831
|
items: e,
|
|
1824
1832
|
value: n,
|
|
1825
1833
|
onChange: t,
|
|
1826
1834
|
variant: r,
|
|
1827
1835
|
"aria-label": s
|
|
1828
1836
|
}) {
|
|
1829
|
-
const c = L(), a = Y(null),
|
|
1837
|
+
const c = L(), a = Y(null), d = e.filter((g) => g.hidden !== !0), f = wo(a, "horizontal", d.length), v = Q(
|
|
1830
1838
|
() => {
|
|
1831
|
-
var
|
|
1839
|
+
var g;
|
|
1832
1840
|
return Array.from(
|
|
1833
|
-
((
|
|
1841
|
+
((g = a.current) == null ? void 0 : g.querySelectorAll('[role="tab"]')) ?? []
|
|
1834
1842
|
);
|
|
1835
1843
|
},
|
|
1836
1844
|
[]
|
|
1837
1845
|
), b = Q(() => {
|
|
1838
|
-
const
|
|
1839
|
-
|
|
1846
|
+
const g = a.current, p = g == null ? void 0 : g.querySelector('[aria-selected="true"]');
|
|
1847
|
+
g && p && Re(g, p);
|
|
1840
1848
|
}, []);
|
|
1841
1849
|
Ae(b, [b, n]);
|
|
1842
|
-
const
|
|
1850
|
+
const u = d.map((g) => g.value).join("|");
|
|
1843
1851
|
B(() => {
|
|
1844
|
-
const
|
|
1845
|
-
if (
|
|
1852
|
+
const g = a.current;
|
|
1853
|
+
if (g === null || typeof ResizeObserver > "u")
|
|
1846
1854
|
return;
|
|
1847
|
-
const
|
|
1848
|
-
return
|
|
1849
|
-
}, [b,
|
|
1850
|
-
const h = (
|
|
1851
|
-
const
|
|
1855
|
+
const p = new ResizeObserver(b);
|
|
1856
|
+
return p.observe(g), Array.from(g.children).forEach((y) => p.observe(y)), () => p.disconnect();
|
|
1857
|
+
}, [b, u]);
|
|
1858
|
+
const h = (g) => {
|
|
1859
|
+
const p = v(), y = p.findIndex((F) => F === document.activeElement);
|
|
1852
1860
|
if (y < 0)
|
|
1853
1861
|
return;
|
|
1854
|
-
if (
|
|
1855
|
-
|
|
1862
|
+
if (ko.has(g.key)) {
|
|
1863
|
+
g.key === " " && p[y] instanceof HTMLAnchorElement && (g.preventDefault(), p[y].click());
|
|
1856
1864
|
return;
|
|
1857
1865
|
}
|
|
1858
1866
|
let C;
|
|
1859
|
-
switch (
|
|
1867
|
+
switch (g.key) {
|
|
1860
1868
|
case "ArrowRight":
|
|
1861
|
-
C = (y + 1) %
|
|
1869
|
+
C = (y + 1) % p.length;
|
|
1862
1870
|
break;
|
|
1863
1871
|
case "ArrowLeft":
|
|
1864
|
-
C = (y - 1 +
|
|
1872
|
+
C = (y - 1 + p.length) % p.length;
|
|
1865
1873
|
break;
|
|
1866
1874
|
case "Home":
|
|
1867
1875
|
C = 0;
|
|
1868
1876
|
break;
|
|
1869
1877
|
case "End":
|
|
1870
|
-
C =
|
|
1878
|
+
C = p.length - 1;
|
|
1871
1879
|
break;
|
|
1872
1880
|
default:
|
|
1873
1881
|
return;
|
|
1874
1882
|
}
|
|
1875
|
-
|
|
1883
|
+
g.preventDefault(), p[C].focus(), a.current && Re(a.current, p[C]);
|
|
1876
1884
|
}, m = Math.max(
|
|
1877
|
-
|
|
1885
|
+
d.findIndex((g) => g.value === n),
|
|
1878
1886
|
0
|
|
1879
1887
|
);
|
|
1880
|
-
return /* @__PURE__ */ i(
|
|
1881
|
-
|
|
1888
|
+
return /* @__PURE__ */ i(So, { variant: r, children: /* @__PURE__ */ i(
|
|
1889
|
+
Io,
|
|
1882
1890
|
{
|
|
1883
1891
|
ref: a,
|
|
1884
1892
|
role: "tablist",
|
|
@@ -1887,60 +1895,60 @@ function Tr({
|
|
|
1887
1895
|
fade: f,
|
|
1888
1896
|
"data-overflowing": f || void 0,
|
|
1889
1897
|
onKeyDown: h,
|
|
1890
|
-
children:
|
|
1891
|
-
const y =
|
|
1892
|
-
|
|
1893
|
-
|
|
1898
|
+
children: d.map((g, p) => {
|
|
1899
|
+
const y = g.value === n, C = /* @__PURE__ */ x(J, { children: [
|
|
1900
|
+
g.label,
|
|
1901
|
+
g.badge !== void 0 && /* @__PURE__ */ i(Oo, { children: typeof g.badge == "number" ? c.formatNumber(g.badge) : g.badge })
|
|
1894
1902
|
] }), F = {
|
|
1895
1903
|
role: "tab",
|
|
1896
1904
|
"aria-selected": y,
|
|
1897
|
-
tabIndex:
|
|
1898
|
-
"data-testid":
|
|
1905
|
+
tabIndex: p === m ? 0 : -1,
|
|
1906
|
+
"data-testid": g.testId,
|
|
1899
1907
|
variant: r,
|
|
1900
|
-
onClick: () => t == null ? void 0 : t(
|
|
1908
|
+
onClick: () => t == null ? void 0 : t(g.value)
|
|
1901
1909
|
};
|
|
1902
|
-
return
|
|
1903
|
-
|
|
1910
|
+
return g.to !== void 0 ? /* @__PURE__ */ i(
|
|
1911
|
+
Fo,
|
|
1904
1912
|
{
|
|
1905
|
-
to:
|
|
1913
|
+
to: g.to,
|
|
1906
1914
|
"aria-current": y ? "page" : void 0,
|
|
1907
1915
|
...F,
|
|
1908
1916
|
children: C
|
|
1909
1917
|
},
|
|
1910
|
-
|
|
1911
|
-
) : /* @__PURE__ */ i(
|
|
1918
|
+
g.value
|
|
1919
|
+
) : /* @__PURE__ */ i(Mo, { type: "button", ...F, children: C }, g.value);
|
|
1912
1920
|
})
|
|
1913
1921
|
}
|
|
1914
1922
|
) });
|
|
1915
1923
|
}
|
|
1916
1924
|
export {
|
|
1917
|
-
|
|
1925
|
+
Cr as A,
|
|
1918
1926
|
rt as C,
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
+
vr as D,
|
|
1928
|
+
Ve as F,
|
|
1929
|
+
Wt as I,
|
|
1930
|
+
Rr as N,
|
|
1931
|
+
yr as R,
|
|
1932
|
+
Tr as S,
|
|
1933
|
+
xo as T,
|
|
1934
|
+
je as a,
|
|
1927
1935
|
Tt as b,
|
|
1928
|
-
|
|
1936
|
+
nn as c,
|
|
1929
1937
|
Kt as d,
|
|
1930
|
-
|
|
1938
|
+
wo as e,
|
|
1931
1939
|
Zt as f,
|
|
1932
|
-
|
|
1933
|
-
|
|
1940
|
+
Ot as g,
|
|
1941
|
+
Wr as h,
|
|
1934
1942
|
Jt as i,
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1943
|
+
wr as j,
|
|
1944
|
+
Er as k,
|
|
1945
|
+
kr as l,
|
|
1946
|
+
Sr as m,
|
|
1939
1947
|
q as n,
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1948
|
+
rn as o,
|
|
1949
|
+
Ir as p,
|
|
1950
|
+
Fr as q,
|
|
1951
|
+
Mr as r,
|
|
1952
|
+
Or as s,
|
|
1953
|
+
xr as u
|
|
1946
1954
|
};
|