@webstacks/ui 0.4.4 → 0.4.5
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 +144 -29
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +33 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +8 -5
- package/dist/index.d.ts +8 -5
- package/dist/index.js +144 -29
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -582,37 +582,148 @@ var import_react_slot = require("@radix-ui/react-slot");
|
|
|
582
582
|
var import_class_variance_authority2 = require("class-variance-authority");
|
|
583
583
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
584
584
|
var buttonVariants = (0, import_class_variance_authority2.cva)(
|
|
585
|
-
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-full
|
|
585
|
+
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-full transition-colors cursor-pointer focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:cursor-not-allowed [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
586
586
|
{
|
|
587
587
|
variants: {
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
588
|
+
mode: {
|
|
589
|
+
filled: "",
|
|
590
|
+
stroke: "bg-transparent border",
|
|
591
|
+
bleed: "!bg-transparent border-0 !rounded hover:!bg-foreground/5 disabled:opacity-50",
|
|
592
|
+
link: "disabled:opacity-50"
|
|
593
|
+
},
|
|
594
|
+
tone: {
|
|
595
|
+
primary: "",
|
|
596
|
+
secondary: "",
|
|
597
|
+
tertiary: ""
|
|
595
598
|
},
|
|
596
599
|
size: {
|
|
597
|
-
|
|
598
|
-
sm: "
|
|
599
|
-
|
|
600
|
+
xs: "",
|
|
601
|
+
sm: "px-4 py-2 text-xs",
|
|
602
|
+
md: "px-6 py-3 text-sm",
|
|
603
|
+
lg: "px-8 py-4 text-base",
|
|
600
604
|
icon: "h-9 w-9"
|
|
605
|
+
},
|
|
606
|
+
fullWidth: {
|
|
607
|
+
true: "w-full",
|
|
608
|
+
false: ""
|
|
601
609
|
}
|
|
602
610
|
},
|
|
603
611
|
defaultVariants: {
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
612
|
+
mode: "filled",
|
|
613
|
+
tone: "primary",
|
|
614
|
+
size: "md"
|
|
615
|
+
},
|
|
616
|
+
compoundVariants: [
|
|
617
|
+
/* ── Filled ── */
|
|
618
|
+
{
|
|
619
|
+
mode: "filled",
|
|
620
|
+
tone: "primary",
|
|
621
|
+
className: "bg-primary text-primary-foreground hover:bg-primary/90 disabled:opacity-50"
|
|
622
|
+
},
|
|
623
|
+
{
|
|
624
|
+
mode: "filled",
|
|
625
|
+
tone: "secondary",
|
|
626
|
+
className: "bg-foreground text-background hover:bg-foreground/90 dark:bg-background dark:text-foreground dark:hover:bg-background/90 dark:border dark:border-border disabled:opacity-50"
|
|
627
|
+
},
|
|
628
|
+
{
|
|
629
|
+
mode: "filled",
|
|
630
|
+
tone: "tertiary",
|
|
631
|
+
className: "bg-muted text-foreground hover:bg-muted/80 disabled:opacity-50"
|
|
632
|
+
},
|
|
633
|
+
/* ── Stroke ── */
|
|
634
|
+
{
|
|
635
|
+
mode: "stroke",
|
|
636
|
+
tone: "primary",
|
|
637
|
+
className: "border-primary text-primary hover:bg-primary hover:text-primary-foreground disabled:opacity-50"
|
|
638
|
+
},
|
|
639
|
+
{
|
|
640
|
+
mode: "stroke",
|
|
641
|
+
tone: "secondary",
|
|
642
|
+
className: "border-border text-foreground hover:bg-primary hover:text-primary-foreground hover:border-primary disabled:opacity-50"
|
|
643
|
+
},
|
|
644
|
+
{
|
|
645
|
+
mode: "stroke",
|
|
646
|
+
tone: "tertiary",
|
|
647
|
+
className: "border-border text-foreground hover:bg-accent disabled:opacity-50"
|
|
648
|
+
},
|
|
649
|
+
/* ── Bleed ── */
|
|
650
|
+
{
|
|
651
|
+
mode: "bleed",
|
|
652
|
+
tone: "primary",
|
|
653
|
+
className: "text-foreground"
|
|
654
|
+
},
|
|
655
|
+
{
|
|
656
|
+
mode: "bleed",
|
|
657
|
+
tone: "secondary",
|
|
658
|
+
className: "text-foreground"
|
|
659
|
+
},
|
|
660
|
+
{
|
|
661
|
+
mode: "bleed",
|
|
662
|
+
tone: "tertiary",
|
|
663
|
+
className: "text-muted-foreground"
|
|
664
|
+
},
|
|
665
|
+
/* ── Link ── */
|
|
666
|
+
{
|
|
667
|
+
mode: "link",
|
|
668
|
+
tone: "primary",
|
|
669
|
+
className: "text-primary underline-offset-4 hover:underline"
|
|
670
|
+
},
|
|
671
|
+
{
|
|
672
|
+
mode: "link",
|
|
673
|
+
tone: "secondary",
|
|
674
|
+
className: "text-foreground underline-offset-4 hover:underline"
|
|
675
|
+
},
|
|
676
|
+
{
|
|
677
|
+
mode: "link",
|
|
678
|
+
tone: "tertiary",
|
|
679
|
+
className: "text-muted-foreground underline-offset-4 hover:underline"
|
|
680
|
+
},
|
|
681
|
+
/* ── Link + Bleed size overrides ── */
|
|
682
|
+
{
|
|
683
|
+
mode: "link",
|
|
684
|
+
size: "xs",
|
|
685
|
+
className: "text-xs"
|
|
686
|
+
},
|
|
687
|
+
{
|
|
688
|
+
mode: "link",
|
|
689
|
+
size: "sm",
|
|
690
|
+
className: "px-0 py-0 text-sm"
|
|
691
|
+
},
|
|
692
|
+
{
|
|
693
|
+
mode: "link",
|
|
694
|
+
size: "md",
|
|
695
|
+
className: "px-0 py-0 text-sm"
|
|
696
|
+
},
|
|
697
|
+
{
|
|
698
|
+
mode: "link",
|
|
699
|
+
size: "lg",
|
|
700
|
+
className: "px-0 py-0 text-base"
|
|
701
|
+
},
|
|
702
|
+
{
|
|
703
|
+
mode: "bleed",
|
|
704
|
+
size: "sm",
|
|
705
|
+
className: "px-2 py-1 text-sm"
|
|
706
|
+
},
|
|
707
|
+
{
|
|
708
|
+
mode: "bleed",
|
|
709
|
+
size: "md",
|
|
710
|
+
className: "px-3 py-2 text-sm"
|
|
711
|
+
},
|
|
712
|
+
{
|
|
713
|
+
mode: "bleed",
|
|
714
|
+
size: "lg",
|
|
715
|
+
className: "px-3 py-2 text-base"
|
|
716
|
+
}
|
|
717
|
+
]
|
|
607
718
|
}
|
|
608
719
|
);
|
|
609
720
|
var Button = React6.forwardRef(
|
|
610
|
-
({ className,
|
|
721
|
+
({ className, mode, tone, size, fullWidth, asChild = false, ...props }, ref) => {
|
|
611
722
|
const Comp = asChild ? import_react_slot.Slot : "button";
|
|
612
723
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
613
724
|
Comp,
|
|
614
725
|
{
|
|
615
|
-
className: cn(buttonVariants({
|
|
726
|
+
className: cn(buttonVariants({ mode, tone, size, fullWidth, className })),
|
|
616
727
|
ref,
|
|
617
728
|
...props
|
|
618
729
|
}
|
|
@@ -713,7 +824,7 @@ var AlertDialogCancel = React7.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
713
824
|
{
|
|
714
825
|
ref,
|
|
715
826
|
className: cn(
|
|
716
|
-
buttonVariants({
|
|
827
|
+
buttonVariants({ mode: "stroke", tone: "secondary" }),
|
|
717
828
|
"mt-2 sm:mt-0",
|
|
718
829
|
className
|
|
719
830
|
),
|
|
@@ -1913,7 +2024,8 @@ function Calendar({
|
|
|
1913
2024
|
classNames,
|
|
1914
2025
|
showOutsideDays = true,
|
|
1915
2026
|
captionLayout = "label",
|
|
1916
|
-
|
|
2027
|
+
buttonMode = "bleed",
|
|
2028
|
+
buttonTone = "primary",
|
|
1917
2029
|
formatters,
|
|
1918
2030
|
components,
|
|
1919
2031
|
...props
|
|
@@ -1946,12 +2058,12 @@ function Calendar({
|
|
|
1946
2058
|
defaultClassNames.nav
|
|
1947
2059
|
),
|
|
1948
2060
|
button_previous: cn(
|
|
1949
|
-
buttonVariants({
|
|
2061
|
+
buttonVariants({ mode: buttonMode, tone: buttonTone }),
|
|
1950
2062
|
"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50",
|
|
1951
2063
|
defaultClassNames.button_previous
|
|
1952
2064
|
),
|
|
1953
2065
|
button_next: cn(
|
|
1954
|
-
buttonVariants({
|
|
2066
|
+
buttonVariants({ mode: buttonMode, tone: buttonTone }),
|
|
1955
2067
|
"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50",
|
|
1956
2068
|
defaultClassNames.button_next
|
|
1957
2069
|
),
|
|
@@ -2068,7 +2180,7 @@ function CalendarDayButton({
|
|
|
2068
2180
|
Button,
|
|
2069
2181
|
{
|
|
2070
2182
|
ref,
|
|
2071
|
-
|
|
2183
|
+
mode: "bleed",
|
|
2072
2184
|
size: "icon",
|
|
2073
2185
|
"data-day": day.date.toLocaleDateString(),
|
|
2074
2186
|
"data-selected-single": modifiers.selected && !modifiers.range_start && !modifiers.range_end && !modifiers.range_middle,
|
|
@@ -2277,13 +2389,14 @@ var CarouselItem = React18.forwardRef(({ className, ...props }, ref) => {
|
|
|
2277
2389
|
);
|
|
2278
2390
|
});
|
|
2279
2391
|
CarouselItem.displayName = "CarouselItem";
|
|
2280
|
-
var CarouselPrevious = React18.forwardRef(({ className,
|
|
2392
|
+
var CarouselPrevious = React18.forwardRef(({ className, mode = "stroke", tone = "secondary", size = "icon", ...props }, ref) => {
|
|
2281
2393
|
const { orientation, scrollPrev, canScrollPrev } = useCarousel();
|
|
2282
2394
|
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
2283
2395
|
Button,
|
|
2284
2396
|
{
|
|
2285
2397
|
ref,
|
|
2286
|
-
|
|
2398
|
+
mode,
|
|
2399
|
+
tone,
|
|
2287
2400
|
size,
|
|
2288
2401
|
className: cn(
|
|
2289
2402
|
"absolute h-8 w-8 rounded-full",
|
|
@@ -2301,13 +2414,14 @@ var CarouselPrevious = React18.forwardRef(({ className, variant = "outline", siz
|
|
|
2301
2414
|
);
|
|
2302
2415
|
});
|
|
2303
2416
|
CarouselPrevious.displayName = "CarouselPrevious";
|
|
2304
|
-
var CarouselNext = React18.forwardRef(({ className,
|
|
2417
|
+
var CarouselNext = React18.forwardRef(({ className, mode = "stroke", tone = "secondary", size = "icon", ...props }, ref) => {
|
|
2305
2418
|
const { orientation, scrollNext, canScrollNext } = useCarousel();
|
|
2306
2419
|
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
2307
2420
|
Button,
|
|
2308
2421
|
{
|
|
2309
2422
|
ref,
|
|
2310
|
-
|
|
2423
|
+
mode,
|
|
2424
|
+
tone,
|
|
2311
2425
|
size,
|
|
2312
2426
|
className: cn(
|
|
2313
2427
|
"absolute h-8 w-8 rounded-full",
|
|
@@ -3672,7 +3786,8 @@ var PaginationLink = ({
|
|
|
3672
3786
|
"aria-current": isActive ? "page" : void 0,
|
|
3673
3787
|
className: cn(
|
|
3674
3788
|
buttonVariants({
|
|
3675
|
-
|
|
3789
|
+
mode: isActive ? "stroke" : "bleed",
|
|
3790
|
+
tone: "secondary",
|
|
3676
3791
|
size
|
|
3677
3792
|
}),
|
|
3678
3793
|
className
|
|
@@ -3688,7 +3803,7 @@ var PaginationPrevious = ({
|
|
|
3688
3803
|
PaginationLink,
|
|
3689
3804
|
{
|
|
3690
3805
|
"aria-label": "Go to previous page",
|
|
3691
|
-
size: "
|
|
3806
|
+
size: "md",
|
|
3692
3807
|
className: cn("gap-1 pl-2.5", className),
|
|
3693
3808
|
...props,
|
|
3694
3809
|
children: [
|
|
@@ -3705,7 +3820,7 @@ var PaginationNext = ({
|
|
|
3705
3820
|
PaginationLink,
|
|
3706
3821
|
{
|
|
3707
3822
|
"aria-label": "Go to next page",
|
|
3708
|
-
size: "
|
|
3823
|
+
size: "md",
|
|
3709
3824
|
className: cn("gap-1 pr-2.5", className),
|
|
3710
3825
|
...props,
|
|
3711
3826
|
children: [
|
|
@@ -4348,7 +4463,7 @@ var SidebarTrigger = React42.forwardRef(({ className, onClick, ...props }, ref)
|
|
|
4348
4463
|
{
|
|
4349
4464
|
ref,
|
|
4350
4465
|
"data-sidebar": "trigger",
|
|
4351
|
-
|
|
4466
|
+
mode: "bleed",
|
|
4352
4467
|
size: "icon",
|
|
4353
4468
|
className: cn("h-7 w-7", className),
|
|
4354
4469
|
onClick: (event) => {
|