@wealthx/shadcn 1.0.2 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +235 -138
- package/CHANGELOG.md +12 -0
- package/README.md +82 -0
- package/dist/{chunk-6OJF6XRN.mjs → chunk-24FUO7TD.mjs} +4 -8
- package/dist/{chunk-4AJ5HWHD.mjs → chunk-2I5S2AMY.mjs} +3 -3
- package/dist/chunk-2SF672SZ.mjs +161 -0
- package/dist/{chunk-GPRJQ24C.mjs → chunk-34NWQURD.mjs} +2 -2
- package/dist/{chunk-MQ72DIBH.mjs → chunk-3GF7OVTP.mjs} +14 -5
- package/dist/chunk-3WMX6KWS.mjs +245 -0
- package/dist/{chunk-PMKODV6M.mjs → chunk-462HMNO4.mjs} +6 -10
- package/dist/chunk-4CX4SBRO.mjs +153 -0
- package/dist/chunk-4MN6UQHG.mjs +443 -0
- package/dist/chunk-5QQVZTVZ.mjs +233 -0
- package/dist/{chunk-BGP2N52Z.mjs → chunk-66MI7Q4B.mjs} +5 -5
- package/dist/chunk-6FCGKSZX.mjs +268 -0
- package/dist/{chunk-CGOKTPXU.mjs → chunk-6JQFUE5I.mjs} +20 -23
- package/dist/{chunk-Z3MK2KKZ.mjs → chunk-7DHU4VGG.mjs} +7 -3
- package/dist/{chunk-VZ2NR7L3.mjs → chunk-7PYJD5JI.mjs} +35 -27
- package/dist/{chunk-JU2RUWHF.mjs → chunk-7XJHLGUV.mjs} +1 -1
- package/dist/{chunk-BMFN37JH.mjs → chunk-7YAU5CY6.mjs} +1 -1
- package/dist/chunk-A56YQQHG.mjs +402 -0
- package/dist/chunk-AH52LG6N.mjs +315 -0
- package/dist/{chunk-SLWCCURD.mjs → chunk-CLIN5525.mjs} +8 -4
- package/dist/{chunk-3VQNJ235.mjs → chunk-CSDO6VBW.mjs} +7 -0
- package/dist/chunk-D4ILTPOG.mjs +293 -0
- package/dist/{chunk-HS7TFG7V.mjs → chunk-D6ID6M4V.mjs} +1 -1
- package/dist/chunk-DOH3EHX7.mjs +378 -0
- package/dist/{chunk-MJIEMGRD.mjs → chunk-EFRENWEJ.mjs} +9 -17
- package/dist/chunk-ERGGHC2V.mjs +185 -0
- package/dist/{chunk-OXQQNQZI.mjs → chunk-FEZKMUCF.mjs} +10 -1
- package/dist/{chunk-55CEW76V.mjs → chunk-FH6QVUVZ.mjs} +1 -1
- package/dist/chunk-FMAXJ2SI.mjs +71 -0
- package/dist/chunk-FZIXGLMV.mjs +173 -0
- package/dist/{chunk-DS2AMHN2.mjs → chunk-GYMYRIZP.mjs} +2 -2
- package/dist/{chunk-KQDD5MU3.mjs → chunk-H45TKD34.mjs} +5 -5
- package/dist/{chunk-BBJBJSXQ.mjs → chunk-J5UICVJS.mjs} +1 -1
- package/dist/{chunk-RL772EH7.mjs → chunk-JHJHG4GO.mjs} +4 -12
- package/dist/chunk-KMCGSZTX.mjs +177 -0
- package/dist/{chunk-FHNT55I5.mjs → chunk-KUDCQ4FI.mjs} +4 -4
- package/dist/chunk-LE6YFY6D.mjs +209 -0
- package/dist/{chunk-HUVTPUV2.mjs → chunk-LLVQKSU3.mjs} +23 -19
- package/dist/{chunk-KKHTJNMM.mjs → chunk-MARPPFOJ.mjs} +8 -4
- package/dist/{chunk-6AFMNC42.mjs → chunk-N2PT566P.mjs} +15 -11
- package/dist/chunk-NLCKVHWB.mjs +161 -0
- package/dist/{chunk-YN5SYTOO.mjs → chunk-NQPOYKAQ.mjs} +9 -5
- package/dist/{chunk-ZZV5JVNW.mjs → chunk-NSLMILBT.mjs} +3 -7
- package/dist/chunk-NXA3CZ7A.mjs +248 -0
- package/dist/chunk-OGOYQ7BG.mjs +150 -0
- package/dist/{chunk-3NQGYJEZ.mjs → chunk-P6AM5V7O.mjs} +10 -18
- package/dist/{chunk-CZ3BW5GL.mjs → chunk-P76HMUI6.mjs} +5 -11
- package/dist/chunk-PCPLO5HT.mjs +671 -0
- package/dist/chunk-PG6K5XEC.mjs +475 -0
- package/dist/chunk-PJHPSRYD.mjs +234 -0
- package/dist/{chunk-DDPA2XXS.mjs → chunk-PMB3A7V3.mjs} +2 -2
- package/dist/chunk-PR6V5XKM.mjs +209 -0
- package/dist/{chunk-46OFHMQA.mjs → chunk-Q76O3RIQ.mjs} +10 -6
- package/dist/chunk-QVKWW6KE.mjs +272 -0
- package/dist/chunk-RGU7HOEC.mjs +140 -0
- package/dist/{chunk-JF4PHPD5.mjs → chunk-RGVKLTLH.mjs} +4 -4
- package/dist/{chunk-VG6UF6UT.mjs → chunk-RP3SQYA3.mjs} +2 -2
- package/dist/chunk-RRBS6D63.mjs +163 -0
- package/dist/chunk-SMQ3DG25.mjs +285 -0
- package/dist/chunk-SPJ5KXW7.mjs +199 -0
- package/dist/chunk-SYOD63OZ.mjs +225 -0
- package/dist/chunk-UFYSFDER.mjs +42 -0
- package/dist/chunk-VACKZOMY.mjs +190 -0
- package/dist/chunk-VLQZANBF.mjs +42 -0
- package/dist/chunk-WA6O6EUR.mjs +1885 -0
- package/dist/{chunk-E3K6O4FZ.mjs → chunk-WAZD7NFU.mjs} +5 -2
- package/dist/chunk-WG6JGJXB.mjs +165 -0
- package/dist/{chunk-I64K754C.mjs → chunk-WNGWBVLV.mjs} +2 -2
- package/dist/{chunk-3U7SD3MS.mjs → chunk-WOEHFRGB.mjs} +3 -3
- package/dist/{chunk-DKZRJOMF.mjs → chunk-XIRTEFKH.mjs} +12 -12
- package/dist/chunk-Y6DWJSKZ.mjs +79 -0
- package/dist/chunk-YKPROFLB.mjs +161 -0
- package/dist/{chunk-K76E2TQU.mjs → chunk-ZRO5JO3H.mjs} +107 -67
- package/dist/{chunk-VYMHBV6D.mjs → chunk-ZU4NV6RG.mjs} +5 -3
- package/dist/components/ui/accordion.js +40 -4
- package/dist/components/ui/accordion.mjs +2 -2
- package/dist/components/ui/add-column-modal.js +789 -0
- package/dist/components/ui/add-column-modal.mjs +17 -0
- package/dist/components/ui/add-lead-modal.js +647 -0
- package/dist/components/ui/add-lead-modal.mjs +16 -0
- package/dist/components/ui/ai-assistant-drawer.js +686 -0
- package/dist/components/ui/ai-assistant-drawer.mjs +16 -0
- package/dist/components/ui/alert-dialog.js +37 -5
- package/dist/components/ui/alert-dialog.mjs +4 -4
- package/dist/components/ui/alert.js +37 -11
- package/dist/components/ui/alert.mjs +2 -2
- package/dist/components/ui/avatar.js +36 -8
- package/dist/components/ui/avatar.mjs +2 -2
- package/dist/components/ui/backoffice-alert-history-chart.js +624 -0
- package/dist/components/ui/backoffice-alert-history-chart.mjs +16 -0
- package/dist/components/ui/backoffice-contact-history-chart.js +687 -0
- package/dist/components/ui/backoffice-contact-history-chart.mjs +16 -0
- package/dist/components/ui/badge.js +37 -2
- package/dist/components/ui/badge.mjs +2 -2
- package/dist/components/ui/borrowing-capacity-line-chart.js +639 -0
- package/dist/components/ui/borrowing-capacity-line-chart.mjs +16 -0
- package/dist/components/ui/button.js +35 -3
- package/dist/components/ui/button.mjs +2 -2
- package/dist/components/ui/calendar.js +43 -19
- package/dist/components/ui/calendar.mjs +3 -3
- package/dist/components/ui/card.js +40 -4
- package/dist/components/ui/card.mjs +2 -2
- package/dist/components/ui/cash-balance-line-chart.js +627 -0
- package/dist/components/ui/cash-balance-line-chart.mjs +16 -0
- package/dist/components/ui/cashflow-bar-chart.js +650 -0
- package/dist/components/ui/cashflow-bar-chart.mjs +16 -0
- package/dist/components/ui/checkbox.js +36 -5
- package/dist/components/ui/checkbox.mjs +2 -3
- package/dist/components/ui/chip.js +37 -2
- package/dist/components/ui/chip.mjs +3 -3
- package/dist/components/ui/combobox.js +280 -0
- package/dist/components/ui/combobox.mjs +28 -0
- package/dist/components/ui/data-table.js +160 -88
- package/dist/components/ui/data-table.mjs +10 -11
- package/dist/components/ui/date-picker.js +44 -20
- package/dist/components/ui/date-picker.mjs +6 -7
- package/dist/components/ui/dialog.js +44 -12
- package/dist/components/ui/dialog.mjs +4 -4
- package/dist/components/ui/drawer.js +46 -10
- package/dist/components/ui/drawer.mjs +3 -3
- package/dist/components/ui/dropdown-menu.js +40 -16
- package/dist/components/ui/dropdown-menu.mjs +3 -3
- package/dist/components/ui/empty.js +41 -5
- package/dist/components/ui/empty.mjs +2 -2
- package/dist/components/ui/expense-bar-chart.js +642 -0
- package/dist/components/ui/expense-bar-chart.mjs +16 -0
- package/dist/components/ui/field.js +53 -21
- package/dist/components/ui/field.mjs +4 -4
- package/dist/components/ui/financial-cards.js +1002 -0
- package/dist/components/ui/financial-cards.mjs +24 -0
- package/dist/components/ui/financial-drawers.js +637 -0
- package/dist/components/ui/financial-drawers.mjs +17 -0
- package/dist/components/ui/financial-primitives.js +218 -0
- package/dist/components/ui/financial-primitives.mjs +22 -0
- package/dist/components/ui/financial-sections.js +1422 -0
- package/dist/components/ui/financial-sections.mjs +30 -0
- package/dist/components/ui/form-primitives.js +682 -0
- package/dist/components/ui/form-primitives.mjs +19 -0
- package/dist/components/ui/income-bar-chart.js +641 -0
- package/dist/components/ui/income-bar-chart.mjs +16 -0
- package/dist/components/ui/input-group.js +43 -7
- package/dist/components/ui/input-group.mjs +5 -5
- package/dist/components/ui/input-otp.js +39 -3
- package/dist/components/ui/input-otp.mjs +2 -2
- package/dist/components/ui/input.js +34 -2
- package/dist/components/ui/input.mjs +2 -2
- package/dist/components/ui/kanban-column.js +1143 -0
- package/dist/components/ui/kanban-column.mjs +20 -0
- package/dist/components/ui/label.js +35 -7
- package/dist/components/ui/label.mjs +2 -2
- package/dist/components/ui/opportunity-card.js +960 -0
- package/dist/components/ui/opportunity-card.mjs +20 -0
- package/dist/components/ui/opportunity-edit-modals.js +3360 -0
- package/dist/components/ui/opportunity-edit-modals.mjs +37 -0
- package/dist/components/ui/opportunity-summary-tab.js +4365 -0
- package/dist/components/ui/opportunity-summary-tab.mjs +34 -0
- package/dist/components/ui/pagination.js +35 -3
- package/dist/components/ui/pagination.mjs +3 -3
- package/dist/components/ui/pipeline-alerts.js +103 -0
- package/dist/components/ui/pipeline-alerts.mjs +8 -0
- package/dist/components/ui/pipeline-board.js +1408 -0
- package/dist/components/ui/pipeline-board.mjs +24 -0
- package/dist/components/ui/pipeline-chart.js +216 -0
- package/dist/components/ui/pipeline-chart.mjs +10 -0
- package/dist/components/ui/pipeline-dialogs.js +1183 -0
- package/dist/components/ui/pipeline-dialogs.mjs +23 -0
- package/dist/components/ui/pipeline-primitives.js +300 -0
- package/dist/components/ui/pipeline-primitives.mjs +11 -0
- package/dist/components/ui/popover.js +45 -4
- package/dist/components/ui/popover.mjs +3 -3
- package/dist/components/ui/progress.js +33 -1
- package/dist/components/ui/progress.mjs +2 -2
- package/dist/components/ui/property-cashflow-doughnut-chart.js +523 -0
- package/dist/components/ui/property-cashflow-doughnut-chart.mjs +16 -0
- package/dist/components/ui/property-debt-equity-doughnut-chart.js +521 -0
- package/dist/components/ui/property-debt-equity-doughnut-chart.mjs +16 -0
- package/dist/components/ui/property-mobile-estimate-line-chart.js +682 -0
- package/dist/components/ui/property-mobile-estimate-line-chart.mjs +16 -0
- package/dist/components/ui/radio-group.js +33 -1
- package/dist/components/ui/radio-group.mjs +2 -2
- package/dist/components/ui/select.js +66 -26
- package/dist/components/ui/select.mjs +3 -3
- package/dist/components/ui/separator.js +33 -1
- package/dist/components/ui/separator.mjs +2 -2
- package/dist/components/ui/sheet.js +37 -9
- package/dist/components/ui/sheet.mjs +3 -3
- package/dist/components/ui/skeleton.js +33 -1
- package/dist/components/ui/skeleton.mjs +2 -2
- package/dist/components/ui/slider.js +86 -102
- package/dist/components/ui/slider.mjs +2 -2
- package/dist/components/ui/spinner.js +33 -1
- package/dist/components/ui/spinner.mjs +2 -2
- package/dist/components/ui/stage-timeline.js +579 -0
- package/dist/components/ui/stage-timeline.mjs +15 -0
- package/dist/components/ui/switch.js +37 -4
- package/dist/components/ui/switch.mjs +2 -3
- package/dist/components/ui/table.js +37 -5
- package/dist/components/ui/table.mjs +2 -2
- package/dist/components/ui/tabs.js +36 -12
- package/dist/components/ui/tabs.mjs +2 -2
- package/dist/components/ui/textarea.js +34 -2
- package/dist/components/ui/textarea.mjs +2 -2
- package/dist/components/ui/toggle-group.js +35 -4
- package/dist/components/ui/toggle-group.mjs +3 -4
- package/dist/components/ui/toggle.js +35 -4
- package/dist/components/ui/toggle.mjs +2 -3
- package/dist/components/ui/tooltip.js +51 -22
- package/dist/components/ui/tooltip.mjs +3 -3
- package/dist/components/ui/transactions-expense-categories-doughnut-chart.js +528 -0
- package/dist/components/ui/transactions-expense-categories-doughnut-chart.mjs +16 -0
- package/dist/components/ui/transactions-income-expense-bar-chart.js +516 -0
- package/dist/components/ui/transactions-income-expense-bar-chart.mjs +16 -0
- package/dist/components/ui/transactions-liabilities-breakdown-doughnut-chart.js +528 -0
- package/dist/components/ui/transactions-liabilities-breakdown-doughnut-chart.mjs +16 -0
- package/dist/index.js +11613 -2868
- package/dist/index.mjs +377 -164
- package/dist/lib/theme-provider.js +10 -1
- package/dist/lib/theme-provider.mjs +1 -1
- package/dist/lib/typography.js +8 -0
- package/dist/lib/typography.mjs +3 -1
- package/dist/lib/utils.js +33 -1
- package/dist/lib/utils.mjs +1 -1
- package/dist/styles.css +1 -1
- package/package.json +169 -6
- package/src/components/index.tsx +323 -13
- package/src/components/ui/accordion.tsx +6 -3
- package/src/components/ui/add-column-modal.tsx +339 -0
- package/src/components/ui/add-lead-modal.tsx +290 -0
- package/src/components/ui/ai-assistant-drawer.tsx +408 -0
- package/src/components/ui/alert-dialog.tsx +80 -54
- package/src/components/ui/alert.tsx +28 -28
- package/src/components/ui/avatar.tsx +30 -29
- package/src/components/ui/backoffice-alert-history-chart.tsx +260 -0
- package/src/components/ui/backoffice-contact-history-chart.tsx +325 -0
- package/src/components/ui/badge.tsx +17 -15
- package/src/components/ui/borrowing-capacity-line-chart.tsx +357 -0
- package/src/components/ui/button.tsx +30 -27
- package/src/components/ui/calendar.tsx +53 -67
- package/src/components/ui/card.tsx +27 -24
- package/src/components/ui/cash-balance-line-chart.tsx +302 -0
- package/src/components/ui/cashflow-bar-chart.tsx +363 -0
- package/src/components/ui/chart-shared.tsx +261 -0
- package/src/components/ui/checkbox.tsx +30 -26
- package/src/components/ui/combobox.tsx +223 -0
- package/src/components/ui/data-table.tsx +160 -99
- package/src/components/ui/date-picker.tsx +0 -2
- package/src/components/ui/dialog.tsx +70 -60
- package/src/components/ui/drawer.tsx +57 -48
- package/src/components/ui/dropdown-menu.tsx +90 -82
- package/src/components/ui/empty.tsx +31 -27
- package/src/components/ui/expense-bar-chart.tsx +296 -0
- package/src/components/ui/field.tsx +70 -62
- package/src/components/ui/financial-cards.tsx +830 -0
- package/src/components/ui/financial-drawers.tsx +339 -0
- package/src/components/ui/financial-primitives.tsx +331 -0
- package/src/components/ui/financial-sections.tsx +672 -0
- package/src/components/ui/form-primitives.tsx +536 -0
- package/src/components/ui/income-bar-chart.tsx +297 -0
- package/src/components/ui/input-group.tsx +41 -34
- package/src/components/ui/input-otp.tsx +29 -24
- package/src/components/ui/input.tsx +8 -8
- package/src/components/ui/kanban-column.tsx +333 -0
- package/src/components/ui/label.tsx +9 -12
- package/src/components/ui/opportunity-card.tsx +616 -0
- package/src/components/ui/opportunity-edit-modals.tsx +2528 -0
- package/src/components/ui/opportunity-summary-tab.tsx +579 -0
- package/src/components/ui/pipeline-alerts.tsx +74 -0
- package/src/components/ui/pipeline-board.tsx +268 -0
- package/src/components/ui/pipeline-chart.tsx +173 -0
- package/src/components/ui/pipeline-dialogs.tsx +303 -0
- package/src/components/ui/pipeline-primitives.tsx +108 -0
- package/src/components/ui/popover.tsx +41 -36
- package/src/components/ui/property-cashflow-doughnut-chart.tsx +188 -0
- package/src/components/ui/property-debt-equity-doughnut-chart.tsx +185 -0
- package/src/components/ui/property-mobile-estimate-line-chart.tsx +393 -0
- package/src/components/ui/select.tsx +65 -52
- package/src/components/ui/sheet.tsx +55 -52
- package/src/components/ui/slider.tsx +54 -77
- package/src/components/ui/stage-timeline.tsx +205 -0
- package/src/components/ui/switch.tsx +42 -29
- package/src/components/ui/table.tsx +28 -28
- package/src/components/ui/tabs.tsx +22 -28
- package/src/components/ui/textarea.tsx +8 -8
- package/src/components/ui/toggle-group.tsx +0 -2
- package/src/components/ui/toggle.tsx +13 -15
- package/src/components/ui/tooltip.tsx +30 -28
- package/src/components/ui/transactions-expense-categories-doughnut-chart.tsx +191 -0
- package/src/components/ui/transactions-income-expense-bar-chart.tsx +205 -0
- package/src/components/ui/transactions-liabilities-breakdown-doughnut-chart.tsx +191 -0
- package/src/lib/theme-provider.tsx +10 -0
- package/src/lib/typography.ts +9 -0
- package/src/lib/utils.ts +41 -3
- package/src/styles/globals.css +371 -124
- package/src/styles/styles-css.ts +1 -1
- package/tsup.config.ts +32 -0
- package/dist/chunk-K74JRTJR.mjs +0 -105
- package/dist/chunk-V7CNWJT3.mjs +0 -10
|
@@ -0,0 +1,1422 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __defProps = Object.defineProperties;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
7
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
9
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
10
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
11
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
12
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
13
|
+
var __spreadValues = (a, b) => {
|
|
14
|
+
for (var prop in b || (b = {}))
|
|
15
|
+
if (__hasOwnProp.call(b, prop))
|
|
16
|
+
__defNormalProp(a, prop, b[prop]);
|
|
17
|
+
if (__getOwnPropSymbols)
|
|
18
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
19
|
+
if (__propIsEnum.call(b, prop))
|
|
20
|
+
__defNormalProp(a, prop, b[prop]);
|
|
21
|
+
}
|
|
22
|
+
return a;
|
|
23
|
+
};
|
|
24
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
25
|
+
var __objRest = (source, exclude) => {
|
|
26
|
+
var target = {};
|
|
27
|
+
for (var prop in source)
|
|
28
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
29
|
+
target[prop] = source[prop];
|
|
30
|
+
if (source != null && __getOwnPropSymbols)
|
|
31
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
32
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
33
|
+
target[prop] = source[prop];
|
|
34
|
+
}
|
|
35
|
+
return target;
|
|
36
|
+
};
|
|
37
|
+
var __export = (target, all) => {
|
|
38
|
+
for (var name in all)
|
|
39
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
40
|
+
};
|
|
41
|
+
var __copyProps = (to, from, except, desc) => {
|
|
42
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
43
|
+
for (let key of __getOwnPropNames(from))
|
|
44
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
45
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
46
|
+
}
|
|
47
|
+
return to;
|
|
48
|
+
};
|
|
49
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
50
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
51
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
52
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
53
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
54
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
55
|
+
mod
|
|
56
|
+
));
|
|
57
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
58
|
+
|
|
59
|
+
// src/components/ui/financial-sections.tsx
|
|
60
|
+
var financial_sections_exports = {};
|
|
61
|
+
__export(financial_sections_exports, {
|
|
62
|
+
AlertAccordion: () => AlertAccordion,
|
|
63
|
+
DebtSection: () => DebtSection,
|
|
64
|
+
FinancialBottomSummary: () => FinancialBottomSummary,
|
|
65
|
+
FinancialViewSection: () => FinancialViewSection,
|
|
66
|
+
IncomeExpenseSection: () => IncomeExpenseSection,
|
|
67
|
+
LoanScenarioSection: () => LoanScenarioSection,
|
|
68
|
+
OtherLiabilitiesSection: () => OtherLiabilitiesSection,
|
|
69
|
+
PropertyHoldingsSection: () => PropertyHoldingsSection
|
|
70
|
+
});
|
|
71
|
+
module.exports = __toCommonJS(financial_sections_exports);
|
|
72
|
+
var import_react2 = require("react");
|
|
73
|
+
|
|
74
|
+
// src/components/ui/button.tsx
|
|
75
|
+
var import_react = require("react");
|
|
76
|
+
var import_class_variance_authority = require("class-variance-authority");
|
|
77
|
+
var import_lucide_react = require("lucide-react");
|
|
78
|
+
|
|
79
|
+
// src/lib/utils.ts
|
|
80
|
+
var import_clsx = require("clsx");
|
|
81
|
+
var import_tailwind_merge = require("tailwind-merge");
|
|
82
|
+
var twMerge = (0, import_tailwind_merge.extendTailwindMerge)({
|
|
83
|
+
extend: {
|
|
84
|
+
classGroups: {
|
|
85
|
+
"font-size": [
|
|
86
|
+
{
|
|
87
|
+
text: [
|
|
88
|
+
"display-large",
|
|
89
|
+
"display-medium",
|
|
90
|
+
"display-small",
|
|
91
|
+
"h1",
|
|
92
|
+
"h2",
|
|
93
|
+
"h3",
|
|
94
|
+
"h4",
|
|
95
|
+
"h5",
|
|
96
|
+
"h6",
|
|
97
|
+
"body-large",
|
|
98
|
+
"body-medium",
|
|
99
|
+
"body-small",
|
|
100
|
+
"label-large",
|
|
101
|
+
"label-medium",
|
|
102
|
+
"label-small",
|
|
103
|
+
"button",
|
|
104
|
+
"button-xs",
|
|
105
|
+
"caption",
|
|
106
|
+
"overline",
|
|
107
|
+
"code"
|
|
108
|
+
]
|
|
109
|
+
}
|
|
110
|
+
]
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
function cn(...inputs) {
|
|
115
|
+
return twMerge((0, import_clsx.clsx)(inputs));
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
// src/lib/slot.tsx
|
|
119
|
+
var React = __toESM(require("react"));
|
|
120
|
+
function mergeRefs(...refs) {
|
|
121
|
+
return (value) => {
|
|
122
|
+
for (const ref of refs) {
|
|
123
|
+
if (typeof ref === "function") ref(value);
|
|
124
|
+
else if (ref !== null)
|
|
125
|
+
ref.current = value;
|
|
126
|
+
}
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
var Slot = React.forwardRef(
|
|
130
|
+
(_a, forwardedRef) => {
|
|
131
|
+
var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
|
|
132
|
+
const child = React.Children.only(children);
|
|
133
|
+
if (!React.isValidElement(child)) return null;
|
|
134
|
+
const childProps = child.props;
|
|
135
|
+
const merged = __spreadValues({}, props);
|
|
136
|
+
for (const key of Object.keys(childProps)) {
|
|
137
|
+
if (key === "className") {
|
|
138
|
+
merged.className = [props.className, childProps.className].filter(Boolean).join(" ");
|
|
139
|
+
} else if (key === "style") {
|
|
140
|
+
merged.style = __spreadValues(__spreadValues({}, props.style), childProps.style);
|
|
141
|
+
} else if (key.startsWith("on") && typeof childProps[key] === "function") {
|
|
142
|
+
const parentHandler = props[key];
|
|
143
|
+
if (typeof parentHandler === "function") {
|
|
144
|
+
merged[key] = (...args) => {
|
|
145
|
+
childProps[key](...args);
|
|
146
|
+
parentHandler(...args);
|
|
147
|
+
};
|
|
148
|
+
} else {
|
|
149
|
+
merged[key] = childProps[key];
|
|
150
|
+
}
|
|
151
|
+
} else {
|
|
152
|
+
merged[key] = childProps[key];
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
const childRef = child.ref;
|
|
156
|
+
merged.ref = forwardedRef ? mergeRefs(forwardedRef, childRef) : childRef;
|
|
157
|
+
return React.cloneElement(
|
|
158
|
+
child,
|
|
159
|
+
merged
|
|
160
|
+
);
|
|
161
|
+
}
|
|
162
|
+
);
|
|
163
|
+
Slot.displayName = "Slot";
|
|
164
|
+
|
|
165
|
+
// src/components/ui/button.tsx
|
|
166
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
167
|
+
var buttonVariants = (0, import_class_variance_authority.cva)(
|
|
168
|
+
"inline-flex shrink-0 cursor-pointer items-center justify-center gap-2 font-sans text-button whitespace-nowrap transition-all active:scale-[0.98] 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 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
169
|
+
{
|
|
170
|
+
variants: {
|
|
171
|
+
variant: {
|
|
172
|
+
default: "bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",
|
|
173
|
+
secondary: "bg-brand-secondary text-brand-secondary-foreground shadow-xs hover:bg-brand-secondary/80 focus-visible:ring-brand-secondary/30",
|
|
174
|
+
destructive: "bg-destructive text-destructive-foreground shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40",
|
|
175
|
+
outline: "border border-input bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
|
|
176
|
+
"outline-primary": "border border-primary text-foreground bg-transparent shadow-xs hover:bg-primary/5 focus-visible:ring-primary/50",
|
|
177
|
+
"outline-secondary": "border border-brand-secondary text-brand-secondary bg-transparent shadow-xs hover:bg-brand-secondary/10 focus-visible:ring-brand-secondary/30",
|
|
178
|
+
ghost: "hover:bg-accent hover:text-accent-foreground hover:shadow-xs dark:hover:bg-accent/50",
|
|
179
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
180
|
+
},
|
|
181
|
+
size: {
|
|
182
|
+
default: "h-9 px-4 py-2 has-[>svg]:px-3",
|
|
183
|
+
xs: "h-6 gap-1 px-2 text-button-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",
|
|
184
|
+
sm: "h-8 gap-1.5 px-3 has-[>svg]:px-2.5",
|
|
185
|
+
lg: "h-10 px-6 has-[>svg]:px-4",
|
|
186
|
+
icon: "size-9",
|
|
187
|
+
"icon-xs": "size-6 [&_svg:not([class*='size-'])]:size-3",
|
|
188
|
+
"icon-sm": "size-8",
|
|
189
|
+
"icon-lg": "size-10"
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
defaultVariants: {
|
|
193
|
+
variant: "default",
|
|
194
|
+
size: "default"
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
);
|
|
198
|
+
var Button = (0, import_react.forwardRef)(function Button2(_a, ref) {
|
|
199
|
+
var _b = _a, {
|
|
200
|
+
className,
|
|
201
|
+
variant,
|
|
202
|
+
size,
|
|
203
|
+
asChild = false,
|
|
204
|
+
loading = false,
|
|
205
|
+
disabled,
|
|
206
|
+
type = "button",
|
|
207
|
+
children
|
|
208
|
+
} = _b, props = __objRest(_b, [
|
|
209
|
+
"className",
|
|
210
|
+
"variant",
|
|
211
|
+
"size",
|
|
212
|
+
"asChild",
|
|
213
|
+
"loading",
|
|
214
|
+
"disabled",
|
|
215
|
+
"type",
|
|
216
|
+
"children"
|
|
217
|
+
]);
|
|
218
|
+
const Comp = asChild ? Slot : "button";
|
|
219
|
+
const isIconOnly = size === "icon" || size === "icon-xs" || size === "icon-sm" || size === "icon-lg";
|
|
220
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
221
|
+
Comp,
|
|
222
|
+
__spreadProps(__spreadValues({
|
|
223
|
+
className: cn(buttonVariants({ variant, size, className })),
|
|
224
|
+
"data-size": size,
|
|
225
|
+
"data-slot": "button",
|
|
226
|
+
"data-variant": variant,
|
|
227
|
+
disabled: loading || disabled,
|
|
228
|
+
ref,
|
|
229
|
+
type
|
|
230
|
+
}, props), {
|
|
231
|
+
children: loading ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
232
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Loader2, { "aria-hidden": "true", className: "animate-spin" }),
|
|
233
|
+
!isIconOnly && children
|
|
234
|
+
] }) : children
|
|
235
|
+
})
|
|
236
|
+
);
|
|
237
|
+
});
|
|
238
|
+
|
|
239
|
+
// src/components/ui/separator.tsx
|
|
240
|
+
var import_separator = require("@base-ui/react/separator");
|
|
241
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
242
|
+
function Separator(_a) {
|
|
243
|
+
var _b = _a, {
|
|
244
|
+
className,
|
|
245
|
+
orientation = "horizontal"
|
|
246
|
+
} = _b, props = __objRest(_b, [
|
|
247
|
+
"className",
|
|
248
|
+
"orientation"
|
|
249
|
+
]);
|
|
250
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
251
|
+
import_separator.Separator,
|
|
252
|
+
__spreadValues({
|
|
253
|
+
className: cn(
|
|
254
|
+
"shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
|
|
255
|
+
className
|
|
256
|
+
),
|
|
257
|
+
"data-orientation": orientation,
|
|
258
|
+
"data-slot": "separator"
|
|
259
|
+
}, props)
|
|
260
|
+
);
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
// src/components/ui/accordion.tsx
|
|
264
|
+
var import_lucide_react2 = require("lucide-react");
|
|
265
|
+
var import_accordion = require("@base-ui/react/accordion");
|
|
266
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
267
|
+
function Accordion(props) {
|
|
268
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_accordion.Accordion.Root, __spreadValues({ "data-slot": "accordion" }, props));
|
|
269
|
+
}
|
|
270
|
+
function AccordionItem(_a) {
|
|
271
|
+
var _b = _a, {
|
|
272
|
+
className
|
|
273
|
+
} = _b, props = __objRest(_b, [
|
|
274
|
+
"className"
|
|
275
|
+
]);
|
|
276
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
277
|
+
import_accordion.Accordion.Item,
|
|
278
|
+
__spreadValues({
|
|
279
|
+
className: cn("border-b", className),
|
|
280
|
+
"data-slot": "accordion-item"
|
|
281
|
+
}, props)
|
|
282
|
+
);
|
|
283
|
+
}
|
|
284
|
+
function AccordionTrigger(_a) {
|
|
285
|
+
var _b = _a, {
|
|
286
|
+
className,
|
|
287
|
+
children
|
|
288
|
+
} = _b, props = __objRest(_b, [
|
|
289
|
+
"className",
|
|
290
|
+
"children"
|
|
291
|
+
]);
|
|
292
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_accordion.Accordion.Header, { className: "flex", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
293
|
+
import_accordion.Accordion.Trigger,
|
|
294
|
+
__spreadProps(__spreadValues({
|
|
295
|
+
className: cn(
|
|
296
|
+
// layout
|
|
297
|
+
"flex flex-1 items-center justify-between gap-4 py-4 text-left",
|
|
298
|
+
// typography
|
|
299
|
+
"text-label-medium",
|
|
300
|
+
// base
|
|
301
|
+
"rounded-none outline-none transition-[color,opacity]",
|
|
302
|
+
// interactive states
|
|
303
|
+
"hover:underline",
|
|
304
|
+
"focus-visible:ring-2 focus-visible:ring-foreground/30",
|
|
305
|
+
"disabled:pointer-events-none disabled:opacity-50",
|
|
306
|
+
// chevron rotation when open
|
|
307
|
+
"[&[data-panel-open]>svg]:rotate-180",
|
|
308
|
+
className
|
|
309
|
+
),
|
|
310
|
+
"data-slot": "accordion-trigger"
|
|
311
|
+
}, props), {
|
|
312
|
+
children: [
|
|
313
|
+
children,
|
|
314
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_lucide_react2.ChevronDownIcon, { className: "pointer-events-none size-4 shrink-0 text-muted-foreground transition-transform duration-200" })
|
|
315
|
+
]
|
|
316
|
+
})
|
|
317
|
+
) });
|
|
318
|
+
}
|
|
319
|
+
function AccordionContent(_a) {
|
|
320
|
+
var _b = _a, {
|
|
321
|
+
className,
|
|
322
|
+
children
|
|
323
|
+
} = _b, props = __objRest(_b, [
|
|
324
|
+
"className",
|
|
325
|
+
"children"
|
|
326
|
+
]);
|
|
327
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
328
|
+
import_accordion.Accordion.Panel,
|
|
329
|
+
__spreadProps(__spreadValues({
|
|
330
|
+
className: "overflow-hidden text-body-small h-(--accordion-panel-height) transition-[height] duration-200 ease-out data-starting-style:h-0 data-ending-style:h-0",
|
|
331
|
+
"data-slot": "accordion-content"
|
|
332
|
+
}, props), {
|
|
333
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: cn("pb-4 text-muted-foreground", className), children })
|
|
334
|
+
})
|
|
335
|
+
);
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
// src/components/ui/financial-cards.tsx
|
|
339
|
+
var React2 = __toESM(require("react"));
|
|
340
|
+
var import_lucide_react4 = require("lucide-react");
|
|
341
|
+
|
|
342
|
+
// src/components/ui/badge.tsx
|
|
343
|
+
var import_class_variance_authority2 = require("class-variance-authority");
|
|
344
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
345
|
+
var badgeVariants = (0, import_class_variance_authority2.cva)(
|
|
346
|
+
"inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2.5 py-0.5 text-xs font-medium font-sans whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3",
|
|
347
|
+
{
|
|
348
|
+
variants: {
|
|
349
|
+
variant: {
|
|
350
|
+
default: "bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
|
|
351
|
+
secondary: "bg-muted text-muted-foreground [a&]:hover:bg-muted/80",
|
|
352
|
+
destructive: "bg-destructive text-destructive-foreground focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90",
|
|
353
|
+
success: "bg-success text-success-foreground [a&]:hover:bg-success/90",
|
|
354
|
+
warning: "bg-warning text-warning-foreground [a&]:hover:bg-warning/90",
|
|
355
|
+
info: "bg-info text-info-foreground [a&]:hover:bg-info/90",
|
|
356
|
+
outline: "border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
|
|
357
|
+
ghost: "[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
|
|
358
|
+
link: "text-primary underline-offset-4 [a&]:hover:underline"
|
|
359
|
+
}
|
|
360
|
+
},
|
|
361
|
+
defaultVariants: {
|
|
362
|
+
variant: "default"
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
);
|
|
366
|
+
function Badge(_a) {
|
|
367
|
+
var _b = _a, {
|
|
368
|
+
className,
|
|
369
|
+
variant = "default",
|
|
370
|
+
asChild = false
|
|
371
|
+
} = _b, props = __objRest(_b, [
|
|
372
|
+
"className",
|
|
373
|
+
"variant",
|
|
374
|
+
"asChild"
|
|
375
|
+
]);
|
|
376
|
+
const Comp = asChild ? Slot : "span";
|
|
377
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
378
|
+
Comp,
|
|
379
|
+
__spreadValues({
|
|
380
|
+
className: cn(badgeVariants({ variant }), className),
|
|
381
|
+
"data-slot": "badge",
|
|
382
|
+
"data-variant": variant
|
|
383
|
+
}, props)
|
|
384
|
+
);
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
// src/components/ui/radio-group.tsx
|
|
388
|
+
var import_lucide_react3 = require("lucide-react");
|
|
389
|
+
var import_radio_group = require("@base-ui/react/radio-group");
|
|
390
|
+
var import_radio = require("@base-ui/react/radio");
|
|
391
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
392
|
+
var CIRCLE_BASE = "inline-flex items-center justify-center aspect-square size-4 shrink-0 rounded-full border border-primary bg-background";
|
|
393
|
+
var INDICATOR_DOT = "size-2 fill-background text-background";
|
|
394
|
+
function RadioGroup(_a) {
|
|
395
|
+
var _b = _a, {
|
|
396
|
+
className
|
|
397
|
+
} = _b, props = __objRest(_b, [
|
|
398
|
+
"className"
|
|
399
|
+
]);
|
|
400
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
401
|
+
import_radio_group.RadioGroup,
|
|
402
|
+
__spreadValues({
|
|
403
|
+
className: cn("grid gap-3", className),
|
|
404
|
+
"data-slot": "radio-group"
|
|
405
|
+
}, props)
|
|
406
|
+
);
|
|
407
|
+
}
|
|
408
|
+
function RadioGroupItem(_a) {
|
|
409
|
+
var _b = _a, {
|
|
410
|
+
className
|
|
411
|
+
} = _b, props = __objRest(_b, [
|
|
412
|
+
"className"
|
|
413
|
+
]);
|
|
414
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
415
|
+
import_radio.Radio.Root,
|
|
416
|
+
__spreadProps(__spreadValues({
|
|
417
|
+
className: cn(
|
|
418
|
+
CIRCLE_BASE,
|
|
419
|
+
"transition-all outline-none",
|
|
420
|
+
"focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50",
|
|
421
|
+
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
422
|
+
"data-checked:bg-primary",
|
|
423
|
+
"aria-invalid:border-destructive aria-invalid:ring-destructive/20",
|
|
424
|
+
"aria-invalid:data-checked:border-destructive aria-invalid:data-checked:bg-destructive",
|
|
425
|
+
"dark:bg-input/30 dark:aria-invalid:ring-destructive/40",
|
|
426
|
+
className
|
|
427
|
+
),
|
|
428
|
+
"data-slot": "radio-group-item"
|
|
429
|
+
}, props), {
|
|
430
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
431
|
+
import_radio.Radio.Indicator,
|
|
432
|
+
{
|
|
433
|
+
"data-slot": "radio-group-indicator",
|
|
434
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_lucide_react3.CircleIcon, { className: INDICATOR_DOT })
|
|
435
|
+
}
|
|
436
|
+
)
|
|
437
|
+
})
|
|
438
|
+
);
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
// src/components/ui/financial-primitives.tsx
|
|
442
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
443
|
+
var NO_DATA = "\u2014";
|
|
444
|
+
function FinancialSectionLabel({
|
|
445
|
+
children
|
|
446
|
+
}) {
|
|
447
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "text-label-small uppercase text-muted-foreground", children });
|
|
448
|
+
}
|
|
449
|
+
function FinancialCardHeader({ children }) {
|
|
450
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "py-2.5", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "text-label-small uppercase text-muted-foreground", children }) });
|
|
451
|
+
}
|
|
452
|
+
function FinancialSubsectionTitle({
|
|
453
|
+
children
|
|
454
|
+
}) {
|
|
455
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "text-label-medium uppercase text-foreground", children });
|
|
456
|
+
}
|
|
457
|
+
function FinancialDetailField({
|
|
458
|
+
label,
|
|
459
|
+
value,
|
|
460
|
+
variant = "caption"
|
|
461
|
+
}) {
|
|
462
|
+
if (variant === "footer") {
|
|
463
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex flex-col justify-between min-w-0", children: [
|
|
464
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "text-overline text-muted-foreground", children: label }),
|
|
465
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "text-label-medium text-foreground mt-1 break-words", children: value != null ? value : NO_DATA })
|
|
466
|
+
] });
|
|
467
|
+
}
|
|
468
|
+
const labelClass = variant === "caption" ? "block min-h-[2rem] text-caption text-muted-foreground" : "min-h-[1.75rem] text-overline text-muted-foreground";
|
|
469
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
470
|
+
"div",
|
|
471
|
+
{
|
|
472
|
+
className: cn(
|
|
473
|
+
"min-w-0",
|
|
474
|
+
variant === "overline" && "flex flex-col gap-0.5"
|
|
475
|
+
),
|
|
476
|
+
children: [
|
|
477
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: labelClass, children: label }),
|
|
478
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "text-label-medium text-foreground break-words", children: value != null ? value : NO_DATA })
|
|
479
|
+
]
|
|
480
|
+
}
|
|
481
|
+
);
|
|
482
|
+
}
|
|
483
|
+
function FinancialLineItem({
|
|
484
|
+
label,
|
|
485
|
+
value,
|
|
486
|
+
destructive
|
|
487
|
+
}) {
|
|
488
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex items-center justify-between gap-4 py-0.5", children: [
|
|
489
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "text-body-small text-foreground", children: label }),
|
|
490
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
491
|
+
"span",
|
|
492
|
+
{
|
|
493
|
+
className: cn(
|
|
494
|
+
"text-label-medium whitespace-nowrap text-right",
|
|
495
|
+
destructive ? "text-destructive" : "text-foreground"
|
|
496
|
+
),
|
|
497
|
+
children: value || NO_DATA
|
|
498
|
+
}
|
|
499
|
+
)
|
|
500
|
+
] });
|
|
501
|
+
}
|
|
502
|
+
function FinancialLvrBar({
|
|
503
|
+
percent = 56,
|
|
504
|
+
label = "56% \u2014 Good"
|
|
505
|
+
}) {
|
|
506
|
+
const color = percent >= 80 ? "destructive" : percent >= 70 ? "warning" : "success";
|
|
507
|
+
const textClass = {
|
|
508
|
+
success: "text-success",
|
|
509
|
+
warning: "text-warning",
|
|
510
|
+
destructive: "text-destructive"
|
|
511
|
+
}[color];
|
|
512
|
+
const trackClass = {
|
|
513
|
+
success: "bg-success/15",
|
|
514
|
+
warning: "bg-warning/15",
|
|
515
|
+
destructive: "bg-destructive/15"
|
|
516
|
+
}[color];
|
|
517
|
+
const fillClass = {
|
|
518
|
+
success: "bg-success",
|
|
519
|
+
warning: "bg-warning",
|
|
520
|
+
destructive: "bg-destructive"
|
|
521
|
+
}[color];
|
|
522
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
523
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex items-center justify-between", children: [
|
|
524
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "text-body-small text-muted-foreground", children: "LVR" }),
|
|
525
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: cn("text-label-medium", textClass), children: label })
|
|
526
|
+
] }),
|
|
527
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: cn("h-2.5 w-full overflow-hidden", trackClass), children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
528
|
+
"div",
|
|
529
|
+
{
|
|
530
|
+
className: cn("h-full", fillClass),
|
|
531
|
+
style: { width: `${Math.min(percent, 100)}%` }
|
|
532
|
+
}
|
|
533
|
+
) })
|
|
534
|
+
] });
|
|
535
|
+
}
|
|
536
|
+
function FinancialSubtotalFrame({
|
|
537
|
+
children
|
|
538
|
+
}) {
|
|
539
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "mt-auto border-t border-primary/20 bg-primary/10 px-4 py-3", children });
|
|
540
|
+
}
|
|
541
|
+
function FinancialSubtotalBlock({
|
|
542
|
+
monthlyAverage,
|
|
543
|
+
totalLast12Months,
|
|
544
|
+
label
|
|
545
|
+
}) {
|
|
546
|
+
const isSingle = monthlyAverage && !totalLast12Months;
|
|
547
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
548
|
+
"div",
|
|
549
|
+
{
|
|
550
|
+
className: cn(
|
|
551
|
+
"flex flex-row items-center",
|
|
552
|
+
isSingle ? "justify-end" : "justify-between"
|
|
553
|
+
),
|
|
554
|
+
children: [
|
|
555
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
556
|
+
"div",
|
|
557
|
+
{
|
|
558
|
+
className: cn(
|
|
559
|
+
"flex flex-col gap-0.5",
|
|
560
|
+
isSingle ? "text-right" : "text-left"
|
|
561
|
+
),
|
|
562
|
+
children: [
|
|
563
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "min-h-[1.75rem] text-overline text-muted-foreground", children: label != null ? label : "Monthly Average" }),
|
|
564
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "text-label-medium text-foreground", children: monthlyAverage != null ? monthlyAverage : NO_DATA })
|
|
565
|
+
]
|
|
566
|
+
}
|
|
567
|
+
),
|
|
568
|
+
!isSingle && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex flex-col gap-0.5 text-right", children: [
|
|
569
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "min-h-[1.75rem] text-overline text-muted-foreground", children: "Total Last 12 Months" }),
|
|
570
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "text-label-medium text-foreground", children: totalLast12Months != null ? totalLast12Months : NO_DATA })
|
|
571
|
+
] })
|
|
572
|
+
]
|
|
573
|
+
}
|
|
574
|
+
);
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
// src/components/ui/financial-cards.tsx
|
|
578
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
579
|
+
function PropertyCard({
|
|
580
|
+
address,
|
|
581
|
+
type,
|
|
582
|
+
estimated,
|
|
583
|
+
isLinkedToBank = false,
|
|
584
|
+
borderless = false,
|
|
585
|
+
loanAmount,
|
|
586
|
+
equity,
|
|
587
|
+
lvr,
|
|
588
|
+
lvrPercent = 0,
|
|
589
|
+
lenderName,
|
|
590
|
+
interestRate,
|
|
591
|
+
yearsRemaining,
|
|
592
|
+
minRepayments,
|
|
593
|
+
averageRepayments,
|
|
594
|
+
redrawAmount,
|
|
595
|
+
offsetAccount,
|
|
596
|
+
totalMinRepayments,
|
|
597
|
+
totalExtraRepayments,
|
|
598
|
+
interestCharged,
|
|
599
|
+
principlePaidOff
|
|
600
|
+
}) {
|
|
601
|
+
const [expanded, setExpanded] = React2.useState(false);
|
|
602
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
603
|
+
"div",
|
|
604
|
+
{
|
|
605
|
+
className: cn(
|
|
606
|
+
"overflow-hidden flex flex-col",
|
|
607
|
+
!borderless && "border border-border"
|
|
608
|
+
),
|
|
609
|
+
children: [
|
|
610
|
+
isLinkedToBank ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
611
|
+
"button",
|
|
612
|
+
{
|
|
613
|
+
type: "button",
|
|
614
|
+
"aria-expanded": expanded,
|
|
615
|
+
onClick: () => setExpanded((prev) => !prev),
|
|
616
|
+
className: "flex items-center gap-1.5 px-5 py-3 text-left cursor-pointer hover:opacity-85",
|
|
617
|
+
children: [
|
|
618
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "text-label-medium text-foreground", children: address }),
|
|
619
|
+
type && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Badge, { variant: "outline", children: type }),
|
|
620
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "flex-1" }),
|
|
621
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
622
|
+
import_lucide_react4.ChevronDown,
|
|
623
|
+
{
|
|
624
|
+
className: cn(
|
|
625
|
+
"h-5 w-5 shrink-0 text-muted-foreground transition-transform duration-200",
|
|
626
|
+
expanded && "rotate-180"
|
|
627
|
+
)
|
|
628
|
+
}
|
|
629
|
+
)
|
|
630
|
+
]
|
|
631
|
+
}
|
|
632
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex items-center gap-1.5 px-5 py-3", children: [
|
|
633
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "text-label-medium text-foreground", children: address }),
|
|
634
|
+
type && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Badge, { variant: "outline", children: type })
|
|
635
|
+
] }),
|
|
636
|
+
!isLinkedToBank && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: "px-5 pb-2 text-xs italic text-muted-foreground", children: "No mortgage account linked to this property" }),
|
|
637
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
638
|
+
"div",
|
|
639
|
+
{
|
|
640
|
+
className: cn(
|
|
641
|
+
"grid gap-5 px-5 py-[15px]",
|
|
642
|
+
isLinkedToBank ? "grid-cols-3" : "grid-cols-1"
|
|
643
|
+
),
|
|
644
|
+
children: [
|
|
645
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(FinancialDetailField, { label: "Estimated Value", value: estimated }),
|
|
646
|
+
isLinkedToBank && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
|
|
647
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(FinancialDetailField, { label: "Loan Amount", value: loanAmount }),
|
|
648
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(FinancialDetailField, { label: "Equity", value: equity })
|
|
649
|
+
] })
|
|
650
|
+
]
|
|
651
|
+
}
|
|
652
|
+
),
|
|
653
|
+
isLinkedToBank && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "px-5 pb-[15px]", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
654
|
+
FinancialLvrBar,
|
|
655
|
+
{
|
|
656
|
+
percent: lvrPercent,
|
|
657
|
+
label: lvr != null ? lvr : `${lvrPercent}%`
|
|
658
|
+
}
|
|
659
|
+
) }),
|
|
660
|
+
isLinkedToBank && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
661
|
+
"div",
|
|
662
|
+
{
|
|
663
|
+
className: cn(
|
|
664
|
+
"grid transition-[grid-template-rows] duration-200 ease-in-out",
|
|
665
|
+
expanded ? "grid-rows-[1fr]" : "grid-rows-[0fr]"
|
|
666
|
+
),
|
|
667
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "overflow-hidden", children: [
|
|
668
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex flex-col gap-5 border-t border-border px-5 py-[15px]", children: [
|
|
669
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(FinancialSubsectionTitle, { children: "Loan" }),
|
|
670
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "grid grid-cols-4 gap-x-4 gap-y-4", children: [
|
|
671
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
672
|
+
FinancialDetailField,
|
|
673
|
+
{
|
|
674
|
+
label: "Name of Lender",
|
|
675
|
+
value: lenderName
|
|
676
|
+
}
|
|
677
|
+
),
|
|
678
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
679
|
+
FinancialDetailField,
|
|
680
|
+
{
|
|
681
|
+
label: "Current Loan Amount",
|
|
682
|
+
value: loanAmount
|
|
683
|
+
}
|
|
684
|
+
),
|
|
685
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
686
|
+
FinancialDetailField,
|
|
687
|
+
{
|
|
688
|
+
label: "Interest Rate",
|
|
689
|
+
value: interestRate
|
|
690
|
+
}
|
|
691
|
+
),
|
|
692
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
693
|
+
FinancialDetailField,
|
|
694
|
+
{
|
|
695
|
+
label: "Years Remaining",
|
|
696
|
+
value: yearsRemaining
|
|
697
|
+
}
|
|
698
|
+
)
|
|
699
|
+
] }),
|
|
700
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "grid grid-cols-4 gap-x-4 gap-y-4", children: [
|
|
701
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
702
|
+
FinancialDetailField,
|
|
703
|
+
{
|
|
704
|
+
label: "Min Repayments",
|
|
705
|
+
value: minRepayments
|
|
706
|
+
}
|
|
707
|
+
),
|
|
708
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
709
|
+
FinancialDetailField,
|
|
710
|
+
{
|
|
711
|
+
label: "Average Repayments",
|
|
712
|
+
value: averageRepayments
|
|
713
|
+
}
|
|
714
|
+
),
|
|
715
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
716
|
+
FinancialDetailField,
|
|
717
|
+
{
|
|
718
|
+
label: "Redraw Amount",
|
|
719
|
+
value: redrawAmount
|
|
720
|
+
}
|
|
721
|
+
),
|
|
722
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
723
|
+
FinancialDetailField,
|
|
724
|
+
{
|
|
725
|
+
label: "Offset Account",
|
|
726
|
+
value: offsetAccount
|
|
727
|
+
}
|
|
728
|
+
)
|
|
729
|
+
] })
|
|
730
|
+
] }),
|
|
731
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(FinancialSubtotalFrame, { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "grid grid-cols-4 gap-x-4 gap-y-1", children: [
|
|
732
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
733
|
+
FinancialDetailField,
|
|
734
|
+
{
|
|
735
|
+
variant: "footer",
|
|
736
|
+
label: "Total Min Repayments",
|
|
737
|
+
value: totalMinRepayments
|
|
738
|
+
}
|
|
739
|
+
),
|
|
740
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
741
|
+
FinancialDetailField,
|
|
742
|
+
{
|
|
743
|
+
variant: "footer",
|
|
744
|
+
label: "Total Extra Repayments",
|
|
745
|
+
value: totalExtraRepayments
|
|
746
|
+
}
|
|
747
|
+
),
|
|
748
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
749
|
+
FinancialDetailField,
|
|
750
|
+
{
|
|
751
|
+
variant: "footer",
|
|
752
|
+
label: "Interest Charge",
|
|
753
|
+
value: interestCharged
|
|
754
|
+
}
|
|
755
|
+
),
|
|
756
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
757
|
+
FinancialDetailField,
|
|
758
|
+
{
|
|
759
|
+
variant: "footer",
|
|
760
|
+
label: "Principle Paid Off",
|
|
761
|
+
value: principlePaidOff
|
|
762
|
+
}
|
|
763
|
+
)
|
|
764
|
+
] }) })
|
|
765
|
+
] })
|
|
766
|
+
}
|
|
767
|
+
)
|
|
768
|
+
]
|
|
769
|
+
}
|
|
770
|
+
);
|
|
771
|
+
}
|
|
772
|
+
function DebtCard({
|
|
773
|
+
lenderName,
|
|
774
|
+
currentLoanAmount,
|
|
775
|
+
interestRate,
|
|
776
|
+
originalLoanAmount,
|
|
777
|
+
originalLoanTerm,
|
|
778
|
+
monthlyRepayments,
|
|
779
|
+
redrawAmount,
|
|
780
|
+
offsetAmount,
|
|
781
|
+
extraLoanRepayments,
|
|
782
|
+
totalRepaymentsMade,
|
|
783
|
+
totalInterestPaid,
|
|
784
|
+
yearsRemaining
|
|
785
|
+
}) {
|
|
786
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "border border-border overflow-hidden flex flex-col h-full", children: [
|
|
787
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "grid grid-cols-3 gap-5 px-5 py-[15px] border-b border-border min-h-[7rem] items-start", children: [
|
|
788
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(FinancialDetailField, { label: "Name of Lender", value: lenderName }),
|
|
789
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
790
|
+
FinancialDetailField,
|
|
791
|
+
{
|
|
792
|
+
label: "Current Loan Amount",
|
|
793
|
+
value: currentLoanAmount
|
|
794
|
+
}
|
|
795
|
+
),
|
|
796
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
797
|
+
FinancialDetailField,
|
|
798
|
+
{
|
|
799
|
+
label: "Current Interest Rate",
|
|
800
|
+
value: interestRate
|
|
801
|
+
}
|
|
802
|
+
)
|
|
803
|
+
] }),
|
|
804
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "px-5 py-[15px] flex flex-col gap-5 flex-1", children: [
|
|
805
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(FinancialSubsectionTitle, { children: "Loan Stats" }),
|
|
806
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "grid grid-cols-3 gap-5", children: [
|
|
807
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
808
|
+
FinancialDetailField,
|
|
809
|
+
{
|
|
810
|
+
label: "Original Loan Amount",
|
|
811
|
+
value: originalLoanAmount
|
|
812
|
+
}
|
|
813
|
+
),
|
|
814
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
815
|
+
FinancialDetailField,
|
|
816
|
+
{
|
|
817
|
+
label: "Original Loan Term",
|
|
818
|
+
value: originalLoanTerm
|
|
819
|
+
}
|
|
820
|
+
),
|
|
821
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
822
|
+
FinancialDetailField,
|
|
823
|
+
{
|
|
824
|
+
label: "Monthly Repayments",
|
|
825
|
+
value: monthlyRepayments
|
|
826
|
+
}
|
|
827
|
+
)
|
|
828
|
+
] }),
|
|
829
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "grid grid-cols-3 gap-5", children: [
|
|
830
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(FinancialDetailField, { label: "Redraw Amount", value: redrawAmount }),
|
|
831
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(FinancialDetailField, { label: "Offset Account", value: offsetAmount }),
|
|
832
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
833
|
+
FinancialDetailField,
|
|
834
|
+
{
|
|
835
|
+
label: "Extra Loan Repayments",
|
|
836
|
+
value: extraLoanRepayments
|
|
837
|
+
}
|
|
838
|
+
)
|
|
839
|
+
] })
|
|
840
|
+
] }),
|
|
841
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(FinancialSubtotalFrame, { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "grid grid-cols-3 gap-x-4 gap-y-1", children: [
|
|
842
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
843
|
+
FinancialDetailField,
|
|
844
|
+
{
|
|
845
|
+
variant: "footer",
|
|
846
|
+
label: "Total Repayments Made",
|
|
847
|
+
value: totalRepaymentsMade
|
|
848
|
+
}
|
|
849
|
+
),
|
|
850
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
851
|
+
FinancialDetailField,
|
|
852
|
+
{
|
|
853
|
+
variant: "footer",
|
|
854
|
+
label: "Total Interest Paid",
|
|
855
|
+
value: totalInterestPaid
|
|
856
|
+
}
|
|
857
|
+
),
|
|
858
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
859
|
+
FinancialDetailField,
|
|
860
|
+
{
|
|
861
|
+
variant: "footer",
|
|
862
|
+
label: "Years Remaining",
|
|
863
|
+
value: yearsRemaining
|
|
864
|
+
}
|
|
865
|
+
)
|
|
866
|
+
] }) })
|
|
867
|
+
] });
|
|
868
|
+
}
|
|
869
|
+
function OtherLiabilityCard({
|
|
870
|
+
type,
|
|
871
|
+
lenderName,
|
|
872
|
+
interestRate,
|
|
873
|
+
currentBalance,
|
|
874
|
+
creditLimit,
|
|
875
|
+
minMonthlyPayment,
|
|
876
|
+
annualFee,
|
|
877
|
+
availableCredit,
|
|
878
|
+
currentLoanAmount,
|
|
879
|
+
originalLoanAmount,
|
|
880
|
+
originalLoanTerm,
|
|
881
|
+
monthlyRepayments,
|
|
882
|
+
currentLoanTermLeft,
|
|
883
|
+
totalRepaymentsMade,
|
|
884
|
+
totalInterestPaid
|
|
885
|
+
}) {
|
|
886
|
+
const isCreditCard = type === "credit_card";
|
|
887
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "border border-border overflow-hidden flex flex-col h-full", children: [
|
|
888
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "grid grid-cols-3 gap-5 px-4 pt-5 pb-4 min-h-[7rem] items-start", children: [
|
|
889
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(FinancialDetailField, { label: "Lender", value: lenderName }),
|
|
890
|
+
isCreditCard ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
891
|
+
FinancialDetailField,
|
|
892
|
+
{
|
|
893
|
+
label: "Current Balance",
|
|
894
|
+
value: currentBalance
|
|
895
|
+
}
|
|
896
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
897
|
+
FinancialDetailField,
|
|
898
|
+
{
|
|
899
|
+
label: "Current Loan Amount",
|
|
900
|
+
value: currentLoanAmount
|
|
901
|
+
}
|
|
902
|
+
),
|
|
903
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(FinancialDetailField, { label: "Interest Rate", value: interestRate })
|
|
904
|
+
] }),
|
|
905
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "px-4 pt-4 pb-5 flex flex-col gap-5 border-t border-border flex-1", children: [
|
|
906
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(FinancialSubsectionTitle, { children: isCreditCard ? "Card Stats" : "Loan Stats" }),
|
|
907
|
+
isCreditCard ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "grid grid-cols-3 gap-5", children: [
|
|
908
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(FinancialDetailField, { label: "Credit Limit", value: creditLimit }),
|
|
909
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
910
|
+
FinancialDetailField,
|
|
911
|
+
{
|
|
912
|
+
label: "Min Monthly Payment",
|
|
913
|
+
value: minMonthlyPayment
|
|
914
|
+
}
|
|
915
|
+
),
|
|
916
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(FinancialDetailField, { label: "Annual Fee", value: annualFee })
|
|
917
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "grid grid-cols-3 gap-5", children: [
|
|
918
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
919
|
+
FinancialDetailField,
|
|
920
|
+
{
|
|
921
|
+
label: "Original Loan Amount",
|
|
922
|
+
value: originalLoanAmount
|
|
923
|
+
}
|
|
924
|
+
),
|
|
925
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
926
|
+
FinancialDetailField,
|
|
927
|
+
{
|
|
928
|
+
label: "Original Loan Term",
|
|
929
|
+
value: originalLoanTerm
|
|
930
|
+
}
|
|
931
|
+
),
|
|
932
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
933
|
+
FinancialDetailField,
|
|
934
|
+
{
|
|
935
|
+
label: "Monthly Repayments",
|
|
936
|
+
value: monthlyRepayments
|
|
937
|
+
}
|
|
938
|
+
)
|
|
939
|
+
] })
|
|
940
|
+
] }),
|
|
941
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(FinancialSubtotalFrame, { children: isCreditCard ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "grid grid-cols-2 gap-x-4 gap-y-1", children: [
|
|
942
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
943
|
+
FinancialDetailField,
|
|
944
|
+
{
|
|
945
|
+
variant: "footer",
|
|
946
|
+
label: "Total Interest Paid",
|
|
947
|
+
value: totalInterestPaid
|
|
948
|
+
}
|
|
949
|
+
),
|
|
950
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
951
|
+
FinancialDetailField,
|
|
952
|
+
{
|
|
953
|
+
variant: "footer",
|
|
954
|
+
label: "Available Credit",
|
|
955
|
+
value: availableCredit
|
|
956
|
+
}
|
|
957
|
+
)
|
|
958
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "grid grid-cols-3 gap-x-4 gap-y-1", children: [
|
|
959
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
960
|
+
FinancialDetailField,
|
|
961
|
+
{
|
|
962
|
+
variant: "footer",
|
|
963
|
+
label: "Total Repayments Made",
|
|
964
|
+
value: totalRepaymentsMade
|
|
965
|
+
}
|
|
966
|
+
),
|
|
967
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
968
|
+
FinancialDetailField,
|
|
969
|
+
{
|
|
970
|
+
variant: "footer",
|
|
971
|
+
label: "Total Interest Paid",
|
|
972
|
+
value: totalInterestPaid
|
|
973
|
+
}
|
|
974
|
+
),
|
|
975
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
976
|
+
FinancialDetailField,
|
|
977
|
+
{
|
|
978
|
+
variant: "footer",
|
|
979
|
+
label: "Years Remaining",
|
|
980
|
+
value: currentLoanTermLeft
|
|
981
|
+
}
|
|
982
|
+
)
|
|
983
|
+
] }) })
|
|
984
|
+
] });
|
|
985
|
+
}
|
|
986
|
+
var SEVERITY_CLASSES = {
|
|
987
|
+
NEED_ACTION: { dot: "bg-destructive", border: "border-destructive" },
|
|
988
|
+
WATCH: { dot: "bg-warning", border: "border-warning" },
|
|
989
|
+
INSIGHT: { dot: "bg-success", border: "border-success" }
|
|
990
|
+
};
|
|
991
|
+
function AlertCard({
|
|
992
|
+
id,
|
|
993
|
+
name,
|
|
994
|
+
severityCode,
|
|
995
|
+
ignored = false,
|
|
996
|
+
ignoredUntil,
|
|
997
|
+
selectedAction = null,
|
|
998
|
+
onActionChange
|
|
999
|
+
}) {
|
|
1000
|
+
const { dot, border } = SEVERITY_CLASSES[severityCode];
|
|
1001
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: cn("flex flex-col gap-1.5 border p-2.5 px-3", border), children: [
|
|
1002
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex items-center gap-1.5", children: [
|
|
1003
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: cn("h-[9px] w-[9px] shrink-0 rounded-full", dot) }),
|
|
1004
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1005
|
+
"span",
|
|
1006
|
+
{
|
|
1007
|
+
className: cn(
|
|
1008
|
+
"text-sm font-medium leading-tight",
|
|
1009
|
+
ignored ? "text-muted-foreground line-through" : "text-foreground"
|
|
1010
|
+
),
|
|
1011
|
+
children: name
|
|
1012
|
+
}
|
|
1013
|
+
)
|
|
1014
|
+
] }),
|
|
1015
|
+
ignored ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "ml-[15px] text-xs italic text-muted-foreground/60", children: [
|
|
1016
|
+
"Ignored until ",
|
|
1017
|
+
ignoredUntil
|
|
1018
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
1019
|
+
RadioGroup,
|
|
1020
|
+
{
|
|
1021
|
+
value: selectedAction != null ? selectedAction : "",
|
|
1022
|
+
onValueChange: (val) => onActionChange == null ? void 0 : onActionChange(val),
|
|
1023
|
+
className: "ml-[15px] flex flex-col gap-1",
|
|
1024
|
+
children: [
|
|
1025
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
1026
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(RadioGroupItem, { value: "DISMISS", id: `dismiss-${id}` }),
|
|
1027
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1028
|
+
"label",
|
|
1029
|
+
{
|
|
1030
|
+
htmlFor: `dismiss-${id}`,
|
|
1031
|
+
className: "cursor-pointer select-none text-sm leading-none text-muted-foreground",
|
|
1032
|
+
children: "Mark as done (will reset in 6 months)"
|
|
1033
|
+
}
|
|
1034
|
+
)
|
|
1035
|
+
] }),
|
|
1036
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
1037
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(RadioGroupItem, { value: "SNOOZE", id: `snooze-${id}` }),
|
|
1038
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1039
|
+
"label",
|
|
1040
|
+
{
|
|
1041
|
+
htmlFor: `snooze-${id}`,
|
|
1042
|
+
className: "cursor-pointer select-none text-sm leading-none text-muted-foreground",
|
|
1043
|
+
children: "Snooze for 30 days"
|
|
1044
|
+
}
|
|
1045
|
+
)
|
|
1046
|
+
] })
|
|
1047
|
+
]
|
|
1048
|
+
}
|
|
1049
|
+
)
|
|
1050
|
+
] });
|
|
1051
|
+
}
|
|
1052
|
+
|
|
1053
|
+
// src/components/ui/financial-sections.tsx
|
|
1054
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
1055
|
+
function PropertyHoldingsSection({
|
|
1056
|
+
title = "Property Holdings",
|
|
1057
|
+
items,
|
|
1058
|
+
borderless = false
|
|
1059
|
+
}) {
|
|
1060
|
+
if (items.length === 0) return null;
|
|
1061
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { children: [
|
|
1062
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(FinancialCardHeader, { children: title }),
|
|
1063
|
+
borderless ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "grid grid-cols-2", children: items.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1064
|
+
"div",
|
|
1065
|
+
{
|
|
1066
|
+
className: i > 0 ? "border-l border-border pl-5" : "pr-5",
|
|
1067
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(PropertyCard, __spreadProps(__spreadValues({}, item), { borderless: true }))
|
|
1068
|
+
},
|
|
1069
|
+
`${item.address}-${i}`
|
|
1070
|
+
)) }) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "grid grid-cols-2 gap-5", children: items.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(PropertyCard, __spreadValues({}, item), `${item.address}-${i}`)) })
|
|
1071
|
+
] });
|
|
1072
|
+
}
|
|
1073
|
+
function DebtSection({
|
|
1074
|
+
title = "Mortgages & Investment Loans",
|
|
1075
|
+
items
|
|
1076
|
+
}) {
|
|
1077
|
+
if (items.length === 0) return null;
|
|
1078
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { children: [
|
|
1079
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(FinancialCardHeader, { children: title }),
|
|
1080
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "grid grid-cols-2 gap-3", children: items.map((item, i) => {
|
|
1081
|
+
var _a;
|
|
1082
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(DebtCard, __spreadValues({}, item), (_a = item.lenderName) != null ? _a : i);
|
|
1083
|
+
}) })
|
|
1084
|
+
] });
|
|
1085
|
+
}
|
|
1086
|
+
function OtherLiabilitiesSection({
|
|
1087
|
+
title = "Other Liabilities",
|
|
1088
|
+
items
|
|
1089
|
+
}) {
|
|
1090
|
+
if (items.length === 0) return null;
|
|
1091
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { children: [
|
|
1092
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(FinancialCardHeader, { children: title }),
|
|
1093
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "grid grid-cols-2 gap-5", children: items.map((item, i) => {
|
|
1094
|
+
var _a;
|
|
1095
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1096
|
+
OtherLiabilityCard,
|
|
1097
|
+
__spreadValues({}, item),
|
|
1098
|
+
`${(_a = item.lenderName) != null ? _a : item.type}-${i}`
|
|
1099
|
+
);
|
|
1100
|
+
}) })
|
|
1101
|
+
] });
|
|
1102
|
+
}
|
|
1103
|
+
function IncomeExpenseSection({
|
|
1104
|
+
income,
|
|
1105
|
+
expenses,
|
|
1106
|
+
futurePayments,
|
|
1107
|
+
futurePaymentsHeading = "Future Payments"
|
|
1108
|
+
}) {
|
|
1109
|
+
var _a, _b, _c, _d, _e, _f;
|
|
1110
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "grid grid-cols-3", children: [
|
|
1111
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex flex-col pr-5", children: [
|
|
1112
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(FinancialCardHeader, { children: (_a = income == null ? void 0 : income.label) != null ? _a : "Average Monthly Income" }),
|
|
1113
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "flex flex-1 flex-col pb-4", children: ((_b = income == null ? void 0 : income.items) != null ? _b : []).map((item) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1114
|
+
FinancialLineItem,
|
|
1115
|
+
{
|
|
1116
|
+
label: item.label,
|
|
1117
|
+
value: item.value,
|
|
1118
|
+
destructive: item.destructive
|
|
1119
|
+
},
|
|
1120
|
+
item.label
|
|
1121
|
+
)) }),
|
|
1122
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(FinancialSubtotalFrame, { children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1123
|
+
FinancialSubtotalBlock,
|
|
1124
|
+
{
|
|
1125
|
+
monthlyAverage: income == null ? void 0 : income.monthlyAverage,
|
|
1126
|
+
totalLast12Months: income == null ? void 0 : income.totalLast12Months
|
|
1127
|
+
}
|
|
1128
|
+
) })
|
|
1129
|
+
] }),
|
|
1130
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex flex-col border-x border-border px-5", children: [
|
|
1131
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(FinancialCardHeader, { children: (_c = expenses == null ? void 0 : expenses.label) != null ? _c : "Monthly Expenses and Commitments" }),
|
|
1132
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "flex flex-1 flex-col pb-4", children: ((_d = expenses == null ? void 0 : expenses.items) != null ? _d : []).map((item) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1133
|
+
FinancialLineItem,
|
|
1134
|
+
{
|
|
1135
|
+
label: item.label,
|
|
1136
|
+
value: item.value,
|
|
1137
|
+
destructive: item.destructive
|
|
1138
|
+
},
|
|
1139
|
+
item.label
|
|
1140
|
+
)) }),
|
|
1141
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(FinancialSubtotalFrame, { children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1142
|
+
FinancialSubtotalBlock,
|
|
1143
|
+
{
|
|
1144
|
+
monthlyAverage: expenses == null ? void 0 : expenses.monthlyAverage,
|
|
1145
|
+
totalLast12Months: expenses == null ? void 0 : expenses.totalLast12Months
|
|
1146
|
+
}
|
|
1147
|
+
) })
|
|
1148
|
+
] }),
|
|
1149
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex flex-col pl-5", children: [
|
|
1150
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(FinancialCardHeader, { children: (_e = futurePayments == null ? void 0 : futurePayments.label) != null ? _e : futurePaymentsHeading }),
|
|
1151
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "flex flex-1 flex-col pb-4", children: ((_f = futurePayments == null ? void 0 : futurePayments.items) != null ? _f : []).map((item) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1152
|
+
FinancialLineItem,
|
|
1153
|
+
{
|
|
1154
|
+
label: item.label,
|
|
1155
|
+
value: item.value,
|
|
1156
|
+
destructive: item.destructive
|
|
1157
|
+
},
|
|
1158
|
+
item.label
|
|
1159
|
+
)) }),
|
|
1160
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(FinancialSubtotalFrame, { children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1161
|
+
FinancialSubtotalBlock,
|
|
1162
|
+
{
|
|
1163
|
+
monthlyAverage: futurePayments == null ? void 0 : futurePayments.monthlyAverage,
|
|
1164
|
+
totalLast12Months: futurePayments == null ? void 0 : futurePayments.totalLast12Months
|
|
1165
|
+
}
|
|
1166
|
+
) })
|
|
1167
|
+
] })
|
|
1168
|
+
] });
|
|
1169
|
+
}
|
|
1170
|
+
var SEVERITY_BG = {
|
|
1171
|
+
NEED_ACTION: "bg-destructive text-destructive-foreground",
|
|
1172
|
+
WATCH: "bg-warning text-warning-foreground",
|
|
1173
|
+
INSIGHT: "bg-success text-success-foreground"
|
|
1174
|
+
};
|
|
1175
|
+
function AlertAccordion({
|
|
1176
|
+
alerts,
|
|
1177
|
+
onSaveActions,
|
|
1178
|
+
isSaving = false
|
|
1179
|
+
}) {
|
|
1180
|
+
const [actionMap, setActionMap] = (0, import_react2.useState)(
|
|
1181
|
+
{}
|
|
1182
|
+
);
|
|
1183
|
+
const handleActionChange = (id) => (action) => {
|
|
1184
|
+
setActionMap((prev) => __spreadProps(__spreadValues({}, prev), { [id]: action }));
|
|
1185
|
+
};
|
|
1186
|
+
const handleSave = (e) => {
|
|
1187
|
+
e.stopPropagation();
|
|
1188
|
+
onSaveActions == null ? void 0 : onSaveActions(
|
|
1189
|
+
Object.entries(actionMap).map(([alertId, action]) => ({
|
|
1190
|
+
alertId,
|
|
1191
|
+
action
|
|
1192
|
+
}))
|
|
1193
|
+
);
|
|
1194
|
+
};
|
|
1195
|
+
const countBySeverity = alerts.reduce((acc, a) => {
|
|
1196
|
+
acc[a.severityCode] = (acc[a.severityCode] || 0) + 1;
|
|
1197
|
+
return acc;
|
|
1198
|
+
}, {});
|
|
1199
|
+
const hasPendingActions = Object.keys(actionMap).length > 0;
|
|
1200
|
+
if (alerts.length === 0) return null;
|
|
1201
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Accordion, { children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(AccordionItem, { value: "alerts", className: "border-0", children: [
|
|
1202
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(AccordionTrigger, { className: "min-h-14 cursor-pointer border border-primary/20 bg-primary/10 px-4 py-2.5 hover:bg-primary/10 hover:no-underline", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex w-full items-center justify-between", children: [
|
|
1203
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex items-center gap-2.5", children: [
|
|
1204
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "text-label-medium text-foreground", children: "Alerts" }),
|
|
1205
|
+
["INSIGHT", "WATCH", "NEED_ACTION"].map(
|
|
1206
|
+
(code) => countBySeverity[code] ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1207
|
+
"span",
|
|
1208
|
+
{
|
|
1209
|
+
className: `flex h-6 w-6 items-center justify-center rounded-full text-xs font-semibold leading-none ${SEVERITY_BG[code]}`,
|
|
1210
|
+
children: countBySeverity[code]
|
|
1211
|
+
},
|
|
1212
|
+
code
|
|
1213
|
+
) : null
|
|
1214
|
+
)
|
|
1215
|
+
] }),
|
|
1216
|
+
hasPendingActions && onSaveActions && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1217
|
+
Button,
|
|
1218
|
+
{
|
|
1219
|
+
variant: "outline",
|
|
1220
|
+
size: "sm",
|
|
1221
|
+
onClick: handleSave,
|
|
1222
|
+
disabled: isSaving,
|
|
1223
|
+
children: isSaving ? "Saving..." : "Save"
|
|
1224
|
+
}
|
|
1225
|
+
)
|
|
1226
|
+
] }) }),
|
|
1227
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(AccordionContent, { className: "p-0 pb-0", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "grid grid-cols-3 gap-2.5 border border-t-0 border-primary/20 p-3", children: alerts.map((alert) => {
|
|
1228
|
+
var _a;
|
|
1229
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1230
|
+
AlertCard,
|
|
1231
|
+
__spreadProps(__spreadValues({}, alert), {
|
|
1232
|
+
selectedAction: (_a = actionMap[alert.id]) != null ? _a : null,
|
|
1233
|
+
onActionChange: handleActionChange(alert.id)
|
|
1234
|
+
}),
|
|
1235
|
+
alert.id
|
|
1236
|
+
);
|
|
1237
|
+
}) }) })
|
|
1238
|
+
] }) });
|
|
1239
|
+
}
|
|
1240
|
+
function LoanScenarioSection({
|
|
1241
|
+
title = "Loan Scenario (Loan Quiz)",
|
|
1242
|
+
lendingType,
|
|
1243
|
+
purposeOfLoan,
|
|
1244
|
+
loanAmount,
|
|
1245
|
+
propertyEstimate,
|
|
1246
|
+
estLvr,
|
|
1247
|
+
cashDeposit,
|
|
1248
|
+
propertyAddress,
|
|
1249
|
+
duration,
|
|
1250
|
+
importantFeatures,
|
|
1251
|
+
topThreePriorities
|
|
1252
|
+
}) {
|
|
1253
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "border border-border p-4", children: [
|
|
1254
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "mb-4", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(FinancialSectionLabel, { children: title }) }),
|
|
1255
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "grid grid-cols-4 gap-x-6 gap-y-4", children: [
|
|
1256
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(FinancialDetailField, { label: "Lending Type", value: lendingType }),
|
|
1257
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(FinancialDetailField, { label: "Purpose of Loan", value: purposeOfLoan }),
|
|
1258
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(FinancialDetailField, { label: "Loan Amount", value: loanAmount }),
|
|
1259
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1260
|
+
FinancialDetailField,
|
|
1261
|
+
{
|
|
1262
|
+
label: "Property Estimate",
|
|
1263
|
+
value: propertyEstimate
|
|
1264
|
+
}
|
|
1265
|
+
),
|
|
1266
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(FinancialDetailField, { label: "EST LVR", value: estLvr }),
|
|
1267
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(FinancialDetailField, { label: "Cash/Deposit", value: cashDeposit }),
|
|
1268
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1269
|
+
FinancialDetailField,
|
|
1270
|
+
{
|
|
1271
|
+
label: "Property Address",
|
|
1272
|
+
value: propertyAddress
|
|
1273
|
+
}
|
|
1274
|
+
),
|
|
1275
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(FinancialDetailField, { label: "Duration", value: duration }),
|
|
1276
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1277
|
+
FinancialDetailField,
|
|
1278
|
+
{
|
|
1279
|
+
label: "Important Features",
|
|
1280
|
+
value: importantFeatures
|
|
1281
|
+
}
|
|
1282
|
+
),
|
|
1283
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1284
|
+
FinancialDetailField,
|
|
1285
|
+
{
|
|
1286
|
+
label: "Top Three Priorities",
|
|
1287
|
+
value: topThreePriorities
|
|
1288
|
+
}
|
|
1289
|
+
)
|
|
1290
|
+
] })
|
|
1291
|
+
] });
|
|
1292
|
+
}
|
|
1293
|
+
function FinancialBottomSummary({
|
|
1294
|
+
cashflowItems = [],
|
|
1295
|
+
netSurplus,
|
|
1296
|
+
netSurplusDestructive = false,
|
|
1297
|
+
assetItems = [],
|
|
1298
|
+
totalAssets,
|
|
1299
|
+
totalLiabilities,
|
|
1300
|
+
netPosition,
|
|
1301
|
+
netPositionDestructive = false
|
|
1302
|
+
}) {
|
|
1303
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "border border-border", children: [
|
|
1304
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "p-4", children: [
|
|
1305
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "mb-3", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(FinancialSectionLabel, { children: "Incoming vs Outgoing Summary" }) }),
|
|
1306
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "flex flex-col", children: cashflowItems.map((item) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1307
|
+
FinancialLineItem,
|
|
1308
|
+
{
|
|
1309
|
+
label: item.label,
|
|
1310
|
+
value: item.value,
|
|
1311
|
+
destructive: item.destructive
|
|
1312
|
+
},
|
|
1313
|
+
item.label
|
|
1314
|
+
)) }),
|
|
1315
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(FinancialSubtotalFrame, { children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1316
|
+
FinancialSubtotalBlock,
|
|
1317
|
+
{
|
|
1318
|
+
monthlyAverage: netSurplus,
|
|
1319
|
+
label: netSurplusDestructive ? "Net Deficit" : "Net Surplus"
|
|
1320
|
+
}
|
|
1321
|
+
) })
|
|
1322
|
+
] }),
|
|
1323
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Separator, {}),
|
|
1324
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "p-4", children: [
|
|
1325
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "mb-3", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(FinancialSectionLabel, { children: "Assets" }) }),
|
|
1326
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "flex flex-col", children: assetItems.map((item) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1327
|
+
FinancialLineItem,
|
|
1328
|
+
{
|
|
1329
|
+
label: item.label,
|
|
1330
|
+
value: item.value,
|
|
1331
|
+
destructive: item.destructive
|
|
1332
|
+
},
|
|
1333
|
+
item.label
|
|
1334
|
+
)) }),
|
|
1335
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(FinancialSubtotalFrame, { children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1336
|
+
FinancialSubtotalBlock,
|
|
1337
|
+
{
|
|
1338
|
+
monthlyAverage: totalAssets,
|
|
1339
|
+
label: "Total Assets"
|
|
1340
|
+
}
|
|
1341
|
+
) })
|
|
1342
|
+
] }),
|
|
1343
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Separator, {}),
|
|
1344
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "p-4", children: [
|
|
1345
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "mb-3", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(FinancialSectionLabel, { children: "Net Position" }) }),
|
|
1346
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex flex-col", children: [
|
|
1347
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1348
|
+
FinancialLineItem,
|
|
1349
|
+
{
|
|
1350
|
+
label: "Total Liabilities",
|
|
1351
|
+
value: totalLiabilities,
|
|
1352
|
+
destructive: true
|
|
1353
|
+
}
|
|
1354
|
+
),
|
|
1355
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(FinancialLineItem, { label: "Total Assets", value: totalAssets })
|
|
1356
|
+
] }),
|
|
1357
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(FinancialSubtotalFrame, { children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1358
|
+
FinancialSubtotalBlock,
|
|
1359
|
+
{
|
|
1360
|
+
monthlyAverage: netPosition,
|
|
1361
|
+
label: netPositionDestructive ? "Net Deficit" : "Net Position"
|
|
1362
|
+
}
|
|
1363
|
+
) })
|
|
1364
|
+
] })
|
|
1365
|
+
] });
|
|
1366
|
+
}
|
|
1367
|
+
function FinancialViewSection({
|
|
1368
|
+
title = "Financial View",
|
|
1369
|
+
income,
|
|
1370
|
+
expenses,
|
|
1371
|
+
futurePayments,
|
|
1372
|
+
futurePaymentsHeading,
|
|
1373
|
+
propertyTitle = "Property Assets and Liabilities",
|
|
1374
|
+
properties = [],
|
|
1375
|
+
currentLiabilitiesTitle = "Current Liabilities",
|
|
1376
|
+
currentLiabilities = []
|
|
1377
|
+
}) {
|
|
1378
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "border border-border p-4 flex flex-col gap-4", children: [
|
|
1379
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(FinancialSectionLabel, { children: title }),
|
|
1380
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1381
|
+
IncomeExpenseSection,
|
|
1382
|
+
{
|
|
1383
|
+
income,
|
|
1384
|
+
expenses,
|
|
1385
|
+
futurePayments,
|
|
1386
|
+
futurePaymentsHeading
|
|
1387
|
+
}
|
|
1388
|
+
),
|
|
1389
|
+
properties.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
|
|
1390
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Separator, {}),
|
|
1391
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1392
|
+
PropertyHoldingsSection,
|
|
1393
|
+
{
|
|
1394
|
+
title: propertyTitle,
|
|
1395
|
+
items: properties,
|
|
1396
|
+
borderless: true
|
|
1397
|
+
}
|
|
1398
|
+
)
|
|
1399
|
+
] }),
|
|
1400
|
+
currentLiabilities.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
|
|
1401
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Separator, {}),
|
|
1402
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1403
|
+
DebtSection,
|
|
1404
|
+
{
|
|
1405
|
+
title: currentLiabilitiesTitle,
|
|
1406
|
+
items: currentLiabilities
|
|
1407
|
+
}
|
|
1408
|
+
)
|
|
1409
|
+
] })
|
|
1410
|
+
] });
|
|
1411
|
+
}
|
|
1412
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
1413
|
+
0 && (module.exports = {
|
|
1414
|
+
AlertAccordion,
|
|
1415
|
+
DebtSection,
|
|
1416
|
+
FinancialBottomSummary,
|
|
1417
|
+
FinancialViewSection,
|
|
1418
|
+
IncomeExpenseSection,
|
|
1419
|
+
LoanScenarioSection,
|
|
1420
|
+
OtherLiabilitiesSection,
|
|
1421
|
+
PropertyHoldingsSection
|
|
1422
|
+
});
|