@wealthx/shadcn 1.5.43 → 1.5.44
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 +82 -82
- package/CHANGELOG.md +6 -0
- package/dist/{chunk-3G6JUYRE.mjs → chunk-7RMXM5O6.mjs} +1 -1
- package/dist/components/ui/category-edit-dialog.js +1 -1
- package/dist/components/ui/category-edit-dialog.mjs +1 -1
- package/dist/components/ui/dashboard-expense-categories.js +4 -4
- package/dist/components/ui/dashboard-expense-categories.mjs +4 -4
- package/dist/components/ui/dashboard-transactions-table.js +51 -34
- package/dist/components/ui/dashboard-transactions-table.mjs +51 -34
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/src/components/ui/category-edit-dialog.tsx +1 -1
- package/src/components/ui/dashboard-expense-categories.tsx +4 -4
- package/src/components/ui/dashboard-transactions-table.tsx +41 -19
- package/src/styles/styles-css.ts +1 -1
|
@@ -725,7 +725,7 @@ function CategoryRow({
|
|
|
725
725
|
isSelected && "bg-primary/10"
|
|
726
726
|
),
|
|
727
727
|
children: [
|
|
728
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ItemIcon, { icon, active:
|
|
728
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ItemIcon, { icon, active: false }),
|
|
729
729
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "flex-1", children: name }),
|
|
730
730
|
isSelected && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_lucide_react6.Check, { className: "size-3.5 shrink-0 text-primary" })
|
|
731
731
|
]
|
|
@@ -951,6 +951,7 @@ var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
|
951
951
|
function CategoryChip({
|
|
952
952
|
label,
|
|
953
953
|
canEdit,
|
|
954
|
+
colorScheme = "primary",
|
|
954
955
|
onClick
|
|
955
956
|
}) {
|
|
956
957
|
if (canEdit) {
|
|
@@ -959,7 +960,10 @@ function CategoryChip({
|
|
|
959
960
|
{
|
|
960
961
|
asChild: true,
|
|
961
962
|
variant: "secondary",
|
|
962
|
-
className:
|
|
963
|
+
className: cn(
|
|
964
|
+
"cursor-pointer transition-colors",
|
|
965
|
+
colorScheme === "secondary" ? "hover:bg-brand-secondary/10 hover:text-[var(--brand-secondary)]" : "hover:border-primary/40 hover:bg-primary/10 hover:text-primary"
|
|
966
|
+
),
|
|
963
967
|
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("button", { type: "button", onClick, children: [
|
|
964
968
|
label,
|
|
965
969
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react7.Pencil, { className: "size-2.5 shrink-0 opacity-60" })
|
|
@@ -971,40 +975,52 @@ function CategoryChip({
|
|
|
971
975
|
}
|
|
972
976
|
function TransactionRow({
|
|
973
977
|
tx,
|
|
978
|
+
isDimmed,
|
|
974
979
|
canEdit,
|
|
980
|
+
colorScheme = "primary",
|
|
975
981
|
onChipClick
|
|
976
982
|
}) {
|
|
977
983
|
var _a;
|
|
978
984
|
const isCredit = tx.amount >= 0;
|
|
979
985
|
const categoryLabel = (_a = tx.editedCategoryName) != null ? _a : tx.category;
|
|
980
|
-
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
986
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
987
|
+
"div",
|
|
988
|
+
{
|
|
989
|
+
className: cn(
|
|
990
|
+
"flex items-start justify-between gap-4 border-b border-border py-3 last:border-0 transition-opacity",
|
|
991
|
+
isDimmed && "opacity-30"
|
|
992
|
+
),
|
|
993
|
+
children: [
|
|
994
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
995
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-sm text-muted-foreground", children: formatDateShort(tx.date) }),
|
|
996
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "mt-0.5 truncate text-base font-medium text-foreground", children: tx.description }),
|
|
997
|
+
tx.merchant && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "mt-0.5 truncate text-sm text-muted-foreground", children: tx.merchant }),
|
|
998
|
+
categoryLabel && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "mt-1", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
999
|
+
CategoryChip,
|
|
1000
|
+
{
|
|
1001
|
+
label: categoryLabel,
|
|
1002
|
+
canEdit,
|
|
1003
|
+
colorScheme,
|
|
1004
|
+
onClick: onChipClick
|
|
1005
|
+
}
|
|
1006
|
+
) })
|
|
1007
|
+
] }),
|
|
1008
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
1009
|
+
"span",
|
|
1010
|
+
{
|
|
1011
|
+
className: cn(
|
|
1012
|
+
"shrink-0 text-base font-semibold",
|
|
1013
|
+
isCredit ? "text-success" : "text-foreground"
|
|
1014
|
+
),
|
|
1015
|
+
children: [
|
|
1016
|
+
isCredit ? "+" : "",
|
|
1017
|
+
formatCurrency(tx.amount, { showSign: false })
|
|
1018
|
+
]
|
|
1019
|
+
}
|
|
1020
|
+
)
|
|
1021
|
+
]
|
|
1022
|
+
}
|
|
1023
|
+
);
|
|
1008
1024
|
}
|
|
1009
1025
|
function DashboardTransactionsTable({
|
|
1010
1026
|
transactions = [],
|
|
@@ -1018,7 +1034,8 @@ function DashboardTransactionsTable({
|
|
|
1018
1034
|
categories,
|
|
1019
1035
|
onCategoryChange,
|
|
1020
1036
|
showHeader = true,
|
|
1021
|
-
showTab = true
|
|
1037
|
+
showTab = true,
|
|
1038
|
+
colorScheme = "primary"
|
|
1022
1039
|
}) {
|
|
1023
1040
|
const isFiltering = selectedCategoryId != null;
|
|
1024
1041
|
const canEdit = !!(categories == null ? void 0 : categories.length);
|
|
@@ -1036,13 +1053,13 @@ function DashboardTransactionsTable({
|
|
|
1036
1053
|
showTab && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "mt-2 flex border-b border-border", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "border-b-2 border-foreground pb-1.5 text-xs font-semibold text-foreground", children: "Account Transaction" }) })
|
|
1037
1054
|
] }),
|
|
1038
1055
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(CardContent, { className: "flex flex-1 flex-col px-4 pb-0 pt-0", children: [
|
|
1039
|
-
isLoading ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "flex flex-1 items-center justify-center py-8", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Spinner, { size: "default" }) }) : transactions.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "py-8 text-center text-sm text-muted-foreground", children: "No transactions found" }) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "flex flex-col", children: transactions.
|
|
1040
|
-
(tx) => !isFiltering || tx.categoryId === selectedCategoryId
|
|
1041
|
-
).map((tx) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1056
|
+
isLoading ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "flex flex-1 items-center justify-center py-8", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Spinner, { size: "default" }) }) : transactions.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "py-8 text-center text-sm text-muted-foreground", children: "No transactions found" }) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "flex flex-col", children: transactions.map((tx) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1042
1057
|
TransactionRow,
|
|
1043
1058
|
{
|
|
1044
1059
|
tx,
|
|
1060
|
+
isDimmed: isFiltering && tx.categoryId !== selectedCategoryId,
|
|
1045
1061
|
canEdit,
|
|
1062
|
+
colorScheme,
|
|
1046
1063
|
onChipClick: () => setEditingTx(tx)
|
|
1047
1064
|
},
|
|
1048
1065
|
tx.id
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CategoryEditDialog
|
|
3
|
-
} from "../../chunk-
|
|
3
|
+
} from "../../chunk-7RMXM5O6.mjs";
|
|
4
4
|
import {
|
|
5
5
|
Chip
|
|
6
6
|
} from "../../chunk-MPA2HV5U.mjs";
|
|
@@ -44,6 +44,7 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
|
44
44
|
function CategoryChip({
|
|
45
45
|
label,
|
|
46
46
|
canEdit,
|
|
47
|
+
colorScheme = "primary",
|
|
47
48
|
onClick
|
|
48
49
|
}) {
|
|
49
50
|
if (canEdit) {
|
|
@@ -52,7 +53,10 @@ function CategoryChip({
|
|
|
52
53
|
{
|
|
53
54
|
asChild: true,
|
|
54
55
|
variant: "secondary",
|
|
55
|
-
className:
|
|
56
|
+
className: cn(
|
|
57
|
+
"cursor-pointer transition-colors",
|
|
58
|
+
colorScheme === "secondary" ? "hover:bg-brand-secondary/10 hover:text-[var(--brand-secondary)]" : "hover:border-primary/40 hover:bg-primary/10 hover:text-primary"
|
|
59
|
+
),
|
|
56
60
|
children: /* @__PURE__ */ jsxs("button", { type: "button", onClick, children: [
|
|
57
61
|
label,
|
|
58
62
|
/* @__PURE__ */ jsx(Pencil, { className: "size-2.5 shrink-0 opacity-60" })
|
|
@@ -64,40 +68,52 @@ function CategoryChip({
|
|
|
64
68
|
}
|
|
65
69
|
function TransactionRow({
|
|
66
70
|
tx,
|
|
71
|
+
isDimmed,
|
|
67
72
|
canEdit,
|
|
73
|
+
colorScheme = "primary",
|
|
68
74
|
onChipClick
|
|
69
75
|
}) {
|
|
70
76
|
var _a;
|
|
71
77
|
const isCredit = tx.amount >= 0;
|
|
72
78
|
const categoryLabel = (_a = tx.editedCategoryName) != null ? _a : tx.category;
|
|
73
|
-
return /* @__PURE__ */ jsxs(
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
79
|
+
return /* @__PURE__ */ jsxs(
|
|
80
|
+
"div",
|
|
81
|
+
{
|
|
82
|
+
className: cn(
|
|
83
|
+
"flex items-start justify-between gap-4 border-b border-border py-3 last:border-0 transition-opacity",
|
|
84
|
+
isDimmed && "opacity-30"
|
|
85
|
+
),
|
|
86
|
+
children: [
|
|
87
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
88
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: formatDateShort(tx.date) }),
|
|
89
|
+
/* @__PURE__ */ jsx("p", { className: "mt-0.5 truncate text-base font-medium text-foreground", children: tx.description }),
|
|
90
|
+
tx.merchant && /* @__PURE__ */ jsx("p", { className: "mt-0.5 truncate text-sm text-muted-foreground", children: tx.merchant }),
|
|
91
|
+
categoryLabel && /* @__PURE__ */ jsx("div", { className: "mt-1", children: /* @__PURE__ */ jsx(
|
|
92
|
+
CategoryChip,
|
|
93
|
+
{
|
|
94
|
+
label: categoryLabel,
|
|
95
|
+
canEdit,
|
|
96
|
+
colorScheme,
|
|
97
|
+
onClick: onChipClick
|
|
98
|
+
}
|
|
99
|
+
) })
|
|
100
|
+
] }),
|
|
101
|
+
/* @__PURE__ */ jsxs(
|
|
102
|
+
"span",
|
|
103
|
+
{
|
|
104
|
+
className: cn(
|
|
105
|
+
"shrink-0 text-base font-semibold",
|
|
106
|
+
isCredit ? "text-success" : "text-foreground"
|
|
107
|
+
),
|
|
108
|
+
children: [
|
|
109
|
+
isCredit ? "+" : "",
|
|
110
|
+
formatCurrency(tx.amount, { showSign: false })
|
|
111
|
+
]
|
|
112
|
+
}
|
|
113
|
+
)
|
|
114
|
+
]
|
|
115
|
+
}
|
|
116
|
+
);
|
|
101
117
|
}
|
|
102
118
|
function DashboardTransactionsTable({
|
|
103
119
|
transactions = [],
|
|
@@ -111,7 +127,8 @@ function DashboardTransactionsTable({
|
|
|
111
127
|
categories,
|
|
112
128
|
onCategoryChange,
|
|
113
129
|
showHeader = true,
|
|
114
|
-
showTab = true
|
|
130
|
+
showTab = true,
|
|
131
|
+
colorScheme = "primary"
|
|
115
132
|
}) {
|
|
116
133
|
const isFiltering = selectedCategoryId != null;
|
|
117
134
|
const canEdit = !!(categories == null ? void 0 : categories.length);
|
|
@@ -129,13 +146,13 @@ function DashboardTransactionsTable({
|
|
|
129
146
|
showTab && /* @__PURE__ */ jsx("div", { className: "mt-2 flex border-b border-border", children: /* @__PURE__ */ jsx("span", { className: "border-b-2 border-foreground pb-1.5 text-xs font-semibold text-foreground", children: "Account Transaction" }) })
|
|
130
147
|
] }),
|
|
131
148
|
/* @__PURE__ */ jsxs(CardContent, { className: "flex flex-1 flex-col px-4 pb-0 pt-0", children: [
|
|
132
|
-
isLoading ? /* @__PURE__ */ jsx("div", { className: "flex flex-1 items-center justify-center py-8", children: /* @__PURE__ */ jsx(Spinner, { size: "default" }) }) : transactions.length === 0 ? /* @__PURE__ */ jsx("p", { className: "py-8 text-center text-sm text-muted-foreground", children: "No transactions found" }) : /* @__PURE__ */ jsx("div", { className: "flex flex-col", children: transactions.
|
|
133
|
-
(tx) => !isFiltering || tx.categoryId === selectedCategoryId
|
|
134
|
-
).map((tx) => /* @__PURE__ */ jsx(
|
|
149
|
+
isLoading ? /* @__PURE__ */ jsx("div", { className: "flex flex-1 items-center justify-center py-8", children: /* @__PURE__ */ jsx(Spinner, { size: "default" }) }) : transactions.length === 0 ? /* @__PURE__ */ jsx("p", { className: "py-8 text-center text-sm text-muted-foreground", children: "No transactions found" }) : /* @__PURE__ */ jsx("div", { className: "flex flex-col", children: transactions.map((tx) => /* @__PURE__ */ jsx(
|
|
135
150
|
TransactionRow,
|
|
136
151
|
{
|
|
137
152
|
tx,
|
|
153
|
+
isDimmed: isFiltering && tx.categoryId !== selectedCategoryId,
|
|
138
154
|
canEdit,
|
|
155
|
+
colorScheme,
|
|
139
156
|
onChipClick: () => setEditingTx(tx)
|
|
140
157
|
},
|
|
141
158
|
tx.id
|