@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,408 @@
|
|
|
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/calendar.tsx
|
|
60
|
+
var calendar_exports = {};
|
|
61
|
+
__export(calendar_exports, {
|
|
62
|
+
Calendar: () => Calendar,
|
|
63
|
+
CalendarDayButton: () => CalendarDayButton
|
|
64
|
+
});
|
|
65
|
+
module.exports = __toCommonJS(calendar_exports);
|
|
66
|
+
var React2 = __toESM(require("react"));
|
|
67
|
+
var import_lucide_react2 = require("lucide-react");
|
|
68
|
+
var import_react_day_picker = require("react-day-picker");
|
|
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 import_jsx_runtime2 = require("react/jsx-runtime");
|
|
202
|
+
function CalendarRoot(_a) {
|
|
203
|
+
var _b = _a, {
|
|
204
|
+
className,
|
|
205
|
+
rootRef
|
|
206
|
+
} = _b, props = __objRest(_b, [
|
|
207
|
+
"className",
|
|
208
|
+
"rootRef"
|
|
209
|
+
]);
|
|
210
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
211
|
+
"div",
|
|
212
|
+
__spreadValues({
|
|
213
|
+
className: cn(className),
|
|
214
|
+
"data-slot": "calendar",
|
|
215
|
+
ref: rootRef
|
|
216
|
+
}, props)
|
|
217
|
+
);
|
|
218
|
+
}
|
|
219
|
+
function CalendarChevron(_a) {
|
|
220
|
+
var _b = _a, {
|
|
221
|
+
className,
|
|
222
|
+
orientation
|
|
223
|
+
} = _b, props = __objRest(_b, [
|
|
224
|
+
"className",
|
|
225
|
+
"orientation"
|
|
226
|
+
]);
|
|
227
|
+
if (orientation === "left") {
|
|
228
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_lucide_react2.ChevronLeftIcon, __spreadValues({ className: cn("size-4", className) }, props));
|
|
229
|
+
}
|
|
230
|
+
if (orientation === "right") {
|
|
231
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
232
|
+
import_lucide_react2.ChevronRightIcon,
|
|
233
|
+
__spreadValues({
|
|
234
|
+
className: cn("size-4", className)
|
|
235
|
+
}, props)
|
|
236
|
+
);
|
|
237
|
+
}
|
|
238
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_lucide_react2.ChevronDownIcon, __spreadValues({ className: cn("size-4", className) }, props));
|
|
239
|
+
}
|
|
240
|
+
function CalendarWeekNumber(_a) {
|
|
241
|
+
var _b = _a, {
|
|
242
|
+
children
|
|
243
|
+
} = _b, props = __objRest(_b, [
|
|
244
|
+
"children"
|
|
245
|
+
]);
|
|
246
|
+
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 }) }));
|
|
247
|
+
}
|
|
248
|
+
function Calendar(_a) {
|
|
249
|
+
var _b = _a, {
|
|
250
|
+
className,
|
|
251
|
+
classNames,
|
|
252
|
+
showOutsideDays = true,
|
|
253
|
+
captionLayout = "dropdown",
|
|
254
|
+
buttonVariant = "ghost",
|
|
255
|
+
formatters,
|
|
256
|
+
components
|
|
257
|
+
} = _b, props = __objRest(_b, [
|
|
258
|
+
"className",
|
|
259
|
+
"classNames",
|
|
260
|
+
"showOutsideDays",
|
|
261
|
+
"captionLayout",
|
|
262
|
+
"buttonVariant",
|
|
263
|
+
"formatters",
|
|
264
|
+
"components"
|
|
265
|
+
]);
|
|
266
|
+
const defaultClassNames = (0, import_react_day_picker.getDefaultClassNames)();
|
|
267
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
268
|
+
import_react_day_picker.DayPicker,
|
|
269
|
+
__spreadValues({
|
|
270
|
+
captionLayout,
|
|
271
|
+
className: cn(
|
|
272
|
+
"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",
|
|
273
|
+
String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,
|
|
274
|
+
String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,
|
|
275
|
+
className
|
|
276
|
+
),
|
|
277
|
+
classNames: __spreadValues({
|
|
278
|
+
root: cn("w-fit", defaultClassNames.root),
|
|
279
|
+
months: cn(
|
|
280
|
+
"relative flex flex-col gap-4 md:flex-row",
|
|
281
|
+
defaultClassNames.months
|
|
282
|
+
),
|
|
283
|
+
month: cn("flex w-full flex-col gap-4", defaultClassNames.month),
|
|
284
|
+
nav: cn(
|
|
285
|
+
"absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",
|
|
286
|
+
defaultClassNames.nav
|
|
287
|
+
),
|
|
288
|
+
button_previous: cn(
|
|
289
|
+
buttonVariants({ variant: buttonVariant }),
|
|
290
|
+
"size-(--cell-size) p-0 select-none aria-disabled:opacity-50",
|
|
291
|
+
defaultClassNames.button_previous
|
|
292
|
+
),
|
|
293
|
+
button_next: cn(
|
|
294
|
+
buttonVariants({ variant: buttonVariant }),
|
|
295
|
+
"size-(--cell-size) p-0 select-none aria-disabled:opacity-50",
|
|
296
|
+
defaultClassNames.button_next
|
|
297
|
+
),
|
|
298
|
+
month_caption: cn(
|
|
299
|
+
"flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)",
|
|
300
|
+
defaultClassNames.month_caption
|
|
301
|
+
),
|
|
302
|
+
dropdowns: cn(
|
|
303
|
+
"flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium",
|
|
304
|
+
defaultClassNames.dropdowns
|
|
305
|
+
),
|
|
306
|
+
dropdown_root: cn(
|
|
307
|
+
"relative border border-input shadow-xs has-focus:border-ring has-focus:ring-[3px] has-focus:ring-ring/50",
|
|
308
|
+
defaultClassNames.dropdown_root
|
|
309
|
+
),
|
|
310
|
+
dropdown: cn(
|
|
311
|
+
"absolute inset-0 bg-popover opacity-0",
|
|
312
|
+
defaultClassNames.dropdown
|
|
313
|
+
),
|
|
314
|
+
caption_label: cn(
|
|
315
|
+
"font-medium select-none",
|
|
316
|
+
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",
|
|
317
|
+
defaultClassNames.caption_label
|
|
318
|
+
),
|
|
319
|
+
table: "w-full border-collapse",
|
|
320
|
+
weekdays: cn("flex", defaultClassNames.weekdays),
|
|
321
|
+
weekday: cn(
|
|
322
|
+
"flex-1 text-[0.8rem] font-normal text-muted-foreground select-none",
|
|
323
|
+
defaultClassNames.weekday
|
|
324
|
+
),
|
|
325
|
+
week: cn("mt-2 flex w-full", defaultClassNames.week),
|
|
326
|
+
week_number_header: cn(
|
|
327
|
+
"w-(--cell-size) select-none",
|
|
328
|
+
defaultClassNames.week_number_header
|
|
329
|
+
),
|
|
330
|
+
week_number: cn(
|
|
331
|
+
"text-[0.8rem] text-muted-foreground select-none",
|
|
332
|
+
defaultClassNames.week_number
|
|
333
|
+
),
|
|
334
|
+
day: cn(
|
|
335
|
+
"group/day relative aspect-square h-full w-full p-0 text-center select-none",
|
|
336
|
+
defaultClassNames.day
|
|
337
|
+
),
|
|
338
|
+
range_start: cn("bg-accent", defaultClassNames.range_start),
|
|
339
|
+
range_middle: cn("rounded-none", defaultClassNames.range_middle),
|
|
340
|
+
range_end: cn("bg-accent", defaultClassNames.range_end),
|
|
341
|
+
today: cn(
|
|
342
|
+
"bg-accent text-accent-foreground",
|
|
343
|
+
defaultClassNames.today
|
|
344
|
+
),
|
|
345
|
+
outside: cn(
|
|
346
|
+
"text-muted-foreground aria-selected:text-muted-foreground",
|
|
347
|
+
defaultClassNames.outside
|
|
348
|
+
),
|
|
349
|
+
disabled: cn(
|
|
350
|
+
"text-muted-foreground opacity-50",
|
|
351
|
+
defaultClassNames.disabled
|
|
352
|
+
),
|
|
353
|
+
hidden: cn("invisible", defaultClassNames.hidden)
|
|
354
|
+
}, classNames),
|
|
355
|
+
components: __spreadValues({
|
|
356
|
+
Root: CalendarRoot,
|
|
357
|
+
Chevron: CalendarChevron,
|
|
358
|
+
DayButton: CalendarDayButton,
|
|
359
|
+
WeekNumber: CalendarWeekNumber
|
|
360
|
+
}, components),
|
|
361
|
+
formatters: __spreadValues({
|
|
362
|
+
formatMonthDropdown: (date) => date.toLocaleString("default", { month: "short" })
|
|
363
|
+
}, formatters),
|
|
364
|
+
showOutsideDays
|
|
365
|
+
}, props)
|
|
366
|
+
);
|
|
367
|
+
}
|
|
368
|
+
function CalendarDayButton(_a) {
|
|
369
|
+
var _b = _a, {
|
|
370
|
+
className,
|
|
371
|
+
day,
|
|
372
|
+
modifiers
|
|
373
|
+
} = _b, props = __objRest(_b, [
|
|
374
|
+
"className",
|
|
375
|
+
"day",
|
|
376
|
+
"modifiers"
|
|
377
|
+
]);
|
|
378
|
+
const defaultClassNames = (0, import_react_day_picker.getDefaultClassNames)();
|
|
379
|
+
const ref = React2.useRef(null);
|
|
380
|
+
React2.useEffect(() => {
|
|
381
|
+
var _a2;
|
|
382
|
+
if (modifiers.focused) (_a2 = ref.current) == null ? void 0 : _a2.focus();
|
|
383
|
+
}, [modifiers.focused]);
|
|
384
|
+
const selectedSingle = modifiers.selected && !modifiers.range_start && !modifiers.range_end ? !modifiers.range_middle : null;
|
|
385
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
386
|
+
Button,
|
|
387
|
+
__spreadValues({
|
|
388
|
+
className: cn(
|
|
389
|
+
"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",
|
|
390
|
+
defaultClassNames.day,
|
|
391
|
+
className
|
|
392
|
+
),
|
|
393
|
+
"data-day": day.date.toLocaleDateString(),
|
|
394
|
+
"data-range-end": modifiers.range_end,
|
|
395
|
+
"data-range-middle": modifiers.range_middle,
|
|
396
|
+
"data-range-start": modifiers.range_start,
|
|
397
|
+
"data-selected-single": selectedSingle,
|
|
398
|
+
ref,
|
|
399
|
+
size: "icon",
|
|
400
|
+
variant: "ghost"
|
|
401
|
+
}, props)
|
|
402
|
+
);
|
|
403
|
+
}
|
|
404
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
405
|
+
0 && (module.exports = {
|
|
406
|
+
Calendar,
|
|
407
|
+
CalendarDayButton
|
|
408
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Calendar,
|
|
3
|
+
CalendarDayButton
|
|
4
|
+
} from "../../chunk-2WZVSBAY.mjs";
|
|
5
|
+
import "../../chunk-IAOOZCUY.mjs";
|
|
6
|
+
import "../../chunk-DBHJ5KC3.mjs";
|
|
7
|
+
import "../../chunk-V7CNWJT3.mjs";
|
|
8
|
+
import "../../chunk-FWCSY2DS.mjs";
|
|
9
|
+
export {
|
|
10
|
+
Calendar,
|
|
11
|
+
CalendarDayButton
|
|
12
|
+
};
|
|
@@ -0,0 +1,156 @@
|
|
|
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/card.tsx
|
|
47
|
+
var card_exports = {};
|
|
48
|
+
__export(card_exports, {
|
|
49
|
+
Card: () => Card,
|
|
50
|
+
CardAction: () => CardAction,
|
|
51
|
+
CardContent: () => CardContent,
|
|
52
|
+
CardDescription: () => CardDescription,
|
|
53
|
+
CardFooter: () => CardFooter,
|
|
54
|
+
CardHeader: () => CardHeader,
|
|
55
|
+
CardTitle: () => CardTitle
|
|
56
|
+
});
|
|
57
|
+
module.exports = __toCommonJS(card_exports);
|
|
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/card.tsx
|
|
67
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
68
|
+
function Card(_a) {
|
|
69
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
70
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
71
|
+
"div",
|
|
72
|
+
__spreadValues({
|
|
73
|
+
className: cn(
|
|
74
|
+
"flex flex-col gap-6 border bg-card py-6 text-card-foreground shadow-sm",
|
|
75
|
+
className
|
|
76
|
+
),
|
|
77
|
+
"data-slot": "card"
|
|
78
|
+
}, props)
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
function CardHeader(_a) {
|
|
82
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
83
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
84
|
+
"div",
|
|
85
|
+
__spreadValues({
|
|
86
|
+
className: cn(
|
|
87
|
+
"@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",
|
|
88
|
+
className
|
|
89
|
+
),
|
|
90
|
+
"data-slot": "card-header"
|
|
91
|
+
}, props)
|
|
92
|
+
);
|
|
93
|
+
}
|
|
94
|
+
function CardTitle(_a) {
|
|
95
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
96
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
97
|
+
"div",
|
|
98
|
+
__spreadValues({
|
|
99
|
+
className: cn("leading-none font-semibold", className),
|
|
100
|
+
"data-slot": "card-title"
|
|
101
|
+
}, props)
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
function CardDescription(_a) {
|
|
105
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
106
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
107
|
+
"div",
|
|
108
|
+
__spreadValues({
|
|
109
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
110
|
+
"data-slot": "card-description"
|
|
111
|
+
}, props)
|
|
112
|
+
);
|
|
113
|
+
}
|
|
114
|
+
function CardAction(_a) {
|
|
115
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
116
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
117
|
+
"div",
|
|
118
|
+
__spreadValues({
|
|
119
|
+
className: cn(
|
|
120
|
+
"col-start-2 row-span-2 row-start-1 self-start justify-self-end",
|
|
121
|
+
className
|
|
122
|
+
),
|
|
123
|
+
"data-slot": "card-action"
|
|
124
|
+
}, props)
|
|
125
|
+
);
|
|
126
|
+
}
|
|
127
|
+
function CardContent(_a) {
|
|
128
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
129
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
130
|
+
"div",
|
|
131
|
+
__spreadValues({
|
|
132
|
+
className: cn("px-6", className),
|
|
133
|
+
"data-slot": "card-content"
|
|
134
|
+
}, props)
|
|
135
|
+
);
|
|
136
|
+
}
|
|
137
|
+
function CardFooter(_a) {
|
|
138
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
139
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
140
|
+
"div",
|
|
141
|
+
__spreadValues({
|
|
142
|
+
className: cn("flex items-center px-6 [.border-t]:pt-6", className),
|
|
143
|
+
"data-slot": "card-footer"
|
|
144
|
+
}, props)
|
|
145
|
+
);
|
|
146
|
+
}
|
|
147
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
148
|
+
0 && (module.exports = {
|
|
149
|
+
Card,
|
|
150
|
+
CardAction,
|
|
151
|
+
CardContent,
|
|
152
|
+
CardDescription,
|
|
153
|
+
CardFooter,
|
|
154
|
+
CardHeader,
|
|
155
|
+
CardTitle
|
|
156
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Card,
|
|
3
|
+
CardAction,
|
|
4
|
+
CardContent,
|
|
5
|
+
CardDescription,
|
|
6
|
+
CardFooter,
|
|
7
|
+
CardHeader,
|
|
8
|
+
CardTitle
|
|
9
|
+
} from "../../chunk-SLWCCURD.mjs";
|
|
10
|
+
import "../../chunk-V7CNWJT3.mjs";
|
|
11
|
+
import "../../chunk-FWCSY2DS.mjs";
|
|
12
|
+
export {
|
|
13
|
+
Card,
|
|
14
|
+
CardAction,
|
|
15
|
+
CardContent,
|
|
16
|
+
CardDescription,
|
|
17
|
+
CardFooter,
|
|
18
|
+
CardHeader,
|
|
19
|
+
CardTitle
|
|
20
|
+
};
|