@turingpaper/ui 0.0.13 → 0.0.14

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.
@@ -1,46 +1,34 @@
1
- import { jsx as t, jsxs as c } from "react/jsx-runtime";
2
- import * as i from "react";
3
- import { Accordion as o } from "radix-ui";
4
- import { ChevronDown as d } from "lucide-react";
5
- import { cn as s } from "./utils.mjs";
6
- const g = o.Root, m = i.forwardRef(({ className: e, ...a }, r) => /* @__PURE__ */ t(
7
- o.Item,
8
- {
9
- ref: r,
10
- className: s("border-b", e),
11
- ...a
12
- }
13
- ));
14
- m.displayName = "AccordionItem";
15
- const l = i.forwardRef(({ className: e, children: a, ...r }, n) => /* @__PURE__ */ t(o.Header, { className: "flex", children: /* @__PURE__ */ c(
16
- o.Trigger,
17
- {
18
- ref: n,
19
- className: s(
20
- "flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",
21
- e
22
- ),
23
- ...r,
24
- children: [
25
- a,
26
- /* @__PURE__ */ t(d, { className: "h-4 w-4 shrink-0 transition-transform duration-200" })
27
- ]
28
- }
29
- ) }));
30
- l.displayName = o.Trigger.displayName;
31
- const f = i.forwardRef(({ className: e, children: a, ...r }, n) => /* @__PURE__ */ t(
32
- o.Content,
33
- {
34
- ref: n,
35
- className: "overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",
36
- ...r,
37
- children: /* @__PURE__ */ t("div", { className: s("pb-4 pt-0", e), children: a })
38
- }
39
- ));
40
- f.displayName = o.Content.displayName;
41
- export {
42
- g as Accordion,
43
- f as AccordionContent,
44
- m as AccordionItem,
45
- l as AccordionTrigger
46
- };
1
+ import { cn as e } from "./utils.mjs";
2
+ import * as t from "react";
3
+ import { jsx as n, jsxs as r } from "react/jsx-runtime";
4
+ import { Accordion as i } from "radix-ui";
5
+ import { ChevronDown as a } from "lucide-react";
6
+ //#region src/components/accordion.tsx
7
+ var o = i.Root, s = t.forwardRef(({ className: t, ...r }, a) => /* @__PURE__ */ n(i.Item, {
8
+ ref: a,
9
+ className: e("border-b", t),
10
+ ...r
11
+ }));
12
+ s.displayName = "AccordionItem";
13
+ var c = t.forwardRef(({ className: t, children: o, ...s }, c) => /* @__PURE__ */ n(i.Header, {
14
+ className: "flex",
15
+ children: /* @__PURE__ */ r(i.Trigger, {
16
+ ref: c,
17
+ className: e("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180", t),
18
+ ...s,
19
+ children: [o, /* @__PURE__ */ n(a, { className: "h-4 w-4 shrink-0 transition-transform duration-200" })]
20
+ })
21
+ }));
22
+ c.displayName = i.Trigger.displayName;
23
+ var l = t.forwardRef(({ className: t, children: r, ...a }, o) => /* @__PURE__ */ n(i.Content, {
24
+ ref: o,
25
+ className: "overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",
26
+ ...a,
27
+ children: /* @__PURE__ */ n("div", {
28
+ className: e("pb-4 pt-0", t),
29
+ children: r
30
+ })
31
+ }));
32
+ l.displayName = i.Content.displayName;
33
+ //#endregion
34
+ export { o as Accordion, l as AccordionContent, s as AccordionItem, c as AccordionTrigger };
@@ -1,113 +1,54 @@
1
- import { jsx as l, jsxs as n } from "react/jsx-runtime";
2
- import * as i from "react";
3
- import { AlertDialog as t } from "radix-ui";
4
- import { cn as s } from "./utils.mjs";
5
- import { buttonVariants as r } from "./button.mjs";
6
- const R = t.Root, b = t.Trigger, m = t.Portal, d = i.forwardRef(({ className: a, ...e }, o) => /* @__PURE__ */ l(
7
- t.Overlay,
8
- {
9
- className: s(
10
- "fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
11
- a
12
- ),
13
- ...e,
14
- ref: o
15
- }
16
- ));
17
- d.displayName = t.Overlay.displayName;
18
- const c = i.forwardRef(({ className: a, ...e }, o) => /* @__PURE__ */ n(m, { children: [
19
- /* @__PURE__ */ l(d, {}),
20
- /* @__PURE__ */ l(
21
- t.Content,
22
- {
23
- ref: o,
24
- className: s(
25
- "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
26
- a
27
- ),
28
- ...e
29
- }
30
- )
31
- ] }));
32
- c.displayName = t.Content.displayName;
33
- const f = ({
34
- className: a,
35
- ...e
36
- }) => /* @__PURE__ */ l(
37
- "div",
38
- {
39
- className: s(
40
- "flex flex-col space-y-2 text-center sm:text-left",
41
- a
42
- ),
43
- ...e
44
- }
45
- );
46
- f.displayName = "AlertDialogHeader";
47
- const p = ({
48
- className: a,
49
- ...e
50
- }) => /* @__PURE__ */ l(
51
- "div",
52
- {
53
- className: s(
54
- "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
55
- a
56
- ),
57
- ...e
58
- }
59
- );
60
- p.displayName = "AlertDialogFooter";
61
- const g = i.forwardRef(({ className: a, ...e }, o) => /* @__PURE__ */ l(
62
- t.Title,
63
- {
64
- ref: o,
65
- className: s("text-lg font-semibold", a),
66
- ...e
67
- }
68
- ));
69
- g.displayName = t.Title.displayName;
70
- const N = i.forwardRef(({ className: a, ...e }, o) => /* @__PURE__ */ l(
71
- t.Description,
72
- {
73
- ref: o,
74
- className: s("text-sm text-muted-foreground", a),
75
- ...e
76
- }
77
- ));
78
- N.displayName = t.Description.displayName;
79
- const y = i.forwardRef(({ className: a, ...e }, o) => /* @__PURE__ */ l(
80
- t.Action,
81
- {
82
- ref: o,
83
- className: s(r(), a),
84
- ...e
85
- }
86
- ));
87
- y.displayName = t.Action.displayName;
88
- const x = i.forwardRef(({ className: a, ...e }, o) => /* @__PURE__ */ l(
89
- t.Cancel,
90
- {
91
- ref: o,
92
- className: s(
93
- r({ variant: "outline" }),
94
- "mt-2 sm:mt-0",
95
- a
96
- ),
97
- ...e
98
- }
99
- ));
100
- x.displayName = t.Cancel.displayName;
101
- export {
102
- R as AlertDialog,
103
- y as AlertDialogAction,
104
- x as AlertDialogCancel,
105
- c as AlertDialogContent,
106
- N as AlertDialogDescription,
107
- p as AlertDialogFooter,
108
- f as AlertDialogHeader,
109
- d as AlertDialogOverlay,
110
- m as AlertDialogPortal,
111
- g as AlertDialogTitle,
112
- b as AlertDialogTrigger
113
- };
1
+ import { cn as e } from "./utils.mjs";
2
+ import { buttonVariants as t } from "./button.mjs";
3
+ import * as n from "react";
4
+ import { jsx as r, jsxs as i } from "react/jsx-runtime";
5
+ import { AlertDialog as a } from "radix-ui";
6
+ //#region src/components/alert-dialog.tsx
7
+ var o = a.Root, s = a.Trigger, c = a.Portal, l = n.forwardRef(({ className: t, ...n }, i) => /* @__PURE__ */ r(a.Overlay, {
8
+ className: e("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", t),
9
+ ...n,
10
+ ref: i
11
+ }));
12
+ l.displayName = a.Overlay.displayName;
13
+ var u = n.forwardRef(({ className: t, ...n }, o) => /* @__PURE__ */ i(c, { children: [/* @__PURE__ */ r(l, {}), /* @__PURE__ */ r(a.Content, {
14
+ ref: o,
15
+ className: e("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg", t),
16
+ ...n
17
+ })] }));
18
+ u.displayName = a.Content.displayName;
19
+ var d = ({ className: t, ...n }) => /* @__PURE__ */ r("div", {
20
+ className: e("flex flex-col space-y-2 text-center sm:text-left", t),
21
+ ...n
22
+ });
23
+ d.displayName = "AlertDialogHeader";
24
+ var f = ({ className: t, ...n }) => /* @__PURE__ */ r("div", {
25
+ className: e("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", t),
26
+ ...n
27
+ });
28
+ f.displayName = "AlertDialogFooter";
29
+ var p = n.forwardRef(({ className: t, ...n }, i) => /* @__PURE__ */ r(a.Title, {
30
+ ref: i,
31
+ className: e("text-lg font-semibold", t),
32
+ ...n
33
+ }));
34
+ p.displayName = a.Title.displayName;
35
+ var m = n.forwardRef(({ className: t, ...n }, i) => /* @__PURE__ */ r(a.Description, {
36
+ ref: i,
37
+ className: e("text-sm text-muted-foreground", t),
38
+ ...n
39
+ }));
40
+ m.displayName = a.Description.displayName;
41
+ var h = n.forwardRef(({ className: n, ...i }, o) => /* @__PURE__ */ r(a.Action, {
42
+ ref: o,
43
+ className: e(t(), n),
44
+ ...i
45
+ }));
46
+ h.displayName = a.Action.displayName;
47
+ var g = n.forwardRef(({ className: n, ...i }, o) => /* @__PURE__ */ r(a.Cancel, {
48
+ ref: o,
49
+ className: e(t({ variant: "outline" }), "mt-2 sm:mt-0", n),
50
+ ...i
51
+ }));
52
+ g.displayName = a.Cancel.displayName;
53
+ //#endregion
54
+ export { o as AlertDialog, h as AlertDialogAction, g as AlertDialogCancel, u as AlertDialogContent, m as AlertDialogDescription, f as AlertDialogFooter, d as AlertDialogHeader, l as AlertDialogOverlay, c as AlertDialogPortal, p as AlertDialogTitle, s as AlertDialogTrigger };
package/dist/avatar.mjs CHANGED
@@ -1,42 +1,26 @@
1
- import { jsx as o } from "react/jsx-runtime";
2
- import * as s from "react";
3
- import { Avatar as a } from "radix-ui";
4
- import { cn as t } from "./utils.mjs";
5
- const m = s.forwardRef(({ className: e, ...l }, r) => /* @__PURE__ */ o(
6
- a.Root,
7
- {
8
- ref: r,
9
- className: t(
10
- "relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",
11
- e
12
- ),
13
- ...l
14
- }
15
- ));
16
- m.displayName = a.Root.displayName;
17
- const f = s.forwardRef(({ className: e, ...l }, r) => /* @__PURE__ */ o(
18
- a.Image,
19
- {
20
- ref: r,
21
- className: t("aspect-square h-full w-full", e),
22
- ...l
23
- }
24
- ));
25
- f.displayName = a.Image.displayName;
26
- const d = s.forwardRef(({ className: e, ...l }, r) => /* @__PURE__ */ o(
27
- a.Fallback,
28
- {
29
- ref: r,
30
- className: t(
31
- "flex h-full w-full items-center justify-center rounded-full bg-muted",
32
- e
33
- ),
34
- ...l
35
- }
36
- ));
37
- d.displayName = a.Fallback.displayName;
38
- export {
39
- m as Avatar,
40
- d as AvatarFallback,
41
- f as AvatarImage
42
- };
1
+ "use client";
2
+ import { cn as e } from "./utils.mjs";
3
+ import * as t from "react";
4
+ import { jsx as n } from "react/jsx-runtime";
5
+ import { Avatar as r } from "radix-ui";
6
+ //#region src/components/avatar.tsx
7
+ var i = t.forwardRef(({ className: t, ...i }, a) => /* @__PURE__ */ n(r.Root, {
8
+ ref: a,
9
+ className: e("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full", t),
10
+ ...i
11
+ }));
12
+ i.displayName = r.Root.displayName;
13
+ var a = t.forwardRef(({ className: t, ...i }, a) => /* @__PURE__ */ n(r.Image, {
14
+ ref: a,
15
+ className: e("aspect-square h-full w-full", t),
16
+ ...i
17
+ }));
18
+ a.displayName = r.Image.displayName;
19
+ var o = t.forwardRef(({ className: t, ...i }, a) => /* @__PURE__ */ n(r.Fallback, {
20
+ ref: a,
21
+ className: e("flex h-full w-full items-center justify-center rounded-full bg-muted", t),
22
+ ...i
23
+ }));
24
+ o.displayName = r.Fallback.displayName;
25
+ //#endregion
26
+ export { i as Avatar, o as AvatarFallback, a as AvatarImage };
package/dist/badge.mjs CHANGED
@@ -1,26 +1,22 @@
1
- import { jsx as n } from "react/jsx-runtime";
2
- import { cva as o } from "class-variance-authority";
3
- import { cn as i } from "./utils.mjs";
4
- const a = o(
5
- "inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus-visible:outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50",
6
- {
7
- variants: {
8
- variant: {
9
- default: "border-transparent bg-primary text-primary-foreground",
10
- secondary: "border-transparent bg-secondary text-secondary-foreground",
11
- destructive: "border-transparent bg-destructive text-destructive-foreground",
12
- outline: "text-foreground"
13
- }
14
- },
15
- defaultVariants: {
16
- variant: "default"
17
- }
18
- }
19
- );
20
- function f({ className: r, variant: e, ...t }) {
21
- return /* @__PURE__ */ n("div", { className: i(a({ variant: e }), r), ...t });
1
+ import { cn as e } from "./utils.mjs";
2
+ import "react";
3
+ import { jsx as t } from "react/jsx-runtime";
4
+ import { cva as n } from "class-variance-authority";
5
+ //#region src/components/badge.tsx
6
+ var r = n("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus-visible:outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50", {
7
+ variants: { variant: {
8
+ default: "border-transparent bg-primary text-primary-foreground",
9
+ secondary: "border-transparent bg-secondary text-secondary-foreground",
10
+ destructive: "border-transparent bg-destructive text-destructive-foreground",
11
+ outline: "text-foreground"
12
+ } },
13
+ defaultVariants: { variant: "default" }
14
+ });
15
+ function i({ className: n, variant: i, ...a }) {
16
+ return /* @__PURE__ */ t("div", {
17
+ className: e(r({ variant: i }), n),
18
+ ...a
19
+ });
22
20
  }
23
- export {
24
- f as Badge,
25
- a as badgeVariants
26
- };
21
+ //#endregion
22
+ export { i as Badge, r as badgeVariants };
@@ -1,93 +1,60 @@
1
- import { jsx as s, jsxs as n } from "react/jsx-runtime";
1
+ import { cn as e } from "./utils.mjs";
2
2
  import * as t from "react";
3
- import { Slot as c } from "radix-ui";
4
- import { MoreHorizontal as d, ChevronRight as l } from "lucide-react";
5
- import { cn as o } from "./utils.mjs";
6
- const p = t.forwardRef(({ ...r }, e) => /* @__PURE__ */ s("nav", { ref: e, "aria-label": "breadcrumb", ...r }));
7
- p.displayName = "Breadcrumb";
8
- const u = t.forwardRef(({ className: r, ...e }, a) => /* @__PURE__ */ s(
9
- "ol",
10
- {
11
- ref: a,
12
- className: o(
13
- "flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5",
14
- r
15
- ),
16
- ...e
17
- }
18
- ));
19
- u.displayName = "BreadcrumbList";
20
- const f = t.forwardRef(({ className: r, ...e }, a) => /* @__PURE__ */ s(
21
- "li",
22
- {
23
- ref: a,
24
- className: o("inline-flex items-center gap-1.5", r),
25
- ...e
26
- }
27
- ));
28
- f.displayName = "BreadcrumbItem";
29
- const b = t.forwardRef(({ asChild: r, className: e, ...a }, m) => {
30
- const i = r ? c.Root : "a";
31
- return /* @__PURE__ */ s(
32
- i,
33
- {
34
- ref: m,
35
- className: o("transition-colors hover:text-foreground", e),
36
- ...a
37
- }
38
- );
3
+ import { jsx as n, jsxs as r } from "react/jsx-runtime";
4
+ import { Slot as i } from "radix-ui";
5
+ import { ChevronRight as a, MoreHorizontal as o } from "lucide-react";
6
+ //#region src/components/breadcrumb.tsx
7
+ var s = t.forwardRef(({ ...e }, t) => /* @__PURE__ */ n("nav", {
8
+ ref: t,
9
+ "aria-label": "breadcrumb",
10
+ ...e
11
+ }));
12
+ s.displayName = "Breadcrumb";
13
+ var c = t.forwardRef(({ className: t, ...r }, i) => /* @__PURE__ */ n("ol", {
14
+ ref: i,
15
+ className: e("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5", t),
16
+ ...r
17
+ }));
18
+ c.displayName = "BreadcrumbList";
19
+ var l = t.forwardRef(({ className: t, ...r }, i) => /* @__PURE__ */ n("li", {
20
+ ref: i,
21
+ className: e("inline-flex items-center gap-1.5", t),
22
+ ...r
23
+ }));
24
+ l.displayName = "BreadcrumbItem";
25
+ var u = t.forwardRef(({ asChild: t, className: r, ...a }, o) => /* @__PURE__ */ n(t ? i.Root : "a", {
26
+ ref: o,
27
+ className: e("transition-colors hover:text-foreground", r),
28
+ ...a
29
+ }));
30
+ u.displayName = "BreadcrumbLink";
31
+ var d = t.forwardRef(({ className: t, ...r }, i) => /* @__PURE__ */ n("span", {
32
+ ref: i,
33
+ role: "link",
34
+ "aria-disabled": "true",
35
+ "aria-current": "page",
36
+ className: e("font-normal text-foreground", t),
37
+ ...r
38
+ }));
39
+ d.displayName = "BreadcrumbPage";
40
+ var f = ({ children: t, className: r, ...i }) => /* @__PURE__ */ n("li", {
41
+ role: "presentation",
42
+ "aria-hidden": "true",
43
+ className: e("[&>svg]:w-3.5 [&>svg]:h-3.5", r),
44
+ ...i,
45
+ children: t ?? /* @__PURE__ */ n(a, {})
39
46
  });
40
- b.displayName = "BreadcrumbLink";
41
- const N = t.forwardRef(({ className: r, ...e }, a) => /* @__PURE__ */ s(
42
- "span",
43
- {
44
- ref: a,
45
- role: "link",
46
- "aria-disabled": "true",
47
- "aria-current": "page",
48
- className: o("font-normal text-foreground", r),
49
- ...e
50
- }
51
- ));
52
- N.displayName = "BreadcrumbPage";
53
- const B = ({
54
- children: r,
55
- className: e,
56
- ...a
57
- }) => /* @__PURE__ */ s(
58
- "li",
59
- {
60
- role: "presentation",
61
- "aria-hidden": "true",
62
- className: o("[&>svg]:w-3.5 [&>svg]:h-3.5", e),
63
- ...a,
64
- children: r ?? /* @__PURE__ */ s(l, {})
65
- }
66
- );
67
- B.displayName = "BreadcrumbSeparator";
68
- const g = ({
69
- className: r,
70
- ...e
71
- }) => /* @__PURE__ */ n(
72
- "span",
73
- {
74
- role: "presentation",
75
- "aria-hidden": "true",
76
- className: o("flex h-9 w-9 items-center justify-center", r),
77
- ...e,
78
- children: [
79
- /* @__PURE__ */ s(d, { className: "h-4 w-4" }),
80
- /* @__PURE__ */ s("span", { className: "sr-only", children: "More" })
81
- ]
82
- }
83
- );
84
- g.displayName = "BreadcrumbElipssis";
85
- export {
86
- p as Breadcrumb,
87
- g as BreadcrumbEllipsis,
88
- f as BreadcrumbItem,
89
- b as BreadcrumbLink,
90
- u as BreadcrumbList,
91
- N as BreadcrumbPage,
92
- B as BreadcrumbSeparator
93
- };
47
+ f.displayName = "BreadcrumbSeparator";
48
+ var p = ({ className: t, ...i }) => /* @__PURE__ */ r("span", {
49
+ role: "presentation",
50
+ "aria-hidden": "true",
51
+ className: e("flex h-9 w-9 items-center justify-center", t),
52
+ ...i,
53
+ children: [/* @__PURE__ */ n(o, { className: "h-4 w-4" }), /* @__PURE__ */ n("span", {
54
+ className: "sr-only",
55
+ children: "More"
56
+ })]
57
+ });
58
+ p.displayName = "BreadcrumbElipssis";
59
+ //#endregion
60
+ export { s as Breadcrumb, p as BreadcrumbEllipsis, l as BreadcrumbItem, u as BreadcrumbLink, c as BreadcrumbList, d as BreadcrumbPage, f as BreadcrumbSeparator };
package/dist/button.mjs CHANGED
@@ -1,48 +1,40 @@
1
- import { jsx as d } from "react/jsx-runtime";
2
- import * as a from "react";
3
- import { Slot as u } from "radix-ui";
4
- import { cva as c } from "class-variance-authority";
5
- import { cn as f } from "./utils.mjs";
6
- const m = c(
7
- "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
8
- {
9
- variants: {
10
- variant: {
11
- default: "bg-primary text-primary-foreground hover:bg-primary/90",
12
- destructive: "bg-destructive text-destructive-foreground hover:bg-destructive-foreground/30",
13
- outline: "border border-input bg-background hover:bg-muted hover:text-foreground",
14
- secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
15
- ghost: "hover:bg-accent hover:text-accent-foreground",
16
- link: "text-primary underline-offset-4 hover:underline"
17
- },
18
- size: {
19
- default: "h-10 px-4 py-2",
20
- xs: "h-8 rounded-md px-2.5 text-xs",
21
- sm: "h-9 rounded-md px-3",
22
- lg: "h-11 rounded-md px-8",
23
- icon: "h-10 w-10"
24
- }
25
- },
26
- defaultVariants: {
27
- variant: "default",
28
- size: "default"
29
- }
30
- }
31
- ), g = a.forwardRef(
32
- ({ className: e, variant: r, size: t, asChild: o = !1, ...n }, i) => {
33
- const s = o ? u.Root : "button";
34
- return /* @__PURE__ */ d(
35
- s,
36
- {
37
- className: f(m({ variant: r, size: t, className: e })),
38
- ref: i,
39
- ...n
40
- }
41
- );
42
- }
43
- );
44
- g.displayName = "Button";
45
- export {
46
- g as Button,
47
- m as buttonVariants
48
- };
1
+ import { cn as e } from "./utils.mjs";
2
+ import * as t from "react";
3
+ import { jsx as n } from "react/jsx-runtime";
4
+ import { Slot as r } from "radix-ui";
5
+ import { cva as i } from "class-variance-authority";
6
+ //#region src/components/button.tsx
7
+ var a = i("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", {
8
+ variants: {
9
+ variant: {
10
+ default: "bg-primary text-primary-foreground hover:bg-primary/90",
11
+ destructive: "bg-destructive text-destructive-foreground hover:bg-destructive-foreground/30",
12
+ outline: "border border-input bg-background hover:bg-muted hover:text-foreground",
13
+ secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
14
+ ghost: "hover:bg-accent hover:text-accent-foreground",
15
+ link: "text-primary underline-offset-4 hover:underline"
16
+ },
17
+ size: {
18
+ default: "h-10 px-4 py-2",
19
+ xs: "h-8 rounded-md px-2.5 text-xs",
20
+ sm: "h-9 rounded-md px-3",
21
+ lg: "h-11 rounded-md px-8",
22
+ icon: "h-10 w-10"
23
+ }
24
+ },
25
+ defaultVariants: {
26
+ variant: "default",
27
+ size: "default"
28
+ }
29
+ }), o = t.forwardRef(({ className: t, variant: i, size: o, asChild: s = !1, ...c }, l) => /* @__PURE__ */ n(s ? r.Root : "button", {
30
+ className: e(a({
31
+ variant: i,
32
+ size: o,
33
+ className: t
34
+ })),
35
+ ref: l,
36
+ ...c
37
+ }));
38
+ o.displayName = "Button";
39
+ //#endregion
40
+ export { o as Button, a as buttonVariants };