@wealthx/shadcn 1.3.2 → 1.3.3
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 +262 -226
- package/CHANGELOG.md +6 -0
- package/dist/{chunk-2UM72RJ7.mjs → chunk-2D3HQPFN.mjs} +12 -10
- package/dist/chunk-2EM2FRU6.mjs +613 -0
- package/dist/{chunk-FH6QVUVZ.mjs → chunk-2GIYVERS.mjs} +2 -2
- package/dist/chunk-2P7HP7LR.mjs +68 -0
- package/dist/{chunk-HISNT2MG.mjs → chunk-37AE3OM5.mjs} +5 -5
- package/dist/{chunk-HBZLGDIN.mjs → chunk-3ERBUVHC.mjs} +169 -110
- package/dist/{chunk-C7CQJNMR.mjs → chunk-3VDET466.mjs} +2 -2
- package/dist/{chunk-462HMNO4.mjs → chunk-4MM7LHM5.mjs} +2 -2
- package/dist/{chunk-QMY3AZJH.mjs → chunk-4Z66LMIQ.mjs} +2 -2
- package/dist/{chunk-U5X52X37.mjs → chunk-57ZXILTS.mjs} +6 -6
- package/dist/{chunk-3OYFOX3X.mjs → chunk-5VOTTIXF.mjs} +2 -2
- package/dist/{chunk-LBMRIB3G.mjs → chunk-6AJUS7VX.mjs} +1 -1
- package/dist/{chunk-OODBHKG7.mjs → chunk-6HIOM2HL.mjs} +7 -4
- package/dist/{chunk-BDYZCBRT.mjs → chunk-6QAFGZC2.mjs} +2 -2
- package/dist/{chunk-U4NDAF2P.mjs → chunk-6TX73WG7.mjs} +1 -1
- package/dist/{chunk-GD4BJDJR.mjs → chunk-7BTFGCFC.mjs} +4 -4
- package/dist/{chunk-FAKPBKLT.mjs → chunk-7GWRPXHD.mjs} +4 -4
- package/dist/{chunk-NMOI6CQD.mjs → chunk-7YI3HEBH.mjs} +5 -5
- package/dist/{chunk-T4BJLT57.mjs → chunk-AE7MASLF.mjs} +5 -5
- package/dist/{chunk-VLQZANBF.mjs → chunk-AFML43VJ.mjs} +6 -1
- package/dist/chunk-BBXSNDS3.mjs +260 -0
- package/dist/chunk-BOW7U26Y.mjs +203 -0
- package/dist/{chunk-34NWQURD.mjs → chunk-BS75ICOO.mjs} +2 -2
- package/dist/chunk-D2NSIIXG.mjs +394 -0
- package/dist/{chunk-3GF7OVTP.mjs → chunk-DGNHGNYH.mjs} +2 -2
- package/dist/{chunk-VLARHE5V.mjs → chunk-DMXYRCHM.mjs} +6 -6
- package/dist/{chunk-OGOYQ7BG.mjs → chunk-DQB4EPIS.mjs} +1 -1
- package/dist/{chunk-MIZQHHUO.mjs → chunk-FL6DZFJK.mjs} +106 -38
- package/dist/{chunk-I3RZS7V2.mjs → chunk-FLL633WS.mjs} +19 -33
- package/dist/{chunk-PBL4OQV2.mjs → chunk-FTPBQVQ6.mjs} +4 -4
- package/dist/chunk-FYPSTTEJ.mjs +169 -0
- package/dist/{chunk-6O6KD7CE.mjs → chunk-G27TSQLQ.mjs} +6 -6
- package/dist/{chunk-66MI7Q4B.mjs → chunk-GT3RU6GA.mjs} +2 -2
- package/dist/{chunk-D6ID6M4V.mjs → chunk-GTAVSBDO.mjs} +2 -2
- package/dist/{chunk-24FUO7TD.mjs → chunk-H6NQTIF4.mjs} +2 -2
- package/dist/{chunk-7DHU4VGG.mjs → chunk-HK4HUQTV.mjs} +2 -2
- package/dist/chunk-I4KVSZCH.mjs +101 -0
- package/dist/{chunk-RGVKLTLH.mjs → chunk-IKXYTCSB.mjs} +2 -2
- package/dist/{chunk-Y6DWJSKZ.mjs → chunk-ISUA7DSB.mjs} +1 -1
- package/dist/{chunk-2A5RRQGG.mjs → chunk-JD3YWRNP.mjs} +10 -14
- package/dist/{chunk-J5UICVJS.mjs → chunk-JPGL36WQ.mjs} +2 -2
- package/dist/{chunk-7XJHLGUV.mjs → chunk-JTK6VJXY.mjs} +2 -2
- package/dist/{chunk-7YAU5CY6.mjs → chunk-JVMXMFBB.mjs} +2 -2
- package/dist/{chunk-IAE3F7DR.mjs → chunk-JZY6TNIS.mjs} +21 -21
- package/dist/{chunk-K5A5L6T2.mjs → chunk-K4KOD3KR.mjs} +12 -12
- package/dist/{chunk-MBON7YRJ.mjs → chunk-K5QV4TT6.mjs} +3 -3
- package/dist/{chunk-IHMFS7NZ.mjs → chunk-K5VHK7CM.mjs} +21 -21
- package/dist/{chunk-RJI6GKVF.mjs → chunk-KCWNDYPZ.mjs} +5 -5
- package/dist/{chunk-UFYSFDER.mjs → chunk-KFH36NKF.mjs} +1 -1
- package/dist/{chunk-EBXQWIYG.mjs → chunk-KLTACJ2G.mjs} +5 -5
- package/dist/{chunk-3TTACBDP.mjs → chunk-KWD6GANL.mjs} +4 -4
- package/dist/{chunk-IOJRDS6V.mjs → chunk-L4NSRQ3T.mjs} +218 -147
- package/dist/{chunk-GYMYRIZP.mjs → chunk-LBTHZSBT.mjs} +2 -2
- package/dist/{chunk-AMQZRHEZ.mjs → chunk-LQULK2E3.mjs} +5 -5
- package/dist/{chunk-YJG55G2H.mjs → chunk-LR6LHDP3.mjs} +5 -5
- package/dist/{chunk-7PV3IWCN.mjs → chunk-M4VYX2PV.mjs} +19 -1
- package/dist/{chunk-P76HMUI6.mjs → chunk-MDUKXXIL.mjs} +2 -2
- package/dist/{chunk-LV35NGVG.mjs → chunk-N6Q5IPKT.mjs} +9 -9
- package/dist/{chunk-DOEO3CDL.mjs → chunk-NB3ZL36B.mjs} +1 -1
- package/dist/{chunk-XREGSKX3.mjs → chunk-NOOEKOWY.mjs} +5 -5
- package/dist/{chunk-NL3ZO62D.mjs → chunk-NT4FX27K.mjs} +1 -1
- package/dist/{chunk-QZ4RE6NA.mjs → chunk-NTYQWVLI.mjs} +6 -6
- package/dist/{chunk-ERGGHC2V.mjs → chunk-OEOOYMC2.mjs} +2 -2
- package/dist/{chunk-4GAWMKMI.mjs → chunk-OIKBW2QD.mjs} +291 -54
- package/dist/{chunk-DUJTAXMH.mjs → chunk-OKTJFDPN.mjs} +6 -6
- package/dist/chunk-OLKMCXAR.mjs +1219 -0
- package/dist/{chunk-EI5F6FMT.mjs → chunk-OWFQSXVD.mjs} +3 -3
- package/dist/{chunk-6DZEXFNB.mjs → chunk-P2N2PEFY.mjs} +3 -3
- package/dist/{chunk-NSLMILBT.mjs → chunk-P7CEBZM6.mjs} +2 -2
- package/dist/{chunk-7S5AESZO.mjs → chunk-PNRUH7JY.mjs} +6 -6
- package/dist/{chunk-ZU4NV6RG.mjs → chunk-PNSYFE3K.mjs} +2 -2
- package/dist/{chunk-JKGDCQTZ.mjs → chunk-QTRSCVQ3.mjs} +5 -5
- package/dist/{chunk-ABFDMHOR.mjs → chunk-QX7IFQSF.mjs} +5 -5
- package/dist/{chunk-CFMQP5QS.mjs → chunk-QXKGOMUX.mjs} +6 -6
- package/dist/{chunk-NQPOYKAQ.mjs → chunk-R2ON6CAN.mjs} +2 -2
- package/dist/{chunk-DBHJ5KC3.mjs → chunk-R4HCRDU5.mjs} +1 -1
- package/dist/{chunk-EWRB4PAD.mjs → chunk-RCAOCHWA.mjs} +14 -14
- package/dist/{chunk-EFRENWEJ.mjs → chunk-RSUIPKGX.mjs} +2 -2
- package/dist/{chunk-DGHAXJBN.mjs → chunk-S2FKV4M5.mjs} +5 -5
- package/dist/{chunk-RGU7HOEC.mjs → chunk-SET2ANTY.mjs} +5 -7
- package/dist/chunk-SFH2NJEJ.mjs +47 -0
- package/dist/{chunk-6AW4KJHE.mjs → chunk-SIVYAI3M.mjs} +12 -12
- package/dist/{chunk-5FQIKDKP.mjs → chunk-THVO2N47.mjs} +8 -8
- package/dist/{chunk-JMHR3YGZ.mjs → chunk-TLAWKTSA.mjs} +3 -3
- package/dist/{chunk-HVY6KCCF.mjs → chunk-TOWTPLRC.mjs} +68 -72
- package/dist/{chunk-6JQFUE5I.mjs → chunk-UALR6JGV.mjs} +2 -2
- package/dist/{chunk-N6TNTQL6.mjs → chunk-UJZ4UHWI.mjs} +9 -11
- package/dist/{chunk-MARPPFOJ.mjs → chunk-UNACI2YK.mjs} +2 -2
- package/dist/{chunk-3NCUZIFP.mjs → chunk-V6XGXYCJ.mjs} +7 -7
- package/dist/chunk-VB5M6OZQ.mjs +57 -0
- package/dist/{chunk-5IS7G74I.mjs → chunk-VY5NEUP7.mjs} +6 -6
- package/dist/{chunk-JHJHG4GO.mjs → chunk-WE4YKBDE.mjs} +2 -2
- package/dist/{chunk-BKNFWEH2.mjs → chunk-WL6WVV47.mjs} +3 -3
- package/dist/{chunk-FWCSY2DS.mjs → chunk-WNQUEZJF.mjs} +22 -1
- package/dist/{chunk-2Y7YJKPE.mjs → chunk-WZ6UJCBL.mjs} +1 -1
- package/dist/{chunk-UMTOX62O.mjs → chunk-XYPW2XA5.mjs} +13 -10
- package/dist/chunk-Y2MTAVAK.mjs +34 -0
- package/dist/{chunk-6CR5N2JW.mjs → chunk-YCWLFG27.mjs} +6 -6
- package/dist/{chunk-PU4YZQXV.mjs → chunk-YE67AALL.mjs} +12 -12
- package/dist/{chunk-M3FV7LOK.mjs → chunk-YEWNFK5S.mjs} +6 -1
- package/dist/{chunk-R3VSPKNP.mjs → chunk-YIZHS72Z.mjs} +11 -12
- package/dist/{chunk-7PYJD5JI.mjs → chunk-ZEDMKQK2.mjs} +2 -2
- package/dist/{chunk-N2PT566P.mjs → chunk-ZFCDYW6N.mjs} +4 -4
- package/dist/chunk-ZGQIVGIN.mjs +57 -0
- package/dist/{chunk-Q2BGOAMG.mjs → chunk-ZKWXDQDG.mjs} +4 -4
- package/dist/{chunk-GHC7LLUX.mjs → chunk-ZOWL2L5J.mjs} +5 -5
- package/dist/components/ui/accordion.mjs +3 -3
- package/dist/components/ui/add-column-modal.js +2 -2
- package/dist/components/ui/add-column-modal.mjs +10 -10
- package/dist/components/ui/add-lead-modal.js +424 -82
- package/dist/components/ui/add-lead-modal.mjs +12 -9
- package/dist/components/ui/advisor-card.js +2 -2
- package/dist/components/ui/advisor-card.mjs +8 -8
- package/dist/components/ui/ai-assistant-drawer.js +2 -2
- package/dist/components/ui/ai-assistant-drawer.mjs +9 -9
- package/dist/components/ui/ai-builder.js +958 -0
- package/dist/components/ui/ai-builder.mjs +25 -0
- package/dist/components/ui/ai-conversations.js +2045 -0
- package/dist/components/ui/ai-conversations.mjs +41 -0
- package/dist/components/ui/alert-dialog.js +2 -2
- package/dist/components/ui/alert-dialog.mjs +5 -5
- package/dist/components/ui/alert.mjs +3 -3
- package/dist/components/ui/appointment-action-dialogs.js +19 -3
- package/dist/components/ui/appointment-action-dialogs.mjs +15 -14
- package/dist/components/ui/appointment-availability-settings.js +181 -111
- package/dist/components/ui/appointment-availability-settings.mjs +20 -18
- package/dist/components/ui/appointment-book-dialog.js +113 -24
- package/dist/components/ui/appointment-book-dialog.mjs +21 -20
- package/dist/components/ui/appointment-calendar-view.js +19 -3
- package/dist/components/ui/appointment-calendar-view.mjs +10 -9
- package/dist/components/ui/appointment-detail-sheet.js +19 -3
- package/dist/components/ui/appointment-detail-sheet.mjs +18 -17
- package/dist/components/ui/appointment-gmail-connect.js +49 -89
- package/dist/components/ui/appointment-gmail-connect.mjs +8 -9
- package/dist/components/ui/appointment-mini-card.js +2 -2
- package/dist/components/ui/appointment-mini-card.mjs +6 -6
- package/dist/components/ui/appointment-time-slot-picker.mjs +6 -6
- package/dist/components/ui/appointment-upcoming-card.js +19 -3
- package/dist/components/ui/appointment-upcoming-card.mjs +15 -14
- package/dist/components/ui/auth-logo.js +95 -0
- package/dist/components/ui/auth-logo.mjs +8 -0
- package/dist/components/ui/auth-page-layout.js +108 -0
- package/dist/components/ui/auth-page-layout.mjs +8 -0
- package/dist/components/ui/avatar.mjs +3 -3
- package/dist/components/ui/backoffice-alert-history-chart.js +2 -2
- package/dist/components/ui/backoffice-alert-history-chart.mjs +9 -9
- package/dist/components/ui/backoffice-alerts-chart.js +2 -2
- package/dist/components/ui/backoffice-alerts-chart.mjs +11 -11
- package/dist/components/ui/backoffice-connections-chart.js +2 -2
- package/dist/components/ui/backoffice-connections-chart.mjs +11 -11
- package/dist/components/ui/backoffice-contact-history-chart.js +2 -2
- package/dist/components/ui/backoffice-contact-history-chart.mjs +9 -9
- package/dist/components/ui/badge.mjs +4 -4
- package/dist/components/ui/borrowing-capacity-line-chart.js +145 -132
- package/dist/components/ui/borrowing-capacity-line-chart.mjs +9 -9
- package/dist/components/ui/button.js +2 -2
- package/dist/components/ui/button.mjs +4 -4
- package/dist/components/ui/calendar.js +17 -3
- package/dist/components/ui/calendar.mjs +6 -5
- package/dist/components/ui/card.mjs +3 -3
- package/dist/components/ui/cash-balance-line-chart.js +157 -152
- package/dist/components/ui/cash-balance-line-chart.mjs +9 -9
- package/dist/components/ui/cashflow-bar-chart.js +2 -2
- package/dist/components/ui/cashflow-bar-chart.mjs +9 -9
- package/dist/components/ui/chat-widget-primitives.js +573 -0
- package/dist/components/ui/chat-widget-primitives.mjs +21 -0
- package/dist/components/ui/chat-widget.js +1268 -0
- package/dist/components/ui/chat-widget.mjs +29 -0
- package/dist/components/ui/checkbox.mjs +3 -3
- package/dist/components/ui/chip.js +2 -2
- package/dist/components/ui/chip.mjs +6 -6
- package/dist/components/ui/color-picker.js +2 -2
- package/dist/components/ui/color-picker.mjs +7 -7
- package/dist/components/ui/combobox.mjs +3 -3
- package/dist/components/ui/data-table.js +2 -2
- package/dist/components/ui/data-table.mjs +12 -12
- package/dist/components/ui/date-picker.js +22 -6
- package/dist/components/ui/date-picker.mjs +9 -8
- package/dist/components/ui/dialog.js +2 -2
- package/dist/components/ui/dialog.mjs +5 -5
- package/dist/components/ui/document-checklist-template.js +630 -0
- package/dist/components/ui/document-checklist-template.mjs +15 -0
- package/dist/components/ui/drawer.js +2 -2
- package/dist/components/ui/drawer.mjs +3 -3
- package/dist/components/ui/dropdown-menu.mjs +3 -3
- package/dist/components/ui/empty.mjs +3 -3
- package/dist/components/ui/expense-bar-chart.js +2 -2
- package/dist/components/ui/expense-bar-chart.mjs +9 -9
- package/dist/components/ui/field.mjs +5 -5
- package/dist/components/ui/financial-cards.js +431 -291
- package/dist/components/ui/financial-cards.mjs +10 -9
- package/dist/components/ui/financial-drawers.js +4 -4
- package/dist/components/ui/financial-drawers.mjs +8 -8
- package/dist/components/ui/financial-primitives.mjs +3 -3
- package/dist/components/ui/financial-sections.js +8 -9
- package/dist/components/ui/financial-sections.mjs +12 -12
- package/dist/components/ui/form-primitives.mjs +8 -8
- package/dist/components/ui/income-bar-chart.js +2 -2
- package/dist/components/ui/income-bar-chart.mjs +9 -9
- package/dist/components/ui/input-group.js +2 -2
- package/dist/components/ui/input-group.mjs +7 -7
- package/dist/components/ui/input-otp.mjs +3 -3
- package/dist/components/ui/input.mjs +3 -3
- package/dist/components/ui/kanban-column.js +19 -23
- package/dist/components/ui/kanban-column.mjs +14 -14
- package/dist/components/ui/label.mjs +3 -3
- package/dist/components/ui/onboarding-layout.js +476 -0
- package/dist/components/ui/onboarding-layout.mjs +11 -0
- package/dist/components/ui/opportunity-card.js +2 -2
- package/dist/components/ui/opportunity-card.mjs +12 -12
- package/dist/components/ui/opportunity-edit-modals.js +22 -6
- package/dist/components/ui/opportunity-edit-modals.mjs +21 -20
- package/dist/components/ui/opportunity-summary-tab.js +991 -674
- package/dist/components/ui/opportunity-summary-tab.mjs +26 -26
- package/dist/components/ui/page-header.mjs +3 -3
- package/dist/components/ui/page-top-bar.mjs +3 -3
- package/dist/components/ui/pagination.js +2 -2
- package/dist/components/ui/pagination.mjs +6 -6
- package/dist/components/ui/password-strength-tooltip.js +197 -0
- package/dist/components/ui/password-strength-tooltip.mjs +11 -0
- package/dist/components/ui/pipeline-alerts.mjs +3 -3
- package/dist/components/ui/pipeline-board.js +19 -23
- package/dist/components/ui/pipeline-board.mjs +18 -18
- package/dist/components/ui/pipeline-chart.js +12 -6
- package/dist/components/ui/pipeline-chart.mjs +4 -3
- package/dist/components/ui/pipeline-dialogs.js +28 -12
- package/dist/components/ui/pipeline-dialogs.mjs +14 -13
- package/dist/components/ui/pipeline-primitives.mjs +6 -6
- package/dist/components/ui/popover.mjs +3 -3
- package/dist/components/ui/progress.mjs +3 -3
- package/dist/components/ui/property-cashflow-doughnut-chart.js +2 -2
- package/dist/components/ui/property-cashflow-doughnut-chart.mjs +9 -9
- package/dist/components/ui/property-debt-equity-doughnut-chart.js +2 -2
- package/dist/components/ui/property-debt-equity-doughnut-chart.mjs +9 -9
- package/dist/components/ui/property-mobile-estimate-line-chart.js +2 -2
- package/dist/components/ui/property-mobile-estimate-line-chart.mjs +9 -9
- package/dist/components/ui/radio-group.mjs +3 -3
- package/dist/components/ui/select.mjs +3 -3
- package/dist/components/ui/separator.mjs +3 -3
- package/dist/components/ui/sheet.mjs +3 -3
- package/dist/components/ui/sidebar-nav.js +6 -5
- package/dist/components/ui/sidebar-nav.mjs +7 -7
- package/dist/components/ui/skeleton.mjs +3 -3
- package/dist/components/ui/slider.mjs +3 -3
- package/dist/components/ui/sonner.mjs +2 -2
- package/dist/components/ui/spinner.mjs +3 -3
- package/dist/components/ui/stage-timeline.mjs +10 -10
- package/dist/components/ui/stepper.mjs +3 -3
- package/dist/components/ui/switch.mjs +3 -3
- package/dist/components/ui/table.mjs +3 -3
- package/dist/components/ui/tabs.mjs +3 -3
- package/dist/components/ui/textarea.mjs +3 -3
- package/dist/components/ui/toggle-group.mjs +4 -4
- package/dist/components/ui/toggle.mjs +3 -3
- package/dist/components/ui/tooltip.mjs +3 -3
- package/dist/components/ui/transactions-expense-categories-doughnut-chart.js +2 -2
- package/dist/components/ui/transactions-expense-categories-doughnut-chart.mjs +9 -9
- package/dist/components/ui/transactions-income-expense-bar-chart.js +2 -2
- package/dist/components/ui/transactions-income-expense-bar-chart.mjs +9 -9
- package/dist/components/ui/transactions-liabilities-breakdown-doughnut-chart.js +2 -2
- package/dist/components/ui/transactions-liabilities-breakdown-doughnut-chart.mjs +9 -9
- package/dist/components/ui/two-fa-setup-form.js +612 -0
- package/dist/components/ui/two-fa-setup-form.mjs +16 -0
- package/dist/components/ui/upload-card.js +187 -0
- package/dist/components/ui/upload-card.mjs +10 -0
- package/dist/components/ui/video-background.js +118 -0
- package/dist/components/ui/video-background.mjs +8 -0
- package/dist/index.js +12764 -9396
- package/dist/index.mjs +341 -245
- package/dist/lib/colors.mjs +1 -1
- package/dist/lib/theme-provider.mjs +1 -1
- package/dist/lib/typography.mjs +2 -2
- package/dist/lib/utils.js +8 -2
- package/dist/lib/utils.mjs +6 -4
- package/dist/styles.css +1 -1
- package/package.json +61 -1
- package/src/components/index.tsx +126 -1
- package/src/components/ui/add-lead-modal.tsx +101 -142
- package/src/components/ui/ai-builder.tsx +560 -0
- package/src/components/ui/ai-conversations.tsx +1690 -0
- package/src/components/ui/appointment-availability-settings.tsx +152 -101
- package/src/components/ui/appointment-book-dialog.tsx +138 -24
- package/src/components/ui/appointment-calendar-view.tsx +2 -3
- package/src/components/ui/appointment-gmail-connect.tsx +23 -42
- package/src/components/ui/auth-logo.tsx +50 -0
- package/src/components/ui/auth-page-layout.tsx +59 -0
- package/src/components/ui/borrowing-capacity-line-chart.tsx +10 -8
- package/src/components/ui/button.tsx +2 -2
- package/src/components/ui/calendar.tsx +2 -1
- package/src/components/ui/cash-balance-line-chart.tsx +10 -14
- package/src/components/ui/chart-shared.tsx +10 -0
- package/src/components/ui/chat-widget-primitives.tsx +336 -0
- package/src/components/ui/chat-widget.tsx +822 -0
- package/src/components/ui/document-checklist-template.tsx +264 -0
- package/src/components/ui/drawer.tsx +2 -2
- package/src/components/ui/financial-cards.tsx +176 -78
- package/src/components/ui/financial-drawers.tsx +2 -2
- package/src/components/ui/financial-sections.tsx +1 -1
- package/src/components/ui/kanban-column.tsx +2 -5
- package/src/components/ui/onboarding-layout.tsx +109 -0
- package/src/components/ui/opportunity-summary-tab.tsx +469 -142
- package/src/components/ui/password-strength-tooltip.tsx +70 -0
- package/src/components/ui/pipeline-chart.tsx +2 -6
- package/src/components/ui/sidebar-nav.tsx +1 -11
- package/src/components/ui/two-fa-setup-form.tsx +229 -0
- package/src/components/ui/upload-card.tsx +98 -0
- package/src/components/ui/video-background.tsx +55 -0
- package/src/lib/format-date.ts +26 -0
- package/src/lib/utils.ts +11 -0
- package/src/styles/styles-css.ts +1 -1
- package/tsup.config.ts +13 -0
|
@@ -12,17 +12,19 @@ import {
|
|
|
12
12
|
} from "chart.js";
|
|
13
13
|
import { Chart } from "react-chartjs-2";
|
|
14
14
|
import { useThemeVars } from "@/lib/theme-provider";
|
|
15
|
-
import { Card, CardContent, CardHeader, CardTitle } from "./card";
|
|
16
|
-
import { Empty, EmptyDescription } from "./empty";
|
|
17
|
-
import { Spinner } from "./spinner";
|
|
18
|
-
import { cn } from "@/lib/utils";
|
|
19
15
|
import {
|
|
20
16
|
FALLBACK_TICK,
|
|
21
17
|
FALLBACK_PRIMARY,
|
|
22
18
|
FALLBACK_BG,
|
|
23
19
|
ChartLegendItem,
|
|
24
20
|
formatAbbrev,
|
|
21
|
+
formatChartDateLabel,
|
|
22
|
+
formatTooltipDate,
|
|
25
23
|
} from "./chart-shared";
|
|
24
|
+
import { Card, CardContent, CardHeader, CardTitle } from "./card";
|
|
25
|
+
import { Empty, EmptyDescription } from "./empty";
|
|
26
|
+
import { Spinner } from "./spinner";
|
|
27
|
+
import { cn } from "@/lib/utils";
|
|
26
28
|
import { formatCurrency } from "@/lib/format-currency";
|
|
27
29
|
|
|
28
30
|
ChartJS.register(
|
|
@@ -38,20 +40,14 @@ ChartJS.register(
|
|
|
38
40
|
// Helpers
|
|
39
41
|
// ---------------------------------------------------------------------------
|
|
40
42
|
|
|
41
|
-
/** Format ISO date string to "
|
|
43
|
+
/** Format ISO date string to "Jan 15" label — delegates to chart-shared. */
|
|
42
44
|
function formatDateLabel(iso: string): string {
|
|
43
|
-
|
|
44
|
-
return d.toLocaleDateString("en-US", { month: "short", day: "numeric" });
|
|
45
|
+
return formatChartDateLabel(iso);
|
|
45
46
|
}
|
|
46
47
|
|
|
47
|
-
/** Format ISO date string for tooltip
|
|
48
|
+
/** Format ISO date string for tooltip "Jan 15, 2024" — delegates to chart-shared. */
|
|
48
49
|
function formatDateTooltip(iso: string): string {
|
|
49
|
-
|
|
50
|
-
return d.toLocaleDateString("en-US", {
|
|
51
|
-
month: "short",
|
|
52
|
-
day: "numeric",
|
|
53
|
-
year: "numeric",
|
|
54
|
-
});
|
|
50
|
+
return formatTooltipDate(iso, "daily");
|
|
55
51
|
}
|
|
56
52
|
|
|
57
53
|
// ---------------------------------------------------------------------------
|
|
@@ -96,6 +96,16 @@ export const SEVERITY_COLORS = {
|
|
|
96
96
|
import { formatCurrencyAbbrev as formatAbbrev } from "@/lib/format-currency";
|
|
97
97
|
export { formatAbbrev };
|
|
98
98
|
|
|
99
|
+
// ---------------------------------------------------------------------------
|
|
100
|
+
// Chart date label — "Jan 15" for x-axis tick labels (daily charts)
|
|
101
|
+
// ---------------------------------------------------------------------------
|
|
102
|
+
|
|
103
|
+
/** Format an ISO date string as "Jan 15" for daily-chart x-axis labels. */
|
|
104
|
+
export function formatChartDateLabel(iso: string): string {
|
|
105
|
+
const d = new Date(iso);
|
|
106
|
+
return d.toLocaleDateString("en-US", { month: "short", day: "numeric" });
|
|
107
|
+
}
|
|
108
|
+
|
|
99
109
|
// ---------------------------------------------------------------------------
|
|
100
110
|
// Tooltip date format
|
|
101
111
|
// ---------------------------------------------------------------------------
|
|
@@ -0,0 +1,336 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import {
|
|
3
|
+
Bot,
|
|
4
|
+
UserRound,
|
|
5
|
+
MessageCircle,
|
|
6
|
+
X,
|
|
7
|
+
ChevronDown,
|
|
8
|
+
Send,
|
|
9
|
+
Smile,
|
|
10
|
+
Paperclip,
|
|
11
|
+
} from "lucide-react";
|
|
12
|
+
import { cn } from "@/lib/utils";
|
|
13
|
+
import { Avatar, AvatarFallback } from "@/components/ui/avatar";
|
|
14
|
+
import { Badge } from "@/components/ui/badge";
|
|
15
|
+
import { Button } from "@/components/ui/button";
|
|
16
|
+
import { Input } from "@/components/ui/input";
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* ChatWidget Primitives — WealthX DS (Atoms)
|
|
20
|
+
*
|
|
21
|
+
* Atomic building blocks for the embeddable broker website chat widget.
|
|
22
|
+
* All atoms are pure display components — no API calls, no state beyond local UI.
|
|
23
|
+
*
|
|
24
|
+
* Exports:
|
|
25
|
+
* ChatWidgetLauncher — Floating action button (open/close)
|
|
26
|
+
* ChatWidgetHeader — Gradient branded header
|
|
27
|
+
* ChatWidgetMessage — Message bubble (bot | user | system)
|
|
28
|
+
* ChatWidgetTypingIndicator — Animated 3-dot indicator
|
|
29
|
+
* ChatWidgetInputBar — Footer input with emoji/attachment/send
|
|
30
|
+
*/
|
|
31
|
+
|
|
32
|
+
// ---------------------------------------------------------------------------
|
|
33
|
+
// ChatWidgetLauncher
|
|
34
|
+
// ---------------------------------------------------------------------------
|
|
35
|
+
|
|
36
|
+
export interface ChatWidgetLauncherProps {
|
|
37
|
+
/** Whether the chat window is currently open. */
|
|
38
|
+
isOpen: boolean;
|
|
39
|
+
onClick: () => void;
|
|
40
|
+
/** Primary brand color for the button background. Defaults to var(--primary). */
|
|
41
|
+
brandColor?: string;
|
|
42
|
+
/** Number of unread messages — shows a red badge when > 0 and chat is closed. */
|
|
43
|
+
unreadCount?: number;
|
|
44
|
+
className?: string;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export function ChatWidgetLauncher({
|
|
48
|
+
isOpen,
|
|
49
|
+
onClick,
|
|
50
|
+
brandColor,
|
|
51
|
+
unreadCount,
|
|
52
|
+
className,
|
|
53
|
+
}: ChatWidgetLauncherProps) {
|
|
54
|
+
return (
|
|
55
|
+
<button
|
|
56
|
+
type="button"
|
|
57
|
+
aria-label={isOpen ? "Close chat" : "Open chat"}
|
|
58
|
+
onClick={onClick}
|
|
59
|
+
className={cn(
|
|
60
|
+
"relative flex size-14 items-center justify-center shadow-lg transition-all",
|
|
61
|
+
"rounded-full", // intentional: circular FAB shape
|
|
62
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2",
|
|
63
|
+
className,
|
|
64
|
+
)}
|
|
65
|
+
style={{ backgroundColor: brandColor ?? "var(--primary)" }}
|
|
66
|
+
>
|
|
67
|
+
{!isOpen && unreadCount && unreadCount > 0 ? (
|
|
68
|
+
<Badge
|
|
69
|
+
variant="destructive"
|
|
70
|
+
className="absolute -right-1 -top-1 size-5 justify-center bg-destructive px-0 py-0 text-[10px] font-semibold text-destructive-foreground"
|
|
71
|
+
>
|
|
72
|
+
{unreadCount > 9 ? "9+" : unreadCount}
|
|
73
|
+
</Badge>
|
|
74
|
+
) : null}
|
|
75
|
+
{isOpen ? (
|
|
76
|
+
<X className="size-6 text-white" />
|
|
77
|
+
) : (
|
|
78
|
+
<MessageCircle className="size-6 text-white" />
|
|
79
|
+
)}
|
|
80
|
+
</button>
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// ---------------------------------------------------------------------------
|
|
85
|
+
// ChatWidgetHeader
|
|
86
|
+
// ---------------------------------------------------------------------------
|
|
87
|
+
|
|
88
|
+
export interface ChatWidgetHeaderProps {
|
|
89
|
+
brokerName: string;
|
|
90
|
+
subtitle?: string;
|
|
91
|
+
/** Gradient start color. */
|
|
92
|
+
gradientFrom?: string;
|
|
93
|
+
/** Gradient end color. */
|
|
94
|
+
gradientTo?: string;
|
|
95
|
+
onMinimize?: () => void;
|
|
96
|
+
className?: string;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export function ChatWidgetHeader({
|
|
100
|
+
brokerName,
|
|
101
|
+
subtitle = "Feel free to chat with us",
|
|
102
|
+
gradientFrom,
|
|
103
|
+
gradientTo,
|
|
104
|
+
onMinimize,
|
|
105
|
+
className,
|
|
106
|
+
}: ChatWidgetHeaderProps) {
|
|
107
|
+
const hasGradient = gradientFrom && gradientTo;
|
|
108
|
+
|
|
109
|
+
return (
|
|
110
|
+
<div
|
|
111
|
+
className={cn(
|
|
112
|
+
"flex items-start justify-between px-4 py-3",
|
|
113
|
+
!hasGradient && "bg-primary",
|
|
114
|
+
className,
|
|
115
|
+
)}
|
|
116
|
+
style={
|
|
117
|
+
hasGradient
|
|
118
|
+
? {
|
|
119
|
+
background: `linear-gradient(135deg, ${gradientFrom}, ${gradientTo})`,
|
|
120
|
+
}
|
|
121
|
+
: undefined
|
|
122
|
+
}
|
|
123
|
+
>
|
|
124
|
+
<div className="flex flex-col gap-0.5">
|
|
125
|
+
<p className="text-body-large font-semibold text-primary-foreground">
|
|
126
|
+
{brokerName}
|
|
127
|
+
</p>
|
|
128
|
+
{subtitle && (
|
|
129
|
+
<p className="text-body-small text-primary-foreground/70">
|
|
130
|
+
{subtitle}
|
|
131
|
+
</p>
|
|
132
|
+
)}
|
|
133
|
+
</div>
|
|
134
|
+
<div className="flex items-center gap-1">
|
|
135
|
+
{onMinimize && (
|
|
136
|
+
<Button
|
|
137
|
+
variant="ghost"
|
|
138
|
+
size="icon-sm"
|
|
139
|
+
aria-label="Minimize chat"
|
|
140
|
+
onClick={onMinimize}
|
|
141
|
+
className="text-primary-foreground/70 hover:bg-primary-foreground/10 hover:text-primary-foreground"
|
|
142
|
+
>
|
|
143
|
+
<ChevronDown className="size-4" />
|
|
144
|
+
</Button>
|
|
145
|
+
)}
|
|
146
|
+
</div>
|
|
147
|
+
</div>
|
|
148
|
+
);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
// ---------------------------------------------------------------------------
|
|
152
|
+
// ChatWidgetMessage
|
|
153
|
+
// ---------------------------------------------------------------------------
|
|
154
|
+
|
|
155
|
+
export type ChatWidgetMessageRole = "bot" | "advisor" | "user" | "system";
|
|
156
|
+
|
|
157
|
+
export interface ChatWidgetMessageProps {
|
|
158
|
+
role: ChatWidgetMessageRole;
|
|
159
|
+
content: string;
|
|
160
|
+
timestamp?: string;
|
|
161
|
+
/** True while the bot response is still streaming in — shows TypingIndicator instead. */
|
|
162
|
+
isStreaming?: boolean;
|
|
163
|
+
className?: string;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
export function ChatWidgetMessage({
|
|
167
|
+
role,
|
|
168
|
+
content,
|
|
169
|
+
timestamp,
|
|
170
|
+
isStreaming,
|
|
171
|
+
className,
|
|
172
|
+
}: ChatWidgetMessageProps) {
|
|
173
|
+
if (role === "system") {
|
|
174
|
+
return (
|
|
175
|
+
<div className={cn("flex items-center justify-center py-2", className)}>
|
|
176
|
+
<span className="text-body-small text-muted-foreground">{content}</span>
|
|
177
|
+
</div>
|
|
178
|
+
);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
const isLeft = role === "bot" || role === "advisor";
|
|
182
|
+
|
|
183
|
+
return (
|
|
184
|
+
<div
|
|
185
|
+
className={cn(
|
|
186
|
+
"flex gap-2",
|
|
187
|
+
isLeft ? "items-start" : "flex-row-reverse items-start",
|
|
188
|
+
className,
|
|
189
|
+
)}
|
|
190
|
+
>
|
|
191
|
+
{isLeft && (
|
|
192
|
+
<Avatar className="size-7">
|
|
193
|
+
<AvatarFallback
|
|
194
|
+
className={
|
|
195
|
+
role === "advisor" ? "bg-primary/15 text-foreground" : undefined
|
|
196
|
+
}
|
|
197
|
+
>
|
|
198
|
+
{role === "advisor" ? (
|
|
199
|
+
<UserRound className="size-3.5" />
|
|
200
|
+
) : (
|
|
201
|
+
<Bot className="size-3.5" />
|
|
202
|
+
)}
|
|
203
|
+
</AvatarFallback>
|
|
204
|
+
</Avatar>
|
|
205
|
+
)}
|
|
206
|
+
<div
|
|
207
|
+
className={cn(
|
|
208
|
+
"flex max-w-[80%] flex-col gap-1",
|
|
209
|
+
!isLeft && "items-end",
|
|
210
|
+
)}
|
|
211
|
+
>
|
|
212
|
+
<div
|
|
213
|
+
className={cn(
|
|
214
|
+
"px-3 py-2 text-body-medium",
|
|
215
|
+
isLeft
|
|
216
|
+
? "border border-border bg-card text-card-foreground shadow-sm"
|
|
217
|
+
: "text-primary-foreground",
|
|
218
|
+
)}
|
|
219
|
+
style={!isLeft ? { backgroundColor: "var(--primary)" } : undefined}
|
|
220
|
+
>
|
|
221
|
+
{isStreaming ? <ChatWidgetTypingIndicator /> : content}
|
|
222
|
+
</div>
|
|
223
|
+
{timestamp && !isStreaming && (
|
|
224
|
+
<span className="text-[10px] text-muted-foreground">{timestamp}</span>
|
|
225
|
+
)}
|
|
226
|
+
</div>
|
|
227
|
+
</div>
|
|
228
|
+
);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
// ---------------------------------------------------------------------------
|
|
232
|
+
// ChatWidgetTypingIndicator
|
|
233
|
+
// ---------------------------------------------------------------------------
|
|
234
|
+
|
|
235
|
+
export interface ChatWidgetTypingIndicatorProps {
|
|
236
|
+
className?: string;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
export function ChatWidgetTypingIndicator({
|
|
240
|
+
className,
|
|
241
|
+
}: ChatWidgetTypingIndicatorProps) {
|
|
242
|
+
return (
|
|
243
|
+
<div
|
|
244
|
+
role="status"
|
|
245
|
+
aria-label="Typing"
|
|
246
|
+
className={cn("flex items-center gap-1 py-0.5", className)}
|
|
247
|
+
>
|
|
248
|
+
{[0, 1, 2].map((i) => (
|
|
249
|
+
<span
|
|
250
|
+
key={i}
|
|
251
|
+
className="size-1.5 animate-bounce rounded-full bg-muted-foreground/60"
|
|
252
|
+
style={{ animationDelay: `${i * 0.15}s` }}
|
|
253
|
+
aria-hidden="true"
|
|
254
|
+
/>
|
|
255
|
+
))}
|
|
256
|
+
</div>
|
|
257
|
+
);
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
// ---------------------------------------------------------------------------
|
|
261
|
+
// ChatWidgetInputBar
|
|
262
|
+
// ---------------------------------------------------------------------------
|
|
263
|
+
|
|
264
|
+
export interface ChatWidgetInputBarProps {
|
|
265
|
+
value: string;
|
|
266
|
+
onChange: (value: string) => void;
|
|
267
|
+
onSend: (value: string) => void;
|
|
268
|
+
disabled?: boolean;
|
|
269
|
+
placeholder?: string;
|
|
270
|
+
className?: string;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
export function ChatWidgetInputBar({
|
|
274
|
+
value,
|
|
275
|
+
onChange,
|
|
276
|
+
onSend,
|
|
277
|
+
disabled,
|
|
278
|
+
placeholder = "Type your message here",
|
|
279
|
+
className,
|
|
280
|
+
}: ChatWidgetInputBarProps) {
|
|
281
|
+
const hasText = value.trim().length > 0;
|
|
282
|
+
|
|
283
|
+
const handleKeyDown = (e: React.KeyboardEvent<HTMLInputElement>) => {
|
|
284
|
+
if (e.key === "Enter" && !e.shiftKey && hasText && !disabled) {
|
|
285
|
+
e.preventDefault();
|
|
286
|
+
onSend(value);
|
|
287
|
+
}
|
|
288
|
+
};
|
|
289
|
+
|
|
290
|
+
return (
|
|
291
|
+
<div
|
|
292
|
+
className={cn(
|
|
293
|
+
"flex items-center gap-2 border-t border-border bg-muted/30 px-3 py-2.5",
|
|
294
|
+
className,
|
|
295
|
+
)}
|
|
296
|
+
>
|
|
297
|
+
<Button
|
|
298
|
+
variant="ghost"
|
|
299
|
+
size="icon-sm"
|
|
300
|
+
aria-label="Add emoji"
|
|
301
|
+
disabled={disabled}
|
|
302
|
+
className="shrink-0 text-muted-foreground hover:text-foreground"
|
|
303
|
+
>
|
|
304
|
+
<Smile className="size-5" />
|
|
305
|
+
</Button>
|
|
306
|
+
<Button
|
|
307
|
+
variant="ghost"
|
|
308
|
+
size="icon-sm"
|
|
309
|
+
aria-label="Add attachment"
|
|
310
|
+
disabled={disabled}
|
|
311
|
+
className="shrink-0 text-muted-foreground hover:text-foreground"
|
|
312
|
+
>
|
|
313
|
+
<Paperclip className="size-5" />
|
|
314
|
+
</Button>
|
|
315
|
+
<Input
|
|
316
|
+
value={value}
|
|
317
|
+
onChange={(e) => onChange(e.target.value)}
|
|
318
|
+
onKeyDown={handleKeyDown}
|
|
319
|
+
placeholder={placeholder}
|
|
320
|
+
disabled={disabled}
|
|
321
|
+
className="flex-1 border-0 bg-transparent px-0 shadow-none focus-visible:ring-0 text-body-medium placeholder:text-muted-foreground/60"
|
|
322
|
+
/>
|
|
323
|
+
<Button
|
|
324
|
+
type="button"
|
|
325
|
+
variant="ghost"
|
|
326
|
+
size="icon-sm"
|
|
327
|
+
aria-label="Send message"
|
|
328
|
+
disabled={disabled || !hasText}
|
|
329
|
+
onClick={() => hasText && !disabled && onSend(value)}
|
|
330
|
+
className="shrink-0"
|
|
331
|
+
>
|
|
332
|
+
<Send className="size-4" />
|
|
333
|
+
</Button>
|
|
334
|
+
</div>
|
|
335
|
+
);
|
|
336
|
+
}
|