@wealthx/shadcn 0.0.2 → 1.0.0

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 (188) hide show
  1. package/.turbo/turbo-build.log +135 -11
  2. package/CHANGELOG.md +6 -0
  3. package/CHANGES.md +345 -0
  4. package/dist/chunk-2WZVSBAY.mjs +232 -0
  5. package/dist/chunk-2Y7YJKPE.mjs +47 -0
  6. package/dist/chunk-3U7SD3MS.mjs +55 -0
  7. package/dist/chunk-3VQNJ235.mjs +114 -0
  8. package/dist/chunk-55CEW76V.mjs +35 -0
  9. package/dist/chunk-6AFMNC42.mjs +146 -0
  10. package/dist/chunk-6OJF6XRN.mjs +117 -0
  11. package/dist/chunk-7LDIMXGM.mjs +181 -0
  12. package/dist/chunk-AMJ23O53.mjs +122 -0
  13. package/dist/chunk-BBJBJSXQ.mjs +44 -0
  14. package/dist/chunk-BGP2N52Z.mjs +126 -0
  15. package/dist/chunk-BMFN37JH.mjs +41 -0
  16. package/dist/chunk-CGOKTPXU.mjs +79 -0
  17. package/dist/chunk-CZ3BW5GL.mjs +81 -0
  18. package/dist/chunk-DBHJ5KC3.mjs +55 -0
  19. package/dist/chunk-DDPA2XXS.mjs +97 -0
  20. package/dist/chunk-DS2AMHN2.mjs +30 -0
  21. package/dist/chunk-E3K6O4FZ.mjs +57 -0
  22. package/dist/chunk-FWCSY2DS.mjs +37 -0
  23. package/dist/chunk-GPRJQ24C.mjs +28 -0
  24. package/dist/chunk-HS7TFG7V.mjs +24 -0
  25. package/dist/chunk-HUVTPUV2.mjs +256 -0
  26. package/dist/chunk-IAOOZCUY.mjs +90 -0
  27. package/dist/chunk-JF4PHPD5.mjs +111 -0
  28. package/dist/chunk-JU2RUWHF.mjs +123 -0
  29. package/dist/chunk-KKHTJNMM.mjs +86 -0
  30. package/dist/chunk-MJIEMGRD.mjs +266 -0
  31. package/dist/chunk-MKFL5MNH.mjs +372 -0
  32. package/dist/chunk-MQ72DIBH.mjs +105 -0
  33. package/dist/chunk-NGYG2EA6.mjs +148 -0
  34. package/dist/chunk-NWZ46DJL.mjs +213 -0
  35. package/dist/chunk-OXQQNQZI.mjs +75 -0
  36. package/dist/chunk-PMKODV6M.mjs +161 -0
  37. package/dist/chunk-QOJ2DQD6.mjs +57 -0
  38. package/dist/chunk-RL772EH7.mjs +126 -0
  39. package/dist/chunk-SLWCCURD.mjs +99 -0
  40. package/dist/chunk-V7CNWJT3.mjs +10 -0
  41. package/dist/chunk-VG6UF6UT.mjs +68 -0
  42. package/dist/chunk-VYMHBV6D.mjs +123 -0
  43. package/dist/chunk-VZ2NR7L3.mjs +195 -0
  44. package/dist/chunk-YN5SYTOO.mjs +117 -0
  45. package/dist/chunk-Z3MK2KKZ.mjs +83 -0
  46. package/dist/chunk-ZN2QKLF6.mjs +187 -0
  47. package/dist/chunk-ZZV5JVNW.mjs +34 -0
  48. package/dist/components/ui/accordion.js +142 -0
  49. package/dist/components/ui/accordion.mjs +14 -0
  50. package/dist/components/ui/alert-dialog.js +413 -0
  51. package/dist/components/ui/alert-dialog.mjs +34 -0
  52. package/dist/components/ui/alert.js +134 -0
  53. package/dist/components/ui/alert.mjs +12 -0
  54. package/dist/components/ui/avatar.js +173 -0
  55. package/dist/components/ui/avatar.mjs +18 -0
  56. package/dist/components/ui/badge.js +163 -0
  57. package/dist/components/ui/badge.mjs +11 -0
  58. package/dist/components/ui/button.js +198 -0
  59. package/dist/components/ui/button.mjs +11 -0
  60. package/dist/components/ui/calendar.js +408 -0
  61. package/dist/components/ui/calendar.mjs +12 -0
  62. package/dist/components/ui/card.js +156 -0
  63. package/dist/components/ui/card.mjs +20 -0
  64. package/dist/components/ui/checkbox.js +166 -0
  65. package/dist/components/ui/checkbox.mjs +11 -0
  66. package/dist/components/ui/chip.js +199 -0
  67. package/dist/components/ui/chip.mjs +10 -0
  68. package/dist/components/ui/data-table.js +925 -0
  69. package/dist/components/ui/data-table.mjs +29 -0
  70. package/dist/components/ui/date-picker.js +561 -0
  71. package/dist/components/ui/date-picker.mjs +15 -0
  72. package/dist/components/ui/dialog.js +378 -0
  73. package/dist/components/ui/dialog.mjs +30 -0
  74. package/dist/components/ui/drawer.js +213 -0
  75. package/dist/components/ui/drawer.mjs +28 -0
  76. package/dist/components/ui/dropdown-menu.js +338 -0
  77. package/dist/components/ui/dropdown-menu.mjs +38 -0
  78. package/dist/components/ui/empty.js +173 -0
  79. package/dist/components/ui/empty.mjs +18 -0
  80. package/dist/components/ui/field.js +359 -0
  81. package/dist/components/ui/field.mjs +28 -0
  82. package/dist/components/ui/input-group.js +406 -0
  83. package/dist/components/ui/input-group.mjs +22 -0
  84. package/dist/components/ui/input-otp.js +149 -0
  85. package/dist/components/ui/input-otp.mjs +14 -0
  86. package/dist/components/ui/input.js +81 -0
  87. package/dist/components/ui/input.mjs +8 -0
  88. package/dist/components/ui/label.js +85 -0
  89. package/dist/components/ui/label.mjs +8 -0
  90. package/dist/components/ui/pagination.js +333 -0
  91. package/dist/components/ui/pagination.mjs +22 -0
  92. package/dist/components/ui/popover.js +167 -0
  93. package/dist/components/ui/popover.mjs +22 -0
  94. package/dist/components/ui/progress.js +97 -0
  95. package/dist/components/ui/progress.mjs +8 -0
  96. package/dist/components/ui/radio-group.js +178 -0
  97. package/dist/components/ui/radio-group.mjs +12 -0
  98. package/dist/components/ui/select.js +262 -0
  99. package/dist/components/ui/select.mjs +28 -0
  100. package/dist/components/ui/separator.js +86 -0
  101. package/dist/components/ui/separator.mjs +8 -0
  102. package/dist/components/ui/sheet.js +227 -0
  103. package/dist/components/ui/sheet.mjs +26 -0
  104. package/dist/components/ui/skeleton.js +75 -0
  105. package/dist/components/ui/skeleton.mjs +8 -0
  106. package/dist/components/ui/sonner.js +86 -0
  107. package/dist/components/ui/sonner.mjs +7 -0
  108. package/dist/components/ui/spinner.js +93 -0
  109. package/dist/components/ui/spinner.mjs +10 -0
  110. package/dist/components/ui/switch.js +178 -0
  111. package/dist/components/ui/switch.mjs +11 -0
  112. package/dist/components/ui/table.js +184 -0
  113. package/dist/components/ui/table.mjs +22 -0
  114. package/dist/components/ui/tabs.js +181 -0
  115. package/dist/components/ui/tabs.mjs +16 -0
  116. package/dist/components/ui/textarea.js +79 -0
  117. package/dist/components/ui/textarea.mjs +8 -0
  118. package/dist/components/ui/toggle-group.js +184 -0
  119. package/dist/components/ui/toggle-group.mjs +12 -0
  120. package/dist/components/ui/toggle.js +108 -0
  121. package/dist/components/ui/toggle.mjs +11 -0
  122. package/dist/components/ui/tooltip.js +140 -0
  123. package/dist/components/ui/tooltip.mjs +16 -0
  124. package/dist/index.js +4312 -90
  125. package/dist/index.mjs +459 -158
  126. package/dist/lib/colors.js +84 -0
  127. package/dist/lib/colors.mjs +13 -0
  128. package/dist/lib/theme-provider.js +150 -0
  129. package/dist/lib/theme-provider.mjs +13 -0
  130. package/dist/lib/typography.js +157 -0
  131. package/dist/lib/typography.mjs +25 -0
  132. package/dist/lib/utils.js +34 -0
  133. package/dist/lib/utils.mjs +7 -0
  134. package/dist/styles.css +1 -1
  135. package/package.json +228 -11
  136. package/scripts/build-css.ts +15 -9
  137. package/src/components/index.tsx +443 -0
  138. package/src/components/ui/accordion.tsx +99 -0
  139. package/src/components/ui/alert-dialog.tsx +239 -0
  140. package/src/components/ui/alert.tsx +81 -0
  141. package/src/components/ui/avatar.tsx +130 -0
  142. package/src/components/ui/badge.tsx +57 -0
  143. package/src/components/ui/button.tsx +69 -37
  144. package/src/components/ui/calendar.tsx +252 -0
  145. package/src/components/ui/card.tsx +106 -0
  146. package/src/components/ui/checkbox.tsx +111 -0
  147. package/src/components/ui/chip.tsx +65 -0
  148. package/src/components/ui/data-table.tsx +490 -0
  149. package/src/components/ui/date-picker.tsx +133 -0
  150. package/src/components/ui/dialog.tsx +195 -0
  151. package/src/components/ui/drawer.tsx +169 -0
  152. package/src/components/ui/dropdown-menu.tsx +315 -0
  153. package/src/components/ui/empty.tsx +128 -0
  154. package/src/components/ui/field.tsx +273 -0
  155. package/src/components/ui/input-group.tsx +190 -0
  156. package/src/components/ui/input-otp.tsx +90 -0
  157. package/src/components/ui/input.tsx +28 -0
  158. package/src/components/ui/label.tsx +24 -0
  159. package/src/components/ui/pagination.tsx +148 -0
  160. package/src/components/ui/popover.tsx +112 -0
  161. package/src/components/ui/progress.tsx +40 -0
  162. package/src/components/ui/radio-group.tsx +129 -0
  163. package/src/components/ui/select.tsx +201 -0
  164. package/src/components/ui/separator.tsx +26 -0
  165. package/src/components/ui/sheet.tsx +182 -0
  166. package/src/components/ui/skeleton.tsx +22 -0
  167. package/src/components/ui/sonner.tsx +48 -0
  168. package/src/components/ui/spinner.tsx +41 -0
  169. package/src/components/ui/switch.tsx +126 -0
  170. package/src/components/ui/table.tsx +143 -0
  171. package/src/components/ui/tabs.tsx +119 -0
  172. package/src/components/ui/textarea.tsx +28 -0
  173. package/src/components/ui/toggle-group.tsx +94 -0
  174. package/src/components/ui/toggle.tsx +59 -0
  175. package/src/components/ui/tooltip.tsx +80 -0
  176. package/src/index.ts +15 -3
  177. package/src/lib/colors.ts +74 -0
  178. package/src/lib/slot.tsx +68 -0
  179. package/src/lib/theme-provider.tsx +134 -0
  180. package/src/lib/typography.ts +153 -0
  181. package/src/lib/utils.ts +1 -1
  182. package/src/styles/globals.css +377 -107
  183. package/src/styles/styles-css.ts +1 -1
  184. package/tsup.config.ts +48 -2
  185. package/dist/index.d.mts +0 -27
  186. package/dist/index.d.ts +0 -27
  187. package/src/provider/ShadcnProvider.tsx +0 -89
  188. package/src/provider/index.ts +0 -2
@@ -0,0 +1,117 @@
1
+ import {
2
+ cn
3
+ } from "./chunk-V7CNWJT3.mjs";
4
+ import {
5
+ __objRest,
6
+ __spreadValues
7
+ } from "./chunk-FWCSY2DS.mjs";
8
+
9
+ // src/components/ui/avatar.tsx
10
+ import { Avatar as AvatarPrimitive } from "@base-ui/react/avatar";
11
+ import { jsx } from "react/jsx-runtime";
12
+ function Avatar(_a) {
13
+ var _b = _a, {
14
+ className,
15
+ size = "default"
16
+ } = _b, props = __objRest(_b, [
17
+ "className",
18
+ "size"
19
+ ]);
20
+ return /* @__PURE__ */ jsx(
21
+ AvatarPrimitive.Root,
22
+ __spreadValues({
23
+ className: cn(
24
+ "group/avatar relative flex size-8 shrink-0 rounded-full select-none data-[size=lg]:size-10 data-[size=sm]:size-6",
25
+ className
26
+ ),
27
+ "data-size": size,
28
+ "data-slot": "avatar"
29
+ }, props)
30
+ );
31
+ }
32
+ function AvatarImage(_a) {
33
+ var _b = _a, {
34
+ className
35
+ } = _b, props = __objRest(_b, [
36
+ "className"
37
+ ]);
38
+ return /* @__PURE__ */ jsx(
39
+ AvatarPrimitive.Image,
40
+ __spreadValues({
41
+ className: cn("aspect-square size-full rounded-full", className),
42
+ "data-slot": "avatar-image"
43
+ }, props)
44
+ );
45
+ }
46
+ function AvatarFallback(_a) {
47
+ var _b = _a, {
48
+ className
49
+ } = _b, props = __objRest(_b, [
50
+ "className"
51
+ ]);
52
+ return /* @__PURE__ */ jsx(
53
+ AvatarPrimitive.Fallback,
54
+ __spreadValues({
55
+ className: cn(
56
+ "flex size-full items-center justify-center rounded-full overflow-hidden bg-muted text-sm font-sans text-muted-foreground group-data-[size=sm]/avatar:text-xs",
57
+ className
58
+ ),
59
+ "data-slot": "avatar-fallback"
60
+ }, props)
61
+ );
62
+ }
63
+ function AvatarBadge(_a) {
64
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
65
+ return /* @__PURE__ */ jsx(
66
+ "span",
67
+ __spreadValues({
68
+ className: cn(
69
+ "absolute right-0 bottom-0 z-10 inline-flex items-center justify-center rounded-full bg-primary text-primary-foreground ring-2 ring-background select-none",
70
+ "group-data-[size=sm]/avatar:size-2 group-data-[size=sm]/avatar:[&>svg]:hidden",
71
+ "group-data-[size=default]/avatar:size-2.5 group-data-[size=default]/avatar:[&>svg]:size-2",
72
+ "group-data-[size=lg]/avatar:size-3 group-data-[size=lg]/avatar:[&>svg]:size-2",
73
+ className
74
+ ),
75
+ "data-slot": "avatar-badge"
76
+ }, props)
77
+ );
78
+ }
79
+ function AvatarGroup(_a) {
80
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
81
+ return /* @__PURE__ */ jsx(
82
+ "div",
83
+ __spreadValues({
84
+ className: cn(
85
+ "group/avatar-group flex -space-x-2 *:data-[slot=avatar]:ring-2 *:data-[slot=avatar]:ring-background",
86
+ className
87
+ ),
88
+ "data-slot": "avatar-group"
89
+ }, props)
90
+ );
91
+ }
92
+ function AvatarGroupCount(_a) {
93
+ var _b = _a, {
94
+ className
95
+ } = _b, props = __objRest(_b, [
96
+ "className"
97
+ ]);
98
+ return /* @__PURE__ */ jsx(
99
+ "div",
100
+ __spreadValues({
101
+ className: cn(
102
+ "relative flex size-8 shrink-0 items-center justify-center rounded-full bg-muted text-sm text-muted-foreground ring-2 ring-background group-has-data-[size=lg]/avatar-group:size-10 group-has-data-[size=sm]/avatar-group:size-6 [&>svg]:size-4 group-has-data-[size=lg]/avatar-group:[&>svg]:size-5 group-has-data-[size=sm]/avatar-group:[&>svg]:size-3",
103
+ className
104
+ ),
105
+ "data-slot": "avatar-group-count"
106
+ }, props)
107
+ );
108
+ }
109
+
110
+ export {
111
+ Avatar,
112
+ AvatarImage,
113
+ AvatarFallback,
114
+ AvatarBadge,
115
+ AvatarGroup,
116
+ AvatarGroupCount
117
+ };
@@ -0,0 +1,181 @@
1
+ import {
2
+ buttonVariants
3
+ } from "./chunk-IAOOZCUY.mjs";
4
+ import {
5
+ useThemeVars
6
+ } from "./chunk-OXQQNQZI.mjs";
7
+ import {
8
+ cn
9
+ } from "./chunk-V7CNWJT3.mjs";
10
+ import {
11
+ __objRest,
12
+ __spreadProps,
13
+ __spreadValues
14
+ } from "./chunk-FWCSY2DS.mjs";
15
+
16
+ // src/components/ui/dialog.tsx
17
+ import { XIcon } from "lucide-react";
18
+ import { Dialog as DialogPrimitive } from "@base-ui/react/dialog";
19
+ import { jsx, jsxs } from "react/jsx-runtime";
20
+ function Dialog(_a) {
21
+ var props = __objRest(_a, []);
22
+ return /* @__PURE__ */ jsx(DialogPrimitive.Root, __spreadValues({ "data-slot": "dialog" }, props));
23
+ }
24
+ function DialogTrigger(_a) {
25
+ var props = __objRest(_a, []);
26
+ return /* @__PURE__ */ jsx(DialogPrimitive.Trigger, __spreadValues({ "data-slot": "dialog-trigger" }, props));
27
+ }
28
+ function DialogPortal(_a) {
29
+ var props = __objRest(_a, []);
30
+ return /* @__PURE__ */ jsx(DialogPrimitive.Portal, __spreadValues({ "data-slot": "dialog-portal" }, props));
31
+ }
32
+ function DialogClose(_a) {
33
+ var props = __objRest(_a, []);
34
+ return /* @__PURE__ */ jsx(DialogPrimitive.Close, __spreadValues({ "data-slot": "dialog-close" }, props));
35
+ }
36
+ function DialogOverlay(_a) {
37
+ var _b = _a, {
38
+ className
39
+ } = _b, props = __objRest(_b, [
40
+ "className"
41
+ ]);
42
+ return /* @__PURE__ */ jsx(
43
+ DialogPrimitive.Backdrop,
44
+ __spreadValues({
45
+ className: cn(
46
+ // WealthX: foreground/50 scrim (matches Figma — foreground token at 50% opacity)
47
+ "fixed inset-0 z-50 bg-foreground/50 data-ending-style:animate-out data-ending-style:fade-out-0 data-ending-style:fill-mode-forwards data-open:animate-in data-open:fade-in-0",
48
+ className
49
+ ),
50
+ "data-slot": "dialog-overlay"
51
+ }, props)
52
+ );
53
+ }
54
+ function DialogContent(_a) {
55
+ var _b = _a, {
56
+ className,
57
+ children,
58
+ showCloseButton = true,
59
+ style
60
+ } = _b, props = __objRest(_b, [
61
+ "className",
62
+ "children",
63
+ "showCloseButton",
64
+ "style"
65
+ ]);
66
+ const themeVars = useThemeVars();
67
+ return /* @__PURE__ */ jsxs(DialogPortal, { children: [
68
+ /* @__PURE__ */ jsx(DialogOverlay, {}),
69
+ /* @__PURE__ */ jsxs(
70
+ DialogPrimitive.Popup,
71
+ __spreadProps(__spreadValues({
72
+ className: cn(
73
+ // WealthX: removed rounded-lg (sharp corners), shadow-lg (flat panels), foreground/50 scrim via DialogOverlay
74
+ "fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 duration-200 outline-none data-ending-style:animate-out data-ending-style:fade-out-0 data-ending-style:zoom-out-95 data-ending-style:fill-mode-forwards data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 sm:max-w-lg",
75
+ className
76
+ ),
77
+ "data-slot": "dialog-content",
78
+ style: __spreadValues(__spreadValues({}, themeVars), style)
79
+ }, props), {
80
+ children: [
81
+ children,
82
+ showCloseButton ? /* @__PURE__ */ jsxs(
83
+ DialogPrimitive.Close,
84
+ {
85
+ className: "absolute top-4 right-4 transition-colors hover:bg-foreground/5 focus:outline-hidden focus:ring-2 focus:ring-border focus:ring-offset-0 disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
86
+ "data-slot": "dialog-close",
87
+ children: [
88
+ /* @__PURE__ */ jsx(XIcon, {}),
89
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
90
+ ]
91
+ }
92
+ ) : null
93
+ ]
94
+ })
95
+ )
96
+ ] });
97
+ }
98
+ function DialogHeader(_a) {
99
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
100
+ return /* @__PURE__ */ jsx(
101
+ "div",
102
+ __spreadValues({
103
+ className: cn("flex flex-col gap-1.5", className),
104
+ "data-slot": "dialog-header"
105
+ }, props)
106
+ );
107
+ }
108
+ function DialogFooter(_a) {
109
+ var _b = _a, {
110
+ className,
111
+ showCloseButton = false,
112
+ children
113
+ } = _b, props = __objRest(_b, [
114
+ "className",
115
+ "showCloseButton",
116
+ "children"
117
+ ]);
118
+ return /* @__PURE__ */ jsxs(
119
+ "div",
120
+ __spreadProps(__spreadValues({
121
+ className: cn(
122
+ // WealthX: always row layout, right-aligned, separator above footer
123
+ "flex flex-row justify-end gap-2 border-t border-border pt-4",
124
+ className
125
+ ),
126
+ "data-slot": "dialog-footer"
127
+ }, props), {
128
+ children: [
129
+ children,
130
+ showCloseButton ? /* @__PURE__ */ jsx(
131
+ DialogPrimitive.Close,
132
+ {
133
+ className: cn(buttonVariants({ variant: "outline" })),
134
+ children: "Close"
135
+ }
136
+ ) : null
137
+ ]
138
+ })
139
+ );
140
+ }
141
+ function DialogTitle(_a) {
142
+ var _b = _a, {
143
+ className
144
+ } = _b, props = __objRest(_b, [
145
+ "className"
146
+ ]);
147
+ return /* @__PURE__ */ jsx(
148
+ DialogPrimitive.Title,
149
+ __spreadValues({
150
+ className: cn("text-lg leading-none font-semibold", className),
151
+ "data-slot": "dialog-title"
152
+ }, props)
153
+ );
154
+ }
155
+ function DialogDescription(_a) {
156
+ var _b = _a, {
157
+ className
158
+ } = _b, props = __objRest(_b, [
159
+ "className"
160
+ ]);
161
+ return /* @__PURE__ */ jsx(
162
+ DialogPrimitive.Description,
163
+ __spreadValues({
164
+ className: cn("text-sm text-muted-foreground", className),
165
+ "data-slot": "dialog-description"
166
+ }, props)
167
+ );
168
+ }
169
+
170
+ export {
171
+ Dialog,
172
+ DialogTrigger,
173
+ DialogPortal,
174
+ DialogClose,
175
+ DialogOverlay,
176
+ DialogContent,
177
+ DialogHeader,
178
+ DialogFooter,
179
+ DialogTitle,
180
+ DialogDescription
181
+ };
@@ -0,0 +1,122 @@
1
+ import {
2
+ Popover,
3
+ PopoverContent,
4
+ PopoverTrigger
5
+ } from "./chunk-MQ72DIBH.mjs";
6
+ import {
7
+ Calendar
8
+ } from "./chunk-2WZVSBAY.mjs";
9
+ import {
10
+ Button
11
+ } from "./chunk-IAOOZCUY.mjs";
12
+ import {
13
+ cn
14
+ } from "./chunk-V7CNWJT3.mjs";
15
+ import {
16
+ __spreadProps,
17
+ __spreadValues
18
+ } from "./chunk-FWCSY2DS.mjs";
19
+
20
+ // src/components/ui/date-picker.tsx
21
+ import * as React from "react";
22
+ import { format } from "date-fns";
23
+ import { CalendarIcon } from "lucide-react";
24
+ import { jsx, jsxs } from "react/jsx-runtime";
25
+ function DatePicker({
26
+ value,
27
+ onChange,
28
+ placeholder = "Pick a date",
29
+ showTimePicker = false,
30
+ disabled = false,
31
+ className,
32
+ calendarProps
33
+ }) {
34
+ const [open, setOpen] = React.useState(false);
35
+ function handleDaySelect(day) {
36
+ if (!day) {
37
+ onChange == null ? void 0 : onChange(void 0);
38
+ return;
39
+ }
40
+ if (showTimePicker && value) {
41
+ day.setHours(value.getHours(), value.getMinutes());
42
+ }
43
+ onChange == null ? void 0 : onChange(day);
44
+ if (!showTimePicker) setOpen(false);
45
+ }
46
+ function handleTimeChange(e) {
47
+ const [hours, minutes] = e.target.value.split(":").map(Number);
48
+ const next = value ? new Date(value) : /* @__PURE__ */ new Date();
49
+ next.setHours(hours, minutes, 0, 0);
50
+ onChange == null ? void 0 : onChange(next);
51
+ }
52
+ const timeValue = value ? `${String(value.getHours()).padStart(2, "0")}:${String(value.getMinutes()).padStart(2, "0")}` : "";
53
+ let displayValue;
54
+ if (value && showTimePicker) {
55
+ displayValue = format(value, "dd/MM/yyyy HH:mm");
56
+ } else if (value) {
57
+ displayValue = format(value, "dd/MM/yyyy");
58
+ }
59
+ return /* @__PURE__ */ jsxs(Popover, { onOpenChange: disabled ? void 0 : setOpen, open, children: [
60
+ /* @__PURE__ */ jsxs(
61
+ PopoverTrigger,
62
+ {
63
+ render: /* @__PURE__ */ jsx(
64
+ Button,
65
+ {
66
+ className: cn(
67
+ "w-full justify-start rounded-none font-normal data-[empty=true]:text-muted-foreground",
68
+ className
69
+ ),
70
+ "data-empty": !value,
71
+ "data-slot": "date-picker-trigger",
72
+ disabled,
73
+ variant: "outline"
74
+ }
75
+ ),
76
+ children: [
77
+ /* @__PURE__ */ jsx(CalendarIcon, {}),
78
+ value ? displayValue : placeholder
79
+ ]
80
+ }
81
+ ),
82
+ /* @__PURE__ */ jsxs(
83
+ PopoverContent,
84
+ {
85
+ align: "start",
86
+ className: "w-auto rounded-none p-0 shadow-sm",
87
+ children: [
88
+ /* @__PURE__ */ jsx(
89
+ Calendar,
90
+ __spreadProps(__spreadValues({
91
+ captionLayout: "dropdown",
92
+ mode: "single",
93
+ onSelect: handleDaySelect,
94
+ selected: value
95
+ }, calendarProps), {
96
+ className: cn(
97
+ "rounded-none border-0 shadow-none",
98
+ calendarProps == null ? void 0 : calendarProps.className
99
+ )
100
+ })
101
+ ),
102
+ showTimePicker ? /* @__PURE__ */ jsx("div", { className: "border-t border-border px-3 pb-3 pt-2", children: /* @__PURE__ */ jsxs("label", { className: "mb-1.5 block text-xs font-medium text-muted-foreground", children: [
103
+ "Time",
104
+ /* @__PURE__ */ jsx(
105
+ "input",
106
+ {
107
+ className: "mt-1.5 h-8 w-full rounded-none border border-input bg-transparent px-2 text-sm font-sans outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50",
108
+ onChange: handleTimeChange,
109
+ type: "time",
110
+ value: timeValue
111
+ }
112
+ )
113
+ ] }) }) : null
114
+ ]
115
+ }
116
+ )
117
+ ] });
118
+ }
119
+
120
+ export {
121
+ DatePicker
122
+ };
@@ -0,0 +1,44 @@
1
+ import {
2
+ cn
3
+ } from "./chunk-V7CNWJT3.mjs";
4
+ import {
5
+ __objRest,
6
+ __spreadProps,
7
+ __spreadValues
8
+ } from "./chunk-FWCSY2DS.mjs";
9
+
10
+ // src/components/ui/progress.tsx
11
+ import { Progress as ProgressPrimitive } from "@base-ui/react/progress";
12
+ import { jsx } from "react/jsx-runtime";
13
+ function Progress(_a) {
14
+ var _b = _a, {
15
+ className,
16
+ value
17
+ } = _b, props = __objRest(_b, [
18
+ "className",
19
+ "value"
20
+ ]);
21
+ return /* @__PURE__ */ jsx(
22
+ ProgressPrimitive.Root,
23
+ __spreadProps(__spreadValues({
24
+ className: cn(
25
+ "relative h-2 w-full overflow-hidden bg-muted",
26
+ className
27
+ ),
28
+ "data-slot": "progress",
29
+ value
30
+ }, props), {
31
+ children: /* @__PURE__ */ jsx(ProgressPrimitive.Track, { className: "h-full", children: /* @__PURE__ */ jsx(
32
+ ProgressPrimitive.Indicator,
33
+ {
34
+ className: "h-full bg-primary transition-all",
35
+ "data-slot": "progress-indicator"
36
+ }
37
+ ) })
38
+ })
39
+ );
40
+ }
41
+
42
+ export {
43
+ Progress
44
+ };
@@ -0,0 +1,126 @@
1
+ import {
2
+ cn
3
+ } from "./chunk-V7CNWJT3.mjs";
4
+ import {
5
+ __objRest,
6
+ __spreadValues
7
+ } from "./chunk-FWCSY2DS.mjs";
8
+
9
+ // src/components/ui/table.tsx
10
+ import { jsx } from "react/jsx-runtime";
11
+ function Table(_a) {
12
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
13
+ return /* @__PURE__ */ jsx(
14
+ "div",
15
+ {
16
+ className: "relative w-full overflow-x-auto",
17
+ "data-slot": "table-container",
18
+ children: /* @__PURE__ */ jsx(
19
+ "table",
20
+ __spreadValues({
21
+ className: cn("w-full caption-bottom text-sm", className),
22
+ "data-slot": "table"
23
+ }, props)
24
+ )
25
+ }
26
+ );
27
+ }
28
+ function TableHeader(_a) {
29
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
30
+ return /* @__PURE__ */ jsx(
31
+ "thead",
32
+ __spreadValues({
33
+ className: cn("[&_tr]:border-b", className),
34
+ "data-slot": "table-header"
35
+ }, props)
36
+ );
37
+ }
38
+ function TableBody(_a) {
39
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
40
+ return /* @__PURE__ */ jsx(
41
+ "tbody",
42
+ __spreadValues({
43
+ className: cn("[&_tr:last-child]:border-0", className),
44
+ "data-slot": "table-body"
45
+ }, props)
46
+ );
47
+ }
48
+ function TableFooter(_a) {
49
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
50
+ return /* @__PURE__ */ jsx(
51
+ "tfoot",
52
+ __spreadValues({
53
+ className: cn(
54
+ "border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",
55
+ className
56
+ ),
57
+ "data-slot": "table-footer"
58
+ }, props)
59
+ );
60
+ }
61
+ function TableRow(_a) {
62
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
63
+ return /* @__PURE__ */ jsx(
64
+ "tr",
65
+ __spreadValues({
66
+ className: cn(
67
+ "border-b transition-[background-color,opacity] hover:bg-muted/50 data-[state=selected]:bg-primary/10",
68
+ className
69
+ ),
70
+ "data-slot": "table-row"
71
+ }, props)
72
+ );
73
+ }
74
+ function TableHead(_a) {
75
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
76
+ return /* @__PURE__ */ jsx(
77
+ "th",
78
+ __spreadValues({
79
+ className: cn(
80
+ "h-10 px-4 text-left align-middle font-medium whitespace-nowrap text-muted-foreground",
81
+ "[&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
82
+ className
83
+ ),
84
+ "data-slot": "table-head"
85
+ }, props)
86
+ );
87
+ }
88
+ function TableCell(_a) {
89
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
90
+ return /* @__PURE__ */ jsx(
91
+ "td",
92
+ __spreadValues({
93
+ className: cn(
94
+ "px-4 py-3 align-middle whitespace-nowrap",
95
+ "[&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
96
+ className
97
+ ),
98
+ "data-slot": "table-cell"
99
+ }, props)
100
+ );
101
+ }
102
+ function TableCaption(_a) {
103
+ var _b = _a, {
104
+ className
105
+ } = _b, props = __objRest(_b, [
106
+ "className"
107
+ ]);
108
+ return /* @__PURE__ */ jsx(
109
+ "caption",
110
+ __spreadValues({
111
+ className: cn("mt-4 text-sm text-muted-foreground", className),
112
+ "data-slot": "table-caption"
113
+ }, props)
114
+ );
115
+ }
116
+
117
+ export {
118
+ Table,
119
+ TableHeader,
120
+ TableBody,
121
+ TableFooter,
122
+ TableRow,
123
+ TableHead,
124
+ TableCell,
125
+ TableCaption
126
+ };
@@ -0,0 +1,41 @@
1
+ import {
2
+ cn
3
+ } from "./chunk-V7CNWJT3.mjs";
4
+ import {
5
+ __objRest,
6
+ __spreadValues
7
+ } from "./chunk-FWCSY2DS.mjs";
8
+
9
+ // src/components/ui/spinner.tsx
10
+ import { cva } from "class-variance-authority";
11
+ import { LoaderCircle } from "lucide-react";
12
+ import { jsx } from "react/jsx-runtime";
13
+ var spinnerVariants = cva("animate-spin shrink-0", {
14
+ variants: {
15
+ size: {
16
+ sm: "size-3",
17
+ default: "size-4",
18
+ lg: "size-6",
19
+ xl: "size-8"
20
+ }
21
+ },
22
+ defaultVariants: {
23
+ size: "default"
24
+ }
25
+ });
26
+ function Spinner(_a) {
27
+ var _b = _a, { className, size } = _b, props = __objRest(_b, ["className", "size"]);
28
+ return /* @__PURE__ */ jsx(
29
+ LoaderCircle,
30
+ __spreadValues({
31
+ "aria-hidden": "true",
32
+ className: cn(spinnerVariants({ size }), className),
33
+ "data-slot": "spinner"
34
+ }, props)
35
+ );
36
+ }
37
+
38
+ export {
39
+ spinnerVariants,
40
+ Spinner
41
+ };