@leonardaustin/ui 0.12.0 → 0.13.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/ui/Dialog.d.ts.map +1 -1
- package/dist/index.js +531 -530
- package/dist/styles.css +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { Component as e, Fragment as t, cloneElement as n, createContext as r, createElement as i, forwardRef as a, isValidElement as o, useCallback as s, useContext as c, useEffect as l, useId as u, useImperativeHandle as d, useLayoutEffect as f, useMemo as p, useRef as m, useState as h } from "react";
|
|
2
2
|
import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
3
|
-
import { Accessibility as y, AlertTriangle as b, ArrowDown as x, ArrowLeft as S, ArrowUp as C, BookOpen as w, Calendar as T, Check as E, CheckCircle2 as D, ChevronDown as O, ChevronLeft as k, ChevronRight as A, ChevronsUpDown as j, Columns3 as M, Eye as N, EyeOff as P, GripVertical as F,
|
|
4
|
-
import { createPortal as
|
|
3
|
+
import { Accessibility as y, AlertTriangle as b, ArrowDown as x, ArrowLeft as S, ArrowUp as C, BookOpen as w, Calendar as T, Check as E, CheckCircle2 as D, ChevronDown as O, ChevronLeft as k, ChevronRight as A, ChevronsUpDown as j, Columns3 as M, Eye as N, EyeOff as P, GripVertical as F, HandleBottomRight as I, Inbox as L, Info as R, Loader2 as ee, LogOut as te, Menu as ne, Minus as re, Monitor as z, Moon as ie, Palette as ae, PanelLeft as B, PanelLeftDashed as oe, Search as se, Settings as ce, Sun as le, UploadCloud as ue, X as V, XCircle as H, Zap as U } from "lucide-react";
|
|
4
|
+
import { createPortal as de } from "react-dom";
|
|
5
5
|
//#region src/lib/cn.ts
|
|
6
|
-
function
|
|
6
|
+
function W(e) {
|
|
7
7
|
if (typeof e == "string" || typeof e == "number" || typeof e == "bigint") return String(e);
|
|
8
8
|
if (!e || typeof e != "object") return "";
|
|
9
9
|
let t = "";
|
|
10
10
|
if (Array.isArray(e)) for (let n of e) {
|
|
11
11
|
if (!n) continue;
|
|
12
|
-
let e =
|
|
12
|
+
let e = W(n);
|
|
13
13
|
e && (t = t ? `${t} ${e}` : e);
|
|
14
14
|
}
|
|
15
15
|
else for (let n in e) e[n] && (t = t ? `${t} ${n}` : n);
|
|
16
16
|
return t;
|
|
17
17
|
}
|
|
18
|
-
var
|
|
18
|
+
var G = new Set([
|
|
19
19
|
"block",
|
|
20
20
|
"contents",
|
|
21
21
|
"flex",
|
|
@@ -25,7 +25,7 @@ var W = new Set([
|
|
|
25
25
|
"inline-block",
|
|
26
26
|
"inline-flex",
|
|
27
27
|
"table"
|
|
28
|
-
]),
|
|
28
|
+
]), fe = new Set([
|
|
29
29
|
"text-2xl",
|
|
30
30
|
"text-2xs",
|
|
31
31
|
"text-2xs-f",
|
|
@@ -36,16 +36,16 @@ var W = new Set([
|
|
|
36
36
|
"text-sm",
|
|
37
37
|
"text-xl",
|
|
38
38
|
"text-xs"
|
|
39
|
-
]),
|
|
39
|
+
]), pe = new Set([
|
|
40
40
|
"text-center",
|
|
41
41
|
"text-left",
|
|
42
42
|
"text-right"
|
|
43
|
-
]),
|
|
43
|
+
]), me = new Set(["lowercase", "uppercase"]), he = new Set([
|
|
44
44
|
"font-bold",
|
|
45
45
|
"font-medium",
|
|
46
46
|
"font-normal",
|
|
47
47
|
"font-semibold"
|
|
48
|
-
]),
|
|
48
|
+
]), ge = {
|
|
49
49
|
m: [
|
|
50
50
|
"margin-top",
|
|
51
51
|
"margin-right",
|
|
@@ -70,7 +70,7 @@ var W = new Set([
|
|
|
70
70
|
pr: ["padding-right"],
|
|
71
71
|
pb: ["padding-bottom"],
|
|
72
72
|
pl: ["padding-left"]
|
|
73
|
-
},
|
|
73
|
+
}, _e = {
|
|
74
74
|
inset: [
|
|
75
75
|
"top",
|
|
76
76
|
"right",
|
|
@@ -85,7 +85,7 @@ var W = new Set([
|
|
|
85
85
|
left: ["left"],
|
|
86
86
|
start: ["inset-inline-start"],
|
|
87
87
|
end: ["inset-inline-end"]
|
|
88
|
-
},
|
|
88
|
+
}, ve = {
|
|
89
89
|
border: [
|
|
90
90
|
"border-top-width",
|
|
91
91
|
"border-right-width",
|
|
@@ -98,7 +98,7 @@ var W = new Set([
|
|
|
98
98
|
"border-r": ["border-right-width"],
|
|
99
99
|
"border-b": ["border-bottom-width"],
|
|
100
100
|
"border-l": ["border-left-width"]
|
|
101
|
-
},
|
|
101
|
+
}, ye = {
|
|
102
102
|
border: [
|
|
103
103
|
"border-top-color",
|
|
104
104
|
"border-right-color",
|
|
@@ -111,7 +111,7 @@ var W = new Set([
|
|
|
111
111
|
"border-r": ["border-right-color"],
|
|
112
112
|
"border-b": ["border-bottom-color"],
|
|
113
113
|
"border-l": ["border-left-color"]
|
|
114
|
-
},
|
|
114
|
+
}, be = new Set([
|
|
115
115
|
"border-dashed",
|
|
116
116
|
"border-dotted",
|
|
117
117
|
"border-double",
|
|
@@ -119,14 +119,14 @@ var W = new Set([
|
|
|
119
119
|
"border-none",
|
|
120
120
|
"border-solid"
|
|
121
121
|
]);
|
|
122
|
-
function
|
|
123
|
-
return
|
|
122
|
+
function K(...e) {
|
|
123
|
+
return xe(W(e));
|
|
124
124
|
}
|
|
125
|
-
function
|
|
125
|
+
function xe(e) {
|
|
126
126
|
let t = [], n = /* @__PURE__ */ new Map();
|
|
127
127
|
for (let r of e.split(/\s+/)) {
|
|
128
128
|
if (!r) continue;
|
|
129
|
-
let e =
|
|
129
|
+
let e = Se(r);
|
|
130
130
|
if (e.size === 0) {
|
|
131
131
|
let i = n.get(r);
|
|
132
132
|
i !== void 0 && (t[i] = null), n.set(r, t.length), t.push({
|
|
@@ -137,7 +137,7 @@ function Se(e) {
|
|
|
137
137
|
}
|
|
138
138
|
for (let n = t.length - 1; n >= 0; n--) {
|
|
139
139
|
let r = t[n];
|
|
140
|
-
r && r.keys.size > 0 &&
|
|
140
|
+
r && r.keys.size > 0 && je(r.keys, e) && (t[n] = null);
|
|
141
141
|
}
|
|
142
142
|
t.push({
|
|
143
143
|
token: r,
|
|
@@ -146,11 +146,11 @@ function Se(e) {
|
|
|
146
146
|
}
|
|
147
147
|
return t.filter((e) => !!e).map((e) => e.token).join(" ");
|
|
148
148
|
}
|
|
149
|
-
function
|
|
150
|
-
let t =
|
|
149
|
+
function Se(e) {
|
|
150
|
+
let t = Ce(e), n = t.pop() ?? e, r = n.startsWith("!"), i = we(r ? n.slice(1) : n), a = `${t.join(":")}|${r ? "!" : ""}`, o = Te(i);
|
|
151
151
|
return new Set(o.map((e) => `${a}${e}`));
|
|
152
152
|
}
|
|
153
|
-
function
|
|
153
|
+
function Ce(e) {
|
|
154
154
|
let t = [], n = 0, r = 0;
|
|
155
155
|
for (let i = 0; i < e.length; i++) {
|
|
156
156
|
let a = e[i];
|
|
@@ -158,50 +158,50 @@ function we(e) {
|
|
|
158
158
|
}
|
|
159
159
|
return t.push(e.slice(r)), t;
|
|
160
160
|
}
|
|
161
|
-
function
|
|
161
|
+
function we(e) {
|
|
162
162
|
return e.startsWith("-") ? e.slice(1) : e;
|
|
163
163
|
}
|
|
164
|
-
function
|
|
165
|
-
let t =
|
|
166
|
-
if (t) return [...
|
|
167
|
-
let n =
|
|
168
|
-
if (n) return [...
|
|
169
|
-
let r =
|
|
170
|
-
if (r) return [...
|
|
171
|
-
if (
|
|
164
|
+
function Te(e) {
|
|
165
|
+
let t = Ee(e);
|
|
166
|
+
if (t) return [...ge[t]];
|
|
167
|
+
let n = De(e);
|
|
168
|
+
if (n) return [..._e[n]];
|
|
169
|
+
let r = Oe(e);
|
|
170
|
+
if (r) return [...ve[r]];
|
|
171
|
+
if (G.has(e)) return ["display"];
|
|
172
172
|
if (e === "absolute" || e === "fixed" || e === "relative" || e === "static" || e === "sticky") return ["position"];
|
|
173
173
|
if (e === "visible" || e === "invisible" || e === "collapse") return ["visibility"];
|
|
174
174
|
if (e === "border-collapse") return ["border-collapse"];
|
|
175
|
-
if (
|
|
176
|
-
let i =
|
|
177
|
-
return i ? [...
|
|
175
|
+
if (be.has(e)) return ["border-style"];
|
|
176
|
+
let i = ke(e);
|
|
177
|
+
return i ? [...ye[i]] : e === "rounded" || e.startsWith("rounded-") ? ["border-radius"] : e.startsWith("bg-") ? ["background"] : fe.has(e) ? ["font-size"] : pe.has(e) ? ["text-align"] : me.has(e) ? ["text-transform"] : e.startsWith("text-") ? ["color"] : e === "font-mono" ? ["font-family"] : he.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"] : [];
|
|
178
|
+
}
|
|
179
|
+
function Ee(e) {
|
|
180
|
+
return Ae(e, ge);
|
|
178
181
|
}
|
|
179
182
|
function De(e) {
|
|
180
|
-
return
|
|
183
|
+
return Ae(e, _e);
|
|
181
184
|
}
|
|
182
185
|
function Oe(e) {
|
|
183
|
-
return je(e, ve);
|
|
184
|
-
}
|
|
185
|
-
function ke(e) {
|
|
186
186
|
return e === "border" ? "border" : e.match(/^(border(?:-[xytrbl])?)(?=$|-(?:0|2|4|8|\[))/)?.[1];
|
|
187
187
|
}
|
|
188
|
-
function
|
|
188
|
+
function ke(e) {
|
|
189
189
|
let t = e.match(/^(border-[xytrbl])-./);
|
|
190
190
|
return t ? t[1] : e.startsWith("border-") ? "border" : void 0;
|
|
191
191
|
}
|
|
192
|
-
function
|
|
192
|
+
function Ae(e, t) {
|
|
193
193
|
return Object.keys(t).sort((e, t) => String(t).length - String(e).length).find((t) => {
|
|
194
194
|
let n = String(t);
|
|
195
195
|
return e === n || e.startsWith(`${n}-`);
|
|
196
196
|
});
|
|
197
197
|
}
|
|
198
|
-
function
|
|
198
|
+
function je(e, t) {
|
|
199
199
|
for (let n of e) if (!t.has(n)) return !1;
|
|
200
200
|
return !0;
|
|
201
201
|
}
|
|
202
202
|
//#endregion
|
|
203
203
|
//#region src/components/charts/chartUtils.ts
|
|
204
|
-
var
|
|
204
|
+
var Me = {
|
|
205
205
|
"text-accent": "var(--accent)",
|
|
206
206
|
"text-blue": "var(--blue)",
|
|
207
207
|
"text-green": "var(--green)",
|
|
@@ -209,27 +209,27 @@ var Ne = {
|
|
|
209
209
|
"text-red": "var(--red)",
|
|
210
210
|
"text-yellow": "var(--yellow)"
|
|
211
211
|
};
|
|
212
|
-
function
|
|
212
|
+
function Ne(e, t, n) {
|
|
213
213
|
return Math.min(n, Math.max(t, e));
|
|
214
214
|
}
|
|
215
|
-
function
|
|
215
|
+
function Pe(e) {
|
|
216
216
|
let t = Math.abs(e);
|
|
217
217
|
return t >= 1e6 ? `${(e / 1e6).toFixed(1)}M` : t >= 1e3 ? `${(e / 1e3).toFixed(1)}k` : String(e);
|
|
218
218
|
}
|
|
219
|
-
function
|
|
220
|
-
return e ?
|
|
219
|
+
function Fe(e) {
|
|
220
|
+
return e ? Me[e] ?? e : "var(--accent)";
|
|
221
221
|
}
|
|
222
|
-
function
|
|
222
|
+
function Ie(e, t) {
|
|
223
223
|
if (e <= 0 || t <= 0) return [];
|
|
224
224
|
if (e === 1 || t === 1) return [0];
|
|
225
225
|
let n = Math.min(e, Math.max(2, Math.floor(t))), r = (e - 1) / (n - 1), i = /* @__PURE__ */ new Set();
|
|
226
226
|
for (let e = 0; e < n; e += 1) i.add(Math.round(e * r));
|
|
227
227
|
return i.add(e - 1), Array.from(i).sort((e, t) => e - t);
|
|
228
228
|
}
|
|
229
|
-
function
|
|
229
|
+
function q(e) {
|
|
230
230
|
return Number.isFinite(e) ? Math.max(0, e) : 0;
|
|
231
231
|
}
|
|
232
|
-
function
|
|
232
|
+
function Le(e, t) {
|
|
233
233
|
let n = String(e ?? "");
|
|
234
234
|
return t === void 0 || t <= 0 || n.length <= t ? n : t <= 3 ? n.slice(0, t) : `${n.slice(0, t - 3)}...`;
|
|
235
235
|
}
|
|
@@ -239,16 +239,16 @@ function Re(e, t = 10) {
|
|
|
239
239
|
return Math.ceil(n);
|
|
240
240
|
}
|
|
241
241
|
function ze(e, { maxWidth: t = 220, minWidth: n = 72, paddingX: r = 20 } = {}) {
|
|
242
|
-
return
|
|
242
|
+
return Ne(e.reduce((e, t) => Math.max(e, Re(t, 11)), 0) + r, n, t);
|
|
243
243
|
}
|
|
244
244
|
function Be(e, t, { boundsHeight: n, boundsWidth: r, height: i, margin: a = 0, offset: o = 8, width: s }) {
|
|
245
|
-
let c = Math.max(1, Math.min(s, r - a * 2)), l = Math.max(1, Math.min(i, n - a * 2)), u = Math.max(a, r - c - a), d = Math.max(a, n - l - a), f =
|
|
245
|
+
let c = Math.max(1, Math.min(s, r - a * 2)), l = Math.max(1, Math.min(i, n - a * 2)), u = Math.max(a, r - c - a), d = Math.max(a, n - l - a), f = Ne(e - c / 2, a, u), p = t - l - o, m = p >= a ? "above" : "below";
|
|
246
246
|
return {
|
|
247
247
|
height: l,
|
|
248
248
|
placement: m,
|
|
249
249
|
width: c,
|
|
250
250
|
x: f,
|
|
251
|
-
y: m === "above" ? p :
|
|
251
|
+
y: m === "above" ? p : Ne(t + o, a, d)
|
|
252
252
|
};
|
|
253
253
|
}
|
|
254
254
|
function Ve({ anchorX: e, anchorY: t, boundsHeight: n, boundsWidth: r, height: i, margin: a = 0, offset: o = 8, width: s }) {
|
|
@@ -290,7 +290,7 @@ function We({ data: e, height: t = 240, minValue: n, maxValue: r, startAtZero: i
|
|
|
290
290
|
}
|
|
291
291
|
E === D && (D = E + 1);
|
|
292
292
|
}
|
|
293
|
-
let O = D - E, k = a ??
|
|
293
|
+
let O = D - E, k = a ?? Pe, A = o ?? a ?? ((e) => e.toLocaleString());
|
|
294
294
|
function j(t) {
|
|
295
295
|
return J.left + t / Math.max(e.length - 1, 1) * x;
|
|
296
296
|
}
|
|
@@ -301,7 +301,7 @@ function We({ data: e, height: t = 240, minValue: n, maxValue: r, startAtZero: i
|
|
|
301
301
|
`${j(0)},${J.top + S}`,
|
|
302
302
|
...e.map((e, t) => `${j(t)},${M(e.value)}`),
|
|
303
303
|
`${j(e.length - 1)},${J.top + S}`
|
|
304
|
-
].join(" ") : "", F =
|
|
304
|
+
].join(" ") : "", F = Ie(e.length, s);
|
|
305
305
|
function I(t) {
|
|
306
306
|
let n = f.current;
|
|
307
307
|
if (!n || e.length === 0) return;
|
|
@@ -330,7 +330,7 @@ function We({ data: e, height: t = 240, minValue: n, maxValue: r, startAtZero: i
|
|
|
330
330
|
viewBox: `0 0 ${He} ${b}`,
|
|
331
331
|
onPointerMove: I,
|
|
332
332
|
onPointerLeave: R,
|
|
333
|
-
className:
|
|
333
|
+
className: K("select-none", l),
|
|
334
334
|
role: "img",
|
|
335
335
|
"aria-label": c,
|
|
336
336
|
children: [
|
|
@@ -484,15 +484,15 @@ var Ge = [
|
|
|
484
484
|
.45
|
|
485
485
|
], Ke = 600;
|
|
486
486
|
function qe({ data: e, height: t, maxValue: n, valueFormatter: r, labelFormatter: i, maxLabelLength: a, labelWidth: o = 160, valueWidth: s = 60, barHeight: c = 28, gap: l = 10, ariaLabel: u = "Horizontal bar chart", className: d }) {
|
|
487
|
-
let [f, p] = h(null), m = e.length, g = Math.max(1, c), y = Math.max(0, l), b = m > 0 ? m * g + Math.max(0, m - 1) * y : g, x = Math.max(1, t ?? b), S = t === void 0 ? 1 : x / b, C = g * S, w = y * S, T = Math.min(3, C / 3), E = Math.max(0, C - T * 2), D = n === void 0 ? Math.max(...e.map((e) =>
|
|
487
|
+
let [f, p] = h(null), m = e.length, g = Math.max(1, c), y = Math.max(0, l), b = m > 0 ? m * g + Math.max(0, m - 1) * y : g, x = Math.max(1, t ?? b), S = t === void 0 ? 1 : x / b, C = g * S, w = y * S, T = Math.min(3, C / 3), E = Math.max(0, C - T * 2), D = n === void 0 ? Math.max(...e.map((e) => q(e.value)), 1) : Math.max(q(n), 1), O = Math.max(0, o), k = Math.max(0, s), A = Math.max(0, Ke - O - k), j = r ?? ((e) => e.toLocaleString());
|
|
488
488
|
return /* @__PURE__ */ _("svg", {
|
|
489
489
|
width: "100%",
|
|
490
490
|
viewBox: `0 0 ${Ke} ${x}`,
|
|
491
|
-
className:
|
|
491
|
+
className: K("select-none", d),
|
|
492
492
|
role: "img",
|
|
493
493
|
"aria-label": u,
|
|
494
494
|
children: e.map((e, t) => {
|
|
495
|
-
let n = t * (C + w), r = D > 0 ?
|
|
495
|
+
let n = t * (C + w), r = D > 0 ? Ne(q(e.value), 0, D) / D * A : 0, o = f === t, s = i?.(e.label, e, t) ?? e.label, c = Le(s, a), l = c !== s, u = j(e.value);
|
|
496
496
|
return /* @__PURE__ */ v("g", {
|
|
497
497
|
onMouseEnter: () => p(t),
|
|
498
498
|
onMouseLeave: () => p(null),
|
|
@@ -560,9 +560,9 @@ function qe({ data: e, height: t, maxValue: n, valueFormatter: r, labelFormatter
|
|
|
560
560
|
//#endregion
|
|
561
561
|
//#region src/components/charts/DonutChart.tsx
|
|
562
562
|
function Je(e, t) {
|
|
563
|
-
let n = e.reduce((e, t) => e +
|
|
563
|
+
let n = e.reduce((e, t) => e + q(t.value), 0), r = 0;
|
|
564
564
|
return e.map((e) => {
|
|
565
|
-
let i =
|
|
565
|
+
let i = q(e.value), a = n > 0 ? i / n * t : 0, o = t - a, s = r / t * 360 - 90, c = s + a / t * 180, l = n > 0 ? i / n * 100 : 0;
|
|
566
566
|
return r += a, {
|
|
567
567
|
segment: e,
|
|
568
568
|
segmentLength: a,
|
|
@@ -574,9 +574,9 @@ function Je(e, t) {
|
|
|
574
574
|
});
|
|
575
575
|
}
|
|
576
576
|
function Ye({ segments: e, size: t = 180, strokeWidth: n = 28, valueFormatter: r, percentageFormatter: i, showLegend: a = !0, ariaLabel: o = "Donut chart", className: s }) {
|
|
577
|
-
let [c, l] = h(null), u = e.reduce((e, t) => e +
|
|
577
|
+
let [c, l] = h(null), u = e.reduce((e, t) => e + q(t.value), 0), d = Math.max(1, t), f = Math.max(1, Math.min(n, d - 1)), p = Math.max(.5, (d - f) / 2), m = Je(e, 2 * Math.PI * p), g = r ?? ((e) => e.toLocaleString()), y = i ?? ((e) => `${e.toFixed(1)}%`), b = d + 12, x = b / 2;
|
|
578
578
|
return /* @__PURE__ */ v("div", {
|
|
579
|
-
className:
|
|
579
|
+
className: K("flex flex-col items-center gap-4", s),
|
|
580
580
|
children: [/* @__PURE__ */ v("div", {
|
|
581
581
|
className: "relative",
|
|
582
582
|
children: [/* @__PURE__ */ v("svg", {
|
|
@@ -606,7 +606,7 @@ function Ye({ segments: e, size: t = 180, strokeWidth: n = 28, valueFormatter: r
|
|
|
606
606
|
onBlur: () => l(null),
|
|
607
607
|
tabIndex: 0,
|
|
608
608
|
role: "button",
|
|
609
|
-
"aria-label": `${e.segment.name}: ${g(
|
|
609
|
+
"aria-label": `${e.segment.name}: ${g(q(e.segment.value))} (${y(e.percentage)})`,
|
|
610
610
|
className: "cursor-pointer"
|
|
611
611
|
}, `hit-${e.segment.name}`)),
|
|
612
612
|
m.map((e, t) => {
|
|
@@ -616,7 +616,7 @@ function Ye({ segments: e, size: t = 180, strokeWidth: n = 28, valueFormatter: r
|
|
|
616
616
|
cy: x,
|
|
617
617
|
r: p,
|
|
618
618
|
fill: "none",
|
|
619
|
-
stroke:
|
|
619
|
+
stroke: Fe(e.segment.color),
|
|
620
620
|
strokeWidth: n ? f + 4 : f,
|
|
621
621
|
strokeDasharray: `${e.segmentLength} ${e.dashOffset}`,
|
|
622
622
|
strokeLinecap: "butt",
|
|
@@ -635,7 +635,7 @@ function Ye({ segments: e, size: t = 180, strokeWidth: n = 28, valueFormatter: r
|
|
|
635
635
|
fontSize: 18,
|
|
636
636
|
fontWeight: 700,
|
|
637
637
|
className: "pointer-events-none",
|
|
638
|
-
children: g(c === null ? u :
|
|
638
|
+
children: g(c === null ? u : q(m[c].segment.value))
|
|
639
639
|
}),
|
|
640
640
|
/* @__PURE__ */ _("text", {
|
|
641
641
|
x,
|
|
@@ -649,7 +649,7 @@ function Ye({ segments: e, size: t = 180, strokeWidth: n = 28, valueFormatter: r
|
|
|
649
649
|
})
|
|
650
650
|
]
|
|
651
651
|
}), c !== null && (() => {
|
|
652
|
-
let e = m[c], t = e.midAngle * Math.PI / 180, n = p + f / 2 + 20, r = x + Math.cos(t) * n, i = x + Math.sin(t) * n, a =
|
|
652
|
+
let e = m[c], t = e.midAngle * Math.PI / 180, n = p + f / 2 + 20, r = x + Math.cos(t) * n, i = x + Math.sin(t) * n, a = Fe(e.segment.color), o = g(q(e.segment.value)), s = y(e.percentage);
|
|
653
653
|
return /* @__PURE__ */ _("div", {
|
|
654
654
|
className: "bg-bg-tertiary border-border pointer-events-none absolute z-10 rounded-md border px-2.5 py-1.5 shadow-lg",
|
|
655
655
|
style: Ve({
|
|
@@ -703,11 +703,11 @@ function Ye({ segments: e, size: t = 180, strokeWidth: n = 28, valueFormatter: r
|
|
|
703
703
|
onPointerLeave: () => l(null),
|
|
704
704
|
onFocus: () => l(t),
|
|
705
705
|
onBlur: () => l(null),
|
|
706
|
-
className:
|
|
706
|
+
className: K("flex cursor-pointer items-center gap-1.5 transition-opacity duration-[100ms]", c !== null && c !== t && "opacity-50"),
|
|
707
707
|
children: [
|
|
708
708
|
/* @__PURE__ */ _("span", {
|
|
709
709
|
className: "h-2 w-2 rounded-full",
|
|
710
|
-
style: { backgroundColor:
|
|
710
|
+
style: { backgroundColor: Fe(e.color) }
|
|
711
711
|
}),
|
|
712
712
|
/* @__PURE__ */ _("span", {
|
|
713
713
|
className: "text-text-secondary text-xs",
|
|
@@ -715,7 +715,7 @@ function Ye({ segments: e, size: t = 180, strokeWidth: n = 28, valueFormatter: r
|
|
|
715
715
|
}),
|
|
716
716
|
/* @__PURE__ */ _("span", {
|
|
717
717
|
className: "text-text-primary text-xs font-semibold",
|
|
718
|
-
children: g(
|
|
718
|
+
children: g(q(e.value))
|
|
719
719
|
})
|
|
720
720
|
]
|
|
721
721
|
}, e.name))
|
|
@@ -725,8 +725,8 @@ function Ye({ segments: e, size: t = 180, strokeWidth: n = 28, valueFormatter: r
|
|
|
725
725
|
//#endregion
|
|
726
726
|
//#region src/components/charts/RadarChart.tsx
|
|
727
727
|
function Xe({ data: e, maxValue: t, size: n = 240, rings: r = 4, labelOffset: i = 18, labelFormatter: a, maxLabelLength: o, valueFormatter: s, ariaLabel: c = "Radar chart", className: l }) {
|
|
728
|
-
let [u, d] = h(null), f = Math.max(80, n), p = Math.max(
|
|
729
|
-
let n = a?.(e.label, e, t) ?? e.label, r =
|
|
728
|
+
let [u, d] = h(null), f = Math.max(80, n), p = Math.max(q(t ?? 0), ...e.map((e) => q(e.value)), 1), m = f / 2, g = Math.max(1, m - Math.max(0, i) - 12), y = e.length > 0 ? 2 * Math.PI / e.length : 0, b = Math.max(1, Math.floor(r)), x = s ?? String, S = e.map((e, t) => {
|
|
729
|
+
let n = a?.(e.label, e, t) ?? e.label, r = Le(n, o);
|
|
730
730
|
return {
|
|
731
731
|
displayLabel: r,
|
|
732
732
|
isTruncated: r !== n,
|
|
@@ -737,11 +737,11 @@ function Xe({ data: e, maxValue: t, size: n = 240, rings: r = 4, labelOffset: i
|
|
|
737
737
|
return [m + t * Math.cos(e - Math.PI / 2), m + t * Math.sin(e - Math.PI / 2)];
|
|
738
738
|
}
|
|
739
739
|
let w = e.map((e, t) => {
|
|
740
|
-
let n =
|
|
740
|
+
let n = Ne(q(e.value), 0, p) / p * g;
|
|
741
741
|
return C(t * y, n);
|
|
742
742
|
}), T = w.map((e) => `${e[0]},${e[1]}`).join(" ");
|
|
743
743
|
return /* @__PURE__ */ v("div", {
|
|
744
|
-
className:
|
|
744
|
+
className: K("relative flex flex-col items-center", l),
|
|
745
745
|
children: [/* @__PURE__ */ v("svg", {
|
|
746
746
|
width: f,
|
|
747
747
|
height: f,
|
|
@@ -844,7 +844,7 @@ function Xe({ data: e, maxValue: t, size: n = 240, rings: r = 4, labelOffset: i
|
|
|
844
844
|
children: [
|
|
845
845
|
/* @__PURE__ */ _("span", { className: "bg-accent h-2 w-2 shrink-0 rounded-full" }),
|
|
846
846
|
/* @__PURE__ */ _("span", {
|
|
847
|
-
className:
|
|
847
|
+
className: K("text-text-secondary text-xs whitespace-nowrap"),
|
|
848
848
|
children: S[u].label
|
|
849
849
|
}),
|
|
850
850
|
/* @__PURE__ */ _("span", {
|
|
@@ -880,14 +880,14 @@ function Ze({ segments: e, size: t = 200, strokeWidth: n = 14, gap: r = 6, value
|
|
|
880
880
|
});
|
|
881
881
|
}
|
|
882
882
|
function k(e) {
|
|
883
|
-
let t =
|
|
884
|
-
return t <= 0 ? 0 :
|
|
883
|
+
let t = q(e.max);
|
|
884
|
+
return t <= 0 ? 0 : Ne(q(e.value) / t, 0, 1);
|
|
885
885
|
}
|
|
886
886
|
function A(e) {
|
|
887
887
|
return k(e) * 100;
|
|
888
888
|
}
|
|
889
889
|
return /* @__PURE__ */ v("div", {
|
|
890
|
-
className:
|
|
890
|
+
className: K("flex flex-col items-center gap-4", c),
|
|
891
891
|
children: [/* @__PURE__ */ v("div", {
|
|
892
892
|
className: "relative",
|
|
893
893
|
ref: p,
|
|
@@ -902,7 +902,7 @@ function Ze({ segments: e, size: t = 200, strokeWidth: n = 14, gap: r = 6, value
|
|
|
902
902
|
children: [e.map((e, t) => {
|
|
903
903
|
let n = C - t * (b + x);
|
|
904
904
|
if (n <= 0) return null;
|
|
905
|
-
let r = 2 * Math.PI * n, i = r * k(e), a = r - i, o =
|
|
905
|
+
let r = 2 * Math.PI * n, i = r * k(e), a = r - i, o = Fe(e.color), s = g === t, c = A(e);
|
|
906
906
|
return /* @__PURE__ */ v("g", {
|
|
907
907
|
onMouseEnter: () => u({
|
|
908
908
|
index: t,
|
|
@@ -979,7 +979,7 @@ function Ze({ segments: e, size: t = 200, strokeWidth: n = 14, gap: r = 6, value
|
|
|
979
979
|
}), g !== null && l?.source === "chart" && (() => {
|
|
980
980
|
let t = e[g];
|
|
981
981
|
if (!t) return null;
|
|
982
|
-
let n = A(t), r =
|
|
982
|
+
let n = A(t), r = Fe(t.color), i = T(n), a = `${w(t.value)}/${w(t.max)}`;
|
|
983
983
|
return /* @__PURE__ */ _("div", {
|
|
984
984
|
className: "bg-bg-tertiary border-border pointer-events-none absolute z-10 rounded-md border px-2.5 py-1.5 shadow-lg",
|
|
985
985
|
style: Ve({
|
|
@@ -1047,11 +1047,11 @@ function Ze({ segments: e, size: t = 200, strokeWidth: n = 14, gap: r = 6, value
|
|
|
1047
1047
|
source: "legend"
|
|
1048
1048
|
}),
|
|
1049
1049
|
onBlur: () => u(null),
|
|
1050
|
-
className:
|
|
1050
|
+
className: K("flex cursor-pointer items-center gap-1.5 transition-opacity duration-[100ms]", g !== null && g !== t && "opacity-50"),
|
|
1051
1051
|
children: [
|
|
1052
1052
|
/* @__PURE__ */ _("span", {
|
|
1053
1053
|
className: "h-2 w-2 rounded-full",
|
|
1054
|
-
style: { backgroundColor:
|
|
1054
|
+
style: { backgroundColor: Fe(e.color) }
|
|
1055
1055
|
}),
|
|
1056
1056
|
/* @__PURE__ */ _("span", {
|
|
1057
1057
|
className: "text-text-secondary text-xs",
|
|
@@ -1073,7 +1073,7 @@ function Qe({ data: e, width: t = 60, height: n = 20, minValue: r, maxValue: i,
|
|
|
1073
1073
|
if (e.length < 2) return null;
|
|
1074
1074
|
let f = Math.max(1, t), p = Math.max(1, n), m = Math.max(0, Math.min(o, p / 2, f / 2)), h = r ?? Math.min(...e), g = i ?? Math.max(...e), y = Math.min(h, g), b = Math.max(h, g), x = b - y, S = Math.max(1, f - m * 2), C = Math.max(1, p - m * 2), w = e.map((t, n) => ({
|
|
1075
1075
|
x: m + n / (e.length - 1) * S,
|
|
1076
|
-
y: x === 0 ? p / 2 : m + C - (
|
|
1076
|
+
y: x === 0 ? p / 2 : m + C - (Ne(t, y, b) - y) / x * C
|
|
1077
1077
|
})), T = w.map(({ x: e, y: t }) => `${e},${t}`).join(" "), E = w.length > 0 ? [
|
|
1078
1078
|
`${w[0].x},${p - m}`,
|
|
1079
1079
|
...w.map(({ x: e, y: t }) => `${e},${t}`),
|
|
@@ -1083,7 +1083,7 @@ function Qe({ data: e, width: t = 60, height: n = 20, minValue: r, maxValue: i,
|
|
|
1083
1083
|
width: f,
|
|
1084
1084
|
height: p,
|
|
1085
1085
|
viewBox: `0 0 ${f} ${p}`,
|
|
1086
|
-
className:
|
|
1086
|
+
className: K("inline-block", d),
|
|
1087
1087
|
role: "img",
|
|
1088
1088
|
"aria-label": u,
|
|
1089
1089
|
children: [c && /* @__PURE__ */ _("polygon", {
|
|
@@ -1153,7 +1153,7 @@ function it(e, t, n, r, i) {
|
|
|
1153
1153
|
].join(" ");
|
|
1154
1154
|
}
|
|
1155
1155
|
function at({ data: e, segments: t, height: n = 220, ariaLabel: r = "Stacked bar chart", tooltipRows: i, valueFormatter: a, tooltipValueFormatter: o, xLabelCount: s = 6, barGap: c, minBarWidth: l = 1, className: u }) {
|
|
1156
|
-
let [d, f] = h(null), p = Math.max(Y.top + Y.bottom + 1, n), m = $e - Y.left - Y.right, y = Math.max(1, p - Y.top - Y.bottom), b = e.reduce((e, n) => Math.max(e, rt(n, t)), 1), x = Math.ceil(b / 2), S = x > 0 && x < b, C = c ?? (e.length > 60 ? 2 : e.length > 30 ? 3 : 6), w = Math.max(1, l), T = e.length > 1 ? Math.max(0, (m - e.length * w) / Math.max(e.length - 1, 1)) : 0, E = e.length > 1 ? Math.min(Math.max(0, C), T) : 0, D = e.length > 0 ? (m - E * Math.max(e.length - 1, 0)) / e.length : 0, O = new Set(
|
|
1156
|
+
let [d, f] = h(null), p = Math.max(Y.top + Y.bottom + 1, n), m = $e - Y.left - Y.right, y = Math.max(1, p - Y.top - Y.bottom), b = e.reduce((e, n) => Math.max(e, rt(n, t)), 1), x = Math.ceil(b / 2), S = x > 0 && x < b, C = c ?? (e.length > 60 ? 2 : e.length > 30 ? 3 : 6), w = Math.max(1, l), T = e.length > 1 ? Math.max(0, (m - e.length * w) / Math.max(e.length - 1, 1)) : 0, E = e.length > 1 ? Math.min(Math.max(0, C), T) : 0, D = e.length > 0 ? (m - E * Math.max(e.length - 1, 0)) / e.length : 0, O = new Set(Ie(e.length, s)), k = d === null ? null : e[d], A = a ?? Pe, j = o ?? ((e) => e.toLocaleString());
|
|
1157
1157
|
function M(e) {
|
|
1158
1158
|
return Y.left + e * (D + E);
|
|
1159
1159
|
}
|
|
@@ -1163,7 +1163,7 @@ function at({ data: e, segments: t, height: n = 220, ariaLabel: r = "Stacked bar
|
|
|
1163
1163
|
return /* @__PURE__ */ v("svg", {
|
|
1164
1164
|
width: "100%",
|
|
1165
1165
|
viewBox: `0 0 ${$e} ${p}`,
|
|
1166
|
-
className:
|
|
1166
|
+
className: K("select-none", u),
|
|
1167
1167
|
role: "img",
|
|
1168
1168
|
"aria-label": r,
|
|
1169
1169
|
children: [
|
|
@@ -1359,11 +1359,11 @@ var ot = [
|
|
|
1359
1359
|
left: 40
|
|
1360
1360
|
}, st = 600;
|
|
1361
1361
|
function ct({ data: e, height: t = 180, maxValue: n, valueFormatter: r, tooltipValueFormatter: i, labelFormatter: a, maxLabelLength: o, xLabelCount: s = 7, barGap: c = 6, minBarWidth: l = 4, ariaLabel: u = "Vertical bar chart", className: d }) {
|
|
1362
|
-
let [f, p] = h(null), m = Math.max(X.top + X.bottom + 1, t), y = st - X.left - X.right, b = Math.max(1, m - X.top - X.bottom), x = n === void 0 ? Math.max(...e.map((e) =>
|
|
1362
|
+
let [f, p] = h(null), m = Math.max(X.top + X.bottom + 1, t), y = st - X.left - X.right, b = Math.max(1, m - X.top - X.bottom), x = n === void 0 ? Math.max(...e.map((e) => q(e.value)), 1) : Math.max(q(n), 1), S = Math.max(0, c), C = Math.max(1, l), w = e.length > 1 ? Math.max(0, (y - e.length * C) / Math.max(e.length - 1, 1)) : 0, T = e.length > 1 ? Math.min(S, w) : 0, E = e.length > 0 ? Math.max(0, (y - T * Math.max(e.length - 1, 0)) / e.length) : 0, D = r ?? Pe, O = i ?? ((e) => e.toLocaleString()), k = new Set(Ie(e.length, s));
|
|
1363
1363
|
return /* @__PURE__ */ v("svg", {
|
|
1364
1364
|
width: "100%",
|
|
1365
1365
|
viewBox: `0 0 ${st} ${m}`,
|
|
1366
|
-
className:
|
|
1366
|
+
className: K("select-none", d),
|
|
1367
1367
|
role: "img",
|
|
1368
1368
|
"aria-label": u,
|
|
1369
1369
|
children: [
|
|
@@ -1403,7 +1403,7 @@ function ct({ data: e, height: t = 180, maxValue: n, valueFormatter: r, tooltipV
|
|
|
1403
1403
|
opacity: .5
|
|
1404
1404
|
}),
|
|
1405
1405
|
e.map((e, t) => {
|
|
1406
|
-
let n = X.left + t * (E + T), r =
|
|
1406
|
+
let n = X.left + t * (E + T), r = Ne(q(e.value), 0, x) / x * b, i = X.top + b - r, s = f === t, c = a?.(e.label, e, t) ?? e.label, l = Le(c, o), u = l !== c, d = O(e.value);
|
|
1407
1407
|
return /* @__PURE__ */ v("g", {
|
|
1408
1408
|
onMouseEnter: () => p(t),
|
|
1409
1409
|
onMouseLeave: () => p(null),
|
|
@@ -1428,7 +1428,7 @@ function ct({ data: e, height: t = 180, maxValue: n, valueFormatter: r, tooltipV
|
|
|
1428
1428
|
y: i,
|
|
1429
1429
|
width: E,
|
|
1430
1430
|
height: r,
|
|
1431
|
-
fill:
|
|
1431
|
+
fill: Fe(e.color),
|
|
1432
1432
|
rx: 6,
|
|
1433
1433
|
opacity: s ? 1 : ot[t % ot.length],
|
|
1434
1434
|
style: { transition: "all 150ms" }
|
|
@@ -1501,7 +1501,7 @@ function dt(e, t) {
|
|
|
1501
1501
|
//#region src/components/app-shell/BottomNav.tsx
|
|
1502
1502
|
function ft({ items: e, currentPath: t, onNavigate: n, className: r }) {
|
|
1503
1503
|
return e.length === 0 ? null : /* @__PURE__ */ _("nav", {
|
|
1504
|
-
className:
|
|
1504
|
+
className: K("bg-bg-secondary border-border font-navigation fixed right-0 bottom-0 left-0 z-30 border-t md:hidden", r),
|
|
1505
1505
|
style: { height: "var(--bottomnav-height)" },
|
|
1506
1506
|
children: /* @__PURE__ */ _("ul", {
|
|
1507
1507
|
className: "flex h-full items-center justify-around",
|
|
@@ -1511,7 +1511,7 @@ function ft({ items: e, currentPath: t, onNavigate: n, className: r }) {
|
|
|
1511
1511
|
href: e.path,
|
|
1512
1512
|
onClick: (t) => ut(t, e.path, n),
|
|
1513
1513
|
"aria-current": r ? "page" : void 0,
|
|
1514
|
-
className:
|
|
1514
|
+
className: K("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"),
|
|
1515
1515
|
children: [/* @__PURE__ */ _(e.icon, { className: "h-5 w-5" }), /* @__PURE__ */ _("span", {
|
|
1516
1516
|
className: "text-2xs",
|
|
1517
1517
|
children: e.shortLabel ?? e.label
|
|
@@ -1628,7 +1628,7 @@ function bt({ items: e, eventName: t = ht, shortcut: n = gt, placeholder: r = "S
|
|
|
1628
1628
|
children: [/* @__PURE__ */ v("div", {
|
|
1629
1629
|
className: "border-border flex items-center gap-3 border-b px-4",
|
|
1630
1630
|
children: [
|
|
1631
|
-
/* @__PURE__ */ _(
|
|
1631
|
+
/* @__PURE__ */ _(se, { className: "text-text-tertiary h-4 w-4 shrink-0" }),
|
|
1632
1632
|
/* @__PURE__ */ _("input", {
|
|
1633
1633
|
ref: b,
|
|
1634
1634
|
type: "text",
|
|
@@ -1661,7 +1661,7 @@ function bt({ items: e, eventName: t = ht, shortcut: n = gt, placeholder: r = "S
|
|
|
1661
1661
|
role: "option",
|
|
1662
1662
|
"aria-selected": t === g,
|
|
1663
1663
|
onClick: () => E(e),
|
|
1664
|
-
className:
|
|
1664
|
+
className: K("flex h-9 w-full cursor-pointer items-center gap-3 rounded-md px-3 text-left", "transition-colors duration-[100ms]", t === g ? "bg-accent-muted text-accent" : "text-text-secondary hover:text-text-primary hover:bg-bg-hover"),
|
|
1665
1665
|
children: [
|
|
1666
1666
|
/* @__PURE__ */ _("span", {
|
|
1667
1667
|
className: "shrink-0 opacity-60",
|
|
@@ -1713,7 +1713,7 @@ function St({ open: e, onClose: t, items: n, topBarNavItems: r = [], topBarNavLa
|
|
|
1713
1713
|
onClick: t
|
|
1714
1714
|
}), /* @__PURE__ */ v("div", {
|
|
1715
1715
|
ref: d,
|
|
1716
|
-
className:
|
|
1716
|
+
className: K("bg-bg-sidebar border-border animate-slide-in-left fixed inset-y-0 left-0 z-50 flex w-64 flex-col border-r", u),
|
|
1717
1717
|
children: [
|
|
1718
1718
|
/* @__PURE__ */ v("div", {
|
|
1719
1719
|
className: "border-border flex h-11 items-center justify-between border-b px-4",
|
|
@@ -1721,7 +1721,7 @@ function St({ open: e, onClose: t, items: n, topBarNavItems: r = [], topBarNavLa
|
|
|
1721
1721
|
onClick: t,
|
|
1722
1722
|
className: "text-text-tertiary hover:text-text-primary flex h-7 w-7 cursor-pointer items-center justify-center rounded",
|
|
1723
1723
|
"aria-label": "Close menu",
|
|
1724
|
-
children: /* @__PURE__ */ _(
|
|
1724
|
+
children: /* @__PURE__ */ _(V, { className: "h-4 w-4" })
|
|
1725
1725
|
})]
|
|
1726
1726
|
}),
|
|
1727
1727
|
c && /* @__PURE__ */ _("div", {
|
|
@@ -1752,7 +1752,7 @@ function St({ open: e, onClose: t, items: n, topBarNavItems: r = [], topBarNavLa
|
|
|
1752
1752
|
ut(n, e.path, s, t);
|
|
1753
1753
|
},
|
|
1754
1754
|
"aria-current": r ? "page" : void 0,
|
|
1755
|
-
className:
|
|
1755
|
+
className: K("flex h-10 items-center gap-3 rounded-md px-3", "cursor-pointer transition-colors duration-[100ms]", r ? "bg-accent-muted text-accent" : "text-text-secondary hover:text-text-primary hover:bg-bg-hover"),
|
|
1756
1756
|
children: [
|
|
1757
1757
|
n && /* @__PURE__ */ _(n, { className: "h-4 w-4" }),
|
|
1758
1758
|
/* @__PURE__ */ _("span", {
|
|
@@ -1775,7 +1775,7 @@ function St({ open: e, onClose: t, items: n, topBarNavItems: r = [], topBarNavLa
|
|
|
1775
1775
|
href: e.path,
|
|
1776
1776
|
onClick: (n) => ut(n, e.path, s, t),
|
|
1777
1777
|
"aria-current": n ? "page" : void 0,
|
|
1778
|
-
className:
|
|
1778
|
+
className: K("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"),
|
|
1779
1779
|
children: [
|
|
1780
1780
|
/* @__PURE__ */ _(e.icon, { className: "h-4 w-4" }),
|
|
1781
1781
|
/* @__PURE__ */ _("span", {
|
|
@@ -1801,7 +1801,7 @@ var Ct = [
|
|
|
1801
1801
|
{
|
|
1802
1802
|
value: "dark",
|
|
1803
1803
|
label: "Dark",
|
|
1804
|
-
icon:
|
|
1804
|
+
icon: ie,
|
|
1805
1805
|
preview: {
|
|
1806
1806
|
bg: "#0d0f12",
|
|
1807
1807
|
fg: "#2a2e38"
|
|
@@ -1810,7 +1810,7 @@ var Ct = [
|
|
|
1810
1810
|
{
|
|
1811
1811
|
value: "light",
|
|
1812
1812
|
label: "Light",
|
|
1813
|
-
icon:
|
|
1813
|
+
icon: le,
|
|
1814
1814
|
preview: {
|
|
1815
1815
|
bg: "#f5f5f5",
|
|
1816
1816
|
fg: "#d4d4d8"
|
|
@@ -1819,7 +1819,7 @@ var Ct = [
|
|
|
1819
1819
|
{
|
|
1820
1820
|
value: "lightInverted",
|
|
1821
1821
|
label: "Light Inverted",
|
|
1822
|
-
icon:
|
|
1822
|
+
icon: le,
|
|
1823
1823
|
preview: {
|
|
1824
1824
|
bg: "#f1f2f4",
|
|
1825
1825
|
fg: "#ffffff"
|
|
@@ -1837,7 +1837,7 @@ var Ct = [
|
|
|
1837
1837
|
{
|
|
1838
1838
|
value: "solarized",
|
|
1839
1839
|
label: "Solarized",
|
|
1840
|
-
icon:
|
|
1840
|
+
icon: z,
|
|
1841
1841
|
preview: {
|
|
1842
1842
|
bg: "#002B36",
|
|
1843
1843
|
fg: "#0A3F4C"
|
|
@@ -1846,7 +1846,7 @@ var Ct = [
|
|
|
1846
1846
|
{
|
|
1847
1847
|
value: "cyberBrutalDark",
|
|
1848
1848
|
label: "Cyber Brutal Dark",
|
|
1849
|
-
icon:
|
|
1849
|
+
icon: U,
|
|
1850
1850
|
preview: {
|
|
1851
1851
|
bg: "#050505",
|
|
1852
1852
|
fg: "#18181b"
|
|
@@ -1855,7 +1855,7 @@ var Ct = [
|
|
|
1855
1855
|
{
|
|
1856
1856
|
value: "cyberBrutalLight",
|
|
1857
1857
|
label: "Cyber Brutal Light",
|
|
1858
|
-
icon:
|
|
1858
|
+
icon: U,
|
|
1859
1859
|
preview: {
|
|
1860
1860
|
bg: "#e4e4e7",
|
|
1861
1861
|
fg: "#d4d4d8"
|
|
@@ -2085,7 +2085,7 @@ function Rt(e) {
|
|
|
2085
2085
|
}
|
|
2086
2086
|
function zt({ name: e, src: t, size: n = "md", className: r }) {
|
|
2087
2087
|
return /* @__PURE__ */ _("div", {
|
|
2088
|
-
className:
|
|
2088
|
+
className: K("text-text-on-avatar flex shrink-0 items-center justify-center rounded-full font-semibold", It[n], r),
|
|
2089
2089
|
style: { backgroundColor: t ? void 0 : Rt(e) },
|
|
2090
2090
|
"aria-label": e,
|
|
2091
2091
|
children: t ? /* @__PURE__ */ _("img", {
|
|
@@ -2127,9 +2127,9 @@ function Ht({ children: e }) {
|
|
|
2127
2127
|
}
|
|
2128
2128
|
var Ut = {
|
|
2129
2129
|
success: D,
|
|
2130
|
-
error:
|
|
2130
|
+
error: H,
|
|
2131
2131
|
warning: b,
|
|
2132
|
-
info:
|
|
2132
|
+
info: R
|
|
2133
2133
|
}, Wt = {
|
|
2134
2134
|
success: "bg-green",
|
|
2135
2135
|
error: "bg-red",
|
|
@@ -2156,11 +2156,11 @@ function Kt({ toast: e, onDismiss: t }) {
|
|
|
2156
2156
|
"aria-live": a ? "assertive" : "polite",
|
|
2157
2157
|
className: "bg-bg-secondary border-border animate-slide-down pointer-events-auto relative w-80 overflow-hidden rounded-lg border shadow-lg",
|
|
2158
2158
|
children: [
|
|
2159
|
-
/* @__PURE__ */ _("div", { className:
|
|
2159
|
+
/* @__PURE__ */ _("div", { className: K("absolute top-1.5 bottom-1.5 left-0 w-[3px] rounded-md", Wt[e.type]) }),
|
|
2160
2160
|
/* @__PURE__ */ v("div", {
|
|
2161
2161
|
className: "flex items-center gap-2.5 p-3 pl-3.5",
|
|
2162
2162
|
children: [
|
|
2163
|
-
/* @__PURE__ */ _(i, { className:
|
|
2163
|
+
/* @__PURE__ */ _(i, { className: K("h-4 w-4 shrink-0", Gt[e.type]) }),
|
|
2164
2164
|
/* @__PURE__ */ _("p", {
|
|
2165
2165
|
className: "text-text-primary flex-1 text-xs",
|
|
2166
2166
|
children: e.message
|
|
@@ -2168,7 +2168,7 @@ function Kt({ toast: e, onDismiss: t }) {
|
|
|
2168
2168
|
/* @__PURE__ */ _("button", {
|
|
2169
2169
|
onClick: t,
|
|
2170
2170
|
className: "text-text-tertiary hover:text-text-primary flex h-5 w-5 cursor-pointer items-center justify-center rounded",
|
|
2171
|
-
children: /* @__PURE__ */ _(
|
|
2171
|
+
children: /* @__PURE__ */ _(V, { className: "h-3 w-3" })
|
|
2172
2172
|
})
|
|
2173
2173
|
]
|
|
2174
2174
|
}),
|
|
@@ -2191,7 +2191,7 @@ function Xt({ item: e, collapsed: t, currentPath: n, onNavigate: r }) {
|
|
|
2191
2191
|
href: e.path,
|
|
2192
2192
|
onClick: (t) => ut(t, e.path, r),
|
|
2193
2193
|
"aria-current": i ? "page" : void 0,
|
|
2194
|
-
className:
|
|
2194
|
+
className: K("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"),
|
|
2195
2195
|
style: { height: "2em" },
|
|
2196
2196
|
title: t ? e.label : void 0,
|
|
2197
2197
|
children: [
|
|
@@ -2223,7 +2223,7 @@ function Zt({ brand: e, collapsed: t }) {
|
|
|
2223
2223
|
className: "flex min-w-0 items-center gap-2 px-2",
|
|
2224
2224
|
children: e.logo
|
|
2225
2225
|
}) : /* @__PURE__ */ v("div", {
|
|
2226
|
-
className:
|
|
2226
|
+
className: K("flex min-w-0 items-center gap-2 px-2", t && "mx-auto justify-center px-0"),
|
|
2227
2227
|
children: [n ? /* @__PURE__ */ _(n, { className: "text-accent h-3.5 w-3.5 shrink-0" }) : t && r && /* @__PURE__ */ _("span", {
|
|
2228
2228
|
className: "text-accent shrink-0 text-xs font-bold",
|
|
2229
2229
|
children: r
|
|
@@ -2260,7 +2260,7 @@ function $t({ collapsed: e, accounts: t, initialAccountIndex: n = 0, onAccountCh
|
|
|
2260
2260
|
return S ? /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ v("button", {
|
|
2261
2261
|
ref: b,
|
|
2262
2262
|
onClick: w,
|
|
2263
|
-
className:
|
|
2263
|
+
className: K("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"),
|
|
2264
2264
|
style: { height: "2.5em" },
|
|
2265
2265
|
title: e ? S.name : void 0,
|
|
2266
2266
|
children: [/* @__PURE__ */ _(zt, {
|
|
@@ -2277,7 +2277,7 @@ function $t({ collapsed: e, accounts: t, initialAccountIndex: n = 0, onAccountCh
|
|
|
2277
2277
|
children: Qt(S)
|
|
2278
2278
|
})]
|
|
2279
2279
|
}), /* @__PURE__ */ _(j, { className: "text-text-tertiary h-3 w-3 shrink-0" })] })]
|
|
2280
|
-
}), l &&
|
|
2280
|
+
}), l && de(/* @__PURE__ */ v("div", {
|
|
2281
2281
|
ref: x,
|
|
2282
2282
|
className: "bg-bg-tertiary border-border-strong animate-scale-in fixed z-[100] w-56 rounded-md border py-1 shadow-lg",
|
|
2283
2283
|
style: {
|
|
@@ -2314,7 +2314,7 @@ function $t({ collapsed: e, accounts: t, initialAccountIndex: n = 0, onAccountCh
|
|
|
2314
2314
|
C && /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _("div", { className: "border-border my-1 border-t" }), /* @__PURE__ */ v("button", {
|
|
2315
2315
|
onClick: D,
|
|
2316
2316
|
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]",
|
|
2317
|
-
children: [/* @__PURE__ */ _(
|
|
2317
|
+
children: [/* @__PURE__ */ _(te, { className: "h-3.5 w-3.5" }), /* @__PURE__ */ _("span", { children: o })]
|
|
2318
2318
|
})] })
|
|
2319
2319
|
]
|
|
2320
2320
|
}), document.body)] }) : null;
|
|
@@ -2339,14 +2339,14 @@ function en({ collapsed: e, settingsPath: t, settingsLabel: n = "All Settings",
|
|
|
2339
2339
|
return /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ v("button", {
|
|
2340
2340
|
ref: u,
|
|
2341
2341
|
onClick: D,
|
|
2342
|
-
className:
|
|
2342
|
+
className: K("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" : "", a ? "bg-accent-muted text-accent" : "text-text-secondary hover:text-text-primary hover:bg-bg-hover"),
|
|
2343
2343
|
style: { height: "2em" },
|
|
2344
2344
|
title: e ? "Settings" : void 0,
|
|
2345
|
-
children: [/* @__PURE__ */ _(
|
|
2345
|
+
children: [/* @__PURE__ */ _(ce, { className: "h-3.5 w-3.5 shrink-0" }), !e && /* @__PURE__ */ _("span", {
|
|
2346
2346
|
className: "truncate text-xs",
|
|
2347
2347
|
children: "Settings"
|
|
2348
2348
|
})]
|
|
2349
|
-
}), a &&
|
|
2349
|
+
}), a && de(/* @__PURE__ */ v("div", {
|
|
2350
2350
|
ref: d,
|
|
2351
2351
|
className: "bg-bg-tertiary border-border-strong animate-scale-in fixed z-[100] w-64 rounded-md border py-1 shadow-lg",
|
|
2352
2352
|
style: {
|
|
@@ -2362,17 +2362,17 @@ function en({ collapsed: e, settingsPath: t, settingsLabel: n = "All Settings",
|
|
|
2362
2362
|
{
|
|
2363
2363
|
value: "dark",
|
|
2364
2364
|
label: "Dark",
|
|
2365
|
-
Icon:
|
|
2365
|
+
Icon: ie
|
|
2366
2366
|
},
|
|
2367
2367
|
{
|
|
2368
2368
|
value: "light",
|
|
2369
2369
|
label: "Light",
|
|
2370
|
-
Icon:
|
|
2370
|
+
Icon: le
|
|
2371
2371
|
},
|
|
2372
2372
|
{
|
|
2373
2373
|
value: "system",
|
|
2374
2374
|
label: "System",
|
|
2375
|
-
Icon:
|
|
2375
|
+
Icon: z
|
|
2376
2376
|
}
|
|
2377
2377
|
].map(({ value: e, label: t, Icon: n }) => /* @__PURE__ */ v("button", {
|
|
2378
2378
|
onClick: () => C(e),
|
|
@@ -2395,7 +2395,7 @@ function en({ collapsed: e, settingsPath: t, settingsLabel: n = "All Settings",
|
|
|
2395
2395
|
className: "flex flex-wrap gap-1.5 px-3 pb-2",
|
|
2396
2396
|
children: Mt.map((e) => /* @__PURE__ */ _("button", {
|
|
2397
2397
|
onClick: () => p(e.value),
|
|
2398
|
-
className:
|
|
2398
|
+
className: K("h-5 w-5 cursor-pointer rounded-full transition-transform duration-[100ms] hover:scale-110", f === e.value && "ring-offset-bg-tertiary scale-110 ring-2 ring-offset-1"),
|
|
2399
2399
|
style: {
|
|
2400
2400
|
backgroundColor: e.color,
|
|
2401
2401
|
...f === e.value ? { "--utility-ring-color": e.color } : {}
|
|
@@ -2421,7 +2421,7 @@ function en({ collapsed: e, settingsPath: t, settingsLabel: n = "All Settings",
|
|
|
2421
2421
|
T && /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _("div", { className: "border-border my-1 border-t" }), /* @__PURE__ */ v("button", {
|
|
2422
2422
|
onClick: O,
|
|
2423
2423
|
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]",
|
|
2424
|
-
children: [/* @__PURE__ */ _(
|
|
2424
|
+
children: [/* @__PURE__ */ _(ce, { className: "h-3.5 w-3.5 shrink-0" }), /* @__PURE__ */ _("span", {
|
|
2425
2425
|
className: "flex-1 text-left",
|
|
2426
2426
|
children: n
|
|
2427
2427
|
})]
|
|
@@ -2450,7 +2450,7 @@ function tn({ navSections: e, brand: t, accounts: n = [], initialAccountIndex: r
|
|
|
2450
2450
|
}
|
|
2451
2451
|
return /* @__PURE__ */ v("aside", {
|
|
2452
2452
|
ref: T,
|
|
2453
|
-
className:
|
|
2453
|
+
className: K("bg-bg-secondary relative hidden shrink-0 flex-col border-r md:flex", "transition-[width] duration-[200ms] ease-out", "border-border", y),
|
|
2454
2454
|
style: { width: b ? Yt : x },
|
|
2455
2455
|
children: [
|
|
2456
2456
|
!b && /* @__PURE__ */ _("div", {
|
|
@@ -2485,7 +2485,7 @@ function tn({ navSections: e, brand: t, accounts: n = [], initialAccountIndex: r
|
|
|
2485
2485
|
children: [/* @__PURE__ */ _("span", {
|
|
2486
2486
|
className: "min-w-0 flex-1",
|
|
2487
2487
|
children: e.title
|
|
2488
|
-
}), /* @__PURE__ */ _(O, { className:
|
|
2488
|
+
}), /* @__PURE__ */ _(O, { className: K("h-3 w-3 shrink-0 transition-transform", n && "-rotate-90") })]
|
|
2489
2489
|
}), (!n || b) && /* @__PURE__ */ _("ul", {
|
|
2490
2490
|
className: "flex flex-col gap-1",
|
|
2491
2491
|
children: e.items.map((e) => /* @__PURE__ */ _("li", { children: /* @__PURE__ */ _(Xt, {
|
|
@@ -2541,7 +2541,7 @@ function rn({ homeLabel: e = "Dashboard", labels: t = {}, parents: n = {}, curre
|
|
|
2541
2541
|
})];
|
|
2542
2542
|
return /* @__PURE__ */ _("nav", {
|
|
2543
2543
|
"aria-label": "Breadcrumb",
|
|
2544
|
-
className:
|
|
2544
|
+
className: K("font-navigation flex items-center gap-1 text-xs", a),
|
|
2545
2545
|
children: /* @__PURE__ */ _("ol", {
|
|
2546
2546
|
className: "flex items-center gap-1",
|
|
2547
2547
|
children: s.map((e, t) => {
|
|
@@ -2554,7 +2554,7 @@ function rn({ homeLabel: e = "Dashboard", labels: t = {}, parents: n = {}, curre
|
|
|
2554
2554
|
}) : /* @__PURE__ */ _("a", {
|
|
2555
2555
|
href: e.path,
|
|
2556
2556
|
onClick: (t) => ut(t, e.path, i),
|
|
2557
|
-
className:
|
|
2557
|
+
className: K("text-text-tertiary hover:text-text-primary cursor-pointer transition-colors duration-[100ms]"),
|
|
2558
2558
|
children: e.label
|
|
2559
2559
|
})]
|
|
2560
2560
|
}, e.path);
|
|
@@ -2636,10 +2636,10 @@ var cn = {
|
|
|
2636
2636
|
"data-size": t,
|
|
2637
2637
|
"data-hide-label": p && !f ? "" : void 0,
|
|
2638
2638
|
disabled: c || r,
|
|
2639
|
-
className:
|
|
2639
|
+
className: K("ui-sized-control 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", cn[e], f ? un[t] : ln[t], p && !f && pn[p]?.[t], o),
|
|
2640
2640
|
...l,
|
|
2641
2641
|
children: [
|
|
2642
|
-
r && /* @__PURE__ */ _(
|
|
2642
|
+
r && /* @__PURE__ */ _(ee, { className: "h-3.5 w-3.5 animate-spin" }),
|
|
2643
2643
|
i && !r && /* @__PURE__ */ _(i, { className: dn[t] }),
|
|
2644
2644
|
s && (p ? /* @__PURE__ */ _("span", {
|
|
2645
2645
|
className: fn[p],
|
|
@@ -2653,7 +2653,7 @@ mn.displayName = "Button";
|
|
|
2653
2653
|
//#region src/components/ui/SectionHeader.tsx
|
|
2654
2654
|
function hn({ children: e, as: t = "h2", className: n, border: r = !0 }) {
|
|
2655
2655
|
return /* @__PURE__ */ _(t, {
|
|
2656
|
-
className:
|
|
2656
|
+
className: K("text-text-primary font-heading text-xs font-semibold", r && "border-border border-b pb-2", n),
|
|
2657
2657
|
children: e
|
|
2658
2658
|
});
|
|
2659
2659
|
}
|
|
@@ -2754,7 +2754,7 @@ function Cn({ options: e, value: t, onChange: n, label: r, placeholder: i = "Sel
|
|
|
2754
2754
|
}
|
|
2755
2755
|
}
|
|
2756
2756
|
return /* @__PURE__ */ v("div", {
|
|
2757
|
-
className:
|
|
2757
|
+
className: K("flex flex-col gap-1.5", a),
|
|
2758
2758
|
ref: p,
|
|
2759
2759
|
children: [r && /* @__PURE__ */ _("span", {
|
|
2760
2760
|
className: "ui-field-label font-label text-xs font-medium",
|
|
@@ -2770,16 +2770,16 @@ function Cn({ options: e, value: t, onChange: n, label: r, placeholder: i = "Sel
|
|
|
2770
2770
|
"aria-expanded": c,
|
|
2771
2771
|
"aria-controls": c ? x : void 0,
|
|
2772
2772
|
"aria-activedescendant": c && d >= 0 ? `${b}-option-${d}` : void 0,
|
|
2773
|
-
className:
|
|
2773
|
+
className: K("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", o === "sm" ? "h-6 px-2 pr-6" : "h-7 px-2 pr-7"),
|
|
2774
2774
|
children: S ? S.label : /* @__PURE__ */ _("span", {
|
|
2775
2775
|
className: "text-text-disabled",
|
|
2776
2776
|
children: i
|
|
2777
2777
|
})
|
|
2778
2778
|
}),
|
|
2779
|
-
/* @__PURE__ */ _(O, { className:
|
|
2779
|
+
/* @__PURE__ */ _(O, { className: K("text-text-tertiary pointer-events-none absolute top-1/2 h-3 w-3 -translate-y-1/2 transition-transform", o === "sm" ? "right-1.5" : "right-2", c && "rotate-180") }),
|
|
2780
2780
|
c && /* @__PURE__ */ _("div", {
|
|
2781
2781
|
ref: g,
|
|
2782
|
-
className:
|
|
2782
|
+
className: K("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"),
|
|
2783
2783
|
children: /* @__PURE__ */ _("ul", {
|
|
2784
2784
|
id: x,
|
|
2785
2785
|
className: "max-h-48 overflow-y-auto py-1",
|
|
@@ -2792,7 +2792,7 @@ function Cn({ options: e, value: t, onChange: n, label: r, placeholder: i = "Sel
|
|
|
2792
2792
|
n(e.value), l(!1);
|
|
2793
2793
|
},
|
|
2794
2794
|
onMouseEnter: () => f(r),
|
|
2795
|
-
className:
|
|
2795
|
+
className: K("font-control flex h-7 w-full cursor-pointer items-center gap-2 px-3 text-xs", "transition-colors duration-[100ms]", r === d ? "bg-accent-muted text-accent" : e.value === t ? "text-accent" : "text-text-secondary hover:text-text-primary hover:bg-bg-hover"),
|
|
2796
2796
|
children: [/* @__PURE__ */ _("span", {
|
|
2797
2797
|
className: "flex-1 truncate",
|
|
2798
2798
|
children: e.label
|
|
@@ -2809,7 +2809,7 @@ function Cn({ options: e, value: t, onChange: n, label: r, placeholder: i = "Sel
|
|
|
2809
2809
|
function wn({ min: e, max: t, step: n = 1, value: r, onChange: i, onCommit: a, label: o, showValue: s, className: c }) {
|
|
2810
2810
|
let l = (r - e) / (t - e) * 100;
|
|
2811
2811
|
return /* @__PURE__ */ v("div", {
|
|
2812
|
-
className:
|
|
2812
|
+
className: K("flex flex-col gap-1.5", c),
|
|
2813
2813
|
children: [(o || s) && /* @__PURE__ */ v("div", {
|
|
2814
2814
|
className: "flex items-center justify-between",
|
|
2815
2815
|
children: [o && /* @__PURE__ */ _("span", {
|
|
@@ -2838,7 +2838,7 @@ function Tn({ label: e, active: t, icon: n, preview: r, onClick: i, className: a
|
|
|
2838
2838
|
return /* @__PURE__ */ v("button", {
|
|
2839
2839
|
type: "button",
|
|
2840
2840
|
onClick: i,
|
|
2841
|
-
className:
|
|
2841
|
+
className: K("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),
|
|
2842
2842
|
children: [/* @__PURE__ */ _("div", {
|
|
2843
2843
|
className: "border-border-strong/20 flex h-10 w-full items-center justify-center rounded border",
|
|
2844
2844
|
style: { backgroundColor: r?.bg },
|
|
@@ -2859,7 +2859,7 @@ function Tn({ label: e, active: t, icon: n, preview: r, onClick: i, className: a
|
|
|
2859
2859
|
//#region src/components/ui/Toggle.tsx
|
|
2860
2860
|
function En({ checked: e, onChange: t, disabled: n, label: r, className: i }) {
|
|
2861
2861
|
return /* @__PURE__ */ v("label", {
|
|
2862
|
-
className:
|
|
2862
|
+
className: K("flex w-fit items-center", n ? "cursor-not-allowed opacity-40" : "cursor-pointer", i),
|
|
2863
2863
|
style: { gap: 10 },
|
|
2864
2864
|
children: [/* @__PURE__ */ _("button", {
|
|
2865
2865
|
type: "button",
|
|
@@ -2867,7 +2867,7 @@ function En({ checked: e, onChange: t, disabled: n, label: r, className: i }) {
|
|
|
2867
2867
|
"aria-checked": e,
|
|
2868
2868
|
disabled: n,
|
|
2869
2869
|
onClick: () => t(!e),
|
|
2870
|
-
className:
|
|
2870
|
+
className: K("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 ui-switch-off", !n && "cursor-pointer"),
|
|
2871
2871
|
style: {
|
|
2872
2872
|
width: 36,
|
|
2873
2873
|
height: 20
|
|
@@ -2900,17 +2900,17 @@ var kn = [
|
|
|
2900
2900
|
{
|
|
2901
2901
|
value: "dark",
|
|
2902
2902
|
label: "Dark",
|
|
2903
|
-
Icon:
|
|
2903
|
+
Icon: ie
|
|
2904
2904
|
},
|
|
2905
2905
|
{
|
|
2906
2906
|
value: "light",
|
|
2907
2907
|
label: "Light",
|
|
2908
|
-
Icon:
|
|
2908
|
+
Icon: le
|
|
2909
2909
|
},
|
|
2910
2910
|
{
|
|
2911
2911
|
value: "system",
|
|
2912
2912
|
label: "System",
|
|
2913
|
-
Icon:
|
|
2913
|
+
Icon: z
|
|
2914
2914
|
}
|
|
2915
2915
|
];
|
|
2916
2916
|
function An({ className: e, respondToOpenEvent: t = !0 }) {
|
|
@@ -2947,7 +2947,7 @@ function An({ className: e, respondToOpenEvent: t = !0 }) {
|
|
|
2947
2947
|
window.removeEventListener("resize", x), window.removeEventListener("scroll", x, !0);
|
|
2948
2948
|
};
|
|
2949
2949
|
}, [n, x]);
|
|
2950
|
-
let { colorMode: C, setColorMode: w, preferredDarkTheme: T, preferredLightTheme: E, accentColor: D, setAccentColor: O, fontSize: k, setFontSize: A, uiFont: j, setUiFont: M, headingFont: N, setHeadingFont: P, proseFont: F, setProseFont: I, codeFont: L, setCodeFont: R, borderRadius: ee, setBorderRadius: te, borderWidth: ne, setBorderWidth: re, tracking: z, setTracking: ie, lineHeight:
|
|
2950
|
+
let { colorMode: C, setColorMode: w, preferredDarkTheme: T, preferredLightTheme: E, accentColor: D, setAccentColor: O, fontSize: k, setFontSize: A, uiFont: j, setUiFont: M, headingFont: N, setHeadingFont: P, proseFont: F, setProseFont: I, codeFont: L, setCodeFont: R, borderRadius: ee, setBorderRadius: te, borderWidth: ne, setBorderWidth: re, tracking: z, setTracking: ie, lineHeight: B, setLineHeight: oe, density: se, setDensity: ce, reducedMotion: le, setReducedMotion: ue, saveThemeCustomization: V, resetThemeCustomization: H, hasThemeOverrides: U, isCustomized: W, resolvedTheme: G } = f;
|
|
2951
2951
|
return /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _("button", {
|
|
2952
2952
|
ref: u,
|
|
2953
2953
|
onClick: S,
|
|
@@ -2955,9 +2955,9 @@ function An({ className: e, respondToOpenEvent: t = !0 }) {
|
|
|
2955
2955
|
"aria-haspopup": "dialog",
|
|
2956
2956
|
"aria-expanded": n,
|
|
2957
2957
|
title: "Theme",
|
|
2958
|
-
className:
|
|
2958
|
+
className: K("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),
|
|
2959
2959
|
children: /* @__PURE__ */ _(ae, { className: "h-4 w-4" })
|
|
2960
|
-
}), n &&
|
|
2960
|
+
}), n && de(/* @__PURE__ */ _("div", {
|
|
2961
2961
|
ref: d,
|
|
2962
2962
|
role: "dialog",
|
|
2963
2963
|
"aria-label": "Theme settings",
|
|
@@ -2979,7 +2979,7 @@ function An({ className: e, respondToOpenEvent: t = !0 }) {
|
|
|
2979
2979
|
className: "bg-bg-secondary border-border flex gap-1 rounded-md border p-1.5",
|
|
2980
2980
|
children: kn.map(({ value: e, label: t, Icon: n }) => /* @__PURE__ */ v("button", {
|
|
2981
2981
|
onClick: () => w(e),
|
|
2982
|
-
className:
|
|
2982
|
+
className: K("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"),
|
|
2983
2983
|
children: [/* @__PURE__ */ _(n, { className: "h-3.5 w-3.5" }), t]
|
|
2984
2984
|
}, e))
|
|
2985
2985
|
})] }),
|
|
@@ -3022,7 +3022,7 @@ function An({ className: e, respondToOpenEvent: t = !0 }) {
|
|
|
3022
3022
|
className: "flex flex-wrap gap-1.5",
|
|
3023
3023
|
children: Mt.map((e) => /* @__PURE__ */ _("button", {
|
|
3024
3024
|
onClick: () => O(e.value),
|
|
3025
|
-
className:
|
|
3025
|
+
className: K("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"),
|
|
3026
3026
|
style: {
|
|
3027
3027
|
backgroundColor: e.color,
|
|
3028
3028
|
...D === e.value ? { "--utility-ring-color": e.color } : {}
|
|
@@ -3110,8 +3110,8 @@ function An({ className: e, respondToOpenEvent: t = !0 }) {
|
|
|
3110
3110
|
min: 1.2,
|
|
3111
3111
|
max: 2,
|
|
3112
3112
|
step: .05,
|
|
3113
|
-
value:
|
|
3114
|
-
onChange:
|
|
3113
|
+
value: B,
|
|
3114
|
+
onChange: oe,
|
|
3115
3115
|
showValue: !0
|
|
3116
3116
|
}),
|
|
3117
3117
|
/* @__PURE__ */ _(wn, {
|
|
@@ -3119,33 +3119,33 @@ function An({ className: e, respondToOpenEvent: t = !0 }) {
|
|
|
3119
3119
|
min: .18,
|
|
3120
3120
|
max: .32,
|
|
3121
3121
|
step: .01,
|
|
3122
|
-
value:
|
|
3123
|
-
onChange:
|
|
3122
|
+
value: se,
|
|
3123
|
+
onChange: ce,
|
|
3124
3124
|
showValue: !0
|
|
3125
3125
|
})
|
|
3126
3126
|
]
|
|
3127
3127
|
}),
|
|
3128
3128
|
/* @__PURE__ */ _(En, {
|
|
3129
3129
|
label: "Reduced motion",
|
|
3130
|
-
checked:
|
|
3131
|
-
onChange:
|
|
3130
|
+
checked: le,
|
|
3131
|
+
onChange: ue
|
|
3132
3132
|
}),
|
|
3133
3133
|
/* @__PURE__ */ v("div", {
|
|
3134
3134
|
className: "border-border flex items-center gap-2 border-t pt-3",
|
|
3135
3135
|
children: [/* @__PURE__ */ _(mn, {
|
|
3136
3136
|
variant: "primary",
|
|
3137
3137
|
size: "sm",
|
|
3138
|
-
disabled: !
|
|
3138
|
+
disabled: !W,
|
|
3139
3139
|
onClick: () => {
|
|
3140
|
-
|
|
3140
|
+
V(), y("success", `Saved customization for ${Ct.find((e) => e.value === G)?.label ?? G}`);
|
|
3141
3141
|
},
|
|
3142
3142
|
children: "Save for theme"
|
|
3143
3143
|
}), /* @__PURE__ */ _(mn, {
|
|
3144
3144
|
variant: "secondary",
|
|
3145
3145
|
size: "sm",
|
|
3146
|
-
disabled: !
|
|
3146
|
+
disabled: !U && !W,
|
|
3147
3147
|
onClick: () => {
|
|
3148
|
-
|
|
3148
|
+
H(), y("info", "Reset to theme defaults");
|
|
3149
3149
|
},
|
|
3150
3150
|
children: "Reset"
|
|
3151
3151
|
})]
|
|
@@ -3161,9 +3161,9 @@ var jn = [
|
|
|
3161
3161
|
"light",
|
|
3162
3162
|
"system"
|
|
3163
3163
|
], Mn = {
|
|
3164
|
-
dark:
|
|
3165
|
-
light:
|
|
3166
|
-
system:
|
|
3164
|
+
dark: ie,
|
|
3165
|
+
light: le,
|
|
3166
|
+
system: z
|
|
3167
3167
|
}, Nn = {
|
|
3168
3168
|
dark: "Dark",
|
|
3169
3169
|
light: "Light",
|
|
@@ -3185,13 +3185,13 @@ function Pn({ onMobileMenuToggle: e, breadcrumbs: t, navItems: n = [], navLabel:
|
|
|
3185
3185
|
onClick: e,
|
|
3186
3186
|
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",
|
|
3187
3187
|
"aria-label": "Toggle menu",
|
|
3188
|
-
children: /* @__PURE__ */ _(
|
|
3188
|
+
children: /* @__PURE__ */ _(ne, { className: "h-4 w-4" })
|
|
3189
3189
|
}),
|
|
3190
3190
|
/* @__PURE__ */ _("button", {
|
|
3191
3191
|
onClick: () => f(!d),
|
|
3192
3192
|
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",
|
|
3193
3193
|
"aria-label": d ? "Expand sidebar" : "Collapse sidebar",
|
|
3194
|
-
children: _(d ?
|
|
3194
|
+
children: _(d ? oe : B, { className: "h-4 w-4" })
|
|
3195
3195
|
}),
|
|
3196
3196
|
(b || t !== !1) && /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _("div", { className: "bg-border hidden h-4 w-px md:block" }), b ? /* @__PURE__ */ _(Fn, {
|
|
3197
3197
|
items: n,
|
|
@@ -3212,7 +3212,7 @@ function Pn({ onMobileMenuToggle: e, breadcrumbs: t, navItems: n = [], navLabel:
|
|
|
3212
3212
|
onClick: l ?? (() => _t()),
|
|
3213
3213
|
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",
|
|
3214
3214
|
children: [
|
|
3215
|
-
/* @__PURE__ */ _(
|
|
3215
|
+
/* @__PURE__ */ _(se, { className: "h-3 w-3" }),
|
|
3216
3216
|
/* @__PURE__ */ _("span", {
|
|
3217
3217
|
className: "text-2xs",
|
|
3218
3218
|
children: a
|
|
@@ -3249,7 +3249,7 @@ function Fn({ items: e, label: t, currentPath: n, onNavigate: r }) {
|
|
|
3249
3249
|
onClick: (t) => {
|
|
3250
3250
|
e.reloadDocument || ut(t, e.path, r);
|
|
3251
3251
|
},
|
|
3252
|
-
className:
|
|
3252
|
+
className: K("font-navigation flex h-6 max-w-40 items-center gap-1 rounded px-2 text-xs transition-colors duration-[100ms]", i ? "bg-accent-muted text-accent" : "text-text-tertiary hover:bg-bg-hover hover:text-text-primary"),
|
|
3253
3253
|
children: [
|
|
3254
3254
|
t && /* @__PURE__ */ _(t, { className: "h-3 w-3 shrink-0" }),
|
|
3255
3255
|
/* @__PURE__ */ _("span", {
|
|
@@ -3270,7 +3270,7 @@ function Fn({ items: e, label: t, currentPath: n, onNavigate: r }) {
|
|
|
3270
3270
|
function In({ children: e, navSections: t, brand: n, accounts: r, bottomNavItems: i = [], commandItems: a, breadcrumbs: o, initialAccountIndex: s, onAccountChange: c, onSignOut: l, signOutPath: u, signOutLabel: d, settingsPath: f, settingsLabel: m, onOpenSettings: g, showCommandPalette: y = !0, showCommandTrigger: b = !0, commandTriggerLabel: x, commandShortcut: S, sidebarHeaderActions: C, topBarActions: w, topBarNavItems: T, topBarNavLabel: E, currentPath: D, onNavigate: O, mainClassName: k, className: A }) {
|
|
3271
3271
|
let [j, M] = h(!1), N = p(() => t.flatMap((e) => e.items), [t]), P = a ?? N;
|
|
3272
3272
|
return /* @__PURE__ */ v("div", {
|
|
3273
|
-
className:
|
|
3273
|
+
className: K("bg-bg-primary flex h-svh overflow-hidden", A),
|
|
3274
3274
|
children: [
|
|
3275
3275
|
/* @__PURE__ */ _("a", {
|
|
3276
3276
|
href: "#main-content",
|
|
@@ -3308,7 +3308,7 @@ function In({ children: e, navSections: t, brand: n, accounts: r, bottomNavItems
|
|
|
3308
3308
|
onNavigate: O
|
|
3309
3309
|
}), /* @__PURE__ */ _("main", {
|
|
3310
3310
|
id: "main-content",
|
|
3311
|
-
className:
|
|
3311
|
+
className: K("flex-1 overflow-y-auto p-4 pb-20 md:p-6 md:pb-6", k),
|
|
3312
3312
|
children: e
|
|
3313
3313
|
})]
|
|
3314
3314
|
}),
|
|
@@ -3340,7 +3340,7 @@ function In({ children: e, navSections: t, brand: n, accounts: r, bottomNavItems
|
|
|
3340
3340
|
//#region src/components/app-shell/AuthLayout.tsx
|
|
3341
3341
|
function Ln({ children: e, className: t }) {
|
|
3342
3342
|
return /* @__PURE__ */ v("div", {
|
|
3343
|
-
className:
|
|
3343
|
+
className: K("bg-bg-primary relative flex min-h-svh items-center justify-center p-4", t),
|
|
3344
3344
|
children: [/* @__PURE__ */ _("div", {
|
|
3345
3345
|
className: "pointer-events-none absolute inset-0 opacity-30",
|
|
3346
3346
|
style: { background: "radial-gradient(ellipse at 50% 30%, var(--accent-muted) 0%, transparent 60%)" }
|
|
@@ -3353,7 +3353,7 @@ function Rn({ to: e, children: t, onNavigate: n, className: r }) {
|
|
|
3353
3353
|
return /* @__PURE__ */ v("a", {
|
|
3354
3354
|
href: e,
|
|
3355
3355
|
onClick: (t) => ut(t, e, n),
|
|
3356
|
-
className:
|
|
3356
|
+
className: K("inline-flex items-center gap-1.5", "text-text-tertiary text-xs", "hover:text-text-primary transition-colors duration-[100ms]", r),
|
|
3357
3357
|
children: [/* @__PURE__ */ _(S, { className: "h-3.5 w-3.5" }), t]
|
|
3358
3358
|
});
|
|
3359
3359
|
}
|
|
@@ -3370,7 +3370,7 @@ var Vn = a(({ id: e, checked: t, indeterminate: n, onChange: r, label: i, ariaLa
|
|
|
3370
3370
|
return l(() => {
|
|
3371
3371
|
T.current && (T.current.indeterminate = !!n);
|
|
3372
3372
|
}, [n]), /* @__PURE__ */ v("div", {
|
|
3373
|
-
className:
|
|
3373
|
+
className: K("ui-choice flex w-fit items-center gap-2.5", o ? "cursor-not-allowed opacity-40" : "cursor-pointer", d),
|
|
3374
3374
|
"data-control-size": S,
|
|
3375
3375
|
children: [/* @__PURE__ */ v("span", {
|
|
3376
3376
|
className: "ui-checkbox-control",
|
|
@@ -3394,11 +3394,11 @@ var Vn = a(({ id: e, checked: t, indeterminate: n, onChange: r, label: i, ariaLa
|
|
|
3394
3394
|
}), /* @__PURE__ */ _("span", {
|
|
3395
3395
|
className: "ui-checkbox-decoration",
|
|
3396
3396
|
"aria-hidden": "true",
|
|
3397
|
-
children: n ? /* @__PURE__ */ _(
|
|
3397
|
+
children: n ? /* @__PURE__ */ _(re, { className: "h-3 w-3" }) : t ? /* @__PURE__ */ _(E, { className: "h-3 w-3" }) : null
|
|
3398
3398
|
})]
|
|
3399
3399
|
}), i && /* @__PURE__ */ _("label", {
|
|
3400
3400
|
htmlFor: w,
|
|
3401
|
-
className:
|
|
3401
|
+
className: K("text-text-primary text-xs", o ? "cursor-not-allowed" : "cursor-pointer"),
|
|
3402
3402
|
children: i
|
|
3403
3403
|
})]
|
|
3404
3404
|
});
|
|
@@ -3409,7 +3409,7 @@ Vn.displayName = "Checkbox";
|
|
|
3409
3409
|
var Hn = a(function({ icon: e, children: t, className: n, ...r }, i) {
|
|
3410
3410
|
return /* @__PURE__ */ v("button", {
|
|
3411
3411
|
ref: i,
|
|
3412
|
-
className:
|
|
3412
|
+
className: K("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),
|
|
3413
3413
|
...r,
|
|
3414
3414
|
children: [/* @__PURE__ */ _(e, { className: "h-3.5 w-3.5 shrink-0" }), t && /* @__PURE__ */ _("span", {
|
|
3415
3415
|
className: "hidden sm:inline",
|
|
@@ -3432,7 +3432,7 @@ function Wn({ columns: e, hidden: n, onToggle: r, label: i = "Columns", heading:
|
|
|
3432
3432
|
onClick: () => f(!d),
|
|
3433
3433
|
children: i
|
|
3434
3434
|
}), d && /* @__PURE__ */ v("div", {
|
|
3435
|
-
className:
|
|
3435
|
+
className: K("bg-bg-tertiary border-border-strong animate-scale-in absolute top-full right-0 z-[100] mt-1 rounded-md border py-1 shadow-lg", c ? "w-56" : "w-48"),
|
|
3436
3436
|
children: [e.map((i, o) => /* @__PURE__ */ v(t, { children: [(o === 0 || i.group !== e[o - 1].group) && /* @__PURE__ */ _("p", {
|
|
3437
3437
|
className: "text-2xs-f text-text-tertiary px-3 py-1.5 font-semibold tracking-wider uppercase",
|
|
3438
3438
|
children: i.group ?? a
|
|
@@ -3487,7 +3487,7 @@ function Gn({ page: e, totalPages: t, onPageChange: n }) {
|
|
|
3487
3487
|
children: "..."
|
|
3488
3488
|
}, `e${r}`) : /* @__PURE__ */ _("button", {
|
|
3489
3489
|
onClick: () => n(t),
|
|
3490
|
-
className:
|
|
3490
|
+
className: K("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"),
|
|
3491
3491
|
children: t
|
|
3492
3492
|
}, t)),
|
|
3493
3493
|
/* @__PURE__ */ _("button", {
|
|
@@ -3529,7 +3529,7 @@ function qn({ data: e, columns: t, getRowId: n, onRowClick: r, emptyMessage: a =
|
|
|
3529
3529
|
w(e), E(t);
|
|
3530
3530
|
}
|
|
3531
3531
|
return /* @__PURE__ */ v("div", {
|
|
3532
|
-
className:
|
|
3532
|
+
className: K("border-border bg-bg-table overflow-x-auto rounded-md border", f),
|
|
3533
3533
|
children: [u && /* @__PURE__ */ _("span", {
|
|
3534
3534
|
role: "status",
|
|
3535
3535
|
className: "sr-only",
|
|
@@ -3537,7 +3537,7 @@ function qn({ data: e, columns: t, getRowId: n, onRowClick: r, emptyMessage: a =
|
|
|
3537
3537
|
}), /* @__PURE__ */ v("table", {
|
|
3538
3538
|
...m,
|
|
3539
3539
|
"aria-busy": u || m?.["aria-busy"],
|
|
3540
|
-
className:
|
|
3540
|
+
className: K("font-data w-full text-xs", m?.className),
|
|
3541
3541
|
children: [
|
|
3542
3542
|
l && /* @__PURE__ */ _("caption", {
|
|
3543
3543
|
className: "text-text-secondary px-3 py-2 text-left text-xs",
|
|
@@ -3546,7 +3546,7 @@ function qn({ data: e, columns: t, getRowId: n, onRowClick: r, emptyMessage: a =
|
|
|
3546
3546
|
/* @__PURE__ */ _("thead", { children: /* @__PURE__ */ _("tr", {
|
|
3547
3547
|
className: "border-border bg-bg-table-header border-b",
|
|
3548
3548
|
children: t.map((e) => /* @__PURE__ */ _("th", {
|
|
3549
|
-
className:
|
|
3549
|
+
className: K("text-2xs text-text-table-header font-label h-7 px-3 text-left font-semibold tracking-wider uppercase", e.sortable && "hover:text-text-table-header-hover cursor-pointer select-none"),
|
|
3550
3550
|
style: { width: e.width },
|
|
3551
3551
|
scope: "col",
|
|
3552
3552
|
"aria-sort": e.sortable ? D === e.key ? O === "asc" ? "ascending" : "descending" : "none" : void 0,
|
|
@@ -3572,12 +3572,12 @@ function qn({ data: e, columns: t, getRowId: n, onRowClick: r, emptyMessage: a =
|
|
|
3572
3572
|
...a,
|
|
3573
3573
|
key: n(e),
|
|
3574
3574
|
"aria-selected": o,
|
|
3575
|
-
className:
|
|
3575
|
+
className: K("border-border h-8 border-b last:border-b-0", "transition-none", o === !0 || o === "true" ? "bg-accent-muted" : "hover:bg-bg-hover", r && "cursor-pointer", a?.className),
|
|
3576
3576
|
onClick: (t) => {
|
|
3577
3577
|
a?.onClick?.(t), t.defaultPrevented || r?.(e);
|
|
3578
3578
|
}
|
|
3579
3579
|
}, t.map((t) => /* @__PURE__ */ _("td", {
|
|
3580
|
-
className:
|
|
3580
|
+
className: K("text-text-primary px-3 whitespace-nowrap", t.cellClassName),
|
|
3581
3581
|
onClick: t.interactive ? (e) => e.stopPropagation() : void 0,
|
|
3582
3582
|
children: t.render(e)
|
|
3583
3583
|
}, t.key)));
|
|
@@ -3592,7 +3592,7 @@ var Jn = {
|
|
|
3592
3592
|
neutral: {
|
|
3593
3593
|
bg: "bg-bg-hover",
|
|
3594
3594
|
border: "border-border",
|
|
3595
|
-
icon:
|
|
3595
|
+
icon: R,
|
|
3596
3596
|
iconColor: "text-text-tertiary"
|
|
3597
3597
|
},
|
|
3598
3598
|
success: {
|
|
@@ -3610,13 +3610,13 @@ var Jn = {
|
|
|
3610
3610
|
error: {
|
|
3611
3611
|
bg: "bg-red-muted",
|
|
3612
3612
|
border: "border-red/30",
|
|
3613
|
-
icon:
|
|
3613
|
+
icon: H,
|
|
3614
3614
|
iconColor: "text-red"
|
|
3615
3615
|
},
|
|
3616
3616
|
info: {
|
|
3617
3617
|
bg: "bg-blue-muted",
|
|
3618
3618
|
border: "border-blue/30",
|
|
3619
|
-
icon:
|
|
3619
|
+
icon: R,
|
|
3620
3620
|
iconColor: "text-blue"
|
|
3621
3621
|
}
|
|
3622
3622
|
};
|
|
@@ -3626,16 +3626,16 @@ function Yn({ type: e, title: t, children: n, dismissible: r, className: i, acti
|
|
|
3626
3626
|
let u = Jn[e], d = u.icon, f = e === "neutral" ? "text-text-primary" : u.iconColor;
|
|
3627
3627
|
return /* @__PURE__ */ v("div", {
|
|
3628
3628
|
...s,
|
|
3629
|
-
className:
|
|
3629
|
+
className: K("flex gap-2.5 rounded-md border p-3", u.bg, u.border, i),
|
|
3630
3630
|
children: [
|
|
3631
|
-
/* @__PURE__ */ _(d, { className:
|
|
3631
|
+
/* @__PURE__ */ _(d, { className: K("mt-0.5 h-4 w-4 shrink-0", u.iconColor) }),
|
|
3632
3632
|
/* @__PURE__ */ v("div", {
|
|
3633
3633
|
className: "min-w-0 flex-1",
|
|
3634
3634
|
children: [t && /* @__PURE__ */ _("p", {
|
|
3635
|
-
className:
|
|
3635
|
+
className: K(o ? f : "text-text-primary", "mb-0.5 text-xs font-semibold"),
|
|
3636
3636
|
children: t
|
|
3637
3637
|
}), /* @__PURE__ */ _("div", {
|
|
3638
|
-
className:
|
|
3638
|
+
className: K(o ? f : "text-text-secondary", "text-xs"),
|
|
3639
3639
|
children: n
|
|
3640
3640
|
})]
|
|
3641
3641
|
}),
|
|
@@ -3647,7 +3647,7 @@ function Yn({ type: e, title: t, children: n, dismissible: r, className: i, acti
|
|
|
3647
3647
|
onClick: () => l(!0),
|
|
3648
3648
|
className: "text-text-tertiary hover:text-text-primary flex h-5 w-5 cursor-pointer items-center justify-center rounded",
|
|
3649
3649
|
"aria-label": "Dismiss",
|
|
3650
|
-
children: /* @__PURE__ */ _(
|
|
3650
|
+
children: /* @__PURE__ */ _(V, { className: "h-3 w-3" })
|
|
3651
3651
|
})
|
|
3652
3652
|
]
|
|
3653
3653
|
});
|
|
@@ -3656,7 +3656,7 @@ function Yn({ type: e, title: t, children: n, dismissible: r, className: i, acti
|
|
|
3656
3656
|
//#region src/components/ui/AuthCard.tsx
|
|
3657
3657
|
function Xn({ title: e, subtitle: t, icon: n, children: r, footer: i, className: a }) {
|
|
3658
3658
|
return /* @__PURE__ */ _("div", {
|
|
3659
|
-
className:
|
|
3659
|
+
className: K("relative z-10 w-full max-w-sm", a),
|
|
3660
3660
|
children: /* @__PURE__ */ v("div", {
|
|
3661
3661
|
className: "bg-bg-secondary border-border rounded-lg border p-8 shadow-lg",
|
|
3662
3662
|
children: [
|
|
@@ -3690,12 +3690,12 @@ function Xn({ title: e, subtitle: t, icon: n, children: r, footer: i, className:
|
|
|
3690
3690
|
//#region src/components/ui/AuthorByline.tsx
|
|
3691
3691
|
function Zn({ name: e, meta: t, nameAppend: n, size: r = "sm", className: i }) {
|
|
3692
3692
|
return /* @__PURE__ */ v("div", {
|
|
3693
|
-
className:
|
|
3693
|
+
className: K("flex items-center gap-2", i),
|
|
3694
3694
|
children: [/* @__PURE__ */ _(zt, {
|
|
3695
3695
|
name: e,
|
|
3696
3696
|
size: "sm"
|
|
3697
3697
|
}), /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ v("p", {
|
|
3698
|
-
className:
|
|
3698
|
+
className: K("text-text-primary font-label font-medium", r === "md" ? "text-xs" : "text-2xs"),
|
|
3699
3699
|
children: [e, n]
|
|
3700
3700
|
}), t && /* @__PURE__ */ _("p", {
|
|
3701
3701
|
className: "text-text-tertiary font-label text-2xs",
|
|
@@ -3726,8 +3726,8 @@ var Qn = {
|
|
|
3726
3726
|
};
|
|
3727
3727
|
function er({ color: e = "gray", dot: t, children: n, className: r }) {
|
|
3728
3728
|
return /* @__PURE__ */ v("span", {
|
|
3729
|
-
className:
|
|
3730
|
-
children: [t && /* @__PURE__ */ _("span", { className:
|
|
3729
|
+
className: K("font-label text-2xs inline-flex items-center gap-1.5 rounded-md px-2 py-0.5 font-medium", Qn[e], r),
|
|
3730
|
+
children: [t && /* @__PURE__ */ _("span", { className: K("h-1.5 w-1.5 rounded-full", $n[e]) }), n]
|
|
3731
3731
|
});
|
|
3732
3732
|
}
|
|
3733
3733
|
//#endregion
|
|
@@ -4436,7 +4436,7 @@ function ni({ days: e, events: t, availability: n, label: r }) {
|
|
|
4436
4436
|
return /* @__PURE__ */ v("section", {
|
|
4437
4437
|
"aria-label": d.format(e),
|
|
4438
4438
|
children: [/* @__PURE__ */ _("h3", {
|
|
4439
|
-
className:
|
|
4439
|
+
className: K("ui-cal-agenda-day border-border border-b px-3 py-1.5 text-xs font-semibold", s ? "text-accent" : "text-text-primary"),
|
|
4440
4440
|
children: /* @__PURE__ */ _("button", {
|
|
4441
4441
|
type: "button",
|
|
4442
4442
|
className: "cursor-pointer hover:underline",
|
|
@@ -4468,7 +4468,7 @@ function ri({ event: e, resources: t }) {
|
|
|
4468
4468
|
tabIndex: 0,
|
|
4469
4469
|
"aria-label": n.describeEvent(e),
|
|
4470
4470
|
"data-status": e.status ?? "confirmed",
|
|
4471
|
-
className:
|
|
4471
|
+
className: K("ui-cal-agenda-row hover:bg-bg-hover flex cursor-pointer items-start gap-3 px-3 py-2 transition-colors duration-[100ms]", `ui-cal-c-${n.eventColor(e)}`),
|
|
4472
4472
|
onClick: () => n.clickEvent(e),
|
|
4473
4473
|
onKeyDown: (t) => {
|
|
4474
4474
|
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), n.clickEvent(e));
|
|
@@ -4515,7 +4515,7 @@ function ii({ block: e, resources: t }) {
|
|
|
4515
4515
|
role: a ? "button" : void 0,
|
|
4516
4516
|
tabIndex: a ? 0 : void 0,
|
|
4517
4517
|
"aria-label": n.describeBlock(e),
|
|
4518
|
-
className:
|
|
4518
|
+
className: K("text-text-tertiary flex items-start gap-3 px-3 py-1.5 text-2xs", a && "hover:bg-bg-hover cursor-pointer transition-colors duration-[100ms]", `ui-cal-c-${n.blockColor(e)}`),
|
|
4519
4519
|
onClick: a ? () => n.clickBlock(e) : void 0,
|
|
4520
4520
|
onKeyDown: a ? (t) => {
|
|
4521
4521
|
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), n.clickBlock(e));
|
|
@@ -4526,7 +4526,7 @@ function ii({ block: e, resources: t }) {
|
|
|
4526
4526
|
children: jr(e.start, e.end, n)
|
|
4527
4527
|
}),
|
|
4528
4528
|
/* @__PURE__ */ _("span", {
|
|
4529
|
-
className:
|
|
4529
|
+
className: K("ui-cal-agenda-swatch mt-0.5", r === "unavailable" && "ui-cal-agenda-swatch-off"),
|
|
4530
4530
|
"aria-hidden": "true"
|
|
4531
4531
|
}),
|
|
4532
4532
|
/* @__PURE__ */ v("span", {
|
|
@@ -4577,9 +4577,9 @@ function ci({ date: e, events: t, availability: n, label: r }) {
|
|
|
4577
4577
|
Nt(A !== null, z, [D]), l(() => {
|
|
4578
4578
|
A && D.current?.querySelector("[data-cal-close]")?.focus();
|
|
4579
4579
|
}, [A]);
|
|
4580
|
-
let ie = i.editLayer === "availability", ae = i.dates.parts(e).month,
|
|
4580
|
+
let ie = i.editLayer === "availability", ae = i.dates.parts(e).month, B = p(() => T.flat(), [T]), oe = w(i.now), se = B.find((e) => w(e) === oe && i.dates.parts(e).month === ae) ?? B.find((t) => i.dates.parts(t).month === ae && i.dates.parts(t).day === i.dates.parts(e).day) ?? B.find((e) => i.dates.parts(e).month === ae) ?? B[0], ce = O && B.some((e) => w(e) === O) ? O : w(se), le = p(() => {
|
|
4581
4581
|
let e = /* @__PURE__ */ new Map();
|
|
4582
|
-
for (let r of
|
|
4582
|
+
for (let r of B) {
|
|
4583
4583
|
let i = u(t, r).map((e) => ({
|
|
4584
4584
|
type: "event",
|
|
4585
4585
|
value: e
|
|
@@ -4594,21 +4594,21 @@ function ci({ date: e, events: t, availability: n, label: r }) {
|
|
|
4594
4594
|
}
|
|
4595
4595
|
return e;
|
|
4596
4596
|
}, [
|
|
4597
|
-
|
|
4597
|
+
B,
|
|
4598
4598
|
t,
|
|
4599
4599
|
n,
|
|
4600
4600
|
ie,
|
|
4601
4601
|
u,
|
|
4602
4602
|
o,
|
|
4603
4603
|
w
|
|
4604
|
-
]),
|
|
4605
|
-
function
|
|
4604
|
+
]), ue = y(i.locale, { weekday: "short" }), H = i.monthMaxEvents ?? (ne ? Math.max(1, Math.floor((Math.max(ne / T.length, ai) - 28) / 20)) : 3);
|
|
4605
|
+
function U(e) {
|
|
4606
4606
|
let t = w(e);
|
|
4607
4607
|
k(t), requestAnimationFrame(() => {
|
|
4608
4608
|
E.current?.querySelector(`[data-cal-date="${t}"]`)?.focus();
|
|
4609
4609
|
});
|
|
4610
4610
|
}
|
|
4611
|
-
function
|
|
4611
|
+
function W(e, t) {
|
|
4612
4612
|
if (e.target !== e.currentTarget) return;
|
|
4613
4613
|
let n = {
|
|
4614
4614
|
ArrowLeft: -1,
|
|
@@ -4619,17 +4619,17 @@ function ci({ date: e, events: t, availability: n, label: r }) {
|
|
|
4619
4619
|
if (e.key in n) {
|
|
4620
4620
|
e.preventDefault();
|
|
4621
4621
|
let r = a(t, n[e.key]);
|
|
4622
|
-
|
|
4622
|
+
B.some((e) => S(e, r)) && U(r);
|
|
4623
4623
|
} else if (e.key === "Home" || e.key === "End") {
|
|
4624
4624
|
e.preventDefault();
|
|
4625
4625
|
let n = (i.dates.weekday(t) - i.weekStartsOn + 7) % 7;
|
|
4626
|
-
|
|
4626
|
+
U(a(t, e.key === "Home" ? -n : 6 - n));
|
|
4627
4627
|
} else (e.key === "Enter" || e.key === " ") && (e.preventDefault(), i.openDay(t));
|
|
4628
4628
|
}
|
|
4629
|
-
function
|
|
4629
|
+
function G(e) {
|
|
4630
4630
|
return e.type === "event" ? i.canEditEvent(e.value) : i.canEditBlock(e.value);
|
|
4631
4631
|
}
|
|
4632
|
-
function
|
|
4632
|
+
function fe(e, t) {
|
|
4633
4633
|
let n = {
|
|
4634
4634
|
action: "move",
|
|
4635
4635
|
...C(e.value, t),
|
|
@@ -4645,11 +4645,11 @@ function ci({ date: e, events: t, availability: n, label: r }) {
|
|
|
4645
4645
|
...n
|
|
4646
4646
|
};
|
|
4647
4647
|
}
|
|
4648
|
-
function
|
|
4648
|
+
function pe(e) {
|
|
4649
4649
|
e.type === "event" ? i.clickEvent(e.value) : i.clickBlock(e.value);
|
|
4650
4650
|
}
|
|
4651
|
-
function
|
|
4652
|
-
if (e.button !== 0 || R.current || (e.stopPropagation(), e.pointerType === "touch" || !
|
|
4651
|
+
function me(e, t, n) {
|
|
4652
|
+
if (e.button !== 0 || R.current || (e.stopPropagation(), e.pointerType === "touch" || !G(t))) return;
|
|
4653
4653
|
let r = (e) => {
|
|
4654
4654
|
let t = R.current;
|
|
4655
4655
|
if (!t || e.pointerId !== t.pointerId) return;
|
|
@@ -4665,7 +4665,7 @@ function ci({ date: e, events: t, availability: n, label: r }) {
|
|
|
4665
4665
|
te.current = !1;
|
|
4666
4666
|
}, 0)), !e || !t.started || !t.overKey || t.overKey === t.originKey)) return;
|
|
4667
4667
|
let n = c(g(t.overKey), g(t.originKey));
|
|
4668
|
-
ee.current.commit(
|
|
4668
|
+
ee.current.commit(fe(t.item, n), "pointer");
|
|
4669
4669
|
}, a = (e) => {
|
|
4670
4670
|
e.pointerId === R.current?.pointerId && i(!0);
|
|
4671
4671
|
}, o = (e) => {
|
|
@@ -4685,20 +4685,20 @@ function ci({ date: e, events: t, availability: n, label: r }) {
|
|
|
4685
4685
|
}
|
|
4686
4686
|
};
|
|
4687
4687
|
}
|
|
4688
|
-
function
|
|
4689
|
-
te.current ||
|
|
4688
|
+
function he(e) {
|
|
4689
|
+
te.current || pe(e);
|
|
4690
4690
|
}
|
|
4691
|
-
function
|
|
4691
|
+
function ge(e, t) {
|
|
4692
4692
|
if (e.key === "Enter" || e.key === " ") {
|
|
4693
|
-
e.preventDefault(), e.stopPropagation(),
|
|
4693
|
+
e.preventDefault(), e.stopPropagation(), pe(t);
|
|
4694
4694
|
return;
|
|
4695
4695
|
}
|
|
4696
4696
|
if (e.altKey && (e.key === "ArrowLeft" || e.key === "ArrowRight")) {
|
|
4697
|
-
if (e.preventDefault(), e.stopPropagation(), !
|
|
4698
|
-
i.commit(
|
|
4697
|
+
if (e.preventDefault(), e.stopPropagation(), !G(t)) return;
|
|
4698
|
+
i.commit(fe(t, e.key === "ArrowLeft" ? -1 : 1), "keyboard");
|
|
4699
4699
|
}
|
|
4700
4700
|
}
|
|
4701
|
-
function
|
|
4701
|
+
function _e(e, t) {
|
|
4702
4702
|
e.target !== e.currentTarget || !i.selectable || i.commit({
|
|
4703
4703
|
target: "selection",
|
|
4704
4704
|
action: "create",
|
|
@@ -4707,21 +4707,21 @@ function ci({ date: e, events: t, availability: n, label: r }) {
|
|
|
4707
4707
|
allDay: !0
|
|
4708
4708
|
}, "pointer");
|
|
4709
4709
|
}
|
|
4710
|
-
let
|
|
4710
|
+
let ve = (e, t) => {
|
|
4711
4711
|
let n = si(e), r = e.value.placeholder ? {
|
|
4712
4712
|
"aria-hidden": !0,
|
|
4713
4713
|
"data-placeholder": !0
|
|
4714
4714
|
} : {
|
|
4715
4715
|
role: "button",
|
|
4716
4716
|
tabIndex: 0,
|
|
4717
|
-
onPointerDown: (n) =>
|
|
4718
|
-
onClick: () =>
|
|
4719
|
-
onKeyDown: (t) =>
|
|
4717
|
+
onPointerDown: (n) => me(n, e, t),
|
|
4718
|
+
onClick: () => he(e),
|
|
4719
|
+
onKeyDown: (t) => ge(t, e)
|
|
4720
4720
|
};
|
|
4721
4721
|
if (e.type === "availability") {
|
|
4722
4722
|
let t = e.value;
|
|
4723
4723
|
return /* @__PURE__ */ v("div", {
|
|
4724
|
-
className:
|
|
4724
|
+
className: K("ui-cal-chip", `ui-cal-c-${i.blockColor(t)}`),
|
|
4725
4725
|
"data-all-day": !0,
|
|
4726
4726
|
"data-dragging": I === n || void 0,
|
|
4727
4727
|
"aria-label": t.placeholder ? void 0 : i.describeBlock(t),
|
|
@@ -4737,7 +4737,7 @@ function ci({ date: e, events: t, availability: n, label: r }) {
|
|
|
4737
4737
|
}
|
|
4738
4738
|
let a = e.value, o = x(a), s = i.statusLabel(a);
|
|
4739
4739
|
return /* @__PURE__ */ v("div", {
|
|
4740
|
-
className:
|
|
4740
|
+
className: K("ui-cal-chip", `ui-cal-c-${i.eventColor(a)}`),
|
|
4741
4741
|
"data-all-day": o || void 0,
|
|
4742
4742
|
"data-status": a.status ?? "confirmed",
|
|
4743
4743
|
"data-dragging": I === n || void 0,
|
|
@@ -4767,7 +4767,7 @@ function ci({ date: e, events: t, availability: n, label: r }) {
|
|
|
4767
4767
|
"aria-hidden": "true",
|
|
4768
4768
|
children: T[0].map((e) => /* @__PURE__ */ _("div", {
|
|
4769
4769
|
className: "text-text-tertiary py-1.5 text-center text-2xs font-medium uppercase",
|
|
4770
|
-
children:
|
|
4770
|
+
children: ue.format(e)
|
|
4771
4771
|
}, i.dates.weekday(e)))
|
|
4772
4772
|
}), /* @__PURE__ */ _("div", {
|
|
4773
4773
|
ref: E,
|
|
@@ -4779,10 +4779,10 @@ function ci({ date: e, events: t, availability: n, label: r }) {
|
|
|
4779
4779
|
role: "row",
|
|
4780
4780
|
className: "grid min-h-24 flex-1 grid-cols-7",
|
|
4781
4781
|
children: e.map((e) => {
|
|
4782
|
-
let t = w(e), n =
|
|
4782
|
+
let t = w(e), n = le.get(t), r = n?.items ?? [], a = Math.max(1, H), o = r.length > a, s = o ? r.slice(0, a - 1) : r, c = t === oe, l = i.dates.parts(e).month !== ae, u = i.hasAvailability && i.shadeOutsideAvailability && !n?.hasAvailable;
|
|
4783
4783
|
return /* @__PURE__ */ v("div", {
|
|
4784
4784
|
role: "gridcell",
|
|
4785
|
-
tabIndex: t ===
|
|
4785
|
+
tabIndex: t === ce ? 0 : -1,
|
|
4786
4786
|
"data-cal-date": t,
|
|
4787
4787
|
"data-outside-month": l || void 0,
|
|
4788
4788
|
"data-unavailable": u || void 0,
|
|
@@ -4793,18 +4793,18 @@ function ci({ date: e, events: t, availability: n, label: r }) {
|
|
|
4793
4793
|
onFocus: (e) => {
|
|
4794
4794
|
e.target === e.currentTarget && k(t);
|
|
4795
4795
|
},
|
|
4796
|
-
onKeyDown: (t) =>
|
|
4797
|
-
onClick: (t) =>
|
|
4796
|
+
onKeyDown: (t) => W(t, e),
|
|
4797
|
+
onClick: (t) => _e(t, e),
|
|
4798
4798
|
children: [
|
|
4799
4799
|
/* @__PURE__ */ _("button", {
|
|
4800
4800
|
type: "button",
|
|
4801
4801
|
tabIndex: -1,
|
|
4802
4802
|
onClick: () => i.openDay(e),
|
|
4803
4803
|
"aria-label": d(e, i.locale),
|
|
4804
|
-
className:
|
|
4804
|
+
className: K("flex h-5 min-w-5 cursor-pointer items-center justify-center self-start rounded-full px-1 text-2xs font-semibold transition-colors duration-[100ms]", c ? "bg-accent text-text-on-accent" : l ? "text-text-tertiary hover:bg-bg-hover" : "text-text-primary hover:bg-bg-hover"),
|
|
4805
4805
|
children: i.dates.parts(e).day
|
|
4806
4806
|
}),
|
|
4807
|
-
s.map((e) =>
|
|
4807
|
+
s.map((e) => ve(e, t)),
|
|
4808
4808
|
o && /* @__PURE__ */ _("button", {
|
|
4809
4809
|
type: "button",
|
|
4810
4810
|
className: "text-text-secondary hover:bg-bg-hover hover:text-text-primary cursor-pointer self-start rounded-md px-1 text-2xs font-medium transition-colors duration-[100ms]",
|
|
@@ -4824,7 +4824,7 @@ function ci({ date: e, events: t, availability: n, label: r }) {
|
|
|
4824
4824
|
},
|
|
4825
4825
|
children: i.labels.more(r.length - s.length)
|
|
4826
4826
|
}),
|
|
4827
|
-
A === t &&
|
|
4827
|
+
A === t && de(/* @__PURE__ */ v("div", {
|
|
4828
4828
|
ref: D,
|
|
4829
4829
|
role: "dialog",
|
|
4830
4830
|
"aria-label": d(e, i.locale),
|
|
@@ -4843,9 +4843,9 @@ function ci({ date: e, events: t, availability: n, label: r }) {
|
|
|
4843
4843
|
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]",
|
|
4844
4844
|
onClick: z,
|
|
4845
4845
|
"data-cal-close": !0,
|
|
4846
|
-
children: /* @__PURE__ */ _(
|
|
4846
|
+
children: /* @__PURE__ */ _(V, { className: "h-3.5 w-3.5" })
|
|
4847
4847
|
})]
|
|
4848
|
-
}), r.map((e) =>
|
|
4848
|
+
}), r.map((e) => ve(e, t))]
|
|
4849
4849
|
}), document.body)
|
|
4850
4850
|
]
|
|
4851
4851
|
}, t);
|
|
@@ -4878,7 +4878,7 @@ function li({ event: e, style: t, resizeEdge: n, compact: r, dense: i, continues
|
|
|
4878
4878
|
"aria-label": y ? void 0 : u.describeEvent(e),
|
|
4879
4879
|
"aria-describedby": !y && (d || u.hasEventClick) ? u.itemHelpId : void 0,
|
|
4880
4880
|
title: `${e.title}\n${f}${e.description ? `\n${e.description}` : ""}`,
|
|
4881
|
-
className:
|
|
4881
|
+
className: K("ui-cal-event", `ui-cal-c-${u.eventColor(e)}`),
|
|
4882
4882
|
style: t,
|
|
4883
4883
|
onKeyDown: y ? void 0 : c,
|
|
4884
4884
|
onClick: y ? void 0 : l,
|
|
@@ -4956,7 +4956,7 @@ function di({ block: e, style: t, resizeEdge: n, continuesAfter: r, dragging: i,
|
|
|
4956
4956
|
"data-edit": c || void 0,
|
|
4957
4957
|
"data-readonly": c && !l ? !0 : void 0,
|
|
4958
4958
|
"data-dragging": i || void 0,
|
|
4959
|
-
className:
|
|
4959
|
+
className: K("ui-cal-avail", `ui-cal-c-${s.blockColor(e)}`),
|
|
4960
4960
|
style: t,
|
|
4961
4961
|
onKeyDown: f ? a : void 0,
|
|
4962
4962
|
onClick: f ? o : void 0,
|
|
@@ -5521,13 +5521,13 @@ function Ti({ days: e, events: t, availability: n, label: r }) {
|
|
|
5521
5521
|
let t = ne.current;
|
|
5522
5522
|
t !== null && (e.scrollTop = Math.max(0, t * C - Ci(e)));
|
|
5523
5523
|
}, [C]);
|
|
5524
|
-
let re = m(null), z = i.scrollToMinute, { dates: ie, timeZone: ae, now:
|
|
5524
|
+
let re = m(null), z = i.scrollToMinute, { dates: ie, timeZone: ae, now: B } = i, oe = i.scrollAlign;
|
|
5525
5525
|
l(() => {
|
|
5526
5526
|
let t = w.current;
|
|
5527
5527
|
if (!t || re.current === i.view) return;
|
|
5528
5528
|
re.current = i.view;
|
|
5529
|
-
let n = e.find((e) => d(e,
|
|
5530
|
-
let e =
|
|
5529
|
+
let n = e.find((e) => d(e, B)) ?? e[0], r = ae ? ie.minutesOfDay(ie.wallDateAtMinutes(n, z ?? 480)) : z ?? 480, a = ie.dayBounds(n, b), o = t.querySelector(".ui-cal-head"), s = () => {
|
|
5530
|
+
let e = oe === "center" ? Ci(t) : 8;
|
|
5531
5531
|
t.scrollTop = Math.max(0, (r - a.min) * C - e);
|
|
5532
5532
|
};
|
|
5533
5533
|
if (s(), typeof ResizeObserver > "u") return;
|
|
@@ -5553,78 +5553,78 @@ function Ti({ days: e, events: t, availability: n, label: r }) {
|
|
|
5553
5553
|
}, [
|
|
5554
5554
|
i.view,
|
|
5555
5555
|
z,
|
|
5556
|
-
|
|
5556
|
+
oe,
|
|
5557
5557
|
b,
|
|
5558
5558
|
C,
|
|
5559
5559
|
e,
|
|
5560
5560
|
d,
|
|
5561
5561
|
ie,
|
|
5562
5562
|
ae,
|
|
5563
|
-
|
|
5563
|
+
B
|
|
5564
5564
|
]);
|
|
5565
|
-
let
|
|
5565
|
+
let se = e.length > 1, ce = x.length > 0, le = !!i.timeZone && i.sharedTimeAxis, ue = p(() => $r(O.map((e) => ({
|
|
5566
5566
|
day: e.day,
|
|
5567
5567
|
bounds: e.bounds ?? i.bounds
|
|
5568
5568
|
})), i.slotLabelInterval, {
|
|
5569
5569
|
timeZone: i.timeZone,
|
|
5570
5570
|
locale: i.locale,
|
|
5571
5571
|
hour12: i.hour12
|
|
5572
|
-
}, i.bounds,
|
|
5572
|
+
}, i.bounds, le), [
|
|
5573
5573
|
O,
|
|
5574
5574
|
i.slotLabelInterval,
|
|
5575
5575
|
i.timeZone,
|
|
5576
5576
|
i.locale,
|
|
5577
5577
|
i.hour12,
|
|
5578
5578
|
i.bounds,
|
|
5579
|
-
|
|
5580
|
-
]),
|
|
5579
|
+
le
|
|
5580
|
+
]), V = ue.reference, H = ue.axes.map((e) => !!i.timeZone && (!le || !e.matchesReference)), U = V ? s(i.locale, { timeZoneName: "short" }).formatToParts(i.dates.dateAtMinutes(V.day, V.bounds.min)).find((e) => e.type === "timeZoneName")?.value : void 0, de = H.some(Boolean) ? Math.max(ce ? i.resourceMinWidth : 0, 180) : ce ? i.resourceMinWidth : 44, W = Math.max(...O.map((e) => (e.bounds?.max ?? b.max) - (e.bounds?.min ?? b.min))) * C, G = {
|
|
5581
5581
|
"--cal-hour": `${S}px`,
|
|
5582
5582
|
"--cal-offset": `${-(b.min % 60 * C)}px`,
|
|
5583
|
-
height:
|
|
5584
|
-
},
|
|
5585
|
-
for (let e = Math.ceil(
|
|
5586
|
-
let
|
|
5583
|
+
height: W
|
|
5584
|
+
}, fe = V?.bounds ?? b, pe = [], me = Math.max(5, i.slotLabelInterval);
|
|
5585
|
+
for (let e = Math.ceil(fe.min / me) * me; e < fe.max; e += me) e > fe.min && pe.push(e);
|
|
5586
|
+
let he = s(i.locale, { weekday: "short" }), ge = g(i.now), _e = i.nowIndicator, ve = N?.draft, ye = ve && (ve.target === "selection" ? ve.resourceId : ve.resourceIds), be = "";
|
|
5587
5587
|
if (P) {
|
|
5588
5588
|
let e = O[P.column];
|
|
5589
5589
|
if (e) {
|
|
5590
5590
|
let t = e.resourceId ? i.resourceById.get(e.resourceId) : void 0;
|
|
5591
|
-
|
|
5591
|
+
be = `${o(e.day, i.locale)}, ${i.timeZone ? Ar(i.dates.dateAtMinutes(e.day, P.start), i) : vr(P.start)} to ${i.timeZone ? Ar(i.dates.dateAtMinutes(e.day, P.end), i) : vr(P.end)}${t ? `, ${t.title}` : ""}`;
|
|
5592
5592
|
}
|
|
5593
5593
|
}
|
|
5594
5594
|
return /* @__PURE__ */ _("div", {
|
|
5595
5595
|
ref: w,
|
|
5596
5596
|
"data-cal-drag": N?.draft.action,
|
|
5597
5597
|
className: "ui-cal-scroll relative min-h-0 flex-1 overflow-auto",
|
|
5598
|
-
style: i.timeZone && !
|
|
5598
|
+
style: i.timeZone && !V ? { "--cal-gutter": "0px" } : void 0,
|
|
5599
5599
|
children: /* @__PURE__ */ v("div", {
|
|
5600
5600
|
className: "flex min-h-full flex-col",
|
|
5601
|
-
style: { minWidth: `calc(var(--cal-gutter) + ${O.length *
|
|
5601
|
+
style: { minWidth: `calc(var(--cal-gutter) + ${O.length * de}px)` },
|
|
5602
5602
|
children: [/* @__PURE__ */ v("div", {
|
|
5603
5603
|
className: "ui-cal-head border-border border-b",
|
|
5604
5604
|
children: [
|
|
5605
|
-
|
|
5605
|
+
se && /* @__PURE__ */ v("div", {
|
|
5606
5606
|
className: "flex",
|
|
5607
5607
|
children: [/* @__PURE__ */ _("div", {
|
|
5608
|
-
className:
|
|
5609
|
-
title:
|
|
5610
|
-
"aria-label":
|
|
5611
|
-
children:
|
|
5608
|
+
className: U ? "ui-cal-corner text-text-tertiary flex items-center justify-center text-2xs" : "ui-cal-corner",
|
|
5609
|
+
title: U ? i.timeZone : void 0,
|
|
5610
|
+
"aria-label": U ? i.timeZone : void 0,
|
|
5611
|
+
children: U
|
|
5612
5612
|
}), e.map((e) => /* @__PURE__ */ _(Ei, {
|
|
5613
5613
|
day: e,
|
|
5614
|
-
weekday:
|
|
5614
|
+
weekday: he.format(e),
|
|
5615
5615
|
isToday: d(e, i.now),
|
|
5616
|
-
grow:
|
|
5616
|
+
grow: ce ? x.length : 1,
|
|
5617
5617
|
onOpen: () => i.openDay(e),
|
|
5618
|
-
bordered:
|
|
5618
|
+
bordered: ce
|
|
5619
5619
|
}, y(e)))]
|
|
5620
5620
|
}),
|
|
5621
|
-
|
|
5621
|
+
ce && /* @__PURE__ */ v("div", {
|
|
5622
5622
|
className: "flex",
|
|
5623
5623
|
children: [/* @__PURE__ */ _("div", {
|
|
5624
|
-
className:
|
|
5625
|
-
title: !
|
|
5626
|
-
"aria-label": !
|
|
5627
|
-
children:
|
|
5624
|
+
className: U && !se ? "ui-cal-corner text-text-tertiary flex items-center justify-center text-2xs" : "ui-cal-corner",
|
|
5625
|
+
title: !se && U ? i.timeZone : void 0,
|
|
5626
|
+
"aria-label": !se && U ? i.timeZone : void 0,
|
|
5627
|
+
children: se ? void 0 : U
|
|
5628
5628
|
}), O.map((e, t) => /* @__PURE__ */ _(Di, {
|
|
5629
5629
|
resource: i.resourceById.get(e.resourceId ?? ""),
|
|
5630
5630
|
sub: t % x.length !== 0
|
|
@@ -5673,23 +5673,23 @@ function Ti({ days: e, events: t, availability: n, label: r }) {
|
|
|
5673
5673
|
className: "flex flex-1",
|
|
5674
5674
|
children: [/* @__PURE__ */ v("div", {
|
|
5675
5675
|
className: "ui-cal-gutter relative",
|
|
5676
|
-
style: { height:
|
|
5676
|
+
style: { height: W },
|
|
5677
5677
|
"aria-hidden": "true",
|
|
5678
5678
|
children: [
|
|
5679
|
-
|
|
5679
|
+
U && !se && !ce && /* @__PURE__ */ _("span", {
|
|
5680
5680
|
className: "text-text-tertiary absolute top-0 right-2 text-2xs",
|
|
5681
5681
|
"aria-hidden": "true",
|
|
5682
|
-
children:
|
|
5682
|
+
children: U
|
|
5683
5683
|
}),
|
|
5684
|
-
|
|
5685
|
-
let t = i.dates.parts(i.dates.dateAtMinutes(
|
|
5684
|
+
V && pe.map((e) => {
|
|
5685
|
+
let t = i.dates.parts(i.dates.dateAtMinutes(V.day, e));
|
|
5686
5686
|
return /* @__PURE__ */ _("span", {
|
|
5687
5687
|
className: "text-text-tertiary font-mono absolute right-2 -translate-y-1/2 text-2xs",
|
|
5688
|
-
style: { top: (e -
|
|
5688
|
+
style: { top: (e - V.bounds.min) * C },
|
|
5689
5689
|
children: Mr(t.hour * 60 + t.minute, i)
|
|
5690
5690
|
}, e);
|
|
5691
5691
|
}),
|
|
5692
|
-
!i.timeZone &&
|
|
5692
|
+
!i.timeZone && pe.map((e) => /* @__PURE__ */ _("span", {
|
|
5693
5693
|
className: "text-text-tertiary font-mono absolute right-2 -translate-y-1/2 text-2xs",
|
|
5694
5694
|
style: { top: (e - b.min) * C },
|
|
5695
5695
|
children: Mr(e, i)
|
|
@@ -5702,7 +5702,7 @@ function Ti({ days: e, events: t, availability: n, label: r }) {
|
|
|
5702
5702
|
"aria-describedby": T,
|
|
5703
5703
|
tabIndex: 0,
|
|
5704
5704
|
className: "ui-cal-lines ui-cal-surface relative flex flex-1 select-none focus-visible:outline-none",
|
|
5705
|
-
style:
|
|
5705
|
+
style: G,
|
|
5706
5706
|
onPointerDown: M.onPointerDown,
|
|
5707
5707
|
onFocus: M.onGridFocus,
|
|
5708
5708
|
onBlur: M.onGridBlur,
|
|
@@ -5716,17 +5716,17 @@ function Ti({ days: e, events: t, availability: n, label: r }) {
|
|
|
5716
5716
|
/* @__PURE__ */ _("span", {
|
|
5717
5717
|
className: "sr-only",
|
|
5718
5718
|
"aria-live": "polite",
|
|
5719
|
-
children:
|
|
5719
|
+
children: be
|
|
5720
5720
|
}),
|
|
5721
5721
|
O.map((e, t) => {
|
|
5722
|
-
let n = I[t], r = e.bounds ?? i.bounds, o =
|
|
5722
|
+
let n = I[t], r = e.bounds ?? i.bounds, o = H[t] ? 72 : 0, s = H[t] ? ue.axes[t].minutes : [], c = d(e.day, i.now), l = ce && t % x.length !== 0;
|
|
5723
5723
|
return /* @__PURE__ */ v("div", {
|
|
5724
5724
|
"data-cal-col": t,
|
|
5725
5725
|
"data-today": c || void 0,
|
|
5726
5726
|
"data-subcol": l || void 0,
|
|
5727
5727
|
className: "ui-cal-col flex-1",
|
|
5728
5728
|
style: {
|
|
5729
|
-
minWidth:
|
|
5729
|
+
minWidth: de,
|
|
5730
5730
|
height: (r.max - r.min) * C
|
|
5731
5731
|
},
|
|
5732
5732
|
children: [
|
|
@@ -5767,7 +5767,7 @@ function Ti({ days: e, events: t, availability: n, label: r }) {
|
|
|
5767
5767
|
}),
|
|
5768
5768
|
/* @__PURE__ */ _("div", {
|
|
5769
5769
|
style: o ? { left: o } : void 0,
|
|
5770
|
-
className:
|
|
5770
|
+
className: K("absolute inset-0", F && "ui-cal-muted-layer"),
|
|
5771
5771
|
children: n.placed.map((e) => {
|
|
5772
5772
|
let a = n.layout.get(e.item.id), o = Math.max((e.end - e.start) * C, xi);
|
|
5773
5773
|
return /* @__PURE__ */ _(li, {
|
|
@@ -5802,16 +5802,16 @@ function Ti({ days: e, events: t, availability: n, label: r }) {
|
|
|
5802
5802
|
"data-cal-ignore": !0,
|
|
5803
5803
|
children: i.labels.later(n.later)
|
|
5804
5804
|
}),
|
|
5805
|
-
c &&
|
|
5805
|
+
c && _e && ge >= r.min && ge <= r.max && /* @__PURE__ */ _("div", {
|
|
5806
5806
|
className: "ui-cal-now",
|
|
5807
5807
|
"data-axis": "y",
|
|
5808
5808
|
"data-dot": !l || void 0,
|
|
5809
|
-
style: { top: (
|
|
5809
|
+
style: { top: (ge - r.min) * C }
|
|
5810
5810
|
}),
|
|
5811
|
-
|
|
5812
|
-
let t = wi(
|
|
5811
|
+
ve && Hr(ye, e.resourceId, { emptyMatchesAll: !0 }) && (() => {
|
|
5812
|
+
let t = wi(ve, e.day, r.min, r.max, a);
|
|
5813
5813
|
return !t || typeof t != "object" ? null : /* @__PURE__ */ _(fi, {
|
|
5814
|
-
draft:
|
|
5814
|
+
draft: ve,
|
|
5815
5815
|
invalid: N?.invalid,
|
|
5816
5816
|
style: {
|
|
5817
5817
|
top: (t.start - r.min) * C + 1,
|
|
@@ -5843,7 +5843,7 @@ function Ti({ days: e, events: t, availability: n, label: r }) {
|
|
|
5843
5843
|
function Ei({ day: e, weekday: t, isToday: n, grow: r, bordered: i, onOpen: a }) {
|
|
5844
5844
|
let o = ti();
|
|
5845
5845
|
return /* @__PURE__ */ _("div", {
|
|
5846
|
-
className:
|
|
5846
|
+
className: K("flex min-w-0 items-center justify-center py-1.5", i && "border-border border-l"),
|
|
5847
5847
|
style: { flex: `${r} 1 0` },
|
|
5848
5848
|
children: /* @__PURE__ */ v("button", {
|
|
5849
5849
|
type: "button",
|
|
@@ -5852,10 +5852,10 @@ function Ei({ day: e, weekday: t, isToday: n, grow: r, bordered: i, onOpen: a })
|
|
|
5852
5852
|
"aria-current": n ? "date" : void 0,
|
|
5853
5853
|
className: "hover:bg-bg-hover flex cursor-pointer items-center gap-1.5 rounded-md px-1.5 py-0.5 transition-colors duration-[100ms]",
|
|
5854
5854
|
children: [/* @__PURE__ */ _("span", {
|
|
5855
|
-
className:
|
|
5855
|
+
className: K("text-2xs font-medium uppercase", n ? "text-accent" : "text-text-tertiary"),
|
|
5856
5856
|
children: t
|
|
5857
5857
|
}), /* @__PURE__ */ _("span", {
|
|
5858
|
-
className:
|
|
5858
|
+
className: K("flex h-6 w-6 items-center justify-center rounded-full text-sm font-semibold", n ? "bg-accent text-text-on-accent" : "text-text-primary"),
|
|
5859
5859
|
children: o.dates.parts(e).day
|
|
5860
5860
|
})]
|
|
5861
5861
|
})
|
|
@@ -5864,11 +5864,11 @@ function Ei({ day: e, weekday: t, isToday: n, grow: r, bordered: i, onOpen: a })
|
|
|
5864
5864
|
function Di({ resource: e, sub: t }) {
|
|
5865
5865
|
let n = ti();
|
|
5866
5866
|
return /* @__PURE__ */ v("div", {
|
|
5867
|
-
className:
|
|
5867
|
+
className: K("border-border flex min-w-0 flex-1 items-center gap-1.5 border-l px-2 py-1.5", t && "ui-cal-subhead"),
|
|
5868
5868
|
style: { minWidth: n.resourceMinWidth },
|
|
5869
5869
|
title: e?.title,
|
|
5870
5870
|
children: [e?.color && /* @__PURE__ */ _("span", {
|
|
5871
|
-
className:
|
|
5871
|
+
className: K("ui-cal-dot", `ui-cal-c-${e.color}`),
|
|
5872
5872
|
"aria-hidden": "true"
|
|
5873
5873
|
}), /* @__PURE__ */ v("span", {
|
|
5874
5874
|
className: "min-w-0",
|
|
@@ -5986,12 +5986,12 @@ function Mi({ day: e, events: t, availability: n, label: r }) {
|
|
|
5986
5986
|
let ne = s(i.now), re = i.nowIndicator && o(e, i.now) && ne >= c.min && ne <= c.max, z = M?.draft, ie = z && (z.target === "selection" ? z.resourceId : z.resourceIds), ae = {
|
|
5987
5987
|
"--cal-hour": `${x}px`,
|
|
5988
5988
|
"--cal-offset": `${-(c.min % 60 * S)}px`
|
|
5989
|
-
},
|
|
5989
|
+
}, B = "";
|
|
5990
5990
|
if (N) {
|
|
5991
5991
|
let t = k[N.column], n = t?.resourceId ? i.resourceById.get(t.resourceId) : void 0;
|
|
5992
|
-
|
|
5992
|
+
B = `${n ? `${n.title}, ` : ""}${i.timeZone ? Ar(i.dates.dateAtMinutes(e, N.start), i) : vr(N.start)} to ${i.timeZone ? Ar(i.dates.dateAtMinutes(e, N.end), i) : vr(N.end)}`;
|
|
5993
5993
|
}
|
|
5994
|
-
function
|
|
5994
|
+
function oe(e) {
|
|
5995
5995
|
E((t) => {
|
|
5996
5996
|
let n = new Set(t);
|
|
5997
5997
|
return n.has(e) ? n.delete(e) : n.add(e), n;
|
|
@@ -6001,7 +6001,7 @@ function Mi({ day: e, events: t, availability: n, label: r }) {
|
|
|
6001
6001
|
className: "text-text-tertiary flex flex-1 items-center justify-center p-6 text-xs",
|
|
6002
6002
|
children: i.labels.noResources
|
|
6003
6003
|
});
|
|
6004
|
-
let
|
|
6004
|
+
let se = 0;
|
|
6005
6005
|
return /* @__PURE__ */ _("div", {
|
|
6006
6006
|
ref: d,
|
|
6007
6007
|
"data-cal-drag": M?.draft.action,
|
|
@@ -6040,7 +6040,7 @@ function Mi({ day: e, events: t, availability: n, label: r }) {
|
|
|
6040
6040
|
/* @__PURE__ */ _("span", {
|
|
6041
6041
|
className: "sr-only",
|
|
6042
6042
|
"aria-live": "polite",
|
|
6043
|
-
children:
|
|
6043
|
+
children: B
|
|
6044
6044
|
}),
|
|
6045
6045
|
D.map((t) => {
|
|
6046
6046
|
let n = t.name !== void 0 && T.has(t.name);
|
|
@@ -6050,7 +6050,7 @@ function Mi({ day: e, events: t, availability: n, label: r }) {
|
|
|
6050
6050
|
type: "button",
|
|
6051
6051
|
className: "ui-cal-group text-text-secondary hover:text-text-primary flex cursor-pointer items-center gap-1 px-2 py-1 text-2xs font-semibold uppercase transition-colors duration-[100ms]",
|
|
6052
6052
|
"aria-expanded": !n,
|
|
6053
|
-
onClick: () =>
|
|
6053
|
+
onClick: () => oe(t.name),
|
|
6054
6054
|
children: [
|
|
6055
6055
|
_(n ? A : O, { className: "h-3 w-3" }),
|
|
6056
6056
|
t.name,
|
|
@@ -6061,7 +6061,7 @@ function Mi({ day: e, events: t, availability: n, label: r }) {
|
|
|
6061
6061
|
]
|
|
6062
6062
|
})
|
|
6063
6063
|
}), !n && t.resources.map((t) => {
|
|
6064
|
-
let n =
|
|
6064
|
+
let n = se++, r = F[n], o = k[n];
|
|
6065
6065
|
if (!r || !o) return null;
|
|
6066
6066
|
let s = r.laneCount * Oi + ki * 2;
|
|
6067
6067
|
return /* @__PURE__ */ v("div", {
|
|
@@ -6070,7 +6070,7 @@ function Mi({ day: e, events: t, availability: n, label: r }) {
|
|
|
6070
6070
|
className: "ui-cal-row-head flex items-center gap-1.5 px-2",
|
|
6071
6071
|
title: t.title,
|
|
6072
6072
|
children: [t.color && /* @__PURE__ */ _("span", {
|
|
6073
|
-
className:
|
|
6073
|
+
className: K("ui-cal-dot", `ui-cal-c-${t.color}`),
|
|
6074
6074
|
"aria-hidden": "true"
|
|
6075
6075
|
}), /* @__PURE__ */ v("span", {
|
|
6076
6076
|
className: "min-w-0",
|
|
@@ -6121,7 +6121,7 @@ function Mi({ day: e, events: t, availability: n, label: r }) {
|
|
|
6121
6121
|
}, e.item.id);
|
|
6122
6122
|
}),
|
|
6123
6123
|
/* @__PURE__ */ _("div", {
|
|
6124
|
-
className:
|
|
6124
|
+
className: K("absolute inset-0", P && "ui-cal-muted-layer"),
|
|
6125
6125
|
children: r.placed.map((e) => {
|
|
6126
6126
|
let t = r.lanes.lanes.get(e.item.id) ?? 0;
|
|
6127
6127
|
return /* @__PURE__ */ _(li, {
|
|
@@ -6227,13 +6227,13 @@ function Pi({ options: e, value: t, onChange: n, disabled: r, className: i, "ari
|
|
|
6227
6227
|
return /* @__PURE__ */ _("div", {
|
|
6228
6228
|
role: "radiogroup",
|
|
6229
6229
|
"aria-label": a,
|
|
6230
|
-
className:
|
|
6230
|
+
className: K("border-border inline-flex overflow-hidden rounded-md border", r && "cursor-not-allowed opacity-40", i),
|
|
6231
6231
|
children: e.map((e) => /* @__PURE__ */ _("button", {
|
|
6232
6232
|
role: "radio",
|
|
6233
6233
|
"aria-checked": e.value === t,
|
|
6234
6234
|
disabled: r,
|
|
6235
6235
|
onClick: () => n(e.value),
|
|
6236
|
-
className:
|
|
6236
|
+
className: K("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"),
|
|
6237
6237
|
children: e.label
|
|
6238
6238
|
}, e.value))
|
|
6239
6239
|
});
|
|
@@ -6284,23 +6284,23 @@ function Vi(e, t, n) {
|
|
|
6284
6284
|
return Bi(`Invalid ${e} "${t}", expected HH:mm; using the default.`), n;
|
|
6285
6285
|
}
|
|
6286
6286
|
}
|
|
6287
|
-
function Hi({ events: e = [], availability: t, resources: n = [], view: r, defaultView: i = "week", onViewChange: a, views: o = Fi, date: s, defaultDate: c, onDateChange: d, onRangeChange: g, weekStartsOn: y = 1, workWeekDays: b, agendaDays: x = 7, slotMinTime: S = "07:00", slotMaxTime: C = "20:00", slotDuration: w = 15, slotLabelInterval: T = 60, sharedTimeAxis: E = !1, hourHeight: D = 48, timelineHourWidth: O = 96, resourceMinWidth: j = 120, scrollToTime: M, scrollAlign: N = "start", now: P, nowIndicator: F = !0, editLayer: I = "events", readOnly: L = !1, selectable:
|
|
6288
|
-
let
|
|
6289
|
-
r === void 0 &&
|
|
6290
|
-
},
|
|
6291
|
-
s === void 0 &&
|
|
6292
|
-
},
|
|
6287
|
+
function Hi({ events: e = [], availability: t, resources: n = [], view: r, defaultView: i = "week", onViewChange: a, views: o = Fi, date: s, defaultDate: c, onDateChange: d, onRangeChange: g, weekStartsOn: y = 1, workWeekDays: b, agendaDays: x = 7, slotMinTime: S = "07:00", slotMaxTime: C = "20:00", slotDuration: w = 15, slotLabelInterval: T = 60, sharedTimeAxis: E = !1, hourHeight: D = 48, timelineHourWidth: O = 96, resourceMinWidth: j = 120, scrollToTime: M, scrollAlign: N = "start", now: P, nowIndicator: F = !0, editLayer: I = "events", readOnly: L = !1, selectable: R, clickCreateDuration: te = 30, shadeOutsideAvailability: ne = !0, onCreate: re, onEventClick: z, onEventChange: ie, onAvailabilityClick: ae, onAvailabilityChange: B, validate: oe, onInvalidChange: se, onDateClick: ce, renderEvent: le, monthMaxEvents: ue, agendaShowAvailability: V = !0, display: H, narrowView: U = "day", narrowWidth: de = 640, locale: W = "en-GB", timeZone: G, hour12: fe = !1, labels: pe, toolbar: me = !0, toolbarActions: he, loading: ge = !1, className: _e, "aria-label": ve }) {
|
|
6288
|
+
let ye = p(() => Qr(G), [G]), { addDays: be, formatLongDate: xe, formatRangeTitle: Se, getVisibleDays: Ce, minutesOfDay: we, shiftDate: Te } = ye, Ee = m(null), De = u(), Oe = Li(P), ke = Ri(Ee), [Ae, je] = h(i), [Me, Ne] = h(() => c ?? Ii()), Pe = r ?? Ae, Fe = s ?? Me, Ie = (e) => {
|
|
6289
|
+
r === void 0 && je(e), a?.(e);
|
|
6290
|
+
}, q = (e) => {
|
|
6291
|
+
s === void 0 && Ne(e), d?.(e);
|
|
6292
|
+
}, Le = ke !== null && ke < de && U !== !1 && Cr(Pe) && Pe !== "day" && U ? U : Pe, Re = p(() => ({
|
|
6293
6293
|
...Ni,
|
|
6294
|
-
...
|
|
6294
|
+
...pe,
|
|
6295
6295
|
views: {
|
|
6296
6296
|
...Ni.views,
|
|
6297
|
-
...
|
|
6297
|
+
...pe?.views
|
|
6298
6298
|
},
|
|
6299
6299
|
status: {
|
|
6300
6300
|
...Ni.status,
|
|
6301
|
-
...
|
|
6301
|
+
...pe?.status
|
|
6302
6302
|
}
|
|
6303
|
-
}), [
|
|
6303
|
+
}), [pe]), ze = p(() => ({
|
|
6304
6304
|
weekStartsOn: y,
|
|
6305
6305
|
workWeekDays: b,
|
|
6306
6306
|
agendaDays: x
|
|
@@ -6308,24 +6308,24 @@ function Hi({ events: e = [], availability: t, resources: n = [], view: r, defau
|
|
|
6308
6308
|
y,
|
|
6309
6309
|
b,
|
|
6310
6310
|
x
|
|
6311
|
-
]), Be =
|
|
6312
|
-
|
|
6311
|
+
]), Be = Fe.getTime(), Ve = p(() => Ce(Le, new Date(Be), ze), [
|
|
6312
|
+
Le,
|
|
6313
6313
|
Be,
|
|
6314
6314
|
ze,
|
|
6315
|
-
|
|
6316
|
-
]), J = Ve[0], He =
|
|
6315
|
+
Ce
|
|
6316
|
+
]), J = Ve[0], He = be(Ve[Ve.length - 1], 1), Ue = J.getTime(), We = He.getTime(), Ge = m(g);
|
|
6317
6317
|
f(() => {
|
|
6318
6318
|
Ge.current = g;
|
|
6319
6319
|
}), l(() => {
|
|
6320
6320
|
Ge.current?.({
|
|
6321
6321
|
start: new Date(Ue),
|
|
6322
6322
|
end: new Date(We),
|
|
6323
|
-
view:
|
|
6323
|
+
view: Le
|
|
6324
6324
|
});
|
|
6325
6325
|
}, [
|
|
6326
6326
|
Ue,
|
|
6327
6327
|
We,
|
|
6328
|
-
|
|
6328
|
+
Le
|
|
6329
6329
|
]);
|
|
6330
6330
|
let Ke = p(() => e.filter((e) => Fr(e.start.getTime(), Math.max(e.end.getTime(), e.start.getTime() + 1), Ue, We)), [
|
|
6331
6331
|
e,
|
|
@@ -6346,34 +6346,34 @@ function Hi({ events: e = [], availability: t, resources: n = [], view: r, defau
|
|
|
6346
6346
|
}, [Je, Ye]), Ze = Math.max(1, Math.round(w)), Qe;
|
|
6347
6347
|
if (M) Qe = Vi("scrollToTime", M, Xe.min);
|
|
6348
6348
|
else {
|
|
6349
|
-
let e = qe.filter((e) => (e.kind ?? "available") === "available").map((e) =>
|
|
6349
|
+
let e = qe.filter((e) => (e.kind ?? "available") === "available").map((e) => G ? ye.parts(e.start).hour * 60 + ye.parts(e.start).minute : we(e.start)).filter((e) => e >= Xe.min && e < Xe.max);
|
|
6350
6350
|
e.length && (Qe = Math.min(...e));
|
|
6351
6351
|
}
|
|
6352
|
-
let Y = p(() => new Map(n.map((e) => [e.id, e])), [n]), $e =
|
|
6352
|
+
let Y = p(() => new Map(n.map((e) => [e.id, e])), [n]), $e = Se(Le, Fe, {
|
|
6353
6353
|
...ze,
|
|
6354
|
-
locale:
|
|
6354
|
+
locale: W
|
|
6355
6355
|
}), et = {
|
|
6356
|
-
locale:
|
|
6357
|
-
hour12:
|
|
6358
|
-
timeZone:
|
|
6356
|
+
locale: W,
|
|
6357
|
+
hour12: fe,
|
|
6358
|
+
timeZone: G
|
|
6359
6359
|
}, tt = (e) => Y.get(Vr(e)[0] ?? ""), nt = (e) => {
|
|
6360
6360
|
let t = Vr(e).map((e) => Y.get(e)?.title).filter(Boolean);
|
|
6361
6361
|
return t.length ? `, ${t.join(", ")}` : "";
|
|
6362
6362
|
}, rt = (e) => e.status && e.status !== "confirmed" ? Re.status[e.status] : void 0, it = (e) => {
|
|
6363
|
-
let t =
|
|
6363
|
+
let t = oe?.(e);
|
|
6364
6364
|
return typeof t == "string" && t ? t : void 0;
|
|
6365
6365
|
}, at = {
|
|
6366
|
-
view:
|
|
6367
|
-
dates:
|
|
6368
|
-
timeZone:
|
|
6369
|
-
dayBounds: (e) =>
|
|
6370
|
-
locale:
|
|
6371
|
-
hour12:
|
|
6366
|
+
view: Le,
|
|
6367
|
+
dates: ye,
|
|
6368
|
+
timeZone: G,
|
|
6369
|
+
dayBounds: (e) => ye.dayBounds(e, Xe),
|
|
6370
|
+
locale: W,
|
|
6371
|
+
hour12: fe,
|
|
6372
6372
|
weekStartsOn: y,
|
|
6373
|
-
now:
|
|
6373
|
+
now: Oe,
|
|
6374
6374
|
nowIndicator: F,
|
|
6375
6375
|
labels: Re,
|
|
6376
|
-
itemHelpId:
|
|
6376
|
+
itemHelpId: De,
|
|
6377
6377
|
resources: n,
|
|
6378
6378
|
resourceById: Y,
|
|
6379
6379
|
step: Ze,
|
|
@@ -6384,29 +6384,29 @@ function Hi({ events: e = [], availability: t, resources: n = [], view: r, defau
|
|
|
6384
6384
|
timelineHourWidth: O,
|
|
6385
6385
|
resourceMinWidth: j,
|
|
6386
6386
|
editLayer: I,
|
|
6387
|
-
selectable: !L && !!re && (
|
|
6387
|
+
selectable: !L && !!re && (R ?? !0),
|
|
6388
6388
|
clickCreateDuration: te,
|
|
6389
6389
|
hasAvailability: t !== void 0,
|
|
6390
6390
|
shadeOutsideAvailability: ne,
|
|
6391
|
-
monthMaxEvents:
|
|
6392
|
-
agendaShowAvailability:
|
|
6391
|
+
monthMaxEvents: ue,
|
|
6392
|
+
agendaShowAvailability: V,
|
|
6393
6393
|
display: {
|
|
6394
|
-
time:
|
|
6395
|
-
description:
|
|
6396
|
-
status:
|
|
6397
|
-
badge:
|
|
6398
|
-
blockLabels:
|
|
6399
|
-
availableBlocks:
|
|
6394
|
+
time: H?.time ?? !0,
|
|
6395
|
+
description: H?.description ?? !0,
|
|
6396
|
+
status: H?.status ?? !0,
|
|
6397
|
+
badge: H?.badge ?? !0,
|
|
6398
|
+
blockLabels: H?.blockLabels ?? !0,
|
|
6399
|
+
availableBlocks: H?.availableBlocks ?? !0
|
|
6400
6400
|
},
|
|
6401
6401
|
scrollToMinute: Qe,
|
|
6402
6402
|
scrollAlign: N,
|
|
6403
6403
|
canEditEvent: (e) => !e.placeholder && !L && !!ie && I === "events" && (e.editable ?? e.status !== "cancelled"),
|
|
6404
|
-
canEditBlock: (e) => !e.placeholder && !L && !!
|
|
6404
|
+
canEditBlock: (e) => !e.placeholder && !L && !!B && I === "availability" && e.editable !== !1,
|
|
6405
6405
|
eventColor: (e) => e.color ?? tt(e.resourceId)?.color ?? "accent",
|
|
6406
6406
|
blockColor: (e) => e.color ?? tt(e.resourceId)?.color ?? ((e.kind ?? "available") === "available" ? "green" : "gray"),
|
|
6407
6407
|
statusLabel: rt,
|
|
6408
6408
|
describeEvent: (e) => {
|
|
6409
|
-
let t = e.allDay ? `${
|
|
6409
|
+
let t = e.allDay ? `${xe(e.start, W)}, ${Re.allDay}` : `${xe(e.start, W)}, ${jr(e.start, e.end, et)}`, n = rt(e);
|
|
6410
6410
|
return [
|
|
6411
6411
|
e.title,
|
|
6412
6412
|
t,
|
|
@@ -6418,9 +6418,9 @@ function Hi({ events: e = [], availability: t, resources: n = [], view: r, defau
|
|
|
6418
6418
|
describeBlock: (e) => [
|
|
6419
6419
|
(e.kind ?? "available") === "available" ? Re.available : Re.unavailable,
|
|
6420
6420
|
e.label,
|
|
6421
|
-
`${
|
|
6421
|
+
`${xe(e.start, W)}, ${jr(e.start, e.end, et)}`
|
|
6422
6422
|
].filter(Boolean).join(", ").concat(nt(e.resourceId)),
|
|
6423
|
-
renderEvent:
|
|
6423
|
+
renderEvent: le,
|
|
6424
6424
|
hasEventClick: !!z,
|
|
6425
6425
|
hasBlockClick: !!ae,
|
|
6426
6426
|
clickEvent: (e) => z?.(e),
|
|
@@ -6428,7 +6428,7 @@ function Hi({ events: e = [], availability: t, resources: n = [], view: r, defau
|
|
|
6428
6428
|
check: it,
|
|
6429
6429
|
commit: (e, t) => {
|
|
6430
6430
|
let n = it(e);
|
|
6431
|
-
if (n) return
|
|
6431
|
+
if (n) return se?.(e, n), !1;
|
|
6432
6432
|
if (e.target === "selection") re?.({
|
|
6433
6433
|
start: e.start,
|
|
6434
6434
|
end: e.end,
|
|
@@ -6441,39 +6441,39 @@ function Hi({ events: e = [], availability: t, resources: n = [], view: r, defau
|
|
|
6441
6441
|
...e,
|
|
6442
6442
|
source: t
|
|
6443
6443
|
};
|
|
6444
|
-
delete n.target, e.target === "event" ? ie?.(n) :
|
|
6444
|
+
delete n.target, e.target === "event" ? ie?.(n) : B?.(n);
|
|
6445
6445
|
}
|
|
6446
6446
|
return !0;
|
|
6447
6447
|
},
|
|
6448
6448
|
openDay: (e) => {
|
|
6449
|
-
if (
|
|
6450
|
-
|
|
6449
|
+
if (ce) {
|
|
6450
|
+
ce(e);
|
|
6451
6451
|
return;
|
|
6452
6452
|
}
|
|
6453
|
-
|
|
6453
|
+
q(e), Le !== "day" && Le !== "timeline" && Ie("day");
|
|
6454
6454
|
}
|
|
6455
6455
|
}, ot = o.map((e) => ({
|
|
6456
6456
|
value: e,
|
|
6457
6457
|
label: Re.views[e]
|
|
6458
|
-
})), X =
|
|
6459
|
-
|
|
6458
|
+
})), X = ve ?? $e, st = JSON.stringify([
|
|
6459
|
+
G,
|
|
6460
6460
|
Ve.map((e) => e.getTime()),
|
|
6461
6461
|
Xe.min,
|
|
6462
6462
|
Xe.max,
|
|
6463
6463
|
Ze,
|
|
6464
6464
|
n.map((e) => e.id)
|
|
6465
6465
|
]), ct;
|
|
6466
|
-
return ct =
|
|
6467
|
-
date:
|
|
6466
|
+
return ct = Le === "month" ? /* @__PURE__ */ _(ci, {
|
|
6467
|
+
date: Fe,
|
|
6468
6468
|
events: Ke,
|
|
6469
6469
|
availability: qe,
|
|
6470
6470
|
label: X
|
|
6471
|
-
},
|
|
6471
|
+
}, G) : Le === "agenda" ? /* @__PURE__ */ _(ni, {
|
|
6472
6472
|
days: Ve,
|
|
6473
6473
|
events: Ke.filter((e) => !e.placeholder),
|
|
6474
6474
|
availability: qe.filter((e) => !e.placeholder),
|
|
6475
6475
|
label: X
|
|
6476
|
-
},
|
|
6476
|
+
}, G) : Le === "timeline" ? /* @__PURE__ */ _(Mi, {
|
|
6477
6477
|
day: Ve[0],
|
|
6478
6478
|
events: Ke,
|
|
6479
6479
|
availability: qe,
|
|
@@ -6486,32 +6486,32 @@ function Hi({ events: e = [], availability: t, resources: n = [], view: r, defau
|
|
|
6486
6486
|
}, st), /* @__PURE__ */ _(ei.Provider, {
|
|
6487
6487
|
value: at,
|
|
6488
6488
|
children: /* @__PURE__ */ v("div", {
|
|
6489
|
-
ref:
|
|
6490
|
-
"data-time-zone":
|
|
6491
|
-
"data-shared-axis": E &&
|
|
6489
|
+
ref: Ee,
|
|
6490
|
+
"data-time-zone": G,
|
|
6491
|
+
"data-shared-axis": E && G && [
|
|
6492
6492
|
"day",
|
|
6493
6493
|
"threeDay",
|
|
6494
6494
|
"workWeek",
|
|
6495
6495
|
"week"
|
|
6496
|
-
].includes(
|
|
6496
|
+
].includes(Le) ? !0 : void 0,
|
|
6497
6497
|
role: "region",
|
|
6498
|
-
"aria-label":
|
|
6499
|
-
"aria-busy":
|
|
6500
|
-
className:
|
|
6498
|
+
"aria-label": ve ?? $e,
|
|
6499
|
+
"aria-busy": ge || void 0,
|
|
6500
|
+
className: K("ui-cal relative flex h-full min-h-0 flex-col overflow-hidden", _e),
|
|
6501
6501
|
children: [
|
|
6502
6502
|
/* @__PURE__ */ _("span", {
|
|
6503
|
-
id:
|
|
6503
|
+
id: De,
|
|
6504
6504
|
className: "sr-only",
|
|
6505
6505
|
children: Re.itemHelp
|
|
6506
6506
|
}),
|
|
6507
|
-
|
|
6507
|
+
me && /* @__PURE__ */ v("div", {
|
|
6508
6508
|
className: "ui-cal-noprint border-border flex flex-wrap items-center justify-between gap-2 border-b px-3 py-2",
|
|
6509
6509
|
children: [/* @__PURE__ */ v("div", {
|
|
6510
6510
|
className: "flex min-w-0 items-center gap-2",
|
|
6511
6511
|
children: [
|
|
6512
6512
|
/* @__PURE__ */ _(mn, {
|
|
6513
6513
|
size: "sm",
|
|
6514
|
-
onClick: () =>
|
|
6514
|
+
onClick: () => q(Oe),
|
|
6515
6515
|
children: Re.today
|
|
6516
6516
|
}),
|
|
6517
6517
|
/* @__PURE__ */ v("div", {
|
|
@@ -6521,13 +6521,13 @@ function Hi({ events: e = [], availability: t, resources: n = [], view: r, defau
|
|
|
6521
6521
|
size: "sm",
|
|
6522
6522
|
icon: k,
|
|
6523
6523
|
"aria-label": Re.previous,
|
|
6524
|
-
onClick: () =>
|
|
6524
|
+
onClick: () => q(Te(Le, Fe, -1, ze))
|
|
6525
6525
|
}), /* @__PURE__ */ _(mn, {
|
|
6526
6526
|
variant: "icon",
|
|
6527
6527
|
size: "sm",
|
|
6528
6528
|
icon: A,
|
|
6529
6529
|
"aria-label": Re.next,
|
|
6530
|
-
onClick: () =>
|
|
6530
|
+
onClick: () => q(Te(Le, Fe, 1, ze))
|
|
6531
6531
|
})]
|
|
6532
6532
|
}),
|
|
6533
6533
|
/* @__PURE__ */ _("h2", {
|
|
@@ -6538,25 +6538,25 @@ function Hi({ events: e = [], availability: t, resources: n = [], view: r, defau
|
|
|
6538
6538
|
]
|
|
6539
6539
|
}), /* @__PURE__ */ v("div", {
|
|
6540
6540
|
className: "flex items-center gap-1.5",
|
|
6541
|
-
children: [
|
|
6541
|
+
children: [he, o.length > 1 && (ke === null || ke >= o.length * 80 + 420 ? /* @__PURE__ */ _(Pi, {
|
|
6542
6542
|
"aria-label": Re.view,
|
|
6543
6543
|
options: ot,
|
|
6544
|
-
value:
|
|
6545
|
-
onChange:
|
|
6544
|
+
value: Pe,
|
|
6545
|
+
onChange: Ie
|
|
6546
6546
|
}) : /* @__PURE__ */ _(Cn, {
|
|
6547
6547
|
className: "w-28",
|
|
6548
6548
|
size: "sm",
|
|
6549
6549
|
options: ot,
|
|
6550
|
-
value:
|
|
6551
|
-
onChange: (e) =>
|
|
6550
|
+
value: Pe,
|
|
6551
|
+
onChange: (e) => Ie(e)
|
|
6552
6552
|
}))]
|
|
6553
6553
|
})]
|
|
6554
6554
|
}),
|
|
6555
6555
|
ct,
|
|
6556
|
-
|
|
6556
|
+
ge && /* @__PURE__ */ v("div", {
|
|
6557
6557
|
className: "ui-cal-loading",
|
|
6558
6558
|
role: "status",
|
|
6559
|
-
children: [/* @__PURE__ */ _(
|
|
6559
|
+
children: [/* @__PURE__ */ _(ee, { className: "text-accent h-6 w-6 animate-spin" }), /* @__PURE__ */ _("span", {
|
|
6560
6560
|
className: "sr-only",
|
|
6561
6561
|
children: Re.loading
|
|
6562
6562
|
})]
|
|
@@ -6698,7 +6698,7 @@ function Yi({ year: e, month: t, timeZone: n, selected: r, rangeStart: i, rangeE
|
|
|
6698
6698
|
onKeyDown: (e) => w(e, c),
|
|
6699
6699
|
onMouseEnter: () => l?.(p),
|
|
6700
6700
|
onMouseLeave: () => l?.(null),
|
|
6701
|
-
className:
|
|
6701
|
+
className: K("flex h-8 w-full cursor-pointer items-center justify-center text-xs transition-colors duration-[100ms]", "rounded-md", x && "cursor-not-allowed opacity-30", !x && !h && !v && !y && !b && "hover:bg-bg-hover text-text-primary", m && !h && !v && !y && "text-accent font-semibold", (h || v || y) && "bg-accent text-text-on-accent font-semibold", b && !h && !v && !y && "bg-accent-muted text-accent"),
|
|
6702
6702
|
children: c
|
|
6703
6703
|
}, c);
|
|
6704
6704
|
})]
|
|
@@ -6711,7 +6711,7 @@ function Xi({ children: e, className: t, header: n, footer: r, as: i = "div", fl
|
|
|
6711
6711
|
let c = sn();
|
|
6712
6712
|
return /* @__PURE__ */ v(i, {
|
|
6713
6713
|
...s,
|
|
6714
|
-
className:
|
|
6714
|
+
className: K("bg-bg-secondary border-border overflow-hidden rounded-md border", t),
|
|
6715
6715
|
children: [
|
|
6716
6716
|
n && /* @__PURE__ */ _("div", {
|
|
6717
6717
|
"data-control-size": c,
|
|
@@ -6719,7 +6719,7 @@ function Xi({ children: e, className: t, header: n, footer: r, as: i = "div", fl
|
|
|
6719
6719
|
children: n
|
|
6720
6720
|
}),
|
|
6721
6721
|
/* @__PURE__ */ _("div", {
|
|
6722
|
-
className:
|
|
6722
|
+
className: K(!a && "ui-surface-body p-3", o),
|
|
6723
6723
|
children: e
|
|
6724
6724
|
}),
|
|
6725
6725
|
r && /* @__PURE__ */ _("div", {
|
|
@@ -6805,7 +6805,7 @@ function na({ value: e, onChange: t, onComplete: n, length: r = 6, error: i, inv
|
|
|
6805
6805
|
t.key === "Backspace" ? (t.preventDefault(), w(ta(y, e))) : t.key === "ArrowLeft" ? (t.preventDefault(), C(e - 1)) : t.key === "ArrowRight" && (t.preventDefault(), C(e + 1));
|
|
6806
6806
|
}
|
|
6807
6807
|
return /* @__PURE__ */ v("div", {
|
|
6808
|
-
className:
|
|
6808
|
+
className: K("flex flex-col gap-1.5", d),
|
|
6809
6809
|
children: [
|
|
6810
6810
|
/* @__PURE__ */ _("div", {
|
|
6811
6811
|
role: "group",
|
|
@@ -6830,7 +6830,7 @@ function na({ value: e, onChange: t, onComplete: n, length: r = 6, error: i, inv
|
|
|
6830
6830
|
onPaste: (e) => {
|
|
6831
6831
|
e.preventDefault(), w($i(y, t, e.clipboardData.getData("text")));
|
|
6832
6832
|
},
|
|
6833
|
-
className:
|
|
6833
|
+
className: K("bg-bg-secondary text-text-primary h-10 w-10 rounded-md border text-center font-mono text-sm", "transition-colors duration-[100ms]", "focus:border-accent focus:outline-none", "disabled:cursor-not-allowed disabled:opacity-40", g ? "border-red" : "border-border")
|
|
6834
6834
|
}, t))
|
|
6835
6835
|
}),
|
|
6836
6836
|
c && /* @__PURE__ */ _("input", {
|
|
@@ -6851,14 +6851,14 @@ function na({ value: e, onChange: t, onComplete: n, length: r = 6, error: i, inv
|
|
|
6851
6851
|
//#endregion
|
|
6852
6852
|
//#region src/components/ui/Combobox.tsx
|
|
6853
6853
|
function ra({ options: e, value: t, onChange: n, onOptionChange: r, placeholder: i = "Select...", label: a, className: o, controlSize: c, id: l, name: d, disabled: f, "aria-label": p, "aria-describedby": g, "aria-invalid": y, query: b, onQueryChange: x, filterOptions: S = !0, selectedOption: C, renderOption: w, loading: T = !1, loadingMessage: D = "Loading results…", error: k, onRetry: A, emptyMessage: j = "No results", footer: M }) {
|
|
6854
|
-
let N = sn(c), [P, F] = h(!1), [I, L] = h(""), [R, ee] = h(0), [te, ne] = h(() => e.find((e) => e.value === t)), re = m(null), z = m(null), ie = m(null), ae = u(),
|
|
6855
|
-
function
|
|
6854
|
+
let N = sn(c), [P, F] = h(!1), [I, L] = h(""), [R, ee] = h(0), [te, ne] = h(() => e.find((e) => e.value === t)), re = m(null), z = m(null), ie = m(null), ae = u(), B = l ?? `${ae}-search`, oe = `${ae}-label`, ce = `${ae}-selected`, le = `${ae}-listbox`, ue = b ?? I, V = e.find((e) => e.value === t) ?? (C?.value === t ? C : void 0) ?? (te?.value === t ? te : void 0), H = S ? e.filter((e) => e.label.toLowerCase().includes(ue.toLowerCase())) : e, U = Math.min(R, Math.max(H.length - 1, 0)), de = H[U], W = P && !f;
|
|
6855
|
+
function G(e) {
|
|
6856
6856
|
b === void 0 && L(e), x?.(e), ee(0);
|
|
6857
6857
|
}
|
|
6858
|
-
function
|
|
6858
|
+
function fe(e) {
|
|
6859
6859
|
e.disabled || (ne(e), n(e.value), r?.(e), F(!1), z.current?.focus());
|
|
6860
6860
|
}
|
|
6861
|
-
function
|
|
6861
|
+
function pe(e) {
|
|
6862
6862
|
if ([
|
|
6863
6863
|
"ArrowDown",
|
|
6864
6864
|
"ArrowUp",
|
|
@@ -6866,24 +6866,24 @@ function ra({ options: e, value: t, onChange: n, onOptionChange: r, placeholder:
|
|
|
6866
6866
|
"End"
|
|
6867
6867
|
].includes(e.key)) {
|
|
6868
6868
|
e.preventDefault();
|
|
6869
|
-
let t = e.key === "ArrowUp" || e.key === "End" ? -1 : 1, n = e.key === "Home" ? 0 : e.key === "End" ?
|
|
6870
|
-
for (; n >= 0 && n <
|
|
6871
|
-
n >= 0 && n <
|
|
6872
|
-
} else e.key === "Enter" ? (e.preventDefault(),
|
|
6869
|
+
let t = e.key === "ArrowUp" || e.key === "End" ? -1 : 1, n = e.key === "Home" ? 0 : e.key === "End" ? H.length - 1 : U + t;
|
|
6870
|
+
for (; n >= 0 && n < H.length && H[n].disabled;) n += t;
|
|
6871
|
+
n >= 0 && n < H.length && ee(n);
|
|
6872
|
+
} else e.key === "Enter" ? (e.preventDefault(), de && fe(de)) : e.key === "Escape" && (e.preventDefault(), e.stopPropagation(), F(!1), z.current?.focus());
|
|
6873
6873
|
}
|
|
6874
|
-
Nt(
|
|
6875
|
-
function
|
|
6874
|
+
Nt(W, s(() => F(!1), []), [re]);
|
|
6875
|
+
function me() {
|
|
6876
6876
|
F(!0), b === void 0 && L(""), ee(0), setTimeout(() => ie.current?.focus(), 0);
|
|
6877
6877
|
}
|
|
6878
6878
|
return /* @__PURE__ */ v("div", {
|
|
6879
|
-
className:
|
|
6879
|
+
className: K("flex flex-col gap-1.5", o),
|
|
6880
6880
|
ref: re,
|
|
6881
6881
|
onBlur: (e) => {
|
|
6882
6882
|
e.currentTarget.contains(e.relatedTarget) || F(!1);
|
|
6883
6883
|
},
|
|
6884
6884
|
children: [
|
|
6885
6885
|
a && /* @__PURE__ */ _("span", {
|
|
6886
|
-
id:
|
|
6886
|
+
id: oe,
|
|
6887
6887
|
className: "ui-field-label font-label text-xs font-medium",
|
|
6888
6888
|
children: a
|
|
6889
6889
|
}),
|
|
@@ -6902,20 +6902,20 @@ function ra({ options: e, value: t, onChange: n, onOptionChange: r, placeholder:
|
|
|
6902
6902
|
type: "button",
|
|
6903
6903
|
disabled: f,
|
|
6904
6904
|
"aria-label": p ?? (a ? void 0 : i),
|
|
6905
|
-
"aria-labelledby": a && !p ? `${
|
|
6905
|
+
"aria-labelledby": a && !p ? `${oe} ${ce}` : void 0,
|
|
6906
6906
|
"aria-describedby": g,
|
|
6907
6907
|
"aria-invalid": y,
|
|
6908
|
-
"aria-expanded":
|
|
6908
|
+
"aria-expanded": W,
|
|
6909
6909
|
"aria-haspopup": "listbox",
|
|
6910
|
-
"aria-controls":
|
|
6911
|
-
onClick: () =>
|
|
6910
|
+
"aria-controls": W ? le : void 0,
|
|
6911
|
+
onClick: () => W ? F(!1) : me(),
|
|
6912
6912
|
onKeyDown: (e) => {
|
|
6913
|
-
(e.key === "ArrowDown" || e.key === "ArrowUp") && (e.preventDefault(),
|
|
6913
|
+
(e.key === "ArrowDown" || e.key === "ArrowUp") && (e.preventDefault(), me());
|
|
6914
6914
|
},
|
|
6915
|
-
className:
|
|
6915
|
+
className: K("ui-sized-control 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] disabled:cursor-not-allowed disabled:opacity-40", "focus-visible:outline-accent focus-visible:outline-2 focus-visible:outline-offset-2"),
|
|
6916
6916
|
children: /* @__PURE__ */ _("span", {
|
|
6917
|
-
id:
|
|
6918
|
-
children:
|
|
6917
|
+
id: ce,
|
|
6918
|
+
children: V ? V.label : /* @__PURE__ */ _("span", {
|
|
6919
6919
|
className: "text-text-disabled",
|
|
6920
6920
|
children: t || i
|
|
6921
6921
|
})
|
|
@@ -6923,35 +6923,35 @@ function ra({ options: e, value: t, onChange: n, onOptionChange: r, placeholder:
|
|
|
6923
6923
|
}),
|
|
6924
6924
|
/* @__PURE__ */ _(O, {
|
|
6925
6925
|
"aria-hidden": "true",
|
|
6926
|
-
className:
|
|
6926
|
+
className: K("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", W && "rotate-180")
|
|
6927
6927
|
}),
|
|
6928
|
-
|
|
6928
|
+
W && /* @__PURE__ */ v("div", {
|
|
6929
6929
|
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",
|
|
6930
6930
|
children: [
|
|
6931
6931
|
/* @__PURE__ */ _("div", {
|
|
6932
6932
|
className: "border-border border-b p-1.5",
|
|
6933
6933
|
children: /* @__PURE__ */ v("div", {
|
|
6934
6934
|
className: "relative",
|
|
6935
|
-
children: [/* @__PURE__ */ _(
|
|
6935
|
+
children: [/* @__PURE__ */ _(se, {
|
|
6936
6936
|
"aria-hidden": "true",
|
|
6937
6937
|
className: "text-text-tertiary absolute top-1/2 left-2 h-3 w-3 -translate-y-1/2"
|
|
6938
6938
|
}), /* @__PURE__ */ _("input", {
|
|
6939
6939
|
ref: ie,
|
|
6940
6940
|
"data-control-size": N,
|
|
6941
6941
|
"data-has-icon": "true",
|
|
6942
|
-
id:
|
|
6942
|
+
id: B,
|
|
6943
6943
|
type: "text",
|
|
6944
6944
|
role: "combobox",
|
|
6945
6945
|
"aria-label": p ?? (a ? `Search ${a}` : "Search options"),
|
|
6946
6946
|
"aria-expanded": "true",
|
|
6947
|
-
"aria-controls":
|
|
6948
|
-
"aria-activedescendant":
|
|
6947
|
+
"aria-controls": le,
|
|
6948
|
+
"aria-activedescendant": de && !de.disabled ? `${le}-${U}` : void 0,
|
|
6949
6949
|
"aria-autocomplete": "list",
|
|
6950
6950
|
"aria-describedby": g,
|
|
6951
6951
|
"aria-invalid": y,
|
|
6952
|
-
value:
|
|
6953
|
-
onChange: (e) =>
|
|
6954
|
-
onKeyDown:
|
|
6952
|
+
value: ue,
|
|
6953
|
+
onChange: (e) => G(e.target.value),
|
|
6954
|
+
onKeyDown: pe,
|
|
6955
6955
|
placeholder: "Search...",
|
|
6956
6956
|
className: "ui-sized-control bg-bg-secondary text-text-primary border-border placeholder:text-text-disabled focus:border-accent font-control h-7 w-full rounded border pr-2 pl-7 text-xs focus:outline-none"
|
|
6957
6957
|
})]
|
|
@@ -6973,21 +6973,21 @@ function ra({ options: e, value: t, onChange: n, onOptionChange: r, placeholder:
|
|
|
6973
6973
|
})]
|
|
6974
6974
|
}),
|
|
6975
6975
|
/* @__PURE__ */ _("ul", {
|
|
6976
|
-
id:
|
|
6976
|
+
id: le,
|
|
6977
6977
|
className: "max-h-48 overflow-y-auto py-1",
|
|
6978
6978
|
role: "listbox",
|
|
6979
6979
|
"aria-label": a ?? p ?? "Options",
|
|
6980
6980
|
"aria-busy": T,
|
|
6981
|
-
children:
|
|
6982
|
-
id: `${
|
|
6981
|
+
children: H.map((e, n) => /* @__PURE__ */ v("li", {
|
|
6982
|
+
id: `${le}-${n}`,
|
|
6983
6983
|
role: "option",
|
|
6984
6984
|
"aria-selected": e.value === t,
|
|
6985
6985
|
"aria-disabled": e.disabled || void 0,
|
|
6986
|
-
onClick: () =>
|
|
6986
|
+
onClick: () => fe(e),
|
|
6987
6987
|
onMouseEnter: () => {
|
|
6988
6988
|
e.disabled || ee(n);
|
|
6989
6989
|
},
|
|
6990
|
-
className:
|
|
6990
|
+
className: K("font-control flex w-full items-center gap-2 px-3 py-1.5 text-xs", "transition-colors duration-[100ms]", e.disabled ? "text-text-disabled cursor-not-allowed" : "cursor-pointer", !e.disabled && (n === U ? "bg-accent-muted text-accent" : e.value === t ? "text-accent" : "text-text-secondary hover:text-text-primary hover:bg-bg-hover")),
|
|
6991
6991
|
children: [/* @__PURE__ */ _("span", {
|
|
6992
6992
|
className: "flex-1",
|
|
6993
6993
|
children: w ? w(e) : e.label
|
|
@@ -6997,7 +6997,7 @@ function ra({ options: e, value: t, onChange: n, onOptionChange: r, placeholder:
|
|
|
6997
6997
|
})]
|
|
6998
6998
|
}, e.value))
|
|
6999
6999
|
}),
|
|
7000
|
-
|
|
7000
|
+
H.length === 0 && !T && !k && /* @__PURE__ */ _("div", {
|
|
7001
7001
|
role: "status",
|
|
7002
7002
|
className: "text-text-tertiary px-3 py-2 text-center text-xs",
|
|
7003
7003
|
children: j
|
|
@@ -7017,7 +7017,7 @@ function ra({ options: e, value: t, onChange: n, onOptionChange: r, placeholder:
|
|
|
7017
7017
|
//#region src/components/ui/DangerZone.tsx
|
|
7018
7018
|
function ia({ title: e = "Danger Zone", description: t, children: n, className: r }) {
|
|
7019
7019
|
return /* @__PURE__ */ v("div", {
|
|
7020
|
-
className:
|
|
7020
|
+
className: K("border-border mt-8 border-t pt-6", r),
|
|
7021
7021
|
children: [
|
|
7022
7022
|
/* @__PURE__ */ _("h3", {
|
|
7023
7023
|
className: "text-red mb-2 text-xs font-semibold",
|
|
@@ -7073,7 +7073,7 @@ function oa({ controlSize: e, label: t, timeZone: n, value: r, onChange: i, plac
|
|
|
7073
7073
|
"data-control-size": c,
|
|
7074
7074
|
"aria-haspopup": "dialog",
|
|
7075
7075
|
"aria-expanded": l,
|
|
7076
|
-
className:
|
|
7076
|
+
className: K("ui-sized-control 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"),
|
|
7077
7077
|
children: r ? o ? o(r) : n ? new Intl.DateTimeFormat("en-GB", {
|
|
7078
7078
|
timeZone: n,
|
|
7079
7079
|
day: "numeric",
|
|
@@ -7089,7 +7089,7 @@ function oa({ controlSize: e, label: t, timeZone: n, value: r, onChange: i, plac
|
|
|
7089
7089
|
ref: f,
|
|
7090
7090
|
role: "dialog",
|
|
7091
7091
|
"aria-label": "Choose date",
|
|
7092
|
-
className:
|
|
7092
|
+
className: K("bg-bg-tertiary border-border-strong animate-scale-in absolute left-0 z-[100] rounded-md border p-3 shadow-lg", p ? "bottom-full mb-1" : "top-full mt-1"),
|
|
7093
7093
|
children: /* @__PURE__ */ _(Yi, {
|
|
7094
7094
|
timeZone: n,
|
|
7095
7095
|
year: y,
|
|
@@ -7162,7 +7162,7 @@ function ua({ controlSize: e, label: t, value: n, onChange: r, placeholder: i =
|
|
|
7162
7162
|
"data-control-size": a,
|
|
7163
7163
|
"aria-haspopup": "dialog",
|
|
7164
7164
|
"aria-expanded": o,
|
|
7165
|
-
className:
|
|
7165
|
+
className: K("ui-sized-control 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"),
|
|
7166
7166
|
children: I || /* @__PURE__ */ _("span", {
|
|
7167
7167
|
className: "text-text-disabled",
|
|
7168
7168
|
children: i
|
|
@@ -7173,7 +7173,7 @@ function ua({ controlSize: e, label: t, value: n, onChange: r, placeholder: i =
|
|
|
7173
7173
|
ref: u,
|
|
7174
7174
|
role: "dialog",
|
|
7175
7175
|
"aria-label": "Choose date range",
|
|
7176
|
-
className:
|
|
7176
|
+
className: K("bg-bg-tertiary border-border-strong animate-scale-in absolute left-0 z-[100] rounded-md border p-3 shadow-lg", d ? "bottom-full mb-1" : "top-full mt-1"),
|
|
7177
7177
|
children: [/* @__PURE__ */ v("div", {
|
|
7178
7178
|
className: "mb-2 flex items-center justify-between",
|
|
7179
7179
|
children: [
|
|
@@ -7359,7 +7359,7 @@ function _a({ controlSize: e, label: t, timeZone: n, value: r, onChange: i, plac
|
|
|
7359
7359
|
"data-control-size": o,
|
|
7360
7360
|
"aria-haspopup": "dialog",
|
|
7361
7361
|
"aria-expanded": c,
|
|
7362
|
-
className:
|
|
7362
|
+
className: K("ui-sized-control 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"),
|
|
7363
7363
|
children: r ? ma(r, n) : /* @__PURE__ */ _("span", {
|
|
7364
7364
|
className: "text-text-disabled",
|
|
7365
7365
|
children: a
|
|
@@ -7370,7 +7370,7 @@ function _a({ controlSize: e, label: t, timeZone: n, value: r, onChange: i, plac
|
|
|
7370
7370
|
ref: C,
|
|
7371
7371
|
role: "dialog",
|
|
7372
7372
|
"aria-label": "Choose date and time",
|
|
7373
|
-
className:
|
|
7373
|
+
className: K("bg-bg-tertiary border-border-strong animate-scale-in absolute left-0 z-[100] rounded-md border p-3 shadow-lg", w ? "bottom-full mb-1" : "top-full mt-1"),
|
|
7374
7374
|
children: [
|
|
7375
7375
|
/* @__PURE__ */ _(Yi, {
|
|
7376
7376
|
timeZone: n,
|
|
@@ -7458,13 +7458,13 @@ function _a({ controlSize: e, label: t, timeZone: n, value: r, onChange: i, plac
|
|
|
7458
7458
|
type: "button",
|
|
7459
7459
|
onClick: () => L("AM"),
|
|
7460
7460
|
"aria-pressed": I === "AM",
|
|
7461
|
-
className:
|
|
7461
|
+
className: K("text-2xs cursor-pointer px-2 py-0.5 font-medium transition-colors duration-[100ms]", I === "AM" ? "bg-accent text-text-on-accent" : "bg-bg-secondary text-text-secondary hover:bg-bg-hover"),
|
|
7462
7462
|
children: "AM"
|
|
7463
7463
|
}), /* @__PURE__ */ _("button", {
|
|
7464
7464
|
type: "button",
|
|
7465
7465
|
onClick: () => L("PM"),
|
|
7466
7466
|
"aria-pressed": I === "PM",
|
|
7467
|
-
className:
|
|
7467
|
+
className: K("text-2xs cursor-pointer px-2 py-0.5 font-medium transition-colors duration-[100ms]", I === "PM" ? "bg-accent text-text-on-accent" : "bg-bg-secondary text-text-secondary hover:bg-bg-hover"),
|
|
7468
7468
|
children: "PM"
|
|
7469
7469
|
})]
|
|
7470
7470
|
}),
|
|
@@ -7472,7 +7472,7 @@ function _a({ controlSize: e, label: t, timeZone: n, value: r, onChange: i, plac
|
|
|
7472
7472
|
type: "button",
|
|
7473
7473
|
onClick: re,
|
|
7474
7474
|
disabled: !R,
|
|
7475
|
-
className:
|
|
7475
|
+
className: K("ml-auto h-6 rounded-md px-3 text-xs font-medium transition-colors duration-[100ms]", R ? "bg-accent text-text-on-accent hover:bg-accent-hover cursor-pointer" : "bg-bg-hover text-text-disabled cursor-not-allowed"),
|
|
7476
7476
|
children: "Apply"
|
|
7477
7477
|
})
|
|
7478
7478
|
]
|
|
@@ -7505,7 +7505,7 @@ function xa({ open: e, onClose: t, title: n, children: r, className: i, resizabl
|
|
|
7505
7505
|
p.current = !1;
|
|
7506
7506
|
}, []);
|
|
7507
7507
|
return /* @__PURE__ */ _("div", {
|
|
7508
|
-
className:
|
|
7508
|
+
className: K("border-border bg-bg-secondary relative shrink-0 overflow-hidden border-l", "transition-[width] duration-[200ms] ease-out", i),
|
|
7509
7509
|
style: { width: e ? d : 0 },
|
|
7510
7510
|
children: e && /* @__PURE__ */ v("div", {
|
|
7511
7511
|
className: "animate-fade-in flex h-full flex-col",
|
|
@@ -7526,7 +7526,7 @@ function xa({ open: e, onClose: t, title: n, children: r, className: i, resizabl
|
|
|
7526
7526
|
onClick: t,
|
|
7527
7527
|
className: "text-text-tertiary hover:text-text-primary hover:bg-bg-hover flex h-6 w-6 cursor-pointer items-center justify-center rounded",
|
|
7528
7528
|
"aria-label": "Close panel",
|
|
7529
|
-
children: /* @__PURE__ */ _(
|
|
7529
|
+
children: /* @__PURE__ */ _(V, { className: "h-3.5 w-3.5" })
|
|
7530
7530
|
})]
|
|
7531
7531
|
}),
|
|
7532
7532
|
/* @__PURE__ */ _("div", {
|
|
@@ -7926,7 +7926,7 @@ function Wa({ open: e, onClose: t, title: n, children: r, footer: i, className:
|
|
|
7926
7926
|
w,
|
|
7927
7927
|
C
|
|
7928
7928
|
]), !e) return null;
|
|
7929
|
-
let
|
|
7929
|
+
let L = N && /* @__PURE__ */ _("button", {
|
|
7930
7930
|
type: "button",
|
|
7931
7931
|
"aria-label": "Move dialog",
|
|
7932
7932
|
title: "Move dialog: drag, or use the arrow keys (Shift for larger steps)",
|
|
@@ -7938,20 +7938,20 @@ function Wa({ open: e, onClose: t, title: n, children: r, footer: i, className:
|
|
|
7938
7938
|
className: "h-3.5 w-3.5",
|
|
7939
7939
|
"aria-hidden": "true"
|
|
7940
7940
|
})
|
|
7941
|
-
}),
|
|
7941
|
+
}), R = P && /* @__PURE__ */ _("button", {
|
|
7942
7942
|
type: "button",
|
|
7943
7943
|
"aria-label": "Resize dialog",
|
|
7944
7944
|
title: "Resize dialog: drag, or use the arrow keys (Shift for larger steps)",
|
|
7945
7945
|
"data-dialog-resize": "",
|
|
7946
|
-
className: "text-text-tertiary hover:text-text-
|
|
7946
|
+
className: "text-text-tertiary hover:text-text-primary focus-visible:outline-accent absolute right-0.5 bottom-0.5 hidden h-4 w-4 cursor-nwse-resize items-center justify-center rounded-md transition-colors duration-[100ms] focus-visible:outline-2 focus-visible:outline-offset-0 md:flex md:touch-none md:select-none",
|
|
7947
7947
|
...P.pointer,
|
|
7948
7948
|
onKeyDown: P.onKeyDown,
|
|
7949
|
-
children: /* @__PURE__ */ _(
|
|
7950
|
-
className: "h-
|
|
7949
|
+
children: /* @__PURE__ */ _(I, {
|
|
7950
|
+
className: "h-4 w-4",
|
|
7951
7951
|
"aria-hidden": "true"
|
|
7952
7952
|
})
|
|
7953
|
-
})
|
|
7954
|
-
return
|
|
7953
|
+
});
|
|
7954
|
+
return de(/* @__PURE__ */ v("div", {
|
|
7955
7955
|
className: "fixed inset-0 z-50 flex items-start justify-center overflow-y-auto pt-4 md:pt-[5vh]",
|
|
7956
7956
|
children: [/* @__PURE__ */ _("div", {
|
|
7957
7957
|
className: "bg-bg-overlay fixed inset-0",
|
|
@@ -7961,7 +7961,7 @@ function Wa({ open: e, onClose: t, title: n, children: r, footer: i, className:
|
|
|
7961
7961
|
"aria-hidden": "true"
|
|
7962
7962
|
}), /* @__PURE__ */ v("div", {
|
|
7963
7963
|
ref: O,
|
|
7964
|
-
className:
|
|
7964
|
+
className: K(`relative z-50 mx-1 mb-8 flex w-full ${Aa[o]} flex-col`, "bg-bg-secondary border-border rounded-lg border", "animate-scale-in shadow-lg", a),
|
|
7965
7965
|
role: h,
|
|
7966
7966
|
tabIndex: -1,
|
|
7967
7967
|
"aria-busy": C || void 0,
|
|
@@ -7973,7 +7973,7 @@ function Wa({ open: e, onClose: t, title: n, children: r, footer: i, className:
|
|
|
7973
7973
|
(n || !E || s) && /* @__PURE__ */ v("div", {
|
|
7974
7974
|
ref: k,
|
|
7975
7975
|
"data-control-size": D,
|
|
7976
|
-
className:
|
|
7976
|
+
className: K("ui-bar border-border flex shrink-0 items-center justify-between gap-2 border-b px-3 py-2.5", s && "md:cursor-move md:touch-none md:select-none"),
|
|
7977
7977
|
...N?.pointer,
|
|
7978
7978
|
children: [n && /* @__PURE__ */ _("h3", {
|
|
7979
7979
|
id: j,
|
|
@@ -7989,7 +7989,7 @@ function Wa({ open: e, onClose: t, title: n, children: r, footer: i, className:
|
|
|
7989
7989
|
},
|
|
7990
7990
|
className: "ml-auto shrink-0",
|
|
7991
7991
|
"aria-label": "Close",
|
|
7992
|
-
children: /* @__PURE__ */ _(
|
|
7992
|
+
children: /* @__PURE__ */ _(V, { className: "h-4 w-4" })
|
|
7993
7993
|
})]
|
|
7994
7994
|
}),
|
|
7995
7995
|
/* @__PURE__ */ v("div", {
|
|
@@ -8003,20 +8003,21 @@ function Wa({ open: e, onClose: t, title: n, children: r, footer: i, className:
|
|
|
8003
8003
|
}),
|
|
8004
8004
|
i && /* @__PURE__ */ v("div", {
|
|
8005
8005
|
"data-control-size": D,
|
|
8006
|
-
className:
|
|
8007
|
-
children: [
|
|
8008
|
-
|
|
8009
|
-
|
|
8010
|
-
|
|
8011
|
-
}) : i,
|
|
8012
|
-
I,
|
|
8013
|
-
L
|
|
8014
|
-
]
|
|
8006
|
+
className: K("ui-bar border-border bg-bg-primary/50 flex shrink-0 rounded-b-lg border-t px-3 py-2.5", R && "md:pr-6", L ? "items-center gap-2" : "flex-col justify-center"),
|
|
8007
|
+
children: [L ? /* @__PURE__ */ _("div", {
|
|
8008
|
+
className: "flex min-w-0 flex-1 flex-col justify-center",
|
|
8009
|
+
children: i
|
|
8010
|
+
}) : i, L]
|
|
8015
8011
|
}),
|
|
8016
|
-
|
|
8012
|
+
L && !i && /* @__PURE__ */ _("div", {
|
|
8017
8013
|
className: "hidden px-3 pb-2 md:flex",
|
|
8018
|
-
children:
|
|
8019
|
-
})
|
|
8014
|
+
children: L
|
|
8015
|
+
}),
|
|
8016
|
+
R && !i && !L && /* @__PURE__ */ _("div", {
|
|
8017
|
+
"data-dialog-resize-spacer": "",
|
|
8018
|
+
className: "hidden h-5 md:block"
|
|
8019
|
+
}),
|
|
8020
|
+
R
|
|
8020
8021
|
]
|
|
8021
8022
|
})]
|
|
8022
8023
|
}), document.body);
|
|
@@ -8025,7 +8026,7 @@ function Wa({ open: e, onClose: t, title: n, children: r, footer: i, className:
|
|
|
8025
8026
|
//#region src/components/ui/DialogActions.tsx
|
|
8026
8027
|
function Ga({ onCancel: e, onConfirm: t, cancelLabel: n = "Cancel", confirmLabel: r = "Confirm", confirmVariant: i = "primary", className: a, busy: o = !1, busyLabel: s = "Working…", cancelRef: c, confirmRef: l, confirmDisabled: u = !1 }) {
|
|
8027
8028
|
return /* @__PURE__ */ v("div", {
|
|
8028
|
-
className:
|
|
8029
|
+
className: K("flex justify-end gap-2", a),
|
|
8029
8030
|
"aria-busy": o || void 0,
|
|
8030
8031
|
children: [/* @__PURE__ */ _(mn, {
|
|
8031
8032
|
ref: c,
|
|
@@ -8054,7 +8055,7 @@ function Ga({ onCancel: e, onConfirm: t, cancelLabel: n = "Cancel", confirmLabel
|
|
|
8054
8055
|
//#region src/components/ui/DividerLabel.tsx
|
|
8055
8056
|
function Ka({ children: e, className: t }) {
|
|
8056
8057
|
return /* @__PURE__ */ v("div", {
|
|
8057
|
-
className:
|
|
8058
|
+
className: K("my-6 flex items-center gap-3", t),
|
|
8058
8059
|
children: [
|
|
8059
8060
|
/* @__PURE__ */ _("div", { className: "border-border flex-1 border-t" }),
|
|
8060
8061
|
/* @__PURE__ */ _("span", {
|
|
@@ -8103,7 +8104,7 @@ function qa({ trigger: e, items: t, align: n = "right" }) {
|
|
|
8103
8104
|
ref: d,
|
|
8104
8105
|
onClick: x,
|
|
8105
8106
|
children: e
|
|
8106
|
-
}), r &&
|
|
8107
|
+
}), r && de(/* @__PURE__ */ _("div", {
|
|
8107
8108
|
ref: f,
|
|
8108
8109
|
role: "menu",
|
|
8109
8110
|
className: "bg-bg-tertiary border-border-strong animate-scale-in fixed z-[100] w-max rounded-md border py-1 shadow-lg",
|
|
@@ -8126,7 +8127,7 @@ function qa({ trigger: e, items: t, align: n = "right" }) {
|
|
|
8126
8127
|
e.onClick(), b();
|
|
8127
8128
|
},
|
|
8128
8129
|
onMouseEnter: () => u(n),
|
|
8129
|
-
className:
|
|
8130
|
+
className: K("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"),
|
|
8130
8131
|
children: [
|
|
8131
8132
|
e.icon && /* @__PURE__ */ _("span", {
|
|
8132
8133
|
className: "flex h-3.5 w-3.5 shrink-0 items-center",
|
|
@@ -8150,11 +8151,11 @@ function qa({ trigger: e, items: t, align: n = "right" }) {
|
|
|
8150
8151
|
//#region src/components/ui/EmptyState.tsx
|
|
8151
8152
|
function Ja({ icon: e, title: t, description: n, action: r, className: i }) {
|
|
8152
8153
|
return /* @__PURE__ */ v("div", {
|
|
8153
|
-
className:
|
|
8154
|
+
className: K("flex flex-col items-center justify-center px-4 py-12", i),
|
|
8154
8155
|
children: [
|
|
8155
8156
|
/* @__PURE__ */ _("div", {
|
|
8156
8157
|
className: "bg-bg-tertiary text-text-tertiary mb-3 flex h-10 w-10 items-center justify-center rounded-md",
|
|
8157
|
-
children: e || /* @__PURE__ */ _(
|
|
8158
|
+
children: e || /* @__PURE__ */ _(L, { className: "h-5 w-5" })
|
|
8158
8159
|
}),
|
|
8159
8160
|
/* @__PURE__ */ _("p", {
|
|
8160
8161
|
className: "text-text-primary mb-1 text-sm font-medium",
|
|
@@ -8230,7 +8231,7 @@ function Xa({ icon: e, children: t, items: n, align: r, className: i }) {
|
|
|
8230
8231
|
//#region src/components/ui/Kbd.tsx
|
|
8231
8232
|
function Za({ children: e, className: t }) {
|
|
8232
8233
|
return /* @__PURE__ */ _("kbd", {
|
|
8233
|
-
className:
|
|
8234
|
+
className: K("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),
|
|
8234
8235
|
children: e
|
|
8235
8236
|
});
|
|
8236
8237
|
}
|
|
@@ -8243,8 +8244,8 @@ var Qa = {
|
|
|
8243
8244
|
};
|
|
8244
8245
|
function $a({ className: e, size: t = "md" }) {
|
|
8245
8246
|
return /* @__PURE__ */ _("div", {
|
|
8246
|
-
className:
|
|
8247
|
-
children: /* @__PURE__ */ _(
|
|
8247
|
+
className: K("flex min-h-[200px] items-center justify-center", e),
|
|
8248
|
+
children: /* @__PURE__ */ _(ee, { className: K("text-accent animate-spin", Qa[t]) })
|
|
8248
8249
|
});
|
|
8249
8250
|
}
|
|
8250
8251
|
//#endregion
|
|
@@ -8283,7 +8284,7 @@ function oo(e, t) {
|
|
|
8283
8284
|
}
|
|
8284
8285
|
function so({ items: e, labelWidth: n = "100px", layout: r = "inline", columns: i = 1, gap: a = 3, striped: o = !1, className: s }) {
|
|
8285
8286
|
return r === "stacked" ? /* @__PURE__ */ _("dl", {
|
|
8286
|
-
className:
|
|
8287
|
+
className: K("ui-grid text-xs", s),
|
|
8287
8288
|
style: {
|
|
8288
8289
|
...eo("columns", i, to, 1),
|
|
8289
8290
|
...o ? no(a, void 0, 0) : no(a)
|
|
@@ -8295,12 +8296,12 @@ function so({ items: e, labelWidth: n = "100px", layout: r = "inline", columns:
|
|
|
8295
8296
|
className: "text-text-tertiary font-label",
|
|
8296
8297
|
children: e.label
|
|
8297
8298
|
}), /* @__PURE__ */ _("dd", {
|
|
8298
|
-
className:
|
|
8299
|
+
className: K((typeof e.value == "string" || typeof e.value == "number") && "text-text-primary font-data"),
|
|
8299
8300
|
children: e.value
|
|
8300
8301
|
})]
|
|
8301
8302
|
}, e.label))
|
|
8302
8303
|
}) : o ? /* @__PURE__ */ _("div", {
|
|
8303
|
-
className:
|
|
8304
|
+
className: K("gap-x-3 text-xs", s),
|
|
8304
8305
|
style: {
|
|
8305
8306
|
display: "grid",
|
|
8306
8307
|
gridTemplateColumns: `${n} 1fr`
|
|
@@ -8322,7 +8323,7 @@ function so({ items: e, labelWidth: n = "100px", layout: r = "inline", columns:
|
|
|
8322
8323
|
}) : /* @__PURE__ */ _("span", { children: e.value })]
|
|
8323
8324
|
}, e.label))
|
|
8324
8325
|
}) : /* @__PURE__ */ _("div", {
|
|
8325
|
-
className:
|
|
8326
|
+
className: K("gap-x-3 gap-y-2 text-xs", s),
|
|
8326
8327
|
style: {
|
|
8327
8328
|
display: "grid",
|
|
8328
8329
|
gridTemplateColumns: `${n} 1fr`
|
|
@@ -8341,9 +8342,9 @@ function so({ items: e, labelWidth: n = "100px", layout: r = "inline", columns:
|
|
|
8341
8342
|
function co({ label: e, value: t, sub: n, trend: r, bar: i, icon: a, iconColor: o, className: s }) {
|
|
8342
8343
|
let c = r?.tone === "positive" ? "text-green" : r?.tone === "negative" ? "text-red" : "text-text-tertiary";
|
|
8343
8344
|
return /* @__PURE__ */ v("div", {
|
|
8344
|
-
className:
|
|
8345
|
+
className: K("bg-bg-secondary border-border relative overflow-hidden rounded-md border p-3", s),
|
|
8345
8346
|
children: [
|
|
8346
|
-
a && /* @__PURE__ */ _(a, { className:
|
|
8347
|
+
a && /* @__PURE__ */ _(a, { className: K("absolute -right-9 -bottom-9 h-44 w-44 -rotate-45 opacity-[0.06]", o) }),
|
|
8347
8348
|
/* @__PURE__ */ _("p", {
|
|
8348
8349
|
className: "text-2xs-f text-text-tertiary font-label mb-1 font-medium tracking-wider uppercase",
|
|
8349
8350
|
children: e
|
|
@@ -8359,7 +8360,7 @@ function co({ label: e, value: t, sub: n, trend: r, bar: i, icon: a, iconColor:
|
|
|
8359
8360
|
r && /* @__PURE__ */ v("p", {
|
|
8360
8361
|
className: "text-2xs font-label mt-1 flex items-center gap-1",
|
|
8361
8362
|
children: [/* @__PURE__ */ _("span", {
|
|
8362
|
-
className:
|
|
8363
|
+
className: K("font-medium tabular-nums", c),
|
|
8363
8364
|
children: r.value
|
|
8364
8365
|
}), /* @__PURE__ */ _("span", {
|
|
8365
8366
|
className: "text-text-tertiary",
|
|
@@ -8433,7 +8434,7 @@ function mo({ provider: e, children: t, ...n }) {
|
|
|
8433
8434
|
function ho({ title: e, subtitle: t, actions: n, className: r, eyebrow: i, headingLevel: a = 1, wrap: o = !1 }) {
|
|
8434
8435
|
let s = `h${a}`;
|
|
8435
8436
|
return /* @__PURE__ */ v("div", {
|
|
8436
|
-
className:
|
|
8437
|
+
className: K("flex items-center justify-between gap-3", o && "flex-wrap", r),
|
|
8437
8438
|
children: [/* @__PURE__ */ v("div", {
|
|
8438
8439
|
className: "min-w-0",
|
|
8439
8440
|
children: [
|
|
@@ -8451,7 +8452,7 @@ function ho({ title: e, subtitle: t, actions: n, className: r, eyebrow: i, headi
|
|
|
8451
8452
|
})
|
|
8452
8453
|
]
|
|
8453
8454
|
}), n && /* @__PURE__ */ _("div", {
|
|
8454
|
-
className:
|
|
8455
|
+
className: K("flex items-center gap-2", o && "flex-wrap"),
|
|
8455
8456
|
children: n
|
|
8456
8457
|
})]
|
|
8457
8458
|
});
|
|
@@ -8460,9 +8461,9 @@ function ho({ title: e, subtitle: t, actions: n, className: r, eyebrow: i, headi
|
|
|
8460
8461
|
//#region src/components/ui/PageSection.tsx
|
|
8461
8462
|
function go({ title: e, description: t, actions: n, children: r, as: i = "h2", className: a, headerClassName: o, contentClassName: s }) {
|
|
8462
8463
|
return /* @__PURE__ */ v("section", {
|
|
8463
|
-
className:
|
|
8464
|
+
className: K("space-y-4", a),
|
|
8464
8465
|
children: [(e || t || n) && /* @__PURE__ */ v("div", {
|
|
8465
|
-
className:
|
|
8466
|
+
className: K("border-border flex items-end justify-between gap-3 border-b pb-2", o),
|
|
8466
8467
|
children: [/* @__PURE__ */ v("div", {
|
|
8467
8468
|
className: "min-w-0",
|
|
8468
8469
|
children: [e && /* @__PURE__ */ _(i, {
|
|
@@ -8501,7 +8502,7 @@ var _o = [
|
|
|
8501
8502
|
function vo({ page: e, pageSize: t, total: n, pageSizeOptions: r = _o, onPageChange: i, onPageSizeChange: a, className: o }) {
|
|
8502
8503
|
let s = Math.ceil(n / t), c = Math.min((e - 1) * t + 1, n), l = Math.min(e * t, n);
|
|
8503
8504
|
return /* @__PURE__ */ v("div", {
|
|
8504
|
-
className:
|
|
8505
|
+
className: K("flex items-center justify-between", o),
|
|
8505
8506
|
children: [/* @__PURE__ */ v("div", {
|
|
8506
8507
|
className: "flex items-center gap-3",
|
|
8507
8508
|
children: [/* @__PURE__ */ _(Cn, {
|
|
@@ -8581,7 +8582,7 @@ var bo = a(({ label: e, error: t, className: n, id: r, hint: i, controlSize: a,
|
|
|
8581
8582
|
"aria-describedby": d.describedBy,
|
|
8582
8583
|
id: f,
|
|
8583
8584
|
type: y ? "text" : "password",
|
|
8584
|
-
className:
|
|
8585
|
+
className: K("ui-password-input ui-sized-control 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),
|
|
8585
8586
|
...l
|
|
8586
8587
|
}), /* @__PURE__ */ _("button", {
|
|
8587
8588
|
type: "button",
|
|
@@ -8622,7 +8623,7 @@ function So(e, t = xo) {
|
|
|
8622
8623
|
function Co({ password: e, requirements: t = xo, showWhenEmpty: n = !1, className: r }) {
|
|
8623
8624
|
return !n && e.length === 0 ? null : /* @__PURE__ */ _("ul", {
|
|
8624
8625
|
"aria-label": "Password requirements",
|
|
8625
|
-
className:
|
|
8626
|
+
className: K("space-y-1", r),
|
|
8626
8627
|
children: t.map((t) => {
|
|
8627
8628
|
let n = t.test(e);
|
|
8628
8629
|
return /* @__PURE__ */ v("li", {
|
|
@@ -8630,11 +8631,11 @@ function Co({ password: e, requirements: t = xo, showWhenEmpty: n = !1, classNam
|
|
|
8630
8631
|
children: [n ? /* @__PURE__ */ _(E, {
|
|
8631
8632
|
"aria-hidden": "true",
|
|
8632
8633
|
className: "text-green h-3 w-3"
|
|
8633
|
-
}) : /* @__PURE__ */ _(
|
|
8634
|
+
}) : /* @__PURE__ */ _(V, {
|
|
8634
8635
|
"aria-hidden": "true",
|
|
8635
8636
|
className: "text-text-disabled h-3 w-3"
|
|
8636
8637
|
}), /* @__PURE__ */ v("span", {
|
|
8637
|
-
className:
|
|
8638
|
+
className: K("text-2xs", n ? "text-green" : "text-text-disabled"),
|
|
8638
8639
|
children: [t.label, /* @__PURE__ */ _("span", {
|
|
8639
8640
|
className: "sr-only",
|
|
8640
8641
|
children: n ? " (met)" : " (not met)"
|
|
@@ -8648,7 +8649,7 @@ function Co({ password: e, requirements: t = xo, showWhenEmpty: n = !1, classNam
|
|
|
8648
8649
|
//#region src/components/ui/ProfileHeader.tsx
|
|
8649
8650
|
function wo({ name: e, subtitle: t, badge: n, meta: r, action: i, className: a }) {
|
|
8650
8651
|
return /* @__PURE__ */ v("div", {
|
|
8651
|
-
className:
|
|
8652
|
+
className: K("flex items-start gap-4", a),
|
|
8652
8653
|
children: [
|
|
8653
8654
|
/* @__PURE__ */ _(zt, {
|
|
8654
8655
|
name: e,
|
|
@@ -8696,7 +8697,7 @@ function wo({ name: e, subtitle: t, badge: n, meta: r, action: i, className: a }
|
|
|
8696
8697
|
//#region src/components/ui/ProseContent.tsx
|
|
8697
8698
|
function To({ children: e, className: t }) {
|
|
8698
8699
|
return /* @__PURE__ */ _("div", {
|
|
8699
|
-
className:
|
|
8700
|
+
className: K("ui-prose", t),
|
|
8700
8701
|
children: e
|
|
8701
8702
|
});
|
|
8702
8703
|
}
|
|
@@ -9298,7 +9299,7 @@ function Yo({ value: e, errorCorrection: t = "M", size: n = 160, margin: r = 4,
|
|
|
9298
9299
|
height: n,
|
|
9299
9300
|
viewBox: `0 0 ${l} ${l}`,
|
|
9300
9301
|
shapeRendering: "crispEdges",
|
|
9301
|
-
className:
|
|
9302
|
+
className: K("block", o),
|
|
9302
9303
|
children: [/* @__PURE__ */ _("rect", {
|
|
9303
9304
|
width: l,
|
|
9304
9305
|
height: l,
|
|
@@ -9313,13 +9314,13 @@ function Yo({ value: e, errorCorrection: t = "M", size: n = 160, margin: r = 4,
|
|
|
9313
9314
|
//#region src/components/ui/SearchInput.tsx
|
|
9314
9315
|
function Xo({ value: e, onChange: t, placeholder: n = "Search...", className: r }) {
|
|
9315
9316
|
return /* @__PURE__ */ v("div", {
|
|
9316
|
-
className:
|
|
9317
|
-
children: [/* @__PURE__ */ _(
|
|
9317
|
+
className: K("relative", r),
|
|
9318
|
+
children: [/* @__PURE__ */ _(se, { className: "text-text-tertiary absolute top-1/2 left-2 h-3.5 w-3.5 -translate-y-1/2" }), /* @__PURE__ */ _("input", {
|
|
9318
9319
|
type: "search",
|
|
9319
9320
|
value: e,
|
|
9320
9321
|
onChange: (e) => t(e.target.value),
|
|
9321
9322
|
placeholder: n,
|
|
9322
|
-
className:
|
|
9323
|
+
className: K("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")
|
|
9323
9324
|
})]
|
|
9324
9325
|
});
|
|
9325
9326
|
}
|
|
@@ -9363,7 +9364,7 @@ var Zo = a(({ label: e, error: t, options: n, className: r, id: i, hint: a, cont
|
|
|
9363
9364
|
"aria-invalid": f.invalid,
|
|
9364
9365
|
"aria-describedby": f.describedBy,
|
|
9365
9366
|
id: p,
|
|
9366
|
-
className:
|
|
9367
|
+
className: K("ui-sized-control 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),
|
|
9367
9368
|
...u,
|
|
9368
9369
|
children: n.map((e) => /* @__PURE__ */ _("option", {
|
|
9369
9370
|
value: e.value,
|
|
@@ -9379,7 +9380,7 @@ Zo.displayName = "Select";
|
|
|
9379
9380
|
//#region src/components/ui/SettingRow.tsx
|
|
9380
9381
|
function Qo({ label: e, description: t, action: n, className: r }) {
|
|
9381
9382
|
return /* @__PURE__ */ v("div", {
|
|
9382
|
-
className:
|
|
9383
|
+
className: K("border-border flex items-center justify-between border-b py-3", r),
|
|
9383
9384
|
children: [/* @__PURE__ */ v("div", {
|
|
9384
9385
|
className: "min-w-0 flex-1 pr-4",
|
|
9385
9386
|
children: [/* @__PURE__ */ _("p", {
|
|
@@ -9407,14 +9408,14 @@ function $o({ open: e, onClose: t, title: n, children: r, footer: i, side: a = "
|
|
|
9407
9408
|
return document.addEventListener("keydown", n), document.body.style.overflow = "hidden", () => {
|
|
9408
9409
|
document.removeEventListener("keydown", n), document.body.style.overflow = "";
|
|
9409
9410
|
};
|
|
9410
|
-
}, [e, t]), e ?
|
|
9411
|
+
}, [e, t]), e ? de(/* @__PURE__ */ v("div", {
|
|
9411
9412
|
className: "fixed inset-0 z-50",
|
|
9412
9413
|
children: [/* @__PURE__ */ _("div", {
|
|
9413
9414
|
className: "bg-bg-overlay animate-fade-in absolute inset-0",
|
|
9414
9415
|
onClick: t
|
|
9415
9416
|
}), /* @__PURE__ */ v("div", {
|
|
9416
9417
|
ref: d,
|
|
9417
|
-
className:
|
|
9418
|
+
className: K("bg-bg-secondary border-border absolute inset-y-0 flex flex-col shadow-lg", o, a === "right" ? "animate-slide-in-right right-0 border-l" : "animate-slide-in-left left-0 border-r", s),
|
|
9418
9419
|
style: { maxWidth: "calc(100vw - 2rem)" },
|
|
9419
9420
|
role: "dialog",
|
|
9420
9421
|
"aria-modal": "true",
|
|
@@ -9433,11 +9434,11 @@ function $o({ open: e, onClose: t, title: n, children: r, footer: i, side: a = "
|
|
|
9433
9434
|
onClick: t,
|
|
9434
9435
|
className: "ml-auto shrink-0",
|
|
9435
9436
|
"aria-label": "Close",
|
|
9436
|
-
children: /* @__PURE__ */ _(
|
|
9437
|
+
children: /* @__PURE__ */ _(V, { className: "h-4 w-4" })
|
|
9437
9438
|
})]
|
|
9438
9439
|
}),
|
|
9439
9440
|
/* @__PURE__ */ _("div", {
|
|
9440
|
-
className:
|
|
9441
|
+
className: K("ui-surface-body flex-1 overflow-y-auto p-3", c),
|
|
9441
9442
|
children: r
|
|
9442
9443
|
}),
|
|
9443
9444
|
i && /* @__PURE__ */ _("div", {
|
|
@@ -9453,13 +9454,13 @@ function $o({ open: e, onClose: t, title: n, children: r, footer: i, side: a = "
|
|
|
9453
9454
|
//#region src/components/ui/SplitPaneLayout.tsx
|
|
9454
9455
|
function es({ children: e, direction: t = "row", className: n }) {
|
|
9455
9456
|
return /* @__PURE__ */ _("div", {
|
|
9456
|
-
className:
|
|
9457
|
+
className: K("-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),
|
|
9457
9458
|
children: e
|
|
9458
9459
|
});
|
|
9459
9460
|
}
|
|
9460
9461
|
function ts({ children: e, className: t }) {
|
|
9461
9462
|
return /* @__PURE__ */ _("div", {
|
|
9462
|
-
className:
|
|
9463
|
+
className: K("flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden", t),
|
|
9463
9464
|
children: e
|
|
9464
9465
|
});
|
|
9465
9466
|
}
|
|
@@ -9476,9 +9477,9 @@ var ns = Object.assign(es, { Main: ts }), rs = {
|
|
|
9476
9477
|
};
|
|
9477
9478
|
function as({ status: e, label: t, className: n }) {
|
|
9478
9479
|
return /* @__PURE__ */ v("span", {
|
|
9479
|
-
className:
|
|
9480
|
-
children: [/* @__PURE__ */ _("span", { className:
|
|
9481
|
-
className:
|
|
9480
|
+
className: K("inline-flex items-center gap-1.5", n),
|
|
9481
|
+
children: [/* @__PURE__ */ _("span", { className: K("h-2 w-2 rounded-full", rs[e]) }), t && /* @__PURE__ */ _("span", {
|
|
9482
|
+
className: K("text-xs", is[e]),
|
|
9482
9483
|
children: t
|
|
9483
9484
|
})]
|
|
9484
9485
|
});
|
|
@@ -9487,18 +9488,18 @@ function as({ status: e, label: t, className: n }) {
|
|
|
9487
9488
|
//#region src/components/ui/StepProgress.tsx
|
|
9488
9489
|
function os({ steps: e, currentStep: t, className: n }) {
|
|
9489
9490
|
return /* @__PURE__ */ _("div", {
|
|
9490
|
-
className:
|
|
9491
|
+
className: K("flex items-center justify-between", n),
|
|
9491
9492
|
children: e.map((n, r) => /* @__PURE__ */ v("div", {
|
|
9492
|
-
className:
|
|
9493
|
+
className: K("flex items-center", r < e.length - 1 && "flex-1"),
|
|
9493
9494
|
children: [/* @__PURE__ */ v("div", {
|
|
9494
9495
|
className: "flex flex-col items-center",
|
|
9495
9496
|
children: [
|
|
9496
9497
|
/* @__PURE__ */ _("div", {
|
|
9497
|
-
className:
|
|
9498
|
+
className: K("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"),
|
|
9498
9499
|
children: r < t ? /* @__PURE__ */ _(E, { className: "h-4 w-4" }) : r + 1
|
|
9499
9500
|
}),
|
|
9500
9501
|
/* @__PURE__ */ _("span", {
|
|
9501
|
-
className:
|
|
9502
|
+
className: K("text-2xs mt-1.5 hidden sm:block", r === t && "text-accent", r < t && "text-text-primary", r > t && "text-text-tertiary"),
|
|
9502
9503
|
children: n.label
|
|
9503
9504
|
}),
|
|
9504
9505
|
n.description && /* @__PURE__ */ _("span", {
|
|
@@ -9506,7 +9507,7 @@ function os({ steps: e, currentStep: t, className: n }) {
|
|
|
9506
9507
|
children: n.description
|
|
9507
9508
|
})
|
|
9508
9509
|
]
|
|
9509
|
-
}), r < e.length - 1 && /* @__PURE__ */ _("div", { className:
|
|
9510
|
+
}), r < e.length - 1 && /* @__PURE__ */ _("div", { className: K("mx-2 h-0.5 flex-1", r < t ? "bg-accent" : "bg-border") })]
|
|
9510
9511
|
}, n.label))
|
|
9511
9512
|
});
|
|
9512
9513
|
}
|
|
@@ -9537,7 +9538,7 @@ function ss({ tabs: e, defaultTab: t, value: n, onChange: r, className: i }) {
|
|
|
9537
9538
|
"aria-controls": `${f}-panel-${e.key}`,
|
|
9538
9539
|
onClick: () => d(e.key),
|
|
9539
9540
|
onKeyDown: g,
|
|
9540
|
-
className:
|
|
9541
|
+
className: K("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"),
|
|
9541
9542
|
children: [e.label, e.key === c && /* @__PURE__ */ _("div", { className: "bg-accent absolute right-0 bottom-0 left-0 h-0.5 rounded-md" })]
|
|
9542
9543
|
}, e.key))
|
|
9543
9544
|
}), /* @__PURE__ */ _("div", {
|
|
@@ -9582,7 +9583,7 @@ var cs = a(({ label: e, error: t, showCount: n, maxLength: r, value: i, classNam
|
|
|
9582
9583
|
id: h,
|
|
9583
9584
|
value: i,
|
|
9584
9585
|
maxLength: r,
|
|
9585
|
-
className:
|
|
9586
|
+
className: K("ui-sized-control 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),
|
|
9586
9587
|
...f
|
|
9587
9588
|
}),
|
|
9588
9589
|
/* @__PURE__ */ v("div", {
|
|
@@ -9649,7 +9650,7 @@ var ls = a(({ label: e, error: t, icon: n, className: r, id: i, readOnly: a, hin
|
|
|
9649
9650
|
id: m,
|
|
9650
9651
|
readOnly: a,
|
|
9651
9652
|
"aria-describedby": p.describedBy,
|
|
9652
|
-
className:
|
|
9653
|
+
className: K("ui-sized-control 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),
|
|
9653
9654
|
...d
|
|
9654
9655
|
})]
|
|
9655
9656
|
})
|
|
@@ -9661,14 +9662,14 @@ ls.displayName = "TextInput";
|
|
|
9661
9662
|
//#region src/components/ui/Timeline.tsx
|
|
9662
9663
|
function us({ items: e, className: t }) {
|
|
9663
9664
|
return /* @__PURE__ */ _("div", {
|
|
9664
|
-
className:
|
|
9665
|
+
className: K("space-y-0", t),
|
|
9665
9666
|
children: e.map((t, n) => /* @__PURE__ */ v("div", {
|
|
9666
9667
|
className: "flex gap-3",
|
|
9667
9668
|
children: [/* @__PURE__ */ v("div", {
|
|
9668
9669
|
className: "flex flex-col items-center",
|
|
9669
|
-
children: [/* @__PURE__ */ _("div", { className:
|
|
9670
|
+
children: [/* @__PURE__ */ _("div", { className: K(t.dot, "mt-1.5 h-2 w-2 shrink-0 rounded-full") }), n < e.length - 1 && /* @__PURE__ */ _("div", { className: "bg-border mt-1 w-px flex-1" })]
|
|
9670
9671
|
}), /* @__PURE__ */ v("div", {
|
|
9671
|
-
className:
|
|
9672
|
+
className: K("pb-4", n === e.length - 1 && "pb-0"),
|
|
9672
9673
|
children: [/* @__PURE__ */ _("p", {
|
|
9673
9674
|
className: "text-text-primary text-xs",
|
|
9674
9675
|
children: t.text
|
|
@@ -9701,7 +9702,7 @@ function ps({ content: e, placement: t = "top", children: r }) {
|
|
|
9701
9702
|
onBlur: () => a(!1),
|
|
9702
9703
|
children: [o(r) ? n(r, { "aria-describedby": fs(r.props["aria-describedby"], s) }) : r, i && /* @__PURE__ */ _("div", {
|
|
9703
9704
|
id: s,
|
|
9704
|
-
className:
|
|
9705
|
+
className: K("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", ds[t]),
|
|
9705
9706
|
role: "tooltip",
|
|
9706
9707
|
children: e
|
|
9707
9708
|
})]
|
|
@@ -9711,12 +9712,12 @@ function ps({ content: e, placement: t = "top", children: r }) {
|
|
|
9711
9712
|
//#region src/components/ui/Toolbar.tsx
|
|
9712
9713
|
function ms({ start: e, end: t, children: n, className: r, startClassName: i, endClassName: a }) {
|
|
9713
9714
|
return /* @__PURE__ */ v("div", {
|
|
9714
|
-
className:
|
|
9715
|
+
className: K("flex items-center justify-between gap-3", r),
|
|
9715
9716
|
children: [/* @__PURE__ */ _("div", {
|
|
9716
|
-
className:
|
|
9717
|
+
className: K("flex flex-1 items-center gap-3", i),
|
|
9717
9718
|
children: e ?? n
|
|
9718
9719
|
}), t && /* @__PURE__ */ _("div", {
|
|
9719
|
-
className:
|
|
9720
|
+
className: K("flex items-center gap-1.5", a),
|
|
9720
9721
|
children: t
|
|
9721
9722
|
})]
|
|
9722
9723
|
});
|
|
@@ -9728,7 +9729,7 @@ var hs = a(function({ title: e = "Drag and drop files here, or click to browse",
|
|
|
9728
9729
|
d(p, () => h.current, []);
|
|
9729
9730
|
let g = u(), y = `${c ?? g}-description`;
|
|
9730
9731
|
return /* @__PURE__ */ v("label", {
|
|
9731
|
-
className:
|
|
9732
|
+
className: K("ui-upload-dropzone border-border hover:border-border-strong relative block rounded-md border-2 border-dashed p-8 text-center transition-colors duration-[100ms]", i ? "cursor-not-allowed opacity-60" : "cursor-pointer hover:bg-bg-hover", s),
|
|
9732
9733
|
onDragOver: (e) => {
|
|
9733
9734
|
e.preventDefault(), e.dataTransfer.dropEffect = i || h.current?.matches(":disabled") ? "none" : "copy";
|
|
9734
9735
|
},
|
|
@@ -9757,7 +9758,7 @@ var hs = a(function({ title: e = "Drag and drop files here, or click to browse",
|
|
|
9757
9758
|
/* @__PURE__ */ _("div", {
|
|
9758
9759
|
"aria-hidden": "true",
|
|
9759
9760
|
className: "text-text-tertiary mx-auto mb-3 flex h-9 w-9 items-center justify-center rounded-md bg-bg-tertiary",
|
|
9760
|
-
children: n ?? /* @__PURE__ */ _(
|
|
9761
|
+
children: n ?? /* @__PURE__ */ _(ue, { className: "h-4.5 w-4.5" })
|
|
9761
9762
|
}),
|
|
9762
9763
|
/* @__PURE__ */ _("span", {
|
|
9763
9764
|
className: "text-text-secondary mb-1 block text-xs",
|
|
@@ -10161,7 +10162,7 @@ function Rs({ id: e, label: t, hint: n, error: r, required: i, optionalLabel: a,
|
|
|
10161
10162
|
},
|
|
10162
10163
|
children: /* @__PURE__ */ v("div", {
|
|
10163
10164
|
...c,
|
|
10164
|
-
className:
|
|
10165
|
+
className: K("flex flex-col gap-1.5", s),
|
|
10165
10166
|
children: [
|
|
10166
10167
|
/* @__PURE__ */ v("label", {
|
|
10167
10168
|
htmlFor: d,
|
|
@@ -10193,13 +10194,13 @@ function Rs({ id: e, label: t, hint: n, error: r, required: i, optionalLabel: a,
|
|
|
10193
10194
|
function zs({ className: e, ...t }) {
|
|
10194
10195
|
return /* @__PURE__ */ _("p", {
|
|
10195
10196
|
...t,
|
|
10196
|
-
className:
|
|
10197
|
+
className: K("text-text-secondary text-xs", e)
|
|
10197
10198
|
});
|
|
10198
10199
|
}
|
|
10199
10200
|
function Bs({ className: e, ...t }) {
|
|
10200
10201
|
return /* @__PURE__ */ _("p", {
|
|
10201
10202
|
...t,
|
|
10202
|
-
className:
|
|
10203
|
+
className: K("text-red text-xs", e)
|
|
10203
10204
|
});
|
|
10204
10205
|
}
|
|
10205
10206
|
//#endregion
|
|
@@ -10210,7 +10211,7 @@ function Vs({ id: e, legend: t, hint: n, error: r, children: i, className: a, "a
|
|
|
10210
10211
|
...s,
|
|
10211
10212
|
id: l,
|
|
10212
10213
|
"aria-describedby": p,
|
|
10213
|
-
className:
|
|
10214
|
+
className: K("min-w-0 space-y-2", a),
|
|
10214
10215
|
children: [
|
|
10215
10216
|
/* @__PURE__ */ _("legend", {
|
|
10216
10217
|
className: "text-text-primary font-label text-xs font-medium",
|
|
@@ -10241,7 +10242,7 @@ function Vs({ id: e, legend: t, hint: n, error: r, children: i, className: a, "a
|
|
|
10241
10242
|
var Hs = a(({ label: e, description: t, controlSize: n, className: r, id: i, "aria-describedby": a, "aria-invalid": o, ...s }, l) => {
|
|
10242
10243
|
let d = u(), f = sn(n), p = c(zn), m = i ?? p?.id ?? d, h = t ? `${m}-description` : void 0;
|
|
10243
10244
|
return /* @__PURE__ */ v("label", {
|
|
10244
|
-
className:
|
|
10245
|
+
className: K("ui-choice flex items-start gap-2.5", r),
|
|
10245
10246
|
"data-control-size": f,
|
|
10246
10247
|
children: [/* @__PURE__ */ _("input", {
|
|
10247
10248
|
...s,
|
|
@@ -10295,7 +10296,7 @@ function Ks(e) {
|
|
|
10295
10296
|
function qs({ name: e, size: t, status: n = "ready", statusLabel: r, error: i, onRetry: a, onRemove: o, onDownload: s, downloadHref: c, actionsDisabled: l, className: u, ...d }) {
|
|
10296
10297
|
return /* @__PURE__ */ v("li", {
|
|
10297
10298
|
...d,
|
|
10298
|
-
className:
|
|
10299
|
+
className: K("ui-attachment-item border-border flex items-center justify-between gap-3 rounded-md border p-3", u),
|
|
10299
10300
|
children: [/* @__PURE__ */ v("div", {
|
|
10300
10301
|
className: "min-w-0",
|
|
10301
10302
|
children: [
|
|
@@ -10310,7 +10311,7 @@ function qs({ name: e, size: t, status: n = "ready", statusLabel: r, error: i, o
|
|
|
10310
10311
|
/* @__PURE__ */ v("div", {
|
|
10311
10312
|
role: "status",
|
|
10312
10313
|
"aria-atomic": "true",
|
|
10313
|
-
className:
|
|
10314
|
+
className: K("text-2xs", n === "error" ? "text-red" : "text-text-secondary"),
|
|
10314
10315
|
children: [
|
|
10315
10316
|
e,
|
|
10316
10317
|
": ",
|
|
@@ -10360,7 +10361,7 @@ function Js({ children: e, className: t, "aria-label": n = "Attachments", ...r }
|
|
|
10360
10361
|
return /* @__PURE__ */ _("ul", {
|
|
10361
10362
|
...r,
|
|
10362
10363
|
"aria-label": n,
|
|
10363
|
-
className:
|
|
10364
|
+
className: K("space-y-2", t),
|
|
10364
10365
|
children: e
|
|
10365
10366
|
});
|
|
10366
10367
|
}
|
|
@@ -10428,7 +10429,7 @@ function Xs({ value: e, onChange: t, label: n, hint: r, error: i, id: a, name: o
|
|
|
10428
10429
|
return /* @__PURE__ */ v("fieldset", {
|
|
10429
10430
|
id: k,
|
|
10430
10431
|
disabled: s,
|
|
10431
|
-
className:
|
|
10432
|
+
className: K("space-y-2", d),
|
|
10432
10433
|
"aria-describedby": A,
|
|
10433
10434
|
children: [
|
|
10434
10435
|
/* @__PURE__ */ v("legend", {
|
|
@@ -10519,7 +10520,7 @@ function Zs({ className: e, width: t, height: n, style: r, ...i }) {
|
|
|
10519
10520
|
return /* @__PURE__ */ _("div", {
|
|
10520
10521
|
...i,
|
|
10521
10522
|
"aria-hidden": "true",
|
|
10522
|
-
className:
|
|
10523
|
+
className: K("ui-skeleton rounded-md bg-bg-tertiary", e),
|
|
10523
10524
|
style: {
|
|
10524
10525
|
width: t,
|
|
10525
10526
|
height: n,
|
|
@@ -10533,14 +10534,14 @@ function Qs({ items: e, activeKey: t, renderLink: n, className: r, "aria-label":
|
|
|
10533
10534
|
return /* @__PURE__ */ _("nav", {
|
|
10534
10535
|
...a,
|
|
10535
10536
|
"aria-label": i,
|
|
10536
|
-
className:
|
|
10537
|
+
className: K("ui-nav-tabs border-border border-b", r),
|
|
10537
10538
|
children: /* @__PURE__ */ _("ul", {
|
|
10538
10539
|
className: "ui-nav-tabs-list",
|
|
10539
10540
|
children: e.map((e) => {
|
|
10540
10541
|
let { key: r, label: i, badge: a, ...o } = e, s = {
|
|
10541
10542
|
...o,
|
|
10542
10543
|
"aria-current": r === t ? "page" : void 0,
|
|
10543
|
-
className:
|
|
10544
|
+
className: K("ui-nav-tab px-3 py-2 text-xs font-medium", r === t ? "text-accent" : "text-text-secondary", e.className),
|
|
10544
10545
|
children: /* @__PURE__ */ v(g, { children: [i, a !== void 0 && /* @__PURE__ */ _("span", {
|
|
10545
10546
|
className: "bg-bg-tertiary rounded-md px-1.5 text-2xs",
|
|
10546
10547
|
children: a
|
|
@@ -10560,7 +10561,7 @@ function $s({ value: e, maxLength: t, announcementDelay: n = 1e3, className: r,
|
|
|
10560
10561
|
return () => clearTimeout(e);
|
|
10561
10562
|
}, [s, n]), /* @__PURE__ */ v("p", {
|
|
10562
10563
|
...i,
|
|
10563
|
-
className:
|
|
10564
|
+
className: K("text-2xs", a < 0 ? "text-red" : "text-text-tertiary", r),
|
|
10564
10565
|
children: [/* @__PURE__ */ _("span", {
|
|
10565
10566
|
"aria-hidden": "true",
|
|
10566
10567
|
children: s
|
|
@@ -10608,7 +10609,7 @@ var tc = a(function({ label: e, value: t, min: n = 0, max: r = 100, color: i = "
|
|
|
10608
10609
|
...l,
|
|
10609
10610
|
ref: d,
|
|
10610
10611
|
id: p,
|
|
10611
|
-
className:
|
|
10612
|
+
className: K("ui-progress-bar", c),
|
|
10612
10613
|
max: r - n,
|
|
10613
10614
|
value: m === void 0 ? void 0 : m - n,
|
|
10614
10615
|
"aria-valuemin": n,
|
|
@@ -10624,7 +10625,7 @@ var tc = a(function({ label: e, value: t, min: n = 0, max: r = 100, color: i = "
|
|
|
10624
10625
|
function nc({ as: e, gap: t = 0, align: n = "stretch", justify: r = "start", className: a, style: o, ...s }) {
|
|
10625
10626
|
return i(e ?? "div", {
|
|
10626
10627
|
...s,
|
|
10627
|
-
className:
|
|
10628
|
+
className: K("ui-stack", a),
|
|
10628
10629
|
style: {
|
|
10629
10630
|
...no(t),
|
|
10630
10631
|
"--ui-align": ro(n),
|
|
@@ -10638,7 +10639,7 @@ function nc({ as: e, gap: t = 0, align: n = "stretch", justify: r = "start", cla
|
|
|
10638
10639
|
function rc({ as: e, gap: t = 0, gapX: n, gapY: r, align: a = "stretch", justify: o = "start", wrap: s = !1, inline: c = !1, stackBelow: l, className: u, style: d, ...f }) {
|
|
10639
10640
|
return i(e ?? "div", {
|
|
10640
10641
|
...f,
|
|
10641
|
-
className:
|
|
10642
|
+
className: K("ui-inline", u),
|
|
10642
10643
|
style: {
|
|
10643
10644
|
...no(t, n, r),
|
|
10644
10645
|
"--ui-align": ro(a),
|
|
@@ -10658,7 +10659,7 @@ function rc({ as: e, gap: t = 0, gapX: n, gapY: r, align: a = "stretch", justify
|
|
|
10658
10659
|
function ic({ as: e, columns: t = 1, gap: n = 0, gapX: r, gapY: a, align: o = "stretch", justify: s = "stretch", className: c, style: l, ...u }) {
|
|
10659
10660
|
return i(e ?? "div", {
|
|
10660
10661
|
...u,
|
|
10661
|
-
className:
|
|
10662
|
+
className: K("ui-grid", c),
|
|
10662
10663
|
style: {
|
|
10663
10664
|
...no(n, r, a),
|
|
10664
10665
|
...eo("columns", t, to, 1),
|
|
@@ -10673,7 +10674,7 @@ function ic({ as: e, columns: t = 1, gap: n = 0, gapX: r, gapY: a, align: o = "s
|
|
|
10673
10674
|
function ac({ as: e, span: t = 1, className: n, style: r, ...a }) {
|
|
10674
10675
|
return i(e ?? "div", {
|
|
10675
10676
|
...a,
|
|
10676
|
-
className:
|
|
10677
|
+
className: K("ui-grid-item", n),
|
|
10677
10678
|
style: {
|
|
10678
10679
|
...eo("span", t, (e) => `span ${e} / span ${e}`, 1),
|
|
10679
10680
|
...r
|
|
@@ -10685,7 +10686,7 @@ function ac({ as: e, span: t = 1, className: n, style: r, ...a }) {
|
|
|
10685
10686
|
function oc({ caption: e, captionHidden: t = !1, stickyHeader: n = !1, maxHeight: r, wrapperClassName: i, wrapperProps: a, className: o, children: s, ...c }) {
|
|
10686
10687
|
return /* @__PURE__ */ _("div", {
|
|
10687
10688
|
...a,
|
|
10688
|
-
className:
|
|
10689
|
+
className: K("ui-table-wrap", a?.className, i),
|
|
10689
10690
|
style: {
|
|
10690
10691
|
maxHeight: r,
|
|
10691
10692
|
...r ? { overflow: "auto" } : {},
|
|
@@ -10693,9 +10694,9 @@ function oc({ caption: e, captionHidden: t = !1, stickyHeader: n = !1, maxHeight
|
|
|
10693
10694
|
},
|
|
10694
10695
|
children: /* @__PURE__ */ v("table", {
|
|
10695
10696
|
...c,
|
|
10696
|
-
className:
|
|
10697
|
+
className: K("ui-table", n && "ui-table-sticky", o),
|
|
10697
10698
|
children: [e != null && /* @__PURE__ */ _("caption", {
|
|
10698
|
-
className:
|
|
10699
|
+
className: K(t && "sr-only"),
|
|
10699
10700
|
children: e
|
|
10700
10701
|
}), s]
|
|
10701
10702
|
})
|
|
@@ -10704,20 +10705,20 @@ function oc({ caption: e, captionHidden: t = !1, stickyHeader: n = !1, maxHeight
|
|
|
10704
10705
|
function sc({ className: e, ...t }) {
|
|
10705
10706
|
return /* @__PURE__ */ _("thead", {
|
|
10706
10707
|
...t,
|
|
10707
|
-
className:
|
|
10708
|
+
className: K("ui-table-head", e)
|
|
10708
10709
|
});
|
|
10709
10710
|
}
|
|
10710
10711
|
function cc({ className: e, ...t }) {
|
|
10711
10712
|
return /* @__PURE__ */ _("tbody", {
|
|
10712
10713
|
...t,
|
|
10713
|
-
className:
|
|
10714
|
+
className: K("ui-table-body", e)
|
|
10714
10715
|
});
|
|
10715
10716
|
}
|
|
10716
10717
|
function lc({ selected: e, interactive: t = !1, className: n, ...r }) {
|
|
10717
10718
|
return /* @__PURE__ */ _("tr", {
|
|
10718
10719
|
...r,
|
|
10719
10720
|
"aria-selected": e ?? r["aria-selected"],
|
|
10720
|
-
className:
|
|
10721
|
+
className: K("ui-table-row", t && "ui-table-interactive", n)
|
|
10721
10722
|
});
|
|
10722
10723
|
}
|
|
10723
10724
|
function uc({ numeric: e = !1, align: t, sort: n, scope: r = "col", className: i, style: a, ...o }) {
|
|
@@ -10725,7 +10726,7 @@ function uc({ numeric: e = !1, align: t, sort: n, scope: r = "col", className: i
|
|
|
10725
10726
|
...o,
|
|
10726
10727
|
scope: r,
|
|
10727
10728
|
"aria-sort": n ?? o["aria-sort"],
|
|
10728
|
-
className:
|
|
10729
|
+
className: K("ui-table-header-cell", e && "ui-table-numeric", i),
|
|
10729
10730
|
style: {
|
|
10730
10731
|
...t ? { textAlign: t } : {},
|
|
10731
10732
|
...a
|
|
@@ -10735,7 +10736,7 @@ function uc({ numeric: e = !1, align: t, sort: n, scope: r = "col", className: i
|
|
|
10735
10736
|
function dc({ numeric: e = !1, align: t, nowrap: n = !1, className: r, style: i, ...a }) {
|
|
10736
10737
|
return /* @__PURE__ */ _("td", {
|
|
10737
10738
|
...a,
|
|
10738
|
-
className:
|
|
10739
|
+
className: K("ui-table-cell", e && "ui-table-numeric", n && "ui-table-nowrap", r),
|
|
10739
10740
|
style: {
|
|
10740
10741
|
...t ? { textAlign: t } : {},
|
|
10741
10742
|
...i
|
|
@@ -10745,7 +10746,7 @@ function dc({ numeric: e = !1, align: t, nowrap: n = !1, className: r, style: i,
|
|
|
10745
10746
|
function fc({ colSpan: e, children: t, className: n, ...r }) {
|
|
10746
10747
|
return /* @__PURE__ */ _("tr", {
|
|
10747
10748
|
...r,
|
|
10748
|
-
className:
|
|
10749
|
+
className: K("ui-table-empty-row", n),
|
|
10749
10750
|
children: /* @__PURE__ */ _("td", {
|
|
10750
10751
|
colSpan: e,
|
|
10751
10752
|
className: "ui-table-empty-cell",
|
|
@@ -10754,4 +10755,4 @@ function fc({ colSpan: e, children: t, className: n, ...r }) {
|
|
|
10754
10755
|
});
|
|
10755
10756
|
}
|
|
10756
10757
|
//#endregion
|
|
10757
|
-
export { Yn as Alert, In as AppShell, We as AreaChart, qs as AttachmentItem, Js as AttachmentList, Xn as AuthCard, Ln as AuthLayout, Zn as AuthorByline, zt as Avatar, Rn as BackLink, er as Badge, qe as BarChart, ft as BottomNav, rn as Breadcrumbs, mn as Button, ht as COMMAND_PALETTE_EVENT, Hi as Calendar, Yi as CalendarGrid, Xi as Card, $s as CharacterCount, Vn as Checkbox, na as CodeInput, Wn as ColumnPicker, ra as Combobox, bt as CommandPalette, ec as ControlSizeProvider, Ni as DEFAULT_CALENDAR_LABELS, gt as DEFAULT_COMMAND_PALETTE_SHORTCUT, ia as DangerZone, Xs as DatePartsInput, oa as DatePicker, ua as DateRangePicker, ga as DateTimePicker, xa as DetailPanel, Wa as Dialog, Ga as DialogActions, Ka as DividerLabel, Ye as DonutChart, qa as DropdownMenu, Ja as EmptyState, Ya as ErrorBoundary, Bs as FieldError, zs as FieldHint, Vs as Fieldset, Hn as FilterButton, Xa as FilterDropdown, Rs as FormField, ic as Grid, ac as GridItem, rc as Inline, Za as Kbd, $a as LoadingSpinner, so as MetadataGrid, co as MetricCard, St as MobileDrawer, Qs as NavTabs, mo as OAuthButton, ho as PageHeader, go as PageSection, Gn as Pagination, vo as PaginationBar, bo as PasswordInput, Co as PasswordRequirements, wo as ProfileHeader, tc as ProgressBar, To as ProseContent, Eo as QrCapacityError, Yo as QrCode, Xe as RadarChart, Ze as RadialBarChart, Ws as Radio, Pi as RadioPill, qn as ResourceTable, Xo as SearchInput, hn as SectionHeader, Zo as Select, Cn as SelectDropdown, Qo as SettingRow, Pt as SettingsContext, Fs as SettingsProvider, $o as SideSheet, tn as Sidebar, Zs as Skeleton, wn as Slider, Qe as SparkLine, ns as SplitPaneLayout, nc as Stack, at as StackedBarChart, as as StatusDot, os as StepProgress, Dn as THEME_MENU_EVENT, oc as Table, cc as TableBody, dc as TableCell, fc as TableEmptyRow, sc as TableHead, uc as TableHeaderCell, lc as TableRow, ss as Tabs, ls as TextInput, cs as Textarea, gs as ThemeContext, An as ThemeMenu, Tn as ThemePreview, Ls as ThemeProvider, us as Timeline, Ht as ToastProvider, En as Toggle, ms as Toolbar, ps as Tooltip, Pn as TopBar, hs as UploadDropzone, ct as VerticalBarChart, Mt as accentItems, Q as addDays, cr as addMinutes, lr as addMonths, rr as calendarDateFromParts, Z as calendarDateParts,
|
|
10758
|
+
export { Yn as Alert, In as AppShell, We as AreaChart, qs as AttachmentItem, Js as AttachmentList, Xn as AuthCard, Ln as AuthLayout, Zn as AuthorByline, zt as Avatar, Rn as BackLink, er as Badge, qe as BarChart, ft as BottomNav, rn as Breadcrumbs, mn as Button, ht as COMMAND_PALETTE_EVENT, Hi as Calendar, Yi as CalendarGrid, Xi as Card, $s as CharacterCount, Vn as Checkbox, na as CodeInput, Wn as ColumnPicker, ra as Combobox, bt as CommandPalette, ec as ControlSizeProvider, Ni as DEFAULT_CALENDAR_LABELS, gt as DEFAULT_COMMAND_PALETTE_SHORTCUT, ia as DangerZone, Xs as DatePartsInput, oa as DatePicker, ua as DateRangePicker, ga as DateTimePicker, xa as DetailPanel, Wa as Dialog, Ga as DialogActions, Ka as DividerLabel, Ye as DonutChart, qa as DropdownMenu, Ja as EmptyState, Ya as ErrorBoundary, Bs as FieldError, zs as FieldHint, Vs as Fieldset, Hn as FilterButton, Xa as FilterDropdown, Rs as FormField, ic as Grid, ac as GridItem, rc as Inline, Za as Kbd, $a as LoadingSpinner, so as MetadataGrid, co as MetricCard, St as MobileDrawer, Qs as NavTabs, mo as OAuthButton, ho as PageHeader, go as PageSection, Gn as Pagination, vo as PaginationBar, bo as PasswordInput, Co as PasswordRequirements, wo as ProfileHeader, tc as ProgressBar, To as ProseContent, Eo as QrCapacityError, Yo as QrCode, Xe as RadarChart, Ze as RadialBarChart, Ws as Radio, Pi as RadioPill, qn as ResourceTable, Xo as SearchInput, hn as SectionHeader, Zo as Select, Cn as SelectDropdown, Qo as SettingRow, Pt as SettingsContext, Fs as SettingsProvider, $o as SideSheet, tn as Sidebar, Zs as Skeleton, wn as Slider, Qe as SparkLine, ns as SplitPaneLayout, nc as Stack, at as StackedBarChart, as as StatusDot, os as StepProgress, Dn as THEME_MENU_EVENT, oc as Table, cc as TableBody, dc as TableCell, fc as TableEmptyRow, sc as TableHead, uc as TableHeaderCell, lc as TableRow, ss as Tabs, ls as TextInput, cs as Textarea, gs as ThemeContext, An as ThemeMenu, Tn as ThemePreview, Ls as ThemeProvider, us as Timeline, Ht as ToastProvider, En as Toggle, ms as Toolbar, ps as Tooltip, Pn as TopBar, hs as UploadDropzone, ct as VerticalBarChart, Mt as accentItems, Q as addDays, cr as addMinutes, lr as addMonths, rr as calendarDateFromParts, Z as calendarDateParts, K as cn, Qr as createCalendarDateMath, Dt as darkThemes, gr as dateAtMinutes, xo as defaultPasswordRequirements, pr as differenceInDays, Jo as encodeQrCode, Gr as expandAvailabilityRules, jt as fontOptions, bs as formatDateLong, ys as formatDateShort, Pr as formatRangeTitle, xs as formatRelative, Ar as formatTime, vr as formatTimeOfDay, jr as formatTimeRange, br as fromDateKey, Wr as getActiveResourceIds, Er as getViewRange, wr as getVisibleDays, ut as handleAppShellNavigate, Zr as isAllDayLike, lt as isAppShellPathActive, Tt as isLightTheme, fr as isSameDay, Cr as isTimeGridView, zr as layoutOverlaps, Et as lightThemes, vt as matchesCommandPaletteShortcut, So as meetsPasswordRequirements, mr as minutesOfDay, dt as navigateToPath, _t as openCommandPalette, On as openThemeMenu, _r as parseTime, Fr as rangesOverlap, Dr as shiftDate, Sr as snapDate, xr as snapMinutes, Kn as sortRows, sr as startOfDay, dr as startOfMonth, ur as startOfWeek, At as themeDefaults, Ct as themeItems, yr as toDateKey, an as useApplyTheme, sn as useControlSize, Nt as useDismiss, mt as useFocusTrap, Ft as useSettings, _s as useTheme, Vt as useToast };
|