florixui 1.0.0 → 1.1.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 +183 -0
- package/dist/components/custom/card-radio-group.d.ts +32 -0
- package/dist/components/custom/custom-tabs.d.ts +34 -0
- package/dist/components/custom/data-table.d.ts +7 -1
- package/dist/components/custom/faceted-filter.d.ts +44 -0
- package/dist/components/custom/file-upload.d.ts +26 -0
- package/dist/components/custom/form-dialog.d.ts +30 -0
- package/dist/components/custom/sensor-card.d.ts +45 -0
- package/dist/components/custom/side-sheet.d.ts +56 -0
- package/dist/components/custom/stat-card.d.ts +54 -0
- package/dist/components/ui/badge.d.ts +1 -1
- package/dist/components/ui/button.d.ts +1 -1
- package/dist/components/ui/item.d.ts +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1596 -1131
- package/dist/index.js.map +1 -1
- package/dist/lib/use-file-upload.d.ts +58 -0
- package/dist/styles.css +1 -1
- package/package.json +2 -1
package/dist/index.js
CHANGED
|
@@ -2,25 +2,192 @@ 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 {
|
|
6
|
-
import { cva as
|
|
7
|
-
import { AlertDialog as
|
|
8
|
-
import { Fragment as
|
|
9
|
-
import { Command as
|
|
10
|
-
import { DayPicker as
|
|
11
|
-
import * as
|
|
12
|
-
import
|
|
5
|
+
import { AlertCircleIcon as p, Calendar as m, Check as h, CheckIcon as g, ChevronDown as _, ChevronDownIcon as v, ChevronLeftIcon as y, ChevronRightIcon as b, ChevronUpIcon as x, CircleCheckIcon as S, Clock as C, Eye as w, EyeOff as T, FileArchiveIcon as E, FileIcon as D, FileSpreadsheetIcon as O, FileTextIcon as k, HeadphonesIcon as A, ImageIcon as j, ImageUpIcon as ee, InfoIcon as M, Layers as N, Loader2 as P, Loader2Icon as F, LoaderCircleIcon as te, Locate as ne, Maximize as I, Minus as re, MoreVertical as L, OctagonXIcon as ie, Plus as R, PlusIcon as ae, SearchIcon as oe, Trash2Icon as z, TriangleAlertIcon as se, UploadIcon as B, VideoIcon as ce, X as V, XIcon as le } from "lucide-react";
|
|
6
|
+
import { cva as H } from "class-variance-authority";
|
|
7
|
+
import { AlertDialog as U, Checkbox as ue, Dialog as W, DropdownMenu as G, HoverCard as de, Label as fe, Popover as pe, Progress as me, RadioGroup as he, Select as K, Separator as ge, Slider as _e, Slot as ve, Switch as ye, Tabs as q, Toggle as be, ToggleGroup as xe, Tooltip as J } from "radix-ui";
|
|
8
|
+
import { Fragment as Se, jsx as Y, jsxs as X } from "react/jsx-runtime";
|
|
9
|
+
import { Command as Z } from "cmdk";
|
|
10
|
+
import { DayPicker as Ce, getDefaultClassNames as we } from "react-day-picker";
|
|
11
|
+
import * as Te from "recharts";
|
|
12
|
+
import Ee from "maplibre-gl";
|
|
13
13
|
import "maplibre-gl/dist/maplibre-gl.css";
|
|
14
|
-
import { createPortal as
|
|
15
|
-
import { useTheme as
|
|
16
|
-
import { Toaster as
|
|
14
|
+
import { createPortal as De } from "react-dom";
|
|
15
|
+
import { useTheme as Oe } from "next-themes";
|
|
16
|
+
import { Toaster as ke } from "sonner";
|
|
17
17
|
//#region src/lib/utils.ts
|
|
18
|
-
function
|
|
18
|
+
function Q(...n) {
|
|
19
19
|
return t(e(n));
|
|
20
20
|
}
|
|
21
21
|
//#endregion
|
|
22
|
-
//#region src/
|
|
23
|
-
var
|
|
22
|
+
//#region src/lib/use-file-upload.ts
|
|
23
|
+
var Ae = (e, t = 2) => {
|
|
24
|
+
if (e === 0) return "0 Bytes";
|
|
25
|
+
let n = 1024, r = t < 0 ? 0 : t, i = [
|
|
26
|
+
"Bytes",
|
|
27
|
+
"KB",
|
|
28
|
+
"MB",
|
|
29
|
+
"GB",
|
|
30
|
+
"TB",
|
|
31
|
+
"PB",
|
|
32
|
+
"EB",
|
|
33
|
+
"ZB",
|
|
34
|
+
"YB"
|
|
35
|
+
], a = Math.floor(Math.log(e) / Math.log(n));
|
|
36
|
+
return Number.parseFloat((e / n ** a).toFixed(r)) + i[a];
|
|
37
|
+
}, je = (e = {}) => {
|
|
38
|
+
let { maxFiles: t = Infinity, maxSize: n = Infinity, accept: r = "*", multiple: i = !1, initialFiles: o = [], onFilesChange: s, onFilesAdded: c } = e, [l, u] = f({
|
|
39
|
+
errors: [],
|
|
40
|
+
files: o.map((e) => ({
|
|
41
|
+
file: e,
|
|
42
|
+
id: e.id,
|
|
43
|
+
preview: e.url
|
|
44
|
+
})),
|
|
45
|
+
isDragging: !1
|
|
46
|
+
}), p = d(null), m = a((e) => {
|
|
47
|
+
if (e.size > n) return `File "${e.name}" exceeds the maximum size of ${Ae(n)}.`;
|
|
48
|
+
if (r !== "*") {
|
|
49
|
+
let t = r.split(",").map((e) => e.trim()), n = e instanceof File ? e.type || "" : e.type, i = `.${e.name.split(".").pop()}`;
|
|
50
|
+
if (!t.some((e) => {
|
|
51
|
+
if (e.startsWith(".")) return i.toLowerCase() === e.toLowerCase();
|
|
52
|
+
if (e.endsWith("/*")) {
|
|
53
|
+
let t = e.split("/")[0];
|
|
54
|
+
return n.startsWith(`${t}/`);
|
|
55
|
+
}
|
|
56
|
+
return n === e;
|
|
57
|
+
})) return `File "${e.name}" is not an accepted file type.`;
|
|
58
|
+
}
|
|
59
|
+
return null;
|
|
60
|
+
}, [r, n]), h = a((e) => e instanceof File ? URL.createObjectURL(e) : e.url, []), g = a((e) => e instanceof File ? `${e.name}-${Date.now()}-${Math.random().toString(36).substring(2, 9)}` : e.id, []), _ = a(() => {
|
|
61
|
+
u((e) => {
|
|
62
|
+
for (let t of e.files ?? []) t.preview && t.file instanceof File && t.file.type.startsWith("image/") && URL.revokeObjectURL(t.preview);
|
|
63
|
+
p.current && (p.current.value = "");
|
|
64
|
+
let t = {
|
|
65
|
+
...e,
|
|
66
|
+
errors: [],
|
|
67
|
+
files: []
|
|
68
|
+
};
|
|
69
|
+
return s?.(t.files), t;
|
|
70
|
+
});
|
|
71
|
+
}, [s]), v = a((e) => {
|
|
72
|
+
if (!e || e.length === 0) return;
|
|
73
|
+
let r = Array.from(e), a = [];
|
|
74
|
+
if (u((e) => ({
|
|
75
|
+
...e,
|
|
76
|
+
errors: []
|
|
77
|
+
})), i || _(), i && t !== Infinity && l.files.length + r.length > t) {
|
|
78
|
+
a.push(`You can only upload a maximum of ${t} files.`), u((e) => ({
|
|
79
|
+
...e,
|
|
80
|
+
errors: a
|
|
81
|
+
}));
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
let o = [];
|
|
85
|
+
for (let e of r) {
|
|
86
|
+
if (i && l.files.some((t) => t.file.name === e.name && t.file.size === e.size)) continue;
|
|
87
|
+
if (e.size > n) {
|
|
88
|
+
a.push(i ? `Some files exceed the maximum size of ${Ae(n)}.` : `File exceeds the maximum size of ${Ae(n)}.`);
|
|
89
|
+
continue;
|
|
90
|
+
}
|
|
91
|
+
let t = m(e);
|
|
92
|
+
if (t) {
|
|
93
|
+
a.push(t);
|
|
94
|
+
continue;
|
|
95
|
+
}
|
|
96
|
+
o.push({
|
|
97
|
+
file: e,
|
|
98
|
+
id: g(e),
|
|
99
|
+
preview: h(e)
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
o.length > 0 ? (c?.(o), u((e) => {
|
|
103
|
+
let t = i ? [...e.files, ...o] : o;
|
|
104
|
+
return s?.(t), {
|
|
105
|
+
...e,
|
|
106
|
+
errors: a,
|
|
107
|
+
files: t
|
|
108
|
+
};
|
|
109
|
+
})) : a.length > 0 && u((e) => ({
|
|
110
|
+
...e,
|
|
111
|
+
errors: a
|
|
112
|
+
})), p.current && (p.current.value = "");
|
|
113
|
+
}, [
|
|
114
|
+
l.files,
|
|
115
|
+
t,
|
|
116
|
+
i,
|
|
117
|
+
n,
|
|
118
|
+
m,
|
|
119
|
+
h,
|
|
120
|
+
g,
|
|
121
|
+
_,
|
|
122
|
+
s,
|
|
123
|
+
c
|
|
124
|
+
]), y = a((e) => {
|
|
125
|
+
u((t) => {
|
|
126
|
+
let n = t.files.find((t) => t.id === e);
|
|
127
|
+
n?.preview && n.file instanceof File && n.file.type.startsWith("image/") && URL.revokeObjectURL(n.preview);
|
|
128
|
+
let r = t.files.filter((t) => t.id !== e);
|
|
129
|
+
return s?.(r), {
|
|
130
|
+
...t,
|
|
131
|
+
errors: [],
|
|
132
|
+
files: r
|
|
133
|
+
};
|
|
134
|
+
});
|
|
135
|
+
}, [s]), b = a(() => {
|
|
136
|
+
u((e) => ({
|
|
137
|
+
...e,
|
|
138
|
+
errors: []
|
|
139
|
+
}));
|
|
140
|
+
}, []), x = a((e) => {
|
|
141
|
+
e.preventDefault(), e.stopPropagation(), u((e) => ({
|
|
142
|
+
...e,
|
|
143
|
+
isDragging: !0
|
|
144
|
+
}));
|
|
145
|
+
}, []), S = a((e) => {
|
|
146
|
+
e.preventDefault(), e.stopPropagation(), !e.currentTarget.contains(e.relatedTarget) && u((e) => ({
|
|
147
|
+
...e,
|
|
148
|
+
isDragging: !1
|
|
149
|
+
}));
|
|
150
|
+
}, []), C = a((e) => {
|
|
151
|
+
e.preventDefault(), e.stopPropagation();
|
|
152
|
+
}, []), w = a((e) => {
|
|
153
|
+
if (e.preventDefault(), e.stopPropagation(), u((e) => ({
|
|
154
|
+
...e,
|
|
155
|
+
isDragging: !1
|
|
156
|
+
})), !p.current?.disabled && e.dataTransfer.files && e.dataTransfer.files.length > 0) if (i) v(e.dataTransfer.files);
|
|
157
|
+
else {
|
|
158
|
+
let t = e.dataTransfer.files[0];
|
|
159
|
+
v([t]);
|
|
160
|
+
}
|
|
161
|
+
}, [v, i]), T = a((e) => {
|
|
162
|
+
e.target.files && e.target.files.length > 0 && v(e.target.files);
|
|
163
|
+
}, [v]), E = a(() => {
|
|
164
|
+
p.current && p.current.click();
|
|
165
|
+
}, []);
|
|
166
|
+
return [l, {
|
|
167
|
+
addFiles: v,
|
|
168
|
+
clearErrors: b,
|
|
169
|
+
clearFiles: _,
|
|
170
|
+
getInputProps: a((e = {}) => ({
|
|
171
|
+
...e,
|
|
172
|
+
accept: e.accept || r,
|
|
173
|
+
multiple: e.multiple === void 0 ? i : e.multiple,
|
|
174
|
+
onChange: T,
|
|
175
|
+
ref: p,
|
|
176
|
+
type: "file"
|
|
177
|
+
}), [
|
|
178
|
+
r,
|
|
179
|
+
i,
|
|
180
|
+
T
|
|
181
|
+
]),
|
|
182
|
+
handleDragEnter: x,
|
|
183
|
+
handleDragLeave: S,
|
|
184
|
+
handleDragOver: C,
|
|
185
|
+
handleDrop: w,
|
|
186
|
+
handleFileChange: T,
|
|
187
|
+
openFileDialog: E,
|
|
188
|
+
removeFile: y
|
|
189
|
+
}];
|
|
190
|
+
}, Me = H("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", {
|
|
24
191
|
variants: {
|
|
25
192
|
variant: {
|
|
26
193
|
default: "bg-primary text-primary-foreground hover:bg-primary/80",
|
|
@@ -46,12 +213,12 @@ var be = P("group/button inline-flex shrink-0 items-center justify-center rounde
|
|
|
46
213
|
size: "default"
|
|
47
214
|
}
|
|
48
215
|
});
|
|
49
|
-
function
|
|
50
|
-
return /* @__PURE__ */
|
|
216
|
+
function $({ className: e, variant: t = "default", size: n = "default", asChild: r = !1, ...i }) {
|
|
217
|
+
return /* @__PURE__ */ Y(r ? ve.Root : "button", {
|
|
51
218
|
"data-slot": "button",
|
|
52
219
|
"data-variant": t,
|
|
53
220
|
"data-size": n,
|
|
54
|
-
className:
|
|
221
|
+
className: Q(Me({
|
|
55
222
|
variant: t,
|
|
56
223
|
size: n,
|
|
57
224
|
className: e
|
|
@@ -61,163 +228,163 @@ function Q({ className: e, variant: t = "default", size: n = "default", asChild:
|
|
|
61
228
|
}
|
|
62
229
|
//#endregion
|
|
63
230
|
//#region src/components/ui/dropdown-menu.tsx
|
|
64
|
-
function
|
|
65
|
-
return /* @__PURE__ */
|
|
231
|
+
function Ne({ ...e }) {
|
|
232
|
+
return /* @__PURE__ */ Y(G.Root, {
|
|
66
233
|
"data-slot": "dropdown-menu",
|
|
67
234
|
...e
|
|
68
235
|
});
|
|
69
236
|
}
|
|
70
|
-
function
|
|
71
|
-
return /* @__PURE__ */
|
|
237
|
+
function Pe({ ...e }) {
|
|
238
|
+
return /* @__PURE__ */ Y(G.Portal, {
|
|
72
239
|
"data-slot": "dropdown-menu-portal",
|
|
73
240
|
...e
|
|
74
241
|
});
|
|
75
242
|
}
|
|
76
|
-
function
|
|
77
|
-
return /* @__PURE__ */
|
|
243
|
+
function Fe({ ...e }) {
|
|
244
|
+
return /* @__PURE__ */ Y(G.Trigger, {
|
|
78
245
|
"data-slot": "dropdown-menu-trigger",
|
|
79
246
|
...e
|
|
80
247
|
});
|
|
81
248
|
}
|
|
82
|
-
function
|
|
83
|
-
return /* @__PURE__ */
|
|
249
|
+
function Ie({ className: e, align: t = "start", sideOffset: n = 4, ...r }) {
|
|
250
|
+
return /* @__PURE__ */ Y(G.Portal, { children: /* @__PURE__ */ Y(G.Content, {
|
|
84
251
|
"data-slot": "dropdown-menu-content",
|
|
85
252
|
sideOffset: n,
|
|
86
253
|
align: t,
|
|
87
|
-
className:
|
|
254
|
+
className: Q("z-50 max-h-(--radix-dropdown-menu-content-available-height) w-(--radix-dropdown-menu-trigger-width) min-w-32 origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md 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-[state=closed]:overflow-hidden 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),
|
|
88
255
|
...r
|
|
89
256
|
}) });
|
|
90
257
|
}
|
|
91
|
-
function
|
|
92
|
-
return /* @__PURE__ */
|
|
258
|
+
function Le({ ...e }) {
|
|
259
|
+
return /* @__PURE__ */ Y(G.Group, {
|
|
93
260
|
"data-slot": "dropdown-menu-group",
|
|
94
261
|
...e
|
|
95
262
|
});
|
|
96
263
|
}
|
|
97
|
-
function
|
|
98
|
-
return /* @__PURE__ */
|
|
264
|
+
function Re({ className: e, inset: t, variant: n = "default", ...r }) {
|
|
265
|
+
return /* @__PURE__ */ Y(G.Item, {
|
|
99
266
|
"data-slot": "dropdown-menu-item",
|
|
100
267
|
"data-inset": t,
|
|
101
268
|
"data-variant": n,
|
|
102
|
-
className:
|
|
269
|
+
className: Q("group/dropdown-menu-item relative 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-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive", e),
|
|
103
270
|
...r
|
|
104
271
|
});
|
|
105
272
|
}
|
|
106
|
-
function
|
|
107
|
-
return /* @__PURE__ */
|
|
273
|
+
function ze({ className: e, children: t, checked: n, inset: r, ...i }) {
|
|
274
|
+
return /* @__PURE__ */ X(G.CheckboxItem, {
|
|
108
275
|
"data-slot": "dropdown-menu-checkbox-item",
|
|
109
276
|
"data-inset": r,
|
|
110
|
-
className:
|
|
277
|
+
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),
|
|
111
278
|
checked: n,
|
|
112
279
|
...i,
|
|
113
|
-
children: [/* @__PURE__ */
|
|
280
|
+
children: [/* @__PURE__ */ Y("span", {
|
|
114
281
|
className: "pointer-events-none absolute right-2 flex items-center justify-center",
|
|
115
282
|
"data-slot": "dropdown-menu-checkbox-item-indicator",
|
|
116
|
-
children: /* @__PURE__ */
|
|
283
|
+
children: /* @__PURE__ */ Y(G.ItemIndicator, { children: /* @__PURE__ */ Y(g, {}) })
|
|
117
284
|
}), t]
|
|
118
285
|
});
|
|
119
286
|
}
|
|
120
|
-
function
|
|
121
|
-
return /* @__PURE__ */
|
|
287
|
+
function Be({ ...e }) {
|
|
288
|
+
return /* @__PURE__ */ Y(G.RadioGroup, {
|
|
122
289
|
"data-slot": "dropdown-menu-radio-group",
|
|
123
290
|
...e
|
|
124
291
|
});
|
|
125
292
|
}
|
|
126
|
-
function
|
|
127
|
-
return /* @__PURE__ */
|
|
293
|
+
function Ve({ className: e, children: t, inset: n, ...r }) {
|
|
294
|
+
return /* @__PURE__ */ X(G.RadioItem, {
|
|
128
295
|
"data-slot": "dropdown-menu-radio-item",
|
|
129
296
|
"data-inset": n,
|
|
130
|
-
className:
|
|
297
|
+
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),
|
|
131
298
|
...r,
|
|
132
|
-
children: [/* @__PURE__ */
|
|
299
|
+
children: [/* @__PURE__ */ Y("span", {
|
|
133
300
|
className: "pointer-events-none absolute right-2 flex items-center justify-center",
|
|
134
301
|
"data-slot": "dropdown-menu-radio-item-indicator",
|
|
135
|
-
children: /* @__PURE__ */
|
|
302
|
+
children: /* @__PURE__ */ Y(G.ItemIndicator, { children: /* @__PURE__ */ Y(g, {}) })
|
|
136
303
|
}), t]
|
|
137
304
|
});
|
|
138
305
|
}
|
|
139
|
-
function
|
|
140
|
-
return /* @__PURE__ */
|
|
306
|
+
function He({ className: e, inset: t, ...n }) {
|
|
307
|
+
return /* @__PURE__ */ Y(G.Label, {
|
|
141
308
|
"data-slot": "dropdown-menu-label",
|
|
142
309
|
"data-inset": t,
|
|
143
|
-
className:
|
|
310
|
+
className: Q("px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7", e),
|
|
144
311
|
...n
|
|
145
312
|
});
|
|
146
313
|
}
|
|
147
|
-
function
|
|
148
|
-
return /* @__PURE__ */
|
|
314
|
+
function Ue({ className: e, ...t }) {
|
|
315
|
+
return /* @__PURE__ */ Y(G.Separator, {
|
|
149
316
|
"data-slot": "dropdown-menu-separator",
|
|
150
|
-
className:
|
|
317
|
+
className: Q("-mx-1 my-1 h-px bg-border", e),
|
|
151
318
|
...t
|
|
152
319
|
});
|
|
153
320
|
}
|
|
154
|
-
function
|
|
155
|
-
return /* @__PURE__ */
|
|
321
|
+
function We({ className: e, ...t }) {
|
|
322
|
+
return /* @__PURE__ */ Y("span", {
|
|
156
323
|
"data-slot": "dropdown-menu-shortcut",
|
|
157
|
-
className:
|
|
324
|
+
className: Q("ml-auto text-xs tracking-widest text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground", e),
|
|
158
325
|
...t
|
|
159
326
|
});
|
|
160
327
|
}
|
|
161
|
-
function
|
|
162
|
-
return /* @__PURE__ */
|
|
328
|
+
function Ge({ ...e }) {
|
|
329
|
+
return /* @__PURE__ */ Y(G.Sub, {
|
|
163
330
|
"data-slot": "dropdown-menu-sub",
|
|
164
331
|
...e
|
|
165
332
|
});
|
|
166
333
|
}
|
|
167
|
-
function
|
|
168
|
-
return /* @__PURE__ */
|
|
334
|
+
function Ke({ className: e, inset: t, children: n, ...r }) {
|
|
335
|
+
return /* @__PURE__ */ X(G.SubTrigger, {
|
|
169
336
|
"data-slot": "dropdown-menu-sub-trigger",
|
|
170
337
|
"data-inset": t,
|
|
171
|
-
className:
|
|
338
|
+
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),
|
|
172
339
|
...r,
|
|
173
|
-
children: [n, /* @__PURE__ */
|
|
340
|
+
children: [n, /* @__PURE__ */ Y(b, { className: "ml-auto" })]
|
|
174
341
|
});
|
|
175
342
|
}
|
|
176
|
-
function
|
|
177
|
-
return /* @__PURE__ */
|
|
343
|
+
function qe({ className: e, ...t }) {
|
|
344
|
+
return /* @__PURE__ */ Y(G.SubContent, {
|
|
178
345
|
"data-slot": "dropdown-menu-sub-content",
|
|
179
|
-
className:
|
|
346
|
+
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),
|
|
180
347
|
...t
|
|
181
348
|
});
|
|
182
349
|
}
|
|
183
350
|
//#endregion
|
|
184
351
|
//#region src/components/custom/actions-menu.tsx
|
|
185
|
-
var
|
|
186
|
-
function
|
|
352
|
+
var Je = 16;
|
|
353
|
+
function Ye(e) {
|
|
187
354
|
return e.type === void 0 || e.type === "action";
|
|
188
355
|
}
|
|
189
|
-
function
|
|
190
|
-
return /* @__PURE__ */
|
|
356
|
+
function Xe({ items: e, trigger: t, triggerIcon: n = L, triggerLabel: r = "Open menu", width: i = "10rem", align: a = "end", className: o, open: s, onOpenChange: c }) {
|
|
357
|
+
return /* @__PURE__ */ X(Ne, {
|
|
191
358
|
open: s,
|
|
192
359
|
onOpenChange: c,
|
|
193
|
-
children: [/* @__PURE__ */
|
|
360
|
+
children: [/* @__PURE__ */ Y(Fe, {
|
|
194
361
|
asChild: !0,
|
|
195
|
-
children: t ?? /* @__PURE__ */
|
|
362
|
+
children: t ?? /* @__PURE__ */ X($, {
|
|
196
363
|
variant: "ghost",
|
|
197
364
|
size: "icon",
|
|
198
|
-
className:
|
|
365
|
+
className: Q("size-8", o),
|
|
199
366
|
"aria-label": r,
|
|
200
|
-
children: [/* @__PURE__ */
|
|
367
|
+
children: [/* @__PURE__ */ Y(n, { size: Je }), /* @__PURE__ */ Y("span", {
|
|
201
368
|
className: "sr-only",
|
|
202
369
|
children: r
|
|
203
370
|
})]
|
|
204
371
|
})
|
|
205
|
-
}), /* @__PURE__ */
|
|
372
|
+
}), /* @__PURE__ */ Y(Ie, {
|
|
206
373
|
align: a,
|
|
207
374
|
style: { width: i },
|
|
208
375
|
children: e.map((e, t) => {
|
|
209
|
-
if (e.type === "separator") return /* @__PURE__ */
|
|
210
|
-
if (e.type === "label") return /* @__PURE__ */
|
|
211
|
-
if (!
|
|
376
|
+
if (e.type === "separator") return /* @__PURE__ */ Y(Ue, {}, `sep-${t}`);
|
|
377
|
+
if (e.type === "label") return /* @__PURE__ */ Y(He, { children: e.label }, `label-${t}`);
|
|
378
|
+
if (!Ye(e)) return null;
|
|
212
379
|
let n = e.icon;
|
|
213
|
-
return /* @__PURE__ */
|
|
380
|
+
return /* @__PURE__ */ X(Re, {
|
|
214
381
|
onSelect: e.onSelect,
|
|
215
382
|
disabled: e.disabled,
|
|
216
383
|
variant: e.destructive ? "destructive" : "default",
|
|
217
384
|
children: [
|
|
218
|
-
n && /* @__PURE__ */
|
|
385
|
+
n && /* @__PURE__ */ Y(n, { size: Je }),
|
|
219
386
|
e.label,
|
|
220
|
-
e.shortcut && /* @__PURE__ */
|
|
387
|
+
e.shortcut && /* @__PURE__ */ Y(We, { children: e.shortcut })
|
|
221
388
|
]
|
|
222
389
|
}, t);
|
|
223
390
|
})
|
|
@@ -226,49 +393,49 @@ function Re({ items: e, trigger: t, triggerIcon: n = j, triggerLabel: r = "Open
|
|
|
226
393
|
}
|
|
227
394
|
//#endregion
|
|
228
395
|
//#region src/components/ui/label.tsx
|
|
229
|
-
function
|
|
230
|
-
return /* @__PURE__ */
|
|
396
|
+
function Ze({ className: e, ...t }) {
|
|
397
|
+
return /* @__PURE__ */ Y(fe.Root, {
|
|
231
398
|
"data-slot": "label",
|
|
232
|
-
className:
|
|
399
|
+
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),
|
|
233
400
|
...t
|
|
234
401
|
});
|
|
235
402
|
}
|
|
236
403
|
//#endregion
|
|
237
404
|
//#region src/components/ui/separator.tsx
|
|
238
|
-
function
|
|
239
|
-
return /* @__PURE__ */
|
|
405
|
+
function Qe({ className: e, orientation: t = "horizontal", decorative: n = !0, ...r }) {
|
|
406
|
+
return /* @__PURE__ */ Y(ge.Root, {
|
|
240
407
|
"data-slot": "separator",
|
|
241
408
|
decorative: n,
|
|
242
409
|
orientation: t,
|
|
243
|
-
className:
|
|
410
|
+
className: Q("shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch", e),
|
|
244
411
|
...r
|
|
245
412
|
});
|
|
246
413
|
}
|
|
247
414
|
//#endregion
|
|
248
415
|
//#region src/components/ui/field.tsx
|
|
249
|
-
function
|
|
250
|
-
return /* @__PURE__ */
|
|
416
|
+
function $e({ className: e, ...t }) {
|
|
417
|
+
return /* @__PURE__ */ Y("fieldset", {
|
|
251
418
|
"data-slot": "field-set",
|
|
252
|
-
className:
|
|
419
|
+
className: Q("flex flex-col gap-4 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3", e),
|
|
253
420
|
...t
|
|
254
421
|
});
|
|
255
422
|
}
|
|
256
|
-
function
|
|
257
|
-
return /* @__PURE__ */
|
|
423
|
+
function et({ className: e, variant: t = "legend", ...n }) {
|
|
424
|
+
return /* @__PURE__ */ Y("legend", {
|
|
258
425
|
"data-slot": "field-legend",
|
|
259
426
|
"data-variant": t,
|
|
260
|
-
className:
|
|
427
|
+
className: Q("mb-1.5 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base", e),
|
|
261
428
|
...n
|
|
262
429
|
});
|
|
263
430
|
}
|
|
264
|
-
function
|
|
265
|
-
return /* @__PURE__ */
|
|
431
|
+
function tt({ className: e, ...t }) {
|
|
432
|
+
return /* @__PURE__ */ Y("div", {
|
|
266
433
|
"data-slot": "field-group",
|
|
267
|
-
className:
|
|
434
|
+
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),
|
|
268
435
|
...t
|
|
269
436
|
});
|
|
270
437
|
}
|
|
271
|
-
var
|
|
438
|
+
var nt = H("group/field flex w-full gap-2 data-[invalid=true]:text-destructive", {
|
|
272
439
|
variants: { orientation: {
|
|
273
440
|
vertical: "flex-col *:w-full [&>.sr-only]:w-auto",
|
|
274
441
|
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",
|
|
@@ -276,262 +443,485 @@ var We = P("group/field flex w-full gap-2 data-[invalid=true]:text-destructive",
|
|
|
276
443
|
} },
|
|
277
444
|
defaultVariants: { orientation: "vertical" }
|
|
278
445
|
});
|
|
279
|
-
function
|
|
280
|
-
return /* @__PURE__ */
|
|
446
|
+
function rt({ className: e, orientation: t = "vertical", ...n }) {
|
|
447
|
+
return /* @__PURE__ */ Y("div", {
|
|
281
448
|
role: "group",
|
|
282
449
|
"data-slot": "field",
|
|
283
450
|
"data-orientation": t,
|
|
284
|
-
className:
|
|
451
|
+
className: Q(nt({ orientation: t }), e),
|
|
285
452
|
...n
|
|
286
453
|
});
|
|
287
454
|
}
|
|
288
|
-
function
|
|
289
|
-
return /* @__PURE__ */
|
|
455
|
+
function it({ className: e, ...t }) {
|
|
456
|
+
return /* @__PURE__ */ Y("div", {
|
|
290
457
|
"data-slot": "field-content",
|
|
291
|
-
className:
|
|
458
|
+
className: Q("group/field-content flex flex-1 flex-col gap-0.5 leading-snug", e),
|
|
292
459
|
...t
|
|
293
460
|
});
|
|
294
461
|
}
|
|
295
|
-
function
|
|
296
|
-
return /* @__PURE__ */
|
|
462
|
+
function at({ className: e, ...t }) {
|
|
463
|
+
return /* @__PURE__ */ Y(Ze, {
|
|
297
464
|
"data-slot": "field-label",
|
|
298
|
-
className:
|
|
465
|
+
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),
|
|
299
466
|
...t
|
|
300
467
|
});
|
|
301
468
|
}
|
|
302
|
-
function
|
|
303
|
-
return /* @__PURE__ */
|
|
469
|
+
function ot({ className: e, ...t }) {
|
|
470
|
+
return /* @__PURE__ */ Y("div", {
|
|
304
471
|
"data-slot": "field-label",
|
|
305
|
-
className:
|
|
472
|
+
className: Q("flex w-fit items-center gap-2 text-sm font-medium group-data-[disabled=true]/field:opacity-50", e),
|
|
306
473
|
...t
|
|
307
474
|
});
|
|
308
475
|
}
|
|
309
|
-
function
|
|
310
|
-
return /* @__PURE__ */
|
|
476
|
+
function st({ className: e, ...t }) {
|
|
477
|
+
return /* @__PURE__ */ Y("p", {
|
|
311
478
|
"data-slot": "field-description",
|
|
312
|
-
className:
|
|
479
|
+
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),
|
|
313
480
|
...t
|
|
314
481
|
});
|
|
315
482
|
}
|
|
316
|
-
function
|
|
317
|
-
return /* @__PURE__ */
|
|
483
|
+
function ct({ children: e, className: t, ...n }) {
|
|
484
|
+
return /* @__PURE__ */ X("div", {
|
|
318
485
|
"data-slot": "field-separator",
|
|
319
486
|
"data-content": !!e,
|
|
320
|
-
className:
|
|
487
|
+
className: Q("relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2", t),
|
|
321
488
|
...n,
|
|
322
|
-
children: [/* @__PURE__ */
|
|
489
|
+
children: [/* @__PURE__ */ Y(Qe, { className: "absolute inset-0 top-1/2" }), e && /* @__PURE__ */ Y("span", {
|
|
323
490
|
className: "relative mx-auto block w-fit bg-background px-2 text-muted-foreground",
|
|
324
491
|
"data-slot": "field-separator-content",
|
|
325
492
|
children: e
|
|
326
493
|
})]
|
|
327
494
|
});
|
|
328
495
|
}
|
|
329
|
-
function
|
|
496
|
+
function lt({ className: e, children: t, errors: n, ...r }) {
|
|
330
497
|
let i = u(() => {
|
|
331
498
|
if (t) return t;
|
|
332
499
|
if (!n?.length) return null;
|
|
333
500
|
let e = [...new Map(n.map((e) => [e?.message, e])).values()];
|
|
334
|
-
return e?.length == 1 ? e[0]?.message : /* @__PURE__ */
|
|
501
|
+
return e?.length == 1 ? e[0]?.message : /* @__PURE__ */ Y("ul", {
|
|
335
502
|
className: "ml-4 flex list-disc flex-col gap-1",
|
|
336
|
-
children: e.map((e, t) => e?.message && /* @__PURE__ */
|
|
503
|
+
children: e.map((e, t) => e?.message && /* @__PURE__ */ Y("li", { children: e.message }, t))
|
|
337
504
|
});
|
|
338
505
|
}, [t, n]);
|
|
339
|
-
return i ? /* @__PURE__ */
|
|
506
|
+
return i ? /* @__PURE__ */ Y("div", {
|
|
340
507
|
role: "alert",
|
|
341
508
|
"data-slot": "field-error",
|
|
342
|
-
className:
|
|
509
|
+
className: Q("text-sm font-normal text-destructive", e),
|
|
343
510
|
...r,
|
|
344
511
|
children: i
|
|
345
512
|
}) : null;
|
|
346
513
|
}
|
|
347
514
|
//#endregion
|
|
348
515
|
//#region src/components/custom/advanced-input.tsx
|
|
349
|
-
function
|
|
350
|
-
return !t && !n ? null : /* @__PURE__ */
|
|
516
|
+
function ut({ error: e, errorMessage: t, helperText: n, errorId: r, helperId: i }) {
|
|
517
|
+
return !t && !n ? null : /* @__PURE__ */ Y("div", {
|
|
351
518
|
className: "mt-1.5 min-h-5",
|
|
352
|
-
children: e && t ? /* @__PURE__ */
|
|
519
|
+
children: e && t ? /* @__PURE__ */ Y("p", {
|
|
353
520
|
id: r,
|
|
354
521
|
className: "text-xs leading-5 text-destructive",
|
|
355
522
|
children: t
|
|
356
|
-
}) : !e && n ? /* @__PURE__ */
|
|
523
|
+
}) : !e && n ? /* @__PURE__ */ Y("p", {
|
|
357
524
|
id: i,
|
|
358
525
|
className: "text-xs leading-5 text-muted-foreground",
|
|
359
526
|
children: n
|
|
360
527
|
}) : null
|
|
361
528
|
});
|
|
362
529
|
}
|
|
363
|
-
var
|
|
364
|
-
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,
|
|
530
|
+
var dt = n.forwardRef(function(e, t) {
|
|
531
|
+
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(), E = y || C, [D, O] = n.useState(!1), k = `${E}-error`, A = `${E}-helper`, j = `${E}-description`, ee = [
|
|
365
532
|
S && s ? k : null,
|
|
366
533
|
!S && c ? A : null,
|
|
367
|
-
o ?
|
|
368
|
-
].filter(Boolean).join(" ") || void 0, M = d === "alt" ? "bg-muted" : "bg-transparent dark:bg-input/30",
|
|
534
|
+
o ? j : null
|
|
535
|
+
].filter(Boolean).join(" ") || void 0, M = d === "alt" ? "bg-muted" : "bg-transparent dark:bg-input/30", N = l ? /* @__PURE__ */ Y("span", {
|
|
369
536
|
"aria-hidden": !0,
|
|
370
537
|
className: "ml-0.5 text-destructive",
|
|
371
538
|
children: "*"
|
|
372
539
|
}) : null;
|
|
373
540
|
if (v === "textarea") {
|
|
374
541
|
let e = x;
|
|
375
|
-
return /* @__PURE__ */
|
|
376
|
-
className:
|
|
542
|
+
return /* @__PURE__ */ X("div", {
|
|
543
|
+
className: Q("space-y-1.5", i),
|
|
377
544
|
children: [
|
|
378
|
-
a && /* @__PURE__ */
|
|
545
|
+
a && /* @__PURE__ */ X(at, {
|
|
379
546
|
htmlFor: E,
|
|
380
|
-
className:
|
|
381
|
-
children: [a,
|
|
547
|
+
className: Q(m && "text-muted-foreground"),
|
|
548
|
+
children: [a, N]
|
|
382
549
|
}),
|
|
383
|
-
/* @__PURE__ */
|
|
550
|
+
/* @__PURE__ */ Y("textarea", {
|
|
384
551
|
id: E,
|
|
385
552
|
ref: t,
|
|
386
553
|
disabled: m,
|
|
387
554
|
"aria-invalid": S,
|
|
388
|
-
"aria-describedby":
|
|
389
|
-
className:
|
|
555
|
+
"aria-describedby": ee,
|
|
556
|
+
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", M, "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),
|
|
390
557
|
...e
|
|
391
558
|
}),
|
|
392
|
-
/* @__PURE__ */
|
|
559
|
+
/* @__PURE__ */ Y(ut, {
|
|
393
560
|
error: S,
|
|
394
561
|
errorMessage: s,
|
|
395
562
|
helperText: c,
|
|
396
563
|
errorId: k,
|
|
397
564
|
helperId: A
|
|
398
565
|
}),
|
|
399
|
-
o && /* @__PURE__ */
|
|
400
|
-
id:
|
|
566
|
+
o && /* @__PURE__ */ Y(st, {
|
|
567
|
+
id: j,
|
|
401
568
|
children: o
|
|
402
569
|
})
|
|
403
570
|
]
|
|
404
571
|
});
|
|
405
572
|
}
|
|
406
|
-
let { type:
|
|
573
|
+
let { type: F, onFocus: te, ...ne } = x, I = F ?? "text", re = I === "password", L = re && D ? "text" : I, ie = re ? /* @__PURE__ */ Y("button", {
|
|
407
574
|
type: "button",
|
|
408
575
|
onClick: () => O((e) => !e),
|
|
409
576
|
"aria-label": D ? "Hide password" : "Show password",
|
|
410
577
|
className: "cursor-pointer text-muted-foreground transition-colors hover:text-foreground",
|
|
411
578
|
tabIndex: -1,
|
|
412
|
-
children:
|
|
413
|
-
}) : null,
|
|
414
|
-
|
|
415
|
-
}, z = !!(h || g), se = /* @__PURE__ */
|
|
579
|
+
children: Y(D ? T : w, { className: "size-4" })
|
|
580
|
+
}) : null, R = _ ? /* @__PURE__ */ Y(P, { className: "size-4 animate-spin text-muted-foreground" }) : f, ae = re ? ie : p, oe = (e) => {
|
|
581
|
+
L === "number" && e.target.select(), te?.(e);
|
|
582
|
+
}, z = !!(h || g), se = /* @__PURE__ */ Y("input", {
|
|
416
583
|
id: E,
|
|
417
|
-
type:
|
|
584
|
+
type: L,
|
|
418
585
|
ref: t,
|
|
419
586
|
disabled: m,
|
|
420
587
|
"aria-invalid": S,
|
|
421
|
-
"aria-describedby":
|
|
422
|
-
onFocus:
|
|
423
|
-
className:
|
|
424
|
-
...
|
|
588
|
+
"aria-describedby": ee,
|
|
589
|
+
onFocus: oe,
|
|
590
|
+
className: Q("w-full min-w-0 bg-transparent text-base text-foreground outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed md:text-sm", z ? "h-full border-0 py-1 focus-visible:ring-0" : Q("rounded-lg border border-input px-3 py-1 transition-colors", M, u === "default" ? "h-9" : "h-8", "focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50", "disabled:opacity-50", "aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40", R && "pl-9", ae && "pr-9"), z && Q(h ? "pl-0" : "pl-3", g ? "pr-0" : "pr-3"), z && R && !h && "pl-9", z && ae && !g && "pr-9", r),
|
|
591
|
+
...ne
|
|
425
592
|
});
|
|
426
|
-
return /* @__PURE__ */
|
|
427
|
-
className:
|
|
593
|
+
return /* @__PURE__ */ X("div", {
|
|
594
|
+
className: Q("space-y-1.5", i),
|
|
428
595
|
children: [
|
|
429
|
-
a && /* @__PURE__ */
|
|
596
|
+
a && /* @__PURE__ */ X(at, {
|
|
430
597
|
htmlFor: E,
|
|
431
|
-
className:
|
|
432
|
-
children: [a,
|
|
598
|
+
className: Q(m && "text-muted-foreground"),
|
|
599
|
+
children: [a, N]
|
|
433
600
|
}),
|
|
434
|
-
z ? /* @__PURE__ */
|
|
601
|
+
z ? /* @__PURE__ */ X("div", {
|
|
435
602
|
"aria-invalid": S,
|
|
436
|
-
className:
|
|
603
|
+
className: Q("flex items-center overflow-hidden rounded-lg border border-input transition-colors", M, u === "default" ? "h-9" : "h-8", "focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/50", "aria-[invalid=true]:border-destructive aria-[invalid=true]:ring-3 aria-[invalid=true]:ring-destructive/20 dark:aria-[invalid=true]:ring-destructive/40", m && "cursor-not-allowed opacity-50"),
|
|
437
604
|
children: [
|
|
438
|
-
h && /* @__PURE__ */
|
|
605
|
+
h && /* @__PURE__ */ Y("div", {
|
|
439
606
|
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",
|
|
440
607
|
children: h
|
|
441
608
|
}),
|
|
442
|
-
/* @__PURE__ */
|
|
609
|
+
/* @__PURE__ */ X("div", {
|
|
443
610
|
className: "relative flex h-full flex-1 items-center",
|
|
444
611
|
children: [
|
|
445
|
-
|
|
612
|
+
R && /* @__PURE__ */ Y("div", {
|
|
446
613
|
className: "pointer-events-none absolute left-3 flex items-center text-muted-foreground [&_svg]:size-4",
|
|
447
|
-
children:
|
|
614
|
+
children: R
|
|
448
615
|
}),
|
|
449
616
|
se,
|
|
450
|
-
|
|
617
|
+
ae && /* @__PURE__ */ Y("div", {
|
|
451
618
|
className: "absolute right-3 z-10 flex items-center",
|
|
452
|
-
children:
|
|
619
|
+
children: ae
|
|
453
620
|
})
|
|
454
621
|
]
|
|
455
622
|
}),
|
|
456
|
-
g && /* @__PURE__ */
|
|
623
|
+
g && /* @__PURE__ */ Y("div", {
|
|
457
624
|
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",
|
|
458
625
|
children: g
|
|
459
626
|
})
|
|
460
627
|
]
|
|
461
|
-
}) : /* @__PURE__ */
|
|
628
|
+
}) : /* @__PURE__ */ X("div", {
|
|
462
629
|
className: "relative",
|
|
463
630
|
children: [
|
|
464
|
-
|
|
631
|
+
R && /* @__PURE__ */ Y("div", {
|
|
465
632
|
className: "pointer-events-none absolute left-3 top-1/2 flex -translate-y-1/2 items-center text-muted-foreground [&_svg]:size-4",
|
|
466
|
-
children:
|
|
633
|
+
children: R
|
|
467
634
|
}),
|
|
468
635
|
se,
|
|
469
|
-
|
|
636
|
+
ae && /* @__PURE__ */ Y("div", {
|
|
470
637
|
className: "absolute right-3 top-1/2 z-10 flex -translate-y-1/2 items-center",
|
|
471
|
-
children:
|
|
638
|
+
children: ae
|
|
472
639
|
})
|
|
473
640
|
]
|
|
474
641
|
}),
|
|
475
|
-
/* @__PURE__ */
|
|
642
|
+
/* @__PURE__ */ Y(ut, {
|
|
476
643
|
error: S,
|
|
477
644
|
errorMessage: s,
|
|
478
645
|
helperText: c,
|
|
479
646
|
errorId: k,
|
|
480
647
|
helperId: A
|
|
481
648
|
}),
|
|
482
|
-
o && /* @__PURE__ */
|
|
483
|
-
id:
|
|
649
|
+
o && /* @__PURE__ */ Y(st, {
|
|
650
|
+
id: j,
|
|
484
651
|
children: o
|
|
485
652
|
})
|
|
486
653
|
]
|
|
487
654
|
});
|
|
488
|
-
})
|
|
655
|
+
}), ft = [
|
|
656
|
+
{
|
|
657
|
+
match: (e, t) => e.includes("zip") || e.includes("archive") || t.endsWith(".zip") || t.endsWith(".rar"),
|
|
658
|
+
Icon: E
|
|
659
|
+
},
|
|
660
|
+
{
|
|
661
|
+
match: (e) => e.includes("audio/"),
|
|
662
|
+
Icon: A
|
|
663
|
+
},
|
|
664
|
+
{
|
|
665
|
+
match: (e, t) => e.includes("excel") || t.endsWith(".xls") || t.endsWith(".xlsx"),
|
|
666
|
+
Icon: O
|
|
667
|
+
},
|
|
668
|
+
{
|
|
669
|
+
match: (e) => e.startsWith("image/"),
|
|
670
|
+
Icon: j
|
|
671
|
+
},
|
|
672
|
+
{
|
|
673
|
+
match: (e, t) => e.includes("pdf") || t.endsWith(".pdf") || e.includes("word") || t.endsWith(".doc") || t.endsWith(".docx"),
|
|
674
|
+
Icon: k
|
|
675
|
+
},
|
|
676
|
+
{
|
|
677
|
+
match: (e) => e.includes("video/"),
|
|
678
|
+
Icon: ce
|
|
679
|
+
}
|
|
680
|
+
];
|
|
681
|
+
function pt(e) {
|
|
682
|
+
for (let { match: t, Icon: n } of ft) if (t(e.type, e.name)) return /* @__PURE__ */ Y(n, { className: "size-5 opacity-60" });
|
|
683
|
+
return /* @__PURE__ */ Y(D, { className: "size-5 opacity-60" });
|
|
684
|
+
}
|
|
685
|
+
function mt({ entry: e }) {
|
|
686
|
+
let { file: t } = e;
|
|
687
|
+
return /* @__PURE__ */ Y("div", {
|
|
688
|
+
className: "flex aspect-square items-center justify-center overflow-hidden rounded-t-[inherit] bg-accent",
|
|
689
|
+
children: t.type.startsWith("image/") && e.preview ? /* @__PURE__ */ Y("img", {
|
|
690
|
+
alt: t.name,
|
|
691
|
+
className: "size-full rounded-t-[inherit] object-cover",
|
|
692
|
+
src: e.preview
|
|
693
|
+
}) : pt(t)
|
|
694
|
+
});
|
|
695
|
+
}
|
|
696
|
+
function ht({ variant: e = "image", accept: t = "image/*", maxSize: n = 5 * 1024 * 1024, maxFiles: r = 6, multiple: i, initialFiles: a, disabled: o, onFilesChange: s, className: c }) {
|
|
697
|
+
let [{ files: l, isDragging: u, errors: d }, { handleDragEnter: f, handleDragLeave: m, handleDragOver: h, handleDrop: g, openFileDialog: _, removeFile: v, clearFiles: y, getInputProps: b }] = je({
|
|
698
|
+
accept: t,
|
|
699
|
+
maxSize: n,
|
|
700
|
+
maxFiles: r,
|
|
701
|
+
multiple: e === "files" ? !0 : i ?? !1,
|
|
702
|
+
initialFiles: a,
|
|
703
|
+
onFilesChange: s
|
|
704
|
+
}), x = Ae(n), S = d.length > 0 && /* @__PURE__ */ X("div", {
|
|
705
|
+
className: "flex items-center gap-1 text-destructive text-xs",
|
|
706
|
+
role: "alert",
|
|
707
|
+
children: [/* @__PURE__ */ Y(p, { className: "size-3 shrink-0" }), /* @__PURE__ */ Y("span", { children: d[0] })]
|
|
708
|
+
});
|
|
709
|
+
if (e === "image") {
|
|
710
|
+
let e = l[0]?.preview || null, t = l[0];
|
|
711
|
+
return /* @__PURE__ */ X("div", {
|
|
712
|
+
className: Q("flex w-full flex-col gap-2", c),
|
|
713
|
+
children: [/* @__PURE__ */ X("div", {
|
|
714
|
+
className: "relative",
|
|
715
|
+
children: [/* @__PURE__ */ X("div", {
|
|
716
|
+
className: "relative flex min-h-52 flex-col items-center justify-center overflow-hidden rounded-xl border border-input border-dashed p-4 transition-colors hover:bg-accent/50 has-disabled:pointer-events-none has-[img]:border-none has-disabled:opacity-50 has-[input:focus]:border-ring has-[input:focus]:ring-[3px] has-[input:focus]:ring-ring/50 data-[dragging=true]:bg-accent/50",
|
|
717
|
+
"data-dragging": u || void 0,
|
|
718
|
+
onClick: o ? void 0 : _,
|
|
719
|
+
onDragEnter: f,
|
|
720
|
+
onDragLeave: m,
|
|
721
|
+
onDragOver: h,
|
|
722
|
+
onDrop: g,
|
|
723
|
+
role: "button",
|
|
724
|
+
tabIndex: -1,
|
|
725
|
+
children: [/* @__PURE__ */ Y("input", {
|
|
726
|
+
...b({ disabled: o }),
|
|
727
|
+
"aria-label": "Upload image file",
|
|
728
|
+
className: "sr-only"
|
|
729
|
+
}), e ? /* @__PURE__ */ Y("div", {
|
|
730
|
+
className: "absolute inset-0 overflow-hidden rounded-xl",
|
|
731
|
+
children: /* @__PURE__ */ Y("img", {
|
|
732
|
+
alt: t?.file?.name || "Uploaded image",
|
|
733
|
+
className: "size-full rounded-xl object-cover",
|
|
734
|
+
src: e
|
|
735
|
+
})
|
|
736
|
+
}) : /* @__PURE__ */ X("div", {
|
|
737
|
+
className: "flex flex-col items-center justify-center px-4 py-3 text-center",
|
|
738
|
+
children: [
|
|
739
|
+
/* @__PURE__ */ Y("div", {
|
|
740
|
+
"aria-hidden": "true",
|
|
741
|
+
className: "mb-2 flex size-11 shrink-0 items-center justify-center rounded-full border bg-background",
|
|
742
|
+
children: /* @__PURE__ */ Y(ee, { className: "size-4 opacity-60" })
|
|
743
|
+
}),
|
|
744
|
+
/* @__PURE__ */ Y("p", {
|
|
745
|
+
className: "mb-1.5 font-medium text-sm",
|
|
746
|
+
children: "Drop your image here or click to browse"
|
|
747
|
+
}),
|
|
748
|
+
/* @__PURE__ */ X("p", {
|
|
749
|
+
className: "text-muted-foreground text-xs",
|
|
750
|
+
children: ["Max size: ", x]
|
|
751
|
+
})
|
|
752
|
+
]
|
|
753
|
+
})]
|
|
754
|
+
}), e && /* @__PURE__ */ Y("div", {
|
|
755
|
+
className: "absolute top-4 right-4",
|
|
756
|
+
children: /* @__PURE__ */ Y("button", {
|
|
757
|
+
"aria-label": "Remove image",
|
|
758
|
+
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",
|
|
759
|
+
onClick: () => t && v(t.id),
|
|
760
|
+
type: "button",
|
|
761
|
+
children: /* @__PURE__ */ Y(le, {
|
|
762
|
+
"aria-hidden": "true",
|
|
763
|
+
className: "size-4"
|
|
764
|
+
})
|
|
765
|
+
})
|
|
766
|
+
})]
|
|
767
|
+
}), S]
|
|
768
|
+
});
|
|
769
|
+
}
|
|
770
|
+
return /* @__PURE__ */ X("div", {
|
|
771
|
+
className: Q("flex w-full flex-col gap-2", c),
|
|
772
|
+
children: [/* @__PURE__ */ X("div", {
|
|
773
|
+
className: "relative flex min-h-52 flex-col items-center not-data-files:justify-center overflow-hidden rounded-xl border border-input border-dashed p-4 transition-colors has-disabled:pointer-events-none has-disabled:opacity-50 has-[input:focus]:border-ring has-[input:focus]:ring-[3px] has-[input:focus]:ring-ring/50 data-[dragging=true]:bg-accent/50",
|
|
774
|
+
"data-dragging": u || void 0,
|
|
775
|
+
"data-files": l.length > 0 || void 0,
|
|
776
|
+
onDragEnter: f,
|
|
777
|
+
onDragLeave: m,
|
|
778
|
+
onDragOver: h,
|
|
779
|
+
onDrop: g,
|
|
780
|
+
children: [/* @__PURE__ */ Y("input", {
|
|
781
|
+
...b({ disabled: o }),
|
|
782
|
+
"aria-label": "Upload files",
|
|
783
|
+
className: "sr-only"
|
|
784
|
+
}), l.length > 0 ? /* @__PURE__ */ X("div", {
|
|
785
|
+
className: "flex w-full flex-col gap-3",
|
|
786
|
+
children: [/* @__PURE__ */ X("div", {
|
|
787
|
+
className: "flex items-center justify-between gap-2",
|
|
788
|
+
children: [/* @__PURE__ */ X("h3", {
|
|
789
|
+
className: "truncate font-medium text-sm",
|
|
790
|
+
children: [
|
|
791
|
+
"Files (",
|
|
792
|
+
l.length,
|
|
793
|
+
")"
|
|
794
|
+
]
|
|
795
|
+
}), /* @__PURE__ */ X("div", {
|
|
796
|
+
className: "flex gap-2",
|
|
797
|
+
children: [/* @__PURE__ */ X($, {
|
|
798
|
+
disabled: o,
|
|
799
|
+
onClick: _,
|
|
800
|
+
size: "sm",
|
|
801
|
+
variant: "outline",
|
|
802
|
+
children: [/* @__PURE__ */ Y(B, {
|
|
803
|
+
"aria-hidden": "true",
|
|
804
|
+
className: "-ms-0.5 size-3.5 opacity-60"
|
|
805
|
+
}), "Add files"]
|
|
806
|
+
}), /* @__PURE__ */ X($, {
|
|
807
|
+
disabled: o,
|
|
808
|
+
onClick: y,
|
|
809
|
+
size: "sm",
|
|
810
|
+
variant: "outline",
|
|
811
|
+
children: [/* @__PURE__ */ Y(z, {
|
|
812
|
+
"aria-hidden": "true",
|
|
813
|
+
className: "-ms-0.5 size-3.5 opacity-60"
|
|
814
|
+
}), "Remove all"]
|
|
815
|
+
})]
|
|
816
|
+
})]
|
|
817
|
+
}), /* @__PURE__ */ Y("div", {
|
|
818
|
+
className: "grid grid-cols-2 gap-4 md:grid-cols-3",
|
|
819
|
+
children: l.map((e) => /* @__PURE__ */ X("div", {
|
|
820
|
+
className: "relative flex flex-col rounded-md border bg-background",
|
|
821
|
+
children: [
|
|
822
|
+
/* @__PURE__ */ Y(mt, { entry: e }),
|
|
823
|
+
/* @__PURE__ */ Y($, {
|
|
824
|
+
"aria-label": "Remove file",
|
|
825
|
+
className: "-top-2 -right-2 absolute size-6 rounded-full border-2 border-background shadow-none focus-visible:border-background",
|
|
826
|
+
onClick: () => v(e.id),
|
|
827
|
+
size: "icon",
|
|
828
|
+
children: /* @__PURE__ */ Y(le, { className: "size-3.5" })
|
|
829
|
+
}),
|
|
830
|
+
/* @__PURE__ */ X("div", {
|
|
831
|
+
className: "flex min-w-0 flex-col gap-0.5 border-t p-3",
|
|
832
|
+
children: [/* @__PURE__ */ Y("p", {
|
|
833
|
+
className: "truncate font-medium text-[13px]",
|
|
834
|
+
children: e.file.name
|
|
835
|
+
}), /* @__PURE__ */ Y("p", {
|
|
836
|
+
className: "truncate text-muted-foreground text-xs",
|
|
837
|
+
children: Ae(e.file.size)
|
|
838
|
+
})]
|
|
839
|
+
})
|
|
840
|
+
]
|
|
841
|
+
}, e.id))
|
|
842
|
+
})]
|
|
843
|
+
}) : /* @__PURE__ */ X("div", {
|
|
844
|
+
className: "flex flex-col items-center justify-center px-4 py-3 text-center",
|
|
845
|
+
children: [
|
|
846
|
+
/* @__PURE__ */ Y("div", {
|
|
847
|
+
"aria-hidden": "true",
|
|
848
|
+
className: "mb-2 flex size-11 shrink-0 items-center justify-center rounded-full border bg-background",
|
|
849
|
+
children: /* @__PURE__ */ Y(j, { className: "size-4 opacity-60" })
|
|
850
|
+
}),
|
|
851
|
+
/* @__PURE__ */ Y("p", {
|
|
852
|
+
className: "mb-1.5 font-medium text-sm",
|
|
853
|
+
children: "Drop your files here"
|
|
854
|
+
}),
|
|
855
|
+
/* @__PURE__ */ X("p", {
|
|
856
|
+
className: "text-muted-foreground text-xs",
|
|
857
|
+
children: [
|
|
858
|
+
"Max ",
|
|
859
|
+
r,
|
|
860
|
+
" files ∙ Up to ",
|
|
861
|
+
x
|
|
862
|
+
]
|
|
863
|
+
}),
|
|
864
|
+
/* @__PURE__ */ X($, {
|
|
865
|
+
className: "mt-4",
|
|
866
|
+
disabled: o,
|
|
867
|
+
onClick: _,
|
|
868
|
+
variant: "outline",
|
|
869
|
+
children: [/* @__PURE__ */ Y(B, {
|
|
870
|
+
"aria-hidden": "true",
|
|
871
|
+
className: "-ms-1 opacity-60"
|
|
872
|
+
}), "Select files"]
|
|
873
|
+
})
|
|
874
|
+
]
|
|
875
|
+
})]
|
|
876
|
+
}), S]
|
|
877
|
+
});
|
|
878
|
+
}
|
|
489
879
|
//#endregion
|
|
490
880
|
//#region src/components/ui/dialog.tsx
|
|
491
|
-
function
|
|
492
|
-
return /* @__PURE__ */
|
|
881
|
+
function gt({ ...e }) {
|
|
882
|
+
return /* @__PURE__ */ Y(W.Root, {
|
|
493
883
|
"data-slot": "dialog",
|
|
494
884
|
...e
|
|
495
885
|
});
|
|
496
886
|
}
|
|
497
|
-
function
|
|
498
|
-
return /* @__PURE__ */
|
|
887
|
+
function _t({ ...e }) {
|
|
888
|
+
return /* @__PURE__ */ Y(W.Trigger, {
|
|
499
889
|
"data-slot": "dialog-trigger",
|
|
500
890
|
...e
|
|
501
891
|
});
|
|
502
892
|
}
|
|
503
|
-
function
|
|
504
|
-
return /* @__PURE__ */
|
|
893
|
+
function vt({ ...e }) {
|
|
894
|
+
return /* @__PURE__ */ Y(W.Portal, {
|
|
505
895
|
"data-slot": "dialog-portal",
|
|
506
896
|
...e
|
|
507
897
|
});
|
|
508
898
|
}
|
|
509
|
-
function
|
|
510
|
-
return /* @__PURE__ */
|
|
899
|
+
function yt({ ...e }) {
|
|
900
|
+
return /* @__PURE__ */ Y(W.Close, {
|
|
511
901
|
"data-slot": "dialog-close",
|
|
512
902
|
...e
|
|
513
903
|
});
|
|
514
904
|
}
|
|
515
|
-
function
|
|
516
|
-
return /* @__PURE__ */
|
|
905
|
+
function bt({ className: e, ...t }) {
|
|
906
|
+
return /* @__PURE__ */ Y(W.Overlay, {
|
|
517
907
|
"data-slot": "dialog-overlay",
|
|
518
|
-
className:
|
|
908
|
+
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),
|
|
519
909
|
...t
|
|
520
910
|
});
|
|
521
911
|
}
|
|
522
|
-
function
|
|
523
|
-
return /* @__PURE__ */
|
|
912
|
+
function xt({ className: e, children: t, showCloseButton: n = !0, ...r }) {
|
|
913
|
+
return /* @__PURE__ */ X(vt, { children: [/* @__PURE__ */ Y(bt, {}), /* @__PURE__ */ X(W.Content, {
|
|
524
914
|
"data-slot": "dialog-content",
|
|
525
|
-
className:
|
|
915
|
+
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),
|
|
526
916
|
...r,
|
|
527
|
-
children: [t, n && /* @__PURE__ */
|
|
917
|
+
children: [t, n && /* @__PURE__ */ Y(W.Close, {
|
|
528
918
|
"data-slot": "dialog-close",
|
|
529
919
|
asChild: !0,
|
|
530
|
-
children: /* @__PURE__ */
|
|
920
|
+
children: /* @__PURE__ */ X($, {
|
|
531
921
|
variant: "ghost",
|
|
532
922
|
className: "absolute top-2 right-2",
|
|
533
923
|
size: "icon-sm",
|
|
534
|
-
children: [/* @__PURE__ */
|
|
924
|
+
children: [/* @__PURE__ */ Y(le, {}), /* @__PURE__ */ Y("span", {
|
|
535
925
|
className: "sr-only",
|
|
536
926
|
children: "Close"
|
|
537
927
|
})]
|
|
@@ -539,71 +929,71 @@ function at({ className: e, children: t, showCloseButton: n = !0, ...r }) {
|
|
|
539
929
|
})]
|
|
540
930
|
})] });
|
|
541
931
|
}
|
|
542
|
-
function
|
|
543
|
-
return /* @__PURE__ */
|
|
932
|
+
function St({ className: e, ...t }) {
|
|
933
|
+
return /* @__PURE__ */ Y("div", {
|
|
544
934
|
"data-slot": "dialog-header",
|
|
545
|
-
className:
|
|
935
|
+
className: Q("flex flex-col gap-2", e),
|
|
546
936
|
...t
|
|
547
937
|
});
|
|
548
938
|
}
|
|
549
|
-
function
|
|
550
|
-
return /* @__PURE__ */
|
|
939
|
+
function Ct({ className: e, showCloseButton: t = !1, children: n, ...r }) {
|
|
940
|
+
return /* @__PURE__ */ X("div", {
|
|
551
941
|
"data-slot": "dialog-footer",
|
|
552
|
-
className:
|
|
942
|
+
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),
|
|
553
943
|
...r,
|
|
554
|
-
children: [n, t && /* @__PURE__ */
|
|
944
|
+
children: [n, t && /* @__PURE__ */ Y(W.Close, {
|
|
555
945
|
asChild: !0,
|
|
556
|
-
children: /* @__PURE__ */
|
|
946
|
+
children: /* @__PURE__ */ Y($, {
|
|
557
947
|
variant: "outline",
|
|
558
948
|
children: "Close"
|
|
559
949
|
})
|
|
560
950
|
})]
|
|
561
951
|
});
|
|
562
952
|
}
|
|
563
|
-
function
|
|
564
|
-
return /* @__PURE__ */
|
|
953
|
+
function wt({ className: e, ...t }) {
|
|
954
|
+
return /* @__PURE__ */ Y(W.Title, {
|
|
565
955
|
"data-slot": "dialog-title",
|
|
566
|
-
className:
|
|
956
|
+
className: Q("text-base leading-none font-medium", e),
|
|
567
957
|
...t
|
|
568
958
|
});
|
|
569
959
|
}
|
|
570
|
-
function
|
|
571
|
-
return /* @__PURE__ */
|
|
960
|
+
function Tt({ className: e, ...t }) {
|
|
961
|
+
return /* @__PURE__ */ Y(W.Description, {
|
|
572
962
|
"data-slot": "dialog-description",
|
|
573
|
-
className:
|
|
963
|
+
className: Q("text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground", e),
|
|
574
964
|
...t
|
|
575
965
|
});
|
|
576
966
|
}
|
|
577
967
|
//#endregion
|
|
578
968
|
//#region src/components/ui/input.tsx
|
|
579
|
-
function
|
|
580
|
-
return /* @__PURE__ */
|
|
969
|
+
function Et({ className: e, type: t, ...n }) {
|
|
970
|
+
return /* @__PURE__ */ Y("input", {
|
|
581
971
|
type: t,
|
|
582
972
|
"data-slot": "input",
|
|
583
|
-
className:
|
|
973
|
+
className: Q("h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none 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),
|
|
584
974
|
...n
|
|
585
975
|
});
|
|
586
976
|
}
|
|
587
977
|
//#endregion
|
|
588
978
|
//#region src/components/ui/textarea.tsx
|
|
589
|
-
function
|
|
590
|
-
return /* @__PURE__ */
|
|
979
|
+
function Dt({ className: e, ...t }) {
|
|
980
|
+
return /* @__PURE__ */ Y("textarea", {
|
|
591
981
|
"data-slot": "textarea",
|
|
592
|
-
className:
|
|
982
|
+
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),
|
|
593
983
|
...t
|
|
594
984
|
});
|
|
595
985
|
}
|
|
596
986
|
//#endregion
|
|
597
987
|
//#region src/components/ui/input-group.tsx
|
|
598
|
-
function
|
|
599
|
-
return /* @__PURE__ */
|
|
988
|
+
function Ot({ className: e, ...t }) {
|
|
989
|
+
return /* @__PURE__ */ Y("div", {
|
|
600
990
|
"data-slot": "input-group",
|
|
601
991
|
role: "group",
|
|
602
|
-
className:
|
|
992
|
+
className: Q("group/input-group relative flex h-8 w-full min-w-0 items-center rounded-lg border border-input transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:bg-input/50 has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-disabled:bg-input/80 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5", e),
|
|
603
993
|
...t
|
|
604
994
|
});
|
|
605
995
|
}
|
|
606
|
-
var
|
|
996
|
+
var kt = H("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", {
|
|
607
997
|
variants: { align: {
|
|
608
998
|
"inline-start": "order-first pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]",
|
|
609
999
|
"inline-end": "order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]",
|
|
@@ -612,19 +1002,19 @@ var pt = P("flex h-auto cursor-text items-center justify-center gap-2 py-1.5 tex
|
|
|
612
1002
|
} },
|
|
613
1003
|
defaultVariants: { align: "inline-start" }
|
|
614
1004
|
});
|
|
615
|
-
function
|
|
616
|
-
return /* @__PURE__ */
|
|
1005
|
+
function At({ className: e, align: t = "inline-start", ...n }) {
|
|
1006
|
+
return /* @__PURE__ */ Y("div", {
|
|
617
1007
|
role: "group",
|
|
618
1008
|
"data-slot": "input-group-addon",
|
|
619
1009
|
"data-align": t,
|
|
620
|
-
className:
|
|
1010
|
+
className: Q(kt({ align: t }), e),
|
|
621
1011
|
onClick: (e) => {
|
|
622
1012
|
e.target.closest("button") || e.currentTarget.parentElement?.querySelector("input")?.focus();
|
|
623
1013
|
},
|
|
624
1014
|
...n
|
|
625
1015
|
});
|
|
626
1016
|
}
|
|
627
|
-
var
|
|
1017
|
+
var jt = H("flex items-center gap-2 text-sm shadow-none", {
|
|
628
1018
|
variants: { size: {
|
|
629
1019
|
xs: "h-6 gap-1 rounded-[calc(var(--radius)-3px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5",
|
|
630
1020
|
sm: "",
|
|
@@ -633,179 +1023,179 @@ var ht = P("flex items-center gap-2 text-sm shadow-none", {
|
|
|
633
1023
|
} },
|
|
634
1024
|
defaultVariants: { size: "xs" }
|
|
635
1025
|
});
|
|
636
|
-
function
|
|
637
|
-
return /* @__PURE__ */
|
|
1026
|
+
function Mt({ className: e, type: t = "button", variant: n = "ghost", size: r = "xs", ...i }) {
|
|
1027
|
+
return /* @__PURE__ */ Y($, {
|
|
638
1028
|
type: t,
|
|
639
1029
|
"data-size": r,
|
|
640
1030
|
variant: n,
|
|
641
|
-
className:
|
|
1031
|
+
className: Q(jt({ size: r }), e),
|
|
642
1032
|
...i
|
|
643
1033
|
});
|
|
644
1034
|
}
|
|
645
|
-
function
|
|
646
|
-
return /* @__PURE__ */
|
|
647
|
-
className:
|
|
1035
|
+
function Nt({ className: e, ...t }) {
|
|
1036
|
+
return /* @__PURE__ */ Y("span", {
|
|
1037
|
+
className: Q("flex items-center gap-2 text-sm text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4", e),
|
|
648
1038
|
...t
|
|
649
1039
|
});
|
|
650
1040
|
}
|
|
651
|
-
function
|
|
652
|
-
return /* @__PURE__ */
|
|
1041
|
+
function Pt({ className: e, ...t }) {
|
|
1042
|
+
return /* @__PURE__ */ Y(Et, {
|
|
653
1043
|
"data-slot": "input-group-control",
|
|
654
|
-
className:
|
|
1044
|
+
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),
|
|
655
1045
|
...t
|
|
656
1046
|
});
|
|
657
1047
|
}
|
|
658
|
-
function
|
|
659
|
-
return /* @__PURE__ */
|
|
1048
|
+
function Ft({ className: e, ...t }) {
|
|
1049
|
+
return /* @__PURE__ */ Y(Dt, {
|
|
660
1050
|
"data-slot": "input-group-control",
|
|
661
|
-
className:
|
|
1051
|
+
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),
|
|
662
1052
|
...t
|
|
663
1053
|
});
|
|
664
1054
|
}
|
|
665
1055
|
//#endregion
|
|
666
1056
|
//#region src/components/ui/command.tsx
|
|
667
|
-
function
|
|
668
|
-
return /* @__PURE__ */
|
|
1057
|
+
function It({ className: e, ...t }) {
|
|
1058
|
+
return /* @__PURE__ */ Y(Z, {
|
|
669
1059
|
"data-slot": "command",
|
|
670
|
-
className:
|
|
1060
|
+
className: Q("flex size-full flex-col overflow-hidden rounded-xl! bg-popover p-1 text-popover-foreground", e),
|
|
671
1061
|
...t
|
|
672
1062
|
});
|
|
673
1063
|
}
|
|
674
|
-
function
|
|
675
|
-
return /* @__PURE__ */
|
|
1064
|
+
function Lt({ title: e = "Command Palette", description: t = "Search for a command to run...", children: n, className: r, showCloseButton: i = !1, ...a }) {
|
|
1065
|
+
return /* @__PURE__ */ X(gt, {
|
|
676
1066
|
...a,
|
|
677
|
-
children: [/* @__PURE__ */
|
|
1067
|
+
children: [/* @__PURE__ */ X(St, {
|
|
678
1068
|
className: "sr-only",
|
|
679
|
-
children: [/* @__PURE__ */
|
|
680
|
-
}), /* @__PURE__ */
|
|
681
|
-
className:
|
|
1069
|
+
children: [/* @__PURE__ */ Y(wt, { children: e }), /* @__PURE__ */ Y(Tt, { children: t })]
|
|
1070
|
+
}), /* @__PURE__ */ Y(xt, {
|
|
1071
|
+
className: Q("top-1/3 translate-y-0 overflow-hidden rounded-xl! p-0", r),
|
|
682
1072
|
showCloseButton: i,
|
|
683
1073
|
children: n
|
|
684
1074
|
})]
|
|
685
1075
|
});
|
|
686
1076
|
}
|
|
687
|
-
function
|
|
688
|
-
return /* @__PURE__ */
|
|
1077
|
+
function Rt({ className: e, ...t }) {
|
|
1078
|
+
return /* @__PURE__ */ Y("div", {
|
|
689
1079
|
"data-slot": "command-input-wrapper",
|
|
690
1080
|
className: "p-1 pb-0",
|
|
691
|
-
children: /* @__PURE__ */
|
|
1081
|
+
children: /* @__PURE__ */ X(Ot, {
|
|
692
1082
|
className: "h-8! rounded-lg! border-input/30 bg-input/30 shadow-none! *:data-[slot=input-group-addon]:pl-2!",
|
|
693
|
-
children: [/* @__PURE__ */
|
|
1083
|
+
children: [/* @__PURE__ */ Y(Z.Input, {
|
|
694
1084
|
"data-slot": "command-input",
|
|
695
|
-
className:
|
|
1085
|
+
className: Q("w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50", e),
|
|
696
1086
|
...t
|
|
697
|
-
}), /* @__PURE__ */
|
|
1087
|
+
}), /* @__PURE__ */ Y(At, { children: /* @__PURE__ */ Y(oe, { className: "size-4 shrink-0 opacity-50" }) })]
|
|
698
1088
|
})
|
|
699
1089
|
});
|
|
700
1090
|
}
|
|
701
|
-
function
|
|
702
|
-
return /* @__PURE__ */
|
|
1091
|
+
function zt({ className: e, ...t }) {
|
|
1092
|
+
return /* @__PURE__ */ Y(Z.List, {
|
|
703
1093
|
"data-slot": "command-list",
|
|
704
|
-
className:
|
|
1094
|
+
className: Q("no-scrollbar max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none", e),
|
|
705
1095
|
...t
|
|
706
1096
|
});
|
|
707
1097
|
}
|
|
708
|
-
function
|
|
709
|
-
return /* @__PURE__ */
|
|
1098
|
+
function Bt({ className: e, ...t }) {
|
|
1099
|
+
return /* @__PURE__ */ Y(Z.Empty, {
|
|
710
1100
|
"data-slot": "command-empty",
|
|
711
|
-
className:
|
|
1101
|
+
className: Q("py-6 text-center text-sm", e),
|
|
712
1102
|
...t
|
|
713
1103
|
});
|
|
714
1104
|
}
|
|
715
|
-
function
|
|
716
|
-
return /* @__PURE__ */
|
|
1105
|
+
function Vt({ className: e, ...t }) {
|
|
1106
|
+
return /* @__PURE__ */ Y(Z.Group, {
|
|
717
1107
|
"data-slot": "command-group",
|
|
718
|
-
className:
|
|
1108
|
+
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),
|
|
719
1109
|
...t
|
|
720
1110
|
});
|
|
721
1111
|
}
|
|
722
|
-
function
|
|
723
|
-
return /* @__PURE__ */
|
|
1112
|
+
function Ht({ className: e, ...t }) {
|
|
1113
|
+
return /* @__PURE__ */ Y(Z.Separator, {
|
|
724
1114
|
"data-slot": "command-separator",
|
|
725
|
-
className:
|
|
1115
|
+
className: Q("-mx-1 h-px bg-border", e),
|
|
726
1116
|
...t
|
|
727
1117
|
});
|
|
728
1118
|
}
|
|
729
|
-
function
|
|
730
|
-
return /* @__PURE__ */
|
|
1119
|
+
function Ut({ className: e, children: t, ...n }) {
|
|
1120
|
+
return /* @__PURE__ */ X(Z.Item, {
|
|
731
1121
|
"data-slot": "command-item",
|
|
732
|
-
className:
|
|
1122
|
+
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),
|
|
733
1123
|
...n,
|
|
734
|
-
children: [t, /* @__PURE__ */
|
|
1124
|
+
children: [t, /* @__PURE__ */ Y(g, { className: "ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100" })]
|
|
735
1125
|
});
|
|
736
1126
|
}
|
|
737
|
-
function
|
|
738
|
-
return /* @__PURE__ */
|
|
1127
|
+
function Wt({ className: e, ...t }) {
|
|
1128
|
+
return /* @__PURE__ */ Y("span", {
|
|
739
1129
|
"data-slot": "command-shortcut",
|
|
740
|
-
className:
|
|
1130
|
+
className: Q("ml-auto text-xs tracking-widest text-muted-foreground group-data-selected/command-item:text-foreground", e),
|
|
741
1131
|
...t
|
|
742
1132
|
});
|
|
743
1133
|
}
|
|
744
1134
|
//#endregion
|
|
745
1135
|
//#region src/components/ui/popover.tsx
|
|
746
|
-
function
|
|
747
|
-
return /* @__PURE__ */
|
|
1136
|
+
function Gt({ ...e }) {
|
|
1137
|
+
return /* @__PURE__ */ Y(pe.Root, {
|
|
748
1138
|
"data-slot": "popover",
|
|
749
1139
|
...e
|
|
750
1140
|
});
|
|
751
1141
|
}
|
|
752
|
-
function
|
|
753
|
-
return /* @__PURE__ */
|
|
1142
|
+
function Kt({ ...e }) {
|
|
1143
|
+
return /* @__PURE__ */ Y(pe.Trigger, {
|
|
754
1144
|
"data-slot": "popover-trigger",
|
|
755
1145
|
...e
|
|
756
1146
|
});
|
|
757
1147
|
}
|
|
758
|
-
function
|
|
759
|
-
return /* @__PURE__ */
|
|
1148
|
+
function qt({ className: e, align: t = "center", sideOffset: n = 4, ...r }) {
|
|
1149
|
+
return /* @__PURE__ */ Y(pe.Portal, { children: /* @__PURE__ */ Y(pe.Content, {
|
|
760
1150
|
"data-slot": "popover-content",
|
|
761
1151
|
align: t,
|
|
762
1152
|
sideOffset: n,
|
|
763
|
-
className:
|
|
1153
|
+
className: Q("z-50 flex w-72 origin-(--radix-popover-content-transform-origin) flex-col gap-2.5 rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden 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),
|
|
764
1154
|
...r
|
|
765
1155
|
}) });
|
|
766
1156
|
}
|
|
767
|
-
function
|
|
768
|
-
return /* @__PURE__ */
|
|
1157
|
+
function Jt({ ...e }) {
|
|
1158
|
+
return /* @__PURE__ */ Y(pe.Anchor, {
|
|
769
1159
|
"data-slot": "popover-anchor",
|
|
770
1160
|
...e
|
|
771
1161
|
});
|
|
772
1162
|
}
|
|
773
|
-
function
|
|
774
|
-
return /* @__PURE__ */
|
|
1163
|
+
function Yt({ className: e, ...t }) {
|
|
1164
|
+
return /* @__PURE__ */ Y("div", {
|
|
775
1165
|
"data-slot": "popover-header",
|
|
776
|
-
className:
|
|
1166
|
+
className: Q("flex flex-col gap-0.5 text-sm", e),
|
|
777
1167
|
...t
|
|
778
1168
|
});
|
|
779
1169
|
}
|
|
780
|
-
function
|
|
781
|
-
return /* @__PURE__ */
|
|
1170
|
+
function Xt({ className: e, ...t }) {
|
|
1171
|
+
return /* @__PURE__ */ Y("div", {
|
|
782
1172
|
"data-slot": "popover-title",
|
|
783
|
-
className:
|
|
1173
|
+
className: Q("font-medium", e),
|
|
784
1174
|
...t
|
|
785
1175
|
});
|
|
786
1176
|
}
|
|
787
|
-
function
|
|
788
|
-
return /* @__PURE__ */
|
|
1177
|
+
function Zt({ className: e, ...t }) {
|
|
1178
|
+
return /* @__PURE__ */ Y("p", {
|
|
789
1179
|
"data-slot": "popover-description",
|
|
790
|
-
className:
|
|
1180
|
+
className: Q("text-muted-foreground", e),
|
|
791
1181
|
...t
|
|
792
1182
|
});
|
|
793
1183
|
}
|
|
794
1184
|
//#endregion
|
|
795
1185
|
//#region src/components/custom/advanced-select.tsx
|
|
796
|
-
function
|
|
1186
|
+
function Qt(e) {
|
|
797
1187
|
return typeof e == "object" && !!e && "value" in e && "label" in e;
|
|
798
1188
|
}
|
|
799
|
-
function
|
|
800
|
-
let [
|
|
801
|
-
|
|
802
|
-
}, [
|
|
1189
|
+
function $t({ 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: _, renderOptionLabel: y, label: b, description: x, required: S = !1, onCreateNew: C, createNewLabel: w = "New item", loading: T = !1, compactMultiple: E = !1, formatCompactDisplay: D, startItem: O, endItem: k, maxSelections: A, defaultOpen: j = !1, onOpenChange: ee, onLoadMore: M, hasNextPage: N = !1, isFetchingNextPage: F = !1, allowEmpty: te = !1, showSelectAll: ne = !1, readOnly: I = !1, popoverClassName: re }) {
|
|
1190
|
+
let [L, ie] = n.useState(j), R = n.useRef(!1), oe = n.useRef(null), z = n.useId(), se = n.useCallback((e) => {
|
|
1191
|
+
I && e || (ie(e), ee?.(e), e && (R.current = !1));
|
|
1192
|
+
}, [ee, I]), [B, ce] = n.useState(l ? Array.isArray(r) ? r : r ? [r] : [] : []);
|
|
803
1193
|
n.useEffect(() => {
|
|
804
|
-
l &&
|
|
1194
|
+
l && ce(Array.isArray(r) ? r : r ? [r] : []);
|
|
805
1195
|
}, [l, r]), n.useEffect(() => {
|
|
806
|
-
|
|
807
|
-
}, [
|
|
808
|
-
let
|
|
1196
|
+
F || (R.current = !1);
|
|
1197
|
+
}, [F]);
|
|
1198
|
+
let V = n.useCallback((e) => typeof e == "string" ? e : _ ? _(e) : Qt(e) ? e.value : String(e), [_]), H = n.useCallback((n) => {
|
|
809
1199
|
if (typeof n == "string") {
|
|
810
1200
|
for (let e of t) {
|
|
811
1201
|
let t = e.options.find((e) => e.value === n);
|
|
@@ -813,33 +1203,33 @@ function Lt({ options: e = [], groups: t = [], value: r, onValueChange: i, place
|
|
|
813
1203
|
}
|
|
814
1204
|
for (let t of e) if (typeof t == "string") {
|
|
815
1205
|
if (t === n) return t;
|
|
816
|
-
} else if (
|
|
1206
|
+
} else if (Qt(t) && t.value === n) return t.label;
|
|
817
1207
|
return n;
|
|
818
1208
|
}
|
|
819
|
-
return
|
|
1209
|
+
return h ? h(n) : Qt(n) ? n.label : String(n);
|
|
820
1210
|
}, [
|
|
821
|
-
|
|
1211
|
+
h,
|
|
822
1212
|
t,
|
|
823
1213
|
e
|
|
824
|
-
]),
|
|
1214
|
+
]), U = n.useMemo(() => l || !r ? "" : typeof r == "string" ? r : Array.isArray(r) ? "" : V(r), [
|
|
825
1215
|
l,
|
|
826
1216
|
r,
|
|
827
|
-
|
|
828
|
-
]),
|
|
1217
|
+
V
|
|
1218
|
+
]), ue = n.useMemo(() => e.map((e) => typeof e == "string" ? {
|
|
829
1219
|
value: e,
|
|
830
1220
|
label: e
|
|
831
|
-
} :
|
|
832
|
-
value:
|
|
833
|
-
label:
|
|
1221
|
+
} : Qt(e) ? e : {
|
|
1222
|
+
value: V(e),
|
|
1223
|
+
label: H(e)
|
|
834
1224
|
}), [
|
|
835
1225
|
e,
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
]),
|
|
839
|
-
let e = [...
|
|
1226
|
+
H,
|
|
1227
|
+
V
|
|
1228
|
+
]), W = n.useCallback((t) => e.find((e) => V(e) === t), [e, V]), G = n.useMemo(() => {
|
|
1229
|
+
let e = [...ue];
|
|
840
1230
|
return t.forEach((t) => e.push(...t.options)), e;
|
|
841
|
-
}, [
|
|
842
|
-
let r = e.find((e) =>
|
|
1231
|
+
}, [ue, t]), de = (n) => {
|
|
1232
|
+
let r = e.find((e) => V(e) === n);
|
|
843
1233
|
if (r === void 0 && t.length > 0) for (let e of t) {
|
|
844
1234
|
let t = e.options.find((e) => e.value === n);
|
|
845
1235
|
if (t) {
|
|
@@ -848,425 +1238,500 @@ function Lt({ options: e = [], groups: t = [], value: r, onValueChange: i, place
|
|
|
848
1238
|
}
|
|
849
1239
|
}
|
|
850
1240
|
if (l) {
|
|
851
|
-
let e =
|
|
852
|
-
if (!e && A &&
|
|
853
|
-
let t = e ?
|
|
854
|
-
|
|
855
|
-
} else i?.(r),
|
|
856
|
-
},
|
|
1241
|
+
let e = B.some((e) => V(e) === n);
|
|
1242
|
+
if (!e && A && B.length >= A || e && B.length === 1 && !te) return;
|
|
1243
|
+
let t = e ? B.filter((e) => V(e) !== n) : [...B, r];
|
|
1244
|
+
ce(t), i?.(t);
|
|
1245
|
+
} else i?.(r), ie(!1);
|
|
1246
|
+
}, fe = l && G.length > 0 && G.length === B.length, pe = () => {
|
|
857
1247
|
if (l) {
|
|
858
|
-
if (
|
|
859
|
-
|
|
1248
|
+
if (fe) {
|
|
1249
|
+
te && (ce([]), i?.([]));
|
|
860
1250
|
return;
|
|
861
1251
|
}
|
|
862
|
-
A &&
|
|
1252
|
+
A && G.length > A || (ce(G), i?.(G));
|
|
863
1253
|
}
|
|
864
|
-
},
|
|
865
|
-
e.stopPropagation(), l ? (
|
|
866
|
-
},
|
|
867
|
-
if (e.stopPropagation(),
|
|
868
|
-
let n =
|
|
869
|
-
|
|
870
|
-
},
|
|
1254
|
+
}, me = (e) => {
|
|
1255
|
+
e.stopPropagation(), l ? (ce([]), i?.([])) : i?.("");
|
|
1256
|
+
}, he = (e, t) => {
|
|
1257
|
+
if (e.stopPropagation(), B.length === 1 && !te) return;
|
|
1258
|
+
let n = B.filter((e) => V(e) !== V(t));
|
|
1259
|
+
ce(n), i?.(n);
|
|
1260
|
+
}, K = n.useCallback((e) => {
|
|
871
1261
|
let t = e.currentTarget;
|
|
872
|
-
t.scrollHeight - t.scrollTop - t.clientHeight < 100 && M &&
|
|
1262
|
+
t.scrollHeight - t.scrollTop - t.clientHeight < 100 && M && N && !F && !R.current && (R.current = !0, M());
|
|
873
1263
|
}, [
|
|
874
1264
|
M,
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
]),
|
|
878
|
-
!o && !
|
|
879
|
-
},
|
|
880
|
-
className:
|
|
881
|
-
children: l &&
|
|
1265
|
+
N,
|
|
1266
|
+
F
|
|
1267
|
+
]), ge = l ? B.length > 0 : !!U, _e = () => l ? null : G.find((e) => e.value === U)?.label || a, ve = () => {
|
|
1268
|
+
!o && !I && (oe.current?.focus(), ie(!0));
|
|
1269
|
+
}, ye = !!(O || k), 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__ */ Y("div", {
|
|
1270
|
+
className: Q("flex min-w-0 flex-1 items-center gap-1.5", q ? "py-1" : "overflow-hidden"),
|
|
1271
|
+
children: l && B.length > 0 ? E ? /* @__PURE__ */ Y("span", {
|
|
882
1272
|
className: "min-w-0 truncate",
|
|
883
|
-
children: D ? D(
|
|
884
|
-
}) : /* @__PURE__ */
|
|
1273
|
+
children: D ? D(B) : `${B.length} selected`
|
|
1274
|
+
}) : /* @__PURE__ */ Y("div", {
|
|
885
1275
|
className: "flex flex-wrap items-center gap-1.5",
|
|
886
|
-
children:
|
|
1276
|
+
children: B.map((e, t) => /* @__PURE__ */ X("span", {
|
|
887
1277
|
className: "inline-flex items-center gap-1 rounded-sm bg-primary px-2 py-0.5 text-xs font-normal text-primary-foreground",
|
|
888
|
-
children: [
|
|
1278
|
+
children: [H(e), !o && /* @__PURE__ */ Y("button", {
|
|
889
1279
|
type: "button",
|
|
890
|
-
"aria-label": `Remove ${
|
|
891
|
-
onClick: (t) =>
|
|
1280
|
+
"aria-label": `Remove ${H(e)}`,
|
|
1281
|
+
onClick: (t) => he(t, e),
|
|
892
1282
|
className: "rounded-sm transition-colors hover:bg-primary/80",
|
|
893
|
-
children: /* @__PURE__ */
|
|
1283
|
+
children: /* @__PURE__ */ Y(le, { className: "size-3" })
|
|
894
1284
|
})]
|
|
895
|
-
}, `${
|
|
896
|
-
}) : /* @__PURE__ */
|
|
897
|
-
className:
|
|
898
|
-
children:
|
|
1285
|
+
}, `${V(e)}-${t}`))
|
|
1286
|
+
}) : /* @__PURE__ */ Y("span", {
|
|
1287
|
+
className: Q("block min-w-0 truncate", !ge && "text-muted-foreground"),
|
|
1288
|
+
children: _e() || a
|
|
899
1289
|
})
|
|
900
|
-
}),
|
|
1290
|
+
}), Z = /* @__PURE__ */ X("div", {
|
|
901
1291
|
className: "flex shrink-0 items-center gap-1",
|
|
902
|
-
children: [m &&
|
|
1292
|
+
children: [m && ge && !o && /* @__PURE__ */ Y("span", {
|
|
903
1293
|
role: "button",
|
|
904
1294
|
tabIndex: 0,
|
|
905
1295
|
"aria-label": "Clear",
|
|
906
|
-
onClick:
|
|
1296
|
+
onClick: me,
|
|
907
1297
|
onKeyDown: (e) => {
|
|
908
|
-
(e.key === "Enter" || e.key === " ") && (e.stopPropagation(),
|
|
1298
|
+
(e.key === "Enter" || e.key === " ") && (e.stopPropagation(), me(e));
|
|
909
1299
|
},
|
|
910
1300
|
className: "cursor-pointer rounded-sm p-0.5 transition-colors hover:bg-accent",
|
|
911
|
-
children: /* @__PURE__ */
|
|
912
|
-
}), /* @__PURE__ */
|
|
1301
|
+
children: /* @__PURE__ */ Y(le, { className: "size-3.5" })
|
|
1302
|
+
}), /* @__PURE__ */ Y(v, {
|
|
913
1303
|
size: 16,
|
|
914
1304
|
className: "shrink-0 opacity-60",
|
|
915
1305
|
"aria-hidden": !0
|
|
916
1306
|
})]
|
|
917
|
-
}),
|
|
918
|
-
let t = l ?
|
|
919
|
-
return /* @__PURE__ */
|
|
1307
|
+
}), Ce = (e) => {
|
|
1308
|
+
let t = l ? B.some((t) => V(t) === e.value) : U === e.value, n = W(e.value);
|
|
1309
|
+
return /* @__PURE__ */ X(Ut, {
|
|
920
1310
|
value: e.value,
|
|
921
|
-
onSelect: () =>
|
|
1311
|
+
onSelect: () => de(e.value),
|
|
922
1312
|
disabled: e.disabled,
|
|
923
1313
|
children: [
|
|
924
|
-
l ? /* @__PURE__ */
|
|
925
|
-
className:
|
|
926
|
-
children: t && /* @__PURE__ */
|
|
1314
|
+
l ? /* @__PURE__ */ Y("div", {
|
|
1315
|
+
className: Q("flex size-4 shrink-0 items-center justify-center rounded-sm border", t ? "border-primary bg-primary" : "border-input"),
|
|
1316
|
+
children: t && /* @__PURE__ */ Y(g, {
|
|
927
1317
|
size: 12,
|
|
928
1318
|
className: "text-primary-foreground"
|
|
929
1319
|
})
|
|
930
|
-
}) : /* @__PURE__ */
|
|
1320
|
+
}) : /* @__PURE__ */ Y("div", {
|
|
931
1321
|
className: "flex size-4 shrink-0 items-center justify-center",
|
|
932
|
-
children: t && /* @__PURE__ */
|
|
1322
|
+
children: t && /* @__PURE__ */ Y(g, {
|
|
933
1323
|
size: 16,
|
|
934
1324
|
className: "text-primary"
|
|
935
1325
|
})
|
|
936
1326
|
}),
|
|
937
|
-
(e.icon || e.image) && /* @__PURE__ */
|
|
1327
|
+
(e.icon || e.image) && /* @__PURE__ */ Y("div", {
|
|
938
1328
|
className: "flex size-4 shrink-0 items-center justify-center",
|
|
939
|
-
children: e.image ? /* @__PURE__ */
|
|
1329
|
+
children: e.image ? /* @__PURE__ */ Y("img", {
|
|
940
1330
|
src: e.image,
|
|
941
1331
|
alt: e.label,
|
|
942
1332
|
className: "size-4 rounded-sm object-cover"
|
|
943
1333
|
}) : e.icon
|
|
944
1334
|
}),
|
|
945
|
-
/* @__PURE__ */
|
|
1335
|
+
/* @__PURE__ */ X("div", {
|
|
946
1336
|
className: "flex flex-1 items-center justify-between gap-2",
|
|
947
|
-
children: [/* @__PURE__ */
|
|
1337
|
+
children: [/* @__PURE__ */ X("div", {
|
|
948
1338
|
className: "flex flex-col gap-0.5",
|
|
949
|
-
children: [/* @__PURE__ */
|
|
1339
|
+
children: [/* @__PURE__ */ Y("span", {
|
|
950
1340
|
className: "text-sm font-normal",
|
|
951
1341
|
children: y && n ? y(n) : e.label
|
|
952
|
-
}), e.description && /* @__PURE__ */
|
|
1342
|
+
}), e.description && /* @__PURE__ */ Y("span", {
|
|
953
1343
|
className: "text-xs leading-snug text-muted-foreground",
|
|
954
1344
|
children: e.description
|
|
955
1345
|
})]
|
|
956
|
-
}), e.badge && /* @__PURE__ */
|
|
1346
|
+
}), e.badge && /* @__PURE__ */ Y("span", {
|
|
957
1347
|
className: "shrink-0 rounded bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground",
|
|
958
1348
|
children: e.badge
|
|
959
1349
|
})]
|
|
960
1350
|
})
|
|
961
1351
|
]
|
|
962
1352
|
}, e.value);
|
|
963
|
-
},
|
|
964
|
-
className:
|
|
1353
|
+
}, we = /* @__PURE__ */ Y(qt, {
|
|
1354
|
+
className: Q("w-(--radix-popper-anchor-width) min-w-(--radix-popper-anchor-width) p-0", re),
|
|
965
1355
|
align: "start",
|
|
966
1356
|
onOpenAutoFocus: (e) => {
|
|
967
1357
|
p || e.preventDefault();
|
|
968
1358
|
},
|
|
969
1359
|
onWheel: (e) => e.stopPropagation(),
|
|
970
|
-
children: /* @__PURE__ */
|
|
1360
|
+
children: /* @__PURE__ */ X(It, { children: [p && /* @__PURE__ */ Y(Rt, {
|
|
971
1361
|
placeholder: `Search ${a.toLowerCase()}...`,
|
|
972
1362
|
autoFocus: !0
|
|
973
|
-
}), /* @__PURE__ */
|
|
974
|
-
onScroll:
|
|
975
|
-
children: T ? /* @__PURE__ */
|
|
1363
|
+
}), /* @__PURE__ */ Y(zt, {
|
|
1364
|
+
onScroll: K,
|
|
1365
|
+
children: T ? /* @__PURE__ */ Y("div", {
|
|
976
1366
|
className: "flex items-center justify-center py-6",
|
|
977
|
-
children: /* @__PURE__ */
|
|
978
|
-
}) : /* @__PURE__ */
|
|
979
|
-
l &&
|
|
1367
|
+
children: /* @__PURE__ */ Y(P, { className: "size-5 animate-spin text-muted-foreground" })
|
|
1368
|
+
}) : /* @__PURE__ */ X(Se, { children: [
|
|
1369
|
+
l && ne && G.length > 0 && /* @__PURE__ */ X(Se, { children: [/* @__PURE__ */ Y(Vt, { children: /* @__PURE__ */ X(Ut, {
|
|
980
1370
|
value: "__select_all__",
|
|
981
|
-
onSelect:
|
|
1371
|
+
onSelect: pe,
|
|
982
1372
|
className: "font-medium",
|
|
983
|
-
children: [/* @__PURE__ */
|
|
984
|
-
className:
|
|
985
|
-
children:
|
|
1373
|
+
children: [/* @__PURE__ */ Y("div", {
|
|
1374
|
+
className: Q("flex size-4 shrink-0 items-center justify-center rounded-sm border", fe ? "border-primary bg-primary" : "border-input"),
|
|
1375
|
+
children: fe && /* @__PURE__ */ Y(g, {
|
|
986
1376
|
size: 12,
|
|
987
1377
|
className: "text-primary-foreground"
|
|
988
1378
|
})
|
|
989
|
-
}), /* @__PURE__ */
|
|
990
|
-
}) }), /* @__PURE__ */
|
|
991
|
-
/* @__PURE__ */
|
|
992
|
-
t.length > 0 ? t.map((e, t) => /* @__PURE__ */
|
|
1379
|
+
}), /* @__PURE__ */ Y("span", { children: "Select all" })]
|
|
1380
|
+
}) }), /* @__PURE__ */ Y(Ht, {})] }),
|
|
1381
|
+
/* @__PURE__ */ Y(Bt, { children: "No results found." }),
|
|
1382
|
+
t.length > 0 ? t.map((e, t) => /* @__PURE__ */ X(n.Fragment, { children: [t > 0 && /* @__PURE__ */ Y(Ht, {}), /* @__PURE__ */ Y(Vt, {
|
|
993
1383
|
heading: e.label,
|
|
994
|
-
children: e.options.map(
|
|
995
|
-
})] }, e.label)) : /* @__PURE__ */
|
|
996
|
-
C && /* @__PURE__ */
|
|
1384
|
+
children: e.options.map(Ce)
|
|
1385
|
+
})] }, e.label)) : /* @__PURE__ */ Y(Vt, { children: ue.map(Ce) }),
|
|
1386
|
+
C && /* @__PURE__ */ X(Se, { children: [/* @__PURE__ */ Y(Ht, {}), /* @__PURE__ */ Y(Vt, { children: /* @__PURE__ */ X($, {
|
|
997
1387
|
variant: "ghost",
|
|
998
1388
|
className: "w-full justify-start font-normal",
|
|
999
1389
|
onClick: () => {
|
|
1000
|
-
C(),
|
|
1390
|
+
C(), ie(!1);
|
|
1001
1391
|
},
|
|
1002
|
-
children: [/* @__PURE__ */
|
|
1392
|
+
children: [/* @__PURE__ */ Y(ae, {
|
|
1003
1393
|
size: 16,
|
|
1004
1394
|
className: "-ms-1 opacity-60",
|
|
1005
1395
|
"aria-hidden": !0
|
|
1006
1396
|
}), w]
|
|
1007
1397
|
}) })] }),
|
|
1008
|
-
|
|
1398
|
+
F && /* @__PURE__ */ Y("div", {
|
|
1009
1399
|
className: "flex items-center justify-center py-3",
|
|
1010
|
-
children: /* @__PURE__ */
|
|
1400
|
+
children: /* @__PURE__ */ Y(P, { className: "size-4 animate-spin text-muted-foreground" })
|
|
1011
1401
|
})
|
|
1012
1402
|
] })
|
|
1013
1403
|
})] })
|
|
1014
|
-
}),
|
|
1404
|
+
}), Te = S ? /* @__PURE__ */ Y("span", {
|
|
1015
1405
|
"aria-hidden": !0,
|
|
1016
1406
|
className: "ml-0.5 text-destructive",
|
|
1017
1407
|
children: "*"
|
|
1018
1408
|
}) : null;
|
|
1019
|
-
return /* @__PURE__ */
|
|
1409
|
+
return /* @__PURE__ */ X("div", {
|
|
1020
1410
|
className: "space-y-1.5",
|
|
1021
1411
|
children: [
|
|
1022
|
-
b && /* @__PURE__ */
|
|
1023
|
-
htmlFor:
|
|
1024
|
-
onClick:
|
|
1025
|
-
className:
|
|
1026
|
-
children: [b,
|
|
1412
|
+
b && /* @__PURE__ */ X(at, {
|
|
1413
|
+
htmlFor: z,
|
|
1414
|
+
onClick: ve,
|
|
1415
|
+
className: Q("cursor-pointer", o && "text-muted-foreground"),
|
|
1416
|
+
children: [b, Te]
|
|
1027
1417
|
}),
|
|
1028
|
-
|
|
1029
|
-
open:
|
|
1030
|
-
onOpenChange:
|
|
1418
|
+
ye ? /* @__PURE__ */ X(Gt, {
|
|
1419
|
+
open: L,
|
|
1420
|
+
onOpenChange: se,
|
|
1031
1421
|
modal: !1,
|
|
1032
|
-
children: [/* @__PURE__ */
|
|
1422
|
+
children: [/* @__PURE__ */ Y(Kt, {
|
|
1033
1423
|
asChild: !0,
|
|
1034
|
-
children: /* @__PURE__ */
|
|
1424
|
+
children: /* @__PURE__ */ X("div", {
|
|
1035
1425
|
"aria-invalid": s,
|
|
1036
|
-
className:
|
|
1426
|
+
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"),
|
|
1037
1427
|
children: [
|
|
1038
|
-
O && /* @__PURE__ */
|
|
1428
|
+
O && /* @__PURE__ */ Y("div", {
|
|
1039
1429
|
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",
|
|
1040
1430
|
children: O
|
|
1041
1431
|
}),
|
|
1042
|
-
/* @__PURE__ */
|
|
1043
|
-
id:
|
|
1432
|
+
/* @__PURE__ */ X($, {
|
|
1433
|
+
id: z,
|
|
1044
1434
|
type: "button",
|
|
1045
1435
|
disabled: o,
|
|
1046
|
-
ref:
|
|
1436
|
+
ref: oe,
|
|
1047
1437
|
variant: "ghost",
|
|
1048
1438
|
role: "combobox",
|
|
1049
|
-
"aria-expanded":
|
|
1439
|
+
"aria-expanded": L,
|
|
1050
1440
|
onClick: (e) => {
|
|
1051
|
-
|
|
1441
|
+
I && (e.preventDefault(), e.stopPropagation());
|
|
1052
1442
|
},
|
|
1053
|
-
className:
|
|
1054
|
-
children: [
|
|
1443
|
+
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),
|
|
1444
|
+
children: [J, Z]
|
|
1055
1445
|
}),
|
|
1056
|
-
k && /* @__PURE__ */
|
|
1446
|
+
k && /* @__PURE__ */ Y("div", {
|
|
1057
1447
|
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",
|
|
1058
1448
|
children: k
|
|
1059
1449
|
})
|
|
1060
1450
|
]
|
|
1061
1451
|
})
|
|
1062
|
-
}),
|
|
1063
|
-
}) : /* @__PURE__ */
|
|
1064
|
-
open:
|
|
1065
|
-
onOpenChange:
|
|
1452
|
+
}), we]
|
|
1453
|
+
}) : /* @__PURE__ */ X(Gt, {
|
|
1454
|
+
open: L,
|
|
1455
|
+
onOpenChange: se,
|
|
1066
1456
|
modal: !1,
|
|
1067
|
-
children: [/* @__PURE__ */
|
|
1457
|
+
children: [/* @__PURE__ */ Y(Kt, {
|
|
1068
1458
|
asChild: !0,
|
|
1069
|
-
children: /* @__PURE__ */
|
|
1070
|
-
id:
|
|
1459
|
+
children: /* @__PURE__ */ X($, {
|
|
1460
|
+
id: z,
|
|
1071
1461
|
type: "button",
|
|
1072
1462
|
disabled: o,
|
|
1073
|
-
ref:
|
|
1463
|
+
ref: oe,
|
|
1074
1464
|
variant: "outline",
|
|
1075
1465
|
role: "combobox",
|
|
1076
|
-
"aria-expanded":
|
|
1466
|
+
"aria-expanded": L,
|
|
1077
1467
|
"aria-invalid": s,
|
|
1078
1468
|
onClick: (e) => {
|
|
1079
|
-
|
|
1469
|
+
I && (e.preventDefault(), e.stopPropagation());
|
|
1080
1470
|
},
|
|
1081
|
-
className:
|
|
1082
|
-
children: [
|
|
1471
|
+
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),
|
|
1472
|
+
children: [J, Z]
|
|
1083
1473
|
})
|
|
1084
|
-
}),
|
|
1474
|
+
}), we]
|
|
1085
1475
|
}),
|
|
1086
|
-
s && c && /* @__PURE__ */
|
|
1476
|
+
s && c && /* @__PURE__ */ Y("p", {
|
|
1087
1477
|
className: "text-xs leading-5 text-destructive",
|
|
1088
1478
|
children: c
|
|
1089
1479
|
}),
|
|
1090
|
-
x && /* @__PURE__ */
|
|
1480
|
+
x && /* @__PURE__ */ Y(st, { children: x })
|
|
1091
1481
|
]
|
|
1092
1482
|
});
|
|
1093
1483
|
}
|
|
1094
1484
|
//#endregion
|
|
1095
1485
|
//#region src/components/ui/checkbox.tsx
|
|
1096
|
-
function
|
|
1097
|
-
return /* @__PURE__ */
|
|
1486
|
+
function en({ className: e, ...t }) {
|
|
1487
|
+
return /* @__PURE__ */ Y(ue.Root, {
|
|
1098
1488
|
"data-slot": "checkbox",
|
|
1099
|
-
className:
|
|
1489
|
+
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),
|
|
1100
1490
|
...t,
|
|
1101
|
-
children: /* @__PURE__ */
|
|
1491
|
+
children: /* @__PURE__ */ Y(ue.Indicator, {
|
|
1102
1492
|
"data-slot": "checkbox-indicator",
|
|
1103
1493
|
className: "grid place-content-center text-current transition-none [&>svg]:size-3.5",
|
|
1104
|
-
children: /* @__PURE__ */
|
|
1494
|
+
children: /* @__PURE__ */ Y(g, {})
|
|
1105
1495
|
})
|
|
1106
1496
|
});
|
|
1107
1497
|
}
|
|
1108
1498
|
//#endregion
|
|
1109
1499
|
//#region src/components/ui/table.tsx
|
|
1110
|
-
function
|
|
1111
|
-
return /* @__PURE__ */
|
|
1500
|
+
function tn({ className: e, ...t }) {
|
|
1501
|
+
return /* @__PURE__ */ Y("div", {
|
|
1112
1502
|
"data-slot": "table-container",
|
|
1113
1503
|
className: "relative w-full overflow-x-auto",
|
|
1114
|
-
children: /* @__PURE__ */
|
|
1504
|
+
children: /* @__PURE__ */ Y("table", {
|
|
1115
1505
|
"data-slot": "table",
|
|
1116
|
-
className:
|
|
1506
|
+
className: Q("w-full caption-bottom text-sm", e),
|
|
1117
1507
|
...t
|
|
1118
1508
|
})
|
|
1119
1509
|
});
|
|
1120
1510
|
}
|
|
1121
|
-
function
|
|
1122
|
-
return /* @__PURE__ */
|
|
1511
|
+
function nn({ className: e, ...t }) {
|
|
1512
|
+
return /* @__PURE__ */ Y("thead", {
|
|
1123
1513
|
"data-slot": "table-header",
|
|
1124
|
-
className:
|
|
1514
|
+
className: Q("[&_tr]:border-b", e),
|
|
1125
1515
|
...t
|
|
1126
1516
|
});
|
|
1127
1517
|
}
|
|
1128
|
-
function
|
|
1129
|
-
return /* @__PURE__ */
|
|
1518
|
+
function rn({ className: e, ...t }) {
|
|
1519
|
+
return /* @__PURE__ */ Y("tbody", {
|
|
1130
1520
|
"data-slot": "table-body",
|
|
1131
|
-
className:
|
|
1521
|
+
className: Q("[&_tr:last-child]:border-0", e),
|
|
1132
1522
|
...t
|
|
1133
1523
|
});
|
|
1134
1524
|
}
|
|
1135
|
-
function
|
|
1136
|
-
return /* @__PURE__ */
|
|
1525
|
+
function an({ className: e, ...t }) {
|
|
1526
|
+
return /* @__PURE__ */ Y("tfoot", {
|
|
1137
1527
|
"data-slot": "table-footer",
|
|
1138
|
-
className:
|
|
1528
|
+
className: Q("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0", e),
|
|
1139
1529
|
...t
|
|
1140
1530
|
});
|
|
1141
1531
|
}
|
|
1142
|
-
function
|
|
1143
|
-
return /* @__PURE__ */
|
|
1532
|
+
function on({ className: e, ...t }) {
|
|
1533
|
+
return /* @__PURE__ */ Y("tr", {
|
|
1144
1534
|
"data-slot": "table-row",
|
|
1145
|
-
className:
|
|
1535
|
+
className: Q("border-b transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted", e),
|
|
1146
1536
|
...t
|
|
1147
1537
|
});
|
|
1148
1538
|
}
|
|
1149
|
-
function
|
|
1150
|
-
return /* @__PURE__ */
|
|
1539
|
+
function sn({ className: e, ...t }) {
|
|
1540
|
+
return /* @__PURE__ */ Y("th", {
|
|
1151
1541
|
"data-slot": "table-head",
|
|
1152
|
-
className:
|
|
1542
|
+
className: Q("h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0", e),
|
|
1153
1543
|
...t
|
|
1154
1544
|
});
|
|
1155
1545
|
}
|
|
1156
|
-
function
|
|
1157
|
-
return /* @__PURE__ */
|
|
1546
|
+
function cn({ className: e, ...t }) {
|
|
1547
|
+
return /* @__PURE__ */ Y("td", {
|
|
1158
1548
|
"data-slot": "table-cell",
|
|
1159
|
-
className:
|
|
1549
|
+
className: Q("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0", e),
|
|
1160
1550
|
...t
|
|
1161
1551
|
});
|
|
1162
1552
|
}
|
|
1163
|
-
function
|
|
1164
|
-
return /* @__PURE__ */
|
|
1553
|
+
function ln({ className: e, ...t }) {
|
|
1554
|
+
return /* @__PURE__ */ Y("caption", {
|
|
1165
1555
|
"data-slot": "table-caption",
|
|
1166
|
-
className:
|
|
1556
|
+
className: Q("mt-4 text-sm text-muted-foreground", e),
|
|
1167
1557
|
...t
|
|
1168
1558
|
});
|
|
1169
1559
|
}
|
|
1170
1560
|
//#endregion
|
|
1171
1561
|
//#region src/components/ui/spinner.tsx
|
|
1172
|
-
function
|
|
1173
|
-
return /* @__PURE__ */
|
|
1562
|
+
function un({ className: e, ...t }) {
|
|
1563
|
+
return /* @__PURE__ */ Y(F, {
|
|
1174
1564
|
role: "status",
|
|
1175
1565
|
"aria-label": "Loading",
|
|
1176
|
-
className:
|
|
1566
|
+
className: Q("size-4 animate-spin", e),
|
|
1177
1567
|
...t
|
|
1178
1568
|
});
|
|
1179
1569
|
}
|
|
1180
1570
|
//#endregion
|
|
1181
1571
|
//#region src/components/custom/data-table.tsx
|
|
1182
|
-
var
|
|
1572
|
+
var dn = {
|
|
1183
1573
|
left: "text-left",
|
|
1184
1574
|
center: "text-center",
|
|
1185
1575
|
right: "text-right"
|
|
1186
1576
|
};
|
|
1187
|
-
function
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1577
|
+
function fn({ 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 = [
|
|
1578
|
+
25,
|
|
1579
|
+
50,
|
|
1580
|
+
100,
|
|
1581
|
+
200
|
|
1582
|
+
], striped: p = !0, stickyHeader: m = !1, maxHeight: h, onRowClick: g, className: _ }) {
|
|
1583
|
+
let v = n.useMemo(() => t.map((e, t) => r(e, t)), [t, r]), [x, S] = n.useState([]), C = a ?? x, w = (e) => {
|
|
1584
|
+
a === void 0 && S(e), o?.(e);
|
|
1585
|
+
}, T = v.length > 0 && v.every((e) => C.includes(e)), E = C.length > 0 && !T, D = () => w(T ? [] : v), O = (e) => w(C.includes(e) ? C.filter((t) => t !== e) : [...C, e]), k = e.length + +!!i + +!!s, [A, j] = n.useState(d), [ee, M] = n.useState(0), N = u ? Math.max(1, Math.ceil(t.length / A)) : 1, P = Math.min(ee, N - 1), F = n.useMemo(() => {
|
|
1586
|
+
let e = t.map((e, t) => ({
|
|
1587
|
+
row: e,
|
|
1588
|
+
index: t
|
|
1589
|
+
}));
|
|
1590
|
+
if (!u) return e;
|
|
1591
|
+
let n = P * A;
|
|
1592
|
+
return e.slice(n, n + A);
|
|
1593
|
+
}, [
|
|
1594
|
+
t,
|
|
1595
|
+
u,
|
|
1596
|
+
P,
|
|
1597
|
+
A
|
|
1598
|
+
]), te = "px-4 py-3 first:pl-5 last:pr-5", ne = "px-4 first:pl-5 last:pr-5";
|
|
1599
|
+
return /* @__PURE__ */ X("div", {
|
|
1600
|
+
className: Q("rounded-lg border", _),
|
|
1601
|
+
children: [/* @__PURE__ */ Y("div", {
|
|
1602
|
+
className: Q("overflow-hidden rounded-lg", h === void 0 ? "overflow-hidden" : "overflow-auto", u && "rounded-b-none"),
|
|
1603
|
+
style: h === void 0 ? void 0 : { maxHeight: typeof h == "number" ? `${h}px` : h },
|
|
1604
|
+
children: /* @__PURE__ */ X(tn, { children: [/* @__PURE__ */ Y(nn, {
|
|
1605
|
+
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"),
|
|
1606
|
+
children: /* @__PURE__ */ X(on, {
|
|
1607
|
+
className: "hover:bg-transparent",
|
|
1608
|
+
children: [
|
|
1609
|
+
i && /* @__PURE__ */ Y(sn, {
|
|
1610
|
+
className: Q("w-10", ne),
|
|
1611
|
+
children: /* @__PURE__ */ Y(en, {
|
|
1612
|
+
"aria-label": "Select all rows",
|
|
1613
|
+
checked: T ? !0 : E ? "indeterminate" : !1,
|
|
1614
|
+
onCheckedChange: D
|
|
1615
|
+
})
|
|
1616
|
+
}),
|
|
1617
|
+
e.map((e) => /* @__PURE__ */ Y(sn, {
|
|
1618
|
+
style: e.width ? { width: e.width } : void 0,
|
|
1619
|
+
className: Q("h-11 text-xs font-semibold tracking-wide text-foreground uppercase", ne, e.align && dn[e.align], e.className, e.headerClassName),
|
|
1620
|
+
children: e.header
|
|
1621
|
+
}, e.key)),
|
|
1622
|
+
s && /* @__PURE__ */ Y(sn, { className: "w-12" })
|
|
1623
|
+
]
|
|
1624
|
+
})
|
|
1625
|
+
}), /* @__PURE__ */ Y(rn, { children: c ? /* @__PURE__ */ Y(on, {
|
|
1197
1626
|
className: "hover:bg-transparent",
|
|
1198
|
-
children:
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
})
|
|
1206
|
-
}),
|
|
1207
|
-
e.map((e) => /* @__PURE__ */ J(Wt, {
|
|
1208
|
-
style: e.width ? { width: e.width } : void 0,
|
|
1209
|
-
className: Z("h-11 text-xs font-semibold tracking-wide text-foreground uppercase", E, e.align && Jt[e.align], e.className, e.headerClassName),
|
|
1210
|
-
children: e.header
|
|
1211
|
-
}, e.key)),
|
|
1212
|
-
s && /* @__PURE__ */ J(Wt, { className: "w-12" })
|
|
1213
|
-
]
|
|
1214
|
-
})
|
|
1215
|
-
}), /* @__PURE__ */ J(Vt, { children: c ? /* @__PURE__ */ J(Ut, {
|
|
1216
|
-
className: "hover:bg-transparent",
|
|
1217
|
-
children: /* @__PURE__ */ J(Gt, {
|
|
1218
|
-
colSpan: w,
|
|
1219
|
-
className: "h-28 text-center",
|
|
1220
|
-
children: /* @__PURE__ */ Y("span", {
|
|
1221
|
-
className: "inline-flex items-center gap-2 text-muted-foreground",
|
|
1222
|
-
children: [/* @__PURE__ */ J(qt, { className: "size-4" }), " Loading…"]
|
|
1627
|
+
children: /* @__PURE__ */ Y(cn, {
|
|
1628
|
+
colSpan: k,
|
|
1629
|
+
className: "h-28 text-center",
|
|
1630
|
+
children: /* @__PURE__ */ X("span", {
|
|
1631
|
+
className: "inline-flex items-center gap-2 text-muted-foreground",
|
|
1632
|
+
children: [/* @__PURE__ */ Y(un, { className: "size-4" }), " Loading…"]
|
|
1633
|
+
})
|
|
1223
1634
|
})
|
|
1224
|
-
})
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
})
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1635
|
+
}) : t.length === 0 ? /* @__PURE__ */ Y(on, {
|
|
1636
|
+
className: "hover:bg-transparent",
|
|
1637
|
+
children: /* @__PURE__ */ Y(cn, {
|
|
1638
|
+
colSpan: k,
|
|
1639
|
+
className: "h-28 text-center text-muted-foreground",
|
|
1640
|
+
children: l
|
|
1641
|
+
})
|
|
1642
|
+
}) : F.map(({ row: t, index: n }) => {
|
|
1643
|
+
let r = v[n], a = C.includes(r);
|
|
1644
|
+
return /* @__PURE__ */ X(on, {
|
|
1645
|
+
"data-state": a ? "selected" : void 0,
|
|
1646
|
+
onClick: g ? () => g(t) : void 0,
|
|
1647
|
+
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"),
|
|
1648
|
+
children: [
|
|
1649
|
+
i && /* @__PURE__ */ Y(cn, {
|
|
1650
|
+
className: Q("w-10", te),
|
|
1651
|
+
onClick: (e) => e.stopPropagation(),
|
|
1652
|
+
children: /* @__PURE__ */ Y(en, {
|
|
1653
|
+
"aria-label": "Select row",
|
|
1654
|
+
checked: a,
|
|
1655
|
+
onCheckedChange: () => O(r)
|
|
1656
|
+
})
|
|
1657
|
+
}),
|
|
1658
|
+
e.map((e) => /* @__PURE__ */ Y(cn, {
|
|
1659
|
+
style: e.width ? { width: e.width } : void 0,
|
|
1660
|
+
className: Q(te, e.align && dn[e.align], e.className),
|
|
1661
|
+
children: e.cell ? e.cell(t, n) : String(t[e.key] ?? "")
|
|
1662
|
+
}, e.key)),
|
|
1663
|
+
s && /* @__PURE__ */ Y(cn, {
|
|
1664
|
+
className: "w-12 pr-3 text-right",
|
|
1665
|
+
onClick: (e) => e.stopPropagation(),
|
|
1666
|
+
children: /* @__PURE__ */ Y(Xe, { items: s(t) })
|
|
1246
1667
|
})
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1668
|
+
]
|
|
1669
|
+
}, r);
|
|
1670
|
+
}) })] })
|
|
1671
|
+
}), u && /* @__PURE__ */ X("div", {
|
|
1672
|
+
className: "flex flex-wrap items-center justify-between gap-3 border-t px-4 py-3 text-sm",
|
|
1673
|
+
children: [/* @__PURE__ */ X("p", {
|
|
1674
|
+
className: "text-muted-foreground",
|
|
1675
|
+
children: [
|
|
1676
|
+
"Page ",
|
|
1677
|
+
t.length === 0 ? 0 : P + 1,
|
|
1678
|
+
" of ",
|
|
1679
|
+
N,
|
|
1680
|
+
" (",
|
|
1681
|
+
t.length,
|
|
1682
|
+
" total ",
|
|
1683
|
+
t.length === 1 ? "item" : "items",
|
|
1684
|
+
")"
|
|
1258
1685
|
]
|
|
1259
|
-
},
|
|
1260
|
-
|
|
1686
|
+
}), /* @__PURE__ */ X("div", {
|
|
1687
|
+
className: "flex items-center gap-4",
|
|
1688
|
+
children: [f && f.length > 0 && /* @__PURE__ */ X("div", {
|
|
1689
|
+
className: "flex items-center gap-2 text-muted-foreground",
|
|
1690
|
+
children: [/* @__PURE__ */ Y("span", {
|
|
1691
|
+
className: "whitespace-nowrap",
|
|
1692
|
+
children: "Rows per page"
|
|
1693
|
+
}), /* @__PURE__ */ Y($t, {
|
|
1694
|
+
size: "sm",
|
|
1695
|
+
className: "w-20",
|
|
1696
|
+
value: String(A),
|
|
1697
|
+
onValueChange: (e) => {
|
|
1698
|
+
let t = typeof e == "object" && e && "value" in e ? e.value : e;
|
|
1699
|
+
j(Number(t)), M(0);
|
|
1700
|
+
},
|
|
1701
|
+
options: f.map((e) => ({
|
|
1702
|
+
value: String(e),
|
|
1703
|
+
label: String(e)
|
|
1704
|
+
}))
|
|
1705
|
+
})]
|
|
1706
|
+
}), /* @__PURE__ */ X("div", {
|
|
1707
|
+
className: "flex items-center gap-1",
|
|
1708
|
+
children: [/* @__PURE__ */ Y($, {
|
|
1709
|
+
variant: "outline",
|
|
1710
|
+
size: "icon-sm",
|
|
1711
|
+
"aria-label": "Previous page",
|
|
1712
|
+
disabled: P <= 0,
|
|
1713
|
+
onClick: () => M(Math.max(0, P - 1)),
|
|
1714
|
+
children: /* @__PURE__ */ Y(y, {})
|
|
1715
|
+
}), /* @__PURE__ */ Y($, {
|
|
1716
|
+
variant: "outline",
|
|
1717
|
+
size: "icon-sm",
|
|
1718
|
+
"aria-label": "Next page",
|
|
1719
|
+
disabled: P >= N - 1,
|
|
1720
|
+
onClick: () => M(Math.min(N - 1, P + 1)),
|
|
1721
|
+
children: /* @__PURE__ */ Y(b, {})
|
|
1722
|
+
})]
|
|
1723
|
+
})]
|
|
1724
|
+
})]
|
|
1725
|
+
})]
|
|
1261
1726
|
});
|
|
1262
1727
|
}
|
|
1263
1728
|
//#endregion
|
|
1264
1729
|
//#region src/components/ui/calendar.tsx
|
|
1265
|
-
function
|
|
1266
|
-
let l =
|
|
1267
|
-
return /* @__PURE__ */
|
|
1730
|
+
function pn({ className: e, classNames: t, showOutsideDays: n = !0, captionLayout: r = "label", buttonVariant: i = "ghost", locale: a, formatters: o, components: s, ...c }) {
|
|
1731
|
+
let l = we();
|
|
1732
|
+
return /* @__PURE__ */ Y(Ce, {
|
|
1268
1733
|
showOutsideDays: n,
|
|
1269
|
-
className:
|
|
1734
|
+
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),
|
|
1270
1735
|
captionLayout: r,
|
|
1271
1736
|
locale: a,
|
|
1272
1737
|
formatters: {
|
|
@@ -1274,51 +1739,51 @@ function Xt({ className: e, classNames: t, showOutsideDays: n = !0, captionLayou
|
|
|
1274
1739
|
...o
|
|
1275
1740
|
},
|
|
1276
1741
|
classNames: {
|
|
1277
|
-
root:
|
|
1278
|
-
months:
|
|
1279
|
-
month:
|
|
1280
|
-
nav:
|
|
1281
|
-
button_previous:
|
|
1282
|
-
button_next:
|
|
1283
|
-
month_caption:
|
|
1284
|
-
dropdowns:
|
|
1285
|
-
dropdown_root:
|
|
1286
|
-
dropdown:
|
|
1287
|
-
caption_label:
|
|
1742
|
+
root: Q("w-fit", l.root),
|
|
1743
|
+
months: Q("relative flex flex-col gap-4 md:flex-row", l.months),
|
|
1744
|
+
month: Q("flex w-full flex-col gap-4", l.month),
|
|
1745
|
+
nav: Q("absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1", l.nav),
|
|
1746
|
+
button_previous: Q(Me({ variant: i }), "size-(--cell-size) p-0 select-none aria-disabled:opacity-50", l.button_previous),
|
|
1747
|
+
button_next: Q(Me({ variant: i }), "size-(--cell-size) p-0 select-none aria-disabled:opacity-50", l.button_next),
|
|
1748
|
+
month_caption: Q("flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)", l.month_caption),
|
|
1749
|
+
dropdowns: Q("flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium", l.dropdowns),
|
|
1750
|
+
dropdown_root: Q("relative rounded-(--cell-radius)", l.dropdown_root),
|
|
1751
|
+
dropdown: Q("absolute inset-0 bg-popover opacity-0", l.dropdown),
|
|
1752
|
+
caption_label: Q("font-medium select-none", r === "label" ? "text-sm" : "flex items-center gap-1 rounded-(--cell-radius) text-sm [&>svg]:size-3.5 [&>svg]:text-muted-foreground", l.caption_label),
|
|
1288
1753
|
table: "w-full border-collapse",
|
|
1289
|
-
weekdays:
|
|
1290
|
-
weekday:
|
|
1291
|
-
week:
|
|
1292
|
-
week_number_header:
|
|
1293
|
-
week_number:
|
|
1294
|
-
day:
|
|
1295
|
-
range_start:
|
|
1296
|
-
range_middle:
|
|
1297
|
-
range_end:
|
|
1298
|
-
today:
|
|
1299
|
-
outside:
|
|
1300
|
-
disabled:
|
|
1301
|
-
hidden:
|
|
1754
|
+
weekdays: Q("flex", l.weekdays),
|
|
1755
|
+
weekday: Q("flex-1 rounded-(--cell-radius) text-[0.8rem] font-normal text-muted-foreground select-none", l.weekday),
|
|
1756
|
+
week: Q("mt-2 flex w-full", l.week),
|
|
1757
|
+
week_number_header: Q("w-(--cell-size) select-none", l.week_number_header),
|
|
1758
|
+
week_number: Q("text-[0.8rem] text-muted-foreground select-none", l.week_number),
|
|
1759
|
+
day: Q("group/day relative aspect-square h-full w-full rounded-(--cell-radius) p-0 text-center select-none [&:last-child[data-selected=true]_button]:rounded-r-(--cell-radius)", c.showWeekNumber ? "[&:nth-child(2)[data-selected=true]_button]:rounded-l-(--cell-radius)" : "[&:first-child[data-selected=true]_button]:rounded-l-(--cell-radius)", l.day),
|
|
1760
|
+
range_start: Q("relative isolate z-0 rounded-l-(--cell-radius) bg-muted after:absolute after:inset-y-0 after:right-0 after:w-4 after:bg-muted", l.range_start),
|
|
1761
|
+
range_middle: Q("rounded-none", l.range_middle),
|
|
1762
|
+
range_end: Q("relative isolate z-0 rounded-r-(--cell-radius) bg-muted after:absolute after:inset-y-0 after:left-0 after:w-4 after:bg-muted", l.range_end),
|
|
1763
|
+
today: Q("rounded-(--cell-radius) bg-muted text-foreground data-[selected=true]:rounded-none", l.today),
|
|
1764
|
+
outside: Q("text-muted-foreground aria-selected:text-muted-foreground", l.outside),
|
|
1765
|
+
disabled: Q("text-muted-foreground opacity-50", l.disabled),
|
|
1766
|
+
hidden: Q("invisible", l.hidden),
|
|
1302
1767
|
...t
|
|
1303
1768
|
},
|
|
1304
1769
|
components: {
|
|
1305
|
-
Root: ({ className: e, rootRef: t, ...n }) => /* @__PURE__ */
|
|
1770
|
+
Root: ({ className: e, rootRef: t, ...n }) => /* @__PURE__ */ Y("div", {
|
|
1306
1771
|
"data-slot": "calendar",
|
|
1307
1772
|
ref: t,
|
|
1308
|
-
className:
|
|
1773
|
+
className: Q(e),
|
|
1309
1774
|
...n
|
|
1310
1775
|
}),
|
|
1311
|
-
Chevron: ({ className: e, orientation: t, ...n }) =>
|
|
1312
|
-
className:
|
|
1776
|
+
Chevron: ({ className: e, orientation: t, ...n }) => Y(t === "left" ? y : t === "right" ? b : v, {
|
|
1777
|
+
className: Q("size-4", e),
|
|
1313
1778
|
...n
|
|
1314
1779
|
}),
|
|
1315
|
-
DayButton: ({ ...e }) => /* @__PURE__ */
|
|
1780
|
+
DayButton: ({ ...e }) => /* @__PURE__ */ Y(mn, {
|
|
1316
1781
|
locale: a,
|
|
1317
1782
|
...e
|
|
1318
1783
|
}),
|
|
1319
|
-
WeekNumber: ({ children: e, ...t }) => /* @__PURE__ */
|
|
1784
|
+
WeekNumber: ({ children: e, ...t }) => /* @__PURE__ */ Y("td", {
|
|
1320
1785
|
...t,
|
|
1321
|
-
children: /* @__PURE__ */
|
|
1786
|
+
children: /* @__PURE__ */ Y("div", {
|
|
1322
1787
|
className: "flex size-(--cell-size) items-center justify-center text-center",
|
|
1323
1788
|
children: e
|
|
1324
1789
|
})
|
|
@@ -1328,11 +1793,11 @@ function Xt({ className: e, classNames: t, showOutsideDays: n = !0, captionLayou
|
|
|
1328
1793
|
...c
|
|
1329
1794
|
});
|
|
1330
1795
|
}
|
|
1331
|
-
function
|
|
1332
|
-
let o =
|
|
1796
|
+
function mn({ className: e, day: t, modifiers: r, locale: i, ...a }) {
|
|
1797
|
+
let o = we(), s = n.useRef(null);
|
|
1333
1798
|
return n.useEffect(() => {
|
|
1334
1799
|
r.focused && s.current?.focus();
|
|
1335
|
-
}, [r.focused]), /* @__PURE__ */
|
|
1800
|
+
}, [r.focused]), /* @__PURE__ */ Y($, {
|
|
1336
1801
|
ref: s,
|
|
1337
1802
|
variant: "ghost",
|
|
1338
1803
|
size: "icon",
|
|
@@ -1341,16 +1806,16 @@ function Zt({ className: e, day: t, modifiers: r, locale: i, ...a }) {
|
|
|
1341
1806
|
"data-range-start": r.range_start,
|
|
1342
1807
|
"data-range-end": r.range_end,
|
|
1343
1808
|
"data-range-middle": r.range_middle,
|
|
1344
|
-
className:
|
|
1809
|
+
className: Q("relative isolate z-10 flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 border-0 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-ring/50 data-[range-end=true]:rounded-(--cell-radius) data-[range-end=true]:rounded-r-(--cell-radius) data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-muted data-[range-middle=true]:text-foreground data-[range-start=true]:rounded-(--cell-radius) data-[range-start=true]:rounded-l-(--cell-radius) data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground dark:hover:text-foreground [&>span]:text-xs [&>span]:opacity-70", o.day, e),
|
|
1345
1810
|
...a
|
|
1346
1811
|
});
|
|
1347
1812
|
}
|
|
1348
1813
|
//#endregion
|
|
1349
1814
|
//#region src/components/custom/date-time-range-picker-utils.ts
|
|
1350
|
-
function
|
|
1815
|
+
function hn(e) {
|
|
1351
1816
|
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`;
|
|
1352
1817
|
}
|
|
1353
|
-
function
|
|
1818
|
+
function gn(e, t) {
|
|
1354
1819
|
if (!e) return null;
|
|
1355
1820
|
let n = new Date(e);
|
|
1356
1821
|
if (isNaN(n.getTime())) return null;
|
|
@@ -1373,7 +1838,7 @@ function $t(e, t) {
|
|
|
1373
1838
|
s: i("second").padStart(2, "0")
|
|
1374
1839
|
};
|
|
1375
1840
|
}
|
|
1376
|
-
function
|
|
1841
|
+
function _n(e, t, n, r, i, a, o) {
|
|
1377
1842
|
let s = Date.UTC(e, t, n, parseInt(r), parseInt(i), parseInt(a)), c = new Date(s), l = new Intl.DateTimeFormat("en-US", {
|
|
1378
1843
|
year: "numeric",
|
|
1379
1844
|
month: "2-digit",
|
|
@@ -1384,9 +1849,9 @@ function en(e, t, n, r, i, a, o) {
|
|
|
1384
1849
|
hour12: !1,
|
|
1385
1850
|
timeZone: o
|
|
1386
1851
|
}).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;
|
|
1387
|
-
return
|
|
1852
|
+
return hn(new Date(s - d));
|
|
1388
1853
|
}
|
|
1389
|
-
var
|
|
1854
|
+
var vn = [
|
|
1390
1855
|
{
|
|
1391
1856
|
value: "hour",
|
|
1392
1857
|
label: "Hour"
|
|
@@ -1404,8 +1869,8 @@ var tn = [
|
|
|
1404
1869
|
label: "Month"
|
|
1405
1870
|
}
|
|
1406
1871
|
];
|
|
1407
|
-
function
|
|
1408
|
-
let t = /* @__PURE__ */ new Date(), n =
|
|
1872
|
+
function yn(e) {
|
|
1873
|
+
let t = /* @__PURE__ */ new Date(), n = hn(t), r = new Date(t);
|
|
1409
1874
|
switch (e) {
|
|
1410
1875
|
case "hour":
|
|
1411
1876
|
r.setUTCHours(r.getUTCHours() - 1);
|
|
@@ -1421,20 +1886,20 @@ function nn(e) {
|
|
|
1421
1886
|
break;
|
|
1422
1887
|
}
|
|
1423
1888
|
return {
|
|
1424
|
-
from:
|
|
1889
|
+
from: hn(r),
|
|
1425
1890
|
to: n
|
|
1426
1891
|
};
|
|
1427
1892
|
}
|
|
1428
|
-
function
|
|
1893
|
+
function bn(e, t) {
|
|
1429
1894
|
let n = new Date(e.from).getTime(), r = new Date(e.to).getTime(), i = r - n, a = t === "prev" ? -i : i;
|
|
1430
1895
|
return {
|
|
1431
1896
|
preset: e.preset,
|
|
1432
|
-
from:
|
|
1433
|
-
to:
|
|
1897
|
+
from: hn(new Date(n + a)),
|
|
1898
|
+
to: hn(new Date(r + a))
|
|
1434
1899
|
};
|
|
1435
1900
|
}
|
|
1436
|
-
function
|
|
1437
|
-
if (e.preset) return
|
|
1901
|
+
function xn(e, t) {
|
|
1902
|
+
if (e.preset) return vn.find((t) => t.value === e.preset)?.label ?? e.preset;
|
|
1438
1903
|
if (e.from && e.to) {
|
|
1439
1904
|
let n = (e) => new Date(e).toLocaleString("en-US", {
|
|
1440
1905
|
year: "numeric",
|
|
@@ -1451,7 +1916,7 @@ function an(e, t) {
|
|
|
1451
1916
|
}
|
|
1452
1917
|
//#endregion
|
|
1453
1918
|
//#region src/components/custom/date-time-range-picker.tsx
|
|
1454
|
-
function
|
|
1919
|
+
function Sn({ value: e, max: t, onChange: r }) {
|
|
1455
1920
|
let [i, a] = n.useState(e);
|
|
1456
1921
|
n.useEffect(() => {
|
|
1457
1922
|
a(e);
|
|
@@ -1463,7 +1928,7 @@ function on({ value: e, max: t, onChange: r }) {
|
|
|
1463
1928
|
let n = Math.min(Math.max(parseInt(i || "0", 10) + e, 0), t), o = String(n).padStart(2, "0");
|
|
1464
1929
|
a(o), r(o);
|
|
1465
1930
|
};
|
|
1466
|
-
return /* @__PURE__ */
|
|
1931
|
+
return /* @__PURE__ */ Y("input", {
|
|
1467
1932
|
type: "number",
|
|
1468
1933
|
min: 0,
|
|
1469
1934
|
max: t,
|
|
@@ -1473,20 +1938,20 @@ function on({ value: e, max: t, onChange: r }) {
|
|
|
1473
1938
|
onKeyDown: (e) => {
|
|
1474
1939
|
e.key === "Enter" && o(e.target.value), e.key === "ArrowUp" && (e.preventDefault(), s(1)), e.key === "ArrowDown" && (e.preventDefault(), s(-1));
|
|
1475
1940
|
},
|
|
1476
|
-
className:
|
|
1941
|
+
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")
|
|
1477
1942
|
});
|
|
1478
1943
|
}
|
|
1479
|
-
function
|
|
1480
|
-
let [c, l] = n.useState(!1), u = a || "UTC", d =
|
|
1944
|
+
function Cn({ isoValue: e, onChange: t, label: r, placeholder: i = "Select date & time", timezone: a, minDate: o, maxDate: s }) {
|
|
1945
|
+
let [c, l] = n.useState(!1), u = a || "UTC", d = gn(e, u), [f, p] = n.useState(d?.h ?? "00"), [h, g] = n.useState(d?.m ?? "00"), [_, v] = n.useState(d?.s ?? "00");
|
|
1481
1946
|
n.useEffect(() => {
|
|
1482
|
-
let t =
|
|
1483
|
-
|
|
1947
|
+
let t = gn(e, u);
|
|
1948
|
+
p(t?.h ?? "00"), g(t?.m ?? "00"), v(t?.s ?? "00");
|
|
1484
1949
|
}, [e, u]);
|
|
1485
|
-
let y = d ? new Date(d.year, d.month, d.day) : void 0, b = (e, n, r, i, a, o) => t(
|
|
1950
|
+
let y = d ? new Date(d.year, d.month, d.day) : void 0, b = (e, n, r, i, a, o) => t(_n(e, n, r, i, a, o, u)), x = (e) => {
|
|
1486
1951
|
e && b(e.getFullYear(), e.getMonth(), e.getDate(), f, h, _);
|
|
1487
|
-
},
|
|
1952
|
+
}, S = (e, t) => {
|
|
1488
1953
|
let n = e === "h" ? t : f, r = e === "m" ? t : h, i = e === "s" ? t : _;
|
|
1489
|
-
e === "h" &&
|
|
1954
|
+
e === "h" && p(t), e === "m" && g(t), e === "s" && v(t), d && b(d.year, d.month, d.day, n, r, i);
|
|
1490
1955
|
}, w = (e) => {
|
|
1491
1956
|
if (o) {
|
|
1492
1957
|
let t = new Date(o);
|
|
@@ -1507,62 +1972,62 @@ function sn({ isoValue: e, onChange: t, label: r, placeholder: i = "Select date
|
|
|
1507
1972
|
hour12: !1,
|
|
1508
1973
|
timeZone: u
|
|
1509
1974
|
}) : i;
|
|
1510
|
-
return /* @__PURE__ */
|
|
1975
|
+
return /* @__PURE__ */ X("div", {
|
|
1511
1976
|
className: "flex flex-col gap-1",
|
|
1512
|
-
children: [/* @__PURE__ */
|
|
1977
|
+
children: [/* @__PURE__ */ Y("label", {
|
|
1513
1978
|
className: "px-0.5 text-xs text-muted-foreground",
|
|
1514
1979
|
children: r
|
|
1515
|
-
}), /* @__PURE__ */
|
|
1980
|
+
}), /* @__PURE__ */ X(Gt, {
|
|
1516
1981
|
open: c,
|
|
1517
1982
|
onOpenChange: l,
|
|
1518
1983
|
modal: !1,
|
|
1519
|
-
children: [/* @__PURE__ */
|
|
1984
|
+
children: [/* @__PURE__ */ Y(Kt, {
|
|
1520
1985
|
asChild: !0,
|
|
1521
|
-
children: /* @__PURE__ */
|
|
1986
|
+
children: /* @__PURE__ */ X("button", {
|
|
1522
1987
|
type: "button",
|
|
1523
|
-
className:
|
|
1524
|
-
children: [/* @__PURE__ */
|
|
1988
|
+
className: Q("flex h-8 w-full items-center justify-between gap-2 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", c && "border-ring ring-3 ring-ring/50", !d && "text-muted-foreground"),
|
|
1989
|
+
children: [/* @__PURE__ */ Y("span", {
|
|
1525
1990
|
className: "truncate",
|
|
1526
1991
|
children: T
|
|
1527
|
-
}), /* @__PURE__ */
|
|
1992
|
+
}), /* @__PURE__ */ Y(m, { className: "size-3.5 shrink-0 opacity-60" })]
|
|
1528
1993
|
})
|
|
1529
|
-
}), /* @__PURE__ */
|
|
1994
|
+
}), /* @__PURE__ */ X(qt, {
|
|
1530
1995
|
className: "w-auto p-0",
|
|
1531
1996
|
align: "start",
|
|
1532
1997
|
sideOffset: 4,
|
|
1533
|
-
children: [/* @__PURE__ */
|
|
1998
|
+
children: [/* @__PURE__ */ Y(pn, {
|
|
1534
1999
|
mode: "single",
|
|
1535
2000
|
selected: y,
|
|
1536
2001
|
onSelect: x,
|
|
1537
2002
|
disabled: w,
|
|
1538
2003
|
defaultMonth: y,
|
|
1539
2004
|
autoFocus: !0
|
|
1540
|
-
}), /* @__PURE__ */
|
|
2005
|
+
}), /* @__PURE__ */ X("div", {
|
|
1541
2006
|
className: "flex items-center gap-2 border-t px-3 py-2.5",
|
|
1542
2007
|
children: [
|
|
1543
|
-
/* @__PURE__ */
|
|
1544
|
-
/* @__PURE__ */
|
|
2008
|
+
/* @__PURE__ */ Y(C, { className: "size-4 shrink-0 text-muted-foreground" }),
|
|
2009
|
+
/* @__PURE__ */ Y(Sn, {
|
|
1545
2010
|
value: f,
|
|
1546
2011
|
max: 23,
|
|
1547
|
-
onChange: (e) =>
|
|
2012
|
+
onChange: (e) => S("h", e)
|
|
1548
2013
|
}),
|
|
1549
|
-
/* @__PURE__ */
|
|
2014
|
+
/* @__PURE__ */ Y("span", {
|
|
1550
2015
|
className: "text-sm font-medium text-muted-foreground",
|
|
1551
2016
|
children: ":"
|
|
1552
2017
|
}),
|
|
1553
|
-
/* @__PURE__ */
|
|
2018
|
+
/* @__PURE__ */ Y(Sn, {
|
|
1554
2019
|
value: h,
|
|
1555
2020
|
max: 59,
|
|
1556
|
-
onChange: (e) =>
|
|
2021
|
+
onChange: (e) => S("m", e)
|
|
1557
2022
|
}),
|
|
1558
|
-
/* @__PURE__ */
|
|
2023
|
+
/* @__PURE__ */ Y("span", {
|
|
1559
2024
|
className: "text-sm font-medium text-muted-foreground",
|
|
1560
2025
|
children: ":"
|
|
1561
2026
|
}),
|
|
1562
|
-
/* @__PURE__ */
|
|
2027
|
+
/* @__PURE__ */ Y(Sn, {
|
|
1563
2028
|
value: _,
|
|
1564
2029
|
max: 59,
|
|
1565
|
-
onChange: (e) =>
|
|
2030
|
+
onChange: (e) => S("s", e)
|
|
1566
2031
|
})
|
|
1567
2032
|
]
|
|
1568
2033
|
})]
|
|
@@ -1570,78 +2035,78 @@ function sn({ isoValue: e, onChange: t, label: r, placeholder: i = "Select date
|
|
|
1570
2035
|
})]
|
|
1571
2036
|
});
|
|
1572
2037
|
}
|
|
1573
|
-
var
|
|
1574
|
-
let c = a ??
|
|
2038
|
+
var wn = n.forwardRef(function({ value: e, onChange: t, className: r, timezone: i, presets: a, maxRangeDays: o }, s) {
|
|
2039
|
+
let c = a ?? vn, [l, u] = n.useState(!1), [d, f] = n.useState(e.from), [p, h] = n.useState(e.to);
|
|
1575
2040
|
n.useEffect(() => {
|
|
1576
2041
|
f(e.from), h(e.to);
|
|
1577
2042
|
}, [e]);
|
|
1578
|
-
let
|
|
2043
|
+
let g = (e) => {
|
|
1579
2044
|
if (f(e), o && e) {
|
|
1580
2045
|
let t = new Date(new Date(e).getTime() + o * 864e5);
|
|
1581
|
-
new Date(
|
|
2046
|
+
new Date(p) > t && h(t.toISOString());
|
|
1582
2047
|
}
|
|
1583
2048
|
}, v = (e) => {
|
|
1584
2049
|
t({
|
|
1585
2050
|
preset: e,
|
|
1586
|
-
...
|
|
2051
|
+
...yn(e)
|
|
1587
2052
|
}), u(!1);
|
|
1588
2053
|
};
|
|
1589
|
-
return /* @__PURE__ */
|
|
2054
|
+
return /* @__PURE__ */ X(Gt, {
|
|
1590
2055
|
open: l,
|
|
1591
2056
|
onOpenChange: u,
|
|
1592
|
-
children: [/* @__PURE__ */
|
|
2057
|
+
children: [/* @__PURE__ */ Y(Kt, {
|
|
1593
2058
|
asChild: !0,
|
|
1594
|
-
children: /* @__PURE__ */
|
|
2059
|
+
children: /* @__PURE__ */ X("button", {
|
|
1595
2060
|
ref: s,
|
|
1596
2061
|
type: "button",
|
|
1597
|
-
className:
|
|
2062
|
+
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),
|
|
1598
2063
|
children: [
|
|
1599
|
-
/* @__PURE__ */
|
|
1600
|
-
/* @__PURE__ */
|
|
2064
|
+
/* @__PURE__ */ Y(m, { className: "size-3.5 shrink-0 opacity-60" }),
|
|
2065
|
+
/* @__PURE__ */ Y("span", {
|
|
1601
2066
|
className: "truncate",
|
|
1602
|
-
children:
|
|
2067
|
+
children: xn(e, i)
|
|
1603
2068
|
}),
|
|
1604
|
-
/* @__PURE__ */
|
|
2069
|
+
/* @__PURE__ */ Y(_, { className: Q("size-3.5 shrink-0 opacity-60 transition-transform", l && "rotate-180") })
|
|
1605
2070
|
]
|
|
1606
2071
|
})
|
|
1607
|
-
}), /* @__PURE__ */
|
|
2072
|
+
}), /* @__PURE__ */ Y(qt, {
|
|
1608
2073
|
align: "end",
|
|
1609
2074
|
sideOffset: 4,
|
|
1610
2075
|
className: "w-auto p-0",
|
|
1611
|
-
children: /* @__PURE__ */
|
|
2076
|
+
children: /* @__PURE__ */ X("div", {
|
|
1612
2077
|
className: "flex min-w-60 flex-col",
|
|
1613
|
-
children: [/* @__PURE__ */
|
|
2078
|
+
children: [/* @__PURE__ */ X("div", {
|
|
1614
2079
|
className: "border-b p-2",
|
|
1615
|
-
children: [/* @__PURE__ */
|
|
2080
|
+
children: [/* @__PURE__ */ Y("p", {
|
|
1616
2081
|
className: "mb-2 px-0.5 text-sm text-muted-foreground",
|
|
1617
2082
|
children: "Presets"
|
|
1618
|
-
}), /* @__PURE__ */
|
|
2083
|
+
}), /* @__PURE__ */ Y("div", {
|
|
1619
2084
|
className: "grid gap-1",
|
|
1620
2085
|
style: { gridTemplateColumns: `repeat(${c.length}, minmax(0, 1fr))` },
|
|
1621
|
-
children: c.map((t) => /* @__PURE__ */
|
|
2086
|
+
children: c.map((t) => /* @__PURE__ */ Y("button", {
|
|
1622
2087
|
type: "button",
|
|
1623
2088
|
onClick: () => v(t.value),
|
|
1624
|
-
className:
|
|
2089
|
+
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"),
|
|
1625
2090
|
children: t.label
|
|
1626
2091
|
}, t.value))
|
|
1627
2092
|
})]
|
|
1628
|
-
}), /* @__PURE__ */
|
|
2093
|
+
}), /* @__PURE__ */ X("div", {
|
|
1629
2094
|
className: "flex flex-col gap-3 p-2",
|
|
1630
2095
|
children: [
|
|
1631
|
-
/* @__PURE__ */
|
|
2096
|
+
/* @__PURE__ */ Y("p", {
|
|
1632
2097
|
className: "px-0.5 text-sm text-muted-foreground",
|
|
1633
2098
|
children: "Custom range"
|
|
1634
2099
|
}),
|
|
1635
|
-
/* @__PURE__ */
|
|
2100
|
+
/* @__PURE__ */ Y(Cn, {
|
|
1636
2101
|
isoValue: d,
|
|
1637
|
-
onChange:
|
|
2102
|
+
onChange: g,
|
|
1638
2103
|
label: "From",
|
|
1639
2104
|
placeholder: "Start date & time",
|
|
1640
2105
|
timezone: i,
|
|
1641
2106
|
maxDate: (/* @__PURE__ */ new Date()).toISOString()
|
|
1642
2107
|
}),
|
|
1643
|
-
/* @__PURE__ */
|
|
1644
|
-
isoValue:
|
|
2108
|
+
/* @__PURE__ */ Y(Cn, {
|
|
2109
|
+
isoValue: p,
|
|
1645
2110
|
onChange: h,
|
|
1646
2111
|
label: "To",
|
|
1647
2112
|
placeholder: "End date & time",
|
|
@@ -1656,16 +2121,16 @@ var cn = n.forwardRef(function({ value: e, onChange: t, className: r, timezone:
|
|
|
1656
2121
|
return e;
|
|
1657
2122
|
})()
|
|
1658
2123
|
}),
|
|
1659
|
-
/* @__PURE__ */
|
|
2124
|
+
/* @__PURE__ */ Y($, {
|
|
1660
2125
|
type: "button",
|
|
1661
2126
|
size: "sm",
|
|
1662
2127
|
className: "w-full",
|
|
1663
|
-
disabled: !d || !
|
|
2128
|
+
disabled: !d || !p,
|
|
1664
2129
|
onClick: () => {
|
|
1665
|
-
!d || !
|
|
2130
|
+
!d || !p || (t({
|
|
1666
2131
|
preset: null,
|
|
1667
|
-
from: d <=
|
|
1668
|
-
to: d <=
|
|
2132
|
+
from: d <= p ? d : p,
|
|
2133
|
+
to: d <= p ? p : d
|
|
1669
2134
|
}), u(!1));
|
|
1670
2135
|
},
|
|
1671
2136
|
children: "Apply"
|
|
@@ -1675,139 +2140,139 @@ var cn = n.forwardRef(function({ value: e, onChange: t, className: r, timezone:
|
|
|
1675
2140
|
})
|
|
1676
2141
|
})]
|
|
1677
2142
|
});
|
|
1678
|
-
}),
|
|
2143
|
+
}), Tn = H("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", {
|
|
1679
2144
|
variants: { variant: {
|
|
1680
2145
|
default: "bg-card text-card-foreground",
|
|
1681
2146
|
destructive: "bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current"
|
|
1682
2147
|
} },
|
|
1683
2148
|
defaultVariants: { variant: "default" }
|
|
1684
2149
|
});
|
|
1685
|
-
function
|
|
1686
|
-
return /* @__PURE__ */
|
|
2150
|
+
function En({ className: e, variant: t, ...n }) {
|
|
2151
|
+
return /* @__PURE__ */ Y("div", {
|
|
1687
2152
|
"data-slot": "alert",
|
|
1688
2153
|
role: "alert",
|
|
1689
|
-
className:
|
|
2154
|
+
className: Q(Tn({ variant: t }), e),
|
|
1690
2155
|
...n
|
|
1691
2156
|
});
|
|
1692
2157
|
}
|
|
1693
|
-
function
|
|
1694
|
-
return /* @__PURE__ */
|
|
2158
|
+
function Dn({ className: e, ...t }) {
|
|
2159
|
+
return /* @__PURE__ */ Y("div", {
|
|
1695
2160
|
"data-slot": "alert-title",
|
|
1696
|
-
className:
|
|
2161
|
+
className: Q("font-medium group-has-[>svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground", e),
|
|
1697
2162
|
...t
|
|
1698
2163
|
});
|
|
1699
2164
|
}
|
|
1700
|
-
function
|
|
1701
|
-
return /* @__PURE__ */
|
|
2165
|
+
function On({ className: e, ...t }) {
|
|
2166
|
+
return /* @__PURE__ */ Y("div", {
|
|
1702
2167
|
"data-slot": "alert-description",
|
|
1703
|
-
className:
|
|
2168
|
+
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),
|
|
1704
2169
|
...t
|
|
1705
2170
|
});
|
|
1706
2171
|
}
|
|
1707
|
-
function
|
|
1708
|
-
return /* @__PURE__ */
|
|
2172
|
+
function kn({ className: e, ...t }) {
|
|
2173
|
+
return /* @__PURE__ */ Y("div", {
|
|
1709
2174
|
"data-slot": "alert-action",
|
|
1710
|
-
className:
|
|
2175
|
+
className: Q("absolute top-2 right-2", e),
|
|
1711
2176
|
...t
|
|
1712
2177
|
});
|
|
1713
2178
|
}
|
|
1714
2179
|
//#endregion
|
|
1715
2180
|
//#region src/components/ui/alert-dialog.tsx
|
|
1716
|
-
function
|
|
1717
|
-
return /* @__PURE__ */
|
|
2181
|
+
function An({ ...e }) {
|
|
2182
|
+
return /* @__PURE__ */ Y(U.Root, {
|
|
1718
2183
|
"data-slot": "alert-dialog",
|
|
1719
2184
|
...e
|
|
1720
2185
|
});
|
|
1721
2186
|
}
|
|
1722
|
-
function
|
|
1723
|
-
return /* @__PURE__ */
|
|
2187
|
+
function jn({ ...e }) {
|
|
2188
|
+
return /* @__PURE__ */ Y(U.Trigger, {
|
|
1724
2189
|
"data-slot": "alert-dialog-trigger",
|
|
1725
2190
|
...e
|
|
1726
2191
|
});
|
|
1727
2192
|
}
|
|
1728
|
-
function
|
|
1729
|
-
return /* @__PURE__ */
|
|
2193
|
+
function Mn({ ...e }) {
|
|
2194
|
+
return /* @__PURE__ */ Y(U.Portal, {
|
|
1730
2195
|
"data-slot": "alert-dialog-portal",
|
|
1731
2196
|
...e
|
|
1732
2197
|
});
|
|
1733
2198
|
}
|
|
1734
|
-
function
|
|
1735
|
-
return /* @__PURE__ */
|
|
2199
|
+
function Nn({ className: e, ...t }) {
|
|
2200
|
+
return /* @__PURE__ */ Y(U.Overlay, {
|
|
1736
2201
|
"data-slot": "alert-dialog-overlay",
|
|
1737
|
-
className:
|
|
2202
|
+
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),
|
|
1738
2203
|
...t
|
|
1739
2204
|
});
|
|
1740
2205
|
}
|
|
1741
|
-
function
|
|
1742
|
-
return /* @__PURE__ */
|
|
2206
|
+
function Pn({ className: e, size: t = "default", ...n }) {
|
|
2207
|
+
return /* @__PURE__ */ X(Mn, { children: [/* @__PURE__ */ Y(Nn, {}), /* @__PURE__ */ Y(U.Content, {
|
|
1743
2208
|
"data-slot": "alert-dialog-content",
|
|
1744
2209
|
"data-size": t,
|
|
1745
|
-
className:
|
|
2210
|
+
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),
|
|
1746
2211
|
...n
|
|
1747
2212
|
})] });
|
|
1748
2213
|
}
|
|
1749
|
-
function
|
|
1750
|
-
return /* @__PURE__ */
|
|
2214
|
+
function Fn({ className: e, ...t }) {
|
|
2215
|
+
return /* @__PURE__ */ Y("div", {
|
|
1751
2216
|
"data-slot": "alert-dialog-header",
|
|
1752
|
-
className:
|
|
2217
|
+
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),
|
|
1753
2218
|
...t
|
|
1754
2219
|
});
|
|
1755
2220
|
}
|
|
1756
|
-
function
|
|
1757
|
-
return /* @__PURE__ */
|
|
2221
|
+
function In({ className: e, ...t }) {
|
|
2222
|
+
return /* @__PURE__ */ Y("div", {
|
|
1758
2223
|
"data-slot": "alert-dialog-footer",
|
|
1759
|
-
className:
|
|
2224
|
+
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),
|
|
1760
2225
|
...t
|
|
1761
2226
|
});
|
|
1762
2227
|
}
|
|
1763
|
-
function
|
|
1764
|
-
return /* @__PURE__ */
|
|
2228
|
+
function Ln({ className: e, ...t }) {
|
|
2229
|
+
return /* @__PURE__ */ Y("div", {
|
|
1765
2230
|
"data-slot": "alert-dialog-media",
|
|
1766
|
-
className:
|
|
2231
|
+
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),
|
|
1767
2232
|
...t
|
|
1768
2233
|
});
|
|
1769
2234
|
}
|
|
1770
|
-
function
|
|
1771
|
-
return /* @__PURE__ */
|
|
2235
|
+
function Rn({ className: e, ...t }) {
|
|
2236
|
+
return /* @__PURE__ */ Y(U.Title, {
|
|
1772
2237
|
"data-slot": "alert-dialog-title",
|
|
1773
|
-
className:
|
|
2238
|
+
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),
|
|
1774
2239
|
...t
|
|
1775
2240
|
});
|
|
1776
2241
|
}
|
|
1777
|
-
function
|
|
1778
|
-
return /* @__PURE__ */
|
|
2242
|
+
function zn({ className: e, ...t }) {
|
|
2243
|
+
return /* @__PURE__ */ Y(U.Description, {
|
|
1779
2244
|
"data-slot": "alert-dialog-description",
|
|
1780
|
-
className:
|
|
2245
|
+
className: Q("text-sm text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground", e),
|
|
1781
2246
|
...t
|
|
1782
2247
|
});
|
|
1783
2248
|
}
|
|
1784
|
-
function
|
|
1785
|
-
return /* @__PURE__ */
|
|
2249
|
+
function Bn({ className: e, variant: t = "default", size: n = "default", ...r }) {
|
|
2250
|
+
return /* @__PURE__ */ Y($, {
|
|
1786
2251
|
variant: t,
|
|
1787
2252
|
size: n,
|
|
1788
2253
|
asChild: !0,
|
|
1789
|
-
children: /* @__PURE__ */
|
|
2254
|
+
children: /* @__PURE__ */ Y(U.Action, {
|
|
1790
2255
|
"data-slot": "alert-dialog-action",
|
|
1791
|
-
className:
|
|
2256
|
+
className: Q(e),
|
|
1792
2257
|
...r
|
|
1793
2258
|
})
|
|
1794
2259
|
});
|
|
1795
2260
|
}
|
|
1796
|
-
function
|
|
1797
|
-
return /* @__PURE__ */
|
|
2261
|
+
function Vn({ className: e, variant: t = "outline", size: n = "default", ...r }) {
|
|
2262
|
+
return /* @__PURE__ */ Y($, {
|
|
1798
2263
|
variant: t,
|
|
1799
2264
|
size: n,
|
|
1800
2265
|
asChild: !0,
|
|
1801
|
-
children: /* @__PURE__ */
|
|
2266
|
+
children: /* @__PURE__ */ Y(U.Cancel, {
|
|
1802
2267
|
"data-slot": "alert-dialog-cancel",
|
|
1803
|
-
className:
|
|
2268
|
+
className: Q(e),
|
|
1804
2269
|
...r
|
|
1805
2270
|
})
|
|
1806
2271
|
});
|
|
1807
2272
|
}
|
|
1808
2273
|
//#endregion
|
|
1809
2274
|
//#region src/components/ui/badge.tsx
|
|
1810
|
-
var
|
|
2275
|
+
var Hn = H("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!", {
|
|
1811
2276
|
variants: { variant: {
|
|
1812
2277
|
default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80",
|
|
1813
2278
|
secondary: "bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",
|
|
@@ -1828,134 +2293,134 @@ var En = P("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-cent
|
|
|
1828
2293
|
} },
|
|
1829
2294
|
defaultVariants: { variant: "default" }
|
|
1830
2295
|
});
|
|
1831
|
-
function
|
|
1832
|
-
return /* @__PURE__ */
|
|
2296
|
+
function Un({ className: e, variant: t = "default", asChild: n = !1, ...r }) {
|
|
2297
|
+
return /* @__PURE__ */ Y(n ? ve.Root : "span", {
|
|
1833
2298
|
"data-slot": "badge",
|
|
1834
2299
|
"data-variant": t,
|
|
1835
|
-
className:
|
|
2300
|
+
className: Q(Hn({ variant: t }), e),
|
|
1836
2301
|
...r
|
|
1837
2302
|
});
|
|
1838
2303
|
}
|
|
1839
2304
|
//#endregion
|
|
1840
2305
|
//#region src/components/ui/button-group.tsx
|
|
1841
|
-
var
|
|
2306
|
+
var Wn = H("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", {
|
|
1842
2307
|
variants: { orientation: {
|
|
1843
2308
|
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!",
|
|
1844
2309
|
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!"
|
|
1845
2310
|
} },
|
|
1846
2311
|
defaultVariants: { orientation: "horizontal" }
|
|
1847
2312
|
});
|
|
1848
|
-
function
|
|
1849
|
-
return /* @__PURE__ */
|
|
2313
|
+
function Gn({ className: e, orientation: t, ...n }) {
|
|
2314
|
+
return /* @__PURE__ */ Y("div", {
|
|
1850
2315
|
role: "group",
|
|
1851
2316
|
"data-slot": "button-group",
|
|
1852
2317
|
"data-orientation": t,
|
|
1853
|
-
className:
|
|
2318
|
+
className: Q(Wn({ orientation: t }), e),
|
|
1854
2319
|
...n
|
|
1855
2320
|
});
|
|
1856
2321
|
}
|
|
1857
|
-
function
|
|
1858
|
-
return /* @__PURE__ */
|
|
1859
|
-
className:
|
|
2322
|
+
function Kn({ className: e, asChild: t = !1, ...n }) {
|
|
2323
|
+
return /* @__PURE__ */ Y(t ? ve.Root : "div", {
|
|
2324
|
+
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),
|
|
1860
2325
|
...n
|
|
1861
2326
|
});
|
|
1862
2327
|
}
|
|
1863
|
-
function
|
|
1864
|
-
return /* @__PURE__ */
|
|
2328
|
+
function qn({ className: e, orientation: t = "vertical", ...n }) {
|
|
2329
|
+
return /* @__PURE__ */ Y(Qe, {
|
|
1865
2330
|
"data-slot": "button-group-separator",
|
|
1866
2331
|
orientation: t,
|
|
1867
|
-
className:
|
|
2332
|
+
className: Q("relative self-stretch bg-input data-horizontal:mx-px data-horizontal:w-auto data-vertical:my-px data-vertical:h-auto", e),
|
|
1868
2333
|
...n
|
|
1869
2334
|
});
|
|
1870
2335
|
}
|
|
1871
2336
|
//#endregion
|
|
1872
2337
|
//#region src/components/ui/card.tsx
|
|
1873
|
-
function
|
|
1874
|
-
return /* @__PURE__ */
|
|
2338
|
+
function Jn({ className: e, size: t = "default", ...n }) {
|
|
2339
|
+
return /* @__PURE__ */ Y("div", {
|
|
1875
2340
|
"data-slot": "card",
|
|
1876
2341
|
"data-size": t,
|
|
1877
|
-
className:
|
|
2342
|
+
className: Q("group/card flex flex-col gap-4 overflow-hidden rounded-xl bg-card py-4 text-sm text-card-foreground ring-1 ring-foreground/10 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", e),
|
|
1878
2343
|
...n
|
|
1879
2344
|
});
|
|
1880
2345
|
}
|
|
1881
|
-
function
|
|
1882
|
-
return /* @__PURE__ */
|
|
2346
|
+
function Yn({ className: e, ...t }) {
|
|
2347
|
+
return /* @__PURE__ */ Y("div", {
|
|
1883
2348
|
"data-slot": "card-header",
|
|
1884
|
-
className:
|
|
2349
|
+
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),
|
|
1885
2350
|
...t
|
|
1886
2351
|
});
|
|
1887
2352
|
}
|
|
1888
|
-
function
|
|
1889
|
-
return /* @__PURE__ */
|
|
2353
|
+
function Xn({ className: e, ...t }) {
|
|
2354
|
+
return /* @__PURE__ */ Y("div", {
|
|
1890
2355
|
"data-slot": "card-title",
|
|
1891
|
-
className:
|
|
2356
|
+
className: Q("text-base leading-snug font-medium group-data-[size=sm]/card:text-sm", e),
|
|
1892
2357
|
...t
|
|
1893
2358
|
});
|
|
1894
2359
|
}
|
|
1895
|
-
function
|
|
1896
|
-
return /* @__PURE__ */
|
|
2360
|
+
function Zn({ className: e, ...t }) {
|
|
2361
|
+
return /* @__PURE__ */ Y("div", {
|
|
1897
2362
|
"data-slot": "card-description",
|
|
1898
|
-
className:
|
|
2363
|
+
className: Q("text-sm text-muted-foreground", e),
|
|
1899
2364
|
...t
|
|
1900
2365
|
});
|
|
1901
2366
|
}
|
|
1902
|
-
function
|
|
1903
|
-
return /* @__PURE__ */
|
|
2367
|
+
function Qn({ className: e, ...t }) {
|
|
2368
|
+
return /* @__PURE__ */ Y("div", {
|
|
1904
2369
|
"data-slot": "card-action",
|
|
1905
|
-
className:
|
|
2370
|
+
className: Q("col-start-2 row-span-2 row-start-1 self-start justify-self-end", e),
|
|
1906
2371
|
...t
|
|
1907
2372
|
});
|
|
1908
2373
|
}
|
|
1909
|
-
function
|
|
1910
|
-
return /* @__PURE__ */
|
|
2374
|
+
function $n({ className: e, ...t }) {
|
|
2375
|
+
return /* @__PURE__ */ Y("div", {
|
|
1911
2376
|
"data-slot": "card-content",
|
|
1912
|
-
className:
|
|
2377
|
+
className: Q("px-4 group-data-[size=sm]/card:px-3", e),
|
|
1913
2378
|
...t
|
|
1914
2379
|
});
|
|
1915
2380
|
}
|
|
1916
|
-
function
|
|
1917
|
-
return /* @__PURE__ */
|
|
2381
|
+
function er({ className: e, ...t }) {
|
|
2382
|
+
return /* @__PURE__ */ Y("div", {
|
|
1918
2383
|
"data-slot": "card-footer",
|
|
1919
|
-
className:
|
|
2384
|
+
className: Q("flex items-center rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/card:p-3", e),
|
|
1920
2385
|
...t
|
|
1921
2386
|
});
|
|
1922
2387
|
}
|
|
1923
2388
|
//#endregion
|
|
1924
2389
|
//#region src/components/ui/chart.tsx
|
|
1925
|
-
var
|
|
2390
|
+
var tr = {
|
|
1926
2391
|
light: "",
|
|
1927
2392
|
dark: ".dark"
|
|
1928
|
-
},
|
|
2393
|
+
}, nr = {
|
|
1929
2394
|
width: 320,
|
|
1930
2395
|
height: 200
|
|
1931
|
-
},
|
|
1932
|
-
function
|
|
1933
|
-
let e = n.useContext(
|
|
2396
|
+
}, rr = n.createContext(null);
|
|
2397
|
+
function ir() {
|
|
2398
|
+
let e = n.useContext(rr);
|
|
1934
2399
|
if (!e) throw Error("useChart must be used within a <ChartContainer />");
|
|
1935
2400
|
return e;
|
|
1936
2401
|
}
|
|
1937
|
-
function
|
|
2402
|
+
function ar({ id: e, className: t, children: r, config: i, initialDimension: a = nr, ...o }) {
|
|
1938
2403
|
let s = n.useId(), c = `chart-${e ?? s.replace(/:/g, "")}`;
|
|
1939
|
-
return /* @__PURE__ */
|
|
2404
|
+
return /* @__PURE__ */ Y(rr.Provider, {
|
|
1940
2405
|
value: { config: i },
|
|
1941
|
-
children: /* @__PURE__ */
|
|
2406
|
+
children: /* @__PURE__ */ X("div", {
|
|
1942
2407
|
"data-slot": "chart",
|
|
1943
2408
|
"data-chart": c,
|
|
1944
|
-
className:
|
|
2409
|
+
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),
|
|
1945
2410
|
...o,
|
|
1946
|
-
children: [/* @__PURE__ */
|
|
2411
|
+
children: [/* @__PURE__ */ Y(or, {
|
|
1947
2412
|
id: c,
|
|
1948
2413
|
config: i
|
|
1949
|
-
}), /* @__PURE__ */
|
|
2414
|
+
}), /* @__PURE__ */ Y(Te.ResponsiveContainer, {
|
|
1950
2415
|
initialDimension: a,
|
|
1951
2416
|
children: r
|
|
1952
2417
|
})]
|
|
1953
2418
|
})
|
|
1954
2419
|
});
|
|
1955
2420
|
}
|
|
1956
|
-
var
|
|
2421
|
+
var or = ({ id: e, config: t }) => {
|
|
1957
2422
|
let n = Object.entries(t).filter(([, e]) => e.theme ?? e.color);
|
|
1958
|
-
return n.length ? /* @__PURE__ */
|
|
2423
|
+
return n.length ? /* @__PURE__ */ Y("style", { dangerouslySetInnerHTML: { __html: Object.entries(tr).map(([t, r]) => `
|
|
1959
2424
|
${r} [data-chart=${e}] {
|
|
1960
2425
|
${n.map(([e, n]) => {
|
|
1961
2426
|
let r = n.theme?.[t] ?? n.color;
|
|
@@ -1963,16 +2428,16 @@ ${n.map(([e, n]) => {
|
|
|
1963
2428
|
}).join("\n")}
|
|
1964
2429
|
}
|
|
1965
2430
|
`).join("\n") } }) : null;
|
|
1966
|
-
},
|
|
1967
|
-
function
|
|
1968
|
-
let { config: m } =
|
|
2431
|
+
}, sr = Te.Tooltip;
|
|
2432
|
+
function cr({ 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 }) {
|
|
2433
|
+
let { config: m } = ir(), h = n.useMemo(() => {
|
|
1969
2434
|
if (a || !t?.length) return null;
|
|
1970
|
-
let [e] = t, n =
|
|
1971
|
-
return c ? /* @__PURE__ */
|
|
1972
|
-
className:
|
|
2435
|
+
let [e] = t, n = dr(m, e, `${p ?? e?.dataKey ?? e?.name ?? "value"}`), r = !p && typeof s == "string" ? m[s]?.label ?? s : n?.label;
|
|
2436
|
+
return c ? /* @__PURE__ */ Y("div", {
|
|
2437
|
+
className: Q("font-medium", l),
|
|
1973
2438
|
children: c(r, t)
|
|
1974
|
-
}) : r ? /* @__PURE__ */
|
|
1975
|
-
className:
|
|
2439
|
+
}) : r ? /* @__PURE__ */ Y("div", {
|
|
2440
|
+
className: Q("font-medium", l),
|
|
1976
2441
|
children: r
|
|
1977
2442
|
}) : null;
|
|
1978
2443
|
}, [
|
|
@@ -1986,16 +2451,16 @@ function Kn({ active: e, payload: t, className: r, indicator: i = "dot", hideLab
|
|
|
1986
2451
|
]);
|
|
1987
2452
|
if (!e || !t?.length) return null;
|
|
1988
2453
|
let g = t.length === 1 && i !== "dot";
|
|
1989
|
-
return /* @__PURE__ */
|
|
1990
|
-
className:
|
|
1991
|
-
children: [g ? null : h, /* @__PURE__ */
|
|
2454
|
+
return /* @__PURE__ */ X("div", {
|
|
2455
|
+
className: Q("grid min-w-32 items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl", r),
|
|
2456
|
+
children: [g ? null : h, /* @__PURE__ */ Y("div", {
|
|
1992
2457
|
className: "grid gap-1.5",
|
|
1993
2458
|
children: t.filter((e) => e.type !== "none").map((e, t) => {
|
|
1994
|
-
let n =
|
|
1995
|
-
return /* @__PURE__ */
|
|
1996
|
-
className:
|
|
1997
|
-
children: u && e?.value !== void 0 && e.name ? u(e.value, e.name, e, t, e.payload) : /* @__PURE__ */
|
|
1998
|
-
className:
|
|
2459
|
+
let n = dr(m, e, `${f ?? e.name ?? e.dataKey ?? "value"}`), r = d ?? e.payload?.fill ?? e.color;
|
|
2460
|
+
return /* @__PURE__ */ Y("div", {
|
|
2461
|
+
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"),
|
|
2462
|
+
children: u && e?.value !== void 0 && e.name ? u(e.value, e.name, e, t, e.payload) : /* @__PURE__ */ X(Se, { children: [n?.icon ? /* @__PURE__ */ Y(n.icon, {}) : !o && /* @__PURE__ */ Y("div", {
|
|
2463
|
+
className: Q("shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)", {
|
|
1999
2464
|
"h-2.5 w-2.5": i === "dot",
|
|
2000
2465
|
"w-1": i === "line",
|
|
2001
2466
|
"w-0 border-[1.5px] border-dashed bg-transparent": i === "dashed",
|
|
@@ -2005,15 +2470,15 @@ function Kn({ active: e, payload: t, className: r, indicator: i = "dot", hideLab
|
|
|
2005
2470
|
"--color-bg": r,
|
|
2006
2471
|
"--color-border": r
|
|
2007
2472
|
}
|
|
2008
|
-
}), /* @__PURE__ */
|
|
2009
|
-
className:
|
|
2010
|
-
children: [/* @__PURE__ */
|
|
2473
|
+
}), /* @__PURE__ */ X("div", {
|
|
2474
|
+
className: Q("flex flex-1 justify-between leading-none", g ? "items-end" : "items-center"),
|
|
2475
|
+
children: [/* @__PURE__ */ X("div", {
|
|
2011
2476
|
className: "grid gap-1.5",
|
|
2012
|
-
children: [g ? h : null, /* @__PURE__ */
|
|
2477
|
+
children: [g ? h : null, /* @__PURE__ */ Y("span", {
|
|
2013
2478
|
className: "text-muted-foreground",
|
|
2014
2479
|
children: n?.label ?? e.name
|
|
2015
2480
|
})]
|
|
2016
|
-
}), e.value != null && /* @__PURE__ */
|
|
2481
|
+
}), e.value != null && /* @__PURE__ */ Y("span", {
|
|
2017
2482
|
className: "font-mono font-medium text-foreground tabular-nums",
|
|
2018
2483
|
children: typeof e.value == "number" ? e.value.toLocaleString() : String(e.value)
|
|
2019
2484
|
})]
|
|
@@ -2023,16 +2488,16 @@ function Kn({ active: e, payload: t, className: r, indicator: i = "dot", hideLab
|
|
|
2023
2488
|
})]
|
|
2024
2489
|
});
|
|
2025
2490
|
}
|
|
2026
|
-
var
|
|
2027
|
-
function
|
|
2028
|
-
let { config: a } =
|
|
2029
|
-
return n?.length ? /* @__PURE__ */
|
|
2030
|
-
className:
|
|
2491
|
+
var lr = Te.Legend;
|
|
2492
|
+
function ur({ className: e, hideIcon: t = !1, payload: n, verticalAlign: r = "bottom", nameKey: i }) {
|
|
2493
|
+
let { config: a } = ir();
|
|
2494
|
+
return n?.length ? /* @__PURE__ */ Y("div", {
|
|
2495
|
+
className: Q("flex items-center justify-center gap-4", r === "top" ? "pb-3" : "pt-3", e),
|
|
2031
2496
|
children: n.filter((e) => e.type !== "none").map((e, n) => {
|
|
2032
|
-
let r =
|
|
2033
|
-
return /* @__PURE__ */
|
|
2034
|
-
className:
|
|
2035
|
-
children: [r?.icon && !t ? /* @__PURE__ */
|
|
2497
|
+
let r = dr(a, e, `${i ?? e.dataKey ?? "value"}`);
|
|
2498
|
+
return /* @__PURE__ */ X("div", {
|
|
2499
|
+
className: Q("flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground"),
|
|
2500
|
+
children: [r?.icon && !t ? /* @__PURE__ */ Y(r.icon, {}) : /* @__PURE__ */ Y("div", {
|
|
2036
2501
|
className: "h-2 w-2 shrink-0 rounded-[2px]",
|
|
2037
2502
|
style: { backgroundColor: e.color }
|
|
2038
2503
|
}), r?.label]
|
|
@@ -2040,56 +2505,56 @@ function Jn({ className: e, hideIcon: t = !1, payload: n, verticalAlign: r = "bo
|
|
|
2040
2505
|
})
|
|
2041
2506
|
}) : null;
|
|
2042
2507
|
}
|
|
2043
|
-
function
|
|
2508
|
+
function dr(e, t, n) {
|
|
2044
2509
|
if (typeof t != "object" || !t) return;
|
|
2045
2510
|
let r = "payload" in t && typeof t.payload == "object" && t.payload !== null ? t.payload : void 0, i = n;
|
|
2046
2511
|
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];
|
|
2047
2512
|
}
|
|
2048
2513
|
//#endregion
|
|
2049
2514
|
//#region src/components/ui/hover-card.tsx
|
|
2050
|
-
function
|
|
2051
|
-
return /* @__PURE__ */
|
|
2515
|
+
function fr({ ...e }) {
|
|
2516
|
+
return /* @__PURE__ */ Y(de.Root, {
|
|
2052
2517
|
"data-slot": "hover-card",
|
|
2053
2518
|
...e
|
|
2054
2519
|
});
|
|
2055
2520
|
}
|
|
2056
|
-
function
|
|
2057
|
-
return /* @__PURE__ */
|
|
2521
|
+
function pr({ ...e }) {
|
|
2522
|
+
return /* @__PURE__ */ Y(de.Trigger, {
|
|
2058
2523
|
"data-slot": "hover-card-trigger",
|
|
2059
2524
|
...e
|
|
2060
2525
|
});
|
|
2061
2526
|
}
|
|
2062
|
-
function
|
|
2063
|
-
return /* @__PURE__ */
|
|
2527
|
+
function mr({ className: e, align: t = "center", sideOffset: n = 4, ...r }) {
|
|
2528
|
+
return /* @__PURE__ */ Y(de.Portal, {
|
|
2064
2529
|
"data-slot": "hover-card-portal",
|
|
2065
|
-
children: /* @__PURE__ */
|
|
2530
|
+
children: /* @__PURE__ */ Y(de.Content, {
|
|
2066
2531
|
"data-slot": "hover-card-content",
|
|
2067
2532
|
align: t,
|
|
2068
2533
|
sideOffset: n,
|
|
2069
|
-
className:
|
|
2534
|
+
className: Q("z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden 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),
|
|
2070
2535
|
...r
|
|
2071
2536
|
})
|
|
2072
2537
|
});
|
|
2073
2538
|
}
|
|
2074
2539
|
//#endregion
|
|
2075
2540
|
//#region src/components/ui/item.tsx
|
|
2076
|
-
function
|
|
2077
|
-
return /* @__PURE__ */
|
|
2541
|
+
function hr({ className: e, ...t }) {
|
|
2542
|
+
return /* @__PURE__ */ Y("div", {
|
|
2078
2543
|
role: "list",
|
|
2079
2544
|
"data-slot": "item-group",
|
|
2080
|
-
className:
|
|
2545
|
+
className: Q("group/item-group flex w-full flex-col gap-4 has-data-[size=sm]:gap-2.5 has-data-[size=xs]:gap-2", e),
|
|
2081
2546
|
...t
|
|
2082
2547
|
});
|
|
2083
2548
|
}
|
|
2084
|
-
function
|
|
2085
|
-
return /* @__PURE__ */
|
|
2549
|
+
function gr({ className: e, ...t }) {
|
|
2550
|
+
return /* @__PURE__ */ Y(Qe, {
|
|
2086
2551
|
"data-slot": "item-separator",
|
|
2087
2552
|
orientation: "horizontal",
|
|
2088
|
-
className:
|
|
2553
|
+
className: Q("my-2", e),
|
|
2089
2554
|
...t
|
|
2090
2555
|
});
|
|
2091
2556
|
}
|
|
2092
|
-
var
|
|
2557
|
+
var _r = H("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", {
|
|
2093
2558
|
variants: {
|
|
2094
2559
|
variant: {
|
|
2095
2560
|
default: "border-transparent",
|
|
@@ -2107,12 +2572,12 @@ var tr = P("group/item flex w-full flex-wrap items-center rounded-lg border text
|
|
|
2107
2572
|
size: "default"
|
|
2108
2573
|
}
|
|
2109
2574
|
});
|
|
2110
|
-
function
|
|
2111
|
-
return /* @__PURE__ */
|
|
2575
|
+
function vr({ className: e, variant: t = "default", size: n = "default", asChild: r = !1, ...i }) {
|
|
2576
|
+
return /* @__PURE__ */ Y(r ? ve.Root : "div", {
|
|
2112
2577
|
"data-slot": "item",
|
|
2113
2578
|
"data-variant": t,
|
|
2114
2579
|
"data-size": n,
|
|
2115
|
-
className:
|
|
2580
|
+
className: Q(_r({
|
|
2116
2581
|
variant: t,
|
|
2117
2582
|
size: n,
|
|
2118
2583
|
className: e
|
|
@@ -2120,7 +2585,7 @@ function nr({ className: e, variant: t = "default", size: n = "default", asChild
|
|
|
2120
2585
|
...i
|
|
2121
2586
|
});
|
|
2122
2587
|
}
|
|
2123
|
-
var
|
|
2588
|
+
var yr = H("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", {
|
|
2124
2589
|
variants: { variant: {
|
|
2125
2590
|
default: "bg-transparent",
|
|
2126
2591
|
icon: "[&_svg:not([class*='size-'])]:size-4",
|
|
@@ -2128,65 +2593,65 @@ var rr = P("flex shrink-0 items-center justify-center gap-2 group-has-data-[slot
|
|
|
2128
2593
|
} },
|
|
2129
2594
|
defaultVariants: { variant: "default" }
|
|
2130
2595
|
});
|
|
2131
|
-
function
|
|
2132
|
-
return /* @__PURE__ */
|
|
2596
|
+
function br({ className: e, variant: t = "default", ...n }) {
|
|
2597
|
+
return /* @__PURE__ */ Y("div", {
|
|
2133
2598
|
"data-slot": "item-media",
|
|
2134
2599
|
"data-variant": t,
|
|
2135
|
-
className:
|
|
2600
|
+
className: Q(yr({
|
|
2136
2601
|
variant: t,
|
|
2137
2602
|
className: e
|
|
2138
2603
|
})),
|
|
2139
2604
|
...n
|
|
2140
2605
|
});
|
|
2141
2606
|
}
|
|
2142
|
-
function
|
|
2143
|
-
return /* @__PURE__ */
|
|
2607
|
+
function xr({ className: e, ...t }) {
|
|
2608
|
+
return /* @__PURE__ */ Y("div", {
|
|
2144
2609
|
"data-slot": "item-content",
|
|
2145
|
-
className:
|
|
2610
|
+
className: Q("flex flex-1 flex-col gap-1 group-data-[size=xs]/item:gap-0 [&+[data-slot=item-content]]:flex-none", e),
|
|
2146
2611
|
...t
|
|
2147
2612
|
});
|
|
2148
2613
|
}
|
|
2149
|
-
function
|
|
2150
|
-
return /* @__PURE__ */
|
|
2614
|
+
function Sr({ className: e, ...t }) {
|
|
2615
|
+
return /* @__PURE__ */ Y("div", {
|
|
2151
2616
|
"data-slot": "item-title",
|
|
2152
|
-
className:
|
|
2617
|
+
className: Q("line-clamp-1 flex w-fit items-center gap-2 text-sm leading-snug font-medium underline-offset-4", e),
|
|
2153
2618
|
...t
|
|
2154
2619
|
});
|
|
2155
2620
|
}
|
|
2156
|
-
function
|
|
2157
|
-
return /* @__PURE__ */
|
|
2621
|
+
function Cr({ className: e, ...t }) {
|
|
2622
|
+
return /* @__PURE__ */ Y("p", {
|
|
2158
2623
|
"data-slot": "item-description",
|
|
2159
|
-
className:
|
|
2624
|
+
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),
|
|
2160
2625
|
...t
|
|
2161
2626
|
});
|
|
2162
2627
|
}
|
|
2163
|
-
function
|
|
2164
|
-
return /* @__PURE__ */
|
|
2628
|
+
function wr({ className: e, ...t }) {
|
|
2629
|
+
return /* @__PURE__ */ Y("div", {
|
|
2165
2630
|
"data-slot": "item-actions",
|
|
2166
|
-
className:
|
|
2631
|
+
className: Q("flex items-center gap-2", e),
|
|
2167
2632
|
...t
|
|
2168
2633
|
});
|
|
2169
2634
|
}
|
|
2170
|
-
function
|
|
2171
|
-
return /* @__PURE__ */
|
|
2635
|
+
function Tr({ className: e, ...t }) {
|
|
2636
|
+
return /* @__PURE__ */ Y("div", {
|
|
2172
2637
|
"data-slot": "item-header",
|
|
2173
|
-
className:
|
|
2638
|
+
className: Q("flex basis-full items-center justify-between gap-2", e),
|
|
2174
2639
|
...t
|
|
2175
2640
|
});
|
|
2176
2641
|
}
|
|
2177
|
-
function
|
|
2178
|
-
return /* @__PURE__ */
|
|
2642
|
+
function Er({ className: e, ...t }) {
|
|
2643
|
+
return /* @__PURE__ */ Y("div", {
|
|
2179
2644
|
"data-slot": "item-footer",
|
|
2180
|
-
className:
|
|
2645
|
+
className: Q("flex basis-full items-center justify-between gap-2", e),
|
|
2181
2646
|
...t
|
|
2182
2647
|
});
|
|
2183
2648
|
}
|
|
2184
2649
|
//#endregion
|
|
2185
2650
|
//#region src/components/ui/map.tsx
|
|
2186
|
-
var
|
|
2651
|
+
var Dr = {
|
|
2187
2652
|
dark: "https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json",
|
|
2188
2653
|
light: "https://basemaps.cartocdn.com/gl/positron-gl-style/style.json"
|
|
2189
|
-
},
|
|
2654
|
+
}, Or = [
|
|
2190
2655
|
{
|
|
2191
2656
|
label: "Light",
|
|
2192
2657
|
url: "https://basemaps.cartocdn.com/gl/positron-gl-style/style.json"
|
|
@@ -2199,26 +2664,26 @@ var dr = {
|
|
|
2199
2664
|
label: "Dark",
|
|
2200
2665
|
url: "https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json"
|
|
2201
2666
|
}
|
|
2202
|
-
],
|
|
2203
|
-
function
|
|
2204
|
-
let e = o(
|
|
2667
|
+
], kr = r(null);
|
|
2668
|
+
function Ar() {
|
|
2669
|
+
let e = o(kr);
|
|
2205
2670
|
if (!e) throw Error("useMap must be used within a Map component");
|
|
2206
2671
|
return e;
|
|
2207
2672
|
}
|
|
2208
|
-
function
|
|
2209
|
-
return /* @__PURE__ */
|
|
2673
|
+
function jr() {
|
|
2674
|
+
return /* @__PURE__ */ Y("div", {
|
|
2210
2675
|
className: "bg-background/50 absolute inset-0 z-10 flex items-center justify-center backdrop-blur-xs",
|
|
2211
|
-
children: /* @__PURE__ */
|
|
2676
|
+
children: /* @__PURE__ */ X("div", {
|
|
2212
2677
|
className: "flex gap-1",
|
|
2213
2678
|
children: [
|
|
2214
|
-
/* @__PURE__ */
|
|
2215
|
-
/* @__PURE__ */
|
|
2216
|
-
/* @__PURE__ */
|
|
2679
|
+
/* @__PURE__ */ Y("span", { className: "bg-muted-foreground/60 size-1.5 animate-pulse rounded-full" }),
|
|
2680
|
+
/* @__PURE__ */ Y("span", { className: "bg-muted-foreground/60 size-1.5 animate-pulse rounded-full [animation-delay:150ms]" }),
|
|
2681
|
+
/* @__PURE__ */ Y("span", { className: "bg-muted-foreground/60 size-1.5 animate-pulse rounded-full [animation-delay:300ms]" })
|
|
2217
2682
|
]
|
|
2218
2683
|
})
|
|
2219
2684
|
});
|
|
2220
2685
|
}
|
|
2221
|
-
function
|
|
2686
|
+
function Mr(e) {
|
|
2222
2687
|
let t = e.getCenter();
|
|
2223
2688
|
return {
|
|
2224
2689
|
center: [t.lng, t.lat],
|
|
@@ -2227,22 +2692,22 @@ function hr(e) {
|
|
|
2227
2692
|
pitch: e.getPitch()
|
|
2228
2693
|
};
|
|
2229
2694
|
}
|
|
2230
|
-
var
|
|
2231
|
-
let v = h === !1 ? [] : h, y = d(null), [b, x] = f(null), [S, C] = f(!1), [w, T] = f(!1), [E,
|
|
2232
|
-
|
|
2233
|
-
let
|
|
2234
|
-
dark: r?.dark ??
|
|
2235
|
-
light: r?.light ??
|
|
2695
|
+
var Nr = i(function({ children: e, className: t, theme: n, styles: r, projection: i, viewport: o, onViewportChange: c, loading: p = !1, controls: m = !0, tiles: h = Or, ...g }, _) {
|
|
2696
|
+
let v = h === !1 ? [] : h, y = d(null), [b, x] = f(null), [S, C] = f(!1), [w, T] = f(!1), [E, D] = f(0), O = d(null), k = d(null), A = d(!1), j = o !== void 0 && c !== void 0, ee = d(c);
|
|
2697
|
+
ee.current = c;
|
|
2698
|
+
let M = u(() => ({
|
|
2699
|
+
dark: r?.dark ?? Dr.dark,
|
|
2700
|
+
light: r?.light ?? Dr.light
|
|
2236
2701
|
}), [r]);
|
|
2237
2702
|
l(_, () => b, [b]);
|
|
2238
|
-
let
|
|
2239
|
-
|
|
2703
|
+
let N = a(() => {
|
|
2704
|
+
k.current &&= (clearTimeout(k.current), null);
|
|
2240
2705
|
}, []);
|
|
2241
2706
|
s(() => {
|
|
2242
2707
|
if (!y.current) return;
|
|
2243
|
-
let e = v[0]?.url ??
|
|
2244
|
-
|
|
2245
|
-
let t = new
|
|
2708
|
+
let e = v[0]?.url ?? M.light;
|
|
2709
|
+
O.current = e;
|
|
2710
|
+
let t = new Ee.Map({
|
|
2246
2711
|
container: y.current,
|
|
2247
2712
|
style: e,
|
|
2248
2713
|
renderWorldCopies: !1,
|
|
@@ -2250,40 +2715,40 @@ var gr = i(function({ children: e, className: t, theme: n, styles: r, projection
|
|
|
2250
2715
|
...g,
|
|
2251
2716
|
...o
|
|
2252
2717
|
}), n = () => {
|
|
2253
|
-
|
|
2718
|
+
N(), k.current = setTimeout(() => {
|
|
2254
2719
|
T(!0), i && t.setProjection(i);
|
|
2255
2720
|
}, 100);
|
|
2256
2721
|
}, r = () => C(!0), a = () => {
|
|
2257
|
-
|
|
2722
|
+
A.current || ee.current?.(Mr(t));
|
|
2258
2723
|
};
|
|
2259
2724
|
return t.on("load", r), t.on("styledata", n), t.on("move", a), x(t), () => {
|
|
2260
|
-
|
|
2725
|
+
N(), t.off("load", r), t.off("styledata", n), t.off("move", a), t.remove(), C(!1), T(!1), x(null);
|
|
2261
2726
|
};
|
|
2262
2727
|
}, []), s(() => {
|
|
2263
|
-
if (!b || !
|
|
2264
|
-
let e =
|
|
2728
|
+
if (!b || !j || !o || b.isMoving()) return;
|
|
2729
|
+
let e = Mr(b), t = {
|
|
2265
2730
|
center: o.center ?? e.center,
|
|
2266
2731
|
zoom: o.zoom ?? e.zoom,
|
|
2267
2732
|
bearing: o.bearing ?? e.bearing,
|
|
2268
2733
|
pitch: o.pitch ?? e.pitch
|
|
2269
2734
|
};
|
|
2270
|
-
t.center[0] === e.center[0] && t.center[1] === e.center[1] && t.zoom === e.zoom && t.bearing === e.bearing && t.pitch === e.pitch || (
|
|
2735
|
+
t.center[0] === e.center[0] && t.center[1] === e.center[1] && t.zoom === e.zoom && t.bearing === e.bearing && t.pitch === e.pitch || (A.current = !0, b.jumpTo(t), A.current = !1);
|
|
2271
2736
|
}, [
|
|
2272
2737
|
b,
|
|
2273
|
-
|
|
2738
|
+
j,
|
|
2274
2739
|
o
|
|
2275
2740
|
]), s(() => {
|
|
2276
2741
|
if (!b) return;
|
|
2277
|
-
let e = v[E]?.url ?? (n === "dark" ?
|
|
2278
|
-
|
|
2742
|
+
let e = v[E]?.url ?? (n === "dark" ? M.dark : M.light);
|
|
2743
|
+
O.current !== e && (N(), O.current = e, T(!1), b.setStyle(e, { diff: !0 }));
|
|
2279
2744
|
}, [
|
|
2280
2745
|
b,
|
|
2281
2746
|
E,
|
|
2282
2747
|
n,
|
|
2283
|
-
|
|
2284
|
-
|
|
2748
|
+
M,
|
|
2749
|
+
N
|
|
2285
2750
|
]);
|
|
2286
|
-
let
|
|
2751
|
+
let P = u(() => ({
|
|
2287
2752
|
map: b,
|
|
2288
2753
|
isLoaded: S && w
|
|
2289
2754
|
}), [
|
|
@@ -2291,27 +2756,27 @@ var gr = i(function({ children: e, className: t, theme: n, styles: r, projection
|
|
|
2291
2756
|
S,
|
|
2292
2757
|
w
|
|
2293
2758
|
]);
|
|
2294
|
-
return /* @__PURE__ */
|
|
2295
|
-
value:
|
|
2296
|
-
children: /* @__PURE__ */
|
|
2759
|
+
return /* @__PURE__ */ Y(kr.Provider, {
|
|
2760
|
+
value: P,
|
|
2761
|
+
children: /* @__PURE__ */ X("div", {
|
|
2297
2762
|
ref: y,
|
|
2298
|
-
className:
|
|
2299
|
-
children: [(!S || p) && /* @__PURE__ */
|
|
2763
|
+
className: Q("relative h-full w-full", t),
|
|
2764
|
+
children: [(!S || p) && /* @__PURE__ */ Y(jr, {}), b && /* @__PURE__ */ X(Se, { children: [m && /* @__PURE__ */ Y(qr, {
|
|
2300
2765
|
position: "top-right",
|
|
2301
2766
|
tiles: v,
|
|
2302
2767
|
tileIndex: E,
|
|
2303
|
-
onTileChange:
|
|
2768
|
+
onTileChange: D
|
|
2304
2769
|
}), e] })]
|
|
2305
2770
|
})
|
|
2306
2771
|
});
|
|
2307
|
-
}),
|
|
2308
|
-
function
|
|
2309
|
-
let e = o(
|
|
2772
|
+
}), Pr = r(null);
|
|
2773
|
+
function Fr() {
|
|
2774
|
+
let e = o(Pr);
|
|
2310
2775
|
if (!e) throw Error("Marker components must be used within MapMarker");
|
|
2311
2776
|
return e;
|
|
2312
2777
|
}
|
|
2313
|
-
function
|
|
2314
|
-
let { map: m } =
|
|
2778
|
+
function Ir({ longitude: e, latitude: t, children: n, onClick: r, onMouseEnter: i, onMouseLeave: a, onDragStart: o, onDrag: c, onDragEnd: l, draggable: f = !1, ...p }) {
|
|
2779
|
+
let { map: m } = Ar(), h = d({
|
|
2315
2780
|
onClick: r,
|
|
2316
2781
|
onMouseEnter: i,
|
|
2317
2782
|
onMouseLeave: a,
|
|
@@ -2328,7 +2793,7 @@ function yr({ longitude: e, latitude: t, children: n, onClick: r, onMouseEnter:
|
|
|
2328
2793
|
onDragEnd: l
|
|
2329
2794
|
};
|
|
2330
2795
|
let g = u(() => {
|
|
2331
|
-
let n = new
|
|
2796
|
+
let n = new Ee.Marker({
|
|
2332
2797
|
...p,
|
|
2333
2798
|
element: document.createElement("div"),
|
|
2334
2799
|
draggable: f
|
|
@@ -2359,7 +2824,7 @@ function yr({ longitude: e, latitude: t, children: n, onClick: r, onMouseEnter:
|
|
|
2359
2824
|
};
|
|
2360
2825
|
}, [m]), (g.getLngLat().lng !== e || g.getLngLat().lat !== t) && g.setLngLat([e, t]), g.isDraggable() !== f && g.setDraggable(f);
|
|
2361
2826
|
let _ = g.getOffset(), v = p.offset ?? [0, 0], [y, b] = Array.isArray(v) ? v : [v.x, v.y];
|
|
2362
|
-
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__ */
|
|
2827
|
+
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__ */ Y(Pr.Provider, {
|
|
2363
2828
|
value: {
|
|
2364
2829
|
marker: g,
|
|
2365
2830
|
map: m
|
|
@@ -2367,27 +2832,27 @@ function yr({ longitude: e, latitude: t, children: n, onClick: r, onMouseEnter:
|
|
|
2367
2832
|
children: n
|
|
2368
2833
|
});
|
|
2369
2834
|
}
|
|
2370
|
-
function
|
|
2371
|
-
let { marker: n } =
|
|
2372
|
-
return
|
|
2373
|
-
className:
|
|
2374
|
-
children: e || /* @__PURE__ */
|
|
2835
|
+
function Lr({ children: e, className: t }) {
|
|
2836
|
+
let { marker: n } = Fr();
|
|
2837
|
+
return De(/* @__PURE__ */ Y("div", {
|
|
2838
|
+
className: Q("relative cursor-pointer", t),
|
|
2839
|
+
children: e || /* @__PURE__ */ Y(Rr, {})
|
|
2375
2840
|
}), n.getElement());
|
|
2376
2841
|
}
|
|
2377
|
-
function
|
|
2378
|
-
return /* @__PURE__ */
|
|
2842
|
+
function Rr() {
|
|
2843
|
+
return /* @__PURE__ */ Y("div", { className: "relative h-4 w-4 rounded-full border-2 border-white bg-blue-500 shadow-lg" });
|
|
2379
2844
|
}
|
|
2380
|
-
function
|
|
2381
|
-
return /* @__PURE__ */
|
|
2845
|
+
function zr({ onClick: e }) {
|
|
2846
|
+
return /* @__PURE__ */ Y("button", {
|
|
2382
2847
|
type: "button",
|
|
2383
2848
|
onClick: e,
|
|
2384
2849
|
"aria-label": "Close popup",
|
|
2385
2850
|
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",
|
|
2386
|
-
children: /* @__PURE__ */
|
|
2851
|
+
children: /* @__PURE__ */ Y(V, { className: "size-3.5" })
|
|
2387
2852
|
});
|
|
2388
2853
|
}
|
|
2389
|
-
function
|
|
2390
|
-
let { marker: i, map: a } =
|
|
2854
|
+
function Br({ children: e, className: t, closeButton: n = !1, ...r }) {
|
|
2855
|
+
let { marker: i, map: a } = Fr(), o = u(() => document.createElement("div"), []), c = d(r), l = u(() => new Ee.Popup({
|
|
2391
2856
|
offset: 16,
|
|
2392
2857
|
...r,
|
|
2393
2858
|
closeButton: !1
|
|
@@ -2400,13 +2865,13 @@ function Cr({ children: e, className: t, closeButton: n = !1, ...r }) {
|
|
|
2400
2865
|
let e = c.current;
|
|
2401
2866
|
e.offset !== r.offset && l.setOffset(r.offset ?? 16), e.maxWidth !== r.maxWidth && r.maxWidth && l.setMaxWidth(r.maxWidth ?? "none"), c.current = r;
|
|
2402
2867
|
}
|
|
2403
|
-
return
|
|
2404
|
-
className:
|
|
2405
|
-
children: [n && /* @__PURE__ */
|
|
2868
|
+
return De(/* @__PURE__ */ X("div", {
|
|
2869
|
+
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),
|
|
2870
|
+
children: [n && /* @__PURE__ */ Y(zr, { onClick: () => l.remove() }), e]
|
|
2406
2871
|
}), o);
|
|
2407
2872
|
}
|
|
2408
|
-
function
|
|
2409
|
-
let { marker: r, map: i } =
|
|
2873
|
+
function Vr({ children: e, className: t, ...n }) {
|
|
2874
|
+
let { marker: r, map: i } = Fr(), a = u(() => document.createElement("div"), []), o = d(n), c = u(() => new Ee.Popup({
|
|
2410
2875
|
offset: 16,
|
|
2411
2876
|
...n,
|
|
2412
2877
|
closeOnClick: !0,
|
|
@@ -2425,43 +2890,43 @@ function wr({ children: e, className: t, ...n }) {
|
|
|
2425
2890
|
let e = o.current;
|
|
2426
2891
|
e.offset !== n.offset && c.setOffset(n.offset ?? 16), e.maxWidth !== n.maxWidth && n.maxWidth && c.setMaxWidth(n.maxWidth ?? "none"), o.current = n;
|
|
2427
2892
|
}
|
|
2428
|
-
return
|
|
2429
|
-
className:
|
|
2893
|
+
return De(/* @__PURE__ */ Y("div", {
|
|
2894
|
+
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),
|
|
2430
2895
|
children: e
|
|
2431
2896
|
}), a);
|
|
2432
2897
|
}
|
|
2433
|
-
function
|
|
2434
|
-
return /* @__PURE__ */
|
|
2435
|
-
className:
|
|
2898
|
+
function Hr({ children: e, className: t, position: n = "top" }) {
|
|
2899
|
+
return /* @__PURE__ */ Y("div", {
|
|
2900
|
+
className: Q("absolute left-1/2 -translate-x-1/2 whitespace-nowrap", "text-foreground text-[10px] font-medium", {
|
|
2436
2901
|
top: "bottom-full mb-1",
|
|
2437
2902
|
bottom: "top-full mt-1"
|
|
2438
2903
|
}[n], t),
|
|
2439
2904
|
children: e
|
|
2440
2905
|
});
|
|
2441
2906
|
}
|
|
2442
|
-
var
|
|
2907
|
+
var Ur = {
|
|
2443
2908
|
"top-left": "top-2 left-2",
|
|
2444
2909
|
"top-right": "top-2 right-2",
|
|
2445
2910
|
"bottom-left": "bottom-2 left-2",
|
|
2446
2911
|
"bottom-right": "bottom-10 right-2"
|
|
2447
2912
|
};
|
|
2448
|
-
function
|
|
2449
|
-
return /* @__PURE__ */
|
|
2913
|
+
function Wr({ children: e }) {
|
|
2914
|
+
return /* @__PURE__ */ Y("div", {
|
|
2450
2915
|
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",
|
|
2451
2916
|
children: e
|
|
2452
2917
|
});
|
|
2453
2918
|
}
|
|
2454
|
-
function
|
|
2455
|
-
return /* @__PURE__ */
|
|
2919
|
+
function Gr({ onClick: e, label: t, children: n, disabled: r = !1 }) {
|
|
2920
|
+
return /* @__PURE__ */ Y("button", {
|
|
2456
2921
|
onClick: e,
|
|
2457
2922
|
"aria-label": t,
|
|
2458
2923
|
type: "button",
|
|
2459
|
-
className:
|
|
2924
|
+
className: Q("flex size-8 items-center justify-center transition-all", "first:rounded-t-md last:rounded-b-md", "hover:bg-accent dark:hover:bg-accent/40", "focus-visible:ring-ring focus-visible:ring-2 focus-visible:outline-none focus-visible:ring-inset", "disabled:pointer-events-none disabled:opacity-50"),
|
|
2460
2925
|
disabled: r,
|
|
2461
2926
|
children: n
|
|
2462
2927
|
});
|
|
2463
2928
|
}
|
|
2464
|
-
function
|
|
2929
|
+
function Kr({ tiles: e, tileIndex: t, onTileChange: n, openLeft: r }) {
|
|
2465
2930
|
let [i, a] = f(!1), o = d(null);
|
|
2466
2931
|
return s(() => {
|
|
2467
2932
|
if (!i) return;
|
|
@@ -2473,32 +2938,32 @@ function kr({ tiles: e, tileIndex: t, onTileChange: n, openLeft: r }) {
|
|
|
2473
2938
|
return document.addEventListener("pointerdown", e), document.addEventListener("keydown", t), () => {
|
|
2474
2939
|
document.removeEventListener("pointerdown", e), document.removeEventListener("keydown", t);
|
|
2475
2940
|
};
|
|
2476
|
-
}, [i]), /* @__PURE__ */
|
|
2941
|
+
}, [i]), /* @__PURE__ */ X("div", {
|
|
2477
2942
|
ref: o,
|
|
2478
2943
|
className: "relative",
|
|
2479
|
-
children: [/* @__PURE__ */
|
|
2944
|
+
children: [/* @__PURE__ */ Y(Wr, { children: /* @__PURE__ */ Y(Gr, {
|
|
2480
2945
|
onClick: () => a((e) => !e),
|
|
2481
2946
|
label: `Basemap: ${e[t]?.label ?? ""}`,
|
|
2482
|
-
children: /* @__PURE__ */
|
|
2483
|
-
}) }), i && /* @__PURE__ */
|
|
2947
|
+
children: /* @__PURE__ */ Y(N, { className: "size-4" })
|
|
2948
|
+
}) }), i && /* @__PURE__ */ Y("div", {
|
|
2484
2949
|
role: "listbox",
|
|
2485
2950
|
"aria-label": "Basemap",
|
|
2486
|
-
className:
|
|
2487
|
-
children: e.map((e, r) => /* @__PURE__ */
|
|
2951
|
+
className: Q("border-border bg-background absolute top-0 z-20 min-w-32 overflow-hidden rounded-md border p-1 shadow-md", r ? "right-9" : "left-9"),
|
|
2952
|
+
children: e.map((e, r) => /* @__PURE__ */ X("button", {
|
|
2488
2953
|
type: "button",
|
|
2489
2954
|
role: "option",
|
|
2490
2955
|
"aria-selected": r === t,
|
|
2491
2956
|
onClick: () => {
|
|
2492
2957
|
n?.(r), a(!1);
|
|
2493
2958
|
},
|
|
2494
|
-
className:
|
|
2495
|
-
children: [e.label, r === t && /* @__PURE__ */
|
|
2959
|
+
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"),
|
|
2960
|
+
children: [e.label, r === t && /* @__PURE__ */ Y(h, { className: "size-3.5 shrink-0" })]
|
|
2496
2961
|
}, e.label))
|
|
2497
2962
|
})]
|
|
2498
2963
|
});
|
|
2499
2964
|
}
|
|
2500
|
-
function
|
|
2501
|
-
let { map: d } =
|
|
2965
|
+
function qr({ 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 }) {
|
|
2966
|
+
let { map: d } = Ar(), [p, m] = f(!1), h = a(() => {
|
|
2502
2967
|
d?.zoomTo(d.getZoom() + 1, { duration: 300 });
|
|
2503
2968
|
}, [d]), g = a(() => {
|
|
2504
2969
|
d?.zoomTo(d.getZoom() - 1, { duration: 300 });
|
|
@@ -2522,41 +2987,41 @@ function Ar({ position: e = "bottom-right", showZoom: t = !0, showCompass: n = !
|
|
|
2522
2987
|
let e = d?.getContainer();
|
|
2523
2988
|
e && (document.fullscreenElement ? document.exitFullscreen() : e.requestFullscreen());
|
|
2524
2989
|
}, [d]);
|
|
2525
|
-
return /* @__PURE__ */
|
|
2526
|
-
className:
|
|
2990
|
+
return /* @__PURE__ */ X("div", {
|
|
2991
|
+
className: Q("absolute z-10 flex flex-col gap-1.5", Ur[e], o),
|
|
2527
2992
|
children: [
|
|
2528
|
-
t && /* @__PURE__ */
|
|
2993
|
+
t && /* @__PURE__ */ X(Wr, { children: [/* @__PURE__ */ Y(Gr, {
|
|
2529
2994
|
onClick: h,
|
|
2530
2995
|
label: "Zoom in",
|
|
2531
|
-
children: /* @__PURE__ */
|
|
2532
|
-
}), /* @__PURE__ */
|
|
2996
|
+
children: /* @__PURE__ */ Y(R, { className: "size-4" })
|
|
2997
|
+
}), /* @__PURE__ */ Y(Gr, {
|
|
2533
2998
|
onClick: g,
|
|
2534
2999
|
label: "Zoom out",
|
|
2535
|
-
children: /* @__PURE__ */
|
|
3000
|
+
children: /* @__PURE__ */ Y(re, { className: "size-4" })
|
|
2536
3001
|
})] }),
|
|
2537
|
-
c.length > 1 && /* @__PURE__ */
|
|
3002
|
+
c.length > 1 && /* @__PURE__ */ Y(Kr, {
|
|
2538
3003
|
tiles: c,
|
|
2539
3004
|
tileIndex: l,
|
|
2540
3005
|
onTileChange: u,
|
|
2541
3006
|
openLeft: e.endsWith("right")
|
|
2542
3007
|
}),
|
|
2543
|
-
n && /* @__PURE__ */
|
|
2544
|
-
r && /* @__PURE__ */
|
|
3008
|
+
n && /* @__PURE__ */ Y(Wr, { children: /* @__PURE__ */ Y(Jr, { onClick: _ }) }),
|
|
3009
|
+
r && /* @__PURE__ */ Y(Wr, { children: /* @__PURE__ */ Y(Gr, {
|
|
2545
3010
|
onClick: v,
|
|
2546
3011
|
label: "Find my location",
|
|
2547
3012
|
disabled: p,
|
|
2548
|
-
children: p ? /* @__PURE__ */
|
|
3013
|
+
children: p ? /* @__PURE__ */ Y(P, { className: "size-4 animate-spin" }) : /* @__PURE__ */ Y(ne, { className: "size-4" })
|
|
2549
3014
|
}) }),
|
|
2550
|
-
i && /* @__PURE__ */
|
|
3015
|
+
i && /* @__PURE__ */ Y(Wr, { children: /* @__PURE__ */ Y(Gr, {
|
|
2551
3016
|
onClick: y,
|
|
2552
3017
|
label: "Toggle fullscreen",
|
|
2553
|
-
children: /* @__PURE__ */
|
|
3018
|
+
children: /* @__PURE__ */ Y(I, { className: "size-4" })
|
|
2554
3019
|
}) })
|
|
2555
3020
|
]
|
|
2556
3021
|
});
|
|
2557
3022
|
}
|
|
2558
|
-
function
|
|
2559
|
-
let { map: t } =
|
|
3023
|
+
function Jr({ onClick: e }) {
|
|
3024
|
+
let { map: t } = Ar(), n = d(null);
|
|
2560
3025
|
return s(() => {
|
|
2561
3026
|
if (!t || !n.current) return;
|
|
2562
3027
|
let e = n.current, r = () => {
|
|
@@ -2566,28 +3031,28 @@ function jr({ onClick: e }) {
|
|
|
2566
3031
|
return t.on("rotate", r), t.on("pitch", r), r(), () => {
|
|
2567
3032
|
t.off("rotate", r), t.off("pitch", r);
|
|
2568
3033
|
};
|
|
2569
|
-
}, [t]), /* @__PURE__ */
|
|
3034
|
+
}, [t]), /* @__PURE__ */ Y(Gr, {
|
|
2570
3035
|
onClick: e,
|
|
2571
3036
|
label: "Reset bearing to north",
|
|
2572
|
-
children: /* @__PURE__ */
|
|
3037
|
+
children: /* @__PURE__ */ X("svg", {
|
|
2573
3038
|
ref: n,
|
|
2574
3039
|
viewBox: "0 0 24 24",
|
|
2575
3040
|
className: "size-5 transition-transform duration-200",
|
|
2576
3041
|
style: { transformStyle: "preserve-3d" },
|
|
2577
3042
|
children: [
|
|
2578
|
-
/* @__PURE__ */
|
|
3043
|
+
/* @__PURE__ */ Y("path", {
|
|
2579
3044
|
d: "M12 2L16 12H12V2Z",
|
|
2580
3045
|
className: "fill-red-500"
|
|
2581
3046
|
}),
|
|
2582
|
-
/* @__PURE__ */
|
|
3047
|
+
/* @__PURE__ */ Y("path", {
|
|
2583
3048
|
d: "M12 2L8 12H12V2Z",
|
|
2584
3049
|
className: "fill-red-300"
|
|
2585
3050
|
}),
|
|
2586
|
-
/* @__PURE__ */
|
|
3051
|
+
/* @__PURE__ */ Y("path", {
|
|
2587
3052
|
d: "M12 22L16 12H12V22Z",
|
|
2588
3053
|
className: "fill-muted-foreground/60"
|
|
2589
3054
|
}),
|
|
2590
|
-
/* @__PURE__ */
|
|
3055
|
+
/* @__PURE__ */ Y("path", {
|
|
2591
3056
|
d: "M12 22L8 12H12V22Z",
|
|
2592
3057
|
className: "fill-muted-foreground/30"
|
|
2593
3058
|
})
|
|
@@ -2595,10 +3060,10 @@ function jr({ onClick: e }) {
|
|
|
2595
3060
|
})
|
|
2596
3061
|
});
|
|
2597
3062
|
}
|
|
2598
|
-
function
|
|
2599
|
-
let { map: c } =
|
|
3063
|
+
function Yr({ longitude: e, latitude: t, onClose: n, children: r, className: i, closeButton: a = !1, ...o }) {
|
|
3064
|
+
let { map: c } = Ar(), l = d(o), f = d(n);
|
|
2600
3065
|
f.current = n;
|
|
2601
|
-
let p = u(() => document.createElement("div"), []), m = u(() => new
|
|
3066
|
+
let p = u(() => document.createElement("div"), []), m = u(() => new Ee.Popup({
|
|
2602
3067
|
offset: 16,
|
|
2603
3068
|
...o,
|
|
2604
3069
|
closeButton: !1
|
|
@@ -2613,15 +3078,15 @@ function Mr({ longitude: e, latitude: t, onClose: n, children: r, className: i,
|
|
|
2613
3078
|
let n = l.current;
|
|
2614
3079
|
(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;
|
|
2615
3080
|
}
|
|
2616
|
-
return
|
|
2617
|
-
className:
|
|
2618
|
-
children: [a && /* @__PURE__ */
|
|
3081
|
+
return De(/* @__PURE__ */ X("div", {
|
|
3082
|
+
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),
|
|
3083
|
+
children: [a && /* @__PURE__ */ Y(zr, { onClick: () => {
|
|
2619
3084
|
m.remove();
|
|
2620
3085
|
} }), r]
|
|
2621
3086
|
}), p);
|
|
2622
3087
|
}
|
|
2623
|
-
function
|
|
2624
|
-
let { map: f, isLoaded: p } =
|
|
3088
|
+
function Xr({ id: e, coordinates: t, color: n = "#4285F4", width: r = 3, opacity: i = .8, dashArray: a, onClick: o, onMouseEnter: l, onMouseLeave: u, interactive: d = !0 }) {
|
|
3089
|
+
let { map: f, isLoaded: p } = Ar(), m = c(), h = e ?? m, g = `route-source-${h}`, _ = `route-layer-${h}`;
|
|
2625
3090
|
return s(() => {
|
|
2626
3091
|
if (!(!p || !f)) return f.addSource(g, {
|
|
2627
3092
|
type: "geojson",
|
|
@@ -2700,15 +3165,15 @@ function Nr({ id: e, coordinates: t, color: n = "#4285F4", width: r = 3, opacity
|
|
|
2700
3165
|
d
|
|
2701
3166
|
]), null;
|
|
2702
3167
|
}
|
|
2703
|
-
var
|
|
3168
|
+
var Zr = .2, Qr = 64, $r = 12, ei = 6, ti = {
|
|
2704
3169
|
"line-color": "#4285F4",
|
|
2705
3170
|
"line-width": 2,
|
|
2706
3171
|
"line-opacity": .85
|
|
2707
|
-
},
|
|
3172
|
+
}, ni = {
|
|
2708
3173
|
"line-join": "round",
|
|
2709
3174
|
"line-cap": "round"
|
|
2710
3175
|
};
|
|
2711
|
-
function
|
|
3176
|
+
function ri(e, t) {
|
|
2712
3177
|
if (!t) return e;
|
|
2713
3178
|
let n = { ...e };
|
|
2714
3179
|
for (let [e, r] of Object.entries(t)) {
|
|
@@ -2727,7 +3192,7 @@ function Br(e, t) {
|
|
|
2727
3192
|
}
|
|
2728
3193
|
return n;
|
|
2729
3194
|
}
|
|
2730
|
-
function
|
|
3195
|
+
function ii(e, t, n, r) {
|
|
2731
3196
|
let [i, a] = e, [o, s] = t, c = o - i, l = s - a, u = Math.hypot(c, l);
|
|
2732
3197
|
if (u === 0 || n === 0) return [e, t];
|
|
2733
3198
|
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));
|
|
@@ -2737,16 +3202,16 @@ function Vr(e, t, n, r) {
|
|
|
2737
3202
|
}
|
|
2738
3203
|
return v;
|
|
2739
3204
|
}
|
|
2740
|
-
function
|
|
2741
|
-
let { map: h, isLoaded: g } =
|
|
2742
|
-
...
|
|
3205
|
+
function ai({ data: e, id: t, curvature: n = Zr, samples: r = Qr, paint: i, layout: a, hoverPaint: o, onClick: l, onHover: f, interactive: p = !0, beforeId: m }) {
|
|
3206
|
+
let { map: h, isLoaded: g } = Ar(), _ = c(), v = t ?? _, y = `arc-source-${v}`, b = `arc-layer-${v}`, x = `arc-hit-layer-${v}`, S = u(() => ri({
|
|
3207
|
+
...ti,
|
|
2743
3208
|
...i
|
|
2744
3209
|
}, o), [i, o]), C = u(() => ({
|
|
2745
|
-
...
|
|
3210
|
+
...ni,
|
|
2746
3211
|
...a
|
|
2747
3212
|
}), [a]), w = u(() => {
|
|
2748
|
-
let e = i?.["line-width"] ??
|
|
2749
|
-
return Math.max((typeof e == "number" ? e :
|
|
3213
|
+
let e = i?.["line-width"] ?? ti["line-width"];
|
|
3214
|
+
return Math.max((typeof e == "number" ? e : $r) + ei, $r);
|
|
2750
3215
|
}, [i]), T = u(() => ({
|
|
2751
3216
|
type: "FeatureCollection",
|
|
2752
3217
|
features: e.map((e) => {
|
|
@@ -2756,7 +3221,7 @@ function Hr({ data: e, id: t, curvature: n = Pr, samples: r = Fr, paint: i, layo
|
|
|
2756
3221
|
properties: a,
|
|
2757
3222
|
geometry: {
|
|
2758
3223
|
type: "LineString",
|
|
2759
|
-
coordinates:
|
|
3224
|
+
coordinates: ii(t, i, n, r)
|
|
2760
3225
|
}
|
|
2761
3226
|
};
|
|
2762
3227
|
})
|
|
@@ -2782,7 +3247,7 @@ function Hr({ data: e, id: t, curvature: n = Pr, samples: r = Fr, paint: i, layo
|
|
|
2782
3247
|
id: x,
|
|
2783
3248
|
type: "line",
|
|
2784
3249
|
source: y,
|
|
2785
|
-
layout:
|
|
3250
|
+
layout: ni,
|
|
2786
3251
|
paint: {
|
|
2787
3252
|
"line-color": "rgba(0, 0, 0, 0)",
|
|
2788
3253
|
"line-width": w,
|
|
@@ -2865,12 +3330,12 @@ function Hr({ data: e, id: t, curvature: n = Pr, samples: r = Fr, paint: i, layo
|
|
|
2865
3330
|
p
|
|
2866
3331
|
]), null;
|
|
2867
3332
|
}
|
|
2868
|
-
function
|
|
3333
|
+
function oi({ data: e, clusterMaxZoom: t = 14, clusterRadius: n = 50, clusterColors: r = [
|
|
2869
3334
|
"#22c55e",
|
|
2870
3335
|
"#eab308",
|
|
2871
3336
|
"#ef4444"
|
|
2872
3337
|
], clusterThresholds: i = [100, 750], pointColor: a = "#3b82f6", onPointClick: o, onClusterClick: l }) {
|
|
2873
|
-
let { map: u, isLoaded: f } =
|
|
3338
|
+
let { map: u, isLoaded: f } = Ar(), p = c(), m = `cluster-source-${p}`, h = `clusters-${p}`, g = `cluster-count-${p}`, _ = `unclustered-point-${p}`, v = d({
|
|
2874
3339
|
clusterColors: r,
|
|
2875
3340
|
clusterThresholds: i,
|
|
2876
3341
|
pointColor: a
|
|
@@ -3025,12 +3490,12 @@ function Ur({ data: e, clusterMaxZoom: t = 14, clusterRadius: n = 50, clusterCol
|
|
|
3025
3490
|
}
|
|
3026
3491
|
//#endregion
|
|
3027
3492
|
//#region src/components/ui/progress.tsx
|
|
3028
|
-
function
|
|
3029
|
-
return /* @__PURE__ */
|
|
3493
|
+
function si({ className: e, value: t, ...n }) {
|
|
3494
|
+
return /* @__PURE__ */ Y(me.Root, {
|
|
3030
3495
|
"data-slot": "progress",
|
|
3031
|
-
className:
|
|
3496
|
+
className: Q("relative flex h-1 w-full items-center overflow-x-hidden rounded-full bg-muted", e),
|
|
3032
3497
|
...n,
|
|
3033
|
-
children: /* @__PURE__ */
|
|
3498
|
+
children: /* @__PURE__ */ Y(me.Indicator, {
|
|
3034
3499
|
"data-slot": "progress-indicator",
|
|
3035
3500
|
className: "size-full flex-1 bg-primary transition-all",
|
|
3036
3501
|
style: { transform: `translateX(-${100 - (t || 0)}%)` }
|
|
@@ -3039,165 +3504,165 @@ function Wr({ className: e, value: t, ...n }) {
|
|
|
3039
3504
|
}
|
|
3040
3505
|
//#endregion
|
|
3041
3506
|
//#region src/components/ui/radio-group.tsx
|
|
3042
|
-
function
|
|
3043
|
-
return /* @__PURE__ */
|
|
3507
|
+
function ci({ className: e, ...t }) {
|
|
3508
|
+
return /* @__PURE__ */ Y(he.Root, {
|
|
3044
3509
|
"data-slot": "radio-group",
|
|
3045
|
-
className:
|
|
3510
|
+
className: Q("grid w-full gap-2", e),
|
|
3046
3511
|
...t
|
|
3047
3512
|
});
|
|
3048
3513
|
}
|
|
3049
|
-
function
|
|
3050
|
-
return /* @__PURE__ */
|
|
3514
|
+
function li({ className: e, ...t }) {
|
|
3515
|
+
return /* @__PURE__ */ Y(he.Item, {
|
|
3051
3516
|
"data-slot": "radio-group-item",
|
|
3052
|
-
className:
|
|
3517
|
+
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),
|
|
3053
3518
|
...t,
|
|
3054
|
-
children: /* @__PURE__ */
|
|
3519
|
+
children: /* @__PURE__ */ Y(he.Indicator, {
|
|
3055
3520
|
"data-slot": "radio-group-indicator",
|
|
3056
3521
|
className: "flex size-4 items-center justify-center",
|
|
3057
|
-
children: /* @__PURE__ */
|
|
3522
|
+
children: /* @__PURE__ */ Y("span", { className: "absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 rounded-full bg-primary-foreground" })
|
|
3058
3523
|
})
|
|
3059
3524
|
});
|
|
3060
3525
|
}
|
|
3061
3526
|
//#endregion
|
|
3062
3527
|
//#region src/components/ui/select.tsx
|
|
3063
|
-
function
|
|
3064
|
-
return /* @__PURE__ */
|
|
3528
|
+
function ui({ ...e }) {
|
|
3529
|
+
return /* @__PURE__ */ Y(K.Root, {
|
|
3065
3530
|
"data-slot": "select",
|
|
3066
3531
|
...e
|
|
3067
3532
|
});
|
|
3068
3533
|
}
|
|
3069
|
-
function
|
|
3070
|
-
return /* @__PURE__ */
|
|
3534
|
+
function di({ className: e, ...t }) {
|
|
3535
|
+
return /* @__PURE__ */ Y(K.Group, {
|
|
3071
3536
|
"data-slot": "select-group",
|
|
3072
|
-
className:
|
|
3537
|
+
className: Q("scroll-my-1 p-1", e),
|
|
3073
3538
|
...t
|
|
3074
3539
|
});
|
|
3075
3540
|
}
|
|
3076
|
-
function
|
|
3077
|
-
return /* @__PURE__ */
|
|
3541
|
+
function fi({ ...e }) {
|
|
3542
|
+
return /* @__PURE__ */ Y(K.Value, {
|
|
3078
3543
|
"data-slot": "select-value",
|
|
3079
3544
|
...e
|
|
3080
3545
|
});
|
|
3081
3546
|
}
|
|
3082
|
-
function
|
|
3083
|
-
return /* @__PURE__ */
|
|
3547
|
+
function pi({ className: e, size: t = "default", children: n, ...r }) {
|
|
3548
|
+
return /* @__PURE__ */ X(K.Trigger, {
|
|
3084
3549
|
"data-slot": "select-trigger",
|
|
3085
3550
|
"data-size": t,
|
|
3086
|
-
className:
|
|
3551
|
+
className: Q("flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none 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 data-placeholder:text-muted-foreground data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 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", e),
|
|
3087
3552
|
...r,
|
|
3088
|
-
children: [n, /* @__PURE__ */
|
|
3553
|
+
children: [n, /* @__PURE__ */ Y(K.Icon, {
|
|
3089
3554
|
asChild: !0,
|
|
3090
|
-
children: /* @__PURE__ */
|
|
3555
|
+
children: /* @__PURE__ */ Y(v, { className: "pointer-events-none size-4 text-muted-foreground" })
|
|
3091
3556
|
})]
|
|
3092
3557
|
});
|
|
3093
3558
|
}
|
|
3094
|
-
function
|
|
3095
|
-
return /* @__PURE__ */
|
|
3559
|
+
function mi({ className: e, children: t, position: n = "item-aligned", align: r = "center", ...i }) {
|
|
3560
|
+
return /* @__PURE__ */ Y(K.Portal, { children: /* @__PURE__ */ X(K.Content, {
|
|
3096
3561
|
"data-slot": "select-content",
|
|
3097
3562
|
"data-align-trigger": n === "item-aligned",
|
|
3098
|
-
className:
|
|
3563
|
+
className: Q("relative z-50 max-h-(--radix-select-content-available-height) min-w-36 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none 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", n === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", e),
|
|
3099
3564
|
position: n,
|
|
3100
3565
|
align: r,
|
|
3101
3566
|
...i,
|
|
3102
3567
|
children: [
|
|
3103
|
-
/* @__PURE__ */
|
|
3104
|
-
/* @__PURE__ */
|
|
3568
|
+
/* @__PURE__ */ Y(vi, {}),
|
|
3569
|
+
/* @__PURE__ */ Y(K.Viewport, {
|
|
3105
3570
|
"data-position": n,
|
|
3106
|
-
className:
|
|
3571
|
+
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" && ""),
|
|
3107
3572
|
children: t
|
|
3108
3573
|
}),
|
|
3109
|
-
/* @__PURE__ */
|
|
3574
|
+
/* @__PURE__ */ Y(yi, {})
|
|
3110
3575
|
]
|
|
3111
3576
|
}) });
|
|
3112
3577
|
}
|
|
3113
|
-
function
|
|
3114
|
-
return /* @__PURE__ */
|
|
3578
|
+
function hi({ className: e, ...t }) {
|
|
3579
|
+
return /* @__PURE__ */ Y(K.Label, {
|
|
3115
3580
|
"data-slot": "select-label",
|
|
3116
|
-
className:
|
|
3581
|
+
className: Q("px-1.5 py-1 text-xs text-muted-foreground", e),
|
|
3117
3582
|
...t
|
|
3118
3583
|
});
|
|
3119
3584
|
}
|
|
3120
|
-
function
|
|
3121
|
-
return /* @__PURE__ */
|
|
3585
|
+
function gi({ className: e, children: t, ...n }) {
|
|
3586
|
+
return /* @__PURE__ */ X(K.Item, {
|
|
3122
3587
|
"data-slot": "select-item",
|
|
3123
|
-
className:
|
|
3588
|
+
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),
|
|
3124
3589
|
...n,
|
|
3125
|
-
children: [/* @__PURE__ */
|
|
3590
|
+
children: [/* @__PURE__ */ Y("span", {
|
|
3126
3591
|
className: "pointer-events-none absolute right-2 flex size-4 items-center justify-center",
|
|
3127
|
-
children: /* @__PURE__ */
|
|
3128
|
-
}), /* @__PURE__ */
|
|
3592
|
+
children: /* @__PURE__ */ Y(K.ItemIndicator, { children: /* @__PURE__ */ Y(g, { className: "pointer-events-none" }) })
|
|
3593
|
+
}), /* @__PURE__ */ Y(K.ItemText, { children: t })]
|
|
3129
3594
|
});
|
|
3130
3595
|
}
|
|
3131
|
-
function
|
|
3132
|
-
return /* @__PURE__ */
|
|
3596
|
+
function _i({ className: e, ...t }) {
|
|
3597
|
+
return /* @__PURE__ */ Y(K.Separator, {
|
|
3133
3598
|
"data-slot": "select-separator",
|
|
3134
|
-
className:
|
|
3599
|
+
className: Q("pointer-events-none -mx-1 my-1 h-px bg-border", e),
|
|
3135
3600
|
...t
|
|
3136
3601
|
});
|
|
3137
3602
|
}
|
|
3138
|
-
function
|
|
3139
|
-
return /* @__PURE__ */
|
|
3603
|
+
function vi({ className: e, ...t }) {
|
|
3604
|
+
return /* @__PURE__ */ Y(K.ScrollUpButton, {
|
|
3140
3605
|
"data-slot": "select-scroll-up-button",
|
|
3141
|
-
className:
|
|
3606
|
+
className: Q("z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4", e),
|
|
3142
3607
|
...t,
|
|
3143
|
-
children: /* @__PURE__ */
|
|
3608
|
+
children: /* @__PURE__ */ Y(x, {})
|
|
3144
3609
|
});
|
|
3145
3610
|
}
|
|
3146
|
-
function
|
|
3147
|
-
return /* @__PURE__ */
|
|
3611
|
+
function yi({ className: e, ...t }) {
|
|
3612
|
+
return /* @__PURE__ */ Y(K.ScrollDownButton, {
|
|
3148
3613
|
"data-slot": "select-scroll-down-button",
|
|
3149
|
-
className:
|
|
3614
|
+
className: Q("z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4", e),
|
|
3150
3615
|
...t,
|
|
3151
|
-
children: /* @__PURE__ */
|
|
3616
|
+
children: /* @__PURE__ */ Y(v, {})
|
|
3152
3617
|
});
|
|
3153
3618
|
}
|
|
3154
3619
|
//#endregion
|
|
3155
3620
|
//#region src/components/ui/sheet.tsx
|
|
3156
|
-
function
|
|
3157
|
-
return /* @__PURE__ */
|
|
3621
|
+
function bi({ ...e }) {
|
|
3622
|
+
return /* @__PURE__ */ Y(W.Root, {
|
|
3158
3623
|
"data-slot": "sheet",
|
|
3159
3624
|
...e
|
|
3160
3625
|
});
|
|
3161
3626
|
}
|
|
3162
|
-
function
|
|
3163
|
-
return /* @__PURE__ */
|
|
3627
|
+
function xi({ ...e }) {
|
|
3628
|
+
return /* @__PURE__ */ Y(W.Trigger, {
|
|
3164
3629
|
"data-slot": "sheet-trigger",
|
|
3165
3630
|
...e
|
|
3166
3631
|
});
|
|
3167
3632
|
}
|
|
3168
|
-
function
|
|
3169
|
-
return /* @__PURE__ */
|
|
3633
|
+
function Si({ ...e }) {
|
|
3634
|
+
return /* @__PURE__ */ Y(W.Close, {
|
|
3170
3635
|
"data-slot": "sheet-close",
|
|
3171
3636
|
...e
|
|
3172
3637
|
});
|
|
3173
3638
|
}
|
|
3174
|
-
function
|
|
3175
|
-
return /* @__PURE__ */
|
|
3639
|
+
function Ci({ ...e }) {
|
|
3640
|
+
return /* @__PURE__ */ Y(W.Portal, {
|
|
3176
3641
|
"data-slot": "sheet-portal",
|
|
3177
3642
|
...e
|
|
3178
3643
|
});
|
|
3179
3644
|
}
|
|
3180
|
-
function
|
|
3181
|
-
return /* @__PURE__ */
|
|
3645
|
+
function wi({ className: e, ...t }) {
|
|
3646
|
+
return /* @__PURE__ */ Y(W.Overlay, {
|
|
3182
3647
|
"data-slot": "sheet-overlay",
|
|
3183
|
-
className:
|
|
3648
|
+
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),
|
|
3184
3649
|
...t
|
|
3185
3650
|
});
|
|
3186
3651
|
}
|
|
3187
|
-
function
|
|
3188
|
-
return /* @__PURE__ */
|
|
3652
|
+
function Ti({ className: e, children: t, side: n = "right", showCloseButton: r = !0, ...i }) {
|
|
3653
|
+
return /* @__PURE__ */ X(Ci, { children: [/* @__PURE__ */ Y(wi, {}), /* @__PURE__ */ X(W.Content, {
|
|
3189
3654
|
"data-slot": "sheet-content",
|
|
3190
3655
|
"data-side": n,
|
|
3191
|
-
className:
|
|
3656
|
+
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),
|
|
3192
3657
|
...i,
|
|
3193
|
-
children: [t, r && /* @__PURE__ */
|
|
3658
|
+
children: [t, r && /* @__PURE__ */ Y(W.Close, {
|
|
3194
3659
|
"data-slot": "sheet-close",
|
|
3195
3660
|
asChild: !0,
|
|
3196
|
-
children: /* @__PURE__ */
|
|
3661
|
+
children: /* @__PURE__ */ X($, {
|
|
3197
3662
|
variant: "ghost",
|
|
3198
3663
|
className: "absolute top-3 right-3",
|
|
3199
3664
|
size: "icon-sm",
|
|
3200
|
-
children: [/* @__PURE__ */
|
|
3665
|
+
children: [/* @__PURE__ */ Y(le, {}), /* @__PURE__ */ Y("span", {
|
|
3201
3666
|
className: "sr-only",
|
|
3202
3667
|
children: "Close"
|
|
3203
3668
|
})]
|
|
@@ -3205,59 +3670,59 @@ function ci({ className: e, children: t, side: n = "right", showCloseButton: r =
|
|
|
3205
3670
|
})]
|
|
3206
3671
|
})] });
|
|
3207
3672
|
}
|
|
3208
|
-
function
|
|
3209
|
-
return /* @__PURE__ */
|
|
3673
|
+
function Ei({ className: e, ...t }) {
|
|
3674
|
+
return /* @__PURE__ */ Y("div", {
|
|
3210
3675
|
"data-slot": "sheet-header",
|
|
3211
|
-
className:
|
|
3676
|
+
className: Q("flex flex-col gap-0.5 p-4", e),
|
|
3212
3677
|
...t
|
|
3213
3678
|
});
|
|
3214
3679
|
}
|
|
3215
|
-
function
|
|
3216
|
-
return /* @__PURE__ */
|
|
3680
|
+
function Di({ className: e, ...t }) {
|
|
3681
|
+
return /* @__PURE__ */ Y("div", {
|
|
3217
3682
|
"data-slot": "sheet-footer",
|
|
3218
|
-
className:
|
|
3683
|
+
className: Q("mt-auto flex flex-col gap-2 p-4", e),
|
|
3219
3684
|
...t
|
|
3220
3685
|
});
|
|
3221
3686
|
}
|
|
3222
|
-
function
|
|
3223
|
-
return /* @__PURE__ */
|
|
3687
|
+
function Oi({ className: e, ...t }) {
|
|
3688
|
+
return /* @__PURE__ */ Y(W.Title, {
|
|
3224
3689
|
"data-slot": "sheet-title",
|
|
3225
|
-
className:
|
|
3690
|
+
className: Q("text-base font-medium text-foreground", e),
|
|
3226
3691
|
...t
|
|
3227
3692
|
});
|
|
3228
3693
|
}
|
|
3229
|
-
function
|
|
3230
|
-
return /* @__PURE__ */
|
|
3694
|
+
function ki({ className: e, ...t }) {
|
|
3695
|
+
return /* @__PURE__ */ Y(W.Description, {
|
|
3231
3696
|
"data-slot": "sheet-description",
|
|
3232
|
-
className:
|
|
3697
|
+
className: Q("text-sm text-muted-foreground", e),
|
|
3233
3698
|
...t
|
|
3234
3699
|
});
|
|
3235
3700
|
}
|
|
3236
3701
|
//#endregion
|
|
3237
3702
|
//#region src/components/ui/slider.tsx
|
|
3238
|
-
function
|
|
3703
|
+
function Ai({ className: e, defaultValue: t, value: r, min: i = 0, max: a = 100, ...o }) {
|
|
3239
3704
|
let s = n.useMemo(() => Array.isArray(r) ? r : Array.isArray(t) ? t : [i, a], [
|
|
3240
3705
|
r,
|
|
3241
3706
|
t,
|
|
3242
3707
|
i,
|
|
3243
3708
|
a
|
|
3244
3709
|
]);
|
|
3245
|
-
return /* @__PURE__ */
|
|
3710
|
+
return /* @__PURE__ */ X(_e.Root, {
|
|
3246
3711
|
"data-slot": "slider",
|
|
3247
3712
|
defaultValue: t,
|
|
3248
3713
|
value: r,
|
|
3249
3714
|
min: i,
|
|
3250
3715
|
max: a,
|
|
3251
|
-
className:
|
|
3716
|
+
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),
|
|
3252
3717
|
...o,
|
|
3253
|
-
children: [/* @__PURE__ */
|
|
3718
|
+
children: [/* @__PURE__ */ Y(_e.Track, {
|
|
3254
3719
|
"data-slot": "slider-track",
|
|
3255
3720
|
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",
|
|
3256
|
-
children: /* @__PURE__ */
|
|
3721
|
+
children: /* @__PURE__ */ Y(_e.Range, {
|
|
3257
3722
|
"data-slot": "slider-range",
|
|
3258
3723
|
className: "absolute bg-primary select-none data-horizontal:h-full data-vertical:w-full"
|
|
3259
3724
|
})
|
|
3260
|
-
}), Array.from({ length: s.length }, (e, t) => /* @__PURE__ */
|
|
3725
|
+
}), Array.from({ length: s.length }, (e, t) => /* @__PURE__ */ Y(_e.Thumb, {
|
|
3261
3726
|
"data-slot": "slider-thumb",
|
|
3262
3727
|
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"
|
|
3263
3728
|
}, t))]
|
|
@@ -3265,17 +3730,17 @@ function pi({ className: e, defaultValue: t, value: r, min: i = 0, max: a = 100,
|
|
|
3265
3730
|
}
|
|
3266
3731
|
//#endregion
|
|
3267
3732
|
//#region src/components/ui/sonner.tsx
|
|
3268
|
-
var
|
|
3269
|
-
let { theme: t = "system" } =
|
|
3270
|
-
return /* @__PURE__ */
|
|
3733
|
+
var ji = ({ ...e }) => {
|
|
3734
|
+
let { theme: t = "system" } = Oe();
|
|
3735
|
+
return /* @__PURE__ */ Y(ke, {
|
|
3271
3736
|
theme: t,
|
|
3272
3737
|
className: "toaster group",
|
|
3273
3738
|
icons: {
|
|
3274
|
-
success: /* @__PURE__ */
|
|
3275
|
-
info: /* @__PURE__ */
|
|
3276
|
-
warning: /* @__PURE__ */
|
|
3277
|
-
error: /* @__PURE__ */
|
|
3278
|
-
loading: /* @__PURE__ */
|
|
3739
|
+
success: /* @__PURE__ */ Y(S, { className: "size-4" }),
|
|
3740
|
+
info: /* @__PURE__ */ Y(M, { className: "size-4" }),
|
|
3741
|
+
warning: /* @__PURE__ */ Y(se, { className: "size-4" }),
|
|
3742
|
+
error: /* @__PURE__ */ Y(ie, { className: "size-4" }),
|
|
3743
|
+
loading: /* @__PURE__ */ Y(F, { className: "size-4 animate-spin" })
|
|
3279
3744
|
},
|
|
3280
3745
|
style: {
|
|
3281
3746
|
"--normal-bg": "var(--popover)",
|
|
@@ -3286,44 +3751,44 @@ var mi = ({ ...e }) => {
|
|
|
3286
3751
|
toastOptions: { classNames: { toast: "cn-toast" } },
|
|
3287
3752
|
...e
|
|
3288
3753
|
});
|
|
3289
|
-
},
|
|
3290
|
-
let e = o(
|
|
3754
|
+
}, Mi = r(void 0), Ni = r(void 0), Pi = () => {
|
|
3755
|
+
let e = o(Mi);
|
|
3291
3756
|
if (!e) throw Error("useStepper must be used within a Stepper");
|
|
3292
3757
|
return e;
|
|
3293
|
-
},
|
|
3294
|
-
let e = o(
|
|
3758
|
+
}, Fi = () => {
|
|
3759
|
+
let e = o(Ni);
|
|
3295
3760
|
if (!e) throw Error("useStepItem must be used within a StepperItem");
|
|
3296
3761
|
return e;
|
|
3297
3762
|
};
|
|
3298
|
-
function
|
|
3763
|
+
function Ii({ defaultValue: e = 0, value: t, onValueChange: r, orientation: i = "horizontal", className: a, ...o }) {
|
|
3299
3764
|
let [s, c] = n.useState(e), l = n.useCallback((e) => {
|
|
3300
3765
|
t === void 0 && c(e), r?.(e);
|
|
3301
3766
|
}, [t, r]), u = t ?? s;
|
|
3302
|
-
return /* @__PURE__ */
|
|
3767
|
+
return /* @__PURE__ */ Y(Mi.Provider, {
|
|
3303
3768
|
value: {
|
|
3304
3769
|
activeStep: u,
|
|
3305
3770
|
orientation: i,
|
|
3306
3771
|
setActiveStep: l
|
|
3307
3772
|
},
|
|
3308
|
-
children: /* @__PURE__ */
|
|
3309
|
-
className:
|
|
3773
|
+
children: /* @__PURE__ */ Y("div", {
|
|
3774
|
+
className: Q("group/stepper inline-flex data-[orientation=horizontal]:w-full data-[orientation=horizontal]:flex-row data-[orientation=vertical]:flex-col", a),
|
|
3310
3775
|
"data-orientation": i,
|
|
3311
3776
|
"data-slot": "stepper",
|
|
3312
3777
|
...o
|
|
3313
3778
|
})
|
|
3314
3779
|
});
|
|
3315
3780
|
}
|
|
3316
|
-
function
|
|
3317
|
-
let { activeStep: s } =
|
|
3318
|
-
return /* @__PURE__ */
|
|
3781
|
+
function Li({ step: e, completed: t = !1, disabled: n = !1, loading: r = !1, className: i, children: a, ...o }) {
|
|
3782
|
+
let { activeStep: s } = Pi(), c = t || e < s ? "completed" : s === e ? "active" : "inactive", l = r && e === s;
|
|
3783
|
+
return /* @__PURE__ */ Y(Ni.Provider, {
|
|
3319
3784
|
value: {
|
|
3320
3785
|
isDisabled: n,
|
|
3321
3786
|
isLoading: l,
|
|
3322
3787
|
state: c,
|
|
3323
3788
|
step: e
|
|
3324
3789
|
},
|
|
3325
|
-
children: /* @__PURE__ */
|
|
3326
|
-
className:
|
|
3790
|
+
children: /* @__PURE__ */ Y("div", {
|
|
3791
|
+
className: Q("group/step flex items-center group-data-[orientation=horizontal]/stepper:flex-row group-data-[orientation=vertical]/stepper:flex-col", i),
|
|
3327
3792
|
"data-slot": "stepper-item",
|
|
3328
3793
|
"data-state": c,
|
|
3329
3794
|
...l ? { "data-loading": !0 } : {},
|
|
@@ -3332,14 +3797,14 @@ function bi({ step: e, completed: t = !1, disabled: n = !1, loading: r = !1, cla
|
|
|
3332
3797
|
})
|
|
3333
3798
|
});
|
|
3334
3799
|
}
|
|
3335
|
-
function
|
|
3336
|
-
let { setActiveStep: i } =
|
|
3337
|
-
return e ? /* @__PURE__ */
|
|
3800
|
+
function Ri({ asChild: e = !1, className: t, children: n, ...r }) {
|
|
3801
|
+
let { setActiveStep: i } = Pi(), { step: a, isDisabled: o } = Fi();
|
|
3802
|
+
return e ? /* @__PURE__ */ Y(e ? ve.Root : "span", {
|
|
3338
3803
|
className: t,
|
|
3339
3804
|
"data-slot": "stepper-trigger",
|
|
3340
3805
|
children: n
|
|
3341
|
-
}) : /* @__PURE__ */
|
|
3342
|
-
className:
|
|
3806
|
+
}) : /* @__PURE__ */ Y("button", {
|
|
3807
|
+
className: Q("inline-flex items-center gap-3 rounded-full outline-none focus-visible:z-10 focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50", t),
|
|
3343
3808
|
"data-slot": "stepper-trigger",
|
|
3344
3809
|
disabled: o,
|
|
3345
3810
|
onClick: () => i(a),
|
|
@@ -3348,26 +3813,26 @@ function xi({ asChild: e = !1, className: t, children: n, ...r }) {
|
|
|
3348
3813
|
children: n
|
|
3349
3814
|
});
|
|
3350
3815
|
}
|
|
3351
|
-
function
|
|
3352
|
-
let { state: i, step: a, isLoading: o } =
|
|
3353
|
-
return /* @__PURE__ */
|
|
3354
|
-
className:
|
|
3816
|
+
function zi({ asChild: e = !1, className: t, children: n, ...r }) {
|
|
3817
|
+
let { state: i, step: a, isLoading: o } = Fi();
|
|
3818
|
+
return /* @__PURE__ */ Y("span", {
|
|
3819
|
+
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),
|
|
3355
3820
|
"data-slot": "stepper-indicator",
|
|
3356
3821
|
"data-state": i,
|
|
3357
3822
|
...r,
|
|
3358
|
-
children: e ? n : /* @__PURE__ */
|
|
3359
|
-
/* @__PURE__ */
|
|
3823
|
+
children: e ? n : /* @__PURE__ */ X(Se, { children: [
|
|
3824
|
+
/* @__PURE__ */ Y("span", {
|
|
3360
3825
|
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",
|
|
3361
3826
|
children: a
|
|
3362
3827
|
}),
|
|
3363
|
-
/* @__PURE__ */
|
|
3828
|
+
/* @__PURE__ */ Y(g, {
|
|
3364
3829
|
"aria-hidden": "true",
|
|
3365
3830
|
className: "absolute scale-0 opacity-0 transition-all group-data-[state=completed]/step:scale-100 group-data-[state=completed]/step:opacity-100",
|
|
3366
3831
|
size: 16
|
|
3367
3832
|
}),
|
|
3368
|
-
o && /* @__PURE__ */
|
|
3833
|
+
o && /* @__PURE__ */ Y("span", {
|
|
3369
3834
|
className: "absolute transition-all",
|
|
3370
|
-
children: /* @__PURE__ */
|
|
3835
|
+
children: /* @__PURE__ */ Y(te, {
|
|
3371
3836
|
"aria-hidden": "true",
|
|
3372
3837
|
className: "animate-spin",
|
|
3373
3838
|
size: 14
|
|
@@ -3376,36 +3841,36 @@ function Si({ asChild: e = !1, className: t, children: n, ...r }) {
|
|
|
3376
3841
|
] })
|
|
3377
3842
|
});
|
|
3378
3843
|
}
|
|
3379
|
-
function
|
|
3380
|
-
return /* @__PURE__ */
|
|
3381
|
-
className:
|
|
3844
|
+
function Bi({ className: e, ...t }) {
|
|
3845
|
+
return /* @__PURE__ */ Y("h3", {
|
|
3846
|
+
className: Q("font-medium text-sm", e),
|
|
3382
3847
|
"data-slot": "stepper-title",
|
|
3383
3848
|
...t
|
|
3384
3849
|
});
|
|
3385
3850
|
}
|
|
3386
|
-
function
|
|
3387
|
-
return /* @__PURE__ */
|
|
3388
|
-
className:
|
|
3851
|
+
function Vi({ className: e, ...t }) {
|
|
3852
|
+
return /* @__PURE__ */ Y("p", {
|
|
3853
|
+
className: Q("text-muted-foreground text-sm", e),
|
|
3389
3854
|
"data-slot": "stepper-description",
|
|
3390
3855
|
...t
|
|
3391
3856
|
});
|
|
3392
3857
|
}
|
|
3393
|
-
function
|
|
3394
|
-
return /* @__PURE__ */
|
|
3395
|
-
className:
|
|
3858
|
+
function Hi({ className: e, ...t }) {
|
|
3859
|
+
return /* @__PURE__ */ Y("div", {
|
|
3860
|
+
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),
|
|
3396
3861
|
"data-slot": "stepper-separator",
|
|
3397
3862
|
...t
|
|
3398
3863
|
});
|
|
3399
3864
|
}
|
|
3400
3865
|
//#endregion
|
|
3401
3866
|
//#region src/components/ui/switch.tsx
|
|
3402
|
-
function
|
|
3403
|
-
return /* @__PURE__ */
|
|
3867
|
+
function Ui({ className: e, size: t = "default", ...n }) {
|
|
3868
|
+
return /* @__PURE__ */ Y(ye.Root, {
|
|
3404
3869
|
"data-slot": "switch",
|
|
3405
3870
|
"data-size": t,
|
|
3406
|
-
className:
|
|
3871
|
+
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),
|
|
3407
3872
|
...n,
|
|
3408
|
-
children: /* @__PURE__ */
|
|
3873
|
+
children: /* @__PURE__ */ Y(ye.Thumb, {
|
|
3409
3874
|
"data-slot": "switch-thumb",
|
|
3410
3875
|
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"
|
|
3411
3876
|
})
|
|
@@ -3413,124 +3878,124 @@ function Ei({ className: e, size: t = "default", ...n }) {
|
|
|
3413
3878
|
}
|
|
3414
3879
|
//#endregion
|
|
3415
3880
|
//#region src/components/ui/tabs.tsx
|
|
3416
|
-
function
|
|
3417
|
-
return /* @__PURE__ */
|
|
3881
|
+
function Wi({ className: e, orientation: t = "horizontal", ...n }) {
|
|
3882
|
+
return /* @__PURE__ */ Y(q.Root, {
|
|
3418
3883
|
"data-slot": "tabs",
|
|
3419
3884
|
"data-orientation": t,
|
|
3420
|
-
className:
|
|
3885
|
+
className: Q("group/tabs flex gap-2 data-horizontal:flex-col", e),
|
|
3421
3886
|
...n
|
|
3422
3887
|
});
|
|
3423
3888
|
}
|
|
3424
|
-
var
|
|
3889
|
+
var Gi = H("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", {
|
|
3425
3890
|
variants: { variant: {
|
|
3426
3891
|
default: "bg-muted",
|
|
3427
3892
|
line: "gap-1 bg-transparent"
|
|
3428
3893
|
} },
|
|
3429
3894
|
defaultVariants: { variant: "default" }
|
|
3430
3895
|
});
|
|
3431
|
-
function
|
|
3432
|
-
return /* @__PURE__ */
|
|
3896
|
+
function Ki({ className: e, variant: t = "default", ...n }) {
|
|
3897
|
+
return /* @__PURE__ */ Y(q.List, {
|
|
3433
3898
|
"data-slot": "tabs-list",
|
|
3434
3899
|
"data-variant": t,
|
|
3435
|
-
className:
|
|
3900
|
+
className: Q(Gi({ variant: t }), e),
|
|
3436
3901
|
...n
|
|
3437
3902
|
});
|
|
3438
3903
|
}
|
|
3439
|
-
function
|
|
3440
|
-
return /* @__PURE__ */
|
|
3904
|
+
function qi({ className: e, ...t }) {
|
|
3905
|
+
return /* @__PURE__ */ Y(q.Trigger, {
|
|
3441
3906
|
"data-slot": "tabs-trigger",
|
|
3442
|
-
className:
|
|
3907
|
+
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),
|
|
3443
3908
|
...t
|
|
3444
3909
|
});
|
|
3445
3910
|
}
|
|
3446
|
-
function
|
|
3447
|
-
return /* @__PURE__ */
|
|
3911
|
+
function Ji({ className: e, ...t }) {
|
|
3912
|
+
return /* @__PURE__ */ Y(q.Content, {
|
|
3448
3913
|
"data-slot": "tabs-content",
|
|
3449
|
-
className:
|
|
3914
|
+
className: Q("flex-1 text-sm outline-none", e),
|
|
3450
3915
|
...t
|
|
3451
3916
|
});
|
|
3452
3917
|
}
|
|
3453
3918
|
//#endregion
|
|
3454
3919
|
//#region src/components/ui/timeline.tsx
|
|
3455
|
-
var
|
|
3456
|
-
let e = n.useContext(
|
|
3920
|
+
var Yi = n.createContext(void 0), Xi = () => {
|
|
3921
|
+
let e = n.useContext(Yi);
|
|
3457
3922
|
if (!e) throw Error("useTimeline must be used within a Timeline");
|
|
3458
3923
|
return e;
|
|
3459
3924
|
};
|
|
3460
|
-
function
|
|
3925
|
+
function Zi({ defaultValue: e = 1, value: t, onValueChange: r, orientation: i = "vertical", className: a, ...o }) {
|
|
3461
3926
|
let [s, c] = n.useState(e), l = n.useCallback((e) => {
|
|
3462
3927
|
t === void 0 && c(e), r?.(e);
|
|
3463
3928
|
}, [t, r]), u = t ?? s;
|
|
3464
|
-
return /* @__PURE__ */
|
|
3929
|
+
return /* @__PURE__ */ Y(Yi.Provider, {
|
|
3465
3930
|
value: {
|
|
3466
3931
|
activeStep: u,
|
|
3467
3932
|
setActiveStep: l
|
|
3468
3933
|
},
|
|
3469
|
-
children: /* @__PURE__ */
|
|
3470
|
-
className:
|
|
3934
|
+
children: /* @__PURE__ */ Y("div", {
|
|
3935
|
+
className: Q("group/timeline flex data-[orientation=horizontal]:w-full data-[orientation=horizontal]:flex-row data-[orientation=vertical]:flex-col", a),
|
|
3471
3936
|
"data-orientation": i,
|
|
3472
3937
|
"data-slot": "timeline",
|
|
3473
3938
|
...o
|
|
3474
3939
|
})
|
|
3475
3940
|
});
|
|
3476
3941
|
}
|
|
3477
|
-
function
|
|
3478
|
-
return /* @__PURE__ */
|
|
3479
|
-
className:
|
|
3942
|
+
function Qi({ className: e, ...t }) {
|
|
3943
|
+
return /* @__PURE__ */ Y("div", {
|
|
3944
|
+
className: Q("text-muted-foreground text-sm", e),
|
|
3480
3945
|
"data-slot": "timeline-content",
|
|
3481
3946
|
...t
|
|
3482
3947
|
});
|
|
3483
3948
|
}
|
|
3484
|
-
function
|
|
3485
|
-
return /* @__PURE__ */
|
|
3486
|
-
className:
|
|
3949
|
+
function $i({ asChild: e = !1, className: t, ...n }) {
|
|
3950
|
+
return /* @__PURE__ */ Y(e ? ve.Root : "time", {
|
|
3951
|
+
className: Q("mb-1 block font-medium text-muted-foreground text-xs group-data-[orientation=vertical]/timeline:max-sm:h-4", t),
|
|
3487
3952
|
"data-slot": "timeline-date",
|
|
3488
3953
|
...n
|
|
3489
3954
|
});
|
|
3490
3955
|
}
|
|
3491
|
-
function
|
|
3492
|
-
return /* @__PURE__ */
|
|
3493
|
-
className:
|
|
3956
|
+
function ea({ className: e, ...t }) {
|
|
3957
|
+
return /* @__PURE__ */ Y("div", {
|
|
3958
|
+
className: Q(e),
|
|
3494
3959
|
"data-slot": "timeline-header",
|
|
3495
3960
|
...t
|
|
3496
3961
|
});
|
|
3497
3962
|
}
|
|
3498
|
-
function
|
|
3499
|
-
return /* @__PURE__ */
|
|
3963
|
+
function ta({ className: e, children: t, ...n }) {
|
|
3964
|
+
return /* @__PURE__ */ Y("div", {
|
|
3500
3965
|
"aria-hidden": "true",
|
|
3501
|
-
className:
|
|
3966
|
+
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),
|
|
3502
3967
|
"data-slot": "timeline-indicator",
|
|
3503
3968
|
...n,
|
|
3504
3969
|
children: t
|
|
3505
3970
|
});
|
|
3506
3971
|
}
|
|
3507
|
-
function
|
|
3508
|
-
let { activeStep: r } =
|
|
3509
|
-
return /* @__PURE__ */
|
|
3510
|
-
className:
|
|
3972
|
+
function na({ step: e, className: t, ...n }) {
|
|
3973
|
+
let { activeStep: r } = Xi();
|
|
3974
|
+
return /* @__PURE__ */ Y("div", {
|
|
3975
|
+
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),
|
|
3511
3976
|
"data-completed": e <= r || void 0,
|
|
3512
3977
|
"data-slot": "timeline-item",
|
|
3513
3978
|
...n
|
|
3514
3979
|
});
|
|
3515
3980
|
}
|
|
3516
|
-
function
|
|
3517
|
-
return /* @__PURE__ */
|
|
3981
|
+
function ra({ className: e, ...t }) {
|
|
3982
|
+
return /* @__PURE__ */ Y("div", {
|
|
3518
3983
|
"aria-hidden": "true",
|
|
3519
|
-
className:
|
|
3984
|
+
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),
|
|
3520
3985
|
"data-slot": "timeline-separator",
|
|
3521
3986
|
...t
|
|
3522
3987
|
});
|
|
3523
3988
|
}
|
|
3524
|
-
function
|
|
3525
|
-
return /* @__PURE__ */
|
|
3526
|
-
className:
|
|
3989
|
+
function ia({ className: e, ...t }) {
|
|
3990
|
+
return /* @__PURE__ */ Y("h3", {
|
|
3991
|
+
className: Q("font-medium text-sm", e),
|
|
3527
3992
|
"data-slot": "timeline-title",
|
|
3528
3993
|
...t
|
|
3529
3994
|
});
|
|
3530
3995
|
}
|
|
3531
3996
|
//#endregion
|
|
3532
3997
|
//#region src/components/ui/toggle.tsx
|
|
3533
|
-
var
|
|
3998
|
+
var aa = H("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", {
|
|
3534
3999
|
variants: {
|
|
3535
4000
|
variant: {
|
|
3536
4001
|
default: "bg-transparent",
|
|
@@ -3547,10 +4012,10 @@ var Hi = P("group/toggle inline-flex items-center justify-center gap-1 rounded-l
|
|
|
3547
4012
|
size: "default"
|
|
3548
4013
|
}
|
|
3549
4014
|
});
|
|
3550
|
-
function
|
|
3551
|
-
return /* @__PURE__ */
|
|
4015
|
+
function oa({ className: e, variant: t = "default", size: n = "default", ...r }) {
|
|
4016
|
+
return /* @__PURE__ */ Y(be.Root, {
|
|
3552
4017
|
"data-slot": "toggle",
|
|
3553
|
-
className:
|
|
4018
|
+
className: Q(aa({
|
|
3554
4019
|
variant: t,
|
|
3555
4020
|
size: n,
|
|
3556
4021
|
className: e
|
|
@@ -3560,23 +4025,23 @@ function Ui({ className: e, variant: t = "default", size: n = "default", ...r })
|
|
|
3560
4025
|
}
|
|
3561
4026
|
//#endregion
|
|
3562
4027
|
//#region src/components/ui/toggle-group.tsx
|
|
3563
|
-
var
|
|
4028
|
+
var sa = n.createContext({
|
|
3564
4029
|
size: "default",
|
|
3565
4030
|
variant: "default",
|
|
3566
4031
|
spacing: 2,
|
|
3567
4032
|
orientation: "horizontal"
|
|
3568
4033
|
});
|
|
3569
|
-
function
|
|
3570
|
-
return /* @__PURE__ */
|
|
4034
|
+
function ca({ className: e, variant: t, size: n, spacing: r = 2, orientation: i = "horizontal", children: a, ...o }) {
|
|
4035
|
+
return /* @__PURE__ */ Y(xe.Root, {
|
|
3571
4036
|
"data-slot": "toggle-group",
|
|
3572
4037
|
"data-variant": t,
|
|
3573
4038
|
"data-size": n,
|
|
3574
4039
|
"data-spacing": r,
|
|
3575
4040
|
"data-orientation": i,
|
|
3576
4041
|
style: { "--gap": r },
|
|
3577
|
-
className:
|
|
4042
|
+
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),
|
|
3578
4043
|
...o,
|
|
3579
|
-
children: /* @__PURE__ */
|
|
4044
|
+
children: /* @__PURE__ */ Y(sa.Provider, {
|
|
3580
4045
|
value: {
|
|
3581
4046
|
variant: t,
|
|
3582
4047
|
size: n,
|
|
@@ -3587,14 +4052,14 @@ function Gi({ className: e, variant: t, size: n, spacing: r = 2, orientation: i
|
|
|
3587
4052
|
})
|
|
3588
4053
|
});
|
|
3589
4054
|
}
|
|
3590
|
-
function
|
|
3591
|
-
let o = n.useContext(
|
|
3592
|
-
return /* @__PURE__ */
|
|
4055
|
+
function la({ className: e, children: t, variant: r = "default", size: i = "default", ...a }) {
|
|
4056
|
+
let o = n.useContext(sa);
|
|
4057
|
+
return /* @__PURE__ */ Y(xe.Item, {
|
|
3593
4058
|
"data-slot": "toggle-group-item",
|
|
3594
4059
|
"data-variant": o.variant || r,
|
|
3595
4060
|
"data-size": o.size || i,
|
|
3596
4061
|
"data-spacing": o.spacing,
|
|
3597
|
-
className:
|
|
4062
|
+
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", aa({
|
|
3598
4063
|
variant: o.variant || r,
|
|
3599
4064
|
size: o.size || i
|
|
3600
4065
|
}), e),
|
|
@@ -3604,35 +4069,35 @@ function Ki({ className: e, children: t, variant: r = "default", size: i = "defa
|
|
|
3604
4069
|
}
|
|
3605
4070
|
//#endregion
|
|
3606
4071
|
//#region src/components/ui/tooltip.tsx
|
|
3607
|
-
function
|
|
3608
|
-
return /* @__PURE__ */ J
|
|
4072
|
+
function ua({ delayDuration: e = 0, ...t }) {
|
|
4073
|
+
return /* @__PURE__ */ Y(J.Provider, {
|
|
3609
4074
|
"data-slot": "tooltip-provider",
|
|
3610
4075
|
delayDuration: e,
|
|
3611
4076
|
...t
|
|
3612
4077
|
});
|
|
3613
4078
|
}
|
|
3614
|
-
function
|
|
3615
|
-
return /* @__PURE__ */ J
|
|
4079
|
+
function da({ ...e }) {
|
|
4080
|
+
return /* @__PURE__ */ Y(J.Root, {
|
|
3616
4081
|
"data-slot": "tooltip",
|
|
3617
4082
|
...e
|
|
3618
4083
|
});
|
|
3619
4084
|
}
|
|
3620
|
-
function
|
|
3621
|
-
return /* @__PURE__ */ J
|
|
4085
|
+
function fa({ ...e }) {
|
|
4086
|
+
return /* @__PURE__ */ Y(J.Trigger, {
|
|
3622
4087
|
"data-slot": "tooltip-trigger",
|
|
3623
4088
|
...e
|
|
3624
4089
|
});
|
|
3625
4090
|
}
|
|
3626
|
-
function
|
|
3627
|
-
return /* @__PURE__ */ J
|
|
4091
|
+
function pa({ className: e, sideOffset: t = 0, children: n, ...r }) {
|
|
4092
|
+
return /* @__PURE__ */ Y(J.Portal, { children: /* @__PURE__ */ X(J.Content, {
|
|
3628
4093
|
"data-slot": "tooltip-content",
|
|
3629
4094
|
sideOffset: t,
|
|
3630
|
-
className:
|
|
4095
|
+
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),
|
|
3631
4096
|
...r,
|
|
3632
|
-
children: [n, /* @__PURE__ */ J
|
|
4097
|
+
children: [n, /* @__PURE__ */ Y(J.Arrow, { className: "z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground" })]
|
|
3633
4098
|
}) });
|
|
3634
4099
|
}
|
|
3635
4100
|
//#endregion
|
|
3636
|
-
export {
|
|
4101
|
+
export { Xe as ActionsMenu, dt as AdvancedInput, $t as AdvancedSelect, En as Alert, kn as AlertAction, On as AlertDescription, An as AlertDialog, Bn as AlertDialogAction, Vn as AlertDialogCancel, Pn as AlertDialogContent, zn as AlertDialogDescription, In as AlertDialogFooter, Fn as AlertDialogHeader, Ln as AlertDialogMedia, Nn as AlertDialogOverlay, Mn as AlertDialogPortal, Rn as AlertDialogTitle, jn as AlertDialogTrigger, Dn as AlertTitle, Un as Badge, $ as Button, Gn as ButtonGroup, qn as ButtonGroupSeparator, Kn as ButtonGroupText, pn as Calendar, mn as CalendarDayButton, Jn as Card, Qn as CardAction, $n as CardContent, Zn as CardDescription, er as CardFooter, Yn as CardHeader, Xn as CardTitle, ar as ChartContainer, lr as ChartLegend, ur as ChartLegendContent, or as ChartStyle, sr as ChartTooltip, cr as ChartTooltipContent, en as Checkbox, It as Command, Lt as CommandDialog, Bt as CommandEmpty, Vt as CommandGroup, Rt as CommandInput, Ut as CommandItem, zt as CommandList, Ht as CommandSeparator, Wt as CommandShortcut, fn as DataTable, wn as DateTimeRangePicker, gt as Dialog, yt as DialogClose, xt as DialogContent, Tt as DialogDescription, Ct as DialogFooter, St as DialogHeader, bt as DialogOverlay, vt as DialogPortal, wt as DialogTitle, _t as DialogTrigger, Ne as DropdownMenu, ze as DropdownMenuCheckboxItem, Ie as DropdownMenuContent, Le as DropdownMenuGroup, Re as DropdownMenuItem, He as DropdownMenuLabel, Pe as DropdownMenuPortal, Be as DropdownMenuRadioGroup, Ve as DropdownMenuRadioItem, Ue as DropdownMenuSeparator, We as DropdownMenuShortcut, Ge as DropdownMenuSub, qe as DropdownMenuSubContent, Ke as DropdownMenuSubTrigger, Fe as DropdownMenuTrigger, rt as Field, it as FieldContent, st as FieldDescription, lt as FieldError, tt as FieldGroup, at as FieldLabel, et as FieldLegend, ct as FieldSeparator, $e as FieldSet, ot as FieldTitle, ht as FileUpload, fr as HoverCard, mr as HoverCardContent, pr as HoverCardTrigger, Et as Input, Ot as InputGroup, At as InputGroupAddon, Mt as InputGroupButton, Pt as InputGroupInput, Nt as InputGroupText, Ft as InputGroupTextarea, vr as Item, wr as ItemActions, xr as ItemContent, Cr as ItemDescription, Er as ItemFooter, hr as ItemGroup, Tr as ItemHeader, br as ItemMedia, gr as ItemSeparator, Sr as ItemTitle, Ze as Label, Nr as Map, ai as MapArc, oi as MapClusterLayer, qr as MapControls, Ir as MapMarker, Yr as MapPopup, Xr as MapRoute, Lr as MarkerContent, Hr as MarkerLabel, Br as MarkerPopup, Vr as MarkerTooltip, Gt as Popover, Jt as PopoverAnchor, qt as PopoverContent, Zt as PopoverDescription, Yt as PopoverHeader, Xt as PopoverTitle, Kt as PopoverTrigger, si as Progress, ci as RadioGroup, li as RadioGroupItem, ui as Select, mi as SelectContent, di as SelectGroup, gi as SelectItem, hi as SelectLabel, yi as SelectScrollDownButton, vi as SelectScrollUpButton, _i as SelectSeparator, pi as SelectTrigger, fi as SelectValue, Qe as Separator, bi as Sheet, Si as SheetClose, Ti as SheetContent, ki as SheetDescription, Di as SheetFooter, Ei as SheetHeader, Oi as SheetTitle, xi as SheetTrigger, Ai as Slider, un as Spinner, Ii as Stepper, Vi as StepperDescription, zi as StepperIndicator, Li as StepperItem, Hi as StepperSeparator, Bi as StepperTitle, Ri as StepperTrigger, Ui as Switch, tn as Table, rn as TableBody, ln as TableCaption, cn as TableCell, an as TableFooter, sn as TableHead, nn as TableHeader, on as TableRow, Wi as Tabs, Ji as TabsContent, Ki as TabsList, qi as TabsTrigger, Dt as Textarea, Zi as Timeline, Qi as TimelineContent, $i as TimelineDate, ea as TimelineHeader, ta as TimelineIndicator, na as TimelineItem, ra as TimelineSeparator, ia as TimelineTitle, ji as Toaster, oa as Toggle, ca as ToggleGroup, la as ToggleGroupItem, da as Tooltip, pa as TooltipContent, ua as TooltipProvider, fa as TooltipTrigger, Hn as badgeVariants, Wn as buttonGroupVariants, Me as buttonVariants, Q as cn, Ae as formatBytes, bn as navigateRange, yn as presetToRange, Gi as tabsListVariants, aa as toggleVariants, je as useFileUpload, Ar as useMap };
|
|
3637
4102
|
|
|
3638
4103
|
//# sourceMappingURL=index.js.map
|