@wealthx/shadcn 0.0.2 → 1.0.1

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 (189) hide show
  1. package/.turbo/turbo-build.log +135 -11
  2. package/CHANGELOG.md +12 -0
  3. package/CHANGES.md +345 -0
  4. package/README.md +128 -0
  5. package/dist/chunk-2WZVSBAY.mjs +232 -0
  6. package/dist/chunk-2Y7YJKPE.mjs +47 -0
  7. package/dist/chunk-3U7SD3MS.mjs +55 -0
  8. package/dist/chunk-3VQNJ235.mjs +114 -0
  9. package/dist/chunk-55CEW76V.mjs +35 -0
  10. package/dist/chunk-6AFMNC42.mjs +146 -0
  11. package/dist/chunk-6OJF6XRN.mjs +117 -0
  12. package/dist/chunk-7LDIMXGM.mjs +181 -0
  13. package/dist/chunk-AMJ23O53.mjs +122 -0
  14. package/dist/chunk-BBJBJSXQ.mjs +44 -0
  15. package/dist/chunk-BGP2N52Z.mjs +126 -0
  16. package/dist/chunk-BMFN37JH.mjs +41 -0
  17. package/dist/chunk-CGOKTPXU.mjs +79 -0
  18. package/dist/chunk-CZ3BW5GL.mjs +81 -0
  19. package/dist/chunk-DBHJ5KC3.mjs +55 -0
  20. package/dist/chunk-DDPA2XXS.mjs +97 -0
  21. package/dist/chunk-DS2AMHN2.mjs +30 -0
  22. package/dist/chunk-E3K6O4FZ.mjs +57 -0
  23. package/dist/chunk-FWCSY2DS.mjs +37 -0
  24. package/dist/chunk-GPRJQ24C.mjs +28 -0
  25. package/dist/chunk-HS7TFG7V.mjs +24 -0
  26. package/dist/chunk-HUVTPUV2.mjs +256 -0
  27. package/dist/chunk-IAOOZCUY.mjs +90 -0
  28. package/dist/chunk-JF4PHPD5.mjs +111 -0
  29. package/dist/chunk-JU2RUWHF.mjs +123 -0
  30. package/dist/chunk-KKHTJNMM.mjs +86 -0
  31. package/dist/chunk-MJIEMGRD.mjs +266 -0
  32. package/dist/chunk-MKFL5MNH.mjs +372 -0
  33. package/dist/chunk-MQ72DIBH.mjs +105 -0
  34. package/dist/chunk-NGYG2EA6.mjs +148 -0
  35. package/dist/chunk-NWZ46DJL.mjs +213 -0
  36. package/dist/chunk-OXQQNQZI.mjs +75 -0
  37. package/dist/chunk-PMKODV6M.mjs +161 -0
  38. package/dist/chunk-QOJ2DQD6.mjs +57 -0
  39. package/dist/chunk-RL772EH7.mjs +126 -0
  40. package/dist/chunk-SLWCCURD.mjs +99 -0
  41. package/dist/chunk-V7CNWJT3.mjs +10 -0
  42. package/dist/chunk-VG6UF6UT.mjs +68 -0
  43. package/dist/chunk-VYMHBV6D.mjs +123 -0
  44. package/dist/chunk-VZ2NR7L3.mjs +195 -0
  45. package/dist/chunk-YN5SYTOO.mjs +117 -0
  46. package/dist/chunk-Z3MK2KKZ.mjs +83 -0
  47. package/dist/chunk-ZN2QKLF6.mjs +187 -0
  48. package/dist/chunk-ZZV5JVNW.mjs +34 -0
  49. package/dist/components/ui/accordion.js +142 -0
  50. package/dist/components/ui/accordion.mjs +14 -0
  51. package/dist/components/ui/alert-dialog.js +413 -0
  52. package/dist/components/ui/alert-dialog.mjs +34 -0
  53. package/dist/components/ui/alert.js +134 -0
  54. package/dist/components/ui/alert.mjs +12 -0
  55. package/dist/components/ui/avatar.js +173 -0
  56. package/dist/components/ui/avatar.mjs +18 -0
  57. package/dist/components/ui/badge.js +163 -0
  58. package/dist/components/ui/badge.mjs +11 -0
  59. package/dist/components/ui/button.js +198 -0
  60. package/dist/components/ui/button.mjs +11 -0
  61. package/dist/components/ui/calendar.js +408 -0
  62. package/dist/components/ui/calendar.mjs +12 -0
  63. package/dist/components/ui/card.js +156 -0
  64. package/dist/components/ui/card.mjs +20 -0
  65. package/dist/components/ui/checkbox.js +166 -0
  66. package/dist/components/ui/checkbox.mjs +11 -0
  67. package/dist/components/ui/chip.js +199 -0
  68. package/dist/components/ui/chip.mjs +10 -0
  69. package/dist/components/ui/data-table.js +925 -0
  70. package/dist/components/ui/data-table.mjs +29 -0
  71. package/dist/components/ui/date-picker.js +561 -0
  72. package/dist/components/ui/date-picker.mjs +15 -0
  73. package/dist/components/ui/dialog.js +378 -0
  74. package/dist/components/ui/dialog.mjs +30 -0
  75. package/dist/components/ui/drawer.js +213 -0
  76. package/dist/components/ui/drawer.mjs +28 -0
  77. package/dist/components/ui/dropdown-menu.js +338 -0
  78. package/dist/components/ui/dropdown-menu.mjs +38 -0
  79. package/dist/components/ui/empty.js +173 -0
  80. package/dist/components/ui/empty.mjs +18 -0
  81. package/dist/components/ui/field.js +359 -0
  82. package/dist/components/ui/field.mjs +28 -0
  83. package/dist/components/ui/input-group.js +406 -0
  84. package/dist/components/ui/input-group.mjs +22 -0
  85. package/dist/components/ui/input-otp.js +149 -0
  86. package/dist/components/ui/input-otp.mjs +14 -0
  87. package/dist/components/ui/input.js +81 -0
  88. package/dist/components/ui/input.mjs +8 -0
  89. package/dist/components/ui/label.js +85 -0
  90. package/dist/components/ui/label.mjs +8 -0
  91. package/dist/components/ui/pagination.js +333 -0
  92. package/dist/components/ui/pagination.mjs +22 -0
  93. package/dist/components/ui/popover.js +167 -0
  94. package/dist/components/ui/popover.mjs +22 -0
  95. package/dist/components/ui/progress.js +97 -0
  96. package/dist/components/ui/progress.mjs +8 -0
  97. package/dist/components/ui/radio-group.js +178 -0
  98. package/dist/components/ui/radio-group.mjs +12 -0
  99. package/dist/components/ui/select.js +262 -0
  100. package/dist/components/ui/select.mjs +28 -0
  101. package/dist/components/ui/separator.js +86 -0
  102. package/dist/components/ui/separator.mjs +8 -0
  103. package/dist/components/ui/sheet.js +227 -0
  104. package/dist/components/ui/sheet.mjs +26 -0
  105. package/dist/components/ui/skeleton.js +75 -0
  106. package/dist/components/ui/skeleton.mjs +8 -0
  107. package/dist/components/ui/sonner.js +86 -0
  108. package/dist/components/ui/sonner.mjs +7 -0
  109. package/dist/components/ui/spinner.js +93 -0
  110. package/dist/components/ui/spinner.mjs +10 -0
  111. package/dist/components/ui/switch.js +178 -0
  112. package/dist/components/ui/switch.mjs +11 -0
  113. package/dist/components/ui/table.js +184 -0
  114. package/dist/components/ui/table.mjs +22 -0
  115. package/dist/components/ui/tabs.js +181 -0
  116. package/dist/components/ui/tabs.mjs +16 -0
  117. package/dist/components/ui/textarea.js +79 -0
  118. package/dist/components/ui/textarea.mjs +8 -0
  119. package/dist/components/ui/toggle-group.js +184 -0
  120. package/dist/components/ui/toggle-group.mjs +12 -0
  121. package/dist/components/ui/toggle.js +108 -0
  122. package/dist/components/ui/toggle.mjs +11 -0
  123. package/dist/components/ui/tooltip.js +140 -0
  124. package/dist/components/ui/tooltip.mjs +16 -0
  125. package/dist/index.js +4312 -90
  126. package/dist/index.mjs +459 -158
  127. package/dist/lib/colors.js +84 -0
  128. package/dist/lib/colors.mjs +13 -0
  129. package/dist/lib/theme-provider.js +150 -0
  130. package/dist/lib/theme-provider.mjs +13 -0
  131. package/dist/lib/typography.js +157 -0
  132. package/dist/lib/typography.mjs +25 -0
  133. package/dist/lib/utils.js +34 -0
  134. package/dist/lib/utils.mjs +7 -0
  135. package/dist/styles.css +1 -1
  136. package/package.json +228 -11
  137. package/scripts/build-css.ts +15 -9
  138. package/src/components/index.tsx +443 -0
  139. package/src/components/ui/accordion.tsx +99 -0
  140. package/src/components/ui/alert-dialog.tsx +239 -0
  141. package/src/components/ui/alert.tsx +81 -0
  142. package/src/components/ui/avatar.tsx +130 -0
  143. package/src/components/ui/badge.tsx +57 -0
  144. package/src/components/ui/button.tsx +69 -37
  145. package/src/components/ui/calendar.tsx +252 -0
  146. package/src/components/ui/card.tsx +106 -0
  147. package/src/components/ui/checkbox.tsx +111 -0
  148. package/src/components/ui/chip.tsx +65 -0
  149. package/src/components/ui/data-table.tsx +490 -0
  150. package/src/components/ui/date-picker.tsx +133 -0
  151. package/src/components/ui/dialog.tsx +195 -0
  152. package/src/components/ui/drawer.tsx +169 -0
  153. package/src/components/ui/dropdown-menu.tsx +315 -0
  154. package/src/components/ui/empty.tsx +128 -0
  155. package/src/components/ui/field.tsx +273 -0
  156. package/src/components/ui/input-group.tsx +190 -0
  157. package/src/components/ui/input-otp.tsx +90 -0
  158. package/src/components/ui/input.tsx +28 -0
  159. package/src/components/ui/label.tsx +24 -0
  160. package/src/components/ui/pagination.tsx +148 -0
  161. package/src/components/ui/popover.tsx +112 -0
  162. package/src/components/ui/progress.tsx +40 -0
  163. package/src/components/ui/radio-group.tsx +129 -0
  164. package/src/components/ui/select.tsx +201 -0
  165. package/src/components/ui/separator.tsx +26 -0
  166. package/src/components/ui/sheet.tsx +182 -0
  167. package/src/components/ui/skeleton.tsx +22 -0
  168. package/src/components/ui/sonner.tsx +48 -0
  169. package/src/components/ui/spinner.tsx +41 -0
  170. package/src/components/ui/switch.tsx +126 -0
  171. package/src/components/ui/table.tsx +143 -0
  172. package/src/components/ui/tabs.tsx +119 -0
  173. package/src/components/ui/textarea.tsx +28 -0
  174. package/src/components/ui/toggle-group.tsx +94 -0
  175. package/src/components/ui/toggle.tsx +59 -0
  176. package/src/components/ui/tooltip.tsx +80 -0
  177. package/src/index.ts +15 -3
  178. package/src/lib/colors.ts +74 -0
  179. package/src/lib/slot.tsx +68 -0
  180. package/src/lib/theme-provider.tsx +134 -0
  181. package/src/lib/typography.ts +153 -0
  182. package/src/lib/utils.ts +1 -1
  183. package/src/styles/globals.css +377 -107
  184. package/src/styles/styles-css.ts +1 -1
  185. package/tsup.config.ts +48 -2
  186. package/dist/index.d.mts +0 -27
  187. package/dist/index.d.ts +0 -27
  188. package/src/provider/ShadcnProvider.tsx +0 -89
  189. package/src/provider/index.ts +0 -2
@@ -0,0 +1,29 @@
1
+ "use client";
2
+ import {
3
+ DataTable,
4
+ DataTableColumnHeader,
5
+ DataTablePagination,
6
+ DataTableSkeleton,
7
+ DataTableToolbar,
8
+ getSelectionColumn
9
+ } from "../../chunk-MKFL5MNH.mjs";
10
+ import "../../chunk-HS7TFG7V.mjs";
11
+ import "../../chunk-BGP2N52Z.mjs";
12
+ import "../../chunk-VZ2NR7L3.mjs";
13
+ import "../../chunk-MJIEMGRD.mjs";
14
+ import "../../chunk-DS2AMHN2.mjs";
15
+ import "../../chunk-JF4PHPD5.mjs";
16
+ import "../../chunk-IAOOZCUY.mjs";
17
+ import "../../chunk-DBHJ5KC3.mjs";
18
+ import "../../chunk-OXQQNQZI.mjs";
19
+ import "../../chunk-QOJ2DQD6.mjs";
20
+ import "../../chunk-V7CNWJT3.mjs";
21
+ import "../../chunk-FWCSY2DS.mjs";
22
+ export {
23
+ DataTable,
24
+ DataTableColumnHeader,
25
+ DataTablePagination,
26
+ DataTableSkeleton,
27
+ DataTableToolbar,
28
+ getSelectionColumn
29
+ };
@@ -0,0 +1,561 @@
1
+ "use strict";
2
+ "use client";
3
+ var __create = Object.create;
4
+ var __defProp = Object.defineProperty;
5
+ var __defProps = Object.defineProperties;
6
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
8
+ var __getOwnPropNames = Object.getOwnPropertyNames;
9
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
10
+ var __getProtoOf = Object.getPrototypeOf;
11
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
12
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
13
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
14
+ var __spreadValues = (a, b) => {
15
+ for (var prop in b || (b = {}))
16
+ if (__hasOwnProp.call(b, prop))
17
+ __defNormalProp(a, prop, b[prop]);
18
+ if (__getOwnPropSymbols)
19
+ for (var prop of __getOwnPropSymbols(b)) {
20
+ if (__propIsEnum.call(b, prop))
21
+ __defNormalProp(a, prop, b[prop]);
22
+ }
23
+ return a;
24
+ };
25
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
26
+ var __objRest = (source, exclude) => {
27
+ var target = {};
28
+ for (var prop in source)
29
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
30
+ target[prop] = source[prop];
31
+ if (source != null && __getOwnPropSymbols)
32
+ for (var prop of __getOwnPropSymbols(source)) {
33
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
34
+ target[prop] = source[prop];
35
+ }
36
+ return target;
37
+ };
38
+ var __export = (target, all) => {
39
+ for (var name in all)
40
+ __defProp(target, name, { get: all[name], enumerable: true });
41
+ };
42
+ var __copyProps = (to, from, except, desc) => {
43
+ if (from && typeof from === "object" || typeof from === "function") {
44
+ for (let key of __getOwnPropNames(from))
45
+ if (!__hasOwnProp.call(to, key) && key !== except)
46
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
47
+ }
48
+ return to;
49
+ };
50
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
51
+ // If the importer is in node compatibility mode or this is not an ESM
52
+ // file that has been converted to a CommonJS file using a Babel-
53
+ // compatible transform (i.e. "__esModule" has not been set), then set
54
+ // "default" to the CommonJS "module.exports" for node compatibility.
55
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
56
+ mod
57
+ ));
58
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
59
+
60
+ // src/components/ui/date-picker.tsx
61
+ var date_picker_exports = {};
62
+ __export(date_picker_exports, {
63
+ DatePicker: () => DatePicker
64
+ });
65
+ module.exports = __toCommonJS(date_picker_exports);
66
+ var React4 = __toESM(require("react"));
67
+ var import_date_fns = require("date-fns");
68
+ var import_lucide_react3 = require("lucide-react");
69
+
70
+ // src/lib/utils.ts
71
+ var import_clsx = require("clsx");
72
+ var import_tailwind_merge = require("tailwind-merge");
73
+ function cn(...inputs) {
74
+ return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
75
+ }
76
+
77
+ // src/components/ui/button.tsx
78
+ var import_react = require("react");
79
+ var import_class_variance_authority = require("class-variance-authority");
80
+ var import_lucide_react = require("lucide-react");
81
+
82
+ // src/lib/slot.tsx
83
+ var React = __toESM(require("react"));
84
+ function mergeRefs(...refs) {
85
+ return (value) => {
86
+ for (const ref of refs) {
87
+ if (typeof ref === "function") ref(value);
88
+ else if (ref !== null)
89
+ ref.current = value;
90
+ }
91
+ };
92
+ }
93
+ var Slot = React.forwardRef(
94
+ (_a, forwardedRef) => {
95
+ var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
96
+ const child = React.Children.only(children);
97
+ if (!React.isValidElement(child)) return null;
98
+ const childProps = child.props;
99
+ const merged = __spreadValues({}, props);
100
+ for (const key of Object.keys(childProps)) {
101
+ if (key === "className") {
102
+ merged.className = [props.className, childProps.className].filter(Boolean).join(" ");
103
+ } else if (key === "style") {
104
+ merged.style = __spreadValues(__spreadValues({}, props.style), childProps.style);
105
+ } else if (key.startsWith("on") && typeof childProps[key] === "function") {
106
+ const parentHandler = props[key];
107
+ if (typeof parentHandler === "function") {
108
+ merged[key] = (...args) => {
109
+ childProps[key](...args);
110
+ parentHandler(...args);
111
+ };
112
+ } else {
113
+ merged[key] = childProps[key];
114
+ }
115
+ } else {
116
+ merged[key] = childProps[key];
117
+ }
118
+ }
119
+ const childRef = child.ref;
120
+ merged.ref = forwardedRef ? mergeRefs(forwardedRef, childRef) : childRef;
121
+ return React.cloneElement(
122
+ child,
123
+ merged
124
+ );
125
+ }
126
+ );
127
+ Slot.displayName = "Slot";
128
+
129
+ // src/components/ui/button.tsx
130
+ var import_jsx_runtime = require("react/jsx-runtime");
131
+ var buttonVariants = (0, import_class_variance_authority.cva)(
132
+ "inline-flex shrink-0 cursor-pointer items-center justify-center gap-2 font-sans text-sm font-medium whitespace-nowrap transition-all active:scale-[0.98] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
133
+ {
134
+ variants: {
135
+ variant: {
136
+ default: "bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",
137
+ secondary: "bg-brand-secondary text-brand-secondary-foreground shadow-xs hover:bg-brand-secondary/80 focus-visible:ring-brand-secondary/30",
138
+ destructive: "bg-destructive text-destructive-foreground shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40",
139
+ outline: "border border-input bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
140
+ "outline-primary": "border border-primary text-foreground bg-transparent shadow-xs hover:bg-primary/5 focus-visible:ring-primary/50",
141
+ "outline-secondary": "border border-brand-secondary text-brand-secondary bg-transparent shadow-xs hover:bg-brand-secondary/10 focus-visible:ring-brand-secondary/30",
142
+ ghost: "hover:bg-accent hover:text-accent-foreground hover:shadow-xs dark:hover:bg-accent/50",
143
+ link: "text-primary underline-offset-4 hover:underline"
144
+ },
145
+ size: {
146
+ default: "h-9 px-4 py-2 has-[>svg]:px-3",
147
+ xs: "h-6 gap-1 px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",
148
+ sm: "h-8 gap-1.5 px-3 has-[>svg]:px-2.5",
149
+ lg: "h-10 px-6 has-[>svg]:px-4",
150
+ icon: "size-9",
151
+ "icon-xs": "size-6 [&_svg:not([class*='size-'])]:size-3",
152
+ "icon-sm": "size-8",
153
+ "icon-lg": "size-10"
154
+ }
155
+ },
156
+ defaultVariants: {
157
+ variant: "default",
158
+ size: "default"
159
+ }
160
+ }
161
+ );
162
+ var Button = (0, import_react.forwardRef)(function Button2(_a, ref) {
163
+ var _b = _a, {
164
+ className,
165
+ variant,
166
+ size,
167
+ asChild = false,
168
+ loading = false,
169
+ disabled,
170
+ children
171
+ } = _b, props = __objRest(_b, [
172
+ "className",
173
+ "variant",
174
+ "size",
175
+ "asChild",
176
+ "loading",
177
+ "disabled",
178
+ "children"
179
+ ]);
180
+ const Comp = asChild ? Slot : "button";
181
+ const isIconOnly = size === "icon" || size === "icon-xs" || size === "icon-sm" || size === "icon-lg";
182
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
183
+ Comp,
184
+ __spreadProps(__spreadValues({
185
+ className: cn(buttonVariants({ variant, size, className })),
186
+ "data-size": size,
187
+ "data-slot": "button",
188
+ "data-variant": variant,
189
+ disabled: loading || disabled,
190
+ ref
191
+ }, props), {
192
+ children: loading ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
193
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Loader2, { "aria-hidden": "true", className: "animate-spin" }),
194
+ !isIconOnly && children
195
+ ] }) : children
196
+ })
197
+ );
198
+ });
199
+
200
+ // src/components/ui/calendar.tsx
201
+ var React2 = __toESM(require("react"));
202
+ var import_lucide_react2 = require("lucide-react");
203
+ var import_react_day_picker = require("react-day-picker");
204
+ var import_jsx_runtime2 = require("react/jsx-runtime");
205
+ function CalendarRoot(_a) {
206
+ var _b = _a, {
207
+ className,
208
+ rootRef
209
+ } = _b, props = __objRest(_b, [
210
+ "className",
211
+ "rootRef"
212
+ ]);
213
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
214
+ "div",
215
+ __spreadValues({
216
+ className: cn(className),
217
+ "data-slot": "calendar",
218
+ ref: rootRef
219
+ }, props)
220
+ );
221
+ }
222
+ function CalendarChevron(_a) {
223
+ var _b = _a, {
224
+ className,
225
+ orientation
226
+ } = _b, props = __objRest(_b, [
227
+ "className",
228
+ "orientation"
229
+ ]);
230
+ if (orientation === "left") {
231
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_lucide_react2.ChevronLeftIcon, __spreadValues({ className: cn("size-4", className) }, props));
232
+ }
233
+ if (orientation === "right") {
234
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
235
+ import_lucide_react2.ChevronRightIcon,
236
+ __spreadValues({
237
+ className: cn("size-4", className)
238
+ }, props)
239
+ );
240
+ }
241
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_lucide_react2.ChevronDownIcon, __spreadValues({ className: cn("size-4", className) }, props));
242
+ }
243
+ function CalendarWeekNumber(_a) {
244
+ var _b = _a, {
245
+ children
246
+ } = _b, props = __objRest(_b, [
247
+ "children"
248
+ ]);
249
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("td", __spreadProps(__spreadValues({}, props), { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "flex size-(--cell-size) items-center justify-center text-center", children }) }));
250
+ }
251
+ function Calendar(_a) {
252
+ var _b = _a, {
253
+ className,
254
+ classNames,
255
+ showOutsideDays = true,
256
+ captionLayout = "dropdown",
257
+ buttonVariant = "ghost",
258
+ formatters,
259
+ components
260
+ } = _b, props = __objRest(_b, [
261
+ "className",
262
+ "classNames",
263
+ "showOutsideDays",
264
+ "captionLayout",
265
+ "buttonVariant",
266
+ "formatters",
267
+ "components"
268
+ ]);
269
+ const defaultClassNames = (0, import_react_day_picker.getDefaultClassNames)();
270
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
271
+ import_react_day_picker.DayPicker,
272
+ __spreadValues({
273
+ captionLayout,
274
+ className: cn(
275
+ "group/calendar bg-background p-3 font-sans border border-border shadow-sm [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",
276
+ String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,
277
+ String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,
278
+ className
279
+ ),
280
+ classNames: __spreadValues({
281
+ root: cn("w-fit", defaultClassNames.root),
282
+ months: cn(
283
+ "relative flex flex-col gap-4 md:flex-row",
284
+ defaultClassNames.months
285
+ ),
286
+ month: cn("flex w-full flex-col gap-4", defaultClassNames.month),
287
+ nav: cn(
288
+ "absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",
289
+ defaultClassNames.nav
290
+ ),
291
+ button_previous: cn(
292
+ buttonVariants({ variant: buttonVariant }),
293
+ "size-(--cell-size) p-0 select-none aria-disabled:opacity-50",
294
+ defaultClassNames.button_previous
295
+ ),
296
+ button_next: cn(
297
+ buttonVariants({ variant: buttonVariant }),
298
+ "size-(--cell-size) p-0 select-none aria-disabled:opacity-50",
299
+ defaultClassNames.button_next
300
+ ),
301
+ month_caption: cn(
302
+ "flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)",
303
+ defaultClassNames.month_caption
304
+ ),
305
+ dropdowns: cn(
306
+ "flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium",
307
+ defaultClassNames.dropdowns
308
+ ),
309
+ dropdown_root: cn(
310
+ "relative border border-input shadow-xs has-focus:border-ring has-focus:ring-[3px] has-focus:ring-ring/50",
311
+ defaultClassNames.dropdown_root
312
+ ),
313
+ dropdown: cn(
314
+ "absolute inset-0 bg-popover opacity-0",
315
+ defaultClassNames.dropdown
316
+ ),
317
+ caption_label: cn(
318
+ "font-medium select-none",
319
+ captionLayout === "label" ? "text-sm" : "flex h-8 items-center gap-1 pr-1 pl-2 text-sm [&>svg]:size-3.5 [&>svg]:text-muted-foreground",
320
+ defaultClassNames.caption_label
321
+ ),
322
+ table: "w-full border-collapse",
323
+ weekdays: cn("flex", defaultClassNames.weekdays),
324
+ weekday: cn(
325
+ "flex-1 text-[0.8rem] font-normal text-muted-foreground select-none",
326
+ defaultClassNames.weekday
327
+ ),
328
+ week: cn("mt-2 flex w-full", defaultClassNames.week),
329
+ week_number_header: cn(
330
+ "w-(--cell-size) select-none",
331
+ defaultClassNames.week_number_header
332
+ ),
333
+ week_number: cn(
334
+ "text-[0.8rem] text-muted-foreground select-none",
335
+ defaultClassNames.week_number
336
+ ),
337
+ day: cn(
338
+ "group/day relative aspect-square h-full w-full p-0 text-center select-none",
339
+ defaultClassNames.day
340
+ ),
341
+ range_start: cn("bg-accent", defaultClassNames.range_start),
342
+ range_middle: cn("rounded-none", defaultClassNames.range_middle),
343
+ range_end: cn("bg-accent", defaultClassNames.range_end),
344
+ today: cn(
345
+ "bg-accent text-accent-foreground",
346
+ defaultClassNames.today
347
+ ),
348
+ outside: cn(
349
+ "text-muted-foreground aria-selected:text-muted-foreground",
350
+ defaultClassNames.outside
351
+ ),
352
+ disabled: cn(
353
+ "text-muted-foreground opacity-50",
354
+ defaultClassNames.disabled
355
+ ),
356
+ hidden: cn("invisible", defaultClassNames.hidden)
357
+ }, classNames),
358
+ components: __spreadValues({
359
+ Root: CalendarRoot,
360
+ Chevron: CalendarChevron,
361
+ DayButton: CalendarDayButton,
362
+ WeekNumber: CalendarWeekNumber
363
+ }, components),
364
+ formatters: __spreadValues({
365
+ formatMonthDropdown: (date) => date.toLocaleString("default", { month: "short" })
366
+ }, formatters),
367
+ showOutsideDays
368
+ }, props)
369
+ );
370
+ }
371
+ function CalendarDayButton(_a) {
372
+ var _b = _a, {
373
+ className,
374
+ day,
375
+ modifiers
376
+ } = _b, props = __objRest(_b, [
377
+ "className",
378
+ "day",
379
+ "modifiers"
380
+ ]);
381
+ const defaultClassNames = (0, import_react_day_picker.getDefaultClassNames)();
382
+ const ref = React2.useRef(null);
383
+ React2.useEffect(() => {
384
+ var _a2;
385
+ if (modifiers.focused) (_a2 = ref.current) == null ? void 0 : _a2.focus();
386
+ }, [modifiers.focused]);
387
+ const selectedSingle = modifiers.selected && !modifiers.range_start && !modifiers.range_end ? !modifiers.range_middle : null;
388
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
389
+ Button,
390
+ __spreadValues({
391
+ className: cn(
392
+ "flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal rounded-none group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-ring/50 data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground dark:hover:text-accent-foreground [&>span]:text-xs [&>span]:opacity-70",
393
+ defaultClassNames.day,
394
+ className
395
+ ),
396
+ "data-day": day.date.toLocaleDateString(),
397
+ "data-range-end": modifiers.range_end,
398
+ "data-range-middle": modifiers.range_middle,
399
+ "data-range-start": modifiers.range_start,
400
+ "data-selected-single": selectedSingle,
401
+ ref,
402
+ size: "icon",
403
+ variant: "ghost"
404
+ }, props)
405
+ );
406
+ }
407
+
408
+ // src/components/ui/popover.tsx
409
+ var import_popover = require("@base-ui/react/popover");
410
+
411
+ // src/lib/theme-provider.tsx
412
+ var import_react2 = require("react");
413
+ var import_jsx_runtime3 = require("react/jsx-runtime");
414
+ var ThemeVarsContext = (0, import_react2.createContext)({});
415
+ function useThemeVars() {
416
+ return (0, import_react2.useContext)(ThemeVarsContext);
417
+ }
418
+
419
+ // src/components/ui/popover.tsx
420
+ var import_jsx_runtime4 = require("react/jsx-runtime");
421
+ function Popover(_a) {
422
+ var props = __objRest(_a, []);
423
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_popover.Popover.Root, __spreadValues({ "data-slot": "popover" }, props));
424
+ }
425
+ function PopoverTrigger(_a) {
426
+ var props = __objRest(_a, []);
427
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_popover.Popover.Trigger, __spreadValues({ "data-slot": "popover-trigger" }, props));
428
+ }
429
+ function PopoverContent(_a) {
430
+ var _b = _a, {
431
+ className,
432
+ align = "center",
433
+ sideOffset = 4,
434
+ style
435
+ } = _b, props = __objRest(_b, [
436
+ "className",
437
+ "align",
438
+ "sideOffset",
439
+ "style"
440
+ ]);
441
+ const themeVars = useThemeVars();
442
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_popover.Popover.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
443
+ import_popover.Popover.Positioner,
444
+ {
445
+ align,
446
+ sideOffset,
447
+ children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
448
+ import_popover.Popover.Popup,
449
+ __spreadValues({
450
+ className: cn(
451
+ "z-50 w-72 border border-border bg-popover p-4 text-popover-foreground shadow-md outline-hidden data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 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",
452
+ className
453
+ ),
454
+ "data-slot": "popover-content",
455
+ style: __spreadValues(__spreadValues({}, themeVars), style)
456
+ }, props)
457
+ )
458
+ }
459
+ ) });
460
+ }
461
+
462
+ // src/components/ui/date-picker.tsx
463
+ var import_jsx_runtime5 = require("react/jsx-runtime");
464
+ function DatePicker({
465
+ value,
466
+ onChange,
467
+ placeholder = "Pick a date",
468
+ showTimePicker = false,
469
+ disabled = false,
470
+ className,
471
+ calendarProps
472
+ }) {
473
+ const [open, setOpen] = React4.useState(false);
474
+ function handleDaySelect(day) {
475
+ if (!day) {
476
+ onChange == null ? void 0 : onChange(void 0);
477
+ return;
478
+ }
479
+ if (showTimePicker && value) {
480
+ day.setHours(value.getHours(), value.getMinutes());
481
+ }
482
+ onChange == null ? void 0 : onChange(day);
483
+ if (!showTimePicker) setOpen(false);
484
+ }
485
+ function handleTimeChange(e) {
486
+ const [hours, minutes] = e.target.value.split(":").map(Number);
487
+ const next = value ? new Date(value) : /* @__PURE__ */ new Date();
488
+ next.setHours(hours, minutes, 0, 0);
489
+ onChange == null ? void 0 : onChange(next);
490
+ }
491
+ const timeValue = value ? `${String(value.getHours()).padStart(2, "0")}:${String(value.getMinutes()).padStart(2, "0")}` : "";
492
+ let displayValue;
493
+ if (value && showTimePicker) {
494
+ displayValue = (0, import_date_fns.format)(value, "dd/MM/yyyy HH:mm");
495
+ } else if (value) {
496
+ displayValue = (0, import_date_fns.format)(value, "dd/MM/yyyy");
497
+ }
498
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Popover, { onOpenChange: disabled ? void 0 : setOpen, open, children: [
499
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
500
+ PopoverTrigger,
501
+ {
502
+ render: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
503
+ Button,
504
+ {
505
+ className: cn(
506
+ "w-full justify-start rounded-none font-normal data-[empty=true]:text-muted-foreground",
507
+ className
508
+ ),
509
+ "data-empty": !value,
510
+ "data-slot": "date-picker-trigger",
511
+ disabled,
512
+ variant: "outline"
513
+ }
514
+ ),
515
+ children: [
516
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_lucide_react3.CalendarIcon, {}),
517
+ value ? displayValue : placeholder
518
+ ]
519
+ }
520
+ ),
521
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
522
+ PopoverContent,
523
+ {
524
+ align: "start",
525
+ className: "w-auto rounded-none p-0 shadow-sm",
526
+ children: [
527
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
528
+ Calendar,
529
+ __spreadProps(__spreadValues({
530
+ captionLayout: "dropdown",
531
+ mode: "single",
532
+ onSelect: handleDaySelect,
533
+ selected: value
534
+ }, calendarProps), {
535
+ className: cn(
536
+ "rounded-none border-0 shadow-none",
537
+ calendarProps == null ? void 0 : calendarProps.className
538
+ )
539
+ })
540
+ ),
541
+ showTimePicker ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "border-t border-border px-3 pb-3 pt-2", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("label", { className: "mb-1.5 block text-xs font-medium text-muted-foreground", children: [
542
+ "Time",
543
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
544
+ "input",
545
+ {
546
+ 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",
547
+ onChange: handleTimeChange,
548
+ type: "time",
549
+ value: timeValue
550
+ }
551
+ )
552
+ ] }) }) : null
553
+ ]
554
+ }
555
+ )
556
+ ] });
557
+ }
558
+ // Annotate the CommonJS export names for ESM import in node:
559
+ 0 && (module.exports = {
560
+ DatePicker
561
+ });
@@ -0,0 +1,15 @@
1
+ "use client";
2
+ import {
3
+ DatePicker
4
+ } from "../../chunk-AMJ23O53.mjs";
5
+ import "../../chunk-MQ72DIBH.mjs";
6
+ import "../../chunk-2WZVSBAY.mjs";
7
+ import "../../chunk-IAOOZCUY.mjs";
8
+ import "../../chunk-DBHJ5KC3.mjs";
9
+ import "../../chunk-OXQQNQZI.mjs";
10
+ import "../../chunk-QOJ2DQD6.mjs";
11
+ import "../../chunk-V7CNWJT3.mjs";
12
+ import "../../chunk-FWCSY2DS.mjs";
13
+ export {
14
+ DatePicker
15
+ };