@mt-gloss/ui 0.1.149 → 0.1.151
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{COMMITS-eopq0SRK.js → COMMITS-BI1gFcrd.js} +40 -46
- package/{Expandable-D-GbTjIp.js → Expandable-KDhjReJP.js} +4523 -4610
- package/{TimeframeQuickBar-BexFJUgk.js → TimeframeQuickBar-I9Io0v7_.js} +228 -235
- package/catalog.js +84 -84
- package/composites-panels.js +3 -3
- package/index.js +1171 -1121
- package/lib/composites/dashboard/QuickConfigPanel/types.d.ts +2 -14
- package/lib/primitives/dashboard/MetricCard/resizePhysics.d.ts +6 -0
- package/lib/primitives/dashboard/MetricCardGrid/types.d.ts +21 -3
- package/lib/primitives/dashboard/gridMotionPrimitives.d.ts +7 -8
- package/lib/types/quickConfig.d.ts +21 -0
- package/lib/utils/animations.d.ts +3 -38
- package/package.json +2 -1
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useId as me, useMemo as
|
|
3
|
-
import { formatTrend as xe, isStatusModeEnabled as ye, pickMetricTier as be, getValueFontSize as Y,
|
|
1
|
+
import { jsxs as h, jsx as e, Fragment as K } from "react/jsx-runtime";
|
|
2
|
+
import { useId as me, useMemo as O, useState as ge, useRef as W, useCallback as C, useEffect as pe } from "react";
|
|
3
|
+
import { formatTrend as xe, isStatusModeEnabled as ye, pickMetricTier as be, getValueFontSize as Y, hexToRgba as q, formatValue as Q, getDateRangeForPreset as ve, formatDateRangeSmart as ke, ROLLING_OPTIONS as we, PERIOD_OPTIONS as Se } from "@mt-gloss/utils";
|
|
4
4
|
import { B as N, a as D, b as Ce } from "./BaseText-Dxbk1JJa.js";
|
|
5
|
-
import { Box as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
const
|
|
5
|
+
import { Box as B, Chip as X, Popper as Ie, Paper as ze, MenuList as Me, MenuItem as Re, ListItemText as Te, IconButton as Le, Tooltip as Ne, Divider as De } from "@mui/material";
|
|
6
|
+
import Be from "@mui/icons-material/ExpandMore";
|
|
7
|
+
import We from "@mui/icons-material/Star";
|
|
8
|
+
import Oe from "@mui/icons-material/StarBorder";
|
|
9
|
+
import _e from "@mui/icons-material/Check";
|
|
10
|
+
const Z = {
|
|
11
11
|
up: { color: "#10b981", bg: "rgba(16,185,129,0.07)" },
|
|
12
12
|
down: { color: "#ef4444", bg: "rgba(239,68,68,0.07)" },
|
|
13
13
|
flat: { color: "#6b7280", bg: "rgba(107,114,128,0.07)" }
|
|
14
|
-
},
|
|
14
|
+
}, J = {
|
|
15
15
|
up: "▲",
|
|
16
16
|
down: "▼",
|
|
17
17
|
flat: "▶"
|
|
18
|
-
}, j = function({ value:
|
|
19
|
-
if (
|
|
20
|
-
const { text:
|
|
21
|
-
return /* @__PURE__ */
|
|
18
|
+
}, j = function({ value: o, direction: t }) {
|
|
19
|
+
if (o == null) return null;
|
|
20
|
+
const { text: d, direction: f } = xe(o), l = t || f, { color: r, bg: s } = Z[l] || Z.flat, n = J[l] || J.flat;
|
|
21
|
+
return /* @__PURE__ */ h(
|
|
22
22
|
"span",
|
|
23
23
|
{
|
|
24
24
|
style: {
|
|
@@ -31,27 +31,27 @@ const Q = {
|
|
|
31
31
|
fontWeight: 600,
|
|
32
32
|
lineHeight: 1,
|
|
33
33
|
color: r,
|
|
34
|
-
backgroundColor:
|
|
34
|
+
backgroundColor: s,
|
|
35
35
|
whiteSpace: "nowrap"
|
|
36
36
|
},
|
|
37
37
|
children: [
|
|
38
|
-
/* @__PURE__ */ e("span", { style: { fontSize: 8, lineHeight: 1 }, children:
|
|
39
|
-
|
|
38
|
+
/* @__PURE__ */ e("span", { style: { fontSize: 8, lineHeight: 1 }, children: n }),
|
|
39
|
+
d
|
|
40
40
|
]
|
|
41
41
|
}
|
|
42
42
|
);
|
|
43
43
|
};
|
|
44
44
|
j.displayName = "TrendIndicator";
|
|
45
|
-
const
|
|
46
|
-
const f = "sparkbg-" + me().replace(/:/g, ""),
|
|
45
|
+
const A = ({ data: i, color: o, isStale: t }) => {
|
|
46
|
+
const f = "sparkbg-" + me().replace(/:/g, ""), l = o || "#4f46e5", r = O(() => {
|
|
47
47
|
if (!i || i.length < 2) return null;
|
|
48
|
-
const
|
|
49
|
-
x: S / (i.length - 1) *
|
|
50
|
-
y:
|
|
51
|
-
})).map((y, S) => `${S === 0 ? "M" : "L"}${y.x},${y.y}`).join(" "), w = `${p} L${
|
|
52
|
-
return { line: p, area: w, w:
|
|
48
|
+
const s = 300, n = 55, a = 2, c = Math.min(...i), m = Math.max(...i) - c || 1, p = i.map((y, S) => ({
|
|
49
|
+
x: S / (i.length - 1) * s,
|
|
50
|
+
y: a + (1 - (y - c) / m) * (n - a * 2)
|
|
51
|
+
})).map((y, S) => `${S === 0 ? "M" : "L"}${y.x},${y.y}`).join(" "), w = `${p} L${s},${n} L0,${n}Z`;
|
|
52
|
+
return { line: p, area: w, w: s, h: n };
|
|
53
53
|
}, [i]);
|
|
54
|
-
return r ? /* @__PURE__ */
|
|
54
|
+
return r ? /* @__PURE__ */ h(
|
|
55
55
|
"svg",
|
|
56
56
|
{
|
|
57
57
|
height: 55,
|
|
@@ -81,9 +81,9 @@ const H = ({ data: i, color: n, isStale: t }) => {
|
|
|
81
81
|
transition: t ? "transform 400ms ease-out" : "transform 500ms ease-in-out"
|
|
82
82
|
},
|
|
83
83
|
children: [
|
|
84
|
-
/* @__PURE__ */ e("defs", { children: /* @__PURE__ */
|
|
85
|
-
/* @__PURE__ */ e("stop", { offset: "0%", stopColor:
|
|
86
|
-
/* @__PURE__ */ e("stop", { offset: "100%", stopColor:
|
|
84
|
+
/* @__PURE__ */ e("defs", { children: /* @__PURE__ */ h("linearGradient", { id: f, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
85
|
+
/* @__PURE__ */ e("stop", { offset: "0%", stopColor: l, stopOpacity: "0.09" }),
|
|
86
|
+
/* @__PURE__ */ e("stop", { offset: "100%", stopColor: l, stopOpacity: "0.01" })
|
|
87
87
|
] }) }),
|
|
88
88
|
/* @__PURE__ */ e("path", { d: r.area, fill: `url(#${f})` }),
|
|
89
89
|
/* @__PURE__ */ e(
|
|
@@ -91,7 +91,7 @@ const H = ({ data: i, color: n, isStale: t }) => {
|
|
|
91
91
|
{
|
|
92
92
|
d: r.line,
|
|
93
93
|
fill: "none",
|
|
94
|
-
stroke:
|
|
94
|
+
stroke: l,
|
|
95
95
|
strokeOpacity: "0.22",
|
|
96
96
|
strokeWidth: "1.5",
|
|
97
97
|
strokeLinecap: "round",
|
|
@@ -102,19 +102,19 @@ const H = ({ data: i, color: n, isStale: t }) => {
|
|
|
102
102
|
}
|
|
103
103
|
) : null;
|
|
104
104
|
};
|
|
105
|
-
|
|
106
|
-
const ee = ({ data: i, color:
|
|
107
|
-
const
|
|
105
|
+
A.displayName = "SparklineBg";
|
|
106
|
+
const ee = ({ data: i, color: o, isStale: t }) => {
|
|
107
|
+
const d = o || "#4f46e5", f = O(() => {
|
|
108
108
|
if (!i || i.length < 1) return null;
|
|
109
|
-
const
|
|
109
|
+
const l = 300, r = 50, s = r * 0.82, n = i.length, a = l / (n * 4), c = a * 3, m = Math.max(...i) || 1;
|
|
110
110
|
return i.map((x, p) => {
|
|
111
|
-
const w = x / m, y = Math.max(w *
|
|
111
|
+
const w = x / m, y = Math.max(w * s, 2);
|
|
112
112
|
return {
|
|
113
|
-
x: p * (
|
|
113
|
+
x: p * (c + a),
|
|
114
114
|
y: r - y,
|
|
115
|
-
width:
|
|
115
|
+
width: c,
|
|
116
116
|
height: y,
|
|
117
|
-
isLast: p ===
|
|
117
|
+
isLast: p === n - 1
|
|
118
118
|
};
|
|
119
119
|
});
|
|
120
120
|
}, [i]);
|
|
@@ -137,15 +137,15 @@ const ee = ({ data: i, color: n, isStale: t }) => {
|
|
|
137
137
|
transformOrigin: "bottom",
|
|
138
138
|
transition: t ? "transform 400ms ease-out" : "transform 500ms ease-in-out"
|
|
139
139
|
},
|
|
140
|
-
children: f.map((
|
|
140
|
+
children: f.map((l, r) => /* @__PURE__ */ e(
|
|
141
141
|
"rect",
|
|
142
142
|
{
|
|
143
|
-
x:
|
|
144
|
-
y:
|
|
145
|
-
width:
|
|
146
|
-
height:
|
|
147
|
-
fill:
|
|
148
|
-
fillOpacity:
|
|
143
|
+
x: l.x,
|
|
144
|
+
y: l.y,
|
|
145
|
+
width: l.width,
|
|
146
|
+
height: l.height,
|
|
147
|
+
fill: d,
|
|
148
|
+
fillOpacity: l.isLast ? 0.14 : 0.06,
|
|
149
149
|
rx: "2.5"
|
|
150
150
|
},
|
|
151
151
|
r
|
|
@@ -154,22 +154,22 @@ const ee = ({ data: i, color: n, isStale: t }) => {
|
|
|
154
154
|
) : null;
|
|
155
155
|
};
|
|
156
156
|
ee.displayName = "BarsBg";
|
|
157
|
-
const te = ({ value: i = 0, max:
|
|
158
|
-
const
|
|
159
|
-
return /* @__PURE__ */
|
|
157
|
+
const te = ({ value: i = 0, max: o = 100, color: t = "#4f46e5", colSpan: d = 1, isStale: f }) => {
|
|
158
|
+
const l = d >= 2 ? 40 : 34, r = 3.5, s = (l - r) / 2, n = 2 * Math.PI * s, a = f ? 0 : Math.min(Math.max(i / (o || 1), 0), 1), c = n * (1 - a);
|
|
159
|
+
return /* @__PURE__ */ h(
|
|
160
160
|
"svg",
|
|
161
161
|
{
|
|
162
|
-
width:
|
|
163
|
-
height:
|
|
164
|
-
viewBox: `0 0 ${
|
|
162
|
+
width: l,
|
|
163
|
+
height: l,
|
|
164
|
+
viewBox: `0 0 ${l} ${l}`,
|
|
165
165
|
style: { flexShrink: 0, marginRight: 8, display: "block" },
|
|
166
166
|
children: [
|
|
167
167
|
/* @__PURE__ */ e(
|
|
168
168
|
"circle",
|
|
169
169
|
{
|
|
170
|
-
cx:
|
|
171
|
-
cy:
|
|
172
|
-
r:
|
|
170
|
+
cx: l / 2,
|
|
171
|
+
cy: l / 2,
|
|
172
|
+
r: s,
|
|
173
173
|
fill: "none",
|
|
174
174
|
stroke: t,
|
|
175
175
|
strokeOpacity: "0.06",
|
|
@@ -179,16 +179,16 @@ const te = ({ value: i = 0, max: n = 100, color: t = "#4f46e5", colSpan: a = 1,
|
|
|
179
179
|
/* @__PURE__ */ e(
|
|
180
180
|
"circle",
|
|
181
181
|
{
|
|
182
|
-
cx:
|
|
183
|
-
cy:
|
|
184
|
-
r:
|
|
182
|
+
cx: l / 2,
|
|
183
|
+
cy: l / 2,
|
|
184
|
+
r: s,
|
|
185
185
|
fill: "none",
|
|
186
186
|
stroke: t,
|
|
187
187
|
strokeWidth: r,
|
|
188
|
-
strokeDasharray:
|
|
189
|
-
strokeDashoffset:
|
|
188
|
+
strokeDasharray: n,
|
|
189
|
+
strokeDashoffset: c,
|
|
190
190
|
strokeLinecap: "round",
|
|
191
|
-
transform: `rotate(-90 ${
|
|
191
|
+
transform: `rotate(-90 ${l / 2} ${l / 2})`,
|
|
192
192
|
style: { transition: "stroke-dashoffset 0.4s ease" }
|
|
193
193
|
}
|
|
194
194
|
)
|
|
@@ -197,9 +197,9 @@ const te = ({ value: i = 0, max: n = 100, color: t = "#4f46e5", colSpan: a = 1,
|
|
|
197
197
|
);
|
|
198
198
|
};
|
|
199
199
|
te.displayName = "DonutChart";
|
|
200
|
-
const re = ({ value: i = 0, max:
|
|
201
|
-
const r = f >= 2 ? 44 : 36,
|
|
202
|
-
return /* @__PURE__ */
|
|
200
|
+
const re = ({ value: i = 0, max: o = 100, trendValue: t = 0, color: d = "#6b7280", colSpan: f = 1, isStale: l }) => {
|
|
201
|
+
const r = f >= 2 ? 44 : 36, s = 3.5, n = (r - s) / 2, a = 2 * Math.PI * n, c = l ? 0 : Math.min(Math.max(i / (o || 1), 0), 1), u = a * (1 - c), m = f >= 2 ? 11 : 9, x = `${Math.round(Math.abs(t))}%`;
|
|
202
|
+
return /* @__PURE__ */ h(
|
|
203
203
|
"div",
|
|
204
204
|
{
|
|
205
205
|
style: {
|
|
@@ -213,7 +213,7 @@ const re = ({ value: i = 0, max: n = 100, trendValue: t = 0, color: a = "#6b7280
|
|
|
213
213
|
marginRight: 8
|
|
214
214
|
},
|
|
215
215
|
children: [
|
|
216
|
-
/* @__PURE__ */
|
|
216
|
+
/* @__PURE__ */ h(
|
|
217
217
|
"svg",
|
|
218
218
|
{
|
|
219
219
|
width: r,
|
|
@@ -226,11 +226,11 @@ const re = ({ value: i = 0, max: n = 100, trendValue: t = 0, color: a = "#6b7280
|
|
|
226
226
|
{
|
|
227
227
|
cx: r / 2,
|
|
228
228
|
cy: r / 2,
|
|
229
|
-
r:
|
|
229
|
+
r: n,
|
|
230
230
|
fill: "none",
|
|
231
|
-
stroke:
|
|
231
|
+
stroke: d,
|
|
232
232
|
strokeOpacity: "0.06",
|
|
233
|
-
strokeWidth:
|
|
233
|
+
strokeWidth: s
|
|
234
234
|
}
|
|
235
235
|
),
|
|
236
236
|
/* @__PURE__ */ e(
|
|
@@ -238,12 +238,12 @@ const re = ({ value: i = 0, max: n = 100, trendValue: t = 0, color: a = "#6b7280
|
|
|
238
238
|
{
|
|
239
239
|
cx: r / 2,
|
|
240
240
|
cy: r / 2,
|
|
241
|
-
r:
|
|
241
|
+
r: n,
|
|
242
242
|
fill: "none",
|
|
243
|
-
stroke:
|
|
244
|
-
strokeWidth:
|
|
245
|
-
strokeDasharray:
|
|
246
|
-
strokeDashoffset:
|
|
243
|
+
stroke: d,
|
|
244
|
+
strokeWidth: s,
|
|
245
|
+
strokeDasharray: a,
|
|
246
|
+
strokeDashoffset: u,
|
|
247
247
|
strokeLinecap: "round",
|
|
248
248
|
transform: `rotate(-90 ${r / 2} ${r / 2})`,
|
|
249
249
|
style: { transition: "stroke-dashoffset 0.4s ease" }
|
|
@@ -263,7 +263,7 @@ const re = ({ value: i = 0, max: n = 100, trendValue: t = 0, color: a = "#6b7280
|
|
|
263
263
|
justifyContent: "center",
|
|
264
264
|
fontSize: m,
|
|
265
265
|
fontWeight: 700,
|
|
266
|
-
color:
|
|
266
|
+
color: d,
|
|
267
267
|
lineHeight: 1,
|
|
268
268
|
pointerEvents: "none"
|
|
269
269
|
},
|
|
@@ -275,73 +275,73 @@ const re = ({ value: i = 0, max: n = 100, trendValue: t = 0, color: a = "#6b7280
|
|
|
275
275
|
);
|
|
276
276
|
};
|
|
277
277
|
re.displayName = "ObjectArrow";
|
|
278
|
-
const
|
|
279
|
-
function Ee(i,
|
|
280
|
-
const t =
|
|
281
|
-
const
|
|
282
|
-
if (
|
|
283
|
-
const
|
|
284
|
-
|
|
278
|
+
const $e = { slot3: 200, slot5: 380 };
|
|
279
|
+
function Ee(i, o) {
|
|
280
|
+
const t = $e, d = 150, [f, l] = ge(1), r = W(null), s = W(null), n = C(() => {
|
|
281
|
+
const c = r.current;
|
|
282
|
+
if (c == null) return;
|
|
283
|
+
const u = c < t.slot3 ? 1 : c < t.slot5 ? 3 : 5;
|
|
284
|
+
l((m) => m === u ? m : u), r.current = null, s.current && (clearTimeout(s.current), s.current = null);
|
|
285
285
|
}, [t.slot3, t.slot5]);
|
|
286
286
|
pe(() => {
|
|
287
|
-
const
|
|
288
|
-
if (!
|
|
289
|
-
const
|
|
287
|
+
const c = i.current;
|
|
288
|
+
if (!c || typeof ResizeObserver > "u") return;
|
|
289
|
+
const u = new ResizeObserver((m) => {
|
|
290
290
|
const x = m[0]?.contentRect.width ?? 0;
|
|
291
|
-
r.current = x,
|
|
291
|
+
r.current = x, s.current && clearTimeout(s.current), s.current = setTimeout(n, d);
|
|
292
292
|
});
|
|
293
|
-
return
|
|
294
|
-
|
|
293
|
+
return u.observe(c), () => {
|
|
294
|
+
u.disconnect(), s.current && clearTimeout(s.current);
|
|
295
295
|
};
|
|
296
|
-
}, [i,
|
|
297
|
-
const
|
|
298
|
-
|
|
299
|
-
}, [
|
|
300
|
-
return { capacity: f, onPointerUp:
|
|
296
|
+
}, [i, n, d]);
|
|
297
|
+
const a = C(() => {
|
|
298
|
+
n();
|
|
299
|
+
}, [n]);
|
|
300
|
+
return { capacity: f, onPointerUp: a };
|
|
301
301
|
}
|
|
302
302
|
function ie(i) {
|
|
303
|
-
const { onStatusSlotClick:
|
|
304
|
-
if (!
|
|
305
|
-
const
|
|
306
|
-
return /* @__PURE__ */
|
|
303
|
+
const { onStatusSlotClick: o } = i, t = W(null), d = ye(), { capacity: f, onPointerUp: l } = Ee(t), r = i.maxSlots ?? f, s = i.statuses.slice(0, r);
|
|
304
|
+
if (!d) {
|
|
305
|
+
const n = i.statuses[0];
|
|
306
|
+
return /* @__PURE__ */ h(
|
|
307
307
|
N,
|
|
308
308
|
{
|
|
309
309
|
definition: { display: "flex", direction: "column" },
|
|
310
310
|
className: "gloss-status-card gloss-status-card--flag-off",
|
|
311
311
|
children: [
|
|
312
312
|
/* @__PURE__ */ e(D, { className: "gloss-metric-card__label", children: i.label }),
|
|
313
|
-
|
|
313
|
+
n != null ? /* @__PURE__ */ e(D, { children: String(n.value) }) : null
|
|
314
314
|
]
|
|
315
315
|
}
|
|
316
316
|
);
|
|
317
317
|
}
|
|
318
|
-
return /* @__PURE__ */
|
|
318
|
+
return /* @__PURE__ */ h(
|
|
319
319
|
"div",
|
|
320
320
|
{
|
|
321
321
|
ref: t,
|
|
322
322
|
className: "gloss-status-card",
|
|
323
323
|
"data-status-mode": "on",
|
|
324
324
|
"data-status-capacity": r,
|
|
325
|
-
onPointerUp:
|
|
325
|
+
onPointerUp: l,
|
|
326
326
|
children: [
|
|
327
327
|
/* @__PURE__ */ e(D, { className: "gloss-metric-card__label", children: i.label }),
|
|
328
|
-
/* @__PURE__ */ e("div", { className: "gloss-status-slots", "data-status-slot-count":
|
|
329
|
-
const
|
|
330
|
-
return /* @__PURE__ */
|
|
328
|
+
/* @__PURE__ */ e("div", { className: "gloss-status-slots", "data-status-slot-count": s.length, children: s.map((n, a) => {
|
|
329
|
+
const c = i.sparklinePerStatus?.[n.id], u = n.id === i.activeStatusId;
|
|
330
|
+
return /* @__PURE__ */ h(
|
|
331
331
|
"div",
|
|
332
332
|
{
|
|
333
|
-
className: `gloss-status-slots__slot${
|
|
334
|
-
"data-status-slot-id":
|
|
335
|
-
"data-status-slot-index":
|
|
336
|
-
onClick:
|
|
337
|
-
style:
|
|
333
|
+
className: `gloss-status-slots__slot${u ? " gloss-status-slots__slot--active" : ""}`,
|
|
334
|
+
"data-status-slot-id": n.id,
|
|
335
|
+
"data-status-slot-index": a,
|
|
336
|
+
onClick: o ? (m) => o(n.id, m.currentTarget) : void 0,
|
|
337
|
+
style: o ? { cursor: "pointer" } : void 0,
|
|
338
338
|
children: [
|
|
339
|
-
/* @__PURE__ */ e("span", { className: "gloss-metric-card__label", children:
|
|
340
|
-
/* @__PURE__ */ e("span", { children: String(
|
|
341
|
-
|
|
339
|
+
/* @__PURE__ */ e("span", { className: "gloss-metric-card__label", children: n.label }),
|
|
340
|
+
/* @__PURE__ */ e("span", { children: String(n.value) }),
|
|
341
|
+
c != null && c.length > 0 ? /* @__PURE__ */ e(A, { data: [...c], color: n.accentColor }) : null
|
|
342
342
|
]
|
|
343
343
|
},
|
|
344
|
-
|
|
344
|
+
n.id
|
|
345
345
|
);
|
|
346
346
|
}) })
|
|
347
347
|
]
|
|
@@ -349,24 +349,17 @@ function ie(i) {
|
|
|
349
349
|
);
|
|
350
350
|
}
|
|
351
351
|
ie.displayName = "StatusModeCard";
|
|
352
|
-
function je(i,
|
|
353
|
-
if (!
|
|
354
|
-
if (i == null) return
|
|
355
|
-
const { operator: t, threshold:
|
|
356
|
-
return (t === "lt" ? i <
|
|
357
|
-
}
|
|
358
|
-
function J(i, n) {
|
|
359
|
-
const t = i.replace("#", "");
|
|
360
|
-
if (!/^[0-9a-fA-F]{6}$/.test(t))
|
|
361
|
-
return `rgba(0,0,0,${n})`;
|
|
362
|
-
const a = parseInt(t.substring(0, 2), 16), f = parseInt(t.substring(2, 4), 16), s = parseInt(t.substring(4, 6), 16);
|
|
363
|
-
return `rgba(${a},${f},${s},${n})`;
|
|
352
|
+
function je(i, o) {
|
|
353
|
+
if (!o) return;
|
|
354
|
+
if (i == null) return o.fallback;
|
|
355
|
+
const { operator: t, threshold: d, result: f, fallback: l } = o;
|
|
356
|
+
return (t === "lt" ? i < d : t === "gt" ? i > d : t === "eq" ? Math.abs(i - d) < 1e-9 : t === "gte" ? i >= d : t === "lte" ? i <= d : !1) ? f : l;
|
|
364
357
|
}
|
|
365
358
|
const E = {
|
|
366
359
|
up: "var(--color-positive)",
|
|
367
360
|
down: "var(--color-negative)",
|
|
368
361
|
flat: "var(--color-text-secondary)"
|
|
369
|
-
},
|
|
362
|
+
}, He = {
|
|
370
363
|
positive: "#10b981",
|
|
371
364
|
// Used with hexToRgba() for tinted overlays -- must stay hex
|
|
372
365
|
negative: "#ef4444",
|
|
@@ -375,7 +368,7 @@ const E = {
|
|
|
375
368
|
// Used with hexToRgba() for tinted overlays -- must stay hex
|
|
376
369
|
neutral: "#6b7280"
|
|
377
370
|
// Used with hexToRgba() for tinted overlays -- must stay hex
|
|
378
|
-
},
|
|
371
|
+
}, Ae = () => /* @__PURE__ */ h(
|
|
379
372
|
"svg",
|
|
380
373
|
{
|
|
381
374
|
"aria-label": "Warning threshold breached",
|
|
@@ -401,7 +394,7 @@ const E = {
|
|
|
401
394
|
/* @__PURE__ */ e("circle", { cx: "7", cy: "10.5", r: "0.7", fill: "currentColor" })
|
|
402
395
|
]
|
|
403
396
|
}
|
|
404
|
-
), Fe = () => /* @__PURE__ */
|
|
397
|
+
), Fe = () => /* @__PURE__ */ h(
|
|
405
398
|
"svg",
|
|
406
399
|
{
|
|
407
400
|
"aria-label": "Critical threshold breached",
|
|
@@ -417,36 +410,36 @@ const E = {
|
|
|
417
410
|
/* @__PURE__ */ e("circle", { cx: "7", cy: "10", r: "0.7", fill: "currentColor" })
|
|
418
411
|
]
|
|
419
412
|
}
|
|
420
|
-
), Pe = function(
|
|
413
|
+
), Pe = function(o) {
|
|
421
414
|
const {
|
|
422
415
|
variant: t = "standard",
|
|
423
|
-
label:
|
|
416
|
+
label: d,
|
|
424
417
|
labelAdornment: f,
|
|
425
|
-
value:
|
|
418
|
+
value: l,
|
|
426
419
|
valueFormat: r,
|
|
427
|
-
trend:
|
|
428
|
-
subtitle:
|
|
429
|
-
colSpan:
|
|
430
|
-
isStale:
|
|
431
|
-
thresholdBreach:
|
|
432
|
-
} =
|
|
433
|
-
typeof
|
|
434
|
-
|
|
435
|
-
) : void 0) ?? x, k = (b ?
|
|
436
|
-
() => t === "status-mode" ? { formatted: "", tier: 0, length: 0 } : be(
|
|
420
|
+
trend: s,
|
|
421
|
+
subtitle: n,
|
|
422
|
+
colSpan: a = 1,
|
|
423
|
+
isStale: c,
|
|
424
|
+
thresholdBreach: u = "none"
|
|
425
|
+
} = o, m = t === "sparkline" || t === "bars" || t === "donut" ? o.accentColor ?? "#4f46e5" : "#4f46e5", x = t === "highlight" ? o.highlightColor : void 0, p = t === "sparkline" ? o.sparklineData : void 0, w = t === "bars" ? o.barData : void 0, y = t === "donut" ? o.donutValue : 0, S = t === "donut" ? o.donutMax ?? 100 : 100, T = t === "object-arrow" ? o.objectArrowValue : 0, _ = t === "object-arrow" ? o.objectArrowMax : 100, $ = t === "arrow" ? o.arrowDirection : void 0, I = t === "versus" ? o.versusData : void 0, z = t === "segmented" ? o.segments : void 0, b = (t === "highlight" && o.tintCondition ? je(
|
|
426
|
+
typeof o.value == "number" ? o.value : null,
|
|
427
|
+
o.tintCondition
|
|
428
|
+
) : void 0) ?? x, k = (b ? He[b] : void 0) || b, { formatted: L, tier: ne, length: oe } = O(
|
|
429
|
+
() => t === "status-mode" ? { formatted: "", tier: 0, length: 0 } : be(l, {
|
|
437
430
|
prefix: r?.prefix || "",
|
|
438
431
|
suffix: r?.suffix || "",
|
|
439
432
|
abbreviated: r?.abbreviated
|
|
440
|
-
},
|
|
441
|
-
[t,
|
|
433
|
+
}, a),
|
|
434
|
+
[t, l, r?.prefix, r?.suffix, r?.abbreviated, a]
|
|
442
435
|
);
|
|
443
|
-
if (
|
|
444
|
-
return /* @__PURE__ */ e(ie, { ...
|
|
445
|
-
const R = { display: L, full: L, length: oe },
|
|
436
|
+
if (o.variant === "status-mode")
|
|
437
|
+
return /* @__PURE__ */ e(ie, { ...o });
|
|
438
|
+
const R = { display: L, full: L, length: oe }, le = Y(R.length, a), se = s?.direction && E[s.direction] || E.flat, F = c ? "gloss-metric-data-stale" : "gloss-metric-data-fresh", P = {
|
|
446
439
|
fontWeight: 700,
|
|
447
440
|
letterSpacing: "-0.03em",
|
|
448
441
|
color: t === "highlight" ? k : "rgba(0,0,0,0.87)",
|
|
449
|
-
fontSize:
|
|
442
|
+
fontSize: le,
|
|
450
443
|
lineHeight: 1.1,
|
|
451
444
|
whiteSpace: "nowrap",
|
|
452
445
|
overflow: "hidden"
|
|
@@ -458,7 +451,7 @@ const E = {
|
|
|
458
451
|
whiteSpace: "nowrap",
|
|
459
452
|
flex: 1,
|
|
460
453
|
minWidth: 0
|
|
461
|
-
}, G = t === "sparkline" || t === "bars", ae = G &&
|
|
454
|
+
}, G = t === "sparkline" || t === "bars", ae = G && n ? {
|
|
462
455
|
...V,
|
|
463
456
|
backgroundColor: "rgba(255,255,255,0.78)",
|
|
464
457
|
backdropFilter: "blur(4px)",
|
|
@@ -469,7 +462,7 @@ const E = {
|
|
|
469
462
|
flex: "none",
|
|
470
463
|
minWidth: void 0
|
|
471
464
|
} : V, ce = () => {
|
|
472
|
-
const v =
|
|
465
|
+
const v = $ === "down" ? "▼" : "▲";
|
|
473
466
|
return /* @__PURE__ */ e(
|
|
474
467
|
"div",
|
|
475
468
|
{
|
|
@@ -490,17 +483,17 @@ const E = {
|
|
|
490
483
|
);
|
|
491
484
|
}, de = () => {
|
|
492
485
|
if (!I) return null;
|
|
493
|
-
const v =
|
|
486
|
+
const v = Q(I.current, {
|
|
494
487
|
prefix: r?.prefix || "",
|
|
495
488
|
suffix: r?.suffix || "",
|
|
496
489
|
abbreviated: r?.abbreviated
|
|
497
|
-
}), M =
|
|
490
|
+
}), M = Q(I.prior, {
|
|
498
491
|
prefix: r?.prefix || "",
|
|
499
492
|
suffix: r?.suffix || "",
|
|
500
493
|
abbreviated: r?.abbreviated
|
|
501
|
-
}), U = Y(v.length,
|
|
502
|
-
return /* @__PURE__ */
|
|
503
|
-
/* @__PURE__ */
|
|
494
|
+
}), U = Y(v.length, a), ue = Math.max(U - 4, 14);
|
|
495
|
+
return /* @__PURE__ */ h("div", { style: { display: "flex", alignItems: "center", gap: 12, flex: 1 }, children: [
|
|
496
|
+
/* @__PURE__ */ h("div", { style: { display: "flex", flexDirection: "column" }, children: [
|
|
504
497
|
/* @__PURE__ */ e(
|
|
505
498
|
"span",
|
|
506
499
|
{
|
|
@@ -524,13 +517,13 @@ const E = {
|
|
|
524
517
|
style: { flexShrink: 0 }
|
|
525
518
|
}
|
|
526
519
|
),
|
|
527
|
-
/* @__PURE__ */
|
|
520
|
+
/* @__PURE__ */ h("div", { style: { display: "flex", flexDirection: "column" }, children: [
|
|
528
521
|
/* @__PURE__ */ e(
|
|
529
522
|
"span",
|
|
530
523
|
{
|
|
531
524
|
style: {
|
|
532
525
|
fontWeight: 700,
|
|
533
|
-
fontSize:
|
|
526
|
+
fontSize: ue,
|
|
534
527
|
letterSpacing: "-0.03em",
|
|
535
528
|
color: "rgba(0,0,0,0.5)",
|
|
536
529
|
lineHeight: 1.1
|
|
@@ -542,7 +535,7 @@ const E = {
|
|
|
542
535
|
/* @__PURE__ */ e("span", { style: { fontSize: 10, color: "rgba(0,0,0,0.35)", marginTop: 2 }, children: I.priorLabel })
|
|
543
536
|
] })
|
|
544
537
|
] });
|
|
545
|
-
}, fe = () => !z || z.length === 0 ? null : /* @__PURE__ */
|
|
538
|
+
}, fe = () => !z || z.length === 0 ? null : /* @__PURE__ */ h("div", { style: { zIndex: 2, position: "relative" }, children: [
|
|
546
539
|
/* @__PURE__ */ e(
|
|
547
540
|
"div",
|
|
548
541
|
{
|
|
@@ -575,7 +568,7 @@ const E = {
|
|
|
575
568
|
flexWrap: "wrap",
|
|
576
569
|
marginTop: 4
|
|
577
570
|
},
|
|
578
|
-
children: z.map((v, M) => /* @__PURE__ */
|
|
571
|
+
children: z.map((v, M) => /* @__PURE__ */ h(
|
|
579
572
|
"div",
|
|
580
573
|
{
|
|
581
574
|
style: {
|
|
@@ -603,16 +596,16 @@ const E = {
|
|
|
603
596
|
))
|
|
604
597
|
}
|
|
605
598
|
)
|
|
606
|
-
] }),
|
|
599
|
+
] }), he = [
|
|
607
600
|
"gloss-threshold-overlay",
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
601
|
+
u === "warn" ? "gloss-threshold-warn" : "",
|
|
602
|
+
u === "critical" ? "gloss-threshold-critical" : "",
|
|
603
|
+
u === "critical" ? "gloss-threshold-pulse" : ""
|
|
611
604
|
].filter(Boolean).join(" ");
|
|
612
|
-
return /* @__PURE__ */
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
605
|
+
return /* @__PURE__ */ h(K, { children: [
|
|
606
|
+
u !== "none" && /* @__PURE__ */ e("div", { className: he }),
|
|
607
|
+
u === "warn" && /* @__PURE__ */ e("span", { className: "gloss-threshold-icon gloss-threshold-icon--warn", children: /* @__PURE__ */ e(Ae, {}) }),
|
|
608
|
+
u === "critical" && /* @__PURE__ */ e("span", { className: "gloss-threshold-icon gloss-threshold-icon--critical", children: /* @__PURE__ */ e(Fe, {}) }),
|
|
616
609
|
t === "highlight" && k && /* @__PURE__ */ e(
|
|
617
610
|
"div",
|
|
618
611
|
{
|
|
@@ -620,44 +613,44 @@ const E = {
|
|
|
620
613
|
position: "absolute",
|
|
621
614
|
inset: 0,
|
|
622
615
|
borderRadius: 10,
|
|
623
|
-
backgroundColor:
|
|
624
|
-
border: `1px solid ${
|
|
616
|
+
backgroundColor: q(k, 0.06),
|
|
617
|
+
border: `1px solid ${q(k, 0.15)}`,
|
|
625
618
|
zIndex: 0,
|
|
626
619
|
pointerEvents: "none"
|
|
627
620
|
}
|
|
628
621
|
}
|
|
629
622
|
),
|
|
630
|
-
t === "sparkline" && /* @__PURE__ */ e(
|
|
631
|
-
t === "bars" && /* @__PURE__ */ e(ee, { data: w, color: m, isStale:
|
|
632
|
-
/* @__PURE__ */
|
|
623
|
+
t === "sparkline" && /* @__PURE__ */ e(A, { data: p, color: m, isStale: c }),
|
|
624
|
+
t === "bars" && /* @__PURE__ */ e(ee, { data: w, color: m, isStale: c }),
|
|
625
|
+
/* @__PURE__ */ h(
|
|
633
626
|
N,
|
|
634
627
|
{
|
|
635
628
|
className: "gloss-metric-card__zone-a",
|
|
636
629
|
"data-tier": ne,
|
|
637
630
|
style: { height: 28, flexShrink: 0, zIndex: 2, position: "relative", display: "flex", alignItems: "center" },
|
|
638
631
|
children: [
|
|
639
|
-
/* @__PURE__ */ e(D, { className: "gloss-metric-card__label", children:
|
|
632
|
+
/* @__PURE__ */ e(D, { className: "gloss-metric-card__label", children: d }),
|
|
640
633
|
f
|
|
641
634
|
]
|
|
642
635
|
}
|
|
643
636
|
),
|
|
644
|
-
/* @__PURE__ */
|
|
637
|
+
/* @__PURE__ */ h(
|
|
645
638
|
N,
|
|
646
639
|
{
|
|
647
640
|
definition: { display: "flex", align: "center" },
|
|
648
641
|
className: `gloss-metric-card__zone-b ${F}`,
|
|
649
642
|
style: { flex: 1, zIndex: 2, position: "relative", minHeight: 0 },
|
|
650
643
|
children: [
|
|
651
|
-
t === "donut" && /* @__PURE__ */ e(te, { value: y, max: S, color: m, colSpan:
|
|
644
|
+
t === "donut" && /* @__PURE__ */ e(te, { value: y, max: S, color: m, colSpan: a, isStale: c }),
|
|
652
645
|
t === "object-arrow" && /* @__PURE__ */ e(
|
|
653
646
|
re,
|
|
654
647
|
{
|
|
655
648
|
value: T,
|
|
656
|
-
max:
|
|
657
|
-
trendValue:
|
|
658
|
-
color:
|
|
659
|
-
colSpan:
|
|
660
|
-
isStale:
|
|
649
|
+
max: _,
|
|
650
|
+
trendValue: s?.value,
|
|
651
|
+
color: se,
|
|
652
|
+
colSpan: a,
|
|
653
|
+
isStale: c
|
|
661
654
|
}
|
|
662
655
|
),
|
|
663
656
|
t === "arrow" && ce(),
|
|
@@ -667,22 +660,22 @@ const E = {
|
|
|
667
660
|
]
|
|
668
661
|
}
|
|
669
662
|
),
|
|
670
|
-
/* @__PURE__ */
|
|
663
|
+
/* @__PURE__ */ h(
|
|
671
664
|
N,
|
|
672
665
|
{
|
|
673
666
|
definition: { display: "flex", justify: "between", align: "center" },
|
|
674
667
|
className: `gloss-metric-card__zone-c ${F}`,
|
|
675
668
|
style: { minHeight: 18, flexShrink: 0, zIndex: 2, position: "relative" },
|
|
676
669
|
children: [
|
|
677
|
-
/* @__PURE__ */ e("span", { style: ae, children:
|
|
678
|
-
G &&
|
|
670
|
+
/* @__PURE__ */ e("span", { style: ae, children: n }),
|
|
671
|
+
G && s?.value != null ? /* @__PURE__ */ e("span", { style: {
|
|
679
672
|
backgroundColor: "rgba(255,255,255,0.78)",
|
|
680
673
|
backdropFilter: "blur(4px)",
|
|
681
674
|
WebkitBackdropFilter: "blur(4px)",
|
|
682
675
|
borderRadius: 4,
|
|
683
676
|
display: "inline-flex",
|
|
684
677
|
flexShrink: 0
|
|
685
|
-
}, children: /* @__PURE__ */ e(j, { value:
|
|
678
|
+
}, children: /* @__PURE__ */ e(j, { value: s?.value, direction: s?.direction }) }) : /* @__PURE__ */ e(j, { value: s?.value, direction: s?.direction })
|
|
686
679
|
]
|
|
687
680
|
}
|
|
688
681
|
),
|
|
@@ -690,39 +683,39 @@ const E = {
|
|
|
690
683
|
] });
|
|
691
684
|
};
|
|
692
685
|
Pe.displayName = "MetricCard";
|
|
693
|
-
const
|
|
686
|
+
const H = ({
|
|
694
687
|
groupId: i,
|
|
695
|
-
options:
|
|
688
|
+
options: o,
|
|
696
689
|
selectedId: t,
|
|
697
|
-
defaultId:
|
|
690
|
+
defaultId: d,
|
|
698
691
|
onSelect: f,
|
|
699
|
-
pinnedId:
|
|
692
|
+
pinnedId: l,
|
|
700
693
|
onPin: r,
|
|
701
|
-
isOpen:
|
|
702
|
-
onOpenChange:
|
|
703
|
-
disableHover:
|
|
694
|
+
isOpen: s = !1,
|
|
695
|
+
onOpenChange: n,
|
|
696
|
+
disableHover: a = !1
|
|
704
697
|
}) => {
|
|
705
|
-
const
|
|
698
|
+
const c = W(null), u = s, m = o.find((g) => g.id === t), x = !!m, p = m || o.find((g) => g.id === l) || o.find((g) => g.id === d) || o[0], w = O(() => {
|
|
706
699
|
if (!p || !["7d", "30d", "60d", "90d", "mtd", "qtd", "ytd", "lytd"].includes(p.id))
|
|
707
700
|
return "";
|
|
708
701
|
const { start: b, end: k } = ve(p.id);
|
|
709
702
|
return ke(b, k, /* @__PURE__ */ new Date());
|
|
710
703
|
}, [p]), y = C(() => {
|
|
711
|
-
|
|
712
|
-
}, [i,
|
|
713
|
-
|
|
714
|
-
}, [i,
|
|
715
|
-
|
|
716
|
-
}, [i,
|
|
717
|
-
|
|
718
|
-
}, [i,
|
|
704
|
+
a || n && n(i, !0);
|
|
705
|
+
}, [i, n, a]), S = C(() => {
|
|
706
|
+
a || n && n(i, !1);
|
|
707
|
+
}, [i, n, a]), T = C(() => {
|
|
708
|
+
n && n(i, !1);
|
|
709
|
+
}, [i, n]), _ = C(() => {
|
|
710
|
+
n && n(i, !u);
|
|
711
|
+
}, [i, u, n]), $ = C((g) => {
|
|
719
712
|
f(g), T();
|
|
720
713
|
}, [f, T]), I = C((g, b) => {
|
|
721
714
|
g.stopPropagation(), r && r(b);
|
|
722
|
-
}, [r]), z = /* @__PURE__ */
|
|
723
|
-
|
|
715
|
+
}, [r]), z = /* @__PURE__ */ h(
|
|
716
|
+
B,
|
|
724
717
|
{
|
|
725
|
-
ref:
|
|
718
|
+
ref: c,
|
|
726
719
|
onMouseEnter: y,
|
|
727
720
|
onMouseLeave: S,
|
|
728
721
|
sx: { position: "relative", display: "inline-flex" },
|
|
@@ -730,21 +723,21 @@ const A = ({
|
|
|
730
723
|
/* @__PURE__ */ e(
|
|
731
724
|
X,
|
|
732
725
|
{
|
|
733
|
-
label: /* @__PURE__ */
|
|
726
|
+
label: /* @__PURE__ */ h(B, { sx: { display: "inline-flex", alignItems: "center", gap: "2px" }, children: [
|
|
734
727
|
p?.label,
|
|
735
728
|
/* @__PURE__ */ e(
|
|
736
|
-
|
|
729
|
+
Be,
|
|
737
730
|
{
|
|
738
731
|
sx: {
|
|
739
732
|
fontSize: 16,
|
|
740
733
|
color: x ? "primary.main" : "action.active",
|
|
741
|
-
transform:
|
|
734
|
+
transform: u ? "rotate(180deg)" : "none",
|
|
742
735
|
transition: "transform 200ms"
|
|
743
736
|
}
|
|
744
737
|
}
|
|
745
738
|
)
|
|
746
739
|
] }),
|
|
747
|
-
onClick:
|
|
740
|
+
onClick: _,
|
|
748
741
|
variant: "outlined",
|
|
749
742
|
color: x ? "primary" : "default",
|
|
750
743
|
size: "small",
|
|
@@ -760,8 +753,8 @@ const A = ({
|
|
|
760
753
|
/* @__PURE__ */ e(
|
|
761
754
|
Ie,
|
|
762
755
|
{
|
|
763
|
-
open:
|
|
764
|
-
anchorEl:
|
|
756
|
+
open: u,
|
|
757
|
+
anchorEl: c.current,
|
|
765
758
|
placement: "bottom-start",
|
|
766
759
|
sx: { zIndex: 1300 },
|
|
767
760
|
children: /* @__PURE__ */ e(
|
|
@@ -775,12 +768,12 @@ const A = ({
|
|
|
775
768
|
mt: 0.5,
|
|
776
769
|
py: 0.5
|
|
777
770
|
},
|
|
778
|
-
children: /* @__PURE__ */ e(Me, { dense: !0, children:
|
|
779
|
-
const b = t === g.id, k =
|
|
780
|
-
return /* @__PURE__ */
|
|
771
|
+
children: /* @__PURE__ */ e(Me, { dense: !0, children: o.map((g) => {
|
|
772
|
+
const b = t === g.id, k = l === g.id;
|
|
773
|
+
return /* @__PURE__ */ h(
|
|
781
774
|
Re,
|
|
782
775
|
{
|
|
783
|
-
onClick: () =>
|
|
776
|
+
onClick: () => $(g.id),
|
|
784
777
|
selected: b,
|
|
785
778
|
sx: {
|
|
786
779
|
display: "flex",
|
|
@@ -791,8 +784,8 @@ const A = ({
|
|
|
791
784
|
minHeight: 36
|
|
792
785
|
},
|
|
793
786
|
children: [
|
|
794
|
-
/* @__PURE__ */
|
|
795
|
-
b && /* @__PURE__ */ e(
|
|
787
|
+
/* @__PURE__ */ h(B, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
|
|
788
|
+
b && /* @__PURE__ */ e(_e, { fontSize: "small", color: "primary", sx: { fontSize: 14 } }),
|
|
796
789
|
/* @__PURE__ */ e(
|
|
797
790
|
Te,
|
|
798
791
|
{
|
|
@@ -819,7 +812,7 @@ const A = ({
|
|
|
819
812
|
}
|
|
820
813
|
},
|
|
821
814
|
title: k ? "Unpin as default" : "Set as default",
|
|
822
|
-
children: k ? /* @__PURE__ */ e(
|
|
815
|
+
children: k ? /* @__PURE__ */ e(We, { fontSize: "small", color: "warning", sx: { fontSize: 14 } }) : /* @__PURE__ */ e(Oe, { fontSize: "small", sx: { fontSize: 14 } })
|
|
823
816
|
}
|
|
824
817
|
)
|
|
825
818
|
]
|
|
@@ -848,67 +841,67 @@ const A = ({
|
|
|
848
841
|
}
|
|
849
842
|
) : z;
|
|
850
843
|
};
|
|
851
|
-
|
|
844
|
+
H.displayName = "ExpandableChip";
|
|
852
845
|
function Ve({
|
|
853
846
|
selectedPreset: i,
|
|
854
|
-
onSelect:
|
|
847
|
+
onSelect: o,
|
|
855
848
|
pinnedPreset: t = "30d",
|
|
856
|
-
onPin:
|
|
849
|
+
onPin: d,
|
|
857
850
|
openGroup: f,
|
|
858
|
-
onOpenChange:
|
|
851
|
+
onOpenChange: l,
|
|
859
852
|
disableHover: r = !1,
|
|
860
|
-
showCalendarEntry:
|
|
861
|
-
calendarEntry:
|
|
853
|
+
showCalendarEntry: s = !0,
|
|
854
|
+
calendarEntry: n
|
|
862
855
|
}) {
|
|
863
|
-
const
|
|
864
|
-
return /* @__PURE__ */
|
|
856
|
+
const a = i === "today";
|
|
857
|
+
return /* @__PURE__ */ h(B, { className: "hybrid-date-picker__quick-bar", children: [
|
|
865
858
|
/* @__PURE__ */ e(
|
|
866
859
|
X,
|
|
867
860
|
{
|
|
868
861
|
label: "Today",
|
|
869
862
|
size: "small",
|
|
870
|
-
variant:
|
|
871
|
-
color:
|
|
872
|
-
onClick: () =>
|
|
863
|
+
variant: a ? "filled" : "outlined",
|
|
864
|
+
color: a ? "primary" : "default",
|
|
865
|
+
onClick: () => o("today"),
|
|
873
866
|
sx: {
|
|
874
|
-
fontWeight:
|
|
867
|
+
fontWeight: a ? 600 : 400,
|
|
875
868
|
cursor: "pointer"
|
|
876
869
|
}
|
|
877
870
|
}
|
|
878
871
|
),
|
|
879
872
|
/* @__PURE__ */ e(
|
|
880
|
-
|
|
873
|
+
H,
|
|
881
874
|
{
|
|
882
875
|
groupId: "rolling",
|
|
883
876
|
options: we,
|
|
884
877
|
selectedId: i,
|
|
885
878
|
defaultId: t,
|
|
886
|
-
onSelect:
|
|
879
|
+
onSelect: o,
|
|
887
880
|
pinnedId: t,
|
|
888
|
-
onPin:
|
|
881
|
+
onPin: d,
|
|
889
882
|
isOpen: f === "rolling",
|
|
890
|
-
onOpenChange:
|
|
883
|
+
onOpenChange: l,
|
|
891
884
|
disableHover: r
|
|
892
885
|
}
|
|
893
886
|
),
|
|
894
887
|
/* @__PURE__ */ e(
|
|
895
|
-
|
|
888
|
+
H,
|
|
896
889
|
{
|
|
897
890
|
groupId: "period",
|
|
898
891
|
options: Se,
|
|
899
892
|
selectedId: i,
|
|
900
893
|
defaultId: t,
|
|
901
|
-
onSelect:
|
|
894
|
+
onSelect: o,
|
|
902
895
|
pinnedId: t,
|
|
903
|
-
onPin:
|
|
896
|
+
onPin: d,
|
|
904
897
|
isOpen: f === "period",
|
|
905
|
-
onOpenChange:
|
|
898
|
+
onOpenChange: l,
|
|
906
899
|
disableHover: r
|
|
907
900
|
}
|
|
908
901
|
),
|
|
909
|
-
|
|
902
|
+
s && /* @__PURE__ */ h(K, { children: [
|
|
910
903
|
/* @__PURE__ */ e(De, { orientation: "vertical", flexItem: !0, sx: { mx: 0.5 } }),
|
|
911
|
-
|
|
904
|
+
n
|
|
912
905
|
] })
|
|
913
906
|
] });
|
|
914
907
|
}
|
|
@@ -916,12 +909,12 @@ Ve.displayName = "TimeframeQuickBar";
|
|
|
916
909
|
export {
|
|
917
910
|
ee as B,
|
|
918
911
|
te as D,
|
|
919
|
-
|
|
912
|
+
H as E,
|
|
920
913
|
Pe as M,
|
|
921
914
|
re as O,
|
|
922
915
|
ie as S,
|
|
923
916
|
j as T,
|
|
924
|
-
|
|
917
|
+
A as a,
|
|
925
918
|
Ve as b,
|
|
926
919
|
je as e,
|
|
927
920
|
Ee as u
|