@wealthx/shadcn 0.0.1 → 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 (186) hide show
  1. package/.turbo/turbo-build.log +160 -0
  2. package/CHANGELOG.md +13 -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 +4409 -0
  125. package/dist/index.mjs +462 -0
  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 +2 -0
  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/src/provider/ShadcnProvider.tsx +0 -89
  186. package/src/provider/index.ts +0 -2
@@ -0,0 +1,406 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __defProps = Object.defineProperties;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
7
+ var __getOwnPropNames = Object.getOwnPropertyNames;
8
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
9
+ var __getProtoOf = Object.getPrototypeOf;
10
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
11
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
12
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
13
+ var __spreadValues = (a, b) => {
14
+ for (var prop in b || (b = {}))
15
+ if (__hasOwnProp.call(b, prop))
16
+ __defNormalProp(a, prop, b[prop]);
17
+ if (__getOwnPropSymbols)
18
+ for (var prop of __getOwnPropSymbols(b)) {
19
+ if (__propIsEnum.call(b, prop))
20
+ __defNormalProp(a, prop, b[prop]);
21
+ }
22
+ return a;
23
+ };
24
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
25
+ var __objRest = (source, exclude) => {
26
+ var target = {};
27
+ for (var prop in source)
28
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
29
+ target[prop] = source[prop];
30
+ if (source != null && __getOwnPropSymbols)
31
+ for (var prop of __getOwnPropSymbols(source)) {
32
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
33
+ target[prop] = source[prop];
34
+ }
35
+ return target;
36
+ };
37
+ var __export = (target, all) => {
38
+ for (var name in all)
39
+ __defProp(target, name, { get: all[name], enumerable: true });
40
+ };
41
+ var __copyProps = (to, from, except, desc) => {
42
+ if (from && typeof from === "object" || typeof from === "function") {
43
+ for (let key of __getOwnPropNames(from))
44
+ if (!__hasOwnProp.call(to, key) && key !== except)
45
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
46
+ }
47
+ return to;
48
+ };
49
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
50
+ // If the importer is in node compatibility mode or this is not an ESM
51
+ // file that has been converted to a CommonJS file using a Babel-
52
+ // compatible transform (i.e. "__esModule" has not been set), then set
53
+ // "default" to the CommonJS "module.exports" for node compatibility.
54
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
55
+ mod
56
+ ));
57
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
58
+
59
+ // src/components/ui/input-group.tsx
60
+ var input_group_exports = {};
61
+ __export(input_group_exports, {
62
+ InputGroup: () => InputGroup,
63
+ InputGroupAddon: () => InputGroupAddon,
64
+ InputGroupButton: () => InputGroupButton,
65
+ InputGroupInput: () => InputGroupInput,
66
+ InputGroupText: () => InputGroupText,
67
+ InputGroupTextarea: () => InputGroupTextarea
68
+ });
69
+ module.exports = __toCommonJS(input_group_exports);
70
+ var import_class_variance_authority2 = require("class-variance-authority");
71
+
72
+ // src/lib/utils.ts
73
+ var import_clsx = require("clsx");
74
+ var import_tailwind_merge = require("tailwind-merge");
75
+ function cn(...inputs) {
76
+ return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
77
+ }
78
+
79
+ // src/components/ui/button.tsx
80
+ var import_react = require("react");
81
+ var import_class_variance_authority = require("class-variance-authority");
82
+ var import_lucide_react = require("lucide-react");
83
+
84
+ // src/lib/slot.tsx
85
+ var React = __toESM(require("react"));
86
+ function mergeRefs(...refs) {
87
+ return (value) => {
88
+ for (const ref of refs) {
89
+ if (typeof ref === "function") ref(value);
90
+ else if (ref !== null)
91
+ ref.current = value;
92
+ }
93
+ };
94
+ }
95
+ var Slot = React.forwardRef(
96
+ (_a, forwardedRef) => {
97
+ var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
98
+ const child = React.Children.only(children);
99
+ if (!React.isValidElement(child)) return null;
100
+ const childProps = child.props;
101
+ const merged = __spreadValues({}, props);
102
+ for (const key of Object.keys(childProps)) {
103
+ if (key === "className") {
104
+ merged.className = [props.className, childProps.className].filter(Boolean).join(" ");
105
+ } else if (key === "style") {
106
+ merged.style = __spreadValues(__spreadValues({}, props.style), childProps.style);
107
+ } else if (key.startsWith("on") && typeof childProps[key] === "function") {
108
+ const parentHandler = props[key];
109
+ if (typeof parentHandler === "function") {
110
+ merged[key] = (...args) => {
111
+ childProps[key](...args);
112
+ parentHandler(...args);
113
+ };
114
+ } else {
115
+ merged[key] = childProps[key];
116
+ }
117
+ } else {
118
+ merged[key] = childProps[key];
119
+ }
120
+ }
121
+ const childRef = child.ref;
122
+ merged.ref = forwardedRef ? mergeRefs(forwardedRef, childRef) : childRef;
123
+ return React.cloneElement(
124
+ child,
125
+ merged
126
+ );
127
+ }
128
+ );
129
+ Slot.displayName = "Slot";
130
+
131
+ // src/components/ui/button.tsx
132
+ var import_jsx_runtime = require("react/jsx-runtime");
133
+ var buttonVariants = (0, import_class_variance_authority.cva)(
134
+ "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",
135
+ {
136
+ variants: {
137
+ variant: {
138
+ default: "bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",
139
+ secondary: "bg-brand-secondary text-brand-secondary-foreground shadow-xs hover:bg-brand-secondary/80 focus-visible:ring-brand-secondary/30",
140
+ 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",
141
+ 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",
142
+ "outline-primary": "border border-primary text-foreground bg-transparent shadow-xs hover:bg-primary/5 focus-visible:ring-primary/50",
143
+ "outline-secondary": "border border-brand-secondary text-brand-secondary bg-transparent shadow-xs hover:bg-brand-secondary/10 focus-visible:ring-brand-secondary/30",
144
+ ghost: "hover:bg-accent hover:text-accent-foreground hover:shadow-xs dark:hover:bg-accent/50",
145
+ link: "text-primary underline-offset-4 hover:underline"
146
+ },
147
+ size: {
148
+ default: "h-9 px-4 py-2 has-[>svg]:px-3",
149
+ xs: "h-6 gap-1 px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",
150
+ sm: "h-8 gap-1.5 px-3 has-[>svg]:px-2.5",
151
+ lg: "h-10 px-6 has-[>svg]:px-4",
152
+ icon: "size-9",
153
+ "icon-xs": "size-6 [&_svg:not([class*='size-'])]:size-3",
154
+ "icon-sm": "size-8",
155
+ "icon-lg": "size-10"
156
+ }
157
+ },
158
+ defaultVariants: {
159
+ variant: "default",
160
+ size: "default"
161
+ }
162
+ }
163
+ );
164
+ var Button = (0, import_react.forwardRef)(function Button2(_a, ref) {
165
+ var _b = _a, {
166
+ className,
167
+ variant,
168
+ size,
169
+ asChild = false,
170
+ loading = false,
171
+ disabled,
172
+ children
173
+ } = _b, props = __objRest(_b, [
174
+ "className",
175
+ "variant",
176
+ "size",
177
+ "asChild",
178
+ "loading",
179
+ "disabled",
180
+ "children"
181
+ ]);
182
+ const Comp = asChild ? Slot : "button";
183
+ const isIconOnly = size === "icon" || size === "icon-xs" || size === "icon-sm" || size === "icon-lg";
184
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
185
+ Comp,
186
+ __spreadProps(__spreadValues({
187
+ className: cn(buttonVariants({ variant, size, className })),
188
+ "data-size": size,
189
+ "data-slot": "button",
190
+ "data-variant": variant,
191
+ disabled: loading || disabled,
192
+ ref
193
+ }, props), {
194
+ children: loading ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
195
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Loader2, { "aria-hidden": "true", className: "animate-spin" }),
196
+ !isIconOnly && children
197
+ ] }) : children
198
+ })
199
+ );
200
+ });
201
+
202
+ // src/components/ui/input.tsx
203
+ var import_jsx_runtime2 = require("react/jsx-runtime");
204
+ function Input(_a) {
205
+ var _b = _a, { className, type } = _b, props = __objRest(_b, ["className", "type"]);
206
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
207
+ "input",
208
+ __spreadValues({
209
+ className: cn(
210
+ "h-9 w-full min-w-0 border border-input bg-transparent px-3 py-1 text-base font-sans shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30",
211
+ "focus-visible:border-primary focus-visible:ring-[3px] focus-visible:ring-primary/20",
212
+ "aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",
213
+ className
214
+ ),
215
+ "data-slot": "input",
216
+ type
217
+ }, props)
218
+ );
219
+ }
220
+
221
+ // src/components/ui/textarea.tsx
222
+ var import_jsx_runtime3 = require("react/jsx-runtime");
223
+ function Textarea(_a) {
224
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
225
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
226
+ "textarea",
227
+ __spreadValues({
228
+ className: cn(
229
+ // WealthX: removed shadow-xs (flat panels), added font-sans
230
+ "flex field-sizing-content min-h-16 w-full border border-input bg-transparent px-3 py-2 text-base font-sans transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-primary focus-visible:ring-[3px] focus-visible:ring-primary/20 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:ring-destructive/40",
231
+ className
232
+ ),
233
+ "data-slot": "textarea"
234
+ }, props)
235
+ );
236
+ }
237
+
238
+ // src/components/ui/input-group.tsx
239
+ var import_jsx_runtime4 = require("react/jsx-runtime");
240
+ function InputGroup(_a) {
241
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
242
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
243
+ "div",
244
+ __spreadValues({
245
+ className: cn(
246
+ "group/input-group relative flex w-full items-center border border-input shadow-xs transition-[color,box-shadow] outline-none dark:bg-input/30",
247
+ "h-9 min-w-0 has-[>textarea]:h-auto",
248
+ // Variants based on alignment.
249
+ "has-[>[data-align=inline-start]]:[&>input]:pl-2",
250
+ "has-[>[data-align=inline-end]]:[&>input]:pr-2",
251
+ "has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3",
252
+ "has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3",
253
+ // Focus state.
254
+ "has-[[data-slot=input-group-control]:focus-visible]:border-primary has-[[data-slot=input-group-control]:focus-visible]:ring-[3px] has-[[data-slot=input-group-control]:focus-visible]:ring-primary/20",
255
+ // Error state.
256
+ "has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-destructive/20 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40",
257
+ className
258
+ ),
259
+ "data-slot": "input-group",
260
+ role: "group"
261
+ }, props)
262
+ );
263
+ }
264
+ var inputGroupAddonVariants = (0, import_class_variance_authority2.cva)(
265
+ "flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4",
266
+ {
267
+ variants: {
268
+ align: {
269
+ "inline-start": "order-first pl-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]",
270
+ "inline-end": "order-last pr-3 has-[>button]:mr-[-0.45rem] has-[>kbd]:mr-[-0.35rem]",
271
+ "block-start": "order-first w-full justify-start px-3 pt-3 group-has-[>input]/input-group:pt-2.5 [.border-b]:pb-3",
272
+ "block-end": "order-last w-full justify-start px-3 pb-3 group-has-[>input]/input-group:pb-2.5 [.border-t]:pt-3"
273
+ }
274
+ },
275
+ defaultVariants: {
276
+ align: "inline-start"
277
+ }
278
+ }
279
+ );
280
+ function InputGroupAddon(_a) {
281
+ var _b = _a, {
282
+ className,
283
+ align = "inline-start"
284
+ } = _b, props = __objRest(_b, [
285
+ "className",
286
+ "align"
287
+ ]);
288
+ return (
289
+ // eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions -- click only forwards focus to the sibling input; the div is not truly interactive
290
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
291
+ "div",
292
+ __spreadValues({
293
+ className: cn(inputGroupAddonVariants({ align }), className),
294
+ "data-align": align,
295
+ "data-slot": "input-group-addon",
296
+ onClick: (e) => {
297
+ var _a2, _b2;
298
+ if (e.target.closest("button")) {
299
+ return;
300
+ }
301
+ (_b2 = (_a2 = e.currentTarget.parentElement) == null ? void 0 : _a2.querySelector("input")) == null ? void 0 : _b2.focus();
302
+ },
303
+ onKeyDown: (e) => {
304
+ var _a2, _b2;
305
+ if (e.key === "Enter" || e.key === " ") {
306
+ (_b2 = (_a2 = e.currentTarget.parentElement) == null ? void 0 : _a2.querySelector("input")) == null ? void 0 : _b2.focus();
307
+ }
308
+ },
309
+ role: "group"
310
+ }, props)
311
+ )
312
+ );
313
+ }
314
+ var inputGroupButtonVariants = (0, import_class_variance_authority2.cva)(
315
+ "flex items-center gap-2 text-sm shadow-none",
316
+ {
317
+ variants: {
318
+ size: {
319
+ xs: "h-6 gap-1 px-2 has-[>svg]:px-2 [&>svg:not([class*='size-'])]:size-3.5",
320
+ sm: "h-8 gap-1.5 px-2.5 has-[>svg]:px-2.5",
321
+ "icon-xs": "size-6 p-0 has-[>svg]:p-0",
322
+ "icon-sm": "size-8 p-0 has-[>svg]:p-0"
323
+ }
324
+ },
325
+ defaultVariants: {
326
+ size: "xs"
327
+ }
328
+ }
329
+ );
330
+ function InputGroupButton(_a) {
331
+ var _b = _a, {
332
+ className,
333
+ type = "button",
334
+ variant = "ghost",
335
+ size = "xs"
336
+ } = _b, props = __objRest(_b, [
337
+ "className",
338
+ "type",
339
+ "variant",
340
+ "size"
341
+ ]);
342
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
343
+ Button,
344
+ __spreadValues({
345
+ className: cn(inputGroupButtonVariants({ size }), className),
346
+ "data-size": size,
347
+ type,
348
+ variant
349
+ }, props)
350
+ );
351
+ }
352
+ function InputGroupText(_a) {
353
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
354
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
355
+ "span",
356
+ __spreadValues({
357
+ className: cn(
358
+ "flex items-center gap-2 text-sm text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",
359
+ className
360
+ )
361
+ }, props)
362
+ );
363
+ }
364
+ function InputGroupInput(_a) {
365
+ var _b = _a, {
366
+ className
367
+ } = _b, props = __objRest(_b, [
368
+ "className"
369
+ ]);
370
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
371
+ Input,
372
+ __spreadValues({
373
+ className: cn(
374
+ "flex-1 rounded-none border-0 bg-transparent shadow-none focus-visible:ring-0 dark:bg-transparent",
375
+ className
376
+ ),
377
+ "data-slot": "input-group-control"
378
+ }, props)
379
+ );
380
+ }
381
+ function InputGroupTextarea(_a) {
382
+ var _b = _a, {
383
+ className
384
+ } = _b, props = __objRest(_b, [
385
+ "className"
386
+ ]);
387
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
388
+ Textarea,
389
+ __spreadValues({
390
+ className: cn(
391
+ "flex-1 resize-none rounded-none border-0 bg-transparent py-3 shadow-none focus-visible:ring-0 dark:bg-transparent",
392
+ className
393
+ ),
394
+ "data-slot": "input-group-control"
395
+ }, props)
396
+ );
397
+ }
398
+ // Annotate the CommonJS export names for ESM import in node:
399
+ 0 && (module.exports = {
400
+ InputGroup,
401
+ InputGroupAddon,
402
+ InputGroupButton,
403
+ InputGroupInput,
404
+ InputGroupText,
405
+ InputGroupTextarea
406
+ });
@@ -0,0 +1,22 @@
1
+ import {
2
+ InputGroup,
3
+ InputGroupAddon,
4
+ InputGroupButton,
5
+ InputGroupInput,
6
+ InputGroupText,
7
+ InputGroupTextarea
8
+ } from "../../chunk-ZN2QKLF6.mjs";
9
+ import "../../chunk-GPRJQ24C.mjs";
10
+ import "../../chunk-DS2AMHN2.mjs";
11
+ import "../../chunk-IAOOZCUY.mjs";
12
+ import "../../chunk-DBHJ5KC3.mjs";
13
+ import "../../chunk-V7CNWJT3.mjs";
14
+ import "../../chunk-FWCSY2DS.mjs";
15
+ export {
16
+ InputGroup,
17
+ InputGroupAddon,
18
+ InputGroupButton,
19
+ InputGroupInput,
20
+ InputGroupText,
21
+ InputGroupTextarea
22
+ };
@@ -0,0 +1,149 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __defProps = Object.defineProperties;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
7
+ var __getOwnPropNames = Object.getOwnPropertyNames;
8
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
9
+ var __getProtoOf = Object.getPrototypeOf;
10
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
11
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
12
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
13
+ var __spreadValues = (a, b) => {
14
+ for (var prop in b || (b = {}))
15
+ if (__hasOwnProp.call(b, prop))
16
+ __defNormalProp(a, prop, b[prop]);
17
+ if (__getOwnPropSymbols)
18
+ for (var prop of __getOwnPropSymbols(b)) {
19
+ if (__propIsEnum.call(b, prop))
20
+ __defNormalProp(a, prop, b[prop]);
21
+ }
22
+ return a;
23
+ };
24
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
25
+ var __objRest = (source, exclude) => {
26
+ var target = {};
27
+ for (var prop in source)
28
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
29
+ target[prop] = source[prop];
30
+ if (source != null && __getOwnPropSymbols)
31
+ for (var prop of __getOwnPropSymbols(source)) {
32
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
33
+ target[prop] = source[prop];
34
+ }
35
+ return target;
36
+ };
37
+ var __export = (target, all) => {
38
+ for (var name in all)
39
+ __defProp(target, name, { get: all[name], enumerable: true });
40
+ };
41
+ var __copyProps = (to, from, except, desc) => {
42
+ if (from && typeof from === "object" || typeof from === "function") {
43
+ for (let key of __getOwnPropNames(from))
44
+ if (!__hasOwnProp.call(to, key) && key !== except)
45
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
46
+ }
47
+ return to;
48
+ };
49
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
50
+ // If the importer is in node compatibility mode or this is not an ESM
51
+ // file that has been converted to a CommonJS file using a Babel-
52
+ // compatible transform (i.e. "__esModule" has not been set), then set
53
+ // "default" to the CommonJS "module.exports" for node compatibility.
54
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
55
+ mod
56
+ ));
57
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
58
+
59
+ // src/components/ui/input-otp.tsx
60
+ var input_otp_exports = {};
61
+ __export(input_otp_exports, {
62
+ InputOTP: () => InputOTP,
63
+ InputOTPGroup: () => InputOTPGroup,
64
+ InputOTPSeparator: () => InputOTPSeparator,
65
+ InputOTPSlot: () => InputOTPSlot
66
+ });
67
+ module.exports = __toCommonJS(input_otp_exports);
68
+ var React = __toESM(require("react"));
69
+ var import_input_otp = require("input-otp");
70
+ var import_lucide_react = require("lucide-react");
71
+
72
+ // src/lib/utils.ts
73
+ var import_clsx = require("clsx");
74
+ var import_tailwind_merge = require("tailwind-merge");
75
+ function cn(...inputs) {
76
+ return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
77
+ }
78
+
79
+ // src/components/ui/input-otp.tsx
80
+ var import_jsx_runtime = require("react/jsx-runtime");
81
+ function InputOTP(_a) {
82
+ var _b = _a, {
83
+ className,
84
+ containerClassName
85
+ } = _b, props = __objRest(_b, [
86
+ "className",
87
+ "containerClassName"
88
+ ]);
89
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
90
+ import_input_otp.OTPInput,
91
+ __spreadValues({
92
+ className: cn("disabled:cursor-not-allowed", className),
93
+ containerClassName: cn(
94
+ "flex items-center gap-2 has-disabled:opacity-50",
95
+ containerClassName
96
+ ),
97
+ "data-slot": "input-otp"
98
+ }, props)
99
+ );
100
+ }
101
+ function InputOTPGroup(_a) {
102
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
103
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
104
+ "div",
105
+ __spreadValues({
106
+ className: cn("flex items-center", className),
107
+ "data-slot": "input-otp-group"
108
+ }, props)
109
+ );
110
+ }
111
+ function InputOTPSlot(_a) {
112
+ var _b = _a, {
113
+ index,
114
+ className
115
+ } = _b, props = __objRest(_b, [
116
+ "index",
117
+ "className"
118
+ ]);
119
+ var _a2;
120
+ const inputOTPContext = React.useContext(import_input_otp.OTPInputContext);
121
+ const { char, hasFakeCaret, isActive } = (_a2 = inputOTPContext.slots[index]) != null ? _a2 : {};
122
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
123
+ "div",
124
+ __spreadProps(__spreadValues({
125
+ className: cn(
126
+ "relative flex h-9 w-9 items-center justify-center border-y border-r border-input text-sm shadow-xs transition-all outline-none first:border-l aria-invalid:border-destructive data-[active=true]:z-10 data-[active=true]:border-ring data-[active=true]:ring-[3px] data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:border-destructive data-[active=true]:aria-invalid:ring-destructive/20 dark:bg-input/30 dark:data-[active=true]:aria-invalid:ring-destructive/40",
127
+ className
128
+ ),
129
+ "data-active": isActive,
130
+ "data-slot": "input-otp-slot"
131
+ }, props), {
132
+ children: [
133
+ char,
134
+ hasFakeCaret ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "h-4 w-px animate-caret-blink bg-foreground duration-1000" }) }) : null
135
+ ]
136
+ })
137
+ );
138
+ }
139
+ function InputOTPSeparator(_a) {
140
+ var props = __objRest(_a, []);
141
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", __spreadProps(__spreadValues({ "data-slot": "input-otp-separator", role: "separator" }, props), { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.MinusIcon, {}) }));
142
+ }
143
+ // Annotate the CommonJS export names for ESM import in node:
144
+ 0 && (module.exports = {
145
+ InputOTP,
146
+ InputOTPGroup,
147
+ InputOTPSeparator,
148
+ InputOTPSlot
149
+ });
@@ -0,0 +1,14 @@
1
+ import {
2
+ InputOTP,
3
+ InputOTPGroup,
4
+ InputOTPSeparator,
5
+ InputOTPSlot
6
+ } from "../../chunk-Z3MK2KKZ.mjs";
7
+ import "../../chunk-V7CNWJT3.mjs";
8
+ import "../../chunk-FWCSY2DS.mjs";
9
+ export {
10
+ InputOTP,
11
+ InputOTPGroup,
12
+ InputOTPSeparator,
13
+ InputOTPSlot
14
+ };
@@ -0,0 +1,81 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
8
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
9
+ var __spreadValues = (a, b) => {
10
+ for (var prop in b || (b = {}))
11
+ if (__hasOwnProp.call(b, prop))
12
+ __defNormalProp(a, prop, b[prop]);
13
+ if (__getOwnPropSymbols)
14
+ for (var prop of __getOwnPropSymbols(b)) {
15
+ if (__propIsEnum.call(b, prop))
16
+ __defNormalProp(a, prop, b[prop]);
17
+ }
18
+ return a;
19
+ };
20
+ var __objRest = (source, exclude) => {
21
+ var target = {};
22
+ for (var prop in source)
23
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
24
+ target[prop] = source[prop];
25
+ if (source != null && __getOwnPropSymbols)
26
+ for (var prop of __getOwnPropSymbols(source)) {
27
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
28
+ target[prop] = source[prop];
29
+ }
30
+ return target;
31
+ };
32
+ var __export = (target, all) => {
33
+ for (var name in all)
34
+ __defProp(target, name, { get: all[name], enumerable: true });
35
+ };
36
+ var __copyProps = (to, from, except, desc) => {
37
+ if (from && typeof from === "object" || typeof from === "function") {
38
+ for (let key of __getOwnPropNames(from))
39
+ if (!__hasOwnProp.call(to, key) && key !== except)
40
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
41
+ }
42
+ return to;
43
+ };
44
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
45
+
46
+ // src/components/ui/input.tsx
47
+ var input_exports = {};
48
+ __export(input_exports, {
49
+ Input: () => Input
50
+ });
51
+ module.exports = __toCommonJS(input_exports);
52
+
53
+ // src/lib/utils.ts
54
+ var import_clsx = require("clsx");
55
+ var import_tailwind_merge = require("tailwind-merge");
56
+ function cn(...inputs) {
57
+ return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
58
+ }
59
+
60
+ // src/components/ui/input.tsx
61
+ var import_jsx_runtime = require("react/jsx-runtime");
62
+ function Input(_a) {
63
+ var _b = _a, { className, type } = _b, props = __objRest(_b, ["className", "type"]);
64
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
65
+ "input",
66
+ __spreadValues({
67
+ className: cn(
68
+ "h-9 w-full min-w-0 border border-input bg-transparent px-3 py-1 text-base font-sans shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30",
69
+ "focus-visible:border-primary focus-visible:ring-[3px] focus-visible:ring-primary/20",
70
+ "aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",
71
+ className
72
+ ),
73
+ "data-slot": "input",
74
+ type
75
+ }, props)
76
+ );
77
+ }
78
+ // Annotate the CommonJS export names for ESM import in node:
79
+ 0 && (module.exports = {
80
+ Input
81
+ });
@@ -0,0 +1,8 @@
1
+ import {
2
+ Input
3
+ } from "../../chunk-DS2AMHN2.mjs";
4
+ import "../../chunk-V7CNWJT3.mjs";
5
+ import "../../chunk-FWCSY2DS.mjs";
6
+ export {
7
+ Input
8
+ };