@sonamu-kit/react-components 0.4.2 → 0.4.4
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.
|
@@ -22,50 +22,58 @@ import * as j from "@radix-ui/react-context-menu";
|
|
|
22
22
|
import { format as M } from "date-fns";
|
|
23
23
|
import { Drawer as N } from "vaul";
|
|
24
24
|
import * as P from "@radix-ui/react-dropdown-menu";
|
|
25
|
-
import {
|
|
26
|
-
import
|
|
27
|
-
import * as
|
|
28
|
-
import
|
|
25
|
+
import { FileIcon as F, defaultStyles as ee } from "react-file-icon";
|
|
26
|
+
import { Controller as te, FormProvider as I, useFormContext as ne } from "react-hook-form";
|
|
27
|
+
import * as re from "@radix-ui/react-label";
|
|
28
|
+
import * as ie from "@radix-ui/react-hover-card";
|
|
29
|
+
import { OTPInput as ae, OTPInputContext as oe } from "input-otp";
|
|
29
30
|
import * as L from "@radix-ui/react-menubar";
|
|
30
|
-
import * as
|
|
31
|
+
import * as se from "@radix-ui/react-separator";
|
|
31
32
|
import * as R from "@radix-ui/react-navigation-menu";
|
|
32
|
-
import * as
|
|
33
|
+
import * as ce from "@radix-ui/react-progress";
|
|
33
34
|
import * as z from "@radix-ui/react-radio-group";
|
|
34
|
-
import * as
|
|
35
|
+
import * as le from "react-resizable-panels";
|
|
35
36
|
import * as B from "@radix-ui/react-scroll-area";
|
|
36
|
-
import { useQueryClient as
|
|
37
|
+
import { useQueryClient as ue } from "@tanstack/react-query";
|
|
37
38
|
import * as V from "@radix-ui/react-tooltip";
|
|
38
|
-
import * as
|
|
39
|
-
import
|
|
40
|
-
import { get as
|
|
39
|
+
import * as de from "@radix-ui/react-slider";
|
|
40
|
+
import fe from "qs";
|
|
41
|
+
import { get as pe, isObject as me, set as he, unique as ge } from "radashi";
|
|
41
42
|
import { z as H } from "zod";
|
|
42
|
-
import { useNavigate as
|
|
43
|
-
import
|
|
44
|
-
import * as
|
|
43
|
+
import { useNavigate as _e, useSearch as ve } from "@tanstack/react-router";
|
|
44
|
+
import ye from "fast-deep-equal";
|
|
45
|
+
import * as be from "@radix-ui/react-switch";
|
|
45
46
|
import * as U from "@radix-ui/react-tabs";
|
|
46
47
|
import * as W from "@radix-ui/react-toast";
|
|
47
|
-
import * as
|
|
48
|
-
import * as
|
|
48
|
+
import * as xe from "@radix-ui/react-toggle";
|
|
49
|
+
import * as Se from "@radix-ui/react-toggle-group";
|
|
49
50
|
//#region src/hooks/use-toast.ts
|
|
50
|
-
var
|
|
51
|
-
function
|
|
52
|
-
return
|
|
51
|
+
var Ce = 1, we = 1e6, Te = 0;
|
|
52
|
+
function Ee() {
|
|
53
|
+
return Te = (Te + 1) % (2 ** 53 - 1), Te.toString();
|
|
53
54
|
}
|
|
54
|
-
var
|
|
55
|
-
if (
|
|
55
|
+
var De = /* @__PURE__ */ new Map(), Oe = (e) => {
|
|
56
|
+
if (De.has(e)) return;
|
|
56
57
|
let t = setTimeout(() => {
|
|
57
|
-
|
|
58
|
+
De.delete(e), Me({
|
|
58
59
|
type: "REMOVE_TOAST",
|
|
59
60
|
toastId: e
|
|
60
61
|
});
|
|
61
|
-
},
|
|
62
|
-
|
|
63
|
-
},
|
|
62
|
+
}, we);
|
|
63
|
+
De.set(e, t);
|
|
64
|
+
}, ke = (e, t) => {
|
|
64
65
|
switch (t.type) {
|
|
65
|
-
case "ADD_TOAST":
|
|
66
|
-
...e,
|
|
67
|
-
|
|
68
|
-
|
|
66
|
+
case "ADD_TOAST": {
|
|
67
|
+
let n = [t.toast, ...e.toasts].slice(0, Ce), r = new Set(n.map((e) => e.id));
|
|
68
|
+
for (let t of e.toasts) if (!r.has(t.id)) {
|
|
69
|
+
let e = De.get(t.id);
|
|
70
|
+
e && (clearTimeout(e), De.delete(t.id));
|
|
71
|
+
}
|
|
72
|
+
return {
|
|
73
|
+
...e,
|
|
74
|
+
toasts: n
|
|
75
|
+
};
|
|
76
|
+
}
|
|
69
77
|
case "UPDATE_TOAST": return {
|
|
70
78
|
...e,
|
|
71
79
|
toasts: e.toasts.map((e) => e.id === t.toast.id ? {
|
|
@@ -75,8 +83,8 @@ var Te = /* @__PURE__ */ new Map(), Ee = (e) => {
|
|
|
75
83
|
};
|
|
76
84
|
case "DISMISS_TOAST": {
|
|
77
85
|
let { toastId: n } = t;
|
|
78
|
-
return n ?
|
|
79
|
-
|
|
86
|
+
return n ? Oe(n) : e.toasts.forEach((e) => {
|
|
87
|
+
Oe(e.id);
|
|
80
88
|
}), {
|
|
81
89
|
...e,
|
|
82
90
|
toasts: e.toasts.map((e) => e.id === n || n === void 0 ? {
|
|
@@ -85,32 +93,37 @@ var Te = /* @__PURE__ */ new Map(), Ee = (e) => {
|
|
|
85
93
|
} : e)
|
|
86
94
|
};
|
|
87
95
|
}
|
|
88
|
-
case "REMOVE_TOAST":
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
96
|
+
case "REMOVE_TOAST":
|
|
97
|
+
if (t.toastId === void 0) {
|
|
98
|
+
for (let [e, t] of De) clearTimeout(t), De.delete(e);
|
|
99
|
+
return {
|
|
100
|
+
...e,
|
|
101
|
+
toasts: []
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
return {
|
|
105
|
+
...e,
|
|
106
|
+
toasts: e.toasts.filter((e) => e.id !== t.toastId)
|
|
107
|
+
};
|
|
95
108
|
}
|
|
96
|
-
},
|
|
97
|
-
function
|
|
98
|
-
|
|
99
|
-
e(
|
|
109
|
+
}, Ae = [], je = { toasts: [] };
|
|
110
|
+
function Me(e) {
|
|
111
|
+
je = ke(je, e), Ae.forEach((e) => {
|
|
112
|
+
e(je);
|
|
100
113
|
});
|
|
101
114
|
}
|
|
102
|
-
function
|
|
103
|
-
let t =
|
|
115
|
+
function Ne({ ...e }) {
|
|
116
|
+
let t = Ee(), n = (e) => Me({
|
|
104
117
|
type: "UPDATE_TOAST",
|
|
105
118
|
toast: {
|
|
106
119
|
...e,
|
|
107
120
|
id: t
|
|
108
121
|
}
|
|
109
|
-
}), r = () =>
|
|
122
|
+
}), r = () => Me({
|
|
110
123
|
type: "DISMISS_TOAST",
|
|
111
124
|
toastId: t
|
|
112
125
|
});
|
|
113
|
-
return
|
|
126
|
+
return Me({
|
|
114
127
|
type: "ADD_TOAST",
|
|
115
128
|
toast: {
|
|
116
129
|
...e,
|
|
@@ -126,15 +139,15 @@ function je({ ...e }) {
|
|
|
126
139
|
update: n
|
|
127
140
|
};
|
|
128
141
|
}
|
|
129
|
-
function
|
|
130
|
-
let [t, n] = e.useState(
|
|
131
|
-
return e.useEffect(() => (
|
|
132
|
-
let e =
|
|
133
|
-
e > -1 &&
|
|
142
|
+
function Pe() {
|
|
143
|
+
let [t, n] = e.useState(je);
|
|
144
|
+
return e.useEffect(() => (Ae.push(n), () => {
|
|
145
|
+
let e = Ae.indexOf(n);
|
|
146
|
+
e > -1 && Ae.splice(e, 1);
|
|
134
147
|
}), []), {
|
|
135
148
|
...t,
|
|
136
|
-
toast:
|
|
137
|
-
dismiss: (e) =>
|
|
149
|
+
toast: Ne,
|
|
150
|
+
dismiss: (e) => Me({
|
|
138
151
|
type: "DISMISS_TOAST",
|
|
139
152
|
toastId: e
|
|
140
153
|
})
|
|
@@ -142,7 +155,7 @@ function Me() {
|
|
|
142
155
|
}
|
|
143
156
|
//#endregion
|
|
144
157
|
//#region ~icons/lucide/chevron-down.jsx
|
|
145
|
-
var
|
|
158
|
+
var Fe = (e) => /* @__PURE__ */ f("svg", {
|
|
146
159
|
viewBox: "0 0 24 24",
|
|
147
160
|
width: "1.2em",
|
|
148
161
|
height: "1.2em",
|
|
@@ -161,10 +174,10 @@ var Ne = (e) => /* @__PURE__ */ f("svg", {
|
|
|
161
174
|
function G(...e) {
|
|
162
175
|
return h(m(e));
|
|
163
176
|
}
|
|
164
|
-
function
|
|
177
|
+
function Ie(e) {
|
|
165
178
|
return e === void 0 ? void 0 : Array.isArray(e) ? e : [e];
|
|
166
179
|
}
|
|
167
|
-
function
|
|
180
|
+
function Le(e) {
|
|
168
181
|
let [t, n] = l([]);
|
|
169
182
|
return a(() => {
|
|
170
183
|
let t = e.map((e) => URL.createObjectURL(e));
|
|
@@ -175,23 +188,23 @@ function Fe(e) {
|
|
|
175
188
|
}
|
|
176
189
|
//#endregion
|
|
177
190
|
//#region src/components/ui/accordion.tsx
|
|
178
|
-
var
|
|
191
|
+
var Re = u.Root, ze = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(u.Item, {
|
|
179
192
|
ref: n,
|
|
180
193
|
className: G("border-b", e),
|
|
181
194
|
...t
|
|
182
195
|
}));
|
|
183
|
-
|
|
184
|
-
var
|
|
196
|
+
ze.displayName = "AccordionItem";
|
|
197
|
+
var Be = e.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ f(u.Header, {
|
|
185
198
|
className: "flex",
|
|
186
199
|
children: /* @__PURE__ */ p(u.Trigger, {
|
|
187
200
|
ref: r,
|
|
188
201
|
className: G("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180", e),
|
|
189
202
|
...n,
|
|
190
|
-
children: [t, /* @__PURE__ */ f(
|
|
203
|
+
children: [t, /* @__PURE__ */ f(Fe, { className: "h-4 w-4 shrink-0 transition-transform duration-200" })]
|
|
191
204
|
})
|
|
192
205
|
}));
|
|
193
|
-
|
|
194
|
-
var
|
|
206
|
+
Be.displayName = u.Trigger.displayName;
|
|
207
|
+
var Ve = e.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ f(u.Content, {
|
|
195
208
|
ref: r,
|
|
196
209
|
className: "overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",
|
|
197
210
|
...n,
|
|
@@ -200,35 +213,35 @@ var ze = e.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ *
|
|
|
200
213
|
children: t
|
|
201
214
|
})
|
|
202
215
|
}));
|
|
203
|
-
|
|
204
|
-
var
|
|
216
|
+
Ve.displayName = u.Content.displayName;
|
|
217
|
+
var He = g("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground", {
|
|
205
218
|
variants: { variant: {
|
|
206
219
|
default: "bg-background text-foreground",
|
|
207
220
|
destructive: "border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"
|
|
208
221
|
} },
|
|
209
222
|
defaultVariants: { variant: "default" }
|
|
210
|
-
}),
|
|
223
|
+
}), Ue = e.forwardRef(({ className: e, variant: t, ...n }, r) => /* @__PURE__ */ f("div", {
|
|
211
224
|
ref: r,
|
|
212
225
|
role: "alert",
|
|
213
|
-
className: G(
|
|
226
|
+
className: G(He({ variant: t }), e),
|
|
214
227
|
...n
|
|
215
228
|
}));
|
|
216
|
-
|
|
217
|
-
var
|
|
229
|
+
Ue.displayName = "Alert";
|
|
230
|
+
var We = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f("h5", {
|
|
218
231
|
ref: n,
|
|
219
232
|
className: G("mb-1 font-medium leading-none tracking-tight", e),
|
|
220
233
|
...t
|
|
221
234
|
}));
|
|
222
|
-
|
|
223
|
-
var
|
|
235
|
+
We.displayName = "AlertTitle";
|
|
236
|
+
var Ge = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f("div", {
|
|
224
237
|
ref: n,
|
|
225
238
|
className: G("text-sm [&_p]:leading-relaxed", e),
|
|
226
239
|
...t
|
|
227
240
|
}));
|
|
228
|
-
|
|
241
|
+
Ge.displayName = "AlertDescription";
|
|
229
242
|
//#endregion
|
|
230
243
|
//#region ~icons/lucide/loader-2.jsx
|
|
231
|
-
var
|
|
244
|
+
var Ke = (e) => /* @__PURE__ */ f("svg", {
|
|
232
245
|
viewBox: "0 0 24 24",
|
|
233
246
|
width: "1.2em",
|
|
234
247
|
height: "1.2em",
|
|
@@ -241,7 +254,7 @@ var We = (e) => /* @__PURE__ */ f("svg", {
|
|
|
241
254
|
strokeWidth: 2,
|
|
242
255
|
d: "M21 12a9 9 0 1 1-6.219-8.56"
|
|
243
256
|
})
|
|
244
|
-
}),
|
|
257
|
+
}), qe = g("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-button text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive cursor-pointer", {
|
|
245
258
|
variants: {
|
|
246
259
|
variant: {
|
|
247
260
|
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
@@ -272,10 +285,10 @@ var We = (e) => /* @__PURE__ */ f("svg", {
|
|
|
272
285
|
size: "default"
|
|
273
286
|
}
|
|
274
287
|
}), K = e.forwardRef(({ className: t, variant: n, size: r, icon: i, children: a, loading: o, disabled: s, asChild: c = !1, ...l }, u) => {
|
|
275
|
-
let d = c ? v : "button", m = e.Children.count(a) === 0, h = o ? /* @__PURE__ */ f(
|
|
288
|
+
let d = c ? v : "button", m = e.Children.count(a) === 0, h = o ? /* @__PURE__ */ f(Ke, { className: "animate-spin" }) : i;
|
|
276
289
|
return /* @__PURE__ */ f(d, {
|
|
277
290
|
"data-slot": "button",
|
|
278
|
-
className: G(
|
|
291
|
+
className: G(qe({
|
|
279
292
|
variant: n,
|
|
280
293
|
size: r,
|
|
281
294
|
className: t
|
|
@@ -292,73 +305,73 @@ var We = (e) => /* @__PURE__ */ f("svg", {
|
|
|
292
305
|
K.displayName = "Button";
|
|
293
306
|
//#endregion
|
|
294
307
|
//#region src/components/ui/alert-dialog.tsx
|
|
295
|
-
var
|
|
308
|
+
var Je = _.Root, Ye = _.Trigger, Xe = _.Portal, Ze = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(_.Overlay, {
|
|
296
309
|
className: G("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", e),
|
|
297
310
|
...t,
|
|
298
311
|
ref: n
|
|
299
312
|
}));
|
|
300
|
-
|
|
301
|
-
var
|
|
313
|
+
Ze.displayName = _.Overlay.displayName;
|
|
314
|
+
var Qe = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ p(Xe, { children: [/* @__PURE__ */ f(Ze, {}), /* @__PURE__ */ f(_.Content, {
|
|
302
315
|
ref: n,
|
|
303
316
|
className: G("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg", e),
|
|
304
317
|
...t
|
|
305
318
|
})] }));
|
|
306
|
-
|
|
307
|
-
var
|
|
319
|
+
Qe.displayName = _.Content.displayName;
|
|
320
|
+
var $e = ({ className: e, ...t }) => /* @__PURE__ */ f("div", {
|
|
308
321
|
className: G("flex flex-col space-y-2 text-center sm:text-left", e),
|
|
309
322
|
...t
|
|
310
323
|
});
|
|
311
|
-
|
|
312
|
-
var
|
|
324
|
+
$e.displayName = "AlertDialogHeader";
|
|
325
|
+
var et = ({ className: e, ...t }) => /* @__PURE__ */ f("div", {
|
|
313
326
|
className: G("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", e),
|
|
314
327
|
...t
|
|
315
328
|
});
|
|
316
|
-
|
|
317
|
-
var
|
|
329
|
+
et.displayName = "AlertDialogFooter";
|
|
330
|
+
var tt = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(_.Title, {
|
|
318
331
|
ref: n,
|
|
319
332
|
className: G("text-lg font-semibold", e),
|
|
320
333
|
...t
|
|
321
334
|
}));
|
|
322
|
-
|
|
323
|
-
var
|
|
335
|
+
tt.displayName = _.Title.displayName;
|
|
336
|
+
var nt = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(_.Description, {
|
|
324
337
|
ref: n,
|
|
325
338
|
className: G("text-sm text-muted-foreground", e),
|
|
326
339
|
...t
|
|
327
340
|
}));
|
|
328
|
-
|
|
329
|
-
var
|
|
341
|
+
nt.displayName = _.Description.displayName;
|
|
342
|
+
var rt = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(_.Action, {
|
|
330
343
|
ref: n,
|
|
331
|
-
className: G(
|
|
344
|
+
className: G(qe(), e),
|
|
332
345
|
...t
|
|
333
346
|
}));
|
|
334
|
-
|
|
335
|
-
var
|
|
347
|
+
rt.displayName = _.Action.displayName;
|
|
348
|
+
var it = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(_.Cancel, {
|
|
336
349
|
ref: n,
|
|
337
|
-
className: G(
|
|
350
|
+
className: G(qe({ variant: "outline" }), "mt-2 sm:mt-0", e),
|
|
338
351
|
...t
|
|
339
352
|
}));
|
|
340
|
-
|
|
353
|
+
it.displayName = _.Cancel.displayName;
|
|
341
354
|
//#endregion
|
|
342
355
|
//#region src/components/ui/aspect-ratio.tsx
|
|
343
|
-
var
|
|
356
|
+
var at = y.Root, ot = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(b.Root, {
|
|
344
357
|
ref: n,
|
|
345
358
|
className: G("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full", e),
|
|
346
359
|
...t
|
|
347
360
|
}));
|
|
348
|
-
|
|
349
|
-
var
|
|
361
|
+
ot.displayName = b.Root.displayName;
|
|
362
|
+
var st = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(b.Image, {
|
|
350
363
|
ref: n,
|
|
351
364
|
className: G("aspect-square h-full w-full", e),
|
|
352
365
|
...t
|
|
353
366
|
}));
|
|
354
|
-
|
|
355
|
-
var
|
|
367
|
+
st.displayName = b.Image.displayName;
|
|
368
|
+
var ct = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(b.Fallback, {
|
|
356
369
|
ref: n,
|
|
357
370
|
className: G("flex h-full w-full items-center justify-center rounded-full bg-muted", e),
|
|
358
371
|
...t
|
|
359
372
|
}));
|
|
360
|
-
|
|
361
|
-
var
|
|
373
|
+
ct.displayName = b.Fallback.displayName;
|
|
374
|
+
var lt = g("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden", {
|
|
362
375
|
variants: { variant: {
|
|
363
376
|
default: "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
|
|
364
377
|
secondary: "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
|
|
@@ -367,16 +380,16 @@ var st = g("inline-flex items-center justify-center rounded-md border px-2 py-0.
|
|
|
367
380
|
} },
|
|
368
381
|
defaultVariants: { variant: "default" }
|
|
369
382
|
});
|
|
370
|
-
function
|
|
383
|
+
function ut({ className: e, variant: t, asChild: n = !1, ...r }) {
|
|
371
384
|
return /* @__PURE__ */ f(n ? v : "span", {
|
|
372
385
|
"data-slot": "badge",
|
|
373
|
-
className: G(
|
|
386
|
+
className: G(lt({ variant: t }), e),
|
|
374
387
|
...r
|
|
375
388
|
});
|
|
376
389
|
}
|
|
377
390
|
//#endregion
|
|
378
391
|
//#region ~icons/lucide/chevron-right.jsx
|
|
379
|
-
var
|
|
392
|
+
var dt = (e) => /* @__PURE__ */ f("svg", {
|
|
380
393
|
viewBox: "0 0 24 24",
|
|
381
394
|
width: "1.2em",
|
|
382
395
|
height: "1.2em",
|
|
@@ -389,7 +402,7 @@ var lt = (e) => /* @__PURE__ */ f("svg", {
|
|
|
389
402
|
strokeWidth: 2,
|
|
390
403
|
d: "m9 18l6-6l-6-6"
|
|
391
404
|
})
|
|
392
|
-
}),
|
|
405
|
+
}), ft = (e) => /* @__PURE__ */ f("svg", {
|
|
393
406
|
viewBox: "0 0 24 24",
|
|
394
407
|
width: "1.2em",
|
|
395
408
|
height: "1.2em",
|
|
@@ -418,31 +431,31 @@ var lt = (e) => /* @__PURE__ */ f("svg", {
|
|
|
418
431
|
})
|
|
419
432
|
]
|
|
420
433
|
})
|
|
421
|
-
}),
|
|
434
|
+
}), pt = e.forwardRef(({ ...e }, t) => /* @__PURE__ */ f("nav", {
|
|
422
435
|
ref: t,
|
|
423
436
|
"aria-label": "breadcrumb",
|
|
424
437
|
...e
|
|
425
438
|
}));
|
|
426
|
-
|
|
427
|
-
var
|
|
439
|
+
pt.displayName = "Breadcrumb";
|
|
440
|
+
var mt = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f("ol", {
|
|
428
441
|
ref: n,
|
|
429
442
|
className: G("flex flex-wrap items-center gap-1.5 overflow-wrap-anywhere text-sm text-muted-foreground sm:gap-2.5", e),
|
|
430
443
|
...t
|
|
431
444
|
}));
|
|
432
|
-
|
|
433
|
-
var
|
|
445
|
+
mt.displayName = "BreadcrumbList";
|
|
446
|
+
var ht = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f("li", {
|
|
434
447
|
ref: n,
|
|
435
448
|
className: G("inline-flex items-center gap-1.5", e),
|
|
436
449
|
...t
|
|
437
450
|
}));
|
|
438
|
-
|
|
439
|
-
var
|
|
451
|
+
ht.displayName = "BreadcrumbItem";
|
|
452
|
+
var gt = e.forwardRef(({ asChild: e, className: t, ...n }, r) => /* @__PURE__ */ f(e ? v : "a", {
|
|
440
453
|
ref: r,
|
|
441
454
|
className: G("transition-colors hover:text-foreground", t),
|
|
442
455
|
...n
|
|
443
456
|
}));
|
|
444
|
-
|
|
445
|
-
var
|
|
457
|
+
gt.displayName = "BreadcrumbLink";
|
|
458
|
+
var _t = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f("span", {
|
|
446
459
|
ref: n,
|
|
447
460
|
role: "link",
|
|
448
461
|
"aria-disabled": "true",
|
|
@@ -450,29 +463,29 @@ var ht = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f("span", {
|
|
|
450
463
|
className: G("font-normal text-foreground", e),
|
|
451
464
|
...t
|
|
452
465
|
}));
|
|
453
|
-
|
|
454
|
-
var
|
|
466
|
+
_t.displayName = "BreadcrumbPage";
|
|
467
|
+
var vt = ({ children: e, className: t, ...n }) => /* @__PURE__ */ f("li", {
|
|
455
468
|
role: "presentation",
|
|
456
469
|
"aria-hidden": "true",
|
|
457
470
|
className: G("[&>svg]:w-3.5 [&>svg]:h-3.5", t),
|
|
458
471
|
...n,
|
|
459
|
-
children: e ?? /* @__PURE__ */ f(
|
|
472
|
+
children: e ?? /* @__PURE__ */ f(dt, {})
|
|
460
473
|
});
|
|
461
|
-
|
|
462
|
-
var
|
|
474
|
+
vt.displayName = "BreadcrumbSeparator";
|
|
475
|
+
var yt = ({ className: e, ...t }) => /* @__PURE__ */ p("span", {
|
|
463
476
|
role: "presentation",
|
|
464
477
|
"aria-hidden": "true",
|
|
465
478
|
className: G("flex h-9 w-9 items-center justify-center", e),
|
|
466
479
|
...t,
|
|
467
|
-
children: [/* @__PURE__ */ f(
|
|
480
|
+
children: [/* @__PURE__ */ f(ft, { className: "h-4 w-4" }), /* @__PURE__ */ f("span", {
|
|
468
481
|
className: "sr-only",
|
|
469
482
|
children: "More"
|
|
470
483
|
})]
|
|
471
484
|
});
|
|
472
|
-
|
|
485
|
+
yt.displayName = "BreadcrumbElipssis";
|
|
473
486
|
//#endregion
|
|
474
487
|
//#region ~icons/lucide/chevron-left.jsx
|
|
475
|
-
var
|
|
488
|
+
var bt = (e) => /* @__PURE__ */ f("svg", {
|
|
476
489
|
viewBox: "0 0 24 24",
|
|
477
490
|
width: "1.2em",
|
|
478
491
|
height: "1.2em",
|
|
@@ -488,7 +501,7 @@ var vt = (e) => /* @__PURE__ */ f("svg", {
|
|
|
488
501
|
});
|
|
489
502
|
//#endregion
|
|
490
503
|
//#region src/components/ui/calendar.tsx
|
|
491
|
-
function
|
|
504
|
+
function xt({ className: e, classNames: t, showOutsideDays: n = !0, ...r }) {
|
|
492
505
|
return /* @__PURE__ */ f(x, {
|
|
493
506
|
showOutsideDays: n,
|
|
494
507
|
className: G("p-3", e),
|
|
@@ -498,7 +511,7 @@ function yt({ className: e, classNames: t, showOutsideDays: n = !0, ...r }) {
|
|
|
498
511
|
caption: "flex justify-center pt-1 relative items-center w-full",
|
|
499
512
|
caption_label: "text-sm font-medium",
|
|
500
513
|
nav: "space-x-1 flex items-center",
|
|
501
|
-
nav_button: G(
|
|
514
|
+
nav_button: G(qe({ variant: "outline" }), "h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),
|
|
502
515
|
nav_button_previous: "absolute left-1",
|
|
503
516
|
nav_button_next: "absolute right-1",
|
|
504
517
|
table: "w-full border-collapse space-y-1",
|
|
@@ -506,7 +519,7 @@ function yt({ className: e, classNames: t, showOutsideDays: n = !0, ...r }) {
|
|
|
506
519
|
head_cell: "text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]",
|
|
507
520
|
row: "flex w-full mt-2",
|
|
508
521
|
cell: G("h-9 w-9 text-center text-sm p-0 relative focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent/10", r.mode === "range" ? "[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md" : "[&:has([aria-selected])]:rounded-md"),
|
|
509
|
-
day: G(
|
|
522
|
+
day: G(qe({ variant: "ghost" }), "h-9 w-9 p-0 font-normal aria-selected:opacity-100"),
|
|
510
523
|
day_range_start: "day-range-start",
|
|
511
524
|
day_range_end: "day-range-end",
|
|
512
525
|
day_selected: "bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",
|
|
@@ -518,57 +531,57 @@ function yt({ className: e, classNames: t, showOutsideDays: n = !0, ...r }) {
|
|
|
518
531
|
...t
|
|
519
532
|
},
|
|
520
533
|
components: {
|
|
521
|
-
IconLeft: () => /* @__PURE__ */ f(
|
|
522
|
-
IconRight: () => /* @__PURE__ */ f(
|
|
534
|
+
IconLeft: () => /* @__PURE__ */ f(bt, { className: "h-4 w-4" }),
|
|
535
|
+
IconRight: () => /* @__PURE__ */ f(dt, { className: "h-4 w-4" })
|
|
523
536
|
},
|
|
524
537
|
...r
|
|
525
538
|
});
|
|
526
539
|
}
|
|
527
540
|
//#endregion
|
|
528
541
|
//#region src/components/ui/card.tsx
|
|
529
|
-
function
|
|
542
|
+
function St({ className: e, ...t }) {
|
|
530
543
|
return /* @__PURE__ */ f("div", {
|
|
531
544
|
"data-slot": "card",
|
|
532
545
|
className: G("bg-card text-card-foreground flex flex-col gap-6 rounded-card border", e),
|
|
533
546
|
...t
|
|
534
547
|
});
|
|
535
548
|
}
|
|
536
|
-
function
|
|
549
|
+
function Ct({ className: e, ...t }) {
|
|
537
550
|
return /* @__PURE__ */ f("div", {
|
|
538
551
|
"data-slot": "card-header",
|
|
539
552
|
className: G("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 pt-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6", e),
|
|
540
553
|
...t
|
|
541
554
|
});
|
|
542
555
|
}
|
|
543
|
-
function
|
|
556
|
+
function wt({ className: e, ...t }) {
|
|
544
557
|
return /* @__PURE__ */ f("h4", {
|
|
545
558
|
"data-slot": "card-title",
|
|
546
559
|
className: G("leading-none", e),
|
|
547
560
|
...t
|
|
548
561
|
});
|
|
549
562
|
}
|
|
550
|
-
function
|
|
563
|
+
function Tt({ className: e, ...t }) {
|
|
551
564
|
return /* @__PURE__ */ f("p", {
|
|
552
565
|
"data-slot": "card-description",
|
|
553
566
|
className: G("text-muted-foreground", e),
|
|
554
567
|
...t
|
|
555
568
|
});
|
|
556
569
|
}
|
|
557
|
-
function
|
|
570
|
+
function Et({ className: e, ...t }) {
|
|
558
571
|
return /* @__PURE__ */ f("div", {
|
|
559
572
|
"data-slot": "card-action",
|
|
560
573
|
className: G("col-start-2 row-span-2 row-start-1 self-start justify-self-end", e),
|
|
561
574
|
...t
|
|
562
575
|
});
|
|
563
576
|
}
|
|
564
|
-
function
|
|
577
|
+
function Dt({ className: e, ...t }) {
|
|
565
578
|
return /* @__PURE__ */ f("div", {
|
|
566
579
|
"data-slot": "card-content",
|
|
567
580
|
className: G("px-6 last:pb-6", e),
|
|
568
581
|
...t
|
|
569
582
|
});
|
|
570
583
|
}
|
|
571
|
-
function
|
|
584
|
+
function Ot({ className: e, ...t }) {
|
|
572
585
|
return /* @__PURE__ */ f("div", {
|
|
573
586
|
"data-slot": "card-footer",
|
|
574
587
|
className: G("flex items-center px-6 pb-6 [.border-t]:pt-6", e),
|
|
@@ -577,7 +590,7 @@ function Et({ className: e, ...t }) {
|
|
|
577
590
|
}
|
|
578
591
|
//#endregion
|
|
579
592
|
//#region ~icons/lucide/arrow-left.jsx
|
|
580
|
-
var
|
|
593
|
+
var kt = (e) => /* @__PURE__ */ f("svg", {
|
|
581
594
|
viewBox: "0 0 24 24",
|
|
582
595
|
width: "1.2em",
|
|
583
596
|
height: "1.2em",
|
|
@@ -590,7 +603,7 @@ var Dt = (e) => /* @__PURE__ */ f("svg", {
|
|
|
590
603
|
strokeWidth: 2,
|
|
591
604
|
d: "m12 19l-7-7l7-7m7 7H5"
|
|
592
605
|
})
|
|
593
|
-
}),
|
|
606
|
+
}), At = (e) => /* @__PURE__ */ f("svg", {
|
|
594
607
|
viewBox: "0 0 24 24",
|
|
595
608
|
width: "1.2em",
|
|
596
609
|
height: "1.2em",
|
|
@@ -603,13 +616,13 @@ var Dt = (e) => /* @__PURE__ */ f("svg", {
|
|
|
603
616
|
strokeWidth: 2,
|
|
604
617
|
d: "M5 12h14m-7-7l7 7l-7 7"
|
|
605
618
|
})
|
|
606
|
-
}),
|
|
607
|
-
function
|
|
608
|
-
let t = e.useContext(
|
|
619
|
+
}), jt = e.createContext(null);
|
|
620
|
+
function Mt() {
|
|
621
|
+
let t = e.useContext(jt);
|
|
609
622
|
if (!t) throw Error("useCarousel must be used within a <Carousel />");
|
|
610
623
|
return t;
|
|
611
624
|
}
|
|
612
|
-
var
|
|
625
|
+
var Nt = e.forwardRef(({ orientation: t = "horizontal", opts: n, setApi: r, plugins: i, className: a, children: o, ...s }, c) => {
|
|
613
626
|
let [l, u] = S({
|
|
614
627
|
...n,
|
|
615
628
|
axis: t === "horizontal" ? "x" : "y"
|
|
@@ -628,7 +641,7 @@ var jt = e.forwardRef(({ orientation: t = "horizontal", opts: n, setApi: r, plug
|
|
|
628
641
|
if (u) return g(u), u.on("reInit", g), u.on("select", g), () => {
|
|
629
642
|
u?.off("reInit", g), u?.off("select", g);
|
|
630
643
|
};
|
|
631
|
-
}, [u, g]), /* @__PURE__ */ f(
|
|
644
|
+
}, [u, g]), /* @__PURE__ */ f(jt.Provider, {
|
|
632
645
|
value: {
|
|
633
646
|
carouselRef: l,
|
|
634
647
|
api: u,
|
|
@@ -650,9 +663,9 @@ var jt = e.forwardRef(({ orientation: t = "horizontal", opts: n, setApi: r, plug
|
|
|
650
663
|
})
|
|
651
664
|
});
|
|
652
665
|
});
|
|
653
|
-
|
|
654
|
-
var
|
|
655
|
-
let { carouselRef: r, orientation: i } =
|
|
666
|
+
Nt.displayName = "Carousel";
|
|
667
|
+
var Pt = e.forwardRef(({ className: e, ...t }, n) => {
|
|
668
|
+
let { carouselRef: r, orientation: i } = Mt();
|
|
656
669
|
return /* @__PURE__ */ f("div", {
|
|
657
670
|
ref: r,
|
|
658
671
|
className: "overflow-hidden",
|
|
@@ -663,9 +676,9 @@ var Mt = e.forwardRef(({ className: e, ...t }, n) => {
|
|
|
663
676
|
})
|
|
664
677
|
});
|
|
665
678
|
});
|
|
666
|
-
|
|
667
|
-
var
|
|
668
|
-
let { orientation: r } =
|
|
679
|
+
Pt.displayName = "CarouselContent";
|
|
680
|
+
var Ft = e.forwardRef(({ className: e, ...t }, n) => {
|
|
681
|
+
let { orientation: r } = Mt();
|
|
669
682
|
return /* @__PURE__ */ f("div", {
|
|
670
683
|
ref: n,
|
|
671
684
|
role: "group",
|
|
@@ -674,9 +687,9 @@ var Nt = e.forwardRef(({ className: e, ...t }, n) => {
|
|
|
674
687
|
...t
|
|
675
688
|
});
|
|
676
689
|
});
|
|
677
|
-
|
|
678
|
-
var
|
|
679
|
-
let { orientation: a, scrollPrev: o, canScrollPrev: s } =
|
|
690
|
+
Ft.displayName = "CarouselItem";
|
|
691
|
+
var It = e.forwardRef(({ className: e, variant: t = "outline", size: n = "default", ...r }, i) => {
|
|
692
|
+
let { orientation: a, scrollPrev: o, canScrollPrev: s } = Mt();
|
|
680
693
|
return /* @__PURE__ */ p(K, {
|
|
681
694
|
ref: i,
|
|
682
695
|
variant: t,
|
|
@@ -685,15 +698,15 @@ var Pt = e.forwardRef(({ className: e, variant: t = "outline", size: n = "defaul
|
|
|
685
698
|
disabled: !s,
|
|
686
699
|
onClick: o,
|
|
687
700
|
...r,
|
|
688
|
-
children: [/* @__PURE__ */ f(
|
|
701
|
+
children: [/* @__PURE__ */ f(kt, { className: "h-4 w-4" }), /* @__PURE__ */ f("span", {
|
|
689
702
|
className: "sr-only",
|
|
690
703
|
children: "Previous slide"
|
|
691
704
|
})]
|
|
692
705
|
});
|
|
693
706
|
});
|
|
694
|
-
|
|
695
|
-
var
|
|
696
|
-
let { orientation: a, scrollNext: o, canScrollNext: s } =
|
|
707
|
+
It.displayName = "CarouselPrevious";
|
|
708
|
+
var Lt = e.forwardRef(({ className: e, variant: t = "outline", size: n = "default", ...r }, i) => {
|
|
709
|
+
let { orientation: a, scrollNext: o, canScrollNext: s } = Mt();
|
|
697
710
|
return /* @__PURE__ */ p(K, {
|
|
698
711
|
ref: i,
|
|
699
712
|
variant: t,
|
|
@@ -702,13 +715,13 @@ var Ft = e.forwardRef(({ className: e, variant: t = "outline", size: n = "defaul
|
|
|
702
715
|
disabled: !s,
|
|
703
716
|
onClick: o,
|
|
704
717
|
...r,
|
|
705
|
-
children: [/* @__PURE__ */ f(
|
|
718
|
+
children: [/* @__PURE__ */ f(At, { className: "h-4 w-4" }), /* @__PURE__ */ f("span", {
|
|
706
719
|
className: "sr-only",
|
|
707
720
|
children: "Next slide"
|
|
708
721
|
})]
|
|
709
722
|
});
|
|
710
723
|
});
|
|
711
|
-
|
|
724
|
+
Lt.displayName = "CarouselNext";
|
|
712
725
|
//#endregion
|
|
713
726
|
//#region ~icons/lucide/check.jsx
|
|
714
727
|
var q = (e) => /* @__PURE__ */ f("svg", {
|
|
@@ -724,7 +737,7 @@ var q = (e) => /* @__PURE__ */ f("svg", {
|
|
|
724
737
|
strokeWidth: 2,
|
|
725
738
|
d: "M20 6L9 17l-5-5"
|
|
726
739
|
})
|
|
727
|
-
}),
|
|
740
|
+
}), Rt = e.forwardRef(({ className: t, name: n, checked: r, value: i, defaultChecked: a, onValueChange: o, onBlur: s, label: c, labelClassName: l, disabled: u, ...m }, h) => {
|
|
728
741
|
let g = i === void 0 ? r : i, _ = e.useRef(null), v = e.useRef(null), y = e.useId();
|
|
729
742
|
e.useImperativeHandle(h, () => _.current);
|
|
730
743
|
let b = (e) => {
|
|
@@ -766,10 +779,10 @@ var q = (e) => /* @__PURE__ */ f("svg", {
|
|
|
766
779
|
})]
|
|
767
780
|
}) : S;
|
|
768
781
|
});
|
|
769
|
-
|
|
782
|
+
Rt.displayName = "Checkbox";
|
|
770
783
|
//#endregion
|
|
771
784
|
//#region src/components/ui/collapsible.tsx
|
|
772
|
-
var
|
|
785
|
+
var zt = w.Root, Bt = w.CollapsibleTrigger, Vt = w.CollapsibleContent, Ht = (e) => /* @__PURE__ */ f("svg", {
|
|
773
786
|
viewBox: "0 0 24 24",
|
|
774
787
|
width: "1.2em",
|
|
775
788
|
height: "1.2em",
|
|
@@ -782,7 +795,7 @@ var Lt = w.Root, Rt = w.CollapsibleTrigger, zt = w.CollapsibleContent, Bt = (e)
|
|
|
782
795
|
strokeWidth: 2,
|
|
783
796
|
d: "m7 15l5 5l5-5M7 9l5-5l5 5"
|
|
784
797
|
})
|
|
785
|
-
}),
|
|
798
|
+
}), Ut = (e) => /* @__PURE__ */ f("svg", {
|
|
786
799
|
viewBox: "0 0 24 24",
|
|
787
800
|
width: "1.2em",
|
|
788
801
|
height: "1.2em",
|
|
@@ -799,7 +812,7 @@ var Lt = w.Root, Rt = w.CollapsibleTrigger, zt = w.CollapsibleContent, Bt = (e)
|
|
|
799
812
|
r: 10
|
|
800
813
|
}), /* @__PURE__ */ f("path", { d: "m15 9l-6 6m0-6l6 6" })]
|
|
801
814
|
})
|
|
802
|
-
}),
|
|
815
|
+
}), Wt = {
|
|
803
816
|
"rc.asyncSelect.loading": "Loading...",
|
|
804
817
|
"rc.asyncSelect.noOptions": "No options",
|
|
805
818
|
"rc.asyncSelect.noResults": "No results",
|
|
@@ -868,28 +881,28 @@ var Lt = w.Root, Rt = w.CollapsibleTrigger, zt = w.CollapsibleContent, Bt = (e)
|
|
|
868
881
|
"rc.sonamuFilter.appliedFilters": "🌲 Applied SonamuFilters",
|
|
869
882
|
"rc.common.cancel": "Cancel",
|
|
870
883
|
"rc.common.save": "Save"
|
|
871
|
-
},
|
|
872
|
-
throw Error(
|
|
873
|
-
},
|
|
874
|
-
function
|
|
884
|
+
}, Gt = (e) => `[SonamuProvider] ${e} is not configured. Please provide ${e} configuration to SonamuProvider.`, Kt = () => () => {
|
|
885
|
+
throw Error(Gt("uploader"));
|
|
886
|
+
}, qt = () => (e) => Wt[e], Jt = n({});
|
|
887
|
+
function Yt({ children: e, authOptions: t, ...n }) {
|
|
875
888
|
let r = c(void 0);
|
|
876
889
|
t && !r.current && (r.current = T(t));
|
|
877
890
|
let i = {
|
|
878
|
-
uploader: n.uploader ??
|
|
891
|
+
uploader: n.uploader ?? Kt(),
|
|
879
892
|
auth: n.auth ?? r.current,
|
|
880
|
-
SD: n.SD ??
|
|
893
|
+
SD: n.SD ?? qt()
|
|
881
894
|
};
|
|
882
|
-
return /* @__PURE__ */ f(
|
|
895
|
+
return /* @__PURE__ */ f(Jt.Provider, {
|
|
883
896
|
value: i,
|
|
884
897
|
children: e
|
|
885
898
|
});
|
|
886
899
|
}
|
|
887
900
|
function J() {
|
|
888
|
-
return i(
|
|
901
|
+
return i(Jt);
|
|
889
902
|
}
|
|
890
903
|
//#endregion
|
|
891
904
|
//#region ~icons/lucide/search.jsx
|
|
892
|
-
var
|
|
905
|
+
var Xt = (e) => /* @__PURE__ */ f("svg", {
|
|
893
906
|
viewBox: "0 0 24 24",
|
|
894
907
|
width: "1.2em",
|
|
895
908
|
height: "1.2em",
|
|
@@ -906,7 +919,7 @@ var Jt = (e) => /* @__PURE__ */ f("svg", {
|
|
|
906
919
|
r: 8
|
|
907
920
|
})]
|
|
908
921
|
})
|
|
909
|
-
}),
|
|
922
|
+
}), Zt = (e) => /* @__PURE__ */ f("svg", {
|
|
910
923
|
viewBox: "0 0 24 24",
|
|
911
924
|
width: "1.2em",
|
|
912
925
|
height: "1.2em",
|
|
@@ -919,113 +932,113 @@ var Jt = (e) => /* @__PURE__ */ f("svg", {
|
|
|
919
932
|
strokeWidth: 2,
|
|
920
933
|
d: "M18 6L6 18M6 6l12 12"
|
|
921
934
|
})
|
|
922
|
-
}),
|
|
935
|
+
}), Qt = D.Root, $t = D.Trigger, en = D.Portal, tn = D.Close, nn = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(D.Overlay, {
|
|
923
936
|
ref: n,
|
|
924
937
|
className: G("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", e),
|
|
925
938
|
...t
|
|
926
939
|
}));
|
|
927
|
-
|
|
928
|
-
var
|
|
940
|
+
nn.displayName = D.Overlay.displayName;
|
|
941
|
+
var rn = e.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ p(en, { children: [/* @__PURE__ */ f(nn, {}), /* @__PURE__ */ p(D.Content, {
|
|
929
942
|
ref: r,
|
|
930
943
|
className: G("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg", e),
|
|
931
944
|
...n,
|
|
932
945
|
children: [t, /* @__PURE__ */ p(D.Close, {
|
|
933
946
|
className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",
|
|
934
|
-
children: [/* @__PURE__ */ f(
|
|
947
|
+
children: [/* @__PURE__ */ f(Zt, { className: "h-4 w-4" }), /* @__PURE__ */ f("span", {
|
|
935
948
|
className: "sr-only",
|
|
936
949
|
children: "Close"
|
|
937
950
|
})]
|
|
938
951
|
})]
|
|
939
952
|
})] }));
|
|
940
|
-
|
|
941
|
-
var
|
|
953
|
+
rn.displayName = D.Content.displayName;
|
|
954
|
+
var an = ({ className: e, ...t }) => /* @__PURE__ */ f("div", {
|
|
942
955
|
className: G("flex flex-col space-y-1.5 text-center sm:text-left", e),
|
|
943
956
|
...t
|
|
944
957
|
});
|
|
945
|
-
|
|
946
|
-
var
|
|
958
|
+
an.displayName = "DialogHeader";
|
|
959
|
+
var on = ({ className: e, ...t }) => /* @__PURE__ */ f("div", {
|
|
947
960
|
className: G("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", e),
|
|
948
961
|
...t
|
|
949
962
|
});
|
|
950
|
-
|
|
951
|
-
var
|
|
963
|
+
on.displayName = "DialogFooter";
|
|
964
|
+
var sn = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(D.Title, {
|
|
952
965
|
ref: n,
|
|
953
966
|
className: G("text-lg font-semibold leading-none tracking-tight", e),
|
|
954
967
|
...t
|
|
955
968
|
}));
|
|
956
|
-
|
|
957
|
-
var
|
|
969
|
+
sn.displayName = D.Title.displayName;
|
|
970
|
+
var cn = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(D.Description, {
|
|
958
971
|
ref: n,
|
|
959
972
|
className: G("text-sm text-muted-foreground", e),
|
|
960
973
|
...t
|
|
961
974
|
}));
|
|
962
|
-
|
|
975
|
+
cn.displayName = D.Description.displayName;
|
|
963
976
|
//#endregion
|
|
964
977
|
//#region src/components/ui/command.tsx
|
|
965
|
-
var
|
|
978
|
+
var ln = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(E, {
|
|
966
979
|
ref: n,
|
|
967
980
|
className: G("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground", e),
|
|
968
981
|
...t
|
|
969
982
|
}));
|
|
970
|
-
|
|
971
|
-
var
|
|
983
|
+
ln.displayName = E.displayName;
|
|
984
|
+
var un = ({ children: e, commandProps: t, ...n }) => {
|
|
972
985
|
let { className: r, ...i } = t ?? {};
|
|
973
|
-
return /* @__PURE__ */ f(
|
|
986
|
+
return /* @__PURE__ */ f(Qt, {
|
|
974
987
|
...n,
|
|
975
|
-
children: /* @__PURE__ */ f(
|
|
988
|
+
children: /* @__PURE__ */ f(rn, {
|
|
976
989
|
className: "overflow-hidden p-0 shadow-lg",
|
|
977
|
-
children: /* @__PURE__ */ f(
|
|
990
|
+
children: /* @__PURE__ */ f(ln, {
|
|
978
991
|
className: G("**:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:font-medium **:[[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 **:[[cmdk-group]]:px-2 **:[[cmdk-input-wrapper]_svg]:size-5 **:[[cmdk-input]]:h-12 **:[[cmdk-item]]:px-2 **:[[cmdk-item]]:py-3 **:[[cmdk-item]_svg]:size-5", r),
|
|
979
992
|
...i,
|
|
980
993
|
children: e
|
|
981
994
|
})
|
|
982
995
|
})
|
|
983
996
|
});
|
|
984
|
-
},
|
|
997
|
+
}, dn = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ p("div", {
|
|
985
998
|
className: "flex items-center border-b px-3",
|
|
986
999
|
"cmdk-input-wrapper": "",
|
|
987
|
-
children: [/* @__PURE__ */ f(
|
|
1000
|
+
children: [/* @__PURE__ */ f(Xt, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }), /* @__PURE__ */ f(E.Input, {
|
|
988
1001
|
ref: n,
|
|
989
1002
|
className: G("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50", e),
|
|
990
1003
|
...t
|
|
991
1004
|
})]
|
|
992
1005
|
}));
|
|
993
|
-
|
|
994
|
-
var
|
|
1006
|
+
dn.displayName = E.Input.displayName;
|
|
1007
|
+
var fn = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(E.List, {
|
|
995
1008
|
ref: n,
|
|
996
1009
|
className: G("max-h-[300px] overflow-y-auto overflow-x-hidden", e),
|
|
997
1010
|
...t
|
|
998
1011
|
}));
|
|
999
|
-
|
|
1000
|
-
var
|
|
1012
|
+
fn.displayName = E.List.displayName;
|
|
1013
|
+
var pn = e.forwardRef((e, t) => /* @__PURE__ */ f(E.Empty, {
|
|
1001
1014
|
ref: t,
|
|
1002
1015
|
className: "py-6 text-center text-sm",
|
|
1003
1016
|
...e
|
|
1004
1017
|
}));
|
|
1005
|
-
|
|
1006
|
-
var
|
|
1018
|
+
pn.displayName = E.Empty.displayName;
|
|
1019
|
+
var mn = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(E.Group, {
|
|
1007
1020
|
ref: n,
|
|
1008
1021
|
className: G("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),
|
|
1009
1022
|
...t
|
|
1010
1023
|
}));
|
|
1011
|
-
|
|
1012
|
-
var
|
|
1024
|
+
mn.displayName = E.Group.displayName;
|
|
1025
|
+
var hn = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(E.Separator, {
|
|
1013
1026
|
ref: n,
|
|
1014
1027
|
className: G("-mx-1 h-px bg-border", e),
|
|
1015
1028
|
...t
|
|
1016
1029
|
}));
|
|
1017
|
-
|
|
1018
|
-
var
|
|
1030
|
+
hn.displayName = E.Separator.displayName;
|
|
1031
|
+
var gn = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(E.Item, {
|
|
1019
1032
|
ref: n,
|
|
1020
1033
|
className: G("relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 **:[svg]:pointer-events-none **:[svg]:size-4 **:[svg]:shrink-0", e),
|
|
1021
1034
|
...t
|
|
1022
1035
|
}));
|
|
1023
|
-
|
|
1024
|
-
var
|
|
1036
|
+
gn.displayName = E.Item.displayName;
|
|
1037
|
+
var _n = ({ className: e, ...t }) => /* @__PURE__ */ f("span", {
|
|
1025
1038
|
className: G("ml-auto text-xs tracking-widest text-muted-foreground", e),
|
|
1026
1039
|
...t
|
|
1027
1040
|
});
|
|
1028
|
-
|
|
1041
|
+
_n.displayName = "CommandShortcut";
|
|
1029
1042
|
//#endregion
|
|
1030
1043
|
//#region src/components/ui/popover.tsx
|
|
1031
1044
|
function Y({ ...e }) {
|
|
@@ -1049,7 +1062,7 @@ function Z({ className: e, align: t = "center", sideOffset: n = 4, ...r }) {
|
|
|
1049
1062
|
...r
|
|
1050
1063
|
}) });
|
|
1051
1064
|
}
|
|
1052
|
-
function
|
|
1065
|
+
function vn({ ...e }) {
|
|
1053
1066
|
return /* @__PURE__ */ f(O.Anchor, {
|
|
1054
1067
|
"data-slot": "popover-anchor",
|
|
1055
1068
|
...e
|
|
@@ -1057,7 +1070,7 @@ function gn({ ...e }) {
|
|
|
1057
1070
|
}
|
|
1058
1071
|
//#endregion
|
|
1059
1072
|
//#region src/components/ui/combobox.tsx
|
|
1060
|
-
var
|
|
1073
|
+
var yn = e.forwardRef(({ options: t, name: n, value: r, onValueChange: i, onBlur: a, placeholder: o, searchPlaceholder: s, emptyText: c, disabled: l = !1, className: u, clearable: m = !1 }, h) => {
|
|
1061
1074
|
let { SD: g } = J(), [_, v] = e.useState(!1), y = e.useRef(null), b = o ?? g("rc.combobox.selectPlaceholder"), x = s ?? g("common.searchPlaceholder"), S = c ?? g("rc.combobox.noResults");
|
|
1062
1075
|
e.useImperativeHandle(h, () => y.current);
|
|
1063
1076
|
let C = (e) => {
|
|
@@ -1091,16 +1104,16 @@ var _n = e.forwardRef(({ options: t, name: n, value: r, onValueChange: i, onBlur
|
|
|
1091
1104
|
className: "flex items-center justify-center",
|
|
1092
1105
|
onMouseDown: (e) => e.stopPropagation(),
|
|
1093
1106
|
onClick: w,
|
|
1094
|
-
children: /* @__PURE__ */ f(
|
|
1095
|
-
}), /* @__PURE__ */ f(
|
|
1107
|
+
children: /* @__PURE__ */ f(Ut, { className: "h-4 w-4 cursor-pointer opacity-50 hover:opacity-100 transition-opacity" })
|
|
1108
|
+
}), /* @__PURE__ */ f(Ht, { className: "h-4 w-4 opacity-50" })]
|
|
1096
1109
|
})]
|
|
1097
1110
|
})
|
|
1098
1111
|
}), /* @__PURE__ */ f(Z, {
|
|
1099
1112
|
className: "w-full p-0",
|
|
1100
|
-
children: /* @__PURE__ */ p(
|
|
1113
|
+
children: /* @__PURE__ */ p(ln, { children: [/* @__PURE__ */ f(dn, {
|
|
1101
1114
|
placeholder: x,
|
|
1102
1115
|
className: "h-9"
|
|
1103
|
-
}), /* @__PURE__ */ p(
|
|
1116
|
+
}), /* @__PURE__ */ p(fn, { children: [/* @__PURE__ */ f(pn, { children: S }), /* @__PURE__ */ f(mn, { children: t.map((e) => /* @__PURE__ */ p(gn, {
|
|
1104
1117
|
value: e.value,
|
|
1105
1118
|
onSelect: C,
|
|
1106
1119
|
children: [e.label, /* @__PURE__ */ f(q, { className: G("ml-auto", r === e.value ? "opacity-100" : "opacity-0") })]
|
|
@@ -1108,15 +1121,15 @@ var _n = e.forwardRef(({ options: t, name: n, value: r, onValueChange: i, onBlur
|
|
|
1108
1121
|
})]
|
|
1109
1122
|
})] });
|
|
1110
1123
|
});
|
|
1111
|
-
|
|
1124
|
+
yn.displayName = "Combobox";
|
|
1112
1125
|
//#endregion
|
|
1113
1126
|
//#region src/components/ui/common-modal.tsx
|
|
1114
|
-
var
|
|
1127
|
+
var bn = k({
|
|
1115
1128
|
open: !1,
|
|
1116
1129
|
reactNode: null
|
|
1117
1130
|
});
|
|
1118
|
-
function
|
|
1119
|
-
let [t, n] = A(
|
|
1131
|
+
function xn({ className: e }) {
|
|
1132
|
+
let [t, n] = A(bn), { open: r, reactNode: i, title: o, description: s, className: c, onControlledOpen: l, onControlledClose: u } = t, d = () => {
|
|
1120
1133
|
u && u(), n({
|
|
1121
1134
|
open: !1,
|
|
1122
1135
|
reactNode: null
|
|
@@ -1124,25 +1137,25 @@ function yn({ className: e }) {
|
|
|
1124
1137
|
};
|
|
1125
1138
|
return a(() => {
|
|
1126
1139
|
r && l && l();
|
|
1127
|
-
}, [r]), /* @__PURE__ */ f(
|
|
1140
|
+
}, [r]), /* @__PURE__ */ f(Qt, {
|
|
1128
1141
|
open: r,
|
|
1129
1142
|
onOpenChange: (e) => {
|
|
1130
1143
|
e || d();
|
|
1131
1144
|
},
|
|
1132
|
-
children: /* @__PURE__ */ p(
|
|
1145
|
+
children: /* @__PURE__ */ p(rn, {
|
|
1133
1146
|
className: G("max-w-4xl", c, e),
|
|
1134
|
-
children: [/* @__PURE__ */ p(
|
|
1147
|
+
children: [/* @__PURE__ */ p(an, { children: [/* @__PURE__ */ f(sn, {
|
|
1135
1148
|
className: o ? void 0 : "sr-only",
|
|
1136
1149
|
children: o || "Modal"
|
|
1137
|
-
}), /* @__PURE__ */ f(
|
|
1150
|
+
}), /* @__PURE__ */ f(cn, {
|
|
1138
1151
|
className: s ? void 0 : "sr-only",
|
|
1139
1152
|
children: s || "Modal content"
|
|
1140
1153
|
})] }), i]
|
|
1141
1154
|
})
|
|
1142
1155
|
});
|
|
1143
1156
|
}
|
|
1144
|
-
function
|
|
1145
|
-
let [e, t] = A(
|
|
1157
|
+
function Sn() {
|
|
1158
|
+
let [e, t] = A(bn), { open: n, reactNode: r, onCompleted: i } = e, a = (e, n) => {
|
|
1146
1159
|
t({
|
|
1147
1160
|
open: !0,
|
|
1148
1161
|
reactNode: e,
|
|
@@ -1166,7 +1179,7 @@ function bn() {
|
|
|
1166
1179
|
}
|
|
1167
1180
|
//#endregion
|
|
1168
1181
|
//#region ~icons/lucide/circle.jsx
|
|
1169
|
-
var
|
|
1182
|
+
var Cn = (e) => /* @__PURE__ */ f("svg", {
|
|
1170
1183
|
viewBox: "0 0 24 24",
|
|
1171
1184
|
width: "1.2em",
|
|
1172
1185
|
height: "1.2em",
|
|
@@ -1181,32 +1194,32 @@ var xn = (e) => /* @__PURE__ */ f("svg", {
|
|
|
1181
1194
|
strokeLinejoin: "round",
|
|
1182
1195
|
strokeWidth: 2
|
|
1183
1196
|
})
|
|
1184
|
-
}),
|
|
1197
|
+
}), wn = j.Root, Tn = j.Trigger, En = j.Group, Dn = j.Portal, On = j.Sub, kn = j.RadioGroup, An = e.forwardRef(({ className: e, inset: t, children: n, ...r }, i) => /* @__PURE__ */ p(j.SubTrigger, {
|
|
1185
1198
|
ref: i,
|
|
1186
1199
|
className: G("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground", t && "pl-8", e),
|
|
1187
1200
|
...r,
|
|
1188
|
-
children: [n, /* @__PURE__ */ f(
|
|
1201
|
+
children: [n, /* @__PURE__ */ f(dt, { className: "ml-auto h-4 w-4" })]
|
|
1189
1202
|
}));
|
|
1190
|
-
|
|
1191
|
-
var
|
|
1203
|
+
An.displayName = j.SubTrigger.displayName;
|
|
1204
|
+
var jn = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(j.SubContent, {
|
|
1192
1205
|
ref: n,
|
|
1193
1206
|
className: G("z-50 min-w-32 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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 origin-[--radix-context-menu-content-transform-origin]", e),
|
|
1194
1207
|
...t
|
|
1195
1208
|
}));
|
|
1196
|
-
|
|
1197
|
-
var
|
|
1209
|
+
jn.displayName = j.SubContent.displayName;
|
|
1210
|
+
var Mn = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(j.Portal, { children: /* @__PURE__ */ f(j.Content, {
|
|
1198
1211
|
ref: n,
|
|
1199
1212
|
className: G("z-50 max-h-[--radix-context-menu-content-available-height] min-w-32 overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md animate-in fade-in-80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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 origin-[--radix-context-menu-content-transform-origin]", e),
|
|
1200
1213
|
...t
|
|
1201
1214
|
}) }));
|
|
1202
|
-
|
|
1203
|
-
var
|
|
1215
|
+
Mn.displayName = j.Content.displayName;
|
|
1216
|
+
var Nn = e.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */ f(j.Item, {
|
|
1204
1217
|
ref: r,
|
|
1205
1218
|
className: G("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50", t && "pl-8", e),
|
|
1206
1219
|
...n
|
|
1207
1220
|
}));
|
|
1208
|
-
|
|
1209
|
-
var
|
|
1221
|
+
Nn.displayName = j.Item.displayName;
|
|
1222
|
+
var Pn = e.forwardRef(({ className: e, children: t, checked: n, ...r }, i) => /* @__PURE__ */ p(j.CheckboxItem, {
|
|
1210
1223
|
ref: i,
|
|
1211
1224
|
className: G("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50", e),
|
|
1212
1225
|
checked: n,
|
|
@@ -1216,34 +1229,34 @@ var Mn = e.forwardRef(({ className: e, children: t, checked: n, ...r }, i) => /*
|
|
|
1216
1229
|
children: /* @__PURE__ */ f(j.ItemIndicator, { children: /* @__PURE__ */ f(q, { className: "h-4 w-4" }) })
|
|
1217
1230
|
}), t]
|
|
1218
1231
|
}));
|
|
1219
|
-
|
|
1220
|
-
var
|
|
1232
|
+
Pn.displayName = j.CheckboxItem.displayName;
|
|
1233
|
+
var Fn = e.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ p(j.RadioItem, {
|
|
1221
1234
|
ref: r,
|
|
1222
1235
|
className: G("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50", e),
|
|
1223
1236
|
...n,
|
|
1224
1237
|
children: [/* @__PURE__ */ f("span", {
|
|
1225
1238
|
className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center",
|
|
1226
|
-
children: /* @__PURE__ */ f(j.ItemIndicator, { children: /* @__PURE__ */ f(
|
|
1239
|
+
children: /* @__PURE__ */ f(j.ItemIndicator, { children: /* @__PURE__ */ f(Cn, { className: "h-2 w-2 fill-current" }) })
|
|
1227
1240
|
}), t]
|
|
1228
1241
|
}));
|
|
1229
|
-
|
|
1230
|
-
var
|
|
1242
|
+
Fn.displayName = j.RadioItem.displayName;
|
|
1243
|
+
var In = e.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */ f(j.Label, {
|
|
1231
1244
|
ref: r,
|
|
1232
1245
|
className: G("px-2 py-1.5 text-sm font-semibold text-foreground", t && "pl-8", e),
|
|
1233
1246
|
...n
|
|
1234
1247
|
}));
|
|
1235
|
-
|
|
1236
|
-
var
|
|
1248
|
+
In.displayName = j.Label.displayName;
|
|
1249
|
+
var Ln = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(j.Separator, {
|
|
1237
1250
|
ref: n,
|
|
1238
1251
|
className: G("-mx-1 my-1 h-px bg-border", e),
|
|
1239
1252
|
...t
|
|
1240
1253
|
}));
|
|
1241
|
-
|
|
1242
|
-
var
|
|
1254
|
+
Ln.displayName = j.Separator.displayName;
|
|
1255
|
+
var Rn = ({ className: e, ...t }) => /* @__PURE__ */ f("span", {
|
|
1243
1256
|
className: G("ml-auto text-xs tracking-widest text-muted-foreground", e),
|
|
1244
1257
|
...t
|
|
1245
1258
|
});
|
|
1246
|
-
|
|
1259
|
+
Rn.displayName = "ContextMenuShortcut";
|
|
1247
1260
|
//#endregion
|
|
1248
1261
|
//#region src/components/ui/input.tsx
|
|
1249
1262
|
var Q = e.forwardRef(({ className: e, type: t, onValueChange: n, onChange: r, ...i }, a) => {
|
|
@@ -1262,7 +1275,7 @@ var Q = e.forwardRef(({ className: e, type: t, onValueChange: n, onChange: r, ..
|
|
|
1262
1275
|
Q.displayName = "Input";
|
|
1263
1276
|
//#endregion
|
|
1264
1277
|
//#region src/components/ui/date-input.tsx
|
|
1265
|
-
function
|
|
1278
|
+
function zn({ value: e, onValueChange: t, ...n }) {
|
|
1266
1279
|
return /* @__PURE__ */ f(Q, {
|
|
1267
1280
|
type: "datetime-local",
|
|
1268
1281
|
value: e ? e instanceof Date ? e.toISOString().slice(0, 16) : new Date(e).toISOString().slice(0, 16) : "",
|
|
@@ -1272,7 +1285,7 @@ function Ln({ value: e, onValueChange: t, ...n }) {
|
|
|
1272
1285
|
}
|
|
1273
1286
|
//#endregion
|
|
1274
1287
|
//#region ~icons/lucide/calendar.jsx
|
|
1275
|
-
var
|
|
1288
|
+
var Bn = (e) => /* @__PURE__ */ f("svg", {
|
|
1276
1289
|
viewBox: "0 0 24 24",
|
|
1277
1290
|
width: "1.2em",
|
|
1278
1291
|
height: "1.2em",
|
|
@@ -1298,7 +1311,7 @@ var Rn = (e) => /* @__PURE__ */ f("svg", {
|
|
|
1298
1311
|
});
|
|
1299
1312
|
//#endregion
|
|
1300
1313
|
//#region src/components/ui/date-picker.tsx
|
|
1301
|
-
function
|
|
1314
|
+
function Vn({ value: e, onValueChange: t, placeholder: n, disabled: r = !1, className: i }) {
|
|
1302
1315
|
let { SD: a } = J(), o = n ?? a("rc.datePicker.pickDate");
|
|
1303
1316
|
return /* @__PURE__ */ p(Y, { children: [/* @__PURE__ */ f(X, {
|
|
1304
1317
|
asChild: !0,
|
|
@@ -1307,12 +1320,12 @@ function zn({ value: e, onValueChange: t, placeholder: n, disabled: r = !1, clas
|
|
|
1307
1320
|
disabled: r,
|
|
1308
1321
|
"data-empty": !e,
|
|
1309
1322
|
className: G("w-full justify-start text-left font-normal", "data-[empty=true]:text-muted-foreground", i),
|
|
1310
|
-
children: [/* @__PURE__ */ f(
|
|
1323
|
+
children: [/* @__PURE__ */ f(Bn, {}), e ? M(e, "PPP") : /* @__PURE__ */ f("span", { children: o })]
|
|
1311
1324
|
})
|
|
1312
1325
|
}), /* @__PURE__ */ f(Z, {
|
|
1313
1326
|
className: "w-auto p-0",
|
|
1314
1327
|
align: "start",
|
|
1315
|
-
children: /* @__PURE__ */ f(
|
|
1328
|
+
children: /* @__PURE__ */ f(xt, {
|
|
1316
1329
|
mode: "single",
|
|
1317
1330
|
selected: e,
|
|
1318
1331
|
onSelect: (e) => {
|
|
@@ -1322,7 +1335,7 @@ function zn({ value: e, onValueChange: t, placeholder: n, disabled: r = !1, clas
|
|
|
1322
1335
|
})
|
|
1323
1336
|
})] });
|
|
1324
1337
|
}
|
|
1325
|
-
function
|
|
1338
|
+
function Hn({ value: t, onValueChange: n, placeholder: r, disabled: i = !1, className: a }) {
|
|
1326
1339
|
let { SD: o } = J(), s = r ?? o("rc.datePicker.selectDate"), [c, l] = e.useState(!1);
|
|
1327
1340
|
return /* @__PURE__ */ p(Y, {
|
|
1328
1341
|
open: c,
|
|
@@ -1333,12 +1346,12 @@ function Bn({ value: t, onValueChange: n, placeholder: r, disabled: i = !1, clas
|
|
|
1333
1346
|
variant: "outline",
|
|
1334
1347
|
disabled: i,
|
|
1335
1348
|
className: G("w-full justify-between font-normal", !t && "text-muted-foreground", a),
|
|
1336
|
-
children: [t ? t.toLocaleDateString() : s, /* @__PURE__ */ f(
|
|
1349
|
+
children: [t ? t.toLocaleDateString() : s, /* @__PURE__ */ f(Bn, {})]
|
|
1337
1350
|
})
|
|
1338
1351
|
}), /* @__PURE__ */ f(Z, {
|
|
1339
1352
|
className: "w-auto overflow-hidden p-0",
|
|
1340
1353
|
align: "start",
|
|
1341
|
-
children: /* @__PURE__ */ f(
|
|
1354
|
+
children: /* @__PURE__ */ f(xt, {
|
|
1342
1355
|
mode: "single",
|
|
1343
1356
|
selected: t,
|
|
1344
1357
|
captionLayout: "dropdown",
|
|
@@ -1349,7 +1362,7 @@ function Bn({ value: t, onValueChange: n, placeholder: r, disabled: i = !1, clas
|
|
|
1349
1362
|
})]
|
|
1350
1363
|
});
|
|
1351
1364
|
}
|
|
1352
|
-
function
|
|
1365
|
+
function Un({ CalendarIcon: t, value: n, onValueChange: r, placeholder: i = "Pick a date", dateFormat: a = "yyyy/MM/dd", className: o = "", numberOfMonths: s = 2, maxDate: c, minDate: l }) {
|
|
1353
1366
|
let [u, d] = e.useState(!1), m = e.useMemo(() => {
|
|
1354
1367
|
if (!n?.from && !n?.to) return i;
|
|
1355
1368
|
let e = n?.from ? M(n.from, a) : "", t = n?.to ? M(n.to, a) : "";
|
|
@@ -1377,7 +1390,7 @@ function Vn({ CalendarIcon: t, value: n, onValueChange: r, placeholder: i = "Pic
|
|
|
1377
1390
|
}), /* @__PURE__ */ f(Z, {
|
|
1378
1391
|
className: "w-auto p-0",
|
|
1379
1392
|
align: "start",
|
|
1380
|
-
children: /* @__PURE__ */ f(
|
|
1393
|
+
children: /* @__PURE__ */ f(xt, {
|
|
1381
1394
|
mode: "range",
|
|
1382
1395
|
defaultMonth: n?.from ?? (n?.to ? new Date(n.to.getFullYear(), n.to.getMonth() - 1, 1) : void 0),
|
|
1383
1396
|
selected: n,
|
|
@@ -1390,75 +1403,75 @@ function Vn({ CalendarIcon: t, value: n, onValueChange: r, placeholder: i = "Pic
|
|
|
1390
1403
|
}
|
|
1391
1404
|
//#endregion
|
|
1392
1405
|
//#region src/components/ui/drawer.tsx
|
|
1393
|
-
var
|
|
1406
|
+
var Wn = ({ shouldScaleBackground: e = !0, ...t }) => /* @__PURE__ */ f(N.Root, {
|
|
1394
1407
|
shouldScaleBackground: e,
|
|
1395
1408
|
...t
|
|
1396
1409
|
});
|
|
1397
|
-
|
|
1398
|
-
var
|
|
1410
|
+
Wn.displayName = "Drawer";
|
|
1411
|
+
var Gn = N.Trigger, Kn = N.Portal, qn = N.Close, Jn = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(N.Overlay, {
|
|
1399
1412
|
ref: n,
|
|
1400
1413
|
className: G("fixed inset-0 z-50 bg-black/80", e),
|
|
1401
1414
|
...t
|
|
1402
1415
|
}));
|
|
1403
|
-
|
|
1404
|
-
var
|
|
1416
|
+
Jn.displayName = N.Overlay.displayName;
|
|
1417
|
+
var Yn = e.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ p(Kn, { children: [/* @__PURE__ */ f(Jn, {}), /* @__PURE__ */ p(N.Content, {
|
|
1405
1418
|
ref: r,
|
|
1406
1419
|
className: G("fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background", e),
|
|
1407
1420
|
...n,
|
|
1408
1421
|
children: [/* @__PURE__ */ f("div", { className: "mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted" }), t]
|
|
1409
1422
|
})] }));
|
|
1410
|
-
|
|
1411
|
-
var
|
|
1423
|
+
Yn.displayName = "DrawerContent";
|
|
1424
|
+
var Xn = ({ className: e, ...t }) => /* @__PURE__ */ f("div", {
|
|
1412
1425
|
className: G("grid gap-1.5 p-4 text-center sm:text-left", e),
|
|
1413
1426
|
...t
|
|
1414
1427
|
});
|
|
1415
|
-
|
|
1416
|
-
var
|
|
1428
|
+
Xn.displayName = "DrawerHeader";
|
|
1429
|
+
var Zn = ({ className: e, ...t }) => /* @__PURE__ */ f("div", {
|
|
1417
1430
|
className: G("mt-auto flex flex-col gap-2 p-4", e),
|
|
1418
1431
|
...t
|
|
1419
1432
|
});
|
|
1420
|
-
|
|
1421
|
-
var
|
|
1433
|
+
Zn.displayName = "DrawerFooter";
|
|
1434
|
+
var Qn = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(N.Title, {
|
|
1422
1435
|
ref: n,
|
|
1423
1436
|
className: G("text-lg font-semibold leading-none tracking-tight", e),
|
|
1424
1437
|
...t
|
|
1425
1438
|
}));
|
|
1426
|
-
|
|
1427
|
-
var
|
|
1439
|
+
Qn.displayName = N.Title.displayName;
|
|
1440
|
+
var $n = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(N.Description, {
|
|
1428
1441
|
ref: n,
|
|
1429
1442
|
className: G("text-sm text-muted-foreground", e),
|
|
1430
1443
|
...t
|
|
1431
1444
|
}));
|
|
1432
|
-
|
|
1445
|
+
$n.displayName = N.Description.displayName;
|
|
1433
1446
|
//#endregion
|
|
1434
1447
|
//#region src/components/ui/dropdown-menu.tsx
|
|
1435
|
-
var
|
|
1448
|
+
var er = P.Root, tr = P.Trigger, nr = P.Group, rr = P.Portal, ir = P.Sub, ar = P.RadioGroup, or = e.forwardRef(({ className: e, inset: t, children: n, ...r }, i) => /* @__PURE__ */ p(P.SubTrigger, {
|
|
1436
1449
|
ref: i,
|
|
1437
1450
|
className: G("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", t && "pl-8", e),
|
|
1438
1451
|
...r,
|
|
1439
|
-
children: [n, /* @__PURE__ */ f(
|
|
1452
|
+
children: [n, /* @__PURE__ */ f(dt, { className: "ml-auto" })]
|
|
1440
1453
|
}));
|
|
1441
|
-
|
|
1442
|
-
var
|
|
1454
|
+
or.displayName = P.SubTrigger.displayName;
|
|
1455
|
+
var sr = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(P.SubContent, {
|
|
1443
1456
|
ref: n,
|
|
1444
1457
|
className: G("z-50 min-w-32 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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 origin-[--radix-dropdown-menu-content-transform-origin]", e),
|
|
1445
1458
|
...t
|
|
1446
1459
|
}));
|
|
1447
|
-
|
|
1448
|
-
var
|
|
1460
|
+
sr.displayName = P.SubContent.displayName;
|
|
1461
|
+
var cr = e.forwardRef(({ className: e, sideOffset: t = 4, ...n }, r) => /* @__PURE__ */ f(P.Portal, { children: /* @__PURE__ */ f(P.Content, {
|
|
1449
1462
|
ref: r,
|
|
1450
1463
|
sideOffset: t,
|
|
1451
1464
|
className: G("z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-32 overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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 origin-[--radix-dropdown-menu-content-transform-origin]", e),
|
|
1452
1465
|
...n
|
|
1453
1466
|
}) }));
|
|
1454
|
-
|
|
1455
|
-
var
|
|
1467
|
+
cr.displayName = P.Content.displayName;
|
|
1468
|
+
var lr = e.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */ f(P.Item, {
|
|
1456
1469
|
ref: r,
|
|
1457
1470
|
className: G("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", t && "pl-8", e),
|
|
1458
1471
|
...n
|
|
1459
1472
|
}));
|
|
1460
|
-
|
|
1461
|
-
var
|
|
1473
|
+
lr.displayName = P.Item.displayName;
|
|
1474
|
+
var ur = e.forwardRef(({ className: e, children: t, checked: n, ...r }, i) => /* @__PURE__ */ p(P.CheckboxItem, {
|
|
1462
1475
|
ref: i,
|
|
1463
1476
|
className: G("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50", e),
|
|
1464
1477
|
checked: n,
|
|
@@ -1468,50 +1481,37 @@ var cr = e.forwardRef(({ className: e, children: t, checked: n, ...r }, i) => /*
|
|
|
1468
1481
|
children: /* @__PURE__ */ f(P.ItemIndicator, { children: /* @__PURE__ */ f(q, { className: "h-4 w-4" }) })
|
|
1469
1482
|
}), t]
|
|
1470
1483
|
}));
|
|
1471
|
-
|
|
1472
|
-
var
|
|
1484
|
+
ur.displayName = P.CheckboxItem.displayName;
|
|
1485
|
+
var dr = e.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ p(P.RadioItem, {
|
|
1473
1486
|
ref: r,
|
|
1474
1487
|
className: G("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50", e),
|
|
1475
1488
|
...n,
|
|
1476
1489
|
children: [/* @__PURE__ */ f("span", {
|
|
1477
1490
|
className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center",
|
|
1478
|
-
children: /* @__PURE__ */ f(P.ItemIndicator, { children: /* @__PURE__ */ f(
|
|
1491
|
+
children: /* @__PURE__ */ f(P.ItemIndicator, { children: /* @__PURE__ */ f(Cn, { className: "h-2 w-2 fill-current" }) })
|
|
1479
1492
|
}), t]
|
|
1480
1493
|
}));
|
|
1481
|
-
|
|
1482
|
-
var
|
|
1494
|
+
dr.displayName = P.RadioItem.displayName;
|
|
1495
|
+
var fr = e.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */ f(P.Label, {
|
|
1483
1496
|
ref: r,
|
|
1484
1497
|
className: G("px-2 py-1.5 text-sm font-semibold", t && "pl-8", e),
|
|
1485
1498
|
...n
|
|
1486
1499
|
}));
|
|
1487
|
-
|
|
1488
|
-
var
|
|
1500
|
+
fr.displayName = P.Label.displayName;
|
|
1501
|
+
var pr = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(P.Separator, {
|
|
1489
1502
|
ref: n,
|
|
1490
1503
|
className: G("-mx-1 my-1 h-px bg-muted", e),
|
|
1491
1504
|
...t
|
|
1492
1505
|
}));
|
|
1493
|
-
|
|
1494
|
-
var
|
|
1506
|
+
pr.displayName = P.Separator.displayName;
|
|
1507
|
+
var mr = ({ className: e, ...t }) => /* @__PURE__ */ f("span", {
|
|
1495
1508
|
className: G("ml-auto text-xs tracking-widest opacity-60", e),
|
|
1496
1509
|
...t
|
|
1497
1510
|
});
|
|
1498
|
-
|
|
1511
|
+
mr.displayName = "DropdownMenuShortcut";
|
|
1499
1512
|
//#endregion
|
|
1500
|
-
//#region ~icons/lucide/
|
|
1501
|
-
var
|
|
1502
|
-
viewBox: "0 0 24 24",
|
|
1503
|
-
width: "1.2em",
|
|
1504
|
-
height: "1.2em",
|
|
1505
|
-
...e,
|
|
1506
|
-
children: /* @__PURE__ */ p("g", {
|
|
1507
|
-
fill: "none",
|
|
1508
|
-
stroke: "currentColor",
|
|
1509
|
-
strokeLinecap: "round",
|
|
1510
|
-
strokeLinejoin: "round",
|
|
1511
|
-
strokeWidth: 2,
|
|
1512
|
-
children: [/* @__PURE__ */ f("path", { d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" }), /* @__PURE__ */ f("path", { d: "M14 2v5a1 1 0 0 0 1 1h5" })]
|
|
1513
|
-
})
|
|
1514
|
-
}), mr = (e) => /* @__PURE__ */ f("svg", {
|
|
1513
|
+
//#region ~icons/lucide/image.jsx
|
|
1514
|
+
var hr = (e) => /* @__PURE__ */ f("svg", {
|
|
1515
1515
|
viewBox: "0 0 24 24",
|
|
1516
1516
|
width: "1.2em",
|
|
1517
1517
|
height: "1.2em",
|
|
@@ -1539,7 +1539,7 @@ var pr = (e) => /* @__PURE__ */ f("svg", {
|
|
|
1539
1539
|
/* @__PURE__ */ f("path", { d: "m21 15l-3.086-3.086a2 2 0 0 0-2.828 0L6 21" })
|
|
1540
1540
|
]
|
|
1541
1541
|
})
|
|
1542
|
-
}),
|
|
1542
|
+
}), gr = (e) => /* @__PURE__ */ f("svg", {
|
|
1543
1543
|
viewBox: "0 0 24 24",
|
|
1544
1544
|
width: "1.2em",
|
|
1545
1545
|
height: "1.2em",
|
|
@@ -1552,7 +1552,7 @@ var pr = (e) => /* @__PURE__ */ f("svg", {
|
|
|
1552
1552
|
strokeWidth: 2,
|
|
1553
1553
|
d: "M21 12a9 9 0 1 1-6.219-8.56"
|
|
1554
1554
|
})
|
|
1555
|
-
}),
|
|
1555
|
+
}), _r = (e) => /* @__PURE__ */ f("svg", {
|
|
1556
1556
|
viewBox: "0 0 24 24",
|
|
1557
1557
|
width: "1.2em",
|
|
1558
1558
|
height: "1.2em",
|
|
@@ -1565,131 +1565,162 @@ var pr = (e) => /* @__PURE__ */ f("svg", {
|
|
|
1565
1565
|
strokeWidth: 2,
|
|
1566
1566
|
d: "M12 3v12m5-7l-5-5l-5 5m14 7v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"
|
|
1567
1567
|
})
|
|
1568
|
-
})
|
|
1568
|
+
});
|
|
1569
|
+
//#endregion
|
|
1570
|
+
//#region src/components/ui/file-input.tsx
|
|
1571
|
+
function vr(e) {
|
|
1572
|
+
let t = e.split(".");
|
|
1573
|
+
return t.length < 2 ? "" : t[t.length - 1].toLowerCase();
|
|
1574
|
+
}
|
|
1575
|
+
var yr = {
|
|
1576
|
+
sm: 14,
|
|
1577
|
+
md: 18,
|
|
1578
|
+
lg: 22,
|
|
1579
|
+
xl: 26
|
|
1580
|
+
};
|
|
1581
|
+
function br({ filename: e, size: t = "md" }) {
|
|
1582
|
+
let n = vr(e), r = n && n in ee ? ee[n] : {};
|
|
1583
|
+
return /* @__PURE__ */ f("div", {
|
|
1584
|
+
className: "shrink-0 self-center",
|
|
1585
|
+
style: {
|
|
1586
|
+
width: yr[t],
|
|
1587
|
+
marginTop: -2
|
|
1588
|
+
},
|
|
1589
|
+
children: /* @__PURE__ */ f(F, {
|
|
1590
|
+
extension: n || void 0,
|
|
1591
|
+
...r
|
|
1592
|
+
})
|
|
1593
|
+
});
|
|
1594
|
+
}
|
|
1595
|
+
var xr = {
|
|
1569
1596
|
sm: "w-20 h-20",
|
|
1570
1597
|
md: "w-32 h-32",
|
|
1571
1598
|
lg: "w-40 h-40",
|
|
1572
1599
|
xl: "w-48 h-48"
|
|
1573
|
-
},
|
|
1600
|
+
}, Sr = {
|
|
1574
1601
|
sm: "w-48 h-12",
|
|
1575
1602
|
md: "w-80 h-16",
|
|
1576
1603
|
lg: "w-96 h-20",
|
|
1577
1604
|
xl: "w-[28rem] h-24"
|
|
1578
1605
|
};
|
|
1579
|
-
function
|
|
1580
|
-
let { placeholder: t, disabled: n = !1, className: i, previewSize: a = "md", uploadMode: o, viewMode: s,
|
|
1581
|
-
if (!
|
|
1606
|
+
function Cr(e) {
|
|
1607
|
+
let { placeholder: t, disabled: n = !1, className: i, previewSize: a = "md", uploadMode: o, viewMode: s, uploadParams: u, onBlur: m } = e, { uploader: h, SD: g } = J(), _ = e.multiple ?? !1, v = s === "image", y = e.accept ?? (v ? "image/*" : "*/*"), b = c(null), [x, S] = l(!1), [C, w] = l(!1), T = t ?? `${g(v ? "rc.fileInput.imagePlaceholder" : "rc.fileInput.filePlaceholder")} URL${_ ? "S" : ""}`, E = (() => {
|
|
1608
|
+
if (!_) {
|
|
1582
1609
|
let t = e.value;
|
|
1583
1610
|
return t ? [t] : [];
|
|
1584
1611
|
}
|
|
1585
1612
|
return e.value || [];
|
|
1586
|
-
})(),
|
|
1587
|
-
url: D
|
|
1613
|
+
})(), D = E.filter((e) => e instanceof File), O = Le(D), k = E.map((e) => e instanceof File ? {
|
|
1614
|
+
url: O[D.indexOf(e)],
|
|
1588
1615
|
name: e.name,
|
|
1589
1616
|
isPending: !0
|
|
1590
1617
|
} : {
|
|
1591
1618
|
url: e.url,
|
|
1592
1619
|
name: e.name,
|
|
1593
1620
|
isPending: !1
|
|
1594
|
-
}),
|
|
1621
|
+
}), A = _ ? e.maxFiles ?? 10 : 1, j = E.length, M = j < A, N = r(async (t) => {
|
|
1595
1622
|
if (t.length === 0 || n) return;
|
|
1596
|
-
let r =
|
|
1623
|
+
let r = A - j;
|
|
1597
1624
|
if (r <= 0) {
|
|
1598
|
-
alert(
|
|
1625
|
+
alert(g("rc.fileInput.maxFilesExceeded")(A));
|
|
1599
1626
|
return;
|
|
1600
1627
|
}
|
|
1601
1628
|
let i = t.slice(0, r);
|
|
1602
1629
|
if (o === "eager") {
|
|
1603
|
-
|
|
1630
|
+
S(!0);
|
|
1604
1631
|
try {
|
|
1605
|
-
let t = await
|
|
1606
|
-
if (
|
|
1607
|
-
let n = [...
|
|
1632
|
+
let t = await h(i, u);
|
|
1633
|
+
if (_) {
|
|
1634
|
+
let n = [...E, ...t];
|
|
1608
1635
|
e.onValueChange?.(n);
|
|
1609
1636
|
} else e.onValueChange?.(t[0]);
|
|
1610
1637
|
} catch (e) {
|
|
1611
|
-
console.error("Upload failed:", e), alert(
|
|
1638
|
+
console.error("Upload failed:", e), alert(g("rc.fileInput.uploadFailed"));
|
|
1612
1639
|
} finally {
|
|
1613
|
-
|
|
1640
|
+
S(!1);
|
|
1614
1641
|
}
|
|
1615
|
-
} else if (
|
|
1616
|
-
let t = [...
|
|
1642
|
+
} else if (_) {
|
|
1643
|
+
let t = [...E, ...i];
|
|
1617
1644
|
e.onValueChange?.(t);
|
|
1618
1645
|
} else e.onValueChange?.(i[0]);
|
|
1619
1646
|
}, [
|
|
1620
1647
|
n,
|
|
1648
|
+
j,
|
|
1621
1649
|
A,
|
|
1622
|
-
|
|
1623
|
-
g,
|
|
1650
|
+
_,
|
|
1624
1651
|
o,
|
|
1625
|
-
|
|
1652
|
+
u,
|
|
1653
|
+
E,
|
|
1626
1654
|
e,
|
|
1627
|
-
|
|
1628
|
-
]),
|
|
1629
|
-
|
|
1630
|
-
}, [
|
|
1631
|
-
e.preventDefault(),
|
|
1655
|
+
h
|
|
1656
|
+
]), P = r((e) => {
|
|
1657
|
+
N(Array.from(e.target.files || [])), b.current && (b.current.value = "");
|
|
1658
|
+
}, [N]), F = r((e) => {
|
|
1659
|
+
e.preventDefault(), w(!1), !(n || x) && N(Array.from(e.dataTransfer.files));
|
|
1632
1660
|
}, [
|
|
1633
|
-
|
|
1661
|
+
N,
|
|
1634
1662
|
n,
|
|
1635
|
-
|
|
1636
|
-
]),
|
|
1637
|
-
if (n.stopPropagation(), !
|
|
1663
|
+
x
|
|
1664
|
+
]), ee = r((t) => (n) => {
|
|
1665
|
+
if (n.stopPropagation(), !_) e.onValueChange?.(null);
|
|
1638
1666
|
else {
|
|
1639
|
-
let n =
|
|
1667
|
+
let n = E.filter((e, n) => n !== t);
|
|
1640
1668
|
e.onValueChange?.(n);
|
|
1641
1669
|
}
|
|
1642
1670
|
}, [
|
|
1643
|
-
|
|
1644
|
-
|
|
1671
|
+
E,
|
|
1672
|
+
_,
|
|
1645
1673
|
e.onValueChange
|
|
1646
|
-
]),
|
|
1647
|
-
!n && !
|
|
1648
|
-
},
|
|
1649
|
-
if (!
|
|
1650
|
-
let e =
|
|
1674
|
+
]), te = () => {
|
|
1675
|
+
!n && !x && b.current?.click();
|
|
1676
|
+
}, I = v ? xr : Sr;
|
|
1677
|
+
if (!_ && k.length > 0) {
|
|
1678
|
+
let e = k[0];
|
|
1651
1679
|
return /* @__PURE__ */ p("div", {
|
|
1652
1680
|
className: G("relative inline-block", i),
|
|
1653
1681
|
children: [/* @__PURE__ */ f("input", {
|
|
1654
|
-
ref:
|
|
1682
|
+
ref: b,
|
|
1655
1683
|
type: "file",
|
|
1656
|
-
accept:
|
|
1657
|
-
onChange:
|
|
1658
|
-
onBlur:
|
|
1659
|
-
disabled: n ||
|
|
1684
|
+
accept: y,
|
|
1685
|
+
onChange: P,
|
|
1686
|
+
onBlur: m,
|
|
1687
|
+
disabled: n || x,
|
|
1660
1688
|
className: "sr-only"
|
|
1661
1689
|
}), /* @__PURE__ */ f("div", {
|
|
1662
|
-
onClick:
|
|
1663
|
-
onDrop:
|
|
1690
|
+
onClick: te,
|
|
1691
|
+
onDrop: F,
|
|
1664
1692
|
onDragOver: (e) => {
|
|
1665
|
-
e.preventDefault(), !n && !
|
|
1693
|
+
e.preventDefault(), !n && !x && w(!0);
|
|
1666
1694
|
},
|
|
1667
1695
|
onDragLeave: (e) => {
|
|
1668
|
-
e.preventDefault(),
|
|
1696
|
+
e.preventDefault(), w(!1);
|
|
1669
1697
|
},
|
|
1670
|
-
className: G("relative flex items-center justify-center rounded-lg border-2 cursor-pointer transition-all",
|
|
1671
|
-
children:
|
|
1698
|
+
className: G("relative flex items-center justify-center rounded-lg border-2 cursor-pointer transition-all", I[a], v ? "border-transparent" : "border-dashed border-muted-foreground/25 hover:border-muted-foreground/50", C && "border-primary bg-primary/5", n && "opacity-50 cursor-not-allowed", x && "cursor-wait"),
|
|
1699
|
+
children: x ? /* @__PURE__ */ p("div", {
|
|
1672
1700
|
className: "flex flex-col items-center gap-2 text-muted-foreground",
|
|
1673
|
-
children: [/* @__PURE__ */ f(
|
|
1701
|
+
children: [/* @__PURE__ */ f(gr, { className: "h-6 w-6 animate-spin" }), /* @__PURE__ */ f("span", {
|
|
1674
1702
|
className: "text-xs",
|
|
1675
|
-
children:
|
|
1703
|
+
children: g("rc.fileInput.uploading")
|
|
1676
1704
|
})]
|
|
1677
1705
|
}) : /* @__PURE__ */ p(d, { children: [
|
|
1678
|
-
|
|
1706
|
+
v ? /* @__PURE__ */ f("img", {
|
|
1679
1707
|
src: e.url,
|
|
1680
1708
|
alt: "Preview",
|
|
1681
1709
|
className: "h-full w-full object-cover rounded-lg overflow-hidden"
|
|
1682
1710
|
}) : /* @__PURE__ */ p("div", {
|
|
1683
1711
|
className: "flex items-center gap-2 px-3 h-full w-full min-w-0 overflow-hidden",
|
|
1684
1712
|
children: [
|
|
1685
|
-
/* @__PURE__ */ f(
|
|
1713
|
+
/* @__PURE__ */ f(br, {
|
|
1714
|
+
filename: e.name,
|
|
1715
|
+
size: a
|
|
1716
|
+
}),
|
|
1686
1717
|
/* @__PURE__ */ f("span", {
|
|
1687
1718
|
className: G("text-xs truncate min-w-0", e.isPending ? "w-[140px] shrink-0" : "flex-1"),
|
|
1688
1719
|
children: e.name
|
|
1689
1720
|
}),
|
|
1690
1721
|
e.isPending && /* @__PURE__ */ f("span", {
|
|
1691
1722
|
className: "px-2 py-0.5 bg-yellow-500/90 text-white text-xs rounded whitespace-nowrap shrink-0",
|
|
1692
|
-
children:
|
|
1723
|
+
children: g("rc.fileInput.pending")
|
|
1693
1724
|
})
|
|
1694
1725
|
]
|
|
1695
1726
|
}),
|
|
@@ -1698,12 +1729,12 @@ function yr(e) {
|
|
|
1698
1729
|
variant: "destructive",
|
|
1699
1730
|
size: "xs",
|
|
1700
1731
|
className: "absolute -top-2 -right-2 h-6 w-6 rounded-full p-0",
|
|
1701
|
-
onClick:
|
|
1702
|
-
icon: /* @__PURE__ */ f(
|
|
1732
|
+
onClick: ee(0),
|
|
1733
|
+
icon: /* @__PURE__ */ f(Zt, {})
|
|
1703
1734
|
}),
|
|
1704
|
-
|
|
1735
|
+
v && e.isPending && /* @__PURE__ */ f("div", {
|
|
1705
1736
|
className: "absolute bottom-2 left-2 right-2 mx-auto max-w-[calc(100%-1rem)] px-2 py-1 bg-yellow-500/90 text-white text-xs rounded text-center truncate",
|
|
1706
|
-
children:
|
|
1737
|
+
children: g("rc.fileInput.pending")
|
|
1707
1738
|
})
|
|
1708
1739
|
] })
|
|
1709
1740
|
})]
|
|
@@ -1713,19 +1744,19 @@ function yr(e) {
|
|
|
1713
1744
|
className: G("flex flex-wrap gap-3", i),
|
|
1714
1745
|
children: [
|
|
1715
1746
|
/* @__PURE__ */ f("input", {
|
|
1716
|
-
ref:
|
|
1747
|
+
ref: b,
|
|
1717
1748
|
type: "file",
|
|
1718
|
-
accept:
|
|
1719
|
-
multiple:
|
|
1720
|
-
onChange:
|
|
1721
|
-
onBlur:
|
|
1722
|
-
disabled: n ||
|
|
1749
|
+
accept: y,
|
|
1750
|
+
multiple: _,
|
|
1751
|
+
onChange: P,
|
|
1752
|
+
onBlur: m,
|
|
1753
|
+
disabled: n || x,
|
|
1723
1754
|
className: "sr-only"
|
|
1724
1755
|
}),
|
|
1725
|
-
|
|
1726
|
-
className: G("relative",
|
|
1756
|
+
k.map((e, t) => /* @__PURE__ */ p("div", {
|
|
1757
|
+
className: G("relative", I[a]),
|
|
1727
1758
|
children: [
|
|
1728
|
-
|
|
1759
|
+
v ? /* @__PURE__ */ f("div", {
|
|
1729
1760
|
className: "h-full w-full rounded-lg border overflow-hidden",
|
|
1730
1761
|
children: /* @__PURE__ */ f("img", {
|
|
1731
1762
|
src: e.url,
|
|
@@ -1735,14 +1766,17 @@ function yr(e) {
|
|
|
1735
1766
|
}) : /* @__PURE__ */ p("div", {
|
|
1736
1767
|
className: G("relative flex items-center gap-2 px-3 rounded-lg border-2 min-w-0 overflow-hidden", "border-dashed border-muted-foreground/25", "h-full w-full"),
|
|
1737
1768
|
children: [
|
|
1738
|
-
/* @__PURE__ */ f(
|
|
1769
|
+
/* @__PURE__ */ f(br, {
|
|
1770
|
+
filename: e.name,
|
|
1771
|
+
size: a
|
|
1772
|
+
}),
|
|
1739
1773
|
/* @__PURE__ */ f("span", {
|
|
1740
1774
|
className: G("text-xs truncate min-w-0", e.isPending ? "w-[140px] shrink-0" : "flex-1"),
|
|
1741
1775
|
children: e.name
|
|
1742
1776
|
}),
|
|
1743
1777
|
e.isPending && /* @__PURE__ */ f("span", {
|
|
1744
1778
|
className: "px-2 py-0.5 bg-yellow-500/90 text-white text-xs rounded whitespace-nowrap shrink-0",
|
|
1745
|
-
children:
|
|
1779
|
+
children: g("rc.fileInput.pending")
|
|
1746
1780
|
})
|
|
1747
1781
|
]
|
|
1748
1782
|
}),
|
|
@@ -1751,36 +1785,36 @@ function yr(e) {
|
|
|
1751
1785
|
variant: "destructive",
|
|
1752
1786
|
size: "xs",
|
|
1753
1787
|
className: "absolute -top-2 -right-2 h-6 w-6 rounded-full p-0",
|
|
1754
|
-
onClick:
|
|
1755
|
-
icon: /* @__PURE__ */ f(
|
|
1788
|
+
onClick: ee(t),
|
|
1789
|
+
icon: /* @__PURE__ */ f(Zt, {})
|
|
1756
1790
|
}),
|
|
1757
|
-
|
|
1791
|
+
v && e.isPending && /* @__PURE__ */ f("div", {
|
|
1758
1792
|
className: "absolute bottom-2 left-2 right-2 mx-auto max-w-[calc(100%-1rem)] px-2 py-1 bg-yellow-500/90 text-white text-xs rounded text-center truncate",
|
|
1759
|
-
children:
|
|
1793
|
+
children: g("rc.fileInput.pending")
|
|
1760
1794
|
})
|
|
1761
1795
|
]
|
|
1762
1796
|
}, `${e.url}-${t}`)),
|
|
1763
|
-
|
|
1764
|
-
onClick:
|
|
1765
|
-
onDrop:
|
|
1797
|
+
M && /* @__PURE__ */ f("div", {
|
|
1798
|
+
onClick: te,
|
|
1799
|
+
onDrop: F,
|
|
1766
1800
|
onDragOver: (e) => {
|
|
1767
|
-
e.preventDefault(), !n && !
|
|
1801
|
+
e.preventDefault(), !n && !x && w(!0);
|
|
1768
1802
|
},
|
|
1769
1803
|
onDragLeave: (e) => {
|
|
1770
|
-
e.preventDefault(),
|
|
1804
|
+
e.preventDefault(), w(!1);
|
|
1771
1805
|
},
|
|
1772
|
-
className: G("flex items-center justify-center rounded-lg border-2 border-dashed cursor-pointer transition-all",
|
|
1773
|
-
children:
|
|
1806
|
+
className: G("flex items-center justify-center rounded-lg border-2 border-dashed cursor-pointer transition-all", I[a], C ? "border-primary bg-primary/5" : "border-muted-foreground/25 hover:border-muted-foreground/50", n && "opacity-50 cursor-not-allowed", x && "cursor-wait"),
|
|
1807
|
+
children: x ? /* @__PURE__ */ p("div", {
|
|
1774
1808
|
className: "flex flex-col items-center gap-2 text-muted-foreground",
|
|
1775
|
-
children: [/* @__PURE__ */ f(
|
|
1809
|
+
children: [/* @__PURE__ */ f(gr, { className: "h-6 w-6 animate-spin" }), /* @__PURE__ */ f("span", {
|
|
1776
1810
|
className: "text-xs",
|
|
1777
|
-
children:
|
|
1811
|
+
children: g("rc.fileInput.uploading")
|
|
1778
1812
|
})]
|
|
1779
1813
|
}) : /* @__PURE__ */ p("div", {
|
|
1780
1814
|
className: "flex flex-col items-center gap-2 text-muted-foreground p-2",
|
|
1781
|
-
children: [f(
|
|
1815
|
+
children: [f(v ? hr : _r, { className: "h-6 w-6" }), /* @__PURE__ */ f("span", {
|
|
1782
1816
|
className: "text-xs text-center",
|
|
1783
|
-
children:
|
|
1817
|
+
children: T
|
|
1784
1818
|
})]
|
|
1785
1819
|
})
|
|
1786
1820
|
})
|
|
@@ -1789,19 +1823,19 @@ function yr(e) {
|
|
|
1789
1823
|
}
|
|
1790
1824
|
//#endregion
|
|
1791
1825
|
//#region src/components/ui/label.tsx
|
|
1792
|
-
var
|
|
1826
|
+
var wr = g("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"), Tr = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(re.Root, {
|
|
1793
1827
|
ref: n,
|
|
1794
|
-
className: G(
|
|
1828
|
+
className: G(wr(), e),
|
|
1795
1829
|
...t
|
|
1796
1830
|
}));
|
|
1797
|
-
|
|
1831
|
+
Tr.displayName = re.Root.displayName;
|
|
1798
1832
|
//#endregion
|
|
1799
1833
|
//#region src/components/ui/form.tsx
|
|
1800
|
-
var
|
|
1834
|
+
var Er = I, Dr = e.createContext(null), Or = ({ ...e }) => /* @__PURE__ */ f(Dr.Provider, {
|
|
1801
1835
|
value: { name: e.name },
|
|
1802
|
-
children: /* @__PURE__ */ f(
|
|
1803
|
-
}),
|
|
1804
|
-
let t = e.useContext(
|
|
1836
|
+
children: /* @__PURE__ */ f(te, { ...e })
|
|
1837
|
+
}), kr = () => {
|
|
1838
|
+
let t = e.useContext(Dr), n = e.useContext(Ar), { getFieldState: r, formState: i } = ne();
|
|
1805
1839
|
if (!t) throw Error("useFormField should be used within <FormField>");
|
|
1806
1840
|
if (!n) throw Error("useFormField should be used within <FormItem>");
|
|
1807
1841
|
let a = r(t.name, i), { id: o } = n;
|
|
@@ -1813,9 +1847,9 @@ var Sr = ee, Cr = e.createContext(null), wr = ({ ...e }) => /* @__PURE__ */ f(Cr
|
|
|
1813
1847
|
formMessageId: `${o}-form-item-message`,
|
|
1814
1848
|
...a
|
|
1815
1849
|
};
|
|
1816
|
-
},
|
|
1850
|
+
}, Ar = e.createContext(null), jr = e.forwardRef(({ className: t, ...n }, r) => {
|
|
1817
1851
|
let i = e.useId();
|
|
1818
|
-
return /* @__PURE__ */ f(
|
|
1852
|
+
return /* @__PURE__ */ f(Ar.Provider, {
|
|
1819
1853
|
value: { id: i },
|
|
1820
1854
|
children: /* @__PURE__ */ f("div", {
|
|
1821
1855
|
ref: r,
|
|
@@ -1824,19 +1858,19 @@ var Sr = ee, Cr = e.createContext(null), wr = ({ ...e }) => /* @__PURE__ */ f(Cr
|
|
|
1824
1858
|
})
|
|
1825
1859
|
});
|
|
1826
1860
|
});
|
|
1827
|
-
|
|
1828
|
-
var
|
|
1829
|
-
let { error: r, formItemId: i } =
|
|
1830
|
-
return /* @__PURE__ */ f(
|
|
1861
|
+
jr.displayName = "FormItem";
|
|
1862
|
+
var Mr = e.forwardRef(({ className: e, ...t }, n) => {
|
|
1863
|
+
let { error: r, formItemId: i } = kr();
|
|
1864
|
+
return /* @__PURE__ */ f(Tr, {
|
|
1831
1865
|
ref: n,
|
|
1832
1866
|
className: G(r && "text-destructive", e),
|
|
1833
1867
|
htmlFor: i,
|
|
1834
1868
|
...t
|
|
1835
1869
|
});
|
|
1836
1870
|
});
|
|
1837
|
-
|
|
1838
|
-
var
|
|
1839
|
-
let { error: n, formItemId: r, formDescriptionId: i, formMessageId: a } =
|
|
1871
|
+
Mr.displayName = "FormLabel";
|
|
1872
|
+
var Nr = e.forwardRef(({ ...e }, t) => {
|
|
1873
|
+
let { error: n, formItemId: r, formDescriptionId: i, formMessageId: a } = kr();
|
|
1840
1874
|
return /* @__PURE__ */ f(v, {
|
|
1841
1875
|
ref: t,
|
|
1842
1876
|
id: r,
|
|
@@ -1845,9 +1879,9 @@ var kr = e.forwardRef(({ ...e }, t) => {
|
|
|
1845
1879
|
...e
|
|
1846
1880
|
});
|
|
1847
1881
|
});
|
|
1848
|
-
|
|
1849
|
-
var
|
|
1850
|
-
let { formDescriptionId: r } =
|
|
1882
|
+
Nr.displayName = "FormControl";
|
|
1883
|
+
var Pr = e.forwardRef(({ className: e, ...t }, n) => {
|
|
1884
|
+
let { formDescriptionId: r } = kr();
|
|
1851
1885
|
return /* @__PURE__ */ f("p", {
|
|
1852
1886
|
ref: n,
|
|
1853
1887
|
id: r,
|
|
@@ -1855,9 +1889,9 @@ var Ar = e.forwardRef(({ className: e, ...t }, n) => {
|
|
|
1855
1889
|
...t
|
|
1856
1890
|
});
|
|
1857
1891
|
});
|
|
1858
|
-
|
|
1859
|
-
var
|
|
1860
|
-
let { error: i, formMessageId: a } =
|
|
1892
|
+
Pr.displayName = "FormDescription";
|
|
1893
|
+
var Fr = e.forwardRef(({ className: e, children: t, ...n }, r) => {
|
|
1894
|
+
let { error: i, formMessageId: a } = kr(), o = i ? String(i?.message ?? "") : t;
|
|
1861
1895
|
return o ? /* @__PURE__ */ f("p", {
|
|
1862
1896
|
ref: r,
|
|
1863
1897
|
id: a,
|
|
@@ -1866,20 +1900,20 @@ var jr = e.forwardRef(({ className: e, children: t, ...n }, r) => {
|
|
|
1866
1900
|
children: o
|
|
1867
1901
|
}) : null;
|
|
1868
1902
|
});
|
|
1869
|
-
|
|
1903
|
+
Fr.displayName = "FormMessage";
|
|
1870
1904
|
//#endregion
|
|
1871
1905
|
//#region src/components/ui/hover-card.tsx
|
|
1872
|
-
var
|
|
1906
|
+
var Ir = ie.Root, Lr = ie.Trigger, Rr = e.forwardRef(({ className: e, align: t = "center", sideOffset: n = 4, ...r }, i) => /* @__PURE__ */ f(ie.Content, {
|
|
1873
1907
|
ref: i,
|
|
1874
1908
|
align: t,
|
|
1875
1909
|
sideOffset: n,
|
|
1876
1910
|
className: G("z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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 origin-[--radix-hover-card-content-transform-origin]", e),
|
|
1877
1911
|
...r
|
|
1878
1912
|
}));
|
|
1879
|
-
|
|
1913
|
+
Rr.displayName = ie.Content.displayName;
|
|
1880
1914
|
//#endregion
|
|
1881
1915
|
//#region ~icons/lucide/dot.jsx
|
|
1882
|
-
var
|
|
1916
|
+
var zr = (e) => /* @__PURE__ */ f("svg", {
|
|
1883
1917
|
viewBox: "0 0 24 24",
|
|
1884
1918
|
width: "1.2em",
|
|
1885
1919
|
height: "1.2em",
|
|
@@ -1894,21 +1928,21 @@ var Fr = (e) => /* @__PURE__ */ f("svg", {
|
|
|
1894
1928
|
strokeLinejoin: "round",
|
|
1895
1929
|
strokeWidth: 2
|
|
1896
1930
|
})
|
|
1897
|
-
}),
|
|
1931
|
+
}), Br = e.forwardRef(({ className: e, containerClassName: t, ...n }, r) => /* @__PURE__ */ f(ae, {
|
|
1898
1932
|
ref: r,
|
|
1899
1933
|
containerClassName: G("flex items-center gap-2 has-[:disabled]:opacity-50", t),
|
|
1900
1934
|
className: G("disabled:cursor-not-allowed", e),
|
|
1901
1935
|
...n
|
|
1902
1936
|
}));
|
|
1903
|
-
|
|
1904
|
-
var
|
|
1937
|
+
Br.displayName = "InputOTP";
|
|
1938
|
+
var Vr = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f("div", {
|
|
1905
1939
|
ref: n,
|
|
1906
1940
|
className: G("flex items-center", e),
|
|
1907
1941
|
...t
|
|
1908
1942
|
}));
|
|
1909
|
-
|
|
1910
|
-
var
|
|
1911
|
-
let { char: a, hasFakeCaret: o, isActive: s } = e.useContext(
|
|
1943
|
+
Vr.displayName = "InputOTPGroup";
|
|
1944
|
+
var Hr = e.forwardRef(({ index: t, className: n, ...r }, i) => {
|
|
1945
|
+
let { char: a, hasFakeCaret: o, isActive: s } = e.useContext(oe).slots[t];
|
|
1912
1946
|
return /* @__PURE__ */ p("div", {
|
|
1913
1947
|
ref: i,
|
|
1914
1948
|
className: G("relative flex h-10 w-10 items-center justify-center border-y border-r border-input text-sm transition-all first:rounded-l-md first:border-l last:rounded-r-md", s && "z-10 ring-2 ring-ring ring-offset-background", n),
|
|
@@ -1919,60 +1953,60 @@ var Rr = e.forwardRef(({ index: t, className: n, ...r }, i) => {
|
|
|
1919
1953
|
})]
|
|
1920
1954
|
});
|
|
1921
1955
|
});
|
|
1922
|
-
|
|
1923
|
-
var
|
|
1956
|
+
Hr.displayName = "InputOTPSlot";
|
|
1957
|
+
var Ur = e.forwardRef(({ ...e }, t) => /* @__PURE__ */ f("div", {
|
|
1924
1958
|
ref: t,
|
|
1925
1959
|
role: "separator",
|
|
1926
1960
|
...e,
|
|
1927
|
-
children: /* @__PURE__ */ f(
|
|
1961
|
+
children: /* @__PURE__ */ f(zr, {})
|
|
1928
1962
|
}));
|
|
1929
|
-
|
|
1963
|
+
Ur.displayName = "InputOTPSeparator";
|
|
1930
1964
|
//#endregion
|
|
1931
1965
|
//#region src/components/ui/menubar.tsx
|
|
1932
|
-
function
|
|
1966
|
+
function Wr({ ...e }) {
|
|
1933
1967
|
return /* @__PURE__ */ f(L.Menu, { ...e });
|
|
1934
1968
|
}
|
|
1935
|
-
function
|
|
1969
|
+
function Gr({ ...e }) {
|
|
1936
1970
|
return /* @__PURE__ */ f(L.Group, { ...e });
|
|
1937
1971
|
}
|
|
1938
|
-
function
|
|
1972
|
+
function Kr({ ...e }) {
|
|
1939
1973
|
return /* @__PURE__ */ f(L.Portal, { ...e });
|
|
1940
1974
|
}
|
|
1941
|
-
function
|
|
1975
|
+
function qr({ ...e }) {
|
|
1942
1976
|
return /* @__PURE__ */ f(L.RadioGroup, { ...e });
|
|
1943
1977
|
}
|
|
1944
|
-
function
|
|
1978
|
+
function Jr({ ...e }) {
|
|
1945
1979
|
return /* @__PURE__ */ f(L.Sub, {
|
|
1946
1980
|
"data-slot": "menubar-sub",
|
|
1947
1981
|
...e
|
|
1948
1982
|
});
|
|
1949
1983
|
}
|
|
1950
|
-
var
|
|
1984
|
+
var Yr = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(L.Root, {
|
|
1951
1985
|
ref: n,
|
|
1952
1986
|
className: G("flex h-10 items-center space-x-1 rounded-md border bg-background p-1", e),
|
|
1953
1987
|
...t
|
|
1954
1988
|
}));
|
|
1955
|
-
|
|
1956
|
-
var
|
|
1989
|
+
Yr.displayName = L.Root.displayName;
|
|
1990
|
+
var Xr = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(L.Trigger, {
|
|
1957
1991
|
ref: n,
|
|
1958
1992
|
className: G("flex cursor-default select-none items-center rounded-sm px-3 py-1.5 text-sm font-medium outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground", e),
|
|
1959
1993
|
...t
|
|
1960
1994
|
}));
|
|
1961
|
-
|
|
1962
|
-
var
|
|
1995
|
+
Xr.displayName = L.Trigger.displayName;
|
|
1996
|
+
var Zr = e.forwardRef(({ className: e, inset: t, children: n, ...r }, i) => /* @__PURE__ */ p(L.SubTrigger, {
|
|
1963
1997
|
ref: i,
|
|
1964
1998
|
className: G("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground", t && "pl-8", e),
|
|
1965
1999
|
...r,
|
|
1966
|
-
children: [n, /* @__PURE__ */ f(
|
|
2000
|
+
children: [n, /* @__PURE__ */ f(dt, { className: "ml-auto h-4 w-4" })]
|
|
1967
2001
|
}));
|
|
1968
|
-
|
|
1969
|
-
var
|
|
2002
|
+
Zr.displayName = L.SubTrigger.displayName;
|
|
2003
|
+
var Qr = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(L.SubContent, {
|
|
1970
2004
|
ref: n,
|
|
1971
2005
|
className: G("z-50 min-w-32 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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 origin-[--radix-menubar-content-transform-origin]", e),
|
|
1972
2006
|
...t
|
|
1973
2007
|
}));
|
|
1974
|
-
|
|
1975
|
-
var
|
|
2008
|
+
Qr.displayName = L.SubContent.displayName;
|
|
2009
|
+
var $r = e.forwardRef(({ className: e, align: t = "start", alignOffset: n = -4, sideOffset: r = 8, ...i }, a) => /* @__PURE__ */ f(L.Portal, { children: /* @__PURE__ */ f(L.Content, {
|
|
1976
2010
|
ref: a,
|
|
1977
2011
|
align: t,
|
|
1978
2012
|
alignOffset: n,
|
|
@@ -1980,14 +2014,14 @@ var Yr = e.forwardRef(({ className: e, align: t = "start", alignOffset: n = -4,
|
|
|
1980
2014
|
className: G("z-50 min-w-48 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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 origin-[--radix-menubar-content-transform-origin]", e),
|
|
1981
2015
|
...i
|
|
1982
2016
|
}) }));
|
|
1983
|
-
|
|
1984
|
-
var
|
|
2017
|
+
$r.displayName = L.Content.displayName;
|
|
2018
|
+
var ei = e.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */ f(L.Item, {
|
|
1985
2019
|
ref: r,
|
|
1986
2020
|
className: G("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50", t && "pl-8", e),
|
|
1987
2021
|
...n
|
|
1988
2022
|
}));
|
|
1989
|
-
|
|
1990
|
-
var
|
|
2023
|
+
ei.displayName = L.Item.displayName;
|
|
2024
|
+
var ti = e.forwardRef(({ className: e, children: t, checked: n, ...r }, i) => /* @__PURE__ */ p(L.CheckboxItem, {
|
|
1991
2025
|
ref: i,
|
|
1992
2026
|
className: G("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50", e),
|
|
1993
2027
|
checked: n,
|
|
@@ -1997,57 +2031,57 @@ var Zr = e.forwardRef(({ className: e, children: t, checked: n, ...r }, i) => /*
|
|
|
1997
2031
|
children: /* @__PURE__ */ f(L.ItemIndicator, { children: /* @__PURE__ */ f(q, { className: "h-4 w-4" }) })
|
|
1998
2032
|
}), t]
|
|
1999
2033
|
}));
|
|
2000
|
-
|
|
2001
|
-
var
|
|
2034
|
+
ti.displayName = L.CheckboxItem.displayName;
|
|
2035
|
+
var ni = e.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ p(L.RadioItem, {
|
|
2002
2036
|
ref: r,
|
|
2003
2037
|
className: G("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50", e),
|
|
2004
2038
|
...n,
|
|
2005
2039
|
children: [/* @__PURE__ */ f("span", {
|
|
2006
2040
|
className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center",
|
|
2007
|
-
children: /* @__PURE__ */ f(L.ItemIndicator, { children: /* @__PURE__ */ f(
|
|
2041
|
+
children: /* @__PURE__ */ f(L.ItemIndicator, { children: /* @__PURE__ */ f(Cn, { className: "h-2 w-2 fill-current" }) })
|
|
2008
2042
|
}), t]
|
|
2009
2043
|
}));
|
|
2010
|
-
|
|
2011
|
-
var
|
|
2044
|
+
ni.displayName = L.RadioItem.displayName;
|
|
2045
|
+
var ri = e.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */ f(L.Label, {
|
|
2012
2046
|
ref: r,
|
|
2013
2047
|
className: G("px-2 py-1.5 text-sm font-semibold", t && "pl-8", e),
|
|
2014
2048
|
...n
|
|
2015
2049
|
}));
|
|
2016
|
-
|
|
2017
|
-
var
|
|
2050
|
+
ri.displayName = L.Label.displayName;
|
|
2051
|
+
var ii = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(L.Separator, {
|
|
2018
2052
|
ref: n,
|
|
2019
2053
|
className: G("-mx-1 my-1 h-px bg-muted", e),
|
|
2020
2054
|
...t
|
|
2021
2055
|
}));
|
|
2022
|
-
|
|
2023
|
-
var
|
|
2056
|
+
ii.displayName = L.Separator.displayName;
|
|
2057
|
+
var ai = ({ className: e, ...t }) => /* @__PURE__ */ f("span", {
|
|
2024
2058
|
className: G("ml-auto text-xs tracking-widest text-muted-foreground", e),
|
|
2025
2059
|
...t
|
|
2026
2060
|
});
|
|
2027
|
-
|
|
2061
|
+
ai.displayname = "MenubarShortcut";
|
|
2028
2062
|
//#endregion
|
|
2029
2063
|
//#region src/components/ui/separator.tsx
|
|
2030
|
-
var
|
|
2064
|
+
var oi = e.forwardRef(({ className: e, orientation: t = "horizontal", decorative: n = !0, ...r }, i) => /* @__PURE__ */ f(se.Root, {
|
|
2031
2065
|
ref: i,
|
|
2032
2066
|
decorative: n,
|
|
2033
2067
|
orientation: t,
|
|
2034
2068
|
className: G("shrink-0 bg-border", t === "horizontal" ? "h-px w-full" : "h-full w-px", e),
|
|
2035
2069
|
...r
|
|
2036
2070
|
}));
|
|
2037
|
-
|
|
2071
|
+
oi.displayName = se.Root.displayName;
|
|
2038
2072
|
//#endregion
|
|
2039
2073
|
//#region src/components/ui/select/select.tsx
|
|
2040
|
-
function
|
|
2074
|
+
function si(e) {
|
|
2041
2075
|
return typeof e == "object" && !!e && "value" in e;
|
|
2042
2076
|
}
|
|
2043
|
-
function
|
|
2077
|
+
function ci(e, t) {
|
|
2044
2078
|
let n = e.multiple === !0, i = e.async === !0, u = c(null);
|
|
2045
2079
|
o(t, () => u.current);
|
|
2046
2080
|
let [d, f] = l(!1), [p, m] = l(""), [h, g] = l(/* @__PURE__ */ new Map()), _ = i && "onOpenChange" in e ? e.onOpenChange : void 0, v = c(d);
|
|
2047
2081
|
a(() => {
|
|
2048
2082
|
v.current !== d && (_ && _(d), v.current = d);
|
|
2049
2083
|
}, [d, _]);
|
|
2050
|
-
let y = r((t) => t == null ? "" : e.valueKey ? e.valueKey(t) : String(t), [e.valueKey]), b = s(() => e.items.map((e) =>
|
|
2084
|
+
let y = r((t) => t == null ? "" : e.valueKey ? e.valueKey(t) : String(t), [e.valueKey]), b = s(() => e.items.map((e) => si(e) ? e : { value: e }), [e.items]), x = s(() => {
|
|
2051
2085
|
let e = /* @__PURE__ */ new Map();
|
|
2052
2086
|
for (let t of b) e.set(y(t.value), t.value);
|
|
2053
2087
|
return e;
|
|
@@ -2131,7 +2165,7 @@ function ii(e, t) {
|
|
|
2131
2165
|
getItemLabel: S
|
|
2132
2166
|
};
|
|
2133
2167
|
}
|
|
2134
|
-
function
|
|
2168
|
+
function li(e, t) {
|
|
2135
2169
|
if (!t || typeof e != "string") return e;
|
|
2136
2170
|
let n = e.toLowerCase(), r = t.toLowerCase(), i = n.indexOf(r);
|
|
2137
2171
|
if (i === -1) return e;
|
|
@@ -2145,7 +2179,7 @@ function ai(e, t) {
|
|
|
2145
2179
|
s
|
|
2146
2180
|
] });
|
|
2147
2181
|
}
|
|
2148
|
-
function
|
|
2182
|
+
function ui({ props: e, isMultiple: t, isAsync: n, isPopoverOpen: i, setIsPopoverOpen: o, searchValue: s, handleSearchChange: c, filteredOptions: u, getKeyForValue: m, getItemLabel: h }) {
|
|
2149
2183
|
let { SD: g } = J(), [_, v] = l(null), y = r((e) => {
|
|
2150
2184
|
v(e);
|
|
2151
2185
|
}, []), [b, x] = l(null), S = r((e) => {
|
|
@@ -2200,10 +2234,10 @@ function oi({ props: e, isMultiple: t, isAsync: n, isPopoverOpen: i, setIsPopove
|
|
|
2200
2234
|
let n = e.value;
|
|
2201
2235
|
return /* @__PURE__ */ f(d, { children: n.map((e) => {
|
|
2202
2236
|
let t = m(e);
|
|
2203
|
-
return /* @__PURE__ */ p(
|
|
2237
|
+
return /* @__PURE__ */ p(ut, {
|
|
2204
2238
|
variant: "outline",
|
|
2205
2239
|
className: "m-1 transition-all duration-300 ease-in-out",
|
|
2206
|
-
children: [h(e), /* @__PURE__ */ f(
|
|
2240
|
+
children: [h(e), /* @__PURE__ */ f(Ut, {
|
|
2207
2241
|
className: "ml-2 h-3 w-3 cursor-pointer !pointer-events-auto",
|
|
2208
2242
|
onPointerDownCapture: (e) => {
|
|
2209
2243
|
e.stopPropagation();
|
|
@@ -2250,13 +2284,13 @@ function oi({ props: e, isMultiple: t, isAsync: n, isPopoverOpen: i, setIsPopove
|
|
|
2250
2284
|
e.stopPropagation(), j();
|
|
2251
2285
|
},
|
|
2252
2286
|
className: "flex items-center justify-center h-4 w-4 mx-2 cursor-pointer text-muted-foreground hover:text-foreground",
|
|
2253
|
-
children: /* @__PURE__ */ f(
|
|
2287
|
+
children: /* @__PURE__ */ f(Zt, { className: "h-4 w-4" })
|
|
2254
2288
|
}),
|
|
2255
|
-
/* @__PURE__ */ f(
|
|
2289
|
+
/* @__PURE__ */ f(oi, {
|
|
2256
2290
|
orientation: "vertical",
|
|
2257
2291
|
className: "flex min-h-6 h-full"
|
|
2258
2292
|
}),
|
|
2259
|
-
/* @__PURE__ */ f(
|
|
2293
|
+
/* @__PURE__ */ f(Fe, { className: "h-4 mx-2 cursor-pointer text-muted-foreground" })
|
|
2260
2294
|
]
|
|
2261
2295
|
})]
|
|
2262
2296
|
}) : !t && F ? /* @__PURE__ */ p("div", {
|
|
@@ -2269,38 +2303,38 @@ function oi({ props: e, isMultiple: t, isAsync: n, isPopoverOpen: i, setIsPopove
|
|
|
2269
2303
|
});
|
|
2270
2304
|
})(), /* @__PURE__ */ p("div", {
|
|
2271
2305
|
className: "flex items-center gap-1 shrink-0",
|
|
2272
|
-
children: [e.clearable && F && /* @__PURE__ */ f(
|
|
2306
|
+
children: [e.clearable && F && /* @__PURE__ */ f(Ut, {
|
|
2273
2307
|
className: "h-4 w-4 cursor-pointer opacity-50 hover:opacity-100 transition-opacity",
|
|
2274
2308
|
onPointerDownCapture: j,
|
|
2275
2309
|
onMouseDownCapture: j
|
|
2276
|
-
}), /* @__PURE__ */ f(
|
|
2310
|
+
}), /* @__PURE__ */ f(Fe, { className: "h-4 w-4 opacity-50" })]
|
|
2277
2311
|
})]
|
|
2278
2312
|
}) : /* @__PURE__ */ p("div", {
|
|
2279
2313
|
className: "flex items-center justify-between w-full px-2 py-1",
|
|
2280
2314
|
children: [/* @__PURE__ */ f("span", {
|
|
2281
2315
|
className: "text-sm text-muted-foreground flex-1 truncate text-left",
|
|
2282
2316
|
children: e.placeholder
|
|
2283
|
-
}), /* @__PURE__ */ f(
|
|
2317
|
+
}), /* @__PURE__ */ f(Fe, { className: "h-4 cursor-pointer text-muted-foreground" })]
|
|
2284
2318
|
})
|
|
2285
2319
|
})
|
|
2286
2320
|
}), /* @__PURE__ */ f(Z, {
|
|
2287
2321
|
className: "min-w-40 p-0",
|
|
2288
2322
|
align: "start",
|
|
2289
2323
|
style: { width: "var(--radix-popover-trigger-width)" },
|
|
2290
|
-
children: /* @__PURE__ */ p(
|
|
2324
|
+
children: /* @__PURE__ */ p(ln, {
|
|
2291
2325
|
shouldFilter: !1,
|
|
2292
|
-
children: [D && /* @__PURE__ */ f(
|
|
2326
|
+
children: [D && /* @__PURE__ */ f(dn, {
|
|
2293
2327
|
placeholder: g("common.searchPlaceholder"),
|
|
2294
2328
|
value: s,
|
|
2295
2329
|
onValueChange: c
|
|
2296
|
-
}), /* @__PURE__ */ f(
|
|
2330
|
+
}), /* @__PURE__ */ f(fn, {
|
|
2297
2331
|
ref: y,
|
|
2298
2332
|
onWheel: O,
|
|
2299
|
-
children: N ? /* @__PURE__ */ f(
|
|
2333
|
+
children: N ? /* @__PURE__ */ f(pn, { children: /* @__PURE__ */ f("div", {
|
|
2300
2334
|
className: "flex items-center justify-center",
|
|
2301
|
-
children: /* @__PURE__ */ f(
|
|
2302
|
-
}) }) : P ? /* @__PURE__ */ p(
|
|
2303
|
-
t && !("hideSelectAll" in e && e.hideSelectAll) && /* @__PURE__ */ f(
|
|
2335
|
+
children: /* @__PURE__ */ f(gr, { className: "h-4 w-4 animate-spin mr-2" })
|
|
2336
|
+
}) }) : P ? /* @__PURE__ */ p(pn, { children: ["Error: ", P.message] }) : u.length === 0 ? /* @__PURE__ */ f(pn, { children: g("rc.multiSelect.noResults") }) : /* @__PURE__ */ p(d, { children: [
|
|
2337
|
+
t && !("hideSelectAll" in e && e.hideSelectAll) && /* @__PURE__ */ f(mn, { children: /* @__PURE__ */ p(gn, {
|
|
2304
2338
|
onSelect: A,
|
|
2305
2339
|
className: "cursor-pointer",
|
|
2306
2340
|
children: [/* @__PURE__ */ f("div", {
|
|
@@ -2312,9 +2346,9 @@ function oi({ props: e, isMultiple: t, isAsync: n, isPopoverOpen: i, setIsPopove
|
|
|
2312
2346
|
")"
|
|
2313
2347
|
] })]
|
|
2314
2348
|
}) }),
|
|
2315
|
-
/* @__PURE__ */ f(
|
|
2349
|
+
/* @__PURE__ */ f(mn, { children: u.map((e) => {
|
|
2316
2350
|
let n = m(e.value), r = M(e.value);
|
|
2317
|
-
return /* @__PURE__ */ p(
|
|
2351
|
+
return /* @__PURE__ */ p(gn, {
|
|
2318
2352
|
onSelect: () => k(e.value),
|
|
2319
2353
|
disabled: e.disabled,
|
|
2320
2354
|
className: G("cursor-pointer", e.disabled && "opacity-50 cursor-not-allowed"),
|
|
@@ -2324,14 +2358,14 @@ function oi({ props: e, isMultiple: t, isAsync: n, isPopoverOpen: i, setIsPopove
|
|
|
2324
2358
|
children: /* @__PURE__ */ f(q, { className: "h-4 w-4" })
|
|
2325
2359
|
}),
|
|
2326
2360
|
!t && /* @__PURE__ */ f(q, { className: G("mr-2 h-4 w-4", r ? "opacity-100" : "opacity-0") }),
|
|
2327
|
-
/* @__PURE__ */ f("span", { children:
|
|
2361
|
+
/* @__PURE__ */ f("span", { children: li(h(e.value), s) })
|
|
2328
2362
|
]
|
|
2329
2363
|
}, n);
|
|
2330
2364
|
}) }),
|
|
2331
2365
|
E && /* @__PURE__ */ f("div", {
|
|
2332
2366
|
ref: S,
|
|
2333
2367
|
className: "flex items-center justify-center py-2 text-xs text-muted-foreground",
|
|
2334
|
-
children: T ? /* @__PURE__ */ f(
|
|
2368
|
+
children: T ? /* @__PURE__ */ f(gr, { className: "h-3 w-3 animate-spin" }) : null
|
|
2335
2369
|
})
|
|
2336
2370
|
] })
|
|
2337
2371
|
})]
|
|
@@ -2340,8 +2374,8 @@ function oi({ props: e, isMultiple: t, isAsync: n, isPopoverOpen: i, setIsPopove
|
|
|
2340
2374
|
});
|
|
2341
2375
|
}
|
|
2342
2376
|
var $ = e.forwardRef(function(e, t) {
|
|
2343
|
-
let n =
|
|
2344
|
-
return /* @__PURE__ */ f(
|
|
2377
|
+
let n = ci(e, t);
|
|
2378
|
+
return /* @__PURE__ */ f(ui, {
|
|
2345
2379
|
props: e,
|
|
2346
2380
|
isMultiple: n.isMultiple,
|
|
2347
2381
|
isAsync: n.isAsync,
|
|
@@ -2353,7 +2387,7 @@ var $ = e.forwardRef(function(e, t) {
|
|
|
2353
2387
|
getKeyForValue: n.getKeyForValue,
|
|
2354
2388
|
getItemLabel: n.getItemLabel
|
|
2355
2389
|
});
|
|
2356
|
-
}),
|
|
2390
|
+
}), di = [
|
|
2357
2391
|
"Jan",
|
|
2358
2392
|
"Feb",
|
|
2359
2393
|
"Mar",
|
|
@@ -2367,7 +2401,7 @@ var $ = e.forwardRef(function(e, t) {
|
|
|
2367
2401
|
"Nov",
|
|
2368
2402
|
"Dec"
|
|
2369
2403
|
];
|
|
2370
|
-
function
|
|
2404
|
+
function fi({ CalendarIcon: t, ChevronDownIcon: n, value: r, onValueChange: i, placeholder: a, dateFormat: o = "MMM/yyyy", className: s = "", yearRange: c = {
|
|
2371
2405
|
start: 2020,
|
|
2372
2406
|
end: 2030
|
|
2373
2407
|
}, defaultRangeMode: l = !1 }) {
|
|
@@ -2448,7 +2482,7 @@ function ci({ CalendarIcon: t, ChevronDownIcon: n, value: r, onValueChange: i, p
|
|
|
2448
2482
|
}),
|
|
2449
2483
|
/* @__PURE__ */ f("div", {
|
|
2450
2484
|
className: "grid grid-cols-3 gap-2",
|
|
2451
|
-
children:
|
|
2485
|
+
children: di.map((e, t) => {
|
|
2452
2486
|
let n = y?.to ? C > y.to.getFullYear() || C === y.to.getFullYear() && t > y.to.getMonth() : !1;
|
|
2453
2487
|
return /* @__PURE__ */ f(K, {
|
|
2454
2488
|
variant: y?.from?.getMonth() === t && y?.from?.getFullYear() === C ? "default" : "outline",
|
|
@@ -2493,7 +2527,7 @@ function ci({ CalendarIcon: t, ChevronDownIcon: n, value: r, onValueChange: i, p
|
|
|
2493
2527
|
}),
|
|
2494
2528
|
/* @__PURE__ */ f("div", {
|
|
2495
2529
|
className: "grid grid-cols-3 gap-2",
|
|
2496
|
-
children:
|
|
2530
|
+
children: di.map((e, t) => {
|
|
2497
2531
|
let n = y?.from ? T < y.from.getFullYear() || T === y.from.getFullYear() && t < y.from.getMonth() : !1;
|
|
2498
2532
|
return /* @__PURE__ */ f(K, {
|
|
2499
2533
|
variant: y?.to?.getMonth() === t && y?.to?.getFullYear() === T ? "default" : "outline",
|
|
@@ -2531,7 +2565,7 @@ function ci({ CalendarIcon: t, ChevronDownIcon: n, value: r, onValueChange: i, p
|
|
|
2531
2565
|
className: "h-8 text-xs"
|
|
2532
2566
|
}), /* @__PURE__ */ f("div", {
|
|
2533
2567
|
className: "grid grid-cols-3 gap-2",
|
|
2534
|
-
children:
|
|
2568
|
+
children: di.map((e, t) => /* @__PURE__ */ f(K, {
|
|
2535
2569
|
variant: _?.getMonth() === t && _?.getFullYear() === x ? "default" : "outline",
|
|
2536
2570
|
size: "sm",
|
|
2537
2571
|
onClick: () => {
|
|
@@ -2578,40 +2612,40 @@ function ci({ CalendarIcon: t, ChevronDownIcon: n, value: r, onValueChange: i, p
|
|
|
2578
2612
|
}
|
|
2579
2613
|
//#endregion
|
|
2580
2614
|
//#region src/components/ui/navigation-menu.tsx
|
|
2581
|
-
var
|
|
2615
|
+
var pi = e.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ p(R.Root, {
|
|
2582
2616
|
ref: r,
|
|
2583
2617
|
className: G("relative z-10 flex max-w-max flex-1 items-center justify-center", e),
|
|
2584
2618
|
...n,
|
|
2585
|
-
children: [t, /* @__PURE__ */ f(
|
|
2619
|
+
children: [t, /* @__PURE__ */ f(bi, {})]
|
|
2586
2620
|
}));
|
|
2587
|
-
|
|
2588
|
-
var
|
|
2621
|
+
pi.displayName = R.Root.displayName;
|
|
2622
|
+
var mi = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(R.List, {
|
|
2589
2623
|
ref: n,
|
|
2590
2624
|
className: G("group flex flex-1 list-none items-center justify-center space-x-1", e),
|
|
2591
2625
|
...t
|
|
2592
2626
|
}));
|
|
2593
|
-
|
|
2594
|
-
var
|
|
2627
|
+
mi.displayName = R.List.displayName;
|
|
2628
|
+
var hi = R.Item, gi = g("group inline-flex h-10 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=open]:text-accent-foreground data-[state=open]:bg-accent/50 data-[state=open]:hover:bg-accent data-[state=open]:focus:bg-accent"), _i = e.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ p(R.Trigger, {
|
|
2595
2629
|
ref: r,
|
|
2596
|
-
className: G(
|
|
2630
|
+
className: G(gi(), "group", e),
|
|
2597
2631
|
...n,
|
|
2598
2632
|
children: [
|
|
2599
2633
|
t,
|
|
2600
2634
|
" ",
|
|
2601
|
-
/* @__PURE__ */ f(
|
|
2635
|
+
/* @__PURE__ */ f(Fe, {
|
|
2602
2636
|
className: "relative top-px ml-1 h-3 w-3 transition duration-200 group-data-[state=open]:rotate-180",
|
|
2603
2637
|
"aria-hidden": "true"
|
|
2604
2638
|
})
|
|
2605
2639
|
]
|
|
2606
2640
|
}));
|
|
2607
|
-
|
|
2608
|
-
var
|
|
2641
|
+
_i.displayName = R.Trigger.displayName;
|
|
2642
|
+
var vi = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(R.Content, {
|
|
2609
2643
|
ref: n,
|
|
2610
2644
|
className: G("left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto ", e),
|
|
2611
2645
|
...t
|
|
2612
2646
|
}));
|
|
2613
|
-
|
|
2614
|
-
var
|
|
2647
|
+
vi.displayName = R.Content.displayName;
|
|
2648
|
+
var yi = R.Link, bi = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f("div", {
|
|
2615
2649
|
className: G("absolute left-0 top-full flex justify-center"),
|
|
2616
2650
|
children: /* @__PURE__ */ f(R.Viewport, {
|
|
2617
2651
|
className: G("origin-top-center relative mt-1.5 h-(--radix-navigation-menu-viewport-height) w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-(--radix-navigation-menu-viewport-width)", e),
|
|
@@ -2619,17 +2653,17 @@ var hi = R.Link, gi = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ *
|
|
|
2619
2653
|
...t
|
|
2620
2654
|
})
|
|
2621
2655
|
}));
|
|
2622
|
-
|
|
2623
|
-
var
|
|
2656
|
+
bi.displayName = R.Viewport.displayName;
|
|
2657
|
+
var xi = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(R.Indicator, {
|
|
2624
2658
|
ref: n,
|
|
2625
2659
|
className: G("top-full z-1 flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in", e),
|
|
2626
2660
|
...t,
|
|
2627
2661
|
children: /* @__PURE__ */ f("div", { className: "relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md" })
|
|
2628
2662
|
}));
|
|
2629
|
-
|
|
2663
|
+
xi.displayName = R.Indicator.displayName;
|
|
2630
2664
|
//#endregion
|
|
2631
2665
|
//#region src/components/ui/pagination.tsx
|
|
2632
|
-
var
|
|
2666
|
+
var Si = e.forwardRef(({ value: e, onValueChange: t, total: n, itemsPerPage: r, className: i, maxVisible: a = 6 }, o) => {
|
|
2633
2667
|
let { SD: s } = J(), c = Math.ceil(n / r), l = e, u = (l - 1) * r + 1, d = Math.min(l * r, n);
|
|
2634
2668
|
return /* @__PURE__ */ p("div", {
|
|
2635
2669
|
ref: o,
|
|
@@ -2673,28 +2707,28 @@ var vi = e.forwardRef(({ value: e, onValueChange: t, total: n, itemsPerPage: r,
|
|
|
2673
2707
|
})]
|
|
2674
2708
|
});
|
|
2675
2709
|
});
|
|
2676
|
-
|
|
2710
|
+
Si.displayName = "Pagination";
|
|
2677
2711
|
//#endregion
|
|
2678
2712
|
//#region src/components/ui/progress.tsx
|
|
2679
|
-
var
|
|
2713
|
+
var Ci = e.forwardRef(({ className: e, value: t, ...n }, r) => /* @__PURE__ */ f(ce.Root, {
|
|
2680
2714
|
ref: r,
|
|
2681
2715
|
className: G("relative h-4 w-full overflow-hidden rounded-full bg-secondary", e),
|
|
2682
2716
|
...n,
|
|
2683
|
-
children: /* @__PURE__ */ f(
|
|
2717
|
+
children: /* @__PURE__ */ f(ce.Indicator, {
|
|
2684
2718
|
className: "h-full w-full flex-1 bg-primary transition-all",
|
|
2685
2719
|
style: { transform: `translateX(-${100 - (t || 0)}%)` }
|
|
2686
2720
|
})
|
|
2687
2721
|
}));
|
|
2688
|
-
|
|
2722
|
+
Ci.displayName = ce.Root.displayName;
|
|
2689
2723
|
//#endregion
|
|
2690
2724
|
//#region src/components/ui/radio-group.tsx
|
|
2691
|
-
var
|
|
2725
|
+
var wi = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(z.Root, {
|
|
2692
2726
|
className: G("grid gap-2", e),
|
|
2693
2727
|
...t,
|
|
2694
2728
|
ref: n
|
|
2695
2729
|
}));
|
|
2696
|
-
|
|
2697
|
-
var
|
|
2730
|
+
wi.displayName = z.Root.displayName;
|
|
2731
|
+
var Ti = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(z.Item, {
|
|
2698
2732
|
ref: n,
|
|
2699
2733
|
className: G("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50", e),
|
|
2700
2734
|
...t,
|
|
@@ -2703,10 +2737,10 @@ var xi = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(z.Item, {
|
|
|
2703
2737
|
children: /* @__PURE__ */ f("div", { className: "h-2 w-2 rounded-full bg-current" })
|
|
2704
2738
|
})
|
|
2705
2739
|
}));
|
|
2706
|
-
|
|
2740
|
+
Ti.displayName = z.Item.displayName;
|
|
2707
2741
|
//#endregion
|
|
2708
2742
|
//#region src/components/ui/range-number-input.tsx
|
|
2709
|
-
function
|
|
2743
|
+
function Ei({ value: e = [void 0, void 0], onChange: t, placeholder: n = ["최소값", "최대값"], disabled: r, className: i }) {
|
|
2710
2744
|
let [a, o] = e;
|
|
2711
2745
|
return /* @__PURE__ */ p("div", {
|
|
2712
2746
|
className: `flex items-center gap-2 ${i}`,
|
|
@@ -2742,7 +2776,7 @@ function Si({ value: e = [void 0, void 0], onChange: t, placeholder: n = ["최
|
|
|
2742
2776
|
}
|
|
2743
2777
|
//#endregion
|
|
2744
2778
|
//#region ~icons/lucide/grip-vertical.jsx
|
|
2745
|
-
var
|
|
2779
|
+
var Di = (e) => /* @__PURE__ */ f("svg", {
|
|
2746
2780
|
viewBox: "0 0 24 24",
|
|
2747
2781
|
width: "1.2em",
|
|
2748
2782
|
height: "1.2em",
|
|
@@ -2786,17 +2820,17 @@ var Ci = (e) => /* @__PURE__ */ f("svg", {
|
|
|
2786
2820
|
})
|
|
2787
2821
|
]
|
|
2788
2822
|
})
|
|
2789
|
-
}),
|
|
2823
|
+
}), Oi = ({ className: e, ...t }) => /* @__PURE__ */ f(le.PanelGroup, {
|
|
2790
2824
|
className: G("flex h-full w-full data-[panel-group-direction=vertical]:flex-col", e),
|
|
2791
2825
|
...t
|
|
2792
|
-
}),
|
|
2826
|
+
}), ki = le.Panel, Ai = ({ withHandle: e, className: t, ...n }) => /* @__PURE__ */ f(le.PanelResizeHandle, {
|
|
2793
2827
|
className: G("relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90", t),
|
|
2794
2828
|
...n,
|
|
2795
2829
|
children: e && /* @__PURE__ */ f("div", {
|
|
2796
2830
|
className: "z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border",
|
|
2797
|
-
children: /* @__PURE__ */ f(
|
|
2831
|
+
children: /* @__PURE__ */ f(Di, { className: "h-2.5 w-2.5" })
|
|
2798
2832
|
})
|
|
2799
|
-
}),
|
|
2833
|
+
}), ji = e.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ p(B.Root, {
|
|
2800
2834
|
ref: r,
|
|
2801
2835
|
className: G("relative overflow-hidden", e),
|
|
2802
2836
|
...n,
|
|
@@ -2805,22 +2839,22 @@ var Ci = (e) => /* @__PURE__ */ f("svg", {
|
|
|
2805
2839
|
className: "h-full w-full rounded-[inherit]",
|
|
2806
2840
|
children: t
|
|
2807
2841
|
}),
|
|
2808
|
-
/* @__PURE__ */ f(
|
|
2842
|
+
/* @__PURE__ */ f(Mi, {}),
|
|
2809
2843
|
/* @__PURE__ */ f(B.Corner, {})
|
|
2810
2844
|
]
|
|
2811
2845
|
}));
|
|
2812
|
-
|
|
2813
|
-
var
|
|
2846
|
+
ji.displayName = B.Root.displayName;
|
|
2847
|
+
var Mi = e.forwardRef(({ className: e, orientation: t = "vertical", ...n }, r) => /* @__PURE__ */ f(B.ScrollAreaScrollbar, {
|
|
2814
2848
|
ref: r,
|
|
2815
2849
|
orientation: t,
|
|
2816
2850
|
className: G("flex touch-none select-none transition-colors", t === "vertical" && "h-full w-2.5 border-l border-l-transparent p-px", t === "horizontal" && "h-2.5 flex-col border-t border-t-transparent p-px", e),
|
|
2817
2851
|
...n,
|
|
2818
2852
|
children: /* @__PURE__ */ f(B.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" })
|
|
2819
2853
|
}));
|
|
2820
|
-
|
|
2854
|
+
Mi.displayName = B.ScrollAreaScrollbar.displayName;
|
|
2821
2855
|
//#endregion
|
|
2822
2856
|
//#region src/components/ui/select/enum-select.tsx
|
|
2823
|
-
function
|
|
2857
|
+
function Ni({ enum: t, labels: n, value: r, onValueChange: i, placeholder: a, textPrefix: o = "", clearable: s = !1, disabled: c = !1, className: l, multiple: u = !1 }) {
|
|
2824
2858
|
let d = e.useMemo(() => t.options.filter((e) => e !== ""), [t]), p = e.useMemo(() => d.map((e) => ({
|
|
2825
2859
|
value: e,
|
|
2826
2860
|
label: o + n[e]
|
|
@@ -2857,22 +2891,22 @@ function ki({ enum: t, labels: n, value: r, onValueChange: i, placeholder: a, te
|
|
|
2857
2891
|
}
|
|
2858
2892
|
//#endregion
|
|
2859
2893
|
//#region src/components/ui/select/id-async-select.tsx
|
|
2860
|
-
var
|
|
2894
|
+
var Pi = [
|
|
2861
2895
|
"name",
|
|
2862
2896
|
"title",
|
|
2863
2897
|
"label",
|
|
2864
2898
|
"display_name",
|
|
2865
2899
|
"username"
|
|
2866
2900
|
];
|
|
2867
|
-
function
|
|
2868
|
-
for (let t of
|
|
2901
|
+
function Fi(e) {
|
|
2902
|
+
for (let t of Pi) if (Object.keys(e).includes(t)) return t;
|
|
2869
2903
|
for (let [t, n] of Object.entries(e)) if (t !== "id" && typeof n == "string") return t;
|
|
2870
2904
|
return "id";
|
|
2871
2905
|
}
|
|
2872
|
-
function
|
|
2873
|
-
let { SD: x } = J(), S =
|
|
2906
|
+
function Ii({ config: e, subset: t, baseListParams: n, displayField: i, valueField: o = "id", placeholder: u, clearable: d, disabled: p, className: m, multiple: h = !1, preload: g = !1, searchable: _, value: v, onValueChange: y, onRowChange: b }) {
|
|
2907
|
+
let { SD: x } = J(), S = ue(), C = typeof i == "function", w = r((e) => {
|
|
2874
2908
|
if (C) return i(e);
|
|
2875
|
-
let t = typeof i == "string" ? i :
|
|
2909
|
+
let t = typeof i == "string" ? i : Fi(e);
|
|
2876
2910
|
return String(e[t] ?? "");
|
|
2877
2911
|
}, [i, C]), [T, E] = l(void 0), D = r((e) => {
|
|
2878
2912
|
E(e || void 0);
|
|
@@ -2894,30 +2928,30 @@ function Mi({ config: e, subset: t, baseListParams: n, displayField: i, valueFie
|
|
|
2894
2928
|
id: I,
|
|
2895
2929
|
num: 1,
|
|
2896
2930
|
page: 1
|
|
2897
|
-
}, { enabled: re }),
|
|
2931
|
+
}, { enabled: re }), ae = ie.data?.rows?.[0] || ne, oe = h && Array.isArray(v) ? v : [], L = s(() => oe.map((e) => F.find((t) => t[o] === e)).filter(Boolean), [
|
|
2898
2932
|
F,
|
|
2899
|
-
|
|
2933
|
+
oe,
|
|
2900
2934
|
o
|
|
2901
|
-
]),
|
|
2902
|
-
let e = new Set(
|
|
2903
|
-
return
|
|
2935
|
+
]), se = s(() => {
|
|
2936
|
+
let e = new Set(L.map((e) => e?.[o]));
|
|
2937
|
+
return oe.filter((t) => !e.has(t));
|
|
2904
2938
|
}, [
|
|
2905
|
-
|
|
2906
|
-
|
|
2939
|
+
oe,
|
|
2940
|
+
L,
|
|
2907
2941
|
o
|
|
2908
|
-
]),
|
|
2909
|
-
id:
|
|
2910
|
-
num:
|
|
2942
|
+
]), R = se.length > 0, ce = e.useList(t, {
|
|
2943
|
+
id: se,
|
|
2944
|
+
num: se.length,
|
|
2911
2945
|
page: 1
|
|
2912
|
-
}, { enabled:
|
|
2913
|
-
let e =
|
|
2914
|
-
return [...
|
|
2915
|
-
}, [
|
|
2946
|
+
}, { enabled: R }), z = s(() => {
|
|
2947
|
+
let e = ce.data?.rows ?? [];
|
|
2948
|
+
return [...L, ...e];
|
|
2949
|
+
}, [L, ce.data]), le = ee || re && ie.isLoading || R && ce.isLoading, B = r(() => {
|
|
2916
2950
|
S.resetQueries({ predicate: (e) => {
|
|
2917
2951
|
let n = e.queryKey;
|
|
2918
2952
|
return Array.isArray(n) && n[2] === "infinite" && n[3] === t;
|
|
2919
2953
|
} });
|
|
2920
|
-
}, [S, t]),
|
|
2954
|
+
}, [S, t]), V = r((e) => {
|
|
2921
2955
|
S.removeQueries({ predicate: (n) => {
|
|
2922
2956
|
let r = n.queryKey;
|
|
2923
2957
|
return !Array.isArray(r) || r[2] !== "infinite" || r[3] !== t ? !1 : r[4]?.keyword === e;
|
|
@@ -2925,18 +2959,18 @@ function Mi({ config: e, subset: t, baseListParams: n, displayField: i, valueFie
|
|
|
2925
2959
|
}, [S, t]), de = c(void 0);
|
|
2926
2960
|
a(() => {
|
|
2927
2961
|
let e = de.current;
|
|
2928
|
-
e !== T &&
|
|
2929
|
-
}, [T,
|
|
2962
|
+
e !== T && V(e), de.current = T;
|
|
2963
|
+
}, [T, V]);
|
|
2930
2964
|
let fe = r((e) => {
|
|
2931
|
-
e ||
|
|
2932
|
-
}, [
|
|
2965
|
+
e || B();
|
|
2966
|
+
}, [B]), pe = r(() => {
|
|
2933
2967
|
P.hasNextPage && !P.isFetchingNextPage && P.fetchNextPage();
|
|
2934
|
-
}, [P]), { items: me, rowMap:
|
|
2968
|
+
}, [P]), { items: me, rowMap: he } = s(() => {
|
|
2935
2969
|
let e = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Map();
|
|
2936
|
-
if (!h &&
|
|
2970
|
+
if (!h && ae && I !== null && (e.set(I, ae), t.set(I, {
|
|
2937
2971
|
value: I,
|
|
2938
|
-
label: w(
|
|
2939
|
-
})), h &&
|
|
2972
|
+
label: w(ae)
|
|
2973
|
+
})), h && z.length > 0) for (let n of z) {
|
|
2940
2974
|
let r = n[o];
|
|
2941
2975
|
e.set(r, n), t.set(r, {
|
|
2942
2976
|
value: r,
|
|
@@ -2956,19 +2990,19 @@ function Mi({ config: e, subset: t, baseListParams: n, displayField: i, valueFie
|
|
|
2956
2990
|
};
|
|
2957
2991
|
}, [
|
|
2958
2992
|
F,
|
|
2959
|
-
|
|
2993
|
+
ae,
|
|
2960
2994
|
I,
|
|
2961
|
-
|
|
2995
|
+
z,
|
|
2962
2996
|
h,
|
|
2963
2997
|
w,
|
|
2964
2998
|
o
|
|
2965
|
-
]),
|
|
2999
|
+
]), ge = (e) => String(e), H = !!P.hasNextPage, _e = !!P.isFetchingNextPage, ve = _ ?? !j;
|
|
2966
3000
|
return h ? /* @__PURE__ */ f($, {
|
|
2967
3001
|
items: me,
|
|
2968
|
-
valueKey:
|
|
3002
|
+
valueKey: ge,
|
|
2969
3003
|
value: v ?? [],
|
|
2970
3004
|
onValueChange: (e) => {
|
|
2971
|
-
y?.(e), b?.(e.map((e) =>
|
|
3005
|
+
y?.(e), b?.(e.map((e) => he.get(e)).filter(Boolean));
|
|
2972
3006
|
},
|
|
2973
3007
|
placeholder: u ?? x(e.placeholderKey),
|
|
2974
3008
|
clearable: d,
|
|
@@ -2977,19 +3011,19 @@ function Mi({ config: e, subset: t, baseListParams: n, displayField: i, valueFie
|
|
|
2977
3011
|
multiple: !0,
|
|
2978
3012
|
async: !0,
|
|
2979
3013
|
searchable: ve,
|
|
2980
|
-
loading:
|
|
3014
|
+
loading: le,
|
|
2981
3015
|
error: te,
|
|
2982
3016
|
onSearch: D,
|
|
2983
3017
|
onOpenChange: fe,
|
|
2984
3018
|
onLoadMore: pe,
|
|
2985
|
-
hasMore:
|
|
3019
|
+
hasMore: H,
|
|
2986
3020
|
isLoadingMore: _e
|
|
2987
3021
|
}) : /* @__PURE__ */ f($, {
|
|
2988
3022
|
items: me,
|
|
2989
|
-
valueKey:
|
|
3023
|
+
valueKey: ge,
|
|
2990
3024
|
value: I ?? void 0,
|
|
2991
3025
|
onValueChange: (e) => {
|
|
2992
|
-
y?.(e), b?.(e ?
|
|
3026
|
+
y?.(e), b?.(e ? he.get(e) : void 0);
|
|
2993
3027
|
},
|
|
2994
3028
|
placeholder: u ?? x(e.placeholderKey),
|
|
2995
3029
|
clearable: d,
|
|
@@ -2998,24 +3032,24 @@ function Mi({ config: e, subset: t, baseListParams: n, displayField: i, valueFie
|
|
|
2998
3032
|
multiple: !1,
|
|
2999
3033
|
async: !0,
|
|
3000
3034
|
searchable: ve,
|
|
3001
|
-
loading:
|
|
3035
|
+
loading: le,
|
|
3002
3036
|
error: te,
|
|
3003
3037
|
onSearch: D,
|
|
3004
3038
|
onOpenChange: fe,
|
|
3005
3039
|
onLoadMore: pe,
|
|
3006
|
-
hasMore:
|
|
3040
|
+
hasMore: H,
|
|
3007
3041
|
isLoadingMore: _e
|
|
3008
3042
|
});
|
|
3009
3043
|
}
|
|
3010
3044
|
//#endregion
|
|
3011
3045
|
//#region src/components/ui/sheet.tsx
|
|
3012
|
-
var
|
|
3046
|
+
var Li = D.Root, Ri = D.Trigger, zi = D.Close, Bi = D.Portal, Vi = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(D.Overlay, {
|
|
3013
3047
|
className: G("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", e),
|
|
3014
3048
|
...t,
|
|
3015
3049
|
ref: n
|
|
3016
3050
|
}));
|
|
3017
|
-
|
|
3018
|
-
var
|
|
3051
|
+
Vi.displayName = D.Overlay.displayName;
|
|
3052
|
+
var Hi = g("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500", {
|
|
3019
3053
|
variants: { side: {
|
|
3020
3054
|
top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
|
|
3021
3055
|
bottom: "inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
|
|
@@ -3023,44 +3057,44 @@ var Ri = g("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out
|
|
|
3023
3057
|
right: "inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"
|
|
3024
3058
|
} },
|
|
3025
3059
|
defaultVariants: { side: "right" }
|
|
3026
|
-
}),
|
|
3060
|
+
}), Ui = e.forwardRef(({ side: e = "right", className: t, children: n, ...r }, i) => /* @__PURE__ */ p(Bi, { children: [/* @__PURE__ */ f(Vi, {}), /* @__PURE__ */ p(D.Content, {
|
|
3027
3061
|
ref: i,
|
|
3028
|
-
className: G(
|
|
3062
|
+
className: G(Hi({ side: e }), t),
|
|
3029
3063
|
...r,
|
|
3030
3064
|
children: [n, /* @__PURE__ */ p(D.Close, {
|
|
3031
3065
|
className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",
|
|
3032
|
-
children: [/* @__PURE__ */ f(
|
|
3066
|
+
children: [/* @__PURE__ */ f(Zt, { className: "h-4 w-4" }), /* @__PURE__ */ f("span", {
|
|
3033
3067
|
className: "sr-only",
|
|
3034
3068
|
children: "Close"
|
|
3035
3069
|
})]
|
|
3036
3070
|
})]
|
|
3037
3071
|
})] }));
|
|
3038
|
-
|
|
3039
|
-
var
|
|
3072
|
+
Ui.displayName = D.Content.displayName;
|
|
3073
|
+
var Wi = ({ className: e, ...t }) => /* @__PURE__ */ f("div", {
|
|
3040
3074
|
className: G("flex flex-col space-y-2 text-center sm:text-left", e),
|
|
3041
3075
|
...t
|
|
3042
3076
|
});
|
|
3043
|
-
|
|
3044
|
-
var
|
|
3077
|
+
Wi.displayName = "SheetHeader";
|
|
3078
|
+
var Gi = ({ className: e, ...t }) => /* @__PURE__ */ f("div", {
|
|
3045
3079
|
className: G("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", e),
|
|
3046
3080
|
...t
|
|
3047
3081
|
});
|
|
3048
|
-
|
|
3049
|
-
var
|
|
3082
|
+
Gi.displayName = "SheetFooter";
|
|
3083
|
+
var Ki = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(D.Title, {
|
|
3050
3084
|
ref: n,
|
|
3051
3085
|
className: G("text-lg font-semibold text-foreground", e),
|
|
3052
3086
|
...t
|
|
3053
3087
|
}));
|
|
3054
|
-
|
|
3055
|
-
var
|
|
3088
|
+
Ki.displayName = D.Title.displayName;
|
|
3089
|
+
var qi = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(D.Description, {
|
|
3056
3090
|
ref: n,
|
|
3057
3091
|
className: G("text-sm text-muted-foreground", e),
|
|
3058
3092
|
...t
|
|
3059
3093
|
}));
|
|
3060
|
-
|
|
3094
|
+
qi.displayName = D.Description.displayName;
|
|
3061
3095
|
//#endregion
|
|
3062
3096
|
//#region ~icons/lucide/panel-left.jsx
|
|
3063
|
-
var
|
|
3097
|
+
var Ji = (e) => /* @__PURE__ */ f("svg", {
|
|
3064
3098
|
viewBox: "0 0 24 24",
|
|
3065
3099
|
width: "1.2em",
|
|
3066
3100
|
height: "1.2em",
|
|
@@ -3079,19 +3113,19 @@ var Wi = (e) => /* @__PURE__ */ f("svg", {
|
|
|
3079
3113
|
rx: 2
|
|
3080
3114
|
}), /* @__PURE__ */ f("path", { d: "M9 3v18" })]
|
|
3081
3115
|
})
|
|
3082
|
-
}),
|
|
3083
|
-
function
|
|
3116
|
+
}), Yi = 768;
|
|
3117
|
+
function Xi() {
|
|
3084
3118
|
let [t, n] = e.useState(void 0);
|
|
3085
3119
|
return e.useEffect(() => {
|
|
3086
|
-
let e = window.matchMedia(`(max-width: ${
|
|
3087
|
-
n(window.innerWidth <
|
|
3120
|
+
let e = window.matchMedia(`(max-width: ${Yi - 1}px)`), t = () => {
|
|
3121
|
+
n(window.innerWidth < Yi);
|
|
3088
3122
|
};
|
|
3089
|
-
return e.addEventListener("change", t), n(window.innerWidth <
|
|
3123
|
+
return e.addEventListener("change", t), n(window.innerWidth < Yi), () => e.removeEventListener("change", t);
|
|
3090
3124
|
}, []), !!t;
|
|
3091
3125
|
}
|
|
3092
3126
|
//#endregion
|
|
3093
3127
|
//#region src/components/ui/skeleton.tsx
|
|
3094
|
-
function
|
|
3128
|
+
function Zi({ className: e, ...t }) {
|
|
3095
3129
|
return /* @__PURE__ */ f("div", {
|
|
3096
3130
|
className: G("animate-pulse rounded-md bg-muted", e),
|
|
3097
3131
|
...t
|
|
@@ -3099,23 +3133,23 @@ function qi({ className: e, ...t }) {
|
|
|
3099
3133
|
}
|
|
3100
3134
|
//#endregion
|
|
3101
3135
|
//#region src/components/ui/tooltip.tsx
|
|
3102
|
-
var
|
|
3136
|
+
var Qi = V.Provider, $i = V.Root, ea = V.Trigger, ta = e.forwardRef(({ className: e, sideOffset: t = 4, ...n }, r) => /* @__PURE__ */ f(V.Content, {
|
|
3103
3137
|
ref: r,
|
|
3104
3138
|
sideOffset: t,
|
|
3105
3139
|
className: G("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 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 origin-[--radix-tooltip-content-transform-origin]", e),
|
|
3106
3140
|
...n
|
|
3107
3141
|
}));
|
|
3108
|
-
|
|
3142
|
+
ta.displayName = V.Content.displayName;
|
|
3109
3143
|
//#endregion
|
|
3110
3144
|
//#region src/components/ui/sidebar.tsx
|
|
3111
|
-
var
|
|
3112
|
-
function
|
|
3113
|
-
let t = e.useContext(
|
|
3145
|
+
var na = "16rem", ra = "18rem", ia = "3rem", aa = "b", oa = e.createContext(null);
|
|
3146
|
+
function sa() {
|
|
3147
|
+
let t = e.useContext(oa);
|
|
3114
3148
|
if (!t) throw Error("useSidebar must be used within a SidebarProvider.");
|
|
3115
3149
|
return t;
|
|
3116
3150
|
}
|
|
3117
|
-
function
|
|
3118
|
-
let c =
|
|
3151
|
+
function ca({ defaultOpen: t = !0, open: n, onOpenChange: r, className: i, style: a, children: o, ...s }) {
|
|
3152
|
+
let c = Xi(), [l, u] = e.useState(!1), [d, p] = e.useState(t), m = n ?? d, h = e.useCallback((e) => {
|
|
3119
3153
|
let t = typeof e == "function" ? e(m) : e;
|
|
3120
3154
|
r ? r(t) : p(t);
|
|
3121
3155
|
}, [r, m]), g = e.useCallback(() => c ? u((e) => !e) : h((e) => !e), [
|
|
@@ -3125,7 +3159,7 @@ function ia({ defaultOpen: t = !0, open: n, onOpenChange: r, className: i, style
|
|
|
3125
3159
|
]);
|
|
3126
3160
|
e.useEffect(() => {
|
|
3127
3161
|
let e = (e) => {
|
|
3128
|
-
e.key ===
|
|
3162
|
+
e.key === aa && (e.metaKey || e.ctrlKey) && (e.preventDefault(), g());
|
|
3129
3163
|
};
|
|
3130
3164
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
3131
3165
|
}, [g]);
|
|
@@ -3146,15 +3180,15 @@ function ia({ defaultOpen: t = !0, open: n, onOpenChange: r, className: i, style
|
|
|
3146
3180
|
u,
|
|
3147
3181
|
g
|
|
3148
3182
|
]);
|
|
3149
|
-
return /* @__PURE__ */ f(
|
|
3183
|
+
return /* @__PURE__ */ f(oa.Provider, {
|
|
3150
3184
|
value: v,
|
|
3151
|
-
children: /* @__PURE__ */ f(
|
|
3185
|
+
children: /* @__PURE__ */ f(Qi, {
|
|
3152
3186
|
delayDuration: 0,
|
|
3153
3187
|
children: /* @__PURE__ */ f("div", {
|
|
3154
3188
|
"data-slot": "sidebar-wrapper",
|
|
3155
3189
|
style: {
|
|
3156
|
-
"--sidebar-width":
|
|
3157
|
-
"--sidebar-width-icon":
|
|
3190
|
+
"--sidebar-width": na,
|
|
3191
|
+
"--sidebar-width-icon": ia,
|
|
3158
3192
|
...a
|
|
3159
3193
|
},
|
|
3160
3194
|
className: G("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full", i),
|
|
@@ -3164,27 +3198,27 @@ function ia({ defaultOpen: t = !0, open: n, onOpenChange: r, className: i, style
|
|
|
3164
3198
|
})
|
|
3165
3199
|
});
|
|
3166
3200
|
}
|
|
3167
|
-
function
|
|
3168
|
-
let { isMobile: o, state: s, openMobile: c, setOpenMobile: l } =
|
|
3201
|
+
function la({ side: e = "left", variant: t = "sidebar", collapsible: n = "offcanvas", className: r, children: i, ...a }) {
|
|
3202
|
+
let { isMobile: o, state: s, openMobile: c, setOpenMobile: l } = sa();
|
|
3169
3203
|
return n === "none" ? /* @__PURE__ */ f("div", {
|
|
3170
3204
|
"data-slot": "sidebar",
|
|
3171
3205
|
className: G("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col", r),
|
|
3172
3206
|
...a,
|
|
3173
3207
|
children: i
|
|
3174
|
-
}) : o ? /* @__PURE__ */ f(
|
|
3208
|
+
}) : o ? /* @__PURE__ */ f(Li, {
|
|
3175
3209
|
open: c,
|
|
3176
3210
|
onOpenChange: l,
|
|
3177
3211
|
...a,
|
|
3178
|
-
children: /* @__PURE__ */ p(
|
|
3212
|
+
children: /* @__PURE__ */ p(Ui, {
|
|
3179
3213
|
"data-sidebar": "sidebar",
|
|
3180
3214
|
"data-slot": "sidebar",
|
|
3181
3215
|
"data-mobile": "true",
|
|
3182
3216
|
className: "bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",
|
|
3183
|
-
style: { "--sidebar-width":
|
|
3217
|
+
style: { "--sidebar-width": ra },
|
|
3184
3218
|
side: e,
|
|
3185
|
-
children: [/* @__PURE__ */ p(
|
|
3219
|
+
children: [/* @__PURE__ */ p(Wi, {
|
|
3186
3220
|
className: "sr-only",
|
|
3187
|
-
children: [/* @__PURE__ */ f(
|
|
3221
|
+
children: [/* @__PURE__ */ f(Ki, { children: "Sidebar" }), /* @__PURE__ */ f(qi, { children: "Displays the mobile sidebar." })]
|
|
3188
3222
|
}), /* @__PURE__ */ f("div", {
|
|
3189
3223
|
className: "flex h-full w-full flex-col",
|
|
3190
3224
|
children: i
|
|
@@ -3213,8 +3247,8 @@ function aa({ side: e = "left", variant: t = "sidebar", collapsible: n = "offcan
|
|
|
3213
3247
|
})]
|
|
3214
3248
|
});
|
|
3215
3249
|
}
|
|
3216
|
-
function
|
|
3217
|
-
let { toggleSidebar: r } =
|
|
3250
|
+
function ua({ className: e, onClick: t, ...n }) {
|
|
3251
|
+
let { toggleSidebar: r } = sa();
|
|
3218
3252
|
return /* @__PURE__ */ p(K, {
|
|
3219
3253
|
"data-sidebar": "trigger",
|
|
3220
3254
|
"data-slot": "sidebar-trigger",
|
|
@@ -3224,14 +3258,14 @@ function oa({ className: e, onClick: t, ...n }) {
|
|
|
3224
3258
|
t?.(e), r();
|
|
3225
3259
|
},
|
|
3226
3260
|
...n,
|
|
3227
|
-
children: [/* @__PURE__ */ f(
|
|
3261
|
+
children: [/* @__PURE__ */ f(Ji, {}), /* @__PURE__ */ f("span", {
|
|
3228
3262
|
className: "sr-only",
|
|
3229
3263
|
children: "Toggle Sidebar"
|
|
3230
3264
|
})]
|
|
3231
3265
|
});
|
|
3232
3266
|
}
|
|
3233
|
-
function
|
|
3234
|
-
let { toggleSidebar: n } =
|
|
3267
|
+
function da({ className: e, ...t }) {
|
|
3268
|
+
let { toggleSidebar: n } = sa();
|
|
3235
3269
|
return /* @__PURE__ */ f("button", {
|
|
3236
3270
|
"data-sidebar": "rail",
|
|
3237
3271
|
"data-slot": "sidebar-rail",
|
|
@@ -3243,14 +3277,14 @@ function sa({ className: e, ...t }) {
|
|
|
3243
3277
|
...t
|
|
3244
3278
|
});
|
|
3245
3279
|
}
|
|
3246
|
-
function
|
|
3280
|
+
function fa({ className: e, ...t }) {
|
|
3247
3281
|
return /* @__PURE__ */ f("main", {
|
|
3248
3282
|
"data-slot": "sidebar-inset",
|
|
3249
3283
|
className: G("bg-background relative flex w-full flex-1 flex-col", "md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2", e),
|
|
3250
3284
|
...t
|
|
3251
3285
|
});
|
|
3252
3286
|
}
|
|
3253
|
-
function
|
|
3287
|
+
function pa({ className: e, ...t }) {
|
|
3254
3288
|
return /* @__PURE__ */ f(Q, {
|
|
3255
3289
|
"data-slot": "sidebar-input",
|
|
3256
3290
|
"data-sidebar": "input",
|
|
@@ -3258,7 +3292,7 @@ function la({ className: e, ...t }) {
|
|
|
3258
3292
|
...t
|
|
3259
3293
|
});
|
|
3260
3294
|
}
|
|
3261
|
-
function
|
|
3295
|
+
function ma({ className: e, ...t }) {
|
|
3262
3296
|
return /* @__PURE__ */ f("div", {
|
|
3263
3297
|
"data-slot": "sidebar-header",
|
|
3264
3298
|
"data-sidebar": "header",
|
|
@@ -3266,7 +3300,7 @@ function ua({ className: e, ...t }) {
|
|
|
3266
3300
|
...t
|
|
3267
3301
|
});
|
|
3268
3302
|
}
|
|
3269
|
-
function
|
|
3303
|
+
function ha({ className: e, ...t }) {
|
|
3270
3304
|
return /* @__PURE__ */ f("div", {
|
|
3271
3305
|
"data-slot": "sidebar-footer",
|
|
3272
3306
|
"data-sidebar": "footer",
|
|
@@ -3274,15 +3308,15 @@ function da({ className: e, ...t }) {
|
|
|
3274
3308
|
...t
|
|
3275
3309
|
});
|
|
3276
3310
|
}
|
|
3277
|
-
function
|
|
3278
|
-
return /* @__PURE__ */ f(
|
|
3311
|
+
function ga({ className: e, ...t }) {
|
|
3312
|
+
return /* @__PURE__ */ f(oi, {
|
|
3279
3313
|
"data-slot": "sidebar-separator",
|
|
3280
3314
|
"data-sidebar": "separator",
|
|
3281
3315
|
className: G("bg-sidebar-border mx-2 w-auto", e),
|
|
3282
3316
|
...t
|
|
3283
3317
|
});
|
|
3284
3318
|
}
|
|
3285
|
-
function
|
|
3319
|
+
function _a({ className: e, ...t }) {
|
|
3286
3320
|
return /* @__PURE__ */ f("div", {
|
|
3287
3321
|
"data-slot": "sidebar-content",
|
|
3288
3322
|
"data-sidebar": "content",
|
|
@@ -3290,7 +3324,7 @@ function pa({ className: e, ...t }) {
|
|
|
3290
3324
|
...t
|
|
3291
3325
|
});
|
|
3292
3326
|
}
|
|
3293
|
-
function
|
|
3327
|
+
function va({ className: e, ...t }) {
|
|
3294
3328
|
return /* @__PURE__ */ f("div", {
|
|
3295
3329
|
"data-slot": "sidebar-group",
|
|
3296
3330
|
"data-sidebar": "group",
|
|
@@ -3298,7 +3332,7 @@ function ma({ className: e, ...t }) {
|
|
|
3298
3332
|
...t
|
|
3299
3333
|
});
|
|
3300
3334
|
}
|
|
3301
|
-
function
|
|
3335
|
+
function ya({ className: e, asChild: t = !1, ...n }) {
|
|
3302
3336
|
return /* @__PURE__ */ f(t ? v : "div", {
|
|
3303
3337
|
"data-slot": "sidebar-group-label",
|
|
3304
3338
|
"data-sidebar": "group-label",
|
|
@@ -3306,7 +3340,7 @@ function ha({ className: e, asChild: t = !1, ...n }) {
|
|
|
3306
3340
|
...n
|
|
3307
3341
|
});
|
|
3308
3342
|
}
|
|
3309
|
-
function
|
|
3343
|
+
function ba({ className: e, asChild: t = !1, ...n }) {
|
|
3310
3344
|
return /* @__PURE__ */ f(t ? v : "button", {
|
|
3311
3345
|
"data-slot": "sidebar-group-action",
|
|
3312
3346
|
"data-sidebar": "group-action",
|
|
@@ -3314,7 +3348,7 @@ function ga({ className: e, asChild: t = !1, ...n }) {
|
|
|
3314
3348
|
...n
|
|
3315
3349
|
});
|
|
3316
3350
|
}
|
|
3317
|
-
function
|
|
3351
|
+
function xa({ className: e, ...t }) {
|
|
3318
3352
|
return /* @__PURE__ */ f("div", {
|
|
3319
3353
|
"data-slot": "sidebar-group-content",
|
|
3320
3354
|
"data-sidebar": "group-content",
|
|
@@ -3322,7 +3356,7 @@ function _a({ className: e, ...t }) {
|
|
|
3322
3356
|
...t
|
|
3323
3357
|
});
|
|
3324
3358
|
}
|
|
3325
|
-
function
|
|
3359
|
+
function Sa({ className: e, ...t }) {
|
|
3326
3360
|
return /* @__PURE__ */ f("ul", {
|
|
3327
3361
|
"data-slot": "sidebar-menu",
|
|
3328
3362
|
"data-sidebar": "menu",
|
|
@@ -3330,7 +3364,7 @@ function va({ className: e, ...t }) {
|
|
|
3330
3364
|
...t
|
|
3331
3365
|
});
|
|
3332
3366
|
}
|
|
3333
|
-
function
|
|
3367
|
+
function Ca({ className: e, ...t }) {
|
|
3334
3368
|
return /* @__PURE__ */ f("li", {
|
|
3335
3369
|
"data-slot": "sidebar-menu-item",
|
|
3336
3370
|
"data-sidebar": "menu-item",
|
|
@@ -3338,7 +3372,7 @@ function ya({ className: e, ...t }) {
|
|
|
3338
3372
|
...t
|
|
3339
3373
|
});
|
|
3340
3374
|
}
|
|
3341
|
-
var
|
|
3375
|
+
var wa = g("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0", {
|
|
3342
3376
|
variants: {
|
|
3343
3377
|
variant: {
|
|
3344
3378
|
default: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
|
|
@@ -3355,29 +3389,29 @@ var ba = g("peer/menu-button flex w-full items-center gap-2 overflow-hidden roun
|
|
|
3355
3389
|
size: "default"
|
|
3356
3390
|
}
|
|
3357
3391
|
});
|
|
3358
|
-
function
|
|
3359
|
-
let s = e ? v : "button", { isMobile: c, state: l } =
|
|
3392
|
+
function Ta({ asChild: e = !1, isActive: t = !1, variant: n = "default", size: r = "default", tooltip: i, className: a, ...o }) {
|
|
3393
|
+
let s = e ? v : "button", { isMobile: c, state: l } = sa(), u = /* @__PURE__ */ f(s, {
|
|
3360
3394
|
"data-slot": "sidebar-menu-button",
|
|
3361
3395
|
"data-sidebar": "menu-button",
|
|
3362
3396
|
"data-size": r,
|
|
3363
3397
|
"data-active": t,
|
|
3364
|
-
className: G(
|
|
3398
|
+
className: G(wa({
|
|
3365
3399
|
variant: n,
|
|
3366
3400
|
size: r
|
|
3367
3401
|
}), a),
|
|
3368
3402
|
...o
|
|
3369
3403
|
});
|
|
3370
|
-
return i ? (typeof i == "string" && (i = { children: i }), /* @__PURE__ */ p(
|
|
3404
|
+
return i ? (typeof i == "string" && (i = { children: i }), /* @__PURE__ */ p($i, { children: [/* @__PURE__ */ f(ea, {
|
|
3371
3405
|
asChild: !0,
|
|
3372
3406
|
children: u
|
|
3373
|
-
}), /* @__PURE__ */ f(
|
|
3407
|
+
}), /* @__PURE__ */ f(ta, {
|
|
3374
3408
|
side: "right",
|
|
3375
3409
|
align: "center",
|
|
3376
3410
|
hidden: l !== "collapsed" || c,
|
|
3377
3411
|
...i
|
|
3378
3412
|
})] })) : u;
|
|
3379
3413
|
}
|
|
3380
|
-
function
|
|
3414
|
+
function Ea({ className: e, asChild: t = !1, showOnHover: n = !1, ...r }) {
|
|
3381
3415
|
return /* @__PURE__ */ f(t ? v : "button", {
|
|
3382
3416
|
"data-slot": "sidebar-menu-action",
|
|
3383
3417
|
"data-sidebar": "menu-action",
|
|
@@ -3385,7 +3419,7 @@ function Sa({ className: e, asChild: t = !1, showOnHover: n = !1, ...r }) {
|
|
|
3385
3419
|
...r
|
|
3386
3420
|
});
|
|
3387
3421
|
}
|
|
3388
|
-
function
|
|
3422
|
+
function Da({ className: e, ...t }) {
|
|
3389
3423
|
return /* @__PURE__ */ f("div", {
|
|
3390
3424
|
"data-slot": "sidebar-menu-badge",
|
|
3391
3425
|
"data-sidebar": "menu-badge",
|
|
@@ -3393,24 +3427,24 @@ function Ca({ className: e, ...t }) {
|
|
|
3393
3427
|
...t
|
|
3394
3428
|
});
|
|
3395
3429
|
}
|
|
3396
|
-
function
|
|
3430
|
+
function Oa({ className: t, showIcon: n = !1, ...r }) {
|
|
3397
3431
|
let i = e.useMemo(() => `${Math.floor(Math.random() * 40) + 50}%`, []);
|
|
3398
3432
|
return /* @__PURE__ */ p("div", {
|
|
3399
3433
|
"data-slot": "sidebar-menu-skeleton",
|
|
3400
3434
|
"data-sidebar": "menu-skeleton",
|
|
3401
3435
|
className: G("flex h-8 items-center gap-2 rounded-md px-2", t),
|
|
3402
3436
|
...r,
|
|
3403
|
-
children: [n && /* @__PURE__ */ f(
|
|
3437
|
+
children: [n && /* @__PURE__ */ f(Zi, {
|
|
3404
3438
|
className: "size-4 rounded-md",
|
|
3405
3439
|
"data-sidebar": "menu-skeleton-icon"
|
|
3406
|
-
}), /* @__PURE__ */ f(
|
|
3440
|
+
}), /* @__PURE__ */ f(Zi, {
|
|
3407
3441
|
className: "h-4 max-w-(--skeleton-width) flex-1",
|
|
3408
3442
|
"data-sidebar": "menu-skeleton-text",
|
|
3409
3443
|
style: { "--skeleton-width": i }
|
|
3410
3444
|
})]
|
|
3411
3445
|
});
|
|
3412
3446
|
}
|
|
3413
|
-
function
|
|
3447
|
+
function ka({ className: e, ...t }) {
|
|
3414
3448
|
return /* @__PURE__ */ f("ul", {
|
|
3415
3449
|
"data-slot": "sidebar-menu-sub",
|
|
3416
3450
|
"data-sidebar": "menu-sub",
|
|
@@ -3418,7 +3452,7 @@ function Ta({ className: e, ...t }) {
|
|
|
3418
3452
|
...t
|
|
3419
3453
|
});
|
|
3420
3454
|
}
|
|
3421
|
-
function
|
|
3455
|
+
function Aa({ className: e, ...t }) {
|
|
3422
3456
|
return /* @__PURE__ */ f("li", {
|
|
3423
3457
|
"data-slot": "sidebar-menu-sub-item",
|
|
3424
3458
|
"data-sidebar": "menu-sub-item",
|
|
@@ -3426,7 +3460,7 @@ function Ea({ className: e, ...t }) {
|
|
|
3426
3460
|
...t
|
|
3427
3461
|
});
|
|
3428
3462
|
}
|
|
3429
|
-
function
|
|
3463
|
+
function ja({ asChild: e = !1, size: t = "md", isActive: n = !1, className: r, ...i }) {
|
|
3430
3464
|
return /* @__PURE__ */ f(e ? v : "a", {
|
|
3431
3465
|
"data-slot": "sidebar-menu-sub-button",
|
|
3432
3466
|
"data-sidebar": "menu-sub-button",
|
|
@@ -3438,12 +3472,12 @@ function Da({ asChild: e = !1, size: t = "md", isActive: n = !1, className: r, .
|
|
|
3438
3472
|
}
|
|
3439
3473
|
//#endregion
|
|
3440
3474
|
//#region src/components/ui/slider.tsx
|
|
3441
|
-
var
|
|
3475
|
+
var Ma = e.forwardRef(({ className: t, name: n, value: r, defaultValue: i, onValueChange: a, onBlur: o, ...s }, c) => {
|
|
3442
3476
|
let l = e.useRef(null);
|
|
3443
3477
|
e.useImperativeHandle(c, () => l.current);
|
|
3444
3478
|
let u = (e) => {
|
|
3445
3479
|
a?.(e[0]);
|
|
3446
|
-
}, m =
|
|
3480
|
+
}, m = Ie(r), h = Ie(i);
|
|
3447
3481
|
return /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f("input", {
|
|
3448
3482
|
type: "range",
|
|
3449
3483
|
ref: l,
|
|
@@ -3453,22 +3487,22 @@ var Oa = e.forwardRef(({ className: t, name: n, value: r, defaultValue: i, onVal
|
|
|
3453
3487
|
className: "sr-only",
|
|
3454
3488
|
tabIndex: -1,
|
|
3455
3489
|
"aria-hidden": "true"
|
|
3456
|
-
}), /* @__PURE__ */ p(
|
|
3490
|
+
}), /* @__PURE__ */ p(de.Root, {
|
|
3457
3491
|
value: m,
|
|
3458
3492
|
defaultValue: h,
|
|
3459
3493
|
onValueChange: u,
|
|
3460
3494
|
className: G("relative flex w-full touch-none select-none items-center", t),
|
|
3461
3495
|
...s,
|
|
3462
|
-
children: [/* @__PURE__ */ f(
|
|
3496
|
+
children: [/* @__PURE__ */ f(de.Track, {
|
|
3463
3497
|
className: "relative h-2 w-full grow overflow-hidden rounded-full bg-secondary",
|
|
3464
|
-
children: /* @__PURE__ */ f(
|
|
3465
|
-
}), /* @__PURE__ */ f(
|
|
3498
|
+
children: /* @__PURE__ */ f(de.Range, { className: "absolute h-full bg-primary" })
|
|
3499
|
+
}), /* @__PURE__ */ f(de.Thumb, { className: "block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50" })]
|
|
3466
3500
|
})] });
|
|
3467
3501
|
});
|
|
3468
|
-
|
|
3502
|
+
Ma.displayName = "Slider";
|
|
3469
3503
|
//#endregion
|
|
3470
3504
|
//#region ~icons/lucide/plus.jsx
|
|
3471
|
-
var
|
|
3505
|
+
var Na = (e) => /* @__PURE__ */ f("svg", {
|
|
3472
3506
|
viewBox: "0 0 24 24",
|
|
3473
3507
|
width: "1.2em",
|
|
3474
3508
|
height: "1.2em",
|
|
@@ -3481,7 +3515,7 @@ var ka = (e) => /* @__PURE__ */ f("svg", {
|
|
|
3481
3515
|
strokeWidth: 2,
|
|
3482
3516
|
d: "M5 12h14m-7-7v14"
|
|
3483
3517
|
})
|
|
3484
|
-
}),
|
|
3518
|
+
}), Pa = (e) => /* @__PURE__ */ f("svg", {
|
|
3485
3519
|
viewBox: "0 0 24 24",
|
|
3486
3520
|
width: "1.2em",
|
|
3487
3521
|
height: "1.2em",
|
|
@@ -3494,7 +3528,7 @@ var ka = (e) => /* @__PURE__ */ f("svg", {
|
|
|
3494
3528
|
strokeWidth: 2,
|
|
3495
3529
|
d: "M10 11v6m4-6v6m5-11v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6M3 6h18M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"
|
|
3496
3530
|
})
|
|
3497
|
-
}),
|
|
3531
|
+
}), Fa = {
|
|
3498
3532
|
string: [
|
|
3499
3533
|
"eq",
|
|
3500
3534
|
"ne",
|
|
@@ -3565,7 +3599,7 @@ var ka = (e) => /* @__PURE__ */ f("svg", {
|
|
|
3565
3599
|
"isNotNull"
|
|
3566
3600
|
],
|
|
3567
3601
|
json: ["isNull", "isNotNull"]
|
|
3568
|
-
},
|
|
3602
|
+
}, Ia = {
|
|
3569
3603
|
string: "contains",
|
|
3570
3604
|
integer: "eq",
|
|
3571
3605
|
numeric: "eq",
|
|
@@ -3574,7 +3608,7 @@ var ka = (e) => /* @__PURE__ */ f("svg", {
|
|
|
3574
3608
|
datetime: "eq",
|
|
3575
3609
|
enum: "eq",
|
|
3576
3610
|
json: "isNull"
|
|
3577
|
-
},
|
|
3611
|
+
}, La = {
|
|
3578
3612
|
eq: "=",
|
|
3579
3613
|
ne: "≠",
|
|
3580
3614
|
gt: ">",
|
|
@@ -3591,7 +3625,7 @@ var ka = (e) => /* @__PURE__ */ f("svg", {
|
|
|
3591
3625
|
after: "after",
|
|
3592
3626
|
isNull: "null",
|
|
3593
3627
|
isNotNull: "not null"
|
|
3594
|
-
},
|
|
3628
|
+
}, Ra = {
|
|
3595
3629
|
string: "string",
|
|
3596
3630
|
number: "integer",
|
|
3597
3631
|
boolean: "boolean",
|
|
@@ -3602,7 +3636,7 @@ var ka = (e) => /* @__PURE__ */ f("svg", {
|
|
|
3602
3636
|
};
|
|
3603
3637
|
//#endregion
|
|
3604
3638
|
//#region src/components/ui/tag-input.tsx
|
|
3605
|
-
function
|
|
3639
|
+
function za({ value: e = [], onChange: t, type: n = "text", placeholder: r, disabled: i, className: a }) {
|
|
3606
3640
|
let [o, s] = l(""), c = (r) => {
|
|
3607
3641
|
let i = r.trim();
|
|
3608
3642
|
if (i && !(n === "number" && !/^-?\d+(\.\d+)?$/.test(i))) {
|
|
@@ -3617,14 +3651,14 @@ function Fa({ value: e = [], onChange: t, type: n = "text", placeholder: r, disa
|
|
|
3617
3651
|
};
|
|
3618
3652
|
return /* @__PURE__ */ p("div", {
|
|
3619
3653
|
className: `flex flex-wrap gap-1 items-center border rounded-md p-2 min-h-[40px] ${i ? "bg-gray-100 cursor-not-allowed" : "bg-white"} ${a}`,
|
|
3620
|
-
children: [e.map((e, t) => /* @__PURE__ */ p(
|
|
3654
|
+
children: [e.map((e, t) => /* @__PURE__ */ p(ut, {
|
|
3621
3655
|
variant: "secondary",
|
|
3622
3656
|
className: "flex items-center gap-1 px-2 py-1",
|
|
3623
3657
|
children: [/* @__PURE__ */ f("span", { children: e }), !i && /* @__PURE__ */ f("button", {
|
|
3624
3658
|
type: "button",
|
|
3625
3659
|
onClick: () => u(t),
|
|
3626
3660
|
className: "hover:bg-gray-300 rounded-full p-0.5",
|
|
3627
|
-
children: /* @__PURE__ */ f(
|
|
3661
|
+
children: /* @__PURE__ */ f(Zt, {})
|
|
3628
3662
|
})]
|
|
3629
3663
|
}, t)), !i && /* @__PURE__ */ f("input", {
|
|
3630
3664
|
type: "text",
|
|
@@ -3652,35 +3686,35 @@ function Fa({ value: e = [], onChange: t, type: n = "text", placeholder: r, disa
|
|
|
3652
3686
|
}
|
|
3653
3687
|
//#endregion
|
|
3654
3688
|
//#region src/components/ui/sonamu-filter/value-input.tsx
|
|
3655
|
-
var
|
|
3689
|
+
var Ba = {
|
|
3656
3690
|
options: ["true", "false"],
|
|
3657
3691
|
labels: {
|
|
3658
3692
|
true: "True",
|
|
3659
3693
|
false: "False"
|
|
3660
3694
|
}
|
|
3661
3695
|
};
|
|
3662
|
-
function
|
|
3696
|
+
function Va({ propType: e, operator: t, value: n, onChange: r, fieldMeta: i }) {
|
|
3663
3697
|
let { SD: a } = J();
|
|
3664
|
-
if (t === "isNull" || t === "isNotNull") return /* @__PURE__ */ f(
|
|
3665
|
-
enum: { options:
|
|
3666
|
-
labels:
|
|
3698
|
+
if (t === "isNull" || t === "isNotNull") return /* @__PURE__ */ f(Ni, {
|
|
3699
|
+
enum: { options: Ba.options },
|
|
3700
|
+
labels: Ba.labels,
|
|
3667
3701
|
value: n === void 0 ? "" : String(n),
|
|
3668
3702
|
onValueChange: (e) => e && r(e === "true"),
|
|
3669
3703
|
className: "w-full"
|
|
3670
3704
|
});
|
|
3671
|
-
if (t === "in" || t === "notIn") return e === "enum" && i?.enumData ? /* @__PURE__ */ f(
|
|
3705
|
+
if (t === "in" || t === "notIn") return e === "enum" && i?.enumData ? /* @__PURE__ */ f(Ni, {
|
|
3672
3706
|
enum: { options: i.enumData.options },
|
|
3673
3707
|
labels: i.enumData.labels,
|
|
3674
3708
|
value: n ?? [],
|
|
3675
3709
|
onValueChange: r,
|
|
3676
3710
|
multiple: !0
|
|
3677
|
-
}) : /* @__PURE__ */ f(
|
|
3711
|
+
}) : /* @__PURE__ */ f(za, {
|
|
3678
3712
|
value: n ?? [],
|
|
3679
3713
|
onChange: r,
|
|
3680
3714
|
type: e === "integer" || e === "numeric" ? "number" : "text"
|
|
3681
3715
|
});
|
|
3682
3716
|
if (t === "between") {
|
|
3683
|
-
if (e === "integer" || e === "numeric") return /* @__PURE__ */ f(
|
|
3717
|
+
if (e === "integer" || e === "numeric") return /* @__PURE__ */ f(Ei, {
|
|
3684
3718
|
value: n ?? [void 0, void 0],
|
|
3685
3719
|
onChange: r
|
|
3686
3720
|
});
|
|
@@ -3689,7 +3723,7 @@ function La({ propType: e, operator: t, value: n, onChange: r, fieldMeta: i }) {
|
|
|
3689
3723
|
return /* @__PURE__ */ p("div", {
|
|
3690
3724
|
className: "flex items-center gap-2",
|
|
3691
3725
|
children: [
|
|
3692
|
-
/* @__PURE__ */ f(
|
|
3726
|
+
/* @__PURE__ */ f(zn, {
|
|
3693
3727
|
value: e ?? null,
|
|
3694
3728
|
onValueChange: (e) => r([e ?? void 0, t]),
|
|
3695
3729
|
placeholder: a("rc.sonamuFilter.startDate"),
|
|
@@ -3699,7 +3733,7 @@ function La({ propType: e, operator: t, value: n, onChange: r, fieldMeta: i }) {
|
|
|
3699
3733
|
className: "text-muted-foreground",
|
|
3700
3734
|
children: "~"
|
|
3701
3735
|
}),
|
|
3702
|
-
/* @__PURE__ */ f(
|
|
3736
|
+
/* @__PURE__ */ f(zn, {
|
|
3703
3737
|
value: t ?? null,
|
|
3704
3738
|
onValueChange: (t) => r([e, t ?? void 0]),
|
|
3705
3739
|
placeholder: a("rc.sonamuFilter.endDate"),
|
|
@@ -3709,12 +3743,12 @@ function La({ propType: e, operator: t, value: n, onChange: r, fieldMeta: i }) {
|
|
|
3709
3743
|
});
|
|
3710
3744
|
}
|
|
3711
3745
|
}
|
|
3712
|
-
return e === "enum" && i?.enumData ? /* @__PURE__ */ f(
|
|
3746
|
+
return e === "enum" && i?.enumData ? /* @__PURE__ */ f(Ni, {
|
|
3713
3747
|
enum: { options: i.enumData.options },
|
|
3714
3748
|
labels: i.enumData.labels,
|
|
3715
3749
|
value: n ?? "",
|
|
3716
3750
|
onValueChange: r
|
|
3717
|
-
}) : e === "date" || e === "datetime" ? /* @__PURE__ */ f(
|
|
3751
|
+
}) : e === "date" || e === "datetime" ? /* @__PURE__ */ f(Vn, {
|
|
3718
3752
|
value: n ?? void 0,
|
|
3719
3753
|
onValueChange: r
|
|
3720
3754
|
}) : e === "string" ? /* @__PURE__ */ f(Q, {
|
|
@@ -3727,9 +3761,9 @@ function La({ propType: e, operator: t, value: n, onChange: r, fieldMeta: i }) {
|
|
|
3727
3761
|
value: n === void 0 ? "" : String(n),
|
|
3728
3762
|
onValueChange: (e) => r(e === "" ? void 0 : Number(e)),
|
|
3729
3763
|
placeholder: a("rc.sonamuFilter.enterNumber")
|
|
3730
|
-
}) : e === "boolean" ? /* @__PURE__ */ f(
|
|
3731
|
-
enum: { options:
|
|
3732
|
-
labels:
|
|
3764
|
+
}) : e === "boolean" ? /* @__PURE__ */ f(Ni, {
|
|
3765
|
+
enum: { options: Ba.options },
|
|
3766
|
+
labels: Ba.labels,
|
|
3733
3767
|
value: n === void 0 ? "" : String(n),
|
|
3734
3768
|
onValueChange: (e) => e && r(e === "true"),
|
|
3735
3769
|
className: "w-full"
|
|
@@ -3742,8 +3776,8 @@ function La({ propType: e, operator: t, value: n, onChange: r, fieldMeta: i }) {
|
|
|
3742
3776
|
}
|
|
3743
3777
|
//#endregion
|
|
3744
3778
|
//#region src/components/ui/sonamu-filter/rule-row-input.tsx
|
|
3745
|
-
function
|
|
3746
|
-
let { SD: i } = J(), a = Object.keys(t), o = e.field ? t[e.field] : null, s = o ?
|
|
3779
|
+
function Ha({ rule: e, fieldMeta: t, onUpdate: n, onRemove: r }) {
|
|
3780
|
+
let { SD: i } = J(), a = Object.keys(t), o = e.field ? t[e.field] : null, s = o ? Fa[o.propType] : [];
|
|
3747
3781
|
return /* @__PURE__ */ p("div", {
|
|
3748
3782
|
className: "flex items-start gap-2 p-3 border rounded-lg bg-gray-50",
|
|
3749
3783
|
children: [
|
|
@@ -3767,7 +3801,7 @@ function Ra({ rule: e, fieldMeta: t, onUpdate: n, onRemove: r }) {
|
|
|
3767
3801
|
children: /* @__PURE__ */ f($, {
|
|
3768
3802
|
items: s.map((e) => ({
|
|
3769
3803
|
value: e,
|
|
3770
|
-
label:
|
|
3804
|
+
label: La[e]
|
|
3771
3805
|
})),
|
|
3772
3806
|
value: e.operator ?? void 0,
|
|
3773
3807
|
onValueChange: (e) => {
|
|
@@ -3782,7 +3816,7 @@ function Ra({ rule: e, fieldMeta: t, onUpdate: n, onRemove: r }) {
|
|
|
3782
3816
|
}),
|
|
3783
3817
|
/* @__PURE__ */ f("div", {
|
|
3784
3818
|
className: "flex-1 min-w-[150px]",
|
|
3785
|
-
children: e.operator && o ? /* @__PURE__ */ f(
|
|
3819
|
+
children: e.operator && o ? /* @__PURE__ */ f(Va, {
|
|
3786
3820
|
propType: o.propType,
|
|
3787
3821
|
operator: e.operator,
|
|
3788
3822
|
value: e.value,
|
|
@@ -3799,14 +3833,14 @@ function Ra({ rule: e, fieldMeta: t, onUpdate: n, onRemove: r }) {
|
|
|
3799
3833
|
size: "sm",
|
|
3800
3834
|
onClick: r,
|
|
3801
3835
|
className: "shrink-0 h-10 px-3",
|
|
3802
|
-
children: /* @__PURE__ */ f(
|
|
3836
|
+
children: /* @__PURE__ */ f(Pa, {})
|
|
3803
3837
|
})
|
|
3804
3838
|
]
|
|
3805
3839
|
});
|
|
3806
3840
|
}
|
|
3807
3841
|
//#endregion
|
|
3808
3842
|
//#region src/components/ui/sonamu-filter/utils.ts
|
|
3809
|
-
function
|
|
3843
|
+
function Ua(e) {
|
|
3810
3844
|
let t = e, n = !1;
|
|
3811
3845
|
for (; t._def.type === "nullable" || t._def.type === "optional";) t._def.type === "nullable" && (n = !0), t = t._def.innerType;
|
|
3812
3846
|
return {
|
|
@@ -3814,10 +3848,10 @@ function za(e) {
|
|
|
3814
3848
|
nullable: n
|
|
3815
3849
|
};
|
|
3816
3850
|
}
|
|
3817
|
-
function
|
|
3818
|
-
return
|
|
3851
|
+
function Wa(e) {
|
|
3852
|
+
return Ra[e] ?? "string";
|
|
3819
3853
|
}
|
|
3820
|
-
function
|
|
3854
|
+
function Ga(e, t) {
|
|
3821
3855
|
let n = e.options ? Array.from(e.options) : void 0;
|
|
3822
3856
|
if (!n) return;
|
|
3823
3857
|
let r = e._def?.description || e.description, i = {};
|
|
@@ -3827,29 +3861,29 @@ function Va(e, t) {
|
|
|
3827
3861
|
labels: i
|
|
3828
3862
|
};
|
|
3829
3863
|
}
|
|
3830
|
-
function
|
|
3864
|
+
function Ka(e, t) {
|
|
3831
3865
|
let n = e.shape, r = {};
|
|
3832
3866
|
for (let [e, i] of Object.entries(n)) {
|
|
3833
3867
|
if (e.startsWith("virtual") || e.startsWith("textsearchable")) continue;
|
|
3834
|
-
let { innerType: n, nullable: a } =
|
|
3868
|
+
let { innerType: n, nullable: a } = Ua(i), o = i.meta?.()?.SonamuPropType === "numeric" ? "numeric" : Wa(n._def.type);
|
|
3835
3869
|
r[e] = {
|
|
3836
3870
|
propType: o,
|
|
3837
3871
|
nullable: a,
|
|
3838
|
-
enumData: o === "enum" ?
|
|
3872
|
+
enumData: o === "enum" ? Ga(n, t) : void 0
|
|
3839
3873
|
};
|
|
3840
3874
|
}
|
|
3841
3875
|
return r;
|
|
3842
3876
|
}
|
|
3843
3877
|
//#endregion
|
|
3844
3878
|
//#region src/components/ui/sonamu-filter/sonamu-filter-modal.tsx
|
|
3845
|
-
function
|
|
3879
|
+
function qa({ baseSchema: e, open: t, onOpenChange: n, initialRules: r = [], onApply: i }) {
|
|
3846
3880
|
let { SD: o } = J(), [s, c] = l(r), [u, d] = l([]);
|
|
3847
3881
|
a(() => {
|
|
3848
3882
|
c(r);
|
|
3849
3883
|
}, [r]), a(() => {
|
|
3850
3884
|
t && d(s.map((e) => ({ ...e })));
|
|
3851
3885
|
}, [t, s]);
|
|
3852
|
-
let m =
|
|
3886
|
+
let m = Ka(e, o), h = () => {
|
|
3853
3887
|
d([...u, {
|
|
3854
3888
|
id: crypto.randomUUID(),
|
|
3855
3889
|
field: null,
|
|
@@ -3868,13 +3902,13 @@ function Ua({ baseSchema: e, open: t, onOpenChange: n, initialRules: r = [], onA
|
|
|
3868
3902
|
for (let t of u) !t.field || !t.operator || (t.operator === "isNull" || t.operator, e[t.field] = { [t.operator]: t.value });
|
|
3869
3903
|
return e;
|
|
3870
3904
|
};
|
|
3871
|
-
return /* @__PURE__ */ f(
|
|
3905
|
+
return /* @__PURE__ */ f(Qt, {
|
|
3872
3906
|
open: t,
|
|
3873
3907
|
onOpenChange: n,
|
|
3874
|
-
children: /* @__PURE__ */ p(
|
|
3908
|
+
children: /* @__PURE__ */ p(rn, {
|
|
3875
3909
|
className: "max-w-4xl max-h-[90vh] overflow-hidden flex flex-col",
|
|
3876
3910
|
children: [
|
|
3877
|
-
/* @__PURE__ */ f(
|
|
3911
|
+
/* @__PURE__ */ f(an, { children: /* @__PURE__ */ f(sn, { children: o("rc.sonamuFilter.title") }) }),
|
|
3878
3912
|
/* @__PURE__ */ p("div", {
|
|
3879
3913
|
className: "flex-1 overflow-auto space-y-4 py-4",
|
|
3880
3914
|
children: [
|
|
@@ -3886,7 +3920,7 @@ function Ua({ baseSchema: e, open: t, onOpenChange: n, initialRules: r = [], onA
|
|
|
3886
3920
|
})
|
|
3887
3921
|
}) : /* @__PURE__ */ f("div", {
|
|
3888
3922
|
className: "space-y-2",
|
|
3889
|
-
children: u.map((e) => /* @__PURE__ */ f(
|
|
3923
|
+
children: u.map((e) => /* @__PURE__ */ f(Ha, {
|
|
3890
3924
|
rule: e,
|
|
3891
3925
|
fieldMeta: m,
|
|
3892
3926
|
onUpdate: (t) => _(e.id, t),
|
|
@@ -3899,7 +3933,7 @@ function Ua({ baseSchema: e, open: t, onOpenChange: n, initialRules: r = [], onA
|
|
|
3899
3933
|
variant: "outline",
|
|
3900
3934
|
onClick: h,
|
|
3901
3935
|
className: "flex-1",
|
|
3902
|
-
children: [/* @__PURE__ */ f(
|
|
3936
|
+
children: [/* @__PURE__ */ f(Na, {}), o("rc.sonamuFilter.addRule")]
|
|
3903
3937
|
}), u.length > 0 && /* @__PURE__ */ f(K, {
|
|
3904
3938
|
variant: "outline",
|
|
3905
3939
|
onClick: () => {
|
|
@@ -3943,54 +3977,54 @@ function Ua({ baseSchema: e, open: t, onOpenChange: n, initialRules: r = [], onA
|
|
|
3943
3977
|
}
|
|
3944
3978
|
//#endregion
|
|
3945
3979
|
//#region src/lib/caster.ts
|
|
3946
|
-
function
|
|
3980
|
+
function Ja(e) {
|
|
3947
3981
|
return e instanceof H.ZodNumber || e instanceof H.ZodNullable && e._def.innerType instanceof H.ZodNumber || e instanceof H.ZodOptional && e._def.innerType instanceof H.ZodNumber ? !0 : e instanceof H.ZodOptional && e._def.innerType instanceof H.ZodOptional && e._def.innerType._def.innerType instanceof H.ZodNumber;
|
|
3948
3982
|
}
|
|
3949
|
-
function
|
|
3950
|
-
if (
|
|
3983
|
+
function Ya(e, t) {
|
|
3984
|
+
if (Ja(e) && typeof t == "string") return Number(t);
|
|
3951
3985
|
if (e instanceof H.ZodUnion) {
|
|
3952
3986
|
let n = e.options;
|
|
3953
|
-
if (n.some((e) =>
|
|
3987
|
+
if (n.some((e) => Ja(e))) if (Array.isArray(t)) {
|
|
3954
3988
|
let e = n.find((e) => e instanceof H.ZodNumber);
|
|
3955
3989
|
if (!e) throw Error("Expected to find a number type in union");
|
|
3956
|
-
return t.map((t) =>
|
|
3990
|
+
return t.map((t) => Ya(e, t));
|
|
3957
3991
|
} else return Number(t);
|
|
3958
3992
|
} else if (e instanceof H.ZodBoolean && (t === "true" || t === "false")) return t === "true";
|
|
3959
|
-
else if (e instanceof H.ZodArray) return t.map((t) =>
|
|
3960
|
-
else if (e instanceof H.ZodObject && typeof t == "object") return Object.keys(t).reduce((n, r) => (n[r] =
|
|
3961
|
-
else if (e instanceof H.ZodOptional) return
|
|
3993
|
+
else if (e instanceof H.ZodArray) return t.map((t) => Ya(e.element, t));
|
|
3994
|
+
else if (e instanceof H.ZodObject && typeof t == "object") return Object.keys(t).reduce((n, r) => (n[r] = Ya(e.shape[r], t[r]), n), {});
|
|
3995
|
+
else if (e instanceof H.ZodOptional) return Ya(e._def.innerType, t);
|
|
3962
3996
|
return t;
|
|
3963
3997
|
}
|
|
3964
|
-
function
|
|
3965
|
-
return H.preprocess((t) =>
|
|
3998
|
+
function Xa(e) {
|
|
3999
|
+
return H.preprocess((t) => Ya(e, t), e);
|
|
3966
4000
|
}
|
|
3967
4001
|
//#endregion
|
|
3968
4002
|
//#region src/lib/base-helpers.ts
|
|
3969
|
-
function
|
|
4003
|
+
function Za(e) {
|
|
3970
4004
|
return e === !0 ? "hidden" : "";
|
|
3971
4005
|
}
|
|
3972
|
-
function
|
|
3973
|
-
return
|
|
4006
|
+
function Qa(e, t) {
|
|
4007
|
+
return Ya(t, fe.parse(e.toString()));
|
|
3974
4008
|
}
|
|
3975
|
-
function
|
|
3976
|
-
return Object.fromEntries(Object.entries(e).filter(([, e]) => e !== void 0).map(([e, t]) => Array.isArray(t) ? [[`${e}[]`, t]] :
|
|
4009
|
+
function $a(e) {
|
|
4010
|
+
return Object.fromEntries(Object.entries(e).filter(([, e]) => e !== void 0).map(([e, t]) => Array.isArray(t) ? [[`${e}[]`, t]] : me(t) ? Object.keys(t).map((n) => [`${e}[${n}]`, String(t[n])]) : [[e, String(t)]]).flat());
|
|
3977
4011
|
}
|
|
3978
|
-
function
|
|
4012
|
+
function eo(e) {
|
|
3979
4013
|
return e === null ? null : e.slice(0, 10);
|
|
3980
4014
|
}
|
|
3981
|
-
function
|
|
4015
|
+
function to(e) {
|
|
3982
4016
|
return e && new Intl.NumberFormat().format(e);
|
|
3983
4017
|
}
|
|
3984
|
-
function
|
|
4018
|
+
function no(e) {
|
|
3985
4019
|
return e == null ? null : e instanceof Date ? e.toISOString().slice(0, 10) : e.slice(0, 10);
|
|
3986
4020
|
}
|
|
3987
|
-
function
|
|
4021
|
+
function ro(e) {
|
|
3988
4022
|
return e == null ? null : e instanceof Date ? e.toISOString().slice(0, 19).replace("T", " ") : e.slice(0, 19);
|
|
3989
4023
|
}
|
|
3990
|
-
function
|
|
4024
|
+
function io(e) {
|
|
3991
4025
|
return e ? Array.isArray(e) ? e : [e] : [];
|
|
3992
4026
|
}
|
|
3993
|
-
function
|
|
4027
|
+
function ao() {
|
|
3994
4028
|
let e = null;
|
|
3995
4029
|
return {
|
|
3996
4030
|
set: (t) => {
|
|
@@ -4003,30 +4037,30 @@ function to() {
|
|
|
4003
4037
|
}
|
|
4004
4038
|
//#endregion
|
|
4005
4039
|
//#region src/lib/form-helpers.ts
|
|
4006
|
-
async function
|
|
4040
|
+
async function oo(e, t) {
|
|
4007
4041
|
if (e instanceof File) {
|
|
4008
4042
|
let [n] = await t([e]);
|
|
4009
4043
|
return n;
|
|
4010
4044
|
}
|
|
4011
|
-
if (Array.isArray(e)) return e.length > 0 && e.every((e) => e instanceof File) ? await t(e) : await Promise.all(e.map((e) =>
|
|
4045
|
+
if (Array.isArray(e)) return e.length > 0 && e.every((e) => e instanceof File) ? await t(e) : await Promise.all(e.map((e) => oo(e, t)));
|
|
4012
4046
|
if (typeof e == "object" && e && Object.prototype.toString.call(e) === "[object Object]") {
|
|
4013
4047
|
let n = {};
|
|
4014
|
-
for (let [r, i] of Object.entries(e)) n[r] = await
|
|
4048
|
+
for (let [r, i] of Object.entries(e)) n[r] = await oo(i, t);
|
|
4015
4049
|
return n;
|
|
4016
4050
|
}
|
|
4017
4051
|
return e;
|
|
4018
4052
|
}
|
|
4019
|
-
function
|
|
4053
|
+
function so(e, t) {
|
|
4020
4054
|
let [n, r] = l(t), [i, a] = l(/* @__PURE__ */ new Map()), { uploader: o } = J();
|
|
4021
4055
|
function s(e, t) {
|
|
4022
4056
|
let n = t.replace(/\./g, ".shape.").replace(/\[[^\]]+\]/g, ".element").replace(/^\.element/, "element"), r;
|
|
4023
|
-
return e instanceof H.ZodObject ? r =
|
|
4057
|
+
return e instanceof H.ZodObject ? r = pe(e.shape, n) : e instanceof H.ZodArray && (r = pe(e, n)), r === void 0 ? "normal" : r instanceof H.ZodOptional ? "optional" : r instanceof H.ZodNullable ? "nullable" : "normal";
|
|
4024
4058
|
}
|
|
4025
4059
|
return {
|
|
4026
4060
|
form: n,
|
|
4027
4061
|
setForm: r,
|
|
4028
4062
|
register: (t, o) => {
|
|
4029
|
-
let c = o ?? s(e, t), l =
|
|
4063
|
+
let c = o ?? s(e, t), l = pe(n, t), u = i.get(t), d = {
|
|
4030
4064
|
value: l ?? "",
|
|
4031
4065
|
onValueChange: (e) => {
|
|
4032
4066
|
u !== void 0 && a((e) => {
|
|
@@ -4039,13 +4073,13 @@ function ro(e, t) {
|
|
|
4039
4073
|
r(i === void 0 && o ? {
|
|
4040
4074
|
...n,
|
|
4041
4075
|
[t]: void 0
|
|
4042
|
-
} :
|
|
4076
|
+
} : he(n, t, i));
|
|
4043
4077
|
}
|
|
4044
4078
|
};
|
|
4045
4079
|
return u && (d.error = u), d;
|
|
4046
4080
|
},
|
|
4047
4081
|
submit: (e) => async () => {
|
|
4048
|
-
let t = await
|
|
4082
|
+
let t = await oo(n, o);
|
|
4049
4083
|
return r(t), await e(t);
|
|
4050
4084
|
},
|
|
4051
4085
|
addError: (e, t) => {
|
|
@@ -4070,11 +4104,11 @@ function ro(e, t) {
|
|
|
4070
4104
|
}
|
|
4071
4105
|
//#endregion
|
|
4072
4106
|
//#region src/lib/list-helpers.ts
|
|
4073
|
-
function
|
|
4107
|
+
function co(e, t) {
|
|
4074
4108
|
return e.filter((e) => t.includes(e));
|
|
4075
4109
|
}
|
|
4076
|
-
function
|
|
4077
|
-
let r =
|
|
4110
|
+
function lo(e, t, n) {
|
|
4111
|
+
let r = ve({ strict: !1 }), i = _e(), a = (() => {
|
|
4078
4112
|
if (n?.disableSearchParams) return t;
|
|
4079
4113
|
let i = e.safeParse(r);
|
|
4080
4114
|
return i.success ? {
|
|
@@ -4082,7 +4116,7 @@ function ao(e, t, n) {
|
|
|
4082
4116
|
...i.data
|
|
4083
4117
|
} : t;
|
|
4084
4118
|
})(), o = (e) => {
|
|
4085
|
-
|
|
4119
|
+
ye(a, e) || i({ search: e });
|
|
4086
4120
|
};
|
|
4087
4121
|
function s(e) {
|
|
4088
4122
|
let n = a[e], r = t[e];
|
|
@@ -4106,11 +4140,11 @@ function ao(e, t, n) {
|
|
|
4106
4140
|
register: s
|
|
4107
4141
|
};
|
|
4108
4142
|
}
|
|
4109
|
-
function
|
|
4143
|
+
function uo(e, t = []) {
|
|
4110
4144
|
let [n, r] = l(new Map(e.map((e) => [e, t.includes(e)]))), [i, o] = l(0);
|
|
4111
4145
|
a(() => {
|
|
4112
4146
|
let t = Array.from(n.keys());
|
|
4113
|
-
|
|
4147
|
+
co(e, t).length !== t.length && r(new Map(Array.from(n).filter(([t, n]) => e.includes(t))));
|
|
4114
4148
|
}, [e, n]);
|
|
4115
4149
|
let s = Array.from(n).filter(([t, n]) => e.includes(t) && n).map(([e]) => e);
|
|
4116
4150
|
return {
|
|
@@ -4126,14 +4160,14 @@ function oo(e, t = []) {
|
|
|
4126
4160
|
let a = t.currentTarget.getElementsByTagName("input");
|
|
4127
4161
|
if (t.shiftKey && !a[0]?.checked) {
|
|
4128
4162
|
let [t, a] = i < n ? [i, n] : [n + 1, i];
|
|
4129
|
-
r(new Map(
|
|
4163
|
+
r(new Map(ge([...s, ...e.slice(t, a)]).map((e) => [e, !0])));
|
|
4130
4164
|
} else o(n);
|
|
4131
4165
|
}
|
|
4132
4166
|
};
|
|
4133
4167
|
}
|
|
4134
4168
|
//#endregion
|
|
4135
4169
|
//#region src/lib/modal-helpers.ts
|
|
4136
|
-
function
|
|
4170
|
+
function fo(e, n) {
|
|
4137
4171
|
let [r, i] = l({
|
|
4138
4172
|
...n,
|
|
4139
4173
|
open: !1
|
|
@@ -4159,12 +4193,12 @@ function so(e, n) {
|
|
|
4159
4193
|
}
|
|
4160
4194
|
//#endregion
|
|
4161
4195
|
//#region src/components/ui/sonamu-filter/sonamu-filter-popover.tsx
|
|
4162
|
-
function
|
|
4163
|
-
let { SD: a } = J(), o = (e) => e ?
|
|
4196
|
+
function po({ rules: e, fieldMeta: t, children: n, side: r = "bottom", align: i = "start" }) {
|
|
4197
|
+
let { SD: a } = J(), o = (e) => e ? La[e] : "", s = (e) => {
|
|
4164
4198
|
let { value: n, field: r, operator: i } = e;
|
|
4165
4199
|
if (i === "isNull" || i === "isNotNull" || !r || n == null) return "";
|
|
4166
4200
|
let a = t[r];
|
|
4167
|
-
return a ? a.propType === "enum" && a.enumData ? Array.isArray(n) ? n.map((e) => a.enumData?.labels[e] || e).join(", ") : a.enumData.labels[n] || String(n) : a.propType === "date" || a.propType === "datetime" ? Array.isArray(n) ? n.map((e) =>
|
|
4201
|
+
return a ? a.propType === "enum" && a.enumData ? Array.isArray(n) ? n.map((e) => a.enumData?.labels[e] || e).join(", ") : a.enumData.labels[n] || String(n) : a.propType === "date" || a.propType === "datetime" ? Array.isArray(n) ? n.map((e) => ro(e) ?? "").join(" ~ ") : ro(n) ?? "" : a.propType === "integer" || a.propType === "numeric" ? Array.isArray(n) ? n.map((e) => String(to(e) ?? "")).join(" ~ ") : String(to(n) ?? "") : Array.isArray(n) ? n.join(", ") : String(n) : String(n);
|
|
4168
4202
|
};
|
|
4169
4203
|
return e.length === 0 ? /* @__PURE__ */ f(d, { children: n }) : /* @__PURE__ */ p(Y, {
|
|
4170
4204
|
open: !0,
|
|
@@ -4211,7 +4245,7 @@ function co({ rules: e, fieldMeta: t, children: n, side: r = "bottom", align: i
|
|
|
4211
4245
|
}
|
|
4212
4246
|
//#endregion
|
|
4213
4247
|
//#region src/components/ui/switch.tsx
|
|
4214
|
-
var
|
|
4248
|
+
var mo = e.forwardRef(({ className: t, name: n, checked: r, value: i, defaultChecked: a, onValueChange: o, onBlur: s, ...c }, l) => {
|
|
4215
4249
|
let u = i === void 0 ? r : i, m = e.useRef(null);
|
|
4216
4250
|
e.useImperativeHandle(l, () => m.current);
|
|
4217
4251
|
let h = (e) => {
|
|
@@ -4226,19 +4260,19 @@ var lo = e.forwardRef(({ className: t, name: n, checked: r, value: i, defaultChe
|
|
|
4226
4260
|
className: "sr-only",
|
|
4227
4261
|
tabIndex: -1,
|
|
4228
4262
|
"aria-hidden": "true"
|
|
4229
|
-
}), /* @__PURE__ */ f(
|
|
4263
|
+
}), /* @__PURE__ */ f(be.Root, {
|
|
4230
4264
|
checked: u,
|
|
4231
4265
|
defaultChecked: a,
|
|
4232
4266
|
onCheckedChange: h,
|
|
4233
4267
|
className: G("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input", t),
|
|
4234
4268
|
...c,
|
|
4235
|
-
children: /* @__PURE__ */ f(
|
|
4269
|
+
children: /* @__PURE__ */ f(be.Thumb, { className: G("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0") })
|
|
4236
4270
|
})] });
|
|
4237
4271
|
});
|
|
4238
|
-
|
|
4272
|
+
mo.displayName = "Switch";
|
|
4239
4273
|
//#endregion
|
|
4240
4274
|
//#region src/components/ui/table.tsx
|
|
4241
|
-
function
|
|
4275
|
+
function ho({ className: e, containerClassName: t, ...n }) {
|
|
4242
4276
|
return /* @__PURE__ */ f("div", {
|
|
4243
4277
|
"data-slot": "table-container",
|
|
4244
4278
|
className: G("relative w-full overflow-x-auto", t),
|
|
@@ -4249,35 +4283,35 @@ function uo({ className: e, containerClassName: t, ...n }) {
|
|
|
4249
4283
|
})
|
|
4250
4284
|
});
|
|
4251
4285
|
}
|
|
4252
|
-
function
|
|
4286
|
+
function go({ className: e, ...t }) {
|
|
4253
4287
|
return /* @__PURE__ */ f("thead", {
|
|
4254
4288
|
"data-slot": "table-header",
|
|
4255
4289
|
className: G("[&_tr]:border-b", e),
|
|
4256
4290
|
...t
|
|
4257
4291
|
});
|
|
4258
4292
|
}
|
|
4259
|
-
function
|
|
4293
|
+
function _o({ className: e, ...t }) {
|
|
4260
4294
|
return /* @__PURE__ */ f("tbody", {
|
|
4261
4295
|
"data-slot": "table-body",
|
|
4262
4296
|
className: G("[&_tr:last-child]:border-0", e),
|
|
4263
4297
|
...t
|
|
4264
4298
|
});
|
|
4265
4299
|
}
|
|
4266
|
-
function
|
|
4300
|
+
function vo({ className: e, ...t }) {
|
|
4267
4301
|
return /* @__PURE__ */ f("tfoot", {
|
|
4268
4302
|
"data-slot": "table-footer",
|
|
4269
4303
|
className: G("bg-muted/50 border-t font-medium [&>tr]:last:border-b-0", e),
|
|
4270
4304
|
...t
|
|
4271
4305
|
});
|
|
4272
4306
|
}
|
|
4273
|
-
function
|
|
4307
|
+
function yo({ className: e, ...t }) {
|
|
4274
4308
|
return /* @__PURE__ */ f("tr", {
|
|
4275
4309
|
"data-slot": "table-row",
|
|
4276
4310
|
className: G("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors", e),
|
|
4277
4311
|
...t
|
|
4278
4312
|
});
|
|
4279
4313
|
}
|
|
4280
|
-
function
|
|
4314
|
+
function bo({ className: e, fit: t, align: n, ...r }) {
|
|
4281
4315
|
return /* @__PURE__ */ f("th", {
|
|
4282
4316
|
"data-slot": "table-head",
|
|
4283
4317
|
className: G("text-foreground h-10 px-2 text-left font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 *:[[role=checkbox]]:translate-y-[2px]", t && "w-px", n === "center" && "text-center", n === "right" && "text-right", e),
|
|
@@ -4285,7 +4319,7 @@ function go({ className: e, fit: t, align: n, ...r }) {
|
|
|
4285
4319
|
...r
|
|
4286
4320
|
});
|
|
4287
4321
|
}
|
|
4288
|
-
function
|
|
4322
|
+
function xo({ className: e, fit: t, align: n, ...r }) {
|
|
4289
4323
|
return /* @__PURE__ */ f("td", {
|
|
4290
4324
|
"data-slot": "table-cell",
|
|
4291
4325
|
className: G("p-2 whitespace-nowrap [&:has([role=checkbox])]:pr-0 *:[[role=checkbox]]:translate-y-[2px]", t && "w-px", n === "center" && "text-center", n === "right" && "text-right", e),
|
|
@@ -4293,7 +4327,7 @@ function _o({ className: e, fit: t, align: n, ...r }) {
|
|
|
4293
4327
|
...r
|
|
4294
4328
|
});
|
|
4295
4329
|
}
|
|
4296
|
-
function
|
|
4330
|
+
function So({ className: e, ...t }) {
|
|
4297
4331
|
return /* @__PURE__ */ f("caption", {
|
|
4298
4332
|
"data-slot": "table-caption",
|
|
4299
4333
|
className: G("text-muted-foreground mt-4 text-sm", e),
|
|
@@ -4302,27 +4336,27 @@ function vo({ className: e, ...t }) {
|
|
|
4302
4336
|
}
|
|
4303
4337
|
//#endregion
|
|
4304
4338
|
//#region src/components/ui/tabs.tsx
|
|
4305
|
-
var
|
|
4339
|
+
var Co = U.Root, wo = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(U.List, {
|
|
4306
4340
|
ref: n,
|
|
4307
4341
|
className: G("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground", e),
|
|
4308
4342
|
...t
|
|
4309
4343
|
}));
|
|
4310
|
-
|
|
4311
|
-
var
|
|
4344
|
+
wo.displayName = U.List.displayName;
|
|
4345
|
+
var To = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(U.Trigger, {
|
|
4312
4346
|
ref: n,
|
|
4313
4347
|
className: G("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm", e),
|
|
4314
4348
|
...t
|
|
4315
4349
|
}));
|
|
4316
|
-
|
|
4317
|
-
var
|
|
4350
|
+
To.displayName = U.Trigger.displayName;
|
|
4351
|
+
var Eo = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(U.Content, {
|
|
4318
4352
|
ref: n,
|
|
4319
4353
|
className: G("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2", e),
|
|
4320
4354
|
...t
|
|
4321
4355
|
}));
|
|
4322
|
-
|
|
4356
|
+
Eo.displayName = U.Content.displayName;
|
|
4323
4357
|
//#endregion
|
|
4324
4358
|
//#region src/components/ui/textarea.tsx
|
|
4325
|
-
var
|
|
4359
|
+
var Do = e.forwardRef(({ className: e, onValueChange: t, onChange: n, ...r }, i) => {
|
|
4326
4360
|
let a = (e) => {
|
|
4327
4361
|
t?.(e.target.value), n?.(e);
|
|
4328
4362
|
};
|
|
@@ -4333,70 +4367,70 @@ var Co = e.forwardRef(({ className: e, onValueChange: t, onChange: n, ...r }, i)
|
|
|
4333
4367
|
onChange: a
|
|
4334
4368
|
});
|
|
4335
4369
|
});
|
|
4336
|
-
|
|
4370
|
+
Do.displayName = "Textarea";
|
|
4337
4371
|
//#endregion
|
|
4338
4372
|
//#region src/components/ui/toast.tsx
|
|
4339
|
-
var
|
|
4373
|
+
var Oo = W.Provider, ko = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(W.Viewport, {
|
|
4340
4374
|
ref: n,
|
|
4341
4375
|
className: G("fixed top-0 z-100 flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]", e),
|
|
4342
4376
|
...t
|
|
4343
4377
|
}));
|
|
4344
|
-
|
|
4345
|
-
var
|
|
4378
|
+
ko.displayName = W.Viewport.displayName;
|
|
4379
|
+
var Ao = g("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full", {
|
|
4346
4380
|
variants: { variant: {
|
|
4347
4381
|
default: "border bg-background text-foreground",
|
|
4348
4382
|
destructive: "destructive group border-destructive bg-destructive text-destructive-foreground"
|
|
4349
4383
|
} },
|
|
4350
4384
|
defaultVariants: { variant: "default" }
|
|
4351
|
-
}),
|
|
4385
|
+
}), jo = e.forwardRef(({ className: e, variant: t, ...n }, r) => /* @__PURE__ */ f(W.Root, {
|
|
4352
4386
|
ref: r,
|
|
4353
|
-
className: G(
|
|
4387
|
+
className: G(Ao({ variant: t }), e),
|
|
4354
4388
|
...n
|
|
4355
4389
|
}));
|
|
4356
|
-
|
|
4357
|
-
var
|
|
4390
|
+
jo.displayName = W.Root.displayName;
|
|
4391
|
+
var Mo = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(W.Action, {
|
|
4358
4392
|
ref: n,
|
|
4359
4393
|
className: G("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive", e),
|
|
4360
4394
|
...t
|
|
4361
4395
|
}));
|
|
4362
|
-
|
|
4363
|
-
var
|
|
4396
|
+
Mo.displayName = W.Action.displayName;
|
|
4397
|
+
var No = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(W.Close, {
|
|
4364
4398
|
ref: n,
|
|
4365
4399
|
className: G("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600", e),
|
|
4366
4400
|
"toast-close": "",
|
|
4367
4401
|
...t,
|
|
4368
|
-
children: /* @__PURE__ */ f(
|
|
4402
|
+
children: /* @__PURE__ */ f(Zt, { className: "h-4 w-4" })
|
|
4369
4403
|
}));
|
|
4370
|
-
|
|
4371
|
-
var
|
|
4404
|
+
No.displayName = W.Close.displayName;
|
|
4405
|
+
var Po = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(W.Title, {
|
|
4372
4406
|
ref: n,
|
|
4373
4407
|
className: G("text-sm font-semibold", e),
|
|
4374
4408
|
...t
|
|
4375
4409
|
}));
|
|
4376
|
-
|
|
4377
|
-
var
|
|
4410
|
+
Po.displayName = W.Title.displayName;
|
|
4411
|
+
var Fo = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(W.Description, {
|
|
4378
4412
|
ref: n,
|
|
4379
4413
|
className: G("text-sm opacity-90", e),
|
|
4380
4414
|
...t
|
|
4381
4415
|
}));
|
|
4382
|
-
|
|
4416
|
+
Fo.displayName = W.Description.displayName;
|
|
4383
4417
|
//#endregion
|
|
4384
4418
|
//#region src/components/ui/toaster.tsx
|
|
4385
|
-
function
|
|
4386
|
-
let { toasts: e } =
|
|
4387
|
-
return /* @__PURE__ */ p(
|
|
4419
|
+
function Io() {
|
|
4420
|
+
let { toasts: e } = Pe();
|
|
4421
|
+
return /* @__PURE__ */ p(Oo, { children: [e.map(({ id: e, title: t, description: n, action: r, ...i }) => /* @__PURE__ */ p(jo, {
|
|
4388
4422
|
...i,
|
|
4389
4423
|
children: [
|
|
4390
4424
|
/* @__PURE__ */ p("div", {
|
|
4391
4425
|
className: "grid gap-1",
|
|
4392
|
-
children: [t && /* @__PURE__ */ f(
|
|
4426
|
+
children: [t && /* @__PURE__ */ f(Po, { children: t }), n && /* @__PURE__ */ f(Fo, { children: n })]
|
|
4393
4427
|
}),
|
|
4394
4428
|
r,
|
|
4395
|
-
/* @__PURE__ */ f(
|
|
4429
|
+
/* @__PURE__ */ f(No, {})
|
|
4396
4430
|
]
|
|
4397
|
-
}, e)), /* @__PURE__ */ f(
|
|
4431
|
+
}, e)), /* @__PURE__ */ f(ko, {})] });
|
|
4398
4432
|
}
|
|
4399
|
-
var
|
|
4433
|
+
var Lo = g("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 gap-2", {
|
|
4400
4434
|
variants: {
|
|
4401
4435
|
variant: {
|
|
4402
4436
|
default: "bg-transparent",
|
|
@@ -4412,15 +4446,15 @@ var No = g("inline-flex items-center justify-center rounded-md text-sm font-medi
|
|
|
4412
4446
|
variant: "default",
|
|
4413
4447
|
size: "default"
|
|
4414
4448
|
}
|
|
4415
|
-
}),
|
|
4449
|
+
}), Ro = e.forwardRef(({ className: e, variant: t, size: n, value: r, pressed: i, onValueChange: a, onPressedChange: o, ...s }, c) => {
|
|
4416
4450
|
let l = r === void 0 ? i : r;
|
|
4417
|
-
return /* @__PURE__ */ f(
|
|
4451
|
+
return /* @__PURE__ */ f(xe.Root, {
|
|
4418
4452
|
ref: c,
|
|
4419
4453
|
pressed: l,
|
|
4420
4454
|
onPressedChange: (e) => {
|
|
4421
4455
|
a?.(e), o?.(e);
|
|
4422
4456
|
},
|
|
4423
|
-
className: G(
|
|
4457
|
+
className: G(Lo({
|
|
4424
4458
|
variant: t,
|
|
4425
4459
|
size: n,
|
|
4426
4460
|
className: e
|
|
@@ -4428,17 +4462,17 @@ var No = g("inline-flex items-center justify-center rounded-md text-sm font-medi
|
|
|
4428
4462
|
...s
|
|
4429
4463
|
});
|
|
4430
4464
|
});
|
|
4431
|
-
|
|
4465
|
+
Ro.displayName = xe.Root.displayName;
|
|
4432
4466
|
//#endregion
|
|
4433
4467
|
//#region src/components/ui/toggle-group.tsx
|
|
4434
|
-
var
|
|
4468
|
+
var zo = e.createContext({
|
|
4435
4469
|
size: "default",
|
|
4436
4470
|
variant: "default"
|
|
4437
|
-
}),
|
|
4471
|
+
}), Bo = e.forwardRef(({ className: e, variant: t, size: n, children: r, ...i }, a) => /* @__PURE__ */ f(Se.Root, {
|
|
4438
4472
|
ref: a,
|
|
4439
4473
|
className: G("flex items-center justify-center gap-1", e),
|
|
4440
4474
|
...i,
|
|
4441
|
-
children: /* @__PURE__ */ f(
|
|
4475
|
+
children: /* @__PURE__ */ f(zo.Provider, {
|
|
4442
4476
|
value: {
|
|
4443
4477
|
variant: t,
|
|
4444
4478
|
size: n
|
|
@@ -4446,12 +4480,12 @@ var Fo = e.createContext({
|
|
|
4446
4480
|
children: r
|
|
4447
4481
|
})
|
|
4448
4482
|
}));
|
|
4449
|
-
|
|
4450
|
-
var
|
|
4451
|
-
let s = e.useContext(
|
|
4452
|
-
return /* @__PURE__ */ f(
|
|
4483
|
+
Bo.displayName = Se.Root.displayName;
|
|
4484
|
+
var Vo = e.forwardRef(({ className: t, children: n, variant: r, size: i, ...a }, o) => {
|
|
4485
|
+
let s = e.useContext(zo);
|
|
4486
|
+
return /* @__PURE__ */ f(Se.Item, {
|
|
4453
4487
|
ref: o,
|
|
4454
|
-
className: G(
|
|
4488
|
+
className: G(Lo({
|
|
4455
4489
|
variant: s.variant || r,
|
|
4456
4490
|
size: s.size || i
|
|
4457
4491
|
}), t),
|
|
@@ -4459,8 +4493,8 @@ var Lo = e.forwardRef(({ className: t, children: n, variant: r, size: i, ...a },
|
|
|
4459
4493
|
children: n
|
|
4460
4494
|
});
|
|
4461
4495
|
});
|
|
4462
|
-
|
|
4496
|
+
Vo.displayName = Se.Item.displayName;
|
|
4463
4497
|
//#endregion
|
|
4464
|
-
export {
|
|
4498
|
+
export { Re as Accordion, Ve as AccordionContent, ze as AccordionItem, Be as AccordionTrigger, Ue as Alert, Ge as AlertDescription, Je as AlertDialog, rt as AlertDialogAction, it as AlertDialogCancel, Qe as AlertDialogContent, nt as AlertDialogDescription, et as AlertDialogFooter, $e as AlertDialogHeader, Ze as AlertDialogOverlay, Xe as AlertDialogPortal, tt as AlertDialogTitle, Ye as AlertDialogTrigger, We as AlertTitle, at as AspectRatio, ot as Avatar, ct as AvatarFallback, st as AvatarImage, ut as Badge, pt as Breadcrumb, yt as BreadcrumbEllipsis, ht as BreadcrumbItem, gt as BreadcrumbLink, mt as BreadcrumbList, _t as BreadcrumbPage, vt as BreadcrumbSeparator, K as Button, xt as Calendar, St as Card, Et as CardAction, Dt as CardContent, Tt as CardDescription, Ot as CardFooter, Ct as CardHeader, wt as CardTitle, Nt as Carousel, Pt as CarouselContent, Ft as CarouselItem, Lt as CarouselNext, It as CarouselPrevious, Rt as Checkbox, zt as Collapsible, Vt as CollapsibleContent, Bt as CollapsibleTrigger, yn as Combobox, ln as Command, un as CommandDialog, pn as CommandEmpty, mn as CommandGroup, dn as CommandInput, gn as CommandItem, fn as CommandList, hn as CommandSeparator, _n as CommandShortcut, xn as CommonModal, wn as ContextMenu, Pn as ContextMenuCheckboxItem, Mn as ContextMenuContent, En as ContextMenuGroup, Nn as ContextMenuItem, In as ContextMenuLabel, Dn as ContextMenuPortal, kn as ContextMenuRadioGroup, Fn as ContextMenuRadioItem, Ln as ContextMenuSeparator, Rn as ContextMenuShortcut, On as ContextMenuSub, jn as ContextMenuSubContent, An as ContextMenuSubTrigger, Tn as ContextMenuTrigger, zn as DateInput, Vn as DatePicker, Hn as DatePickerWithDropdown, Un as DatePickerWithRange, Qt as Dialog, tn as DialogClose, rn as DialogContent, cn as DialogDescription, on as DialogFooter, an as DialogHeader, nn as DialogOverlay, en as DialogPortal, sn as DialogTitle, $t as DialogTrigger, Wn as Drawer, qn as DrawerClose, Yn as DrawerContent, $n as DrawerDescription, Zn as DrawerFooter, Xn as DrawerHeader, Jn as DrawerOverlay, Kn as DrawerPortal, Qn as DrawerTitle, Gn as DrawerTrigger, er as DropdownMenu, ur as DropdownMenuCheckboxItem, cr as DropdownMenuContent, nr as DropdownMenuGroup, lr as DropdownMenuItem, fr as DropdownMenuLabel, rr as DropdownMenuPortal, ar as DropdownMenuRadioGroup, dr as DropdownMenuRadioItem, pr as DropdownMenuSeparator, mr as DropdownMenuShortcut, ir as DropdownMenuSub, sr as DropdownMenuSubContent, or as DropdownMenuSubTrigger, tr as DropdownMenuTrigger, Ni as EnumSelect, Cr as FileInput, Er as Form, Nr as FormControl, Pr as FormDescription, Or as FormField, jr as FormItem, Mr as FormLabel, Fr as FormMessage, Ir as HoverCard, Rr as HoverCardContent, Lr as HoverCardTrigger, Ii as IdAsyncSelect, Q as Input, Br as InputOTP, Vr as InputOTPGroup, Ur as InputOTPSeparator, Hr as InputOTPSlot, Tr as Label, Yr as Menubar, ti as MenubarCheckboxItem, $r as MenubarContent, Gr as MenubarGroup, ei as MenubarItem, ri as MenubarLabel, Wr as MenubarMenu, Kr as MenubarPortal, qr as MenubarRadioGroup, ni as MenubarRadioItem, ii as MenubarSeparator, ai as MenubarShortcut, Jr as MenubarSub, Qr as MenubarSubContent, Zr as MenubarSubTrigger, Xr as MenubarTrigger, fi as MonthPickerMultiple, pi as NavigationMenu, vi as NavigationMenuContent, xi as NavigationMenuIndicator, hi as NavigationMenuItem, yi as NavigationMenuLink, mi as NavigationMenuList, _i as NavigationMenuTrigger, bi as NavigationMenuViewport, Si as Pagination, Y as Popover, vn as PopoverAnchor, Z as PopoverContent, X as PopoverTrigger, Ci as Progress, wi as RadioGroup, Ti as RadioGroupItem, Ei as RangeNumberInput, Ai as ResizableHandle, ki as ResizablePanel, Oi as ResizablePanelGroup, ji as ScrollArea, Mi as ScrollBar, $ as Select, oi as Separator, Li as Sheet, zi as SheetClose, Ui as SheetContent, qi as SheetDescription, Gi as SheetFooter, Wi as SheetHeader, Vi as SheetOverlay, Bi as SheetPortal, Ki as SheetTitle, Ri as SheetTrigger, la as Sidebar, _a as SidebarContent, ha as SidebarFooter, va as SidebarGroup, ba as SidebarGroupAction, xa as SidebarGroupContent, ya as SidebarGroupLabel, ma as SidebarHeader, pa as SidebarInput, fa as SidebarInset, Sa as SidebarMenu, Ea as SidebarMenuAction, Da as SidebarMenuBadge, Ta as SidebarMenuButton, Ca as SidebarMenuItem, Oa as SidebarMenuSkeleton, ka as SidebarMenuSub, ja as SidebarMenuSubButton, Aa as SidebarMenuSubItem, ca as SidebarProvider, da as SidebarRail, ga as SidebarSeparator, ua as SidebarTrigger, Zi as Skeleton, Ma as Slider, qa as SonamuFilterModal, po as SonamuFilterPopover, po as SonamuFilterTooltip, Yt as SonamuProvider, mo as Switch, ho as Table, _o as TableBody, So as TableCaption, xo as TableCell, vo as TableFooter, bo as TableHead, go as TableHeader, yo as TableRow, Co as Tabs, Eo as TabsContent, wo as TabsList, To as TabsTrigger, za as TagInput, Do as Textarea, jo as Toast, Mo as ToastAction, No as ToastClose, Fo as ToastDescription, Oo as ToastProvider, Po as ToastTitle, ko as ToastViewport, Io as Toaster, Ro as Toggle, Bo as ToggleGroup, Vo as ToggleGroupItem, $i as Tooltip, ta as TooltipContent, Qi as TooltipProvider, ea as TooltipTrigger, io as arrayableToArray, lt as badgeVariants, qe as buttonVariants, ao as caller, Ya as caster, G as cn, bn as commonModalAtom, no as dateF, ro as datetimeF, Ia as defaultOperatorByPropType, Ka as extractFieldMetaFromSchema, Xa as fastifyCaster, Za as hidden, gi as navigationMenuTriggerStyle, to as numF, Fa as operatorsByPropType, $a as paramsToSearchParams, Qa as searchParamsToParams, eo as sqlDateToDateString, Ne as toast, Lo as toggleVariants, Sn as useCommonModal, kr as useFormField, Xi as useIsMobile, lo as useListParams, fo as useModal, uo as useSelection, sa as useSidebar, J as useSonamuBaseContext, Pe as useToast, so as useTypeForm };
|
|
4465
4499
|
|
|
4466
4500
|
//# sourceMappingURL=react-components.es.js.map
|