florixui 1.6.1 → 1.7.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/README.md +28 -0
- package/dist/components/custom/color-picker.d.ts +24 -0
- package/dist/components/custom/map-marker-pin.d.ts +27 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +870 -737
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2,25 +2,25 @@ import { clsx as e } from "clsx";
|
|
|
2
2
|
import { twMerge as t } from "tailwind-merge";
|
|
3
3
|
import * as n from "react";
|
|
4
4
|
import { createContext as r, forwardRef as i, useCallback as a, useContext as o, useEffect as s, useId as c, useImperativeHandle as l, useMemo as u, useRef as d, useState as f } from "react";
|
|
5
|
-
import { AlertCircleIcon as p, AlertTriangle as m, ArrowLeftIcon as h, Calendar as g, Check as _, CheckIcon as v, ChevronDown as y, ChevronDownIcon as b, ChevronLeftIcon as x, ChevronRightIcon as S, ChevronUpIcon as C, ChevronsLeftIcon as w, ChevronsRightIcon as T, CircleCheckIcon as E, CircleDotIcon as
|
|
5
|
+
import { AlertCircleIcon as p, AlertTriangle as m, ArrowLeftIcon as h, Calendar as g, Check as _, CheckIcon as v, ChevronDown as y, ChevronDownIcon as b, ChevronLeftIcon as x, ChevronRightIcon as S, ChevronUpIcon as C, ChevronsLeftIcon as w, ChevronsRightIcon as T, CircleCheckIcon as E, CircleDotIcon as ee, CircleXIcon as D, Clock as O, Eye as k, EyeOff as te, FileArchiveIcon as A, FileIcon as j, FileSpreadsheetIcon as M, FileTextIcon as N, HeadphonesIcon as P, HomeIcon as F, ImageIcon as I, ImageUpIcon as ne, InboxIcon as L, InfoIcon as R, Layers as z, Loader2 as re, Loader2Icon as B, LoaderCircleIcon as ie, Locate as ae, Maximize as V, Minus as oe, MoreVertical as H, OctagonXIcon as se, PaintBucketIcon as ce, Plus as le, PlusCircleIcon as ue, PlusIcon as de, RefreshCwIcon as fe, SearchIcon as pe, Trash2Icon as me, TrendingDownIcon as he, TrendingUpIcon as ge, TriangleAlertIcon as _e, UploadIcon as ve, VideoIcon as ye, X as be, XIcon as U } from "lucide-react";
|
|
6
6
|
import { cva as W } from "class-variance-authority";
|
|
7
|
-
import { AlertDialog as G, Checkbox as
|
|
7
|
+
import { AlertDialog as G, Checkbox as xe, Dialog as K, DropdownMenu as q, HoverCard as Se, Label as Ce, Popover as we, Progress as Te, RadioGroup as Ee, Select as J, Separator as De, Slider as Oe, Slot as ke, Switch as Ae, Tabs as je, Toggle as Me, ToggleGroup as Ne, Tooltip as Pe } from "radix-ui";
|
|
8
8
|
import { Fragment as Y, jsx as X, jsxs as Z } from "react/jsx-runtime";
|
|
9
|
-
import { Command as
|
|
10
|
-
import * as
|
|
11
|
-
import { Area as
|
|
12
|
-
import { DayPicker as
|
|
13
|
-
import
|
|
14
|
-
import { createPortal as
|
|
15
|
-
import { useTheme as
|
|
16
|
-
import { Toaster as
|
|
9
|
+
import { Command as Fe } from "cmdk";
|
|
10
|
+
import * as Ie from "recharts";
|
|
11
|
+
import { Area as Le, AreaChart as Re, ResponsiveContainer as ze } from "recharts";
|
|
12
|
+
import { DayPicker as Be, getDefaultClassNames as Ve } from "react-day-picker";
|
|
13
|
+
import He from "maplibre-gl";
|
|
14
|
+
import { createPortal as Ue } from "react-dom";
|
|
15
|
+
import { useTheme as We } from "next-themes";
|
|
16
|
+
import { Toaster as Ge } from "sonner";
|
|
17
17
|
//#region src/lib/utils.ts
|
|
18
18
|
function Q(...n) {
|
|
19
19
|
return t(e(n));
|
|
20
20
|
}
|
|
21
21
|
//#endregion
|
|
22
22
|
//#region src/lib/use-file-upload.ts
|
|
23
|
-
var
|
|
23
|
+
var Ke = (e, t = 2) => {
|
|
24
24
|
if (e === 0) return "0 Bytes";
|
|
25
25
|
let n = 1024, r = t < 0 ? 0 : t, i = [
|
|
26
26
|
"Bytes",
|
|
@@ -34,7 +34,7 @@ var Ge = (e, t = 2) => {
|
|
|
34
34
|
"YB"
|
|
35
35
|
], a = Math.floor(Math.log(e) / Math.log(n));
|
|
36
36
|
return Number.parseFloat((e / n ** a).toFixed(r)) + i[a];
|
|
37
|
-
},
|
|
37
|
+
}, qe = (e = {}) => {
|
|
38
38
|
let { maxFiles: t = Infinity, maxSize: n = Infinity, accept: r = "*", multiple: i = !1, initialFiles: o = [], onFilesChange: s, onFilesAdded: c } = e, [l, u] = f({
|
|
39
39
|
errors: [],
|
|
40
40
|
files: o.map((e) => ({
|
|
@@ -44,7 +44,7 @@ var Ge = (e, t = 2) => {
|
|
|
44
44
|
})),
|
|
45
45
|
isDragging: !1
|
|
46
46
|
}), p = d(null), m = a((e) => {
|
|
47
|
-
if (e.size > n) return `File "${e.name}" exceeds the maximum size of ${
|
|
47
|
+
if (e.size > n) return `File "${e.name}" exceeds the maximum size of ${Ke(n)}.`;
|
|
48
48
|
if (r !== "*") {
|
|
49
49
|
let t = r.split(",").map((e) => e.trim()), n = e instanceof File ? e.type || "" : e.type, i = `.${e.name.split(".").pop()}`;
|
|
50
50
|
if (!t.some((e) => {
|
|
@@ -85,7 +85,7 @@ var Ge = (e, t = 2) => {
|
|
|
85
85
|
for (let e of r) {
|
|
86
86
|
if (i && l.files.some((t) => t.file.name === e.name && t.file.size === e.size)) continue;
|
|
87
87
|
if (e.size > n) {
|
|
88
|
-
a.push(i ? `Some files exceed the maximum size of ${
|
|
88
|
+
a.push(i ? `Some files exceed the maximum size of ${Ke(n)}.` : `File exceeds the maximum size of ${Ke(n)}.`);
|
|
89
89
|
continue;
|
|
90
90
|
}
|
|
91
91
|
let t = m(e);
|
|
@@ -190,7 +190,7 @@ var Ge = (e, t = 2) => {
|
|
|
190
190
|
};
|
|
191
191
|
//#endregion
|
|
192
192
|
//#region src/components/ui/spinner.tsx
|
|
193
|
-
function
|
|
193
|
+
function Je({ className: e, ...t }) {
|
|
194
194
|
return /* @__PURE__ */ X(B, {
|
|
195
195
|
role: "status",
|
|
196
196
|
"aria-label": "Loading",
|
|
@@ -200,7 +200,7 @@ function qe({ className: e, ...t }) {
|
|
|
200
200
|
}
|
|
201
201
|
//#endregion
|
|
202
202
|
//#region src/components/ui/button.tsx
|
|
203
|
-
var
|
|
203
|
+
var Ye = W("group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
|
|
204
204
|
variants: {
|
|
205
205
|
variant: {
|
|
206
206
|
default: "bg-primary text-primary-foreground hover:bg-primary/80",
|
|
@@ -227,8 +227,8 @@ var Je = W("group/button inline-flex shrink-0 items-center justify-center rounde
|
|
|
227
227
|
}
|
|
228
228
|
});
|
|
229
229
|
function $({ className: e, variant: t = "default", size: n = "default", asChild: r = !1, loading: i = !1, startItem: a, endItem: o, disabled: s, children: c, ...l }) {
|
|
230
|
-
let u = r ?
|
|
231
|
-
i ? /* @__PURE__ */ X(
|
|
230
|
+
let u = r ? ke.Root : "button", d = r ? c : /* @__PURE__ */ Z(Y, { children: [
|
|
231
|
+
i ? /* @__PURE__ */ X(Je, {}) : a,
|
|
232
232
|
c,
|
|
233
233
|
o
|
|
234
234
|
] });
|
|
@@ -240,7 +240,7 @@ function $({ className: e, variant: t = "default", size: n = "default", asChild:
|
|
|
240
240
|
disabled: s ?? (u === "button" ? i : void 0),
|
|
241
241
|
"aria-disabled": i || void 0,
|
|
242
242
|
"aria-busy": i || void 0,
|
|
243
|
-
className: Q(
|
|
243
|
+
className: Q(Ye({
|
|
244
244
|
variant: t,
|
|
245
245
|
size: n,
|
|
246
246
|
className: e
|
|
@@ -251,25 +251,25 @@ function $({ className: e, variant: t = "default", size: n = "default", asChild:
|
|
|
251
251
|
}
|
|
252
252
|
//#endregion
|
|
253
253
|
//#region src/components/ui/dropdown-menu.tsx
|
|
254
|
-
function
|
|
254
|
+
function Xe({ ...e }) {
|
|
255
255
|
return /* @__PURE__ */ X(q.Root, {
|
|
256
256
|
"data-slot": "dropdown-menu",
|
|
257
257
|
...e
|
|
258
258
|
});
|
|
259
259
|
}
|
|
260
|
-
function
|
|
260
|
+
function Ze({ ...e }) {
|
|
261
261
|
return /* @__PURE__ */ X(q.Portal, {
|
|
262
262
|
"data-slot": "dropdown-menu-portal",
|
|
263
263
|
...e
|
|
264
264
|
});
|
|
265
265
|
}
|
|
266
|
-
function
|
|
266
|
+
function Qe({ ...e }) {
|
|
267
267
|
return /* @__PURE__ */ X(q.Trigger, {
|
|
268
268
|
"data-slot": "dropdown-menu-trigger",
|
|
269
269
|
...e
|
|
270
270
|
});
|
|
271
271
|
}
|
|
272
|
-
function
|
|
272
|
+
function $e({ className: e, align: t = "start", sideOffset: n = 4, ...r }) {
|
|
273
273
|
return /* @__PURE__ */ X(q.Portal, { children: /* @__PURE__ */ X(q.Content, {
|
|
274
274
|
"data-slot": "dropdown-menu-content",
|
|
275
275
|
sideOffset: n,
|
|
@@ -278,13 +278,13 @@ function Qe({ className: e, align: t = "start", sideOffset: n = 4, ...r }) {
|
|
|
278
278
|
...r
|
|
279
279
|
}) });
|
|
280
280
|
}
|
|
281
|
-
function
|
|
281
|
+
function et({ ...e }) {
|
|
282
282
|
return /* @__PURE__ */ X(q.Group, {
|
|
283
283
|
"data-slot": "dropdown-menu-group",
|
|
284
284
|
...e
|
|
285
285
|
});
|
|
286
286
|
}
|
|
287
|
-
function
|
|
287
|
+
function tt({ className: e, inset: t, variant: n = "default", ...r }) {
|
|
288
288
|
return /* @__PURE__ */ X(q.Item, {
|
|
289
289
|
"data-slot": "dropdown-menu-item",
|
|
290
290
|
"data-inset": t,
|
|
@@ -293,7 +293,7 @@ function et({ className: e, inset: t, variant: n = "default", ...r }) {
|
|
|
293
293
|
...r
|
|
294
294
|
});
|
|
295
295
|
}
|
|
296
|
-
function
|
|
296
|
+
function nt({ className: e, children: t, checked: n, inset: r, ...i }) {
|
|
297
297
|
return /* @__PURE__ */ Z(q.CheckboxItem, {
|
|
298
298
|
"data-slot": "dropdown-menu-checkbox-item",
|
|
299
299
|
"data-inset": r,
|
|
@@ -307,13 +307,13 @@ function tt({ className: e, children: t, checked: n, inset: r, ...i }) {
|
|
|
307
307
|
}), t]
|
|
308
308
|
});
|
|
309
309
|
}
|
|
310
|
-
function
|
|
310
|
+
function rt({ ...e }) {
|
|
311
311
|
return /* @__PURE__ */ X(q.RadioGroup, {
|
|
312
312
|
"data-slot": "dropdown-menu-radio-group",
|
|
313
313
|
...e
|
|
314
314
|
});
|
|
315
315
|
}
|
|
316
|
-
function
|
|
316
|
+
function it({ className: e, children: t, inset: n, ...r }) {
|
|
317
317
|
return /* @__PURE__ */ Z(q.RadioItem, {
|
|
318
318
|
"data-slot": "dropdown-menu-radio-item",
|
|
319
319
|
"data-inset": n,
|
|
@@ -326,7 +326,7 @@ function rt({ className: e, children: t, inset: n, ...r }) {
|
|
|
326
326
|
}), t]
|
|
327
327
|
});
|
|
328
328
|
}
|
|
329
|
-
function
|
|
329
|
+
function at({ className: e, inset: t, ...n }) {
|
|
330
330
|
return /* @__PURE__ */ X(q.Label, {
|
|
331
331
|
"data-slot": "dropdown-menu-label",
|
|
332
332
|
"data-inset": t,
|
|
@@ -334,27 +334,27 @@ function it({ className: e, inset: t, ...n }) {
|
|
|
334
334
|
...n
|
|
335
335
|
});
|
|
336
336
|
}
|
|
337
|
-
function
|
|
337
|
+
function ot({ className: e, ...t }) {
|
|
338
338
|
return /* @__PURE__ */ X(q.Separator, {
|
|
339
339
|
"data-slot": "dropdown-menu-separator",
|
|
340
340
|
className: Q("-mx-1 my-1 h-px bg-border", e),
|
|
341
341
|
...t
|
|
342
342
|
});
|
|
343
343
|
}
|
|
344
|
-
function
|
|
344
|
+
function st({ className: e, ...t }) {
|
|
345
345
|
return /* @__PURE__ */ X("span", {
|
|
346
346
|
"data-slot": "dropdown-menu-shortcut",
|
|
347
347
|
className: Q("ml-auto text-xs tracking-widest text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground", e),
|
|
348
348
|
...t
|
|
349
349
|
});
|
|
350
350
|
}
|
|
351
|
-
function
|
|
351
|
+
function ct({ ...e }) {
|
|
352
352
|
return /* @__PURE__ */ X(q.Sub, {
|
|
353
353
|
"data-slot": "dropdown-menu-sub",
|
|
354
354
|
...e
|
|
355
355
|
});
|
|
356
356
|
}
|
|
357
|
-
function
|
|
357
|
+
function lt({ className: e, inset: t, children: n, ...r }) {
|
|
358
358
|
return /* @__PURE__ */ Z(q.SubTrigger, {
|
|
359
359
|
"data-slot": "dropdown-menu-sub-trigger",
|
|
360
360
|
"data-inset": t,
|
|
@@ -363,7 +363,7 @@ function ct({ className: e, inset: t, children: n, ...r }) {
|
|
|
363
363
|
children: [n, /* @__PURE__ */ X(S, { className: "ml-auto" })]
|
|
364
364
|
});
|
|
365
365
|
}
|
|
366
|
-
function
|
|
366
|
+
function ut({ className: e, ...t }) {
|
|
367
367
|
return /* @__PURE__ */ X(q.SubContent, {
|
|
368
368
|
"data-slot": "dropdown-menu-sub-content",
|
|
369
369
|
className: Q("z-50 min-w-[96px] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-lg bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", e),
|
|
@@ -372,42 +372,42 @@ function lt({ className: e, ...t }) {
|
|
|
372
372
|
}
|
|
373
373
|
//#endregion
|
|
374
374
|
//#region src/components/custom/actions-menu.tsx
|
|
375
|
-
var
|
|
376
|
-
function
|
|
375
|
+
var dt = 16;
|
|
376
|
+
function ft(e) {
|
|
377
377
|
return e.type === void 0 || e.type === "action";
|
|
378
378
|
}
|
|
379
|
-
function
|
|
380
|
-
return /* @__PURE__ */ Z(
|
|
379
|
+
function pt({ items: e, trigger: t, triggerIcon: n = H, triggerLabel: r = "Open menu", width: i = "10rem", align: a = "end", className: o, open: s, onOpenChange: c }) {
|
|
380
|
+
return /* @__PURE__ */ Z(Xe, {
|
|
381
381
|
open: s,
|
|
382
382
|
onOpenChange: c,
|
|
383
|
-
children: [/* @__PURE__ */ X(
|
|
383
|
+
children: [/* @__PURE__ */ X(Qe, {
|
|
384
384
|
asChild: !0,
|
|
385
385
|
children: t ?? /* @__PURE__ */ Z($, {
|
|
386
386
|
variant: "ghost",
|
|
387
387
|
size: "icon",
|
|
388
388
|
className: Q("size-8", o),
|
|
389
389
|
"aria-label": r,
|
|
390
|
-
children: [/* @__PURE__ */ X(n, { size:
|
|
390
|
+
children: [/* @__PURE__ */ X(n, { size: dt }), /* @__PURE__ */ X("span", {
|
|
391
391
|
className: "sr-only",
|
|
392
392
|
children: r
|
|
393
393
|
})]
|
|
394
394
|
})
|
|
395
|
-
}), /* @__PURE__ */ X(
|
|
395
|
+
}), /* @__PURE__ */ X($e, {
|
|
396
396
|
align: a,
|
|
397
397
|
style: { width: i },
|
|
398
398
|
children: e.map((e, t) => {
|
|
399
|
-
if (e.type === "separator") return /* @__PURE__ */ X(
|
|
400
|
-
if (e.type === "label") return /* @__PURE__ */ X(
|
|
401
|
-
if (!
|
|
399
|
+
if (e.type === "separator") return /* @__PURE__ */ X(ot, {}, `sep-${t}`);
|
|
400
|
+
if (e.type === "label") return /* @__PURE__ */ X(at, { children: e.label }, `label-${t}`);
|
|
401
|
+
if (!ft(e)) return null;
|
|
402
402
|
let n = e.icon;
|
|
403
|
-
return /* @__PURE__ */ Z(
|
|
403
|
+
return /* @__PURE__ */ Z(tt, {
|
|
404
404
|
onSelect: e.onSelect,
|
|
405
405
|
disabled: e.disabled,
|
|
406
406
|
variant: e.destructive ? "destructive" : "default",
|
|
407
407
|
children: [
|
|
408
|
-
n && /* @__PURE__ */ X(n, { size:
|
|
408
|
+
n && /* @__PURE__ */ X(n, { size: dt }),
|
|
409
409
|
e.label,
|
|
410
|
-
e.shortcut && /* @__PURE__ */ X(
|
|
410
|
+
e.shortcut && /* @__PURE__ */ X(st, { children: e.shortcut })
|
|
411
411
|
]
|
|
412
412
|
}, t);
|
|
413
413
|
})
|
|
@@ -416,8 +416,8 @@ function ft({ items: e, trigger: t, triggerIcon: n = H, triggerLabel: r = "Open
|
|
|
416
416
|
}
|
|
417
417
|
//#endregion
|
|
418
418
|
//#region src/components/ui/label.tsx
|
|
419
|
-
function
|
|
420
|
-
return /* @__PURE__ */ X(
|
|
419
|
+
function mt({ className: e, ...t }) {
|
|
420
|
+
return /* @__PURE__ */ X(Ce.Root, {
|
|
421
421
|
"data-slot": "label",
|
|
422
422
|
className: Q("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50", e),
|
|
423
423
|
...t
|
|
@@ -425,8 +425,8 @@ function pt({ className: e, ...t }) {
|
|
|
425
425
|
}
|
|
426
426
|
//#endregion
|
|
427
427
|
//#region src/components/ui/separator.tsx
|
|
428
|
-
function
|
|
429
|
-
return /* @__PURE__ */ X(
|
|
428
|
+
function ht({ className: e, orientation: t = "horizontal", decorative: n = !0, ...r }) {
|
|
429
|
+
return /* @__PURE__ */ X(De.Root, {
|
|
430
430
|
"data-slot": "separator",
|
|
431
431
|
decorative: n,
|
|
432
432
|
orientation: t,
|
|
@@ -436,14 +436,14 @@ function mt({ className: e, orientation: t = "horizontal", decorative: n = !0, .
|
|
|
436
436
|
}
|
|
437
437
|
//#endregion
|
|
438
438
|
//#region src/components/ui/field.tsx
|
|
439
|
-
function
|
|
439
|
+
function gt({ className: e, ...t }) {
|
|
440
440
|
return /* @__PURE__ */ X("fieldset", {
|
|
441
441
|
"data-slot": "field-set",
|
|
442
442
|
className: Q("flex flex-col gap-4 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3", e),
|
|
443
443
|
...t
|
|
444
444
|
});
|
|
445
445
|
}
|
|
446
|
-
function
|
|
446
|
+
function _t({ className: e, variant: t = "legend", ...n }) {
|
|
447
447
|
return /* @__PURE__ */ X("legend", {
|
|
448
448
|
"data-slot": "field-legend",
|
|
449
449
|
"data-variant": t,
|
|
@@ -451,14 +451,14 @@ function gt({ className: e, variant: t = "legend", ...n }) {
|
|
|
451
451
|
...n
|
|
452
452
|
});
|
|
453
453
|
}
|
|
454
|
-
function
|
|
454
|
+
function vt({ className: e, ...t }) {
|
|
455
455
|
return /* @__PURE__ */ X("div", {
|
|
456
456
|
"data-slot": "field-group",
|
|
457
457
|
className: Q("group/field-group @container/field-group flex w-full flex-col gap-5 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4", e),
|
|
458
458
|
...t
|
|
459
459
|
});
|
|
460
460
|
}
|
|
461
|
-
var
|
|
461
|
+
var yt = W("group/field flex w-full gap-2 data-[invalid=true]:text-destructive", {
|
|
462
462
|
variants: { orientation: {
|
|
463
463
|
vertical: "flex-col *:w-full [&>.sr-only]:w-auto",
|
|
464
464
|
horizontal: "flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",
|
|
@@ -466,57 +466,57 @@ var vt = W("group/field flex w-full gap-2 data-[invalid=true]:text-destructive",
|
|
|
466
466
|
} },
|
|
467
467
|
defaultVariants: { orientation: "vertical" }
|
|
468
468
|
});
|
|
469
|
-
function
|
|
469
|
+
function bt({ className: e, orientation: t = "vertical", ...n }) {
|
|
470
470
|
return /* @__PURE__ */ X("div", {
|
|
471
471
|
role: "group",
|
|
472
472
|
"data-slot": "field",
|
|
473
473
|
"data-orientation": t,
|
|
474
|
-
className: Q(
|
|
474
|
+
className: Q(yt({ orientation: t }), e),
|
|
475
475
|
...n
|
|
476
476
|
});
|
|
477
477
|
}
|
|
478
|
-
function
|
|
478
|
+
function xt({ className: e, ...t }) {
|
|
479
479
|
return /* @__PURE__ */ X("div", {
|
|
480
480
|
"data-slot": "field-content",
|
|
481
481
|
className: Q("group/field-content flex flex-1 flex-col gap-0.5 leading-snug", e),
|
|
482
482
|
...t
|
|
483
483
|
});
|
|
484
484
|
}
|
|
485
|
-
function
|
|
486
|
-
return /* @__PURE__ */ X(
|
|
485
|
+
function St({ className: e, ...t }) {
|
|
486
|
+
return /* @__PURE__ */ X(mt, {
|
|
487
487
|
"data-slot": "field-label",
|
|
488
488
|
className: Q("group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-data-checked:border-primary/30 has-data-checked:bg-primary/5 has-[>[data-slot=field]]:rounded-lg has-[>[data-slot=field]]:border *:data-[slot=field]:p-2.5 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10", "has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col", e),
|
|
489
489
|
...t
|
|
490
490
|
});
|
|
491
491
|
}
|
|
492
|
-
function
|
|
492
|
+
function Ct({ className: e, ...t }) {
|
|
493
493
|
return /* @__PURE__ */ X("div", {
|
|
494
494
|
"data-slot": "field-label",
|
|
495
495
|
className: Q("flex w-fit items-center gap-2 text-sm font-medium group-data-[disabled=true]/field:opacity-50", e),
|
|
496
496
|
...t
|
|
497
497
|
});
|
|
498
498
|
}
|
|
499
|
-
function
|
|
499
|
+
function wt({ className: e, ...t }) {
|
|
500
500
|
return /* @__PURE__ */ X("p", {
|
|
501
501
|
"data-slot": "field-description",
|
|
502
502
|
className: Q("text-left text-sm leading-normal font-normal text-muted-foreground group-has-data-horizontal/field:text-balance [[data-variant=legend]+&]:-mt-1.5", "last:mt-0 nth-last-2:-mt-1", "[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary", e),
|
|
503
503
|
...t
|
|
504
504
|
});
|
|
505
505
|
}
|
|
506
|
-
function
|
|
506
|
+
function Tt({ children: e, className: t, ...n }) {
|
|
507
507
|
return /* @__PURE__ */ Z("div", {
|
|
508
508
|
"data-slot": "field-separator",
|
|
509
509
|
"data-content": !!e,
|
|
510
510
|
className: Q("relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2", t),
|
|
511
511
|
...n,
|
|
512
|
-
children: [/* @__PURE__ */ X(
|
|
512
|
+
children: [/* @__PURE__ */ X(ht, { className: "absolute inset-0 top-1/2" }), e && /* @__PURE__ */ X("span", {
|
|
513
513
|
className: "relative mx-auto block w-fit bg-background px-2 text-muted-foreground",
|
|
514
514
|
"data-slot": "field-separator-content",
|
|
515
515
|
children: e
|
|
516
516
|
})]
|
|
517
517
|
});
|
|
518
518
|
}
|
|
519
|
-
function
|
|
519
|
+
function Et({ className: e, children: t, errors: n, ...r }) {
|
|
520
520
|
let i = u(() => {
|
|
521
521
|
if (t) return t;
|
|
522
522
|
if (!n?.length) return null;
|
|
@@ -536,7 +536,7 @@ function Tt({ className: e, children: t, errors: n, ...r }) {
|
|
|
536
536
|
}
|
|
537
537
|
//#endregion
|
|
538
538
|
//#region src/components/custom/advanced-input.tsx
|
|
539
|
-
function
|
|
539
|
+
function Dt({ error: e, errorMessage: t, helperText: n, errorId: r, helperId: i }) {
|
|
540
540
|
return !t && !n ? null : /* @__PURE__ */ X("div", {
|
|
541
541
|
className: "mt-1.5 min-h-5",
|
|
542
542
|
children: e && t ? /* @__PURE__ */ X("p", {
|
|
@@ -550,12 +550,12 @@ function Et({ error: e, errorMessage: t, helperText: n, errorId: r, helperId: i
|
|
|
550
550
|
}) : null
|
|
551
551
|
});
|
|
552
552
|
}
|
|
553
|
-
var
|
|
554
|
-
let { className: r, wrapperClassName: i, label: a, description: o, errorMessage: s, helperText: c, required: l = !1, size: u = "default", variant: d = "default", leftIcon: f, rightIcon: p, disabled: m, startItem: h, endItem: g, loading: _ = !1, as: v = "input", id: y, error: b, ...x } = e, S = b ?? !!s, C = n.useId(), w = y || C, [T, E] = n.useState(!1),
|
|
555
|
-
S && s ?
|
|
556
|
-
!S && c ?
|
|
557
|
-
o ?
|
|
558
|
-
].filter(Boolean).join(" ") || void 0,
|
|
553
|
+
var Ot = n.forwardRef(function(e, t) {
|
|
554
|
+
let { className: r, wrapperClassName: i, label: a, description: o, errorMessage: s, helperText: c, required: l = !1, size: u = "default", variant: d = "default", leftIcon: f, rightIcon: p, disabled: m, startItem: h, endItem: g, loading: _ = !1, as: v = "input", id: y, error: b, ...x } = e, S = b ?? !!s, C = n.useId(), w = y || C, [T, E] = n.useState(!1), ee = `${w}-error`, D = `${w}-helper`, O = `${w}-description`, A = [
|
|
555
|
+
S && s ? ee : null,
|
|
556
|
+
!S && c ? D : null,
|
|
557
|
+
o ? O : null
|
|
558
|
+
].filter(Boolean).join(" ") || void 0, j = d === "alt" ? "bg-muted" : "bg-transparent dark:bg-input/30", M = l ? /* @__PURE__ */ X("span", {
|
|
559
559
|
"aria-hidden": !0,
|
|
560
560
|
className: "ml-0.5 text-destructive",
|
|
561
561
|
children: "*"
|
|
@@ -565,65 +565,65 @@ var Dt = n.forwardRef(function(e, t) {
|
|
|
565
565
|
return /* @__PURE__ */ Z("div", {
|
|
566
566
|
className: Q("space-y-1.5", i),
|
|
567
567
|
children: [
|
|
568
|
-
a && /* @__PURE__ */ Z(
|
|
568
|
+
a && /* @__PURE__ */ Z(St, {
|
|
569
569
|
htmlFor: w,
|
|
570
570
|
className: Q(m && "text-muted-foreground"),
|
|
571
|
-
children: [a,
|
|
571
|
+
children: [a, M]
|
|
572
572
|
}),
|
|
573
573
|
/* @__PURE__ */ X("textarea", {
|
|
574
574
|
id: w,
|
|
575
575
|
ref: t,
|
|
576
576
|
disabled: m,
|
|
577
577
|
"aria-invalid": S,
|
|
578
|
-
"aria-describedby":
|
|
579
|
-
className: Q("flex min-h-20 w-full rounded-lg border border-input px-3 py-2 text-base outline-none transition-colors placeholder:text-muted-foreground md:text-sm",
|
|
578
|
+
"aria-describedby": A,
|
|
579
|
+
className: Q("flex min-h-20 w-full rounded-lg border border-input px-3 py-2 text-base outline-none transition-colors placeholder:text-muted-foreground md:text-sm", j, "focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50", "disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50", "aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40", r),
|
|
580
580
|
...e
|
|
581
581
|
}),
|
|
582
|
-
/* @__PURE__ */ X(
|
|
582
|
+
/* @__PURE__ */ X(Dt, {
|
|
583
583
|
error: S,
|
|
584
584
|
errorMessage: s,
|
|
585
585
|
helperText: c,
|
|
586
|
-
errorId:
|
|
587
|
-
helperId:
|
|
586
|
+
errorId: ee,
|
|
587
|
+
helperId: D
|
|
588
588
|
}),
|
|
589
|
-
o && /* @__PURE__ */ X(
|
|
590
|
-
id:
|
|
589
|
+
o && /* @__PURE__ */ X(wt, {
|
|
590
|
+
id: O,
|
|
591
591
|
children: o
|
|
592
592
|
})
|
|
593
593
|
]
|
|
594
594
|
});
|
|
595
595
|
}
|
|
596
|
-
let { type:
|
|
596
|
+
let { type: N, onFocus: P, ...F } = x, I = N ?? "text", ne = I === "password", L = ne && T ? "text" : I, R = ne ? /* @__PURE__ */ X("button", {
|
|
597
597
|
type: "button",
|
|
598
598
|
onClick: () => E((e) => !e),
|
|
599
599
|
"aria-label": T ? "Hide password" : "Show password",
|
|
600
600
|
className: "cursor-pointer text-muted-foreground transition-colors hover:text-foreground",
|
|
601
601
|
tabIndex: -1,
|
|
602
|
-
children: X(T ?
|
|
603
|
-
}) : null, z = _ ? /* @__PURE__ */ X(re, { className: "size-4 animate-spin text-muted-foreground" }) : f, B =
|
|
604
|
-
|
|
602
|
+
children: X(T ? te : k, { className: "size-4" })
|
|
603
|
+
}) : null, z = _ ? /* @__PURE__ */ X(re, { className: "size-4 animate-spin text-muted-foreground" }) : f, B = ne ? R : p, ie = (e) => {
|
|
604
|
+
L === "number" && e.target.select(), P?.(e);
|
|
605
605
|
}, ae = !!(h || g), V = /* @__PURE__ */ X("input", {
|
|
606
606
|
id: w,
|
|
607
|
-
type:
|
|
607
|
+
type: L,
|
|
608
608
|
ref: t,
|
|
609
609
|
disabled: m,
|
|
610
610
|
"aria-invalid": S,
|
|
611
|
-
"aria-describedby":
|
|
611
|
+
"aria-describedby": A,
|
|
612
612
|
onFocus: ie,
|
|
613
|
-
className: Q("w-full min-w-0 bg-transparent text-base text-foreground outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed md:text-sm", ae ? "h-full border-0 py-1 focus-visible:ring-0" : Q("rounded-lg border border-input px-3 py-1 transition-colors",
|
|
614
|
-
...
|
|
613
|
+
className: Q("w-full min-w-0 bg-transparent text-base text-foreground outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed md:text-sm", ae ? "h-full border-0 py-1 focus-visible:ring-0" : Q("rounded-lg border border-input px-3 py-1 transition-colors", j, u === "default" ? "h-9" : "h-8", "focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50", "disabled:opacity-50", "aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40", z && "pl-9", B && "pr-9"), ae && Q(h ? "pl-0" : "pl-3", g ? "pr-0" : "pr-3"), ae && z && !h && "pl-9", ae && B && !g && "pr-9", r),
|
|
614
|
+
...F
|
|
615
615
|
});
|
|
616
616
|
return /* @__PURE__ */ Z("div", {
|
|
617
617
|
className: Q("space-y-1.5", i),
|
|
618
618
|
children: [
|
|
619
|
-
a && /* @__PURE__ */ Z(
|
|
619
|
+
a && /* @__PURE__ */ Z(St, {
|
|
620
620
|
htmlFor: w,
|
|
621
621
|
className: Q(m && "text-muted-foreground"),
|
|
622
|
-
children: [a,
|
|
622
|
+
children: [a, M]
|
|
623
623
|
}),
|
|
624
624
|
ae ? /* @__PURE__ */ Z("div", {
|
|
625
625
|
"aria-invalid": S,
|
|
626
|
-
className: Q("flex items-center overflow-hidden rounded-lg border border-input transition-colors",
|
|
626
|
+
className: Q("flex items-center overflow-hidden rounded-lg border border-input transition-colors", j, u === "default" ? "h-9" : "h-8", "focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/50", "aria-[invalid=true]:border-destructive aria-[invalid=true]:ring-3 aria-[invalid=true]:ring-destructive/20 dark:aria-[invalid=true]:ring-destructive/40", m && "cursor-not-allowed opacity-50"),
|
|
627
627
|
children: [
|
|
628
628
|
h && /* @__PURE__ */ X("div", {
|
|
629
629
|
className: "flex h-full shrink-0 items-center justify-center border-r border-input bg-muted/40 px-3 text-sm text-muted-foreground [&_svg]:size-4",
|
|
@@ -662,20 +662,20 @@ var Dt = n.forwardRef(function(e, t) {
|
|
|
662
662
|
})
|
|
663
663
|
]
|
|
664
664
|
}),
|
|
665
|
-
/* @__PURE__ */ X(
|
|
665
|
+
/* @__PURE__ */ X(Dt, {
|
|
666
666
|
error: S,
|
|
667
667
|
errorMessage: s,
|
|
668
668
|
helperText: c,
|
|
669
|
-
errorId:
|
|
670
|
-
helperId:
|
|
669
|
+
errorId: ee,
|
|
670
|
+
helperId: D
|
|
671
671
|
}),
|
|
672
|
-
o && /* @__PURE__ */ X(
|
|
673
|
-
id:
|
|
672
|
+
o && /* @__PURE__ */ X(wt, {
|
|
673
|
+
id: O,
|
|
674
674
|
children: o
|
|
675
675
|
})
|
|
676
676
|
]
|
|
677
677
|
});
|
|
678
|
-
}),
|
|
678
|
+
}), kt = W("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-md border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!", {
|
|
679
679
|
variants: { variant: {
|
|
680
680
|
default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80",
|
|
681
681
|
secondary: "bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",
|
|
@@ -696,33 +696,33 @@ var Dt = n.forwardRef(function(e, t) {
|
|
|
696
696
|
} },
|
|
697
697
|
defaultVariants: { variant: "default" }
|
|
698
698
|
});
|
|
699
|
-
function
|
|
700
|
-
return /* @__PURE__ */ X(n ?
|
|
699
|
+
function At({ className: e, variant: t = "default", asChild: n = !1, ...r }) {
|
|
700
|
+
return /* @__PURE__ */ X(n ? ke.Root : "span", {
|
|
701
701
|
"data-slot": "badge",
|
|
702
702
|
"data-variant": t,
|
|
703
|
-
className: Q(
|
|
703
|
+
className: Q(kt({ variant: t }), e),
|
|
704
704
|
...r
|
|
705
705
|
});
|
|
706
706
|
}
|
|
707
707
|
//#endregion
|
|
708
708
|
//#region src/components/custom/alert-card.tsx
|
|
709
|
-
var
|
|
709
|
+
var jt = {
|
|
710
710
|
info: {
|
|
711
|
-
icon:
|
|
711
|
+
icon: R,
|
|
712
712
|
badge: "blue",
|
|
713
713
|
filled: "border-blue/30 bg-blue/10 text-blue",
|
|
714
714
|
iconBox: "bg-blue/10 text-blue",
|
|
715
715
|
actionBtn: "bg-blue text-white hover:bg-blue/90"
|
|
716
716
|
},
|
|
717
717
|
warning: {
|
|
718
|
-
icon:
|
|
718
|
+
icon: _e,
|
|
719
719
|
badge: "orange",
|
|
720
720
|
filled: "border-orange/30 bg-orange/10 text-orange",
|
|
721
721
|
iconBox: "bg-orange/10 text-orange",
|
|
722
722
|
actionBtn: "bg-orange text-white hover:bg-orange/90"
|
|
723
723
|
},
|
|
724
724
|
error: {
|
|
725
|
-
icon:
|
|
725
|
+
icon: D,
|
|
726
726
|
badge: "red",
|
|
727
727
|
filled: "border-red/30 bg-red/10 text-red",
|
|
728
728
|
iconBox: "bg-red/10 text-red",
|
|
@@ -736,8 +736,8 @@ var At = {
|
|
|
736
736
|
actionBtn: "bg-green text-white hover:bg-green/90"
|
|
737
737
|
}
|
|
738
738
|
};
|
|
739
|
-
function
|
|
740
|
-
let d =
|
|
739
|
+
function Mt({ severity: e = "info", variant: t = "filled", icon: n, title: r, description: i, badge: a, actions: o, dismissible: s = !1, onDismiss: c, className: l, ...u }) {
|
|
740
|
+
let d = jt[e], f = d.icon, p = s && /* @__PURE__ */ X("button", {
|
|
741
741
|
type: "button",
|
|
742
742
|
"aria-label": "Dismiss",
|
|
743
743
|
onClick: c,
|
|
@@ -786,7 +786,7 @@ function jt({ severity: e = "info", variant: t = "filled", icon: n, title: r, de
|
|
|
786
786
|
children: [r != null && /* @__PURE__ */ X("p", {
|
|
787
787
|
className: "text-sm font-medium text-foreground",
|
|
788
788
|
children: r
|
|
789
|
-
}), a != null && /* @__PURE__ */ X(
|
|
789
|
+
}), a != null && /* @__PURE__ */ X(At, {
|
|
790
790
|
variant: d.badge,
|
|
791
791
|
className: "text-[10px]",
|
|
792
792
|
children: a
|
|
@@ -806,46 +806,46 @@ function jt({ severity: e = "info", variant: t = "filled", icon: n, title: r, de
|
|
|
806
806
|
]
|
|
807
807
|
});
|
|
808
808
|
}
|
|
809
|
-
function
|
|
809
|
+
function Nt({ severity: e = "info", className: t, ...n }) {
|
|
810
810
|
return /* @__PURE__ */ X($, {
|
|
811
811
|
size: "sm",
|
|
812
|
-
className: Q(
|
|
812
|
+
className: Q(jt[e].actionBtn, t),
|
|
813
813
|
...n
|
|
814
814
|
});
|
|
815
815
|
}
|
|
816
816
|
//#endregion
|
|
817
817
|
//#region src/components/custom/file-upload.tsx
|
|
818
|
-
var
|
|
818
|
+
var Pt = [
|
|
819
819
|
{
|
|
820
820
|
match: (e, t) => e.includes("zip") || e.includes("archive") || t.endsWith(".zip") || t.endsWith(".rar"),
|
|
821
|
-
Icon:
|
|
821
|
+
Icon: A
|
|
822
822
|
},
|
|
823
823
|
{
|
|
824
824
|
match: (e) => e.includes("audio/"),
|
|
825
|
-
Icon:
|
|
825
|
+
Icon: P
|
|
826
826
|
},
|
|
827
827
|
{
|
|
828
828
|
match: (e, t) => e.includes("excel") || t.endsWith(".xls") || t.endsWith(".xlsx"),
|
|
829
|
-
Icon:
|
|
829
|
+
Icon: M
|
|
830
830
|
},
|
|
831
831
|
{
|
|
832
832
|
match: (e) => e.startsWith("image/"),
|
|
833
|
-
Icon:
|
|
833
|
+
Icon: I
|
|
834
834
|
},
|
|
835
835
|
{
|
|
836
836
|
match: (e, t) => e.includes("pdf") || t.endsWith(".pdf") || e.includes("word") || t.endsWith(".doc") || t.endsWith(".docx"),
|
|
837
|
-
Icon:
|
|
837
|
+
Icon: N
|
|
838
838
|
},
|
|
839
839
|
{
|
|
840
840
|
match: (e) => e.includes("video/"),
|
|
841
|
-
Icon:
|
|
841
|
+
Icon: ye
|
|
842
842
|
}
|
|
843
843
|
];
|
|
844
|
-
function
|
|
845
|
-
for (let { match: t, Icon: n } of
|
|
846
|
-
return /* @__PURE__ */ X(
|
|
844
|
+
function Ft(e) {
|
|
845
|
+
for (let { match: t, Icon: n } of Pt) if (t(e.type, e.name)) return /* @__PURE__ */ X(n, { className: "size-5 opacity-60" });
|
|
846
|
+
return /* @__PURE__ */ X(j, { className: "size-5 opacity-60" });
|
|
847
847
|
}
|
|
848
|
-
function
|
|
848
|
+
function It({ entry: e }) {
|
|
849
849
|
let { file: t } = e;
|
|
850
850
|
return /* @__PURE__ */ X("div", {
|
|
851
851
|
className: "flex aspect-square items-center justify-center overflow-hidden rounded-t-[inherit] bg-accent",
|
|
@@ -853,18 +853,18 @@ function Ft({ entry: e }) {
|
|
|
853
853
|
alt: t.name,
|
|
854
854
|
className: "size-full rounded-t-[inherit] object-cover",
|
|
855
855
|
src: e.preview
|
|
856
|
-
}) :
|
|
856
|
+
}) : Ft(t)
|
|
857
857
|
});
|
|
858
858
|
}
|
|
859
|
-
function
|
|
860
|
-
let [{ files: l, isDragging: u, errors: d }, { handleDragEnter: f, handleDragLeave: m, handleDragOver: h, handleDrop: g, openFileDialog: _, removeFile: v, clearFiles: y, getInputProps: b }] =
|
|
859
|
+
function Lt({ variant: e = "image", accept: t = "image/*", maxSize: n = 5 * 1024 * 1024, maxFiles: r = 6, multiple: i, initialFiles: a, disabled: o, onFilesChange: s, className: c }) {
|
|
860
|
+
let [{ files: l, isDragging: u, errors: d }, { handleDragEnter: f, handleDragLeave: m, handleDragOver: h, handleDrop: g, openFileDialog: _, removeFile: v, clearFiles: y, getInputProps: b }] = qe({
|
|
861
861
|
accept: t,
|
|
862
862
|
maxSize: n,
|
|
863
863
|
maxFiles: r,
|
|
864
864
|
multiple: e === "files" ? !0 : i ?? !1,
|
|
865
865
|
initialFiles: a,
|
|
866
866
|
onFilesChange: s
|
|
867
|
-
}), x =
|
|
867
|
+
}), x = Ke(n), S = d.length > 0 && /* @__PURE__ */ Z("div", {
|
|
868
868
|
className: "flex items-center gap-1 text-destructive text-xs",
|
|
869
869
|
role: "alert",
|
|
870
870
|
children: [/* @__PURE__ */ X(p, { className: "size-3 shrink-0" }), /* @__PURE__ */ X("span", { children: d[0] })]
|
|
@@ -902,7 +902,7 @@ function It({ variant: e = "image", accept: t = "image/*", maxSize: n = 5 * 1024
|
|
|
902
902
|
/* @__PURE__ */ X("div", {
|
|
903
903
|
"aria-hidden": "true",
|
|
904
904
|
className: "mb-2 flex size-11 shrink-0 items-center justify-center rounded-full border bg-background",
|
|
905
|
-
children: /* @__PURE__ */ X(
|
|
905
|
+
children: /* @__PURE__ */ X(ne, { className: "size-4 opacity-60" })
|
|
906
906
|
}),
|
|
907
907
|
/* @__PURE__ */ X("p", {
|
|
908
908
|
className: "mb-1.5 font-medium text-sm",
|
|
@@ -962,7 +962,7 @@ function It({ variant: e = "image", accept: t = "image/*", maxSize: n = 5 * 1024
|
|
|
962
962
|
onClick: _,
|
|
963
963
|
size: "sm",
|
|
964
964
|
variant: "outline",
|
|
965
|
-
children: [/* @__PURE__ */ X(
|
|
965
|
+
children: [/* @__PURE__ */ X(ve, {
|
|
966
966
|
"aria-hidden": "true",
|
|
967
967
|
className: "-ms-0.5 size-3.5 opacity-60"
|
|
968
968
|
}), "Add files"]
|
|
@@ -971,7 +971,7 @@ function It({ variant: e = "image", accept: t = "image/*", maxSize: n = 5 * 1024
|
|
|
971
971
|
onClick: y,
|
|
972
972
|
size: "sm",
|
|
973
973
|
variant: "outline",
|
|
974
|
-
children: [/* @__PURE__ */ X(
|
|
974
|
+
children: [/* @__PURE__ */ X(me, {
|
|
975
975
|
"aria-hidden": "true",
|
|
976
976
|
className: "-ms-0.5 size-3.5 opacity-60"
|
|
977
977
|
}), "Remove all"]
|
|
@@ -982,7 +982,7 @@ function It({ variant: e = "image", accept: t = "image/*", maxSize: n = 5 * 1024
|
|
|
982
982
|
children: l.map((e) => /* @__PURE__ */ Z("div", {
|
|
983
983
|
className: "relative flex flex-col rounded-md border bg-background",
|
|
984
984
|
children: [
|
|
985
|
-
/* @__PURE__ */ X(
|
|
985
|
+
/* @__PURE__ */ X(It, { entry: e }),
|
|
986
986
|
/* @__PURE__ */ X($, {
|
|
987
987
|
"aria-label": "Remove file",
|
|
988
988
|
className: "-top-2 -right-2 absolute size-6 rounded-full border-2 border-background shadow-none focus-visible:border-background",
|
|
@@ -997,7 +997,7 @@ function It({ variant: e = "image", accept: t = "image/*", maxSize: n = 5 * 1024
|
|
|
997
997
|
children: e.file.name
|
|
998
998
|
}), /* @__PURE__ */ X("p", {
|
|
999
999
|
className: "truncate text-muted-foreground text-xs",
|
|
1000
|
-
children:
|
|
1000
|
+
children: Ke(e.file.size)
|
|
1001
1001
|
})]
|
|
1002
1002
|
})
|
|
1003
1003
|
]
|
|
@@ -1009,7 +1009,7 @@ function It({ variant: e = "image", accept: t = "image/*", maxSize: n = 5 * 1024
|
|
|
1009
1009
|
/* @__PURE__ */ X("div", {
|
|
1010
1010
|
"aria-hidden": "true",
|
|
1011
1011
|
className: "mb-2 flex size-11 shrink-0 items-center justify-center rounded-full border bg-background",
|
|
1012
|
-
children: /* @__PURE__ */ X(
|
|
1012
|
+
children: /* @__PURE__ */ X(I, { className: "size-4 opacity-60" })
|
|
1013
1013
|
}),
|
|
1014
1014
|
/* @__PURE__ */ X("p", {
|
|
1015
1015
|
className: "mb-1.5 font-medium text-sm",
|
|
@@ -1029,7 +1029,7 @@ function It({ variant: e = "image", accept: t = "image/*", maxSize: n = 5 * 1024
|
|
|
1029
1029
|
disabled: o,
|
|
1030
1030
|
onClick: _,
|
|
1031
1031
|
variant: "outline",
|
|
1032
|
-
children: [/* @__PURE__ */ X(
|
|
1032
|
+
children: [/* @__PURE__ */ X(ve, {
|
|
1033
1033
|
"aria-hidden": "true",
|
|
1034
1034
|
className: "-ms-1 opacity-60"
|
|
1035
1035
|
}), "Select files"]
|
|
@@ -1041,39 +1041,39 @@ function It({ variant: e = "image", accept: t = "image/*", maxSize: n = 5 * 1024
|
|
|
1041
1041
|
}
|
|
1042
1042
|
//#endregion
|
|
1043
1043
|
//#region src/components/ui/dialog.tsx
|
|
1044
|
-
function
|
|
1044
|
+
function Rt({ ...e }) {
|
|
1045
1045
|
return /* @__PURE__ */ X(K.Root, {
|
|
1046
1046
|
"data-slot": "dialog",
|
|
1047
1047
|
...e
|
|
1048
1048
|
});
|
|
1049
1049
|
}
|
|
1050
|
-
function
|
|
1050
|
+
function zt({ ...e }) {
|
|
1051
1051
|
return /* @__PURE__ */ X(K.Trigger, {
|
|
1052
1052
|
"data-slot": "dialog-trigger",
|
|
1053
1053
|
...e
|
|
1054
1054
|
});
|
|
1055
1055
|
}
|
|
1056
|
-
function
|
|
1056
|
+
function Bt({ ...e }) {
|
|
1057
1057
|
return /* @__PURE__ */ X(K.Portal, {
|
|
1058
1058
|
"data-slot": "dialog-portal",
|
|
1059
1059
|
...e
|
|
1060
1060
|
});
|
|
1061
1061
|
}
|
|
1062
|
-
function
|
|
1062
|
+
function Vt({ ...e }) {
|
|
1063
1063
|
return /* @__PURE__ */ X(K.Close, {
|
|
1064
1064
|
"data-slot": "dialog-close",
|
|
1065
1065
|
...e
|
|
1066
1066
|
});
|
|
1067
1067
|
}
|
|
1068
|
-
function
|
|
1068
|
+
function Ht({ className: e, ...t }) {
|
|
1069
1069
|
return /* @__PURE__ */ X(K.Overlay, {
|
|
1070
1070
|
"data-slot": "dialog-overlay",
|
|
1071
1071
|
className: Q("fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0", e),
|
|
1072
1072
|
...t
|
|
1073
1073
|
});
|
|
1074
1074
|
}
|
|
1075
|
-
function
|
|
1076
|
-
return /* @__PURE__ */ Z(
|
|
1075
|
+
function Ut({ className: e, children: t, showCloseButton: n = !0, ...r }) {
|
|
1076
|
+
return /* @__PURE__ */ Z(Bt, { children: [/* @__PURE__ */ X(Ht, {}), /* @__PURE__ */ Z(K.Content, {
|
|
1077
1077
|
"data-slot": "dialog-content",
|
|
1078
1078
|
className: Q("fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", e),
|
|
1079
1079
|
...r,
|
|
@@ -1092,14 +1092,14 @@ function Ht({ className: e, children: t, showCloseButton: n = !0, ...r }) {
|
|
|
1092
1092
|
})]
|
|
1093
1093
|
})] });
|
|
1094
1094
|
}
|
|
1095
|
-
function
|
|
1095
|
+
function Wt({ className: e, ...t }) {
|
|
1096
1096
|
return /* @__PURE__ */ X("div", {
|
|
1097
1097
|
"data-slot": "dialog-header",
|
|
1098
1098
|
className: Q("flex flex-col gap-2", e),
|
|
1099
1099
|
...t
|
|
1100
1100
|
});
|
|
1101
1101
|
}
|
|
1102
|
-
function
|
|
1102
|
+
function Gt({ className: e, showCloseButton: t = !1, children: n, ...r }) {
|
|
1103
1103
|
return /* @__PURE__ */ Z("div", {
|
|
1104
1104
|
"data-slot": "dialog-footer",
|
|
1105
1105
|
className: Q("-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end", e),
|
|
@@ -1113,14 +1113,14 @@ function Wt({ className: e, showCloseButton: t = !1, children: n, ...r }) {
|
|
|
1113
1113
|
})]
|
|
1114
1114
|
});
|
|
1115
1115
|
}
|
|
1116
|
-
function
|
|
1116
|
+
function Kt({ className: e, ...t }) {
|
|
1117
1117
|
return /* @__PURE__ */ X(K.Title, {
|
|
1118
1118
|
"data-slot": "dialog-title",
|
|
1119
1119
|
className: Q("text-base leading-none font-medium", e),
|
|
1120
1120
|
...t
|
|
1121
1121
|
});
|
|
1122
1122
|
}
|
|
1123
|
-
function
|
|
1123
|
+
function qt({ className: e, ...t }) {
|
|
1124
1124
|
return /* @__PURE__ */ X(K.Description, {
|
|
1125
1125
|
"data-slot": "dialog-description",
|
|
1126
1126
|
className: Q("text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground", e),
|
|
@@ -1129,7 +1129,7 @@ function Kt({ className: e, ...t }) {
|
|
|
1129
1129
|
}
|
|
1130
1130
|
//#endregion
|
|
1131
1131
|
//#region src/components/ui/input.tsx
|
|
1132
|
-
function
|
|
1132
|
+
function Jt({ className: e, type: t, ...n }) {
|
|
1133
1133
|
return /* @__PURE__ */ X("input", {
|
|
1134
1134
|
type: t,
|
|
1135
1135
|
"data-slot": "input",
|
|
@@ -1139,7 +1139,7 @@ function qt({ className: e, type: t, ...n }) {
|
|
|
1139
1139
|
}
|
|
1140
1140
|
//#endregion
|
|
1141
1141
|
//#region src/components/ui/textarea.tsx
|
|
1142
|
-
function
|
|
1142
|
+
function Yt({ className: e, ...t }) {
|
|
1143
1143
|
return /* @__PURE__ */ X("textarea", {
|
|
1144
1144
|
"data-slot": "textarea",
|
|
1145
1145
|
className: Q("flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-transparent px-2.5 py-2 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40", e),
|
|
@@ -1148,7 +1148,7 @@ function Jt({ className: e, ...t }) {
|
|
|
1148
1148
|
}
|
|
1149
1149
|
//#endregion
|
|
1150
1150
|
//#region src/components/ui/input-group.tsx
|
|
1151
|
-
function
|
|
1151
|
+
function Xt({ className: e, ...t }) {
|
|
1152
1152
|
return /* @__PURE__ */ X("div", {
|
|
1153
1153
|
"data-slot": "input-group",
|
|
1154
1154
|
role: "group",
|
|
@@ -1156,7 +1156,7 @@ function Yt({ className: e, ...t }) {
|
|
|
1156
1156
|
...t
|
|
1157
1157
|
});
|
|
1158
1158
|
}
|
|
1159
|
-
var
|
|
1159
|
+
var Zt = W("flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4", {
|
|
1160
1160
|
variants: { align: {
|
|
1161
1161
|
"inline-start": "order-first pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]",
|
|
1162
1162
|
"inline-end": "order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]",
|
|
@@ -1165,19 +1165,19 @@ var Xt = W("flex h-auto cursor-text items-center justify-center gap-2 py-1.5 tex
|
|
|
1165
1165
|
} },
|
|
1166
1166
|
defaultVariants: { align: "inline-start" }
|
|
1167
1167
|
});
|
|
1168
|
-
function
|
|
1168
|
+
function Qt({ className: e, align: t = "inline-start", ...n }) {
|
|
1169
1169
|
return /* @__PURE__ */ X("div", {
|
|
1170
1170
|
role: "group",
|
|
1171
1171
|
"data-slot": "input-group-addon",
|
|
1172
1172
|
"data-align": t,
|
|
1173
|
-
className: Q(
|
|
1173
|
+
className: Q(Zt({ align: t }), e),
|
|
1174
1174
|
onClick: (e) => {
|
|
1175
1175
|
e.target.closest("button") || e.currentTarget.parentElement?.querySelector("input")?.focus();
|
|
1176
1176
|
},
|
|
1177
1177
|
...n
|
|
1178
1178
|
});
|
|
1179
1179
|
}
|
|
1180
|
-
var
|
|
1180
|
+
var $t = W("flex items-center gap-2 text-sm shadow-none", {
|
|
1181
1181
|
variants: { size: {
|
|
1182
1182
|
xs: "h-6 gap-1 rounded-[calc(var(--radius)-3px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5",
|
|
1183
1183
|
sm: "",
|
|
@@ -1186,30 +1186,30 @@ var Qt = W("flex items-center gap-2 text-sm shadow-none", {
|
|
|
1186
1186
|
} },
|
|
1187
1187
|
defaultVariants: { size: "xs" }
|
|
1188
1188
|
});
|
|
1189
|
-
function
|
|
1189
|
+
function en({ className: e, type: t = "button", variant: n = "ghost", size: r = "xs", ...i }) {
|
|
1190
1190
|
return /* @__PURE__ */ X($, {
|
|
1191
1191
|
type: t,
|
|
1192
1192
|
"data-size": r,
|
|
1193
1193
|
variant: n,
|
|
1194
|
-
className: Q(
|
|
1194
|
+
className: Q($t({ size: r }), e),
|
|
1195
1195
|
...i
|
|
1196
1196
|
});
|
|
1197
1197
|
}
|
|
1198
|
-
function
|
|
1198
|
+
function tn({ className: e, ...t }) {
|
|
1199
1199
|
return /* @__PURE__ */ X("span", {
|
|
1200
1200
|
className: Q("flex items-center gap-2 text-sm text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4", e),
|
|
1201
1201
|
...t
|
|
1202
1202
|
});
|
|
1203
1203
|
}
|
|
1204
|
-
function
|
|
1205
|
-
return /* @__PURE__ */ X(
|
|
1204
|
+
function nn({ className: e, ...t }) {
|
|
1205
|
+
return /* @__PURE__ */ X(Jt, {
|
|
1206
1206
|
"data-slot": "input-group-control",
|
|
1207
1207
|
className: Q("flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent", e),
|
|
1208
1208
|
...t
|
|
1209
1209
|
});
|
|
1210
1210
|
}
|
|
1211
|
-
function
|
|
1212
|
-
return /* @__PURE__ */ X(
|
|
1211
|
+
function rn({ className: e, ...t }) {
|
|
1212
|
+
return /* @__PURE__ */ X(Yt, {
|
|
1213
1213
|
"data-slot": "input-group-control",
|
|
1214
1214
|
className: Q("flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent", e),
|
|
1215
1215
|
...t
|
|
@@ -1217,77 +1217,77 @@ function nn({ className: e, ...t }) {
|
|
|
1217
1217
|
}
|
|
1218
1218
|
//#endregion
|
|
1219
1219
|
//#region src/components/ui/command.tsx
|
|
1220
|
-
function
|
|
1221
|
-
return /* @__PURE__ */ X(
|
|
1220
|
+
function an({ className: e, ...t }) {
|
|
1221
|
+
return /* @__PURE__ */ X(Fe, {
|
|
1222
1222
|
"data-slot": "command",
|
|
1223
1223
|
className: Q("flex size-full flex-col overflow-hidden rounded-xl! bg-popover p-1 text-popover-foreground", e),
|
|
1224
1224
|
...t
|
|
1225
1225
|
});
|
|
1226
1226
|
}
|
|
1227
|
-
function
|
|
1228
|
-
return /* @__PURE__ */ Z(
|
|
1227
|
+
function on({ title: e = "Command Palette", description: t = "Search for a command to run...", children: n, className: r, showCloseButton: i = !1, ...a }) {
|
|
1228
|
+
return /* @__PURE__ */ Z(Rt, {
|
|
1229
1229
|
...a,
|
|
1230
|
-
children: [/* @__PURE__ */ Z(
|
|
1230
|
+
children: [/* @__PURE__ */ Z(Wt, {
|
|
1231
1231
|
className: "sr-only",
|
|
1232
|
-
children: [/* @__PURE__ */ X(
|
|
1233
|
-
}), /* @__PURE__ */ X(
|
|
1232
|
+
children: [/* @__PURE__ */ X(Kt, { children: e }), /* @__PURE__ */ X(qt, { children: t })]
|
|
1233
|
+
}), /* @__PURE__ */ X(Ut, {
|
|
1234
1234
|
className: Q("top-1/3 translate-y-0 overflow-hidden rounded-xl! p-0", r),
|
|
1235
1235
|
showCloseButton: i,
|
|
1236
1236
|
children: n
|
|
1237
1237
|
})]
|
|
1238
1238
|
});
|
|
1239
1239
|
}
|
|
1240
|
-
function
|
|
1240
|
+
function sn({ className: e, ...t }) {
|
|
1241
1241
|
return /* @__PURE__ */ X("div", {
|
|
1242
1242
|
"data-slot": "command-input-wrapper",
|
|
1243
1243
|
className: "p-1 pb-0",
|
|
1244
|
-
children: /* @__PURE__ */ Z(
|
|
1244
|
+
children: /* @__PURE__ */ Z(Xt, {
|
|
1245
1245
|
className: "h-8! rounded-lg! border-input/30 bg-input/30 shadow-none! *:data-[slot=input-group-addon]:pl-2!",
|
|
1246
|
-
children: [/* @__PURE__ */ X(
|
|
1246
|
+
children: [/* @__PURE__ */ X(Fe.Input, {
|
|
1247
1247
|
"data-slot": "command-input",
|
|
1248
1248
|
className: Q("w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50", e),
|
|
1249
1249
|
...t
|
|
1250
|
-
}), /* @__PURE__ */ X(
|
|
1250
|
+
}), /* @__PURE__ */ X(Qt, { children: /* @__PURE__ */ X(pe, { className: "size-4 shrink-0 opacity-50" }) })]
|
|
1251
1251
|
})
|
|
1252
1252
|
});
|
|
1253
1253
|
}
|
|
1254
|
-
function
|
|
1255
|
-
return /* @__PURE__ */ X(
|
|
1254
|
+
function cn({ className: e, ...t }) {
|
|
1255
|
+
return /* @__PURE__ */ X(Fe.List, {
|
|
1256
1256
|
"data-slot": "command-list",
|
|
1257
1257
|
className: Q("no-scrollbar max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none", e),
|
|
1258
1258
|
...t
|
|
1259
1259
|
});
|
|
1260
1260
|
}
|
|
1261
|
-
function
|
|
1262
|
-
return /* @__PURE__ */ X(
|
|
1261
|
+
function ln({ className: e, ...t }) {
|
|
1262
|
+
return /* @__PURE__ */ X(Fe.Empty, {
|
|
1263
1263
|
"data-slot": "command-empty",
|
|
1264
1264
|
className: Q("py-6 text-center text-sm", e),
|
|
1265
1265
|
...t
|
|
1266
1266
|
});
|
|
1267
1267
|
}
|
|
1268
|
-
function
|
|
1269
|
-
return /* @__PURE__ */ X(
|
|
1268
|
+
function un({ className: e, ...t }) {
|
|
1269
|
+
return /* @__PURE__ */ X(Fe.Group, {
|
|
1270
1270
|
"data-slot": "command-group",
|
|
1271
1271
|
className: Q("overflow-hidden p-1 text-foreground **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium **:[[cmdk-group-heading]]:text-muted-foreground", e),
|
|
1272
1272
|
...t
|
|
1273
1273
|
});
|
|
1274
1274
|
}
|
|
1275
|
-
function
|
|
1276
|
-
return /* @__PURE__ */ X(
|
|
1275
|
+
function dn({ className: e, ...t }) {
|
|
1276
|
+
return /* @__PURE__ */ X(Fe.Separator, {
|
|
1277
1277
|
"data-slot": "command-separator",
|
|
1278
1278
|
className: Q("-mx-1 h-px bg-border", e),
|
|
1279
1279
|
...t
|
|
1280
1280
|
});
|
|
1281
1281
|
}
|
|
1282
|
-
function
|
|
1283
|
-
return /* @__PURE__ */ Z(
|
|
1282
|
+
function fn({ className: e, children: t, ...n }) {
|
|
1283
|
+
return /* @__PURE__ */ Z(Fe.Item, {
|
|
1284
1284
|
"data-slot": "command-item",
|
|
1285
1285
|
className: Q("group/command-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-lg! data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-selected:bg-muted data-selected:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-selected:*:[svg]:text-foreground", e),
|
|
1286
1286
|
...n,
|
|
1287
1287
|
children: [t, /* @__PURE__ */ X(v, { className: "ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100" })]
|
|
1288
1288
|
});
|
|
1289
1289
|
}
|
|
1290
|
-
function
|
|
1290
|
+
function pn({ className: e, ...t }) {
|
|
1291
1291
|
return /* @__PURE__ */ X("span", {
|
|
1292
1292
|
"data-slot": "command-shortcut",
|
|
1293
1293
|
className: Q("ml-auto text-xs tracking-widest text-muted-foreground group-data-selected/command-item:text-foreground", e),
|
|
@@ -1296,20 +1296,20 @@ function fn({ className: e, ...t }) {
|
|
|
1296
1296
|
}
|
|
1297
1297
|
//#endregion
|
|
1298
1298
|
//#region src/components/ui/popover.tsx
|
|
1299
|
-
function
|
|
1300
|
-
return /* @__PURE__ */ X(
|
|
1299
|
+
function mn({ ...e }) {
|
|
1300
|
+
return /* @__PURE__ */ X(we.Root, {
|
|
1301
1301
|
"data-slot": "popover",
|
|
1302
1302
|
...e
|
|
1303
1303
|
});
|
|
1304
1304
|
}
|
|
1305
|
-
function
|
|
1306
|
-
return /* @__PURE__ */ X(
|
|
1305
|
+
function hn({ ...e }) {
|
|
1306
|
+
return /* @__PURE__ */ X(we.Trigger, {
|
|
1307
1307
|
"data-slot": "popover-trigger",
|
|
1308
1308
|
...e
|
|
1309
1309
|
});
|
|
1310
1310
|
}
|
|
1311
|
-
function
|
|
1312
|
-
return /* @__PURE__ */ X(
|
|
1311
|
+
function gn({ className: e, align: t = "center", sideOffset: n = 4, ...r }) {
|
|
1312
|
+
return /* @__PURE__ */ X(we.Portal, { children: /* @__PURE__ */ X(we.Content, {
|
|
1313
1313
|
"data-slot": "popover-content",
|
|
1314
1314
|
align: t,
|
|
1315
1315
|
sideOffset: n,
|
|
@@ -1317,27 +1317,27 @@ function hn({ className: e, align: t = "center", sideOffset: n = 4, ...r }) {
|
|
|
1317
1317
|
...r
|
|
1318
1318
|
}) });
|
|
1319
1319
|
}
|
|
1320
|
-
function
|
|
1321
|
-
return /* @__PURE__ */ X(
|
|
1320
|
+
function _n({ ...e }) {
|
|
1321
|
+
return /* @__PURE__ */ X(we.Anchor, {
|
|
1322
1322
|
"data-slot": "popover-anchor",
|
|
1323
1323
|
...e
|
|
1324
1324
|
});
|
|
1325
1325
|
}
|
|
1326
|
-
function
|
|
1326
|
+
function vn({ className: e, ...t }) {
|
|
1327
1327
|
return /* @__PURE__ */ X("div", {
|
|
1328
1328
|
"data-slot": "popover-header",
|
|
1329
1329
|
className: Q("flex flex-col gap-0.5 text-sm", e),
|
|
1330
1330
|
...t
|
|
1331
1331
|
});
|
|
1332
1332
|
}
|
|
1333
|
-
function
|
|
1333
|
+
function yn({ className: e, ...t }) {
|
|
1334
1334
|
return /* @__PURE__ */ X("div", {
|
|
1335
1335
|
"data-slot": "popover-title",
|
|
1336
1336
|
className: Q("font-medium", e),
|
|
1337
1337
|
...t
|
|
1338
1338
|
});
|
|
1339
1339
|
}
|
|
1340
|
-
function
|
|
1340
|
+
function bn({ className: e, ...t }) {
|
|
1341
1341
|
return /* @__PURE__ */ X("p", {
|
|
1342
1342
|
"data-slot": "popover-description",
|
|
1343
1343
|
className: Q("text-muted-foreground", e),
|
|
@@ -1346,19 +1346,19 @@ function yn({ className: e, ...t }) {
|
|
|
1346
1346
|
}
|
|
1347
1347
|
//#endregion
|
|
1348
1348
|
//#region src/components/custom/advanced-select.tsx
|
|
1349
|
-
function
|
|
1349
|
+
function xn(e) {
|
|
1350
1350
|
return typeof e == "object" && !!e && "value" in e && "label" in e;
|
|
1351
1351
|
}
|
|
1352
|
-
function
|
|
1353
|
-
let [
|
|
1354
|
-
|
|
1355
|
-
}, [
|
|
1352
|
+
function Sn({ options: e = [], groups: t = [], value: r, onValueChange: i, placeholder: a = "Select option", disabled: o = !1, error: s = !1, errorMessage: c, multiple: l = !1, className: u, size: d = "default", variant: f = "default", searchable: p = !1, clearable: m = !1, getOptionLabel: h, getOptionValue: g, renderOptionLabel: _, label: y, description: x, required: S = !1, onCreateNew: C, createNewLabel: w = "New item", loading: T = !1, compactMultiple: E = !1, formatCompactDisplay: ee, startItem: D, endItem: O, maxSelections: k, defaultOpen: te = !1, onOpenChange: A, onLoadMore: j, hasNextPage: M = !1, isFetchingNextPage: N = !1, allowEmpty: P = !1, showSelectAll: F = !1, readOnly: I = !1, popoverClassName: ne }) {
|
|
1353
|
+
let [L, R] = n.useState(te), z = n.useRef(!1), B = n.useRef(null), ie = n.useId(), ae = n.useCallback((e) => {
|
|
1354
|
+
I && e || (R(e), A?.(e), e && (z.current = !1));
|
|
1355
|
+
}, [A, I]), [V, oe] = n.useState(l ? Array.isArray(r) ? r : r ? [r] : [] : []);
|
|
1356
1356
|
n.useEffect(() => {
|
|
1357
1357
|
l && oe(Array.isArray(r) ? r : r ? [r] : []);
|
|
1358
1358
|
}, [l, r]), n.useEffect(() => {
|
|
1359
|
-
|
|
1360
|
-
}, [
|
|
1361
|
-
let H = n.useCallback((e) => typeof e == "string" ? e : g ? g(e) :
|
|
1359
|
+
N || (z.current = !1);
|
|
1360
|
+
}, [N]);
|
|
1361
|
+
let H = n.useCallback((e) => typeof e == "string" ? e : g ? g(e) : xn(e) ? e.value : String(e), [g]), se = n.useCallback((n) => {
|
|
1362
1362
|
if (typeof n == "string") {
|
|
1363
1363
|
for (let e of t) {
|
|
1364
1364
|
let t = e.options.find((e) => e.value === n);
|
|
@@ -1366,10 +1366,10 @@ function xn({ options: e = [], groups: t = [], value: r, onValueChange: i, place
|
|
|
1366
1366
|
}
|
|
1367
1367
|
for (let t of e) if (typeof t == "string") {
|
|
1368
1368
|
if (t === n) return t;
|
|
1369
|
-
} else if (
|
|
1369
|
+
} else if (xn(t) && t.value === n) return t.label;
|
|
1370
1370
|
return n;
|
|
1371
1371
|
}
|
|
1372
|
-
return h ? h(n) :
|
|
1372
|
+
return h ? h(n) : xn(n) ? n.label : String(n);
|
|
1373
1373
|
}, [
|
|
1374
1374
|
h,
|
|
1375
1375
|
t,
|
|
@@ -1381,14 +1381,14 @@ function xn({ options: e = [], groups: t = [], value: r, onValueChange: i, place
|
|
|
1381
1381
|
]), le = n.useMemo(() => e.map((e) => typeof e == "string" ? {
|
|
1382
1382
|
value: e,
|
|
1383
1383
|
label: e
|
|
1384
|
-
} :
|
|
1384
|
+
} : xn(e) ? e : {
|
|
1385
1385
|
value: H(e),
|
|
1386
1386
|
label: se(e)
|
|
1387
1387
|
}), [
|
|
1388
1388
|
e,
|
|
1389
1389
|
se,
|
|
1390
1390
|
H
|
|
1391
|
-
]),
|
|
1391
|
+
]), ue = n.useCallback((t) => e.find((e) => H(e) === t), [e, H]), fe = n.useMemo(() => {
|
|
1392
1392
|
let e = [...le];
|
|
1393
1393
|
return t.forEach((t) => e.push(...t.options)), e;
|
|
1394
1394
|
}, [le, t]), pe = (n) => {
|
|
@@ -1402,38 +1402,38 @@ function xn({ options: e = [], groups: t = [], value: r, onValueChange: i, place
|
|
|
1402
1402
|
}
|
|
1403
1403
|
if (l) {
|
|
1404
1404
|
let e = V.some((e) => H(e) === n);
|
|
1405
|
-
if (!e &&
|
|
1405
|
+
if (!e && k && V.length >= k || e && V.length === 1 && !P) return;
|
|
1406
1406
|
let t = e ? V.filter((e) => H(e) !== n) : [...V, r];
|
|
1407
1407
|
oe(t), i?.(t);
|
|
1408
|
-
} else i?.(r),
|
|
1408
|
+
} else i?.(r), R(!1);
|
|
1409
1409
|
}, me = l && fe.length > 0 && fe.length === V.length, he = () => {
|
|
1410
1410
|
if (l) {
|
|
1411
1411
|
if (me) {
|
|
1412
|
-
|
|
1412
|
+
P && (oe([]), i?.([]));
|
|
1413
1413
|
return;
|
|
1414
1414
|
}
|
|
1415
|
-
|
|
1415
|
+
k && fe.length > k || (oe(fe), i?.(fe));
|
|
1416
1416
|
}
|
|
1417
1417
|
}, ge = (e) => {
|
|
1418
1418
|
e.stopPropagation(), l ? (oe([]), i?.([])) : i?.("");
|
|
1419
1419
|
}, _e = (e, t) => {
|
|
1420
|
-
if (e.stopPropagation(), V.length === 1 && !
|
|
1420
|
+
if (e.stopPropagation(), V.length === 1 && !P) return;
|
|
1421
1421
|
let n = V.filter((e) => H(e) !== H(t));
|
|
1422
1422
|
oe(n), i?.(n);
|
|
1423
1423
|
}, ve = n.useCallback((e) => {
|
|
1424
1424
|
let t = e.currentTarget;
|
|
1425
|
-
t.scrollHeight - t.scrollTop - t.clientHeight < 100 &&
|
|
1425
|
+
t.scrollHeight - t.scrollTop - t.clientHeight < 100 && j && M && !N && !z.current && (z.current = !0, j());
|
|
1426
1426
|
}, [
|
|
1427
|
+
j,
|
|
1427
1428
|
M,
|
|
1428
|
-
N
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
className: Q("flex min-w-0 flex-1 items-center gap-1.5", K ? "py-1" : "overflow-hidden"),
|
|
1429
|
+
N
|
|
1430
|
+
]), ye = l ? V.length > 0 : !!ce, be = () => l ? null : fe.find((e) => e.value === ce)?.label || a, W = () => {
|
|
1431
|
+
!o && !I && (B.current?.focus(), R(!0));
|
|
1432
|
+
}, G = !!(D || O), xe = l && !E, K = xe ? d === "default" ? "min-h-9" : "min-h-7" : d === "default" ? "h-9" : "h-7", q = f === "alt" ? "bg-muted" : "bg-transparent dark:bg-input/30", Se = /* @__PURE__ */ X("div", {
|
|
1433
|
+
className: Q("flex min-w-0 flex-1 items-center gap-1.5", xe ? "py-1" : "overflow-hidden"),
|
|
1434
1434
|
children: l && V.length > 0 ? E ? /* @__PURE__ */ X("span", {
|
|
1435
1435
|
className: "min-w-0 truncate",
|
|
1436
|
-
children:
|
|
1436
|
+
children: ee ? ee(V) : `${V.length} selected`
|
|
1437
1437
|
}) : /* @__PURE__ */ X("div", {
|
|
1438
1438
|
className: "flex flex-wrap items-center gap-1.5",
|
|
1439
1439
|
children: V.map((e, t) => /* @__PURE__ */ Z("span", {
|
|
@@ -1448,7 +1448,7 @@ function xn({ options: e = [], groups: t = [], value: r, onValueChange: i, place
|
|
|
1448
1448
|
}, `${H(e)}-${t}`))
|
|
1449
1449
|
}) : /* @__PURE__ */ X("span", {
|
|
1450
1450
|
className: Q("block min-w-0 truncate", !ye && "text-muted-foreground"),
|
|
1451
|
-
children:
|
|
1451
|
+
children: be() || a
|
|
1452
1452
|
})
|
|
1453
1453
|
}), Ce = /* @__PURE__ */ Z("div", {
|
|
1454
1454
|
className: "flex shrink-0 items-center gap-1",
|
|
@@ -1468,8 +1468,8 @@ function xn({ options: e = [], groups: t = [], value: r, onValueChange: i, place
|
|
|
1468
1468
|
"aria-hidden": !0
|
|
1469
1469
|
})]
|
|
1470
1470
|
}), we = (e) => {
|
|
1471
|
-
let t = l ? V.some((t) => H(t) === e.value) : ce === e.value, n =
|
|
1472
|
-
return /* @__PURE__ */ Z(
|
|
1471
|
+
let t = l ? V.some((t) => H(t) === e.value) : ce === e.value, n = ue(e.value);
|
|
1472
|
+
return /* @__PURE__ */ Z(fn, {
|
|
1473
1473
|
value: e.value,
|
|
1474
1474
|
onSelect: () => pe(e.value),
|
|
1475
1475
|
disabled: e.disabled,
|
|
@@ -1513,23 +1513,23 @@ function xn({ options: e = [], groups: t = [], value: r, onValueChange: i, place
|
|
|
1513
1513
|
})
|
|
1514
1514
|
]
|
|
1515
1515
|
}, e.value);
|
|
1516
|
-
}, Te = /* @__PURE__ */ X(
|
|
1517
|
-
className: Q("w-(--radix-popper-anchor-width) min-w-(--radix-popper-anchor-width) p-0",
|
|
1516
|
+
}, Te = /* @__PURE__ */ X(gn, {
|
|
1517
|
+
className: Q("w-(--radix-popper-anchor-width) min-w-(--radix-popper-anchor-width) p-0", ne),
|
|
1518
1518
|
align: "start",
|
|
1519
1519
|
onOpenAutoFocus: (e) => {
|
|
1520
1520
|
p || e.preventDefault();
|
|
1521
1521
|
},
|
|
1522
1522
|
onWheel: (e) => e.stopPropagation(),
|
|
1523
|
-
children: /* @__PURE__ */ Z(
|
|
1523
|
+
children: /* @__PURE__ */ Z(an, { children: [p && /* @__PURE__ */ X(sn, {
|
|
1524
1524
|
placeholder: `Search ${a.toLowerCase()}...`,
|
|
1525
1525
|
autoFocus: !0
|
|
1526
|
-
}), /* @__PURE__ */ X(
|
|
1526
|
+
}), /* @__PURE__ */ X(cn, {
|
|
1527
1527
|
onScroll: ve,
|
|
1528
1528
|
children: T ? /* @__PURE__ */ X("div", {
|
|
1529
1529
|
className: "flex items-center justify-center py-6",
|
|
1530
1530
|
children: /* @__PURE__ */ X(re, { className: "size-5 animate-spin text-muted-foreground" })
|
|
1531
1531
|
}) : /* @__PURE__ */ Z(Y, { children: [
|
|
1532
|
-
l &&
|
|
1532
|
+
l && F && fe.length > 0 && /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X(un, { children: /* @__PURE__ */ Z(fn, {
|
|
1533
1533
|
value: "__select_all__",
|
|
1534
1534
|
onSelect: he,
|
|
1535
1535
|
className: "font-medium",
|
|
@@ -1540,31 +1540,31 @@ function xn({ options: e = [], groups: t = [], value: r, onValueChange: i, place
|
|
|
1540
1540
|
className: "text-primary-foreground"
|
|
1541
1541
|
})
|
|
1542
1542
|
}), /* @__PURE__ */ X("span", { children: "Select all" })]
|
|
1543
|
-
}) }), /* @__PURE__ */ X(
|
|
1544
|
-
/* @__PURE__ */ X(
|
|
1545
|
-
t.length > 0 ? t.map((e, t) => /* @__PURE__ */ Z(n.Fragment, { children: [t > 0 && /* @__PURE__ */ X(
|
|
1543
|
+
}) }), /* @__PURE__ */ X(dn, {})] }),
|
|
1544
|
+
/* @__PURE__ */ X(ln, { children: "No results found." }),
|
|
1545
|
+
t.length > 0 ? t.map((e, t) => /* @__PURE__ */ Z(n.Fragment, { children: [t > 0 && /* @__PURE__ */ X(dn, {}), /* @__PURE__ */ X(un, {
|
|
1546
1546
|
heading: e.label,
|
|
1547
1547
|
children: e.options.map(we)
|
|
1548
|
-
})] }, e.label)) : /* @__PURE__ */ X(
|
|
1549
|
-
C && /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X(
|
|
1548
|
+
})] }, e.label)) : /* @__PURE__ */ X(un, { children: le.map(we) }),
|
|
1549
|
+
C && /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X(dn, {}), /* @__PURE__ */ X(un, { children: /* @__PURE__ */ Z($, {
|
|
1550
1550
|
variant: "ghost",
|
|
1551
1551
|
className: "w-full justify-start font-normal",
|
|
1552
1552
|
onClick: () => {
|
|
1553
|
-
C(),
|
|
1553
|
+
C(), R(!1);
|
|
1554
1554
|
},
|
|
1555
|
-
children: [/* @__PURE__ */ X(
|
|
1555
|
+
children: [/* @__PURE__ */ X(de, {
|
|
1556
1556
|
size: 16,
|
|
1557
1557
|
className: "-ms-1 opacity-60",
|
|
1558
1558
|
"aria-hidden": !0
|
|
1559
1559
|
}), w]
|
|
1560
1560
|
}) })] }),
|
|
1561
|
-
|
|
1561
|
+
N && /* @__PURE__ */ X("div", {
|
|
1562
1562
|
className: "flex items-center justify-center py-3",
|
|
1563
1563
|
children: /* @__PURE__ */ X(re, { className: "size-4 animate-spin text-muted-foreground" })
|
|
1564
1564
|
})
|
|
1565
1565
|
] })
|
|
1566
1566
|
})] })
|
|
1567
|
-
}),
|
|
1567
|
+
}), Ee = S ? /* @__PURE__ */ X("span", {
|
|
1568
1568
|
"aria-hidden": !0,
|
|
1569
1569
|
className: "ml-0.5 text-destructive",
|
|
1570
1570
|
children: "*"
|
|
@@ -1572,25 +1572,25 @@ function xn({ options: e = [], groups: t = [], value: r, onValueChange: i, place
|
|
|
1572
1572
|
return /* @__PURE__ */ Z("div", {
|
|
1573
1573
|
className: "space-y-1.5",
|
|
1574
1574
|
children: [
|
|
1575
|
-
y && /* @__PURE__ */ Z(
|
|
1575
|
+
y && /* @__PURE__ */ Z(St, {
|
|
1576
1576
|
htmlFor: ie,
|
|
1577
|
-
onClick:
|
|
1577
|
+
onClick: W,
|
|
1578
1578
|
className: Q("cursor-pointer", o && "text-muted-foreground"),
|
|
1579
|
-
children: [y,
|
|
1579
|
+
children: [y, Ee]
|
|
1580
1580
|
}),
|
|
1581
|
-
|
|
1582
|
-
open:
|
|
1581
|
+
G ? /* @__PURE__ */ Z(mn, {
|
|
1582
|
+
open: L,
|
|
1583
1583
|
onOpenChange: ae,
|
|
1584
1584
|
modal: !1,
|
|
1585
|
-
children: [/* @__PURE__ */ X(
|
|
1585
|
+
children: [/* @__PURE__ */ X(hn, {
|
|
1586
1586
|
asChild: !0,
|
|
1587
1587
|
children: /* @__PURE__ */ Z("div", {
|
|
1588
1588
|
"aria-invalid": s,
|
|
1589
|
-
className: Q("flex rounded-md border border-input transition-colors",
|
|
1589
|
+
className: Q("flex rounded-md border border-input transition-colors", xe ? "items-stretch" : "items-center overflow-hidden", q, K, L && "border-ring ring-3 ring-ring/50", "aria-[invalid=true]:border-destructive aria-[invalid=true]:ring-3 aria-[invalid=true]:ring-destructive/20", o && "pointer-events-none cursor-not-allowed opacity-50"),
|
|
1590
1590
|
children: [
|
|
1591
|
-
|
|
1591
|
+
D && /* @__PURE__ */ X("div", {
|
|
1592
1592
|
className: "flex h-full shrink-0 items-center justify-center border-r border-input bg-muted/40 px-3 text-sm text-muted-foreground [&_svg]:size-4",
|
|
1593
|
-
children:
|
|
1593
|
+
children: D
|
|
1594
1594
|
}),
|
|
1595
1595
|
/* @__PURE__ */ Z($, {
|
|
1596
1596
|
id: ie,
|
|
@@ -1599,25 +1599,25 @@ function xn({ options: e = [], groups: t = [], value: r, onValueChange: i, place
|
|
|
1599
1599
|
ref: B,
|
|
1600
1600
|
variant: "ghost",
|
|
1601
1601
|
role: "combobox",
|
|
1602
|
-
"aria-expanded":
|
|
1602
|
+
"aria-expanded": L,
|
|
1603
1603
|
onClick: (e) => {
|
|
1604
|
-
|
|
1604
|
+
I && (e.preventDefault(), e.stopPropagation());
|
|
1605
1605
|
},
|
|
1606
|
-
className: Q("h-full flex-1 justify-between rounded-none border-0 px-3 py-1 font-normal text-foreground shadow-none hover:bg-transparent focus-visible:ring-0",
|
|
1606
|
+
className: Q("h-full flex-1 justify-between rounded-none border-0 px-3 py-1 font-normal text-foreground shadow-none hover:bg-transparent focus-visible:ring-0", xe ? "items-start" : "items-center", u),
|
|
1607
1607
|
children: [Se, Ce]
|
|
1608
1608
|
}),
|
|
1609
|
-
|
|
1609
|
+
O && /* @__PURE__ */ X("div", {
|
|
1610
1610
|
className: "flex h-full shrink-0 items-center justify-center border-l border-input bg-muted/40 px-3 text-sm text-foreground [&_svg]:size-4",
|
|
1611
|
-
children:
|
|
1611
|
+
children: O
|
|
1612
1612
|
})
|
|
1613
1613
|
]
|
|
1614
1614
|
})
|
|
1615
1615
|
}), Te]
|
|
1616
|
-
}) : /* @__PURE__ */ Z(
|
|
1617
|
-
open:
|
|
1616
|
+
}) : /* @__PURE__ */ Z(mn, {
|
|
1617
|
+
open: L,
|
|
1618
1618
|
onOpenChange: ae,
|
|
1619
1619
|
modal: !1,
|
|
1620
|
-
children: [/* @__PURE__ */ X(
|
|
1620
|
+
children: [/* @__PURE__ */ X(hn, {
|
|
1621
1621
|
asChild: !0,
|
|
1622
1622
|
children: /* @__PURE__ */ Z($, {
|
|
1623
1623
|
id: ie,
|
|
@@ -1626,12 +1626,12 @@ function xn({ options: e = [], groups: t = [], value: r, onValueChange: i, place
|
|
|
1626
1626
|
ref: B,
|
|
1627
1627
|
variant: "outline",
|
|
1628
1628
|
role: "combobox",
|
|
1629
|
-
"aria-expanded":
|
|
1629
|
+
"aria-expanded": L,
|
|
1630
1630
|
"aria-invalid": s,
|
|
1631
1631
|
onClick: (e) => {
|
|
1632
|
-
|
|
1632
|
+
I && (e.preventDefault(), e.stopPropagation());
|
|
1633
1633
|
},
|
|
1634
|
-
className: Q("h-auto w-full justify-between px-3 py-1 font-normal text-foreground",
|
|
1634
|
+
className: Q("h-auto w-full justify-between px-3 py-1 font-normal text-foreground", K, xe ? "items-start" : "items-center", q, L && "border-ring ring-3 ring-ring/50", u),
|
|
1635
1635
|
children: [Se, Ce]
|
|
1636
1636
|
})
|
|
1637
1637
|
}), Te]
|
|
@@ -1640,18 +1640,18 @@ function xn({ options: e = [], groups: t = [], value: r, onValueChange: i, place
|
|
|
1640
1640
|
className: "text-xs leading-5 text-destructive",
|
|
1641
1641
|
children: c
|
|
1642
1642
|
}),
|
|
1643
|
-
x && /* @__PURE__ */ X(
|
|
1643
|
+
x && /* @__PURE__ */ X(wt, { children: x })
|
|
1644
1644
|
]
|
|
1645
1645
|
});
|
|
1646
1646
|
}
|
|
1647
1647
|
//#endregion
|
|
1648
1648
|
//#region src/components/ui/checkbox.tsx
|
|
1649
|
-
function
|
|
1650
|
-
return /* @__PURE__ */ X(
|
|
1649
|
+
function Cn({ className: e, ...t }) {
|
|
1650
|
+
return /* @__PURE__ */ X(xe.Root, {
|
|
1651
1651
|
"data-slot": "checkbox",
|
|
1652
1652
|
className: Q("peer relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border border-input transition-colors outline-none group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary", e),
|
|
1653
1653
|
...t,
|
|
1654
|
-
children: /* @__PURE__ */ X(
|
|
1654
|
+
children: /* @__PURE__ */ X(xe.Indicator, {
|
|
1655
1655
|
"data-slot": "checkbox-indicator",
|
|
1656
1656
|
className: "grid place-content-center text-current transition-none [&>svg]:size-3.5",
|
|
1657
1657
|
children: /* @__PURE__ */ X(v, {})
|
|
@@ -1660,7 +1660,7 @@ function Sn({ className: e, ...t }) {
|
|
|
1660
1660
|
}
|
|
1661
1661
|
//#endregion
|
|
1662
1662
|
//#region src/components/ui/table.tsx
|
|
1663
|
-
function
|
|
1663
|
+
function wn({ className: e, ...t }) {
|
|
1664
1664
|
return /* @__PURE__ */ X("div", {
|
|
1665
1665
|
"data-slot": "table-container",
|
|
1666
1666
|
className: "relative w-full overflow-x-auto",
|
|
@@ -1671,49 +1671,49 @@ function Cn({ className: e, ...t }) {
|
|
|
1671
1671
|
})
|
|
1672
1672
|
});
|
|
1673
1673
|
}
|
|
1674
|
-
function
|
|
1674
|
+
function Tn({ className: e, ...t }) {
|
|
1675
1675
|
return /* @__PURE__ */ X("thead", {
|
|
1676
1676
|
"data-slot": "table-header",
|
|
1677
1677
|
className: Q("[&_tr]:border-b", e),
|
|
1678
1678
|
...t
|
|
1679
1679
|
});
|
|
1680
1680
|
}
|
|
1681
|
-
function
|
|
1681
|
+
function En({ className: e, ...t }) {
|
|
1682
1682
|
return /* @__PURE__ */ X("tbody", {
|
|
1683
1683
|
"data-slot": "table-body",
|
|
1684
1684
|
className: Q("[&_tr:last-child]:border-0", e),
|
|
1685
1685
|
...t
|
|
1686
1686
|
});
|
|
1687
1687
|
}
|
|
1688
|
-
function
|
|
1688
|
+
function Dn({ className: e, ...t }) {
|
|
1689
1689
|
return /* @__PURE__ */ X("tfoot", {
|
|
1690
1690
|
"data-slot": "table-footer",
|
|
1691
1691
|
className: Q("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0", e),
|
|
1692
1692
|
...t
|
|
1693
1693
|
});
|
|
1694
1694
|
}
|
|
1695
|
-
function
|
|
1695
|
+
function On({ className: e, ...t }) {
|
|
1696
1696
|
return /* @__PURE__ */ X("tr", {
|
|
1697
1697
|
"data-slot": "table-row",
|
|
1698
1698
|
className: Q("border-b transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted", e),
|
|
1699
1699
|
...t
|
|
1700
1700
|
});
|
|
1701
1701
|
}
|
|
1702
|
-
function
|
|
1702
|
+
function kn({ className: e, ...t }) {
|
|
1703
1703
|
return /* @__PURE__ */ X("th", {
|
|
1704
1704
|
"data-slot": "table-head",
|
|
1705
1705
|
className: Q("h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0", e),
|
|
1706
1706
|
...t
|
|
1707
1707
|
});
|
|
1708
1708
|
}
|
|
1709
|
-
function
|
|
1709
|
+
function An({ className: e, ...t }) {
|
|
1710
1710
|
return /* @__PURE__ */ X("td", {
|
|
1711
1711
|
"data-slot": "table-cell",
|
|
1712
1712
|
className: Q("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0", e),
|
|
1713
1713
|
...t
|
|
1714
1714
|
});
|
|
1715
1715
|
}
|
|
1716
|
-
function
|
|
1716
|
+
function jn({ className: e, ...t }) {
|
|
1717
1717
|
return /* @__PURE__ */ X("caption", {
|
|
1718
1718
|
"data-slot": "table-caption",
|
|
1719
1719
|
className: Q("mt-4 text-sm text-muted-foreground", e),
|
|
@@ -1722,99 +1722,99 @@ function An({ className: e, ...t }) {
|
|
|
1722
1722
|
}
|
|
1723
1723
|
//#endregion
|
|
1724
1724
|
//#region src/components/custom/data-table.tsx
|
|
1725
|
-
var
|
|
1725
|
+
var Mn = {
|
|
1726
1726
|
left: "text-left",
|
|
1727
1727
|
center: "text-center",
|
|
1728
1728
|
right: "text-right"
|
|
1729
1729
|
};
|
|
1730
|
-
function
|
|
1730
|
+
function Nn({ columns: e, data: t, getRowId: r = (e, t) => String(t), selectable: i = !1, selectedIds: a, onSelectionChange: o, rowActions: s, loading: c = !1, emptyMessage: l = "No results.", pagination: u = !1, pageSize: d = 25, pageSizeOptions: f = [
|
|
1731
1731
|
25,
|
|
1732
1732
|
50,
|
|
1733
1733
|
100,
|
|
1734
1734
|
200
|
|
1735
1735
|
], striped: p = !0, stickyHeader: m = !1, maxHeight: h, fillHeight: g = !1, onRowClick: _, className: v }) {
|
|
1736
|
-
let y = n.useMemo(() => t.map((e, t) => r(e, t)), [t, r]), [b, C] = n.useState([]), E = a ?? b,
|
|
1736
|
+
let y = n.useMemo(() => t.map((e, t) => r(e, t)), [t, r]), [b, C] = n.useState([]), E = a ?? b, ee = (e) => {
|
|
1737
1737
|
a === void 0 && C(e), o?.(e);
|
|
1738
|
-
},
|
|
1738
|
+
}, D = y.length > 0 && y.every((e) => E.includes(e)), O = E.length > 0 && !D, k = () => ee(D ? [] : y), te = (e) => ee(E.includes(e) ? E.filter((t) => t !== e) : [...E, e]), A = e.length + +!!i + +!!s, [j, M] = n.useState(d), [N, P] = n.useState(0), F = u ? Math.max(1, Math.ceil(t.length / j)) : 1, I = Math.min(N, F - 1), ne = n.useMemo(() => {
|
|
1739
1739
|
let e = t.map((e, t) => ({
|
|
1740
1740
|
row: e,
|
|
1741
1741
|
index: t
|
|
1742
1742
|
}));
|
|
1743
1743
|
if (!u) return e;
|
|
1744
|
-
let n =
|
|
1745
|
-
return e.slice(n, n +
|
|
1744
|
+
let n = I * j;
|
|
1745
|
+
return e.slice(n, n + j);
|
|
1746
1746
|
}, [
|
|
1747
1747
|
t,
|
|
1748
1748
|
u,
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
]),
|
|
1749
|
+
I,
|
|
1750
|
+
j
|
|
1751
|
+
]), L = "px-4 py-3 first:pl-5 last:pr-5", R = "px-4 first:pl-5 last:pr-5", z = !g && h !== void 0 ? typeof h == "number" ? `${h}px` : h : void 0;
|
|
1752
1752
|
return /* @__PURE__ */ Z("div", {
|
|
1753
1753
|
className: Q("overflow-hidden rounded-lg border", u && "rounded-b-none border-b-0", (g || h !== void 0) && "flex min-h-0 flex-col [&_[data-slot=table-container]]:overflow-y-auto", g && "min-h-0 flex-1 [&_[data-slot=table-container]]:min-h-0 [&_[data-slot=table-container]]:flex-1", !g && h !== void 0 && "[&_[data-slot=table-container]]:max-h-(--dt-max-h)", v),
|
|
1754
1754
|
style: z ? { "--dt-max-h": z } : void 0,
|
|
1755
|
-
children: [/* @__PURE__ */ Z(
|
|
1755
|
+
children: [/* @__PURE__ */ Z(wn, { children: [/* @__PURE__ */ X(Tn, {
|
|
1756
1756
|
className: Q("bg-muted/60", m && Q("sticky top-0 z-10 [&_th]:border-b [&_th]:bg-muted/95 [&_th]:backdrop-blur supports-backdrop-filter:[&_th]:bg-muted/80", "[&_th:first-child]:rounded-tl-lg [&_th:last-child]:rounded-tr-lg")),
|
|
1757
|
-
children: /* @__PURE__ */ Z(
|
|
1757
|
+
children: /* @__PURE__ */ Z(On, {
|
|
1758
1758
|
className: "hover:bg-transparent",
|
|
1759
1759
|
children: [
|
|
1760
|
-
i && /* @__PURE__ */ X(
|
|
1761
|
-
className: Q("w-10",
|
|
1762
|
-
children: /* @__PURE__ */ X(
|
|
1760
|
+
i && /* @__PURE__ */ X(kn, {
|
|
1761
|
+
className: Q("w-10", R),
|
|
1762
|
+
children: /* @__PURE__ */ X(Cn, {
|
|
1763
1763
|
"aria-label": "Select all rows",
|
|
1764
|
-
checked:
|
|
1765
|
-
onCheckedChange:
|
|
1764
|
+
checked: D ? !0 : O ? "indeterminate" : !1,
|
|
1765
|
+
onCheckedChange: k
|
|
1766
1766
|
})
|
|
1767
1767
|
}),
|
|
1768
|
-
e.map((e) => /* @__PURE__ */ X(
|
|
1768
|
+
e.map((e) => /* @__PURE__ */ X(kn, {
|
|
1769
1769
|
style: e.width ? { width: e.width } : void 0,
|
|
1770
|
-
className: Q("h-11 text-xs font-semibold tracking-wide text-foreground uppercase",
|
|
1770
|
+
className: Q("h-11 text-xs font-semibold tracking-wide text-foreground uppercase", R, e.align && Mn[e.align], e.className, e.headerClassName),
|
|
1771
1771
|
children: e.header
|
|
1772
1772
|
}, e.key)),
|
|
1773
|
-
s && /* @__PURE__ */ X(
|
|
1773
|
+
s && /* @__PURE__ */ X(kn, { className: "w-12" })
|
|
1774
1774
|
]
|
|
1775
1775
|
})
|
|
1776
|
-
}), /* @__PURE__ */ X(
|
|
1776
|
+
}), /* @__PURE__ */ X(En, { children: c ? /* @__PURE__ */ X(On, {
|
|
1777
1777
|
className: "hover:bg-transparent",
|
|
1778
|
-
children: /* @__PURE__ */ X(
|
|
1779
|
-
colSpan:
|
|
1778
|
+
children: /* @__PURE__ */ X(An, {
|
|
1779
|
+
colSpan: A,
|
|
1780
1780
|
className: "h-28 text-center",
|
|
1781
1781
|
children: /* @__PURE__ */ Z("span", {
|
|
1782
1782
|
className: "inline-flex items-center gap-2 text-muted-foreground",
|
|
1783
|
-
children: [/* @__PURE__ */ X(
|
|
1783
|
+
children: [/* @__PURE__ */ X(Je, { className: "size-4" }), " Loading…"]
|
|
1784
1784
|
})
|
|
1785
1785
|
})
|
|
1786
|
-
}) : t.length === 0 ? /* @__PURE__ */ X(
|
|
1786
|
+
}) : t.length === 0 ? /* @__PURE__ */ X(On, {
|
|
1787
1787
|
className: "hover:bg-transparent",
|
|
1788
|
-
children: /* @__PURE__ */ X(
|
|
1789
|
-
colSpan:
|
|
1788
|
+
children: /* @__PURE__ */ X(An, {
|
|
1789
|
+
colSpan: A,
|
|
1790
1790
|
className: "h-28 text-center text-muted-foreground",
|
|
1791
1791
|
children: l
|
|
1792
1792
|
})
|
|
1793
|
-
}) :
|
|
1793
|
+
}) : ne.map(({ row: t, index: n }) => {
|
|
1794
1794
|
let r = y[n], a = E.includes(r);
|
|
1795
|
-
return /* @__PURE__ */ Z(
|
|
1795
|
+
return /* @__PURE__ */ Z(On, {
|
|
1796
1796
|
"data-state": a ? "selected" : void 0,
|
|
1797
1797
|
onClick: _ ? () => _(t) : void 0,
|
|
1798
1798
|
className: Q(p && !a && "odd:bg-muted/40", a && "bg-primary/10 shadow-[inset_3px_0_0_0_var(--primary)] hover:bg-primary/15", _ && "cursor-pointer"),
|
|
1799
1799
|
children: [
|
|
1800
|
-
i && /* @__PURE__ */ X(
|
|
1801
|
-
className: Q("w-10",
|
|
1800
|
+
i && /* @__PURE__ */ X(An, {
|
|
1801
|
+
className: Q("w-10", L),
|
|
1802
1802
|
onClick: (e) => e.stopPropagation(),
|
|
1803
|
-
children: /* @__PURE__ */ X(
|
|
1803
|
+
children: /* @__PURE__ */ X(Cn, {
|
|
1804
1804
|
"aria-label": "Select row",
|
|
1805
1805
|
checked: a,
|
|
1806
|
-
onCheckedChange: () =>
|
|
1806
|
+
onCheckedChange: () => te(r)
|
|
1807
1807
|
})
|
|
1808
1808
|
}),
|
|
1809
|
-
e.map((e) => /* @__PURE__ */ X(
|
|
1809
|
+
e.map((e) => /* @__PURE__ */ X(An, {
|
|
1810
1810
|
style: e.width ? { width: e.width } : void 0,
|
|
1811
|
-
className: Q(
|
|
1811
|
+
className: Q(L, e.align && Mn[e.align], e.className),
|
|
1812
1812
|
children: e.cell ? e.cell(t, n) : String(t[e.key] ?? "")
|
|
1813
1813
|
}, e.key)),
|
|
1814
|
-
s && /* @__PURE__ */ X(
|
|
1814
|
+
s && /* @__PURE__ */ X(An, {
|
|
1815
1815
|
className: "w-12 pr-3 text-right",
|
|
1816
1816
|
onClick: (e) => e.stopPropagation(),
|
|
1817
|
-
children: /* @__PURE__ */ X(
|
|
1817
|
+
children: /* @__PURE__ */ X(pt, { items: s(t) })
|
|
1818
1818
|
})
|
|
1819
1819
|
]
|
|
1820
1820
|
}, r);
|
|
@@ -1824,9 +1824,9 @@ function Mn({ columns: e, data: t, getRowId: r = (e, t) => String(t), selectable
|
|
|
1824
1824
|
className: "text-muted-foreground",
|
|
1825
1825
|
children: [
|
|
1826
1826
|
"Page ",
|
|
1827
|
-
t.length === 0 ? 0 :
|
|
1827
|
+
t.length === 0 ? 0 : I + 1,
|
|
1828
1828
|
" of ",
|
|
1829
|
-
|
|
1829
|
+
F,
|
|
1830
1830
|
" (",
|
|
1831
1831
|
t.length,
|
|
1832
1832
|
" total ",
|
|
@@ -1840,13 +1840,13 @@ function Mn({ columns: e, data: t, getRowId: r = (e, t) => String(t), selectable
|
|
|
1840
1840
|
children: [/* @__PURE__ */ X("span", {
|
|
1841
1841
|
className: "whitespace-nowrap",
|
|
1842
1842
|
children: "Rows per page"
|
|
1843
|
-
}), /* @__PURE__ */ X(
|
|
1843
|
+
}), /* @__PURE__ */ X(Sn, {
|
|
1844
1844
|
size: "sm",
|
|
1845
1845
|
className: "w-20",
|
|
1846
|
-
value: String(
|
|
1846
|
+
value: String(j),
|
|
1847
1847
|
onValueChange: (e) => {
|
|
1848
1848
|
let t = typeof e == "object" && e && "value" in e ? e.value : e;
|
|
1849
|
-
|
|
1849
|
+
M(Number(t)), P(0);
|
|
1850
1850
|
},
|
|
1851
1851
|
options: f.map((e) => ({
|
|
1852
1852
|
value: String(e),
|
|
@@ -1860,32 +1860,32 @@ function Mn({ columns: e, data: t, getRowId: r = (e, t) => String(t), selectable
|
|
|
1860
1860
|
variant: "outline",
|
|
1861
1861
|
size: "icon-sm",
|
|
1862
1862
|
"aria-label": "First page",
|
|
1863
|
-
disabled:
|
|
1864
|
-
onClick: () =>
|
|
1863
|
+
disabled: I <= 0,
|
|
1864
|
+
onClick: () => P(0),
|
|
1865
1865
|
children: /* @__PURE__ */ X(w, {})
|
|
1866
1866
|
}),
|
|
1867
1867
|
/* @__PURE__ */ X($, {
|
|
1868
1868
|
variant: "outline",
|
|
1869
1869
|
size: "icon-sm",
|
|
1870
1870
|
"aria-label": "Previous page",
|
|
1871
|
-
disabled:
|
|
1872
|
-
onClick: () =>
|
|
1871
|
+
disabled: I <= 0,
|
|
1872
|
+
onClick: () => P(Math.max(0, I - 1)),
|
|
1873
1873
|
children: /* @__PURE__ */ X(x, {})
|
|
1874
1874
|
}),
|
|
1875
1875
|
/* @__PURE__ */ X($, {
|
|
1876
1876
|
variant: "outline",
|
|
1877
1877
|
size: "icon-sm",
|
|
1878
1878
|
"aria-label": "Next page",
|
|
1879
|
-
disabled:
|
|
1880
|
-
onClick: () =>
|
|
1879
|
+
disabled: I >= F - 1,
|
|
1880
|
+
onClick: () => P(Math.min(F - 1, I + 1)),
|
|
1881
1881
|
children: /* @__PURE__ */ X(S, {})
|
|
1882
1882
|
}),
|
|
1883
1883
|
/* @__PURE__ */ X($, {
|
|
1884
1884
|
variant: "outline",
|
|
1885
1885
|
size: "icon-sm",
|
|
1886
1886
|
"aria-label": "Last page",
|
|
1887
|
-
disabled:
|
|
1888
|
-
onClick: () => F
|
|
1887
|
+
disabled: I >= F - 1,
|
|
1888
|
+
onClick: () => P(F - 1),
|
|
1889
1889
|
children: /* @__PURE__ */ X(T, {})
|
|
1890
1890
|
})
|
|
1891
1891
|
]
|
|
@@ -1896,26 +1896,26 @@ function Mn({ columns: e, data: t, getRowId: r = (e, t) => String(t), selectable
|
|
|
1896
1896
|
}
|
|
1897
1897
|
//#endregion
|
|
1898
1898
|
//#region src/components/custom/form-dialog.tsx
|
|
1899
|
-
function
|
|
1900
|
-
return /* @__PURE__ */ X(
|
|
1899
|
+
function Pn({ children: e, title: t, open: n, onClose: r, description: i, notDismissable: a, footer: o, className: s }) {
|
|
1900
|
+
return /* @__PURE__ */ X(Rt, {
|
|
1901
1901
|
open: n,
|
|
1902
1902
|
onOpenChange: a ? void 0 : (e) => !e && r(),
|
|
1903
|
-
children: /* @__PURE__ */ X(
|
|
1903
|
+
children: /* @__PURE__ */ X(Ut, {
|
|
1904
1904
|
showCloseButton: !1,
|
|
1905
1905
|
className: Q("max-h-[75vh] gap-0 p-0 sm:max-w-2xl", s),
|
|
1906
1906
|
children: /* @__PURE__ */ Z("div", {
|
|
1907
1907
|
className: "flex max-h-[75vh] flex-col",
|
|
1908
1908
|
children: [
|
|
1909
|
-
t && /* @__PURE__ */ X(
|
|
1909
|
+
t && /* @__PURE__ */ X(Wt, {
|
|
1910
1910
|
className: "flex-shrink-0 border-b border-border p-6 pb-4",
|
|
1911
1911
|
children: /* @__PURE__ */ Z("div", {
|
|
1912
1912
|
className: "flex items-start justify-between gap-4",
|
|
1913
1913
|
children: [/* @__PURE__ */ Z("div", {
|
|
1914
1914
|
className: "flex flex-col gap-1",
|
|
1915
|
-
children: [/* @__PURE__ */ X(
|
|
1915
|
+
children: [/* @__PURE__ */ X(Kt, {
|
|
1916
1916
|
className: "text-left text-xl font-semibold",
|
|
1917
1917
|
children: t
|
|
1918
|
-
}), i && /* @__PURE__ */ X(
|
|
1918
|
+
}), i && /* @__PURE__ */ X(qt, {
|
|
1919
1919
|
className: "text-left text-muted-foreground",
|
|
1920
1920
|
children: i
|
|
1921
1921
|
})]
|
|
@@ -1936,7 +1936,7 @@ function Nn({ children: e, title: t, open: n, onClose: r, description: i, notDis
|
|
|
1936
1936
|
className: "flex-1 overflow-y-auto p-6",
|
|
1937
1937
|
children: e
|
|
1938
1938
|
}),
|
|
1939
|
-
o && /* @__PURE__ */ X(
|
|
1939
|
+
o && /* @__PURE__ */ X(Gt, {
|
|
1940
1940
|
className: "m-0 flex-shrink-0 rounded-none border-t border-border bg-transparent p-6 pt-4",
|
|
1941
1941
|
children: o
|
|
1942
1942
|
})
|
|
@@ -1947,19 +1947,19 @@ function Nn({ children: e, title: t, open: n, onClose: r, description: i, notDis
|
|
|
1947
1947
|
}
|
|
1948
1948
|
//#endregion
|
|
1949
1949
|
//#region src/components/ui/radio-group.tsx
|
|
1950
|
-
function
|
|
1951
|
-
return /* @__PURE__ */ X(
|
|
1950
|
+
function Fn({ className: e, ...t }) {
|
|
1951
|
+
return /* @__PURE__ */ X(Ee.Root, {
|
|
1952
1952
|
"data-slot": "radio-group",
|
|
1953
1953
|
className: Q("grid w-full gap-2", e),
|
|
1954
1954
|
...t
|
|
1955
1955
|
});
|
|
1956
1956
|
}
|
|
1957
|
-
function
|
|
1958
|
-
return /* @__PURE__ */ X(
|
|
1957
|
+
function In({ className: e, ...t }) {
|
|
1958
|
+
return /* @__PURE__ */ X(Ee.Item, {
|
|
1959
1959
|
"data-slot": "radio-group-item",
|
|
1960
1960
|
className: Q("group/radio-group-item peer relative flex aspect-square size-4 shrink-0 rounded-full border border-input outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary", e),
|
|
1961
1961
|
...t,
|
|
1962
|
-
children: /* @__PURE__ */ X(
|
|
1962
|
+
children: /* @__PURE__ */ X(Ee.Indicator, {
|
|
1963
1963
|
"data-slot": "radio-group-indicator",
|
|
1964
1964
|
className: "flex size-4 items-center justify-center",
|
|
1965
1965
|
children: /* @__PURE__ */ X("span", { className: "absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 rounded-full bg-primary-foreground" })
|
|
@@ -1968,9 +1968,9 @@ function Fn({ className: e, ...t }) {
|
|
|
1968
1968
|
}
|
|
1969
1969
|
//#endregion
|
|
1970
1970
|
//#region src/components/custom/card-radio-group.tsx
|
|
1971
|
-
function
|
|
1971
|
+
function Ln({ items: e, indicatorPosition: t = "end", className: r, cardClassName: i, ...a }) {
|
|
1972
1972
|
let o = n.useId();
|
|
1973
|
-
return /* @__PURE__ */ X(
|
|
1973
|
+
return /* @__PURE__ */ X(Fn, {
|
|
1974
1974
|
className: Q("gap-2", r),
|
|
1975
1975
|
...a,
|
|
1976
1976
|
children: e.map((e, n) => {
|
|
@@ -1978,7 +1978,7 @@ function In({ items: e, indicatorPosition: t = "end", className: r, cardClassNam
|
|
|
1978
1978
|
return /* @__PURE__ */ Z("label", {
|
|
1979
1979
|
htmlFor: r,
|
|
1980
1980
|
className: Q("flex w-full items-start gap-3 rounded-md border border-input p-4 shadow-xs transition-colors", "has-data-[state=checked]:border-primary/50", e.disabled ? "cursor-not-allowed opacity-60" : "cursor-pointer", i),
|
|
1981
|
-
children: [/* @__PURE__ */ X(
|
|
1981
|
+
children: [/* @__PURE__ */ X(In, {
|
|
1982
1982
|
id: r,
|
|
1983
1983
|
value: e.value,
|
|
1984
1984
|
disabled: e.disabled,
|
|
@@ -2010,76 +2010,168 @@ function In({ items: e, indicatorPosition: t = "end", className: r, cardClassNam
|
|
|
2010
2010
|
});
|
|
2011
2011
|
}
|
|
2012
2012
|
//#endregion
|
|
2013
|
+
//#region src/components/custom/color-picker.tsx
|
|
2014
|
+
var Rn = [
|
|
2015
|
+
"var(--primary)",
|
|
2016
|
+
"var(--red)",
|
|
2017
|
+
"var(--orange)",
|
|
2018
|
+
"var(--yellow)",
|
|
2019
|
+
"var(--green)",
|
|
2020
|
+
"var(--teal)",
|
|
2021
|
+
"var(--cyan)",
|
|
2022
|
+
"var(--blue)",
|
|
2023
|
+
"var(--purple)",
|
|
2024
|
+
"var(--pink)",
|
|
2025
|
+
"var(--gray)",
|
|
2026
|
+
"var(--foreground)"
|
|
2027
|
+
];
|
|
2028
|
+
function zn(e) {
|
|
2029
|
+
if (typeof window > "u" || /^#[0-9a-fA-F]{6}$/.test(e)) return e;
|
|
2030
|
+
let t = document.createElement("span");
|
|
2031
|
+
t.style.color = e, document.body.appendChild(t);
|
|
2032
|
+
let n = getComputedStyle(t).color;
|
|
2033
|
+
document.body.removeChild(t);
|
|
2034
|
+
let r = n.match(/\d+/g);
|
|
2035
|
+
if (!r || r.length < 3) return e;
|
|
2036
|
+
let i = (e) => e.toString(16).padStart(2, "0");
|
|
2037
|
+
return `#${i(+r[0])}${i(+r[1])}${i(+r[2])}`;
|
|
2038
|
+
}
|
|
2039
|
+
function Bn({ value: e, onChange: t, swatches: r = Rn, trigger: i = "swatch", placeholder: a = "Pick a color", disabled: o, className: s }) {
|
|
2040
|
+
let [c, l] = n.useState(e), [u, d] = n.useState(e);
|
|
2041
|
+
e !== u && (d(e), l(e));
|
|
2042
|
+
let f = (e) => {
|
|
2043
|
+
t(zn(e));
|
|
2044
|
+
}, p = (e) => {
|
|
2045
|
+
l(e), /^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(e) && t(e);
|
|
2046
|
+
};
|
|
2047
|
+
return /* @__PURE__ */ Z(mn, { children: [/* @__PURE__ */ X(hn, {
|
|
2048
|
+
asChild: !0,
|
|
2049
|
+
children: i === "input" ? /* @__PURE__ */ Z("button", {
|
|
2050
|
+
type: "button",
|
|
2051
|
+
disabled: o,
|
|
2052
|
+
className: Q("flex h-9 w-56 items-center gap-2 rounded-md border bg-background px-2.5 text-left text-sm outline-none transition-colors hover:bg-muted focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50", s),
|
|
2053
|
+
children: [/* @__PURE__ */ X("span", {
|
|
2054
|
+
className: "size-5 shrink-0 rounded ring-1 ring-foreground/10",
|
|
2055
|
+
style: { background: e || "transparent" }
|
|
2056
|
+
}), /* @__PURE__ */ X("span", {
|
|
2057
|
+
className: Q("flex-1 truncate font-mono", !e && "text-muted-foreground"),
|
|
2058
|
+
children: e || a
|
|
2059
|
+
})]
|
|
2060
|
+
}) : /* @__PURE__ */ X("button", {
|
|
2061
|
+
type: "button",
|
|
2062
|
+
disabled: o,
|
|
2063
|
+
"aria-label": "Pick a color",
|
|
2064
|
+
className: Q("flex size-9 items-center justify-center rounded-md border ring-1 ring-foreground/10 outline-none transition-transform hover:scale-105 focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50", s),
|
|
2065
|
+
style: { background: e || "transparent" },
|
|
2066
|
+
children: !e && /* @__PURE__ */ X(ce, { className: "size-4 text-muted-foreground" })
|
|
2067
|
+
})
|
|
2068
|
+
}), /* @__PURE__ */ Z(gn, {
|
|
2069
|
+
className: "w-64",
|
|
2070
|
+
align: "start",
|
|
2071
|
+
children: [/* @__PURE__ */ X("div", {
|
|
2072
|
+
className: "grid grid-cols-6 gap-2",
|
|
2073
|
+
children: r.map((t) => {
|
|
2074
|
+
let n = zn(t).toLowerCase() === e.toLowerCase();
|
|
2075
|
+
return /* @__PURE__ */ X("button", {
|
|
2076
|
+
type: "button",
|
|
2077
|
+
"aria-label": t,
|
|
2078
|
+
onClick: () => f(t),
|
|
2079
|
+
className: Q("flex aspect-square items-center justify-center rounded-md ring-1 ring-foreground/10 transition-transform hover:scale-105 active:scale-95", n && "ring-2 ring-ring ring-offset-1 ring-offset-popover"),
|
|
2080
|
+
style: { background: t },
|
|
2081
|
+
children: n && /* @__PURE__ */ X(v, { className: "size-3.5 text-white mix-blend-difference" })
|
|
2082
|
+
}, t);
|
|
2083
|
+
})
|
|
2084
|
+
}), /* @__PURE__ */ Z("div", {
|
|
2085
|
+
className: "mt-3 flex items-center gap-2 border-t pt-3",
|
|
2086
|
+
children: [/* @__PURE__ */ X("label", {
|
|
2087
|
+
className: "relative size-7 shrink-0 overflow-hidden rounded ring-1 ring-foreground/10",
|
|
2088
|
+
style: { background: e || "transparent" },
|
|
2089
|
+
children: /* @__PURE__ */ X("input", {
|
|
2090
|
+
type: "color",
|
|
2091
|
+
value: /^#[0-9a-fA-F]{6}$/.test(e) ? e : "#000000",
|
|
2092
|
+
onChange: (e) => t(e.target.value),
|
|
2093
|
+
className: "absolute inset-0 size-full cursor-pointer opacity-0"
|
|
2094
|
+
})
|
|
2095
|
+
}), /* @__PURE__ */ X(Jt, {
|
|
2096
|
+
value: c,
|
|
2097
|
+
onChange: (e) => p(e.target.value),
|
|
2098
|
+
placeholder: "#000000",
|
|
2099
|
+
className: "h-8 font-mono"
|
|
2100
|
+
})]
|
|
2101
|
+
})]
|
|
2102
|
+
})] });
|
|
2103
|
+
}
|
|
2104
|
+
//#endregion
|
|
2013
2105
|
//#region src/components/ui/alert-dialog.tsx
|
|
2014
|
-
function
|
|
2106
|
+
function Vn({ ...e }) {
|
|
2015
2107
|
return /* @__PURE__ */ X(G.Root, {
|
|
2016
2108
|
"data-slot": "alert-dialog",
|
|
2017
2109
|
...e
|
|
2018
2110
|
});
|
|
2019
2111
|
}
|
|
2020
|
-
function
|
|
2112
|
+
function Hn({ ...e }) {
|
|
2021
2113
|
return /* @__PURE__ */ X(G.Trigger, {
|
|
2022
2114
|
"data-slot": "alert-dialog-trigger",
|
|
2023
2115
|
...e
|
|
2024
2116
|
});
|
|
2025
2117
|
}
|
|
2026
|
-
function
|
|
2118
|
+
function Un({ ...e }) {
|
|
2027
2119
|
return /* @__PURE__ */ X(G.Portal, {
|
|
2028
2120
|
"data-slot": "alert-dialog-portal",
|
|
2029
2121
|
...e
|
|
2030
2122
|
});
|
|
2031
2123
|
}
|
|
2032
|
-
function
|
|
2124
|
+
function Wn({ className: e, ...t }) {
|
|
2033
2125
|
return /* @__PURE__ */ X(G.Overlay, {
|
|
2034
2126
|
"data-slot": "alert-dialog-overlay",
|
|
2035
2127
|
className: Q("fixed inset-0 z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0", e),
|
|
2036
2128
|
...t
|
|
2037
2129
|
});
|
|
2038
2130
|
}
|
|
2039
|
-
function
|
|
2040
|
-
return /* @__PURE__ */ Z(
|
|
2131
|
+
function Gn({ className: e, size: t = "default", ...n }) {
|
|
2132
|
+
return /* @__PURE__ */ Z(Un, { children: [/* @__PURE__ */ X(Wn, {}), /* @__PURE__ */ X(G.Content, {
|
|
2041
2133
|
"data-slot": "alert-dialog-content",
|
|
2042
2134
|
"data-size": t,
|
|
2043
2135
|
className: Q("group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", e),
|
|
2044
2136
|
...n
|
|
2045
2137
|
})] });
|
|
2046
2138
|
}
|
|
2047
|
-
function
|
|
2139
|
+
function Kn({ className: e, ...t }) {
|
|
2048
2140
|
return /* @__PURE__ */ X("div", {
|
|
2049
2141
|
"data-slot": "alert-dialog-header",
|
|
2050
2142
|
className: Q("grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]", e),
|
|
2051
2143
|
...t
|
|
2052
2144
|
});
|
|
2053
2145
|
}
|
|
2054
|
-
function
|
|
2146
|
+
function qn({ className: e, ...t }) {
|
|
2055
2147
|
return /* @__PURE__ */ X("div", {
|
|
2056
2148
|
"data-slot": "alert-dialog-footer",
|
|
2057
2149
|
className: Q("-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end", e),
|
|
2058
2150
|
...t
|
|
2059
2151
|
});
|
|
2060
2152
|
}
|
|
2061
|
-
function
|
|
2153
|
+
function Jn({ className: e, ...t }) {
|
|
2062
2154
|
return /* @__PURE__ */ X("div", {
|
|
2063
2155
|
"data-slot": "alert-dialog-media",
|
|
2064
2156
|
className: Q("mb-2 inline-flex size-10 items-center justify-center rounded-md bg-muted sm:group-data-[size=default]/alert-dialog-content:row-span-2 *:[svg:not([class*='size-'])]:size-6", e),
|
|
2065
2157
|
...t
|
|
2066
2158
|
});
|
|
2067
2159
|
}
|
|
2068
|
-
function
|
|
2160
|
+
function Yn({ className: e, ...t }) {
|
|
2069
2161
|
return /* @__PURE__ */ X(G.Title, {
|
|
2070
2162
|
"data-slot": "alert-dialog-title",
|
|
2071
2163
|
className: Q("text-base font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2", e),
|
|
2072
2164
|
...t
|
|
2073
2165
|
});
|
|
2074
2166
|
}
|
|
2075
|
-
function
|
|
2167
|
+
function Xn({ className: e, ...t }) {
|
|
2076
2168
|
return /* @__PURE__ */ X(G.Description, {
|
|
2077
2169
|
"data-slot": "alert-dialog-description",
|
|
2078
2170
|
className: Q("text-sm text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground", e),
|
|
2079
2171
|
...t
|
|
2080
2172
|
});
|
|
2081
2173
|
}
|
|
2082
|
-
function
|
|
2174
|
+
function Zn({ className: e, variant: t = "default", size: n = "default", ...r }) {
|
|
2083
2175
|
return /* @__PURE__ */ X($, {
|
|
2084
2176
|
variant: t,
|
|
2085
2177
|
size: n,
|
|
@@ -2091,7 +2183,7 @@ function qn({ className: e, variant: t = "default", size: n = "default", ...r })
|
|
|
2091
2183
|
})
|
|
2092
2184
|
});
|
|
2093
2185
|
}
|
|
2094
|
-
function
|
|
2186
|
+
function Qn({ className: e, variant: t = "outline", size: n = "default", ...r }) {
|
|
2095
2187
|
return /* @__PURE__ */ X($, {
|
|
2096
2188
|
variant: t,
|
|
2097
2189
|
size: n,
|
|
@@ -2105,7 +2197,7 @@ function Jn({ className: e, variant: t = "outline", size: n = "default", ...r })
|
|
|
2105
2197
|
}
|
|
2106
2198
|
//#endregion
|
|
2107
2199
|
//#region src/components/custom/confirm-prompt.tsx
|
|
2108
|
-
function
|
|
2200
|
+
function $n({ show: e, title: t = "Are you absolutely sure?", message: r = "This action cannot be undone. This will permanently delete and remove your data from our servers.", onConfirm: i, onCancel: a, loading: o, disabled: s, validate: c, item: l = "CONFIRM", confirmLabel: u = "Confirm", cancelLabel: d = "Cancel" }) {
|
|
2109
2201
|
let [f, p] = n.useState(""), [h, g] = n.useState(!1), _ = o ?? h, v = s || _ || !(!c || f === l), y = () => {
|
|
2110
2202
|
_ || (p(""), a());
|
|
2111
2203
|
}, b = async () => {
|
|
@@ -2115,24 +2207,24 @@ function Yn({ show: e, title: t = "Are you absolutely sure?", message: r = "This
|
|
|
2115
2207
|
g(!1);
|
|
2116
2208
|
}
|
|
2117
2209
|
};
|
|
2118
|
-
return /* @__PURE__ */ X(
|
|
2210
|
+
return /* @__PURE__ */ X(Vn, {
|
|
2119
2211
|
open: !!e,
|
|
2120
2212
|
onOpenChange: (e) => {
|
|
2121
2213
|
e || y();
|
|
2122
2214
|
},
|
|
2123
|
-
children: /* @__PURE__ */ Z(
|
|
2215
|
+
children: /* @__PURE__ */ Z(Gn, {
|
|
2124
2216
|
className: "sm:max-w-lg!",
|
|
2125
2217
|
children: [
|
|
2126
|
-
/* @__PURE__ */ Z(
|
|
2218
|
+
/* @__PURE__ */ Z(Kn, { children: [/* @__PURE__ */ Z(Yn, {
|
|
2127
2219
|
className: "flex items-center gap-2",
|
|
2128
2220
|
children: [/* @__PURE__ */ X("div", {
|
|
2129
2221
|
className: "flex size-8 shrink-0 items-center justify-center rounded-full bg-amber-100 dark:bg-amber-900/30",
|
|
2130
2222
|
children: /* @__PURE__ */ X(m, { className: "size-5 text-amber-600 dark:text-amber-500" })
|
|
2131
2223
|
}), t]
|
|
2132
|
-
}), r != null && /* @__PURE__ */ X(
|
|
2224
|
+
}), r != null && /* @__PURE__ */ X(Xn, { children: r })] }),
|
|
2133
2225
|
c && /* @__PURE__ */ Z("div", {
|
|
2134
2226
|
className: "space-y-1",
|
|
2135
|
-
children: [/* @__PURE__ */ Z(
|
|
2227
|
+
children: [/* @__PURE__ */ Z(Xn, { children: [
|
|
2136
2228
|
"To confirm, type",
|
|
2137
2229
|
" ",
|
|
2138
2230
|
/* @__PURE__ */ Z("span", {
|
|
@@ -2145,7 +2237,7 @@ function Yn({ show: e, title: t = "Are you absolutely sure?", message: r = "This
|
|
|
2145
2237
|
}),
|
|
2146
2238
|
" ",
|
|
2147
2239
|
"in the box below"
|
|
2148
|
-
] }), /* @__PURE__ */ X(
|
|
2240
|
+
] }), /* @__PURE__ */ X(Ot, {
|
|
2149
2241
|
value: f,
|
|
2150
2242
|
onChange: (e) => p(e.target.value),
|
|
2151
2243
|
size: "sm",
|
|
@@ -2158,7 +2250,7 @@ function Yn({ show: e, title: t = "Are you absolutely sure?", message: r = "This
|
|
|
2158
2250
|
}
|
|
2159
2251
|
})]
|
|
2160
2252
|
}),
|
|
2161
|
-
/* @__PURE__ */ Z(
|
|
2253
|
+
/* @__PURE__ */ Z(qn, {
|
|
2162
2254
|
className: "gap-2 space-x-0!",
|
|
2163
2255
|
children: [/* @__PURE__ */ X($, {
|
|
2164
2256
|
variant: "outline",
|
|
@@ -2178,24 +2270,24 @@ function Yn({ show: e, title: t = "Are you absolutely sure?", message: r = "This
|
|
|
2178
2270
|
}
|
|
2179
2271
|
//#endregion
|
|
2180
2272
|
//#region src/components/custom/custom-tabs.tsx
|
|
2181
|
-
function
|
|
2182
|
-
return /* @__PURE__ */ X(
|
|
2273
|
+
function er({ type: e = "underline", items: t, className: n, listClassName: r, ...i }) {
|
|
2274
|
+
return /* @__PURE__ */ X(je.Root, {
|
|
2183
2275
|
"data-slot": "custom-tabs",
|
|
2184
2276
|
"data-type": e,
|
|
2185
2277
|
className: Q("flex flex-col gap-2", n),
|
|
2186
2278
|
...i,
|
|
2187
|
-
children: /* @__PURE__ */ X(
|
|
2279
|
+
children: /* @__PURE__ */ X(je.List, {
|
|
2188
2280
|
"data-slot": "custom-tabs-list",
|
|
2189
2281
|
className: Q("inline-flex items-center text-muted-foreground", e === "underline" && "w-full gap-6 border-b border-border", e === "pill" && "w-fit gap-1 rounded-lg bg-muted p-1", r),
|
|
2190
|
-
children: t.map((t) => /* @__PURE__ */ X(
|
|
2282
|
+
children: t.map((t) => /* @__PURE__ */ X(tr, {
|
|
2191
2283
|
type: e,
|
|
2192
2284
|
item: t
|
|
2193
2285
|
}, t.value))
|
|
2194
2286
|
})
|
|
2195
2287
|
});
|
|
2196
2288
|
}
|
|
2197
|
-
function
|
|
2198
|
-
return /* @__PURE__ */ Z(
|
|
2289
|
+
function tr({ type: e, item: t }) {
|
|
2290
|
+
return /* @__PURE__ */ Z(je.Trigger, {
|
|
2199
2291
|
"data-slot": "custom-tabs-trigger",
|
|
2200
2292
|
value: t.value,
|
|
2201
2293
|
disabled: t.disabled,
|
|
@@ -2207,7 +2299,7 @@ function Zn({ type: e, item: t }) {
|
|
|
2207
2299
|
className: Q("inline-flex h-5 min-w-5 items-center justify-center rounded-full px-1.5 text-xs font-medium tabular-nums", "bg-muted text-muted-foreground", e === "underline" && "group-data-[state=active]/trigger:bg-primary/10 group-data-[state=active]/trigger:text-primary", e === "pill" && "group-data-[state=active]/trigger:bg-primary-foreground/20 group-data-[state=active]/trigger:text-primary-foreground"),
|
|
2208
2300
|
children: t.count
|
|
2209
2301
|
}),
|
|
2210
|
-
t.badge != null && /* @__PURE__ */ X(
|
|
2302
|
+
t.badge != null && /* @__PURE__ */ X(At, {
|
|
2211
2303
|
className: "px-2 text-[10px]",
|
|
2212
2304
|
children: t.badge
|
|
2213
2305
|
})
|
|
@@ -2216,7 +2308,7 @@ function Zn({ type: e, item: t }) {
|
|
|
2216
2308
|
}
|
|
2217
2309
|
//#endregion
|
|
2218
2310
|
//#region src/components/custom/data-cell.tsx
|
|
2219
|
-
function
|
|
2311
|
+
function nr({ label: e, value: t, icon: n, layout: r = "stacked", className: i, ...a }) {
|
|
2220
2312
|
let o = n && /* @__PURE__ */ X("span", {
|
|
2221
2313
|
className: "shrink-0 text-muted-foreground [&_svg]:size-4",
|
|
2222
2314
|
children: n
|
|
@@ -2249,7 +2341,7 @@ function Qn({ label: e, value: t, icon: n, layout: r = "stacked", className: i,
|
|
|
2249
2341
|
}
|
|
2250
2342
|
//#endregion
|
|
2251
2343
|
//#region src/components/custom/def-row.tsx
|
|
2252
|
-
function
|
|
2344
|
+
function rr({ label: e, value: t, className: n, ...r }) {
|
|
2253
2345
|
return /* @__PURE__ */ Z("div", {
|
|
2254
2346
|
"data-slot": "def-row",
|
|
2255
2347
|
className: Q("flex items-center justify-between gap-4 py-2", n),
|
|
@@ -2265,53 +2357,53 @@ function $n({ label: e, value: t, className: n, ...r }) {
|
|
|
2265
2357
|
}
|
|
2266
2358
|
//#endregion
|
|
2267
2359
|
//#region src/components/ui/empty.tsx
|
|
2268
|
-
function
|
|
2360
|
+
function ir({ className: e, ...t }) {
|
|
2269
2361
|
return /* @__PURE__ */ X("div", {
|
|
2270
2362
|
"data-slot": "empty",
|
|
2271
2363
|
className: Q("flex min-w-0 flex-1 flex-col items-center justify-center gap-6 rounded-lg border-dashed p-6 text-center text-balance md:p-12", e),
|
|
2272
2364
|
...t
|
|
2273
2365
|
});
|
|
2274
2366
|
}
|
|
2275
|
-
function
|
|
2367
|
+
function ar({ className: e, ...t }) {
|
|
2276
2368
|
return /* @__PURE__ */ X("div", {
|
|
2277
2369
|
"data-slot": "empty-header",
|
|
2278
2370
|
className: Q("flex max-w-sm flex-col items-center gap-2 text-center", e),
|
|
2279
2371
|
...t
|
|
2280
2372
|
});
|
|
2281
2373
|
}
|
|
2282
|
-
var
|
|
2374
|
+
var or = W("flex shrink-0 items-center justify-center mb-2 [&_svg:not([class*='size-'])]:size-6", {
|
|
2283
2375
|
variants: { variant: {
|
|
2284
2376
|
default: "bg-transparent",
|
|
2285
2377
|
icon: "bg-muted text-foreground flex size-10 shrink-0 items-center justify-center rounded-lg [&_svg:not([class*='size-'])]:size-6"
|
|
2286
2378
|
} },
|
|
2287
2379
|
defaultVariants: { variant: "default" }
|
|
2288
2380
|
});
|
|
2289
|
-
function
|
|
2381
|
+
function sr({ className: e, variant: t = "default", ...n }) {
|
|
2290
2382
|
return /* @__PURE__ */ X("div", {
|
|
2291
2383
|
"data-slot": "empty-icon",
|
|
2292
2384
|
"data-variant": t,
|
|
2293
|
-
className: Q(
|
|
2385
|
+
className: Q(or({
|
|
2294
2386
|
variant: t,
|
|
2295
2387
|
className: e
|
|
2296
2388
|
})),
|
|
2297
2389
|
...n
|
|
2298
2390
|
});
|
|
2299
2391
|
}
|
|
2300
|
-
function
|
|
2392
|
+
function cr({ className: e, ...t }) {
|
|
2301
2393
|
return /* @__PURE__ */ X("div", {
|
|
2302
2394
|
"data-slot": "empty-title",
|
|
2303
2395
|
className: Q("text-lg font-medium tracking-tight", e),
|
|
2304
2396
|
...t
|
|
2305
2397
|
});
|
|
2306
2398
|
}
|
|
2307
|
-
function
|
|
2399
|
+
function lr({ className: e, ...t }) {
|
|
2308
2400
|
return /* @__PURE__ */ X("p", {
|
|
2309
2401
|
"data-slot": "empty-description",
|
|
2310
2402
|
className: Q("text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-foreground", e),
|
|
2311
2403
|
...t
|
|
2312
2404
|
});
|
|
2313
2405
|
}
|
|
2314
|
-
function
|
|
2406
|
+
function ur({ className: e, ...t }) {
|
|
2315
2407
|
return /* @__PURE__ */ X("div", {
|
|
2316
2408
|
"data-slot": "empty-content",
|
|
2317
2409
|
className: Q("flex w-full max-w-sm min-w-0 flex-col items-center gap-4 text-sm text-balance", e),
|
|
@@ -2320,22 +2412,22 @@ function or({ className: e, ...t }) {
|
|
|
2320
2412
|
}
|
|
2321
2413
|
//#endregion
|
|
2322
2414
|
//#region src/components/custom/empty-state.tsx
|
|
2323
|
-
function
|
|
2324
|
-
return /* @__PURE__ */ Z(
|
|
2415
|
+
function dr({ icon: e = /* @__PURE__ */ X(L, {}), mediaVariant: t = "icon", title: n = "No data", description: r, actions: i, ...a }) {
|
|
2416
|
+
return /* @__PURE__ */ Z(ir, {
|
|
2325
2417
|
...a,
|
|
2326
|
-
children: [/* @__PURE__ */ Z(
|
|
2327
|
-
e != null && /* @__PURE__ */ X(
|
|
2418
|
+
children: [/* @__PURE__ */ Z(ar, { children: [
|
|
2419
|
+
e != null && /* @__PURE__ */ X(sr, {
|
|
2328
2420
|
variant: t,
|
|
2329
2421
|
children: e
|
|
2330
2422
|
}),
|
|
2331
|
-
n != null && /* @__PURE__ */ X(
|
|
2332
|
-
r != null && /* @__PURE__ */ X(
|
|
2333
|
-
] }), i != null && /* @__PURE__ */ X(
|
|
2423
|
+
n != null && /* @__PURE__ */ X(cr, { children: n }),
|
|
2424
|
+
r != null && /* @__PURE__ */ X(lr, { children: r })
|
|
2425
|
+
] }), i != null && /* @__PURE__ */ X(ur, { children: i })]
|
|
2334
2426
|
});
|
|
2335
2427
|
}
|
|
2336
2428
|
//#endregion
|
|
2337
2429
|
//#region src/components/custom/faceted-filter.tsx
|
|
2338
|
-
function
|
|
2430
|
+
function fr(e) {
|
|
2339
2431
|
let { title: t, options: r, searchPlaceholder: i, searchable: a = !0, className: o } = e, s = e.mode !== "single", c = n.useMemo(() => new Set(s ? e.value : e.value ? [e.value] : []), [s, e.value]), l = (t) => {
|
|
2340
2432
|
if (s) {
|
|
2341
2433
|
let n = new Set(c);
|
|
@@ -2345,32 +2437,32 @@ function cr(e) {
|
|
|
2345
2437
|
n(c.has(t) ? null : t);
|
|
2346
2438
|
}
|
|
2347
2439
|
};
|
|
2348
|
-
return /* @__PURE__ */ Z(
|
|
2440
|
+
return /* @__PURE__ */ Z(mn, { children: [/* @__PURE__ */ X(hn, {
|
|
2349
2441
|
asChild: !0,
|
|
2350
2442
|
children: /* @__PURE__ */ Z($, {
|
|
2351
2443
|
variant: "outline",
|
|
2352
2444
|
className: Q("w-fit border-dashed", o),
|
|
2353
2445
|
children: [
|
|
2354
|
-
/* @__PURE__ */ X(
|
|
2446
|
+
/* @__PURE__ */ X(ue, {}),
|
|
2355
2447
|
t,
|
|
2356
|
-
c.size > 0 && /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X(
|
|
2448
|
+
c.size > 0 && /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X(ht, {
|
|
2357
2449
|
orientation: "vertical",
|
|
2358
2450
|
className: "mx-0.5 h-4"
|
|
2359
|
-
}), /* @__PURE__ */ X(
|
|
2451
|
+
}), /* @__PURE__ */ X(At, {
|
|
2360
2452
|
variant: "secondary",
|
|
2361
2453
|
className: "rounded-sm px-1 font-normal",
|
|
2362
2454
|
children: c.size
|
|
2363
2455
|
})] })
|
|
2364
2456
|
]
|
|
2365
2457
|
})
|
|
2366
|
-
}), /* @__PURE__ */ X(
|
|
2458
|
+
}), /* @__PURE__ */ X(gn, {
|
|
2367
2459
|
className: "w-56 p-0",
|
|
2368
2460
|
align: "start",
|
|
2369
|
-
children: /* @__PURE__ */ Z(
|
|
2370
|
-
/* @__PURE__ */ X(
|
|
2371
|
-
/* @__PURE__ */ X(
|
|
2461
|
+
children: /* @__PURE__ */ Z(an, { children: [a && /* @__PURE__ */ X(sn, { placeholder: i ?? t }), /* @__PURE__ */ Z(cn, { children: [
|
|
2462
|
+
/* @__PURE__ */ X(ln, { children: "No results found." }),
|
|
2463
|
+
/* @__PURE__ */ X(un, { children: r.map((e) => {
|
|
2372
2464
|
let t = c.has(e.value);
|
|
2373
|
-
return /* @__PURE__ */ Z(
|
|
2465
|
+
return /* @__PURE__ */ Z(fn, {
|
|
2374
2466
|
onSelect: () => l(e.value),
|
|
2375
2467
|
children: [
|
|
2376
2468
|
/* @__PURE__ */ X("div", {
|
|
@@ -2389,7 +2481,7 @@ function cr(e) {
|
|
|
2389
2481
|
]
|
|
2390
2482
|
}, e.value);
|
|
2391
2483
|
}) }),
|
|
2392
|
-
c.size > 0 && /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X(
|
|
2484
|
+
c.size > 0 && /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X(dn, {}), /* @__PURE__ */ X(un, { children: /* @__PURE__ */ X(fn, {
|
|
2393
2485
|
onSelect: () => {
|
|
2394
2486
|
s ? e.onChange([]) : e.onChange(null);
|
|
2395
2487
|
},
|
|
@@ -2401,7 +2493,7 @@ function cr(e) {
|
|
|
2401
2493
|
}
|
|
2402
2494
|
//#endregion
|
|
2403
2495
|
//#region src/components/custom/list-card.tsx
|
|
2404
|
-
function
|
|
2496
|
+
function pr({ name: e, src: t, className: n }) {
|
|
2405
2497
|
let r = e.split(/\s+/).slice(0, 2).map((e) => e[0]?.toUpperCase() ?? "").join("");
|
|
2406
2498
|
return /* @__PURE__ */ Z("span", {
|
|
2407
2499
|
className: Q("flex min-w-0 items-center gap-1.5 text-xs text-muted-foreground", n),
|
|
@@ -2418,7 +2510,7 @@ function lr({ name: e, src: t, className: n }) {
|
|
|
2418
2510
|
})]
|
|
2419
2511
|
});
|
|
2420
2512
|
}
|
|
2421
|
-
function
|
|
2513
|
+
function mr({ icon: e, children: t, className: n }) {
|
|
2422
2514
|
return /* @__PURE__ */ Z("span", {
|
|
2423
2515
|
className: Q("inline-flex min-w-0 items-center gap-1.5 rounded-md border px-2 py-0.5 text-xs text-muted-foreground [&_svg]:size-3.5 [&_svg]:shrink-0 [&_svg]:opacity-70", n),
|
|
2424
2516
|
children: [e, /* @__PURE__ */ X("span", {
|
|
@@ -2427,8 +2519,8 @@ function ur({ icon: e, children: t, className: n }) {
|
|
|
2427
2519
|
})]
|
|
2428
2520
|
});
|
|
2429
2521
|
}
|
|
2430
|
-
function
|
|
2431
|
-
let g = p != null, _ = s === "row", v = l ? /* @__PURE__ */ X(
|
|
2522
|
+
function hr({ title: e, description: t, media: n, badge: r, meta: i, footer: a, actions: o, layout: s = "stacked", variant: c = "default", selectable: l = !1, selected: u, onSelectedChange: d, active: f = !1, onClick: p, className: m, ...h }) {
|
|
2523
|
+
let g = p != null, _ = s === "row", v = l ? /* @__PURE__ */ X(Cn, {
|
|
2432
2524
|
checked: u,
|
|
2433
2525
|
onCheckedChange: (e) => d?.(e === !0),
|
|
2434
2526
|
onClick: (e) => e.stopPropagation(),
|
|
@@ -2438,11 +2530,11 @@ function dr({ title: e, description: t, media: n, badge: r, meta: i, footer: a,
|
|
|
2438
2530
|
src: n,
|
|
2439
2531
|
alt: "",
|
|
2440
2532
|
className: "size-12 shrink-0 rounded-md object-cover"
|
|
2441
|
-
}) : n, b = r == null ? null : typeof r == "string" || typeof r == "number" ? /* @__PURE__ */ X(
|
|
2533
|
+
}) : n, b = r == null ? null : typeof r == "string" || typeof r == "number" ? /* @__PURE__ */ X(At, {
|
|
2442
2534
|
variant: "secondary",
|
|
2443
2535
|
className: "font-medium",
|
|
2444
2536
|
children: r
|
|
2445
|
-
}) : r, x = Array.isArray(o) ? /* @__PURE__ */ X(
|
|
2537
|
+
}) : r, x = Array.isArray(o) ? /* @__PURE__ */ X(pt, {
|
|
2446
2538
|
items: o,
|
|
2447
2539
|
align: "end"
|
|
2448
2540
|
}) : o, S = Q("rounded-xl border p-4 text-card-foreground transition-colors", c === "alt" ? "bg-muted/50" : "bg-card", g && "cursor-pointer hover:bg-accent/40 focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50", f && "ring-2 ring-ring", m), C = {
|
|
@@ -2526,22 +2618,63 @@ function dr({ title: e, description: t, media: n, badge: r, meta: i, footer: a,
|
|
|
2526
2618
|
]
|
|
2527
2619
|
});
|
|
2528
2620
|
}
|
|
2529
|
-
var
|
|
2621
|
+
var gr = {
|
|
2530
2622
|
1: "grid-cols-1",
|
|
2531
2623
|
2: "grid-cols-1 sm:grid-cols-2",
|
|
2532
2624
|
3: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",
|
|
2533
2625
|
4: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-4"
|
|
2534
2626
|
};
|
|
2535
|
-
function
|
|
2627
|
+
function _r({ columns: e = 3, className: t, ...n }) {
|
|
2536
2628
|
return /* @__PURE__ */ X("div", {
|
|
2537
2629
|
"data-slot": "list-card-grid",
|
|
2538
|
-
className: Q("grid w-full gap-4",
|
|
2630
|
+
className: Q("grid w-full gap-4", gr[e], t),
|
|
2539
2631
|
...n
|
|
2540
2632
|
});
|
|
2541
2633
|
}
|
|
2542
2634
|
//#endregion
|
|
2635
|
+
//#region src/components/custom/map-marker-pin.tsx
|
|
2636
|
+
function vr({ icon: e, color: t = "bg-primary", size: n = 28, rotate: r, active: i = !1, label: a, labelOnActive: o = !0, className: s, ...c }) {
|
|
2637
|
+
let l = a != null && (!o || i);
|
|
2638
|
+
return /* @__PURE__ */ Z("span", {
|
|
2639
|
+
"data-slot": "map-marker-pin",
|
|
2640
|
+
"data-active": i || void 0,
|
|
2641
|
+
className: Q("relative flex flex-col items-center", s),
|
|
2642
|
+
...c,
|
|
2643
|
+
children: [
|
|
2644
|
+
i && /* @__PURE__ */ X("span", {
|
|
2645
|
+
"aria-hidden": !0,
|
|
2646
|
+
className: Q("absolute top-0 animate-ping rounded-full opacity-30", t),
|
|
2647
|
+
style: {
|
|
2648
|
+
width: n + 4,
|
|
2649
|
+
height: n + 4
|
|
2650
|
+
}
|
|
2651
|
+
}),
|
|
2652
|
+
/* @__PURE__ */ X("span", {
|
|
2653
|
+
className: Q("flex items-center justify-center rounded-full text-white shadow-md ring-2 ring-background transition-transform [&_svg]:size-1/2", t, i && "scale-110"),
|
|
2654
|
+
style: {
|
|
2655
|
+
width: n,
|
|
2656
|
+
height: n
|
|
2657
|
+
},
|
|
2658
|
+
children: r == null ? e : /* @__PURE__ */ X("span", {
|
|
2659
|
+
className: "flex [&_svg]:size-full",
|
|
2660
|
+
style: {
|
|
2661
|
+
width: n / 2,
|
|
2662
|
+
height: n / 2,
|
|
2663
|
+
transform: `rotate(${r}deg)`
|
|
2664
|
+
},
|
|
2665
|
+
children: e
|
|
2666
|
+
})
|
|
2667
|
+
}),
|
|
2668
|
+
l && /* @__PURE__ */ X("span", {
|
|
2669
|
+
className: "mt-1 rounded bg-foreground px-1.5 py-0.5 text-[10px] font-medium whitespace-nowrap text-background shadow",
|
|
2670
|
+
children: a
|
|
2671
|
+
})
|
|
2672
|
+
]
|
|
2673
|
+
});
|
|
2674
|
+
}
|
|
2675
|
+
//#endregion
|
|
2543
2676
|
//#region src/components/custom/not-found.tsx
|
|
2544
|
-
function
|
|
2677
|
+
function yr({ code: e = "404", title: t = "Page Not Found", description: n = "Sorry, we couldn't find the page you're looking for. The page might have been moved, deleted, or never existed.", showBack: r = !0, onGoBack: i, homeHref: a = "/", homeLabel: o = "Go to Home", actions: s, className: c, ...l }) {
|
|
2545
2678
|
let u = () => {
|
|
2546
2679
|
i ? i() : typeof window < "u" && window.history.back();
|
|
2547
2680
|
};
|
|
@@ -2575,7 +2708,7 @@ function mr({ code: e = "404", title: t = "Page Not Found", description: n = "So
|
|
|
2575
2708
|
asChild: !0,
|
|
2576
2709
|
children: /* @__PURE__ */ Z("a", {
|
|
2577
2710
|
href: a,
|
|
2578
|
-
children: [/* @__PURE__ */ X(
|
|
2711
|
+
children: [/* @__PURE__ */ X(F, {}), o]
|
|
2579
2712
|
})
|
|
2580
2713
|
}),
|
|
2581
2714
|
s
|
|
@@ -2586,7 +2719,7 @@ function mr({ code: e = "404", title: t = "Page Not Found", description: n = "So
|
|
|
2586
2719
|
}
|
|
2587
2720
|
//#endregion
|
|
2588
2721
|
//#region src/components/custom/quick-stat.tsx
|
|
2589
|
-
function
|
|
2722
|
+
function br({ icon: e, value: t, label: n, className: r, ...i }) {
|
|
2590
2723
|
return /* @__PURE__ */ Z("div", {
|
|
2591
2724
|
"data-slot": "quick-stat",
|
|
2592
2725
|
className: Q("flex items-center gap-1.5 text-sm", r),
|
|
@@ -2609,7 +2742,7 @@ function hr({ icon: e, value: t, label: n, className: r, ...i }) {
|
|
|
2609
2742
|
}
|
|
2610
2743
|
//#endregion
|
|
2611
2744
|
//#region src/components/ui/card.tsx
|
|
2612
|
-
var
|
|
2745
|
+
var xr = W("group/card flex flex-col gap-4 overflow-hidden rounded-xl py-4 text-sm ring-1 has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl", {
|
|
2613
2746
|
variants: { variant: {
|
|
2614
2747
|
default: "bg-card text-card-foreground ring-foreground/10",
|
|
2615
2748
|
alt: "bg-muted/40 text-card-foreground ring-foreground/10",
|
|
@@ -2620,51 +2753,51 @@ var gr = W("group/card flex flex-col gap-4 overflow-hidden rounded-xl py-4 text-
|
|
|
2620
2753
|
} },
|
|
2621
2754
|
defaultVariants: { variant: "default" }
|
|
2622
2755
|
});
|
|
2623
|
-
function
|
|
2756
|
+
function Sr({ className: e, size: t = "default", variant: n = "default", ...r }) {
|
|
2624
2757
|
return /* @__PURE__ */ X("div", {
|
|
2625
2758
|
"data-slot": "card",
|
|
2626
2759
|
"data-size": t,
|
|
2627
2760
|
"data-variant": n,
|
|
2628
|
-
className: Q(
|
|
2761
|
+
className: Q(xr({ variant: n }), e),
|
|
2629
2762
|
...r
|
|
2630
2763
|
});
|
|
2631
2764
|
}
|
|
2632
|
-
function
|
|
2765
|
+
function Cr({ className: e, ...t }) {
|
|
2633
2766
|
return /* @__PURE__ */ X("div", {
|
|
2634
2767
|
"data-slot": "card-header",
|
|
2635
2768
|
className: Q("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-4 group-data-[size=sm]/card:px-3 has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-4 group-data-[size=sm]/card:[.border-b]:pb-3", e),
|
|
2636
2769
|
...t
|
|
2637
2770
|
});
|
|
2638
2771
|
}
|
|
2639
|
-
function
|
|
2772
|
+
function wr({ className: e, ...t }) {
|
|
2640
2773
|
return /* @__PURE__ */ X("div", {
|
|
2641
2774
|
"data-slot": "card-title",
|
|
2642
2775
|
className: Q("text-base leading-snug font-medium group-data-[size=sm]/card:text-sm", e),
|
|
2643
2776
|
...t
|
|
2644
2777
|
});
|
|
2645
2778
|
}
|
|
2646
|
-
function
|
|
2779
|
+
function Tr({ className: e, ...t }) {
|
|
2647
2780
|
return /* @__PURE__ */ X("div", {
|
|
2648
2781
|
"data-slot": "card-description",
|
|
2649
2782
|
className: Q("text-sm text-muted-foreground", e),
|
|
2650
2783
|
...t
|
|
2651
2784
|
});
|
|
2652
2785
|
}
|
|
2653
|
-
function
|
|
2786
|
+
function Er({ className: e, ...t }) {
|
|
2654
2787
|
return /* @__PURE__ */ X("div", {
|
|
2655
2788
|
"data-slot": "card-action",
|
|
2656
2789
|
className: Q("col-start-2 row-span-2 row-start-1 self-start justify-self-end", e),
|
|
2657
2790
|
...t
|
|
2658
2791
|
});
|
|
2659
2792
|
}
|
|
2660
|
-
function
|
|
2793
|
+
function Dr({ className: e, ...t }) {
|
|
2661
2794
|
return /* @__PURE__ */ X("div", {
|
|
2662
2795
|
"data-slot": "card-content",
|
|
2663
2796
|
className: Q("px-4 group-data-[size=sm]/card:px-3", e),
|
|
2664
2797
|
...t
|
|
2665
2798
|
});
|
|
2666
2799
|
}
|
|
2667
|
-
function
|
|
2800
|
+
function Or({ className: e, ...t }) {
|
|
2668
2801
|
return /* @__PURE__ */ X("div", {
|
|
2669
2802
|
"data-slot": "card-footer",
|
|
2670
2803
|
className: Q("flex items-center rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/card:p-3", e),
|
|
@@ -2673,7 +2806,7 @@ function Cr({ className: e, ...t }) {
|
|
|
2673
2806
|
}
|
|
2674
2807
|
//#endregion
|
|
2675
2808
|
//#region src/components/custom/sensor-card.tsx
|
|
2676
|
-
var
|
|
2809
|
+
var kr = {
|
|
2677
2810
|
primary: {
|
|
2678
2811
|
text: "text-primary",
|
|
2679
2812
|
bg: "bg-primary"
|
|
@@ -2691,8 +2824,8 @@ var wr = {
|
|
|
2691
2824
|
bg: "bg-muted-foreground"
|
|
2692
2825
|
}
|
|
2693
2826
|
};
|
|
2694
|
-
function
|
|
2695
|
-
let h =
|
|
2827
|
+
function Ar({ icon: e, mode: t, description: n, value: r, showAccent: i = !1, colorVariant: a = "primary", accentColorVariant: o, valueColorVariant: s, showPercentSign: c = !0, unit: l, stackedLayout: u = !1, variant: d = "default", onClick: f, onValueClick: p, className: m }) {
|
|
2828
|
+
let h = kr[a], g = kr[o ?? a], _ = s ? kr[s].text : "text-foreground", v = u ? "size-10" : "size-5", y = e ?? (t?.toLowerCase() === "auto" ? /* @__PURE__ */ X(fe, { className: Q(v, h.text) }) : /* @__PURE__ */ X(ee, { className: Q(v, h.text) })), b = /* @__PURE__ */ Z(Y, { children: [u ? /* @__PURE__ */ Z("div", {
|
|
2696
2829
|
className: "flex items-center gap-3",
|
|
2697
2830
|
children: [y, /* @__PURE__ */ Z("div", {
|
|
2698
2831
|
className: "flex flex-col",
|
|
@@ -2734,7 +2867,7 @@ function Tr({ icon: e, mode: t, description: n, value: r, showAccent: i = !1, co
|
|
|
2734
2867
|
children: c && r !== "" && !isNaN(Number(r)) ? `${r}%` : r
|
|
2735
2868
|
})]
|
|
2736
2869
|
})] }), x = Q("flex w-full flex-row items-center justify-between gap-3", u ? "py-3 pr-3 pl-3" : "py-3.5 pr-3 pl-4", f && "cursor-pointer hover:bg-accent", m);
|
|
2737
|
-
return d === "standalone" ? /* @__PURE__ */ X(
|
|
2870
|
+
return d === "standalone" ? /* @__PURE__ */ X(Sr, {
|
|
2738
2871
|
className: "p-0",
|
|
2739
2872
|
onClick: f,
|
|
2740
2873
|
children: /* @__PURE__ */ X("div", {
|
|
@@ -2749,39 +2882,39 @@ function Tr({ icon: e, mode: t, description: n, value: r, showAccent: i = !1, co
|
|
|
2749
2882
|
}
|
|
2750
2883
|
//#endregion
|
|
2751
2884
|
//#region src/components/ui/sheet.tsx
|
|
2752
|
-
function
|
|
2885
|
+
function jr({ ...e }) {
|
|
2753
2886
|
return /* @__PURE__ */ X(K.Root, {
|
|
2754
2887
|
"data-slot": "sheet",
|
|
2755
2888
|
...e
|
|
2756
2889
|
});
|
|
2757
2890
|
}
|
|
2758
|
-
function
|
|
2891
|
+
function Mr({ ...e }) {
|
|
2759
2892
|
return /* @__PURE__ */ X(K.Trigger, {
|
|
2760
2893
|
"data-slot": "sheet-trigger",
|
|
2761
2894
|
...e
|
|
2762
2895
|
});
|
|
2763
2896
|
}
|
|
2764
|
-
function
|
|
2897
|
+
function Nr({ ...e }) {
|
|
2765
2898
|
return /* @__PURE__ */ X(K.Close, {
|
|
2766
2899
|
"data-slot": "sheet-close",
|
|
2767
2900
|
...e
|
|
2768
2901
|
});
|
|
2769
2902
|
}
|
|
2770
|
-
function
|
|
2903
|
+
function Pr({ ...e }) {
|
|
2771
2904
|
return /* @__PURE__ */ X(K.Portal, {
|
|
2772
2905
|
"data-slot": "sheet-portal",
|
|
2773
2906
|
...e
|
|
2774
2907
|
});
|
|
2775
2908
|
}
|
|
2776
|
-
function
|
|
2909
|
+
function Fr({ className: e, ...t }) {
|
|
2777
2910
|
return /* @__PURE__ */ X(K.Overlay, {
|
|
2778
2911
|
"data-slot": "sheet-overlay",
|
|
2779
2912
|
className: Q("fixed inset-0 z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0", e),
|
|
2780
2913
|
...t
|
|
2781
2914
|
});
|
|
2782
2915
|
}
|
|
2783
|
-
function
|
|
2784
|
-
return /* @__PURE__ */ Z(
|
|
2916
|
+
function Ir({ className: e, children: t, side: n = "right", showCloseButton: r = !0, ...i }) {
|
|
2917
|
+
return /* @__PURE__ */ Z(Pr, { children: [/* @__PURE__ */ X(Fr, {}), /* @__PURE__ */ Z(K.Content, {
|
|
2785
2918
|
"data-slot": "sheet-content",
|
|
2786
2919
|
"data-side": n,
|
|
2787
2920
|
className: Q("fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-[side=bottom]:data-open:slide-in-from-bottom-10 data-[side=left]:data-open:slide-in-from-left-10 data-[side=right]:data-open:slide-in-from-right-10 data-[side=top]:data-open:slide-in-from-top-10 data-closed:animate-out data-closed:fade-out-0 data-[side=bottom]:data-closed:slide-out-to-bottom-10 data-[side=left]:data-closed:slide-out-to-left-10 data-[side=right]:data-closed:slide-out-to-right-10 data-[side=top]:data-closed:slide-out-to-top-10", e),
|
|
@@ -2801,28 +2934,28 @@ function jr({ className: e, children: t, side: n = "right", showCloseButton: r =
|
|
|
2801
2934
|
})]
|
|
2802
2935
|
})] });
|
|
2803
2936
|
}
|
|
2804
|
-
function
|
|
2937
|
+
function Lr({ className: e, ...t }) {
|
|
2805
2938
|
return /* @__PURE__ */ X("div", {
|
|
2806
2939
|
"data-slot": "sheet-header",
|
|
2807
2940
|
className: Q("flex flex-col gap-0.5 p-4", e),
|
|
2808
2941
|
...t
|
|
2809
2942
|
});
|
|
2810
2943
|
}
|
|
2811
|
-
function
|
|
2944
|
+
function Rr({ className: e, ...t }) {
|
|
2812
2945
|
return /* @__PURE__ */ X("div", {
|
|
2813
2946
|
"data-slot": "sheet-footer",
|
|
2814
2947
|
className: Q("mt-auto flex flex-col gap-2 p-4", e),
|
|
2815
2948
|
...t
|
|
2816
2949
|
});
|
|
2817
2950
|
}
|
|
2818
|
-
function
|
|
2951
|
+
function zr({ className: e, ...t }) {
|
|
2819
2952
|
return /* @__PURE__ */ X(K.Title, {
|
|
2820
2953
|
"data-slot": "sheet-title",
|
|
2821
2954
|
className: Q("text-base font-medium text-foreground", e),
|
|
2822
2955
|
...t
|
|
2823
2956
|
});
|
|
2824
2957
|
}
|
|
2825
|
-
function
|
|
2958
|
+
function Br({ className: e, ...t }) {
|
|
2826
2959
|
return /* @__PURE__ */ X(K.Description, {
|
|
2827
2960
|
"data-slot": "sheet-description",
|
|
2828
2961
|
className: Q("text-sm text-muted-foreground", e),
|
|
@@ -2831,17 +2964,17 @@ function Fr({ className: e, ...t }) {
|
|
|
2831
2964
|
}
|
|
2832
2965
|
//#endregion
|
|
2833
2966
|
//#region src/components/custom/side-sheet.tsx
|
|
2834
|
-
function
|
|
2967
|
+
function Vr({ children: e, title: t, open: n, onClose: r, description: i, side: a = "right", floating: o, onBack: s, notDismissable: c, footer: l, className: u }) {
|
|
2835
2968
|
let d = s !== void 0;
|
|
2836
|
-
return /* @__PURE__ */ X(
|
|
2969
|
+
return /* @__PURE__ */ X(jr, {
|
|
2837
2970
|
open: n,
|
|
2838
2971
|
onOpenChange: c ? void 0 : (e) => !e && r(),
|
|
2839
|
-
children: /* @__PURE__ */ Z(
|
|
2972
|
+
children: /* @__PURE__ */ Z(Ir, {
|
|
2840
2973
|
side: a,
|
|
2841
2974
|
showCloseButton: !1,
|
|
2842
2975
|
className: Q("flex w-full flex-col gap-0 overflow-hidden p-0", "data-[side=left]:sm:max-w-[570px] data-[side=right]:sm:max-w-[570px]", o && Q("rounded-xl shadow-xl ring-1 ring-foreground/10", "data-[side=right]:inset-y-3 data-[side=right]:right-3 data-[side=right]:h-auto", "data-[side=left]:inset-y-3 data-[side=left]:left-3 data-[side=left]:h-auto"), u),
|
|
2843
2976
|
children: [
|
|
2844
|
-
/* @__PURE__ */ Z(
|
|
2977
|
+
/* @__PURE__ */ Z(Lr, {
|
|
2845
2978
|
className: "shrink-0 flex-row items-center gap-2 border-b border-border px-4 py-3",
|
|
2846
2979
|
children: [/* @__PURE__ */ X($, {
|
|
2847
2980
|
type: "button",
|
|
@@ -2855,10 +2988,10 @@ function Ir({ children: e, title: t, open: n, onClose: r, description: i, side:
|
|
|
2855
2988
|
children: X(d ? x : U, {})
|
|
2856
2989
|
}), /* @__PURE__ */ Z("div", {
|
|
2857
2990
|
className: "flex min-w-0 flex-col",
|
|
2858
|
-
children: [/* @__PURE__ */ X(
|
|
2991
|
+
children: [/* @__PURE__ */ X(zr, {
|
|
2859
2992
|
className: "truncate text-left text-lg font-semibold",
|
|
2860
2993
|
children: t
|
|
2861
|
-
}), i && /* @__PURE__ */ X(
|
|
2994
|
+
}), i && /* @__PURE__ */ X(Br, {
|
|
2862
2995
|
className: "text-left",
|
|
2863
2996
|
children: i
|
|
2864
2997
|
})]
|
|
@@ -2876,7 +3009,7 @@ function Ir({ children: e, title: t, open: n, onClose: r, description: i, side:
|
|
|
2876
3009
|
})
|
|
2877
3010
|
});
|
|
2878
3011
|
}
|
|
2879
|
-
function
|
|
3012
|
+
function Hr({ label: e, action: t, className: n, children: r, ...i }) {
|
|
2880
3013
|
return /* @__PURE__ */ Z("div", {
|
|
2881
3014
|
"data-slot": "side-sheet-section",
|
|
2882
3015
|
...i,
|
|
@@ -2898,7 +3031,7 @@ function Lr({ label: e, action: t, className: n, children: r, ...i }) {
|
|
|
2898
3031
|
}
|
|
2899
3032
|
//#endregion
|
|
2900
3033
|
//#region src/components/custom/stat-card.tsx
|
|
2901
|
-
var
|
|
3034
|
+
var Ur = {
|
|
2902
3035
|
primary: {
|
|
2903
3036
|
text: "text-primary",
|
|
2904
3037
|
bg: "bg-primary",
|
|
@@ -2925,14 +3058,14 @@ var Rr = {
|
|
|
2925
3058
|
soft: "bg-muted"
|
|
2926
3059
|
}
|
|
2927
3060
|
};
|
|
2928
|
-
function
|
|
3061
|
+
function Wr({ data: e, colorVar: t }) {
|
|
2929
3062
|
let r = n.useId().replace(/:/g, "");
|
|
2930
3063
|
return /* @__PURE__ */ X("div", {
|
|
2931
3064
|
className: "mt-3 h-16 w-full",
|
|
2932
|
-
children: /* @__PURE__ */ X(
|
|
3065
|
+
children: /* @__PURE__ */ X(ze, {
|
|
2933
3066
|
width: "100%",
|
|
2934
3067
|
height: "100%",
|
|
2935
|
-
children: /* @__PURE__ */ Z(
|
|
3068
|
+
children: /* @__PURE__ */ Z(Re, {
|
|
2936
3069
|
data: e.map((e, t) => ({
|
|
2937
3070
|
x: t,
|
|
2938
3071
|
y: e
|
|
@@ -2958,7 +3091,7 @@ function zr({ data: e, colorVar: t }) {
|
|
|
2958
3091
|
stopColor: t,
|
|
2959
3092
|
stopOpacity: 0
|
|
2960
3093
|
})]
|
|
2961
|
-
}) }), /* @__PURE__ */ X(
|
|
3094
|
+
}) }), /* @__PURE__ */ X(Le, {
|
|
2962
3095
|
dataKey: "y",
|
|
2963
3096
|
type: "natural",
|
|
2964
3097
|
stroke: t,
|
|
@@ -2972,11 +3105,11 @@ function zr({ data: e, colorVar: t }) {
|
|
|
2972
3105
|
})
|
|
2973
3106
|
});
|
|
2974
3107
|
}
|
|
2975
|
-
function
|
|
2976
|
-
let u =
|
|
2977
|
-
return /* @__PURE__ */ Z(
|
|
3108
|
+
function Gr({ title: e, value: t, description: n, icon: r, color: i = "primary", trend: a, progress: o, sparkline: s, ring: c, className: l }) {
|
|
3109
|
+
let u = Ur[i], d = i === "muted" ? "var(--muted-foreground)" : `var(--${Kr(i)})`;
|
|
3110
|
+
return /* @__PURE__ */ Z(Sr, {
|
|
2978
3111
|
className: Q("gap-3", l),
|
|
2979
|
-
children: [/* @__PURE__ */ Z(
|
|
3112
|
+
children: [/* @__PURE__ */ Z(Cr, {
|
|
2980
3113
|
className: "flex flex-row items-start justify-between gap-2 pb-0",
|
|
2981
3114
|
children: [/* @__PURE__ */ X("span", {
|
|
2982
3115
|
className: "text-sm font-medium text-muted-foreground",
|
|
@@ -2985,10 +3118,10 @@ function Br({ title: e, value: t, description: n, icon: r, color: i = "primary",
|
|
|
2985
3118
|
className: Q("flex size-9 shrink-0 items-center justify-center rounded-md", u.soft, u.text, "[&_svg]:size-4"),
|
|
2986
3119
|
children: r
|
|
2987
3120
|
})]
|
|
2988
|
-
}), /* @__PURE__ */ Z(
|
|
3121
|
+
}), /* @__PURE__ */ Z(Dr, { children: [
|
|
2989
3122
|
c ? /* @__PURE__ */ Z("div", {
|
|
2990
3123
|
className: "mt-1 flex items-center gap-4",
|
|
2991
|
-
children: [/* @__PURE__ */ X(
|
|
3124
|
+
children: [/* @__PURE__ */ X(qr, {
|
|
2992
3125
|
ring: c,
|
|
2993
3126
|
colors: u
|
|
2994
3127
|
}), /* @__PURE__ */ Z("div", {
|
|
@@ -3009,7 +3142,7 @@ function Br({ title: e, value: t, description: n, icon: r, color: i = "primary",
|
|
|
3009
3142
|
className: "mt-1 flex items-center gap-1 text-sm text-muted-foreground",
|
|
3010
3143
|
children: [/* @__PURE__ */ Z("span", {
|
|
3011
3144
|
className: Q("flex items-center gap-1 font-medium", a.direction === "down" ? "text-red" : "text-green"),
|
|
3012
|
-
children: [a.direction === "down" ? /* @__PURE__ */ X(
|
|
3145
|
+
children: [a.direction === "down" ? /* @__PURE__ */ X(he, { className: "size-4" }) : /* @__PURE__ */ X(ge, { className: "size-4" }), a.value]
|
|
3013
3146
|
}), a.label]
|
|
3014
3147
|
}) : n && !c ? /* @__PURE__ */ X("p", {
|
|
3015
3148
|
className: "mt-1 text-sm text-muted-foreground",
|
|
@@ -3028,14 +3161,14 @@ function Br({ title: e, value: t, description: n, icon: r, color: i = "primary",
|
|
|
3028
3161
|
children: [/* @__PURE__ */ X("span", { children: o.caption }), /* @__PURE__ */ X("span", { children: o.target })]
|
|
3029
3162
|
})]
|
|
3030
3163
|
}),
|
|
3031
|
-
s && s.length > 1 && /* @__PURE__ */ X(
|
|
3164
|
+
s && s.length > 1 && /* @__PURE__ */ X(Wr, {
|
|
3032
3165
|
data: s,
|
|
3033
3166
|
colorVar: d
|
|
3034
3167
|
})
|
|
3035
3168
|
] })]
|
|
3036
3169
|
});
|
|
3037
3170
|
}
|
|
3038
|
-
function
|
|
3171
|
+
function Kr(e) {
|
|
3039
3172
|
switch (e) {
|
|
3040
3173
|
case "primary": return "primary";
|
|
3041
3174
|
case "success": return "green";
|
|
@@ -3044,7 +3177,7 @@ function Vr(e) {
|
|
|
3044
3177
|
default: return "muted-foreground";
|
|
3045
3178
|
}
|
|
3046
3179
|
}
|
|
3047
|
-
function
|
|
3180
|
+
function qr({ ring: e, colors: t }) {
|
|
3048
3181
|
let n = Math.max(0, Math.min(100, e.value)), r = 2 * Math.PI * 34;
|
|
3049
3182
|
return /* @__PURE__ */ Z("div", {
|
|
3050
3183
|
className: "relative size-20 shrink-0",
|
|
@@ -3078,7 +3211,7 @@ function Hr({ ring: e, colors: t }) {
|
|
|
3078
3211
|
}
|
|
3079
3212
|
//#endregion
|
|
3080
3213
|
//#region src/components/custom/status-list.tsx
|
|
3081
|
-
var
|
|
3214
|
+
var Jr = {
|
|
3082
3215
|
neutral: {
|
|
3083
3216
|
text: "text-muted-foreground",
|
|
3084
3217
|
pill: "border-transparent bg-muted text-muted-foreground",
|
|
@@ -3120,16 +3253,16 @@ var Ur = {
|
|
|
3120
3253
|
avatar: "bg-red/15 text-red"
|
|
3121
3254
|
}
|
|
3122
3255
|
};
|
|
3123
|
-
function
|
|
3256
|
+
function Yr({ tone: e = "neutral", className: t, children: n }) {
|
|
3124
3257
|
return /* @__PURE__ */ X("span", {
|
|
3125
|
-
className: Q("flex size-9 shrink-0 items-center justify-center rounded-lg [&_svg]:size-5",
|
|
3258
|
+
className: Q("flex size-9 shrink-0 items-center justify-center rounded-lg [&_svg]:size-5", Jr[e].softBox, t),
|
|
3126
3259
|
children: n
|
|
3127
3260
|
});
|
|
3128
3261
|
}
|
|
3129
|
-
function
|
|
3262
|
+
function Xr({ src: e, name: t, tone: n = "primary", className: r }) {
|
|
3130
3263
|
let i = t.split(/\s+/).slice(0, 2).map((e) => e[0]?.toUpperCase() ?? "").join("");
|
|
3131
3264
|
return /* @__PURE__ */ X("span", {
|
|
3132
|
-
className: Q("flex size-9 shrink-0 items-center justify-center overflow-hidden rounded-full text-xs font-semibold",
|
|
3265
|
+
className: Q("flex size-9 shrink-0 items-center justify-center overflow-hidden rounded-full text-xs font-semibold", Jr[n].avatar, r),
|
|
3133
3266
|
children: e ? /* @__PURE__ */ X("img", {
|
|
3134
3267
|
src: e,
|
|
3135
3268
|
alt: t,
|
|
@@ -3137,14 +3270,14 @@ function Gr({ src: e, name: t, tone: n = "primary", className: r }) {
|
|
|
3137
3270
|
}) : i
|
|
3138
3271
|
});
|
|
3139
3272
|
}
|
|
3140
|
-
function
|
|
3273
|
+
function Zr({ className: e, ...t }) {
|
|
3141
3274
|
return /* @__PURE__ */ X("div", {
|
|
3142
3275
|
"data-slot": "status-list",
|
|
3143
3276
|
className: Q("flex flex-col gap-2", e),
|
|
3144
3277
|
...t
|
|
3145
3278
|
});
|
|
3146
3279
|
}
|
|
3147
|
-
function
|
|
3280
|
+
function Qr({ label: e, count: t, className: n, children: r, ...i }) {
|
|
3148
3281
|
return /* @__PURE__ */ Z("div", {
|
|
3149
3282
|
"data-slot": "status-list-group",
|
|
3150
3283
|
className: n,
|
|
@@ -3165,8 +3298,8 @@ function qr({ label: e, count: t, className: n, children: r, ...i }) {
|
|
|
3165
3298
|
})]
|
|
3166
3299
|
});
|
|
3167
3300
|
}
|
|
3168
|
-
function
|
|
3169
|
-
let u =
|
|
3301
|
+
function $r({ media: e, title: t, description: n, status: r, statusVariant: i = "pill", hint: a, tone: o = "neutral", active: s = !1, className: c, ...l }) {
|
|
3302
|
+
let u = Jr[o];
|
|
3170
3303
|
return /* @__PURE__ */ Z("div", {
|
|
3171
3304
|
"data-slot": "status-list-item",
|
|
3172
3305
|
className: Q("flex items-center gap-3 rounded-lg border p-3", s ? Q("border-transparent ring-1", u.activeBg) : "bg-card", c),
|
|
@@ -3191,7 +3324,7 @@ function Jr({ media: e, title: t, description: n, status: r, statusVariant: i =
|
|
|
3191
3324
|
}), r != null && (i === "text" ? /* @__PURE__ */ X("span", {
|
|
3192
3325
|
className: Q("text-sm font-medium", u.text),
|
|
3193
3326
|
children: r
|
|
3194
|
-
}) : /* @__PURE__ */ X(
|
|
3327
|
+
}) : /* @__PURE__ */ X(At, {
|
|
3195
3328
|
variant: "outline",
|
|
3196
3329
|
className: Q("font-medium", i === "outline" ? u.outline : u.pill),
|
|
3197
3330
|
children: r
|
|
@@ -3202,9 +3335,9 @@ function Jr({ media: e, title: t, description: n, status: r, statusVariant: i =
|
|
|
3202
3335
|
}
|
|
3203
3336
|
//#endregion
|
|
3204
3337
|
//#region src/components/ui/calendar.tsx
|
|
3205
|
-
function
|
|
3206
|
-
let l =
|
|
3207
|
-
return /* @__PURE__ */ X(
|
|
3338
|
+
function ei({ className: e, classNames: t, showOutsideDays: n = !0, captionLayout: r = "label", buttonVariant: i = "ghost", locale: a, formatters: o, components: s, ...c }) {
|
|
3339
|
+
let l = Ve();
|
|
3340
|
+
return /* @__PURE__ */ X(Be, {
|
|
3208
3341
|
showOutsideDays: n,
|
|
3209
3342
|
className: Q("group/calendar bg-background p-2 [--cell-radius:var(--radius-md)] [--cell-size:--spacing(7)] in-data-[slot=card-content]:bg-transparent in-data-[slot=popover-content]:bg-transparent", String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`, String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`, e),
|
|
3210
3343
|
captionLayout: r,
|
|
@@ -3218,8 +3351,8 @@ function Yr({ className: e, classNames: t, showOutsideDays: n = !0, captionLayou
|
|
|
3218
3351
|
months: Q("relative flex flex-col gap-4 md:flex-row", l.months),
|
|
3219
3352
|
month: Q("flex w-full flex-col gap-4", l.month),
|
|
3220
3353
|
nav: Q("absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1", l.nav),
|
|
3221
|
-
button_previous: Q(
|
|
3222
|
-
button_next: Q(
|
|
3354
|
+
button_previous: Q(Ye({ variant: i }), "size-(--cell-size) p-0 select-none aria-disabled:opacity-50", l.button_previous),
|
|
3355
|
+
button_next: Q(Ye({ variant: i }), "size-(--cell-size) p-0 select-none aria-disabled:opacity-50", l.button_next),
|
|
3223
3356
|
month_caption: Q("flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)", l.month_caption),
|
|
3224
3357
|
dropdowns: Q("flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium", l.dropdowns),
|
|
3225
3358
|
dropdown_root: Q("relative rounded-(--cell-radius)", l.dropdown_root),
|
|
@@ -3252,7 +3385,7 @@ function Yr({ className: e, classNames: t, showOutsideDays: n = !0, captionLayou
|
|
|
3252
3385
|
className: Q("size-4", e),
|
|
3253
3386
|
...n
|
|
3254
3387
|
}),
|
|
3255
|
-
DayButton: ({ ...e }) => /* @__PURE__ */ X(
|
|
3388
|
+
DayButton: ({ ...e }) => /* @__PURE__ */ X(ti, {
|
|
3256
3389
|
locale: a,
|
|
3257
3390
|
...e
|
|
3258
3391
|
}),
|
|
@@ -3268,8 +3401,8 @@ function Yr({ className: e, classNames: t, showOutsideDays: n = !0, captionLayou
|
|
|
3268
3401
|
...c
|
|
3269
3402
|
});
|
|
3270
3403
|
}
|
|
3271
|
-
function
|
|
3272
|
-
let o =
|
|
3404
|
+
function ti({ className: e, day: t, modifiers: r, locale: i, ...a }) {
|
|
3405
|
+
let o = Ve(), s = n.useRef(null);
|
|
3273
3406
|
return n.useEffect(() => {
|
|
3274
3407
|
r.focused && s.current?.focus();
|
|
3275
3408
|
}, [r.focused]), /* @__PURE__ */ X($, {
|
|
@@ -3287,10 +3420,10 @@ function Xr({ className: e, day: t, modifiers: r, locale: i, ...a }) {
|
|
|
3287
3420
|
}
|
|
3288
3421
|
//#endregion
|
|
3289
3422
|
//#region src/components/custom/date-time-range-picker-utils.ts
|
|
3290
|
-
function
|
|
3423
|
+
function ni(e) {
|
|
3291
3424
|
return `${e.getUTCFullYear()}-${String(e.getUTCMonth() + 1).padStart(2, "0")}-${String(e.getUTCDate()).padStart(2, "0")}T${String(e.getUTCHours()).padStart(2, "0")}:${String(e.getUTCMinutes()).padStart(2, "0")}:${String(e.getUTCSeconds()).padStart(2, "0")}Z`;
|
|
3292
3425
|
}
|
|
3293
|
-
function
|
|
3426
|
+
function ri(e, t) {
|
|
3294
3427
|
if (!e) return null;
|
|
3295
3428
|
let n = new Date(e);
|
|
3296
3429
|
if (isNaN(n.getTime())) return null;
|
|
@@ -3313,7 +3446,7 @@ function Qr(e, t) {
|
|
|
3313
3446
|
s: i("second").padStart(2, "0")
|
|
3314
3447
|
};
|
|
3315
3448
|
}
|
|
3316
|
-
function
|
|
3449
|
+
function ii(e, t, n, r, i, a, o) {
|
|
3317
3450
|
let s = Date.UTC(e, t, n, parseInt(r), parseInt(i), parseInt(a)), c = new Date(s), l = new Intl.DateTimeFormat("en-US", {
|
|
3318
3451
|
year: "numeric",
|
|
3319
3452
|
month: "2-digit",
|
|
@@ -3324,9 +3457,9 @@ function $r(e, t, n, r, i, a, o) {
|
|
|
3324
3457
|
hour12: !1,
|
|
3325
3458
|
timeZone: o
|
|
3326
3459
|
}).formatToParts(c), u = (e) => parseInt(l.find((t) => t.type === e)?.value || "0", 10), d = Date.UTC(u("year"), u("month") - 1, u("day"), u("hour"), u("minute"), u("second")) - s;
|
|
3327
|
-
return
|
|
3460
|
+
return ni(new Date(s - d));
|
|
3328
3461
|
}
|
|
3329
|
-
var
|
|
3462
|
+
var ai = [
|
|
3330
3463
|
{
|
|
3331
3464
|
value: "hour",
|
|
3332
3465
|
label: "Hour"
|
|
@@ -3344,8 +3477,8 @@ var ei = [
|
|
|
3344
3477
|
label: "Month"
|
|
3345
3478
|
}
|
|
3346
3479
|
];
|
|
3347
|
-
function
|
|
3348
|
-
let t = /* @__PURE__ */ new Date(), n =
|
|
3480
|
+
function oi(e) {
|
|
3481
|
+
let t = /* @__PURE__ */ new Date(), n = ni(t), r = new Date(t);
|
|
3349
3482
|
switch (e) {
|
|
3350
3483
|
case "hour":
|
|
3351
3484
|
r.setUTCHours(r.getUTCHours() - 1);
|
|
@@ -3361,20 +3494,20 @@ function ti(e) {
|
|
|
3361
3494
|
break;
|
|
3362
3495
|
}
|
|
3363
3496
|
return {
|
|
3364
|
-
from:
|
|
3497
|
+
from: ni(r),
|
|
3365
3498
|
to: n
|
|
3366
3499
|
};
|
|
3367
3500
|
}
|
|
3368
|
-
function
|
|
3501
|
+
function si(e, t) {
|
|
3369
3502
|
let n = new Date(e.from).getTime(), r = new Date(e.to).getTime(), i = r - n, a = t === "prev" ? -i : i;
|
|
3370
3503
|
return {
|
|
3371
3504
|
preset: e.preset,
|
|
3372
|
-
from:
|
|
3373
|
-
to:
|
|
3505
|
+
from: ni(new Date(n + a)),
|
|
3506
|
+
to: ni(new Date(r + a))
|
|
3374
3507
|
};
|
|
3375
3508
|
}
|
|
3376
|
-
function
|
|
3377
|
-
if (e.preset) return
|
|
3509
|
+
function ci(e, t) {
|
|
3510
|
+
if (e.preset) return ai.find((t) => t.value === e.preset)?.label ?? e.preset;
|
|
3378
3511
|
if (e.from && e.to) {
|
|
3379
3512
|
let n = (e) => new Date(e).toLocaleString("en-US", {
|
|
3380
3513
|
year: "numeric",
|
|
@@ -3391,7 +3524,7 @@ function ri(e, t) {
|
|
|
3391
3524
|
}
|
|
3392
3525
|
//#endregion
|
|
3393
3526
|
//#region src/components/custom/date-time-range-picker.tsx
|
|
3394
|
-
function
|
|
3527
|
+
function li({ value: e, max: t, onChange: r }) {
|
|
3395
3528
|
let [i, a] = n.useState(e);
|
|
3396
3529
|
n.useEffect(() => {
|
|
3397
3530
|
a(e);
|
|
@@ -3416,13 +3549,13 @@ function ii({ value: e, max: t, onChange: r }) {
|
|
|
3416
3549
|
className: Q("h-8 w-12 rounded-md border border-input bg-transparent text-center text-sm font-medium dark:bg-input/30", "focus:border-ring focus:ring-3 focus:ring-ring/50 focus:outline-none", "[appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none")
|
|
3417
3550
|
});
|
|
3418
3551
|
}
|
|
3419
|
-
function
|
|
3420
|
-
let [c, l] = n.useState(!1), u = a || "UTC", d =
|
|
3552
|
+
function ui({ isoValue: e, onChange: t, label: r, placeholder: i = "Select date & time", timezone: a, minDate: o, maxDate: s }) {
|
|
3553
|
+
let [c, l] = n.useState(!1), u = a || "UTC", d = ri(e, u), [f, p] = n.useState(d?.h ?? "00"), [m, h] = n.useState(d?.m ?? "00"), [_, v] = n.useState(d?.s ?? "00");
|
|
3421
3554
|
n.useEffect(() => {
|
|
3422
|
-
let t =
|
|
3555
|
+
let t = ri(e, u);
|
|
3423
3556
|
p(t?.h ?? "00"), h(t?.m ?? "00"), v(t?.s ?? "00");
|
|
3424
3557
|
}, [e, u]);
|
|
3425
|
-
let y = d ? new Date(d.year, d.month, d.day) : void 0, b = (e, n, r, i, a, o) => t(
|
|
3558
|
+
let y = d ? new Date(d.year, d.month, d.day) : void 0, b = (e, n, r, i, a, o) => t(ii(e, n, r, i, a, o, u)), x = (e) => {
|
|
3426
3559
|
e && b(e.getFullYear(), e.getMonth(), e.getDate(), f, m, _);
|
|
3427
3560
|
}, S = (e, t) => {
|
|
3428
3561
|
let n = e === "h" ? t : f, r = e === "m" ? t : m, i = e === "s" ? t : _;
|
|
@@ -3452,11 +3585,11 @@ function ai({ isoValue: e, onChange: t, label: r, placeholder: i = "Select date
|
|
|
3452
3585
|
children: [/* @__PURE__ */ X("label", {
|
|
3453
3586
|
className: "px-0.5 text-xs text-muted-foreground",
|
|
3454
3587
|
children: r
|
|
3455
|
-
}), /* @__PURE__ */ Z(
|
|
3588
|
+
}), /* @__PURE__ */ Z(mn, {
|
|
3456
3589
|
open: c,
|
|
3457
3590
|
onOpenChange: l,
|
|
3458
3591
|
modal: !1,
|
|
3459
|
-
children: [/* @__PURE__ */ X(
|
|
3592
|
+
children: [/* @__PURE__ */ X(hn, {
|
|
3460
3593
|
asChild: !0,
|
|
3461
3594
|
children: /* @__PURE__ */ Z("button", {
|
|
3462
3595
|
type: "button",
|
|
@@ -3466,11 +3599,11 @@ function ai({ isoValue: e, onChange: t, label: r, placeholder: i = "Select date
|
|
|
3466
3599
|
children: w
|
|
3467
3600
|
}), /* @__PURE__ */ X(g, { className: "size-3.5 shrink-0 opacity-60" })]
|
|
3468
3601
|
})
|
|
3469
|
-
}), /* @__PURE__ */ Z(
|
|
3602
|
+
}), /* @__PURE__ */ Z(gn, {
|
|
3470
3603
|
className: "w-auto p-0",
|
|
3471
3604
|
align: "start",
|
|
3472
3605
|
sideOffset: 4,
|
|
3473
|
-
children: [/* @__PURE__ */ X(
|
|
3606
|
+
children: [/* @__PURE__ */ X(ei, {
|
|
3474
3607
|
mode: "single",
|
|
3475
3608
|
selected: y,
|
|
3476
3609
|
onSelect: x,
|
|
@@ -3480,8 +3613,8 @@ function ai({ isoValue: e, onChange: t, label: r, placeholder: i = "Select date
|
|
|
3480
3613
|
}), /* @__PURE__ */ Z("div", {
|
|
3481
3614
|
className: "flex items-center gap-2 border-t px-3 py-2.5",
|
|
3482
3615
|
children: [
|
|
3483
|
-
/* @__PURE__ */ X(
|
|
3484
|
-
/* @__PURE__ */ X(
|
|
3616
|
+
/* @__PURE__ */ X(O, { className: "size-4 shrink-0 text-muted-foreground" }),
|
|
3617
|
+
/* @__PURE__ */ X(li, {
|
|
3485
3618
|
value: f,
|
|
3486
3619
|
max: 23,
|
|
3487
3620
|
onChange: (e) => S("h", e)
|
|
@@ -3490,7 +3623,7 @@ function ai({ isoValue: e, onChange: t, label: r, placeholder: i = "Select date
|
|
|
3490
3623
|
className: "text-sm font-medium text-muted-foreground",
|
|
3491
3624
|
children: ":"
|
|
3492
3625
|
}),
|
|
3493
|
-
/* @__PURE__ */ X(
|
|
3626
|
+
/* @__PURE__ */ X(li, {
|
|
3494
3627
|
value: m,
|
|
3495
3628
|
max: 59,
|
|
3496
3629
|
onChange: (e) => S("m", e)
|
|
@@ -3499,7 +3632,7 @@ function ai({ isoValue: e, onChange: t, label: r, placeholder: i = "Select date
|
|
|
3499
3632
|
className: "text-sm font-medium text-muted-foreground",
|
|
3500
3633
|
children: ":"
|
|
3501
3634
|
}),
|
|
3502
|
-
/* @__PURE__ */ X(
|
|
3635
|
+
/* @__PURE__ */ X(li, {
|
|
3503
3636
|
value: _,
|
|
3504
3637
|
max: 59,
|
|
3505
3638
|
onChange: (e) => S("s", e)
|
|
@@ -3510,8 +3643,8 @@ function ai({ isoValue: e, onChange: t, label: r, placeholder: i = "Select date
|
|
|
3510
3643
|
})]
|
|
3511
3644
|
});
|
|
3512
3645
|
}
|
|
3513
|
-
var
|
|
3514
|
-
let c = a ??
|
|
3646
|
+
var di = n.forwardRef(function({ value: e, onChange: t, className: r, timezone: i, presets: a, maxRangeDays: o }, s) {
|
|
3647
|
+
let c = a ?? ai, [l, u] = n.useState(!1), [d, f] = n.useState(e.from), [p, m] = n.useState(e.to);
|
|
3515
3648
|
n.useEffect(() => {
|
|
3516
3649
|
f(e.from), m(e.to);
|
|
3517
3650
|
}, [e]);
|
|
@@ -3523,13 +3656,13 @@ var oi = n.forwardRef(function({ value: e, onChange: t, className: r, timezone:
|
|
|
3523
3656
|
}, _ = (e) => {
|
|
3524
3657
|
t({
|
|
3525
3658
|
preset: e,
|
|
3526
|
-
...
|
|
3659
|
+
...oi(e)
|
|
3527
3660
|
}), u(!1);
|
|
3528
3661
|
};
|
|
3529
|
-
return /* @__PURE__ */ Z(
|
|
3662
|
+
return /* @__PURE__ */ Z(mn, {
|
|
3530
3663
|
open: l,
|
|
3531
3664
|
onOpenChange: u,
|
|
3532
|
-
children: [/* @__PURE__ */ X(
|
|
3665
|
+
children: [/* @__PURE__ */ X(hn, {
|
|
3533
3666
|
asChild: !0,
|
|
3534
3667
|
children: /* @__PURE__ */ Z("button", {
|
|
3535
3668
|
ref: s,
|
|
@@ -3539,12 +3672,12 @@ var oi = n.forwardRef(function({ value: e, onChange: t, className: r, timezone:
|
|
|
3539
3672
|
/* @__PURE__ */ X(g, { className: "size-3.5 shrink-0 opacity-60" }),
|
|
3540
3673
|
/* @__PURE__ */ X("span", {
|
|
3541
3674
|
className: "truncate",
|
|
3542
|
-
children:
|
|
3675
|
+
children: ci(e, i)
|
|
3543
3676
|
}),
|
|
3544
3677
|
/* @__PURE__ */ X(y, { className: Q("size-3.5 shrink-0 opacity-60 transition-transform", l && "rotate-180") })
|
|
3545
3678
|
]
|
|
3546
3679
|
})
|
|
3547
|
-
}), /* @__PURE__ */ X(
|
|
3680
|
+
}), /* @__PURE__ */ X(gn, {
|
|
3548
3681
|
align: "end",
|
|
3549
3682
|
sideOffset: 4,
|
|
3550
3683
|
className: "w-auto p-0",
|
|
@@ -3572,7 +3705,7 @@ var oi = n.forwardRef(function({ value: e, onChange: t, className: r, timezone:
|
|
|
3572
3705
|
className: "px-0.5 text-sm text-muted-foreground",
|
|
3573
3706
|
children: "Custom range"
|
|
3574
3707
|
}),
|
|
3575
|
-
/* @__PURE__ */ X(
|
|
3708
|
+
/* @__PURE__ */ X(ui, {
|
|
3576
3709
|
isoValue: d,
|
|
3577
3710
|
onChange: h,
|
|
3578
3711
|
label: "From",
|
|
@@ -3580,7 +3713,7 @@ var oi = n.forwardRef(function({ value: e, onChange: t, className: r, timezone:
|
|
|
3580
3713
|
timezone: i,
|
|
3581
3714
|
maxDate: (/* @__PURE__ */ new Date()).toISOString()
|
|
3582
3715
|
}),
|
|
3583
|
-
/* @__PURE__ */ X(
|
|
3716
|
+
/* @__PURE__ */ X(ui, {
|
|
3584
3717
|
isoValue: p,
|
|
3585
3718
|
onChange: m,
|
|
3586
3719
|
label: "To",
|
|
@@ -3615,36 +3748,36 @@ var oi = n.forwardRef(function({ value: e, onChange: t, className: r, timezone:
|
|
|
3615
3748
|
})
|
|
3616
3749
|
})]
|
|
3617
3750
|
});
|
|
3618
|
-
}),
|
|
3751
|
+
}), fi = W("group/alert relative grid w-full gap-0.5 rounded-lg border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4", {
|
|
3619
3752
|
variants: { variant: {
|
|
3620
3753
|
default: "bg-card text-card-foreground",
|
|
3621
3754
|
destructive: "bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current"
|
|
3622
3755
|
} },
|
|
3623
3756
|
defaultVariants: { variant: "default" }
|
|
3624
3757
|
});
|
|
3625
|
-
function
|
|
3758
|
+
function pi({ className: e, variant: t, ...n }) {
|
|
3626
3759
|
return /* @__PURE__ */ X("div", {
|
|
3627
3760
|
"data-slot": "alert",
|
|
3628
3761
|
role: "alert",
|
|
3629
|
-
className: Q(
|
|
3762
|
+
className: Q(fi({ variant: t }), e),
|
|
3630
3763
|
...n
|
|
3631
3764
|
});
|
|
3632
3765
|
}
|
|
3633
|
-
function
|
|
3766
|
+
function mi({ className: e, ...t }) {
|
|
3634
3767
|
return /* @__PURE__ */ X("div", {
|
|
3635
3768
|
"data-slot": "alert-title",
|
|
3636
3769
|
className: Q("font-medium group-has-[>svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground", e),
|
|
3637
3770
|
...t
|
|
3638
3771
|
});
|
|
3639
3772
|
}
|
|
3640
|
-
function
|
|
3773
|
+
function hi({ className: e, ...t }) {
|
|
3641
3774
|
return /* @__PURE__ */ X("div", {
|
|
3642
3775
|
"data-slot": "alert-description",
|
|
3643
3776
|
className: Q("text-sm text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4", e),
|
|
3644
3777
|
...t
|
|
3645
3778
|
});
|
|
3646
3779
|
}
|
|
3647
|
-
function
|
|
3780
|
+
function gi({ className: e, ...t }) {
|
|
3648
3781
|
return /* @__PURE__ */ X("div", {
|
|
3649
3782
|
"data-slot": "alert-action",
|
|
3650
3783
|
className: Q("absolute top-2 right-2", e),
|
|
@@ -3653,30 +3786,30 @@ function di({ className: e, ...t }) {
|
|
|
3653
3786
|
}
|
|
3654
3787
|
//#endregion
|
|
3655
3788
|
//#region src/components/ui/button-group.tsx
|
|
3656
|
-
var
|
|
3789
|
+
var _i = W("group/button-group flex w-fit items-stretch *:focus-visible:relative *:focus-visible:z-10 has-[>[data-slot=button-group]]:gap-2 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-lg [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1", {
|
|
3657
3790
|
variants: { orientation: {
|
|
3658
3791
|
horizontal: "[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-r-lg!",
|
|
3659
3792
|
vertical: "flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-b-lg!"
|
|
3660
3793
|
} },
|
|
3661
3794
|
defaultVariants: { orientation: "horizontal" }
|
|
3662
3795
|
});
|
|
3663
|
-
function
|
|
3796
|
+
function vi({ className: e, orientation: t, ...n }) {
|
|
3664
3797
|
return /* @__PURE__ */ X("div", {
|
|
3665
3798
|
role: "group",
|
|
3666
3799
|
"data-slot": "button-group",
|
|
3667
3800
|
"data-orientation": t,
|
|
3668
|
-
className: Q(
|
|
3801
|
+
className: Q(_i({ orientation: t }), e),
|
|
3669
3802
|
...n
|
|
3670
3803
|
});
|
|
3671
3804
|
}
|
|
3672
|
-
function
|
|
3673
|
-
return /* @__PURE__ */ X(t ?
|
|
3805
|
+
function yi({ className: e, asChild: t = !1, ...n }) {
|
|
3806
|
+
return /* @__PURE__ */ X(t ? ke.Root : "div", {
|
|
3674
3807
|
className: Q("flex items-center gap-2 rounded-lg border bg-muted px-2.5 text-sm font-medium [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4", e),
|
|
3675
3808
|
...n
|
|
3676
3809
|
});
|
|
3677
3810
|
}
|
|
3678
|
-
function
|
|
3679
|
-
return /* @__PURE__ */ X(
|
|
3811
|
+
function bi({ className: e, orientation: t = "vertical", ...n }) {
|
|
3812
|
+
return /* @__PURE__ */ X(ht, {
|
|
3680
3813
|
"data-slot": "button-group-separator",
|
|
3681
3814
|
orientation: t,
|
|
3682
3815
|
className: Q("relative self-stretch bg-input data-horizontal:mx-px data-horizontal:w-auto data-vertical:my-px data-vertical:h-auto", e),
|
|
@@ -3685,40 +3818,40 @@ function hi({ className: e, orientation: t = "vertical", ...n }) {
|
|
|
3685
3818
|
}
|
|
3686
3819
|
//#endregion
|
|
3687
3820
|
//#region src/components/ui/chart.tsx
|
|
3688
|
-
var
|
|
3821
|
+
var xi = {
|
|
3689
3822
|
light: "",
|
|
3690
3823
|
dark: ".dark"
|
|
3691
|
-
},
|
|
3824
|
+
}, Si = {
|
|
3692
3825
|
width: 320,
|
|
3693
3826
|
height: 200
|
|
3694
|
-
},
|
|
3695
|
-
function
|
|
3696
|
-
let e = n.useContext(
|
|
3827
|
+
}, Ci = n.createContext(null);
|
|
3828
|
+
function wi() {
|
|
3829
|
+
let e = n.useContext(Ci);
|
|
3697
3830
|
if (!e) throw Error("useChart must be used within a <ChartContainer />");
|
|
3698
3831
|
return e;
|
|
3699
3832
|
}
|
|
3700
|
-
function
|
|
3833
|
+
function Ti({ id: e, className: t, children: r, config: i, initialDimension: a = Si, ...o }) {
|
|
3701
3834
|
let s = n.useId(), c = `chart-${e ?? s.replace(/:/g, "")}`;
|
|
3702
|
-
return /* @__PURE__ */ X(
|
|
3835
|
+
return /* @__PURE__ */ X(Ci.Provider, {
|
|
3703
3836
|
value: { config: i },
|
|
3704
3837
|
children: /* @__PURE__ */ Z("div", {
|
|
3705
3838
|
"data-slot": "chart",
|
|
3706
3839
|
"data-chart": c,
|
|
3707
3840
|
className: Q("flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden", t),
|
|
3708
3841
|
...o,
|
|
3709
|
-
children: [/* @__PURE__ */ X(
|
|
3842
|
+
children: [/* @__PURE__ */ X(Ei, {
|
|
3710
3843
|
id: c,
|
|
3711
3844
|
config: i
|
|
3712
|
-
}), /* @__PURE__ */ X(
|
|
3845
|
+
}), /* @__PURE__ */ X(Ie.ResponsiveContainer, {
|
|
3713
3846
|
initialDimension: a,
|
|
3714
3847
|
children: r
|
|
3715
3848
|
})]
|
|
3716
3849
|
})
|
|
3717
3850
|
});
|
|
3718
3851
|
}
|
|
3719
|
-
var
|
|
3852
|
+
var Ei = ({ id: e, config: t }) => {
|
|
3720
3853
|
let n = Object.entries(t).filter(([, e]) => e.theme ?? e.color);
|
|
3721
|
-
return n.length ? /* @__PURE__ */ X("style", { dangerouslySetInnerHTML: { __html: Object.entries(
|
|
3854
|
+
return n.length ? /* @__PURE__ */ X("style", { dangerouslySetInnerHTML: { __html: Object.entries(xi).map(([t, r]) => `
|
|
3722
3855
|
${r} [data-chart=${e}] {
|
|
3723
3856
|
${n.map(([e, n]) => {
|
|
3724
3857
|
let r = n.theme?.[t] ?? n.color;
|
|
@@ -3726,11 +3859,11 @@ ${n.map(([e, n]) => {
|
|
|
3726
3859
|
}).join("\n")}
|
|
3727
3860
|
}
|
|
3728
3861
|
`).join("\n") } }) : null;
|
|
3729
|
-
},
|
|
3730
|
-
function
|
|
3731
|
-
let { config: m } =
|
|
3862
|
+
}, Di = Ie.Tooltip;
|
|
3863
|
+
function Oi({ active: e, payload: t, className: r, indicator: i = "dot", hideLabel: a = !1, hideIndicator: o = !1, label: s, labelFormatter: c, labelClassName: l, formatter: u, color: d, nameKey: f, labelKey: p }) {
|
|
3864
|
+
let { config: m } = wi(), h = n.useMemo(() => {
|
|
3732
3865
|
if (a || !t?.length) return null;
|
|
3733
|
-
let [e] = t, n =
|
|
3866
|
+
let [e] = t, n = ji(m, e, `${p ?? e?.dataKey ?? e?.name ?? "value"}`), r = !p && typeof s == "string" ? m[s]?.label ?? s : n?.label;
|
|
3734
3867
|
return c ? /* @__PURE__ */ X("div", {
|
|
3735
3868
|
className: Q("font-medium", l),
|
|
3736
3869
|
children: c(r, t)
|
|
@@ -3754,7 +3887,7 @@ function Ci({ active: e, payload: t, className: r, indicator: i = "dot", hideLab
|
|
|
3754
3887
|
children: [g ? null : h, /* @__PURE__ */ X("div", {
|
|
3755
3888
|
className: "grid gap-1.5",
|
|
3756
3889
|
children: t.filter((e) => e.type !== "none").map((e, t) => {
|
|
3757
|
-
let n =
|
|
3890
|
+
let n = ji(m, e, `${f ?? e.name ?? e.dataKey ?? "value"}`), r = d ?? e.payload?.fill ?? e.color;
|
|
3758
3891
|
return /* @__PURE__ */ X("div", {
|
|
3759
3892
|
className: Q("flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground", i === "dot" && "items-center"),
|
|
3760
3893
|
children: u && e?.value !== void 0 && e.name ? u(e.value, e.name, e, t, e.payload) : /* @__PURE__ */ Z(Y, { children: [n?.icon ? /* @__PURE__ */ X(n.icon, {}) : !o && /* @__PURE__ */ X("div", {
|
|
@@ -3786,13 +3919,13 @@ function Ci({ active: e, payload: t, className: r, indicator: i = "dot", hideLab
|
|
|
3786
3919
|
})]
|
|
3787
3920
|
});
|
|
3788
3921
|
}
|
|
3789
|
-
var
|
|
3790
|
-
function
|
|
3791
|
-
let { config: a } =
|
|
3922
|
+
var ki = Ie.Legend;
|
|
3923
|
+
function Ai({ className: e, hideIcon: t = !1, payload: n, verticalAlign: r = "bottom", nameKey: i }) {
|
|
3924
|
+
let { config: a } = wi();
|
|
3792
3925
|
return n?.length ? /* @__PURE__ */ X("div", {
|
|
3793
3926
|
className: Q("flex items-center justify-center gap-4", r === "top" ? "pb-3" : "pt-3", e),
|
|
3794
3927
|
children: n.filter((e) => e.type !== "none").map((e, n) => {
|
|
3795
|
-
let r =
|
|
3928
|
+
let r = ji(a, e, `${i ?? e.dataKey ?? "value"}`);
|
|
3796
3929
|
return /* @__PURE__ */ Z("div", {
|
|
3797
3930
|
className: Q("flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground"),
|
|
3798
3931
|
children: [r?.icon && !t ? /* @__PURE__ */ X(r.icon, {}) : /* @__PURE__ */ X("div", {
|
|
@@ -3803,29 +3936,29 @@ function Ti({ className: e, hideIcon: t = !1, payload: n, verticalAlign: r = "bo
|
|
|
3803
3936
|
})
|
|
3804
3937
|
}) : null;
|
|
3805
3938
|
}
|
|
3806
|
-
function
|
|
3939
|
+
function ji(e, t, n) {
|
|
3807
3940
|
if (typeof t != "object" || !t) return;
|
|
3808
3941
|
let r = "payload" in t && typeof t.payload == "object" && t.payload !== null ? t.payload : void 0, i = n;
|
|
3809
3942
|
return n in t && typeof t[n] == "string" ? i = t[n] : r && n in r && typeof r[n] == "string" && (i = r[n]), i in e ? e[i] : e[n];
|
|
3810
3943
|
}
|
|
3811
3944
|
//#endregion
|
|
3812
3945
|
//#region src/components/ui/hover-card.tsx
|
|
3813
|
-
function
|
|
3814
|
-
return /* @__PURE__ */ X(
|
|
3946
|
+
function Mi({ ...e }) {
|
|
3947
|
+
return /* @__PURE__ */ X(Se.Root, {
|
|
3815
3948
|
"data-slot": "hover-card",
|
|
3816
3949
|
...e
|
|
3817
3950
|
});
|
|
3818
3951
|
}
|
|
3819
|
-
function
|
|
3820
|
-
return /* @__PURE__ */ X(
|
|
3952
|
+
function Ni({ ...e }) {
|
|
3953
|
+
return /* @__PURE__ */ X(Se.Trigger, {
|
|
3821
3954
|
"data-slot": "hover-card-trigger",
|
|
3822
3955
|
...e
|
|
3823
3956
|
});
|
|
3824
3957
|
}
|
|
3825
|
-
function
|
|
3826
|
-
return /* @__PURE__ */ X(
|
|
3958
|
+
function Pi({ className: e, align: t = "center", sideOffset: n = 4, ...r }) {
|
|
3959
|
+
return /* @__PURE__ */ X(Se.Portal, {
|
|
3827
3960
|
"data-slot": "hover-card-portal",
|
|
3828
|
-
children: /* @__PURE__ */ X(
|
|
3961
|
+
children: /* @__PURE__ */ X(Se.Content, {
|
|
3829
3962
|
"data-slot": "hover-card-content",
|
|
3830
3963
|
align: t,
|
|
3831
3964
|
sideOffset: n,
|
|
@@ -3836,7 +3969,7 @@ function ki({ className: e, align: t = "center", sideOffset: n = 4, ...r }) {
|
|
|
3836
3969
|
}
|
|
3837
3970
|
//#endregion
|
|
3838
3971
|
//#region src/components/ui/item.tsx
|
|
3839
|
-
function
|
|
3972
|
+
function Fi({ className: e, ...t }) {
|
|
3840
3973
|
return /* @__PURE__ */ X("div", {
|
|
3841
3974
|
role: "list",
|
|
3842
3975
|
"data-slot": "item-group",
|
|
@@ -3844,15 +3977,15 @@ function Ai({ className: e, ...t }) {
|
|
|
3844
3977
|
...t
|
|
3845
3978
|
});
|
|
3846
3979
|
}
|
|
3847
|
-
function
|
|
3848
|
-
return /* @__PURE__ */ X(
|
|
3980
|
+
function Ii({ className: e, ...t }) {
|
|
3981
|
+
return /* @__PURE__ */ X(ht, {
|
|
3849
3982
|
"data-slot": "item-separator",
|
|
3850
3983
|
orientation: "horizontal",
|
|
3851
3984
|
className: Q("my-2", e),
|
|
3852
3985
|
...t
|
|
3853
3986
|
});
|
|
3854
3987
|
}
|
|
3855
|
-
var
|
|
3988
|
+
var Li = W("group/item flex w-full flex-wrap items-center rounded-lg border text-sm transition-colors duration-100 outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 [a]:transition-colors [a]:hover:bg-muted", {
|
|
3856
3989
|
variants: {
|
|
3857
3990
|
variant: {
|
|
3858
3991
|
default: "border-transparent",
|
|
@@ -3870,12 +4003,12 @@ var Mi = W("group/item flex w-full flex-wrap items-center rounded-lg border text
|
|
|
3870
4003
|
size: "default"
|
|
3871
4004
|
}
|
|
3872
4005
|
});
|
|
3873
|
-
function
|
|
3874
|
-
return /* @__PURE__ */ X(r ?
|
|
4006
|
+
function Ri({ className: e, variant: t = "default", size: n = "default", asChild: r = !1, ...i }) {
|
|
4007
|
+
return /* @__PURE__ */ X(r ? ke.Root : "div", {
|
|
3875
4008
|
"data-slot": "item",
|
|
3876
4009
|
"data-variant": t,
|
|
3877
4010
|
"data-size": n,
|
|
3878
|
-
className: Q(
|
|
4011
|
+
className: Q(Li({
|
|
3879
4012
|
variant: t,
|
|
3880
4013
|
size: n,
|
|
3881
4014
|
className: e
|
|
@@ -3883,7 +4016,7 @@ function Ni({ className: e, variant: t = "default", size: n = "default", asChild
|
|
|
3883
4016
|
...i
|
|
3884
4017
|
});
|
|
3885
4018
|
}
|
|
3886
|
-
var
|
|
4019
|
+
var zi = W("flex shrink-0 items-center justify-center gap-2 group-has-data-[slot=item-description]/item:translate-y-0.5 group-has-data-[slot=item-description]/item:self-start [&_svg]:pointer-events-none", {
|
|
3887
4020
|
variants: { variant: {
|
|
3888
4021
|
default: "bg-transparent",
|
|
3889
4022
|
icon: "[&_svg:not([class*='size-'])]:size-4",
|
|
@@ -3891,53 +4024,53 @@ var Pi = W("flex shrink-0 items-center justify-center gap-2 group-has-data-[slot
|
|
|
3891
4024
|
} },
|
|
3892
4025
|
defaultVariants: { variant: "default" }
|
|
3893
4026
|
});
|
|
3894
|
-
function
|
|
4027
|
+
function Bi({ className: e, variant: t = "default", ...n }) {
|
|
3895
4028
|
return /* @__PURE__ */ X("div", {
|
|
3896
4029
|
"data-slot": "item-media",
|
|
3897
4030
|
"data-variant": t,
|
|
3898
|
-
className: Q(
|
|
4031
|
+
className: Q(zi({
|
|
3899
4032
|
variant: t,
|
|
3900
4033
|
className: e
|
|
3901
4034
|
})),
|
|
3902
4035
|
...n
|
|
3903
4036
|
});
|
|
3904
4037
|
}
|
|
3905
|
-
function
|
|
4038
|
+
function Vi({ className: e, ...t }) {
|
|
3906
4039
|
return /* @__PURE__ */ X("div", {
|
|
3907
4040
|
"data-slot": "item-content",
|
|
3908
4041
|
className: Q("flex flex-1 flex-col gap-1 group-data-[size=xs]/item:gap-0 [&+[data-slot=item-content]]:flex-none", e),
|
|
3909
4042
|
...t
|
|
3910
4043
|
});
|
|
3911
4044
|
}
|
|
3912
|
-
function
|
|
4045
|
+
function Hi({ className: e, ...t }) {
|
|
3913
4046
|
return /* @__PURE__ */ X("div", {
|
|
3914
4047
|
"data-slot": "item-title",
|
|
3915
4048
|
className: Q("line-clamp-1 flex w-fit items-center gap-2 text-sm leading-snug font-medium underline-offset-4", e),
|
|
3916
4049
|
...t
|
|
3917
4050
|
});
|
|
3918
4051
|
}
|
|
3919
|
-
function
|
|
4052
|
+
function Ui({ className: e, ...t }) {
|
|
3920
4053
|
return /* @__PURE__ */ X("p", {
|
|
3921
4054
|
"data-slot": "item-description",
|
|
3922
4055
|
className: Q("line-clamp-2 text-left text-sm leading-normal font-normal text-muted-foreground group-data-[size=xs]/item:text-xs [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary", e),
|
|
3923
4056
|
...t
|
|
3924
4057
|
});
|
|
3925
4058
|
}
|
|
3926
|
-
function
|
|
4059
|
+
function Wi({ className: e, ...t }) {
|
|
3927
4060
|
return /* @__PURE__ */ X("div", {
|
|
3928
4061
|
"data-slot": "item-actions",
|
|
3929
4062
|
className: Q("flex items-center gap-2", e),
|
|
3930
4063
|
...t
|
|
3931
4064
|
});
|
|
3932
4065
|
}
|
|
3933
|
-
function
|
|
4066
|
+
function Gi({ className: e, ...t }) {
|
|
3934
4067
|
return /* @__PURE__ */ X("div", {
|
|
3935
4068
|
"data-slot": "item-header",
|
|
3936
4069
|
className: Q("flex basis-full items-center justify-between gap-2", e),
|
|
3937
4070
|
...t
|
|
3938
4071
|
});
|
|
3939
4072
|
}
|
|
3940
|
-
function
|
|
4073
|
+
function Ki({ className: e, ...t }) {
|
|
3941
4074
|
return /* @__PURE__ */ X("div", {
|
|
3942
4075
|
"data-slot": "item-footer",
|
|
3943
4076
|
className: Q("flex basis-full items-center justify-between gap-2", e),
|
|
@@ -3946,10 +4079,10 @@ function Vi({ className: e, ...t }) {
|
|
|
3946
4079
|
}
|
|
3947
4080
|
//#endregion
|
|
3948
4081
|
//#region src/components/ui/map.tsx
|
|
3949
|
-
var
|
|
4082
|
+
var qi = {
|
|
3950
4083
|
dark: "https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json",
|
|
3951
4084
|
light: "https://basemaps.cartocdn.com/gl/positron-gl-style/style.json"
|
|
3952
|
-
},
|
|
4085
|
+
}, Ji = [
|
|
3953
4086
|
{
|
|
3954
4087
|
label: "Light",
|
|
3955
4088
|
url: "https://basemaps.cartocdn.com/gl/positron-gl-style/style.json"
|
|
@@ -3962,13 +4095,13 @@ var Hi = {
|
|
|
3962
4095
|
label: "Dark",
|
|
3963
4096
|
url: "https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json"
|
|
3964
4097
|
}
|
|
3965
|
-
],
|
|
3966
|
-
function
|
|
3967
|
-
let e = o(
|
|
4098
|
+
], Yi = r(null);
|
|
4099
|
+
function Xi() {
|
|
4100
|
+
let e = o(Yi);
|
|
3968
4101
|
if (!e) throw Error("useMap must be used within a Map component");
|
|
3969
4102
|
return e;
|
|
3970
4103
|
}
|
|
3971
|
-
function
|
|
4104
|
+
function Zi() {
|
|
3972
4105
|
return /* @__PURE__ */ X("div", {
|
|
3973
4106
|
className: "bg-background/50 absolute inset-0 z-10 flex items-center justify-center backdrop-blur-xs",
|
|
3974
4107
|
children: /* @__PURE__ */ Z("div", {
|
|
@@ -3981,7 +4114,7 @@ function Ki() {
|
|
|
3981
4114
|
})
|
|
3982
4115
|
});
|
|
3983
4116
|
}
|
|
3984
|
-
function
|
|
4117
|
+
function Qi(e) {
|
|
3985
4118
|
let t = e.getCenter();
|
|
3986
4119
|
return {
|
|
3987
4120
|
center: [t.lng, t.lat],
|
|
@@ -3990,22 +4123,22 @@ function qi(e) {
|
|
|
3990
4123
|
pitch: e.getPitch()
|
|
3991
4124
|
};
|
|
3992
4125
|
}
|
|
3993
|
-
var
|
|
3994
|
-
let v = h === !1 ? [] : h, y = d(null), [b, x] = f(null), [S, C] = f(!1), [w, T] = f(!1), [E,
|
|
3995
|
-
|
|
3996
|
-
let
|
|
3997
|
-
dark: r?.dark ??
|
|
3998
|
-
light: r?.light ??
|
|
4126
|
+
var $i = i(function({ children: e, className: t, theme: n, styles: r, projection: i, viewport: o, onViewportChange: c, loading: p = !1, controls: m = !0, tiles: h = Ji, ...g }, _) {
|
|
4127
|
+
let v = h === !1 ? [] : h, y = d(null), [b, x] = f(null), [S, C] = f(!1), [w, T] = f(!1), [E, ee] = f(0), D = d(null), O = d(null), k = d(!1), te = o !== void 0 && c !== void 0, A = d(c);
|
|
4128
|
+
A.current = c;
|
|
4129
|
+
let j = u(() => ({
|
|
4130
|
+
dark: r?.dark ?? qi.dark,
|
|
4131
|
+
light: r?.light ?? qi.light
|
|
3999
4132
|
}), [r]);
|
|
4000
4133
|
l(_, () => b, [b]);
|
|
4001
|
-
let
|
|
4002
|
-
|
|
4134
|
+
let M = a(() => {
|
|
4135
|
+
O.current &&= (clearTimeout(O.current), null);
|
|
4003
4136
|
}, []);
|
|
4004
4137
|
s(() => {
|
|
4005
4138
|
if (!y.current) return;
|
|
4006
|
-
let e = v[0]?.url ??
|
|
4007
|
-
|
|
4008
|
-
let t = new
|
|
4139
|
+
let e = v[0]?.url ?? j.light;
|
|
4140
|
+
D.current = e;
|
|
4141
|
+
let t = new He.Map({
|
|
4009
4142
|
container: y.current,
|
|
4010
4143
|
style: e,
|
|
4011
4144
|
renderWorldCopies: !1,
|
|
@@ -4013,40 +4146,40 @@ var Ji = i(function({ children: e, className: t, theme: n, styles: r, projection
|
|
|
4013
4146
|
...g,
|
|
4014
4147
|
...o
|
|
4015
4148
|
}), n = () => {
|
|
4016
|
-
|
|
4149
|
+
M(), O.current = setTimeout(() => {
|
|
4017
4150
|
T(!0), i && t.setProjection(i);
|
|
4018
4151
|
}, 100);
|
|
4019
4152
|
}, r = () => C(!0), a = () => {
|
|
4020
|
-
|
|
4153
|
+
k.current || A.current?.(Qi(t));
|
|
4021
4154
|
};
|
|
4022
4155
|
return t.on("load", r), t.on("styledata", n), t.on("move", a), x(t), () => {
|
|
4023
|
-
|
|
4156
|
+
M(), t.off("load", r), t.off("styledata", n), t.off("move", a), t.remove(), C(!1), T(!1), x(null);
|
|
4024
4157
|
};
|
|
4025
4158
|
}, []), s(() => {
|
|
4026
|
-
if (!b || !
|
|
4027
|
-
let e =
|
|
4159
|
+
if (!b || !te || !o || b.isMoving()) return;
|
|
4160
|
+
let e = Qi(b), t = {
|
|
4028
4161
|
center: o.center ?? e.center,
|
|
4029
4162
|
zoom: o.zoom ?? e.zoom,
|
|
4030
4163
|
bearing: o.bearing ?? e.bearing,
|
|
4031
4164
|
pitch: o.pitch ?? e.pitch
|
|
4032
4165
|
};
|
|
4033
|
-
t.center[0] === e.center[0] && t.center[1] === e.center[1] && t.zoom === e.zoom && t.bearing === e.bearing && t.pitch === e.pitch || (
|
|
4166
|
+
t.center[0] === e.center[0] && t.center[1] === e.center[1] && t.zoom === e.zoom && t.bearing === e.bearing && t.pitch === e.pitch || (k.current = !0, b.jumpTo(t), k.current = !1);
|
|
4034
4167
|
}, [
|
|
4035
4168
|
b,
|
|
4036
|
-
|
|
4169
|
+
te,
|
|
4037
4170
|
o
|
|
4038
4171
|
]), s(() => {
|
|
4039
4172
|
if (!b) return;
|
|
4040
|
-
let e = v[E]?.url ?? (n === "dark" ?
|
|
4041
|
-
|
|
4173
|
+
let e = v[E]?.url ?? (n === "dark" ? j.dark : j.light);
|
|
4174
|
+
D.current !== e && (M(), D.current = e, T(!1), b.setStyle(e, { diff: !0 }));
|
|
4042
4175
|
}, [
|
|
4043
4176
|
b,
|
|
4044
4177
|
E,
|
|
4045
4178
|
n,
|
|
4046
|
-
|
|
4047
|
-
|
|
4179
|
+
j,
|
|
4180
|
+
M
|
|
4048
4181
|
]);
|
|
4049
|
-
let
|
|
4182
|
+
let N = u(() => ({
|
|
4050
4183
|
map: b,
|
|
4051
4184
|
isLoaded: S && w
|
|
4052
4185
|
}), [
|
|
@@ -4054,27 +4187,27 @@ var Ji = i(function({ children: e, className: t, theme: n, styles: r, projection
|
|
|
4054
4187
|
S,
|
|
4055
4188
|
w
|
|
4056
4189
|
]);
|
|
4057
|
-
return /* @__PURE__ */ X(
|
|
4058
|
-
value:
|
|
4190
|
+
return /* @__PURE__ */ X(Yi.Provider, {
|
|
4191
|
+
value: N,
|
|
4059
4192
|
children: /* @__PURE__ */ Z("div", {
|
|
4060
4193
|
ref: y,
|
|
4061
4194
|
className: Q("relative h-full w-full", t),
|
|
4062
|
-
children: [(!S || p) && /* @__PURE__ */ X(
|
|
4195
|
+
children: [(!S || p) && /* @__PURE__ */ X(Zi, {}), b && /* @__PURE__ */ Z(Y, { children: [m && /* @__PURE__ */ X(pa, {
|
|
4063
4196
|
position: "top-right",
|
|
4064
4197
|
tiles: v,
|
|
4065
4198
|
tileIndex: E,
|
|
4066
|
-
onTileChange:
|
|
4199
|
+
onTileChange: ee
|
|
4067
4200
|
}), e] })]
|
|
4068
4201
|
})
|
|
4069
4202
|
});
|
|
4070
|
-
}),
|
|
4071
|
-
function
|
|
4072
|
-
let e = o(
|
|
4203
|
+
}), ea = r(null);
|
|
4204
|
+
function ta() {
|
|
4205
|
+
let e = o(ea);
|
|
4073
4206
|
if (!e) throw Error("Marker components must be used within MapMarker");
|
|
4074
4207
|
return e;
|
|
4075
4208
|
}
|
|
4076
|
-
function
|
|
4077
|
-
let { map: m } =
|
|
4209
|
+
function na({ longitude: e, latitude: t, children: n, onClick: r, onMouseEnter: i, onMouseLeave: a, onDragStart: o, onDrag: c, onDragEnd: l, draggable: f = !1, ...p }) {
|
|
4210
|
+
let { map: m } = Xi(), h = d({
|
|
4078
4211
|
onClick: r,
|
|
4079
4212
|
onMouseEnter: i,
|
|
4080
4213
|
onMouseLeave: a,
|
|
@@ -4091,7 +4224,7 @@ function Zi({ longitude: e, latitude: t, children: n, onClick: r, onMouseEnter:
|
|
|
4091
4224
|
onDragEnd: l
|
|
4092
4225
|
};
|
|
4093
4226
|
let g = u(() => {
|
|
4094
|
-
let n = new
|
|
4227
|
+
let n = new He.Marker({
|
|
4095
4228
|
...p,
|
|
4096
4229
|
element: document.createElement("div"),
|
|
4097
4230
|
draggable: f
|
|
@@ -4122,7 +4255,7 @@ function Zi({ longitude: e, latitude: t, children: n, onClick: r, onMouseEnter:
|
|
|
4122
4255
|
};
|
|
4123
4256
|
}, [m]), (g.getLngLat().lng !== e || g.getLngLat().lat !== t) && g.setLngLat([e, t]), g.isDraggable() !== f && g.setDraggable(f);
|
|
4124
4257
|
let _ = g.getOffset(), v = p.offset ?? [0, 0], [y, b] = Array.isArray(v) ? v : [v.x, v.y];
|
|
4125
|
-
return (_.x !== y || _.y !== b) && g.setOffset(v), g.getRotation() !== p.rotation && g.setRotation(p.rotation ?? 0), g.getRotationAlignment() !== p.rotationAlignment && g.setRotationAlignment(p.rotationAlignment ?? "auto"), g.getPitchAlignment() !== p.pitchAlignment && g.setPitchAlignment(p.pitchAlignment ?? "auto"), /* @__PURE__ */ X(
|
|
4258
|
+
return (_.x !== y || _.y !== b) && g.setOffset(v), g.getRotation() !== p.rotation && g.setRotation(p.rotation ?? 0), g.getRotationAlignment() !== p.rotationAlignment && g.setRotationAlignment(p.rotationAlignment ?? "auto"), g.getPitchAlignment() !== p.pitchAlignment && g.setPitchAlignment(p.pitchAlignment ?? "auto"), /* @__PURE__ */ X(ea.Provider, {
|
|
4126
4259
|
value: {
|
|
4127
4260
|
marker: g,
|
|
4128
4261
|
map: m
|
|
@@ -4130,27 +4263,27 @@ function Zi({ longitude: e, latitude: t, children: n, onClick: r, onMouseEnter:
|
|
|
4130
4263
|
children: n
|
|
4131
4264
|
});
|
|
4132
4265
|
}
|
|
4133
|
-
function
|
|
4134
|
-
let { marker: n } =
|
|
4135
|
-
return
|
|
4266
|
+
function ra({ children: e, className: t }) {
|
|
4267
|
+
let { marker: n } = ta();
|
|
4268
|
+
return Ue(/* @__PURE__ */ X("div", {
|
|
4136
4269
|
className: Q("relative cursor-pointer", t),
|
|
4137
|
-
children: e || /* @__PURE__ */ X(
|
|
4270
|
+
children: e || /* @__PURE__ */ X(ia, {})
|
|
4138
4271
|
}), n.getElement());
|
|
4139
4272
|
}
|
|
4140
|
-
function
|
|
4273
|
+
function ia() {
|
|
4141
4274
|
return /* @__PURE__ */ X("div", { className: "relative h-4 w-4 rounded-full border-2 border-white bg-blue-500 shadow-lg" });
|
|
4142
4275
|
}
|
|
4143
|
-
function
|
|
4276
|
+
function aa({ onClick: e }) {
|
|
4144
4277
|
return /* @__PURE__ */ X("button", {
|
|
4145
4278
|
type: "button",
|
|
4146
4279
|
onClick: e,
|
|
4147
4280
|
"aria-label": "Close popup",
|
|
4148
4281
|
className: "focus-visible:ring-ring hover:bg-muted text-foreground absolute top-0.5 right-0.5 z-10 inline-flex size-5 cursor-pointer items-center justify-center rounded-sm transition-colors focus:outline-none focus-visible:ring-2",
|
|
4149
|
-
children: /* @__PURE__ */ X(
|
|
4282
|
+
children: /* @__PURE__ */ X(be, { className: "size-3.5" })
|
|
4150
4283
|
});
|
|
4151
4284
|
}
|
|
4152
|
-
function
|
|
4153
|
-
let { marker: i, map: a } =
|
|
4285
|
+
function oa({ children: e, className: t, closeButton: n = !1, ...r }) {
|
|
4286
|
+
let { marker: i, map: a } = ta(), o = u(() => document.createElement("div"), []), c = d(r), l = u(() => new He.Popup({
|
|
4154
4287
|
offset: 16,
|
|
4155
4288
|
...r,
|
|
4156
4289
|
closeButton: !1
|
|
@@ -4163,13 +4296,13 @@ function ta({ children: e, className: t, closeButton: n = !1, ...r }) {
|
|
|
4163
4296
|
let e = c.current;
|
|
4164
4297
|
e.offset !== r.offset && l.setOffset(r.offset ?? 16), e.maxWidth !== r.maxWidth && r.maxWidth && l.setMaxWidth(r.maxWidth ?? "none"), c.current = r;
|
|
4165
4298
|
}
|
|
4166
|
-
return
|
|
4299
|
+
return Ue(/* @__PURE__ */ Z("div", {
|
|
4167
4300
|
className: Q("bg-popover text-popover-foreground relative max-w-62 rounded-md border p-3 shadow-md", "animate-in fade-in-0 zoom-in-95 duration-200 ease-out", t),
|
|
4168
|
-
children: [n && /* @__PURE__ */ X(
|
|
4301
|
+
children: [n && /* @__PURE__ */ X(aa, { onClick: () => l.remove() }), e]
|
|
4169
4302
|
}), o);
|
|
4170
4303
|
}
|
|
4171
|
-
function
|
|
4172
|
-
let { marker: r, map: i } =
|
|
4304
|
+
function sa({ children: e, className: t, ...n }) {
|
|
4305
|
+
let { marker: r, map: i } = ta(), a = u(() => document.createElement("div"), []), o = d(n), c = u(() => new He.Popup({
|
|
4173
4306
|
offset: 16,
|
|
4174
4307
|
...n,
|
|
4175
4308
|
closeOnClick: !0,
|
|
@@ -4188,12 +4321,12 @@ function na({ children: e, className: t, ...n }) {
|
|
|
4188
4321
|
let e = o.current;
|
|
4189
4322
|
e.offset !== n.offset && c.setOffset(n.offset ?? 16), e.maxWidth !== n.maxWidth && n.maxWidth && c.setMaxWidth(n.maxWidth ?? "none"), o.current = n;
|
|
4190
4323
|
}
|
|
4191
|
-
return
|
|
4324
|
+
return Ue(/* @__PURE__ */ X("div", {
|
|
4192
4325
|
className: Q("bg-foreground text-background pointer-events-none rounded-md px-2 py-1 text-xs text-balance shadow-md", "animate-in fade-in-0 zoom-in-95 duration-200 ease-out", t),
|
|
4193
4326
|
children: e
|
|
4194
4327
|
}), a);
|
|
4195
4328
|
}
|
|
4196
|
-
function
|
|
4329
|
+
function ca({ children: e, className: t, position: n = "top" }) {
|
|
4197
4330
|
return /* @__PURE__ */ X("div", {
|
|
4198
4331
|
className: Q("absolute left-1/2 -translate-x-1/2 whitespace-nowrap", "text-foreground text-[10px] font-medium", {
|
|
4199
4332
|
top: "bottom-full mb-1",
|
|
@@ -4202,19 +4335,19 @@ function ra({ children: e, className: t, position: n = "top" }) {
|
|
|
4202
4335
|
children: e
|
|
4203
4336
|
});
|
|
4204
4337
|
}
|
|
4205
|
-
var
|
|
4338
|
+
var la = {
|
|
4206
4339
|
"top-left": "top-2 left-2",
|
|
4207
4340
|
"top-right": "top-2 right-2",
|
|
4208
4341
|
"bottom-left": "bottom-2 left-2",
|
|
4209
4342
|
"bottom-right": "bottom-10 right-2"
|
|
4210
4343
|
};
|
|
4211
|
-
function
|
|
4344
|
+
function ua({ children: e }) {
|
|
4212
4345
|
return /* @__PURE__ */ X("div", {
|
|
4213
4346
|
className: "border-border bg-background [&>button:not(:last-child)]:border-border flex flex-col overflow-hidden rounded-md border shadow-sm [&>button:not(:last-child)]:border-b",
|
|
4214
4347
|
children: e
|
|
4215
4348
|
});
|
|
4216
4349
|
}
|
|
4217
|
-
function
|
|
4350
|
+
function da({ onClick: e, label: t, children: n, disabled: r = !1 }) {
|
|
4218
4351
|
return /* @__PURE__ */ X("button", {
|
|
4219
4352
|
onClick: e,
|
|
4220
4353
|
"aria-label": t,
|
|
@@ -4224,7 +4357,7 @@ function oa({ onClick: e, label: t, children: n, disabled: r = !1 }) {
|
|
|
4224
4357
|
children: n
|
|
4225
4358
|
});
|
|
4226
4359
|
}
|
|
4227
|
-
function
|
|
4360
|
+
function fa({ tiles: e, tileIndex: t, onTileChange: n, openLeft: r }) {
|
|
4228
4361
|
let [i, a] = f(!1), o = d(null);
|
|
4229
4362
|
return s(() => {
|
|
4230
4363
|
if (!i) return;
|
|
@@ -4239,7 +4372,7 @@ function sa({ tiles: e, tileIndex: t, onTileChange: n, openLeft: r }) {
|
|
|
4239
4372
|
}, [i]), /* @__PURE__ */ Z("div", {
|
|
4240
4373
|
ref: o,
|
|
4241
4374
|
className: "relative",
|
|
4242
|
-
children: [/* @__PURE__ */ X(
|
|
4375
|
+
children: [/* @__PURE__ */ X(ua, { children: /* @__PURE__ */ X(da, {
|
|
4243
4376
|
onClick: () => a((e) => !e),
|
|
4244
4377
|
label: `Basemap: ${e[t]?.label ?? ""}`,
|
|
4245
4378
|
children: /* @__PURE__ */ X(z, { className: "size-4" })
|
|
@@ -4260,8 +4393,8 @@ function sa({ tiles: e, tileIndex: t, onTileChange: n, openLeft: r }) {
|
|
|
4260
4393
|
})]
|
|
4261
4394
|
});
|
|
4262
4395
|
}
|
|
4263
|
-
function
|
|
4264
|
-
let { map: d } =
|
|
4396
|
+
function pa({ position: e = "bottom-right", showZoom: t = !0, showCompass: n = !1, showLocate: r = !1, showFullscreen: i = !1, className: o, onLocate: s, tiles: c = [], tileIndex: l = 0, onTileChange: u }) {
|
|
4397
|
+
let { map: d } = Xi(), [p, m] = f(!1), h = a(() => {
|
|
4265
4398
|
d?.zoomTo(d.getZoom() + 1, { duration: 300 });
|
|
4266
4399
|
}, [d]), g = a(() => {
|
|
4267
4400
|
d?.zoomTo(d.getZoom() - 1, { duration: 300 });
|
|
@@ -4286,31 +4419,31 @@ function ca({ position: e = "bottom-right", showZoom: t = !0, showCompass: n = !
|
|
|
4286
4419
|
e && (document.fullscreenElement ? document.exitFullscreen() : e.requestFullscreen());
|
|
4287
4420
|
}, [d]);
|
|
4288
4421
|
return /* @__PURE__ */ Z("div", {
|
|
4289
|
-
className: Q("absolute z-10 flex flex-col gap-1.5",
|
|
4422
|
+
className: Q("absolute z-10 flex flex-col gap-1.5", la[e], o),
|
|
4290
4423
|
children: [
|
|
4291
|
-
t && /* @__PURE__ */ Z(
|
|
4424
|
+
t && /* @__PURE__ */ Z(ua, { children: [/* @__PURE__ */ X(da, {
|
|
4292
4425
|
onClick: h,
|
|
4293
4426
|
label: "Zoom in",
|
|
4294
|
-
children: /* @__PURE__ */ X(
|
|
4295
|
-
}), /* @__PURE__ */ X(
|
|
4427
|
+
children: /* @__PURE__ */ X(le, { className: "size-4" })
|
|
4428
|
+
}), /* @__PURE__ */ X(da, {
|
|
4296
4429
|
onClick: g,
|
|
4297
4430
|
label: "Zoom out",
|
|
4298
4431
|
children: /* @__PURE__ */ X(oe, { className: "size-4" })
|
|
4299
4432
|
})] }),
|
|
4300
|
-
c.length > 1 && /* @__PURE__ */ X(
|
|
4433
|
+
c.length > 1 && /* @__PURE__ */ X(fa, {
|
|
4301
4434
|
tiles: c,
|
|
4302
4435
|
tileIndex: l,
|
|
4303
4436
|
onTileChange: u,
|
|
4304
4437
|
openLeft: e.endsWith("right")
|
|
4305
4438
|
}),
|
|
4306
|
-
n && /* @__PURE__ */ X(
|
|
4307
|
-
r && /* @__PURE__ */ X(
|
|
4439
|
+
n && /* @__PURE__ */ X(ua, { children: /* @__PURE__ */ X(ma, { onClick: _ }) }),
|
|
4440
|
+
r && /* @__PURE__ */ X(ua, { children: /* @__PURE__ */ X(da, {
|
|
4308
4441
|
onClick: v,
|
|
4309
4442
|
label: "Find my location",
|
|
4310
4443
|
disabled: p,
|
|
4311
4444
|
children: p ? /* @__PURE__ */ X(re, { className: "size-4 animate-spin" }) : /* @__PURE__ */ X(ae, { className: "size-4" })
|
|
4312
4445
|
}) }),
|
|
4313
|
-
i && /* @__PURE__ */ X(
|
|
4446
|
+
i && /* @__PURE__ */ X(ua, { children: /* @__PURE__ */ X(da, {
|
|
4314
4447
|
onClick: y,
|
|
4315
4448
|
label: "Toggle fullscreen",
|
|
4316
4449
|
children: /* @__PURE__ */ X(V, { className: "size-4" })
|
|
@@ -4318,8 +4451,8 @@ function ca({ position: e = "bottom-right", showZoom: t = !0, showCompass: n = !
|
|
|
4318
4451
|
]
|
|
4319
4452
|
});
|
|
4320
4453
|
}
|
|
4321
|
-
function
|
|
4322
|
-
let { map: t } =
|
|
4454
|
+
function ma({ onClick: e }) {
|
|
4455
|
+
let { map: t } = Xi(), n = d(null);
|
|
4323
4456
|
return s(() => {
|
|
4324
4457
|
if (!t || !n.current) return;
|
|
4325
4458
|
let e = n.current, r = () => {
|
|
@@ -4329,7 +4462,7 @@ function la({ onClick: e }) {
|
|
|
4329
4462
|
return t.on("rotate", r), t.on("pitch", r), r(), () => {
|
|
4330
4463
|
t.off("rotate", r), t.off("pitch", r);
|
|
4331
4464
|
};
|
|
4332
|
-
}, [t]), /* @__PURE__ */ X(
|
|
4465
|
+
}, [t]), /* @__PURE__ */ X(da, {
|
|
4333
4466
|
onClick: e,
|
|
4334
4467
|
label: "Reset bearing to north",
|
|
4335
4468
|
children: /* @__PURE__ */ Z("svg", {
|
|
@@ -4358,10 +4491,10 @@ function la({ onClick: e }) {
|
|
|
4358
4491
|
})
|
|
4359
4492
|
});
|
|
4360
4493
|
}
|
|
4361
|
-
function
|
|
4362
|
-
let { map: c } =
|
|
4494
|
+
function ha({ longitude: e, latitude: t, onClose: n, children: r, className: i, closeButton: a = !1, ...o }) {
|
|
4495
|
+
let { map: c } = Xi(), l = d(o), f = d(n);
|
|
4363
4496
|
f.current = n;
|
|
4364
|
-
let p = u(() => document.createElement("div"), []), m = u(() => new
|
|
4497
|
+
let p = u(() => document.createElement("div"), []), m = u(() => new He.Popup({
|
|
4365
4498
|
offset: 16,
|
|
4366
4499
|
...o,
|
|
4367
4500
|
closeButton: !1
|
|
@@ -4376,15 +4509,15 @@ function ua({ longitude: e, latitude: t, onClose: n, children: r, className: i,
|
|
|
4376
4509
|
let n = l.current;
|
|
4377
4510
|
(m.getLngLat().lng !== e || m.getLngLat().lat !== t) && m.setLngLat([e, t]), n.offset !== o.offset && m.setOffset(o.offset ?? 16), n.maxWidth !== o.maxWidth && o.maxWidth && m.setMaxWidth(o.maxWidth ?? "none"), l.current = o;
|
|
4378
4511
|
}
|
|
4379
|
-
return
|
|
4512
|
+
return Ue(/* @__PURE__ */ Z("div", {
|
|
4380
4513
|
className: Q("bg-popover text-popover-foreground relative max-w-62 rounded-md border p-3 shadow-md", "animate-in fade-in-0 zoom-in-95 duration-200 ease-out", i),
|
|
4381
|
-
children: [a && /* @__PURE__ */ X(
|
|
4514
|
+
children: [a && /* @__PURE__ */ X(aa, { onClick: () => {
|
|
4382
4515
|
m.remove();
|
|
4383
4516
|
} }), r]
|
|
4384
4517
|
}), p);
|
|
4385
4518
|
}
|
|
4386
|
-
function
|
|
4387
|
-
let { map: f, isLoaded: p } =
|
|
4519
|
+
function ga({ id: e, coordinates: t, color: n = "#4285F4", width: r = 3, opacity: i = .8, dashArray: a, onClick: o, onMouseEnter: l, onMouseLeave: u, interactive: d = !0 }) {
|
|
4520
|
+
let { map: f, isLoaded: p } = Xi(), m = c(), h = e ?? m, g = `route-source-${h}`, _ = `route-layer-${h}`;
|
|
4388
4521
|
return s(() => {
|
|
4389
4522
|
if (!(!p || !f)) return f.addSource(g, {
|
|
4390
4523
|
type: "geojson",
|
|
@@ -4463,15 +4596,15 @@ function da({ id: e, coordinates: t, color: n = "#4285F4", width: r = 3, opacity
|
|
|
4463
4596
|
d
|
|
4464
4597
|
]), null;
|
|
4465
4598
|
}
|
|
4466
|
-
var
|
|
4599
|
+
var _a = .2, va = 64, ya = 12, ba = 6, xa = {
|
|
4467
4600
|
"line-color": "#4285F4",
|
|
4468
4601
|
"line-width": 2,
|
|
4469
4602
|
"line-opacity": .85
|
|
4470
|
-
},
|
|
4603
|
+
}, Sa = {
|
|
4471
4604
|
"line-join": "round",
|
|
4472
4605
|
"line-cap": "round"
|
|
4473
4606
|
};
|
|
4474
|
-
function
|
|
4607
|
+
function Ca(e, t) {
|
|
4475
4608
|
if (!t) return e;
|
|
4476
4609
|
let n = { ...e };
|
|
4477
4610
|
for (let [e, r] of Object.entries(t)) {
|
|
@@ -4490,7 +4623,7 @@ function va(e, t) {
|
|
|
4490
4623
|
}
|
|
4491
4624
|
return n;
|
|
4492
4625
|
}
|
|
4493
|
-
function
|
|
4626
|
+
function wa(e, t, n, r) {
|
|
4494
4627
|
let [i, a] = e, [o, s] = t, c = o - i, l = s - a, u = Math.hypot(c, l);
|
|
4495
4628
|
if (u === 0 || n === 0) return [e, t];
|
|
4496
4629
|
let d = (i + o) / 2, f = (a + s) / 2, p = -l / u, m = c / u, h = u * n, g = d + p * h, _ = f + m * h, v = [], y = Math.max(2, Math.floor(r));
|
|
@@ -4500,16 +4633,16 @@ function ya(e, t, n, r) {
|
|
|
4500
4633
|
}
|
|
4501
4634
|
return v;
|
|
4502
4635
|
}
|
|
4503
|
-
function
|
|
4504
|
-
let { map: h, isLoaded: g } =
|
|
4505
|
-
...
|
|
4636
|
+
function Ta({ data: e, id: t, curvature: n = _a, samples: r = va, paint: i, layout: a, hoverPaint: o, onClick: l, onHover: f, interactive: p = !0, beforeId: m }) {
|
|
4637
|
+
let { map: h, isLoaded: g } = Xi(), _ = c(), v = t ?? _, y = `arc-source-${v}`, b = `arc-layer-${v}`, x = `arc-hit-layer-${v}`, S = u(() => Ca({
|
|
4638
|
+
...xa,
|
|
4506
4639
|
...i
|
|
4507
4640
|
}, o), [i, o]), C = u(() => ({
|
|
4508
|
-
...
|
|
4641
|
+
...Sa,
|
|
4509
4642
|
...a
|
|
4510
4643
|
}), [a]), w = u(() => {
|
|
4511
|
-
let e = i?.["line-width"] ??
|
|
4512
|
-
return Math.max((typeof e == "number" ? e :
|
|
4644
|
+
let e = i?.["line-width"] ?? xa["line-width"];
|
|
4645
|
+
return Math.max((typeof e == "number" ? e : ya) + ba, ya);
|
|
4513
4646
|
}, [i]), T = u(() => ({
|
|
4514
4647
|
type: "FeatureCollection",
|
|
4515
4648
|
features: e.map((e) => {
|
|
@@ -4519,7 +4652,7 @@ function ba({ data: e, id: t, curvature: n = fa, samples: r = pa, paint: i, layo
|
|
|
4519
4652
|
properties: a,
|
|
4520
4653
|
geometry: {
|
|
4521
4654
|
type: "LineString",
|
|
4522
|
-
coordinates:
|
|
4655
|
+
coordinates: wa(t, i, n, r)
|
|
4523
4656
|
}
|
|
4524
4657
|
};
|
|
4525
4658
|
})
|
|
@@ -4545,7 +4678,7 @@ function ba({ data: e, id: t, curvature: n = fa, samples: r = pa, paint: i, layo
|
|
|
4545
4678
|
id: x,
|
|
4546
4679
|
type: "line",
|
|
4547
4680
|
source: y,
|
|
4548
|
-
layout:
|
|
4681
|
+
layout: Sa,
|
|
4549
4682
|
paint: {
|
|
4550
4683
|
"line-color": "rgba(0, 0, 0, 0)",
|
|
4551
4684
|
"line-width": w,
|
|
@@ -4628,12 +4761,12 @@ function ba({ data: e, id: t, curvature: n = fa, samples: r = pa, paint: i, layo
|
|
|
4628
4761
|
p
|
|
4629
4762
|
]), null;
|
|
4630
4763
|
}
|
|
4631
|
-
function
|
|
4764
|
+
function Ea({ data: e, clusterMaxZoom: t = 14, clusterRadius: n = 50, clusterColors: r = [
|
|
4632
4765
|
"#22c55e",
|
|
4633
4766
|
"#eab308",
|
|
4634
4767
|
"#ef4444"
|
|
4635
4768
|
], clusterThresholds: i = [100, 750], pointColor: a = "#3b82f6", onPointClick: o, onClusterClick: l }) {
|
|
4636
|
-
let { map: u, isLoaded: f } =
|
|
4769
|
+
let { map: u, isLoaded: f } = Xi(), p = c(), m = `cluster-source-${p}`, h = `clusters-${p}`, g = `cluster-count-${p}`, _ = `unclustered-point-${p}`, v = d({
|
|
4637
4770
|
clusterColors: r,
|
|
4638
4771
|
clusterThresholds: i,
|
|
4639
4772
|
pointColor: a
|
|
@@ -4788,12 +4921,12 @@ function xa({ data: e, clusterMaxZoom: t = 14, clusterRadius: n = 50, clusterCol
|
|
|
4788
4921
|
}
|
|
4789
4922
|
//#endregion
|
|
4790
4923
|
//#region src/components/ui/progress.tsx
|
|
4791
|
-
function
|
|
4792
|
-
return /* @__PURE__ */ X(
|
|
4924
|
+
function Da({ className: e, value: t, ...n }) {
|
|
4925
|
+
return /* @__PURE__ */ X(Te.Root, {
|
|
4793
4926
|
"data-slot": "progress",
|
|
4794
4927
|
className: Q("relative flex h-1 w-full items-center overflow-x-hidden rounded-full bg-muted", e),
|
|
4795
4928
|
...n,
|
|
4796
|
-
children: /* @__PURE__ */ X(
|
|
4929
|
+
children: /* @__PURE__ */ X(Te.Indicator, {
|
|
4797
4930
|
"data-slot": "progress-indicator",
|
|
4798
4931
|
className: "size-full flex-1 bg-primary transition-all",
|
|
4799
4932
|
style: { transform: `translateX(-${100 - (t || 0)}%)` }
|
|
@@ -4802,26 +4935,26 @@ function Sa({ className: e, value: t, ...n }) {
|
|
|
4802
4935
|
}
|
|
4803
4936
|
//#endregion
|
|
4804
4937
|
//#region src/components/ui/select.tsx
|
|
4805
|
-
function
|
|
4938
|
+
function Oa({ ...e }) {
|
|
4806
4939
|
return /* @__PURE__ */ X(J.Root, {
|
|
4807
4940
|
"data-slot": "select",
|
|
4808
4941
|
...e
|
|
4809
4942
|
});
|
|
4810
4943
|
}
|
|
4811
|
-
function
|
|
4944
|
+
function ka({ className: e, ...t }) {
|
|
4812
4945
|
return /* @__PURE__ */ X(J.Group, {
|
|
4813
4946
|
"data-slot": "select-group",
|
|
4814
4947
|
className: Q("scroll-my-1 p-1", e),
|
|
4815
4948
|
...t
|
|
4816
4949
|
});
|
|
4817
4950
|
}
|
|
4818
|
-
function
|
|
4951
|
+
function Aa({ ...e }) {
|
|
4819
4952
|
return /* @__PURE__ */ X(J.Value, {
|
|
4820
4953
|
"data-slot": "select-value",
|
|
4821
4954
|
...e
|
|
4822
4955
|
});
|
|
4823
4956
|
}
|
|
4824
|
-
function
|
|
4957
|
+
function ja({ className: e, size: t = "default", children: n, ...r }) {
|
|
4825
4958
|
return /* @__PURE__ */ Z(J.Trigger, {
|
|
4826
4959
|
"data-slot": "select-trigger",
|
|
4827
4960
|
"data-size": t,
|
|
@@ -4833,7 +4966,7 @@ function Ea({ className: e, size: t = "default", children: n, ...r }) {
|
|
|
4833
4966
|
})]
|
|
4834
4967
|
});
|
|
4835
4968
|
}
|
|
4836
|
-
function
|
|
4969
|
+
function Ma({ className: e, children: t, position: n = "item-aligned", align: r = "center", ...i }) {
|
|
4837
4970
|
return /* @__PURE__ */ X(J.Portal, { children: /* @__PURE__ */ Z(J.Content, {
|
|
4838
4971
|
"data-slot": "select-content",
|
|
4839
4972
|
"data-align-trigger": n === "item-aligned",
|
|
@@ -4842,24 +4975,24 @@ function Da({ className: e, children: t, position: n = "item-aligned", align: r
|
|
|
4842
4975
|
align: r,
|
|
4843
4976
|
...i,
|
|
4844
4977
|
children: [
|
|
4845
|
-
/* @__PURE__ */ X(
|
|
4978
|
+
/* @__PURE__ */ X(Ia, {}),
|
|
4846
4979
|
/* @__PURE__ */ X(J.Viewport, {
|
|
4847
4980
|
"data-position": n,
|
|
4848
4981
|
className: Q("data-[position=popper]:h-(--radix-select-trigger-height) data-[position=popper]:w-full data-[position=popper]:min-w-(--radix-select-trigger-width)", n === "popper" && ""),
|
|
4849
4982
|
children: t
|
|
4850
4983
|
}),
|
|
4851
|
-
/* @__PURE__ */ X(
|
|
4984
|
+
/* @__PURE__ */ X(La, {})
|
|
4852
4985
|
]
|
|
4853
4986
|
}) });
|
|
4854
4987
|
}
|
|
4855
|
-
function
|
|
4988
|
+
function Na({ className: e, ...t }) {
|
|
4856
4989
|
return /* @__PURE__ */ X(J.Label, {
|
|
4857
4990
|
"data-slot": "select-label",
|
|
4858
4991
|
className: Q("px-1.5 py-1 text-xs text-muted-foreground", e),
|
|
4859
4992
|
...t
|
|
4860
4993
|
});
|
|
4861
4994
|
}
|
|
4862
|
-
function
|
|
4995
|
+
function Pa({ className: e, children: t, ...n }) {
|
|
4863
4996
|
return /* @__PURE__ */ Z(J.Item, {
|
|
4864
4997
|
"data-slot": "select-item",
|
|
4865
4998
|
className: Q("relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2", e),
|
|
@@ -4870,14 +5003,14 @@ function ka({ className: e, children: t, ...n }) {
|
|
|
4870
5003
|
}), /* @__PURE__ */ X(J.ItemText, { children: t })]
|
|
4871
5004
|
});
|
|
4872
5005
|
}
|
|
4873
|
-
function
|
|
5006
|
+
function Fa({ className: e, ...t }) {
|
|
4874
5007
|
return /* @__PURE__ */ X(J.Separator, {
|
|
4875
5008
|
"data-slot": "select-separator",
|
|
4876
5009
|
className: Q("pointer-events-none -mx-1 my-1 h-px bg-border", e),
|
|
4877
5010
|
...t
|
|
4878
5011
|
});
|
|
4879
5012
|
}
|
|
4880
|
-
function
|
|
5013
|
+
function Ia({ className: e, ...t }) {
|
|
4881
5014
|
return /* @__PURE__ */ X(J.ScrollUpButton, {
|
|
4882
5015
|
"data-slot": "select-scroll-up-button",
|
|
4883
5016
|
className: Q("z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4", e),
|
|
@@ -4885,7 +5018,7 @@ function ja({ className: e, ...t }) {
|
|
|
4885
5018
|
children: /* @__PURE__ */ X(C, {})
|
|
4886
5019
|
});
|
|
4887
5020
|
}
|
|
4888
|
-
function
|
|
5021
|
+
function La({ className: e, ...t }) {
|
|
4889
5022
|
return /* @__PURE__ */ X(J.ScrollDownButton, {
|
|
4890
5023
|
"data-slot": "select-scroll-down-button",
|
|
4891
5024
|
className: Q("z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4", e),
|
|
@@ -4895,14 +5028,14 @@ function Ma({ className: e, ...t }) {
|
|
|
4895
5028
|
}
|
|
4896
5029
|
//#endregion
|
|
4897
5030
|
//#region src/components/ui/slider.tsx
|
|
4898
|
-
function
|
|
5031
|
+
function Ra({ className: e, defaultValue: t, value: r, min: i = 0, max: a = 100, ...o }) {
|
|
4899
5032
|
let s = n.useMemo(() => Array.isArray(r) ? r : Array.isArray(t) ? t : [i, a], [
|
|
4900
5033
|
r,
|
|
4901
5034
|
t,
|
|
4902
5035
|
i,
|
|
4903
5036
|
a
|
|
4904
5037
|
]);
|
|
4905
|
-
return /* @__PURE__ */ Z(
|
|
5038
|
+
return /* @__PURE__ */ Z(Oe.Root, {
|
|
4906
5039
|
"data-slot": "slider",
|
|
4907
5040
|
defaultValue: t,
|
|
4908
5041
|
value: r,
|
|
@@ -4910,14 +5043,14 @@ function Na({ className: e, defaultValue: t, value: r, min: i = 0, max: a = 100,
|
|
|
4910
5043
|
max: a,
|
|
4911
5044
|
className: Q("relative flex w-full touch-none items-center select-none data-disabled:opacity-50 data-vertical:h-full data-vertical:min-h-40 data-vertical:w-auto data-vertical:flex-col", e),
|
|
4912
5045
|
...o,
|
|
4913
|
-
children: [/* @__PURE__ */ X(
|
|
5046
|
+
children: [/* @__PURE__ */ X(Oe.Track, {
|
|
4914
5047
|
"data-slot": "slider-track",
|
|
4915
5048
|
className: "relative grow overflow-hidden rounded-full bg-muted data-horizontal:h-1 data-horizontal:w-full data-vertical:h-full data-vertical:w-1",
|
|
4916
|
-
children: /* @__PURE__ */ X(
|
|
5049
|
+
children: /* @__PURE__ */ X(Oe.Range, {
|
|
4917
5050
|
"data-slot": "slider-range",
|
|
4918
5051
|
className: "absolute bg-primary select-none data-horizontal:h-full data-vertical:w-full"
|
|
4919
5052
|
})
|
|
4920
|
-
}), Array.from({ length: s.length }, (e, t) => /* @__PURE__ */ X(
|
|
5053
|
+
}), Array.from({ length: s.length }, (e, t) => /* @__PURE__ */ X(Oe.Thumb, {
|
|
4921
5054
|
"data-slot": "slider-thumb",
|
|
4922
5055
|
className: "relative block size-3 shrink-0 rounded-full border border-ring bg-white ring-ring/50 transition-[color,box-shadow] select-none after:absolute after:-inset-2 hover:ring-3 focus-visible:ring-3 focus-visible:outline-hidden active:ring-3 disabled:pointer-events-none disabled:opacity-50"
|
|
4923
5056
|
}, t))]
|
|
@@ -4925,15 +5058,15 @@ function Na({ className: e, defaultValue: t, value: r, min: i = 0, max: a = 100,
|
|
|
4925
5058
|
}
|
|
4926
5059
|
//#endregion
|
|
4927
5060
|
//#region src/components/ui/sonner.tsx
|
|
4928
|
-
var
|
|
4929
|
-
let { theme: t = "system" } =
|
|
4930
|
-
return /* @__PURE__ */ X(
|
|
5061
|
+
var za = ({ ...e }) => {
|
|
5062
|
+
let { theme: t = "system" } = We();
|
|
5063
|
+
return /* @__PURE__ */ X(Ge, {
|
|
4931
5064
|
theme: t,
|
|
4932
5065
|
className: "toaster group",
|
|
4933
5066
|
icons: {
|
|
4934
5067
|
success: /* @__PURE__ */ X(E, { className: "size-4" }),
|
|
4935
|
-
info: /* @__PURE__ */ X(
|
|
4936
|
-
warning: /* @__PURE__ */ X(
|
|
5068
|
+
info: /* @__PURE__ */ X(R, { className: "size-4" }),
|
|
5069
|
+
warning: /* @__PURE__ */ X(_e, { className: "size-4" }),
|
|
4937
5070
|
error: /* @__PURE__ */ X(se, { className: "size-4" }),
|
|
4938
5071
|
loading: /* @__PURE__ */ X(B, { className: "size-4 animate-spin" })
|
|
4939
5072
|
},
|
|
@@ -4946,20 +5079,20 @@ var Pa = ({ ...e }) => {
|
|
|
4946
5079
|
toastOptions: { classNames: { toast: "cn-toast" } },
|
|
4947
5080
|
...e
|
|
4948
5081
|
});
|
|
4949
|
-
},
|
|
4950
|
-
let e = o(
|
|
5082
|
+
}, Ba = r(void 0), Va = r(void 0), Ha = () => {
|
|
5083
|
+
let e = o(Ba);
|
|
4951
5084
|
if (!e) throw Error("useStepper must be used within a Stepper");
|
|
4952
5085
|
return e;
|
|
4953
|
-
},
|
|
4954
|
-
let e = o(
|
|
5086
|
+
}, Ua = () => {
|
|
5087
|
+
let e = o(Va);
|
|
4955
5088
|
if (!e) throw Error("useStepItem must be used within a StepperItem");
|
|
4956
5089
|
return e;
|
|
4957
5090
|
};
|
|
4958
|
-
function
|
|
5091
|
+
function Wa({ defaultValue: e = 0, value: t, onValueChange: r, orientation: i = "horizontal", className: a, ...o }) {
|
|
4959
5092
|
let [s, c] = n.useState(e), l = n.useCallback((e) => {
|
|
4960
5093
|
t === void 0 && c(e), r?.(e);
|
|
4961
5094
|
}, [t, r]), u = t ?? s;
|
|
4962
|
-
return /* @__PURE__ */ X(
|
|
5095
|
+
return /* @__PURE__ */ X(Ba.Provider, {
|
|
4963
5096
|
value: {
|
|
4964
5097
|
activeStep: u,
|
|
4965
5098
|
orientation: i,
|
|
@@ -4973,9 +5106,9 @@ function za({ defaultValue: e = 0, value: t, onValueChange: r, orientation: i =
|
|
|
4973
5106
|
})
|
|
4974
5107
|
});
|
|
4975
5108
|
}
|
|
4976
|
-
function
|
|
4977
|
-
let { activeStep: s } =
|
|
4978
|
-
return /* @__PURE__ */ X(
|
|
5109
|
+
function Ga({ step: e, completed: t = !1, disabled: n = !1, loading: r = !1, className: i, children: a, ...o }) {
|
|
5110
|
+
let { activeStep: s } = Ha(), c = t || e < s ? "completed" : s === e ? "active" : "inactive", l = r && e === s;
|
|
5111
|
+
return /* @__PURE__ */ X(Va.Provider, {
|
|
4979
5112
|
value: {
|
|
4980
5113
|
isDisabled: n,
|
|
4981
5114
|
isLoading: l,
|
|
@@ -4992,9 +5125,9 @@ function Ba({ step: e, completed: t = !1, disabled: n = !1, loading: r = !1, cla
|
|
|
4992
5125
|
})
|
|
4993
5126
|
});
|
|
4994
5127
|
}
|
|
4995
|
-
function
|
|
4996
|
-
let { setActiveStep: i } =
|
|
4997
|
-
return e ? /* @__PURE__ */ X(e ?
|
|
5128
|
+
function Ka({ asChild: e = !1, className: t, children: n, ...r }) {
|
|
5129
|
+
let { setActiveStep: i } = Ha(), { step: a, isDisabled: o } = Ua();
|
|
5130
|
+
return e ? /* @__PURE__ */ X(e ? ke.Root : "span", {
|
|
4998
5131
|
className: t,
|
|
4999
5132
|
"data-slot": "stepper-trigger",
|
|
5000
5133
|
children: n
|
|
@@ -5008,8 +5141,8 @@ function Va({ asChild: e = !1, className: t, children: n, ...r }) {
|
|
|
5008
5141
|
children: n
|
|
5009
5142
|
});
|
|
5010
5143
|
}
|
|
5011
|
-
function
|
|
5012
|
-
let { state: i, step: a, isLoading: o } =
|
|
5144
|
+
function qa({ asChild: e = !1, className: t, children: n, ...r }) {
|
|
5145
|
+
let { state: i, step: a, isLoading: o } = Ua();
|
|
5013
5146
|
return /* @__PURE__ */ X("span", {
|
|
5014
5147
|
className: Q("relative flex size-6 shrink-0 items-center justify-center rounded-full bg-muted font-medium text-muted-foreground text-xs data-[state=active]:bg-primary data-[state=completed]:bg-primary data-[state=active]:text-primary-foreground data-[state=completed]:text-primary-foreground", t),
|
|
5015
5148
|
"data-slot": "stepper-indicator",
|
|
@@ -5036,21 +5169,21 @@ function Ha({ asChild: e = !1, className: t, children: n, ...r }) {
|
|
|
5036
5169
|
] })
|
|
5037
5170
|
});
|
|
5038
5171
|
}
|
|
5039
|
-
function
|
|
5172
|
+
function Ja({ className: e, ...t }) {
|
|
5040
5173
|
return /* @__PURE__ */ X("h3", {
|
|
5041
5174
|
className: Q("font-medium text-sm", e),
|
|
5042
5175
|
"data-slot": "stepper-title",
|
|
5043
5176
|
...t
|
|
5044
5177
|
});
|
|
5045
5178
|
}
|
|
5046
|
-
function
|
|
5179
|
+
function Ya({ className: e, ...t }) {
|
|
5047
5180
|
return /* @__PURE__ */ X("p", {
|
|
5048
5181
|
className: Q("text-muted-foreground text-sm", e),
|
|
5049
5182
|
"data-slot": "stepper-description",
|
|
5050
5183
|
...t
|
|
5051
5184
|
});
|
|
5052
5185
|
}
|
|
5053
|
-
function
|
|
5186
|
+
function Xa({ className: e, ...t }) {
|
|
5054
5187
|
return /* @__PURE__ */ X("div", {
|
|
5055
5188
|
className: Q("m-0.5 bg-muted group-data-[orientation=horizontal]/stepper:h-0.5 group-data-[orientation=vertical]/stepper:h-12 group-data-[orientation=horizontal]/stepper:w-full group-data-[orientation=vertical]/stepper:w-0.5 group-data-[orientation=horizontal]/stepper:flex-1 group-data-[state=completed]/step:bg-primary", e),
|
|
5056
5189
|
"data-slot": "stepper-separator",
|
|
@@ -5059,13 +5192,13 @@ function Ga({ className: e, ...t }) {
|
|
|
5059
5192
|
}
|
|
5060
5193
|
//#endregion
|
|
5061
5194
|
//#region src/components/ui/switch.tsx
|
|
5062
|
-
function
|
|
5063
|
-
return /* @__PURE__ */ X(
|
|
5195
|
+
function Za({ className: e, size: t = "default", ...n }) {
|
|
5196
|
+
return /* @__PURE__ */ X(Ae.Root, {
|
|
5064
5197
|
"data-slot": "switch",
|
|
5065
5198
|
"data-size": t,
|
|
5066
5199
|
className: Q("peer group/switch relative inline-flex shrink-0 items-center rounded-full border border-transparent transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-unchecked:bg-input dark:data-unchecked:bg-input/80 data-disabled:cursor-not-allowed data-disabled:opacity-50", e),
|
|
5067
5200
|
...n,
|
|
5068
|
-
children: /* @__PURE__ */ X(
|
|
5201
|
+
children: /* @__PURE__ */ X(Ae.Thumb, {
|
|
5069
5202
|
"data-slot": "switch-thumb",
|
|
5070
5203
|
className: "pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] dark:data-checked:bg-primary-foreground group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 dark:data-unchecked:bg-foreground"
|
|
5071
5204
|
})
|
|
@@ -5073,38 +5206,38 @@ function Ka({ className: e, size: t = "default", ...n }) {
|
|
|
5073
5206
|
}
|
|
5074
5207
|
//#endregion
|
|
5075
5208
|
//#region src/components/ui/tabs.tsx
|
|
5076
|
-
function
|
|
5077
|
-
return /* @__PURE__ */ X(
|
|
5209
|
+
function Qa({ className: e, orientation: t = "horizontal", ...n }) {
|
|
5210
|
+
return /* @__PURE__ */ X(je.Root, {
|
|
5078
5211
|
"data-slot": "tabs",
|
|
5079
5212
|
"data-orientation": t,
|
|
5080
5213
|
className: Q("group/tabs flex gap-2 data-horizontal:flex-col", e),
|
|
5081
5214
|
...n
|
|
5082
5215
|
});
|
|
5083
5216
|
}
|
|
5084
|
-
var
|
|
5217
|
+
var $a = W("group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-8 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none", {
|
|
5085
5218
|
variants: { variant: {
|
|
5086
5219
|
default: "bg-muted",
|
|
5087
5220
|
line: "gap-1 bg-transparent"
|
|
5088
5221
|
} },
|
|
5089
5222
|
defaultVariants: { variant: "default" }
|
|
5090
5223
|
});
|
|
5091
|
-
function
|
|
5092
|
-
return /* @__PURE__ */ X(
|
|
5224
|
+
function eo({ className: e, variant: t = "default", ...n }) {
|
|
5225
|
+
return /* @__PURE__ */ X(je.List, {
|
|
5093
5226
|
"data-slot": "tabs-list",
|
|
5094
5227
|
"data-variant": t,
|
|
5095
|
-
className: Q(
|
|
5228
|
+
className: Q($a({ variant: t }), e),
|
|
5096
5229
|
...n
|
|
5097
5230
|
});
|
|
5098
5231
|
}
|
|
5099
|
-
function
|
|
5100
|
-
return /* @__PURE__ */ X(
|
|
5232
|
+
function to({ className: e, ...t }) {
|
|
5233
|
+
return /* @__PURE__ */ X(je.Trigger, {
|
|
5101
5234
|
"data-slot": "tabs-trigger",
|
|
5102
5235
|
className: Q("relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pr-1 has-data-[icon=inline-start]:pl-1 dark:text-muted-foreground dark:hover:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", "group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent", "data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground", "after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100", e),
|
|
5103
5236
|
...t
|
|
5104
5237
|
});
|
|
5105
5238
|
}
|
|
5106
|
-
function
|
|
5107
|
-
return /* @__PURE__ */ X(
|
|
5239
|
+
function no({ className: e, ...t }) {
|
|
5240
|
+
return /* @__PURE__ */ X(je.Content, {
|
|
5108
5241
|
"data-slot": "tabs-content",
|
|
5109
5242
|
className: Q("flex-1 text-sm outline-none", e),
|
|
5110
5243
|
...t
|
|
@@ -5112,16 +5245,16 @@ function Za({ className: e, ...t }) {
|
|
|
5112
5245
|
}
|
|
5113
5246
|
//#endregion
|
|
5114
5247
|
//#region src/components/ui/timeline.tsx
|
|
5115
|
-
var
|
|
5116
|
-
let e = n.useContext(
|
|
5248
|
+
var ro = n.createContext(void 0), io = () => {
|
|
5249
|
+
let e = n.useContext(ro);
|
|
5117
5250
|
if (!e) throw Error("useTimeline must be used within a Timeline");
|
|
5118
5251
|
return e;
|
|
5119
5252
|
};
|
|
5120
|
-
function
|
|
5253
|
+
function ao({ defaultValue: e = 1, value: t, onValueChange: r, orientation: i = "vertical", className: a, ...o }) {
|
|
5121
5254
|
let [s, c] = n.useState(e), l = n.useCallback((e) => {
|
|
5122
5255
|
t === void 0 && c(e), r?.(e);
|
|
5123
5256
|
}, [t, r]), u = t ?? s;
|
|
5124
|
-
return /* @__PURE__ */ X(
|
|
5257
|
+
return /* @__PURE__ */ X(ro.Provider, {
|
|
5125
5258
|
value: {
|
|
5126
5259
|
activeStep: u,
|
|
5127
5260
|
setActiveStep: l
|
|
@@ -5134,28 +5267,28 @@ function eo({ defaultValue: e = 1, value: t, onValueChange: r, orientation: i =
|
|
|
5134
5267
|
})
|
|
5135
5268
|
});
|
|
5136
5269
|
}
|
|
5137
|
-
function
|
|
5270
|
+
function oo({ className: e, ...t }) {
|
|
5138
5271
|
return /* @__PURE__ */ X("div", {
|
|
5139
5272
|
className: Q("text-muted-foreground text-sm", e),
|
|
5140
5273
|
"data-slot": "timeline-content",
|
|
5141
5274
|
...t
|
|
5142
5275
|
});
|
|
5143
5276
|
}
|
|
5144
|
-
function
|
|
5145
|
-
return /* @__PURE__ */ X(e ?
|
|
5277
|
+
function so({ asChild: e = !1, className: t, ...n }) {
|
|
5278
|
+
return /* @__PURE__ */ X(e ? ke.Root : "time", {
|
|
5146
5279
|
className: Q("mb-1 block font-medium text-muted-foreground text-xs group-data-[orientation=vertical]/timeline:max-sm:h-4", t),
|
|
5147
5280
|
"data-slot": "timeline-date",
|
|
5148
5281
|
...n
|
|
5149
5282
|
});
|
|
5150
5283
|
}
|
|
5151
|
-
function
|
|
5284
|
+
function co({ className: e, ...t }) {
|
|
5152
5285
|
return /* @__PURE__ */ X("div", {
|
|
5153
5286
|
className: Q(e),
|
|
5154
5287
|
"data-slot": "timeline-header",
|
|
5155
5288
|
...t
|
|
5156
5289
|
});
|
|
5157
5290
|
}
|
|
5158
|
-
function
|
|
5291
|
+
function lo({ className: e, children: t, ...n }) {
|
|
5159
5292
|
return /* @__PURE__ */ X("div", {
|
|
5160
5293
|
"aria-hidden": "true",
|
|
5161
5294
|
className: Q("group-data-[orientation=horizontal]/timeline:-top-6 group-data-[orientation=horizontal]/timeline:-translate-y-1/2 group-data-[orientation=vertical]/timeline:-left-6 group-data-[orientation=vertical]/timeline:-translate-x-1/2 absolute size-4 rounded-full border-2 border-primary/20 group-data-[orientation=vertical]/timeline:top-0 group-data-[orientation=horizontal]/timeline:left-0 group-data-completed/timeline-item:border-primary", e),
|
|
@@ -5164,8 +5297,8 @@ function io({ className: e, children: t, ...n }) {
|
|
|
5164
5297
|
children: t
|
|
5165
5298
|
});
|
|
5166
5299
|
}
|
|
5167
|
-
function
|
|
5168
|
-
let { activeStep: r } =
|
|
5300
|
+
function uo({ step: e, className: t, ...n }) {
|
|
5301
|
+
let { activeStep: r } = io();
|
|
5169
5302
|
return /* @__PURE__ */ X("div", {
|
|
5170
5303
|
className: Q("group/timeline-item relative flex flex-1 flex-col gap-0.5 group-data-[orientation=vertical]/timeline:ms-8 group-data-[orientation=horizontal]/timeline:mt-8 group-data-[orientation=horizontal]/timeline:not-last:pe-8 group-data-[orientation=vertical]/timeline:not-last:pb-12 has-[+[data-completed]]:[&_[data-slot=timeline-separator]]:bg-primary", t),
|
|
5171
5304
|
"data-completed": e <= r || void 0,
|
|
@@ -5173,7 +5306,7 @@ function ao({ step: e, className: t, ...n }) {
|
|
|
5173
5306
|
...n
|
|
5174
5307
|
});
|
|
5175
5308
|
}
|
|
5176
|
-
function
|
|
5309
|
+
function fo({ className: e, ...t }) {
|
|
5177
5310
|
return /* @__PURE__ */ X("div", {
|
|
5178
5311
|
"aria-hidden": "true",
|
|
5179
5312
|
className: Q("group-data-[orientation=horizontal]/timeline:-top-6 group-data-[orientation=horizontal]/timeline:-translate-y-1/2 group-data-[orientation=vertical]/timeline:-left-6 group-data-[orientation=vertical]/timeline:-translate-x-1/2 absolute self-start bg-primary/10 group-last/timeline-item:hidden group-data-[orientation=horizontal]/timeline:h-0.5 group-data-[orientation=vertical]/timeline:h-[calc(100%-1rem-0.25rem)] group-data-[orientation=horizontal]/timeline:w-[calc(100%-1rem-0.25rem)] group-data-[orientation=vertical]/timeline:w-0.5 group-data-[orientation=horizontal]/timeline:translate-x-4.5 group-data-[orientation=vertical]/timeline:translate-y-4.5", e),
|
|
@@ -5181,7 +5314,7 @@ function oo({ className: e, ...t }) {
|
|
|
5181
5314
|
...t
|
|
5182
5315
|
});
|
|
5183
5316
|
}
|
|
5184
|
-
function
|
|
5317
|
+
function po({ className: e, ...t }) {
|
|
5185
5318
|
return /* @__PURE__ */ X("h3", {
|
|
5186
5319
|
className: Q("font-medium text-sm", e),
|
|
5187
5320
|
"data-slot": "timeline-title",
|
|
@@ -5190,7 +5323,7 @@ function so({ className: e, ...t }) {
|
|
|
5190
5323
|
}
|
|
5191
5324
|
//#endregion
|
|
5192
5325
|
//#region src/components/ui/toggle.tsx
|
|
5193
|
-
var
|
|
5326
|
+
var mo = W("group/toggle inline-flex items-center justify-center gap-1 rounded-lg text-sm font-medium whitespace-nowrap transition-all outline-none hover:bg-muted hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-pressed:bg-muted data-[state=on]:bg-muted dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
|
|
5194
5327
|
variants: {
|
|
5195
5328
|
variant: {
|
|
5196
5329
|
default: "bg-transparent",
|
|
@@ -5207,10 +5340,10 @@ var co = W("group/toggle inline-flex items-center justify-center gap-1 rounded-l
|
|
|
5207
5340
|
size: "default"
|
|
5208
5341
|
}
|
|
5209
5342
|
});
|
|
5210
|
-
function
|
|
5211
|
-
return /* @__PURE__ */ X(
|
|
5343
|
+
function ho({ className: e, variant: t = "default", size: n = "default", ...r }) {
|
|
5344
|
+
return /* @__PURE__ */ X(Me.Root, {
|
|
5212
5345
|
"data-slot": "toggle",
|
|
5213
|
-
className: Q(
|
|
5346
|
+
className: Q(mo({
|
|
5214
5347
|
variant: t,
|
|
5215
5348
|
size: n,
|
|
5216
5349
|
className: e
|
|
@@ -5220,14 +5353,14 @@ function lo({ className: e, variant: t = "default", size: n = "default", ...r })
|
|
|
5220
5353
|
}
|
|
5221
5354
|
//#endregion
|
|
5222
5355
|
//#region src/components/ui/toggle-group.tsx
|
|
5223
|
-
var
|
|
5356
|
+
var go = n.createContext({
|
|
5224
5357
|
size: "default",
|
|
5225
5358
|
variant: "default",
|
|
5226
5359
|
spacing: 2,
|
|
5227
5360
|
orientation: "horizontal"
|
|
5228
5361
|
});
|
|
5229
|
-
function
|
|
5230
|
-
return /* @__PURE__ */ X(
|
|
5362
|
+
function _o({ className: e, variant: t, size: n, spacing: r = 2, orientation: i = "horizontal", children: a, ...o }) {
|
|
5363
|
+
return /* @__PURE__ */ X(Ne.Root, {
|
|
5231
5364
|
"data-slot": "toggle-group",
|
|
5232
5365
|
"data-variant": t,
|
|
5233
5366
|
"data-size": n,
|
|
@@ -5236,7 +5369,7 @@ function fo({ className: e, variant: t, size: n, spacing: r = 2, orientation: i
|
|
|
5236
5369
|
style: { "--gap": r },
|
|
5237
5370
|
className: Q("group/toggle-group flex w-fit flex-row items-center gap-[--spacing(var(--gap))] rounded-lg data-[size=sm]:rounded-[min(var(--radius-md),10px)] data-vertical:flex-col data-vertical:items-stretch", e),
|
|
5238
5371
|
...o,
|
|
5239
|
-
children: /* @__PURE__ */ X(
|
|
5372
|
+
children: /* @__PURE__ */ X(go.Provider, {
|
|
5240
5373
|
value: {
|
|
5241
5374
|
variant: t,
|
|
5242
5375
|
size: n,
|
|
@@ -5247,14 +5380,14 @@ function fo({ className: e, variant: t, size: n, spacing: r = 2, orientation: i
|
|
|
5247
5380
|
})
|
|
5248
5381
|
});
|
|
5249
5382
|
}
|
|
5250
|
-
function
|
|
5251
|
-
let o = n.useContext(
|
|
5252
|
-
return /* @__PURE__ */ X(
|
|
5383
|
+
function vo({ className: e, children: t, variant: r = "default", size: i = "default", ...a }) {
|
|
5384
|
+
let o = n.useContext(go);
|
|
5385
|
+
return /* @__PURE__ */ X(Ne.Item, {
|
|
5253
5386
|
"data-slot": "toggle-group-item",
|
|
5254
5387
|
"data-variant": o.variant || r,
|
|
5255
5388
|
"data-size": o.size || i,
|
|
5256
5389
|
"data-spacing": o.spacing,
|
|
5257
|
-
className: Q("shrink-0 group-data-[spacing=0]/toggle-group:rounded-none group-data-[spacing=0]/toggle-group:px-2 focus:z-10 focus-visible:z-10 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-end]:pr-1.5 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-start]:pl-1.5 group-data-horizontal/toggle-group:data-[spacing=0]:first:rounded-l-lg group-data-vertical/toggle-group:data-[spacing=0]:first:rounded-t-lg group-data-horizontal/toggle-group:data-[spacing=0]:last:rounded-r-lg group-data-vertical/toggle-group:data-[spacing=0]:last:rounded-b-lg group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:border-l-0 group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:border-t-0 group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-l group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-t",
|
|
5390
|
+
className: Q("shrink-0 group-data-[spacing=0]/toggle-group:rounded-none group-data-[spacing=0]/toggle-group:px-2 focus:z-10 focus-visible:z-10 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-end]:pr-1.5 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-start]:pl-1.5 group-data-horizontal/toggle-group:data-[spacing=0]:first:rounded-l-lg group-data-vertical/toggle-group:data-[spacing=0]:first:rounded-t-lg group-data-horizontal/toggle-group:data-[spacing=0]:last:rounded-r-lg group-data-vertical/toggle-group:data-[spacing=0]:last:rounded-b-lg group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:border-l-0 group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:border-t-0 group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-l group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-t", mo({
|
|
5258
5391
|
variant: o.variant || r,
|
|
5259
5392
|
size: o.size || i
|
|
5260
5393
|
}), e),
|
|
@@ -5264,35 +5397,35 @@ function po({ className: e, children: t, variant: r = "default", size: i = "defa
|
|
|
5264
5397
|
}
|
|
5265
5398
|
//#endregion
|
|
5266
5399
|
//#region src/components/ui/tooltip.tsx
|
|
5267
|
-
function
|
|
5268
|
-
return /* @__PURE__ */ X(
|
|
5400
|
+
function yo({ delayDuration: e = 0, ...t }) {
|
|
5401
|
+
return /* @__PURE__ */ X(Pe.Provider, {
|
|
5269
5402
|
"data-slot": "tooltip-provider",
|
|
5270
5403
|
delayDuration: e,
|
|
5271
5404
|
...t
|
|
5272
5405
|
});
|
|
5273
5406
|
}
|
|
5274
|
-
function
|
|
5275
|
-
return /* @__PURE__ */ X(
|
|
5407
|
+
function bo({ ...e }) {
|
|
5408
|
+
return /* @__PURE__ */ X(Pe.Root, {
|
|
5276
5409
|
"data-slot": "tooltip",
|
|
5277
5410
|
...e
|
|
5278
5411
|
});
|
|
5279
5412
|
}
|
|
5280
|
-
function
|
|
5281
|
-
return /* @__PURE__ */ X(
|
|
5413
|
+
function xo({ ...e }) {
|
|
5414
|
+
return /* @__PURE__ */ X(Pe.Trigger, {
|
|
5282
5415
|
"data-slot": "tooltip-trigger",
|
|
5283
5416
|
...e
|
|
5284
5417
|
});
|
|
5285
5418
|
}
|
|
5286
|
-
function
|
|
5287
|
-
return /* @__PURE__ */ X(
|
|
5419
|
+
function So({ className: e, sideOffset: t = 0, children: n, ...r }) {
|
|
5420
|
+
return /* @__PURE__ */ X(Pe.Portal, { children: /* @__PURE__ */ Z(Pe.Content, {
|
|
5288
5421
|
"data-slot": "tooltip-content",
|
|
5289
5422
|
sideOffset: t,
|
|
5290
5423
|
className: Q("z-50 inline-flex w-fit max-w-xs origin-(--radix-tooltip-content-transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", e),
|
|
5291
5424
|
...r,
|
|
5292
|
-
children: [n, /* @__PURE__ */ X(
|
|
5425
|
+
children: [n, /* @__PURE__ */ X(Pe.Arrow, { className: "z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground" })]
|
|
5293
5426
|
}) });
|
|
5294
5427
|
}
|
|
5295
5428
|
//#endregion
|
|
5296
|
-
export {
|
|
5429
|
+
export { pt as ActionsMenu, Ot as AdvancedInput, Sn as AdvancedSelect, pi as Alert, gi as AlertAction, Mt as AlertCard, Nt as AlertCardAction, hi as AlertDescription, Vn as AlertDialog, Zn as AlertDialogAction, Qn as AlertDialogCancel, Gn as AlertDialogContent, Xn as AlertDialogDescription, qn as AlertDialogFooter, Kn as AlertDialogHeader, Jn as AlertDialogMedia, Wn as AlertDialogOverlay, Un as AlertDialogPortal, Yn as AlertDialogTitle, Hn as AlertDialogTrigger, mi as AlertTitle, At as Badge, $ as Button, vi as ButtonGroup, bi as ButtonGroupSeparator, yi as ButtonGroupText, ei as Calendar, ti as CalendarDayButton, Sr as Card, Er as CardAction, Dr as CardContent, Tr as CardDescription, Or as CardFooter, Cr as CardHeader, Ln as CardRadioGroup, wr as CardTitle, Ti as ChartContainer, ki as ChartLegend, Ai as ChartLegendContent, Ei as ChartStyle, Di as ChartTooltip, Oi as ChartTooltipContent, Cn as Checkbox, Bn as ColorPicker, an as Command, on as CommandDialog, ln as CommandEmpty, un as CommandGroup, sn as CommandInput, fn as CommandItem, cn as CommandList, dn as CommandSeparator, pn as CommandShortcut, $n as ConfirmPrompt, er as CustomTabs, nr as DataCell, Nn as DataTable, di as DateTimeRangePicker, rr as DefRow, Rt as Dialog, Vt as DialogClose, Ut as DialogContent, qt as DialogDescription, Gt as DialogFooter, Wt as DialogHeader, Ht as DialogOverlay, Bt as DialogPortal, Kt as DialogTitle, zt as DialogTrigger, Xe as DropdownMenu, nt as DropdownMenuCheckboxItem, $e as DropdownMenuContent, et as DropdownMenuGroup, tt as DropdownMenuItem, at as DropdownMenuLabel, Ze as DropdownMenuPortal, rt as DropdownMenuRadioGroup, it as DropdownMenuRadioItem, ot as DropdownMenuSeparator, st as DropdownMenuShortcut, ct as DropdownMenuSub, ut as DropdownMenuSubContent, lt as DropdownMenuSubTrigger, Qe as DropdownMenuTrigger, ir as Empty, ur as EmptyContent, lr as EmptyDescription, ar as EmptyHeader, sr as EmptyMedia, dr as EmptyState, cr as EmptyTitle, fr as FacetedFilter, bt as Field, xt as FieldContent, wt as FieldDescription, Et as FieldError, vt as FieldGroup, St as FieldLabel, _t as FieldLegend, Tt as FieldSeparator, gt as FieldSet, Ct as FieldTitle, Lt as FileUpload, Pn as FormDialog, Mi as HoverCard, Pi as HoverCardContent, Ni as HoverCardTrigger, Jt as Input, Xt as InputGroup, Qt as InputGroupAddon, en as InputGroupButton, nn as InputGroupInput, tn as InputGroupText, rn as InputGroupTextarea, Ri as Item, Wi as ItemActions, Vi as ItemContent, Ui as ItemDescription, Ki as ItemFooter, Fi as ItemGroup, Gi as ItemHeader, Bi as ItemMedia, Ii as ItemSeparator, Hi as ItemTitle, mt as Label, hr as ListCard, mr as ListCardChip, _r as ListCardGrid, pr as ListCardPerson, $i as Map, Ta as MapArc, Ea as MapClusterLayer, pa as MapControls, na as MapMarker, vr as MapMarkerPin, ha as MapPopup, ga as MapRoute, ra as MarkerContent, ca as MarkerLabel, oa as MarkerPopup, sa as MarkerTooltip, yr as NotFound, mn as Popover, _n as PopoverAnchor, gn as PopoverContent, bn as PopoverDescription, vn as PopoverHeader, yn as PopoverTitle, hn as PopoverTrigger, Da as Progress, br as QuickStat, Fn as RadioGroup, In as RadioGroupItem, Oa as Select, Ma as SelectContent, ka as SelectGroup, Pa as SelectItem, Na as SelectLabel, La as SelectScrollDownButton, Ia as SelectScrollUpButton, Fa as SelectSeparator, ja as SelectTrigger, Aa as SelectValue, Ar as SensorCard, ht as Separator, jr as Sheet, Nr as SheetClose, Ir as SheetContent, Br as SheetDescription, Rr as SheetFooter, Lr as SheetHeader, zr as SheetTitle, Mr as SheetTrigger, Vr as SideSheet, Hr as SideSheetSection, Ra as Slider, Je as Spinner, Gr as StatCard, Xr as StatusAvatar, Yr as StatusIcon, Zr as StatusList, Qr as StatusListGroup, $r as StatusListItem, Wa as Stepper, Ya as StepperDescription, qa as StepperIndicator, Ga as StepperItem, Xa as StepperSeparator, Ja as StepperTitle, Ka as StepperTrigger, Za as Switch, wn as Table, En as TableBody, jn as TableCaption, An as TableCell, Dn as TableFooter, kn as TableHead, Tn as TableHeader, On as TableRow, Qa as Tabs, no as TabsContent, eo as TabsList, to as TabsTrigger, Yt as Textarea, ao as Timeline, oo as TimelineContent, so as TimelineDate, co as TimelineHeader, lo as TimelineIndicator, uo as TimelineItem, fo as TimelineSeparator, po as TimelineTitle, za as Toaster, ho as Toggle, _o as ToggleGroup, vo as ToggleGroupItem, bo as Tooltip, So as TooltipContent, yo as TooltipProvider, xo as TooltipTrigger, kt as badgeVariants, _i as buttonGroupVariants, Ye as buttonVariants, xr as cardVariants, Q as cn, Ke as formatBytes, si as navigateRange, oi as presetToRange, $a as tabsListVariants, mo as toggleVariants, qe as useFileUpload, Xi as useMap };
|
|
5297
5430
|
|
|
5298
5431
|
//# sourceMappingURL=index.js.map
|