adminium 1.0.1-patch.1 → 1.0.1-patch.2
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 +367 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +31 -3
- package/dist/index.d.ts +31 -3
- package/dist/index.js +356 -2
- package/dist/index.js.map +1 -1
- package/dist/styles/adminium.css +240 -0
- package/package.json +3 -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');
|
|
@@ -432,6 +432,272 @@ function ButtonArrow({
|
|
|
432
432
|
}
|
|
433
433
|
);
|
|
434
434
|
}
|
|
435
|
+
var alertVariants = classVarianceAuthority.cva(
|
|
436
|
+
"flex items-stretch w-full gap-2 group-[.toaster]:w-(--width)",
|
|
437
|
+
{
|
|
438
|
+
variants: {
|
|
439
|
+
variant: {
|
|
440
|
+
secondary: "",
|
|
441
|
+
primary: "",
|
|
442
|
+
destructive: "",
|
|
443
|
+
success: "",
|
|
444
|
+
info: "",
|
|
445
|
+
mono: "",
|
|
446
|
+
warning: ""
|
|
447
|
+
},
|
|
448
|
+
icon: {
|
|
449
|
+
primary: "",
|
|
450
|
+
destructive: "",
|
|
451
|
+
success: "",
|
|
452
|
+
info: "",
|
|
453
|
+
warning: ""
|
|
454
|
+
},
|
|
455
|
+
appearance: {
|
|
456
|
+
solid: "",
|
|
457
|
+
outline: "",
|
|
458
|
+
light: "",
|
|
459
|
+
stroke: "text-foreground"
|
|
460
|
+
},
|
|
461
|
+
size: {
|
|
462
|
+
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",
|
|
463
|
+
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",
|
|
464
|
+
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"
|
|
465
|
+
}
|
|
466
|
+
},
|
|
467
|
+
compoundVariants: [
|
|
468
|
+
/* Solid */
|
|
469
|
+
{
|
|
470
|
+
variant: "secondary",
|
|
471
|
+
appearance: "solid",
|
|
472
|
+
className: "bg-muted text-foreground"
|
|
473
|
+
},
|
|
474
|
+
{
|
|
475
|
+
variant: "primary",
|
|
476
|
+
appearance: "solid",
|
|
477
|
+
className: "bg-primary text-primary-foreground"
|
|
478
|
+
},
|
|
479
|
+
{
|
|
480
|
+
variant: "destructive",
|
|
481
|
+
appearance: "solid",
|
|
482
|
+
className: "bg-destructive text-destructive-foreground"
|
|
483
|
+
},
|
|
484
|
+
{
|
|
485
|
+
variant: "success",
|
|
486
|
+
appearance: "solid",
|
|
487
|
+
className: "bg-[var(--color-success,var(--color-green-500))] text-[var(--color-success-foreground,var(--color-white))]"
|
|
488
|
+
},
|
|
489
|
+
{
|
|
490
|
+
variant: "info",
|
|
491
|
+
appearance: "solid",
|
|
492
|
+
className: "bg-[var(--color-info,var(--color-violet-600))] text-[var(--color-info-foreground,var(--color-white))]"
|
|
493
|
+
},
|
|
494
|
+
{
|
|
495
|
+
variant: "warning",
|
|
496
|
+
appearance: "solid",
|
|
497
|
+
className: "bg-[var(--color-warning,var(--color-yellow-500))] text-[var(--color-warning-foreground,var(--color-white))]"
|
|
498
|
+
},
|
|
499
|
+
{
|
|
500
|
+
variant: "mono",
|
|
501
|
+
appearance: "solid",
|
|
502
|
+
className: "bg-zinc-950 text-white dark:bg-zinc-300 dark:text-black *:data-slot-[alert=close]:text-white"
|
|
503
|
+
},
|
|
504
|
+
/* Outline */
|
|
505
|
+
{
|
|
506
|
+
variant: "secondary",
|
|
507
|
+
appearance: "outline",
|
|
508
|
+
className: "border border-border bg-background text-foreground [&_[data-slot=alert-close]]:text-foreground"
|
|
509
|
+
},
|
|
510
|
+
{
|
|
511
|
+
variant: "primary",
|
|
512
|
+
appearance: "outline",
|
|
513
|
+
className: "border border-border bg-background text-primary [&_[data-slot=alert-close]]:text-foreground"
|
|
514
|
+
},
|
|
515
|
+
{
|
|
516
|
+
variant: "destructive",
|
|
517
|
+
appearance: "outline",
|
|
518
|
+
className: "border border-border bg-background text-destructive [&_[data-slot=alert-close]]:text-foreground"
|
|
519
|
+
},
|
|
520
|
+
{
|
|
521
|
+
variant: "success",
|
|
522
|
+
appearance: "outline",
|
|
523
|
+
className: "border border-border bg-background text-[var(--color-success,var(--color-green-500))] [&_[data-slot=alert-close]]:text-foreground"
|
|
524
|
+
},
|
|
525
|
+
{
|
|
526
|
+
variant: "info",
|
|
527
|
+
appearance: "outline",
|
|
528
|
+
className: "border border-border bg-background text-[var(--color-info,var(--color-violet-600))] [&_[data-slot=alert-close]]:text-foreground"
|
|
529
|
+
},
|
|
530
|
+
{
|
|
531
|
+
variant: "warning",
|
|
532
|
+
appearance: "outline",
|
|
533
|
+
className: "border border-border bg-background text-[var(--color-warning,var(--color-yellow-500))] [&_[data-slot=alert-close]]:text-foreground"
|
|
534
|
+
},
|
|
535
|
+
{
|
|
536
|
+
variant: "mono",
|
|
537
|
+
appearance: "outline",
|
|
538
|
+
className: "border border-border bg-background text-foreground [&_[data-slot=alert-close]]:text-foreground"
|
|
539
|
+
},
|
|
540
|
+
/* Light */
|
|
541
|
+
{
|
|
542
|
+
variant: "secondary",
|
|
543
|
+
appearance: "light",
|
|
544
|
+
className: "bg-muted border border-border text-foreground"
|
|
545
|
+
},
|
|
546
|
+
{
|
|
547
|
+
variant: "primary",
|
|
548
|
+
appearance: "light",
|
|
549
|
+
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))]"
|
|
550
|
+
},
|
|
551
|
+
{
|
|
552
|
+
variant: "destructive",
|
|
553
|
+
appearance: "light",
|
|
554
|
+
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))] "
|
|
555
|
+
},
|
|
556
|
+
{
|
|
557
|
+
variant: "success",
|
|
558
|
+
appearance: "light",
|
|
559
|
+
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))]"
|
|
560
|
+
},
|
|
561
|
+
{
|
|
562
|
+
variant: "info",
|
|
563
|
+
appearance: "light",
|
|
564
|
+
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))]"
|
|
565
|
+
},
|
|
566
|
+
{
|
|
567
|
+
variant: "warning",
|
|
568
|
+
appearance: "light",
|
|
569
|
+
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))]"
|
|
570
|
+
},
|
|
571
|
+
/* Mono */
|
|
572
|
+
{
|
|
573
|
+
variant: "mono",
|
|
574
|
+
icon: "primary",
|
|
575
|
+
className: "[&_[data-slot=alert-icon]]:text-primary"
|
|
576
|
+
},
|
|
577
|
+
{
|
|
578
|
+
variant: "mono",
|
|
579
|
+
icon: "warning",
|
|
580
|
+
className: "[&_[data-slot=alert-icon]]:text-[var(--color-warning-foreground,var(--color-yellow-600))]"
|
|
581
|
+
},
|
|
582
|
+
{
|
|
583
|
+
variant: "mono",
|
|
584
|
+
icon: "success",
|
|
585
|
+
className: "[&_[data-slot=alert-icon]]:text-[var(--color-success-foreground,var(--color-green-600))]"
|
|
586
|
+
},
|
|
587
|
+
{
|
|
588
|
+
variant: "mono",
|
|
589
|
+
icon: "destructive",
|
|
590
|
+
className: "[&_[data-slot=alert-icon]]:text-destructive"
|
|
591
|
+
},
|
|
592
|
+
{
|
|
593
|
+
variant: "mono",
|
|
594
|
+
icon: "info",
|
|
595
|
+
className: "[&_[data-slot=alert-icon]]:text-[var(--color-info-foreground,var(--color-violet-600))]"
|
|
596
|
+
}
|
|
597
|
+
],
|
|
598
|
+
defaultVariants: {
|
|
599
|
+
variant: "secondary",
|
|
600
|
+
appearance: "solid",
|
|
601
|
+
size: "md"
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
);
|
|
605
|
+
function Alert({
|
|
606
|
+
className,
|
|
607
|
+
variant,
|
|
608
|
+
size,
|
|
609
|
+
icon,
|
|
610
|
+
appearance,
|
|
611
|
+
close = false,
|
|
612
|
+
onClose,
|
|
613
|
+
children,
|
|
614
|
+
...props
|
|
615
|
+
}) {
|
|
616
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
617
|
+
"div",
|
|
618
|
+
{
|
|
619
|
+
"data-slot": "alert",
|
|
620
|
+
role: "alert",
|
|
621
|
+
className: cn(
|
|
622
|
+
alertVariants({ variant, size, icon, appearance }),
|
|
623
|
+
className
|
|
624
|
+
),
|
|
625
|
+
...props,
|
|
626
|
+
children: [
|
|
627
|
+
children,
|
|
628
|
+
close && /* @__PURE__ */ jsxRuntime.jsx(
|
|
629
|
+
Button,
|
|
630
|
+
{
|
|
631
|
+
size: "sm",
|
|
632
|
+
variant: "inverse",
|
|
633
|
+
mode: "icon",
|
|
634
|
+
onClick: onClose,
|
|
635
|
+
"aria-label": "Dismiss",
|
|
636
|
+
"data-slot": "alert-close",
|
|
637
|
+
className: cn("group shrink-0 size-4"),
|
|
638
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "opacity-60 group-hover:opacity-100 size-4" })
|
|
639
|
+
}
|
|
640
|
+
)
|
|
641
|
+
]
|
|
642
|
+
}
|
|
643
|
+
);
|
|
644
|
+
}
|
|
645
|
+
function AlertTitle({
|
|
646
|
+
className,
|
|
647
|
+
...props
|
|
648
|
+
}) {
|
|
649
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
650
|
+
"div",
|
|
651
|
+
{
|
|
652
|
+
"data-slot": "alert-title",
|
|
653
|
+
className: cn("grow tracking-tight", className),
|
|
654
|
+
...props
|
|
655
|
+
}
|
|
656
|
+
);
|
|
657
|
+
}
|
|
658
|
+
function AlertIcon({ children, className, ...props }) {
|
|
659
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
660
|
+
"div",
|
|
661
|
+
{
|
|
662
|
+
"data-slot": "alert-icon",
|
|
663
|
+
className: cn("shrink-0", className),
|
|
664
|
+
...props,
|
|
665
|
+
children
|
|
666
|
+
}
|
|
667
|
+
);
|
|
668
|
+
}
|
|
669
|
+
function AlertToolbar({ children, className, ...props }) {
|
|
670
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-slot": "alert-toolbar", className: cn(className), ...props, children });
|
|
671
|
+
}
|
|
672
|
+
function AlertDescription({
|
|
673
|
+
className,
|
|
674
|
+
...props
|
|
675
|
+
}) {
|
|
676
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
677
|
+
"div",
|
|
678
|
+
{
|
|
679
|
+
"data-slot": "alert-description",
|
|
680
|
+
className: cn("text-sm [&_p]:leading-relaxed [&_p]:mb-2", className),
|
|
681
|
+
...props
|
|
682
|
+
}
|
|
683
|
+
);
|
|
684
|
+
}
|
|
685
|
+
function AlertContent({
|
|
686
|
+
className,
|
|
687
|
+
...props
|
|
688
|
+
}) {
|
|
689
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
690
|
+
"div",
|
|
691
|
+
{
|
|
692
|
+
"data-slot": "alert-content",
|
|
693
|
+
className: cn(
|
|
694
|
+
"space-y-2 [&_[data-slot=alert-title]]:font-semibold",
|
|
695
|
+
className
|
|
696
|
+
),
|
|
697
|
+
...props
|
|
698
|
+
}
|
|
699
|
+
);
|
|
700
|
+
}
|
|
435
701
|
function AlertDialog({
|
|
436
702
|
...props
|
|
437
703
|
}) {
|
|
@@ -931,6 +1197,94 @@ function SheetDescription({ className, ...props }) {
|
|
|
931
1197
|
}
|
|
932
1198
|
);
|
|
933
1199
|
}
|
|
1200
|
+
var avatarStatusVariants = classVarianceAuthority.cva(
|
|
1201
|
+
"flex items-center rounded-full size-2 border-2 border-background",
|
|
1202
|
+
{
|
|
1203
|
+
variants: {
|
|
1204
|
+
variant: {
|
|
1205
|
+
online: "bg-green-600",
|
|
1206
|
+
offline: "bg-zinc-600 dark:bg-zinc-300",
|
|
1207
|
+
busy: "bg-yellow-600",
|
|
1208
|
+
away: "bg-blue-600"
|
|
1209
|
+
}
|
|
1210
|
+
},
|
|
1211
|
+
defaultVariants: {
|
|
1212
|
+
variant: "online"
|
|
1213
|
+
}
|
|
1214
|
+
}
|
|
1215
|
+
);
|
|
1216
|
+
function Avatar({
|
|
1217
|
+
className,
|
|
1218
|
+
...props
|
|
1219
|
+
}) {
|
|
1220
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1221
|
+
radixUi.Avatar.Root,
|
|
1222
|
+
{
|
|
1223
|
+
"data-slot": "avatar",
|
|
1224
|
+
className: cn("relative flex shrink-0 size-10", className),
|
|
1225
|
+
...props
|
|
1226
|
+
}
|
|
1227
|
+
);
|
|
1228
|
+
}
|
|
1229
|
+
function AvatarImage({
|
|
1230
|
+
className,
|
|
1231
|
+
...props
|
|
1232
|
+
}) {
|
|
1233
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("relative overflow-hidden rounded-full", className), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1234
|
+
radixUi.Avatar.Image,
|
|
1235
|
+
{
|
|
1236
|
+
"data-slot": "avatar-image",
|
|
1237
|
+
className: cn("aspect-square h-full w-full"),
|
|
1238
|
+
...props
|
|
1239
|
+
}
|
|
1240
|
+
) });
|
|
1241
|
+
}
|
|
1242
|
+
function AvatarFallback({
|
|
1243
|
+
className,
|
|
1244
|
+
...props
|
|
1245
|
+
}) {
|
|
1246
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1247
|
+
radixUi.Avatar.Fallback,
|
|
1248
|
+
{
|
|
1249
|
+
"data-slot": "avatar-fallback",
|
|
1250
|
+
className: cn(
|
|
1251
|
+
"flex h-full w-full items-center justify-center rounded-full border border-border bg-accent text-accent-foreground text-xs",
|
|
1252
|
+
className
|
|
1253
|
+
),
|
|
1254
|
+
...props
|
|
1255
|
+
}
|
|
1256
|
+
);
|
|
1257
|
+
}
|
|
1258
|
+
function AvatarIndicator({
|
|
1259
|
+
className,
|
|
1260
|
+
...props
|
|
1261
|
+
}) {
|
|
1262
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1263
|
+
"div",
|
|
1264
|
+
{
|
|
1265
|
+
"data-slot": "avatar-indicator",
|
|
1266
|
+
className: cn(
|
|
1267
|
+
"absolute flex size-6 items-center justify-center",
|
|
1268
|
+
className
|
|
1269
|
+
),
|
|
1270
|
+
...props
|
|
1271
|
+
}
|
|
1272
|
+
);
|
|
1273
|
+
}
|
|
1274
|
+
function AvatarStatus({
|
|
1275
|
+
className,
|
|
1276
|
+
variant,
|
|
1277
|
+
...props
|
|
1278
|
+
}) {
|
|
1279
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1280
|
+
"div",
|
|
1281
|
+
{
|
|
1282
|
+
"data-slot": "avatar-status",
|
|
1283
|
+
className: cn(avatarStatusVariants({ variant }), className),
|
|
1284
|
+
...props
|
|
1285
|
+
}
|
|
1286
|
+
);
|
|
1287
|
+
}
|
|
934
1288
|
var AvatarGroupContext = React__namespace.createContext(
|
|
935
1289
|
null
|
|
936
1290
|
);
|
|
@@ -3746,6 +4100,9 @@ function useMounted() {
|
|
|
3746
4100
|
return mounted;
|
|
3747
4101
|
}
|
|
3748
4102
|
|
|
4103
|
+
exports.Alert = Alert;
|
|
4104
|
+
exports.AlertContent = AlertContent;
|
|
4105
|
+
exports.AlertDescription = AlertDescription;
|
|
3749
4106
|
exports.AlertDialog = AlertDialog;
|
|
3750
4107
|
exports.AlertDialogAction = AlertDialogAction;
|
|
3751
4108
|
exports.AlertDialogCancel = AlertDialogCancel;
|
|
@@ -3757,9 +4114,17 @@ exports.AlertDialogOverlay = AlertDialogOverlay;
|
|
|
3757
4114
|
exports.AlertDialogPortal = AlertDialogPortal;
|
|
3758
4115
|
exports.AlertDialogTitle = AlertDialogTitle;
|
|
3759
4116
|
exports.AlertDialogTrigger = AlertDialogTrigger;
|
|
4117
|
+
exports.AlertIcon = AlertIcon;
|
|
4118
|
+
exports.AlertTitle = AlertTitle;
|
|
4119
|
+
exports.AlertToolbar = AlertToolbar;
|
|
4120
|
+
exports.Avatar = Avatar;
|
|
4121
|
+
exports.AvatarFallback = AvatarFallback;
|
|
3760
4122
|
exports.AvatarGroup = AvatarGroup;
|
|
3761
4123
|
exports.AvatarGroupItem = AvatarGroupItem;
|
|
3762
4124
|
exports.AvatarGroupTooltip = AvatarGroupTooltip;
|
|
4125
|
+
exports.AvatarImage = AvatarImage;
|
|
4126
|
+
exports.AvatarIndicator = AvatarIndicator;
|
|
4127
|
+
exports.AvatarStatus = AvatarStatus;
|
|
3763
4128
|
exports.Badge = Badge;
|
|
3764
4129
|
exports.BadgeButton = BadgeButton;
|
|
3765
4130
|
exports.BadgeDot = BadgeDot;
|
|
@@ -3879,6 +4244,7 @@ exports.SheetPortal = SheetPortal;
|
|
|
3879
4244
|
exports.SheetTitle = SheetTitle;
|
|
3880
4245
|
exports.SheetTrigger = SheetTrigger;
|
|
3881
4246
|
exports.Skeleton = Skeleton;
|
|
4247
|
+
exports.avatarStatusVariants = avatarStatusVariants;
|
|
3882
4248
|
exports.badgeVariants = badgeVariants;
|
|
3883
4249
|
exports.buttonVariants = buttonVariants;
|
|
3884
4250
|
exports.cn = cn;
|