@wealthx/shadcn 1.1.0 → 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 -154
- package/CHANGELOG.md +6 -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-GLW2UO6O.mjs → chunk-5QQVZTVZ.mjs} +82 -61
- 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-YBXCIF5Q.mjs → chunk-ERGGHC2V.mjs} +36 -49
- 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-RN67642N.mjs → chunk-KMCGSZTX.mjs} +47 -41
- package/dist/{chunk-FHNT55I5.mjs → chunk-KUDCQ4FI.mjs} +4 -4
- package/dist/chunk-LE6YFY6D.mjs +209 -0
- package/dist/{chunk-NLLKTU4B.mjs → chunk-LLVQKSU3.mjs} +21 -17
- 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-5JGQAAQV.mjs → chunk-PJHPSRYD.mjs} +84 -62
- 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-UEL4RD5P.mjs → chunk-SMQ3DG25.mjs} +80 -67
- 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-CJ46PDXE.mjs → chunk-ZRO5JO3H.mjs} +106 -66
- 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 +123 -69
- package/dist/components/ui/cashflow-bar-chart.mjs +8 -8
- 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 +68 -49
- package/dist/components/ui/combobox.mjs +2 -2
- 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 +165 -66
- package/dist/components/ui/expense-bar-chart.mjs +8 -8
- 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 +163 -65
- package/dist/components/ui/income-bar-chart.mjs +8 -8
- 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 +76 -38
- package/dist/components/ui/transactions-income-expense-bar-chart.mjs +8 -8
- 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 +11616 -3831
- package/dist/index.mjs +333 -161
- 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 +140 -5
- package/src/components/index.tsx +296 -42
- 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 +104 -77
- package/src/components/ui/chart-shared.tsx +176 -15
- package/src/components/ui/checkbox.tsx +30 -26
- package/src/components/ui/combobox.tsx +78 -72
- 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 +83 -65
- 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 +79 -60
- 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 +45 -38
- 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 +27 -0
- package/dist/chunk-3EQP72AW.mjs +0 -58
- package/dist/chunk-K74JRTJR.mjs +0 -105
- package/dist/chunk-V7CNWJT3.mjs +0 -10
|
@@ -0,0 +1,686 @@
|
|
|
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/ai-assistant-drawer.tsx
|
|
60
|
+
var ai_assistant_drawer_exports = {};
|
|
61
|
+
__export(ai_assistant_drawer_exports, {
|
|
62
|
+
AiAssistantDrawer: () => AiAssistantDrawer
|
|
63
|
+
});
|
|
64
|
+
module.exports = __toCommonJS(ai_assistant_drawer_exports);
|
|
65
|
+
var React3 = __toESM(require("react"));
|
|
66
|
+
var import_lucide_react4 = require("lucide-react");
|
|
67
|
+
|
|
68
|
+
// src/lib/utils.ts
|
|
69
|
+
var import_clsx = require("clsx");
|
|
70
|
+
var import_tailwind_merge = require("tailwind-merge");
|
|
71
|
+
var twMerge = (0, import_tailwind_merge.extendTailwindMerge)({
|
|
72
|
+
extend: {
|
|
73
|
+
classGroups: {
|
|
74
|
+
"font-size": [
|
|
75
|
+
{
|
|
76
|
+
text: [
|
|
77
|
+
"display-large",
|
|
78
|
+
"display-medium",
|
|
79
|
+
"display-small",
|
|
80
|
+
"h1",
|
|
81
|
+
"h2",
|
|
82
|
+
"h3",
|
|
83
|
+
"h4",
|
|
84
|
+
"h5",
|
|
85
|
+
"h6",
|
|
86
|
+
"body-large",
|
|
87
|
+
"body-medium",
|
|
88
|
+
"body-small",
|
|
89
|
+
"label-large",
|
|
90
|
+
"label-medium",
|
|
91
|
+
"label-small",
|
|
92
|
+
"button",
|
|
93
|
+
"button-xs",
|
|
94
|
+
"caption",
|
|
95
|
+
"overline",
|
|
96
|
+
"code"
|
|
97
|
+
]
|
|
98
|
+
}
|
|
99
|
+
]
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
function cn(...inputs) {
|
|
104
|
+
return twMerge((0, import_clsx.clsx)(inputs));
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// src/components/ui/sheet.tsx
|
|
108
|
+
var import_lucide_react = require("lucide-react");
|
|
109
|
+
var import_dialog = require("@base-ui/react/dialog");
|
|
110
|
+
|
|
111
|
+
// src/lib/theme-provider.tsx
|
|
112
|
+
var import_react = require("react");
|
|
113
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
114
|
+
var ThemeVarsContext = (0, import_react.createContext)({});
|
|
115
|
+
function useThemeVars() {
|
|
116
|
+
return (0, import_react.useContext)(ThemeVarsContext);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
// src/components/ui/sheet.tsx
|
|
120
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
121
|
+
var SIDE_CLASSES = {
|
|
122
|
+
right: "inset-y-0 right-0 h-full w-1/2 border-l data-ending-style:slide-out-to-right data-open:slide-in-from-right",
|
|
123
|
+
left: "inset-y-0 left-0 h-full w-1/2 border-r data-ending-style:slide-out-to-left data-open:slide-in-from-left",
|
|
124
|
+
top: "inset-x-0 top-0 h-auto border-b data-ending-style:slide-out-to-top data-open:slide-in-from-top",
|
|
125
|
+
bottom: "inset-x-0 bottom-0 h-auto border-t data-ending-style:slide-out-to-bottom data-open:slide-in-from-bottom"
|
|
126
|
+
};
|
|
127
|
+
function Sheet(_a) {
|
|
128
|
+
var props = __objRest(_a, []);
|
|
129
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_dialog.Dialog.Root, __spreadValues({ "data-slot": "sheet" }, props));
|
|
130
|
+
}
|
|
131
|
+
function SheetPortal(_a) {
|
|
132
|
+
var props = __objRest(_a, []);
|
|
133
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_dialog.Dialog.Portal, __spreadValues({ "data-slot": "sheet-portal" }, props));
|
|
134
|
+
}
|
|
135
|
+
function SheetOverlay(_a) {
|
|
136
|
+
var _b = _a, {
|
|
137
|
+
className
|
|
138
|
+
} = _b, props = __objRest(_b, [
|
|
139
|
+
"className"
|
|
140
|
+
]);
|
|
141
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
142
|
+
import_dialog.Dialog.Backdrop,
|
|
143
|
+
__spreadValues({
|
|
144
|
+
className: cn(
|
|
145
|
+
"fixed inset-0 z-50 bg-foreground/50 data-ending-style:animate-out data-ending-style:fade-out-0 data-ending-style:fill-mode-forwards data-open:animate-in data-open:fade-in-0",
|
|
146
|
+
className
|
|
147
|
+
),
|
|
148
|
+
"data-slot": "sheet-overlay"
|
|
149
|
+
}, props)
|
|
150
|
+
);
|
|
151
|
+
}
|
|
152
|
+
function SheetContent(_a) {
|
|
153
|
+
var _b = _a, {
|
|
154
|
+
className,
|
|
155
|
+
children,
|
|
156
|
+
side = "right",
|
|
157
|
+
showCloseButton = true,
|
|
158
|
+
style
|
|
159
|
+
} = _b, props = __objRest(_b, [
|
|
160
|
+
"className",
|
|
161
|
+
"children",
|
|
162
|
+
"side",
|
|
163
|
+
"showCloseButton",
|
|
164
|
+
"style"
|
|
165
|
+
]);
|
|
166
|
+
const themeVars = useThemeVars();
|
|
167
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(SheetPortal, { children: [
|
|
168
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(SheetOverlay, {}),
|
|
169
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
170
|
+
import_dialog.Dialog.Popup,
|
|
171
|
+
__spreadProps(__spreadValues({
|
|
172
|
+
className: cn(
|
|
173
|
+
"fixed z-50 flex flex-col gap-4 bg-background transition ease-in-out data-ending-style:animate-out data-ending-style:duration-300 data-ending-style:fill-mode-forwards data-open:animate-in data-open:duration-500",
|
|
174
|
+
SIDE_CLASSES[side],
|
|
175
|
+
className
|
|
176
|
+
),
|
|
177
|
+
"data-slot": "sheet-content",
|
|
178
|
+
style: __spreadValues(__spreadValues({}, themeVars), style)
|
|
179
|
+
}, props), {
|
|
180
|
+
children: [
|
|
181
|
+
children,
|
|
182
|
+
showCloseButton ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
183
|
+
import_dialog.Dialog.Close,
|
|
184
|
+
{
|
|
185
|
+
className: "absolute top-4 right-4 transition-colors hover:bg-foreground/5 focus:outline-hidden focus:ring-2 focus:ring-border focus:ring-offset-0 disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
186
|
+
"data-slot": "sheet-icon-close",
|
|
187
|
+
children: [
|
|
188
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_lucide_react.XIcon, {}),
|
|
189
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "sr-only", children: "Close" })
|
|
190
|
+
]
|
|
191
|
+
}
|
|
192
|
+
) : null
|
|
193
|
+
]
|
|
194
|
+
})
|
|
195
|
+
)
|
|
196
|
+
] });
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
// src/components/ui/button.tsx
|
|
200
|
+
var import_react2 = require("react");
|
|
201
|
+
var import_class_variance_authority = require("class-variance-authority");
|
|
202
|
+
var import_lucide_react2 = require("lucide-react");
|
|
203
|
+
|
|
204
|
+
// src/lib/slot.tsx
|
|
205
|
+
var React2 = __toESM(require("react"));
|
|
206
|
+
function mergeRefs(...refs) {
|
|
207
|
+
return (value) => {
|
|
208
|
+
for (const ref of refs) {
|
|
209
|
+
if (typeof ref === "function") ref(value);
|
|
210
|
+
else if (ref !== null)
|
|
211
|
+
ref.current = value;
|
|
212
|
+
}
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
var Slot = React2.forwardRef(
|
|
216
|
+
(_a, forwardedRef) => {
|
|
217
|
+
var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
|
|
218
|
+
const child = React2.Children.only(children);
|
|
219
|
+
if (!React2.isValidElement(child)) return null;
|
|
220
|
+
const childProps = child.props;
|
|
221
|
+
const merged = __spreadValues({}, props);
|
|
222
|
+
for (const key of Object.keys(childProps)) {
|
|
223
|
+
if (key === "className") {
|
|
224
|
+
merged.className = [props.className, childProps.className].filter(Boolean).join(" ");
|
|
225
|
+
} else if (key === "style") {
|
|
226
|
+
merged.style = __spreadValues(__spreadValues({}, props.style), childProps.style);
|
|
227
|
+
} else if (key.startsWith("on") && typeof childProps[key] === "function") {
|
|
228
|
+
const parentHandler = props[key];
|
|
229
|
+
if (typeof parentHandler === "function") {
|
|
230
|
+
merged[key] = (...args) => {
|
|
231
|
+
childProps[key](...args);
|
|
232
|
+
parentHandler(...args);
|
|
233
|
+
};
|
|
234
|
+
} else {
|
|
235
|
+
merged[key] = childProps[key];
|
|
236
|
+
}
|
|
237
|
+
} else {
|
|
238
|
+
merged[key] = childProps[key];
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
const childRef = child.ref;
|
|
242
|
+
merged.ref = forwardedRef ? mergeRefs(forwardedRef, childRef) : childRef;
|
|
243
|
+
return React2.cloneElement(
|
|
244
|
+
child,
|
|
245
|
+
merged
|
|
246
|
+
);
|
|
247
|
+
}
|
|
248
|
+
);
|
|
249
|
+
Slot.displayName = "Slot";
|
|
250
|
+
|
|
251
|
+
// src/components/ui/button.tsx
|
|
252
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
253
|
+
var buttonVariants = (0, import_class_variance_authority.cva)(
|
|
254
|
+
"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",
|
|
255
|
+
{
|
|
256
|
+
variants: {
|
|
257
|
+
variant: {
|
|
258
|
+
default: "bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",
|
|
259
|
+
secondary: "bg-brand-secondary text-brand-secondary-foreground shadow-xs hover:bg-brand-secondary/80 focus-visible:ring-brand-secondary/30",
|
|
260
|
+
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",
|
|
261
|
+
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",
|
|
262
|
+
"outline-primary": "border border-primary text-foreground bg-transparent shadow-xs hover:bg-primary/5 focus-visible:ring-primary/50",
|
|
263
|
+
"outline-secondary": "border border-brand-secondary text-brand-secondary bg-transparent shadow-xs hover:bg-brand-secondary/10 focus-visible:ring-brand-secondary/30",
|
|
264
|
+
ghost: "hover:bg-accent hover:text-accent-foreground hover:shadow-xs dark:hover:bg-accent/50",
|
|
265
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
266
|
+
},
|
|
267
|
+
size: {
|
|
268
|
+
default: "h-9 px-4 py-2 has-[>svg]:px-3",
|
|
269
|
+
xs: "h-6 gap-1 px-2 text-button-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",
|
|
270
|
+
sm: "h-8 gap-1.5 px-3 has-[>svg]:px-2.5",
|
|
271
|
+
lg: "h-10 px-6 has-[>svg]:px-4",
|
|
272
|
+
icon: "size-9",
|
|
273
|
+
"icon-xs": "size-6 [&_svg:not([class*='size-'])]:size-3",
|
|
274
|
+
"icon-sm": "size-8",
|
|
275
|
+
"icon-lg": "size-10"
|
|
276
|
+
}
|
|
277
|
+
},
|
|
278
|
+
defaultVariants: {
|
|
279
|
+
variant: "default",
|
|
280
|
+
size: "default"
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
);
|
|
284
|
+
var Button = (0, import_react2.forwardRef)(function Button2(_a, ref) {
|
|
285
|
+
var _b = _a, {
|
|
286
|
+
className,
|
|
287
|
+
variant,
|
|
288
|
+
size,
|
|
289
|
+
asChild = false,
|
|
290
|
+
loading = false,
|
|
291
|
+
disabled,
|
|
292
|
+
type = "button",
|
|
293
|
+
children
|
|
294
|
+
} = _b, props = __objRest(_b, [
|
|
295
|
+
"className",
|
|
296
|
+
"variant",
|
|
297
|
+
"size",
|
|
298
|
+
"asChild",
|
|
299
|
+
"loading",
|
|
300
|
+
"disabled",
|
|
301
|
+
"type",
|
|
302
|
+
"children"
|
|
303
|
+
]);
|
|
304
|
+
const Comp = asChild ? Slot : "button";
|
|
305
|
+
const isIconOnly = size === "icon" || size === "icon-xs" || size === "icon-sm" || size === "icon-lg";
|
|
306
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
307
|
+
Comp,
|
|
308
|
+
__spreadProps(__spreadValues({
|
|
309
|
+
className: cn(buttonVariants({ variant, size, className })),
|
|
310
|
+
"data-size": size,
|
|
311
|
+
"data-slot": "button",
|
|
312
|
+
"data-variant": variant,
|
|
313
|
+
disabled: loading || disabled,
|
|
314
|
+
ref,
|
|
315
|
+
type
|
|
316
|
+
}, props), {
|
|
317
|
+
children: loading ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
318
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_lucide_react2.Loader2, { "aria-hidden": "true", className: "animate-spin" }),
|
|
319
|
+
!isIconOnly && children
|
|
320
|
+
] }) : children
|
|
321
|
+
})
|
|
322
|
+
);
|
|
323
|
+
});
|
|
324
|
+
|
|
325
|
+
// src/components/ui/badge.tsx
|
|
326
|
+
var import_class_variance_authority2 = require("class-variance-authority");
|
|
327
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
328
|
+
var badgeVariants = (0, import_class_variance_authority2.cva)(
|
|
329
|
+
"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",
|
|
330
|
+
{
|
|
331
|
+
variants: {
|
|
332
|
+
variant: {
|
|
333
|
+
default: "bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
|
|
334
|
+
secondary: "bg-muted text-muted-foreground [a&]:hover:bg-muted/80",
|
|
335
|
+
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",
|
|
336
|
+
success: "bg-success text-success-foreground [a&]:hover:bg-success/90",
|
|
337
|
+
warning: "bg-warning text-warning-foreground [a&]:hover:bg-warning/90",
|
|
338
|
+
info: "bg-info text-info-foreground [a&]:hover:bg-info/90",
|
|
339
|
+
outline: "border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
|
|
340
|
+
ghost: "[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
|
|
341
|
+
link: "text-primary underline-offset-4 [a&]:hover:underline"
|
|
342
|
+
}
|
|
343
|
+
},
|
|
344
|
+
defaultVariants: {
|
|
345
|
+
variant: "default"
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
);
|
|
349
|
+
function Badge(_a) {
|
|
350
|
+
var _b = _a, {
|
|
351
|
+
className,
|
|
352
|
+
variant = "default",
|
|
353
|
+
asChild = false
|
|
354
|
+
} = _b, props = __objRest(_b, [
|
|
355
|
+
"className",
|
|
356
|
+
"variant",
|
|
357
|
+
"asChild"
|
|
358
|
+
]);
|
|
359
|
+
const Comp = asChild ? Slot : "span";
|
|
360
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
361
|
+
Comp,
|
|
362
|
+
__spreadValues({
|
|
363
|
+
className: cn(badgeVariants({ variant }), className),
|
|
364
|
+
"data-slot": "badge",
|
|
365
|
+
"data-variant": variant
|
|
366
|
+
}, props)
|
|
367
|
+
);
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
// src/components/ui/spinner.tsx
|
|
371
|
+
var import_class_variance_authority3 = require("class-variance-authority");
|
|
372
|
+
var import_lucide_react3 = require("lucide-react");
|
|
373
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
374
|
+
var spinnerVariants = (0, import_class_variance_authority3.cva)("animate-spin shrink-0", {
|
|
375
|
+
variants: {
|
|
376
|
+
size: {
|
|
377
|
+
sm: "size-3",
|
|
378
|
+
default: "size-4",
|
|
379
|
+
lg: "size-6",
|
|
380
|
+
xl: "size-8"
|
|
381
|
+
}
|
|
382
|
+
},
|
|
383
|
+
defaultVariants: {
|
|
384
|
+
size: "default"
|
|
385
|
+
}
|
|
386
|
+
});
|
|
387
|
+
function Spinner(_a) {
|
|
388
|
+
var _b = _a, { className, size } = _b, props = __objRest(_b, ["className", "size"]);
|
|
389
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
390
|
+
import_lucide_react3.LoaderCircle,
|
|
391
|
+
__spreadValues({
|
|
392
|
+
"aria-hidden": "true",
|
|
393
|
+
className: cn(spinnerVariants({ size }), className),
|
|
394
|
+
"data-slot": "spinner"
|
|
395
|
+
}, props)
|
|
396
|
+
);
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
// src/components/ui/textarea.tsx
|
|
400
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
401
|
+
function Textarea(_a) {
|
|
402
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
403
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
404
|
+
"textarea",
|
|
405
|
+
__spreadValues({
|
|
406
|
+
className: cn(
|
|
407
|
+
// WealthX: removed shadow-xs (flat panels), added font-sans
|
|
408
|
+
"flex field-sizing-content min-h-16 w-full border border-input bg-transparent px-3 py-2 text-body-medium font-sans transition-[color,box-shadow] outline-none placeholder:font-normal placeholder:text-muted-foreground focus-visible:border-primary focus-visible:ring-[3px] focus-visible:ring-primary/20 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:bg-input/30 dark:aria-invalid:ring-destructive/40",
|
|
409
|
+
className
|
|
410
|
+
),
|
|
411
|
+
"data-slot": "textarea"
|
|
412
|
+
}, props)
|
|
413
|
+
);
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
// src/components/ui/ai-assistant-drawer.tsx
|
|
417
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
418
|
+
function AiTypingIndicator() {
|
|
419
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "flex items-center gap-1 py-1", "aria-label": "AI is thinking", children: [0, 150, 300].map((delay) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
420
|
+
"span",
|
|
421
|
+
{
|
|
422
|
+
className: "size-1.5 rounded-full bg-current animate-bounce",
|
|
423
|
+
style: { animationDelay: `${delay}ms` },
|
|
424
|
+
"aria-hidden": "true"
|
|
425
|
+
},
|
|
426
|
+
delay
|
|
427
|
+
)) });
|
|
428
|
+
}
|
|
429
|
+
function AiChatBubble({ message }) {
|
|
430
|
+
const isUser = message.role === "user";
|
|
431
|
+
const isEmpty = !message.content.trim();
|
|
432
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
433
|
+
"div",
|
|
434
|
+
{
|
|
435
|
+
className: cn("flex w-full", isUser ? "justify-end" : "justify-start"),
|
|
436
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
437
|
+
"div",
|
|
438
|
+
{
|
|
439
|
+
className: cn(
|
|
440
|
+
"max-w-[85%] px-3 py-2 text-sm",
|
|
441
|
+
isUser ? "bg-primary text-primary-foreground" : "bg-muted text-foreground",
|
|
442
|
+
message.isErrored && "bg-destructive/10 text-destructive"
|
|
443
|
+
),
|
|
444
|
+
children: [
|
|
445
|
+
isEmpty && message.isStreaming ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(AiTypingIndicator, {}) : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "whitespace-pre-wrap break-words leading-relaxed", children: message.content }),
|
|
446
|
+
message.isErrored && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: "mt-1 text-xs opacity-70", children: "Failed to send. Please try again." })
|
|
447
|
+
]
|
|
448
|
+
}
|
|
449
|
+
)
|
|
450
|
+
}
|
|
451
|
+
);
|
|
452
|
+
}
|
|
453
|
+
function AiTaskCard({
|
|
454
|
+
suggestion,
|
|
455
|
+
onSelect
|
|
456
|
+
}) {
|
|
457
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
458
|
+
"button",
|
|
459
|
+
{
|
|
460
|
+
type: "button",
|
|
461
|
+
onClick: () => onSelect(suggestion.title),
|
|
462
|
+
className: "flex flex-col gap-1 border border-border bg-background p-3 text-left transition-colors hover:bg-muted/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
463
|
+
children: [
|
|
464
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "text-sm font-medium text-foreground", children: suggestion.title }),
|
|
465
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "text-xs text-muted-foreground", children: suggestion.description })
|
|
466
|
+
]
|
|
467
|
+
}
|
|
468
|
+
);
|
|
469
|
+
}
|
|
470
|
+
var DEFAULT_SUGGESTIONS = [
|
|
471
|
+
{
|
|
472
|
+
id: "s1",
|
|
473
|
+
title: "Update pricing strategy",
|
|
474
|
+
description: "Review and adjust pricing based on market trends"
|
|
475
|
+
},
|
|
476
|
+
{
|
|
477
|
+
id: "s2",
|
|
478
|
+
title: "Enhance marketing outreach",
|
|
479
|
+
description: "Develop new campaigns to increase customer engagement"
|
|
480
|
+
},
|
|
481
|
+
{
|
|
482
|
+
id: "s3",
|
|
483
|
+
title: "Optimise social media strategy",
|
|
484
|
+
description: "Analyse performance and adjust content for better visibility"
|
|
485
|
+
},
|
|
486
|
+
{
|
|
487
|
+
id: "s4",
|
|
488
|
+
title: "Implement customer feedback loops",
|
|
489
|
+
description: "Create mechanisms to collect and act on customer insights"
|
|
490
|
+
}
|
|
491
|
+
];
|
|
492
|
+
function AiAssistantDrawer({
|
|
493
|
+
open,
|
|
494
|
+
onClose,
|
|
495
|
+
opportunityName,
|
|
496
|
+
taskSuggestions,
|
|
497
|
+
messages = [],
|
|
498
|
+
isStreaming = false,
|
|
499
|
+
isLoading = false,
|
|
500
|
+
onSendMessage,
|
|
501
|
+
onReset,
|
|
502
|
+
className
|
|
503
|
+
}) {
|
|
504
|
+
var _a;
|
|
505
|
+
const [inputValue, setInputValue] = React3.useState("");
|
|
506
|
+
const messagesEndRef = React3.useRef(null);
|
|
507
|
+
const textareaRef = React3.useRef(null);
|
|
508
|
+
const suggestions = taskSuggestions != null ? taskSuggestions : DEFAULT_SUGGESTIONS;
|
|
509
|
+
const hasMessages = messages.length > 0;
|
|
510
|
+
const canSend = inputValue.trim().length > 0 && !isStreaming && !isLoading;
|
|
511
|
+
React3.useEffect(() => {
|
|
512
|
+
if (!messagesEndRef.current) return;
|
|
513
|
+
messagesEndRef.current.scrollIntoView({
|
|
514
|
+
behavior: "smooth",
|
|
515
|
+
block: "nearest"
|
|
516
|
+
});
|
|
517
|
+
}, [messages.length]);
|
|
518
|
+
React3.useEffect(() => {
|
|
519
|
+
const el = textareaRef.current;
|
|
520
|
+
if (!el) return;
|
|
521
|
+
el.style.height = "auto";
|
|
522
|
+
el.style.height = `${Math.min(el.scrollHeight, 120)}px`;
|
|
523
|
+
}, [inputValue]);
|
|
524
|
+
const handleSend = React3.useCallback(() => {
|
|
525
|
+
const text = inputValue.trim();
|
|
526
|
+
if (!text || !canSend) return;
|
|
527
|
+
onSendMessage == null ? void 0 : onSendMessage(text);
|
|
528
|
+
setInputValue("");
|
|
529
|
+
}, [inputValue, canSend, onSendMessage]);
|
|
530
|
+
const handleKeyDown = (e) => {
|
|
531
|
+
if (e.key === "Enter" && !e.shiftKey) {
|
|
532
|
+
e.preventDefault();
|
|
533
|
+
handleSend();
|
|
534
|
+
}
|
|
535
|
+
};
|
|
536
|
+
const handleSuggestionSelect = (text) => {
|
|
537
|
+
var _a2;
|
|
538
|
+
setInputValue(text);
|
|
539
|
+
(_a2 = textareaRef.current) == null ? void 0 : _a2.focus();
|
|
540
|
+
};
|
|
541
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Sheet, { open, onOpenChange: (o) => !o && onClose(), children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
542
|
+
SheetContent,
|
|
543
|
+
{
|
|
544
|
+
side: "right",
|
|
545
|
+
showCloseButton: false,
|
|
546
|
+
className: cn("w-[480px] max-w-full gap-0 p-0", className),
|
|
547
|
+
"data-slot": "ai-assistant-drawer",
|
|
548
|
+
children: [
|
|
549
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex items-center justify-between border-b border-border px-4 py-3", children: [
|
|
550
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
551
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "flex size-8 shrink-0 items-center justify-center rounded-full bg-primary", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react4.Bot, { className: "size-4 text-primary-foreground" }) }),
|
|
552
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex flex-col", children: [
|
|
553
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "text-sm font-semibold text-foreground", children: "AI Assistant" }),
|
|
554
|
+
opportunityName && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "text-xs text-muted-foreground", children: opportunityName })
|
|
555
|
+
] })
|
|
556
|
+
] }),
|
|
557
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex items-center gap-1", children: [
|
|
558
|
+
onReset && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
559
|
+
Button,
|
|
560
|
+
{
|
|
561
|
+
variant: "ghost",
|
|
562
|
+
size: "icon",
|
|
563
|
+
className: "size-8",
|
|
564
|
+
onClick: onReset,
|
|
565
|
+
title: "Reset conversation",
|
|
566
|
+
disabled: isLoading,
|
|
567
|
+
children: [
|
|
568
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react4.RotateCcw, { className: "size-4" }),
|
|
569
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "sr-only", children: "Reset conversation" })
|
|
570
|
+
]
|
|
571
|
+
}
|
|
572
|
+
),
|
|
573
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
574
|
+
Button,
|
|
575
|
+
{
|
|
576
|
+
variant: "ghost",
|
|
577
|
+
size: "icon",
|
|
578
|
+
className: "size-8",
|
|
579
|
+
onClick: onClose,
|
|
580
|
+
title: "Close",
|
|
581
|
+
children: [
|
|
582
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react4.X, { className: "size-4" }),
|
|
583
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "sr-only", children: "Close" })
|
|
584
|
+
]
|
|
585
|
+
}
|
|
586
|
+
)
|
|
587
|
+
] })
|
|
588
|
+
] }),
|
|
589
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "flex flex-1 flex-col overflow-y-auto", children: isLoading ? (
|
|
590
|
+
/* Loading state */
|
|
591
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "flex flex-1 items-center justify-center py-20", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex flex-col items-center gap-3", children: [
|
|
592
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Spinner, { size: "lg", className: "text-muted-foreground" }),
|
|
593
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: "text-sm text-muted-foreground", children: "Initialising\u2026" })
|
|
594
|
+
] }) })
|
|
595
|
+
) : !hasMessages ? (
|
|
596
|
+
/* Empty / welcome state */
|
|
597
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex flex-col gap-6 p-4", children: [
|
|
598
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex flex-col gap-3 border border-border bg-muted/30 p-4", children: [
|
|
599
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(Badge, { variant: "outline", className: "w-fit gap-1.5", children: [
|
|
600
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
601
|
+
"span",
|
|
602
|
+
{
|
|
603
|
+
className: "size-1.5 rounded-full bg-primary",
|
|
604
|
+
"aria-hidden": "true"
|
|
605
|
+
}
|
|
606
|
+
),
|
|
607
|
+
"AI Chat for Brokers"
|
|
608
|
+
] }),
|
|
609
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: "text-sm text-muted-foreground", children: "A safe and secure way to chat about insights that run your business and utilise AI. All chats stay within your environment, all closed off and compliant." }),
|
|
610
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "flex gap-2", children: [
|
|
611
|
+
{ emoji: "\u{1F916}", label: "Smart" },
|
|
612
|
+
{ emoji: "\u26A1", label: "Fast" },
|
|
613
|
+
{ emoji: "\u{1F512}", label: "Secure" }
|
|
614
|
+
].map(({ emoji, label }) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
615
|
+
"span",
|
|
616
|
+
{
|
|
617
|
+
className: "border border-border px-2.5 py-1 text-xs text-foreground",
|
|
618
|
+
children: [
|
|
619
|
+
emoji,
|
|
620
|
+
" ",
|
|
621
|
+
label
|
|
622
|
+
]
|
|
623
|
+
},
|
|
624
|
+
label
|
|
625
|
+
)) })
|
|
626
|
+
] }),
|
|
627
|
+
suggestions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
628
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: "text-xs font-medium text-muted-foreground", children: "Suggested tasks" }),
|
|
629
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "grid grid-cols-2 gap-2", children: suggestions.map((s) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
630
|
+
AiTaskCard,
|
|
631
|
+
{
|
|
632
|
+
suggestion: s,
|
|
633
|
+
onSelect: handleSuggestionSelect
|
|
634
|
+
},
|
|
635
|
+
s.id
|
|
636
|
+
)) })
|
|
637
|
+
] })
|
|
638
|
+
] })
|
|
639
|
+
) : (
|
|
640
|
+
/* Message list */
|
|
641
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex flex-col gap-3 p-4", children: [
|
|
642
|
+
messages.map((msg) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(AiChatBubble, { message: msg }, msg.id)),
|
|
643
|
+
isStreaming && ((_a = messages[messages.length - 1]) == null ? void 0 : _a.role) === "user" && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "flex justify-start", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "bg-muted px-3 py-2 text-muted-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(AiTypingIndicator, {}) }) }),
|
|
644
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { ref: messagesEndRef })
|
|
645
|
+
] })
|
|
646
|
+
) }),
|
|
647
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "border-t border-border p-3", children: [
|
|
648
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex items-end gap-2", children: [
|
|
649
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
650
|
+
Textarea,
|
|
651
|
+
{
|
|
652
|
+
ref: textareaRef,
|
|
653
|
+
value: inputValue,
|
|
654
|
+
onChange: (e) => setInputValue(e.target.value),
|
|
655
|
+
onKeyDown: handleKeyDown,
|
|
656
|
+
placeholder: "Ask me anything\u2026 (Enter to send, Shift+Enter for new line)",
|
|
657
|
+
rows: 1,
|
|
658
|
+
disabled: isLoading,
|
|
659
|
+
className: "min-h-0 flex-1 resize-none overflow-hidden py-2 text-sm"
|
|
660
|
+
}
|
|
661
|
+
),
|
|
662
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
663
|
+
Button,
|
|
664
|
+
{
|
|
665
|
+
size: "icon",
|
|
666
|
+
onClick: handleSend,
|
|
667
|
+
disabled: !canSend,
|
|
668
|
+
className: "shrink-0",
|
|
669
|
+
title: "Send",
|
|
670
|
+
children: [
|
|
671
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react4.Send, { className: "size-4" }),
|
|
672
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "sr-only", children: "Send message" })
|
|
673
|
+
]
|
|
674
|
+
}
|
|
675
|
+
)
|
|
676
|
+
] }),
|
|
677
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: "mt-1.5 text-[10px] text-muted-foreground", children: "Enter to send \xB7 Shift+Enter for new line" })
|
|
678
|
+
] })
|
|
679
|
+
]
|
|
680
|
+
}
|
|
681
|
+
) });
|
|
682
|
+
}
|
|
683
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
684
|
+
0 && (module.exports = {
|
|
685
|
+
AiAssistantDrawer
|
|
686
|
+
});
|