opsfuse-ui 0.1.27 → 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/badge.d.ts +1 -1
- 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-BUy6rpQX.js +830 -0
- package/dist/{input-otp-BLC5gRJ_.js → input-otp-BVj0dmTF.js} +299 -299
- package/dist/style.css +1 -1
- package/dist/{toggle-group-DQGHlv1Q.js → toggle-group-CU4v7h-z.js} +1323 -1480
- package/package.json +1 -1
- package/dist/input-group-DWq_2G-K.js +0 -551
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { $ as e, E as t, K as n, Q as r, T as i, Z as a, _ as o, et as s, f as c, h as l, i as u, l as d, m as f, n as p, r as m, t as h, w as g, x as ee } from "./input-group-BUy6rpQX.js";
|
|
3
3
|
import { CheckIcon as _, ChevronDownIcon as te, ChevronLeftIcon as v, ChevronRightIcon as ne, MinusIcon as y, SearchIcon as re, XIcon as b } from "lucide-react";
|
|
4
4
|
import * as x from "recharts";
|
|
5
5
|
import * as S from "react";
|
|
@@ -307,68 +307,68 @@ function Oe({ ...e }) {
|
|
|
307
307
|
...e
|
|
308
308
|
});
|
|
309
309
|
}
|
|
310
|
-
function ke({ className:
|
|
310
|
+
function ke({ className: e, children: t, ...n }) {
|
|
311
311
|
return /* @__PURE__ */ E(D.Trigger, {
|
|
312
312
|
"data-slot": "combobox-trigger",
|
|
313
|
-
className:
|
|
314
|
-
...
|
|
315
|
-
children: [
|
|
313
|
+
className: s("[&_svg:not([class*='size-'])]:size-4", e),
|
|
314
|
+
...n,
|
|
315
|
+
children: [t, /* @__PURE__ */ T(te, { className: "pointer-events-none size-4 text-muted-foreground" })]
|
|
316
316
|
});
|
|
317
317
|
}
|
|
318
|
-
function Ae({ className:
|
|
318
|
+
function Ae({ className: e, ...t }) {
|
|
319
319
|
return /* @__PURE__ */ T(D.Clear, {
|
|
320
320
|
"data-slot": "combobox-clear",
|
|
321
|
-
render: /* @__PURE__ */ T(
|
|
321
|
+
render: /* @__PURE__ */ T(m, {
|
|
322
322
|
variant: "ghost",
|
|
323
323
|
size: "icon-xs"
|
|
324
324
|
}),
|
|
325
|
-
className: e
|
|
326
|
-
...
|
|
325
|
+
className: s(e),
|
|
326
|
+
...t,
|
|
327
327
|
children: /* @__PURE__ */ T(b, { className: "pointer-events-none" })
|
|
328
328
|
});
|
|
329
329
|
}
|
|
330
|
-
function je({ className:
|
|
330
|
+
function je({ className: e, children: t, disabled: n = !1, showTrigger: r = !0, showClear: i = !1, ...a }) {
|
|
331
331
|
return /* @__PURE__ */ T("div", {
|
|
332
|
-
className:
|
|
333
|
-
children: /* @__PURE__ */ E(
|
|
334
|
-
className:
|
|
332
|
+
className: s("combobox-pointer-field [&_[data-slot=input-group-control]]:text-sm [&_[data-slot=input-group-control]]:placeholder:text-sm [&_[data-slot=input-group]_input]:cursor-pointer! **:data-[slot=input-group-addon]:cursor-pointer!"),
|
|
333
|
+
children: /* @__PURE__ */ E(h, {
|
|
334
|
+
className: s("w-auto text-sm", e),
|
|
335
335
|
children: [
|
|
336
336
|
/* @__PURE__ */ T(D.Input, {
|
|
337
|
-
render: /* @__PURE__ */ T(
|
|
338
|
-
disabled:
|
|
337
|
+
render: /* @__PURE__ */ T(u, {
|
|
338
|
+
disabled: n,
|
|
339
339
|
className: "text-sm placeholder:text-sm"
|
|
340
340
|
}),
|
|
341
|
-
...
|
|
341
|
+
...a
|
|
342
342
|
}),
|
|
343
|
-
/* @__PURE__ */ E(
|
|
343
|
+
/* @__PURE__ */ E(p, {
|
|
344
344
|
align: "inline-end",
|
|
345
|
-
children: [
|
|
345
|
+
children: [r && /* @__PURE__ */ T(m, {
|
|
346
346
|
size: "icon-xs",
|
|
347
347
|
variant: "ghost",
|
|
348
348
|
asChild: !0,
|
|
349
349
|
"data-slot": "input-group-button",
|
|
350
350
|
className: "group-has-data-[slot=combobox-clear]/input-group:hidden data-pressed:bg-transparent",
|
|
351
|
-
disabled:
|
|
351
|
+
disabled: n,
|
|
352
352
|
children: /* @__PURE__ */ T(ke, {})
|
|
353
|
-
}),
|
|
353
|
+
}), i && /* @__PURE__ */ T(Ae, { disabled: n })]
|
|
354
354
|
}),
|
|
355
|
-
|
|
355
|
+
t
|
|
356
356
|
]
|
|
357
357
|
})
|
|
358
358
|
});
|
|
359
359
|
}
|
|
360
|
-
function Me({ className:
|
|
361
|
-
let d =
|
|
360
|
+
function Me({ className: e, side: t = "bottom", sideOffset: r = 6, align: a = "start", alignOffset: o = 0, anchor: c, style: l, ...u }) {
|
|
361
|
+
let d = n();
|
|
362
362
|
return /* @__PURE__ */ T(D.Portal, { children: /* @__PURE__ */ T(be, {
|
|
363
363
|
style: { pointerEvents: "auto" },
|
|
364
364
|
children: /* @__PURE__ */ T(D.Positioner, {
|
|
365
365
|
"data-slot": "combobox-positioner",
|
|
366
|
-
side:
|
|
367
|
-
sideOffset:
|
|
368
|
-
align:
|
|
369
|
-
alignOffset:
|
|
366
|
+
side: t,
|
|
367
|
+
sideOffset: r,
|
|
368
|
+
align: a,
|
|
369
|
+
alignOffset: o,
|
|
370
370
|
anchor: c,
|
|
371
|
-
style:
|
|
371
|
+
style: i,
|
|
372
372
|
children: /* @__PURE__ */ T(D.Popup, {
|
|
373
373
|
"data-slot": "combobox-content",
|
|
374
374
|
"data-chips": !!c,
|
|
@@ -376,44 +376,44 @@ function Me({ className: t, side: n = "bottom", sideOffset: i = 6, align: o = "s
|
|
|
376
376
|
...d.style,
|
|
377
377
|
...l
|
|
378
378
|
},
|
|
379
|
-
...
|
|
380
|
-
className:
|
|
379
|
+
...g,
|
|
380
|
+
className: s(d.className, "group/combobox-content relative max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width)+--spacing(7))] origin-(--transform-origin) overflow-hidden rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[chips=true]:min-w-(--anchor-width) data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 *:data-[slot=input-group]:m-1 *:data-[slot=input-group]:mb-0 *:data-[slot=input-group]:h-9 *:data-[slot=input-group]:border-input/30 *:data-[slot=input-group]:bg-input/30 *:data-[slot=input-group]:shadow-none 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),
|
|
381
381
|
...u
|
|
382
382
|
})
|
|
383
383
|
})
|
|
384
384
|
}) });
|
|
385
385
|
}
|
|
386
|
-
function Ne({ className:
|
|
386
|
+
function Ne({ className: e, ...t }) {
|
|
387
387
|
return /* @__PURE__ */ T(D.List, {
|
|
388
388
|
"data-slot": "combobox-list",
|
|
389
|
-
className:
|
|
390
|
-
...
|
|
391
|
-
...
|
|
389
|
+
className: s("no-scrollbar max-h-[min(calc(--spacing(72)---spacing(9)),calc(var(--available-height)---spacing(9)))] scroll-py-1 overflow-y-auto overscroll-contain p-1 data-empty:p-0", e),
|
|
390
|
+
...g,
|
|
391
|
+
...t
|
|
392
392
|
});
|
|
393
393
|
}
|
|
394
|
-
function Pe({ className:
|
|
394
|
+
function Pe({ className: e, children: t, ...n }) {
|
|
395
395
|
return /* @__PURE__ */ E(D.Item, {
|
|
396
396
|
"data-slot": "combobox-item",
|
|
397
|
-
className:
|
|
398
|
-
...
|
|
399
|
-
children: [
|
|
397
|
+
className: s("relative flex w-full cursor-default items-center gap-2 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", e),
|
|
398
|
+
...n,
|
|
399
|
+
children: [t, /* @__PURE__ */ T(D.ItemIndicator, {
|
|
400
400
|
render: /* @__PURE__ */ T("span", { className: "pointer-events-none absolute right-2 flex size-4 items-center justify-center" }),
|
|
401
401
|
children: /* @__PURE__ */ T(_, { className: "pointer-events-none" })
|
|
402
402
|
})]
|
|
403
403
|
});
|
|
404
404
|
}
|
|
405
|
-
function Fe({ className:
|
|
405
|
+
function Fe({ className: e, ...t }) {
|
|
406
406
|
return /* @__PURE__ */ T(D.Group, {
|
|
407
407
|
"data-slot": "combobox-group",
|
|
408
|
-
className: e
|
|
409
|
-
...
|
|
408
|
+
className: s(e),
|
|
409
|
+
...t
|
|
410
410
|
});
|
|
411
411
|
}
|
|
412
|
-
function Ie({ className:
|
|
412
|
+
function Ie({ className: e, ...t }) {
|
|
413
413
|
return /* @__PURE__ */ T(D.GroupLabel, {
|
|
414
414
|
"data-slot": "combobox-label",
|
|
415
|
-
className:
|
|
416
|
-
...
|
|
415
|
+
className: s("px-2 py-1.5 text-xs text-muted-foreground", e),
|
|
416
|
+
...t
|
|
417
417
|
});
|
|
418
418
|
}
|
|
419
419
|
function Le({ ...e }) {
|
|
@@ -422,41 +422,41 @@ function Le({ ...e }) {
|
|
|
422
422
|
...e
|
|
423
423
|
});
|
|
424
424
|
}
|
|
425
|
-
function Re({ className:
|
|
425
|
+
function Re({ className: e, ...t }) {
|
|
426
426
|
return /* @__PURE__ */ T(D.Empty, {
|
|
427
427
|
"data-slot": "combobox-empty",
|
|
428
|
-
className:
|
|
429
|
-
...
|
|
428
|
+
className: s("hidden w-full justify-center py-2 text-center text-sm text-muted-foreground group-data-empty/combobox-content:flex", e),
|
|
429
|
+
...t
|
|
430
430
|
});
|
|
431
431
|
}
|
|
432
|
-
function ze({ className:
|
|
432
|
+
function ze({ className: e, ...t }) {
|
|
433
433
|
return /* @__PURE__ */ T(D.Status, {
|
|
434
434
|
"data-slot": "combobox-status",
|
|
435
|
-
className:
|
|
436
|
-
...
|
|
435
|
+
className: s("px-2 py-1.5 text-center text-sm text-muted-foreground empty:hidden", e),
|
|
436
|
+
...t
|
|
437
437
|
});
|
|
438
438
|
}
|
|
439
|
-
function Be({ className:
|
|
439
|
+
function Be({ className: e, ...t }) {
|
|
440
440
|
return /* @__PURE__ */ T(D.Separator, {
|
|
441
441
|
"data-slot": "combobox-separator",
|
|
442
|
-
className:
|
|
443
|
-
...
|
|
442
|
+
className: s("-mx-1 my-1 h-px bg-border", e),
|
|
443
|
+
...t
|
|
444
444
|
});
|
|
445
445
|
}
|
|
446
|
-
function Ve({ className:
|
|
446
|
+
function Ve({ className: e, ...t }) {
|
|
447
447
|
return /* @__PURE__ */ T(D.Chips, {
|
|
448
448
|
"data-slot": "combobox-chips",
|
|
449
|
-
className:
|
|
450
|
-
...
|
|
449
|
+
className: s("flex min-h-9 flex-wrap items-center gap-1 rounded-md border border-input bg-transparent bg-clip-padding px-2.5 py-1 text-sm transition-colors focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/50 has-aria-invalid:border-destructive has-aria-invalid:ring-3 has-aria-invalid:ring-destructive/20 has-data-[slot=combobox-chip]:px-1 dark:bg-input/30 dark:has-aria-invalid:border-destructive/50 dark:has-aria-invalid:ring-destructive/40", e),
|
|
450
|
+
...t
|
|
451
451
|
});
|
|
452
452
|
}
|
|
453
|
-
function He({ className:
|
|
453
|
+
function He({ className: e, children: t, showRemove: n = !0, ...r }) {
|
|
454
454
|
return /* @__PURE__ */ E(D.Chip, {
|
|
455
455
|
"data-slot": "combobox-chip",
|
|
456
|
-
className:
|
|
457
|
-
...
|
|
458
|
-
children: [
|
|
459
|
-
render: /* @__PURE__ */ T(
|
|
456
|
+
className: s("flex h-[calc(--spacing(5.25))] w-fit items-center justify-center gap-1 rounded-sm bg-muted px-1.5 text-xs font-medium whitespace-nowrap text-foreground has-disabled:pointer-events-none has-disabled:cursor-not-allowed has-disabled:opacity-50 has-data-[slot=combobox-chip-remove]:pr-0", e),
|
|
457
|
+
...r,
|
|
458
|
+
children: [t, n && /* @__PURE__ */ T(D.ChipRemove, {
|
|
459
|
+
render: /* @__PURE__ */ T(a, {
|
|
460
460
|
variant: "ghost",
|
|
461
461
|
size: "icon-xs"
|
|
462
462
|
}),
|
|
@@ -466,25 +466,25 @@ function He({ className: t, children: r, showRemove: i = !0, ...a }) {
|
|
|
466
466
|
})]
|
|
467
467
|
});
|
|
468
468
|
}
|
|
469
|
-
function Ue({ className:
|
|
469
|
+
function Ue({ className: e, ...t }) {
|
|
470
470
|
return /* @__PURE__ */ T(D.Input, {
|
|
471
471
|
"data-slot": "combobox-chip-input",
|
|
472
|
-
className:
|
|
473
|
-
...
|
|
472
|
+
className: s("min-w-16 flex-1 text-sm outline-none ring-0!", e),
|
|
473
|
+
...t
|
|
474
474
|
});
|
|
475
475
|
}
|
|
476
476
|
function We() {
|
|
477
477
|
return S.useRef(null);
|
|
478
478
|
}
|
|
479
|
-
function Ge({ label:
|
|
479
|
+
function Ge({ label: e, helperText: t, error: n = !1, className: r, children: i }) {
|
|
480
480
|
return /* @__PURE__ */ E("div", {
|
|
481
|
-
className:
|
|
481
|
+
className: s("w-full flex flex-col gap-2", r),
|
|
482
482
|
children: [
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
className: `text-caption ${
|
|
487
|
-
children:
|
|
483
|
+
e && /* @__PURE__ */ T(d, { children: e }),
|
|
484
|
+
i,
|
|
485
|
+
t && /* @__PURE__ */ T("p", {
|
|
486
|
+
className: `text-caption ${n ? "text-destructive" : "text-muted-foreground"}`,
|
|
487
|
+
children: t
|
|
488
488
|
})
|
|
489
489
|
]
|
|
490
490
|
});
|
|
@@ -525,10 +525,10 @@ function Je({ option: e }) {
|
|
|
525
525
|
]
|
|
526
526
|
})] });
|
|
527
527
|
}
|
|
528
|
-
var Ye = ({ options: n = [], placeholder: r = "Search...", placeholderIcon: i, groupLabel: a, fieldLabel: o, helperText:
|
|
528
|
+
var Ye = ({ options: n = [], placeholder: r = "Search...", placeholderIcon: i, groupLabel: a, fieldLabel: o, helperText: c, error: l = !1, emptyMessage: u = "No results found.", disabled: d, multiple: f, showTrigger: m = !0, showClear: h = !1, showBadges: g = !1, fieldClassName: ee, inputClassName: _, contentClassName: te, onSearch: v, searchDebounce: ne = 300, fetchOnOpen: y = !1, loadingMessage: re = "Searching…", loadMoreMessage: b = "Loading more…", searchPromptMessage: x = "Start typing to search…", scrollLoadThreshold: S = 48, modal: w = !0, onValueChange: D, onOpenChange: O, value: k, defaultValue: A, open: j, ...M }) => {
|
|
529
529
|
let N = !!v, ie = We(), [ae, P] = C.useState(() => N ? n : []), [F, I] = C.useState(""), [L, R] = C.useState(!1), [z, B] = C.useState(!1), [V, H] = C.useState(null), [oe, U] = C.useState(!1), [se, ce] = C.useState(!1), [le, ue] = C.useState(A ?? null), W = C.useRef(1), G = C.useRef(null), K = j ?? se;
|
|
530
530
|
t(K && w);
|
|
531
|
-
let q = k === void 0 ? le : k, J = Ke(F, ne), Y = J.trim(), de = N ? qe(ae, q,
|
|
531
|
+
let q = k === void 0 ? le : k, J = Ke(F, ne), Y = J.trim(), de = N ? qe(ae, q, f) : n, X = C.useCallback(async (e, t, n) => {
|
|
532
532
|
if (!v) return;
|
|
533
533
|
G.current?.abort();
|
|
534
534
|
let r = new AbortController();
|
|
@@ -563,10 +563,10 @@ var Ye = ({ options: n = [], placeholder: r = "Search...", placeholderIcon: i, g
|
|
|
563
563
|
let fe = C.useCallback((e) => {
|
|
564
564
|
j === void 0 && ce(e), O?.(e);
|
|
565
565
|
}, [O, j]), pe = C.useCallback((e) => {
|
|
566
|
-
!e && N && (P(
|
|
566
|
+
!e && N && (P(f ? (q ?? []).slice() : q ? [q] : []), I(""), H(null), U(!1), W.current = 1, G.current?.abort());
|
|
567
567
|
}, [
|
|
568
568
|
N,
|
|
569
|
-
|
|
569
|
+
f,
|
|
570
570
|
q
|
|
571
571
|
]), me = C.useCallback((e) => {
|
|
572
572
|
k === void 0 && ue(e), D?.(e), N && (I(""), H(null));
|
|
@@ -590,13 +590,13 @@ var Ye = ({ options: n = [], placeholder: r = "Search...", placeholderIcon: i, g
|
|
|
590
590
|
Y
|
|
591
591
|
]), Q = C.useMemo(() => N ? L ? /* @__PURE__ */ E("span", {
|
|
592
592
|
className: "inline-flex items-center justify-center gap-2",
|
|
593
|
-
children: [/* @__PURE__ */ T(
|
|
594
|
-
}) : V || (Y === "" && !y ? (
|
|
593
|
+
children: [/* @__PURE__ */ T(e, {}), re]
|
|
594
|
+
}) : V || (Y === "" && !y ? (f ? (q?.length ?? 0) > 0 : q) ? null : x : null) : null, [
|
|
595
595
|
y,
|
|
596
596
|
N,
|
|
597
597
|
L,
|
|
598
598
|
re,
|
|
599
|
-
|
|
599
|
+
f,
|
|
600
600
|
V,
|
|
601
601
|
x,
|
|
602
602
|
q,
|
|
@@ -604,13 +604,13 @@ var Ye = ({ options: n = [], placeholder: r = "Search...", placeholderIcon: i, g
|
|
|
604
604
|
]);
|
|
605
605
|
return /* @__PURE__ */ T(Ge, {
|
|
606
606
|
label: o,
|
|
607
|
-
helperText:
|
|
608
|
-
error:
|
|
609
|
-
className:
|
|
607
|
+
helperText: c,
|
|
608
|
+
error: l,
|
|
609
|
+
className: s("w-full", ee),
|
|
610
610
|
children: /* @__PURE__ */ E(De, {
|
|
611
611
|
items: de,
|
|
612
|
-
multiple:
|
|
613
|
-
disabled:
|
|
612
|
+
multiple: f,
|
|
613
|
+
disabled: d,
|
|
614
614
|
modal: w,
|
|
615
615
|
isItemEqualToValue: (e, t) => e?.value === t?.value,
|
|
616
616
|
...M,
|
|
@@ -622,45 +622,45 @@ var Ye = ({ options: n = [], placeholder: r = "Search...", placeholderIcon: i, g
|
|
|
622
622
|
onOpenChangeComplete: pe,
|
|
623
623
|
onInputValueChange: N ? Z : void 0,
|
|
624
624
|
onValueChange: me,
|
|
625
|
-
children: [
|
|
625
|
+
children: [f ? /* @__PURE__ */ E(Ve, {
|
|
626
626
|
ref: ie,
|
|
627
|
-
className:
|
|
627
|
+
className: s("w-full", _),
|
|
628
628
|
children: [i ? /* @__PURE__ */ T("span", {
|
|
629
629
|
"data-icon": "inline-start",
|
|
630
630
|
className: "contents text-muted-foreground [&>svg:not([class*='size-'])]:size-4",
|
|
631
631
|
children: i
|
|
632
632
|
}) : null, /* @__PURE__ */ T(Oe, { children: (e) => {
|
|
633
633
|
let t = e ?? [];
|
|
634
|
-
return /* @__PURE__ */ E(C.Fragment, { children: [
|
|
634
|
+
return /* @__PURE__ */ E(C.Fragment, { children: [g ? t.map((e) => /* @__PURE__ */ T(He, { children: e.label }, e.value)) : t.length > 0 ? /* @__PURE__ */ E("span", {
|
|
635
635
|
className: "text-sm text-muted-foreground",
|
|
636
636
|
children: [t.length, " selected"]
|
|
637
637
|
}) : null, /* @__PURE__ */ T(Ue, {
|
|
638
638
|
placeholder: t.length > 0 ? "" : r || o,
|
|
639
|
-
disabled:
|
|
639
|
+
disabled: d
|
|
640
640
|
})] });
|
|
641
641
|
} })]
|
|
642
642
|
}) : /* @__PURE__ */ T(je, {
|
|
643
643
|
placeholder: r || o,
|
|
644
|
-
showTrigger:
|
|
645
|
-
showClear:
|
|
646
|
-
disabled:
|
|
644
|
+
showTrigger: m,
|
|
645
|
+
showClear: h,
|
|
646
|
+
disabled: d,
|
|
647
647
|
className: _,
|
|
648
|
-
children: i ? /* @__PURE__ */ T(
|
|
648
|
+
children: i ? /* @__PURE__ */ T(p, {
|
|
649
649
|
align: "inline-start",
|
|
650
650
|
children: i
|
|
651
651
|
}) : null
|
|
652
652
|
}), /* @__PURE__ */ E(Me, {
|
|
653
|
-
anchor:
|
|
653
|
+
anchor: f ? ie : void 0,
|
|
654
654
|
className: te,
|
|
655
655
|
"aria-busy": N && (L || z) ? !0 : void 0,
|
|
656
656
|
children: [
|
|
657
657
|
N ? /* @__PURE__ */ T(ze, { children: Q }) : null,
|
|
658
|
-
/* @__PURE__ */ T(Re, { children:
|
|
658
|
+
/* @__PURE__ */ T(Re, { children: u }),
|
|
659
659
|
/* @__PURE__ */ E(Ne, {
|
|
660
660
|
onScroll: N ? he : void 0,
|
|
661
661
|
children: [/* @__PURE__ */ E(Fe, { children: [a ? /* @__PURE__ */ T(Ie, { children: a }) : null, /* @__PURE__ */ T(Le, { children: (e) => /* @__PURE__ */ T(Je, { option: e }, e.value) })] }), N && z ? /* @__PURE__ */ E("div", {
|
|
662
662
|
className: "flex items-center justify-center gap-2 py-2 text-sm text-muted-foreground",
|
|
663
|
-
children: [/* @__PURE__ */ T(
|
|
663
|
+
children: [/* @__PURE__ */ T(e, {}), b]
|
|
664
664
|
}) : null]
|
|
665
665
|
})
|
|
666
666
|
]
|
|
@@ -670,58 +670,58 @@ var Ye = ({ options: n = [], placeholder: r = "Search...", placeholderIcon: i, g
|
|
|
670
670
|
};
|
|
671
671
|
//#endregion
|
|
672
672
|
//#region src/components/ui/calendar.tsx
|
|
673
|
-
function Xe({ className:
|
|
673
|
+
function Xe({ className: e, classNames: t, showOutsideDays: n = !0, captionLayout: i = "label", buttonVariant: a = "ghost", locale: o, formatters: c, components: l, ...u }) {
|
|
674
674
|
let d = A();
|
|
675
675
|
return /* @__PURE__ */ T(k, {
|
|
676
|
-
showOutsideDays:
|
|
677
|
-
className:
|
|
678
|
-
captionLayout:
|
|
679
|
-
locale:
|
|
676
|
+
showOutsideDays: n,
|
|
677
|
+
className: s("group/calendar bg-background p-2 [--cell-radius:var(--radius-md)] [--cell-size:--spacing(7)] in-data-[slot=card-content]:bg-transparent in-data-[slot=popover-content]:bg-transparent", String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`, String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`, e),
|
|
678
|
+
captionLayout: i,
|
|
679
|
+
locale: o,
|
|
680
680
|
formatters: {
|
|
681
|
-
formatMonthDropdown: (e) => e.toLocaleString(
|
|
681
|
+
formatMonthDropdown: (e) => e.toLocaleString(o?.code, { month: "short" }),
|
|
682
682
|
...c
|
|
683
683
|
},
|
|
684
684
|
classNames: {
|
|
685
|
-
root:
|
|
686
|
-
months:
|
|
687
|
-
month:
|
|
688
|
-
nav:
|
|
689
|
-
button_previous:
|
|
690
|
-
button_next:
|
|
691
|
-
month_caption:
|
|
692
|
-
dropdowns:
|
|
693
|
-
dropdown_root:
|
|
694
|
-
dropdown:
|
|
695
|
-
caption_label:
|
|
685
|
+
root: s("w-fit", d.root),
|
|
686
|
+
months: s("relative flex flex-col gap-4 md:flex-row", d.months),
|
|
687
|
+
month: s("flex w-full flex-col gap-4", d.month),
|
|
688
|
+
nav: s("absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1", d.nav),
|
|
689
|
+
button_previous: s(r({ variant: a }), "size-(--cell-size) p-0 select-none aria-disabled:opacity-50", d.button_previous),
|
|
690
|
+
button_next: s(r({ variant: a }), "size-(--cell-size) p-0 select-none aria-disabled:opacity-50", d.button_next),
|
|
691
|
+
month_caption: s("flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)", d.month_caption),
|
|
692
|
+
dropdowns: s("flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium", d.dropdowns),
|
|
693
|
+
dropdown_root: s("relative rounded-(--cell-radius)", d.dropdown_root),
|
|
694
|
+
dropdown: s("absolute inset-0 bg-popover opacity-0", d.dropdown),
|
|
695
|
+
caption_label: s("font-medium select-none", i === "label" ? "text-sm" : "flex items-center gap-1 rounded-(--cell-radius) text-sm [&>svg]:size-3.5 [&>svg]:text-muted-foreground", d.caption_label),
|
|
696
696
|
table: "w-full border-collapse",
|
|
697
|
-
weekdays:
|
|
698
|
-
weekday:
|
|
699
|
-
week:
|
|
700
|
-
week_number_header:
|
|
701
|
-
week_number:
|
|
702
|
-
day:
|
|
703
|
-
range_start:
|
|
704
|
-
range_middle:
|
|
705
|
-
range_end:
|
|
706
|
-
today:
|
|
707
|
-
outside:
|
|
708
|
-
disabled:
|
|
709
|
-
hidden:
|
|
710
|
-
...
|
|
697
|
+
weekdays: s("flex", d.weekdays),
|
|
698
|
+
weekday: s("flex-1 rounded-(--cell-radius) text-xs font-normal text-muted-foreground select-none", d.weekday),
|
|
699
|
+
week: s("mt-2 flex w-full", d.week),
|
|
700
|
+
week_number_header: s("w-(--cell-size) select-none", d.week_number_header),
|
|
701
|
+
week_number: s("text-xs text-muted-foreground select-none", d.week_number),
|
|
702
|
+
day: s("group/day relative aspect-square h-full w-full rounded-(--cell-radius) p-0 text-center select-none [&:last-child[data-selected=true]_button]:rounded-r-(--cell-radius)", u.showWeekNumber ? "[&:nth-child(2)[data-selected=true]_button]:rounded-l-(--cell-radius)" : "[&:first-child[data-selected=true]_button]:rounded-l-(--cell-radius)", d.day),
|
|
703
|
+
range_start: s("relative isolate z-0 rounded-l-(--cell-radius) bg-muted after:absolute after:inset-y-0 after:right-0 after:w-4 after:bg-muted", d.range_start),
|
|
704
|
+
range_middle: s("rounded-none", d.range_middle),
|
|
705
|
+
range_end: s("relative isolate z-0 rounded-r-(--cell-radius) bg-muted after:absolute after:inset-y-0 after:left-0 after:w-4 after:bg-muted", d.range_end),
|
|
706
|
+
today: s("rounded-(--cell-radius) bg-muted text-foreground data-[selected=true]:rounded-none", d.today),
|
|
707
|
+
outside: s("text-muted-foreground aria-selected:text-muted-foreground", d.outside),
|
|
708
|
+
disabled: s("text-muted-foreground opacity-50", d.disabled),
|
|
709
|
+
hidden: s("invisible", d.hidden),
|
|
710
|
+
...t
|
|
711
711
|
},
|
|
712
712
|
components: {
|
|
713
|
-
Root: ({ className:
|
|
713
|
+
Root: ({ className: e, rootRef: t, ...n }) => /* @__PURE__ */ T("div", {
|
|
714
714
|
"data-slot": "calendar",
|
|
715
|
-
ref:
|
|
716
|
-
className: e
|
|
717
|
-
...
|
|
715
|
+
ref: t,
|
|
716
|
+
className: s(e),
|
|
717
|
+
...n
|
|
718
718
|
}),
|
|
719
|
-
Chevron: ({ className:
|
|
720
|
-
className:
|
|
721
|
-
...
|
|
719
|
+
Chevron: ({ className: e, orientation: t, ...n }) => T(t === "left" ? v : t === "right" ? ne : te, {
|
|
720
|
+
className: s("size-4", e),
|
|
721
|
+
...n
|
|
722
722
|
}),
|
|
723
723
|
DayButton: ({ ...e }) => /* @__PURE__ */ T(Ze, {
|
|
724
|
-
locale:
|
|
724
|
+
locale: o,
|
|
725
725
|
...e
|
|
726
726
|
}),
|
|
727
727
|
WeekNumber: ({ children: e, ...t }) => /* @__PURE__ */ T("td", {
|
|
@@ -736,21 +736,21 @@ function Xe({ className: t, classNames: n, showOutsideDays: r = !0, captionLayou
|
|
|
736
736
|
...u
|
|
737
737
|
});
|
|
738
738
|
}
|
|
739
|
-
function Ze({ className:
|
|
740
|
-
let
|
|
739
|
+
function Ze({ className: e, day: t, modifiers: n, locale: r, ...i }) {
|
|
740
|
+
let o = A(), c = S.useRef(null);
|
|
741
741
|
return S.useEffect(() => {
|
|
742
|
-
|
|
743
|
-
}, [
|
|
742
|
+
n.focused && c.current?.focus();
|
|
743
|
+
}, [n.focused]), /* @__PURE__ */ T(a, {
|
|
744
744
|
ref: c,
|
|
745
745
|
variant: "ghost",
|
|
746
746
|
size: "icon",
|
|
747
|
-
"data-day":
|
|
748
|
-
"data-selected-single":
|
|
749
|
-
"data-range-start":
|
|
750
|
-
"data-range-end":
|
|
751
|
-
"data-range-middle":
|
|
752
|
-
className:
|
|
753
|
-
...
|
|
747
|
+
"data-day": t.date.toLocaleDateString(r?.code),
|
|
748
|
+
"data-selected-single": n.selected && !n.range_start && !n.range_end && !n.range_middle,
|
|
749
|
+
"data-range-start": n.range_start,
|
|
750
|
+
"data-range-end": n.range_end,
|
|
751
|
+
"data-range-middle": n.range_middle,
|
|
752
|
+
className: s("relative isolate z-10 flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 border-0 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-ring/50 data-[range-end=true]:rounded-(--cell-radius) data-[range-end=true]:rounded-r-(--cell-radius) data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-muted data-[range-middle=true]:text-foreground data-[range-start=true]:rounded-(--cell-radius) data-[range-start=true]:rounded-l-(--cell-radius) data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground dark:hover:text-foreground [&>span]:text-xs [&>span]:opacity-70", o.day, e),
|
|
753
|
+
...i
|
|
754
754
|
});
|
|
755
755
|
}
|
|
756
756
|
//#endregion
|
|
@@ -761,11 +761,11 @@ function $() {
|
|
|
761
761
|
if (!e) throw Error("useCarousel must be used within a <Carousel />");
|
|
762
762
|
return e;
|
|
763
763
|
}
|
|
764
|
-
function $e({ orientation:
|
|
764
|
+
function $e({ orientation: e = "horizontal", opts: t, setApi: n, plugins: r, className: i, children: a, ...o }) {
|
|
765
765
|
let [c, l] = j({
|
|
766
|
-
...
|
|
767
|
-
axis:
|
|
768
|
-
},
|
|
766
|
+
...t,
|
|
767
|
+
axis: e === "horizontal" ? "x" : "y"
|
|
768
|
+
}, r), [u, d] = S.useState(!1), [f, p] = S.useState(!1), m = S.useCallback((e) => {
|
|
769
769
|
e && (d(e.canScrollPrev()), p(e.canScrollNext()));
|
|
770
770
|
}, []), h = S.useCallback(() => {
|
|
771
771
|
l?.scrollPrev();
|
|
@@ -775,8 +775,8 @@ function $e({ orientation: t = "horizontal", opts: n, setApi: r, plugins: i, cla
|
|
|
775
775
|
e.key === "ArrowLeft" ? (e.preventDefault(), h()) : e.key === "ArrowRight" && (e.preventDefault(), g());
|
|
776
776
|
}, [h, g]);
|
|
777
777
|
return S.useEffect(() => {
|
|
778
|
-
!l || !
|
|
779
|
-
}, [l,
|
|
778
|
+
!l || !n || n(l);
|
|
779
|
+
}, [l, n]), S.useEffect(() => {
|
|
780
780
|
if (l) return m(l), l.on("reInit", m), l.on("select", m), () => {
|
|
781
781
|
l?.off("select", m);
|
|
782
782
|
};
|
|
@@ -784,8 +784,8 @@ function $e({ orientation: t = "horizontal", opts: n, setApi: r, plugins: i, cla
|
|
|
784
784
|
value: {
|
|
785
785
|
carouselRef: c,
|
|
786
786
|
api: l,
|
|
787
|
-
opts:
|
|
788
|
-
orientation:
|
|
787
|
+
opts: t,
|
|
788
|
+
orientation: e || (t?.axis === "y" ? "vertical" : "horizontal"),
|
|
789
789
|
scrollPrev: h,
|
|
790
790
|
scrollNext: g,
|
|
791
791
|
canScrollPrev: u,
|
|
@@ -793,63 +793,63 @@ function $e({ orientation: t = "horizontal", opts: n, setApi: r, plugins: i, cla
|
|
|
793
793
|
},
|
|
794
794
|
children: /* @__PURE__ */ T("div", {
|
|
795
795
|
onKeyDownCapture: ee,
|
|
796
|
-
className:
|
|
796
|
+
className: s("relative", i),
|
|
797
797
|
role: "region",
|
|
798
798
|
"aria-roledescription": "carousel",
|
|
799
799
|
"data-slot": "carousel",
|
|
800
|
-
...
|
|
801
|
-
children:
|
|
800
|
+
...o,
|
|
801
|
+
children: a
|
|
802
802
|
})
|
|
803
803
|
});
|
|
804
804
|
}
|
|
805
|
-
function et({ className:
|
|
806
|
-
let { carouselRef:
|
|
805
|
+
function et({ className: e, ...t }) {
|
|
806
|
+
let { carouselRef: n, orientation: r } = $();
|
|
807
807
|
return /* @__PURE__ */ T("div", {
|
|
808
|
-
ref:
|
|
808
|
+
ref: n,
|
|
809
809
|
className: "overflow-hidden",
|
|
810
810
|
"data-slot": "carousel-content",
|
|
811
811
|
children: /* @__PURE__ */ T("div", {
|
|
812
|
-
className:
|
|
813
|
-
...
|
|
812
|
+
className: s("flex", r === "horizontal" ? "-ml-4" : "-mt-4 flex-col", e),
|
|
813
|
+
...t
|
|
814
814
|
})
|
|
815
815
|
});
|
|
816
816
|
}
|
|
817
|
-
function tt({ className:
|
|
818
|
-
let { orientation:
|
|
817
|
+
function tt({ className: e, ...t }) {
|
|
818
|
+
let { orientation: n } = $();
|
|
819
819
|
return /* @__PURE__ */ T("div", {
|
|
820
820
|
role: "group",
|
|
821
821
|
"aria-roledescription": "slide",
|
|
822
822
|
"data-slot": "carousel-item",
|
|
823
|
-
className:
|
|
824
|
-
...
|
|
823
|
+
className: s("min-w-0 shrink-0 grow-0 basis-full", n === "horizontal" ? "pl-4" : "pt-4", e),
|
|
824
|
+
...t
|
|
825
825
|
});
|
|
826
826
|
}
|
|
827
|
-
function nt({ className:
|
|
828
|
-
let { orientation:
|
|
829
|
-
return /* @__PURE__ */ E(
|
|
827
|
+
function nt({ className: e, variant: t = "outline", size: n = "icon-sm", ...r }) {
|
|
828
|
+
let { orientation: i, scrollPrev: o, canScrollPrev: c } = $();
|
|
829
|
+
return /* @__PURE__ */ E(a, {
|
|
830
830
|
"data-slot": "carousel-previous",
|
|
831
|
-
variant:
|
|
832
|
-
size:
|
|
833
|
-
className:
|
|
831
|
+
variant: t,
|
|
832
|
+
size: n,
|
|
833
|
+
className: s("absolute touch-manipulation rounded-full", i === "horizontal" ? "top-1/2 -left-12 -translate-y-1/2" : "-top-12 left-1/2 -translate-x-1/2 rotate-90", e),
|
|
834
834
|
disabled: !c,
|
|
835
|
-
onClick:
|
|
836
|
-
...
|
|
835
|
+
onClick: o,
|
|
836
|
+
...r,
|
|
837
837
|
children: [/* @__PURE__ */ T(v, {}), /* @__PURE__ */ T("span", {
|
|
838
838
|
className: "sr-only",
|
|
839
839
|
children: "Previous slide"
|
|
840
840
|
})]
|
|
841
841
|
});
|
|
842
842
|
}
|
|
843
|
-
function rt({ className:
|
|
844
|
-
let { orientation:
|
|
845
|
-
return /* @__PURE__ */ E(
|
|
843
|
+
function rt({ className: e, variant: t = "outline", size: n = "icon-sm", ...r }) {
|
|
844
|
+
let { orientation: i, scrollNext: o, canScrollNext: c } = $();
|
|
845
|
+
return /* @__PURE__ */ E(a, {
|
|
846
846
|
"data-slot": "carousel-next",
|
|
847
|
-
variant:
|
|
848
|
-
size:
|
|
849
|
-
className:
|
|
847
|
+
variant: t,
|
|
848
|
+
size: n,
|
|
849
|
+
className: s("absolute touch-manipulation rounded-full", i === "horizontal" ? "top-1/2 -right-12 -translate-y-1/2" : "-bottom-12 left-1/2 -translate-x-1/2 rotate-90", e),
|
|
850
850
|
disabled: !c,
|
|
851
|
-
onClick:
|
|
852
|
-
...
|
|
851
|
+
onClick: o,
|
|
852
|
+
...r,
|
|
853
853
|
children: [/* @__PURE__ */ T(ne, {}), /* @__PURE__ */ T("span", {
|
|
854
854
|
className: "sr-only",
|
|
855
855
|
children: "Next slide"
|
|
@@ -870,21 +870,21 @@ function st() {
|
|
|
870
870
|
if (!e) throw Error("useChart must be used within a <ChartContainer />");
|
|
871
871
|
return e;
|
|
872
872
|
}
|
|
873
|
-
function ct({ id:
|
|
874
|
-
let
|
|
873
|
+
function ct({ id: e, className: t, children: n, config: r, initialDimension: i = at, ...a }) {
|
|
874
|
+
let o = S.useId(), c = `chart-${e ?? o.replace(/:/g, "")}`;
|
|
875
875
|
return /* @__PURE__ */ T(ot.Provider, {
|
|
876
|
-
value: { config:
|
|
876
|
+
value: { config: r },
|
|
877
877
|
children: /* @__PURE__ */ E("div", {
|
|
878
878
|
"data-slot": "chart",
|
|
879
879
|
"data-chart": c,
|
|
880
|
-
className:
|
|
881
|
-
...
|
|
880
|
+
className: s("flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden", t),
|
|
881
|
+
...a,
|
|
882
882
|
children: [/* @__PURE__ */ T(lt, {
|
|
883
883
|
id: c,
|
|
884
|
-
config:
|
|
884
|
+
config: r
|
|
885
885
|
}), /* @__PURE__ */ T(x.ResponsiveContainer, {
|
|
886
|
-
initialDimension:
|
|
887
|
-
children:
|
|
886
|
+
initialDimension: i,
|
|
887
|
+
children: n
|
|
888
888
|
})]
|
|
889
889
|
})
|
|
890
890
|
});
|
|
@@ -900,79 +900,79 @@ ${n.map(([e, n]) => {
|
|
|
900
900
|
}
|
|
901
901
|
`).join("\n") } }) : null;
|
|
902
902
|
}, ut = x.Tooltip;
|
|
903
|
-
function dt({ active:
|
|
903
|
+
function dt({ active: e, payload: t, className: n, indicator: r = "dot", hideLabel: i = !1, hideIndicator: a = !1, label: o, labelFormatter: c, labelClassName: l, formatter: u, color: d, nameKey: f, labelKey: p }) {
|
|
904
904
|
let { config: m } = st(), h = S.useMemo(() => {
|
|
905
|
-
if (
|
|
906
|
-
let [
|
|
905
|
+
if (i || !t?.length) return null;
|
|
906
|
+
let [e] = t, n = `${p ?? e?.dataKey ?? e?.name ?? "value"}`, r = mt(m, e, n), a = !p && typeof o == "string" ? m[o]?.label ?? o : r?.label;
|
|
907
907
|
return c ? /* @__PURE__ */ T("div", {
|
|
908
|
-
className:
|
|
909
|
-
children: c(
|
|
910
|
-
}) :
|
|
911
|
-
className:
|
|
912
|
-
children:
|
|
908
|
+
className: s("font-medium", l),
|
|
909
|
+
children: c(a, t)
|
|
910
|
+
}) : a ? /* @__PURE__ */ T("div", {
|
|
911
|
+
className: s("font-medium", l),
|
|
912
|
+
children: a
|
|
913
913
|
}) : null;
|
|
914
914
|
}, [
|
|
915
|
-
|
|
915
|
+
o,
|
|
916
916
|
c,
|
|
917
|
-
|
|
918
|
-
|
|
917
|
+
t,
|
|
918
|
+
i,
|
|
919
919
|
l,
|
|
920
920
|
m,
|
|
921
921
|
p
|
|
922
922
|
]);
|
|
923
|
-
if (!
|
|
924
|
-
let g =
|
|
923
|
+
if (!e || !t?.length) return null;
|
|
924
|
+
let g = t.length === 1 && r !== "dot";
|
|
925
925
|
return /* @__PURE__ */ E("div", {
|
|
926
|
-
className:
|
|
926
|
+
className: s("grid min-w-32 items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl", n),
|
|
927
927
|
children: [g ? null : h, /* @__PURE__ */ T("div", {
|
|
928
928
|
className: "grid gap-1.5",
|
|
929
|
-
children:
|
|
930
|
-
let
|
|
929
|
+
children: t.filter((e) => e.type !== "none").map((e, t) => {
|
|
930
|
+
let n = `${f ?? e.name ?? e.dataKey ?? "value"}`, i = mt(m, e, n), o = d ?? e.payload?.fill ?? e.color;
|
|
931
931
|
return /* @__PURE__ */ T("div", {
|
|
932
|
-
className:
|
|
933
|
-
children: u &&
|
|
934
|
-
className:
|
|
935
|
-
"h-2.5 w-2.5":
|
|
936
|
-
"w-1":
|
|
937
|
-
"w-0 border-[1.5px] border-dashed bg-transparent":
|
|
938
|
-
"my-0.5": g &&
|
|
932
|
+
className: s("flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground", r === "dot" && "items-center"),
|
|
933
|
+
children: u && e?.value !== void 0 && e.name ? u(e.value, e.name, e, t, e.payload) : /* @__PURE__ */ E(w, { children: [i?.icon ? /* @__PURE__ */ T(i.icon, {}) : !a && /* @__PURE__ */ T("div", {
|
|
934
|
+
className: s("shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)", {
|
|
935
|
+
"h-2.5 w-2.5": r === "dot",
|
|
936
|
+
"w-1": r === "line",
|
|
937
|
+
"w-0 border-[1.5px] border-dashed bg-transparent": r === "dashed",
|
|
938
|
+
"my-0.5": g && r === "dashed"
|
|
939
939
|
}),
|
|
940
940
|
style: {
|
|
941
|
-
"--color-bg":
|
|
942
|
-
"--color-border":
|
|
941
|
+
"--color-bg": o,
|
|
942
|
+
"--color-border": o
|
|
943
943
|
}
|
|
944
944
|
}), /* @__PURE__ */ E("div", {
|
|
945
|
-
className:
|
|
945
|
+
className: s("flex flex-1 justify-between leading-none", g ? "items-end" : "items-center"),
|
|
946
946
|
children: [/* @__PURE__ */ E("div", {
|
|
947
947
|
className: "grid gap-1.5",
|
|
948
948
|
children: [g ? h : null, /* @__PURE__ */ T("span", {
|
|
949
949
|
className: "text-muted-foreground",
|
|
950
|
-
children:
|
|
950
|
+
children: i?.label ?? e.name
|
|
951
951
|
})]
|
|
952
|
-
}),
|
|
952
|
+
}), e.value != null && /* @__PURE__ */ T("span", {
|
|
953
953
|
className: "font-mono font-medium text-foreground tabular-nums",
|
|
954
|
-
children: typeof
|
|
954
|
+
children: typeof e.value == "number" ? e.value.toLocaleString() : String(e.value)
|
|
955
955
|
})]
|
|
956
956
|
})] })
|
|
957
|
-
},
|
|
957
|
+
}, t);
|
|
958
958
|
})
|
|
959
959
|
})]
|
|
960
960
|
});
|
|
961
961
|
}
|
|
962
962
|
var ft = x.Legend;
|
|
963
|
-
function pt({ className:
|
|
964
|
-
let { config:
|
|
965
|
-
return
|
|
966
|
-
className:
|
|
967
|
-
children:
|
|
968
|
-
let
|
|
963
|
+
function pt({ className: e, hideIcon: t = !1, payload: n, verticalAlign: r = "bottom", nameKey: i }) {
|
|
964
|
+
let { config: a } = st();
|
|
965
|
+
return n?.length ? /* @__PURE__ */ T("div", {
|
|
966
|
+
className: s("flex items-center justify-center gap-4", r === "top" ? "pb-3" : "pt-3", e),
|
|
967
|
+
children: n.filter((e) => e.type !== "none").map((e, n) => {
|
|
968
|
+
let r = `${i ?? e.dataKey ?? "value"}`, o = mt(a, e, r);
|
|
969
969
|
return /* @__PURE__ */ E("div", {
|
|
970
|
-
className:
|
|
971
|
-
children: [
|
|
970
|
+
className: s("flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground"),
|
|
971
|
+
children: [o?.icon && !t ? /* @__PURE__ */ T(o.icon, {}) : /* @__PURE__ */ T("div", {
|
|
972
972
|
className: "h-2 w-2 shrink-0 rounded-[2px]",
|
|
973
|
-
style: { backgroundColor:
|
|
974
|
-
}),
|
|
975
|
-
},
|
|
973
|
+
style: { backgroundColor: e.color }
|
|
974
|
+
}), o?.label]
|
|
975
|
+
}, n);
|
|
976
976
|
})
|
|
977
977
|
}) : null;
|
|
978
978
|
}
|
|
@@ -983,81 +983,81 @@ function mt(e, t, n) {
|
|
|
983
983
|
}
|
|
984
984
|
//#endregion
|
|
985
985
|
//#region src/components/ui/command.tsx
|
|
986
|
-
function ht({ className:
|
|
986
|
+
function ht({ className: e, ...t }) {
|
|
987
987
|
return /* @__PURE__ */ T(M, {
|
|
988
988
|
"data-slot": "command",
|
|
989
|
-
className:
|
|
990
|
-
...
|
|
989
|
+
className: s("flex size-full flex-col overflow-hidden rounded-xl! bg-popover p-1 text-popover-foreground", e),
|
|
990
|
+
...t
|
|
991
991
|
});
|
|
992
992
|
}
|
|
993
|
-
function gt({ title:
|
|
994
|
-
return /* @__PURE__ */ E(
|
|
995
|
-
...
|
|
993
|
+
function gt({ title: e = "Command Palette", description: t = "Search for a command to run...", children: n, className: r, showCloseButton: i = !1, ...a }) {
|
|
994
|
+
return /* @__PURE__ */ E(c, {
|
|
995
|
+
...a,
|
|
996
996
|
children: [/* @__PURE__ */ E(o, {
|
|
997
997
|
className: "sr-only",
|
|
998
|
-
children: [/* @__PURE__ */ T(
|
|
999
|
-
}), /* @__PURE__ */ T(
|
|
1000
|
-
className:
|
|
1001
|
-
showCloseButton:
|
|
1002
|
-
children:
|
|
998
|
+
children: [/* @__PURE__ */ T(ee, { children: e }), /* @__PURE__ */ T(l, { children: t })]
|
|
999
|
+
}), /* @__PURE__ */ T(f, {
|
|
1000
|
+
className: s("top-1/3 translate-y-0 overflow-hidden rounded-xl! p-0", r),
|
|
1001
|
+
showCloseButton: i,
|
|
1002
|
+
children: n
|
|
1003
1003
|
})]
|
|
1004
1004
|
});
|
|
1005
1005
|
}
|
|
1006
|
-
function _t({ className:
|
|
1006
|
+
function _t({ className: e, ...t }) {
|
|
1007
1007
|
return /* @__PURE__ */ T("div", {
|
|
1008
1008
|
"data-slot": "command-input-wrapper",
|
|
1009
1009
|
className: "p-1 pb-0",
|
|
1010
|
-
children: /* @__PURE__ */ E(
|
|
1010
|
+
children: /* @__PURE__ */ E(h, {
|
|
1011
1011
|
className: "h-8! rounded-lg! border-input/30 bg-input/30 shadow-none! *:data-[slot=input-group-addon]:pl-2!",
|
|
1012
1012
|
children: [/* @__PURE__ */ T(M.Input, {
|
|
1013
1013
|
"data-slot": "command-input",
|
|
1014
|
-
className:
|
|
1015
|
-
...
|
|
1016
|
-
}), /* @__PURE__ */ T(
|
|
1014
|
+
className: s("w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50", e),
|
|
1015
|
+
...t
|
|
1016
|
+
}), /* @__PURE__ */ T(p, { children: /* @__PURE__ */ T(re, { className: "size-4 shrink-0 opacity-50" }) })]
|
|
1017
1017
|
})
|
|
1018
1018
|
});
|
|
1019
1019
|
}
|
|
1020
|
-
function vt({ className:
|
|
1020
|
+
function vt({ className: e, ...t }) {
|
|
1021
1021
|
return /* @__PURE__ */ T(M.List, {
|
|
1022
1022
|
"data-slot": "command-list",
|
|
1023
|
-
className:
|
|
1024
|
-
...
|
|
1023
|
+
className: s("no-scrollbar max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none", e),
|
|
1024
|
+
...t
|
|
1025
1025
|
});
|
|
1026
1026
|
}
|
|
1027
|
-
function yt({ className:
|
|
1027
|
+
function yt({ className: e, ...t }) {
|
|
1028
1028
|
return /* @__PURE__ */ T(M.Empty, {
|
|
1029
1029
|
"data-slot": "command-empty",
|
|
1030
|
-
className:
|
|
1031
|
-
...
|
|
1030
|
+
className: s("py-6 text-center text-sm", e),
|
|
1031
|
+
...t
|
|
1032
1032
|
});
|
|
1033
1033
|
}
|
|
1034
|
-
function bt({ className:
|
|
1034
|
+
function bt({ className: e, ...t }) {
|
|
1035
1035
|
return /* @__PURE__ */ T(M.Group, {
|
|
1036
1036
|
"data-slot": "command-group",
|
|
1037
|
-
className:
|
|
1038
|
-
...
|
|
1037
|
+
className: s("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),
|
|
1038
|
+
...t
|
|
1039
1039
|
});
|
|
1040
1040
|
}
|
|
1041
|
-
function xt({ className:
|
|
1041
|
+
function xt({ className: e, ...t }) {
|
|
1042
1042
|
return /* @__PURE__ */ T(M.Separator, {
|
|
1043
1043
|
"data-slot": "command-separator",
|
|
1044
|
-
className:
|
|
1045
|
-
...
|
|
1044
|
+
className: s("-mx-1 h-px bg-border", e),
|
|
1045
|
+
...t
|
|
1046
1046
|
});
|
|
1047
1047
|
}
|
|
1048
|
-
function St({ className:
|
|
1048
|
+
function St({ className: e, children: t, ...n }) {
|
|
1049
1049
|
return /* @__PURE__ */ E(M.Item, {
|
|
1050
1050
|
"data-slot": "command-item",
|
|
1051
|
-
className:
|
|
1052
|
-
...
|
|
1053
|
-
children: [
|
|
1051
|
+
className: s("group/command-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-lg! data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-selected:bg-muted data-selected:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-selected:*:[svg]:text-foreground", e),
|
|
1052
|
+
...n,
|
|
1053
|
+
children: [t, /* @__PURE__ */ T(_, { className: "ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100" })]
|
|
1054
1054
|
});
|
|
1055
1055
|
}
|
|
1056
|
-
function Ct({ className:
|
|
1056
|
+
function Ct({ className: e, ...t }) {
|
|
1057
1057
|
return /* @__PURE__ */ T("span", {
|
|
1058
1058
|
"data-slot": "command-shortcut",
|
|
1059
|
-
className:
|
|
1060
|
-
...
|
|
1059
|
+
className: s("ml-auto text-xs tracking-widest text-muted-foreground group-data-selected/command-item:text-foreground", e),
|
|
1060
|
+
...t
|
|
1061
1061
|
});
|
|
1062
1062
|
}
|
|
1063
1063
|
//#endregion
|
|
@@ -1086,83 +1086,83 @@ function Dt({ ...e }) {
|
|
|
1086
1086
|
...e
|
|
1087
1087
|
});
|
|
1088
1088
|
}
|
|
1089
|
-
function Ot({ className:
|
|
1089
|
+
function Ot({ className: e, ...t }) {
|
|
1090
1090
|
return /* @__PURE__ */ T(N.Overlay, {
|
|
1091
1091
|
"data-slot": "drawer-overlay",
|
|
1092
|
-
className:
|
|
1093
|
-
...
|
|
1092
|
+
className: s("fixed inset-0 z-50 bg-black/10 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),
|
|
1093
|
+
...t
|
|
1094
1094
|
});
|
|
1095
1095
|
}
|
|
1096
|
-
function kt({ className:
|
|
1097
|
-
let
|
|
1096
|
+
function kt({ className: e, children: t, style: r, ...i }) {
|
|
1097
|
+
let a = n();
|
|
1098
1098
|
return /* @__PURE__ */ E(Et, {
|
|
1099
1099
|
"data-slot": "drawer-portal",
|
|
1100
1100
|
children: [/* @__PURE__ */ T(Ot, {}), /* @__PURE__ */ E(N.Content, {
|
|
1101
1101
|
"data-slot": "drawer-content",
|
|
1102
1102
|
style: {
|
|
1103
|
-
...
|
|
1104
|
-
...
|
|
1103
|
+
...a.style,
|
|
1104
|
+
...r
|
|
1105
1105
|
},
|
|
1106
|
-
className:
|
|
1107
|
-
...
|
|
1108
|
-
children: [/* @__PURE__ */ T("div", { className: "mx-auto mt-4 hidden h-1 w-[100px] shrink-0 rounded-full bg-muted group-data-[vaul-drawer-direction=bottom]/drawer-content:block" }),
|
|
1106
|
+
className: s(a.className, "group/drawer-content fixed z-50 flex h-auto flex-col bg-popover text-sm text-popover-foreground data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-xl data-[vaul-drawer-direction=bottom]:border-t data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:rounded-r-xl data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:rounded-l-xl data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-xl data-[vaul-drawer-direction=top]:border-b data-[vaul-drawer-direction=left]:sm:max-w-sm data-[vaul-drawer-direction=right]:sm:max-w-sm", e),
|
|
1107
|
+
...i,
|
|
1108
|
+
children: [/* @__PURE__ */ T("div", { className: "mx-auto mt-4 hidden h-1 w-[100px] shrink-0 rounded-full bg-muted group-data-[vaul-drawer-direction=bottom]/drawer-content:block" }), t]
|
|
1109
1109
|
})]
|
|
1110
1110
|
});
|
|
1111
1111
|
}
|
|
1112
|
-
function At({ className:
|
|
1112
|
+
function At({ className: e, ...t }) {
|
|
1113
1113
|
return /* @__PURE__ */ T("div", {
|
|
1114
1114
|
"data-slot": "drawer-header",
|
|
1115
|
-
className:
|
|
1116
|
-
...
|
|
1115
|
+
className: s("flex flex-col gap-0.5 p-4 group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center group-data-[vaul-drawer-direction=top]/drawer-content:text-center md:gap-0.5 md:text-left", e),
|
|
1116
|
+
...t
|
|
1117
1117
|
});
|
|
1118
1118
|
}
|
|
1119
|
-
function jt({ className:
|
|
1119
|
+
function jt({ className: e, ...t }) {
|
|
1120
1120
|
return /* @__PURE__ */ T("div", {
|
|
1121
1121
|
"data-slot": "drawer-footer",
|
|
1122
|
-
className:
|
|
1123
|
-
...
|
|
1122
|
+
className: s("mt-auto flex flex-col gap-2 p-4", e),
|
|
1123
|
+
...t
|
|
1124
1124
|
});
|
|
1125
1125
|
}
|
|
1126
|
-
function Mt({ className:
|
|
1126
|
+
function Mt({ className: e, ...t }) {
|
|
1127
1127
|
return /* @__PURE__ */ T(N.Title, {
|
|
1128
1128
|
"data-slot": "drawer-title",
|
|
1129
|
-
className:
|
|
1130
|
-
...
|
|
1129
|
+
className: s("font-heading text-base font-medium text-foreground", e),
|
|
1130
|
+
...t
|
|
1131
1131
|
});
|
|
1132
1132
|
}
|
|
1133
|
-
function Nt({ className:
|
|
1133
|
+
function Nt({ className: e, ...t }) {
|
|
1134
1134
|
return /* @__PURE__ */ T(N.Description, {
|
|
1135
1135
|
"data-slot": "drawer-description",
|
|
1136
|
-
className:
|
|
1137
|
-
...
|
|
1136
|
+
className: s("text-sm text-muted-foreground", e),
|
|
1137
|
+
...t
|
|
1138
1138
|
});
|
|
1139
1139
|
}
|
|
1140
1140
|
//#endregion
|
|
1141
1141
|
//#region src/components/ui/input-otp.tsx
|
|
1142
|
-
function Pt({ className:
|
|
1142
|
+
function Pt({ className: e, containerClassName: t, ...n }) {
|
|
1143
1143
|
return /* @__PURE__ */ T(ie, {
|
|
1144
1144
|
"data-slot": "input-otp",
|
|
1145
|
-
containerClassName:
|
|
1145
|
+
containerClassName: s("cn-input-otp flex items-center has-disabled:opacity-50", t),
|
|
1146
1146
|
spellCheck: !1,
|
|
1147
|
-
className:
|
|
1148
|
-
...
|
|
1147
|
+
className: s("disabled:cursor-not-allowed", e),
|
|
1148
|
+
...n
|
|
1149
1149
|
});
|
|
1150
1150
|
}
|
|
1151
|
-
function Ft({ className:
|
|
1151
|
+
function Ft({ className: e, ...t }) {
|
|
1152
1152
|
return /* @__PURE__ */ T("div", {
|
|
1153
1153
|
"data-slot": "input-otp-group",
|
|
1154
|
-
className:
|
|
1155
|
-
...
|
|
1154
|
+
className: s("flex items-center rounded-lg has-aria-invalid:border-destructive has-aria-invalid:ring-3 has-aria-invalid:ring-destructive/20 dark:has-aria-invalid:ring-destructive/40", e),
|
|
1155
|
+
...t
|
|
1156
1156
|
});
|
|
1157
1157
|
}
|
|
1158
|
-
function It({ index:
|
|
1159
|
-
let { char:
|
|
1158
|
+
function It({ index: e, className: t, ...n }) {
|
|
1159
|
+
let { char: r, hasFakeCaret: i, isActive: a } = S.useContext(ae)?.slots[e] ?? {};
|
|
1160
1160
|
return /* @__PURE__ */ E("div", {
|
|
1161
1161
|
"data-slot": "input-otp-slot",
|
|
1162
|
-
"data-active":
|
|
1163
|
-
className:
|
|
1164
|
-
...
|
|
1165
|
-
children: [
|
|
1162
|
+
"data-active": a,
|
|
1163
|
+
className: s("relative flex size-8 items-center justify-center border-y border-r border-input text-sm transition-all outline-none first:rounded-l-lg first:border-l last:rounded-r-lg aria-invalid:border-destructive data-[active=true]:z-10 data-[active=true]:border-ring data-[active=true]:ring-3 data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:border-destructive data-[active=true]:aria-invalid:ring-destructive/20 dark:bg-input/30 dark:data-[active=true]:aria-invalid:ring-destructive/40", t),
|
|
1164
|
+
...n,
|
|
1165
|
+
children: [r, i && /* @__PURE__ */ T("div", {
|
|
1166
1166
|
className: "pointer-events-none absolute inset-0 flex items-center justify-center",
|
|
1167
1167
|
children: /* @__PURE__ */ T("div", { className: "h-4 w-px animate-caret-blink bg-foreground duration-1000" })
|
|
1168
1168
|
})]
|