@leonardaustin/ui 0.2.0 → 0.3.0
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/dist/components/app-shell/AppShell.d.ts +3 -1
- package/dist/components/app-shell/AppShell.d.ts.map +1 -1
- package/dist/components/app-shell/CommandPalette.d.ts.map +1 -1
- package/dist/components/app-shell/MobileDrawer.d.ts +3 -1
- package/dist/components/app-shell/MobileDrawer.d.ts.map +1 -1
- package/dist/components/app-shell/Sidebar.d.ts +3 -1
- package/dist/components/app-shell/Sidebar.d.ts.map +1 -1
- package/dist/components/app-shell/TopBar.d.ts +3 -1
- package/dist/components/app-shell/TopBar.d.ts.map +1 -1
- package/dist/components/app-shell/types.d.ts +1 -0
- package/dist/components/app-shell/types.d.ts.map +1 -1
- package/dist/components/ui/Button.d.ts +2 -2
- package/dist/components/ui/Button.d.ts.map +1 -1
- package/dist/index.js +516 -477
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
import { Component as e, Fragment as t, createContext as n, forwardRef as r, useCallback as i, useContext as a, useEffect as o, useId as s, useLayoutEffect as c, useMemo as l, useRef as u, useState as d } from "react";
|
|
2
2
|
import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
3
|
-
import { Accessibility as h, AlertTriangle as g, ArrowDown as _, ArrowLeft as v, ArrowUp as y, BookOpen as b, Calendar as x, Check as S, CheckCircle2 as C, ChevronDown as w, ChevronLeft as T, ChevronRight as E, ChevronsUpDown as D, Columns3 as O, Eye as k, EyeOff as A, Inbox as
|
|
4
|
-
import { createPortal as
|
|
3
|
+
import { Accessibility as h, AlertTriangle as g, ArrowDown as _, ArrowLeft as v, ArrowUp as y, BookOpen as b, Calendar as x, Check as S, CheckCircle2 as C, ChevronDown as w, ChevronLeft as T, ChevronRight as E, ChevronsUpDown as D, Columns3 as O, Eye as k, EyeOff as A, Inbox as j, Info as M, Loader2 as ee, LogOut as te, Menu as ne, Minus as re, Monitor as N, Moon as P, Palette as ie, PanelLeft as ae, PanelLeftDashed as oe, Search as se, Settings as ce, Sun as le, UploadCloud as ue, X as F, XCircle as de, Zap as fe } from "lucide-react";
|
|
4
|
+
import { createPortal as I } from "react-dom";
|
|
5
5
|
//#region src/components/charts/AreaChart.tsx
|
|
6
|
-
var
|
|
6
|
+
var L = {
|
|
7
7
|
top: 16,
|
|
8
8
|
right: 12,
|
|
9
9
|
bottom: 28,
|
|
10
10
|
left: 48
|
|
11
11
|
};
|
|
12
|
-
function
|
|
12
|
+
function pe(e) {
|
|
13
13
|
return e >= 1e6 ? `${(e / 1e6).toFixed(1)}M` : e >= 1e3 ? `${(e / 1e3).toFixed(1)}k` : String(e);
|
|
14
14
|
}
|
|
15
|
-
function
|
|
16
|
-
let n = s(), r = u(null), [i, a] = d(null), o = 600 -
|
|
15
|
+
function me({ data: e, height: t = 240 }) {
|
|
16
|
+
let n = s(), r = u(null), [i, a] = d(null), o = 600 - L.left - L.right, c = t - L.top - L.bottom, l = Math.min(...e.map((e) => e.value)), h = Math.max(...e.map((e) => e.value)), g = h - l || 1;
|
|
17
17
|
function _(t) {
|
|
18
|
-
return
|
|
18
|
+
return L.left + t / Math.max(e.length - 1, 1) * o;
|
|
19
19
|
}
|
|
20
20
|
function v(e) {
|
|
21
|
-
return
|
|
21
|
+
return L.top + c - (e - l) / g * c;
|
|
22
22
|
}
|
|
23
23
|
let y = e.map((e, t) => `${_(t)},${v(e.value)}`).join(" "), b = [
|
|
24
|
-
`${_(0)},${
|
|
24
|
+
`${_(0)},${L.top + c}`,
|
|
25
25
|
...e.map((e, t) => `${_(t)},${v(e.value)}`),
|
|
26
|
-
`${_(e.length - 1)},${
|
|
26
|
+
`${_(e.length - 1)},${L.top + c}`
|
|
27
27
|
].join(" "), x = Math.max(1, Math.floor(e.length / 5)), S = e.filter((t, n) => n % x === 0 || n === e.length - 1), C = e.map((e, t) => t).filter((t) => t % x === 0 || t === e.length - 1);
|
|
28
28
|
function w(t) {
|
|
29
29
|
let n = r.current;
|
|
30
30
|
if (!n || e.length === 0) return;
|
|
31
|
-
let i = n.getBoundingClientRect(), s = ((t.clientX - i.left) / i.width * 600 -
|
|
31
|
+
let i = n.getBoundingClientRect(), s = ((t.clientX - i.left) / i.width * 600 - L.left) / o, c = Math.round(s * (e.length - 1)), l = Math.max(0, Math.min(e.length - 1, c));
|
|
32
32
|
a({
|
|
33
33
|
x: _(l),
|
|
34
34
|
y: v(e[l].value),
|
|
@@ -63,28 +63,28 @@ function he({ data: e, height: t = 240 }) {
|
|
|
63
63
|
})]
|
|
64
64
|
}) }),
|
|
65
65
|
/* @__PURE__ */ p("text", {
|
|
66
|
-
x:
|
|
67
|
-
y:
|
|
66
|
+
x: L.left - 8,
|
|
67
|
+
y: L.top,
|
|
68
68
|
textAnchor: "end",
|
|
69
69
|
dominantBaseline: "central",
|
|
70
70
|
fill: "var(--text-tertiary)",
|
|
71
71
|
fontSize: 10,
|
|
72
|
-
children:
|
|
72
|
+
children: pe(h)
|
|
73
73
|
}),
|
|
74
74
|
/* @__PURE__ */ p("text", {
|
|
75
|
-
x:
|
|
76
|
-
y:
|
|
75
|
+
x: L.left - 8,
|
|
76
|
+
y: L.top + c,
|
|
77
77
|
textAnchor: "end",
|
|
78
78
|
dominantBaseline: "central",
|
|
79
79
|
fill: "var(--text-tertiary)",
|
|
80
80
|
fontSize: 10,
|
|
81
|
-
children:
|
|
81
|
+
children: pe(l)
|
|
82
82
|
}),
|
|
83
83
|
/* @__PURE__ */ p("line", {
|
|
84
|
-
x1:
|
|
85
|
-
y1:
|
|
86
|
-
x2:
|
|
87
|
-
y2:
|
|
84
|
+
x1: L.left,
|
|
85
|
+
y1: L.top + c,
|
|
86
|
+
x2: L.left + o,
|
|
87
|
+
y2: L.top + c,
|
|
88
88
|
stroke: "var(--border)",
|
|
89
89
|
strokeWidth: 1
|
|
90
90
|
}),
|
|
@@ -111,9 +111,9 @@ function he({ data: e, height: t = 240 }) {
|
|
|
111
111
|
i && /* @__PURE__ */ m(f, { children: [
|
|
112
112
|
/* @__PURE__ */ p("line", {
|
|
113
113
|
x1: i.x,
|
|
114
|
-
y1:
|
|
114
|
+
y1: L.top,
|
|
115
115
|
x2: i.x,
|
|
116
|
-
y2:
|
|
116
|
+
y2: L.top + c,
|
|
117
117
|
stroke: "var(--border-strong)",
|
|
118
118
|
strokeWidth: 1,
|
|
119
119
|
strokeDasharray: "3 3"
|
|
@@ -166,14 +166,14 @@ function he({ data: e, height: t = 240 }) {
|
|
|
166
166
|
}
|
|
167
167
|
//#endregion
|
|
168
168
|
//#region src/components/charts/BarChart.tsx
|
|
169
|
-
var
|
|
169
|
+
var he = [
|
|
170
170
|
1,
|
|
171
171
|
.85,
|
|
172
172
|
.7,
|
|
173
173
|
.55,
|
|
174
174
|
.45
|
|
175
175
|
];
|
|
176
|
-
function
|
|
176
|
+
function ge({ data: e, height: t }) {
|
|
177
177
|
let [n, r] = d(null), i = Math.max(...e.map((e) => e.value));
|
|
178
178
|
return /* @__PURE__ */ p("svg", {
|
|
179
179
|
width: "100%",
|
|
@@ -219,7 +219,7 @@ function _e({ data: e, height: t }) {
|
|
|
219
219
|
height: 22,
|
|
220
220
|
fill: "var(--accent)",
|
|
221
221
|
rx: 6,
|
|
222
|
-
opacity: s ? 1 :
|
|
222
|
+
opacity: s ? 1 : he[t % he.length],
|
|
223
223
|
style: { transition: "all 150ms" }
|
|
224
224
|
}),
|
|
225
225
|
/* @__PURE__ */ p("text", {
|
|
@@ -239,19 +239,19 @@ function _e({ data: e, height: t }) {
|
|
|
239
239
|
}
|
|
240
240
|
//#endregion
|
|
241
241
|
//#region src/lib/cn.ts
|
|
242
|
-
function
|
|
242
|
+
function _e(e) {
|
|
243
243
|
if (typeof e == "string" || typeof e == "number" || typeof e == "bigint") return String(e);
|
|
244
244
|
if (!e || typeof e != "object") return "";
|
|
245
245
|
let t = "";
|
|
246
246
|
if (Array.isArray(e)) for (let n of e) {
|
|
247
247
|
if (!n) continue;
|
|
248
|
-
let e =
|
|
248
|
+
let e = _e(n);
|
|
249
249
|
e && (t = t ? `${t} ${e}` : e);
|
|
250
250
|
}
|
|
251
251
|
else for (let n in e) e[n] && (t = t ? `${t} ${n}` : n);
|
|
252
252
|
return t;
|
|
253
253
|
}
|
|
254
|
-
var
|
|
254
|
+
var ve = new Set([
|
|
255
255
|
"block",
|
|
256
256
|
"contents",
|
|
257
257
|
"flex",
|
|
@@ -261,7 +261,7 @@ var ye = new Set([
|
|
|
261
261
|
"inline-block",
|
|
262
262
|
"inline-flex",
|
|
263
263
|
"table"
|
|
264
|
-
]),
|
|
264
|
+
]), ye = new Set([
|
|
265
265
|
"text-2xl",
|
|
266
266
|
"text-2xs",
|
|
267
267
|
"text-2xs-f",
|
|
@@ -272,16 +272,16 @@ var ye = new Set([
|
|
|
272
272
|
"text-sm",
|
|
273
273
|
"text-xl",
|
|
274
274
|
"text-xs"
|
|
275
|
-
]),
|
|
275
|
+
]), be = new Set([
|
|
276
276
|
"text-center",
|
|
277
277
|
"text-left",
|
|
278
278
|
"text-right"
|
|
279
|
-
]),
|
|
279
|
+
]), xe = new Set(["lowercase", "uppercase"]), Se = new Set([
|
|
280
280
|
"font-bold",
|
|
281
281
|
"font-medium",
|
|
282
282
|
"font-normal",
|
|
283
283
|
"font-semibold"
|
|
284
|
-
]),
|
|
284
|
+
]), Ce = {
|
|
285
285
|
m: [
|
|
286
286
|
"margin-top",
|
|
287
287
|
"margin-right",
|
|
@@ -306,7 +306,7 @@ var ye = new Set([
|
|
|
306
306
|
pr: ["padding-right"],
|
|
307
307
|
pb: ["padding-bottom"],
|
|
308
308
|
pl: ["padding-left"]
|
|
309
|
-
},
|
|
309
|
+
}, we = {
|
|
310
310
|
inset: [
|
|
311
311
|
"top",
|
|
312
312
|
"right",
|
|
@@ -321,7 +321,7 @@ var ye = new Set([
|
|
|
321
321
|
left: ["left"],
|
|
322
322
|
start: ["inset-inline-start"],
|
|
323
323
|
end: ["inset-inline-end"]
|
|
324
|
-
},
|
|
324
|
+
}, Te = {
|
|
325
325
|
border: [
|
|
326
326
|
"border-top-width",
|
|
327
327
|
"border-right-width",
|
|
@@ -334,7 +334,7 @@ var ye = new Set([
|
|
|
334
334
|
"border-r": ["border-right-width"],
|
|
335
335
|
"border-b": ["border-bottom-width"],
|
|
336
336
|
"border-l": ["border-left-width"]
|
|
337
|
-
},
|
|
337
|
+
}, Ee = {
|
|
338
338
|
border: [
|
|
339
339
|
"border-top-color",
|
|
340
340
|
"border-right-color",
|
|
@@ -347,7 +347,7 @@ var ye = new Set([
|
|
|
347
347
|
"border-r": ["border-right-color"],
|
|
348
348
|
"border-b": ["border-bottom-color"],
|
|
349
349
|
"border-l": ["border-left-color"]
|
|
350
|
-
},
|
|
350
|
+
}, De = new Set([
|
|
351
351
|
"border-dashed",
|
|
352
352
|
"border-dotted",
|
|
353
353
|
"border-double",
|
|
@@ -355,14 +355,14 @@ var ye = new Set([
|
|
|
355
355
|
"border-none",
|
|
356
356
|
"border-solid"
|
|
357
357
|
]);
|
|
358
|
-
function
|
|
359
|
-
return
|
|
358
|
+
function R(...e) {
|
|
359
|
+
return Oe(_e(e));
|
|
360
360
|
}
|
|
361
|
-
function
|
|
361
|
+
function Oe(e) {
|
|
362
362
|
let t = [], n = /* @__PURE__ */ new Map();
|
|
363
363
|
for (let r of e.split(/\s+/)) {
|
|
364
364
|
if (!r) continue;
|
|
365
|
-
let e =
|
|
365
|
+
let e = ke(r);
|
|
366
366
|
if (e.size === 0) {
|
|
367
367
|
let i = n.get(r);
|
|
368
368
|
i !== void 0 && (t[i] = null), n.set(r, t.length), t.push({
|
|
@@ -373,7 +373,7 @@ function ke(e) {
|
|
|
373
373
|
}
|
|
374
374
|
for (let n = t.length - 1; n >= 0; n--) {
|
|
375
375
|
let r = t[n];
|
|
376
|
-
r &&
|
|
376
|
+
r && Re(r.keys, e) && (t[n] = null);
|
|
377
377
|
}
|
|
378
378
|
t.push({
|
|
379
379
|
token: r,
|
|
@@ -382,11 +382,11 @@ function ke(e) {
|
|
|
382
382
|
}
|
|
383
383
|
return t.filter((e) => !!e).map((e) => e.token).join(" ");
|
|
384
384
|
}
|
|
385
|
-
function
|
|
386
|
-
let t =
|
|
385
|
+
function ke(e) {
|
|
386
|
+
let t = Ae(e), n = t.pop() ?? e, r = n.startsWith("!"), i = je(r ? n.slice(1) : n), a = `${t.join(":")}|${r ? "!" : ""}`, o = Me(i);
|
|
387
387
|
return new Set(o.map((e) => `${a}${e}`));
|
|
388
388
|
}
|
|
389
|
-
function
|
|
389
|
+
function Ae(e) {
|
|
390
390
|
let t = [], n = 0, r = 0;
|
|
391
391
|
for (let i = 0; i < e.length; i++) {
|
|
392
392
|
let a = e[i];
|
|
@@ -394,57 +394,57 @@ function je(e) {
|
|
|
394
394
|
}
|
|
395
395
|
return t.push(e.slice(r)), t;
|
|
396
396
|
}
|
|
397
|
-
function
|
|
397
|
+
function je(e) {
|
|
398
398
|
return e.startsWith("-") ? e.slice(1) : e;
|
|
399
399
|
}
|
|
400
|
-
function
|
|
401
|
-
let t =
|
|
402
|
-
if (t) return [...
|
|
403
|
-
let n =
|
|
404
|
-
if (n) return [...
|
|
405
|
-
let r =
|
|
406
|
-
if (r) return [...
|
|
407
|
-
if (
|
|
400
|
+
function Me(e) {
|
|
401
|
+
let t = Ne(e);
|
|
402
|
+
if (t) return [...Ce[t]];
|
|
403
|
+
let n = Pe(e);
|
|
404
|
+
if (n) return [...we[n]];
|
|
405
|
+
let r = Fe(e);
|
|
406
|
+
if (r) return [...Te[r]];
|
|
407
|
+
if (ve.has(e)) return ["display"];
|
|
408
408
|
if (e === "absolute" || e === "fixed" || e === "relative" || e === "static" || e === "sticky") return ["position"];
|
|
409
409
|
if (e === "visible" || e === "invisible" || e === "collapse") return ["visibility"];
|
|
410
410
|
if (e === "border-collapse") return ["border-collapse"];
|
|
411
|
-
if (
|
|
412
|
-
let i =
|
|
413
|
-
return i ? [...
|
|
411
|
+
if (De.has(e)) return ["border-style"];
|
|
412
|
+
let i = Ie(e);
|
|
413
|
+
return i ? [...Ee[i]] : e === "rounded" || e.startsWith("rounded-") ? ["border-radius"] : e.startsWith("bg-") ? ["background"] : ye.has(e) ? ["font-size"] : be.has(e) ? ["text-align"] : xe.has(e) ? ["text-transform"] : e.startsWith("text-") ? ["color"] : e === "font-mono" ? ["font-family"] : Se.has(e) ? ["font-weight"] : e.startsWith("leading-") ? ["line-height"] : e.startsWith("tracking-") ? ["letter-spacing"] : e.startsWith("w-") ? ["width"] : e.startsWith("min-w-") ? ["min-width"] : e.startsWith("max-w-") ? ["max-width"] : e.startsWith("h-") ? ["height"] : e.startsWith("min-h-") ? ["min-height"] : e.startsWith("max-h-") ? ["max-height"] : e.startsWith("translate-x-") ? ["translate-x"] : e.startsWith("translate-y-") ? ["translate-y"] : e.startsWith("scale-") ? ["scale"] : e.startsWith("rotate-") ? ["rotate"] : e === "transform" ? ["transform"] : e.startsWith("grid-cols-") ? ["grid-template-columns"] : e.startsWith("col-span-") ? ["grid-column"] : e.startsWith("columns-") ? ["columns"] : e === "flex-col" || e === "flex-row" ? ["flex-direction"] : e === "flex-wrap" ? ["flex-wrap"] : e.startsWith("flex-") ? ["flex"] : e === "shrink" || e.startsWith("shrink-") ? ["flex-shrink"] : e === "grow" || e.startsWith("grow-") ? ["flex-grow"] : e.startsWith("items-") ? ["align-items"] : e.startsWith("justify-") ? ["justify-content"] : e.startsWith("gap-") ? ["gap"] : e.startsWith("space-y-") ? ["space-y"] : e.startsWith("overflow-y-") ? ["overflow-y"] : e.startsWith("overflow-x-") ? ["overflow-x"] : e.startsWith("overflow-") ? ["overflow-x", "overflow-y"] : e.startsWith("object-") ? ["object-fit"] : e.startsWith("aspect-") ? ["aspect-ratio"] : e.startsWith("cursor-") ? ["cursor"] : e.startsWith("opacity-") ? ["opacity"] : e.startsWith("shadow-") ? ["box-shadow"] : e === "ring" || /^ring-\d/.test(e) ? ["ring-width"] : e.startsWith("ring-offset-bg-") ? ["ring-offset-color"] : e.startsWith("ring-offset-") ? ["ring-offset-width"] : e.startsWith("ring-") ? ["ring-color"] : e.startsWith("outline-offset-") ? ["outline-offset"] : /^outline-\d/.test(e) ? ["outline-width"] : e === "outline" || e === "outline-none" ? ["outline-style"] : e.startsWith("outline-") ? ["outline-color"] : e.startsWith("transition-") || e === "transition" ? ["transition-property"] : e.startsWith("duration-") ? ["transition-duration"] : e.startsWith("ease-") ? ["transition-timing-function"] : e.startsWith("animate-") ? ["animation"] : e.startsWith("z-") ? ["z-index"] : e.startsWith("whitespace-") ? ["white-space"] : e.startsWith("break-inside-") ? ["break-inside"] : e.startsWith("break-") ? ["word-break"] : e.startsWith("line-clamp-") ? ["line-clamp"] : e === "list-inside" || e === "list-outside" ? ["list-style-position"] : e.startsWith("list-") ? ["list-style-type"] : e.startsWith("resize") ? ["resize"] : e.startsWith("select-") ? ["user-select"] : e.startsWith("pointer-events-") ? ["pointer-events"] : e.startsWith("appearance-") ? ["appearance"] : e.startsWith("accent-") ? ["accent-color"] : [];
|
|
414
|
+
}
|
|
415
|
+
function Ne(e) {
|
|
416
|
+
return Le(e, Ce);
|
|
414
417
|
}
|
|
415
418
|
function Pe(e) {
|
|
416
|
-
return
|
|
419
|
+
return Le(e, we);
|
|
417
420
|
}
|
|
418
421
|
function Fe(e) {
|
|
419
|
-
return Re(e, Te);
|
|
420
|
-
}
|
|
421
|
-
function Ie(e) {
|
|
422
422
|
return e === "border" ? "border" : e.match(/^(border(?:-[xytrbl])?)(?=$|-(?:0|2|4|8|\[))/)?.[1];
|
|
423
423
|
}
|
|
424
|
-
function
|
|
424
|
+
function Ie(e) {
|
|
425
425
|
let t = e.match(/^(border-[xytrbl])-./);
|
|
426
426
|
return t ? t[1] : e.startsWith("border-") ? "border" : void 0;
|
|
427
427
|
}
|
|
428
|
-
function
|
|
428
|
+
function Le(e, t) {
|
|
429
429
|
return Object.keys(t).sort((e, t) => String(t).length - String(e).length).find((t) => {
|
|
430
430
|
let n = String(t);
|
|
431
431
|
return e === n || e.startsWith(`${n}-`);
|
|
432
432
|
});
|
|
433
433
|
}
|
|
434
|
-
function
|
|
434
|
+
function Re(e, t) {
|
|
435
435
|
for (let n of e) if (!t.has(n)) return !1;
|
|
436
436
|
return !0;
|
|
437
437
|
}
|
|
438
438
|
//#endregion
|
|
439
439
|
//#region src/components/charts/DonutChart.tsx
|
|
440
|
-
var
|
|
440
|
+
var ze = {
|
|
441
441
|
"text-blue": "var(--blue)",
|
|
442
442
|
"text-green": "var(--green)",
|
|
443
443
|
"text-purple": "var(--purple)",
|
|
444
444
|
"text-yellow": "var(--yellow)",
|
|
445
445
|
"text-red": "var(--red)"
|
|
446
446
|
};
|
|
447
|
-
function
|
|
447
|
+
function Be(e, t) {
|
|
448
448
|
let n = e.reduce((e, t) => e + t.value, 0), r = 0;
|
|
449
449
|
return e.map((e) => {
|
|
450
450
|
let i = n > 0 ? e.value / n * t : 0, a = t - i, o = r / t * 360 - 90, s = o + i / t * 180, c = n > 0 ? e.value / n * 100 : 0;
|
|
@@ -458,8 +458,8 @@ function Ve(e, t) {
|
|
|
458
458
|
};
|
|
459
459
|
});
|
|
460
460
|
}
|
|
461
|
-
function
|
|
462
|
-
let [n, r] = d(null), i = e.reduce((e, t) => e + t.value, 0), a = (t - 28) / 2, o =
|
|
461
|
+
function Ve({ segments: e, size: t = 180 }) {
|
|
462
|
+
let [n, r] = d(null), i = e.reduce((e, t) => e + t.value, 0), a = (t - 28) / 2, o = Be(e, 2 * Math.PI * a), s = t + 12, c = s / 2;
|
|
463
463
|
return /* @__PURE__ */ m("div", {
|
|
464
464
|
className: "flex flex-col items-center gap-4",
|
|
465
465
|
children: [/* @__PURE__ */ m("div", {
|
|
@@ -491,7 +491,7 @@ function He({ segments: e, size: t = 180 }) {
|
|
|
491
491
|
cy: c,
|
|
492
492
|
r: a,
|
|
493
493
|
fill: "none",
|
|
494
|
-
stroke:
|
|
494
|
+
stroke: ze[e.segment.color] ?? "var(--accent)",
|
|
495
495
|
strokeWidth: r ? 32 : 28,
|
|
496
496
|
strokeDasharray: `${e.segmentLength} ${e.dashOffset}`,
|
|
497
497
|
strokeLinecap: "butt",
|
|
@@ -524,7 +524,7 @@ function He({ segments: e, size: t = 180 }) {
|
|
|
524
524
|
})
|
|
525
525
|
]
|
|
526
526
|
}), n !== null && (() => {
|
|
527
|
-
let e = o[n], t = e.midAngle * Math.PI / 180, r = a + 28 / 2 + 20, i = c + Math.cos(t) * r, s = c + Math.sin(t) * r, l =
|
|
527
|
+
let e = o[n], t = e.midAngle * Math.PI / 180, r = a + 28 / 2 + 20, i = c + Math.cos(t) * r, s = c + Math.sin(t) * r, l = ze[e.segment.color] ?? "var(--accent)";
|
|
528
528
|
return /* @__PURE__ */ p("div", {
|
|
529
529
|
className: "bg-bg-tertiary border-border pointer-events-none absolute z-10 rounded-md border px-2.5 py-1.5 shadow-lg",
|
|
530
530
|
style: {
|
|
@@ -565,11 +565,11 @@ function He({ segments: e, size: t = 180 }) {
|
|
|
565
565
|
type: "button",
|
|
566
566
|
onMouseEnter: () => r(t),
|
|
567
567
|
onMouseLeave: () => r(null),
|
|
568
|
-
className:
|
|
568
|
+
className: R("flex cursor-pointer items-center gap-1.5 transition-opacity duration-[100ms]", n !== null && n !== t && "opacity-50"),
|
|
569
569
|
children: [
|
|
570
570
|
/* @__PURE__ */ p("span", {
|
|
571
571
|
className: "h-2 w-2 rounded-full",
|
|
572
|
-
style: { backgroundColor:
|
|
572
|
+
style: { backgroundColor: ze[e.color] ?? "var(--accent)" }
|
|
573
573
|
}),
|
|
574
574
|
/* @__PURE__ */ p("span", {
|
|
575
575
|
className: "text-text-secondary text-xs",
|
|
@@ -586,8 +586,8 @@ function He({ segments: e, size: t = 180 }) {
|
|
|
586
586
|
}
|
|
587
587
|
//#endregion
|
|
588
588
|
//#region src/components/charts/RadarChart.tsx
|
|
589
|
-
var
|
|
590
|
-
function
|
|
589
|
+
var He = 4;
|
|
590
|
+
function Ue({ data: e, maxValue: t, size: n = 240 }) {
|
|
591
591
|
let [r, i] = d(null), a = t ?? Math.max(...e.map((e) => e.value)), o = n / 2, s = (n - 60) / 2, c = 2 * Math.PI / e.length;
|
|
592
592
|
function l(e, t) {
|
|
593
593
|
return [o + t * Math.cos(e - Math.PI / 2), o + t * Math.sin(e - Math.PI / 2)];
|
|
@@ -604,8 +604,8 @@ function We({ data: e, maxValue: t, size: n = 240 }) {
|
|
|
604
604
|
viewBox: `0 0 ${n} ${n}`,
|
|
605
605
|
className: "select-none",
|
|
606
606
|
children: [
|
|
607
|
-
Array.from({ length:
|
|
608
|
-
let r = (n + 1) /
|
|
607
|
+
Array.from({ length: He }, (t, n) => {
|
|
608
|
+
let r = (n + 1) / He * s;
|
|
609
609
|
return /* @__PURE__ */ p("polygon", {
|
|
610
610
|
points: e.map((e, t) => l(t * c, r)).map((e) => `${e[0]},${e[1]}`).join(" "),
|
|
611
611
|
fill: "none",
|
|
@@ -682,7 +682,7 @@ function We({ data: e, maxValue: t, size: n = 240 }) {
|
|
|
682
682
|
children: [
|
|
683
683
|
/* @__PURE__ */ p("span", { className: "bg-accent h-2 w-2 shrink-0 rounded-full" }),
|
|
684
684
|
/* @__PURE__ */ p("span", {
|
|
685
|
-
className:
|
|
685
|
+
className: R("text-text-secondary text-xs whitespace-nowrap"),
|
|
686
686
|
children: e[r].label
|
|
687
687
|
}),
|
|
688
688
|
/* @__PURE__ */ p("span", {
|
|
@@ -696,7 +696,7 @@ function We({ data: e, maxValue: t, size: n = 240 }) {
|
|
|
696
696
|
}
|
|
697
697
|
//#endregion
|
|
698
698
|
//#region src/components/charts/RadialBarChart.tsx
|
|
699
|
-
var
|
|
699
|
+
var We = {
|
|
700
700
|
"text-blue": "var(--blue)",
|
|
701
701
|
"text-green": "var(--green)",
|
|
702
702
|
"text-purple": "var(--purple)",
|
|
@@ -704,7 +704,7 @@ var Ge = {
|
|
|
704
704
|
"text-red": "var(--red)",
|
|
705
705
|
"text-accent": "var(--accent)"
|
|
706
706
|
};
|
|
707
|
-
function
|
|
707
|
+
function Ge({ segments: e, size: t = 200 }) {
|
|
708
708
|
let [n, r] = d(null), [i, a] = d({
|
|
709
709
|
x: 0,
|
|
710
710
|
y: 0
|
|
@@ -730,7 +730,7 @@ function Ke({ segments: e, size: t = 200 }) {
|
|
|
730
730
|
children: [e.map((e, t) => {
|
|
731
731
|
let i = c - t * 20;
|
|
732
732
|
if (i <= 0) return null;
|
|
733
|
-
let a = 2 * Math.PI * i, o = a * Math.min(e.value / e.max, 1), l = a - o, u =
|
|
733
|
+
let a = 2 * Math.PI * i, o = a * Math.min(e.value / e.max, 1), l = a - o, u = We[e.color] ?? "var(--accent)", d = n === t;
|
|
734
734
|
return /* @__PURE__ */ m("g", {
|
|
735
735
|
onMouseEnter: () => r(t),
|
|
736
736
|
onMouseLeave: () => r(null),
|
|
@@ -771,7 +771,7 @@ function Ke({ segments: e, size: t = 200 }) {
|
|
|
771
771
|
});
|
|
772
772
|
})()]
|
|
773
773
|
}), n !== null && (() => {
|
|
774
|
-
let t = e[n], r = Math.round(t.value / t.max * 100), a =
|
|
774
|
+
let t = e[n], r = Math.round(t.value / t.max * 100), a = We[t.color] ?? "var(--accent)";
|
|
775
775
|
return /* @__PURE__ */ p("div", {
|
|
776
776
|
className: "bg-bg-tertiary border-border pointer-events-none absolute z-10 rounded-md border px-2.5 py-1.5 shadow-lg",
|
|
777
777
|
style: {
|
|
@@ -816,11 +816,11 @@ function Ke({ segments: e, size: t = 200 }) {
|
|
|
816
816
|
type: "button",
|
|
817
817
|
onMouseEnter: () => r(t),
|
|
818
818
|
onMouseLeave: () => r(null),
|
|
819
|
-
className:
|
|
819
|
+
className: R("flex cursor-pointer items-center gap-1.5 transition-opacity duration-[100ms]", n !== null && n !== t && "opacity-50"),
|
|
820
820
|
children: [
|
|
821
821
|
/* @__PURE__ */ p("span", {
|
|
822
822
|
className: "h-2 w-2 rounded-full",
|
|
823
|
-
style: { backgroundColor:
|
|
823
|
+
style: { backgroundColor: We[e.color] ?? "var(--accent)" }
|
|
824
824
|
}),
|
|
825
825
|
/* @__PURE__ */ p("span", {
|
|
826
826
|
className: "text-text-secondary text-xs",
|
|
@@ -838,7 +838,7 @@ function Ke({ segments: e, size: t = 200 }) {
|
|
|
838
838
|
}
|
|
839
839
|
//#endregion
|
|
840
840
|
//#region src/components/charts/SparkLine.tsx
|
|
841
|
-
function
|
|
841
|
+
function Ke({ data: e, width: t = 60, height: n = 20, color: r }) {
|
|
842
842
|
if (e.length < 2) return null;
|
|
843
843
|
let i = Math.min(...e), a = Math.max(...e) - i || 1, o = e.map((r, o) => `${o / (e.length - 1) * t},${n - (r - i) / a * (n - 2) - 1}`).join(" ");
|
|
844
844
|
return /* @__PURE__ */ p("svg", {
|
|
@@ -858,7 +858,7 @@ function qe({ data: e, width: t = 60, height: n = 20, color: r }) {
|
|
|
858
858
|
}
|
|
859
859
|
//#endregion
|
|
860
860
|
//#region src/components/charts/VerticalBarChart.tsx
|
|
861
|
-
var
|
|
861
|
+
var qe = [
|
|
862
862
|
1,
|
|
863
863
|
.85,
|
|
864
864
|
.7,
|
|
@@ -866,33 +866,33 @@ var Je = [
|
|
|
866
866
|
.45,
|
|
867
867
|
.35,
|
|
868
868
|
.25
|
|
869
|
-
],
|
|
869
|
+
], z = {
|
|
870
870
|
top: 20,
|
|
871
871
|
right: 8,
|
|
872
872
|
bottom: 24,
|
|
873
873
|
left: 40
|
|
874
874
|
};
|
|
875
|
-
function
|
|
875
|
+
function Je(e) {
|
|
876
876
|
return e >= 1e6 ? `${(e / 1e6).toFixed(1)}M` : e >= 1e3 ? `${(e / 1e3).toFixed(1)}k` : String(e);
|
|
877
877
|
}
|
|
878
|
-
function
|
|
879
|
-
let [n, r] = d(null), i = 600 -
|
|
878
|
+
function Ye({ data: e, height: t = 180 }) {
|
|
879
|
+
let [n, r] = d(null), i = 600 - z.left - z.right, a = t - z.top - z.bottom, o = Math.max(...e.map((e) => e.value), 1), s = Math.max(4, (i - 6 * (e.length - 1)) / e.length);
|
|
880
880
|
return /* @__PURE__ */ m("svg", {
|
|
881
881
|
width: "100%",
|
|
882
882
|
viewBox: `0 0 600 ${t}`,
|
|
883
883
|
className: "select-none",
|
|
884
884
|
children: [
|
|
885
885
|
/* @__PURE__ */ p("text", {
|
|
886
|
-
x:
|
|
887
|
-
y:
|
|
886
|
+
x: z.left - 6,
|
|
887
|
+
y: z.top + 4,
|
|
888
888
|
textAnchor: "end",
|
|
889
889
|
fill: "var(--text-tertiary)",
|
|
890
890
|
fontSize: 10,
|
|
891
|
-
children:
|
|
891
|
+
children: Je(o)
|
|
892
892
|
}),
|
|
893
893
|
/* @__PURE__ */ p("text", {
|
|
894
|
-
x:
|
|
895
|
-
y:
|
|
894
|
+
x: z.left - 6,
|
|
895
|
+
y: z.top + a,
|
|
896
896
|
textAnchor: "end",
|
|
897
897
|
dominantBaseline: "central",
|
|
898
898
|
fill: "var(--text-tertiary)",
|
|
@@ -900,32 +900,32 @@ function Xe({ data: e, height: t = 180 }) {
|
|
|
900
900
|
children: "0"
|
|
901
901
|
}),
|
|
902
902
|
/* @__PURE__ */ p("line", {
|
|
903
|
-
x1:
|
|
904
|
-
y1:
|
|
905
|
-
x2:
|
|
906
|
-
y2:
|
|
903
|
+
x1: z.left,
|
|
904
|
+
y1: z.top + a,
|
|
905
|
+
x2: z.left + i,
|
|
906
|
+
y2: z.top + a,
|
|
907
907
|
stroke: "var(--border)",
|
|
908
908
|
strokeWidth: 1
|
|
909
909
|
}),
|
|
910
910
|
/* @__PURE__ */ p("line", {
|
|
911
|
-
x1:
|
|
912
|
-
y1:
|
|
913
|
-
x2:
|
|
914
|
-
y2:
|
|
911
|
+
x1: z.left,
|
|
912
|
+
y1: z.top + a / 2,
|
|
913
|
+
x2: z.left + i,
|
|
914
|
+
y2: z.top + a / 2,
|
|
915
915
|
stroke: "var(--border)",
|
|
916
916
|
strokeWidth: 1,
|
|
917
917
|
strokeDasharray: "3 3",
|
|
918
918
|
opacity: .5
|
|
919
919
|
}),
|
|
920
920
|
e.map((e, i) => {
|
|
921
|
-
let c =
|
|
921
|
+
let c = z.left + i * (s + 6), l = e.value / o * a, u = z.top + a - l, d = n === i;
|
|
922
922
|
return /* @__PURE__ */ m("g", {
|
|
923
923
|
onMouseEnter: () => r(i),
|
|
924
924
|
onMouseLeave: () => r(null),
|
|
925
925
|
children: [
|
|
926
926
|
/* @__PURE__ */ p("rect", {
|
|
927
927
|
x: c,
|
|
928
|
-
y:
|
|
928
|
+
y: z.top,
|
|
929
929
|
width: s,
|
|
930
930
|
height: a,
|
|
931
931
|
fill: "transparent"
|
|
@@ -937,7 +937,7 @@ function Xe({ data: e, height: t = 180 }) {
|
|
|
937
937
|
height: l,
|
|
938
938
|
fill: e.color ?? "var(--accent)",
|
|
939
939
|
rx: 6,
|
|
940
|
-
opacity: d ? 1 :
|
|
940
|
+
opacity: d ? 1 : qe[i % qe.length],
|
|
941
941
|
style: { transition: "all 150ms" }
|
|
942
942
|
}),
|
|
943
943
|
/* @__PURE__ */ p("text", {
|
|
@@ -965,17 +965,17 @@ function Xe({ data: e, height: t = 180 }) {
|
|
|
965
965
|
}
|
|
966
966
|
//#endregion
|
|
967
967
|
//#region src/components/app-shell/navigation.ts
|
|
968
|
-
function
|
|
968
|
+
function Xe(e, t) {
|
|
969
969
|
if (!t) return !1;
|
|
970
970
|
if (e.end ?? e.path === "/") return t === e.path;
|
|
971
971
|
let n = e.path.endsWith("/") ? e.path : `${e.path}/`;
|
|
972
972
|
return t === e.path || t.startsWith(n);
|
|
973
973
|
}
|
|
974
|
-
function
|
|
974
|
+
function B(e, t, n, r) {
|
|
975
975
|
let i = e.currentTarget.getAttribute("target");
|
|
976
976
|
e.defaultPrevented || e.button !== 0 || e.metaKey || e.ctrlKey || e.shiftKey || e.altKey || i && i !== "_self" || (n && (e.preventDefault(), n(t)), r?.());
|
|
977
977
|
}
|
|
978
|
-
function
|
|
978
|
+
function Ze(e, t) {
|
|
979
979
|
if (t) {
|
|
980
980
|
t(e);
|
|
981
981
|
return;
|
|
@@ -984,19 +984,19 @@ function Qe(e, t) {
|
|
|
984
984
|
}
|
|
985
985
|
//#endregion
|
|
986
986
|
//#region src/components/app-shell/BottomNav.tsx
|
|
987
|
-
function
|
|
987
|
+
function Qe({ items: e, currentPath: t, onNavigate: n, className: r }) {
|
|
988
988
|
return e.length === 0 ? null : /* @__PURE__ */ p("nav", {
|
|
989
|
-
className:
|
|
989
|
+
className: R("bg-bg-secondary border-border font-navigation fixed right-0 bottom-0 left-0 z-30 border-t md:hidden", r),
|
|
990
990
|
style: { height: "var(--bottomnav-height)" },
|
|
991
991
|
children: /* @__PURE__ */ p("ul", {
|
|
992
992
|
className: "flex h-full items-center justify-around",
|
|
993
993
|
children: e.map((e) => {
|
|
994
|
-
let r =
|
|
994
|
+
let r = Xe(e, t);
|
|
995
995
|
return /* @__PURE__ */ p("li", { children: /* @__PURE__ */ m("a", {
|
|
996
996
|
href: e.path,
|
|
997
|
-
onClick: (t) =>
|
|
997
|
+
onClick: (t) => B(t, e.path, n),
|
|
998
998
|
"aria-current": r ? "page" : void 0,
|
|
999
|
-
className:
|
|
999
|
+
className: R("font-navigation flex h-full w-14 flex-col items-center justify-center gap-0.5", "cursor-pointer transition-colors duration-[100ms]", r ? "text-accent" : "text-text-tertiary"),
|
|
1000
1000
|
children: [/* @__PURE__ */ p(e.icon, { className: "h-5 w-5" }), /* @__PURE__ */ p("span", {
|
|
1001
1001
|
className: "text-2xs",
|
|
1002
1002
|
children: e.shortLabel ?? e.label
|
|
@@ -1008,18 +1008,18 @@ function $e({ items: e, currentPath: t, onNavigate: n, className: r }) {
|
|
|
1008
1008
|
}
|
|
1009
1009
|
//#endregion
|
|
1010
1010
|
//#region src/hooks/useFocusTrap.ts
|
|
1011
|
-
var
|
|
1012
|
-
function
|
|
1011
|
+
var $e = "a[href], button:not([disabled]), input:not([disabled]), textarea:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
|
|
1012
|
+
function V(e, t) {
|
|
1013
1013
|
let n = u(null);
|
|
1014
1014
|
o(() => {
|
|
1015
1015
|
if (!t || !e.current) return;
|
|
1016
1016
|
let r = e.current.ownerDocument;
|
|
1017
1017
|
n.current = r.activeElement;
|
|
1018
|
-
let i = e.current.querySelectorAll(
|
|
1018
|
+
let i = e.current.querySelectorAll($e);
|
|
1019
1019
|
i.length > 0 && i[0].focus();
|
|
1020
1020
|
let a = (t) => {
|
|
1021
1021
|
if (t.key !== "Tab" || !e.current) return;
|
|
1022
|
-
let n = e.current.querySelectorAll(
|
|
1022
|
+
let n = e.current.querySelectorAll($e);
|
|
1023
1023
|
if (n.length === 0) return;
|
|
1024
1024
|
let i = n[0], a = n[n.length - 1];
|
|
1025
1025
|
t.shiftKey ? r.activeElement === i && (t.preventDefault(), a.focus()) : r.activeElement === a && (t.preventDefault(), i.focus());
|
|
@@ -1031,22 +1031,22 @@ function B(e, t) {
|
|
|
1031
1031
|
}
|
|
1032
1032
|
//#endregion
|
|
1033
1033
|
//#region src/components/app-shell/commandPaletteEvents.ts
|
|
1034
|
-
var
|
|
1034
|
+
var et = "open-command-palette", tt = {
|
|
1035
1035
|
key: "k",
|
|
1036
1036
|
label: "⌘K",
|
|
1037
1037
|
modifier: "primary"
|
|
1038
1038
|
};
|
|
1039
|
-
function
|
|
1039
|
+
function nt(e = et) {
|
|
1040
1040
|
typeof document > "u" || document.dispatchEvent(new CustomEvent(e));
|
|
1041
1041
|
}
|
|
1042
|
-
function
|
|
1042
|
+
function rt(e, t) {
|
|
1043
1043
|
if (e.key.toLowerCase() !== t.key.toLowerCase()) return !1;
|
|
1044
1044
|
let n = t.modifier ?? "primary";
|
|
1045
1045
|
return (n === "primary" ? e.metaKey || e.ctrlKey : n === "meta" ? e.metaKey && !e.ctrlKey : n === "ctrl" ? e.ctrlKey && !e.metaKey : !e.metaKey && !e.ctrlKey) && !!e.altKey == !!t.altKey && !!e.shiftKey == !!t.shiftKey;
|
|
1046
1046
|
}
|
|
1047
1047
|
//#endregion
|
|
1048
1048
|
//#region src/components/app-shell/CommandPalette.tsx
|
|
1049
|
-
function
|
|
1049
|
+
function it(e, t) {
|
|
1050
1050
|
let n = t.toLowerCase();
|
|
1051
1051
|
return [
|
|
1052
1052
|
e.label,
|
|
@@ -1054,15 +1054,15 @@ function at(e, t) {
|
|
|
1054
1054
|
...e.keywords ?? []
|
|
1055
1055
|
].some((e) => e.toLowerCase().includes(n));
|
|
1056
1056
|
}
|
|
1057
|
-
function
|
|
1057
|
+
function at({ items: e, eventName: t = et, shortcut: n = tt, placeholder: r = "Search pages...", emptyLabel: a = "No results found", onNavigate: c, onSelect: l }) {
|
|
1058
1058
|
let [f, h] = d(!1), [g, _] = d(""), [v, y] = d(0), b = u(null), x = u(null), S = s();
|
|
1059
|
-
|
|
1060
|
-
let C = e.filter((e) =>
|
|
1059
|
+
V(x, f);
|
|
1060
|
+
let C = e.filter((e) => it(e, g)), w = i(() => {
|
|
1061
1061
|
h(!0), _(""), y(0), setTimeout(() => b.current?.focus(), 0);
|
|
1062
1062
|
}, []);
|
|
1063
1063
|
o(() => {
|
|
1064
1064
|
let e = (e) => {
|
|
1065
|
-
|
|
1065
|
+
rt(e, n) && (e.preventDefault(), f ? h(!1) : w());
|
|
1066
1066
|
}, r = () => {
|
|
1067
1067
|
f || w();
|
|
1068
1068
|
};
|
|
@@ -1079,7 +1079,7 @@ function ot({ items: e, eventName: t = tt, shortcut: n = nt, placeholder: r = "S
|
|
|
1079
1079
|
_(e), y(0);
|
|
1080
1080
|
}
|
|
1081
1081
|
function E(e) {
|
|
1082
|
-
l?.(e),
|
|
1082
|
+
l?.(e), Ze(e.path, c), h(!1);
|
|
1083
1083
|
}
|
|
1084
1084
|
function D(e) {
|
|
1085
1085
|
e.key === "ArrowDown" ? (e.preventDefault(), y((e) => Math.min(e + 1, C.length - 1))) : e.key === "ArrowUp" ? (e.preventDefault(), y((e) => Math.max(e - 1, 0))) : e.key === "Enter" && C[v] ? E(C[v]) : e.key === "Escape" && h(!1);
|
|
@@ -1096,7 +1096,7 @@ function ot({ items: e, eventName: t = tt, shortcut: n = nt, placeholder: r = "S
|
|
|
1096
1096
|
children: [/* @__PURE__ */ m("div", {
|
|
1097
1097
|
className: "border-border flex items-center gap-3 border-b px-4",
|
|
1098
1098
|
children: [
|
|
1099
|
-
/* @__PURE__ */ p(
|
|
1099
|
+
/* @__PURE__ */ p(se, { className: "text-text-tertiary h-4 w-4 shrink-0" }),
|
|
1100
1100
|
/* @__PURE__ */ p("input", {
|
|
1101
1101
|
ref: b,
|
|
1102
1102
|
type: "text",
|
|
@@ -1129,14 +1129,21 @@ function ot({ items: e, eventName: t = tt, shortcut: n = nt, placeholder: r = "S
|
|
|
1129
1129
|
role: "option",
|
|
1130
1130
|
"aria-selected": t === v,
|
|
1131
1131
|
onClick: () => E(e),
|
|
1132
|
-
className:
|
|
1133
|
-
children: [
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1132
|
+
className: R("flex h-9 w-full cursor-pointer items-center gap-3 rounded-md px-3 text-left", "transition-colors duration-[100ms]", t === v ? "bg-accent-muted text-accent" : "text-text-secondary hover:text-text-primary hover:bg-bg-hover"),
|
|
1133
|
+
children: [
|
|
1134
|
+
/* @__PURE__ */ p("span", {
|
|
1135
|
+
className: "shrink-0 opacity-60",
|
|
1136
|
+
children: /* @__PURE__ */ p(e.icon, { className: "h-4 w-4" })
|
|
1137
|
+
}),
|
|
1138
|
+
/* @__PURE__ */ p("span", {
|
|
1139
|
+
className: "min-w-0 flex-1 text-xs font-medium",
|
|
1140
|
+
children: e.label
|
|
1141
|
+
}),
|
|
1142
|
+
e.badge && /* @__PURE__ */ p("span", {
|
|
1143
|
+
className: "shrink-0",
|
|
1144
|
+
children: e.badge
|
|
1145
|
+
})
|
|
1146
|
+
]
|
|
1140
1147
|
}, e.path))
|
|
1141
1148
|
})]
|
|
1142
1149
|
})]
|
|
@@ -1144,7 +1151,7 @@ function ot({ items: e, eventName: t = tt, shortcut: n = nt, placeholder: r = "S
|
|
|
1144
1151
|
}
|
|
1145
1152
|
//#endregion
|
|
1146
1153
|
//#region src/components/app-shell/MobileDrawer.tsx
|
|
1147
|
-
function
|
|
1154
|
+
function ot({ brand: e }) {
|
|
1148
1155
|
let t = e.icon;
|
|
1149
1156
|
return e.logo ? /* @__PURE__ */ p(f, { children: e.logo }) : /* @__PURE__ */ m("div", {
|
|
1150
1157
|
className: "flex items-center gap-2",
|
|
@@ -1154,14 +1161,14 @@ function st({ brand: e }) {
|
|
|
1154
1161
|
})]
|
|
1155
1162
|
});
|
|
1156
1163
|
}
|
|
1157
|
-
function
|
|
1158
|
-
let
|
|
1159
|
-
return
|
|
1164
|
+
function st({ open: e, onClose: t, items: n, brand: r, currentPath: i, onNavigate: a, headerActions: s, className: c }) {
|
|
1165
|
+
let l = u(null);
|
|
1166
|
+
return V(l, e), o(() => {
|
|
1160
1167
|
if (!e) return;
|
|
1161
1168
|
document.body.style.overflow = "hidden";
|
|
1162
1169
|
let n = (e) => {
|
|
1163
1170
|
e.key === "Escape" && t();
|
|
1164
|
-
}, r =
|
|
1171
|
+
}, r = l.current?.ownerDocument ?? document;
|
|
1165
1172
|
return r.addEventListener("keydown", n), () => {
|
|
1166
1173
|
document.body.style.overflow = "", r.removeEventListener("keydown", n);
|
|
1167
1174
|
};
|
|
@@ -1171,45 +1178,59 @@ function ct({ open: e, onClose: t, items: n, brand: r, currentPath: i, onNavigat
|
|
|
1171
1178
|
className: "bg-bg-overlay fixed inset-0",
|
|
1172
1179
|
onClick: t
|
|
1173
1180
|
}), /* @__PURE__ */ m("div", {
|
|
1174
|
-
ref:
|
|
1175
|
-
className:
|
|
1176
|
-
children: [
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
className: "
|
|
1188
|
-
children:
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1181
|
+
ref: l,
|
|
1182
|
+
className: R("bg-bg-sidebar border-border animate-slide-in-left fixed inset-y-0 left-0 z-50 flex w-64 flex-col border-r", c),
|
|
1183
|
+
children: [
|
|
1184
|
+
/* @__PURE__ */ m("div", {
|
|
1185
|
+
className: "border-border flex h-11 items-center justify-between border-b px-4",
|
|
1186
|
+
children: [/* @__PURE__ */ p(ot, { brand: r }), /* @__PURE__ */ p("button", {
|
|
1187
|
+
onClick: t,
|
|
1188
|
+
className: "text-text-tertiary hover:text-text-primary flex h-7 w-7 cursor-pointer items-center justify-center rounded",
|
|
1189
|
+
"aria-label": "Close menu",
|
|
1190
|
+
children: /* @__PURE__ */ p(F, { className: "h-4 w-4" })
|
|
1191
|
+
})]
|
|
1192
|
+
}),
|
|
1193
|
+
s && /* @__PURE__ */ p("div", {
|
|
1194
|
+
className: "border-border border-b px-4 py-2",
|
|
1195
|
+
children: s
|
|
1196
|
+
}),
|
|
1197
|
+
/* @__PURE__ */ p("nav", {
|
|
1198
|
+
className: "min-h-0 flex-1 overflow-y-auto overscroll-contain px-2 py-2",
|
|
1199
|
+
children: /* @__PURE__ */ p("ul", {
|
|
1200
|
+
className: "space-y-0.5",
|
|
1201
|
+
children: n.map((e) => {
|
|
1202
|
+
let n = Xe(e, i);
|
|
1203
|
+
return /* @__PURE__ */ p("li", { children: /* @__PURE__ */ m("a", {
|
|
1204
|
+
href: e.path,
|
|
1205
|
+
onClick: (n) => B(n, e.path, a, t),
|
|
1206
|
+
"aria-current": n ? "page" : void 0,
|
|
1207
|
+
className: R("flex h-10 items-center gap-3 rounded-md px-3", "cursor-pointer transition-colors duration-[100ms]", n ? "bg-accent-muted text-accent" : "text-text-secondary hover:text-text-primary hover:bg-bg-hover"),
|
|
1208
|
+
children: [
|
|
1209
|
+
/* @__PURE__ */ p(e.icon, { className: "h-4 w-4" }),
|
|
1210
|
+
/* @__PURE__ */ p("span", {
|
|
1211
|
+
className: "min-w-0 flex-1 text-sm",
|
|
1212
|
+
children: e.label
|
|
1213
|
+
}),
|
|
1214
|
+
e.badge && /* @__PURE__ */ p("span", {
|
|
1215
|
+
className: "shrink-0",
|
|
1216
|
+
children: e.badge
|
|
1217
|
+
})
|
|
1218
|
+
]
|
|
1219
|
+
}) }, e.path);
|
|
1220
|
+
})
|
|
1200
1221
|
})
|
|
1201
1222
|
})
|
|
1202
|
-
|
|
1223
|
+
]
|
|
1203
1224
|
})]
|
|
1204
1225
|
}) : null;
|
|
1205
1226
|
}
|
|
1206
1227
|
//#endregion
|
|
1207
1228
|
//#region src/config/theme.ts
|
|
1208
|
-
var
|
|
1229
|
+
var ct = [
|
|
1209
1230
|
{
|
|
1210
1231
|
value: "dark",
|
|
1211
1232
|
label: "Dark",
|
|
1212
|
-
icon:
|
|
1233
|
+
icon: P,
|
|
1213
1234
|
preview: {
|
|
1214
1235
|
bg: "#0d0f12",
|
|
1215
1236
|
fg: "#2a2e38"
|
|
@@ -1218,7 +1239,7 @@ var lt = [
|
|
|
1218
1239
|
{
|
|
1219
1240
|
value: "light",
|
|
1220
1241
|
label: "Light",
|
|
1221
|
-
icon:
|
|
1242
|
+
icon: le,
|
|
1222
1243
|
preview: {
|
|
1223
1244
|
bg: "#f5f5f5",
|
|
1224
1245
|
fg: "#d4d4d8"
|
|
@@ -1227,7 +1248,7 @@ var lt = [
|
|
|
1227
1248
|
{
|
|
1228
1249
|
value: "monokai",
|
|
1229
1250
|
label: "Monokai",
|
|
1230
|
-
icon:
|
|
1251
|
+
icon: ie,
|
|
1231
1252
|
preview: {
|
|
1232
1253
|
bg: "#272822",
|
|
1233
1254
|
fg: "#3E3D32"
|
|
@@ -1236,7 +1257,7 @@ var lt = [
|
|
|
1236
1257
|
{
|
|
1237
1258
|
value: "solarized",
|
|
1238
1259
|
label: "Solarized",
|
|
1239
|
-
icon:
|
|
1260
|
+
icon: N,
|
|
1240
1261
|
preview: {
|
|
1241
1262
|
bg: "#002B36",
|
|
1242
1263
|
fg: "#0A3F4C"
|
|
@@ -1245,7 +1266,7 @@ var lt = [
|
|
|
1245
1266
|
{
|
|
1246
1267
|
value: "cyberBrutalDark",
|
|
1247
1268
|
label: "Cyber Brutal Dark",
|
|
1248
|
-
icon:
|
|
1269
|
+
icon: fe,
|
|
1249
1270
|
preview: {
|
|
1250
1271
|
bg: "#050505",
|
|
1251
1272
|
fg: "#18181b"
|
|
@@ -1254,7 +1275,7 @@ var lt = [
|
|
|
1254
1275
|
{
|
|
1255
1276
|
value: "cyberBrutalLight",
|
|
1256
1277
|
label: "Cyber Brutal Light",
|
|
1257
|
-
icon:
|
|
1278
|
+
icon: fe,
|
|
1258
1279
|
preview: {
|
|
1259
1280
|
bg: "#e4e4e7",
|
|
1260
1281
|
fg: "#d4d4d8"
|
|
@@ -1269,15 +1290,15 @@ var lt = [
|
|
|
1269
1290
|
fg: "#364153"
|
|
1270
1291
|
}
|
|
1271
1292
|
}
|
|
1272
|
-
],
|
|
1293
|
+
], lt = new Set([
|
|
1273
1294
|
"light",
|
|
1274
1295
|
"cyberBrutalLight",
|
|
1275
1296
|
"hashiTheme"
|
|
1276
1297
|
]);
|
|
1277
|
-
function
|
|
1278
|
-
return
|
|
1298
|
+
function H(e) {
|
|
1299
|
+
return lt.has(e);
|
|
1279
1300
|
}
|
|
1280
|
-
var
|
|
1301
|
+
var ut = ct.filter((e) => H(e.value)), dt = ct.filter((e) => !H(e.value)), ft = {
|
|
1281
1302
|
uiFont: "inter",
|
|
1282
1303
|
headingFont: "inter",
|
|
1283
1304
|
proseFont: "inter",
|
|
@@ -1292,7 +1313,7 @@ var dt = lt.filter((e) => V(e.value)), ft = lt.filter((e) => !V(e.value)), pt =
|
|
|
1292
1313
|
tracking: .05,
|
|
1293
1314
|
lineHeight: 1.45,
|
|
1294
1315
|
density: .25
|
|
1295
|
-
},
|
|
1316
|
+
}, pt = {
|
|
1296
1317
|
uiFont: "jetbrains-mono",
|
|
1297
1318
|
headingFont: "jetbrains-mono",
|
|
1298
1319
|
proseFont: "jetbrains-mono",
|
|
@@ -1307,13 +1328,13 @@ var dt = lt.filter((e) => V(e.value)), ft = lt.filter((e) => !V(e.value)), pt =
|
|
|
1307
1328
|
tracking: .2,
|
|
1308
1329
|
lineHeight: 1.4,
|
|
1309
1330
|
density: .22
|
|
1310
|
-
},
|
|
1311
|
-
dark:
|
|
1312
|
-
light:
|
|
1313
|
-
monokai:
|
|
1314
|
-
solarized:
|
|
1315
|
-
cyberBrutalDark:
|
|
1316
|
-
cyberBrutalLight:
|
|
1331
|
+
}, U = {
|
|
1332
|
+
dark: ft,
|
|
1333
|
+
light: ft,
|
|
1334
|
+
monokai: ft,
|
|
1335
|
+
solarized: ft,
|
|
1336
|
+
cyberBrutalDark: pt,
|
|
1337
|
+
cyberBrutalLight: pt,
|
|
1317
1338
|
hashiTheme: {
|
|
1318
1339
|
uiFont: "inter",
|
|
1319
1340
|
headingFont: "archivo-expanded",
|
|
@@ -1330,7 +1351,7 @@ var dt = lt.filter((e) => V(e.value)), ft = lt.filter((e) => !V(e.value)), pt =
|
|
|
1330
1351
|
lineHeight: 1.45,
|
|
1331
1352
|
density: .25
|
|
1332
1353
|
}
|
|
1333
|
-
},
|
|
1354
|
+
}, W = [
|
|
1334
1355
|
{
|
|
1335
1356
|
value: "archivo-expanded",
|
|
1336
1357
|
label: "Archivo Expanded"
|
|
@@ -1351,7 +1372,7 @@ var dt = lt.filter((e) => V(e.value)), ft = lt.filter((e) => !V(e.value)), pt =
|
|
|
1351
1372
|
value: "system",
|
|
1352
1373
|
label: "System"
|
|
1353
1374
|
}
|
|
1354
|
-
],
|
|
1375
|
+
], mt = [
|
|
1355
1376
|
{
|
|
1356
1377
|
value: "purple",
|
|
1357
1378
|
color: "#7C5CFC"
|
|
@@ -1387,7 +1408,7 @@ var dt = lt.filter((e) => V(e.value)), ft = lt.filter((e) => !V(e.value)), pt =
|
|
|
1387
1408
|
];
|
|
1388
1409
|
//#endregion
|
|
1389
1410
|
//#region src/hooks/useDismiss.ts
|
|
1390
|
-
function
|
|
1411
|
+
function G(e, t, n, r, i) {
|
|
1391
1412
|
let a = i?.outsideClick ?? !0;
|
|
1392
1413
|
o(() => {
|
|
1393
1414
|
if (!e) return;
|
|
@@ -1410,7 +1431,7 @@ function W(e, t, n, r, i) {
|
|
|
1410
1431
|
}
|
|
1411
1432
|
//#endregion
|
|
1412
1433
|
//#region src/providers/SettingsContext.ts
|
|
1413
|
-
var
|
|
1434
|
+
var ht = n({
|
|
1414
1435
|
fontSize: 15,
|
|
1415
1436
|
setFontSize: () => {},
|
|
1416
1437
|
accentColor: "purple",
|
|
@@ -1461,35 +1482,35 @@ var gt = n({
|
|
|
1461
1482
|
});
|
|
1462
1483
|
//#endregion
|
|
1463
1484
|
//#region src/hooks/useSettings.ts
|
|
1464
|
-
function
|
|
1465
|
-
return a(
|
|
1485
|
+
function K() {
|
|
1486
|
+
return a(ht);
|
|
1466
1487
|
}
|
|
1467
1488
|
//#endregion
|
|
1468
1489
|
//#region src/components/ui/Avatar.tsx
|
|
1469
|
-
var
|
|
1490
|
+
var gt = {
|
|
1470
1491
|
xs: "w-5 h-5 text-2xs",
|
|
1471
1492
|
sm: "w-7 h-7 text-2xs",
|
|
1472
1493
|
md: "w-10 h-10 text-xs",
|
|
1473
1494
|
lg: "w-16 h-16 text-lg"
|
|
1474
1495
|
};
|
|
1475
|
-
function
|
|
1496
|
+
function _t(e) {
|
|
1476
1497
|
return e.split(" ").map((e) => e[0]).join("").toUpperCase().slice(0, 2);
|
|
1477
1498
|
}
|
|
1478
|
-
function
|
|
1499
|
+
function vt(e) {
|
|
1479
1500
|
let t = 0;
|
|
1480
1501
|
for (let n = 0; n < e.length; n++) t = e.charCodeAt(n) + ((t << 5) - t);
|
|
1481
1502
|
return `hsl(${Math.abs(t) % 360}, 50%, 40%)`;
|
|
1482
1503
|
}
|
|
1483
|
-
function
|
|
1504
|
+
function yt({ name: e, src: t, size: n = "md", className: r }) {
|
|
1484
1505
|
return /* @__PURE__ */ p("div", {
|
|
1485
|
-
className:
|
|
1486
|
-
style: { backgroundColor: t ? void 0 :
|
|
1506
|
+
className: R("text-text-on-avatar flex shrink-0 items-center justify-center rounded-full font-semibold", gt[n], r),
|
|
1507
|
+
style: { backgroundColor: t ? void 0 : vt(e) },
|
|
1487
1508
|
"aria-label": e,
|
|
1488
1509
|
children: t ? /* @__PURE__ */ p("img", {
|
|
1489
1510
|
src: t,
|
|
1490
1511
|
alt: e,
|
|
1491
1512
|
className: "h-full w-full rounded-full object-cover"
|
|
1492
|
-
}) :
|
|
1513
|
+
}) : _t(e)
|
|
1493
1514
|
});
|
|
1494
1515
|
}
|
|
1495
1516
|
//#endregion
|
|
@@ -1524,9 +1545,9 @@ function St({ children: e }) {
|
|
|
1524
1545
|
}
|
|
1525
1546
|
var Ct = {
|
|
1526
1547
|
success: C,
|
|
1527
|
-
error:
|
|
1548
|
+
error: de,
|
|
1528
1549
|
warning: g,
|
|
1529
|
-
info:
|
|
1550
|
+
info: M
|
|
1530
1551
|
}, wt = {
|
|
1531
1552
|
success: "bg-green",
|
|
1532
1553
|
error: "bg-red",
|
|
@@ -1553,11 +1574,11 @@ function Et({ toast: e, onDismiss: t }) {
|
|
|
1553
1574
|
"aria-live": a ? "assertive" : "polite",
|
|
1554
1575
|
className: "bg-bg-secondary border-border animate-slide-down pointer-events-auto relative w-80 overflow-hidden rounded-lg border shadow-lg",
|
|
1555
1576
|
children: [
|
|
1556
|
-
/* @__PURE__ */ p("div", { className:
|
|
1577
|
+
/* @__PURE__ */ p("div", { className: R("absolute top-1.5 bottom-1.5 left-0 w-[3px] rounded-md", wt[e.type]) }),
|
|
1557
1578
|
/* @__PURE__ */ m("div", {
|
|
1558
1579
|
className: "flex items-center gap-2.5 p-3 pl-3.5",
|
|
1559
1580
|
children: [
|
|
1560
|
-
/* @__PURE__ */ p(i, { className:
|
|
1581
|
+
/* @__PURE__ */ p(i, { className: R("h-4 w-4 shrink-0", Tt[e.type]) }),
|
|
1561
1582
|
/* @__PURE__ */ p("p", {
|
|
1562
1583
|
className: "text-text-primary flex-1 text-xs",
|
|
1563
1584
|
children: e.message
|
|
@@ -1565,7 +1586,7 @@ function Et({ toast: e, onDismiss: t }) {
|
|
|
1565
1586
|
/* @__PURE__ */ p("button", {
|
|
1566
1587
|
onClick: t,
|
|
1567
1588
|
className: "text-text-tertiary hover:text-text-primary flex h-5 w-5 cursor-pointer items-center justify-center rounded",
|
|
1568
|
-
children: /* @__PURE__ */ p(
|
|
1589
|
+
children: /* @__PURE__ */ p(F, { className: "h-3 w-3" })
|
|
1569
1590
|
})
|
|
1570
1591
|
]
|
|
1571
1592
|
}),
|
|
@@ -1583,12 +1604,12 @@ function Et({ toast: e, onDismiss: t }) {
|
|
|
1583
1604
|
//#region src/components/app-shell/Sidebar.tsx
|
|
1584
1605
|
var Dt = 140, Ot = 400, kt = 48;
|
|
1585
1606
|
function At({ item: e, collapsed: t, currentPath: n, onNavigate: r }) {
|
|
1586
|
-
let i =
|
|
1607
|
+
let i = Xe(e, n);
|
|
1587
1608
|
return /* @__PURE__ */ m("a", {
|
|
1588
1609
|
href: e.path,
|
|
1589
|
-
onClick: (t) =>
|
|
1610
|
+
onClick: (t) => B(t, e.path, r),
|
|
1590
1611
|
"aria-current": i ? "page" : void 0,
|
|
1591
|
-
className:
|
|
1612
|
+
className: R("font-navigation relative flex items-center gap-2 rounded px-2", "cursor-pointer transition-colors duration-[100ms]", t ? "mx-auto w-[2em] justify-center" : "", i ? "bg-accent-muted text-accent" : "text-text-secondary hover:text-text-primary hover:bg-bg-hover"),
|
|
1592
1613
|
style: { height: "2em" },
|
|
1593
1614
|
title: t ? e.label : void 0,
|
|
1594
1615
|
children: [
|
|
@@ -1604,8 +1625,12 @@ function At({ item: e, collapsed: t, currentPath: n, onNavigate: r }) {
|
|
|
1604
1625
|
children: /* @__PURE__ */ p(e.icon, { className: "h-3.5 w-3.5" })
|
|
1605
1626
|
}),
|
|
1606
1627
|
!t && /* @__PURE__ */ p("span", {
|
|
1607
|
-
className: "truncate text-xs",
|
|
1628
|
+
className: "min-w-0 flex-1 truncate text-xs",
|
|
1608
1629
|
children: e.label
|
|
1630
|
+
}),
|
|
1631
|
+
!t && e.badge && /* @__PURE__ */ p("span", {
|
|
1632
|
+
className: "ml-auto shrink-0",
|
|
1633
|
+
children: e.badge
|
|
1609
1634
|
})
|
|
1610
1635
|
]
|
|
1611
1636
|
});
|
|
@@ -1616,7 +1641,7 @@ function jt({ brand: e, collapsed: t }) {
|
|
|
1616
1641
|
className: "flex min-w-0 items-center gap-2 px-2",
|
|
1617
1642
|
children: e.logo
|
|
1618
1643
|
}) : /* @__PURE__ */ m("div", {
|
|
1619
|
-
className:
|
|
1644
|
+
className: R("flex min-w-0 items-center gap-2 px-2", t && "mx-auto justify-center px-0"),
|
|
1620
1645
|
children: [n ? /* @__PURE__ */ p(n, { className: "text-accent h-3.5 w-3.5 shrink-0" }) : t && r && /* @__PURE__ */ p("span", {
|
|
1621
1646
|
className: "text-accent shrink-0 text-xs font-bold",
|
|
1622
1647
|
children: r
|
|
@@ -1634,7 +1659,7 @@ function Nt({ collapsed: e, accounts: t, initialAccountIndex: n = 0, onAccountCh
|
|
|
1634
1659
|
bottom: 0,
|
|
1635
1660
|
left: 0
|
|
1636
1661
|
}), b = u(null), x = u(null);
|
|
1637
|
-
|
|
1662
|
+
G(l, i(() => h(!1), []), [x], [b]);
|
|
1638
1663
|
let C = t[g] ?? t[0], w = !!(a || o);
|
|
1639
1664
|
function T() {
|
|
1640
1665
|
if (!b.current) return;
|
|
@@ -1648,15 +1673,15 @@ function Nt({ collapsed: e, accounts: t, initialAccountIndex: n = 0, onAccountCh
|
|
|
1648
1673
|
_(t), r?.(e, t), h(!1);
|
|
1649
1674
|
}
|
|
1650
1675
|
function O() {
|
|
1651
|
-
h(!1), a ? a() : o &&
|
|
1676
|
+
h(!1), a ? a() : o && Ze(o, c);
|
|
1652
1677
|
}
|
|
1653
1678
|
return C ? /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ m("button", {
|
|
1654
1679
|
ref: b,
|
|
1655
1680
|
onClick: T,
|
|
1656
|
-
className:
|
|
1681
|
+
className: R("font-navigation flex w-full cursor-pointer items-center gap-2 rounded px-2 transition-colors duration-[100ms]", "text-text-secondary hover:text-text-primary hover:bg-bg-hover", e && "justify-center px-0"),
|
|
1657
1682
|
style: { height: "2.5em" },
|
|
1658
1683
|
title: e ? C.name : void 0,
|
|
1659
|
-
children: [/* @__PURE__ */ p(
|
|
1684
|
+
children: [/* @__PURE__ */ p(yt, {
|
|
1660
1685
|
name: C.name,
|
|
1661
1686
|
src: C.avatarSrc,
|
|
1662
1687
|
size: "sm"
|
|
@@ -1670,7 +1695,7 @@ function Nt({ collapsed: e, accounts: t, initialAccountIndex: n = 0, onAccountCh
|
|
|
1670
1695
|
children: Mt(C)
|
|
1671
1696
|
})]
|
|
1672
1697
|
}), /* @__PURE__ */ p(D, { className: "text-text-tertiary h-3 w-3 shrink-0" })] })]
|
|
1673
|
-
}), l &&
|
|
1698
|
+
}), l && I(/* @__PURE__ */ m("div", {
|
|
1674
1699
|
ref: x,
|
|
1675
1700
|
className: "bg-bg-tertiary border-border-strong animate-scale-in fixed z-[100] w-56 rounded-md border py-1 shadow-lg",
|
|
1676
1701
|
style: {
|
|
@@ -1686,7 +1711,7 @@ function Nt({ collapsed: e, accounts: t, initialAccountIndex: n = 0, onAccountCh
|
|
|
1686
1711
|
onClick: () => E(e, t),
|
|
1687
1712
|
className: "text-text-secondary hover:text-text-primary hover:bg-bg-hover font-navigation flex h-8 w-full cursor-pointer items-center gap-2.5 px-3 text-xs transition-colors duration-[100ms]",
|
|
1688
1713
|
children: [
|
|
1689
|
-
/* @__PURE__ */ p(
|
|
1714
|
+
/* @__PURE__ */ p(yt, {
|
|
1690
1715
|
name: e.name,
|
|
1691
1716
|
src: e.avatarSrc,
|
|
1692
1717
|
size: "sm"
|
|
@@ -1707,7 +1732,7 @@ function Nt({ collapsed: e, accounts: t, initialAccountIndex: n = 0, onAccountCh
|
|
|
1707
1732
|
w && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("div", { className: "border-border my-1 border-t" }), /* @__PURE__ */ m("button", {
|
|
1708
1733
|
onClick: O,
|
|
1709
1734
|
className: "text-text-secondary hover:text-text-primary hover:bg-bg-hover font-navigation flex h-7 w-full cursor-pointer items-center gap-2.5 px-3 text-xs transition-colors duration-[100ms]",
|
|
1710
|
-
children: [/* @__PURE__ */ p(
|
|
1735
|
+
children: [/* @__PURE__ */ p(te, { className: "h-3.5 w-3.5" }), /* @__PURE__ */ p("span", { children: s })]
|
|
1711
1736
|
})] })
|
|
1712
1737
|
]
|
|
1713
1738
|
}), document.body)] }) : null;
|
|
@@ -1716,8 +1741,8 @@ function Pt({ collapsed: e, settingsPath: t, settingsLabel: n = "All Settings",
|
|
|
1716
1741
|
let [o, s] = d(!1), [c, l] = d({
|
|
1717
1742
|
bottom: 0,
|
|
1718
1743
|
left: 0
|
|
1719
|
-
}), g = u(null), _ = u(null), { accentColor: v, setAccentColor: y, reducedMotion: b, setReducedMotion: x, colorMode: C, setColorMode: w } =
|
|
1720
|
-
|
|
1744
|
+
}), g = u(null), _ = u(null), { accentColor: v, setAccentColor: y, reducedMotion: b, setReducedMotion: x, colorMode: C, setColorMode: w } = K(), { toast: T } = xt(), E = !!(t || r);
|
|
1745
|
+
G(o, i(() => s(!1), []), [_], [g]);
|
|
1721
1746
|
function D() {
|
|
1722
1747
|
if (!g.current) return;
|
|
1723
1748
|
let e = g.current.getBoundingClientRect();
|
|
@@ -1727,19 +1752,19 @@ function Pt({ collapsed: e, settingsPath: t, settingsLabel: n = "All Settings",
|
|
|
1727
1752
|
}), s(!o);
|
|
1728
1753
|
}
|
|
1729
1754
|
function O() {
|
|
1730
|
-
s(!1), r ? r() : t &&
|
|
1755
|
+
s(!1), r ? r() : t && Ze(t, a);
|
|
1731
1756
|
}
|
|
1732
1757
|
return /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ m("button", {
|
|
1733
1758
|
ref: g,
|
|
1734
1759
|
onClick: D,
|
|
1735
|
-
className:
|
|
1760
|
+
className: R("font-navigation relative flex w-full items-center gap-2 rounded px-2", "cursor-pointer transition-colors duration-[100ms]", e ? "mx-auto w-[2em] justify-center" : "", o ? "bg-accent-muted text-accent" : "text-text-secondary hover:text-text-primary hover:bg-bg-hover"),
|
|
1736
1761
|
style: { height: "2em" },
|
|
1737
1762
|
title: e ? "Settings" : void 0,
|
|
1738
|
-
children: [/* @__PURE__ */ p(
|
|
1763
|
+
children: [/* @__PURE__ */ p(ce, { className: "h-3.5 w-3.5 shrink-0" }), !e && /* @__PURE__ */ p("span", {
|
|
1739
1764
|
className: "truncate text-xs",
|
|
1740
1765
|
children: "Settings"
|
|
1741
1766
|
})]
|
|
1742
|
-
}), o &&
|
|
1767
|
+
}), o && I(/* @__PURE__ */ m("div", {
|
|
1743
1768
|
ref: _,
|
|
1744
1769
|
className: "bg-bg-tertiary border-border-strong animate-scale-in fixed z-[100] w-64 rounded-md border py-1 shadow-lg",
|
|
1745
1770
|
style: {
|
|
@@ -1755,17 +1780,17 @@ function Pt({ collapsed: e, settingsPath: t, settingsLabel: n = "All Settings",
|
|
|
1755
1780
|
{
|
|
1756
1781
|
value: "dark",
|
|
1757
1782
|
label: "Dark",
|
|
1758
|
-
Icon:
|
|
1783
|
+
Icon: P
|
|
1759
1784
|
},
|
|
1760
1785
|
{
|
|
1761
1786
|
value: "light",
|
|
1762
1787
|
label: "Light",
|
|
1763
|
-
Icon:
|
|
1788
|
+
Icon: le
|
|
1764
1789
|
},
|
|
1765
1790
|
{
|
|
1766
1791
|
value: "system",
|
|
1767
1792
|
label: "System",
|
|
1768
|
-
Icon:
|
|
1793
|
+
Icon: N
|
|
1769
1794
|
}
|
|
1770
1795
|
].map(({ value: e, label: t, Icon: n }) => /* @__PURE__ */ m("button", {
|
|
1771
1796
|
onClick: () => w(e),
|
|
@@ -1786,9 +1811,9 @@ function Pt({ collapsed: e, settingsPath: t, settingsLabel: n = "All Settings",
|
|
|
1786
1811
|
}),
|
|
1787
1812
|
/* @__PURE__ */ p("div", {
|
|
1788
1813
|
className: "flex flex-wrap gap-1.5 px-3 pb-2",
|
|
1789
|
-
children:
|
|
1814
|
+
children: mt.map((e) => /* @__PURE__ */ p("button", {
|
|
1790
1815
|
onClick: () => y(e.value),
|
|
1791
|
-
className:
|
|
1816
|
+
className: R("h-5 w-5 cursor-pointer rounded-full transition-transform duration-[100ms] hover:scale-110", v === e.value && "ring-offset-bg-tertiary scale-110 ring-2 ring-offset-1"),
|
|
1792
1817
|
style: {
|
|
1793
1818
|
backgroundColor: e.color,
|
|
1794
1819
|
...v === e.value ? { "--utility-ring-color": e.color } : {}
|
|
@@ -1814,7 +1839,7 @@ function Pt({ collapsed: e, settingsPath: t, settingsLabel: n = "All Settings",
|
|
|
1814
1839
|
E && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("div", { className: "border-border my-1 border-t" }), /* @__PURE__ */ m("button", {
|
|
1815
1840
|
onClick: O,
|
|
1816
1841
|
className: "text-text-secondary hover:text-text-primary hover:bg-bg-hover font-navigation flex h-7 w-full cursor-pointer items-center gap-2.5 px-3 text-xs transition-colors duration-[100ms]",
|
|
1817
|
-
children: [/* @__PURE__ */ p(
|
|
1842
|
+
children: [/* @__PURE__ */ p(ce, { className: "h-3.5 w-3.5 shrink-0" }), /* @__PURE__ */ p("span", {
|
|
1818
1843
|
className: "flex-1 text-left",
|
|
1819
1844
|
children: n
|
|
1820
1845
|
})]
|
|
@@ -1822,32 +1847,32 @@ function Pt({ collapsed: e, settingsPath: t, settingsLabel: n = "All Settings",
|
|
|
1822
1847
|
]
|
|
1823
1848
|
}), document.body)] });
|
|
1824
1849
|
}
|
|
1825
|
-
function Ft({ navSections: e, brand: t, accounts: n = [], initialAccountIndex: r, onAccountChange: a, onSignOut: o, signOutPath: s, signOutLabel: c, settingsPath: l, settingsLabel: f, onOpenSettings: h, currentPath: g, onNavigate: _,
|
|
1826
|
-
let { sidebarCollapsed:
|
|
1827
|
-
if (
|
|
1828
|
-
e.preventDefault(),
|
|
1850
|
+
function Ft({ navSections: e, brand: t, accounts: n = [], initialAccountIndex: r, onAccountChange: a, onSignOut: o, signOutPath: s, signOutLabel: c, settingsPath: l, settingsLabel: f, onOpenSettings: h, currentPath: g, onNavigate: _, headerActions: v, className: y }) {
|
|
1851
|
+
let { sidebarCollapsed: b, sidebarWidth: x, setSidebarWidth: S } = K(), [C, T] = d(/* @__PURE__ */ new Set()), E = u(null), D = u(!1), O = i((e) => {
|
|
1852
|
+
if (b) return;
|
|
1853
|
+
e.preventDefault(), D.current = !0, document.body.style.cursor = "col-resize", document.body.style.userSelect = "none";
|
|
1829
1854
|
let t = (e) => {
|
|
1830
|
-
if (!
|
|
1831
|
-
let t =
|
|
1832
|
-
|
|
1855
|
+
if (!D.current || !E.current) return;
|
|
1856
|
+
let t = E.current.getBoundingClientRect(), n = e.clientX - t.left;
|
|
1857
|
+
S(Math.max(Dt, Math.min(n, Ot)));
|
|
1833
1858
|
}, n = () => {
|
|
1834
|
-
|
|
1859
|
+
D.current = !1, document.body.style.cursor = "", document.body.style.userSelect = "", document.removeEventListener("mousemove", t), document.removeEventListener("mouseup", n);
|
|
1835
1860
|
};
|
|
1836
1861
|
document.addEventListener("mousemove", t), document.addEventListener("mouseup", n);
|
|
1837
|
-
}, [
|
|
1838
|
-
function
|
|
1839
|
-
|
|
1862
|
+
}, [b, S]);
|
|
1863
|
+
function k(e) {
|
|
1864
|
+
T((t) => {
|
|
1840
1865
|
let n = new Set(t);
|
|
1841
1866
|
return n.has(e) ? n.delete(e) : n.add(e), n;
|
|
1842
1867
|
});
|
|
1843
1868
|
}
|
|
1844
1869
|
return /* @__PURE__ */ m("aside", {
|
|
1845
|
-
ref:
|
|
1846
|
-
className:
|
|
1847
|
-
style: { width:
|
|
1870
|
+
ref: E,
|
|
1871
|
+
className: R("bg-bg-secondary relative hidden shrink-0 flex-col border-r md:flex", "transition-[width] duration-[200ms] ease-out", "border-border", y),
|
|
1872
|
+
style: { width: b ? kt : x },
|
|
1848
1873
|
children: [
|
|
1849
|
-
!
|
|
1850
|
-
onMouseDown:
|
|
1874
|
+
!b && /* @__PURE__ */ p("div", {
|
|
1875
|
+
onMouseDown: O,
|
|
1851
1876
|
className: "hover:bg-accent/30 active:bg-accent/50 absolute top-0 right-0 bottom-0 z-10 w-1 cursor-col-resize"
|
|
1852
1877
|
}),
|
|
1853
1878
|
/* @__PURE__ */ p("div", {
|
|
@@ -1855,17 +1880,21 @@ function Ft({ navSections: e, brand: t, accounts: n = [], initialAccountIndex: r
|
|
|
1855
1880
|
style: { height: "var(--topbar-height)" },
|
|
1856
1881
|
children: /* @__PURE__ */ p(jt, {
|
|
1857
1882
|
brand: t,
|
|
1858
|
-
collapsed:
|
|
1883
|
+
collapsed: b
|
|
1859
1884
|
})
|
|
1860
1885
|
}),
|
|
1886
|
+
!b && v && /* @__PURE__ */ p("div", {
|
|
1887
|
+
className: "border-border shrink-0 border-b px-2 py-2",
|
|
1888
|
+
children: v
|
|
1889
|
+
}),
|
|
1861
1890
|
/* @__PURE__ */ p("nav", {
|
|
1862
1891
|
className: "flex-1 overflow-y-auto px-2 py-2",
|
|
1863
1892
|
children: e.map((e, t) => {
|
|
1864
|
-
let n =
|
|
1893
|
+
let n = C.has(e.title);
|
|
1865
1894
|
return /* @__PURE__ */ m("div", {
|
|
1866
1895
|
className: "mb-4",
|
|
1867
|
-
children: [
|
|
1868
|
-
onClick: () =>
|
|
1896
|
+
children: [b ? t > 0 && /* @__PURE__ */ p("hr", { className: "border-border mx-auto my-1.5 w-4/5" }) : /* @__PURE__ */ m("button", {
|
|
1897
|
+
onClick: () => k(e.title),
|
|
1869
1898
|
className: "text-2xs-f text-text-tertiary hover:text-text-secondary font-label flex w-full cursor-pointer items-center gap-1 px-2 text-left font-semibold tracking-wider uppercase",
|
|
1870
1899
|
style: {
|
|
1871
1900
|
paddingTop: "0.35em",
|
|
@@ -1874,12 +1903,12 @@ function Ft({ navSections: e, brand: t, accounts: n = [], initialAccountIndex: r
|
|
|
1874
1903
|
children: [/* @__PURE__ */ p("span", {
|
|
1875
1904
|
className: "min-w-0 flex-1",
|
|
1876
1905
|
children: e.title
|
|
1877
|
-
}), /* @__PURE__ */ p(w, { className:
|
|
1878
|
-
}), (!n ||
|
|
1906
|
+
}), /* @__PURE__ */ p(w, { className: R("h-3 w-3 shrink-0 transition-transform", n && "-rotate-90") })]
|
|
1907
|
+
}), (!n || b) && /* @__PURE__ */ p("ul", {
|
|
1879
1908
|
className: "flex flex-col gap-1",
|
|
1880
1909
|
children: e.items.map((e) => /* @__PURE__ */ p("li", { children: /* @__PURE__ */ p(At, {
|
|
1881
1910
|
item: e,
|
|
1882
|
-
collapsed:
|
|
1911
|
+
collapsed: b,
|
|
1883
1912
|
currentPath: g,
|
|
1884
1913
|
onNavigate: _
|
|
1885
1914
|
}) }, e.path))
|
|
@@ -1890,7 +1919,7 @@ function Ft({ navSections: e, brand: t, accounts: n = [], initialAccountIndex: r
|
|
|
1890
1919
|
/* @__PURE__ */ m("div", {
|
|
1891
1920
|
className: "shrink-0 px-2 py-1.5",
|
|
1892
1921
|
children: [/* @__PURE__ */ p(Pt, {
|
|
1893
|
-
collapsed:
|
|
1922
|
+
collapsed: b,
|
|
1894
1923
|
settingsPath: l,
|
|
1895
1924
|
settingsLabel: f,
|
|
1896
1925
|
onOpenSettings: h,
|
|
@@ -1898,7 +1927,7 @@ function Ft({ navSections: e, brand: t, accounts: n = [], initialAccountIndex: r
|
|
|
1898
1927
|
}), n.length > 0 && /* @__PURE__ */ p("div", {
|
|
1899
1928
|
className: "border-border mt-2 border-t pt-2",
|
|
1900
1929
|
children: /* @__PURE__ */ p(Nt, {
|
|
1901
|
-
collapsed:
|
|
1930
|
+
collapsed: b,
|
|
1902
1931
|
accounts: n,
|
|
1903
1932
|
initialAccountIndex: r,
|
|
1904
1933
|
onAccountChange: a,
|
|
@@ -1930,7 +1959,7 @@ function Lt({ homeLabel: e = "Dashboard", labels: t = {}, parents: n = {}, curre
|
|
|
1930
1959
|
})];
|
|
1931
1960
|
return /* @__PURE__ */ p("nav", {
|
|
1932
1961
|
"aria-label": "Breadcrumb",
|
|
1933
|
-
className:
|
|
1962
|
+
className: R("font-navigation flex items-center gap-1 text-xs", a),
|
|
1934
1963
|
children: s.map((e, t) => {
|
|
1935
1964
|
let n = t === s.length - 1;
|
|
1936
1965
|
return /* @__PURE__ */ m("span", {
|
|
@@ -1940,8 +1969,8 @@ function Lt({ homeLabel: e = "Dashboard", labels: t = {}, parents: n = {}, curre
|
|
|
1940
1969
|
children: e.label
|
|
1941
1970
|
}) : /* @__PURE__ */ p("a", {
|
|
1942
1971
|
href: e.path,
|
|
1943
|
-
onClick: (t) =>
|
|
1944
|
-
className:
|
|
1972
|
+
onClick: (t) => B(t, e.path, i),
|
|
1973
|
+
className: R("text-text-tertiary hover:text-text-primary cursor-pointer transition-colors duration-[100ms]"),
|
|
1945
1974
|
children: e.label
|
|
1946
1975
|
})]
|
|
1947
1976
|
}, e.path);
|
|
@@ -1951,9 +1980,9 @@ function Lt({ homeLabel: e = "Dashboard", labels: t = {}, parents: n = {}, curre
|
|
|
1951
1980
|
//#endregion
|
|
1952
1981
|
//#region src/hooks/useApplyTheme.ts
|
|
1953
1982
|
function Rt() {
|
|
1954
|
-
let { setPreferredDarkTheme: e, setPreferredLightTheme: t, setColorMode: n } =
|
|
1983
|
+
let { setPreferredDarkTheme: e, setPreferredLightTheme: t, setColorMode: n } = K();
|
|
1955
1984
|
return i((r) => {
|
|
1956
|
-
|
|
1985
|
+
H(r) ? (t(r), n("light")) : (e(r), n("dark"));
|
|
1957
1986
|
}, [
|
|
1958
1987
|
e,
|
|
1959
1988
|
t,
|
|
@@ -1969,14 +1998,17 @@ var zt = {
|
|
|
1969
1998
|
ghost: "text-text-secondary hover:text-text-primary hover:bg-bg-hover",
|
|
1970
1999
|
icon: "text-text-tertiary hover:text-text-primary hover:bg-bg-hover"
|
|
1971
2000
|
}, Bt = {
|
|
2001
|
+
xs: "h-6 px-2 text-2xs gap-1",
|
|
1972
2002
|
sm: "h-7 px-2.5 text-xs gap-1.5",
|
|
1973
2003
|
md: "h-8 px-3 text-xs gap-2",
|
|
1974
2004
|
lg: "h-9 px-4 text-sm gap-2"
|
|
1975
2005
|
}, Vt = {
|
|
2006
|
+
xs: "h-6 w-6",
|
|
1976
2007
|
sm: "h-7 w-7",
|
|
1977
2008
|
md: "h-8 w-8",
|
|
1978
2009
|
lg: "h-9 w-9"
|
|
1979
2010
|
}, Ht = {
|
|
2011
|
+
xs: "h-3 w-3",
|
|
1980
2012
|
sm: "h-3.5 w-3.5",
|
|
1981
2013
|
md: "h-3.5 w-3.5",
|
|
1982
2014
|
lg: "h-4 w-4"
|
|
@@ -1986,16 +2018,19 @@ var zt = {
|
|
|
1986
2018
|
lg: "hidden lg:inline"
|
|
1987
2019
|
}, Wt = {
|
|
1988
2020
|
sm: {
|
|
2021
|
+
xs: "px-1 sm:px-2",
|
|
1989
2022
|
sm: "px-1.5 sm:px-2.5",
|
|
1990
2023
|
md: "px-2 sm:px-3",
|
|
1991
2024
|
lg: "px-2.5 sm:px-4"
|
|
1992
2025
|
},
|
|
1993
2026
|
md: {
|
|
2027
|
+
xs: "px-1 md:px-2",
|
|
1994
2028
|
sm: "px-1.5 md:px-2.5",
|
|
1995
2029
|
md: "px-2 md:px-3",
|
|
1996
2030
|
lg: "px-2.5 md:px-4"
|
|
1997
2031
|
},
|
|
1998
2032
|
lg: {
|
|
2033
|
+
xs: "px-1 lg:px-2",
|
|
1999
2034
|
sm: "px-1.5 lg:px-2.5",
|
|
2000
2035
|
md: "px-2 lg:px-3",
|
|
2001
2036
|
lg: "px-2.5 lg:px-4"
|
|
@@ -2005,10 +2040,10 @@ var zt = {
|
|
|
2005
2040
|
return /* @__PURE__ */ m("button", {
|
|
2006
2041
|
ref: l,
|
|
2007
2042
|
disabled: s || n,
|
|
2008
|
-
className:
|
|
2043
|
+
className: R("inline-flex items-center justify-center rounded-md font-medium", "font-control", "transition-colors duration-[100ms] ease-out", "cursor-pointer", "disabled:cursor-not-allowed disabled:opacity-40", "focus-visible:outline-accent focus-visible:outline-2 focus-visible:outline-offset-2", zt[e], u ? Vt[t] : Bt[t], d && !u && Wt[d]?.[t], a),
|
|
2009
2044
|
...c,
|
|
2010
2045
|
children: [
|
|
2011
|
-
n && /* @__PURE__ */ p(
|
|
2046
|
+
n && /* @__PURE__ */ p(ee, { className: "h-3.5 w-3.5 animate-spin" }),
|
|
2012
2047
|
r && !n && /* @__PURE__ */ p(r, { className: Ht[t] }),
|
|
2013
2048
|
o && (d ? /* @__PURE__ */ p("span", {
|
|
2014
2049
|
className: Ut[d],
|
|
@@ -2022,7 +2057,7 @@ q.displayName = "Button";
|
|
|
2022
2057
|
//#region src/components/ui/SectionHeader.tsx
|
|
2023
2058
|
function J({ children: e, as: t = "h2", className: n, border: r = !0 }) {
|
|
2024
2059
|
return /* @__PURE__ */ p(t, {
|
|
2025
|
-
className:
|
|
2060
|
+
className: R("text-text-primary font-heading text-xs font-semibold", r && "border-border border-b pb-2", n),
|
|
2026
2061
|
children: e
|
|
2027
2062
|
});
|
|
2028
2063
|
}
|
|
@@ -2040,7 +2075,7 @@ function Gt(e, t, n) {
|
|
|
2040
2075
|
//#region src/components/ui/SelectDropdown.tsx
|
|
2041
2076
|
function Y({ options: e, value: t, onChange: n, label: r, placeholder: a = "Select...", className: o, size: c = "md" }) {
|
|
2042
2077
|
let [l, f] = d(!1), [h, g] = d(-1), _ = u(null), v = u(null), y = Gt(l, _, v), b = s(), x = `${b}-listbox`, C = e.find((e) => e.value === t);
|
|
2043
|
-
|
|
2078
|
+
G(l, i(() => f(!1), []), [_]);
|
|
2044
2079
|
function T() {
|
|
2045
2080
|
if (!l) {
|
|
2046
2081
|
let n = e.findIndex((e) => e.value === t);
|
|
@@ -2073,7 +2108,7 @@ function Y({ options: e, value: t, onChange: n, label: r, placeholder: a = "Sele
|
|
|
2073
2108
|
}
|
|
2074
2109
|
}
|
|
2075
2110
|
return /* @__PURE__ */ m("div", {
|
|
2076
|
-
className:
|
|
2111
|
+
className: R("flex flex-col gap-1.5", o),
|
|
2077
2112
|
ref: _,
|
|
2078
2113
|
children: [r && /* @__PURE__ */ p("span", {
|
|
2079
2114
|
className: "text-text-secondary font-label text-xs font-medium",
|
|
@@ -2089,16 +2124,16 @@ function Y({ options: e, value: t, onChange: n, label: r, placeholder: a = "Sele
|
|
|
2089
2124
|
"aria-expanded": l,
|
|
2090
2125
|
"aria-controls": l ? x : void 0,
|
|
2091
2126
|
"aria-activedescendant": l && h >= 0 ? `${b}-option-${h}` : void 0,
|
|
2092
|
-
className:
|
|
2127
|
+
className: R("font-control flex w-full cursor-pointer items-center rounded-md text-xs", "bg-bg-secondary border-border text-text-primary border", "hover:bg-bg-hover hover:border-border-strong", "transition-colors duration-[100ms]", "focus-visible:outline-accent focus-visible:outline-2 focus-visible:outline-offset-2", c === "sm" ? "h-6 px-2 pr-6" : "h-7 px-2 pr-7"),
|
|
2093
2128
|
children: C ? C.label : /* @__PURE__ */ p("span", {
|
|
2094
2129
|
className: "text-text-disabled",
|
|
2095
2130
|
children: a
|
|
2096
2131
|
})
|
|
2097
2132
|
}),
|
|
2098
|
-
/* @__PURE__ */ p(w, { className:
|
|
2133
|
+
/* @__PURE__ */ p(w, { className: R("text-text-tertiary pointer-events-none absolute top-1/2 h-3 w-3 -translate-y-1/2 transition-transform", c === "sm" ? "right-1.5" : "right-2", l && "rotate-180") }),
|
|
2099
2134
|
l && /* @__PURE__ */ p("div", {
|
|
2100
2135
|
ref: v,
|
|
2101
|
-
className:
|
|
2136
|
+
className: R("bg-bg-tertiary border-border-strong animate-scale-in absolute right-0 left-0 z-[100] overflow-hidden rounded-md border shadow-lg", y ? "bottom-full mb-1" : "top-full mt-1"),
|
|
2102
2137
|
children: /* @__PURE__ */ p("ul", {
|
|
2103
2138
|
id: x,
|
|
2104
2139
|
className: "max-h-48 overflow-y-auto py-1",
|
|
@@ -2111,7 +2146,7 @@ function Y({ options: e, value: t, onChange: n, label: r, placeholder: a = "Sele
|
|
|
2111
2146
|
n(e.value), f(!1);
|
|
2112
2147
|
},
|
|
2113
2148
|
onMouseEnter: () => g(r),
|
|
2114
|
-
className:
|
|
2149
|
+
className: R("font-control flex h-7 w-full cursor-pointer items-center gap-2 px-3 text-xs", "transition-colors duration-[100ms]", r === h ? "bg-accent-muted text-accent" : e.value === t ? "text-accent" : "text-text-secondary hover:text-text-primary hover:bg-bg-hover"),
|
|
2115
2150
|
children: [/* @__PURE__ */ p("span", {
|
|
2116
2151
|
className: "flex-1 truncate",
|
|
2117
2152
|
children: e.label
|
|
@@ -2128,7 +2163,7 @@ function Y({ options: e, value: t, onChange: n, label: r, placeholder: a = "Sele
|
|
|
2128
2163
|
function X({ min: e, max: t, step: n = 1, value: r, onChange: i, onCommit: a, label: o, showValue: s, className: c }) {
|
|
2129
2164
|
let l = (r - e) / (t - e) * 100;
|
|
2130
2165
|
return /* @__PURE__ */ m("div", {
|
|
2131
|
-
className:
|
|
2166
|
+
className: R("flex flex-col gap-1.5", c),
|
|
2132
2167
|
children: [(o || s) && /* @__PURE__ */ m("div", {
|
|
2133
2168
|
className: "flex items-center justify-between",
|
|
2134
2169
|
children: [o && /* @__PURE__ */ p("span", {
|
|
@@ -2157,7 +2192,7 @@ function Kt({ label: e, active: t, icon: n, preview: r, onClick: i, className: a
|
|
|
2157
2192
|
return /* @__PURE__ */ m("button", {
|
|
2158
2193
|
type: "button",
|
|
2159
2194
|
onClick: i,
|
|
2160
|
-
className:
|
|
2195
|
+
className: R("flex cursor-pointer flex-col items-center gap-2 rounded-md border p-3 transition-colors duration-[100ms]", t ? "border-accent bg-accent-muted" : "border-border bg-bg-secondary hover:bg-bg-hover hover:border-border-strong", a),
|
|
2161
2196
|
children: [/* @__PURE__ */ p("div", {
|
|
2162
2197
|
className: "border-border-strong/20 flex h-10 w-full items-center justify-center rounded border",
|
|
2163
2198
|
style: { backgroundColor: r?.bg },
|
|
@@ -2178,7 +2213,7 @@ function Kt({ label: e, active: t, icon: n, preview: r, onClick: i, className: a
|
|
|
2178
2213
|
//#region src/components/ui/Toggle.tsx
|
|
2179
2214
|
function qt({ checked: e, onChange: t, disabled: n, label: r, className: i }) {
|
|
2180
2215
|
return /* @__PURE__ */ m("label", {
|
|
2181
|
-
className:
|
|
2216
|
+
className: R("flex w-fit items-center", n ? "cursor-not-allowed opacity-40" : "cursor-pointer", i),
|
|
2182
2217
|
style: { gap: 10 },
|
|
2183
2218
|
children: [/* @__PURE__ */ p("button", {
|
|
2184
2219
|
type: "button",
|
|
@@ -2186,7 +2221,7 @@ function qt({ checked: e, onChange: t, disabled: n, label: r, className: i }) {
|
|
|
2186
2221
|
"aria-checked": e,
|
|
2187
2222
|
disabled: n,
|
|
2188
2223
|
onClick: () => t(!e),
|
|
2189
|
-
className:
|
|
2224
|
+
className: R("relative shrink-0 rounded-full border transition-colors duration-[100ms]", "focus-visible:outline-accent focus-visible:outline-2 focus-visible:outline-offset-2", e ? "bg-accent border-accent" : "bg-bg-tertiary border-border", !n && "cursor-pointer"),
|
|
2190
2225
|
style: {
|
|
2191
2226
|
width: 36,
|
|
2192
2227
|
height: 20
|
|
@@ -2219,27 +2254,27 @@ var Xt = [
|
|
|
2219
2254
|
{
|
|
2220
2255
|
value: "dark",
|
|
2221
2256
|
label: "Dark",
|
|
2222
|
-
Icon:
|
|
2257
|
+
Icon: P
|
|
2223
2258
|
},
|
|
2224
2259
|
{
|
|
2225
2260
|
value: "light",
|
|
2226
2261
|
label: "Light",
|
|
2227
|
-
Icon:
|
|
2262
|
+
Icon: le
|
|
2228
2263
|
},
|
|
2229
2264
|
{
|
|
2230
2265
|
value: "system",
|
|
2231
2266
|
label: "System",
|
|
2232
|
-
Icon:
|
|
2267
|
+
Icon: N
|
|
2233
2268
|
}
|
|
2234
2269
|
];
|
|
2235
2270
|
function Zt({ className: e, respondToOpenEvent: t = !0 }) {
|
|
2236
2271
|
let [n, r] = d(!1), [a, s] = d(!1), [c, l] = d({
|
|
2237
2272
|
top: 0,
|
|
2238
2273
|
right: 0
|
|
2239
|
-
}), h = u(null), g = u(null), _ =
|
|
2274
|
+
}), h = u(null), g = u(null), _ = K(), v = Rt(), { toast: y } = xt(), b = i(() => {
|
|
2240
2275
|
r(!1), s(!1);
|
|
2241
2276
|
}, []);
|
|
2242
|
-
|
|
2277
|
+
G(n, b, [g], [h], { outsideClick: !a });
|
|
2243
2278
|
let x = i(() => {
|
|
2244
2279
|
if (!h.current) return;
|
|
2245
2280
|
let e = h.current.getBoundingClientRect();
|
|
@@ -2266,7 +2301,7 @@ function Zt({ className: e, respondToOpenEvent: t = !0 }) {
|
|
|
2266
2301
|
window.removeEventListener("resize", x), window.removeEventListener("scroll", x, !0);
|
|
2267
2302
|
};
|
|
2268
2303
|
}, [n, x]);
|
|
2269
|
-
let { colorMode: C, setColorMode: w, preferredDarkTheme: T, preferredLightTheme: E, accentColor: D, setAccentColor: O, fontSize: k, setFontSize: A, uiFont:
|
|
2304
|
+
let { colorMode: C, setColorMode: w, preferredDarkTheme: T, preferredLightTheme: E, accentColor: D, setAccentColor: O, fontSize: k, setFontSize: A, uiFont: j, setUiFont: M, headingFont: ee, setHeadingFont: te, proseFont: ne, setProseFont: re, codeFont: N, setCodeFont: P, borderRadius: ae, setBorderRadius: oe, borderWidth: se, setBorderWidth: ce, tracking: le, setTracking: ue, lineHeight: F, setLineHeight: de, density: fe, setDensity: L, reducedMotion: pe, setReducedMotion: me, saveThemeCustomization: he, resetThemeCustomization: ge, hasThemeOverrides: _e, isCustomized: ve, resolvedTheme: ye } = _;
|
|
2270
2305
|
return /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("button", {
|
|
2271
2306
|
ref: h,
|
|
2272
2307
|
onClick: S,
|
|
@@ -2274,9 +2309,9 @@ function Zt({ className: e, respondToOpenEvent: t = !0 }) {
|
|
|
2274
2309
|
"aria-haspopup": "dialog",
|
|
2275
2310
|
"aria-expanded": n,
|
|
2276
2311
|
title: "Theme",
|
|
2277
|
-
className:
|
|
2278
|
-
children: /* @__PURE__ */ p(
|
|
2279
|
-
}), n &&
|
|
2312
|
+
className: R("flex h-7 w-7 cursor-pointer items-center justify-center rounded transition-colors duration-[100ms]", n ? "text-accent bg-accent-muted" : "text-text-tertiary hover:text-text-primary hover:bg-bg-hover", e),
|
|
2313
|
+
children: /* @__PURE__ */ p(ie, { className: "h-4 w-4" })
|
|
2314
|
+
}), n && I(/* @__PURE__ */ p("div", {
|
|
2280
2315
|
ref: g,
|
|
2281
2316
|
role: "dialog",
|
|
2282
2317
|
"aria-label": "Theme settings",
|
|
@@ -2298,7 +2333,7 @@ function Zt({ className: e, respondToOpenEvent: t = !0 }) {
|
|
|
2298
2333
|
className: "bg-bg-secondary border-border flex gap-1 rounded-md border p-1.5",
|
|
2299
2334
|
children: Xt.map(({ value: e, label: t, Icon: n }) => /* @__PURE__ */ m("button", {
|
|
2300
2335
|
onClick: () => w(e),
|
|
2301
|
-
className:
|
|
2336
|
+
className: R("font-navigation flex flex-1 cursor-pointer items-center justify-center gap-1.5 rounded px-2 py-1 text-xs transition-colors duration-[100ms]", C === e ? "bg-accent-muted text-accent" : "text-text-secondary hover:text-text-primary hover:bg-bg-hover"),
|
|
2302
2337
|
children: [/* @__PURE__ */ p(n, { className: "h-3.5 w-3.5" }), t]
|
|
2303
2338
|
}, e))
|
|
2304
2339
|
})] }),
|
|
@@ -2309,7 +2344,7 @@ function Zt({ className: e, respondToOpenEvent: t = !0 }) {
|
|
|
2309
2344
|
children: "Dark themes"
|
|
2310
2345
|
}), /* @__PURE__ */ p("div", {
|
|
2311
2346
|
className: "grid grid-cols-2 gap-2",
|
|
2312
|
-
children:
|
|
2347
|
+
children: dt.map((e) => /* @__PURE__ */ p(Kt, {
|
|
2313
2348
|
label: e.label,
|
|
2314
2349
|
icon: e.icon,
|
|
2315
2350
|
preview: e.preview,
|
|
@@ -2324,7 +2359,7 @@ function Zt({ className: e, respondToOpenEvent: t = !0 }) {
|
|
|
2324
2359
|
children: "Light themes"
|
|
2325
2360
|
}), /* @__PURE__ */ p("div", {
|
|
2326
2361
|
className: "grid grid-cols-2 gap-2",
|
|
2327
|
-
children:
|
|
2362
|
+
children: ut.map((e) => /* @__PURE__ */ p(Kt, {
|
|
2328
2363
|
label: e.label,
|
|
2329
2364
|
icon: e.icon,
|
|
2330
2365
|
preview: e.preview,
|
|
@@ -2339,9 +2374,9 @@ function Zt({ className: e, respondToOpenEvent: t = !0 }) {
|
|
|
2339
2374
|
children: "Accent"
|
|
2340
2375
|
}), /* @__PURE__ */ p("div", {
|
|
2341
2376
|
className: "flex flex-wrap gap-1.5",
|
|
2342
|
-
children:
|
|
2377
|
+
children: mt.map((e) => /* @__PURE__ */ p("button", {
|
|
2343
2378
|
onClick: () => O(e.value),
|
|
2344
|
-
className:
|
|
2379
|
+
className: R("h-6 w-6 cursor-pointer rounded-full transition-transform duration-[100ms] hover:scale-110", D === e.value && "ring-offset-bg-tertiary scale-110 ring-2 ring-offset-1"),
|
|
2345
2380
|
style: {
|
|
2346
2381
|
backgroundColor: e.color,
|
|
2347
2382
|
...D === e.value ? { "--utility-ring-color": e.color } : {}
|
|
@@ -2361,30 +2396,30 @@ function Zt({ className: e, respondToOpenEvent: t = !0 }) {
|
|
|
2361
2396
|
/* @__PURE__ */ p(Y, {
|
|
2362
2397
|
label: "UI / Body",
|
|
2363
2398
|
size: "sm",
|
|
2364
|
-
options:
|
|
2365
|
-
value:
|
|
2366
|
-
onChange: (e) =>
|
|
2399
|
+
options: W,
|
|
2400
|
+
value: j,
|
|
2401
|
+
onChange: (e) => M(e)
|
|
2367
2402
|
}),
|
|
2368
2403
|
/* @__PURE__ */ p(Y, {
|
|
2369
2404
|
label: "Headings",
|
|
2370
2405
|
size: "sm",
|
|
2371
|
-
options:
|
|
2372
|
-
value:
|
|
2373
|
-
onChange: (e) =>
|
|
2406
|
+
options: W,
|
|
2407
|
+
value: ee,
|
|
2408
|
+
onChange: (e) => te(e)
|
|
2374
2409
|
}),
|
|
2375
2410
|
/* @__PURE__ */ p(Y, {
|
|
2376
2411
|
label: "Prose",
|
|
2377
2412
|
size: "sm",
|
|
2378
|
-
options:
|
|
2379
|
-
value:
|
|
2380
|
-
onChange: (e) =>
|
|
2413
|
+
options: W,
|
|
2414
|
+
value: ne,
|
|
2415
|
+
onChange: (e) => re(e)
|
|
2381
2416
|
}),
|
|
2382
2417
|
/* @__PURE__ */ p(Y, {
|
|
2383
2418
|
label: "Code",
|
|
2384
2419
|
size: "sm",
|
|
2385
|
-
options:
|
|
2386
|
-
value:
|
|
2387
|
-
onChange: (e) =>
|
|
2420
|
+
options: W,
|
|
2421
|
+
value: N,
|
|
2422
|
+
onChange: (e) => P(e)
|
|
2388
2423
|
})
|
|
2389
2424
|
]
|
|
2390
2425
|
})] }),
|
|
@@ -2403,16 +2438,16 @@ function Zt({ className: e, respondToOpenEvent: t = !0 }) {
|
|
|
2403
2438
|
label: "Corner radius",
|
|
2404
2439
|
min: 0,
|
|
2405
2440
|
max: 16,
|
|
2406
|
-
value:
|
|
2407
|
-
onChange:
|
|
2441
|
+
value: ae,
|
|
2442
|
+
onChange: oe,
|
|
2408
2443
|
showValue: !0
|
|
2409
2444
|
}),
|
|
2410
2445
|
/* @__PURE__ */ p(X, {
|
|
2411
2446
|
label: "Border width",
|
|
2412
2447
|
min: 1,
|
|
2413
2448
|
max: 3,
|
|
2414
|
-
value:
|
|
2415
|
-
onChange:
|
|
2449
|
+
value: se,
|
|
2450
|
+
onChange: ce,
|
|
2416
2451
|
showValue: !0
|
|
2417
2452
|
}),
|
|
2418
2453
|
/* @__PURE__ */ p(X, {
|
|
@@ -2420,8 +2455,8 @@ function Zt({ className: e, respondToOpenEvent: t = !0 }) {
|
|
|
2420
2455
|
min: 0,
|
|
2421
2456
|
max: .3,
|
|
2422
2457
|
step: .01,
|
|
2423
|
-
value:
|
|
2424
|
-
onChange:
|
|
2458
|
+
value: le,
|
|
2459
|
+
onChange: ue,
|
|
2425
2460
|
showValue: !0
|
|
2426
2461
|
}),
|
|
2427
2462
|
/* @__PURE__ */ p(X, {
|
|
@@ -2429,8 +2464,8 @@ function Zt({ className: e, respondToOpenEvent: t = !0 }) {
|
|
|
2429
2464
|
min: 1.2,
|
|
2430
2465
|
max: 2,
|
|
2431
2466
|
step: .05,
|
|
2432
|
-
value:
|
|
2433
|
-
onChange:
|
|
2467
|
+
value: F,
|
|
2468
|
+
onChange: de,
|
|
2434
2469
|
showValue: !0
|
|
2435
2470
|
}),
|
|
2436
2471
|
/* @__PURE__ */ p(X, {
|
|
@@ -2438,33 +2473,33 @@ function Zt({ className: e, respondToOpenEvent: t = !0 }) {
|
|
|
2438
2473
|
min: .18,
|
|
2439
2474
|
max: .32,
|
|
2440
2475
|
step: .01,
|
|
2441
|
-
value:
|
|
2442
|
-
onChange:
|
|
2476
|
+
value: fe,
|
|
2477
|
+
onChange: L,
|
|
2443
2478
|
showValue: !0
|
|
2444
2479
|
})
|
|
2445
2480
|
]
|
|
2446
2481
|
}),
|
|
2447
2482
|
/* @__PURE__ */ p(qt, {
|
|
2448
2483
|
label: "Reduced motion",
|
|
2449
|
-
checked:
|
|
2450
|
-
onChange:
|
|
2484
|
+
checked: pe,
|
|
2485
|
+
onChange: me
|
|
2451
2486
|
}),
|
|
2452
2487
|
/* @__PURE__ */ m("div", {
|
|
2453
2488
|
className: "border-border flex items-center gap-2 border-t pt-3",
|
|
2454
2489
|
children: [/* @__PURE__ */ p(q, {
|
|
2455
2490
|
variant: "primary",
|
|
2456
2491
|
size: "sm",
|
|
2457
|
-
disabled: !
|
|
2492
|
+
disabled: !ve,
|
|
2458
2493
|
onClick: () => {
|
|
2459
|
-
|
|
2494
|
+
he(), y("success", `Saved customization for ${ct.find((e) => e.value === ye)?.label ?? ye}`);
|
|
2460
2495
|
},
|
|
2461
2496
|
children: "Save for theme"
|
|
2462
2497
|
}), /* @__PURE__ */ p(q, {
|
|
2463
2498
|
variant: "secondary",
|
|
2464
2499
|
size: "sm",
|
|
2465
|
-
disabled: !
|
|
2500
|
+
disabled: !_e && !ve,
|
|
2466
2501
|
onClick: () => {
|
|
2467
|
-
|
|
2502
|
+
ge(), y("info", "Reset to theme defaults");
|
|
2468
2503
|
},
|
|
2469
2504
|
children: "Reset"
|
|
2470
2505
|
})]
|
|
@@ -2480,20 +2515,20 @@ var Qt = [
|
|
|
2480
2515
|
"light",
|
|
2481
2516
|
"system"
|
|
2482
2517
|
], $t = {
|
|
2483
|
-
dark:
|
|
2484
|
-
light:
|
|
2485
|
-
system:
|
|
2518
|
+
dark: P,
|
|
2519
|
+
light: le,
|
|
2520
|
+
system: N
|
|
2486
2521
|
}, en = {
|
|
2487
2522
|
dark: "Dark",
|
|
2488
2523
|
light: "Light",
|
|
2489
2524
|
system: "System"
|
|
2490
2525
|
};
|
|
2491
|
-
function tn({ onMobileMenuToggle: e, breadcrumbs: t, showCommandTrigger: n = !0, commandTriggerLabel: r = "Search", commandShortcut: i =
|
|
2492
|
-
let { sidebarCollapsed:
|
|
2493
|
-
function
|
|
2494
|
-
|
|
2526
|
+
function tn({ onMobileMenuToggle: e, breadcrumbs: t, showCommandTrigger: n = !0, commandTriggerLabel: r = "Search", commandShortcut: i = tt, currentPath: a, onNavigate: o, onCommandTrigger: s, actions: c }) {
|
|
2527
|
+
let { sidebarCollapsed: l, setSidebarCollapsed: u, colorMode: d, setColorMode: h } = K();
|
|
2528
|
+
function g() {
|
|
2529
|
+
h(Qt[(Qt.indexOf(d) + 1) % Qt.length]);
|
|
2495
2530
|
}
|
|
2496
|
-
let
|
|
2531
|
+
let _ = $t[d];
|
|
2497
2532
|
return /* @__PURE__ */ m("header", {
|
|
2498
2533
|
className: "border-border bg-bg-secondary font-navigation flex h-9 shrink-0 items-center justify-between border-b px-3",
|
|
2499
2534
|
style: { height: "var(--topbar-height)" },
|
|
@@ -2504,13 +2539,13 @@ function tn({ onMobileMenuToggle: e, breadcrumbs: t, showCommandTrigger: n = !0,
|
|
|
2504
2539
|
onClick: e,
|
|
2505
2540
|
className: "text-text-tertiary hover:text-text-primary hover:bg-bg-hover flex h-7 w-7 cursor-pointer items-center justify-center rounded md:hidden",
|
|
2506
2541
|
"aria-label": "Toggle menu",
|
|
2507
|
-
children: /* @__PURE__ */ p(
|
|
2542
|
+
children: /* @__PURE__ */ p(ne, { className: "h-4 w-4" })
|
|
2508
2543
|
}),
|
|
2509
2544
|
/* @__PURE__ */ p("button", {
|
|
2510
|
-
onClick: () =>
|
|
2545
|
+
onClick: () => u(!l),
|
|
2511
2546
|
className: "text-text-tertiary hover:text-text-primary hover:bg-bg-hover hidden h-7 w-7 cursor-pointer items-center justify-center rounded md:flex",
|
|
2512
|
-
"aria-label":
|
|
2513
|
-
children: p(
|
|
2547
|
+
"aria-label": l ? "Expand sidebar" : "Collapse sidebar",
|
|
2548
|
+
children: p(l ? oe : ae, { className: "h-4 w-4" })
|
|
2514
2549
|
}),
|
|
2515
2550
|
t !== !1 && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("div", { className: "bg-border hidden h-4 w-px md:block" }), /* @__PURE__ */ p(Lt, {
|
|
2516
2551
|
...t,
|
|
@@ -2521,11 +2556,12 @@ function tn({ onMobileMenuToggle: e, breadcrumbs: t, showCommandTrigger: n = !0,
|
|
|
2521
2556
|
}), /* @__PURE__ */ m("div", {
|
|
2522
2557
|
className: "flex items-center gap-1",
|
|
2523
2558
|
children: [
|
|
2559
|
+
c,
|
|
2524
2560
|
n && /* @__PURE__ */ m("button", {
|
|
2525
|
-
onClick: s ?? (() =>
|
|
2561
|
+
onClick: s ?? (() => nt()),
|
|
2526
2562
|
className: "text-text-tertiary bg-bg-primary border-border hover:border-border-strong hover:text-text-secondary font-navigation hidden h-6 cursor-pointer items-center gap-2 rounded-md border px-2 transition-colors duration-[100ms] sm:flex",
|
|
2527
2563
|
children: [
|
|
2528
|
-
/* @__PURE__ */ p(
|
|
2564
|
+
/* @__PURE__ */ p(se, { className: "h-3 w-3" }),
|
|
2529
2565
|
/* @__PURE__ */ p("span", {
|
|
2530
2566
|
className: "text-2xs",
|
|
2531
2567
|
children: r
|
|
@@ -2537,11 +2573,11 @@ function tn({ onMobileMenuToggle: e, breadcrumbs: t, showCommandTrigger: n = !0,
|
|
|
2537
2573
|
]
|
|
2538
2574
|
}),
|
|
2539
2575
|
/* @__PURE__ */ p("button", {
|
|
2540
|
-
onClick:
|
|
2576
|
+
onClick: g,
|
|
2541
2577
|
className: "text-text-tertiary hover:text-text-primary hover:bg-bg-hover flex h-7 w-7 cursor-pointer items-center justify-center rounded",
|
|
2542
|
-
"aria-label": `Color mode: ${en[
|
|
2543
|
-
title: en[
|
|
2544
|
-
children: /* @__PURE__ */ p(
|
|
2578
|
+
"aria-label": `Color mode: ${en[d]}. Click to cycle.`,
|
|
2579
|
+
title: en[d],
|
|
2580
|
+
children: /* @__PURE__ */ p(_, { className: "h-4 w-4" })
|
|
2545
2581
|
}),
|
|
2546
2582
|
/* @__PURE__ */ p(Zt, {})
|
|
2547
2583
|
]
|
|
@@ -2550,10 +2586,10 @@ function tn({ onMobileMenuToggle: e, breadcrumbs: t, showCommandTrigger: n = !0,
|
|
|
2550
2586
|
}
|
|
2551
2587
|
//#endregion
|
|
2552
2588
|
//#region src/components/app-shell/AppShell.tsx
|
|
2553
|
-
function nn({ children: e, navSections: t, brand: n, accounts: r, bottomNavItems: i = [], commandItems: a, breadcrumbs: o, initialAccountIndex: s, onAccountChange: c, onSignOut: u, signOutPath: f, signOutLabel: h, settingsPath: g, settingsLabel: _, onOpenSettings: v, showCommandPalette: y = !0, showCommandTrigger: b = !0, commandTriggerLabel: x, commandShortcut: S,
|
|
2554
|
-
let [
|
|
2589
|
+
function nn({ children: e, navSections: t, brand: n, accounts: r, bottomNavItems: i = [], commandItems: a, breadcrumbs: o, initialAccountIndex: s, onAccountChange: c, onSignOut: u, signOutPath: f, signOutLabel: h, settingsPath: g, settingsLabel: _, onOpenSettings: v, showCommandPalette: y = !0, showCommandTrigger: b = !0, commandTriggerLabel: x, commandShortcut: S, sidebarHeaderActions: C, topBarActions: w, currentPath: T, onNavigate: E, mainClassName: D, className: O }) {
|
|
2590
|
+
let [k, A] = d(!1), j = l(() => t.flatMap((e) => e.items), [t]), M = a ?? j;
|
|
2555
2591
|
return /* @__PURE__ */ m("div", {
|
|
2556
|
-
className:
|
|
2592
|
+
className: R("bg-bg-primary flex h-svh overflow-hidden", O),
|
|
2557
2593
|
children: [
|
|
2558
2594
|
/* @__PURE__ */ p("a", {
|
|
2559
2595
|
href: "#main-content",
|
|
@@ -2572,42 +2608,45 @@ function nn({ children: e, navSections: t, brand: n, accounts: r, bottomNavItems
|
|
|
2572
2608
|
settingsPath: g,
|
|
2573
2609
|
settingsLabel: _,
|
|
2574
2610
|
onOpenSettings: v,
|
|
2575
|
-
currentPath:
|
|
2576
|
-
onNavigate:
|
|
2611
|
+
currentPath: T,
|
|
2612
|
+
onNavigate: E,
|
|
2613
|
+
headerActions: C
|
|
2577
2614
|
}),
|
|
2578
2615
|
/* @__PURE__ */ m("div", {
|
|
2579
2616
|
className: "flex min-w-0 flex-1 flex-col",
|
|
2580
2617
|
children: [/* @__PURE__ */ p(tn, {
|
|
2581
|
-
onMobileMenuToggle: () =>
|
|
2618
|
+
onMobileMenuToggle: () => A(!0),
|
|
2582
2619
|
breadcrumbs: o,
|
|
2583
2620
|
showCommandTrigger: y && b,
|
|
2584
2621
|
commandTriggerLabel: x,
|
|
2585
2622
|
commandShortcut: S,
|
|
2586
|
-
|
|
2587
|
-
|
|
2623
|
+
actions: w,
|
|
2624
|
+
currentPath: T,
|
|
2625
|
+
onNavigate: E
|
|
2588
2626
|
}), /* @__PURE__ */ p("main", {
|
|
2589
2627
|
id: "main-content",
|
|
2590
|
-
className:
|
|
2628
|
+
className: R("flex-1 overflow-y-auto p-4 pb-20 md:p-6 md:pb-6", D),
|
|
2591
2629
|
children: e
|
|
2592
2630
|
})]
|
|
2593
2631
|
}),
|
|
2594
|
-
/* @__PURE__ */ p(
|
|
2632
|
+
/* @__PURE__ */ p(Qe, {
|
|
2595
2633
|
items: i,
|
|
2596
|
-
currentPath:
|
|
2597
|
-
onNavigate:
|
|
2634
|
+
currentPath: T,
|
|
2635
|
+
onNavigate: E
|
|
2598
2636
|
}),
|
|
2599
|
-
/* @__PURE__ */ p(
|
|
2600
|
-
open:
|
|
2601
|
-
onClose: () =>
|
|
2602
|
-
items:
|
|
2637
|
+
/* @__PURE__ */ p(st, {
|
|
2638
|
+
open: k,
|
|
2639
|
+
onClose: () => A(!1),
|
|
2640
|
+
items: j,
|
|
2603
2641
|
brand: n,
|
|
2604
|
-
currentPath:
|
|
2605
|
-
onNavigate:
|
|
2642
|
+
currentPath: T,
|
|
2643
|
+
onNavigate: E,
|
|
2644
|
+
headerActions: C
|
|
2606
2645
|
}),
|
|
2607
|
-
y &&
|
|
2608
|
-
items:
|
|
2646
|
+
y && M.length > 0 && /* @__PURE__ */ p(at, {
|
|
2647
|
+
items: M,
|
|
2609
2648
|
shortcut: S,
|
|
2610
|
-
onNavigate:
|
|
2649
|
+
onNavigate: E
|
|
2611
2650
|
})
|
|
2612
2651
|
]
|
|
2613
2652
|
});
|
|
@@ -2616,7 +2655,7 @@ function nn({ children: e, navSections: t, brand: n, accounts: r, bottomNavItems
|
|
|
2616
2655
|
//#region src/components/app-shell/AuthLayout.tsx
|
|
2617
2656
|
function rn({ children: e, className: t }) {
|
|
2618
2657
|
return /* @__PURE__ */ m("div", {
|
|
2619
|
-
className:
|
|
2658
|
+
className: R("bg-bg-primary relative flex min-h-svh items-center justify-center p-4", t),
|
|
2620
2659
|
children: [/* @__PURE__ */ p("div", {
|
|
2621
2660
|
className: "pointer-events-none absolute inset-0 opacity-30",
|
|
2622
2661
|
style: { background: "radial-gradient(ellipse at 50% 30%, var(--accent-muted) 0%, transparent 60%)" }
|
|
@@ -2628,8 +2667,8 @@ function rn({ children: e, className: t }) {
|
|
|
2628
2667
|
function an({ to: e, children: t, onNavigate: n, className: r }) {
|
|
2629
2668
|
return /* @__PURE__ */ m("a", {
|
|
2630
2669
|
href: e,
|
|
2631
|
-
onClick: (t) =>
|
|
2632
|
-
className:
|
|
2670
|
+
onClick: (t) => B(t, e, n),
|
|
2671
|
+
className: R("inline-flex items-center gap-1.5", "text-text-tertiary text-xs", "hover:text-text-primary", r),
|
|
2633
2672
|
children: [/* @__PURE__ */ p(v, { className: "h-3.5 w-3.5" }), t]
|
|
2634
2673
|
});
|
|
2635
2674
|
}
|
|
@@ -2638,14 +2677,14 @@ function an({ to: e, children: t, onNavigate: n, className: r }) {
|
|
|
2638
2677
|
function on({ checked: e, indeterminate: t, onChange: n, label: r, disabled: i, className: a }) {
|
|
2639
2678
|
let o = e || t;
|
|
2640
2679
|
return /* @__PURE__ */ m("label", {
|
|
2641
|
-
className:
|
|
2680
|
+
className: R("flex w-fit items-center gap-2.5", i ? "cursor-not-allowed opacity-40" : "cursor-pointer", a),
|
|
2642
2681
|
children: [/* @__PURE__ */ p("button", {
|
|
2643
2682
|
role: "checkbox",
|
|
2644
2683
|
"aria-checked": t ? "mixed" : e,
|
|
2645
2684
|
disabled: i,
|
|
2646
2685
|
onClick: () => n(!e),
|
|
2647
|
-
className:
|
|
2648
|
-
children: t ? /* @__PURE__ */ p(
|
|
2686
|
+
className: R("flex h-4 w-4 shrink-0 items-center justify-center rounded border", "transition-colors duration-[100ms]", "focus-visible:outline-accent focus-visible:outline-2 focus-visible:outline-offset-2", o ? "bg-accent border-accent" : "bg-bg-secondary border-border", !i && "cursor-pointer"),
|
|
2687
|
+
children: t ? /* @__PURE__ */ p(re, { className: "text-text-on-accent h-3 w-3" }) : e ? /* @__PURE__ */ p(S, { className: "text-text-on-accent h-3 w-3" }) : null
|
|
2649
2688
|
}), r && /* @__PURE__ */ p("span", {
|
|
2650
2689
|
className: "text-text-primary text-xs",
|
|
2651
2690
|
children: r
|
|
@@ -2657,7 +2696,7 @@ function on({ checked: e, indeterminate: t, onChange: n, label: r, disabled: i,
|
|
|
2657
2696
|
var sn = r(function({ icon: e, children: t, className: n, ...r }, i) {
|
|
2658
2697
|
return /* @__PURE__ */ m("button", {
|
|
2659
2698
|
ref: i,
|
|
2660
|
-
className:
|
|
2699
|
+
className: R("flex h-7 cursor-pointer items-center gap-1.5 rounded-md px-2.5", "border-border bg-bg-secondary text-text-secondary border", "hover:bg-bg-hover hover:border-border-strong", "text-xs", "transition-colors duration-[100ms]", n),
|
|
2661
2700
|
...r,
|
|
2662
2701
|
children: [/* @__PURE__ */ p(e, { className: "h-3.5 w-3.5 shrink-0" }), t && /* @__PURE__ */ p("span", {
|
|
2663
2702
|
className: "hidden sm:inline",
|
|
@@ -2669,7 +2708,7 @@ var sn = r(function({ icon: e, children: t, className: n, ...r }, i) {
|
|
|
2669
2708
|
//#region src/components/tables/ColumnPicker.tsx
|
|
2670
2709
|
function cn({ columns: e, hidden: t, onToggle: n }) {
|
|
2671
2710
|
let [r, a] = d(!1), o = u(null);
|
|
2672
|
-
return
|
|
2711
|
+
return G(r, i(() => a(!1), []), [o]), /* @__PURE__ */ m("div", {
|
|
2673
2712
|
className: "relative",
|
|
2674
2713
|
ref: o,
|
|
2675
2714
|
children: [/* @__PURE__ */ p(sn, {
|
|
@@ -2713,7 +2752,7 @@ function ln({ page: e, totalPages: t, onPageChange: n }) {
|
|
|
2713
2752
|
children: "..."
|
|
2714
2753
|
}, `e${r}`) : /* @__PURE__ */ p("button", {
|
|
2715
2754
|
onClick: () => n(t),
|
|
2716
|
-
className:
|
|
2755
|
+
className: R("flex h-7 w-7 cursor-pointer items-center justify-center rounded text-xs font-medium", "transition-colors duration-[100ms]", t === e ? "bg-accent text-text-on-accent" : "text-text-secondary hover:text-text-primary hover:bg-bg-hover"),
|
|
2717
2756
|
children: t
|
|
2718
2757
|
}, t)),
|
|
2719
2758
|
/* @__PURE__ */ p("button", {
|
|
@@ -2761,7 +2800,7 @@ function dn({ data: e, columns: t, getRowId: n, onRowClick: r, emptyMessage: i =
|
|
|
2761
2800
|
children: [/* @__PURE__ */ p("thead", { children: /* @__PURE__ */ p("tr", {
|
|
2762
2801
|
className: "border-border bg-bg-secondary border-b",
|
|
2763
2802
|
children: t.map((e) => /* @__PURE__ */ p("th", {
|
|
2764
|
-
className:
|
|
2803
|
+
className: R("text-2xs text-text-tertiary font-label h-7 px-3 text-left font-semibold tracking-wider uppercase", e.sortable && "hover:text-text-secondary cursor-pointer select-none"),
|
|
2765
2804
|
style: { width: e.width },
|
|
2766
2805
|
onClick: e.sortable ? () => S(e.key) : void 0,
|
|
2767
2806
|
children: /* @__PURE__ */ m("span", {
|
|
@@ -2774,10 +2813,10 @@ function dn({ data: e, columns: t, getRowId: n, onRowClick: r, emptyMessage: i =
|
|
|
2774
2813
|
className: "text-text-tertiary h-32 text-center",
|
|
2775
2814
|
children: i
|
|
2776
2815
|
}) }) : x.map((e) => /* @__PURE__ */ p("tr", {
|
|
2777
|
-
className:
|
|
2816
|
+
className: R("border-border h-8 border-b last:border-b-0", "hover:bg-bg-hover", r && "cursor-pointer"),
|
|
2778
2817
|
onClick: r ? () => r(e) : void 0,
|
|
2779
2818
|
children: t.map((t) => /* @__PURE__ */ p("td", {
|
|
2780
|
-
className:
|
|
2819
|
+
className: R("text-text-primary px-3 whitespace-nowrap", t.cellClassName),
|
|
2781
2820
|
onClick: t.interactive && r ? (e) => e.stopPropagation() : void 0,
|
|
2782
2821
|
children: t.render(e)
|
|
2783
2822
|
}, t.key))
|
|
@@ -2803,13 +2842,13 @@ var fn = {
|
|
|
2803
2842
|
error: {
|
|
2804
2843
|
bg: "bg-red-muted",
|
|
2805
2844
|
border: "border-red/30",
|
|
2806
|
-
icon:
|
|
2845
|
+
icon: de,
|
|
2807
2846
|
iconColor: "text-red"
|
|
2808
2847
|
},
|
|
2809
2848
|
info: {
|
|
2810
2849
|
bg: "bg-blue-muted",
|
|
2811
2850
|
border: "border-blue/30",
|
|
2812
|
-
icon:
|
|
2851
|
+
icon: M,
|
|
2813
2852
|
iconColor: "text-blue"
|
|
2814
2853
|
}
|
|
2815
2854
|
};
|
|
@@ -2818,9 +2857,9 @@ function pn({ type: e, title: t, children: n, dismissible: r, className: i }) {
|
|
|
2818
2857
|
if (a) return null;
|
|
2819
2858
|
let s = fn[e], c = s.icon;
|
|
2820
2859
|
return /* @__PURE__ */ m("div", {
|
|
2821
|
-
className:
|
|
2860
|
+
className: R("flex gap-2.5 rounded-md border p-3", s.bg, s.border, i),
|
|
2822
2861
|
children: [
|
|
2823
|
-
/* @__PURE__ */ p(c, { className:
|
|
2862
|
+
/* @__PURE__ */ p(c, { className: R("mt-0.5 h-4 w-4 shrink-0", s.iconColor) }),
|
|
2824
2863
|
/* @__PURE__ */ m("div", {
|
|
2825
2864
|
className: "min-w-0 flex-1",
|
|
2826
2865
|
children: [t && /* @__PURE__ */ p("p", {
|
|
@@ -2835,7 +2874,7 @@ function pn({ type: e, title: t, children: n, dismissible: r, className: i }) {
|
|
|
2835
2874
|
onClick: () => o(!0),
|
|
2836
2875
|
className: "text-text-tertiary hover:text-text-primary flex h-5 w-5 cursor-pointer items-center justify-center rounded",
|
|
2837
2876
|
"aria-label": "Dismiss",
|
|
2838
|
-
children: /* @__PURE__ */ p(
|
|
2877
|
+
children: /* @__PURE__ */ p(F, { className: "h-3 w-3" })
|
|
2839
2878
|
})
|
|
2840
2879
|
]
|
|
2841
2880
|
});
|
|
@@ -2844,7 +2883,7 @@ function pn({ type: e, title: t, children: n, dismissible: r, className: i }) {
|
|
|
2844
2883
|
//#region src/components/ui/AuthCard.tsx
|
|
2845
2884
|
function mn({ title: e, subtitle: t, icon: n, children: r, footer: i, className: a }) {
|
|
2846
2885
|
return /* @__PURE__ */ p("div", {
|
|
2847
|
-
className:
|
|
2886
|
+
className: R("relative z-10 w-full max-w-sm", a),
|
|
2848
2887
|
children: /* @__PURE__ */ m("div", {
|
|
2849
2888
|
className: "bg-bg-secondary border-border rounded-lg border p-8 shadow-lg",
|
|
2850
2889
|
children: [
|
|
@@ -2878,12 +2917,12 @@ function mn({ title: e, subtitle: t, icon: n, children: r, footer: i, className:
|
|
|
2878
2917
|
//#region src/components/ui/AuthorByline.tsx
|
|
2879
2918
|
function hn({ name: e, meta: t, nameAppend: n, size: r = "sm", className: i }) {
|
|
2880
2919
|
return /* @__PURE__ */ m("div", {
|
|
2881
|
-
className:
|
|
2882
|
-
children: [/* @__PURE__ */ p(
|
|
2920
|
+
className: R("flex items-center gap-2", i),
|
|
2921
|
+
children: [/* @__PURE__ */ p(yt, {
|
|
2883
2922
|
name: e,
|
|
2884
2923
|
size: "sm"
|
|
2885
2924
|
}), /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ m("p", {
|
|
2886
|
-
className:
|
|
2925
|
+
className: R("text-text-primary font-label font-medium", r === "md" ? "text-xs" : "text-2xs"),
|
|
2887
2926
|
children: [e, n]
|
|
2888
2927
|
}), t && /* @__PURE__ */ p("p", {
|
|
2889
2928
|
className: "text-text-tertiary font-label text-2xs",
|
|
@@ -2910,8 +2949,8 @@ var gn = {
|
|
|
2910
2949
|
};
|
|
2911
2950
|
function vn({ color: e = "gray", dot: t, children: n, className: r }) {
|
|
2912
2951
|
return /* @__PURE__ */ m("span", {
|
|
2913
|
-
className:
|
|
2914
|
-
children: [t && /* @__PURE__ */ p("span", { className:
|
|
2952
|
+
className: R("font-label text-2xs inline-flex items-center gap-1.5 rounded-md px-2 py-0.5 font-medium", gn[e], r),
|
|
2953
|
+
children: [t && /* @__PURE__ */ p("span", { className: R("h-1.5 w-1.5 rounded-full", _n[e]) }), n]
|
|
2915
2954
|
});
|
|
2916
2955
|
}
|
|
2917
2956
|
//#endregion
|
|
@@ -3038,7 +3077,7 @@ function Tn({ year: e, month: t, selected: n, rangeStart: r, rangeEnd: i, hoverD
|
|
|
3038
3077
|
onKeyDown: (e) => C(e, s),
|
|
3039
3078
|
onMouseEnter: () => c?.(d),
|
|
3040
3079
|
onMouseLeave: () => c?.(null),
|
|
3041
|
-
className:
|
|
3080
|
+
className: R("flex h-8 w-full cursor-pointer items-center justify-center text-xs transition-colors duration-[100ms]", "rounded-md", b && "cursor-not-allowed opacity-30", !b && !h && !g && !v && !y && "hover:bg-bg-hover text-text-primary", m && !h && !g && !v && "text-accent font-semibold", (h || g || v) && "bg-accent text-text-on-accent font-semibold", y && !h && !g && !v && "bg-accent-muted text-accent"),
|
|
3042
3081
|
children: s
|
|
3043
3082
|
}, s);
|
|
3044
3083
|
})]
|
|
@@ -3049,7 +3088,7 @@ function Tn({ year: e, month: t, selected: n, rangeStart: r, rangeEnd: i, hoverD
|
|
|
3049
3088
|
//#region src/components/ui/Card.tsx
|
|
3050
3089
|
function En({ children: e, className: t, header: n, footer: r }) {
|
|
3051
3090
|
return /* @__PURE__ */ m("div", {
|
|
3052
|
-
className:
|
|
3091
|
+
className: R("bg-bg-secondary border-border overflow-hidden rounded-md border", t),
|
|
3053
3092
|
children: [
|
|
3054
3093
|
n && /* @__PURE__ */ p("div", {
|
|
3055
3094
|
className: "border-border border-b px-3 py-2.5",
|
|
@@ -3089,12 +3128,12 @@ function Dn({ options: e, value: t, onChange: n, placeholder: r = "Select...", l
|
|
|
3089
3128
|
break;
|
|
3090
3129
|
}
|
|
3091
3130
|
}
|
|
3092
|
-
|
|
3131
|
+
G(c, i(() => l(!1), []), [v]);
|
|
3093
3132
|
function D() {
|
|
3094
3133
|
l(!0), h(""), _(0), setTimeout(() => y.current?.focus(), 0);
|
|
3095
3134
|
}
|
|
3096
3135
|
return /* @__PURE__ */ m("div", {
|
|
3097
|
-
className:
|
|
3136
|
+
className: R("flex flex-col gap-1.5", o),
|
|
3098
3137
|
ref: v,
|
|
3099
3138
|
children: [a && /* @__PURE__ */ p("span", {
|
|
3100
3139
|
className: "text-text-secondary font-label text-xs font-medium",
|
|
@@ -3108,20 +3147,20 @@ function Dn({ options: e, value: t, onChange: n, placeholder: r = "Select...", l
|
|
|
3108
3147
|
/* @__PURE__ */ p("button", {
|
|
3109
3148
|
type: "button",
|
|
3110
3149
|
onClick: () => c ? l(!1) : D(),
|
|
3111
|
-
className:
|
|
3150
|
+
className: R("font-control flex h-7 w-full cursor-pointer items-center rounded-md px-2 pr-7 text-xs", "bg-bg-secondary border-border text-text-primary border", "hover:bg-bg-hover hover:border-border-strong", "transition-colors duration-[100ms]", "focus-visible:outline-accent focus-visible:outline-2 focus-visible:outline-offset-2"),
|
|
3112
3151
|
children: x ? x.label : /* @__PURE__ */ p("span", {
|
|
3113
3152
|
className: "text-text-disabled",
|
|
3114
3153
|
children: r
|
|
3115
3154
|
})
|
|
3116
3155
|
}),
|
|
3117
|
-
/* @__PURE__ */ p(w, { className:
|
|
3156
|
+
/* @__PURE__ */ p(w, { className: R("text-text-tertiary pointer-events-none absolute top-1/2 right-2.5 h-3.5 w-3.5 -translate-y-1/2 transition-transform", c && "rotate-180") }),
|
|
3118
3157
|
c && /* @__PURE__ */ m("div", {
|
|
3119
3158
|
className: "bg-bg-tertiary border-border-strong animate-scale-in absolute top-full right-0 left-0 z-50 mt-1 overflow-hidden rounded-md border shadow-lg",
|
|
3120
3159
|
children: [/* @__PURE__ */ p("div", {
|
|
3121
3160
|
className: "border-border border-b p-1.5",
|
|
3122
3161
|
children: /* @__PURE__ */ m("div", {
|
|
3123
3162
|
className: "relative",
|
|
3124
|
-
children: [/* @__PURE__ */ p(
|
|
3163
|
+
children: [/* @__PURE__ */ p(se, { className: "text-text-tertiary absolute top-1/2 left-2 h-3 w-3 -translate-y-1/2" }), /* @__PURE__ */ p("input", {
|
|
3125
3164
|
ref: y,
|
|
3126
3165
|
type: "text",
|
|
3127
3166
|
"aria-label": "Search options",
|
|
@@ -3150,7 +3189,7 @@ function Dn({ options: e, value: t, onChange: n, placeholder: r = "Select...", l
|
|
|
3150
3189
|
n(e.value), l(!1);
|
|
3151
3190
|
},
|
|
3152
3191
|
onMouseEnter: () => _(r),
|
|
3153
|
-
className:
|
|
3192
|
+
className: R("font-control flex h-7 w-full cursor-pointer items-center gap-2 px-3 text-xs", "transition-colors duration-[100ms]", r === g ? "bg-accent-muted text-accent" : e.value === t ? "text-accent" : "text-text-secondary hover:text-text-primary hover:bg-bg-hover"),
|
|
3154
3193
|
children: [/* @__PURE__ */ p("span", {
|
|
3155
3194
|
className: "flex-1 truncate",
|
|
3156
3195
|
children: e.label
|
|
@@ -3166,7 +3205,7 @@ function Dn({ options: e, value: t, onChange: n, placeholder: r = "Select...", l
|
|
|
3166
3205
|
//#region src/components/ui/DangerZone.tsx
|
|
3167
3206
|
function On({ title: e = "Danger Zone", description: t, children: n, className: r }) {
|
|
3168
3207
|
return /* @__PURE__ */ m("div", {
|
|
3169
|
-
className:
|
|
3208
|
+
className: R("border-border mt-8 border-t pt-6", r),
|
|
3170
3209
|
children: [
|
|
3171
3210
|
/* @__PURE__ */ p("h3", {
|
|
3172
3211
|
className: "text-red mb-2 text-xs font-semibold",
|
|
@@ -3200,7 +3239,7 @@ function kn(e) {
|
|
|
3200
3239
|
}
|
|
3201
3240
|
function An({ label: e, value: t, onChange: n, placeholder: r = "Select date...", format: a = kn }) {
|
|
3202
3241
|
let [o, s] = d(!1), c = u(null), l = u(null), f = Gt(o, c, l), h = /* @__PURE__ */ new Date(), [g, _] = d(t?.getFullYear() ?? h.getFullYear()), [v, y] = d(t?.getMonth() ?? h.getMonth());
|
|
3203
|
-
|
|
3242
|
+
G(o, i(() => s(!1), []), [c]);
|
|
3204
3243
|
function b(e) {
|
|
3205
3244
|
n(e), s(!1);
|
|
3206
3245
|
}
|
|
@@ -3221,7 +3260,7 @@ function An({ label: e, value: t, onChange: n, placeholder: r = "Select date..."
|
|
|
3221
3260
|
onClick: S,
|
|
3222
3261
|
"aria-haspopup": "dialog",
|
|
3223
3262
|
"aria-expanded": o,
|
|
3224
|
-
className:
|
|
3263
|
+
className: R("flex h-7 w-full cursor-pointer items-center rounded-md text-xs", "bg-bg-secondary border-border text-text-primary border", "hover:bg-bg-hover hover:border-border-strong", "transition-colors duration-[100ms]", "px-2 pr-7"),
|
|
3225
3264
|
children: t ? a(t) : /* @__PURE__ */ p("span", {
|
|
3226
3265
|
className: "text-text-disabled",
|
|
3227
3266
|
children: r
|
|
@@ -3232,7 +3271,7 @@ function An({ label: e, value: t, onChange: n, placeholder: r = "Select date..."
|
|
|
3232
3271
|
ref: l,
|
|
3233
3272
|
role: "dialog",
|
|
3234
3273
|
"aria-label": "Choose date",
|
|
3235
|
-
className:
|
|
3274
|
+
className: R("bg-bg-tertiary border-border-strong animate-scale-in absolute left-0 z-[100] rounded-md border p-3 shadow-lg", f ? "bottom-full mb-1" : "top-full mt-1"),
|
|
3236
3275
|
children: /* @__PURE__ */ p(Tn, {
|
|
3237
3276
|
year: g,
|
|
3238
3277
|
month: v,
|
|
@@ -3271,24 +3310,24 @@ function Nn(e) {
|
|
|
3271
3310
|
}
|
|
3272
3311
|
function Pn({ label: e, value: t, onChange: n, placeholder: r = "Select date range..." }) {
|
|
3273
3312
|
let [a, o] = d(!1), s = u(null), c = u(null), l = Gt(a, s, c), f = /* @__PURE__ */ new Date(), [h, g] = d(t.start?.getFullYear() ?? f.getFullYear()), [_, v] = d(t.start?.getMonth() ?? f.getMonth()), [y, b] = d(null), [S, C] = d("start"), [w, T] = d(t.start), [E, D] = d(t.end);
|
|
3274
|
-
|
|
3313
|
+
G(a, i(() => o(!1), []), [s]);
|
|
3275
3314
|
let O = _ === 11 ? h + 1 : h, k = _ === 11 ? 0 : _ + 1;
|
|
3276
3315
|
function A() {
|
|
3277
3316
|
a || (T(t.start), D(t.end), C((t.start && t.end, "start")), t.start && (g(t.start.getFullYear()), v(t.start.getMonth()))), o(!a);
|
|
3278
3317
|
}
|
|
3279
|
-
function
|
|
3318
|
+
function j(e) {
|
|
3280
3319
|
S === "start" ? (T(e), D(null), C("end")) : (w && e < w ? (D(w), T(e)) : D(e), C("start"), n({
|
|
3281
3320
|
start: w && e < w ? e : w,
|
|
3282
3321
|
end: w && e < w ? w : e
|
|
3283
3322
|
}), o(!1));
|
|
3284
3323
|
}
|
|
3285
|
-
function
|
|
3324
|
+
function M() {
|
|
3286
3325
|
_ === 0 ? (g(h - 1), v(11)) : v(_ - 1);
|
|
3287
3326
|
}
|
|
3288
|
-
function
|
|
3327
|
+
function ee() {
|
|
3289
3328
|
_ === 11 ? (g(h + 1), v(0)) : v(_ + 1);
|
|
3290
3329
|
}
|
|
3291
|
-
let
|
|
3330
|
+
let te = t.start || t.end ? Nn(t) : "";
|
|
3292
3331
|
return /* @__PURE__ */ m("div", {
|
|
3293
3332
|
className: "flex flex-col gap-1.5",
|
|
3294
3333
|
ref: s,
|
|
@@ -3303,8 +3342,8 @@ function Pn({ label: e, value: t, onChange: n, placeholder: r = "Select date ran
|
|
|
3303
3342
|
onClick: A,
|
|
3304
3343
|
"aria-haspopup": "dialog",
|
|
3305
3344
|
"aria-expanded": a,
|
|
3306
|
-
className:
|
|
3307
|
-
children:
|
|
3345
|
+
className: R("flex h-7 w-full cursor-pointer items-center rounded-md text-xs", "bg-bg-secondary border-border text-text-primary border", "hover:bg-bg-hover hover:border-border-strong", "transition-colors duration-[100ms]", "px-2 pr-7"),
|
|
3346
|
+
children: te || /* @__PURE__ */ p("span", {
|
|
3308
3347
|
className: "text-text-disabled",
|
|
3309
3348
|
children: r
|
|
3310
3349
|
})
|
|
@@ -3314,13 +3353,13 @@ function Pn({ label: e, value: t, onChange: n, placeholder: r = "Select date ran
|
|
|
3314
3353
|
ref: c,
|
|
3315
3354
|
role: "dialog",
|
|
3316
3355
|
"aria-label": "Choose date range",
|
|
3317
|
-
className:
|
|
3356
|
+
className: R("bg-bg-tertiary border-border-strong animate-scale-in absolute left-0 z-[100] rounded-md border p-3 shadow-lg", l ? "bottom-full mb-1" : "top-full mt-1"),
|
|
3318
3357
|
children: [/* @__PURE__ */ m("div", {
|
|
3319
3358
|
className: "mb-2 flex items-center justify-between",
|
|
3320
3359
|
children: [
|
|
3321
3360
|
/* @__PURE__ */ p("button", {
|
|
3322
3361
|
type: "button",
|
|
3323
|
-
onClick:
|
|
3362
|
+
onClick: M,
|
|
3324
3363
|
"aria-label": "Previous month",
|
|
3325
3364
|
className: "text-text-tertiary hover:text-text-primary hover:bg-bg-hover flex h-6 w-6 cursor-pointer items-center justify-center rounded-md transition-colors duration-[100ms]",
|
|
3326
3365
|
children: /* @__PURE__ */ p("span", {
|
|
@@ -3335,7 +3374,7 @@ function Pn({ label: e, value: t, onChange: n, placeholder: r = "Select date ran
|
|
|
3335
3374
|
}),
|
|
3336
3375
|
/* @__PURE__ */ p("button", {
|
|
3337
3376
|
type: "button",
|
|
3338
|
-
onClick:
|
|
3377
|
+
onClick: ee,
|
|
3339
3378
|
"aria-label": "Next month",
|
|
3340
3379
|
className: "text-text-tertiary hover:text-text-primary hover:bg-bg-hover flex h-6 w-6 cursor-pointer items-center justify-center rounded-md transition-colors duration-[100ms]",
|
|
3341
3380
|
children: /* @__PURE__ */ p("span", {
|
|
@@ -3352,7 +3391,7 @@ function Pn({ label: e, value: t, onChange: n, placeholder: r = "Select date ran
|
|
|
3352
3391
|
rangeStart: w,
|
|
3353
3392
|
rangeEnd: E,
|
|
3354
3393
|
hoverDate: S === "end" ? y : null,
|
|
3355
|
-
onSelect:
|
|
3394
|
+
onSelect: j,
|
|
3356
3395
|
onMonthChange: (e, t) => {
|
|
3357
3396
|
g(e), v(t);
|
|
3358
3397
|
},
|
|
@@ -3363,7 +3402,7 @@ function Pn({ label: e, value: t, onChange: n, placeholder: r = "Select date ran
|
|
|
3363
3402
|
rangeStart: w,
|
|
3364
3403
|
rangeEnd: E,
|
|
3365
3404
|
hoverDate: S === "end" ? y : null,
|
|
3366
|
-
onSelect:
|
|
3405
|
+
onSelect: j,
|
|
3367
3406
|
onMonthChange: (e, t) => {
|
|
3368
3407
|
t === 0 ? (g(e - 1), v(11)) : (g(e), v(t - 1));
|
|
3369
3408
|
},
|
|
@@ -3421,7 +3460,7 @@ function Bn({ label: e, value: t, onChange: n, placeholder: r = "Select date & t
|
|
|
3421
3460
|
hour12: 12,
|
|
3422
3461
|
period: "PM"
|
|
3423
3462
|
}, [g, _] = d(t?.getFullYear() ?? f.getFullYear()), [v, y] = d(t?.getMonth() ?? f.getMonth()), [b, S] = d(String(h.hour12)), [C, w] = d(t ? zn(t.getMinutes()) : "00"), [T, E] = d(h.period), [D, O] = d(t);
|
|
3424
|
-
|
|
3463
|
+
G(a, i(() => o(!1), []), [s]);
|
|
3425
3464
|
function k(e) {
|
|
3426
3465
|
O(e);
|
|
3427
3466
|
}
|
|
@@ -3431,12 +3470,12 @@ function Bn({ label: e, value: t, onChange: n, placeholder: r = "Select date & t
|
|
|
3431
3470
|
let n = parseInt(t, 10);
|
|
3432
3471
|
!isNaN(n) && n >= 13 && n <= 23 ? (S(String(n - 12)), E("PM")) : n === 0 && (S("12"), E("AM"));
|
|
3433
3472
|
}
|
|
3434
|
-
function
|
|
3473
|
+
function j() {
|
|
3435
3474
|
if (!D) return;
|
|
3436
3475
|
let e = Math.max(1, Math.min(12, parseInt(b, 10) || 12)), t = Math.max(0, Math.min(59, parseInt(C, 10) || 0)), r = Ln(e, T);
|
|
3437
3476
|
n(new Date(D.getFullYear(), D.getMonth(), D.getDate(), r, t)), o(!1);
|
|
3438
3477
|
}
|
|
3439
|
-
function
|
|
3478
|
+
function M() {
|
|
3440
3479
|
if (!a && t) {
|
|
3441
3480
|
_(t.getFullYear()), y(t.getMonth()), O(t);
|
|
3442
3481
|
let e = In(t.getHours());
|
|
@@ -3455,10 +3494,10 @@ function Bn({ label: e, value: t, onChange: n, placeholder: r = "Select date & t
|
|
|
3455
3494
|
children: [
|
|
3456
3495
|
/* @__PURE__ */ p("button", {
|
|
3457
3496
|
type: "button",
|
|
3458
|
-
onClick:
|
|
3497
|
+
onClick: M,
|
|
3459
3498
|
"aria-haspopup": "dialog",
|
|
3460
3499
|
"aria-expanded": a,
|
|
3461
|
-
className:
|
|
3500
|
+
className: R("flex h-7 w-full cursor-pointer items-center rounded-md text-xs", "bg-bg-secondary border-border text-text-primary border", "hover:bg-bg-hover hover:border-border-strong", "transition-colors duration-[100ms]", "px-2 pr-7"),
|
|
3462
3501
|
children: t ? Rn(t) : /* @__PURE__ */ p("span", {
|
|
3463
3502
|
className: "text-text-disabled",
|
|
3464
3503
|
children: r
|
|
@@ -3469,7 +3508,7 @@ function Bn({ label: e, value: t, onChange: n, placeholder: r = "Select date & t
|
|
|
3469
3508
|
ref: c,
|
|
3470
3509
|
role: "dialog",
|
|
3471
3510
|
"aria-label": "Choose date and time",
|
|
3472
|
-
className:
|
|
3511
|
+
className: R("bg-bg-tertiary border-border-strong animate-scale-in absolute left-0 z-[100] rounded-md border p-3 shadow-lg", l ? "bottom-full mb-1" : "top-full mt-1"),
|
|
3473
3512
|
children: [/* @__PURE__ */ p(Tn, {
|
|
3474
3513
|
year: g,
|
|
3475
3514
|
month: v,
|
|
@@ -3520,21 +3559,21 @@ function Bn({ label: e, value: t, onChange: n, placeholder: r = "Select date & t
|
|
|
3520
3559
|
type: "button",
|
|
3521
3560
|
onClick: () => E("AM"),
|
|
3522
3561
|
"aria-pressed": T === "AM",
|
|
3523
|
-
className:
|
|
3562
|
+
className: R("text-2xs cursor-pointer px-2 py-0.5 font-medium transition-colors duration-[100ms]", T === "AM" ? "bg-accent text-text-on-accent" : "bg-bg-secondary text-text-secondary hover:bg-bg-hover"),
|
|
3524
3563
|
children: "AM"
|
|
3525
3564
|
}), /* @__PURE__ */ p("button", {
|
|
3526
3565
|
type: "button",
|
|
3527
3566
|
onClick: () => E("PM"),
|
|
3528
3567
|
"aria-pressed": T === "PM",
|
|
3529
|
-
className:
|
|
3568
|
+
className: R("text-2xs cursor-pointer px-2 py-0.5 font-medium transition-colors duration-[100ms]", T === "PM" ? "bg-accent text-text-on-accent" : "bg-bg-secondary text-text-secondary hover:bg-bg-hover"),
|
|
3530
3569
|
children: "PM"
|
|
3531
3570
|
})]
|
|
3532
3571
|
}),
|
|
3533
3572
|
/* @__PURE__ */ p("button", {
|
|
3534
3573
|
type: "button",
|
|
3535
|
-
onClick:
|
|
3574
|
+
onClick: j,
|
|
3536
3575
|
disabled: !D,
|
|
3537
|
-
className:
|
|
3576
|
+
className: R("ml-auto h-6 rounded-md px-3 text-xs font-medium transition-colors duration-[100ms]", D ? "bg-accent text-text-on-accent hover:bg-accent-hover cursor-pointer" : "bg-bg-hover text-text-disabled cursor-not-allowed"),
|
|
3538
3577
|
children: "Apply"
|
|
3539
3578
|
})
|
|
3540
3579
|
]
|
|
@@ -3566,7 +3605,7 @@ function Wn({ open: e, onClose: t, title: n, children: r, className: a, resizabl
|
|
|
3566
3605
|
_.current = !1;
|
|
3567
3606
|
}, []);
|
|
3568
3607
|
return /* @__PURE__ */ p("div", {
|
|
3569
|
-
className:
|
|
3608
|
+
className: R("border-border bg-bg-secondary relative shrink-0 overflow-hidden border-l", "transition-[width] duration-[200ms] ease-out", a),
|
|
3570
3609
|
style: { width: e ? h : 0 },
|
|
3571
3610
|
children: e && /* @__PURE__ */ m("div", {
|
|
3572
3611
|
className: "animate-fade-in flex h-full flex-col",
|
|
@@ -3587,7 +3626,7 @@ function Wn({ open: e, onClose: t, title: n, children: r, className: a, resizabl
|
|
|
3587
3626
|
onClick: t,
|
|
3588
3627
|
className: "text-text-tertiary hover:text-text-primary hover:bg-bg-hover flex h-6 w-6 cursor-pointer items-center justify-center rounded",
|
|
3589
3628
|
"aria-label": "Close panel",
|
|
3590
|
-
children: /* @__PURE__ */ p(
|
|
3629
|
+
children: /* @__PURE__ */ p(F, { className: "h-3.5 w-3.5" })
|
|
3591
3630
|
})]
|
|
3592
3631
|
}),
|
|
3593
3632
|
/* @__PURE__ */ p("div", {
|
|
@@ -3602,7 +3641,7 @@ function Wn({ open: e, onClose: t, title: n, children: r, className: a, resizabl
|
|
|
3602
3641
|
//#region src/components/ui/Dialog.tsx
|
|
3603
3642
|
function Gn({ open: e, onClose: t, title: n, children: r, footer: i, className: a }) {
|
|
3604
3643
|
let c = u(null), l = s();
|
|
3605
|
-
return
|
|
3644
|
+
return V(c, e), o(() => {
|
|
3606
3645
|
if (!e) return;
|
|
3607
3646
|
let n = (e) => {
|
|
3608
3647
|
e.key === "Escape" && t();
|
|
@@ -3610,14 +3649,14 @@ function Gn({ open: e, onClose: t, title: n, children: r, footer: i, className:
|
|
|
3610
3649
|
return document.addEventListener("keydown", n), document.body.style.overflow = "hidden", () => {
|
|
3611
3650
|
document.removeEventListener("keydown", n), document.body.style.overflow = "";
|
|
3612
3651
|
};
|
|
3613
|
-
}, [e, t]), e ?
|
|
3652
|
+
}, [e, t]), e ? I(/* @__PURE__ */ m("div", {
|
|
3614
3653
|
className: "fixed inset-0 z-50 flex items-start justify-center overflow-y-auto pt-4 md:pt-[5vh]",
|
|
3615
3654
|
children: [/* @__PURE__ */ p("div", {
|
|
3616
3655
|
className: "bg-bg-overlay fixed inset-0",
|
|
3617
3656
|
onClick: t
|
|
3618
3657
|
}), /* @__PURE__ */ m("div", {
|
|
3619
3658
|
ref: c,
|
|
3620
|
-
className:
|
|
3659
|
+
className: R("relative z-50 mx-4 mb-8 w-full max-w-[400px] p-6", "bg-bg-secondary border-border rounded-lg border", "animate-scale-in shadow-lg", a),
|
|
3621
3660
|
role: "dialog",
|
|
3622
3661
|
"aria-modal": "true",
|
|
3623
3662
|
"aria-labelledby": n ? l : void 0,
|
|
@@ -3633,7 +3672,7 @@ function Gn({ open: e, onClose: t, title: n, children: r, footer: i, className:
|
|
|
3633
3672
|
onClick: t,
|
|
3634
3673
|
className: "text-text-tertiary hover:text-text-primary hover:bg-bg-hover ml-auto flex h-6 w-6 cursor-pointer items-center justify-center rounded transition-colors duration-[100ms]",
|
|
3635
3674
|
"aria-label": "Close",
|
|
3636
|
-
children: /* @__PURE__ */ p(
|
|
3675
|
+
children: /* @__PURE__ */ p(F, { className: "h-4 w-4" })
|
|
3637
3676
|
})]
|
|
3638
3677
|
}),
|
|
3639
3678
|
r,
|
|
@@ -3646,7 +3685,7 @@ function Gn({ open: e, onClose: t, title: n, children: r, footer: i, className:
|
|
|
3646
3685
|
//#region src/components/ui/DialogActions.tsx
|
|
3647
3686
|
function Kn({ onCancel: e, onConfirm: t, cancelLabel: n = "Cancel", confirmLabel: r = "Confirm", confirmVariant: i = "primary", className: a }) {
|
|
3648
3687
|
return /* @__PURE__ */ m("div", {
|
|
3649
|
-
className:
|
|
3688
|
+
className: R("flex justify-end gap-2", a),
|
|
3650
3689
|
children: [/* @__PURE__ */ p(q, {
|
|
3651
3690
|
variant: "ghost",
|
|
3652
3691
|
size: "sm",
|
|
@@ -3664,7 +3703,7 @@ function Kn({ onCancel: e, onConfirm: t, cancelLabel: n = "Cancel", confirmLabel
|
|
|
3664
3703
|
//#region src/components/ui/DividerLabel.tsx
|
|
3665
3704
|
function qn({ children: e, className: t }) {
|
|
3666
3705
|
return /* @__PURE__ */ m("div", {
|
|
3667
|
-
className:
|
|
3706
|
+
className: R("relative my-6", t),
|
|
3668
3707
|
children: [/* @__PURE__ */ p("div", {
|
|
3669
3708
|
className: "absolute inset-0 flex items-center",
|
|
3670
3709
|
children: /* @__PURE__ */ p("div", { className: "border-border w-full border-t" })
|
|
@@ -3687,7 +3726,7 @@ function Jn({ trigger: e, items: t, align: n = "right" }) {
|
|
|
3687
3726
|
}), [h, g] = d(-1), _ = u(null), v = u(null), y = l(() => t.filter((e) => !e.divider), [t]), b = i(() => {
|
|
3688
3727
|
a(!1), g(-1);
|
|
3689
3728
|
}, []);
|
|
3690
|
-
|
|
3729
|
+
G(r, b, [v], [_]), o(() => {
|
|
3691
3730
|
if (!r) return;
|
|
3692
3731
|
let e = (e) => {
|
|
3693
3732
|
e.key === "ArrowDown" ? (e.preventDefault(), g((e) => (e + 1) % y.length)) : e.key === "ArrowUp" ? (e.preventDefault(), g((e) => (e - 1 + y.length) % y.length)) : e.key === "Enter" && h >= 0 && (e.preventDefault(), y[h].onClick(), b());
|
|
@@ -3715,7 +3754,7 @@ function Jn({ trigger: e, items: t, align: n = "right" }) {
|
|
|
3715
3754
|
ref: _,
|
|
3716
3755
|
onClick: x,
|
|
3717
3756
|
children: e
|
|
3718
|
-
}), r &&
|
|
3757
|
+
}), r && I(/* @__PURE__ */ p("div", {
|
|
3719
3758
|
ref: v,
|
|
3720
3759
|
role: "menu",
|
|
3721
3760
|
className: "bg-bg-tertiary border-border-strong animate-scale-in fixed z-[100] w-max rounded-md border py-1 shadow-lg",
|
|
@@ -3738,7 +3777,7 @@ function Jn({ trigger: e, items: t, align: n = "right" }) {
|
|
|
3738
3777
|
e.onClick(), b();
|
|
3739
3778
|
},
|
|
3740
3779
|
onMouseEnter: () => g(n),
|
|
3741
|
-
className:
|
|
3780
|
+
className: R("flex h-7 w-full cursor-pointer items-center gap-2 px-4 text-left text-xs", "transition-colors duration-[100ms]", "focus:outline-none", e.danger ? "text-red hover:bg-red-muted focus:bg-red-muted" : "text-text-secondary hover:text-text-primary hover:bg-bg-hover focus:text-text-primary focus:bg-bg-hover"),
|
|
3742
3781
|
children: [
|
|
3743
3782
|
e.icon && /* @__PURE__ */ p("span", {
|
|
3744
3783
|
className: "flex h-3.5 w-3.5 shrink-0 items-center",
|
|
@@ -3762,11 +3801,11 @@ function Jn({ trigger: e, items: t, align: n = "right" }) {
|
|
|
3762
3801
|
//#region src/components/ui/EmptyState.tsx
|
|
3763
3802
|
function Yn({ icon: e, title: t, description: n, action: r, className: i }) {
|
|
3764
3803
|
return /* @__PURE__ */ m("div", {
|
|
3765
|
-
className:
|
|
3804
|
+
className: R("flex flex-col items-center justify-center px-4 py-12", i),
|
|
3766
3805
|
children: [
|
|
3767
3806
|
/* @__PURE__ */ p("div", {
|
|
3768
3807
|
className: "bg-bg-tertiary text-text-tertiary mb-3 flex h-10 w-10 items-center justify-center rounded-md",
|
|
3769
|
-
children: e || /* @__PURE__ */ p(
|
|
3808
|
+
children: e || /* @__PURE__ */ p(j, { className: "h-5 w-5" })
|
|
3770
3809
|
}),
|
|
3771
3810
|
/* @__PURE__ */ p("p", {
|
|
3772
3811
|
className: "text-text-primary mb-1 text-sm font-medium",
|
|
@@ -3842,7 +3881,7 @@ function Zn({ icon: e, children: t, items: n, align: r, className: i }) {
|
|
|
3842
3881
|
//#region src/components/ui/Kbd.tsx
|
|
3843
3882
|
function Qn({ children: e, className: t }) {
|
|
3844
3883
|
return /* @__PURE__ */ p("kbd", {
|
|
3845
|
-
className:
|
|
3884
|
+
className: R("text-2xs inline-flex items-center px-1.5 py-0.5 font-mono font-medium", "bg-bg-tertiary text-text-secondary border-border rounded border", t),
|
|
3846
3885
|
children: e
|
|
3847
3886
|
});
|
|
3848
3887
|
}
|
|
@@ -3855,15 +3894,15 @@ var $n = {
|
|
|
3855
3894
|
};
|
|
3856
3895
|
function er({ className: e, size: t = "md" }) {
|
|
3857
3896
|
return /* @__PURE__ */ p("div", {
|
|
3858
|
-
className:
|
|
3859
|
-
children: /* @__PURE__ */ p(
|
|
3897
|
+
className: R("flex min-h-[200px] items-center justify-center", e),
|
|
3898
|
+
children: /* @__PURE__ */ p(ee, { className: R("text-accent animate-spin", $n[t]) })
|
|
3860
3899
|
});
|
|
3861
3900
|
}
|
|
3862
3901
|
//#endregion
|
|
3863
3902
|
//#region src/components/ui/MetadataGrid.tsx
|
|
3864
3903
|
function tr({ items: e, labelWidth: n = "100px", className: r }) {
|
|
3865
3904
|
return /* @__PURE__ */ p("div", {
|
|
3866
|
-
className:
|
|
3905
|
+
className: R("gap-x-3 gap-y-2 text-xs", r),
|
|
3867
3906
|
style: {
|
|
3868
3907
|
display: "grid",
|
|
3869
3908
|
gridTemplateColumns: `${n} 1fr`
|
|
@@ -3881,9 +3920,9 @@ function tr({ items: e, labelWidth: n = "100px", className: r }) {
|
|
|
3881
3920
|
//#region src/components/ui/MetricCard.tsx
|
|
3882
3921
|
function nr({ label: e, value: t, sub: n, bar: r, icon: i, iconColor: a, className: o }) {
|
|
3883
3922
|
return /* @__PURE__ */ m("div", {
|
|
3884
|
-
className:
|
|
3923
|
+
className: R("bg-bg-secondary border-border relative overflow-hidden rounded-md border p-3", o),
|
|
3885
3924
|
children: [
|
|
3886
|
-
i && /* @__PURE__ */ p(i, { className:
|
|
3925
|
+
i && /* @__PURE__ */ p(i, { className: R("absolute -right-9 -bottom-9 h-44 w-44 -rotate-45 opacity-[0.06]", a) }),
|
|
3887
3926
|
/* @__PURE__ */ p("p", {
|
|
3888
3927
|
className: "text-2xs-f text-text-tertiary font-label mb-1 font-medium tracking-wider uppercase",
|
|
3889
3928
|
children: e
|
|
@@ -3962,7 +4001,7 @@ function sr({ provider: e, children: t, ...n }) {
|
|
|
3962
4001
|
//#region src/components/ui/PageHeader.tsx
|
|
3963
4002
|
function cr({ title: e, subtitle: t, actions: n, className: r }) {
|
|
3964
4003
|
return /* @__PURE__ */ m("div", {
|
|
3965
|
-
className:
|
|
4004
|
+
className: R("flex items-center justify-between", r),
|
|
3966
4005
|
children: [/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("h1", {
|
|
3967
4006
|
className: "text-text-primary font-heading text-sm font-semibold",
|
|
3968
4007
|
children: e
|
|
@@ -3979,9 +4018,9 @@ function cr({ title: e, subtitle: t, actions: n, className: r }) {
|
|
|
3979
4018
|
//#region src/components/ui/PageSection.tsx
|
|
3980
4019
|
function lr({ title: e, description: t, actions: n, children: r, as: i = "h2", className: a, headerClassName: o, contentClassName: s }) {
|
|
3981
4020
|
return /* @__PURE__ */ m("section", {
|
|
3982
|
-
className:
|
|
4021
|
+
className: R("space-y-4", a),
|
|
3983
4022
|
children: [(e || t || n) && /* @__PURE__ */ m("div", {
|
|
3984
|
-
className:
|
|
4023
|
+
className: R("border-border flex items-end justify-between gap-3 border-b pb-2", o),
|
|
3985
4024
|
children: [/* @__PURE__ */ m("div", {
|
|
3986
4025
|
className: "min-w-0",
|
|
3987
4026
|
children: [e && /* @__PURE__ */ p(i, {
|
|
@@ -4020,7 +4059,7 @@ var ur = [
|
|
|
4020
4059
|
function dr({ page: e, pageSize: t, total: n, pageSizeOptions: r = ur, onPageChange: i, onPageSizeChange: a, className: o }) {
|
|
4021
4060
|
let s = Math.ceil(n / t), c = Math.min((e - 1) * t + 1, n), l = Math.min(e * t, n);
|
|
4022
4061
|
return /* @__PURE__ */ m("div", {
|
|
4023
|
-
className:
|
|
4062
|
+
className: R("flex items-center justify-between", o),
|
|
4024
4063
|
children: [/* @__PURE__ */ m("div", {
|
|
4025
4064
|
className: "flex items-center gap-3",
|
|
4026
4065
|
children: [/* @__PURE__ */ p(Y, {
|
|
@@ -4068,7 +4107,7 @@ var fr = r(({ label: e, error: t, className: n, id: r, ...i }, a) => {
|
|
|
4068
4107
|
ref: a,
|
|
4069
4108
|
id: o,
|
|
4070
4109
|
type: s ? "text" : "password",
|
|
4071
|
-
className:
|
|
4110
|
+
className: R("bg-bg-secondary text-text-primary h-7 w-full rounded-md border px-2 pr-8 text-xs", "placeholder:text-text-disabled", "transition-colors duration-[100ms]", "focus:border-accent focus:outline-none", t ? "border-red" : "border-border", n),
|
|
4072
4111
|
...i
|
|
4073
4112
|
}), /* @__PURE__ */ p("button", {
|
|
4074
4113
|
type: "button",
|
|
@@ -4085,9 +4124,9 @@ fr.displayName = "PasswordInput";
|
|
|
4085
4124
|
//#region src/components/ui/ProfileHeader.tsx
|
|
4086
4125
|
function pr({ name: e, subtitle: t, badge: n, meta: r, action: i, className: a }) {
|
|
4087
4126
|
return /* @__PURE__ */ m("div", {
|
|
4088
|
-
className:
|
|
4127
|
+
className: R("flex items-start gap-4", a),
|
|
4089
4128
|
children: [
|
|
4090
|
-
/* @__PURE__ */ p(
|
|
4129
|
+
/* @__PURE__ */ p(yt, {
|
|
4091
4130
|
name: e,
|
|
4092
4131
|
size: "lg"
|
|
4093
4132
|
}),
|
|
@@ -4133,7 +4172,7 @@ function pr({ name: e, subtitle: t, badge: n, meta: r, action: i, className: a }
|
|
|
4133
4172
|
//#region src/components/ui/ProseContent.tsx
|
|
4134
4173
|
function mr({ children: e, className: t }) {
|
|
4135
4174
|
return /* @__PURE__ */ p("div", {
|
|
4136
|
-
className:
|
|
4175
|
+
className: R("ui-prose", t),
|
|
4137
4176
|
children: e
|
|
4138
4177
|
});
|
|
4139
4178
|
}
|
|
@@ -4143,13 +4182,13 @@ function hr({ options: e, value: t, onChange: n, disabled: r, className: i, "ari
|
|
|
4143
4182
|
return /* @__PURE__ */ p("div", {
|
|
4144
4183
|
role: "radiogroup",
|
|
4145
4184
|
"aria-label": a,
|
|
4146
|
-
className:
|
|
4185
|
+
className: R("border-border inline-flex overflow-hidden rounded-md border", r && "cursor-not-allowed opacity-40", i),
|
|
4147
4186
|
children: e.map((e) => /* @__PURE__ */ p("button", {
|
|
4148
4187
|
role: "radio",
|
|
4149
4188
|
"aria-checked": e.value === t,
|
|
4150
4189
|
disabled: r,
|
|
4151
4190
|
onClick: () => n(e.value),
|
|
4152
|
-
className:
|
|
4191
|
+
className: R("font-control px-3 py-1.5 text-xs font-medium transition-colors duration-[100ms]", "focus-visible:outline-accent focus-visible:outline-2 focus-visible:outline-offset-[-2px]", !r && "cursor-pointer", e.value === t ? "bg-accent text-text-on-accent" : "bg-bg-secondary text-text-secondary hover:bg-bg-hover hover:text-text-primary"),
|
|
4153
4192
|
children: e.label
|
|
4154
4193
|
}, e.value))
|
|
4155
4194
|
});
|
|
@@ -4158,13 +4197,13 @@ function hr({ options: e, value: t, onChange: n, disabled: r, className: i, "ari
|
|
|
4158
4197
|
//#region src/components/ui/SearchInput.tsx
|
|
4159
4198
|
function gr({ value: e, onChange: t, placeholder: n = "Search...", className: r }) {
|
|
4160
4199
|
return /* @__PURE__ */ m("div", {
|
|
4161
|
-
className:
|
|
4162
|
-
children: [/* @__PURE__ */ p(
|
|
4200
|
+
className: R("relative", r),
|
|
4201
|
+
children: [/* @__PURE__ */ p(se, { className: "text-text-tertiary absolute top-1/2 left-2 h-3.5 w-3.5 -translate-y-1/2" }), /* @__PURE__ */ p("input", {
|
|
4163
4202
|
type: "search",
|
|
4164
4203
|
value: e,
|
|
4165
4204
|
onChange: (e) => t(e.target.value),
|
|
4166
4205
|
placeholder: n,
|
|
4167
|
-
className:
|
|
4206
|
+
className: R("bg-bg-secondary text-text-primary h-7 w-full pr-2 pl-7 text-xs", "border-border rounded-md border", "placeholder:text-text-disabled", "transition-colors duration-[100ms]", "focus:border-accent focus:outline-none")
|
|
4168
4207
|
})]
|
|
4169
4208
|
});
|
|
4170
4209
|
}
|
|
@@ -4189,7 +4228,7 @@ var _r = r(({ label: e, error: t, options: n, className: r, id: i, ...a }, o) =>
|
|
|
4189
4228
|
children: [/* @__PURE__ */ p("select", {
|
|
4190
4229
|
ref: o,
|
|
4191
4230
|
id: s,
|
|
4192
|
-
className:
|
|
4231
|
+
className: R("bg-bg-secondary text-text-primary font-control h-7 w-full px-2 pr-7 text-xs", "appearance-none rounded-md border", "transition-colors duration-[100ms]", "focus:border-accent focus:outline-none", "disabled:cursor-not-allowed disabled:opacity-40", "cursor-pointer", t ? "border-red" : "border-border", r),
|
|
4193
4232
|
...a,
|
|
4194
4233
|
children: n.map((e) => /* @__PURE__ */ p("option", {
|
|
4195
4234
|
value: e.value,
|
|
@@ -4204,7 +4243,7 @@ _r.displayName = "Select";
|
|
|
4204
4243
|
//#region src/components/ui/SettingRow.tsx
|
|
4205
4244
|
function vr({ label: e, description: t, action: n, className: r }) {
|
|
4206
4245
|
return /* @__PURE__ */ m("div", {
|
|
4207
|
-
className:
|
|
4246
|
+
className: R("border-border flex items-center justify-between border-b py-3", r),
|
|
4208
4247
|
children: [/* @__PURE__ */ m("div", {
|
|
4209
4248
|
className: "min-w-0 flex-1 pr-4",
|
|
4210
4249
|
children: [/* @__PURE__ */ p("p", {
|
|
@@ -4224,7 +4263,7 @@ function vr({ label: e, description: t, action: n, className: r }) {
|
|
|
4224
4263
|
//#region src/components/ui/SideSheet.tsx
|
|
4225
4264
|
function yr({ open: e, onClose: t, title: n, children: r, footer: i, side: a = "right", widthClassName: s = "w-[360px]", className: c, contentClassName: l }) {
|
|
4226
4265
|
let d = u(null);
|
|
4227
|
-
return
|
|
4266
|
+
return V(d, e), o(() => {
|
|
4228
4267
|
if (!e) return;
|
|
4229
4268
|
let n = (e) => {
|
|
4230
4269
|
e.key === "Escape" && t();
|
|
@@ -4232,7 +4271,7 @@ function yr({ open: e, onClose: t, title: n, children: r, footer: i, side: a = "
|
|
|
4232
4271
|
return document.addEventListener("keydown", n), document.body.style.overflow = "hidden", () => {
|
|
4233
4272
|
document.removeEventListener("keydown", n), document.body.style.overflow = "";
|
|
4234
4273
|
};
|
|
4235
|
-
}, [e, t]), e ?
|
|
4274
|
+
}, [e, t]), e ? I(/* @__PURE__ */ m("div", {
|
|
4236
4275
|
className: "fixed inset-0 z-50 flex",
|
|
4237
4276
|
children: [
|
|
4238
4277
|
a === "right" && /* @__PURE__ */ p("div", {
|
|
@@ -4241,7 +4280,7 @@ function yr({ open: e, onClose: t, title: n, children: r, footer: i, side: a = "
|
|
|
4241
4280
|
}),
|
|
4242
4281
|
/* @__PURE__ */ m("div", {
|
|
4243
4282
|
ref: d,
|
|
4244
|
-
className:
|
|
4283
|
+
className: R("bg-bg-secondary border-border flex flex-col shadow-lg", s, a === "right" ? "animate-slide-in-right border-l" : "animate-slide-in-left border-r", c),
|
|
4245
4284
|
style: { maxWidth: "calc(100vw - 2rem)" },
|
|
4246
4285
|
role: "dialog",
|
|
4247
4286
|
"aria-modal": "true",
|
|
@@ -4256,11 +4295,11 @@ function yr({ open: e, onClose: t, title: n, children: r, footer: i, side: a = "
|
|
|
4256
4295
|
onClick: t,
|
|
4257
4296
|
className: "text-text-tertiary hover:text-text-primary hover:bg-bg-hover ml-auto flex h-6 w-6 cursor-pointer items-center justify-center rounded",
|
|
4258
4297
|
"aria-label": "Close",
|
|
4259
|
-
children: /* @__PURE__ */ p(
|
|
4298
|
+
children: /* @__PURE__ */ p(F, { className: "h-3.5 w-3.5" })
|
|
4260
4299
|
})]
|
|
4261
4300
|
}),
|
|
4262
4301
|
/* @__PURE__ */ p("div", {
|
|
4263
|
-
className:
|
|
4302
|
+
className: R("flex-1 overflow-y-auto p-3", l),
|
|
4264
4303
|
children: r
|
|
4265
4304
|
}),
|
|
4266
4305
|
i && /* @__PURE__ */ p("div", {
|
|
@@ -4280,13 +4319,13 @@ function yr({ open: e, onClose: t, title: n, children: r, footer: i, side: a = "
|
|
|
4280
4319
|
//#region src/components/ui/SplitPaneLayout.tsx
|
|
4281
4320
|
function br({ children: e, direction: t = "row", className: n }) {
|
|
4282
4321
|
return /* @__PURE__ */ p("div", {
|
|
4283
|
-
className:
|
|
4322
|
+
className: R("-m-4 md:-m-6", "flex h-[calc(100vh-var(--topbar-height)-var(--bottomnav-height))] gap-0 md:h-[calc(100vh-var(--topbar-height))]", t === "column" && "flex-col", n),
|
|
4284
4323
|
children: e
|
|
4285
4324
|
});
|
|
4286
4325
|
}
|
|
4287
4326
|
function xr({ children: e, className: t }) {
|
|
4288
4327
|
return /* @__PURE__ */ p("div", {
|
|
4289
|
-
className:
|
|
4328
|
+
className: R("flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden", t),
|
|
4290
4329
|
children: e
|
|
4291
4330
|
});
|
|
4292
4331
|
}
|
|
@@ -4303,9 +4342,9 @@ var Sr = Object.assign(br, { Main: xr }), Cr = {
|
|
|
4303
4342
|
};
|
|
4304
4343
|
function Tr({ status: e, label: t, className: n }) {
|
|
4305
4344
|
return /* @__PURE__ */ m("span", {
|
|
4306
|
-
className:
|
|
4307
|
-
children: [/* @__PURE__ */ p("span", { className:
|
|
4308
|
-
className:
|
|
4345
|
+
className: R("inline-flex items-center gap-1.5", n),
|
|
4346
|
+
children: [/* @__PURE__ */ p("span", { className: R("h-2 w-2 rounded-full", Cr[e]) }), t && /* @__PURE__ */ p("span", {
|
|
4347
|
+
className: R("text-xs", wr[e]),
|
|
4309
4348
|
children: t
|
|
4310
4349
|
})]
|
|
4311
4350
|
});
|
|
@@ -4314,18 +4353,18 @@ function Tr({ status: e, label: t, className: n }) {
|
|
|
4314
4353
|
//#region src/components/ui/StepProgress.tsx
|
|
4315
4354
|
function Er({ steps: e, currentStep: t, className: n }) {
|
|
4316
4355
|
return /* @__PURE__ */ p("div", {
|
|
4317
|
-
className:
|
|
4356
|
+
className: R("flex items-center justify-between", n),
|
|
4318
4357
|
children: e.map((n, r) => /* @__PURE__ */ m("div", {
|
|
4319
4358
|
className: "flex flex-1 items-center",
|
|
4320
4359
|
children: [/* @__PURE__ */ m("div", {
|
|
4321
4360
|
className: "flex flex-col items-center",
|
|
4322
4361
|
children: [
|
|
4323
4362
|
/* @__PURE__ */ p("div", {
|
|
4324
|
-
className:
|
|
4363
|
+
className: R("flex h-8 w-8 items-center justify-center rounded-full text-xs", r < t && "bg-accent text-text-on-accent", r === t && "border-accent text-accent border-2 font-semibold", r > t && "bg-bg-tertiary border-border text-text-tertiary border"),
|
|
4325
4364
|
children: r < t ? /* @__PURE__ */ p(S, { className: "h-4 w-4" }) : r + 1
|
|
4326
4365
|
}),
|
|
4327
4366
|
/* @__PURE__ */ p("span", {
|
|
4328
|
-
className:
|
|
4367
|
+
className: R("text-2xs mt-1.5 hidden sm:block", r === t && "text-accent", r < t && "text-text-primary", r > t && "text-text-tertiary"),
|
|
4329
4368
|
children: n.label
|
|
4330
4369
|
}),
|
|
4331
4370
|
n.description && /* @__PURE__ */ p("span", {
|
|
@@ -4333,7 +4372,7 @@ function Er({ steps: e, currentStep: t, className: n }) {
|
|
|
4333
4372
|
children: n.description
|
|
4334
4373
|
})
|
|
4335
4374
|
]
|
|
4336
|
-
}), r < e.length - 1 && /* @__PURE__ */ p("div", { className:
|
|
4375
|
+
}), r < e.length - 1 && /* @__PURE__ */ p("div", { className: R("mx-2 h-0.5 flex-1", r < t ? "bg-accent" : "bg-border") })]
|
|
4337
4376
|
}, n.label))
|
|
4338
4377
|
});
|
|
4339
4378
|
}
|
|
@@ -4363,7 +4402,7 @@ function Dr({ tabs: e, defaultTab: t, value: n, onChange: r, className: i }) {
|
|
|
4363
4402
|
"aria-controls": `${h}-panel-${e.key}`,
|
|
4364
4403
|
onClick: () => f(e.key),
|
|
4365
4404
|
onKeyDown: _,
|
|
4366
|
-
className:
|
|
4405
|
+
className: R("font-control relative cursor-pointer px-3 py-2 text-xs font-medium transition-colors duration-[100ms]", "hover:text-text-primary", e.key === c ? "text-accent" : "text-text-tertiary"),
|
|
4367
4406
|
children: [e.label, e.key === c && /* @__PURE__ */ p("div", { className: "bg-accent absolute right-0 bottom-0 left-0 h-0.5 rounded-md" })]
|
|
4368
4407
|
}, e.key))
|
|
4369
4408
|
}), /* @__PURE__ */ p("div", {
|
|
@@ -4392,7 +4431,7 @@ var Or = r(({ label: e, error: t, showCount: n, maxLength: r, value: i, classNam
|
|
|
4392
4431
|
id: l,
|
|
4393
4432
|
value: i,
|
|
4394
4433
|
maxLength: r,
|
|
4395
|
-
className:
|
|
4434
|
+
className: R("bg-bg-secondary text-text-primary font-control min-h-[72px] w-full px-2 py-1.5 text-xs", "resize-y rounded-md border", "placeholder:text-text-disabled", "transition-colors duration-[100ms]", "focus:border-accent focus:outline-none", t ? "border-red" : "border-border", a),
|
|
4396
4435
|
...s
|
|
4397
4436
|
}),
|
|
4398
4437
|
/* @__PURE__ */ m("div", {
|
|
@@ -4438,7 +4477,7 @@ var kr = r(({ label: e, error: t, icon: n, className: r, id: i, readOnly: a, ...
|
|
|
4438
4477
|
ref: s,
|
|
4439
4478
|
id: c,
|
|
4440
4479
|
readOnly: a,
|
|
4441
|
-
className:
|
|
4480
|
+
className: R("bg-bg-secondary text-text-primary font-control h-7 w-full px-2 text-xs", "rounded-md border", "placeholder:text-text-disabled", "transition-colors duration-[100ms]", "focus:border-accent focus:outline-none", "disabled:cursor-not-allowed disabled:opacity-40", a && "bg-bg-primary text-text-secondary focus:border-border cursor-default border-dashed", n && "pl-7", t ? "border-red" : !a && "border-border", a && !t && "border-border", r),
|
|
4442
4481
|
...o
|
|
4443
4482
|
})]
|
|
4444
4483
|
})]
|
|
@@ -4449,14 +4488,14 @@ kr.displayName = "TextInput";
|
|
|
4449
4488
|
//#region src/components/ui/Timeline.tsx
|
|
4450
4489
|
function Ar({ items: e, className: t }) {
|
|
4451
4490
|
return /* @__PURE__ */ p("div", {
|
|
4452
|
-
className:
|
|
4491
|
+
className: R("space-y-0", t),
|
|
4453
4492
|
children: e.map((t, n) => /* @__PURE__ */ m("div", {
|
|
4454
4493
|
className: "flex gap-3",
|
|
4455
4494
|
children: [/* @__PURE__ */ m("div", {
|
|
4456
4495
|
className: "flex flex-col items-center",
|
|
4457
|
-
children: [/* @__PURE__ */ p("div", { className:
|
|
4496
|
+
children: [/* @__PURE__ */ p("div", { className: R(t.dot, "mt-1.5 h-2 w-2 shrink-0 rounded-full") }), n < e.length - 1 && /* @__PURE__ */ p("div", { className: "bg-border mt-1 w-px flex-1" })]
|
|
4458
4497
|
}), /* @__PURE__ */ m("div", {
|
|
4459
|
-
className:
|
|
4498
|
+
className: R("pb-4", n === e.length - 1 && "pb-0"),
|
|
4460
4499
|
children: [/* @__PURE__ */ p("p", {
|
|
4461
4500
|
className: "text-text-primary text-xs",
|
|
4462
4501
|
children: t.text
|
|
@@ -4487,7 +4526,7 @@ function Mr({ content: e, placement: t = "top", children: n }) {
|
|
|
4487
4526
|
"aria-describedby": r ? a : void 0,
|
|
4488
4527
|
children: [n, r && /* @__PURE__ */ p("div", {
|
|
4489
4528
|
id: a,
|
|
4490
|
-
className:
|
|
4529
|
+
className: R("text-2xs absolute z-50 px-2 py-1 font-medium whitespace-nowrap", "bg-bg-tertiary text-text-primary border-border rounded border shadow-md", "animate-fade-in pointer-events-none", jr[t]),
|
|
4491
4530
|
role: "tooltip",
|
|
4492
4531
|
children: e
|
|
4493
4532
|
})]
|
|
@@ -4497,12 +4536,12 @@ function Mr({ content: e, placement: t = "top", children: n }) {
|
|
|
4497
4536
|
//#region src/components/ui/Toolbar.tsx
|
|
4498
4537
|
function Nr({ start: e, end: t, children: n, className: r, startClassName: i, endClassName: a }) {
|
|
4499
4538
|
return /* @__PURE__ */ m("div", {
|
|
4500
|
-
className:
|
|
4539
|
+
className: R("flex items-center justify-between gap-3", r),
|
|
4501
4540
|
children: [/* @__PURE__ */ p("div", {
|
|
4502
|
-
className:
|
|
4541
|
+
className: R("flex flex-1 items-center gap-3", i),
|
|
4503
4542
|
children: e ?? n
|
|
4504
4543
|
}), t && /* @__PURE__ */ p("div", {
|
|
4505
|
-
className:
|
|
4544
|
+
className: R("flex items-center gap-1.5", a),
|
|
4506
4545
|
children: t
|
|
4507
4546
|
})]
|
|
4508
4547
|
});
|
|
@@ -4511,7 +4550,7 @@ function Nr({ start: e, end: t, children: n, className: r, startClassName: i, en
|
|
|
4511
4550
|
//#region src/components/ui/UploadDropzone.tsx
|
|
4512
4551
|
function Pr({ title: e = "Drag and drop files here, or click to browse", description: t, icon: n, accept: r, multiple: i, disabled: a, onChange: o, className: s }) {
|
|
4513
4552
|
return /* @__PURE__ */ m("label", {
|
|
4514
|
-
className:
|
|
4553
|
+
className: R("border-border hover:border-border-strong block rounded-md border-2 border-dashed p-8 text-center transition-colors duration-[100ms]", a ? "cursor-not-allowed opacity-60" : "cursor-pointer hover:bg-bg-hover", s),
|
|
4515
4554
|
children: [
|
|
4516
4555
|
/* @__PURE__ */ p("input", {
|
|
4517
4556
|
type: "file",
|
|
@@ -4523,7 +4562,7 @@ function Pr({ title: e = "Drag and drop files here, or click to browse", descrip
|
|
|
4523
4562
|
}),
|
|
4524
4563
|
/* @__PURE__ */ p("div", {
|
|
4525
4564
|
className: "text-text-tertiary mx-auto mb-3 flex h-9 w-9 items-center justify-center rounded-md bg-bg-tertiary",
|
|
4526
|
-
children: n ?? /* @__PURE__ */ p(
|
|
4565
|
+
children: n ?? /* @__PURE__ */ p(ue, { className: "h-4.5 w-4.5" })
|
|
4527
4566
|
}),
|
|
4528
4567
|
/* @__PURE__ */ p("p", {
|
|
4529
4568
|
className: "text-text-secondary mb-1 text-xs",
|
|
@@ -4650,7 +4689,7 @@ var Z = {
|
|
|
4650
4689
|
muted: "rgba(99,102,241,0.15)",
|
|
4651
4690
|
subtle: "rgba(99,102,241,0.08)"
|
|
4652
4691
|
}
|
|
4653
|
-
}, Hr = "leonardaustin-ui-settings", Ur = new Set(Object.keys(Vr)), Wr = new Set(Object.keys(
|
|
4692
|
+
}, Hr = "leonardaustin-ui-settings", Ur = new Set(Object.keys(Vr)), Wr = new Set(Object.keys(U)), Q = new Set(Object.keys(Z)), Gr = new Set([
|
|
4654
4693
|
"light",
|
|
4655
4694
|
"dark",
|
|
4656
4695
|
"system"
|
|
@@ -4660,11 +4699,11 @@ function $(e, t, n, r) {
|
|
|
4660
4699
|
}
|
|
4661
4700
|
function Kr(e) {
|
|
4662
4701
|
let t = {};
|
|
4663
|
-
if (Ur.has(e.accentColor) && (t.accentColor = e.accentColor), Gr.has(e.colorMode) && (t.colorMode = e.colorMode), Wr.has(e.preferredDarkTheme) && !
|
|
4702
|
+
if (Ur.has(e.accentColor) && (t.accentColor = e.accentColor), Gr.has(e.colorMode) && (t.colorMode = e.colorMode), Wr.has(e.preferredDarkTheme) && !H(e.preferredDarkTheme) && (t.preferredDarkTheme = e.preferredDarkTheme), Wr.has(e.preferredLightTheme) && H(e.preferredLightTheme) && (t.preferredLightTheme = e.preferredLightTheme), typeof e.sidebarCollapsed == "boolean" && (t.sidebarCollapsed = e.sidebarCollapsed), typeof e.reducedMotion == "boolean" && (t.reducedMotion = e.reducedMotion), typeof e.sidebarWidth == "number" && (t.sidebarWidth = $(e.sidebarWidth, 160, 400, 220)), e.themeOverrides && typeof e.themeOverrides == "object") {
|
|
4664
4703
|
let n = {};
|
|
4665
4704
|
for (let [t, r] of Object.entries(e.themeOverrides)) {
|
|
4666
4705
|
if (!Wr.has(t) || !r || typeof r != "object") continue;
|
|
4667
|
-
let e = r, i =
|
|
4706
|
+
let e = r, i = U[t];
|
|
4668
4707
|
n[t] = {
|
|
4669
4708
|
uiFont: Q.has(e.uiFont) ? e.uiFont : i.uiFont,
|
|
4670
4709
|
headingFont: Q.has(e.headingFont) ? e.headingFont : i.headingFont,
|
|
@@ -4710,7 +4749,7 @@ function Jr(e) {
|
|
|
4710
4749
|
return qr;
|
|
4711
4750
|
}
|
|
4712
4751
|
function Yr(e, t) {
|
|
4713
|
-
let n =
|
|
4752
|
+
let n = U[e] ?? U.dark;
|
|
4714
4753
|
return t[e] ? {
|
|
4715
4754
|
...n,
|
|
4716
4755
|
...t[e]
|
|
@@ -4770,7 +4809,7 @@ function Zr({ children: e, storageKey: t = Hr }) {
|
|
|
4770
4809
|
u
|
|
4771
4810
|
]), y = i(() => {
|
|
4772
4811
|
let e = { ...n.themeOverrides };
|
|
4773
|
-
delete e[c], m({ themeOverrides: e }), f(
|
|
4812
|
+
delete e[c], m({ themeOverrides: e }), f(U[c] ?? U.dark);
|
|
4774
4813
|
}, [
|
|
4775
4814
|
m,
|
|
4776
4815
|
n.themeOverrides,
|
|
@@ -4875,7 +4914,7 @@ function Zr({ children: e, storageKey: t = Hr }) {
|
|
|
4875
4914
|
g,
|
|
4876
4915
|
_
|
|
4877
4916
|
]);
|
|
4878
|
-
return /* @__PURE__ */ p(
|
|
4917
|
+
return /* @__PURE__ */ p(ht.Provider, {
|
|
4879
4918
|
value: b,
|
|
4880
4919
|
children: e
|
|
4881
4920
|
});
|
|
@@ -4892,7 +4931,7 @@ var Qr = {
|
|
|
4892
4931
|
hashiTheme: "theme-hashi"
|
|
4893
4932
|
};
|
|
4894
4933
|
function $r({ children: e }) {
|
|
4895
|
-
let { resolvedTheme: t } = a(
|
|
4934
|
+
let { resolvedTheme: t } = a(ht);
|
|
4896
4935
|
return o(() => {
|
|
4897
4936
|
let e = document.documentElement;
|
|
4898
4937
|
Object.values(Qr).forEach((t) => {
|
|
@@ -4906,4 +4945,4 @@ function $r({ children: e }) {
|
|
|
4906
4945
|
});
|
|
4907
4946
|
}
|
|
4908
4947
|
//#endregion
|
|
4909
|
-
export { pn as Alert, nn as AppShell,
|
|
4948
|
+
export { pn as Alert, nn as AppShell, me as AreaChart, mn as AuthCard, rn as AuthLayout, hn as AuthorByline, yt as Avatar, an as BackLink, vn as Badge, ge as BarChart, Qe as BottomNav, Lt as Breadcrumbs, q as Button, et as COMMAND_PALETTE_EVENT, Tn as CalendarGrid, En as Card, on as Checkbox, cn as ColumnPicker, Dn as Combobox, at as CommandPalette, tt as DEFAULT_COMMAND_PALETTE_SHORTCUT, On as DangerZone, An as DatePicker, Pn as DateRangePicker, Bn as DateTimePicker, Wn as DetailPanel, Gn as Dialog, Kn as DialogActions, qn as DividerLabel, Ve as DonutChart, Jn as DropdownMenu, Yn as EmptyState, Xn as ErrorBoundary, sn as FilterButton, Zn as FilterDropdown, Qn as Kbd, er as LoadingSpinner, tr as MetadataGrid, nr as MetricCard, st as MobileDrawer, sr as OAuthButton, cr as PageHeader, lr as PageSection, ln as Pagination, dr as PaginationBar, fr as PasswordInput, pr as ProfileHeader, mr as ProseContent, Ue as RadarChart, Ge as RadialBarChart, hr as RadioPill, dn as ResourceTable, gr as SearchInput, J as SectionHeader, _r as Select, Y as SelectDropdown, vr as SettingRow, ht as SettingsContext, Zr as SettingsProvider, yr as SideSheet, Ft as Sidebar, X as Slider, Ke as SparkLine, Sr as SplitPaneLayout, Tr as StatusDot, Er as StepProgress, Jt as THEME_MENU_EVENT, Dr as Tabs, kr as TextInput, Or as Textarea, Fr as ThemeContext, Zt as ThemeMenu, Kt as ThemePreview, $r as ThemeProvider, Ar as Timeline, St as ToastProvider, qt as Toggle, Nr as Toolbar, Mr as Tooltip, tn as TopBar, Pr as UploadDropzone, Ye as VerticalBarChart, mt as accentItems, R as cn, dt as darkThemes, W as fontOptions, zr as formatDateLong, Rr as formatDateShort, Br as formatRelative, B as handleAppShellNavigate, Xe as isAppShellPathActive, H as isLightTheme, ut as lightThemes, rt as matchesCommandPaletteShortcut, Ze as navigateToPath, nt as openCommandPalette, Yt as openThemeMenu, un as sortRows, U as themeDefaults, ct as themeItems, Rt as useApplyTheme, G as useDismiss, V as useFocusTrap, K as useSettings, Ir as useTheme, xt as useToast };
|