@mt-gloss/ui 0.1.86 → 0.1.87
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.
|
@@ -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(() => {
|
|
@@ -4711,7 +4715,7 @@ const ot = function({
|
|
|
4711
4715
|
"data-resize-phase": F,
|
|
4712
4716
|
children: [
|
|
4713
4717
|
_e,
|
|
4714
|
-
/* @__PURE__ */ e("div", { className: "gloss-card-shell__resize-outgoing", "aria-hidden": "true", children:
|
|
4718
|
+
/* @__PURE__ */ e("div", { className: "gloss-card-shell__resize-outgoing", "aria-hidden": "true", children: X })
|
|
4715
4719
|
]
|
|
4716
4720
|
}
|
|
4717
4721
|
),
|
|
@@ -4731,7 +4735,7 @@ const ot = function({
|
|
|
4731
4735
|
children: D ?? /* @__PURE__ */ e(
|
|
4732
4736
|
Mn,
|
|
4733
4737
|
{
|
|
4734
|
-
mode:
|
|
4738
|
+
mode: C ? "stacked" : "single",
|
|
4735
4739
|
currentTimeframe: P,
|
|
4736
4740
|
onSelectTimeframe: ae,
|
|
4737
4741
|
title: x,
|
|
@@ -4759,18 +4763,18 @@ const ot = function({
|
|
|
4759
4763
|
),
|
|
4760
4764
|
!c && (() => {
|
|
4761
4765
|
const Pe = [];
|
|
4762
|
-
|
|
4766
|
+
w && !p && !m && Pe.push({
|
|
4763
4767
|
id: "retry",
|
|
4764
4768
|
icon: /* @__PURE__ */ e(yi, { style: { fontSize: 16 } }),
|
|
4765
4769
|
label: "Retry",
|
|
4766
|
-
onClick:
|
|
4770
|
+
onClick: w
|
|
4767
4771
|
}), p && Pe.push({
|
|
4768
4772
|
id: "graph",
|
|
4769
4773
|
icon: /* @__PURE__ */ e(hi, { style: { fontSize: 16 } }),
|
|
4770
4774
|
activeIcon: /* @__PURE__ */ e(It, { style: { fontSize: 16 } }),
|
|
4771
4775
|
label: "Graph",
|
|
4772
4776
|
onClick: p,
|
|
4773
|
-
isActive:
|
|
4777
|
+
isActive: A,
|
|
4774
4778
|
showFeedback: !0,
|
|
4775
4779
|
activeColor: "#4f46e5"
|
|
4776
4780
|
}), m && Pe.push({
|
|
@@ -4792,9 +4796,9 @@ const ot = function({
|
|
|
4792
4796
|
onSettings: I ? Ge : void 0,
|
|
4793
4797
|
onRemove: y,
|
|
4794
4798
|
onReplace: k,
|
|
4795
|
-
onRefresh:
|
|
4799
|
+
onRefresh: S,
|
|
4796
4800
|
onWhatsThis: b
|
|
4797
|
-
}), xt = Ke.filter((lt) => lt.id === "whats-this"), Fe = Ke.filter((lt) => lt.id !== "whats-this"), it = (
|
|
4801
|
+
}), xt = Ke.filter((lt) => lt.id === "whats-this"), Fe = Ke.filter((lt) => lt.id !== "whats-this"), it = (R ?? []).map((lt, Et) => ({
|
|
4798
4802
|
...lt,
|
|
4799
4803
|
order: Fe.length + Et
|
|
4800
4804
|
})), Jt = xt.map((lt, Et) => ({
|
|
@@ -4817,10 +4821,10 @@ const ot = function({
|
|
|
4817
4821
|
onFlipBack: Ve,
|
|
4818
4822
|
anchorX: j,
|
|
4819
4823
|
context: {
|
|
4820
|
-
isErrorState: !!(
|
|
4824
|
+
isErrorState: !!(w && !p && !m),
|
|
4821
4825
|
colSpan: n,
|
|
4822
4826
|
isGraphCard: O,
|
|
4823
|
-
canExpand:
|
|
4827
|
+
canExpand: Y
|
|
4824
4828
|
}
|
|
4825
4829
|
}
|
|
4826
4830
|
);
|
|
@@ -4851,29 +4855,29 @@ const pd = function(t) {
|
|
|
4851
4855
|
sparklineInset: _ = "padded",
|
|
4852
4856
|
slotToActionStripConfig: v,
|
|
4853
4857
|
onSlotActionStripConfigChange: h
|
|
4854
|
-
} = t, k = u || o[o.length - 1] || "YTD", E = m ? "gloss-metric-data-stale" : "gloss-metric-data-fresh",
|
|
4858
|
+
} = t, k = u || o[o.length - 1] || "YTD", E = m ? "gloss-metric-data-stale" : "gloss-metric-data-fresh", w = ce(!1);
|
|
4855
4859
|
se(() => {
|
|
4856
|
-
if (
|
|
4857
|
-
const
|
|
4858
|
-
v &&
|
|
4860
|
+
if (w.current) return;
|
|
4861
|
+
const R = "onTableAction" in t;
|
|
4862
|
+
v && R && (console.warn(
|
|
4859
4863
|
"[StackedGroupCard AP-12] slotToActionStripConfig supplied alongside legacy onTableAction — per-slot dispatch will win; remove onTableAction from the consumer."
|
|
4860
|
-
),
|
|
4864
|
+
), w.current = !0);
|
|
4861
4865
|
}, []);
|
|
4862
|
-
const
|
|
4863
|
-
(
|
|
4864
|
-
if (y?.(
|
|
4866
|
+
const S = N(
|
|
4867
|
+
(R, W) => {
|
|
4868
|
+
if (y?.(R, W), !v) return;
|
|
4865
4869
|
let V = null;
|
|
4866
4870
|
try {
|
|
4867
|
-
V = v(
|
|
4871
|
+
V = v(R);
|
|
4868
4872
|
} catch (G) {
|
|
4869
4873
|
console.error(
|
|
4870
4874
|
"[StackedGroupCard] slotToActionStripConfig threw for slot",
|
|
4871
|
-
|
|
4875
|
+
R,
|
|
4872
4876
|
G
|
|
4873
|
-
), h?.(
|
|
4877
|
+
), h?.(R, null);
|
|
4874
4878
|
return;
|
|
4875
4879
|
}
|
|
4876
|
-
h?.(
|
|
4880
|
+
h?.(R, V);
|
|
4877
4881
|
},
|
|
4878
4882
|
[y, v, h]
|
|
4879
4883
|
), I = ce(null), g = N(() => {
|
|
@@ -4883,26 +4887,26 @@ const pd = function(t) {
|
|
|
4883
4887
|
I.current !== null && (clearTimeout(I.current), I.current = null);
|
|
4884
4888
|
}, []);
|
|
4885
4889
|
const P = N(
|
|
4886
|
-
(
|
|
4887
|
-
const W =
|
|
4890
|
+
(R) => {
|
|
4891
|
+
const W = R.relatedTarget;
|
|
4888
4892
|
W instanceof Element && (W.closest("[data-slot-idx]") || W.closest("[data-action-strip]")) || (g(), I.current = setTimeout(() => {
|
|
4889
4893
|
b?.(), v && h?.(null, null), I.current = null;
|
|
4890
4894
|
}, 250));
|
|
4891
4895
|
},
|
|
4892
4896
|
[b, v, h, g]
|
|
4893
|
-
), x =
|
|
4894
|
-
(
|
|
4895
|
-
g(), x(
|
|
4897
|
+
), x = S, D = N(
|
|
4898
|
+
(R, W) => {
|
|
4899
|
+
g(), x(R, W);
|
|
4896
4900
|
},
|
|
4897
4901
|
[x, g]
|
|
4898
|
-
),
|
|
4899
|
-
const V = i.find((
|
|
4902
|
+
), 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) => {
|
|
4903
|
+
const V = i.find((X) => X.timeframe === R) || i[W], G = V?.value ?? null, F = $r(G, { prefix: n, suffix: s, abbreviated: !0 });
|
|
4900
4904
|
return {
|
|
4901
|
-
timeframe:
|
|
4905
|
+
timeframe: R,
|
|
4902
4906
|
formatted: F,
|
|
4903
4907
|
trend: V?.trend || null
|
|
4904
4908
|
};
|
|
4905
|
-
}), [o, i, n, s]),
|
|
4909
|
+
}), [o, i, n, s]), Y = ee(
|
|
4906
4910
|
() => O.slice(0, Math.min(O.length, M)),
|
|
4907
4911
|
[O, M]
|
|
4908
4912
|
), j = c?.[k];
|
|
@@ -4940,19 +4944,19 @@ const pd = function(t) {
|
|
|
4940
4944
|
definition: { direction: "horizontal", gap: "0px", align: "stretch" },
|
|
4941
4945
|
className: E,
|
|
4942
4946
|
style: { flex: 1, minHeight: 0, position: "relative", zIndex: 2 },
|
|
4943
|
-
children:
|
|
4944
|
-
const V =
|
|
4947
|
+
children: Y.map((R, W) => {
|
|
4948
|
+
const V = R.timeframe === k;
|
|
4945
4949
|
return /* @__PURE__ */ d(
|
|
4946
4950
|
ge,
|
|
4947
4951
|
{
|
|
4948
4952
|
definition: { display: "flex", direction: "column", align: "center", justify: "center" },
|
|
4949
4953
|
"data-slot-idx": W,
|
|
4950
|
-
onPointerEnter:
|
|
4951
|
-
onPointerLeave:
|
|
4954
|
+
onPointerEnter: C ? () => D(W, R.timeframe) : void 0,
|
|
4955
|
+
onPointerLeave: z ? P : void 0,
|
|
4952
4956
|
style: {
|
|
4953
4957
|
flex: 1,
|
|
4954
4958
|
minWidth: 0,
|
|
4955
|
-
borderRight: W <
|
|
4959
|
+
borderRight: W < Y.length - 1 ? "1px solid rgba(0,0,0,0.06)" : "none",
|
|
4956
4960
|
padding: "0 4px"
|
|
4957
4961
|
},
|
|
4958
4962
|
children: [
|
|
@@ -4960,7 +4964,7 @@ const pd = function(t) {
|
|
|
4960
4964
|
"span",
|
|
4961
4965
|
{
|
|
4962
4966
|
onClick: p ? (G) => {
|
|
4963
|
-
G.stopPropagation(), p(
|
|
4967
|
+
G.stopPropagation(), p(R.timeframe);
|
|
4964
4968
|
} : void 0,
|
|
4965
4969
|
style: {
|
|
4966
4970
|
fontSize: 9,
|
|
@@ -4973,15 +4977,15 @@ const pd = function(t) {
|
|
|
4973
4977
|
cursor: p ? "pointer" : "default",
|
|
4974
4978
|
transition: "color 150ms ease"
|
|
4975
4979
|
},
|
|
4976
|
-
children:
|
|
4980
|
+
children: R.timeframe
|
|
4977
4981
|
}
|
|
4978
4982
|
),
|
|
4979
4983
|
/* @__PURE__ */ e(
|
|
4980
4984
|
"span",
|
|
4981
4985
|
{
|
|
4982
|
-
title:
|
|
4986
|
+
title: R.formatted.full,
|
|
4983
4987
|
style: {
|
|
4984
|
-
fontSize: fd(
|
|
4988
|
+
fontSize: fd(R.formatted.length),
|
|
4985
4989
|
fontWeight: 700,
|
|
4986
4990
|
color: "var(--color-text-primary, #111827)",
|
|
4987
4991
|
lineHeight: 1.1,
|
|
@@ -4991,10 +4995,10 @@ const pd = function(t) {
|
|
|
4991
4995
|
maxWidth: "100%",
|
|
4992
4996
|
textAlign: "center"
|
|
4993
4997
|
},
|
|
4994
|
-
children:
|
|
4998
|
+
children: R.formatted.display
|
|
4995
4999
|
}
|
|
4996
5000
|
),
|
|
4997
|
-
|
|
5001
|
+
R.trend && /* @__PURE__ */ d("span", { style: {
|
|
4998
5002
|
display: "flex",
|
|
4999
5003
|
alignItems: "center",
|
|
5000
5004
|
gap: 2,
|
|
@@ -5002,14 +5006,14 @@ const pd = function(t) {
|
|
|
5002
5006
|
fontSize: 9,
|
|
5003
5007
|
fontWeight: 600,
|
|
5004
5008
|
lineHeight: 1,
|
|
5005
|
-
color:
|
|
5009
|
+
color: R.trend.direction === "up" ? "var(--color-positive, #10b981)" : R.trend.direction === "down" ? "var(--color-negative, #ef4444)" : "var(--color-text-secondary, #6B7280)"
|
|
5006
5010
|
}, children: [
|
|
5007
|
-
/* @__PURE__ */ e("span", { style: { fontSize: 8 }, children:
|
|
5008
|
-
typeof
|
|
5011
|
+
/* @__PURE__ */ e("span", { style: { fontSize: 8 }, children: R.trend.direction === "up" ? "▲" : R.trend.direction === "down" ? "▼" : "▶" }),
|
|
5012
|
+
typeof R.trend.value == "number" ? `${Math.abs(R.trend.value)}%` : ""
|
|
5009
5013
|
] })
|
|
5010
5014
|
]
|
|
5011
5015
|
},
|
|
5012
|
-
|
|
5016
|
+
R.timeframe
|
|
5013
5017
|
);
|
|
5014
5018
|
})
|
|
5015
5019
|
}
|
|
@@ -5402,39 +5406,39 @@ function Dd(r) {
|
|
|
5402
5406
|
c?.(kd(D));
|
|
5403
5407
|
},
|
|
5404
5408
|
[c]
|
|
5405
|
-
),
|
|
5409
|
+
), w = ee(() => {
|
|
5406
5410
|
const D = /* @__PURE__ */ new Map();
|
|
5407
|
-
return t.map((
|
|
5408
|
-
const T =
|
|
5411
|
+
return t.map((C, z) => {
|
|
5412
|
+
const T = C.id;
|
|
5409
5413
|
if (T != null && T !== "" && T !== "None" && T !== "null" && T !== "undefined") {
|
|
5410
|
-
const
|
|
5411
|
-
return D.set(
|
|
5414
|
+
const A = String(T), M = D.get(A) || 0;
|
|
5415
|
+
return D.set(A, M + 1), M > 0 ? { ...C, id: `${A}__dup${z}` } : C;
|
|
5412
5416
|
}
|
|
5413
|
-
return { ...
|
|
5417
|
+
return { ...C, id: `fallback-${z}` };
|
|
5414
5418
|
});
|
|
5415
|
-
}, [t]),
|
|
5419
|
+
}, [t]), S = N(
|
|
5416
5420
|
(D) => _ ? _(D) : String(D.id),
|
|
5417
5421
|
[_]
|
|
5418
5422
|
), I = N(
|
|
5419
|
-
(D,
|
|
5420
|
-
y?.(D.row, D.field,
|
|
5423
|
+
(D, C) => {
|
|
5424
|
+
y?.(D.row, D.field, C);
|
|
5421
5425
|
},
|
|
5422
5426
|
[y]
|
|
5423
5427
|
);
|
|
5424
5428
|
N(
|
|
5425
|
-
(D,
|
|
5426
|
-
|
|
5429
|
+
(D, C) => {
|
|
5430
|
+
C.preventDefault(), b?.(
|
|
5427
5431
|
D.row,
|
|
5428
5432
|
D.field,
|
|
5429
|
-
|
|
5433
|
+
C.currentTarget
|
|
5430
5434
|
);
|
|
5431
5435
|
},
|
|
5432
5436
|
[b]
|
|
5433
5437
|
);
|
|
5434
5438
|
const g = N(
|
|
5435
|
-
(D,
|
|
5436
|
-
const
|
|
5437
|
-
String(
|
|
5439
|
+
(D, C) => {
|
|
5440
|
+
const z = h.find((A) => A.field === D.field);
|
|
5441
|
+
String(z?.headerClassName || "").includes("narrow-header") && (C.defaultMuiPrevented = !0, v.current?.showColumnMenu(D.field));
|
|
5438
5442
|
},
|
|
5439
5443
|
[h, v]
|
|
5440
5444
|
), P = ee(() => l ? {
|
|
@@ -5491,9 +5495,9 @@ function Dd(r) {
|
|
|
5491
5495
|
/* @__PURE__ */ e(ge, { style: { flex: 1, minHeight: 0, width: "100%", overflow: "hidden" }, children: /* @__PURE__ */ e(
|
|
5492
5496
|
fo,
|
|
5493
5497
|
{
|
|
5494
|
-
rows:
|
|
5498
|
+
rows: w,
|
|
5495
5499
|
columns: h,
|
|
5496
|
-
getRowId:
|
|
5500
|
+
getRowId: S,
|
|
5497
5501
|
apiRef: v,
|
|
5498
5502
|
onColumnHeaderClick: g,
|
|
5499
5503
|
onCellClick: y ? I : void 0,
|
|
@@ -5652,9 +5656,9 @@ const La = () => /* @__PURE__ */ d(
|
|
|
5652
5656
|
return;
|
|
5653
5657
|
}
|
|
5654
5658
|
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]),
|
|
5659
|
+
}, [h, p, v, r, k, n]), w = N(() => {
|
|
5656
5660
|
y.current && (clearTimeout(y.current), y.current = null), u(!0);
|
|
5657
|
-
}, []),
|
|
5661
|
+
}, []), S = N(() => {
|
|
5658
5662
|
y.current = setTimeout(() => {
|
|
5659
5663
|
u(!1), m(-1);
|
|
5660
5664
|
}, 150);
|
|
@@ -5736,8 +5740,8 @@ const La = () => /* @__PURE__ */ d(
|
|
|
5736
5740
|
ref: f,
|
|
5737
5741
|
value: r,
|
|
5738
5742
|
onChange: (g) => t(g.target.value),
|
|
5739
|
-
onFocus:
|
|
5740
|
-
onBlur:
|
|
5743
|
+
onFocus: w,
|
|
5744
|
+
onBlur: S,
|
|
5741
5745
|
onKeyDown: E,
|
|
5742
5746
|
placeholder: "",
|
|
5743
5747
|
style: {
|
|
@@ -5957,12 +5961,12 @@ function zd(r, t, a, n, s, i, o, c, l, u) {
|
|
|
5957
5961
|
right: V.right - k.left,
|
|
5958
5962
|
bottom: V.bottom - k.top
|
|
5959
5963
|
};
|
|
5960
|
-
},
|
|
5964
|
+
}, 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
5965
|
m((W) => ({
|
|
5962
5966
|
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:
|
|
5967
|
+
itemFilter: { left: M, width: O, top: R, height: 32 },
|
|
5968
|
+
entityPill: C ? { left: C.left, width: C.width, top: C.top, height: C.height } : W.entityPill,
|
|
5969
|
+
entityFilter: { left: Y, width: j, top: R, height: 32 },
|
|
5966
5970
|
tracks: g
|
|
5967
5971
|
}));
|
|
5968
5972
|
};
|
|
@@ -6024,15 +6028,15 @@ const $d = Z.memo(({
|
|
|
6024
6028
|
id: me.id,
|
|
6025
6029
|
label: me.label || me.name || me.id
|
|
6026
6030
|
}))
|
|
6027
|
-
}), [y, l]), [E,
|
|
6031
|
+
}), [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
6032
|
W,
|
|
6029
6033
|
V,
|
|
6030
6034
|
G,
|
|
6031
6035
|
F,
|
|
6032
|
-
K,
|
|
6033
6036
|
X,
|
|
6037
|
+
U,
|
|
6034
6038
|
_,
|
|
6035
|
-
|
|
6039
|
+
R,
|
|
6036
6040
|
g,
|
|
6037
6041
|
x
|
|
6038
6042
|
), q = ce(_.dimension), te = ce(null);
|
|
@@ -6042,31 +6046,31 @@ const $d = Z.memo(({
|
|
|
6042
6046
|
const he = ce({ id: null, name: null }), oe = ce({ id: null, name: null });
|
|
6043
6047
|
se(() => {
|
|
6044
6048
|
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),
|
|
6049
|
+
(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
6050
|
}, [r.entity?.id, r.entity?.name, r.byItem?.id, r.byItem?.name]);
|
|
6047
6051
|
const be = N((me, _e) => {
|
|
6048
|
-
me === "metric" ? a(_e) : me === "entity" ? (t(_e), _e !== "items" &&
|
|
6052
|
+
me === "metric" ? a(_e) : me === "entity" ? (t(_e), _e !== "items" && w(!1)) : me === "dimension" && n(_e);
|
|
6049
6053
|
}, [a, t, n]), de = N(() => {
|
|
6050
|
-
_.entity === "items" &&
|
|
6054
|
+
_.entity === "items" && w((me) => !me);
|
|
6051
6055
|
}, [_.entity]), ie = N(() => {
|
|
6052
6056
|
I((me) => !me);
|
|
6053
6057
|
}, []), fe = N((me) => {
|
|
6054
|
-
P(me),
|
|
6058
|
+
P(me), z(""), i(me, me);
|
|
6055
6059
|
}, [i]), Ce = N(() => {
|
|
6056
6060
|
P(null), i(null, null);
|
|
6057
6061
|
}, [i]), ke = N((me) => {
|
|
6058
|
-
D(me),
|
|
6062
|
+
D(me), A(""), s(me, me);
|
|
6059
6063
|
}, [s]), Ne = N(() => {
|
|
6060
6064
|
D(null), s(null, null);
|
|
6061
6065
|
}, [s]), Xe = N((me) => {
|
|
6062
6066
|
const _e = me.label || me.name || me.id;
|
|
6063
|
-
P(_e),
|
|
6067
|
+
P(_e), z(""), i(me.id, _e);
|
|
6064
6068
|
}, [i]), we = N((me) => {
|
|
6065
6069
|
const _e = me.label || me.name || me.id;
|
|
6066
|
-
D(_e),
|
|
6070
|
+
D(_e), A(""), s(me.id, _e);
|
|
6067
6071
|
}, [s]);
|
|
6068
6072
|
return /* @__PURE__ */ d("div", { ref: W, className: "gloss-chart-control-bar", children: [
|
|
6069
|
-
|
|
6073
|
+
K.tracks.map((me, _e) => /* @__PURE__ */ e(
|
|
6070
6074
|
"div",
|
|
6071
6075
|
{
|
|
6072
6076
|
className: "gloss-chart-control-bar__track",
|
|
@@ -6078,28 +6082,28 @@ const $d = Z.memo(({
|
|
|
6078
6082
|
/* @__PURE__ */ e(
|
|
6079
6083
|
jr,
|
|
6080
6084
|
{
|
|
6081
|
-
pillLeft:
|
|
6082
|
-
pillWidth:
|
|
6083
|
-
pillTop:
|
|
6084
|
-
pillHeight:
|
|
6085
|
-
filterLeft:
|
|
6086
|
-
filterWidth:
|
|
6087
|
-
filterTop:
|
|
6088
|
-
filterHeight:
|
|
6089
|
-
visible:
|
|
6085
|
+
pillLeft: K.itemPill.left,
|
|
6086
|
+
pillWidth: K.itemPill.width,
|
|
6087
|
+
pillTop: K.itemPill.top,
|
|
6088
|
+
pillHeight: K.itemPill.height,
|
|
6089
|
+
filterLeft: K.itemFilter.left,
|
|
6090
|
+
filterWidth: K.itemFilter.width,
|
|
6091
|
+
filterTop: K.itemFilter.top,
|
|
6092
|
+
filterHeight: K.itemFilter.height,
|
|
6093
|
+
visible: Y
|
|
6090
6094
|
}
|
|
6091
6095
|
),
|
|
6092
6096
|
/* @__PURE__ */ e(
|
|
6093
6097
|
jr,
|
|
6094
6098
|
{
|
|
6095
|
-
pillLeft:
|
|
6096
|
-
pillWidth:
|
|
6097
|
-
pillTop:
|
|
6098
|
-
pillHeight:
|
|
6099
|
-
filterLeft:
|
|
6100
|
-
filterWidth:
|
|
6101
|
-
filterTop:
|
|
6102
|
-
filterHeight:
|
|
6099
|
+
pillLeft: K.entityPill.left,
|
|
6100
|
+
pillWidth: K.entityPill.width,
|
|
6101
|
+
pillTop: K.entityPill.top,
|
|
6102
|
+
pillHeight: K.entityPill.height,
|
|
6103
|
+
filterLeft: K.entityFilter.left,
|
|
6104
|
+
filterWidth: K.entityFilter.width,
|
|
6105
|
+
filterTop: K.entityFilter.top,
|
|
6106
|
+
filterHeight: K.entityFilter.height,
|
|
6103
6107
|
visible: j
|
|
6104
6108
|
}
|
|
6105
6109
|
)
|
|
@@ -6117,9 +6121,9 @@ const $d = Z.memo(({
|
|
|
6117
6121
|
metricGroupRef: V,
|
|
6118
6122
|
entityGroupRef: G,
|
|
6119
6123
|
dimensionGroupRef: F,
|
|
6120
|
-
entityTabRefs:
|
|
6121
|
-
dimensionTabRefs:
|
|
6122
|
-
showItemFilter:
|
|
6124
|
+
entityTabRefs: X,
|
|
6125
|
+
dimensionTabRefs: U,
|
|
6126
|
+
showItemFilter: Y,
|
|
6123
6127
|
showEntityFilter: j,
|
|
6124
6128
|
showDimensionGroup: b,
|
|
6125
6129
|
datePickerSlot: p
|
|
@@ -6128,20 +6132,20 @@ const $d = Z.memo(({
|
|
|
6128
6132
|
/* @__PURE__ */ e("div", { className: "gloss-chart-control-bar__row-2-overlay", children: /* @__PURE__ */ e(
|
|
6129
6133
|
Bn,
|
|
6130
6134
|
{
|
|
6131
|
-
showRow2:
|
|
6132
|
-
showItemFilter:
|
|
6135
|
+
showRow2: R,
|
|
6136
|
+
showItemFilter: Y,
|
|
6133
6137
|
showEntityFilter: j,
|
|
6134
|
-
itemFilterLayout: { left:
|
|
6135
|
-
entityFilterLayout: { left:
|
|
6136
|
-
itemSearch:
|
|
6137
|
-
setItemSearch:
|
|
6138
|
+
itemFilterLayout: { left: K.itemFilter.left, width: K.itemFilter.width },
|
|
6139
|
+
entityFilterLayout: { left: K.entityFilter.left, width: K.entityFilter.width },
|
|
6140
|
+
itemSearch: C,
|
|
6141
|
+
setItemSearch: z,
|
|
6138
6142
|
onItemSubmit: fe,
|
|
6139
6143
|
onItemSelect: Xe,
|
|
6140
6144
|
onItemClear: Ce,
|
|
6141
6145
|
itemFilterValue: g,
|
|
6142
6146
|
itemOptions: u,
|
|
6143
6147
|
entitySearch: T,
|
|
6144
|
-
setEntitySearch:
|
|
6148
|
+
setEntitySearch: A,
|
|
6145
6149
|
onEntitySubmit: ke,
|
|
6146
6150
|
onEntitySelect: we,
|
|
6147
6151
|
onEntityClear: Ne,
|
|
@@ -6649,14 +6653,14 @@ function Wd({
|
|
|
6649
6653
|
orderStatus: i?.status,
|
|
6650
6654
|
tableType: m,
|
|
6651
6655
|
field: f
|
|
6652
|
-
}) : [], [n, s, o, p, i, m, f]),
|
|
6656
|
+
}) : [], [n, s, o, p, i, m, f]), w = ee(() => {
|
|
6653
6657
|
const x = /* @__PURE__ */ new Map();
|
|
6654
6658
|
for (const D of E) {
|
|
6655
|
-
const
|
|
6656
|
-
x.has(
|
|
6659
|
+
const C = D.section;
|
|
6660
|
+
x.has(C) || x.set(C, []), x.get(C).push(D);
|
|
6657
6661
|
}
|
|
6658
6662
|
return x;
|
|
6659
|
-
}, [E]),
|
|
6663
|
+
}, [E]), S = N((x) => ({
|
|
6660
6664
|
row: i,
|
|
6661
6665
|
entityType: o,
|
|
6662
6666
|
entityId: c ?? i.id,
|
|
@@ -6666,9 +6670,9 @@ function Wd({
|
|
|
6666
6670
|
tableType: m,
|
|
6667
6671
|
field: f ?? x.filterKey
|
|
6668
6672
|
}), [i, o, c, l, u, p, m, f]), I = N((x) => {
|
|
6669
|
-
const D =
|
|
6670
|
-
if (
|
|
6671
|
-
|
|
6673
|
+
const D = S(x), C = k;
|
|
6674
|
+
if (C) {
|
|
6675
|
+
C(x, D), a();
|
|
6672
6676
|
return;
|
|
6673
6677
|
}
|
|
6674
6678
|
switch (x.type) {
|
|
@@ -6694,7 +6698,7 @@ function Wd({
|
|
|
6694
6698
|
}
|
|
6695
6699
|
}
|
|
6696
6700
|
a();
|
|
6697
|
-
}, [
|
|
6701
|
+
}, [S, b, _, v, h, k, a]), g = N((x) => {
|
|
6698
6702
|
const D = x.labelFn ? x.labelFn(i, o) : x.label;
|
|
6699
6703
|
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
6704
|
/* @__PURE__ */ e(Je, { icon: Wa(x.icon), definition: { size: "sm" }, style: { marginRight: 8, flexShrink: 0 } }),
|
|
@@ -6720,19 +6724,19 @@ function Wd({
|
|
|
6720
6724
|
}, [i, o, I]), P = ee(() => {
|
|
6721
6725
|
const x = [];
|
|
6722
6726
|
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
|
-
|
|
6727
|
+
for (const C of Hd) {
|
|
6728
|
+
const z = w.get(C);
|
|
6729
|
+
if (!(!z || z.length === 0)) {
|
|
6730
|
+
D > 0 && x.push(/* @__PURE__ */ e(en, { className: "gloss-unified-context-menu__divider" }, `divider-${C}`));
|
|
6731
|
+
for (const T of z) {
|
|
6732
|
+
const A = g(T);
|
|
6733
|
+
A && x.push(A);
|
|
6730
6734
|
}
|
|
6731
6735
|
D++;
|
|
6732
6736
|
}
|
|
6733
6737
|
}
|
|
6734
6738
|
return x;
|
|
6735
|
-
}, [
|
|
6739
|
+
}, [w, g]);
|
|
6736
6740
|
return /* @__PURE__ */ e(
|
|
6737
6741
|
go,
|
|
6738
6742
|
{
|
|
@@ -6790,9 +6794,9 @@ const Kr = ({
|
|
|
6790
6794
|
l && l(r, !p);
|
|
6791
6795
|
}, [r, p, l]), E = N((I) => {
|
|
6792
6796
|
s(I), h();
|
|
6793
|
-
}, [s, h]),
|
|
6797
|
+
}, [s, h]), w = N((I, g) => {
|
|
6794
6798
|
I.stopPropagation(), o && o(g);
|
|
6795
|
-
}, [o]),
|
|
6799
|
+
}, [o]), S = /* @__PURE__ */ d(
|
|
6796
6800
|
ne,
|
|
6797
6801
|
{
|
|
6798
6802
|
ref: u,
|
|
@@ -6887,7 +6891,7 @@ const Kr = ({
|
|
|
6887
6891
|
qe,
|
|
6888
6892
|
{
|
|
6889
6893
|
size: "small",
|
|
6890
|
-
onClick: (x) =>
|
|
6894
|
+
onClick: (x) => w(x, I.id),
|
|
6891
6895
|
sx: {
|
|
6892
6896
|
p: 0.25,
|
|
6893
6897
|
opacity: P ? 1 : 0,
|
|
@@ -6922,9 +6926,9 @@ const Kr = ({
|
|
|
6922
6926
|
modifiers: [{ name: "offset", options: { offset: [0, -9] } }]
|
|
6923
6927
|
}
|
|
6924
6928
|
},
|
|
6925
|
-
children:
|
|
6929
|
+
children: S
|
|
6926
6930
|
}
|
|
6927
|
-
) :
|
|
6931
|
+
) : S;
|
|
6928
6932
|
};
|
|
6929
6933
|
Kr.displayName = "ExpandableChip";
|
|
6930
6934
|
const Vd = ["S", "M", "T", "W", "T", "F", "S"], Ga = {
|
|
@@ -6996,71 +7000,71 @@ const Vd = ["S", "M", "T", "W", "T", "F", "S"], Ga = {
|
|
|
6996
7000
|
}, [r, t]), se(() => {
|
|
6997
7001
|
l && y(new Date(l.getFullYear(), l.getMonth(), 1));
|
|
6998
7002
|
}, [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(
|
|
7003
|
+
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(() => {
|
|
7004
|
+
y(new Date(E, w - 1, 1));
|
|
7005
|
+
}, [E, w]), x = N(() => {
|
|
7006
|
+
y(new Date(E, w + 1, 1));
|
|
7007
|
+
}, [E, w]), D = N((F) => {
|
|
7008
|
+
const X = F.target.value;
|
|
7009
|
+
y(new Date(E, X, 1));
|
|
7010
|
+
}, [E]), C = N((F) => {
|
|
7011
|
+
const X = F.target.value;
|
|
7012
|
+
y(new Date(X, w, 1));
|
|
7013
|
+
}, [w]), z = N((F) => n.some(
|
|
7012
7014
|
(X) => X.startDate && X.endDate && F >= X.startDate && F <= X.endDate
|
|
7013
|
-
)
|
|
7015
|
+
), [n]), T = N((F) => n.filter(
|
|
7016
|
+
(U) => U.startDate && U.endDate && F >= U.startDate && F <= U.endDate
|
|
7017
|
+
).map((U) => U.label).join(", "), [n]), A = N((F) => {
|
|
7014
7018
|
if (!r) return !1;
|
|
7015
|
-
const
|
|
7016
|
-
return
|
|
7019
|
+
const X = v || t;
|
|
7020
|
+
return X ? co(F, r, X) : !1;
|
|
7017
7021
|
}, [r, t, v]), M = N((F) => !F || !r ? !1 : rr(F, r), [r]), O = N((F) => {
|
|
7018
7022
|
if (!F) return !1;
|
|
7019
|
-
const
|
|
7020
|
-
return
|
|
7021
|
-
}, [t, v]),
|
|
7023
|
+
const X = v || t;
|
|
7024
|
+
return X ? rr(F, X) : !1;
|
|
7025
|
+
}, [t, v]), Y = N((F) => {
|
|
7022
7026
|
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,
|
|
7027
|
+
const X = v || t;
|
|
7028
|
+
return X ? rr(r, X) && M(F) : M(F);
|
|
7029
|
+
}, [r, t, v, M]), j = N((F) => F ? !!(m && F > m) : !1, [m]), R = N((F) => {
|
|
7030
|
+
const X = new Date(E, w, F);
|
|
7031
|
+
b ? (k.current = !0, r && X < r ? a(X, r) : a(r, X), _(!1), h(null)) : (k.current = !0, a(X, null), _(!0));
|
|
7032
|
+
}, [E, w, r, b, a]), W = N((F) => {
|
|
7033
|
+
b && h(new Date(E, w, F));
|
|
7034
|
+
}, [b, E, w]), V = N(() => {
|
|
7031
7035
|
h(null);
|
|
7032
7036
|
}, []), G = ee(() => {
|
|
7033
7037
|
const F = [];
|
|
7034
|
-
for (let
|
|
7038
|
+
for (let U = 0; U < I; U++)
|
|
7035
7039
|
F.push(
|
|
7036
7040
|
/* @__PURE__ */ e(
|
|
7037
7041
|
ne,
|
|
7038
7042
|
{
|
|
7039
7043
|
className: "mini-calendar__day mini-calendar__day--empty"
|
|
7040
7044
|
},
|
|
7041
|
-
`empty-${
|
|
7045
|
+
`empty-${U}`
|
|
7042
7046
|
)
|
|
7043
7047
|
);
|
|
7044
|
-
const
|
|
7045
|
-
for (let
|
|
7046
|
-
const
|
|
7048
|
+
const X = /* @__PURE__ */ new Date();
|
|
7049
|
+
for (let U = 1; U <= S; U++) {
|
|
7050
|
+
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
7051
|
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
7052
|
const Ce = /* @__PURE__ */ e(
|
|
7049
7053
|
ne,
|
|
7050
7054
|
{
|
|
7051
7055
|
component: "button",
|
|
7052
|
-
onClick: be ? void 0 : () =>
|
|
7053
|
-
onMouseEnter: be ? void 0 : () => W(
|
|
7056
|
+
onClick: be ? void 0 : () => R(U),
|
|
7057
|
+
onMouseEnter: be ? void 0 : () => W(U),
|
|
7054
7058
|
className: fe.join(" "),
|
|
7055
7059
|
sx: {
|
|
7056
7060
|
border: "none",
|
|
7057
7061
|
fontFamily: "inherit"
|
|
7058
7062
|
},
|
|
7059
|
-
children:
|
|
7063
|
+
children: U
|
|
7060
7064
|
}
|
|
7061
7065
|
);
|
|
7062
7066
|
if (de && !be) {
|
|
7063
|
-
const ke = T(
|
|
7067
|
+
const ke = T(K);
|
|
7064
7068
|
F.push(
|
|
7065
7069
|
/* @__PURE__ */ e(
|
|
7066
7070
|
ht,
|
|
@@ -7075,16 +7079,16 @@ const Vd = ["S", "M", "T", "W", "T", "F", "S"], Ga = {
|
|
|
7075
7079
|
},
|
|
7076
7080
|
children: Ce
|
|
7077
7081
|
},
|
|
7078
|
-
|
|
7082
|
+
U
|
|
7079
7083
|
)
|
|
7080
7084
|
);
|
|
7081
7085
|
} else
|
|
7082
7086
|
F.push(
|
|
7083
|
-
/* @__PURE__ */ e(Z.Fragment, { children: Ce },
|
|
7087
|
+
/* @__PURE__ */ e(Z.Fragment, { children: Ce }, U)
|
|
7084
7088
|
);
|
|
7085
7089
|
}
|
|
7086
7090
|
return F;
|
|
7087
|
-
}, [E,
|
|
7091
|
+
}, [E, w, S, I, A, M, O, Y, j, z, T, R, W, u]);
|
|
7088
7092
|
return /* @__PURE__ */ d(
|
|
7089
7093
|
ne,
|
|
7090
7094
|
{
|
|
@@ -7105,7 +7109,7 @@ const Vd = ["S", "M", "T", "W", "T", "F", "S"], Ga = {
|
|
|
7105
7109
|
/* @__PURE__ */ e(
|
|
7106
7110
|
Ca,
|
|
7107
7111
|
{
|
|
7108
|
-
value:
|
|
7112
|
+
value: w,
|
|
7109
7113
|
onChange: D,
|
|
7110
7114
|
variant: "standard",
|
|
7111
7115
|
disableUnderline: !0,
|
|
@@ -7125,14 +7129,14 @@ const Vd = ["S", "M", "T", "W", "T", "F", "S"], Ga = {
|
|
|
7125
7129
|
sx: { maxHeight: 200 }
|
|
7126
7130
|
}
|
|
7127
7131
|
},
|
|
7128
|
-
children: jd.map((F,
|
|
7132
|
+
children: jd.map((F, X) => /* @__PURE__ */ e(jt, { value: X, sx: { fontSize: 13 }, children: F }, X))
|
|
7129
7133
|
}
|
|
7130
7134
|
),
|
|
7131
7135
|
/* @__PURE__ */ e(
|
|
7132
7136
|
Ca,
|
|
7133
7137
|
{
|
|
7134
7138
|
value: E,
|
|
7135
|
-
onChange:
|
|
7139
|
+
onChange: C,
|
|
7136
7140
|
variant: "standard",
|
|
7137
7141
|
disableUnderline: !0,
|
|
7138
7142
|
sx: {
|
|
@@ -7157,13 +7161,13 @@ const Vd = ["S", "M", "T", "W", "T", "F", "S"], Ga = {
|
|
|
7157
7161
|
] }) : /* @__PURE__ */ e(Te, { variant: "body2", fontWeight: 500, children: g }),
|
|
7158
7162
|
/* @__PURE__ */ e(qe, { onClick: x, size: "small", sx: { p: 0.5 }, children: /* @__PURE__ */ e(Uo, { fontSize: "small" }) })
|
|
7159
7163
|
] }),
|
|
7160
|
-
/* @__PURE__ */ e(ne, { className: "mini-calendar__grid", children: Vd.map((F,
|
|
7164
|
+
/* @__PURE__ */ e(ne, { className: "mini-calendar__grid", children: Vd.map((F, X) => /* @__PURE__ */ e(
|
|
7161
7165
|
ne,
|
|
7162
7166
|
{
|
|
7163
7167
|
className: "mini-calendar__day-header",
|
|
7164
7168
|
children: F
|
|
7165
7169
|
},
|
|
7166
|
-
`header-${
|
|
7170
|
+
`header-${X}`
|
|
7167
7171
|
)) }),
|
|
7168
7172
|
/* @__PURE__ */ e(ne, { className: "mini-calendar__grid", children: G }),
|
|
7169
7173
|
(o || b) && /* @__PURE__ */ d(ne, { className: "mini-calendar__legend", children: [
|
|
@@ -7323,9 +7327,9 @@ const Yd = {
|
|
|
7323
7327
|
const h = ee(() => ({
|
|
7324
7328
|
...Yd,
|
|
7325
7329
|
...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 :
|
|
7330
|
+
}), [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(($) => {
|
|
7331
|
+
U($), v?.($);
|
|
7332
|
+
}, [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
7333
|
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
7334
|
...ue,
|
|
7331
7335
|
active: St(ue)
|
|
@@ -7361,8 +7365,8 @@ const Yd = {
|
|
|
7361
7365
|
};
|
|
7362
7366
|
}, [xr, Nr, m]), pt = o || !!E;
|
|
7363
7367
|
se(() => {
|
|
7364
|
-
o && j === null && (
|
|
7365
|
-
}, [o, j,
|
|
7368
|
+
o && j === null && (R(z), V(A), F(O));
|
|
7369
|
+
}, [o, j, z, A, O]);
|
|
7366
7370
|
const He = ee(
|
|
7367
7371
|
() => pe.find(($) => $.active),
|
|
7368
7372
|
[pe]
|
|
@@ -7394,24 +7398,24 @@ const Yd = {
|
|
|
7394
7398
|
const le = nr(rt.start, rt.end, $, pe);
|
|
7395
7399
|
re = le ? le.id : null;
|
|
7396
7400
|
}
|
|
7397
|
-
re ? (T(re), M(null),
|
|
7401
|
+
re ? (T(re), M(null), Y(null)) : (T("custom"), M(rt.start), Y(rt.end)), R(null), V(null), F(null);
|
|
7398
7402
|
}, [rt.start?.getTime(), rt.end?.getTime(), pe, h.lastPreset]);
|
|
7399
7403
|
const Un = ee(() => {
|
|
7400
7404
|
let $, L;
|
|
7401
|
-
if (
|
|
7402
|
-
$ =
|
|
7405
|
+
if (z === "custom" && A && O)
|
|
7406
|
+
$ = A, L = O;
|
|
7403
7407
|
else {
|
|
7404
|
-
const re = pe.find((le) => le.id ===
|
|
7408
|
+
const re = pe.find((le) => le.id === z);
|
|
7405
7409
|
if (re)
|
|
7406
7410
|
$ = re.startDate, L = re.endDate;
|
|
7407
7411
|
else {
|
|
7408
|
-
const le = Ye(
|
|
7412
|
+
const le = Ye(z);
|
|
7409
7413
|
$ = le.start, L = le.end;
|
|
7410
7414
|
}
|
|
7411
7415
|
}
|
|
7412
7416
|
return Ot($, L, /* @__PURE__ */ new Date(), pe).display;
|
|
7413
|
-
}, [
|
|
7414
|
-
if (!
|
|
7417
|
+
}, [z, A, O, pe]), Xn = ee(() => {
|
|
7418
|
+
if (!K || !oe) return null;
|
|
7415
7419
|
let $, L;
|
|
7416
7420
|
if (oe === "custom" && de && fe)
|
|
7417
7421
|
$ = de, L = fe;
|
|
@@ -7425,16 +7429,16 @@ const Yd = {
|
|
|
7425
7429
|
}
|
|
7426
7430
|
}
|
|
7427
7431
|
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 ===
|
|
7432
|
+
}, [K, oe, de, fe, pe]), da = ee(() => {
|
|
7433
|
+
const $ = ["7d", "30d", "60d", "90d", "mtd", "qtd", "ytd", "lytd"], L = pe.find((Q) => Q.id === z);
|
|
7430
7434
|
if (L)
|
|
7431
7435
|
return ft(L.startDate, L.endDate, /* @__PURE__ */ new Date());
|
|
7432
|
-
if ($.includes(
|
|
7433
|
-
const { start: Q, end: re } = Ye(
|
|
7436
|
+
if ($.includes(z)) {
|
|
7437
|
+
const { start: Q, end: re } = Ye(z);
|
|
7434
7438
|
return ft(Q, re, /* @__PURE__ */ new Date());
|
|
7435
7439
|
}
|
|
7436
7440
|
return "";
|
|
7437
|
-
}, [
|
|
7441
|
+
}, [z, pe]), ua = ee(() => {
|
|
7438
7442
|
let $, L;
|
|
7439
7443
|
if (Be === "custom" && Mt && mt)
|
|
7440
7444
|
$ = Mt, L = mt;
|
|
@@ -7451,7 +7455,7 @@ const Yd = {
|
|
|
7451
7455
|
return Q.preset ? `${Q.preset.label} (${re})` : re;
|
|
7452
7456
|
}, [Be, Mt, mt, pe]);
|
|
7453
7457
|
ee(() => {
|
|
7454
|
-
if (!
|
|
7458
|
+
if (!K || !ct) return null;
|
|
7455
7459
|
let $, L;
|
|
7456
7460
|
if (ct === "custom" && Pt && Rt)
|
|
7457
7461
|
$ = Pt, L = Rt;
|
|
@@ -7466,8 +7470,8 @@ const Yd = {
|
|
|
7466
7470
|
}
|
|
7467
7471
|
const Q = Ot($, L, /* @__PURE__ */ new Date(), pe), re = ft($, L, /* @__PURE__ */ new Date());
|
|
7468
7472
|
return Q.preset ? `${Q.preset.label} (${re})` : re;
|
|
7469
|
-
}, [
|
|
7470
|
-
if (!
|
|
7473
|
+
}, [K, ct, Pt, Rt, pe]), ee(() => {
|
|
7474
|
+
if (!K || Ee < 3 || !dt) return null;
|
|
7471
7475
|
let $, L;
|
|
7472
7476
|
if (dt === "custom" && Bt && At)
|
|
7473
7477
|
$ = Bt, L = At;
|
|
@@ -7482,10 +7486,10 @@ const Yd = {
|
|
|
7482
7486
|
}
|
|
7483
7487
|
const Q = Ot($, L, /* @__PURE__ */ new Date(), pe), re = ft($, L, /* @__PURE__ */ new Date());
|
|
7484
7488
|
return Q.preset ? `${Q.preset.label} (${re})` : re;
|
|
7485
|
-
}, [
|
|
7489
|
+
}, [K, Ee, dt, Bt, At, pe]);
|
|
7486
7490
|
const qn = N(($) => {
|
|
7487
|
-
|
|
7488
|
-
}, [
|
|
7491
|
+
R(z), V(A), F(O), K && (Ne(oe), we(de), _e(fe), Ee >= 3 && (Re(Ge), Ke(ae), Fe(je))), w($.currentTarget);
|
|
7492
|
+
}, [z, A, O, K, Ee, oe, de, fe, Ge, ae, je]), ma = N(($, L, Q) => {
|
|
7489
7493
|
const re = [$, L];
|
|
7490
7494
|
Q && (re.shortcutId = sr(Q)), t(re);
|
|
7491
7495
|
}, [t]), er = N(($, L, Q) => {
|
|
@@ -7500,9 +7504,9 @@ const Yd = {
|
|
|
7500
7504
|
p && p({ ...h, ...$ });
|
|
7501
7505
|
}, [p, h]), tr = N(() => {
|
|
7502
7506
|
if (j === null) return;
|
|
7503
|
-
T(j), M(W),
|
|
7507
|
+
T(j), M(W), Y(G);
|
|
7504
7508
|
const $ = er(j, W, G);
|
|
7505
|
-
if (
|
|
7509
|
+
if (K && Ee >= 2 && ke !== null) {
|
|
7506
7510
|
be(ke), ie(Xe), Ce(me);
|
|
7507
7511
|
const L = er(ke, Xe, me), Q = {
|
|
7508
7512
|
rangeA: $,
|
|
@@ -7537,15 +7541,15 @@ const Yd = {
|
|
|
7537
7541
|
lastPresetB: null,
|
|
7538
7542
|
lastPresetC: null
|
|
7539
7543
|
}), ma($[0], $[1], j);
|
|
7540
|
-
}, [j, W, G,
|
|
7541
|
-
o || (oa && tr(),
|
|
7544
|
+
}, [j, W, G, K, Ee, ke, Xe, me, De, Pe, xt, er, t, ma, at]), Zn = N(() => {
|
|
7545
|
+
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
7546
|
}, [o, oa, tr]), pa = N(() => {
|
|
7543
|
-
o || (
|
|
7547
|
+
o || (R(null), V(null), F(null), Ne(null), we(null), _e(null), Re(null), Ke(null), Fe(null), D(null), w(null));
|
|
7544
7548
|
}, [o]), fa = N(() => {
|
|
7545
7549
|
if (Ee >= 3) return;
|
|
7546
|
-
const $ = j !== null ? j :
|
|
7550
|
+
const $ = j !== null ? j : z;
|
|
7547
7551
|
Ee === 1 ? (q(!0), it(2), Ne($), he("B"), tt(!0)) : Ee === 2 && (it(3), Re($), he("C"));
|
|
7548
|
-
}, [Ee, j,
|
|
7552
|
+
}, [Ee, j, z, q]), ga = N(($) => {
|
|
7549
7553
|
$ === "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
7554
|
compareEnabled: !1,
|
|
7551
7555
|
rangeCount: 1,
|
|
@@ -7560,20 +7564,20 @@ const Yd = {
|
|
|
7560
7564
|
lastPresetC: null
|
|
7561
7565
|
});
|
|
7562
7566
|
}, [q, at]), Sr = N(($) => {
|
|
7563
|
-
|
|
7564
|
-
}, [
|
|
7567
|
+
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));
|
|
7568
|
+
}, [K, te]), Ft = N(($) => {
|
|
7565
7569
|
if (!pe.find((re) => re.id === $)) return;
|
|
7566
7570
|
const Q = h.pinnedPreset || "mtd";
|
|
7567
|
-
|
|
7568
|
-
}, [pe,
|
|
7569
|
-
if (
|
|
7571
|
+
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));
|
|
7572
|
+
}, [pe, K, te, h.pinnedPreset, j, z, ke, oe, De, Ge]), Qn = N(($, L) => {
|
|
7573
|
+
if (K && te === "C")
|
|
7570
7574
|
if (Ke($), L) {
|
|
7571
7575
|
Fe(L);
|
|
7572
7576
|
const Q = nr($, L, /* @__PURE__ */ new Date(), pe);
|
|
7573
7577
|
Q ? (Re(Q.id), Ke(null), Fe(null)) : Re("custom");
|
|
7574
7578
|
} else
|
|
7575
7579
|
Re("custom"), Fe(null);
|
|
7576
|
-
else if (
|
|
7580
|
+
else if (K && te === "B")
|
|
7577
7581
|
if (we($), L) {
|
|
7578
7582
|
_e(L);
|
|
7579
7583
|
const Q = nr($, L, /* @__PURE__ */ new Date(), pe);
|
|
@@ -7583,17 +7587,17 @@ const Yd = {
|
|
|
7583
7587
|
else if (V($), L) {
|
|
7584
7588
|
F(L);
|
|
7585
7589
|
const Q = nr($, L, /* @__PURE__ */ new Date(), pe);
|
|
7586
|
-
Q ? (
|
|
7590
|
+
Q ? (R(Q.id), V(null), F(null)) : R("custom");
|
|
7587
7591
|
} else
|
|
7588
|
-
|
|
7589
|
-
}, [pe,
|
|
7590
|
-
at({ pinnedPreset: $ }),
|
|
7591
|
-
}, [
|
|
7592
|
-
|
|
7592
|
+
R("custom"), F(null);
|
|
7593
|
+
}, [pe, K, te]), ha = N(($) => {
|
|
7594
|
+
at({ pinnedPreset: $ }), K && te === "C" ? (Re($), Ke(null), Fe(null)) : K && te === "B" ? (Ne($), we(null), _e(null)) : (R($), V(null), F(null));
|
|
7595
|
+
}, [K, te, at]), ba = N(($, L) => {
|
|
7596
|
+
C.current && (clearTimeout(C.current), C.current = null), L ? D($) : C.current = setTimeout(() => {
|
|
7593
7597
|
D(null);
|
|
7594
7598
|
}, 150);
|
|
7595
7599
|
}, []), ya = N(() => {
|
|
7596
|
-
tr(),
|
|
7600
|
+
tr(), R(null), V(null), F(null), w(null);
|
|
7597
7601
|
}, [tr]), es = N(() => {
|
|
7598
7602
|
let $;
|
|
7599
7603
|
if (Be === "custom" && mt)
|
|
@@ -7679,9 +7683,9 @@ const Yd = {
|
|
|
7679
7683
|
}, [pe]), ns = N(() => {
|
|
7680
7684
|
tt(($) => !$);
|
|
7681
7685
|
}, []), ss = N(() => {
|
|
7682
|
-
const $ = j !== null ? j :
|
|
7686
|
+
const $ = j !== null ? j : z;
|
|
7683
7687
|
q(!0), it(2), Ne($), he("B"), tt(!0);
|
|
7684
|
-
}, [j,
|
|
7688
|
+
}, [j, z, q]), wr = N(({ label: $, isActive: L, presetName: Q, dateRange: re, color: le, onSelect: ue, onRemove: ze }) => {
|
|
7685
7689
|
const xa = !Q || Q === "Select...";
|
|
7686
7690
|
return /* @__PURE__ */ d(
|
|
7687
7691
|
ne,
|
|
@@ -7750,11 +7754,11 @@ const Yd = {
|
|
|
7750
7754
|
bgcolor: pt ? "rgba(79, 70, 229, 0.9)" : "rgba(0, 0, 0, 0.04)",
|
|
7751
7755
|
border: "none"
|
|
7752
7756
|
},
|
|
7753
|
-
...
|
|
7757
|
+
...K && !pt ? {
|
|
7754
7758
|
color: "secondary.main"
|
|
7755
7759
|
} : {}
|
|
7756
7760
|
},
|
|
7757
|
-
children:
|
|
7761
|
+
children: K && Xn ? /* @__PURE__ */ d(ne, { sx: { display: "flex", alignItems: "center", gap: 0.5 }, children: [
|
|
7758
7762
|
/* @__PURE__ */ e(Ko, { sx: { fontSize: 14, color: "secondary.main" } }),
|
|
7759
7763
|
/* @__PURE__ */ e("span", { children: "Compare" })
|
|
7760
7764
|
] }) : Un
|
|
@@ -7913,7 +7917,7 @@ const Yd = {
|
|
|
7913
7917
|
{
|
|
7914
7918
|
size: "small",
|
|
7915
7919
|
onClick: () => I("calendar"),
|
|
7916
|
-
color:
|
|
7920
|
+
color: S === "calendar" ? "primary" : "default",
|
|
7917
7921
|
sx: { p: 0.5 },
|
|
7918
7922
|
children: /* @__PURE__ */ e(wa, { sx: { fontSize: 16 } })
|
|
7919
7923
|
}
|
|
@@ -7923,7 +7927,7 @@ const Yd = {
|
|
|
7923
7927
|
{
|
|
7924
7928
|
size: "small",
|
|
7925
7929
|
onClick: () => I("markets"),
|
|
7926
|
-
color:
|
|
7930
|
+
color: S === "markets" ? "primary" : "default",
|
|
7927
7931
|
sx: {
|
|
7928
7932
|
p: 0.5,
|
|
7929
7933
|
position: "relative"
|
|
@@ -7950,8 +7954,8 @@ const Yd = {
|
|
|
7950
7954
|
) })
|
|
7951
7955
|
] }),
|
|
7952
7956
|
/* @__PURE__ */ d(ne, { className: "hybrid-date-picker__content", children: [
|
|
7953
|
-
|
|
7954
|
-
const L =
|
|
7957
|
+
S === "calendar" && (() => {
|
|
7958
|
+
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
7959
|
return /* @__PURE__ */ e(
|
|
7956
7960
|
An,
|
|
7957
7961
|
{
|
|
@@ -7961,11 +7965,11 @@ const Yd = {
|
|
|
7961
7965
|
marketDates: pe,
|
|
7962
7966
|
size: n,
|
|
7963
7967
|
focusDate: lt,
|
|
7964
|
-
rangeColor:
|
|
7968
|
+
rangeColor: K && te === "B" ? "secondary" : K && te === "C" ? "tertiary" : "primary"
|
|
7965
7969
|
}
|
|
7966
7970
|
);
|
|
7967
7971
|
})(),
|
|
7968
|
-
|
|
7972
|
+
S === "markets" && /* @__PURE__ */ d(ne, { className: "hybrid-date-picker__markets-list", children: [
|
|
7969
7973
|
/* @__PURE__ */ e(Te, { className: "hybrid-date-picker__events-section-header", children: "Market Events" }),
|
|
7970
7974
|
ia.filter((L) => !He || L.id !== He.id).map((L) => /* @__PURE__ */ e(
|
|
7971
7975
|
Ht,
|
|
@@ -8071,7 +8075,7 @@ const Yd = {
|
|
|
8071
8075
|
) })
|
|
8072
8076
|
] })
|
|
8073
8077
|
] }),
|
|
8074
|
-
/* @__PURE__ */ e(ne, { className: "hybrid-date-picker__footer", children:
|
|
8078
|
+
/* @__PURE__ */ e(ne, { className: "hybrid-date-picker__footer", children: K ? (
|
|
8075
8079
|
/* States 2, 3, 4: Comparing - show collapsible drawer */
|
|
8076
8080
|
/* @__PURE__ */ d(ne, { sx: { width: "100%" }, children: [
|
|
8077
8081
|
/* @__PURE__ */ d(
|
|
@@ -8575,7 +8579,7 @@ const Ar = [
|
|
|
8575
8579
|
const [p, m] = H(null);
|
|
8576
8580
|
return /* @__PURE__ */ d(ge, { definition: { display: "flex", direction: "column", gap: "8px" }, children: [
|
|
8577
8581
|
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,
|
|
8582
|
+
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
8583
|
ge,
|
|
8580
8584
|
{
|
|
8581
8585
|
definition: { display: "flex", align: "center", gap: "4px" },
|
|
@@ -8611,7 +8615,7 @@ const Ar = [
|
|
|
8611
8615
|
]
|
|
8612
8616
|
}
|
|
8613
8617
|
);
|
|
8614
|
-
return _ ? /* @__PURE__ */ e(ht, { title: "Market configuration coming soon", arrow: !0, placement: "right", children: /* @__PURE__ */ e("div", { children:
|
|
8618
|
+
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
8619
|
}),
|
|
8616
8620
|
i && /* @__PURE__ */ e(
|
|
8617
8621
|
ge,
|
|
@@ -8663,26 +8667,26 @@ const Ar = [
|
|
|
8663
8667
|
activePresetId: y,
|
|
8664
8668
|
onPresetChange: b
|
|
8665
8669
|
}) => {
|
|
8666
|
-
const _ = o !== void 0, [v, h] = H(!1), [k, E] = H(!1), [
|
|
8670
|
+
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
8671
|
const F = G || "MTD";
|
|
8668
8672
|
n && a && n({ ...a, pinnedPreset: F.toLowerCase() });
|
|
8669
|
-
const
|
|
8670
|
-
if (
|
|
8671
|
-
const
|
|
8672
|
-
if (P(F),
|
|
8673
|
-
t({ rangeA:
|
|
8673
|
+
const X = Ar.find((U) => U.id === F && !U.disabled);
|
|
8674
|
+
if (X) {
|
|
8675
|
+
const U = X.value();
|
|
8676
|
+
if (P(F), w)
|
|
8677
|
+
t({ rangeA: U, rangeB: z || [null, null], shortcutId: F });
|
|
8674
8678
|
else {
|
|
8675
|
-
const
|
|
8676
|
-
|
|
8679
|
+
const K = [...U];
|
|
8680
|
+
K.shortcutId = F, t(K);
|
|
8677
8681
|
}
|
|
8678
8682
|
}
|
|
8679
|
-
}, [
|
|
8683
|
+
}, [w, z, t, n, a]);
|
|
8680
8684
|
se(() => {
|
|
8681
|
-
_ &&
|
|
8685
|
+
_ && S(cr(r));
|
|
8682
8686
|
}, [_, r]), se(() => {
|
|
8683
|
-
i !== void 0 &&
|
|
8687
|
+
i !== void 0 && S(i);
|
|
8684
8688
|
}, [i]);
|
|
8685
|
-
const
|
|
8689
|
+
const A = N((G) => {
|
|
8686
8690
|
Promise.resolve().then(() => t(G));
|
|
8687
8691
|
}, [t]), M = ce(!1);
|
|
8688
8692
|
se(() => {
|
|
@@ -8691,31 +8695,31 @@ const Ar = [
|
|
|
8691
8695
|
M.current = !0;
|
|
8692
8696
|
return;
|
|
8693
8697
|
}
|
|
8694
|
-
if (
|
|
8695
|
-
const G = Array.isArray(
|
|
8696
|
-
|
|
8698
|
+
if (w) {
|
|
8699
|
+
const G = Array.isArray(C) ? C : [null, null];
|
|
8700
|
+
A({ rangeA: G, rangeB: z || [null, null] });
|
|
8697
8701
|
} else
|
|
8698
|
-
Array.isArray(
|
|
8702
|
+
Array.isArray(C) && A(C);
|
|
8699
8703
|
}
|
|
8700
|
-
}, [
|
|
8704
|
+
}, [w, _, C, z, A]);
|
|
8701
8705
|
const O = N((G, F) => {
|
|
8702
|
-
if (F || P(null),
|
|
8703
|
-
const
|
|
8704
|
-
F && (
|
|
8706
|
+
if (F || P(null), w) {
|
|
8707
|
+
const X = { rangeA: G, rangeB: z || [null, null] };
|
|
8708
|
+
F && (X.shortcutId = F), t(X);
|
|
8705
8709
|
} else if (F) {
|
|
8706
|
-
const
|
|
8707
|
-
|
|
8710
|
+
const X = [...G];
|
|
8711
|
+
X.shortcutId = F, t(X);
|
|
8708
8712
|
} else
|
|
8709
8713
|
t(G);
|
|
8710
|
-
}, [
|
|
8714
|
+
}, [w, z, t]), Y = N((G, F) => {
|
|
8711
8715
|
F || D(null);
|
|
8712
|
-
const
|
|
8713
|
-
F && (
|
|
8714
|
-
}, [t,
|
|
8716
|
+
const X = { rangeA: C || [null, null], rangeB: G };
|
|
8717
|
+
F && (X.shortcutId = F), t(X);
|
|
8718
|
+
}, [t, C]), j = N((G, F) => {
|
|
8715
8719
|
P(F), O(G, F), h(!1);
|
|
8716
|
-
}, [O]),
|
|
8717
|
-
D(F),
|
|
8718
|
-
}, [
|
|
8720
|
+
}, [O]), R = N((G, F) => {
|
|
8721
|
+
D(F), Y(G, F), E(!1);
|
|
8722
|
+
}, [Y]), W = ee(() => ({
|
|
8719
8723
|
shortcuts: {
|
|
8720
8724
|
items: Ar.map((G) => ({
|
|
8721
8725
|
label: G.label,
|
|
@@ -8725,14 +8729,14 @@ const Ar = [
|
|
|
8725
8729
|
})),
|
|
8726
8730
|
onChange: (G) => O(G),
|
|
8727
8731
|
onShortcutClick: j,
|
|
8728
|
-
value:
|
|
8732
|
+
value: C,
|
|
8729
8733
|
activeShortcutId: g,
|
|
8730
8734
|
enableCompare: _,
|
|
8731
|
-
compareEnabled:
|
|
8735
|
+
compareEnabled: w,
|
|
8732
8736
|
pinnedId: I,
|
|
8733
8737
|
onPinChange: T,
|
|
8734
8738
|
onEnableCompare: () => {
|
|
8735
|
-
|
|
8739
|
+
S(!0), o?.(!0), h(!1), setTimeout(() => E(!0), 0);
|
|
8736
8740
|
}
|
|
8737
8741
|
},
|
|
8738
8742
|
textField: {
|
|
@@ -8755,7 +8759,7 @@ const Ar = [
|
|
|
8755
8759
|
E(!1), h(!0);
|
|
8756
8760
|
}
|
|
8757
8761
|
}
|
|
8758
|
-
}), [
|
|
8762
|
+
}), [C, O, j, _, w, I, T, g, o]), V = ee(() => ({
|
|
8759
8763
|
shortcuts: {
|
|
8760
8764
|
items: Ar.map((G) => ({
|
|
8761
8765
|
label: G.label,
|
|
@@ -8763,9 +8767,9 @@ const Ar = [
|
|
|
8763
8767
|
getValue: G.value,
|
|
8764
8768
|
disabled: G.disabled || !1
|
|
8765
8769
|
})),
|
|
8766
|
-
onChange: (G) =>
|
|
8767
|
-
onShortcutClick:
|
|
8768
|
-
value:
|
|
8770
|
+
onChange: (G) => Y(G),
|
|
8771
|
+
onShortcutClick: R,
|
|
8772
|
+
value: z,
|
|
8769
8773
|
activeShortcutId: x
|
|
8770
8774
|
// No pin functionality for compare range
|
|
8771
8775
|
},
|
|
@@ -8789,7 +8793,7 @@ const Ar = [
|
|
|
8789
8793
|
h(!1), E(!0);
|
|
8790
8794
|
}
|
|
8791
8795
|
}
|
|
8792
|
-
}), [
|
|
8796
|
+
}), [z, Y, R, x]);
|
|
8793
8797
|
if (f === "simple-selector") {
|
|
8794
8798
|
const G = cr(r) ? r.rangeA : r;
|
|
8795
8799
|
return /* @__PURE__ */ e(
|
|
@@ -8806,7 +8810,7 @@ const Ar = [
|
|
|
8806
8810
|
/* @__PURE__ */ e(
|
|
8807
8811
|
ka,
|
|
8808
8812
|
{
|
|
8809
|
-
value:
|
|
8813
|
+
value: C || [null, null],
|
|
8810
8814
|
onChange: (G) => O(G),
|
|
8811
8815
|
calendars: 1,
|
|
8812
8816
|
disableFuture: !0,
|
|
@@ -8821,12 +8825,12 @@ const Ar = [
|
|
|
8821
8825
|
slotProps: W
|
|
8822
8826
|
}
|
|
8823
8827
|
),
|
|
8824
|
-
_ &&
|
|
8828
|
+
_ && w && /* @__PURE__ */ d(Dt, { definition: { direction: "horizontal", gap: "4px", align: "center" }, children: [
|
|
8825
8829
|
/* @__PURE__ */ e(
|
|
8826
8830
|
ka,
|
|
8827
8831
|
{
|
|
8828
|
-
value:
|
|
8829
|
-
onChange: (G) =>
|
|
8832
|
+
value: z || [null, null],
|
|
8833
|
+
onChange: (G) => Y(G),
|
|
8830
8834
|
calendars: 1,
|
|
8831
8835
|
disableFuture: !0,
|
|
8832
8836
|
minDate: new Date(2024, 0, 1),
|
|
@@ -8846,7 +8850,7 @@ const Ar = [
|
|
|
8846
8850
|
className: "gloss-timeframe__pin-btn",
|
|
8847
8851
|
"aria-label": "Remove comparison",
|
|
8848
8852
|
onClick: () => {
|
|
8849
|
-
|
|
8853
|
+
S(!1), o?.(!1), E(!1), h(!0), Array.isArray(C) && Promise.resolve().then(() => t(C));
|
|
8850
8854
|
},
|
|
8851
8855
|
children: /* @__PURE__ */ e(Je, { icon: /* @__PURE__ */ e(kt, { fontSize: "small" }) })
|
|
8852
8856
|
}
|
|
@@ -9039,28 +9043,28 @@ const eu = 30, tu = { distance: 5 }, ru = {
|
|
|
9039
9043
|
), k = N((T) => {
|
|
9040
9044
|
f(!1), p(String(T.active.id));
|
|
9041
9045
|
}, []), 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]),
|
|
9046
|
+
const { active: A, over: M } = T;
|
|
9047
|
+
if (f(!1), p(null), !M || A.id === M.id) return;
|
|
9048
|
+
const O = a.indexOf(String(A.id)), Y = a.indexOf(String(M.id));
|
|
9049
|
+
O === -1 || Y === -1 || s(li(a, O, Y));
|
|
9050
|
+
}, [a, s]), w = N(() => {
|
|
9047
9051
|
f(!1), p(null);
|
|
9048
|
-
}, []),
|
|
9049
|
-
const T = n.currentPage *
|
|
9050
|
-
return
|
|
9051
|
-
}, [t, a, n.currentPage,
|
|
9052
|
+
}, []), S = n.columns * n.maxRows, I = ee(() => {
|
|
9053
|
+
const T = n.currentPage * S, A = a.slice(T, T + S), M = new Map(t.map((O) => [O.id, O]));
|
|
9054
|
+
return A.map((O) => M.get(O)).filter((O) => O !== void 0);
|
|
9055
|
+
}, [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
9056
|
if (!_) return null;
|
|
9053
9057
|
const T = I.findIndex((j) => j.id === _);
|
|
9054
9058
|
if (T === -1) return null;
|
|
9055
|
-
const
|
|
9056
|
-
if (
|
|
9057
|
-
const M =
|
|
9058
|
-
return { activeIndex: T, extrudeIndex:
|
|
9059
|
-
}, [_, I, n.columns]),
|
|
9059
|
+
const A = Zd(T, I.length, n.columns);
|
|
9060
|
+
if (A === null) return null;
|
|
9061
|
+
const M = A >= I.length, O = !M, Y = O ? I[A]?.id ?? null : null;
|
|
9062
|
+
return { activeIndex: T, extrudeIndex: A, isEmptySlot: M, isDimCover: O, dimCoverId: Y };
|
|
9063
|
+
}, [_, I, n.columns]), C = ee(() => ({
|
|
9060
9064
|
gridTemplateColumns: `repeat(${n.columns}, 1fr)`,
|
|
9061
9065
|
gridAutoRows: `${n.rowHeight}px`,
|
|
9062
9066
|
gap: `${n.gap}px`
|
|
9063
|
-
}), [n.columns, n.rowHeight, n.gap]),
|
|
9067
|
+
}), [n.columns, n.rowHeight, n.gap]), z = !!(_ && D && l.length > 0);
|
|
9064
9068
|
return /* @__PURE__ */ d(ge, { className: `gloss-grid${m ? " gloss-grid--armed" : ""}`, children: [
|
|
9065
9069
|
/* @__PURE__ */ d(
|
|
9066
9070
|
ni,
|
|
@@ -9070,15 +9074,15 @@ const eu = 30, tu = { distance: 5 }, ru = {
|
|
|
9070
9074
|
modifiers: [pi],
|
|
9071
9075
|
onDragStart: k,
|
|
9072
9076
|
onDragEnd: E,
|
|
9073
|
-
onDragCancel:
|
|
9077
|
+
onDragCancel: w,
|
|
9074
9078
|
children: [
|
|
9075
9079
|
/* @__PURE__ */ e(
|
|
9076
9080
|
ci,
|
|
9077
9081
|
{
|
|
9078
9082
|
items: I.map((T) => T.id),
|
|
9079
9083
|
strategy: di,
|
|
9080
|
-
children: /* @__PURE__ */ d("div", { className: "gloss-grid__container", style:
|
|
9081
|
-
/* @__PURE__ */ e(pr, { mode: "popLayout", children: I.map((T,
|
|
9084
|
+
children: /* @__PURE__ */ d("div", { className: "gloss-grid__container", style: C, children: [
|
|
9085
|
+
/* @__PURE__ */ e(pr, { mode: "popLayout", children: I.map((T, A) => {
|
|
9082
9086
|
const M = D?.isDimCover === !0 && D.dimCoverId === T.id;
|
|
9083
9087
|
return /* @__PURE__ */ e(
|
|
9084
9088
|
vt.div,
|
|
@@ -9089,14 +9093,14 @@ const eu = 30, tu = { distance: 5 }, ru = {
|
|
|
9089
9093
|
exit: ou,
|
|
9090
9094
|
transition: {
|
|
9091
9095
|
...iu,
|
|
9092
|
-
delay:
|
|
9096
|
+
delay: A * 0.03
|
|
9093
9097
|
},
|
|
9094
9098
|
children: /* @__PURE__ */ e(
|
|
9095
9099
|
Jd,
|
|
9096
9100
|
{
|
|
9097
9101
|
id: T.id,
|
|
9098
9102
|
colSpan: T.colSpan,
|
|
9099
|
-
staggerDelay: `${
|
|
9103
|
+
staggerDelay: `${A * eu}ms`,
|
|
9100
9104
|
dimCover: M,
|
|
9101
9105
|
children: o(T)
|
|
9102
9106
|
}
|
|
@@ -9105,9 +9109,9 @@ const eu = 30, tu = { distance: 5 }, ru = {
|
|
|
9105
9109
|
T.id
|
|
9106
9110
|
);
|
|
9107
9111
|
}) }),
|
|
9108
|
-
c && Array.from({ length: P }, (T,
|
|
9109
|
-
/* @__PURE__ */ e(pr, { children:
|
|
9110
|
-
const T = D.extrudeIndex % n.columns + 1,
|
|
9112
|
+
c && Array.from({ length: P }, (T, A) => /* @__PURE__ */ e("div", { className: "gloss-grid__empty-slot", children: c(g + A) }, `empty-${A}`)),
|
|
9113
|
+
/* @__PURE__ */ e(pr, { children: z && D && (() => {
|
|
9114
|
+
const T = D.extrudeIndex % n.columns + 1, A = Math.floor(D.extrudeIndex / n.columns) + 1;
|
|
9111
9115
|
return /* @__PURE__ */ e(
|
|
9112
9116
|
vt.div,
|
|
9113
9117
|
{
|
|
@@ -9120,7 +9124,7 @@ const eu = 30, tu = { distance: 5 }, ru = {
|
|
|
9120
9124
|
// Grid placement: pin to computed extrude slot. No
|
|
9121
9125
|
// width/height animation (AN-01 — transform+opacity only).
|
|
9122
9126
|
gridColumnStart: T,
|
|
9123
|
-
gridRowStart:
|
|
9127
|
+
gridRowStart: A,
|
|
9124
9128
|
gridColumn: `${T} / span 1`
|
|
9125
9129
|
},
|
|
9126
9130
|
children: /* @__PURE__ */ e(
|
|
@@ -9703,22 +9707,22 @@ const Fn = Z.forwardRef(
|
|
|
9703
9707
|
status: h,
|
|
9704
9708
|
helperText: k,
|
|
9705
9709
|
required: E,
|
|
9706
|
-
disabled:
|
|
9707
|
-
name:
|
|
9710
|
+
disabled: w,
|
|
9711
|
+
name: S,
|
|
9708
9712
|
id: I,
|
|
9709
9713
|
className: g,
|
|
9710
9714
|
autoComplete: P
|
|
9711
9715
|
}, x) => {
|
|
9712
|
-
const D = ce(null), [
|
|
9716
|
+
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
9717
|
(q) => {
|
|
9714
9718
|
const te = q.target.value;
|
|
9715
|
-
u === void 0 &&
|
|
9719
|
+
u === void 0 && z(te), t > 0 ? (Y.current && clearTimeout(Y.current), Y.current = setTimeout(() => {
|
|
9716
9720
|
m?.(q);
|
|
9717
9721
|
}, t)) : m?.(q);
|
|
9718
9722
|
},
|
|
9719
9723
|
[u, t, m]
|
|
9720
9724
|
), G = N(() => {
|
|
9721
|
-
u === void 0 &&
|
|
9725
|
+
u === void 0 && z(""), m?.({
|
|
9722
9726
|
target: { value: "" },
|
|
9723
9727
|
currentTarget: { value: "" }
|
|
9724
9728
|
}), D.current?.focus();
|
|
@@ -9740,21 +9744,21 @@ const Fn = Z.forwardRef(
|
|
|
9740
9744
|
M >= 0 && n[M] ? (q.preventDefault(), s?.(n[M]), O(-1)) : r?.(String(j));
|
|
9741
9745
|
break;
|
|
9742
9746
|
case "Escape":
|
|
9743
|
-
|
|
9747
|
+
A(!1), D.current?.blur();
|
|
9744
9748
|
break;
|
|
9745
9749
|
}
|
|
9746
9750
|
else q.key === "Enter" && r?.(String(j));
|
|
9747
9751
|
f?.(q);
|
|
9748
9752
|
},
|
|
9749
9753
|
[W, n, M, j, r, s, f]
|
|
9750
|
-
),
|
|
9754
|
+
), X = N(
|
|
9751
9755
|
(q) => {
|
|
9752
|
-
|
|
9756
|
+
A(!0), y?.(q);
|
|
9753
9757
|
},
|
|
9754
9758
|
[y]
|
|
9755
|
-
),
|
|
9759
|
+
), U = N(
|
|
9756
9760
|
(q) => {
|
|
9757
|
-
setTimeout(() =>
|
|
9761
|
+
setTimeout(() => A(!1), 150), b?.(q);
|
|
9758
9762
|
},
|
|
9759
9763
|
[b]
|
|
9760
9764
|
);
|
|
@@ -9765,10 +9769,10 @@ const Fn = Z.forwardRef(
|
|
|
9765
9769
|
};
|
|
9766
9770
|
return document.addEventListener("keydown", q), () => document.removeEventListener("keydown", q);
|
|
9767
9771
|
}, [o, c]), se(() => () => {
|
|
9768
|
-
|
|
9772
|
+
Y.current && clearTimeout(Y.current);
|
|
9769
9773
|
}, []);
|
|
9770
|
-
const
|
|
9771
|
-
|
|
9774
|
+
const K = /* @__PURE__ */ d("div", { className: "gloss-search-input__actions", children: [
|
|
9775
|
+
R && l && /* @__PURE__ */ e(
|
|
9772
9776
|
"button",
|
|
9773
9777
|
{
|
|
9774
9778
|
type: "button",
|
|
@@ -9795,19 +9799,19 @@ const Fn = Z.forwardRef(
|
|
|
9795
9799
|
value: j,
|
|
9796
9800
|
onChange: V,
|
|
9797
9801
|
onKeyDown: F,
|
|
9798
|
-
onFocus:
|
|
9799
|
-
onBlur:
|
|
9802
|
+
onFocus: X,
|
|
9803
|
+
onBlur: U,
|
|
9800
9804
|
placeholder: _,
|
|
9801
9805
|
label: v,
|
|
9802
9806
|
status: h === "pending" ? "default" : h,
|
|
9803
9807
|
helperText: k,
|
|
9804
9808
|
required: E,
|
|
9805
|
-
disabled:
|
|
9806
|
-
name:
|
|
9809
|
+
disabled: w,
|
|
9810
|
+
name: S,
|
|
9807
9811
|
id: I,
|
|
9808
9812
|
autoComplete: P,
|
|
9809
9813
|
leftIcon: /* @__PURE__ */ e(ve, { name: "search", size: "sm" }),
|
|
9810
|
-
rightIcon:
|
|
9814
|
+
rightIcon: K
|
|
9811
9815
|
}
|
|
9812
9816
|
),
|
|
9813
9817
|
W && /* @__PURE__ */ e("ul", { className: "gloss-search-input__suggestions", role: "listbox", children: n.map((q, te) => /* @__PURE__ */ d(
|
|
@@ -9871,18 +9875,18 @@ const xu = [
|
|
|
9871
9875
|
disabled: h,
|
|
9872
9876
|
name: k,
|
|
9873
9877
|
id: E,
|
|
9874
|
-
className:
|
|
9875
|
-
autoComplete:
|
|
9878
|
+
className: w,
|
|
9879
|
+
autoComplete: S = "new-password"
|
|
9876
9880
|
}, I) => {
|
|
9877
|
-
const [g, P] = H(!1), [x, D] = H(String(u ?? "")),
|
|
9878
|
-
() => Su(
|
|
9879
|
-
[
|
|
9880
|
-
), T = a ??
|
|
9881
|
+
const [g, P] = H(!1), [x, D] = H(String(u ?? "")), C = l !== void 0 ? String(l) : x, z = ee(
|
|
9882
|
+
() => Su(C, n),
|
|
9883
|
+
[C, n]
|
|
9884
|
+
), T = a ?? z, A = ee(
|
|
9881
9885
|
() => n.map((V) => ({
|
|
9882
9886
|
...V,
|
|
9883
|
-
passed: V.validate(
|
|
9887
|
+
passed: V.validate(C)
|
|
9884
9888
|
})),
|
|
9885
|
-
[
|
|
9889
|
+
[C, n]
|
|
9886
9890
|
), M = N(
|
|
9887
9891
|
(V) => {
|
|
9888
9892
|
l === void 0 && D(V.target.value), p?.(V);
|
|
@@ -9890,7 +9894,7 @@ const xu = [
|
|
|
9890
9894
|
[l, p]
|
|
9891
9895
|
), O = N(() => {
|
|
9892
9896
|
P((V) => !V);
|
|
9893
|
-
}, []),
|
|
9897
|
+
}, []), Y = N(() => {
|
|
9894
9898
|
const V = Nu(o);
|
|
9895
9899
|
i ? i(V) : (l === void 0 && D(V), p?.({
|
|
9896
9900
|
target: { value: V },
|
|
@@ -9901,7 +9905,7 @@ const xu = [
|
|
|
9901
9905
|
fair: "#f59e0b",
|
|
9902
9906
|
good: "#3b82f6",
|
|
9903
9907
|
strong: "#22c55e"
|
|
9904
|
-
},
|
|
9908
|
+
}, R = {
|
|
9905
9909
|
weak: "Weak",
|
|
9906
9910
|
fair: "Fair",
|
|
9907
9911
|
good: "Good",
|
|
@@ -9913,7 +9917,7 @@ const xu = [
|
|
|
9913
9917
|
{
|
|
9914
9918
|
ref: I,
|
|
9915
9919
|
type: g ? "text" : "password",
|
|
9916
|
-
value:
|
|
9920
|
+
value: C,
|
|
9917
9921
|
onChange: M,
|
|
9918
9922
|
onBlur: m,
|
|
9919
9923
|
rightIcon: /* @__PURE__ */ d("div", { className: "gloss-password-input__actions", children: [
|
|
@@ -9922,7 +9926,7 @@ const xu = [
|
|
|
9922
9926
|
{
|
|
9923
9927
|
type: "button",
|
|
9924
9928
|
className: "gloss-password-input__generate",
|
|
9925
|
-
onClick:
|
|
9929
|
+
onClick: Y,
|
|
9926
9930
|
"aria-label": "Generate password",
|
|
9927
9931
|
tabIndex: -1,
|
|
9928
9932
|
title: "Generate password",
|
|
@@ -9949,10 +9953,10 @@ const xu = [
|
|
|
9949
9953
|
disabled: h,
|
|
9950
9954
|
name: k,
|
|
9951
9955
|
id: E,
|
|
9952
|
-
autoComplete:
|
|
9956
|
+
autoComplete: S
|
|
9953
9957
|
}
|
|
9954
9958
|
),
|
|
9955
|
-
t &&
|
|
9959
|
+
t && C && /* @__PURE__ */ d("div", { className: "gloss-password-input__strength", children: [
|
|
9956
9960
|
/* @__PURE__ */ e("div", { className: "gloss-password-input__strength-bar", children: /* @__PURE__ */ e(
|
|
9957
9961
|
"div",
|
|
9958
9962
|
{
|
|
@@ -9968,11 +9972,11 @@ const xu = [
|
|
|
9968
9972
|
{
|
|
9969
9973
|
className: "gloss-password-input__strength-label",
|
|
9970
9974
|
style: { color: j[T] },
|
|
9971
|
-
children:
|
|
9975
|
+
children: R[T]
|
|
9972
9976
|
}
|
|
9973
9977
|
)
|
|
9974
9978
|
] }),
|
|
9975
|
-
c && /* @__PURE__ */ e("ul", { className: "gloss-password-input__rules", children:
|
|
9979
|
+
c && /* @__PURE__ */ e("ul", { className: "gloss-password-input__rules", children: A.map((V) => /* @__PURE__ */ d(
|
|
9976
9980
|
"li",
|
|
9977
9981
|
{
|
|
9978
9982
|
className: `gloss-password-input__rule ${V.passed ? "gloss-password-input__rule--passed" : ""}`,
|
|
@@ -10008,9 +10012,9 @@ const Cu = Z.forwardRef(
|
|
|
10008
10012
|
id: v,
|
|
10009
10013
|
name: h
|
|
10010
10014
|
}, k) => {
|
|
10011
|
-
const E = Le(),
|
|
10012
|
-
(de) => de.toLowerCase().includes(P.toLowerCase()) && (o || !
|
|
10013
|
-
) : [],
|
|
10015
|
+
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(
|
|
10016
|
+
(de) => de.toLowerCase().includes(P.toLowerCase()) && (o || !Y.includes(de))
|
|
10017
|
+
) : [], R = z && j.length > 0, W = s === void 0 || Y.length < s, V = N(
|
|
10014
10018
|
(de) => {
|
|
10015
10019
|
O || g(de), a?.(de);
|
|
10016
10020
|
},
|
|
@@ -10020,35 +10024,35 @@ const Cu = Z.forwardRef(
|
|
|
10020
10024
|
const ie = de.trim();
|
|
10021
10025
|
if (ie) {
|
|
10022
10026
|
if (!W) {
|
|
10023
|
-
|
|
10027
|
+
C(`Maximum of ${s} tags allowed`);
|
|
10024
10028
|
return;
|
|
10025
10029
|
}
|
|
10026
|
-
if (!o &&
|
|
10027
|
-
|
|
10030
|
+
if (!o && Y.includes(ie)) {
|
|
10031
|
+
C("Duplicate tag");
|
|
10028
10032
|
return;
|
|
10029
10033
|
}
|
|
10030
10034
|
if (i && ie.length > i) {
|
|
10031
|
-
|
|
10035
|
+
C(`Tag must be ${i} characters or less`);
|
|
10032
10036
|
return;
|
|
10033
10037
|
}
|
|
10034
10038
|
if (c) {
|
|
10035
10039
|
const fe = c(ie);
|
|
10036
10040
|
if (fe !== !0) {
|
|
10037
|
-
|
|
10041
|
+
C(typeof fe == "string" ? fe : "Invalid tag");
|
|
10038
10042
|
return;
|
|
10039
10043
|
}
|
|
10040
10044
|
}
|
|
10041
|
-
|
|
10045
|
+
C(null), V([...Y, ie]), x(""), M(-1);
|
|
10042
10046
|
}
|
|
10043
10047
|
},
|
|
10044
|
-
[
|
|
10048
|
+
[Y, W, s, o, i, c, V]
|
|
10045
10049
|
), F = N(
|
|
10046
10050
|
(de) => {
|
|
10047
|
-
const ie =
|
|
10048
|
-
V(ie),
|
|
10051
|
+
const ie = Y.filter((fe, Ce) => Ce !== de);
|
|
10052
|
+
V(ie), C(null);
|
|
10049
10053
|
},
|
|
10050
|
-
[
|
|
10051
|
-
),
|
|
10054
|
+
[Y, V]
|
|
10055
|
+
), X = N(
|
|
10052
10056
|
(de) => {
|
|
10053
10057
|
const ie = de.target.value, fe = n.filter((Ce) => Ce !== "Enter");
|
|
10054
10058
|
for (const Ce of fe)
|
|
@@ -10058,36 +10062,36 @@ const Cu = Z.forwardRef(
|
|
|
10058
10062
|
});
|
|
10059
10063
|
return;
|
|
10060
10064
|
}
|
|
10061
|
-
x(ie), M(-1),
|
|
10065
|
+
x(ie), M(-1), C(null);
|
|
10062
10066
|
},
|
|
10063
10067
|
[n, G]
|
|
10064
|
-
),
|
|
10068
|
+
), U = N(
|
|
10065
10069
|
(de) => {
|
|
10066
|
-
de.key === "Enter" ? (de.preventDefault(),
|
|
10070
|
+
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
10071
|
(ie) => ie < j.length - 1 ? ie + 1 : 0
|
|
10068
|
-
)) : de.key === "ArrowUp" &&
|
|
10072
|
+
)) : de.key === "ArrowUp" && R ? (de.preventDefault(), M(
|
|
10069
10073
|
(ie) => ie > 0 ? ie - 1 : j.length - 1
|
|
10070
10074
|
)) : de.key === "Escape" && (x(""), M(-1));
|
|
10071
10075
|
},
|
|
10072
10076
|
[
|
|
10073
|
-
|
|
10074
|
-
|
|
10077
|
+
R,
|
|
10078
|
+
A,
|
|
10075
10079
|
j,
|
|
10076
10080
|
n,
|
|
10077
10081
|
P,
|
|
10078
|
-
|
|
10082
|
+
Y,
|
|
10079
10083
|
G,
|
|
10080
10084
|
F
|
|
10081
10085
|
]
|
|
10082
|
-
),
|
|
10086
|
+
), K = N(() => {
|
|
10083
10087
|
T(!0);
|
|
10084
10088
|
}, []), q = N(() => {
|
|
10085
10089
|
setTimeout(() => T(!1), 150), P.trim() && n.includes(",") && G(P);
|
|
10086
10090
|
}, [P, n, G]), te = N(() => {
|
|
10087
|
-
|
|
10091
|
+
S.current?.focus();
|
|
10088
10092
|
}, []), he = N(
|
|
10089
10093
|
(de) => {
|
|
10090
|
-
G(de),
|
|
10094
|
+
G(de), S.current?.focus();
|
|
10091
10095
|
},
|
|
10092
10096
|
[G]
|
|
10093
10097
|
), oe = [
|
|
@@ -10097,17 +10101,17 @@ const Cu = Z.forwardRef(
|
|
|
10097
10101
|
"gloss-tag-input",
|
|
10098
10102
|
`gloss-tag-input--${b}`,
|
|
10099
10103
|
y !== "default" && `gloss-tag-input--${y}`,
|
|
10100
|
-
|
|
10104
|
+
z && "gloss-tag-input--focused",
|
|
10101
10105
|
p && "gloss-tag-input--disabled",
|
|
10102
10106
|
D && "gloss-tag-input--error",
|
|
10103
10107
|
_
|
|
10104
10108
|
].filter(Boolean).join(" ");
|
|
10105
10109
|
return /* @__PURE__ */ d("div", { className: oe, children: [
|
|
10106
|
-
m && /* @__PURE__ */ e("label", { className: "gloss-tag-input__label", htmlFor:
|
|
10110
|
+
m && /* @__PURE__ */ e("label", { className: "gloss-tag-input__label", htmlFor: w, children: m }),
|
|
10107
10111
|
/* @__PURE__ */ d("div", { className: be, onClick: te, children: [
|
|
10108
|
-
h && /* @__PURE__ */ e("input", { type: "hidden", name: h, value:
|
|
10112
|
+
h && /* @__PURE__ */ e("input", { type: "hidden", name: h, value: Y.join(",") }),
|
|
10109
10113
|
/* @__PURE__ */ d("div", { className: "gloss-tag-input__tags", children: [
|
|
10110
|
-
|
|
10114
|
+
Y.map((de, ie) => /* @__PURE__ */ d("span", { className: "gloss-tag-input__tag", children: [
|
|
10111
10115
|
/* @__PURE__ */ e("span", { className: "gloss-tag-input__tag-text", children: de }),
|
|
10112
10116
|
!p && /* @__PURE__ */ e(
|
|
10113
10117
|
"button",
|
|
@@ -10127,28 +10131,28 @@ const Cu = Z.forwardRef(
|
|
|
10127
10131
|
"input",
|
|
10128
10132
|
{
|
|
10129
10133
|
ref: (de) => {
|
|
10130
|
-
|
|
10134
|
+
S.current = de, typeof k == "function" ? k(de) : k && (k.current = de);
|
|
10131
10135
|
},
|
|
10132
|
-
id:
|
|
10136
|
+
id: w,
|
|
10133
10137
|
type: "text",
|
|
10134
10138
|
className: "gloss-tag-input__input",
|
|
10135
10139
|
value: P,
|
|
10136
|
-
onChange:
|
|
10137
|
-
onKeyDown:
|
|
10138
|
-
onFocus:
|
|
10140
|
+
onChange: X,
|
|
10141
|
+
onKeyDown: U,
|
|
10142
|
+
onFocus: K,
|
|
10139
10143
|
onBlur: q,
|
|
10140
|
-
placeholder:
|
|
10144
|
+
placeholder: Y.length === 0 ? u : "",
|
|
10141
10145
|
disabled: p,
|
|
10142
|
-
"aria-describedby": f ? `${
|
|
10146
|
+
"aria-describedby": f ? `${w}-helper` : void 0
|
|
10143
10147
|
}
|
|
10144
10148
|
)
|
|
10145
10149
|
] }),
|
|
10146
|
-
|
|
10150
|
+
R && /* @__PURE__ */ e("ul", { className: "gloss-tag-input__suggestions", role: "listbox", children: j.map((de, ie) => /* @__PURE__ */ e(
|
|
10147
10151
|
"li",
|
|
10148
10152
|
{
|
|
10149
10153
|
role: "option",
|
|
10150
|
-
"aria-selected": ie ===
|
|
10151
|
-
className: `gloss-tag-input__suggestion ${ie ===
|
|
10154
|
+
"aria-selected": ie === A,
|
|
10155
|
+
className: `gloss-tag-input__suggestion ${ie === A ? "gloss-tag-input__suggestion--selected" : ""}`,
|
|
10152
10156
|
onClick: () => he(de),
|
|
10153
10157
|
children: de
|
|
10154
10158
|
},
|
|
@@ -10158,7 +10162,7 @@ const Cu = Z.forwardRef(
|
|
|
10158
10162
|
(f || D) && /* @__PURE__ */ d(
|
|
10159
10163
|
"div",
|
|
10160
10164
|
{
|
|
10161
|
-
id: `${
|
|
10165
|
+
id: `${w}-helper`,
|
|
10162
10166
|
className: `gloss-tag-input__helper ${D || y === "error" ? "gloss-tag-input__helper--error" : ""}`,
|
|
10163
10167
|
children: [
|
|
10164
10168
|
(D || y === "error") && /* @__PURE__ */ e(ve, { name: "info", size: "sm" }),
|
|
@@ -10226,38 +10230,38 @@ const wu = [
|
|
|
10226
10230
|
className: b = "",
|
|
10227
10231
|
id: _
|
|
10228
10232
|
}, v) => {
|
|
10229
|
-
const h = Le(), k = _ || h, E = s.find((G) => G.code === n) || s[0],
|
|
10233
|
+
const h = Le(), k = _ || h, E = s.find((G) => G.code === n) || s[0], w = ee(
|
|
10230
10234
|
() => Ya(r || t || "", s),
|
|
10231
10235
|
[]
|
|
10232
|
-
), [
|
|
10233
|
-
|
|
10236
|
+
), [S, I] = H(
|
|
10237
|
+
w.country || E
|
|
10234
10238
|
), [g, P] = H(
|
|
10235
|
-
|
|
10236
|
-
), [x, D] = H(!1),
|
|
10237
|
-
() =>
|
|
10238
|
-
[
|
|
10239
|
-
), T =
|
|
10239
|
+
w.nationalNumber
|
|
10240
|
+
), [x, D] = H(!1), C = r !== void 0, z = ee(
|
|
10241
|
+
() => C ? Ya(r || "", s) : null,
|
|
10242
|
+
[C, r, s]
|
|
10243
|
+
), T = z?.country || S, A = z?.nationalNumber || g, M = ku(A, T.format), O = N(
|
|
10240
10244
|
(G, F) => {
|
|
10241
|
-
const
|
|
10242
|
-
return
|
|
10245
|
+
const X = Ua(F);
|
|
10246
|
+
return X ? `${G.dialCode}${X}` : "";
|
|
10243
10247
|
},
|
|
10244
10248
|
[]
|
|
10245
|
-
),
|
|
10249
|
+
), Y = N(
|
|
10246
10250
|
(G) => {
|
|
10247
|
-
const F = G.target.value,
|
|
10248
|
-
|
|
10249
|
-
const
|
|
10250
|
-
a?.(
|
|
10251
|
+
const F = G.target.value, X = Ua(F);
|
|
10252
|
+
C || P(X);
|
|
10253
|
+
const U = O(T, X);
|
|
10254
|
+
a?.(U);
|
|
10251
10255
|
},
|
|
10252
|
-
[
|
|
10256
|
+
[C, T, O, a]
|
|
10253
10257
|
), j = N(
|
|
10254
10258
|
(G) => {
|
|
10255
|
-
|
|
10256
|
-
const F = O(G,
|
|
10259
|
+
C || I(G);
|
|
10260
|
+
const F = O(G, A);
|
|
10257
10261
|
a?.(F), D(!1);
|
|
10258
10262
|
},
|
|
10259
|
-
[
|
|
10260
|
-
),
|
|
10263
|
+
[C, A, O, a]
|
|
10264
|
+
), R = N(() => {
|
|
10261
10265
|
f || D((G) => !G);
|
|
10262
10266
|
}, [f]), W = N(() => {
|
|
10263
10267
|
setTimeout(() => D(!1), 150);
|
|
@@ -10266,7 +10270,7 @@ const wu = [
|
|
|
10266
10270
|
{
|
|
10267
10271
|
type: "button",
|
|
10268
10272
|
className: "gloss-phone-input__country-btn",
|
|
10269
|
-
onClick:
|
|
10273
|
+
onClick: R,
|
|
10270
10274
|
onBlur: W,
|
|
10271
10275
|
disabled: f,
|
|
10272
10276
|
"aria-label": "Select country",
|
|
@@ -10310,7 +10314,7 @@ const wu = [
|
|
|
10310
10314
|
required: m,
|
|
10311
10315
|
className: `gloss-phone-input__input ${p !== "default" ? `gloss-phone-input__input--${p}` : ""}`,
|
|
10312
10316
|
value: M,
|
|
10313
|
-
onChange:
|
|
10317
|
+
onChange: Y,
|
|
10314
10318
|
disabled: f,
|
|
10315
10319
|
"aria-describedby": u ? `${k}-helper` : void 0
|
|
10316
10320
|
}
|
|
@@ -10373,7 +10377,7 @@ function Jr({
|
|
|
10373
10377
|
children: i
|
|
10374
10378
|
}) {
|
|
10375
10379
|
const o = {
|
|
10376
|
-
bg:
|
|
10380
|
+
bg: B.BgSurface,
|
|
10377
10381
|
shadow: Ze.Hover,
|
|
10378
10382
|
radius: Se.Md,
|
|
10379
10383
|
padding: J.Md,
|
|
@@ -10424,55 +10428,55 @@ function Ln(r) {
|
|
|
10424
10428
|
disabled: _ = !1,
|
|
10425
10429
|
size: v = "md",
|
|
10426
10430
|
className: h
|
|
10427
|
-
} = r, [k, E] = H(""), [
|
|
10431
|
+
} = r, [k, E] = H(""), [w, S] = H(!1), [I, g] = H(-1), P = ce(null), x = ce(null), D = ce(null);
|
|
10428
10432
|
se(() => {
|
|
10429
10433
|
a != null && E(s(a));
|
|
10430
10434
|
}, [a, s]);
|
|
10431
|
-
const
|
|
10435
|
+
const C = ee(() => {
|
|
10432
10436
|
if (i || !k) return t;
|
|
10433
|
-
const
|
|
10437
|
+
const R = k.toLowerCase();
|
|
10434
10438
|
return t.filter(
|
|
10435
|
-
(W) => s(W).toLowerCase().includes(
|
|
10439
|
+
(W) => s(W).toLowerCase().includes(R)
|
|
10436
10440
|
);
|
|
10437
|
-
}, [t, k, i, s]),
|
|
10438
|
-
(
|
|
10439
|
-
const W =
|
|
10440
|
-
E(W),
|
|
10441
|
+
}, [t, k, i, s]), z = N(
|
|
10442
|
+
(R) => {
|
|
10443
|
+
const W = R.target.value;
|
|
10444
|
+
E(W), S(!0), g(-1), i && (x.current && clearTimeout(x.current), x.current = setTimeout(() => {
|
|
10441
10445
|
i(W);
|
|
10442
10446
|
}, 300));
|
|
10443
10447
|
},
|
|
10444
10448
|
[i]
|
|
10445
10449
|
), T = N(
|
|
10446
|
-
(
|
|
10447
|
-
E(s(
|
|
10450
|
+
(R) => {
|
|
10451
|
+
E(s(R)), S(!1), g(-1), n?.(R);
|
|
10448
10452
|
},
|
|
10449
10453
|
[s, n]
|
|
10450
|
-
),
|
|
10451
|
-
(
|
|
10452
|
-
if (!
|
|
10453
|
-
(
|
|
10454
|
+
), A = N(
|
|
10455
|
+
(R) => {
|
|
10456
|
+
if (!w) {
|
|
10457
|
+
(R.key === "ArrowDown" || R.key === "ArrowUp") && (R.preventDefault(), S(!0));
|
|
10454
10458
|
return;
|
|
10455
10459
|
}
|
|
10456
|
-
switch (
|
|
10460
|
+
switch (R.key) {
|
|
10457
10461
|
case "ArrowDown":
|
|
10458
|
-
|
|
10459
|
-
(W) => W <
|
|
10462
|
+
R.preventDefault(), g(
|
|
10463
|
+
(W) => W < C.length - 1 ? W + 1 : 0
|
|
10460
10464
|
);
|
|
10461
10465
|
break;
|
|
10462
10466
|
case "ArrowUp":
|
|
10463
|
-
|
|
10464
|
-
(W) => W > 0 ? W - 1 :
|
|
10467
|
+
R.preventDefault(), g(
|
|
10468
|
+
(W) => W > 0 ? W - 1 : C.length - 1
|
|
10465
10469
|
);
|
|
10466
10470
|
break;
|
|
10467
10471
|
case "Enter":
|
|
10468
|
-
|
|
10472
|
+
R.preventDefault(), I >= 0 && C[I] && T(C[I]);
|
|
10469
10473
|
break;
|
|
10470
10474
|
case "Escape":
|
|
10471
|
-
|
|
10475
|
+
R.preventDefault(), S(!1), g(-1);
|
|
10472
10476
|
break;
|
|
10473
10477
|
}
|
|
10474
10478
|
},
|
|
10475
|
-
[
|
|
10479
|
+
[w, C, I, T]
|
|
10476
10480
|
);
|
|
10477
10481
|
se(() => {
|
|
10478
10482
|
I >= 0 && D.current && D.current.querySelectorAll('[role="option"]')[I]?.scrollIntoView({ block: "nearest" });
|
|
@@ -10480,17 +10484,17 @@ function Ln(r) {
|
|
|
10480
10484
|
x.current && clearTimeout(x.current);
|
|
10481
10485
|
}, []);
|
|
10482
10486
|
const M = N(() => {
|
|
10483
|
-
|
|
10487
|
+
S(!0);
|
|
10484
10488
|
}, []), O = N(() => {
|
|
10485
|
-
|
|
10486
|
-
}, []),
|
|
10489
|
+
S(!1), g(-1);
|
|
10490
|
+
}, []), Y = w && (C.length > 0 || b || C.length === 0), j = ["gloss-autocomplete", h].filter(Boolean).join(" ");
|
|
10487
10491
|
return /* @__PURE__ */ d("div", { className: j, ref: P, children: [
|
|
10488
10492
|
/* @__PURE__ */ e(
|
|
10489
10493
|
Me,
|
|
10490
10494
|
{
|
|
10491
10495
|
value: k,
|
|
10492
|
-
onChange:
|
|
10493
|
-
onKeyDown:
|
|
10496
|
+
onChange: z,
|
|
10497
|
+
onKeyDown: A,
|
|
10494
10498
|
onFocus: M,
|
|
10495
10499
|
placeholder: u,
|
|
10496
10500
|
label: p,
|
|
@@ -10500,7 +10504,7 @@ function Ln(r) {
|
|
|
10500
10504
|
size: v,
|
|
10501
10505
|
autoComplete: "off",
|
|
10502
10506
|
role: "combobox",
|
|
10503
|
-
"aria-expanded":
|
|
10507
|
+
"aria-expanded": w,
|
|
10504
10508
|
"aria-haspopup": "listbox",
|
|
10505
10509
|
"aria-autocomplete": "list"
|
|
10506
10510
|
}
|
|
@@ -10508,17 +10512,17 @@ function Ln(r) {
|
|
|
10508
10512
|
/* @__PURE__ */ e(
|
|
10509
10513
|
Jr,
|
|
10510
10514
|
{
|
|
10511
|
-
open:
|
|
10515
|
+
open: Y && !_,
|
|
10512
10516
|
onDismiss: O,
|
|
10513
10517
|
anchorRef: P,
|
|
10514
10518
|
placement: "bottom-start",
|
|
10515
|
-
children: b ? l ?? /* @__PURE__ */ e(Eu, {}) :
|
|
10519
|
+
children: b ? l ?? /* @__PURE__ */ e(Eu, {}) : C.length === 0 ? c : /* @__PURE__ */ e(
|
|
10516
10520
|
"ul",
|
|
10517
10521
|
{
|
|
10518
10522
|
ref: D,
|
|
10519
10523
|
className: "gloss-autocomplete__results",
|
|
10520
10524
|
role: "listbox",
|
|
10521
|
-
children:
|
|
10525
|
+
children: C.map((R, W) => {
|
|
10522
10526
|
const V = W === I;
|
|
10523
10527
|
return /* @__PURE__ */ e(
|
|
10524
10528
|
"li",
|
|
@@ -10530,12 +10534,12 @@ function Ln(r) {
|
|
|
10530
10534
|
V && "gloss-autocomplete__result-item--highlighted"
|
|
10531
10535
|
].filter(Boolean).join(" "),
|
|
10532
10536
|
onMouseDown: (G) => {
|
|
10533
|
-
G.preventDefault(), T(
|
|
10537
|
+
G.preventDefault(), T(R);
|
|
10534
10538
|
},
|
|
10535
10539
|
onMouseEnter: () => g(W),
|
|
10536
|
-
children: o ? o(
|
|
10540
|
+
children: o ? o(R, V) : /* @__PURE__ */ e("span", { children: s(R) })
|
|
10537
10541
|
},
|
|
10538
|
-
s(
|
|
10542
|
+
s(R) + W
|
|
10539
10543
|
);
|
|
10540
10544
|
})
|
|
10541
10545
|
}
|
|
@@ -10563,19 +10567,19 @@ function Hn(r) {
|
|
|
10563
10567
|
maxSelected: b,
|
|
10564
10568
|
searchable: _ = !1,
|
|
10565
10569
|
className: v
|
|
10566
|
-
} = r, [h, k] = H(!1), [E,
|
|
10570
|
+
} = r, [h, k] = H(!1), [E, w] = H(""), [S, I] = H(-1), g = ce(null), P = ce(null), x = ce(null), D = ee(
|
|
10567
10571
|
() => t.filter((W) => a.includes(W.value)),
|
|
10568
10572
|
[t, a]
|
|
10569
|
-
),
|
|
10573
|
+
), C = ee(() => {
|
|
10570
10574
|
if (!E) return t;
|
|
10571
10575
|
const W = E.toLowerCase();
|
|
10572
10576
|
return t.filter((V) => V.label.toLowerCase().includes(W));
|
|
10573
|
-
}, [t, E]),
|
|
10577
|
+
}, [t, E]), z = b != null && a.length >= b, T = N(
|
|
10574
10578
|
(W) => {
|
|
10575
|
-
a.includes(W) ? n(a.filter((G) => G !== W)) :
|
|
10579
|
+
a.includes(W) ? n(a.filter((G) => G !== W)) : z || n([...a, W]);
|
|
10576
10580
|
},
|
|
10577
|
-
[a, n,
|
|
10578
|
-
),
|
|
10581
|
+
[a, n, z]
|
|
10582
|
+
), A = N(
|
|
10579
10583
|
(W) => {
|
|
10580
10584
|
n(a.filter((V) => V !== W));
|
|
10581
10585
|
},
|
|
@@ -10586,17 +10590,17 @@ function Hn(r) {
|
|
|
10586
10590
|
switch (W.key) {
|
|
10587
10591
|
case "ArrowDown":
|
|
10588
10592
|
W.preventDefault(), h ? I(
|
|
10589
|
-
(V) => V <
|
|
10593
|
+
(V) => V < C.length - 1 ? V + 1 : 0
|
|
10590
10594
|
) : (k(!0), I(0));
|
|
10591
10595
|
break;
|
|
10592
10596
|
case "ArrowUp":
|
|
10593
10597
|
W.preventDefault(), h && I(
|
|
10594
|
-
(V) => V > 0 ? V - 1 :
|
|
10598
|
+
(V) => V > 0 ? V - 1 : C.length - 1
|
|
10595
10599
|
);
|
|
10596
10600
|
break;
|
|
10597
10601
|
case "Enter":
|
|
10598
|
-
if (W.preventDefault(), h &&
|
|
10599
|
-
const V =
|
|
10602
|
+
if (W.preventDefault(), h && S >= 0 && C[S]) {
|
|
10603
|
+
const V = C[S];
|
|
10600
10604
|
V.disabled || T(V.value);
|
|
10601
10605
|
} else h || k(!0);
|
|
10602
10606
|
break;
|
|
@@ -10604,22 +10608,22 @@ function Hn(r) {
|
|
|
10604
10608
|
W.preventDefault(), k(!1), I(-1);
|
|
10605
10609
|
break;
|
|
10606
10610
|
case "Backspace":
|
|
10607
|
-
_ && E === "" && a.length > 0 &&
|
|
10611
|
+
_ && E === "" && a.length > 0 && A(a[a.length - 1]);
|
|
10608
10612
|
break;
|
|
10609
10613
|
}
|
|
10610
10614
|
},
|
|
10611
|
-
[f, h,
|
|
10615
|
+
[f, h, C, S, T, _, E, a, A]
|
|
10612
10616
|
);
|
|
10613
10617
|
se(() => {
|
|
10614
|
-
|
|
10615
|
-
}, [
|
|
10618
|
+
S >= 0 && x.current && x.current.querySelectorAll('[role="option"]')[S]?.scrollIntoView({ block: "nearest" });
|
|
10619
|
+
}, [S]), se(() => {
|
|
10616
10620
|
h && _ && P.current && P.current.focus();
|
|
10617
10621
|
}, [h, _]), se(() => {
|
|
10618
|
-
h || (
|
|
10622
|
+
h || (w(""), I(-1));
|
|
10619
10623
|
}, [h]);
|
|
10620
10624
|
const O = N(() => {
|
|
10621
10625
|
f || k((W) => !W);
|
|
10622
|
-
}, [f]),
|
|
10626
|
+
}, [f]), Y = N(() => {
|
|
10623
10627
|
k(!1);
|
|
10624
10628
|
}, []), j = [
|
|
10625
10629
|
"gloss-multi-select",
|
|
@@ -10627,7 +10631,7 @@ function Hn(r) {
|
|
|
10627
10631
|
p && "gloss-multi-select--error",
|
|
10628
10632
|
`gloss-multi-select--${y}`,
|
|
10629
10633
|
v
|
|
10630
|
-
].filter(Boolean).join(" "),
|
|
10634
|
+
].filter(Boolean).join(" "), R = [
|
|
10631
10635
|
"gloss-multi-select__trigger",
|
|
10632
10636
|
h && "gloss-multi-select__trigger--focused",
|
|
10633
10637
|
p && "gloss-multi-select__trigger--error"
|
|
@@ -10638,7 +10642,7 @@ function Hn(r) {
|
|
|
10638
10642
|
"div",
|
|
10639
10643
|
{
|
|
10640
10644
|
ref: g,
|
|
10641
|
-
className:
|
|
10645
|
+
className: R,
|
|
10642
10646
|
onClick: O,
|
|
10643
10647
|
onKeyDown: M,
|
|
10644
10648
|
tabIndex: f ? -1 : 0,
|
|
@@ -10647,12 +10651,12 @@ function Hn(r) {
|
|
|
10647
10651
|
"aria-haspopup": "listbox",
|
|
10648
10652
|
"aria-disabled": f || void 0,
|
|
10649
10653
|
children: [
|
|
10650
|
-
D.map((W) => /* @__PURE__ */ e("span", { className: "gloss-multi-select__tag", children: s ? s(W, () =>
|
|
10654
|
+
D.map((W) => /* @__PURE__ */ e("span", { className: "gloss-multi-select__tag", children: s ? s(W, () => A(W.value)) : /* @__PURE__ */ e(
|
|
10651
10655
|
Zr,
|
|
10652
10656
|
{
|
|
10653
10657
|
size: y === "lg" ? "md" : "sm",
|
|
10654
10658
|
variant: "outlined",
|
|
10655
|
-
onDelete: f ? void 0 : () =>
|
|
10659
|
+
onDelete: f ? void 0 : () => A(W.value),
|
|
10656
10660
|
children: W.label
|
|
10657
10661
|
}
|
|
10658
10662
|
) }, W.value)),
|
|
@@ -10664,7 +10668,7 @@ function Hn(r) {
|
|
|
10664
10668
|
className: "gloss-multi-select__search",
|
|
10665
10669
|
value: E,
|
|
10666
10670
|
onChange: (W) => {
|
|
10667
|
-
|
|
10671
|
+
w(W.target.value), h || k(!0), I(-1);
|
|
10668
10672
|
},
|
|
10669
10673
|
placeholder: D.length === 0 ? c : "",
|
|
10670
10674
|
disabled: f,
|
|
@@ -10695,32 +10699,32 @@ function Hn(r) {
|
|
|
10695
10699
|
Jr,
|
|
10696
10700
|
{
|
|
10697
10701
|
open: h && !f,
|
|
10698
|
-
onDismiss:
|
|
10702
|
+
onDismiss: Y,
|
|
10699
10703
|
anchorRef: g,
|
|
10700
10704
|
placement: "bottom-start",
|
|
10701
|
-
children:
|
|
10705
|
+
children: C.length === 0 ? o : /* @__PURE__ */ e(
|
|
10702
10706
|
"ul",
|
|
10703
10707
|
{
|
|
10704
10708
|
ref: x,
|
|
10705
10709
|
className: "gloss-multi-select__dropdown",
|
|
10706
10710
|
role: "listbox",
|
|
10707
10711
|
"aria-multiselectable": "true",
|
|
10708
|
-
children:
|
|
10709
|
-
const G = a.includes(W.value), F = V ===
|
|
10712
|
+
children: C.map((W, V) => {
|
|
10713
|
+
const G = a.includes(W.value), F = V === S, X = W.disabled || z && !G;
|
|
10710
10714
|
return /* @__PURE__ */ e(
|
|
10711
10715
|
"li",
|
|
10712
10716
|
{
|
|
10713
10717
|
role: "option",
|
|
10714
10718
|
"aria-selected": G,
|
|
10715
|
-
"aria-disabled":
|
|
10719
|
+
"aria-disabled": X || void 0,
|
|
10716
10720
|
className: [
|
|
10717
10721
|
"gloss-multi-select__option",
|
|
10718
10722
|
G && "gloss-multi-select__option--selected",
|
|
10719
10723
|
F && "gloss-multi-select__option--highlighted",
|
|
10720
|
-
|
|
10724
|
+
X && "gloss-multi-select__option--disabled"
|
|
10721
10725
|
].filter(Boolean).join(" "),
|
|
10722
|
-
onMouseDown: (
|
|
10723
|
-
|
|
10726
|
+
onMouseDown: (U) => {
|
|
10727
|
+
U.preventDefault(), X || T(W.value);
|
|
10724
10728
|
},
|
|
10725
10729
|
onMouseEnter: () => I(V),
|
|
10726
10730
|
children: i ? i(W, G) : /* @__PURE__ */ d(We, { children: [
|
|
@@ -10767,8 +10771,8 @@ const Mu = {
|
|
|
10767
10771
|
lg: { size: "48px", fontSize: "1rem" },
|
|
10768
10772
|
xl: { size: "64px", fontSize: "1.25rem" }
|
|
10769
10773
|
}, Pu = {
|
|
10770
|
-
bg:
|
|
10771
|
-
color:
|
|
10774
|
+
bg: B.BgMuted,
|
|
10775
|
+
color: B.TextSecondary
|
|
10772
10776
|
}, Ru = {
|
|
10773
10777
|
circle: "50%",
|
|
10774
10778
|
square: Se.Md
|
|
@@ -10884,8 +10888,8 @@ function ea(r) {
|
|
|
10884
10888
|
totalCount: h,
|
|
10885
10889
|
onPageChange: k,
|
|
10886
10890
|
loading: E = !1,
|
|
10887
|
-
striped:
|
|
10888
|
-
className:
|
|
10891
|
+
striped: w = !1,
|
|
10892
|
+
className: S
|
|
10889
10893
|
} = r, I = ee(
|
|
10890
10894
|
() => a.map((M) => String(M[n])),
|
|
10891
10895
|
[a, n]
|
|
@@ -10904,15 +10908,15 @@ function ea(r) {
|
|
|
10904
10908
|
O.has(M) ? O.delete(M) : O.add(M), m(O);
|
|
10905
10909
|
},
|
|
10906
10910
|
[p, m]
|
|
10907
|
-
),
|
|
10911
|
+
), C = N(
|
|
10908
10912
|
(M) => {
|
|
10909
10913
|
if (!b) return;
|
|
10910
10914
|
let O = "asc";
|
|
10911
10915
|
f === M && y === "asc" && (O = "desc"), b(M, O);
|
|
10912
10916
|
},
|
|
10913
10917
|
[f, y, b]
|
|
10914
|
-
),
|
|
10915
|
-
return /* @__PURE__ */ d("div", { className:
|
|
10918
|
+
), 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(" ");
|
|
10919
|
+
return /* @__PURE__ */ d("div", { className: A, children: [
|
|
10916
10920
|
/* @__PURE__ */ d("table", { className: "gloss-data-table__table", children: [
|
|
10917
10921
|
/* @__PURE__ */ e("thead", { children: /* @__PURE__ */ d("tr", { children: [
|
|
10918
10922
|
u && /* @__PURE__ */ e("th", { className: "gloss-data-table__header-cell gloss-data-table__header-cell--checkbox", children: /* @__PURE__ */ e(
|
|
@@ -10925,7 +10929,7 @@ function ea(r) {
|
|
|
10925
10929
|
}
|
|
10926
10930
|
) }),
|
|
10927
10931
|
t.map((M) => {
|
|
10928
|
-
const O = f === M.key,
|
|
10932
|
+
const O = f === M.key, Y = [
|
|
10929
10933
|
"gloss-data-table__header-cell",
|
|
10930
10934
|
M.sortable && "gloss-data-table__header-cell--sortable",
|
|
10931
10935
|
M.align === "center" && "gloss-data-table__body-cell--align-center",
|
|
@@ -10934,9 +10938,9 @@ function ea(r) {
|
|
|
10934
10938
|
return /* @__PURE__ */ e(
|
|
10935
10939
|
"th",
|
|
10936
10940
|
{
|
|
10937
|
-
className:
|
|
10941
|
+
className: Y,
|
|
10938
10942
|
style: M.width ? { width: M.width } : void 0,
|
|
10939
|
-
onClick: M.sortable ? () =>
|
|
10943
|
+
onClick: M.sortable ? () => C(M.key) : void 0,
|
|
10940
10944
|
"aria-sort": O ? y : void 0,
|
|
10941
10945
|
children: s ? s(M) : /* @__PURE__ */ d("span", { className: "gloss-data-table__header-content", children: [
|
|
10942
10946
|
M.header,
|
|
@@ -10963,13 +10967,13 @@ function ea(r) {
|
|
|
10963
10967
|
/* @__PURE__ */ d("tbody", { children: [
|
|
10964
10968
|
E && Array.from({ length: 3 }, (M, O) => /* @__PURE__ */ d("tr", { className: "gloss-data-table__skeleton-row", children: [
|
|
10965
10969
|
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((
|
|
10970
|
+
t.map((Y) => /* @__PURE__ */ e("td", { className: "gloss-data-table__body-cell", children: /* @__PURE__ */ e(
|
|
10967
10971
|
"div",
|
|
10968
10972
|
{
|
|
10969
10973
|
className: "gloss-data-table__skeleton-cell",
|
|
10970
|
-
style: { width: `${60 + (O * 20 + t.indexOf(
|
|
10974
|
+
style: { width: `${60 + (O * 20 + t.indexOf(Y) * 15) % 40}%` }
|
|
10971
10975
|
}
|
|
10972
|
-
) },
|
|
10976
|
+
) }, Y.key)),
|
|
10973
10977
|
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
10978
|
] }, `skeleton-${O}`)),
|
|
10975
10979
|
!E && a.length === 0 && /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e(
|
|
@@ -10983,17 +10987,17 @@ function ea(r) {
|
|
|
10983
10987
|
}
|
|
10984
10988
|
) }),
|
|
10985
10989
|
!E && a.map((M, O) => {
|
|
10986
|
-
const
|
|
10990
|
+
const Y = String(M[n]), j = p?.has(Y) ?? !1, R = [
|
|
10987
10991
|
"gloss-data-table__row",
|
|
10988
10992
|
j && "gloss-data-table__row--selected",
|
|
10989
|
-
|
|
10993
|
+
w && "gloss-data-table__row--striped"
|
|
10990
10994
|
].filter(Boolean).join(" ");
|
|
10991
|
-
return /* @__PURE__ */ d("tr", { className:
|
|
10995
|
+
return /* @__PURE__ */ d("tr", { className: R, children: [
|
|
10992
10996
|
u && /* @__PURE__ */ e("td", { className: "gloss-data-table__body-cell gloss-data-table__body-cell--checkbox", children: /* @__PURE__ */ e(
|
|
10993
10997
|
ut,
|
|
10994
10998
|
{
|
|
10995
10999
|
checked: j,
|
|
10996
|
-
onChange: () => D(
|
|
11000
|
+
onChange: () => D(Y),
|
|
10997
11001
|
size: "sm"
|
|
10998
11002
|
}
|
|
10999
11003
|
) }),
|
|
@@ -11015,7 +11019,7 @@ function ea(r) {
|
|
|
11015
11019
|
);
|
|
11016
11020
|
}),
|
|
11017
11021
|
o && /* @__PURE__ */ e("td", { className: "gloss-data-table__body-cell gloss-data-table__body-cell--actions", children: o(M) })
|
|
11018
|
-
] },
|
|
11022
|
+
] }, Y);
|
|
11019
11023
|
})
|
|
11020
11024
|
] })
|
|
11021
11025
|
] }),
|
|
@@ -11024,7 +11028,7 @@ function ea(r) {
|
|
|
11024
11028
|
"Page ",
|
|
11025
11029
|
_,
|
|
11026
11030
|
" of ",
|
|
11027
|
-
|
|
11031
|
+
z
|
|
11028
11032
|
] }),
|
|
11029
11033
|
/* @__PURE__ */ d("div", { className: "gloss-data-table__page-controls", children: [
|
|
11030
11034
|
/* @__PURE__ */ e(
|
|
@@ -11042,7 +11046,7 @@ function ea(r) {
|
|
|
11042
11046
|
{
|
|
11043
11047
|
variant: "outline",
|
|
11044
11048
|
size: "sm",
|
|
11045
|
-
disabled: _ >=
|
|
11049
|
+
disabled: _ >= z,
|
|
11046
11050
|
onClick: () => k(_ + 1),
|
|
11047
11051
|
children: "Next"
|
|
11048
11052
|
}
|
|
@@ -11125,7 +11129,7 @@ const Lu = {
|
|
|
11125
11129
|
dismissOnClickOutside: !0,
|
|
11126
11130
|
dismissOnEscape: !0,
|
|
11127
11131
|
role: "dialog",
|
|
11128
|
-
bg:
|
|
11132
|
+
bg: B.BgSurface,
|
|
11129
11133
|
shadow: Ze.Hover,
|
|
11130
11134
|
radius: Se.Lg,
|
|
11131
11135
|
padding: "0",
|
|
@@ -11213,14 +11217,14 @@ const Gu = {
|
|
|
11213
11217
|
fontSize: Ae.TextBase,
|
|
11214
11218
|
fontWeight: Ae.WeightNormal,
|
|
11215
11219
|
lineHeight: Ae.LeadingNormal,
|
|
11216
|
-
color:
|
|
11220
|
+
color: B.TextPrimary
|
|
11217
11221
|
},
|
|
11218
11222
|
caption: {
|
|
11219
11223
|
fontFamily: Ae.FontBody,
|
|
11220
11224
|
fontSize: Ae.TextSm,
|
|
11221
11225
|
fontWeight: Ae.WeightNormal,
|
|
11222
11226
|
lineHeight: Ae.LeadingNormal,
|
|
11223
|
-
color:
|
|
11227
|
+
color: B.TextSecondary
|
|
11224
11228
|
},
|
|
11225
11229
|
overline: {
|
|
11226
11230
|
fontFamily: Ae.FontBody,
|
|
@@ -11228,7 +11232,7 @@ const Gu = {
|
|
|
11228
11232
|
fontWeight: Ae.WeightSemibold,
|
|
11229
11233
|
lineHeight: Ae.LeadingTight,
|
|
11230
11234
|
letterSpacing: "0.08em",
|
|
11231
|
-
color:
|
|
11235
|
+
color: B.TextSecondary
|
|
11232
11236
|
}
|
|
11233
11237
|
}, Vu = {
|
|
11234
11238
|
xs: { fontSize: Ae.TextXs },
|
|
@@ -11532,22 +11536,22 @@ function _p({
|
|
|
11532
11536
|
email: p.email ?? "",
|
|
11533
11537
|
password: p.password ?? "",
|
|
11534
11538
|
rememberMe: p.rememberMe ?? !1
|
|
11535
|
-
}), [v, h] = H({}), [k, E] = H({}),
|
|
11539
|
+
}), [v, h] = H({}), [k, E] = H({}), w = N((x, D) => {
|
|
11536
11540
|
try {
|
|
11537
|
-
Xa.shape[x].parse(D), h((
|
|
11538
|
-
} catch (
|
|
11539
|
-
|
|
11541
|
+
Xa.shape[x].parse(D), h((z) => ({ ...z, [x]: void 0 }));
|
|
11542
|
+
} catch (C) {
|
|
11543
|
+
C instanceof ye.ZodError && h((z) => ({ ...z, [x]: C.issues[0]?.message }));
|
|
11540
11544
|
}
|
|
11541
|
-
}, []),
|
|
11545
|
+
}, []), S = N(
|
|
11542
11546
|
(x) => (D) => {
|
|
11543
|
-
_((
|
|
11547
|
+
_((C) => ({ ...C, [x]: D })), k[x] && w(x, D);
|
|
11544
11548
|
},
|
|
11545
|
-
[k,
|
|
11549
|
+
[k, w]
|
|
11546
11550
|
), I = N(
|
|
11547
11551
|
(x) => () => {
|
|
11548
|
-
E((D) => ({ ...D, [x]: !0 })),
|
|
11552
|
+
E((D) => ({ ...D, [x]: !0 })), w(x, b[x]);
|
|
11549
11553
|
},
|
|
11550
|
-
[b,
|
|
11554
|
+
[b, w]
|
|
11551
11555
|
), g = N(
|
|
11552
11556
|
async (x) => {
|
|
11553
11557
|
if (x.preventDefault(), f) {
|
|
@@ -11556,11 +11560,11 @@ function _p({
|
|
|
11556
11560
|
}
|
|
11557
11561
|
const D = Xa.safeParse(b);
|
|
11558
11562
|
if (!D.success) {
|
|
11559
|
-
const
|
|
11560
|
-
D.error.issues.forEach((
|
|
11561
|
-
const T =
|
|
11562
|
-
|
|
11563
|
-
}), h(
|
|
11563
|
+
const C = {};
|
|
11564
|
+
D.error.issues.forEach((z) => {
|
|
11565
|
+
const T = z.path[0];
|
|
11566
|
+
C[T] || (C[T] = z.message);
|
|
11567
|
+
}), h(C), E({ email: !0, password: !0 });
|
|
11564
11568
|
return;
|
|
11565
11569
|
}
|
|
11566
11570
|
await m?.(D.data);
|
|
@@ -11586,7 +11590,7 @@ function _p({
|
|
|
11586
11590
|
type: "email",
|
|
11587
11591
|
placeholder: "name@company.com",
|
|
11588
11592
|
value: b.email,
|
|
11589
|
-
onChange: (x) =>
|
|
11593
|
+
onChange: (x) => S("email")(x.target.value),
|
|
11590
11594
|
onBlur: I("email"),
|
|
11591
11595
|
status: v.email ? "error" : void 0,
|
|
11592
11596
|
disabled: u || l
|
|
@@ -11613,7 +11617,7 @@ function _p({
|
|
|
11613
11617
|
showToggle: !0,
|
|
11614
11618
|
placeholder: "Enter your password",
|
|
11615
11619
|
value: b.password,
|
|
11616
|
-
onChange: (x) =>
|
|
11620
|
+
onChange: (x) => S("password")(x.target.value),
|
|
11617
11621
|
onBlur: I("password"),
|
|
11618
11622
|
status: v.password ? "error" : void 0,
|
|
11619
11623
|
disabled: u || l
|
|
@@ -11625,7 +11629,7 @@ function _p({
|
|
|
11625
11629
|
ut,
|
|
11626
11630
|
{
|
|
11627
11631
|
checked: b.rememberMe,
|
|
11628
|
-
onChange: (x) =>
|
|
11632
|
+
onChange: (x) => S("rememberMe")(x.target.checked),
|
|
11629
11633
|
label: "Keep me signed in",
|
|
11630
11634
|
disabled: u || l
|
|
11631
11635
|
}
|
|
@@ -11786,8 +11790,8 @@ function Yu({
|
|
|
11786
11790
|
return { success: !0, errors: {} };
|
|
11787
11791
|
const P = {};
|
|
11788
11792
|
g.error.issues.forEach((D) => {
|
|
11789
|
-
const
|
|
11790
|
-
P[
|
|
11793
|
+
const C = D.path[0];
|
|
11794
|
+
P[C] || (P[C] = D.message);
|
|
11791
11795
|
}), h(P);
|
|
11792
11796
|
const x = {};
|
|
11793
11797
|
return Object.keys(P).forEach((D) => {
|
|
@@ -11806,13 +11810,13 @@ function Yu({
|
|
|
11806
11810
|
} catch (x) {
|
|
11807
11811
|
x instanceof ye.ZodError && h((D) => ({ ...D, [g]: x.issues[0]?.message }));
|
|
11808
11812
|
}
|
|
11809
|
-
}, []),
|
|
11813
|
+
}, []), w = N(
|
|
11810
11814
|
(g) => (P) => {
|
|
11811
11815
|
const x = { ...f, [g]: P };
|
|
11812
11816
|
y(x), l?.(x), b[g] && E(g, P);
|
|
11813
11817
|
},
|
|
11814
11818
|
[f, b, l, E]
|
|
11815
|
-
),
|
|
11819
|
+
), S = N(
|
|
11816
11820
|
(g) => () => {
|
|
11817
11821
|
_((P) => ({ ...P, [g]: !0 })), E(g, f[g] ?? ""), u?.(g);
|
|
11818
11822
|
},
|
|
@@ -11840,8 +11844,8 @@ function Yu({
|
|
|
11840
11844
|
{
|
|
11841
11845
|
placeholder: "123 Main Street",
|
|
11842
11846
|
value: f.street,
|
|
11843
|
-
onChange: (g) =>
|
|
11844
|
-
onBlur:
|
|
11847
|
+
onChange: (g) => w("street")(g.target.value),
|
|
11848
|
+
onBlur: S("street"),
|
|
11845
11849
|
status: I("street"),
|
|
11846
11850
|
disabled: i
|
|
11847
11851
|
}
|
|
@@ -11855,8 +11859,8 @@ function Yu({
|
|
|
11855
11859
|
{
|
|
11856
11860
|
placeholder: "Apt 4B",
|
|
11857
11861
|
value: f.street2,
|
|
11858
|
-
onChange: (g) =>
|
|
11859
|
-
onBlur:
|
|
11862
|
+
onChange: (g) => w("street2")(g.target.value),
|
|
11863
|
+
onBlur: S("street2"),
|
|
11860
11864
|
disabled: i
|
|
11861
11865
|
}
|
|
11862
11866
|
)
|
|
@@ -11875,8 +11879,8 @@ function Yu({
|
|
|
11875
11879
|
{
|
|
11876
11880
|
placeholder: "San Francisco",
|
|
11877
11881
|
value: f.city,
|
|
11878
|
-
onChange: (g) =>
|
|
11879
|
-
onBlur:
|
|
11882
|
+
onChange: (g) => w("city")(g.target.value),
|
|
11883
|
+
onBlur: S("city"),
|
|
11880
11884
|
status: I("city"),
|
|
11881
11885
|
disabled: i
|
|
11882
11886
|
}
|
|
@@ -11900,7 +11904,7 @@ function Yu({
|
|
|
11900
11904
|
placeholder: "Select state",
|
|
11901
11905
|
value: f.state,
|
|
11902
11906
|
onChange: (g) => {
|
|
11903
|
-
|
|
11907
|
+
w("state")(g), _((P) => ({ ...P, state: !0 }));
|
|
11904
11908
|
},
|
|
11905
11909
|
disabled: i,
|
|
11906
11910
|
options: Ku
|
|
@@ -11924,8 +11928,8 @@ function Yu({
|
|
|
11924
11928
|
{
|
|
11925
11929
|
placeholder: "94102",
|
|
11926
11930
|
value: f.zip,
|
|
11927
|
-
onChange: (g) =>
|
|
11928
|
-
onBlur:
|
|
11931
|
+
onChange: (g) => w("zip")(g.target.value),
|
|
11932
|
+
onBlur: S("zip"),
|
|
11929
11933
|
status: I("zip"),
|
|
11930
11934
|
disabled: i,
|
|
11931
11935
|
maxLength: 10
|
|
@@ -12049,35 +12053,35 @@ function Sp({
|
|
|
12049
12053
|
expiryDate: p.expiryDate ?? "",
|
|
12050
12054
|
cvv: p.cvv ?? "",
|
|
12051
12055
|
cardholderName: p.cardholderName ?? ""
|
|
12052
|
-
}), [h, k] = H({}), [E,
|
|
12056
|
+
}), [h, k] = H({}), [E, w] = H({}), S = ee(() => n ? `${a} ${n}` : a, [a, n]), I = N((C, z) => {
|
|
12053
12057
|
try {
|
|
12054
|
-
hr.shape[
|
|
12058
|
+
hr.shape[C].parse(z), k((A) => ({ ...A, [C]: void 0 }));
|
|
12055
12059
|
} catch (T) {
|
|
12056
|
-
T instanceof ye.ZodError && k((
|
|
12060
|
+
T instanceof ye.ZodError && k((A) => ({ ...A, [C]: T.issues[0]?.message }));
|
|
12057
12061
|
}
|
|
12058
12062
|
}, []), g = N(
|
|
12059
|
-
(
|
|
12060
|
-
v((T) => ({ ...T, [
|
|
12063
|
+
(C) => (z) => {
|
|
12064
|
+
v((T) => ({ ...T, [C]: z })), C === "cardNumber" && b?.(z.replace(/\s/g, "")), E[C] && I(C, z);
|
|
12061
12065
|
},
|
|
12062
12066
|
[E, I, b]
|
|
12063
12067
|
), P = N(
|
|
12064
|
-
(
|
|
12065
|
-
|
|
12068
|
+
(C) => () => {
|
|
12069
|
+
w((z) => ({ ...z, [C]: !0 })), I(C, _[C]);
|
|
12066
12070
|
},
|
|
12067
12071
|
[_, I]
|
|
12068
12072
|
), x = N(
|
|
12069
|
-
async (
|
|
12070
|
-
if (
|
|
12071
|
-
f(new FormData(
|
|
12073
|
+
async (C) => {
|
|
12074
|
+
if (C.preventDefault(), f) {
|
|
12075
|
+
f(new FormData(C.currentTarget));
|
|
12072
12076
|
return;
|
|
12073
12077
|
}
|
|
12074
|
-
const
|
|
12075
|
-
if (!
|
|
12078
|
+
const z = hr.safeParse(_);
|
|
12079
|
+
if (!z.success) {
|
|
12076
12080
|
const T = {};
|
|
12077
|
-
|
|
12078
|
-
const M =
|
|
12079
|
-
T[M] || (T[M] =
|
|
12080
|
-
}), k(T),
|
|
12081
|
+
z.error.issues.forEach((A) => {
|
|
12082
|
+
const M = A.path[0];
|
|
12083
|
+
T[M] || (T[M] = A.message);
|
|
12084
|
+
}), k(T), w({
|
|
12081
12085
|
cardNumber: !0,
|
|
12082
12086
|
expiryDate: !0,
|
|
12083
12087
|
cvv: !0,
|
|
@@ -12085,13 +12089,13 @@ function Sp({
|
|
|
12085
12089
|
});
|
|
12086
12090
|
return;
|
|
12087
12091
|
}
|
|
12088
|
-
await m?.(
|
|
12092
|
+
await m?.(z.data);
|
|
12089
12093
|
},
|
|
12090
12094
|
[_, m, f]
|
|
12091
|
-
), D = (
|
|
12092
|
-
if (E[
|
|
12093
|
-
if (h[
|
|
12094
|
-
if (_[
|
|
12095
|
+
), D = (C) => {
|
|
12096
|
+
if (E[C]) {
|
|
12097
|
+
if (h[C]) return "error";
|
|
12098
|
+
if (_[C] && !h[C]) return "success";
|
|
12095
12099
|
}
|
|
12096
12100
|
};
|
|
12097
12101
|
return /* @__PURE__ */ d("form", { onSubmit: x, className: "gloss-pattern-credit-card-form", children: [
|
|
@@ -12111,7 +12115,7 @@ function Sp({
|
|
|
12111
12115
|
mask: "creditCard",
|
|
12112
12116
|
placeholder: "4242 4242 4242 4242",
|
|
12113
12117
|
value: _.cardNumber,
|
|
12114
|
-
onAccept: (
|
|
12118
|
+
onAccept: (C) => g("cardNumber")(C),
|
|
12115
12119
|
onBlur: P("cardNumber"),
|
|
12116
12120
|
variant: D("cardNumber") ?? "default",
|
|
12117
12121
|
disabled: l || o
|
|
@@ -12128,7 +12132,7 @@ function Sp({
|
|
|
12128
12132
|
mask: "expiry",
|
|
12129
12133
|
placeholder: "MM / YY",
|
|
12130
12134
|
value: _.expiryDate,
|
|
12131
|
-
onAccept: (
|
|
12135
|
+
onAccept: (C) => g("expiryDate")(C),
|
|
12132
12136
|
onBlur: P("expiryDate"),
|
|
12133
12137
|
variant: D("expiryDate") ?? "default",
|
|
12134
12138
|
disabled: l || o
|
|
@@ -12146,7 +12150,7 @@ function Sp({
|
|
|
12146
12150
|
placeholder: "123",
|
|
12147
12151
|
maxLength: 4,
|
|
12148
12152
|
value: _.cvv,
|
|
12149
|
-
onChange: (
|
|
12153
|
+
onChange: (C) => g("cvv")(C.target.value.replace(/\D/g, "")),
|
|
12150
12154
|
onBlur: P("cvv"),
|
|
12151
12155
|
status: D("cvv"),
|
|
12152
12156
|
disabled: l || o
|
|
@@ -12162,7 +12166,7 @@ function Sp({
|
|
|
12162
12166
|
{
|
|
12163
12167
|
placeholder: "John Doe",
|
|
12164
12168
|
value: _.cardholderName,
|
|
12165
|
-
onChange: (
|
|
12169
|
+
onChange: (C) => g("cardholderName")(C.target.value),
|
|
12166
12170
|
onBlur: P("cardholderName"),
|
|
12167
12171
|
status: D("cardholderName"),
|
|
12168
12172
|
disabled: l || o
|
|
@@ -12192,7 +12196,7 @@ function Sp({
|
|
|
12192
12196
|
disabled: l || c,
|
|
12193
12197
|
leftIcon: u ? /* @__PURE__ */ e(Je, { name: "lock", definition: { size: "sm" } }) : void 0,
|
|
12194
12198
|
fullWidth: !0,
|
|
12195
|
-
children:
|
|
12199
|
+
children: S
|
|
12196
12200
|
}
|
|
12197
12201
|
)
|
|
12198
12202
|
] })
|
|
@@ -12301,12 +12305,12 @@ function wp({
|
|
|
12301
12305
|
y((x) => ({ ...x, [g]: P })), v[g] && k(g, P);
|
|
12302
12306
|
},
|
|
12303
12307
|
[v, k]
|
|
12304
|
-
),
|
|
12308
|
+
), w = N(
|
|
12305
12309
|
(g) => () => {
|
|
12306
12310
|
h((P) => ({ ...P, [g]: !0 })), k(g, f[g]);
|
|
12307
12311
|
},
|
|
12308
12312
|
[f, k]
|
|
12309
|
-
),
|
|
12313
|
+
), S = N(
|
|
12310
12314
|
async (g) => {
|
|
12311
12315
|
if (g.preventDefault(), t) {
|
|
12312
12316
|
t(new FormData(g.currentTarget));
|
|
@@ -12316,8 +12320,8 @@ function wp({
|
|
|
12316
12320
|
if (!P.success) {
|
|
12317
12321
|
const x = {};
|
|
12318
12322
|
P.error.issues.forEach((D) => {
|
|
12319
|
-
const
|
|
12320
|
-
x[
|
|
12323
|
+
const C = D.path[0];
|
|
12324
|
+
x[C] || (x[C] = D.message);
|
|
12321
12325
|
}), _(x), h({
|
|
12322
12326
|
firstName: !0,
|
|
12323
12327
|
lastName: !0,
|
|
@@ -12336,7 +12340,7 @@ function wp({
|
|
|
12336
12340
|
" ",
|
|
12337
12341
|
/* @__PURE__ */ e(Kt, { href: c, size: "sm", children: "Terms of Service" })
|
|
12338
12342
|
] }) : "I agree to the Terms of Service";
|
|
12339
|
-
return /* @__PURE__ */ d("form", { onSubmit:
|
|
12343
|
+
return /* @__PURE__ */ d("form", { onSubmit: S, className: "gloss-registration-form", children: [
|
|
12340
12344
|
/* @__PURE__ */ d("div", { className: "gloss-registration-form__header", children: [
|
|
12341
12345
|
/* @__PURE__ */ e("h3", { className: "gloss-registration-form__title", children: p }),
|
|
12342
12346
|
m && /* @__PURE__ */ e("p", { className: "gloss-registration-form__subtitle", children: m })
|
|
@@ -12351,7 +12355,7 @@ function wp({
|
|
|
12351
12355
|
placeholder: "John",
|
|
12352
12356
|
value: f.firstName,
|
|
12353
12357
|
onChange: (g) => E("firstName")(g.target.value),
|
|
12354
|
-
onBlur:
|
|
12358
|
+
onBlur: w("firstName"),
|
|
12355
12359
|
status: b.firstName ? "error" : void 0,
|
|
12356
12360
|
disabled: n || a,
|
|
12357
12361
|
name: "firstName"
|
|
@@ -12367,7 +12371,7 @@ function wp({
|
|
|
12367
12371
|
placeholder: "Doe",
|
|
12368
12372
|
value: f.lastName,
|
|
12369
12373
|
onChange: (g) => E("lastName")(g.target.value),
|
|
12370
|
-
onBlur:
|
|
12374
|
+
onBlur: w("lastName"),
|
|
12371
12375
|
status: b.lastName ? "error" : void 0,
|
|
12372
12376
|
disabled: n || a,
|
|
12373
12377
|
name: "lastName"
|
|
@@ -12385,7 +12389,7 @@ function wp({
|
|
|
12385
12389
|
placeholder: "name@company.com",
|
|
12386
12390
|
value: f.email,
|
|
12387
12391
|
onChange: (g) => E("email")(g.target.value),
|
|
12388
|
-
onBlur:
|
|
12392
|
+
onBlur: w("email"),
|
|
12389
12393
|
status: b.email ? "error" : void 0,
|
|
12390
12394
|
disabled: n || a,
|
|
12391
12395
|
name: "email"
|
|
@@ -12404,7 +12408,7 @@ function wp({
|
|
|
12404
12408
|
placeholder: "Create a password",
|
|
12405
12409
|
value: f.password,
|
|
12406
12410
|
onChange: (g) => E("password")(g.target.value),
|
|
12407
|
-
onBlur:
|
|
12411
|
+
onBlur: w("password"),
|
|
12408
12412
|
status: b.password ? "error" : void 0,
|
|
12409
12413
|
disabled: n || a,
|
|
12410
12414
|
name: "password",
|
|
@@ -12422,7 +12426,7 @@ function wp({
|
|
|
12422
12426
|
placeholder: "Confirm your password",
|
|
12423
12427
|
value: f.confirmPassword,
|
|
12424
12428
|
onChange: (g) => E("confirmPassword")(g.target.value),
|
|
12425
|
-
onBlur:
|
|
12429
|
+
onBlur: w("confirmPassword"),
|
|
12426
12430
|
status: b.confirmPassword ? "error" : void 0,
|
|
12427
12431
|
disabled: n || a,
|
|
12428
12432
|
name: "confirmPassword",
|
|
@@ -12526,32 +12530,32 @@ function Dp({
|
|
|
12526
12530
|
email: s.email ?? "",
|
|
12527
12531
|
subject: s.subject ?? "",
|
|
12528
12532
|
message: s.message ?? ""
|
|
12529
|
-
}), [m, f] = H({}), [y, b] = H({}), _ = N((
|
|
12533
|
+
}), [m, f] = H({}), [y, b] = H({}), _ = N((w, S) => {
|
|
12530
12534
|
try {
|
|
12531
|
-
Za.shape[
|
|
12535
|
+
Za.shape[w].parse(S), f((g) => ({ ...g, [w]: void 0 }));
|
|
12532
12536
|
} catch (I) {
|
|
12533
|
-
I instanceof ye.ZodError && f((g) => ({ ...g, [
|
|
12537
|
+
I instanceof ye.ZodError && f((g) => ({ ...g, [w]: I.issues[0]?.message }));
|
|
12534
12538
|
}
|
|
12535
12539
|
}, []), v = N(
|
|
12536
|
-
(
|
|
12537
|
-
p((I) => ({ ...I, [
|
|
12540
|
+
(w) => (S) => {
|
|
12541
|
+
p((I) => ({ ...I, [w]: S })), y[w] && _(w, S);
|
|
12538
12542
|
},
|
|
12539
12543
|
[y, _]
|
|
12540
12544
|
), h = N(
|
|
12541
|
-
(
|
|
12542
|
-
b((
|
|
12545
|
+
(w) => () => {
|
|
12546
|
+
b((S) => ({ ...S, [w]: !0 })), _(w, u[w]);
|
|
12543
12547
|
},
|
|
12544
12548
|
[u, _]
|
|
12545
12549
|
), k = N(
|
|
12546
|
-
async (
|
|
12547
|
-
if (
|
|
12548
|
-
t(new FormData(
|
|
12550
|
+
async (w) => {
|
|
12551
|
+
if (w.preventDefault(), t) {
|
|
12552
|
+
t(new FormData(w.currentTarget));
|
|
12549
12553
|
return;
|
|
12550
12554
|
}
|
|
12551
|
-
const
|
|
12552
|
-
if (!
|
|
12555
|
+
const S = Za.safeParse(u);
|
|
12556
|
+
if (!S.success) {
|
|
12553
12557
|
const I = {};
|
|
12554
|
-
|
|
12558
|
+
S.error.issues.forEach((g) => {
|
|
12555
12559
|
const P = g.path[0];
|
|
12556
12560
|
I[P] || (I[P] = g.message);
|
|
12557
12561
|
}), f(I), b({
|
|
@@ -12562,12 +12566,12 @@ function Dp({
|
|
|
12562
12566
|
});
|
|
12563
12567
|
return;
|
|
12564
12568
|
}
|
|
12565
|
-
await r?.(
|
|
12569
|
+
await r?.(S.data);
|
|
12566
12570
|
},
|
|
12567
12571
|
[u, r, t]
|
|
12568
|
-
), E = o?.map((
|
|
12569
|
-
value:
|
|
12570
|
-
label:
|
|
12572
|
+
), E = o?.map((w) => ({
|
|
12573
|
+
value: w,
|
|
12574
|
+
label: w
|
|
12571
12575
|
}));
|
|
12572
12576
|
return /* @__PURE__ */ d("form", { onSubmit: k, className: "gloss-contact-form", children: [
|
|
12573
12577
|
/* @__PURE__ */ d("div", { className: "gloss-contact-form__header", children: [
|
|
@@ -12582,7 +12586,7 @@ function Dp({
|
|
|
12582
12586
|
{
|
|
12583
12587
|
placeholder: "Your name",
|
|
12584
12588
|
value: u.name,
|
|
12585
|
-
onChange: (
|
|
12589
|
+
onChange: (w) => v("name")(w.target.value),
|
|
12586
12590
|
onBlur: h("name"),
|
|
12587
12591
|
status: m.name ? "error" : void 0,
|
|
12588
12592
|
disabled: n || a,
|
|
@@ -12599,7 +12603,7 @@ function Dp({
|
|
|
12599
12603
|
type: "email",
|
|
12600
12604
|
placeholder: "name@company.com",
|
|
12601
12605
|
value: u.email,
|
|
12602
|
-
onChange: (
|
|
12606
|
+
onChange: (w) => v("email")(w.target.value),
|
|
12603
12607
|
onBlur: h("email"),
|
|
12604
12608
|
status: m.email ? "error" : void 0,
|
|
12605
12609
|
disabled: n || a,
|
|
@@ -12615,8 +12619,8 @@ function Dp({
|
|
|
12615
12619
|
{
|
|
12616
12620
|
options: E,
|
|
12617
12621
|
value: u.subject,
|
|
12618
|
-
onChange: (
|
|
12619
|
-
v("subject")(
|
|
12622
|
+
onChange: (w) => {
|
|
12623
|
+
v("subject")(w), b((S) => ({ ...S, subject: !0 }));
|
|
12620
12624
|
},
|
|
12621
12625
|
placeholder: "Select a subject",
|
|
12622
12626
|
disabled: n || a
|
|
@@ -12626,7 +12630,7 @@ function Dp({
|
|
|
12626
12630
|
{
|
|
12627
12631
|
placeholder: "What is this about?",
|
|
12628
12632
|
value: u.subject,
|
|
12629
|
-
onChange: (
|
|
12633
|
+
onChange: (w) => v("subject")(w.target.value),
|
|
12630
12634
|
onBlur: h("subject"),
|
|
12631
12635
|
status: m.subject ? "error" : void 0,
|
|
12632
12636
|
disabled: n || a,
|
|
@@ -12642,7 +12646,7 @@ function Dp({
|
|
|
12642
12646
|
{
|
|
12643
12647
|
placeholder: "Tell us more...",
|
|
12644
12648
|
value: u.message,
|
|
12645
|
-
onChange: (
|
|
12649
|
+
onChange: (w) => v("message")(w.target.value),
|
|
12646
12650
|
onBlur: h("message"),
|
|
12647
12651
|
status: m.message ? "error" : void 0,
|
|
12648
12652
|
disabled: n || a,
|
|
@@ -12738,36 +12742,36 @@ function Tp({
|
|
|
12738
12742
|
cardholderName: s.card?.cardholderName ?? ""
|
|
12739
12743
|
}), [b, _] = H({}), [v, h] = H({}), [k, E] = H(
|
|
12740
12744
|
s.savePaymentMethod ?? !1
|
|
12741
|
-
), [
|
|
12745
|
+
), [w, S] = H(), I = ce(null), g = p === "credit_card" || p === "debit_card", P = N((T, A) => {
|
|
12742
12746
|
try {
|
|
12743
|
-
hr.shape[T].parse(
|
|
12747
|
+
hr.shape[T].parse(A), _((O) => ({ ...O, [T]: void 0 }));
|
|
12744
12748
|
} catch (M) {
|
|
12745
12749
|
M instanceof ye.ZodError && _((O) => ({ ...O, [T]: M.issues[0]?.message }));
|
|
12746
12750
|
}
|
|
12747
12751
|
}, []), x = N(
|
|
12748
|
-
(T) => (
|
|
12749
|
-
y((M) => ({ ...M, [T]:
|
|
12752
|
+
(T) => (A) => {
|
|
12753
|
+
y((M) => ({ ...M, [T]: A })), v[T] && P(T, A);
|
|
12750
12754
|
},
|
|
12751
12755
|
[v, P]
|
|
12752
12756
|
), D = N(
|
|
12753
12757
|
(T) => () => {
|
|
12754
|
-
h((
|
|
12758
|
+
h((A) => ({ ...A, [T]: !0 })), P(T, f[T]);
|
|
12755
12759
|
},
|
|
12756
12760
|
[f, P]
|
|
12757
|
-
),
|
|
12761
|
+
), C = (T) => {
|
|
12758
12762
|
if (v[T]) {
|
|
12759
12763
|
if (b[T]) return "error";
|
|
12760
12764
|
if (f[T] && !b[T]) return "success";
|
|
12761
12765
|
}
|
|
12762
|
-
},
|
|
12766
|
+
}, z = N(
|
|
12763
12767
|
async (T) => {
|
|
12764
|
-
if (T.preventDefault(),
|
|
12768
|
+
if (T.preventDefault(), S(void 0), t) {
|
|
12765
12769
|
t(new FormData(T.currentTarget));
|
|
12766
12770
|
return;
|
|
12767
12771
|
}
|
|
12768
|
-
const
|
|
12769
|
-
if (!
|
|
12770
|
-
|
|
12772
|
+
const A = I.current?.validate(), M = I.current?.getValues();
|
|
12773
|
+
if (!A?.success) {
|
|
12774
|
+
S("Please fix the errors above before submitting.");
|
|
12771
12775
|
return;
|
|
12772
12776
|
}
|
|
12773
12777
|
const O = {
|
|
@@ -12776,28 +12780,28 @@ function Tp({
|
|
|
12776
12780
|
savePaymentMethod: k
|
|
12777
12781
|
};
|
|
12778
12782
|
g && (O.card = f);
|
|
12779
|
-
const
|
|
12780
|
-
if (!
|
|
12783
|
+
const Y = Xu.safeParse(O);
|
|
12784
|
+
if (!Y.success) {
|
|
12781
12785
|
const j = {};
|
|
12782
|
-
|
|
12783
|
-
const W =
|
|
12786
|
+
Y.error.issues.forEach((R) => {
|
|
12787
|
+
const W = R.path;
|
|
12784
12788
|
if (W[0] === "card" && W.length === 2) {
|
|
12785
12789
|
const V = W[1];
|
|
12786
|
-
j[V] || (j[V] =
|
|
12787
|
-
} else W[0] === "card" && W.length === 1 &&
|
|
12790
|
+
j[V] || (j[V] = R.message);
|
|
12791
|
+
} else W[0] === "card" && W.length === 1 && S(R.message);
|
|
12788
12792
|
}), Object.keys(j).length > 0 && (_(j), h({
|
|
12789
12793
|
cardNumber: !0,
|
|
12790
12794
|
expiryDate: !0,
|
|
12791
12795
|
cvv: !0,
|
|
12792
12796
|
cardholderName: !0
|
|
12793
|
-
})), !
|
|
12797
|
+
})), !w && Object.keys(j).length === 0 && S("Please fix the errors above before submitting.");
|
|
12794
12798
|
return;
|
|
12795
12799
|
}
|
|
12796
|
-
await r?.(
|
|
12800
|
+
await r?.(Y.data);
|
|
12797
12801
|
},
|
|
12798
|
-
[p, f, k, g, r, t,
|
|
12802
|
+
[p, f, k, g, r, t, w]
|
|
12799
12803
|
);
|
|
12800
|
-
return /* @__PURE__ */ d("form", { onSubmit:
|
|
12804
|
+
return /* @__PURE__ */ d("form", { onSubmit: z, className: "gloss-payment-form", children: [
|
|
12801
12805
|
l && l.length > 0 && /* @__PURE__ */ d("div", { className: "gloss-payment-form__section", children: [
|
|
12802
12806
|
/* @__PURE__ */ e("h4", { className: "gloss-payment-form__section-title", children: "Payment Method" }),
|
|
12803
12807
|
/* @__PURE__ */ e(
|
|
@@ -12805,13 +12809,13 @@ function Tp({
|
|
|
12805
12809
|
{
|
|
12806
12810
|
methods: l,
|
|
12807
12811
|
value: l.find((T) => T.id === p)?.id,
|
|
12808
|
-
onChange: (T,
|
|
12812
|
+
onChange: (T, A) => {
|
|
12809
12813
|
m({
|
|
12810
12814
|
visa: "credit_card",
|
|
12811
12815
|
mastercard: "credit_card",
|
|
12812
12816
|
amex: "credit_card",
|
|
12813
12817
|
generic: "credit_card"
|
|
12814
|
-
}[
|
|
12818
|
+
}[A.type] ?? "credit_card");
|
|
12815
12819
|
},
|
|
12816
12820
|
disabled: n || a
|
|
12817
12821
|
}
|
|
@@ -12828,7 +12832,7 @@ function Tp({
|
|
|
12828
12832
|
value: f.cardholderName,
|
|
12829
12833
|
onChange: (T) => x("cardholderName")(T.target.value),
|
|
12830
12834
|
onBlur: D("cardholderName"),
|
|
12831
|
-
status:
|
|
12835
|
+
status: C("cardholderName"),
|
|
12832
12836
|
disabled: n || a,
|
|
12833
12837
|
name: "cardholderName"
|
|
12834
12838
|
}
|
|
@@ -12845,7 +12849,7 @@ function Tp({
|
|
|
12845
12849
|
value: f.cardNumber,
|
|
12846
12850
|
onAccept: (T) => x("cardNumber")(T),
|
|
12847
12851
|
onBlur: D("cardNumber"),
|
|
12848
|
-
variant:
|
|
12852
|
+
variant: C("cardNumber") === "error" ? "error" : "default",
|
|
12849
12853
|
disabled: n || a
|
|
12850
12854
|
}
|
|
12851
12855
|
),
|
|
@@ -12862,7 +12866,7 @@ function Tp({
|
|
|
12862
12866
|
value: f.expiryDate,
|
|
12863
12867
|
onAccept: (T) => x("expiryDate")(T),
|
|
12864
12868
|
onBlur: D("expiryDate"),
|
|
12865
|
-
variant:
|
|
12869
|
+
variant: C("expiryDate") === "error" ? "error" : "default",
|
|
12866
12870
|
disabled: n || a
|
|
12867
12871
|
}
|
|
12868
12872
|
),
|
|
@@ -12880,7 +12884,7 @@ function Tp({
|
|
|
12880
12884
|
value: f.cvv,
|
|
12881
12885
|
onChange: (T) => x("cvv")(T.target.value.replace(/\D/g, "")),
|
|
12882
12886
|
onBlur: D("cvv"),
|
|
12883
|
-
status:
|
|
12887
|
+
status: C("cvv"),
|
|
12884
12888
|
disabled: n || a,
|
|
12885
12889
|
name: "cvv"
|
|
12886
12890
|
}
|
|
@@ -12912,7 +12916,7 @@ function Tp({
|
|
|
12912
12916
|
disabled: n || a
|
|
12913
12917
|
}
|
|
12914
12918
|
) }),
|
|
12915
|
-
|
|
12919
|
+
w && /* @__PURE__ */ e("div", { className: "gloss-payment-form__form-error", children: w }),
|
|
12916
12920
|
/* @__PURE__ */ d("div", { className: "gloss-payment-form__actions", children: [
|
|
12917
12921
|
c && /* @__PURE__ */ e(
|
|
12918
12922
|
Ie,
|
|
@@ -13216,26 +13220,26 @@ function Ju(r) {
|
|
|
13216
13220
|
Ju.displayName = "OrderFilterBar";
|
|
13217
13221
|
const Qu = {
|
|
13218
13222
|
default: {
|
|
13219
|
-
fillBg:
|
|
13220
|
-
trackBg:
|
|
13223
|
+
fillBg: B.BrandPrimary,
|
|
13224
|
+
trackBg: B.Gray200,
|
|
13221
13225
|
height: "8px",
|
|
13222
13226
|
radius: Se.Full
|
|
13223
13227
|
},
|
|
13224
13228
|
success: {
|
|
13225
|
-
fillBg:
|
|
13226
|
-
trackBg:
|
|
13229
|
+
fillBg: B.Green600,
|
|
13230
|
+
trackBg: B.Green50,
|
|
13227
13231
|
height: "8px",
|
|
13228
13232
|
radius: Se.Full
|
|
13229
13233
|
},
|
|
13230
13234
|
warning: {
|
|
13231
|
-
fillBg:
|
|
13232
|
-
trackBg:
|
|
13235
|
+
fillBg: B.Amber600,
|
|
13236
|
+
trackBg: B.Amber100,
|
|
13233
13237
|
height: "8px",
|
|
13234
13238
|
radius: Se.Full
|
|
13235
13239
|
},
|
|
13236
13240
|
error: {
|
|
13237
|
-
fillBg:
|
|
13238
|
-
trackBg:
|
|
13241
|
+
fillBg: B.Red600,
|
|
13242
|
+
trackBg: B.Red50,
|
|
13239
13243
|
height: "8px",
|
|
13240
13244
|
radius: Se.Full
|
|
13241
13245
|
}
|
|
@@ -13299,12 +13303,12 @@ function tm(r) {
|
|
|
13299
13303
|
progress: c,
|
|
13300
13304
|
className: l
|
|
13301
13305
|
} = r, [u, p] = H(0), [m, f] = H([]), [y, b] = H([]), [_, v] = H(null), h = N(
|
|
13302
|
-
(
|
|
13303
|
-
f(
|
|
13306
|
+
(S) => {
|
|
13307
|
+
f(S), v(null), S.length > 0 && a && a([]);
|
|
13304
13308
|
},
|
|
13305
13309
|
[a]
|
|
13306
13310
|
), k = N(
|
|
13307
|
-
(
|
|
13311
|
+
(S) => S === 0 && m.length === 0 ? (v("Please upload a file to continue."), !1) : !0,
|
|
13308
13312
|
[m]
|
|
13309
13313
|
), E = N(async () => {
|
|
13310
13314
|
try {
|
|
@@ -13312,8 +13316,8 @@ function tm(r) {
|
|
|
13312
13316
|
} catch {
|
|
13313
13317
|
v("Import failed. Check your file format and try again.");
|
|
13314
13318
|
}
|
|
13315
|
-
}, [i, y]),
|
|
13316
|
-
return /* @__PURE__ */ d("div", { className:
|
|
13319
|
+
}, [i, y]), w = ["gloss-import-wizard", l].filter(Boolean).join(" ");
|
|
13320
|
+
return /* @__PURE__ */ d("div", { className: w, children: [
|
|
13317
13321
|
/* @__PURE__ */ e(
|
|
13318
13322
|
Wn,
|
|
13319
13323
|
{
|
|
@@ -13321,8 +13325,8 @@ function tm(r) {
|
|
|
13321
13325
|
activeStep: u,
|
|
13322
13326
|
onStepChange: p,
|
|
13323
13327
|
onStepValidate: k,
|
|
13324
|
-
contentSlot: (
|
|
13325
|
-
switch (
|
|
13328
|
+
contentSlot: (S) => {
|
|
13329
|
+
switch (S) {
|
|
13326
13330
|
case 0:
|
|
13327
13331
|
return /* @__PURE__ */ e("div", { className: "gloss-import-wizard__upload-zone", children: /* @__PURE__ */ e(
|
|
13328
13332
|
bn,
|