@wealthx/shadcn 1.0.0 → 1.0.2

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 (39) hide show
  1. package/.turbo/turbo-build.log +34 -31
  2. package/CHANGELOG.md +12 -0
  3. package/README.md +128 -0
  4. package/dist/{chunk-2WZVSBAY.mjs → chunk-3NQGYJEZ.mjs} +1 -1
  5. package/dist/{chunk-ZN2QKLF6.mjs → chunk-46OFHMQA.mjs} +1 -1
  6. package/dist/{chunk-IAOOZCUY.mjs → chunk-4AJ5HWHD.mjs} +4 -1
  7. package/dist/{chunk-7LDIMXGM.mjs → chunk-DKZRJOMF.mjs} +1 -1
  8. package/dist/{chunk-AMJ23O53.mjs → chunk-FHNT55I5.mjs} +2 -2
  9. package/dist/{chunk-NGYG2EA6.mjs → chunk-I64K754C.mjs} +1 -1
  10. package/dist/chunk-K74JRTJR.mjs +105 -0
  11. package/dist/{chunk-MKFL5MNH.mjs → chunk-K76E2TQU.mjs} +1 -1
  12. package/dist/{chunk-NWZ46DJL.mjs → chunk-KQDD5MU3.mjs} +1 -1
  13. package/dist/components/ui/alert-dialog.js +4 -1
  14. package/dist/components/ui/alert-dialog.mjs +2 -2
  15. package/dist/components/ui/button.js +4 -1
  16. package/dist/components/ui/button.mjs +1 -1
  17. package/dist/components/ui/calendar.js +4 -1
  18. package/dist/components/ui/calendar.mjs +2 -2
  19. package/dist/components/ui/data-table.js +4 -1
  20. package/dist/components/ui/data-table.mjs +2 -2
  21. package/dist/components/ui/date-picker.js +4 -1
  22. package/dist/components/ui/date-picker.mjs +3 -3
  23. package/dist/components/ui/dialog.js +4 -1
  24. package/dist/components/ui/dialog.mjs +2 -2
  25. package/dist/components/ui/input-group.js +4 -1
  26. package/dist/components/ui/input-group.mjs +2 -2
  27. package/dist/components/ui/pagination.js +4 -1
  28. package/dist/components/ui/pagination.mjs +2 -2
  29. package/dist/components/ui/slider.js +166 -0
  30. package/dist/components/ui/slider.mjs +8 -0
  31. package/dist/index.js +140 -41
  32. package/dist/index.mjs +12 -8
  33. package/dist/styles.css +1 -1
  34. package/package.json +6 -1
  35. package/src/components/index.tsx +3 -0
  36. package/src/components/ui/button.tsx +2 -0
  37. package/src/components/ui/slider.tsx +107 -0
  38. package/src/styles/styles-css.ts +1 -1
  39. package/tsup.config.ts +1 -0
@@ -272,6 +272,7 @@ var Button = (0, import_react.forwardRef)(function Button2(_a, ref) {
272
272
  asChild = false,
273
273
  loading = false,
274
274
  disabled,
275
+ type = "button",
275
276
  children
276
277
  } = _b, props = __objRest(_b, [
277
278
  "className",
@@ -280,6 +281,7 @@ var Button = (0, import_react.forwardRef)(function Button2(_a, ref) {
280
281
  "asChild",
281
282
  "loading",
282
283
  "disabled",
284
+ "type",
283
285
  "children"
284
286
  ]);
285
287
  const Comp = asChild ? Slot : "button";
@@ -292,7 +294,8 @@ var Button = (0, import_react.forwardRef)(function Button2(_a, ref) {
292
294
  "data-slot": "button",
293
295
  "data-variant": variant,
294
296
  disabled: loading || disabled,
295
- ref
297
+ ref,
298
+ type
296
299
  }, props), {
297
300
  children: loading ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
298
301
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_lucide_react.Loader2, { "aria-hidden": "true", className: "animate-spin" }),
@@ -6,14 +6,14 @@ import {
6
6
  DataTableSkeleton,
7
7
  DataTableToolbar,
8
8
  getSelectionColumn
9
- } from "../../chunk-MKFL5MNH.mjs";
9
+ } from "../../chunk-K76E2TQU.mjs";
10
10
  import "../../chunk-HS7TFG7V.mjs";
11
11
  import "../../chunk-BGP2N52Z.mjs";
12
12
  import "../../chunk-VZ2NR7L3.mjs";
13
13
  import "../../chunk-MJIEMGRD.mjs";
14
14
  import "../../chunk-DS2AMHN2.mjs";
15
15
  import "../../chunk-JF4PHPD5.mjs";
16
- import "../../chunk-IAOOZCUY.mjs";
16
+ import "../../chunk-4AJ5HWHD.mjs";
17
17
  import "../../chunk-DBHJ5KC3.mjs";
18
18
  import "../../chunk-OXQQNQZI.mjs";
19
19
  import "../../chunk-QOJ2DQD6.mjs";
@@ -167,6 +167,7 @@ var Button = (0, import_react.forwardRef)(function Button2(_a, ref) {
167
167
  asChild = false,
168
168
  loading = false,
169
169
  disabled,
170
+ type = "button",
170
171
  children
171
172
  } = _b, props = __objRest(_b, [
172
173
  "className",
@@ -175,6 +176,7 @@ var Button = (0, import_react.forwardRef)(function Button2(_a, ref) {
175
176
  "asChild",
176
177
  "loading",
177
178
  "disabled",
179
+ "type",
178
180
  "children"
179
181
  ]);
180
182
  const Comp = asChild ? Slot : "button";
@@ -187,7 +189,8 @@ var Button = (0, import_react.forwardRef)(function Button2(_a, ref) {
187
189
  "data-slot": "button",
188
190
  "data-variant": variant,
189
191
  disabled: loading || disabled,
190
- ref
192
+ ref,
193
+ type
191
194
  }, props), {
192
195
  children: loading ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
193
196
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Loader2, { "aria-hidden": "true", className: "animate-spin" }),
@@ -1,10 +1,10 @@
1
1
  "use client";
2
2
  import {
3
3
  DatePicker
4
- } from "../../chunk-AMJ23O53.mjs";
4
+ } from "../../chunk-FHNT55I5.mjs";
5
5
  import "../../chunk-MQ72DIBH.mjs";
6
- import "../../chunk-2WZVSBAY.mjs";
7
- import "../../chunk-IAOOZCUY.mjs";
6
+ import "../../chunk-3NQGYJEZ.mjs";
7
+ import "../../chunk-4AJ5HWHD.mjs";
8
8
  import "../../chunk-DBHJ5KC3.mjs";
9
9
  import "../../chunk-OXQQNQZI.mjs";
10
10
  import "../../chunk-QOJ2DQD6.mjs";
@@ -182,6 +182,7 @@ var Button = (0, import_react2.forwardRef)(function Button2(_a, ref) {
182
182
  asChild = false,
183
183
  loading = false,
184
184
  disabled,
185
+ type = "button",
185
186
  children
186
187
  } = _b, props = __objRest(_b, [
187
188
  "className",
@@ -190,6 +191,7 @@ var Button = (0, import_react2.forwardRef)(function Button2(_a, ref) {
190
191
  "asChild",
191
192
  "loading",
192
193
  "disabled",
194
+ "type",
193
195
  "children"
194
196
  ]);
195
197
  const Comp = asChild ? Slot : "button";
@@ -202,7 +204,8 @@ var Button = (0, import_react2.forwardRef)(function Button2(_a, ref) {
202
204
  "data-slot": "button",
203
205
  "data-variant": variant,
204
206
  disabled: loading || disabled,
205
- ref
207
+ ref,
208
+ type
206
209
  }, props), {
207
210
  children: loading ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
208
211
  /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_lucide_react.Loader2, { "aria-hidden": "true", className: "animate-spin" }),
@@ -9,8 +9,8 @@ import {
9
9
  DialogPortal,
10
10
  DialogTitle,
11
11
  DialogTrigger
12
- } from "../../chunk-7LDIMXGM.mjs";
13
- import "../../chunk-IAOOZCUY.mjs";
12
+ } from "../../chunk-DKZRJOMF.mjs";
13
+ import "../../chunk-4AJ5HWHD.mjs";
14
14
  import "../../chunk-DBHJ5KC3.mjs";
15
15
  import "../../chunk-OXQQNQZI.mjs";
16
16
  import "../../chunk-QOJ2DQD6.mjs";
@@ -169,6 +169,7 @@ var Button = (0, import_react.forwardRef)(function Button2(_a, ref) {
169
169
  asChild = false,
170
170
  loading = false,
171
171
  disabled,
172
+ type = "button",
172
173
  children
173
174
  } = _b, props = __objRest(_b, [
174
175
  "className",
@@ -177,6 +178,7 @@ var Button = (0, import_react.forwardRef)(function Button2(_a, ref) {
177
178
  "asChild",
178
179
  "loading",
179
180
  "disabled",
181
+ "type",
180
182
  "children"
181
183
  ]);
182
184
  const Comp = asChild ? Slot : "button";
@@ -189,7 +191,8 @@ var Button = (0, import_react.forwardRef)(function Button2(_a, ref) {
189
191
  "data-slot": "button",
190
192
  "data-variant": variant,
191
193
  disabled: loading || disabled,
192
- ref
194
+ ref,
195
+ type
193
196
  }, props), {
194
197
  children: loading ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
195
198
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Loader2, { "aria-hidden": "true", className: "animate-spin" }),
@@ -5,10 +5,10 @@ import {
5
5
  InputGroupInput,
6
6
  InputGroupText,
7
7
  InputGroupTextarea
8
- } from "../../chunk-ZN2QKLF6.mjs";
8
+ } from "../../chunk-46OFHMQA.mjs";
9
9
  import "../../chunk-GPRJQ24C.mjs";
10
10
  import "../../chunk-DS2AMHN2.mjs";
11
- import "../../chunk-IAOOZCUY.mjs";
11
+ import "../../chunk-4AJ5HWHD.mjs";
12
12
  import "../../chunk-DBHJ5KC3.mjs";
13
13
  import "../../chunk-V7CNWJT3.mjs";
14
14
  import "../../chunk-FWCSY2DS.mjs";
@@ -170,6 +170,7 @@ var Button = (0, import_react.forwardRef)(function Button2(_a, ref) {
170
170
  asChild = false,
171
171
  loading = false,
172
172
  disabled,
173
+ type = "button",
173
174
  children
174
175
  } = _b, props = __objRest(_b, [
175
176
  "className",
@@ -178,6 +179,7 @@ var Button = (0, import_react.forwardRef)(function Button2(_a, ref) {
178
179
  "asChild",
179
180
  "loading",
180
181
  "disabled",
182
+ "type",
181
183
  "children"
182
184
  ]);
183
185
  const Comp = asChild ? Slot : "button";
@@ -190,7 +192,8 @@ var Button = (0, import_react.forwardRef)(function Button2(_a, ref) {
190
192
  "data-slot": "button",
191
193
  "data-variant": variant,
192
194
  disabled: loading || disabled,
193
- ref
195
+ ref,
196
+ type
194
197
  }, props), {
195
198
  children: loading ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
196
199
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Loader2, { "aria-hidden": "true", className: "animate-spin" }),
@@ -6,8 +6,8 @@ import {
6
6
  PaginationLink,
7
7
  PaginationNext,
8
8
  PaginationPrevious
9
- } from "../../chunk-NGYG2EA6.mjs";
10
- import "../../chunk-IAOOZCUY.mjs";
9
+ } from "../../chunk-I64K754C.mjs";
10
+ import "../../chunk-4AJ5HWHD.mjs";
11
11
  import "../../chunk-DBHJ5KC3.mjs";
12
12
  import "../../chunk-V7CNWJT3.mjs";
13
13
  import "../../chunk-FWCSY2DS.mjs";
@@ -0,0 +1,166 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
10
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
11
+ var __spreadValues = (a, b) => {
12
+ for (var prop in b || (b = {}))
13
+ if (__hasOwnProp.call(b, prop))
14
+ __defNormalProp(a, prop, b[prop]);
15
+ if (__getOwnPropSymbols)
16
+ for (var prop of __getOwnPropSymbols(b)) {
17
+ if (__propIsEnum.call(b, prop))
18
+ __defNormalProp(a, prop, b[prop]);
19
+ }
20
+ return a;
21
+ };
22
+ var __objRest = (source, exclude) => {
23
+ var target = {};
24
+ for (var prop in source)
25
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
26
+ target[prop] = source[prop];
27
+ if (source != null && __getOwnPropSymbols)
28
+ for (var prop of __getOwnPropSymbols(source)) {
29
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
30
+ target[prop] = source[prop];
31
+ }
32
+ return target;
33
+ };
34
+ var __export = (target, all) => {
35
+ for (var name in all)
36
+ __defProp(target, name, { get: all[name], enumerable: true });
37
+ };
38
+ var __copyProps = (to, from, except, desc) => {
39
+ if (from && typeof from === "object" || typeof from === "function") {
40
+ for (let key of __getOwnPropNames(from))
41
+ if (!__hasOwnProp.call(to, key) && key !== except)
42
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
43
+ }
44
+ return to;
45
+ };
46
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
47
+ // If the importer is in node compatibility mode or this is not an ESM
48
+ // file that has been converted to a CommonJS file using a Babel-
49
+ // compatible transform (i.e. "__esModule" has not been set), then set
50
+ // "default" to the CommonJS "module.exports" for node compatibility.
51
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
52
+ mod
53
+ ));
54
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
55
+
56
+ // src/components/ui/slider.tsx
57
+ var slider_exports = {};
58
+ __export(slider_exports, {
59
+ Slider: () => Slider
60
+ });
61
+ module.exports = __toCommonJS(slider_exports);
62
+ var React = __toESM(require("react"));
63
+
64
+ // src/lib/utils.ts
65
+ var import_clsx = require("clsx");
66
+ var import_tailwind_merge = require("tailwind-merge");
67
+ function cn(...inputs) {
68
+ return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
69
+ }
70
+
71
+ // src/components/ui/slider.tsx
72
+ var import_jsx_runtime = require("react/jsx-runtime");
73
+ var Slider = React.forwardRef(
74
+ (_a, ref) => {
75
+ var _b = _a, {
76
+ className,
77
+ value,
78
+ defaultValue = 0,
79
+ min = 0,
80
+ max = 100,
81
+ step = 1,
82
+ disabled = false,
83
+ onValueChange
84
+ } = _b, props = __objRest(_b, [
85
+ "className",
86
+ "value",
87
+ "defaultValue",
88
+ "min",
89
+ "max",
90
+ "step",
91
+ "disabled",
92
+ "onValueChange"
93
+ ]);
94
+ const [internalValue, setInternalValue] = React.useState(defaultValue);
95
+ const currentValue = value !== void 0 ? value : internalValue;
96
+ const percentage = (currentValue - min) / (max - min) * 100;
97
+ const handleChange = (e) => {
98
+ const newValue = Number(e.target.value);
99
+ if (value === void 0) {
100
+ setInternalValue(newValue);
101
+ }
102
+ onValueChange == null ? void 0 : onValueChange(newValue);
103
+ };
104
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
105
+ "div",
106
+ {
107
+ "data-slot": "slider",
108
+ className: cn(
109
+ "relative flex w-full touch-none items-center select-none",
110
+ disabled && "opacity-50",
111
+ className
112
+ ),
113
+ children: [
114
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
115
+ "div",
116
+ {
117
+ "data-slot": "slider-track",
118
+ className: "relative h-2 w-full overflow-hidden rounded-full bg-muted",
119
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
120
+ "div",
121
+ {
122
+ "data-slot": "slider-range",
123
+ className: "absolute h-full rounded-full bg-primary",
124
+ style: { width: `${percentage}%` }
125
+ }
126
+ )
127
+ }
128
+ ),
129
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
130
+ "input",
131
+ __spreadValues({
132
+ ref,
133
+ type: "range",
134
+ min,
135
+ max,
136
+ step,
137
+ value: currentValue,
138
+ disabled,
139
+ onChange: handleChange,
140
+ className: cn(
141
+ "absolute inset-0 h-full w-full cursor-pointer opacity-0",
142
+ disabled && "cursor-not-allowed"
143
+ )
144
+ }, props)
145
+ ),
146
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
147
+ "div",
148
+ {
149
+ "data-slot": "slider-thumb",
150
+ className: cn(
151
+ "pointer-events-none absolute top-1/2 -translate-x-1/2 -translate-y-1/2",
152
+ "block size-5 rounded-full border-2 border-primary bg-background shadow-sm"
153
+ ),
154
+ style: { left: `${percentage}%` }
155
+ }
156
+ )
157
+ ]
158
+ }
159
+ );
160
+ }
161
+ );
162
+ Slider.displayName = "Slider";
163
+ // Annotate the CommonJS export names for ESM import in node:
164
+ 0 && (module.exports = {
165
+ Slider
166
+ });
@@ -0,0 +1,8 @@
1
+ import {
2
+ Slider
3
+ } from "../../chunk-K74JRTJR.mjs";
4
+ import "../../chunk-V7CNWJT3.mjs";
5
+ import "../../chunk-FWCSY2DS.mjs";
6
+ export {
7
+ Slider
8
+ };