@mt-gloss/ui 0.1.86 → 0.1.88
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/{COMMITS-6U31xb_s.js → COMMITS-CoGFzpf4.js} +83 -60
- package/{Expandable-C5vX1uaQ.js → Expandable-D4ZdxEEQ.js} +1101 -1096
- package/catalog.js +2 -2
- package/composites-panels.js +58 -55
- package/index.js +200 -199
- package/lib/composites/panels/shells/SettingsShell.d.ts +1 -1
- package/lib/primitives/dashboard/MetricCard/types/shared.d.ts +2 -0
- package/lib/primitives/dashboard/PageChip/types.d.ts +3 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as d, jsx as e, Fragment as We } from "react/jsx-runtime";
|
|
2
2
|
import * as mr from "react";
|
|
3
3
|
import Z, { useId as Le, useState as H, useCallback as N, createContext as Xt, useContext as qt, useRef as ce, useEffect as se, useMemo as ee, useSyncExternalStore as is, useReducer as ls, forwardRef as cs, useImperativeHandle as ds } from "react";
|
|
4
|
-
import { S as J, E as Ze, C as
|
|
4
|
+
import { S as J, E as Ze, C as B, i as us, R as Se, l as ms, m as ps, n as fs, aj as gs, Q as hs, t as bs, ad as ys, ak as ve, V as vs, W as Ja, X as Qa, Y as _s, _ as xs, $ as Ns, a0 as Ss, a1 as Cs, a2 as ws, a5 as ks, a6 as Ds, a7 as Is, ac as Ts, a8 as Es, a9 as Ms, P as Ps, O as Rs, j as Bs, k as As, a3 as zs, a4 as $s, o as Fs, v as Os, z as Ls, w as Hs, U as _t, A as Ws, D as Gs, x as Vs, F as js, y as Ks, ah as Ys, ai as Us, G as Xs, H as qs, I as Zs, J as Js, K as Qs, L as eo, M as to, N as ro, a as ge, b as Gt, f as en, e as Dt, h as Je, Z as tn, B as ao, af as no, d as rn, T as Ae, ae as so, ag as Na } from "./UIContext-DP6JGCto.js";
|
|
5
5
|
import { formatTrend as oo, isStatusModeEnabled as io, pickMetricTier as lo, getValueFontSize as Sa, formatValue as $r, getDateRangeForPreset as Ye, formatDateRangeSmart as ft, isInRange as co, isSameDay as rr, formatMarketDates as uo, DEFAULT_MARKET_PRESETS as ar, isMarketActive as St, detectPreset as nr, getDateRangeDisplayInfo as Ot, toUppercasePresetId as sr, generateMarketId as mo, ROLLING_OPTIONS as kr, PERIOD_OPTIONS as Dr } from "@mt-gloss/utils";
|
|
6
6
|
import { useGridApiRef as po, DataGridPro as fo } from "@mui/x-data-grid-pro";
|
|
7
7
|
import { Chip as Vt, Tooltip as ht, MenuItem as jt, Menu as go, Box as ne, Popper as ho, Paper as bo, MenuList as yo, ListItemText as vo, IconButton as qe, Select as Ca, Typography as Te, Divider as _o, Button as nt, Collapse as xo, Popover as No, Dialog as So, DialogTitle as Co, DialogContent as wo, TextField as or, DialogActions as ko, Tabs as Do, Tab as Io } from "@mui/material";
|
|
@@ -54,30 +54,30 @@ import ki from "@mui/icons-material/Undo";
|
|
|
54
54
|
import { z as ye } from "zod";
|
|
55
55
|
const Di = {
|
|
56
56
|
primary: {
|
|
57
|
-
bg:
|
|
58
|
-
color:
|
|
57
|
+
bg: B.BrandPrimary,
|
|
58
|
+
color: B.TextInverse,
|
|
59
59
|
borderColor: "transparent",
|
|
60
60
|
elevation: Ze.ButtonDefault
|
|
61
61
|
},
|
|
62
62
|
secondary: {
|
|
63
|
-
bg:
|
|
64
|
-
color:
|
|
65
|
-
borderColor:
|
|
63
|
+
bg: B.BgSurface,
|
|
64
|
+
color: B.TextPrimary,
|
|
65
|
+
borderColor: B.BorderDefault,
|
|
66
66
|
elevation: Ze.ButtonDefault
|
|
67
67
|
},
|
|
68
68
|
ghost: {
|
|
69
69
|
bg: "transparent",
|
|
70
|
-
color:
|
|
70
|
+
color: B.TextPrimary,
|
|
71
71
|
borderColor: "transparent"
|
|
72
72
|
},
|
|
73
73
|
outline: {
|
|
74
74
|
bg: "transparent",
|
|
75
|
-
color:
|
|
76
|
-
borderColor:
|
|
75
|
+
color: B.BrandPrimary,
|
|
76
|
+
borderColor: B.BrandPrimary
|
|
77
77
|
},
|
|
78
78
|
destructive: {
|
|
79
|
-
bg:
|
|
80
|
-
color:
|
|
79
|
+
bg: B.Red600,
|
|
80
|
+
color: B.TextInverse,
|
|
81
81
|
borderColor: "transparent",
|
|
82
82
|
elevation: Ze.ButtonDefault
|
|
83
83
|
}
|
|
@@ -169,8 +169,8 @@ const Ei = Z.createContext({
|
|
|
169
169
|
);
|
|
170
170
|
un.displayName = "ButtonGroup";
|
|
171
171
|
const Mi = {
|
|
172
|
-
default: { trackBorder:
|
|
173
|
-
error: { trackBorder:
|
|
172
|
+
default: { trackBorder: B.BorderDefault },
|
|
173
|
+
error: { trackBorder: B.BorderError }
|
|
174
174
|
}, Pi = {
|
|
175
175
|
xs: { trackSize: "14px", trackRadius: "2px" },
|
|
176
176
|
sm: { trackSize: "16px", trackRadius: "3px" },
|
|
@@ -178,8 +178,8 @@ const Mi = {
|
|
|
178
178
|
lg: { trackSize: "20px", trackRadius: "4px" },
|
|
179
179
|
xl: { trackSize: "24px", trackRadius: "4px" }
|
|
180
180
|
}, Ri = {
|
|
181
|
-
trackBg:
|
|
182
|
-
checkColor:
|
|
181
|
+
trackBg: B.BgSurface,
|
|
182
|
+
checkColor: B.TextInverse
|
|
183
183
|
}, ut = Z.forwardRef(
|
|
184
184
|
(r, t) => {
|
|
185
185
|
const {
|
|
@@ -197,17 +197,17 @@ const Mi = {
|
|
|
197
197
|
name: y,
|
|
198
198
|
value: b,
|
|
199
199
|
id: _
|
|
200
|
-
} = r, v = Le(), h = _ || v, [k, E] = H(l),
|
|
200
|
+
} = r, v = Le(), h = _ || v, [k, E] = H(l), w = c !== void 0, S = w ? c : k, I = N(
|
|
201
201
|
(x) => {
|
|
202
|
-
|
|
202
|
+
w || E(x.target.checked), u?.(x), p?.(x.target.checked);
|
|
203
203
|
},
|
|
204
|
-
[
|
|
204
|
+
[w, u, p]
|
|
205
205
|
), g = {
|
|
206
206
|
...Ri,
|
|
207
207
|
...Mi[a],
|
|
208
208
|
...Pi[n]
|
|
209
209
|
};
|
|
210
|
-
(
|
|
210
|
+
(S || o) && (g.trackBg = B.BrandPrimary, g.trackBorder = B.BrandPrimary);
|
|
211
211
|
const P = [
|
|
212
212
|
"gloss-preset-checkbox",
|
|
213
213
|
`gloss-preset-checkbox--${a}`,
|
|
@@ -221,13 +221,13 @@ const Mi = {
|
|
|
221
221
|
definition: g,
|
|
222
222
|
className: P,
|
|
223
223
|
indeterminate: o,
|
|
224
|
-
checked:
|
|
224
|
+
checked: S,
|
|
225
225
|
onChange: I,
|
|
226
226
|
disabled: m,
|
|
227
227
|
name: y,
|
|
228
228
|
value: b,
|
|
229
229
|
id: h,
|
|
230
|
-
"aria-checked": o ? "mixed" :
|
|
230
|
+
"aria-checked": o ? "mixed" : S,
|
|
231
231
|
children: s && /* @__PURE__ */ d("span", { className: "gloss-preset-checkbox__label", children: [
|
|
232
232
|
s,
|
|
233
233
|
f && /* @__PURE__ */ e("span", { className: "gloss-preset-checkbox__required", children: " *" })
|
|
@@ -260,13 +260,13 @@ function Ai({
|
|
|
260
260
|
}) {
|
|
261
261
|
Le();
|
|
262
262
|
const [y, b] = H(t), _ = r !== void 0, v = _ ? r : y, h = N(
|
|
263
|
-
(
|
|
264
|
-
const I = v.includes(
|
|
263
|
+
(S) => {
|
|
264
|
+
const I = v.includes(S) ? v.filter((g) => g !== S) : [...v, S];
|
|
265
265
|
_ || b(I), a?.(I);
|
|
266
266
|
},
|
|
267
267
|
[v, _, a]
|
|
268
268
|
), k = N(
|
|
269
|
-
(
|
|
269
|
+
(S) => v.includes(S),
|
|
270
270
|
[v]
|
|
271
271
|
), E = {
|
|
272
272
|
values: v,
|
|
@@ -274,31 +274,31 @@ function Ai({
|
|
|
274
274
|
isSelected: k,
|
|
275
275
|
groupProps: { size: o, status: u, disabled: m, name: f },
|
|
276
276
|
isInGroup: !0
|
|
277
|
-
},
|
|
277
|
+
}, w = [
|
|
278
278
|
"gloss-checkbox-group",
|
|
279
279
|
`gloss-checkbox-group--${i}`,
|
|
280
280
|
u !== "default" && `gloss-checkbox-group--${u}`,
|
|
281
281
|
m && "gloss-checkbox-group--disabled"
|
|
282
282
|
].filter(Boolean).join(" ");
|
|
283
|
-
return /* @__PURE__ */ e(mn.Provider, { value: E, children: /* @__PURE__ */ d("fieldset", { className:
|
|
283
|
+
return /* @__PURE__ */ e(mn.Provider, { value: E, children: /* @__PURE__ */ d("fieldset", { className: w, disabled: m, children: [
|
|
284
284
|
c && /* @__PURE__ */ d("legend", { className: "gloss-checkbox-group__label", children: [
|
|
285
285
|
c,
|
|
286
286
|
p && /* @__PURE__ */ e("span", { className: "gloss-checkbox-group__required", children: " *" })
|
|
287
287
|
] }),
|
|
288
|
-
/* @__PURE__ */ e("div", { className: "gloss-checkbox-group__items", role: "group", children: n ? n.map((
|
|
288
|
+
/* @__PURE__ */ e("div", { className: "gloss-checkbox-group__items", role: "group", children: n ? n.map((S) => /* @__PURE__ */ e(
|
|
289
289
|
ut,
|
|
290
290
|
{
|
|
291
|
-
checked: k(
|
|
292
|
-
onChange: () => h(
|
|
293
|
-
label:
|
|
294
|
-
helperText:
|
|
295
|
-
disabled: m ||
|
|
291
|
+
checked: k(S.value),
|
|
292
|
+
onChange: () => h(S.value),
|
|
293
|
+
label: S.label,
|
|
294
|
+
helperText: S.helperText,
|
|
295
|
+
disabled: m || S.disabled,
|
|
296
296
|
size: o,
|
|
297
297
|
variant: u === "error" ? "error" : "default",
|
|
298
298
|
name: f,
|
|
299
|
-
value: String(
|
|
299
|
+
value: String(S.value)
|
|
300
300
|
},
|
|
301
|
-
String(
|
|
301
|
+
String(S.value)
|
|
302
302
|
)) : s }),
|
|
303
303
|
l && /* @__PURE__ */ e("div", { className: `gloss-checkbox-group__helper ${u === "error" ? "gloss-checkbox-group__helper--error" : ""}`, children: l })
|
|
304
304
|
] }) });
|
|
@@ -325,8 +325,8 @@ const zi = Z.forwardRef(
|
|
|
325
325
|
);
|
|
326
326
|
zi.displayName = "GroupCheckbox";
|
|
327
327
|
const $i = {
|
|
328
|
-
default: { trackBorder:
|
|
329
|
-
error: { trackBorder:
|
|
328
|
+
default: { trackBorder: B.BorderDefault },
|
|
329
|
+
error: { trackBorder: B.BorderError }
|
|
330
330
|
}, Fi = {
|
|
331
331
|
xs: { trackSize: "14px" },
|
|
332
332
|
sm: { trackSize: "16px" },
|
|
@@ -334,8 +334,8 @@ const $i = {
|
|
|
334
334
|
lg: { trackSize: "20px" },
|
|
335
335
|
xl: { trackSize: "24px" }
|
|
336
336
|
}, Oi = {
|
|
337
|
-
trackBg:
|
|
338
|
-
dotColor:
|
|
337
|
+
trackBg: B.BgSurface,
|
|
338
|
+
dotColor: B.BrandPrimary
|
|
339
339
|
}, fr = Z.forwardRef(
|
|
340
340
|
(r, t) => {
|
|
341
341
|
const {
|
|
@@ -356,7 +356,7 @@ const $i = {
|
|
|
356
356
|
...$i[a],
|
|
357
357
|
...Fi[n]
|
|
358
358
|
};
|
|
359
|
-
c && (b.trackBorder =
|
|
359
|
+
c && (b.trackBorder = B.BrandPrimary);
|
|
360
360
|
const _ = [
|
|
361
361
|
"gloss-preset-radio",
|
|
362
362
|
`gloss-preset-radio--${a}`,
|
|
@@ -410,12 +410,12 @@ function Hi({
|
|
|
410
410
|
}) {
|
|
411
411
|
Le();
|
|
412
412
|
const [y, b] = H(t), _ = r !== void 0, v = _ ? r : y, h = N(
|
|
413
|
-
(
|
|
414
|
-
_ || b(
|
|
413
|
+
(S) => {
|
|
414
|
+
_ || b(S), a?.(S);
|
|
415
415
|
},
|
|
416
416
|
[_, a]
|
|
417
417
|
), k = N(
|
|
418
|
-
(
|
|
418
|
+
(S) => v === S,
|
|
419
419
|
[v]
|
|
420
420
|
), E = {
|
|
421
421
|
value: v,
|
|
@@ -423,31 +423,31 @@ function Hi({
|
|
|
423
423
|
isSelected: k,
|
|
424
424
|
groupProps: { size: o, status: u, disabled: m, name: f },
|
|
425
425
|
isInGroup: !0
|
|
426
|
-
},
|
|
426
|
+
}, w = [
|
|
427
427
|
"gloss-radio-group",
|
|
428
428
|
`gloss-radio-group--${i}`,
|
|
429
429
|
u !== "default" && `gloss-radio-group--${u}`,
|
|
430
430
|
m && "gloss-radio-group--disabled"
|
|
431
431
|
].filter(Boolean).join(" ");
|
|
432
|
-
return /* @__PURE__ */ e(pn.Provider, { value: E, children: /* @__PURE__ */ d("fieldset", { className:
|
|
432
|
+
return /* @__PURE__ */ e(pn.Provider, { value: E, children: /* @__PURE__ */ d("fieldset", { className: w, disabled: m, children: [
|
|
433
433
|
c && /* @__PURE__ */ d("legend", { className: "gloss-radio-group__label", children: [
|
|
434
434
|
c,
|
|
435
435
|
p && /* @__PURE__ */ e("span", { className: "gloss-radio-group__required", children: " *" })
|
|
436
436
|
] }),
|
|
437
|
-
/* @__PURE__ */ e("div", { className: "gloss-radio-group__items", role: "radiogroup", "aria-required": p, children: n ? n.map((
|
|
437
|
+
/* @__PURE__ */ e("div", { className: "gloss-radio-group__items", role: "radiogroup", "aria-required": p, children: n ? n.map((S) => /* @__PURE__ */ e(
|
|
438
438
|
fr,
|
|
439
439
|
{
|
|
440
440
|
name: f,
|
|
441
|
-
value: String(
|
|
442
|
-
checked: k(
|
|
443
|
-
onChange: () => h(
|
|
444
|
-
label:
|
|
445
|
-
description:
|
|
446
|
-
disabled: m ||
|
|
441
|
+
value: String(S.value),
|
|
442
|
+
checked: k(S.value),
|
|
443
|
+
onChange: () => h(S.value),
|
|
444
|
+
label: S.label,
|
|
445
|
+
description: S.description,
|
|
446
|
+
disabled: m || S.disabled,
|
|
447
447
|
size: o,
|
|
448
448
|
variant: u === "error" ? "error" : "default"
|
|
449
449
|
},
|
|
450
|
-
String(
|
|
450
|
+
String(S.value)
|
|
451
451
|
)) : s }),
|
|
452
452
|
l && /* @__PURE__ */ e("div", { className: `gloss-radio-group__helper ${u === "error" ? "gloss-radio-group__helper--error" : ""}`, children: l })
|
|
453
453
|
] }) });
|
|
@@ -474,7 +474,7 @@ const Wi = Z.forwardRef(
|
|
|
474
474
|
);
|
|
475
475
|
Wi.displayName = "GroupRadio";
|
|
476
476
|
const Gi = {
|
|
477
|
-
default:
|
|
477
|
+
default: B.BrandPrimary,
|
|
478
478
|
success: "var(--gloss-color-green-600)",
|
|
479
479
|
error: "var(--gloss-color-red-600)"
|
|
480
480
|
}, Vi = {
|
|
@@ -498,15 +498,15 @@ const Gi = {
|
|
|
498
498
|
onCheckedChange: m,
|
|
499
499
|
disabled: f = !1,
|
|
500
500
|
id: y
|
|
501
|
-
} = r, b = Le(), _ = y || b, [v, h] = H(u), k = l !== void 0, E = k ? l : v,
|
|
501
|
+
} = r, b = Le(), _ = y || b, [v, h] = H(u), k = l !== void 0, E = k ? l : v, w = N(
|
|
502
502
|
(g) => {
|
|
503
503
|
k || h(g.target.checked), p?.(g), m?.(g.target.checked);
|
|
504
504
|
},
|
|
505
505
|
[k, p, m]
|
|
506
|
-
),
|
|
507
|
-
trackBg:
|
|
506
|
+
), S = {
|
|
507
|
+
trackBg: B.Gray300,
|
|
508
508
|
trackBgActive: Gi[a],
|
|
509
|
-
thumbBg:
|
|
509
|
+
thumbBg: B.White,
|
|
510
510
|
...Vi[n]
|
|
511
511
|
}, I = [
|
|
512
512
|
"gloss-preset-toggle",
|
|
@@ -518,10 +518,10 @@ const Gi = {
|
|
|
518
518
|
fs,
|
|
519
519
|
{
|
|
520
520
|
ref: t,
|
|
521
|
-
definition:
|
|
521
|
+
definition: S,
|
|
522
522
|
className: I,
|
|
523
523
|
checked: E,
|
|
524
|
-
onChange:
|
|
524
|
+
onChange: w,
|
|
525
525
|
disabled: f,
|
|
526
526
|
id: _,
|
|
527
527
|
children: s && /* @__PURE__ */ e("span", { className: "gloss-preset-toggle__label", children: s })
|
|
@@ -533,9 +533,9 @@ const Gi = {
|
|
|
533
533
|
);
|
|
534
534
|
ji.displayName = "PresetToggle";
|
|
535
535
|
const Ki = {
|
|
536
|
-
default: { color:
|
|
537
|
-
muted: { color:
|
|
538
|
-
destructive: { color:
|
|
536
|
+
default: { color: B.TextLink },
|
|
537
|
+
muted: { color: B.TextSecondary },
|
|
538
|
+
destructive: { color: B.TextError }
|
|
539
539
|
}, Yi = {
|
|
540
540
|
xs: { fontSize: "0.6875rem" },
|
|
541
541
|
sm: { fontSize: "0.75rem" },
|
|
@@ -598,14 +598,14 @@ const Ki = {
|
|
|
598
598
|
Kt.displayName = "PresetLink";
|
|
599
599
|
const Ui = {
|
|
600
600
|
default: {
|
|
601
|
-
bg:
|
|
602
|
-
activeBg:
|
|
601
|
+
bg: B.BgMuted,
|
|
602
|
+
activeBg: B.BgSurface,
|
|
603
603
|
borderColor: "transparent"
|
|
604
604
|
},
|
|
605
605
|
filled: {
|
|
606
|
-
bg:
|
|
607
|
-
activeBg:
|
|
608
|
-
borderColor:
|
|
606
|
+
bg: B.Gray200,
|
|
607
|
+
activeBg: B.BgSurface,
|
|
608
|
+
borderColor: B.BorderDefault
|
|
609
609
|
}
|
|
610
610
|
}, Xi = {
|
|
611
611
|
xs: { padding: "1px", fontSize: "0.6875rem" },
|
|
@@ -646,10 +646,10 @@ const Zi = {
|
|
|
646
646
|
lg: { trackHeight: "6px", thumbSize: "20px" },
|
|
647
647
|
xl: { trackHeight: "8px", thumbSize: "24px" }
|
|
648
648
|
}, Ji = {
|
|
649
|
-
trackBg:
|
|
650
|
-
trackActiveBg:
|
|
651
|
-
thumbBg:
|
|
652
|
-
thumbBorder: `2px solid ${
|
|
649
|
+
trackBg: B.Gray200,
|
|
650
|
+
trackActiveBg: B.BrandPrimary,
|
|
651
|
+
thumbBg: B.BgSurface,
|
|
652
|
+
thumbBorder: `2px solid ${B.BrandPrimary}`,
|
|
653
653
|
thumbShadow: "0 1px 3px rgba(0, 0, 0, 0.12)"
|
|
654
654
|
};
|
|
655
655
|
function Qi(r) {
|
|
@@ -688,10 +688,10 @@ const el = {
|
|
|
688
688
|
lg: { trackHeight: "6px", thumbSize: "20px" },
|
|
689
689
|
xl: { trackHeight: "8px", thumbSize: "24px" }
|
|
690
690
|
}, tl = {
|
|
691
|
-
trackBg:
|
|
692
|
-
trackActiveBg:
|
|
693
|
-
thumbBg:
|
|
694
|
-
thumbBorder: `2px solid ${
|
|
691
|
+
trackBg: B.Gray200,
|
|
692
|
+
trackActiveBg: B.BrandPrimary,
|
|
693
|
+
thumbBg: B.BgSurface,
|
|
694
|
+
thumbBorder: `2px solid ${B.BrandPrimary}`,
|
|
695
695
|
thumbShadow: "0 1px 3px rgba(0, 0, 0, 0.12)"
|
|
696
696
|
}, rl = Z.forwardRef(
|
|
697
697
|
(r, t) => {
|
|
@@ -714,66 +714,66 @@ const el = {
|
|
|
714
714
|
helperText: h,
|
|
715
715
|
id: k,
|
|
716
716
|
name: E
|
|
717
|
-
} = r,
|
|
718
|
-
const
|
|
719
|
-
return Math.round((Math.round((
|
|
720
|
-
}, [c, l, u]), O = N((F,
|
|
721
|
-
const
|
|
722
|
-
|
|
723
|
-
}, [M, p, x, c, l,
|
|
717
|
+
} = r, w = Le(), S = k || w, I = ce(null), [g, P] = H(s), [x, D] = H(null), C = n !== void 0, z = C ? n : g, T = (z[0] - c) / (l - c) * 100, A = (z[1] - c) / (l - c) * 100, M = N((F) => {
|
|
718
|
+
const X = Math.min(l, Math.max(c, F));
|
|
719
|
+
return Math.round((Math.round((X - c) / u) * u + c) * 1e3) / 1e3;
|
|
720
|
+
}, [c, l, u]), O = N((F, X = !1) => {
|
|
721
|
+
const U = [M(F[0]), M(F[1])];
|
|
722
|
+
U[0] > U[1] - p && (x === 0 ? U[0] = U[1] - p : U[1] = U[0] + p), U[0] = Math.max(c, U[0]), U[1] = Math.min(l, U[1]), C || P(U), i?.(U), X && o?.(U);
|
|
723
|
+
}, [M, p, x, c, l, C, i, o]), Y = N((F, X) => {
|
|
724
724
|
if (!I.current) return 0;
|
|
725
|
-
const
|
|
726
|
-
return c + Math.min(1, Math.max(0,
|
|
725
|
+
const U = I.current.getBoundingClientRect(), K = b === "horizontal" ? (F - U.left) / U.width : 1 - (X - U.top) / U.height;
|
|
726
|
+
return c + Math.min(1, Math.max(0, K)) * (l - c);
|
|
727
727
|
}, [b, c, l]), j = N((F) => {
|
|
728
728
|
if (_) return;
|
|
729
729
|
F.preventDefault();
|
|
730
|
-
const
|
|
731
|
-
D(
|
|
732
|
-
const
|
|
733
|
-
|
|
734
|
-
}, [_,
|
|
730
|
+
const X = Y(F.clientX, F.clientY), U = Math.abs(X - z[0]) <= Math.abs(X - z[1]) ? 0 : 1;
|
|
731
|
+
D(U);
|
|
732
|
+
const K = [...z];
|
|
733
|
+
K[U] = X, O(K);
|
|
734
|
+
}, [_, Y, z, O]);
|
|
735
735
|
se(() => {
|
|
736
736
|
if (x === null) return;
|
|
737
|
-
const F = (
|
|
738
|
-
const
|
|
739
|
-
|
|
740
|
-
},
|
|
741
|
-
const
|
|
742
|
-
|
|
737
|
+
const F = (U) => {
|
|
738
|
+
const K = [...z];
|
|
739
|
+
K[x] = Y(U.clientX, U.clientY), O(K);
|
|
740
|
+
}, X = (U) => {
|
|
741
|
+
const K = [...z];
|
|
742
|
+
K[x] = Y(U.clientX, U.clientY), O(K, !0), D(null);
|
|
743
743
|
};
|
|
744
|
-
return document.addEventListener("mousemove", F), document.addEventListener("mouseup",
|
|
745
|
-
document.removeEventListener("mousemove", F), document.removeEventListener("mouseup",
|
|
744
|
+
return document.addEventListener("mousemove", F), document.addEventListener("mouseup", X), () => {
|
|
745
|
+
document.removeEventListener("mousemove", F), document.removeEventListener("mouseup", X);
|
|
746
746
|
};
|
|
747
|
-
}, [x,
|
|
748
|
-
const
|
|
747
|
+
}, [x, Y, z, O]);
|
|
748
|
+
const R = N((F) => (X) => {
|
|
749
749
|
if (_) return;
|
|
750
|
-
let
|
|
751
|
-
if (
|
|
752
|
-
else if (
|
|
750
|
+
let U = 0;
|
|
751
|
+
if (X.key === "ArrowRight" || X.key === "ArrowUp") U = u;
|
|
752
|
+
else if (X.key === "ArrowLeft" || X.key === "ArrowDown") U = -u;
|
|
753
753
|
else return;
|
|
754
|
-
|
|
755
|
-
const
|
|
756
|
-
|
|
757
|
-
}, [_, u,
|
|
754
|
+
X.preventDefault();
|
|
755
|
+
const K = [...z];
|
|
756
|
+
K[F] += U, O(K, !0);
|
|
757
|
+
}, [_, u, z, O]), W = Math.abs(A - T) < 5, V = { ...tl, ...el[a] }, G = ["gloss-preset-rangeslider", `gloss-preset-rangeslider--${a}`, _ && "gloss-preset-rangeslider--disabled"].filter(Boolean).join(" ");
|
|
758
758
|
return /* @__PURE__ */ d("div", { className: G, children: [
|
|
759
|
-
v && /* @__PURE__ */ d("label", { className: "gloss-preset-rangeslider__label", htmlFor:
|
|
759
|
+
v && /* @__PURE__ */ d("label", { className: "gloss-preset-rangeslider__label", htmlFor: S, children: [
|
|
760
760
|
v,
|
|
761
761
|
f && /* @__PURE__ */ d("span", { className: "gloss-preset-rangeslider__value-label", children: [
|
|
762
|
-
y(
|
|
762
|
+
y(z[0]),
|
|
763
763
|
" - ",
|
|
764
|
-
y(
|
|
764
|
+
y(z[1])
|
|
765
765
|
] })
|
|
766
766
|
] }),
|
|
767
|
-
/* @__PURE__ */ e("input", { ref: t, type: "hidden", id:
|
|
768
|
-
/* @__PURE__ */ e("input", { type: "hidden", name: E ? `${E}[1]` : void 0, value:
|
|
767
|
+
/* @__PURE__ */ e("input", { ref: t, type: "hidden", id: S, name: E ? `${E}[0]` : void 0, value: z[0] }),
|
|
768
|
+
/* @__PURE__ */ e("input", { type: "hidden", name: E ? `${E}[1]` : void 0, value: z[1] }),
|
|
769
769
|
/* @__PURE__ */ e(ys, { definition: V, orientation: b, disabled: _, collision: W, children: /* @__PURE__ */ d("div", { ref: I, className: "gloss-base-rangeslider__track", onMouseDown: j, children: [
|
|
770
|
-
/* @__PURE__ */ e("div", { className: "gloss-base-rangeslider__fill", style: b === "horizontal" ? { left: `${T}%`, width: `${
|
|
771
|
-
/* @__PURE__ */ e("div", { className: `gloss-base-rangeslider__thumb ${x === 0 ? "gloss-base-rangeslider__thumb--active" : ""}`, role: "slider", tabIndex: _ ? -1 : 0, "aria-valuenow":
|
|
770
|
+
/* @__PURE__ */ e("div", { className: "gloss-base-rangeslider__fill", style: b === "horizontal" ? { left: `${T}%`, width: `${A - T}%` } : { bottom: `${T}%`, height: `${A - T}%` } }),
|
|
771
|
+
/* @__PURE__ */ e("div", { className: `gloss-base-rangeslider__thumb ${x === 0 ? "gloss-base-rangeslider__thumb--active" : ""}`, role: "slider", tabIndex: _ ? -1 : 0, "aria-valuenow": z[0], "aria-valuemin": c, "aria-valuemax": z[1] - p, onMouseDown: (F) => {
|
|
772
772
|
_ || (F.preventDefault(), F.stopPropagation(), D(0));
|
|
773
|
-
}, onKeyDown:
|
|
774
|
-
/* @__PURE__ */ e("div", { className: `gloss-base-rangeslider__thumb ${x === 1 ? "gloss-base-rangeslider__thumb--active" : ""}`, role: "slider", tabIndex: _ ? -1 : 0, "aria-valuenow":
|
|
773
|
+
}, onKeyDown: R(0), style: b === "horizontal" ? { left: `${T}%` } : { bottom: `${T}%` }, "aria-label": `${v || "Range"} minimum` }),
|
|
774
|
+
/* @__PURE__ */ e("div", { className: `gloss-base-rangeslider__thumb ${x === 1 ? "gloss-base-rangeslider__thumb--active" : ""}`, role: "slider", tabIndex: _ ? -1 : 0, "aria-valuenow": z[1], "aria-valuemin": z[0] + p, "aria-valuemax": l, onMouseDown: (F) => {
|
|
775
775
|
_ || (F.preventDefault(), F.stopPropagation(), D(1));
|
|
776
|
-
}, onKeyDown:
|
|
776
|
+
}, onKeyDown: R(1), style: b === "horizontal" ? { left: `${A}%` } : { bottom: `${A}%` }, "aria-label": `${v || "Range"} maximum` })
|
|
777
777
|
] }) }),
|
|
778
778
|
h && /* @__PURE__ */ e("div", { className: "gloss-preset-rangeslider__helper", children: h })
|
|
779
779
|
] });
|
|
@@ -866,17 +866,17 @@ const nl = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], sl = ["January", "
|
|
|
866
866
|
}, Ir = (r, t, a, n, s) => t && r < t || a && r > a || n?.some((i) => yt(i, r)) ? !0 : s?.(r) ?? !1, ll = (r, t, a, n, s, i, o, c) => {
|
|
867
867
|
const l = [], u = /* @__PURE__ */ new Date(), p = Ta(r, t), f = (ol(r, t) - n + 7) % 7, y = t === 0 ? 11 : t - 1, b = t === 0 ? r - 1 : r, _ = Ta(b, y);
|
|
868
868
|
for (let E = f - 1; E >= 0; E--) {
|
|
869
|
-
const
|
|
870
|
-
l.push({ date:
|
|
869
|
+
const w = new Date(b, y, _ - E);
|
|
870
|
+
l.push({ date: w, isCurrentMonth: !1, isToday: yt(w, u), isSelected: a ? yt(w, a) : !1, isDisabled: Ir(w, s, i, o, c) });
|
|
871
871
|
}
|
|
872
872
|
for (let E = 1; E <= p; E++) {
|
|
873
|
-
const
|
|
874
|
-
l.push({ date:
|
|
873
|
+
const w = new Date(r, t, E);
|
|
874
|
+
l.push({ date: w, isCurrentMonth: !0, isToday: yt(w, u), isSelected: a ? yt(w, a) : !1, isDisabled: Ir(w, s, i, o, c) });
|
|
875
875
|
}
|
|
876
876
|
const v = t === 11 ? 0 : t + 1, h = t === 11 ? r + 1 : r, k = 42 - l.length;
|
|
877
877
|
for (let E = 1; E <= k; E++) {
|
|
878
|
-
const
|
|
879
|
-
l.push({ date:
|
|
878
|
+
const w = new Date(h, v, E);
|
|
879
|
+
l.push({ date: w, isCurrentMonth: !1, isToday: yt(w, u), isSelected: a ? yt(w, a) : !1, isDisabled: Ir(w, s, i, o, c) });
|
|
880
880
|
}
|
|
881
881
|
return l;
|
|
882
882
|
}, cl = {
|
|
@@ -886,9 +886,9 @@ const nl = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], sl = ["January", "
|
|
|
886
886
|
lg: { padding: J.Lg },
|
|
887
887
|
xl: { padding: J.Xl }
|
|
888
888
|
}, dl = {
|
|
889
|
-
default:
|
|
890
|
-
error:
|
|
891
|
-
success:
|
|
889
|
+
default: B.BorderDefault,
|
|
890
|
+
error: B.BorderError,
|
|
891
|
+
success: B.BorderSuccess
|
|
892
892
|
}, ul = Z.forwardRef(
|
|
893
893
|
(r, t) => {
|
|
894
894
|
const {
|
|
@@ -910,23 +910,23 @@ const nl = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], sl = ["January", "
|
|
|
910
910
|
clearable: h = !0,
|
|
911
911
|
required: k,
|
|
912
912
|
id: E,
|
|
913
|
-
name:
|
|
914
|
-
} = r,
|
|
913
|
+
name: w
|
|
914
|
+
} = r, S = Le(), I = E || S, g = ce(null), [P, x] = H(!1), [D, C] = H(i), z = s !== void 0, T = z ? s : D, [A, M] = H(() => T || /* @__PURE__ */ new Date());
|
|
915
915
|
se(() => {
|
|
916
916
|
T && M(T);
|
|
917
917
|
}, [T]);
|
|
918
|
-
const O = gn({ enabled: P, onEscape: () => x(!1) }),
|
|
918
|
+
const O = gn({ enabled: P, onEscape: () => x(!1) }), Y = ee(() => ll(A.getFullYear(), A.getMonth(), T, y, c, l, u, p), [A, T, y, c, l, u, p]), j = ee(() => {
|
|
919
919
|
const q = [...nl];
|
|
920
920
|
if (y > 0) {
|
|
921
921
|
const te = q.splice(0, y);
|
|
922
922
|
q.push(...te);
|
|
923
923
|
}
|
|
924
924
|
return q;
|
|
925
|
-
}, [y]),
|
|
926
|
-
|
|
927
|
-
}, [
|
|
928
|
-
q.stopPropagation(),
|
|
929
|
-
}, [
|
|
925
|
+
}, [y]), R = N((q) => {
|
|
926
|
+
z || C(q), o?.(q), x(!1);
|
|
927
|
+
}, [z, o]), W = N((q) => {
|
|
928
|
+
q.stopPropagation(), z || C(null), o?.(null);
|
|
929
|
+
}, [z, o]), V = N((q) => M((te) => {
|
|
930
930
|
const he = new Date(te);
|
|
931
931
|
return he.setMonth(he.getMonth() + q), he;
|
|
932
932
|
}), []);
|
|
@@ -938,23 +938,23 @@ const nl = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], sl = ["January", "
|
|
|
938
938
|
return document.addEventListener("mousedown", q), () => document.removeEventListener("mousedown", q);
|
|
939
939
|
}, [P]);
|
|
940
940
|
const G = T ? il(T, m) : "", F = {
|
|
941
|
-
bg:
|
|
941
|
+
bg: B.BgSurface,
|
|
942
942
|
borderColor: dl[a],
|
|
943
943
|
radius: Se.Md,
|
|
944
944
|
elevation: Ze.Card,
|
|
945
945
|
...cl[n]
|
|
946
|
-
},
|
|
946
|
+
}, X = { bg: B.BrandPrimary, color: B.TextInverse, radius: Se.Sm }, U = { bg: B.BgMuted, radius: Se.Sm }, K = [
|
|
947
947
|
"gloss-preset-datepicker",
|
|
948
948
|
`gloss-preset-datepicker--${a}`,
|
|
949
949
|
`gloss-preset-datepicker--${n}`,
|
|
950
950
|
v && "gloss-preset-datepicker--disabled"
|
|
951
951
|
].filter(Boolean).join(" ");
|
|
952
|
-
return /* @__PURE__ */ d("div", { className:
|
|
952
|
+
return /* @__PURE__ */ d("div", { className: K, ref: g, children: [
|
|
953
953
|
b && /* @__PURE__ */ d("label", { className: "gloss-preset-datepicker__label", htmlFor: I, children: [
|
|
954
954
|
b,
|
|
955
955
|
k && /* @__PURE__ */ e("span", { className: "gloss-preset-datepicker__required", children: "*" })
|
|
956
956
|
] }),
|
|
957
|
-
/* @__PURE__ */ e("input", { ref: t, type: "hidden", id: I, name:
|
|
957
|
+
/* @__PURE__ */ e("input", { ref: t, type: "hidden", id: I, name: w, value: T ? T.toISOString() : "" }),
|
|
958
958
|
/* @__PURE__ */ d("button", { type: "button", className: "gloss-preset-datepicker__trigger", onClick: () => !v && x((q) => !q), disabled: v, "aria-haspopup": "dialog", "aria-expanded": P, children: [
|
|
959
959
|
/* @__PURE__ */ e(ve, { name: "calendar", size: "sm" }),
|
|
960
960
|
/* @__PURE__ */ e("span", { className: `gloss-preset-datepicker__value ${G ? "" : "gloss-preset-datepicker__placeholder"}`, children: G || f }),
|
|
@@ -965,22 +965,22 @@ const nl = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], sl = ["January", "
|
|
|
965
965
|
/* @__PURE__ */ d(Ja, { children: [
|
|
966
966
|
/* @__PURE__ */ e("button", { type: "button", className: "gloss-preset-datepicker__nav-btn", onClick: () => V(-1), "aria-label": "Previous month", children: /* @__PURE__ */ e(ve, { name: "chevron-left", size: "sm" }) }),
|
|
967
967
|
/* @__PURE__ */ d("span", { className: "gloss-preset-datepicker__title", children: [
|
|
968
|
-
sl[
|
|
968
|
+
sl[A.getMonth()],
|
|
969
969
|
" ",
|
|
970
|
-
|
|
970
|
+
A.getFullYear()
|
|
971
971
|
] }),
|
|
972
972
|
/* @__PURE__ */ e("button", { type: "button", className: "gloss-preset-datepicker__nav-btn", onClick: () => V(1), "aria-label": "Next month", children: /* @__PURE__ */ e(ve, { name: "chevron-right", size: "sm" }) })
|
|
973
973
|
] }),
|
|
974
974
|
/* @__PURE__ */ e("div", { className: "gloss-preset-datepicker__day-headers", children: j.map((q) => /* @__PURE__ */ e("span", { className: "gloss-preset-datepicker__day-header", children: q }, q)) }),
|
|
975
|
-
/* @__PURE__ */ e(Qa, { children:
|
|
975
|
+
/* @__PURE__ */ e(Qa, { children: Y.map((q, te) => /* @__PURE__ */ e(
|
|
976
976
|
_s,
|
|
977
977
|
{
|
|
978
|
-
definition: q.isSelected ?
|
|
978
|
+
definition: q.isSelected ? X : q.isToday ? U : void 0,
|
|
979
979
|
selected: q.isSelected,
|
|
980
980
|
today: q.isToday,
|
|
981
981
|
outsideMonth: !q.isCurrentMonth,
|
|
982
982
|
disabled: q.isDisabled,
|
|
983
|
-
onClick: () => !q.isDisabled &&
|
|
983
|
+
onClick: () => !q.isDisabled && R(q.date),
|
|
984
984
|
tabIndex: q.isSelected ? 0 : -1,
|
|
985
985
|
"aria-selected": q.isSelected,
|
|
986
986
|
children: q.date.getDate()
|
|
@@ -1018,9 +1018,9 @@ const Or = (r) => {
|
|
|
1018
1018
|
lg: { padding: J.Lg, cellHeight: "40px" },
|
|
1019
1019
|
xl: { padding: J.Xl, cellHeight: "44px" }
|
|
1020
1020
|
}, fl = {
|
|
1021
|
-
default:
|
|
1022
|
-
error:
|
|
1023
|
-
success:
|
|
1021
|
+
default: B.BorderDefault,
|
|
1022
|
+
error: B.BorderError,
|
|
1023
|
+
success: B.BorderSuccess
|
|
1024
1024
|
}, gl = Z.forwardRef(
|
|
1025
1025
|
(r, t) => {
|
|
1026
1026
|
const {
|
|
@@ -1041,40 +1041,40 @@ const Or = (r) => {
|
|
|
1041
1041
|
clearable: v = !0,
|
|
1042
1042
|
id: h,
|
|
1043
1043
|
name: k
|
|
1044
|
-
} = r, E = Le(),
|
|
1044
|
+
} = r, E = Le(), w = h || E, S = ce(null), [I, g] = H(!1), [P, x] = H(i), D = s !== void 0, C = D ? s : P, z = ee(() => ml(u, p, m), [u, p, m]), T = N((j) => {
|
|
1045
1045
|
D || x(j), o?.(j), g(!1);
|
|
1046
|
-
}, [D, o]),
|
|
1046
|
+
}, [D, o]), A = N((j) => {
|
|
1047
1047
|
j.stopPropagation(), D || x(""), o?.("");
|
|
1048
1048
|
}, [D, o]);
|
|
1049
1049
|
se(() => {
|
|
1050
1050
|
if (!I) return;
|
|
1051
|
-
const j = (
|
|
1052
|
-
|
|
1051
|
+
const j = (R) => {
|
|
1052
|
+
S.current && !S.current.contains(R.target) && g(!1);
|
|
1053
1053
|
};
|
|
1054
1054
|
return document.addEventListener("mousedown", j), () => document.removeEventListener("mousedown", j);
|
|
1055
1055
|
}, [I]);
|
|
1056
|
-
const M =
|
|
1057
|
-
bg:
|
|
1056
|
+
const M = C ? Ea(C, c, l) : "", O = {
|
|
1057
|
+
bg: B.BgSurface,
|
|
1058
1058
|
borderColor: fl[a],
|
|
1059
1059
|
radius: Se.Md,
|
|
1060
1060
|
elevation: Ze.Card,
|
|
1061
1061
|
...pl[n]
|
|
1062
|
-
},
|
|
1062
|
+
}, Y = [
|
|
1063
1063
|
"gloss-preset-timepicker",
|
|
1064
1064
|
`gloss-preset-timepicker--${a}`,
|
|
1065
1065
|
`gloss-preset-timepicker--${n}`,
|
|
1066
1066
|
_ && "gloss-preset-timepicker--disabled"
|
|
1067
1067
|
].filter(Boolean).join(" ");
|
|
1068
|
-
return /* @__PURE__ */ d("div", { className:
|
|
1069
|
-
y && /* @__PURE__ */ e("label", { className: "gloss-preset-timepicker__label", htmlFor:
|
|
1070
|
-
/* @__PURE__ */ e("input", { ref: t, type: "hidden", id:
|
|
1068
|
+
return /* @__PURE__ */ d("div", { className: Y, ref: S, children: [
|
|
1069
|
+
y && /* @__PURE__ */ e("label", { className: "gloss-preset-timepicker__label", htmlFor: w, children: y }),
|
|
1070
|
+
/* @__PURE__ */ e("input", { ref: t, type: "hidden", id: w, name: k, value: C }),
|
|
1071
1071
|
/* @__PURE__ */ d("button", { type: "button", className: "gloss-preset-timepicker__trigger", onClick: () => !_ && g((j) => !j), disabled: _, "aria-haspopup": "listbox", "aria-expanded": I, children: [
|
|
1072
1072
|
/* @__PURE__ */ e(ve, { name: "clock", size: "sm" }),
|
|
1073
1073
|
/* @__PURE__ */ e("span", { className: `gloss-preset-timepicker__value ${M ? "" : "gloss-preset-timepicker__placeholder"}`, children: M || f }),
|
|
1074
|
-
v &&
|
|
1074
|
+
v && C && /* @__PURE__ */ e("span", { className: "gloss-preset-timepicker__clear", onClick: A, role: "button", tabIndex: -1, children: /* @__PURE__ */ e(ve, { name: "x", size: "sm" }) }),
|
|
1075
1075
|
/* @__PURE__ */ e(ve, { name: "chevron-down", size: "sm" })
|
|
1076
1076
|
] }),
|
|
1077
|
-
I && /* @__PURE__ */ e(xs, { definition: O, children: /* @__PURE__ */ e(Ns, { children:
|
|
1077
|
+
I && /* @__PURE__ */ e(xs, { definition: O, children: /* @__PURE__ */ e(Ns, { children: z.map((j) => /* @__PURE__ */ e(Ss, { selected: j === C, onClick: () => T(j), children: Ea(j, c, l) }, j)) }) }),
|
|
1078
1078
|
b && /* @__PURE__ */ e("div", { className: `gloss-preset-timepicker__helper ${a === "error" ? "gloss-preset-timepicker__helper--error" : ""}`, children: b })
|
|
1079
1079
|
] });
|
|
1080
1080
|
}
|
|
@@ -1085,15 +1085,15 @@ const hl = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], bl = ["January", "
|
|
|
1085
1085
|
return t.replace("DD", String(a).padStart(2, "0")).replace("D", String(a)).replace("MM", String(n).padStart(2, "0")).replace("M", String(n)).replace("YYYY", String(s)).replace("YY", String(s).slice(-2));
|
|
1086
1086
|
}, Pa = (r, t, a, n, s, i) => {
|
|
1087
1087
|
const o = [], c = /* @__PURE__ */ new Date(), l = Ma(r, t), p = (yl(r, t) - n + 7) % 7, m = t === 0 ? 11 : t - 1, f = t === 0 ? r - 1 : r, y = Ma(f, m), b = (h, k) => {
|
|
1088
|
-
const E = a.start ? Tr(h, a.start) : !1,
|
|
1088
|
+
const E = a.start ? Tr(h, a.start) : !1, w = a.end ? Tr(h, a.end) : !1;
|
|
1089
1089
|
return {
|
|
1090
1090
|
date: h,
|
|
1091
1091
|
isCurrentMonth: k,
|
|
1092
1092
|
isToday: Tr(h, c),
|
|
1093
|
-
isSelected: E ||
|
|
1093
|
+
isSelected: E || w,
|
|
1094
1094
|
isDisabled: !!(s && h < s || i && h > i),
|
|
1095
1095
|
isRangeStart: E,
|
|
1096
|
-
isRangeEnd:
|
|
1096
|
+
isRangeEnd: w,
|
|
1097
1097
|
inRange: a.start && a.end ? h > a.start && h < a.end : !1
|
|
1098
1098
|
};
|
|
1099
1099
|
};
|
|
@@ -1129,11 +1129,11 @@ const hl = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], bl = ["January", "
|
|
|
1129
1129
|
disabled: h = !1,
|
|
1130
1130
|
clearable: k = !0,
|
|
1131
1131
|
id: E,
|
|
1132
|
-
name:
|
|
1133
|
-
} = r,
|
|
1132
|
+
name: w
|
|
1133
|
+
} = r, S = Le(), I = E || S, g = ce(null), [P, x] = H(!1), [D, C] = H(i), [z, T] = H(!1), A = s !== void 0, M = A ? s : D, [O, Y] = H(() => M.start || /* @__PURE__ */ new Date()), j = ee(() => {
|
|
1134
1134
|
const oe = new Date(O);
|
|
1135
1135
|
return oe.setMonth(oe.getMonth() + 1), oe;
|
|
1136
|
-
}, [O]),
|
|
1136
|
+
}, [O]), R = gn({ enabled: P, onEscape: () => x(!1) }), W = ee(() => Pa(O.getFullYear(), O.getMonth(), M, b, c, l), [O, M, b, c, l]), V = ee(() => Pa(j.getFullYear(), j.getMonth(), M, b, c, l), [j, M, b, c, l]), G = ee(() => {
|
|
1137
1137
|
const oe = [...hl];
|
|
1138
1138
|
if (b > 0) {
|
|
1139
1139
|
const be = oe.splice(0, b);
|
|
@@ -1142,18 +1142,18 @@ const hl = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], bl = ["January", "
|
|
|
1142
1142
|
return oe;
|
|
1143
1143
|
}, [b]), F = N((oe) => {
|
|
1144
1144
|
let be;
|
|
1145
|
-
if (!
|
|
1145
|
+
if (!z || !M.start)
|
|
1146
1146
|
be = { start: oe, end: null }, T(!0);
|
|
1147
1147
|
else {
|
|
1148
1148
|
if (be = oe < M.start ? { start: oe, end: M.start } : { start: M.start, end: oe }, u && be.start && be.end && Math.ceil(Math.abs(be.end.getTime() - be.start.getTime()) / 864e5) > u) return;
|
|
1149
1149
|
T(!1), x(!1);
|
|
1150
1150
|
}
|
|
1151
|
-
|
|
1152
|
-
}, [
|
|
1151
|
+
A || C(be), o?.(be);
|
|
1152
|
+
}, [z, M, u, A, o]), X = N((oe) => {
|
|
1153
1153
|
oe.stopPropagation();
|
|
1154
1154
|
const be = { start: null, end: null };
|
|
1155
|
-
|
|
1156
|
-
}, [
|
|
1155
|
+
A || C(be), o?.(be), T(!1);
|
|
1156
|
+
}, [A, o]), U = N((oe) => Y((be) => {
|
|
1157
1157
|
const de = new Date(be);
|
|
1158
1158
|
return de.setMonth(de.getMonth() + oe), de;
|
|
1159
1159
|
}), []);
|
|
@@ -1164,9 +1164,9 @@ const hl = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], bl = ["January", "
|
|
|
1164
1164
|
};
|
|
1165
1165
|
return document.addEventListener("mousedown", oe), () => document.removeEventListener("mousedown", oe);
|
|
1166
1166
|
}, [P]);
|
|
1167
|
-
const
|
|
1168
|
-
bg:
|
|
1169
|
-
borderColor: a === "error" ?
|
|
1167
|
+
const K = ee(() => !M.start && !M.end ? "" : M.start && !M.end ? `${Er(M.start, f)} - ...` : M.start && M.end ? `${Er(M.start, f)} - ${Er(M.end, f)}` : "", [M, f]), q = {
|
|
1168
|
+
bg: B.BgSurface,
|
|
1169
|
+
borderColor: a === "error" ? B.BorderError : a === "success" ? B.BorderSuccess : B.BorderDefault,
|
|
1170
1170
|
radius: Se.Md,
|
|
1171
1171
|
elevation: Ze.Card,
|
|
1172
1172
|
...vl[n]
|
|
@@ -1177,30 +1177,30 @@ const hl = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], bl = ["January", "
|
|
|
1177
1177
|
h && "gloss-preset-daterangepicker--disabled"
|
|
1178
1178
|
].filter(Boolean).join(" "), he = (oe, be, de) => /* @__PURE__ */ d("div", { className: "gloss-preset-daterangepicker__month", children: [
|
|
1179
1179
|
/* @__PURE__ */ d(Ja, { children: [
|
|
1180
|
-
de === "left" && /* @__PURE__ */ e("button", { type: "button", className: "gloss-preset-daterangepicker__nav-btn", onClick: () =>
|
|
1180
|
+
de === "left" && /* @__PURE__ */ e("button", { type: "button", className: "gloss-preset-daterangepicker__nav-btn", onClick: () => U(-1), "aria-label": "Previous month", children: /* @__PURE__ */ e(ve, { name: "chevron-left", size: "sm" }) }),
|
|
1181
1181
|
/* @__PURE__ */ d("span", { className: "gloss-preset-daterangepicker__month-title", children: [
|
|
1182
1182
|
bl[oe.getMonth()],
|
|
1183
1183
|
" ",
|
|
1184
1184
|
oe.getFullYear()
|
|
1185
1185
|
] }),
|
|
1186
|
-
de === "right" && /* @__PURE__ */ e("button", { type: "button", className: "gloss-preset-daterangepicker__nav-btn", onClick: () =>
|
|
1186
|
+
de === "right" && /* @__PURE__ */ e("button", { type: "button", className: "gloss-preset-daterangepicker__nav-btn", onClick: () => U(1), "aria-label": "Next month", children: /* @__PURE__ */ e(ve, { name: "chevron-right", size: "sm" }) })
|
|
1187
1187
|
] }),
|
|
1188
1188
|
/* @__PURE__ */ e("div", { className: "gloss-preset-daterangepicker__day-headers", children: G.map((ie) => /* @__PURE__ */ e("span", { className: "gloss-preset-daterangepicker__day-header", children: ie }, ie)) }),
|
|
1189
1189
|
/* @__PURE__ */ e(Qa, { children: be.map((ie, fe) => /* @__PURE__ */ e(ws, { selected: ie.isSelected, today: ie.isToday, outsideMonth: !ie.isCurrentMonth, disabled: ie.isDisabled, rangeStart: ie.isRangeStart, rangeEnd: ie.isRangeEnd, inRange: ie.inRange, onClick: () => !ie.isDisabled && F(ie.date), children: ie.date.getDate() }, fe)) })
|
|
1190
1190
|
] });
|
|
1191
1191
|
return /* @__PURE__ */ d("div", { className: te, ref: g, children: [
|
|
1192
1192
|
_ && /* @__PURE__ */ e("label", { className: "gloss-preset-daterangepicker__label", htmlFor: I, children: _ }),
|
|
1193
|
-
/* @__PURE__ */ e("input", { ref: t, type: "hidden", id: I, name:
|
|
1194
|
-
/* @__PURE__ */ e("input", { type: "hidden", name:
|
|
1193
|
+
/* @__PURE__ */ e("input", { ref: t, type: "hidden", id: I, name: w ? `${w}[start]` : void 0, value: M.start ? M.start.toISOString() : "" }),
|
|
1194
|
+
/* @__PURE__ */ e("input", { type: "hidden", name: w ? `${w}[end]` : void 0, value: M.end ? M.end.toISOString() : "" }),
|
|
1195
1195
|
/* @__PURE__ */ d("button", { type: "button", className: "gloss-preset-daterangepicker__trigger", onClick: () => !h && x((oe) => !oe), disabled: h, "aria-haspopup": "dialog", "aria-expanded": P, children: [
|
|
1196
1196
|
/* @__PURE__ */ e(ve, { name: "calendar", size: "sm" }),
|
|
1197
|
-
/* @__PURE__ */ e("span", { className: `gloss-preset-daterangepicker__value ${
|
|
1198
|
-
k && (M.start || M.end) && /* @__PURE__ */ e("span", { className: "gloss-preset-daterangepicker__clear", onClick:
|
|
1197
|
+
/* @__PURE__ */ e("span", { className: `gloss-preset-daterangepicker__value ${K ? "" : "gloss-preset-daterangepicker__placeholder"}`, children: K || y }),
|
|
1198
|
+
k && (M.start || M.end) && /* @__PURE__ */ e("span", { className: "gloss-preset-daterangepicker__clear", onClick: X, role: "button", tabIndex: -1, children: /* @__PURE__ */ e(ve, { name: "x", size: "sm" }) }),
|
|
1199
1199
|
/* @__PURE__ */ e(ve, { name: "chevron-down", size: "sm" })
|
|
1200
1200
|
] }),
|
|
1201
|
-
P && /* @__PURE__ */ d("div", { ref:
|
|
1201
|
+
P && /* @__PURE__ */ d("div", { ref: R, className: "gloss-preset-daterangepicker__dropdown", role: "dialog", "aria-label": "Choose date range", children: [
|
|
1202
1202
|
m && p.length > 0 && /* @__PURE__ */ e("div", { className: "gloss-preset-daterangepicker__presets", children: p.map((oe) => /* @__PURE__ */ e("button", { type: "button", className: "gloss-preset-daterangepicker__preset", onClick: () => {
|
|
1203
|
-
|
|
1203
|
+
A || C(oe.range), o?.(oe.range), x(!1);
|
|
1204
1204
|
}, children: oe.label }, oe.label)) }),
|
|
1205
1205
|
/* @__PURE__ */ d(Cs, { definition: q, children: [
|
|
1206
1206
|
he(O, W, "left"),
|
|
@@ -1242,29 +1242,29 @@ const _l = () => Math.random().toString(36).slice(2, 11), Ra = (r) => {
|
|
|
1242
1242
|
onError: v,
|
|
1243
1243
|
id: h,
|
|
1244
1244
|
name: k
|
|
1245
|
-
} = r, E = Le(),
|
|
1246
|
-
D || g(
|
|
1247
|
-
}, [D, i]), T = N((
|
|
1248
|
-
if (l &&
|
|
1245
|
+
} = r, E = Le(), w = h || E, S = ce(null), [I, g] = H([]), [P, x] = H(!1), D = s !== void 0, C = D ? s : I, z = N((R) => {
|
|
1246
|
+
D || g(R), i?.(R);
|
|
1247
|
+
}, [D, i]), T = N((R) => {
|
|
1248
|
+
if (l && R.size > l) return `File size exceeds ${Ra(l)}`;
|
|
1249
1249
|
if (o) {
|
|
1250
|
-
const W = o.split(",").map((F) => F.trim()), V = `.${
|
|
1251
|
-
if (!W.some((F) => F.startsWith(".") ? V === F.toLowerCase() : F.endsWith("/*") ?
|
|
1250
|
+
const W = o.split(",").map((F) => F.trim()), V = `.${R.name.split(".").pop()?.toLowerCase()}`;
|
|
1251
|
+
if (!W.some((F) => F.startsWith(".") ? V === F.toLowerCase() : F.endsWith("/*") ? R.type.startsWith(F.replace("/*", "/")) : R.type === F)) return "File type not accepted";
|
|
1252
1252
|
}
|
|
1253
1253
|
return null;
|
|
1254
|
-
}, [l, o]),
|
|
1255
|
-
const W = c ? c -
|
|
1256
|
-
Array.from(
|
|
1257
|
-
const F = T(G),
|
|
1258
|
-
V.push({ file: G, id: _l(), error: F || void 0, preview:
|
|
1259
|
-
}),
|
|
1260
|
-
}, [
|
|
1261
|
-
const W =
|
|
1262
|
-
W?.preview && URL.revokeObjectURL(W.preview),
|
|
1263
|
-
}, [
|
|
1264
|
-
|
|
1265
|
-
}, [p,
|
|
1266
|
-
bg:
|
|
1267
|
-
borderColor: a === "error" ?
|
|
1254
|
+
}, [l, o]), A = N((R) => {
|
|
1255
|
+
const W = c ? c - C.length : 1 / 0, V = [];
|
|
1256
|
+
Array.from(R).slice(0, W).forEach((G) => {
|
|
1257
|
+
const F = T(G), X = G.type.startsWith("image/") ? URL.createObjectURL(G) : void 0;
|
|
1258
|
+
V.push({ file: G, id: _l(), error: F || void 0, preview: X }), F && v?.(F);
|
|
1259
|
+
}), R.length > W && W >= 0 && v?.(`Maximum ${c} files allowed`), z([...C, ...V]);
|
|
1260
|
+
}, [C, c, T, z, v]), M = N((R) => {
|
|
1261
|
+
const W = C.find((V) => V.id === R);
|
|
1262
|
+
W?.preview && URL.revokeObjectURL(W.preview), z(C.filter((V) => V.id !== R)), f?.(R);
|
|
1263
|
+
}, [C, z, f]), O = N((R) => {
|
|
1264
|
+
R.preventDefault(), R.stopPropagation(), x(!1), !p && R.dataTransfer.files.length > 0 && A(R.dataTransfer.files);
|
|
1265
|
+
}, [p, A]), Y = {
|
|
1266
|
+
bg: B.BgMuted,
|
|
1267
|
+
borderColor: a === "error" ? B.BorderError : B.BorderDefault,
|
|
1268
1268
|
borderStyle: "dashed",
|
|
1269
1269
|
radius: Se.Md,
|
|
1270
1270
|
...xl[n]
|
|
@@ -1275,20 +1275,20 @@ const _l = () => Math.random().toString(36).slice(2, 11), Ra = (r) => {
|
|
|
1275
1275
|
p && "gloss-preset-fileupload--disabled"
|
|
1276
1276
|
].filter(Boolean).join(" ");
|
|
1277
1277
|
return /* @__PURE__ */ d("div", { className: j, children: [
|
|
1278
|
-
b && /* @__PURE__ */ e("label", { className: "gloss-preset-fileupload__label", htmlFor:
|
|
1278
|
+
b && /* @__PURE__ */ e("label", { className: "gloss-preset-fileupload__label", htmlFor: w, children: b }),
|
|
1279
1279
|
/* @__PURE__ */ e(
|
|
1280
1280
|
"input",
|
|
1281
1281
|
{
|
|
1282
|
-
ref: (
|
|
1283
|
-
|
|
1282
|
+
ref: (R) => {
|
|
1283
|
+
S.current = R, typeof t == "function" ? t(R) : t && (t.current = R);
|
|
1284
1284
|
},
|
|
1285
|
-
id:
|
|
1285
|
+
id: w,
|
|
1286
1286
|
name: k,
|
|
1287
1287
|
type: "file",
|
|
1288
1288
|
accept: o,
|
|
1289
1289
|
multiple: u,
|
|
1290
|
-
onChange: (
|
|
1291
|
-
|
|
1290
|
+
onChange: (R) => {
|
|
1291
|
+
R.target.files?.length && (A(R.target.files), R.target.value = "");
|
|
1292
1292
|
},
|
|
1293
1293
|
disabled: p,
|
|
1294
1294
|
className: "gloss-preset-fileupload__input"
|
|
@@ -1297,20 +1297,20 @@ const _l = () => Math.random().toString(36).slice(2, 11), Ra = (r) => {
|
|
|
1297
1297
|
/* @__PURE__ */ d(
|
|
1298
1298
|
ks,
|
|
1299
1299
|
{
|
|
1300
|
-
definition:
|
|
1300
|
+
definition: Y,
|
|
1301
1301
|
dragging: P,
|
|
1302
1302
|
disabled: p,
|
|
1303
|
-
onClick: () => !p &&
|
|
1304
|
-
onDragOver: (
|
|
1305
|
-
|
|
1303
|
+
onClick: () => !p && S.current?.click(),
|
|
1304
|
+
onDragOver: (R) => {
|
|
1305
|
+
R.preventDefault(), R.stopPropagation(), x(!0);
|
|
1306
1306
|
},
|
|
1307
|
-
onDragLeave: (
|
|
1308
|
-
|
|
1307
|
+
onDragLeave: (R) => {
|
|
1308
|
+
R.preventDefault(), R.stopPropagation(), x(!1);
|
|
1309
1309
|
},
|
|
1310
1310
|
onDrop: O,
|
|
1311
1311
|
role: "button",
|
|
1312
1312
|
tabIndex: p ? -1 : 0,
|
|
1313
|
-
onKeyDown: (
|
|
1313
|
+
onKeyDown: (R) => R.key === "Enter" && !p && S.current?.click(),
|
|
1314
1314
|
children: [
|
|
1315
1315
|
/* @__PURE__ */ e(ve, { name: "upload-cloud", size: "lg" }),
|
|
1316
1316
|
/* @__PURE__ */ e("span", { className: "gloss-preset-fileupload__text", children: y }),
|
|
@@ -1321,15 +1321,15 @@ const _l = () => Math.random().toString(36).slice(2, 11), Ra = (r) => {
|
|
|
1321
1321
|
]
|
|
1322
1322
|
}
|
|
1323
1323
|
),
|
|
1324
|
-
|
|
1325
|
-
m &&
|
|
1324
|
+
C.length > 0 && /* @__PURE__ */ e(Ds, { children: C.map((R) => /* @__PURE__ */ d(Is, { error: !!R.error, children: [
|
|
1325
|
+
m && R.preview ? /* @__PURE__ */ e("img", { src: R.preview, alt: R.file.name, className: "gloss-preset-fileupload__preview" }) : /* @__PURE__ */ e(ve, { name: "file", size: "md" }),
|
|
1326
1326
|
/* @__PURE__ */ d("div", { className: "gloss-preset-fileupload__file-info", children: [
|
|
1327
|
-
/* @__PURE__ */ e("span", { className: "gloss-preset-fileupload__file-name", children:
|
|
1328
|
-
/* @__PURE__ */ e("span", { className: "gloss-preset-fileupload__file-size", children: Ra(
|
|
1329
|
-
|
|
1327
|
+
/* @__PURE__ */ e("span", { className: "gloss-preset-fileupload__file-name", children: R.file.name }),
|
|
1328
|
+
/* @__PURE__ */ e("span", { className: "gloss-preset-fileupload__file-size", children: Ra(R.file.size) }),
|
|
1329
|
+
R.error && /* @__PURE__ */ e("span", { className: "gloss-preset-fileupload__file-error", children: R.error })
|
|
1330
1330
|
] }),
|
|
1331
|
-
/* @__PURE__ */ e("button", { type: "button", className: "gloss-preset-fileupload__remove", onClick: () => M(
|
|
1332
|
-
] },
|
|
1331
|
+
/* @__PURE__ */ e("button", { type: "button", className: "gloss-preset-fileupload__remove", onClick: () => M(R.id), "aria-label": `Remove ${R.file.name}`, children: /* @__PURE__ */ e(ve, { name: "x", size: "sm" }) })
|
|
1332
|
+
] }, R.id)) }),
|
|
1333
1333
|
_ && /* @__PURE__ */ e("div", { className: `gloss-preset-fileupload__helper ${a === "error" ? "gloss-preset-fileupload__helper--error" : ""}`, children: _ })
|
|
1334
1334
|
] });
|
|
1335
1335
|
}
|
|
@@ -1397,29 +1397,29 @@ const Nl = [
|
|
|
1397
1397
|
helperText: m,
|
|
1398
1398
|
id: f,
|
|
1399
1399
|
name: y
|
|
1400
|
-
} = r, b = Le(), _ = f || b, v = ce(null), [h, k] = H(!1), [E,
|
|
1401
|
-
const
|
|
1402
|
-
|
|
1403
|
-
}, [o,
|
|
1404
|
-
const M = ir(
|
|
1400
|
+
} = r, b = Le(), _ = f || b, v = ce(null), [h, k] = H(!1), [E, w] = H(s), S = n !== void 0, I = S ? n : E, g = ir(I) || { r: 59, g: 130, b: 246 }, P = N((A, M, O) => {
|
|
1401
|
+
const Y = Ba(A, M, O, o);
|
|
1402
|
+
S || w(Y), i?.(Y);
|
|
1403
|
+
}, [o, S, i]), x = N((A) => {
|
|
1404
|
+
const M = ir(A);
|
|
1405
1405
|
M && P(M.r, M.g, M.b);
|
|
1406
|
-
}, [P]), D = N((
|
|
1407
|
-
const M = ir(
|
|
1406
|
+
}, [P]), D = N((A) => {
|
|
1407
|
+
const M = ir(A.target.value);
|
|
1408
1408
|
M && P(M.r, M.g, M.b);
|
|
1409
|
-
}, [P]),
|
|
1410
|
-
const M =
|
|
1411
|
-
|
|
1409
|
+
}, [P]), C = N((A) => {
|
|
1410
|
+
const M = A.target.value;
|
|
1411
|
+
S || w(M);
|
|
1412
1412
|
const O = ir(M);
|
|
1413
1413
|
O && i?.(Ba(O.r, O.g, O.b, o));
|
|
1414
|
-
}, [o,
|
|
1414
|
+
}, [o, S, i]);
|
|
1415
1415
|
se(() => {
|
|
1416
1416
|
if (!h) return;
|
|
1417
|
-
const
|
|
1417
|
+
const A = (M) => {
|
|
1418
1418
|
v.current && !v.current.contains(M.target) && k(!1);
|
|
1419
1419
|
};
|
|
1420
|
-
return document.addEventListener("mousedown",
|
|
1420
|
+
return document.addEventListener("mousedown", A), () => document.removeEventListener("mousedown", A);
|
|
1421
1421
|
}, [h]);
|
|
1422
|
-
const
|
|
1422
|
+
const z = {
|
|
1423
1423
|
radius: Se.Md,
|
|
1424
1424
|
elevation: Ze.Card,
|
|
1425
1425
|
...Cl[a]
|
|
@@ -1431,15 +1431,15 @@ const Nl = [
|
|
|
1431
1431
|
return /* @__PURE__ */ d("div", { className: T, ref: v, children: [
|
|
1432
1432
|
p && /* @__PURE__ */ e("label", { className: "gloss-preset-colorpicker__label", htmlFor: _, children: p }),
|
|
1433
1433
|
/* @__PURE__ */ e("input", { ref: t, type: "hidden", id: _, name: y, value: I }),
|
|
1434
|
-
/* @__PURE__ */ d("button", { type: "button", className: "gloss-preset-colorpicker__trigger", onClick: () => !u && k((
|
|
1434
|
+
/* @__PURE__ */ d("button", { type: "button", className: "gloss-preset-colorpicker__trigger", onClick: () => !u && k((A) => !A), disabled: u, "aria-haspopup": "dialog", "aria-expanded": h, children: [
|
|
1435
1435
|
/* @__PURE__ */ e(Ts, { style: { backgroundColor: I } }),
|
|
1436
1436
|
/* @__PURE__ */ e("span", { className: "gloss-preset-colorpicker__value", children: I }),
|
|
1437
1437
|
/* @__PURE__ */ e(ve, { name: "chevron-down", size: "sm" })
|
|
1438
1438
|
] }),
|
|
1439
|
-
h && /* @__PURE__ */ e("div", { className: "gloss-preset-colorpicker__dropdown", children: /* @__PURE__ */ d(Es, { definition:
|
|
1439
|
+
h && /* @__PURE__ */ e("div", { className: "gloss-preset-colorpicker__dropdown", children: /* @__PURE__ */ d(Es, { definition: z, disabled: u, children: [
|
|
1440
1440
|
/* @__PURE__ */ e(Ms, { children: /* @__PURE__ */ e("input", { type: "color", value: yn(g.r, g.g, g.b), onChange: D, className: "gloss-preset-colorpicker__native", disabled: u }) }),
|
|
1441
|
-
l.length > 0 && /* @__PURE__ */ e("div", { className: "gloss-preset-colorpicker__swatches", children: l.map((
|
|
1442
|
-
/* @__PURE__ */ e("div", { className: "gloss-preset-colorpicker__input-row", children: /* @__PURE__ */ e("input", { type: "text", value: I, onChange:
|
|
1441
|
+
l.length > 0 && /* @__PURE__ */ e("div", { className: "gloss-preset-colorpicker__swatches", children: l.map((A) => /* @__PURE__ */ e("button", { type: "button", className: `gloss-preset-colorpicker__swatch-btn ${I.toLowerCase() === A.toLowerCase() ? "gloss-preset-colorpicker__swatch-btn--selected" : ""}`, style: { backgroundColor: A }, onClick: () => x(A), "aria-label": `Select ${A}` }, A)) }),
|
|
1442
|
+
/* @__PURE__ */ e("div", { className: "gloss-preset-colorpicker__input-row", children: /* @__PURE__ */ e("input", { type: "text", value: I, onChange: C, className: "gloss-preset-colorpicker__text-input", disabled: u, placeholder: "#000000" }) })
|
|
1443
1443
|
] }) }),
|
|
1444
1444
|
m && /* @__PURE__ */ e("div", { className: "gloss-preset-colorpicker__helper", children: m })
|
|
1445
1445
|
] });
|
|
@@ -1454,7 +1454,7 @@ const kl = {
|
|
|
1454
1454
|
xl: { starSize: "34px", gap: J.Xs }
|
|
1455
1455
|
}, Dl = {
|
|
1456
1456
|
activeColor: "#f59e0b",
|
|
1457
|
-
inactiveColor:
|
|
1457
|
+
inactiveColor: B.Gray300,
|
|
1458
1458
|
hoverColor: "#fbbf24"
|
|
1459
1459
|
}, Il = Z.forwardRef(
|
|
1460
1460
|
({ size: r = "md", readOnly: t, disabled: a, children: n, ...s }, i) => {
|
|
@@ -1550,12 +1550,12 @@ const El = Z.forwardRef(
|
|
|
1550
1550
|
El.displayName = "SplitButton";
|
|
1551
1551
|
const Ml = {
|
|
1552
1552
|
default: {
|
|
1553
|
-
bg:
|
|
1554
|
-
color:
|
|
1553
|
+
bg: B.Gray900,
|
|
1554
|
+
color: B.TextInverse
|
|
1555
1555
|
},
|
|
1556
1556
|
rich: {
|
|
1557
|
-
bg:
|
|
1558
|
-
color:
|
|
1557
|
+
bg: B.BgSurface,
|
|
1558
|
+
color: B.TextPrimary
|
|
1559
1559
|
}
|
|
1560
1560
|
}, Pl = {
|
|
1561
1561
|
sm: { padding: J.Xs, fontSize: "0.6875rem", maxWidth: "180px" },
|
|
@@ -1591,9 +1591,9 @@ function Bl(r) {
|
|
|
1591
1591
|
}
|
|
1592
1592
|
Bl.displayName = "PresetTooltip";
|
|
1593
1593
|
const Al = {
|
|
1594
|
-
default: { borderColor:
|
|
1595
|
-
error: { borderColor:
|
|
1596
|
-
success: { borderColor:
|
|
1594
|
+
default: { borderColor: B.BorderDefault },
|
|
1595
|
+
error: { borderColor: B.BorderError },
|
|
1596
|
+
success: { borderColor: B.BorderSuccess }
|
|
1597
1597
|
}, zl = {
|
|
1598
1598
|
xs: { padding: J.Xs, paddingX: J.Sm, fontSize: "0.75rem", minHeight: "28px" },
|
|
1599
1599
|
sm: { padding: J.Xs, paddingX: J.Sm, fontSize: "0.8125rem", minHeight: "32px" },
|
|
@@ -1601,10 +1601,10 @@ const Al = {
|
|
|
1601
1601
|
lg: { padding: J.Sm, paddingX: J.Md, fontSize: "0.9375rem", minHeight: "42px" },
|
|
1602
1602
|
xl: { padding: J.Md, paddingX: J.Lg, fontSize: "1rem", minHeight: "48px" }
|
|
1603
1603
|
}, $l = {
|
|
1604
|
-
bg:
|
|
1605
|
-
color:
|
|
1604
|
+
bg: B.BgSurface,
|
|
1605
|
+
color: B.TextPrimary,
|
|
1606
1606
|
radius: Se.Md,
|
|
1607
|
-
placeholderColor:
|
|
1607
|
+
placeholderColor: B.TextTertiary
|
|
1608
1608
|
}, Me = Z.forwardRef(
|
|
1609
1609
|
(r, t) => {
|
|
1610
1610
|
const {
|
|
@@ -1631,7 +1631,7 @@ const Al = {
|
|
|
1631
1631
|
"gloss-preset-input",
|
|
1632
1632
|
`gloss-preset-input--${v}`,
|
|
1633
1633
|
`gloss-preset-input--${n}`
|
|
1634
|
-
].filter(Boolean).join(" "), E = c && !!b.value,
|
|
1634
|
+
].filter(Boolean).join(" "), E = c && !!b.value, w = typeof b.value == "string" ? b.value.length : 0, S = b.maxLength, I = m && S != null, g = /* @__PURE__ */ e(
|
|
1635
1635
|
Bs,
|
|
1636
1636
|
{
|
|
1637
1637
|
ref: t,
|
|
@@ -1644,7 +1644,7 @@ const Al = {
|
|
|
1644
1644
|
}
|
|
1645
1645
|
);
|
|
1646
1646
|
if (!E && !f && !y && !I) return g;
|
|
1647
|
-
const P =
|
|
1647
|
+
const P = S ? w / S : 0, x = P >= 1 ? "over" : P >= 0.8 ? "warn" : "ok";
|
|
1648
1648
|
return /* @__PURE__ */ d("div", { className: "gloss-preset-input__field-wrapper", children: [
|
|
1649
1649
|
f && /* @__PURE__ */ e("span", { className: "gloss-preset-input__icon gloss-preset-input__icon--left", children: f }),
|
|
1650
1650
|
g,
|
|
@@ -1664,18 +1664,18 @@ const Al = {
|
|
|
1664
1664
|
),
|
|
1665
1665
|
y && !E && /* @__PURE__ */ e("span", { className: "gloss-preset-input__icon gloss-preset-input__icon--right", children: y }),
|
|
1666
1666
|
I && /* @__PURE__ */ d("span", { className: `gloss-preset-input__counter gloss-preset-input__counter--${x}`, children: [
|
|
1667
|
-
|
|
1667
|
+
w,
|
|
1668
1668
|
"/",
|
|
1669
|
-
|
|
1669
|
+
S
|
|
1670
1670
|
] })
|
|
1671
1671
|
] });
|
|
1672
1672
|
}
|
|
1673
1673
|
);
|
|
1674
1674
|
Me.displayName = "PresetInput";
|
|
1675
1675
|
const Fl = {
|
|
1676
|
-
default: { borderColor:
|
|
1677
|
-
error: { borderColor:
|
|
1678
|
-
success: { borderColor:
|
|
1676
|
+
default: { borderColor: B.BorderDefault },
|
|
1677
|
+
error: { borderColor: B.BorderError },
|
|
1678
|
+
success: { borderColor: B.BorderSuccess }
|
|
1679
1679
|
}, Ol = {
|
|
1680
1680
|
xs: { padding: J.Xs, paddingX: J.Sm, fontSize: "0.75rem", minHeight: "60px" },
|
|
1681
1681
|
sm: { padding: J.Xs, paddingX: J.Sm, fontSize: "0.8125rem", minHeight: "72px" },
|
|
@@ -1683,10 +1683,10 @@ const Fl = {
|
|
|
1683
1683
|
lg: { padding: J.Sm, paddingX: J.Md, fontSize: "0.9375rem", minHeight: "96px" },
|
|
1684
1684
|
xl: { padding: J.Md, paddingX: J.Lg, fontSize: "1rem", minHeight: "108px" }
|
|
1685
1685
|
}, Ll = {
|
|
1686
|
-
bg:
|
|
1687
|
-
color:
|
|
1686
|
+
bg: B.BgSurface,
|
|
1687
|
+
color: B.TextPrimary,
|
|
1688
1688
|
radius: Se.Md,
|
|
1689
|
-
placeholderColor:
|
|
1689
|
+
placeholderColor: B.TextTertiary,
|
|
1690
1690
|
resize: "vertical"
|
|
1691
1691
|
}, vn = Z.forwardRef(
|
|
1692
1692
|
(r, t) => {
|
|
@@ -1717,20 +1717,20 @@ const Fl = {
|
|
|
1717
1717
|
"gloss-preset-textarea",
|
|
1718
1718
|
`gloss-preset-textarea--${v}`,
|
|
1719
1719
|
`gloss-preset-textarea--${n}`
|
|
1720
|
-
].filter(Boolean).join(" "), E = ce(null),
|
|
1720
|
+
].filter(Boolean).join(" "), E = ce(null), w = N((g) => {
|
|
1721
1721
|
if (!g || !p) return;
|
|
1722
1722
|
g.style.height = "auto";
|
|
1723
|
-
const P = getComputedStyle(g), x = parseFloat(P.lineHeight) || parseFloat(P.fontSize) * 1.2, D = parseFloat(P.paddingTop) || 0,
|
|
1724
|
-
g.style.height = `${
|
|
1725
|
-
}, [p, m, f]),
|
|
1726
|
-
E.current = g, typeof t == "function" ? t(g) : t && (t.current = g),
|
|
1727
|
-
}, [t,
|
|
1723
|
+
const P = getComputedStyle(g), x = parseFloat(P.lineHeight) || parseFloat(P.fontSize) * 1.2, D = parseFloat(P.paddingTop) || 0, C = parseFloat(P.paddingBottom) || 0, z = parseFloat(P.borderTopWidth) || 0, T = parseFloat(P.borderBottomWidth) || 0, A = D + C + z + T, M = m ? x * m + A : 0, O = f ? x * f + A : 1 / 0, Y = Math.min(Math.max(g.scrollHeight, M), O);
|
|
1724
|
+
g.style.height = `${Y}px`;
|
|
1725
|
+
}, [p, m, f]), S = N((g) => {
|
|
1726
|
+
E.current = g, typeof t == "function" ? t(g) : t && (t.current = g), w(g);
|
|
1727
|
+
}, [t, w]), I = _.onChange;
|
|
1728
1728
|
return p && (_.onChange = (g) => {
|
|
1729
|
-
I?.(g),
|
|
1729
|
+
I?.(g), w(g.target);
|
|
1730
1730
|
}), /* @__PURE__ */ e(
|
|
1731
1731
|
As,
|
|
1732
1732
|
{
|
|
1733
|
-
ref:
|
|
1733
|
+
ref: S,
|
|
1734
1734
|
definition: h,
|
|
1735
1735
|
className: k,
|
|
1736
1736
|
label: s,
|
|
@@ -1750,9 +1750,9 @@ const Hl = {
|
|
|
1750
1750
|
lg: { padding: J.Lg, fontSize: "1rem", minHeight: "40px" },
|
|
1751
1751
|
xl: { padding: J.Xl, fontSize: "1.125rem", minHeight: "44px" }
|
|
1752
1752
|
}, Wl = {
|
|
1753
|
-
default:
|
|
1754
|
-
error:
|
|
1755
|
-
success:
|
|
1753
|
+
default: B.BorderDefault,
|
|
1754
|
+
error: B.BorderError,
|
|
1755
|
+
success: B.BorderSuccess
|
|
1756
1756
|
}, Gl = Z.forwardRef(
|
|
1757
1757
|
(r, t) => {
|
|
1758
1758
|
const {
|
|
@@ -1772,54 +1772,54 @@ const Hl = {
|
|
|
1772
1772
|
placeholder: _,
|
|
1773
1773
|
showStepper: v = !0,
|
|
1774
1774
|
formatValue: h
|
|
1775
|
-
} = r, [k, E] = H(i),
|
|
1775
|
+
} = r, [k, E] = H(i), w = s !== void 0, S = w ? s : k, I = N((M) => {
|
|
1776
1776
|
let O = M;
|
|
1777
1777
|
return c !== void 0 && (O = Math.max(c, O)), l !== void 0 && (O = Math.min(l, O)), !b && O < 0 && (O = 0), p !== void 0 && (O = parseFloat(O.toFixed(p))), O;
|
|
1778
1778
|
}, [c, l, b, p]), g = N((M) => {
|
|
1779
1779
|
const O = I(M);
|
|
1780
|
-
|
|
1781
|
-
}, [I,
|
|
1780
|
+
w || E(O), o?.(O);
|
|
1781
|
+
}, [I, w, o]), P = N((M) => {
|
|
1782
1782
|
const O = M.target.value;
|
|
1783
1783
|
if (O === "" || O === "-") return;
|
|
1784
|
-
const
|
|
1785
|
-
isNaN(
|
|
1784
|
+
const Y = parseFloat(O);
|
|
1785
|
+
isNaN(Y) || g(Y);
|
|
1786
1786
|
}, [g]), x = N((M) => {
|
|
1787
|
-
M.key === "ArrowUp" && (M.preventDefault(), g(
|
|
1788
|
-
}, [
|
|
1789
|
-
bg:
|
|
1790
|
-
color:
|
|
1787
|
+
M.key === "ArrowUp" && (M.preventDefault(), g(S + u)), M.key === "ArrowDown" && (M.preventDefault(), g(S - u));
|
|
1788
|
+
}, [S, u, g]), D = c !== void 0 && S <= c, C = l !== void 0 && S >= l, z = h ? h(S) : String(S), T = {
|
|
1789
|
+
bg: B.BgSurface,
|
|
1790
|
+
color: B.TextPrimary,
|
|
1791
1791
|
borderColor: Wl[a],
|
|
1792
1792
|
radius: Se.Md,
|
|
1793
|
-
buttonBg:
|
|
1793
|
+
buttonBg: B.BgMuted,
|
|
1794
1794
|
...Hl[n]
|
|
1795
|
-
},
|
|
1795
|
+
}, A = [
|
|
1796
1796
|
"gloss-preset-numberinput",
|
|
1797
1797
|
`gloss-preset-numberinput--${a}`,
|
|
1798
1798
|
`gloss-preset-numberinput--${n}`,
|
|
1799
1799
|
y && "gloss-preset-numberinput--disabled"
|
|
1800
1800
|
].filter(Boolean).join(" ");
|
|
1801
|
-
return /* @__PURE__ */ d("div", { className:
|
|
1801
|
+
return /* @__PURE__ */ d("div", { className: A, children: [
|
|
1802
1802
|
m && /* @__PURE__ */ e("label", { className: "gloss-preset-numberinput__label", children: m }),
|
|
1803
1803
|
/* @__PURE__ */ d(zs, { definition: T, disabled: y, children: [
|
|
1804
|
-
v && /* @__PURE__ */ e("button", { type: "button", onClick: () => g(
|
|
1804
|
+
v && /* @__PURE__ */ e("button", { type: "button", onClick: () => g(S - u), disabled: y || D, "aria-label": "Decrease value", tabIndex: -1, children: /* @__PURE__ */ e(ve, { name: "minus", size: "sm" }) }),
|
|
1805
1805
|
/* @__PURE__ */ e(
|
|
1806
1806
|
"input",
|
|
1807
1807
|
{
|
|
1808
1808
|
ref: t,
|
|
1809
1809
|
type: "text",
|
|
1810
1810
|
inputMode: "numeric",
|
|
1811
|
-
value:
|
|
1811
|
+
value: z,
|
|
1812
1812
|
onChange: P,
|
|
1813
|
-
onBlur: () => g(
|
|
1813
|
+
onBlur: () => g(S),
|
|
1814
1814
|
onKeyDown: x,
|
|
1815
1815
|
disabled: y,
|
|
1816
1816
|
placeholder: _,
|
|
1817
1817
|
"aria-valuemin": c,
|
|
1818
1818
|
"aria-valuemax": l,
|
|
1819
|
-
"aria-valuenow":
|
|
1819
|
+
"aria-valuenow": S
|
|
1820
1820
|
}
|
|
1821
1821
|
),
|
|
1822
|
-
v && /* @__PURE__ */ e("button", { type: "button", onClick: () => g(
|
|
1822
|
+
v && /* @__PURE__ */ e("button", { type: "button", onClick: () => g(S + u), disabled: y || C, "aria-label": "Increase value", tabIndex: -1, children: /* @__PURE__ */ e(ve, { name: "plus", size: "sm" }) })
|
|
1823
1823
|
] }),
|
|
1824
1824
|
f && /* @__PURE__ */ e("div", { className: `gloss-preset-numberinput__helper ${a === "error" ? "gloss-preset-numberinput__helper--error" : ""}`, children: f })
|
|
1825
1825
|
] });
|
|
@@ -1862,9 +1862,9 @@ const Kl = {
|
|
|
1862
1862
|
lg: { padding: J.Lg, fontSize: "1rem", minHeight: "40px" },
|
|
1863
1863
|
xl: { padding: J.Xl, fontSize: "1.125rem", minHeight: "44px" }
|
|
1864
1864
|
}, Ul = {
|
|
1865
|
-
default:
|
|
1866
|
-
error:
|
|
1867
|
-
success:
|
|
1865
|
+
default: B.BorderDefault,
|
|
1866
|
+
error: B.BorderError,
|
|
1867
|
+
success: B.BorderSuccess
|
|
1868
1868
|
}, Yt = Z.forwardRef(
|
|
1869
1869
|
(r, t) => {
|
|
1870
1870
|
const {
|
|
@@ -1883,7 +1883,7 @@ const Kl = {
|
|
|
1883
1883
|
required: b,
|
|
1884
1884
|
id: _,
|
|
1885
1885
|
name: v
|
|
1886
|
-
} = r, h = ce(null), k = ce(null), E = typeof s == "string" ? Kl[s] : s,
|
|
1886
|
+
} = r, h = ce(null), k = ce(null), E = typeof s == "string" ? Kl[s] : s, w = N((g) => {
|
|
1887
1887
|
h.current = g, typeof t == "function" ? t(g) : t && (t.current = g);
|
|
1888
1888
|
}, [t]);
|
|
1889
1889
|
se(() => {
|
|
@@ -1909,12 +1909,12 @@ const Kl = {
|
|
|
1909
1909
|
}, [E, o, c]), se(() => {
|
|
1910
1910
|
k.current && i !== void 0 && k.current.unmaskedValue !== i && (k.current.unmaskedValue = i);
|
|
1911
1911
|
}, [i]);
|
|
1912
|
-
const
|
|
1913
|
-
bg:
|
|
1914
|
-
color:
|
|
1912
|
+
const S = {
|
|
1913
|
+
bg: B.BgSurface,
|
|
1914
|
+
color: B.TextPrimary,
|
|
1915
1915
|
borderColor: Ul[a],
|
|
1916
1916
|
radius: Se.Md,
|
|
1917
|
-
placeholderColor:
|
|
1917
|
+
placeholderColor: B.TextTertiary,
|
|
1918
1918
|
...Yl[n]
|
|
1919
1919
|
}, I = [
|
|
1920
1920
|
"gloss-preset-maskedinput",
|
|
@@ -1924,8 +1924,8 @@ const Kl = {
|
|
|
1924
1924
|
return /* @__PURE__ */ e("div", { className: I, children: /* @__PURE__ */ e(
|
|
1925
1925
|
$s,
|
|
1926
1926
|
{
|
|
1927
|
-
ref:
|
|
1928
|
-
definition:
|
|
1927
|
+
ref: w,
|
|
1928
|
+
definition: S,
|
|
1929
1929
|
label: u,
|
|
1930
1930
|
helperText: p,
|
|
1931
1931
|
required: b,
|
|
@@ -1942,13 +1942,13 @@ const Kl = {
|
|
|
1942
1942
|
Yt.displayName = "PresetMaskedInput";
|
|
1943
1943
|
const Xl = {
|
|
1944
1944
|
default: {
|
|
1945
|
-
borderColor:
|
|
1945
|
+
borderColor: B.BorderDefault
|
|
1946
1946
|
},
|
|
1947
1947
|
error: {
|
|
1948
|
-
borderColor:
|
|
1948
|
+
borderColor: B.BorderError
|
|
1949
1949
|
},
|
|
1950
1950
|
success: {
|
|
1951
|
-
borderColor:
|
|
1951
|
+
borderColor: B.BorderSuccess
|
|
1952
1952
|
}
|
|
1953
1953
|
}, ql = {
|
|
1954
1954
|
xs: { padding: J.Xs, fontSize: "0.75rem", minHeight: "24px" },
|
|
@@ -1957,10 +1957,10 @@ const Xl = {
|
|
|
1957
1957
|
lg: { padding: J.Sm, fontSize: "0.9375rem", minHeight: "42px" },
|
|
1958
1958
|
xl: { padding: J.Md, fontSize: "1rem", minHeight: "48px" }
|
|
1959
1959
|
}, Zl = {
|
|
1960
|
-
bg:
|
|
1960
|
+
bg: B.BgSurface,
|
|
1961
1961
|
radius: Se.Md
|
|
1962
1962
|
};
|
|
1963
|
-
|
|
1963
|
+
B.BgSurface, B.BorderDefault, Se.Md, Ze.Card;
|
|
1964
1964
|
function Tt(r) {
|
|
1965
1965
|
const {
|
|
1966
1966
|
variant: t = "default",
|
|
@@ -1989,17 +1989,17 @@ function Tt(r) {
|
|
|
1989
1989
|
Tt.displayName = "PresetSelect";
|
|
1990
1990
|
const Jl = Xt("md"), Ql = {
|
|
1991
1991
|
elevated: {
|
|
1992
|
-
bg:
|
|
1992
|
+
bg: B.BgSurface,
|
|
1993
1993
|
border: "none",
|
|
1994
1994
|
elevation: Ze.Card
|
|
1995
1995
|
},
|
|
1996
1996
|
outlined: {
|
|
1997
|
-
bg:
|
|
1998
|
-
border: `1px solid ${
|
|
1997
|
+
bg: B.BgSurface,
|
|
1998
|
+
border: `1px solid ${B.BorderDefault}`,
|
|
1999
1999
|
elevation: "none"
|
|
2000
2000
|
},
|
|
2001
2001
|
filled: {
|
|
2002
|
-
bg:
|
|
2002
|
+
bg: B.BgMuted,
|
|
2003
2003
|
border: "none",
|
|
2004
2004
|
elevation: "none"
|
|
2005
2005
|
}
|
|
@@ -2080,19 +2080,19 @@ const lc = Z.forwardRef(
|
|
|
2080
2080
|
);
|
|
2081
2081
|
lc.displayName = "PresetCardActions";
|
|
2082
2082
|
const cc = {
|
|
2083
|
-
default: { bg:
|
|
2084
|
-
primary: { bg:
|
|
2085
|
-
success: { bg:
|
|
2086
|
-
warning: { bg:
|
|
2087
|
-
error: { bg:
|
|
2088
|
-
info: { bg:
|
|
2083
|
+
default: { bg: B.Gray100, color: B.Gray700 },
|
|
2084
|
+
primary: { bg: B.Blue100, color: B.Blue700 },
|
|
2085
|
+
success: { bg: B.Green100, color: B.Green700 },
|
|
2086
|
+
warning: { bg: B.Amber100, color: B.Amber600 },
|
|
2087
|
+
error: { bg: B.Red100, color: B.Red700 },
|
|
2088
|
+
info: { bg: B.Blue50, color: B.Blue600 }
|
|
2089
2089
|
}, dc = {
|
|
2090
|
-
default: { bg:
|
|
2091
|
-
primary: { bg:
|
|
2092
|
-
success: { bg:
|
|
2093
|
-
warning: { bg:
|
|
2094
|
-
error: { bg:
|
|
2095
|
-
info: { bg:
|
|
2090
|
+
default: { bg: B.Gray50 },
|
|
2091
|
+
primary: { bg: B.Blue50 },
|
|
2092
|
+
success: { bg: B.Green50 },
|
|
2093
|
+
warning: { bg: B.Amber200 },
|
|
2094
|
+
error: { bg: B.Red50 },
|
|
2095
|
+
info: { bg: B.Blue50 }
|
|
2096
2096
|
}, uc = {
|
|
2097
2097
|
xs: { fontSize: "0.625rem", padding: "1px", paddingX: "4px" },
|
|
2098
2098
|
sm: { fontSize: "0.6875rem", padding: "2px", paddingX: "6px" },
|
|
@@ -2130,25 +2130,25 @@ const cc = {
|
|
|
2130
2130
|
xn.displayName = "PresetBadge";
|
|
2131
2131
|
const mc = {
|
|
2132
2132
|
filled: {
|
|
2133
|
-
default: { bg:
|
|
2134
|
-
primary: { bg:
|
|
2135
|
-
success: { bg:
|
|
2136
|
-
warning: { bg:
|
|
2137
|
-
error: { bg:
|
|
2133
|
+
default: { bg: B.Gray100, color: B.Gray700 },
|
|
2134
|
+
primary: { bg: B.Blue100, color: B.Blue700 },
|
|
2135
|
+
success: { bg: B.Green100, color: B.Green700 },
|
|
2136
|
+
warning: { bg: B.Amber100, color: B.Amber600 },
|
|
2137
|
+
error: { bg: B.Red100, color: B.Red700 }
|
|
2138
2138
|
},
|
|
2139
2139
|
outlined: {
|
|
2140
|
-
default: { bg: "transparent", borderColor:
|
|
2141
|
-
primary: { bg: "transparent", borderColor:
|
|
2142
|
-
success: { bg: "transparent", borderColor:
|
|
2143
|
-
warning: { bg: "transparent", borderColor:
|
|
2144
|
-
error: { bg: "transparent", borderColor:
|
|
2140
|
+
default: { bg: "transparent", borderColor: B.Gray300, color: B.Gray700 },
|
|
2141
|
+
primary: { bg: "transparent", borderColor: B.Blue300, color: B.Blue700 },
|
|
2142
|
+
success: { bg: "transparent", borderColor: B.Green500, color: B.Green700 },
|
|
2143
|
+
warning: { bg: "transparent", borderColor: B.Amber500, color: B.Amber600 },
|
|
2144
|
+
error: { bg: "transparent", borderColor: B.Red400, color: B.Red700 }
|
|
2145
2145
|
},
|
|
2146
2146
|
soft: {
|
|
2147
|
-
default: { bg:
|
|
2148
|
-
primary: { bg:
|
|
2149
|
-
success: { bg:
|
|
2150
|
-
warning: { bg:
|
|
2151
|
-
error: { bg:
|
|
2147
|
+
default: { bg: B.Gray50, color: B.Gray700 },
|
|
2148
|
+
primary: { bg: B.Blue50, color: B.Blue700 },
|
|
2149
|
+
success: { bg: B.Green50, color: B.Green700 },
|
|
2150
|
+
warning: { bg: B.Amber200, color: B.Amber600 },
|
|
2151
|
+
error: { bg: B.Red50, color: B.Red700 }
|
|
2152
2152
|
}
|
|
2153
2153
|
}, pc = {
|
|
2154
2154
|
xs: { fontSize: "0.6875rem", padding: "2px", paddingX: "6px" },
|
|
@@ -2231,7 +2231,7 @@ const mc = {
|
|
|
2231
2231
|
);
|
|
2232
2232
|
Zr.displayName = "PresetChip";
|
|
2233
2233
|
const fc = {
|
|
2234
|
-
borderColor:
|
|
2234
|
+
borderColor: B.BorderDefault,
|
|
2235
2235
|
radius: Se.None
|
|
2236
2236
|
}, gc = Z.forwardRef(
|
|
2237
2237
|
({ children: r, ...t }, a) => {
|
|
@@ -2265,8 +2265,8 @@ const vc = {
|
|
|
2265
2265
|
sm: { padding: J.Xs, minWidth: "140px" },
|
|
2266
2266
|
md: { padding: J.Sm, minWidth: "180px" }
|
|
2267
2267
|
}, _c = {
|
|
2268
|
-
bg:
|
|
2269
|
-
borderColor:
|
|
2268
|
+
bg: B.BgSurface,
|
|
2269
|
+
borderColor: B.BorderDefault,
|
|
2270
2270
|
radius: Se.Md,
|
|
2271
2271
|
elevation: Ze.Card
|
|
2272
2272
|
}, xc = Z.forwardRef(
|
|
@@ -2315,7 +2315,7 @@ function Nc({ label: r, open: t, onOpenChange: a, showCount: n = "never", childr
|
|
|
2315
2315
|
Nc.displayName = "PresetMenuGroup";
|
|
2316
2316
|
const Sc = {
|
|
2317
2317
|
padding: J.Sm,
|
|
2318
|
-
hoverBg:
|
|
2318
|
+
hoverBg: B.BgHover
|
|
2319
2319
|
}, Cc = Z.forwardRef(
|
|
2320
2320
|
({ disabled: r, active: t, as: a, icon: n, children: s, ...i }, o) => {
|
|
2321
2321
|
const c = { ...i };
|
|
@@ -2548,26 +2548,26 @@ function Dc({
|
|
|
2548
2548
|
...m
|
|
2549
2549
|
}) {
|
|
2550
2550
|
delete m.className, delete m.style;
|
|
2551
|
-
const [f, y] = H(r ? "entered" : "exited"), [b, _] = H(r), v = ce(null), h = ce(null), k = typeof t == "string" ? Mr[t] : t, E = a ?? (typeof t == "string" ? Mr[t]?.duration : Qe.normal) ?? Qe.normal,
|
|
2551
|
+
const [f, y] = H(r ? "entered" : "exited"), [b, _] = H(r), v = ce(null), h = ce(null), k = typeof t == "string" ? Mr[t] : t, E = a ?? (typeof t == "string" ? Mr[t]?.duration : Qe.normal) ?? Qe.normal, w = n ?? (typeof t == "string" ? Mr[t]?.easing : et.easeOut) ?? et.easeOut, S = N(() => {
|
|
2552
2552
|
v.current && (clearTimeout(v.current), v.current = null), h.current && (cancelAnimationFrame(h.current), h.current = null);
|
|
2553
2553
|
}, []);
|
|
2554
|
-
if (se(() => (
|
|
2554
|
+
if (se(() => (S(), r ? (_(!0), o?.(), h.current = requestAnimationFrame(() => {
|
|
2555
2555
|
y("entering"), v.current = setTimeout(() => {
|
|
2556
2556
|
y("entered"), c?.();
|
|
2557
2557
|
}, E + s);
|
|
2558
2558
|
})) : (l?.(), y("exiting"), v.current = setTimeout(() => {
|
|
2559
2559
|
y("exited"), i && _(!1), u?.();
|
|
2560
|
-
}, E + s)),
|
|
2560
|
+
}, E + s)), S), [r, E, s, i, o, c, l, u, S]), !b) return null;
|
|
2561
2561
|
let I = {};
|
|
2562
2562
|
switch (f) {
|
|
2563
2563
|
case "entering":
|
|
2564
|
-
I = { ...k.enter.to, transition: `all ${E}ms ${
|
|
2564
|
+
I = { ...k.enter.to, transition: `all ${E}ms ${w}`, transitionDelay: s > 0 ? `${s}ms` : void 0 };
|
|
2565
2565
|
break;
|
|
2566
2566
|
case "entered":
|
|
2567
2567
|
I = k.enter.to;
|
|
2568
2568
|
break;
|
|
2569
2569
|
case "exiting":
|
|
2570
|
-
I = { ...k.exit.to, transition: `all ${E}ms ${
|
|
2570
|
+
I = { ...k.exit.to, transition: `all ${E}ms ${w}`, transitionDelay: s > 0 ? `${s}ms` : void 0 };
|
|
2571
2571
|
break;
|
|
2572
2572
|
case "exited":
|
|
2573
2573
|
I = k.exit.to;
|
|
@@ -2612,40 +2612,40 @@ function Ec(r) {
|
|
|
2612
2612
|
[a]
|
|
2613
2613
|
), k = N(
|
|
2614
2614
|
async (x, D) => {
|
|
2615
|
-
const
|
|
2616
|
-
if (p(
|
|
2617
|
-
const
|
|
2618
|
-
f(
|
|
2615
|
+
const C = { ...u, [x]: D };
|
|
2616
|
+
if (p(C), s) {
|
|
2617
|
+
const z = await h(C);
|
|
2618
|
+
f(z);
|
|
2619
2619
|
}
|
|
2620
2620
|
},
|
|
2621
2621
|
[u, s, h]
|
|
2622
2622
|
), E = N((x, D) => {
|
|
2623
|
-
f((
|
|
2624
|
-
}, []),
|
|
2623
|
+
f((C) => ({ ...C, [x]: D }));
|
|
2624
|
+
}, []), w = N(
|
|
2625
2625
|
async (x, D = !0) => {
|
|
2626
|
-
if (b((
|
|
2627
|
-
const
|
|
2628
|
-
f(
|
|
2626
|
+
if (b((C) => ({ ...C, [x]: D })), i && D) {
|
|
2627
|
+
const C = await h(u);
|
|
2628
|
+
f(C);
|
|
2629
2629
|
}
|
|
2630
2630
|
},
|
|
2631
2631
|
[i, h, u]
|
|
2632
|
-
),
|
|
2632
|
+
), S = N(
|
|
2633
2633
|
(x) => ({
|
|
2634
2634
|
value: u[x],
|
|
2635
2635
|
onChange: (D) => k(x, D),
|
|
2636
|
-
onBlur: () =>
|
|
2636
|
+
onBlur: () => w(x, !0),
|
|
2637
2637
|
name: x,
|
|
2638
2638
|
error: y[x] ? m[x] : void 0,
|
|
2639
2639
|
touched: y[x] ?? !1
|
|
2640
2640
|
}),
|
|
2641
|
-
[u, m, y, k,
|
|
2641
|
+
[u, m, y, k, w]
|
|
2642
2642
|
), I = ee(() => Object.keys(m).length === 0, [m]), g = N(
|
|
2643
2643
|
async (x) => {
|
|
2644
2644
|
o && x.preventDefault();
|
|
2645
|
-
const D = Object.keys(u).reduce((
|
|
2645
|
+
const D = Object.keys(u).reduce((z, T) => ({ ...z, [T]: !0 }), {});
|
|
2646
2646
|
b(D);
|
|
2647
|
-
const
|
|
2648
|
-
if (f(
|
|
2647
|
+
const C = await h(u);
|
|
2648
|
+
if (f(C), !(Object.keys(C).length > 0)) {
|
|
2649
2649
|
v(!0);
|
|
2650
2650
|
try {
|
|
2651
2651
|
await n(u);
|
|
@@ -2656,8 +2656,8 @@ function Ec(r) {
|
|
|
2656
2656
|
},
|
|
2657
2657
|
[o, u, h, n]
|
|
2658
2658
|
), P = ee(
|
|
2659
|
-
() => ({ values: u, errors: m, touched: y, isSubmitting: _, isValid: I, setFieldValue: k, setFieldError: E, setFieldTouched:
|
|
2660
|
-
[u, m, y, _, I, k, E,
|
|
2659
|
+
() => ({ values: u, errors: m, touched: y, isSubmitting: _, isValid: I, setFieldValue: k, setFieldError: E, setFieldTouched: w, getFieldProps: S }),
|
|
2660
|
+
[u, m, y, _, I, k, E, w, S]
|
|
2661
2661
|
);
|
|
2662
2662
|
return /* @__PURE__ */ e(Sn.Provider, { value: P, children: /* @__PURE__ */ e("form", { onSubmit: g, className: "gloss-preset-form", noValidate: !0, children: typeof c == "function" ? c(P) : c }) });
|
|
2663
2663
|
}
|
|
@@ -2694,16 +2694,16 @@ function Mc({
|
|
|
2694
2694
|
"aria-describedby": [a ? m : null, v ? f : null].filter(Boolean).join(" ") || void 0,
|
|
2695
2695
|
"aria-invalid": v ? !0 : void 0,
|
|
2696
2696
|
"aria-required": n ? !0 : void 0
|
|
2697
|
-
}),
|
|
2697
|
+
}), w = ["gloss-form-field__label", i && "gloss-form-field__label--hidden"].filter(Boolean).join(" "), S = [
|
|
2698
2698
|
"gloss-form-field",
|
|
2699
2699
|
"gloss-preset-form-field",
|
|
2700
2700
|
`gloss-form-field--label-${s}`,
|
|
2701
2701
|
v && "gloss-form-field--error"
|
|
2702
|
-
].filter(Boolean).join(" "), I = t && /* @__PURE__ */ d("label", { htmlFor: p, className:
|
|
2702
|
+
].filter(Boolean).join(" "), I = t && /* @__PURE__ */ d("label", { htmlFor: p, className: w, children: [
|
|
2703
2703
|
t,
|
|
2704
2704
|
n && /* @__PURE__ */ e("span", { className: "gloss-form-field__required", "aria-hidden": "true", children: "*" })
|
|
2705
2705
|
] });
|
|
2706
|
-
return /* @__PURE__ */ d("div", { className:
|
|
2706
|
+
return /* @__PURE__ */ d("div", { className: S, children: [
|
|
2707
2707
|
s !== "right" && I,
|
|
2708
2708
|
/* @__PURE__ */ e("div", { className: "gloss-form-field__control", children: E }),
|
|
2709
2709
|
s === "right" && I,
|
|
@@ -2767,8 +2767,8 @@ const ur = Z.memo(({
|
|
|
2767
2767
|
const c = ce(null), l = ce({}), [u, p] = H(null), [m, f] = H({ left: 0, width: 0 }), [y, b] = H({ left: 0, width: 0 }), _ = (h) => {
|
|
2768
2768
|
const k = l.current[h], E = c.current;
|
|
2769
2769
|
if (!k || !E) return { left: 0, width: 0 };
|
|
2770
|
-
const
|
|
2771
|
-
return { left:
|
|
2770
|
+
const w = k.getBoundingClientRect(), S = E.getBoundingClientRect();
|
|
2771
|
+
return { left: w.left - S.left, width: w.width };
|
|
2772
2772
|
};
|
|
2773
2773
|
se(() => {
|
|
2774
2774
|
const h = requestAnimationFrame(() => f(_(t)));
|
|
@@ -3546,32 +3546,33 @@ const Pr = {
|
|
|
3546
3546
|
const {
|
|
3547
3547
|
variant: a = "standard",
|
|
3548
3548
|
label: n,
|
|
3549
|
-
|
|
3550
|
-
|
|
3551
|
-
|
|
3552
|
-
|
|
3553
|
-
|
|
3554
|
-
|
|
3555
|
-
|
|
3556
|
-
|
|
3549
|
+
labelAdornment: s,
|
|
3550
|
+
value: i,
|
|
3551
|
+
valueFormat: o,
|
|
3552
|
+
trend: c,
|
|
3553
|
+
subtitle: l,
|
|
3554
|
+
colSpan: u = 1,
|
|
3555
|
+
isStale: p,
|
|
3556
|
+
thresholdBreach: m = "none"
|
|
3557
|
+
} = t, f = a === "sparkline" || a === "bars" || a === "donut" ? t.accentColor ?? "#4f46e5" : "#4f46e5", y = a === "highlight" ? t.highlightColor : void 0, b = a === "sparkline" ? t.sparklineData : void 0, _ = a === "bars" ? t.barData : void 0, v = a === "donut" ? t.donutValue : 0, h = a === "donut" ? t.donutMax ?? 100 : 100, k = a === "object-arrow" ? t.objectArrowValue : 0, E = a === "object-arrow" ? t.objectArrowMax : 100, w = a === "arrow" ? t.arrowDirection : void 0, S = a === "versus" ? t.versusData : void 0, I = a === "segmented" ? t.segments : void 0, P = (a === "highlight" && t.tintCondition ? $c(
|
|
3557
3558
|
typeof t.value == "number" ? t.value : null,
|
|
3558
3559
|
t.tintCondition
|
|
3559
|
-
) : void 0) ??
|
|
3560
|
-
() => lo(
|
|
3561
|
-
prefix:
|
|
3562
|
-
suffix:
|
|
3563
|
-
abbreviated:
|
|
3564
|
-
},
|
|
3565
|
-
[
|
|
3566
|
-
),
|
|
3560
|
+
) : void 0) ?? y, x = (P ? Fc[P] : void 0) || P, { formatted: D, tier: C, length: z } = ee(
|
|
3561
|
+
() => lo(i, {
|
|
3562
|
+
prefix: o?.prefix || "",
|
|
3563
|
+
suffix: o?.suffix || "",
|
|
3564
|
+
abbreviated: o?.abbreviated
|
|
3565
|
+
}, u),
|
|
3566
|
+
[i, o?.prefix, o?.suffix, o?.abbreviated, u]
|
|
3567
|
+
), T = { display: D, full: D, length: z }, A = Sa(T.length, u), M = c?.direction && Pr[c.direction] || Pr.flat, O = p ? "gloss-metric-data-stale" : "gloss-metric-data-fresh", Y = {
|
|
3567
3568
|
fontWeight: 700,
|
|
3568
3569
|
letterSpacing: "-0.03em",
|
|
3569
|
-
color: a === "highlight" ?
|
|
3570
|
-
fontSize:
|
|
3570
|
+
color: a === "highlight" ? x : "rgba(0,0,0,0.87)",
|
|
3571
|
+
fontSize: A,
|
|
3571
3572
|
lineHeight: 1.1,
|
|
3572
3573
|
whiteSpace: "nowrap",
|
|
3573
3574
|
overflow: "hidden"
|
|
3574
|
-
},
|
|
3575
|
+
}, j = {
|
|
3575
3576
|
fontSize: 10.5,
|
|
3576
3577
|
color: "rgba(0,0,0,0.35)",
|
|
3577
3578
|
overflow: "hidden",
|
|
@@ -3579,8 +3580,8 @@ const Pr = {
|
|
|
3579
3580
|
whiteSpace: "nowrap",
|
|
3580
3581
|
flex: 1,
|
|
3581
3582
|
minWidth: 0
|
|
3582
|
-
},
|
|
3583
|
-
...
|
|
3583
|
+
}, R = a === "sparkline" || a === "bars", W = R && l ? {
|
|
3584
|
+
...j,
|
|
3584
3585
|
backgroundColor: "rgba(255,255,255,0.78)",
|
|
3585
3586
|
backdropFilter: "blur(4px)",
|
|
3586
3587
|
WebkitBackdropFilter: "blur(4px)",
|
|
@@ -3589,8 +3590,8 @@ const Pr = {
|
|
|
3589
3590
|
color: "rgba(0,0,0,0.5)",
|
|
3590
3591
|
flex: "none",
|
|
3591
3592
|
minWidth: void 0
|
|
3592
|
-
} :
|
|
3593
|
-
const
|
|
3593
|
+
} : j, V = () => {
|
|
3594
|
+
const U = w === "down" ? "▼" : "▲";
|
|
3594
3595
|
return /* @__PURE__ */ e(
|
|
3595
3596
|
"div",
|
|
3596
3597
|
{
|
|
@@ -3598,7 +3599,7 @@ const Pr = {
|
|
|
3598
3599
|
width: 22,
|
|
3599
3600
|
height: 22,
|
|
3600
3601
|
borderRadius: 5,
|
|
3601
|
-
backgroundColor: `${
|
|
3602
|
+
backgroundColor: `${f}14`,
|
|
3602
3603
|
// ~8% opacity
|
|
3603
3604
|
display: "flex",
|
|
3604
3605
|
alignItems: "center",
|
|
@@ -3606,20 +3607,20 @@ const Pr = {
|
|
|
3606
3607
|
flexShrink: 0,
|
|
3607
3608
|
marginRight: 6
|
|
3608
3609
|
},
|
|
3609
|
-
children: /* @__PURE__ */ e("span", { style: { fontSize: 10, color:
|
|
3610
|
+
children: /* @__PURE__ */ e("span", { style: { fontSize: 10, color: f, lineHeight: 1 }, children: U })
|
|
3610
3611
|
}
|
|
3611
3612
|
);
|
|
3612
|
-
},
|
|
3613
|
+
}, G = () => {
|
|
3613
3614
|
if (!S) return null;
|
|
3614
|
-
const
|
|
3615
|
-
prefix:
|
|
3616
|
-
suffix:
|
|
3617
|
-
abbreviated:
|
|
3618
|
-
}),
|
|
3619
|
-
prefix:
|
|
3620
|
-
suffix:
|
|
3621
|
-
abbreviated:
|
|
3622
|
-
}),
|
|
3615
|
+
const U = $r(S.current, {
|
|
3616
|
+
prefix: o?.prefix || "",
|
|
3617
|
+
suffix: o?.suffix || "",
|
|
3618
|
+
abbreviated: o?.abbreviated
|
|
3619
|
+
}), K = $r(S.prior, {
|
|
3620
|
+
prefix: o?.prefix || "",
|
|
3621
|
+
suffix: o?.suffix || "",
|
|
3622
|
+
abbreviated: o?.abbreviated
|
|
3623
|
+
}), q = Sa(U.length, u), te = Math.max(q - 4, 14);
|
|
3623
3624
|
return /* @__PURE__ */ d("div", { style: { display: "flex", alignItems: "center", gap: 12, flex: 1 }, children: [
|
|
3624
3625
|
/* @__PURE__ */ d("div", { style: { display: "flex", flexDirection: "column" }, children: [
|
|
3625
3626
|
/* @__PURE__ */ e(
|
|
@@ -3627,13 +3628,13 @@ const Pr = {
|
|
|
3627
3628
|
{
|
|
3628
3629
|
style: {
|
|
3629
3630
|
fontWeight: 700,
|
|
3630
|
-
fontSize:
|
|
3631
|
+
fontSize: q,
|
|
3631
3632
|
letterSpacing: "-0.03em",
|
|
3632
3633
|
color: "rgba(0,0,0,0.87)",
|
|
3633
3634
|
lineHeight: 1.1
|
|
3634
3635
|
},
|
|
3635
|
-
title:
|
|
3636
|
-
children:
|
|
3636
|
+
title: U.full,
|
|
3637
|
+
children: U.display
|
|
3637
3638
|
}
|
|
3638
3639
|
),
|
|
3639
3640
|
/* @__PURE__ */ e("span", { style: { fontSize: 10, color: "rgba(0,0,0,0.35)", marginTop: 2 }, children: S.currentLabel })
|
|
@@ -3651,19 +3652,19 @@ const Pr = {
|
|
|
3651
3652
|
{
|
|
3652
3653
|
style: {
|
|
3653
3654
|
fontWeight: 700,
|
|
3654
|
-
fontSize:
|
|
3655
|
+
fontSize: te,
|
|
3655
3656
|
letterSpacing: "-0.03em",
|
|
3656
3657
|
color: "rgba(0,0,0,0.5)",
|
|
3657
3658
|
lineHeight: 1.1
|
|
3658
3659
|
},
|
|
3659
|
-
title:
|
|
3660
|
-
children:
|
|
3660
|
+
title: K.full,
|
|
3661
|
+
children: K.display
|
|
3661
3662
|
}
|
|
3662
3663
|
),
|
|
3663
3664
|
/* @__PURE__ */ e("span", { style: { fontSize: 10, color: "rgba(0,0,0,0.35)", marginTop: 2 }, children: S.priorLabel })
|
|
3664
3665
|
] })
|
|
3665
3666
|
] });
|
|
3666
|
-
},
|
|
3667
|
+
}, F = () => !I || I.length === 0 ? null : /* @__PURE__ */ d("div", { style: { zIndex: 2, position: "relative" }, children: [
|
|
3667
3668
|
/* @__PURE__ */ e(
|
|
3668
3669
|
"div",
|
|
3669
3670
|
{
|
|
@@ -3674,16 +3675,16 @@ const Pr = {
|
|
|
3674
3675
|
gap: 1,
|
|
3675
3676
|
overflow: "hidden"
|
|
3676
3677
|
},
|
|
3677
|
-
children:
|
|
3678
|
+
children: I.map((U, K) => /* @__PURE__ */ e(
|
|
3678
3679
|
"div",
|
|
3679
3680
|
{
|
|
3680
3681
|
style: {
|
|
3681
|
-
flex:
|
|
3682
|
-
backgroundColor:
|
|
3682
|
+
flex: U.value,
|
|
3683
|
+
backgroundColor: U.color,
|
|
3683
3684
|
minWidth: 2
|
|
3684
3685
|
}
|
|
3685
3686
|
},
|
|
3686
|
-
|
|
3687
|
+
K
|
|
3687
3688
|
))
|
|
3688
3689
|
}
|
|
3689
3690
|
),
|
|
@@ -3696,7 +3697,7 @@ const Pr = {
|
|
|
3696
3697
|
flexWrap: "wrap",
|
|
3697
3698
|
marginTop: 4
|
|
3698
3699
|
},
|
|
3699
|
-
children:
|
|
3700
|
+
children: I.map((U, K) => /* @__PURE__ */ d(
|
|
3700
3701
|
"div",
|
|
3701
3702
|
{
|
|
3702
3703
|
style: {
|
|
@@ -3712,76 +3713,79 @@ const Pr = {
|
|
|
3712
3713
|
width: 6,
|
|
3713
3714
|
height: 6,
|
|
3714
3715
|
borderRadius: "50%",
|
|
3715
|
-
backgroundColor:
|
|
3716
|
+
backgroundColor: U.color,
|
|
3716
3717
|
flexShrink: 0
|
|
3717
3718
|
}
|
|
3718
3719
|
}
|
|
3719
3720
|
),
|
|
3720
|
-
/* @__PURE__ */ e("span", { style: { fontSize: 10, color: "rgba(0,0,0,0.5)" }, children:
|
|
3721
|
+
/* @__PURE__ */ e("span", { style: { fontSize: 10, color: "rgba(0,0,0,0.5)" }, children: U.label })
|
|
3721
3722
|
]
|
|
3722
3723
|
},
|
|
3723
|
-
|
|
3724
|
+
K
|
|
3724
3725
|
))
|
|
3725
3726
|
}
|
|
3726
3727
|
)
|
|
3727
|
-
] }),
|
|
3728
|
+
] }), X = [
|
|
3728
3729
|
"gloss-threshold-overlay",
|
|
3729
|
-
|
|
3730
|
-
|
|
3731
|
-
|
|
3730
|
+
m === "warn" ? "gloss-threshold-warn" : "",
|
|
3731
|
+
m === "critical" ? "gloss-threshold-critical" : "",
|
|
3732
|
+
m === "critical" ? "gloss-threshold-pulse" : ""
|
|
3732
3733
|
].filter(Boolean).join(" ");
|
|
3733
3734
|
return /* @__PURE__ */ d(We, { children: [
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
a === "highlight" &&
|
|
3735
|
+
m !== "none" && /* @__PURE__ */ e("div", { className: X }),
|
|
3736
|
+
m === "warn" && /* @__PURE__ */ e("span", { className: "gloss-threshold-icon gloss-threshold-icon--warn", children: /* @__PURE__ */ e(Oc, {}) }),
|
|
3737
|
+
m === "critical" && /* @__PURE__ */ e("span", { className: "gloss-threshold-icon gloss-threshold-icon--critical", children: /* @__PURE__ */ e(Lc, {}) }),
|
|
3738
|
+
a === "highlight" && x && /* @__PURE__ */ e(
|
|
3738
3739
|
"div",
|
|
3739
3740
|
{
|
|
3740
3741
|
style: {
|
|
3741
3742
|
position: "absolute",
|
|
3742
3743
|
inset: 0,
|
|
3743
3744
|
borderRadius: 10,
|
|
3744
|
-
backgroundColor: Fa(
|
|
3745
|
-
border: `1px solid ${Fa(
|
|
3745
|
+
backgroundColor: Fa(x, 0.06),
|
|
3746
|
+
border: `1px solid ${Fa(x, 0.15)}`,
|
|
3746
3747
|
zIndex: 0,
|
|
3747
3748
|
pointerEvents: "none"
|
|
3748
3749
|
}
|
|
3749
3750
|
}
|
|
3750
3751
|
),
|
|
3751
|
-
a === "sparkline" && /* @__PURE__ */ e(yr, { data:
|
|
3752
|
-
a === "bars" && /* @__PURE__ */ e(wn, { data:
|
|
3753
|
-
/* @__PURE__ */
|
|
3752
|
+
a === "sparkline" && /* @__PURE__ */ e(yr, { data: b, color: f, isStale: p }),
|
|
3753
|
+
a === "bars" && /* @__PURE__ */ e(wn, { data: _, color: f, isStale: p }),
|
|
3754
|
+
/* @__PURE__ */ d(
|
|
3754
3755
|
ge,
|
|
3755
3756
|
{
|
|
3756
3757
|
className: "gloss-metric-card__zone-a",
|
|
3757
|
-
"data-tier":
|
|
3758
|
-
style: { height: 28, flexShrink: 0, zIndex: 2, position: "relative" },
|
|
3759
|
-
children:
|
|
3758
|
+
"data-tier": C,
|
|
3759
|
+
style: { height: 28, flexShrink: 0, zIndex: 2, position: "relative", display: "flex", alignItems: "center" },
|
|
3760
|
+
children: [
|
|
3761
|
+
/* @__PURE__ */ e(Gt, { className: "gloss-metric-card__label", children: n }),
|
|
3762
|
+
s
|
|
3763
|
+
]
|
|
3760
3764
|
}
|
|
3761
3765
|
),
|
|
3762
3766
|
/* @__PURE__ */ d(
|
|
3763
3767
|
ge,
|
|
3764
3768
|
{
|
|
3765
3769
|
definition: { display: "flex", align: "center" },
|
|
3766
|
-
className: `gloss-metric-card__zone-b ${
|
|
3770
|
+
className: `gloss-metric-card__zone-b ${O}`,
|
|
3767
3771
|
style: { flex: 1, zIndex: 2, position: "relative", minHeight: 0 },
|
|
3768
3772
|
children: [
|
|
3769
|
-
a === "donut" && /* @__PURE__ */ e(kn, { value:
|
|
3773
|
+
a === "donut" && /* @__PURE__ */ e(kn, { value: v, max: h, color: f, colSpan: u, isStale: p }),
|
|
3770
3774
|
a === "object-arrow" && /* @__PURE__ */ e(
|
|
3771
3775
|
Dn,
|
|
3772
3776
|
{
|
|
3773
|
-
value:
|
|
3774
|
-
max:
|
|
3775
|
-
trendValue:
|
|
3776
|
-
color:
|
|
3777
|
-
colSpan:
|
|
3778
|
-
isStale:
|
|
3777
|
+
value: k,
|
|
3778
|
+
max: E,
|
|
3779
|
+
trendValue: c?.value,
|
|
3780
|
+
color: M,
|
|
3781
|
+
colSpan: u,
|
|
3782
|
+
isStale: p
|
|
3779
3783
|
}
|
|
3780
3784
|
),
|
|
3781
|
-
a === "arrow" &&
|
|
3782
|
-
a !== "versus" && a !== "segmented" && /* @__PURE__ */ e("span", { style:
|
|
3783
|
-
a === "versus" &&
|
|
3784
|
-
a === "segmented" && /* @__PURE__ */ e("span", { style:
|
|
3785
|
+
a === "arrow" && V(),
|
|
3786
|
+
a !== "versus" && a !== "segmented" && /* @__PURE__ */ e("span", { style: Y, title: T.full, children: T.display }),
|
|
3787
|
+
a === "versus" && G(),
|
|
3788
|
+
a === "segmented" && /* @__PURE__ */ e("span", { style: Y, title: T.full, children: T.display })
|
|
3785
3789
|
]
|
|
3786
3790
|
}
|
|
3787
3791
|
),
|
|
@@ -3789,22 +3793,22 @@ const Pr = {
|
|
|
3789
3793
|
ge,
|
|
3790
3794
|
{
|
|
3791
3795
|
definition: { display: "flex", justify: "between", align: "center" },
|
|
3792
|
-
className: `gloss-metric-card__zone-c ${
|
|
3796
|
+
className: `gloss-metric-card__zone-c ${O}`,
|
|
3793
3797
|
style: { minHeight: 18, flexShrink: 0, zIndex: 2, position: "relative" },
|
|
3794
3798
|
children: [
|
|
3795
|
-
/* @__PURE__ */ e("span", { style:
|
|
3796
|
-
|
|
3799
|
+
/* @__PURE__ */ e("span", { style: W, children: l }),
|
|
3800
|
+
R && c?.value != null ? /* @__PURE__ */ e("span", { style: {
|
|
3797
3801
|
backgroundColor: "rgba(255,255,255,0.78)",
|
|
3798
3802
|
backdropFilter: "blur(4px)",
|
|
3799
3803
|
WebkitBackdropFilter: "blur(4px)",
|
|
3800
3804
|
borderRadius: 4,
|
|
3801
3805
|
display: "inline-flex",
|
|
3802
3806
|
flexShrink: 0
|
|
3803
|
-
}, children: /* @__PURE__ */ e(Lr, { value:
|
|
3807
|
+
}, children: /* @__PURE__ */ e(Lr, { value: c?.value, direction: c?.direction }) }) : /* @__PURE__ */ e(Lr, { value: c?.value, direction: c?.direction })
|
|
3804
3808
|
]
|
|
3805
3809
|
}
|
|
3806
3810
|
),
|
|
3807
|
-
a === "segmented" &&
|
|
3811
|
+
a === "segmented" && F()
|
|
3808
3812
|
] });
|
|
3809
3813
|
};
|
|
3810
3814
|
st.displayName = "MetricCard";
|
|
@@ -4003,31 +4007,31 @@ const En = (r) => {
|
|
|
4003
4007
|
s,
|
|
4004
4008
|
p,
|
|
4005
4009
|
i
|
|
4006
|
-
),
|
|
4007
|
-
() => Kc(
|
|
4008
|
-
[
|
|
4010
|
+
), S = fi() === !0, I = ee(() => Gc(S), [S]), g = ee(() => Vc(S), [S]), P = ee(() => jc(S), [S]), x = ee(
|
|
4011
|
+
() => Kc(S),
|
|
4012
|
+
[S]
|
|
4009
4013
|
), D = ee(
|
|
4010
4014
|
() => Oa(t, m),
|
|
4011
4015
|
[t, m]
|
|
4012
|
-
),
|
|
4016
|
+
), C = ee(
|
|
4013
4017
|
() => Oa(a, m),
|
|
4014
4018
|
[a, m]
|
|
4015
|
-
),
|
|
4019
|
+
), z = Math.max(0, 5 - D.length - 1), T = ee(() => C.filter((ae) => ae.isPromotable).sort((ae, xe) => ae.order - xe.order).slice(0, z), [C, z]), A = ee(() => {
|
|
4016
4020
|
const ae = new Set(T.map((xe) => xe.id));
|
|
4017
|
-
return
|
|
4018
|
-
}, [
|
|
4019
|
-
() => Uc(
|
|
4020
|
-
[
|
|
4021
|
-
), O = b && s, [
|
|
4021
|
+
return C.filter((xe) => !ae.has(xe.id)).sort((xe, je) => xe.order - je.order);
|
|
4022
|
+
}, [C, T]), M = ee(
|
|
4023
|
+
() => Uc(C, z),
|
|
4024
|
+
[C, z]
|
|
4025
|
+
), O = b && s, [Y, j] = H(!1);
|
|
4022
4026
|
se(() => {
|
|
4023
4027
|
s || j(!1);
|
|
4024
4028
|
}, [s]);
|
|
4025
|
-
const
|
|
4029
|
+
const R = u === "up" ? "top-start" : "bottom-start", { refs: W, floatingStyles: V, placement: G, context: F } = on({
|
|
4026
4030
|
open: O,
|
|
4027
4031
|
onOpenChange: (ae) => {
|
|
4028
4032
|
ae || (j(!1), i(!1));
|
|
4029
4033
|
},
|
|
4030
|
-
placement:
|
|
4034
|
+
placement: R,
|
|
4031
4035
|
// quick-260418-k7k-fix-2: strategy='fixed' positions the floating menu
|
|
4032
4036
|
// against the viewport instead of the nearest positioned ancestor.
|
|
4033
4037
|
// Each metric-card cell wrapper has position:relative (creating its
|
|
@@ -4063,11 +4067,11 @@ const En = (r) => {
|
|
|
4063
4067
|
})
|
|
4064
4068
|
],
|
|
4065
4069
|
whileElementsMounted: vi
|
|
4066
|
-
}),
|
|
4070
|
+
}), X = ln(F, {
|
|
4067
4071
|
outsidePress: !0,
|
|
4068
4072
|
outsidePressEvent: "mousedown",
|
|
4069
4073
|
escapeKey: !0
|
|
4070
|
-
}), { getFloatingProps:
|
|
4074
|
+
}), { getFloatingProps: U, getReferenceProps: K } = cn([X]), te = (u ? R : G ?? R).startsWith("top") ? "up" : "down", he = !O || M ? "collapsed" : te === "up" ? "expanded-up" : "expanded-down", oe = {
|
|
4071
4075
|
display: "inline-flex",
|
|
4072
4076
|
alignItems: "center",
|
|
4073
4077
|
overflow: "hidden",
|
|
@@ -4142,7 +4146,7 @@ const En = (r) => {
|
|
|
4142
4146
|
"data-expanded": s ? "true" : "false",
|
|
4143
4147
|
"data-flip": te,
|
|
4144
4148
|
"data-pure-icon": M ? "true" : "false",
|
|
4145
|
-
"data-click-locked":
|
|
4149
|
+
"data-click-locked": Y ? "true" : "false",
|
|
4146
4150
|
"data-visible": n ? "true" : "false",
|
|
4147
4151
|
"data-has-shown": h ? "true" : "false",
|
|
4148
4152
|
style: de,
|
|
@@ -4150,7 +4154,7 @@ const En = (r) => {
|
|
|
4150
4154
|
onPointerEnter: Ce,
|
|
4151
4155
|
onMouseLeave: fe,
|
|
4152
4156
|
onMouseEnter: Ce,
|
|
4153
|
-
...
|
|
4157
|
+
...K(),
|
|
4154
4158
|
children: /* @__PURE__ */ d(
|
|
4155
4159
|
"div",
|
|
4156
4160
|
{
|
|
@@ -4164,14 +4168,14 @@ const En = (r) => {
|
|
|
4164
4168
|
className: `gloss-action-strip__pill${O ? " gloss-action-strip__pill--expanded" : ""}${te === "up" ? " gloss-action-strip__pill--flip-up" : ""}`,
|
|
4165
4169
|
"data-action-strip-pill": !0,
|
|
4166
4170
|
"data-primary-count": D.length,
|
|
4167
|
-
"data-overflow-count":
|
|
4171
|
+
"data-overflow-count": C.length,
|
|
4168
4172
|
"data-variant": he,
|
|
4169
4173
|
variants: I,
|
|
4170
4174
|
animate: he,
|
|
4171
4175
|
initial: "collapsed",
|
|
4172
4176
|
transition: {
|
|
4173
4177
|
layout: {
|
|
4174
|
-
duration: (
|
|
4178
|
+
duration: (S ? Ue.REDUCED_MOTION_MS : Ue.STRIP_EXPAND_MS) / 1e3,
|
|
4175
4179
|
ease: "easeOut"
|
|
4176
4180
|
}
|
|
4177
4181
|
},
|
|
@@ -4292,14 +4296,14 @@ const En = (r) => {
|
|
|
4292
4296
|
{
|
|
4293
4297
|
ref: W.setFloating,
|
|
4294
4298
|
style: { ...V, zIndex: 9999 },
|
|
4295
|
-
...
|
|
4299
|
+
...U(),
|
|
4296
4300
|
children: /* @__PURE__ */ e(
|
|
4297
4301
|
vt.div,
|
|
4298
4302
|
{
|
|
4299
4303
|
className: `gloss-action-strip__menu gloss-action-strip__menu--flip-${te}`,
|
|
4300
4304
|
"data-action-strip-menu": !0,
|
|
4301
4305
|
"data-flip": te,
|
|
4302
|
-
"data-overflow-count":
|
|
4306
|
+
"data-overflow-count": A.length,
|
|
4303
4307
|
role: "menu",
|
|
4304
4308
|
variants: g,
|
|
4305
4309
|
custom: te,
|
|
@@ -4309,7 +4313,7 @@ const En = (r) => {
|
|
|
4309
4313
|
style: {
|
|
4310
4314
|
transformOrigin: Yc(te)
|
|
4311
4315
|
},
|
|
4312
|
-
children:
|
|
4316
|
+
children: A.map((ae) => /* @__PURE__ */ d(
|
|
4313
4317
|
"button",
|
|
4314
4318
|
{
|
|
4315
4319
|
type: "button",
|
|
@@ -4589,42 +4593,42 @@ const ot = function({
|
|
|
4589
4593
|
onMove: h,
|
|
4590
4594
|
onReplace: k,
|
|
4591
4595
|
onNavigate: E,
|
|
4592
|
-
onRetry:
|
|
4593
|
-
onRefresh:
|
|
4596
|
+
onRetry: w,
|
|
4597
|
+
onRefresh: S,
|
|
4594
4598
|
enableQuickSettings: I,
|
|
4595
4599
|
onUpdateTimeframe: g,
|
|
4596
4600
|
instanceTimeframe: P,
|
|
4597
4601
|
cardTitle: x,
|
|
4598
4602
|
quickConfigSlot: D,
|
|
4599
|
-
isStackedGroup:
|
|
4600
|
-
onUpdateStackedTimeframes:
|
|
4603
|
+
isStackedGroup: C,
|
|
4604
|
+
onUpdateStackedTimeframes: z,
|
|
4601
4605
|
instanceStackedTimeframes: T,
|
|
4602
|
-
isGraphActive:
|
|
4606
|
+
isGraphActive: A,
|
|
4603
4607
|
isTableActive: M,
|
|
4604
4608
|
isGraphCard: O,
|
|
4605
|
-
canExpand:
|
|
4609
|
+
canExpand: Y,
|
|
4606
4610
|
anchorX: j,
|
|
4607
|
-
extensionOverflow:
|
|
4611
|
+
extensionOverflow: R,
|
|
4608
4612
|
cardRef: W,
|
|
4609
4613
|
hovered: V,
|
|
4610
4614
|
forceHide: G,
|
|
4611
4615
|
resizePhase: F = "idle",
|
|
4612
|
-
outgoingSnapshot:
|
|
4613
|
-
isFlipped:
|
|
4614
|
-
onFlipChange:
|
|
4616
|
+
outgoingSnapshot: X,
|
|
4617
|
+
isFlipped: U,
|
|
4618
|
+
onFlipChange: K,
|
|
4615
4619
|
clickShadowSlot: q
|
|
4616
4620
|
}) {
|
|
4617
|
-
const [te, he] = H(!1), [oe, be] = H(!1), [de, ie] = H(!1), fe =
|
|
4618
|
-
we.current = null, me.current = null,
|
|
4619
|
-
}, [
|
|
4620
|
-
if (
|
|
4621
|
+
const [te, he] = H(!1), [oe, be] = H(!1), [de, ie] = H(!1), fe = U ?? de, Ce = ce(!1), ke = ce(null), Ne = V !== void 0 ? V : te, Xe = W ?? ke, we = ce(null), me = ce(null), _e = t ?? a, Ge = N(() => {
|
|
4622
|
+
we.current = null, me.current = null, U !== void 0 ? K?.(!0) : ie(!0);
|
|
4623
|
+
}, [U, K]), Ve = N(() => {
|
|
4624
|
+
if (C) {
|
|
4621
4625
|
const Pe = me.current;
|
|
4622
4626
|
if (Pe !== null && Pe.length < 2)
|
|
4623
4627
|
return;
|
|
4624
|
-
|
|
4628
|
+
U !== void 0 ? K?.(!1) : ie(!1), Pe && Pe.length >= 2 && z && z(Pe);
|
|
4625
4629
|
} else
|
|
4626
|
-
|
|
4627
|
-
}, [g,
|
|
4630
|
+
U !== void 0 ? K?.(!1) : ie(!1), we.current && g && g(we.current);
|
|
4631
|
+
}, [g, z, C, U, K]), ae = N((Pe) => {
|
|
4628
4632
|
we.current = Pe;
|
|
4629
4633
|
}, []);
|
|
4630
4634
|
se(() => {
|
|
@@ -4706,12 +4710,13 @@ const ot = function({
|
|
|
4706
4710
|
backfaceVisibility: "hidden",
|
|
4707
4711
|
WebkitBackfaceVisibility: "hidden",
|
|
4708
4712
|
transform: fe ? "rotateY(180deg)" : "rotateY(0deg)",
|
|
4709
|
-
transition: "transform 500ms cubic-bezier(0.22, 1, 0.36, 1)"
|
|
4713
|
+
transition: "transform 500ms cubic-bezier(0.22, 1, 0.36, 1)",
|
|
4714
|
+
pointerEvents: "none"
|
|
4710
4715
|
},
|
|
4711
4716
|
"data-resize-phase": F,
|
|
4712
4717
|
children: [
|
|
4713
|
-
_e,
|
|
4714
|
-
/* @__PURE__ */ e("div", { className: "gloss-card-shell__resize-outgoing", "aria-hidden": "true", children:
|
|
4718
|
+
/* @__PURE__ */ e("div", { style: { pointerEvents: "auto", display: "flex", flexDirection: "column", flex: "1 1 auto", minHeight: 0 }, children: _e }),
|
|
4719
|
+
/* @__PURE__ */ e("div", { className: "gloss-card-shell__resize-outgoing", "aria-hidden": "true", children: X })
|
|
4715
4720
|
]
|
|
4716
4721
|
}
|
|
4717
4722
|
),
|
|
@@ -4731,7 +4736,7 @@ const ot = function({
|
|
|
4731
4736
|
children: D ?? /* @__PURE__ */ e(
|
|
4732
4737
|
Mn,
|
|
4733
4738
|
{
|
|
4734
|
-
mode:
|
|
4739
|
+
mode: C ? "stacked" : "single",
|
|
4735
4740
|
currentTimeframe: P,
|
|
4736
4741
|
onSelectTimeframe: ae,
|
|
4737
4742
|
title: x,
|
|
@@ -4759,18 +4764,18 @@ const ot = function({
|
|
|
4759
4764
|
),
|
|
4760
4765
|
!c && (() => {
|
|
4761
4766
|
const Pe = [];
|
|
4762
|
-
|
|
4767
|
+
w && !p && !m && Pe.push({
|
|
4763
4768
|
id: "retry",
|
|
4764
4769
|
icon: /* @__PURE__ */ e(yi, { style: { fontSize: 16 } }),
|
|
4765
4770
|
label: "Retry",
|
|
4766
|
-
onClick:
|
|
4771
|
+
onClick: w
|
|
4767
4772
|
}), p && Pe.push({
|
|
4768
4773
|
id: "graph",
|
|
4769
4774
|
icon: /* @__PURE__ */ e(hi, { style: { fontSize: 16 } }),
|
|
4770
4775
|
activeIcon: /* @__PURE__ */ e(It, { style: { fontSize: 16 } }),
|
|
4771
4776
|
label: "Graph",
|
|
4772
4777
|
onClick: p,
|
|
4773
|
-
isActive:
|
|
4778
|
+
isActive: A,
|
|
4774
4779
|
showFeedback: !0,
|
|
4775
4780
|
activeColor: "#4f46e5"
|
|
4776
4781
|
}), m && Pe.push({
|
|
@@ -4792,9 +4797,9 @@ const ot = function({
|
|
|
4792
4797
|
onSettings: I ? Ge : void 0,
|
|
4793
4798
|
onRemove: y,
|
|
4794
4799
|
onReplace: k,
|
|
4795
|
-
onRefresh:
|
|
4800
|
+
onRefresh: S,
|
|
4796
4801
|
onWhatsThis: b
|
|
4797
|
-
}), xt = Ke.filter((lt) => lt.id === "whats-this"), Fe = Ke.filter((lt) => lt.id !== "whats-this"), it = (
|
|
4802
|
+
}), xt = Ke.filter((lt) => lt.id === "whats-this"), Fe = Ke.filter((lt) => lt.id !== "whats-this"), it = (R ?? []).map((lt, Et) => ({
|
|
4798
4803
|
...lt,
|
|
4799
4804
|
order: Fe.length + Et
|
|
4800
4805
|
})), Jt = xt.map((lt, Et) => ({
|
|
@@ -4817,10 +4822,10 @@ const ot = function({
|
|
|
4817
4822
|
onFlipBack: Ve,
|
|
4818
4823
|
anchorX: j,
|
|
4819
4824
|
context: {
|
|
4820
|
-
isErrorState: !!(
|
|
4825
|
+
isErrorState: !!(w && !p && !m),
|
|
4821
4826
|
colSpan: n,
|
|
4822
4827
|
isGraphCard: O,
|
|
4823
|
-
canExpand:
|
|
4828
|
+
canExpand: Y
|
|
4824
4829
|
}
|
|
4825
4830
|
}
|
|
4826
4831
|
);
|
|
@@ -4851,29 +4856,29 @@ const pd = function(t) {
|
|
|
4851
4856
|
sparklineInset: _ = "padded",
|
|
4852
4857
|
slotToActionStripConfig: v,
|
|
4853
4858
|
onSlotActionStripConfigChange: h
|
|
4854
|
-
} = t, k = u || o[o.length - 1] || "YTD", E = m ? "gloss-metric-data-stale" : "gloss-metric-data-fresh",
|
|
4859
|
+
} = t, k = u || o[o.length - 1] || "YTD", E = m ? "gloss-metric-data-stale" : "gloss-metric-data-fresh", w = ce(!1);
|
|
4855
4860
|
se(() => {
|
|
4856
|
-
if (
|
|
4857
|
-
const
|
|
4858
|
-
v &&
|
|
4861
|
+
if (w.current) return;
|
|
4862
|
+
const R = "onTableAction" in t;
|
|
4863
|
+
v && R && (console.warn(
|
|
4859
4864
|
"[StackedGroupCard AP-12] slotToActionStripConfig supplied alongside legacy onTableAction — per-slot dispatch will win; remove onTableAction from the consumer."
|
|
4860
|
-
),
|
|
4865
|
+
), w.current = !0);
|
|
4861
4866
|
}, []);
|
|
4862
|
-
const
|
|
4863
|
-
(
|
|
4864
|
-
if (y?.(
|
|
4867
|
+
const S = N(
|
|
4868
|
+
(R, W) => {
|
|
4869
|
+
if (y?.(R, W), !v) return;
|
|
4865
4870
|
let V = null;
|
|
4866
4871
|
try {
|
|
4867
|
-
V = v(
|
|
4872
|
+
V = v(R);
|
|
4868
4873
|
} catch (G) {
|
|
4869
4874
|
console.error(
|
|
4870
4875
|
"[StackedGroupCard] slotToActionStripConfig threw for slot",
|
|
4871
|
-
|
|
4876
|
+
R,
|
|
4872
4877
|
G
|
|
4873
|
-
), h?.(
|
|
4878
|
+
), h?.(R, null);
|
|
4874
4879
|
return;
|
|
4875
4880
|
}
|
|
4876
|
-
h?.(
|
|
4881
|
+
h?.(R, V);
|
|
4877
4882
|
},
|
|
4878
4883
|
[y, v, h]
|
|
4879
4884
|
), I = ce(null), g = N(() => {
|
|
@@ -4883,26 +4888,26 @@ const pd = function(t) {
|
|
|
4883
4888
|
I.current !== null && (clearTimeout(I.current), I.current = null);
|
|
4884
4889
|
}, []);
|
|
4885
4890
|
const P = N(
|
|
4886
|
-
(
|
|
4887
|
-
const W =
|
|
4891
|
+
(R) => {
|
|
4892
|
+
const W = R.relatedTarget;
|
|
4888
4893
|
W instanceof Element && (W.closest("[data-slot-idx]") || W.closest("[data-action-strip]")) || (g(), I.current = setTimeout(() => {
|
|
4889
4894
|
b?.(), v && h?.(null, null), I.current = null;
|
|
4890
4895
|
}, 250));
|
|
4891
4896
|
},
|
|
4892
4897
|
[b, v, h, g]
|
|
4893
|
-
), x =
|
|
4894
|
-
(
|
|
4895
|
-
g(), x(
|
|
4898
|
+
), x = S, D = N(
|
|
4899
|
+
(R, W) => {
|
|
4900
|
+
g(), x(R, W);
|
|
4896
4901
|
},
|
|
4897
4902
|
[x, g]
|
|
4898
|
-
),
|
|
4899
|
-
const V = i.find((
|
|
4903
|
+
), C = !!y || !!v, z = !!b || !!v, T = ce(null), { capacity: A } = In(T), M = f != null ? md(f) : A, O = ee(() => o.map((R, W) => {
|
|
4904
|
+
const V = i.find((X) => X.timeframe === R) || i[W], G = V?.value ?? null, F = $r(G, { prefix: n, suffix: s, abbreviated: !0 });
|
|
4900
4905
|
return {
|
|
4901
|
-
timeframe:
|
|
4906
|
+
timeframe: R,
|
|
4902
4907
|
formatted: F,
|
|
4903
4908
|
trend: V?.trend || null
|
|
4904
4909
|
};
|
|
4905
|
-
}), [o, i, n, s]),
|
|
4910
|
+
}), [o, i, n, s]), Y = ee(
|
|
4906
4911
|
() => O.slice(0, Math.min(O.length, M)),
|
|
4907
4912
|
[O, M]
|
|
4908
4913
|
), j = c?.[k];
|
|
@@ -4940,19 +4945,19 @@ const pd = function(t) {
|
|
|
4940
4945
|
definition: { direction: "horizontal", gap: "0px", align: "stretch" },
|
|
4941
4946
|
className: E,
|
|
4942
4947
|
style: { flex: 1, minHeight: 0, position: "relative", zIndex: 2 },
|
|
4943
|
-
children:
|
|
4944
|
-
const V =
|
|
4948
|
+
children: Y.map((R, W) => {
|
|
4949
|
+
const V = R.timeframe === k;
|
|
4945
4950
|
return /* @__PURE__ */ d(
|
|
4946
4951
|
ge,
|
|
4947
4952
|
{
|
|
4948
4953
|
definition: { display: "flex", direction: "column", align: "center", justify: "center" },
|
|
4949
4954
|
"data-slot-idx": W,
|
|
4950
|
-
onPointerEnter:
|
|
4951
|
-
onPointerLeave:
|
|
4955
|
+
onPointerEnter: C ? () => D(W, R.timeframe) : void 0,
|
|
4956
|
+
onPointerLeave: z ? P : void 0,
|
|
4952
4957
|
style: {
|
|
4953
4958
|
flex: 1,
|
|
4954
4959
|
minWidth: 0,
|
|
4955
|
-
borderRight: W <
|
|
4960
|
+
borderRight: W < Y.length - 1 ? "1px solid rgba(0,0,0,0.06)" : "none",
|
|
4956
4961
|
padding: "0 4px"
|
|
4957
4962
|
},
|
|
4958
4963
|
children: [
|
|
@@ -4960,7 +4965,7 @@ const pd = function(t) {
|
|
|
4960
4965
|
"span",
|
|
4961
4966
|
{
|
|
4962
4967
|
onClick: p ? (G) => {
|
|
4963
|
-
G.stopPropagation(), p(
|
|
4968
|
+
G.stopPropagation(), p(R.timeframe);
|
|
4964
4969
|
} : void 0,
|
|
4965
4970
|
style: {
|
|
4966
4971
|
fontSize: 9,
|
|
@@ -4973,15 +4978,15 @@ const pd = function(t) {
|
|
|
4973
4978
|
cursor: p ? "pointer" : "default",
|
|
4974
4979
|
transition: "color 150ms ease"
|
|
4975
4980
|
},
|
|
4976
|
-
children:
|
|
4981
|
+
children: R.timeframe
|
|
4977
4982
|
}
|
|
4978
4983
|
),
|
|
4979
4984
|
/* @__PURE__ */ e(
|
|
4980
4985
|
"span",
|
|
4981
4986
|
{
|
|
4982
|
-
title:
|
|
4987
|
+
title: R.formatted.full,
|
|
4983
4988
|
style: {
|
|
4984
|
-
fontSize: fd(
|
|
4989
|
+
fontSize: fd(R.formatted.length),
|
|
4985
4990
|
fontWeight: 700,
|
|
4986
4991
|
color: "var(--color-text-primary, #111827)",
|
|
4987
4992
|
lineHeight: 1.1,
|
|
@@ -4991,10 +4996,10 @@ const pd = function(t) {
|
|
|
4991
4996
|
maxWidth: "100%",
|
|
4992
4997
|
textAlign: "center"
|
|
4993
4998
|
},
|
|
4994
|
-
children:
|
|
4999
|
+
children: R.formatted.display
|
|
4995
5000
|
}
|
|
4996
5001
|
),
|
|
4997
|
-
|
|
5002
|
+
R.trend && /* @__PURE__ */ d("span", { style: {
|
|
4998
5003
|
display: "flex",
|
|
4999
5004
|
alignItems: "center",
|
|
5000
5005
|
gap: 2,
|
|
@@ -5002,14 +5007,14 @@ const pd = function(t) {
|
|
|
5002
5007
|
fontSize: 9,
|
|
5003
5008
|
fontWeight: 600,
|
|
5004
5009
|
lineHeight: 1,
|
|
5005
|
-
color:
|
|
5010
|
+
color: R.trend.direction === "up" ? "var(--color-positive, #10b981)" : R.trend.direction === "down" ? "var(--color-negative, #ef4444)" : "var(--color-text-secondary, #6B7280)"
|
|
5006
5011
|
}, children: [
|
|
5007
|
-
/* @__PURE__ */ e("span", { style: { fontSize: 8 }, children:
|
|
5008
|
-
typeof
|
|
5012
|
+
/* @__PURE__ */ e("span", { style: { fontSize: 8 }, children: R.trend.direction === "up" ? "▲" : R.trend.direction === "down" ? "▼" : "▶" }),
|
|
5013
|
+
typeof R.trend.value == "number" ? `${Math.abs(R.trend.value)}%` : ""
|
|
5009
5014
|
] })
|
|
5010
5015
|
]
|
|
5011
5016
|
},
|
|
5012
|
-
|
|
5017
|
+
R.timeframe
|
|
5013
5018
|
);
|
|
5014
5019
|
})
|
|
5015
5020
|
}
|
|
@@ -5402,39 +5407,39 @@ function Dd(r) {
|
|
|
5402
5407
|
c?.(kd(D));
|
|
5403
5408
|
},
|
|
5404
5409
|
[c]
|
|
5405
|
-
),
|
|
5410
|
+
), w = ee(() => {
|
|
5406
5411
|
const D = /* @__PURE__ */ new Map();
|
|
5407
|
-
return t.map((
|
|
5408
|
-
const T =
|
|
5412
|
+
return t.map((C, z) => {
|
|
5413
|
+
const T = C.id;
|
|
5409
5414
|
if (T != null && T !== "" && T !== "None" && T !== "null" && T !== "undefined") {
|
|
5410
|
-
const
|
|
5411
|
-
return D.set(
|
|
5415
|
+
const A = String(T), M = D.get(A) || 0;
|
|
5416
|
+
return D.set(A, M + 1), M > 0 ? { ...C, id: `${A}__dup${z}` } : C;
|
|
5412
5417
|
}
|
|
5413
|
-
return { ...
|
|
5418
|
+
return { ...C, id: `fallback-${z}` };
|
|
5414
5419
|
});
|
|
5415
|
-
}, [t]),
|
|
5420
|
+
}, [t]), S = N(
|
|
5416
5421
|
(D) => _ ? _(D) : String(D.id),
|
|
5417
5422
|
[_]
|
|
5418
5423
|
), I = N(
|
|
5419
|
-
(D,
|
|
5420
|
-
y?.(D.row, D.field,
|
|
5424
|
+
(D, C) => {
|
|
5425
|
+
y?.(D.row, D.field, C);
|
|
5421
5426
|
},
|
|
5422
5427
|
[y]
|
|
5423
5428
|
);
|
|
5424
5429
|
N(
|
|
5425
|
-
(D,
|
|
5426
|
-
|
|
5430
|
+
(D, C) => {
|
|
5431
|
+
C.preventDefault(), b?.(
|
|
5427
5432
|
D.row,
|
|
5428
5433
|
D.field,
|
|
5429
|
-
|
|
5434
|
+
C.currentTarget
|
|
5430
5435
|
);
|
|
5431
5436
|
},
|
|
5432
5437
|
[b]
|
|
5433
5438
|
);
|
|
5434
5439
|
const g = N(
|
|
5435
|
-
(D,
|
|
5436
|
-
const
|
|
5437
|
-
String(
|
|
5440
|
+
(D, C) => {
|
|
5441
|
+
const z = h.find((A) => A.field === D.field);
|
|
5442
|
+
String(z?.headerClassName || "").includes("narrow-header") && (C.defaultMuiPrevented = !0, v.current?.showColumnMenu(D.field));
|
|
5438
5443
|
},
|
|
5439
5444
|
[h, v]
|
|
5440
5445
|
), P = ee(() => l ? {
|
|
@@ -5491,9 +5496,9 @@ function Dd(r) {
|
|
|
5491
5496
|
/* @__PURE__ */ e(ge, { style: { flex: 1, minHeight: 0, width: "100%", overflow: "hidden" }, children: /* @__PURE__ */ e(
|
|
5492
5497
|
fo,
|
|
5493
5498
|
{
|
|
5494
|
-
rows:
|
|
5499
|
+
rows: w,
|
|
5495
5500
|
columns: h,
|
|
5496
|
-
getRowId:
|
|
5501
|
+
getRowId: S,
|
|
5497
5502
|
apiRef: v,
|
|
5498
5503
|
onColumnHeaderClick: g,
|
|
5499
5504
|
onCellClick: y ? I : void 0,
|
|
@@ -5652,9 +5657,9 @@ const La = () => /* @__PURE__ */ d(
|
|
|
5652
5657
|
return;
|
|
5653
5658
|
}
|
|
5654
5659
|
g.key === "ArrowDown" ? (g.preventDefault(), m((P) => P < v.length - 1 ? P + 1 : P)) : g.key === "ArrowUp" ? (g.preventDefault(), m((P) => P > 0 ? P - 1 : -1)) : g.key === "Enter" ? (g.preventDefault(), p >= 0 && p < v.length ? k(v[p]) : r.trim() && n?.(r.trim())) : g.key === "Escape" && (g.preventDefault(), f.current?.blur());
|
|
5655
|
-
}, [h, p, v, r, k, n]),
|
|
5660
|
+
}, [h, p, v, r, k, n]), w = N(() => {
|
|
5656
5661
|
y.current && (clearTimeout(y.current), y.current = null), u(!0);
|
|
5657
|
-
}, []),
|
|
5662
|
+
}, []), S = N(() => {
|
|
5658
5663
|
y.current = setTimeout(() => {
|
|
5659
5664
|
u(!1), m(-1);
|
|
5660
5665
|
}, 150);
|
|
@@ -5736,8 +5741,8 @@ const La = () => /* @__PURE__ */ d(
|
|
|
5736
5741
|
ref: f,
|
|
5737
5742
|
value: r,
|
|
5738
5743
|
onChange: (g) => t(g.target.value),
|
|
5739
|
-
onFocus:
|
|
5740
|
-
onBlur:
|
|
5744
|
+
onFocus: w,
|
|
5745
|
+
onBlur: S,
|
|
5741
5746
|
onKeyDown: E,
|
|
5742
5747
|
placeholder: "",
|
|
5743
5748
|
style: {
|
|
@@ -5957,12 +5962,12 @@ function zd(r, t, a, n, s, i, o, c, l, u) {
|
|
|
5957
5962
|
right: V.right - k.left,
|
|
5958
5963
|
bottom: V.bottom - k.top
|
|
5959
5964
|
};
|
|
5960
|
-
},
|
|
5965
|
+
}, w = E(_), S = E(v), I = h ? E(h) : null, g = I ? [w, S, I] : [w, S], P = s.current?.items, x = P ? E(P) : null, D = h ? i.current?.[o.dimension] : null, C = D ? E(D) : null, z = S.left, T = I ? I.right : S.right, A = Math.max(T - S.left, 300), M = z, O = A, Y = I ? z : 0, j = I ? A : 0, R = k.height + 2;
|
|
5961
5966
|
m((W) => ({
|
|
5962
5967
|
itemPill: x ? { left: x.left, width: x.width, top: x.top, height: x.height } : W.itemPill,
|
|
5963
|
-
itemFilter: { left: M, width: O, top:
|
|
5964
|
-
entityPill:
|
|
5965
|
-
entityFilter: { left:
|
|
5968
|
+
itemFilter: { left: M, width: O, top: R, height: 32 },
|
|
5969
|
+
entityPill: C ? { left: C.left, width: C.width, top: C.top, height: C.height } : W.entityPill,
|
|
5970
|
+
entityFilter: { left: Y, width: j, top: R, height: 32 },
|
|
5966
5971
|
tracks: g
|
|
5967
5972
|
}));
|
|
5968
5973
|
};
|
|
@@ -6024,15 +6029,15 @@ const $d = Z.memo(({
|
|
|
6024
6029
|
id: me.id,
|
|
6025
6030
|
label: me.label || me.name || me.id
|
|
6026
6031
|
}))
|
|
6027
|
-
}), [y, l]), [E,
|
|
6032
|
+
}), [y, l]), [E, w] = H(!1), [S, I] = H(!1), [g, P] = H(null), [x, D] = H(null), [C, z] = H(""), [T, A] = H(""), [M, O] = H(!1), Y = _.entity === "items" && E, j = S, R = Y || j, W = ce(null), V = ce(null), G = ce(null), F = ce(null), X = ce({}), U = ce({}), K = zd(
|
|
6028
6033
|
W,
|
|
6029
6034
|
V,
|
|
6030
6035
|
G,
|
|
6031
6036
|
F,
|
|
6032
|
-
K,
|
|
6033
6037
|
X,
|
|
6038
|
+
U,
|
|
6034
6039
|
_,
|
|
6035
|
-
|
|
6040
|
+
R,
|
|
6036
6041
|
g,
|
|
6037
6042
|
x
|
|
6038
6043
|
), q = ce(_.dimension), te = ce(null);
|
|
@@ -6042,31 +6047,31 @@ const $d = Z.memo(({
|
|
|
6042
6047
|
const he = ce({ id: null, name: null }), oe = ce({ id: null, name: null });
|
|
6043
6048
|
se(() => {
|
|
6044
6049
|
const me = r.entity?.id ?? null, _e = r.entity?.name ?? null, Ge = r.byItem?.id ?? null, Ve = r.byItem?.name ?? null;
|
|
6045
|
-
(me !== he.current.id || _e !== he.current.name) && (he.current = { id: me, name: _e }, me && _e ? (D(_e), I(!0),
|
|
6050
|
+
(me !== he.current.id || _e !== he.current.name) && (he.current = { id: me, name: _e }, me && _e ? (D(_e), I(!0), A("")) : D(null)), (Ge !== oe.current.id || Ve !== oe.current.name) && (oe.current = { id: Ge, name: Ve }, Ge && Ve ? (P(Ve), w(!0), z("")) : P(null));
|
|
6046
6051
|
}, [r.entity?.id, r.entity?.name, r.byItem?.id, r.byItem?.name]);
|
|
6047
6052
|
const be = N((me, _e) => {
|
|
6048
|
-
me === "metric" ? a(_e) : me === "entity" ? (t(_e), _e !== "items" &&
|
|
6053
|
+
me === "metric" ? a(_e) : me === "entity" ? (t(_e), _e !== "items" && w(!1)) : me === "dimension" && n(_e);
|
|
6049
6054
|
}, [a, t, n]), de = N(() => {
|
|
6050
|
-
_.entity === "items" &&
|
|
6055
|
+
_.entity === "items" && w((me) => !me);
|
|
6051
6056
|
}, [_.entity]), ie = N(() => {
|
|
6052
6057
|
I((me) => !me);
|
|
6053
6058
|
}, []), fe = N((me) => {
|
|
6054
|
-
P(me),
|
|
6059
|
+
P(me), z(""), i(me, me);
|
|
6055
6060
|
}, [i]), Ce = N(() => {
|
|
6056
6061
|
P(null), i(null, null);
|
|
6057
6062
|
}, [i]), ke = N((me) => {
|
|
6058
|
-
D(me),
|
|
6063
|
+
D(me), A(""), s(me, me);
|
|
6059
6064
|
}, [s]), Ne = N(() => {
|
|
6060
6065
|
D(null), s(null, null);
|
|
6061
6066
|
}, [s]), Xe = N((me) => {
|
|
6062
6067
|
const _e = me.label || me.name || me.id;
|
|
6063
|
-
P(_e),
|
|
6068
|
+
P(_e), z(""), i(me.id, _e);
|
|
6064
6069
|
}, [i]), we = N((me) => {
|
|
6065
6070
|
const _e = me.label || me.name || me.id;
|
|
6066
|
-
D(_e),
|
|
6071
|
+
D(_e), A(""), s(me.id, _e);
|
|
6067
6072
|
}, [s]);
|
|
6068
6073
|
return /* @__PURE__ */ d("div", { ref: W, className: "gloss-chart-control-bar", children: [
|
|
6069
|
-
|
|
6074
|
+
K.tracks.map((me, _e) => /* @__PURE__ */ e(
|
|
6070
6075
|
"div",
|
|
6071
6076
|
{
|
|
6072
6077
|
className: "gloss-chart-control-bar__track",
|
|
@@ -6078,28 +6083,28 @@ const $d = Z.memo(({
|
|
|
6078
6083
|
/* @__PURE__ */ e(
|
|
6079
6084
|
jr,
|
|
6080
6085
|
{
|
|
6081
|
-
pillLeft:
|
|
6082
|
-
pillWidth:
|
|
6083
|
-
pillTop:
|
|
6084
|
-
pillHeight:
|
|
6085
|
-
filterLeft:
|
|
6086
|
-
filterWidth:
|
|
6087
|
-
filterTop:
|
|
6088
|
-
filterHeight:
|
|
6089
|
-
visible:
|
|
6086
|
+
pillLeft: K.itemPill.left,
|
|
6087
|
+
pillWidth: K.itemPill.width,
|
|
6088
|
+
pillTop: K.itemPill.top,
|
|
6089
|
+
pillHeight: K.itemPill.height,
|
|
6090
|
+
filterLeft: K.itemFilter.left,
|
|
6091
|
+
filterWidth: K.itemFilter.width,
|
|
6092
|
+
filterTop: K.itemFilter.top,
|
|
6093
|
+
filterHeight: K.itemFilter.height,
|
|
6094
|
+
visible: Y
|
|
6090
6095
|
}
|
|
6091
6096
|
),
|
|
6092
6097
|
/* @__PURE__ */ e(
|
|
6093
6098
|
jr,
|
|
6094
6099
|
{
|
|
6095
|
-
pillLeft:
|
|
6096
|
-
pillWidth:
|
|
6097
|
-
pillTop:
|
|
6098
|
-
pillHeight:
|
|
6099
|
-
filterLeft:
|
|
6100
|
-
filterWidth:
|
|
6101
|
-
filterTop:
|
|
6102
|
-
filterHeight:
|
|
6100
|
+
pillLeft: K.entityPill.left,
|
|
6101
|
+
pillWidth: K.entityPill.width,
|
|
6102
|
+
pillTop: K.entityPill.top,
|
|
6103
|
+
pillHeight: K.entityPill.height,
|
|
6104
|
+
filterLeft: K.entityFilter.left,
|
|
6105
|
+
filterWidth: K.entityFilter.width,
|
|
6106
|
+
filterTop: K.entityFilter.top,
|
|
6107
|
+
filterHeight: K.entityFilter.height,
|
|
6103
6108
|
visible: j
|
|
6104
6109
|
}
|
|
6105
6110
|
)
|
|
@@ -6117,9 +6122,9 @@ const $d = Z.memo(({
|
|
|
6117
6122
|
metricGroupRef: V,
|
|
6118
6123
|
entityGroupRef: G,
|
|
6119
6124
|
dimensionGroupRef: F,
|
|
6120
|
-
entityTabRefs:
|
|
6121
|
-
dimensionTabRefs:
|
|
6122
|
-
showItemFilter:
|
|
6125
|
+
entityTabRefs: X,
|
|
6126
|
+
dimensionTabRefs: U,
|
|
6127
|
+
showItemFilter: Y,
|
|
6123
6128
|
showEntityFilter: j,
|
|
6124
6129
|
showDimensionGroup: b,
|
|
6125
6130
|
datePickerSlot: p
|
|
@@ -6128,20 +6133,20 @@ const $d = Z.memo(({
|
|
|
6128
6133
|
/* @__PURE__ */ e("div", { className: "gloss-chart-control-bar__row-2-overlay", children: /* @__PURE__ */ e(
|
|
6129
6134
|
Bn,
|
|
6130
6135
|
{
|
|
6131
|
-
showRow2:
|
|
6132
|
-
showItemFilter:
|
|
6136
|
+
showRow2: R,
|
|
6137
|
+
showItemFilter: Y,
|
|
6133
6138
|
showEntityFilter: j,
|
|
6134
|
-
itemFilterLayout: { left:
|
|
6135
|
-
entityFilterLayout: { left:
|
|
6136
|
-
itemSearch:
|
|
6137
|
-
setItemSearch:
|
|
6139
|
+
itemFilterLayout: { left: K.itemFilter.left, width: K.itemFilter.width },
|
|
6140
|
+
entityFilterLayout: { left: K.entityFilter.left, width: K.entityFilter.width },
|
|
6141
|
+
itemSearch: C,
|
|
6142
|
+
setItemSearch: z,
|
|
6138
6143
|
onItemSubmit: fe,
|
|
6139
6144
|
onItemSelect: Xe,
|
|
6140
6145
|
onItemClear: Ce,
|
|
6141
6146
|
itemFilterValue: g,
|
|
6142
6147
|
itemOptions: u,
|
|
6143
6148
|
entitySearch: T,
|
|
6144
|
-
setEntitySearch:
|
|
6149
|
+
setEntitySearch: A,
|
|
6145
6150
|
onEntitySubmit: ke,
|
|
6146
6151
|
onEntitySelect: we,
|
|
6147
6152
|
onEntityClear: Ne,
|
|
@@ -6649,14 +6654,14 @@ function Wd({
|
|
|
6649
6654
|
orderStatus: i?.status,
|
|
6650
6655
|
tableType: m,
|
|
6651
6656
|
field: f
|
|
6652
|
-
}) : [], [n, s, o, p, i, m, f]),
|
|
6657
|
+
}) : [], [n, s, o, p, i, m, f]), w = ee(() => {
|
|
6653
6658
|
const x = /* @__PURE__ */ new Map();
|
|
6654
6659
|
for (const D of E) {
|
|
6655
|
-
const
|
|
6656
|
-
x.has(
|
|
6660
|
+
const C = D.section;
|
|
6661
|
+
x.has(C) || x.set(C, []), x.get(C).push(D);
|
|
6657
6662
|
}
|
|
6658
6663
|
return x;
|
|
6659
|
-
}, [E]),
|
|
6664
|
+
}, [E]), S = N((x) => ({
|
|
6660
6665
|
row: i,
|
|
6661
6666
|
entityType: o,
|
|
6662
6667
|
entityId: c ?? i.id,
|
|
@@ -6666,9 +6671,9 @@ function Wd({
|
|
|
6666
6671
|
tableType: m,
|
|
6667
6672
|
field: f ?? x.filterKey
|
|
6668
6673
|
}), [i, o, c, l, u, p, m, f]), I = N((x) => {
|
|
6669
|
-
const D =
|
|
6670
|
-
if (
|
|
6671
|
-
|
|
6674
|
+
const D = S(x), C = k;
|
|
6675
|
+
if (C) {
|
|
6676
|
+
C(x, D), a();
|
|
6672
6677
|
return;
|
|
6673
6678
|
}
|
|
6674
6679
|
switch (x.type) {
|
|
@@ -6694,7 +6699,7 @@ function Wd({
|
|
|
6694
6699
|
}
|
|
6695
6700
|
}
|
|
6696
6701
|
a();
|
|
6697
|
-
}, [
|
|
6702
|
+
}, [S, b, _, v, h, k, a]), g = N((x) => {
|
|
6698
6703
|
const D = x.labelFn ? x.labelFn(i, o) : x.label;
|
|
6699
6704
|
return (x.disabled ? x.disabled(i) : !1) ? /* @__PURE__ */ e(ht, { title: x.disabledTooltip || "", placement: "left", enterDelay: 300, children: /* @__PURE__ */ e("span", { children: /* @__PURE__ */ d(jt, { disabled: !0, className: "gloss-unified-context-menu__item--disabled", children: [
|
|
6700
6705
|
/* @__PURE__ */ e(Je, { icon: Wa(x.icon), definition: { size: "sm" }, style: { marginRight: 8, flexShrink: 0 } }),
|
|
@@ -6720,19 +6725,19 @@ function Wd({
|
|
|
6720
6725
|
}, [i, o, I]), P = ee(() => {
|
|
6721
6726
|
const x = [];
|
|
6722
6727
|
let D = 0;
|
|
6723
|
-
for (const
|
|
6724
|
-
const
|
|
6725
|
-
if (!(!
|
|
6726
|
-
D > 0 && x.push(/* @__PURE__ */ e(en, { className: "gloss-unified-context-menu__divider" }, `divider-${
|
|
6727
|
-
for (const T of
|
|
6728
|
-
const
|
|
6729
|
-
|
|
6728
|
+
for (const C of Hd) {
|
|
6729
|
+
const z = w.get(C);
|
|
6730
|
+
if (!(!z || z.length === 0)) {
|
|
6731
|
+
D > 0 && x.push(/* @__PURE__ */ e(en, { className: "gloss-unified-context-menu__divider" }, `divider-${C}`));
|
|
6732
|
+
for (const T of z) {
|
|
6733
|
+
const A = g(T);
|
|
6734
|
+
A && x.push(A);
|
|
6730
6735
|
}
|
|
6731
6736
|
D++;
|
|
6732
6737
|
}
|
|
6733
6738
|
}
|
|
6734
6739
|
return x;
|
|
6735
|
-
}, [
|
|
6740
|
+
}, [w, g]);
|
|
6736
6741
|
return /* @__PURE__ */ e(
|
|
6737
6742
|
go,
|
|
6738
6743
|
{
|
|
@@ -6790,9 +6795,9 @@ const Kr = ({
|
|
|
6790
6795
|
l && l(r, !p);
|
|
6791
6796
|
}, [r, p, l]), E = N((I) => {
|
|
6792
6797
|
s(I), h();
|
|
6793
|
-
}, [s, h]),
|
|
6798
|
+
}, [s, h]), w = N((I, g) => {
|
|
6794
6799
|
I.stopPropagation(), o && o(g);
|
|
6795
|
-
}, [o]),
|
|
6800
|
+
}, [o]), S = /* @__PURE__ */ d(
|
|
6796
6801
|
ne,
|
|
6797
6802
|
{
|
|
6798
6803
|
ref: u,
|
|
@@ -6887,7 +6892,7 @@ const Kr = ({
|
|
|
6887
6892
|
qe,
|
|
6888
6893
|
{
|
|
6889
6894
|
size: "small",
|
|
6890
|
-
onClick: (x) =>
|
|
6895
|
+
onClick: (x) => w(x, I.id),
|
|
6891
6896
|
sx: {
|
|
6892
6897
|
p: 0.25,
|
|
6893
6898
|
opacity: P ? 1 : 0,
|
|
@@ -6922,9 +6927,9 @@ const Kr = ({
|
|
|
6922
6927
|
modifiers: [{ name: "offset", options: { offset: [0, -9] } }]
|
|
6923
6928
|
}
|
|
6924
6929
|
},
|
|
6925
|
-
children:
|
|
6930
|
+
children: S
|
|
6926
6931
|
}
|
|
6927
|
-
) :
|
|
6932
|
+
) : S;
|
|
6928
6933
|
};
|
|
6929
6934
|
Kr.displayName = "ExpandableChip";
|
|
6930
6935
|
const Vd = ["S", "M", "T", "W", "T", "F", "S"], Ga = {
|
|
@@ -6996,71 +7001,71 @@ const Vd = ["S", "M", "T", "W", "T", "F", "S"], Ga = {
|
|
|
6996
7001
|
}, [r, t]), se(() => {
|
|
6997
7002
|
l && y(new Date(l.getFullYear(), l.getMonth(), 1));
|
|
6998
7003
|
}, [l]);
|
|
6999
|
-
const E = f.getFullYear(),
|
|
7000
|
-
y(new Date(E,
|
|
7001
|
-
}, [E,
|
|
7002
|
-
y(new Date(E,
|
|
7003
|
-
}, [E,
|
|
7004
|
-
const
|
|
7005
|
-
y(new Date(E,
|
|
7006
|
-
}, [E]),
|
|
7007
|
-
const
|
|
7008
|
-
y(new Date(
|
|
7009
|
-
}, [
|
|
7010
|
-
(K) => K.startDate && K.endDate && F >= K.startDate && F <= K.endDate
|
|
7011
|
-
), [n]), T = N((F) => n.filter(
|
|
7004
|
+
const E = f.getFullYear(), w = f.getMonth(), S = new Date(E, w + 1, 0).getDate(), I = new Date(E, w, 1).getDay(), g = f.toLocaleDateString("en-US", { month: "long", year: "numeric" }), P = N(() => {
|
|
7005
|
+
y(new Date(E, w - 1, 1));
|
|
7006
|
+
}, [E, w]), x = N(() => {
|
|
7007
|
+
y(new Date(E, w + 1, 1));
|
|
7008
|
+
}, [E, w]), D = N((F) => {
|
|
7009
|
+
const X = F.target.value;
|
|
7010
|
+
y(new Date(E, X, 1));
|
|
7011
|
+
}, [E]), C = N((F) => {
|
|
7012
|
+
const X = F.target.value;
|
|
7013
|
+
y(new Date(X, w, 1));
|
|
7014
|
+
}, [w]), z = N((F) => n.some(
|
|
7012
7015
|
(X) => X.startDate && X.endDate && F >= X.startDate && F <= X.endDate
|
|
7013
|
-
)
|
|
7016
|
+
), [n]), T = N((F) => n.filter(
|
|
7017
|
+
(U) => U.startDate && U.endDate && F >= U.startDate && F <= U.endDate
|
|
7018
|
+
).map((U) => U.label).join(", "), [n]), A = N((F) => {
|
|
7014
7019
|
if (!r) return !1;
|
|
7015
|
-
const
|
|
7016
|
-
return
|
|
7020
|
+
const X = v || t;
|
|
7021
|
+
return X ? co(F, r, X) : !1;
|
|
7017
7022
|
}, [r, t, v]), M = N((F) => !F || !r ? !1 : rr(F, r), [r]), O = N((F) => {
|
|
7018
7023
|
if (!F) return !1;
|
|
7019
|
-
const
|
|
7020
|
-
return
|
|
7021
|
-
}, [t, v]),
|
|
7024
|
+
const X = v || t;
|
|
7025
|
+
return X ? rr(F, X) : !1;
|
|
7026
|
+
}, [t, v]), Y = N((F) => {
|
|
7022
7027
|
if (!F || !r) return !1;
|
|
7023
|
-
const
|
|
7024
|
-
return
|
|
7025
|
-
}, [r, t, v, M]), j = N((F) => F ? !!(m && F > m) : !1, [m]),
|
|
7026
|
-
const
|
|
7027
|
-
b ? (k.current = !0, r &&
|
|
7028
|
-
}, [E,
|
|
7029
|
-
b && h(new Date(E,
|
|
7030
|
-
}, [b, E,
|
|
7028
|
+
const X = v || t;
|
|
7029
|
+
return X ? rr(r, X) && M(F) : M(F);
|
|
7030
|
+
}, [r, t, v, M]), j = N((F) => F ? !!(m && F > m) : !1, [m]), R = N((F) => {
|
|
7031
|
+
const X = new Date(E, w, F);
|
|
7032
|
+
b ? (k.current = !0, r && X < r ? a(X, r) : a(r, X), _(!1), h(null)) : (k.current = !0, a(X, null), _(!0));
|
|
7033
|
+
}, [E, w, r, b, a]), W = N((F) => {
|
|
7034
|
+
b && h(new Date(E, w, F));
|
|
7035
|
+
}, [b, E, w]), V = N(() => {
|
|
7031
7036
|
h(null);
|
|
7032
7037
|
}, []), G = ee(() => {
|
|
7033
7038
|
const F = [];
|
|
7034
|
-
for (let
|
|
7039
|
+
for (let U = 0; U < I; U++)
|
|
7035
7040
|
F.push(
|
|
7036
7041
|
/* @__PURE__ */ e(
|
|
7037
7042
|
ne,
|
|
7038
7043
|
{
|
|
7039
7044
|
className: "mini-calendar__day mini-calendar__day--empty"
|
|
7040
7045
|
},
|
|
7041
|
-
`empty-${
|
|
7046
|
+
`empty-${U}`
|
|
7042
7047
|
)
|
|
7043
7048
|
);
|
|
7044
|
-
const
|
|
7045
|
-
for (let
|
|
7046
|
-
const
|
|
7049
|
+
const X = /* @__PURE__ */ new Date();
|
|
7050
|
+
for (let U = 1; U <= S; U++) {
|
|
7051
|
+
const K = new Date(E, w, U), q = A(K), te = M(K), he = O(K), oe = Y(K), be = j(K), de = z(K), ie = rr(K, X), fe = ["mini-calendar__day"];
|
|
7047
7052
|
be ? (fe.push("mini-calendar__day--disabled"), he ? fe.push("mini-calendar__day--disabled-end") : q && fe.push("mini-calendar__day--disabled-in-range"), de && fe.push("mini-calendar__day--market")) : (oe ? fe.push("mini-calendar__day--single") : te ? fe.push("mini-calendar__day--start") : he ? fe.push("mini-calendar__day--end") : q && fe.push("mini-calendar__day--in-range"), (oe || te || he || q) && (u === "secondary" ? fe.push("mini-calendar__day--secondary") : u === "tertiary" && fe.push("mini-calendar__day--tertiary")), ie && !te && !he && !oe && fe.push("mini-calendar__day--today"), de && fe.push("mini-calendar__day--market"));
|
|
7048
7053
|
const Ce = /* @__PURE__ */ e(
|
|
7049
7054
|
ne,
|
|
7050
7055
|
{
|
|
7051
7056
|
component: "button",
|
|
7052
|
-
onClick: be ? void 0 : () =>
|
|
7053
|
-
onMouseEnter: be ? void 0 : () => W(
|
|
7057
|
+
onClick: be ? void 0 : () => R(U),
|
|
7058
|
+
onMouseEnter: be ? void 0 : () => W(U),
|
|
7054
7059
|
className: fe.join(" "),
|
|
7055
7060
|
sx: {
|
|
7056
7061
|
border: "none",
|
|
7057
7062
|
fontFamily: "inherit"
|
|
7058
7063
|
},
|
|
7059
|
-
children:
|
|
7064
|
+
children: U
|
|
7060
7065
|
}
|
|
7061
7066
|
);
|
|
7062
7067
|
if (de && !be) {
|
|
7063
|
-
const ke = T(
|
|
7068
|
+
const ke = T(K);
|
|
7064
7069
|
F.push(
|
|
7065
7070
|
/* @__PURE__ */ e(
|
|
7066
7071
|
ht,
|
|
@@ -7075,16 +7080,16 @@ const Vd = ["S", "M", "T", "W", "T", "F", "S"], Ga = {
|
|
|
7075
7080
|
},
|
|
7076
7081
|
children: Ce
|
|
7077
7082
|
},
|
|
7078
|
-
|
|
7083
|
+
U
|
|
7079
7084
|
)
|
|
7080
7085
|
);
|
|
7081
7086
|
} else
|
|
7082
7087
|
F.push(
|
|
7083
|
-
/* @__PURE__ */ e(Z.Fragment, { children: Ce },
|
|
7088
|
+
/* @__PURE__ */ e(Z.Fragment, { children: Ce }, U)
|
|
7084
7089
|
);
|
|
7085
7090
|
}
|
|
7086
7091
|
return F;
|
|
7087
|
-
}, [E,
|
|
7092
|
+
}, [E, w, S, I, A, M, O, Y, j, z, T, R, W, u]);
|
|
7088
7093
|
return /* @__PURE__ */ d(
|
|
7089
7094
|
ne,
|
|
7090
7095
|
{
|
|
@@ -7105,7 +7110,7 @@ const Vd = ["S", "M", "T", "W", "T", "F", "S"], Ga = {
|
|
|
7105
7110
|
/* @__PURE__ */ e(
|
|
7106
7111
|
Ca,
|
|
7107
7112
|
{
|
|
7108
|
-
value:
|
|
7113
|
+
value: w,
|
|
7109
7114
|
onChange: D,
|
|
7110
7115
|
variant: "standard",
|
|
7111
7116
|
disableUnderline: !0,
|
|
@@ -7125,14 +7130,14 @@ const Vd = ["S", "M", "T", "W", "T", "F", "S"], Ga = {
|
|
|
7125
7130
|
sx: { maxHeight: 200 }
|
|
7126
7131
|
}
|
|
7127
7132
|
},
|
|
7128
|
-
children: jd.map((F,
|
|
7133
|
+
children: jd.map((F, X) => /* @__PURE__ */ e(jt, { value: X, sx: { fontSize: 13 }, children: F }, X))
|
|
7129
7134
|
}
|
|
7130
7135
|
),
|
|
7131
7136
|
/* @__PURE__ */ e(
|
|
7132
7137
|
Ca,
|
|
7133
7138
|
{
|
|
7134
7139
|
value: E,
|
|
7135
|
-
onChange:
|
|
7140
|
+
onChange: C,
|
|
7136
7141
|
variant: "standard",
|
|
7137
7142
|
disableUnderline: !0,
|
|
7138
7143
|
sx: {
|
|
@@ -7157,13 +7162,13 @@ const Vd = ["S", "M", "T", "W", "T", "F", "S"], Ga = {
|
|
|
7157
7162
|
] }) : /* @__PURE__ */ e(Te, { variant: "body2", fontWeight: 500, children: g }),
|
|
7158
7163
|
/* @__PURE__ */ e(qe, { onClick: x, size: "small", sx: { p: 0.5 }, children: /* @__PURE__ */ e(Uo, { fontSize: "small" }) })
|
|
7159
7164
|
] }),
|
|
7160
|
-
/* @__PURE__ */ e(ne, { className: "mini-calendar__grid", children: Vd.map((F,
|
|
7165
|
+
/* @__PURE__ */ e(ne, { className: "mini-calendar__grid", children: Vd.map((F, X) => /* @__PURE__ */ e(
|
|
7161
7166
|
ne,
|
|
7162
7167
|
{
|
|
7163
7168
|
className: "mini-calendar__day-header",
|
|
7164
7169
|
children: F
|
|
7165
7170
|
},
|
|
7166
|
-
`header-${
|
|
7171
|
+
`header-${X}`
|
|
7167
7172
|
)) }),
|
|
7168
7173
|
/* @__PURE__ */ e(ne, { className: "mini-calendar__grid", children: G }),
|
|
7169
7174
|
(o || b) && /* @__PURE__ */ d(ne, { className: "mini-calendar__legend", children: [
|
|
@@ -7323,9 +7328,9 @@ const Yd = {
|
|
|
7323
7328
|
const h = ee(() => ({
|
|
7324
7329
|
...Yd,
|
|
7325
7330
|
...u
|
|
7326
|
-
}), [u]), k = ce(null), [E,
|
|
7327
|
-
|
|
7328
|
-
}, [v]), [te, he] = H("A"), [oe, be] = H(() => h.lastPresetB ?? null), [de, ie] = H(null), [fe, Ce] = H(null), [ke, Ne] = H(null), [Xe, we] = H(null), [me, _e] = H(null), [Ge, Ve] = H(null), [ae, xe] = H(null), [je, $e] = H(null), [De, Re] = H(null), [Pe, Ke] = H(null), [xt, Fe] = H(null), [Ee, it] = H(1), [Jt, tt] = H(!1), [lt, Et] = H(void 0), Be = j !== null ? j :
|
|
7331
|
+
}), [u]), k = ce(null), [E, w] = H(null), [S, I] = H("calendar"), [g, P] = H(null), [x, D] = H(null), C = ce(null), [z, T] = H(() => h.lastPreset || "mtd"), [A, M] = H(null), [O, Y] = H(null), [j, R] = H(null), [W, V] = H(null), [G, F] = H(null), [X, U] = H(() => a ? _ ?? h.compareEnabled ?? !1 : !1), K = _ ?? X, q = N(($) => {
|
|
7332
|
+
U($), v?.($);
|
|
7333
|
+
}, [v]), [te, he] = H("A"), [oe, be] = H(() => h.lastPresetB ?? null), [de, ie] = H(null), [fe, Ce] = H(null), [ke, Ne] = H(null), [Xe, we] = H(null), [me, _e] = H(null), [Ge, Ve] = H(null), [ae, xe] = H(null), [je, $e] = H(null), [De, Re] = H(null), [Pe, Ke] = H(null), [xt, Fe] = H(null), [Ee, it] = H(1), [Jt, tt] = H(!1), [lt, Et] = H(void 0), Be = j !== null ? j : z, Mt = j !== null ? W : A, mt = j !== null ? G : O, ct = ke !== null ? ke : oe, Pt = ke !== null ? Xe : de, Rt = ke !== null ? me : fe, dt = De !== null ? De : Ge, Bt = De !== null ? Pe : ae, At = De !== null ? xt : je, oa = j !== null && (j !== z || W !== A || G !== O), [pe, _r] = H(() => {
|
|
7329
7334
|
const $ = m || ar, L = f || [], Q = new Set(L.map((ue) => ue.id)), re = $.filter((ue) => !Q.has(ue.id)).map((ue) => ({ ...ue, active: St(ue) })), le = L.map((ue) => ({
|
|
7330
7335
|
...ue,
|
|
7331
7336
|
active: St(ue)
|
|
@@ -7361,8 +7366,8 @@ const Yd = {
|
|
|
7361
7366
|
};
|
|
7362
7367
|
}, [xr, Nr, m]), pt = o || !!E;
|
|
7363
7368
|
se(() => {
|
|
7364
|
-
o && j === null && (
|
|
7365
|
-
}, [o, j,
|
|
7369
|
+
o && j === null && (R(z), V(A), F(O));
|
|
7370
|
+
}, [o, j, z, A, O]);
|
|
7366
7371
|
const He = ee(
|
|
7367
7372
|
() => pe.find(($) => $.active),
|
|
7368
7373
|
[pe]
|
|
@@ -7394,24 +7399,24 @@ const Yd = {
|
|
|
7394
7399
|
const le = nr(rt.start, rt.end, $, pe);
|
|
7395
7400
|
re = le ? le.id : null;
|
|
7396
7401
|
}
|
|
7397
|
-
re ? (T(re), M(null),
|
|
7402
|
+
re ? (T(re), M(null), Y(null)) : (T("custom"), M(rt.start), Y(rt.end)), R(null), V(null), F(null);
|
|
7398
7403
|
}, [rt.start?.getTime(), rt.end?.getTime(), pe, h.lastPreset]);
|
|
7399
7404
|
const Un = ee(() => {
|
|
7400
7405
|
let $, L;
|
|
7401
|
-
if (
|
|
7402
|
-
$ =
|
|
7406
|
+
if (z === "custom" && A && O)
|
|
7407
|
+
$ = A, L = O;
|
|
7403
7408
|
else {
|
|
7404
|
-
const re = pe.find((le) => le.id ===
|
|
7409
|
+
const re = pe.find((le) => le.id === z);
|
|
7405
7410
|
if (re)
|
|
7406
7411
|
$ = re.startDate, L = re.endDate;
|
|
7407
7412
|
else {
|
|
7408
|
-
const le = Ye(
|
|
7413
|
+
const le = Ye(z);
|
|
7409
7414
|
$ = le.start, L = le.end;
|
|
7410
7415
|
}
|
|
7411
7416
|
}
|
|
7412
7417
|
return Ot($, L, /* @__PURE__ */ new Date(), pe).display;
|
|
7413
|
-
}, [
|
|
7414
|
-
if (!
|
|
7418
|
+
}, [z, A, O, pe]), Xn = ee(() => {
|
|
7419
|
+
if (!K || !oe) return null;
|
|
7415
7420
|
let $, L;
|
|
7416
7421
|
if (oe === "custom" && de && fe)
|
|
7417
7422
|
$ = de, L = fe;
|
|
@@ -7425,16 +7430,16 @@ const Yd = {
|
|
|
7425
7430
|
}
|
|
7426
7431
|
}
|
|
7427
7432
|
return Ot($, L, /* @__PURE__ */ new Date(), pe).display;
|
|
7428
|
-
}, [
|
|
7429
|
-
const $ = ["7d", "30d", "60d", "90d", "mtd", "qtd", "ytd", "lytd"], L = pe.find((Q) => Q.id ===
|
|
7433
|
+
}, [K, oe, de, fe, pe]), da = ee(() => {
|
|
7434
|
+
const $ = ["7d", "30d", "60d", "90d", "mtd", "qtd", "ytd", "lytd"], L = pe.find((Q) => Q.id === z);
|
|
7430
7435
|
if (L)
|
|
7431
7436
|
return ft(L.startDate, L.endDate, /* @__PURE__ */ new Date());
|
|
7432
|
-
if ($.includes(
|
|
7433
|
-
const { start: Q, end: re } = Ye(
|
|
7437
|
+
if ($.includes(z)) {
|
|
7438
|
+
const { start: Q, end: re } = Ye(z);
|
|
7434
7439
|
return ft(Q, re, /* @__PURE__ */ new Date());
|
|
7435
7440
|
}
|
|
7436
7441
|
return "";
|
|
7437
|
-
}, [
|
|
7442
|
+
}, [z, pe]), ua = ee(() => {
|
|
7438
7443
|
let $, L;
|
|
7439
7444
|
if (Be === "custom" && Mt && mt)
|
|
7440
7445
|
$ = Mt, L = mt;
|
|
@@ -7451,7 +7456,7 @@ const Yd = {
|
|
|
7451
7456
|
return Q.preset ? `${Q.preset.label} (${re})` : re;
|
|
7452
7457
|
}, [Be, Mt, mt, pe]);
|
|
7453
7458
|
ee(() => {
|
|
7454
|
-
if (!
|
|
7459
|
+
if (!K || !ct) return null;
|
|
7455
7460
|
let $, L;
|
|
7456
7461
|
if (ct === "custom" && Pt && Rt)
|
|
7457
7462
|
$ = Pt, L = Rt;
|
|
@@ -7466,8 +7471,8 @@ const Yd = {
|
|
|
7466
7471
|
}
|
|
7467
7472
|
const Q = Ot($, L, /* @__PURE__ */ new Date(), pe), re = ft($, L, /* @__PURE__ */ new Date());
|
|
7468
7473
|
return Q.preset ? `${Q.preset.label} (${re})` : re;
|
|
7469
|
-
}, [
|
|
7470
|
-
if (!
|
|
7474
|
+
}, [K, ct, Pt, Rt, pe]), ee(() => {
|
|
7475
|
+
if (!K || Ee < 3 || !dt) return null;
|
|
7471
7476
|
let $, L;
|
|
7472
7477
|
if (dt === "custom" && Bt && At)
|
|
7473
7478
|
$ = Bt, L = At;
|
|
@@ -7482,10 +7487,10 @@ const Yd = {
|
|
|
7482
7487
|
}
|
|
7483
7488
|
const Q = Ot($, L, /* @__PURE__ */ new Date(), pe), re = ft($, L, /* @__PURE__ */ new Date());
|
|
7484
7489
|
return Q.preset ? `${Q.preset.label} (${re})` : re;
|
|
7485
|
-
}, [
|
|
7490
|
+
}, [K, Ee, dt, Bt, At, pe]);
|
|
7486
7491
|
const qn = N(($) => {
|
|
7487
|
-
|
|
7488
|
-
}, [
|
|
7492
|
+
R(z), V(A), F(O), K && (Ne(oe), we(de), _e(fe), Ee >= 3 && (Re(Ge), Ke(ae), Fe(je))), w($.currentTarget);
|
|
7493
|
+
}, [z, A, O, K, Ee, oe, de, fe, Ge, ae, je]), ma = N(($, L, Q) => {
|
|
7489
7494
|
const re = [$, L];
|
|
7490
7495
|
Q && (re.shortcutId = sr(Q)), t(re);
|
|
7491
7496
|
}, [t]), er = N(($, L, Q) => {
|
|
@@ -7500,9 +7505,9 @@ const Yd = {
|
|
|
7500
7505
|
p && p({ ...h, ...$ });
|
|
7501
7506
|
}, [p, h]), tr = N(() => {
|
|
7502
7507
|
if (j === null) return;
|
|
7503
|
-
T(j), M(W),
|
|
7508
|
+
T(j), M(W), Y(G);
|
|
7504
7509
|
const $ = er(j, W, G);
|
|
7505
|
-
if (
|
|
7510
|
+
if (K && Ee >= 2 && ke !== null) {
|
|
7506
7511
|
be(ke), ie(Xe), Ce(me);
|
|
7507
7512
|
const L = er(ke, Xe, me), Q = {
|
|
7508
7513
|
rangeA: $,
|
|
@@ -7537,15 +7542,15 @@ const Yd = {
|
|
|
7537
7542
|
lastPresetB: null,
|
|
7538
7543
|
lastPresetC: null
|
|
7539
7544
|
}), ma($[0], $[1], j);
|
|
7540
|
-
}, [j, W, G,
|
|
7541
|
-
o || (oa && tr(),
|
|
7545
|
+
}, [j, W, G, K, Ee, ke, Xe, me, De, Pe, xt, er, t, ma, at]), Zn = N(() => {
|
|
7546
|
+
o || (oa && tr(), R(null), V(null), F(null), Ne(null), we(null), _e(null), Re(null), Ke(null), Fe(null), D(null), w(null));
|
|
7542
7547
|
}, [o, oa, tr]), pa = N(() => {
|
|
7543
|
-
o || (
|
|
7548
|
+
o || (R(null), V(null), F(null), Ne(null), we(null), _e(null), Re(null), Ke(null), Fe(null), D(null), w(null));
|
|
7544
7549
|
}, [o]), fa = N(() => {
|
|
7545
7550
|
if (Ee >= 3) return;
|
|
7546
|
-
const $ = j !== null ? j :
|
|
7551
|
+
const $ = j !== null ? j : z;
|
|
7547
7552
|
Ee === 1 ? (q(!0), it(2), Ne($), he("B"), tt(!0)) : Ee === 2 && (it(3), Re($), he("C"));
|
|
7548
|
-
}, [Ee, j,
|
|
7553
|
+
}, [Ee, j, z, q]), ga = N(($) => {
|
|
7549
7554
|
$ === "C" ? (it(2), Re(null), Ke(null), Fe(null), Ve(null), xe(null), $e(null), te === "C" && he("B")) : $ === "B" && Ee === 2 && (q(!1), it(1), Ne(null), we(null), _e(null), be(null), ie(null), Ce(null), he("A"), tt(!1), at({
|
|
7550
7555
|
compareEnabled: !1,
|
|
7551
7556
|
rangeCount: 1,
|
|
@@ -7560,20 +7565,20 @@ const Yd = {
|
|
|
7560
7565
|
lastPresetC: null
|
|
7561
7566
|
});
|
|
7562
7567
|
}, [q, at]), Sr = N(($) => {
|
|
7563
|
-
|
|
7564
|
-
}, [
|
|
7568
|
+
C.current && (clearTimeout(C.current), C.current = null), D(null), K && te === "C" ? (Re($), Ke(null), Fe(null)) : K && te === "B" ? (Ne($), we(null), _e(null)) : (R($), V(null), F(null));
|
|
7569
|
+
}, [K, te]), Ft = N(($) => {
|
|
7565
7570
|
if (!pe.find((re) => re.id === $)) return;
|
|
7566
7571
|
const Q = h.pinnedPreset || "mtd";
|
|
7567
|
-
|
|
7568
|
-
}, [pe,
|
|
7569
|
-
if (
|
|
7572
|
+
K && te === "C" ? (Re((De !== null ? De : Ge) === $ ? Q : $), Ke(null), Fe(null)) : K && te === "B" ? (Ne((ke !== null ? ke : oe) === $ ? Q : $), we(null), _e(null)) : (R((j !== null ? j : z) === $ ? Q : $), V(null), F(null));
|
|
7573
|
+
}, [pe, K, te, h.pinnedPreset, j, z, ke, oe, De, Ge]), Qn = N(($, L) => {
|
|
7574
|
+
if (K && te === "C")
|
|
7570
7575
|
if (Ke($), L) {
|
|
7571
7576
|
Fe(L);
|
|
7572
7577
|
const Q = nr($, L, /* @__PURE__ */ new Date(), pe);
|
|
7573
7578
|
Q ? (Re(Q.id), Ke(null), Fe(null)) : Re("custom");
|
|
7574
7579
|
} else
|
|
7575
7580
|
Re("custom"), Fe(null);
|
|
7576
|
-
else if (
|
|
7581
|
+
else if (K && te === "B")
|
|
7577
7582
|
if (we($), L) {
|
|
7578
7583
|
_e(L);
|
|
7579
7584
|
const Q = nr($, L, /* @__PURE__ */ new Date(), pe);
|
|
@@ -7583,17 +7588,17 @@ const Yd = {
|
|
|
7583
7588
|
else if (V($), L) {
|
|
7584
7589
|
F(L);
|
|
7585
7590
|
const Q = nr($, L, /* @__PURE__ */ new Date(), pe);
|
|
7586
|
-
Q ? (
|
|
7591
|
+
Q ? (R(Q.id), V(null), F(null)) : R("custom");
|
|
7587
7592
|
} else
|
|
7588
|
-
|
|
7589
|
-
}, [pe,
|
|
7590
|
-
at({ pinnedPreset: $ }),
|
|
7591
|
-
}, [
|
|
7592
|
-
|
|
7593
|
+
R("custom"), F(null);
|
|
7594
|
+
}, [pe, K, te]), ha = N(($) => {
|
|
7595
|
+
at({ pinnedPreset: $ }), K && te === "C" ? (Re($), Ke(null), Fe(null)) : K && te === "B" ? (Ne($), we(null), _e(null)) : (R($), V(null), F(null));
|
|
7596
|
+
}, [K, te, at]), ba = N(($, L) => {
|
|
7597
|
+
C.current && (clearTimeout(C.current), C.current = null), L ? D($) : C.current = setTimeout(() => {
|
|
7593
7598
|
D(null);
|
|
7594
7599
|
}, 150);
|
|
7595
7600
|
}, []), ya = N(() => {
|
|
7596
|
-
tr(),
|
|
7601
|
+
tr(), R(null), V(null), F(null), w(null);
|
|
7597
7602
|
}, [tr]), es = N(() => {
|
|
7598
7603
|
let $;
|
|
7599
7604
|
if (Be === "custom" && mt)
|
|
@@ -7679,9 +7684,9 @@ const Yd = {
|
|
|
7679
7684
|
}, [pe]), ns = N(() => {
|
|
7680
7685
|
tt(($) => !$);
|
|
7681
7686
|
}, []), ss = N(() => {
|
|
7682
|
-
const $ = j !== null ? j :
|
|
7687
|
+
const $ = j !== null ? j : z;
|
|
7683
7688
|
q(!0), it(2), Ne($), he("B"), tt(!0);
|
|
7684
|
-
}, [j,
|
|
7689
|
+
}, [j, z, q]), wr = N(({ label: $, isActive: L, presetName: Q, dateRange: re, color: le, onSelect: ue, onRemove: ze }) => {
|
|
7685
7690
|
const xa = !Q || Q === "Select...";
|
|
7686
7691
|
return /* @__PURE__ */ d(
|
|
7687
7692
|
ne,
|
|
@@ -7750,11 +7755,11 @@ const Yd = {
|
|
|
7750
7755
|
bgcolor: pt ? "rgba(79, 70, 229, 0.9)" : "rgba(0, 0, 0, 0.04)",
|
|
7751
7756
|
border: "none"
|
|
7752
7757
|
},
|
|
7753
|
-
...
|
|
7758
|
+
...K && !pt ? {
|
|
7754
7759
|
color: "secondary.main"
|
|
7755
7760
|
} : {}
|
|
7756
7761
|
},
|
|
7757
|
-
children:
|
|
7762
|
+
children: K && Xn ? /* @__PURE__ */ d(ne, { sx: { display: "flex", alignItems: "center", gap: 0.5 }, children: [
|
|
7758
7763
|
/* @__PURE__ */ e(Ko, { sx: { fontSize: 14, color: "secondary.main" } }),
|
|
7759
7764
|
/* @__PURE__ */ e("span", { children: "Compare" })
|
|
7760
7765
|
] }) : Un
|
|
@@ -7913,7 +7918,7 @@ const Yd = {
|
|
|
7913
7918
|
{
|
|
7914
7919
|
size: "small",
|
|
7915
7920
|
onClick: () => I("calendar"),
|
|
7916
|
-
color:
|
|
7921
|
+
color: S === "calendar" ? "primary" : "default",
|
|
7917
7922
|
sx: { p: 0.5 },
|
|
7918
7923
|
children: /* @__PURE__ */ e(wa, { sx: { fontSize: 16 } })
|
|
7919
7924
|
}
|
|
@@ -7923,7 +7928,7 @@ const Yd = {
|
|
|
7923
7928
|
{
|
|
7924
7929
|
size: "small",
|
|
7925
7930
|
onClick: () => I("markets"),
|
|
7926
|
-
color:
|
|
7931
|
+
color: S === "markets" ? "primary" : "default",
|
|
7927
7932
|
sx: {
|
|
7928
7933
|
p: 0.5,
|
|
7929
7934
|
position: "relative"
|
|
@@ -7950,8 +7955,8 @@ const Yd = {
|
|
|
7950
7955
|
) })
|
|
7951
7956
|
] }),
|
|
7952
7957
|
/* @__PURE__ */ d(ne, { className: "hybrid-date-picker__content", children: [
|
|
7953
|
-
|
|
7954
|
-
const L =
|
|
7958
|
+
S === "calendar" && (() => {
|
|
7959
|
+
const L = K && te === "C" ? dt : K && te === "B" ? ct : Be, Q = K && te === "C" ? Bt : K && te === "B" ? Pt : Mt, re = K && te === "C" ? At : K && te === "B" ? Rt : mt;
|
|
7955
7960
|
return /* @__PURE__ */ e(
|
|
7956
7961
|
An,
|
|
7957
7962
|
{
|
|
@@ -7961,11 +7966,11 @@ const Yd = {
|
|
|
7961
7966
|
marketDates: pe,
|
|
7962
7967
|
size: n,
|
|
7963
7968
|
focusDate: lt,
|
|
7964
|
-
rangeColor:
|
|
7969
|
+
rangeColor: K && te === "B" ? "secondary" : K && te === "C" ? "tertiary" : "primary"
|
|
7965
7970
|
}
|
|
7966
7971
|
);
|
|
7967
7972
|
})(),
|
|
7968
|
-
|
|
7973
|
+
S === "markets" && /* @__PURE__ */ d(ne, { className: "hybrid-date-picker__markets-list", children: [
|
|
7969
7974
|
/* @__PURE__ */ e(Te, { className: "hybrid-date-picker__events-section-header", children: "Market Events" }),
|
|
7970
7975
|
ia.filter((L) => !He || L.id !== He.id).map((L) => /* @__PURE__ */ e(
|
|
7971
7976
|
Ht,
|
|
@@ -8071,7 +8076,7 @@ const Yd = {
|
|
|
8071
8076
|
) })
|
|
8072
8077
|
] })
|
|
8073
8078
|
] }),
|
|
8074
|
-
/* @__PURE__ */ e(ne, { className: "hybrid-date-picker__footer", children:
|
|
8079
|
+
/* @__PURE__ */ e(ne, { className: "hybrid-date-picker__footer", children: K ? (
|
|
8075
8080
|
/* States 2, 3, 4: Comparing - show collapsible drawer */
|
|
8076
8081
|
/* @__PURE__ */ d(ne, { sx: { width: "100%" }, children: [
|
|
8077
8082
|
/* @__PURE__ */ d(
|
|
@@ -8575,7 +8580,7 @@ const Ar = [
|
|
|
8575
8580
|
const [p, m] = H(null);
|
|
8576
8581
|
return /* @__PURE__ */ d(ge, { definition: { display: "flex", direction: "column", gap: "8px" }, children: [
|
|
8577
8582
|
r.map(({ label: f, getValue: y, id: b, disabled: _ }) => {
|
|
8578
|
-
const v = y(), h = !_ && (n ? n === b : a?.[0] && v?.[0] && Da(a[0], v[0]) && a?.[1] && v?.[1] && Da(a[1], v[1])), k = l === b,
|
|
8583
|
+
const v = y(), h = !_ && (n ? n === b : a?.[0] && v?.[0] && Da(a[0], v[0]) && a?.[1] && v?.[1] && Da(a[1], v[1])), k = l === b, S = /* @__PURE__ */ d(
|
|
8579
8584
|
ge,
|
|
8580
8585
|
{
|
|
8581
8586
|
definition: { display: "flex", align: "center", gap: "4px" },
|
|
@@ -8611,7 +8616,7 @@ const Ar = [
|
|
|
8611
8616
|
]
|
|
8612
8617
|
}
|
|
8613
8618
|
);
|
|
8614
|
-
return _ ? /* @__PURE__ */ e(ht, { title: "Market configuration coming soon", arrow: !0, placement: "right", children: /* @__PURE__ */ e("div", { children:
|
|
8619
|
+
return _ ? /* @__PURE__ */ e(ht, { title: "Market configuration coming soon", arrow: !0, placement: "right", children: /* @__PURE__ */ e("div", { children: S }) }, f) : /* @__PURE__ */ e("div", { children: S }, f);
|
|
8615
8620
|
}),
|
|
8616
8621
|
i && /* @__PURE__ */ e(
|
|
8617
8622
|
ge,
|
|
@@ -8663,26 +8668,26 @@ const Ar = [
|
|
|
8663
8668
|
activePresetId: y,
|
|
8664
8669
|
onPresetChange: b
|
|
8665
8670
|
}) => {
|
|
8666
|
-
const _ = o !== void 0, [v, h] = H(!1), [k, E] = H(!1), [
|
|
8671
|
+
const _ = o !== void 0, [v, h] = H(!1), [k, E] = H(!1), [w, S] = H(i ?? !1), I = a?.pinnedPreset || "MTD", [g, P] = H(() => a?.lastPreset?.toUpperCase() || "MTD"), [x, D] = H(null), C = ee(() => cr(r) ? r.rangeA : r, [r]), z = ee(() => cr(r) ? r.rangeB : null, [r]), T = N((G) => {
|
|
8667
8672
|
const F = G || "MTD";
|
|
8668
8673
|
n && a && n({ ...a, pinnedPreset: F.toLowerCase() });
|
|
8669
|
-
const
|
|
8670
|
-
if (
|
|
8671
|
-
const
|
|
8672
|
-
if (P(F),
|
|
8673
|
-
t({ rangeA:
|
|
8674
|
+
const X = Ar.find((U) => U.id === F && !U.disabled);
|
|
8675
|
+
if (X) {
|
|
8676
|
+
const U = X.value();
|
|
8677
|
+
if (P(F), w)
|
|
8678
|
+
t({ rangeA: U, rangeB: z || [null, null], shortcutId: F });
|
|
8674
8679
|
else {
|
|
8675
|
-
const
|
|
8676
|
-
|
|
8680
|
+
const K = [...U];
|
|
8681
|
+
K.shortcutId = F, t(K);
|
|
8677
8682
|
}
|
|
8678
8683
|
}
|
|
8679
|
-
}, [
|
|
8684
|
+
}, [w, z, t, n, a]);
|
|
8680
8685
|
se(() => {
|
|
8681
|
-
_ &&
|
|
8686
|
+
_ && S(cr(r));
|
|
8682
8687
|
}, [_, r]), se(() => {
|
|
8683
|
-
i !== void 0 &&
|
|
8688
|
+
i !== void 0 && S(i);
|
|
8684
8689
|
}, [i]);
|
|
8685
|
-
const
|
|
8690
|
+
const A = N((G) => {
|
|
8686
8691
|
Promise.resolve().then(() => t(G));
|
|
8687
8692
|
}, [t]), M = ce(!1);
|
|
8688
8693
|
se(() => {
|
|
@@ -8691,31 +8696,31 @@ const Ar = [
|
|
|
8691
8696
|
M.current = !0;
|
|
8692
8697
|
return;
|
|
8693
8698
|
}
|
|
8694
|
-
if (
|
|
8695
|
-
const G = Array.isArray(
|
|
8696
|
-
|
|
8699
|
+
if (w) {
|
|
8700
|
+
const G = Array.isArray(C) ? C : [null, null];
|
|
8701
|
+
A({ rangeA: G, rangeB: z || [null, null] });
|
|
8697
8702
|
} else
|
|
8698
|
-
Array.isArray(
|
|
8703
|
+
Array.isArray(C) && A(C);
|
|
8699
8704
|
}
|
|
8700
|
-
}, [
|
|
8705
|
+
}, [w, _, C, z, A]);
|
|
8701
8706
|
const O = N((G, F) => {
|
|
8702
|
-
if (F || P(null),
|
|
8703
|
-
const
|
|
8704
|
-
F && (
|
|
8707
|
+
if (F || P(null), w) {
|
|
8708
|
+
const X = { rangeA: G, rangeB: z || [null, null] };
|
|
8709
|
+
F && (X.shortcutId = F), t(X);
|
|
8705
8710
|
} else if (F) {
|
|
8706
|
-
const
|
|
8707
|
-
|
|
8711
|
+
const X = [...G];
|
|
8712
|
+
X.shortcutId = F, t(X);
|
|
8708
8713
|
} else
|
|
8709
8714
|
t(G);
|
|
8710
|
-
}, [
|
|
8715
|
+
}, [w, z, t]), Y = N((G, F) => {
|
|
8711
8716
|
F || D(null);
|
|
8712
|
-
const
|
|
8713
|
-
F && (
|
|
8714
|
-
}, [t,
|
|
8717
|
+
const X = { rangeA: C || [null, null], rangeB: G };
|
|
8718
|
+
F && (X.shortcutId = F), t(X);
|
|
8719
|
+
}, [t, C]), j = N((G, F) => {
|
|
8715
8720
|
P(F), O(G, F), h(!1);
|
|
8716
|
-
}, [O]),
|
|
8717
|
-
D(F),
|
|
8718
|
-
}, [
|
|
8721
|
+
}, [O]), R = N((G, F) => {
|
|
8722
|
+
D(F), Y(G, F), E(!1);
|
|
8723
|
+
}, [Y]), W = ee(() => ({
|
|
8719
8724
|
shortcuts: {
|
|
8720
8725
|
items: Ar.map((G) => ({
|
|
8721
8726
|
label: G.label,
|
|
@@ -8725,14 +8730,14 @@ const Ar = [
|
|
|
8725
8730
|
})),
|
|
8726
8731
|
onChange: (G) => O(G),
|
|
8727
8732
|
onShortcutClick: j,
|
|
8728
|
-
value:
|
|
8733
|
+
value: C,
|
|
8729
8734
|
activeShortcutId: g,
|
|
8730
8735
|
enableCompare: _,
|
|
8731
|
-
compareEnabled:
|
|
8736
|
+
compareEnabled: w,
|
|
8732
8737
|
pinnedId: I,
|
|
8733
8738
|
onPinChange: T,
|
|
8734
8739
|
onEnableCompare: () => {
|
|
8735
|
-
|
|
8740
|
+
S(!0), o?.(!0), h(!1), setTimeout(() => E(!0), 0);
|
|
8736
8741
|
}
|
|
8737
8742
|
},
|
|
8738
8743
|
textField: {
|
|
@@ -8755,7 +8760,7 @@ const Ar = [
|
|
|
8755
8760
|
E(!1), h(!0);
|
|
8756
8761
|
}
|
|
8757
8762
|
}
|
|
8758
|
-
}), [
|
|
8763
|
+
}), [C, O, j, _, w, I, T, g, o]), V = ee(() => ({
|
|
8759
8764
|
shortcuts: {
|
|
8760
8765
|
items: Ar.map((G) => ({
|
|
8761
8766
|
label: G.label,
|
|
@@ -8763,9 +8768,9 @@ const Ar = [
|
|
|
8763
8768
|
getValue: G.value,
|
|
8764
8769
|
disabled: G.disabled || !1
|
|
8765
8770
|
})),
|
|
8766
|
-
onChange: (G) =>
|
|
8767
|
-
onShortcutClick:
|
|
8768
|
-
value:
|
|
8771
|
+
onChange: (G) => Y(G),
|
|
8772
|
+
onShortcutClick: R,
|
|
8773
|
+
value: z,
|
|
8769
8774
|
activeShortcutId: x
|
|
8770
8775
|
// No pin functionality for compare range
|
|
8771
8776
|
},
|
|
@@ -8789,7 +8794,7 @@ const Ar = [
|
|
|
8789
8794
|
h(!1), E(!0);
|
|
8790
8795
|
}
|
|
8791
8796
|
}
|
|
8792
|
-
}), [
|
|
8797
|
+
}), [z, Y, R, x]);
|
|
8793
8798
|
if (f === "simple-selector") {
|
|
8794
8799
|
const G = cr(r) ? r.rangeA : r;
|
|
8795
8800
|
return /* @__PURE__ */ e(
|
|
@@ -8806,7 +8811,7 @@ const Ar = [
|
|
|
8806
8811
|
/* @__PURE__ */ e(
|
|
8807
8812
|
ka,
|
|
8808
8813
|
{
|
|
8809
|
-
value:
|
|
8814
|
+
value: C || [null, null],
|
|
8810
8815
|
onChange: (G) => O(G),
|
|
8811
8816
|
calendars: 1,
|
|
8812
8817
|
disableFuture: !0,
|
|
@@ -8821,12 +8826,12 @@ const Ar = [
|
|
|
8821
8826
|
slotProps: W
|
|
8822
8827
|
}
|
|
8823
8828
|
),
|
|
8824
|
-
_ &&
|
|
8829
|
+
_ && w && /* @__PURE__ */ d(Dt, { definition: { direction: "horizontal", gap: "4px", align: "center" }, children: [
|
|
8825
8830
|
/* @__PURE__ */ e(
|
|
8826
8831
|
ka,
|
|
8827
8832
|
{
|
|
8828
|
-
value:
|
|
8829
|
-
onChange: (G) =>
|
|
8833
|
+
value: z || [null, null],
|
|
8834
|
+
onChange: (G) => Y(G),
|
|
8830
8835
|
calendars: 1,
|
|
8831
8836
|
disableFuture: !0,
|
|
8832
8837
|
minDate: new Date(2024, 0, 1),
|
|
@@ -8846,7 +8851,7 @@ const Ar = [
|
|
|
8846
8851
|
className: "gloss-timeframe__pin-btn",
|
|
8847
8852
|
"aria-label": "Remove comparison",
|
|
8848
8853
|
onClick: () => {
|
|
8849
|
-
|
|
8854
|
+
S(!1), o?.(!1), E(!1), h(!0), Array.isArray(C) && Promise.resolve().then(() => t(C));
|
|
8850
8855
|
},
|
|
8851
8856
|
children: /* @__PURE__ */ e(Je, { icon: /* @__PURE__ */ e(kt, { fontSize: "small" }) })
|
|
8852
8857
|
}
|
|
@@ -9039,28 +9044,28 @@ const eu = 30, tu = { distance: 5 }, ru = {
|
|
|
9039
9044
|
), k = N((T) => {
|
|
9040
9045
|
f(!1), p(String(T.active.id));
|
|
9041
9046
|
}, []), E = N((T) => {
|
|
9042
|
-
const { active:
|
|
9043
|
-
if (f(!1), p(null), !M ||
|
|
9044
|
-
const O = a.indexOf(String(
|
|
9045
|
-
O === -1 ||
|
|
9046
|
-
}, [a, s]),
|
|
9047
|
+
const { active: A, over: M } = T;
|
|
9048
|
+
if (f(!1), p(null), !M || A.id === M.id) return;
|
|
9049
|
+
const O = a.indexOf(String(A.id)), Y = a.indexOf(String(M.id));
|
|
9050
|
+
O === -1 || Y === -1 || s(li(a, O, Y));
|
|
9051
|
+
}, [a, s]), w = N(() => {
|
|
9047
9052
|
f(!1), p(null);
|
|
9048
|
-
}, []),
|
|
9049
|
-
const T = n.currentPage *
|
|
9050
|
-
return
|
|
9051
|
-
}, [t, a, n.currentPage,
|
|
9053
|
+
}, []), S = n.columns * n.maxRows, I = ee(() => {
|
|
9054
|
+
const T = n.currentPage * S, A = a.slice(T, T + S), M = new Map(t.map((O) => [O.id, O]));
|
|
9055
|
+
return A.map((O) => M.get(O)).filter((O) => O !== void 0);
|
|
9056
|
+
}, [t, a, n.currentPage, S]), g = ee(() => I.reduce((T, A) => T + A.colSpan, 0), [I]), P = Math.max(0, S - g), x = ee(() => u ? t.find((T) => T.id === u) ?? null : null, [u, t]), D = ee(() => {
|
|
9052
9057
|
if (!_) return null;
|
|
9053
9058
|
const T = I.findIndex((j) => j.id === _);
|
|
9054
9059
|
if (T === -1) return null;
|
|
9055
|
-
const
|
|
9056
|
-
if (
|
|
9057
|
-
const M =
|
|
9058
|
-
return { activeIndex: T, extrudeIndex:
|
|
9059
|
-
}, [_, I, n.columns]),
|
|
9060
|
+
const A = Zd(T, I.length, n.columns);
|
|
9061
|
+
if (A === null) return null;
|
|
9062
|
+
const M = A >= I.length, O = !M, Y = O ? I[A]?.id ?? null : null;
|
|
9063
|
+
return { activeIndex: T, extrudeIndex: A, isEmptySlot: M, isDimCover: O, dimCoverId: Y };
|
|
9064
|
+
}, [_, I, n.columns]), C = ee(() => ({
|
|
9060
9065
|
gridTemplateColumns: `repeat(${n.columns}, 1fr)`,
|
|
9061
9066
|
gridAutoRows: `${n.rowHeight}px`,
|
|
9062
9067
|
gap: `${n.gap}px`
|
|
9063
|
-
}), [n.columns, n.rowHeight, n.gap]),
|
|
9068
|
+
}), [n.columns, n.rowHeight, n.gap]), z = !!(_ && D && l.length > 0);
|
|
9064
9069
|
return /* @__PURE__ */ d(ge, { className: `gloss-grid${m ? " gloss-grid--armed" : ""}`, children: [
|
|
9065
9070
|
/* @__PURE__ */ d(
|
|
9066
9071
|
ni,
|
|
@@ -9070,15 +9075,15 @@ const eu = 30, tu = { distance: 5 }, ru = {
|
|
|
9070
9075
|
modifiers: [pi],
|
|
9071
9076
|
onDragStart: k,
|
|
9072
9077
|
onDragEnd: E,
|
|
9073
|
-
onDragCancel:
|
|
9078
|
+
onDragCancel: w,
|
|
9074
9079
|
children: [
|
|
9075
9080
|
/* @__PURE__ */ e(
|
|
9076
9081
|
ci,
|
|
9077
9082
|
{
|
|
9078
9083
|
items: I.map((T) => T.id),
|
|
9079
9084
|
strategy: di,
|
|
9080
|
-
children: /* @__PURE__ */ d("div", { className: "gloss-grid__container", style:
|
|
9081
|
-
/* @__PURE__ */ e(pr, { mode: "popLayout", children: I.map((T,
|
|
9085
|
+
children: /* @__PURE__ */ d("div", { className: "gloss-grid__container", style: C, children: [
|
|
9086
|
+
/* @__PURE__ */ e(pr, { mode: "popLayout", children: I.map((T, A) => {
|
|
9082
9087
|
const M = D?.isDimCover === !0 && D.dimCoverId === T.id;
|
|
9083
9088
|
return /* @__PURE__ */ e(
|
|
9084
9089
|
vt.div,
|
|
@@ -9089,14 +9094,14 @@ const eu = 30, tu = { distance: 5 }, ru = {
|
|
|
9089
9094
|
exit: ou,
|
|
9090
9095
|
transition: {
|
|
9091
9096
|
...iu,
|
|
9092
|
-
delay:
|
|
9097
|
+
delay: A * 0.03
|
|
9093
9098
|
},
|
|
9094
9099
|
children: /* @__PURE__ */ e(
|
|
9095
9100
|
Jd,
|
|
9096
9101
|
{
|
|
9097
9102
|
id: T.id,
|
|
9098
9103
|
colSpan: T.colSpan,
|
|
9099
|
-
staggerDelay: `${
|
|
9104
|
+
staggerDelay: `${A * eu}ms`,
|
|
9100
9105
|
dimCover: M,
|
|
9101
9106
|
children: o(T)
|
|
9102
9107
|
}
|
|
@@ -9105,9 +9110,9 @@ const eu = 30, tu = { distance: 5 }, ru = {
|
|
|
9105
9110
|
T.id
|
|
9106
9111
|
);
|
|
9107
9112
|
}) }),
|
|
9108
|
-
c && Array.from({ length: P }, (T,
|
|
9109
|
-
/* @__PURE__ */ e(pr, { children:
|
|
9110
|
-
const T = D.extrudeIndex % n.columns + 1,
|
|
9113
|
+
c && Array.from({ length: P }, (T, A) => /* @__PURE__ */ e("div", { className: "gloss-grid__empty-slot", children: c(g + A) }, `empty-${A}`)),
|
|
9114
|
+
/* @__PURE__ */ e(pr, { children: z && D && (() => {
|
|
9115
|
+
const T = D.extrudeIndex % n.columns + 1, A = Math.floor(D.extrudeIndex / n.columns) + 1;
|
|
9111
9116
|
return /* @__PURE__ */ e(
|
|
9112
9117
|
vt.div,
|
|
9113
9118
|
{
|
|
@@ -9120,7 +9125,7 @@ const eu = 30, tu = { distance: 5 }, ru = {
|
|
|
9120
9125
|
// Grid placement: pin to computed extrude slot. No
|
|
9121
9126
|
// width/height animation (AN-01 — transform+opacity only).
|
|
9122
9127
|
gridColumnStart: T,
|
|
9123
|
-
gridRowStart:
|
|
9128
|
+
gridRowStart: A,
|
|
9124
9129
|
gridColumn: `${T} / span 1`
|
|
9125
9130
|
},
|
|
9126
9131
|
children: /* @__PURE__ */ e(
|
|
@@ -9703,22 +9708,22 @@ const Fn = Z.forwardRef(
|
|
|
9703
9708
|
status: h,
|
|
9704
9709
|
helperText: k,
|
|
9705
9710
|
required: E,
|
|
9706
|
-
disabled:
|
|
9707
|
-
name:
|
|
9711
|
+
disabled: w,
|
|
9712
|
+
name: S,
|
|
9708
9713
|
id: I,
|
|
9709
9714
|
className: g,
|
|
9710
9715
|
autoComplete: P
|
|
9711
9716
|
}, x) => {
|
|
9712
|
-
const D = ce(null), [
|
|
9717
|
+
const D = ce(null), [C, z] = H(p ?? ""), [T, A] = H(!1), [M, O] = H(-1), Y = ce(null), j = u !== void 0 ? u : C, R = String(j).length > 0, W = T && i && n.length > 0, V = N(
|
|
9713
9718
|
(q) => {
|
|
9714
9719
|
const te = q.target.value;
|
|
9715
|
-
u === void 0 &&
|
|
9720
|
+
u === void 0 && z(te), t > 0 ? (Y.current && clearTimeout(Y.current), Y.current = setTimeout(() => {
|
|
9716
9721
|
m?.(q);
|
|
9717
9722
|
}, t)) : m?.(q);
|
|
9718
9723
|
},
|
|
9719
9724
|
[u, t, m]
|
|
9720
9725
|
), G = N(() => {
|
|
9721
|
-
u === void 0 &&
|
|
9726
|
+
u === void 0 && z(""), m?.({
|
|
9722
9727
|
target: { value: "" },
|
|
9723
9728
|
currentTarget: { value: "" }
|
|
9724
9729
|
}), D.current?.focus();
|
|
@@ -9740,21 +9745,21 @@ const Fn = Z.forwardRef(
|
|
|
9740
9745
|
M >= 0 && n[M] ? (q.preventDefault(), s?.(n[M]), O(-1)) : r?.(String(j));
|
|
9741
9746
|
break;
|
|
9742
9747
|
case "Escape":
|
|
9743
|
-
|
|
9748
|
+
A(!1), D.current?.blur();
|
|
9744
9749
|
break;
|
|
9745
9750
|
}
|
|
9746
9751
|
else q.key === "Enter" && r?.(String(j));
|
|
9747
9752
|
f?.(q);
|
|
9748
9753
|
},
|
|
9749
9754
|
[W, n, M, j, r, s, f]
|
|
9750
|
-
),
|
|
9755
|
+
), X = N(
|
|
9751
9756
|
(q) => {
|
|
9752
|
-
|
|
9757
|
+
A(!0), y?.(q);
|
|
9753
9758
|
},
|
|
9754
9759
|
[y]
|
|
9755
|
-
),
|
|
9760
|
+
), U = N(
|
|
9756
9761
|
(q) => {
|
|
9757
|
-
setTimeout(() =>
|
|
9762
|
+
setTimeout(() => A(!1), 150), b?.(q);
|
|
9758
9763
|
},
|
|
9759
9764
|
[b]
|
|
9760
9765
|
);
|
|
@@ -9765,10 +9770,10 @@ const Fn = Z.forwardRef(
|
|
|
9765
9770
|
};
|
|
9766
9771
|
return document.addEventListener("keydown", q), () => document.removeEventListener("keydown", q);
|
|
9767
9772
|
}, [o, c]), se(() => () => {
|
|
9768
|
-
|
|
9773
|
+
Y.current && clearTimeout(Y.current);
|
|
9769
9774
|
}, []);
|
|
9770
|
-
const
|
|
9771
|
-
|
|
9775
|
+
const K = /* @__PURE__ */ d("div", { className: "gloss-search-input__actions", children: [
|
|
9776
|
+
R && l && /* @__PURE__ */ e(
|
|
9772
9777
|
"button",
|
|
9773
9778
|
{
|
|
9774
9779
|
type: "button",
|
|
@@ -9795,19 +9800,19 @@ const Fn = Z.forwardRef(
|
|
|
9795
9800
|
value: j,
|
|
9796
9801
|
onChange: V,
|
|
9797
9802
|
onKeyDown: F,
|
|
9798
|
-
onFocus:
|
|
9799
|
-
onBlur:
|
|
9803
|
+
onFocus: X,
|
|
9804
|
+
onBlur: U,
|
|
9800
9805
|
placeholder: _,
|
|
9801
9806
|
label: v,
|
|
9802
9807
|
status: h === "pending" ? "default" : h,
|
|
9803
9808
|
helperText: k,
|
|
9804
9809
|
required: E,
|
|
9805
|
-
disabled:
|
|
9806
|
-
name:
|
|
9810
|
+
disabled: w,
|
|
9811
|
+
name: S,
|
|
9807
9812
|
id: I,
|
|
9808
9813
|
autoComplete: P,
|
|
9809
9814
|
leftIcon: /* @__PURE__ */ e(ve, { name: "search", size: "sm" }),
|
|
9810
|
-
rightIcon:
|
|
9815
|
+
rightIcon: K
|
|
9811
9816
|
}
|
|
9812
9817
|
),
|
|
9813
9818
|
W && /* @__PURE__ */ e("ul", { className: "gloss-search-input__suggestions", role: "listbox", children: n.map((q, te) => /* @__PURE__ */ d(
|
|
@@ -9871,18 +9876,18 @@ const xu = [
|
|
|
9871
9876
|
disabled: h,
|
|
9872
9877
|
name: k,
|
|
9873
9878
|
id: E,
|
|
9874
|
-
className:
|
|
9875
|
-
autoComplete:
|
|
9879
|
+
className: w,
|
|
9880
|
+
autoComplete: S = "new-password"
|
|
9876
9881
|
}, I) => {
|
|
9877
|
-
const [g, P] = H(!1), [x, D] = H(String(u ?? "")),
|
|
9878
|
-
() => Su(
|
|
9879
|
-
[
|
|
9880
|
-
), T = a ??
|
|
9882
|
+
const [g, P] = H(!1), [x, D] = H(String(u ?? "")), C = l !== void 0 ? String(l) : x, z = ee(
|
|
9883
|
+
() => Su(C, n),
|
|
9884
|
+
[C, n]
|
|
9885
|
+
), T = a ?? z, A = ee(
|
|
9881
9886
|
() => n.map((V) => ({
|
|
9882
9887
|
...V,
|
|
9883
|
-
passed: V.validate(
|
|
9888
|
+
passed: V.validate(C)
|
|
9884
9889
|
})),
|
|
9885
|
-
[
|
|
9890
|
+
[C, n]
|
|
9886
9891
|
), M = N(
|
|
9887
9892
|
(V) => {
|
|
9888
9893
|
l === void 0 && D(V.target.value), p?.(V);
|
|
@@ -9890,7 +9895,7 @@ const xu = [
|
|
|
9890
9895
|
[l, p]
|
|
9891
9896
|
), O = N(() => {
|
|
9892
9897
|
P((V) => !V);
|
|
9893
|
-
}, []),
|
|
9898
|
+
}, []), Y = N(() => {
|
|
9894
9899
|
const V = Nu(o);
|
|
9895
9900
|
i ? i(V) : (l === void 0 && D(V), p?.({
|
|
9896
9901
|
target: { value: V },
|
|
@@ -9901,7 +9906,7 @@ const xu = [
|
|
|
9901
9906
|
fair: "#f59e0b",
|
|
9902
9907
|
good: "#3b82f6",
|
|
9903
9908
|
strong: "#22c55e"
|
|
9904
|
-
},
|
|
9909
|
+
}, R = {
|
|
9905
9910
|
weak: "Weak",
|
|
9906
9911
|
fair: "Fair",
|
|
9907
9912
|
good: "Good",
|
|
@@ -9913,7 +9918,7 @@ const xu = [
|
|
|
9913
9918
|
{
|
|
9914
9919
|
ref: I,
|
|
9915
9920
|
type: g ? "text" : "password",
|
|
9916
|
-
value:
|
|
9921
|
+
value: C,
|
|
9917
9922
|
onChange: M,
|
|
9918
9923
|
onBlur: m,
|
|
9919
9924
|
rightIcon: /* @__PURE__ */ d("div", { className: "gloss-password-input__actions", children: [
|
|
@@ -9922,7 +9927,7 @@ const xu = [
|
|
|
9922
9927
|
{
|
|
9923
9928
|
type: "button",
|
|
9924
9929
|
className: "gloss-password-input__generate",
|
|
9925
|
-
onClick:
|
|
9930
|
+
onClick: Y,
|
|
9926
9931
|
"aria-label": "Generate password",
|
|
9927
9932
|
tabIndex: -1,
|
|
9928
9933
|
title: "Generate password",
|
|
@@ -9949,10 +9954,10 @@ const xu = [
|
|
|
9949
9954
|
disabled: h,
|
|
9950
9955
|
name: k,
|
|
9951
9956
|
id: E,
|
|
9952
|
-
autoComplete:
|
|
9957
|
+
autoComplete: S
|
|
9953
9958
|
}
|
|
9954
9959
|
),
|
|
9955
|
-
t &&
|
|
9960
|
+
t && C && /* @__PURE__ */ d("div", { className: "gloss-password-input__strength", children: [
|
|
9956
9961
|
/* @__PURE__ */ e("div", { className: "gloss-password-input__strength-bar", children: /* @__PURE__ */ e(
|
|
9957
9962
|
"div",
|
|
9958
9963
|
{
|
|
@@ -9968,11 +9973,11 @@ const xu = [
|
|
|
9968
9973
|
{
|
|
9969
9974
|
className: "gloss-password-input__strength-label",
|
|
9970
9975
|
style: { color: j[T] },
|
|
9971
|
-
children:
|
|
9976
|
+
children: R[T]
|
|
9972
9977
|
}
|
|
9973
9978
|
)
|
|
9974
9979
|
] }),
|
|
9975
|
-
c && /* @__PURE__ */ e("ul", { className: "gloss-password-input__rules", children:
|
|
9980
|
+
c && /* @__PURE__ */ e("ul", { className: "gloss-password-input__rules", children: A.map((V) => /* @__PURE__ */ d(
|
|
9976
9981
|
"li",
|
|
9977
9982
|
{
|
|
9978
9983
|
className: `gloss-password-input__rule ${V.passed ? "gloss-password-input__rule--passed" : ""}`,
|
|
@@ -10008,9 +10013,9 @@ const Cu = Z.forwardRef(
|
|
|
10008
10013
|
id: v,
|
|
10009
10014
|
name: h
|
|
10010
10015
|
}, k) => {
|
|
10011
|
-
const E = Le(),
|
|
10012
|
-
(de) => de.toLowerCase().includes(P.toLowerCase()) && (o || !
|
|
10013
|
-
) : [],
|
|
10016
|
+
const E = Le(), w = v || E, S = ce(null), [I, g] = H(t), [P, x] = H(""), [D, C] = H(null), [z, T] = H(!1), [A, M] = H(-1), O = r !== void 0, Y = O ? r : I, j = P ? l.filter(
|
|
10017
|
+
(de) => de.toLowerCase().includes(P.toLowerCase()) && (o || !Y.includes(de))
|
|
10018
|
+
) : [], R = z && j.length > 0, W = s === void 0 || Y.length < s, V = N(
|
|
10014
10019
|
(de) => {
|
|
10015
10020
|
O || g(de), a?.(de);
|
|
10016
10021
|
},
|
|
@@ -10020,35 +10025,35 @@ const Cu = Z.forwardRef(
|
|
|
10020
10025
|
const ie = de.trim();
|
|
10021
10026
|
if (ie) {
|
|
10022
10027
|
if (!W) {
|
|
10023
|
-
|
|
10028
|
+
C(`Maximum of ${s} tags allowed`);
|
|
10024
10029
|
return;
|
|
10025
10030
|
}
|
|
10026
|
-
if (!o &&
|
|
10027
|
-
|
|
10031
|
+
if (!o && Y.includes(ie)) {
|
|
10032
|
+
C("Duplicate tag");
|
|
10028
10033
|
return;
|
|
10029
10034
|
}
|
|
10030
10035
|
if (i && ie.length > i) {
|
|
10031
|
-
|
|
10036
|
+
C(`Tag must be ${i} characters or less`);
|
|
10032
10037
|
return;
|
|
10033
10038
|
}
|
|
10034
10039
|
if (c) {
|
|
10035
10040
|
const fe = c(ie);
|
|
10036
10041
|
if (fe !== !0) {
|
|
10037
|
-
|
|
10042
|
+
C(typeof fe == "string" ? fe : "Invalid tag");
|
|
10038
10043
|
return;
|
|
10039
10044
|
}
|
|
10040
10045
|
}
|
|
10041
|
-
|
|
10046
|
+
C(null), V([...Y, ie]), x(""), M(-1);
|
|
10042
10047
|
}
|
|
10043
10048
|
},
|
|
10044
|
-
[
|
|
10049
|
+
[Y, W, s, o, i, c, V]
|
|
10045
10050
|
), F = N(
|
|
10046
10051
|
(de) => {
|
|
10047
|
-
const ie =
|
|
10048
|
-
V(ie),
|
|
10052
|
+
const ie = Y.filter((fe, Ce) => Ce !== de);
|
|
10053
|
+
V(ie), C(null);
|
|
10049
10054
|
},
|
|
10050
|
-
[
|
|
10051
|
-
),
|
|
10055
|
+
[Y, V]
|
|
10056
|
+
), X = N(
|
|
10052
10057
|
(de) => {
|
|
10053
10058
|
const ie = de.target.value, fe = n.filter((Ce) => Ce !== "Enter");
|
|
10054
10059
|
for (const Ce of fe)
|
|
@@ -10058,36 +10063,36 @@ const Cu = Z.forwardRef(
|
|
|
10058
10063
|
});
|
|
10059
10064
|
return;
|
|
10060
10065
|
}
|
|
10061
|
-
x(ie), M(-1),
|
|
10066
|
+
x(ie), M(-1), C(null);
|
|
10062
10067
|
},
|
|
10063
10068
|
[n, G]
|
|
10064
|
-
),
|
|
10069
|
+
), U = N(
|
|
10065
10070
|
(de) => {
|
|
10066
|
-
de.key === "Enter" ? (de.preventDefault(),
|
|
10071
|
+
de.key === "Enter" ? (de.preventDefault(), R && A >= 0 ? G(j[A]) : n.includes("Enter") && P.trim() && G(P)) : de.key === "Backspace" && !P && Y.length > 0 ? F(Y.length - 1) : de.key === "ArrowDown" && R ? (de.preventDefault(), M(
|
|
10067
10072
|
(ie) => ie < j.length - 1 ? ie + 1 : 0
|
|
10068
|
-
)) : de.key === "ArrowUp" &&
|
|
10073
|
+
)) : de.key === "ArrowUp" && R ? (de.preventDefault(), M(
|
|
10069
10074
|
(ie) => ie > 0 ? ie - 1 : j.length - 1
|
|
10070
10075
|
)) : de.key === "Escape" && (x(""), M(-1));
|
|
10071
10076
|
},
|
|
10072
10077
|
[
|
|
10073
|
-
|
|
10074
|
-
|
|
10078
|
+
R,
|
|
10079
|
+
A,
|
|
10075
10080
|
j,
|
|
10076
10081
|
n,
|
|
10077
10082
|
P,
|
|
10078
|
-
|
|
10083
|
+
Y,
|
|
10079
10084
|
G,
|
|
10080
10085
|
F
|
|
10081
10086
|
]
|
|
10082
|
-
),
|
|
10087
|
+
), K = N(() => {
|
|
10083
10088
|
T(!0);
|
|
10084
10089
|
}, []), q = N(() => {
|
|
10085
10090
|
setTimeout(() => T(!1), 150), P.trim() && n.includes(",") && G(P);
|
|
10086
10091
|
}, [P, n, G]), te = N(() => {
|
|
10087
|
-
|
|
10092
|
+
S.current?.focus();
|
|
10088
10093
|
}, []), he = N(
|
|
10089
10094
|
(de) => {
|
|
10090
|
-
G(de),
|
|
10095
|
+
G(de), S.current?.focus();
|
|
10091
10096
|
},
|
|
10092
10097
|
[G]
|
|
10093
10098
|
), oe = [
|
|
@@ -10097,17 +10102,17 @@ const Cu = Z.forwardRef(
|
|
|
10097
10102
|
"gloss-tag-input",
|
|
10098
10103
|
`gloss-tag-input--${b}`,
|
|
10099
10104
|
y !== "default" && `gloss-tag-input--${y}`,
|
|
10100
|
-
|
|
10105
|
+
z && "gloss-tag-input--focused",
|
|
10101
10106
|
p && "gloss-tag-input--disabled",
|
|
10102
10107
|
D && "gloss-tag-input--error",
|
|
10103
10108
|
_
|
|
10104
10109
|
].filter(Boolean).join(" ");
|
|
10105
10110
|
return /* @__PURE__ */ d("div", { className: oe, children: [
|
|
10106
|
-
m && /* @__PURE__ */ e("label", { className: "gloss-tag-input__label", htmlFor:
|
|
10111
|
+
m && /* @__PURE__ */ e("label", { className: "gloss-tag-input__label", htmlFor: w, children: m }),
|
|
10107
10112
|
/* @__PURE__ */ d("div", { className: be, onClick: te, children: [
|
|
10108
|
-
h && /* @__PURE__ */ e("input", { type: "hidden", name: h, value:
|
|
10113
|
+
h && /* @__PURE__ */ e("input", { type: "hidden", name: h, value: Y.join(",") }),
|
|
10109
10114
|
/* @__PURE__ */ d("div", { className: "gloss-tag-input__tags", children: [
|
|
10110
|
-
|
|
10115
|
+
Y.map((de, ie) => /* @__PURE__ */ d("span", { className: "gloss-tag-input__tag", children: [
|
|
10111
10116
|
/* @__PURE__ */ e("span", { className: "gloss-tag-input__tag-text", children: de }),
|
|
10112
10117
|
!p && /* @__PURE__ */ e(
|
|
10113
10118
|
"button",
|
|
@@ -10127,28 +10132,28 @@ const Cu = Z.forwardRef(
|
|
|
10127
10132
|
"input",
|
|
10128
10133
|
{
|
|
10129
10134
|
ref: (de) => {
|
|
10130
|
-
|
|
10135
|
+
S.current = de, typeof k == "function" ? k(de) : k && (k.current = de);
|
|
10131
10136
|
},
|
|
10132
|
-
id:
|
|
10137
|
+
id: w,
|
|
10133
10138
|
type: "text",
|
|
10134
10139
|
className: "gloss-tag-input__input",
|
|
10135
10140
|
value: P,
|
|
10136
|
-
onChange:
|
|
10137
|
-
onKeyDown:
|
|
10138
|
-
onFocus:
|
|
10141
|
+
onChange: X,
|
|
10142
|
+
onKeyDown: U,
|
|
10143
|
+
onFocus: K,
|
|
10139
10144
|
onBlur: q,
|
|
10140
|
-
placeholder:
|
|
10145
|
+
placeholder: Y.length === 0 ? u : "",
|
|
10141
10146
|
disabled: p,
|
|
10142
|
-
"aria-describedby": f ? `${
|
|
10147
|
+
"aria-describedby": f ? `${w}-helper` : void 0
|
|
10143
10148
|
}
|
|
10144
10149
|
)
|
|
10145
10150
|
] }),
|
|
10146
|
-
|
|
10151
|
+
R && /* @__PURE__ */ e("ul", { className: "gloss-tag-input__suggestions", role: "listbox", children: j.map((de, ie) => /* @__PURE__ */ e(
|
|
10147
10152
|
"li",
|
|
10148
10153
|
{
|
|
10149
10154
|
role: "option",
|
|
10150
|
-
"aria-selected": ie ===
|
|
10151
|
-
className: `gloss-tag-input__suggestion ${ie ===
|
|
10155
|
+
"aria-selected": ie === A,
|
|
10156
|
+
className: `gloss-tag-input__suggestion ${ie === A ? "gloss-tag-input__suggestion--selected" : ""}`,
|
|
10152
10157
|
onClick: () => he(de),
|
|
10153
10158
|
children: de
|
|
10154
10159
|
},
|
|
@@ -10158,7 +10163,7 @@ const Cu = Z.forwardRef(
|
|
|
10158
10163
|
(f || D) && /* @__PURE__ */ d(
|
|
10159
10164
|
"div",
|
|
10160
10165
|
{
|
|
10161
|
-
id: `${
|
|
10166
|
+
id: `${w}-helper`,
|
|
10162
10167
|
className: `gloss-tag-input__helper ${D || y === "error" ? "gloss-tag-input__helper--error" : ""}`,
|
|
10163
10168
|
children: [
|
|
10164
10169
|
(D || y === "error") && /* @__PURE__ */ e(ve, { name: "info", size: "sm" }),
|
|
@@ -10226,38 +10231,38 @@ const wu = [
|
|
|
10226
10231
|
className: b = "",
|
|
10227
10232
|
id: _
|
|
10228
10233
|
}, v) => {
|
|
10229
|
-
const h = Le(), k = _ || h, E = s.find((G) => G.code === n) || s[0],
|
|
10234
|
+
const h = Le(), k = _ || h, E = s.find((G) => G.code === n) || s[0], w = ee(
|
|
10230
10235
|
() => Ya(r || t || "", s),
|
|
10231
10236
|
[]
|
|
10232
|
-
), [
|
|
10233
|
-
|
|
10237
|
+
), [S, I] = H(
|
|
10238
|
+
w.country || E
|
|
10234
10239
|
), [g, P] = H(
|
|
10235
|
-
|
|
10236
|
-
), [x, D] = H(!1),
|
|
10237
|
-
() =>
|
|
10238
|
-
[
|
|
10239
|
-
), T =
|
|
10240
|
+
w.nationalNumber
|
|
10241
|
+
), [x, D] = H(!1), C = r !== void 0, z = ee(
|
|
10242
|
+
() => C ? Ya(r || "", s) : null,
|
|
10243
|
+
[C, r, s]
|
|
10244
|
+
), T = z?.country || S, A = z?.nationalNumber || g, M = ku(A, T.format), O = N(
|
|
10240
10245
|
(G, F) => {
|
|
10241
|
-
const
|
|
10242
|
-
return
|
|
10246
|
+
const X = Ua(F);
|
|
10247
|
+
return X ? `${G.dialCode}${X}` : "";
|
|
10243
10248
|
},
|
|
10244
10249
|
[]
|
|
10245
|
-
),
|
|
10250
|
+
), Y = N(
|
|
10246
10251
|
(G) => {
|
|
10247
|
-
const F = G.target.value,
|
|
10248
|
-
|
|
10249
|
-
const
|
|
10250
|
-
a?.(
|
|
10252
|
+
const F = G.target.value, X = Ua(F);
|
|
10253
|
+
C || P(X);
|
|
10254
|
+
const U = O(T, X);
|
|
10255
|
+
a?.(U);
|
|
10251
10256
|
},
|
|
10252
|
-
[
|
|
10257
|
+
[C, T, O, a]
|
|
10253
10258
|
), j = N(
|
|
10254
10259
|
(G) => {
|
|
10255
|
-
|
|
10256
|
-
const F = O(G,
|
|
10260
|
+
C || I(G);
|
|
10261
|
+
const F = O(G, A);
|
|
10257
10262
|
a?.(F), D(!1);
|
|
10258
10263
|
},
|
|
10259
|
-
[
|
|
10260
|
-
),
|
|
10264
|
+
[C, A, O, a]
|
|
10265
|
+
), R = N(() => {
|
|
10261
10266
|
f || D((G) => !G);
|
|
10262
10267
|
}, [f]), W = N(() => {
|
|
10263
10268
|
setTimeout(() => D(!1), 150);
|
|
@@ -10266,7 +10271,7 @@ const wu = [
|
|
|
10266
10271
|
{
|
|
10267
10272
|
type: "button",
|
|
10268
10273
|
className: "gloss-phone-input__country-btn",
|
|
10269
|
-
onClick:
|
|
10274
|
+
onClick: R,
|
|
10270
10275
|
onBlur: W,
|
|
10271
10276
|
disabled: f,
|
|
10272
10277
|
"aria-label": "Select country",
|
|
@@ -10310,7 +10315,7 @@ const wu = [
|
|
|
10310
10315
|
required: m,
|
|
10311
10316
|
className: `gloss-phone-input__input ${p !== "default" ? `gloss-phone-input__input--${p}` : ""}`,
|
|
10312
10317
|
value: M,
|
|
10313
|
-
onChange:
|
|
10318
|
+
onChange: Y,
|
|
10314
10319
|
disabled: f,
|
|
10315
10320
|
"aria-describedby": u ? `${k}-helper` : void 0
|
|
10316
10321
|
}
|
|
@@ -10373,7 +10378,7 @@ function Jr({
|
|
|
10373
10378
|
children: i
|
|
10374
10379
|
}) {
|
|
10375
10380
|
const o = {
|
|
10376
|
-
bg:
|
|
10381
|
+
bg: B.BgSurface,
|
|
10377
10382
|
shadow: Ze.Hover,
|
|
10378
10383
|
radius: Se.Md,
|
|
10379
10384
|
padding: J.Md,
|
|
@@ -10424,55 +10429,55 @@ function Ln(r) {
|
|
|
10424
10429
|
disabled: _ = !1,
|
|
10425
10430
|
size: v = "md",
|
|
10426
10431
|
className: h
|
|
10427
|
-
} = r, [k, E] = H(""), [
|
|
10432
|
+
} = r, [k, E] = H(""), [w, S] = H(!1), [I, g] = H(-1), P = ce(null), x = ce(null), D = ce(null);
|
|
10428
10433
|
se(() => {
|
|
10429
10434
|
a != null && E(s(a));
|
|
10430
10435
|
}, [a, s]);
|
|
10431
|
-
const
|
|
10436
|
+
const C = ee(() => {
|
|
10432
10437
|
if (i || !k) return t;
|
|
10433
|
-
const
|
|
10438
|
+
const R = k.toLowerCase();
|
|
10434
10439
|
return t.filter(
|
|
10435
|
-
(W) => s(W).toLowerCase().includes(
|
|
10440
|
+
(W) => s(W).toLowerCase().includes(R)
|
|
10436
10441
|
);
|
|
10437
|
-
}, [t, k, i, s]),
|
|
10438
|
-
(
|
|
10439
|
-
const W =
|
|
10440
|
-
E(W),
|
|
10442
|
+
}, [t, k, i, s]), z = N(
|
|
10443
|
+
(R) => {
|
|
10444
|
+
const W = R.target.value;
|
|
10445
|
+
E(W), S(!0), g(-1), i && (x.current && clearTimeout(x.current), x.current = setTimeout(() => {
|
|
10441
10446
|
i(W);
|
|
10442
10447
|
}, 300));
|
|
10443
10448
|
},
|
|
10444
10449
|
[i]
|
|
10445
10450
|
), T = N(
|
|
10446
|
-
(
|
|
10447
|
-
E(s(
|
|
10451
|
+
(R) => {
|
|
10452
|
+
E(s(R)), S(!1), g(-1), n?.(R);
|
|
10448
10453
|
},
|
|
10449
10454
|
[s, n]
|
|
10450
|
-
),
|
|
10451
|
-
(
|
|
10452
|
-
if (!
|
|
10453
|
-
(
|
|
10455
|
+
), A = N(
|
|
10456
|
+
(R) => {
|
|
10457
|
+
if (!w) {
|
|
10458
|
+
(R.key === "ArrowDown" || R.key === "ArrowUp") && (R.preventDefault(), S(!0));
|
|
10454
10459
|
return;
|
|
10455
10460
|
}
|
|
10456
|
-
switch (
|
|
10461
|
+
switch (R.key) {
|
|
10457
10462
|
case "ArrowDown":
|
|
10458
|
-
|
|
10459
|
-
(W) => W <
|
|
10463
|
+
R.preventDefault(), g(
|
|
10464
|
+
(W) => W < C.length - 1 ? W + 1 : 0
|
|
10460
10465
|
);
|
|
10461
10466
|
break;
|
|
10462
10467
|
case "ArrowUp":
|
|
10463
|
-
|
|
10464
|
-
(W) => W > 0 ? W - 1 :
|
|
10468
|
+
R.preventDefault(), g(
|
|
10469
|
+
(W) => W > 0 ? W - 1 : C.length - 1
|
|
10465
10470
|
);
|
|
10466
10471
|
break;
|
|
10467
10472
|
case "Enter":
|
|
10468
|
-
|
|
10473
|
+
R.preventDefault(), I >= 0 && C[I] && T(C[I]);
|
|
10469
10474
|
break;
|
|
10470
10475
|
case "Escape":
|
|
10471
|
-
|
|
10476
|
+
R.preventDefault(), S(!1), g(-1);
|
|
10472
10477
|
break;
|
|
10473
10478
|
}
|
|
10474
10479
|
},
|
|
10475
|
-
[
|
|
10480
|
+
[w, C, I, T]
|
|
10476
10481
|
);
|
|
10477
10482
|
se(() => {
|
|
10478
10483
|
I >= 0 && D.current && D.current.querySelectorAll('[role="option"]')[I]?.scrollIntoView({ block: "nearest" });
|
|
@@ -10480,17 +10485,17 @@ function Ln(r) {
|
|
|
10480
10485
|
x.current && clearTimeout(x.current);
|
|
10481
10486
|
}, []);
|
|
10482
10487
|
const M = N(() => {
|
|
10483
|
-
|
|
10488
|
+
S(!0);
|
|
10484
10489
|
}, []), O = N(() => {
|
|
10485
|
-
|
|
10486
|
-
}, []),
|
|
10490
|
+
S(!1), g(-1);
|
|
10491
|
+
}, []), Y = w && (C.length > 0 || b || C.length === 0), j = ["gloss-autocomplete", h].filter(Boolean).join(" ");
|
|
10487
10492
|
return /* @__PURE__ */ d("div", { className: j, ref: P, children: [
|
|
10488
10493
|
/* @__PURE__ */ e(
|
|
10489
10494
|
Me,
|
|
10490
10495
|
{
|
|
10491
10496
|
value: k,
|
|
10492
|
-
onChange:
|
|
10493
|
-
onKeyDown:
|
|
10497
|
+
onChange: z,
|
|
10498
|
+
onKeyDown: A,
|
|
10494
10499
|
onFocus: M,
|
|
10495
10500
|
placeholder: u,
|
|
10496
10501
|
label: p,
|
|
@@ -10500,7 +10505,7 @@ function Ln(r) {
|
|
|
10500
10505
|
size: v,
|
|
10501
10506
|
autoComplete: "off",
|
|
10502
10507
|
role: "combobox",
|
|
10503
|
-
"aria-expanded":
|
|
10508
|
+
"aria-expanded": w,
|
|
10504
10509
|
"aria-haspopup": "listbox",
|
|
10505
10510
|
"aria-autocomplete": "list"
|
|
10506
10511
|
}
|
|
@@ -10508,17 +10513,17 @@ function Ln(r) {
|
|
|
10508
10513
|
/* @__PURE__ */ e(
|
|
10509
10514
|
Jr,
|
|
10510
10515
|
{
|
|
10511
|
-
open:
|
|
10516
|
+
open: Y && !_,
|
|
10512
10517
|
onDismiss: O,
|
|
10513
10518
|
anchorRef: P,
|
|
10514
10519
|
placement: "bottom-start",
|
|
10515
|
-
children: b ? l ?? /* @__PURE__ */ e(Eu, {}) :
|
|
10520
|
+
children: b ? l ?? /* @__PURE__ */ e(Eu, {}) : C.length === 0 ? c : /* @__PURE__ */ e(
|
|
10516
10521
|
"ul",
|
|
10517
10522
|
{
|
|
10518
10523
|
ref: D,
|
|
10519
10524
|
className: "gloss-autocomplete__results",
|
|
10520
10525
|
role: "listbox",
|
|
10521
|
-
children:
|
|
10526
|
+
children: C.map((R, W) => {
|
|
10522
10527
|
const V = W === I;
|
|
10523
10528
|
return /* @__PURE__ */ e(
|
|
10524
10529
|
"li",
|
|
@@ -10530,12 +10535,12 @@ function Ln(r) {
|
|
|
10530
10535
|
V && "gloss-autocomplete__result-item--highlighted"
|
|
10531
10536
|
].filter(Boolean).join(" "),
|
|
10532
10537
|
onMouseDown: (G) => {
|
|
10533
|
-
G.preventDefault(), T(
|
|
10538
|
+
G.preventDefault(), T(R);
|
|
10534
10539
|
},
|
|
10535
10540
|
onMouseEnter: () => g(W),
|
|
10536
|
-
children: o ? o(
|
|
10541
|
+
children: o ? o(R, V) : /* @__PURE__ */ e("span", { children: s(R) })
|
|
10537
10542
|
},
|
|
10538
|
-
s(
|
|
10543
|
+
s(R) + W
|
|
10539
10544
|
);
|
|
10540
10545
|
})
|
|
10541
10546
|
}
|
|
@@ -10563,19 +10568,19 @@ function Hn(r) {
|
|
|
10563
10568
|
maxSelected: b,
|
|
10564
10569
|
searchable: _ = !1,
|
|
10565
10570
|
className: v
|
|
10566
|
-
} = r, [h, k] = H(!1), [E,
|
|
10571
|
+
} = r, [h, k] = H(!1), [E, w] = H(""), [S, I] = H(-1), g = ce(null), P = ce(null), x = ce(null), D = ee(
|
|
10567
10572
|
() => t.filter((W) => a.includes(W.value)),
|
|
10568
10573
|
[t, a]
|
|
10569
|
-
),
|
|
10574
|
+
), C = ee(() => {
|
|
10570
10575
|
if (!E) return t;
|
|
10571
10576
|
const W = E.toLowerCase();
|
|
10572
10577
|
return t.filter((V) => V.label.toLowerCase().includes(W));
|
|
10573
|
-
}, [t, E]),
|
|
10578
|
+
}, [t, E]), z = b != null && a.length >= b, T = N(
|
|
10574
10579
|
(W) => {
|
|
10575
|
-
a.includes(W) ? n(a.filter((G) => G !== W)) :
|
|
10580
|
+
a.includes(W) ? n(a.filter((G) => G !== W)) : z || n([...a, W]);
|
|
10576
10581
|
},
|
|
10577
|
-
[a, n,
|
|
10578
|
-
),
|
|
10582
|
+
[a, n, z]
|
|
10583
|
+
), A = N(
|
|
10579
10584
|
(W) => {
|
|
10580
10585
|
n(a.filter((V) => V !== W));
|
|
10581
10586
|
},
|
|
@@ -10586,17 +10591,17 @@ function Hn(r) {
|
|
|
10586
10591
|
switch (W.key) {
|
|
10587
10592
|
case "ArrowDown":
|
|
10588
10593
|
W.preventDefault(), h ? I(
|
|
10589
|
-
(V) => V <
|
|
10594
|
+
(V) => V < C.length - 1 ? V + 1 : 0
|
|
10590
10595
|
) : (k(!0), I(0));
|
|
10591
10596
|
break;
|
|
10592
10597
|
case "ArrowUp":
|
|
10593
10598
|
W.preventDefault(), h && I(
|
|
10594
|
-
(V) => V > 0 ? V - 1 :
|
|
10599
|
+
(V) => V > 0 ? V - 1 : C.length - 1
|
|
10595
10600
|
);
|
|
10596
10601
|
break;
|
|
10597
10602
|
case "Enter":
|
|
10598
|
-
if (W.preventDefault(), h &&
|
|
10599
|
-
const V =
|
|
10603
|
+
if (W.preventDefault(), h && S >= 0 && C[S]) {
|
|
10604
|
+
const V = C[S];
|
|
10600
10605
|
V.disabled || T(V.value);
|
|
10601
10606
|
} else h || k(!0);
|
|
10602
10607
|
break;
|
|
@@ -10604,22 +10609,22 @@ function Hn(r) {
|
|
|
10604
10609
|
W.preventDefault(), k(!1), I(-1);
|
|
10605
10610
|
break;
|
|
10606
10611
|
case "Backspace":
|
|
10607
|
-
_ && E === "" && a.length > 0 &&
|
|
10612
|
+
_ && E === "" && a.length > 0 && A(a[a.length - 1]);
|
|
10608
10613
|
break;
|
|
10609
10614
|
}
|
|
10610
10615
|
},
|
|
10611
|
-
[f, h,
|
|
10616
|
+
[f, h, C, S, T, _, E, a, A]
|
|
10612
10617
|
);
|
|
10613
10618
|
se(() => {
|
|
10614
|
-
|
|
10615
|
-
}, [
|
|
10619
|
+
S >= 0 && x.current && x.current.querySelectorAll('[role="option"]')[S]?.scrollIntoView({ block: "nearest" });
|
|
10620
|
+
}, [S]), se(() => {
|
|
10616
10621
|
h && _ && P.current && P.current.focus();
|
|
10617
10622
|
}, [h, _]), se(() => {
|
|
10618
|
-
h || (
|
|
10623
|
+
h || (w(""), I(-1));
|
|
10619
10624
|
}, [h]);
|
|
10620
10625
|
const O = N(() => {
|
|
10621
10626
|
f || k((W) => !W);
|
|
10622
|
-
}, [f]),
|
|
10627
|
+
}, [f]), Y = N(() => {
|
|
10623
10628
|
k(!1);
|
|
10624
10629
|
}, []), j = [
|
|
10625
10630
|
"gloss-multi-select",
|
|
@@ -10627,7 +10632,7 @@ function Hn(r) {
|
|
|
10627
10632
|
p && "gloss-multi-select--error",
|
|
10628
10633
|
`gloss-multi-select--${y}`,
|
|
10629
10634
|
v
|
|
10630
|
-
].filter(Boolean).join(" "),
|
|
10635
|
+
].filter(Boolean).join(" "), R = [
|
|
10631
10636
|
"gloss-multi-select__trigger",
|
|
10632
10637
|
h && "gloss-multi-select__trigger--focused",
|
|
10633
10638
|
p && "gloss-multi-select__trigger--error"
|
|
@@ -10638,7 +10643,7 @@ function Hn(r) {
|
|
|
10638
10643
|
"div",
|
|
10639
10644
|
{
|
|
10640
10645
|
ref: g,
|
|
10641
|
-
className:
|
|
10646
|
+
className: R,
|
|
10642
10647
|
onClick: O,
|
|
10643
10648
|
onKeyDown: M,
|
|
10644
10649
|
tabIndex: f ? -1 : 0,
|
|
@@ -10647,12 +10652,12 @@ function Hn(r) {
|
|
|
10647
10652
|
"aria-haspopup": "listbox",
|
|
10648
10653
|
"aria-disabled": f || void 0,
|
|
10649
10654
|
children: [
|
|
10650
|
-
D.map((W) => /* @__PURE__ */ e("span", { className: "gloss-multi-select__tag", children: s ? s(W, () =>
|
|
10655
|
+
D.map((W) => /* @__PURE__ */ e("span", { className: "gloss-multi-select__tag", children: s ? s(W, () => A(W.value)) : /* @__PURE__ */ e(
|
|
10651
10656
|
Zr,
|
|
10652
10657
|
{
|
|
10653
10658
|
size: y === "lg" ? "md" : "sm",
|
|
10654
10659
|
variant: "outlined",
|
|
10655
|
-
onDelete: f ? void 0 : () =>
|
|
10660
|
+
onDelete: f ? void 0 : () => A(W.value),
|
|
10656
10661
|
children: W.label
|
|
10657
10662
|
}
|
|
10658
10663
|
) }, W.value)),
|
|
@@ -10664,7 +10669,7 @@ function Hn(r) {
|
|
|
10664
10669
|
className: "gloss-multi-select__search",
|
|
10665
10670
|
value: E,
|
|
10666
10671
|
onChange: (W) => {
|
|
10667
|
-
|
|
10672
|
+
w(W.target.value), h || k(!0), I(-1);
|
|
10668
10673
|
},
|
|
10669
10674
|
placeholder: D.length === 0 ? c : "",
|
|
10670
10675
|
disabled: f,
|
|
@@ -10695,32 +10700,32 @@ function Hn(r) {
|
|
|
10695
10700
|
Jr,
|
|
10696
10701
|
{
|
|
10697
10702
|
open: h && !f,
|
|
10698
|
-
onDismiss:
|
|
10703
|
+
onDismiss: Y,
|
|
10699
10704
|
anchorRef: g,
|
|
10700
10705
|
placement: "bottom-start",
|
|
10701
|
-
children:
|
|
10706
|
+
children: C.length === 0 ? o : /* @__PURE__ */ e(
|
|
10702
10707
|
"ul",
|
|
10703
10708
|
{
|
|
10704
10709
|
ref: x,
|
|
10705
10710
|
className: "gloss-multi-select__dropdown",
|
|
10706
10711
|
role: "listbox",
|
|
10707
10712
|
"aria-multiselectable": "true",
|
|
10708
|
-
children:
|
|
10709
|
-
const G = a.includes(W.value), F = V ===
|
|
10713
|
+
children: C.map((W, V) => {
|
|
10714
|
+
const G = a.includes(W.value), F = V === S, X = W.disabled || z && !G;
|
|
10710
10715
|
return /* @__PURE__ */ e(
|
|
10711
10716
|
"li",
|
|
10712
10717
|
{
|
|
10713
10718
|
role: "option",
|
|
10714
10719
|
"aria-selected": G,
|
|
10715
|
-
"aria-disabled":
|
|
10720
|
+
"aria-disabled": X || void 0,
|
|
10716
10721
|
className: [
|
|
10717
10722
|
"gloss-multi-select__option",
|
|
10718
10723
|
G && "gloss-multi-select__option--selected",
|
|
10719
10724
|
F && "gloss-multi-select__option--highlighted",
|
|
10720
|
-
|
|
10725
|
+
X && "gloss-multi-select__option--disabled"
|
|
10721
10726
|
].filter(Boolean).join(" "),
|
|
10722
|
-
onMouseDown: (
|
|
10723
|
-
|
|
10727
|
+
onMouseDown: (U) => {
|
|
10728
|
+
U.preventDefault(), X || T(W.value);
|
|
10724
10729
|
},
|
|
10725
10730
|
onMouseEnter: () => I(V),
|
|
10726
10731
|
children: i ? i(W, G) : /* @__PURE__ */ d(We, { children: [
|
|
@@ -10767,8 +10772,8 @@ const Mu = {
|
|
|
10767
10772
|
lg: { size: "48px", fontSize: "1rem" },
|
|
10768
10773
|
xl: { size: "64px", fontSize: "1.25rem" }
|
|
10769
10774
|
}, Pu = {
|
|
10770
|
-
bg:
|
|
10771
|
-
color:
|
|
10775
|
+
bg: B.BgMuted,
|
|
10776
|
+
color: B.TextSecondary
|
|
10772
10777
|
}, Ru = {
|
|
10773
10778
|
circle: "50%",
|
|
10774
10779
|
square: Se.Md
|
|
@@ -10884,8 +10889,8 @@ function ea(r) {
|
|
|
10884
10889
|
totalCount: h,
|
|
10885
10890
|
onPageChange: k,
|
|
10886
10891
|
loading: E = !1,
|
|
10887
|
-
striped:
|
|
10888
|
-
className:
|
|
10892
|
+
striped: w = !1,
|
|
10893
|
+
className: S
|
|
10889
10894
|
} = r, I = ee(
|
|
10890
10895
|
() => a.map((M) => String(M[n])),
|
|
10891
10896
|
[a, n]
|
|
@@ -10904,15 +10909,15 @@ function ea(r) {
|
|
|
10904
10909
|
O.has(M) ? O.delete(M) : O.add(M), m(O);
|
|
10905
10910
|
},
|
|
10906
10911
|
[p, m]
|
|
10907
|
-
),
|
|
10912
|
+
), C = N(
|
|
10908
10913
|
(M) => {
|
|
10909
10914
|
if (!b) return;
|
|
10910
10915
|
let O = "asc";
|
|
10911
10916
|
f === M && y === "asc" && (O = "desc"), b(M, O);
|
|
10912
10917
|
},
|
|
10913
10918
|
[f, y, b]
|
|
10914
|
-
),
|
|
10915
|
-
return /* @__PURE__ */ d("div", { className:
|
|
10919
|
+
), z = ee(() => h != null && v != null && v > 0 ? Math.ceil(h / v) : 1, [h, v]), T = _ != null && v != null && h != null && k != null, A = ["gloss-data-table", S].filter(Boolean).join(" ");
|
|
10920
|
+
return /* @__PURE__ */ d("div", { className: A, children: [
|
|
10916
10921
|
/* @__PURE__ */ d("table", { className: "gloss-data-table__table", children: [
|
|
10917
10922
|
/* @__PURE__ */ e("thead", { children: /* @__PURE__ */ d("tr", { children: [
|
|
10918
10923
|
u && /* @__PURE__ */ e("th", { className: "gloss-data-table__header-cell gloss-data-table__header-cell--checkbox", children: /* @__PURE__ */ e(
|
|
@@ -10925,7 +10930,7 @@ function ea(r) {
|
|
|
10925
10930
|
}
|
|
10926
10931
|
) }),
|
|
10927
10932
|
t.map((M) => {
|
|
10928
|
-
const O = f === M.key,
|
|
10933
|
+
const O = f === M.key, Y = [
|
|
10929
10934
|
"gloss-data-table__header-cell",
|
|
10930
10935
|
M.sortable && "gloss-data-table__header-cell--sortable",
|
|
10931
10936
|
M.align === "center" && "gloss-data-table__body-cell--align-center",
|
|
@@ -10934,9 +10939,9 @@ function ea(r) {
|
|
|
10934
10939
|
return /* @__PURE__ */ e(
|
|
10935
10940
|
"th",
|
|
10936
10941
|
{
|
|
10937
|
-
className:
|
|
10942
|
+
className: Y,
|
|
10938
10943
|
style: M.width ? { width: M.width } : void 0,
|
|
10939
|
-
onClick: M.sortable ? () =>
|
|
10944
|
+
onClick: M.sortable ? () => C(M.key) : void 0,
|
|
10940
10945
|
"aria-sort": O ? y : void 0,
|
|
10941
10946
|
children: s ? s(M) : /* @__PURE__ */ d("span", { className: "gloss-data-table__header-content", children: [
|
|
10942
10947
|
M.header,
|
|
@@ -10963,13 +10968,13 @@ function ea(r) {
|
|
|
10963
10968
|
/* @__PURE__ */ d("tbody", { children: [
|
|
10964
10969
|
E && Array.from({ length: 3 }, (M, O) => /* @__PURE__ */ d("tr", { className: "gloss-data-table__skeleton-row", children: [
|
|
10965
10970
|
u && /* @__PURE__ */ e("td", { className: "gloss-data-table__body-cell gloss-data-table__body-cell--checkbox", children: /* @__PURE__ */ e("div", { className: "gloss-data-table__skeleton-cell", style: { width: 18 } }) }),
|
|
10966
|
-
t.map((
|
|
10971
|
+
t.map((Y) => /* @__PURE__ */ e("td", { className: "gloss-data-table__body-cell", children: /* @__PURE__ */ e(
|
|
10967
10972
|
"div",
|
|
10968
10973
|
{
|
|
10969
10974
|
className: "gloss-data-table__skeleton-cell",
|
|
10970
|
-
style: { width: `${60 + (O * 20 + t.indexOf(
|
|
10975
|
+
style: { width: `${60 + (O * 20 + t.indexOf(Y) * 15) % 40}%` }
|
|
10971
10976
|
}
|
|
10972
|
-
) },
|
|
10977
|
+
) }, Y.key)),
|
|
10973
10978
|
o && /* @__PURE__ */ e("td", { className: "gloss-data-table__body-cell gloss-data-table__body-cell--actions", children: /* @__PURE__ */ e("div", { className: "gloss-data-table__skeleton-cell", style: { width: 24 } }) })
|
|
10974
10979
|
] }, `skeleton-${O}`)),
|
|
10975
10980
|
!E && a.length === 0 && /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e(
|
|
@@ -10983,17 +10988,17 @@ function ea(r) {
|
|
|
10983
10988
|
}
|
|
10984
10989
|
) }),
|
|
10985
10990
|
!E && a.map((M, O) => {
|
|
10986
|
-
const
|
|
10991
|
+
const Y = String(M[n]), j = p?.has(Y) ?? !1, R = [
|
|
10987
10992
|
"gloss-data-table__row",
|
|
10988
10993
|
j && "gloss-data-table__row--selected",
|
|
10989
|
-
|
|
10994
|
+
w && "gloss-data-table__row--striped"
|
|
10990
10995
|
].filter(Boolean).join(" ");
|
|
10991
|
-
return /* @__PURE__ */ d("tr", { className:
|
|
10996
|
+
return /* @__PURE__ */ d("tr", { className: R, children: [
|
|
10992
10997
|
u && /* @__PURE__ */ e("td", { className: "gloss-data-table__body-cell gloss-data-table__body-cell--checkbox", children: /* @__PURE__ */ e(
|
|
10993
10998
|
ut,
|
|
10994
10999
|
{
|
|
10995
11000
|
checked: j,
|
|
10996
|
-
onChange: () => D(
|
|
11001
|
+
onChange: () => D(Y),
|
|
10997
11002
|
size: "sm"
|
|
10998
11003
|
}
|
|
10999
11004
|
) }),
|
|
@@ -11015,7 +11020,7 @@ function ea(r) {
|
|
|
11015
11020
|
);
|
|
11016
11021
|
}),
|
|
11017
11022
|
o && /* @__PURE__ */ e("td", { className: "gloss-data-table__body-cell gloss-data-table__body-cell--actions", children: o(M) })
|
|
11018
|
-
] },
|
|
11023
|
+
] }, Y);
|
|
11019
11024
|
})
|
|
11020
11025
|
] })
|
|
11021
11026
|
] }),
|
|
@@ -11024,7 +11029,7 @@ function ea(r) {
|
|
|
11024
11029
|
"Page ",
|
|
11025
11030
|
_,
|
|
11026
11031
|
" of ",
|
|
11027
|
-
|
|
11032
|
+
z
|
|
11028
11033
|
] }),
|
|
11029
11034
|
/* @__PURE__ */ d("div", { className: "gloss-data-table__page-controls", children: [
|
|
11030
11035
|
/* @__PURE__ */ e(
|
|
@@ -11042,7 +11047,7 @@ function ea(r) {
|
|
|
11042
11047
|
{
|
|
11043
11048
|
variant: "outline",
|
|
11044
11049
|
size: "sm",
|
|
11045
|
-
disabled: _ >=
|
|
11050
|
+
disabled: _ >= z,
|
|
11046
11051
|
onClick: () => k(_ + 1),
|
|
11047
11052
|
children: "Next"
|
|
11048
11053
|
}
|
|
@@ -11125,7 +11130,7 @@ const Lu = {
|
|
|
11125
11130
|
dismissOnClickOutside: !0,
|
|
11126
11131
|
dismissOnEscape: !0,
|
|
11127
11132
|
role: "dialog",
|
|
11128
|
-
bg:
|
|
11133
|
+
bg: B.BgSurface,
|
|
11129
11134
|
shadow: Ze.Hover,
|
|
11130
11135
|
radius: Se.Lg,
|
|
11131
11136
|
padding: "0",
|
|
@@ -11213,14 +11218,14 @@ const Gu = {
|
|
|
11213
11218
|
fontSize: Ae.TextBase,
|
|
11214
11219
|
fontWeight: Ae.WeightNormal,
|
|
11215
11220
|
lineHeight: Ae.LeadingNormal,
|
|
11216
|
-
color:
|
|
11221
|
+
color: B.TextPrimary
|
|
11217
11222
|
},
|
|
11218
11223
|
caption: {
|
|
11219
11224
|
fontFamily: Ae.FontBody,
|
|
11220
11225
|
fontSize: Ae.TextSm,
|
|
11221
11226
|
fontWeight: Ae.WeightNormal,
|
|
11222
11227
|
lineHeight: Ae.LeadingNormal,
|
|
11223
|
-
color:
|
|
11228
|
+
color: B.TextSecondary
|
|
11224
11229
|
},
|
|
11225
11230
|
overline: {
|
|
11226
11231
|
fontFamily: Ae.FontBody,
|
|
@@ -11228,7 +11233,7 @@ const Gu = {
|
|
|
11228
11233
|
fontWeight: Ae.WeightSemibold,
|
|
11229
11234
|
lineHeight: Ae.LeadingTight,
|
|
11230
11235
|
letterSpacing: "0.08em",
|
|
11231
|
-
color:
|
|
11236
|
+
color: B.TextSecondary
|
|
11232
11237
|
}
|
|
11233
11238
|
}, Vu = {
|
|
11234
11239
|
xs: { fontSize: Ae.TextXs },
|
|
@@ -11532,22 +11537,22 @@ function _p({
|
|
|
11532
11537
|
email: p.email ?? "",
|
|
11533
11538
|
password: p.password ?? "",
|
|
11534
11539
|
rememberMe: p.rememberMe ?? !1
|
|
11535
|
-
}), [v, h] = H({}), [k, E] = H({}),
|
|
11540
|
+
}), [v, h] = H({}), [k, E] = H({}), w = N((x, D) => {
|
|
11536
11541
|
try {
|
|
11537
|
-
Xa.shape[x].parse(D), h((
|
|
11538
|
-
} catch (
|
|
11539
|
-
|
|
11542
|
+
Xa.shape[x].parse(D), h((z) => ({ ...z, [x]: void 0 }));
|
|
11543
|
+
} catch (C) {
|
|
11544
|
+
C instanceof ye.ZodError && h((z) => ({ ...z, [x]: C.issues[0]?.message }));
|
|
11540
11545
|
}
|
|
11541
|
-
}, []),
|
|
11546
|
+
}, []), S = N(
|
|
11542
11547
|
(x) => (D) => {
|
|
11543
|
-
_((
|
|
11548
|
+
_((C) => ({ ...C, [x]: D })), k[x] && w(x, D);
|
|
11544
11549
|
},
|
|
11545
|
-
[k,
|
|
11550
|
+
[k, w]
|
|
11546
11551
|
), I = N(
|
|
11547
11552
|
(x) => () => {
|
|
11548
|
-
E((D) => ({ ...D, [x]: !0 })),
|
|
11553
|
+
E((D) => ({ ...D, [x]: !0 })), w(x, b[x]);
|
|
11549
11554
|
},
|
|
11550
|
-
[b,
|
|
11555
|
+
[b, w]
|
|
11551
11556
|
), g = N(
|
|
11552
11557
|
async (x) => {
|
|
11553
11558
|
if (x.preventDefault(), f) {
|
|
@@ -11556,11 +11561,11 @@ function _p({
|
|
|
11556
11561
|
}
|
|
11557
11562
|
const D = Xa.safeParse(b);
|
|
11558
11563
|
if (!D.success) {
|
|
11559
|
-
const
|
|
11560
|
-
D.error.issues.forEach((
|
|
11561
|
-
const T =
|
|
11562
|
-
|
|
11563
|
-
}), h(
|
|
11564
|
+
const C = {};
|
|
11565
|
+
D.error.issues.forEach((z) => {
|
|
11566
|
+
const T = z.path[0];
|
|
11567
|
+
C[T] || (C[T] = z.message);
|
|
11568
|
+
}), h(C), E({ email: !0, password: !0 });
|
|
11564
11569
|
return;
|
|
11565
11570
|
}
|
|
11566
11571
|
await m?.(D.data);
|
|
@@ -11586,7 +11591,7 @@ function _p({
|
|
|
11586
11591
|
type: "email",
|
|
11587
11592
|
placeholder: "name@company.com",
|
|
11588
11593
|
value: b.email,
|
|
11589
|
-
onChange: (x) =>
|
|
11594
|
+
onChange: (x) => S("email")(x.target.value),
|
|
11590
11595
|
onBlur: I("email"),
|
|
11591
11596
|
status: v.email ? "error" : void 0,
|
|
11592
11597
|
disabled: u || l
|
|
@@ -11613,7 +11618,7 @@ function _p({
|
|
|
11613
11618
|
showToggle: !0,
|
|
11614
11619
|
placeholder: "Enter your password",
|
|
11615
11620
|
value: b.password,
|
|
11616
|
-
onChange: (x) =>
|
|
11621
|
+
onChange: (x) => S("password")(x.target.value),
|
|
11617
11622
|
onBlur: I("password"),
|
|
11618
11623
|
status: v.password ? "error" : void 0,
|
|
11619
11624
|
disabled: u || l
|
|
@@ -11625,7 +11630,7 @@ function _p({
|
|
|
11625
11630
|
ut,
|
|
11626
11631
|
{
|
|
11627
11632
|
checked: b.rememberMe,
|
|
11628
|
-
onChange: (x) =>
|
|
11633
|
+
onChange: (x) => S("rememberMe")(x.target.checked),
|
|
11629
11634
|
label: "Keep me signed in",
|
|
11630
11635
|
disabled: u || l
|
|
11631
11636
|
}
|
|
@@ -11786,8 +11791,8 @@ function Yu({
|
|
|
11786
11791
|
return { success: !0, errors: {} };
|
|
11787
11792
|
const P = {};
|
|
11788
11793
|
g.error.issues.forEach((D) => {
|
|
11789
|
-
const
|
|
11790
|
-
P[
|
|
11794
|
+
const C = D.path[0];
|
|
11795
|
+
P[C] || (P[C] = D.message);
|
|
11791
11796
|
}), h(P);
|
|
11792
11797
|
const x = {};
|
|
11793
11798
|
return Object.keys(P).forEach((D) => {
|
|
@@ -11806,13 +11811,13 @@ function Yu({
|
|
|
11806
11811
|
} catch (x) {
|
|
11807
11812
|
x instanceof ye.ZodError && h((D) => ({ ...D, [g]: x.issues[0]?.message }));
|
|
11808
11813
|
}
|
|
11809
|
-
}, []),
|
|
11814
|
+
}, []), w = N(
|
|
11810
11815
|
(g) => (P) => {
|
|
11811
11816
|
const x = { ...f, [g]: P };
|
|
11812
11817
|
y(x), l?.(x), b[g] && E(g, P);
|
|
11813
11818
|
},
|
|
11814
11819
|
[f, b, l, E]
|
|
11815
|
-
),
|
|
11820
|
+
), S = N(
|
|
11816
11821
|
(g) => () => {
|
|
11817
11822
|
_((P) => ({ ...P, [g]: !0 })), E(g, f[g] ?? ""), u?.(g);
|
|
11818
11823
|
},
|
|
@@ -11840,8 +11845,8 @@ function Yu({
|
|
|
11840
11845
|
{
|
|
11841
11846
|
placeholder: "123 Main Street",
|
|
11842
11847
|
value: f.street,
|
|
11843
|
-
onChange: (g) =>
|
|
11844
|
-
onBlur:
|
|
11848
|
+
onChange: (g) => w("street")(g.target.value),
|
|
11849
|
+
onBlur: S("street"),
|
|
11845
11850
|
status: I("street"),
|
|
11846
11851
|
disabled: i
|
|
11847
11852
|
}
|
|
@@ -11855,8 +11860,8 @@ function Yu({
|
|
|
11855
11860
|
{
|
|
11856
11861
|
placeholder: "Apt 4B",
|
|
11857
11862
|
value: f.street2,
|
|
11858
|
-
onChange: (g) =>
|
|
11859
|
-
onBlur:
|
|
11863
|
+
onChange: (g) => w("street2")(g.target.value),
|
|
11864
|
+
onBlur: S("street2"),
|
|
11860
11865
|
disabled: i
|
|
11861
11866
|
}
|
|
11862
11867
|
)
|
|
@@ -11875,8 +11880,8 @@ function Yu({
|
|
|
11875
11880
|
{
|
|
11876
11881
|
placeholder: "San Francisco",
|
|
11877
11882
|
value: f.city,
|
|
11878
|
-
onChange: (g) =>
|
|
11879
|
-
onBlur:
|
|
11883
|
+
onChange: (g) => w("city")(g.target.value),
|
|
11884
|
+
onBlur: S("city"),
|
|
11880
11885
|
status: I("city"),
|
|
11881
11886
|
disabled: i
|
|
11882
11887
|
}
|
|
@@ -11900,7 +11905,7 @@ function Yu({
|
|
|
11900
11905
|
placeholder: "Select state",
|
|
11901
11906
|
value: f.state,
|
|
11902
11907
|
onChange: (g) => {
|
|
11903
|
-
|
|
11908
|
+
w("state")(g), _((P) => ({ ...P, state: !0 }));
|
|
11904
11909
|
},
|
|
11905
11910
|
disabled: i,
|
|
11906
11911
|
options: Ku
|
|
@@ -11924,8 +11929,8 @@ function Yu({
|
|
|
11924
11929
|
{
|
|
11925
11930
|
placeholder: "94102",
|
|
11926
11931
|
value: f.zip,
|
|
11927
|
-
onChange: (g) =>
|
|
11928
|
-
onBlur:
|
|
11932
|
+
onChange: (g) => w("zip")(g.target.value),
|
|
11933
|
+
onBlur: S("zip"),
|
|
11929
11934
|
status: I("zip"),
|
|
11930
11935
|
disabled: i,
|
|
11931
11936
|
maxLength: 10
|
|
@@ -12049,35 +12054,35 @@ function Sp({
|
|
|
12049
12054
|
expiryDate: p.expiryDate ?? "",
|
|
12050
12055
|
cvv: p.cvv ?? "",
|
|
12051
12056
|
cardholderName: p.cardholderName ?? ""
|
|
12052
|
-
}), [h, k] = H({}), [E,
|
|
12057
|
+
}), [h, k] = H({}), [E, w] = H({}), S = ee(() => n ? `${a} ${n}` : a, [a, n]), I = N((C, z) => {
|
|
12053
12058
|
try {
|
|
12054
|
-
hr.shape[
|
|
12059
|
+
hr.shape[C].parse(z), k((A) => ({ ...A, [C]: void 0 }));
|
|
12055
12060
|
} catch (T) {
|
|
12056
|
-
T instanceof ye.ZodError && k((
|
|
12061
|
+
T instanceof ye.ZodError && k((A) => ({ ...A, [C]: T.issues[0]?.message }));
|
|
12057
12062
|
}
|
|
12058
12063
|
}, []), g = N(
|
|
12059
|
-
(
|
|
12060
|
-
v((T) => ({ ...T, [
|
|
12064
|
+
(C) => (z) => {
|
|
12065
|
+
v((T) => ({ ...T, [C]: z })), C === "cardNumber" && b?.(z.replace(/\s/g, "")), E[C] && I(C, z);
|
|
12061
12066
|
},
|
|
12062
12067
|
[E, I, b]
|
|
12063
12068
|
), P = N(
|
|
12064
|
-
(
|
|
12065
|
-
|
|
12069
|
+
(C) => () => {
|
|
12070
|
+
w((z) => ({ ...z, [C]: !0 })), I(C, _[C]);
|
|
12066
12071
|
},
|
|
12067
12072
|
[_, I]
|
|
12068
12073
|
), x = N(
|
|
12069
|
-
async (
|
|
12070
|
-
if (
|
|
12071
|
-
f(new FormData(
|
|
12074
|
+
async (C) => {
|
|
12075
|
+
if (C.preventDefault(), f) {
|
|
12076
|
+
f(new FormData(C.currentTarget));
|
|
12072
12077
|
return;
|
|
12073
12078
|
}
|
|
12074
|
-
const
|
|
12075
|
-
if (!
|
|
12079
|
+
const z = hr.safeParse(_);
|
|
12080
|
+
if (!z.success) {
|
|
12076
12081
|
const T = {};
|
|
12077
|
-
|
|
12078
|
-
const M =
|
|
12079
|
-
T[M] || (T[M] =
|
|
12080
|
-
}), k(T),
|
|
12082
|
+
z.error.issues.forEach((A) => {
|
|
12083
|
+
const M = A.path[0];
|
|
12084
|
+
T[M] || (T[M] = A.message);
|
|
12085
|
+
}), k(T), w({
|
|
12081
12086
|
cardNumber: !0,
|
|
12082
12087
|
expiryDate: !0,
|
|
12083
12088
|
cvv: !0,
|
|
@@ -12085,13 +12090,13 @@ function Sp({
|
|
|
12085
12090
|
});
|
|
12086
12091
|
return;
|
|
12087
12092
|
}
|
|
12088
|
-
await m?.(
|
|
12093
|
+
await m?.(z.data);
|
|
12089
12094
|
},
|
|
12090
12095
|
[_, m, f]
|
|
12091
|
-
), D = (
|
|
12092
|
-
if (E[
|
|
12093
|
-
if (h[
|
|
12094
|
-
if (_[
|
|
12096
|
+
), D = (C) => {
|
|
12097
|
+
if (E[C]) {
|
|
12098
|
+
if (h[C]) return "error";
|
|
12099
|
+
if (_[C] && !h[C]) return "success";
|
|
12095
12100
|
}
|
|
12096
12101
|
};
|
|
12097
12102
|
return /* @__PURE__ */ d("form", { onSubmit: x, className: "gloss-pattern-credit-card-form", children: [
|
|
@@ -12111,7 +12116,7 @@ function Sp({
|
|
|
12111
12116
|
mask: "creditCard",
|
|
12112
12117
|
placeholder: "4242 4242 4242 4242",
|
|
12113
12118
|
value: _.cardNumber,
|
|
12114
|
-
onAccept: (
|
|
12119
|
+
onAccept: (C) => g("cardNumber")(C),
|
|
12115
12120
|
onBlur: P("cardNumber"),
|
|
12116
12121
|
variant: D("cardNumber") ?? "default",
|
|
12117
12122
|
disabled: l || o
|
|
@@ -12128,7 +12133,7 @@ function Sp({
|
|
|
12128
12133
|
mask: "expiry",
|
|
12129
12134
|
placeholder: "MM / YY",
|
|
12130
12135
|
value: _.expiryDate,
|
|
12131
|
-
onAccept: (
|
|
12136
|
+
onAccept: (C) => g("expiryDate")(C),
|
|
12132
12137
|
onBlur: P("expiryDate"),
|
|
12133
12138
|
variant: D("expiryDate") ?? "default",
|
|
12134
12139
|
disabled: l || o
|
|
@@ -12146,7 +12151,7 @@ function Sp({
|
|
|
12146
12151
|
placeholder: "123",
|
|
12147
12152
|
maxLength: 4,
|
|
12148
12153
|
value: _.cvv,
|
|
12149
|
-
onChange: (
|
|
12154
|
+
onChange: (C) => g("cvv")(C.target.value.replace(/\D/g, "")),
|
|
12150
12155
|
onBlur: P("cvv"),
|
|
12151
12156
|
status: D("cvv"),
|
|
12152
12157
|
disabled: l || o
|
|
@@ -12162,7 +12167,7 @@ function Sp({
|
|
|
12162
12167
|
{
|
|
12163
12168
|
placeholder: "John Doe",
|
|
12164
12169
|
value: _.cardholderName,
|
|
12165
|
-
onChange: (
|
|
12170
|
+
onChange: (C) => g("cardholderName")(C.target.value),
|
|
12166
12171
|
onBlur: P("cardholderName"),
|
|
12167
12172
|
status: D("cardholderName"),
|
|
12168
12173
|
disabled: l || o
|
|
@@ -12192,7 +12197,7 @@ function Sp({
|
|
|
12192
12197
|
disabled: l || c,
|
|
12193
12198
|
leftIcon: u ? /* @__PURE__ */ e(Je, { name: "lock", definition: { size: "sm" } }) : void 0,
|
|
12194
12199
|
fullWidth: !0,
|
|
12195
|
-
children:
|
|
12200
|
+
children: S
|
|
12196
12201
|
}
|
|
12197
12202
|
)
|
|
12198
12203
|
] })
|
|
@@ -12301,12 +12306,12 @@ function wp({
|
|
|
12301
12306
|
y((x) => ({ ...x, [g]: P })), v[g] && k(g, P);
|
|
12302
12307
|
},
|
|
12303
12308
|
[v, k]
|
|
12304
|
-
),
|
|
12309
|
+
), w = N(
|
|
12305
12310
|
(g) => () => {
|
|
12306
12311
|
h((P) => ({ ...P, [g]: !0 })), k(g, f[g]);
|
|
12307
12312
|
},
|
|
12308
12313
|
[f, k]
|
|
12309
|
-
),
|
|
12314
|
+
), S = N(
|
|
12310
12315
|
async (g) => {
|
|
12311
12316
|
if (g.preventDefault(), t) {
|
|
12312
12317
|
t(new FormData(g.currentTarget));
|
|
@@ -12316,8 +12321,8 @@ function wp({
|
|
|
12316
12321
|
if (!P.success) {
|
|
12317
12322
|
const x = {};
|
|
12318
12323
|
P.error.issues.forEach((D) => {
|
|
12319
|
-
const
|
|
12320
|
-
x[
|
|
12324
|
+
const C = D.path[0];
|
|
12325
|
+
x[C] || (x[C] = D.message);
|
|
12321
12326
|
}), _(x), h({
|
|
12322
12327
|
firstName: !0,
|
|
12323
12328
|
lastName: !0,
|
|
@@ -12336,7 +12341,7 @@ function wp({
|
|
|
12336
12341
|
" ",
|
|
12337
12342
|
/* @__PURE__ */ e(Kt, { href: c, size: "sm", children: "Terms of Service" })
|
|
12338
12343
|
] }) : "I agree to the Terms of Service";
|
|
12339
|
-
return /* @__PURE__ */ d("form", { onSubmit:
|
|
12344
|
+
return /* @__PURE__ */ d("form", { onSubmit: S, className: "gloss-registration-form", children: [
|
|
12340
12345
|
/* @__PURE__ */ d("div", { className: "gloss-registration-form__header", children: [
|
|
12341
12346
|
/* @__PURE__ */ e("h3", { className: "gloss-registration-form__title", children: p }),
|
|
12342
12347
|
m && /* @__PURE__ */ e("p", { className: "gloss-registration-form__subtitle", children: m })
|
|
@@ -12351,7 +12356,7 @@ function wp({
|
|
|
12351
12356
|
placeholder: "John",
|
|
12352
12357
|
value: f.firstName,
|
|
12353
12358
|
onChange: (g) => E("firstName")(g.target.value),
|
|
12354
|
-
onBlur:
|
|
12359
|
+
onBlur: w("firstName"),
|
|
12355
12360
|
status: b.firstName ? "error" : void 0,
|
|
12356
12361
|
disabled: n || a,
|
|
12357
12362
|
name: "firstName"
|
|
@@ -12367,7 +12372,7 @@ function wp({
|
|
|
12367
12372
|
placeholder: "Doe",
|
|
12368
12373
|
value: f.lastName,
|
|
12369
12374
|
onChange: (g) => E("lastName")(g.target.value),
|
|
12370
|
-
onBlur:
|
|
12375
|
+
onBlur: w("lastName"),
|
|
12371
12376
|
status: b.lastName ? "error" : void 0,
|
|
12372
12377
|
disabled: n || a,
|
|
12373
12378
|
name: "lastName"
|
|
@@ -12385,7 +12390,7 @@ function wp({
|
|
|
12385
12390
|
placeholder: "name@company.com",
|
|
12386
12391
|
value: f.email,
|
|
12387
12392
|
onChange: (g) => E("email")(g.target.value),
|
|
12388
|
-
onBlur:
|
|
12393
|
+
onBlur: w("email"),
|
|
12389
12394
|
status: b.email ? "error" : void 0,
|
|
12390
12395
|
disabled: n || a,
|
|
12391
12396
|
name: "email"
|
|
@@ -12404,7 +12409,7 @@ function wp({
|
|
|
12404
12409
|
placeholder: "Create a password",
|
|
12405
12410
|
value: f.password,
|
|
12406
12411
|
onChange: (g) => E("password")(g.target.value),
|
|
12407
|
-
onBlur:
|
|
12412
|
+
onBlur: w("password"),
|
|
12408
12413
|
status: b.password ? "error" : void 0,
|
|
12409
12414
|
disabled: n || a,
|
|
12410
12415
|
name: "password",
|
|
@@ -12422,7 +12427,7 @@ function wp({
|
|
|
12422
12427
|
placeholder: "Confirm your password",
|
|
12423
12428
|
value: f.confirmPassword,
|
|
12424
12429
|
onChange: (g) => E("confirmPassword")(g.target.value),
|
|
12425
|
-
onBlur:
|
|
12430
|
+
onBlur: w("confirmPassword"),
|
|
12426
12431
|
status: b.confirmPassword ? "error" : void 0,
|
|
12427
12432
|
disabled: n || a,
|
|
12428
12433
|
name: "confirmPassword",
|
|
@@ -12526,32 +12531,32 @@ function Dp({
|
|
|
12526
12531
|
email: s.email ?? "",
|
|
12527
12532
|
subject: s.subject ?? "",
|
|
12528
12533
|
message: s.message ?? ""
|
|
12529
|
-
}), [m, f] = H({}), [y, b] = H({}), _ = N((
|
|
12534
|
+
}), [m, f] = H({}), [y, b] = H({}), _ = N((w, S) => {
|
|
12530
12535
|
try {
|
|
12531
|
-
Za.shape[
|
|
12536
|
+
Za.shape[w].parse(S), f((g) => ({ ...g, [w]: void 0 }));
|
|
12532
12537
|
} catch (I) {
|
|
12533
|
-
I instanceof ye.ZodError && f((g) => ({ ...g, [
|
|
12538
|
+
I instanceof ye.ZodError && f((g) => ({ ...g, [w]: I.issues[0]?.message }));
|
|
12534
12539
|
}
|
|
12535
12540
|
}, []), v = N(
|
|
12536
|
-
(
|
|
12537
|
-
p((I) => ({ ...I, [
|
|
12541
|
+
(w) => (S) => {
|
|
12542
|
+
p((I) => ({ ...I, [w]: S })), y[w] && _(w, S);
|
|
12538
12543
|
},
|
|
12539
12544
|
[y, _]
|
|
12540
12545
|
), h = N(
|
|
12541
|
-
(
|
|
12542
|
-
b((
|
|
12546
|
+
(w) => () => {
|
|
12547
|
+
b((S) => ({ ...S, [w]: !0 })), _(w, u[w]);
|
|
12543
12548
|
},
|
|
12544
12549
|
[u, _]
|
|
12545
12550
|
), k = N(
|
|
12546
|
-
async (
|
|
12547
|
-
if (
|
|
12548
|
-
t(new FormData(
|
|
12551
|
+
async (w) => {
|
|
12552
|
+
if (w.preventDefault(), t) {
|
|
12553
|
+
t(new FormData(w.currentTarget));
|
|
12549
12554
|
return;
|
|
12550
12555
|
}
|
|
12551
|
-
const
|
|
12552
|
-
if (!
|
|
12556
|
+
const S = Za.safeParse(u);
|
|
12557
|
+
if (!S.success) {
|
|
12553
12558
|
const I = {};
|
|
12554
|
-
|
|
12559
|
+
S.error.issues.forEach((g) => {
|
|
12555
12560
|
const P = g.path[0];
|
|
12556
12561
|
I[P] || (I[P] = g.message);
|
|
12557
12562
|
}), f(I), b({
|
|
@@ -12562,12 +12567,12 @@ function Dp({
|
|
|
12562
12567
|
});
|
|
12563
12568
|
return;
|
|
12564
12569
|
}
|
|
12565
|
-
await r?.(
|
|
12570
|
+
await r?.(S.data);
|
|
12566
12571
|
},
|
|
12567
12572
|
[u, r, t]
|
|
12568
|
-
), E = o?.map((
|
|
12569
|
-
value:
|
|
12570
|
-
label:
|
|
12573
|
+
), E = o?.map((w) => ({
|
|
12574
|
+
value: w,
|
|
12575
|
+
label: w
|
|
12571
12576
|
}));
|
|
12572
12577
|
return /* @__PURE__ */ d("form", { onSubmit: k, className: "gloss-contact-form", children: [
|
|
12573
12578
|
/* @__PURE__ */ d("div", { className: "gloss-contact-form__header", children: [
|
|
@@ -12582,7 +12587,7 @@ function Dp({
|
|
|
12582
12587
|
{
|
|
12583
12588
|
placeholder: "Your name",
|
|
12584
12589
|
value: u.name,
|
|
12585
|
-
onChange: (
|
|
12590
|
+
onChange: (w) => v("name")(w.target.value),
|
|
12586
12591
|
onBlur: h("name"),
|
|
12587
12592
|
status: m.name ? "error" : void 0,
|
|
12588
12593
|
disabled: n || a,
|
|
@@ -12599,7 +12604,7 @@ function Dp({
|
|
|
12599
12604
|
type: "email",
|
|
12600
12605
|
placeholder: "name@company.com",
|
|
12601
12606
|
value: u.email,
|
|
12602
|
-
onChange: (
|
|
12607
|
+
onChange: (w) => v("email")(w.target.value),
|
|
12603
12608
|
onBlur: h("email"),
|
|
12604
12609
|
status: m.email ? "error" : void 0,
|
|
12605
12610
|
disabled: n || a,
|
|
@@ -12615,8 +12620,8 @@ function Dp({
|
|
|
12615
12620
|
{
|
|
12616
12621
|
options: E,
|
|
12617
12622
|
value: u.subject,
|
|
12618
|
-
onChange: (
|
|
12619
|
-
v("subject")(
|
|
12623
|
+
onChange: (w) => {
|
|
12624
|
+
v("subject")(w), b((S) => ({ ...S, subject: !0 }));
|
|
12620
12625
|
},
|
|
12621
12626
|
placeholder: "Select a subject",
|
|
12622
12627
|
disabled: n || a
|
|
@@ -12626,7 +12631,7 @@ function Dp({
|
|
|
12626
12631
|
{
|
|
12627
12632
|
placeholder: "What is this about?",
|
|
12628
12633
|
value: u.subject,
|
|
12629
|
-
onChange: (
|
|
12634
|
+
onChange: (w) => v("subject")(w.target.value),
|
|
12630
12635
|
onBlur: h("subject"),
|
|
12631
12636
|
status: m.subject ? "error" : void 0,
|
|
12632
12637
|
disabled: n || a,
|
|
@@ -12642,7 +12647,7 @@ function Dp({
|
|
|
12642
12647
|
{
|
|
12643
12648
|
placeholder: "Tell us more...",
|
|
12644
12649
|
value: u.message,
|
|
12645
|
-
onChange: (
|
|
12650
|
+
onChange: (w) => v("message")(w.target.value),
|
|
12646
12651
|
onBlur: h("message"),
|
|
12647
12652
|
status: m.message ? "error" : void 0,
|
|
12648
12653
|
disabled: n || a,
|
|
@@ -12738,36 +12743,36 @@ function Tp({
|
|
|
12738
12743
|
cardholderName: s.card?.cardholderName ?? ""
|
|
12739
12744
|
}), [b, _] = H({}), [v, h] = H({}), [k, E] = H(
|
|
12740
12745
|
s.savePaymentMethod ?? !1
|
|
12741
|
-
), [
|
|
12746
|
+
), [w, S] = H(), I = ce(null), g = p === "credit_card" || p === "debit_card", P = N((T, A) => {
|
|
12742
12747
|
try {
|
|
12743
|
-
hr.shape[T].parse(
|
|
12748
|
+
hr.shape[T].parse(A), _((O) => ({ ...O, [T]: void 0 }));
|
|
12744
12749
|
} catch (M) {
|
|
12745
12750
|
M instanceof ye.ZodError && _((O) => ({ ...O, [T]: M.issues[0]?.message }));
|
|
12746
12751
|
}
|
|
12747
12752
|
}, []), x = N(
|
|
12748
|
-
(T) => (
|
|
12749
|
-
y((M) => ({ ...M, [T]:
|
|
12753
|
+
(T) => (A) => {
|
|
12754
|
+
y((M) => ({ ...M, [T]: A })), v[T] && P(T, A);
|
|
12750
12755
|
},
|
|
12751
12756
|
[v, P]
|
|
12752
12757
|
), D = N(
|
|
12753
12758
|
(T) => () => {
|
|
12754
|
-
h((
|
|
12759
|
+
h((A) => ({ ...A, [T]: !0 })), P(T, f[T]);
|
|
12755
12760
|
},
|
|
12756
12761
|
[f, P]
|
|
12757
|
-
),
|
|
12762
|
+
), C = (T) => {
|
|
12758
12763
|
if (v[T]) {
|
|
12759
12764
|
if (b[T]) return "error";
|
|
12760
12765
|
if (f[T] && !b[T]) return "success";
|
|
12761
12766
|
}
|
|
12762
|
-
},
|
|
12767
|
+
}, z = N(
|
|
12763
12768
|
async (T) => {
|
|
12764
|
-
if (T.preventDefault(),
|
|
12769
|
+
if (T.preventDefault(), S(void 0), t) {
|
|
12765
12770
|
t(new FormData(T.currentTarget));
|
|
12766
12771
|
return;
|
|
12767
12772
|
}
|
|
12768
|
-
const
|
|
12769
|
-
if (!
|
|
12770
|
-
|
|
12773
|
+
const A = I.current?.validate(), M = I.current?.getValues();
|
|
12774
|
+
if (!A?.success) {
|
|
12775
|
+
S("Please fix the errors above before submitting.");
|
|
12771
12776
|
return;
|
|
12772
12777
|
}
|
|
12773
12778
|
const O = {
|
|
@@ -12776,28 +12781,28 @@ function Tp({
|
|
|
12776
12781
|
savePaymentMethod: k
|
|
12777
12782
|
};
|
|
12778
12783
|
g && (O.card = f);
|
|
12779
|
-
const
|
|
12780
|
-
if (!
|
|
12784
|
+
const Y = Xu.safeParse(O);
|
|
12785
|
+
if (!Y.success) {
|
|
12781
12786
|
const j = {};
|
|
12782
|
-
|
|
12783
|
-
const W =
|
|
12787
|
+
Y.error.issues.forEach((R) => {
|
|
12788
|
+
const W = R.path;
|
|
12784
12789
|
if (W[0] === "card" && W.length === 2) {
|
|
12785
12790
|
const V = W[1];
|
|
12786
|
-
j[V] || (j[V] =
|
|
12787
|
-
} else W[0] === "card" && W.length === 1 &&
|
|
12791
|
+
j[V] || (j[V] = R.message);
|
|
12792
|
+
} else W[0] === "card" && W.length === 1 && S(R.message);
|
|
12788
12793
|
}), Object.keys(j).length > 0 && (_(j), h({
|
|
12789
12794
|
cardNumber: !0,
|
|
12790
12795
|
expiryDate: !0,
|
|
12791
12796
|
cvv: !0,
|
|
12792
12797
|
cardholderName: !0
|
|
12793
|
-
})), !
|
|
12798
|
+
})), !w && Object.keys(j).length === 0 && S("Please fix the errors above before submitting.");
|
|
12794
12799
|
return;
|
|
12795
12800
|
}
|
|
12796
|
-
await r?.(
|
|
12801
|
+
await r?.(Y.data);
|
|
12797
12802
|
},
|
|
12798
|
-
[p, f, k, g, r, t,
|
|
12803
|
+
[p, f, k, g, r, t, w]
|
|
12799
12804
|
);
|
|
12800
|
-
return /* @__PURE__ */ d("form", { onSubmit:
|
|
12805
|
+
return /* @__PURE__ */ d("form", { onSubmit: z, className: "gloss-payment-form", children: [
|
|
12801
12806
|
l && l.length > 0 && /* @__PURE__ */ d("div", { className: "gloss-payment-form__section", children: [
|
|
12802
12807
|
/* @__PURE__ */ e("h4", { className: "gloss-payment-form__section-title", children: "Payment Method" }),
|
|
12803
12808
|
/* @__PURE__ */ e(
|
|
@@ -12805,13 +12810,13 @@ function Tp({
|
|
|
12805
12810
|
{
|
|
12806
12811
|
methods: l,
|
|
12807
12812
|
value: l.find((T) => T.id === p)?.id,
|
|
12808
|
-
onChange: (T,
|
|
12813
|
+
onChange: (T, A) => {
|
|
12809
12814
|
m({
|
|
12810
12815
|
visa: "credit_card",
|
|
12811
12816
|
mastercard: "credit_card",
|
|
12812
12817
|
amex: "credit_card",
|
|
12813
12818
|
generic: "credit_card"
|
|
12814
|
-
}[
|
|
12819
|
+
}[A.type] ?? "credit_card");
|
|
12815
12820
|
},
|
|
12816
12821
|
disabled: n || a
|
|
12817
12822
|
}
|
|
@@ -12828,7 +12833,7 @@ function Tp({
|
|
|
12828
12833
|
value: f.cardholderName,
|
|
12829
12834
|
onChange: (T) => x("cardholderName")(T.target.value),
|
|
12830
12835
|
onBlur: D("cardholderName"),
|
|
12831
|
-
status:
|
|
12836
|
+
status: C("cardholderName"),
|
|
12832
12837
|
disabled: n || a,
|
|
12833
12838
|
name: "cardholderName"
|
|
12834
12839
|
}
|
|
@@ -12845,7 +12850,7 @@ function Tp({
|
|
|
12845
12850
|
value: f.cardNumber,
|
|
12846
12851
|
onAccept: (T) => x("cardNumber")(T),
|
|
12847
12852
|
onBlur: D("cardNumber"),
|
|
12848
|
-
variant:
|
|
12853
|
+
variant: C("cardNumber") === "error" ? "error" : "default",
|
|
12849
12854
|
disabled: n || a
|
|
12850
12855
|
}
|
|
12851
12856
|
),
|
|
@@ -12862,7 +12867,7 @@ function Tp({
|
|
|
12862
12867
|
value: f.expiryDate,
|
|
12863
12868
|
onAccept: (T) => x("expiryDate")(T),
|
|
12864
12869
|
onBlur: D("expiryDate"),
|
|
12865
|
-
variant:
|
|
12870
|
+
variant: C("expiryDate") === "error" ? "error" : "default",
|
|
12866
12871
|
disabled: n || a
|
|
12867
12872
|
}
|
|
12868
12873
|
),
|
|
@@ -12880,7 +12885,7 @@ function Tp({
|
|
|
12880
12885
|
value: f.cvv,
|
|
12881
12886
|
onChange: (T) => x("cvv")(T.target.value.replace(/\D/g, "")),
|
|
12882
12887
|
onBlur: D("cvv"),
|
|
12883
|
-
status:
|
|
12888
|
+
status: C("cvv"),
|
|
12884
12889
|
disabled: n || a,
|
|
12885
12890
|
name: "cvv"
|
|
12886
12891
|
}
|
|
@@ -12912,7 +12917,7 @@ function Tp({
|
|
|
12912
12917
|
disabled: n || a
|
|
12913
12918
|
}
|
|
12914
12919
|
) }),
|
|
12915
|
-
|
|
12920
|
+
w && /* @__PURE__ */ e("div", { className: "gloss-payment-form__form-error", children: w }),
|
|
12916
12921
|
/* @__PURE__ */ d("div", { className: "gloss-payment-form__actions", children: [
|
|
12917
12922
|
c && /* @__PURE__ */ e(
|
|
12918
12923
|
Ie,
|
|
@@ -13216,26 +13221,26 @@ function Ju(r) {
|
|
|
13216
13221
|
Ju.displayName = "OrderFilterBar";
|
|
13217
13222
|
const Qu = {
|
|
13218
13223
|
default: {
|
|
13219
|
-
fillBg:
|
|
13220
|
-
trackBg:
|
|
13224
|
+
fillBg: B.BrandPrimary,
|
|
13225
|
+
trackBg: B.Gray200,
|
|
13221
13226
|
height: "8px",
|
|
13222
13227
|
radius: Se.Full
|
|
13223
13228
|
},
|
|
13224
13229
|
success: {
|
|
13225
|
-
fillBg:
|
|
13226
|
-
trackBg:
|
|
13230
|
+
fillBg: B.Green600,
|
|
13231
|
+
trackBg: B.Green50,
|
|
13227
13232
|
height: "8px",
|
|
13228
13233
|
radius: Se.Full
|
|
13229
13234
|
},
|
|
13230
13235
|
warning: {
|
|
13231
|
-
fillBg:
|
|
13232
|
-
trackBg:
|
|
13236
|
+
fillBg: B.Amber600,
|
|
13237
|
+
trackBg: B.Amber100,
|
|
13233
13238
|
height: "8px",
|
|
13234
13239
|
radius: Se.Full
|
|
13235
13240
|
},
|
|
13236
13241
|
error: {
|
|
13237
|
-
fillBg:
|
|
13238
|
-
trackBg:
|
|
13242
|
+
fillBg: B.Red600,
|
|
13243
|
+
trackBg: B.Red50,
|
|
13239
13244
|
height: "8px",
|
|
13240
13245
|
radius: Se.Full
|
|
13241
13246
|
}
|
|
@@ -13299,12 +13304,12 @@ function tm(r) {
|
|
|
13299
13304
|
progress: c,
|
|
13300
13305
|
className: l
|
|
13301
13306
|
} = r, [u, p] = H(0), [m, f] = H([]), [y, b] = H([]), [_, v] = H(null), h = N(
|
|
13302
|
-
(
|
|
13303
|
-
f(
|
|
13307
|
+
(S) => {
|
|
13308
|
+
f(S), v(null), S.length > 0 && a && a([]);
|
|
13304
13309
|
},
|
|
13305
13310
|
[a]
|
|
13306
13311
|
), k = N(
|
|
13307
|
-
(
|
|
13312
|
+
(S) => S === 0 && m.length === 0 ? (v("Please upload a file to continue."), !1) : !0,
|
|
13308
13313
|
[m]
|
|
13309
13314
|
), E = N(async () => {
|
|
13310
13315
|
try {
|
|
@@ -13312,8 +13317,8 @@ function tm(r) {
|
|
|
13312
13317
|
} catch {
|
|
13313
13318
|
v("Import failed. Check your file format and try again.");
|
|
13314
13319
|
}
|
|
13315
|
-
}, [i, y]),
|
|
13316
|
-
return /* @__PURE__ */ d("div", { className:
|
|
13320
|
+
}, [i, y]), w = ["gloss-import-wizard", l].filter(Boolean).join(" ");
|
|
13321
|
+
return /* @__PURE__ */ d("div", { className: w, children: [
|
|
13317
13322
|
/* @__PURE__ */ e(
|
|
13318
13323
|
Wn,
|
|
13319
13324
|
{
|
|
@@ -13321,8 +13326,8 @@ function tm(r) {
|
|
|
13321
13326
|
activeStep: u,
|
|
13322
13327
|
onStepChange: p,
|
|
13323
13328
|
onStepValidate: k,
|
|
13324
|
-
contentSlot: (
|
|
13325
|
-
switch (
|
|
13329
|
+
contentSlot: (S) => {
|
|
13330
|
+
switch (S) {
|
|
13326
13331
|
case 0:
|
|
13327
13332
|
return /* @__PURE__ */ e("div", { className: "gloss-import-wizard__upload-zone", children: /* @__PURE__ */ e(
|
|
13328
13333
|
bn,
|