@0xchain/ui 1.1.0-beta.2 → 1.1.0-beta.20

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.
Files changed (76) hide show
  1. package/LICENSE +21 -0
  2. package/dist/accordion.js +64 -0
  3. package/dist/alert-dialog.js +146 -0
  4. package/dist/{alert.mjs → alert.js} +26 -26
  5. package/dist/aspect-ratio.js +10 -0
  6. package/dist/avatar.js +53 -0
  7. package/dist/{badge.mjs → badge.js} +17 -16
  8. package/dist/breadcrumb.js +103 -0
  9. package/dist/{button.mjs → button.js} +18 -17
  10. package/dist/calendar.js +186 -0
  11. package/dist/card.js +90 -0
  12. package/dist/carousel.js +198 -0
  13. package/dist/{checkbox.mjs → checkbox.js} +16 -16
  14. package/dist/collapsible.js +34 -0
  15. package/dist/command.js +170 -0
  16. package/dist/context-menu.js +223 -0
  17. package/dist/dialog.js +136 -0
  18. package/dist/dropdown-menu.js +231 -0
  19. package/dist/form.js +116 -0
  20. package/dist/hover-card.js +38 -0
  21. package/dist/{input.mjs → input.js} +9 -9
  22. package/dist/{label.mjs → label.js} +12 -12
  23. package/dist/menubar.js +251 -0
  24. package/dist/{navigation-menu.mjs → navigation-menu.js} +89 -89
  25. package/dist/pagination.js +116 -0
  26. package/dist/popover.js +44 -0
  27. package/dist/progress.js +31 -0
  28. package/dist/radio-group.js +45 -0
  29. package/dist/resizable.js +48 -0
  30. package/dist/scroll-area.js +60 -0
  31. package/dist/select.js +169 -0
  32. package/dist/separator.js +26 -0
  33. package/dist/sheet.js +126 -0
  34. package/dist/skeleton.js +15 -0
  35. package/dist/{slider.mjs → slider.js} +33 -33
  36. package/dist/sonner.js +22 -0
  37. package/dist/{switch.mjs → switch.js} +15 -15
  38. package/dist/table.js +114 -0
  39. package/dist/{tabs.mjs → tabs.js} +37 -37
  40. package/dist/{textarea.mjs → textarea.js} +8 -8
  41. package/dist/toggle-group.js +62 -0
  42. package/dist/{toggle.mjs → toggle.js} +16 -16
  43. package/dist/tooltip.js +55 -0
  44. package/dist/utils-CzDCF-Ah.js +8 -0
  45. package/package.json +138 -89
  46. package/dist/accordion.mjs +0 -64
  47. package/dist/alert-dialog.mjs +0 -146
  48. package/dist/aspect-ratio.mjs +0 -10
  49. package/dist/avatar.mjs +0 -53
  50. package/dist/breadcrumb.mjs +0 -102
  51. package/dist/calendar.mjs +0 -173
  52. package/dist/card.mjs +0 -90
  53. package/dist/carousel.mjs +0 -177
  54. package/dist/collapsible.mjs +0 -34
  55. package/dist/command.mjs +0 -170
  56. package/dist/context-menu.mjs +0 -223
  57. package/dist/dialog.mjs +0 -136
  58. package/dist/dropdown-menu.mjs +0 -231
  59. package/dist/form.mjs +0 -101
  60. package/dist/hover-card.mjs +0 -38
  61. package/dist/menubar.mjs +0 -251
  62. package/dist/pagination.mjs +0 -116
  63. package/dist/popover.mjs +0 -44
  64. package/dist/progress.mjs +0 -31
  65. package/dist/radio-group.mjs +0 -45
  66. package/dist/resizable.mjs +0 -48
  67. package/dist/scroll-area.mjs +0 -60
  68. package/dist/select.mjs +0 -169
  69. package/dist/separator.mjs +0 -26
  70. package/dist/sheet.mjs +0 -126
  71. package/dist/skeleton.mjs +0 -15
  72. package/dist/sonner.mjs +0 -22
  73. package/dist/table.mjs +0 -114
  74. package/dist/toggle-group.mjs +0 -62
  75. package/dist/tooltip.mjs +0 -55
  76. package/dist/utils-B7J70Nno.js +0 -8
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024-present 0xchain
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,64 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import * as AccordionPrimitive from "@radix-ui/react-accordion";
3
+ import { ChevronDownIcon } from "lucide-react";
4
+ import { c as cn } from "./utils-CzDCF-Ah.js";
5
+ function Accordion({
6
+ ...props
7
+ }) {
8
+ return /* @__PURE__ */ jsx(AccordionPrimitive.Root, { "data-slot": "accordion", ...props });
9
+ }
10
+ function AccordionItem({
11
+ className,
12
+ ...props
13
+ }) {
14
+ return /* @__PURE__ */ jsx(
15
+ AccordionPrimitive.Item,
16
+ {
17
+ "data-slot": "accordion-item",
18
+ className: cn("border-b last:border-b-0", className),
19
+ ...props
20
+ }
21
+ );
22
+ }
23
+ function AccordionTrigger({
24
+ className,
25
+ children,
26
+ ...props
27
+ }) {
28
+ return /* @__PURE__ */ jsx(AccordionPrimitive.Header, { className: "flex", children: /* @__PURE__ */ jsxs(
29
+ AccordionPrimitive.Trigger,
30
+ {
31
+ "data-slot": "accordion-trigger",
32
+ className: cn(
33
+ "focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",
34
+ className
35
+ ),
36
+ ...props,
37
+ children: [
38
+ children,
39
+ /* @__PURE__ */ jsx(ChevronDownIcon, { className: "text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200" })
40
+ ]
41
+ }
42
+ ) });
43
+ }
44
+ function AccordionContent({
45
+ className,
46
+ children,
47
+ ...props
48
+ }) {
49
+ return /* @__PURE__ */ jsx(
50
+ AccordionPrimitive.Content,
51
+ {
52
+ "data-slot": "accordion-content",
53
+ className: "data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm",
54
+ ...props,
55
+ children: /* @__PURE__ */ jsx("div", { className: cn("pt-0 pb-4", className), children })
56
+ }
57
+ );
58
+ }
59
+ export {
60
+ Accordion,
61
+ AccordionContent,
62
+ AccordionItem,
63
+ AccordionTrigger
64
+ };
@@ -0,0 +1,146 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
3
+ import { c as cn } from "./utils-CzDCF-Ah.js";
4
+ import { buttonVariants } from "./button.js";
5
+ function AlertDialog({
6
+ ...props
7
+ }) {
8
+ return /* @__PURE__ */ jsx(AlertDialogPrimitive.Root, { "data-slot": "alert-dialog", ...props });
9
+ }
10
+ function AlertDialogTrigger({
11
+ ...props
12
+ }) {
13
+ return /* @__PURE__ */ jsx(AlertDialogPrimitive.Trigger, { "data-slot": "alert-dialog-trigger", ...props });
14
+ }
15
+ function AlertDialogPortal({
16
+ ...props
17
+ }) {
18
+ return /* @__PURE__ */ jsx(AlertDialogPrimitive.Portal, { "data-slot": "alert-dialog-portal", ...props });
19
+ }
20
+ function AlertDialogOverlay({
21
+ className,
22
+ ...props
23
+ }) {
24
+ return /* @__PURE__ */ jsx(
25
+ AlertDialogPrimitive.Overlay,
26
+ {
27
+ "data-slot": "alert-dialog-overlay",
28
+ className: cn(
29
+ "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
30
+ className
31
+ ),
32
+ ...props
33
+ }
34
+ );
35
+ }
36
+ function AlertDialogContent({
37
+ className,
38
+ ...props
39
+ }) {
40
+ return /* @__PURE__ */ jsxs(AlertDialogPortal, { children: [
41
+ /* @__PURE__ */ jsx(AlertDialogOverlay, {}),
42
+ /* @__PURE__ */ jsx(
43
+ AlertDialogPrimitive.Content,
44
+ {
45
+ "data-slot": "alert-dialog-content",
46
+ className: cn(
47
+ "bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",
48
+ className
49
+ ),
50
+ ...props
51
+ }
52
+ )
53
+ ] });
54
+ }
55
+ function AlertDialogHeader({
56
+ className,
57
+ ...props
58
+ }) {
59
+ return /* @__PURE__ */ jsx(
60
+ "div",
61
+ {
62
+ "data-slot": "alert-dialog-header",
63
+ className: cn("flex flex-col gap-2 text-center sm:text-left", className),
64
+ ...props
65
+ }
66
+ );
67
+ }
68
+ function AlertDialogFooter({
69
+ className,
70
+ ...props
71
+ }) {
72
+ return /* @__PURE__ */ jsx(
73
+ "div",
74
+ {
75
+ "data-slot": "alert-dialog-footer",
76
+ className: cn(
77
+ "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
78
+ className
79
+ ),
80
+ ...props
81
+ }
82
+ );
83
+ }
84
+ function AlertDialogTitle({
85
+ className,
86
+ ...props
87
+ }) {
88
+ return /* @__PURE__ */ jsx(
89
+ AlertDialogPrimitive.Title,
90
+ {
91
+ "data-slot": "alert-dialog-title",
92
+ className: cn("text-lg font-semibold", className),
93
+ ...props
94
+ }
95
+ );
96
+ }
97
+ function AlertDialogDescription({
98
+ className,
99
+ ...props
100
+ }) {
101
+ return /* @__PURE__ */ jsx(
102
+ AlertDialogPrimitive.Description,
103
+ {
104
+ "data-slot": "alert-dialog-description",
105
+ className: cn("text-muted-foreground text-sm", className),
106
+ ...props
107
+ }
108
+ );
109
+ }
110
+ function AlertDialogAction({
111
+ className,
112
+ ...props
113
+ }) {
114
+ return /* @__PURE__ */ jsx(
115
+ AlertDialogPrimitive.Action,
116
+ {
117
+ className: cn(buttonVariants(), className),
118
+ ...props
119
+ }
120
+ );
121
+ }
122
+ function AlertDialogCancel({
123
+ className,
124
+ ...props
125
+ }) {
126
+ return /* @__PURE__ */ jsx(
127
+ AlertDialogPrimitive.Cancel,
128
+ {
129
+ className: cn(buttonVariants({ variant: "outline" }), className),
130
+ ...props
131
+ }
132
+ );
133
+ }
134
+ export {
135
+ AlertDialog,
136
+ AlertDialogAction,
137
+ AlertDialogCancel,
138
+ AlertDialogContent,
139
+ AlertDialogDescription,
140
+ AlertDialogFooter,
141
+ AlertDialogHeader,
142
+ AlertDialogOverlay,
143
+ AlertDialogPortal,
144
+ AlertDialogTitle,
145
+ AlertDialogTrigger
146
+ };
@@ -1,7 +1,7 @@
1
- import { jsx as a } from "react/jsx-runtime";
2
- import { cva as i } from "class-variance-authority";
3
- import { c as e } from "./utils-B7J70Nno.js";
4
- const l = i(
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { cva } from "class-variance-authority";
3
+ import { c as cn } from "./utils-CzDCF-Ah.js";
4
+ const alertVariants = cva(
5
5
  "relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",
6
6
  {
7
7
  variants: {
@@ -15,52 +15,52 @@ const l = i(
15
15
  }
16
16
  }
17
17
  );
18
- function o({
19
- className: t,
20
- variant: r,
21
- ...s
18
+ function Alert({
19
+ className,
20
+ variant,
21
+ ...props
22
22
  }) {
23
- return /* @__PURE__ */ a(
23
+ return /* @__PURE__ */ jsx(
24
24
  "div",
25
25
  {
26
26
  "data-slot": "alert",
27
27
  role: "alert",
28
- className: e(l({ variant: r }), t),
29
- ...s
28
+ className: cn(alertVariants({ variant }), className),
29
+ ...props
30
30
  }
31
31
  );
32
32
  }
33
- function g({ className: t, ...r }) {
34
- return /* @__PURE__ */ a(
33
+ function AlertTitle({ className, ...props }) {
34
+ return /* @__PURE__ */ jsx(
35
35
  "div",
36
36
  {
37
37
  "data-slot": "alert-title",
38
- className: e(
38
+ className: cn(
39
39
  "col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",
40
- t
40
+ className
41
41
  ),
42
- ...r
42
+ ...props
43
43
  }
44
44
  );
45
45
  }
46
- function u({
47
- className: t,
48
- ...r
46
+ function AlertDescription({
47
+ className,
48
+ ...props
49
49
  }) {
50
- return /* @__PURE__ */ a(
50
+ return /* @__PURE__ */ jsx(
51
51
  "div",
52
52
  {
53
53
  "data-slot": "alert-description",
54
- className: e(
54
+ className: cn(
55
55
  "text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",
56
- t
56
+ className
57
57
  ),
58
- ...r
58
+ ...props
59
59
  }
60
60
  );
61
61
  }
62
62
  export {
63
- o as Alert,
64
- u as AlertDescription,
65
- g as AlertTitle
63
+ Alert,
64
+ AlertDescription,
65
+ AlertTitle
66
66
  };
@@ -0,0 +1,10 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import * as AspectRatioPrimitive from "@radix-ui/react-aspect-ratio";
3
+ function AspectRatio({
4
+ ...props
5
+ }) {
6
+ return /* @__PURE__ */ jsx(AspectRatioPrimitive.Root, { "data-slot": "aspect-ratio", ...props });
7
+ }
8
+ export {
9
+ AspectRatio
10
+ };
package/dist/avatar.js ADDED
@@ -0,0 +1,53 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import * as AvatarPrimitive from "@radix-ui/react-avatar";
3
+ import { c as cn } from "./utils-CzDCF-Ah.js";
4
+ function Avatar({
5
+ className,
6
+ ...props
7
+ }) {
8
+ return /* @__PURE__ */ jsx(
9
+ AvatarPrimitive.Root,
10
+ {
11
+ "data-slot": "avatar",
12
+ className: cn(
13
+ "relative flex size-8 shrink-0 overflow-hidden rounded-full",
14
+ className
15
+ ),
16
+ ...props
17
+ }
18
+ );
19
+ }
20
+ function AvatarImage({
21
+ className,
22
+ ...props
23
+ }) {
24
+ return /* @__PURE__ */ jsx(
25
+ AvatarPrimitive.Image,
26
+ {
27
+ "data-slot": "avatar-image",
28
+ className: cn("aspect-square size-full", className),
29
+ ...props
30
+ }
31
+ );
32
+ }
33
+ function AvatarFallback({
34
+ className,
35
+ ...props
36
+ }) {
37
+ return /* @__PURE__ */ jsx(
38
+ AvatarPrimitive.Fallback,
39
+ {
40
+ "data-slot": "avatar-fallback",
41
+ className: cn(
42
+ "bg-muted flex size-full items-center justify-center rounded-full",
43
+ className
44
+ ),
45
+ ...props
46
+ }
47
+ );
48
+ }
49
+ export {
50
+ Avatar,
51
+ AvatarFallback,
52
+ AvatarImage
53
+ };
@@ -1,8 +1,8 @@
1
- import { jsx as a } from "react/jsx-runtime";
2
- import { Slot as o } from "@radix-ui/react-slot";
3
- import { cva as n } from "class-variance-authority";
4
- import { c as s } from "./utils-B7J70Nno.js";
5
- const d = n(
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { Slot } from "@radix-ui/react-slot";
3
+ import { cva } from "class-variance-authority";
4
+ import { c as cn } from "./utils-CzDCF-Ah.js";
5
+ const badgeVariants = cva(
6
6
  "inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",
7
7
  {
8
8
  variants: {
@@ -18,22 +18,23 @@ const d = n(
18
18
  }
19
19
  }
20
20
  );
21
- function b({
22
- className: r,
23
- variant: e,
24
- asChild: t = !1,
25
- ...i
21
+ function Badge({
22
+ className,
23
+ variant,
24
+ asChild = false,
25
+ ...props
26
26
  }) {
27
- return /* @__PURE__ */ a(
28
- t ? o : "span",
27
+ const Comp = asChild ? Slot : "span";
28
+ return /* @__PURE__ */ jsx(
29
+ Comp,
29
30
  {
30
31
  "data-slot": "badge",
31
- className: s(d({ variant: e }), r),
32
- ...i
32
+ className: cn(badgeVariants({ variant }), className),
33
+ ...props
33
34
  }
34
35
  );
35
36
  }
36
37
  export {
37
- b as Badge,
38
- d as badgeVariants
38
+ Badge,
39
+ badgeVariants
39
40
  };
@@ -0,0 +1,103 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { Slot } from "@radix-ui/react-slot";
3
+ import { MoreHorizontal, ChevronRight } from "lucide-react";
4
+ import { c as cn } from "./utils-CzDCF-Ah.js";
5
+ function Breadcrumb({ ...props }) {
6
+ return /* @__PURE__ */ jsx("nav", { "aria-label": "breadcrumb", "data-slot": "breadcrumb", ...props });
7
+ }
8
+ function BreadcrumbList({ className, ...props }) {
9
+ return /* @__PURE__ */ jsx(
10
+ "ol",
11
+ {
12
+ "data-slot": "breadcrumb-list",
13
+ className: cn(
14
+ "text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5",
15
+ className
16
+ ),
17
+ ...props
18
+ }
19
+ );
20
+ }
21
+ function BreadcrumbItem({ className, ...props }) {
22
+ return /* @__PURE__ */ jsx(
23
+ "li",
24
+ {
25
+ "data-slot": "breadcrumb-item",
26
+ className: cn("inline-flex items-center gap-1.5", className),
27
+ ...props
28
+ }
29
+ );
30
+ }
31
+ function BreadcrumbLink({
32
+ asChild,
33
+ className,
34
+ ...props
35
+ }) {
36
+ const Comp = asChild ? Slot : "a";
37
+ return /* @__PURE__ */ jsx(
38
+ Comp,
39
+ {
40
+ "data-slot": "breadcrumb-link",
41
+ className: cn("hover:text-foreground transition-colors", className),
42
+ ...props
43
+ }
44
+ );
45
+ }
46
+ function BreadcrumbPage({ className, ...props }) {
47
+ return /* @__PURE__ */ jsx(
48
+ "span",
49
+ {
50
+ "data-slot": "breadcrumb-page",
51
+ role: "link",
52
+ "aria-disabled": "true",
53
+ "aria-current": "page",
54
+ className: cn("text-foreground font-normal", className),
55
+ ...props
56
+ }
57
+ );
58
+ }
59
+ function BreadcrumbSeparator({
60
+ children,
61
+ className,
62
+ ...props
63
+ }) {
64
+ return /* @__PURE__ */ jsx(
65
+ "li",
66
+ {
67
+ "data-slot": "breadcrumb-separator",
68
+ role: "presentation",
69
+ "aria-hidden": "true",
70
+ className: cn("[&>svg]:size-3.5", className),
71
+ ...props,
72
+ children: children ?? /* @__PURE__ */ jsx(ChevronRight, {})
73
+ }
74
+ );
75
+ }
76
+ function BreadcrumbEllipsis({
77
+ className,
78
+ ...props
79
+ }) {
80
+ return /* @__PURE__ */ jsxs(
81
+ "span",
82
+ {
83
+ "data-slot": "breadcrumb-ellipsis",
84
+ role: "presentation",
85
+ "aria-hidden": "true",
86
+ className: cn("flex size-9 items-center justify-center", className),
87
+ ...props,
88
+ children: [
89
+ /* @__PURE__ */ jsx(MoreHorizontal, { className: "size-4" }),
90
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "More" })
91
+ ]
92
+ }
93
+ );
94
+ }
95
+ export {
96
+ Breadcrumb,
97
+ BreadcrumbEllipsis,
98
+ BreadcrumbItem,
99
+ BreadcrumbLink,
100
+ BreadcrumbList,
101
+ BreadcrumbPage,
102
+ BreadcrumbSeparator
103
+ };
@@ -1,8 +1,8 @@
1
- import { jsx as o } from "react/jsx-runtime";
2
- import { Slot as s } from "@radix-ui/react-slot";
3
- import { cva as a } from "class-variance-authority";
4
- import { c as d } from "./utils-B7J70Nno.js";
5
- const c = a(
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { Slot } from "@radix-ui/react-slot";
3
+ import { cva } from "class-variance-authority";
4
+ import { c as cn } from "./utils-CzDCF-Ah.js";
5
+ const buttonVariants = cva(
6
6
  "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
7
7
  {
8
8
  variants: {
@@ -27,23 +27,24 @@ const c = a(
27
27
  }
28
28
  }
29
29
  );
30
- function b({
31
- className: e,
32
- variant: r,
33
- size: t,
34
- asChild: i = !1,
35
- ...n
30
+ function Button({
31
+ className,
32
+ variant,
33
+ size,
34
+ asChild = false,
35
+ ...props
36
36
  }) {
37
- return /* @__PURE__ */ o(
38
- i ? s : "button",
37
+ const Comp = asChild ? Slot : "button";
38
+ return /* @__PURE__ */ jsx(
39
+ Comp,
39
40
  {
40
41
  "data-slot": "button",
41
- className: d(c({ variant: r, size: t, className: e })),
42
- ...n
42
+ className: cn(buttonVariants({ variant, size, className })),
43
+ ...props
43
44
  }
44
45
  );
45
46
  }
46
47
  export {
47
- b as Button,
48
- c as buttonVariants
48
+ Button,
49
+ buttonVariants
49
50
  };