@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.
Files changed (110) hide show
  1. package/.turbo/turbo-build.log +93 -84
  2. package/CHANGELOG.md +13 -0
  3. package/dist/{chunk-NXA3CZ7A.mjs → chunk-4Y6R4WEC.mjs} +2 -0
  4. package/dist/{chunk-AH52LG6N.mjs → chunk-7MMXNK3C.mjs} +2 -0
  5. package/dist/{chunk-4CX4SBRO.mjs → chunk-A6AAWBPF.mjs} +1 -1
  6. package/dist/{chunk-WOEHFRGB.mjs → chunk-BDYZCBRT.mjs} +4 -4
  7. package/dist/{chunk-5QQVZTVZ.mjs → chunk-BL3DXM2X.mjs} +2 -1
  8. package/dist/{chunk-PMB3A7V3.mjs → chunk-EI5F6FMT.mjs} +1 -1
  9. package/dist/{chunk-QVKWW6KE.mjs → chunk-GGM2UYGG.mjs} +2 -1
  10. package/dist/{chunk-KMCGSZTX.mjs → chunk-JNQORUPP.mjs} +2 -1
  11. package/dist/{chunk-PJHPSRYD.mjs → chunk-K3JYD4IU.mjs} +2 -1
  12. package/dist/{chunk-CSDO6VBW.mjs → chunk-LBMRIB3G.mjs} +10 -10
  13. package/dist/{chunk-SMQ3DG25.mjs → chunk-LHYCMLVA.mjs} +2 -1
  14. package/dist/{chunk-NLCKVHWB.mjs → chunk-OPNQAVVH.mjs} +2 -1
  15. package/dist/{chunk-2SF672SZ.mjs → chunk-RYCLWMZ7.mjs} +2 -1
  16. package/dist/{chunk-PG6K5XEC.mjs → chunk-S4QRUQNW.mjs} +1 -1
  17. package/dist/{chunk-YKPROFLB.mjs → chunk-SIZMLSRU.mjs} +2 -1
  18. package/dist/{chunk-LE6YFY6D.mjs → chunk-SWGT756Z.mjs} +2 -1
  19. package/dist/{chunk-6FCGKSZX.mjs → chunk-TS2ZX2VS.mjs} +2 -0
  20. package/dist/chunk-U4NDAF2P.mjs +207 -0
  21. package/dist/{chunk-DOH3EHX7.mjs → chunk-U5X52X37.mjs} +1 -1
  22. package/dist/{chunk-WA6O6EUR.mjs → chunk-URGMJAE3.mjs} +9 -9
  23. package/dist/{chunk-ZRO5JO3H.mjs → chunk-UT4KJR7V.mjs} +48 -12
  24. package/dist/{chunk-SYOD63OZ.mjs → chunk-VGSESELX.mjs} +2 -2
  25. package/dist/{chunk-RRBS6D63.mjs → chunk-VPBN3WOO.mjs} +2 -1
  26. package/dist/chunk-ZRSDX6OW.mjs +385 -0
  27. package/dist/chunk-ZSHYDDRB.mjs +249 -0
  28. package/dist/components/ui/add-column-modal.mjs +3 -3
  29. package/dist/components/ui/add-lead-modal.mjs +2 -2
  30. package/dist/components/ui/backoffice-alert-history-chart.js +1 -1
  31. package/dist/components/ui/backoffice-alert-history-chart.mjs +1 -1
  32. package/dist/components/ui/backoffice-contact-history-chart.js +1 -1
  33. package/dist/components/ui/backoffice-contact-history-chart.mjs +1 -1
  34. package/dist/components/ui/borrowing-capacity-line-chart.js +1 -0
  35. package/dist/components/ui/borrowing-capacity-line-chart.mjs +1 -1
  36. package/dist/components/ui/cash-balance-line-chart.js +1 -0
  37. package/dist/components/ui/cash-balance-line-chart.mjs +1 -1
  38. package/dist/components/ui/cashflow-bar-chart.js +1 -1
  39. package/dist/components/ui/cashflow-bar-chart.mjs +1 -1
  40. package/dist/components/ui/color-picker.js +417 -0
  41. package/dist/components/ui/color-picker.mjs +22 -0
  42. package/dist/components/ui/data-table.js +44 -12
  43. package/dist/components/ui/data-table.mjs +1 -1
  44. package/dist/components/ui/date-picker.mjs +2 -2
  45. package/dist/components/ui/expense-bar-chart.js +1 -1
  46. package/dist/components/ui/expense-bar-chart.mjs +1 -1
  47. package/dist/components/ui/form-primitives.js +4 -4
  48. package/dist/components/ui/form-primitives.mjs +3 -3
  49. package/dist/components/ui/income-bar-chart.js +1 -1
  50. package/dist/components/ui/income-bar-chart.mjs +1 -1
  51. package/dist/components/ui/opportunity-edit-modals.js +4 -4
  52. package/dist/components/ui/opportunity-edit-modals.mjs +8 -8
  53. package/dist/components/ui/opportunity-summary-tab.js +4 -4
  54. package/dist/components/ui/opportunity-summary-tab.mjs +9 -9
  55. package/dist/components/ui/pipeline-board.js +4 -4
  56. package/dist/components/ui/pipeline-board.mjs +3 -3
  57. package/dist/components/ui/pipeline-dialogs.js +4 -4
  58. package/dist/components/ui/pipeline-dialogs.mjs +5 -5
  59. package/dist/components/ui/property-cashflow-doughnut-chart.js +1 -1
  60. package/dist/components/ui/property-cashflow-doughnut-chart.mjs +1 -1
  61. package/dist/components/ui/property-debt-equity-doughnut-chart.js +1 -1
  62. package/dist/components/ui/property-debt-equity-doughnut-chart.mjs +1 -1
  63. package/dist/components/ui/property-mobile-estimate-line-chart.js +1 -0
  64. package/dist/components/ui/property-mobile-estimate-line-chart.mjs +1 -1
  65. package/dist/components/ui/sidebar-nav.js +540 -0
  66. package/dist/components/ui/sidebar-nav.mjs +11 -0
  67. package/dist/components/ui/stepper.js +283 -0
  68. package/dist/components/ui/stepper.mjs +18 -0
  69. package/dist/components/ui/toggle-group.js +4 -4
  70. package/dist/components/ui/toggle-group.mjs +2 -2
  71. package/dist/components/ui/toggle.js +4 -4
  72. package/dist/components/ui/toggle.mjs +1 -1
  73. package/dist/components/ui/transactions-expense-categories-doughnut-chart.js +1 -1
  74. package/dist/components/ui/transactions-expense-categories-doughnut-chart.mjs +1 -1
  75. package/dist/components/ui/transactions-income-expense-bar-chart.js +1 -1
  76. package/dist/components/ui/transactions-income-expense-bar-chart.mjs +1 -1
  77. package/dist/components/ui/transactions-liabilities-breakdown-doughnut-chart.js +1 -1
  78. package/dist/components/ui/transactions-liabilities-breakdown-doughnut-chart.mjs +1 -1
  79. package/dist/index.js +2154 -1302
  80. package/dist/index.mjs +115 -83
  81. package/dist/lib/typography.js +10 -10
  82. package/dist/lib/typography.mjs +1 -1
  83. package/dist/styles.css +1 -1
  84. package/package.json +16 -1
  85. package/src/components/index.tsx +41 -0
  86. package/src/components/ui/backoffice-alert-history-chart.tsx +2 -1
  87. package/src/components/ui/backoffice-contact-history-chart.tsx +2 -1
  88. package/src/components/ui/borrowing-capacity-line-chart.tsx +2 -0
  89. package/src/components/ui/cash-balance-line-chart.tsx +2 -0
  90. package/src/components/ui/cashflow-bar-chart.tsx +2 -1
  91. package/src/components/ui/color-picker.tsx +307 -0
  92. package/src/components/ui/data-table.tsx +91 -11
  93. package/src/components/ui/expense-bar-chart.tsx +2 -1
  94. package/src/components/ui/income-bar-chart.tsx +2 -1
  95. package/src/components/ui/property-cashflow-doughnut-chart.tsx +2 -1
  96. package/src/components/ui/property-debt-equity-doughnut-chart.tsx +2 -1
  97. package/src/components/ui/property-mobile-estimate-line-chart.tsx +2 -0
  98. package/src/components/ui/sidebar-nav.tsx +517 -0
  99. package/src/components/ui/stepper.tsx +347 -0
  100. package/src/components/ui/toggle.tsx +4 -4
  101. package/src/components/ui/transactions-expense-categories-doughnut-chart.tsx +2 -1
  102. package/src/components/ui/transactions-income-expense-bar-chart.tsx +2 -1
  103. package/src/components/ui/transactions-liabilities-breakdown-doughnut-chart.tsx +2 -1
  104. package/src/lib/typography.ts +11 -11
  105. package/src/styles/globals.css +19 -19
  106. package/src/styles/styles-css.ts +1 -1
  107. package/tsup.config.ts +3 -0
  108. package/dist/{chunk-KUDCQ4FI.mjs → chunk-5MEWU56Z.mjs} +3 -3
  109. package/dist/{chunk-PR6V5XKM.mjs → chunk-CGH4DRNG.mjs} +3 -3
  110. package/dist/{chunk-3WMX6KWS.mjs → chunk-Y4QFWRNR.mjs} +8 -8
@@ -30,11 +30,12 @@ import { useMemo } from "react";
30
30
  import {
31
31
  Chart as ChartJS,
32
32
  ArcElement,
33
+ DoughnutController,
33
34
  Tooltip
34
35
  } from "chart.js";
35
36
  import { Chart } from "react-chartjs-2";
36
37
  import { jsx, jsxs } from "react/jsx-runtime";
37
- ChartJS.register(ArcElement, Tooltip);
38
+ ChartJS.register(ArcElement, DoughnutController, Tooltip);
38
39
  function TransactionsExpenseCategoriesDoughnutChart({
39
40
  segments,
40
41
  title = "Expense Categories",
@@ -29,11 +29,12 @@ import { useMemo } from "react";
29
29
  import {
30
30
  Chart as ChartJS,
31
31
  ArcElement,
32
+ DoughnutController,
32
33
  Tooltip
33
34
  } from "chart.js";
34
35
  import { Chart } from "react-chartjs-2";
35
36
  import { jsx, jsxs } from "react/jsx-runtime";
36
- ChartJS.register(ArcElement, Tooltip);
37
+ ChartJS.register(ArcElement, DoughnutController, Tooltip);
37
38
  function PropertyDebtEquityDoughnutChart({
38
39
  estimateValue,
39
40
  debtValue,
@@ -5,7 +5,7 @@ import {
5
5
  EditExpensesModal,
6
6
  EditIncomeModal,
7
7
  EditLoanScenarioModal
8
- } from "./chunk-WA6O6EUR.mjs";
8
+ } from "./chunk-URGMJAE3.mjs";
9
9
  import {
10
10
  Tabs,
11
11
  TabsContent,
@@ -30,11 +30,12 @@ import { useMemo } from "react";
30
30
  import {
31
31
  Chart as ChartJS,
32
32
  ArcElement,
33
+ DoughnutController,
33
34
  Tooltip
34
35
  } from "chart.js";
35
36
  import { Chart } from "react-chartjs-2";
36
37
  import { jsx, jsxs } from "react/jsx-runtime";
37
- ChartJS.register(ArcElement, Tooltip);
38
+ ChartJS.register(ArcElement, DoughnutController, Tooltip);
38
39
  function TransactionsLiabilitiesBreakdownChart({
39
40
  segments,
40
41
  title = "Liabilities Breakdown",
@@ -34,12 +34,13 @@ import {
34
34
  Chart as ChartJS,
35
35
  CategoryScale,
36
36
  LinearScale,
37
+ BarController,
37
38
  BarElement,
38
39
  Tooltip
39
40
  } from "chart.js";
40
41
  import { Chart } from "react-chartjs-2";
41
42
  import { jsx, jsxs } from "react/jsx-runtime";
42
- ChartJS.register(CategoryScale, LinearScale, BarElement, Tooltip);
43
+ ChartJS.register(CategoryScale, LinearScale, BarController, BarElement, Tooltip);
43
44
  var ALERT_PERIODS = [3, 6, 12];
44
45
  var SLICE_COUNT = { 3: 3, 6: 6, 12: 12 };
45
46
  function ChartLegend() {
@@ -32,6 +32,7 @@ import {
32
32
  Chart as ChartJS,
33
33
  CategoryScale,
34
34
  LinearScale,
35
+ LineController,
35
36
  LineElement,
36
37
  PointElement,
37
38
  Tooltip
@@ -41,6 +42,7 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
41
42
  ChartJS.register(
42
43
  CategoryScale,
43
44
  LinearScale,
45
+ LineController,
44
46
  LineElement,
45
47
  PointElement,
46
48
  Tooltip
@@ -0,0 +1,207 @@
1
+ import {
2
+ cn
3
+ } from "./chunk-VLQZANBF.mjs";
4
+
5
+ // src/components/ui/stepper.tsx
6
+ import * as React from "react";
7
+ import { Check } from "lucide-react";
8
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
9
+ var StepperContext = React.createContext({
10
+ activeStep: 0,
11
+ orientation: "horizontal",
12
+ totalSteps: 0
13
+ });
14
+ var StepContext = React.createContext({
15
+ index: 0,
16
+ isActive: false,
17
+ isCompleted: false,
18
+ isFirst: true,
19
+ isLast: false
20
+ });
21
+ function Stepper({
22
+ activeStep = 0,
23
+ orientation = "horizontal",
24
+ className,
25
+ children
26
+ }) {
27
+ const totalSteps = React.Children.count(children);
28
+ return /* @__PURE__ */ jsx(StepperContext.Provider, { value: { activeStep, orientation, totalSteps }, children: /* @__PURE__ */ jsx(
29
+ "div",
30
+ {
31
+ "data-slot": "stepper",
32
+ className: cn(
33
+ "font-sans",
34
+ orientation === "horizontal" ? "flex w-full items-start" : "flex flex-col",
35
+ className
36
+ ),
37
+ children: React.Children.map(
38
+ children,
39
+ (step, index) => React.isValidElement(step) ? React.cloneElement(
40
+ step,
41
+ { _index: index }
42
+ ) : step
43
+ )
44
+ }
45
+ ) });
46
+ }
47
+ function Step({ _index = 0, error, className, children }) {
48
+ const { activeStep, orientation, totalSteps } = React.useContext(StepperContext);
49
+ const isActive = _index === activeStep;
50
+ const isCompleted = _index < activeStep;
51
+ const isFirst = _index === 0;
52
+ const isLast = _index === totalSteps - 1;
53
+ return /* @__PURE__ */ jsx(
54
+ StepContext.Provider,
55
+ {
56
+ value: { index: _index, isActive, isCompleted, isFirst, isLast },
57
+ children: /* @__PURE__ */ jsx(
58
+ "div",
59
+ {
60
+ "data-slot": "step",
61
+ "aria-current": isActive ? "step" : void 0,
62
+ "data-active": isActive || void 0,
63
+ "data-completed": isCompleted || void 0,
64
+ "data-error": error || void 0,
65
+ className: cn(
66
+ orientation === "horizontal" ? "flex flex-1 flex-col items-center" : "flex flex-row gap-3",
67
+ className
68
+ ),
69
+ children
70
+ }
71
+ )
72
+ }
73
+ );
74
+ }
75
+ function StepIndicator({ error, className }) {
76
+ const { orientation } = React.useContext(StepperContext);
77
+ const { index, isActive, isCompleted, isFirst, isLast } = React.useContext(StepContext);
78
+ const filled = isActive || isCompleted;
79
+ const circle = /* @__PURE__ */ jsx(
80
+ "div",
81
+ {
82
+ className: cn(
83
+ "relative z-10 flex size-8 shrink-0 items-center justify-center rounded-full text-sm font-medium transition-colors",
84
+ !filled && !error && "border-2 border-border bg-background text-muted-foreground",
85
+ isActive && !error && "border-2 border-primary bg-primary text-primary-foreground",
86
+ isCompleted && !error && "bg-primary text-primary-foreground",
87
+ error && "border-2 border-destructive bg-destructive text-destructive-foreground"
88
+ ),
89
+ children: isCompleted && !error ? /* @__PURE__ */ jsx(Check, { className: "size-4", strokeWidth: 2.5 }) : /* @__PURE__ */ jsx("span", { children: index + 1 })
90
+ }
91
+ );
92
+ if (orientation === "horizontal") {
93
+ return /* @__PURE__ */ jsxs(
94
+ "div",
95
+ {
96
+ "data-slot": "step-indicator",
97
+ className: cn("flex w-full items-center", className),
98
+ children: [
99
+ /* @__PURE__ */ jsx(
100
+ "div",
101
+ {
102
+ className: cn(
103
+ "h-[2px] flex-1 transition-colors",
104
+ isFirst ? "bg-transparent" : isActive || isCompleted ? "bg-primary" : "bg-border"
105
+ )
106
+ }
107
+ ),
108
+ circle,
109
+ /* @__PURE__ */ jsx(
110
+ "div",
111
+ {
112
+ className: cn(
113
+ "h-[2px] flex-1 transition-colors",
114
+ isLast ? "bg-transparent" : isCompleted ? "bg-primary" : "bg-border"
115
+ )
116
+ }
117
+ )
118
+ ]
119
+ }
120
+ );
121
+ }
122
+ return /* @__PURE__ */ jsxs(
123
+ "div",
124
+ {
125
+ "data-slot": "step-indicator",
126
+ className: cn("flex w-8 shrink-0 flex-col items-center", className),
127
+ children: [
128
+ circle,
129
+ !isLast && /* @__PURE__ */ jsx(
130
+ "div",
131
+ {
132
+ "data-slot": "step-connector",
133
+ className: cn(
134
+ "mt-1 w-[2px] flex-1 transition-colors",
135
+ isActive || isCompleted ? "bg-primary" : "bg-border"
136
+ )
137
+ }
138
+ )
139
+ ]
140
+ }
141
+ );
142
+ }
143
+ function StepLabel({
144
+ children,
145
+ description,
146
+ error,
147
+ className
148
+ }) {
149
+ const { orientation } = React.useContext(StepperContext);
150
+ const { isActive, isCompleted, isLast } = React.useContext(StepContext);
151
+ const subtext = typeof error === "string" ? error : description;
152
+ return /* @__PURE__ */ jsxs(
153
+ "div",
154
+ {
155
+ "data-slot": "step-label",
156
+ className: cn(
157
+ "flex flex-col",
158
+ orientation === "horizontal" ? "mt-2 items-center text-center" : cn("flex-1", !isLast && "pb-5"),
159
+ className
160
+ ),
161
+ children: [
162
+ /* @__PURE__ */ jsx(
163
+ "span",
164
+ {
165
+ className: cn(
166
+ "text-sm font-medium leading-tight transition-colors",
167
+ (isActive || isCompleted) && !error && "text-foreground",
168
+ !isActive && !isCompleted && !error && "text-muted-foreground",
169
+ error && "text-destructive"
170
+ ),
171
+ children
172
+ }
173
+ ),
174
+ subtext && /* @__PURE__ */ jsx(
175
+ "span",
176
+ {
177
+ className: cn(
178
+ "mt-0.5 text-xs",
179
+ error ? "text-destructive" : "text-muted-foreground"
180
+ ),
181
+ children: subtext
182
+ }
183
+ )
184
+ ]
185
+ }
186
+ );
187
+ }
188
+ function StepContent({ className, children }) {
189
+ const { isActive } = React.useContext(StepContext);
190
+ if (!isActive) return null;
191
+ return /* @__PURE__ */ jsx("div", { "data-slot": "step-content", className: cn("pb-4 pt-2", className), children });
192
+ }
193
+ function StepItem({ label, description, error }) {
194
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
195
+ /* @__PURE__ */ jsx(StepIndicator, { error: !!error }),
196
+ /* @__PURE__ */ jsx(StepLabel, { description, error, children: label })
197
+ ] });
198
+ }
199
+
200
+ export {
201
+ Stepper,
202
+ Step,
203
+ StepIndicator,
204
+ StepLabel,
205
+ StepContent,
206
+ StepItem
207
+ };
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  ToggleGroup,
6
6
  ToggleGroupItem
7
- } from "./chunk-PMB3A7V3.mjs";
7
+ } from "./chunk-EI5F6FMT.mjs";
8
8
  import {
9
9
  Label
10
10
  } from "./chunk-NSLMILBT.mjs";
@@ -6,17 +6,17 @@ import {
6
6
  AddressAutocomplete,
7
7
  CurrencyInputWithSlider,
8
8
  OwnershipSplit
9
- } from "./chunk-DOH3EHX7.mjs";
9
+ } from "./chunk-U5X52X37.mjs";
10
10
  import {
11
11
  Slider
12
12
  } from "./chunk-Y6DWJSKZ.mjs";
13
13
  import {
14
14
  ToggleGroup,
15
15
  ToggleGroupItem
16
- } from "./chunk-PMB3A7V3.mjs";
16
+ } from "./chunk-EI5F6FMT.mjs";
17
17
  import {
18
18
  DatePicker
19
- } from "./chunk-KUDCQ4FI.mjs";
19
+ } from "./chunk-5MEWU56Z.mjs";
20
20
  import {
21
21
  Textarea
22
22
  } from "./chunk-34NWQURD.mjs";
@@ -25,6 +25,9 @@ import {
25
25
  AccordionContent,
26
26
  AccordionItem
27
27
  } from "./chunk-MARPPFOJ.mjs";
28
+ import {
29
+ Label
30
+ } from "./chunk-NSLMILBT.mjs";
28
31
  import {
29
32
  Select,
30
33
  SelectContent,
@@ -32,15 +35,9 @@ import {
32
35
  SelectTrigger,
33
36
  SelectValue
34
37
  } from "./chunk-7PYJD5JI.mjs";
35
- import {
36
- Label
37
- } from "./chunk-NSLMILBT.mjs";
38
38
  import {
39
39
  Checkbox
40
40
  } from "./chunk-RGVKLTLH.mjs";
41
- import {
42
- Input
43
- } from "./chunk-GYMYRIZP.mjs";
44
41
  import {
45
42
  Dialog,
46
43
  DialogContent,
@@ -48,6 +45,9 @@ import {
48
45
  DialogHeader,
49
46
  DialogTitle
50
47
  } from "./chunk-XIRTEFKH.mjs";
48
+ import {
49
+ Input
50
+ } from "./chunk-GYMYRIZP.mjs";
51
51
  import {
52
52
  Button
53
53
  } from "./chunk-2I5S2AMY.mjs";
@@ -37,6 +37,10 @@ import {
37
37
  import {
38
38
  cn
39
39
  } from "./chunk-VLQZANBF.mjs";
40
+ import {
41
+ __spreadProps,
42
+ __spreadValues
43
+ } from "./chunk-FWCSY2DS.mjs";
40
44
 
41
45
  // src/components/ui/data-table.tsx
42
46
  import * as React from "react";
@@ -317,41 +321,73 @@ function DataTable({
317
321
  onRowSelectionChange,
318
322
  className,
319
323
  toolbar,
320
- emptyText = "No results."
324
+ emptyText = "No results.",
325
+ manualPagination = false,
326
+ manualSorting = false,
327
+ manualFiltering = false,
328
+ pageCount,
329
+ rowCount,
330
+ sorting: controlledSorting,
331
+ pagination: controlledPagination,
332
+ columnFilters: controlledColumnFilters,
333
+ onSortingChange: onSortingChangeProp,
334
+ onPaginationChange: onPaginationChangeProp,
335
+ onColumnFiltersChange: onColumnFiltersChangeProp
321
336
  }) {
322
- const [sorting, setSorting] = React.useState([]);
323
- const [columnFilters, setColumnFilters] = React.useState(
337
+ var _a;
338
+ const [internalSorting, setInternalSorting] = React.useState(
324
339
  []
325
340
  );
341
+ const [internalColumnFilters, setInternalColumnFilters] = React.useState([]);
342
+ const [internalPagination, setInternalPagination] = React.useState({
343
+ pageIndex: 0,
344
+ pageSize: (_a = pageSizeOptions[0]) != null ? _a : 10
345
+ });
326
346
  const [columnVisibility, setColumnVisibility] = React.useState({});
327
347
  const [rowSelection, setRowSelection] = React.useState({});
348
+ const sorting = controlledSorting != null ? controlledSorting : internalSorting;
349
+ const columnFilters = controlledColumnFilters != null ? controlledColumnFilters : internalColumnFilters;
350
+ const pagination = controlledPagination != null ? controlledPagination : internalPagination;
328
351
  const resolvedColumns = React.useMemo(() => {
329
352
  if (!enableRowSelection) return userColumns;
330
353
  return [getSelectionColumn(), ...userColumns];
331
354
  }, [userColumns, enableRowSelection]);
332
- const table = useReactTable({
355
+ const table = useReactTable(__spreadProps(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({
333
356
  data,
334
357
  columns: resolvedColumns,
335
358
  state: {
336
359
  sorting,
337
360
  columnFilters,
338
361
  columnVisibility,
339
- rowSelection
362
+ rowSelection,
363
+ pagination
364
+ },
365
+ onSortingChange: (updater) => {
366
+ const next = typeof updater === "function" ? updater(sorting) : updater;
367
+ if (controlledSorting === void 0) setInternalSorting(next);
368
+ onSortingChangeProp == null ? void 0 : onSortingChangeProp(next);
369
+ },
370
+ onColumnFiltersChange: (updater) => {
371
+ const next = typeof updater === "function" ? updater(columnFilters) : updater;
372
+ if (controlledColumnFilters === void 0)
373
+ setInternalColumnFilters(next);
374
+ onColumnFiltersChangeProp == null ? void 0 : onColumnFiltersChangeProp(next);
375
+ },
376
+ onPaginationChange: (updater) => {
377
+ const next = typeof updater === "function" ? updater(pagination) : updater;
378
+ if (controlledPagination === void 0) setInternalPagination(next);
379
+ onPaginationChangeProp == null ? void 0 : onPaginationChangeProp(next);
340
380
  },
341
- onSortingChange: setSorting,
342
- onColumnFiltersChange: setColumnFilters,
343
381
  onColumnVisibilityChange: setColumnVisibility,
344
382
  onRowSelectionChange: (updater) => {
345
383
  const next = typeof updater === "function" ? updater(rowSelection) : updater;
346
384
  setRowSelection(next);
347
385
  onRowSelectionChange == null ? void 0 : onRowSelectionChange(next);
348
386
  },
349
- getCoreRowModel: getCoreRowModel(),
350
- getFilteredRowModel: getFilteredRowModel(),
351
- getPaginationRowModel: getPaginationRowModel(),
352
- getSortedRowModel: getSortedRowModel(),
387
+ getCoreRowModel: getCoreRowModel()
388
+ }, manualFiltering ? { manualFiltering: true } : { getFilteredRowModel: getFilteredRowModel() }), manualPagination ? { manualPagination: true } : { getPaginationRowModel: getPaginationRowModel() }), manualSorting ? { manualSorting: true } : { getSortedRowModel: getSortedRowModel() }), pageCount !== void 0 && { pageCount }), rowCount !== void 0 && { rowCount }), {
353
389
  enableRowSelection
354
- });
390
+ }));
355
391
  function renderTableBody() {
356
392
  if (loading) {
357
393
  return /* @__PURE__ */ jsx(
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  ToggleGroup,
3
3
  ToggleGroupItem
4
- } from "./chunk-PMB3A7V3.mjs";
4
+ } from "./chunk-EI5F6FMT.mjs";
5
5
  import {
6
6
  DatePicker
7
- } from "./chunk-KUDCQ4FI.mjs";
7
+ } from "./chunk-5MEWU56Z.mjs";
8
8
  import {
9
9
  Select,
10
10
  SelectContent,
@@ -29,11 +29,12 @@ import { useMemo } from "react";
29
29
  import {
30
30
  Chart as ChartJS,
31
31
  ArcElement,
32
+ DoughnutController,
32
33
  Tooltip
33
34
  } from "chart.js";
34
35
  import { Chart } from "react-chartjs-2";
35
36
  import { jsx, jsxs } from "react/jsx-runtime";
36
- ChartJS.register(ArcElement, Tooltip);
37
+ ChartJS.register(ArcElement, DoughnutController, Tooltip);
37
38
  function PropertyCashflowDoughnutChart({
38
39
  income,
39
40
  expenses,