@mt-gloss/ui 0.1.100 → 0.1.101
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/index.js +508 -508
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -32,13 +32,13 @@ function un(e) {
|
|
|
32
32
|
items: t,
|
|
33
33
|
activeIndex: n,
|
|
34
34
|
onActiveIndexChange: a,
|
|
35
|
-
loop:
|
|
36
|
-
orientation:
|
|
35
|
+
loop: s = !0,
|
|
36
|
+
orientation: i = "vertical",
|
|
37
37
|
enabled: o = !0,
|
|
38
38
|
isItemDisabled: l,
|
|
39
39
|
onSelect: m,
|
|
40
|
-
onEscape:
|
|
41
|
-
} = e, [u, h] = I(-1),
|
|
40
|
+
onEscape: d
|
|
41
|
+
} = e, [u, h] = I(-1), c = n !== void 0 ? n : u, p = N(
|
|
42
42
|
(g) => {
|
|
43
43
|
n === void 0 && h(g), a?.(g);
|
|
44
44
|
},
|
|
@@ -49,35 +49,35 @@ function un(e) {
|
|
|
49
49
|
if (_.length === 0) return -1;
|
|
50
50
|
const D = _.indexOf(g);
|
|
51
51
|
if (D === -1)
|
|
52
|
-
return v === 1 ? _.find((
|
|
52
|
+
return v === 1 ? _.find((R) => R > g) ?? (s ? _[0] : -1) : [..._].reverse().find((E) => E < g) ?? (s ? _[_.length - 1] : -1);
|
|
53
53
|
let M = D + v;
|
|
54
|
-
return
|
|
54
|
+
return s ? M = (M + _.length) % _.length : M = Math.max(0, Math.min(_.length - 1, M)), _[M];
|
|
55
55
|
},
|
|
56
|
-
[w,
|
|
56
|
+
[w, s]
|
|
57
57
|
), f = N(() => {
|
|
58
58
|
const g = w();
|
|
59
59
|
g.length > 0 && p(g[0]);
|
|
60
60
|
}, [w, p]), b = N(() => {
|
|
61
61
|
const g = w();
|
|
62
62
|
g.length > 0 && p(g[g.length - 1]);
|
|
63
|
-
}, [w, p]),
|
|
64
|
-
const g = k(
|
|
63
|
+
}, [w, p]), x = N(() => {
|
|
64
|
+
const g = k(c, 1);
|
|
65
65
|
g !== -1 && p(g);
|
|
66
|
-
}, [
|
|
67
|
-
const g = k(
|
|
66
|
+
}, [c, k, p]), C = N(() => {
|
|
67
|
+
const g = k(c, -1);
|
|
68
68
|
g !== -1 && p(g);
|
|
69
|
-
}, [
|
|
69
|
+
}, [c, k, p]), S = N(() => {
|
|
70
70
|
p(-1);
|
|
71
71
|
}, [p]), T = N(
|
|
72
72
|
(g) => {
|
|
73
73
|
if (!o) return;
|
|
74
|
-
const { key: v } = g, _ = v === "ArrowUp" && (
|
|
74
|
+
const { key: v } = g, _ = v === "ArrowUp" && (i === "vertical" || i === "both"), D = v === "ArrowDown" && (i === "vertical" || i === "both"), M = v === "ArrowLeft" && (i === "horizontal" || i === "both"), R = v === "ArrowRight" && (i === "horizontal" || i === "both");
|
|
75
75
|
if (_ || M) {
|
|
76
|
-
g.preventDefault(),
|
|
76
|
+
g.preventDefault(), c === -1 ? b() : C();
|
|
77
77
|
return;
|
|
78
78
|
}
|
|
79
|
-
if (D ||
|
|
80
|
-
g.preventDefault(),
|
|
79
|
+
if (D || R) {
|
|
80
|
+
g.preventDefault(), c === -1 ? f() : x();
|
|
81
81
|
return;
|
|
82
82
|
}
|
|
83
83
|
if (v === "Home") {
|
|
@@ -88,38 +88,38 @@ function un(e) {
|
|
|
88
88
|
g.preventDefault(), b();
|
|
89
89
|
return;
|
|
90
90
|
}
|
|
91
|
-
if ((v === "Enter" || v === " ") &&
|
|
91
|
+
if ((v === "Enter" || v === " ") && c >= 0 && c < t.length) {
|
|
92
92
|
g.preventDefault();
|
|
93
|
-
const E = t[
|
|
94
|
-
l?.(E,
|
|
93
|
+
const E = t[c];
|
|
94
|
+
l?.(E, c) || m?.(E, c);
|
|
95
95
|
return;
|
|
96
96
|
}
|
|
97
97
|
if (v === "Escape") {
|
|
98
|
-
|
|
98
|
+
d?.();
|
|
99
99
|
return;
|
|
100
100
|
}
|
|
101
101
|
},
|
|
102
102
|
[
|
|
103
103
|
o,
|
|
104
|
-
|
|
105
|
-
|
|
104
|
+
i,
|
|
105
|
+
c,
|
|
106
106
|
t,
|
|
107
107
|
f,
|
|
108
108
|
b,
|
|
109
|
-
|
|
109
|
+
x,
|
|
110
110
|
C,
|
|
111
111
|
l,
|
|
112
112
|
m,
|
|
113
|
-
|
|
113
|
+
d
|
|
114
114
|
]
|
|
115
115
|
);
|
|
116
116
|
return {
|
|
117
|
-
focusedIndex:
|
|
117
|
+
focusedIndex: c,
|
|
118
118
|
setFocusedIndex: p,
|
|
119
119
|
handleKeyDown: T,
|
|
120
120
|
focusFirst: f,
|
|
121
121
|
focusLast: b,
|
|
122
|
-
focusNext:
|
|
122
|
+
focusNext: x,
|
|
123
123
|
focusPrevious: C,
|
|
124
124
|
resetFocus: S
|
|
125
125
|
};
|
|
@@ -129,15 +129,15 @@ const gt = ({
|
|
|
129
129
|
unit: t,
|
|
130
130
|
currentValue: n,
|
|
131
131
|
onConfirm: a,
|
|
132
|
-
onSkip:
|
|
133
|
-
hint:
|
|
132
|
+
onSkip: s,
|
|
133
|
+
hint: i
|
|
134
134
|
}) => {
|
|
135
135
|
const [o, l] = I(n != null ? String(n) : ""), m = () => {
|
|
136
136
|
const p = parseFloat(o);
|
|
137
137
|
Number.isNaN(p) || a(p);
|
|
138
|
-
},
|
|
139
|
-
p.key === "Enter" ? (p.preventDefault(), m()) : p.key === "Escape" && (p.preventDefault(),
|
|
140
|
-
}, u = Je(), h = `gloss-target-input-field-${u}`,
|
|
138
|
+
}, d = (p) => {
|
|
139
|
+
p.key === "Enter" ? (p.preventDefault(), m()) : p.key === "Escape" && (p.preventDefault(), s?.());
|
|
140
|
+
}, u = Je(), h = `gloss-target-input-field-${u}`, c = i ? `gloss-target-input-hint-${u}` : void 0;
|
|
141
141
|
return /* @__PURE__ */ y("div", { className: "gloss-target-input", children: [
|
|
142
142
|
/* @__PURE__ */ r("label", { className: "gloss-target-input__label", htmlFor: h, children: e }),
|
|
143
143
|
/* @__PURE__ */ y("div", { className: "gloss-target-input__field-row", children: [
|
|
@@ -149,14 +149,14 @@ const gt = ({
|
|
|
149
149
|
className: "gloss-target-input__field",
|
|
150
150
|
value: o,
|
|
151
151
|
onChange: (p) => l(p.target.value),
|
|
152
|
-
onKeyDown:
|
|
153
|
-
"aria-describedby":
|
|
152
|
+
onKeyDown: d,
|
|
153
|
+
"aria-describedby": c,
|
|
154
154
|
autoFocus: !0
|
|
155
155
|
}
|
|
156
156
|
),
|
|
157
157
|
t && /* @__PURE__ */ r("span", { className: "gloss-target-input__unit", children: t })
|
|
158
158
|
] }),
|
|
159
|
-
|
|
159
|
+
i && /* @__PURE__ */ r("p", { id: c, className: "gloss-target-input__hint", children: i }),
|
|
160
160
|
/* @__PURE__ */ y("div", { className: "gloss-target-input__actions", children: [
|
|
161
161
|
/* @__PURE__ */ r(
|
|
162
162
|
"button",
|
|
@@ -167,12 +167,12 @@ const gt = ({
|
|
|
167
167
|
children: "Confirm"
|
|
168
168
|
}
|
|
169
169
|
),
|
|
170
|
-
|
|
170
|
+
s && /* @__PURE__ */ r(
|
|
171
171
|
"button",
|
|
172
172
|
{
|
|
173
173
|
type: "button",
|
|
174
174
|
className: "gloss-target-input__skip",
|
|
175
|
-
onClick:
|
|
175
|
+
onClick: s,
|
|
176
176
|
children: "Skip"
|
|
177
177
|
}
|
|
178
178
|
)
|
|
@@ -293,11 +293,11 @@ function _t({
|
|
|
293
293
|
anchorEl: t,
|
|
294
294
|
statusId: n,
|
|
295
295
|
onOpenInTable: a,
|
|
296
|
-
onShowOnGraph:
|
|
297
|
-
overflowActions:
|
|
296
|
+
onShowOnGraph: s,
|
|
297
|
+
overflowActions: i,
|
|
298
298
|
onClose: o
|
|
299
299
|
}) {
|
|
300
|
-
const [l, m] = I(null),
|
|
300
|
+
const [l, m] = I(null), d = P(null), u = N(() => {
|
|
301
301
|
if (!t) return { ...ye, top: 0, left: 0 };
|
|
302
302
|
const p = t.getBoundingClientRect();
|
|
303
303
|
return {
|
|
@@ -315,14 +315,14 @@ function _t({
|
|
|
315
315
|
}, [e, o]), A(() => {
|
|
316
316
|
if (!e) return;
|
|
317
317
|
const p = (w) => {
|
|
318
|
-
|
|
318
|
+
d.current && !d.current.contains(w.target) && o();
|
|
319
319
|
};
|
|
320
320
|
return document.addEventListener("pointerdown", p, !0), () => document.removeEventListener("pointerdown", p, !0);
|
|
321
321
|
}, [e, o]), !e) return null;
|
|
322
|
-
const h =
|
|
322
|
+
const h = i && i.length > 0, c = /* @__PURE__ */ y(
|
|
323
323
|
"div",
|
|
324
324
|
{
|
|
325
|
-
ref:
|
|
325
|
+
ref: d,
|
|
326
326
|
"data-status-chip-menu": n,
|
|
327
327
|
role: "menu",
|
|
328
328
|
"aria-label": "Status actions",
|
|
@@ -349,13 +349,13 @@ function _t({
|
|
|
349
349
|
onMouseEnter: () => m("__graph"),
|
|
350
350
|
onMouseLeave: () => m(null),
|
|
351
351
|
onClick: () => {
|
|
352
|
-
|
|
352
|
+
s(n), o();
|
|
353
353
|
},
|
|
354
354
|
children: "Show on graph"
|
|
355
355
|
}
|
|
356
356
|
),
|
|
357
357
|
h && /* @__PURE__ */ r("div", { style: wt }),
|
|
358
|
-
h &&
|
|
358
|
+
h && i?.map((p) => /* @__PURE__ */ r(
|
|
359
359
|
"button",
|
|
360
360
|
{
|
|
361
361
|
role: "menuitem",
|
|
@@ -372,7 +372,7 @@ function _t({
|
|
|
372
372
|
]
|
|
373
373
|
}
|
|
374
374
|
);
|
|
375
|
-
return Ee(
|
|
375
|
+
return Ee(c, document.body);
|
|
376
376
|
}
|
|
377
377
|
_t.displayName = "StatusSlotChipMenu";
|
|
378
378
|
function Ct({
|
|
@@ -380,7 +380,7 @@ function Ct({
|
|
|
380
380
|
targetColSpan: t,
|
|
381
381
|
ghostWidth: n,
|
|
382
382
|
enterMs: a = 180,
|
|
383
|
-
exitMs:
|
|
383
|
+
exitMs: s = 120
|
|
384
384
|
}) {
|
|
385
385
|
return /* @__PURE__ */ r(
|
|
386
386
|
G.div,
|
|
@@ -394,7 +394,7 @@ function Ct({
|
|
|
394
394
|
].filter(Boolean).join(" "),
|
|
395
395
|
style: {
|
|
396
396
|
width: n,
|
|
397
|
-
transitionDuration: `${e ? a :
|
|
397
|
+
transitionDuration: `${e ? a : s}ms`
|
|
398
398
|
}
|
|
399
399
|
}
|
|
400
400
|
);
|
|
@@ -458,11 +458,11 @@ class Cn {
|
|
|
458
458
|
const t = this.samples.length;
|
|
459
459
|
if (t < 2) return 0;
|
|
460
460
|
if (t === 2) {
|
|
461
|
-
const [m,
|
|
462
|
-
return (
|
|
461
|
+
const [m, d] = this.samples, u = Math.max(1, d.t - m.t);
|
|
462
|
+
return (d.x - m.x) / u * 1e3;
|
|
463
463
|
}
|
|
464
|
-
const [n, a,
|
|
465
|
-
return (
|
|
464
|
+
const [n, a, s] = this.samples, i = (s.x - a.x) / Math.max(1, s.t - a.t) * 1e3, o = (a.x - n.x) / Math.max(1, a.t - n.t) * 1e3, l = o;
|
|
465
|
+
return (i * 3 + o * 2 + l * 1) / 6;
|
|
466
466
|
}
|
|
467
467
|
}
|
|
468
468
|
const U = {
|
|
@@ -509,15 +509,15 @@ const U = {
|
|
|
509
509
|
chainStaggerMs: 120
|
|
510
510
|
};
|
|
511
511
|
function Fe(e) {
|
|
512
|
-
const { visible: t, currentTarget: n, previewTarget: a, targetWidth:
|
|
512
|
+
const { visible: t, currentTarget: n, previewTarget: a, targetWidth: s, orientation: i } = e, o = nt(s);
|
|
513
513
|
return A(() => {
|
|
514
|
-
o.set(
|
|
515
|
-
}, [
|
|
514
|
+
o.set(s);
|
|
515
|
+
}, [s, o]), !t || a === n ? null : /* @__PURE__ */ r(
|
|
516
516
|
G.div,
|
|
517
517
|
{
|
|
518
518
|
"aria-hidden": "true",
|
|
519
519
|
"data-resize-pill-ghost": "visible",
|
|
520
|
-
"data-orientation":
|
|
520
|
+
"data-orientation": i,
|
|
521
521
|
className: "gloss-resize-pill-ghost",
|
|
522
522
|
style: {
|
|
523
523
|
// D-09 — uniform blue. NO conditional based on grow vs shrink.
|
|
@@ -552,14 +552,14 @@ function Oe(e) {
|
|
|
552
552
|
visible: t,
|
|
553
553
|
direction: n,
|
|
554
554
|
pillClearancePx: a,
|
|
555
|
-
ghostClearancePx:
|
|
556
|
-
startX:
|
|
555
|
+
ghostClearancePx: s,
|
|
556
|
+
startX: i,
|
|
557
557
|
endX: o,
|
|
558
558
|
pulseMs: l,
|
|
559
559
|
staggerMs: m
|
|
560
560
|
} = e;
|
|
561
561
|
if (!t) return null;
|
|
562
|
-
const
|
|
562
|
+
const d = n === "grow", u = d ? i + a : i + s, h = d ? o - s : o - a, c = Math.max(0, h - u);
|
|
563
563
|
return /* @__PURE__ */ r(
|
|
564
564
|
"div",
|
|
565
565
|
{
|
|
@@ -577,7 +577,7 @@ function Oe(e) {
|
|
|
577
577
|
height: "100%",
|
|
578
578
|
alignItems: "center",
|
|
579
579
|
left: u,
|
|
580
|
-
width:
|
|
580
|
+
width: c
|
|
581
581
|
},
|
|
582
582
|
children: (n === "grow" ? [0, 1, 2, 3, 4] : [4, 3, 2, 1, 0]).map((w, k) => /* @__PURE__ */ r(
|
|
583
583
|
G.span,
|
|
@@ -626,20 +626,20 @@ function Ce(e) {
|
|
|
626
626
|
return e === "compact" ? "Compact" : e === "medium" ? "Medium" : e === "full" ? "Full" : String(e);
|
|
627
627
|
}
|
|
628
628
|
function Le(e) {
|
|
629
|
-
const { visible: t, currentTarget: n, previewTarget: a, mode:
|
|
630
|
-
return !t ||
|
|
629
|
+
const { visible: t, currentTarget: n, previewTarget: a, mode: s, showSizeTooltip: i = !0 } = e;
|
|
630
|
+
return !t || i === !1 ? null : /* @__PURE__ */ y(
|
|
631
631
|
G.div,
|
|
632
632
|
{
|
|
633
633
|
"aria-hidden": "true",
|
|
634
634
|
"data-resize-pill-tooltip": "visible",
|
|
635
|
-
"data-mode":
|
|
635
|
+
"data-mode": s,
|
|
636
636
|
className: "gloss-resize-pill-tooltip",
|
|
637
637
|
initial: { opacity: 0 },
|
|
638
638
|
animate: { opacity: 1 },
|
|
639
639
|
exit: { opacity: 0 },
|
|
640
640
|
transition: { duration: 0.18 },
|
|
641
641
|
children: [
|
|
642
|
-
|
|
642
|
+
s === "directional" && /* @__PURE__ */ y($, { children: [
|
|
643
643
|
/* @__PURE__ */ r(
|
|
644
644
|
_e,
|
|
645
645
|
{
|
|
@@ -656,7 +656,7 @@ function Le(e) {
|
|
|
656
656
|
}
|
|
657
657
|
)
|
|
658
658
|
] }),
|
|
659
|
-
|
|
659
|
+
s === "sized" && /* @__PURE__ */ y($, { children: [
|
|
660
660
|
/* @__PURE__ */ r("span", { className: "gloss-resize-pill-tooltip__label", children: Ce(n) }),
|
|
661
661
|
/* @__PURE__ */ r("span", { className: "gloss-resize-pill-tooltip__arrow", children: "→" }),
|
|
662
662
|
/* @__PURE__ */ r("span", { className: "gloss-resize-pill-tooltip__label", children: Ce(a) })
|
|
@@ -719,18 +719,18 @@ function xt(e) {
|
|
|
719
719
|
target: t,
|
|
720
720
|
currentTarget: n,
|
|
721
721
|
mode: a,
|
|
722
|
-
isActive:
|
|
723
|
-
isHovered:
|
|
722
|
+
isActive: s,
|
|
723
|
+
isHovered: i,
|
|
724
724
|
onCommit: o,
|
|
725
725
|
onEnter: l,
|
|
726
726
|
onLeave: m,
|
|
727
|
-
buttonHeight:
|
|
727
|
+
buttonHeight: d,
|
|
728
728
|
buttonWidth: u
|
|
729
729
|
} = e;
|
|
730
730
|
let h = null;
|
|
731
731
|
if (a === "directional") {
|
|
732
|
-
const
|
|
733
|
-
h = /* @__PURE__ */ r(St, { direction:
|
|
732
|
+
const c = typeof t == "number" && typeof n == "number" && t < n ? "left" : "right";
|
|
733
|
+
h = /* @__PURE__ */ r(St, { direction: c });
|
|
734
734
|
} else
|
|
735
735
|
h = /* @__PURE__ */ r(Dt, { target: t });
|
|
736
736
|
return /* @__PURE__ */ y(
|
|
@@ -739,14 +739,14 @@ function xt(e) {
|
|
|
739
739
|
type: "button",
|
|
740
740
|
className: [
|
|
741
741
|
"gloss-resize-pill__button",
|
|
742
|
-
|
|
743
|
-
|
|
742
|
+
i ? "gloss-resize-pill__button--check-hover" : "",
|
|
743
|
+
s ? "gloss-resize-pill__button--active" : ""
|
|
744
744
|
].filter(Boolean).join(" "),
|
|
745
745
|
"data-target": String(t),
|
|
746
746
|
"data-mode": a,
|
|
747
|
-
"data-active":
|
|
748
|
-
"data-button-hover-state":
|
|
749
|
-
style: { width: u, height:
|
|
747
|
+
"data-active": s ? "true" : "false",
|
|
748
|
+
"data-button-hover-state": i ? "check" : "chevron",
|
|
749
|
+
style: { width: u, height: d },
|
|
750
750
|
onClick: () => o(t),
|
|
751
751
|
onPointerEnter: () => l?.(t),
|
|
752
752
|
onPointerLeave: () => m?.(),
|
|
@@ -763,9 +763,9 @@ const Rt = et(
|
|
|
763
763
|
const a = {
|
|
764
764
|
...Ae,
|
|
765
765
|
...t.physics
|
|
766
|
-
},
|
|
766
|
+
}, s = t.pillVisible && !t.forceIdle && t.resizePillEnabled !== !1, i = t.availableTargets, o = t.orientation ?? "vertical", l = t.buttonHover !== null && t.previewTarget !== void 0 && t.previewTarget !== null && t.previewTarget !== t.currentTarget && !t.forceIdle && t.resizePillEnabled !== !1, m = l && t.previewTarget != null ? t.resolveTargetWidth(t.previewTarget) : t.hostWidth, d = t.chainStartX ?? 0, u = t.chainEndX ?? t.hostWidth, h = t.chainDirection ?? "grow";
|
|
767
767
|
return /* @__PURE__ */ y(rt, { children: [
|
|
768
|
-
|
|
768
|
+
s && /* @__PURE__ */ r(
|
|
769
769
|
G.div,
|
|
770
770
|
{
|
|
771
771
|
ref: n,
|
|
@@ -791,16 +791,16 @@ const Rt = et(
|
|
|
791
791
|
transition: { duration: a.pillRevealMs / 1e3 },
|
|
792
792
|
onPointerEnter: t.onPillEnter,
|
|
793
793
|
onPointerLeave: t.onPillLeave,
|
|
794
|
-
children:
|
|
794
|
+
children: i.map((c) => /* @__PURE__ */ r(
|
|
795
795
|
xt,
|
|
796
796
|
{
|
|
797
|
-
target:
|
|
797
|
+
target: c,
|
|
798
798
|
currentTarget: t.currentTarget,
|
|
799
799
|
mode: t.mode,
|
|
800
|
-
isActive:
|
|
800
|
+
isActive: c === t.currentTarget,
|
|
801
801
|
isHovered: (
|
|
802
802
|
// Hover-state mapping for chevron→✓ morph CSS.
|
|
803
|
-
t.buttonHover !== null && (typeof
|
|
803
|
+
t.buttonHover !== null && (typeof c == "number" && typeof t.currentTarget == "number" && (t.buttonHover === "grow" && c > t.currentTarget || t.buttonHover === "shrink" && c < t.currentTarget) || t.buttonHover === c)
|
|
804
804
|
),
|
|
805
805
|
onCommit: t.onCommit,
|
|
806
806
|
onEnter: t.onButtonEnter,
|
|
@@ -808,12 +808,12 @@ const Rt = et(
|
|
|
808
808
|
buttonHeight: a.pillButtonHeight,
|
|
809
809
|
buttonWidth: a.pillButtonWidth
|
|
810
810
|
},
|
|
811
|
-
String(
|
|
811
|
+
String(c)
|
|
812
812
|
))
|
|
813
813
|
},
|
|
814
814
|
"pill"
|
|
815
815
|
),
|
|
816
|
-
|
|
816
|
+
s && l && t.previewTarget != null && /* @__PURE__ */ r(
|
|
817
817
|
Fe,
|
|
818
818
|
{
|
|
819
819
|
visible: !0,
|
|
@@ -826,21 +826,21 @@ const Rt = et(
|
|
|
826
826
|
},
|
|
827
827
|
"ghost"
|
|
828
828
|
),
|
|
829
|
-
|
|
829
|
+
s && l && /* @__PURE__ */ r(
|
|
830
830
|
Oe,
|
|
831
831
|
{
|
|
832
832
|
visible: !0,
|
|
833
833
|
direction: h,
|
|
834
834
|
pillClearancePx: a.pillClearancePx,
|
|
835
835
|
ghostClearancePx: a.ghostClearancePx,
|
|
836
|
-
startX:
|
|
836
|
+
startX: d,
|
|
837
837
|
endX: u,
|
|
838
838
|
pulseMs: a.chainPulseMs,
|
|
839
839
|
staggerMs: a.chainStaggerMs
|
|
840
840
|
},
|
|
841
841
|
"chain"
|
|
842
842
|
),
|
|
843
|
-
|
|
843
|
+
s && l && t.showSizeTooltip && t.previewTarget != null && /* @__PURE__ */ r(
|
|
844
844
|
Le,
|
|
845
845
|
{
|
|
846
846
|
visible: !0,
|
|
@@ -859,10 +859,10 @@ function Nn(e) {
|
|
|
859
859
|
const t = {
|
|
860
860
|
...Ae,
|
|
861
861
|
...e.physics
|
|
862
|
-
}, [n, a] = I("idle"), [
|
|
862
|
+
}, [n, a] = I("idle"), [s, i] = I(e.currentTarget), [o, l] = I(null), m = P(!1), d = P(null), u = P(null), h = P(e.currentTarget);
|
|
863
863
|
h.current = e.currentTarget;
|
|
864
|
-
const
|
|
865
|
-
|
|
864
|
+
const c = P(e.onCommit);
|
|
865
|
+
c.current = e.onCommit;
|
|
866
866
|
const p = P(e.forceIdle);
|
|
867
867
|
p.current = e.forceIdle;
|
|
868
868
|
const w = P(e.onPhaseChange);
|
|
@@ -871,20 +871,20 @@ function Nn(e) {
|
|
|
871
871
|
}, [n]), A(() => {
|
|
872
872
|
e.forceIdle && (u.current && (clearTimeout(u.current), u.current = null), a("idle"), l(null));
|
|
873
873
|
}, [e.forceIdle]), A(() => () => {
|
|
874
|
-
|
|
874
|
+
d.current && clearTimeout(d.current), u.current && clearTimeout(u.current);
|
|
875
875
|
}, []);
|
|
876
876
|
const k = N(() => {
|
|
877
|
-
m.current || p.current || (
|
|
877
|
+
m.current || p.current || (i(h.current), a("pill-visible"));
|
|
878
878
|
}, []), f = N(() => {
|
|
879
879
|
a("idle"), l(null);
|
|
880
880
|
}, []), b = N(
|
|
881
|
-
(
|
|
882
|
-
m.current = !0,
|
|
883
|
-
m.current = !1,
|
|
884
|
-
}, t.fadeGraceMs), l(null), a("fading"),
|
|
881
|
+
(R) => {
|
|
882
|
+
m.current = !0, d.current && clearTimeout(d.current), d.current = setTimeout(() => {
|
|
883
|
+
m.current = !1, d.current = null;
|
|
884
|
+
}, t.fadeGraceMs), l(null), a("fading"), c.current(R);
|
|
885
885
|
},
|
|
886
886
|
[t.fadeGraceMs]
|
|
887
|
-
),
|
|
887
|
+
), x = N(() => {
|
|
888
888
|
u.current && (clearTimeout(u.current), u.current = null), k();
|
|
889
889
|
}, [k]), C = N(() => {
|
|
890
890
|
u.current && clearTimeout(u.current), u.current = setTimeout(() => {
|
|
@@ -896,15 +896,15 @@ function Nn(e) {
|
|
|
896
896
|
u.current && clearTimeout(u.current), u.current = setTimeout(() => {
|
|
897
897
|
f(), u.current = null;
|
|
898
898
|
}, t.hoverHideGraceMs);
|
|
899
|
-
}, [f, t.hoverHideGraceMs]), g = N((
|
|
899
|
+
}, [f, t.hoverHideGraceMs]), g = N((R) => {
|
|
900
900
|
const E = h.current;
|
|
901
901
|
let L;
|
|
902
|
-
|
|
902
|
+
R === "compact" || R === "medium" || R === "full" ? L = R : typeof E == "number" && typeof R == "number" ? L = R > E ? "grow" : "shrink" : L = "grow", l(L), a("pre-commit");
|
|
903
903
|
}, []), v = N(() => {
|
|
904
|
-
l(null), a((
|
|
904
|
+
l(null), a((R) => R === "pre-commit" ? "pill-visible" : R);
|
|
905
905
|
}, []), _ = N(
|
|
906
|
-
(
|
|
907
|
-
b(
|
|
906
|
+
(R) => {
|
|
907
|
+
b(R);
|
|
908
908
|
},
|
|
909
909
|
[b]
|
|
910
910
|
);
|
|
@@ -912,11 +912,11 @@ function Nn(e) {
|
|
|
912
912
|
return o !== null && (o === "compact" || o === "medium" || o === "full" ? (D = o, D === e.currentTarget && (D = null)) : o === "grow" && typeof e.currentTarget == "number" ? D = e.currentTarget + 1 : o === "shrink" && typeof e.currentTarget == "number" && (D = e.currentTarget - 1)), {
|
|
913
913
|
phase: n,
|
|
914
914
|
pillVisible: n === "pill-visible" || n === "pre-commit",
|
|
915
|
-
pillSpan:
|
|
915
|
+
pillSpan: s,
|
|
916
916
|
buttonHover: o,
|
|
917
917
|
previewTarget: D,
|
|
918
918
|
handlers: {
|
|
919
|
-
onTriggerEnter:
|
|
919
|
+
onTriggerEnter: x,
|
|
920
920
|
onTriggerLeave: C,
|
|
921
921
|
onPillEnter: S,
|
|
922
922
|
onPillLeave: T,
|
|
@@ -928,11 +928,11 @@ function Nn(e) {
|
|
|
928
928
|
};
|
|
929
929
|
}
|
|
930
930
|
function Sn(e) {
|
|
931
|
-
const { cardWidthPx: t, slotCount: n, activeSlotIdx: a, pillWidthPx:
|
|
931
|
+
const { cardWidthPx: t, slotCount: n, activeSlotIdx: a, pillWidthPx: s } = e;
|
|
932
932
|
if (a == null || !Number.isFinite(t) || t <= 0 || !Number.isFinite(n) || n <= 0 || !Number.isInteger(a) || a < 0 || a >= n)
|
|
933
933
|
return;
|
|
934
|
-
const
|
|
935
|
-
return
|
|
934
|
+
const i = (a + 0.5) * (t / n);
|
|
935
|
+
return s != null && Number.isFinite(s) && s > 0 ? i - s / 2 : i;
|
|
936
936
|
}
|
|
937
937
|
const kn = [
|
|
938
938
|
// 1. Standard: Total Revenue
|
|
@@ -1207,19 +1207,19 @@ function $e({
|
|
|
1207
1207
|
onDismiss: t,
|
|
1208
1208
|
anchorRef: n,
|
|
1209
1209
|
pages: a,
|
|
1210
|
-
activePageId:
|
|
1211
|
-
onPageChange:
|
|
1210
|
+
activePageId: s,
|
|
1211
|
+
onPageChange: i,
|
|
1212
1212
|
onCreatePage: o,
|
|
1213
1213
|
onManagePages: l
|
|
1214
1214
|
}) {
|
|
1215
1215
|
const m = N(
|
|
1216
|
-
(
|
|
1217
|
-
|
|
1216
|
+
(c) => {
|
|
1217
|
+
i(c), t();
|
|
1218
1218
|
},
|
|
1219
|
-
[
|
|
1220
|
-
),
|
|
1221
|
-
(
|
|
1222
|
-
(p.key === "Enter" || p.key === " ") && (p.preventDefault(), m(
|
|
1219
|
+
[i, t]
|
|
1220
|
+
), d = N(
|
|
1221
|
+
(c, p) => {
|
|
1222
|
+
(p.key === "Enter" || p.key === " ") && (p.preventDefault(), m(c));
|
|
1223
1223
|
},
|
|
1224
1224
|
[m]
|
|
1225
1225
|
), u = N(() => {
|
|
@@ -1241,8 +1241,8 @@ function $e({
|
|
|
1241
1241
|
anchorRef: n,
|
|
1242
1242
|
className: "gloss-page-dropdown",
|
|
1243
1243
|
children: [
|
|
1244
|
-
/* @__PURE__ */ r("ul", { role: "menu", className: "gloss-page-dropdown__list", children: a.map((
|
|
1245
|
-
const p =
|
|
1244
|
+
/* @__PURE__ */ r("ul", { role: "menu", className: "gloss-page-dropdown__list", children: a.map((c) => {
|
|
1245
|
+
const p = c.id === s;
|
|
1246
1246
|
return /* @__PURE__ */ y(
|
|
1247
1247
|
"li",
|
|
1248
1248
|
{
|
|
@@ -1251,8 +1251,8 @@ function $e({
|
|
|
1251
1251
|
"aria-current": p ? "page" : void 0,
|
|
1252
1252
|
tabIndex: 0,
|
|
1253
1253
|
className: `gloss-page-dropdown__item${p ? " gloss-page-dropdown__item--active" : ""}`,
|
|
1254
|
-
onClick: () => m(
|
|
1255
|
-
onKeyDown: (w) => c
|
|
1254
|
+
onClick: () => m(c.id),
|
|
1255
|
+
onKeyDown: (w) => d(c.id, w),
|
|
1256
1256
|
children: [
|
|
1257
1257
|
/* @__PURE__ */ r(
|
|
1258
1258
|
"span",
|
|
@@ -1263,15 +1263,15 @@ function $e({
|
|
|
1263
1263
|
/* @__PURE__ */ r(
|
|
1264
1264
|
"span",
|
|
1265
1265
|
{
|
|
1266
|
-
className: `gloss-page-dropdown__name${
|
|
1267
|
-
children:
|
|
1266
|
+
className: `gloss-page-dropdown__name${c.named ? "" : " gloss-page-dropdown__name--unnamed"}`,
|
|
1267
|
+
children: c.name
|
|
1268
1268
|
}
|
|
1269
1269
|
),
|
|
1270
|
-
|
|
1271
|
-
/* @__PURE__ */ r("span", { className: "gloss-page-dropdown__count", children:
|
|
1270
|
+
c.icon && /* @__PURE__ */ r("span", { className: "gloss-page-dropdown__icon", children: c.icon }),
|
|
1271
|
+
/* @__PURE__ */ r("span", { className: "gloss-page-dropdown__count", children: c.cardCount })
|
|
1272
1272
|
]
|
|
1273
1273
|
},
|
|
1274
|
-
|
|
1274
|
+
c.id
|
|
1275
1275
|
);
|
|
1276
1276
|
}) }),
|
|
1277
1277
|
/* @__PURE__ */ r("hr", { className: "gloss-page-dropdown__separator" }),
|
|
@@ -1303,17 +1303,17 @@ const Ft = function({
|
|
|
1303
1303
|
currentIndex: t,
|
|
1304
1304
|
total: n,
|
|
1305
1305
|
pages: a,
|
|
1306
|
-
onPageChange:
|
|
1307
|
-
onCreatePage:
|
|
1306
|
+
onPageChange: s,
|
|
1307
|
+
onCreatePage: i,
|
|
1308
1308
|
onManagePages: o,
|
|
1309
1309
|
maskRadius: l = "var(--gloss-radius-md)",
|
|
1310
1310
|
displayMode: m = "count",
|
|
1311
|
-
activePage:
|
|
1311
|
+
activePage: d
|
|
1312
1312
|
}) {
|
|
1313
|
-
const u = P(null), [h,
|
|
1314
|
-
|
|
1313
|
+
const u = P(null), [h, c] = I(!1), p = N(() => {
|
|
1314
|
+
c((b) => !b);
|
|
1315
1315
|
}, []), w = N(() => {
|
|
1316
|
-
|
|
1316
|
+
c(!1);
|
|
1317
1317
|
}, []), k = a[t]?.id ?? "";
|
|
1318
1318
|
return /* @__PURE__ */ y(
|
|
1319
1319
|
"div",
|
|
@@ -1336,10 +1336,10 @@ const Ft = function({
|
|
|
1336
1336
|
className: `gloss-page-chip__trigger${m === "name" ? " gloss-page-chip__trigger--name" : ""}`,
|
|
1337
1337
|
"aria-haspopup": "menu",
|
|
1338
1338
|
"aria-expanded": h,
|
|
1339
|
-
"aria-label": m === "name" ? `${
|
|
1339
|
+
"aria-label": m === "name" ? `${d ?? "Page"}. Click to switch pages.` : `Page ${t + 1} of ${n}. Click to switch pages.`,
|
|
1340
1340
|
onClick: p,
|
|
1341
1341
|
children: m === "name" ? /* @__PURE__ */ y($, { children: [
|
|
1342
|
-
/* @__PURE__ */ r("span", { className: "gloss-page-chip__trigger-name", children:
|
|
1342
|
+
/* @__PURE__ */ r("span", { className: "gloss-page-chip__trigger-name", children: d ?? "" }),
|
|
1343
1343
|
/* @__PURE__ */ r("span", { className: "gloss-page-chip__trigger-chevron", "aria-hidden": "true", children: "▾" })
|
|
1344
1344
|
] }) : /* @__PURE__ */ y($, { children: [
|
|
1345
1345
|
t + 1,
|
|
@@ -1356,8 +1356,8 @@ const Ft = function({
|
|
|
1356
1356
|
anchorRef: u,
|
|
1357
1357
|
pages: a,
|
|
1358
1358
|
activePageId: k,
|
|
1359
|
-
onPageChange:
|
|
1360
|
-
onCreatePage:
|
|
1359
|
+
onPageChange: s,
|
|
1360
|
+
onCreatePage: i,
|
|
1361
1361
|
onManagePages: o
|
|
1362
1362
|
}
|
|
1363
1363
|
)
|
|
@@ -2031,7 +2031,7 @@ function Wt() {
|
|
|
2031
2031
|
const [e, t] = I(() => typeof window > "u" || typeof window.matchMedia != "function" ? !1 : window.matchMedia("(prefers-reduced-motion: reduce)").matches);
|
|
2032
2032
|
return A(() => {
|
|
2033
2033
|
if (typeof window > "u" || typeof window.matchMedia != "function") return;
|
|
2034
|
-
const n = window.matchMedia("(prefers-reduced-motion: reduce)"), a = (
|
|
2034
|
+
const n = window.matchMedia("(prefers-reduced-motion: reduce)"), a = (s) => t(s.matches);
|
|
2035
2035
|
return typeof n.addEventListener == "function" ? (n.addEventListener("change", a), () => n.removeEventListener("change", a)) : (n.addListener?.(a), () => {
|
|
2036
2036
|
n.removeListener?.(a);
|
|
2037
2037
|
});
|
|
@@ -2042,37 +2042,37 @@ const Vt = ({
|
|
|
2042
2042
|
onDimensionSelect: t,
|
|
2043
2043
|
activeDimension: n,
|
|
2044
2044
|
ariaCardTypeLabel: a,
|
|
2045
|
-
className:
|
|
2045
|
+
className: s
|
|
2046
2046
|
}) => {
|
|
2047
|
-
const
|
|
2047
|
+
const i = P(null), o = P([]), l = Wt(), m = re(() => Array.from(e), [e]);
|
|
2048
2048
|
if (m.length === 0) return null;
|
|
2049
|
-
const
|
|
2049
|
+
const d = a ? `Configure ${a}: choose a dimension` : void 0, u = l ? "10ms" : "200ms", h = (c, p) => {
|
|
2050
2050
|
const w = m.length - 1, k = (f) => {
|
|
2051
2051
|
const b = o.current[f];
|
|
2052
2052
|
b && b.focus();
|
|
2053
2053
|
};
|
|
2054
|
-
switch (
|
|
2054
|
+
switch (c.key) {
|
|
2055
2055
|
case "ArrowRight":
|
|
2056
2056
|
case "ArrowDown": {
|
|
2057
|
-
|
|
2057
|
+
c.preventDefault(), k(p === w ? 0 : p + 1);
|
|
2058
2058
|
break;
|
|
2059
2059
|
}
|
|
2060
2060
|
case "ArrowLeft":
|
|
2061
2061
|
case "ArrowUp": {
|
|
2062
|
-
|
|
2062
|
+
c.preventDefault(), k(p === 0 ? w : p - 1);
|
|
2063
2063
|
break;
|
|
2064
2064
|
}
|
|
2065
2065
|
case "Home": {
|
|
2066
|
-
|
|
2066
|
+
c.preventDefault(), k(0);
|
|
2067
2067
|
break;
|
|
2068
2068
|
}
|
|
2069
2069
|
case "End": {
|
|
2070
|
-
|
|
2070
|
+
c.preventDefault(), k(w);
|
|
2071
2071
|
break;
|
|
2072
2072
|
}
|
|
2073
2073
|
case "Enter":
|
|
2074
2074
|
case " ": {
|
|
2075
|
-
|
|
2075
|
+
c.preventDefault(), t(m[p]);
|
|
2076
2076
|
break;
|
|
2077
2077
|
}
|
|
2078
2078
|
}
|
|
@@ -2080,18 +2080,18 @@ const Vt = ({
|
|
|
2080
2080
|
return /* @__PURE__ */ r(
|
|
2081
2081
|
"div",
|
|
2082
2082
|
{
|
|
2083
|
-
ref:
|
|
2083
|
+
ref: i,
|
|
2084
2084
|
role: "group",
|
|
2085
|
-
"aria-label":
|
|
2086
|
-
className: Se("gloss-reconfig-backside-buttons",
|
|
2085
|
+
"aria-label": d,
|
|
2086
|
+
className: Se("gloss-reconfig-backside-buttons", s),
|
|
2087
2087
|
style: {
|
|
2088
2088
|
// Expose the reduced-motion-resolved duration as a CSS custom prop
|
|
2089
2089
|
// so the SCSS transition rule can consume it without a nested media
|
|
2090
2090
|
// query in the JS. Also surfaces the value for the unit test.
|
|
2091
2091
|
"--gloss-reconfig-backside-buttons-transition-duration": u
|
|
2092
2092
|
},
|
|
2093
|
-
children: m.map((
|
|
2094
|
-
const w = Ht[
|
|
2093
|
+
children: m.map((c, p) => {
|
|
2094
|
+
const w = Ht[c], k = n === c;
|
|
2095
2095
|
return /* @__PURE__ */ y(
|
|
2096
2096
|
"button",
|
|
2097
2097
|
{
|
|
@@ -2099,13 +2099,13 @@ const Vt = ({
|
|
|
2099
2099
|
o.current[p] = f;
|
|
2100
2100
|
},
|
|
2101
2101
|
type: "button",
|
|
2102
|
-
"data-dimension":
|
|
2102
|
+
"data-dimension": c,
|
|
2103
2103
|
className: Se(
|
|
2104
2104
|
"gloss-reconfig-backside-buttons__button",
|
|
2105
2105
|
k && "gloss-reconfig-backside-buttons__button--active"
|
|
2106
2106
|
),
|
|
2107
2107
|
"aria-current": k ? "true" : void 0,
|
|
2108
|
-
onClick: () => t(
|
|
2108
|
+
onClick: () => t(c),
|
|
2109
2109
|
onKeyDown: (f) => h(f, p),
|
|
2110
2110
|
children: [
|
|
2111
2111
|
/* @__PURE__ */ r(
|
|
@@ -2115,10 +2115,10 @@ const Vt = ({
|
|
|
2115
2115
|
"aria-hidden": "true"
|
|
2116
2116
|
}
|
|
2117
2117
|
),
|
|
2118
|
-
/* @__PURE__ */ r("span", { className: "gloss-reconfig-backside-buttons__button-label", children: Gt[
|
|
2118
|
+
/* @__PURE__ */ r("span", { className: "gloss-reconfig-backside-buttons__button-label", children: Gt[c] })
|
|
2119
2119
|
]
|
|
2120
2120
|
},
|
|
2121
|
-
|
|
2121
|
+
c
|
|
2122
2122
|
);
|
|
2123
2123
|
})
|
|
2124
2124
|
}
|
|
@@ -2270,8 +2270,8 @@ function pe(e) {
|
|
|
2270
2270
|
function jt(e) {
|
|
2271
2271
|
let t = 0;
|
|
2272
2272
|
for (const a of e) {
|
|
2273
|
-
const
|
|
2274
|
-
|
|
2273
|
+
const s = pe(a.size), i = a.gridPosition.col + s.cols - 1;
|
|
2274
|
+
i > t && (t = i);
|
|
2275
2275
|
}
|
|
2276
2276
|
return `repeat(${t > 0 ? t : Math.max(e.length, 1)}, minmax(0, 1fr))`;
|
|
2277
2277
|
}
|
|
@@ -2282,19 +2282,19 @@ const Ut = function(t) {
|
|
|
2282
2282
|
{
|
|
2283
2283
|
className: "gloss-metric-group gloss-metric-group--discrete",
|
|
2284
2284
|
style: { display: "contents" },
|
|
2285
|
-
children: t.cards.map((
|
|
2286
|
-
const
|
|
2285
|
+
children: t.cards.map((s) => {
|
|
2286
|
+
const i = pe(s.size);
|
|
2287
2287
|
return /* @__PURE__ */ r(
|
|
2288
2288
|
"div",
|
|
2289
2289
|
{
|
|
2290
2290
|
className: "gloss-metric-group__slot",
|
|
2291
2291
|
style: {
|
|
2292
|
-
gridColumn: `${
|
|
2293
|
-
gridRow: `${
|
|
2292
|
+
gridColumn: `${s.gridPosition.col} / span ${i.cols}`,
|
|
2293
|
+
gridRow: `${s.gridPosition.row} / span ${i.rows}`
|
|
2294
2294
|
},
|
|
2295
|
-
children:
|
|
2295
|
+
children: s.children
|
|
2296
2296
|
},
|
|
2297
|
-
|
|
2297
|
+
s.key
|
|
2298
2298
|
);
|
|
2299
2299
|
})
|
|
2300
2300
|
}
|
|
@@ -2346,19 +2346,19 @@ const Ut = function(t) {
|
|
|
2346
2346
|
gap: "var(--gloss-spacing-2, 8px)",
|
|
2347
2347
|
gridTemplateColumns: jt(n)
|
|
2348
2348
|
},
|
|
2349
|
-
children: n.map((
|
|
2350
|
-
const
|
|
2349
|
+
children: n.map((s) => {
|
|
2350
|
+
const i = pe(s.size);
|
|
2351
2351
|
return /* @__PURE__ */ r(
|
|
2352
2352
|
"div",
|
|
2353
2353
|
{
|
|
2354
2354
|
className: "gloss-metric-group__slot--composite",
|
|
2355
2355
|
style: {
|
|
2356
|
-
gridColumn: `${
|
|
2357
|
-
gridRow: `${
|
|
2356
|
+
gridColumn: `${s.gridPosition.col} / span ${i.cols}`,
|
|
2357
|
+
gridRow: `${s.gridPosition.row} / span ${i.rows}`
|
|
2358
2358
|
},
|
|
2359
|
-
children:
|
|
2359
|
+
children: s.children
|
|
2360
2360
|
},
|
|
2361
|
-
|
|
2361
|
+
s.key
|
|
2362
2362
|
);
|
|
2363
2363
|
})
|
|
2364
2364
|
}
|
|
@@ -2394,19 +2394,19 @@ function qt() {
|
|
|
2394
2394
|
}
|
|
2395
2395
|
}, [e]);
|
|
2396
2396
|
const n = N(
|
|
2397
|
-
(
|
|
2398
|
-
t((l) => ({ ...l, [
|
|
2397
|
+
(i, o) => {
|
|
2398
|
+
t((l) => ({ ...l, [i]: o }));
|
|
2399
2399
|
},
|
|
2400
2400
|
[]
|
|
2401
2401
|
), a = N(
|
|
2402
|
-
(
|
|
2403
|
-
t((o) => ({ ...o, [
|
|
2402
|
+
(i) => {
|
|
2403
|
+
t((o) => ({ ...o, [i]: V[i] }));
|
|
2404
2404
|
},
|
|
2405
2405
|
[]
|
|
2406
|
-
),
|
|
2406
|
+
), s = N(() => {
|
|
2407
2407
|
t({ ...V });
|
|
2408
2408
|
}, []);
|
|
2409
|
-
return { values: e, setValue: n, resetRow: a, resetAll:
|
|
2409
|
+
return { values: e, setValue: n, resetRow: a, resetAll: s };
|
|
2410
2410
|
}
|
|
2411
2411
|
const Qt = [
|
|
2412
2412
|
{ key: "stiffness", label: "Spring stiffness", unit: "", min: 100, max: 1e3, step: 10 },
|
|
@@ -2442,8 +2442,8 @@ function Jt() {
|
|
|
2442
2442
|
}
|
|
2443
2443
|
);
|
|
2444
2444
|
}
|
|
2445
|
-
function ea({ spec: e, value: t, onChange: n, onReset: a, flashing:
|
|
2446
|
-
const
|
|
2445
|
+
function ea({ spec: e, value: t, onChange: n, onReset: a, flashing: s }) {
|
|
2446
|
+
const i = N(
|
|
2447
2447
|
(o) => {
|
|
2448
2448
|
(o.key === "r" || o.key === "R") && (o.preventDefault(), a());
|
|
2449
2449
|
},
|
|
@@ -2452,9 +2452,9 @@ function ea({ spec: e, value: t, onChange: n, onReset: a, flashing: i }) {
|
|
|
2452
2452
|
return /* @__PURE__ */ y(
|
|
2453
2453
|
"div",
|
|
2454
2454
|
{
|
|
2455
|
-
className: `gloss-dev-tuning-panel__row${
|
|
2455
|
+
className: `gloss-dev-tuning-panel__row${s ? " gloss-dev-tuning-panel__row--flash" : ""}`,
|
|
2456
2456
|
"data-tuning-row": e.key,
|
|
2457
|
-
onKeyDown:
|
|
2457
|
+
onKeyDown: i,
|
|
2458
2458
|
children: [
|
|
2459
2459
|
/* @__PURE__ */ r("label", { className: "gloss-dev-tuning-panel__label", htmlFor: `gloss-dtp-${e.key}`, children: e.label }),
|
|
2460
2460
|
/* @__PURE__ */ y("span", { className: "gloss-dev-tuning-panel__value", "aria-live": "off", children: [
|
|
@@ -2502,13 +2502,13 @@ function aa(e = {}) {
|
|
|
2502
2502
|
}
|
|
2503
2503
|
aa.displayName = "DevTuningPanel";
|
|
2504
2504
|
function na() {
|
|
2505
|
-
const e = qt(), { values: t, setValue: n, resetRow: a, resetAll:
|
|
2506
|
-
l.current && clearTimeout(l.current), o(
|
|
2505
|
+
const e = qt(), { values: t, setValue: n, resetRow: a, resetAll: s } = e, [i, o] = I(null), l = P(null), m = N((c) => {
|
|
2506
|
+
l.current && clearTimeout(l.current), o(c), l.current = setTimeout(() => {
|
|
2507
2507
|
o(null), l.current = null;
|
|
2508
2508
|
}, 200);
|
|
2509
|
-
}, []),
|
|
2510
|
-
(
|
|
2511
|
-
n(
|
|
2509
|
+
}, []), d = N(
|
|
2510
|
+
(c, p) => {
|
|
2511
|
+
n(c, p), c === "snapInPx" && p > t.snapOutPx && (n("snapOutPx", p), m("snapOutPx"));
|
|
2512
2512
|
},
|
|
2513
2513
|
[n, t.snapOutPx, m]
|
|
2514
2514
|
), u = re(() => Qt, []), h = st();
|
|
@@ -2528,30 +2528,30 @@ function na() {
|
|
|
2528
2528
|
"div",
|
|
2529
2529
|
{
|
|
2530
2530
|
className: "gloss-dev-tuning-panel__header",
|
|
2531
|
-
onPointerDown: (
|
|
2531
|
+
onPointerDown: (c) => h.start(c),
|
|
2532
2532
|
children: [
|
|
2533
2533
|
/* @__PURE__ */ r("span", { className: "gloss-dev-tuning-panel__title", children: "Resize Tuning — dev only" }),
|
|
2534
2534
|
/* @__PURE__ */ r("span", { className: "gloss-dev-tuning-panel__hint", children: "?devtune=1" })
|
|
2535
2535
|
]
|
|
2536
2536
|
}
|
|
2537
2537
|
),
|
|
2538
|
-
/* @__PURE__ */ r("div", { className: "gloss-dev-tuning-panel__body", children: u.map((
|
|
2538
|
+
/* @__PURE__ */ r("div", { className: "gloss-dev-tuning-panel__body", children: u.map((c) => /* @__PURE__ */ r(
|
|
2539
2539
|
ea,
|
|
2540
2540
|
{
|
|
2541
|
-
spec:
|
|
2542
|
-
value: t[
|
|
2543
|
-
onChange: (p) => c
|
|
2544
|
-
onReset: () => a(
|
|
2545
|
-
flashing:
|
|
2541
|
+
spec: c,
|
|
2542
|
+
value: t[c.key],
|
|
2543
|
+
onChange: (p) => d(c.key, p),
|
|
2544
|
+
onReset: () => a(c.key),
|
|
2545
|
+
flashing: i === c.key
|
|
2546
2546
|
},
|
|
2547
|
-
|
|
2547
|
+
c.key
|
|
2548
2548
|
)) }),
|
|
2549
2549
|
/* @__PURE__ */ r("div", { className: "gloss-dev-tuning-panel__footer", children: /* @__PURE__ */ r(
|
|
2550
2550
|
"button",
|
|
2551
2551
|
{
|
|
2552
2552
|
type: "button",
|
|
2553
2553
|
className: "gloss-dev-tuning-panel__reset-all",
|
|
2554
|
-
onClick:
|
|
2554
|
+
onClick: s,
|
|
2555
2555
|
children: "Reset all"
|
|
2556
2556
|
}
|
|
2557
2557
|
) })
|
|
@@ -2564,19 +2564,19 @@ function tr({
|
|
|
2564
2564
|
originX: t,
|
|
2565
2565
|
originY: n,
|
|
2566
2566
|
leftEdgeX: a,
|
|
2567
|
-
rightEdgeX:
|
|
2568
|
-
minBoundaryX:
|
|
2567
|
+
rightEdgeX: s,
|
|
2568
|
+
minBoundaryX: i,
|
|
2569
2569
|
snapBoundariesX: o,
|
|
2570
2570
|
topY: l,
|
|
2571
2571
|
bottomY: m,
|
|
2572
|
-
enterMs:
|
|
2572
|
+
enterMs: d = U.envelopeEnterMs,
|
|
2573
2573
|
exitMs: u = U.envelopeExitMs,
|
|
2574
2574
|
className: h,
|
|
2575
|
-
style:
|
|
2575
|
+
style: c
|
|
2576
2576
|
}) {
|
|
2577
2577
|
if (e === "hidden") return null;
|
|
2578
|
-
const p = Math.max(0,
|
|
2579
|
-
"--gloss-resize-envelope-enter-ms": `${
|
|
2578
|
+
const p = Math.max(0, s - a), w = Math.max(0, m - l), k = {
|
|
2579
|
+
"--gloss-resize-envelope-enter-ms": `${d}ms`,
|
|
2580
2580
|
"--gloss-resize-envelope-exit-ms": `${u}ms`,
|
|
2581
2581
|
"--gloss-resize-envelope-origin-x": `${t - a}px`,
|
|
2582
2582
|
"--gloss-resize-envelope-origin-y": `${n - l}px`,
|
|
@@ -2584,7 +2584,7 @@ function tr({
|
|
|
2584
2584
|
top: l,
|
|
2585
2585
|
width: p,
|
|
2586
2586
|
height: w,
|
|
2587
|
-
...
|
|
2587
|
+
...c
|
|
2588
2588
|
};
|
|
2589
2589
|
return /* @__PURE__ */ y(
|
|
2590
2590
|
"div",
|
|
@@ -2608,7 +2608,7 @@ function tr({
|
|
|
2608
2608
|
{
|
|
2609
2609
|
className: "gloss-resize-envelope__edge gloss-resize-envelope__edge--min-boundary",
|
|
2610
2610
|
"data-edge": "min-boundary",
|
|
2611
|
-
style: { left:
|
|
2611
|
+
style: { left: i - a }
|
|
2612
2612
|
}
|
|
2613
2613
|
),
|
|
2614
2614
|
/* @__PURE__ */ r(
|
|
@@ -2619,7 +2619,7 @@ function tr({
|
|
|
2619
2619
|
style: { left: p - 1 }
|
|
2620
2620
|
}
|
|
2621
2621
|
),
|
|
2622
|
-
o.filter((f) => f >
|
|
2622
|
+
o.filter((f) => f > i && f < s).map((f) => /* @__PURE__ */ r(
|
|
2623
2623
|
"div",
|
|
2624
2624
|
{
|
|
2625
2625
|
className: "gloss-resize-envelope__snap-line",
|
|
@@ -2637,24 +2637,24 @@ function ar({
|
|
|
2637
2637
|
canAccept: t,
|
|
2638
2638
|
blocked: n = !1,
|
|
2639
2639
|
proximityOpacity: a,
|
|
2640
|
-
state:
|
|
2641
|
-
rejection:
|
|
2640
|
+
state: s,
|
|
2641
|
+
rejection: i = !1,
|
|
2642
2642
|
className: o,
|
|
2643
2643
|
children: l,
|
|
2644
2644
|
...m
|
|
2645
2645
|
}) {
|
|
2646
|
-
const
|
|
2646
|
+
const d = a != null ? { ...m.style, "--_proximity-opacity": String(a) } : m.style;
|
|
2647
2647
|
return /* @__PURE__ */ r(
|
|
2648
2648
|
"div",
|
|
2649
2649
|
{
|
|
2650
2650
|
...m,
|
|
2651
|
-
style:
|
|
2651
|
+
style: d,
|
|
2652
2652
|
"data-density": e,
|
|
2653
2653
|
"data-can-accept": t ? "true" : "false",
|
|
2654
2654
|
"data-blocked": n ? "true" : void 0,
|
|
2655
|
-
"data-rejection":
|
|
2655
|
+
"data-rejection": i ? "true" : void 0,
|
|
2656
2656
|
"data-proximity-driven": a != null ? "true" : void 0,
|
|
2657
|
-
"data-state":
|
|
2657
|
+
"data-state": s ?? void 0,
|
|
2658
2658
|
"data-testid": "gloss-drop-anchor-cell",
|
|
2659
2659
|
className: [
|
|
2660
2660
|
"gloss-drop-anchor-cell",
|
|
@@ -2666,15 +2666,15 @@ function ar({
|
|
|
2666
2666
|
);
|
|
2667
2667
|
}
|
|
2668
2668
|
function ra(e, t, n, a) {
|
|
2669
|
-
const
|
|
2670
|
-
return `M${e},${t} Q${
|
|
2669
|
+
const s = (e + n) / 2, i = Math.min(t, a) - 40;
|
|
2670
|
+
return `M${e},${t} Q${s},${i} ${n},${a}`;
|
|
2671
2671
|
}
|
|
2672
2672
|
function nr({
|
|
2673
2673
|
segments: e,
|
|
2674
2674
|
durationMs: t = U.spilloverArcDurationMs,
|
|
2675
2675
|
staggerMs: n = U.spilloverStaggerMs,
|
|
2676
2676
|
className: a,
|
|
2677
|
-
style:
|
|
2677
|
+
style: s
|
|
2678
2678
|
}) {
|
|
2679
2679
|
return e.length === 0 ? null : /* @__PURE__ */ r(
|
|
2680
2680
|
"svg",
|
|
@@ -2683,19 +2683,19 @@ function nr({
|
|
|
2683
2683
|
"data-testid": "gloss-spillover-arc",
|
|
2684
2684
|
"aria-hidden": "true",
|
|
2685
2685
|
overflow: "visible",
|
|
2686
|
-
style: { position: "absolute", inset: 0, pointerEvents: "none", ...
|
|
2687
|
-
children: e.map((
|
|
2686
|
+
style: { position: "absolute", inset: 0, pointerEvents: "none", ...s },
|
|
2687
|
+
children: e.map((i, o) => /* @__PURE__ */ r(
|
|
2688
2688
|
"path",
|
|
2689
2689
|
{
|
|
2690
|
-
"data-arc-id":
|
|
2690
|
+
"data-arc-id": i.id,
|
|
2691
2691
|
className: "gloss-spillover-arc__path",
|
|
2692
|
-
d: ra(
|
|
2692
|
+
d: ra(i.fromX, i.fromY, i.toX, i.toY),
|
|
2693
2693
|
style: {
|
|
2694
2694
|
animationDelay: `${o * n}ms`,
|
|
2695
2695
|
animationDuration: `${t}ms`
|
|
2696
2696
|
}
|
|
2697
2697
|
},
|
|
2698
|
-
|
|
2698
|
+
i.id
|
|
2699
2699
|
))
|
|
2700
2700
|
}
|
|
2701
2701
|
);
|
|
@@ -2705,16 +2705,16 @@ function rr({
|
|
|
2705
2705
|
staggerIndex: t = 0,
|
|
2706
2706
|
fadeInMs: n = U.sectionDividerFadeInMs,
|
|
2707
2707
|
fadeOutMs: a = U.sectionDividerFadeOutMs,
|
|
2708
|
-
staggerMs:
|
|
2709
|
-
variant:
|
|
2708
|
+
staggerMs: s = U.sectionDividerStaggerMs,
|
|
2709
|
+
variant: i = "dashed",
|
|
2710
2710
|
className: o,
|
|
2711
2711
|
style: l,
|
|
2712
2712
|
...m
|
|
2713
2713
|
}) {
|
|
2714
|
-
const
|
|
2714
|
+
const d = {
|
|
2715
2715
|
"--gloss-section-divider-fade-in-ms": `${n}ms`,
|
|
2716
2716
|
"--gloss-section-divider-fade-out-ms": `${a}ms`,
|
|
2717
|
-
"--gloss-section-divider-stagger-delay": `${t *
|
|
2717
|
+
"--gloss-section-divider-stagger-delay": `${t * s}ms`,
|
|
2718
2718
|
...l
|
|
2719
2719
|
};
|
|
2720
2720
|
return /* @__PURE__ */ r(
|
|
@@ -2727,10 +2727,10 @@ function rr({
|
|
|
2727
2727
|
className: [
|
|
2728
2728
|
"gloss-section-divider",
|
|
2729
2729
|
`gloss-section-divider--state-${e}`,
|
|
2730
|
-
|
|
2730
|
+
i === "seam-bleed" ? "gloss-section-divider--variant-seam-bleed" : "",
|
|
2731
2731
|
o
|
|
2732
2732
|
].filter(Boolean).join(" "),
|
|
2733
|
-
style:
|
|
2733
|
+
style: d
|
|
2734
2734
|
}
|
|
2735
2735
|
);
|
|
2736
2736
|
}
|
|
@@ -2782,8 +2782,8 @@ function He() {
|
|
|
2782
2782
|
return "full";
|
|
2783
2783
|
}
|
|
2784
2784
|
}
|
|
2785
|
-
const De = ({ visible: e, variant: t, trigger: n, children: a, className:
|
|
2786
|
-
const
|
|
2785
|
+
const De = ({ visible: e, variant: t, trigger: n, children: a, className: s }) => {
|
|
2786
|
+
const i = {
|
|
2787
2787
|
"--gloss-swing-enter-ms": `${q.enterDurationMs}ms`,
|
|
2788
2788
|
"--gloss-swing-exit-ms": `${q.exitDurationMs}ms`,
|
|
2789
2789
|
"--gloss-swing-offset": `${q.translateOffsetPx}px`,
|
|
@@ -2793,7 +2793,7 @@ const De = ({ visible: e, variant: t, trigger: n, children: a, className: i }) =
|
|
|
2793
2793
|
"gloss-swing-reveal",
|
|
2794
2794
|
`gloss-swing-reveal--${t}`,
|
|
2795
2795
|
n === "hover+focus" ? "gloss-swing-reveal--hover-focus" : "",
|
|
2796
|
-
|
|
2796
|
+
s ?? ""
|
|
2797
2797
|
].filter(Boolean).join(" ");
|
|
2798
2798
|
return /* @__PURE__ */ r(
|
|
2799
2799
|
"span",
|
|
@@ -2802,7 +2802,7 @@ const De = ({ visible: e, variant: t, trigger: n, children: a, className: i }) =
|
|
|
2802
2802
|
"data-variant": t,
|
|
2803
2803
|
"data-visible": e ? "true" : "false",
|
|
2804
2804
|
className: o,
|
|
2805
|
-
style:
|
|
2805
|
+
style: i,
|
|
2806
2806
|
children: a
|
|
2807
2807
|
}
|
|
2808
2808
|
);
|
|
@@ -2812,24 +2812,24 @@ function dr({
|
|
|
2812
2812
|
onCollapse: t,
|
|
2813
2813
|
onAdd: n,
|
|
2814
2814
|
addGlyphLabel: a,
|
|
2815
|
-
collapseGlyphLabel:
|
|
2816
|
-
className:
|
|
2815
|
+
collapseGlyphLabel: s,
|
|
2816
|
+
className: i,
|
|
2817
2817
|
style: o,
|
|
2818
2818
|
onPack: l,
|
|
2819
2819
|
ariaLabel: m
|
|
2820
2820
|
}) {
|
|
2821
|
-
const
|
|
2821
|
+
const d = a ?? "Add card to this cell", u = s ?? m ?? "Pack row — shift cards left", h = t ?? l, { affordancesVisible: c } = Qe();
|
|
2822
2822
|
return /* @__PURE__ */ y(B.Fragment, { children: [
|
|
2823
|
-
/* @__PURE__ */ r(De, { visible:
|
|
2823
|
+
/* @__PURE__ */ r(De, { visible: c, variant: "pack", trigger: "hover+focus", children: /* @__PURE__ */ r(
|
|
2824
2824
|
"button",
|
|
2825
2825
|
{
|
|
2826
2826
|
type: "button",
|
|
2827
2827
|
"data-testid": "gloss-empty-cell-add",
|
|
2828
|
-
"aria-label":
|
|
2828
|
+
"aria-label": d,
|
|
2829
2829
|
className: [
|
|
2830
2830
|
"gloss-empty-cell-pack-affordance",
|
|
2831
2831
|
"gloss-empty-cell-pack-affordance--add",
|
|
2832
|
-
|
|
2832
|
+
i
|
|
2833
2833
|
].filter(Boolean).join(" "),
|
|
2834
2834
|
style: o,
|
|
2835
2835
|
onClick: (p) => {
|
|
@@ -2838,13 +2838,13 @@ function dr({
|
|
|
2838
2838
|
children: /* @__PURE__ */ r("span", { "aria-hidden": "true", className: "gloss-empty-cell-pack-affordance__glyph", children: "+" })
|
|
2839
2839
|
}
|
|
2840
2840
|
) }),
|
|
2841
|
-
/* @__PURE__ */ r(De, { visible: e &&
|
|
2841
|
+
/* @__PURE__ */ r(De, { visible: e && c, variant: "pack", trigger: "hover+focus", children: /* @__PURE__ */ r(
|
|
2842
2842
|
"button",
|
|
2843
2843
|
{
|
|
2844
2844
|
type: "button",
|
|
2845
2845
|
"data-testid": "gloss-empty-cell-pack",
|
|
2846
2846
|
"aria-label": u,
|
|
2847
|
-
className: ["gloss-empty-cell-pack-affordance",
|
|
2847
|
+
className: ["gloss-empty-cell-pack-affordance", i].filter(Boolean).join(" "),
|
|
2848
2848
|
style: o,
|
|
2849
2849
|
onClick: (p) => {
|
|
2850
2850
|
p.stopPropagation(), h?.();
|
|
@@ -2859,20 +2859,20 @@ function ur({
|
|
|
2859
2859
|
colSpan: t,
|
|
2860
2860
|
colWidth: n,
|
|
2861
2861
|
rowHeight: a,
|
|
2862
|
-
gap:
|
|
2863
|
-
x:
|
|
2862
|
+
gap: s,
|
|
2863
|
+
x: i,
|
|
2864
2864
|
y: o,
|
|
2865
2865
|
children: l,
|
|
2866
2866
|
className: m
|
|
2867
2867
|
}) {
|
|
2868
|
-
const
|
|
2868
|
+
const d = t * n + (t - 1) * s, u = B.useRef(null);
|
|
2869
2869
|
return de("drag-ghost", () => {
|
|
2870
2870
|
if (process.env.NODE_ENV === "production")
|
|
2871
2871
|
return { values: {}, spec: null, state: "idle", t: performance.now() };
|
|
2872
2872
|
const h = u.current?.getBoundingClientRect() ?? null;
|
|
2873
2873
|
return {
|
|
2874
2874
|
values: {
|
|
2875
|
-
x:
|
|
2875
|
+
x: i.get(),
|
|
2876
2876
|
y: o.get(),
|
|
2877
2877
|
bounds_x: h?.x ?? 0,
|
|
2878
2878
|
bounds_y: h?.y ?? 0,
|
|
@@ -2893,24 +2893,24 @@ function ur({
|
|
|
2893
2893
|
if (process.env.NODE_ENV === "production")
|
|
2894
2894
|
return { values: {}, spec: null, state: "idle", t: performance.now() };
|
|
2895
2895
|
const h = u.current;
|
|
2896
|
-
let
|
|
2896
|
+
let c = 0, p = "", w = "", k = "";
|
|
2897
2897
|
if (h)
|
|
2898
2898
|
try {
|
|
2899
|
-
const
|
|
2900
|
-
|
|
2899
|
+
const x = window.getComputedStyle(h), C = x.outline || "", S = x.border || "", T = x.boxShadow || "", g = !!C && C !== "none" && !/^0px(\s+none)?(\s+rgba?\(0,\s*0,\s*0,\s*0\))?$/i.test(C), v = !!S && S !== "none" && !/^0px(\s+none)?(\s+rgba?\(0,\s*0,\s*0,\s*0\))?$/i.test(S), _ = !!T && T !== "none";
|
|
2900
|
+
c = g || v || _ ? 1 : 0, p = g ? C : "", w = v ? S : "", k = _ ? T : "";
|
|
2901
2901
|
} catch {
|
|
2902
2902
|
}
|
|
2903
2903
|
const f = h?.getBoundingClientRect() ?? null, b = h ? "drag-clone" : "subsumed-by-tracking-outline";
|
|
2904
2904
|
return {
|
|
2905
2905
|
values: {
|
|
2906
|
-
x:
|
|
2906
|
+
x: i.get(),
|
|
2907
2907
|
y: o.get(),
|
|
2908
2908
|
bounds_x: f?.x ?? 0,
|
|
2909
2909
|
bounds_y: f?.y ?? 0,
|
|
2910
2910
|
bounds_w: f?.width ?? 0,
|
|
2911
2911
|
bounds_h: f?.height ?? 0,
|
|
2912
2912
|
visible: h ? 1 : 0,
|
|
2913
|
-
outlineOnClone:
|
|
2913
|
+
outlineOnClone: c
|
|
2914
2914
|
},
|
|
2915
2915
|
spec: {
|
|
2916
2916
|
mode: b,
|
|
@@ -2938,7 +2938,7 @@ function ur({
|
|
|
2938
2938
|
`gloss-drag-ghost--tint-${e}`,
|
|
2939
2939
|
m
|
|
2940
2940
|
].filter(Boolean).join(" "),
|
|
2941
|
-
style: { x:
|
|
2941
|
+
style: { x: i, y: o, width: d, height: a },
|
|
2942
2942
|
children: l
|
|
2943
2943
|
}
|
|
2944
2944
|
);
|
|
@@ -2949,14 +2949,14 @@ function We({
|
|
|
2949
2949
|
cell: t,
|
|
2950
2950
|
colSpan: n,
|
|
2951
2951
|
colWidth: a,
|
|
2952
|
-
gap:
|
|
2953
|
-
rowHeight:
|
|
2952
|
+
gap: s,
|
|
2953
|
+
rowHeight: i,
|
|
2954
2954
|
pattern: o = "solid",
|
|
2955
2955
|
transitionMs: l = 120,
|
|
2956
2956
|
className: m,
|
|
2957
|
-
motionWidth:
|
|
2957
|
+
motionWidth: d
|
|
2958
2958
|
}) {
|
|
2959
|
-
const u = n * a + (n - 1) *
|
|
2959
|
+
const u = n * a + (n - 1) * s, c = (t.section * sa + t.col) * (a + s), p = t.row * (i + s), w = e === "resize" ? 2.5 : 2, k = o === "dashed-retreated" ? "dashed" : "solid", f = e === "drag" ? "gloss-snap-outline" : "gloss-tracking-outline", b = {
|
|
2960
2960
|
className: [
|
|
2961
2961
|
"gloss-tracking-outline",
|
|
2962
2962
|
`gloss-tracking-outline--${e}`,
|
|
@@ -2972,14 +2972,14 @@ function We({
|
|
|
2972
2972
|
"data-pattern": o,
|
|
2973
2973
|
"aria-hidden": "true"
|
|
2974
2974
|
};
|
|
2975
|
-
return
|
|
2975
|
+
return d ? /* @__PURE__ */ r(
|
|
2976
2976
|
G.div,
|
|
2977
2977
|
{
|
|
2978
2978
|
...b,
|
|
2979
2979
|
style: {
|
|
2980
|
-
transform: `translate(${
|
|
2981
|
-
width:
|
|
2982
|
-
height:
|
|
2980
|
+
transform: `translate(${c}px, ${p}px)`,
|
|
2981
|
+
width: d,
|
|
2982
|
+
height: i,
|
|
2983
2983
|
borderWidth: w,
|
|
2984
2984
|
borderStyle: k
|
|
2985
2985
|
}
|
|
@@ -2989,9 +2989,9 @@ function We({
|
|
|
2989
2989
|
{
|
|
2990
2990
|
...b,
|
|
2991
2991
|
style: {
|
|
2992
|
-
transform: `translate(${
|
|
2992
|
+
transform: `translate(${c}px, ${p}px)`,
|
|
2993
2993
|
width: u,
|
|
2994
|
-
height:
|
|
2994
|
+
height: i,
|
|
2995
2995
|
borderWidth: w,
|
|
2996
2996
|
borderStyle: k,
|
|
2997
2997
|
transition: `transform ${l}ms cubic-bezier(0.4, 0, 0.2, 1)`
|
|
@@ -3008,15 +3008,15 @@ function pr({
|
|
|
3008
3008
|
className: n,
|
|
3009
3009
|
debugMagenta: a
|
|
3010
3010
|
}) {
|
|
3011
|
-
const
|
|
3012
|
-
return
|
|
3011
|
+
const s = process.env.NODE_ENV !== "production" && (a || typeof window < "u" && window.__GLOSS_CASCADE_PREVIEW_DEBUG__ === !0), i = B.useRef(e);
|
|
3012
|
+
return i.current = e, de("cascade-preview", () => {
|
|
3013
3013
|
if (process.env.NODE_ENV === "production")
|
|
3014
3014
|
return { values: {}, spec: null, state: "idle", t: performance.now() };
|
|
3015
|
-
const o =
|
|
3016
|
-
let l = 0, m = 0,
|
|
3015
|
+
const o = i.current;
|
|
3016
|
+
let l = 0, m = 0, d = 0, u = 0;
|
|
3017
3017
|
for (const h of o) {
|
|
3018
|
-
const
|
|
3019
|
-
Math.abs(
|
|
3018
|
+
const c = h.x.get(), p = h.y.get();
|
|
3019
|
+
Math.abs(c) > Math.abs(d) && (d = c, l = c), Math.abs(p) > Math.abs(u) && (u = p, m = p);
|
|
3020
3020
|
}
|
|
3021
3021
|
return {
|
|
3022
3022
|
values: {
|
|
@@ -3049,7 +3049,7 @@ function pr({
|
|
|
3049
3049
|
y: o.y,
|
|
3050
3050
|
width: o.width,
|
|
3051
3051
|
height: o.height,
|
|
3052
|
-
...
|
|
3052
|
+
...s ? { outline: "2px solid magenta" } : {}
|
|
3053
3053
|
},
|
|
3054
3054
|
children: t(o)
|
|
3055
3055
|
},
|
|
@@ -3061,23 +3061,23 @@ const ia = ({
|
|
|
3061
3061
|
elapsed: t,
|
|
3062
3062
|
severity: n = "neutral"
|
|
3063
3063
|
}) => {
|
|
3064
|
-
const a = P(null),
|
|
3064
|
+
const a = P(null), s = P(null);
|
|
3065
3065
|
A(() => {
|
|
3066
|
-
const l = Math.min(100, Math.max(0, e.value)), m = Math.min(100, Math.max(0, t.value)),
|
|
3067
|
-
a.current && (a.current.style.width = `${l}%`),
|
|
3066
|
+
const l = Math.min(100, Math.max(0, e.value)), m = Math.min(100, Math.max(0, t.value)), d = requestAnimationFrame(() => {
|
|
3067
|
+
a.current && (a.current.style.width = `${l}%`), s.current && (s.current.style.width = `${m}%`);
|
|
3068
3068
|
});
|
|
3069
|
-
return () => cancelAnimationFrame(
|
|
3069
|
+
return () => cancelAnimationFrame(d);
|
|
3070
3070
|
}, [e.value, t.value]);
|
|
3071
|
-
const
|
|
3071
|
+
const i = e.label ?? "ACTUAL", o = t.label ?? "ELAPSED";
|
|
3072
3072
|
return /* @__PURE__ */ y(
|
|
3073
3073
|
"div",
|
|
3074
3074
|
{
|
|
3075
3075
|
className: "gloss-dual-pace-bars",
|
|
3076
3076
|
role: "img",
|
|
3077
|
-
"aria-label": `${
|
|
3077
|
+
"aria-label": `${i}: ${e.value}%, ${o}: ${t.value}%`,
|
|
3078
3078
|
children: [
|
|
3079
3079
|
/* @__PURE__ */ y("div", { className: "gloss-dual-pace-bars__row", children: [
|
|
3080
|
-
/* @__PURE__ */ r("span", { className: "gloss-dual-pace-bars__track-label", children:
|
|
3080
|
+
/* @__PURE__ */ r("span", { className: "gloss-dual-pace-bars__track-label", children: i }),
|
|
3081
3081
|
/* @__PURE__ */ r("div", { className: "gloss-dual-pace-bars__track", children: /* @__PURE__ */ r(
|
|
3082
3082
|
"div",
|
|
3083
3083
|
{
|
|
@@ -3088,7 +3088,7 @@ const ia = ({
|
|
|
3088
3088
|
"aria-valuenow": Math.min(100, Math.max(0, e.value)),
|
|
3089
3089
|
"aria-valuemin": 0,
|
|
3090
3090
|
"aria-valuemax": 100,
|
|
3091
|
-
"aria-label": `${
|
|
3091
|
+
"aria-label": `${i}: ${e.value}%`
|
|
3092
3092
|
}
|
|
3093
3093
|
) }),
|
|
3094
3094
|
/* @__PURE__ */ y("span", { className: "gloss-dual-pace-bars__track-value", children: [
|
|
@@ -3101,7 +3101,7 @@ const ia = ({
|
|
|
3101
3101
|
/* @__PURE__ */ r("div", { className: "gloss-dual-pace-bars__track", children: /* @__PURE__ */ r(
|
|
3102
3102
|
"div",
|
|
3103
3103
|
{
|
|
3104
|
-
ref:
|
|
3104
|
+
ref: s,
|
|
3105
3105
|
className: "gloss-dual-pace-bars__fill gloss-dual-pace-bars__fill--elapsed",
|
|
3106
3106
|
style: { width: "0%" },
|
|
3107
3107
|
role: "meter",
|
|
@@ -3149,11 +3149,11 @@ const ia = ({
|
|
|
3149
3149
|
}
|
|
3150
3150
|
)
|
|
3151
3151
|
] }), gr = (e) => {
|
|
3152
|
-
const [t, n] = I(!1), a = e.target?.value,
|
|
3152
|
+
const [t, n] = I(!1), a = e.target?.value, s = a !== void 0, i = e.paceGapUnit === "usd" ? "$" : "%", o = /* @__PURE__ */ r(
|
|
3153
3153
|
gt,
|
|
3154
3154
|
{
|
|
3155
3155
|
label: `Set a target for ${e.label}`,
|
|
3156
|
-
unit:
|
|
3156
|
+
unit: i,
|
|
3157
3157
|
currentValue: a,
|
|
3158
3158
|
onConfirm: (l) => {
|
|
3159
3159
|
e.onTargetChange(l), n(!1);
|
|
@@ -3175,7 +3175,7 @@ const ia = ({
|
|
|
3175
3175
|
children: /* @__PURE__ */ y("div", { className: `gloss-pace-card ${e.isStale ? "gloss-metric-data-stale" : ""}`, children: [
|
|
3176
3176
|
/* @__PURE__ */ r("div", { className: "gloss-pace-card__label", children: e.label }),
|
|
3177
3177
|
e.subtitle && /* @__PURE__ */ r("div", { className: "gloss-pace-card__subtitle", children: e.subtitle }),
|
|
3178
|
-
/* @__PURE__ */ r("div", { className: "gloss-pace-card__body", children:
|
|
3178
|
+
/* @__PURE__ */ r("div", { className: "gloss-pace-card__body", children: s ? /* @__PURE__ */ y($, { children: [
|
|
3179
3179
|
/* @__PURE__ */ r(
|
|
3180
3180
|
ia,
|
|
3181
3181
|
{
|
|
@@ -3212,23 +3212,23 @@ const ia = ({
|
|
|
3212
3212
|
),
|
|
3213
3213
|
/* @__PURE__ */ r("div", { className: "gloss-pace-tile-preview__gap-strip" })
|
|
3214
3214
|
] });
|
|
3215
|
-
function ca({ id: e, label: t, selected: n, focused: a, disabled:
|
|
3215
|
+
function ca({ id: e, label: t, selected: n, focused: a, disabled: s, badge: i, onClick: o }) {
|
|
3216
3216
|
return /* @__PURE__ */ r(
|
|
3217
3217
|
"span",
|
|
3218
3218
|
{
|
|
3219
3219
|
role: "radio",
|
|
3220
3220
|
"aria-checked": n,
|
|
3221
|
-
"aria-disabled":
|
|
3221
|
+
"aria-disabled": s || void 0,
|
|
3222
3222
|
tabIndex: a ? 0 : -1,
|
|
3223
3223
|
className: "gloss-lens-chip",
|
|
3224
3224
|
"data-selected": n || void 0,
|
|
3225
|
-
"data-disabled":
|
|
3225
|
+
"data-disabled": s || void 0,
|
|
3226
3226
|
onClick: () => {
|
|
3227
|
-
|
|
3227
|
+
s || o(e);
|
|
3228
3228
|
},
|
|
3229
3229
|
children: /* @__PURE__ */ y("span", { className: "gloss-lens-chip__inner", children: [
|
|
3230
3230
|
/* @__PURE__ */ r("span", { className: "gloss-lens-chip__label", children: t }),
|
|
3231
|
-
|
|
3231
|
+
i && /* @__PURE__ */ r("span", { className: "gloss-lens-chip__badge", children: i })
|
|
3232
3232
|
] })
|
|
3233
3233
|
}
|
|
3234
3234
|
);
|
|
@@ -3239,12 +3239,12 @@ function da({
|
|
|
3239
3239
|
onChange: n,
|
|
3240
3240
|
"aria-label": a = "Lens"
|
|
3241
3241
|
}) {
|
|
3242
|
-
const [
|
|
3242
|
+
const [s, i] = I(
|
|
3243
3243
|
() => Math.max(0, e.findIndex((l) => l.id === t))
|
|
3244
3244
|
);
|
|
3245
3245
|
return A(() => {
|
|
3246
3246
|
const l = e.findIndex((m) => m.id === t);
|
|
3247
|
-
|
|
3247
|
+
i(l >= 0 ? l : 0);
|
|
3248
3248
|
}, [t, e]), e.length === 0 ? null : /* @__PURE__ */ r(
|
|
3249
3249
|
"div",
|
|
3250
3250
|
{
|
|
@@ -3254,22 +3254,22 @@ function da({
|
|
|
3254
3254
|
switch (l.key) {
|
|
3255
3255
|
case "ArrowRight":
|
|
3256
3256
|
case "ArrowDown":
|
|
3257
|
-
l.preventDefault(),
|
|
3257
|
+
l.preventDefault(), i((m) => (m + 1) % e.length);
|
|
3258
3258
|
break;
|
|
3259
3259
|
case "ArrowLeft":
|
|
3260
3260
|
case "ArrowUp":
|
|
3261
|
-
l.preventDefault(),
|
|
3261
|
+
l.preventDefault(), i((m) => (m - 1 + e.length) % e.length);
|
|
3262
3262
|
break;
|
|
3263
3263
|
case "Home":
|
|
3264
|
-
l.preventDefault(),
|
|
3264
|
+
l.preventDefault(), i(0);
|
|
3265
3265
|
break;
|
|
3266
3266
|
case "End":
|
|
3267
|
-
l.preventDefault(),
|
|
3267
|
+
l.preventDefault(), i(e.length - 1);
|
|
3268
3268
|
break;
|
|
3269
3269
|
case "Enter":
|
|
3270
3270
|
case " ": {
|
|
3271
3271
|
l.preventDefault();
|
|
3272
|
-
const m = e[
|
|
3272
|
+
const m = e[s];
|
|
3273
3273
|
m && !m.disabled && n(m.id);
|
|
3274
3274
|
break;
|
|
3275
3275
|
}
|
|
@@ -3282,7 +3282,7 @@ function da({
|
|
|
3282
3282
|
id: l.id,
|
|
3283
3283
|
label: l.label,
|
|
3284
3284
|
selected: l.id === t,
|
|
3285
|
-
focused: m ===
|
|
3285
|
+
focused: m === s,
|
|
3286
3286
|
disabled: l.disabled,
|
|
3287
3287
|
badge: l.badge,
|
|
3288
3288
|
onClick: n
|
|
@@ -3316,15 +3316,15 @@ function K({
|
|
|
3316
3316
|
name: t,
|
|
3317
3317
|
secondary: n,
|
|
3318
3318
|
value: a,
|
|
3319
|
-
trail:
|
|
3320
|
-
variant:
|
|
3319
|
+
trail: s,
|
|
3320
|
+
variant: i = "default",
|
|
3321
3321
|
onClick: o,
|
|
3322
3322
|
className: l,
|
|
3323
3323
|
style: m
|
|
3324
3324
|
}) {
|
|
3325
|
-
const
|
|
3325
|
+
const d = [
|
|
3326
3326
|
"gloss-entity-row",
|
|
3327
|
-
`gloss-entity-row--${
|
|
3327
|
+
`gloss-entity-row--${i}`,
|
|
3328
3328
|
o ? "gloss-entity-row--clickable" : "",
|
|
3329
3329
|
l ?? ""
|
|
3330
3330
|
].filter(Boolean).join(" "), u = /* @__PURE__ */ y($, { children: [
|
|
@@ -3332,9 +3332,9 @@ function K({
|
|
|
3332
3332
|
/* @__PURE__ */ r("span", { className: "gloss-entity-row__name", title: t, children: t }),
|
|
3333
3333
|
n !== void 0 && /* @__PURE__ */ r("span", { className: "gloss-entity-row__secondary", children: n }),
|
|
3334
3334
|
/* @__PURE__ */ r("span", { className: "gloss-entity-row__value", children: a }),
|
|
3335
|
-
|
|
3335
|
+
s !== void 0 && /* @__PURE__ */ r("span", { className: "gloss-entity-row__trail", children: s })
|
|
3336
3336
|
] });
|
|
3337
|
-
return o ? /* @__PURE__ */ r("div", { role: "listitem", className:
|
|
3337
|
+
return o ? /* @__PURE__ */ r("div", { role: "listitem", className: d, style: m, children: /* @__PURE__ */ r(
|
|
3338
3338
|
"button",
|
|
3339
3339
|
{
|
|
3340
3340
|
type: "button",
|
|
@@ -3351,7 +3351,7 @@ function K({
|
|
|
3351
3351
|
},
|
|
3352
3352
|
children: u
|
|
3353
3353
|
}
|
|
3354
|
-
) }) : /* @__PURE__ */ r("div", { role: "listitem", className:
|
|
3354
|
+
) }) : /* @__PURE__ */ r("div", { role: "listitem", className: d, style: m, children: u });
|
|
3355
3355
|
}
|
|
3356
3356
|
K.displayName = "EntityRow";
|
|
3357
3357
|
const ee = ({ rank: e }) => {
|
|
@@ -3431,9 +3431,9 @@ function ga({
|
|
|
3431
3431
|
rows: t,
|
|
3432
3432
|
rowCount: n,
|
|
3433
3433
|
rankDeltaPeriod: a,
|
|
3434
|
-
isStale:
|
|
3434
|
+
isStale: s
|
|
3435
3435
|
}) {
|
|
3436
|
-
const
|
|
3436
|
+
const i = n ?? 3;
|
|
3437
3437
|
return /* @__PURE__ */ y($, { children: [
|
|
3438
3438
|
/* @__PURE__ */ r(
|
|
3439
3439
|
X,
|
|
@@ -3446,9 +3446,9 @@ function ga({
|
|
|
3446
3446
|
/* @__PURE__ */ r(
|
|
3447
3447
|
X,
|
|
3448
3448
|
{
|
|
3449
|
-
className: `gloss-metric-card__zone-b gloss-leaderboard ${
|
|
3449
|
+
className: `gloss-metric-card__zone-b gloss-leaderboard ${s ? "gloss-metric-data-stale" : ""}`,
|
|
3450
3450
|
style: { flex: 1, zIndex: 2, position: "relative", minHeight: 0 },
|
|
3451
|
-
children: /* @__PURE__ */ r("div", { className: "gloss-leaderboard__rows", role: "list", children: t.slice(0,
|
|
3451
|
+
children: /* @__PURE__ */ r("div", { className: "gloss-leaderboard__rows", role: "list", children: t.slice(0, i).map((o, l) => /* @__PURE__ */ r(
|
|
3452
3452
|
K,
|
|
3453
3453
|
{
|
|
3454
3454
|
lead: /* @__PURE__ */ r(ee, { rank: l + 1 }),
|
|
@@ -3520,11 +3520,11 @@ function va({
|
|
|
3520
3520
|
rows: t,
|
|
3521
3521
|
rule: n,
|
|
3522
3522
|
rowCount: a,
|
|
3523
|
-
emptyStateLabel:
|
|
3524
|
-
ruleSubtitle:
|
|
3523
|
+
emptyStateLabel: s,
|
|
3524
|
+
ruleSubtitle: i,
|
|
3525
3525
|
isStale: o
|
|
3526
3526
|
}) {
|
|
3527
|
-
const l = t.filter((
|
|
3527
|
+
const l = t.filter((d) => ba(d, n)), m = l.slice(0, a ?? 3);
|
|
3528
3528
|
return l.length === 0 ? /* @__PURE__ */ y($, { children: [
|
|
3529
3529
|
/* @__PURE__ */ r(
|
|
3530
3530
|
X,
|
|
@@ -3534,8 +3534,8 @@ function va({
|
|
|
3534
3534
|
children: /* @__PURE__ */ r(ce, { className: "gloss-metric-card__label", children: e })
|
|
3535
3535
|
}
|
|
3536
3536
|
),
|
|
3537
|
-
/* @__PURE__ */ r("div", { className: "gloss-exception-list__empty", role: "status", children:
|
|
3538
|
-
|
|
3537
|
+
/* @__PURE__ */ r("div", { className: "gloss-exception-list__empty", role: "status", children: s ?? "No exceptions" }),
|
|
3538
|
+
i && /* @__PURE__ */ r("div", { className: "gloss-exception-list__zone-c", children: i })
|
|
3539
3539
|
] }) : /* @__PURE__ */ y($, { children: [
|
|
3540
3540
|
/* @__PURE__ */ r(
|
|
3541
3541
|
X,
|
|
@@ -3550,20 +3550,20 @@ function va({
|
|
|
3550
3550
|
{
|
|
3551
3551
|
className: `gloss-metric-card__zone-b gloss-exception-list ${o ? "gloss-metric-data-stale" : ""}`,
|
|
3552
3552
|
style: { flex: 1, zIndex: 2, position: "relative", minHeight: 0 },
|
|
3553
|
-
children: /* @__PURE__ */ r("div", { className: "gloss-exception-list__rows", role: "list", children: m.map((
|
|
3553
|
+
children: /* @__PURE__ */ r("div", { className: "gloss-exception-list__rows", role: "list", children: m.map((d, u) => /* @__PURE__ */ r(
|
|
3554
3554
|
K,
|
|
3555
3555
|
{
|
|
3556
|
-
lead: /* @__PURE__ */ r(te, { severity:
|
|
3557
|
-
name:
|
|
3558
|
-
value:
|
|
3556
|
+
lead: /* @__PURE__ */ r(te, { severity: d.severity, "aria-label": fa(d.severity) }),
|
|
3557
|
+
name: d.name,
|
|
3558
|
+
value: d.value,
|
|
3559
3559
|
variant: "exception",
|
|
3560
3560
|
style: { "--i": u }
|
|
3561
3561
|
},
|
|
3562
|
-
|
|
3562
|
+
d.id
|
|
3563
3563
|
)) })
|
|
3564
3564
|
}
|
|
3565
3565
|
),
|
|
3566
|
-
|
|
3566
|
+
i && /* @__PURE__ */ r("div", { className: "gloss-exception-list__zone-c", children: i })
|
|
3567
3567
|
] });
|
|
3568
3568
|
}
|
|
3569
3569
|
va.displayName = "ExceptionListCard";
|
|
@@ -3613,19 +3613,19 @@ const xe = ["MTD", "QTD", "YTD", "LYTD", "7D"], Re = ["$248K", "$612K", "$1.24M"
|
|
|
3613
3613
|
labels: t = xe,
|
|
3614
3614
|
sampleValues: n = Re
|
|
3615
3615
|
}) => {
|
|
3616
|
-
const a = Array.from({ length: e }, (
|
|
3617
|
-
label: t[
|
|
3618
|
-
value: n[
|
|
3619
|
-
sparkPath: Te[
|
|
3616
|
+
const a = Array.from({ length: e }, (s, i) => ({
|
|
3617
|
+
label: t[i] ?? xe[i] ?? "",
|
|
3618
|
+
value: n[i] ?? Re[i] ?? "",
|
|
3619
|
+
sparkPath: Te[i % Te.length]
|
|
3620
3620
|
}));
|
|
3621
3621
|
return e === 1 ? /* @__PURE__ */ r("div", { className: "gloss-stacked-group-tile-preview gloss-stacked-group-tile-preview--single", "aria-hidden": "true", children: /* @__PURE__ */ r("div", { className: "gloss-stacked-group-tile-preview__single-value", children: a[0].value }) }) : /* @__PURE__ */ r(
|
|
3622
3622
|
"div",
|
|
3623
3623
|
{
|
|
3624
3624
|
className: `gloss-stacked-group-tile-preview gloss-stacked-group-tile-preview--slots-${e}`,
|
|
3625
3625
|
"aria-hidden": "true",
|
|
3626
|
-
children: a.map((
|
|
3627
|
-
/* @__PURE__ */ r("span", { className: "gloss-stacked-group-tile-preview__row-label", children:
|
|
3628
|
-
/* @__PURE__ */ r("span", { className: "gloss-stacked-group-tile-preview__row-value", children:
|
|
3626
|
+
children: a.map((s, i) => /* @__PURE__ */ y("div", { className: "gloss-stacked-group-tile-preview__row", children: [
|
|
3627
|
+
/* @__PURE__ */ r("span", { className: "gloss-stacked-group-tile-preview__row-label", children: s.label }),
|
|
3628
|
+
/* @__PURE__ */ r("span", { className: "gloss-stacked-group-tile-preview__row-value", children: s.value }),
|
|
3629
3629
|
/* @__PURE__ */ r(
|
|
3630
3630
|
"svg",
|
|
3631
3631
|
{
|
|
@@ -3635,10 +3635,10 @@ const xe = ["MTD", "QTD", "YTD", "LYTD", "7D"], Re = ["$248K", "$612K", "$1.24M"
|
|
|
3635
3635
|
height: "10",
|
|
3636
3636
|
preserveAspectRatio: "none",
|
|
3637
3637
|
"aria-hidden": "true",
|
|
3638
|
-
children: /* @__PURE__ */ r("path", { d:
|
|
3638
|
+
children: /* @__PURE__ */ r("path", { d: s.sparkPath, fill: "none", stroke: "currentColor", strokeWidth: "1" })
|
|
3639
3639
|
}
|
|
3640
3640
|
)
|
|
3641
|
-
] },
|
|
3641
|
+
] }, i))
|
|
3642
3642
|
}
|
|
3643
3643
|
);
|
|
3644
3644
|
};
|
|
@@ -3691,14 +3691,14 @@ function Nr({
|
|
|
3691
3691
|
variant: t,
|
|
3692
3692
|
rampColor: n,
|
|
3693
3693
|
colWidth: a,
|
|
3694
|
-
rowHeight:
|
|
3695
|
-
gap:
|
|
3694
|
+
rowHeight: s,
|
|
3695
|
+
gap: i,
|
|
3696
3696
|
className: o
|
|
3697
3697
|
}) {
|
|
3698
|
-
const m = (e.section * _a + e.col) * (a +
|
|
3698
|
+
const m = (e.section * _a + e.col) * (a + i), d = e.row * (s + i), u = t === "eligibility" ? j.eligibilityFill : t === "commit" ? j.commitFill : t === "rejection" ? j.rejectionFill : (
|
|
3699
3699
|
/* ramp */
|
|
3700
3700
|
n ?? j.eligibilityFill
|
|
3701
|
-
), h = t === "rejection",
|
|
3701
|
+
), h = t === "rejection", c = h ? j.rejectionStroke : "transparent", p = h ? "dashed" : "solid";
|
|
3702
3702
|
return /* @__PURE__ */ r(
|
|
3703
3703
|
"div",
|
|
3704
3704
|
{
|
|
@@ -3711,14 +3711,14 @@ function Nr({
|
|
|
3711
3711
|
"data-variant": t,
|
|
3712
3712
|
"aria-hidden": "true",
|
|
3713
3713
|
style: {
|
|
3714
|
-
transform: `translate(${m}px, ${
|
|
3714
|
+
transform: `translate(${m}px, ${d}px)`,
|
|
3715
3715
|
width: a,
|
|
3716
|
-
height:
|
|
3716
|
+
height: s,
|
|
3717
3717
|
// Use background-color longhand (NOT background shorthand) so jsdom + DOM
|
|
3718
3718
|
// both preserve `var(...)` in inline cssText. The shorthand getter strips
|
|
3719
3719
|
// unknown values and breaks both unit-test introspection and styling.
|
|
3720
3720
|
backgroundColor: u,
|
|
3721
|
-
borderColor:
|
|
3721
|
+
borderColor: c,
|
|
3722
3722
|
borderStyle: p
|
|
3723
3723
|
}
|
|
3724
3724
|
}
|
|
@@ -3734,14 +3734,14 @@ function Sr({
|
|
|
3734
3734
|
fireKey: t,
|
|
3735
3735
|
colWidth: n,
|
|
3736
3736
|
rowHeight: a,
|
|
3737
|
-
gap:
|
|
3738
|
-
className:
|
|
3737
|
+
gap: s,
|
|
3738
|
+
className: i
|
|
3739
3739
|
}) {
|
|
3740
|
-
const l = (e.section * Ca + e.col) * (n +
|
|
3740
|
+
const l = (e.section * Ca + e.col) * (n + s) + n / 2, m = e.row * (a + s) + a / 2;
|
|
3741
3741
|
return He() === "reduced" ? /* @__PURE__ */ r(
|
|
3742
3742
|
"div",
|
|
3743
3743
|
{
|
|
3744
|
-
className: ["gloss-refuse-pulse-flash",
|
|
3744
|
+
className: ["gloss-refuse-pulse-flash", i].filter(Boolean).join(" "),
|
|
3745
3745
|
"data-testid": "gloss-refuse-pulse-flash",
|
|
3746
3746
|
"data-fire-key": t,
|
|
3747
3747
|
"aria-hidden": "true",
|
|
@@ -3762,7 +3762,7 @@ function Sr({
|
|
|
3762
3762
|
) : /* @__PURE__ */ r(
|
|
3763
3763
|
"div",
|
|
3764
3764
|
{
|
|
3765
|
-
className: ["gloss-refuse-pulse",
|
|
3765
|
+
className: ["gloss-refuse-pulse", i].filter(Boolean).join(" "),
|
|
3766
3766
|
"data-testid": "gloss-refuse-pulse",
|
|
3767
3767
|
"data-fire-key": t,
|
|
3768
3768
|
"data-cx": l,
|
|
@@ -3812,12 +3812,12 @@ function kr(e) {
|
|
|
3812
3812
|
return /* @__PURE__ */ r(We, { gesture: "resize", ...e });
|
|
3813
3813
|
}
|
|
3814
3814
|
function Sa(e, t, n) {
|
|
3815
|
-
const a = Math.max(0, Math.min(1, n)),
|
|
3815
|
+
const a = Math.max(0, Math.min(1, n)), s = (h) => [
|
|
3816
3816
|
parseInt(h.slice(1, 3), 16),
|
|
3817
3817
|
parseInt(h.slice(3, 5), 16),
|
|
3818
3818
|
parseInt(h.slice(5, 7), 16)
|
|
3819
|
-
], [
|
|
3820
|
-
return `rgb(${Math.round(
|
|
3819
|
+
], [i, o, l] = s(e), [m, d, u] = s(t);
|
|
3820
|
+
return `rgb(${Math.round(i + (m - i) * a)}, ${Math.round(o + (d - o) * a)}, ${Math.round(
|
|
3821
3821
|
l + (u - l) * a
|
|
3822
3822
|
)})`;
|
|
3823
3823
|
}
|
|
@@ -3828,25 +3828,25 @@ function Da(e) {
|
|
|
3828
3828
|
return e === "dragging";
|
|
3829
3829
|
}
|
|
3830
3830
|
function Dr(e) {
|
|
3831
|
-
const { edgeHover: t, sourceCell: n, cascadeResult: a } = e,
|
|
3832
|
-
if (
|
|
3831
|
+
const { edgeHover: t, sourceCell: n, cascadeResult: a } = e, i = He() === "reduced", o = B.useRef(t.currentColSpan), l = B.useRef({ armed: !0, fireKey: 0, lastResult: null }), m = B.useRef(t.currentColSpan), d = B.useRef("idle"), u = B.useRef(t.currentColSpan), h = Da(t.state);
|
|
3832
|
+
if (i ? (d.current = "settled", u.current = t.currentColSpan, m.current = t.currentColSpan) : h ? d.current = t.currentColSpan !== m.current ? "incoming" : "outgoing" : (t.currentColSpan !== m.current && (u.current = t.currentColSpan, m.current = t.currentColSpan), d.current !== "idle" && (d.current = "settled")), !h)
|
|
3833
3833
|
return l.current.armed = !0, l.current.lastResult = null, {
|
|
3834
3834
|
trackingOutline: null,
|
|
3835
3835
|
cellTints: [],
|
|
3836
3836
|
refusePulse: null,
|
|
3837
3837
|
shrinkFreedCells: [],
|
|
3838
|
-
phase:
|
|
3838
|
+
phase: d.current,
|
|
3839
3839
|
displayColSpan: u.current
|
|
3840
3840
|
};
|
|
3841
|
-
const
|
|
3842
|
-
w || (o.current =
|
|
3843
|
-
const k = w ? o.current :
|
|
3841
|
+
const c = t.hysteresisTargetColSpan, p = t.previewColSpan, w = a?.result === "rejected";
|
|
3842
|
+
w || (o.current = c), w && l.current.armed && l.current.lastResult !== "rejected" && (l.current.fireKey += 1, l.current.armed = !1), l.current.lastResult = w ? "rejected" : "ok";
|
|
3843
|
+
const k = w ? o.current : c, f = {
|
|
3844
3844
|
cell: { section: 0, col: 0, row: 0 },
|
|
3845
3845
|
colSpan: k,
|
|
3846
3846
|
pattern: w ? "dashed-retreated" : "solid"
|
|
3847
3847
|
}, b = [];
|
|
3848
3848
|
if (w) {
|
|
3849
|
-
const S = n.col + o.current, T = n.col +
|
|
3849
|
+
const S = n.col + o.current, T = n.col + c - 1;
|
|
3850
3850
|
for (let g = S; g <= T && g <= 2; g++)
|
|
3851
3851
|
b.push({
|
|
3852
3852
|
cell: {
|
|
@@ -3857,25 +3857,25 @@ function Dr(e) {
|
|
|
3857
3857
|
variant: "rejection"
|
|
3858
3858
|
});
|
|
3859
3859
|
} else {
|
|
3860
|
-
const S = Math.abs(p -
|
|
3861
|
-
for (let g = n.col; g < n.col +
|
|
3860
|
+
const S = Math.abs(p - c), T = Math.max(0, Math.min(1, 1 - S));
|
|
3861
|
+
for (let g = n.col; g < n.col + c && g <= 2; g++) {
|
|
3862
3862
|
if (g === n.col) continue;
|
|
3863
|
-
const v = g === n.col +
|
|
3863
|
+
const v = g === n.col + c - 1, _ = {
|
|
3864
3864
|
section: 0,
|
|
3865
3865
|
col: g - n.col,
|
|
3866
3866
|
row: 0
|
|
3867
3867
|
};
|
|
3868
|
-
v && t.direction.startsWith("grow") &&
|
|
3868
|
+
v && t.direction.startsWith("grow") && c > 1 && !i && S > 0 && S < 1 ? b.push({
|
|
3869
3869
|
cell: _,
|
|
3870
3870
|
variant: "ramp",
|
|
3871
3871
|
rampColor: Sa(Me.eligibilityFill, Me.commitFill, T)
|
|
3872
3872
|
}) : v ? b.push({ cell: _, variant: "commit" }) : b.push({ cell: _, variant: "eligibility" });
|
|
3873
3873
|
}
|
|
3874
3874
|
}
|
|
3875
|
-
const
|
|
3876
|
-
if (t.currentColSpan >
|
|
3877
|
-
for (let S = n.col +
|
|
3878
|
-
|
|
3875
|
+
const x = [];
|
|
3876
|
+
if (t.currentColSpan > c)
|
|
3877
|
+
for (let S = n.col + c; S < n.col + t.currentColSpan && S <= 2; S++)
|
|
3878
|
+
x.push({
|
|
3879
3879
|
section: 0,
|
|
3880
3880
|
col: S - n.col,
|
|
3881
3881
|
row: 0
|
|
@@ -3894,8 +3894,8 @@ function Dr(e) {
|
|
|
3894
3894
|
trackingOutline: f,
|
|
3895
3895
|
cellTints: b,
|
|
3896
3896
|
refusePulse: C,
|
|
3897
|
-
shrinkFreedCells:
|
|
3898
|
-
phase:
|
|
3897
|
+
shrinkFreedCells: x,
|
|
3898
|
+
phase: d.current,
|
|
3899
3899
|
displayColSpan: u.current
|
|
3900
3900
|
};
|
|
3901
3901
|
}
|
|
@@ -3912,27 +3912,27 @@ function xa({
|
|
|
3912
3912
|
primaryAction: t,
|
|
3913
3913
|
onDismiss: n,
|
|
3914
3914
|
anchorEl: a,
|
|
3915
|
-
anchorSelector:
|
|
3915
|
+
anchorSelector: s
|
|
3916
3916
|
}) {
|
|
3917
|
-
const [
|
|
3917
|
+
const [i, o] = F.useState(null), l = F.useMemo(
|
|
3918
3918
|
() => typeof window < "u" && window.matchMedia ? window.matchMedia("(prefers-reduced-motion: reduce)").matches : !1,
|
|
3919
3919
|
[]
|
|
3920
3920
|
);
|
|
3921
3921
|
F.useEffect(() => {
|
|
3922
|
-
!a && !
|
|
3922
|
+
!a && !s && (typeof process > "u" || process.env.NODE_ENV !== "production") && console.error(
|
|
3923
3923
|
"[InlineNudge] requires anchorEl or anchorSelector. AP-07: Do not mount InlineNudge in Layout/** or _app.tsx."
|
|
3924
3924
|
);
|
|
3925
|
-
}, [a,
|
|
3926
|
-
let
|
|
3927
|
-
if (a ?
|
|
3928
|
-
const u =
|
|
3925
|
+
}, [a, s]), F.useLayoutEffect(() => {
|
|
3926
|
+
let d = null;
|
|
3927
|
+
if (a ? d = a : s && (d = document.querySelector(s)), d) {
|
|
3928
|
+
const u = d.getBoundingClientRect();
|
|
3929
3929
|
o({
|
|
3930
3930
|
top: u.bottom + window.scrollY + 6,
|
|
3931
3931
|
left: u.left + window.scrollX
|
|
3932
3932
|
});
|
|
3933
3933
|
}
|
|
3934
|
-
}, [a,
|
|
3935
|
-
const m =
|
|
3934
|
+
}, [a, s]);
|
|
3935
|
+
const m = i ? { top: i.top, left: i.left } : {};
|
|
3936
3936
|
return /* @__PURE__ */ y(
|
|
3937
3937
|
"div",
|
|
3938
3938
|
{
|
|
@@ -3977,11 +3977,11 @@ function Ra(e, t, n) {
|
|
|
3977
3977
|
const o = e[0], l = o ? ge(o) : "#888";
|
|
3978
3978
|
return `linear-gradient(to right, ${l}, ${l})`;
|
|
3979
3979
|
}
|
|
3980
|
-
const a = n - t,
|
|
3980
|
+
const a = n - t, i = [...e].sort((o, l) => o.value - l.value).map((o) => {
|
|
3981
3981
|
const l = (o.value - t) / a * 100;
|
|
3982
3982
|
return `${ge(o)} ${l.toFixed(2)}%`;
|
|
3983
3983
|
});
|
|
3984
|
-
return
|
|
3984
|
+
return i.length === 0 ? "linear-gradient(to right, #888 0%, #888 100%)" : i.length === 1 ? `linear-gradient(to right, ${i[0]}, ${i[0]})` : `linear-gradient(to right, ${i.join(", ")})`;
|
|
3985
3985
|
}
|
|
3986
3986
|
function Ta(e) {
|
|
3987
3987
|
return e.map((t) => `${t.id}:${t.value}`).join("|");
|
|
@@ -3991,18 +3991,18 @@ function Ma({
|
|
|
3991
3991
|
onChange: t,
|
|
3992
3992
|
min: n = 0,
|
|
3993
3993
|
max: a = 100,
|
|
3994
|
-
step:
|
|
3995
|
-
disabled:
|
|
3994
|
+
step: s,
|
|
3995
|
+
disabled: i = !1
|
|
3996
3996
|
}) {
|
|
3997
|
-
const o =
|
|
3998
|
-
`ThresholdRamp: step (${
|
|
3999
|
-
), 0.01) :
|
|
3997
|
+
const o = s === void 0 ? 0.01 : !Number.isFinite(s) || s <= 0 ? (process.env.NODE_ENV !== "production" && console.warn(
|
|
3998
|
+
`ThresholdRamp: step (${s}) must be a positive finite number; falling back to 0.01.`
|
|
3999
|
+
), 0.01) : s, l = N(
|
|
4000
4000
|
(g) => Math.round(g / o) * o,
|
|
4001
4001
|
[o]
|
|
4002
|
-
), m = P(null), [
|
|
4002
|
+
), m = P(null), [d, u] = I(null), [h, c] = I(e), p = Ta(e), w = P(p);
|
|
4003
4003
|
A(() => {
|
|
4004
|
-
w.current !== p && (w.current = p, !
|
|
4005
|
-
}, [p, e,
|
|
4004
|
+
w.current !== p && (w.current = p, !d && c(e));
|
|
4005
|
+
}, [p, e, d]);
|
|
4006
4006
|
const k = re(() => Ra(h, n, a), [h, n, a]), f = N(
|
|
4007
4007
|
(g) => {
|
|
4008
4008
|
if (!m.current) return n;
|
|
@@ -4019,32 +4019,32 @@ function Ma({
|
|
|
4019
4019
|
const b = N(
|
|
4020
4020
|
(g, v) => {
|
|
4021
4021
|
const _ = h.find((D) => D.id === v);
|
|
4022
|
-
|
|
4022
|
+
i || _?.disabled || (g.preventDefault(), u(v));
|
|
4023
4023
|
},
|
|
4024
|
-
[
|
|
4025
|
-
),
|
|
4026
|
-
|
|
4024
|
+
[i, h]
|
|
4025
|
+
), x = P(h);
|
|
4026
|
+
x.current = h;
|
|
4027
4027
|
const C = P(t);
|
|
4028
4028
|
C.current = t, A(() => {
|
|
4029
|
-
if (!
|
|
4029
|
+
if (!d) return;
|
|
4030
4030
|
const g = (_) => {
|
|
4031
4031
|
const D = f(_.clientX);
|
|
4032
|
-
|
|
4033
|
-
(M) => M.map((
|
|
4032
|
+
c(
|
|
4033
|
+
(M) => M.map((R) => R.id === d ? { ...R, value: D } : R)
|
|
4034
4034
|
);
|
|
4035
4035
|
}, v = (_) => {
|
|
4036
|
-
const D = f(_.clientX), M =
|
|
4037
|
-
(
|
|
4036
|
+
const D = f(_.clientX), M = x.current.map(
|
|
4037
|
+
(R) => R.id === d ? { ...R, value: D } : R
|
|
4038
4038
|
);
|
|
4039
|
-
|
|
4039
|
+
c(M), u(null), C.current(M);
|
|
4040
4040
|
};
|
|
4041
4041
|
return window.addEventListener("pointermove", g), window.addEventListener("pointerup", v), window.addEventListener("pointercancel", v), () => {
|
|
4042
4042
|
window.removeEventListener("pointermove", g), window.removeEventListener("pointerup", v), window.removeEventListener("pointercancel", v);
|
|
4043
4043
|
};
|
|
4044
|
-
}, [
|
|
4044
|
+
}, [d, f]);
|
|
4045
4045
|
const S = a - n > 0 ? a - n : 1, T = N(
|
|
4046
4046
|
(g, v) => {
|
|
4047
|
-
if (
|
|
4047
|
+
if (i || v.disabled) return;
|
|
4048
4048
|
const _ = a - n;
|
|
4049
4049
|
if (_ <= 0) return;
|
|
4050
4050
|
const D = g.shiftKey ? _ / 20 : _ / 100;
|
|
@@ -4068,16 +4068,16 @@ function Ma({
|
|
|
4068
4068
|
return;
|
|
4069
4069
|
}
|
|
4070
4070
|
g.preventDefault();
|
|
4071
|
-
const
|
|
4071
|
+
const R = Math.max(n, Math.min(a, M)), E = l(R);
|
|
4072
4072
|
if (E === v.value) return;
|
|
4073
4073
|
const L = h.map(
|
|
4074
4074
|
(Z) => Z.id === v.id ? { ...Z, value: E } : Z
|
|
4075
4075
|
);
|
|
4076
|
-
|
|
4076
|
+
c(L), t(L);
|
|
4077
4077
|
},
|
|
4078
|
-
[
|
|
4078
|
+
[i, n, a, h, t, l]
|
|
4079
4079
|
);
|
|
4080
|
-
return /* @__PURE__ */ r("div", { className: "gloss-threshold-ramp", "data-disabled":
|
|
4080
|
+
return /* @__PURE__ */ r("div", { className: "gloss-threshold-ramp", "data-disabled": i || void 0, children: /* @__PURE__ */ r(
|
|
4081
4081
|
"div",
|
|
4082
4082
|
{
|
|
4083
4083
|
ref: m,
|
|
@@ -4094,7 +4094,7 @@ function Ma({
|
|
|
4094
4094
|
color: ge(g)
|
|
4095
4095
|
},
|
|
4096
4096
|
"data-disabled": g.disabled || void 0,
|
|
4097
|
-
"data-dragging":
|
|
4097
|
+
"data-dragging": d === g.id || void 0,
|
|
4098
4098
|
onPointerDown: (_) => b(_, g.id),
|
|
4099
4099
|
onKeyDown: (_) => T(_, g),
|
|
4100
4100
|
"aria-label": g.label ?? `Stop at ${g.value}`,
|
|
@@ -4102,8 +4102,8 @@ function Ma({
|
|
|
4102
4102
|
"aria-valuenow": g.value,
|
|
4103
4103
|
"aria-valuemin": n,
|
|
4104
4104
|
"aria-valuemax": a,
|
|
4105
|
-
"aria-disabled": g.disabled ||
|
|
4106
|
-
tabIndex: g.disabled ||
|
|
4105
|
+
"aria-disabled": g.disabled || i || void 0,
|
|
4106
|
+
tabIndex: g.disabled || i ? -1 : 0
|
|
4107
4107
|
},
|
|
4108
4108
|
g.id
|
|
4109
4109
|
);
|
|
@@ -4146,32 +4146,32 @@ function Pa(e, t, n, a) {
|
|
|
4146
4146
|
}
|
|
4147
4147
|
}
|
|
4148
4148
|
function Ia(e) {
|
|
4149
|
-
const { anchorRef: t, placement: n, gap: a = 8, offset:
|
|
4150
|
-
o.current = { x:
|
|
4149
|
+
const { anchorRef: t, placement: n, gap: a = 8, offset: s, isOpen: i = !0 } = e, o = P({ x: s?.x ?? 0, y: s?.y ?? 0 });
|
|
4150
|
+
o.current = { x: s?.x ?? 0, y: s?.y ?? 0 };
|
|
4151
4151
|
const [l, m] = I({});
|
|
4152
4152
|
return Ie(() => {
|
|
4153
|
-
if (typeof window > "u" || !
|
|
4154
|
-
const
|
|
4155
|
-
if (!
|
|
4153
|
+
if (typeof window > "u" || !i) return;
|
|
4154
|
+
const d = t.current;
|
|
4155
|
+
if (!d) return;
|
|
4156
4156
|
const u = () => {
|
|
4157
|
-
const
|
|
4158
|
-
m(Pa(
|
|
4157
|
+
const c = d.getBoundingClientRect();
|
|
4158
|
+
m(Pa(c, n, a, o.current));
|
|
4159
4159
|
};
|
|
4160
4160
|
u();
|
|
4161
4161
|
let h = null;
|
|
4162
|
-
return typeof ResizeObserver < "u" && (h = new ResizeObserver(u), h.observe(
|
|
4162
|
+
return typeof ResizeObserver < "u" && (h = new ResizeObserver(u), h.observe(d)), window.addEventListener("scroll", u, { capture: !0, passive: !0 }), window.addEventListener("resize", u, { passive: !0 }), () => {
|
|
4163
4163
|
h?.disconnect(), window.removeEventListener("scroll", u, !0), window.removeEventListener("resize", u);
|
|
4164
4164
|
};
|
|
4165
|
-
}, [t, n, a,
|
|
4165
|
+
}, [t, n, a, i]), { style: l };
|
|
4166
4166
|
}
|
|
4167
4167
|
const Ea = {
|
|
4168
4168
|
position: "fixed",
|
|
4169
4169
|
zIndex: 9999
|
|
4170
4170
|
};
|
|
4171
4171
|
function Aa(e) {
|
|
4172
|
-
const { anchorRef: t, placement: n, gap: a, offset:
|
|
4172
|
+
const { anchorRef: t, placement: n, gap: a, offset: s, dataHost: i, isOpen: o = !0, className: l, children: m } = e, { style: d } = Ia({ anchorRef: t, placement: n, gap: a, offset: s, isOpen: o });
|
|
4173
4173
|
return typeof window > "u" || typeof document > "u" || !o ? null : Ee(
|
|
4174
|
-
/* @__PURE__ */ r("div", { "data-portal-host":
|
|
4174
|
+
/* @__PURE__ */ r("div", { "data-portal-host": i, className: l, style: { ...Ea, ...d }, children: m }),
|
|
4175
4175
|
document.body
|
|
4176
4176
|
);
|
|
4177
4177
|
}
|
|
@@ -4180,18 +4180,18 @@ function Fa() {
|
|
|
4180
4180
|
return at(je);
|
|
4181
4181
|
}
|
|
4182
4182
|
function Oa({ option: e }) {
|
|
4183
|
-
const t = Fa(), n = t?.isSelected(e.value) ?? !1, a = e.disabled || t?.groupDisabled,
|
|
4183
|
+
const t = Fa(), n = t?.isSelected(e.value) ?? !1, a = e.disabled || t?.groupDisabled, s = N(() => {
|
|
4184
4184
|
a || t?.select(e.value);
|
|
4185
|
-
}, [a, t, e.value]),
|
|
4186
|
-
(
|
|
4187
|
-
a || t?.onKeyNav(
|
|
4185
|
+
}, [a, t, e.value]), i = N(
|
|
4186
|
+
(d) => {
|
|
4187
|
+
a || t?.onKeyNav(d, e.value);
|
|
4188
4188
|
},
|
|
4189
4189
|
[a, t, e.value]
|
|
4190
4190
|
), o = e.colorToken ? `var(--gloss-color-${e.colorToken}, ${e.color ?? "#888"})` : e.color ?? "#888", l = t?.firstFocusableValue === e.value, m = a ? -1 : l ? 0 : -1;
|
|
4191
4191
|
return /* @__PURE__ */ r(
|
|
4192
4192
|
"button",
|
|
4193
4193
|
{
|
|
4194
|
-
ref: (
|
|
4194
|
+
ref: (d) => t?.registerRef(e.value, d),
|
|
4195
4195
|
type: "button",
|
|
4196
4196
|
role: "radio",
|
|
4197
4197
|
"aria-checked": n,
|
|
@@ -4204,8 +4204,8 @@ function Oa({ option: e }) {
|
|
|
4204
4204
|
"aria-disabled": a,
|
|
4205
4205
|
disabled: a,
|
|
4206
4206
|
tabIndex: m,
|
|
4207
|
-
onClick:
|
|
4208
|
-
onKeyDown:
|
|
4207
|
+
onClick: s,
|
|
4208
|
+
onKeyDown: i
|
|
4209
4209
|
}
|
|
4210
4210
|
);
|
|
4211
4211
|
}
|
|
@@ -4214,25 +4214,25 @@ function La({
|
|
|
4214
4214
|
value: t,
|
|
4215
4215
|
defaultValue: n,
|
|
4216
4216
|
onChange: a,
|
|
4217
|
-
disabled:
|
|
4218
|
-
name:
|
|
4217
|
+
disabled: s = !1,
|
|
4218
|
+
name: i
|
|
4219
4219
|
}) {
|
|
4220
|
-
const o = t !== void 0, [l, m] = I(n),
|
|
4220
|
+
const o = t !== void 0, [l, m] = I(n), d = o ? t : l, u = N(
|
|
4221
4221
|
(C) => {
|
|
4222
4222
|
o || m(C), a?.(C);
|
|
4223
4223
|
},
|
|
4224
4224
|
[o, a]
|
|
4225
4225
|
), h = N(
|
|
4226
|
-
(C) =>
|
|
4227
|
-
[
|
|
4228
|
-
),
|
|
4229
|
-
S ?
|
|
4230
|
-
}, []), w = e.filter((C) => !C.disabled && !
|
|
4231
|
-
const S =
|
|
4226
|
+
(C) => d === C,
|
|
4227
|
+
[d]
|
|
4228
|
+
), c = P(/* @__PURE__ */ new Map()), p = N((C, S) => {
|
|
4229
|
+
S ? c.current.set(C, S) : c.current.delete(C);
|
|
4230
|
+
}, []), w = e.filter((C) => !C.disabled && !s), k = w.find((C) => C.value === d)?.value ?? w[0]?.value, f = N((C) => {
|
|
4231
|
+
const S = c.current.get(C);
|
|
4232
4232
|
S && S.focus();
|
|
4233
4233
|
}, []), b = N(
|
|
4234
4234
|
(C, S) => {
|
|
4235
|
-
if (
|
|
4235
|
+
if (s) return;
|
|
4236
4236
|
const T = e.filter((D) => !D.disabled);
|
|
4237
4237
|
if (T.length === 0) return;
|
|
4238
4238
|
const g = T.findIndex((D) => D.value === S);
|
|
@@ -4264,25 +4264,25 @@ function La({
|
|
|
4264
4264
|
const _ = T[v].value;
|
|
4265
4265
|
f(_), u(_);
|
|
4266
4266
|
},
|
|
4267
|
-
[
|
|
4268
|
-
),
|
|
4269
|
-
selectedValue:
|
|
4267
|
+
[s, e, u, f]
|
|
4268
|
+
), x = {
|
|
4269
|
+
selectedValue: d,
|
|
4270
4270
|
select: u,
|
|
4271
4271
|
isSelected: h,
|
|
4272
|
-
groupDisabled:
|
|
4273
|
-
name:
|
|
4272
|
+
groupDisabled: s,
|
|
4273
|
+
name: i,
|
|
4274
4274
|
registerRef: p,
|
|
4275
4275
|
firstFocusableValue: k,
|
|
4276
4276
|
onKeyNav: b
|
|
4277
4277
|
};
|
|
4278
|
-
return /* @__PURE__ */ r(je.Provider, { value:
|
|
4278
|
+
return /* @__PURE__ */ r(je.Provider, { value: x, children: /* @__PURE__ */ r(
|
|
4279
4279
|
"div",
|
|
4280
4280
|
{
|
|
4281
4281
|
className: "gloss-preset-swatch-row",
|
|
4282
4282
|
role: "radiogroup",
|
|
4283
|
-
"aria-label":
|
|
4284
|
-
"aria-disabled":
|
|
4285
|
-
"data-disabled":
|
|
4283
|
+
"aria-label": i,
|
|
4284
|
+
"aria-disabled": s,
|
|
4285
|
+
"data-disabled": s || void 0,
|
|
4286
4286
|
children: e.map((C) => /* @__PURE__ */ r(Oa, { option: C }, C.value))
|
|
4287
4287
|
}
|
|
4288
4288
|
) });
|
|
@@ -4299,8 +4299,8 @@ function Pe(e, t) {
|
|
|
4299
4299
|
return n ? n.zoneKey : he(e, t);
|
|
4300
4300
|
}
|
|
4301
4301
|
function $a(e, t, n) {
|
|
4302
|
-
const a = [...e], [
|
|
4303
|
-
return a.splice(n, 0,
|
|
4302
|
+
const a = [...e], [s] = a.splice(t, 1);
|
|
4303
|
+
return a.splice(n, 0, s), a;
|
|
4304
4304
|
}
|
|
4305
4305
|
function za(e) {
|
|
4306
4306
|
return e.map((t) => `${t.zoneKey}:${t.items.map((n) => n.id).join(",")}`).join("|");
|
|
@@ -4310,34 +4310,34 @@ function Ba(e) {
|
|
|
4310
4310
|
() => e.zones.map((f) => f.maxItems !== void 0 && f.items.length > f.maxItems ? (process.env.NODE_ENV !== "production" && console.warn(
|
|
4311
4311
|
`useSortableZones: zone "${f.zoneKey}" exceeds maxItems (${f.items.length} > ${f.maxItems}); trimming to cap.`
|
|
4312
4312
|
), { ...f, items: f.items.slice(0, f.maxItems) }) : f)
|
|
4313
|
-
), [a,
|
|
4313
|
+
), [a, s] = I(null), [i, o] = I(null), l = P(null), m = P(e.onZoneChange);
|
|
4314
4314
|
m.current = e.onZoneChange;
|
|
4315
|
-
const
|
|
4315
|
+
const d = re(
|
|
4316
4316
|
() => za(e.zones),
|
|
4317
4317
|
[e.zones]
|
|
4318
|
-
), u = P(
|
|
4318
|
+
), u = P(d);
|
|
4319
4319
|
A(() => {
|
|
4320
|
-
u.current !==
|
|
4320
|
+
u.current !== d && (u.current = d, !a && n(
|
|
4321
4321
|
e.zones.map((f) => f.maxItems !== void 0 && f.items.length > f.maxItems ? (process.env.NODE_ENV !== "production" && console.warn(
|
|
4322
4322
|
`useSortableZones: zone "${f.zoneKey}" exceeds maxItems (${f.items.length} > ${f.maxItems}); trimming to cap.`
|
|
4323
4323
|
), { ...f, items: f.items.slice(0, f.maxItems) }) : f)
|
|
4324
4324
|
));
|
|
4325
|
-
}, [
|
|
4325
|
+
}, [d, e.zones, a]);
|
|
4326
4326
|
const h = N(
|
|
4327
4327
|
(f) => {
|
|
4328
4328
|
const b = f.active.id;
|
|
4329
|
-
let
|
|
4329
|
+
let x = null, C = null;
|
|
4330
4330
|
for (const S of t) {
|
|
4331
4331
|
const T = S.items.find((g) => g.id === b);
|
|
4332
4332
|
if (T) {
|
|
4333
|
-
|
|
4333
|
+
x = T, C = S.zoneKey;
|
|
4334
4334
|
break;
|
|
4335
4335
|
}
|
|
4336
4336
|
}
|
|
4337
|
-
l.current = C,
|
|
4337
|
+
l.current = C, s(x), o(C);
|
|
4338
4338
|
},
|
|
4339
4339
|
[t]
|
|
4340
|
-
),
|
|
4340
|
+
), c = N(
|
|
4341
4341
|
(f) => {
|
|
4342
4342
|
if (!f.over) {
|
|
4343
4343
|
o(l.current);
|
|
@@ -4349,32 +4349,32 @@ function Ba(e) {
|
|
|
4349
4349
|
[t]
|
|
4350
4350
|
), p = N(
|
|
4351
4351
|
(f) => {
|
|
4352
|
-
const { active: b, over:
|
|
4353
|
-
l.current = null,
|
|
4352
|
+
const { active: b, over: x } = f, C = () => {
|
|
4353
|
+
l.current = null, s(null), o(null);
|
|
4354
4354
|
};
|
|
4355
|
-
if (!
|
|
4355
|
+
if (!x) {
|
|
4356
4356
|
C();
|
|
4357
4357
|
return;
|
|
4358
4358
|
}
|
|
4359
|
-
const S = he(t, b.id), T = Pe(t,
|
|
4359
|
+
const S = he(t, b.id), T = Pe(t, x.id);
|
|
4360
4360
|
if (!S || !T) {
|
|
4361
4361
|
C();
|
|
4362
4362
|
return;
|
|
4363
4363
|
}
|
|
4364
4364
|
let g = t.map((v) => ({ ...v, items: [...v.items] }));
|
|
4365
4365
|
if (S === T) {
|
|
4366
|
-
const v = g.findIndex((E) => E.zoneKey === S), _ = g[v], D = _.items.findIndex((E) => E.id === b.id), M = _.items.findIndex((E) => E.id ===
|
|
4366
|
+
const v = g.findIndex((E) => E.zoneKey === S), _ = g[v], D = _.items.findIndex((E) => E.id === b.id), M = _.items.findIndex((E) => E.id === x.id), R = M >= 0 ? M : Math.max(0, _.items.length - 1);
|
|
4367
4367
|
g[v] = {
|
|
4368
4368
|
..._,
|
|
4369
|
-
items: $a(_.items, D,
|
|
4369
|
+
items: $a(_.items, D, R)
|
|
4370
4370
|
};
|
|
4371
4371
|
} else {
|
|
4372
|
-
const v = g.findIndex((O) => O.zoneKey === S), _ = g.findIndex((O) => O.zoneKey === T), D = g[v], M = g[_],
|
|
4373
|
-
if (!
|
|
4372
|
+
const v = g.findIndex((O) => O.zoneKey === S), _ = g.findIndex((O) => O.zoneKey === T), D = g[v], M = g[_], R = D.items.find((O) => O.id === b.id);
|
|
4373
|
+
if (!R) {
|
|
4374
4374
|
C();
|
|
4375
4375
|
return;
|
|
4376
4376
|
}
|
|
4377
|
-
const E = D.items.filter((O) => O.id !== b.id), L = M.items.findIndex((O) => O.id ===
|
|
4377
|
+
const E = D.items.filter((O) => O.id !== b.id), L = M.items.findIndex((O) => O.id === x.id), Z = L >= 0 ? L : M.items.length;
|
|
4378
4378
|
let be = E, H = [...M.items];
|
|
4379
4379
|
if (M.maxItems !== void 0 && H.length >= M.maxItems) {
|
|
4380
4380
|
const O = H[H.length - 1];
|
|
@@ -4382,7 +4382,7 @@ function Ba(e) {
|
|
|
4382
4382
|
}
|
|
4383
4383
|
const ve = Math.min(Z, H.length), qe = [
|
|
4384
4384
|
...H.slice(0, ve),
|
|
4385
|
-
|
|
4385
|
+
R,
|
|
4386
4386
|
...H.slice(ve)
|
|
4387
4387
|
];
|
|
4388
4388
|
g[v] = { ...D, items: be }, g[_] = { ...M, items: qe };
|
|
@@ -4409,12 +4409,12 @@ function Ba(e) {
|
|
|
4409
4409
|
);
|
|
4410
4410
|
return {
|
|
4411
4411
|
zones: t,
|
|
4412
|
-
activeZone:
|
|
4412
|
+
activeZone: i,
|
|
4413
4413
|
activeItem: a,
|
|
4414
4414
|
getZoneProps: w,
|
|
4415
4415
|
getItemProps: k,
|
|
4416
4416
|
handleDragStart: h,
|
|
4417
|
-
handleDragOver:
|
|
4417
|
+
handleDragOver: c,
|
|
4418
4418
|
handleDragEnd: p
|
|
4419
4419
|
};
|
|
4420
4420
|
}
|
|
@@ -4435,11 +4435,11 @@ const Ka = [
|
|
|
4435
4435
|
];
|
|
4436
4436
|
function Ha(e, t) {
|
|
4437
4437
|
const n = [], a = e ?? {};
|
|
4438
|
-
for (const
|
|
4439
|
-
a[
|
|
4440
|
-
const
|
|
4441
|
-
for (const
|
|
4442
|
-
i
|
|
4438
|
+
for (const i of Ka)
|
|
4439
|
+
a[i] === void 0 && n.push(`@dnd-kit/core:${i}`);
|
|
4440
|
+
const s = t ?? {};
|
|
4441
|
+
for (const i of Ga)
|
|
4442
|
+
s[i] === void 0 && n.push(`@dnd-kit/sortable:${i}`);
|
|
4443
4443
|
return n.length === 0 ? { ok: !0 } : { ok: !1, missing: n };
|
|
4444
4444
|
}
|
|
4445
4445
|
function Wa() {
|
|
@@ -4465,14 +4465,14 @@ function Wa() {
|
|
|
4465
4465
|
})(), ne);
|
|
4466
4466
|
}
|
|
4467
4467
|
function Va(e) {
|
|
4468
|
-
const { zones: t, onZoneChange: n, renderZone: a, renderItem:
|
|
4468
|
+
const { zones: t, onZoneChange: n, renderZone: a, renderItem: s, renderDragOverlay: i } = e, o = Ba({ zones: t, onZoneChange: n }), [l, m] = F.useState(Q);
|
|
4469
4469
|
return F.useEffect(() => {
|
|
4470
4470
|
if (l) return;
|
|
4471
|
-
let
|
|
4471
|
+
let d = !0;
|
|
4472
4472
|
return Wa().then((u) => {
|
|
4473
|
-
|
|
4473
|
+
d && m(u);
|
|
4474
4474
|
}), () => {
|
|
4475
|
-
|
|
4475
|
+
d = !1;
|
|
4476
4476
|
};
|
|
4477
4477
|
}, [l]), l ? /* @__PURE__ */ r(
|
|
4478
4478
|
Ue,
|
|
@@ -4480,12 +4480,12 @@ function Va(e) {
|
|
|
4480
4480
|
state: o,
|
|
4481
4481
|
modules: l,
|
|
4482
4482
|
renderZone: a,
|
|
4483
|
-
renderItem:
|
|
4484
|
-
renderDragOverlay:
|
|
4483
|
+
renderItem: s,
|
|
4484
|
+
renderDragOverlay: i
|
|
4485
4485
|
}
|
|
4486
|
-
) : /* @__PURE__ */ r("div", { "data-sortable-zones-passive": "true", children: o.zones.map((
|
|
4487
|
-
const u =
|
|
4488
|
-
return /* @__PURE__ */ r("div", { ...o.getZoneProps(
|
|
4486
|
+
) : /* @__PURE__ */ r("div", { "data-sortable-zones-passive": "true", children: o.zones.map((d) => {
|
|
4487
|
+
const u = d.items.map((h) => /* @__PURE__ */ r(F.Fragment, { children: s(h) }, h.id));
|
|
4488
|
+
return /* @__PURE__ */ r("div", { ...o.getZoneProps(d.zoneKey), children: a(d.zoneKey, d.items, u) }, d.zoneKey);
|
|
4489
4489
|
}) });
|
|
4490
4490
|
}
|
|
4491
4491
|
Va.displayName = "SortableZones";
|
|
@@ -4494,16 +4494,16 @@ function Ue({
|
|
|
4494
4494
|
modules: t,
|
|
4495
4495
|
renderZone: n,
|
|
4496
4496
|
renderItem: a,
|
|
4497
|
-
renderDragOverlay:
|
|
4497
|
+
renderDragOverlay: s
|
|
4498
4498
|
}) {
|
|
4499
|
-
const { core:
|
|
4499
|
+
const { core: i, sortable: o, utilities: l } = t, { DndContext: m, DragOverlay: d, useSensors: u, useSensor: h, useDroppable: c, PointerSensor: p, KeyboardSensor: w, closestCenter: k } = i, { SortableContext: f, verticalListSortingStrategy: b } = o, x = u(
|
|
4500
4500
|
h(p, { activationConstraint: { distance: 5 } }),
|
|
4501
4501
|
h(w)
|
|
4502
|
-
), C = m, S =
|
|
4502
|
+
), C = m, S = d, T = f;
|
|
4503
4503
|
return /* @__PURE__ */ y(
|
|
4504
4504
|
C,
|
|
4505
4505
|
{
|
|
4506
|
-
sensors:
|
|
4506
|
+
sensors: x,
|
|
4507
4507
|
collisionDetection: k,
|
|
4508
4508
|
onDragStart: e.handleDragStart,
|
|
4509
4509
|
onDragOver: e.handleDragOver,
|
|
@@ -4525,25 +4525,25 @@ function Ue({
|
|
|
4525
4525
|
{
|
|
4526
4526
|
zoneKey: g.zoneKey,
|
|
4527
4527
|
zoneProps: e.getZoneProps(g.zoneKey),
|
|
4528
|
-
useDroppable:
|
|
4528
|
+
useDroppable: c,
|
|
4529
4529
|
children: /* @__PURE__ */ r(T, { items: v, strategy: b, children: n(g.zoneKey, g.items, _) })
|
|
4530
4530
|
},
|
|
4531
4531
|
g.zoneKey
|
|
4532
4532
|
);
|
|
4533
4533
|
}),
|
|
4534
|
-
/* @__PURE__ */ r(S, { children: e.activeItem ?
|
|
4534
|
+
/* @__PURE__ */ r(S, { children: e.activeItem ? s?.(e.activeItem) ?? a(e.activeItem) : null })
|
|
4535
4535
|
]
|
|
4536
4536
|
}
|
|
4537
4537
|
);
|
|
4538
4538
|
}
|
|
4539
4539
|
Ue.displayName = "SortableZonesInner";
|
|
4540
4540
|
function Ye({ id: e, useSortable: t, cssHelper: n, children: a }) {
|
|
4541
|
-
const { attributes:
|
|
4541
|
+
const { attributes: s, listeners: i, setNodeRef: o, transform: l, transition: m, isDragging: d } = t({ id: e }), u = {
|
|
4542
4542
|
transform: n?.Transform?.toString(l) ?? void 0,
|
|
4543
4543
|
transition: m,
|
|
4544
|
-
opacity:
|
|
4544
|
+
opacity: d ? 0.5 : 1
|
|
4545
4545
|
};
|
|
4546
|
-
return /* @__PURE__ */ r("div", { ref: o, style: u, "data-sortable-item-id": e, ...
|
|
4546
|
+
return /* @__PURE__ */ r("div", { ref: o, style: u, "data-sortable-item-id": e, ...s, ...i, children: a });
|
|
4547
4547
|
}
|
|
4548
4548
|
Ye.displayName = "SortableItem";
|
|
4549
4549
|
function Ze({
|
|
@@ -4552,8 +4552,8 @@ function Ze({
|
|
|
4552
4552
|
useDroppable: n,
|
|
4553
4553
|
children: a
|
|
4554
4554
|
}) {
|
|
4555
|
-
const { setNodeRef:
|
|
4556
|
-
return /* @__PURE__ */ r("div", { ref:
|
|
4555
|
+
const { setNodeRef: s, isOver: i } = n({ id: e });
|
|
4556
|
+
return /* @__PURE__ */ r("div", { ref: s, "data-zone-is-over": i || void 0, ...t, children: a });
|
|
4557
4557
|
}
|
|
4558
4558
|
Ze.displayName = "ZoneDroppable";
|
|
4559
4559
|
function xr({
|
|
@@ -4561,13 +4561,13 @@ function xr({
|
|
|
4561
4561
|
slotCenter: t,
|
|
4562
4562
|
slotRight: n,
|
|
4563
4563
|
height: a = 36,
|
|
4564
|
-
className:
|
|
4565
|
-
style:
|
|
4564
|
+
className: s,
|
|
4565
|
+
style: i,
|
|
4566
4566
|
"aria-label": o = "Dashboard navigation"
|
|
4567
4567
|
}) {
|
|
4568
4568
|
const l = {
|
|
4569
4569
|
"--gloss-bottom-toolbar-height": `${a}px`,
|
|
4570
|
-
...
|
|
4570
|
+
...i
|
|
4571
4571
|
};
|
|
4572
4572
|
return /* @__PURE__ */ y(
|
|
4573
4573
|
"div",
|
|
@@ -4575,7 +4575,7 @@ function xr({
|
|
|
4575
4575
|
role: "toolbar",
|
|
4576
4576
|
"aria-label": o,
|
|
4577
4577
|
"data-testid": "gloss-bottom-toolbar",
|
|
4578
|
-
className: ["gloss-bottom-toolbar",
|
|
4578
|
+
className: ["gloss-bottom-toolbar", s].filter(Boolean).join(" "),
|
|
4579
4579
|
style: l,
|
|
4580
4580
|
children: [
|
|
4581
4581
|
/* @__PURE__ */ r(
|
|
@@ -4611,23 +4611,23 @@ function Rr({
|
|
|
4611
4611
|
currentIndex: t,
|
|
4612
4612
|
onSelect: n,
|
|
4613
4613
|
"aria-label": a = "Sections",
|
|
4614
|
-
provisionalIndex:
|
|
4615
|
-
pulseIndex:
|
|
4614
|
+
provisionalIndex: s,
|
|
4615
|
+
pulseIndex: i,
|
|
4616
4616
|
pulseNonce: o,
|
|
4617
4617
|
currentSection: l,
|
|
4618
4618
|
sectionsPerView: m = 1,
|
|
4619
4619
|
// D-09 default
|
|
4620
|
-
isHiding:
|
|
4620
|
+
isHiding: d
|
|
4621
4621
|
}) {
|
|
4622
|
-
const u = l ?? t ?? 0, h = Math.max(0, Math.min(e - 1, u)),
|
|
4623
|
-
return w.current.length = e, !
|
|
4622
|
+
const u = l ?? t ?? 0, h = Math.max(0, Math.min(e - 1, u)), c = Math.min(e - 1, h + Math.max(0, m - 1)), p = [h, c], w = B.useRef([]);
|
|
4623
|
+
return w.current.length = e, !d && e <= 1 || !d && p[0] === 0 && p[1] === e - 1 ? null : /* @__PURE__ */ y(
|
|
4624
4624
|
"div",
|
|
4625
4625
|
{
|
|
4626
4626
|
role: "tablist",
|
|
4627
4627
|
"aria-label": a,
|
|
4628
4628
|
"data-testid": "gloss-section-dots",
|
|
4629
4629
|
className: "gloss-section-dots",
|
|
4630
|
-
"data-hiding":
|
|
4630
|
+
"data-hiding": d ? "true" : void 0,
|
|
4631
4631
|
onKeyDown: (f) => {
|
|
4632
4632
|
if (e !== 0) {
|
|
4633
4633
|
if (f.key === "ArrowRight") {
|
|
@@ -4656,14 +4656,14 @@ function Rr({
|
|
|
4656
4656
|
Array.from({ length: e }, (f, b) => /* @__PURE__ */ r(
|
|
4657
4657
|
"button",
|
|
4658
4658
|
{
|
|
4659
|
-
ref: (
|
|
4660
|
-
w.current[b] =
|
|
4659
|
+
ref: (x) => {
|
|
4660
|
+
w.current[b] = x;
|
|
4661
4661
|
},
|
|
4662
4662
|
type: "button",
|
|
4663
4663
|
role: "tab",
|
|
4664
4664
|
"aria-selected": b === u,
|
|
4665
|
-
"aria-label": b ===
|
|
4666
|
-
"data-state": b ===
|
|
4665
|
+
"aria-label": b === s ? "Unconfirmed section" : `Section ${b + 1}`,
|
|
4666
|
+
"data-state": b === s ? "provisional-hollow" : b === i ? "pulse" : b === u ? "current" : "hollow",
|
|
4667
4667
|
"data-section-index": b,
|
|
4668
4668
|
className: [
|
|
4669
4669
|
"gloss-section-dots__dot",
|
|
@@ -4671,14 +4671,14 @@ function Rr({
|
|
|
4671
4671
|
].filter(Boolean).join(" "),
|
|
4672
4672
|
onClick: () => n(b)
|
|
4673
4673
|
},
|
|
4674
|
-
b ===
|
|
4674
|
+
b === i ? `${b}-${o ?? 0}` : b
|
|
4675
4675
|
))
|
|
4676
4676
|
]
|
|
4677
4677
|
}
|
|
4678
4678
|
);
|
|
4679
4679
|
}
|
|
4680
4680
|
function Tr(e) {
|
|
4681
|
-
const { anchorRef: t, isOpen: n, onRequestClose: a, onPopoverEnter:
|
|
4681
|
+
const { anchorRef: t, isOpen: n, onRequestClose: a, onPopoverEnter: s, onPopoverLeave: i, children: o } = e, l = P(!0);
|
|
4682
4682
|
return A(() => (l.current = !0, () => {
|
|
4683
4683
|
l.current = !1;
|
|
4684
4684
|
}), []), n ? /* @__PURE__ */ r(
|
|
@@ -4696,8 +4696,8 @@ function Tr(e) {
|
|
|
4696
4696
|
className: "bell-popover__panel",
|
|
4697
4697
|
role: "dialog",
|
|
4698
4698
|
"aria-label": "Notifications preview",
|
|
4699
|
-
onMouseEnter:
|
|
4700
|
-
onMouseLeave:
|
|
4699
|
+
onMouseEnter: s,
|
|
4700
|
+
onMouseLeave: i,
|
|
4701
4701
|
children: [
|
|
4702
4702
|
/* @__PURE__ */ r("div", { className: "bell-popover__header", children: /* @__PURE__ */ r("h4", { className: "bell-popover__title", children: "Notifications" }) }),
|
|
4703
4703
|
/* @__PURE__ */ r("div", { className: "bell-popover__body", children: o ?? /* @__PURE__ */ r("em", { className: "bell-popover__placeholder", children: "No recent notifications" }) }),
|
|
@@ -4724,26 +4724,26 @@ function Mr(e) {
|
|
|
4724
4724
|
mode: t = null,
|
|
4725
4725
|
count: n,
|
|
4726
4726
|
anchorRef: a,
|
|
4727
|
-
subscribeToCoordinator:
|
|
4728
|
-
cardLabels:
|
|
4729
|
-
} = e, o = P(null), [l, m] = I({ cx: 0, cy: 0, r: 14 }),
|
|
4727
|
+
subscribeToCoordinator: s = !0,
|
|
4728
|
+
cardLabels: i
|
|
4729
|
+
} = e, o = P(null), [l, m] = I({ cx: 0, cy: 0, r: 14 }), d = it(), u = s ? d?.state?.lockHint ?? null : null, h = s ? d?.state?.bellCutoutOpen ?? !1 : !1, c = u != null ? "lock" : t ?? (h ? "default" : null), p = u?.activeCardId ?? null, w = p != null ? i?.[p] ?? p : "";
|
|
4730
4730
|
return Ie(() => {
|
|
4731
|
-
if (
|
|
4732
|
-
const
|
|
4733
|
-
if (!
|
|
4734
|
-
const
|
|
4735
|
-
const
|
|
4736
|
-
m({ cx:
|
|
4731
|
+
if (c == null) return;
|
|
4732
|
+
const k = o.current, f = a.current;
|
|
4733
|
+
if (!k || !f) return;
|
|
4734
|
+
const b = () => {
|
|
4735
|
+
const x = f.getBoundingClientRect(), C = k.getBoundingClientRect(), S = x.left + x.width / 2 - C.left, T = x.top + x.height / 2 - C.top, g = Math.max(x.width, x.height) / 2 + 4;
|
|
4736
|
+
m({ cx: S, cy: T, r: g });
|
|
4737
4737
|
};
|
|
4738
|
-
if (
|
|
4739
|
-
return window.addEventListener("resize",
|
|
4740
|
-
}, [
|
|
4738
|
+
if (b(), !(typeof window > "u"))
|
|
4739
|
+
return window.addEventListener("resize", b, { passive: !0 }), () => window.removeEventListener("resize", b);
|
|
4740
|
+
}, [c, a]), c == null ? null : /* @__PURE__ */ y(
|
|
4741
4741
|
"div",
|
|
4742
4742
|
{
|
|
4743
4743
|
ref: o,
|
|
4744
4744
|
className: "bell-cutout",
|
|
4745
|
-
"data-mode":
|
|
4746
|
-
"data-count":
|
|
4745
|
+
"data-mode": c,
|
|
4746
|
+
"data-count": c === "unread-count" && n != null ? String(n) : void 0,
|
|
4747
4747
|
"aria-hidden": "true",
|
|
4748
4748
|
children: [
|
|
4749
4749
|
/* @__PURE__ */ y("svg", { className: "bell-cutout__svg", width: "100%", height: "100%", preserveAspectRatio: "none", children: [
|
|
@@ -4754,19 +4754,19 @@ function Mr(e) {
|
|
|
4754
4754
|
/* @__PURE__ */ r("rect", { x: "0", y: "0", width: "100%", height: "100%", mask: "url(#bell-cutout-mask)", className: "bell-cutout__fill" })
|
|
4755
4755
|
] }),
|
|
4756
4756
|
/* @__PURE__ */ r("span", { className: "bell-cutout__dot", "aria-hidden": "true" }),
|
|
4757
|
-
|
|
4757
|
+
c === "lock" && u != null ? /* @__PURE__ */ r("span", { className: "bell-cutout__lock-text", role: "status", "aria-live": "polite", children: `Still editing "${w}" — Cancel or Apply first` }) : null
|
|
4758
4758
|
]
|
|
4759
4759
|
}
|
|
4760
4760
|
);
|
|
4761
4761
|
}
|
|
4762
4762
|
const ja = F.forwardRef(({ density: e = "compact", children: t, ...n }, a) => {
|
|
4763
|
-
const
|
|
4764
|
-
return delete
|
|
4763
|
+
const s = { ...n };
|
|
4764
|
+
return delete s.className, delete s.style, /* @__PURE__ */ r("div", { ref: a, className: "gloss-container-toolbar", role: "toolbar", ...s, children: /* @__PURE__ */ r(fe, { region: "toolbar", density: e, children: t }) });
|
|
4765
4765
|
});
|
|
4766
4766
|
ja.displayName = "ContainerToolbar";
|
|
4767
|
-
const Ua = F.forwardRef(({ legend: e, description: t, density: n = "default", children: a, ...
|
|
4768
|
-
const o = { ...
|
|
4769
|
-
return delete o.className, delete o.style, /* @__PURE__ */ y("fieldset", { ref:
|
|
4767
|
+
const Ua = F.forwardRef(({ legend: e, description: t, density: n = "default", children: a, ...s }, i) => {
|
|
4768
|
+
const o = { ...s };
|
|
4769
|
+
return delete o.className, delete o.style, /* @__PURE__ */ y("fieldset", { ref: i, className: "gloss-container-form-section", ...o, children: [
|
|
4770
4770
|
e && /* @__PURE__ */ r("legend", { className: "gloss-container-form-section__legend", children: e }),
|
|
4771
4771
|
t && /* @__PURE__ */ r("p", { className: "gloss-container-form-section__description", children: t }),
|
|
4772
4772
|
/* @__PURE__ */ r(fe, { region: "form-section", density: n, children: a })
|
|
@@ -4774,8 +4774,8 @@ const Ua = F.forwardRef(({ legend: e, description: t, density: n = "default", ch
|
|
|
4774
4774
|
});
|
|
4775
4775
|
Ua.displayName = "ContainerFormSection";
|
|
4776
4776
|
const Ya = F.forwardRef(({ density: e = "compact", children: t, ...n }, a) => {
|
|
4777
|
-
const
|
|
4778
|
-
return delete
|
|
4777
|
+
const s = { ...n };
|
|
4778
|
+
return delete s.className, delete s.style, /* @__PURE__ */ r("div", { ref: a, className: "gloss-container-table", ...s, children: /* @__PURE__ */ r(fe, { region: "table", density: e, children: t }) });
|
|
4779
4779
|
});
|
|
4780
4780
|
Ya.displayName = "ContainerTable";
|
|
4781
4781
|
export {
|