fina-react-ds 1.0.40 → 1.0.43

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 (67) hide show
  1. package/dist/components/alert-dialog.js +1 -166
  2. package/dist/components/alert.js +1 -73
  3. package/dist/components/avatar.js +1 -58
  4. package/dist/components/badge.js +1 -44
  5. package/dist/components/button.js +1 -153
  6. package/dist/components/calendar.js +1 -205
  7. package/dist/components/card.js +1 -99
  8. package/dist/components/checkbox.js +1 -34
  9. package/dist/components/data-loader.js +1 -24
  10. package/dist/components/date-picker.js +1 -64
  11. package/dist/components/dialog.js +1 -145
  12. package/dist/components/dropdown-menu.js +1 -248
  13. package/dist/components/file-uploader.js +1 -108
  14. package/dist/components/form-color-picker.js +1 -29
  15. package/dist/components/form-date.js +1 -30
  16. package/dist/components/form-file-uploader.js +1 -32
  17. package/dist/components/form-image-uploader.js +1 -40
  18. package/dist/components/form-input.js +1 -35
  19. package/dist/components/form-select.js +1 -51
  20. package/dist/components/form-switch.js +1 -35
  21. package/dist/components/form-textarea.js +1 -35
  22. package/dist/components/form.js +1 -110
  23. package/dist/components/hover-card.js +1 -43
  24. package/dist/components/image-uploader.js +1 -130
  25. package/dist/components/index.js +1 -200
  26. package/dist/components/input.js +1 -26
  27. package/dist/components/label.js +1 -32
  28. package/dist/components/mode-toggle.js +1 -26
  29. package/dist/components/pagination.js +1 -128
  30. package/dist/components/password-rules-checker.js +1 -44
  31. package/dist/components/popover.js +1 -50
  32. package/dist/components/select.js +1 -53
  33. package/dist/components/separator.js +1 -29
  34. package/dist/components/sheet.js +1 -160
  35. package/dist/components/sidebar.js +1 -624
  36. package/dist/components/simple-pagination.js +1 -34
  37. package/dist/components/simple-tooltip.js +1 -17
  38. package/dist/components/skeleton.js +1 -18
  39. package/dist/components/sonner.js +1 -24
  40. package/dist/components/switch.js +1 -34
  41. package/dist/components/table.js +1 -124
  42. package/dist/components/tabs.js +1 -73
  43. package/dist/components/textarea.js +1 -23
  44. package/dist/components/tooltip.js +1 -61
  45. package/dist/hooks/index.js +1 -4
  46. package/dist/hooks/use-mobile.js +1 -17
  47. package/dist/lib/arrays.js +1 -7
  48. package/dist/lib/dates.js +1 -21
  49. package/dist/lib/http.js +1 -56
  50. package/dist/lib/index.js +1 -27
  51. package/dist/lib/strings.js +1 -6
  52. package/dist/lib/utils.js +2 -31
  53. package/dist/lib/yup.js +1 -88
  54. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildFormatLongFn.js +1 -12
  55. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +1 -21
  56. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildMatchFn.js +1 -36
  57. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js +1 -18
  58. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr/_lib/formatDistance.js +1 -72
  59. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr/_lib/formatLong.js +1 -33
  60. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr/_lib/formatRelative.js +1 -13
  61. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr/_lib/localize.js +1 -123
  62. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr/_lib/match.js +1 -112
  63. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr.js +1 -21
  64. package/dist/providers/loader-provider.js +1 -34
  65. package/dist/providers/theme-provider.js +1 -45
  66. package/package.json +15 -9
  67. package/dist/index.js +0 -225
@@ -1,166 +1 @@
1
- var s = Object.defineProperty;
2
- var e = (t, a) => s(t, "name", { value: a, configurable: !0 });
3
- import { jsx as o, jsxs as d } from "react/jsx-runtime";
4
- import { AlertDialog as l } from "radix-ui";
5
- import { cn as r } from "../lib/utils.js";
6
- import { buttonVariants as i } from "./button.js";
7
- function A({
8
- ...t
9
- }) {
10
- return /* @__PURE__ */ o(l.Root, { "data-slot": "alert-dialog", ...t });
11
- }
12
- e(A, "AlertDialog");
13
- function D({
14
- ...t
15
- }) {
16
- return /* @__PURE__ */ o(l.Trigger, { "data-slot": "alert-dialog-trigger", ...t });
17
- }
18
- e(D, "AlertDialogTrigger");
19
- function c({
20
- ...t
21
- }) {
22
- return /* @__PURE__ */ o(l.Portal, { "data-slot": "alert-dialog-portal", ...t });
23
- }
24
- e(c, "AlertDialogPortal");
25
- function g({
26
- className: t,
27
- ...a
28
- }) {
29
- return /* @__PURE__ */ o(
30
- l.Overlay,
31
- {
32
- "data-slot": "alert-dialog-overlay",
33
- className: r(
34
- "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",
35
- t
36
- ),
37
- ...a
38
- }
39
- );
40
- }
41
- e(g, "AlertDialogOverlay");
42
- function N({
43
- className: t,
44
- ...a
45
- }) {
46
- return /* @__PURE__ */ d(c, { children: [
47
- /* @__PURE__ */ o(g, {}),
48
- /* @__PURE__ */ o(
49
- l.Content,
50
- {
51
- "data-slot": "alert-dialog-content",
52
- className: r(
53
- "bg-card 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",
54
- t
55
- ),
56
- ...a
57
- }
58
- )
59
- ] });
60
- }
61
- e(N, "AlertDialogContent");
62
- function v({
63
- className: t,
64
- ...a
65
- }) {
66
- return /* @__PURE__ */ o(
67
- "div",
68
- {
69
- "data-slot": "alert-dialog-header",
70
- className: r(
71
- "flex flex-col gap-2 text-center sm:text-left",
72
- t
73
- ),
74
- ...a
75
- }
76
- );
77
- }
78
- e(v, "AlertDialogHeader");
79
- function b({
80
- className: t,
81
- ...a
82
- }) {
83
- return /* @__PURE__ */ o(
84
- "div",
85
- {
86
- "data-slot": "alert-dialog-footer",
87
- className: r(
88
- "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
89
- t
90
- ),
91
- ...a
92
- }
93
- );
94
- }
95
- e(b, "AlertDialogFooter");
96
- function y({
97
- className: t,
98
- ...a
99
- }) {
100
- return /* @__PURE__ */ o(
101
- l.Title,
102
- {
103
- "data-slot": "alert-dialog-title",
104
- className: r("text-lg font-semibold", t),
105
- ...a
106
- }
107
- );
108
- }
109
- e(y, "AlertDialogTitle");
110
- function w({
111
- className: t,
112
- ...a
113
- }) {
114
- return /* @__PURE__ */ o(
115
- l.Description,
116
- {
117
- "data-slot": "alert-dialog-description",
118
- className: r("text-muted text-sm", t),
119
- ...a
120
- }
121
- );
122
- }
123
- e(w, "AlertDialogDescription");
124
- function h({
125
- color: t = "primary",
126
- className: a,
127
- ...n
128
- }) {
129
- return /* @__PURE__ */ o(
130
- l.Action,
131
- {
132
- className: r(i({ color: t }), a),
133
- ...n
134
- }
135
- );
136
- }
137
- e(h, "AlertDialogAction");
138
- function z({
139
- className: t,
140
- ...a
141
- }) {
142
- return /* @__PURE__ */ o(
143
- l.Cancel,
144
- {
145
- className: r(
146
- i({ variant: "ghost", color: "dark" }),
147
- t
148
- ),
149
- ...a
150
- }
151
- );
152
- }
153
- e(z, "AlertDialogCancel");
154
- export {
155
- A as AlertDialog,
156
- h as AlertDialogAction,
157
- z as AlertDialogCancel,
158
- N as AlertDialogContent,
159
- w as AlertDialogDescription,
160
- b as AlertDialogFooter,
161
- v as AlertDialogHeader,
162
- g as AlertDialogOverlay,
163
- c as AlertDialogPortal,
164
- y as AlertDialogTitle,
165
- D as AlertDialogTrigger
166
- };
1
+ var s=Object.defineProperty;var e=(t,a)=>s(t,"name",{value:a,configurable:!0});import{jsx as o,jsxs as d}from"react/jsx-runtime";import{AlertDialog as l}from"radix-ui";import{cn as r}from"../lib/utils.js";import{buttonVariants as i}from"./button.js";function A({...t}){return o(l.Root,{"data-slot":"alert-dialog",...t})}e(A,"AlertDialog");function D({...t}){return o(l.Trigger,{"data-slot":"alert-dialog-trigger",...t})}e(D,"AlertDialogTrigger");function c({...t}){return o(l.Portal,{"data-slot":"alert-dialog-portal",...t})}e(c,"AlertDialogPortal");function g({className:t,...a}){return o(l.Overlay,{"data-slot":"alert-dialog-overlay",className:r("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",t),...a})}e(g,"AlertDialogOverlay");function N({className:t,...a}){return d(c,{children:[o(g,{}),o(l.Content,{"data-slot":"alert-dialog-content",className:r("bg-card 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",t),...a})]})}e(N,"AlertDialogContent");function v({className:t,...a}){return o("div",{"data-slot":"alert-dialog-header",className:r("flex flex-col gap-2 text-center sm:text-left",t),...a})}e(v,"AlertDialogHeader");function b({className:t,...a}){return o("div",{"data-slot":"alert-dialog-footer",className:r("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),...a})}e(b,"AlertDialogFooter");function y({className:t,...a}){return o(l.Title,{"data-slot":"alert-dialog-title",className:r("text-lg font-semibold",t),...a})}e(y,"AlertDialogTitle");function w({className:t,...a}){return o(l.Description,{"data-slot":"alert-dialog-description",className:r("text-muted text-sm",t),...a})}e(w,"AlertDialogDescription");function h({color:t="primary",className:a,...n}){return o(l.Action,{className:r(i({color:t}),a),...n})}e(h,"AlertDialogAction");function z({className:t,...a}){return o(l.Cancel,{className:r(i({variant:"ghost",color:"dark"}),t),...a})}e(z,"AlertDialogCancel");export{A as AlertDialog,h as AlertDialogAction,z as AlertDialogCancel,N as AlertDialogContent,w as AlertDialogDescription,b as AlertDialogFooter,v as AlertDialogHeader,g as AlertDialogOverlay,c as AlertDialogPortal,y as AlertDialogTitle,D as AlertDialogTrigger};
@@ -1,73 +1 @@
1
- var g = Object.defineProperty;
2
- var e = (t, r) => g(t, "name", { value: r, configurable: !0 });
3
- import { jsx as i } from "react/jsx-runtime";
4
- import { cva as n } from "class-variance-authority";
5
- import { cn as o } from "../lib/utils.js";
6
- const a = n(
7
- "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",
8
- {
9
- variants: {
10
- variant: {
11
- info: "bg-info-light *:data-[slot=alert-description]:text-info-light-foreground text-info-light-foreground border-info-light-foreground/20 [&>svg]:text-info-light-foreground",
12
- warning: "bg-warning-light text-warning-light-foreground border-warning-light-foreground/20 [&>svg]:text-warning-light-foreground",
13
- success: "bg-success-light text-success-light-foreground border-success-light-foreground/20 [&>svg]:text-success-light-foreground",
14
- destructive: "bg-destructive-light text-destructive-light-foreground border-destructive-light-foreground/20 [&>svg]:text-destructive-light-foreground"
15
- }
16
- },
17
- defaultVariants: {
18
- variant: "info"
19
- }
20
- }
21
- );
22
- function f({
23
- variant: t,
24
- className: r,
25
- ...s
26
- }) {
27
- return /* @__PURE__ */ i(
28
- "div",
29
- {
30
- "data-slot": "alert",
31
- role: "alert",
32
- className: o(a({ variant: t }), r),
33
- ...s
34
- }
35
- );
36
- }
37
- e(f, "Alert");
38
- function v({ className: t, ...r }) {
39
- return /* @__PURE__ */ i(
40
- "div",
41
- {
42
- "data-slot": "alert-title",
43
- className: o(
44
- "col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",
45
- t
46
- ),
47
- ...r
48
- }
49
- );
50
- }
51
- e(v, "AlertTitle");
52
- function h({
53
- className: t,
54
- ...r
55
- }) {
56
- return /* @__PURE__ */ i(
57
- "div",
58
- {
59
- "data-slot": "alert-description",
60
- className: o(
61
- "col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",
62
- t
63
- ),
64
- ...r
65
- }
66
- );
67
- }
68
- e(h, "AlertDescription");
69
- export {
70
- f as Alert,
71
- h as AlertDescription,
72
- v as AlertTitle
73
- };
1
+ var g=Object.defineProperty;var e=(t,r)=>g(t,"name",{value:r,configurable:!0});import{jsx as i}from"react/jsx-runtime";import{cva as n}from"class-variance-authority";import{cn as o}from"../lib/utils.js";const a=n("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",{variants:{variant:{info:"bg-info-light *:data-[slot=alert-description]:text-info-light-foreground text-info-light-foreground border-info-light-foreground/20 [&>svg]:text-info-light-foreground",warning:"bg-warning-light text-warning-light-foreground border-warning-light-foreground/20 [&>svg]:text-warning-light-foreground",success:"bg-success-light text-success-light-foreground border-success-light-foreground/20 [&>svg]:text-success-light-foreground",destructive:"bg-destructive-light text-destructive-light-foreground border-destructive-light-foreground/20 [&>svg]:text-destructive-light-foreground"}},defaultVariants:{variant:"info"}});function f({variant:t,className:r,...s}){return i("div",{"data-slot":"alert",role:"alert",className:o(a({variant:t}),r),...s})}e(f,"Alert");function v({className:t,...r}){return i("div",{"data-slot":"alert-title",className:o("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",t),...r})}e(v,"AlertTitle");function h({className:t,...r}){return i("div",{"data-slot":"alert-description",className:o("col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",t),...r})}e(h,"AlertDescription");export{f as Alert,h as AlertDescription,v as AlertTitle};
@@ -1,58 +1 @@
1
- var s = Object.defineProperty;
2
- var e = (a, t) => s(a, "name", { value: t, configurable: !0 });
3
- import { jsx as r } from "react/jsx-runtime";
4
- import { Avatar as l } from "radix-ui";
5
- import { cn as o } from "../lib/utils.js";
6
- function u({
7
- className: a,
8
- ...t
9
- }) {
10
- return /* @__PURE__ */ r(
11
- l.Root,
12
- {
13
- "data-slot": "avatar",
14
- className: o(
15
- "relative flex size-8 shrink-0 overflow-hidden rounded-full",
16
- a
17
- ),
18
- ...t
19
- }
20
- );
21
- }
22
- e(u, "Avatar");
23
- function m({
24
- className: a,
25
- ...t
26
- }) {
27
- return /* @__PURE__ */ r(
28
- l.Image,
29
- {
30
- "data-slot": "avatar-image",
31
- className: o("aspect-square size-full", a),
32
- ...t
33
- }
34
- );
35
- }
36
- e(m, "AvatarImage");
37
- function v({
38
- className: a,
39
- ...t
40
- }) {
41
- return /* @__PURE__ */ r(
42
- l.Fallback,
43
- {
44
- "data-slot": "avatar-fallback",
45
- className: o(
46
- "bg-accent flex size-full items-center justify-center rounded-full",
47
- a
48
- ),
49
- ...t
50
- }
51
- );
52
- }
53
- e(v, "AvatarFallback");
54
- export {
55
- u as Avatar,
56
- v as AvatarFallback,
57
- m as AvatarImage
58
- };
1
+ var s=Object.defineProperty;var e=(a,t)=>s(a,"name",{value:t,configurable:!0});import{jsx as r}from"react/jsx-runtime";import{Avatar as l}from"radix-ui";import{cn as o}from"../lib/utils.js";function u({className:a,...t}){return r(l.Root,{"data-slot":"avatar",className:o("relative flex size-8 shrink-0 overflow-hidden rounded-full",a),...t})}e(u,"Avatar");function m({className:a,...t}){return r(l.Image,{"data-slot":"avatar-image",className:o("aspect-square size-full",a),...t})}e(m,"AvatarImage");function v({className:a,...t}){return r(l.Fallback,{"data-slot":"avatar-fallback",className:o("bg-accent flex size-full items-center justify-center rounded-full",a),...t})}e(v,"AvatarFallback");export{u as Avatar,v as AvatarFallback,m as AvatarImage};
@@ -1,44 +1 @@
1
- var s = Object.defineProperty;
2
- var e = (r, i) => s(r, "name", { value: i, configurable: !0 });
3
- import { jsx as g } from "react/jsx-runtime";
4
- import { Slot as a } from "radix-ui";
5
- import { cva as d } from "class-variance-authority";
6
- import { cn as f } from "../lib/utils.js";
7
- const l = d(
8
- "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",
9
- {
10
- variants: {
11
- variant: {
12
- primary: "bg-primary-light text-primary-light-foreground border-primary-light-foreground/20",
13
- info: "bg-info-light text-info-light-foreground border-info-light-foreground/20",
14
- warning: "bg-warning-light text-warning-light-foreground border-warning-light-foreground/20",
15
- success: "bg-success-light text-success-light-foreground border-success-light-foreground/20",
16
- destructive: "bg-destructive-light text-destructive-light-foreground border-destructive-light-foreground/20"
17
- }
18
- },
19
- defaultVariants: {
20
- variant: "info"
21
- }
22
- }
23
- );
24
- function m({
25
- className: r,
26
- variant: i,
27
- asChild: t = !1,
28
- ...o
29
- }) {
30
- const n = t ? a.Root : "span";
31
- return /* @__PURE__ */ g(
32
- n,
33
- {
34
- "data-slot": "badge",
35
- className: f(l({ variant: i }), r),
36
- ...o
37
- }
38
- );
39
- }
40
- e(m, "Badge");
41
- export {
42
- m as Badge,
43
- l as badgeVariants
44
- };
1
+ var s=Object.defineProperty;var e=(r,i)=>s(r,"name",{value:i,configurable:!0});import{jsx as g}from"react/jsx-runtime";import{Slot as a}from"radix-ui";import{cva as d}from"class-variance-authority";import{cn as f}from"../lib/utils.js";const l=d("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",{variants:{variant:{primary:"bg-primary-light text-primary-light-foreground border-primary-light-foreground/20",info:"bg-info-light text-info-light-foreground border-info-light-foreground/20",warning:"bg-warning-light text-warning-light-foreground border-warning-light-foreground/20",success:"bg-success-light text-success-light-foreground border-success-light-foreground/20",destructive:"bg-destructive-light text-destructive-light-foreground border-destructive-light-foreground/20"}},defaultVariants:{variant:"info"}});function m({className:r,variant:i,asChild:t=!1,...o}){const n=t?a.Root:"span";return g(n,{"data-slot":"badge",className:f(l({variant:i}),r),...o})}e(m,"Badge");export{m as Badge,l as badgeVariants};
@@ -1,153 +1 @@
1
- var c = Object.defineProperty;
2
- var o = (r, e) => c(r, "name", { value: e, configurable: !0 });
3
- import { jsx as d } from "react/jsx-runtime";
4
- import { Slot as v } from "radix-ui";
5
- import { cva as g } from "class-variance-authority";
6
- import { cn as u } from "../lib/utils.js";
7
- const l = g(
8
- "cursor-pointer 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:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
9
- {
10
- variants: {
11
- color: {
12
- primary: "focus-visible:ring-primary/50",
13
- info: "focus-visible:ring-info/50",
14
- success: "focus-visible:ring-success/50",
15
- warning: "focus-visible:ring-warning/50",
16
- destructive: "focus-visible:ring-destructive/50",
17
- dark: "focus-visible:ring-black/50"
18
- },
19
- variant: {
20
- contained: "border",
21
- outline: "border bg-transparent",
22
- ghost: "border border-transparent",
23
- link: "text-primary underline-offset-4 hover:underline"
24
- },
25
- size: {
26
- default: "h-9 px-4 py-2 has-[>svg]:px-3",
27
- sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
28
- lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
29
- icon: "size-9"
30
- }
31
- },
32
- compoundVariants: [
33
- {
34
- color: "primary",
35
- variant: "contained",
36
- className: "bg-primary border-primary text-primary-foreground hover:bg-primary/90"
37
- },
38
- {
39
- color: "info",
40
- variant: "contained",
41
- className: "bg-info border-info text-info-foreground hover:bg-info/90"
42
- },
43
- {
44
- color: "success",
45
- variant: "contained",
46
- className: "bg-success border-success text-success-foreground hover:bg-success/90"
47
- },
48
- {
49
- color: "warning",
50
- variant: "contained",
51
- className: "bg-warning border-warning text-warning-foreground hover:bg-warning/90"
52
- },
53
- {
54
- color: "destructive",
55
- variant: "contained",
56
- className: "bg-destructive border-destructive text-destructive-foreground hover:bg-destructive/90"
57
- },
58
- {
59
- color: "dark",
60
- variant: "contained",
61
- className: "bg-dark border-dark text-dark-foreground hover:bg-dark/90"
62
- },
63
- {
64
- color: "primary",
65
- variant: "outline",
66
- className: "border-primary text-primary hover:bg-primary hover:text-primary-foreground"
67
- },
68
- {
69
- color: "info",
70
- variant: "outline",
71
- className: "border-info text-info hover:bg-info hover:text-info-foreground"
72
- },
73
- {
74
- color: "success",
75
- variant: "outline",
76
- className: "border-success text-success hover:bg-success hover:text-success-foreground"
77
- },
78
- {
79
- color: "warning",
80
- variant: "outline",
81
- className: "border-warning text-warning hover:bg-warning hover:text-warning-foreground"
82
- },
83
- {
84
- color: "destructive",
85
- variant: "outline",
86
- className: "border-destructive text-destructive hover:bg-destructive hover:text-destructive-foreground"
87
- },
88
- {
89
- color: "dark",
90
- variant: "outline",
91
- className: "border-dark text-dark hover:bg-dark hover:text-dark-foreground dark:text-dark-foreground"
92
- },
93
- {
94
- color: "primary",
95
- variant: "ghost",
96
- className: "text-primary hover:bg-primary/10"
97
- },
98
- {
99
- color: "info",
100
- variant: "ghost",
101
- className: "text-info hover:bg-info/10"
102
- },
103
- {
104
- color: "success",
105
- variant: "ghost",
106
- className: "text-success hover:bg-success/10"
107
- },
108
- {
109
- color: "warning",
110
- variant: "ghost",
111
- className: "text-warning hover:bg-warning/10"
112
- },
113
- {
114
- color: "destructive",
115
- variant: "ghost",
116
- className: "text-destructive hover:bg-destructive/10"
117
- },
118
- {
119
- color: "dark",
120
- variant: "ghost",
121
- className: "text-dark dark:text-dark-foreground hover:bg-dark/10 dark:hover:bg-dark"
122
- }
123
- ],
124
- defaultVariants: {
125
- variant: "contained",
126
- color: "primary",
127
- size: "default"
128
- }
129
- }
130
- );
131
- function x({
132
- className: r,
133
- variant: e,
134
- color: t,
135
- size: a,
136
- asChild: i = !1,
137
- ...n
138
- }) {
139
- const s = i ? v.Root : "button";
140
- return /* @__PURE__ */ d(
141
- s,
142
- {
143
- "data-slot": "button",
144
- className: u(l({ variant: e, color: t, size: a, className: r })),
145
- ...n
146
- }
147
- );
148
- }
149
- o(x, "Button");
150
- export {
151
- x as Button,
152
- l as buttonVariants
153
- };
1
+ var c=Object.defineProperty;var o=(r,e)=>c(r,"name",{value:e,configurable:!0});import{jsx as d}from"react/jsx-runtime";import{Slot as v}from"radix-ui";import{cva as g}from"class-variance-authority";import{cn as u}from"../lib/utils.js";const l=g("cursor-pointer 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:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{color:{primary:"focus-visible:ring-primary/50",info:"focus-visible:ring-info/50",success:"focus-visible:ring-success/50",warning:"focus-visible:ring-warning/50",destructive:"focus-visible:ring-destructive/50",dark:"focus-visible:ring-black/50"},variant:{contained:"border",outline:"border bg-transparent",ghost:"border border-transparent",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},compoundVariants:[{color:"primary",variant:"contained",className:"bg-primary border-primary text-primary-foreground hover:bg-primary/90"},{color:"info",variant:"contained",className:"bg-info border-info text-info-foreground hover:bg-info/90"},{color:"success",variant:"contained",className:"bg-success border-success text-success-foreground hover:bg-success/90"},{color:"warning",variant:"contained",className:"bg-warning border-warning text-warning-foreground hover:bg-warning/90"},{color:"destructive",variant:"contained",className:"bg-destructive border-destructive text-destructive-foreground hover:bg-destructive/90"},{color:"dark",variant:"contained",className:"bg-dark border-dark text-dark-foreground hover:bg-dark/90"},{color:"primary",variant:"outline",className:"border-primary text-primary hover:bg-primary hover:text-primary-foreground"},{color:"info",variant:"outline",className:"border-info text-info hover:bg-info hover:text-info-foreground"},{color:"success",variant:"outline",className:"border-success text-success hover:bg-success hover:text-success-foreground"},{color:"warning",variant:"outline",className:"border-warning text-warning hover:bg-warning hover:text-warning-foreground"},{color:"destructive",variant:"outline",className:"border-destructive text-destructive hover:bg-destructive hover:text-destructive-foreground"},{color:"dark",variant:"outline",className:"border-dark text-dark hover:bg-dark hover:text-dark-foreground dark:text-dark-foreground"},{color:"primary",variant:"ghost",className:"text-primary hover:bg-primary/10"},{color:"info",variant:"ghost",className:"text-info hover:bg-info/10"},{color:"success",variant:"ghost",className:"text-success hover:bg-success/10"},{color:"warning",variant:"ghost",className:"text-warning hover:bg-warning/10"},{color:"destructive",variant:"ghost",className:"text-destructive hover:bg-destructive/10"},{color:"dark",variant:"ghost",className:"text-dark dark:text-dark-foreground hover:bg-dark/10 dark:hover:bg-dark"}],defaultVariants:{variant:"contained",color:"primary",size:"default"}});function x({className:r,variant:e,color:t,size:a,asChild:i=!1,...n}){const s=i?v.Root:"button";return d(s,{"data-slot":"button",className:u(l({variant:e,color:t,size:a,className:r})),...n})}o(x,"Button");export{x as Button,l as buttonVariants};