@wealthx/shadcn 0.0.2 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +135 -11
- package/CHANGELOG.md +12 -0
- package/CHANGES.md +345 -0
- package/README.md +128 -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 +4312 -90
- package/dist/index.mjs +459 -158
- 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 +1 -1
- 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/dist/index.d.mts +0 -27
- package/dist/index.d.ts +0 -27
- package/src/provider/ShadcnProvider.tsx +0 -89
- package/src/provider/index.ts +0 -2
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import {
|
|
2
|
+
cn
|
|
3
|
+
} from "./chunk-V7CNWJT3.mjs";
|
|
4
|
+
import {
|
|
5
|
+
__objRest,
|
|
6
|
+
__spreadValues
|
|
7
|
+
} from "./chunk-FWCSY2DS.mjs";
|
|
8
|
+
|
|
9
|
+
// src/components/ui/empty.tsx
|
|
10
|
+
import { cva } from "class-variance-authority";
|
|
11
|
+
import { jsx } from "react/jsx-runtime";
|
|
12
|
+
function Empty(_a) {
|
|
13
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
14
|
+
return /* @__PURE__ */ jsx(
|
|
15
|
+
"div",
|
|
16
|
+
__spreadValues({
|
|
17
|
+
className: cn(
|
|
18
|
+
"flex min-w-0 flex-1 flex-col items-center justify-center gap-6 border border-dashed p-6 text-center text-balance md:p-12",
|
|
19
|
+
className
|
|
20
|
+
),
|
|
21
|
+
"data-slot": "empty"
|
|
22
|
+
}, props)
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
function EmptyHeader(_a) {
|
|
26
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
27
|
+
return /* @__PURE__ */ jsx(
|
|
28
|
+
"div",
|
|
29
|
+
__spreadValues({
|
|
30
|
+
className: cn(
|
|
31
|
+
"flex max-w-sm flex-col items-center gap-2 text-center",
|
|
32
|
+
className
|
|
33
|
+
),
|
|
34
|
+
"data-slot": "empty-header"
|
|
35
|
+
}, props)
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
var emptyMediaVariants = cva(
|
|
39
|
+
"mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
40
|
+
{
|
|
41
|
+
variants: {
|
|
42
|
+
variant: {
|
|
43
|
+
default: "[&_svg:not([class*='size-'])]:size-10",
|
|
44
|
+
icon: "flex size-10 shrink-0 items-center justify-center text-muted-foreground [&_svg:not([class*='size-'])]:size-6"
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
defaultVariants: {
|
|
48
|
+
variant: "default"
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
);
|
|
52
|
+
function EmptyMedia(_a) {
|
|
53
|
+
var _b = _a, {
|
|
54
|
+
className,
|
|
55
|
+
variant = "default"
|
|
56
|
+
} = _b, props = __objRest(_b, [
|
|
57
|
+
"className",
|
|
58
|
+
"variant"
|
|
59
|
+
]);
|
|
60
|
+
return /* @__PURE__ */ jsx(
|
|
61
|
+
"div",
|
|
62
|
+
__spreadValues({
|
|
63
|
+
className: cn(emptyMediaVariants({ variant, className })),
|
|
64
|
+
"data-slot": "empty-icon",
|
|
65
|
+
"data-variant": variant
|
|
66
|
+
}, props)
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
function EmptyTitle(_a) {
|
|
70
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
71
|
+
return /* @__PURE__ */ jsx(
|
|
72
|
+
"div",
|
|
73
|
+
__spreadValues({
|
|
74
|
+
className: cn("text-lg font-medium tracking-tight", className),
|
|
75
|
+
"data-slot": "empty-title"
|
|
76
|
+
}, props)
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
function EmptyDescription(_a) {
|
|
80
|
+
var _b = _a, {
|
|
81
|
+
className
|
|
82
|
+
} = _b, props = __objRest(_b, [
|
|
83
|
+
"className"
|
|
84
|
+
]);
|
|
85
|
+
return /* @__PURE__ */ jsx(
|
|
86
|
+
"div",
|
|
87
|
+
__spreadValues({
|
|
88
|
+
className: cn(
|
|
89
|
+
"text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",
|
|
90
|
+
className
|
|
91
|
+
),
|
|
92
|
+
"data-slot": "empty-description"
|
|
93
|
+
}, props)
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
function EmptyContent(_a) {
|
|
97
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
98
|
+
return /* @__PURE__ */ jsx(
|
|
99
|
+
"div",
|
|
100
|
+
__spreadValues({
|
|
101
|
+
className: cn(
|
|
102
|
+
"flex w-full max-w-sm min-w-0 flex-col items-center gap-4 text-sm text-balance",
|
|
103
|
+
className
|
|
104
|
+
),
|
|
105
|
+
"data-slot": "empty-content"
|
|
106
|
+
}, props)
|
|
107
|
+
);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export {
|
|
111
|
+
Empty,
|
|
112
|
+
EmptyHeader,
|
|
113
|
+
EmptyMedia,
|
|
114
|
+
EmptyTitle,
|
|
115
|
+
EmptyDescription,
|
|
116
|
+
EmptyContent
|
|
117
|
+
};
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import {
|
|
2
|
+
cn
|
|
3
|
+
} from "./chunk-V7CNWJT3.mjs";
|
|
4
|
+
import {
|
|
5
|
+
__objRest,
|
|
6
|
+
__spreadProps,
|
|
7
|
+
__spreadValues
|
|
8
|
+
} from "./chunk-FWCSY2DS.mjs";
|
|
9
|
+
|
|
10
|
+
// src/components/ui/input-otp.tsx
|
|
11
|
+
import * as React from "react";
|
|
12
|
+
import { OTPInput, OTPInputContext } from "input-otp";
|
|
13
|
+
import { MinusIcon } from "lucide-react";
|
|
14
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
15
|
+
function InputOTP(_a) {
|
|
16
|
+
var _b = _a, {
|
|
17
|
+
className,
|
|
18
|
+
containerClassName
|
|
19
|
+
} = _b, props = __objRest(_b, [
|
|
20
|
+
"className",
|
|
21
|
+
"containerClassName"
|
|
22
|
+
]);
|
|
23
|
+
return /* @__PURE__ */ jsx(
|
|
24
|
+
OTPInput,
|
|
25
|
+
__spreadValues({
|
|
26
|
+
className: cn("disabled:cursor-not-allowed", className),
|
|
27
|
+
containerClassName: cn(
|
|
28
|
+
"flex items-center gap-2 has-disabled:opacity-50",
|
|
29
|
+
containerClassName
|
|
30
|
+
),
|
|
31
|
+
"data-slot": "input-otp"
|
|
32
|
+
}, props)
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
function InputOTPGroup(_a) {
|
|
36
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
37
|
+
return /* @__PURE__ */ jsx(
|
|
38
|
+
"div",
|
|
39
|
+
__spreadValues({
|
|
40
|
+
className: cn("flex items-center", className),
|
|
41
|
+
"data-slot": "input-otp-group"
|
|
42
|
+
}, props)
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
function InputOTPSlot(_a) {
|
|
46
|
+
var _b = _a, {
|
|
47
|
+
index,
|
|
48
|
+
className
|
|
49
|
+
} = _b, props = __objRest(_b, [
|
|
50
|
+
"index",
|
|
51
|
+
"className"
|
|
52
|
+
]);
|
|
53
|
+
var _a2;
|
|
54
|
+
const inputOTPContext = React.useContext(OTPInputContext);
|
|
55
|
+
const { char, hasFakeCaret, isActive } = (_a2 = inputOTPContext.slots[index]) != null ? _a2 : {};
|
|
56
|
+
return /* @__PURE__ */ jsxs(
|
|
57
|
+
"div",
|
|
58
|
+
__spreadProps(__spreadValues({
|
|
59
|
+
className: cn(
|
|
60
|
+
"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",
|
|
61
|
+
className
|
|
62
|
+
),
|
|
63
|
+
"data-active": isActive,
|
|
64
|
+
"data-slot": "input-otp-slot"
|
|
65
|
+
}, props), {
|
|
66
|
+
children: [
|
|
67
|
+
char,
|
|
68
|
+
hasFakeCaret ? /* @__PURE__ */ jsx("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsx("div", { className: "h-4 w-px animate-caret-blink bg-foreground duration-1000" }) }) : null
|
|
69
|
+
]
|
|
70
|
+
})
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
function InputOTPSeparator(_a) {
|
|
74
|
+
var props = __objRest(_a, []);
|
|
75
|
+
return /* @__PURE__ */ jsx("div", __spreadProps(__spreadValues({ "data-slot": "input-otp-separator", role: "separator" }, props), { children: /* @__PURE__ */ jsx(MinusIcon, {}) }));
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export {
|
|
79
|
+
InputOTP,
|
|
80
|
+
InputOTPGroup,
|
|
81
|
+
InputOTPSlot,
|
|
82
|
+
InputOTPSeparator
|
|
83
|
+
};
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Textarea
|
|
3
|
+
} from "./chunk-GPRJQ24C.mjs";
|
|
4
|
+
import {
|
|
5
|
+
Input
|
|
6
|
+
} from "./chunk-DS2AMHN2.mjs";
|
|
7
|
+
import {
|
|
8
|
+
Button
|
|
9
|
+
} from "./chunk-IAOOZCUY.mjs";
|
|
10
|
+
import {
|
|
11
|
+
cn
|
|
12
|
+
} from "./chunk-V7CNWJT3.mjs";
|
|
13
|
+
import {
|
|
14
|
+
__objRest,
|
|
15
|
+
__spreadValues
|
|
16
|
+
} from "./chunk-FWCSY2DS.mjs";
|
|
17
|
+
|
|
18
|
+
// src/components/ui/input-group.tsx
|
|
19
|
+
import { cva } from "class-variance-authority";
|
|
20
|
+
import { jsx } from "react/jsx-runtime";
|
|
21
|
+
function InputGroup(_a) {
|
|
22
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
23
|
+
return /* @__PURE__ */ jsx(
|
|
24
|
+
"div",
|
|
25
|
+
__spreadValues({
|
|
26
|
+
className: cn(
|
|
27
|
+
"group/input-group relative flex w-full items-center border border-input shadow-xs transition-[color,box-shadow] outline-none dark:bg-input/30",
|
|
28
|
+
"h-9 min-w-0 has-[>textarea]:h-auto",
|
|
29
|
+
// Variants based on alignment.
|
|
30
|
+
"has-[>[data-align=inline-start]]:[&>input]:pl-2",
|
|
31
|
+
"has-[>[data-align=inline-end]]:[&>input]:pr-2",
|
|
32
|
+
"has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3",
|
|
33
|
+
"has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3",
|
|
34
|
+
// Focus state.
|
|
35
|
+
"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",
|
|
36
|
+
// Error state.
|
|
37
|
+
"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",
|
|
38
|
+
className
|
|
39
|
+
),
|
|
40
|
+
"data-slot": "input-group",
|
|
41
|
+
role: "group"
|
|
42
|
+
}, props)
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
var inputGroupAddonVariants = cva(
|
|
46
|
+
"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",
|
|
47
|
+
{
|
|
48
|
+
variants: {
|
|
49
|
+
align: {
|
|
50
|
+
"inline-start": "order-first pl-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]",
|
|
51
|
+
"inline-end": "order-last pr-3 has-[>button]:mr-[-0.45rem] has-[>kbd]:mr-[-0.35rem]",
|
|
52
|
+
"block-start": "order-first w-full justify-start px-3 pt-3 group-has-[>input]/input-group:pt-2.5 [.border-b]:pb-3",
|
|
53
|
+
"block-end": "order-last w-full justify-start px-3 pb-3 group-has-[>input]/input-group:pb-2.5 [.border-t]:pt-3"
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
defaultVariants: {
|
|
57
|
+
align: "inline-start"
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
);
|
|
61
|
+
function InputGroupAddon(_a) {
|
|
62
|
+
var _b = _a, {
|
|
63
|
+
className,
|
|
64
|
+
align = "inline-start"
|
|
65
|
+
} = _b, props = __objRest(_b, [
|
|
66
|
+
"className",
|
|
67
|
+
"align"
|
|
68
|
+
]);
|
|
69
|
+
return (
|
|
70
|
+
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions -- click only forwards focus to the sibling input; the div is not truly interactive
|
|
71
|
+
/* @__PURE__ */ jsx(
|
|
72
|
+
"div",
|
|
73
|
+
__spreadValues({
|
|
74
|
+
className: cn(inputGroupAddonVariants({ align }), className),
|
|
75
|
+
"data-align": align,
|
|
76
|
+
"data-slot": "input-group-addon",
|
|
77
|
+
onClick: (e) => {
|
|
78
|
+
var _a2, _b2;
|
|
79
|
+
if (e.target.closest("button")) {
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
(_b2 = (_a2 = e.currentTarget.parentElement) == null ? void 0 : _a2.querySelector("input")) == null ? void 0 : _b2.focus();
|
|
83
|
+
},
|
|
84
|
+
onKeyDown: (e) => {
|
|
85
|
+
var _a2, _b2;
|
|
86
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
87
|
+
(_b2 = (_a2 = e.currentTarget.parentElement) == null ? void 0 : _a2.querySelector("input")) == null ? void 0 : _b2.focus();
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
role: "group"
|
|
91
|
+
}, props)
|
|
92
|
+
)
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
var inputGroupButtonVariants = cva(
|
|
96
|
+
"flex items-center gap-2 text-sm shadow-none",
|
|
97
|
+
{
|
|
98
|
+
variants: {
|
|
99
|
+
size: {
|
|
100
|
+
xs: "h-6 gap-1 px-2 has-[>svg]:px-2 [&>svg:not([class*='size-'])]:size-3.5",
|
|
101
|
+
sm: "h-8 gap-1.5 px-2.5 has-[>svg]:px-2.5",
|
|
102
|
+
"icon-xs": "size-6 p-0 has-[>svg]:p-0",
|
|
103
|
+
"icon-sm": "size-8 p-0 has-[>svg]:p-0"
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
defaultVariants: {
|
|
107
|
+
size: "xs"
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
);
|
|
111
|
+
function InputGroupButton(_a) {
|
|
112
|
+
var _b = _a, {
|
|
113
|
+
className,
|
|
114
|
+
type = "button",
|
|
115
|
+
variant = "ghost",
|
|
116
|
+
size = "xs"
|
|
117
|
+
} = _b, props = __objRest(_b, [
|
|
118
|
+
"className",
|
|
119
|
+
"type",
|
|
120
|
+
"variant",
|
|
121
|
+
"size"
|
|
122
|
+
]);
|
|
123
|
+
return /* @__PURE__ */ jsx(
|
|
124
|
+
Button,
|
|
125
|
+
__spreadValues({
|
|
126
|
+
className: cn(inputGroupButtonVariants({ size }), className),
|
|
127
|
+
"data-size": size,
|
|
128
|
+
type,
|
|
129
|
+
variant
|
|
130
|
+
}, props)
|
|
131
|
+
);
|
|
132
|
+
}
|
|
133
|
+
function InputGroupText(_a) {
|
|
134
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
135
|
+
return /* @__PURE__ */ jsx(
|
|
136
|
+
"span",
|
|
137
|
+
__spreadValues({
|
|
138
|
+
className: cn(
|
|
139
|
+
"flex items-center gap-2 text-sm text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",
|
|
140
|
+
className
|
|
141
|
+
)
|
|
142
|
+
}, props)
|
|
143
|
+
);
|
|
144
|
+
}
|
|
145
|
+
function InputGroupInput(_a) {
|
|
146
|
+
var _b = _a, {
|
|
147
|
+
className
|
|
148
|
+
} = _b, props = __objRest(_b, [
|
|
149
|
+
"className"
|
|
150
|
+
]);
|
|
151
|
+
return /* @__PURE__ */ jsx(
|
|
152
|
+
Input,
|
|
153
|
+
__spreadValues({
|
|
154
|
+
className: cn(
|
|
155
|
+
"flex-1 rounded-none border-0 bg-transparent shadow-none focus-visible:ring-0 dark:bg-transparent",
|
|
156
|
+
className
|
|
157
|
+
),
|
|
158
|
+
"data-slot": "input-group-control"
|
|
159
|
+
}, props)
|
|
160
|
+
);
|
|
161
|
+
}
|
|
162
|
+
function InputGroupTextarea(_a) {
|
|
163
|
+
var _b = _a, {
|
|
164
|
+
className
|
|
165
|
+
} = _b, props = __objRest(_b, [
|
|
166
|
+
"className"
|
|
167
|
+
]);
|
|
168
|
+
return /* @__PURE__ */ jsx(
|
|
169
|
+
Textarea,
|
|
170
|
+
__spreadValues({
|
|
171
|
+
className: cn(
|
|
172
|
+
"flex-1 resize-none rounded-none border-0 bg-transparent py-3 shadow-none focus-visible:ring-0 dark:bg-transparent",
|
|
173
|
+
className
|
|
174
|
+
),
|
|
175
|
+
"data-slot": "input-group-control"
|
|
176
|
+
}, props)
|
|
177
|
+
);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
export {
|
|
181
|
+
InputGroup,
|
|
182
|
+
InputGroupAddon,
|
|
183
|
+
InputGroupButton,
|
|
184
|
+
InputGroupText,
|
|
185
|
+
InputGroupInput,
|
|
186
|
+
InputGroupTextarea
|
|
187
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import {
|
|
2
|
+
cn
|
|
3
|
+
} from "./chunk-V7CNWJT3.mjs";
|
|
4
|
+
import {
|
|
5
|
+
__objRest,
|
|
6
|
+
__spreadValues
|
|
7
|
+
} from "./chunk-FWCSY2DS.mjs";
|
|
8
|
+
|
|
9
|
+
// src/components/ui/label.tsx
|
|
10
|
+
import { jsx } from "react/jsx-runtime";
|
|
11
|
+
function Label(_a) {
|
|
12
|
+
var _b = _a, {
|
|
13
|
+
className
|
|
14
|
+
} = _b, props = __objRest(_b, [
|
|
15
|
+
"className"
|
|
16
|
+
]);
|
|
17
|
+
return (
|
|
18
|
+
// eslint-disable-next-line jsx-a11y/label-has-associated-control -- htmlFor is passed by the consumer
|
|
19
|
+
/* @__PURE__ */ jsx(
|
|
20
|
+
"label",
|
|
21
|
+
__spreadValues({
|
|
22
|
+
className: cn(
|
|
23
|
+
"flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
|
|
24
|
+
className
|
|
25
|
+
),
|
|
26
|
+
"data-slot": "label"
|
|
27
|
+
}, props)
|
|
28
|
+
)
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export {
|
|
33
|
+
Label
|
|
34
|
+
};
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __defProps = Object.defineProperties;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
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 __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
23
|
+
var __objRest = (source, exclude) => {
|
|
24
|
+
var target = {};
|
|
25
|
+
for (var prop in source)
|
|
26
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
27
|
+
target[prop] = source[prop];
|
|
28
|
+
if (source != null && __getOwnPropSymbols)
|
|
29
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
30
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
31
|
+
target[prop] = source[prop];
|
|
32
|
+
}
|
|
33
|
+
return target;
|
|
34
|
+
};
|
|
35
|
+
var __export = (target, all) => {
|
|
36
|
+
for (var name in all)
|
|
37
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
38
|
+
};
|
|
39
|
+
var __copyProps = (to, from, except, desc) => {
|
|
40
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
41
|
+
for (let key of __getOwnPropNames(from))
|
|
42
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
43
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
44
|
+
}
|
|
45
|
+
return to;
|
|
46
|
+
};
|
|
47
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
48
|
+
|
|
49
|
+
// src/components/ui/accordion.tsx
|
|
50
|
+
var accordion_exports = {};
|
|
51
|
+
__export(accordion_exports, {
|
|
52
|
+
Accordion: () => Accordion,
|
|
53
|
+
AccordionContent: () => AccordionContent,
|
|
54
|
+
AccordionItem: () => AccordionItem,
|
|
55
|
+
AccordionTrigger: () => AccordionTrigger
|
|
56
|
+
});
|
|
57
|
+
module.exports = __toCommonJS(accordion_exports);
|
|
58
|
+
var import_lucide_react = require("lucide-react");
|
|
59
|
+
var import_accordion = require("@base-ui/react/accordion");
|
|
60
|
+
|
|
61
|
+
// src/lib/utils.ts
|
|
62
|
+
var import_clsx = require("clsx");
|
|
63
|
+
var import_tailwind_merge = require("tailwind-merge");
|
|
64
|
+
function cn(...inputs) {
|
|
65
|
+
return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// src/components/ui/accordion.tsx
|
|
69
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
70
|
+
function Accordion(props) {
|
|
71
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_accordion.Accordion.Root, __spreadValues({ "data-slot": "accordion" }, props));
|
|
72
|
+
}
|
|
73
|
+
function AccordionItem(_a) {
|
|
74
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
75
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
76
|
+
import_accordion.Accordion.Item,
|
|
77
|
+
__spreadValues({
|
|
78
|
+
className: cn("border-b", className),
|
|
79
|
+
"data-slot": "accordion-item"
|
|
80
|
+
}, props)
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
function AccordionTrigger(_a) {
|
|
84
|
+
var _b = _a, {
|
|
85
|
+
className,
|
|
86
|
+
children
|
|
87
|
+
} = _b, props = __objRest(_b, [
|
|
88
|
+
"className",
|
|
89
|
+
"children"
|
|
90
|
+
]);
|
|
91
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_accordion.Accordion.Header, { className: "flex", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
92
|
+
import_accordion.Accordion.Trigger,
|
|
93
|
+
__spreadProps(__spreadValues({
|
|
94
|
+
className: cn(
|
|
95
|
+
// layout
|
|
96
|
+
"flex flex-1 items-center justify-between gap-4 py-4 text-left",
|
|
97
|
+
// typography
|
|
98
|
+
"text-sm font-medium",
|
|
99
|
+
// base
|
|
100
|
+
"rounded-none outline-none transition-[color,opacity]",
|
|
101
|
+
// interactive states
|
|
102
|
+
"hover:underline",
|
|
103
|
+
"focus-visible:ring-2 focus-visible:ring-foreground/30",
|
|
104
|
+
"disabled:pointer-events-none disabled:opacity-50",
|
|
105
|
+
// chevron rotation when open
|
|
106
|
+
"[&[data-panel-open]>svg]:rotate-180",
|
|
107
|
+
className
|
|
108
|
+
),
|
|
109
|
+
"data-slot": "accordion-trigger"
|
|
110
|
+
}, props), {
|
|
111
|
+
children: [
|
|
112
|
+
children,
|
|
113
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ChevronDownIcon, { className: "pointer-events-none size-4 shrink-0 text-muted-foreground transition-transform duration-200" })
|
|
114
|
+
]
|
|
115
|
+
})
|
|
116
|
+
) });
|
|
117
|
+
}
|
|
118
|
+
function AccordionContent(_a) {
|
|
119
|
+
var _b = _a, {
|
|
120
|
+
className,
|
|
121
|
+
children
|
|
122
|
+
} = _b, props = __objRest(_b, [
|
|
123
|
+
"className",
|
|
124
|
+
"children"
|
|
125
|
+
]);
|
|
126
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
127
|
+
import_accordion.Accordion.Panel,
|
|
128
|
+
__spreadProps(__spreadValues({
|
|
129
|
+
className: "overflow-hidden text-sm h-(--accordion-panel-height) transition-[height] duration-200 ease-out data-starting-style:h-0 data-ending-style:h-0",
|
|
130
|
+
"data-slot": "accordion-content"
|
|
131
|
+
}, props), {
|
|
132
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: cn("pb-4 text-muted-foreground", className), children })
|
|
133
|
+
})
|
|
134
|
+
);
|
|
135
|
+
}
|
|
136
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
137
|
+
0 && (module.exports = {
|
|
138
|
+
Accordion,
|
|
139
|
+
AccordionContent,
|
|
140
|
+
AccordionItem,
|
|
141
|
+
AccordionTrigger
|
|
142
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Accordion,
|
|
3
|
+
AccordionContent,
|
|
4
|
+
AccordionItem,
|
|
5
|
+
AccordionTrigger
|
|
6
|
+
} from "../../chunk-KKHTJNMM.mjs";
|
|
7
|
+
import "../../chunk-V7CNWJT3.mjs";
|
|
8
|
+
import "../../chunk-FWCSY2DS.mjs";
|
|
9
|
+
export {
|
|
10
|
+
Accordion,
|
|
11
|
+
AccordionContent,
|
|
12
|
+
AccordionItem,
|
|
13
|
+
AccordionTrigger
|
|
14
|
+
};
|