@wealthx/shadcn 1.2.0 → 1.2.2
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 +93 -84
- package/CHANGELOG.md +13 -0
- package/dist/{chunk-NXA3CZ7A.mjs → chunk-4Y6R4WEC.mjs} +2 -0
- package/dist/{chunk-AH52LG6N.mjs → chunk-7MMXNK3C.mjs} +2 -0
- package/dist/{chunk-4CX4SBRO.mjs → chunk-A6AAWBPF.mjs} +1 -1
- package/dist/{chunk-WOEHFRGB.mjs → chunk-BDYZCBRT.mjs} +4 -4
- package/dist/{chunk-5QQVZTVZ.mjs → chunk-BL3DXM2X.mjs} +2 -1
- package/dist/{chunk-PMB3A7V3.mjs → chunk-EI5F6FMT.mjs} +1 -1
- package/dist/{chunk-QVKWW6KE.mjs → chunk-GGM2UYGG.mjs} +2 -1
- package/dist/{chunk-KMCGSZTX.mjs → chunk-JNQORUPP.mjs} +2 -1
- package/dist/{chunk-PJHPSRYD.mjs → chunk-K3JYD4IU.mjs} +2 -1
- package/dist/{chunk-CSDO6VBW.mjs → chunk-LBMRIB3G.mjs} +10 -10
- package/dist/{chunk-SMQ3DG25.mjs → chunk-LHYCMLVA.mjs} +2 -1
- package/dist/{chunk-NLCKVHWB.mjs → chunk-OPNQAVVH.mjs} +2 -1
- package/dist/{chunk-2SF672SZ.mjs → chunk-RYCLWMZ7.mjs} +2 -1
- package/dist/{chunk-PG6K5XEC.mjs → chunk-S4QRUQNW.mjs} +1 -1
- package/dist/{chunk-YKPROFLB.mjs → chunk-SIZMLSRU.mjs} +2 -1
- package/dist/{chunk-LE6YFY6D.mjs → chunk-SWGT756Z.mjs} +2 -1
- package/dist/{chunk-6FCGKSZX.mjs → chunk-TS2ZX2VS.mjs} +2 -0
- package/dist/chunk-U4NDAF2P.mjs +207 -0
- package/dist/{chunk-DOH3EHX7.mjs → chunk-U5X52X37.mjs} +1 -1
- package/dist/{chunk-WA6O6EUR.mjs → chunk-URGMJAE3.mjs} +9 -9
- package/dist/{chunk-ZRO5JO3H.mjs → chunk-UT4KJR7V.mjs} +48 -12
- package/dist/{chunk-SYOD63OZ.mjs → chunk-VGSESELX.mjs} +2 -2
- package/dist/{chunk-RRBS6D63.mjs → chunk-VPBN3WOO.mjs} +2 -1
- package/dist/chunk-ZRSDX6OW.mjs +385 -0
- package/dist/chunk-ZSHYDDRB.mjs +249 -0
- package/dist/components/ui/add-column-modal.mjs +3 -3
- package/dist/components/ui/add-lead-modal.mjs +2 -2
- package/dist/components/ui/backoffice-alert-history-chart.js +1 -1
- package/dist/components/ui/backoffice-alert-history-chart.mjs +1 -1
- package/dist/components/ui/backoffice-contact-history-chart.js +1 -1
- package/dist/components/ui/backoffice-contact-history-chart.mjs +1 -1
- package/dist/components/ui/borrowing-capacity-line-chart.js +1 -0
- package/dist/components/ui/borrowing-capacity-line-chart.mjs +1 -1
- package/dist/components/ui/cash-balance-line-chart.js +1 -0
- package/dist/components/ui/cash-balance-line-chart.mjs +1 -1
- package/dist/components/ui/cashflow-bar-chart.js +1 -1
- package/dist/components/ui/cashflow-bar-chart.mjs +1 -1
- package/dist/components/ui/color-picker.js +417 -0
- package/dist/components/ui/color-picker.mjs +22 -0
- package/dist/components/ui/data-table.js +44 -12
- package/dist/components/ui/data-table.mjs +1 -1
- package/dist/components/ui/date-picker.mjs +2 -2
- package/dist/components/ui/expense-bar-chart.js +1 -1
- package/dist/components/ui/expense-bar-chart.mjs +1 -1
- package/dist/components/ui/form-primitives.js +4 -4
- package/dist/components/ui/form-primitives.mjs +3 -3
- package/dist/components/ui/income-bar-chart.js +1 -1
- package/dist/components/ui/income-bar-chart.mjs +1 -1
- package/dist/components/ui/opportunity-edit-modals.js +4 -4
- package/dist/components/ui/opportunity-edit-modals.mjs +8 -8
- package/dist/components/ui/opportunity-summary-tab.js +4 -4
- package/dist/components/ui/opportunity-summary-tab.mjs +9 -9
- package/dist/components/ui/pipeline-board.js +4 -4
- package/dist/components/ui/pipeline-board.mjs +3 -3
- package/dist/components/ui/pipeline-dialogs.js +4 -4
- package/dist/components/ui/pipeline-dialogs.mjs +5 -5
- package/dist/components/ui/property-cashflow-doughnut-chart.js +1 -1
- package/dist/components/ui/property-cashflow-doughnut-chart.mjs +1 -1
- package/dist/components/ui/property-debt-equity-doughnut-chart.js +1 -1
- package/dist/components/ui/property-debt-equity-doughnut-chart.mjs +1 -1
- package/dist/components/ui/property-mobile-estimate-line-chart.js +1 -0
- package/dist/components/ui/property-mobile-estimate-line-chart.mjs +1 -1
- package/dist/components/ui/sidebar-nav.js +540 -0
- package/dist/components/ui/sidebar-nav.mjs +11 -0
- package/dist/components/ui/stepper.js +283 -0
- package/dist/components/ui/stepper.mjs +18 -0
- package/dist/components/ui/toggle-group.js +4 -4
- package/dist/components/ui/toggle-group.mjs +2 -2
- package/dist/components/ui/toggle.js +4 -4
- package/dist/components/ui/toggle.mjs +1 -1
- package/dist/components/ui/transactions-expense-categories-doughnut-chart.js +1 -1
- package/dist/components/ui/transactions-expense-categories-doughnut-chart.mjs +1 -1
- package/dist/components/ui/transactions-income-expense-bar-chart.js +1 -1
- package/dist/components/ui/transactions-income-expense-bar-chart.mjs +1 -1
- package/dist/components/ui/transactions-liabilities-breakdown-doughnut-chart.js +1 -1
- package/dist/components/ui/transactions-liabilities-breakdown-doughnut-chart.mjs +1 -1
- package/dist/index.js +2154 -1302
- package/dist/index.mjs +115 -83
- package/dist/lib/typography.js +10 -10
- package/dist/lib/typography.mjs +1 -1
- package/dist/styles.css +1 -1
- package/package.json +16 -1
- package/src/components/index.tsx +41 -0
- package/src/components/ui/backoffice-alert-history-chart.tsx +2 -1
- package/src/components/ui/backoffice-contact-history-chart.tsx +2 -1
- package/src/components/ui/borrowing-capacity-line-chart.tsx +2 -0
- package/src/components/ui/cash-balance-line-chart.tsx +2 -0
- package/src/components/ui/cashflow-bar-chart.tsx +2 -1
- package/src/components/ui/color-picker.tsx +307 -0
- package/src/components/ui/data-table.tsx +91 -11
- package/src/components/ui/expense-bar-chart.tsx +2 -1
- package/src/components/ui/income-bar-chart.tsx +2 -1
- package/src/components/ui/property-cashflow-doughnut-chart.tsx +2 -1
- package/src/components/ui/property-debt-equity-doughnut-chart.tsx +2 -1
- package/src/components/ui/property-mobile-estimate-line-chart.tsx +2 -0
- package/src/components/ui/sidebar-nav.tsx +517 -0
- package/src/components/ui/stepper.tsx +347 -0
- package/src/components/ui/toggle.tsx +4 -4
- package/src/components/ui/transactions-expense-categories-doughnut-chart.tsx +2 -1
- package/src/components/ui/transactions-income-expense-bar-chart.tsx +2 -1
- package/src/components/ui/transactions-liabilities-breakdown-doughnut-chart.tsx +2 -1
- package/src/lib/typography.ts +11 -11
- package/src/styles/globals.css +19 -19
- package/src/styles/styles-css.ts +1 -1
- package/tsup.config.ts +3 -0
- package/dist/{chunk-KUDCQ4FI.mjs → chunk-5MEWU56Z.mjs} +3 -3
- package/dist/{chunk-PR6V5XKM.mjs → chunk-CGH4DRNG.mjs} +3 -3
- package/dist/{chunk-3WMX6KWS.mjs → chunk-Y4QFWRNR.mjs} +8 -8
|
@@ -412,6 +412,7 @@ var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
|
412
412
|
import_chart.Chart.register(
|
|
413
413
|
import_chart.CategoryScale,
|
|
414
414
|
import_chart.LinearScale,
|
|
415
|
+
import_chart.LineController,
|
|
415
416
|
import_chart.LineElement,
|
|
416
417
|
import_chart.PointElement,
|
|
417
418
|
import_chart.Tooltip
|
|
@@ -418,6 +418,7 @@ var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
|
418
418
|
import_chart.Chart.register(
|
|
419
419
|
import_chart.CategoryScale,
|
|
420
420
|
import_chart.LinearScale,
|
|
421
|
+
import_chart.LineController,
|
|
421
422
|
import_chart.LineElement,
|
|
422
423
|
import_chart.PointElement,
|
|
423
424
|
import_chart.Tooltip
|
|
@@ -404,7 +404,7 @@ function ChartPeriodButton({
|
|
|
404
404
|
|
|
405
405
|
// src/components/ui/cashflow-bar-chart.tsx
|
|
406
406
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
407
|
-
import_chart.Chart.register(import_chart.CategoryScale, import_chart.LinearScale, import_chart.BarElement, import_chart.Tooltip, import_chart.Legend);
|
|
407
|
+
import_chart.Chart.register(import_chart.CategoryScale, import_chart.LinearScale, import_chart.BarController, import_chart.BarElement, import_chart.Tooltip, import_chart.Legend);
|
|
408
408
|
function LegendItem({
|
|
409
409
|
label,
|
|
410
410
|
fillColor,
|
|
@@ -0,0 +1,417 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
10
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
11
|
+
var __spreadValues = (a, b) => {
|
|
12
|
+
for (var prop in b || (b = {}))
|
|
13
|
+
if (__hasOwnProp.call(b, prop))
|
|
14
|
+
__defNormalProp(a, prop, b[prop]);
|
|
15
|
+
if (__getOwnPropSymbols)
|
|
16
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
17
|
+
if (__propIsEnum.call(b, prop))
|
|
18
|
+
__defNormalProp(a, prop, b[prop]);
|
|
19
|
+
}
|
|
20
|
+
return a;
|
|
21
|
+
};
|
|
22
|
+
var __objRest = (source, exclude) => {
|
|
23
|
+
var target = {};
|
|
24
|
+
for (var prop in source)
|
|
25
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
26
|
+
target[prop] = source[prop];
|
|
27
|
+
if (source != null && __getOwnPropSymbols)
|
|
28
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
29
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
30
|
+
target[prop] = source[prop];
|
|
31
|
+
}
|
|
32
|
+
return target;
|
|
33
|
+
};
|
|
34
|
+
var __export = (target, all) => {
|
|
35
|
+
for (var name in all)
|
|
36
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
37
|
+
};
|
|
38
|
+
var __copyProps = (to, from, except, desc) => {
|
|
39
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
40
|
+
for (let key of __getOwnPropNames(from))
|
|
41
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
42
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
43
|
+
}
|
|
44
|
+
return to;
|
|
45
|
+
};
|
|
46
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
47
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
48
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
49
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
50
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
51
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
52
|
+
mod
|
|
53
|
+
));
|
|
54
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
55
|
+
|
|
56
|
+
// src/components/ui/color-picker.tsx
|
|
57
|
+
var color_picker_exports = {};
|
|
58
|
+
__export(color_picker_exports, {
|
|
59
|
+
COLOR_PICKER_PRESETS: () => COLOR_PICKER_PRESETS,
|
|
60
|
+
ColorPicker: () => ColorPicker,
|
|
61
|
+
ColorPickerContent: () => ColorPickerContent,
|
|
62
|
+
ColorSwatch: () => ColorSwatch,
|
|
63
|
+
isValidHex: () => isValidHex,
|
|
64
|
+
normalizeHex: () => normalizeHex
|
|
65
|
+
});
|
|
66
|
+
module.exports = __toCommonJS(color_picker_exports);
|
|
67
|
+
var React2 = __toESM(require("react"));
|
|
68
|
+
|
|
69
|
+
// src/lib/utils.ts
|
|
70
|
+
var import_clsx = require("clsx");
|
|
71
|
+
var import_tailwind_merge = require("tailwind-merge");
|
|
72
|
+
var twMerge = (0, import_tailwind_merge.extendTailwindMerge)({
|
|
73
|
+
extend: {
|
|
74
|
+
classGroups: {
|
|
75
|
+
"font-size": [
|
|
76
|
+
{
|
|
77
|
+
text: [
|
|
78
|
+
"display-large",
|
|
79
|
+
"display-medium",
|
|
80
|
+
"display-small",
|
|
81
|
+
"h1",
|
|
82
|
+
"h2",
|
|
83
|
+
"h3",
|
|
84
|
+
"h4",
|
|
85
|
+
"h5",
|
|
86
|
+
"h6",
|
|
87
|
+
"body-large",
|
|
88
|
+
"body-medium",
|
|
89
|
+
"body-small",
|
|
90
|
+
"label-large",
|
|
91
|
+
"label-medium",
|
|
92
|
+
"label-small",
|
|
93
|
+
"button",
|
|
94
|
+
"button-xs",
|
|
95
|
+
"caption",
|
|
96
|
+
"overline",
|
|
97
|
+
"code"
|
|
98
|
+
]
|
|
99
|
+
}
|
|
100
|
+
]
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
function cn(...inputs) {
|
|
105
|
+
return twMerge((0, import_clsx.clsx)(inputs));
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
// src/components/ui/popover.tsx
|
|
109
|
+
var import_popover = require("@base-ui/react/popover");
|
|
110
|
+
|
|
111
|
+
// src/lib/theme-provider.tsx
|
|
112
|
+
var import_react = require("react");
|
|
113
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
114
|
+
var ThemeVarsContext = (0, import_react.createContext)({});
|
|
115
|
+
function useThemeVars() {
|
|
116
|
+
return (0, import_react.useContext)(ThemeVarsContext);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
// src/components/ui/popover.tsx
|
|
120
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
121
|
+
function Popover(_a) {
|
|
122
|
+
var props = __objRest(_a, []);
|
|
123
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_popover.Popover.Root, __spreadValues({ "data-slot": "popover" }, props));
|
|
124
|
+
}
|
|
125
|
+
function PopoverTrigger(_a) {
|
|
126
|
+
var props = __objRest(_a, []);
|
|
127
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_popover.Popover.Trigger, __spreadValues({ "data-slot": "popover-trigger" }, props));
|
|
128
|
+
}
|
|
129
|
+
function PopoverContent(_a) {
|
|
130
|
+
var _b = _a, {
|
|
131
|
+
className,
|
|
132
|
+
align = "center",
|
|
133
|
+
sideOffset = 4,
|
|
134
|
+
style
|
|
135
|
+
} = _b, props = __objRest(_b, [
|
|
136
|
+
"className",
|
|
137
|
+
"align",
|
|
138
|
+
"sideOffset",
|
|
139
|
+
"style"
|
|
140
|
+
]);
|
|
141
|
+
const themeVars = useThemeVars();
|
|
142
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_popover.Popover.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
143
|
+
import_popover.Popover.Positioner,
|
|
144
|
+
{
|
|
145
|
+
className: "z-[200]",
|
|
146
|
+
align,
|
|
147
|
+
sideOffset,
|
|
148
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
149
|
+
import_popover.Popover.Popup,
|
|
150
|
+
__spreadValues({
|
|
151
|
+
className: cn(
|
|
152
|
+
"z-50 w-72 border border-border bg-popover p-4 text-popover-foreground shadow-md outline-hidden 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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95",
|
|
153
|
+
className
|
|
154
|
+
),
|
|
155
|
+
"data-slot": "popover-content",
|
|
156
|
+
style: __spreadValues(__spreadValues({}, themeVars), style)
|
|
157
|
+
}, props)
|
|
158
|
+
)
|
|
159
|
+
}
|
|
160
|
+
) });
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
// src/components/ui/input.tsx
|
|
164
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
165
|
+
function Input(_a) {
|
|
166
|
+
var _b = _a, { className, type } = _b, props = __objRest(_b, ["className", "type"]);
|
|
167
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
168
|
+
"input",
|
|
169
|
+
__spreadValues({
|
|
170
|
+
className: cn(
|
|
171
|
+
"h-9 w-full min-w-0 border border-input bg-transparent px-3 py-1 text-body-medium font-sans shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-label-medium file:text-foreground placeholder:font-normal placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 dark:bg-input/30",
|
|
172
|
+
"focus-visible:border-primary focus-visible:ring-[3px] focus-visible:ring-primary/20",
|
|
173
|
+
"aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",
|
|
174
|
+
className
|
|
175
|
+
),
|
|
176
|
+
"data-slot": "input",
|
|
177
|
+
type
|
|
178
|
+
}, props)
|
|
179
|
+
);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
// src/components/ui/color-picker.tsx
|
|
183
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
184
|
+
var COLOR_PICKER_PRESETS = [
|
|
185
|
+
// Blues
|
|
186
|
+
"#1E40AF",
|
|
187
|
+
"#2563EB",
|
|
188
|
+
"#3B82F6",
|
|
189
|
+
"#60A5FA",
|
|
190
|
+
// Purples
|
|
191
|
+
"#7C3AED",
|
|
192
|
+
"#8B5CF6",
|
|
193
|
+
"#A78BFA",
|
|
194
|
+
"#C4B5FD",
|
|
195
|
+
// Greens
|
|
196
|
+
"#15803D",
|
|
197
|
+
"#16A34A",
|
|
198
|
+
"#22C55E",
|
|
199
|
+
"#4ADE80",
|
|
200
|
+
// Reds
|
|
201
|
+
"#B91C1C",
|
|
202
|
+
"#DC2626",
|
|
203
|
+
"#EF4444",
|
|
204
|
+
"#F87171",
|
|
205
|
+
// Oranges
|
|
206
|
+
"#C2410C",
|
|
207
|
+
"#EA580C",
|
|
208
|
+
"#F97316",
|
|
209
|
+
"#FB923C",
|
|
210
|
+
// Teals
|
|
211
|
+
"#0F766E",
|
|
212
|
+
"#0D9488",
|
|
213
|
+
"#14B8A6",
|
|
214
|
+
"#2DD4BF",
|
|
215
|
+
// Neutrals
|
|
216
|
+
"#111827",
|
|
217
|
+
"#374151",
|
|
218
|
+
"#6B7280",
|
|
219
|
+
"#D1D5DB"
|
|
220
|
+
];
|
|
221
|
+
function isValidHex(value) {
|
|
222
|
+
return /^#([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6})$/.test(value);
|
|
223
|
+
}
|
|
224
|
+
function normalizeHex(value) {
|
|
225
|
+
const stripped = value.replace(/^#/, "");
|
|
226
|
+
return `#${stripped}`;
|
|
227
|
+
}
|
|
228
|
+
function ColorSwatch({
|
|
229
|
+
color,
|
|
230
|
+
selected,
|
|
231
|
+
size = "md",
|
|
232
|
+
onClick,
|
|
233
|
+
className
|
|
234
|
+
}) {
|
|
235
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
236
|
+
"button",
|
|
237
|
+
{
|
|
238
|
+
type: "button",
|
|
239
|
+
title: color,
|
|
240
|
+
"aria-label": `Select color ${color}`,
|
|
241
|
+
"aria-pressed": selected,
|
|
242
|
+
onClick: () => onClick == null ? void 0 : onClick(color),
|
|
243
|
+
className: cn(
|
|
244
|
+
"relative shrink-0 transition-all outline-none shadow-[inset_0_0_0_1px_rgba(0,0,0,0.12)]",
|
|
245
|
+
"focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1",
|
|
246
|
+
size === "md" ? "size-7" : "size-5",
|
|
247
|
+
selected && "ring-2 ring-foreground ring-offset-1 ring-offset-background",
|
|
248
|
+
className
|
|
249
|
+
),
|
|
250
|
+
style: { backgroundColor: color }
|
|
251
|
+
}
|
|
252
|
+
);
|
|
253
|
+
}
|
|
254
|
+
function ColorPickerContent({
|
|
255
|
+
value,
|
|
256
|
+
onChange,
|
|
257
|
+
presets = COLOR_PICKER_PRESETS
|
|
258
|
+
}) {
|
|
259
|
+
const [hexInput, setHexInput] = React2.useState(value);
|
|
260
|
+
React2.useEffect(() => {
|
|
261
|
+
setHexInput(value);
|
|
262
|
+
}, [value]);
|
|
263
|
+
function handleHexInputChange(e) {
|
|
264
|
+
const raw = e.target.value;
|
|
265
|
+
setHexInput(raw);
|
|
266
|
+
const normalized = normalizeHex(raw);
|
|
267
|
+
if (isValidHex(normalized)) {
|
|
268
|
+
onChange(normalized);
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
function handleHexBlur() {
|
|
272
|
+
const normalized = normalizeHex(hexInput);
|
|
273
|
+
if (isValidHex(normalized)) {
|
|
274
|
+
setHexInput(normalized);
|
|
275
|
+
if (normalized !== value) onChange(normalized);
|
|
276
|
+
} else {
|
|
277
|
+
setHexInput(value);
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
const normalizedInput = normalizeHex(hexInput);
|
|
281
|
+
const isValid = isValidHex(normalizedInput);
|
|
282
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { "data-slot": "color-picker-content", className: "flex flex-col gap-4", children: [
|
|
283
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { children: [
|
|
284
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: "mb-2 text-xs font-medium text-muted-foreground", children: "Presets" }),
|
|
285
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "grid grid-cols-7 gap-1.5", children: presets.map((color) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
286
|
+
ColorSwatch,
|
|
287
|
+
{
|
|
288
|
+
color,
|
|
289
|
+
selected: value.toLowerCase() === color.toLowerCase(),
|
|
290
|
+
onClick: onChange
|
|
291
|
+
},
|
|
292
|
+
color
|
|
293
|
+
)) })
|
|
294
|
+
] }),
|
|
295
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { children: [
|
|
296
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: "mb-2 text-xs font-medium text-muted-foreground", children: "Custom hex" }),
|
|
297
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
298
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
299
|
+
"label",
|
|
300
|
+
{
|
|
301
|
+
className: "relative size-9 shrink-0 cursor-pointer border border-border",
|
|
302
|
+
title: "Open color picker",
|
|
303
|
+
style: {
|
|
304
|
+
backgroundColor: isValid ? normalizedInput : value
|
|
305
|
+
},
|
|
306
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
307
|
+
"input",
|
|
308
|
+
{
|
|
309
|
+
type: "color",
|
|
310
|
+
"aria-label": "Native color picker",
|
|
311
|
+
value: isValid ? normalizedInput : value,
|
|
312
|
+
onChange: (e) => {
|
|
313
|
+
setHexInput(e.target.value);
|
|
314
|
+
onChange(e.target.value);
|
|
315
|
+
},
|
|
316
|
+
className: "absolute inset-0 h-full w-full cursor-pointer opacity-0"
|
|
317
|
+
}
|
|
318
|
+
)
|
|
319
|
+
}
|
|
320
|
+
),
|
|
321
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
322
|
+
Input,
|
|
323
|
+
{
|
|
324
|
+
"aria-label": "Hex color value",
|
|
325
|
+
placeholder: "#000000",
|
|
326
|
+
value: hexInput,
|
|
327
|
+
onChange: handleHexInputChange,
|
|
328
|
+
onBlur: handleHexBlur,
|
|
329
|
+
maxLength: 7,
|
|
330
|
+
className: "h-9 flex-1 font-mono text-sm uppercase"
|
|
331
|
+
}
|
|
332
|
+
)
|
|
333
|
+
] })
|
|
334
|
+
] })
|
|
335
|
+
] });
|
|
336
|
+
}
|
|
337
|
+
function ColorPicker({
|
|
338
|
+
value: controlledValue,
|
|
339
|
+
defaultValue = "#3B82F6",
|
|
340
|
+
onChange,
|
|
341
|
+
presets,
|
|
342
|
+
disabled,
|
|
343
|
+
label,
|
|
344
|
+
className
|
|
345
|
+
}) {
|
|
346
|
+
const isControlled = controlledValue !== void 0;
|
|
347
|
+
const [internalValue, setInternalValue] = React2.useState(defaultValue);
|
|
348
|
+
const color = isControlled ? controlledValue : internalValue;
|
|
349
|
+
const [open, setOpen] = React2.useState(false);
|
|
350
|
+
React2.useEffect(() => {
|
|
351
|
+
if (disabled) setOpen(false);
|
|
352
|
+
}, [disabled]);
|
|
353
|
+
function handleChange(newColor) {
|
|
354
|
+
if (!isControlled) setInternalValue(newColor);
|
|
355
|
+
onChange == null ? void 0 : onChange(newColor);
|
|
356
|
+
}
|
|
357
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
358
|
+
"div",
|
|
359
|
+
{
|
|
360
|
+
"data-slot": "color-picker",
|
|
361
|
+
className: cn("inline-flex flex-col gap-1.5 font-sans", className),
|
|
362
|
+
children: [
|
|
363
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "text-sm font-medium text-foreground", children: label }),
|
|
364
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Popover, { open, onOpenChange: setOpen, children: [
|
|
365
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
366
|
+
PopoverTrigger,
|
|
367
|
+
{
|
|
368
|
+
disabled,
|
|
369
|
+
className: cn(
|
|
370
|
+
"flex h-9 min-w-[140px] cursor-pointer items-center gap-2.5 border border-input bg-background px-3 text-sm outline-none transition-colors",
|
|
371
|
+
"hover:border-ring",
|
|
372
|
+
"focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1",
|
|
373
|
+
"disabled:cursor-not-allowed disabled:opacity-50"
|
|
374
|
+
),
|
|
375
|
+
children: [
|
|
376
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
377
|
+
"span",
|
|
378
|
+
{
|
|
379
|
+
"aria-hidden": true,
|
|
380
|
+
className: "size-5 shrink-0 border border-border/50",
|
|
381
|
+
style: { backgroundColor: color }
|
|
382
|
+
}
|
|
383
|
+
),
|
|
384
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "font-mono text-xs uppercase tracking-wide", children: color })
|
|
385
|
+
]
|
|
386
|
+
}
|
|
387
|
+
),
|
|
388
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
389
|
+
PopoverContent,
|
|
390
|
+
{
|
|
391
|
+
className: "w-[220px] p-4",
|
|
392
|
+
align: "start",
|
|
393
|
+
"data-shadcn-scope": true,
|
|
394
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
395
|
+
ColorPickerContent,
|
|
396
|
+
{
|
|
397
|
+
value: color,
|
|
398
|
+
onChange: handleChange,
|
|
399
|
+
presets
|
|
400
|
+
}
|
|
401
|
+
)
|
|
402
|
+
}
|
|
403
|
+
)
|
|
404
|
+
] })
|
|
405
|
+
]
|
|
406
|
+
}
|
|
407
|
+
);
|
|
408
|
+
}
|
|
409
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
410
|
+
0 && (module.exports = {
|
|
411
|
+
COLOR_PICKER_PRESETS,
|
|
412
|
+
ColorPicker,
|
|
413
|
+
ColorPickerContent,
|
|
414
|
+
ColorSwatch,
|
|
415
|
+
isValidHex,
|
|
416
|
+
normalizeHex
|
|
417
|
+
});
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import {
|
|
2
|
+
COLOR_PICKER_PRESETS,
|
|
3
|
+
ColorPicker,
|
|
4
|
+
ColorPickerContent,
|
|
5
|
+
ColorSwatch,
|
|
6
|
+
isValidHex,
|
|
7
|
+
normalizeHex
|
|
8
|
+
} from "../../chunk-ZSHYDDRB.mjs";
|
|
9
|
+
import "../../chunk-3GF7OVTP.mjs";
|
|
10
|
+
import "../../chunk-GYMYRIZP.mjs";
|
|
11
|
+
import "../../chunk-FEZKMUCF.mjs";
|
|
12
|
+
import "../../chunk-QOJ2DQD6.mjs";
|
|
13
|
+
import "../../chunk-VLQZANBF.mjs";
|
|
14
|
+
import "../../chunk-FWCSY2DS.mjs";
|
|
15
|
+
export {
|
|
16
|
+
COLOR_PICKER_PRESETS,
|
|
17
|
+
ColorPicker,
|
|
18
|
+
ColorPickerContent,
|
|
19
|
+
ColorSwatch,
|
|
20
|
+
isValidHex,
|
|
21
|
+
normalizeHex
|
|
22
|
+
};
|
|
@@ -905,41 +905,73 @@ function DataTable({
|
|
|
905
905
|
onRowSelectionChange,
|
|
906
906
|
className,
|
|
907
907
|
toolbar,
|
|
908
|
-
emptyText = "No results."
|
|
908
|
+
emptyText = "No results.",
|
|
909
|
+
manualPagination = false,
|
|
910
|
+
manualSorting = false,
|
|
911
|
+
manualFiltering = false,
|
|
912
|
+
pageCount,
|
|
913
|
+
rowCount,
|
|
914
|
+
sorting: controlledSorting,
|
|
915
|
+
pagination: controlledPagination,
|
|
916
|
+
columnFilters: controlledColumnFilters,
|
|
917
|
+
onSortingChange: onSortingChangeProp,
|
|
918
|
+
onPaginationChange: onPaginationChangeProp,
|
|
919
|
+
onColumnFiltersChange: onColumnFiltersChangeProp
|
|
909
920
|
}) {
|
|
910
|
-
|
|
911
|
-
const [
|
|
921
|
+
var _a;
|
|
922
|
+
const [internalSorting, setInternalSorting] = React3.useState(
|
|
912
923
|
[]
|
|
913
924
|
);
|
|
925
|
+
const [internalColumnFilters, setInternalColumnFilters] = React3.useState([]);
|
|
926
|
+
const [internalPagination, setInternalPagination] = React3.useState({
|
|
927
|
+
pageIndex: 0,
|
|
928
|
+
pageSize: (_a = pageSizeOptions[0]) != null ? _a : 10
|
|
929
|
+
});
|
|
914
930
|
const [columnVisibility, setColumnVisibility] = React3.useState({});
|
|
915
931
|
const [rowSelection, setRowSelection] = React3.useState({});
|
|
932
|
+
const sorting = controlledSorting != null ? controlledSorting : internalSorting;
|
|
933
|
+
const columnFilters = controlledColumnFilters != null ? controlledColumnFilters : internalColumnFilters;
|
|
934
|
+
const pagination = controlledPagination != null ? controlledPagination : internalPagination;
|
|
916
935
|
const resolvedColumns = React3.useMemo(() => {
|
|
917
936
|
if (!enableRowSelection) return userColumns;
|
|
918
937
|
return [getSelectionColumn(), ...userColumns];
|
|
919
938
|
}, [userColumns, enableRowSelection]);
|
|
920
|
-
const table = (0, import_react_table.useReactTable)({
|
|
939
|
+
const table = (0, import_react_table.useReactTable)(__spreadProps(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({
|
|
921
940
|
data,
|
|
922
941
|
columns: resolvedColumns,
|
|
923
942
|
state: {
|
|
924
943
|
sorting,
|
|
925
944
|
columnFilters,
|
|
926
945
|
columnVisibility,
|
|
927
|
-
rowSelection
|
|
946
|
+
rowSelection,
|
|
947
|
+
pagination
|
|
948
|
+
},
|
|
949
|
+
onSortingChange: (updater) => {
|
|
950
|
+
const next = typeof updater === "function" ? updater(sorting) : updater;
|
|
951
|
+
if (controlledSorting === void 0) setInternalSorting(next);
|
|
952
|
+
onSortingChangeProp == null ? void 0 : onSortingChangeProp(next);
|
|
953
|
+
},
|
|
954
|
+
onColumnFiltersChange: (updater) => {
|
|
955
|
+
const next = typeof updater === "function" ? updater(columnFilters) : updater;
|
|
956
|
+
if (controlledColumnFilters === void 0)
|
|
957
|
+
setInternalColumnFilters(next);
|
|
958
|
+
onColumnFiltersChangeProp == null ? void 0 : onColumnFiltersChangeProp(next);
|
|
959
|
+
},
|
|
960
|
+
onPaginationChange: (updater) => {
|
|
961
|
+
const next = typeof updater === "function" ? updater(pagination) : updater;
|
|
962
|
+
if (controlledPagination === void 0) setInternalPagination(next);
|
|
963
|
+
onPaginationChangeProp == null ? void 0 : onPaginationChangeProp(next);
|
|
928
964
|
},
|
|
929
|
-
onSortingChange: setSorting,
|
|
930
|
-
onColumnFiltersChange: setColumnFilters,
|
|
931
965
|
onColumnVisibilityChange: setColumnVisibility,
|
|
932
966
|
onRowSelectionChange: (updater) => {
|
|
933
967
|
const next = typeof updater === "function" ? updater(rowSelection) : updater;
|
|
934
968
|
setRowSelection(next);
|
|
935
969
|
onRowSelectionChange == null ? void 0 : onRowSelectionChange(next);
|
|
936
970
|
},
|
|
937
|
-
getCoreRowModel: (0, import_react_table.getCoreRowModel)()
|
|
938
|
-
|
|
939
|
-
getPaginationRowModel: (0, import_react_table.getPaginationRowModel)(),
|
|
940
|
-
getSortedRowModel: (0, import_react_table.getSortedRowModel)(),
|
|
971
|
+
getCoreRowModel: (0, import_react_table.getCoreRowModel)()
|
|
972
|
+
}, manualFiltering ? { manualFiltering: true } : { getFilteredRowModel: (0, import_react_table.getFilteredRowModel)() }), manualPagination ? { manualPagination: true } : { getPaginationRowModel: (0, import_react_table.getPaginationRowModel)() }), manualSorting ? { manualSorting: true } : { getSortedRowModel: (0, import_react_table.getSortedRowModel)() }), pageCount !== void 0 && { pageCount }), rowCount !== void 0 && { rowCount }), {
|
|
941
973
|
enableRowSelection
|
|
942
|
-
});
|
|
974
|
+
}));
|
|
943
975
|
function renderTableBody() {
|
|
944
976
|
if (loading) {
|
|
945
977
|
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DatePicker
|
|
3
|
-
} from "../../chunk-
|
|
4
|
-
import "../../chunk-3GF7OVTP.mjs";
|
|
3
|
+
} from "../../chunk-5MEWU56Z.mjs";
|
|
5
4
|
import "../../chunk-P6AM5V7O.mjs";
|
|
5
|
+
import "../../chunk-3GF7OVTP.mjs";
|
|
6
6
|
import "../../chunk-2I5S2AMY.mjs";
|
|
7
7
|
import "../../chunk-DBHJ5KC3.mjs";
|
|
8
8
|
import "../../chunk-FEZKMUCF.mjs";
|
|
@@ -454,7 +454,7 @@ function ChartPeriodButton({
|
|
|
454
454
|
|
|
455
455
|
// src/components/ui/expense-bar-chart.tsx
|
|
456
456
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
457
|
-
import_chart.Chart.register(import_chart.CategoryScale, import_chart.LinearScale, import_chart.BarElement, import_chart.Tooltip, import_chart.Legend);
|
|
457
|
+
import_chart.Chart.register(import_chart.CategoryScale, import_chart.LinearScale, import_chart.BarController, import_chart.BarElement, import_chart.Tooltip, import_chart.Legend);
|
|
458
458
|
function ExpenseBarChart({
|
|
459
459
|
expenseData,
|
|
460
460
|
title = "Expenses",
|
|
@@ -227,7 +227,7 @@ var import_class_variance_authority = require("class-variance-authority");
|
|
|
227
227
|
var import_toggle = require("@base-ui/react/toggle");
|
|
228
228
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
229
229
|
var toggleVariants = (0, import_class_variance_authority.cva)(
|
|
230
|
-
"inline-flex items-center justify-center gap-2
|
|
230
|
+
"inline-flex items-center justify-center gap-2 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",
|
|
231
231
|
{
|
|
232
232
|
variants: {
|
|
233
233
|
variant: {
|
|
@@ -235,9 +235,9 @@ var toggleVariants = (0, import_class_variance_authority.cva)(
|
|
|
235
235
|
outline: "border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"
|
|
236
236
|
},
|
|
237
237
|
size: {
|
|
238
|
-
default: "h-9 min-w-9 px-2",
|
|
239
|
-
sm: "h-8 min-w-8 px-1.5 text-
|
|
240
|
-
lg: "h-10 min-w-10 px-2.5"
|
|
238
|
+
default: "h-9 min-w-9 px-2 text-label-large",
|
|
239
|
+
sm: "h-8 min-w-8 px-1.5 text-label-medium",
|
|
240
|
+
lg: "h-10 min-w-10 px-2.5 text-h5"
|
|
241
241
|
}
|
|
242
242
|
},
|
|
243
243
|
defaultVariants: {
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
ConcernScale,
|
|
4
4
|
CurrencyInputWithSlider,
|
|
5
5
|
OwnershipSplit
|
|
6
|
-
} from "../../chunk-
|
|
6
|
+
} from "../../chunk-U5X52X37.mjs";
|
|
7
7
|
import "../../chunk-Y6DWJSKZ.mjs";
|
|
8
|
-
import "../../chunk-
|
|
9
|
-
import "../../chunk-
|
|
8
|
+
import "../../chunk-EI5F6FMT.mjs";
|
|
9
|
+
import "../../chunk-BDYZCBRT.mjs";
|
|
10
10
|
import "../../chunk-NSLMILBT.mjs";
|
|
11
11
|
import "../../chunk-GYMYRIZP.mjs";
|
|
12
12
|
import "../../chunk-VLQZANBF.mjs";
|