opsfuse-ui 0.1.28 → 0.1.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/ui/sonner.d.ts +41 -3
- package/dist/components/ui/sonner.d.ts.map +1 -1
- package/dist/core.js +3 -3
- package/dist/extended.js +2 -2
- package/dist/index.js +54 -54
- package/dist/{input-group-X3fuX86H.js → input-group-BUy6rpQX.js} +380 -169
- package/dist/{input-otp-DrVB1OD2.js → input-otp-BVj0dmTF.js} +299 -299
- package/dist/style.css +1 -1
- package/dist/{toggle-group-DYoC1Lda.js → toggle-group-CU4v7h-z.js} +1323 -1480
- package/package.json +1 -1
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { Loader2Icon as e, XIcon as t } from "lucide-react";
|
|
3
3
|
import * as n from "react";
|
|
4
|
-
import { cloneElement as
|
|
5
|
-
import { clsx as
|
|
6
|
-
import { twMerge as
|
|
7
|
-
import { Fragment as
|
|
8
|
-
import { cva as
|
|
9
|
-
import { Dialog as
|
|
10
|
-
import { Toaster as
|
|
4
|
+
import r, { cloneElement as i, isValidElement as a, useEffect as o, useRef as s } from "react";
|
|
5
|
+
import { clsx as c } from "clsx";
|
|
6
|
+
import { twMerge as l } from "tailwind-merge";
|
|
7
|
+
import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
8
|
+
import { cva as p } from "class-variance-authority";
|
|
9
|
+
import { AlertDialog as m, Dialog as h, Label as ee, Slot as te } from "radix-ui";
|
|
10
|
+
import { Toaster as ne, toast as g, useSonner as re } from "sonner";
|
|
11
11
|
//#region src/lib/utils.ts
|
|
12
|
-
function
|
|
13
|
-
return c(
|
|
12
|
+
function _(...e) {
|
|
13
|
+
return l(c(e));
|
|
14
14
|
}
|
|
15
15
|
//#endregion
|
|
16
16
|
//#region src/components/ui/spinner.tsx
|
|
17
|
-
function
|
|
18
|
-
return /* @__PURE__ */
|
|
17
|
+
function v({ className: t, ...n }) {
|
|
18
|
+
return /* @__PURE__ */ d(e, {
|
|
19
19
|
role: "status",
|
|
20
20
|
"aria-label": "Loading",
|
|
21
|
-
className:
|
|
21
|
+
className: _("size-4 animate-spin", t),
|
|
22
22
|
...n
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
25
|
//#endregion
|
|
26
26
|
//#region src/components/ui/button.tsx
|
|
27
|
-
var
|
|
27
|
+
var y = p("cursor-pointer group/button inline-flex shrink-0 items-center justify-center rounded-md border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
|
|
28
28
|
variants: {
|
|
29
29
|
motion: {
|
|
30
30
|
default: "transition-all",
|
|
@@ -57,45 +57,45 @@ var b = f("cursor-pointer group/button inline-flex shrink-0 items-center justify
|
|
|
57
57
|
size: "default"
|
|
58
58
|
}
|
|
59
59
|
});
|
|
60
|
-
function
|
|
61
|
-
let c = i ?
|
|
62
|
-
return /* @__PURE__ */
|
|
60
|
+
function b({ className: e, variant: t = "default", size: n = "default", motion: r = "default", asChild: i = !1, loading: a = !1, loadingText: o = "Loading...", ...s }) {
|
|
61
|
+
let c = i ? te.Root : "button";
|
|
62
|
+
return /* @__PURE__ */ d(c, {
|
|
63
63
|
"data-slot": "button",
|
|
64
64
|
"data-variant": t,
|
|
65
65
|
"data-size": n,
|
|
66
66
|
"data-motion": r,
|
|
67
|
-
className:
|
|
67
|
+
className: _(y({
|
|
68
68
|
variant: t,
|
|
69
69
|
size: n,
|
|
70
70
|
motion: r
|
|
71
71
|
}), e),
|
|
72
72
|
...s,
|
|
73
|
-
children: a ? /* @__PURE__ */
|
|
73
|
+
children: a ? /* @__PURE__ */ f("div", {
|
|
74
74
|
className: "flex items-center gap-2",
|
|
75
|
-
children: [/* @__PURE__ */
|
|
75
|
+
children: [/* @__PURE__ */ d(v, { className: "size-4 animate-spin" }), o]
|
|
76
76
|
}) : s.children
|
|
77
77
|
});
|
|
78
78
|
}
|
|
79
79
|
//#endregion
|
|
80
80
|
//#region src/lib/brand-theme.ts
|
|
81
|
-
var
|
|
81
|
+
var ie = [
|
|
82
82
|
"recruitsmartly",
|
|
83
83
|
"skillready",
|
|
84
84
|
"worklog",
|
|
85
85
|
"verity",
|
|
86
86
|
"lms"
|
|
87
|
-
],
|
|
87
|
+
], ae = "recruitsmartly";
|
|
88
88
|
//#endregion
|
|
89
89
|
//#region src/lib/document-dark-mode.ts
|
|
90
|
-
function
|
|
90
|
+
function x() {
|
|
91
91
|
if (typeof document > "u") return !1;
|
|
92
92
|
let e = document.documentElement;
|
|
93
93
|
return e.classList.contains("dark") || e.getAttribute("data-theme") === "dark" || e.getAttribute("data-mode") === "dark" || e.getAttribute("data-color-mode") === "dark" || e.classList.contains("theme-dark") || (document.body?.classList.contains("dark") ?? !1);
|
|
94
94
|
}
|
|
95
|
-
function
|
|
96
|
-
let [e, t] = n.useState(() => typeof document > "u" ? !1 :
|
|
95
|
+
function oe() {
|
|
96
|
+
let [e, t] = n.useState(() => typeof document > "u" ? !1 : x());
|
|
97
97
|
return n.useEffect(() => {
|
|
98
|
-
let e = () => t(
|
|
98
|
+
let e = () => t(x());
|
|
99
99
|
e();
|
|
100
100
|
let n = new MutationObserver(e);
|
|
101
101
|
return n.observe(document.documentElement, {
|
|
@@ -114,7 +114,7 @@ function w() {
|
|
|
114
114
|
}
|
|
115
115
|
//#endregion
|
|
116
116
|
//#region src/lib/theme-scope.ts
|
|
117
|
-
var
|
|
117
|
+
var se = "opsfuse-ui", ce = {
|
|
118
118
|
"--color-background": "var(--background)",
|
|
119
119
|
"--color-foreground": "var(--foreground)",
|
|
120
120
|
"--color-card": "var(--card)",
|
|
@@ -191,56 +191,213 @@ var T = "opsfuse-ui", E = {
|
|
|
191
191
|
"--color-chart-6": "var(--chart-6)",
|
|
192
192
|
"--color-chart-grid": "var(--chart-grid)",
|
|
193
193
|
"--color-chart-axis": "var(--chart-axis)"
|
|
194
|
-
},
|
|
195
|
-
function
|
|
196
|
-
return /* @__PURE__ */
|
|
194
|
+
}, le = n.createContext(null);
|
|
195
|
+
function ue({ theme: e, children: t }) {
|
|
196
|
+
return /* @__PURE__ */ d(le.Provider, {
|
|
197
197
|
value: e,
|
|
198
198
|
children: t
|
|
199
199
|
});
|
|
200
200
|
}
|
|
201
|
-
function
|
|
202
|
-
return n.useContext(
|
|
201
|
+
function S() {
|
|
202
|
+
return n.useContext(le) ?? "recruitsmartly";
|
|
203
203
|
}
|
|
204
|
-
function
|
|
204
|
+
function C(e) {
|
|
205
205
|
return `brand-${e}`;
|
|
206
206
|
}
|
|
207
|
-
function
|
|
207
|
+
function w(e, t, n, r) {
|
|
208
208
|
return {
|
|
209
|
-
className:
|
|
209
|
+
className: _(se, C(e), t && "dark", n),
|
|
210
210
|
style: {
|
|
211
|
-
...
|
|
211
|
+
...ce,
|
|
212
212
|
...r
|
|
213
213
|
}
|
|
214
214
|
};
|
|
215
215
|
}
|
|
216
|
-
function
|
|
217
|
-
return
|
|
216
|
+
function T(e, t) {
|
|
217
|
+
return w(S(), oe(), e, t);
|
|
218
|
+
}
|
|
219
|
+
//#endregion
|
|
220
|
+
//#region src/components/ui/shadcn/shadcn-alert-dialog.tsx
|
|
221
|
+
function de({ ...e }) {
|
|
222
|
+
return /* @__PURE__ */ d(m.Root, {
|
|
223
|
+
"data-slot": "alert-dialog",
|
|
224
|
+
...e
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
function fe({ ...e }) {
|
|
228
|
+
return /* @__PURE__ */ d(m.Trigger, {
|
|
229
|
+
"data-slot": "alert-dialog-trigger",
|
|
230
|
+
...e
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
function E({ ...e }) {
|
|
234
|
+
return /* @__PURE__ */ d(m.Portal, {
|
|
235
|
+
"data-slot": "alert-dialog-portal",
|
|
236
|
+
...e
|
|
237
|
+
});
|
|
238
|
+
}
|
|
239
|
+
function D({ className: e, ...t }) {
|
|
240
|
+
return /* @__PURE__ */ d(m.Overlay, {
|
|
241
|
+
"data-slot": "alert-dialog-overlay",
|
|
242
|
+
className: _("fixed inset-0 z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0", e),
|
|
243
|
+
...t
|
|
244
|
+
});
|
|
245
|
+
}
|
|
246
|
+
function O({ className: e, size: t = "default", style: n, ...r }) {
|
|
247
|
+
let i = T();
|
|
248
|
+
return /* @__PURE__ */ f(E, { children: [/* @__PURE__ */ d(D, {}), /* @__PURE__ */ d(m.Content, {
|
|
249
|
+
"data-slot": "alert-dialog-content",
|
|
250
|
+
"data-size": t,
|
|
251
|
+
style: {
|
|
252
|
+
...i.style,
|
|
253
|
+
...n
|
|
254
|
+
},
|
|
255
|
+
className: _(i.className, "group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-6 rounded-xl bg-popover p-6 text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-lg data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", e),
|
|
256
|
+
...r
|
|
257
|
+
})] });
|
|
258
|
+
}
|
|
259
|
+
function k({ className: e, ...t }) {
|
|
260
|
+
return /* @__PURE__ */ d("div", {
|
|
261
|
+
"data-slot": "alert-dialog-header",
|
|
262
|
+
className: _("grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-6 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]", e),
|
|
263
|
+
...t
|
|
264
|
+
});
|
|
265
|
+
}
|
|
266
|
+
function A({ className: e, ...t }) {
|
|
267
|
+
return /* @__PURE__ */ d("div", {
|
|
268
|
+
"data-slot": "alert-dialog-footer",
|
|
269
|
+
className: _("flex flex-col-reverse gap-2 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end", e),
|
|
270
|
+
...t
|
|
271
|
+
});
|
|
272
|
+
}
|
|
273
|
+
function pe({ className: e, ...t }) {
|
|
274
|
+
return /* @__PURE__ */ d("div", {
|
|
275
|
+
"data-slot": "alert-dialog-media",
|
|
276
|
+
className: _("mb-2 inline-flex size-16 items-center justify-center rounded-md bg-muted sm:group-data-[size=default]/alert-dialog-content:row-span-2 *:[svg:not([class*='size-'])]:size-8", e),
|
|
277
|
+
...t
|
|
278
|
+
});
|
|
279
|
+
}
|
|
280
|
+
function j({ className: e, ...t }) {
|
|
281
|
+
return /* @__PURE__ */ d(m.Title, {
|
|
282
|
+
"data-slot": "alert-dialog-title",
|
|
283
|
+
className: _("font-heading text-lg font-semibold sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2", e),
|
|
284
|
+
...t
|
|
285
|
+
});
|
|
286
|
+
}
|
|
287
|
+
function M({ className: e, ...t }) {
|
|
288
|
+
return /* @__PURE__ */ d(m.Description, {
|
|
289
|
+
"data-slot": "alert-dialog-description",
|
|
290
|
+
className: _("text-sm text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground", e),
|
|
291
|
+
...t
|
|
292
|
+
});
|
|
293
|
+
}
|
|
294
|
+
function N({ className: e, variant: t = "default", size: n = "default", loading: r = !1, loadingText: i = "Loading...", disabled: a = !1, ...o }) {
|
|
295
|
+
return /* @__PURE__ */ d(b, {
|
|
296
|
+
variant: t,
|
|
297
|
+
size: n,
|
|
298
|
+
asChild: !0,
|
|
299
|
+
loading: r,
|
|
300
|
+
loadingText: i,
|
|
301
|
+
disabled: a,
|
|
302
|
+
children: /* @__PURE__ */ d(m.Action, {
|
|
303
|
+
"data-slot": "alert-dialog-action",
|
|
304
|
+
className: _(e),
|
|
305
|
+
...o
|
|
306
|
+
})
|
|
307
|
+
});
|
|
308
|
+
}
|
|
309
|
+
function P({ className: e, variant: t = "outline", size: n = "default", loading: r = !1, loadingText: i = "Loading...", disabled: a = !1, ...o }) {
|
|
310
|
+
return /* @__PURE__ */ d(b, {
|
|
311
|
+
variant: t,
|
|
312
|
+
size: n,
|
|
313
|
+
asChild: !0,
|
|
314
|
+
loading: r,
|
|
315
|
+
loadingText: i,
|
|
316
|
+
disabled: a,
|
|
317
|
+
children: /* @__PURE__ */ d(m.Cancel, {
|
|
318
|
+
"data-slot": "alert-dialog-cancel",
|
|
319
|
+
className: _(e),
|
|
320
|
+
...o
|
|
321
|
+
})
|
|
322
|
+
});
|
|
323
|
+
}
|
|
324
|
+
//#endregion
|
|
325
|
+
//#region src/components/ui/alert-dialog.tsx
|
|
326
|
+
var me = "Confirm", he = "Cancel", F = null;
|
|
327
|
+
function I(e) {
|
|
328
|
+
F?.(e);
|
|
329
|
+
}
|
|
330
|
+
function ge({ children: e }) {
|
|
331
|
+
let [t, n] = r.useState(null), i = r.useRef(!1), [a, o] = r.useState(!1);
|
|
332
|
+
r.useLayoutEffect(() => (F = (e) => n(e), () => {
|
|
333
|
+
F = null;
|
|
334
|
+
}), []);
|
|
335
|
+
let s = r.useCallback((e) => {
|
|
336
|
+
if (!e) {
|
|
337
|
+
if (i.current) {
|
|
338
|
+
i.current = !1, n(null);
|
|
339
|
+
return;
|
|
340
|
+
}
|
|
341
|
+
n((e) => (e && e.onCancel?.(), null));
|
|
342
|
+
}
|
|
343
|
+
}, []), c = r.useCallback(async () => {
|
|
344
|
+
i.current = !0;
|
|
345
|
+
let e = t;
|
|
346
|
+
if (!e) {
|
|
347
|
+
i.current = !1;
|
|
348
|
+
return;
|
|
349
|
+
}
|
|
350
|
+
try {
|
|
351
|
+
o(!0), await Promise.resolve(e.onConfirm?.());
|
|
352
|
+
} finally {
|
|
353
|
+
n(null), o(!1);
|
|
354
|
+
}
|
|
355
|
+
}, [t]);
|
|
356
|
+
return /* @__PURE__ */ f(u, { children: [e, t ? /* @__PURE__ */ d(de, {
|
|
357
|
+
open: !0,
|
|
358
|
+
onOpenChange: s,
|
|
359
|
+
children: /* @__PURE__ */ f(O, { children: [/* @__PURE__ */ f(k, { children: [/* @__PURE__ */ d(j, { children: t.title }), /* @__PURE__ */ d(M, {
|
|
360
|
+
className: t.description ? void 0 : "sr-only",
|
|
361
|
+
children: t.description ?? t.title
|
|
362
|
+
})] }), t.hideCancel && t.hideConfirm ? null : /* @__PURE__ */ f(A, { children: [t.hideCancel ? null : /* @__PURE__ */ d(P, {
|
|
363
|
+
disabled: a,
|
|
364
|
+
children: t.cancelText ?? he
|
|
365
|
+
}), t.hideConfirm ? null : /* @__PURE__ */ d(N, {
|
|
366
|
+
onClick: async (e) => {
|
|
367
|
+
e.preventDefault(), await c();
|
|
368
|
+
},
|
|
369
|
+
loading: a,
|
|
370
|
+
disabled: a,
|
|
371
|
+
loadingText: "Confirming...",
|
|
372
|
+
children: t.confirmText ?? me
|
|
373
|
+
})] })] })
|
|
374
|
+
}) : null] });
|
|
218
375
|
}
|
|
219
376
|
//#endregion
|
|
220
377
|
//#region src/lib/portaled-layer.ts
|
|
221
|
-
var
|
|
378
|
+
var _e = { zIndex: "var(--z-popover)" }, ve = {
|
|
222
379
|
onWheel: (e) => {
|
|
223
380
|
e.stopPropagation();
|
|
224
381
|
},
|
|
225
382
|
onTouchMove: (e) => {
|
|
226
383
|
e.stopPropagation();
|
|
227
384
|
}
|
|
228
|
-
},
|
|
229
|
-
|
|
385
|
+
}, L = ["[data-slot=\"combobox-content\"]", "[data-slot=\"combobox-positioner\"]"].join(", "), ye = [
|
|
386
|
+
L,
|
|
230
387
|
"[data-slot=\"combobox-list\"]",
|
|
231
388
|
"[data-slot=\"combobox-chips\"]",
|
|
232
389
|
"[data-slot=\"combobox-chip-input\"]",
|
|
233
390
|
"[data-popup-open]",
|
|
234
391
|
".combobox-pointer-field"
|
|
235
392
|
].join(", ");
|
|
236
|
-
function
|
|
237
|
-
return e instanceof Element && !!e.closest(
|
|
393
|
+
function be(e) {
|
|
394
|
+
return e instanceof Element && !!e.closest(ye);
|
|
238
395
|
}
|
|
239
|
-
function
|
|
396
|
+
function xe(e) {
|
|
240
397
|
n.useEffect(() => {
|
|
241
398
|
if (!e) return;
|
|
242
399
|
let t = (e) => {
|
|
243
|
-
|
|
400
|
+
be(e.target) || e.preventDefault();
|
|
244
401
|
};
|
|
245
402
|
return document.addEventListener("wheel", t, {
|
|
246
403
|
passive: !1,
|
|
@@ -253,85 +410,85 @@ function ae(e) {
|
|
|
253
410
|
};
|
|
254
411
|
}, [e]);
|
|
255
412
|
}
|
|
256
|
-
function
|
|
257
|
-
return e instanceof Element && !!e.closest(
|
|
413
|
+
function Se(e) {
|
|
414
|
+
return e instanceof Element && !!e.closest(L);
|
|
258
415
|
}
|
|
259
|
-
function
|
|
260
|
-
return
|
|
416
|
+
function Ce(e) {
|
|
417
|
+
return Se(e.detail.originalEvent.target);
|
|
261
418
|
}
|
|
262
|
-
function
|
|
263
|
-
for (let e of document.querySelectorAll(
|
|
419
|
+
function R() {
|
|
420
|
+
for (let e of document.querySelectorAll(L)) for (let t = e; t && t !== document.body; t = t.parentElement) t.getAttribute("aria-hidden") === "true" && t.removeAttribute("aria-hidden");
|
|
264
421
|
}
|
|
265
422
|
//#endregion
|
|
266
423
|
//#region src/components/ui/dialog.tsx
|
|
267
|
-
function
|
|
268
|
-
return /* @__PURE__ */
|
|
424
|
+
function z({ ...e }) {
|
|
425
|
+
return /* @__PURE__ */ d(h.Root, {
|
|
269
426
|
"data-slot": "dialog",
|
|
270
427
|
...e
|
|
271
428
|
});
|
|
272
429
|
}
|
|
273
|
-
function
|
|
274
|
-
return /* @__PURE__ */
|
|
430
|
+
function we({ ...e }) {
|
|
431
|
+
return /* @__PURE__ */ d(h.Trigger, {
|
|
275
432
|
"data-slot": "dialog-trigger",
|
|
276
433
|
...e
|
|
277
434
|
});
|
|
278
435
|
}
|
|
279
|
-
function
|
|
280
|
-
return /* @__PURE__ */
|
|
436
|
+
function B({ ...e }) {
|
|
437
|
+
return /* @__PURE__ */ d(h.Portal, {
|
|
281
438
|
"data-slot": "dialog-portal",
|
|
282
439
|
...e
|
|
283
440
|
});
|
|
284
441
|
}
|
|
285
|
-
function
|
|
286
|
-
return /* @__PURE__ */
|
|
442
|
+
function Te({ ...e }) {
|
|
443
|
+
return /* @__PURE__ */ d(h.Close, {
|
|
287
444
|
"data-slot": "dialog-close",
|
|
288
445
|
...e
|
|
289
446
|
});
|
|
290
447
|
}
|
|
291
|
-
function
|
|
292
|
-
return /* @__PURE__ */
|
|
448
|
+
function V({ className: e, ...t }) {
|
|
449
|
+
return /* @__PURE__ */ d(h.Overlay, {
|
|
293
450
|
"data-slot": "dialog-overlay",
|
|
294
|
-
className:
|
|
451
|
+
className: _("fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0", e),
|
|
295
452
|
...t
|
|
296
453
|
});
|
|
297
454
|
}
|
|
298
|
-
function
|
|
299
|
-
let
|
|
300
|
-
if (
|
|
455
|
+
function H({ className: e, children: r, showCloseButton: i = !0, style: a, onPointerDownOutside: o, onFocusOutside: s, onInteractOutside: c, ...l }) {
|
|
456
|
+
let u = T(), p = n.useCallback((e, t) => {
|
|
457
|
+
if (Ce(e)) {
|
|
301
458
|
e.preventDefault();
|
|
302
459
|
return;
|
|
303
460
|
}
|
|
304
461
|
t?.(e);
|
|
305
462
|
}, []);
|
|
306
463
|
return n.useLayoutEffect(() => {
|
|
307
|
-
|
|
464
|
+
R();
|
|
308
465
|
let e = new MutationObserver(() => {
|
|
309
|
-
|
|
466
|
+
R();
|
|
310
467
|
});
|
|
311
468
|
return e.observe(document.body, {
|
|
312
469
|
subtree: !0,
|
|
313
470
|
attributes: !0,
|
|
314
471
|
attributeFilter: ["aria-hidden"]
|
|
315
472
|
}), () => e.disconnect();
|
|
316
|
-
}, []), /* @__PURE__ */
|
|
473
|
+
}, []), /* @__PURE__ */ f(B, { children: [/* @__PURE__ */ d(V, {}), /* @__PURE__ */ f(h.Content, {
|
|
317
474
|
"data-slot": "dialog-content",
|
|
318
475
|
style: {
|
|
319
|
-
...
|
|
476
|
+
...u.style,
|
|
320
477
|
...a
|
|
321
478
|
},
|
|
322
|
-
className:
|
|
323
|
-
onPointerDownOutside: (e) =>
|
|
324
|
-
onFocusOutside: (e) =>
|
|
325
|
-
onInteractOutside: (e) =>
|
|
479
|
+
className: _(u.className, "fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-6 rounded-xl bg-popover p-6 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-md data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", e),
|
|
480
|
+
onPointerDownOutside: (e) => p(e, o),
|
|
481
|
+
onFocusOutside: (e) => p(e, s),
|
|
482
|
+
onInteractOutside: (e) => p(e, c),
|
|
326
483
|
...l,
|
|
327
|
-
children: [r, i && /* @__PURE__ */
|
|
484
|
+
children: [r, i && /* @__PURE__ */ d(h.Close, {
|
|
328
485
|
"data-slot": "dialog-close",
|
|
329
486
|
asChild: !0,
|
|
330
|
-
children: /* @__PURE__ */
|
|
487
|
+
children: /* @__PURE__ */ f(b, {
|
|
331
488
|
variant: "ghost",
|
|
332
489
|
className: "absolute top-2 right-2",
|
|
333
490
|
size: "icon-sm",
|
|
334
|
-
children: [/* @__PURE__ */
|
|
491
|
+
children: [/* @__PURE__ */ d(t, {}), /* @__PURE__ */ d("span", {
|
|
335
492
|
className: "sr-only",
|
|
336
493
|
children: "Close"
|
|
337
494
|
})]
|
|
@@ -339,59 +496,59 @@ function B({ className: e, children: r, showCloseButton: i = !0, style: a, onPoi
|
|
|
339
496
|
})]
|
|
340
497
|
})] });
|
|
341
498
|
}
|
|
342
|
-
function
|
|
343
|
-
return /* @__PURE__ */
|
|
499
|
+
function U({ className: e, ...t }) {
|
|
500
|
+
return /* @__PURE__ */ d("div", {
|
|
344
501
|
"data-slot": "dialog-header",
|
|
345
|
-
className:
|
|
502
|
+
className: _("flex flex-col gap-2", e),
|
|
346
503
|
...t
|
|
347
504
|
});
|
|
348
505
|
}
|
|
349
|
-
function
|
|
350
|
-
return /* @__PURE__ */
|
|
506
|
+
function Ee({ className: e, showCloseButton: t = !1, children: n, ...r }) {
|
|
507
|
+
return /* @__PURE__ */ f("div", {
|
|
351
508
|
"data-slot": "dialog-footer",
|
|
352
|
-
className:
|
|
509
|
+
className: _("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", e),
|
|
353
510
|
...r,
|
|
354
|
-
children: [n, t && /* @__PURE__ */
|
|
511
|
+
children: [n, t && /* @__PURE__ */ d(h.Close, {
|
|
355
512
|
asChild: !0,
|
|
356
|
-
children: /* @__PURE__ */
|
|
513
|
+
children: /* @__PURE__ */ d(b, {
|
|
357
514
|
variant: "outline",
|
|
358
515
|
children: "Close"
|
|
359
516
|
})
|
|
360
517
|
})]
|
|
361
518
|
});
|
|
362
519
|
}
|
|
363
|
-
function
|
|
364
|
-
return /* @__PURE__ */
|
|
520
|
+
function W({ className: e, ...t }) {
|
|
521
|
+
return /* @__PURE__ */ d(h.Title, {
|
|
365
522
|
"data-slot": "dialog-title",
|
|
366
|
-
className:
|
|
523
|
+
className: _("font-heading text-base leading-none font-semibold", e),
|
|
367
524
|
...t
|
|
368
525
|
});
|
|
369
526
|
}
|
|
370
|
-
function
|
|
371
|
-
return /* @__PURE__ */
|
|
527
|
+
function G({ className: e, ...t }) {
|
|
528
|
+
return /* @__PURE__ */ d(h.Description, {
|
|
372
529
|
"data-slot": "dialog-description",
|
|
373
|
-
className:
|
|
530
|
+
className: _("text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground", e),
|
|
374
531
|
...t
|
|
375
532
|
});
|
|
376
533
|
}
|
|
377
|
-
var
|
|
378
|
-
function
|
|
379
|
-
|
|
534
|
+
var K = null;
|
|
535
|
+
function De(e) {
|
|
536
|
+
K?.(e);
|
|
380
537
|
}
|
|
381
|
-
function
|
|
538
|
+
function Oe({ children: e }) {
|
|
382
539
|
let [t, r] = n.useState(null);
|
|
383
|
-
n.useLayoutEffect(() => (
|
|
384
|
-
|
|
540
|
+
n.useLayoutEffect(() => (K = (e) => r(e), () => {
|
|
541
|
+
K = null;
|
|
385
542
|
}), []);
|
|
386
543
|
let i = n.useCallback((e) => {
|
|
387
544
|
e || r((e) => (e && e.onClose?.(), null));
|
|
388
545
|
}, []);
|
|
389
|
-
return /* @__PURE__ */
|
|
546
|
+
return /* @__PURE__ */ f(u, { children: [e, t ? /* @__PURE__ */ d(z, {
|
|
390
547
|
open: !0,
|
|
391
548
|
onOpenChange: i,
|
|
392
|
-
children: /* @__PURE__ */
|
|
549
|
+
children: /* @__PURE__ */ f(H, {
|
|
393
550
|
showCloseButton: t.showCloseButton ?? !0,
|
|
394
|
-
children: [/* @__PURE__ */
|
|
551
|
+
children: [/* @__PURE__ */ f(U, { children: [/* @__PURE__ */ d(W, { children: t.title }), /* @__PURE__ */ d(G, {
|
|
395
552
|
className: t.description ? void 0 : "sr-only",
|
|
396
553
|
children: t.description ?? t.title
|
|
397
554
|
})] }), t.children]
|
|
@@ -400,32 +557,83 @@ function ue({ children: e }) {
|
|
|
400
557
|
}
|
|
401
558
|
//#endregion
|
|
402
559
|
//#region src/components/ui/sonner.tsx
|
|
403
|
-
var
|
|
404
|
-
function Y(e) {
|
|
405
|
-
return
|
|
560
|
+
var q = 4e3, J = Infinity;
|
|
561
|
+
function Y(e, t) {
|
|
562
|
+
return {
|
|
563
|
+
...e,
|
|
564
|
+
duration: e?.duration ?? t
|
|
565
|
+
};
|
|
566
|
+
}
|
|
567
|
+
function ke(e, t) {
|
|
568
|
+
if (e == null) return e;
|
|
569
|
+
if (typeof e == "function") {
|
|
570
|
+
let n = e;
|
|
571
|
+
return (async (e) => {
|
|
572
|
+
let r = await n(e);
|
|
573
|
+
return typeof r == "object" && r && !a(r) ? {
|
|
574
|
+
duration: t,
|
|
575
|
+
...r
|
|
576
|
+
} : {
|
|
577
|
+
message: r,
|
|
578
|
+
duration: t
|
|
579
|
+
};
|
|
580
|
+
});
|
|
581
|
+
}
|
|
582
|
+
return typeof e == "object" && !a(e) ? {
|
|
583
|
+
duration: t,
|
|
584
|
+
...e
|
|
585
|
+
} : {
|
|
586
|
+
message: e,
|
|
587
|
+
duration: t
|
|
588
|
+
};
|
|
406
589
|
}
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
590
|
+
var Ae = Object.assign((e, t) => g(e, Y(t, q)), {
|
|
591
|
+
...g,
|
|
592
|
+
success: (e, t) => g.success(e, Y(t, q)),
|
|
593
|
+
info: (e, t) => g.info(e, Y(t, q)),
|
|
594
|
+
message: (e, t) => g.message(e, Y(t, q)),
|
|
595
|
+
warning: (e, t) => g.warning(e, Y(t, J)),
|
|
596
|
+
error: (e, t) => g.error(e, Y(t, J)),
|
|
597
|
+
promise: (e, t) => g.promise(e, {
|
|
598
|
+
...t,
|
|
599
|
+
success: ke(t?.success, q),
|
|
600
|
+
error: ke(t?.error, J)
|
|
601
|
+
}),
|
|
602
|
+
critical: (e) => {
|
|
603
|
+
I({
|
|
604
|
+
title: e.title,
|
|
605
|
+
description: e.description,
|
|
606
|
+
confirmText: e.confirmText ?? "OK",
|
|
607
|
+
hideCancel: !0,
|
|
608
|
+
onConfirm: e.onConfirm
|
|
609
|
+
});
|
|
610
|
+
}
|
|
611
|
+
}), je = 7e3, X = "[data-sonner-toast]", Me = "[data-sonner-toaster]", Z = "[data-close-button]";
|
|
612
|
+
function Q(e) {
|
|
613
|
+
return typeof e == "function" ? Q(e()) : typeof e == "string" || typeof e == "number" ? String(e) : Array.isArray(e) ? e.map(Q).join("") : a(e) ? Q(e.props.children) : "";
|
|
614
|
+
}
|
|
615
|
+
function Ne() {
|
|
616
|
+
let { toasts: e } = re(), t = s(null), n = s(null), r = s(/* @__PURE__ */ new Map());
|
|
617
|
+
return o(() => {
|
|
410
618
|
let i = new Set(e.map((e) => e.id));
|
|
411
619
|
for (let e of r.current.keys()) i.has(e) || r.current.delete(e);
|
|
412
620
|
for (let i of [...e].reverse()) {
|
|
413
|
-
let e = [
|
|
621
|
+
let e = [Q(i.title), Q(i.description)].filter(Boolean).join(". ") || Q(i.jsx), a = `${i.type}:${e}`;
|
|
414
622
|
if (!e || r.current.get(i.id) === a) continue;
|
|
415
623
|
r.current.set(i.id, a);
|
|
416
624
|
let o = i.type === "error" ? n.current : t.current;
|
|
417
625
|
if (!o) continue;
|
|
418
626
|
let s = document.createElement("p");
|
|
419
|
-
s.textContent = e, o.append(s), window.setTimeout(() => s.remove(),
|
|
627
|
+
s.textContent = e, o.append(s), window.setTimeout(() => s.remove(), je);
|
|
420
628
|
}
|
|
421
|
-
}, [e]), /* @__PURE__ */
|
|
629
|
+
}, [e]), /* @__PURE__ */ f("div", {
|
|
422
630
|
className: "sr-only",
|
|
423
|
-
children: [/* @__PURE__ */
|
|
631
|
+
children: [/* @__PURE__ */ d("div", {
|
|
424
632
|
ref: t,
|
|
425
633
|
"aria-live": "polite",
|
|
426
634
|
"aria-relevant": "additions",
|
|
427
635
|
"aria-atomic": "false"
|
|
428
|
-
}), /* @__PURE__ */
|
|
636
|
+
}), /* @__PURE__ */ d("div", {
|
|
429
637
|
ref: n,
|
|
430
638
|
"aria-live": "assertive",
|
|
431
639
|
"aria-relevant": "additions",
|
|
@@ -433,23 +641,23 @@ function fe() {
|
|
|
433
641
|
})]
|
|
434
642
|
});
|
|
435
643
|
}
|
|
436
|
-
function
|
|
437
|
-
|
|
644
|
+
function Pe() {
|
|
645
|
+
o(() => {
|
|
438
646
|
let e = null, t = (t) => {
|
|
439
|
-
let n = Array.from(t.parentElement?.querySelectorAll(`${
|
|
647
|
+
let n = Array.from(t.parentElement?.querySelectorAll(`${X}:not([data-removed="true"])`) ?? []), r = n.indexOf(t), i = n[r + 1] ?? n[r - 1];
|
|
440
648
|
i && i !== t ? i.focus({ preventScroll: !0 }) : e?.focus({ preventScroll: !0 });
|
|
441
649
|
}, n = (t) => {
|
|
442
650
|
let n = t.target, r = t.relatedTarget;
|
|
443
|
-
n?.closest(
|
|
651
|
+
n?.closest(Me) && !r?.closest(Me) && (e = r);
|
|
444
652
|
}, r = (e) => {
|
|
445
653
|
if (e.key !== "Escape" || e.defaultPrevented) return;
|
|
446
|
-
let t = document.activeElement?.closest(
|
|
654
|
+
let t = document.activeElement?.closest(X);
|
|
447
655
|
if (!t || t.dataset.dismissible === "false") return;
|
|
448
|
-
let n = t.querySelector(`:scope > ${
|
|
656
|
+
let n = t.querySelector(`:scope > ${Z}`);
|
|
449
657
|
n && (e.preventDefault(), e.stopPropagation(), n.click());
|
|
450
658
|
}, i = (e) => {
|
|
451
659
|
if (e.detail !== 0) return;
|
|
452
|
-
let n = (e.target?.closest(
|
|
660
|
+
let n = (e.target?.closest(Z))?.closest(X);
|
|
453
661
|
n && n.dataset.dismissible !== "false" && t(n);
|
|
454
662
|
};
|
|
455
663
|
return document.addEventListener("focusin", n), document.addEventListener("keydown", r, !0), document.addEventListener("click", i, !0), () => {
|
|
@@ -457,70 +665,73 @@ function pe() {
|
|
|
457
665
|
};
|
|
458
666
|
}, []);
|
|
459
667
|
}
|
|
460
|
-
var
|
|
461
|
-
let
|
|
462
|
-
return
|
|
463
|
-
|
|
464
|
-
}, []), /* @__PURE__ */
|
|
465
|
-
ref:
|
|
466
|
-
theme:
|
|
668
|
+
var Fe = ({ style: e, className: t, toastOptions: n, duration: r, ...i }) => {
|
|
669
|
+
let a = S(), c = oe(), l = w(a, c), p = s(null);
|
|
670
|
+
return Pe(), o(() => {
|
|
671
|
+
p.current?.setAttribute("aria-live", "off");
|
|
672
|
+
}, []), /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d(ne, {
|
|
673
|
+
ref: p,
|
|
674
|
+
theme: c ? "dark" : "light",
|
|
467
675
|
position: "bottom-right",
|
|
468
676
|
richColors: !0,
|
|
469
677
|
closeButton: !0,
|
|
470
|
-
|
|
678
|
+
duration: r ?? q,
|
|
679
|
+
className: _("toaster group", l.className, t),
|
|
471
680
|
style: {
|
|
472
|
-
...
|
|
681
|
+
...l.style,
|
|
473
682
|
...e
|
|
474
683
|
},
|
|
475
684
|
toastOptions: {
|
|
476
685
|
...n,
|
|
477
686
|
classNames: {
|
|
478
687
|
...n?.classNames,
|
|
479
|
-
closeButton:
|
|
688
|
+
closeButton: _("opacity-0 pointer-events-none focus-visible:opacity-100 focus-visible:pointer-events-auto", n?.classNames?.closeButton),
|
|
689
|
+
warning: _("[&_[data-close-button]]:opacity-100 [&_[data-close-button]]:pointer-events-auto", n?.classNames?.warning),
|
|
690
|
+
error: _("[&_[data-close-button]]:opacity-100 [&_[data-close-button]]:pointer-events-auto", n?.classNames?.error)
|
|
480
691
|
}
|
|
481
692
|
},
|
|
482
|
-
...
|
|
483
|
-
}), /* @__PURE__ */
|
|
693
|
+
...i
|
|
694
|
+
}), /* @__PURE__ */ d(Ne, {})] });
|
|
484
695
|
};
|
|
485
696
|
//#endregion
|
|
486
697
|
//#region src/components/ui/label.tsx
|
|
487
|
-
function
|
|
488
|
-
return /* @__PURE__ */
|
|
698
|
+
function $({ className: e, ...t }) {
|
|
699
|
+
return /* @__PURE__ */ d(ee.Root, {
|
|
489
700
|
"data-slot": "label",
|
|
490
|
-
className:
|
|
701
|
+
className: _("flex items-center text-foreground gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50", e),
|
|
491
702
|
...t
|
|
492
703
|
});
|
|
493
704
|
}
|
|
494
705
|
//#endregion
|
|
495
706
|
//#region src/components/ui/input.tsx
|
|
496
|
-
function
|
|
497
|
-
let
|
|
498
|
-
return /* @__PURE__ */
|
|
707
|
+
function Ie({ className: e, type: t, error: n = !1, label: r, helperText: a, startIcon: o, endIcon: s, appearance: c = "default", ...l }) {
|
|
708
|
+
let u = o ? i(o, { className: _("stroke-text-input-placeholder") }) : null, p = s ? i(s, { className: _("stroke-text-input-placeholder") }) : null;
|
|
709
|
+
return /* @__PURE__ */ f("div", {
|
|
499
710
|
className: "w-full flex flex-col gap-2 h-fit ",
|
|
500
711
|
children: [
|
|
501
|
-
!!
|
|
502
|
-
/* @__PURE__ */
|
|
712
|
+
!!r && /* @__PURE__ */ d($, { children: r }),
|
|
713
|
+
/* @__PURE__ */ f("div", {
|
|
503
714
|
className: "w-full relative",
|
|
504
715
|
children: [
|
|
505
|
-
|
|
716
|
+
u && /* @__PURE__ */ d("div", {
|
|
506
717
|
className: "absolute left-3 top-1/2 -translate-y-1/2",
|
|
507
|
-
children:
|
|
718
|
+
children: u
|
|
508
719
|
}),
|
|
509
|
-
/* @__PURE__ */
|
|
720
|
+
/* @__PURE__ */ d("input", {
|
|
510
721
|
...l,
|
|
511
722
|
type: t,
|
|
512
723
|
"data-slot": "input",
|
|
513
724
|
"data-appearance": c,
|
|
514
725
|
"aria-invalid": n ? !0 : l["aria-invalid"],
|
|
515
|
-
className:
|
|
726
|
+
className: _(c === "themed" && "input-themed transition-smooth flex h-9 w-full min-w-0 py-1 text-base shadow-none outline-none md:text-sm", c === "default" && `file:text-foreground ${l?.placeholder ? "placeholder:text-text-disabled placeholder:text-sm placeholder:font-normal" : "placeholder:text-muted-foreground"} selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 ${u ? "pl-10" : "pl-3"} ${p ? "pr-10" : "pr-3"} py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-base-secondary-disabled md:text-sm`, c === "default" && "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", c === "themed" && (n || l["aria-invalid"] === !0 ? "input-error" : void 0), u && c === "themed" && "pl-10", !u && c === "themed" && "pl-3", p && c === "themed" && "pr-10", !p && c === "themed" && "pr-3", e)
|
|
516
727
|
}),
|
|
517
|
-
p && /* @__PURE__ */
|
|
728
|
+
p && /* @__PURE__ */ d("div", {
|
|
518
729
|
className: "absolute right-3 top-1/2 -translate-y-1/2",
|
|
519
730
|
children: p
|
|
520
731
|
})
|
|
521
732
|
]
|
|
522
733
|
}),
|
|
523
|
-
a && /* @__PURE__ */
|
|
734
|
+
a && /* @__PURE__ */ d("p", {
|
|
524
735
|
className: `text-caption ${n ? "text-destructive" : "text-muted-foreground"}`,
|
|
525
736
|
children: a
|
|
526
737
|
})
|
|
@@ -529,17 +740,17 @@ function Z({ className: e, type: t, error: n = !1, label: i, helperText: a, star
|
|
|
529
740
|
}
|
|
530
741
|
//#endregion
|
|
531
742
|
//#region src/components/ui/textarea.tsx
|
|
532
|
-
function
|
|
533
|
-
return /* @__PURE__ */
|
|
743
|
+
function Le({ className: e, error: t = !1, label: n, helperText: r, ...i }) {
|
|
744
|
+
return /* @__PURE__ */ f("div", {
|
|
534
745
|
className: "w-full flex flex-col gap-2",
|
|
535
746
|
children: [
|
|
536
|
-
n && /* @__PURE__ */
|
|
537
|
-
/* @__PURE__ */
|
|
747
|
+
n && /* @__PURE__ */ d($, { children: n }),
|
|
748
|
+
/* @__PURE__ */ d("textarea", {
|
|
538
749
|
"data-slot": "textarea",
|
|
539
|
-
className:
|
|
750
|
+
className: _("flex-1 border-input placeholder:text-text-disabled focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", e),
|
|
540
751
|
...i
|
|
541
752
|
}),
|
|
542
|
-
r && /* @__PURE__ */
|
|
753
|
+
r && /* @__PURE__ */ d("p", {
|
|
543
754
|
className: `text-caption ${t ? "text-destructive" : "text-muted-foreground"}`,
|
|
544
755
|
children: r
|
|
545
756
|
})
|
|
@@ -548,15 +759,15 @@ function Q({ className: e, error: t = !1, label: n, helperText: r, ...i }) {
|
|
|
548
759
|
}
|
|
549
760
|
//#endregion
|
|
550
761
|
//#region src/components/ui/input-group.tsx
|
|
551
|
-
function
|
|
552
|
-
return /* @__PURE__ */
|
|
762
|
+
function Re({ className: e, ...t }) {
|
|
763
|
+
return /* @__PURE__ */ d("div", {
|
|
553
764
|
"data-slot": "input-group",
|
|
554
765
|
role: "group",
|
|
555
|
-
className:
|
|
766
|
+
className: _("group/input-group relative flex h-9 w-full min-w-0 items-center rounded-lg border border-input transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:bg-input/50 has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-disabled:bg-input/80 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5", e),
|
|
556
767
|
...t
|
|
557
768
|
});
|
|
558
769
|
}
|
|
559
|
-
var
|
|
770
|
+
var ze = p("flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4", {
|
|
560
771
|
variants: { align: {
|
|
561
772
|
"inline-start": "order-first pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]",
|
|
562
773
|
"inline-end": "order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]",
|
|
@@ -565,19 +776,19 @@ var ge = f("flex h-auto cursor-text items-center justify-center gap-2 py-1.5 tex
|
|
|
565
776
|
} },
|
|
566
777
|
defaultVariants: { align: "inline-start" }
|
|
567
778
|
});
|
|
568
|
-
function
|
|
569
|
-
return /* @__PURE__ */
|
|
779
|
+
function Be({ className: e, align: t = "inline-start", ...n }) {
|
|
780
|
+
return /* @__PURE__ */ d("div", {
|
|
570
781
|
role: "group",
|
|
571
782
|
"data-slot": "input-group-addon",
|
|
572
783
|
"data-align": t,
|
|
573
|
-
className:
|
|
784
|
+
className: _(ze({ align: t }), e),
|
|
574
785
|
onClick: (e) => {
|
|
575
786
|
e.target.closest("button") || e.currentTarget.parentElement?.querySelector("input")?.focus();
|
|
576
787
|
},
|
|
577
788
|
...n
|
|
578
789
|
});
|
|
579
790
|
}
|
|
580
|
-
var
|
|
791
|
+
var Ve = p("flex items-center gap-2 text-sm shadow-none", {
|
|
581
792
|
variants: { size: {
|
|
582
793
|
xs: "h-6 gap-1 rounded-[calc(var(--radius)-3px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5",
|
|
583
794
|
sm: "",
|
|
@@ -586,34 +797,34 @@ var _e = f("flex items-center gap-2 text-sm shadow-none", {
|
|
|
586
797
|
} },
|
|
587
798
|
defaultVariants: { size: "xs" }
|
|
588
799
|
});
|
|
589
|
-
function
|
|
590
|
-
return /* @__PURE__ */
|
|
800
|
+
function He({ className: e, type: t = "button", variant: n = "ghost", size: r = "xs", ...i }) {
|
|
801
|
+
return /* @__PURE__ */ d(b, {
|
|
591
802
|
type: t,
|
|
592
803
|
"data-size": r,
|
|
593
804
|
variant: n,
|
|
594
|
-
className:
|
|
805
|
+
className: _(Ve({ size: r }), e),
|
|
595
806
|
...i
|
|
596
807
|
});
|
|
597
808
|
}
|
|
598
|
-
function
|
|
599
|
-
return /* @__PURE__ */
|
|
600
|
-
className:
|
|
809
|
+
function Ue({ className: e, ...t }) {
|
|
810
|
+
return /* @__PURE__ */ d("span", {
|
|
811
|
+
className: _("flex items-center gap-2 text-sm text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4", e),
|
|
601
812
|
...t
|
|
602
813
|
});
|
|
603
814
|
}
|
|
604
|
-
function
|
|
605
|
-
return /* @__PURE__ */
|
|
815
|
+
function We({ className: e, ...t }) {
|
|
816
|
+
return /* @__PURE__ */ d(Ie, {
|
|
606
817
|
"data-slot": "input-group-control",
|
|
607
|
-
className:
|
|
818
|
+
className: _("flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent", e),
|
|
608
819
|
...t
|
|
609
820
|
});
|
|
610
821
|
}
|
|
611
|
-
function
|
|
612
|
-
return /* @__PURE__ */
|
|
822
|
+
function Ge({ className: e, ...t }) {
|
|
823
|
+
return /* @__PURE__ */ d(Le, {
|
|
613
824
|
"data-slot": "input-group-control",
|
|
614
|
-
className:
|
|
825
|
+
className: _("flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent", e),
|
|
615
826
|
...t
|
|
616
827
|
});
|
|
617
828
|
}
|
|
618
829
|
//#endregion
|
|
619
|
-
export {
|
|
830
|
+
export { v as $, N as A, fe as B, De as C, ge as D, xe as E, k as F, S as G, ue as H, pe as I, x as J, T as K, D as L, O as M, M as N, I as O, A as P, y as Q, E as R, we as S, _e as T, w as U, ce as V, C as W, ie as X, ae as Y, b as Z, U as _, Ue as a, Oe as b, Ie as c, Ae as d, _ as et, z as f, Ee as g, G as h, We as i, P as j, de as k, $ as l, H as m, Be as n, Ge as o, Te as p, se as q, He as r, Le as s, Re as t, Fe as u, V as v, ve as w, W as x, B as y, j as z };
|