@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.
- package/.turbo/turbo-build.log +160 -0
- package/CHANGELOG.md +13 -0
- package/CHANGES.md +345 -0
- package/dist/chunk-2WZVSBAY.mjs +232 -0
- package/dist/chunk-2Y7YJKPE.mjs +47 -0
- package/dist/chunk-3U7SD3MS.mjs +55 -0
- package/dist/chunk-3VQNJ235.mjs +114 -0
- package/dist/chunk-55CEW76V.mjs +35 -0
- package/dist/chunk-6AFMNC42.mjs +146 -0
- package/dist/chunk-6OJF6XRN.mjs +117 -0
- package/dist/chunk-7LDIMXGM.mjs +181 -0
- package/dist/chunk-AMJ23O53.mjs +122 -0
- package/dist/chunk-BBJBJSXQ.mjs +44 -0
- package/dist/chunk-BGP2N52Z.mjs +126 -0
- package/dist/chunk-BMFN37JH.mjs +41 -0
- package/dist/chunk-CGOKTPXU.mjs +79 -0
- package/dist/chunk-CZ3BW5GL.mjs +81 -0
- package/dist/chunk-DBHJ5KC3.mjs +55 -0
- package/dist/chunk-DDPA2XXS.mjs +97 -0
- package/dist/chunk-DS2AMHN2.mjs +30 -0
- package/dist/chunk-E3K6O4FZ.mjs +57 -0
- package/dist/chunk-FWCSY2DS.mjs +37 -0
- package/dist/chunk-GPRJQ24C.mjs +28 -0
- package/dist/chunk-HS7TFG7V.mjs +24 -0
- package/dist/chunk-HUVTPUV2.mjs +256 -0
- package/dist/chunk-IAOOZCUY.mjs +90 -0
- package/dist/chunk-JF4PHPD5.mjs +111 -0
- package/dist/chunk-JU2RUWHF.mjs +123 -0
- package/dist/chunk-KKHTJNMM.mjs +86 -0
- package/dist/chunk-MJIEMGRD.mjs +266 -0
- package/dist/chunk-MKFL5MNH.mjs +372 -0
- package/dist/chunk-MQ72DIBH.mjs +105 -0
- package/dist/chunk-NGYG2EA6.mjs +148 -0
- package/dist/chunk-NWZ46DJL.mjs +213 -0
- package/dist/chunk-OXQQNQZI.mjs +75 -0
- package/dist/chunk-PMKODV6M.mjs +161 -0
- package/dist/chunk-QOJ2DQD6.mjs +57 -0
- package/dist/chunk-RL772EH7.mjs +126 -0
- package/dist/chunk-SLWCCURD.mjs +99 -0
- package/dist/chunk-V7CNWJT3.mjs +10 -0
- package/dist/chunk-VG6UF6UT.mjs +68 -0
- package/dist/chunk-VYMHBV6D.mjs +123 -0
- package/dist/chunk-VZ2NR7L3.mjs +195 -0
- package/dist/chunk-YN5SYTOO.mjs +117 -0
- package/dist/chunk-Z3MK2KKZ.mjs +83 -0
- package/dist/chunk-ZN2QKLF6.mjs +187 -0
- package/dist/chunk-ZZV5JVNW.mjs +34 -0
- package/dist/components/ui/accordion.js +142 -0
- package/dist/components/ui/accordion.mjs +14 -0
- package/dist/components/ui/alert-dialog.js +413 -0
- package/dist/components/ui/alert-dialog.mjs +34 -0
- package/dist/components/ui/alert.js +134 -0
- package/dist/components/ui/alert.mjs +12 -0
- package/dist/components/ui/avatar.js +173 -0
- package/dist/components/ui/avatar.mjs +18 -0
- package/dist/components/ui/badge.js +163 -0
- package/dist/components/ui/badge.mjs +11 -0
- package/dist/components/ui/button.js +198 -0
- package/dist/components/ui/button.mjs +11 -0
- package/dist/components/ui/calendar.js +408 -0
- package/dist/components/ui/calendar.mjs +12 -0
- package/dist/components/ui/card.js +156 -0
- package/dist/components/ui/card.mjs +20 -0
- package/dist/components/ui/checkbox.js +166 -0
- package/dist/components/ui/checkbox.mjs +11 -0
- package/dist/components/ui/chip.js +199 -0
- package/dist/components/ui/chip.mjs +10 -0
- package/dist/components/ui/data-table.js +925 -0
- package/dist/components/ui/data-table.mjs +29 -0
- package/dist/components/ui/date-picker.js +561 -0
- package/dist/components/ui/date-picker.mjs +15 -0
- package/dist/components/ui/dialog.js +378 -0
- package/dist/components/ui/dialog.mjs +30 -0
- package/dist/components/ui/drawer.js +213 -0
- package/dist/components/ui/drawer.mjs +28 -0
- package/dist/components/ui/dropdown-menu.js +338 -0
- package/dist/components/ui/dropdown-menu.mjs +38 -0
- package/dist/components/ui/empty.js +173 -0
- package/dist/components/ui/empty.mjs +18 -0
- package/dist/components/ui/field.js +359 -0
- package/dist/components/ui/field.mjs +28 -0
- package/dist/components/ui/input-group.js +406 -0
- package/dist/components/ui/input-group.mjs +22 -0
- package/dist/components/ui/input-otp.js +149 -0
- package/dist/components/ui/input-otp.mjs +14 -0
- package/dist/components/ui/input.js +81 -0
- package/dist/components/ui/input.mjs +8 -0
- package/dist/components/ui/label.js +85 -0
- package/dist/components/ui/label.mjs +8 -0
- package/dist/components/ui/pagination.js +333 -0
- package/dist/components/ui/pagination.mjs +22 -0
- package/dist/components/ui/popover.js +167 -0
- package/dist/components/ui/popover.mjs +22 -0
- package/dist/components/ui/progress.js +97 -0
- package/dist/components/ui/progress.mjs +8 -0
- package/dist/components/ui/radio-group.js +178 -0
- package/dist/components/ui/radio-group.mjs +12 -0
- package/dist/components/ui/select.js +262 -0
- package/dist/components/ui/select.mjs +28 -0
- package/dist/components/ui/separator.js +86 -0
- package/dist/components/ui/separator.mjs +8 -0
- package/dist/components/ui/sheet.js +227 -0
- package/dist/components/ui/sheet.mjs +26 -0
- package/dist/components/ui/skeleton.js +75 -0
- package/dist/components/ui/skeleton.mjs +8 -0
- package/dist/components/ui/sonner.js +86 -0
- package/dist/components/ui/sonner.mjs +7 -0
- package/dist/components/ui/spinner.js +93 -0
- package/dist/components/ui/spinner.mjs +10 -0
- package/dist/components/ui/switch.js +178 -0
- package/dist/components/ui/switch.mjs +11 -0
- package/dist/components/ui/table.js +184 -0
- package/dist/components/ui/table.mjs +22 -0
- package/dist/components/ui/tabs.js +181 -0
- package/dist/components/ui/tabs.mjs +16 -0
- package/dist/components/ui/textarea.js +79 -0
- package/dist/components/ui/textarea.mjs +8 -0
- package/dist/components/ui/toggle-group.js +184 -0
- package/dist/components/ui/toggle-group.mjs +12 -0
- package/dist/components/ui/toggle.js +108 -0
- package/dist/components/ui/toggle.mjs +11 -0
- package/dist/components/ui/tooltip.js +140 -0
- package/dist/components/ui/tooltip.mjs +16 -0
- package/dist/index.js +4409 -0
- package/dist/index.mjs +462 -0
- package/dist/lib/colors.js +84 -0
- package/dist/lib/colors.mjs +13 -0
- package/dist/lib/theme-provider.js +150 -0
- package/dist/lib/theme-provider.mjs +13 -0
- package/dist/lib/typography.js +157 -0
- package/dist/lib/typography.mjs +25 -0
- package/dist/lib/utils.js +34 -0
- package/dist/lib/utils.mjs +7 -0
- package/dist/styles.css +2 -0
- package/package.json +228 -11
- package/scripts/build-css.ts +15 -9
- package/src/components/index.tsx +443 -0
- package/src/components/ui/accordion.tsx +99 -0
- package/src/components/ui/alert-dialog.tsx +239 -0
- package/src/components/ui/alert.tsx +81 -0
- package/src/components/ui/avatar.tsx +130 -0
- package/src/components/ui/badge.tsx +57 -0
- package/src/components/ui/button.tsx +69 -37
- package/src/components/ui/calendar.tsx +252 -0
- package/src/components/ui/card.tsx +106 -0
- package/src/components/ui/checkbox.tsx +111 -0
- package/src/components/ui/chip.tsx +65 -0
- package/src/components/ui/data-table.tsx +490 -0
- package/src/components/ui/date-picker.tsx +133 -0
- package/src/components/ui/dialog.tsx +195 -0
- package/src/components/ui/drawer.tsx +169 -0
- package/src/components/ui/dropdown-menu.tsx +315 -0
- package/src/components/ui/empty.tsx +128 -0
- package/src/components/ui/field.tsx +273 -0
- package/src/components/ui/input-group.tsx +190 -0
- package/src/components/ui/input-otp.tsx +90 -0
- package/src/components/ui/input.tsx +28 -0
- package/src/components/ui/label.tsx +24 -0
- package/src/components/ui/pagination.tsx +148 -0
- package/src/components/ui/popover.tsx +112 -0
- package/src/components/ui/progress.tsx +40 -0
- package/src/components/ui/radio-group.tsx +129 -0
- package/src/components/ui/select.tsx +201 -0
- package/src/components/ui/separator.tsx +26 -0
- package/src/components/ui/sheet.tsx +182 -0
- package/src/components/ui/skeleton.tsx +22 -0
- package/src/components/ui/sonner.tsx +48 -0
- package/src/components/ui/spinner.tsx +41 -0
- package/src/components/ui/switch.tsx +126 -0
- package/src/components/ui/table.tsx +143 -0
- package/src/components/ui/tabs.tsx +119 -0
- package/src/components/ui/textarea.tsx +28 -0
- package/src/components/ui/toggle-group.tsx +94 -0
- package/src/components/ui/toggle.tsx +59 -0
- package/src/components/ui/tooltip.tsx +80 -0
- package/src/index.ts +15 -3
- package/src/lib/colors.ts +74 -0
- package/src/lib/slot.tsx +68 -0
- package/src/lib/theme-provider.tsx +134 -0
- package/src/lib/typography.ts +153 -0
- package/src/lib/utils.ts +1 -1
- package/src/styles/globals.css +377 -107
- package/src/styles/styles-css.ts +1 -1
- package/tsup.config.ts +48 -2
- package/src/provider/ShadcnProvider.tsx +0 -89
- package/src/provider/index.ts +0 -2
|
@@ -0,0 +1,173 @@
|
|
|
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/avatar.tsx
|
|
47
|
+
var avatar_exports = {};
|
|
48
|
+
__export(avatar_exports, {
|
|
49
|
+
Avatar: () => Avatar,
|
|
50
|
+
AvatarBadge: () => AvatarBadge,
|
|
51
|
+
AvatarFallback: () => AvatarFallback,
|
|
52
|
+
AvatarGroup: () => AvatarGroup,
|
|
53
|
+
AvatarGroupCount: () => AvatarGroupCount,
|
|
54
|
+
AvatarImage: () => AvatarImage
|
|
55
|
+
});
|
|
56
|
+
module.exports = __toCommonJS(avatar_exports);
|
|
57
|
+
var import_avatar = require("@base-ui/react/avatar");
|
|
58
|
+
|
|
59
|
+
// src/lib/utils.ts
|
|
60
|
+
var import_clsx = require("clsx");
|
|
61
|
+
var import_tailwind_merge = require("tailwind-merge");
|
|
62
|
+
function cn(...inputs) {
|
|
63
|
+
return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// src/components/ui/avatar.tsx
|
|
67
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
68
|
+
function Avatar(_a) {
|
|
69
|
+
var _b = _a, {
|
|
70
|
+
className,
|
|
71
|
+
size = "default"
|
|
72
|
+
} = _b, props = __objRest(_b, [
|
|
73
|
+
"className",
|
|
74
|
+
"size"
|
|
75
|
+
]);
|
|
76
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
77
|
+
import_avatar.Avatar.Root,
|
|
78
|
+
__spreadValues({
|
|
79
|
+
className: cn(
|
|
80
|
+
"group/avatar relative flex size-8 shrink-0 rounded-full select-none data-[size=lg]:size-10 data-[size=sm]:size-6",
|
|
81
|
+
className
|
|
82
|
+
),
|
|
83
|
+
"data-size": size,
|
|
84
|
+
"data-slot": "avatar"
|
|
85
|
+
}, props)
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
function AvatarImage(_a) {
|
|
89
|
+
var _b = _a, {
|
|
90
|
+
className
|
|
91
|
+
} = _b, props = __objRest(_b, [
|
|
92
|
+
"className"
|
|
93
|
+
]);
|
|
94
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
95
|
+
import_avatar.Avatar.Image,
|
|
96
|
+
__spreadValues({
|
|
97
|
+
className: cn("aspect-square size-full rounded-full", className),
|
|
98
|
+
"data-slot": "avatar-image"
|
|
99
|
+
}, props)
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
function AvatarFallback(_a) {
|
|
103
|
+
var _b = _a, {
|
|
104
|
+
className
|
|
105
|
+
} = _b, props = __objRest(_b, [
|
|
106
|
+
"className"
|
|
107
|
+
]);
|
|
108
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
109
|
+
import_avatar.Avatar.Fallback,
|
|
110
|
+
__spreadValues({
|
|
111
|
+
className: cn(
|
|
112
|
+
"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",
|
|
113
|
+
className
|
|
114
|
+
),
|
|
115
|
+
"data-slot": "avatar-fallback"
|
|
116
|
+
}, props)
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
function AvatarBadge(_a) {
|
|
120
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
121
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
122
|
+
"span",
|
|
123
|
+
__spreadValues({
|
|
124
|
+
className: cn(
|
|
125
|
+
"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",
|
|
126
|
+
"group-data-[size=sm]/avatar:size-2 group-data-[size=sm]/avatar:[&>svg]:hidden",
|
|
127
|
+
"group-data-[size=default]/avatar:size-2.5 group-data-[size=default]/avatar:[&>svg]:size-2",
|
|
128
|
+
"group-data-[size=lg]/avatar:size-3 group-data-[size=lg]/avatar:[&>svg]:size-2",
|
|
129
|
+
className
|
|
130
|
+
),
|
|
131
|
+
"data-slot": "avatar-badge"
|
|
132
|
+
}, props)
|
|
133
|
+
);
|
|
134
|
+
}
|
|
135
|
+
function AvatarGroup(_a) {
|
|
136
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
137
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
138
|
+
"div",
|
|
139
|
+
__spreadValues({
|
|
140
|
+
className: cn(
|
|
141
|
+
"group/avatar-group flex -space-x-2 *:data-[slot=avatar]:ring-2 *:data-[slot=avatar]:ring-background",
|
|
142
|
+
className
|
|
143
|
+
),
|
|
144
|
+
"data-slot": "avatar-group"
|
|
145
|
+
}, props)
|
|
146
|
+
);
|
|
147
|
+
}
|
|
148
|
+
function AvatarGroupCount(_a) {
|
|
149
|
+
var _b = _a, {
|
|
150
|
+
className
|
|
151
|
+
} = _b, props = __objRest(_b, [
|
|
152
|
+
"className"
|
|
153
|
+
]);
|
|
154
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
155
|
+
"div",
|
|
156
|
+
__spreadValues({
|
|
157
|
+
className: cn(
|
|
158
|
+
"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",
|
|
159
|
+
className
|
|
160
|
+
),
|
|
161
|
+
"data-slot": "avatar-group-count"
|
|
162
|
+
}, props)
|
|
163
|
+
);
|
|
164
|
+
}
|
|
165
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
166
|
+
0 && (module.exports = {
|
|
167
|
+
Avatar,
|
|
168
|
+
AvatarBadge,
|
|
169
|
+
AvatarFallback,
|
|
170
|
+
AvatarGroup,
|
|
171
|
+
AvatarGroupCount,
|
|
172
|
+
AvatarImage
|
|
173
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Avatar,
|
|
3
|
+
AvatarBadge,
|
|
4
|
+
AvatarFallback,
|
|
5
|
+
AvatarGroup,
|
|
6
|
+
AvatarGroupCount,
|
|
7
|
+
AvatarImage
|
|
8
|
+
} from "../../chunk-6OJF6XRN.mjs";
|
|
9
|
+
import "../../chunk-V7CNWJT3.mjs";
|
|
10
|
+
import "../../chunk-FWCSY2DS.mjs";
|
|
11
|
+
export {
|
|
12
|
+
Avatar,
|
|
13
|
+
AvatarBadge,
|
|
14
|
+
AvatarFallback,
|
|
15
|
+
AvatarGroup,
|
|
16
|
+
AvatarGroupCount,
|
|
17
|
+
AvatarImage
|
|
18
|
+
};
|
|
@@ -0,0 +1,163 @@
|
|
|
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/badge.tsx
|
|
57
|
+
var badge_exports = {};
|
|
58
|
+
__export(badge_exports, {
|
|
59
|
+
Badge: () => Badge,
|
|
60
|
+
badgeVariants: () => badgeVariants
|
|
61
|
+
});
|
|
62
|
+
module.exports = __toCommonJS(badge_exports);
|
|
63
|
+
var import_class_variance_authority = require("class-variance-authority");
|
|
64
|
+
|
|
65
|
+
// src/lib/utils.ts
|
|
66
|
+
var import_clsx = require("clsx");
|
|
67
|
+
var import_tailwind_merge = require("tailwind-merge");
|
|
68
|
+
function cn(...inputs) {
|
|
69
|
+
return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// src/lib/slot.tsx
|
|
73
|
+
var React = __toESM(require("react"));
|
|
74
|
+
function mergeRefs(...refs) {
|
|
75
|
+
return (value) => {
|
|
76
|
+
for (const ref of refs) {
|
|
77
|
+
if (typeof ref === "function") ref(value);
|
|
78
|
+
else if (ref !== null)
|
|
79
|
+
ref.current = value;
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
var Slot = React.forwardRef(
|
|
84
|
+
(_a, forwardedRef) => {
|
|
85
|
+
var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
|
|
86
|
+
const child = React.Children.only(children);
|
|
87
|
+
if (!React.isValidElement(child)) return null;
|
|
88
|
+
const childProps = child.props;
|
|
89
|
+
const merged = __spreadValues({}, props);
|
|
90
|
+
for (const key of Object.keys(childProps)) {
|
|
91
|
+
if (key === "className") {
|
|
92
|
+
merged.className = [props.className, childProps.className].filter(Boolean).join(" ");
|
|
93
|
+
} else if (key === "style") {
|
|
94
|
+
merged.style = __spreadValues(__spreadValues({}, props.style), childProps.style);
|
|
95
|
+
} else if (key.startsWith("on") && typeof childProps[key] === "function") {
|
|
96
|
+
const parentHandler = props[key];
|
|
97
|
+
if (typeof parentHandler === "function") {
|
|
98
|
+
merged[key] = (...args) => {
|
|
99
|
+
childProps[key](...args);
|
|
100
|
+
parentHandler(...args);
|
|
101
|
+
};
|
|
102
|
+
} else {
|
|
103
|
+
merged[key] = childProps[key];
|
|
104
|
+
}
|
|
105
|
+
} else {
|
|
106
|
+
merged[key] = childProps[key];
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
const childRef = child.ref;
|
|
110
|
+
merged.ref = forwardedRef ? mergeRefs(forwardedRef, childRef) : childRef;
|
|
111
|
+
return React.cloneElement(
|
|
112
|
+
child,
|
|
113
|
+
merged
|
|
114
|
+
);
|
|
115
|
+
}
|
|
116
|
+
);
|
|
117
|
+
Slot.displayName = "Slot";
|
|
118
|
+
|
|
119
|
+
// src/components/ui/badge.tsx
|
|
120
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
121
|
+
var badgeVariants = (0, import_class_variance_authority.cva)(
|
|
122
|
+
"inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-xs font-medium font-sans whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3",
|
|
123
|
+
{
|
|
124
|
+
variants: {
|
|
125
|
+
variant: {
|
|
126
|
+
default: "bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
|
|
127
|
+
secondary: "bg-muted text-muted-foreground [a&]:hover:bg-muted/80",
|
|
128
|
+
destructive: "bg-destructive text-destructive-foreground focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90",
|
|
129
|
+
outline: "border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
|
|
130
|
+
ghost: "[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
|
|
131
|
+
link: "text-primary underline-offset-4 [a&]:hover:underline"
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
defaultVariants: {
|
|
135
|
+
variant: "default"
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
);
|
|
139
|
+
function Badge(_a) {
|
|
140
|
+
var _b = _a, {
|
|
141
|
+
className,
|
|
142
|
+
variant = "default",
|
|
143
|
+
asChild = false
|
|
144
|
+
} = _b, props = __objRest(_b, [
|
|
145
|
+
"className",
|
|
146
|
+
"variant",
|
|
147
|
+
"asChild"
|
|
148
|
+
]);
|
|
149
|
+
const Comp = asChild ? Slot : "span";
|
|
150
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
151
|
+
Comp,
|
|
152
|
+
__spreadValues({
|
|
153
|
+
className: cn(badgeVariants({ variant }), className),
|
|
154
|
+
"data-slot": "badge",
|
|
155
|
+
"data-variant": variant
|
|
156
|
+
}, props)
|
|
157
|
+
);
|
|
158
|
+
}
|
|
159
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
160
|
+
0 && (module.exports = {
|
|
161
|
+
Badge,
|
|
162
|
+
badgeVariants
|
|
163
|
+
});
|
|
@@ -0,0 +1,198 @@
|
|
|
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/button.tsx
|
|
60
|
+
var button_exports = {};
|
|
61
|
+
__export(button_exports, {
|
|
62
|
+
Button: () => Button,
|
|
63
|
+
buttonVariants: () => buttonVariants
|
|
64
|
+
});
|
|
65
|
+
module.exports = __toCommonJS(button_exports);
|
|
66
|
+
var import_react = require("react");
|
|
67
|
+
var import_class_variance_authority = require("class-variance-authority");
|
|
68
|
+
var import_lucide_react = 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/lib/slot.tsx
|
|
78
|
+
var React = __toESM(require("react"));
|
|
79
|
+
function mergeRefs(...refs) {
|
|
80
|
+
return (value) => {
|
|
81
|
+
for (const ref of refs) {
|
|
82
|
+
if (typeof ref === "function") ref(value);
|
|
83
|
+
else if (ref !== null)
|
|
84
|
+
ref.current = value;
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
var Slot = React.forwardRef(
|
|
89
|
+
(_a, forwardedRef) => {
|
|
90
|
+
var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
|
|
91
|
+
const child = React.Children.only(children);
|
|
92
|
+
if (!React.isValidElement(child)) return null;
|
|
93
|
+
const childProps = child.props;
|
|
94
|
+
const merged = __spreadValues({}, props);
|
|
95
|
+
for (const key of Object.keys(childProps)) {
|
|
96
|
+
if (key === "className") {
|
|
97
|
+
merged.className = [props.className, childProps.className].filter(Boolean).join(" ");
|
|
98
|
+
} else if (key === "style") {
|
|
99
|
+
merged.style = __spreadValues(__spreadValues({}, props.style), childProps.style);
|
|
100
|
+
} else if (key.startsWith("on") && typeof childProps[key] === "function") {
|
|
101
|
+
const parentHandler = props[key];
|
|
102
|
+
if (typeof parentHandler === "function") {
|
|
103
|
+
merged[key] = (...args) => {
|
|
104
|
+
childProps[key](...args);
|
|
105
|
+
parentHandler(...args);
|
|
106
|
+
};
|
|
107
|
+
} else {
|
|
108
|
+
merged[key] = childProps[key];
|
|
109
|
+
}
|
|
110
|
+
} else {
|
|
111
|
+
merged[key] = childProps[key];
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
const childRef = child.ref;
|
|
115
|
+
merged.ref = forwardedRef ? mergeRefs(forwardedRef, childRef) : childRef;
|
|
116
|
+
return React.cloneElement(
|
|
117
|
+
child,
|
|
118
|
+
merged
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
);
|
|
122
|
+
Slot.displayName = "Slot";
|
|
123
|
+
|
|
124
|
+
// src/components/ui/button.tsx
|
|
125
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
126
|
+
var buttonVariants = (0, import_class_variance_authority.cva)(
|
|
127
|
+
"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",
|
|
128
|
+
{
|
|
129
|
+
variants: {
|
|
130
|
+
variant: {
|
|
131
|
+
default: "bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",
|
|
132
|
+
secondary: "bg-brand-secondary text-brand-secondary-foreground shadow-xs hover:bg-brand-secondary/80 focus-visible:ring-brand-secondary/30",
|
|
133
|
+
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",
|
|
134
|
+
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",
|
|
135
|
+
"outline-primary": "border border-primary text-foreground bg-transparent shadow-xs hover:bg-primary/5 focus-visible:ring-primary/50",
|
|
136
|
+
"outline-secondary": "border border-brand-secondary text-brand-secondary bg-transparent shadow-xs hover:bg-brand-secondary/10 focus-visible:ring-brand-secondary/30",
|
|
137
|
+
ghost: "hover:bg-accent hover:text-accent-foreground hover:shadow-xs dark:hover:bg-accent/50",
|
|
138
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
139
|
+
},
|
|
140
|
+
size: {
|
|
141
|
+
default: "h-9 px-4 py-2 has-[>svg]:px-3",
|
|
142
|
+
xs: "h-6 gap-1 px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",
|
|
143
|
+
sm: "h-8 gap-1.5 px-3 has-[>svg]:px-2.5",
|
|
144
|
+
lg: "h-10 px-6 has-[>svg]:px-4",
|
|
145
|
+
icon: "size-9",
|
|
146
|
+
"icon-xs": "size-6 [&_svg:not([class*='size-'])]:size-3",
|
|
147
|
+
"icon-sm": "size-8",
|
|
148
|
+
"icon-lg": "size-10"
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
defaultVariants: {
|
|
152
|
+
variant: "default",
|
|
153
|
+
size: "default"
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
);
|
|
157
|
+
var Button = (0, import_react.forwardRef)(function Button2(_a, ref) {
|
|
158
|
+
var _b = _a, {
|
|
159
|
+
className,
|
|
160
|
+
variant,
|
|
161
|
+
size,
|
|
162
|
+
asChild = false,
|
|
163
|
+
loading = false,
|
|
164
|
+
disabled,
|
|
165
|
+
children
|
|
166
|
+
} = _b, props = __objRest(_b, [
|
|
167
|
+
"className",
|
|
168
|
+
"variant",
|
|
169
|
+
"size",
|
|
170
|
+
"asChild",
|
|
171
|
+
"loading",
|
|
172
|
+
"disabled",
|
|
173
|
+
"children"
|
|
174
|
+
]);
|
|
175
|
+
const Comp = asChild ? Slot : "button";
|
|
176
|
+
const isIconOnly = size === "icon" || size === "icon-xs" || size === "icon-sm" || size === "icon-lg";
|
|
177
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
178
|
+
Comp,
|
|
179
|
+
__spreadProps(__spreadValues({
|
|
180
|
+
className: cn(buttonVariants({ variant, size, className })),
|
|
181
|
+
"data-size": size,
|
|
182
|
+
"data-slot": "button",
|
|
183
|
+
"data-variant": variant,
|
|
184
|
+
disabled: loading || disabled,
|
|
185
|
+
ref
|
|
186
|
+
}, props), {
|
|
187
|
+
children: loading ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
188
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Loader2, { "aria-hidden": "true", className: "animate-spin" }),
|
|
189
|
+
!isIconOnly && children
|
|
190
|
+
] }) : children
|
|
191
|
+
})
|
|
192
|
+
);
|
|
193
|
+
});
|
|
194
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
195
|
+
0 && (module.exports = {
|
|
196
|
+
Button,
|
|
197
|
+
buttonVariants
|
|
198
|
+
});
|