@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,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/lib/colors.ts
|
|
21
|
+
var colors_exports = {};
|
|
22
|
+
__export(colors_exports, {
|
|
23
|
+
getContrastText: () => getContrastText,
|
|
24
|
+
getLuminance: () => getLuminance,
|
|
25
|
+
hexToOklch: () => hexToOklch,
|
|
26
|
+
hexToRgb: () => hexToRgb
|
|
27
|
+
});
|
|
28
|
+
module.exports = __toCommonJS(colors_exports);
|
|
29
|
+
var CONTRAST_DARK = "#040D13";
|
|
30
|
+
var CONTRAST_LIGHT = "#FFFFFF";
|
|
31
|
+
function hexToRgb(hex) {
|
|
32
|
+
const normalized = hex.replace(/^#/, "");
|
|
33
|
+
if (normalized.length === 3) {
|
|
34
|
+
const r = parseInt(normalized[0] + normalized[0], 16);
|
|
35
|
+
const g = parseInt(normalized[1] + normalized[1], 16);
|
|
36
|
+
const b = parseInt(normalized[2] + normalized[2], 16);
|
|
37
|
+
return [r, g, b];
|
|
38
|
+
}
|
|
39
|
+
if (normalized.length === 6 || normalized.length === 8) {
|
|
40
|
+
const r = parseInt(normalized.slice(0, 2), 16);
|
|
41
|
+
const g = parseInt(normalized.slice(2, 4), 16);
|
|
42
|
+
const b = parseInt(normalized.slice(4, 6), 16);
|
|
43
|
+
return [r, g, b];
|
|
44
|
+
}
|
|
45
|
+
throw new Error(`Invalid hex color: ${hex}`);
|
|
46
|
+
}
|
|
47
|
+
function linearizeSrgb(c) {
|
|
48
|
+
const n = c / 255;
|
|
49
|
+
return n <= 0.03928 ? n / 12.92 : Math.pow((n + 0.055) / 1.055, 2.4);
|
|
50
|
+
}
|
|
51
|
+
function getLuminance(hex) {
|
|
52
|
+
const [r, g, b] = hexToRgb(hex);
|
|
53
|
+
return 0.2126 * linearizeSrgb(r) + 0.7152 * linearizeSrgb(g) + 0.0722 * linearizeSrgb(b);
|
|
54
|
+
}
|
|
55
|
+
function getContrastText(backgroundColor) {
|
|
56
|
+
const luminance = getLuminance(backgroundColor);
|
|
57
|
+
return luminance > 0.179 ? CONTRAST_DARK : CONTRAST_LIGHT;
|
|
58
|
+
}
|
|
59
|
+
function hexToOklch(hex) {
|
|
60
|
+
const [r, g, b] = hexToRgb(hex);
|
|
61
|
+
const rl = linearizeSrgb(r);
|
|
62
|
+
const gl = linearizeSrgb(g);
|
|
63
|
+
const bl = linearizeSrgb(b);
|
|
64
|
+
const l = 0.4122214708 * rl + 0.5363325363 * gl + 0.0514459929 * bl;
|
|
65
|
+
const m = 0.2119034982 * rl + 0.6806995451 * gl + 0.1073969566 * bl;
|
|
66
|
+
const s = 0.0883024619 * rl + 0.2817188376 * gl + 0.6299787005 * bl;
|
|
67
|
+
const l_ = l > 0 ? Math.cbrt(l) : 0;
|
|
68
|
+
const m_ = m > 0 ? Math.cbrt(m) : 0;
|
|
69
|
+
const s_ = s > 0 ? Math.cbrt(s) : 0;
|
|
70
|
+
const L = 0.2104542553 * l_ + 0.793617785 * m_ - 0.0040720468 * s_;
|
|
71
|
+
const a = 1.9779984951 * l_ - 2.428592205 * m_ + 0.4505937099 * s_;
|
|
72
|
+
const bv = 0.0259040371 * l_ + 0.7827717662 * m_ - 0.808675766 * s_;
|
|
73
|
+
const C = Math.sqrt(a * a + bv * bv);
|
|
74
|
+
const h = (Math.atan2(bv, a) * 180 / Math.PI + 360) % 360;
|
|
75
|
+
if (C < 1e-3) return `oklch(${L.toFixed(3)} 0 0)`;
|
|
76
|
+
return `oklch(${L.toFixed(3)} ${C.toFixed(3)} ${h.toFixed(1)})`;
|
|
77
|
+
}
|
|
78
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
79
|
+
0 && (module.exports = {
|
|
80
|
+
getContrastText,
|
|
81
|
+
getLuminance,
|
|
82
|
+
hexToOklch,
|
|
83
|
+
hexToRgb
|
|
84
|
+
});
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
+
|
|
21
|
+
// src/lib/theme-provider.tsx
|
|
22
|
+
var theme_provider_exports = {};
|
|
23
|
+
__export(theme_provider_exports, {
|
|
24
|
+
ThemeProvider: () => ThemeProvider,
|
|
25
|
+
buildCssVariables: () => buildCssVariables,
|
|
26
|
+
useThemeVars: () => useThemeVars
|
|
27
|
+
});
|
|
28
|
+
module.exports = __toCommonJS(theme_provider_exports);
|
|
29
|
+
var import_react = require("react");
|
|
30
|
+
|
|
31
|
+
// src/lib/colors.ts
|
|
32
|
+
var CONTRAST_DARK = "#040D13";
|
|
33
|
+
var CONTRAST_LIGHT = "#FFFFFF";
|
|
34
|
+
function hexToRgb(hex) {
|
|
35
|
+
const normalized = hex.replace(/^#/, "");
|
|
36
|
+
if (normalized.length === 3) {
|
|
37
|
+
const r = parseInt(normalized[0] + normalized[0], 16);
|
|
38
|
+
const g = parseInt(normalized[1] + normalized[1], 16);
|
|
39
|
+
const b = parseInt(normalized[2] + normalized[2], 16);
|
|
40
|
+
return [r, g, b];
|
|
41
|
+
}
|
|
42
|
+
if (normalized.length === 6 || normalized.length === 8) {
|
|
43
|
+
const r = parseInt(normalized.slice(0, 2), 16);
|
|
44
|
+
const g = parseInt(normalized.slice(2, 4), 16);
|
|
45
|
+
const b = parseInt(normalized.slice(4, 6), 16);
|
|
46
|
+
return [r, g, b];
|
|
47
|
+
}
|
|
48
|
+
throw new Error(`Invalid hex color: ${hex}`);
|
|
49
|
+
}
|
|
50
|
+
function linearizeSrgb(c) {
|
|
51
|
+
const n = c / 255;
|
|
52
|
+
return n <= 0.03928 ? n / 12.92 : Math.pow((n + 0.055) / 1.055, 2.4);
|
|
53
|
+
}
|
|
54
|
+
function getLuminance(hex) {
|
|
55
|
+
const [r, g, b] = hexToRgb(hex);
|
|
56
|
+
return 0.2126 * linearizeSrgb(r) + 0.7152 * linearizeSrgb(g) + 0.0722 * linearizeSrgb(b);
|
|
57
|
+
}
|
|
58
|
+
function getContrastText(backgroundColor) {
|
|
59
|
+
const luminance = getLuminance(backgroundColor);
|
|
60
|
+
return luminance > 0.179 ? CONTRAST_DARK : CONTRAST_LIGHT;
|
|
61
|
+
}
|
|
62
|
+
function hexToOklch(hex) {
|
|
63
|
+
const [r, g, b] = hexToRgb(hex);
|
|
64
|
+
const rl = linearizeSrgb(r);
|
|
65
|
+
const gl = linearizeSrgb(g);
|
|
66
|
+
const bl = linearizeSrgb(b);
|
|
67
|
+
const l = 0.4122214708 * rl + 0.5363325363 * gl + 0.0514459929 * bl;
|
|
68
|
+
const m = 0.2119034982 * rl + 0.6806995451 * gl + 0.1073969566 * bl;
|
|
69
|
+
const s = 0.0883024619 * rl + 0.2817188376 * gl + 0.6299787005 * bl;
|
|
70
|
+
const l_ = l > 0 ? Math.cbrt(l) : 0;
|
|
71
|
+
const m_ = m > 0 ? Math.cbrt(m) : 0;
|
|
72
|
+
const s_ = s > 0 ? Math.cbrt(s) : 0;
|
|
73
|
+
const L = 0.2104542553 * l_ + 0.793617785 * m_ - 0.0040720468 * s_;
|
|
74
|
+
const a = 1.9779984951 * l_ - 2.428592205 * m_ + 0.4505937099 * s_;
|
|
75
|
+
const bv = 0.0259040371 * l_ + 0.7827717662 * m_ - 0.808675766 * s_;
|
|
76
|
+
const C = Math.sqrt(a * a + bv * bv);
|
|
77
|
+
const h = (Math.atan2(bv, a) * 180 / Math.PI + 360) % 360;
|
|
78
|
+
if (C < 1e-3) return `oklch(${L.toFixed(3)} 0 0)`;
|
|
79
|
+
return `oklch(${L.toFixed(3)} ${C.toFixed(3)} ${h.toFixed(1)})`;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// src/lib/theme-provider.tsx
|
|
83
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
84
|
+
var ThemeVarsContext = (0, import_react.createContext)({});
|
|
85
|
+
function useThemeVars() {
|
|
86
|
+
return (0, import_react.useContext)(ThemeVarsContext);
|
|
87
|
+
}
|
|
88
|
+
var DEFAULT_PRIMARY = "#33FF99";
|
|
89
|
+
var DEFAULT_SECONDARY = "#162029";
|
|
90
|
+
var DEFAULT_FONT = '"Figtree", ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"';
|
|
91
|
+
function ThemeProvider({
|
|
92
|
+
children,
|
|
93
|
+
primary = DEFAULT_PRIMARY,
|
|
94
|
+
secondary = DEFAULT_SECONDARY,
|
|
95
|
+
fontFamily = DEFAULT_FONT,
|
|
96
|
+
injectCssVariables = true
|
|
97
|
+
}) {
|
|
98
|
+
const vars = (0, import_react.useMemo)(() => {
|
|
99
|
+
if (!injectCssVariables) return {};
|
|
100
|
+
const primaryOklch = hexToOklch(primary);
|
|
101
|
+
const primaryFgOklch = hexToOklch(getContrastText(primary));
|
|
102
|
+
const secondaryOklch = hexToOklch(secondary);
|
|
103
|
+
const secondaryFgOklch = hexToOklch(getContrastText(secondary));
|
|
104
|
+
return {
|
|
105
|
+
// Brand primary — used by buttons, links, focus rings, active states
|
|
106
|
+
"--primary": primaryOklch,
|
|
107
|
+
"--primary-foreground": primaryFgOklch,
|
|
108
|
+
"--ring": primaryOklch,
|
|
109
|
+
// Sidebar uses primary for active navigation
|
|
110
|
+
"--sidebar-primary": primaryOklch,
|
|
111
|
+
"--sidebar-primary-foreground": primaryFgOklch,
|
|
112
|
+
// Brand secondary — tenant navy used by Secondary button variant
|
|
113
|
+
// NOTE: --secondary is reserved for paper/surface (#F5F8FA), so we use --brand-secondary
|
|
114
|
+
"--brand-secondary": secondaryOklch,
|
|
115
|
+
"--brand-secondary-foreground": secondaryFgOklch,
|
|
116
|
+
// Font family — applies to all components + typography utility classes
|
|
117
|
+
"--font-sans": fontFamily,
|
|
118
|
+
"--font-family-sans": fontFamily,
|
|
119
|
+
// Legacy compat (used by existing WealthX apps)
|
|
120
|
+
"--theme-primary": primary,
|
|
121
|
+
"--theme-secondary": secondary
|
|
122
|
+
};
|
|
123
|
+
}, [primary, secondary, fontFamily, injectCssVariables]);
|
|
124
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ThemeVarsContext.Provider, { value: vars, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { "data-wealthx-theme": true, style: vars, children }) });
|
|
125
|
+
}
|
|
126
|
+
function buildCssVariables(options) {
|
|
127
|
+
var _a, _b, _c;
|
|
128
|
+
const primary = (_a = options.primary) != null ? _a : DEFAULT_PRIMARY;
|
|
129
|
+
const secondary = (_b = options.secondary) != null ? _b : DEFAULT_SECONDARY;
|
|
130
|
+
const fontFamily = (_c = options.fontFamily) != null ? _c : DEFAULT_FONT;
|
|
131
|
+
return {
|
|
132
|
+
"--primary": hexToOklch(primary),
|
|
133
|
+
"--primary-foreground": hexToOklch(getContrastText(primary)),
|
|
134
|
+
"--ring": hexToOklch(primary),
|
|
135
|
+
"--sidebar-primary": hexToOklch(primary),
|
|
136
|
+
"--sidebar-primary-foreground": hexToOklch(getContrastText(primary)),
|
|
137
|
+
"--brand-secondary": hexToOklch(secondary),
|
|
138
|
+
"--brand-secondary-foreground": hexToOklch(getContrastText(secondary)),
|
|
139
|
+
"--font-sans": fontFamily,
|
|
140
|
+
"--font-family-sans": fontFamily,
|
|
141
|
+
"--theme-primary": primary,
|
|
142
|
+
"--theme-secondary": secondary
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
146
|
+
0 && (module.exports = {
|
|
147
|
+
ThemeProvider,
|
|
148
|
+
buildCssVariables,
|
|
149
|
+
useThemeVars
|
|
150
|
+
});
|
|
@@ -0,0 +1,157 @@
|
|
|
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 __export = (target, all) => {
|
|
21
|
+
for (var name in all)
|
|
22
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
23
|
+
};
|
|
24
|
+
var __copyProps = (to, from, except, desc) => {
|
|
25
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
26
|
+
for (let key of __getOwnPropNames(from))
|
|
27
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
28
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
29
|
+
}
|
|
30
|
+
return to;
|
|
31
|
+
};
|
|
32
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
33
|
+
|
|
34
|
+
// src/lib/typography.ts
|
|
35
|
+
var typography_exports = {};
|
|
36
|
+
__export(typography_exports, {
|
|
37
|
+
FONT_FAMILY_SANS: () => FONT_FAMILY_SANS,
|
|
38
|
+
TYPOGRAPHY: () => TYPOGRAPHY,
|
|
39
|
+
TYPOGRAPHY_BODY: () => TYPOGRAPHY_BODY,
|
|
40
|
+
TYPOGRAPHY_DISPLAY: () => TYPOGRAPHY_DISPLAY,
|
|
41
|
+
TYPOGRAPHY_HEADING: () => TYPOGRAPHY_HEADING,
|
|
42
|
+
TYPOGRAPHY_LABEL: () => TYPOGRAPHY_LABEL,
|
|
43
|
+
TYPOGRAPHY_RESPONSIVE: () => TYPOGRAPHY_RESPONSIVE,
|
|
44
|
+
TYPOGRAPHY_UTILITY: () => TYPOGRAPHY_UTILITY,
|
|
45
|
+
getResponsiveTypographyCssVars: () => getResponsiveTypographyCssVars,
|
|
46
|
+
getTypographyCssVars: () => getTypographyCssVars
|
|
47
|
+
});
|
|
48
|
+
module.exports = __toCommonJS(typography_exports);
|
|
49
|
+
var FONT_FAMILY_SANS = '"Figtree", ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"';
|
|
50
|
+
function style(weight, size, lineHeight, extra) {
|
|
51
|
+
return __spreadValues({ fontWeight: weight, fontSize: size, lineHeight }, extra);
|
|
52
|
+
}
|
|
53
|
+
var TYPOGRAPHY_DISPLAY = {
|
|
54
|
+
large: style(700, "4rem", "4.5rem", { letterSpacing: "-0.03125rem" }),
|
|
55
|
+
medium: style(700, "3rem", "3.5rem"),
|
|
56
|
+
small: style(600, "2.125rem", "2.625rem")
|
|
57
|
+
};
|
|
58
|
+
var TYPOGRAPHY_HEADING = {
|
|
59
|
+
h1: style(700, "2rem", "2.5rem"),
|
|
60
|
+
h2: style(600, "1.75rem", "2.25rem"),
|
|
61
|
+
h3: style(600, "1.5rem", "2rem"),
|
|
62
|
+
h4: style(600, "1.3125rem", "1.75rem"),
|
|
63
|
+
h5: style(600, "1.125rem", "1.5rem"),
|
|
64
|
+
h6: style(600, "1rem", "1.375rem")
|
|
65
|
+
};
|
|
66
|
+
var TYPOGRAPHY_BODY = {
|
|
67
|
+
large: style(400, "1.125rem", "1.75rem"),
|
|
68
|
+
medium: style(400, "1rem", "1.5rem"),
|
|
69
|
+
small: style(400, "0.875rem", "1.25rem")
|
|
70
|
+
};
|
|
71
|
+
var TYPOGRAPHY_LABEL = {
|
|
72
|
+
large: style(600, "1rem", "1.25rem"),
|
|
73
|
+
medium: style(600, "0.875rem", "1.125rem"),
|
|
74
|
+
small: style(600, "0.75rem", "1rem", { letterSpacing: "0.03125rem" })
|
|
75
|
+
};
|
|
76
|
+
var TYPOGRAPHY_UTILITY = {
|
|
77
|
+
caption: style(400, "0.75rem", "1rem"),
|
|
78
|
+
overline: style(600, "0.625rem", "0.875rem", {
|
|
79
|
+
letterSpacing: "0.09375rem",
|
|
80
|
+
textTransform: "uppercase"
|
|
81
|
+
}),
|
|
82
|
+
code: style(400, "0.875rem", "1.25rem")
|
|
83
|
+
};
|
|
84
|
+
var TYPOGRAPHY = {
|
|
85
|
+
display: TYPOGRAPHY_DISPLAY,
|
|
86
|
+
heading: TYPOGRAPHY_HEADING,
|
|
87
|
+
body: TYPOGRAPHY_BODY,
|
|
88
|
+
label: TYPOGRAPHY_LABEL,
|
|
89
|
+
utility: TYPOGRAPHY_UTILITY
|
|
90
|
+
};
|
|
91
|
+
var TYPOGRAPHY_RESPONSIVE = {
|
|
92
|
+
tablet: {
|
|
93
|
+
"display-large": style(700, "3.6rem", "4.05rem", {
|
|
94
|
+
letterSpacing: "-0.03125rem"
|
|
95
|
+
}),
|
|
96
|
+
"display-medium": style(700, "2.7rem", "3.15rem"),
|
|
97
|
+
"display-small": style(600, "1.9125rem", "2.3625rem")
|
|
98
|
+
},
|
|
99
|
+
mobile: {
|
|
100
|
+
"display-large": style(700, "2.5rem", "2.8125rem", {
|
|
101
|
+
letterSpacing: "-0.03125rem"
|
|
102
|
+
}),
|
|
103
|
+
"display-medium": style(700, "2rem", "2.334rem"),
|
|
104
|
+
h1: style(700, "1.75rem", "2.1875rem"),
|
|
105
|
+
h2: style(600, "1.5rem", "1.93rem")
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
function getTypographyCssVars(fontFamily = FONT_FAMILY_SANS) {
|
|
109
|
+
const vars = {};
|
|
110
|
+
vars["--font-family-sans"] = fontFamily;
|
|
111
|
+
const allGroups = [
|
|
112
|
+
[
|
|
113
|
+
"display",
|
|
114
|
+
TYPOGRAPHY_DISPLAY
|
|
115
|
+
],
|
|
116
|
+
["", TYPOGRAPHY_HEADING],
|
|
117
|
+
["body", TYPOGRAPHY_BODY],
|
|
118
|
+
["label", TYPOGRAPHY_LABEL],
|
|
119
|
+
["", TYPOGRAPHY_UTILITY]
|
|
120
|
+
];
|
|
121
|
+
for (const [prefix, group] of allGroups) {
|
|
122
|
+
for (const [key, s] of Object.entries(group)) {
|
|
123
|
+
const token = prefix ? `${prefix}-${key}` : key;
|
|
124
|
+
vars[`--typography-${token}-size`] = s.fontSize;
|
|
125
|
+
vars[`--typography-${token}-leading`] = s.lineHeight;
|
|
126
|
+
vars[`--typography-${token}-weight`] = String(s.fontWeight);
|
|
127
|
+
if (s.letterSpacing)
|
|
128
|
+
vars[`--typography-${token}-tracking`] = s.letterSpacing;
|
|
129
|
+
if (s.textTransform)
|
|
130
|
+
vars[`--typography-${token}-transform`] = s.textTransform;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
return vars;
|
|
134
|
+
}
|
|
135
|
+
function getResponsiveTypographyCssVars(breakpoint) {
|
|
136
|
+
const vars = {};
|
|
137
|
+
for (const [key, s] of Object.entries(TYPOGRAPHY_RESPONSIVE[breakpoint])) {
|
|
138
|
+
vars[`--typography-${key}-size`] = s.fontSize;
|
|
139
|
+
vars[`--typography-${key}-leading`] = s.lineHeight;
|
|
140
|
+
vars[`--typography-${key}-weight`] = String(s.fontWeight);
|
|
141
|
+
if (s.letterSpacing) vars[`--typography-${key}-tracking`] = s.letterSpacing;
|
|
142
|
+
}
|
|
143
|
+
return vars;
|
|
144
|
+
}
|
|
145
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
146
|
+
0 && (module.exports = {
|
|
147
|
+
FONT_FAMILY_SANS,
|
|
148
|
+
TYPOGRAPHY,
|
|
149
|
+
TYPOGRAPHY_BODY,
|
|
150
|
+
TYPOGRAPHY_DISPLAY,
|
|
151
|
+
TYPOGRAPHY_HEADING,
|
|
152
|
+
TYPOGRAPHY_LABEL,
|
|
153
|
+
TYPOGRAPHY_RESPONSIVE,
|
|
154
|
+
TYPOGRAPHY_UTILITY,
|
|
155
|
+
getResponsiveTypographyCssVars,
|
|
156
|
+
getTypographyCssVars
|
|
157
|
+
});
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import {
|
|
2
|
+
FONT_FAMILY_SANS,
|
|
3
|
+
TYPOGRAPHY,
|
|
4
|
+
TYPOGRAPHY_BODY,
|
|
5
|
+
TYPOGRAPHY_DISPLAY,
|
|
6
|
+
TYPOGRAPHY_HEADING,
|
|
7
|
+
TYPOGRAPHY_LABEL,
|
|
8
|
+
TYPOGRAPHY_RESPONSIVE,
|
|
9
|
+
TYPOGRAPHY_UTILITY,
|
|
10
|
+
getResponsiveTypographyCssVars,
|
|
11
|
+
getTypographyCssVars
|
|
12
|
+
} from "../chunk-3VQNJ235.mjs";
|
|
13
|
+
import "../chunk-FWCSY2DS.mjs";
|
|
14
|
+
export {
|
|
15
|
+
FONT_FAMILY_SANS,
|
|
16
|
+
TYPOGRAPHY,
|
|
17
|
+
TYPOGRAPHY_BODY,
|
|
18
|
+
TYPOGRAPHY_DISPLAY,
|
|
19
|
+
TYPOGRAPHY_HEADING,
|
|
20
|
+
TYPOGRAPHY_LABEL,
|
|
21
|
+
TYPOGRAPHY_RESPONSIVE,
|
|
22
|
+
TYPOGRAPHY_UTILITY,
|
|
23
|
+
getResponsiveTypographyCssVars,
|
|
24
|
+
getTypographyCssVars
|
|
25
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/lib/utils.ts
|
|
21
|
+
var utils_exports = {};
|
|
22
|
+
__export(utils_exports, {
|
|
23
|
+
cn: () => cn
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(utils_exports);
|
|
26
|
+
var import_clsx = require("clsx");
|
|
27
|
+
var import_tailwind_merge = require("tailwind-merge");
|
|
28
|
+
function cn(...inputs) {
|
|
29
|
+
return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
|
|
30
|
+
}
|
|
31
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
32
|
+
0 && (module.exports = {
|
|
33
|
+
cn
|
|
34
|
+
});
|