adminium 1.0.1-patch.1 → 1.0.1-patch.3
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/index.cjs +553 -77
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +56 -26
- package/dist/index.d.ts +56 -26
- package/dist/index.js +531 -72
- package/dist/index.js.map +1 -1
- package/dist/styles/adminium.css +533 -13
- package/package.json +5 -2
package/dist/index.cjs
CHANGED
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
|
|
4
4
|
var clsx = require('clsx');
|
|
5
5
|
var tailwindMerge = require('tailwind-merge');
|
|
6
|
-
var radixUi = require('radix-ui');
|
|
7
6
|
var classVarianceAuthority = require('class-variance-authority');
|
|
8
7
|
var lucideReact = require('lucide-react');
|
|
9
8
|
var SlotPrimitive2 = require('@radix-ui/react-slot');
|
|
10
9
|
var jsxRuntime = require('react/jsx-runtime');
|
|
10
|
+
var radixUi = require('radix-ui');
|
|
11
11
|
var vaul = require('vaul');
|
|
12
12
|
var HoverCardPrimitive = require('@radix-ui/react-hover-card');
|
|
13
13
|
var React = require('react');
|
|
@@ -15,7 +15,7 @@ var react = require('motion/react');
|
|
|
15
15
|
var CheckboxPrimitive = require('@radix-ui/react-checkbox');
|
|
16
16
|
var reactTable = require('@tanstack/react-table');
|
|
17
17
|
var DropdownMenuPrimitive = require('@radix-ui/react-dropdown-menu');
|
|
18
|
-
var
|
|
18
|
+
var SeparatorPrimitive = require('@radix-ui/react-separator');
|
|
19
19
|
|
|
20
20
|
function _interopNamespace(e) {
|
|
21
21
|
if (e && e.__esModule) return e;
|
|
@@ -40,6 +40,7 @@ var HoverCardPrimitive__namespace = /*#__PURE__*/_interopNamespace(HoverCardPrim
|
|
|
40
40
|
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
41
41
|
var CheckboxPrimitive__namespace = /*#__PURE__*/_interopNamespace(CheckboxPrimitive);
|
|
42
42
|
var DropdownMenuPrimitive__namespace = /*#__PURE__*/_interopNamespace(DropdownMenuPrimitive);
|
|
43
|
+
var SeparatorPrimitive__namespace = /*#__PURE__*/_interopNamespace(SeparatorPrimitive);
|
|
43
44
|
|
|
44
45
|
// src/lib/utils.ts
|
|
45
46
|
function cn(...inputs) {
|
|
@@ -432,6 +433,272 @@ function ButtonArrow({
|
|
|
432
433
|
}
|
|
433
434
|
);
|
|
434
435
|
}
|
|
436
|
+
var alertVariants = classVarianceAuthority.cva(
|
|
437
|
+
"flex items-stretch w-full gap-2 group-[.toaster]:w-(--width)",
|
|
438
|
+
{
|
|
439
|
+
variants: {
|
|
440
|
+
variant: {
|
|
441
|
+
secondary: "",
|
|
442
|
+
primary: "",
|
|
443
|
+
destructive: "",
|
|
444
|
+
success: "",
|
|
445
|
+
info: "",
|
|
446
|
+
mono: "",
|
|
447
|
+
warning: ""
|
|
448
|
+
},
|
|
449
|
+
icon: {
|
|
450
|
+
primary: "",
|
|
451
|
+
destructive: "",
|
|
452
|
+
success: "",
|
|
453
|
+
info: "",
|
|
454
|
+
warning: ""
|
|
455
|
+
},
|
|
456
|
+
appearance: {
|
|
457
|
+
solid: "",
|
|
458
|
+
outline: "",
|
|
459
|
+
light: "",
|
|
460
|
+
stroke: "text-foreground"
|
|
461
|
+
},
|
|
462
|
+
size: {
|
|
463
|
+
lg: "rounded-lg p-4 gap-3 text-base [&>[data-slot=alert-icon]>svg]:size-6 *:data-slot=alert-icon:mt-0.5 [&_[data-slot=alert-close]]:mt-1",
|
|
464
|
+
md: "rounded-lg p-3.5 gap-2.5 text-sm [&>[data-slot=alert-icon]>svg]:size-5 *:data-slot=alert-icon:mt-0 [&_[data-slot=alert-close]]:mt-0.5",
|
|
465
|
+
sm: "rounded-md px-3 py-2.5 gap-2 text-xs [&>[data-slot=alert-icon]>svg]:size-4 *:data-alert-icon:mt-0.5 [&_[data-slot=alert-close]]:mt-0.25 [&_[data-slot=alert-close]_svg]:size-3.5"
|
|
466
|
+
}
|
|
467
|
+
},
|
|
468
|
+
compoundVariants: [
|
|
469
|
+
/* Solid */
|
|
470
|
+
{
|
|
471
|
+
variant: "secondary",
|
|
472
|
+
appearance: "solid",
|
|
473
|
+
className: "bg-muted text-foreground"
|
|
474
|
+
},
|
|
475
|
+
{
|
|
476
|
+
variant: "primary",
|
|
477
|
+
appearance: "solid",
|
|
478
|
+
className: "bg-primary text-primary-foreground"
|
|
479
|
+
},
|
|
480
|
+
{
|
|
481
|
+
variant: "destructive",
|
|
482
|
+
appearance: "solid",
|
|
483
|
+
className: "bg-destructive text-destructive-foreground"
|
|
484
|
+
},
|
|
485
|
+
{
|
|
486
|
+
variant: "success",
|
|
487
|
+
appearance: "solid",
|
|
488
|
+
className: "bg-[var(--color-success,var(--color-green-500))] text-[var(--color-success-foreground,var(--color-white))]"
|
|
489
|
+
},
|
|
490
|
+
{
|
|
491
|
+
variant: "info",
|
|
492
|
+
appearance: "solid",
|
|
493
|
+
className: "bg-[var(--color-info,var(--color-violet-600))] text-[var(--color-info-foreground,var(--color-white))]"
|
|
494
|
+
},
|
|
495
|
+
{
|
|
496
|
+
variant: "warning",
|
|
497
|
+
appearance: "solid",
|
|
498
|
+
className: "bg-[var(--color-warning,var(--color-yellow-500))] text-[var(--color-warning-foreground,var(--color-white))]"
|
|
499
|
+
},
|
|
500
|
+
{
|
|
501
|
+
variant: "mono",
|
|
502
|
+
appearance: "solid",
|
|
503
|
+
className: "bg-zinc-950 text-white dark:bg-zinc-300 dark:text-black *:data-slot-[alert=close]:text-white"
|
|
504
|
+
},
|
|
505
|
+
/* Outline */
|
|
506
|
+
{
|
|
507
|
+
variant: "secondary",
|
|
508
|
+
appearance: "outline",
|
|
509
|
+
className: "border border-border bg-background text-foreground [&_[data-slot=alert-close]]:text-foreground"
|
|
510
|
+
},
|
|
511
|
+
{
|
|
512
|
+
variant: "primary",
|
|
513
|
+
appearance: "outline",
|
|
514
|
+
className: "border border-border bg-background text-primary [&_[data-slot=alert-close]]:text-foreground"
|
|
515
|
+
},
|
|
516
|
+
{
|
|
517
|
+
variant: "destructive",
|
|
518
|
+
appearance: "outline",
|
|
519
|
+
className: "border border-border bg-background text-destructive [&_[data-slot=alert-close]]:text-foreground"
|
|
520
|
+
},
|
|
521
|
+
{
|
|
522
|
+
variant: "success",
|
|
523
|
+
appearance: "outline",
|
|
524
|
+
className: "border border-border bg-background text-[var(--color-success,var(--color-green-500))] [&_[data-slot=alert-close]]:text-foreground"
|
|
525
|
+
},
|
|
526
|
+
{
|
|
527
|
+
variant: "info",
|
|
528
|
+
appearance: "outline",
|
|
529
|
+
className: "border border-border bg-background text-[var(--color-info,var(--color-violet-600))] [&_[data-slot=alert-close]]:text-foreground"
|
|
530
|
+
},
|
|
531
|
+
{
|
|
532
|
+
variant: "warning",
|
|
533
|
+
appearance: "outline",
|
|
534
|
+
className: "border border-border bg-background text-[var(--color-warning,var(--color-yellow-500))] [&_[data-slot=alert-close]]:text-foreground"
|
|
535
|
+
},
|
|
536
|
+
{
|
|
537
|
+
variant: "mono",
|
|
538
|
+
appearance: "outline",
|
|
539
|
+
className: "border border-border bg-background text-foreground [&_[data-slot=alert-close]]:text-foreground"
|
|
540
|
+
},
|
|
541
|
+
/* Light */
|
|
542
|
+
{
|
|
543
|
+
variant: "secondary",
|
|
544
|
+
appearance: "light",
|
|
545
|
+
className: "bg-muted border border-border text-foreground"
|
|
546
|
+
},
|
|
547
|
+
{
|
|
548
|
+
variant: "primary",
|
|
549
|
+
appearance: "light",
|
|
550
|
+
className: "text-foreground bg-[var(--color-primary-soft,var(--color-blue-50))] border border-[var(--color-primary-alpha,var(--color-blue-100))] [&_[data-slot=alert-icon]]:text-primary dark:bg-[var(--color-primary-soft,var(--color-blue-950))] dark:border-[var(--color-primary-alpha,var(--color-blue-900))]"
|
|
551
|
+
},
|
|
552
|
+
{
|
|
553
|
+
variant: "destructive",
|
|
554
|
+
appearance: "light",
|
|
555
|
+
className: "bg-[var(--color-destructive-soft,var(--color-red-50))] border border-[var(--color-destructive-alpha,var(--color-red-100))] text-foreground [&_[data-slot=alert-icon]]:text-destructive dark:bg-[var(--color-destructive-soft,var(--color-red-950))] dark:border-[var(--color-destructive-alpha,var(--color-red-900))] "
|
|
556
|
+
},
|
|
557
|
+
{
|
|
558
|
+
variant: "success",
|
|
559
|
+
appearance: "light",
|
|
560
|
+
className: "bg-[var(--color-success-soft,var(--color-green-50))] border border-[var(--color-success-alpha,var(--color-green-200))] text-foreground [&_[data-slot=alert-icon]]:text-[var(--color-success-foreground,var(--color-green-600))] dark:bg-[var(--color-success-soft,var(--color-green-950))] dark:border-[var(--color-success-alpha,var(--color-green-900))]"
|
|
561
|
+
},
|
|
562
|
+
{
|
|
563
|
+
variant: "info",
|
|
564
|
+
appearance: "light",
|
|
565
|
+
className: "bg-[var(--color-info-soft,var(--color-violet-50))] border border-[var(--color-info-alpha,var(--color-violet-100))] text-foreground [&_[data-slot=alert-icon]]:text-[var(--color-info-foreground,var(--color-violet-600))] dark:bg-[var(--color-info-soft,var(--color-violet-950))] dark:border-[var(--color-info-alpha,var(--color-violet-900))]"
|
|
566
|
+
},
|
|
567
|
+
{
|
|
568
|
+
variant: "warning",
|
|
569
|
+
appearance: "light",
|
|
570
|
+
className: "bg-[var(--color-warning-soft,var(--color-yellow-50))] border border-[var(--color-warning-alpha,var(--color-yellow-200))] text-foreground [&_[data-slot=alert-icon]]:text-[var(--color-warning-foreground,var(--color-yellow-600))] dark:bg-[var(--color-warning-soft,var(--color-yellow-950))] dark:border-[var(--color-warning-alpha,var(--color-yellow-900))]"
|
|
571
|
+
},
|
|
572
|
+
/* Mono */
|
|
573
|
+
{
|
|
574
|
+
variant: "mono",
|
|
575
|
+
icon: "primary",
|
|
576
|
+
className: "[&_[data-slot=alert-icon]]:text-primary"
|
|
577
|
+
},
|
|
578
|
+
{
|
|
579
|
+
variant: "mono",
|
|
580
|
+
icon: "warning",
|
|
581
|
+
className: "[&_[data-slot=alert-icon]]:text-[var(--color-warning-foreground,var(--color-yellow-600))]"
|
|
582
|
+
},
|
|
583
|
+
{
|
|
584
|
+
variant: "mono",
|
|
585
|
+
icon: "success",
|
|
586
|
+
className: "[&_[data-slot=alert-icon]]:text-[var(--color-success-foreground,var(--color-green-600))]"
|
|
587
|
+
},
|
|
588
|
+
{
|
|
589
|
+
variant: "mono",
|
|
590
|
+
icon: "destructive",
|
|
591
|
+
className: "[&_[data-slot=alert-icon]]:text-destructive"
|
|
592
|
+
},
|
|
593
|
+
{
|
|
594
|
+
variant: "mono",
|
|
595
|
+
icon: "info",
|
|
596
|
+
className: "[&_[data-slot=alert-icon]]:text-[var(--color-info-foreground,var(--color-violet-600))]"
|
|
597
|
+
}
|
|
598
|
+
],
|
|
599
|
+
defaultVariants: {
|
|
600
|
+
variant: "secondary",
|
|
601
|
+
appearance: "solid",
|
|
602
|
+
size: "md"
|
|
603
|
+
}
|
|
604
|
+
}
|
|
605
|
+
);
|
|
606
|
+
function Alert({
|
|
607
|
+
className,
|
|
608
|
+
variant,
|
|
609
|
+
size,
|
|
610
|
+
icon,
|
|
611
|
+
appearance,
|
|
612
|
+
close = false,
|
|
613
|
+
onClose,
|
|
614
|
+
children,
|
|
615
|
+
...props
|
|
616
|
+
}) {
|
|
617
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
618
|
+
"div",
|
|
619
|
+
{
|
|
620
|
+
"data-slot": "alert",
|
|
621
|
+
role: "alert",
|
|
622
|
+
className: cn(
|
|
623
|
+
alertVariants({ variant, size, icon, appearance }),
|
|
624
|
+
className
|
|
625
|
+
),
|
|
626
|
+
...props,
|
|
627
|
+
children: [
|
|
628
|
+
children,
|
|
629
|
+
close && /* @__PURE__ */ jsxRuntime.jsx(
|
|
630
|
+
Button,
|
|
631
|
+
{
|
|
632
|
+
size: "sm",
|
|
633
|
+
variant: "inverse",
|
|
634
|
+
mode: "icon",
|
|
635
|
+
onClick: onClose,
|
|
636
|
+
"aria-label": "Dismiss",
|
|
637
|
+
"data-slot": "alert-close",
|
|
638
|
+
className: cn("group shrink-0 size-4"),
|
|
639
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "opacity-60 group-hover:opacity-100 size-4" })
|
|
640
|
+
}
|
|
641
|
+
)
|
|
642
|
+
]
|
|
643
|
+
}
|
|
644
|
+
);
|
|
645
|
+
}
|
|
646
|
+
function AlertTitle({
|
|
647
|
+
className,
|
|
648
|
+
...props
|
|
649
|
+
}) {
|
|
650
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
651
|
+
"div",
|
|
652
|
+
{
|
|
653
|
+
"data-slot": "alert-title",
|
|
654
|
+
className: cn("grow tracking-tight", className),
|
|
655
|
+
...props
|
|
656
|
+
}
|
|
657
|
+
);
|
|
658
|
+
}
|
|
659
|
+
function AlertIcon({ children, className, ...props }) {
|
|
660
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
661
|
+
"div",
|
|
662
|
+
{
|
|
663
|
+
"data-slot": "alert-icon",
|
|
664
|
+
className: cn("shrink-0", className),
|
|
665
|
+
...props,
|
|
666
|
+
children
|
|
667
|
+
}
|
|
668
|
+
);
|
|
669
|
+
}
|
|
670
|
+
function AlertToolbar({ children, className, ...props }) {
|
|
671
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-slot": "alert-toolbar", className: cn(className), ...props, children });
|
|
672
|
+
}
|
|
673
|
+
function AlertDescription({
|
|
674
|
+
className,
|
|
675
|
+
...props
|
|
676
|
+
}) {
|
|
677
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
678
|
+
"div",
|
|
679
|
+
{
|
|
680
|
+
"data-slot": "alert-description",
|
|
681
|
+
className: cn("text-sm [&_p]:leading-relaxed [&_p]:mb-2", className),
|
|
682
|
+
...props
|
|
683
|
+
}
|
|
684
|
+
);
|
|
685
|
+
}
|
|
686
|
+
function AlertContent({
|
|
687
|
+
className,
|
|
688
|
+
...props
|
|
689
|
+
}) {
|
|
690
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
691
|
+
"div",
|
|
692
|
+
{
|
|
693
|
+
"data-slot": "alert-content",
|
|
694
|
+
className: cn(
|
|
695
|
+
"space-y-2 [&_[data-slot=alert-title]]:font-semibold",
|
|
696
|
+
className
|
|
697
|
+
),
|
|
698
|
+
...props
|
|
699
|
+
}
|
|
700
|
+
);
|
|
701
|
+
}
|
|
435
702
|
function AlertDialog({
|
|
436
703
|
...props
|
|
437
704
|
}) {
|
|
@@ -931,6 +1198,94 @@ function SheetDescription({ className, ...props }) {
|
|
|
931
1198
|
}
|
|
932
1199
|
);
|
|
933
1200
|
}
|
|
1201
|
+
var avatarStatusVariants = classVarianceAuthority.cva(
|
|
1202
|
+
"flex items-center rounded-full size-2 border-2 border-background",
|
|
1203
|
+
{
|
|
1204
|
+
variants: {
|
|
1205
|
+
variant: {
|
|
1206
|
+
online: "bg-green-600",
|
|
1207
|
+
offline: "bg-zinc-600 dark:bg-zinc-300",
|
|
1208
|
+
busy: "bg-yellow-600",
|
|
1209
|
+
away: "bg-blue-600"
|
|
1210
|
+
}
|
|
1211
|
+
},
|
|
1212
|
+
defaultVariants: {
|
|
1213
|
+
variant: "online"
|
|
1214
|
+
}
|
|
1215
|
+
}
|
|
1216
|
+
);
|
|
1217
|
+
function Avatar({
|
|
1218
|
+
className,
|
|
1219
|
+
...props
|
|
1220
|
+
}) {
|
|
1221
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1222
|
+
radixUi.Avatar.Root,
|
|
1223
|
+
{
|
|
1224
|
+
"data-slot": "avatar",
|
|
1225
|
+
className: cn("relative flex shrink-0 size-10", className),
|
|
1226
|
+
...props
|
|
1227
|
+
}
|
|
1228
|
+
);
|
|
1229
|
+
}
|
|
1230
|
+
function AvatarImage({
|
|
1231
|
+
className,
|
|
1232
|
+
...props
|
|
1233
|
+
}) {
|
|
1234
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("relative overflow-hidden rounded-full", className), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1235
|
+
radixUi.Avatar.Image,
|
|
1236
|
+
{
|
|
1237
|
+
"data-slot": "avatar-image",
|
|
1238
|
+
className: cn("aspect-square h-full w-full"),
|
|
1239
|
+
...props
|
|
1240
|
+
}
|
|
1241
|
+
) });
|
|
1242
|
+
}
|
|
1243
|
+
function AvatarFallback({
|
|
1244
|
+
className,
|
|
1245
|
+
...props
|
|
1246
|
+
}) {
|
|
1247
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1248
|
+
radixUi.Avatar.Fallback,
|
|
1249
|
+
{
|
|
1250
|
+
"data-slot": "avatar-fallback",
|
|
1251
|
+
className: cn(
|
|
1252
|
+
"flex h-full w-full items-center justify-center rounded-full border border-border bg-accent text-accent-foreground text-xs",
|
|
1253
|
+
className
|
|
1254
|
+
),
|
|
1255
|
+
...props
|
|
1256
|
+
}
|
|
1257
|
+
);
|
|
1258
|
+
}
|
|
1259
|
+
function AvatarIndicator({
|
|
1260
|
+
className,
|
|
1261
|
+
...props
|
|
1262
|
+
}) {
|
|
1263
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1264
|
+
"div",
|
|
1265
|
+
{
|
|
1266
|
+
"data-slot": "avatar-indicator",
|
|
1267
|
+
className: cn(
|
|
1268
|
+
"absolute flex size-6 items-center justify-center",
|
|
1269
|
+
className
|
|
1270
|
+
),
|
|
1271
|
+
...props
|
|
1272
|
+
}
|
|
1273
|
+
);
|
|
1274
|
+
}
|
|
1275
|
+
function AvatarStatus({
|
|
1276
|
+
className,
|
|
1277
|
+
variant,
|
|
1278
|
+
...props
|
|
1279
|
+
}) {
|
|
1280
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1281
|
+
"div",
|
|
1282
|
+
{
|
|
1283
|
+
"data-slot": "avatar-status",
|
|
1284
|
+
className: cn(avatarStatusVariants({ variant }), className),
|
|
1285
|
+
...props
|
|
1286
|
+
}
|
|
1287
|
+
);
|
|
1288
|
+
}
|
|
934
1289
|
var AvatarGroupContext = React__namespace.createContext(
|
|
935
1290
|
null
|
|
936
1291
|
);
|
|
@@ -3391,122 +3746,228 @@ function Label2({
|
|
|
3391
3746
|
}
|
|
3392
3747
|
);
|
|
3393
3748
|
}
|
|
3394
|
-
var
|
|
3395
|
-
|
|
3396
|
-
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
|
|
3400
|
-
|
|
3401
|
-
|
|
3402
|
-
|
|
3403
|
-
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
|
|
3407
|
-
|
|
3408
|
-
|
|
3409
|
-
throw new Error("useFormField should be used within <FormField>");
|
|
3410
|
-
}
|
|
3411
|
-
const { id } = itemContext;
|
|
3412
|
-
return {
|
|
3413
|
-
id,
|
|
3414
|
-
name: fieldContext.name,
|
|
3415
|
-
formItemId: `${id}-form-item`,
|
|
3416
|
-
formDescriptionId: `${id}-form-item-description`,
|
|
3417
|
-
formMessageId: `${id}-form-item-message`,
|
|
3418
|
-
...fieldState
|
|
3419
|
-
};
|
|
3420
|
-
};
|
|
3421
|
-
var FormItemContext = React__namespace.createContext(
|
|
3422
|
-
{}
|
|
3749
|
+
var Separator2 = React__namespace.forwardRef(
|
|
3750
|
+
({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3751
|
+
SeparatorPrimitive__namespace.Root,
|
|
3752
|
+
{
|
|
3753
|
+
ref,
|
|
3754
|
+
decorative,
|
|
3755
|
+
orientation,
|
|
3756
|
+
className: cn(
|
|
3757
|
+
"shrink-0 bg-border",
|
|
3758
|
+
orientation === "horizontal" ? "h-px w-full" : "h-full w-px",
|
|
3759
|
+
className
|
|
3760
|
+
),
|
|
3761
|
+
...props
|
|
3762
|
+
}
|
|
3763
|
+
)
|
|
3423
3764
|
);
|
|
3424
|
-
|
|
3765
|
+
Separator2.displayName = SeparatorPrimitive__namespace.Root.displayName;
|
|
3766
|
+
function FieldSet({ className, ...props }) {
|
|
3767
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3768
|
+
"fieldset",
|
|
3769
|
+
{
|
|
3770
|
+
"data-slot": "field-set",
|
|
3771
|
+
className: cn(
|
|
3772
|
+
"flex flex-col gap-6",
|
|
3773
|
+
"has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3",
|
|
3774
|
+
className
|
|
3775
|
+
),
|
|
3776
|
+
...props
|
|
3777
|
+
}
|
|
3778
|
+
);
|
|
3779
|
+
}
|
|
3780
|
+
function FieldLegend({
|
|
3425
3781
|
className,
|
|
3782
|
+
variant = "legend",
|
|
3426
3783
|
...props
|
|
3427
3784
|
}) {
|
|
3428
|
-
|
|
3429
|
-
|
|
3785
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3786
|
+
"legend",
|
|
3787
|
+
{
|
|
3788
|
+
"data-slot": "field-legend",
|
|
3789
|
+
"data-variant": variant,
|
|
3790
|
+
className: cn(
|
|
3791
|
+
"mb-3 font-medium",
|
|
3792
|
+
"data-[variant=legend]:text-base",
|
|
3793
|
+
"data-[variant=label]:text-sm",
|
|
3794
|
+
className
|
|
3795
|
+
),
|
|
3796
|
+
...props
|
|
3797
|
+
}
|
|
3798
|
+
);
|
|
3430
3799
|
}
|
|
3431
|
-
function
|
|
3800
|
+
function FieldGroup({ className, ...props }) {
|
|
3801
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3802
|
+
"div",
|
|
3803
|
+
{
|
|
3804
|
+
"data-slot": "field-group",
|
|
3805
|
+
className: cn(
|
|
3806
|
+
"group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 [&>[data-slot=field-group]]:gap-4",
|
|
3807
|
+
className
|
|
3808
|
+
),
|
|
3809
|
+
...props
|
|
3810
|
+
}
|
|
3811
|
+
);
|
|
3812
|
+
}
|
|
3813
|
+
var fieldVariants = classVarianceAuthority.cva(
|
|
3814
|
+
"group/field data-[invalid=true]:text-destructive flex w-full gap-3",
|
|
3815
|
+
{
|
|
3816
|
+
variants: {
|
|
3817
|
+
orientation: {
|
|
3818
|
+
vertical: ["flex-col [&>*]:w-full [&>.sr-only]:w-auto"],
|
|
3819
|
+
horizontal: [
|
|
3820
|
+
"flex-row items-center",
|
|
3821
|
+
"[&>[data-slot=field-label]]:flex-auto",
|
|
3822
|
+
"has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px has-[>[data-slot=field-content]]:items-start"
|
|
3823
|
+
],
|
|
3824
|
+
responsive: [
|
|
3825
|
+
"@md/field-group:flex-row @md/field-group:items-center @md/field-group:[&>*]:w-auto flex-col [&>*]:w-full [&>.sr-only]:w-auto",
|
|
3826
|
+
"@md/field-group:[&>[data-slot=field-label]]:flex-auto",
|
|
3827
|
+
"@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"
|
|
3828
|
+
]
|
|
3829
|
+
}
|
|
3830
|
+
},
|
|
3831
|
+
defaultVariants: {
|
|
3832
|
+
orientation: "vertical"
|
|
3833
|
+
}
|
|
3834
|
+
}
|
|
3835
|
+
);
|
|
3836
|
+
function Field({
|
|
3432
3837
|
className,
|
|
3838
|
+
orientation = "vertical",
|
|
3433
3839
|
...props
|
|
3434
3840
|
}) {
|
|
3435
|
-
const { error } = useFormField();
|
|
3436
3841
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3437
3842
|
"div",
|
|
3438
3843
|
{
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
"data-
|
|
3844
|
+
role: "group",
|
|
3845
|
+
"data-slot": "field",
|
|
3846
|
+
"data-orientation": orientation,
|
|
3847
|
+
className: cn(fieldVariants({ orientation }), className),
|
|
3442
3848
|
...props
|
|
3443
3849
|
}
|
|
3444
3850
|
);
|
|
3445
3851
|
}
|
|
3446
|
-
function
|
|
3852
|
+
function FieldContent({ className, ...props }) {
|
|
3853
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3854
|
+
"div",
|
|
3855
|
+
{
|
|
3856
|
+
"data-slot": "field-content",
|
|
3857
|
+
className: cn(
|
|
3858
|
+
"group/field-content flex flex-1 flex-col gap-1.5 leading-snug",
|
|
3859
|
+
className
|
|
3860
|
+
),
|
|
3861
|
+
...props
|
|
3862
|
+
}
|
|
3863
|
+
);
|
|
3864
|
+
}
|
|
3865
|
+
function FieldLabel({
|
|
3447
3866
|
className,
|
|
3448
3867
|
...props
|
|
3449
3868
|
}) {
|
|
3450
|
-
const { formItemId } = useFormField();
|
|
3451
3869
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3452
3870
|
Label2,
|
|
3453
3871
|
{
|
|
3454
|
-
"data-slot": "
|
|
3455
|
-
className: cn(
|
|
3456
|
-
|
|
3872
|
+
"data-slot": "field-label",
|
|
3873
|
+
className: cn(
|
|
3874
|
+
"group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50",
|
|
3875
|
+
"has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border [&>[data-slot=field]]:p-4",
|
|
3876
|
+
"has-data-[state=checked]:bg-primary/5 has-data-[state=checked]:border-primary dark:has-data-[state=checked]:bg-primary/10",
|
|
3877
|
+
className
|
|
3878
|
+
),
|
|
3457
3879
|
...props
|
|
3458
3880
|
}
|
|
3459
3881
|
);
|
|
3460
3882
|
}
|
|
3461
|
-
function
|
|
3462
|
-
const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
|
|
3883
|
+
function FieldTitle({ className, ...props }) {
|
|
3463
3884
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3464
|
-
|
|
3885
|
+
"div",
|
|
3465
3886
|
{
|
|
3466
|
-
"data-slot": "
|
|
3467
|
-
|
|
3468
|
-
|
|
3469
|
-
|
|
3887
|
+
"data-slot": "field-label",
|
|
3888
|
+
className: cn(
|
|
3889
|
+
"flex w-fit items-center gap-2 text-sm font-medium leading-snug group-data-[disabled=true]/field:opacity-50",
|
|
3890
|
+
className
|
|
3891
|
+
),
|
|
3892
|
+
...props
|
|
3893
|
+
}
|
|
3894
|
+
);
|
|
3895
|
+
}
|
|
3896
|
+
function FieldDescription({ className, ...props }) {
|
|
3897
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3898
|
+
"p",
|
|
3899
|
+
{
|
|
3900
|
+
"data-slot": "field-description",
|
|
3901
|
+
className: cn(
|
|
3902
|
+
"text-muted-foreground text-sm font-normal leading-normal group-has-[[data-orientation=horizontal]]/field:text-balance",
|
|
3903
|
+
"nth-last-2:-mt-1 last:mt-0 [[data-variant=legend]+&]:-mt-1.5",
|
|
3904
|
+
"[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4",
|
|
3905
|
+
className
|
|
3906
|
+
),
|
|
3470
3907
|
...props
|
|
3471
3908
|
}
|
|
3472
3909
|
);
|
|
3473
3910
|
}
|
|
3474
|
-
function
|
|
3911
|
+
function FieldSeparator({
|
|
3912
|
+
children,
|
|
3475
3913
|
className,
|
|
3476
3914
|
...props
|
|
3477
3915
|
}) {
|
|
3478
|
-
|
|
3479
|
-
if (error) {
|
|
3480
|
-
return null;
|
|
3481
|
-
}
|
|
3482
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3916
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3483
3917
|
"div",
|
|
3484
3918
|
{
|
|
3485
|
-
"data-slot": "
|
|
3486
|
-
|
|
3487
|
-
className: cn(
|
|
3488
|
-
|
|
3919
|
+
"data-slot": "field-separator",
|
|
3920
|
+
"data-content": !!children,
|
|
3921
|
+
className: cn(
|
|
3922
|
+
"relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2",
|
|
3923
|
+
className
|
|
3924
|
+
),
|
|
3925
|
+
...props,
|
|
3926
|
+
children: [
|
|
3927
|
+
/* @__PURE__ */ jsxRuntime.jsx(Separator2, { className: "absolute inset-0 top-1/2" }),
|
|
3928
|
+
children && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3929
|
+
"span",
|
|
3930
|
+
{
|
|
3931
|
+
className: "bg-background text-muted-foreground relative mx-auto block w-fit px-2",
|
|
3932
|
+
"data-slot": "field-separator-content",
|
|
3933
|
+
children
|
|
3934
|
+
}
|
|
3935
|
+
)
|
|
3936
|
+
]
|
|
3489
3937
|
}
|
|
3490
3938
|
);
|
|
3491
3939
|
}
|
|
3492
|
-
function
|
|
3940
|
+
function FieldError({
|
|
3493
3941
|
className,
|
|
3494
3942
|
children,
|
|
3943
|
+
errors,
|
|
3495
3944
|
...props
|
|
3496
3945
|
}) {
|
|
3497
|
-
const
|
|
3498
|
-
|
|
3499
|
-
|
|
3946
|
+
const content = React.useMemo(() => {
|
|
3947
|
+
if (children) {
|
|
3948
|
+
return children;
|
|
3949
|
+
}
|
|
3950
|
+
if (!errors) {
|
|
3951
|
+
return null;
|
|
3952
|
+
}
|
|
3953
|
+
if (errors?.length === 1 && errors[0]?.message) {
|
|
3954
|
+
return errors[0].message;
|
|
3955
|
+
}
|
|
3956
|
+
return /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "ml-4 flex list-disc flex-col gap-1", children: errors.map(
|
|
3957
|
+
(error, index) => error?.message && /* @__PURE__ */ jsxRuntime.jsx("li", { children: error.message }, index)
|
|
3958
|
+
) });
|
|
3959
|
+
}, [children, errors]);
|
|
3960
|
+
if (!content) {
|
|
3500
3961
|
return null;
|
|
3501
3962
|
}
|
|
3502
3963
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3503
3964
|
"div",
|
|
3504
3965
|
{
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
className: cn("-
|
|
3966
|
+
role: "alert",
|
|
3967
|
+
"data-slot": "field-error",
|
|
3968
|
+
className: cn("text-destructive text-sm font-normal", className),
|
|
3508
3969
|
...props,
|
|
3509
|
-
children:
|
|
3970
|
+
children: content
|
|
3510
3971
|
}
|
|
3511
3972
|
);
|
|
3512
3973
|
}
|
|
@@ -3746,6 +4207,9 @@ function useMounted() {
|
|
|
3746
4207
|
return mounted;
|
|
3747
4208
|
}
|
|
3748
4209
|
|
|
4210
|
+
exports.Alert = Alert;
|
|
4211
|
+
exports.AlertContent = AlertContent;
|
|
4212
|
+
exports.AlertDescription = AlertDescription;
|
|
3749
4213
|
exports.AlertDialog = AlertDialog;
|
|
3750
4214
|
exports.AlertDialogAction = AlertDialogAction;
|
|
3751
4215
|
exports.AlertDialogCancel = AlertDialogCancel;
|
|
@@ -3757,9 +4221,17 @@ exports.AlertDialogOverlay = AlertDialogOverlay;
|
|
|
3757
4221
|
exports.AlertDialogPortal = AlertDialogPortal;
|
|
3758
4222
|
exports.AlertDialogTitle = AlertDialogTitle;
|
|
3759
4223
|
exports.AlertDialogTrigger = AlertDialogTrigger;
|
|
4224
|
+
exports.AlertIcon = AlertIcon;
|
|
4225
|
+
exports.AlertTitle = AlertTitle;
|
|
4226
|
+
exports.AlertToolbar = AlertToolbar;
|
|
4227
|
+
exports.Avatar = Avatar;
|
|
4228
|
+
exports.AvatarFallback = AvatarFallback;
|
|
3760
4229
|
exports.AvatarGroup = AvatarGroup;
|
|
3761
4230
|
exports.AvatarGroupItem = AvatarGroupItem;
|
|
3762
4231
|
exports.AvatarGroupTooltip = AvatarGroupTooltip;
|
|
4232
|
+
exports.AvatarImage = AvatarImage;
|
|
4233
|
+
exports.AvatarIndicator = AvatarIndicator;
|
|
4234
|
+
exports.AvatarStatus = AvatarStatus;
|
|
3763
4235
|
exports.Badge = Badge;
|
|
3764
4236
|
exports.BadgeButton = BadgeButton;
|
|
3765
4237
|
exports.BadgeDot = BadgeDot;
|
|
@@ -3834,13 +4306,16 @@ exports.DropdownMenuSub = DropdownMenuSub;
|
|
|
3834
4306
|
exports.DropdownMenuSubContent = DropdownMenuSubContent;
|
|
3835
4307
|
exports.DropdownMenuSubTrigger = DropdownMenuSubTrigger;
|
|
3836
4308
|
exports.DropdownMenuTrigger = DropdownMenuTrigger;
|
|
3837
|
-
exports.
|
|
3838
|
-
exports.
|
|
3839
|
-
exports.
|
|
3840
|
-
exports.
|
|
3841
|
-
exports.
|
|
3842
|
-
exports.
|
|
3843
|
-
exports.
|
|
4309
|
+
exports.Field = Field;
|
|
4310
|
+
exports.FieldContent = FieldContent;
|
|
4311
|
+
exports.FieldDescription = FieldDescription;
|
|
4312
|
+
exports.FieldError = FieldError;
|
|
4313
|
+
exports.FieldGroup = FieldGroup;
|
|
4314
|
+
exports.FieldLabel = FieldLabel;
|
|
4315
|
+
exports.FieldLegend = FieldLegend;
|
|
4316
|
+
exports.FieldSeparator = FieldSeparator;
|
|
4317
|
+
exports.FieldSet = FieldSet;
|
|
4318
|
+
exports.FieldTitle = FieldTitle;
|
|
3844
4319
|
exports.HoverCard = HoverCard;
|
|
3845
4320
|
exports.HoverCardContent = HoverCardContent;
|
|
3846
4321
|
exports.HoverCardTrigger = HoverCardTrigger;
|
|
@@ -3867,6 +4342,7 @@ exports.SelectScrollUpButton = SelectScrollUpButton;
|
|
|
3867
4342
|
exports.SelectSeparator = SelectSeparator;
|
|
3868
4343
|
exports.SelectTrigger = SelectTrigger;
|
|
3869
4344
|
exports.SelectValue = SelectValue;
|
|
4345
|
+
exports.Separator = Separator2;
|
|
3870
4346
|
exports.Sheet = Sheet;
|
|
3871
4347
|
exports.SheetBody = SheetBody;
|
|
3872
4348
|
exports.SheetClose = SheetClose;
|
|
@@ -3879,6 +4355,7 @@ exports.SheetPortal = SheetPortal;
|
|
|
3879
4355
|
exports.SheetTitle = SheetTitle;
|
|
3880
4356
|
exports.SheetTrigger = SheetTrigger;
|
|
3881
4357
|
exports.Skeleton = Skeleton;
|
|
4358
|
+
exports.avatarStatusVariants = avatarStatusVariants;
|
|
3882
4359
|
exports.badgeVariants = badgeVariants;
|
|
3883
4360
|
exports.buttonVariants = buttonVariants;
|
|
3884
4361
|
exports.cn = cn;
|
|
@@ -3888,7 +4365,6 @@ exports.labelVariants = labelVariants;
|
|
|
3888
4365
|
exports.selectTriggerVariants = selectTriggerVariants;
|
|
3889
4366
|
exports.useCopyToClipboard = useCopyToClipboard;
|
|
3890
4367
|
exports.useDataGrid = useDataGrid;
|
|
3891
|
-
exports.useFormField = useFormField;
|
|
3892
4368
|
exports.useIsMobile = useIsMobile;
|
|
3893
4369
|
exports.useMounted = useMounted;
|
|
3894
4370
|
//# sourceMappingURL=index.cjs.map
|