@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,184 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
var __create = Object.create;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __defProps = Object.defineProperties;
|
|
6
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
8
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
9
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
10
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
11
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
12
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
13
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
14
|
+
var __spreadValues = (a, b) => {
|
|
15
|
+
for (var prop in b || (b = {}))
|
|
16
|
+
if (__hasOwnProp.call(b, prop))
|
|
17
|
+
__defNormalProp(a, prop, b[prop]);
|
|
18
|
+
if (__getOwnPropSymbols)
|
|
19
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
20
|
+
if (__propIsEnum.call(b, prop))
|
|
21
|
+
__defNormalProp(a, prop, b[prop]);
|
|
22
|
+
}
|
|
23
|
+
return a;
|
|
24
|
+
};
|
|
25
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
26
|
+
var __objRest = (source, exclude) => {
|
|
27
|
+
var target = {};
|
|
28
|
+
for (var prop in source)
|
|
29
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
30
|
+
target[prop] = source[prop];
|
|
31
|
+
if (source != null && __getOwnPropSymbols)
|
|
32
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
33
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
34
|
+
target[prop] = source[prop];
|
|
35
|
+
}
|
|
36
|
+
return target;
|
|
37
|
+
};
|
|
38
|
+
var __export = (target, all) => {
|
|
39
|
+
for (var name in all)
|
|
40
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
41
|
+
};
|
|
42
|
+
var __copyProps = (to, from, except, desc) => {
|
|
43
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
44
|
+
for (let key of __getOwnPropNames(from))
|
|
45
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
46
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
47
|
+
}
|
|
48
|
+
return to;
|
|
49
|
+
};
|
|
50
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
51
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
52
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
53
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
54
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
55
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
56
|
+
mod
|
|
57
|
+
));
|
|
58
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
59
|
+
|
|
60
|
+
// src/components/ui/toggle-group.tsx
|
|
61
|
+
var toggle_group_exports = {};
|
|
62
|
+
__export(toggle_group_exports, {
|
|
63
|
+
ToggleGroup: () => ToggleGroup,
|
|
64
|
+
ToggleGroupItem: () => ToggleGroupItem
|
|
65
|
+
});
|
|
66
|
+
module.exports = __toCommonJS(toggle_group_exports);
|
|
67
|
+
var React = __toESM(require("react"));
|
|
68
|
+
var import_toggle_group = require("@base-ui/react/toggle-group");
|
|
69
|
+
var import_toggle2 = require("@base-ui/react/toggle");
|
|
70
|
+
|
|
71
|
+
// src/lib/utils.ts
|
|
72
|
+
var import_clsx = require("clsx");
|
|
73
|
+
var import_tailwind_merge = require("tailwind-merge");
|
|
74
|
+
function cn(...inputs) {
|
|
75
|
+
return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// src/components/ui/toggle.tsx
|
|
79
|
+
var import_class_variance_authority = require("class-variance-authority");
|
|
80
|
+
var import_toggle = require("@base-ui/react/toggle");
|
|
81
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
82
|
+
var toggleVariants = (0, import_class_variance_authority.cva)(
|
|
83
|
+
"inline-flex items-center justify-center gap-2 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] 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 data-pressed:bg-primary/10 data-pressed:inset-ring data-pressed:inset-ring-primary data-pressed:text-foreground data-pressed:hover:bg-primary/10 data-pressed:hover:text-foreground dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
84
|
+
{
|
|
85
|
+
variants: {
|
|
86
|
+
variant: {
|
|
87
|
+
default: "bg-transparent hover:bg-muted hover:text-muted-foreground",
|
|
88
|
+
outline: "border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"
|
|
89
|
+
},
|
|
90
|
+
size: {
|
|
91
|
+
default: "h-9 min-w-9 px-2",
|
|
92
|
+
sm: "h-8 min-w-8 px-1.5",
|
|
93
|
+
lg: "h-10 min-w-10 px-2.5"
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
defaultVariants: {
|
|
97
|
+
variant: "default",
|
|
98
|
+
size: "default"
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
);
|
|
102
|
+
|
|
103
|
+
// src/components/ui/toggle-group.tsx
|
|
104
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
105
|
+
var ToggleGroupContext = React.createContext({
|
|
106
|
+
size: "default",
|
|
107
|
+
variant: "default",
|
|
108
|
+
spacing: 0
|
|
109
|
+
});
|
|
110
|
+
function ToggleGroup(_a) {
|
|
111
|
+
var _b = _a, {
|
|
112
|
+
className,
|
|
113
|
+
variant,
|
|
114
|
+
size,
|
|
115
|
+
spacing = 0,
|
|
116
|
+
type,
|
|
117
|
+
children
|
|
118
|
+
} = _b, props = __objRest(_b, [
|
|
119
|
+
"className",
|
|
120
|
+
"variant",
|
|
121
|
+
"size",
|
|
122
|
+
"spacing",
|
|
123
|
+
"type",
|
|
124
|
+
"children"
|
|
125
|
+
]);
|
|
126
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
127
|
+
import_toggle_group.ToggleGroup,
|
|
128
|
+
__spreadProps(__spreadValues({
|
|
129
|
+
className: cn(
|
|
130
|
+
// WealthX: removed rounded-md (sharp corners) and shadow-xs (flat panels)
|
|
131
|
+
"group/toggle-group flex w-fit items-center gap-[--spacing(var(--gap))]",
|
|
132
|
+
className
|
|
133
|
+
),
|
|
134
|
+
"data-size": size,
|
|
135
|
+
"data-slot": "toggle-group",
|
|
136
|
+
"data-spacing": spacing,
|
|
137
|
+
"data-variant": variant,
|
|
138
|
+
multiple: type === "multiple",
|
|
139
|
+
style: { "--gap": spacing }
|
|
140
|
+
}, props), {
|
|
141
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(ToggleGroupContext.Provider, { value: { variant, size, spacing }, children })
|
|
142
|
+
})
|
|
143
|
+
);
|
|
144
|
+
}
|
|
145
|
+
function ToggleGroupItem(_a) {
|
|
146
|
+
var _b = _a, {
|
|
147
|
+
className,
|
|
148
|
+
children,
|
|
149
|
+
variant,
|
|
150
|
+
size
|
|
151
|
+
} = _b, props = __objRest(_b, [
|
|
152
|
+
"className",
|
|
153
|
+
"children",
|
|
154
|
+
"variant",
|
|
155
|
+
"size"
|
|
156
|
+
]);
|
|
157
|
+
const context = React.useContext(ToggleGroupContext);
|
|
158
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
159
|
+
import_toggle2.Toggle,
|
|
160
|
+
__spreadProps(__spreadValues({
|
|
161
|
+
className: cn(
|
|
162
|
+
toggleVariants({
|
|
163
|
+
variant: context.variant || variant,
|
|
164
|
+
size: context.size || size
|
|
165
|
+
}),
|
|
166
|
+
"w-auto min-w-0 shrink-0 focus:z-10 focus-visible:z-10",
|
|
167
|
+
// WealthX: no rounded corners on grouped items
|
|
168
|
+
"data-[spacing=0]:rounded-none data-[spacing=0]:shadow-none data-[spacing=0]:data-[variant=outline]:border-l-0 data-[spacing=0]:data-[variant=outline]:first:border-l",
|
|
169
|
+
className
|
|
170
|
+
),
|
|
171
|
+
"data-size": context.size || size,
|
|
172
|
+
"data-slot": "toggle-group-item",
|
|
173
|
+
"data-spacing": context.spacing,
|
|
174
|
+
"data-variant": context.variant || variant
|
|
175
|
+
}, props), {
|
|
176
|
+
children
|
|
177
|
+
})
|
|
178
|
+
);
|
|
179
|
+
}
|
|
180
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
181
|
+
0 && (module.exports = {
|
|
182
|
+
ToggleGroup,
|
|
183
|
+
ToggleGroupItem
|
|
184
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
ToggleGroup,
|
|
4
|
+
ToggleGroupItem
|
|
5
|
+
} from "../../chunk-DDPA2XXS.mjs";
|
|
6
|
+
import "../../chunk-3U7SD3MS.mjs";
|
|
7
|
+
import "../../chunk-V7CNWJT3.mjs";
|
|
8
|
+
import "../../chunk-FWCSY2DS.mjs";
|
|
9
|
+
export {
|
|
10
|
+
ToggleGroup,
|
|
11
|
+
ToggleGroupItem
|
|
12
|
+
};
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
9
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
10
|
+
var __spreadValues = (a, b) => {
|
|
11
|
+
for (var prop in b || (b = {}))
|
|
12
|
+
if (__hasOwnProp.call(b, prop))
|
|
13
|
+
__defNormalProp(a, prop, b[prop]);
|
|
14
|
+
if (__getOwnPropSymbols)
|
|
15
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
16
|
+
if (__propIsEnum.call(b, prop))
|
|
17
|
+
__defNormalProp(a, prop, b[prop]);
|
|
18
|
+
}
|
|
19
|
+
return a;
|
|
20
|
+
};
|
|
21
|
+
var __objRest = (source, exclude) => {
|
|
22
|
+
var target = {};
|
|
23
|
+
for (var prop in source)
|
|
24
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
25
|
+
target[prop] = source[prop];
|
|
26
|
+
if (source != null && __getOwnPropSymbols)
|
|
27
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
28
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
29
|
+
target[prop] = source[prop];
|
|
30
|
+
}
|
|
31
|
+
return target;
|
|
32
|
+
};
|
|
33
|
+
var __export = (target, all) => {
|
|
34
|
+
for (var name in all)
|
|
35
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
36
|
+
};
|
|
37
|
+
var __copyProps = (to, from, except, desc) => {
|
|
38
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
39
|
+
for (let key of __getOwnPropNames(from))
|
|
40
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
41
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
42
|
+
}
|
|
43
|
+
return to;
|
|
44
|
+
};
|
|
45
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
46
|
+
|
|
47
|
+
// src/components/ui/toggle.tsx
|
|
48
|
+
var toggle_exports = {};
|
|
49
|
+
__export(toggle_exports, {
|
|
50
|
+
Toggle: () => Toggle,
|
|
51
|
+
toggleVariants: () => toggleVariants
|
|
52
|
+
});
|
|
53
|
+
module.exports = __toCommonJS(toggle_exports);
|
|
54
|
+
var import_class_variance_authority = require("class-variance-authority");
|
|
55
|
+
var import_toggle = require("@base-ui/react/toggle");
|
|
56
|
+
|
|
57
|
+
// src/lib/utils.ts
|
|
58
|
+
var import_clsx = require("clsx");
|
|
59
|
+
var import_tailwind_merge = require("tailwind-merge");
|
|
60
|
+
function cn(...inputs) {
|
|
61
|
+
return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// src/components/ui/toggle.tsx
|
|
65
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
66
|
+
var toggleVariants = (0, import_class_variance_authority.cva)(
|
|
67
|
+
"inline-flex items-center justify-center gap-2 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] 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 data-pressed:bg-primary/10 data-pressed:inset-ring data-pressed:inset-ring-primary data-pressed:text-foreground data-pressed:hover:bg-primary/10 data-pressed:hover:text-foreground dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
68
|
+
{
|
|
69
|
+
variants: {
|
|
70
|
+
variant: {
|
|
71
|
+
default: "bg-transparent hover:bg-muted hover:text-muted-foreground",
|
|
72
|
+
outline: "border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"
|
|
73
|
+
},
|
|
74
|
+
size: {
|
|
75
|
+
default: "h-9 min-w-9 px-2",
|
|
76
|
+
sm: "h-8 min-w-8 px-1.5",
|
|
77
|
+
lg: "h-10 min-w-10 px-2.5"
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
defaultVariants: {
|
|
81
|
+
variant: "default",
|
|
82
|
+
size: "default"
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
);
|
|
86
|
+
function Toggle(_a) {
|
|
87
|
+
var _b = _a, {
|
|
88
|
+
className,
|
|
89
|
+
variant,
|
|
90
|
+
size
|
|
91
|
+
} = _b, props = __objRest(_b, [
|
|
92
|
+
"className",
|
|
93
|
+
"variant",
|
|
94
|
+
"size"
|
|
95
|
+
]);
|
|
96
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
97
|
+
import_toggle.Toggle,
|
|
98
|
+
__spreadValues({
|
|
99
|
+
className: cn(toggleVariants({ variant, size, className })),
|
|
100
|
+
"data-slot": "toggle"
|
|
101
|
+
}, props)
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
105
|
+
0 && (module.exports = {
|
|
106
|
+
Toggle,
|
|
107
|
+
toggleVariants
|
|
108
|
+
});
|
|
@@ -0,0 +1,140 @@
|
|
|
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/tooltip.tsx
|
|
50
|
+
var tooltip_exports = {};
|
|
51
|
+
__export(tooltip_exports, {
|
|
52
|
+
Tooltip: () => Tooltip,
|
|
53
|
+
TooltipContent: () => TooltipContent,
|
|
54
|
+
TooltipProvider: () => TooltipProvider,
|
|
55
|
+
TooltipTrigger: () => TooltipTrigger
|
|
56
|
+
});
|
|
57
|
+
module.exports = __toCommonJS(tooltip_exports);
|
|
58
|
+
var import_tooltip = require("@base-ui/react/tooltip");
|
|
59
|
+
|
|
60
|
+
// src/lib/utils.ts
|
|
61
|
+
var import_clsx = require("clsx");
|
|
62
|
+
var import_tailwind_merge = require("tailwind-merge");
|
|
63
|
+
function cn(...inputs) {
|
|
64
|
+
return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// src/lib/theme-provider.tsx
|
|
68
|
+
var import_react = require("react");
|
|
69
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
70
|
+
var ThemeVarsContext = (0, import_react.createContext)({});
|
|
71
|
+
function useThemeVars() {
|
|
72
|
+
return (0, import_react.useContext)(ThemeVarsContext);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// src/components/ui/tooltip.tsx
|
|
76
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
77
|
+
function TooltipProvider(_a) {
|
|
78
|
+
var _b = _a, {
|
|
79
|
+
delay = 0
|
|
80
|
+
} = _b, props = __objRest(_b, [
|
|
81
|
+
"delay"
|
|
82
|
+
]);
|
|
83
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
84
|
+
import_tooltip.Tooltip.Provider,
|
|
85
|
+
__spreadValues({
|
|
86
|
+
"data-slot": "tooltip-provider",
|
|
87
|
+
delay
|
|
88
|
+
}, props)
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
function Tooltip(_a) {
|
|
92
|
+
var props = __objRest(_a, []);
|
|
93
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_tooltip.Tooltip.Root, __spreadValues({ "data-slot": "tooltip" }, props));
|
|
94
|
+
}
|
|
95
|
+
function TooltipTrigger(_a) {
|
|
96
|
+
var props = __objRest(_a, []);
|
|
97
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_tooltip.Tooltip.Trigger, __spreadValues({ "data-slot": "tooltip-trigger" }, props));
|
|
98
|
+
}
|
|
99
|
+
function TooltipContent(_a) {
|
|
100
|
+
var _b = _a, {
|
|
101
|
+
className,
|
|
102
|
+
sideOffset = 8,
|
|
103
|
+
children,
|
|
104
|
+
style
|
|
105
|
+
} = _b, props = __objRest(_b, [
|
|
106
|
+
"className",
|
|
107
|
+
"sideOffset",
|
|
108
|
+
"children",
|
|
109
|
+
"style"
|
|
110
|
+
]);
|
|
111
|
+
const themeVars = useThemeVars();
|
|
112
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_tooltip.Tooltip.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_tooltip.Tooltip.Positioner, { sideOffset, children: [
|
|
113
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
114
|
+
import_tooltip.Tooltip.Popup,
|
|
115
|
+
__spreadProps(__spreadValues({
|
|
116
|
+
className: cn(
|
|
117
|
+
"z-50 w-fit animate-in bg-brand-secondary px-3 py-1.5 text-xs text-balance text-brand-secondary-foreground fade-in-0 zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-ending-style:animate-out data-ending-style:fade-out-0 data-ending-style:zoom-out-95 data-ending-style:fill-mode-forwards",
|
|
118
|
+
className
|
|
119
|
+
),
|
|
120
|
+
"data-slot": "tooltip-content",
|
|
121
|
+
style: __spreadValues(__spreadValues({}, themeVars), style)
|
|
122
|
+
}, props), {
|
|
123
|
+
children
|
|
124
|
+
})
|
|
125
|
+
),
|
|
126
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
127
|
+
import_tooltip.Tooltip.Arrow,
|
|
128
|
+
{
|
|
129
|
+
className: "z-50 size-2.5 rotate-45 bg-brand-secondary"
|
|
130
|
+
}
|
|
131
|
+
)
|
|
132
|
+
] }) });
|
|
133
|
+
}
|
|
134
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
135
|
+
0 && (module.exports = {
|
|
136
|
+
Tooltip,
|
|
137
|
+
TooltipContent,
|
|
138
|
+
TooltipProvider,
|
|
139
|
+
TooltipTrigger
|
|
140
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Tooltip,
|
|
3
|
+
TooltipContent,
|
|
4
|
+
TooltipProvider,
|
|
5
|
+
TooltipTrigger
|
|
6
|
+
} from "../../chunk-CGOKTPXU.mjs";
|
|
7
|
+
import "../../chunk-OXQQNQZI.mjs";
|
|
8
|
+
import "../../chunk-QOJ2DQD6.mjs";
|
|
9
|
+
import "../../chunk-V7CNWJT3.mjs";
|
|
10
|
+
import "../../chunk-FWCSY2DS.mjs";
|
|
11
|
+
export {
|
|
12
|
+
Tooltip,
|
|
13
|
+
TooltipContent,
|
|
14
|
+
TooltipProvider,
|
|
15
|
+
TooltipTrigger
|
|
16
|
+
};
|