florixui 1.3.2 → 1.4.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 +52 -1
- package/dist/components/custom/confirm-prompt.d.ts +33 -0
- package/dist/components/custom/faceted-filter.d.ts +1 -3
- package/dist/components/custom/list-card.d.ts +64 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1024 -826
- 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,
|
|
6
|
-
import { cva as
|
|
7
|
-
import { AlertDialog as
|
|
5
|
+
import { AlertCircleIcon as p, AlertTriangle as m, Calendar as h, Check as g, CheckIcon as _, ChevronDown as v, ChevronDownIcon as y, ChevronLeftIcon as b, ChevronRightIcon as x, ChevronUpIcon as S, ChevronsLeftIcon as C, ChevronsRightIcon as w, CircleCheckIcon as T, CircleDotIcon as E, Clock as D, Eye as ee, EyeOff as te, FileArchiveIcon as O, FileIcon as k, FileSpreadsheetIcon as A, FileTextIcon as j, HeadphonesIcon as M, ImageIcon as N, ImageUpIcon as P, InfoIcon as F, Layers as I, Loader2 as ne, Loader2Icon as re, LoaderCircleIcon as L, Locate as ie, Maximize as R, Minus as z, MoreVertical as ae, OctagonXIcon as oe, Plus as B, PlusCircleIcon as se, PlusIcon as ce, RefreshCwIcon as V, SearchIcon as le, Trash2Icon as ue, TrendingDownIcon as de, TrendingUpIcon as fe, TriangleAlertIcon as H, UploadIcon as pe, VideoIcon as me, X as he, XIcon as ge } from "lucide-react";
|
|
6
|
+
import { cva as U } from "class-variance-authority";
|
|
7
|
+
import { AlertDialog as W, Checkbox as _e, Dialog as G, DropdownMenu as K, HoverCard as ve, Label as ye, Popover as q, Progress as be, RadioGroup as xe, Select as J, Separator as Se, Slider as Ce, Slot as we, Switch as Te, Tabs as Ee, Toggle as De, ToggleGroup as Oe, Tooltip as ke } 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 Ae } from "cmdk";
|
|
10
|
+
import * as je from "recharts";
|
|
11
|
+
import { Area as Me, AreaChart as Ne, ResponsiveContainer as Pe } from "recharts";
|
|
12
|
+
import { DayPicker as Fe, getDefaultClassNames as Ie } from "react-day-picker";
|
|
13
|
+
import Le from "maplibre-gl";
|
|
14
|
+
import { createPortal as Re } from "react-dom";
|
|
15
|
+
import { useTheme as ze } from "next-themes";
|
|
16
|
+
import { Toaster as Be } 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 Ve = (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 Be = (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
|
+
}, He = (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 Be = (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 ${Ve(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 Be = (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 ${Ve(n)}.` : `File exceeds the maximum size of ${Ve(n)}.`);
|
|
89
89
|
continue;
|
|
90
90
|
}
|
|
91
91
|
let t = m(e);
|
|
@@ -190,8 +190,8 @@ var Be = (e, t = 2) => {
|
|
|
190
190
|
};
|
|
191
191
|
//#endregion
|
|
192
192
|
//#region src/components/ui/spinner.tsx
|
|
193
|
-
function
|
|
194
|
-
return /* @__PURE__ */ X(
|
|
193
|
+
function Ue({ className: e, ...t }) {
|
|
194
|
+
return /* @__PURE__ */ X(re, {
|
|
195
195
|
role: "status",
|
|
196
196
|
"aria-label": "Loading",
|
|
197
197
|
className: Q("size-4 animate-spin", e),
|
|
@@ -200,7 +200,7 @@ function He({ className: e, ...t }) {
|
|
|
200
200
|
}
|
|
201
201
|
//#endregion
|
|
202
202
|
//#region src/components/ui/button.tsx
|
|
203
|
-
var
|
|
203
|
+
var We = U("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 Ue = 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 ? we.Root : "button", d = r ? c : /* @__PURE__ */ Z(Y, { children: [
|
|
231
|
+
i ? /* @__PURE__ */ X(Ue, {}) : 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(We({
|
|
244
244
|
variant: t,
|
|
245
245
|
size: n,
|
|
246
246
|
className: e
|
|
@@ -251,26 +251,26 @@ 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
|
|
255
|
-
return /* @__PURE__ */ X(
|
|
254
|
+
function Ge({ ...e }) {
|
|
255
|
+
return /* @__PURE__ */ X(K.Root, {
|
|
256
256
|
"data-slot": "dropdown-menu",
|
|
257
257
|
...e
|
|
258
258
|
});
|
|
259
259
|
}
|
|
260
|
-
function
|
|
261
|
-
return /* @__PURE__ */ X(
|
|
260
|
+
function Ke({ ...e }) {
|
|
261
|
+
return /* @__PURE__ */ X(K.Portal, {
|
|
262
262
|
"data-slot": "dropdown-menu-portal",
|
|
263
263
|
...e
|
|
264
264
|
});
|
|
265
265
|
}
|
|
266
|
-
function
|
|
267
|
-
return /* @__PURE__ */ X(
|
|
266
|
+
function qe({ ...e }) {
|
|
267
|
+
return /* @__PURE__ */ X(K.Trigger, {
|
|
268
268
|
"data-slot": "dropdown-menu-trigger",
|
|
269
269
|
...e
|
|
270
270
|
});
|
|
271
271
|
}
|
|
272
|
-
function
|
|
273
|
-
return /* @__PURE__ */ X(
|
|
272
|
+
function Je({ className: e, align: t = "start", sideOffset: n = 4, ...r }) {
|
|
273
|
+
return /* @__PURE__ */ X(K.Portal, { children: /* @__PURE__ */ X(K.Content, {
|
|
274
274
|
"data-slot": "dropdown-menu-content",
|
|
275
275
|
sideOffset: n,
|
|
276
276
|
align: t,
|
|
@@ -278,14 +278,14 @@ function qe({ className: e, align: t = "start", sideOffset: n = 4, ...r }) {
|
|
|
278
278
|
...r
|
|
279
279
|
}) });
|
|
280
280
|
}
|
|
281
|
-
function
|
|
282
|
-
return /* @__PURE__ */ X(
|
|
281
|
+
function Ye({ ...e }) {
|
|
282
|
+
return /* @__PURE__ */ X(K.Group, {
|
|
283
283
|
"data-slot": "dropdown-menu-group",
|
|
284
284
|
...e
|
|
285
285
|
});
|
|
286
286
|
}
|
|
287
|
-
function
|
|
288
|
-
return /* @__PURE__ */ X(
|
|
287
|
+
function Xe({ className: e, inset: t, variant: n = "default", ...r }) {
|
|
288
|
+
return /* @__PURE__ */ X(K.Item, {
|
|
289
289
|
"data-slot": "dropdown-menu-item",
|
|
290
290
|
"data-inset": t,
|
|
291
291
|
"data-variant": n,
|
|
@@ -293,8 +293,8 @@ function Ye({ className: e, inset: t, variant: n = "default", ...r }) {
|
|
|
293
293
|
...r
|
|
294
294
|
});
|
|
295
295
|
}
|
|
296
|
-
function
|
|
297
|
-
return /* @__PURE__ */ Z(
|
|
296
|
+
function Ze({ className: e, children: t, checked: n, inset: r, ...i }) {
|
|
297
|
+
return /* @__PURE__ */ Z(K.CheckboxItem, {
|
|
298
298
|
"data-slot": "dropdown-menu-checkbox-item",
|
|
299
299
|
"data-inset": r,
|
|
300
300
|
className: Q("relative flex 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 focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", e),
|
|
@@ -303,18 +303,18 @@ function Xe({ className: e, children: t, checked: n, inset: r, ...i }) {
|
|
|
303
303
|
children: [/* @__PURE__ */ X("span", {
|
|
304
304
|
className: "pointer-events-none absolute right-2 flex items-center justify-center",
|
|
305
305
|
"data-slot": "dropdown-menu-checkbox-item-indicator",
|
|
306
|
-
children: /* @__PURE__ */ X(
|
|
306
|
+
children: /* @__PURE__ */ X(K.ItemIndicator, { children: /* @__PURE__ */ X(_, {}) })
|
|
307
307
|
}), t]
|
|
308
308
|
});
|
|
309
309
|
}
|
|
310
|
-
function
|
|
311
|
-
return /* @__PURE__ */ X(
|
|
310
|
+
function Qe({ ...e }) {
|
|
311
|
+
return /* @__PURE__ */ X(K.RadioGroup, {
|
|
312
312
|
"data-slot": "dropdown-menu-radio-group",
|
|
313
313
|
...e
|
|
314
314
|
});
|
|
315
315
|
}
|
|
316
|
-
function
|
|
317
|
-
return /* @__PURE__ */ Z(
|
|
316
|
+
function $e({ className: e, children: t, inset: n, ...r }) {
|
|
317
|
+
return /* @__PURE__ */ Z(K.RadioItem, {
|
|
318
318
|
"data-slot": "dropdown-menu-radio-item",
|
|
319
319
|
"data-inset": n,
|
|
320
320
|
className: Q("relative flex 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 focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", e),
|
|
@@ -322,49 +322,49 @@ function Qe({ className: e, children: t, inset: n, ...r }) {
|
|
|
322
322
|
children: [/* @__PURE__ */ X("span", {
|
|
323
323
|
className: "pointer-events-none absolute right-2 flex items-center justify-center",
|
|
324
324
|
"data-slot": "dropdown-menu-radio-item-indicator",
|
|
325
|
-
children: /* @__PURE__ */ X(
|
|
325
|
+
children: /* @__PURE__ */ X(K.ItemIndicator, { children: /* @__PURE__ */ X(_, {}) })
|
|
326
326
|
}), t]
|
|
327
327
|
});
|
|
328
328
|
}
|
|
329
|
-
function
|
|
330
|
-
return /* @__PURE__ */ X(
|
|
329
|
+
function et({ className: e, inset: t, ...n }) {
|
|
330
|
+
return /* @__PURE__ */ X(K.Label, {
|
|
331
331
|
"data-slot": "dropdown-menu-label",
|
|
332
332
|
"data-inset": t,
|
|
333
333
|
className: Q("px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7", e),
|
|
334
334
|
...n
|
|
335
335
|
});
|
|
336
336
|
}
|
|
337
|
-
function
|
|
338
|
-
return /* @__PURE__ */ X(
|
|
337
|
+
function tt({ className: e, ...t }) {
|
|
338
|
+
return /* @__PURE__ */ X(K.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 nt({ 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
|
|
352
|
-
return /* @__PURE__ */ X(
|
|
351
|
+
function rt({ ...e }) {
|
|
352
|
+
return /* @__PURE__ */ X(K.Sub, {
|
|
353
353
|
"data-slot": "dropdown-menu-sub",
|
|
354
354
|
...e
|
|
355
355
|
});
|
|
356
356
|
}
|
|
357
|
-
function
|
|
358
|
-
return /* @__PURE__ */ Z(
|
|
357
|
+
function it({ className: e, inset: t, children: n, ...r }) {
|
|
358
|
+
return /* @__PURE__ */ Z(K.SubTrigger, {
|
|
359
359
|
"data-slot": "dropdown-menu-sub-trigger",
|
|
360
360
|
"data-inset": t,
|
|
361
361
|
className: Q("flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", e),
|
|
362
362
|
...r,
|
|
363
|
-
children: [n, /* @__PURE__ */ X(
|
|
363
|
+
children: [n, /* @__PURE__ */ X(x, { className: "ml-auto" })]
|
|
364
364
|
});
|
|
365
365
|
}
|
|
366
|
-
function
|
|
367
|
-
return /* @__PURE__ */ X(
|
|
366
|
+
function at({ className: e, ...t }) {
|
|
367
|
+
return /* @__PURE__ */ X(K.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),
|
|
370
370
|
...t
|
|
@@ -372,42 +372,42 @@ function it({ className: e, ...t }) {
|
|
|
372
372
|
}
|
|
373
373
|
//#endregion
|
|
374
374
|
//#region src/components/custom/actions-menu.tsx
|
|
375
|
-
var
|
|
376
|
-
function
|
|
375
|
+
var ot = 16;
|
|
376
|
+
function st(e) {
|
|
377
377
|
return e.type === void 0 || e.type === "action";
|
|
378
378
|
}
|
|
379
|
-
function
|
|
380
|
-
return /* @__PURE__ */ Z(
|
|
379
|
+
function ct({ items: e, trigger: t, triggerIcon: n = ae, triggerLabel: r = "Open menu", width: i = "10rem", align: a = "end", className: o, open: s, onOpenChange: c }) {
|
|
380
|
+
return /* @__PURE__ */ Z(Ge, {
|
|
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: ot }), /* @__PURE__ */ X("span", {
|
|
391
391
|
className: "sr-only",
|
|
392
392
|
children: r
|
|
393
393
|
})]
|
|
394
394
|
})
|
|
395
|
-
}), /* @__PURE__ */ X(
|
|
395
|
+
}), /* @__PURE__ */ X(Je, {
|
|
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(tt, {}, `sep-${t}`);
|
|
400
|
+
if (e.type === "label") return /* @__PURE__ */ X(et, { children: e.label }, `label-${t}`);
|
|
401
|
+
if (!st(e)) return null;
|
|
402
402
|
let n = e.icon;
|
|
403
|
-
return /* @__PURE__ */ Z(
|
|
403
|
+
return /* @__PURE__ */ Z(Xe, {
|
|
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: ot }),
|
|
409
409
|
e.label,
|
|
410
|
-
e.shortcut && /* @__PURE__ */ X(
|
|
410
|
+
e.shortcut && /* @__PURE__ */ X(nt, { children: e.shortcut })
|
|
411
411
|
]
|
|
412
412
|
}, t);
|
|
413
413
|
})
|
|
@@ -416,8 +416,8 @@ function st({ items: e, trigger: t, triggerIcon: n = z, triggerLabel: r = "Open
|
|
|
416
416
|
}
|
|
417
417
|
//#endregion
|
|
418
418
|
//#region src/components/ui/label.tsx
|
|
419
|
-
function
|
|
420
|
-
return /* @__PURE__ */ X(
|
|
419
|
+
function lt({ className: e, ...t }) {
|
|
420
|
+
return /* @__PURE__ */ X(ye.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 ct({ className: e, ...t }) {
|
|
|
425
425
|
}
|
|
426
426
|
//#endregion
|
|
427
427
|
//#region src/components/ui/separator.tsx
|
|
428
|
-
function
|
|
429
|
-
return /* @__PURE__ */ X(
|
|
428
|
+
function ut({ className: e, orientation: t = "horizontal", decorative: n = !0, ...r }) {
|
|
429
|
+
return /* @__PURE__ */ X(Se.Root, {
|
|
430
430
|
"data-slot": "separator",
|
|
431
431
|
decorative: n,
|
|
432
432
|
orientation: t,
|
|
@@ -436,14 +436,14 @@ function lt({ 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 dt({ 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 ft({ 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 dt({ className: e, variant: t = "legend", ...n }) {
|
|
|
451
451
|
...n
|
|
452
452
|
});
|
|
453
453
|
}
|
|
454
|
-
function
|
|
454
|
+
function pt({ 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 mt = U("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 pt = 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 ht({ 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(mt({ orientation: t }), e),
|
|
475
475
|
...n
|
|
476
476
|
});
|
|
477
477
|
}
|
|
478
|
-
function
|
|
478
|
+
function gt({ 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 _t({ className: e, ...t }) {
|
|
486
|
+
return /* @__PURE__ */ X(lt, {
|
|
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 vt({ 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 yt({ 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 bt({ 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(ut, { 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 xt({ 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 bt({ 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 St({ 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,7 +550,7 @@ function xt({ error: e, errorMessage: t, helperText: n, errorId: r, helperId: i
|
|
|
550
550
|
}) : null
|
|
551
551
|
});
|
|
552
552
|
}
|
|
553
|
-
var
|
|
553
|
+
var Ct = n.forwardRef(function(e, t) {
|
|
554
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), D = `${w}-error`, O = `${w}-helper`, k = `${w}-description`, A = [
|
|
555
555
|
S && s ? D : null,
|
|
556
556
|
!S && c ? O : null,
|
|
@@ -565,7 +565,7 @@ var St = 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(_t, {
|
|
569
569
|
htmlFor: w,
|
|
570
570
|
className: Q(m && "text-muted-foreground"),
|
|
571
571
|
children: [a, M]
|
|
@@ -579,14 +579,14 @@ var St = n.forwardRef(function(e, t) {
|
|
|
579
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(St, {
|
|
583
583
|
error: S,
|
|
584
584
|
errorMessage: s,
|
|
585
585
|
helperText: c,
|
|
586
586
|
errorId: D,
|
|
587
587
|
helperId: O
|
|
588
588
|
}),
|
|
589
|
-
o && /* @__PURE__ */ X(
|
|
589
|
+
o && /* @__PURE__ */ X(yt, {
|
|
590
590
|
id: k,
|
|
591
591
|
children: o
|
|
592
592
|
})
|
|
@@ -616,7 +616,7 @@ var St = n.forwardRef(function(e, t) {
|
|
|
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(_t, {
|
|
620
620
|
htmlFor: w,
|
|
621
621
|
className: Q(m && "text-muted-foreground"),
|
|
622
622
|
children: [a, M]
|
|
@@ -662,50 +662,50 @@ var St = n.forwardRef(function(e, t) {
|
|
|
662
662
|
})
|
|
663
663
|
]
|
|
664
664
|
}),
|
|
665
|
-
/* @__PURE__ */ X(
|
|
665
|
+
/* @__PURE__ */ X(St, {
|
|
666
666
|
error: S,
|
|
667
667
|
errorMessage: s,
|
|
668
668
|
helperText: c,
|
|
669
669
|
errorId: D,
|
|
670
670
|
helperId: O
|
|
671
671
|
}),
|
|
672
|
-
o && /* @__PURE__ */ X(
|
|
672
|
+
o && /* @__PURE__ */ X(yt, {
|
|
673
673
|
id: k,
|
|
674
674
|
children: o
|
|
675
675
|
})
|
|
676
676
|
]
|
|
677
677
|
});
|
|
678
|
-
}),
|
|
678
|
+
}), wt = [
|
|
679
679
|
{
|
|
680
680
|
match: (e, t) => e.includes("zip") || e.includes("archive") || t.endsWith(".zip") || t.endsWith(".rar"),
|
|
681
|
-
Icon:
|
|
681
|
+
Icon: O
|
|
682
682
|
},
|
|
683
683
|
{
|
|
684
684
|
match: (e) => e.includes("audio/"),
|
|
685
|
-
Icon:
|
|
685
|
+
Icon: M
|
|
686
686
|
},
|
|
687
687
|
{
|
|
688
688
|
match: (e, t) => e.includes("excel") || t.endsWith(".xls") || t.endsWith(".xlsx"),
|
|
689
|
-
Icon:
|
|
689
|
+
Icon: A
|
|
690
690
|
},
|
|
691
691
|
{
|
|
692
692
|
match: (e) => e.startsWith("image/"),
|
|
693
|
-
Icon:
|
|
693
|
+
Icon: N
|
|
694
694
|
},
|
|
695
695
|
{
|
|
696
696
|
match: (e, t) => e.includes("pdf") || t.endsWith(".pdf") || e.includes("word") || t.endsWith(".doc") || t.endsWith(".docx"),
|
|
697
|
-
Icon:
|
|
697
|
+
Icon: j
|
|
698
698
|
},
|
|
699
699
|
{
|
|
700
700
|
match: (e) => e.includes("video/"),
|
|
701
|
-
Icon:
|
|
701
|
+
Icon: me
|
|
702
702
|
}
|
|
703
703
|
];
|
|
704
|
-
function
|
|
705
|
-
for (let { match: t, Icon: n } of
|
|
706
|
-
return /* @__PURE__ */ X(
|
|
704
|
+
function Tt(e) {
|
|
705
|
+
for (let { match: t, Icon: n } of wt) if (t(e.type, e.name)) return /* @__PURE__ */ X(n, { className: "size-5 opacity-60" });
|
|
706
|
+
return /* @__PURE__ */ X(k, { className: "size-5 opacity-60" });
|
|
707
707
|
}
|
|
708
|
-
function
|
|
708
|
+
function Et({ entry: e }) {
|
|
709
709
|
let { file: t } = e;
|
|
710
710
|
return /* @__PURE__ */ X("div", {
|
|
711
711
|
className: "flex aspect-square items-center justify-center overflow-hidden rounded-t-[inherit] bg-accent",
|
|
@@ -713,18 +713,18 @@ function Tt({ entry: e }) {
|
|
|
713
713
|
alt: t.name,
|
|
714
714
|
className: "size-full rounded-t-[inherit] object-cover",
|
|
715
715
|
src: e.preview
|
|
716
|
-
}) :
|
|
716
|
+
}) : Tt(t)
|
|
717
717
|
});
|
|
718
718
|
}
|
|
719
|
-
function
|
|
720
|
-
let [{ files: l, isDragging: u, errors: d }, { handleDragEnter: f, handleDragLeave: m, handleDragOver: h, handleDrop: g, openFileDialog: _, removeFile: v, clearFiles: y, getInputProps: b }] =
|
|
719
|
+
function Dt({ variant: e = "image", accept: t = "image/*", maxSize: n = 5 * 1024 * 1024, maxFiles: r = 6, multiple: i, initialFiles: a, disabled: o, onFilesChange: s, className: c }) {
|
|
720
|
+
let [{ files: l, isDragging: u, errors: d }, { handleDragEnter: f, handleDragLeave: m, handleDragOver: h, handleDrop: g, openFileDialog: _, removeFile: v, clearFiles: y, getInputProps: b }] = He({
|
|
721
721
|
accept: t,
|
|
722
722
|
maxSize: n,
|
|
723
723
|
maxFiles: r,
|
|
724
724
|
multiple: e === "files" ? !0 : i ?? !1,
|
|
725
725
|
initialFiles: a,
|
|
726
726
|
onFilesChange: s
|
|
727
|
-
}), x =
|
|
727
|
+
}), x = Ve(n), S = d.length > 0 && /* @__PURE__ */ Z("div", {
|
|
728
728
|
className: "flex items-center gap-1 text-destructive text-xs",
|
|
729
729
|
role: "alert",
|
|
730
730
|
children: [/* @__PURE__ */ X(p, { className: "size-3 shrink-0" }), /* @__PURE__ */ X("span", { children: d[0] })]
|
|
@@ -762,7 +762,7 @@ function Et({ variant: e = "image", accept: t = "image/*", maxSize: n = 5 * 1024
|
|
|
762
762
|
/* @__PURE__ */ X("div", {
|
|
763
763
|
"aria-hidden": "true",
|
|
764
764
|
className: "mb-2 flex size-11 shrink-0 items-center justify-center rounded-full border bg-background",
|
|
765
|
-
children: /* @__PURE__ */ X(
|
|
765
|
+
children: /* @__PURE__ */ X(P, { className: "size-4 opacity-60" })
|
|
766
766
|
}),
|
|
767
767
|
/* @__PURE__ */ X("p", {
|
|
768
768
|
className: "mb-1.5 font-medium text-sm",
|
|
@@ -781,7 +781,7 @@ function Et({ variant: e = "image", accept: t = "image/*", maxSize: n = 5 * 1024
|
|
|
781
781
|
className: "z-50 flex size-8 cursor-pointer items-center justify-center rounded-full bg-black/60 text-white outline-none transition-[color,box-shadow] hover:bg-black/80 focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50",
|
|
782
782
|
onClick: () => t && v(t.id),
|
|
783
783
|
type: "button",
|
|
784
|
-
children: /* @__PURE__ */ X(
|
|
784
|
+
children: /* @__PURE__ */ X(ge, {
|
|
785
785
|
"aria-hidden": "true",
|
|
786
786
|
className: "size-4"
|
|
787
787
|
})
|
|
@@ -822,7 +822,7 @@ function Et({ variant: e = "image", accept: t = "image/*", maxSize: n = 5 * 1024
|
|
|
822
822
|
onClick: _,
|
|
823
823
|
size: "sm",
|
|
824
824
|
variant: "outline",
|
|
825
|
-
children: [/* @__PURE__ */ X(
|
|
825
|
+
children: [/* @__PURE__ */ X(pe, {
|
|
826
826
|
"aria-hidden": "true",
|
|
827
827
|
className: "-ms-0.5 size-3.5 opacity-60"
|
|
828
828
|
}), "Add files"]
|
|
@@ -831,7 +831,7 @@ function Et({ variant: e = "image", accept: t = "image/*", maxSize: n = 5 * 1024
|
|
|
831
831
|
onClick: y,
|
|
832
832
|
size: "sm",
|
|
833
833
|
variant: "outline",
|
|
834
|
-
children: [/* @__PURE__ */ X(
|
|
834
|
+
children: [/* @__PURE__ */ X(ue, {
|
|
835
835
|
"aria-hidden": "true",
|
|
836
836
|
className: "-ms-0.5 size-3.5 opacity-60"
|
|
837
837
|
}), "Remove all"]
|
|
@@ -842,13 +842,13 @@ function Et({ variant: e = "image", accept: t = "image/*", maxSize: n = 5 * 1024
|
|
|
842
842
|
children: l.map((e) => /* @__PURE__ */ Z("div", {
|
|
843
843
|
className: "relative flex flex-col rounded-md border bg-background",
|
|
844
844
|
children: [
|
|
845
|
-
/* @__PURE__ */ X(
|
|
845
|
+
/* @__PURE__ */ X(Et, { entry: e }),
|
|
846
846
|
/* @__PURE__ */ X($, {
|
|
847
847
|
"aria-label": "Remove file",
|
|
848
848
|
className: "-top-2 -right-2 absolute size-6 rounded-full border-2 border-background shadow-none focus-visible:border-background",
|
|
849
849
|
onClick: () => v(e.id),
|
|
850
850
|
size: "icon",
|
|
851
|
-
children: /* @__PURE__ */ X(
|
|
851
|
+
children: /* @__PURE__ */ X(ge, { className: "size-3.5" })
|
|
852
852
|
}),
|
|
853
853
|
/* @__PURE__ */ Z("div", {
|
|
854
854
|
className: "flex min-w-0 flex-col gap-0.5 border-t p-3",
|
|
@@ -857,7 +857,7 @@ function Et({ variant: e = "image", accept: t = "image/*", maxSize: n = 5 * 1024
|
|
|
857
857
|
children: e.file.name
|
|
858
858
|
}), /* @__PURE__ */ X("p", {
|
|
859
859
|
className: "truncate text-muted-foreground text-xs",
|
|
860
|
-
children:
|
|
860
|
+
children: Ve(e.file.size)
|
|
861
861
|
})]
|
|
862
862
|
})
|
|
863
863
|
]
|
|
@@ -869,7 +869,7 @@ function Et({ variant: e = "image", accept: t = "image/*", maxSize: n = 5 * 1024
|
|
|
869
869
|
/* @__PURE__ */ X("div", {
|
|
870
870
|
"aria-hidden": "true",
|
|
871
871
|
className: "mb-2 flex size-11 shrink-0 items-center justify-center rounded-full border bg-background",
|
|
872
|
-
children: /* @__PURE__ */ X(
|
|
872
|
+
children: /* @__PURE__ */ X(N, { className: "size-4 opacity-60" })
|
|
873
873
|
}),
|
|
874
874
|
/* @__PURE__ */ X("p", {
|
|
875
875
|
className: "mb-1.5 font-medium text-sm",
|
|
@@ -889,7 +889,7 @@ function Et({ variant: e = "image", accept: t = "image/*", maxSize: n = 5 * 1024
|
|
|
889
889
|
disabled: o,
|
|
890
890
|
onClick: _,
|
|
891
891
|
variant: "outline",
|
|
892
|
-
children: [/* @__PURE__ */ X(
|
|
892
|
+
children: [/* @__PURE__ */ X(pe, {
|
|
893
893
|
"aria-hidden": "true",
|
|
894
894
|
className: "-ms-1 opacity-60"
|
|
895
895
|
}), "Select files"]
|
|
@@ -901,50 +901,50 @@ function Et({ variant: e = "image", accept: t = "image/*", maxSize: n = 5 * 1024
|
|
|
901
901
|
}
|
|
902
902
|
//#endregion
|
|
903
903
|
//#region src/components/ui/dialog.tsx
|
|
904
|
-
function
|
|
905
|
-
return /* @__PURE__ */ X(
|
|
904
|
+
function Ot({ ...e }) {
|
|
905
|
+
return /* @__PURE__ */ X(G.Root, {
|
|
906
906
|
"data-slot": "dialog",
|
|
907
907
|
...e
|
|
908
908
|
});
|
|
909
909
|
}
|
|
910
|
-
function
|
|
911
|
-
return /* @__PURE__ */ X(
|
|
910
|
+
function kt({ ...e }) {
|
|
911
|
+
return /* @__PURE__ */ X(G.Trigger, {
|
|
912
912
|
"data-slot": "dialog-trigger",
|
|
913
913
|
...e
|
|
914
914
|
});
|
|
915
915
|
}
|
|
916
|
-
function
|
|
917
|
-
return /* @__PURE__ */ X(
|
|
916
|
+
function At({ ...e }) {
|
|
917
|
+
return /* @__PURE__ */ X(G.Portal, {
|
|
918
918
|
"data-slot": "dialog-portal",
|
|
919
919
|
...e
|
|
920
920
|
});
|
|
921
921
|
}
|
|
922
|
-
function
|
|
923
|
-
return /* @__PURE__ */ X(
|
|
922
|
+
function jt({ ...e }) {
|
|
923
|
+
return /* @__PURE__ */ X(G.Close, {
|
|
924
924
|
"data-slot": "dialog-close",
|
|
925
925
|
...e
|
|
926
926
|
});
|
|
927
927
|
}
|
|
928
|
-
function
|
|
929
|
-
return /* @__PURE__ */ X(
|
|
928
|
+
function Mt({ className: e, ...t }) {
|
|
929
|
+
return /* @__PURE__ */ X(G.Overlay, {
|
|
930
930
|
"data-slot": "dialog-overlay",
|
|
931
931
|
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),
|
|
932
932
|
...t
|
|
933
933
|
});
|
|
934
934
|
}
|
|
935
|
-
function
|
|
936
|
-
return /* @__PURE__ */ Z(
|
|
935
|
+
function Nt({ className: e, children: t, showCloseButton: n = !0, ...r }) {
|
|
936
|
+
return /* @__PURE__ */ Z(At, { children: [/* @__PURE__ */ X(Mt, {}), /* @__PURE__ */ Z(G.Content, {
|
|
937
937
|
"data-slot": "dialog-content",
|
|
938
938
|
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),
|
|
939
939
|
...r,
|
|
940
|
-
children: [t, n && /* @__PURE__ */ X(
|
|
940
|
+
children: [t, n && /* @__PURE__ */ X(G.Close, {
|
|
941
941
|
"data-slot": "dialog-close",
|
|
942
942
|
asChild: !0,
|
|
943
943
|
children: /* @__PURE__ */ Z($, {
|
|
944
944
|
variant: "ghost",
|
|
945
945
|
className: "absolute top-2 right-2",
|
|
946
946
|
size: "icon-sm",
|
|
947
|
-
children: [/* @__PURE__ */ X(
|
|
947
|
+
children: [/* @__PURE__ */ X(ge, {}), /* @__PURE__ */ X("span", {
|
|
948
948
|
className: "sr-only",
|
|
949
949
|
children: "Close"
|
|
950
950
|
})]
|
|
@@ -952,19 +952,19 @@ function Mt({ className: e, children: t, showCloseButton: n = !0, ...r }) {
|
|
|
952
952
|
})]
|
|
953
953
|
})] });
|
|
954
954
|
}
|
|
955
|
-
function
|
|
955
|
+
function Pt({ className: e, ...t }) {
|
|
956
956
|
return /* @__PURE__ */ X("div", {
|
|
957
957
|
"data-slot": "dialog-header",
|
|
958
958
|
className: Q("flex flex-col gap-2", e),
|
|
959
959
|
...t
|
|
960
960
|
});
|
|
961
961
|
}
|
|
962
|
-
function
|
|
962
|
+
function Ft({ className: e, showCloseButton: t = !1, children: n, ...r }) {
|
|
963
963
|
return /* @__PURE__ */ Z("div", {
|
|
964
964
|
"data-slot": "dialog-footer",
|
|
965
965
|
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),
|
|
966
966
|
...r,
|
|
967
|
-
children: [n, t && /* @__PURE__ */ X(
|
|
967
|
+
children: [n, t && /* @__PURE__ */ X(G.Close, {
|
|
968
968
|
asChild: !0,
|
|
969
969
|
children: /* @__PURE__ */ X($, {
|
|
970
970
|
variant: "outline",
|
|
@@ -973,15 +973,15 @@ function Pt({ className: e, showCloseButton: t = !1, children: n, ...r }) {
|
|
|
973
973
|
})]
|
|
974
974
|
});
|
|
975
975
|
}
|
|
976
|
-
function
|
|
977
|
-
return /* @__PURE__ */ X(
|
|
976
|
+
function It({ className: e, ...t }) {
|
|
977
|
+
return /* @__PURE__ */ X(G.Title, {
|
|
978
978
|
"data-slot": "dialog-title",
|
|
979
979
|
className: Q("text-base leading-none font-medium", e),
|
|
980
980
|
...t
|
|
981
981
|
});
|
|
982
982
|
}
|
|
983
|
-
function
|
|
984
|
-
return /* @__PURE__ */ X(
|
|
983
|
+
function Lt({ className: e, ...t }) {
|
|
984
|
+
return /* @__PURE__ */ X(G.Description, {
|
|
985
985
|
"data-slot": "dialog-description",
|
|
986
986
|
className: Q("text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground", e),
|
|
987
987
|
...t
|
|
@@ -989,7 +989,7 @@ function It({ className: e, ...t }) {
|
|
|
989
989
|
}
|
|
990
990
|
//#endregion
|
|
991
991
|
//#region src/components/ui/input.tsx
|
|
992
|
-
function
|
|
992
|
+
function Rt({ className: e, type: t, ...n }) {
|
|
993
993
|
return /* @__PURE__ */ X("input", {
|
|
994
994
|
type: t,
|
|
995
995
|
"data-slot": "input",
|
|
@@ -999,7 +999,7 @@ function Lt({ className: e, type: t, ...n }) {
|
|
|
999
999
|
}
|
|
1000
1000
|
//#endregion
|
|
1001
1001
|
//#region src/components/ui/textarea.tsx
|
|
1002
|
-
function
|
|
1002
|
+
function zt({ className: e, ...t }) {
|
|
1003
1003
|
return /* @__PURE__ */ X("textarea", {
|
|
1004
1004
|
"data-slot": "textarea",
|
|
1005
1005
|
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),
|
|
@@ -1008,7 +1008,7 @@ function Rt({ className: e, ...t }) {
|
|
|
1008
1008
|
}
|
|
1009
1009
|
//#endregion
|
|
1010
1010
|
//#region src/components/ui/input-group.tsx
|
|
1011
|
-
function
|
|
1011
|
+
function Bt({ className: e, ...t }) {
|
|
1012
1012
|
return /* @__PURE__ */ X("div", {
|
|
1013
1013
|
"data-slot": "input-group",
|
|
1014
1014
|
role: "group",
|
|
@@ -1016,7 +1016,7 @@ function zt({ className: e, ...t }) {
|
|
|
1016
1016
|
...t
|
|
1017
1017
|
});
|
|
1018
1018
|
}
|
|
1019
|
-
var
|
|
1019
|
+
var Vt = U("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", {
|
|
1020
1020
|
variants: { align: {
|
|
1021
1021
|
"inline-start": "order-first pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]",
|
|
1022
1022
|
"inline-end": "order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]",
|
|
@@ -1025,19 +1025,19 @@ var Bt = W("flex h-auto cursor-text items-center justify-center gap-2 py-1.5 tex
|
|
|
1025
1025
|
} },
|
|
1026
1026
|
defaultVariants: { align: "inline-start" }
|
|
1027
1027
|
});
|
|
1028
|
-
function
|
|
1028
|
+
function Ht({ className: e, align: t = "inline-start", ...n }) {
|
|
1029
1029
|
return /* @__PURE__ */ X("div", {
|
|
1030
1030
|
role: "group",
|
|
1031
1031
|
"data-slot": "input-group-addon",
|
|
1032
1032
|
"data-align": t,
|
|
1033
|
-
className: Q(
|
|
1033
|
+
className: Q(Vt({ align: t }), e),
|
|
1034
1034
|
onClick: (e) => {
|
|
1035
1035
|
e.target.closest("button") || e.currentTarget.parentElement?.querySelector("input")?.focus();
|
|
1036
1036
|
},
|
|
1037
1037
|
...n
|
|
1038
1038
|
});
|
|
1039
1039
|
}
|
|
1040
|
-
var
|
|
1040
|
+
var Ut = U("flex items-center gap-2 text-sm shadow-none", {
|
|
1041
1041
|
variants: { size: {
|
|
1042
1042
|
xs: "h-6 gap-1 rounded-[calc(var(--radius)-3px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5",
|
|
1043
1043
|
sm: "",
|
|
@@ -1046,30 +1046,30 @@ var Ht = W("flex items-center gap-2 text-sm shadow-none", {
|
|
|
1046
1046
|
} },
|
|
1047
1047
|
defaultVariants: { size: "xs" }
|
|
1048
1048
|
});
|
|
1049
|
-
function
|
|
1049
|
+
function Wt({ className: e, type: t = "button", variant: n = "ghost", size: r = "xs", ...i }) {
|
|
1050
1050
|
return /* @__PURE__ */ X($, {
|
|
1051
1051
|
type: t,
|
|
1052
1052
|
"data-size": r,
|
|
1053
1053
|
variant: n,
|
|
1054
|
-
className: Q(
|
|
1054
|
+
className: Q(Ut({ size: r }), e),
|
|
1055
1055
|
...i
|
|
1056
1056
|
});
|
|
1057
1057
|
}
|
|
1058
|
-
function
|
|
1058
|
+
function Gt({ className: e, ...t }) {
|
|
1059
1059
|
return /* @__PURE__ */ X("span", {
|
|
1060
1060
|
className: Q("flex items-center gap-2 text-sm text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4", e),
|
|
1061
1061
|
...t
|
|
1062
1062
|
});
|
|
1063
1063
|
}
|
|
1064
|
-
function
|
|
1065
|
-
return /* @__PURE__ */ X(
|
|
1064
|
+
function Kt({ className: e, ...t }) {
|
|
1065
|
+
return /* @__PURE__ */ X(Rt, {
|
|
1066
1066
|
"data-slot": "input-group-control",
|
|
1067
1067
|
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),
|
|
1068
1068
|
...t
|
|
1069
1069
|
});
|
|
1070
1070
|
}
|
|
1071
|
-
function
|
|
1072
|
-
return /* @__PURE__ */ X(
|
|
1071
|
+
function qt({ className: e, ...t }) {
|
|
1072
|
+
return /* @__PURE__ */ X(zt, {
|
|
1073
1073
|
"data-slot": "input-group-control",
|
|
1074
1074
|
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),
|
|
1075
1075
|
...t
|
|
@@ -1077,77 +1077,77 @@ function Kt({ className: e, ...t }) {
|
|
|
1077
1077
|
}
|
|
1078
1078
|
//#endregion
|
|
1079
1079
|
//#region src/components/ui/command.tsx
|
|
1080
|
-
function
|
|
1081
|
-
return /* @__PURE__ */ X(
|
|
1080
|
+
function Jt({ className: e, ...t }) {
|
|
1081
|
+
return /* @__PURE__ */ X(Ae, {
|
|
1082
1082
|
"data-slot": "command",
|
|
1083
1083
|
className: Q("flex size-full flex-col overflow-hidden rounded-xl! bg-popover p-1 text-popover-foreground", e),
|
|
1084
1084
|
...t
|
|
1085
1085
|
});
|
|
1086
1086
|
}
|
|
1087
|
-
function
|
|
1088
|
-
return /* @__PURE__ */ Z(
|
|
1087
|
+
function Yt({ title: e = "Command Palette", description: t = "Search for a command to run...", children: n, className: r, showCloseButton: i = !1, ...a }) {
|
|
1088
|
+
return /* @__PURE__ */ Z(Ot, {
|
|
1089
1089
|
...a,
|
|
1090
|
-
children: [/* @__PURE__ */ Z(
|
|
1090
|
+
children: [/* @__PURE__ */ Z(Pt, {
|
|
1091
1091
|
className: "sr-only",
|
|
1092
|
-
children: [/* @__PURE__ */ X(
|
|
1093
|
-
}), /* @__PURE__ */ X(
|
|
1092
|
+
children: [/* @__PURE__ */ X(It, { children: e }), /* @__PURE__ */ X(Lt, { children: t })]
|
|
1093
|
+
}), /* @__PURE__ */ X(Nt, {
|
|
1094
1094
|
className: Q("top-1/3 translate-y-0 overflow-hidden rounded-xl! p-0", r),
|
|
1095
1095
|
showCloseButton: i,
|
|
1096
1096
|
children: n
|
|
1097
1097
|
})]
|
|
1098
1098
|
});
|
|
1099
1099
|
}
|
|
1100
|
-
function
|
|
1100
|
+
function Xt({ className: e, ...t }) {
|
|
1101
1101
|
return /* @__PURE__ */ X("div", {
|
|
1102
1102
|
"data-slot": "command-input-wrapper",
|
|
1103
1103
|
className: "p-1 pb-0",
|
|
1104
|
-
children: /* @__PURE__ */ Z(
|
|
1104
|
+
children: /* @__PURE__ */ Z(Bt, {
|
|
1105
1105
|
className: "h-8! rounded-lg! border-input/30 bg-input/30 shadow-none! *:data-[slot=input-group-addon]:pl-2!",
|
|
1106
|
-
children: [/* @__PURE__ */ X(
|
|
1106
|
+
children: [/* @__PURE__ */ X(Ae.Input, {
|
|
1107
1107
|
"data-slot": "command-input",
|
|
1108
1108
|
className: Q("w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50", e),
|
|
1109
1109
|
...t
|
|
1110
|
-
}), /* @__PURE__ */ X(
|
|
1110
|
+
}), /* @__PURE__ */ X(Ht, { children: /* @__PURE__ */ X(le, { className: "size-4 shrink-0 opacity-50" }) })]
|
|
1111
1111
|
})
|
|
1112
1112
|
});
|
|
1113
1113
|
}
|
|
1114
|
-
function
|
|
1115
|
-
return /* @__PURE__ */ X(
|
|
1114
|
+
function Zt({ className: e, ...t }) {
|
|
1115
|
+
return /* @__PURE__ */ X(Ae.List, {
|
|
1116
1116
|
"data-slot": "command-list",
|
|
1117
1117
|
className: Q("no-scrollbar max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none", e),
|
|
1118
1118
|
...t
|
|
1119
1119
|
});
|
|
1120
1120
|
}
|
|
1121
|
-
function
|
|
1122
|
-
return /* @__PURE__ */ X(
|
|
1121
|
+
function Qt({ className: e, ...t }) {
|
|
1122
|
+
return /* @__PURE__ */ X(Ae.Empty, {
|
|
1123
1123
|
"data-slot": "command-empty",
|
|
1124
1124
|
className: Q("py-6 text-center text-sm", e),
|
|
1125
1125
|
...t
|
|
1126
1126
|
});
|
|
1127
1127
|
}
|
|
1128
|
-
function
|
|
1129
|
-
return /* @__PURE__ */ X(
|
|
1128
|
+
function $t({ className: e, ...t }) {
|
|
1129
|
+
return /* @__PURE__ */ X(Ae.Group, {
|
|
1130
1130
|
"data-slot": "command-group",
|
|
1131
1131
|
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),
|
|
1132
1132
|
...t
|
|
1133
1133
|
});
|
|
1134
1134
|
}
|
|
1135
|
-
function
|
|
1136
|
-
return /* @__PURE__ */ X(
|
|
1135
|
+
function en({ className: e, ...t }) {
|
|
1136
|
+
return /* @__PURE__ */ X(Ae.Separator, {
|
|
1137
1137
|
"data-slot": "command-separator",
|
|
1138
1138
|
className: Q("-mx-1 h-px bg-border", e),
|
|
1139
1139
|
...t
|
|
1140
1140
|
});
|
|
1141
1141
|
}
|
|
1142
|
-
function
|
|
1143
|
-
return /* @__PURE__ */ Z(
|
|
1142
|
+
function tn({ className: e, children: t, ...n }) {
|
|
1143
|
+
return /* @__PURE__ */ Z(Ae.Item, {
|
|
1144
1144
|
"data-slot": "command-item",
|
|
1145
1145
|
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),
|
|
1146
1146
|
...n,
|
|
1147
|
-
children: [t, /* @__PURE__ */ X(
|
|
1147
|
+
children: [t, /* @__PURE__ */ X(_, { className: "ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100" })]
|
|
1148
1148
|
});
|
|
1149
1149
|
}
|
|
1150
|
-
function
|
|
1150
|
+
function nn({ className: e, ...t }) {
|
|
1151
1151
|
return /* @__PURE__ */ X("span", {
|
|
1152
1152
|
"data-slot": "command-shortcut",
|
|
1153
1153
|
className: Q("ml-auto text-xs tracking-widest text-muted-foreground group-data-selected/command-item:text-foreground", e),
|
|
@@ -1156,20 +1156,20 @@ function tn({ className: e, ...t }) {
|
|
|
1156
1156
|
}
|
|
1157
1157
|
//#endregion
|
|
1158
1158
|
//#region src/components/ui/popover.tsx
|
|
1159
|
-
function
|
|
1160
|
-
return /* @__PURE__ */ X(
|
|
1159
|
+
function rn({ ...e }) {
|
|
1160
|
+
return /* @__PURE__ */ X(q.Root, {
|
|
1161
1161
|
"data-slot": "popover",
|
|
1162
1162
|
...e
|
|
1163
1163
|
});
|
|
1164
1164
|
}
|
|
1165
|
-
function
|
|
1166
|
-
return /* @__PURE__ */ X(
|
|
1165
|
+
function an({ ...e }) {
|
|
1166
|
+
return /* @__PURE__ */ X(q.Trigger, {
|
|
1167
1167
|
"data-slot": "popover-trigger",
|
|
1168
1168
|
...e
|
|
1169
1169
|
});
|
|
1170
1170
|
}
|
|
1171
|
-
function
|
|
1172
|
-
return /* @__PURE__ */ X(
|
|
1171
|
+
function on({ className: e, align: t = "center", sideOffset: n = 4, ...r }) {
|
|
1172
|
+
return /* @__PURE__ */ X(q.Portal, { children: /* @__PURE__ */ X(q.Content, {
|
|
1173
1173
|
"data-slot": "popover-content",
|
|
1174
1174
|
align: t,
|
|
1175
1175
|
sideOffset: n,
|
|
@@ -1177,27 +1177,27 @@ function an({ className: e, align: t = "center", sideOffset: n = 4, ...r }) {
|
|
|
1177
1177
|
...r
|
|
1178
1178
|
}) });
|
|
1179
1179
|
}
|
|
1180
|
-
function
|
|
1181
|
-
return /* @__PURE__ */ X(
|
|
1180
|
+
function sn({ ...e }) {
|
|
1181
|
+
return /* @__PURE__ */ X(q.Anchor, {
|
|
1182
1182
|
"data-slot": "popover-anchor",
|
|
1183
1183
|
...e
|
|
1184
1184
|
});
|
|
1185
1185
|
}
|
|
1186
|
-
function
|
|
1186
|
+
function cn({ className: e, ...t }) {
|
|
1187
1187
|
return /* @__PURE__ */ X("div", {
|
|
1188
1188
|
"data-slot": "popover-header",
|
|
1189
1189
|
className: Q("flex flex-col gap-0.5 text-sm", e),
|
|
1190
1190
|
...t
|
|
1191
1191
|
});
|
|
1192
1192
|
}
|
|
1193
|
-
function
|
|
1193
|
+
function ln({ className: e, ...t }) {
|
|
1194
1194
|
return /* @__PURE__ */ X("div", {
|
|
1195
1195
|
"data-slot": "popover-title",
|
|
1196
1196
|
className: Q("font-medium", e),
|
|
1197
1197
|
...t
|
|
1198
1198
|
});
|
|
1199
1199
|
}
|
|
1200
|
-
function
|
|
1200
|
+
function un({ className: e, ...t }) {
|
|
1201
1201
|
return /* @__PURE__ */ X("p", {
|
|
1202
1202
|
"data-slot": "popover-description",
|
|
1203
1203
|
className: Q("text-muted-foreground", e),
|
|
@@ -1206,19 +1206,19 @@ function ln({ className: e, ...t }) {
|
|
|
1206
1206
|
}
|
|
1207
1207
|
//#endregion
|
|
1208
1208
|
//#region src/components/custom/advanced-select.tsx
|
|
1209
|
-
function
|
|
1209
|
+
function dn(e) {
|
|
1210
1210
|
return typeof e == "object" && !!e && "value" in e && "label" in e;
|
|
1211
1211
|
}
|
|
1212
|
-
function
|
|
1212
|
+
function fn({ 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: v, label: b, description: x, required: S = !1, onCreateNew: C, createNewLabel: w = "New item", loading: T = !1, compactMultiple: E = !1, formatCompactDisplay: D, startItem: ee, endItem: te, maxSelections: O, defaultOpen: k = !1, onOpenChange: A, onLoadMore: j, hasNextPage: M = !1, isFetchingNextPage: N = !1, allowEmpty: P = !1, showSelectAll: F = !1, readOnly: I = !1, popoverClassName: re }) {
|
|
1213
1213
|
let [L, ie] = n.useState(k), R = n.useRef(!1), z = n.useRef(null), ae = n.useId(), oe = n.useCallback((e) => {
|
|
1214
1214
|
I && e || (ie(e), A?.(e), e && (R.current = !1));
|
|
1215
|
-
}, [A, I]), [B,
|
|
1215
|
+
}, [A, I]), [B, se] = n.useState(l ? Array.isArray(r) ? r : r ? [r] : [] : []);
|
|
1216
1216
|
n.useEffect(() => {
|
|
1217
|
-
l &&
|
|
1217
|
+
l && se(Array.isArray(r) ? r : r ? [r] : []);
|
|
1218
1218
|
}, [l, r]), n.useEffect(() => {
|
|
1219
1219
|
N || (R.current = !1);
|
|
1220
1220
|
}, [N]);
|
|
1221
|
-
let V = n.useCallback((e) => typeof e == "string" ? e :
|
|
1221
|
+
let V = n.useCallback((e) => typeof e == "string" ? e : g ? g(e) : dn(e) ? e.value : String(e), [g]), le = n.useCallback((n) => {
|
|
1222
1222
|
if (typeof n == "string") {
|
|
1223
1223
|
for (let e of t) {
|
|
1224
1224
|
let t = e.options.find((e) => e.value === n);
|
|
@@ -1226,10 +1226,10 @@ function dn({ options: e = [], groups: t = [], value: r, onValueChange: i, place
|
|
|
1226
1226
|
}
|
|
1227
1227
|
for (let t of e) if (typeof t == "string") {
|
|
1228
1228
|
if (t === n) return t;
|
|
1229
|
-
} else if (
|
|
1229
|
+
} else if (dn(t) && t.value === n) return t.label;
|
|
1230
1230
|
return n;
|
|
1231
1231
|
}
|
|
1232
|
-
return h ? h(n) :
|
|
1232
|
+
return h ? h(n) : dn(n) ? n.label : String(n);
|
|
1233
1233
|
}, [
|
|
1234
1234
|
h,
|
|
1235
1235
|
t,
|
|
@@ -1241,7 +1241,7 @@ function dn({ options: e = [], groups: t = [], value: r, onValueChange: i, place
|
|
|
1241
1241
|
]), de = n.useMemo(() => e.map((e) => typeof e == "string" ? {
|
|
1242
1242
|
value: e,
|
|
1243
1243
|
label: e
|
|
1244
|
-
} :
|
|
1244
|
+
} : dn(e) ? e : {
|
|
1245
1245
|
value: V(e),
|
|
1246
1246
|
label: le(e)
|
|
1247
1247
|
}), [
|
|
@@ -1264,36 +1264,36 @@ function dn({ options: e = [], groups: t = [], value: r, onValueChange: i, place
|
|
|
1264
1264
|
let e = B.some((e) => V(e) === n);
|
|
1265
1265
|
if (!e && O && B.length >= O || e && B.length === 1 && !P) return;
|
|
1266
1266
|
let t = e ? B.filter((e) => V(e) !== n) : [...B, r];
|
|
1267
|
-
|
|
1267
|
+
se(t), i?.(t);
|
|
1268
1268
|
} else i?.(r), ie(!1);
|
|
1269
|
-
}, me = l && H.length > 0 && H.length === B.length,
|
|
1269
|
+
}, me = l && H.length > 0 && H.length === B.length, he = () => {
|
|
1270
1270
|
if (l) {
|
|
1271
1271
|
if (me) {
|
|
1272
|
-
P && (
|
|
1272
|
+
P && (se([]), i?.([]));
|
|
1273
1273
|
return;
|
|
1274
1274
|
}
|
|
1275
|
-
O && H.length > O || (
|
|
1275
|
+
O && H.length > O || (se(H), i?.(H));
|
|
1276
1276
|
}
|
|
1277
|
-
},
|
|
1278
|
-
e.stopPropagation(), l ? (
|
|
1279
|
-
},
|
|
1277
|
+
}, U = (e) => {
|
|
1278
|
+
e.stopPropagation(), l ? (se([]), i?.([])) : i?.("");
|
|
1279
|
+
}, W = (e, t) => {
|
|
1280
1280
|
if (e.stopPropagation(), B.length === 1 && !P) return;
|
|
1281
1281
|
let n = B.filter((e) => V(e) !== V(t));
|
|
1282
|
-
|
|
1283
|
-
},
|
|
1282
|
+
se(n), i?.(n);
|
|
1283
|
+
}, _e = n.useCallback((e) => {
|
|
1284
1284
|
let t = e.currentTarget;
|
|
1285
1285
|
t.scrollHeight - t.scrollTop - t.clientHeight < 100 && j && M && !N && !R.current && (R.current = !0, j());
|
|
1286
1286
|
}, [
|
|
1287
1287
|
j,
|
|
1288
1288
|
M,
|
|
1289
1289
|
N
|
|
1290
|
-
]),
|
|
1290
|
+
]), G = l ? B.length > 0 : !!ue, K = () => l ? null : H.find((e) => e.value === ue)?.label || a, ve = () => {
|
|
1291
1291
|
!o && !I && (z.current?.focus(), ie(!0));
|
|
1292
|
-
},
|
|
1293
|
-
className: Q("flex min-w-0 flex-1 items-center gap-1.5",
|
|
1292
|
+
}, ye = !!(ee || te), q = l && !E, be = q ? d === "default" ? "min-h-9" : "min-h-7" : d === "default" ? "h-9" : "h-7", xe = f === "alt" ? "bg-muted" : "bg-transparent dark:bg-input/30", J = /* @__PURE__ */ X("div", {
|
|
1293
|
+
className: Q("flex min-w-0 flex-1 items-center gap-1.5", q ? "py-1" : "overflow-hidden"),
|
|
1294
1294
|
children: l && B.length > 0 ? E ? /* @__PURE__ */ X("span", {
|
|
1295
1295
|
className: "min-w-0 truncate",
|
|
1296
|
-
children:
|
|
1296
|
+
children: D ? D(B) : `${B.length} selected`
|
|
1297
1297
|
}) : /* @__PURE__ */ X("div", {
|
|
1298
1298
|
className: "flex flex-wrap items-center gap-1.5",
|
|
1299
1299
|
children: B.map((e, t) => /* @__PURE__ */ Z("span", {
|
|
@@ -1301,48 +1301,48 @@ function dn({ options: e = [], groups: t = [], value: r, onValueChange: i, place
|
|
|
1301
1301
|
children: [le(e), !o && /* @__PURE__ */ X("button", {
|
|
1302
1302
|
type: "button",
|
|
1303
1303
|
"aria-label": `Remove ${le(e)}`,
|
|
1304
|
-
onClick: (t) =>
|
|
1304
|
+
onClick: (t) => W(t, e),
|
|
1305
1305
|
className: "rounded-sm transition-colors hover:bg-primary/80",
|
|
1306
|
-
children: /* @__PURE__ */ X(
|
|
1306
|
+
children: /* @__PURE__ */ X(ge, { className: "size-3" })
|
|
1307
1307
|
})]
|
|
1308
1308
|
}, `${V(e)}-${t}`))
|
|
1309
1309
|
}) : /* @__PURE__ */ X("span", {
|
|
1310
|
-
className: Q("block min-w-0 truncate", !
|
|
1311
|
-
children:
|
|
1310
|
+
className: Q("block min-w-0 truncate", !G && "text-muted-foreground"),
|
|
1311
|
+
children: K() || a
|
|
1312
1312
|
})
|
|
1313
1313
|
}), Se = /* @__PURE__ */ Z("div", {
|
|
1314
1314
|
className: "flex shrink-0 items-center gap-1",
|
|
1315
|
-
children: [m &&
|
|
1315
|
+
children: [m && G && !o && /* @__PURE__ */ X("span", {
|
|
1316
1316
|
role: "button",
|
|
1317
1317
|
tabIndex: 0,
|
|
1318
1318
|
"aria-label": "Clear",
|
|
1319
|
-
onClick:
|
|
1319
|
+
onClick: U,
|
|
1320
1320
|
onKeyDown: (e) => {
|
|
1321
|
-
(e.key === "Enter" || e.key === " ") && (e.stopPropagation(),
|
|
1321
|
+
(e.key === "Enter" || e.key === " ") && (e.stopPropagation(), U(e));
|
|
1322
1322
|
},
|
|
1323
1323
|
className: "cursor-pointer rounded-sm p-0.5 transition-colors hover:bg-accent",
|
|
1324
|
-
children: /* @__PURE__ */ X(
|
|
1325
|
-
}), /* @__PURE__ */ X(
|
|
1324
|
+
children: /* @__PURE__ */ X(ge, { className: "size-3.5" })
|
|
1325
|
+
}), /* @__PURE__ */ X(y, {
|
|
1326
1326
|
size: 16,
|
|
1327
1327
|
className: "shrink-0 opacity-60",
|
|
1328
1328
|
"aria-hidden": !0
|
|
1329
1329
|
})]
|
|
1330
1330
|
}), Ce = (e) => {
|
|
1331
1331
|
let t = l ? B.some((t) => V(t) === e.value) : ue === e.value, n = fe(e.value);
|
|
1332
|
-
return /* @__PURE__ */ Z(
|
|
1332
|
+
return /* @__PURE__ */ Z(tn, {
|
|
1333
1333
|
value: e.value,
|
|
1334
1334
|
onSelect: () => pe(e.value),
|
|
1335
1335
|
disabled: e.disabled,
|
|
1336
1336
|
children: [
|
|
1337
1337
|
l ? /* @__PURE__ */ X("div", {
|
|
1338
1338
|
className: Q("flex size-4 shrink-0 items-center justify-center rounded-sm border", t ? "border-primary bg-primary" : "border-input"),
|
|
1339
|
-
children: t && /* @__PURE__ */ X(
|
|
1339
|
+
children: t && /* @__PURE__ */ X(_, {
|
|
1340
1340
|
size: 12,
|
|
1341
1341
|
className: "text-primary-foreground"
|
|
1342
1342
|
})
|
|
1343
1343
|
}) : /* @__PURE__ */ X("div", {
|
|
1344
1344
|
className: "flex size-4 shrink-0 items-center justify-center",
|
|
1345
|
-
children: t && /* @__PURE__ */ X(
|
|
1345
|
+
children: t && /* @__PURE__ */ X(_, {
|
|
1346
1346
|
size: 16,
|
|
1347
1347
|
className: "text-primary"
|
|
1348
1348
|
})
|
|
@@ -1361,7 +1361,7 @@ function dn({ options: e = [], groups: t = [], value: r, onValueChange: i, place
|
|
|
1361
1361
|
className: "flex flex-col gap-0.5",
|
|
1362
1362
|
children: [/* @__PURE__ */ X("span", {
|
|
1363
1363
|
className: "text-sm font-normal",
|
|
1364
|
-
children:
|
|
1364
|
+
children: v && n ? v(n) : e.label
|
|
1365
1365
|
}), e.description && /* @__PURE__ */ X("span", {
|
|
1366
1366
|
className: "text-xs leading-snug text-muted-foreground",
|
|
1367
1367
|
children: e.description
|
|
@@ -1373,46 +1373,46 @@ function dn({ options: e = [], groups: t = [], value: r, onValueChange: i, place
|
|
|
1373
1373
|
})
|
|
1374
1374
|
]
|
|
1375
1375
|
}, e.value);
|
|
1376
|
-
}, we = /* @__PURE__ */ X(
|
|
1376
|
+
}, we = /* @__PURE__ */ X(on, {
|
|
1377
1377
|
className: Q("w-(--radix-popper-anchor-width) min-w-(--radix-popper-anchor-width) p-0", re),
|
|
1378
1378
|
align: "start",
|
|
1379
1379
|
onOpenAutoFocus: (e) => {
|
|
1380
1380
|
p || e.preventDefault();
|
|
1381
1381
|
},
|
|
1382
1382
|
onWheel: (e) => e.stopPropagation(),
|
|
1383
|
-
children: /* @__PURE__ */ Z(
|
|
1383
|
+
children: /* @__PURE__ */ Z(Jt, { children: [p && /* @__PURE__ */ X(Xt, {
|
|
1384
1384
|
placeholder: `Search ${a.toLowerCase()}...`,
|
|
1385
1385
|
autoFocus: !0
|
|
1386
|
-
}), /* @__PURE__ */ X(
|
|
1387
|
-
onScroll:
|
|
1386
|
+
}), /* @__PURE__ */ X(Zt, {
|
|
1387
|
+
onScroll: _e,
|
|
1388
1388
|
children: T ? /* @__PURE__ */ X("div", {
|
|
1389
1389
|
className: "flex items-center justify-center py-6",
|
|
1390
1390
|
children: /* @__PURE__ */ X(ne, { className: "size-5 animate-spin text-muted-foreground" })
|
|
1391
1391
|
}) : /* @__PURE__ */ Z(Y, { children: [
|
|
1392
|
-
l && F && H.length > 0 && /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X(
|
|
1392
|
+
l && F && H.length > 0 && /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X($t, { children: /* @__PURE__ */ Z(tn, {
|
|
1393
1393
|
value: "__select_all__",
|
|
1394
|
-
onSelect:
|
|
1394
|
+
onSelect: he,
|
|
1395
1395
|
className: "font-medium",
|
|
1396
1396
|
children: [/* @__PURE__ */ X("div", {
|
|
1397
1397
|
className: Q("flex size-4 shrink-0 items-center justify-center rounded-sm border", me ? "border-primary bg-primary" : "border-input"),
|
|
1398
|
-
children: me && /* @__PURE__ */ X(
|
|
1398
|
+
children: me && /* @__PURE__ */ X(_, {
|
|
1399
1399
|
size: 12,
|
|
1400
1400
|
className: "text-primary-foreground"
|
|
1401
1401
|
})
|
|
1402
1402
|
}), /* @__PURE__ */ X("span", { children: "Select all" })]
|
|
1403
|
-
}) }), /* @__PURE__ */ X(
|
|
1404
|
-
/* @__PURE__ */ X(
|
|
1405
|
-
t.length > 0 ? t.map((e, t) => /* @__PURE__ */ Z(n.Fragment, { children: [t > 0 && /* @__PURE__ */ X(
|
|
1403
|
+
}) }), /* @__PURE__ */ X(en, {})] }),
|
|
1404
|
+
/* @__PURE__ */ X(Qt, { children: "No results found." }),
|
|
1405
|
+
t.length > 0 ? t.map((e, t) => /* @__PURE__ */ Z(n.Fragment, { children: [t > 0 && /* @__PURE__ */ X(en, {}), /* @__PURE__ */ X($t, {
|
|
1406
1406
|
heading: e.label,
|
|
1407
1407
|
children: e.options.map(Ce)
|
|
1408
|
-
})] }, e.label)) : /* @__PURE__ */ X(
|
|
1409
|
-
C && /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X(
|
|
1408
|
+
})] }, e.label)) : /* @__PURE__ */ X($t, { children: de.map(Ce) }),
|
|
1409
|
+
C && /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X(en, {}), /* @__PURE__ */ X($t, { children: /* @__PURE__ */ Z($, {
|
|
1410
1410
|
variant: "ghost",
|
|
1411
1411
|
className: "w-full justify-start font-normal",
|
|
1412
1412
|
onClick: () => {
|
|
1413
1413
|
C(), ie(!1);
|
|
1414
1414
|
},
|
|
1415
|
-
children: [/* @__PURE__ */ X(
|
|
1415
|
+
children: [/* @__PURE__ */ X(ce, {
|
|
1416
1416
|
size: 16,
|
|
1417
1417
|
className: "-ms-1 opacity-60",
|
|
1418
1418
|
"aria-hidden": !0
|
|
@@ -1432,25 +1432,25 @@ function dn({ options: e = [], groups: t = [], value: r, onValueChange: i, place
|
|
|
1432
1432
|
return /* @__PURE__ */ Z("div", {
|
|
1433
1433
|
className: "space-y-1.5",
|
|
1434
1434
|
children: [
|
|
1435
|
-
b && /* @__PURE__ */ Z(
|
|
1435
|
+
b && /* @__PURE__ */ Z(_t, {
|
|
1436
1436
|
htmlFor: ae,
|
|
1437
|
-
onClick:
|
|
1437
|
+
onClick: ve,
|
|
1438
1438
|
className: Q("cursor-pointer", o && "text-muted-foreground"),
|
|
1439
1439
|
children: [b, Te]
|
|
1440
1440
|
}),
|
|
1441
|
-
|
|
1441
|
+
ye ? /* @__PURE__ */ Z(rn, {
|
|
1442
1442
|
open: L,
|
|
1443
1443
|
onOpenChange: oe,
|
|
1444
1444
|
modal: !1,
|
|
1445
|
-
children: [/* @__PURE__ */ X(
|
|
1445
|
+
children: [/* @__PURE__ */ X(an, {
|
|
1446
1446
|
asChild: !0,
|
|
1447
1447
|
children: /* @__PURE__ */ Z("div", {
|
|
1448
1448
|
"aria-invalid": s,
|
|
1449
|
-
className: Q("flex rounded-md border border-input transition-colors",
|
|
1449
|
+
className: Q("flex rounded-md border border-input transition-colors", q ? "items-stretch" : "items-center overflow-hidden", xe, be, 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"),
|
|
1450
1450
|
children: [
|
|
1451
|
-
|
|
1451
|
+
ee && /* @__PURE__ */ X("div", {
|
|
1452
1452
|
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",
|
|
1453
|
-
children:
|
|
1453
|
+
children: ee
|
|
1454
1454
|
}),
|
|
1455
1455
|
/* @__PURE__ */ Z($, {
|
|
1456
1456
|
id: ae,
|
|
@@ -1463,21 +1463,21 @@ function dn({ options: e = [], groups: t = [], value: r, onValueChange: i, place
|
|
|
1463
1463
|
onClick: (e) => {
|
|
1464
1464
|
I && (e.preventDefault(), e.stopPropagation());
|
|
1465
1465
|
},
|
|
1466
|
-
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",
|
|
1467
|
-
children: [
|
|
1466
|
+
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", q ? "items-start" : "items-center", u),
|
|
1467
|
+
children: [J, Se]
|
|
1468
1468
|
}),
|
|
1469
|
-
|
|
1469
|
+
te && /* @__PURE__ */ X("div", {
|
|
1470
1470
|
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",
|
|
1471
|
-
children:
|
|
1471
|
+
children: te
|
|
1472
1472
|
})
|
|
1473
1473
|
]
|
|
1474
1474
|
})
|
|
1475
1475
|
}), we]
|
|
1476
|
-
}) : /* @__PURE__ */ Z(
|
|
1476
|
+
}) : /* @__PURE__ */ Z(rn, {
|
|
1477
1477
|
open: L,
|
|
1478
1478
|
onOpenChange: oe,
|
|
1479
1479
|
modal: !1,
|
|
1480
|
-
children: [/* @__PURE__ */ X(
|
|
1480
|
+
children: [/* @__PURE__ */ X(an, {
|
|
1481
1481
|
asChild: !0,
|
|
1482
1482
|
children: /* @__PURE__ */ Z($, {
|
|
1483
1483
|
id: ae,
|
|
@@ -1491,8 +1491,8 @@ function dn({ options: e = [], groups: t = [], value: r, onValueChange: i, place
|
|
|
1491
1491
|
onClick: (e) => {
|
|
1492
1492
|
I && (e.preventDefault(), e.stopPropagation());
|
|
1493
1493
|
},
|
|
1494
|
-
className: Q("h-auto w-full justify-between px-3 py-1 font-normal text-foreground", be,
|
|
1495
|
-
children: [
|
|
1494
|
+
className: Q("h-auto w-full justify-between px-3 py-1 font-normal text-foreground", be, q ? "items-start" : "items-center", xe, L && "border-ring ring-3 ring-ring/50", u),
|
|
1495
|
+
children: [J, Se]
|
|
1496
1496
|
})
|
|
1497
1497
|
}), we]
|
|
1498
1498
|
}),
|
|
@@ -1500,27 +1500,27 @@ function dn({ options: e = [], groups: t = [], value: r, onValueChange: i, place
|
|
|
1500
1500
|
className: "text-xs leading-5 text-destructive",
|
|
1501
1501
|
children: c
|
|
1502
1502
|
}),
|
|
1503
|
-
x && /* @__PURE__ */ X(
|
|
1503
|
+
x && /* @__PURE__ */ X(yt, { children: x })
|
|
1504
1504
|
]
|
|
1505
1505
|
});
|
|
1506
1506
|
}
|
|
1507
1507
|
//#endregion
|
|
1508
1508
|
//#region src/components/ui/checkbox.tsx
|
|
1509
|
-
function
|
|
1510
|
-
return /* @__PURE__ */ X(
|
|
1509
|
+
function pn({ className: e, ...t }) {
|
|
1510
|
+
return /* @__PURE__ */ X(_e.Root, {
|
|
1511
1511
|
"data-slot": "checkbox",
|
|
1512
1512
|
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),
|
|
1513
1513
|
...t,
|
|
1514
|
-
children: /* @__PURE__ */ X(
|
|
1514
|
+
children: /* @__PURE__ */ X(_e.Indicator, {
|
|
1515
1515
|
"data-slot": "checkbox-indicator",
|
|
1516
1516
|
className: "grid place-content-center text-current transition-none [&>svg]:size-3.5",
|
|
1517
|
-
children: /* @__PURE__ */ X(
|
|
1517
|
+
children: /* @__PURE__ */ X(_, {})
|
|
1518
1518
|
})
|
|
1519
1519
|
});
|
|
1520
1520
|
}
|
|
1521
1521
|
//#endregion
|
|
1522
1522
|
//#region src/components/ui/table.tsx
|
|
1523
|
-
function
|
|
1523
|
+
function mn({ className: e, ...t }) {
|
|
1524
1524
|
return /* @__PURE__ */ X("div", {
|
|
1525
1525
|
"data-slot": "table-container",
|
|
1526
1526
|
className: "relative w-full overflow-x-auto",
|
|
@@ -1531,49 +1531,49 @@ function pn({ className: e, ...t }) {
|
|
|
1531
1531
|
})
|
|
1532
1532
|
});
|
|
1533
1533
|
}
|
|
1534
|
-
function
|
|
1534
|
+
function hn({ className: e, ...t }) {
|
|
1535
1535
|
return /* @__PURE__ */ X("thead", {
|
|
1536
1536
|
"data-slot": "table-header",
|
|
1537
1537
|
className: Q("[&_tr]:border-b", e),
|
|
1538
1538
|
...t
|
|
1539
1539
|
});
|
|
1540
1540
|
}
|
|
1541
|
-
function
|
|
1541
|
+
function gn({ className: e, ...t }) {
|
|
1542
1542
|
return /* @__PURE__ */ X("tbody", {
|
|
1543
1543
|
"data-slot": "table-body",
|
|
1544
1544
|
className: Q("[&_tr:last-child]:border-0", e),
|
|
1545
1545
|
...t
|
|
1546
1546
|
});
|
|
1547
1547
|
}
|
|
1548
|
-
function
|
|
1548
|
+
function _n({ className: e, ...t }) {
|
|
1549
1549
|
return /* @__PURE__ */ X("tfoot", {
|
|
1550
1550
|
"data-slot": "table-footer",
|
|
1551
1551
|
className: Q("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0", e),
|
|
1552
1552
|
...t
|
|
1553
1553
|
});
|
|
1554
1554
|
}
|
|
1555
|
-
function
|
|
1555
|
+
function vn({ className: e, ...t }) {
|
|
1556
1556
|
return /* @__PURE__ */ X("tr", {
|
|
1557
1557
|
"data-slot": "table-row",
|
|
1558
1558
|
className: Q("border-b transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted", e),
|
|
1559
1559
|
...t
|
|
1560
1560
|
});
|
|
1561
1561
|
}
|
|
1562
|
-
function
|
|
1562
|
+
function yn({ className: e, ...t }) {
|
|
1563
1563
|
return /* @__PURE__ */ X("th", {
|
|
1564
1564
|
"data-slot": "table-head",
|
|
1565
1565
|
className: Q("h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0", e),
|
|
1566
1566
|
...t
|
|
1567
1567
|
});
|
|
1568
1568
|
}
|
|
1569
|
-
function
|
|
1569
|
+
function bn({ className: e, ...t }) {
|
|
1570
1570
|
return /* @__PURE__ */ X("td", {
|
|
1571
1571
|
"data-slot": "table-cell",
|
|
1572
1572
|
className: Q("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0", e),
|
|
1573
1573
|
...t
|
|
1574
1574
|
});
|
|
1575
1575
|
}
|
|
1576
|
-
function
|
|
1576
|
+
function xn({ className: e, ...t }) {
|
|
1577
1577
|
return /* @__PURE__ */ X("caption", {
|
|
1578
1578
|
"data-slot": "table-caption",
|
|
1579
1579
|
className: Q("mt-4 text-sm text-muted-foreground", e),
|
|
@@ -1582,20 +1582,20 @@ function bn({ className: e, ...t }) {
|
|
|
1582
1582
|
}
|
|
1583
1583
|
//#endregion
|
|
1584
1584
|
//#region src/components/custom/data-table.tsx
|
|
1585
|
-
var
|
|
1585
|
+
var Sn = {
|
|
1586
1586
|
left: "text-left",
|
|
1587
1587
|
center: "text-center",
|
|
1588
1588
|
right: "text-right"
|
|
1589
1589
|
};
|
|
1590
|
-
function
|
|
1590
|
+
function Cn({ 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 = [
|
|
1591
1591
|
25,
|
|
1592
1592
|
50,
|
|
1593
1593
|
100,
|
|
1594
1594
|
200
|
|
1595
1595
|
], striped: p = !0, stickyHeader: m = !1, maxHeight: h, onRowClick: g, className: _ }) {
|
|
1596
|
-
let v = n.useMemo(() => t.map((e, t) => r(e, t)), [t, r]), [
|
|
1597
|
-
a === void 0 &&
|
|
1598
|
-
},
|
|
1596
|
+
let v = n.useMemo(() => t.map((e, t) => r(e, t)), [t, r]), [y, S] = n.useState([]), T = a ?? y, E = (e) => {
|
|
1597
|
+
a === void 0 && S(e), o?.(e);
|
|
1598
|
+
}, D = v.length > 0 && v.every((e) => T.includes(e)), ee = T.length > 0 && !D, te = () => E(D ? [] : v), O = (e) => E(T.includes(e) ? T.filter((t) => t !== e) : [...T, e]), k = e.length + +!!i + +!!s, [A, j] = n.useState(d), [M, N] = n.useState(0), P = u ? Math.max(1, Math.ceil(t.length / A)) : 1, F = Math.min(M, P - 1), I = n.useMemo(() => {
|
|
1599
1599
|
let e = t.map((e, t) => ({
|
|
1600
1600
|
row: e,
|
|
1601
1601
|
index: t
|
|
@@ -1608,75 +1608,75 @@ function Sn({ columns: e, data: t, getRowId: r = (e, t) => String(t), selectable
|
|
|
1608
1608
|
u,
|
|
1609
1609
|
F,
|
|
1610
1610
|
A
|
|
1611
|
-
]),
|
|
1611
|
+
]), ne = "px-4 py-3 first:pl-5 last:pr-5", re = "px-4 first:pl-5 last:pr-5";
|
|
1612
1612
|
return /* @__PURE__ */ Z("div", {
|
|
1613
1613
|
className: Q("rounded-lg border", _),
|
|
1614
1614
|
children: [/* @__PURE__ */ X("div", {
|
|
1615
1615
|
className: Q("overflow-hidden rounded-lg", h === void 0 ? "overflow-hidden" : "overflow-auto", u && "rounded-b-none"),
|
|
1616
1616
|
style: h === void 0 ? void 0 : { maxHeight: typeof h == "number" ? `${h}px` : h },
|
|
1617
|
-
children: /* @__PURE__ */ Z(
|
|
1617
|
+
children: /* @__PURE__ */ Z(mn, { children: [/* @__PURE__ */ X(hn, {
|
|
1618
1618
|
className: Q("bg-muted/60", m && "sticky top-0 z-10 [&_th]:bg-muted/95 [&_th]:backdrop-blur supports-backdrop-filter:[&_th]:bg-muted/80"),
|
|
1619
|
-
children: /* @__PURE__ */ Z(
|
|
1619
|
+
children: /* @__PURE__ */ Z(vn, {
|
|
1620
1620
|
className: "hover:bg-transparent",
|
|
1621
1621
|
children: [
|
|
1622
|
-
i && /* @__PURE__ */ X(
|
|
1622
|
+
i && /* @__PURE__ */ X(yn, {
|
|
1623
1623
|
className: Q("w-10", re),
|
|
1624
|
-
children: /* @__PURE__ */ X(
|
|
1624
|
+
children: /* @__PURE__ */ X(pn, {
|
|
1625
1625
|
"aria-label": "Select all rows",
|
|
1626
|
-
checked:
|
|
1627
|
-
onCheckedChange:
|
|
1626
|
+
checked: D ? !0 : ee ? "indeterminate" : !1,
|
|
1627
|
+
onCheckedChange: te
|
|
1628
1628
|
})
|
|
1629
1629
|
}),
|
|
1630
|
-
e.map((e) => /* @__PURE__ */ X(
|
|
1630
|
+
e.map((e) => /* @__PURE__ */ X(yn, {
|
|
1631
1631
|
style: e.width ? { width: e.width } : void 0,
|
|
1632
|
-
className: Q("h-11 text-xs font-semibold tracking-wide text-foreground uppercase", re, e.align &&
|
|
1632
|
+
className: Q("h-11 text-xs font-semibold tracking-wide text-foreground uppercase", re, e.align && Sn[e.align], e.className, e.headerClassName),
|
|
1633
1633
|
children: e.header
|
|
1634
1634
|
}, e.key)),
|
|
1635
|
-
s && /* @__PURE__ */ X(
|
|
1635
|
+
s && /* @__PURE__ */ X(yn, { className: "w-12" })
|
|
1636
1636
|
]
|
|
1637
1637
|
})
|
|
1638
|
-
}), /* @__PURE__ */ X(
|
|
1638
|
+
}), /* @__PURE__ */ X(gn, { children: c ? /* @__PURE__ */ X(vn, {
|
|
1639
1639
|
className: "hover:bg-transparent",
|
|
1640
|
-
children: /* @__PURE__ */ X(
|
|
1640
|
+
children: /* @__PURE__ */ X(bn, {
|
|
1641
1641
|
colSpan: k,
|
|
1642
1642
|
className: "h-28 text-center",
|
|
1643
1643
|
children: /* @__PURE__ */ Z("span", {
|
|
1644
1644
|
className: "inline-flex items-center gap-2 text-muted-foreground",
|
|
1645
|
-
children: [/* @__PURE__ */ X(
|
|
1645
|
+
children: [/* @__PURE__ */ X(Ue, { className: "size-4" }), " Loading…"]
|
|
1646
1646
|
})
|
|
1647
1647
|
})
|
|
1648
|
-
}) : t.length === 0 ? /* @__PURE__ */ X(
|
|
1648
|
+
}) : t.length === 0 ? /* @__PURE__ */ X(vn, {
|
|
1649
1649
|
className: "hover:bg-transparent",
|
|
1650
|
-
children: /* @__PURE__ */ X(
|
|
1650
|
+
children: /* @__PURE__ */ X(bn, {
|
|
1651
1651
|
colSpan: k,
|
|
1652
1652
|
className: "h-28 text-center text-muted-foreground",
|
|
1653
1653
|
children: l
|
|
1654
1654
|
})
|
|
1655
|
-
}) :
|
|
1655
|
+
}) : I.map(({ row: t, index: n }) => {
|
|
1656
1656
|
let r = v[n], a = T.includes(r);
|
|
1657
|
-
return /* @__PURE__ */ Z(
|
|
1657
|
+
return /* @__PURE__ */ Z(vn, {
|
|
1658
1658
|
"data-state": a ? "selected" : void 0,
|
|
1659
1659
|
onClick: g ? () => g(t) : void 0,
|
|
1660
1660
|
className: Q(p && !a && "odd:bg-muted/40", a && "bg-primary/10 shadow-[inset_3px_0_0_0_var(--primary)] hover:bg-primary/15", g && "cursor-pointer"),
|
|
1661
1661
|
children: [
|
|
1662
|
-
i && /* @__PURE__ */ X(
|
|
1663
|
-
className: Q("w-10",
|
|
1662
|
+
i && /* @__PURE__ */ X(bn, {
|
|
1663
|
+
className: Q("w-10", ne),
|
|
1664
1664
|
onClick: (e) => e.stopPropagation(),
|
|
1665
|
-
children: /* @__PURE__ */ X(
|
|
1665
|
+
children: /* @__PURE__ */ X(pn, {
|
|
1666
1666
|
"aria-label": "Select row",
|
|
1667
1667
|
checked: a,
|
|
1668
1668
|
onCheckedChange: () => O(r)
|
|
1669
1669
|
})
|
|
1670
1670
|
}),
|
|
1671
|
-
e.map((e) => /* @__PURE__ */ X(
|
|
1671
|
+
e.map((e) => /* @__PURE__ */ X(bn, {
|
|
1672
1672
|
style: e.width ? { width: e.width } : void 0,
|
|
1673
|
-
className: Q(
|
|
1673
|
+
className: Q(ne, e.align && Sn[e.align], e.className),
|
|
1674
1674
|
children: e.cell ? e.cell(t, n) : String(t[e.key] ?? "")
|
|
1675
1675
|
}, e.key)),
|
|
1676
|
-
s && /* @__PURE__ */ X(
|
|
1676
|
+
s && /* @__PURE__ */ X(bn, {
|
|
1677
1677
|
className: "w-12 pr-3 text-right",
|
|
1678
1678
|
onClick: (e) => e.stopPropagation(),
|
|
1679
|
-
children: /* @__PURE__ */ X(
|
|
1679
|
+
children: /* @__PURE__ */ X(ct, { items: s(t) })
|
|
1680
1680
|
})
|
|
1681
1681
|
]
|
|
1682
1682
|
}, r);
|
|
@@ -1703,7 +1703,7 @@ function Sn({ columns: e, data: t, getRowId: r = (e, t) => String(t), selectable
|
|
|
1703
1703
|
children: [/* @__PURE__ */ X("span", {
|
|
1704
1704
|
className: "whitespace-nowrap",
|
|
1705
1705
|
children: "Rows per page"
|
|
1706
|
-
}), /* @__PURE__ */ X(
|
|
1706
|
+
}), /* @__PURE__ */ X(fn, {
|
|
1707
1707
|
size: "sm",
|
|
1708
1708
|
className: "w-20",
|
|
1709
1709
|
value: String(A),
|
|
@@ -1725,7 +1725,7 @@ function Sn({ columns: e, data: t, getRowId: r = (e, t) => String(t), selectable
|
|
|
1725
1725
|
"aria-label": "First page",
|
|
1726
1726
|
disabled: F <= 0,
|
|
1727
1727
|
onClick: () => N(0),
|
|
1728
|
-
children: /* @__PURE__ */ X(
|
|
1728
|
+
children: /* @__PURE__ */ X(C, {})
|
|
1729
1729
|
}),
|
|
1730
1730
|
/* @__PURE__ */ X($, {
|
|
1731
1731
|
variant: "outline",
|
|
@@ -1733,7 +1733,7 @@ function Sn({ columns: e, data: t, getRowId: r = (e, t) => String(t), selectable
|
|
|
1733
1733
|
"aria-label": "Previous page",
|
|
1734
1734
|
disabled: F <= 0,
|
|
1735
1735
|
onClick: () => N(Math.max(0, F - 1)),
|
|
1736
|
-
children: /* @__PURE__ */ X(
|
|
1736
|
+
children: /* @__PURE__ */ X(b, {})
|
|
1737
1737
|
}),
|
|
1738
1738
|
/* @__PURE__ */ X($, {
|
|
1739
1739
|
variant: "outline",
|
|
@@ -1741,7 +1741,7 @@ function Sn({ columns: e, data: t, getRowId: r = (e, t) => String(t), selectable
|
|
|
1741
1741
|
"aria-label": "Next page",
|
|
1742
1742
|
disabled: F >= P - 1,
|
|
1743
1743
|
onClick: () => N(Math.min(P - 1, F + 1)),
|
|
1744
|
-
children: /* @__PURE__ */ X(
|
|
1744
|
+
children: /* @__PURE__ */ X(x, {})
|
|
1745
1745
|
}),
|
|
1746
1746
|
/* @__PURE__ */ X($, {
|
|
1747
1747
|
variant: "outline",
|
|
@@ -1749,7 +1749,7 @@ function Sn({ columns: e, data: t, getRowId: r = (e, t) => String(t), selectable
|
|
|
1749
1749
|
"aria-label": "Last page",
|
|
1750
1750
|
disabled: F >= P - 1,
|
|
1751
1751
|
onClick: () => N(P - 1),
|
|
1752
|
-
children: /* @__PURE__ */ X(
|
|
1752
|
+
children: /* @__PURE__ */ X(w, {})
|
|
1753
1753
|
})
|
|
1754
1754
|
]
|
|
1755
1755
|
})]
|
|
@@ -1759,26 +1759,26 @@ function Sn({ columns: e, data: t, getRowId: r = (e, t) => String(t), selectable
|
|
|
1759
1759
|
}
|
|
1760
1760
|
//#endregion
|
|
1761
1761
|
//#region src/components/custom/form-dialog.tsx
|
|
1762
|
-
function
|
|
1763
|
-
return /* @__PURE__ */ X(
|
|
1762
|
+
function wn({ children: e, title: t, open: n, onClose: r, description: i, notDismissable: a, footer: o, className: s }) {
|
|
1763
|
+
return /* @__PURE__ */ X(Ot, {
|
|
1764
1764
|
open: n,
|
|
1765
1765
|
onOpenChange: a ? void 0 : (e) => !e && r(),
|
|
1766
|
-
children: /* @__PURE__ */ X(
|
|
1766
|
+
children: /* @__PURE__ */ X(Nt, {
|
|
1767
1767
|
showCloseButton: !1,
|
|
1768
1768
|
className: Q("max-h-[75vh] gap-0 p-0 sm:max-w-2xl", s),
|
|
1769
1769
|
children: /* @__PURE__ */ Z("div", {
|
|
1770
1770
|
className: "flex max-h-[75vh] flex-col",
|
|
1771
1771
|
children: [
|
|
1772
|
-
t && /* @__PURE__ */ X(
|
|
1772
|
+
t && /* @__PURE__ */ X(Pt, {
|
|
1773
1773
|
className: "flex-shrink-0 border-b border-border p-6 pb-4",
|
|
1774
1774
|
children: /* @__PURE__ */ Z("div", {
|
|
1775
1775
|
className: "flex items-start justify-between gap-4",
|
|
1776
1776
|
children: [/* @__PURE__ */ Z("div", {
|
|
1777
1777
|
className: "flex flex-col gap-1",
|
|
1778
|
-
children: [/* @__PURE__ */ X(
|
|
1778
|
+
children: [/* @__PURE__ */ X(It, {
|
|
1779
1779
|
className: "text-left text-xl font-semibold",
|
|
1780
1780
|
children: t
|
|
1781
|
-
}), i && /* @__PURE__ */ X(
|
|
1781
|
+
}), i && /* @__PURE__ */ X(Lt, {
|
|
1782
1782
|
className: "text-left text-muted-foreground",
|
|
1783
1783
|
children: i
|
|
1784
1784
|
})]
|
|
@@ -1791,7 +1791,7 @@ function Cn({ children: e, title: t, open: n, onClose: r, description: i, notDis
|
|
|
1791
1791
|
onClick: (e) => {
|
|
1792
1792
|
e.preventDefault(), e.stopPropagation(), r();
|
|
1793
1793
|
},
|
|
1794
|
-
children: /* @__PURE__ */ X(
|
|
1794
|
+
children: /* @__PURE__ */ X(ge, {})
|
|
1795
1795
|
})]
|
|
1796
1796
|
})
|
|
1797
1797
|
}),
|
|
@@ -1799,7 +1799,7 @@ function Cn({ children: e, title: t, open: n, onClose: r, description: i, notDis
|
|
|
1799
1799
|
className: "flex-1 overflow-y-auto p-6",
|
|
1800
1800
|
children: e
|
|
1801
1801
|
}),
|
|
1802
|
-
o && /* @__PURE__ */ X(
|
|
1802
|
+
o && /* @__PURE__ */ X(Ft, {
|
|
1803
1803
|
className: "m-0 flex-shrink-0 rounded-none border-t border-border bg-transparent p-6 pt-4",
|
|
1804
1804
|
children: o
|
|
1805
1805
|
})
|
|
@@ -1810,19 +1810,19 @@ function Cn({ children: e, title: t, open: n, onClose: r, description: i, notDis
|
|
|
1810
1810
|
}
|
|
1811
1811
|
//#endregion
|
|
1812
1812
|
//#region src/components/ui/radio-group.tsx
|
|
1813
|
-
function
|
|
1814
|
-
return /* @__PURE__ */ X(
|
|
1813
|
+
function Tn({ className: e, ...t }) {
|
|
1814
|
+
return /* @__PURE__ */ X(xe.Root, {
|
|
1815
1815
|
"data-slot": "radio-group",
|
|
1816
1816
|
className: Q("grid w-full gap-2", e),
|
|
1817
1817
|
...t
|
|
1818
1818
|
});
|
|
1819
1819
|
}
|
|
1820
|
-
function
|
|
1821
|
-
return /* @__PURE__ */ X(
|
|
1820
|
+
function En({ className: e, ...t }) {
|
|
1821
|
+
return /* @__PURE__ */ X(xe.Item, {
|
|
1822
1822
|
"data-slot": "radio-group-item",
|
|
1823
1823
|
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),
|
|
1824
1824
|
...t,
|
|
1825
|
-
children: /* @__PURE__ */ X(
|
|
1825
|
+
children: /* @__PURE__ */ X(xe.Indicator, {
|
|
1826
1826
|
"data-slot": "radio-group-indicator",
|
|
1827
1827
|
className: "flex size-4 items-center justify-center",
|
|
1828
1828
|
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" })
|
|
@@ -1831,9 +1831,9 @@ function Tn({ className: e, ...t }) {
|
|
|
1831
1831
|
}
|
|
1832
1832
|
//#endregion
|
|
1833
1833
|
//#region src/components/custom/card-radio-group.tsx
|
|
1834
|
-
function
|
|
1834
|
+
function Dn({ items: e, indicatorPosition: t = "end", className: r, cardClassName: i, ...a }) {
|
|
1835
1835
|
let o = n.useId();
|
|
1836
|
-
return /* @__PURE__ */ X(
|
|
1836
|
+
return /* @__PURE__ */ X(Tn, {
|
|
1837
1837
|
className: Q("gap-2", r),
|
|
1838
1838
|
...a,
|
|
1839
1839
|
children: e.map((e, n) => {
|
|
@@ -1841,7 +1841,7 @@ function En({ items: e, indicatorPosition: t = "end", className: r, cardClassNam
|
|
|
1841
1841
|
return /* @__PURE__ */ Z("label", {
|
|
1842
1842
|
htmlFor: r,
|
|
1843
1843
|
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),
|
|
1844
|
-
children: [/* @__PURE__ */ X(
|
|
1844
|
+
children: [/* @__PURE__ */ X(En, {
|
|
1845
1845
|
id: r,
|
|
1846
1846
|
value: e.value,
|
|
1847
1847
|
disabled: e.disabled,
|
|
@@ -1873,8 +1873,175 @@ function En({ items: e, indicatorPosition: t = "end", className: r, cardClassNam
|
|
|
1873
1873
|
});
|
|
1874
1874
|
}
|
|
1875
1875
|
//#endregion
|
|
1876
|
+
//#region src/components/ui/alert-dialog.tsx
|
|
1877
|
+
function On({ ...e }) {
|
|
1878
|
+
return /* @__PURE__ */ X(W.Root, {
|
|
1879
|
+
"data-slot": "alert-dialog",
|
|
1880
|
+
...e
|
|
1881
|
+
});
|
|
1882
|
+
}
|
|
1883
|
+
function kn({ ...e }) {
|
|
1884
|
+
return /* @__PURE__ */ X(W.Trigger, {
|
|
1885
|
+
"data-slot": "alert-dialog-trigger",
|
|
1886
|
+
...e
|
|
1887
|
+
});
|
|
1888
|
+
}
|
|
1889
|
+
function An({ ...e }) {
|
|
1890
|
+
return /* @__PURE__ */ X(W.Portal, {
|
|
1891
|
+
"data-slot": "alert-dialog-portal",
|
|
1892
|
+
...e
|
|
1893
|
+
});
|
|
1894
|
+
}
|
|
1895
|
+
function jn({ className: e, ...t }) {
|
|
1896
|
+
return /* @__PURE__ */ X(W.Overlay, {
|
|
1897
|
+
"data-slot": "alert-dialog-overlay",
|
|
1898
|
+
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),
|
|
1899
|
+
...t
|
|
1900
|
+
});
|
|
1901
|
+
}
|
|
1902
|
+
function Mn({ className: e, size: t = "default", ...n }) {
|
|
1903
|
+
return /* @__PURE__ */ Z(An, { children: [/* @__PURE__ */ X(jn, {}), /* @__PURE__ */ X(W.Content, {
|
|
1904
|
+
"data-slot": "alert-dialog-content",
|
|
1905
|
+
"data-size": t,
|
|
1906
|
+
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),
|
|
1907
|
+
...n
|
|
1908
|
+
})] });
|
|
1909
|
+
}
|
|
1910
|
+
function Nn({ className: e, ...t }) {
|
|
1911
|
+
return /* @__PURE__ */ X("div", {
|
|
1912
|
+
"data-slot": "alert-dialog-header",
|
|
1913
|
+
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),
|
|
1914
|
+
...t
|
|
1915
|
+
});
|
|
1916
|
+
}
|
|
1917
|
+
function Pn({ className: e, ...t }) {
|
|
1918
|
+
return /* @__PURE__ */ X("div", {
|
|
1919
|
+
"data-slot": "alert-dialog-footer",
|
|
1920
|
+
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),
|
|
1921
|
+
...t
|
|
1922
|
+
});
|
|
1923
|
+
}
|
|
1924
|
+
function Fn({ className: e, ...t }) {
|
|
1925
|
+
return /* @__PURE__ */ X("div", {
|
|
1926
|
+
"data-slot": "alert-dialog-media",
|
|
1927
|
+
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),
|
|
1928
|
+
...t
|
|
1929
|
+
});
|
|
1930
|
+
}
|
|
1931
|
+
function In({ className: e, ...t }) {
|
|
1932
|
+
return /* @__PURE__ */ X(W.Title, {
|
|
1933
|
+
"data-slot": "alert-dialog-title",
|
|
1934
|
+
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),
|
|
1935
|
+
...t
|
|
1936
|
+
});
|
|
1937
|
+
}
|
|
1938
|
+
function Ln({ className: e, ...t }) {
|
|
1939
|
+
return /* @__PURE__ */ X(W.Description, {
|
|
1940
|
+
"data-slot": "alert-dialog-description",
|
|
1941
|
+
className: Q("text-sm text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground", e),
|
|
1942
|
+
...t
|
|
1943
|
+
});
|
|
1944
|
+
}
|
|
1945
|
+
function Rn({ className: e, variant: t = "default", size: n = "default", ...r }) {
|
|
1946
|
+
return /* @__PURE__ */ X($, {
|
|
1947
|
+
variant: t,
|
|
1948
|
+
size: n,
|
|
1949
|
+
asChild: !0,
|
|
1950
|
+
children: /* @__PURE__ */ X(W.Action, {
|
|
1951
|
+
"data-slot": "alert-dialog-action",
|
|
1952
|
+
className: Q(e),
|
|
1953
|
+
...r
|
|
1954
|
+
})
|
|
1955
|
+
});
|
|
1956
|
+
}
|
|
1957
|
+
function zn({ className: e, variant: t = "outline", size: n = "default", ...r }) {
|
|
1958
|
+
return /* @__PURE__ */ X($, {
|
|
1959
|
+
variant: t,
|
|
1960
|
+
size: n,
|
|
1961
|
+
asChild: !0,
|
|
1962
|
+
children: /* @__PURE__ */ X(W.Cancel, {
|
|
1963
|
+
"data-slot": "alert-dialog-cancel",
|
|
1964
|
+
className: Q(e),
|
|
1965
|
+
...r
|
|
1966
|
+
})
|
|
1967
|
+
});
|
|
1968
|
+
}
|
|
1969
|
+
//#endregion
|
|
1970
|
+
//#region src/components/custom/confirm-prompt.tsx
|
|
1971
|
+
function Bn({ 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" }) {
|
|
1972
|
+
let [f, p] = n.useState(""), [h, g] = n.useState(!1), _ = o ?? h, v = s || _ || !(!c || f === l), y = () => {
|
|
1973
|
+
_ || (p(""), a());
|
|
1974
|
+
}, b = async () => {
|
|
1975
|
+
if (!v) try {
|
|
1976
|
+
g(!0), await i(), p("");
|
|
1977
|
+
} finally {
|
|
1978
|
+
g(!1);
|
|
1979
|
+
}
|
|
1980
|
+
};
|
|
1981
|
+
return /* @__PURE__ */ X(On, {
|
|
1982
|
+
open: !!e,
|
|
1983
|
+
onOpenChange: (e) => {
|
|
1984
|
+
e || y();
|
|
1985
|
+
},
|
|
1986
|
+
children: /* @__PURE__ */ Z(Mn, {
|
|
1987
|
+
className: "sm:max-w-lg!",
|
|
1988
|
+
children: [
|
|
1989
|
+
/* @__PURE__ */ Z(Nn, { children: [/* @__PURE__ */ Z(In, {
|
|
1990
|
+
className: "flex items-center gap-2",
|
|
1991
|
+
children: [/* @__PURE__ */ X("div", {
|
|
1992
|
+
className: "flex size-8 shrink-0 items-center justify-center rounded-full bg-amber-100 dark:bg-amber-900/30",
|
|
1993
|
+
children: /* @__PURE__ */ X(m, { className: "size-5 text-amber-600 dark:text-amber-500" })
|
|
1994
|
+
}), t]
|
|
1995
|
+
}), r != null && /* @__PURE__ */ X(Ln, { children: r })] }),
|
|
1996
|
+
c && /* @__PURE__ */ Z("div", {
|
|
1997
|
+
className: "space-y-1",
|
|
1998
|
+
children: [/* @__PURE__ */ Z(Ln, { children: [
|
|
1999
|
+
"To confirm, type",
|
|
2000
|
+
" ",
|
|
2001
|
+
/* @__PURE__ */ Z("span", {
|
|
2002
|
+
className: "font-semibold text-foreground",
|
|
2003
|
+
children: [
|
|
2004
|
+
"“",
|
|
2005
|
+
l,
|
|
2006
|
+
"”"
|
|
2007
|
+
]
|
|
2008
|
+
}),
|
|
2009
|
+
" ",
|
|
2010
|
+
"in the box below"
|
|
2011
|
+
] }), /* @__PURE__ */ X(Ct, {
|
|
2012
|
+
value: f,
|
|
2013
|
+
onChange: (e) => p(e.target.value),
|
|
2014
|
+
size: "sm",
|
|
2015
|
+
autoComplete: "off",
|
|
2016
|
+
autoCapitalize: "off",
|
|
2017
|
+
spellCheck: !1,
|
|
2018
|
+
disabled: _,
|
|
2019
|
+
onKeyDown: (e) => {
|
|
2020
|
+
e.key === "Enter" && b();
|
|
2021
|
+
}
|
|
2022
|
+
})]
|
|
2023
|
+
}),
|
|
2024
|
+
/* @__PURE__ */ Z(Pn, {
|
|
2025
|
+
className: "gap-2 space-x-0!",
|
|
2026
|
+
children: [/* @__PURE__ */ X($, {
|
|
2027
|
+
variant: "outline",
|
|
2028
|
+
onClick: y,
|
|
2029
|
+
disabled: _,
|
|
2030
|
+
children: d
|
|
2031
|
+
}), /* @__PURE__ */ X($, {
|
|
2032
|
+
onClick: b,
|
|
2033
|
+
className: Q("bg-red-500 text-white hover:bg-red-600"),
|
|
2034
|
+
disabled: v,
|
|
2035
|
+
children: _ ? /* @__PURE__ */ X(ne, { className: "size-4 animate-spin" }) : u
|
|
2036
|
+
})]
|
|
2037
|
+
})
|
|
2038
|
+
]
|
|
2039
|
+
})
|
|
2040
|
+
});
|
|
2041
|
+
}
|
|
2042
|
+
//#endregion
|
|
1876
2043
|
//#region src/components/ui/badge.tsx
|
|
1877
|
-
var
|
|
2044
|
+
var Vn = U("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!", {
|
|
1878
2045
|
variants: { variant: {
|
|
1879
2046
|
default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80",
|
|
1880
2047
|
secondary: "bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",
|
|
@@ -1895,34 +2062,34 @@ var Dn = W("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-cent
|
|
|
1895
2062
|
} },
|
|
1896
2063
|
defaultVariants: { variant: "default" }
|
|
1897
2064
|
});
|
|
1898
|
-
function
|
|
1899
|
-
return /* @__PURE__ */ X(n ?
|
|
2065
|
+
function Hn({ className: e, variant: t = "default", asChild: n = !1, ...r }) {
|
|
2066
|
+
return /* @__PURE__ */ X(n ? we.Root : "span", {
|
|
1900
2067
|
"data-slot": "badge",
|
|
1901
2068
|
"data-variant": t,
|
|
1902
|
-
className: Q(
|
|
2069
|
+
className: Q(Vn({ variant: t }), e),
|
|
1903
2070
|
...r
|
|
1904
2071
|
});
|
|
1905
2072
|
}
|
|
1906
2073
|
//#endregion
|
|
1907
2074
|
//#region src/components/custom/custom-tabs.tsx
|
|
1908
|
-
function
|
|
1909
|
-
return /* @__PURE__ */ X(
|
|
2075
|
+
function Un({ type: e = "underline", items: t, className: n, listClassName: r, ...i }) {
|
|
2076
|
+
return /* @__PURE__ */ X(Ee.Root, {
|
|
1910
2077
|
"data-slot": "custom-tabs",
|
|
1911
2078
|
"data-type": e,
|
|
1912
2079
|
className: Q("flex flex-col gap-2", n),
|
|
1913
2080
|
...i,
|
|
1914
|
-
children: /* @__PURE__ */ X(
|
|
2081
|
+
children: /* @__PURE__ */ X(Ee.List, {
|
|
1915
2082
|
"data-slot": "custom-tabs-list",
|
|
1916
2083
|
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),
|
|
1917
|
-
children: t.map((t) => /* @__PURE__ */ X(
|
|
2084
|
+
children: t.map((t) => /* @__PURE__ */ X(Wn, {
|
|
1918
2085
|
type: e,
|
|
1919
2086
|
item: t
|
|
1920
2087
|
}, t.value))
|
|
1921
2088
|
})
|
|
1922
2089
|
});
|
|
1923
2090
|
}
|
|
1924
|
-
function
|
|
1925
|
-
return /* @__PURE__ */ Z(
|
|
2091
|
+
function Wn({ type: e, item: t }) {
|
|
2092
|
+
return /* @__PURE__ */ Z(Ee.Trigger, {
|
|
1926
2093
|
"data-slot": "custom-tabs-trigger",
|
|
1927
2094
|
value: t.value,
|
|
1928
2095
|
disabled: t.disabled,
|
|
@@ -1934,7 +2101,7 @@ function An({ type: e, item: t }) {
|
|
|
1934
2101
|
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"),
|
|
1935
2102
|
children: t.count
|
|
1936
2103
|
}),
|
|
1937
|
-
t.badge != null && /* @__PURE__ */ X(
|
|
2104
|
+
t.badge != null && /* @__PURE__ */ X(Hn, {
|
|
1938
2105
|
className: "px-2 text-[10px]",
|
|
1939
2106
|
children: t.badge
|
|
1940
2107
|
})
|
|
@@ -1943,7 +2110,7 @@ function An({ type: e, item: t }) {
|
|
|
1943
2110
|
}
|
|
1944
2111
|
//#endregion
|
|
1945
2112
|
//#region src/components/custom/def-row.tsx
|
|
1946
|
-
function
|
|
2113
|
+
function Gn({ label: e, value: t, className: n, ...r }) {
|
|
1947
2114
|
return /* @__PURE__ */ Z("div", {
|
|
1948
2115
|
"data-slot": "def-row",
|
|
1949
2116
|
className: Q("flex items-center justify-between gap-4 py-2", n),
|
|
@@ -1959,64 +2126,47 @@ function jn({ label: e, value: t, className: n, ...r }) {
|
|
|
1959
2126
|
}
|
|
1960
2127
|
//#endregion
|
|
1961
2128
|
//#region src/components/custom/faceted-filter.tsx
|
|
1962
|
-
function
|
|
1963
|
-
let { title: t, options: r, searchPlaceholder: i, searchable: a = !0,
|
|
1964
|
-
if (
|
|
1965
|
-
let n = new Set(
|
|
2129
|
+
function Kn(e) {
|
|
2130
|
+
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) => {
|
|
2131
|
+
if (s) {
|
|
2132
|
+
let n = new Set(c);
|
|
1966
2133
|
n.has(t) ? n.delete(t) : n.add(t), e.onChange(Array.from(n));
|
|
1967
2134
|
} else {
|
|
1968
2135
|
let n = e.onChange;
|
|
1969
|
-
n(
|
|
2136
|
+
n(c.has(t) ? null : t);
|
|
1970
2137
|
}
|
|
1971
|
-
}
|
|
1972
|
-
|
|
1973
|
-
}, f = r.filter((e) => l.has(e.value));
|
|
1974
|
-
return /* @__PURE__ */ Z(nn, { children: [/* @__PURE__ */ X(rn, {
|
|
2138
|
+
};
|
|
2139
|
+
return /* @__PURE__ */ Z(rn, { children: [/* @__PURE__ */ X(an, {
|
|
1975
2140
|
asChild: !0,
|
|
1976
2141
|
children: /* @__PURE__ */ Z($, {
|
|
1977
2142
|
variant: "outline",
|
|
1978
|
-
className: Q("w-fit border-dashed",
|
|
2143
|
+
className: Q("w-fit border-dashed", o),
|
|
1979
2144
|
children: [
|
|
1980
|
-
/* @__PURE__ */ X(
|
|
2145
|
+
/* @__PURE__ */ X(se, {}),
|
|
1981
2146
|
t,
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
children: l.size
|
|
1991
|
-
}),
|
|
1992
|
-
/* @__PURE__ */ X("div", {
|
|
1993
|
-
className: "hidden gap-1 lg:flex",
|
|
1994
|
-
children: l.size > o ? /* @__PURE__ */ Z(On, {
|
|
1995
|
-
variant: "secondary",
|
|
1996
|
-
className: "rounded-sm px-1 font-normal",
|
|
1997
|
-
children: [l.size, " selected"]
|
|
1998
|
-
}) : f.map((e) => /* @__PURE__ */ X(On, {
|
|
1999
|
-
variant: "secondary",
|
|
2000
|
-
className: "rounded-sm px-1 font-normal",
|
|
2001
|
-
children: e.label
|
|
2002
|
-
}, e.value))
|
|
2003
|
-
})
|
|
2004
|
-
] })
|
|
2147
|
+
c.size > 0 && /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X(ut, {
|
|
2148
|
+
orientation: "vertical",
|
|
2149
|
+
className: "mx-0.5 h-4"
|
|
2150
|
+
}), /* @__PURE__ */ X(Hn, {
|
|
2151
|
+
variant: "secondary",
|
|
2152
|
+
className: "rounded-sm px-1 font-normal",
|
|
2153
|
+
children: c.size
|
|
2154
|
+
})] })
|
|
2005
2155
|
]
|
|
2006
2156
|
})
|
|
2007
|
-
}), /* @__PURE__ */ X(
|
|
2157
|
+
}), /* @__PURE__ */ X(on, {
|
|
2008
2158
|
className: "w-56 p-0",
|
|
2009
2159
|
align: "start",
|
|
2010
|
-
children: /* @__PURE__ */ Z(
|
|
2011
|
-
/* @__PURE__ */ X(
|
|
2012
|
-
/* @__PURE__ */ X(
|
|
2013
|
-
let t =
|
|
2014
|
-
return /* @__PURE__ */ Z(
|
|
2015
|
-
onSelect: () =>
|
|
2160
|
+
children: /* @__PURE__ */ Z(Jt, { children: [a && /* @__PURE__ */ X(Xt, { placeholder: i ?? t }), /* @__PURE__ */ Z(Zt, { children: [
|
|
2161
|
+
/* @__PURE__ */ X(Qt, { children: "No results found." }),
|
|
2162
|
+
/* @__PURE__ */ X($t, { children: r.map((e) => {
|
|
2163
|
+
let t = c.has(e.value);
|
|
2164
|
+
return /* @__PURE__ */ Z(tn, {
|
|
2165
|
+
onSelect: () => l(e.value),
|
|
2016
2166
|
children: [
|
|
2017
2167
|
/* @__PURE__ */ X("div", {
|
|
2018
|
-
className: Q("flex size-4 items-center justify-center rounded-[4px] border",
|
|
2019
|
-
children: /* @__PURE__ */ X(
|
|
2168
|
+
className: Q("flex size-4 items-center justify-center rounded-[4px] border", s ? "rounded-[4px]" : "rounded-full", t ? "border-primary bg-primary text-primary-foreground" : "border-input [&_svg]:invisible"),
|
|
2169
|
+
children: /* @__PURE__ */ X(_, { className: "size-3" })
|
|
2020
2170
|
}),
|
|
2021
2171
|
e.icon && /* @__PURE__ */ X("span", {
|
|
2022
2172
|
className: "text-muted-foreground [&_svg]:size-4",
|
|
@@ -2030,8 +2180,10 @@ function Mn(e) {
|
|
|
2030
2180
|
]
|
|
2031
2181
|
}, e.value);
|
|
2032
2182
|
}) }),
|
|
2033
|
-
|
|
2034
|
-
onSelect:
|
|
2183
|
+
c.size > 0 && /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X(en, {}), /* @__PURE__ */ X($t, { children: /* @__PURE__ */ X(tn, {
|
|
2184
|
+
onSelect: () => {
|
|
2185
|
+
s ? e.onChange([]) : e.onChange(null);
|
|
2186
|
+
},
|
|
2035
2187
|
className: "justify-center text-center",
|
|
2036
2188
|
children: "Clear filters"
|
|
2037
2189
|
}) })] })
|
|
@@ -2039,8 +2191,148 @@ function Mn(e) {
|
|
|
2039
2191
|
})] });
|
|
2040
2192
|
}
|
|
2041
2193
|
//#endregion
|
|
2194
|
+
//#region src/components/custom/list-card.tsx
|
|
2195
|
+
function qn({ name: e, src: t, className: n }) {
|
|
2196
|
+
let r = e.split(/\s+/).slice(0, 2).map((e) => e[0]?.toUpperCase() ?? "").join("");
|
|
2197
|
+
return /* @__PURE__ */ Z("span", {
|
|
2198
|
+
className: Q("flex min-w-0 items-center gap-1.5 text-xs text-muted-foreground", n),
|
|
2199
|
+
children: [/* @__PURE__ */ X("span", {
|
|
2200
|
+
className: "flex size-5 shrink-0 items-center justify-center overflow-hidden rounded-full bg-muted text-[10px] font-semibold text-foreground",
|
|
2201
|
+
children: t ? /* @__PURE__ */ X("img", {
|
|
2202
|
+
src: t,
|
|
2203
|
+
alt: e,
|
|
2204
|
+
className: "size-full object-cover"
|
|
2205
|
+
}) : r
|
|
2206
|
+
}), /* @__PURE__ */ X("span", {
|
|
2207
|
+
className: "truncate",
|
|
2208
|
+
children: e
|
|
2209
|
+
})]
|
|
2210
|
+
});
|
|
2211
|
+
}
|
|
2212
|
+
function Jn({ icon: e, children: t, className: n }) {
|
|
2213
|
+
return /* @__PURE__ */ Z("span", {
|
|
2214
|
+
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),
|
|
2215
|
+
children: [e, /* @__PURE__ */ X("span", {
|
|
2216
|
+
className: "truncate",
|
|
2217
|
+
children: t
|
|
2218
|
+
})]
|
|
2219
|
+
});
|
|
2220
|
+
}
|
|
2221
|
+
function Yn({ 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 }) {
|
|
2222
|
+
let g = p != null, _ = s === "row", v = l ? /* @__PURE__ */ X(pn, {
|
|
2223
|
+
checked: u,
|
|
2224
|
+
onCheckedChange: (e) => d?.(e === !0),
|
|
2225
|
+
onClick: (e) => e.stopPropagation(),
|
|
2226
|
+
"aria-label": "Select card",
|
|
2227
|
+
className: "shrink-0"
|
|
2228
|
+
}) : null, y = typeof n == "string" ? /* @__PURE__ */ X("img", {
|
|
2229
|
+
src: n,
|
|
2230
|
+
alt: "",
|
|
2231
|
+
className: "size-12 shrink-0 rounded-md object-cover"
|
|
2232
|
+
}) : n, b = r == null ? null : typeof r == "string" || typeof r == "number" ? /* @__PURE__ */ X(Hn, {
|
|
2233
|
+
variant: "secondary",
|
|
2234
|
+
className: "font-medium",
|
|
2235
|
+
children: r
|
|
2236
|
+
}) : r, x = Array.isArray(o) ? /* @__PURE__ */ X(ct, {
|
|
2237
|
+
items: o,
|
|
2238
|
+
align: "end"
|
|
2239
|
+
}) : 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 = {
|
|
2240
|
+
"data-slot": "list-card",
|
|
2241
|
+
"data-active": f || void 0,
|
|
2242
|
+
onClick: p,
|
|
2243
|
+
role: g ? "button" : void 0,
|
|
2244
|
+
tabIndex: g ? 0 : void 0,
|
|
2245
|
+
...h
|
|
2246
|
+
};
|
|
2247
|
+
return _ ? /* @__PURE__ */ Z("div", {
|
|
2248
|
+
className: Q("flex items-start gap-3", S),
|
|
2249
|
+
...C,
|
|
2250
|
+
children: [
|
|
2251
|
+
v,
|
|
2252
|
+
y,
|
|
2253
|
+
/* @__PURE__ */ Z("div", {
|
|
2254
|
+
className: "min-w-0 flex-1",
|
|
2255
|
+
children: [
|
|
2256
|
+
/* @__PURE__ */ Z("div", {
|
|
2257
|
+
className: "flex min-w-0 items-start gap-2",
|
|
2258
|
+
children: [/* @__PURE__ */ X("p", {
|
|
2259
|
+
className: "min-w-0 truncate font-medium text-sm",
|
|
2260
|
+
children: e
|
|
2261
|
+
}), b]
|
|
2262
|
+
}),
|
|
2263
|
+
t != null && /* @__PURE__ */ X("p", {
|
|
2264
|
+
className: "truncate text-xs text-muted-foreground",
|
|
2265
|
+
children: t
|
|
2266
|
+
}),
|
|
2267
|
+
(a != null || i != null) && /* @__PURE__ */ Z("div", {
|
|
2268
|
+
className: "mt-1 flex min-w-0 flex-wrap items-center gap-2",
|
|
2269
|
+
children: [i != null && /* @__PURE__ */ X("span", {
|
|
2270
|
+
className: "text-xs text-muted-foreground",
|
|
2271
|
+
children: i
|
|
2272
|
+
}), a]
|
|
2273
|
+
})
|
|
2274
|
+
]
|
|
2275
|
+
}),
|
|
2276
|
+
x != null && /* @__PURE__ */ X("div", {
|
|
2277
|
+
className: "shrink-0",
|
|
2278
|
+
onClick: (e) => e.stopPropagation(),
|
|
2279
|
+
children: x
|
|
2280
|
+
})
|
|
2281
|
+
]
|
|
2282
|
+
}) : /* @__PURE__ */ Z("div", {
|
|
2283
|
+
className: Q("flex flex-col gap-3", S),
|
|
2284
|
+
...C,
|
|
2285
|
+
children: [
|
|
2286
|
+
(v != null || b != null || x != null) && /* @__PURE__ */ Z("div", {
|
|
2287
|
+
className: "flex items-start justify-between gap-2",
|
|
2288
|
+
children: [/* @__PURE__ */ Z("div", {
|
|
2289
|
+
className: "flex min-w-0 items-center gap-2",
|
|
2290
|
+
children: [v, b]
|
|
2291
|
+
}), x != null && /* @__PURE__ */ X("div", {
|
|
2292
|
+
className: "-mt-1 -mr-1 shrink-0",
|
|
2293
|
+
onClick: (e) => e.stopPropagation(),
|
|
2294
|
+
children: x
|
|
2295
|
+
})]
|
|
2296
|
+
}),
|
|
2297
|
+
/* @__PURE__ */ Z("div", {
|
|
2298
|
+
className: "flex min-w-0 items-start gap-3",
|
|
2299
|
+
children: [y, /* @__PURE__ */ Z("div", {
|
|
2300
|
+
className: "min-w-0 flex-1",
|
|
2301
|
+
children: [/* @__PURE__ */ X("p", {
|
|
2302
|
+
className: "font-medium text-sm leading-snug",
|
|
2303
|
+
children: e
|
|
2304
|
+
}), t != null && /* @__PURE__ */ X("p", {
|
|
2305
|
+
className: "mt-1 text-xs leading-relaxed text-muted-foreground",
|
|
2306
|
+
children: t
|
|
2307
|
+
})]
|
|
2308
|
+
})]
|
|
2309
|
+
}),
|
|
2310
|
+
(a != null || i != null) && /* @__PURE__ */ Z("div", {
|
|
2311
|
+
className: "mt-auto flex min-w-0 flex-wrap items-center gap-x-2 gap-y-1 border-t pt-3",
|
|
2312
|
+
children: [i != null && /* @__PURE__ */ X("span", {
|
|
2313
|
+
className: "text-xs text-muted-foreground",
|
|
2314
|
+
children: i
|
|
2315
|
+
}), a]
|
|
2316
|
+
})
|
|
2317
|
+
]
|
|
2318
|
+
});
|
|
2319
|
+
}
|
|
2320
|
+
var Xn = {
|
|
2321
|
+
1: "grid-cols-1",
|
|
2322
|
+
2: "grid-cols-1 sm:grid-cols-2",
|
|
2323
|
+
3: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",
|
|
2324
|
+
4: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-4"
|
|
2325
|
+
};
|
|
2326
|
+
function Zn({ columns: e = 3, className: t, ...n }) {
|
|
2327
|
+
return /* @__PURE__ */ X("div", {
|
|
2328
|
+
"data-slot": "list-card-grid",
|
|
2329
|
+
className: Q("grid w-full gap-4", Xn[e], t),
|
|
2330
|
+
...n
|
|
2331
|
+
});
|
|
2332
|
+
}
|
|
2333
|
+
//#endregion
|
|
2042
2334
|
//#region src/components/custom/quick-stat.tsx
|
|
2043
|
-
function
|
|
2335
|
+
function Qn({ icon: e, value: t, label: n, className: r, ...i }) {
|
|
2044
2336
|
return /* @__PURE__ */ Z("div", {
|
|
2045
2337
|
"data-slot": "quick-stat",
|
|
2046
2338
|
className: Q("flex items-center gap-1.5 text-sm", r),
|
|
@@ -2063,7 +2355,7 @@ function Nn({ icon: e, value: t, label: n, className: r, ...i }) {
|
|
|
2063
2355
|
}
|
|
2064
2356
|
//#endregion
|
|
2065
2357
|
//#region src/components/ui/card.tsx
|
|
2066
|
-
var
|
|
2358
|
+
var $n = U("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", {
|
|
2067
2359
|
variants: { variant: {
|
|
2068
2360
|
default: "bg-card text-card-foreground ring-foreground/10",
|
|
2069
2361
|
alt: "bg-muted/40 text-card-foreground ring-foreground/10",
|
|
@@ -2074,51 +2366,51 @@ var Pn = W("group/card flex flex-col gap-4 overflow-hidden rounded-xl py-4 text-
|
|
|
2074
2366
|
} },
|
|
2075
2367
|
defaultVariants: { variant: "default" }
|
|
2076
2368
|
});
|
|
2077
|
-
function
|
|
2369
|
+
function er({ className: e, size: t = "default", variant: n = "default", ...r }) {
|
|
2078
2370
|
return /* @__PURE__ */ X("div", {
|
|
2079
2371
|
"data-slot": "card",
|
|
2080
2372
|
"data-size": t,
|
|
2081
2373
|
"data-variant": n,
|
|
2082
|
-
className: Q(
|
|
2374
|
+
className: Q($n({ variant: n }), e),
|
|
2083
2375
|
...r
|
|
2084
2376
|
});
|
|
2085
2377
|
}
|
|
2086
|
-
function
|
|
2378
|
+
function tr({ className: e, ...t }) {
|
|
2087
2379
|
return /* @__PURE__ */ X("div", {
|
|
2088
2380
|
"data-slot": "card-header",
|
|
2089
2381
|
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),
|
|
2090
2382
|
...t
|
|
2091
2383
|
});
|
|
2092
2384
|
}
|
|
2093
|
-
function
|
|
2385
|
+
function nr({ className: e, ...t }) {
|
|
2094
2386
|
return /* @__PURE__ */ X("div", {
|
|
2095
2387
|
"data-slot": "card-title",
|
|
2096
2388
|
className: Q("text-base leading-snug font-medium group-data-[size=sm]/card:text-sm", e),
|
|
2097
2389
|
...t
|
|
2098
2390
|
});
|
|
2099
2391
|
}
|
|
2100
|
-
function
|
|
2392
|
+
function rr({ className: e, ...t }) {
|
|
2101
2393
|
return /* @__PURE__ */ X("div", {
|
|
2102
2394
|
"data-slot": "card-description",
|
|
2103
2395
|
className: Q("text-sm text-muted-foreground", e),
|
|
2104
2396
|
...t
|
|
2105
2397
|
});
|
|
2106
2398
|
}
|
|
2107
|
-
function
|
|
2399
|
+
function ir({ className: e, ...t }) {
|
|
2108
2400
|
return /* @__PURE__ */ X("div", {
|
|
2109
2401
|
"data-slot": "card-action",
|
|
2110
2402
|
className: Q("col-start-2 row-span-2 row-start-1 self-start justify-self-end", e),
|
|
2111
2403
|
...t
|
|
2112
2404
|
});
|
|
2113
2405
|
}
|
|
2114
|
-
function
|
|
2406
|
+
function ar({ className: e, ...t }) {
|
|
2115
2407
|
return /* @__PURE__ */ X("div", {
|
|
2116
2408
|
"data-slot": "card-content",
|
|
2117
2409
|
className: Q("px-4 group-data-[size=sm]/card:px-3", e),
|
|
2118
2410
|
...t
|
|
2119
2411
|
});
|
|
2120
2412
|
}
|
|
2121
|
-
function
|
|
2413
|
+
function or({ className: e, ...t }) {
|
|
2122
2414
|
return /* @__PURE__ */ X("div", {
|
|
2123
2415
|
"data-slot": "card-footer",
|
|
2124
2416
|
className: Q("flex items-center rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/card:p-3", e),
|
|
@@ -2127,7 +2419,7 @@ function Vn({ className: e, ...t }) {
|
|
|
2127
2419
|
}
|
|
2128
2420
|
//#endregion
|
|
2129
2421
|
//#region src/components/custom/sensor-card.tsx
|
|
2130
|
-
var
|
|
2422
|
+
var sr = {
|
|
2131
2423
|
primary: {
|
|
2132
2424
|
text: "text-primary",
|
|
2133
2425
|
bg: "bg-primary"
|
|
@@ -2145,8 +2437,8 @@ var Hn = {
|
|
|
2145
2437
|
bg: "bg-muted-foreground"
|
|
2146
2438
|
}
|
|
2147
2439
|
};
|
|
2148
|
-
function
|
|
2149
|
-
let h =
|
|
2440
|
+
function cr({ 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 }) {
|
|
2441
|
+
let h = sr[a], g = sr[o ?? a], _ = s ? sr[s].text : "text-foreground", v = u ? "size-10" : "size-5", y = e ?? (t?.toLowerCase() === "auto" ? /* @__PURE__ */ X(V, { className: Q(v, h.text) }) : /* @__PURE__ */ X(E, { className: Q(v, h.text) })), b = /* @__PURE__ */ Z(Y, { children: [u ? /* @__PURE__ */ Z("div", {
|
|
2150
2442
|
className: "flex items-center gap-3",
|
|
2151
2443
|
children: [y, /* @__PURE__ */ Z("div", {
|
|
2152
2444
|
className: "flex flex-col",
|
|
@@ -2188,7 +2480,7 @@ function Un({ icon: e, mode: t, description: n, value: r, showAccent: i = !1, co
|
|
|
2188
2480
|
children: c && r !== "" && !isNaN(Number(r)) ? `${r}%` : r
|
|
2189
2481
|
})]
|
|
2190
2482
|
})] }), 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);
|
|
2191
|
-
return d === "standalone" ? /* @__PURE__ */ X(
|
|
2483
|
+
return d === "standalone" ? /* @__PURE__ */ X(er, {
|
|
2192
2484
|
className: "p-0",
|
|
2193
2485
|
onClick: f,
|
|
2194
2486
|
children: /* @__PURE__ */ X("div", {
|
|
@@ -2203,51 +2495,51 @@ function Un({ icon: e, mode: t, description: n, value: r, showAccent: i = !1, co
|
|
|
2203
2495
|
}
|
|
2204
2496
|
//#endregion
|
|
2205
2497
|
//#region src/components/ui/sheet.tsx
|
|
2206
|
-
function
|
|
2207
|
-
return /* @__PURE__ */ X(
|
|
2498
|
+
function lr({ ...e }) {
|
|
2499
|
+
return /* @__PURE__ */ X(G.Root, {
|
|
2208
2500
|
"data-slot": "sheet",
|
|
2209
2501
|
...e
|
|
2210
2502
|
});
|
|
2211
2503
|
}
|
|
2212
|
-
function
|
|
2213
|
-
return /* @__PURE__ */ X(
|
|
2504
|
+
function ur({ ...e }) {
|
|
2505
|
+
return /* @__PURE__ */ X(G.Trigger, {
|
|
2214
2506
|
"data-slot": "sheet-trigger",
|
|
2215
2507
|
...e
|
|
2216
2508
|
});
|
|
2217
2509
|
}
|
|
2218
|
-
function
|
|
2219
|
-
return /* @__PURE__ */ X(
|
|
2510
|
+
function dr({ ...e }) {
|
|
2511
|
+
return /* @__PURE__ */ X(G.Close, {
|
|
2220
2512
|
"data-slot": "sheet-close",
|
|
2221
2513
|
...e
|
|
2222
2514
|
});
|
|
2223
2515
|
}
|
|
2224
|
-
function
|
|
2225
|
-
return /* @__PURE__ */ X(
|
|
2516
|
+
function fr({ ...e }) {
|
|
2517
|
+
return /* @__PURE__ */ X(G.Portal, {
|
|
2226
2518
|
"data-slot": "sheet-portal",
|
|
2227
2519
|
...e
|
|
2228
2520
|
});
|
|
2229
2521
|
}
|
|
2230
|
-
function
|
|
2231
|
-
return /* @__PURE__ */ X(
|
|
2522
|
+
function pr({ className: e, ...t }) {
|
|
2523
|
+
return /* @__PURE__ */ X(G.Overlay, {
|
|
2232
2524
|
"data-slot": "sheet-overlay",
|
|
2233
2525
|
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),
|
|
2234
2526
|
...t
|
|
2235
2527
|
});
|
|
2236
2528
|
}
|
|
2237
|
-
function
|
|
2238
|
-
return /* @__PURE__ */ Z(
|
|
2529
|
+
function mr({ className: e, children: t, side: n = "right", showCloseButton: r = !0, ...i }) {
|
|
2530
|
+
return /* @__PURE__ */ Z(fr, { children: [/* @__PURE__ */ X(pr, {}), /* @__PURE__ */ Z(G.Content, {
|
|
2239
2531
|
"data-slot": "sheet-content",
|
|
2240
2532
|
"data-side": n,
|
|
2241
2533
|
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),
|
|
2242
2534
|
...i,
|
|
2243
|
-
children: [t, r && /* @__PURE__ */ X(
|
|
2535
|
+
children: [t, r && /* @__PURE__ */ X(G.Close, {
|
|
2244
2536
|
"data-slot": "sheet-close",
|
|
2245
2537
|
asChild: !0,
|
|
2246
2538
|
children: /* @__PURE__ */ Z($, {
|
|
2247
2539
|
variant: "ghost",
|
|
2248
2540
|
className: "absolute top-3 right-3",
|
|
2249
2541
|
size: "icon-sm",
|
|
2250
|
-
children: [/* @__PURE__ */ X(
|
|
2542
|
+
children: [/* @__PURE__ */ X(ge, {}), /* @__PURE__ */ X("span", {
|
|
2251
2543
|
className: "sr-only",
|
|
2252
2544
|
children: "Close"
|
|
2253
2545
|
})]
|
|
@@ -2255,29 +2547,29 @@ function Yn({ className: e, children: t, side: n = "right", showCloseButton: r =
|
|
|
2255
2547
|
})]
|
|
2256
2548
|
})] });
|
|
2257
2549
|
}
|
|
2258
|
-
function
|
|
2550
|
+
function hr({ className: e, ...t }) {
|
|
2259
2551
|
return /* @__PURE__ */ X("div", {
|
|
2260
2552
|
"data-slot": "sheet-header",
|
|
2261
2553
|
className: Q("flex flex-col gap-0.5 p-4", e),
|
|
2262
2554
|
...t
|
|
2263
2555
|
});
|
|
2264
2556
|
}
|
|
2265
|
-
function
|
|
2557
|
+
function gr({ className: e, ...t }) {
|
|
2266
2558
|
return /* @__PURE__ */ X("div", {
|
|
2267
2559
|
"data-slot": "sheet-footer",
|
|
2268
2560
|
className: Q("mt-auto flex flex-col gap-2 p-4", e),
|
|
2269
2561
|
...t
|
|
2270
2562
|
});
|
|
2271
2563
|
}
|
|
2272
|
-
function
|
|
2273
|
-
return /* @__PURE__ */ X(
|
|
2564
|
+
function _r({ className: e, ...t }) {
|
|
2565
|
+
return /* @__PURE__ */ X(G.Title, {
|
|
2274
2566
|
"data-slot": "sheet-title",
|
|
2275
2567
|
className: Q("text-base font-medium text-foreground", e),
|
|
2276
2568
|
...t
|
|
2277
2569
|
});
|
|
2278
2570
|
}
|
|
2279
|
-
function
|
|
2280
|
-
return /* @__PURE__ */ X(
|
|
2571
|
+
function vr({ className: e, ...t }) {
|
|
2572
|
+
return /* @__PURE__ */ X(G.Description, {
|
|
2281
2573
|
"data-slot": "sheet-description",
|
|
2282
2574
|
className: Q("text-sm text-muted-foreground", e),
|
|
2283
2575
|
...t
|
|
@@ -2285,17 +2577,17 @@ function $n({ className: e, ...t }) {
|
|
|
2285
2577
|
}
|
|
2286
2578
|
//#endregion
|
|
2287
2579
|
//#region src/components/custom/side-sheet.tsx
|
|
2288
|
-
function
|
|
2580
|
+
function yr({ children: e, title: t, open: n, onClose: r, description: i, side: a = "right", floating: o, onBack: s, notDismissable: c, footer: l, className: u }) {
|
|
2289
2581
|
let d = s !== void 0;
|
|
2290
|
-
return /* @__PURE__ */ X(
|
|
2582
|
+
return /* @__PURE__ */ X(lr, {
|
|
2291
2583
|
open: n,
|
|
2292
2584
|
onOpenChange: c ? void 0 : (e) => !e && r(),
|
|
2293
|
-
children: /* @__PURE__ */ Z(
|
|
2585
|
+
children: /* @__PURE__ */ Z(mr, {
|
|
2294
2586
|
side: a,
|
|
2295
2587
|
showCloseButton: !1,
|
|
2296
2588
|
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),
|
|
2297
2589
|
children: [
|
|
2298
|
-
/* @__PURE__ */ Z(
|
|
2590
|
+
/* @__PURE__ */ Z(hr, {
|
|
2299
2591
|
className: "shrink-0 flex-row items-center gap-2 border-b border-border px-4 py-3",
|
|
2300
2592
|
children: [/* @__PURE__ */ X($, {
|
|
2301
2593
|
type: "button",
|
|
@@ -2306,13 +2598,13 @@ function er({ children: e, title: t, open: n, onClose: r, description: i, side:
|
|
|
2306
2598
|
onClick: (e) => {
|
|
2307
2599
|
e.preventDefault(), e.stopPropagation(), (d ? s : r)();
|
|
2308
2600
|
},
|
|
2309
|
-
children: X(d ?
|
|
2601
|
+
children: X(d ? b : ge, {})
|
|
2310
2602
|
}), /* @__PURE__ */ Z("div", {
|
|
2311
2603
|
className: "flex min-w-0 flex-col",
|
|
2312
|
-
children: [/* @__PURE__ */ X(
|
|
2604
|
+
children: [/* @__PURE__ */ X(_r, {
|
|
2313
2605
|
className: "truncate text-left text-lg font-semibold",
|
|
2314
2606
|
children: t
|
|
2315
|
-
}), i && /* @__PURE__ */ X(
|
|
2607
|
+
}), i && /* @__PURE__ */ X(vr, {
|
|
2316
2608
|
className: "text-left",
|
|
2317
2609
|
children: i
|
|
2318
2610
|
})]
|
|
@@ -2330,7 +2622,7 @@ function er({ children: e, title: t, open: n, onClose: r, description: i, side:
|
|
|
2330
2622
|
})
|
|
2331
2623
|
});
|
|
2332
2624
|
}
|
|
2333
|
-
function
|
|
2625
|
+
function br({ label: e, action: t, className: n, children: r, ...i }) {
|
|
2334
2626
|
return /* @__PURE__ */ Z("div", {
|
|
2335
2627
|
"data-slot": "side-sheet-section",
|
|
2336
2628
|
...i,
|
|
@@ -2352,7 +2644,7 @@ function tr({ label: e, action: t, className: n, children: r, ...i }) {
|
|
|
2352
2644
|
}
|
|
2353
2645
|
//#endregion
|
|
2354
2646
|
//#region src/components/custom/stat-card.tsx
|
|
2355
|
-
var
|
|
2647
|
+
var xr = {
|
|
2356
2648
|
primary: {
|
|
2357
2649
|
text: "text-primary",
|
|
2358
2650
|
bg: "bg-primary",
|
|
@@ -2379,14 +2671,14 @@ var nr = {
|
|
|
2379
2671
|
soft: "bg-muted"
|
|
2380
2672
|
}
|
|
2381
2673
|
};
|
|
2382
|
-
function
|
|
2674
|
+
function Sr({ data: e, colorVar: t }) {
|
|
2383
2675
|
let r = n.useId().replace(/:/g, "");
|
|
2384
2676
|
return /* @__PURE__ */ X("div", {
|
|
2385
2677
|
className: "mt-3 h-16 w-full",
|
|
2386
|
-
children: /* @__PURE__ */ X(
|
|
2678
|
+
children: /* @__PURE__ */ X(Pe, {
|
|
2387
2679
|
width: "100%",
|
|
2388
2680
|
height: "100%",
|
|
2389
|
-
children: /* @__PURE__ */ Z(
|
|
2681
|
+
children: /* @__PURE__ */ Z(Ne, {
|
|
2390
2682
|
data: e.map((e, t) => ({
|
|
2391
2683
|
x: t,
|
|
2392
2684
|
y: e
|
|
@@ -2412,7 +2704,7 @@ function rr({ data: e, colorVar: t }) {
|
|
|
2412
2704
|
stopColor: t,
|
|
2413
2705
|
stopOpacity: 0
|
|
2414
2706
|
})]
|
|
2415
|
-
}) }), /* @__PURE__ */ X(
|
|
2707
|
+
}) }), /* @__PURE__ */ X(Me, {
|
|
2416
2708
|
dataKey: "y",
|
|
2417
2709
|
type: "natural",
|
|
2418
2710
|
stroke: t,
|
|
@@ -2426,11 +2718,11 @@ function rr({ data: e, colorVar: t }) {
|
|
|
2426
2718
|
})
|
|
2427
2719
|
});
|
|
2428
2720
|
}
|
|
2429
|
-
function
|
|
2430
|
-
let u =
|
|
2431
|
-
return /* @__PURE__ */ Z(
|
|
2721
|
+
function Cr({ title: e, value: t, description: n, icon: r, color: i = "primary", trend: a, progress: o, sparkline: s, ring: c, className: l }) {
|
|
2722
|
+
let u = xr[i], d = i === "muted" ? "var(--muted-foreground)" : `var(--${wr(i)})`;
|
|
2723
|
+
return /* @__PURE__ */ Z(er, {
|
|
2432
2724
|
className: Q("gap-3", l),
|
|
2433
|
-
children: [/* @__PURE__ */ Z(
|
|
2725
|
+
children: [/* @__PURE__ */ Z(tr, {
|
|
2434
2726
|
className: "flex flex-row items-start justify-between gap-2 pb-0",
|
|
2435
2727
|
children: [/* @__PURE__ */ X("span", {
|
|
2436
2728
|
className: "text-sm font-medium text-muted-foreground",
|
|
@@ -2439,10 +2731,10 @@ function ir({ title: e, value: t, description: n, icon: r, color: i = "primary",
|
|
|
2439
2731
|
className: Q("flex size-9 shrink-0 items-center justify-center rounded-md", u.soft, u.text, "[&_svg]:size-4"),
|
|
2440
2732
|
children: r
|
|
2441
2733
|
})]
|
|
2442
|
-
}), /* @__PURE__ */ Z(
|
|
2734
|
+
}), /* @__PURE__ */ Z(ar, { children: [
|
|
2443
2735
|
c ? /* @__PURE__ */ Z("div", {
|
|
2444
2736
|
className: "mt-1 flex items-center gap-4",
|
|
2445
|
-
children: [/* @__PURE__ */ X(
|
|
2737
|
+
children: [/* @__PURE__ */ X(Tr, {
|
|
2446
2738
|
ring: c,
|
|
2447
2739
|
colors: u
|
|
2448
2740
|
}), /* @__PURE__ */ Z("div", {
|
|
@@ -2463,7 +2755,7 @@ function ir({ title: e, value: t, description: n, icon: r, color: i = "primary",
|
|
|
2463
2755
|
className: "mt-1 flex items-center gap-1 text-sm text-muted-foreground",
|
|
2464
2756
|
children: [/* @__PURE__ */ Z("span", {
|
|
2465
2757
|
className: Q("flex items-center gap-1 font-medium", a.direction === "down" ? "text-red" : "text-green"),
|
|
2466
|
-
children: [a.direction === "down" ? /* @__PURE__ */ X(
|
|
2758
|
+
children: [a.direction === "down" ? /* @__PURE__ */ X(de, { className: "size-4" }) : /* @__PURE__ */ X(fe, { className: "size-4" }), a.value]
|
|
2467
2759
|
}), a.label]
|
|
2468
2760
|
}) : n && !c ? /* @__PURE__ */ X("p", {
|
|
2469
2761
|
className: "mt-1 text-sm text-muted-foreground",
|
|
@@ -2482,14 +2774,14 @@ function ir({ title: e, value: t, description: n, icon: r, color: i = "primary",
|
|
|
2482
2774
|
children: [/* @__PURE__ */ X("span", { children: o.caption }), /* @__PURE__ */ X("span", { children: o.target })]
|
|
2483
2775
|
})]
|
|
2484
2776
|
}),
|
|
2485
|
-
s && s.length > 1 && /* @__PURE__ */ X(
|
|
2777
|
+
s && s.length > 1 && /* @__PURE__ */ X(Sr, {
|
|
2486
2778
|
data: s,
|
|
2487
2779
|
colorVar: d
|
|
2488
2780
|
})
|
|
2489
2781
|
] })]
|
|
2490
2782
|
});
|
|
2491
2783
|
}
|
|
2492
|
-
function
|
|
2784
|
+
function wr(e) {
|
|
2493
2785
|
switch (e) {
|
|
2494
2786
|
case "primary": return "primary";
|
|
2495
2787
|
case "success": return "green";
|
|
@@ -2498,7 +2790,7 @@ function ar(e) {
|
|
|
2498
2790
|
default: return "muted-foreground";
|
|
2499
2791
|
}
|
|
2500
2792
|
}
|
|
2501
|
-
function
|
|
2793
|
+
function Tr({ ring: e, colors: t }) {
|
|
2502
2794
|
let n = Math.max(0, Math.min(100, e.value)), r = 2 * Math.PI * 34;
|
|
2503
2795
|
return /* @__PURE__ */ Z("div", {
|
|
2504
2796
|
className: "relative size-20 shrink-0",
|
|
@@ -2532,7 +2824,7 @@ function or({ ring: e, colors: t }) {
|
|
|
2532
2824
|
}
|
|
2533
2825
|
//#endregion
|
|
2534
2826
|
//#region src/components/custom/status-list.tsx
|
|
2535
|
-
var
|
|
2827
|
+
var Er = {
|
|
2536
2828
|
neutral: {
|
|
2537
2829
|
text: "text-muted-foreground",
|
|
2538
2830
|
pill: "border-transparent bg-muted text-muted-foreground",
|
|
@@ -2574,16 +2866,16 @@ var sr = {
|
|
|
2574
2866
|
avatar: "bg-red/15 text-red"
|
|
2575
2867
|
}
|
|
2576
2868
|
};
|
|
2577
|
-
function
|
|
2869
|
+
function Dr({ tone: e = "neutral", className: t, children: n }) {
|
|
2578
2870
|
return /* @__PURE__ */ X("span", {
|
|
2579
|
-
className: Q("flex size-9 shrink-0 items-center justify-center rounded-lg [&_svg]:size-5",
|
|
2871
|
+
className: Q("flex size-9 shrink-0 items-center justify-center rounded-lg [&_svg]:size-5", Er[e].softBox, t),
|
|
2580
2872
|
children: n
|
|
2581
2873
|
});
|
|
2582
2874
|
}
|
|
2583
|
-
function
|
|
2875
|
+
function Or({ src: e, name: t, tone: n = "primary", className: r }) {
|
|
2584
2876
|
let i = t.split(/\s+/).slice(0, 2).map((e) => e[0]?.toUpperCase() ?? "").join("");
|
|
2585
2877
|
return /* @__PURE__ */ X("span", {
|
|
2586
|
-
className: Q("flex size-9 shrink-0 items-center justify-center overflow-hidden rounded-full text-xs font-semibold",
|
|
2878
|
+
className: Q("flex size-9 shrink-0 items-center justify-center overflow-hidden rounded-full text-xs font-semibold", Er[n].avatar, r),
|
|
2587
2879
|
children: e ? /* @__PURE__ */ X("img", {
|
|
2588
2880
|
src: e,
|
|
2589
2881
|
alt: t,
|
|
@@ -2591,14 +2883,14 @@ function lr({ src: e, name: t, tone: n = "primary", className: r }) {
|
|
|
2591
2883
|
}) : i
|
|
2592
2884
|
});
|
|
2593
2885
|
}
|
|
2594
|
-
function
|
|
2886
|
+
function kr({ className: e, ...t }) {
|
|
2595
2887
|
return /* @__PURE__ */ X("div", {
|
|
2596
2888
|
"data-slot": "status-list",
|
|
2597
2889
|
className: Q("flex flex-col gap-2", e),
|
|
2598
2890
|
...t
|
|
2599
2891
|
});
|
|
2600
2892
|
}
|
|
2601
|
-
function
|
|
2893
|
+
function Ar({ label: e, count: t, className: n, children: r, ...i }) {
|
|
2602
2894
|
return /* @__PURE__ */ Z("div", {
|
|
2603
2895
|
"data-slot": "status-list-group",
|
|
2604
2896
|
className: n,
|
|
@@ -2619,8 +2911,8 @@ function dr({ label: e, count: t, className: n, children: r, ...i }) {
|
|
|
2619
2911
|
})]
|
|
2620
2912
|
});
|
|
2621
2913
|
}
|
|
2622
|
-
function
|
|
2623
|
-
let u =
|
|
2914
|
+
function jr({ media: e, title: t, description: n, status: r, statusVariant: i = "pill", hint: a, tone: o = "neutral", active: s = !1, className: c, ...l }) {
|
|
2915
|
+
let u = Er[o];
|
|
2624
2916
|
return /* @__PURE__ */ Z("div", {
|
|
2625
2917
|
"data-slot": "status-list-item",
|
|
2626
2918
|
className: Q("flex items-center gap-3 rounded-lg border p-3", s ? Q("border-transparent ring-1", u.activeBg) : "bg-card", c),
|
|
@@ -2645,7 +2937,7 @@ function fr({ media: e, title: t, description: n, status: r, statusVariant: i =
|
|
|
2645
2937
|
}), r != null && (i === "text" ? /* @__PURE__ */ X("span", {
|
|
2646
2938
|
className: Q("text-sm font-medium", u.text),
|
|
2647
2939
|
children: r
|
|
2648
|
-
}) : /* @__PURE__ */ X(
|
|
2940
|
+
}) : /* @__PURE__ */ X(Hn, {
|
|
2649
2941
|
variant: "outline",
|
|
2650
2942
|
className: Q("font-medium", i === "outline" ? u.outline : u.pill),
|
|
2651
2943
|
children: r
|
|
@@ -2656,9 +2948,9 @@ function fr({ media: e, title: t, description: n, status: r, statusVariant: i =
|
|
|
2656
2948
|
}
|
|
2657
2949
|
//#endregion
|
|
2658
2950
|
//#region src/components/ui/calendar.tsx
|
|
2659
|
-
function
|
|
2660
|
-
let l =
|
|
2661
|
-
return /* @__PURE__ */ X(
|
|
2951
|
+
function Mr({ className: e, classNames: t, showOutsideDays: n = !0, captionLayout: r = "label", buttonVariant: i = "ghost", locale: a, formatters: o, components: s, ...c }) {
|
|
2952
|
+
let l = Ie();
|
|
2953
|
+
return /* @__PURE__ */ X(Fe, {
|
|
2662
2954
|
showOutsideDays: n,
|
|
2663
2955
|
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),
|
|
2664
2956
|
captionLayout: r,
|
|
@@ -2672,8 +2964,8 @@ function pr({ className: e, classNames: t, showOutsideDays: n = !0, captionLayou
|
|
|
2672
2964
|
months: Q("relative flex flex-col gap-4 md:flex-row", l.months),
|
|
2673
2965
|
month: Q("flex w-full flex-col gap-4", l.month),
|
|
2674
2966
|
nav: Q("absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1", l.nav),
|
|
2675
|
-
button_previous: Q(
|
|
2676
|
-
button_next: Q(
|
|
2967
|
+
button_previous: Q(We({ variant: i }), "size-(--cell-size) p-0 select-none aria-disabled:opacity-50", l.button_previous),
|
|
2968
|
+
button_next: Q(We({ variant: i }), "size-(--cell-size) p-0 select-none aria-disabled:opacity-50", l.button_next),
|
|
2677
2969
|
month_caption: Q("flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)", l.month_caption),
|
|
2678
2970
|
dropdowns: Q("flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium", l.dropdowns),
|
|
2679
2971
|
dropdown_root: Q("relative rounded-(--cell-radius)", l.dropdown_root),
|
|
@@ -2702,11 +2994,11 @@ function pr({ className: e, classNames: t, showOutsideDays: n = !0, captionLayou
|
|
|
2702
2994
|
className: Q(e),
|
|
2703
2995
|
...n
|
|
2704
2996
|
}),
|
|
2705
|
-
Chevron: ({ className: e, orientation: t, ...n }) => X(t === "left" ?
|
|
2997
|
+
Chevron: ({ className: e, orientation: t, ...n }) => X(t === "left" ? b : t === "right" ? x : y, {
|
|
2706
2998
|
className: Q("size-4", e),
|
|
2707
2999
|
...n
|
|
2708
3000
|
}),
|
|
2709
|
-
DayButton: ({ ...e }) => /* @__PURE__ */ X(
|
|
3001
|
+
DayButton: ({ ...e }) => /* @__PURE__ */ X(Nr, {
|
|
2710
3002
|
locale: a,
|
|
2711
3003
|
...e
|
|
2712
3004
|
}),
|
|
@@ -2722,8 +3014,8 @@ function pr({ className: e, classNames: t, showOutsideDays: n = !0, captionLayou
|
|
|
2722
3014
|
...c
|
|
2723
3015
|
});
|
|
2724
3016
|
}
|
|
2725
|
-
function
|
|
2726
|
-
let o =
|
|
3017
|
+
function Nr({ className: e, day: t, modifiers: r, locale: i, ...a }) {
|
|
3018
|
+
let o = Ie(), s = n.useRef(null);
|
|
2727
3019
|
return n.useEffect(() => {
|
|
2728
3020
|
r.focused && s.current?.focus();
|
|
2729
3021
|
}, [r.focused]), /* @__PURE__ */ X($, {
|
|
@@ -2741,10 +3033,10 @@ function mr({ className: e, day: t, modifiers: r, locale: i, ...a }) {
|
|
|
2741
3033
|
}
|
|
2742
3034
|
//#endregion
|
|
2743
3035
|
//#region src/components/custom/date-time-range-picker-utils.ts
|
|
2744
|
-
function
|
|
3036
|
+
function Pr(e) {
|
|
2745
3037
|
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`;
|
|
2746
3038
|
}
|
|
2747
|
-
function
|
|
3039
|
+
function Fr(e, t) {
|
|
2748
3040
|
if (!e) return null;
|
|
2749
3041
|
let n = new Date(e);
|
|
2750
3042
|
if (isNaN(n.getTime())) return null;
|
|
@@ -2767,7 +3059,7 @@ function gr(e, t) {
|
|
|
2767
3059
|
s: i("second").padStart(2, "0")
|
|
2768
3060
|
};
|
|
2769
3061
|
}
|
|
2770
|
-
function
|
|
3062
|
+
function Ir(e, t, n, r, i, a, o) {
|
|
2771
3063
|
let s = Date.UTC(e, t, n, parseInt(r), parseInt(i), parseInt(a)), c = new Date(s), l = new Intl.DateTimeFormat("en-US", {
|
|
2772
3064
|
year: "numeric",
|
|
2773
3065
|
month: "2-digit",
|
|
@@ -2778,9 +3070,9 @@ function _r(e, t, n, r, i, a, o) {
|
|
|
2778
3070
|
hour12: !1,
|
|
2779
3071
|
timeZone: o
|
|
2780
3072
|
}).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;
|
|
2781
|
-
return
|
|
3073
|
+
return Pr(new Date(s - d));
|
|
2782
3074
|
}
|
|
2783
|
-
var
|
|
3075
|
+
var Lr = [
|
|
2784
3076
|
{
|
|
2785
3077
|
value: "hour",
|
|
2786
3078
|
label: "Hour"
|
|
@@ -2798,8 +3090,8 @@ var vr = [
|
|
|
2798
3090
|
label: "Month"
|
|
2799
3091
|
}
|
|
2800
3092
|
];
|
|
2801
|
-
function
|
|
2802
|
-
let t = /* @__PURE__ */ new Date(), n =
|
|
3093
|
+
function Rr(e) {
|
|
3094
|
+
let t = /* @__PURE__ */ new Date(), n = Pr(t), r = new Date(t);
|
|
2803
3095
|
switch (e) {
|
|
2804
3096
|
case "hour":
|
|
2805
3097
|
r.setUTCHours(r.getUTCHours() - 1);
|
|
@@ -2815,20 +3107,20 @@ function yr(e) {
|
|
|
2815
3107
|
break;
|
|
2816
3108
|
}
|
|
2817
3109
|
return {
|
|
2818
|
-
from:
|
|
3110
|
+
from: Pr(r),
|
|
2819
3111
|
to: n
|
|
2820
3112
|
};
|
|
2821
3113
|
}
|
|
2822
|
-
function
|
|
3114
|
+
function zr(e, t) {
|
|
2823
3115
|
let n = new Date(e.from).getTime(), r = new Date(e.to).getTime(), i = r - n, a = t === "prev" ? -i : i;
|
|
2824
3116
|
return {
|
|
2825
3117
|
preset: e.preset,
|
|
2826
|
-
from:
|
|
2827
|
-
to:
|
|
3118
|
+
from: Pr(new Date(n + a)),
|
|
3119
|
+
to: Pr(new Date(r + a))
|
|
2828
3120
|
};
|
|
2829
3121
|
}
|
|
2830
|
-
function
|
|
2831
|
-
if (e.preset) return
|
|
3122
|
+
function Br(e, t) {
|
|
3123
|
+
if (e.preset) return Lr.find((t) => t.value === e.preset)?.label ?? e.preset;
|
|
2832
3124
|
if (e.from && e.to) {
|
|
2833
3125
|
let n = (e) => new Date(e).toLocaleString("en-US", {
|
|
2834
3126
|
year: "numeric",
|
|
@@ -2845,7 +3137,7 @@ function xr(e, t) {
|
|
|
2845
3137
|
}
|
|
2846
3138
|
//#endregion
|
|
2847
3139
|
//#region src/components/custom/date-time-range-picker.tsx
|
|
2848
|
-
function
|
|
3140
|
+
function Vr({ value: e, max: t, onChange: r }) {
|
|
2849
3141
|
let [i, a] = n.useState(e);
|
|
2850
3142
|
n.useEffect(() => {
|
|
2851
3143
|
a(e);
|
|
@@ -2870,16 +3162,16 @@ function Sr({ value: e, max: t, onChange: r }) {
|
|
|
2870
3162
|
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")
|
|
2871
3163
|
});
|
|
2872
3164
|
}
|
|
2873
|
-
function
|
|
2874
|
-
let [c, l] = n.useState(!1), u = a || "UTC", d =
|
|
3165
|
+
function Hr({ isoValue: e, onChange: t, label: r, placeholder: i = "Select date & time", timezone: a, minDate: o, maxDate: s }) {
|
|
3166
|
+
let [c, l] = n.useState(!1), u = a || "UTC", d = Fr(e, u), [f, p] = n.useState(d?.h ?? "00"), [m, g] = n.useState(d?.m ?? "00"), [_, v] = n.useState(d?.s ?? "00");
|
|
2875
3167
|
n.useEffect(() => {
|
|
2876
|
-
let t =
|
|
3168
|
+
let t = Fr(e, u);
|
|
2877
3169
|
p(t?.h ?? "00"), g(t?.m ?? "00"), v(t?.s ?? "00");
|
|
2878
3170
|
}, [e, u]);
|
|
2879
|
-
let y = d ? new Date(d.year, d.month, d.day) : void 0, b = (e, n, r, i, a, o) => t(
|
|
2880
|
-
e && b(e.getFullYear(), e.getMonth(), e.getDate(), f,
|
|
3171
|
+
let y = d ? new Date(d.year, d.month, d.day) : void 0, b = (e, n, r, i, a, o) => t(Ir(e, n, r, i, a, o, u)), x = (e) => {
|
|
3172
|
+
e && b(e.getFullYear(), e.getMonth(), e.getDate(), f, m, _);
|
|
2881
3173
|
}, S = (e, t) => {
|
|
2882
|
-
let n = e === "h" ? t : f, r = e === "m" ? t :
|
|
3174
|
+
let n = e === "h" ? t : f, r = e === "m" ? t : m, i = e === "s" ? t : _;
|
|
2883
3175
|
e === "h" && p(t), e === "m" && g(t), e === "s" && v(t), d && b(d.year, d.month, d.day, n, r, i);
|
|
2884
3176
|
}, C = (e) => {
|
|
2885
3177
|
if (o) {
|
|
@@ -2906,11 +3198,11 @@ function Cr({ isoValue: e, onChange: t, label: r, placeholder: i = "Select date
|
|
|
2906
3198
|
children: [/* @__PURE__ */ X("label", {
|
|
2907
3199
|
className: "px-0.5 text-xs text-muted-foreground",
|
|
2908
3200
|
children: r
|
|
2909
|
-
}), /* @__PURE__ */ Z(
|
|
3201
|
+
}), /* @__PURE__ */ Z(rn, {
|
|
2910
3202
|
open: c,
|
|
2911
3203
|
onOpenChange: l,
|
|
2912
3204
|
modal: !1,
|
|
2913
|
-
children: [/* @__PURE__ */ X(
|
|
3205
|
+
children: [/* @__PURE__ */ X(an, {
|
|
2914
3206
|
asChild: !0,
|
|
2915
3207
|
children: /* @__PURE__ */ Z("button", {
|
|
2916
3208
|
type: "button",
|
|
@@ -2918,13 +3210,13 @@ function Cr({ isoValue: e, onChange: t, label: r, placeholder: i = "Select date
|
|
|
2918
3210
|
children: [/* @__PURE__ */ X("span", {
|
|
2919
3211
|
className: "truncate",
|
|
2920
3212
|
children: w
|
|
2921
|
-
}), /* @__PURE__ */ X(
|
|
3213
|
+
}), /* @__PURE__ */ X(h, { className: "size-3.5 shrink-0 opacity-60" })]
|
|
2922
3214
|
})
|
|
2923
|
-
}), /* @__PURE__ */ Z(
|
|
3215
|
+
}), /* @__PURE__ */ Z(on, {
|
|
2924
3216
|
className: "w-auto p-0",
|
|
2925
3217
|
align: "start",
|
|
2926
3218
|
sideOffset: 4,
|
|
2927
|
-
children: [/* @__PURE__ */ X(
|
|
3219
|
+
children: [/* @__PURE__ */ X(Mr, {
|
|
2928
3220
|
mode: "single",
|
|
2929
3221
|
selected: y,
|
|
2930
3222
|
onSelect: x,
|
|
@@ -2934,8 +3226,8 @@ function Cr({ isoValue: e, onChange: t, label: r, placeholder: i = "Select date
|
|
|
2934
3226
|
}), /* @__PURE__ */ Z("div", {
|
|
2935
3227
|
className: "flex items-center gap-2 border-t px-3 py-2.5",
|
|
2936
3228
|
children: [
|
|
2937
|
-
/* @__PURE__ */ X(
|
|
2938
|
-
/* @__PURE__ */ X(
|
|
3229
|
+
/* @__PURE__ */ X(D, { className: "size-4 shrink-0 text-muted-foreground" }),
|
|
3230
|
+
/* @__PURE__ */ X(Vr, {
|
|
2939
3231
|
value: f,
|
|
2940
3232
|
max: 23,
|
|
2941
3233
|
onChange: (e) => S("h", e)
|
|
@@ -2944,8 +3236,8 @@ function Cr({ isoValue: e, onChange: t, label: r, placeholder: i = "Select date
|
|
|
2944
3236
|
className: "text-sm font-medium text-muted-foreground",
|
|
2945
3237
|
children: ":"
|
|
2946
3238
|
}),
|
|
2947
|
-
/* @__PURE__ */ X(
|
|
2948
|
-
value:
|
|
3239
|
+
/* @__PURE__ */ X(Vr, {
|
|
3240
|
+
value: m,
|
|
2949
3241
|
max: 59,
|
|
2950
3242
|
onChange: (e) => S("m", e)
|
|
2951
3243
|
}),
|
|
@@ -2953,7 +3245,7 @@ function Cr({ isoValue: e, onChange: t, label: r, placeholder: i = "Select date
|
|
|
2953
3245
|
className: "text-sm font-medium text-muted-foreground",
|
|
2954
3246
|
children: ":"
|
|
2955
3247
|
}),
|
|
2956
|
-
/* @__PURE__ */ X(
|
|
3248
|
+
/* @__PURE__ */ X(Vr, {
|
|
2957
3249
|
value: _,
|
|
2958
3250
|
max: 59,
|
|
2959
3251
|
onChange: (e) => S("s", e)
|
|
@@ -2964,41 +3256,41 @@ function Cr({ isoValue: e, onChange: t, label: r, placeholder: i = "Select date
|
|
|
2964
3256
|
})]
|
|
2965
3257
|
});
|
|
2966
3258
|
}
|
|
2967
|
-
var
|
|
2968
|
-
let c = a ??
|
|
3259
|
+
var Ur = n.forwardRef(function({ value: e, onChange: t, className: r, timezone: i, presets: a, maxRangeDays: o }, s) {
|
|
3260
|
+
let c = a ?? Lr, [l, u] = n.useState(!1), [d, f] = n.useState(e.from), [p, m] = n.useState(e.to);
|
|
2969
3261
|
n.useEffect(() => {
|
|
2970
|
-
f(e.from),
|
|
3262
|
+
f(e.from), m(e.to);
|
|
2971
3263
|
}, [e]);
|
|
2972
3264
|
let g = (e) => {
|
|
2973
3265
|
if (f(e), o && e) {
|
|
2974
3266
|
let t = new Date(new Date(e).getTime() + o * 864e5);
|
|
2975
|
-
new Date(p) > t &&
|
|
3267
|
+
new Date(p) > t && m(t.toISOString());
|
|
2976
3268
|
}
|
|
2977
|
-
},
|
|
3269
|
+
}, _ = (e) => {
|
|
2978
3270
|
t({
|
|
2979
3271
|
preset: e,
|
|
2980
|
-
...
|
|
3272
|
+
...Rr(e)
|
|
2981
3273
|
}), u(!1);
|
|
2982
3274
|
};
|
|
2983
|
-
return /* @__PURE__ */ Z(
|
|
3275
|
+
return /* @__PURE__ */ Z(rn, {
|
|
2984
3276
|
open: l,
|
|
2985
3277
|
onOpenChange: u,
|
|
2986
|
-
children: [/* @__PURE__ */ X(
|
|
3278
|
+
children: [/* @__PURE__ */ X(an, {
|
|
2987
3279
|
asChild: !0,
|
|
2988
3280
|
children: /* @__PURE__ */ Z("button", {
|
|
2989
3281
|
ref: s,
|
|
2990
3282
|
type: "button",
|
|
2991
3283
|
className: Q("flex h-9 items-center justify-between gap-1.5 rounded-md border border-input bg-transparent px-3 py-1 text-sm transition-colors outline-none dark:bg-input/30", "hover:bg-accent/50 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50", l && "border-ring ring-3 ring-ring/50", r),
|
|
2992
3284
|
children: [
|
|
2993
|
-
/* @__PURE__ */ X(
|
|
3285
|
+
/* @__PURE__ */ X(h, { className: "size-3.5 shrink-0 opacity-60" }),
|
|
2994
3286
|
/* @__PURE__ */ X("span", {
|
|
2995
3287
|
className: "truncate",
|
|
2996
|
-
children:
|
|
3288
|
+
children: Br(e, i)
|
|
2997
3289
|
}),
|
|
2998
|
-
/* @__PURE__ */ X(
|
|
3290
|
+
/* @__PURE__ */ X(v, { className: Q("size-3.5 shrink-0 opacity-60 transition-transform", l && "rotate-180") })
|
|
2999
3291
|
]
|
|
3000
3292
|
})
|
|
3001
|
-
}), /* @__PURE__ */ X(
|
|
3293
|
+
}), /* @__PURE__ */ X(on, {
|
|
3002
3294
|
align: "end",
|
|
3003
3295
|
sideOffset: 4,
|
|
3004
3296
|
className: "w-auto p-0",
|
|
@@ -3014,7 +3306,7 @@ var wr = n.forwardRef(function({ value: e, onChange: t, className: r, timezone:
|
|
|
3014
3306
|
style: { gridTemplateColumns: `repeat(${c.length}, minmax(0, 1fr))` },
|
|
3015
3307
|
children: c.map((t) => /* @__PURE__ */ X("button", {
|
|
3016
3308
|
type: "button",
|
|
3017
|
-
onClick: () =>
|
|
3309
|
+
onClick: () => _(t.value),
|
|
3018
3310
|
className: Q("rounded-md px-2 py-1.5 text-center text-xs font-medium transition-colors", e.preset === t.value ? "bg-primary text-primary-foreground" : "bg-accent/50 text-foreground hover:bg-accent"),
|
|
3019
3311
|
children: t.label
|
|
3020
3312
|
}, t.value))
|
|
@@ -3026,7 +3318,7 @@ var wr = n.forwardRef(function({ value: e, onChange: t, className: r, timezone:
|
|
|
3026
3318
|
className: "px-0.5 text-sm text-muted-foreground",
|
|
3027
3319
|
children: "Custom range"
|
|
3028
3320
|
}),
|
|
3029
|
-
/* @__PURE__ */ X(
|
|
3321
|
+
/* @__PURE__ */ X(Hr, {
|
|
3030
3322
|
isoValue: d,
|
|
3031
3323
|
onChange: g,
|
|
3032
3324
|
label: "From",
|
|
@@ -3034,9 +3326,9 @@ var wr = n.forwardRef(function({ value: e, onChange: t, className: r, timezone:
|
|
|
3034
3326
|
timezone: i,
|
|
3035
3327
|
maxDate: (/* @__PURE__ */ new Date()).toISOString()
|
|
3036
3328
|
}),
|
|
3037
|
-
/* @__PURE__ */ X(
|
|
3329
|
+
/* @__PURE__ */ X(Hr, {
|
|
3038
3330
|
isoValue: p,
|
|
3039
|
-
onChange:
|
|
3331
|
+
onChange: m,
|
|
3040
3332
|
label: "To",
|
|
3041
3333
|
placeholder: "End date & time",
|
|
3042
3334
|
timezone: i,
|
|
@@ -3069,36 +3361,36 @@ var wr = n.forwardRef(function({ value: e, onChange: t, className: r, timezone:
|
|
|
3069
3361
|
})
|
|
3070
3362
|
})]
|
|
3071
3363
|
});
|
|
3072
|
-
}),
|
|
3364
|
+
}), Wr = U("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", {
|
|
3073
3365
|
variants: { variant: {
|
|
3074
3366
|
default: "bg-card text-card-foreground",
|
|
3075
3367
|
destructive: "bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current"
|
|
3076
3368
|
} },
|
|
3077
3369
|
defaultVariants: { variant: "default" }
|
|
3078
3370
|
});
|
|
3079
|
-
function
|
|
3371
|
+
function Gr({ className: e, variant: t, ...n }) {
|
|
3080
3372
|
return /* @__PURE__ */ X("div", {
|
|
3081
3373
|
"data-slot": "alert",
|
|
3082
3374
|
role: "alert",
|
|
3083
|
-
className: Q(
|
|
3375
|
+
className: Q(Wr({ variant: t }), e),
|
|
3084
3376
|
...n
|
|
3085
3377
|
});
|
|
3086
3378
|
}
|
|
3087
|
-
function
|
|
3379
|
+
function Kr({ className: e, ...t }) {
|
|
3088
3380
|
return /* @__PURE__ */ X("div", {
|
|
3089
3381
|
"data-slot": "alert-title",
|
|
3090
3382
|
className: Q("font-medium group-has-[>svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground", e),
|
|
3091
3383
|
...t
|
|
3092
3384
|
});
|
|
3093
3385
|
}
|
|
3094
|
-
function
|
|
3386
|
+
function qr({ className: e, ...t }) {
|
|
3095
3387
|
return /* @__PURE__ */ X("div", {
|
|
3096
3388
|
"data-slot": "alert-description",
|
|
3097
3389
|
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),
|
|
3098
3390
|
...t
|
|
3099
3391
|
});
|
|
3100
3392
|
}
|
|
3101
|
-
function
|
|
3393
|
+
function Jr({ className: e, ...t }) {
|
|
3102
3394
|
return /* @__PURE__ */ X("div", {
|
|
3103
3395
|
"data-slot": "alert-action",
|
|
3104
3396
|
className: Q("absolute top-2 right-2", e),
|
|
@@ -3106,125 +3398,31 @@ function kr({ className: e, ...t }) {
|
|
|
3106
3398
|
});
|
|
3107
3399
|
}
|
|
3108
3400
|
//#endregion
|
|
3109
|
-
//#region src/components/ui/alert-dialog.tsx
|
|
3110
|
-
function Ar({ ...e }) {
|
|
3111
|
-
return /* @__PURE__ */ X(G.Root, {
|
|
3112
|
-
"data-slot": "alert-dialog",
|
|
3113
|
-
...e
|
|
3114
|
-
});
|
|
3115
|
-
}
|
|
3116
|
-
function jr({ ...e }) {
|
|
3117
|
-
return /* @__PURE__ */ X(G.Trigger, {
|
|
3118
|
-
"data-slot": "alert-dialog-trigger",
|
|
3119
|
-
...e
|
|
3120
|
-
});
|
|
3121
|
-
}
|
|
3122
|
-
function Mr({ ...e }) {
|
|
3123
|
-
return /* @__PURE__ */ X(G.Portal, {
|
|
3124
|
-
"data-slot": "alert-dialog-portal",
|
|
3125
|
-
...e
|
|
3126
|
-
});
|
|
3127
|
-
}
|
|
3128
|
-
function Nr({ className: e, ...t }) {
|
|
3129
|
-
return /* @__PURE__ */ X(G.Overlay, {
|
|
3130
|
-
"data-slot": "alert-dialog-overlay",
|
|
3131
|
-
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),
|
|
3132
|
-
...t
|
|
3133
|
-
});
|
|
3134
|
-
}
|
|
3135
|
-
function Pr({ className: e, size: t = "default", ...n }) {
|
|
3136
|
-
return /* @__PURE__ */ Z(Mr, { children: [/* @__PURE__ */ X(Nr, {}), /* @__PURE__ */ X(G.Content, {
|
|
3137
|
-
"data-slot": "alert-dialog-content",
|
|
3138
|
-
"data-size": t,
|
|
3139
|
-
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),
|
|
3140
|
-
...n
|
|
3141
|
-
})] });
|
|
3142
|
-
}
|
|
3143
|
-
function Fr({ className: e, ...t }) {
|
|
3144
|
-
return /* @__PURE__ */ X("div", {
|
|
3145
|
-
"data-slot": "alert-dialog-header",
|
|
3146
|
-
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),
|
|
3147
|
-
...t
|
|
3148
|
-
});
|
|
3149
|
-
}
|
|
3150
|
-
function Ir({ className: e, ...t }) {
|
|
3151
|
-
return /* @__PURE__ */ X("div", {
|
|
3152
|
-
"data-slot": "alert-dialog-footer",
|
|
3153
|
-
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),
|
|
3154
|
-
...t
|
|
3155
|
-
});
|
|
3156
|
-
}
|
|
3157
|
-
function Lr({ className: e, ...t }) {
|
|
3158
|
-
return /* @__PURE__ */ X("div", {
|
|
3159
|
-
"data-slot": "alert-dialog-media",
|
|
3160
|
-
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),
|
|
3161
|
-
...t
|
|
3162
|
-
});
|
|
3163
|
-
}
|
|
3164
|
-
function Rr({ className: e, ...t }) {
|
|
3165
|
-
return /* @__PURE__ */ X(G.Title, {
|
|
3166
|
-
"data-slot": "alert-dialog-title",
|
|
3167
|
-
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),
|
|
3168
|
-
...t
|
|
3169
|
-
});
|
|
3170
|
-
}
|
|
3171
|
-
function zr({ className: e, ...t }) {
|
|
3172
|
-
return /* @__PURE__ */ X(G.Description, {
|
|
3173
|
-
"data-slot": "alert-dialog-description",
|
|
3174
|
-
className: Q("text-sm text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground", e),
|
|
3175
|
-
...t
|
|
3176
|
-
});
|
|
3177
|
-
}
|
|
3178
|
-
function Br({ className: e, variant: t = "default", size: n = "default", ...r }) {
|
|
3179
|
-
return /* @__PURE__ */ X($, {
|
|
3180
|
-
variant: t,
|
|
3181
|
-
size: n,
|
|
3182
|
-
asChild: !0,
|
|
3183
|
-
children: /* @__PURE__ */ X(G.Action, {
|
|
3184
|
-
"data-slot": "alert-dialog-action",
|
|
3185
|
-
className: Q(e),
|
|
3186
|
-
...r
|
|
3187
|
-
})
|
|
3188
|
-
});
|
|
3189
|
-
}
|
|
3190
|
-
function Vr({ className: e, variant: t = "outline", size: n = "default", ...r }) {
|
|
3191
|
-
return /* @__PURE__ */ X($, {
|
|
3192
|
-
variant: t,
|
|
3193
|
-
size: n,
|
|
3194
|
-
asChild: !0,
|
|
3195
|
-
children: /* @__PURE__ */ X(G.Cancel, {
|
|
3196
|
-
"data-slot": "alert-dialog-cancel",
|
|
3197
|
-
className: Q(e),
|
|
3198
|
-
...r
|
|
3199
|
-
})
|
|
3200
|
-
});
|
|
3201
|
-
}
|
|
3202
|
-
//#endregion
|
|
3203
3401
|
//#region src/components/ui/button-group.tsx
|
|
3204
|
-
var
|
|
3402
|
+
var Yr = U("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", {
|
|
3205
3403
|
variants: { orientation: {
|
|
3206
3404
|
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!",
|
|
3207
3405
|
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!"
|
|
3208
3406
|
} },
|
|
3209
3407
|
defaultVariants: { orientation: "horizontal" }
|
|
3210
3408
|
});
|
|
3211
|
-
function
|
|
3409
|
+
function Xr({ className: e, orientation: t, ...n }) {
|
|
3212
3410
|
return /* @__PURE__ */ X("div", {
|
|
3213
3411
|
role: "group",
|
|
3214
3412
|
"data-slot": "button-group",
|
|
3215
3413
|
"data-orientation": t,
|
|
3216
|
-
className: Q(
|
|
3414
|
+
className: Q(Yr({ orientation: t }), e),
|
|
3217
3415
|
...n
|
|
3218
3416
|
});
|
|
3219
3417
|
}
|
|
3220
|
-
function
|
|
3221
|
-
return /* @__PURE__ */ X(t ?
|
|
3418
|
+
function Zr({ className: e, asChild: t = !1, ...n }) {
|
|
3419
|
+
return /* @__PURE__ */ X(t ? we.Root : "div", {
|
|
3222
3420
|
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),
|
|
3223
3421
|
...n
|
|
3224
3422
|
});
|
|
3225
3423
|
}
|
|
3226
|
-
function
|
|
3227
|
-
return /* @__PURE__ */ X(
|
|
3424
|
+
function Qr({ className: e, orientation: t = "vertical", ...n }) {
|
|
3425
|
+
return /* @__PURE__ */ X(ut, {
|
|
3228
3426
|
"data-slot": "button-group-separator",
|
|
3229
3427
|
orientation: t,
|
|
3230
3428
|
className: Q("relative self-stretch bg-input data-horizontal:mx-px data-horizontal:w-auto data-vertical:my-px data-vertical:h-auto", e),
|
|
@@ -3233,40 +3431,40 @@ function Gr({ className: e, orientation: t = "vertical", ...n }) {
|
|
|
3233
3431
|
}
|
|
3234
3432
|
//#endregion
|
|
3235
3433
|
//#region src/components/ui/chart.tsx
|
|
3236
|
-
var
|
|
3434
|
+
var $r = {
|
|
3237
3435
|
light: "",
|
|
3238
3436
|
dark: ".dark"
|
|
3239
|
-
},
|
|
3437
|
+
}, ei = {
|
|
3240
3438
|
width: 320,
|
|
3241
3439
|
height: 200
|
|
3242
|
-
},
|
|
3243
|
-
function
|
|
3244
|
-
let e = n.useContext(
|
|
3440
|
+
}, ti = n.createContext(null);
|
|
3441
|
+
function ni() {
|
|
3442
|
+
let e = n.useContext(ti);
|
|
3245
3443
|
if (!e) throw Error("useChart must be used within a <ChartContainer />");
|
|
3246
3444
|
return e;
|
|
3247
3445
|
}
|
|
3248
|
-
function
|
|
3446
|
+
function ri({ id: e, className: t, children: r, config: i, initialDimension: a = ei, ...o }) {
|
|
3249
3447
|
let s = n.useId(), c = `chart-${e ?? s.replace(/:/g, "")}`;
|
|
3250
|
-
return /* @__PURE__ */ X(
|
|
3448
|
+
return /* @__PURE__ */ X(ti.Provider, {
|
|
3251
3449
|
value: { config: i },
|
|
3252
3450
|
children: /* @__PURE__ */ Z("div", {
|
|
3253
3451
|
"data-slot": "chart",
|
|
3254
3452
|
"data-chart": c,
|
|
3255
3453
|
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),
|
|
3256
3454
|
...o,
|
|
3257
|
-
children: [/* @__PURE__ */ X(
|
|
3455
|
+
children: [/* @__PURE__ */ X(ii, {
|
|
3258
3456
|
id: c,
|
|
3259
3457
|
config: i
|
|
3260
|
-
}), /* @__PURE__ */ X(
|
|
3458
|
+
}), /* @__PURE__ */ X(je.ResponsiveContainer, {
|
|
3261
3459
|
initialDimension: a,
|
|
3262
3460
|
children: r
|
|
3263
3461
|
})]
|
|
3264
3462
|
})
|
|
3265
3463
|
});
|
|
3266
3464
|
}
|
|
3267
|
-
var
|
|
3465
|
+
var ii = ({ id: e, config: t }) => {
|
|
3268
3466
|
let n = Object.entries(t).filter(([, e]) => e.theme ?? e.color);
|
|
3269
|
-
return n.length ? /* @__PURE__ */ X("style", { dangerouslySetInnerHTML: { __html: Object.entries(
|
|
3467
|
+
return n.length ? /* @__PURE__ */ X("style", { dangerouslySetInnerHTML: { __html: Object.entries($r).map(([t, r]) => `
|
|
3270
3468
|
${r} [data-chart=${e}] {
|
|
3271
3469
|
${n.map(([e, n]) => {
|
|
3272
3470
|
let r = n.theme?.[t] ?? n.color;
|
|
@@ -3274,11 +3472,11 @@ ${n.map(([e, n]) => {
|
|
|
3274
3472
|
}).join("\n")}
|
|
3275
3473
|
}
|
|
3276
3474
|
`).join("\n") } }) : null;
|
|
3277
|
-
},
|
|
3278
|
-
function
|
|
3279
|
-
let { config: m } =
|
|
3475
|
+
}, ai = je.Tooltip;
|
|
3476
|
+
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 }) {
|
|
3477
|
+
let { config: m } = ni(), h = n.useMemo(() => {
|
|
3280
3478
|
if (a || !t?.length) return null;
|
|
3281
|
-
let [e] = t, n =
|
|
3479
|
+
let [e] = t, n = li(m, e, `${p ?? e?.dataKey ?? e?.name ?? "value"}`), r = !p && typeof s == "string" ? m[s]?.label ?? s : n?.label;
|
|
3282
3480
|
return c ? /* @__PURE__ */ X("div", {
|
|
3283
3481
|
className: Q("font-medium", l),
|
|
3284
3482
|
children: c(r, t)
|
|
@@ -3302,7 +3500,7 @@ function $r({ active: e, payload: t, className: r, indicator: i = "dot", hideLab
|
|
|
3302
3500
|
children: [g ? null : h, /* @__PURE__ */ X("div", {
|
|
3303
3501
|
className: "grid gap-1.5",
|
|
3304
3502
|
children: t.filter((e) => e.type !== "none").map((e, t) => {
|
|
3305
|
-
let n =
|
|
3503
|
+
let n = li(m, e, `${f ?? e.name ?? e.dataKey ?? "value"}`), r = d ?? e.payload?.fill ?? e.color;
|
|
3306
3504
|
return /* @__PURE__ */ X("div", {
|
|
3307
3505
|
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"),
|
|
3308
3506
|
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", {
|
|
@@ -3334,13 +3532,13 @@ function $r({ active: e, payload: t, className: r, indicator: i = "dot", hideLab
|
|
|
3334
3532
|
})]
|
|
3335
3533
|
});
|
|
3336
3534
|
}
|
|
3337
|
-
var
|
|
3338
|
-
function
|
|
3339
|
-
let { config: a } =
|
|
3535
|
+
var si = je.Legend;
|
|
3536
|
+
function ci({ className: e, hideIcon: t = !1, payload: n, verticalAlign: r = "bottom", nameKey: i }) {
|
|
3537
|
+
let { config: a } = ni();
|
|
3340
3538
|
return n?.length ? /* @__PURE__ */ X("div", {
|
|
3341
3539
|
className: Q("flex items-center justify-center gap-4", r === "top" ? "pb-3" : "pt-3", e),
|
|
3342
3540
|
children: n.filter((e) => e.type !== "none").map((e, n) => {
|
|
3343
|
-
let r =
|
|
3541
|
+
let r = li(a, e, `${i ?? e.dataKey ?? "value"}`);
|
|
3344
3542
|
return /* @__PURE__ */ Z("div", {
|
|
3345
3543
|
className: Q("flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground"),
|
|
3346
3544
|
children: [r?.icon && !t ? /* @__PURE__ */ X(r.icon, {}) : /* @__PURE__ */ X("div", {
|
|
@@ -3351,29 +3549,29 @@ function ti({ className: e, hideIcon: t = !1, payload: n, verticalAlign: r = "bo
|
|
|
3351
3549
|
})
|
|
3352
3550
|
}) : null;
|
|
3353
3551
|
}
|
|
3354
|
-
function
|
|
3552
|
+
function li(e, t, n) {
|
|
3355
3553
|
if (typeof t != "object" || !t) return;
|
|
3356
3554
|
let r = "payload" in t && typeof t.payload == "object" && t.payload !== null ? t.payload : void 0, i = n;
|
|
3357
3555
|
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];
|
|
3358
3556
|
}
|
|
3359
3557
|
//#endregion
|
|
3360
3558
|
//#region src/components/ui/hover-card.tsx
|
|
3361
|
-
function
|
|
3362
|
-
return /* @__PURE__ */ X(
|
|
3559
|
+
function ui({ ...e }) {
|
|
3560
|
+
return /* @__PURE__ */ X(ve.Root, {
|
|
3363
3561
|
"data-slot": "hover-card",
|
|
3364
3562
|
...e
|
|
3365
3563
|
});
|
|
3366
3564
|
}
|
|
3367
|
-
function
|
|
3368
|
-
return /* @__PURE__ */ X(
|
|
3565
|
+
function di({ ...e }) {
|
|
3566
|
+
return /* @__PURE__ */ X(ve.Trigger, {
|
|
3369
3567
|
"data-slot": "hover-card-trigger",
|
|
3370
3568
|
...e
|
|
3371
3569
|
});
|
|
3372
3570
|
}
|
|
3373
|
-
function
|
|
3374
|
-
return /* @__PURE__ */ X(
|
|
3571
|
+
function fi({ className: e, align: t = "center", sideOffset: n = 4, ...r }) {
|
|
3572
|
+
return /* @__PURE__ */ X(ve.Portal, {
|
|
3375
3573
|
"data-slot": "hover-card-portal",
|
|
3376
|
-
children: /* @__PURE__ */ X(
|
|
3574
|
+
children: /* @__PURE__ */ X(ve.Content, {
|
|
3377
3575
|
"data-slot": "hover-card-content",
|
|
3378
3576
|
align: t,
|
|
3379
3577
|
sideOffset: n,
|
|
@@ -3384,7 +3582,7 @@ function ai({ className: e, align: t = "center", sideOffset: n = 4, ...r }) {
|
|
|
3384
3582
|
}
|
|
3385
3583
|
//#endregion
|
|
3386
3584
|
//#region src/components/ui/item.tsx
|
|
3387
|
-
function
|
|
3585
|
+
function pi({ className: e, ...t }) {
|
|
3388
3586
|
return /* @__PURE__ */ X("div", {
|
|
3389
3587
|
role: "list",
|
|
3390
3588
|
"data-slot": "item-group",
|
|
@@ -3392,15 +3590,15 @@ function oi({ className: e, ...t }) {
|
|
|
3392
3590
|
...t
|
|
3393
3591
|
});
|
|
3394
3592
|
}
|
|
3395
|
-
function
|
|
3396
|
-
return /* @__PURE__ */ X(
|
|
3593
|
+
function mi({ className: e, ...t }) {
|
|
3594
|
+
return /* @__PURE__ */ X(ut, {
|
|
3397
3595
|
"data-slot": "item-separator",
|
|
3398
3596
|
orientation: "horizontal",
|
|
3399
3597
|
className: Q("my-2", e),
|
|
3400
3598
|
...t
|
|
3401
3599
|
});
|
|
3402
3600
|
}
|
|
3403
|
-
var
|
|
3601
|
+
var hi = U("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", {
|
|
3404
3602
|
variants: {
|
|
3405
3603
|
variant: {
|
|
3406
3604
|
default: "border-transparent",
|
|
@@ -3418,12 +3616,12 @@ var ci = W("group/item flex w-full flex-wrap items-center rounded-lg border text
|
|
|
3418
3616
|
size: "default"
|
|
3419
3617
|
}
|
|
3420
3618
|
});
|
|
3421
|
-
function
|
|
3422
|
-
return /* @__PURE__ */ X(r ?
|
|
3619
|
+
function gi({ className: e, variant: t = "default", size: n = "default", asChild: r = !1, ...i }) {
|
|
3620
|
+
return /* @__PURE__ */ X(r ? we.Root : "div", {
|
|
3423
3621
|
"data-slot": "item",
|
|
3424
3622
|
"data-variant": t,
|
|
3425
3623
|
"data-size": n,
|
|
3426
|
-
className: Q(
|
|
3624
|
+
className: Q(hi({
|
|
3427
3625
|
variant: t,
|
|
3428
3626
|
size: n,
|
|
3429
3627
|
className: e
|
|
@@ -3431,7 +3629,7 @@ function li({ className: e, variant: t = "default", size: n = "default", asChild
|
|
|
3431
3629
|
...i
|
|
3432
3630
|
});
|
|
3433
3631
|
}
|
|
3434
|
-
var
|
|
3632
|
+
var _i = U("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", {
|
|
3435
3633
|
variants: { variant: {
|
|
3436
3634
|
default: "bg-transparent",
|
|
3437
3635
|
icon: "[&_svg:not([class*='size-'])]:size-4",
|
|
@@ -3439,53 +3637,53 @@ var ui = W("flex shrink-0 items-center justify-center gap-2 group-has-data-[slot
|
|
|
3439
3637
|
} },
|
|
3440
3638
|
defaultVariants: { variant: "default" }
|
|
3441
3639
|
});
|
|
3442
|
-
function
|
|
3640
|
+
function vi({ className: e, variant: t = "default", ...n }) {
|
|
3443
3641
|
return /* @__PURE__ */ X("div", {
|
|
3444
3642
|
"data-slot": "item-media",
|
|
3445
3643
|
"data-variant": t,
|
|
3446
|
-
className: Q(
|
|
3644
|
+
className: Q(_i({
|
|
3447
3645
|
variant: t,
|
|
3448
3646
|
className: e
|
|
3449
3647
|
})),
|
|
3450
3648
|
...n
|
|
3451
3649
|
});
|
|
3452
3650
|
}
|
|
3453
|
-
function
|
|
3651
|
+
function yi({ className: e, ...t }) {
|
|
3454
3652
|
return /* @__PURE__ */ X("div", {
|
|
3455
3653
|
"data-slot": "item-content",
|
|
3456
3654
|
className: Q("flex flex-1 flex-col gap-1 group-data-[size=xs]/item:gap-0 [&+[data-slot=item-content]]:flex-none", e),
|
|
3457
3655
|
...t
|
|
3458
3656
|
});
|
|
3459
3657
|
}
|
|
3460
|
-
function
|
|
3658
|
+
function bi({ className: e, ...t }) {
|
|
3461
3659
|
return /* @__PURE__ */ X("div", {
|
|
3462
3660
|
"data-slot": "item-title",
|
|
3463
3661
|
className: Q("line-clamp-1 flex w-fit items-center gap-2 text-sm leading-snug font-medium underline-offset-4", e),
|
|
3464
3662
|
...t
|
|
3465
3663
|
});
|
|
3466
3664
|
}
|
|
3467
|
-
function
|
|
3665
|
+
function xi({ className: e, ...t }) {
|
|
3468
3666
|
return /* @__PURE__ */ X("p", {
|
|
3469
3667
|
"data-slot": "item-description",
|
|
3470
3668
|
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),
|
|
3471
3669
|
...t
|
|
3472
3670
|
});
|
|
3473
3671
|
}
|
|
3474
|
-
function
|
|
3672
|
+
function Si({ className: e, ...t }) {
|
|
3475
3673
|
return /* @__PURE__ */ X("div", {
|
|
3476
3674
|
"data-slot": "item-actions",
|
|
3477
3675
|
className: Q("flex items-center gap-2", e),
|
|
3478
3676
|
...t
|
|
3479
3677
|
});
|
|
3480
3678
|
}
|
|
3481
|
-
function
|
|
3679
|
+
function Ci({ className: e, ...t }) {
|
|
3482
3680
|
return /* @__PURE__ */ X("div", {
|
|
3483
3681
|
"data-slot": "item-header",
|
|
3484
3682
|
className: Q("flex basis-full items-center justify-between gap-2", e),
|
|
3485
3683
|
...t
|
|
3486
3684
|
});
|
|
3487
3685
|
}
|
|
3488
|
-
function
|
|
3686
|
+
function wi({ className: e, ...t }) {
|
|
3489
3687
|
return /* @__PURE__ */ X("div", {
|
|
3490
3688
|
"data-slot": "item-footer",
|
|
3491
3689
|
className: Q("flex basis-full items-center justify-between gap-2", e),
|
|
@@ -3494,10 +3692,10 @@ function _i({ className: e, ...t }) {
|
|
|
3494
3692
|
}
|
|
3495
3693
|
//#endregion
|
|
3496
3694
|
//#region src/components/ui/map.tsx
|
|
3497
|
-
var
|
|
3695
|
+
var Ti = {
|
|
3498
3696
|
dark: "https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json",
|
|
3499
3697
|
light: "https://basemaps.cartocdn.com/gl/positron-gl-style/style.json"
|
|
3500
|
-
},
|
|
3698
|
+
}, Ei = [
|
|
3501
3699
|
{
|
|
3502
3700
|
label: "Light",
|
|
3503
3701
|
url: "https://basemaps.cartocdn.com/gl/positron-gl-style/style.json"
|
|
@@ -3510,13 +3708,13 @@ var vi = {
|
|
|
3510
3708
|
label: "Dark",
|
|
3511
3709
|
url: "https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json"
|
|
3512
3710
|
}
|
|
3513
|
-
],
|
|
3514
|
-
function
|
|
3515
|
-
let e = o(
|
|
3711
|
+
], Di = r(null);
|
|
3712
|
+
function Oi() {
|
|
3713
|
+
let e = o(Di);
|
|
3516
3714
|
if (!e) throw Error("useMap must be used within a Map component");
|
|
3517
3715
|
return e;
|
|
3518
3716
|
}
|
|
3519
|
-
function
|
|
3717
|
+
function ki() {
|
|
3520
3718
|
return /* @__PURE__ */ X("div", {
|
|
3521
3719
|
className: "bg-background/50 absolute inset-0 z-10 flex items-center justify-center backdrop-blur-xs",
|
|
3522
3720
|
children: /* @__PURE__ */ Z("div", {
|
|
@@ -3529,7 +3727,7 @@ function Si() {
|
|
|
3529
3727
|
})
|
|
3530
3728
|
});
|
|
3531
3729
|
}
|
|
3532
|
-
function
|
|
3730
|
+
function Ai(e) {
|
|
3533
3731
|
let t = e.getCenter();
|
|
3534
3732
|
return {
|
|
3535
3733
|
center: [t.lng, t.lat],
|
|
@@ -3538,22 +3736,22 @@ function Ci(e) {
|
|
|
3538
3736
|
pitch: e.getPitch()
|
|
3539
3737
|
};
|
|
3540
3738
|
}
|
|
3541
|
-
var
|
|
3542
|
-
let v = h === !1 ? [] : h, y = d(null), [b, x] = f(null), [S, C] = f(!1), [w, T] = f(!1), [E,
|
|
3739
|
+
var ji = i(function({ children: e, className: t, theme: n, styles: r, projection: i, viewport: o, onViewportChange: c, loading: p = !1, controls: m = !0, tiles: h = Ei, ...g }, _) {
|
|
3740
|
+
let v = h === !1 ? [] : h, y = d(null), [b, x] = f(null), [S, C] = f(!1), [w, T] = f(!1), [E, D] = f(0), ee = d(null), te = d(null), O = d(!1), k = o !== void 0 && c !== void 0, A = d(c);
|
|
3543
3741
|
A.current = c;
|
|
3544
3742
|
let j = u(() => ({
|
|
3545
|
-
dark: r?.dark ??
|
|
3546
|
-
light: r?.light ??
|
|
3743
|
+
dark: r?.dark ?? Ti.dark,
|
|
3744
|
+
light: r?.light ?? Ti.light
|
|
3547
3745
|
}), [r]);
|
|
3548
3746
|
l(_, () => b, [b]);
|
|
3549
3747
|
let M = a(() => {
|
|
3550
|
-
|
|
3748
|
+
te.current &&= (clearTimeout(te.current), null);
|
|
3551
3749
|
}, []);
|
|
3552
3750
|
s(() => {
|
|
3553
3751
|
if (!y.current) return;
|
|
3554
3752
|
let e = v[0]?.url ?? j.light;
|
|
3555
|
-
|
|
3556
|
-
let t = new
|
|
3753
|
+
ee.current = e;
|
|
3754
|
+
let t = new Le.Map({
|
|
3557
3755
|
container: y.current,
|
|
3558
3756
|
style: e,
|
|
3559
3757
|
renderWorldCopies: !1,
|
|
@@ -3561,18 +3759,18 @@ var wi = i(function({ children: e, className: t, theme: n, styles: r, projection
|
|
|
3561
3759
|
...g,
|
|
3562
3760
|
...o
|
|
3563
3761
|
}), n = () => {
|
|
3564
|
-
M(),
|
|
3762
|
+
M(), te.current = setTimeout(() => {
|
|
3565
3763
|
T(!0), i && t.setProjection(i);
|
|
3566
3764
|
}, 100);
|
|
3567
3765
|
}, r = () => C(!0), a = () => {
|
|
3568
|
-
O.current || A.current?.(
|
|
3766
|
+
O.current || A.current?.(Ai(t));
|
|
3569
3767
|
};
|
|
3570
3768
|
return t.on("load", r), t.on("styledata", n), t.on("move", a), x(t), () => {
|
|
3571
3769
|
M(), t.off("load", r), t.off("styledata", n), t.off("move", a), t.remove(), C(!1), T(!1), x(null);
|
|
3572
3770
|
};
|
|
3573
3771
|
}, []), s(() => {
|
|
3574
3772
|
if (!b || !k || !o || b.isMoving()) return;
|
|
3575
|
-
let e =
|
|
3773
|
+
let e = Ai(b), t = {
|
|
3576
3774
|
center: o.center ?? e.center,
|
|
3577
3775
|
zoom: o.zoom ?? e.zoom,
|
|
3578
3776
|
bearing: o.bearing ?? e.bearing,
|
|
@@ -3586,7 +3784,7 @@ var wi = i(function({ children: e, className: t, theme: n, styles: r, projection
|
|
|
3586
3784
|
]), s(() => {
|
|
3587
3785
|
if (!b) return;
|
|
3588
3786
|
let e = v[E]?.url ?? (n === "dark" ? j.dark : j.light);
|
|
3589
|
-
|
|
3787
|
+
ee.current !== e && (M(), ee.current = e, T(!1), b.setStyle(e, { diff: !0 }));
|
|
3590
3788
|
}, [
|
|
3591
3789
|
b,
|
|
3592
3790
|
E,
|
|
@@ -3602,27 +3800,27 @@ var wi = i(function({ children: e, className: t, theme: n, styles: r, projection
|
|
|
3602
3800
|
S,
|
|
3603
3801
|
w
|
|
3604
3802
|
]);
|
|
3605
|
-
return /* @__PURE__ */ X(
|
|
3803
|
+
return /* @__PURE__ */ X(Di.Provider, {
|
|
3606
3804
|
value: N,
|
|
3607
3805
|
children: /* @__PURE__ */ Z("div", {
|
|
3608
3806
|
ref: y,
|
|
3609
3807
|
className: Q("relative h-full w-full", t),
|
|
3610
|
-
children: [(!S || p) && /* @__PURE__ */ X(
|
|
3808
|
+
children: [(!S || p) && /* @__PURE__ */ X(ki, {}), b && /* @__PURE__ */ Z(Y, { children: [m && /* @__PURE__ */ X(Gi, {
|
|
3611
3809
|
position: "top-right",
|
|
3612
3810
|
tiles: v,
|
|
3613
3811
|
tileIndex: E,
|
|
3614
|
-
onTileChange:
|
|
3812
|
+
onTileChange: D
|
|
3615
3813
|
}), e] })]
|
|
3616
3814
|
})
|
|
3617
3815
|
});
|
|
3618
|
-
}),
|
|
3619
|
-
function
|
|
3620
|
-
let e = o(
|
|
3816
|
+
}), Mi = r(null);
|
|
3817
|
+
function Ni() {
|
|
3818
|
+
let e = o(Mi);
|
|
3621
3819
|
if (!e) throw Error("Marker components must be used within MapMarker");
|
|
3622
3820
|
return e;
|
|
3623
3821
|
}
|
|
3624
|
-
function
|
|
3625
|
-
let { map: m } =
|
|
3822
|
+
function Pi({ longitude: e, latitude: t, children: n, onClick: r, onMouseEnter: i, onMouseLeave: a, onDragStart: o, onDrag: c, onDragEnd: l, draggable: f = !1, ...p }) {
|
|
3823
|
+
let { map: m } = Oi(), h = d({
|
|
3626
3824
|
onClick: r,
|
|
3627
3825
|
onMouseEnter: i,
|
|
3628
3826
|
onMouseLeave: a,
|
|
@@ -3639,7 +3837,7 @@ function Di({ longitude: e, latitude: t, children: n, onClick: r, onMouseEnter:
|
|
|
3639
3837
|
onDragEnd: l
|
|
3640
3838
|
};
|
|
3641
3839
|
let g = u(() => {
|
|
3642
|
-
let n = new
|
|
3840
|
+
let n = new Le.Marker({
|
|
3643
3841
|
...p,
|
|
3644
3842
|
element: document.createElement("div"),
|
|
3645
3843
|
draggable: f
|
|
@@ -3670,7 +3868,7 @@ function Di({ longitude: e, latitude: t, children: n, onClick: r, onMouseEnter:
|
|
|
3670
3868
|
};
|
|
3671
3869
|
}, [m]), (g.getLngLat().lng !== e || g.getLngLat().lat !== t) && g.setLngLat([e, t]), g.isDraggable() !== f && g.setDraggable(f);
|
|
3672
3870
|
let _ = g.getOffset(), v = p.offset ?? [0, 0], [y, b] = Array.isArray(v) ? v : [v.x, v.y];
|
|
3673
|
-
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(
|
|
3871
|
+
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(Mi.Provider, {
|
|
3674
3872
|
value: {
|
|
3675
3873
|
marker: g,
|
|
3676
3874
|
map: m
|
|
@@ -3678,27 +3876,27 @@ function Di({ longitude: e, latitude: t, children: n, onClick: r, onMouseEnter:
|
|
|
3678
3876
|
children: n
|
|
3679
3877
|
});
|
|
3680
3878
|
}
|
|
3681
|
-
function
|
|
3682
|
-
let { marker: n } =
|
|
3683
|
-
return
|
|
3879
|
+
function Fi({ children: e, className: t }) {
|
|
3880
|
+
let { marker: n } = Ni();
|
|
3881
|
+
return Re(/* @__PURE__ */ X("div", {
|
|
3684
3882
|
className: Q("relative cursor-pointer", t),
|
|
3685
|
-
children: e || /* @__PURE__ */ X(
|
|
3883
|
+
children: e || /* @__PURE__ */ X(Ii, {})
|
|
3686
3884
|
}), n.getElement());
|
|
3687
3885
|
}
|
|
3688
|
-
function
|
|
3886
|
+
function Ii() {
|
|
3689
3887
|
return /* @__PURE__ */ X("div", { className: "relative h-4 w-4 rounded-full border-2 border-white bg-blue-500 shadow-lg" });
|
|
3690
3888
|
}
|
|
3691
|
-
function
|
|
3889
|
+
function Li({ onClick: e }) {
|
|
3692
3890
|
return /* @__PURE__ */ X("button", {
|
|
3693
3891
|
type: "button",
|
|
3694
3892
|
onClick: e,
|
|
3695
3893
|
"aria-label": "Close popup",
|
|
3696
3894
|
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",
|
|
3697
|
-
children: /* @__PURE__ */ X(
|
|
3895
|
+
children: /* @__PURE__ */ X(he, { className: "size-3.5" })
|
|
3698
3896
|
});
|
|
3699
3897
|
}
|
|
3700
|
-
function
|
|
3701
|
-
let { marker: i, map: a } =
|
|
3898
|
+
function Ri({ children: e, className: t, closeButton: n = !1, ...r }) {
|
|
3899
|
+
let { marker: i, map: a } = Ni(), o = u(() => document.createElement("div"), []), c = d(r), l = u(() => new Le.Popup({
|
|
3702
3900
|
offset: 16,
|
|
3703
3901
|
...r,
|
|
3704
3902
|
closeButton: !1
|
|
@@ -3711,13 +3909,13 @@ function ji({ children: e, className: t, closeButton: n = !1, ...r }) {
|
|
|
3711
3909
|
let e = c.current;
|
|
3712
3910
|
e.offset !== r.offset && l.setOffset(r.offset ?? 16), e.maxWidth !== r.maxWidth && r.maxWidth && l.setMaxWidth(r.maxWidth ?? "none"), c.current = r;
|
|
3713
3911
|
}
|
|
3714
|
-
return
|
|
3912
|
+
return Re(/* @__PURE__ */ Z("div", {
|
|
3715
3913
|
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),
|
|
3716
|
-
children: [n && /* @__PURE__ */ X(
|
|
3914
|
+
children: [n && /* @__PURE__ */ X(Li, { onClick: () => l.remove() }), e]
|
|
3717
3915
|
}), o);
|
|
3718
3916
|
}
|
|
3719
|
-
function
|
|
3720
|
-
let { marker: r, map: i } =
|
|
3917
|
+
function zi({ children: e, className: t, ...n }) {
|
|
3918
|
+
let { marker: r, map: i } = Ni(), a = u(() => document.createElement("div"), []), o = d(n), c = u(() => new Le.Popup({
|
|
3721
3919
|
offset: 16,
|
|
3722
3920
|
...n,
|
|
3723
3921
|
closeOnClick: !0,
|
|
@@ -3736,12 +3934,12 @@ function Mi({ children: e, className: t, ...n }) {
|
|
|
3736
3934
|
let e = o.current;
|
|
3737
3935
|
e.offset !== n.offset && c.setOffset(n.offset ?? 16), e.maxWidth !== n.maxWidth && n.maxWidth && c.setMaxWidth(n.maxWidth ?? "none"), o.current = n;
|
|
3738
3936
|
}
|
|
3739
|
-
return
|
|
3937
|
+
return Re(/* @__PURE__ */ X("div", {
|
|
3740
3938
|
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),
|
|
3741
3939
|
children: e
|
|
3742
3940
|
}), a);
|
|
3743
3941
|
}
|
|
3744
|
-
function
|
|
3942
|
+
function Bi({ children: e, className: t, position: n = "top" }) {
|
|
3745
3943
|
return /* @__PURE__ */ X("div", {
|
|
3746
3944
|
className: Q("absolute left-1/2 -translate-x-1/2 whitespace-nowrap", "text-foreground text-[10px] font-medium", {
|
|
3747
3945
|
top: "bottom-full mb-1",
|
|
@@ -3750,19 +3948,19 @@ function Ni({ children: e, className: t, position: n = "top" }) {
|
|
|
3750
3948
|
children: e
|
|
3751
3949
|
});
|
|
3752
3950
|
}
|
|
3753
|
-
var
|
|
3951
|
+
var Vi = {
|
|
3754
3952
|
"top-left": "top-2 left-2",
|
|
3755
3953
|
"top-right": "top-2 right-2",
|
|
3756
3954
|
"bottom-left": "bottom-2 left-2",
|
|
3757
3955
|
"bottom-right": "bottom-10 right-2"
|
|
3758
3956
|
};
|
|
3759
|
-
function
|
|
3957
|
+
function Hi({ children: e }) {
|
|
3760
3958
|
return /* @__PURE__ */ X("div", {
|
|
3761
3959
|
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",
|
|
3762
3960
|
children: e
|
|
3763
3961
|
});
|
|
3764
3962
|
}
|
|
3765
|
-
function
|
|
3963
|
+
function Ui({ onClick: e, label: t, children: n, disabled: r = !1 }) {
|
|
3766
3964
|
return /* @__PURE__ */ X("button", {
|
|
3767
3965
|
onClick: e,
|
|
3768
3966
|
"aria-label": t,
|
|
@@ -3772,7 +3970,7 @@ function Ii({ onClick: e, label: t, children: n, disabled: r = !1 }) {
|
|
|
3772
3970
|
children: n
|
|
3773
3971
|
});
|
|
3774
3972
|
}
|
|
3775
|
-
function
|
|
3973
|
+
function Wi({ tiles: e, tileIndex: t, onTileChange: n, openLeft: r }) {
|
|
3776
3974
|
let [i, a] = f(!1), o = d(null);
|
|
3777
3975
|
return s(() => {
|
|
3778
3976
|
if (!i) return;
|
|
@@ -3787,10 +3985,10 @@ function Li({ tiles: e, tileIndex: t, onTileChange: n, openLeft: r }) {
|
|
|
3787
3985
|
}, [i]), /* @__PURE__ */ Z("div", {
|
|
3788
3986
|
ref: o,
|
|
3789
3987
|
className: "relative",
|
|
3790
|
-
children: [/* @__PURE__ */ X(
|
|
3988
|
+
children: [/* @__PURE__ */ X(Hi, { children: /* @__PURE__ */ X(Ui, {
|
|
3791
3989
|
onClick: () => a((e) => !e),
|
|
3792
3990
|
label: `Basemap: ${e[t]?.label ?? ""}`,
|
|
3793
|
-
children: /* @__PURE__ */ X(
|
|
3991
|
+
children: /* @__PURE__ */ X(I, { className: "size-4" })
|
|
3794
3992
|
}) }), i && /* @__PURE__ */ X("div", {
|
|
3795
3993
|
role: "listbox",
|
|
3796
3994
|
"aria-label": "Basemap",
|
|
@@ -3803,13 +4001,13 @@ function Li({ tiles: e, tileIndex: t, onTileChange: n, openLeft: r }) {
|
|
|
3803
4001
|
n?.(r), a(!1);
|
|
3804
4002
|
},
|
|
3805
4003
|
className: Q("flex w-full items-center justify-between gap-3 rounded-sm px-2 py-1.5 text-left text-xs font-medium transition-colors", r === t ? "bg-accent text-accent-foreground" : "hover:bg-accent/50"),
|
|
3806
|
-
children: [e.label, r === t && /* @__PURE__ */ X(
|
|
4004
|
+
children: [e.label, r === t && /* @__PURE__ */ X(g, { className: "size-3.5 shrink-0" })]
|
|
3807
4005
|
}, e.label))
|
|
3808
4006
|
})]
|
|
3809
4007
|
});
|
|
3810
4008
|
}
|
|
3811
|
-
function
|
|
3812
|
-
let { map: d } =
|
|
4009
|
+
function Gi({ 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 }) {
|
|
4010
|
+
let { map: d } = Oi(), [p, m] = f(!1), h = a(() => {
|
|
3813
4011
|
d?.zoomTo(d.getZoom() + 1, { duration: 300 });
|
|
3814
4012
|
}, [d]), g = a(() => {
|
|
3815
4013
|
d?.zoomTo(d.getZoom() - 1, { duration: 300 });
|
|
@@ -3834,40 +4032,40 @@ function Ri({ position: e = "bottom-right", showZoom: t = !0, showCompass: n = !
|
|
|
3834
4032
|
e && (document.fullscreenElement ? document.exitFullscreen() : e.requestFullscreen());
|
|
3835
4033
|
}, [d]);
|
|
3836
4034
|
return /* @__PURE__ */ Z("div", {
|
|
3837
|
-
className: Q("absolute z-10 flex flex-col gap-1.5",
|
|
4035
|
+
className: Q("absolute z-10 flex flex-col gap-1.5", Vi[e], o),
|
|
3838
4036
|
children: [
|
|
3839
|
-
t && /* @__PURE__ */ Z(
|
|
4037
|
+
t && /* @__PURE__ */ Z(Hi, { children: [/* @__PURE__ */ X(Ui, {
|
|
3840
4038
|
onClick: h,
|
|
3841
4039
|
label: "Zoom in",
|
|
3842
|
-
children: /* @__PURE__ */ X(
|
|
3843
|
-
}), /* @__PURE__ */ X(
|
|
4040
|
+
children: /* @__PURE__ */ X(B, { className: "size-4" })
|
|
4041
|
+
}), /* @__PURE__ */ X(Ui, {
|
|
3844
4042
|
onClick: g,
|
|
3845
4043
|
label: "Zoom out",
|
|
3846
|
-
children: /* @__PURE__ */ X(
|
|
4044
|
+
children: /* @__PURE__ */ X(z, { className: "size-4" })
|
|
3847
4045
|
})] }),
|
|
3848
|
-
c.length > 1 && /* @__PURE__ */ X(
|
|
4046
|
+
c.length > 1 && /* @__PURE__ */ X(Wi, {
|
|
3849
4047
|
tiles: c,
|
|
3850
4048
|
tileIndex: l,
|
|
3851
4049
|
onTileChange: u,
|
|
3852
4050
|
openLeft: e.endsWith("right")
|
|
3853
4051
|
}),
|
|
3854
|
-
n && /* @__PURE__ */ X(
|
|
3855
|
-
r && /* @__PURE__ */ X(
|
|
4052
|
+
n && /* @__PURE__ */ X(Hi, { children: /* @__PURE__ */ X(Ki, { onClick: _ }) }),
|
|
4053
|
+
r && /* @__PURE__ */ X(Hi, { children: /* @__PURE__ */ X(Ui, {
|
|
3856
4054
|
onClick: v,
|
|
3857
4055
|
label: "Find my location",
|
|
3858
4056
|
disabled: p,
|
|
3859
|
-
children: p ? /* @__PURE__ */ X(ne, { className: "size-4 animate-spin" }) : /* @__PURE__ */ X(
|
|
4057
|
+
children: p ? /* @__PURE__ */ X(ne, { className: "size-4 animate-spin" }) : /* @__PURE__ */ X(ie, { className: "size-4" })
|
|
3860
4058
|
}) }),
|
|
3861
|
-
i && /* @__PURE__ */ X(
|
|
4059
|
+
i && /* @__PURE__ */ X(Hi, { children: /* @__PURE__ */ X(Ui, {
|
|
3862
4060
|
onClick: y,
|
|
3863
4061
|
label: "Toggle fullscreen",
|
|
3864
|
-
children: /* @__PURE__ */ X(
|
|
4062
|
+
children: /* @__PURE__ */ X(R, { className: "size-4" })
|
|
3865
4063
|
}) })
|
|
3866
4064
|
]
|
|
3867
4065
|
});
|
|
3868
4066
|
}
|
|
3869
|
-
function
|
|
3870
|
-
let { map: t } =
|
|
4067
|
+
function Ki({ onClick: e }) {
|
|
4068
|
+
let { map: t } = Oi(), n = d(null);
|
|
3871
4069
|
return s(() => {
|
|
3872
4070
|
if (!t || !n.current) return;
|
|
3873
4071
|
let e = n.current, r = () => {
|
|
@@ -3877,7 +4075,7 @@ function zi({ onClick: e }) {
|
|
|
3877
4075
|
return t.on("rotate", r), t.on("pitch", r), r(), () => {
|
|
3878
4076
|
t.off("rotate", r), t.off("pitch", r);
|
|
3879
4077
|
};
|
|
3880
|
-
}, [t]), /* @__PURE__ */ X(
|
|
4078
|
+
}, [t]), /* @__PURE__ */ X(Ui, {
|
|
3881
4079
|
onClick: e,
|
|
3882
4080
|
label: "Reset bearing to north",
|
|
3883
4081
|
children: /* @__PURE__ */ Z("svg", {
|
|
@@ -3906,10 +4104,10 @@ function zi({ onClick: e }) {
|
|
|
3906
4104
|
})
|
|
3907
4105
|
});
|
|
3908
4106
|
}
|
|
3909
|
-
function
|
|
3910
|
-
let { map: c } =
|
|
4107
|
+
function qi({ longitude: e, latitude: t, onClose: n, children: r, className: i, closeButton: a = !1, ...o }) {
|
|
4108
|
+
let { map: c } = Oi(), l = d(o), f = d(n);
|
|
3911
4109
|
f.current = n;
|
|
3912
|
-
let p = u(() => document.createElement("div"), []), m = u(() => new
|
|
4110
|
+
let p = u(() => document.createElement("div"), []), m = u(() => new Le.Popup({
|
|
3913
4111
|
offset: 16,
|
|
3914
4112
|
...o,
|
|
3915
4113
|
closeButton: !1
|
|
@@ -3924,15 +4122,15 @@ function Bi({ longitude: e, latitude: t, onClose: n, children: r, className: i,
|
|
|
3924
4122
|
let n = l.current;
|
|
3925
4123
|
(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;
|
|
3926
4124
|
}
|
|
3927
|
-
return
|
|
4125
|
+
return Re(/* @__PURE__ */ Z("div", {
|
|
3928
4126
|
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),
|
|
3929
|
-
children: [a && /* @__PURE__ */ X(
|
|
4127
|
+
children: [a && /* @__PURE__ */ X(Li, { onClick: () => {
|
|
3930
4128
|
m.remove();
|
|
3931
4129
|
} }), r]
|
|
3932
4130
|
}), p);
|
|
3933
4131
|
}
|
|
3934
|
-
function
|
|
3935
|
-
let { map: f, isLoaded: p } =
|
|
4132
|
+
function Ji({ id: e, coordinates: t, color: n = "#4285F4", width: r = 3, opacity: i = .8, dashArray: a, onClick: o, onMouseEnter: l, onMouseLeave: u, interactive: d = !0 }) {
|
|
4133
|
+
let { map: f, isLoaded: p } = Oi(), m = c(), h = e ?? m, g = `route-source-${h}`, _ = `route-layer-${h}`;
|
|
3936
4134
|
return s(() => {
|
|
3937
4135
|
if (!(!p || !f)) return f.addSource(g, {
|
|
3938
4136
|
type: "geojson",
|
|
@@ -4011,15 +4209,15 @@ function Vi({ id: e, coordinates: t, color: n = "#4285F4", width: r = 3, opacity
|
|
|
4011
4209
|
d
|
|
4012
4210
|
]), null;
|
|
4013
4211
|
}
|
|
4014
|
-
var
|
|
4212
|
+
var Yi = .2, Xi = 64, Zi = 12, Qi = 6, $i = {
|
|
4015
4213
|
"line-color": "#4285F4",
|
|
4016
4214
|
"line-width": 2,
|
|
4017
4215
|
"line-opacity": .85
|
|
4018
|
-
},
|
|
4216
|
+
}, ea = {
|
|
4019
4217
|
"line-join": "round",
|
|
4020
4218
|
"line-cap": "round"
|
|
4021
4219
|
};
|
|
4022
|
-
function
|
|
4220
|
+
function ta(e, t) {
|
|
4023
4221
|
if (!t) return e;
|
|
4024
4222
|
let n = { ...e };
|
|
4025
4223
|
for (let [e, r] of Object.entries(t)) {
|
|
@@ -4038,7 +4236,7 @@ function Ji(e, t) {
|
|
|
4038
4236
|
}
|
|
4039
4237
|
return n;
|
|
4040
4238
|
}
|
|
4041
|
-
function
|
|
4239
|
+
function na(e, t, n, r) {
|
|
4042
4240
|
let [i, a] = e, [o, s] = t, c = o - i, l = s - a, u = Math.hypot(c, l);
|
|
4043
4241
|
if (u === 0 || n === 0) return [e, t];
|
|
4044
4242
|
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));
|
|
@@ -4048,16 +4246,16 @@ function Yi(e, t, n, r) {
|
|
|
4048
4246
|
}
|
|
4049
4247
|
return v;
|
|
4050
4248
|
}
|
|
4051
|
-
function
|
|
4052
|
-
let { map: h, isLoaded: g } =
|
|
4053
|
-
|
|
4249
|
+
function ra({ data: e, id: t, curvature: n = Yi, samples: r = Xi, paint: i, layout: a, hoverPaint: o, onClick: l, onHover: f, interactive: p = !0, beforeId: m }) {
|
|
4250
|
+
let { map: h, isLoaded: g } = Oi(), _ = c(), v = t ?? _, y = `arc-source-${v}`, b = `arc-layer-${v}`, x = `arc-hit-layer-${v}`, S = u(() => ta({
|
|
4251
|
+
...$i,
|
|
4054
4252
|
...i
|
|
4055
4253
|
}, o), [i, o]), C = u(() => ({
|
|
4056
|
-
...
|
|
4254
|
+
...ea,
|
|
4057
4255
|
...a
|
|
4058
4256
|
}), [a]), w = u(() => {
|
|
4059
|
-
let e = i?.["line-width"] ??
|
|
4060
|
-
return Math.max((typeof e == "number" ? e :
|
|
4257
|
+
let e = i?.["line-width"] ?? $i["line-width"];
|
|
4258
|
+
return Math.max((typeof e == "number" ? e : Zi) + Qi, Zi);
|
|
4061
4259
|
}, [i]), T = u(() => ({
|
|
4062
4260
|
type: "FeatureCollection",
|
|
4063
4261
|
features: e.map((e) => {
|
|
@@ -4067,7 +4265,7 @@ function Xi({ data: e, id: t, curvature: n = Hi, samples: r = Ui, paint: i, layo
|
|
|
4067
4265
|
properties: a,
|
|
4068
4266
|
geometry: {
|
|
4069
4267
|
type: "LineString",
|
|
4070
|
-
coordinates:
|
|
4268
|
+
coordinates: na(t, i, n, r)
|
|
4071
4269
|
}
|
|
4072
4270
|
};
|
|
4073
4271
|
})
|
|
@@ -4093,7 +4291,7 @@ function Xi({ data: e, id: t, curvature: n = Hi, samples: r = Ui, paint: i, layo
|
|
|
4093
4291
|
id: x,
|
|
4094
4292
|
type: "line",
|
|
4095
4293
|
source: y,
|
|
4096
|
-
layout:
|
|
4294
|
+
layout: ea,
|
|
4097
4295
|
paint: {
|
|
4098
4296
|
"line-color": "rgba(0, 0, 0, 0)",
|
|
4099
4297
|
"line-width": w,
|
|
@@ -4176,12 +4374,12 @@ function Xi({ data: e, id: t, curvature: n = Hi, samples: r = Ui, paint: i, layo
|
|
|
4176
4374
|
p
|
|
4177
4375
|
]), null;
|
|
4178
4376
|
}
|
|
4179
|
-
function
|
|
4377
|
+
function ia({ data: e, clusterMaxZoom: t = 14, clusterRadius: n = 50, clusterColors: r = [
|
|
4180
4378
|
"#22c55e",
|
|
4181
4379
|
"#eab308",
|
|
4182
4380
|
"#ef4444"
|
|
4183
4381
|
], clusterThresholds: i = [100, 750], pointColor: a = "#3b82f6", onPointClick: o, onClusterClick: l }) {
|
|
4184
|
-
let { map: u, isLoaded: f } =
|
|
4382
|
+
let { map: u, isLoaded: f } = Oi(), p = c(), m = `cluster-source-${p}`, h = `clusters-${p}`, g = `cluster-count-${p}`, _ = `unclustered-point-${p}`, v = d({
|
|
4185
4383
|
clusterColors: r,
|
|
4186
4384
|
clusterThresholds: i,
|
|
4187
4385
|
pointColor: a
|
|
@@ -4336,12 +4534,12 @@ function Zi({ data: e, clusterMaxZoom: t = 14, clusterRadius: n = 50, clusterCol
|
|
|
4336
4534
|
}
|
|
4337
4535
|
//#endregion
|
|
4338
4536
|
//#region src/components/ui/progress.tsx
|
|
4339
|
-
function
|
|
4340
|
-
return /* @__PURE__ */ X(
|
|
4537
|
+
function aa({ className: e, value: t, ...n }) {
|
|
4538
|
+
return /* @__PURE__ */ X(be.Root, {
|
|
4341
4539
|
"data-slot": "progress",
|
|
4342
4540
|
className: Q("relative flex h-1 w-full items-center overflow-x-hidden rounded-full bg-muted", e),
|
|
4343
4541
|
...n,
|
|
4344
|
-
children: /* @__PURE__ */ X(
|
|
4542
|
+
children: /* @__PURE__ */ X(be.Indicator, {
|
|
4345
4543
|
"data-slot": "progress-indicator",
|
|
4346
4544
|
className: "size-full flex-1 bg-primary transition-all",
|
|
4347
4545
|
style: { transform: `translateX(-${100 - (t || 0)}%)` }
|
|
@@ -4350,26 +4548,26 @@ function Qi({ className: e, value: t, ...n }) {
|
|
|
4350
4548
|
}
|
|
4351
4549
|
//#endregion
|
|
4352
4550
|
//#region src/components/ui/select.tsx
|
|
4353
|
-
function
|
|
4551
|
+
function oa({ ...e }) {
|
|
4354
4552
|
return /* @__PURE__ */ X(J.Root, {
|
|
4355
4553
|
"data-slot": "select",
|
|
4356
4554
|
...e
|
|
4357
4555
|
});
|
|
4358
4556
|
}
|
|
4359
|
-
function
|
|
4557
|
+
function sa({ className: e, ...t }) {
|
|
4360
4558
|
return /* @__PURE__ */ X(J.Group, {
|
|
4361
4559
|
"data-slot": "select-group",
|
|
4362
4560
|
className: Q("scroll-my-1 p-1", e),
|
|
4363
4561
|
...t
|
|
4364
4562
|
});
|
|
4365
4563
|
}
|
|
4366
|
-
function
|
|
4564
|
+
function ca({ ...e }) {
|
|
4367
4565
|
return /* @__PURE__ */ X(J.Value, {
|
|
4368
4566
|
"data-slot": "select-value",
|
|
4369
4567
|
...e
|
|
4370
4568
|
});
|
|
4371
4569
|
}
|
|
4372
|
-
function
|
|
4570
|
+
function la({ className: e, size: t = "default", children: n, ...r }) {
|
|
4373
4571
|
return /* @__PURE__ */ Z(J.Trigger, {
|
|
4374
4572
|
"data-slot": "select-trigger",
|
|
4375
4573
|
"data-size": t,
|
|
@@ -4377,11 +4575,11 @@ function na({ className: e, size: t = "default", children: n, ...r }) {
|
|
|
4377
4575
|
...r,
|
|
4378
4576
|
children: [n, /* @__PURE__ */ X(J.Icon, {
|
|
4379
4577
|
asChild: !0,
|
|
4380
|
-
children: /* @__PURE__ */ X(
|
|
4578
|
+
children: /* @__PURE__ */ X(y, { className: "pointer-events-none size-4 text-muted-foreground" })
|
|
4381
4579
|
})]
|
|
4382
4580
|
});
|
|
4383
4581
|
}
|
|
4384
|
-
function
|
|
4582
|
+
function ua({ className: e, children: t, position: n = "item-aligned", align: r = "center", ...i }) {
|
|
4385
4583
|
return /* @__PURE__ */ X(J.Portal, { children: /* @__PURE__ */ Z(J.Content, {
|
|
4386
4584
|
"data-slot": "select-content",
|
|
4387
4585
|
"data-align-trigger": n === "item-aligned",
|
|
@@ -4390,67 +4588,67 @@ function ra({ className: e, children: t, position: n = "item-aligned", align: r
|
|
|
4390
4588
|
align: r,
|
|
4391
4589
|
...i,
|
|
4392
4590
|
children: [
|
|
4393
|
-
/* @__PURE__ */ X(
|
|
4591
|
+
/* @__PURE__ */ X(ma, {}),
|
|
4394
4592
|
/* @__PURE__ */ X(J.Viewport, {
|
|
4395
4593
|
"data-position": n,
|
|
4396
4594
|
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" && ""),
|
|
4397
4595
|
children: t
|
|
4398
4596
|
}),
|
|
4399
|
-
/* @__PURE__ */ X(
|
|
4597
|
+
/* @__PURE__ */ X(ha, {})
|
|
4400
4598
|
]
|
|
4401
4599
|
}) });
|
|
4402
4600
|
}
|
|
4403
|
-
function
|
|
4601
|
+
function da({ className: e, ...t }) {
|
|
4404
4602
|
return /* @__PURE__ */ X(J.Label, {
|
|
4405
4603
|
"data-slot": "select-label",
|
|
4406
4604
|
className: Q("px-1.5 py-1 text-xs text-muted-foreground", e),
|
|
4407
4605
|
...t
|
|
4408
4606
|
});
|
|
4409
4607
|
}
|
|
4410
|
-
function
|
|
4608
|
+
function fa({ className: e, children: t, ...n }) {
|
|
4411
4609
|
return /* @__PURE__ */ Z(J.Item, {
|
|
4412
4610
|
"data-slot": "select-item",
|
|
4413
4611
|
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),
|
|
4414
4612
|
...n,
|
|
4415
4613
|
children: [/* @__PURE__ */ X("span", {
|
|
4416
4614
|
className: "pointer-events-none absolute right-2 flex size-4 items-center justify-center",
|
|
4417
|
-
children: /* @__PURE__ */ X(J.ItemIndicator, { children: /* @__PURE__ */ X(
|
|
4615
|
+
children: /* @__PURE__ */ X(J.ItemIndicator, { children: /* @__PURE__ */ X(_, { className: "pointer-events-none" }) })
|
|
4418
4616
|
}), /* @__PURE__ */ X(J.ItemText, { children: t })]
|
|
4419
4617
|
});
|
|
4420
4618
|
}
|
|
4421
|
-
function
|
|
4619
|
+
function pa({ className: e, ...t }) {
|
|
4422
4620
|
return /* @__PURE__ */ X(J.Separator, {
|
|
4423
4621
|
"data-slot": "select-separator",
|
|
4424
4622
|
className: Q("pointer-events-none -mx-1 my-1 h-px bg-border", e),
|
|
4425
4623
|
...t
|
|
4426
4624
|
});
|
|
4427
4625
|
}
|
|
4428
|
-
function
|
|
4626
|
+
function ma({ className: e, ...t }) {
|
|
4429
4627
|
return /* @__PURE__ */ X(J.ScrollUpButton, {
|
|
4430
4628
|
"data-slot": "select-scroll-up-button",
|
|
4431
4629
|
className: Q("z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4", e),
|
|
4432
4630
|
...t,
|
|
4433
|
-
children: /* @__PURE__ */ X(
|
|
4631
|
+
children: /* @__PURE__ */ X(S, {})
|
|
4434
4632
|
});
|
|
4435
4633
|
}
|
|
4436
|
-
function
|
|
4634
|
+
function ha({ className: e, ...t }) {
|
|
4437
4635
|
return /* @__PURE__ */ X(J.ScrollDownButton, {
|
|
4438
4636
|
"data-slot": "select-scroll-down-button",
|
|
4439
4637
|
className: Q("z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4", e),
|
|
4440
4638
|
...t,
|
|
4441
|
-
children: /* @__PURE__ */ X(
|
|
4639
|
+
children: /* @__PURE__ */ X(y, {})
|
|
4442
4640
|
});
|
|
4443
4641
|
}
|
|
4444
4642
|
//#endregion
|
|
4445
4643
|
//#region src/components/ui/slider.tsx
|
|
4446
|
-
function
|
|
4644
|
+
function ga({ className: e, defaultValue: t, value: r, min: i = 0, max: a = 100, ...o }) {
|
|
4447
4645
|
let s = n.useMemo(() => Array.isArray(r) ? r : Array.isArray(t) ? t : [i, a], [
|
|
4448
4646
|
r,
|
|
4449
4647
|
t,
|
|
4450
4648
|
i,
|
|
4451
4649
|
a
|
|
4452
4650
|
]);
|
|
4453
|
-
return /* @__PURE__ */ Z(
|
|
4651
|
+
return /* @__PURE__ */ Z(Ce.Root, {
|
|
4454
4652
|
"data-slot": "slider",
|
|
4455
4653
|
defaultValue: t,
|
|
4456
4654
|
value: r,
|
|
@@ -4458,14 +4656,14 @@ function la({ className: e, defaultValue: t, value: r, min: i = 0, max: a = 100,
|
|
|
4458
4656
|
max: a,
|
|
4459
4657
|
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),
|
|
4460
4658
|
...o,
|
|
4461
|
-
children: [/* @__PURE__ */ X(
|
|
4659
|
+
children: [/* @__PURE__ */ X(Ce.Track, {
|
|
4462
4660
|
"data-slot": "slider-track",
|
|
4463
4661
|
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",
|
|
4464
|
-
children: /* @__PURE__ */ X(
|
|
4662
|
+
children: /* @__PURE__ */ X(Ce.Range, {
|
|
4465
4663
|
"data-slot": "slider-range",
|
|
4466
4664
|
className: "absolute bg-primary select-none data-horizontal:h-full data-vertical:w-full"
|
|
4467
4665
|
})
|
|
4468
|
-
}), Array.from({ length: s.length }, (e, t) => /* @__PURE__ */ X(
|
|
4666
|
+
}), Array.from({ length: s.length }, (e, t) => /* @__PURE__ */ X(Ce.Thumb, {
|
|
4469
4667
|
"data-slot": "slider-thumb",
|
|
4470
4668
|
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"
|
|
4471
4669
|
}, t))]
|
|
@@ -4473,17 +4671,17 @@ function la({ className: e, defaultValue: t, value: r, min: i = 0, max: a = 100,
|
|
|
4473
4671
|
}
|
|
4474
4672
|
//#endregion
|
|
4475
4673
|
//#region src/components/ui/sonner.tsx
|
|
4476
|
-
var
|
|
4477
|
-
let { theme: t = "system" } =
|
|
4478
|
-
return /* @__PURE__ */ X(
|
|
4674
|
+
var _a = ({ ...e }) => {
|
|
4675
|
+
let { theme: t = "system" } = ze();
|
|
4676
|
+
return /* @__PURE__ */ X(Be, {
|
|
4479
4677
|
theme: t,
|
|
4480
4678
|
className: "toaster group",
|
|
4481
4679
|
icons: {
|
|
4482
|
-
success: /* @__PURE__ */ X(
|
|
4483
|
-
info: /* @__PURE__ */ X(
|
|
4484
|
-
warning: /* @__PURE__ */ X(
|
|
4485
|
-
error: /* @__PURE__ */ X(
|
|
4486
|
-
loading: /* @__PURE__ */ X(
|
|
4680
|
+
success: /* @__PURE__ */ X(T, { className: "size-4" }),
|
|
4681
|
+
info: /* @__PURE__ */ X(F, { className: "size-4" }),
|
|
4682
|
+
warning: /* @__PURE__ */ X(H, { className: "size-4" }),
|
|
4683
|
+
error: /* @__PURE__ */ X(oe, { className: "size-4" }),
|
|
4684
|
+
loading: /* @__PURE__ */ X(re, { className: "size-4 animate-spin" })
|
|
4487
4685
|
},
|
|
4488
4686
|
style: {
|
|
4489
4687
|
"--normal-bg": "var(--popover)",
|
|
@@ -4494,20 +4692,20 @@ var ua = ({ ...e }) => {
|
|
|
4494
4692
|
toastOptions: { classNames: { toast: "cn-toast" } },
|
|
4495
4693
|
...e
|
|
4496
4694
|
});
|
|
4497
|
-
},
|
|
4498
|
-
let e = o(
|
|
4695
|
+
}, va = r(void 0), ya = r(void 0), ba = () => {
|
|
4696
|
+
let e = o(va);
|
|
4499
4697
|
if (!e) throw Error("useStepper must be used within a Stepper");
|
|
4500
4698
|
return e;
|
|
4501
|
-
},
|
|
4502
|
-
let e = o(
|
|
4699
|
+
}, xa = () => {
|
|
4700
|
+
let e = o(ya);
|
|
4503
4701
|
if (!e) throw Error("useStepItem must be used within a StepperItem");
|
|
4504
4702
|
return e;
|
|
4505
4703
|
};
|
|
4506
|
-
function
|
|
4704
|
+
function Sa({ defaultValue: e = 0, value: t, onValueChange: r, orientation: i = "horizontal", className: a, ...o }) {
|
|
4507
4705
|
let [s, c] = n.useState(e), l = n.useCallback((e) => {
|
|
4508
4706
|
t === void 0 && c(e), r?.(e);
|
|
4509
4707
|
}, [t, r]), u = t ?? s;
|
|
4510
|
-
return /* @__PURE__ */ X(
|
|
4708
|
+
return /* @__PURE__ */ X(va.Provider, {
|
|
4511
4709
|
value: {
|
|
4512
4710
|
activeStep: u,
|
|
4513
4711
|
orientation: i,
|
|
@@ -4521,9 +4719,9 @@ function ha({ defaultValue: e = 0, value: t, onValueChange: r, orientation: i =
|
|
|
4521
4719
|
})
|
|
4522
4720
|
});
|
|
4523
4721
|
}
|
|
4524
|
-
function
|
|
4525
|
-
let { activeStep: s } =
|
|
4526
|
-
return /* @__PURE__ */ X(
|
|
4722
|
+
function Ca({ step: e, completed: t = !1, disabled: n = !1, loading: r = !1, className: i, children: a, ...o }) {
|
|
4723
|
+
let { activeStep: s } = ba(), c = t || e < s ? "completed" : s === e ? "active" : "inactive", l = r && e === s;
|
|
4724
|
+
return /* @__PURE__ */ X(ya.Provider, {
|
|
4527
4725
|
value: {
|
|
4528
4726
|
isDisabled: n,
|
|
4529
4727
|
isLoading: l,
|
|
@@ -4540,9 +4738,9 @@ function ga({ step: e, completed: t = !1, disabled: n = !1, loading: r = !1, cla
|
|
|
4540
4738
|
})
|
|
4541
4739
|
});
|
|
4542
4740
|
}
|
|
4543
|
-
function
|
|
4544
|
-
let { setActiveStep: i } =
|
|
4545
|
-
return e ? /* @__PURE__ */ X(e ?
|
|
4741
|
+
function wa({ asChild: e = !1, className: t, children: n, ...r }) {
|
|
4742
|
+
let { setActiveStep: i } = ba(), { step: a, isDisabled: o } = xa();
|
|
4743
|
+
return e ? /* @__PURE__ */ X(e ? we.Root : "span", {
|
|
4546
4744
|
className: t,
|
|
4547
4745
|
"data-slot": "stepper-trigger",
|
|
4548
4746
|
children: n
|
|
@@ -4556,8 +4754,8 @@ function _a({ asChild: e = !1, className: t, children: n, ...r }) {
|
|
|
4556
4754
|
children: n
|
|
4557
4755
|
});
|
|
4558
4756
|
}
|
|
4559
|
-
function
|
|
4560
|
-
let { state: i, step: a, isLoading: o } =
|
|
4757
|
+
function Ta({ asChild: e = !1, className: t, children: n, ...r }) {
|
|
4758
|
+
let { state: i, step: a, isLoading: o } = xa();
|
|
4561
4759
|
return /* @__PURE__ */ X("span", {
|
|
4562
4760
|
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),
|
|
4563
4761
|
"data-slot": "stepper-indicator",
|
|
@@ -4568,14 +4766,14 @@ function va({ asChild: e = !1, className: t, children: n, ...r }) {
|
|
|
4568
4766
|
className: "transition-all group-data-[state=completed]/step:scale-0 group-data-loading/step:scale-0 group-data-[state=completed]/step:opacity-0 group-data-loading/step:opacity-0 group-data-loading/step:transition-none",
|
|
4569
4767
|
children: a
|
|
4570
4768
|
}),
|
|
4571
|
-
/* @__PURE__ */ X(
|
|
4769
|
+
/* @__PURE__ */ X(_, {
|
|
4572
4770
|
"aria-hidden": "true",
|
|
4573
4771
|
className: "absolute scale-0 opacity-0 transition-all group-data-[state=completed]/step:scale-100 group-data-[state=completed]/step:opacity-100",
|
|
4574
4772
|
size: 16
|
|
4575
4773
|
}),
|
|
4576
4774
|
o && /* @__PURE__ */ X("span", {
|
|
4577
4775
|
className: "absolute transition-all",
|
|
4578
|
-
children: /* @__PURE__ */ X(
|
|
4776
|
+
children: /* @__PURE__ */ X(L, {
|
|
4579
4777
|
"aria-hidden": "true",
|
|
4580
4778
|
className: "animate-spin",
|
|
4581
4779
|
size: 14
|
|
@@ -4584,21 +4782,21 @@ function va({ asChild: e = !1, className: t, children: n, ...r }) {
|
|
|
4584
4782
|
] })
|
|
4585
4783
|
});
|
|
4586
4784
|
}
|
|
4587
|
-
function
|
|
4785
|
+
function Ea({ className: e, ...t }) {
|
|
4588
4786
|
return /* @__PURE__ */ X("h3", {
|
|
4589
4787
|
className: Q("font-medium text-sm", e),
|
|
4590
4788
|
"data-slot": "stepper-title",
|
|
4591
4789
|
...t
|
|
4592
4790
|
});
|
|
4593
4791
|
}
|
|
4594
|
-
function
|
|
4792
|
+
function Da({ className: e, ...t }) {
|
|
4595
4793
|
return /* @__PURE__ */ X("p", {
|
|
4596
4794
|
className: Q("text-muted-foreground text-sm", e),
|
|
4597
4795
|
"data-slot": "stepper-description",
|
|
4598
4796
|
...t
|
|
4599
4797
|
});
|
|
4600
4798
|
}
|
|
4601
|
-
function
|
|
4799
|
+
function Oa({ className: e, ...t }) {
|
|
4602
4800
|
return /* @__PURE__ */ X("div", {
|
|
4603
4801
|
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),
|
|
4604
4802
|
"data-slot": "stepper-separator",
|
|
@@ -4607,13 +4805,13 @@ function xa({ className: e, ...t }) {
|
|
|
4607
4805
|
}
|
|
4608
4806
|
//#endregion
|
|
4609
4807
|
//#region src/components/ui/switch.tsx
|
|
4610
|
-
function
|
|
4611
|
-
return /* @__PURE__ */ X(
|
|
4808
|
+
function ka({ className: e, size: t = "default", ...n }) {
|
|
4809
|
+
return /* @__PURE__ */ X(Te.Root, {
|
|
4612
4810
|
"data-slot": "switch",
|
|
4613
4811
|
"data-size": t,
|
|
4614
4812
|
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),
|
|
4615
4813
|
...n,
|
|
4616
|
-
children: /* @__PURE__ */ X(
|
|
4814
|
+
children: /* @__PURE__ */ X(Te.Thumb, {
|
|
4617
4815
|
"data-slot": "switch-thumb",
|
|
4618
4816
|
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"
|
|
4619
4817
|
})
|
|
@@ -4621,38 +4819,38 @@ function Sa({ className: e, size: t = "default", ...n }) {
|
|
|
4621
4819
|
}
|
|
4622
4820
|
//#endregion
|
|
4623
4821
|
//#region src/components/ui/tabs.tsx
|
|
4624
|
-
function
|
|
4625
|
-
return /* @__PURE__ */ X(
|
|
4822
|
+
function Aa({ className: e, orientation: t = "horizontal", ...n }) {
|
|
4823
|
+
return /* @__PURE__ */ X(Ee.Root, {
|
|
4626
4824
|
"data-slot": "tabs",
|
|
4627
4825
|
"data-orientation": t,
|
|
4628
4826
|
className: Q("group/tabs flex gap-2 data-horizontal:flex-col", e),
|
|
4629
4827
|
...n
|
|
4630
4828
|
});
|
|
4631
4829
|
}
|
|
4632
|
-
var
|
|
4830
|
+
var ja = U("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", {
|
|
4633
4831
|
variants: { variant: {
|
|
4634
4832
|
default: "bg-muted",
|
|
4635
4833
|
line: "gap-1 bg-transparent"
|
|
4636
4834
|
} },
|
|
4637
4835
|
defaultVariants: { variant: "default" }
|
|
4638
4836
|
});
|
|
4639
|
-
function
|
|
4640
|
-
return /* @__PURE__ */ X(
|
|
4837
|
+
function Ma({ className: e, variant: t = "default", ...n }) {
|
|
4838
|
+
return /* @__PURE__ */ X(Ee.List, {
|
|
4641
4839
|
"data-slot": "tabs-list",
|
|
4642
4840
|
"data-variant": t,
|
|
4643
|
-
className: Q(
|
|
4841
|
+
className: Q(ja({ variant: t }), e),
|
|
4644
4842
|
...n
|
|
4645
4843
|
});
|
|
4646
4844
|
}
|
|
4647
|
-
function
|
|
4648
|
-
return /* @__PURE__ */ X(
|
|
4845
|
+
function Na({ className: e, ...t }) {
|
|
4846
|
+
return /* @__PURE__ */ X(Ee.Trigger, {
|
|
4649
4847
|
"data-slot": "tabs-trigger",
|
|
4650
4848
|
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),
|
|
4651
4849
|
...t
|
|
4652
4850
|
});
|
|
4653
4851
|
}
|
|
4654
|
-
function
|
|
4655
|
-
return /* @__PURE__ */ X(
|
|
4852
|
+
function Pa({ className: e, ...t }) {
|
|
4853
|
+
return /* @__PURE__ */ X(Ee.Content, {
|
|
4656
4854
|
"data-slot": "tabs-content",
|
|
4657
4855
|
className: Q("flex-1 text-sm outline-none", e),
|
|
4658
4856
|
...t
|
|
@@ -4660,16 +4858,16 @@ function Da({ className: e, ...t }) {
|
|
|
4660
4858
|
}
|
|
4661
4859
|
//#endregion
|
|
4662
4860
|
//#region src/components/ui/timeline.tsx
|
|
4663
|
-
var
|
|
4664
|
-
let e = n.useContext(
|
|
4861
|
+
var Fa = n.createContext(void 0), Ia = () => {
|
|
4862
|
+
let e = n.useContext(Fa);
|
|
4665
4863
|
if (!e) throw Error("useTimeline must be used within a Timeline");
|
|
4666
4864
|
return e;
|
|
4667
4865
|
};
|
|
4668
|
-
function
|
|
4866
|
+
function La({ defaultValue: e = 1, value: t, onValueChange: r, orientation: i = "vertical", className: a, ...o }) {
|
|
4669
4867
|
let [s, c] = n.useState(e), l = n.useCallback((e) => {
|
|
4670
4868
|
t === void 0 && c(e), r?.(e);
|
|
4671
4869
|
}, [t, r]), u = t ?? s;
|
|
4672
|
-
return /* @__PURE__ */ X(
|
|
4870
|
+
return /* @__PURE__ */ X(Fa.Provider, {
|
|
4673
4871
|
value: {
|
|
4674
4872
|
activeStep: u,
|
|
4675
4873
|
setActiveStep: l
|
|
@@ -4682,28 +4880,28 @@ function Aa({ defaultValue: e = 1, value: t, onValueChange: r, orientation: i =
|
|
|
4682
4880
|
})
|
|
4683
4881
|
});
|
|
4684
4882
|
}
|
|
4685
|
-
function
|
|
4883
|
+
function Ra({ className: e, ...t }) {
|
|
4686
4884
|
return /* @__PURE__ */ X("div", {
|
|
4687
4885
|
className: Q("text-muted-foreground text-sm", e),
|
|
4688
4886
|
"data-slot": "timeline-content",
|
|
4689
4887
|
...t
|
|
4690
4888
|
});
|
|
4691
4889
|
}
|
|
4692
|
-
function
|
|
4693
|
-
return /* @__PURE__ */ X(e ?
|
|
4890
|
+
function za({ asChild: e = !1, className: t, ...n }) {
|
|
4891
|
+
return /* @__PURE__ */ X(e ? we.Root : "time", {
|
|
4694
4892
|
className: Q("mb-1 block font-medium text-muted-foreground text-xs group-data-[orientation=vertical]/timeline:max-sm:h-4", t),
|
|
4695
4893
|
"data-slot": "timeline-date",
|
|
4696
4894
|
...n
|
|
4697
4895
|
});
|
|
4698
4896
|
}
|
|
4699
|
-
function
|
|
4897
|
+
function Ba({ className: e, ...t }) {
|
|
4700
4898
|
return /* @__PURE__ */ X("div", {
|
|
4701
4899
|
className: Q(e),
|
|
4702
4900
|
"data-slot": "timeline-header",
|
|
4703
4901
|
...t
|
|
4704
4902
|
});
|
|
4705
4903
|
}
|
|
4706
|
-
function
|
|
4904
|
+
function Va({ className: e, children: t, ...n }) {
|
|
4707
4905
|
return /* @__PURE__ */ X("div", {
|
|
4708
4906
|
"aria-hidden": "true",
|
|
4709
4907
|
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),
|
|
@@ -4712,8 +4910,8 @@ function Pa({ className: e, children: t, ...n }) {
|
|
|
4712
4910
|
children: t
|
|
4713
4911
|
});
|
|
4714
4912
|
}
|
|
4715
|
-
function
|
|
4716
|
-
let { activeStep: r } =
|
|
4913
|
+
function Ha({ step: e, className: t, ...n }) {
|
|
4914
|
+
let { activeStep: r } = Ia();
|
|
4717
4915
|
return /* @__PURE__ */ X("div", {
|
|
4718
4916
|
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),
|
|
4719
4917
|
"data-completed": e <= r || void 0,
|
|
@@ -4721,7 +4919,7 @@ function Fa({ step: e, className: t, ...n }) {
|
|
|
4721
4919
|
...n
|
|
4722
4920
|
});
|
|
4723
4921
|
}
|
|
4724
|
-
function
|
|
4922
|
+
function Ua({ className: e, ...t }) {
|
|
4725
4923
|
return /* @__PURE__ */ X("div", {
|
|
4726
4924
|
"aria-hidden": "true",
|
|
4727
4925
|
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),
|
|
@@ -4729,7 +4927,7 @@ function Ia({ className: e, ...t }) {
|
|
|
4729
4927
|
...t
|
|
4730
4928
|
});
|
|
4731
4929
|
}
|
|
4732
|
-
function
|
|
4930
|
+
function Wa({ className: e, ...t }) {
|
|
4733
4931
|
return /* @__PURE__ */ X("h3", {
|
|
4734
4932
|
className: Q("font-medium text-sm", e),
|
|
4735
4933
|
"data-slot": "timeline-title",
|
|
@@ -4738,7 +4936,7 @@ function La({ className: e, ...t }) {
|
|
|
4738
4936
|
}
|
|
4739
4937
|
//#endregion
|
|
4740
4938
|
//#region src/components/ui/toggle.tsx
|
|
4741
|
-
var
|
|
4939
|
+
var Ga = U("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", {
|
|
4742
4940
|
variants: {
|
|
4743
4941
|
variant: {
|
|
4744
4942
|
default: "bg-transparent",
|
|
@@ -4755,10 +4953,10 @@ var Ra = W("group/toggle inline-flex items-center justify-center gap-1 rounded-l
|
|
|
4755
4953
|
size: "default"
|
|
4756
4954
|
}
|
|
4757
4955
|
});
|
|
4758
|
-
function
|
|
4759
|
-
return /* @__PURE__ */ X(
|
|
4956
|
+
function Ka({ className: e, variant: t = "default", size: n = "default", ...r }) {
|
|
4957
|
+
return /* @__PURE__ */ X(De.Root, {
|
|
4760
4958
|
"data-slot": "toggle",
|
|
4761
|
-
className: Q(
|
|
4959
|
+
className: Q(Ga({
|
|
4762
4960
|
variant: t,
|
|
4763
4961
|
size: n,
|
|
4764
4962
|
className: e
|
|
@@ -4768,14 +4966,14 @@ function za({ className: e, variant: t = "default", size: n = "default", ...r })
|
|
|
4768
4966
|
}
|
|
4769
4967
|
//#endregion
|
|
4770
4968
|
//#region src/components/ui/toggle-group.tsx
|
|
4771
|
-
var
|
|
4969
|
+
var qa = n.createContext({
|
|
4772
4970
|
size: "default",
|
|
4773
4971
|
variant: "default",
|
|
4774
4972
|
spacing: 2,
|
|
4775
4973
|
orientation: "horizontal"
|
|
4776
4974
|
});
|
|
4777
|
-
function
|
|
4778
|
-
return /* @__PURE__ */ X(
|
|
4975
|
+
function Ja({ className: e, variant: t, size: n, spacing: r = 2, orientation: i = "horizontal", children: a, ...o }) {
|
|
4976
|
+
return /* @__PURE__ */ X(Oe.Root, {
|
|
4779
4977
|
"data-slot": "toggle-group",
|
|
4780
4978
|
"data-variant": t,
|
|
4781
4979
|
"data-size": n,
|
|
@@ -4784,7 +4982,7 @@ function Va({ className: e, variant: t, size: n, spacing: r = 2, orientation: i
|
|
|
4784
4982
|
style: { "--gap": r },
|
|
4785
4983
|
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),
|
|
4786
4984
|
...o,
|
|
4787
|
-
children: /* @__PURE__ */ X(
|
|
4985
|
+
children: /* @__PURE__ */ X(qa.Provider, {
|
|
4788
4986
|
value: {
|
|
4789
4987
|
variant: t,
|
|
4790
4988
|
size: n,
|
|
@@ -4795,14 +4993,14 @@ function Va({ className: e, variant: t, size: n, spacing: r = 2, orientation: i
|
|
|
4795
4993
|
})
|
|
4796
4994
|
});
|
|
4797
4995
|
}
|
|
4798
|
-
function
|
|
4799
|
-
let o = n.useContext(
|
|
4800
|
-
return /* @__PURE__ */ X(
|
|
4996
|
+
function Ya({ className: e, children: t, variant: r = "default", size: i = "default", ...a }) {
|
|
4997
|
+
let o = n.useContext(qa);
|
|
4998
|
+
return /* @__PURE__ */ X(Oe.Item, {
|
|
4801
4999
|
"data-slot": "toggle-group-item",
|
|
4802
5000
|
"data-variant": o.variant || r,
|
|
4803
5001
|
"data-size": o.size || i,
|
|
4804
5002
|
"data-spacing": o.spacing,
|
|
4805
|
-
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",
|
|
5003
|
+
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", Ga({
|
|
4806
5004
|
variant: o.variant || r,
|
|
4807
5005
|
size: o.size || i
|
|
4808
5006
|
}), e),
|
|
@@ -4812,35 +5010,35 @@ function Ha({ className: e, children: t, variant: r = "default", size: i = "defa
|
|
|
4812
5010
|
}
|
|
4813
5011
|
//#endregion
|
|
4814
5012
|
//#region src/components/ui/tooltip.tsx
|
|
4815
|
-
function
|
|
4816
|
-
return /* @__PURE__ */ X(
|
|
5013
|
+
function Xa({ delayDuration: e = 0, ...t }) {
|
|
5014
|
+
return /* @__PURE__ */ X(ke.Provider, {
|
|
4817
5015
|
"data-slot": "tooltip-provider",
|
|
4818
5016
|
delayDuration: e,
|
|
4819
5017
|
...t
|
|
4820
5018
|
});
|
|
4821
5019
|
}
|
|
4822
|
-
function
|
|
4823
|
-
return /* @__PURE__ */ X(
|
|
5020
|
+
function Za({ ...e }) {
|
|
5021
|
+
return /* @__PURE__ */ X(ke.Root, {
|
|
4824
5022
|
"data-slot": "tooltip",
|
|
4825
5023
|
...e
|
|
4826
5024
|
});
|
|
4827
5025
|
}
|
|
4828
|
-
function
|
|
4829
|
-
return /* @__PURE__ */ X(
|
|
5026
|
+
function Qa({ ...e }) {
|
|
5027
|
+
return /* @__PURE__ */ X(ke.Trigger, {
|
|
4830
5028
|
"data-slot": "tooltip-trigger",
|
|
4831
5029
|
...e
|
|
4832
5030
|
});
|
|
4833
5031
|
}
|
|
4834
|
-
function
|
|
4835
|
-
return /* @__PURE__ */ X(
|
|
5032
|
+
function $a({ className: e, sideOffset: t = 0, children: n, ...r }) {
|
|
5033
|
+
return /* @__PURE__ */ X(ke.Portal, { children: /* @__PURE__ */ Z(ke.Content, {
|
|
4836
5034
|
"data-slot": "tooltip-content",
|
|
4837
5035
|
sideOffset: t,
|
|
4838
5036
|
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),
|
|
4839
5037
|
...r,
|
|
4840
|
-
children: [n, /* @__PURE__ */ X(
|
|
5038
|
+
children: [n, /* @__PURE__ */ X(ke.Arrow, { className: "z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground" })]
|
|
4841
5039
|
}) });
|
|
4842
5040
|
}
|
|
4843
5041
|
//#endregion
|
|
4844
|
-
export {
|
|
5042
|
+
export { ct as ActionsMenu, Ct as AdvancedInput, fn as AdvancedSelect, Gr as Alert, Jr as AlertAction, qr as AlertDescription, On as AlertDialog, Rn as AlertDialogAction, zn as AlertDialogCancel, Mn as AlertDialogContent, Ln as AlertDialogDescription, Pn as AlertDialogFooter, Nn as AlertDialogHeader, Fn as AlertDialogMedia, jn as AlertDialogOverlay, An as AlertDialogPortal, In as AlertDialogTitle, kn as AlertDialogTrigger, Kr as AlertTitle, Hn as Badge, $ as Button, Xr as ButtonGroup, Qr as ButtonGroupSeparator, Zr as ButtonGroupText, Mr as Calendar, Nr as CalendarDayButton, er as Card, ir as CardAction, ar as CardContent, rr as CardDescription, or as CardFooter, tr as CardHeader, Dn as CardRadioGroup, nr as CardTitle, ri as ChartContainer, si as ChartLegend, ci as ChartLegendContent, ii as ChartStyle, ai as ChartTooltip, oi as ChartTooltipContent, pn as Checkbox, Jt as Command, Yt as CommandDialog, Qt as CommandEmpty, $t as CommandGroup, Xt as CommandInput, tn as CommandItem, Zt as CommandList, en as CommandSeparator, nn as CommandShortcut, Bn as ConfirmPrompt, Un as CustomTabs, Cn as DataTable, Ur as DateTimeRangePicker, Gn as DefRow, Ot as Dialog, jt as DialogClose, Nt as DialogContent, Lt as DialogDescription, Ft as DialogFooter, Pt as DialogHeader, Mt as DialogOverlay, At as DialogPortal, It as DialogTitle, kt as DialogTrigger, Ge as DropdownMenu, Ze as DropdownMenuCheckboxItem, Je as DropdownMenuContent, Ye as DropdownMenuGroup, Xe as DropdownMenuItem, et as DropdownMenuLabel, Ke as DropdownMenuPortal, Qe as DropdownMenuRadioGroup, $e as DropdownMenuRadioItem, tt as DropdownMenuSeparator, nt as DropdownMenuShortcut, rt as DropdownMenuSub, at as DropdownMenuSubContent, it as DropdownMenuSubTrigger, qe as DropdownMenuTrigger, Kn as FacetedFilter, ht as Field, gt as FieldContent, yt as FieldDescription, xt as FieldError, pt as FieldGroup, _t as FieldLabel, ft as FieldLegend, bt as FieldSeparator, dt as FieldSet, vt as FieldTitle, Dt as FileUpload, wn as FormDialog, ui as HoverCard, fi as HoverCardContent, di as HoverCardTrigger, Rt as Input, Bt as InputGroup, Ht as InputGroupAddon, Wt as InputGroupButton, Kt as InputGroupInput, Gt as InputGroupText, qt as InputGroupTextarea, gi as Item, Si as ItemActions, yi as ItemContent, xi as ItemDescription, wi as ItemFooter, pi as ItemGroup, Ci as ItemHeader, vi as ItemMedia, mi as ItemSeparator, bi as ItemTitle, lt as Label, Yn as ListCard, Jn as ListCardChip, Zn as ListCardGrid, qn as ListCardPerson, ji as Map, ra as MapArc, ia as MapClusterLayer, Gi as MapControls, Pi as MapMarker, qi as MapPopup, Ji as MapRoute, Fi as MarkerContent, Bi as MarkerLabel, Ri as MarkerPopup, zi as MarkerTooltip, rn as Popover, sn as PopoverAnchor, on as PopoverContent, un as PopoverDescription, cn as PopoverHeader, ln as PopoverTitle, an as PopoverTrigger, aa as Progress, Qn as QuickStat, Tn as RadioGroup, En as RadioGroupItem, oa as Select, ua as SelectContent, sa as SelectGroup, fa as SelectItem, da as SelectLabel, ha as SelectScrollDownButton, ma as SelectScrollUpButton, pa as SelectSeparator, la as SelectTrigger, ca as SelectValue, cr as SensorCard, ut as Separator, lr as Sheet, dr as SheetClose, mr as SheetContent, vr as SheetDescription, gr as SheetFooter, hr as SheetHeader, _r as SheetTitle, ur as SheetTrigger, yr as SideSheet, br as SideSheetSection, ga as Slider, Ue as Spinner, Cr as StatCard, Or as StatusAvatar, Dr as StatusIcon, kr as StatusList, Ar as StatusListGroup, jr as StatusListItem, Sa as Stepper, Da as StepperDescription, Ta as StepperIndicator, Ca as StepperItem, Oa as StepperSeparator, Ea as StepperTitle, wa as StepperTrigger, ka as Switch, mn as Table, gn as TableBody, xn as TableCaption, bn as TableCell, _n as TableFooter, yn as TableHead, hn as TableHeader, vn as TableRow, Aa as Tabs, Pa as TabsContent, Ma as TabsList, Na as TabsTrigger, zt as Textarea, La as Timeline, Ra as TimelineContent, za as TimelineDate, Ba as TimelineHeader, Va as TimelineIndicator, Ha as TimelineItem, Ua as TimelineSeparator, Wa as TimelineTitle, _a as Toaster, Ka as Toggle, Ja as ToggleGroup, Ya as ToggleGroupItem, Za as Tooltip, $a as TooltipContent, Xa as TooltipProvider, Qa as TooltipTrigger, Vn as badgeVariants, Yr as buttonGroupVariants, We as buttonVariants, $n as cardVariants, Q as cn, Ve as formatBytes, zr as navigateRange, Rr as presetToRange, ja as tabsListVariants, Ga as toggleVariants, He as useFileUpload, Oi as useMap };
|
|
4845
5043
|
|
|
4846
5044
|
//# sourceMappingURL=index.js.map
|