@mt-gloss/ui 0.1.13 → 0.1.15
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-CTI-osAf.js → Expandable-ByRpX7qt.js} +791 -790
- package/catalog.js +2 -2
- package/index.js +492 -485
- package/lib/primitives/dashboard/MetricCard/CardShell.d.ts +1 -1
- package/lib/primitives/dashboard/MetricCard/types.d.ts +9 -0
- package/lib/primitives/dashboard/PageChip/PageChip.d.ts +1 -1
- package/lib/primitives/dashboard/PageChip/types.d.ts +4 -0
- package/lib/primitives/dashboard/SectionDivider/SectionDivider.d.ts +9 -1
- package/package.json +1 -1
- package/ui.css +1 -1
package/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { N as On, T as An, O as Ln, Q as $n, a3 as Bn, b6 as zn, az as Kn, ah as Wn, Z as Gn, an as Hn, K as Vn, a8 as jn, bn as Un, P as Zn, B as Yn, a as qn, y as Qn, H as Xn, bi as Jn, F as er, J as tr, A as ar, z as nr, bh as rr, E as sr, D as or, bw as ir, b as lr, C as cr, L as dr, o as ur, ad as mr, aN as gr, y as pr, H as fr, F as hr, J as br, A as vr, z as yr, E as wr, D as Dr, a$ as Nr, b2 as Cr, b1 as kr, b0 as _r, b3 as xr, aC as Sr, a5 as Mr, a4 as Tr, aq as Rr, k as Ir, m as Pr, aF as Fr, ab as Er, b8 as Or, a9 as Ar, bo as Lr, Y as $r, bG as Br, bF as zr, bH as Kr, ap as Wr, aQ as Gr, ba as Hr, bL as Vr, bu as jr, n as Ur, am as Zr, bA as Yr, br as qr, a0 as Qr, ar as Xr, a2 as Jr, bz as es, G as ts, d as as, aa as ns, bI as rs, aT as ss, r as os, v as is, I as ls, g as cs, aw as ds, bM as us, M as ms, w as gs, U as ps, X as fs, V as hs, W as bs, as as vs, bg as ys, bO as ws, bK as Ds, ao as Ns, t as Cs, bp as ks, aS as _s, aj as xs, aK as Ss, ag as Ms, al as Ts, au as Rs, aR as Is, ac as Ps, at as Fs, c as Es, R as Os, j as As, p as Ls, aH as $s, bx as Bs, by as zs, ai as Ks, ae as Ws, h as Gs, x as Hs, b7 as Vs, af as js, bN as Us, bc as Zs, bf as Ys, bd as qs, be as Qs, i as Xs, b9 as Js, bm as eo, S as to, bk as ao, bl as no, av as ro, bb as so, bP as oo, ak as io, s as lo, bJ as co, l as uo, f as mo, q as go, _ as po, $ as fo, a7 as ho, bj as bo, bv as vo, bC as yo, aA as wo, aB as Do, a6 as No, aO as Co, aP as ko, aD as _o, aE as xo, aG as So, aV as Mo, aW as To, bE as Ro, bD as Io, aY as Po, aZ as Fo, ax as Eo, ay as Oo, b5 as Ao, b4 as Lo, a_ as $o, aL as Bo, aM as zo, aX as Ko, aI as Wo, aJ as Go, u as Ho, bB as Vo, bq as jo, bs as Uo, bt as Zo, aU as Yo, a1 as qo, e as Qo } from "./Expandable-
|
|
2
|
-
import { jsxs as
|
|
1
|
+
import { N as On, T as An, O as Ln, Q as $n, a3 as Bn, b6 as zn, az as Kn, ah as Wn, Z as Gn, an as Hn, K as Vn, a8 as jn, bn as Un, P as Zn, B as Yn, a as qn, y as Qn, H as Xn, bi as Jn, F as er, J as tr, A as ar, z as nr, bh as rr, E as sr, D as or, bw as ir, b as lr, C as cr, L as dr, o as ur, ad as mr, aN as gr, y as pr, H as fr, F as hr, J as br, A as vr, z as yr, E as wr, D as Dr, a$ as Nr, b2 as Cr, b1 as kr, b0 as _r, b3 as xr, aC as Sr, a5 as Mr, a4 as Tr, aq as Rr, k as Ir, m as Pr, aF as Fr, ab as Er, b8 as Or, a9 as Ar, bo as Lr, Y as $r, bG as Br, bF as zr, bH as Kr, ap as Wr, aQ as Gr, ba as Hr, bL as Vr, bu as jr, n as Ur, am as Zr, bA as Yr, br as qr, a0 as Qr, ar as Xr, a2 as Jr, bz as es, G as ts, d as as, aa as ns, bI as rs, aT as ss, r as os, v as is, I as ls, g as cs, aw as ds, bM as us, M as ms, w as gs, U as ps, X as fs, V as hs, W as bs, as as vs, bg as ys, bO as ws, bK as Ds, ao as Ns, t as Cs, bp as ks, aS as _s, aj as xs, aK as Ss, ag as Ms, al as Ts, au as Rs, aR as Is, ac as Ps, at as Fs, c as Es, R as Os, j as As, p as Ls, aH as $s, bx as Bs, by as zs, ai as Ks, ae as Ws, h as Gs, x as Hs, b7 as Vs, af as js, bN as Us, bc as Zs, bf as Ys, bd as qs, be as Qs, i as Xs, b9 as Js, bm as eo, S as to, bk as ao, bl as no, av as ro, bb as so, bP as oo, ak as io, s as lo, bJ as co, l as uo, f as mo, q as go, _ as po, $ as fo, a7 as ho, bj as bo, bv as vo, bC as yo, aA as wo, aB as Do, a6 as No, aO as Co, aP as ko, aD as _o, aE as xo, aG as So, aV as Mo, aW as To, bE as Ro, bD as Io, aY as Po, aZ as Fo, ax as Eo, ay as Oo, b5 as Ao, b4 as Lo, a_ as $o, aL as Bo, aM as zo, aX as Ko, aI as Wo, aJ as Go, u as Ho, bB as Vo, bq as jo, bs as Uo, bt as Zo, aU as Yo, a1 as qo, e as Qo } from "./Expandable-ByRpX7qt.js";
|
|
2
|
+
import { jsxs as O, jsx as i, Fragment as be } from "react/jsx-runtime";
|
|
3
3
|
import * as qe from "react";
|
|
4
4
|
import H, { useRef as R, useEffect as L, useState as W, useCallback as y, forwardRef as Qe, useMemo as se, createContext as Xe, useContext as Je } from "react";
|
|
5
|
-
import { motion as de, useMotionValue as et, animate as
|
|
6
|
-
import { B as at, U as
|
|
5
|
+
import { motion as de, useMotionValue as et, animate as Se, useDragControls as tt } from "framer-motion";
|
|
6
|
+
import { B as at, U as Ce } from "./UIContext-C3E-k7HI.js";
|
|
7
7
|
import { a as Jo, u as ei } from "./UIContext-C3E-k7HI.js";
|
|
8
8
|
import { createPortal as nt } from "react-dom";
|
|
9
9
|
import { DEFAULT_MARKET_PRESETS as ai, DEFAULT_PINNED as ni, PERIOD_OPTIONS as ri, ROLLING_OPTIONS as si, TODAY_PRESET as oi, findPreset as ii, formatDateRange as li, formatMarketDates as ci, formatTrend as di, formatValue as ui, generateMarketId as mi, getAllPresets as gi, getDateRangeForPreset as pi, getPresetLabel as fi, isInRange as hi, isMarketActive as bi, isSameDay as vi, normalizePresetId as yi, toUppercasePresetId as wi } from "@mt-gloss/utils";
|
|
@@ -33,65 +33,65 @@ function xa(e) {
|
|
|
33
33
|
enabled: o = !0,
|
|
34
34
|
isItemDisabled: d,
|
|
35
35
|
onSelect: b,
|
|
36
|
-
onEscape:
|
|
37
|
-
} = e, [
|
|
38
|
-
(
|
|
39
|
-
n === void 0 && C(
|
|
36
|
+
onEscape: u
|
|
37
|
+
} = e, [g, C] = W(-1), m = n !== void 0 ? n : g, c = y(
|
|
38
|
+
(l) => {
|
|
39
|
+
n === void 0 && C(l), a?.(l);
|
|
40
40
|
},
|
|
41
41
|
[n, a]
|
|
42
|
-
),
|
|
43
|
-
(
|
|
44
|
-
const p =
|
|
42
|
+
), h = y(() => t.map((l, v) => ({ item: l, index: v })).filter(({ item: l, index: v }) => !d?.(l, v)).map(({ index: l }) => l), [t, d]), x = y(
|
|
43
|
+
(l, v) => {
|
|
44
|
+
const p = h();
|
|
45
45
|
if (p.length === 0) return -1;
|
|
46
|
-
const w = p.indexOf(
|
|
46
|
+
const w = p.indexOf(l);
|
|
47
47
|
if (w === -1)
|
|
48
|
-
return v === 1 ? p.find((M) => M >
|
|
48
|
+
return v === 1 ? p.find((M) => M > l) ?? (r ? p[0] : -1) : [...p].reverse().find((E) => E < l) ?? (r ? p[p.length - 1] : -1);
|
|
49
49
|
let k = w + v;
|
|
50
50
|
return r ? k = (k + p.length) % p.length : k = Math.max(0, Math.min(p.length - 1, k)), p[k];
|
|
51
51
|
},
|
|
52
|
-
[
|
|
53
|
-
),
|
|
54
|
-
const
|
|
55
|
-
|
|
56
|
-
}, [
|
|
57
|
-
const
|
|
58
|
-
|
|
59
|
-
}, [
|
|
60
|
-
const
|
|
61
|
-
|
|
62
|
-
}, [m,
|
|
63
|
-
const
|
|
64
|
-
|
|
65
|
-
}, [m,
|
|
52
|
+
[h, r]
|
|
53
|
+
), f = y(() => {
|
|
54
|
+
const l = h();
|
|
55
|
+
l.length > 0 && c(l[0]);
|
|
56
|
+
}, [h, c]), S = y(() => {
|
|
57
|
+
const l = h();
|
|
58
|
+
l.length > 0 && c(l[l.length - 1]);
|
|
59
|
+
}, [h, c]), I = y(() => {
|
|
60
|
+
const l = x(m, 1);
|
|
61
|
+
l !== -1 && c(l);
|
|
62
|
+
}, [m, x, c]), N = y(() => {
|
|
63
|
+
const l = x(m, -1);
|
|
64
|
+
l !== -1 && c(l);
|
|
65
|
+
}, [m, x, c]), _ = y(() => {
|
|
66
66
|
c(-1);
|
|
67
67
|
}, [c]), T = y(
|
|
68
|
-
(
|
|
68
|
+
(l) => {
|
|
69
69
|
if (!o) return;
|
|
70
|
-
const { key: v } =
|
|
70
|
+
const { key: v } = l, p = v === "ArrowUp" && (s === "vertical" || s === "both"), w = v === "ArrowDown" && (s === "vertical" || s === "both"), k = v === "ArrowLeft" && (s === "horizontal" || s === "both"), M = v === "ArrowRight" && (s === "horizontal" || s === "both");
|
|
71
71
|
if (p || k) {
|
|
72
|
-
|
|
72
|
+
l.preventDefault(), m === -1 ? S() : N();
|
|
73
73
|
return;
|
|
74
74
|
}
|
|
75
75
|
if (w || M) {
|
|
76
|
-
|
|
76
|
+
l.preventDefault(), m === -1 ? f() : I();
|
|
77
77
|
return;
|
|
78
78
|
}
|
|
79
79
|
if (v === "Home") {
|
|
80
|
-
|
|
80
|
+
l.preventDefault(), f();
|
|
81
81
|
return;
|
|
82
82
|
}
|
|
83
83
|
if (v === "End") {
|
|
84
|
-
|
|
84
|
+
l.preventDefault(), S();
|
|
85
85
|
return;
|
|
86
86
|
}
|
|
87
87
|
if ((v === "Enter" || v === " ") && m >= 0 && m < t.length) {
|
|
88
|
-
|
|
88
|
+
l.preventDefault();
|
|
89
89
|
const E = t[m];
|
|
90
90
|
d?.(E, m) || b?.(E, m);
|
|
91
91
|
return;
|
|
92
92
|
}
|
|
93
93
|
if (v === "Escape") {
|
|
94
|
-
|
|
94
|
+
u?.();
|
|
95
95
|
return;
|
|
96
96
|
}
|
|
97
97
|
},
|
|
@@ -100,21 +100,21 @@ function xa(e) {
|
|
|
100
100
|
s,
|
|
101
101
|
m,
|
|
102
102
|
t,
|
|
103
|
-
|
|
104
|
-
|
|
103
|
+
f,
|
|
104
|
+
S,
|
|
105
105
|
I,
|
|
106
106
|
N,
|
|
107
107
|
d,
|
|
108
108
|
b,
|
|
109
|
-
|
|
109
|
+
u
|
|
110
110
|
]
|
|
111
111
|
);
|
|
112
112
|
return {
|
|
113
113
|
focusedIndex: m,
|
|
114
114
|
setFocusedIndex: c,
|
|
115
115
|
handleKeyDown: T,
|
|
116
|
-
focusFirst:
|
|
117
|
-
focusLast:
|
|
116
|
+
focusFirst: f,
|
|
117
|
+
focusLast: S,
|
|
118
118
|
focusNext: I,
|
|
119
119
|
focusPrevious: N,
|
|
120
120
|
resetFocus: _
|
|
@@ -195,7 +195,7 @@ const ue = (e) => {
|
|
|
195
195
|
{ variant: "value", colSpan: 1 },
|
|
196
196
|
{ variant: "trend", colSpan: 2 },
|
|
197
197
|
{ variant: "target", colSpan: 1 }
|
|
198
|
-
],
|
|
198
|
+
], Me = {
|
|
199
199
|
position: "fixed",
|
|
200
200
|
zIndex: 9999,
|
|
201
201
|
background: "rgba(255,255,255,0.92)",
|
|
@@ -207,7 +207,7 @@ const ue = (e) => {
|
|
|
207
207
|
minWidth: 148,
|
|
208
208
|
paddingTop: 4,
|
|
209
209
|
paddingBottom: 4
|
|
210
|
-
},
|
|
210
|
+
}, ve = (e) => ({
|
|
211
211
|
padding: "6px 12px",
|
|
212
212
|
fontSize: 12,
|
|
213
213
|
lineHeight: 1.4,
|
|
@@ -222,7 +222,7 @@ const ue = (e) => {
|
|
|
222
222
|
textAlign: "left",
|
|
223
223
|
border: "none"
|
|
224
224
|
}), pt = (e) => ({
|
|
225
|
-
...
|
|
225
|
+
...ve(e),
|
|
226
226
|
color: e ? "#4338ca" : "#4f46e5",
|
|
227
227
|
fontWeight: 600
|
|
228
228
|
}), ft = {
|
|
@@ -239,38 +239,38 @@ function ht({
|
|
|
239
239
|
overflowActions: s,
|
|
240
240
|
onClose: o
|
|
241
241
|
}) {
|
|
242
|
-
const [d, b] = W(null),
|
|
243
|
-
if (!t) return { ...
|
|
242
|
+
const [d, b] = W(null), u = R(null), g = y(() => {
|
|
243
|
+
if (!t) return { ...Me, top: 0, left: 0 };
|
|
244
244
|
const c = t.getBoundingClientRect();
|
|
245
245
|
return {
|
|
246
|
-
...
|
|
246
|
+
...Me,
|
|
247
247
|
top: c.bottom + 4,
|
|
248
248
|
left: c.left
|
|
249
249
|
};
|
|
250
250
|
}, [t]);
|
|
251
251
|
if (L(() => {
|
|
252
252
|
if (!e) return;
|
|
253
|
-
const c = (
|
|
254
|
-
|
|
253
|
+
const c = (h) => {
|
|
254
|
+
h.key === "Escape" && o();
|
|
255
255
|
};
|
|
256
256
|
return document.addEventListener("keydown", c), () => document.removeEventListener("keydown", c);
|
|
257
257
|
}, [e, o]), L(() => {
|
|
258
258
|
if (!e) return;
|
|
259
|
-
const c = (
|
|
260
|
-
|
|
259
|
+
const c = (h) => {
|
|
260
|
+
u.current && !u.current.contains(h.target) && o();
|
|
261
261
|
};
|
|
262
262
|
return document.addEventListener("pointerdown", c, !0), () => document.removeEventListener("pointerdown", c, !0);
|
|
263
263
|
}, [e, o]), !e) return null;
|
|
264
|
-
const C = s && s.length > 0, m = /* @__PURE__ */
|
|
264
|
+
const C = s && s.length > 0, m = /* @__PURE__ */ O(
|
|
265
265
|
"div",
|
|
266
266
|
{
|
|
267
|
-
ref:
|
|
267
|
+
ref: u,
|
|
268
268
|
"data-status-chip-menu": n,
|
|
269
269
|
role: "menu",
|
|
270
270
|
"aria-label": "Status actions",
|
|
271
|
-
style:
|
|
271
|
+
style: g(),
|
|
272
272
|
children: [
|
|
273
|
-
/* @__PURE__ */
|
|
273
|
+
/* @__PURE__ */ i(
|
|
274
274
|
"button",
|
|
275
275
|
{
|
|
276
276
|
role: "menuitem",
|
|
@@ -283,11 +283,11 @@ function ht({
|
|
|
283
283
|
children: "Open in table"
|
|
284
284
|
}
|
|
285
285
|
),
|
|
286
|
-
/* @__PURE__ */
|
|
286
|
+
/* @__PURE__ */ i(
|
|
287
287
|
"button",
|
|
288
288
|
{
|
|
289
289
|
role: "menuitem",
|
|
290
|
-
style:
|
|
290
|
+
style: ve(d === "__graph"),
|
|
291
291
|
onMouseEnter: () => b("__graph"),
|
|
292
292
|
onMouseLeave: () => b(null),
|
|
293
293
|
onClick: () => {
|
|
@@ -296,12 +296,12 @@ function ht({
|
|
|
296
296
|
children: "Show on graph"
|
|
297
297
|
}
|
|
298
298
|
),
|
|
299
|
-
C && /* @__PURE__ */
|
|
300
|
-
C && s?.map((c) => /* @__PURE__ */
|
|
299
|
+
C && /* @__PURE__ */ i("div", { style: ft }),
|
|
300
|
+
C && s?.map((c) => /* @__PURE__ */ i(
|
|
301
301
|
"button",
|
|
302
302
|
{
|
|
303
303
|
role: "menuitem",
|
|
304
|
-
style:
|
|
304
|
+
style: ve(d === c.id),
|
|
305
305
|
onMouseEnter: () => b(c.id),
|
|
306
306
|
onMouseLeave: () => b(null),
|
|
307
307
|
onClick: () => {
|
|
@@ -365,7 +365,7 @@ function Ga() {
|
|
|
365
365
|
return "full";
|
|
366
366
|
}
|
|
367
367
|
}
|
|
368
|
-
const
|
|
368
|
+
const Fe = ({ visible: e, variant: t, trigger: n, children: a, className: r }) => {
|
|
369
369
|
const s = {
|
|
370
370
|
"--gloss-swing-enter-ms": `${ae.enterDurationMs}ms`,
|
|
371
371
|
"--gloss-swing-exit-ms": `${ae.exitDurationMs}ms`,
|
|
@@ -378,7 +378,7 @@ const Pe = ({ visible: e, variant: t, trigger: n, children: a, className: r }) =
|
|
|
378
378
|
n === "hover+focus" ? "gloss-swing-reveal--hover-focus" : "",
|
|
379
379
|
r ?? ""
|
|
380
380
|
].filter(Boolean).join(" ");
|
|
381
|
-
return /* @__PURE__ */
|
|
381
|
+
return /* @__PURE__ */ i(
|
|
382
382
|
"span",
|
|
383
383
|
{
|
|
384
384
|
"data-testid": "gloss-swing-reveal",
|
|
@@ -390,26 +390,26 @@ const Pe = ({ visible: e, variant: t, trigger: n, children: a, className: r }) =
|
|
|
390
390
|
}
|
|
391
391
|
);
|
|
392
392
|
}, bt = Qe(
|
|
393
|
-
function({ state: t, onPointerDown: n, onPointerUp: a, onPointerEnter: r, onPointerLeave: s, onKeyboardStep: o, edge: d = "right", ariaLabel: b = "Resize card" },
|
|
394
|
-
const
|
|
393
|
+
function({ state: t, onPointerDown: n, onPointerUp: a, onPointerEnter: r, onPointerLeave: s, onKeyboardStep: o, edge: d = "right", ariaLabel: b = "Resize card" }, u) {
|
|
394
|
+
const g = t === "handle-visible" || t === "dragging" || t === "settling", C = (h) => {
|
|
395
395
|
try {
|
|
396
|
-
|
|
396
|
+
h.currentTarget.setPointerCapture(h.pointerId);
|
|
397
397
|
} catch {
|
|
398
398
|
}
|
|
399
|
-
n(
|
|
400
|
-
}, m = (
|
|
399
|
+
n(h);
|
|
400
|
+
}, m = (h) => {
|
|
401
401
|
try {
|
|
402
|
-
|
|
402
|
+
h.currentTarget.hasPointerCapture?.(h.pointerId) && h.currentTarget.releasePointerCapture(h.pointerId);
|
|
403
403
|
} catch {
|
|
404
404
|
}
|
|
405
|
-
a(
|
|
406
|
-
}, c = (
|
|
407
|
-
!
|
|
405
|
+
a(h);
|
|
406
|
+
}, c = (h) => {
|
|
407
|
+
!g || !o || (h.key === "ArrowRight" ? (h.preventDefault(), o("grow")) : h.key === "ArrowLeft" && (h.preventDefault(), o("shrink")));
|
|
408
408
|
};
|
|
409
|
-
return /* @__PURE__ */
|
|
409
|
+
return /* @__PURE__ */ i(Fe, { visible: g, variant: "handle", trigger: "hover", children: /* @__PURE__ */ i(
|
|
410
410
|
"button",
|
|
411
411
|
{
|
|
412
|
-
ref:
|
|
412
|
+
ref: u,
|
|
413
413
|
type: "button",
|
|
414
414
|
"aria-label": b,
|
|
415
415
|
"data-edge": d,
|
|
@@ -417,14 +417,14 @@ const Pe = ({ visible: e, variant: t, trigger: n, children: a, className: r }) =
|
|
|
417
417
|
className: [
|
|
418
418
|
"gloss-edge-handle",
|
|
419
419
|
`gloss-edge-handle--${d}`,
|
|
420
|
-
|
|
420
|
+
g ? "gloss-edge-handle--visible" : ""
|
|
421
421
|
].filter(Boolean).join(" "),
|
|
422
422
|
onPointerDown: C,
|
|
423
423
|
onPointerUp: m,
|
|
424
424
|
onPointerEnter: r,
|
|
425
425
|
onPointerLeave: s,
|
|
426
426
|
onKeyDown: c,
|
|
427
|
-
tabIndex:
|
|
427
|
+
tabIndex: g ? 0 : -1
|
|
428
428
|
}
|
|
429
429
|
) });
|
|
430
430
|
}
|
|
@@ -437,7 +437,7 @@ function vt({
|
|
|
437
437
|
enterMs: a = 180,
|
|
438
438
|
exitMs: r = 120
|
|
439
439
|
}) {
|
|
440
|
-
return /* @__PURE__ */
|
|
440
|
+
return /* @__PURE__ */ i(
|
|
441
441
|
de.div,
|
|
442
442
|
{
|
|
443
443
|
"aria-hidden": "true",
|
|
@@ -479,14 +479,14 @@ class yt {
|
|
|
479
479
|
const t = this.samples.length;
|
|
480
480
|
if (t < 2) return 0;
|
|
481
481
|
if (t === 2) {
|
|
482
|
-
const [b,
|
|
483
|
-
return (
|
|
482
|
+
const [b, u] = this.samples, g = Math.max(1, u.t - b.t);
|
|
483
|
+
return (u.x - b.x) / g * 1e3;
|
|
484
484
|
}
|
|
485
485
|
const [n, a, r] = this.samples, s = (r.x - a.x) / Math.max(1, r.t - a.t) * 1e3, o = (a.x - n.x) / Math.max(1, a.t - n.t) * 1e3, d = o;
|
|
486
486
|
return (s * 3 + o * 2 + d * 1) / 6;
|
|
487
487
|
}
|
|
488
488
|
}
|
|
489
|
-
const
|
|
489
|
+
const Ee = {
|
|
490
490
|
// Spring (D-08). Retuned 260419 — damping 35 → 22 so the commit spring
|
|
491
491
|
// has visible overshoot (ζ ≈ 0.49, ~13–17% overshoot, ~350ms settle). The
|
|
492
492
|
// prior ζ ≈ 0.78 was imperceptible to users. Debug slug:
|
|
@@ -516,12 +516,12 @@ function Ha({
|
|
|
516
516
|
tuning: o,
|
|
517
517
|
dwellMs: d = 120,
|
|
518
518
|
enterMs: b = 180,
|
|
519
|
-
exitMs:
|
|
520
|
-
maxColSpan:
|
|
519
|
+
exitMs: u = 120,
|
|
520
|
+
maxColSpan: g = 3,
|
|
521
521
|
containerRef: C,
|
|
522
522
|
forceIdle: m
|
|
523
523
|
}) {
|
|
524
|
-
const [c,
|
|
524
|
+
const [c, h] = W("idle"), [x, f] = W(e), S = R(null), I = R(null), N = R(null), _ = R(r), T = R(s), l = R(g), v = R(0), p = R("idle");
|
|
525
525
|
L(() => {
|
|
526
526
|
p.current = c;
|
|
527
527
|
}, [c]);
|
|
@@ -542,25 +542,25 @@ function Ha({
|
|
|
542
542
|
[]
|
|
543
543
|
), G = R(new yt()), V = R(e);
|
|
544
544
|
L(() => {
|
|
545
|
-
V.current =
|
|
546
|
-
}, [
|
|
547
|
-
const $ = se(() => ({ ...
|
|
548
|
-
|
|
545
|
+
V.current = x;
|
|
546
|
+
}, [x]);
|
|
547
|
+
const $ = se(() => ({ ...Ee, ...o ?? {} }), [o]), A = y(() => {
|
|
548
|
+
S.current && (clearTimeout(S.current), S.current = null);
|
|
549
549
|
}, []), j = y(() => {
|
|
550
550
|
I.current && (clearTimeout(I.current), I.current = null);
|
|
551
551
|
}, []);
|
|
552
552
|
L(() => {
|
|
553
|
-
m && (p.current === "dragging" || p.current === "settling" || (
|
|
554
|
-
}, [m,
|
|
553
|
+
m && (p.current === "dragging" || p.current === "settling" || (A(), j(), p.current = "idle", h("idle")));
|
|
554
|
+
}, [m, A, j]);
|
|
555
555
|
const oe = y(() => {
|
|
556
|
-
|
|
556
|
+
h((D) => D === "settling" || D !== "idle" ? D : (S.current = setTimeout(() => h("handle-visible"), d), "dwelling"));
|
|
557
557
|
}, [d]), K = y(() => {
|
|
558
|
-
|
|
559
|
-
}, [
|
|
558
|
+
A(), h((D) => D === "dwelling" || D === "handle-visible" ? "idle" : D);
|
|
559
|
+
}, [A]), ie = y(
|
|
560
560
|
(D, P, F) => {
|
|
561
561
|
const B = _.current, Q = B * $.snapInFraction, Z = B * $.snapOutFraction, Y = P - F, q = Math.max(
|
|
562
562
|
F,
|
|
563
|
-
|
|
563
|
+
l.current ?? g
|
|
564
564
|
);
|
|
565
565
|
let z = Y;
|
|
566
566
|
for (; F + z < q; ) {
|
|
@@ -576,69 +576,69 @@ function Ha({
|
|
|
576
576
|
}
|
|
577
577
|
return Math.min(q, Math.max(1, F + z));
|
|
578
578
|
},
|
|
579
|
-
[$.snapInFraction, $.snapOutFraction,
|
|
580
|
-
),
|
|
579
|
+
[$.snapInFraction, $.snapOutFraction, g]
|
|
580
|
+
), He = y(
|
|
581
581
|
(D) => {
|
|
582
582
|
if (p.current !== "handle-visible") return;
|
|
583
|
-
M(), N.current = D.clientX, _.current = r, T.current = s,
|
|
583
|
+
M(), N.current = D.clientX, _.current = r, T.current = s, l.current = g;
|
|
584
584
|
const P = e * r + (e - 1) * s;
|
|
585
|
-
v.current = P, G.current.clear(), G.current.push({ x: D.clientX, t: performance.now() }), w.jump(P), p.current = "dragging",
|
|
585
|
+
v.current = P, G.current.clear(), G.current.push({ x: D.clientX, t: performance.now() }), w.jump(P), p.current = "dragging", h("dragging");
|
|
586
586
|
},
|
|
587
|
-
[r, s,
|
|
588
|
-
),
|
|
587
|
+
[r, s, g, e, w, M]
|
|
588
|
+
), ke = y(
|
|
589
589
|
(D) => D * _.current + (D - 1) * T.current,
|
|
590
590
|
[]
|
|
591
591
|
), le = y(
|
|
592
592
|
(D, P) => {
|
|
593
|
-
const F =
|
|
593
|
+
const F = ke(D), B = D !== e;
|
|
594
594
|
if (typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches) {
|
|
595
|
-
w.jump(F), B && P ? n({ direction: P, targetColSpan: D, mode: t ? "slot-fill" : "sparkline-fidelity" }) : B || a?.(), w.jump(0), p.current = "idle",
|
|
595
|
+
w.jump(F), B && P ? n({ direction: P, targetColSpan: D, mode: t ? "slot-fill" : "sparkline-fidelity" }) : B || a?.(), w.jump(0), p.current = "idle", h("idle");
|
|
596
596
|
return;
|
|
597
597
|
}
|
|
598
598
|
const Z = G.current.getWeightedVelocity() * $.velocityMultiplier;
|
|
599
|
-
p.current = "settling",
|
|
599
|
+
p.current = "settling", h("settling"), M(), k.current = Se(w, F, {
|
|
600
600
|
type: "spring",
|
|
601
601
|
stiffness: $.stiffness,
|
|
602
602
|
damping: $.damping,
|
|
603
603
|
mass: $.mass,
|
|
604
604
|
velocity: Z,
|
|
605
605
|
onComplete: () => {
|
|
606
|
-
k.current = null, B && P ? n({ direction: P, targetColSpan: D, mode: t ? "slot-fill" : "sparkline-fidelity" }) : B || a?.(), w.jump(0), p.current = "idle",
|
|
606
|
+
k.current = null, B && P ? n({ direction: P, targetColSpan: D, mode: t ? "slot-fill" : "sparkline-fidelity" }) : B || a?.(), w.jump(0), p.current = "idle", h("idle");
|
|
607
607
|
}
|
|
608
608
|
});
|
|
609
609
|
},
|
|
610
|
-
[
|
|
611
|
-
),
|
|
610
|
+
[ke, e, t, n, a, w, $, M]
|
|
611
|
+
), Ve = y(
|
|
612
612
|
(D) => {
|
|
613
613
|
if (p.current !== "dragging") return;
|
|
614
|
-
const P = D.clientX - (N.current ?? D.clientX), F = _.current, Q = ((
|
|
614
|
+
const P = D.clientX - (N.current ?? D.clientX), F = _.current, Q = ((l.current ?? g) - e) * F, Z = (1 - e) * F, Y = Math.max(Z, Math.min(Q, P));
|
|
615
615
|
G.current.push({ x: D.clientX, t: performance.now() });
|
|
616
616
|
const q = ie(Y, V.current, e), z = q > e ? "grow" : q < e ? "shrink" : null;
|
|
617
617
|
le(q, z);
|
|
618
618
|
},
|
|
619
|
-
[ie, e,
|
|
619
|
+
[ie, e, g, le]
|
|
620
620
|
), me = y(() => {
|
|
621
|
-
if (
|
|
621
|
+
if (A(), p.current === "dragging") {
|
|
622
622
|
const D = v.current;
|
|
623
623
|
if (typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches) {
|
|
624
|
-
w.jump(D), a?.(), w.jump(0), p.current = "idle",
|
|
624
|
+
w.jump(D), a?.(), w.jump(0), p.current = "idle", h("idle");
|
|
625
625
|
return;
|
|
626
626
|
}
|
|
627
627
|
const F = G.current.getWeightedVelocity();
|
|
628
|
-
p.current = "settling",
|
|
628
|
+
p.current = "settling", h("settling"), M(), k.current = Se(w, D, {
|
|
629
629
|
type: "spring",
|
|
630
630
|
stiffness: $.stiffness,
|
|
631
631
|
damping: $.damping,
|
|
632
632
|
mass: $.mass,
|
|
633
633
|
velocity: F,
|
|
634
634
|
onComplete: () => {
|
|
635
|
-
k.current = null, a?.(), w.jump(0), p.current = "idle",
|
|
635
|
+
k.current = null, a?.(), w.jump(0), p.current = "idle", h("idle");
|
|
636
636
|
}
|
|
637
637
|
});
|
|
638
638
|
return;
|
|
639
639
|
}
|
|
640
|
-
p.current === "handle-visible" && (a?.(), p.current = "cancelled",
|
|
641
|
-
}, [
|
|
640
|
+
p.current === "handle-visible" && (a?.(), p.current = "cancelled", h("cancelled"));
|
|
641
|
+
}, [A, w, a, $, M]);
|
|
642
642
|
L(() => {
|
|
643
643
|
if (c !== "dragging" && c !== "handle-visible") return;
|
|
644
644
|
const D = (P) => {
|
|
@@ -647,67 +647,67 @@ function Ha({
|
|
|
647
647
|
return window.addEventListener("keydown", D), () => window.removeEventListener("keydown", D);
|
|
648
648
|
}, [c, me]), L(() => {
|
|
649
649
|
if (c !== "dragging") {
|
|
650
|
-
|
|
650
|
+
f(e);
|
|
651
651
|
return;
|
|
652
652
|
}
|
|
653
653
|
const D = (P) => {
|
|
654
|
-
const F = P.clientX - (N.current ?? P.clientX), B = v.current, Q = E(1), Z = E(
|
|
654
|
+
const F = P.clientX - (N.current ?? P.clientX), B = v.current, Q = E(1), Z = E(g), Y = B + F, q = Math.max(Q, Math.min(Z, Y));
|
|
655
655
|
w.set(q);
|
|
656
|
-
const z = _.current,
|
|
656
|
+
const z = _.current, xe = (g - e) * z, te = (1 - e) * z, Ye = Math.max(te, Math.min(xe, F));
|
|
657
657
|
G.current.push({ x: P.clientX, t: performance.now() });
|
|
658
|
-
const ge = ie(
|
|
659
|
-
ge !== V.current && (V.current = ge,
|
|
658
|
+
const ge = ie(Ye, V.current, e);
|
|
659
|
+
ge !== V.current && (V.current = ge, f(ge));
|
|
660
660
|
};
|
|
661
661
|
return window.addEventListener("pointermove", D), () => window.removeEventListener("pointermove", D);
|
|
662
|
-
}, [c, e, w, ie,
|
|
663
|
-
|
|
664
|
-
}, [
|
|
662
|
+
}, [c, e, w, ie, g, E]), L(() => () => {
|
|
663
|
+
A(), j();
|
|
664
|
+
}, [A, j]), L(() => {
|
|
665
665
|
if (c !== "cancelled") return;
|
|
666
|
-
const D = setTimeout(() =>
|
|
666
|
+
const D = setTimeout(() => h("idle"), u);
|
|
667
667
|
return () => clearTimeout(D);
|
|
668
|
-
}, [c,
|
|
669
|
-
const
|
|
668
|
+
}, [c, u]);
|
|
669
|
+
const je = y(
|
|
670
670
|
(D) => {
|
|
671
671
|
if (p.current === "settling") return;
|
|
672
|
-
const F = Math.min(
|
|
672
|
+
const F = Math.min(g, Math.max(1, e + (D === "grow" ? 1 : -1)));
|
|
673
673
|
if (F === e) return;
|
|
674
|
-
_.current = r, T.current = s,
|
|
674
|
+
_.current = r, T.current = s, l.current = g, G.current.clear();
|
|
675
675
|
const B = e * r + (e - 1) * s;
|
|
676
676
|
v.current = B, w.jump(B), le(F, D);
|
|
677
677
|
},
|
|
678
|
-
[e, r, s,
|
|
679
|
-
),
|
|
678
|
+
[e, r, s, g, w, le]
|
|
679
|
+
), _e = y(() => {
|
|
680
680
|
j(), I.current = setTimeout(() => {
|
|
681
|
-
p.current === "handle-visible" && (p.current = "idle",
|
|
681
|
+
p.current === "handle-visible" && (p.current = "idle", h("idle"));
|
|
682
682
|
}, 5e3);
|
|
683
|
-
}, [j]),
|
|
684
|
-
p.current === "idle" && (
|
|
685
|
-
}, [
|
|
686
|
-
j(), p.current === "handle-visible" && (p.current = "idle",
|
|
683
|
+
}, [j]), Ue = y(() => {
|
|
684
|
+
p.current === "idle" && (A(), p.current = "handle-visible", h("handle-visible"), _e());
|
|
685
|
+
}, [A, _e]), Ze = y(() => {
|
|
686
|
+
j(), p.current === "handle-visible" && (p.current = "idle", h("idle"));
|
|
687
687
|
}, [j]);
|
|
688
688
|
return {
|
|
689
689
|
state: c,
|
|
690
690
|
enterEdgeZone: oe,
|
|
691
691
|
leaveEdgeZone: K,
|
|
692
692
|
handleProps: {
|
|
693
|
-
onPointerDown:
|
|
694
|
-
onPointerUp:
|
|
693
|
+
onPointerDown: He,
|
|
694
|
+
onPointerUp: Ve,
|
|
695
695
|
// Bug E: handle continues zone presence so pointer crossing sentinel→handle
|
|
696
696
|
// doesn't collapse state. handle's pointerenter = stay in zone.
|
|
697
697
|
onPointerEnter: oe,
|
|
698
698
|
onPointerLeave: K
|
|
699
699
|
},
|
|
700
|
-
previewColSpan:
|
|
700
|
+
previewColSpan: x,
|
|
701
701
|
ghostProps: {
|
|
702
702
|
visible: c === "dragging" || c === "settling",
|
|
703
|
-
targetColSpan:
|
|
703
|
+
targetColSpan: x,
|
|
704
704
|
ghostWidth: w,
|
|
705
705
|
enterMs: b,
|
|
706
|
-
exitMs:
|
|
706
|
+
exitMs: u
|
|
707
707
|
},
|
|
708
|
-
onKeyboardStep:
|
|
709
|
-
onTouchReveal:
|
|
710
|
-
onTouchDismiss:
|
|
708
|
+
onKeyboardStep: je,
|
|
709
|
+
onTouchReveal: Ue,
|
|
710
|
+
onTouchDismiss: Ze,
|
|
711
711
|
cancel: me
|
|
712
712
|
};
|
|
713
713
|
}
|
|
@@ -983,7 +983,7 @@ const ja = [
|
|
|
983
983
|
trend: { value: 0, direction: "flat" },
|
|
984
984
|
subtitle: "QTD"
|
|
985
985
|
};
|
|
986
|
-
function
|
|
986
|
+
function Oe({
|
|
987
987
|
open: e,
|
|
988
988
|
onDismiss: t,
|
|
989
989
|
anchorRef: n,
|
|
@@ -998,17 +998,17 @@ function Ee({
|
|
|
998
998
|
s(m), t();
|
|
999
999
|
},
|
|
1000
1000
|
[s, t]
|
|
1001
|
-
),
|
|
1001
|
+
), u = y(
|
|
1002
1002
|
(m, c) => {
|
|
1003
1003
|
(c.key === "Enter" || c.key === " ") && (c.preventDefault(), b(m));
|
|
1004
1004
|
},
|
|
1005
1005
|
[b]
|
|
1006
|
-
),
|
|
1006
|
+
), g = y(() => {
|
|
1007
1007
|
o(), t();
|
|
1008
1008
|
}, [o, t]), C = y(() => {
|
|
1009
1009
|
d(), t();
|
|
1010
1010
|
}, [d, t]);
|
|
1011
|
-
return /* @__PURE__ */
|
|
1011
|
+
return /* @__PURE__ */ O(
|
|
1012
1012
|
at,
|
|
1013
1013
|
{
|
|
1014
1014
|
definition: {
|
|
@@ -1022,9 +1022,9 @@ function Ee({
|
|
|
1022
1022
|
anchorRef: n,
|
|
1023
1023
|
className: "gloss-page-dropdown",
|
|
1024
1024
|
children: [
|
|
1025
|
-
/* @__PURE__ */
|
|
1025
|
+
/* @__PURE__ */ i("ul", { role: "menu", className: "gloss-page-dropdown__list", children: a.map((m) => {
|
|
1026
1026
|
const c = m.id === r;
|
|
1027
|
-
return /* @__PURE__ */
|
|
1027
|
+
return /* @__PURE__ */ O(
|
|
1028
1028
|
"li",
|
|
1029
1029
|
{
|
|
1030
1030
|
role: "menuitemradio",
|
|
@@ -1033,39 +1033,39 @@ function Ee({
|
|
|
1033
1033
|
tabIndex: 0,
|
|
1034
1034
|
className: `gloss-page-dropdown__item${c ? " gloss-page-dropdown__item--active" : ""}`,
|
|
1035
1035
|
onClick: () => b(m.id),
|
|
1036
|
-
onKeyDown: (
|
|
1036
|
+
onKeyDown: (h) => u(m.id, h),
|
|
1037
1037
|
children: [
|
|
1038
|
-
/* @__PURE__ */
|
|
1038
|
+
/* @__PURE__ */ i(
|
|
1039
1039
|
"span",
|
|
1040
1040
|
{
|
|
1041
1041
|
className: `gloss-page-dropdown__dot${c ? " gloss-page-dropdown__dot--active" : ""}`
|
|
1042
1042
|
}
|
|
1043
1043
|
),
|
|
1044
|
-
/* @__PURE__ */
|
|
1044
|
+
/* @__PURE__ */ i(
|
|
1045
1045
|
"span",
|
|
1046
1046
|
{
|
|
1047
1047
|
className: `gloss-page-dropdown__name${m.named ? "" : " gloss-page-dropdown__name--unnamed"}`,
|
|
1048
1048
|
children: m.name
|
|
1049
1049
|
}
|
|
1050
1050
|
),
|
|
1051
|
-
/* @__PURE__ */
|
|
1051
|
+
/* @__PURE__ */ i("span", { className: "gloss-page-dropdown__count", children: m.cardCount })
|
|
1052
1052
|
]
|
|
1053
1053
|
},
|
|
1054
1054
|
m.id
|
|
1055
1055
|
);
|
|
1056
1056
|
}) }),
|
|
1057
|
-
/* @__PURE__ */
|
|
1058
|
-
/* @__PURE__ */
|
|
1057
|
+
/* @__PURE__ */ i("hr", { className: "gloss-page-dropdown__separator" }),
|
|
1058
|
+
/* @__PURE__ */ i(
|
|
1059
1059
|
"button",
|
|
1060
1060
|
{
|
|
1061
1061
|
role: "menuitem",
|
|
1062
1062
|
className: "gloss-page-dropdown__action",
|
|
1063
|
-
onClick:
|
|
1063
|
+
onClick: g,
|
|
1064
1064
|
children: "+ New page"
|
|
1065
1065
|
}
|
|
1066
1066
|
),
|
|
1067
|
-
/* @__PURE__ */
|
|
1068
|
-
/* @__PURE__ */
|
|
1067
|
+
/* @__PURE__ */ i("hr", { className: "gloss-page-dropdown__separator" }),
|
|
1068
|
+
/* @__PURE__ */ i(
|
|
1069
1069
|
"button",
|
|
1070
1070
|
{
|
|
1071
1071
|
role: "menuitem",
|
|
@@ -1078,7 +1078,7 @@ function Ee({
|
|
|
1078
1078
|
}
|
|
1079
1079
|
);
|
|
1080
1080
|
}
|
|
1081
|
-
|
|
1081
|
+
Oe.displayName = "PageDropdown";
|
|
1082
1082
|
const xt = function({
|
|
1083
1083
|
currentIndex: t,
|
|
1084
1084
|
total: n,
|
|
@@ -1086,51 +1086,56 @@ const xt = function({
|
|
|
1086
1086
|
onPageChange: r,
|
|
1087
1087
|
onCreatePage: s,
|
|
1088
1088
|
onManagePages: o,
|
|
1089
|
-
maskRadius: d = "var(--gloss-radius-md)"
|
|
1089
|
+
maskRadius: d = "var(--gloss-radius-md)",
|
|
1090
|
+
displayMode: b = "count",
|
|
1091
|
+
activePage: u
|
|
1090
1092
|
}) {
|
|
1091
|
-
const
|
|
1092
|
-
|
|
1093
|
-
}, []),
|
|
1094
|
-
|
|
1095
|
-
}, []),
|
|
1096
|
-
return /* @__PURE__ */
|
|
1093
|
+
const g = R(null), [C, m] = W(!1), c = y(() => {
|
|
1094
|
+
m((f) => !f);
|
|
1095
|
+
}, []), h = y(() => {
|
|
1096
|
+
m(!1);
|
|
1097
|
+
}, []), x = a[t]?.id ?? "";
|
|
1098
|
+
return /* @__PURE__ */ O(
|
|
1097
1099
|
"div",
|
|
1098
1100
|
{
|
|
1099
1101
|
className: "gloss-page-chip",
|
|
1100
|
-
ref:
|
|
1102
|
+
ref: g,
|
|
1101
1103
|
style: { position: "absolute", top: 0, right: 0 },
|
|
1102
1104
|
"data-page-chip": !0,
|
|
1103
1105
|
children: [
|
|
1104
|
-
/* @__PURE__ */
|
|
1106
|
+
/* @__PURE__ */ i(
|
|
1105
1107
|
"div",
|
|
1106
1108
|
{
|
|
1107
1109
|
className: "gloss-page-chip__nuzzle",
|
|
1108
1110
|
style: { "--_nuzzle-r": d }
|
|
1109
1111
|
}
|
|
1110
1112
|
),
|
|
1111
|
-
/* @__PURE__ */
|
|
1113
|
+
/* @__PURE__ */ i(
|
|
1112
1114
|
"button",
|
|
1113
1115
|
{
|
|
1114
1116
|
className: "gloss-page-chip__trigger",
|
|
1115
1117
|
"aria-haspopup": "menu",
|
|
1116
|
-
"aria-expanded":
|
|
1117
|
-
"aria-label": `Page ${t + 1} of ${n}. Click to switch pages.`,
|
|
1118
|
-
onClick:
|
|
1119
|
-
children: [
|
|
1118
|
+
"aria-expanded": C,
|
|
1119
|
+
"aria-label": b === "name" ? `${u ?? "Page"}. Click to switch pages.` : `Page ${t + 1} of ${n}. Click to switch pages.`,
|
|
1120
|
+
onClick: c,
|
|
1121
|
+
children: b === "name" ? /* @__PURE__ */ O(be, { children: [
|
|
1122
|
+
/* @__PURE__ */ i("span", { className: "gloss-page-chip__trigger-name", children: u ?? "" }),
|
|
1123
|
+
/* @__PURE__ */ i("span", { className: "gloss-page-chip__trigger-chevron", "aria-hidden": "true", children: "▾" })
|
|
1124
|
+
] }) : /* @__PURE__ */ O(be, { children: [
|
|
1120
1125
|
t + 1,
|
|
1121
1126
|
" / ",
|
|
1122
1127
|
n
|
|
1123
|
-
]
|
|
1128
|
+
] })
|
|
1124
1129
|
}
|
|
1125
1130
|
),
|
|
1126
|
-
/* @__PURE__ */
|
|
1127
|
-
|
|
1131
|
+
/* @__PURE__ */ i(
|
|
1132
|
+
Oe,
|
|
1128
1133
|
{
|
|
1129
|
-
open:
|
|
1130
|
-
onDismiss:
|
|
1131
|
-
anchorRef:
|
|
1134
|
+
open: C,
|
|
1135
|
+
onDismiss: h,
|
|
1136
|
+
anchorRef: g,
|
|
1132
1137
|
pages: a,
|
|
1133
|
-
activePageId:
|
|
1138
|
+
activePageId: x,
|
|
1134
1139
|
onPageChange: r,
|
|
1135
1140
|
onCreatePage: s,
|
|
1136
1141
|
onManagePages: o
|
|
@@ -1408,13 +1413,13 @@ const Ja = [
|
|
|
1408
1413
|
lastDate: "2026-03-01"
|
|
1409
1414
|
}
|
|
1410
1415
|
];
|
|
1411
|
-
function
|
|
1416
|
+
function ye(e) {
|
|
1412
1417
|
return "$" + e.toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 2 });
|
|
1413
1418
|
}
|
|
1414
|
-
function
|
|
1419
|
+
function Ae(e) {
|
|
1415
1420
|
return e.toLocaleString("en-US");
|
|
1416
1421
|
}
|
|
1417
|
-
function
|
|
1422
|
+
function Le(e) {
|
|
1418
1423
|
return new Date(e).toLocaleDateString("en-US", { month: "short", day: "numeric", year: "numeric" });
|
|
1419
1424
|
}
|
|
1420
1425
|
const re = H.createElement("span", { style: { color: "var(--color-text-muted)" } }, "—"), tn = [
|
|
@@ -1447,7 +1452,7 @@ const re = H.createElement("span", { style: { color: "var(--color-text-muted)" }
|
|
|
1447
1452
|
align: "right",
|
|
1448
1453
|
headerAlign: "right",
|
|
1449
1454
|
cellClassName: "gloss-tabular-nums",
|
|
1450
|
-
renderCell: ({ row: e }) => e.skuCount ?
|
|
1455
|
+
renderCell: ({ row: e }) => e.skuCount ? Ae(e.skuCount) : re
|
|
1451
1456
|
},
|
|
1452
1457
|
{
|
|
1453
1458
|
field: "total",
|
|
@@ -1457,7 +1462,7 @@ const re = H.createElement("span", { style: { color: "var(--color-text-muted)" }
|
|
|
1457
1462
|
align: "right",
|
|
1458
1463
|
headerAlign: "right",
|
|
1459
1464
|
cellClassName: "gloss-tabular-nums",
|
|
1460
|
-
renderCell: ({ row: e }) => e.total ?
|
|
1465
|
+
renderCell: ({ row: e }) => e.total ? ye(e.total) : re
|
|
1461
1466
|
},
|
|
1462
1467
|
{
|
|
1463
1468
|
field: "date",
|
|
@@ -1467,7 +1472,7 @@ const re = H.createElement("span", { style: { color: "var(--color-text-muted)" }
|
|
|
1467
1472
|
align: "right",
|
|
1468
1473
|
headerAlign: "right",
|
|
1469
1474
|
cellClassName: "gloss-tabular-nums",
|
|
1470
|
-
renderCell: ({ row: e }) => e.date ?
|
|
1475
|
+
renderCell: ({ row: e }) => e.date ? Le(e.date) : ""
|
|
1471
1476
|
}
|
|
1472
1477
|
], an = [
|
|
1473
1478
|
{
|
|
@@ -1501,7 +1506,7 @@ const re = H.createElement("span", { style: { color: "var(--color-text-muted)" }
|
|
|
1501
1506
|
align: "right",
|
|
1502
1507
|
headerAlign: "right",
|
|
1503
1508
|
cellClassName: "gloss-tabular-nums",
|
|
1504
|
-
renderCell: ({ row: e }) => e.price ?
|
|
1509
|
+
renderCell: ({ row: e }) => e.price ? ye(e.price) : re
|
|
1505
1510
|
},
|
|
1506
1511
|
{
|
|
1507
1512
|
field: "quantity",
|
|
@@ -1511,7 +1516,7 @@ const re = H.createElement("span", { style: { color: "var(--color-text-muted)" }
|
|
|
1511
1516
|
align: "right",
|
|
1512
1517
|
headerAlign: "right",
|
|
1513
1518
|
cellClassName: "gloss-tabular-nums gloss-drillable",
|
|
1514
|
-
renderCell: ({ row: e }) => e.quantity ?
|
|
1519
|
+
renderCell: ({ row: e }) => e.quantity ? Ae(e.quantity) : re
|
|
1515
1520
|
},
|
|
1516
1521
|
{
|
|
1517
1522
|
field: "total",
|
|
@@ -1521,7 +1526,7 @@ const re = H.createElement("span", { style: { color: "var(--color-text-muted)" }
|
|
|
1521
1526
|
align: "right",
|
|
1522
1527
|
headerAlign: "right",
|
|
1523
1528
|
cellClassName: "gloss-tabular-nums gloss-drillable",
|
|
1524
|
-
renderCell: ({ row: e }) => e.total ?
|
|
1529
|
+
renderCell: ({ row: e }) => e.total ? ye(e.total) : re
|
|
1525
1530
|
},
|
|
1526
1531
|
{
|
|
1527
1532
|
field: "lastDate",
|
|
@@ -1531,7 +1536,7 @@ const re = H.createElement("span", { style: { color: "var(--color-text-muted)" }
|
|
|
1531
1536
|
align: "right",
|
|
1532
1537
|
headerAlign: "right",
|
|
1533
1538
|
cellClassName: "gloss-tabular-nums",
|
|
1534
|
-
renderCell: ({ row: e }) => e.lastDate ?
|
|
1539
|
+
renderCell: ({ row: e }) => e.lastDate ? Le(e.lastDate) : ""
|
|
1535
1540
|
}
|
|
1536
1541
|
], St = [
|
|
1537
1542
|
{ id: "c-001", label: "ABC Home Goods" },
|
|
@@ -1547,8 +1552,8 @@ const re = H.createElement("span", { style: { color: "var(--color-text-muted)" }
|
|
|
1547
1552
|
{ id: "i-005", label: "Velvet Accent Cushion" }
|
|
1548
1553
|
], pe = (e) => {
|
|
1549
1554
|
}, Tt = (e) => {
|
|
1550
|
-
},
|
|
1551
|
-
},
|
|
1555
|
+
}, Te = (e, t) => {
|
|
1556
|
+
}, $e = {
|
|
1552
1557
|
vizState: {
|
|
1553
1558
|
type: "orders",
|
|
1554
1559
|
quant: "$",
|
|
@@ -1559,14 +1564,14 @@ const re = H.createElement("span", { style: { color: "var(--color-text-muted)" }
|
|
|
1559
1564
|
onTypeChange: pe,
|
|
1560
1565
|
onQuantChange: Tt,
|
|
1561
1566
|
onEntityTypeChange: pe,
|
|
1562
|
-
onEntitySelect:
|
|
1563
|
-
onItemSelect:
|
|
1567
|
+
onEntitySelect: Te,
|
|
1568
|
+
onItemSelect: Te,
|
|
1564
1569
|
onTimeFrameChange: pe,
|
|
1565
1570
|
userType: "sales-agency",
|
|
1566
1571
|
entityFilterOptions: St,
|
|
1567
1572
|
itemFilterOptions: Mt
|
|
1568
1573
|
}, nn = {
|
|
1569
|
-
|
|
1574
|
+
...$e,
|
|
1570
1575
|
vizState: {
|
|
1571
1576
|
type: "items",
|
|
1572
1577
|
quant: "$",
|
|
@@ -1575,7 +1580,7 @@ const re = H.createElement("span", { style: { color: "var(--color-text-muted)" }
|
|
|
1575
1580
|
timeFrame: "YTD"
|
|
1576
1581
|
}
|
|
1577
1582
|
}, rn = {
|
|
1578
|
-
|
|
1583
|
+
...$e,
|
|
1579
1584
|
vizState: {
|
|
1580
1585
|
type: "orders",
|
|
1581
1586
|
quant: "#",
|
|
@@ -1799,7 +1804,7 @@ const re = H.createElement("span", { style: { color: "var(--color-text-muted)" }
|
|
|
1799
1804
|
color: lt,
|
|
1800
1805
|
pinned: ct
|
|
1801
1806
|
};
|
|
1802
|
-
function
|
|
1807
|
+
function Re(...e) {
|
|
1803
1808
|
return e.filter(Boolean).join(" ");
|
|
1804
1809
|
}
|
|
1805
1810
|
function Ot() {
|
|
@@ -1821,28 +1826,28 @@ const At = ({
|
|
|
1821
1826
|
}) => {
|
|
1822
1827
|
const s = R(null), o = R([]), d = Ot(), b = se(() => Array.from(e), [e]);
|
|
1823
1828
|
if (b.length === 0) return null;
|
|
1824
|
-
const
|
|
1825
|
-
const
|
|
1826
|
-
const
|
|
1827
|
-
|
|
1829
|
+
const u = a ? `Configure ${a}: choose a dimension` : void 0, g = d ? "10ms" : "200ms", C = (m, c) => {
|
|
1830
|
+
const h = b.length - 1, x = (f) => {
|
|
1831
|
+
const S = o.current[f];
|
|
1832
|
+
S && S.focus();
|
|
1828
1833
|
};
|
|
1829
1834
|
switch (m.key) {
|
|
1830
1835
|
case "ArrowRight":
|
|
1831
1836
|
case "ArrowDown": {
|
|
1832
|
-
m.preventDefault(),
|
|
1837
|
+
m.preventDefault(), x(c === h ? 0 : c + 1);
|
|
1833
1838
|
break;
|
|
1834
1839
|
}
|
|
1835
1840
|
case "ArrowLeft":
|
|
1836
1841
|
case "ArrowUp": {
|
|
1837
|
-
m.preventDefault(),
|
|
1842
|
+
m.preventDefault(), x(c === 0 ? h : c - 1);
|
|
1838
1843
|
break;
|
|
1839
1844
|
}
|
|
1840
1845
|
case "Home": {
|
|
1841
|
-
m.preventDefault(),
|
|
1846
|
+
m.preventDefault(), x(0);
|
|
1842
1847
|
break;
|
|
1843
1848
|
}
|
|
1844
1849
|
case "End": {
|
|
1845
|
-
m.preventDefault(),
|
|
1850
|
+
m.preventDefault(), x(h);
|
|
1846
1851
|
break;
|
|
1847
1852
|
}
|
|
1848
1853
|
case "Enter":
|
|
@@ -1852,45 +1857,45 @@ const At = ({
|
|
|
1852
1857
|
}
|
|
1853
1858
|
}
|
|
1854
1859
|
};
|
|
1855
|
-
return /* @__PURE__ */
|
|
1860
|
+
return /* @__PURE__ */ i(
|
|
1856
1861
|
"div",
|
|
1857
1862
|
{
|
|
1858
1863
|
ref: s,
|
|
1859
1864
|
role: "group",
|
|
1860
|
-
"aria-label":
|
|
1861
|
-
className:
|
|
1865
|
+
"aria-label": u,
|
|
1866
|
+
className: Re("gloss-reconfig-backside-buttons", r),
|
|
1862
1867
|
style: {
|
|
1863
1868
|
// Expose the reduced-motion-resolved duration as a CSS custom prop
|
|
1864
1869
|
// so the SCSS transition rule can consume it without a nested media
|
|
1865
1870
|
// query in the JS. Also surfaces the value for the unit test.
|
|
1866
|
-
"--gloss-reconfig-backside-buttons-transition-duration":
|
|
1871
|
+
"--gloss-reconfig-backside-buttons-transition-duration": g
|
|
1867
1872
|
},
|
|
1868
1873
|
children: b.map((m, c) => {
|
|
1869
|
-
const
|
|
1870
|
-
return /* @__PURE__ */
|
|
1874
|
+
const h = Et[m], x = n === m;
|
|
1875
|
+
return /* @__PURE__ */ O(
|
|
1871
1876
|
"button",
|
|
1872
1877
|
{
|
|
1873
|
-
ref: (
|
|
1874
|
-
o.current[c] =
|
|
1878
|
+
ref: (f) => {
|
|
1879
|
+
o.current[c] = f;
|
|
1875
1880
|
},
|
|
1876
1881
|
type: "button",
|
|
1877
1882
|
"data-dimension": m,
|
|
1878
|
-
className:
|
|
1883
|
+
className: Re(
|
|
1879
1884
|
"gloss-reconfig-backside-buttons__button",
|
|
1880
|
-
|
|
1885
|
+
x && "gloss-reconfig-backside-buttons__button--active"
|
|
1881
1886
|
),
|
|
1882
|
-
"aria-current":
|
|
1887
|
+
"aria-current": x ? "true" : void 0,
|
|
1883
1888
|
onClick: () => t(m),
|
|
1884
|
-
onKeyDown: (
|
|
1889
|
+
onKeyDown: (f) => C(f, c),
|
|
1885
1890
|
children: [
|
|
1886
|
-
/* @__PURE__ */
|
|
1887
|
-
|
|
1891
|
+
/* @__PURE__ */ i(
|
|
1892
|
+
h,
|
|
1888
1893
|
{
|
|
1889
1894
|
className: "gloss-reconfig-backside-buttons__button-icon",
|
|
1890
1895
|
"aria-hidden": "true"
|
|
1891
1896
|
}
|
|
1892
1897
|
),
|
|
1893
|
-
/* @__PURE__ */
|
|
1898
|
+
/* @__PURE__ */ i("span", { className: "gloss-reconfig-backside-buttons__button-label", children: Ft[m] })
|
|
1894
1899
|
]
|
|
1895
1900
|
},
|
|
1896
1901
|
m
|
|
@@ -1920,7 +1925,7 @@ function U(e, t) {
|
|
|
1920
1925
|
}, t)
|
|
1921
1926
|
};
|
|
1922
1927
|
}
|
|
1923
|
-
function
|
|
1928
|
+
function Ie(e, t) {
|
|
1924
1929
|
return {
|
|
1925
1930
|
...U(e, t),
|
|
1926
1931
|
colSpan: 2
|
|
@@ -1929,11 +1934,11 @@ function Re(e, t) {
|
|
|
1929
1934
|
const fn = [
|
|
1930
1935
|
U("total-revenue", "Total Revenue"),
|
|
1931
1936
|
U("total-orders", "Total Orders"),
|
|
1932
|
-
|
|
1937
|
+
Ie("revenue-trend", "Revenue Trend (2x)"),
|
|
1933
1938
|
U("avg-order", "Avg Order Value"),
|
|
1934
1939
|
U("new-customers", "New Customers"),
|
|
1935
1940
|
U("top-salesperson", "Top Salesperson"),
|
|
1936
|
-
|
|
1941
|
+
Ie("order-trend", "Order Trend (2x)"),
|
|
1937
1942
|
U("repeat-rate", "Repeat Rate"),
|
|
1938
1943
|
U("open-orders", "Open Orders"),
|
|
1939
1944
|
U("shipped-orders", "Shipped Orders")
|
|
@@ -2031,7 +2036,7 @@ const yn = [
|
|
|
2031
2036
|
{ id: "tab-9", type: "order-items", name: "Order #12345", closable: !0 },
|
|
2032
2037
|
{ id: "tab-10", type: "orders", name: "Recent 30D", closable: !0 }
|
|
2033
2038
|
];
|
|
2034
|
-
function
|
|
2039
|
+
function we(e) {
|
|
2035
2040
|
switch (e) {
|
|
2036
2041
|
case "wide":
|
|
2037
2042
|
return { cols: 2, rows: 1 };
|
|
@@ -2045,21 +2050,21 @@ function ye(e) {
|
|
|
2045
2050
|
function Lt(e) {
|
|
2046
2051
|
let t = 0;
|
|
2047
2052
|
for (const a of e) {
|
|
2048
|
-
const r =
|
|
2053
|
+
const r = we(a.size), s = a.gridPosition.col + r.cols - 1;
|
|
2049
2054
|
s > t && (t = s);
|
|
2050
2055
|
}
|
|
2051
2056
|
return `repeat(${t > 0 ? t : Math.max(e.length, 1)}, minmax(0, 1fr))`;
|
|
2052
2057
|
}
|
|
2053
2058
|
const $t = function(t) {
|
|
2054
2059
|
if (t.renderMode === "discrete")
|
|
2055
|
-
return /* @__PURE__ */
|
|
2060
|
+
return /* @__PURE__ */ i(
|
|
2056
2061
|
"div",
|
|
2057
2062
|
{
|
|
2058
2063
|
className: "gloss-metric-group gloss-metric-group--discrete",
|
|
2059
2064
|
style: { display: "contents" },
|
|
2060
2065
|
children: t.cards.map((r) => {
|
|
2061
|
-
const s =
|
|
2062
|
-
return /* @__PURE__ */
|
|
2066
|
+
const s = we(r.size);
|
|
2067
|
+
return /* @__PURE__ */ i(
|
|
2063
2068
|
"div",
|
|
2064
2069
|
{
|
|
2065
2070
|
className: "gloss-metric-group__slot",
|
|
@@ -2075,7 +2080,7 @@ const $t = function(t) {
|
|
|
2075
2080
|
}
|
|
2076
2081
|
);
|
|
2077
2082
|
const { cards: n, composite: a } = t;
|
|
2078
|
-
return /* @__PURE__ */
|
|
2083
|
+
return /* @__PURE__ */ O(
|
|
2079
2084
|
"div",
|
|
2080
2085
|
{
|
|
2081
2086
|
className: "gloss-metric-group gloss-metric-group--composite",
|
|
@@ -2094,16 +2099,16 @@ const $t = function(t) {
|
|
|
2094
2099
|
"aria-label": a?.label,
|
|
2095
2100
|
tabIndex: void 0,
|
|
2096
2101
|
children: [
|
|
2097
|
-
a?.accentColor && /* @__PURE__ */
|
|
2102
|
+
a?.accentColor && /* @__PURE__ */ i(
|
|
2098
2103
|
"div",
|
|
2099
2104
|
{
|
|
2100
2105
|
className: "gloss-metric-group__accent",
|
|
2101
2106
|
style: { background: a.accentColor }
|
|
2102
2107
|
}
|
|
2103
2108
|
),
|
|
2104
|
-
a?.label && /* @__PURE__ */
|
|
2105
|
-
/* @__PURE__ */
|
|
2106
|
-
a?.trend && /* @__PURE__ */
|
|
2109
|
+
a?.label && /* @__PURE__ */ O("div", { className: "gloss-metric-group__label", children: [
|
|
2110
|
+
/* @__PURE__ */ i("span", { children: a.label }),
|
|
2111
|
+
a?.trend && /* @__PURE__ */ i(
|
|
2107
2112
|
"span",
|
|
2108
2113
|
{
|
|
2109
2114
|
className: "gloss-metric-group__trend",
|
|
@@ -2112,7 +2117,7 @@ const $t = function(t) {
|
|
|
2112
2117
|
}
|
|
2113
2118
|
)
|
|
2114
2119
|
] }),
|
|
2115
|
-
/* @__PURE__ */
|
|
2120
|
+
/* @__PURE__ */ i(
|
|
2116
2121
|
"div",
|
|
2117
2122
|
{
|
|
2118
2123
|
className: "gloss-metric-group__slots",
|
|
@@ -2122,8 +2127,8 @@ const $t = function(t) {
|
|
|
2122
2127
|
gridTemplateColumns: Lt(n)
|
|
2123
2128
|
},
|
|
2124
2129
|
children: n.map((r) => {
|
|
2125
|
-
const s =
|
|
2126
|
-
return /* @__PURE__ */
|
|
2130
|
+
const s = we(r.size);
|
|
2131
|
+
return /* @__PURE__ */ i(
|
|
2127
2132
|
"div",
|
|
2128
2133
|
{
|
|
2129
2134
|
className: "gloss-metric-group__slot--composite",
|
|
@@ -2143,15 +2148,15 @@ const $t = function(t) {
|
|
|
2143
2148
|
);
|
|
2144
2149
|
};
|
|
2145
2150
|
$t.displayName = "MetricGroupContainer";
|
|
2146
|
-
const
|
|
2147
|
-
...
|
|
2151
|
+
const Be = "resize.tuning.dev", Bt = {
|
|
2152
|
+
...Ee,
|
|
2148
2153
|
snapInPx: 60,
|
|
2149
2154
|
snapOutPx: 90
|
|
2150
2155
|
}, J = Bt;
|
|
2151
2156
|
function zt() {
|
|
2152
2157
|
if (typeof window > "u") return { ...J };
|
|
2153
2158
|
try {
|
|
2154
|
-
const e = window.localStorage.getItem(
|
|
2159
|
+
const e = window.localStorage.getItem(Be);
|
|
2155
2160
|
if (!e) return { ...J };
|
|
2156
2161
|
const t = JSON.parse(e);
|
|
2157
2162
|
return !t || typeof t != "object" || Array.isArray(t) ? { ...J } : { ...J, ...t };
|
|
@@ -2164,7 +2169,7 @@ function Kt() {
|
|
|
2164
2169
|
L(() => {
|
|
2165
2170
|
if (!(typeof window > "u"))
|
|
2166
2171
|
try {
|
|
2167
|
-
window.localStorage.setItem(
|
|
2172
|
+
window.localStorage.setItem(Be, JSON.stringify(e));
|
|
2168
2173
|
} catch {
|
|
2169
2174
|
}
|
|
2170
2175
|
}, [e]);
|
|
@@ -2198,7 +2203,7 @@ function Gt(e, t) {
|
|
|
2198
2203
|
return t >= 1 ? String(Math.round(e)) : t >= 0.1 ? e.toFixed(1) : e.toFixed(2);
|
|
2199
2204
|
}
|
|
2200
2205
|
function Ht() {
|
|
2201
|
-
return /* @__PURE__ */
|
|
2206
|
+
return /* @__PURE__ */ O(
|
|
2202
2207
|
"svg",
|
|
2203
2208
|
{
|
|
2204
2209
|
width: "14",
|
|
@@ -2211,8 +2216,8 @@ function Ht() {
|
|
|
2211
2216
|
strokeLinejoin: "round",
|
|
2212
2217
|
"aria-hidden": "true",
|
|
2213
2218
|
children: [
|
|
2214
|
-
/* @__PURE__ */
|
|
2215
|
-
/* @__PURE__ */
|
|
2219
|
+
/* @__PURE__ */ i("path", { d: "M3 12a9 9 0 1 0 3-6.7L3 8" }),
|
|
2220
|
+
/* @__PURE__ */ i("polyline", { points: "3 3 3 8 8 8" })
|
|
2216
2221
|
]
|
|
2217
2222
|
}
|
|
2218
2223
|
);
|
|
@@ -2224,19 +2229,19 @@ function Vt({ spec: e, value: t, onChange: n, onReset: a, flashing: r }) {
|
|
|
2224
2229
|
},
|
|
2225
2230
|
[a]
|
|
2226
2231
|
);
|
|
2227
|
-
return /* @__PURE__ */
|
|
2232
|
+
return /* @__PURE__ */ O(
|
|
2228
2233
|
"div",
|
|
2229
2234
|
{
|
|
2230
2235
|
className: `gloss-dev-tuning-panel__row${r ? " gloss-dev-tuning-panel__row--flash" : ""}`,
|
|
2231
2236
|
"data-tuning-row": e.key,
|
|
2232
2237
|
onKeyDown: s,
|
|
2233
2238
|
children: [
|
|
2234
|
-
/* @__PURE__ */
|
|
2235
|
-
/* @__PURE__ */
|
|
2239
|
+
/* @__PURE__ */ i("label", { className: "gloss-dev-tuning-panel__label", htmlFor: `gloss-dtp-${e.key}`, children: e.label }),
|
|
2240
|
+
/* @__PURE__ */ O("span", { className: "gloss-dev-tuning-panel__value", "aria-live": "off", children: [
|
|
2236
2241
|
Gt(t, e.step),
|
|
2237
2242
|
e.unit ? ` ${e.unit}` : ""
|
|
2238
2243
|
] }),
|
|
2239
|
-
/* @__PURE__ */
|
|
2244
|
+
/* @__PURE__ */ i(
|
|
2240
2245
|
"input",
|
|
2241
2246
|
{
|
|
2242
2247
|
id: `gloss-dtp-${e.key}`,
|
|
@@ -2250,14 +2255,14 @@ function Vt({ spec: e, value: t, onChange: n, onReset: a, flashing: r }) {
|
|
|
2250
2255
|
onChange: (o) => n(Number(o.target.value))
|
|
2251
2256
|
}
|
|
2252
2257
|
),
|
|
2253
|
-
/* @__PURE__ */
|
|
2258
|
+
/* @__PURE__ */ i(
|
|
2254
2259
|
"button",
|
|
2255
2260
|
{
|
|
2256
2261
|
type: "button",
|
|
2257
2262
|
className: "gloss-dev-tuning-panel__reset",
|
|
2258
2263
|
"aria-label": `Reset ${e.label}`,
|
|
2259
2264
|
onClick: a,
|
|
2260
|
-
children: /* @__PURE__ */
|
|
2265
|
+
children: /* @__PURE__ */ i(Ht, {})
|
|
2261
2266
|
}
|
|
2262
2267
|
)
|
|
2263
2268
|
]
|
|
@@ -2273,7 +2278,7 @@ function jt() {
|
|
|
2273
2278
|
}
|
|
2274
2279
|
}
|
|
2275
2280
|
function Ut(e = {}) {
|
|
2276
|
-
return jt() ? /* @__PURE__ */
|
|
2281
|
+
return jt() ? /* @__PURE__ */ i(Zt, {}) : null;
|
|
2277
2282
|
}
|
|
2278
2283
|
Ut.displayName = "DevTuningPanel";
|
|
2279
2284
|
function Zt() {
|
|
@@ -2281,13 +2286,13 @@ function Zt() {
|
|
|
2281
2286
|
d.current && clearTimeout(d.current), o(m), d.current = setTimeout(() => {
|
|
2282
2287
|
o(null), d.current = null;
|
|
2283
2288
|
}, 200);
|
|
2284
|
-
}, []),
|
|
2289
|
+
}, []), u = y(
|
|
2285
2290
|
(m, c) => {
|
|
2286
2291
|
n(m, c), m === "snapInPx" && c > t.snapOutPx && (n("snapOutPx", c), b("snapOutPx"));
|
|
2287
2292
|
},
|
|
2288
2293
|
[n, t.snapOutPx, b]
|
|
2289
|
-
),
|
|
2290
|
-
return /* @__PURE__ */
|
|
2294
|
+
), g = se(() => Wt, []), C = tt();
|
|
2295
|
+
return /* @__PURE__ */ O(
|
|
2291
2296
|
de.div,
|
|
2292
2297
|
{
|
|
2293
2298
|
className: "gloss-dev-tuning-panel",
|
|
@@ -2299,29 +2304,29 @@ function Zt() {
|
|
|
2299
2304
|
dragControls: C,
|
|
2300
2305
|
dragMomentum: !1,
|
|
2301
2306
|
children: [
|
|
2302
|
-
/* @__PURE__ */
|
|
2307
|
+
/* @__PURE__ */ O(
|
|
2303
2308
|
"div",
|
|
2304
2309
|
{
|
|
2305
2310
|
className: "gloss-dev-tuning-panel__header",
|
|
2306
2311
|
onPointerDown: (m) => C.start(m),
|
|
2307
2312
|
children: [
|
|
2308
|
-
/* @__PURE__ */
|
|
2309
|
-
/* @__PURE__ */
|
|
2313
|
+
/* @__PURE__ */ i("span", { className: "gloss-dev-tuning-panel__title", children: "Resize Tuning — dev only" }),
|
|
2314
|
+
/* @__PURE__ */ i("span", { className: "gloss-dev-tuning-panel__hint", children: "?devtune=1" })
|
|
2310
2315
|
]
|
|
2311
2316
|
}
|
|
2312
2317
|
),
|
|
2313
|
-
/* @__PURE__ */
|
|
2318
|
+
/* @__PURE__ */ i("div", { className: "gloss-dev-tuning-panel__body", children: g.map((m) => /* @__PURE__ */ i(
|
|
2314
2319
|
Vt,
|
|
2315
2320
|
{
|
|
2316
2321
|
spec: m,
|
|
2317
2322
|
value: t[m.key],
|
|
2318
|
-
onChange: (c) =>
|
|
2323
|
+
onChange: (c) => u(m.key, c),
|
|
2319
2324
|
onReset: () => a(m.key),
|
|
2320
2325
|
flashing: s === m.key
|
|
2321
2326
|
},
|
|
2322
2327
|
m.key
|
|
2323
2328
|
)) }),
|
|
2324
|
-
/* @__PURE__ */
|
|
2329
|
+
/* @__PURE__ */ i("div", { className: "gloss-dev-tuning-panel__footer", children: /* @__PURE__ */ i(
|
|
2325
2330
|
"button",
|
|
2326
2331
|
{
|
|
2327
2332
|
type: "button",
|
|
@@ -2344,33 +2349,33 @@ function Cn({
|
|
|
2344
2349
|
snapBoundariesX: o,
|
|
2345
2350
|
topY: d,
|
|
2346
2351
|
bottomY: b,
|
|
2347
|
-
enterMs:
|
|
2348
|
-
exitMs:
|
|
2352
|
+
enterMs: u = ee.envelopeEnterMs,
|
|
2353
|
+
exitMs: g = ee.envelopeExitMs,
|
|
2349
2354
|
className: C,
|
|
2350
2355
|
style: m
|
|
2351
2356
|
}) {
|
|
2352
2357
|
if (e === "hidden") return null;
|
|
2353
|
-
const c = Math.max(0, r - a),
|
|
2354
|
-
"--gloss-resize-envelope-enter-ms": `${
|
|
2355
|
-
"--gloss-resize-envelope-exit-ms": `${
|
|
2358
|
+
const c = Math.max(0, r - a), h = Math.max(0, b - d), x = {
|
|
2359
|
+
"--gloss-resize-envelope-enter-ms": `${u}ms`,
|
|
2360
|
+
"--gloss-resize-envelope-exit-ms": `${g}ms`,
|
|
2356
2361
|
"--gloss-resize-envelope-origin-x": `${t - a}px`,
|
|
2357
2362
|
"--gloss-resize-envelope-origin-y": `${n - d}px`,
|
|
2358
2363
|
left: a,
|
|
2359
2364
|
top: d,
|
|
2360
2365
|
width: c,
|
|
2361
|
-
height:
|
|
2366
|
+
height: h,
|
|
2362
2367
|
...m
|
|
2363
2368
|
};
|
|
2364
|
-
return /* @__PURE__ */
|
|
2369
|
+
return /* @__PURE__ */ O(
|
|
2365
2370
|
"div",
|
|
2366
2371
|
{
|
|
2367
2372
|
className: ["gloss-resize-envelope", `gloss-resize-envelope--state-${e}`, C].filter(Boolean).join(" "),
|
|
2368
2373
|
"data-state": e,
|
|
2369
2374
|
"data-testid": "gloss-resize-envelope",
|
|
2370
|
-
style:
|
|
2375
|
+
style: x,
|
|
2371
2376
|
"aria-hidden": "true",
|
|
2372
2377
|
children: [
|
|
2373
|
-
/* @__PURE__ */
|
|
2378
|
+
/* @__PURE__ */ i(
|
|
2374
2379
|
"div",
|
|
2375
2380
|
{
|
|
2376
2381
|
className: "gloss-resize-envelope__edge gloss-resize-envelope__edge--left",
|
|
@@ -2378,7 +2383,7 @@ function Cn({
|
|
|
2378
2383
|
style: { left: 0 }
|
|
2379
2384
|
}
|
|
2380
2385
|
),
|
|
2381
|
-
/* @__PURE__ */
|
|
2386
|
+
/* @__PURE__ */ i(
|
|
2382
2387
|
"div",
|
|
2383
2388
|
{
|
|
2384
2389
|
className: "gloss-resize-envelope__edge gloss-resize-envelope__edge--min-boundary",
|
|
@@ -2386,7 +2391,7 @@ function Cn({
|
|
|
2386
2391
|
style: { left: s - a }
|
|
2387
2392
|
}
|
|
2388
2393
|
),
|
|
2389
|
-
/* @__PURE__ */
|
|
2394
|
+
/* @__PURE__ */ i(
|
|
2390
2395
|
"div",
|
|
2391
2396
|
{
|
|
2392
2397
|
className: "gloss-resize-envelope__edge gloss-resize-envelope__edge--right",
|
|
@@ -2394,14 +2399,14 @@ function Cn({
|
|
|
2394
2399
|
style: { left: c - 1 }
|
|
2395
2400
|
}
|
|
2396
2401
|
),
|
|
2397
|
-
o.filter((
|
|
2402
|
+
o.filter((f) => f > s && f < r).map((f) => /* @__PURE__ */ i(
|
|
2398
2403
|
"div",
|
|
2399
2404
|
{
|
|
2400
2405
|
className: "gloss-resize-envelope__snap-line",
|
|
2401
2406
|
"data-snap-line": !0,
|
|
2402
|
-
style: { left:
|
|
2407
|
+
style: { left: f - a }
|
|
2403
2408
|
},
|
|
2404
|
-
|
|
2409
|
+
f
|
|
2405
2410
|
))
|
|
2406
2411
|
]
|
|
2407
2412
|
}
|
|
@@ -2417,7 +2422,7 @@ function kn({
|
|
|
2417
2422
|
...o
|
|
2418
2423
|
}) {
|
|
2419
2424
|
const d = a != null ? { ...o.style, "--_proximity-opacity": String(a) } : o.style;
|
|
2420
|
-
return /* @__PURE__ */
|
|
2425
|
+
return /* @__PURE__ */ i(
|
|
2421
2426
|
"div",
|
|
2422
2427
|
{
|
|
2423
2428
|
...o,
|
|
@@ -2447,7 +2452,7 @@ function _n({
|
|
|
2447
2452
|
className: a,
|
|
2448
2453
|
style: r
|
|
2449
2454
|
}) {
|
|
2450
|
-
return e.length === 0 ? null : /* @__PURE__ */
|
|
2455
|
+
return e.length === 0 ? null : /* @__PURE__ */ i(
|
|
2451
2456
|
"svg",
|
|
2452
2457
|
{
|
|
2453
2458
|
className: ["gloss-spillover-arc", a].filter(Boolean).join(" "),
|
|
@@ -2455,7 +2460,7 @@ function _n({
|
|
|
2455
2460
|
"aria-hidden": "true",
|
|
2456
2461
|
overflow: "visible",
|
|
2457
2462
|
style: { position: "absolute", inset: 0, pointerEvents: "none", ...r },
|
|
2458
|
-
children: e.map((s, o) => /* @__PURE__ */
|
|
2463
|
+
children: e.map((s, o) => /* @__PURE__ */ i(
|
|
2459
2464
|
"path",
|
|
2460
2465
|
{
|
|
2461
2466
|
"data-arc-id": s.id,
|
|
@@ -2477,29 +2482,31 @@ function xn({
|
|
|
2477
2482
|
fadeInMs: n = ee.sectionDividerFadeInMs,
|
|
2478
2483
|
fadeOutMs: a = ee.sectionDividerFadeOutMs,
|
|
2479
2484
|
staggerMs: r = ee.sectionDividerStaggerMs,
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2485
|
+
variant: s = "dashed",
|
|
2486
|
+
className: o,
|
|
2487
|
+
style: d,
|
|
2488
|
+
...b
|
|
2483
2489
|
}) {
|
|
2484
|
-
const
|
|
2490
|
+
const u = {
|
|
2485
2491
|
"--gloss-section-divider-fade-in-ms": `${n}ms`,
|
|
2486
2492
|
"--gloss-section-divider-fade-out-ms": `${a}ms`,
|
|
2487
2493
|
"--gloss-section-divider-stagger-delay": `${t * r}ms`,
|
|
2488
|
-
...
|
|
2494
|
+
...d
|
|
2489
2495
|
};
|
|
2490
|
-
return /* @__PURE__ */
|
|
2496
|
+
return /* @__PURE__ */ i(
|
|
2491
2497
|
"div",
|
|
2492
2498
|
{
|
|
2493
|
-
...
|
|
2499
|
+
...b,
|
|
2494
2500
|
"data-state": e,
|
|
2495
2501
|
"data-testid": "gloss-section-divider",
|
|
2496
2502
|
"aria-hidden": "true",
|
|
2497
2503
|
className: [
|
|
2498
2504
|
"gloss-section-divider",
|
|
2499
2505
|
`gloss-section-divider--state-${e}`,
|
|
2500
|
-
s
|
|
2506
|
+
s === "seam-bleed" ? "gloss-section-divider--variant-seam-bleed" : "",
|
|
2507
|
+
o
|
|
2501
2508
|
].filter(Boolean).join(" "),
|
|
2502
|
-
style:
|
|
2509
|
+
style: u
|
|
2503
2510
|
}
|
|
2504
2511
|
);
|
|
2505
2512
|
}
|
|
@@ -2510,7 +2517,7 @@ function Sn({
|
|
|
2510
2517
|
className: a,
|
|
2511
2518
|
style: r
|
|
2512
2519
|
}) {
|
|
2513
|
-
return /* @__PURE__ */
|
|
2520
|
+
return /* @__PURE__ */ i(Fe, { visible: e, variant: "pack", trigger: "hover+focus", children: /* @__PURE__ */ i(
|
|
2514
2521
|
"button",
|
|
2515
2522
|
{
|
|
2516
2523
|
type: "button",
|
|
@@ -2519,7 +2526,7 @@ function Sn({
|
|
|
2519
2526
|
className: ["gloss-empty-cell-pack-affordance", a].filter(Boolean).join(" "),
|
|
2520
2527
|
style: r,
|
|
2521
2528
|
onClick: t,
|
|
2522
|
-
children: /* @__PURE__ */
|
|
2529
|
+
children: /* @__PURE__ */ i("span", { "aria-hidden": "true", className: "gloss-empty-cell-pack-affordance__glyph", children: "×" })
|
|
2523
2530
|
}
|
|
2524
2531
|
) });
|
|
2525
2532
|
}
|
|
@@ -2534,8 +2541,8 @@ function Mn({
|
|
|
2534
2541
|
children: d,
|
|
2535
2542
|
className: b
|
|
2536
2543
|
}) {
|
|
2537
|
-
const
|
|
2538
|
-
return /* @__PURE__ */
|
|
2544
|
+
const u = t * n + (t - 1) * r;
|
|
2545
|
+
return /* @__PURE__ */ i(
|
|
2539
2546
|
de.div,
|
|
2540
2547
|
{
|
|
2541
2548
|
"data-testid": "gloss-drag-ghost",
|
|
@@ -2546,7 +2553,7 @@ function Mn({
|
|
|
2546
2553
|
`gloss-drag-ghost--tint-${e}`,
|
|
2547
2554
|
b
|
|
2548
2555
|
].filter(Boolean).join(" "),
|
|
2549
|
-
style: { x: s, y: o, width:
|
|
2556
|
+
style: { x: s, y: o, width: u, height: a },
|
|
2550
2557
|
children: d
|
|
2551
2558
|
}
|
|
2552
2559
|
);
|
|
@@ -2560,15 +2567,15 @@ function Tn({
|
|
|
2560
2567
|
transitionMs: s = 120,
|
|
2561
2568
|
className: o
|
|
2562
2569
|
}) {
|
|
2563
|
-
const d = t * n + (t - 1) * a, b = e.col * (n + a),
|
|
2564
|
-
return /* @__PURE__ */
|
|
2570
|
+
const d = t * n + (t - 1) * a, b = e.col * (n + a), u = e.row * (r + a);
|
|
2571
|
+
return /* @__PURE__ */ i(
|
|
2565
2572
|
"div",
|
|
2566
2573
|
{
|
|
2567
2574
|
className: ["gloss-drag-feedback-snap-outline", o].filter(Boolean).join(" "),
|
|
2568
2575
|
"data-testid": "gloss-snap-outline",
|
|
2569
2576
|
"aria-hidden": "true",
|
|
2570
2577
|
style: {
|
|
2571
|
-
transform: `translate(${b}px, ${
|
|
2578
|
+
transform: `translate(${b}px, ${u}px)`,
|
|
2572
2579
|
width: d,
|
|
2573
2580
|
height: r,
|
|
2574
2581
|
transition: `transform ${s}ms cubic-bezier(0.4, 0, 0.2, 1)`
|
|
@@ -2581,7 +2588,7 @@ function Rn({
|
|
|
2581
2588
|
children: t,
|
|
2582
2589
|
className: n
|
|
2583
2590
|
}) {
|
|
2584
|
-
return e.length === 0 ? null : /* @__PURE__ */
|
|
2591
|
+
return e.length === 0 ? null : /* @__PURE__ */ i(be, { children: e.map((a) => /* @__PURE__ */ i(
|
|
2585
2592
|
de.div,
|
|
2586
2593
|
{
|
|
2587
2594
|
"data-card-id": a.cardId,
|
|
@@ -2618,17 +2625,17 @@ function qt({
|
|
|
2618
2625
|
"[InlineNudge] requires anchorEl or anchorSelector. AP-07: Do not mount InlineNudge in Layout/** or _app.tsx."
|
|
2619
2626
|
);
|
|
2620
2627
|
}, [a, r]), H.useLayoutEffect(() => {
|
|
2621
|
-
let
|
|
2622
|
-
if (a ?
|
|
2623
|
-
const
|
|
2628
|
+
let u = null;
|
|
2629
|
+
if (a ? u = a : r && (u = document.querySelector(r)), u) {
|
|
2630
|
+
const g = u.getBoundingClientRect();
|
|
2624
2631
|
o({
|
|
2625
|
-
top:
|
|
2626
|
-
left:
|
|
2632
|
+
top: g.bottom + window.scrollY + 6,
|
|
2633
|
+
left: g.left + window.scrollX
|
|
2627
2634
|
});
|
|
2628
2635
|
}
|
|
2629
2636
|
}, [a, r]);
|
|
2630
2637
|
const b = s ? { top: s.top, left: s.left } : {};
|
|
2631
|
-
return /* @__PURE__ */
|
|
2638
|
+
return /* @__PURE__ */ O(
|
|
2632
2639
|
"div",
|
|
2633
2640
|
{
|
|
2634
2641
|
className: X["gloss-inline-nudge"],
|
|
@@ -2637,9 +2644,9 @@ function qt({
|
|
|
2637
2644
|
"aria-live": "polite",
|
|
2638
2645
|
"data-reduced-motion": d ? "true" : void 0,
|
|
2639
2646
|
children: [
|
|
2640
|
-
/* @__PURE__ */
|
|
2641
|
-
/* @__PURE__ */
|
|
2642
|
-
/* @__PURE__ */
|
|
2647
|
+
/* @__PURE__ */ i("span", { className: X["gloss-inline-nudge__message"], children: e }),
|
|
2648
|
+
/* @__PURE__ */ O("div", { className: X["gloss-inline-nudge__actions"], children: [
|
|
2649
|
+
/* @__PURE__ */ i(
|
|
2643
2650
|
"button",
|
|
2644
2651
|
{
|
|
2645
2652
|
type: "button",
|
|
@@ -2648,7 +2655,7 @@ function qt({
|
|
|
2648
2655
|
children: t.label
|
|
2649
2656
|
}
|
|
2650
2657
|
),
|
|
2651
|
-
/* @__PURE__ */
|
|
2658
|
+
/* @__PURE__ */ i(
|
|
2652
2659
|
"button",
|
|
2653
2660
|
{
|
|
2654
2661
|
type: "button",
|
|
@@ -2664,17 +2671,17 @@ function qt({
|
|
|
2664
2671
|
);
|
|
2665
2672
|
}
|
|
2666
2673
|
qt.displayName = "InlineNudge";
|
|
2667
|
-
function
|
|
2674
|
+
function De(e) {
|
|
2668
2675
|
return e.colorToken ? `var(--gloss-color-${e.colorToken}, ${e.color ?? "#888"})` : e.color ?? "#888";
|
|
2669
2676
|
}
|
|
2670
2677
|
function Qt(e, t, n) {
|
|
2671
2678
|
if (n <= t) {
|
|
2672
|
-
const o = e[0], d = o ?
|
|
2679
|
+
const o = e[0], d = o ? De(o) : "#888";
|
|
2673
2680
|
return `linear-gradient(to right, ${d}, ${d})`;
|
|
2674
2681
|
}
|
|
2675
2682
|
const a = n - t, s = [...e].sort((o, d) => o.value - d.value).map((o) => {
|
|
2676
2683
|
const d = (o.value - t) / a * 100;
|
|
2677
|
-
return `${
|
|
2684
|
+
return `${De(o)} ${d.toFixed(2)}%`;
|
|
2678
2685
|
});
|
|
2679
2686
|
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(", ")})`;
|
|
2680
2687
|
}
|
|
@@ -2692,16 +2699,16 @@ function Jt({
|
|
|
2692
2699
|
const o = r === void 0 ? 0.01 : !Number.isFinite(r) || r <= 0 ? (process.env.NODE_ENV !== "production" && console.warn(
|
|
2693
2700
|
`ThresholdRamp: step (${r}) must be a positive finite number; falling back to 0.01.`
|
|
2694
2701
|
), 0.01) : r, d = y(
|
|
2695
|
-
(
|
|
2702
|
+
(l) => Math.round(l / o) * o,
|
|
2696
2703
|
[o]
|
|
2697
|
-
), b = R(null), [
|
|
2704
|
+
), b = R(null), [u, g] = W(null), [C, m] = W(e), c = Xt(e), h = R(c);
|
|
2698
2705
|
L(() => {
|
|
2699
|
-
|
|
2700
|
-
}, [c, e,
|
|
2701
|
-
const
|
|
2702
|
-
(
|
|
2706
|
+
h.current !== c && (h.current = c, !u && m(e));
|
|
2707
|
+
}, [c, e, u]);
|
|
2708
|
+
const x = se(() => Qt(C, n, a), [C, n, a]), f = y(
|
|
2709
|
+
(l) => {
|
|
2703
2710
|
if (!b.current) return n;
|
|
2704
|
-
const v = b.current.getBoundingClientRect(), p = v.width || 1, w = Math.max(0, Math.min(1, (
|
|
2711
|
+
const v = b.current.getBoundingClientRect(), p = v.width || 1, w = Math.max(0, Math.min(1, (l - v.left) / p)), k = n + w * (a - n);
|
|
2705
2712
|
return d(k);
|
|
2706
2713
|
},
|
|
2707
2714
|
[n, a, d]
|
|
@@ -2711,40 +2718,40 @@ function Jt({
|
|
|
2711
2718
|
`ThresholdRamp: max (${a}) must be greater than min (${n}); rendering degenerate strip.`
|
|
2712
2719
|
);
|
|
2713
2720
|
}, [n, a]);
|
|
2714
|
-
const
|
|
2715
|
-
(
|
|
2721
|
+
const S = y(
|
|
2722
|
+
(l, v) => {
|
|
2716
2723
|
const p = C.find((w) => w.id === v);
|
|
2717
|
-
s || p?.disabled || (
|
|
2724
|
+
s || p?.disabled || (l.preventDefault(), g(v));
|
|
2718
2725
|
},
|
|
2719
2726
|
[s, C]
|
|
2720
2727
|
), I = R(C);
|
|
2721
2728
|
I.current = C;
|
|
2722
2729
|
const N = R(t);
|
|
2723
2730
|
N.current = t, L(() => {
|
|
2724
|
-
if (!
|
|
2725
|
-
const
|
|
2726
|
-
const w =
|
|
2731
|
+
if (!u) return;
|
|
2732
|
+
const l = (p) => {
|
|
2733
|
+
const w = f(p.clientX);
|
|
2727
2734
|
m(
|
|
2728
|
-
(k) => k.map((M) => M.id ===
|
|
2735
|
+
(k) => k.map((M) => M.id === u ? { ...M, value: w } : M)
|
|
2729
2736
|
);
|
|
2730
2737
|
}, v = (p) => {
|
|
2731
|
-
const w =
|
|
2732
|
-
(M) => M.id ===
|
|
2738
|
+
const w = f(p.clientX), k = I.current.map(
|
|
2739
|
+
(M) => M.id === u ? { ...M, value: w } : M
|
|
2733
2740
|
);
|
|
2734
|
-
m(k),
|
|
2741
|
+
m(k), g(null), N.current(k);
|
|
2735
2742
|
};
|
|
2736
|
-
return window.addEventListener("pointermove",
|
|
2737
|
-
window.removeEventListener("pointermove",
|
|
2743
|
+
return window.addEventListener("pointermove", l), window.addEventListener("pointerup", v), window.addEventListener("pointercancel", v), () => {
|
|
2744
|
+
window.removeEventListener("pointermove", l), window.removeEventListener("pointerup", v), window.removeEventListener("pointercancel", v);
|
|
2738
2745
|
};
|
|
2739
|
-
}, [
|
|
2746
|
+
}, [u, f]);
|
|
2740
2747
|
const _ = a - n > 0 ? a - n : 1, T = y(
|
|
2741
|
-
(
|
|
2748
|
+
(l, v) => {
|
|
2742
2749
|
if (s || v.disabled) return;
|
|
2743
2750
|
const p = a - n;
|
|
2744
2751
|
if (p <= 0) return;
|
|
2745
|
-
const w =
|
|
2752
|
+
const w = l.shiftKey ? p / 20 : p / 100;
|
|
2746
2753
|
let k = v.value;
|
|
2747
|
-
switch (
|
|
2754
|
+
switch (l.key) {
|
|
2748
2755
|
case "ArrowRight":
|
|
2749
2756
|
case "ArrowUp":
|
|
2750
2757
|
k = v.value + w;
|
|
@@ -2762,7 +2769,7 @@ function Jt({
|
|
|
2762
2769
|
default:
|
|
2763
2770
|
return;
|
|
2764
2771
|
}
|
|
2765
|
-
|
|
2772
|
+
l.preventDefault();
|
|
2766
2773
|
const M = Math.max(n, Math.min(a, k)), E = d(M);
|
|
2767
2774
|
if (E === v.value) return;
|
|
2768
2775
|
const G = C.map(
|
|
@@ -2772,58 +2779,58 @@ function Jt({
|
|
|
2772
2779
|
},
|
|
2773
2780
|
[s, n, a, C, t, d]
|
|
2774
2781
|
);
|
|
2775
|
-
return /* @__PURE__ */
|
|
2782
|
+
return /* @__PURE__ */ i("div", { className: "gloss-threshold-ramp", "data-disabled": s || void 0, children: /* @__PURE__ */ i(
|
|
2776
2783
|
"div",
|
|
2777
2784
|
{
|
|
2778
2785
|
ref: b,
|
|
2779
2786
|
className: "gloss-threshold-ramp__track",
|
|
2780
|
-
style: { background:
|
|
2781
|
-
children: C.map((
|
|
2782
|
-
const v = (
|
|
2783
|
-
return /* @__PURE__ */
|
|
2787
|
+
style: { background: x },
|
|
2788
|
+
children: C.map((l) => {
|
|
2789
|
+
const v = (l.value - n) / _ * 100;
|
|
2790
|
+
return /* @__PURE__ */ i(
|
|
2784
2791
|
"span",
|
|
2785
2792
|
{
|
|
2786
2793
|
className: "gloss-threshold-ramp__stop",
|
|
2787
2794
|
style: {
|
|
2788
2795
|
left: `${v}%`,
|
|
2789
|
-
color:
|
|
2796
|
+
color: De(l)
|
|
2790
2797
|
},
|
|
2791
|
-
"data-disabled":
|
|
2792
|
-
"data-dragging":
|
|
2793
|
-
onPointerDown: (p) =>
|
|
2794
|
-
onKeyDown: (p) => T(p,
|
|
2795
|
-
"aria-label":
|
|
2798
|
+
"data-disabled": l.disabled || void 0,
|
|
2799
|
+
"data-dragging": u === l.id || void 0,
|
|
2800
|
+
onPointerDown: (p) => S(p, l.id),
|
|
2801
|
+
onKeyDown: (p) => T(p, l),
|
|
2802
|
+
"aria-label": l.label ?? `Stop at ${l.value}`,
|
|
2796
2803
|
role: "slider",
|
|
2797
|
-
"aria-valuenow":
|
|
2804
|
+
"aria-valuenow": l.value,
|
|
2798
2805
|
"aria-valuemin": n,
|
|
2799
2806
|
"aria-valuemax": a,
|
|
2800
|
-
"aria-disabled":
|
|
2801
|
-
tabIndex:
|
|
2807
|
+
"aria-disabled": l.disabled || s || void 0,
|
|
2808
|
+
tabIndex: l.disabled || s ? -1 : 0
|
|
2802
2809
|
},
|
|
2803
|
-
|
|
2810
|
+
l.id
|
|
2804
2811
|
);
|
|
2805
2812
|
})
|
|
2806
2813
|
}
|
|
2807
2814
|
) });
|
|
2808
2815
|
}
|
|
2809
2816
|
Jt.displayName = "ThresholdRamp";
|
|
2810
|
-
const
|
|
2817
|
+
const ze = Xe(null);
|
|
2811
2818
|
function ea() {
|
|
2812
|
-
return Je(
|
|
2819
|
+
return Je(ze);
|
|
2813
2820
|
}
|
|
2814
2821
|
function ta({ option: e }) {
|
|
2815
2822
|
const t = ea(), n = t?.isSelected(e.value) ?? !1, a = e.disabled || t?.groupDisabled, r = y(() => {
|
|
2816
2823
|
a || t?.select(e.value);
|
|
2817
2824
|
}, [a, t, e.value]), s = y(
|
|
2818
|
-
(
|
|
2819
|
-
a || t?.onKeyNav(
|
|
2825
|
+
(u) => {
|
|
2826
|
+
a || t?.onKeyNav(u, e.value);
|
|
2820
2827
|
},
|
|
2821
2828
|
[a, t, e.value]
|
|
2822
2829
|
), o = e.colorToken ? `var(--gloss-color-${e.colorToken}, ${e.color ?? "#888"})` : e.color ?? "#888", d = t?.firstFocusableValue === e.value, b = a ? -1 : d ? 0 : -1;
|
|
2823
|
-
return /* @__PURE__ */
|
|
2830
|
+
return /* @__PURE__ */ i(
|
|
2824
2831
|
"button",
|
|
2825
2832
|
{
|
|
2826
|
-
ref: (
|
|
2833
|
+
ref: (u) => t?.registerRef(e.value, u),
|
|
2827
2834
|
type: "button",
|
|
2828
2835
|
role: "radio",
|
|
2829
2836
|
"aria-checked": n,
|
|
@@ -2849,35 +2856,35 @@ function aa({
|
|
|
2849
2856
|
disabled: r = !1,
|
|
2850
2857
|
name: s
|
|
2851
2858
|
}) {
|
|
2852
|
-
const o = t !== void 0, [d, b] = W(n),
|
|
2859
|
+
const o = t !== void 0, [d, b] = W(n), u = o ? t : d, g = y(
|
|
2853
2860
|
(N) => {
|
|
2854
2861
|
o || b(N), a?.(N);
|
|
2855
2862
|
},
|
|
2856
2863
|
[o, a]
|
|
2857
2864
|
), C = y(
|
|
2858
|
-
(N) =>
|
|
2859
|
-
[
|
|
2865
|
+
(N) => u === N,
|
|
2866
|
+
[u]
|
|
2860
2867
|
), m = R(/* @__PURE__ */ new Map()), c = y((N, _) => {
|
|
2861
2868
|
_ ? m.current.set(N, _) : m.current.delete(N);
|
|
2862
|
-
}, []),
|
|
2869
|
+
}, []), h = e.filter((N) => !N.disabled && !r), x = h.find((N) => N.value === u)?.value ?? h[0]?.value, f = y((N) => {
|
|
2863
2870
|
const _ = m.current.get(N);
|
|
2864
2871
|
_ && _.focus();
|
|
2865
|
-
}, []),
|
|
2872
|
+
}, []), S = y(
|
|
2866
2873
|
(N, _) => {
|
|
2867
2874
|
if (r) return;
|
|
2868
2875
|
const T = e.filter((w) => !w.disabled);
|
|
2869
2876
|
if (T.length === 0) return;
|
|
2870
|
-
const
|
|
2871
|
-
if (
|
|
2872
|
-
let v =
|
|
2877
|
+
const l = T.findIndex((w) => w.value === _);
|
|
2878
|
+
if (l === -1) return;
|
|
2879
|
+
let v = l;
|
|
2873
2880
|
switch (N.key) {
|
|
2874
2881
|
case "ArrowRight":
|
|
2875
2882
|
case "ArrowDown":
|
|
2876
|
-
v = (
|
|
2883
|
+
v = (l + 1) % T.length;
|
|
2877
2884
|
break;
|
|
2878
2885
|
case "ArrowLeft":
|
|
2879
2886
|
case "ArrowUp":
|
|
2880
|
-
v = (
|
|
2887
|
+
v = (l - 1 + T.length) % T.length;
|
|
2881
2888
|
break;
|
|
2882
2889
|
case "Home":
|
|
2883
2890
|
v = 0;
|
|
@@ -2887,27 +2894,27 @@ function aa({
|
|
|
2887
2894
|
break;
|
|
2888
2895
|
case " ":
|
|
2889
2896
|
case "Enter":
|
|
2890
|
-
N.preventDefault(),
|
|
2897
|
+
N.preventDefault(), g(_);
|
|
2891
2898
|
return;
|
|
2892
2899
|
default:
|
|
2893
2900
|
return;
|
|
2894
2901
|
}
|
|
2895
2902
|
N.preventDefault();
|
|
2896
2903
|
const p = T[v].value;
|
|
2897
|
-
|
|
2904
|
+
f(p), g(p);
|
|
2898
2905
|
},
|
|
2899
|
-
[r, e,
|
|
2906
|
+
[r, e, g, f]
|
|
2900
2907
|
), I = {
|
|
2901
|
-
selectedValue:
|
|
2902
|
-
select:
|
|
2908
|
+
selectedValue: u,
|
|
2909
|
+
select: g,
|
|
2903
2910
|
isSelected: C,
|
|
2904
2911
|
groupDisabled: r,
|
|
2905
2912
|
name: s,
|
|
2906
2913
|
registerRef: c,
|
|
2907
|
-
firstFocusableValue:
|
|
2908
|
-
onKeyNav:
|
|
2914
|
+
firstFocusableValue: x,
|
|
2915
|
+
onKeyNav: S
|
|
2909
2916
|
};
|
|
2910
|
-
return /* @__PURE__ */
|
|
2917
|
+
return /* @__PURE__ */ i(ze.Provider, { value: I, children: /* @__PURE__ */ i(
|
|
2911
2918
|
"div",
|
|
2912
2919
|
{
|
|
2913
2920
|
className: "gloss-preset-swatch-row",
|
|
@@ -2915,20 +2922,20 @@ function aa({
|
|
|
2915
2922
|
"aria-label": s,
|
|
2916
2923
|
"aria-disabled": r,
|
|
2917
2924
|
"data-disabled": r || void 0,
|
|
2918
|
-
children: e.map((N) => /* @__PURE__ */
|
|
2925
|
+
children: e.map((N) => /* @__PURE__ */ i(ta, { option: N }, N.value))
|
|
2919
2926
|
}
|
|
2920
2927
|
) });
|
|
2921
2928
|
}
|
|
2922
2929
|
aa.displayName = "PresetSwatchRow";
|
|
2923
|
-
function
|
|
2930
|
+
function Ne(e, t) {
|
|
2924
2931
|
for (const n of e)
|
|
2925
2932
|
if (n.items.some((a) => a.id === t))
|
|
2926
2933
|
return n.zoneKey;
|
|
2927
2934
|
return null;
|
|
2928
2935
|
}
|
|
2929
|
-
function
|
|
2936
|
+
function Pe(e, t) {
|
|
2930
2937
|
const n = e.find((a) => a.zoneKey === t);
|
|
2931
|
-
return n ? n.zoneKey :
|
|
2938
|
+
return n ? n.zoneKey : Ne(e, t);
|
|
2932
2939
|
}
|
|
2933
2940
|
function na(e, t, n) {
|
|
2934
2941
|
const a = [...e], [r] = a.splice(t, 1);
|
|
@@ -2939,28 +2946,28 @@ function ra(e) {
|
|
|
2939
2946
|
}
|
|
2940
2947
|
function sa(e) {
|
|
2941
2948
|
const [t, n] = W(
|
|
2942
|
-
() => e.zones.map((
|
|
2943
|
-
`useSortableZones: zone "${
|
|
2944
|
-
), { ...
|
|
2949
|
+
() => e.zones.map((f) => f.maxItems !== void 0 && f.items.length > f.maxItems ? (process.env.NODE_ENV !== "production" && console.warn(
|
|
2950
|
+
`useSortableZones: zone "${f.zoneKey}" exceeds maxItems (${f.items.length} > ${f.maxItems}); trimming to cap.`
|
|
2951
|
+
), { ...f, items: f.items.slice(0, f.maxItems) }) : f)
|
|
2945
2952
|
), [a, r] = W(null), [s, o] = W(null), d = R(null), b = R(e.onZoneChange);
|
|
2946
2953
|
b.current = e.onZoneChange;
|
|
2947
|
-
const
|
|
2954
|
+
const u = se(
|
|
2948
2955
|
() => ra(e.zones),
|
|
2949
2956
|
[e.zones]
|
|
2950
|
-
),
|
|
2957
|
+
), g = R(u);
|
|
2951
2958
|
L(() => {
|
|
2952
|
-
|
|
2953
|
-
e.zones.map((
|
|
2954
|
-
`useSortableZones: zone "${
|
|
2955
|
-
), { ...
|
|
2959
|
+
g.current !== u && (g.current = u, !a && n(
|
|
2960
|
+
e.zones.map((f) => f.maxItems !== void 0 && f.items.length > f.maxItems ? (process.env.NODE_ENV !== "production" && console.warn(
|
|
2961
|
+
`useSortableZones: zone "${f.zoneKey}" exceeds maxItems (${f.items.length} > ${f.maxItems}); trimming to cap.`
|
|
2962
|
+
), { ...f, items: f.items.slice(0, f.maxItems) }) : f)
|
|
2956
2963
|
));
|
|
2957
|
-
}, [
|
|
2964
|
+
}, [u, e.zones, a]);
|
|
2958
2965
|
const C = y(
|
|
2959
|
-
(
|
|
2960
|
-
const
|
|
2966
|
+
(f) => {
|
|
2967
|
+
const S = f.active.id;
|
|
2961
2968
|
let I = null, N = null;
|
|
2962
2969
|
for (const _ of t) {
|
|
2963
|
-
const T = _.items.find((
|
|
2970
|
+
const T = _.items.find((l) => l.id === S);
|
|
2964
2971
|
if (T) {
|
|
2965
2972
|
I = T, N = _.zoneKey;
|
|
2966
2973
|
break;
|
|
@@ -2970,71 +2977,71 @@ function sa(e) {
|
|
|
2970
2977
|
},
|
|
2971
2978
|
[t]
|
|
2972
2979
|
), m = y(
|
|
2973
|
-
(
|
|
2974
|
-
if (!
|
|
2980
|
+
(f) => {
|
|
2981
|
+
if (!f.over) {
|
|
2975
2982
|
o(d.current);
|
|
2976
2983
|
return;
|
|
2977
2984
|
}
|
|
2978
|
-
const
|
|
2979
|
-
o(
|
|
2985
|
+
const S = Pe(t, f.over.id);
|
|
2986
|
+
o(S);
|
|
2980
2987
|
},
|
|
2981
2988
|
[t]
|
|
2982
2989
|
), c = y(
|
|
2983
|
-
(
|
|
2984
|
-
const { active:
|
|
2990
|
+
(f) => {
|
|
2991
|
+
const { active: S, over: I } = f, N = () => {
|
|
2985
2992
|
d.current = null, r(null), o(null);
|
|
2986
2993
|
};
|
|
2987
2994
|
if (!I) {
|
|
2988
2995
|
N();
|
|
2989
2996
|
return;
|
|
2990
2997
|
}
|
|
2991
|
-
const _ =
|
|
2998
|
+
const _ = Ne(t, S.id), T = Pe(t, I.id);
|
|
2992
2999
|
if (!_ || !T) {
|
|
2993
3000
|
N();
|
|
2994
3001
|
return;
|
|
2995
3002
|
}
|
|
2996
|
-
let
|
|
3003
|
+
let l = t.map((v) => ({ ...v, items: [...v.items] }));
|
|
2997
3004
|
if (_ === T) {
|
|
2998
|
-
const v =
|
|
2999
|
-
|
|
3005
|
+
const v = l.findIndex((E) => E.zoneKey === _), p = l[v], w = p.items.findIndex((E) => E.id === S.id), k = p.items.findIndex((E) => E.id === I.id), M = k >= 0 ? k : Math.max(0, p.items.length - 1);
|
|
3006
|
+
l[v] = {
|
|
3000
3007
|
...p,
|
|
3001
3008
|
items: na(p.items, w, M)
|
|
3002
3009
|
};
|
|
3003
3010
|
} else {
|
|
3004
|
-
const v =
|
|
3011
|
+
const v = l.findIndex((K) => K.zoneKey === _), p = l.findIndex((K) => K.zoneKey === T), w = l[v], k = l[p], M = w.items.find((K) => K.id === S.id);
|
|
3005
3012
|
if (!M) {
|
|
3006
3013
|
N();
|
|
3007
3014
|
return;
|
|
3008
3015
|
}
|
|
3009
|
-
const E = w.items.filter((K) => K.id !==
|
|
3010
|
-
let $ = E,
|
|
3011
|
-
if (k.maxItems !== void 0 &&
|
|
3012
|
-
const K =
|
|
3013
|
-
|
|
3016
|
+
const E = w.items.filter((K) => K.id !== S.id), G = k.items.findIndex((K) => K.id === I.id), V = G >= 0 ? G : k.items.length;
|
|
3017
|
+
let $ = E, A = [...k.items];
|
|
3018
|
+
if (k.maxItems !== void 0 && A.length >= k.maxItems) {
|
|
3019
|
+
const K = A[A.length - 1];
|
|
3020
|
+
A = A.slice(0, k.maxItems - 1), $ = [...E, K];
|
|
3014
3021
|
}
|
|
3015
|
-
const j = Math.min(V,
|
|
3016
|
-
...
|
|
3022
|
+
const j = Math.min(V, A.length), oe = [
|
|
3023
|
+
...A.slice(0, j),
|
|
3017
3024
|
M,
|
|
3018
|
-
...
|
|
3025
|
+
...A.slice(j)
|
|
3019
3026
|
];
|
|
3020
|
-
|
|
3027
|
+
l[v] = { ...w, items: $ }, l[p] = { ...k, items: oe };
|
|
3021
3028
|
}
|
|
3022
|
-
n(
|
|
3029
|
+
n(l), b.current?.(l), N();
|
|
3023
3030
|
},
|
|
3024
3031
|
[t]
|
|
3025
|
-
),
|
|
3026
|
-
(
|
|
3027
|
-
id:
|
|
3028
|
-
"data-zone-key":
|
|
3032
|
+
), h = y(
|
|
3033
|
+
(f) => ({
|
|
3034
|
+
id: f,
|
|
3035
|
+
"data-zone-key": f
|
|
3029
3036
|
}),
|
|
3030
3037
|
[]
|
|
3031
|
-
),
|
|
3032
|
-
(
|
|
3033
|
-
const
|
|
3038
|
+
), x = y(
|
|
3039
|
+
(f) => {
|
|
3040
|
+
const S = Ne(t, f.id) ?? "";
|
|
3034
3041
|
return {
|
|
3035
|
-
id:
|
|
3036
|
-
"data-item-id":
|
|
3037
|
-
"data-zone-key":
|
|
3042
|
+
id: f.id,
|
|
3043
|
+
"data-item-id": f.id,
|
|
3044
|
+
"data-zone-key": S
|
|
3038
3045
|
};
|
|
3039
3046
|
},
|
|
3040
3047
|
[t]
|
|
@@ -3043,8 +3050,8 @@ function sa(e) {
|
|
|
3043
3050
|
zones: t,
|
|
3044
3051
|
activeZone: s,
|
|
3045
3052
|
activeItem: a,
|
|
3046
|
-
getZoneProps:
|
|
3047
|
-
getItemProps:
|
|
3053
|
+
getZoneProps: h,
|
|
3054
|
+
getItemProps: x,
|
|
3048
3055
|
handleDragStart: C,
|
|
3049
3056
|
handleDragOver: m,
|
|
3050
3057
|
handleDragEnd: c
|
|
@@ -3100,14 +3107,14 @@ function da(e) {
|
|
|
3100
3107
|
const { zones: t, onZoneChange: n, renderZone: a, renderItem: r, renderDragOverlay: s } = e, o = sa({ zones: t, onZoneChange: n }), [d, b] = H.useState(ne);
|
|
3101
3108
|
return H.useEffect(() => {
|
|
3102
3109
|
if (d) return;
|
|
3103
|
-
let
|
|
3104
|
-
return ca().then((
|
|
3105
|
-
|
|
3110
|
+
let u = !0;
|
|
3111
|
+
return ca().then((g) => {
|
|
3112
|
+
u && b(g);
|
|
3106
3113
|
}), () => {
|
|
3107
|
-
|
|
3114
|
+
u = !1;
|
|
3108
3115
|
};
|
|
3109
|
-
}, [d]), d ? /* @__PURE__ */
|
|
3110
|
-
|
|
3116
|
+
}, [d]), d ? /* @__PURE__ */ i(
|
|
3117
|
+
Ke,
|
|
3111
3118
|
{
|
|
3112
3119
|
state: o,
|
|
3113
3120
|
modules: d,
|
|
@@ -3115,35 +3122,35 @@ function da(e) {
|
|
|
3115
3122
|
renderItem: r,
|
|
3116
3123
|
renderDragOverlay: s
|
|
3117
3124
|
}
|
|
3118
|
-
) : /* @__PURE__ */
|
|
3119
|
-
const
|
|
3120
|
-
return /* @__PURE__ */
|
|
3125
|
+
) : /* @__PURE__ */ i("div", { "data-sortable-zones-passive": "true", children: o.zones.map((u) => {
|
|
3126
|
+
const g = u.items.map((C) => /* @__PURE__ */ i(H.Fragment, { children: r(C) }, C.id));
|
|
3127
|
+
return /* @__PURE__ */ i("div", { ...o.getZoneProps(u.zoneKey), children: a(u.zoneKey, u.items, g) }, u.zoneKey);
|
|
3121
3128
|
}) });
|
|
3122
3129
|
}
|
|
3123
3130
|
da.displayName = "SortableZones";
|
|
3124
|
-
function
|
|
3131
|
+
function Ke({
|
|
3125
3132
|
state: e,
|
|
3126
3133
|
modules: t,
|
|
3127
3134
|
renderZone: n,
|
|
3128
3135
|
renderItem: a,
|
|
3129
3136
|
renderDragOverlay: r
|
|
3130
3137
|
}) {
|
|
3131
|
-
const { core: s, sortable: o, utilities: d } = t, { DndContext: b, DragOverlay:
|
|
3138
|
+
const { core: s, sortable: o, utilities: d } = t, { DndContext: b, DragOverlay: u, useSensors: g, useSensor: C, useDroppable: m, PointerSensor: c, KeyboardSensor: h, closestCenter: x } = s, { SortableContext: f, verticalListSortingStrategy: S } = o, I = g(
|
|
3132
3139
|
C(c, { activationConstraint: { distance: 5 } }),
|
|
3133
|
-
C(
|
|
3134
|
-
), N = b, _ =
|
|
3135
|
-
return /* @__PURE__ */
|
|
3140
|
+
C(h)
|
|
3141
|
+
), N = b, _ = u, T = f;
|
|
3142
|
+
return /* @__PURE__ */ O(
|
|
3136
3143
|
N,
|
|
3137
3144
|
{
|
|
3138
3145
|
sensors: I,
|
|
3139
|
-
collisionDetection:
|
|
3146
|
+
collisionDetection: x,
|
|
3140
3147
|
onDragStart: e.handleDragStart,
|
|
3141
3148
|
onDragOver: e.handleDragOver,
|
|
3142
3149
|
onDragEnd: e.handleDragEnd,
|
|
3143
3150
|
children: [
|
|
3144
|
-
e.zones.map((
|
|
3145
|
-
const v =
|
|
3146
|
-
|
|
3151
|
+
e.zones.map((l) => {
|
|
3152
|
+
const v = l.items.map((w) => w.id), p = l.items.map((w) => /* @__PURE__ */ i(
|
|
3153
|
+
We,
|
|
3147
3154
|
{
|
|
3148
3155
|
id: w.id,
|
|
3149
3156
|
useSortable: o.useSortable,
|
|
@@ -3152,42 +3159,42 @@ function ze({
|
|
|
3152
3159
|
},
|
|
3153
3160
|
w.id
|
|
3154
3161
|
));
|
|
3155
|
-
return /* @__PURE__ */
|
|
3156
|
-
|
|
3162
|
+
return /* @__PURE__ */ i(
|
|
3163
|
+
Ge,
|
|
3157
3164
|
{
|
|
3158
|
-
zoneKey:
|
|
3159
|
-
zoneProps: e.getZoneProps(
|
|
3165
|
+
zoneKey: l.zoneKey,
|
|
3166
|
+
zoneProps: e.getZoneProps(l.zoneKey),
|
|
3160
3167
|
useDroppable: m,
|
|
3161
|
-
children: /* @__PURE__ */
|
|
3168
|
+
children: /* @__PURE__ */ i(T, { items: v, strategy: S, children: n(l.zoneKey, l.items, p) })
|
|
3162
3169
|
},
|
|
3163
|
-
|
|
3170
|
+
l.zoneKey
|
|
3164
3171
|
);
|
|
3165
3172
|
}),
|
|
3166
|
-
/* @__PURE__ */
|
|
3173
|
+
/* @__PURE__ */ i(_, { children: e.activeItem ? r?.(e.activeItem) ?? a(e.activeItem) : null })
|
|
3167
3174
|
]
|
|
3168
3175
|
}
|
|
3169
3176
|
);
|
|
3170
3177
|
}
|
|
3171
|
-
|
|
3172
|
-
function
|
|
3173
|
-
const { attributes: r, listeners: s, setNodeRef: o, transform: d, transition: b, isDragging:
|
|
3178
|
+
Ke.displayName = "SortableZonesInner";
|
|
3179
|
+
function We({ id: e, useSortable: t, cssHelper: n, children: a }) {
|
|
3180
|
+
const { attributes: r, listeners: s, setNodeRef: o, transform: d, transition: b, isDragging: u } = t({ id: e }), g = {
|
|
3174
3181
|
transform: n?.Transform?.toString(d) ?? void 0,
|
|
3175
3182
|
transition: b,
|
|
3176
|
-
opacity:
|
|
3183
|
+
opacity: u ? 0.5 : 1
|
|
3177
3184
|
};
|
|
3178
|
-
return /* @__PURE__ */
|
|
3185
|
+
return /* @__PURE__ */ i("div", { ref: o, style: g, "data-sortable-item-id": e, ...r, ...s, children: a });
|
|
3179
3186
|
}
|
|
3180
|
-
|
|
3181
|
-
function
|
|
3187
|
+
We.displayName = "SortableItem";
|
|
3188
|
+
function Ge({
|
|
3182
3189
|
zoneKey: e,
|
|
3183
3190
|
zoneProps: t,
|
|
3184
3191
|
useDroppable: n,
|
|
3185
3192
|
children: a
|
|
3186
3193
|
}) {
|
|
3187
3194
|
const { setNodeRef: r, isOver: s } = n({ id: e });
|
|
3188
|
-
return /* @__PURE__ */
|
|
3195
|
+
return /* @__PURE__ */ i("div", { ref: r, "data-zone-is-over": s || void 0, ...t, children: a });
|
|
3189
3196
|
}
|
|
3190
|
-
|
|
3197
|
+
Ge.displayName = "ZoneDroppable";
|
|
3191
3198
|
function In({
|
|
3192
3199
|
slotLeft: e,
|
|
3193
3200
|
slotCenter: t,
|
|
@@ -3201,7 +3208,7 @@ function In({
|
|
|
3201
3208
|
"--gloss-bottom-toolbar-height": `${a}px`,
|
|
3202
3209
|
...s
|
|
3203
3210
|
};
|
|
3204
|
-
return /* @__PURE__ */
|
|
3211
|
+
return /* @__PURE__ */ O(
|
|
3205
3212
|
"div",
|
|
3206
3213
|
{
|
|
3207
3214
|
role: "toolbar",
|
|
@@ -3210,7 +3217,7 @@ function In({
|
|
|
3210
3217
|
className: ["gloss-bottom-toolbar", r].filter(Boolean).join(" "),
|
|
3211
3218
|
style: d,
|
|
3212
3219
|
children: [
|
|
3213
|
-
/* @__PURE__ */
|
|
3220
|
+
/* @__PURE__ */ i(
|
|
3214
3221
|
"div",
|
|
3215
3222
|
{
|
|
3216
3223
|
className: "gloss-bottom-toolbar__slot gloss-bottom-toolbar__slot--left",
|
|
@@ -3218,7 +3225,7 @@ function In({
|
|
|
3218
3225
|
children: e
|
|
3219
3226
|
}
|
|
3220
3227
|
),
|
|
3221
|
-
/* @__PURE__ */
|
|
3228
|
+
/* @__PURE__ */ i(
|
|
3222
3229
|
"div",
|
|
3223
3230
|
{
|
|
3224
3231
|
className: "gloss-bottom-toolbar__slot gloss-bottom-toolbar__slot--center",
|
|
@@ -3226,7 +3233,7 @@ function In({
|
|
|
3226
3233
|
children: t
|
|
3227
3234
|
}
|
|
3228
3235
|
),
|
|
3229
|
-
/* @__PURE__ */
|
|
3236
|
+
/* @__PURE__ */ i(
|
|
3230
3237
|
"div",
|
|
3231
3238
|
{
|
|
3232
3239
|
className: "gloss-bottom-toolbar__slot gloss-bottom-toolbar__slot--right",
|
|
@@ -3248,66 +3255,66 @@ function Pn({
|
|
|
3248
3255
|
pulseNonce: o
|
|
3249
3256
|
}) {
|
|
3250
3257
|
const d = qe.useRef([]);
|
|
3251
|
-
return d.current.length = e, /* @__PURE__ */
|
|
3258
|
+
return d.current.length = e, /* @__PURE__ */ i(
|
|
3252
3259
|
"div",
|
|
3253
3260
|
{
|
|
3254
3261
|
role: "tablist",
|
|
3255
3262
|
"aria-label": a,
|
|
3256
3263
|
"data-testid": "gloss-section-dots",
|
|
3257
3264
|
className: "gloss-section-dots",
|
|
3258
|
-
onKeyDown: (
|
|
3265
|
+
onKeyDown: (u) => {
|
|
3259
3266
|
if (e !== 0) {
|
|
3260
|
-
if (
|
|
3261
|
-
|
|
3262
|
-
const
|
|
3263
|
-
n(
|
|
3264
|
-
} else if (
|
|
3265
|
-
|
|
3266
|
-
const
|
|
3267
|
-
n(
|
|
3267
|
+
if (u.key === "ArrowRight") {
|
|
3268
|
+
u.preventDefault();
|
|
3269
|
+
const g = (t + 1) % e;
|
|
3270
|
+
n(g), requestAnimationFrame(() => d.current[g]?.focus());
|
|
3271
|
+
} else if (u.key === "ArrowLeft") {
|
|
3272
|
+
u.preventDefault();
|
|
3273
|
+
const g = (t - 1 + e) % e;
|
|
3274
|
+
n(g), requestAnimationFrame(() => d.current[g]?.focus());
|
|
3268
3275
|
}
|
|
3269
3276
|
}
|
|
3270
3277
|
},
|
|
3271
|
-
children: Array.from({ length: e }, (
|
|
3278
|
+
children: Array.from({ length: e }, (u, g) => /* @__PURE__ */ i(
|
|
3272
3279
|
"button",
|
|
3273
3280
|
{
|
|
3274
3281
|
ref: (C) => {
|
|
3275
|
-
d.current[
|
|
3282
|
+
d.current[g] = C;
|
|
3276
3283
|
},
|
|
3277
3284
|
type: "button",
|
|
3278
3285
|
role: "tab",
|
|
3279
|
-
"aria-selected":
|
|
3280
|
-
"aria-label":
|
|
3281
|
-
"data-state":
|
|
3282
|
-
"data-section-index":
|
|
3286
|
+
"aria-selected": g === t,
|
|
3287
|
+
"aria-label": g === r ? "Unconfirmed section" : `Section ${g + 1}`,
|
|
3288
|
+
"data-state": g === r ? "provisional-hollow" : g === s ? "pulse" : g === t ? "current" : "hollow",
|
|
3289
|
+
"data-section-index": g,
|
|
3283
3290
|
className: [
|
|
3284
3291
|
"gloss-section-dots__dot",
|
|
3285
|
-
|
|
3292
|
+
g === t && "gloss-section-dots__dot--current"
|
|
3286
3293
|
].filter(Boolean).join(" "),
|
|
3287
|
-
onClick: () => n(
|
|
3294
|
+
onClick: () => n(g)
|
|
3288
3295
|
},
|
|
3289
|
-
|
|
3296
|
+
g === s ? `${g}-${o ?? 0}` : g
|
|
3290
3297
|
))
|
|
3291
3298
|
}
|
|
3292
3299
|
);
|
|
3293
3300
|
}
|
|
3294
3301
|
const ua = H.forwardRef(({ density: e = "compact", children: t, ...n }, a) => {
|
|
3295
3302
|
const r = { ...n };
|
|
3296
|
-
return delete r.className, delete r.style, /* @__PURE__ */
|
|
3303
|
+
return delete r.className, delete r.style, /* @__PURE__ */ i("div", { ref: a, className: "gloss-container-toolbar", role: "toolbar", ...r, children: /* @__PURE__ */ i(Ce, { region: "toolbar", density: e, children: t }) });
|
|
3297
3304
|
});
|
|
3298
3305
|
ua.displayName = "ContainerToolbar";
|
|
3299
3306
|
const ma = H.forwardRef(({ legend: e, description: t, density: n = "default", children: a, ...r }, s) => {
|
|
3300
3307
|
const o = { ...r };
|
|
3301
|
-
return delete o.className, delete o.style, /* @__PURE__ */
|
|
3302
|
-
e && /* @__PURE__ */
|
|
3303
|
-
t && /* @__PURE__ */
|
|
3304
|
-
/* @__PURE__ */
|
|
3308
|
+
return delete o.className, delete o.style, /* @__PURE__ */ O("fieldset", { ref: s, className: "gloss-container-form-section", ...o, children: [
|
|
3309
|
+
e && /* @__PURE__ */ i("legend", { className: "gloss-container-form-section__legend", children: e }),
|
|
3310
|
+
t && /* @__PURE__ */ i("p", { className: "gloss-container-form-section__description", children: t }),
|
|
3311
|
+
/* @__PURE__ */ i(Ce, { region: "form-section", density: n, children: a })
|
|
3305
3312
|
] });
|
|
3306
3313
|
});
|
|
3307
3314
|
ma.displayName = "ContainerFormSection";
|
|
3308
3315
|
const ga = H.forwardRef(({ density: e = "compact", children: t, ...n }, a) => {
|
|
3309
3316
|
const r = { ...n };
|
|
3310
|
-
return delete r.className, delete r.style, /* @__PURE__ */
|
|
3317
|
+
return delete r.className, delete r.style, /* @__PURE__ */ i("div", { ref: a, className: "gloss-container-table", ...r, children: /* @__PURE__ */ i(Ce, { region: "table", density: e, children: t }) });
|
|
3311
3318
|
});
|
|
3312
3319
|
ga.displayName = "ContainerTable";
|
|
3313
3320
|
export {
|
|
@@ -3368,7 +3375,7 @@ export {
|
|
|
3368
3375
|
ai as DEFAULT_MARKET_PRESETS,
|
|
3369
3376
|
Tr as DEFAULT_OVERFLOW_IDS,
|
|
3370
3377
|
ni as DEFAULT_PINNED,
|
|
3371
|
-
|
|
3378
|
+
Ee as DEFAULT_RESIZE_PHYSICS,
|
|
3372
3379
|
Rr as DataTable,
|
|
3373
3380
|
Ir as DatePicker,
|
|
3374
3381
|
Pr as DateRangePicker,
|
|
@@ -3430,7 +3437,7 @@ export {
|
|
|
3430
3437
|
_s as OrderFilterBar,
|
|
3431
3438
|
ri as PERIOD_OPTIONS,
|
|
3432
3439
|
xt as PageChip,
|
|
3433
|
-
|
|
3440
|
+
Oe as PageDropdown,
|
|
3434
3441
|
xs as PasswordInput,
|
|
3435
3442
|
Ss as PaymentForm,
|
|
3436
3443
|
Ms as PaymentMethodSelect,
|
|
@@ -3475,10 +3482,10 @@ export {
|
|
|
3475
3482
|
no as StatusModeCard,
|
|
3476
3483
|
ht as StatusSlotChipMenu,
|
|
3477
3484
|
ro as Stepper,
|
|
3478
|
-
|
|
3485
|
+
Fe as SwingReveal,
|
|
3479
3486
|
oi as TODAY_PRESET,
|
|
3480
3487
|
J as TUNING_DEFAULTS,
|
|
3481
|
-
|
|
3488
|
+
Be as TUNING_STORAGE_KEY,
|
|
3482
3489
|
so as TabGroup,
|
|
3483
3490
|
oo as TabbedDataView,
|
|
3484
3491
|
io as TagInput,
|
|
@@ -3493,7 +3500,7 @@ export {
|
|
|
3493
3500
|
ho as TrendCard,
|
|
3494
3501
|
bo as TrendIndicator,
|
|
3495
3502
|
Jo as UIContext,
|
|
3496
|
-
|
|
3503
|
+
Ce as UIContextProvider,
|
|
3497
3504
|
vo as UnifiedBreakdownTable,
|
|
3498
3505
|
yo as UnifiedContextMenu,
|
|
3499
3506
|
yt as VelocityBuffer,
|
|
@@ -3518,7 +3525,7 @@ export {
|
|
|
3518
3525
|
_o as creditCardFormMetadata,
|
|
3519
3526
|
xo as creditCardSchema,
|
|
3520
3527
|
mt as dateChip,
|
|
3521
|
-
|
|
3528
|
+
$e as defaultControlBarState,
|
|
3522
3529
|
So as destructiveModalMetadata,
|
|
3523
3530
|
Mo as durations,
|
|
3524
3531
|
To as easings,
|