@wealthx/shadcn 1.4.1 → 1.5.1
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 +356 -176
- package/CHANGELOG.md +12 -0
- package/dist/chunk-2A53WPEC.mjs +182 -0
- package/dist/{chunk-SIVYAI3M.mjs → chunk-2LLFNGJZ.mjs} +15 -15
- package/dist/chunk-2QNOPXMQ.mjs +360 -0
- package/dist/{chunk-K5QV4TT6.mjs → chunk-2WCIORP7.mjs} +29 -4
- package/dist/{chunk-5NF6T2RS.mjs → chunk-3AREQTZU.mjs} +8 -8
- package/dist/{chunk-2EM2FRU6.mjs → chunk-3WGFIFP6.mjs} +5 -5
- package/dist/{chunk-K4KOD3KR.mjs → chunk-42NEC57Y.mjs} +44 -25
- package/dist/{chunk-FL6DZFJK.mjs → chunk-46Q4335I.mjs} +121 -39
- package/dist/chunk-4DO3WM7V.mjs +48 -0
- package/dist/chunk-5FHBC6DY.mjs +68 -0
- package/dist/chunk-5SAYZ4CI.mjs +40 -0
- package/dist/chunk-5WMFKQZ6.mjs +180 -0
- package/dist/chunk-623YVI5O.mjs +43 -0
- package/dist/{chunk-SFH2NJEJ.mjs → chunk-6OSULDEO.mjs} +3 -3
- package/dist/{chunk-UALR6JGV.mjs → chunk-6SR4K5T5.mjs} +1 -1
- package/dist/{chunk-D2NSIIXG.mjs → chunk-7KT5HPYM.mjs} +11 -11
- package/dist/chunk-A6ER36CW.mjs +456 -0
- package/dist/{chunk-QX7IFQSF.mjs → chunk-AHKHVBWR.mjs} +4 -4
- package/dist/chunk-AHSCWXYJ.mjs +113 -0
- package/dist/{chunk-7GWRPXHD.mjs → chunk-AL6GOL2Y.mjs} +1 -1
- package/dist/{chunk-OIKBW2QD.mjs → chunk-AUEUTZIC.mjs} +13 -13
- package/dist/{chunk-FYPSTTEJ.mjs → chunk-B7DD3ODQ.mjs} +1 -1
- package/dist/{chunk-TLAWKTSA.mjs → chunk-BD3DWDT4.mjs} +3 -3
- package/dist/{chunk-S2FKV4M5.mjs → chunk-BDESHD25.mjs} +4 -4
- package/dist/{chunk-OKTJFDPN.mjs → chunk-BFB3UH7V.mjs} +2 -2
- package/dist/{chunk-DGNHGNYH.mjs → chunk-C6SWS7OW.mjs} +1 -1
- package/dist/chunk-CDVG7SFT.mjs +271 -0
- package/dist/chunk-CUSHAIUL.mjs +109 -0
- package/dist/{chunk-QXKGOMUX.mjs → chunk-CW32WTZU.mjs} +4 -4
- package/dist/{chunk-SET2ANTY.mjs → chunk-D447W45Z.mjs} +3 -3
- package/dist/{chunk-RCAOCHWA.mjs → chunk-DFL5CV75.mjs} +18 -18
- package/dist/chunk-DYSVJ473.mjs +162 -0
- package/dist/chunk-E3PQDBYI.mjs +288 -0
- package/dist/chunk-EMYBNPIA.mjs +83 -0
- package/dist/chunk-EUYPMDQG.mjs +348 -0
- package/dist/{chunk-XYPW2XA5.mjs → chunk-EW72FINW.mjs} +11 -11
- package/dist/chunk-F24U4QQQ.mjs +234 -0
- package/dist/{chunk-VB5M6OZQ.mjs → chunk-F4O2YPXJ.mjs} +1 -1
- package/dist/chunk-FFXTQTB4.mjs +84 -0
- package/dist/{chunk-ZOWL2L5J.mjs → chunk-FYUSF5KO.mjs} +5 -1
- package/dist/{chunk-FTPBQVQ6.mjs → chunk-GNER6MCO.mjs} +1 -1
- package/dist/{chunk-2D3HQPFN.mjs → chunk-HF4FUBCY.mjs} +5 -5
- package/dist/{chunk-RSUIPKGX.mjs → chunk-HNDTLT5X.mjs} +1 -1
- package/dist/{chunk-N6Q5IPKT.mjs → chunk-HO6S3ECM.mjs} +46 -18
- package/dist/{chunk-L4NSRQ3T.mjs → chunk-HROG643K.mjs} +1 -1
- package/dist/chunk-I2EKKSEF.mjs +148 -0
- package/dist/{chunk-QTRSCVQ3.mjs → chunk-I3UDLWQ7.mjs} +1 -1
- package/dist/{chunk-AE7MASLF.mjs → chunk-IQGKOT7A.mjs} +9 -6
- package/dist/chunk-IXR4BQSQ.mjs +290 -0
- package/dist/{chunk-4MM7LHM5.mjs → chunk-J5NW5NCT.mjs} +1 -1
- package/dist/{chunk-OLKMCXAR.mjs → chunk-JTG5R5YV.mjs} +24 -24
- package/dist/chunk-JUBUN65Q.mjs +106 -0
- package/dist/chunk-K7TWMLLW.mjs +520 -0
- package/dist/{chunk-BOW7U26Y.mjs → chunk-K7WSRWOU.mjs} +4 -4
- package/dist/{chunk-NTYQWVLI.mjs → chunk-KAD26MCC.mjs} +1 -1
- package/dist/{chunk-KCWNDYPZ.mjs → chunk-KB7MZMED.mjs} +4 -4
- package/dist/chunk-KCKYGQVQ.mjs +61 -0
- package/dist/{chunk-VY5NEUP7.mjs → chunk-KLJLDNCA.mjs} +1 -1
- package/dist/chunk-LLAGF6BA.mjs +49 -0
- package/dist/{chunk-G27TSQLQ.mjs → chunk-M4LTX3MH.mjs} +1 -1
- package/dist/{chunk-YIZHS72Z.mjs → chunk-MHHA7QGO.mjs} +94 -54
- package/dist/{chunk-P2N2PEFY.mjs → chunk-NCUH54IZ.mjs} +4 -4
- package/dist/{chunk-PNRUH7JY.mjs → chunk-OECGKCVF.mjs} +5 -5
- package/dist/{chunk-YE67AALL.mjs → chunk-OL65UQHQ.mjs} +10 -10
- package/dist/{chunk-LQULK2E3.mjs → chunk-OYBIUEGE.mjs} +1 -1
- package/dist/{chunk-LR6LHDP3.mjs → chunk-PGR53HMH.mjs} +7 -7
- package/dist/chunk-PUJ42INK.mjs +141 -0
- package/dist/{chunk-M4VYX2PV.mjs → chunk-PV3Y7QGK.mjs} +2 -2
- package/dist/{chunk-UJZ4UHWI.mjs → chunk-PV7PNA6K.mjs} +4 -4
- package/dist/{chunk-6HIOM2HL.mjs → chunk-Q35PNFJ7.mjs} +1 -1
- package/dist/{chunk-JZY6TNIS.mjs → chunk-Q5SGEIJV.mjs} +27 -27
- package/dist/{chunk-ZFCDYW6N.mjs → chunk-QAX6HCUH.mjs} +1 -1
- package/dist/chunk-QHJDGB54.mjs +135 -0
- package/dist/chunk-QQSOZQOC.mjs +27 -0
- package/dist/chunk-RUX3OLVZ.mjs +59 -0
- package/dist/{chunk-QOJ2DQD6.mjs → chunk-S4CTM3UE.mjs} +5 -0
- package/dist/{chunk-ZEDMKQK2.mjs → chunk-TAX3KL66.mjs} +1 -1
- package/dist/chunk-TC43SMIN.mjs +133 -0
- package/dist/chunk-TGVXRD53.mjs +174 -0
- package/dist/{chunk-K5VHK7CM.mjs → chunk-TLYSVRSK.mjs} +12 -12
- package/dist/{chunk-YCWLFG27.mjs → chunk-TOIVHWNC.mjs} +1 -1
- package/dist/chunk-TXUBGKB7.mjs +160 -0
- package/dist/chunk-UEREFDAE.mjs +75 -0
- package/dist/chunk-UTCQN6XU.mjs +123 -0
- package/dist/{chunk-37AE3OM5.mjs → chunk-V4CUTCHS.mjs} +4 -4
- package/dist/{chunk-THVO2N47.mjs → chunk-VFH632TB.mjs} +9 -9
- package/dist/{chunk-3ERBUVHC.mjs → chunk-VJ3GC7W3.mjs} +95 -49
- package/dist/{chunk-V6XGXYCJ.mjs → chunk-VLELWBEW.mjs} +4 -4
- package/dist/{chunk-FEZKMUCF.mjs → chunk-WDTXHLYM.mjs} +1 -1
- package/dist/chunk-WUA546RX.mjs +129 -0
- package/dist/chunk-XHGISOX5.mjs +257 -0
- package/dist/chunk-XIY5DJXI.mjs +168 -0
- package/dist/{chunk-TOWTPLRC.mjs → chunk-XN37434W.mjs} +8 -8
- package/dist/{chunk-KLTACJ2G.mjs → chunk-XTWAJWCQ.mjs} +1 -1
- package/dist/chunk-Y24TXIFJ.mjs +518 -0
- package/dist/{chunk-DMXYRCHM.mjs → chunk-Y6UM3VTN.mjs} +4 -4
- package/dist/components/ui/about-you-form.js +1120 -0
- package/dist/components/ui/about-you-form.mjs +323 -0
- package/dist/components/ui/account-list-carousel.js +304 -0
- package/dist/components/ui/account-list-carousel.mjs +11 -0
- package/dist/components/ui/add-column-modal.js +1 -1
- package/dist/components/ui/add-column-modal.mjs +6 -6
- package/dist/components/ui/add-lead-modal.js +2 -2
- package/dist/components/ui/add-lead-modal.mjs +6 -6
- package/dist/components/ui/advisor-card.mjs +2 -2
- package/dist/components/ui/agent-evaluation-toast.js +299 -0
- package/dist/components/ui/agent-evaluation-toast.mjs +12 -0
- package/dist/components/ui/ai-assistant-drawer.mjs +5 -5
- package/dist/components/ui/ai-builder.js +3 -3
- package/dist/components/ui/ai-builder.mjs +5 -5
- package/dist/components/ui/ai-conversations.js +2 -2
- package/dist/components/ui/ai-conversations.mjs +11 -11
- package/dist/components/ui/alert-dialog.mjs +3 -3
- package/dist/components/ui/applicant-document-checklist.js +346 -0
- package/dist/components/ui/applicant-document-checklist.mjs +10 -0
- package/dist/components/ui/applicant-expenses-section.js +455 -0
- package/dist/components/ui/applicant-expenses-section.mjs +220 -0
- package/dist/components/ui/applicant-navigation-bar.js +309 -0
- package/dist/components/ui/applicant-navigation-bar.mjs +87 -0
- package/dist/components/ui/applicant-switcher.js +268 -0
- package/dist/components/ui/applicant-switcher.mjs +46 -0
- package/dist/components/ui/application-mobile-layout.js +88 -0
- package/dist/components/ui/application-mobile-layout.mjs +8 -0
- package/dist/components/ui/appointment-action-dialogs.js +1 -1
- package/dist/components/ui/appointment-action-dialogs.mjs +10 -10
- package/dist/components/ui/appointment-availability-settings.js +78 -31
- package/dist/components/ui/appointment-availability-settings.mjs +12 -10
- package/dist/components/ui/appointment-book-dialog.js +137 -58
- package/dist/components/ui/appointment-book-dialog.mjs +14 -14
- package/dist/components/ui/appointment-calendar-view.js +1 -1
- package/dist/components/ui/appointment-calendar-view.mjs +4 -4
- package/dist/components/ui/appointment-detail-sheet.js +38 -11
- package/dist/components/ui/appointment-detail-sheet.mjs +13 -13
- package/dist/components/ui/appointment-gmail-connect.mjs +2 -2
- package/dist/components/ui/appointment-time-slot-picker.mjs +2 -2
- package/dist/components/ui/appointment-upcoming-card.js +1 -1
- package/dist/components/ui/appointment-upcoming-card.mjs +10 -10
- package/dist/components/ui/asset-accordion.js +506 -0
- package/dist/components/ui/asset-accordion.mjs +202 -0
- package/dist/components/ui/assets-liabilities-side-card.js +328 -0
- package/dist/components/ui/assets-liabilities-side-card.mjs +127 -0
- package/dist/components/ui/auth-page-layout.js +3 -3
- package/dist/components/ui/auth-page-layout.mjs +1 -1
- package/dist/components/ui/backoffice-alert-history-chart.mjs +4 -4
- package/dist/components/ui/backoffice-alert-matching-chart.js +786 -0
- package/dist/components/ui/backoffice-alert-matching-chart.mjs +19 -0
- package/dist/components/ui/backoffice-alerts-chart.mjs +4 -4
- package/dist/components/ui/backoffice-connections-chart.mjs +4 -4
- package/dist/components/ui/backoffice-contact-history-chart.mjs +4 -4
- package/dist/components/ui/backoffice-contact-matching-chart.js +803 -0
- package/dist/components/ui/backoffice-contact-matching-chart.mjs +19 -0
- package/dist/components/ui/backoffice-signup-steps.js +1673 -0
- package/dist/components/ui/backoffice-signup-steps.mjs +36 -0
- package/dist/components/ui/bank-statement-document-table.js +467 -0
- package/dist/components/ui/bank-statement-document-table.mjs +12 -0
- package/dist/components/ui/bank-statement-generate-dialog.js +1517 -0
- package/dist/components/ui/bank-statement-generate-dialog.mjs +27 -0
- package/dist/components/ui/bank-statement-pdf-viewer.js +525 -0
- package/dist/components/ui/bank-statement-pdf-viewer.mjs +14 -0
- package/dist/components/ui/banking-accounts-connect.js +336 -0
- package/dist/components/ui/banking-accounts-connect.mjs +114 -0
- package/dist/components/ui/borrowing-capacity-atoms.js +382 -0
- package/dist/components/ui/borrowing-capacity-atoms.mjs +17 -0
- package/dist/components/ui/borrowing-capacity-card.js +835 -0
- package/dist/components/ui/borrowing-capacity-card.mjs +89 -0
- package/dist/components/ui/borrowing-capacity-line-chart.mjs +4 -4
- package/dist/components/ui/broker-info-panel.js +281 -0
- package/dist/components/ui/broker-info-panel.mjs +59 -0
- package/dist/components/ui/calculator-input-item.js +101 -0
- package/dist/components/ui/calculator-input-item.mjs +8 -0
- package/dist/components/ui/calculator-section.js +743 -0
- package/dist/components/ui/calculator-section.mjs +220 -0
- package/dist/components/ui/calendar.mjs +2 -2
- package/dist/components/ui/cash-balance-line-chart.mjs +5 -5
- package/dist/components/ui/cashflow-bar-chart.mjs +4 -4
- package/dist/components/ui/category-edit-dialog.js +737 -0
- package/dist/components/ui/category-edit-dialog.mjs +16 -0
- package/dist/components/ui/chat-widget.mjs +3 -3
- package/dist/components/ui/color-picker.mjs +4 -4
- package/dist/components/ui/connect-bank-step.js +511 -0
- package/dist/components/ui/connect-bank-step.mjs +287 -0
- package/dist/components/ui/contact-alert-dialog.js +1405 -0
- package/dist/components/ui/contact-alert-dialog.mjs +27 -0
- package/dist/components/ui/create-contact-modal.js +1028 -0
- package/dist/components/ui/create-contact-modal.mjs +21 -0
- package/dist/components/ui/csv-import-modal.js +583 -0
- package/dist/components/ui/csv-import-modal.mjs +14 -0
- package/dist/components/ui/currency-input.js +439 -0
- package/dist/components/ui/currency-input.mjs +13 -0
- package/dist/components/ui/dashboard-expense-categories.js +355 -0
- package/dist/components/ui/dashboard-expense-categories.mjs +186 -0
- package/dist/components/ui/dashboard-transactions-table.js +1083 -0
- package/dist/components/ui/dashboard-transactions-table.mjs +177 -0
- package/dist/components/ui/data-table.mjs +6 -6
- package/dist/components/ui/date-picker.mjs +6 -6
- package/dist/components/ui/debt-accordion.js +523 -0
- package/dist/components/ui/debt-accordion.mjs +219 -0
- package/dist/components/ui/delete-contact-component.js +479 -0
- package/dist/components/ui/delete-contact-component.mjs +14 -0
- package/dist/components/ui/dialog.js +1 -1
- package/dist/components/ui/dialog.mjs +3 -3
- package/dist/components/ui/document-checklist-template.mjs +4 -4
- package/dist/components/ui/drawer.mjs +3 -3
- package/dist/components/ui/dropdown-menu.mjs +3 -3
- package/dist/components/ui/dynamic-tabs.js +274 -0
- package/dist/components/ui/dynamic-tabs.mjs +116 -0
- package/dist/components/ui/editable-money-item.js +306 -0
- package/dist/components/ui/editable-money-item.mjs +12 -0
- package/dist/components/ui/expense-bar-chart.mjs +4 -4
- package/dist/components/ui/expense-detail-item.js +506 -0
- package/dist/components/ui/expense-detail-item.mjs +15 -0
- package/dist/components/ui/expense-work-details.js +1259 -0
- package/dist/components/ui/expense-work-details.mjs +175 -0
- package/dist/components/ui/field.mjs +2 -2
- package/dist/components/ui/file-preview-dialog.js +704 -0
- package/dist/components/ui/file-preview-dialog.mjs +17 -0
- package/dist/components/ui/financial-cards.mjs +2 -2
- package/dist/components/ui/financial-drawers.js +1 -1
- package/dist/components/ui/financial-drawers.mjs +5 -5
- package/dist/components/ui/financial-sections.mjs +4 -4
- package/dist/components/ui/form-primitives.mjs +2 -2
- package/dist/components/ui/frontend-signup-steps.js +1239 -0
- package/dist/components/ui/frontend-signup-steps.mjs +38 -0
- package/dist/components/ui/income-bar-chart.mjs +4 -4
- package/dist/components/ui/income-sources-card.js +269 -0
- package/dist/components/ui/income-sources-card.mjs +100 -0
- package/dist/components/ui/income-summary-component.js +361 -0
- package/dist/components/ui/income-summary-component.mjs +84 -0
- package/dist/components/ui/income-work-details.js +1663 -0
- package/dist/components/ui/income-work-details.mjs +28 -0
- package/dist/components/ui/incoming-outgoings-card.js +218 -0
- package/dist/components/ui/incoming-outgoings-card.mjs +82 -0
- package/dist/components/ui/interest-rate-input.js +442 -0
- package/dist/components/ui/interest-rate-input.mjs +90 -0
- package/dist/components/ui/interest-rate-section.js +337 -0
- package/dist/components/ui/interest-rate-section.mjs +84 -0
- package/dist/components/ui/interest-rate-used.js +202 -0
- package/dist/components/ui/interest-rate-used.mjs +62 -0
- package/dist/components/ui/kanban-column.js +338 -160
- package/dist/components/ui/kanban-column.mjs +13 -11
- package/dist/components/ui/loan-applicant-information.js +336 -0
- package/dist/components/ui/loan-applicant-information.mjs +59 -0
- package/dist/components/ui/loan-applicant-invite.js +319 -0
- package/dist/components/ui/loan-applicant-invite.mjs +68 -0
- package/dist/components/ui/loan-application-badge.js +236 -0
- package/dist/components/ui/loan-application-badge.mjs +10 -0
- package/dist/components/ui/loan-application-cards.js +356 -0
- package/dist/components/ui/loan-application-cards.mjs +110 -0
- package/dist/components/ui/loan-entry-shell.js +104 -0
- package/dist/components/ui/loan-entry-shell.mjs +8 -0
- package/dist/components/ui/loan-financials.js +410 -0
- package/dist/components/ui/loan-financials.mjs +76 -0
- package/dist/components/ui/loan-option-card.js +102 -0
- package/dist/components/ui/loan-option-card.mjs +41 -0
- package/dist/components/ui/loan-option-group.js +288 -0
- package/dist/components/ui/loan-option-group.mjs +10 -0
- package/dist/components/ui/loan-steps.js +1121 -0
- package/dist/components/ui/loan-steps.mjs +509 -0
- package/dist/components/ui/loan-wizard-shell.js +452 -0
- package/dist/components/ui/loan-wizard-shell.mjs +11 -0
- package/dist/components/ui/money-input-with-slider.js +210 -0
- package/dist/components/ui/money-input-with-slider.mjs +10 -0
- package/dist/components/ui/money-item-with-color-indicator.js +314 -0
- package/dist/components/ui/money-item-with-color-indicator.mjs +20 -0
- package/dist/components/ui/opportunity-card.js +235 -97
- package/dist/components/ui/opportunity-card.mjs +11 -9
- package/dist/components/ui/opportunity-edit-modals.js +1 -1
- package/dist/components/ui/opportunity-edit-modals.mjs +15 -15
- package/dist/components/ui/opportunity-summary-tab.js +1 -1
- package/dist/components/ui/opportunity-summary-tab.mjs +19 -19
- package/dist/components/ui/pagination.mjs +4 -4
- package/dist/components/ui/password-strength-tooltip.mjs +4 -4
- package/dist/components/ui/pipeline-board.js +358 -176
- package/dist/components/ui/pipeline-board.mjs +16 -14
- package/dist/components/ui/pipeline-chart.mjs +3 -3
- package/dist/components/ui/pipeline-dialogs.js +1 -1
- package/dist/components/ui/pipeline-dialogs.mjs +9 -9
- package/dist/components/ui/pipeline-primitives.js +75 -8
- package/dist/components/ui/pipeline-primitives.mjs +3 -2
- package/dist/components/ui/popover.mjs +3 -3
- package/dist/components/ui/property-asset-card.js +428 -0
- package/dist/components/ui/property-asset-card.mjs +156 -0
- package/dist/components/ui/property-cashflow-doughnut-chart.mjs +4 -4
- package/dist/components/ui/property-debt-equity-doughnut-chart.mjs +4 -4
- package/dist/components/ui/property-list-carousel.js +295 -0
- package/dist/components/ui/property-list-carousel.mjs +11 -0
- package/dist/components/ui/property-mobile-estimate-line-chart.mjs +4 -4
- package/dist/components/ui/property-report-dialog.js +1148 -0
- package/dist/components/ui/property-report-dialog.mjs +25 -0
- package/dist/components/ui/resource-center.js +748 -0
- package/dist/components/ui/resource-center.mjs +24 -0
- package/dist/components/ui/review-alerts-dialog.js +569 -0
- package/dist/components/ui/review-alerts-dialog.mjs +15 -0
- package/dist/components/ui/savings-goal-modal.js +1148 -0
- package/dist/components/ui/savings-goal-modal.mjs +160 -0
- package/dist/components/ui/scenario-drawer.js +791 -0
- package/dist/components/ui/scenario-drawer.mjs +294 -0
- package/dist/components/ui/scenario-item.js +256 -0
- package/dist/components/ui/scenario-item.mjs +11 -0
- package/dist/components/ui/scenario-list.js +507 -0
- package/dist/components/ui/scenario-list.mjs +100 -0
- package/dist/components/ui/select.mjs +3 -3
- package/dist/components/ui/share-details-dialog.js +636 -0
- package/dist/components/ui/share-details-dialog.mjs +19 -0
- package/dist/components/ui/sheet.mjs +3 -3
- package/dist/components/ui/sidebar-nav.mjs +5 -5
- package/dist/components/ui/signup-form-primitives.js +770 -0
- package/dist/components/ui/signup-form-primitives.mjs +25 -0
- package/dist/components/ui/signup-shell.js +338 -0
- package/dist/components/ui/signup-shell.mjs +13 -0
- package/dist/components/ui/stage-timeline.js +103 -33
- package/dist/components/ui/stage-timeline.mjs +5 -4
- package/dist/components/ui/submission-confirmation-card.js +284 -0
- package/dist/components/ui/submission-confirmation-card.mjs +62 -0
- package/dist/components/ui/tooltip.mjs +3 -3
- package/dist/components/ui/top-three-product.js +374 -0
- package/dist/components/ui/top-three-product.mjs +129 -0
- package/dist/components/ui/transactions-expense-categories-doughnut-chart.mjs +4 -4
- package/dist/components/ui/transactions-income-expense-bar-chart.mjs +5 -5
- package/dist/components/ui/transactions-liabilities-breakdown-doughnut-chart.mjs +4 -4
- package/dist/components/ui/transactions-summary-block.js +95 -0
- package/dist/components/ui/transactions-summary-block.mjs +34 -0
- package/dist/components/ui/two-fa-setup-form.mjs +3 -3
- package/dist/index.js +9430 -4573
- package/dist/index.mjs +404 -251
- package/dist/lib/colors.js +6 -0
- package/dist/lib/colors.mjs +3 -1
- package/dist/lib/theme-provider.mjs +2 -2
- package/dist/styles.css +1 -1
- package/package.json +367 -3
- package/src/components/index.tsx +223 -0
- package/src/components/ui/about-you-form.tsx +397 -0
- package/src/components/ui/account-list-carousel.tsx +87 -0
- package/src/components/ui/add-lead-modal.tsx +1 -1
- package/src/components/ui/agent-evaluation-toast.tsx +191 -0
- package/src/components/ui/ai-builder.tsx +3 -5
- package/src/components/ui/ai-conversations.tsx +1 -1
- package/src/components/ui/applicant-document-checklist.tsx +175 -0
- package/src/components/ui/applicant-expenses-section.tsx +260 -0
- package/src/components/ui/applicant-navigation-bar.tsx +104 -0
- package/src/components/ui/applicant-switcher.tsx +54 -0
- package/src/components/ui/application-mobile-layout.tsx +34 -0
- package/src/components/ui/appointment-availability-settings.tsx +115 -23
- package/src/components/ui/appointment-book-dialog.tsx +406 -259
- package/src/components/ui/appointment-calendar-view.tsx +4 -1
- package/src/components/ui/appointment-detail-sheet.tsx +59 -24
- package/src/components/ui/appointment-time-slot-picker.tsx +5 -1
- package/src/components/ui/asset-accordion.tsx +241 -0
- package/src/components/ui/assets-liabilities-side-card.tsx +157 -0
- package/src/components/ui/auth-page-layout.tsx +3 -3
- package/src/components/ui/backoffice-alert-matching-chart.tsx +320 -0
- package/src/components/ui/backoffice-contact-matching-chart.tsx +341 -0
- package/src/components/ui/backoffice-signup-steps.tsx +615 -0
- package/src/components/ui/bank-statement-document-table.tsx +222 -0
- package/src/components/ui/bank-statement-generate-dialog.tsx +435 -0
- package/src/components/ui/bank-statement-pdf-viewer.tsx +241 -0
- package/src/components/ui/banking-accounts-connect.tsx +187 -0
- package/src/components/ui/borrowing-capacity-atoms.tsx +228 -0
- package/src/components/ui/borrowing-capacity-card.tsx +155 -0
- package/src/components/ui/broker-info-panel.tsx +94 -0
- package/src/components/ui/calculator-input-item.tsx +49 -0
- package/src/components/ui/calculator-section.tsx +275 -0
- package/src/components/ui/category-edit-dialog.tsx +300 -0
- package/src/components/ui/connect-bank-step.tsx +379 -0
- package/src/components/ui/contact-alert-dialog.tsx +710 -0
- package/src/components/ui/create-contact-modal.tsx +237 -0
- package/src/components/ui/csv-import-modal.tsx +153 -0
- package/src/components/ui/currency-input.tsx +104 -0
- package/src/components/ui/dashboard-expense-categories.tsx +262 -0
- package/src/components/ui/dashboard-transactions-table.tsx +241 -0
- package/src/components/ui/debt-accordion.tsx +254 -0
- package/src/components/ui/delete-contact-component.tsx +87 -0
- package/src/components/ui/dialog.tsx +2 -2
- package/src/components/ui/dynamic-tabs.tsx +149 -0
- package/src/components/ui/editable-money-item.tsx +176 -0
- package/src/components/ui/expense-detail-item.tsx +216 -0
- package/src/components/ui/expense-work-details.tsx +229 -0
- package/src/components/ui/file-preview-dialog.tsx +292 -0
- package/src/components/ui/financial-drawers.tsx +1 -1
- package/src/components/ui/frontend-signup-steps.tsx +548 -0
- package/src/components/ui/income-sources-card.tsx +143 -0
- package/src/components/ui/income-summary-component.tsx +120 -0
- package/src/components/ui/income-work-details.tsx +429 -0
- package/src/components/ui/incoming-outgoings-card.tsx +111 -0
- package/src/components/ui/interest-rate-input.tsx +111 -0
- package/src/components/ui/interest-rate-section.tsx +158 -0
- package/src/components/ui/interest-rate-used.tsx +82 -0
- package/src/components/ui/kanban-column.tsx +53 -2
- package/src/components/ui/loan-applicant-information.tsx +64 -0
- package/src/components/ui/loan-applicant-invite.tsx +67 -0
- package/src/components/ui/loan-application-badge.tsx +70 -0
- package/src/components/ui/loan-application-cards.tsx +152 -0
- package/src/components/ui/loan-entry-shell.tsx +86 -0
- package/src/components/ui/loan-financials.tsx +77 -0
- package/src/components/ui/loan-option-card.tsx +62 -0
- package/src/components/ui/loan-option-group.tsx +106 -0
- package/src/components/ui/loan-steps.tsx +630 -0
- package/src/components/ui/loan-wizard-shell.tsx +235 -0
- package/src/components/ui/money-input-with-slider.tsx +77 -0
- package/src/components/ui/money-item-with-color-indicator.tsx +30 -0
- package/src/components/ui/opportunity-card.tsx +46 -18
- package/src/components/ui/pipeline-board.tsx +13 -0
- package/src/components/ui/pipeline-primitives.tsx +28 -0
- package/src/components/ui/property-asset-card.tsx +221 -0
- package/src/components/ui/property-list-carousel.tsx +73 -0
- package/src/components/ui/property-report-dialog.tsx +355 -0
- package/src/components/ui/resource-center.tsx +539 -0
- package/src/components/ui/review-alerts-dialog.tsx +163 -0
- package/src/components/ui/savings-goal-modal.tsx +169 -0
- package/src/components/ui/scenario-drawer.tsx +358 -0
- package/src/components/ui/scenario-item.tsx +141 -0
- package/src/components/ui/scenario-list.tsx +150 -0
- package/src/components/ui/share-details-dialog.tsx +238 -0
- package/src/components/ui/signup-form-primitives.tsx +212 -0
- package/src/components/ui/signup-shell.tsx +180 -0
- package/src/components/ui/stage-timeline.tsx +11 -0
- package/src/components/ui/submission-confirmation-card.tsx +68 -0
- package/src/components/ui/top-three-product.tsx +207 -0
- package/src/components/ui/transactions-summary-block.tsx +59 -0
- package/src/lib/colors.ts +12 -0
- package/src/lib/format-date.ts +2 -2
- package/src/styles/styles-css.ts +1 -1
- package/tsup.config.ts +77 -1
- package/dist/{chunk-5VOTTIXF.mjs → chunk-FRT3S72S.mjs} +3 -3
- package/dist/{chunk-7BTFGCFC.mjs → chunk-MUV4EGDW.mjs} +3 -3
- package/dist/{chunk-57ZXILTS.mjs → chunk-MXP2RX2V.mjs} +3 -3
- package/dist/{chunk-ZKWXDQDG.mjs → chunk-VCDGLN25.mjs} +3 -3
- package/dist/{chunk-FLL633WS.mjs → chunk-ZXEUBBHJ.mjs} +3 -3
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import React, { useRef, useState } from "react";
|
|
2
|
+
import { cn } from "@/lib/utils";
|
|
3
|
+
import { ScenarioItem } from "./scenario-item";
|
|
4
|
+
import { AddScenarioButton } from "./borrowing-capacity-atoms";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Left-sidebar organism for the Borrowing Capacity page.
|
|
8
|
+
*
|
|
9
|
+
* Renders a titled list of selectable, editable `ScenarioItem` rows followed
|
|
10
|
+
* by an `AddScenarioButton`. Drag-and-drop reordering is handled internally
|
|
11
|
+
* via the HTML5 DnD API; the consumer receives the final order via `onReorder`.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
export interface ScenarioListScenario {
|
|
15
|
+
/** Unique identifier */
|
|
16
|
+
id: string;
|
|
17
|
+
/** Display name (e.g. "Default Scenario") */
|
|
18
|
+
name: string;
|
|
19
|
+
/** Secondary descriptor (e.g. "Owner Occupier") */
|
|
20
|
+
description?: string;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface ScenarioListProps {
|
|
24
|
+
/** Section heading (default: "New Loans") */
|
|
25
|
+
title?: string;
|
|
26
|
+
/** Ordered list of scenarios to render */
|
|
27
|
+
scenarios: ScenarioListScenario[];
|
|
28
|
+
/** ID of the currently active scenario */
|
|
29
|
+
selectedId?: string;
|
|
30
|
+
/** Called when a scenario row is clicked */
|
|
31
|
+
onSelect?: (id: string) => void;
|
|
32
|
+
/** Called when "Update Scenario" is clicked in a kebab menu */
|
|
33
|
+
onEdit?: (id: string) => void;
|
|
34
|
+
/** Called when "Delete Scenario" is clicked in a kebab menu */
|
|
35
|
+
onDelete?: (id: string) => void;
|
|
36
|
+
/** Called when the Add button is clicked */
|
|
37
|
+
onAdd?: () => void;
|
|
38
|
+
/** Label for the add button (default: "Compare Loan Options") */
|
|
39
|
+
addLabel?: string;
|
|
40
|
+
/**
|
|
41
|
+
* Maximum number of scenarios allowed. When `scenarios.length >= maxScenarios`
|
|
42
|
+
* the add button is disabled.
|
|
43
|
+
*/
|
|
44
|
+
maxScenarios?: number;
|
|
45
|
+
/** All items show a drag handle when true (default: true) */
|
|
46
|
+
isDraggable?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Called with the new ordered ID array after a drag-and-drop reorder.
|
|
49
|
+
* The consumer is responsible for updating the `scenarios` prop accordingly.
|
|
50
|
+
*/
|
|
51
|
+
onReorder?: (orderedIds: string[]) => void;
|
|
52
|
+
className?: string;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function ScenarioList({
|
|
56
|
+
title = "New Loans",
|
|
57
|
+
scenarios,
|
|
58
|
+
selectedId,
|
|
59
|
+
onSelect,
|
|
60
|
+
onEdit,
|
|
61
|
+
onDelete,
|
|
62
|
+
onAdd,
|
|
63
|
+
addLabel = "Compare Loan Options",
|
|
64
|
+
maxScenarios,
|
|
65
|
+
isDraggable = true,
|
|
66
|
+
onReorder,
|
|
67
|
+
className,
|
|
68
|
+
}: ScenarioListProps) {
|
|
69
|
+
const isAddDisabled =
|
|
70
|
+
maxScenarios !== undefined && scenarios.length >= maxScenarios;
|
|
71
|
+
|
|
72
|
+
// ── Drag & drop state ───────────────────────────────────────────────────────
|
|
73
|
+
const draggingId = useRef<string | null>(null);
|
|
74
|
+
const [dragOverId, setDragOverId] = useState<string | null>(null);
|
|
75
|
+
|
|
76
|
+
const handleDragStart = (id: string) => (e: React.DragEvent) => {
|
|
77
|
+
draggingId.current = id;
|
|
78
|
+
e.dataTransfer.effectAllowed = "move";
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
const handleDragOver = (id: string) => (e: React.DragEvent) => {
|
|
82
|
+
e.preventDefault();
|
|
83
|
+
e.dataTransfer.dropEffect = "move";
|
|
84
|
+
if (id !== draggingId.current) setDragOverId(id);
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
const handleDragLeave = () => setDragOverId(null);
|
|
88
|
+
|
|
89
|
+
const handleDrop = (targetId: string) => (e: React.DragEvent) => {
|
|
90
|
+
e.preventDefault();
|
|
91
|
+
setDragOverId(null);
|
|
92
|
+
|
|
93
|
+
const sourceId = draggingId.current;
|
|
94
|
+
draggingId.current = null;
|
|
95
|
+
|
|
96
|
+
if (!sourceId || sourceId === targetId || !onReorder) return;
|
|
97
|
+
|
|
98
|
+
const ids = scenarios.map((s) => s.id);
|
|
99
|
+
const fromIdx = ids.indexOf(sourceId);
|
|
100
|
+
const toIdx = ids.indexOf(targetId);
|
|
101
|
+
if (fromIdx === -1 || toIdx === -1) return;
|
|
102
|
+
|
|
103
|
+
const reordered = [...ids];
|
|
104
|
+
reordered.splice(fromIdx, 1);
|
|
105
|
+
reordered.splice(toIdx, 0, sourceId);
|
|
106
|
+
onReorder(reordered);
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
const handleDragEnd = () => {
|
|
110
|
+
draggingId.current = null;
|
|
111
|
+
setDragOverId(null);
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
return (
|
|
115
|
+
<div className={cn("flex flex-col", className)}>
|
|
116
|
+
<div className="border-b border-border px-4 py-3">
|
|
117
|
+
<p className="text-sm font-semibold uppercase tracking-widest text-muted-foreground">
|
|
118
|
+
{title}
|
|
119
|
+
</p>
|
|
120
|
+
</div>
|
|
121
|
+
|
|
122
|
+
{scenarios.map((scenario) => (
|
|
123
|
+
<ScenarioItem
|
|
124
|
+
key={scenario.id}
|
|
125
|
+
name={scenario.name}
|
|
126
|
+
description={scenario.description}
|
|
127
|
+
isSelected={scenario.id === selectedId}
|
|
128
|
+
isDraggable={isDraggable}
|
|
129
|
+
isDragOver={scenario.id === dragOverId}
|
|
130
|
+
onSelect={() => onSelect?.(scenario.id)}
|
|
131
|
+
onEdit={onEdit ? () => onEdit(scenario.id) : undefined}
|
|
132
|
+
onDelete={onDelete ? () => onDelete(scenario.id) : undefined}
|
|
133
|
+
onDragStart={isDraggable ? handleDragStart(scenario.id) : undefined}
|
|
134
|
+
onDragOver={isDraggable ? handleDragOver(scenario.id) : undefined}
|
|
135
|
+
onDragLeave={isDraggable ? handleDragLeave : undefined}
|
|
136
|
+
onDrop={isDraggable ? handleDrop(scenario.id) : undefined}
|
|
137
|
+
onDragEnd={isDraggable ? handleDragEnd : undefined}
|
|
138
|
+
/>
|
|
139
|
+
))}
|
|
140
|
+
|
|
141
|
+
<div className="p-3">
|
|
142
|
+
<AddScenarioButton
|
|
143
|
+
title={addLabel}
|
|
144
|
+
disabled={isAddDisabled}
|
|
145
|
+
onClick={onAdd}
|
|
146
|
+
/>
|
|
147
|
+
</div>
|
|
148
|
+
</div>
|
|
149
|
+
);
|
|
150
|
+
}
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { CheckIcon, CopyIcon } from "lucide-react";
|
|
3
|
+
import {
|
|
4
|
+
Dialog,
|
|
5
|
+
DialogContent,
|
|
6
|
+
DialogHeader,
|
|
7
|
+
DialogTitle,
|
|
8
|
+
DialogFooter,
|
|
9
|
+
} from "@/components/ui/dialog";
|
|
10
|
+
import { Button } from "@/components/ui/button";
|
|
11
|
+
import { Input } from "@/components/ui/input";
|
|
12
|
+
import { Label } from "@/components/ui/label";
|
|
13
|
+
import { Spinner } from "@/components/ui/spinner";
|
|
14
|
+
import { Textarea } from "@/components/ui/textarea";
|
|
15
|
+
|
|
16
|
+
// ---------------------------------------------------------------------------
|
|
17
|
+
// Shared helper
|
|
18
|
+
// ---------------------------------------------------------------------------
|
|
19
|
+
|
|
20
|
+
function Field({
|
|
21
|
+
id,
|
|
22
|
+
label,
|
|
23
|
+
required,
|
|
24
|
+
children,
|
|
25
|
+
}: {
|
|
26
|
+
id?: string;
|
|
27
|
+
label: string;
|
|
28
|
+
required?: boolean;
|
|
29
|
+
children: React.ReactNode;
|
|
30
|
+
}) {
|
|
31
|
+
return (
|
|
32
|
+
<div className="flex flex-col gap-1.5">
|
|
33
|
+
<Label htmlFor={id}>
|
|
34
|
+
{label}
|
|
35
|
+
{required && <span className="ml-0.5 text-destructive">*</span>}
|
|
36
|
+
</Label>
|
|
37
|
+
{children}
|
|
38
|
+
</div>
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// ---------------------------------------------------------------------------
|
|
43
|
+
// ShareDetailsDialog
|
|
44
|
+
// ---------------------------------------------------------------------------
|
|
45
|
+
|
|
46
|
+
export interface ShareDetailsDialogProps {
|
|
47
|
+
open: boolean;
|
|
48
|
+
onOpenChange: (open: boolean) => void;
|
|
49
|
+
contactName: string;
|
|
50
|
+
/** Pre-generated share link to copy. */
|
|
51
|
+
shareUrl: string;
|
|
52
|
+
/** When provided, shows an "Email link" button that calls this handler. */
|
|
53
|
+
onEmailLink?: () => void;
|
|
54
|
+
isSendingEmail?: boolean;
|
|
55
|
+
className?: string;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function ShareDetailsDialog({
|
|
59
|
+
open,
|
|
60
|
+
onOpenChange,
|
|
61
|
+
contactName,
|
|
62
|
+
shareUrl,
|
|
63
|
+
onEmailLink,
|
|
64
|
+
isSendingEmail = false,
|
|
65
|
+
className,
|
|
66
|
+
}: ShareDetailsDialogProps) {
|
|
67
|
+
const [copied, setCopied] = React.useState(false);
|
|
68
|
+
|
|
69
|
+
function handleCopy() {
|
|
70
|
+
navigator.clipboard.writeText(shareUrl).catch(() => {});
|
|
71
|
+
setCopied(true);
|
|
72
|
+
setTimeout(() => setCopied(false), 2000);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
return (
|
|
76
|
+
<Dialog open={open} onOpenChange={onOpenChange}>
|
|
77
|
+
<DialogContent size="md" className={className}>
|
|
78
|
+
<DialogHeader>
|
|
79
|
+
<DialogTitle>Share Contact Details</DialogTitle>
|
|
80
|
+
</DialogHeader>
|
|
81
|
+
|
|
82
|
+
<p className="text-sm text-muted-foreground">
|
|
83
|
+
Share a secure link to{" "}
|
|
84
|
+
<span className="font-medium text-foreground">{contactName}</span>'s
|
|
85
|
+
financial summary report.
|
|
86
|
+
</p>
|
|
87
|
+
|
|
88
|
+
<Field label="Shareable link">
|
|
89
|
+
<div className="flex gap-2">
|
|
90
|
+
<Input
|
|
91
|
+
readOnly
|
|
92
|
+
value={shareUrl}
|
|
93
|
+
className="flex-1 font-mono text-xs text-muted-foreground"
|
|
94
|
+
onClick={(e) => (e.target as HTMLInputElement).select()}
|
|
95
|
+
/>
|
|
96
|
+
<Button
|
|
97
|
+
variant="outline"
|
|
98
|
+
size="icon"
|
|
99
|
+
onClick={handleCopy}
|
|
100
|
+
aria-label={copied ? "Copied" : "Copy link"}
|
|
101
|
+
className="shrink-0"
|
|
102
|
+
>
|
|
103
|
+
{copied ? (
|
|
104
|
+
<CheckIcon className="size-4 text-success" />
|
|
105
|
+
) : (
|
|
106
|
+
<CopyIcon className="size-4" />
|
|
107
|
+
)}
|
|
108
|
+
</Button>
|
|
109
|
+
</div>
|
|
110
|
+
{copied && (
|
|
111
|
+
<p className="text-xs text-success">Link copied to clipboard!</p>
|
|
112
|
+
)}
|
|
113
|
+
</Field>
|
|
114
|
+
|
|
115
|
+
<DialogFooter>
|
|
116
|
+
<Button variant="outline" onClick={() => onOpenChange(false)}>
|
|
117
|
+
Close
|
|
118
|
+
</Button>
|
|
119
|
+
{onEmailLink && (
|
|
120
|
+
<Button onClick={onEmailLink} disabled={isSendingEmail}>
|
|
121
|
+
{isSendingEmail ? (
|
|
122
|
+
<>
|
|
123
|
+
<Spinner className="size-3.5" />
|
|
124
|
+
Sending…
|
|
125
|
+
</>
|
|
126
|
+
) : (
|
|
127
|
+
"Email link"
|
|
128
|
+
)}
|
|
129
|
+
</Button>
|
|
130
|
+
)}
|
|
131
|
+
</DialogFooter>
|
|
132
|
+
</DialogContent>
|
|
133
|
+
</Dialog>
|
|
134
|
+
);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
// ---------------------------------------------------------------------------
|
|
138
|
+
// EmailTemplateDialog
|
|
139
|
+
// ---------------------------------------------------------------------------
|
|
140
|
+
|
|
141
|
+
export interface EmailTemplateDialogProps {
|
|
142
|
+
open: boolean;
|
|
143
|
+
onOpenChange: (open: boolean) => void;
|
|
144
|
+
contactName: string;
|
|
145
|
+
contactEmail: string;
|
|
146
|
+
defaultSubject?: string;
|
|
147
|
+
defaultBody?: string;
|
|
148
|
+
onSend: (payload: { subject: string; body: string }) => void;
|
|
149
|
+
isSending?: boolean;
|
|
150
|
+
className?: string;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
export function EmailTemplateDialog({
|
|
154
|
+
open,
|
|
155
|
+
onOpenChange,
|
|
156
|
+
contactName,
|
|
157
|
+
contactEmail,
|
|
158
|
+
defaultSubject = "",
|
|
159
|
+
defaultBody = "",
|
|
160
|
+
onSend,
|
|
161
|
+
isSending = false,
|
|
162
|
+
className,
|
|
163
|
+
}: EmailTemplateDialogProps) {
|
|
164
|
+
const [subject, setSubject] = React.useState(defaultSubject);
|
|
165
|
+
const [body, setBody] = React.useState(defaultBody);
|
|
166
|
+
|
|
167
|
+
React.useEffect(() => {
|
|
168
|
+
if (open) {
|
|
169
|
+
setSubject(defaultSubject);
|
|
170
|
+
setBody(defaultBody);
|
|
171
|
+
}
|
|
172
|
+
}, [open, defaultSubject, defaultBody]);
|
|
173
|
+
|
|
174
|
+
const canSend = subject.trim() !== "" && body.trim() !== "" && !isSending;
|
|
175
|
+
|
|
176
|
+
return (
|
|
177
|
+
<Dialog open={open} onOpenChange={isSending ? undefined : onOpenChange}>
|
|
178
|
+
<DialogContent size="lg" className={className}>
|
|
179
|
+
<DialogHeader>
|
|
180
|
+
<DialogTitle>Send Email</DialogTitle>
|
|
181
|
+
</DialogHeader>
|
|
182
|
+
|
|
183
|
+
<div className="flex flex-col gap-4">
|
|
184
|
+
{/* To — read-only recipient display */}
|
|
185
|
+
<Field label="To">
|
|
186
|
+
<div className="flex items-center gap-2 border border-border bg-muted/40 px-3 py-2 text-sm">
|
|
187
|
+
<span className="font-medium text-foreground">{contactName}</span>
|
|
188
|
+
<span className="text-muted-foreground">
|
|
189
|
+
<{contactEmail}>
|
|
190
|
+
</span>
|
|
191
|
+
</div>
|
|
192
|
+
</Field>
|
|
193
|
+
|
|
194
|
+
<Field id="etd-subject" label="Subject" required>
|
|
195
|
+
<Input
|
|
196
|
+
id="etd-subject"
|
|
197
|
+
placeholder="Email subject"
|
|
198
|
+
value={subject}
|
|
199
|
+
onChange={(e) => setSubject(e.target.value)}
|
|
200
|
+
disabled={isSending}
|
|
201
|
+
/>
|
|
202
|
+
</Field>
|
|
203
|
+
|
|
204
|
+
<Field id="etd-body" label="Message" required>
|
|
205
|
+
<Textarea
|
|
206
|
+
id="etd-body"
|
|
207
|
+
rows={8}
|
|
208
|
+
placeholder="Write your message here…"
|
|
209
|
+
value={body}
|
|
210
|
+
onChange={(e) => setBody(e.target.value)}
|
|
211
|
+
disabled={isSending}
|
|
212
|
+
/>
|
|
213
|
+
</Field>
|
|
214
|
+
</div>
|
|
215
|
+
|
|
216
|
+
<DialogFooter>
|
|
217
|
+
<Button
|
|
218
|
+
variant="outline"
|
|
219
|
+
onClick={() => onOpenChange(false)}
|
|
220
|
+
disabled={isSending}
|
|
221
|
+
>
|
|
222
|
+
Cancel
|
|
223
|
+
</Button>
|
|
224
|
+
<Button onClick={() => onSend({ subject, body })} disabled={!canSend}>
|
|
225
|
+
{isSending ? (
|
|
226
|
+
<>
|
|
227
|
+
<Spinner className="size-3.5" />
|
|
228
|
+
Sending…
|
|
229
|
+
</>
|
|
230
|
+
) : (
|
|
231
|
+
"Send Email"
|
|
232
|
+
)}
|
|
233
|
+
</Button>
|
|
234
|
+
</DialogFooter>
|
|
235
|
+
</DialogContent>
|
|
236
|
+
</Dialog>
|
|
237
|
+
);
|
|
238
|
+
}
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
import React, { useState } from "react";
|
|
2
|
+
import { EyeIcon, EyeOffIcon, Trash2Icon } from "lucide-react";
|
|
3
|
+
import { Button } from "./button";
|
|
4
|
+
import { Field, FieldError, FieldLabel } from "./field";
|
|
5
|
+
import { Input } from "./input";
|
|
6
|
+
import {
|
|
7
|
+
Select,
|
|
8
|
+
SelectContent,
|
|
9
|
+
SelectItem,
|
|
10
|
+
SelectTrigger,
|
|
11
|
+
SelectValue,
|
|
12
|
+
} from "./select";
|
|
13
|
+
import { PasswordStrengthTooltip } from "./password-strength-tooltip";
|
|
14
|
+
|
|
15
|
+
// ---------------------------------------------------------------------------
|
|
16
|
+
// SectionHeading
|
|
17
|
+
// ---------------------------------------------------------------------------
|
|
18
|
+
|
|
19
|
+
export interface SectionHeadingProps {
|
|
20
|
+
children: React.ReactNode;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export function SectionHeading({ children }: SectionHeadingProps) {
|
|
24
|
+
return (
|
|
25
|
+
<div className="font-semibold text-lg text-foreground">{children}</div>
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// ---------------------------------------------------------------------------
|
|
30
|
+
// FormField — label + required marker wrapper
|
|
31
|
+
// ---------------------------------------------------------------------------
|
|
32
|
+
|
|
33
|
+
export interface FormFieldProps {
|
|
34
|
+
label: string;
|
|
35
|
+
required?: boolean;
|
|
36
|
+
children: React.ReactNode;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export function FormField({ label, required, children }: FormFieldProps) {
|
|
40
|
+
return (
|
|
41
|
+
<Field>
|
|
42
|
+
<FieldLabel>
|
|
43
|
+
{label}
|
|
44
|
+
{required && <span className="text-destructive ml-0.5">*</span>}
|
|
45
|
+
</FieldLabel>
|
|
46
|
+
{children}
|
|
47
|
+
</Field>
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// ---------------------------------------------------------------------------
|
|
52
|
+
// PasswordField — input with show/hide toggle + optional strength popover
|
|
53
|
+
// ---------------------------------------------------------------------------
|
|
54
|
+
|
|
55
|
+
const STRENGTH_RULES = [
|
|
56
|
+
{ test: (p: string) => p.length >= 8 },
|
|
57
|
+
{ test: (p: string) => /[A-Z]/.test(p) },
|
|
58
|
+
{ test: (p: string) => /[a-z]/.test(p) },
|
|
59
|
+
{ test: (p: string) => /\d/.test(p) },
|
|
60
|
+
{ test: (p: string) => /[^A-Za-z0-9]/.test(p) },
|
|
61
|
+
];
|
|
62
|
+
|
|
63
|
+
export interface PasswordFieldProps {
|
|
64
|
+
label: string;
|
|
65
|
+
placeholder: string;
|
|
66
|
+
required?: boolean;
|
|
67
|
+
showStrengthPopover?: boolean;
|
|
68
|
+
onValueChange?: (v: string) => void;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export function PasswordField({
|
|
72
|
+
label,
|
|
73
|
+
placeholder,
|
|
74
|
+
required,
|
|
75
|
+
showStrengthPopover,
|
|
76
|
+
onValueChange,
|
|
77
|
+
}: PasswordFieldProps) {
|
|
78
|
+
const [show, setShow] = useState(false);
|
|
79
|
+
const [error, setError] = useState("");
|
|
80
|
+
const [touched, setTouched] = useState(false);
|
|
81
|
+
const [value, setValue] = useState("");
|
|
82
|
+
const [typingStarted, setTypingStarted] = useState(false);
|
|
83
|
+
|
|
84
|
+
const allRulesPass = STRENGTH_RULES.every((r) => r.test(value));
|
|
85
|
+
const isPopoverOpen = !!showStrengthPopover && typingStarted && !allRulesPass;
|
|
86
|
+
|
|
87
|
+
const validate = (v: string) => {
|
|
88
|
+
if (v.length > 0 && v.length < 8) return "Min. 8 characters required";
|
|
89
|
+
return "";
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
const inputEl = (
|
|
93
|
+
<div className="relative">
|
|
94
|
+
<Input
|
|
95
|
+
type={show ? "text" : "password"}
|
|
96
|
+
placeholder={placeholder}
|
|
97
|
+
className="pr-10"
|
|
98
|
+
value={value}
|
|
99
|
+
onChange={(e) => {
|
|
100
|
+
const v = e.target.value;
|
|
101
|
+
setValue(v);
|
|
102
|
+
onValueChange?.(v);
|
|
103
|
+
if (!typingStarted && v.length > 0) setTypingStarted(true);
|
|
104
|
+
if (touched) setError(validate(v));
|
|
105
|
+
}}
|
|
106
|
+
onBlur={() => {
|
|
107
|
+
setTouched(true);
|
|
108
|
+
setError(validate(value));
|
|
109
|
+
}}
|
|
110
|
+
/>
|
|
111
|
+
<button
|
|
112
|
+
type="button"
|
|
113
|
+
aria-label={show ? "Hide password" : "Show password"}
|
|
114
|
+
className="absolute right-3 top-2.5 text-muted-foreground hover:text-foreground"
|
|
115
|
+
onClick={() => setShow((s) => !s)}
|
|
116
|
+
>
|
|
117
|
+
{show ? (
|
|
118
|
+
<EyeOffIcon className="size-4" />
|
|
119
|
+
) : (
|
|
120
|
+
<EyeIcon className="size-4" />
|
|
121
|
+
)}
|
|
122
|
+
</button>
|
|
123
|
+
</div>
|
|
124
|
+
);
|
|
125
|
+
|
|
126
|
+
return (
|
|
127
|
+
<Field>
|
|
128
|
+
<FieldLabel>
|
|
129
|
+
{label}
|
|
130
|
+
{required && <span className="text-destructive ml-0.5">*</span>}
|
|
131
|
+
</FieldLabel>
|
|
132
|
+
{showStrengthPopover ? (
|
|
133
|
+
<PasswordStrengthTooltip
|
|
134
|
+
open={isPopoverOpen}
|
|
135
|
+
password={value}
|
|
136
|
+
side="right"
|
|
137
|
+
>
|
|
138
|
+
{inputEl}
|
|
139
|
+
</PasswordStrengthTooltip>
|
|
140
|
+
) : (
|
|
141
|
+
inputEl
|
|
142
|
+
)}
|
|
143
|
+
<div className="min-h-5">
|
|
144
|
+
{touched && error && <FieldError>{error}</FieldError>}
|
|
145
|
+
</div>
|
|
146
|
+
</Field>
|
|
147
|
+
);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
// ---------------------------------------------------------------------------
|
|
151
|
+
// StaffRowItem — email + role select row inside InviteStaffView
|
|
152
|
+
// ---------------------------------------------------------------------------
|
|
153
|
+
|
|
154
|
+
export interface StaffMember {
|
|
155
|
+
id: string;
|
|
156
|
+
email: string;
|
|
157
|
+
role: string;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
export interface StaffRowItemProps {
|
|
161
|
+
member: StaffMember;
|
|
162
|
+
onRemove: (id: string) => void;
|
|
163
|
+
onChange: (id: string, field: "email" | "role", value: string) => void;
|
|
164
|
+
showRemove: boolean;
|
|
165
|
+
roleOptions?: string[];
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
const DEFAULT_ROLE_OPTIONS = ["Admin", "Broker", "Support"];
|
|
169
|
+
|
|
170
|
+
export function StaffRowItem({
|
|
171
|
+
member,
|
|
172
|
+
onRemove,
|
|
173
|
+
onChange,
|
|
174
|
+
showRemove,
|
|
175
|
+
roleOptions = DEFAULT_ROLE_OPTIONS,
|
|
176
|
+
}: StaffRowItemProps) {
|
|
177
|
+
return (
|
|
178
|
+
<div className="flex items-center gap-3 w-full">
|
|
179
|
+
<Input
|
|
180
|
+
className="flex-1"
|
|
181
|
+
placeholder="staff@company.com"
|
|
182
|
+
value={member.email}
|
|
183
|
+
onChange={(e) => onChange(member.id, "email", e.target.value)}
|
|
184
|
+
/>
|
|
185
|
+
<Select
|
|
186
|
+
value={member.role}
|
|
187
|
+
onValueChange={(v) => onChange(member.id, "role", v as string)}
|
|
188
|
+
>
|
|
189
|
+
<SelectTrigger className="w-[140px] shrink-0">
|
|
190
|
+
<SelectValue placeholder="Select Role" />
|
|
191
|
+
</SelectTrigger>
|
|
192
|
+
<SelectContent>
|
|
193
|
+
{roleOptions.map((r) => (
|
|
194
|
+
<SelectItem key={r} value={r}>
|
|
195
|
+
{r}
|
|
196
|
+
</SelectItem>
|
|
197
|
+
))}
|
|
198
|
+
</SelectContent>
|
|
199
|
+
</Select>
|
|
200
|
+
{showRemove && (
|
|
201
|
+
<Button
|
|
202
|
+
variant="ghost"
|
|
203
|
+
size="icon-sm"
|
|
204
|
+
onClick={() => onRemove(member.id)}
|
|
205
|
+
aria-label="Remove staff member"
|
|
206
|
+
>
|
|
207
|
+
<Trash2Icon className="size-4" />
|
|
208
|
+
</Button>
|
|
209
|
+
)}
|
|
210
|
+
</div>
|
|
211
|
+
);
|
|
212
|
+
}
|