@mt-gloss/ui 0.0.20 → 0.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{Expandable-hoPnf93I.js → Expandable-yVIypRqF.js} +4827 -4747
- package/catalog.js +2 -2
- package/index.js +614 -608
- package/lib/composites/controls/ThresholdRamp/ThresholdRamp.d.ts +10 -1
- package/lib/primitives/dashboard/MetricCard/GutterActions.d.ts +24 -1
- package/lib/primitives/dashboard/MetricCard/StackedGroupCard.d.ts +20 -1
- package/lib/primitives/dashboard/MetricCard/overflowMenuRegistry.d.ts +25 -0
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { N as oa, T as sa, O as ia, Q as la, b2 as da, av as ca, ad as ua, Z as ma, aj as pa, K as ga, a4 as ba, bl as fa, P as ha, B as va, a as ya, y as Ca, H as wa, be as Da, F as Na, J as Sa, A as ka, z as xa, bd as Ta, E as Ia, D as Ra, bu as _a, b as Ma, C as Pa, L as Fa, o as Ea, a9 as Oa, aJ as Aa, y as La, H as $a, F as Ba, J as Ka, A as Ga, z as Ha, E as za, D as
|
|
2
|
-
import { jsxs as A, jsx as
|
|
3
|
-
import F, { useRef as
|
|
4
|
-
import { B as Ce, U as
|
|
1
|
+
import { N as oa, T as sa, O as ia, Q as la, b2 as da, av as ca, ad as ua, Z as ma, aj as pa, K as ga, a4 as ba, bl as fa, P as ha, B as va, a as ya, y as Ca, H as wa, be as Da, F as Na, J as Sa, A as ka, z as xa, bd as Ta, E as Ia, D as Ra, bu as _a, b as Ma, C as Pa, L as Fa, o as Ea, a9 as Oa, aJ as Aa, y as La, H as $a, F as Ba, J as Ka, A as Ga, z as Ha, E as za, D as Va, aX as Za, a_ as Wa, aZ as Ya, aY as qa, a$ as Ua, ay as ja, am as Qa, k as Xa, m as Ja, aB as er, a7 as tr, b4 as ar, a5 as rr, bm as nr, Y as or, bE as sr, bD as ir, bF as lr, al as dr, aM as cr, b6 as ur, bJ as mr, bs as pr, n as gr, ai as br, by as fr, bp as hr, a0 as vr, an as yr, a2 as Cr, bx as wr, G as Dr, d as Nr, bg as Sr, a6 as kr, bG as xr, aP as Tr, r as Ir, v as Rr, I as _r, g as Mr, as as Pr, bK as Fr, M as Er, w as Or, U as Ar, X as Lr, V as $r, W as Br, ao as Kr, bc as Gr, bM as Hr, bI as zr, ak as Vr, t as Zr, bn as Wr, aO as Yr, af as qr, aG as Ur, ac as jr, ah as Qr, aq as Xr, aN as Jr, a8 as en, ap as tn, c as an, R as rn, j as nn, p as on, aD as sn, bv as ln, bw as dn, ae as cn, aa as un, h as mn, x as pn, b3 as gn, ab as bn, bL as fn, b8 as hn, bb as vn, b9 as yn, ba as Cn, i as wn, b5 as Dn, bk as Nn, S as Sn, bh as kn, bi as xn, ar as Tn, b7 as In, bN as Rn, ag as _n, s as Mn, bH as Pn, l as Fn, f as En, q as On, _ as An, $ as Ln, a3 as $n, bf as Bn, bt as Kn, bA as Gn, aw as Hn, ax as zn, aK as Vn, aL as Zn, az as Wn, aA as Yn, aC as qn, aR as Un, aS as jn, bC as Qn, bB as Xn, aU as Jn, aV as eo, at as to, au as ao, b1 as ro, b0 as no, aW as oo, aH as so, aI as io, aT as lo, aE as co, aF as uo, u as mo, bz as po, bo as go, bq as bo, br as fo, aQ as ho, a1 as vo, e as yo, bj as Co } from "./Expandable-yVIypRqF.js";
|
|
2
|
+
import { jsxs as A, jsx as g } from "react/jsx-runtime";
|
|
3
|
+
import F, { useRef as M, useEffect as P, useState as O, useCallback as y, forwardRef as he, useMemo as ie, createContext as ve, useContext as ye } from "react";
|
|
4
|
+
import { B as Ce, U as ee } from "./UIContext-C3E-k7HI.js";
|
|
5
5
|
import { a as Do, u as No } from "./UIContext-C3E-k7HI.js";
|
|
6
6
|
import { createPortal as we } from "react-dom";
|
|
7
7
|
import { DEFAULT_MARKET_PRESETS as ko, DEFAULT_PINNED as xo, PERIOD_OPTIONS as To, ROLLING_OPTIONS as Io, TODAY_PRESET as Ro, findPreset as _o, formatDateRange as Mo, formatMarketDates as Po, formatTrend as Fo, formatValue as Eo, generateMarketId as Oo, getAllPresets as Ao, getDateRangeForPreset as Lo, getPresetLabel as $o, isInRange as Bo, isMarketActive as Ko, isSameDay as Go, normalizePresetId as Ho, toUppercasePresetId as zo } from "@mt-gloss/utils";
|
|
8
8
|
function gt(e = {}) {
|
|
9
|
-
const { enabled: t = !0, returnTo:
|
|
9
|
+
const { enabled: t = !0, returnTo: n } = e, a = M(null);
|
|
10
10
|
return P(() => {
|
|
11
|
-
t && (a.current =
|
|
12
|
-
}, [t,
|
|
11
|
+
t && (a.current = n || document.activeElement);
|
|
12
|
+
}, [t, n]), P(() => () => {
|
|
13
13
|
t && a.current && setTimeout(() => {
|
|
14
14
|
a.current?.focus?.();
|
|
15
15
|
}, 0);
|
|
@@ -18,125 +18,125 @@ function gt(e = {}) {
|
|
|
18
18
|
function bt(e) {
|
|
19
19
|
const {
|
|
20
20
|
items: t,
|
|
21
|
-
activeIndex:
|
|
21
|
+
activeIndex: n,
|
|
22
22
|
onActiveIndexChange: a,
|
|
23
|
-
loop:
|
|
23
|
+
loop: o = !0,
|
|
24
24
|
orientation: s = "vertical",
|
|
25
25
|
enabled: i = !0,
|
|
26
|
-
isItemDisabled:
|
|
27
|
-
onSelect:
|
|
28
|
-
onEscape:
|
|
29
|
-
} = e, [
|
|
30
|
-
(
|
|
31
|
-
|
|
26
|
+
isItemDisabled: l,
|
|
27
|
+
onSelect: f,
|
|
28
|
+
onEscape: d
|
|
29
|
+
} = e, [D, N] = O(-1), u = n !== void 0 ? n : D, m = y(
|
|
30
|
+
(r) => {
|
|
31
|
+
n === void 0 && N(r), a?.(r);
|
|
32
32
|
},
|
|
33
|
-
[
|
|
34
|
-
), S =
|
|
35
|
-
(
|
|
36
|
-
const
|
|
37
|
-
if (
|
|
38
|
-
const
|
|
39
|
-
if (
|
|
40
|
-
return
|
|
41
|
-
let
|
|
42
|
-
return
|
|
33
|
+
[n, a]
|
|
34
|
+
), S = y(() => t.map((r, c) => ({ item: r, index: c })).filter(({ item: r, index: c }) => !l?.(r, c)).map(({ index: r }) => r), [t, l]), R = y(
|
|
35
|
+
(r, c) => {
|
|
36
|
+
const b = S();
|
|
37
|
+
if (b.length === 0) return -1;
|
|
38
|
+
const C = b.indexOf(r);
|
|
39
|
+
if (C === -1)
|
|
40
|
+
return c === 1 ? b.find((I) => I > r) ?? (o ? b[0] : -1) : [...b].reverse().find((_) => _ < r) ?? (o ? b[b.length - 1] : -1);
|
|
41
|
+
let w = C + c;
|
|
42
|
+
return o ? w = (w + b.length) % b.length : w = Math.max(0, Math.min(b.length - 1, w)), b[w];
|
|
43
43
|
},
|
|
44
|
-
[S,
|
|
45
|
-
),
|
|
46
|
-
const
|
|
47
|
-
|
|
48
|
-
}, [S,
|
|
49
|
-
const
|
|
50
|
-
|
|
51
|
-
}, [S,
|
|
52
|
-
const
|
|
53
|
-
|
|
54
|
-
}, [
|
|
55
|
-
const
|
|
56
|
-
|
|
57
|
-
}, [
|
|
58
|
-
|
|
59
|
-
}, [
|
|
60
|
-
(
|
|
44
|
+
[S, o]
|
|
45
|
+
), p = y(() => {
|
|
46
|
+
const r = S();
|
|
47
|
+
r.length > 0 && m(r[0]);
|
|
48
|
+
}, [S, m]), x = y(() => {
|
|
49
|
+
const r = S();
|
|
50
|
+
r.length > 0 && m(r[r.length - 1]);
|
|
51
|
+
}, [S, m]), T = y(() => {
|
|
52
|
+
const r = R(u, 1);
|
|
53
|
+
r !== -1 && m(r);
|
|
54
|
+
}, [u, R, m]), v = y(() => {
|
|
55
|
+
const r = R(u, -1);
|
|
56
|
+
r !== -1 && m(r);
|
|
57
|
+
}, [u, R, m]), k = y(() => {
|
|
58
|
+
m(-1);
|
|
59
|
+
}, [m]), h = y(
|
|
60
|
+
(r) => {
|
|
61
61
|
if (!i) return;
|
|
62
|
-
const { key:
|
|
63
|
-
if (
|
|
64
|
-
|
|
62
|
+
const { key: c } = r, b = c === "ArrowUp" && (s === "vertical" || s === "both"), C = c === "ArrowDown" && (s === "vertical" || s === "both"), w = c === "ArrowLeft" && (s === "horizontal" || s === "both"), I = c === "ArrowRight" && (s === "horizontal" || s === "both");
|
|
63
|
+
if (b || w) {
|
|
64
|
+
r.preventDefault(), u === -1 ? x() : v();
|
|
65
65
|
return;
|
|
66
66
|
}
|
|
67
|
-
if (
|
|
68
|
-
|
|
67
|
+
if (C || I) {
|
|
68
|
+
r.preventDefault(), u === -1 ? p() : T();
|
|
69
69
|
return;
|
|
70
70
|
}
|
|
71
|
-
if (
|
|
72
|
-
|
|
71
|
+
if (c === "Home") {
|
|
72
|
+
r.preventDefault(), p();
|
|
73
73
|
return;
|
|
74
74
|
}
|
|
75
|
-
if (
|
|
76
|
-
|
|
75
|
+
if (c === "End") {
|
|
76
|
+
r.preventDefault(), x();
|
|
77
77
|
return;
|
|
78
78
|
}
|
|
79
|
-
if ((
|
|
80
|
-
|
|
81
|
-
const
|
|
82
|
-
|
|
79
|
+
if ((c === "Enter" || c === " ") && u >= 0 && u < t.length) {
|
|
80
|
+
r.preventDefault();
|
|
81
|
+
const _ = t[u];
|
|
82
|
+
l?.(_, u) || f?.(_, u);
|
|
83
83
|
return;
|
|
84
84
|
}
|
|
85
|
-
if (
|
|
86
|
-
|
|
85
|
+
if (c === "Escape") {
|
|
86
|
+
d?.();
|
|
87
87
|
return;
|
|
88
88
|
}
|
|
89
89
|
},
|
|
90
90
|
[
|
|
91
91
|
i,
|
|
92
92
|
s,
|
|
93
|
-
|
|
93
|
+
u,
|
|
94
94
|
t,
|
|
95
|
-
|
|
95
|
+
p,
|
|
96
96
|
x,
|
|
97
|
-
|
|
97
|
+
T,
|
|
98
|
+
v,
|
|
98
99
|
l,
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
u
|
|
100
|
+
f,
|
|
101
|
+
d
|
|
102
102
|
]
|
|
103
103
|
);
|
|
104
104
|
return {
|
|
105
|
-
focusedIndex:
|
|
106
|
-
setFocusedIndex:
|
|
107
|
-
handleKeyDown:
|
|
108
|
-
focusFirst:
|
|
105
|
+
focusedIndex: u,
|
|
106
|
+
setFocusedIndex: m,
|
|
107
|
+
handleKeyDown: h,
|
|
108
|
+
focusFirst: p,
|
|
109
109
|
focusLast: x,
|
|
110
|
-
focusNext:
|
|
111
|
-
focusPrevious:
|
|
112
|
-
resetFocus:
|
|
110
|
+
focusNext: T,
|
|
111
|
+
focusPrevious: v,
|
|
112
|
+
resetFocus: k
|
|
113
113
|
};
|
|
114
114
|
}
|
|
115
|
-
const
|
|
115
|
+
const Z = (e) => {
|
|
116
116
|
}, De = {
|
|
117
117
|
id: "entity-filter-1",
|
|
118
118
|
label: "Customer: Acme Corp",
|
|
119
119
|
field: "customer",
|
|
120
120
|
value: "acme-corp-123",
|
|
121
|
-
onRemove:
|
|
121
|
+
onRemove: Z
|
|
122
122
|
}, Ne = {
|
|
123
123
|
id: "status-filter-1",
|
|
124
124
|
label: "Status: Open",
|
|
125
125
|
field: "status",
|
|
126
126
|
value: "open",
|
|
127
|
-
onRemove:
|
|
127
|
+
onRemove: Z
|
|
128
128
|
}, Se = {
|
|
129
129
|
id: "date-filter-1",
|
|
130
130
|
label: "Date: Mar 1 - Mar 15",
|
|
131
131
|
field: "dateRange",
|
|
132
132
|
value: "2026-03-01..2026-03-15",
|
|
133
|
-
onRemove:
|
|
133
|
+
onRemove: Z
|
|
134
134
|
}, ke = {
|
|
135
135
|
id: "mfg-filter-1",
|
|
136
136
|
label: "Manufacturer: Widget Co",
|
|
137
137
|
field: "manufacturer",
|
|
138
138
|
value: "widget-co-456",
|
|
139
|
-
onRemove:
|
|
139
|
+
onRemove: Z
|
|
140
140
|
}, ft = [
|
|
141
141
|
De,
|
|
142
142
|
Ne,
|
|
@@ -187,7 +187,7 @@ const z = (e) => {
|
|
|
187
187
|
{ variant: "value", colSpan: 1 },
|
|
188
188
|
{ variant: "trend", colSpan: 2 },
|
|
189
189
|
{ variant: "target", colSpan: 1 }
|
|
190
|
-
],
|
|
190
|
+
], re = {
|
|
191
191
|
position: "fixed",
|
|
192
192
|
zIndex: 9999,
|
|
193
193
|
background: "rgba(255,255,255,0.92)",
|
|
@@ -199,7 +199,7 @@ const z = (e) => {
|
|
|
199
199
|
minWidth: 148,
|
|
200
200
|
paddingTop: 4,
|
|
201
201
|
paddingBottom: 4
|
|
202
|
-
},
|
|
202
|
+
}, U = (e) => ({
|
|
203
203
|
padding: "6px 12px",
|
|
204
204
|
fontSize: 12,
|
|
205
205
|
lineHeight: 1.4,
|
|
@@ -214,7 +214,7 @@ const z = (e) => {
|
|
|
214
214
|
textAlign: "left",
|
|
215
215
|
border: "none"
|
|
216
216
|
}), xe = (e) => ({
|
|
217
|
-
...
|
|
217
|
+
...U(e),
|
|
218
218
|
color: e ? "#4338ca" : "#4f46e5",
|
|
219
219
|
fontWeight: 600
|
|
220
220
|
}), Te = {
|
|
@@ -225,123 +225,123 @@ const z = (e) => {
|
|
|
225
225
|
function Ie({
|
|
226
226
|
open: e,
|
|
227
227
|
anchorEl: t,
|
|
228
|
-
statusId:
|
|
228
|
+
statusId: n,
|
|
229
229
|
onOpenInTable: a,
|
|
230
|
-
onShowOnGraph:
|
|
230
|
+
onShowOnGraph: o,
|
|
231
231
|
overflowActions: s,
|
|
232
232
|
onClose: i
|
|
233
233
|
}) {
|
|
234
|
-
const [
|
|
235
|
-
if (!t) return { ...
|
|
236
|
-
const
|
|
234
|
+
const [l, f] = O(null), d = M(null), D = y(() => {
|
|
235
|
+
if (!t) return { ...re, top: 0, left: 0 };
|
|
236
|
+
const m = t.getBoundingClientRect();
|
|
237
237
|
return {
|
|
238
|
-
...
|
|
239
|
-
top:
|
|
240
|
-
left:
|
|
238
|
+
...re,
|
|
239
|
+
top: m.bottom + 4,
|
|
240
|
+
left: m.left
|
|
241
241
|
};
|
|
242
242
|
}, [t]);
|
|
243
243
|
if (P(() => {
|
|
244
244
|
if (!e) return;
|
|
245
|
-
const
|
|
245
|
+
const m = (S) => {
|
|
246
246
|
S.key === "Escape" && i();
|
|
247
247
|
};
|
|
248
|
-
return document.addEventListener("keydown",
|
|
248
|
+
return document.addEventListener("keydown", m), () => document.removeEventListener("keydown", m);
|
|
249
249
|
}, [e, i]), P(() => {
|
|
250
250
|
if (!e) return;
|
|
251
|
-
const
|
|
252
|
-
|
|
251
|
+
const m = (S) => {
|
|
252
|
+
d.current && !d.current.contains(S.target) && i();
|
|
253
253
|
};
|
|
254
|
-
return document.addEventListener("pointerdown",
|
|
254
|
+
return document.addEventListener("pointerdown", m, !0), () => document.removeEventListener("pointerdown", m, !0);
|
|
255
255
|
}, [e, i]), !e) return null;
|
|
256
|
-
const N = s && s.length > 0,
|
|
256
|
+
const N = s && s.length > 0, u = /* @__PURE__ */ A(
|
|
257
257
|
"div",
|
|
258
258
|
{
|
|
259
|
-
ref:
|
|
260
|
-
"data-status-chip-menu":
|
|
259
|
+
ref: d,
|
|
260
|
+
"data-status-chip-menu": n,
|
|
261
261
|
role: "menu",
|
|
262
262
|
"aria-label": "Status actions",
|
|
263
|
-
style:
|
|
263
|
+
style: D(),
|
|
264
264
|
children: [
|
|
265
|
-
/* @__PURE__ */
|
|
265
|
+
/* @__PURE__ */ g(
|
|
266
266
|
"button",
|
|
267
267
|
{
|
|
268
268
|
role: "menuitem",
|
|
269
|
-
style: xe(
|
|
270
|
-
onMouseEnter: () =>
|
|
271
|
-
onMouseLeave: () =>
|
|
269
|
+
style: xe(l === "__primary"),
|
|
270
|
+
onMouseEnter: () => f("__primary"),
|
|
271
|
+
onMouseLeave: () => f(null),
|
|
272
272
|
onClick: () => {
|
|
273
|
-
a(
|
|
273
|
+
a(n), i();
|
|
274
274
|
},
|
|
275
275
|
children: "Open in table"
|
|
276
276
|
}
|
|
277
277
|
),
|
|
278
|
-
/* @__PURE__ */
|
|
278
|
+
/* @__PURE__ */ g(
|
|
279
279
|
"button",
|
|
280
280
|
{
|
|
281
281
|
role: "menuitem",
|
|
282
|
-
style:
|
|
283
|
-
onMouseEnter: () =>
|
|
284
|
-
onMouseLeave: () =>
|
|
282
|
+
style: U(l === "__graph"),
|
|
283
|
+
onMouseEnter: () => f("__graph"),
|
|
284
|
+
onMouseLeave: () => f(null),
|
|
285
285
|
onClick: () => {
|
|
286
|
-
n
|
|
286
|
+
o(n), i();
|
|
287
287
|
},
|
|
288
288
|
children: "Show on graph"
|
|
289
289
|
}
|
|
290
290
|
),
|
|
291
|
-
N && /* @__PURE__ */
|
|
292
|
-
N && s?.map((
|
|
291
|
+
N && /* @__PURE__ */ g("div", { style: Te }),
|
|
292
|
+
N && s?.map((m) => /* @__PURE__ */ g(
|
|
293
293
|
"button",
|
|
294
294
|
{
|
|
295
295
|
role: "menuitem",
|
|
296
|
-
style:
|
|
297
|
-
onMouseEnter: () =>
|
|
298
|
-
onMouseLeave: () =>
|
|
296
|
+
style: U(l === m.id),
|
|
297
|
+
onMouseEnter: () => f(m.id),
|
|
298
|
+
onMouseLeave: () => f(null),
|
|
299
299
|
onClick: () => {
|
|
300
|
-
|
|
300
|
+
m.onSelect(n), i();
|
|
301
301
|
},
|
|
302
|
-
children:
|
|
302
|
+
children: m.label
|
|
303
303
|
},
|
|
304
|
-
|
|
304
|
+
m.id
|
|
305
305
|
))
|
|
306
306
|
]
|
|
307
307
|
}
|
|
308
308
|
);
|
|
309
|
-
return we(
|
|
309
|
+
return we(u, document.body);
|
|
310
310
|
}
|
|
311
311
|
Ie.displayName = "StatusSlotChipMenu";
|
|
312
312
|
const Re = he(
|
|
313
|
-
function({ state: t, onPointerDown:
|
|
314
|
-
const
|
|
313
|
+
function({ state: t, onPointerDown: n, onPointerUp: a, onPointerEnter: o, onPointerLeave: s, edge: i = "right", ariaLabel: l = "Resize card" }, f) {
|
|
314
|
+
const d = t === "handle-visible" || t === "dragging", D = (u) => {
|
|
315
315
|
try {
|
|
316
|
-
|
|
316
|
+
u.currentTarget.setPointerCapture(u.pointerId);
|
|
317
317
|
} catch {
|
|
318
318
|
}
|
|
319
|
-
|
|
320
|
-
}, N = (
|
|
319
|
+
n(u);
|
|
320
|
+
}, N = (u) => {
|
|
321
321
|
try {
|
|
322
|
-
|
|
322
|
+
u.currentTarget.hasPointerCapture?.(u.pointerId) && u.currentTarget.releasePointerCapture(u.pointerId);
|
|
323
323
|
} catch {
|
|
324
324
|
}
|
|
325
|
-
a(
|
|
325
|
+
a(u);
|
|
326
326
|
};
|
|
327
|
-
return /* @__PURE__ */
|
|
327
|
+
return /* @__PURE__ */ g(
|
|
328
328
|
"button",
|
|
329
329
|
{
|
|
330
|
-
ref:
|
|
330
|
+
ref: f,
|
|
331
331
|
type: "button",
|
|
332
|
-
"aria-label":
|
|
332
|
+
"aria-label": l,
|
|
333
333
|
"data-edge": i,
|
|
334
334
|
"data-resize-state": t,
|
|
335
335
|
className: [
|
|
336
336
|
"gloss-edge-handle",
|
|
337
337
|
`gloss-edge-handle--${i}`,
|
|
338
|
-
|
|
338
|
+
d ? "gloss-edge-handle--visible" : ""
|
|
339
339
|
].filter(Boolean).join(" "),
|
|
340
|
-
onPointerDown:
|
|
340
|
+
onPointerDown: D,
|
|
341
341
|
onPointerUp: N,
|
|
342
|
-
onPointerEnter:
|
|
342
|
+
onPointerEnter: o,
|
|
343
343
|
onPointerLeave: s,
|
|
344
|
-
tabIndex:
|
|
344
|
+
tabIndex: d ? 0 : -1
|
|
345
345
|
}
|
|
346
346
|
);
|
|
347
347
|
}
|
|
@@ -350,10 +350,10 @@ Re.displayName = "EdgeHoverHandle";
|
|
|
350
350
|
function _e({
|
|
351
351
|
visible: e,
|
|
352
352
|
targetColSpan: t,
|
|
353
|
-
enterMs:
|
|
353
|
+
enterMs: n = 180,
|
|
354
354
|
exitMs: a = 120
|
|
355
355
|
}) {
|
|
356
|
-
return /* @__PURE__ */
|
|
356
|
+
return /* @__PURE__ */ g(
|
|
357
357
|
"div",
|
|
358
358
|
{
|
|
359
359
|
"aria-hidden": "true",
|
|
@@ -363,7 +363,7 @@ function _e({
|
|
|
363
363
|
"gloss-ghost-preview",
|
|
364
364
|
e ? "gloss-ghost-preview--visible" : ""
|
|
365
365
|
].filter(Boolean).join(" "),
|
|
366
|
-
style: { transitionDuration: `${e ?
|
|
366
|
+
style: { transitionDuration: `${e ? n : a}ms` }
|
|
367
367
|
}
|
|
368
368
|
);
|
|
369
369
|
}
|
|
@@ -371,77 +371,77 @@ _e.displayName = "GhostPreview";
|
|
|
371
371
|
function xt({
|
|
372
372
|
currentColSpan: e,
|
|
373
373
|
stackable: t,
|
|
374
|
-
onResize:
|
|
374
|
+
onResize: n,
|
|
375
375
|
onCancel: a,
|
|
376
|
-
dwellMs:
|
|
376
|
+
dwellMs: o = 120,
|
|
377
377
|
enterMs: s = 180,
|
|
378
378
|
exitMs: i = 120
|
|
379
379
|
}) {
|
|
380
|
-
const [
|
|
380
|
+
const [l, f] = O("idle"), [d, D] = O(e), N = M(null), u = M(null), m = M("idle");
|
|
381
381
|
P(() => {
|
|
382
|
-
|
|
383
|
-
}, [
|
|
384
|
-
const S = 180,
|
|
382
|
+
m.current = l;
|
|
383
|
+
}, [l]);
|
|
384
|
+
const S = 180, R = y(() => {
|
|
385
385
|
N.current && (clearTimeout(N.current), N.current = null);
|
|
386
|
-
}, []),
|
|
387
|
-
|
|
388
|
-
}, [
|
|
389
|
-
|
|
390
|
-
}, [
|
|
391
|
-
(
|
|
392
|
-
|
|
386
|
+
}, []), p = y(() => {
|
|
387
|
+
f((h) => h !== "idle" ? h : (N.current = setTimeout(() => f("handle-visible"), o), "dwelling"));
|
|
388
|
+
}, [o]), x = y(() => {
|
|
389
|
+
R(), f((h) => h === "dwelling" || h === "handle-visible" ? "idle" : h);
|
|
390
|
+
}, [R]), T = y(
|
|
391
|
+
(h) => {
|
|
392
|
+
m.current === "handle-visible" && (u.current = h.clientX, m.current = "dragging", f("dragging"));
|
|
393
393
|
},
|
|
394
394
|
[]
|
|
395
|
-
),
|
|
396
|
-
(
|
|
397
|
-
if (
|
|
398
|
-
const
|
|
399
|
-
if (
|
|
400
|
-
const
|
|
401
|
-
|
|
395
|
+
), v = y(
|
|
396
|
+
(h) => {
|
|
397
|
+
if (m.current !== "dragging") return;
|
|
398
|
+
const r = h.clientX - (u.current ?? h.clientX), c = Math.round(r / S), b = Math.min(3, Math.max(1, e + c)), C = b !== e;
|
|
399
|
+
if (f(C ? "committed" : "cancelled"), C) {
|
|
400
|
+
const w = b > e ? "grow" : "shrink";
|
|
401
|
+
n({ direction: w, targetColSpan: b, mode: t ? "slot-fill" : "sparkline-fidelity" });
|
|
402
402
|
} else
|
|
403
403
|
a?.();
|
|
404
404
|
},
|
|
405
|
-
[e, t,
|
|
406
|
-
),
|
|
407
|
-
|
|
408
|
-
}, [
|
|
405
|
+
[e, t, n, a]
|
|
406
|
+
), k = y(() => {
|
|
407
|
+
R(), f((h) => h === "dragging" || h === "handle-visible" ? (a?.(), "cancelled") : h);
|
|
408
|
+
}, [R, a]);
|
|
409
409
|
return P(() => {
|
|
410
|
-
if (
|
|
411
|
-
const
|
|
412
|
-
|
|
410
|
+
if (l !== "dragging" && l !== "handle-visible") return;
|
|
411
|
+
const h = (r) => {
|
|
412
|
+
r.key === "Escape" && k();
|
|
413
413
|
};
|
|
414
|
-
return window.addEventListener("keydown",
|
|
415
|
-
}, [
|
|
416
|
-
if (
|
|
417
|
-
|
|
414
|
+
return window.addEventListener("keydown", h), () => window.removeEventListener("keydown", h);
|
|
415
|
+
}, [l, k]), P(() => {
|
|
416
|
+
if (l !== "dragging") {
|
|
417
|
+
D(e);
|
|
418
418
|
return;
|
|
419
419
|
}
|
|
420
|
-
const
|
|
421
|
-
const
|
|
422
|
-
|
|
420
|
+
const h = (r) => {
|
|
421
|
+
const c = r.clientX - (u.current ?? r.clientX), b = Math.round(c / S), C = Math.min(3, Math.max(1, e + b));
|
|
422
|
+
D((w) => w === C ? w : C);
|
|
423
423
|
};
|
|
424
|
-
return window.addEventListener("pointermove",
|
|
425
|
-
}, [
|
|
426
|
-
if (
|
|
427
|
-
const
|
|
428
|
-
return () => clearTimeout(
|
|
429
|
-
}, [
|
|
430
|
-
state:
|
|
431
|
-
enterEdgeZone:
|
|
424
|
+
return window.addEventListener("pointermove", h), () => window.removeEventListener("pointermove", h);
|
|
425
|
+
}, [l, e]), P(() => () => R(), [R]), P(() => {
|
|
426
|
+
if (l !== "committed" && l !== "cancelled") return;
|
|
427
|
+
const h = setTimeout(() => f("idle"), i);
|
|
428
|
+
return () => clearTimeout(h);
|
|
429
|
+
}, [l, i]), {
|
|
430
|
+
state: l,
|
|
431
|
+
enterEdgeZone: p,
|
|
432
432
|
leaveEdgeZone: x,
|
|
433
433
|
handleProps: {
|
|
434
|
-
onPointerDown:
|
|
435
|
-
onPointerUp:
|
|
434
|
+
onPointerDown: T,
|
|
435
|
+
onPointerUp: v,
|
|
436
436
|
// Bug E: handle continues zone presence so pointer crossing sentinel→handle
|
|
437
437
|
// doesn't collapse state. handle's pointerenter = stay in zone.
|
|
438
|
-
onPointerEnter:
|
|
438
|
+
onPointerEnter: p,
|
|
439
439
|
onPointerLeave: x
|
|
440
440
|
},
|
|
441
|
-
previewColSpan:
|
|
441
|
+
previewColSpan: d,
|
|
442
442
|
ghostProps: {
|
|
443
|
-
visible:
|
|
444
|
-
targetColSpan:
|
|
443
|
+
visible: l === "dragging",
|
|
444
|
+
targetColSpan: d,
|
|
445
445
|
enterMs: s,
|
|
446
446
|
exitMs: i
|
|
447
447
|
}
|
|
@@ -687,31 +687,31 @@ const Tt = [
|
|
|
687
687
|
trend: { value: 0, direction: "flat" },
|
|
688
688
|
subtitle: "QTD"
|
|
689
689
|
};
|
|
690
|
-
function
|
|
690
|
+
function le({
|
|
691
691
|
open: e,
|
|
692
692
|
onDismiss: t,
|
|
693
|
-
anchorRef:
|
|
693
|
+
anchorRef: n,
|
|
694
694
|
pages: a,
|
|
695
|
-
activePageId:
|
|
695
|
+
activePageId: o,
|
|
696
696
|
onPageChange: s,
|
|
697
697
|
onCreatePage: i,
|
|
698
|
-
onManagePages:
|
|
698
|
+
onManagePages: l
|
|
699
699
|
}) {
|
|
700
|
-
const
|
|
701
|
-
(
|
|
702
|
-
s(
|
|
700
|
+
const f = y(
|
|
701
|
+
(u) => {
|
|
702
|
+
s(u), t();
|
|
703
703
|
},
|
|
704
704
|
[s, t]
|
|
705
|
-
),
|
|
706
|
-
(
|
|
707
|
-
(
|
|
705
|
+
), d = y(
|
|
706
|
+
(u, m) => {
|
|
707
|
+
(m.key === "Enter" || m.key === " ") && (m.preventDefault(), f(u));
|
|
708
708
|
},
|
|
709
|
-
[
|
|
710
|
-
),
|
|
709
|
+
[f]
|
|
710
|
+
), D = y(() => {
|
|
711
711
|
i(), t();
|
|
712
|
-
}, [i, t]), N =
|
|
713
|
-
|
|
714
|
-
}, [
|
|
712
|
+
}, [i, t]), N = y(() => {
|
|
713
|
+
l(), t();
|
|
714
|
+
}, [l, t]);
|
|
715
715
|
return /* @__PURE__ */ A(
|
|
716
716
|
Ce,
|
|
717
717
|
{
|
|
@@ -723,53 +723,53 @@ function ie({
|
|
|
723
723
|
},
|
|
724
724
|
open: e,
|
|
725
725
|
onDismiss: t,
|
|
726
|
-
anchorRef:
|
|
726
|
+
anchorRef: n,
|
|
727
727
|
className: "gloss-page-dropdown",
|
|
728
728
|
children: [
|
|
729
|
-
/* @__PURE__ */
|
|
730
|
-
const
|
|
729
|
+
/* @__PURE__ */ g("ul", { role: "menu", className: "gloss-page-dropdown__list", children: a.map((u) => {
|
|
730
|
+
const m = u.id === o;
|
|
731
731
|
return /* @__PURE__ */ A(
|
|
732
732
|
"li",
|
|
733
733
|
{
|
|
734
734
|
role: "menuitemradio",
|
|
735
|
-
"aria-checked":
|
|
736
|
-
"aria-current":
|
|
735
|
+
"aria-checked": m,
|
|
736
|
+
"aria-current": m ? "page" : void 0,
|
|
737
737
|
tabIndex: 0,
|
|
738
|
-
className: `gloss-page-dropdown__item${
|
|
739
|
-
onClick: () =>
|
|
740
|
-
onKeyDown: (S) => u
|
|
738
|
+
className: `gloss-page-dropdown__item${m ? " gloss-page-dropdown__item--active" : ""}`,
|
|
739
|
+
onClick: () => f(u.id),
|
|
740
|
+
onKeyDown: (S) => d(u.id, S),
|
|
741
741
|
children: [
|
|
742
|
-
/* @__PURE__ */
|
|
742
|
+
/* @__PURE__ */ g(
|
|
743
743
|
"span",
|
|
744
744
|
{
|
|
745
|
-
className: `gloss-page-dropdown__dot${
|
|
745
|
+
className: `gloss-page-dropdown__dot${m ? " gloss-page-dropdown__dot--active" : ""}`
|
|
746
746
|
}
|
|
747
747
|
),
|
|
748
|
-
/* @__PURE__ */
|
|
748
|
+
/* @__PURE__ */ g(
|
|
749
749
|
"span",
|
|
750
750
|
{
|
|
751
|
-
className: `gloss-page-dropdown__name${
|
|
752
|
-
children:
|
|
751
|
+
className: `gloss-page-dropdown__name${u.named ? "" : " gloss-page-dropdown__name--unnamed"}`,
|
|
752
|
+
children: u.name
|
|
753
753
|
}
|
|
754
754
|
),
|
|
755
|
-
/* @__PURE__ */
|
|
755
|
+
/* @__PURE__ */ g("span", { className: "gloss-page-dropdown__count", children: u.cardCount })
|
|
756
756
|
]
|
|
757
757
|
},
|
|
758
|
-
|
|
758
|
+
u.id
|
|
759
759
|
);
|
|
760
760
|
}) }),
|
|
761
|
-
/* @__PURE__ */
|
|
762
|
-
/* @__PURE__ */
|
|
761
|
+
/* @__PURE__ */ g("hr", { className: "gloss-page-dropdown__separator" }),
|
|
762
|
+
/* @__PURE__ */ g(
|
|
763
763
|
"button",
|
|
764
764
|
{
|
|
765
765
|
role: "menuitem",
|
|
766
766
|
className: "gloss-page-dropdown__action",
|
|
767
|
-
onClick:
|
|
767
|
+
onClick: D,
|
|
768
768
|
children: "+ New page"
|
|
769
769
|
}
|
|
770
770
|
),
|
|
771
|
-
/* @__PURE__ */
|
|
772
|
-
/* @__PURE__ */
|
|
771
|
+
/* @__PURE__ */ g("hr", { className: "gloss-page-dropdown__separator" }),
|
|
772
|
+
/* @__PURE__ */ g(
|
|
773
773
|
"button",
|
|
774
774
|
{
|
|
775
775
|
role: "menuitem",
|
|
@@ -782,34 +782,34 @@ function ie({
|
|
|
782
782
|
}
|
|
783
783
|
);
|
|
784
784
|
}
|
|
785
|
-
|
|
785
|
+
le.displayName = "PageDropdown";
|
|
786
786
|
const Le = function({
|
|
787
787
|
currentIndex: t,
|
|
788
|
-
total:
|
|
788
|
+
total: n,
|
|
789
789
|
pages: a,
|
|
790
|
-
onPageChange:
|
|
790
|
+
onPageChange: o,
|
|
791
791
|
onCreatePage: s,
|
|
792
792
|
onManagePages: i,
|
|
793
|
-
maskRadius:
|
|
793
|
+
maskRadius: l = "var(--gloss-radius-md)"
|
|
794
794
|
}) {
|
|
795
|
-
const
|
|
796
|
-
|
|
797
|
-
}, []),
|
|
798
|
-
|
|
799
|
-
}, []),
|
|
795
|
+
const f = M(null), [d, D] = O(!1), N = y(() => {
|
|
796
|
+
D((S) => !S);
|
|
797
|
+
}, []), u = y(() => {
|
|
798
|
+
D(!1);
|
|
799
|
+
}, []), m = a[t]?.id ?? "";
|
|
800
800
|
return /* @__PURE__ */ A(
|
|
801
801
|
"div",
|
|
802
802
|
{
|
|
803
803
|
className: "gloss-page-chip",
|
|
804
|
-
ref:
|
|
804
|
+
ref: f,
|
|
805
805
|
style: { position: "absolute", top: 0, right: 0 },
|
|
806
806
|
"data-page-chip": !0,
|
|
807
807
|
children: [
|
|
808
|
-
/* @__PURE__ */
|
|
808
|
+
/* @__PURE__ */ g(
|
|
809
809
|
"div",
|
|
810
810
|
{
|
|
811
811
|
className: "gloss-page-chip__nuzzle",
|
|
812
|
-
style: { "--_nuzzle-r":
|
|
812
|
+
style: { "--_nuzzle-r": l }
|
|
813
813
|
}
|
|
814
814
|
),
|
|
815
815
|
/* @__PURE__ */ A(
|
|
@@ -817,25 +817,25 @@ const Le = function({
|
|
|
817
817
|
{
|
|
818
818
|
className: "gloss-page-chip__trigger",
|
|
819
819
|
"aria-haspopup": "menu",
|
|
820
|
-
"aria-expanded":
|
|
821
|
-
"aria-label": `Page ${t + 1} of ${
|
|
820
|
+
"aria-expanded": d,
|
|
821
|
+
"aria-label": `Page ${t + 1} of ${n}. Click to switch pages.`,
|
|
822
822
|
onClick: N,
|
|
823
823
|
children: [
|
|
824
824
|
t + 1,
|
|
825
825
|
" / ",
|
|
826
|
-
|
|
826
|
+
n
|
|
827
827
|
]
|
|
828
828
|
}
|
|
829
829
|
),
|
|
830
|
-
/* @__PURE__ */
|
|
831
|
-
|
|
830
|
+
/* @__PURE__ */ g(
|
|
831
|
+
le,
|
|
832
832
|
{
|
|
833
|
-
open:
|
|
834
|
-
onDismiss:
|
|
835
|
-
anchorRef:
|
|
833
|
+
open: d,
|
|
834
|
+
onDismiss: u,
|
|
835
|
+
anchorRef: f,
|
|
836
836
|
pages: a,
|
|
837
|
-
activePageId:
|
|
838
|
-
onPageChange:
|
|
837
|
+
activePageId: m,
|
|
838
|
+
onPageChange: o,
|
|
839
839
|
onCreatePage: s,
|
|
840
840
|
onManagePages: i
|
|
841
841
|
}
|
|
@@ -1112,16 +1112,16 @@ const Et = [
|
|
|
1112
1112
|
lastDate: "2026-03-01"
|
|
1113
1113
|
}
|
|
1114
1114
|
];
|
|
1115
|
-
function
|
|
1115
|
+
function j(e) {
|
|
1116
1116
|
return "$" + e.toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 2 });
|
|
1117
1117
|
}
|
|
1118
|
-
function
|
|
1118
|
+
function de(e) {
|
|
1119
1119
|
return e.toLocaleString("en-US");
|
|
1120
1120
|
}
|
|
1121
|
-
function
|
|
1121
|
+
function ce(e) {
|
|
1122
1122
|
return new Date(e).toLocaleDateString("en-US", { month: "short", day: "numeric", year: "numeric" });
|
|
1123
1123
|
}
|
|
1124
|
-
const
|
|
1124
|
+
const z = F.createElement("span", { style: { color: "var(--color-text-muted)" } }, "—"), At = [
|
|
1125
1125
|
{
|
|
1126
1126
|
field: "id",
|
|
1127
1127
|
headerName: "Order",
|
|
@@ -1151,7 +1151,7 @@ const G = F.createElement("span", { style: { color: "var(--color-text-muted)" }
|
|
|
1151
1151
|
align: "right",
|
|
1152
1152
|
headerAlign: "right",
|
|
1153
1153
|
cellClassName: "gloss-tabular-nums",
|
|
1154
|
-
renderCell: ({ row: e }) => e.skuCount ?
|
|
1154
|
+
renderCell: ({ row: e }) => e.skuCount ? de(e.skuCount) : z
|
|
1155
1155
|
},
|
|
1156
1156
|
{
|
|
1157
1157
|
field: "total",
|
|
@@ -1161,7 +1161,7 @@ const G = F.createElement("span", { style: { color: "var(--color-text-muted)" }
|
|
|
1161
1161
|
align: "right",
|
|
1162
1162
|
headerAlign: "right",
|
|
1163
1163
|
cellClassName: "gloss-tabular-nums",
|
|
1164
|
-
renderCell: ({ row: e }) => e.total ?
|
|
1164
|
+
renderCell: ({ row: e }) => e.total ? j(e.total) : z
|
|
1165
1165
|
},
|
|
1166
1166
|
{
|
|
1167
1167
|
field: "date",
|
|
@@ -1171,7 +1171,7 @@ const G = F.createElement("span", { style: { color: "var(--color-text-muted)" }
|
|
|
1171
1171
|
align: "right",
|
|
1172
1172
|
headerAlign: "right",
|
|
1173
1173
|
cellClassName: "gloss-tabular-nums",
|
|
1174
|
-
renderCell: ({ row: e }) => e.date ?
|
|
1174
|
+
renderCell: ({ row: e }) => e.date ? ce(e.date) : ""
|
|
1175
1175
|
}
|
|
1176
1176
|
], Lt = [
|
|
1177
1177
|
{
|
|
@@ -1205,7 +1205,7 @@ const G = F.createElement("span", { style: { color: "var(--color-text-muted)" }
|
|
|
1205
1205
|
align: "right",
|
|
1206
1206
|
headerAlign: "right",
|
|
1207
1207
|
cellClassName: "gloss-tabular-nums",
|
|
1208
|
-
renderCell: ({ row: e }) => e.price ?
|
|
1208
|
+
renderCell: ({ row: e }) => e.price ? j(e.price) : z
|
|
1209
1209
|
},
|
|
1210
1210
|
{
|
|
1211
1211
|
field: "quantity",
|
|
@@ -1215,7 +1215,7 @@ const G = F.createElement("span", { style: { color: "var(--color-text-muted)" }
|
|
|
1215
1215
|
align: "right",
|
|
1216
1216
|
headerAlign: "right",
|
|
1217
1217
|
cellClassName: "gloss-tabular-nums gloss-drillable",
|
|
1218
|
-
renderCell: ({ row: e }) => e.quantity ?
|
|
1218
|
+
renderCell: ({ row: e }) => e.quantity ? de(e.quantity) : z
|
|
1219
1219
|
},
|
|
1220
1220
|
{
|
|
1221
1221
|
field: "total",
|
|
@@ -1225,7 +1225,7 @@ const G = F.createElement("span", { style: { color: "var(--color-text-muted)" }
|
|
|
1225
1225
|
align: "right",
|
|
1226
1226
|
headerAlign: "right",
|
|
1227
1227
|
cellClassName: "gloss-tabular-nums gloss-drillable",
|
|
1228
|
-
renderCell: ({ row: e }) => e.total ?
|
|
1228
|
+
renderCell: ({ row: e }) => e.total ? j(e.total) : z
|
|
1229
1229
|
},
|
|
1230
1230
|
{
|
|
1231
1231
|
field: "lastDate",
|
|
@@ -1235,7 +1235,7 @@ const G = F.createElement("span", { style: { color: "var(--color-text-muted)" }
|
|
|
1235
1235
|
align: "right",
|
|
1236
1236
|
headerAlign: "right",
|
|
1237
1237
|
cellClassName: "gloss-tabular-nums",
|
|
1238
|
-
renderCell: ({ row: e }) => e.lastDate ?
|
|
1238
|
+
renderCell: ({ row: e }) => e.lastDate ? ce(e.lastDate) : ""
|
|
1239
1239
|
}
|
|
1240
1240
|
], $e = [
|
|
1241
1241
|
{ id: "c-001", label: "ABC Home Goods" },
|
|
@@ -1249,10 +1249,10 @@ const G = F.createElement("span", { style: { color: "var(--color-text-muted)" }
|
|
|
1249
1249
|
{ id: "i-003", label: "Walnut Console Table" },
|
|
1250
1250
|
{ id: "i-004", label: "Hand-Blown Glass Vase" },
|
|
1251
1251
|
{ id: "i-005", label: "Velvet Accent Cushion" }
|
|
1252
|
-
],
|
|
1252
|
+
], W = (e) => {
|
|
1253
1253
|
}, Ke = (e) => {
|
|
1254
|
-
},
|
|
1255
|
-
},
|
|
1254
|
+
}, ne = (e, t) => {
|
|
1255
|
+
}, ue = {
|
|
1256
1256
|
vizState: {
|
|
1257
1257
|
type: "orders",
|
|
1258
1258
|
quant: "$",
|
|
@@ -1260,17 +1260,17 @@ const G = F.createElement("span", { style: { color: "var(--color-text-muted)" }
|
|
|
1260
1260
|
byItem: { id: null, name: null },
|
|
1261
1261
|
timeFrame: "MTD"
|
|
1262
1262
|
},
|
|
1263
|
-
onTypeChange:
|
|
1263
|
+
onTypeChange: W,
|
|
1264
1264
|
onQuantChange: Ke,
|
|
1265
|
-
onEntityTypeChange:
|
|
1266
|
-
onEntitySelect:
|
|
1267
|
-
onItemSelect:
|
|
1268
|
-
onTimeFrameChange:
|
|
1265
|
+
onEntityTypeChange: W,
|
|
1266
|
+
onEntitySelect: ne,
|
|
1267
|
+
onItemSelect: ne,
|
|
1268
|
+
onTimeFrameChange: W,
|
|
1269
1269
|
userType: "sales-agency",
|
|
1270
1270
|
entityFilterOptions: $e,
|
|
1271
1271
|
itemFilterOptions: Be
|
|
1272
1272
|
}, $t = {
|
|
1273
|
-
...
|
|
1273
|
+
...ue,
|
|
1274
1274
|
vizState: {
|
|
1275
1275
|
type: "items",
|
|
1276
1276
|
quant: "$",
|
|
@@ -1279,7 +1279,7 @@ const G = F.createElement("span", { style: { color: "var(--color-text-muted)" }
|
|
|
1279
1279
|
timeFrame: "YTD"
|
|
1280
1280
|
}
|
|
1281
1281
|
}, Bt = {
|
|
1282
|
-
...
|
|
1282
|
+
...ue,
|
|
1283
1283
|
vizState: {
|
|
1284
1284
|
type: "orders",
|
|
1285
1285
|
quant: "#",
|
|
@@ -1422,7 +1422,7 @@ const G = F.createElement("span", { style: { color: "var(--color-text-muted)" }
|
|
|
1422
1422
|
rangeCount: 1,
|
|
1423
1423
|
lastPresetB: null,
|
|
1424
1424
|
lastPresetC: null
|
|
1425
|
-
},
|
|
1425
|
+
}, Vt = [
|
|
1426
1426
|
{
|
|
1427
1427
|
id: "atlanta-jan",
|
|
1428
1428
|
label: "Atlanta Market",
|
|
@@ -1444,7 +1444,7 @@ const G = F.createElement("span", { style: { color: "var(--color-text-muted)" }
|
|
|
1444
1444
|
endDate: new Date(2026, 3, 22),
|
|
1445
1445
|
location: "Chicago, IL"
|
|
1446
1446
|
}
|
|
1447
|
-
],
|
|
1447
|
+
], Zt = [
|
|
1448
1448
|
{
|
|
1449
1449
|
id: "custom-regional-1",
|
|
1450
1450
|
label: "Southeast Regional Expo",
|
|
@@ -1509,7 +1509,7 @@ function L(e, t) {
|
|
|
1509
1509
|
}, t)
|
|
1510
1510
|
};
|
|
1511
1511
|
}
|
|
1512
|
-
function
|
|
1512
|
+
function oe(e, t) {
|
|
1513
1513
|
return {
|
|
1514
1514
|
...L(e, t),
|
|
1515
1515
|
colSpan: 2
|
|
@@ -1518,11 +1518,11 @@ function ne(e, t) {
|
|
|
1518
1518
|
const Ut = [
|
|
1519
1519
|
L("total-revenue", "Total Revenue"),
|
|
1520
1520
|
L("total-orders", "Total Orders"),
|
|
1521
|
-
|
|
1521
|
+
oe("revenue-trend", "Revenue Trend (2x)"),
|
|
1522
1522
|
L("avg-order", "Avg Order Value"),
|
|
1523
1523
|
L("new-customers", "New Customers"),
|
|
1524
1524
|
L("top-salesperson", "Top Salesperson"),
|
|
1525
|
-
|
|
1525
|
+
oe("order-trend", "Order Trend (2x)"),
|
|
1526
1526
|
L("repeat-rate", "Repeat Rate"),
|
|
1527
1527
|
L("open-orders", "Open Orders"),
|
|
1528
1528
|
L("shipped-orders", "Shipped Orders")
|
|
@@ -1548,7 +1548,7 @@ const Ut = [
|
|
|
1548
1548
|
currentPage: 0,
|
|
1549
1549
|
totalPages: 3
|
|
1550
1550
|
};
|
|
1551
|
-
function
|
|
1551
|
+
function Y(e) {
|
|
1552
1552
|
return F.createElement("span", { style: { fontSize: 14 } }, e);
|
|
1553
1553
|
}
|
|
1554
1554
|
const Jt = [
|
|
@@ -1556,7 +1556,7 @@ const Jt = [
|
|
|
1556
1556
|
id: "all-orders",
|
|
1557
1557
|
type: "orders",
|
|
1558
1558
|
name: "All Orders",
|
|
1559
|
-
icon:
|
|
1559
|
+
icon: Y("📋"),
|
|
1560
1560
|
closable: !1,
|
|
1561
1561
|
autoCreated: !0
|
|
1562
1562
|
},
|
|
@@ -1564,14 +1564,14 @@ const Jt = [
|
|
|
1564
1564
|
id: "open-orders",
|
|
1565
1565
|
type: "orders",
|
|
1566
1566
|
name: "Open Orders",
|
|
1567
|
-
icon:
|
|
1567
|
+
icon: Y("📦"),
|
|
1568
1568
|
closable: !0
|
|
1569
1569
|
},
|
|
1570
1570
|
{
|
|
1571
1571
|
id: "shipped-orders",
|
|
1572
1572
|
type: "orders",
|
|
1573
1573
|
name: "Shipped Orders",
|
|
1574
|
-
icon:
|
|
1574
|
+
icon: Y("🚚"),
|
|
1575
1575
|
closable: !0
|
|
1576
1576
|
}
|
|
1577
1577
|
], ea = [
|
|
@@ -1620,7 +1620,7 @@ const Jt = [
|
|
|
1620
1620
|
{ id: "tab-9", type: "order-items", name: "Order #12345", closable: !0 },
|
|
1621
1621
|
{ id: "tab-10", type: "orders", name: "Recent 30D", closable: !0 }
|
|
1622
1622
|
];
|
|
1623
|
-
function
|
|
1623
|
+
function Q(e) {
|
|
1624
1624
|
switch (e) {
|
|
1625
1625
|
case "wide":
|
|
1626
1626
|
return { cols: 2, rows: 1 };
|
|
@@ -1631,39 +1631,39 @@ function U(e) {
|
|
|
1631
1631
|
return { cols: 1, rows: 1 };
|
|
1632
1632
|
}
|
|
1633
1633
|
}
|
|
1634
|
-
function
|
|
1634
|
+
function Ve(e) {
|
|
1635
1635
|
let t = 0;
|
|
1636
1636
|
for (const a of e) {
|
|
1637
|
-
const
|
|
1637
|
+
const o = Q(a.size), s = a.gridPosition.col + o.cols - 1;
|
|
1638
1638
|
s > t && (t = s);
|
|
1639
1639
|
}
|
|
1640
1640
|
return `repeat(${t > 0 ? t : Math.max(e.length, 1)}, minmax(0, 1fr))`;
|
|
1641
1641
|
}
|
|
1642
|
-
const
|
|
1642
|
+
const Ze = function(t) {
|
|
1643
1643
|
if (t.renderMode === "discrete")
|
|
1644
|
-
return /* @__PURE__ */
|
|
1644
|
+
return /* @__PURE__ */ g(
|
|
1645
1645
|
"div",
|
|
1646
1646
|
{
|
|
1647
1647
|
className: "gloss-metric-group gloss-metric-group--discrete",
|
|
1648
1648
|
style: { display: "contents" },
|
|
1649
|
-
children: t.cards.map((
|
|
1650
|
-
const s =
|
|
1651
|
-
return /* @__PURE__ */
|
|
1649
|
+
children: t.cards.map((o) => {
|
|
1650
|
+
const s = Q(o.size);
|
|
1651
|
+
return /* @__PURE__ */ g(
|
|
1652
1652
|
"div",
|
|
1653
1653
|
{
|
|
1654
1654
|
className: "gloss-metric-group__slot",
|
|
1655
1655
|
style: {
|
|
1656
|
-
gridColumn: `${
|
|
1657
|
-
gridRow: `${
|
|
1656
|
+
gridColumn: `${o.gridPosition.col} / span ${s.cols}`,
|
|
1657
|
+
gridRow: `${o.gridPosition.row} / span ${s.rows}`
|
|
1658
1658
|
},
|
|
1659
|
-
children:
|
|
1659
|
+
children: o.children
|
|
1660
1660
|
},
|
|
1661
|
-
|
|
1661
|
+
o.key
|
|
1662
1662
|
);
|
|
1663
1663
|
})
|
|
1664
1664
|
}
|
|
1665
1665
|
);
|
|
1666
|
-
const { cards:
|
|
1666
|
+
const { cards: n, composite: a } = t;
|
|
1667
1667
|
return /* @__PURE__ */ A(
|
|
1668
1668
|
"div",
|
|
1669
1669
|
{
|
|
@@ -1683,7 +1683,7 @@ const Ve = function(t) {
|
|
|
1683
1683
|
"aria-label": a?.label,
|
|
1684
1684
|
tabIndex: void 0,
|
|
1685
1685
|
children: [
|
|
1686
|
-
a?.accentColor && /* @__PURE__ */
|
|
1686
|
+
a?.accentColor && /* @__PURE__ */ g(
|
|
1687
1687
|
"div",
|
|
1688
1688
|
{
|
|
1689
1689
|
className: "gloss-metric-group__accent",
|
|
@@ -1691,8 +1691,8 @@ const Ve = function(t) {
|
|
|
1691
1691
|
}
|
|
1692
1692
|
),
|
|
1693
1693
|
a?.label && /* @__PURE__ */ A("div", { className: "gloss-metric-group__label", children: [
|
|
1694
|
-
/* @__PURE__ */
|
|
1695
|
-
a?.trend && /* @__PURE__ */
|
|
1694
|
+
/* @__PURE__ */ g("span", { children: a.label }),
|
|
1695
|
+
a?.trend && /* @__PURE__ */ g(
|
|
1696
1696
|
"span",
|
|
1697
1697
|
{
|
|
1698
1698
|
className: "gloss-metric-group__trend",
|
|
@@ -1701,28 +1701,28 @@ const Ve = function(t) {
|
|
|
1701
1701
|
}
|
|
1702
1702
|
)
|
|
1703
1703
|
] }),
|
|
1704
|
-
/* @__PURE__ */
|
|
1704
|
+
/* @__PURE__ */ g(
|
|
1705
1705
|
"div",
|
|
1706
1706
|
{
|
|
1707
1707
|
className: "gloss-metric-group__slots",
|
|
1708
1708
|
style: {
|
|
1709
1709
|
display: "grid",
|
|
1710
1710
|
gap: "var(--gloss-spacing-2, 8px)",
|
|
1711
|
-
gridTemplateColumns:
|
|
1711
|
+
gridTemplateColumns: Ve(n)
|
|
1712
1712
|
},
|
|
1713
|
-
children:
|
|
1714
|
-
const s =
|
|
1715
|
-
return /* @__PURE__ */
|
|
1713
|
+
children: n.map((o) => {
|
|
1714
|
+
const s = Q(o.size);
|
|
1715
|
+
return /* @__PURE__ */ g(
|
|
1716
1716
|
"div",
|
|
1717
1717
|
{
|
|
1718
1718
|
className: "gloss-metric-group__slot--composite",
|
|
1719
1719
|
style: {
|
|
1720
|
-
gridColumn: `${
|
|
1721
|
-
gridRow: `${
|
|
1720
|
+
gridColumn: `${o.gridPosition.col} / span ${s.cols}`,
|
|
1721
|
+
gridRow: `${o.gridPosition.row} / span ${s.rows}`
|
|
1722
1722
|
},
|
|
1723
|
-
children:
|
|
1723
|
+
children: o.children
|
|
1724
1724
|
},
|
|
1725
|
-
|
|
1725
|
+
o.key
|
|
1726
1726
|
);
|
|
1727
1727
|
})
|
|
1728
1728
|
}
|
|
@@ -1731,7 +1731,7 @@ const Ve = function(t) {
|
|
|
1731
1731
|
}
|
|
1732
1732
|
);
|
|
1733
1733
|
};
|
|
1734
|
-
|
|
1734
|
+
Ze.displayName = "MetricGroupContainer";
|
|
1735
1735
|
const B = {
|
|
1736
1736
|
"gloss-inline-nudge": "_gloss-inline-nudge_kdk88_34",
|
|
1737
1737
|
"gloss-inline-nudge__message": "_gloss-inline-nudge__message_kdk88_65",
|
|
@@ -1743,41 +1743,41 @@ const B = {
|
|
|
1743
1743
|
function We({
|
|
1744
1744
|
message: e,
|
|
1745
1745
|
primaryAction: t,
|
|
1746
|
-
onDismiss:
|
|
1746
|
+
onDismiss: n,
|
|
1747
1747
|
anchorEl: a,
|
|
1748
|
-
anchorSelector:
|
|
1748
|
+
anchorSelector: o
|
|
1749
1749
|
}) {
|
|
1750
|
-
const [s, i] = F.useState(null),
|
|
1750
|
+
const [s, i] = F.useState(null), l = F.useMemo(
|
|
1751
1751
|
() => typeof window < "u" && window.matchMedia ? window.matchMedia("(prefers-reduced-motion: reduce)").matches : !1,
|
|
1752
1752
|
[]
|
|
1753
1753
|
);
|
|
1754
1754
|
F.useEffect(() => {
|
|
1755
|
-
!a && !
|
|
1755
|
+
!a && !o && (typeof process > "u" || process.env.NODE_ENV !== "production") && console.error(
|
|
1756
1756
|
"[InlineNudge] requires anchorEl or anchorSelector. AP-07: Do not mount InlineNudge in Layout/** or _app.tsx."
|
|
1757
1757
|
);
|
|
1758
|
-
}, [a,
|
|
1759
|
-
let
|
|
1760
|
-
if (a ?
|
|
1761
|
-
const
|
|
1758
|
+
}, [a, o]), F.useLayoutEffect(() => {
|
|
1759
|
+
let d = null;
|
|
1760
|
+
if (a ? d = a : o && (d = document.querySelector(o)), d) {
|
|
1761
|
+
const D = d.getBoundingClientRect();
|
|
1762
1762
|
i({
|
|
1763
|
-
top:
|
|
1764
|
-
left:
|
|
1763
|
+
top: D.bottom + window.scrollY + 6,
|
|
1764
|
+
left: D.left + window.scrollX
|
|
1765
1765
|
});
|
|
1766
1766
|
}
|
|
1767
|
-
}, [a,
|
|
1768
|
-
const
|
|
1767
|
+
}, [a, o]);
|
|
1768
|
+
const f = s ? { top: s.top, left: s.left } : {};
|
|
1769
1769
|
return /* @__PURE__ */ A(
|
|
1770
1770
|
"div",
|
|
1771
1771
|
{
|
|
1772
1772
|
className: B["gloss-inline-nudge"],
|
|
1773
|
-
style:
|
|
1773
|
+
style: f,
|
|
1774
1774
|
role: "status",
|
|
1775
1775
|
"aria-live": "polite",
|
|
1776
|
-
"data-reduced-motion":
|
|
1776
|
+
"data-reduced-motion": l ? "true" : void 0,
|
|
1777
1777
|
children: [
|
|
1778
|
-
/* @__PURE__ */
|
|
1778
|
+
/* @__PURE__ */ g("span", { className: B["gloss-inline-nudge__message"], children: e }),
|
|
1779
1779
|
/* @__PURE__ */ A("div", { className: B["gloss-inline-nudge__actions"], children: [
|
|
1780
|
-
/* @__PURE__ */
|
|
1780
|
+
/* @__PURE__ */ g(
|
|
1781
1781
|
"button",
|
|
1782
1782
|
{
|
|
1783
1783
|
type: "button",
|
|
@@ -1786,12 +1786,12 @@ function We({
|
|
|
1786
1786
|
children: t.label
|
|
1787
1787
|
}
|
|
1788
1788
|
),
|
|
1789
|
-
/* @__PURE__ */
|
|
1789
|
+
/* @__PURE__ */ g(
|
|
1790
1790
|
"button",
|
|
1791
1791
|
{
|
|
1792
1792
|
type: "button",
|
|
1793
1793
|
className: `${B["gloss-inline-nudge__btn"]} ${B["gloss-inline-nudge__btn--dismiss"]}`,
|
|
1794
|
-
onClick:
|
|
1794
|
+
onClick: n,
|
|
1795
1795
|
"aria-label": "Dismiss",
|
|
1796
1796
|
children: "Dismiss"
|
|
1797
1797
|
}
|
|
@@ -1802,17 +1802,17 @@ function We({
|
|
|
1802
1802
|
);
|
|
1803
1803
|
}
|
|
1804
1804
|
We.displayName = "InlineNudge";
|
|
1805
|
-
function
|
|
1805
|
+
function X(e) {
|
|
1806
1806
|
return e.colorToken ? `var(--gloss-color-${e.colorToken}, ${e.color ?? "#888"})` : e.color ?? "#888";
|
|
1807
1807
|
}
|
|
1808
|
-
function Ye(e, t,
|
|
1809
|
-
if (
|
|
1810
|
-
const i = e[0],
|
|
1811
|
-
return `linear-gradient(to right, ${
|
|
1808
|
+
function Ye(e, t, n) {
|
|
1809
|
+
if (n <= t) {
|
|
1810
|
+
const i = e[0], l = i ? X(i) : "#888";
|
|
1811
|
+
return `linear-gradient(to right, ${l}, ${l})`;
|
|
1812
1812
|
}
|
|
1813
|
-
const a =
|
|
1814
|
-
const
|
|
1815
|
-
return `${
|
|
1813
|
+
const a = n - t, s = [...e].sort((i, l) => i.value - l.value).map((i) => {
|
|
1814
|
+
const l = (i.value - t) / a * 100;
|
|
1815
|
+
return `${X(i)} ${l.toFixed(2)}%`;
|
|
1816
1816
|
});
|
|
1817
1817
|
return s.length === 0 ? "linear-gradient(to right, #888 0%, #888 100%)" : s.length === 1 ? `linear-gradient(to right, ${s[0]}, ${s[0]})` : `linear-gradient(to right, ${s.join(", ")})`;
|
|
1818
1818
|
}
|
|
@@ -1822,153 +1822,159 @@ function qe(e) {
|
|
|
1822
1822
|
function Ue({
|
|
1823
1823
|
stops: e,
|
|
1824
1824
|
onChange: t,
|
|
1825
|
-
min:
|
|
1825
|
+
min: n = 0,
|
|
1826
1826
|
max: a = 100,
|
|
1827
|
-
|
|
1827
|
+
step: o,
|
|
1828
|
+
disabled: s = !1
|
|
1828
1829
|
}) {
|
|
1829
|
-
const
|
|
1830
|
+
const i = o === void 0 ? 0.01 : !Number.isFinite(o) || o <= 0 ? (process.env.NODE_ENV !== "production" && console.warn(
|
|
1831
|
+
`ThresholdRamp: step (${o}) must be a positive finite number; falling back to 0.01.`
|
|
1832
|
+
), 0.01) : o, l = y(
|
|
1833
|
+
(r) => Math.round(r / i) * i,
|
|
1834
|
+
[i]
|
|
1835
|
+
), f = M(null), [d, D] = O(null), [N, u] = O(e), m = qe(e), S = M(m);
|
|
1830
1836
|
P(() => {
|
|
1831
|
-
|
|
1832
|
-
}, [
|
|
1833
|
-
const
|
|
1834
|
-
(
|
|
1835
|
-
if (!
|
|
1836
|
-
const
|
|
1837
|
-
return
|
|
1837
|
+
S.current !== m && (S.current = m, !d && u(e));
|
|
1838
|
+
}, [m, e, d]);
|
|
1839
|
+
const R = ie(() => Ye(N, n, a), [N, n, a]), p = y(
|
|
1840
|
+
(r) => {
|
|
1841
|
+
if (!f.current) return n;
|
|
1842
|
+
const c = f.current.getBoundingClientRect(), b = c.width || 1, C = Math.max(0, Math.min(1, (r - c.left) / b)), w = n + C * (a - n);
|
|
1843
|
+
return l(w);
|
|
1838
1844
|
},
|
|
1839
|
-
[
|
|
1845
|
+
[n, a, l]
|
|
1840
1846
|
);
|
|
1841
1847
|
P(() => {
|
|
1842
|
-
a <=
|
|
1843
|
-
`ThresholdRamp: max (${a}) must be greater than min (${
|
|
1848
|
+
a <= n && process.env.NODE_ENV !== "production" && console.warn(
|
|
1849
|
+
`ThresholdRamp: max (${a}) must be greater than min (${n}); rendering degenerate strip.`
|
|
1844
1850
|
);
|
|
1845
|
-
}, [
|
|
1846
|
-
const
|
|
1847
|
-
(
|
|
1848
|
-
const
|
|
1849
|
-
|
|
1851
|
+
}, [n, a]);
|
|
1852
|
+
const x = y(
|
|
1853
|
+
(r, c) => {
|
|
1854
|
+
const b = N.find((C) => C.id === c);
|
|
1855
|
+
s || b?.disabled || (r.preventDefault(), D(c));
|
|
1850
1856
|
},
|
|
1851
|
-
[
|
|
1852
|
-
), T =
|
|
1853
|
-
T.current =
|
|
1854
|
-
const
|
|
1855
|
-
|
|
1856
|
-
if (!
|
|
1857
|
-
const
|
|
1858
|
-
const
|
|
1857
|
+
[s, N]
|
|
1858
|
+
), T = M(N);
|
|
1859
|
+
T.current = N;
|
|
1860
|
+
const v = M(t);
|
|
1861
|
+
v.current = t, P(() => {
|
|
1862
|
+
if (!d) return;
|
|
1863
|
+
const r = (b) => {
|
|
1864
|
+
const C = p(b.clientX);
|
|
1859
1865
|
u(
|
|
1860
|
-
(
|
|
1866
|
+
(w) => w.map((I) => I.id === d ? { ...I, value: C } : I)
|
|
1861
1867
|
);
|
|
1862
|
-
},
|
|
1863
|
-
const
|
|
1864
|
-
(
|
|
1868
|
+
}, c = (b) => {
|
|
1869
|
+
const C = p(b.clientX), w = T.current.map(
|
|
1870
|
+
(I) => I.id === d ? { ...I, value: C } : I
|
|
1865
1871
|
);
|
|
1866
|
-
u(
|
|
1872
|
+
u(w), D(null), v.current(w);
|
|
1867
1873
|
};
|
|
1868
|
-
return window.addEventListener("pointermove",
|
|
1869
|
-
window.removeEventListener("pointermove",
|
|
1874
|
+
return window.addEventListener("pointermove", r), window.addEventListener("pointerup", c), window.addEventListener("pointercancel", c), () => {
|
|
1875
|
+
window.removeEventListener("pointermove", r), window.removeEventListener("pointerup", c), window.removeEventListener("pointercancel", c);
|
|
1870
1876
|
};
|
|
1871
|
-
}, [
|
|
1872
|
-
const
|
|
1873
|
-
(
|
|
1874
|
-
if (
|
|
1875
|
-
const
|
|
1876
|
-
if (
|
|
1877
|
-
const
|
|
1878
|
-
let
|
|
1879
|
-
switch (
|
|
1877
|
+
}, [d, p]);
|
|
1878
|
+
const k = a - n > 0 ? a - n : 1, h = y(
|
|
1879
|
+
(r, c) => {
|
|
1880
|
+
if (s || c.disabled) return;
|
|
1881
|
+
const b = a - n;
|
|
1882
|
+
if (b <= 0) return;
|
|
1883
|
+
const C = r.shiftKey ? b / 20 : b / 100;
|
|
1884
|
+
let w = c.value;
|
|
1885
|
+
switch (r.key) {
|
|
1880
1886
|
case "ArrowRight":
|
|
1881
1887
|
case "ArrowUp":
|
|
1882
|
-
|
|
1888
|
+
w = c.value + C;
|
|
1883
1889
|
break;
|
|
1884
1890
|
case "ArrowLeft":
|
|
1885
1891
|
case "ArrowDown":
|
|
1886
|
-
|
|
1892
|
+
w = c.value - C;
|
|
1887
1893
|
break;
|
|
1888
1894
|
case "Home":
|
|
1889
|
-
|
|
1895
|
+
w = n;
|
|
1890
1896
|
break;
|
|
1891
1897
|
case "End":
|
|
1892
|
-
|
|
1898
|
+
w = a;
|
|
1893
1899
|
break;
|
|
1894
1900
|
default:
|
|
1895
1901
|
return;
|
|
1896
1902
|
}
|
|
1897
|
-
|
|
1898
|
-
const
|
|
1899
|
-
if (
|
|
1900
|
-
const
|
|
1901
|
-
(
|
|
1903
|
+
r.preventDefault();
|
|
1904
|
+
const I = Math.max(n, Math.min(a, w)), _ = l(I);
|
|
1905
|
+
if (_ === c.value) return;
|
|
1906
|
+
const K = N.map(
|
|
1907
|
+
(G) => G.id === c.id ? { ...G, value: _ } : G
|
|
1902
1908
|
);
|
|
1903
|
-
u(
|
|
1909
|
+
u(K), t(K);
|
|
1904
1910
|
},
|
|
1905
|
-
[
|
|
1911
|
+
[s, n, a, N, t, l]
|
|
1906
1912
|
);
|
|
1907
|
-
return /* @__PURE__ */
|
|
1913
|
+
return /* @__PURE__ */ g("div", { className: "gloss-threshold-ramp", "data-disabled": s || void 0, children: /* @__PURE__ */ g(
|
|
1908
1914
|
"div",
|
|
1909
1915
|
{
|
|
1910
|
-
ref:
|
|
1916
|
+
ref: f,
|
|
1911
1917
|
className: "gloss-threshold-ramp__track",
|
|
1912
|
-
style: { background:
|
|
1913
|
-
children:
|
|
1914
|
-
const
|
|
1915
|
-
return /* @__PURE__ */
|
|
1918
|
+
style: { background: R },
|
|
1919
|
+
children: N.map((r) => {
|
|
1920
|
+
const c = (r.value - n) / k * 100;
|
|
1921
|
+
return /* @__PURE__ */ g(
|
|
1916
1922
|
"span",
|
|
1917
1923
|
{
|
|
1918
1924
|
className: "gloss-threshold-ramp__stop",
|
|
1919
1925
|
style: {
|
|
1920
|
-
left: `${
|
|
1921
|
-
color:
|
|
1926
|
+
left: `${c}%`,
|
|
1927
|
+
color: X(r)
|
|
1922
1928
|
},
|
|
1923
|
-
"data-disabled":
|
|
1924
|
-
"data-dragging":
|
|
1925
|
-
onPointerDown: (
|
|
1926
|
-
onKeyDown: (
|
|
1927
|
-
"aria-label":
|
|
1929
|
+
"data-disabled": r.disabled || void 0,
|
|
1930
|
+
"data-dragging": d === r.id || void 0,
|
|
1931
|
+
onPointerDown: (b) => x(b, r.id),
|
|
1932
|
+
onKeyDown: (b) => h(b, r),
|
|
1933
|
+
"aria-label": r.label ?? `Stop at ${r.value}`,
|
|
1928
1934
|
role: "slider",
|
|
1929
|
-
"aria-valuenow":
|
|
1930
|
-
"aria-valuemin":
|
|
1935
|
+
"aria-valuenow": r.value,
|
|
1936
|
+
"aria-valuemin": n,
|
|
1931
1937
|
"aria-valuemax": a,
|
|
1932
|
-
"aria-disabled":
|
|
1933
|
-
tabIndex:
|
|
1938
|
+
"aria-disabled": r.disabled || s || void 0,
|
|
1939
|
+
tabIndex: r.disabled || s ? -1 : 0
|
|
1934
1940
|
},
|
|
1935
|
-
|
|
1941
|
+
r.id
|
|
1936
1942
|
);
|
|
1937
1943
|
})
|
|
1938
1944
|
}
|
|
1939
1945
|
) });
|
|
1940
1946
|
}
|
|
1941
1947
|
Ue.displayName = "ThresholdRamp";
|
|
1942
|
-
const
|
|
1948
|
+
const me = ve(null);
|
|
1943
1949
|
function je() {
|
|
1944
|
-
return ye(
|
|
1950
|
+
return ye(me);
|
|
1945
1951
|
}
|
|
1946
1952
|
function Qe({ option: e }) {
|
|
1947
|
-
const t = je(),
|
|
1953
|
+
const t = je(), n = t?.isSelected(e.value) ?? !1, a = e.disabled || t?.groupDisabled, o = y(() => {
|
|
1948
1954
|
a || t?.select(e.value);
|
|
1949
|
-
}, [a, t, e.value]), s =
|
|
1950
|
-
(
|
|
1951
|
-
a || t?.onKeyNav(
|
|
1955
|
+
}, [a, t, e.value]), s = y(
|
|
1956
|
+
(d) => {
|
|
1957
|
+
a || t?.onKeyNav(d, e.value);
|
|
1952
1958
|
},
|
|
1953
1959
|
[a, t, e.value]
|
|
1954
|
-
), i = e.colorToken ? `var(--gloss-color-${e.colorToken}, ${e.color ?? "#888"})` : e.color ?? "#888",
|
|
1955
|
-
return /* @__PURE__ */
|
|
1960
|
+
), i = e.colorToken ? `var(--gloss-color-${e.colorToken}, ${e.color ?? "#888"})` : e.color ?? "#888", l = t?.firstFocusableValue === e.value, f = a ? -1 : l ? 0 : -1;
|
|
1961
|
+
return /* @__PURE__ */ g(
|
|
1956
1962
|
"button",
|
|
1957
1963
|
{
|
|
1958
|
-
ref: (
|
|
1964
|
+
ref: (d) => t?.registerRef(e.value, d),
|
|
1959
1965
|
type: "button",
|
|
1960
1966
|
role: "radio",
|
|
1961
|
-
"aria-checked":
|
|
1967
|
+
"aria-checked": n,
|
|
1962
1968
|
className: "gloss-preset-swatch-row__swatch",
|
|
1963
1969
|
style: { backgroundColor: i },
|
|
1964
|
-
"data-selected":
|
|
1970
|
+
"data-selected": n || void 0,
|
|
1965
1971
|
"data-disabled": a || void 0,
|
|
1966
|
-
"data-bg-color": i,
|
|
1972
|
+
...process.env.NODE_ENV === "test" ? { "data-bg-color": i } : {},
|
|
1967
1973
|
"aria-label": e.label ?? e.value,
|
|
1968
1974
|
"aria-disabled": a,
|
|
1969
1975
|
disabled: a,
|
|
1970
|
-
tabIndex:
|
|
1971
|
-
onClick:
|
|
1976
|
+
tabIndex: f,
|
|
1977
|
+
onClick: o,
|
|
1972
1978
|
onKeyDown: s
|
|
1973
1979
|
}
|
|
1974
1980
|
);
|
|
@@ -1976,196 +1982,196 @@ function Qe({ option: e }) {
|
|
|
1976
1982
|
function Xe({
|
|
1977
1983
|
swatches: e,
|
|
1978
1984
|
value: t,
|
|
1979
|
-
defaultValue:
|
|
1985
|
+
defaultValue: n,
|
|
1980
1986
|
onChange: a,
|
|
1981
|
-
disabled:
|
|
1987
|
+
disabled: o = !1,
|
|
1982
1988
|
name: s
|
|
1983
1989
|
}) {
|
|
1984
|
-
const i = t !== void 0, [
|
|
1985
|
-
(
|
|
1986
|
-
i ||
|
|
1990
|
+
const i = t !== void 0, [l, f] = O(n), d = i ? t : l, D = y(
|
|
1991
|
+
(v) => {
|
|
1992
|
+
i || f(v), a?.(v);
|
|
1987
1993
|
},
|
|
1988
1994
|
[i, a]
|
|
1989
|
-
), N =
|
|
1990
|
-
(
|
|
1991
|
-
[
|
|
1992
|
-
),
|
|
1993
|
-
|
|
1994
|
-
}, []), S = e.filter((
|
|
1995
|
-
const
|
|
1996
|
-
|
|
1997
|
-
}, []), x =
|
|
1998
|
-
(
|
|
1999
|
-
if (
|
|
2000
|
-
const
|
|
2001
|
-
if (
|
|
2002
|
-
const
|
|
2003
|
-
if (
|
|
2004
|
-
let
|
|
2005
|
-
switch (
|
|
1995
|
+
), N = y(
|
|
1996
|
+
(v) => d === v,
|
|
1997
|
+
[d]
|
|
1998
|
+
), u = M(/* @__PURE__ */ new Map()), m = y((v, k) => {
|
|
1999
|
+
k ? u.current.set(v, k) : u.current.delete(v);
|
|
2000
|
+
}, []), S = e.filter((v) => !v.disabled && !o), R = S.find((v) => v.value === d)?.value ?? S[0]?.value, p = y((v) => {
|
|
2001
|
+
const k = u.current.get(v);
|
|
2002
|
+
k && k.focus();
|
|
2003
|
+
}, []), x = y(
|
|
2004
|
+
(v, k) => {
|
|
2005
|
+
if (o) return;
|
|
2006
|
+
const h = e.filter((C) => !C.disabled);
|
|
2007
|
+
if (h.length === 0) return;
|
|
2008
|
+
const r = h.findIndex((C) => C.value === k);
|
|
2009
|
+
if (r === -1) return;
|
|
2010
|
+
let c = r;
|
|
2011
|
+
switch (v.key) {
|
|
2006
2012
|
case "ArrowRight":
|
|
2007
2013
|
case "ArrowDown":
|
|
2008
|
-
|
|
2014
|
+
c = (r + 1) % h.length;
|
|
2009
2015
|
break;
|
|
2010
2016
|
case "ArrowLeft":
|
|
2011
2017
|
case "ArrowUp":
|
|
2012
|
-
|
|
2018
|
+
c = (r - 1 + h.length) % h.length;
|
|
2013
2019
|
break;
|
|
2014
2020
|
case "Home":
|
|
2015
|
-
|
|
2021
|
+
c = 0;
|
|
2016
2022
|
break;
|
|
2017
2023
|
case "End":
|
|
2018
|
-
|
|
2024
|
+
c = h.length - 1;
|
|
2019
2025
|
break;
|
|
2020
2026
|
case " ":
|
|
2021
2027
|
case "Enter":
|
|
2022
|
-
|
|
2028
|
+
v.preventDefault(), D(k);
|
|
2023
2029
|
return;
|
|
2024
2030
|
default:
|
|
2025
2031
|
return;
|
|
2026
2032
|
}
|
|
2027
|
-
|
|
2028
|
-
const
|
|
2029
|
-
b
|
|
2033
|
+
v.preventDefault();
|
|
2034
|
+
const b = h[c].value;
|
|
2035
|
+
p(b), D(b);
|
|
2030
2036
|
},
|
|
2031
|
-
[
|
|
2032
|
-
),
|
|
2033
|
-
selectedValue:
|
|
2034
|
-
select:
|
|
2037
|
+
[o, e, D, p]
|
|
2038
|
+
), T = {
|
|
2039
|
+
selectedValue: d,
|
|
2040
|
+
select: D,
|
|
2035
2041
|
isSelected: N,
|
|
2036
|
-
groupDisabled:
|
|
2042
|
+
groupDisabled: o,
|
|
2037
2043
|
name: s,
|
|
2038
|
-
registerRef:
|
|
2039
|
-
firstFocusableValue:
|
|
2044
|
+
registerRef: m,
|
|
2045
|
+
firstFocusableValue: R,
|
|
2040
2046
|
onKeyNav: x
|
|
2041
2047
|
};
|
|
2042
|
-
return /* @__PURE__ */
|
|
2048
|
+
return /* @__PURE__ */ g(me.Provider, { value: T, children: /* @__PURE__ */ g(
|
|
2043
2049
|
"div",
|
|
2044
2050
|
{
|
|
2045
2051
|
className: "gloss-preset-swatch-row",
|
|
2046
2052
|
role: "radiogroup",
|
|
2047
2053
|
"aria-label": s,
|
|
2048
|
-
"aria-disabled":
|
|
2049
|
-
"data-disabled":
|
|
2050
|
-
children: e.map((
|
|
2054
|
+
"aria-disabled": o,
|
|
2055
|
+
"data-disabled": o || void 0,
|
|
2056
|
+
children: e.map((v) => /* @__PURE__ */ g(Qe, { option: v }, v.value))
|
|
2051
2057
|
}
|
|
2052
2058
|
) });
|
|
2053
2059
|
}
|
|
2054
2060
|
Xe.displayName = "PresetSwatchRow";
|
|
2055
|
-
function
|
|
2056
|
-
for (const
|
|
2057
|
-
if (
|
|
2058
|
-
return
|
|
2061
|
+
function J(e, t) {
|
|
2062
|
+
for (const n of e)
|
|
2063
|
+
if (n.items.some((a) => a.id === t))
|
|
2064
|
+
return n.zoneKey;
|
|
2059
2065
|
return null;
|
|
2060
2066
|
}
|
|
2061
|
-
function
|
|
2062
|
-
const
|
|
2063
|
-
return
|
|
2067
|
+
function se(e, t) {
|
|
2068
|
+
const n = e.find((a) => a.zoneKey === t);
|
|
2069
|
+
return n ? n.zoneKey : J(e, t);
|
|
2064
2070
|
}
|
|
2065
|
-
function Je(e, t,
|
|
2066
|
-
const a = [...e], [
|
|
2067
|
-
return a.splice(
|
|
2071
|
+
function Je(e, t, n) {
|
|
2072
|
+
const a = [...e], [o] = a.splice(t, 1);
|
|
2073
|
+
return a.splice(n, 0, o), a;
|
|
2068
2074
|
}
|
|
2069
2075
|
function et(e) {
|
|
2070
|
-
return e.map((t) => `${t.zoneKey}:${t.items.map((
|
|
2076
|
+
return e.map((t) => `${t.zoneKey}:${t.items.map((n) => n.id).join(",")}`).join("|");
|
|
2071
2077
|
}
|
|
2072
2078
|
function tt(e) {
|
|
2073
|
-
const [t,
|
|
2074
|
-
() => e.zones.map((
|
|
2075
|
-
`useSortableZones: zone "${
|
|
2076
|
-
), { ...
|
|
2077
|
-
), [a,
|
|
2078
|
-
|
|
2079
|
-
const
|
|
2079
|
+
const [t, n] = O(
|
|
2080
|
+
() => e.zones.map((p) => p.maxItems !== void 0 && p.items.length > p.maxItems ? (process.env.NODE_ENV !== "production" && console.warn(
|
|
2081
|
+
`useSortableZones: zone "${p.zoneKey}" exceeds maxItems (${p.items.length} > ${p.maxItems}); trimming to cap.`
|
|
2082
|
+
), { ...p, items: p.items.slice(0, p.maxItems) }) : p)
|
|
2083
|
+
), [a, o] = O(null), [s, i] = O(null), l = M(null), f = M(e.onZoneChange);
|
|
2084
|
+
f.current = e.onZoneChange;
|
|
2085
|
+
const d = ie(
|
|
2080
2086
|
() => et(e.zones),
|
|
2081
2087
|
[e.zones]
|
|
2082
|
-
),
|
|
2088
|
+
), D = M(d);
|
|
2083
2089
|
P(() => {
|
|
2084
|
-
|
|
2085
|
-
e.zones.map((
|
|
2086
|
-
`useSortableZones: zone "${
|
|
2087
|
-
), { ...
|
|
2090
|
+
D.current !== d && (D.current = d, !a && n(
|
|
2091
|
+
e.zones.map((p) => p.maxItems !== void 0 && p.items.length > p.maxItems ? (process.env.NODE_ENV !== "production" && console.warn(
|
|
2092
|
+
`useSortableZones: zone "${p.zoneKey}" exceeds maxItems (${p.items.length} > ${p.maxItems}); trimming to cap.`
|
|
2093
|
+
), { ...p, items: p.items.slice(0, p.maxItems) }) : p)
|
|
2088
2094
|
));
|
|
2089
|
-
}, [
|
|
2090
|
-
const N =
|
|
2091
|
-
(
|
|
2092
|
-
const x =
|
|
2093
|
-
let
|
|
2094
|
-
for (const
|
|
2095
|
-
const
|
|
2096
|
-
if (
|
|
2097
|
-
|
|
2095
|
+
}, [d, e.zones, a]);
|
|
2096
|
+
const N = y(
|
|
2097
|
+
(p) => {
|
|
2098
|
+
const x = p.active.id;
|
|
2099
|
+
let T = null, v = null;
|
|
2100
|
+
for (const k of t) {
|
|
2101
|
+
const h = k.items.find((r) => r.id === x);
|
|
2102
|
+
if (h) {
|
|
2103
|
+
T = h, v = k.zoneKey;
|
|
2098
2104
|
break;
|
|
2099
2105
|
}
|
|
2100
2106
|
}
|
|
2101
|
-
|
|
2107
|
+
l.current = v, o(T), i(v);
|
|
2102
2108
|
},
|
|
2103
2109
|
[t]
|
|
2104
|
-
),
|
|
2105
|
-
(
|
|
2106
|
-
if (!
|
|
2107
|
-
i(
|
|
2110
|
+
), u = y(
|
|
2111
|
+
(p) => {
|
|
2112
|
+
if (!p.over) {
|
|
2113
|
+
i(l.current);
|
|
2108
2114
|
return;
|
|
2109
2115
|
}
|
|
2110
|
-
const x =
|
|
2116
|
+
const x = se(t, p.over.id);
|
|
2111
2117
|
i(x);
|
|
2112
2118
|
},
|
|
2113
2119
|
[t]
|
|
2114
|
-
),
|
|
2115
|
-
(
|
|
2116
|
-
const { active: x, over:
|
|
2117
|
-
|
|
2120
|
+
), m = y(
|
|
2121
|
+
(p) => {
|
|
2122
|
+
const { active: x, over: T } = p, v = () => {
|
|
2123
|
+
l.current = null, o(null), i(null);
|
|
2118
2124
|
};
|
|
2119
|
-
if (!
|
|
2120
|
-
|
|
2125
|
+
if (!T) {
|
|
2126
|
+
v();
|
|
2121
2127
|
return;
|
|
2122
2128
|
}
|
|
2123
|
-
const
|
|
2124
|
-
if (!
|
|
2125
|
-
|
|
2129
|
+
const k = J(t, x.id), h = se(t, T.id);
|
|
2130
|
+
if (!k || !h) {
|
|
2131
|
+
v();
|
|
2126
2132
|
return;
|
|
2127
2133
|
}
|
|
2128
|
-
let
|
|
2129
|
-
if (
|
|
2130
|
-
const
|
|
2131
|
-
|
|
2132
|
-
...
|
|
2133
|
-
items: Je(
|
|
2134
|
+
let r = t.map((c) => ({ ...c, items: [...c.items] }));
|
|
2135
|
+
if (k === h) {
|
|
2136
|
+
const c = r.findIndex((_) => _.zoneKey === k), b = r[c], C = b.items.findIndex((_) => _.id === x.id), w = b.items.findIndex((_) => _.id === T.id), I = w >= 0 ? w : Math.max(0, b.items.length - 1);
|
|
2137
|
+
r[c] = {
|
|
2138
|
+
...b,
|
|
2139
|
+
items: Je(b.items, C, I)
|
|
2134
2140
|
};
|
|
2135
2141
|
} else {
|
|
2136
|
-
const
|
|
2137
|
-
if (!
|
|
2138
|
-
|
|
2142
|
+
const c = r.findIndex((E) => E.zoneKey === k), b = r.findIndex((E) => E.zoneKey === h), C = r[c], w = r[b], I = C.items.find((E) => E.id === x.id);
|
|
2143
|
+
if (!I) {
|
|
2144
|
+
v();
|
|
2139
2145
|
return;
|
|
2140
2146
|
}
|
|
2141
|
-
const
|
|
2142
|
-
let
|
|
2143
|
-
if (
|
|
2147
|
+
const _ = C.items.filter((E) => E.id !== x.id), K = w.items.findIndex((E) => E.id === T.id), G = K >= 0 ? K : w.items.length;
|
|
2148
|
+
let te = _, $ = [...w.items];
|
|
2149
|
+
if (w.maxItems !== void 0 && $.length >= w.maxItems) {
|
|
2144
2150
|
const E = $[$.length - 1];
|
|
2145
|
-
$ = $.slice(0,
|
|
2151
|
+
$ = $.slice(0, w.maxItems - 1), te = [..._, E];
|
|
2146
2152
|
}
|
|
2147
|
-
const
|
|
2148
|
-
...$.slice(0,
|
|
2149
|
-
|
|
2150
|
-
...$.slice(
|
|
2153
|
+
const ae = Math.min(G, $.length), fe = [
|
|
2154
|
+
...$.slice(0, ae),
|
|
2155
|
+
I,
|
|
2156
|
+
...$.slice(ae)
|
|
2151
2157
|
];
|
|
2152
|
-
|
|
2158
|
+
r[c] = { ...C, items: te }, r[b] = { ...w, items: fe };
|
|
2153
2159
|
}
|
|
2154
|
-
r
|
|
2160
|
+
n(r), f.current?.(r), v();
|
|
2155
2161
|
},
|
|
2156
2162
|
[t]
|
|
2157
|
-
), S =
|
|
2158
|
-
(
|
|
2159
|
-
id:
|
|
2160
|
-
"data-zone-key":
|
|
2163
|
+
), S = y(
|
|
2164
|
+
(p) => ({
|
|
2165
|
+
id: p,
|
|
2166
|
+
"data-zone-key": p
|
|
2161
2167
|
}),
|
|
2162
2168
|
[]
|
|
2163
|
-
),
|
|
2164
|
-
(
|
|
2165
|
-
const x =
|
|
2169
|
+
), R = y(
|
|
2170
|
+
(p) => {
|
|
2171
|
+
const x = J(t, p.id) ?? "";
|
|
2166
2172
|
return {
|
|
2167
|
-
id:
|
|
2168
|
-
"data-item-id":
|
|
2173
|
+
id: p.id,
|
|
2174
|
+
"data-item-id": p.id,
|
|
2169
2175
|
"data-zone-key": x
|
|
2170
2176
|
};
|
|
2171
2177
|
},
|
|
@@ -2176,13 +2182,13 @@ function tt(e) {
|
|
|
2176
2182
|
activeZone: s,
|
|
2177
2183
|
activeItem: a,
|
|
2178
2184
|
getZoneProps: S,
|
|
2179
|
-
getItemProps:
|
|
2185
|
+
getItemProps: R,
|
|
2180
2186
|
handleDragStart: N,
|
|
2181
|
-
handleDragOver:
|
|
2182
|
-
handleDragEnd:
|
|
2187
|
+
handleDragOver: u,
|
|
2188
|
+
handleDragEnd: m
|
|
2183
2189
|
};
|
|
2184
2190
|
}
|
|
2185
|
-
let
|
|
2191
|
+
let H = null, V = null, q = !1;
|
|
2186
2192
|
const at = [
|
|
2187
2193
|
"DndContext",
|
|
2188
2194
|
"DragOverlay",
|
|
@@ -2198,145 +2204,145 @@ const at = [
|
|
|
2198
2204
|
"verticalListSortingStrategy"
|
|
2199
2205
|
];
|
|
2200
2206
|
function nt(e, t) {
|
|
2201
|
-
const
|
|
2207
|
+
const n = [], a = e ?? {};
|
|
2202
2208
|
for (const s of at)
|
|
2203
|
-
a[s] === void 0 &&
|
|
2204
|
-
const
|
|
2209
|
+
a[s] === void 0 && n.push(`@dnd-kit/core:${s}`);
|
|
2210
|
+
const o = t ?? {};
|
|
2205
2211
|
for (const s of rt)
|
|
2206
|
-
|
|
2207
|
-
return
|
|
2212
|
+
o[s] === void 0 && n.push(`@dnd-kit/sortable:${s}`);
|
|
2213
|
+
return n.length === 0 ? { ok: !0 } : { ok: !1, missing: n };
|
|
2208
2214
|
}
|
|
2209
2215
|
function ot() {
|
|
2210
|
-
return
|
|
2216
|
+
return H ? Promise.resolve(H) : q ? Promise.resolve(null) : V || (V = (async () => {
|
|
2211
2217
|
try {
|
|
2212
|
-
const [e, t,
|
|
2218
|
+
const [e, t, n] = await Promise.all([
|
|
2213
2219
|
import("@dnd-kit/core"),
|
|
2214
2220
|
import("@dnd-kit/sortable"),
|
|
2215
2221
|
import("@dnd-kit/utilities").catch(() => (process.env.NODE_ENV !== "production" && console.warn(
|
|
2216
2222
|
"SortableZones: @dnd-kit/utilities failed to load; drag-overlay positioning will fall back (items may teleport instead of slide)."
|
|
2217
2223
|
), {}))
|
|
2218
2224
|
]), a = nt(e, t);
|
|
2219
|
-
return a.ok ? (
|
|
2225
|
+
return a.ok ? (H = {
|
|
2220
2226
|
core: e,
|
|
2221
2227
|
sortable: t,
|
|
2222
|
-
utilities:
|
|
2223
|
-
},
|
|
2228
|
+
utilities: n
|
|
2229
|
+
}, H) : (q = !0, process.env.NODE_ENV !== "production" && console.error(
|
|
2224
2230
|
`SortableZones: @dnd-kit shape mismatch — missing exports: ${a.missing.join(", ")}. Check installed versions against optionalDependencies in @mt-gloss/ui.`
|
|
2225
2231
|
), null);
|
|
2226
2232
|
} catch {
|
|
2227
|
-
return
|
|
2233
|
+
return q = !0, null;
|
|
2228
2234
|
}
|
|
2229
|
-
})(),
|
|
2235
|
+
})(), V);
|
|
2230
2236
|
}
|
|
2231
2237
|
function st(e) {
|
|
2232
|
-
const { zones: t, onZoneChange:
|
|
2238
|
+
const { zones: t, onZoneChange: n, renderZone: a, renderItem: o, renderDragOverlay: s } = e, i = tt({ zones: t, onZoneChange: n }), [l, f] = F.useState(H);
|
|
2233
2239
|
return F.useEffect(() => {
|
|
2234
|
-
if (
|
|
2235
|
-
let
|
|
2236
|
-
return ot().then((
|
|
2237
|
-
|
|
2240
|
+
if (l) return;
|
|
2241
|
+
let d = !0;
|
|
2242
|
+
return ot().then((D) => {
|
|
2243
|
+
d && f(D);
|
|
2238
2244
|
}), () => {
|
|
2239
|
-
|
|
2245
|
+
d = !1;
|
|
2240
2246
|
};
|
|
2241
|
-
}, [
|
|
2242
|
-
|
|
2247
|
+
}, [l]), l ? /* @__PURE__ */ g(
|
|
2248
|
+
pe,
|
|
2243
2249
|
{
|
|
2244
2250
|
state: i,
|
|
2245
|
-
modules:
|
|
2251
|
+
modules: l,
|
|
2246
2252
|
renderZone: a,
|
|
2247
|
-
renderItem:
|
|
2253
|
+
renderItem: o,
|
|
2248
2254
|
renderDragOverlay: s
|
|
2249
2255
|
}
|
|
2250
|
-
) : /* @__PURE__ */
|
|
2251
|
-
const
|
|
2252
|
-
return /* @__PURE__ */
|
|
2256
|
+
) : /* @__PURE__ */ g("div", { "data-sortable-zones-passive": "true", children: i.zones.map((d) => {
|
|
2257
|
+
const D = d.items.map((N) => /* @__PURE__ */ g(F.Fragment, { children: o(N) }, N.id));
|
|
2258
|
+
return /* @__PURE__ */ g("div", { ...i.getZoneProps(d.zoneKey), children: a(d.zoneKey, d.items, D) }, d.zoneKey);
|
|
2253
2259
|
}) });
|
|
2254
2260
|
}
|
|
2255
2261
|
st.displayName = "SortableZones";
|
|
2256
|
-
function
|
|
2262
|
+
function pe({
|
|
2257
2263
|
state: e,
|
|
2258
2264
|
modules: t,
|
|
2259
|
-
renderZone:
|
|
2265
|
+
renderZone: n,
|
|
2260
2266
|
renderItem: a,
|
|
2261
|
-
renderDragOverlay:
|
|
2267
|
+
renderDragOverlay: o
|
|
2262
2268
|
}) {
|
|
2263
|
-
const { core: s, sortable: i, utilities:
|
|
2264
|
-
N(
|
|
2269
|
+
const { core: s, sortable: i, utilities: l } = t, { DndContext: f, DragOverlay: d, useSensors: D, useSensor: N, useDroppable: u, PointerSensor: m, KeyboardSensor: S, closestCenter: R } = s, { SortableContext: p, verticalListSortingStrategy: x } = i, T = D(
|
|
2270
|
+
N(m, { activationConstraint: { distance: 5 } }),
|
|
2265
2271
|
N(S)
|
|
2266
|
-
),
|
|
2272
|
+
), v = f, k = d, h = p;
|
|
2267
2273
|
return /* @__PURE__ */ A(
|
|
2268
|
-
|
|
2274
|
+
v,
|
|
2269
2275
|
{
|
|
2270
|
-
sensors:
|
|
2271
|
-
collisionDetection:
|
|
2276
|
+
sensors: T,
|
|
2277
|
+
collisionDetection: R,
|
|
2272
2278
|
onDragStart: e.handleDragStart,
|
|
2273
2279
|
onDragOver: e.handleDragOver,
|
|
2274
2280
|
onDragEnd: e.handleDragEnd,
|
|
2275
2281
|
children: [
|
|
2276
|
-
e.zones.map((
|
|
2277
|
-
const
|
|
2278
|
-
|
|
2282
|
+
e.zones.map((r) => {
|
|
2283
|
+
const c = r.items.map((C) => C.id), b = r.items.map((C) => /* @__PURE__ */ g(
|
|
2284
|
+
ge,
|
|
2279
2285
|
{
|
|
2280
|
-
id:
|
|
2286
|
+
id: C.id,
|
|
2281
2287
|
useSortable: i.useSortable,
|
|
2282
|
-
cssHelper:
|
|
2283
|
-
children: a(
|
|
2288
|
+
cssHelper: l.CSS,
|
|
2289
|
+
children: a(C)
|
|
2284
2290
|
},
|
|
2285
|
-
|
|
2291
|
+
C.id
|
|
2286
2292
|
));
|
|
2287
|
-
return /* @__PURE__ */
|
|
2288
|
-
|
|
2293
|
+
return /* @__PURE__ */ g(
|
|
2294
|
+
be,
|
|
2289
2295
|
{
|
|
2290
|
-
zoneKey:
|
|
2291
|
-
zoneProps: e.getZoneProps(
|
|
2292
|
-
useDroppable:
|
|
2293
|
-
children: /* @__PURE__ */ h
|
|
2296
|
+
zoneKey: r.zoneKey,
|
|
2297
|
+
zoneProps: e.getZoneProps(r.zoneKey),
|
|
2298
|
+
useDroppable: u,
|
|
2299
|
+
children: /* @__PURE__ */ g(h, { items: c, strategy: x, children: n(r.zoneKey, r.items, b) })
|
|
2294
2300
|
},
|
|
2295
|
-
|
|
2301
|
+
r.zoneKey
|
|
2296
2302
|
);
|
|
2297
2303
|
}),
|
|
2298
|
-
/* @__PURE__ */
|
|
2304
|
+
/* @__PURE__ */ g(k, { children: e.activeItem ? o?.(e.activeItem) ?? a(e.activeItem) : null })
|
|
2299
2305
|
]
|
|
2300
2306
|
}
|
|
2301
2307
|
);
|
|
2302
2308
|
}
|
|
2303
|
-
|
|
2304
|
-
function
|
|
2305
|
-
const { attributes:
|
|
2306
|
-
transform:
|
|
2307
|
-
transition:
|
|
2308
|
-
opacity:
|
|
2309
|
+
pe.displayName = "SortableZonesInner";
|
|
2310
|
+
function ge({ id: e, useSortable: t, cssHelper: n, children: a }) {
|
|
2311
|
+
const { attributes: o, listeners: s, setNodeRef: i, transform: l, transition: f, isDragging: d } = t({ id: e }), D = {
|
|
2312
|
+
transform: n?.Transform?.toString(l) ?? void 0,
|
|
2313
|
+
transition: f,
|
|
2314
|
+
opacity: d ? 0.5 : 1
|
|
2309
2315
|
};
|
|
2310
|
-
return /* @__PURE__ */
|
|
2316
|
+
return /* @__PURE__ */ g("div", { ref: i, style: D, "data-sortable-item-id": e, ...o, ...s, children: a });
|
|
2311
2317
|
}
|
|
2312
|
-
|
|
2313
|
-
function
|
|
2318
|
+
ge.displayName = "SortableItem";
|
|
2319
|
+
function be({
|
|
2314
2320
|
zoneKey: e,
|
|
2315
2321
|
zoneProps: t,
|
|
2316
|
-
useDroppable:
|
|
2322
|
+
useDroppable: n,
|
|
2317
2323
|
children: a
|
|
2318
2324
|
}) {
|
|
2319
|
-
const { setNodeRef:
|
|
2320
|
-
return /* @__PURE__ */
|
|
2325
|
+
const { setNodeRef: o, isOver: s } = n({ id: e });
|
|
2326
|
+
return /* @__PURE__ */ g("div", { ref: o, "data-zone-is-over": s || void 0, ...t, children: a });
|
|
2321
2327
|
}
|
|
2322
|
-
|
|
2323
|
-
const it = F.forwardRef(({ density: e = "compact", children: t, ...
|
|
2324
|
-
const
|
|
2325
|
-
return delete
|
|
2328
|
+
be.displayName = "ZoneDroppable";
|
|
2329
|
+
const it = F.forwardRef(({ density: e = "compact", children: t, ...n }, a) => {
|
|
2330
|
+
const o = { ...n };
|
|
2331
|
+
return delete o.className, delete o.style, /* @__PURE__ */ g("div", { ref: a, className: "gloss-container-toolbar", role: "toolbar", ...o, children: /* @__PURE__ */ g(ee, { region: "toolbar", density: e, children: t }) });
|
|
2326
2332
|
});
|
|
2327
2333
|
it.displayName = "ContainerToolbar";
|
|
2328
|
-
const lt = F.forwardRef(({ legend: e, description: t, density:
|
|
2329
|
-
const i = { ...
|
|
2334
|
+
const lt = F.forwardRef(({ legend: e, description: t, density: n = "default", children: a, ...o }, s) => {
|
|
2335
|
+
const i = { ...o };
|
|
2330
2336
|
return delete i.className, delete i.style, /* @__PURE__ */ A("fieldset", { ref: s, className: "gloss-container-form-section", ...i, children: [
|
|
2331
|
-
e && /* @__PURE__ */
|
|
2332
|
-
t && /* @__PURE__ */
|
|
2333
|
-
/* @__PURE__ */
|
|
2337
|
+
e && /* @__PURE__ */ g("legend", { className: "gloss-container-form-section__legend", children: e }),
|
|
2338
|
+
t && /* @__PURE__ */ g("p", { className: "gloss-container-form-section__description", children: t }),
|
|
2339
|
+
/* @__PURE__ */ g(ee, { region: "form-section", density: n, children: a })
|
|
2334
2340
|
] });
|
|
2335
2341
|
});
|
|
2336
2342
|
lt.displayName = "ContainerFormSection";
|
|
2337
|
-
const dt = F.forwardRef(({ density: e = "compact", children: t, ...
|
|
2338
|
-
const
|
|
2339
|
-
return delete
|
|
2343
|
+
const dt = F.forwardRef(({ density: e = "compact", children: t, ...n }, a) => {
|
|
2344
|
+
const o = { ...n };
|
|
2345
|
+
return delete o.className, delete o.style, /* @__PURE__ */ g("div", { ref: a, className: "gloss-container-table", ...o, children: /* @__PURE__ */ g(ee, { region: "table", density: e, children: t }) });
|
|
2340
2346
|
});
|
|
2341
2347
|
dt.displayName = "ContainerTable";
|
|
2342
2348
|
export {
|
|
@@ -2379,8 +2385,8 @@ export {
|
|
|
2379
2385
|
Ga as ContainerCardHeader,
|
|
2380
2386
|
Ha as ContainerCardMedia,
|
|
2381
2387
|
za as ContainerCardSubtitle,
|
|
2382
|
-
|
|
2383
|
-
|
|
2388
|
+
Va as ContainerCardTitle,
|
|
2389
|
+
Za as ContainerDialog,
|
|
2384
2390
|
Wa as ContainerDialogActions,
|
|
2385
2391
|
Ya as ContainerDialogBody,
|
|
2386
2392
|
qa as ContainerDialogHeader,
|
|
@@ -2440,15 +2446,15 @@ export {
|
|
|
2440
2446
|
Kr as MergePrompt,
|
|
2441
2447
|
Gr as MetricCard,
|
|
2442
2448
|
Hr as MetricCardGrid,
|
|
2443
|
-
|
|
2449
|
+
Ze as MetricGroupContainer,
|
|
2444
2450
|
zr as MiniCalendar,
|
|
2445
|
-
|
|
2446
|
-
|
|
2451
|
+
Vr as MultiSelect,
|
|
2452
|
+
Zr as NumberInput,
|
|
2447
2453
|
Wr as ObjectArrow,
|
|
2448
2454
|
Yr as OrderFilterBar,
|
|
2449
2455
|
To as PERIOD_OPTIONS,
|
|
2450
2456
|
Le as PageChip,
|
|
2451
|
-
|
|
2457
|
+
le as PageDropdown,
|
|
2452
2458
|
qr as PasswordInput,
|
|
2453
2459
|
Ur as PaymentForm,
|
|
2454
2460
|
jr as PaymentMethodSelect,
|
|
@@ -2501,7 +2507,7 @@ export {
|
|
|
2501
2507
|
$n as TrendCard,
|
|
2502
2508
|
Bn as TrendIndicator,
|
|
2503
2509
|
Do as UIContext,
|
|
2504
|
-
|
|
2510
|
+
ee as UIContextProvider,
|
|
2505
2511
|
Kn as UnifiedBreakdownTable,
|
|
2506
2512
|
Gn as UnifiedContextMenu,
|
|
2507
2513
|
Hn as addressGroupMetadata,
|
|
@@ -2515,13 +2521,13 @@ export {
|
|
|
2515
2521
|
Dt as circleSamples,
|
|
2516
2522
|
jt as compactLayout,
|
|
2517
2523
|
Bt as compactState,
|
|
2518
|
-
|
|
2519
|
-
|
|
2524
|
+
Vn as contactFormMetadata,
|
|
2525
|
+
Zn as contactSchema,
|
|
2520
2526
|
Kt as contextMenuFixtures,
|
|
2521
2527
|
Wn as creditCardFormMetadata,
|
|
2522
2528
|
Yn as creditCardSchema,
|
|
2523
2529
|
Se as dateChip,
|
|
2524
|
-
|
|
2530
|
+
ue as defaultControlBarState,
|
|
2525
2531
|
qn as destructiveModalMetadata,
|
|
2526
2532
|
Un as durations,
|
|
2527
2533
|
jn as easings,
|
|
@@ -2573,10 +2579,10 @@ export {
|
|
|
2573
2579
|
co as registrationFormMetadata,
|
|
2574
2580
|
uo as registrationSchema,
|
|
2575
2581
|
Ht as sampleCompareRanges,
|
|
2576
|
-
|
|
2582
|
+
Zt as sampleCustomMarkets,
|
|
2577
2583
|
Gt as sampleDateRange,
|
|
2578
2584
|
Wt as sampleMarketPresetData,
|
|
2579
|
-
|
|
2585
|
+
Vt as sampleMarkets,
|
|
2580
2586
|
qt as samplePeriodPresets,
|
|
2581
2587
|
zt as samplePreferences,
|
|
2582
2588
|
Yt as samplePresets,
|