@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.
Files changed (430) hide show
  1. package/.turbo/turbo-build.log +356 -176
  2. package/CHANGELOG.md +12 -0
  3. package/dist/chunk-2A53WPEC.mjs +182 -0
  4. package/dist/{chunk-SIVYAI3M.mjs → chunk-2LLFNGJZ.mjs} +15 -15
  5. package/dist/chunk-2QNOPXMQ.mjs +360 -0
  6. package/dist/{chunk-K5QV4TT6.mjs → chunk-2WCIORP7.mjs} +29 -4
  7. package/dist/{chunk-5NF6T2RS.mjs → chunk-3AREQTZU.mjs} +8 -8
  8. package/dist/{chunk-2EM2FRU6.mjs → chunk-3WGFIFP6.mjs} +5 -5
  9. package/dist/{chunk-K4KOD3KR.mjs → chunk-42NEC57Y.mjs} +44 -25
  10. package/dist/{chunk-FL6DZFJK.mjs → chunk-46Q4335I.mjs} +121 -39
  11. package/dist/chunk-4DO3WM7V.mjs +48 -0
  12. package/dist/chunk-5FHBC6DY.mjs +68 -0
  13. package/dist/chunk-5SAYZ4CI.mjs +40 -0
  14. package/dist/chunk-5WMFKQZ6.mjs +180 -0
  15. package/dist/chunk-623YVI5O.mjs +43 -0
  16. package/dist/{chunk-SFH2NJEJ.mjs → chunk-6OSULDEO.mjs} +3 -3
  17. package/dist/{chunk-UALR6JGV.mjs → chunk-6SR4K5T5.mjs} +1 -1
  18. package/dist/{chunk-D2NSIIXG.mjs → chunk-7KT5HPYM.mjs} +11 -11
  19. package/dist/chunk-A6ER36CW.mjs +456 -0
  20. package/dist/{chunk-QX7IFQSF.mjs → chunk-AHKHVBWR.mjs} +4 -4
  21. package/dist/chunk-AHSCWXYJ.mjs +113 -0
  22. package/dist/{chunk-7GWRPXHD.mjs → chunk-AL6GOL2Y.mjs} +1 -1
  23. package/dist/{chunk-OIKBW2QD.mjs → chunk-AUEUTZIC.mjs} +13 -13
  24. package/dist/{chunk-FYPSTTEJ.mjs → chunk-B7DD3ODQ.mjs} +1 -1
  25. package/dist/{chunk-TLAWKTSA.mjs → chunk-BD3DWDT4.mjs} +3 -3
  26. package/dist/{chunk-S2FKV4M5.mjs → chunk-BDESHD25.mjs} +4 -4
  27. package/dist/{chunk-OKTJFDPN.mjs → chunk-BFB3UH7V.mjs} +2 -2
  28. package/dist/{chunk-DGNHGNYH.mjs → chunk-C6SWS7OW.mjs} +1 -1
  29. package/dist/chunk-CDVG7SFT.mjs +271 -0
  30. package/dist/chunk-CUSHAIUL.mjs +109 -0
  31. package/dist/{chunk-QXKGOMUX.mjs → chunk-CW32WTZU.mjs} +4 -4
  32. package/dist/{chunk-SET2ANTY.mjs → chunk-D447W45Z.mjs} +3 -3
  33. package/dist/{chunk-RCAOCHWA.mjs → chunk-DFL5CV75.mjs} +18 -18
  34. package/dist/chunk-DYSVJ473.mjs +162 -0
  35. package/dist/chunk-E3PQDBYI.mjs +288 -0
  36. package/dist/chunk-EMYBNPIA.mjs +83 -0
  37. package/dist/chunk-EUYPMDQG.mjs +348 -0
  38. package/dist/{chunk-XYPW2XA5.mjs → chunk-EW72FINW.mjs} +11 -11
  39. package/dist/chunk-F24U4QQQ.mjs +234 -0
  40. package/dist/{chunk-VB5M6OZQ.mjs → chunk-F4O2YPXJ.mjs} +1 -1
  41. package/dist/chunk-FFXTQTB4.mjs +84 -0
  42. package/dist/{chunk-ZOWL2L5J.mjs → chunk-FYUSF5KO.mjs} +5 -1
  43. package/dist/{chunk-FTPBQVQ6.mjs → chunk-GNER6MCO.mjs} +1 -1
  44. package/dist/{chunk-2D3HQPFN.mjs → chunk-HF4FUBCY.mjs} +5 -5
  45. package/dist/{chunk-RSUIPKGX.mjs → chunk-HNDTLT5X.mjs} +1 -1
  46. package/dist/{chunk-N6Q5IPKT.mjs → chunk-HO6S3ECM.mjs} +46 -18
  47. package/dist/{chunk-L4NSRQ3T.mjs → chunk-HROG643K.mjs} +1 -1
  48. package/dist/chunk-I2EKKSEF.mjs +148 -0
  49. package/dist/{chunk-QTRSCVQ3.mjs → chunk-I3UDLWQ7.mjs} +1 -1
  50. package/dist/{chunk-AE7MASLF.mjs → chunk-IQGKOT7A.mjs} +9 -6
  51. package/dist/chunk-IXR4BQSQ.mjs +290 -0
  52. package/dist/{chunk-4MM7LHM5.mjs → chunk-J5NW5NCT.mjs} +1 -1
  53. package/dist/{chunk-OLKMCXAR.mjs → chunk-JTG5R5YV.mjs} +24 -24
  54. package/dist/chunk-JUBUN65Q.mjs +106 -0
  55. package/dist/chunk-K7TWMLLW.mjs +520 -0
  56. package/dist/{chunk-BOW7U26Y.mjs → chunk-K7WSRWOU.mjs} +4 -4
  57. package/dist/{chunk-NTYQWVLI.mjs → chunk-KAD26MCC.mjs} +1 -1
  58. package/dist/{chunk-KCWNDYPZ.mjs → chunk-KB7MZMED.mjs} +4 -4
  59. package/dist/chunk-KCKYGQVQ.mjs +61 -0
  60. package/dist/{chunk-VY5NEUP7.mjs → chunk-KLJLDNCA.mjs} +1 -1
  61. package/dist/chunk-LLAGF6BA.mjs +49 -0
  62. package/dist/{chunk-G27TSQLQ.mjs → chunk-M4LTX3MH.mjs} +1 -1
  63. package/dist/{chunk-YIZHS72Z.mjs → chunk-MHHA7QGO.mjs} +94 -54
  64. package/dist/{chunk-P2N2PEFY.mjs → chunk-NCUH54IZ.mjs} +4 -4
  65. package/dist/{chunk-PNRUH7JY.mjs → chunk-OECGKCVF.mjs} +5 -5
  66. package/dist/{chunk-YE67AALL.mjs → chunk-OL65UQHQ.mjs} +10 -10
  67. package/dist/{chunk-LQULK2E3.mjs → chunk-OYBIUEGE.mjs} +1 -1
  68. package/dist/{chunk-LR6LHDP3.mjs → chunk-PGR53HMH.mjs} +7 -7
  69. package/dist/chunk-PUJ42INK.mjs +141 -0
  70. package/dist/{chunk-M4VYX2PV.mjs → chunk-PV3Y7QGK.mjs} +2 -2
  71. package/dist/{chunk-UJZ4UHWI.mjs → chunk-PV7PNA6K.mjs} +4 -4
  72. package/dist/{chunk-6HIOM2HL.mjs → chunk-Q35PNFJ7.mjs} +1 -1
  73. package/dist/{chunk-JZY6TNIS.mjs → chunk-Q5SGEIJV.mjs} +27 -27
  74. package/dist/{chunk-ZFCDYW6N.mjs → chunk-QAX6HCUH.mjs} +1 -1
  75. package/dist/chunk-QHJDGB54.mjs +135 -0
  76. package/dist/chunk-QQSOZQOC.mjs +27 -0
  77. package/dist/chunk-RUX3OLVZ.mjs +59 -0
  78. package/dist/{chunk-QOJ2DQD6.mjs → chunk-S4CTM3UE.mjs} +5 -0
  79. package/dist/{chunk-ZEDMKQK2.mjs → chunk-TAX3KL66.mjs} +1 -1
  80. package/dist/chunk-TC43SMIN.mjs +133 -0
  81. package/dist/chunk-TGVXRD53.mjs +174 -0
  82. package/dist/{chunk-K5VHK7CM.mjs → chunk-TLYSVRSK.mjs} +12 -12
  83. package/dist/{chunk-YCWLFG27.mjs → chunk-TOIVHWNC.mjs} +1 -1
  84. package/dist/chunk-TXUBGKB7.mjs +160 -0
  85. package/dist/chunk-UEREFDAE.mjs +75 -0
  86. package/dist/chunk-UTCQN6XU.mjs +123 -0
  87. package/dist/{chunk-37AE3OM5.mjs → chunk-V4CUTCHS.mjs} +4 -4
  88. package/dist/{chunk-THVO2N47.mjs → chunk-VFH632TB.mjs} +9 -9
  89. package/dist/{chunk-3ERBUVHC.mjs → chunk-VJ3GC7W3.mjs} +95 -49
  90. package/dist/{chunk-V6XGXYCJ.mjs → chunk-VLELWBEW.mjs} +4 -4
  91. package/dist/{chunk-FEZKMUCF.mjs → chunk-WDTXHLYM.mjs} +1 -1
  92. package/dist/chunk-WUA546RX.mjs +129 -0
  93. package/dist/chunk-XHGISOX5.mjs +257 -0
  94. package/dist/chunk-XIY5DJXI.mjs +168 -0
  95. package/dist/{chunk-TOWTPLRC.mjs → chunk-XN37434W.mjs} +8 -8
  96. package/dist/{chunk-KLTACJ2G.mjs → chunk-XTWAJWCQ.mjs} +1 -1
  97. package/dist/chunk-Y24TXIFJ.mjs +518 -0
  98. package/dist/{chunk-DMXYRCHM.mjs → chunk-Y6UM3VTN.mjs} +4 -4
  99. package/dist/components/ui/about-you-form.js +1120 -0
  100. package/dist/components/ui/about-you-form.mjs +323 -0
  101. package/dist/components/ui/account-list-carousel.js +304 -0
  102. package/dist/components/ui/account-list-carousel.mjs +11 -0
  103. package/dist/components/ui/add-column-modal.js +1 -1
  104. package/dist/components/ui/add-column-modal.mjs +6 -6
  105. package/dist/components/ui/add-lead-modal.js +2 -2
  106. package/dist/components/ui/add-lead-modal.mjs +6 -6
  107. package/dist/components/ui/advisor-card.mjs +2 -2
  108. package/dist/components/ui/agent-evaluation-toast.js +299 -0
  109. package/dist/components/ui/agent-evaluation-toast.mjs +12 -0
  110. package/dist/components/ui/ai-assistant-drawer.mjs +5 -5
  111. package/dist/components/ui/ai-builder.js +3 -3
  112. package/dist/components/ui/ai-builder.mjs +5 -5
  113. package/dist/components/ui/ai-conversations.js +2 -2
  114. package/dist/components/ui/ai-conversations.mjs +11 -11
  115. package/dist/components/ui/alert-dialog.mjs +3 -3
  116. package/dist/components/ui/applicant-document-checklist.js +346 -0
  117. package/dist/components/ui/applicant-document-checklist.mjs +10 -0
  118. package/dist/components/ui/applicant-expenses-section.js +455 -0
  119. package/dist/components/ui/applicant-expenses-section.mjs +220 -0
  120. package/dist/components/ui/applicant-navigation-bar.js +309 -0
  121. package/dist/components/ui/applicant-navigation-bar.mjs +87 -0
  122. package/dist/components/ui/applicant-switcher.js +268 -0
  123. package/dist/components/ui/applicant-switcher.mjs +46 -0
  124. package/dist/components/ui/application-mobile-layout.js +88 -0
  125. package/dist/components/ui/application-mobile-layout.mjs +8 -0
  126. package/dist/components/ui/appointment-action-dialogs.js +1 -1
  127. package/dist/components/ui/appointment-action-dialogs.mjs +10 -10
  128. package/dist/components/ui/appointment-availability-settings.js +78 -31
  129. package/dist/components/ui/appointment-availability-settings.mjs +12 -10
  130. package/dist/components/ui/appointment-book-dialog.js +137 -58
  131. package/dist/components/ui/appointment-book-dialog.mjs +14 -14
  132. package/dist/components/ui/appointment-calendar-view.js +1 -1
  133. package/dist/components/ui/appointment-calendar-view.mjs +4 -4
  134. package/dist/components/ui/appointment-detail-sheet.js +38 -11
  135. package/dist/components/ui/appointment-detail-sheet.mjs +13 -13
  136. package/dist/components/ui/appointment-gmail-connect.mjs +2 -2
  137. package/dist/components/ui/appointment-time-slot-picker.mjs +2 -2
  138. package/dist/components/ui/appointment-upcoming-card.js +1 -1
  139. package/dist/components/ui/appointment-upcoming-card.mjs +10 -10
  140. package/dist/components/ui/asset-accordion.js +506 -0
  141. package/dist/components/ui/asset-accordion.mjs +202 -0
  142. package/dist/components/ui/assets-liabilities-side-card.js +328 -0
  143. package/dist/components/ui/assets-liabilities-side-card.mjs +127 -0
  144. package/dist/components/ui/auth-page-layout.js +3 -3
  145. package/dist/components/ui/auth-page-layout.mjs +1 -1
  146. package/dist/components/ui/backoffice-alert-history-chart.mjs +4 -4
  147. package/dist/components/ui/backoffice-alert-matching-chart.js +786 -0
  148. package/dist/components/ui/backoffice-alert-matching-chart.mjs +19 -0
  149. package/dist/components/ui/backoffice-alerts-chart.mjs +4 -4
  150. package/dist/components/ui/backoffice-connections-chart.mjs +4 -4
  151. package/dist/components/ui/backoffice-contact-history-chart.mjs +4 -4
  152. package/dist/components/ui/backoffice-contact-matching-chart.js +803 -0
  153. package/dist/components/ui/backoffice-contact-matching-chart.mjs +19 -0
  154. package/dist/components/ui/backoffice-signup-steps.js +1673 -0
  155. package/dist/components/ui/backoffice-signup-steps.mjs +36 -0
  156. package/dist/components/ui/bank-statement-document-table.js +467 -0
  157. package/dist/components/ui/bank-statement-document-table.mjs +12 -0
  158. package/dist/components/ui/bank-statement-generate-dialog.js +1517 -0
  159. package/dist/components/ui/bank-statement-generate-dialog.mjs +27 -0
  160. package/dist/components/ui/bank-statement-pdf-viewer.js +525 -0
  161. package/dist/components/ui/bank-statement-pdf-viewer.mjs +14 -0
  162. package/dist/components/ui/banking-accounts-connect.js +336 -0
  163. package/dist/components/ui/banking-accounts-connect.mjs +114 -0
  164. package/dist/components/ui/borrowing-capacity-atoms.js +382 -0
  165. package/dist/components/ui/borrowing-capacity-atoms.mjs +17 -0
  166. package/dist/components/ui/borrowing-capacity-card.js +835 -0
  167. package/dist/components/ui/borrowing-capacity-card.mjs +89 -0
  168. package/dist/components/ui/borrowing-capacity-line-chart.mjs +4 -4
  169. package/dist/components/ui/broker-info-panel.js +281 -0
  170. package/dist/components/ui/broker-info-panel.mjs +59 -0
  171. package/dist/components/ui/calculator-input-item.js +101 -0
  172. package/dist/components/ui/calculator-input-item.mjs +8 -0
  173. package/dist/components/ui/calculator-section.js +743 -0
  174. package/dist/components/ui/calculator-section.mjs +220 -0
  175. package/dist/components/ui/calendar.mjs +2 -2
  176. package/dist/components/ui/cash-balance-line-chart.mjs +5 -5
  177. package/dist/components/ui/cashflow-bar-chart.mjs +4 -4
  178. package/dist/components/ui/category-edit-dialog.js +737 -0
  179. package/dist/components/ui/category-edit-dialog.mjs +16 -0
  180. package/dist/components/ui/chat-widget.mjs +3 -3
  181. package/dist/components/ui/color-picker.mjs +4 -4
  182. package/dist/components/ui/connect-bank-step.js +511 -0
  183. package/dist/components/ui/connect-bank-step.mjs +287 -0
  184. package/dist/components/ui/contact-alert-dialog.js +1405 -0
  185. package/dist/components/ui/contact-alert-dialog.mjs +27 -0
  186. package/dist/components/ui/create-contact-modal.js +1028 -0
  187. package/dist/components/ui/create-contact-modal.mjs +21 -0
  188. package/dist/components/ui/csv-import-modal.js +583 -0
  189. package/dist/components/ui/csv-import-modal.mjs +14 -0
  190. package/dist/components/ui/currency-input.js +439 -0
  191. package/dist/components/ui/currency-input.mjs +13 -0
  192. package/dist/components/ui/dashboard-expense-categories.js +355 -0
  193. package/dist/components/ui/dashboard-expense-categories.mjs +186 -0
  194. package/dist/components/ui/dashboard-transactions-table.js +1083 -0
  195. package/dist/components/ui/dashboard-transactions-table.mjs +177 -0
  196. package/dist/components/ui/data-table.mjs +6 -6
  197. package/dist/components/ui/date-picker.mjs +6 -6
  198. package/dist/components/ui/debt-accordion.js +523 -0
  199. package/dist/components/ui/debt-accordion.mjs +219 -0
  200. package/dist/components/ui/delete-contact-component.js +479 -0
  201. package/dist/components/ui/delete-contact-component.mjs +14 -0
  202. package/dist/components/ui/dialog.js +1 -1
  203. package/dist/components/ui/dialog.mjs +3 -3
  204. package/dist/components/ui/document-checklist-template.mjs +4 -4
  205. package/dist/components/ui/drawer.mjs +3 -3
  206. package/dist/components/ui/dropdown-menu.mjs +3 -3
  207. package/dist/components/ui/dynamic-tabs.js +274 -0
  208. package/dist/components/ui/dynamic-tabs.mjs +116 -0
  209. package/dist/components/ui/editable-money-item.js +306 -0
  210. package/dist/components/ui/editable-money-item.mjs +12 -0
  211. package/dist/components/ui/expense-bar-chart.mjs +4 -4
  212. package/dist/components/ui/expense-detail-item.js +506 -0
  213. package/dist/components/ui/expense-detail-item.mjs +15 -0
  214. package/dist/components/ui/expense-work-details.js +1259 -0
  215. package/dist/components/ui/expense-work-details.mjs +175 -0
  216. package/dist/components/ui/field.mjs +2 -2
  217. package/dist/components/ui/file-preview-dialog.js +704 -0
  218. package/dist/components/ui/file-preview-dialog.mjs +17 -0
  219. package/dist/components/ui/financial-cards.mjs +2 -2
  220. package/dist/components/ui/financial-drawers.js +1 -1
  221. package/dist/components/ui/financial-drawers.mjs +5 -5
  222. package/dist/components/ui/financial-sections.mjs +4 -4
  223. package/dist/components/ui/form-primitives.mjs +2 -2
  224. package/dist/components/ui/frontend-signup-steps.js +1239 -0
  225. package/dist/components/ui/frontend-signup-steps.mjs +38 -0
  226. package/dist/components/ui/income-bar-chart.mjs +4 -4
  227. package/dist/components/ui/income-sources-card.js +269 -0
  228. package/dist/components/ui/income-sources-card.mjs +100 -0
  229. package/dist/components/ui/income-summary-component.js +361 -0
  230. package/dist/components/ui/income-summary-component.mjs +84 -0
  231. package/dist/components/ui/income-work-details.js +1663 -0
  232. package/dist/components/ui/income-work-details.mjs +28 -0
  233. package/dist/components/ui/incoming-outgoings-card.js +218 -0
  234. package/dist/components/ui/incoming-outgoings-card.mjs +82 -0
  235. package/dist/components/ui/interest-rate-input.js +442 -0
  236. package/dist/components/ui/interest-rate-input.mjs +90 -0
  237. package/dist/components/ui/interest-rate-section.js +337 -0
  238. package/dist/components/ui/interest-rate-section.mjs +84 -0
  239. package/dist/components/ui/interest-rate-used.js +202 -0
  240. package/dist/components/ui/interest-rate-used.mjs +62 -0
  241. package/dist/components/ui/kanban-column.js +338 -160
  242. package/dist/components/ui/kanban-column.mjs +13 -11
  243. package/dist/components/ui/loan-applicant-information.js +336 -0
  244. package/dist/components/ui/loan-applicant-information.mjs +59 -0
  245. package/dist/components/ui/loan-applicant-invite.js +319 -0
  246. package/dist/components/ui/loan-applicant-invite.mjs +68 -0
  247. package/dist/components/ui/loan-application-badge.js +236 -0
  248. package/dist/components/ui/loan-application-badge.mjs +10 -0
  249. package/dist/components/ui/loan-application-cards.js +356 -0
  250. package/dist/components/ui/loan-application-cards.mjs +110 -0
  251. package/dist/components/ui/loan-entry-shell.js +104 -0
  252. package/dist/components/ui/loan-entry-shell.mjs +8 -0
  253. package/dist/components/ui/loan-financials.js +410 -0
  254. package/dist/components/ui/loan-financials.mjs +76 -0
  255. package/dist/components/ui/loan-option-card.js +102 -0
  256. package/dist/components/ui/loan-option-card.mjs +41 -0
  257. package/dist/components/ui/loan-option-group.js +288 -0
  258. package/dist/components/ui/loan-option-group.mjs +10 -0
  259. package/dist/components/ui/loan-steps.js +1121 -0
  260. package/dist/components/ui/loan-steps.mjs +509 -0
  261. package/dist/components/ui/loan-wizard-shell.js +452 -0
  262. package/dist/components/ui/loan-wizard-shell.mjs +11 -0
  263. package/dist/components/ui/money-input-with-slider.js +210 -0
  264. package/dist/components/ui/money-input-with-slider.mjs +10 -0
  265. package/dist/components/ui/money-item-with-color-indicator.js +314 -0
  266. package/dist/components/ui/money-item-with-color-indicator.mjs +20 -0
  267. package/dist/components/ui/opportunity-card.js +235 -97
  268. package/dist/components/ui/opportunity-card.mjs +11 -9
  269. package/dist/components/ui/opportunity-edit-modals.js +1 -1
  270. package/dist/components/ui/opportunity-edit-modals.mjs +15 -15
  271. package/dist/components/ui/opportunity-summary-tab.js +1 -1
  272. package/dist/components/ui/opportunity-summary-tab.mjs +19 -19
  273. package/dist/components/ui/pagination.mjs +4 -4
  274. package/dist/components/ui/password-strength-tooltip.mjs +4 -4
  275. package/dist/components/ui/pipeline-board.js +358 -176
  276. package/dist/components/ui/pipeline-board.mjs +16 -14
  277. package/dist/components/ui/pipeline-chart.mjs +3 -3
  278. package/dist/components/ui/pipeline-dialogs.js +1 -1
  279. package/dist/components/ui/pipeline-dialogs.mjs +9 -9
  280. package/dist/components/ui/pipeline-primitives.js +75 -8
  281. package/dist/components/ui/pipeline-primitives.mjs +3 -2
  282. package/dist/components/ui/popover.mjs +3 -3
  283. package/dist/components/ui/property-asset-card.js +428 -0
  284. package/dist/components/ui/property-asset-card.mjs +156 -0
  285. package/dist/components/ui/property-cashflow-doughnut-chart.mjs +4 -4
  286. package/dist/components/ui/property-debt-equity-doughnut-chart.mjs +4 -4
  287. package/dist/components/ui/property-list-carousel.js +295 -0
  288. package/dist/components/ui/property-list-carousel.mjs +11 -0
  289. package/dist/components/ui/property-mobile-estimate-line-chart.mjs +4 -4
  290. package/dist/components/ui/property-report-dialog.js +1148 -0
  291. package/dist/components/ui/property-report-dialog.mjs +25 -0
  292. package/dist/components/ui/resource-center.js +748 -0
  293. package/dist/components/ui/resource-center.mjs +24 -0
  294. package/dist/components/ui/review-alerts-dialog.js +569 -0
  295. package/dist/components/ui/review-alerts-dialog.mjs +15 -0
  296. package/dist/components/ui/savings-goal-modal.js +1148 -0
  297. package/dist/components/ui/savings-goal-modal.mjs +160 -0
  298. package/dist/components/ui/scenario-drawer.js +791 -0
  299. package/dist/components/ui/scenario-drawer.mjs +294 -0
  300. package/dist/components/ui/scenario-item.js +256 -0
  301. package/dist/components/ui/scenario-item.mjs +11 -0
  302. package/dist/components/ui/scenario-list.js +507 -0
  303. package/dist/components/ui/scenario-list.mjs +100 -0
  304. package/dist/components/ui/select.mjs +3 -3
  305. package/dist/components/ui/share-details-dialog.js +636 -0
  306. package/dist/components/ui/share-details-dialog.mjs +19 -0
  307. package/dist/components/ui/sheet.mjs +3 -3
  308. package/dist/components/ui/sidebar-nav.mjs +5 -5
  309. package/dist/components/ui/signup-form-primitives.js +770 -0
  310. package/dist/components/ui/signup-form-primitives.mjs +25 -0
  311. package/dist/components/ui/signup-shell.js +338 -0
  312. package/dist/components/ui/signup-shell.mjs +13 -0
  313. package/dist/components/ui/stage-timeline.js +103 -33
  314. package/dist/components/ui/stage-timeline.mjs +5 -4
  315. package/dist/components/ui/submission-confirmation-card.js +284 -0
  316. package/dist/components/ui/submission-confirmation-card.mjs +62 -0
  317. package/dist/components/ui/tooltip.mjs +3 -3
  318. package/dist/components/ui/top-three-product.js +374 -0
  319. package/dist/components/ui/top-three-product.mjs +129 -0
  320. package/dist/components/ui/transactions-expense-categories-doughnut-chart.mjs +4 -4
  321. package/dist/components/ui/transactions-income-expense-bar-chart.mjs +5 -5
  322. package/dist/components/ui/transactions-liabilities-breakdown-doughnut-chart.mjs +4 -4
  323. package/dist/components/ui/transactions-summary-block.js +95 -0
  324. package/dist/components/ui/transactions-summary-block.mjs +34 -0
  325. package/dist/components/ui/two-fa-setup-form.mjs +3 -3
  326. package/dist/index.js +9430 -4573
  327. package/dist/index.mjs +404 -251
  328. package/dist/lib/colors.js +6 -0
  329. package/dist/lib/colors.mjs +3 -1
  330. package/dist/lib/theme-provider.mjs +2 -2
  331. package/dist/styles.css +1 -1
  332. package/package.json +367 -3
  333. package/src/components/index.tsx +223 -0
  334. package/src/components/ui/about-you-form.tsx +397 -0
  335. package/src/components/ui/account-list-carousel.tsx +87 -0
  336. package/src/components/ui/add-lead-modal.tsx +1 -1
  337. package/src/components/ui/agent-evaluation-toast.tsx +191 -0
  338. package/src/components/ui/ai-builder.tsx +3 -5
  339. package/src/components/ui/ai-conversations.tsx +1 -1
  340. package/src/components/ui/applicant-document-checklist.tsx +175 -0
  341. package/src/components/ui/applicant-expenses-section.tsx +260 -0
  342. package/src/components/ui/applicant-navigation-bar.tsx +104 -0
  343. package/src/components/ui/applicant-switcher.tsx +54 -0
  344. package/src/components/ui/application-mobile-layout.tsx +34 -0
  345. package/src/components/ui/appointment-availability-settings.tsx +115 -23
  346. package/src/components/ui/appointment-book-dialog.tsx +406 -259
  347. package/src/components/ui/appointment-calendar-view.tsx +4 -1
  348. package/src/components/ui/appointment-detail-sheet.tsx +59 -24
  349. package/src/components/ui/appointment-time-slot-picker.tsx +5 -1
  350. package/src/components/ui/asset-accordion.tsx +241 -0
  351. package/src/components/ui/assets-liabilities-side-card.tsx +157 -0
  352. package/src/components/ui/auth-page-layout.tsx +3 -3
  353. package/src/components/ui/backoffice-alert-matching-chart.tsx +320 -0
  354. package/src/components/ui/backoffice-contact-matching-chart.tsx +341 -0
  355. package/src/components/ui/backoffice-signup-steps.tsx +615 -0
  356. package/src/components/ui/bank-statement-document-table.tsx +222 -0
  357. package/src/components/ui/bank-statement-generate-dialog.tsx +435 -0
  358. package/src/components/ui/bank-statement-pdf-viewer.tsx +241 -0
  359. package/src/components/ui/banking-accounts-connect.tsx +187 -0
  360. package/src/components/ui/borrowing-capacity-atoms.tsx +228 -0
  361. package/src/components/ui/borrowing-capacity-card.tsx +155 -0
  362. package/src/components/ui/broker-info-panel.tsx +94 -0
  363. package/src/components/ui/calculator-input-item.tsx +49 -0
  364. package/src/components/ui/calculator-section.tsx +275 -0
  365. package/src/components/ui/category-edit-dialog.tsx +300 -0
  366. package/src/components/ui/connect-bank-step.tsx +379 -0
  367. package/src/components/ui/contact-alert-dialog.tsx +710 -0
  368. package/src/components/ui/create-contact-modal.tsx +237 -0
  369. package/src/components/ui/csv-import-modal.tsx +153 -0
  370. package/src/components/ui/currency-input.tsx +104 -0
  371. package/src/components/ui/dashboard-expense-categories.tsx +262 -0
  372. package/src/components/ui/dashboard-transactions-table.tsx +241 -0
  373. package/src/components/ui/debt-accordion.tsx +254 -0
  374. package/src/components/ui/delete-contact-component.tsx +87 -0
  375. package/src/components/ui/dialog.tsx +2 -2
  376. package/src/components/ui/dynamic-tabs.tsx +149 -0
  377. package/src/components/ui/editable-money-item.tsx +176 -0
  378. package/src/components/ui/expense-detail-item.tsx +216 -0
  379. package/src/components/ui/expense-work-details.tsx +229 -0
  380. package/src/components/ui/file-preview-dialog.tsx +292 -0
  381. package/src/components/ui/financial-drawers.tsx +1 -1
  382. package/src/components/ui/frontend-signup-steps.tsx +548 -0
  383. package/src/components/ui/income-sources-card.tsx +143 -0
  384. package/src/components/ui/income-summary-component.tsx +120 -0
  385. package/src/components/ui/income-work-details.tsx +429 -0
  386. package/src/components/ui/incoming-outgoings-card.tsx +111 -0
  387. package/src/components/ui/interest-rate-input.tsx +111 -0
  388. package/src/components/ui/interest-rate-section.tsx +158 -0
  389. package/src/components/ui/interest-rate-used.tsx +82 -0
  390. package/src/components/ui/kanban-column.tsx +53 -2
  391. package/src/components/ui/loan-applicant-information.tsx +64 -0
  392. package/src/components/ui/loan-applicant-invite.tsx +67 -0
  393. package/src/components/ui/loan-application-badge.tsx +70 -0
  394. package/src/components/ui/loan-application-cards.tsx +152 -0
  395. package/src/components/ui/loan-entry-shell.tsx +86 -0
  396. package/src/components/ui/loan-financials.tsx +77 -0
  397. package/src/components/ui/loan-option-card.tsx +62 -0
  398. package/src/components/ui/loan-option-group.tsx +106 -0
  399. package/src/components/ui/loan-steps.tsx +630 -0
  400. package/src/components/ui/loan-wizard-shell.tsx +235 -0
  401. package/src/components/ui/money-input-with-slider.tsx +77 -0
  402. package/src/components/ui/money-item-with-color-indicator.tsx +30 -0
  403. package/src/components/ui/opportunity-card.tsx +46 -18
  404. package/src/components/ui/pipeline-board.tsx +13 -0
  405. package/src/components/ui/pipeline-primitives.tsx +28 -0
  406. package/src/components/ui/property-asset-card.tsx +221 -0
  407. package/src/components/ui/property-list-carousel.tsx +73 -0
  408. package/src/components/ui/property-report-dialog.tsx +355 -0
  409. package/src/components/ui/resource-center.tsx +539 -0
  410. package/src/components/ui/review-alerts-dialog.tsx +163 -0
  411. package/src/components/ui/savings-goal-modal.tsx +169 -0
  412. package/src/components/ui/scenario-drawer.tsx +358 -0
  413. package/src/components/ui/scenario-item.tsx +141 -0
  414. package/src/components/ui/scenario-list.tsx +150 -0
  415. package/src/components/ui/share-details-dialog.tsx +238 -0
  416. package/src/components/ui/signup-form-primitives.tsx +212 -0
  417. package/src/components/ui/signup-shell.tsx +180 -0
  418. package/src/components/ui/stage-timeline.tsx +11 -0
  419. package/src/components/ui/submission-confirmation-card.tsx +68 -0
  420. package/src/components/ui/top-three-product.tsx +207 -0
  421. package/src/components/ui/transactions-summary-block.tsx +59 -0
  422. package/src/lib/colors.ts +12 -0
  423. package/src/lib/format-date.ts +2 -2
  424. package/src/styles/styles-css.ts +1 -1
  425. package/tsup.config.ts +77 -1
  426. package/dist/{chunk-5VOTTIXF.mjs → chunk-FRT3S72S.mjs} +3 -3
  427. package/dist/{chunk-7BTFGCFC.mjs → chunk-MUV4EGDW.mjs} +3 -3
  428. package/dist/{chunk-57ZXILTS.mjs → chunk-MXP2RX2V.mjs} +3 -3
  429. package/dist/{chunk-ZKWXDQDG.mjs → chunk-VCDGLN25.mjs} +3 -3
  430. package/dist/{chunk-FLL633WS.mjs → chunk-ZXEUBBHJ.mjs} +3 -3
@@ -0,0 +1,1663 @@
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/income-work-details.tsx
60
+ var income_work_details_exports = {};
61
+ __export(income_work_details_exports, {
62
+ IncomeWorkDetails: () => IncomeWorkDetails
63
+ });
64
+ module.exports = __toCommonJS(income_work_details_exports);
65
+ var React7 = __toESM(require("react"));
66
+
67
+ // src/lib/utils.ts
68
+ var import_clsx = require("clsx");
69
+ var import_tailwind_merge = require("tailwind-merge");
70
+ var twMerge = (0, import_tailwind_merge.extendTailwindMerge)({
71
+ extend: {
72
+ classGroups: {
73
+ "font-size": [
74
+ {
75
+ text: [
76
+ "display-large",
77
+ "display-medium",
78
+ "display-small",
79
+ "h1",
80
+ "h2",
81
+ "h3",
82
+ "h4",
83
+ "h5",
84
+ "h6",
85
+ "body-large",
86
+ "body-medium",
87
+ "body-small",
88
+ "label-large",
89
+ "label-medium",
90
+ "label-small",
91
+ "button",
92
+ "button-xs",
93
+ "caption",
94
+ "overline",
95
+ "code"
96
+ ]
97
+ }
98
+ ]
99
+ }
100
+ }
101
+ });
102
+ function cn(...inputs) {
103
+ return twMerge((0, import_clsx.clsx)(inputs));
104
+ }
105
+
106
+ // src/components/ui/button.tsx
107
+ var import_react = require("react");
108
+ var import_class_variance_authority = require("class-variance-authority");
109
+ var import_lucide_react = require("lucide-react");
110
+
111
+ // src/lib/slot.tsx
112
+ var React = __toESM(require("react"));
113
+ function mergeRefs(...refs) {
114
+ return (value) => {
115
+ for (const ref of refs) {
116
+ if (typeof ref === "function") ref(value);
117
+ else if (ref !== null)
118
+ ref.current = value;
119
+ }
120
+ };
121
+ }
122
+ var Slot = React.forwardRef(
123
+ (_a, forwardedRef) => {
124
+ var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
125
+ const child = React.Children.only(children);
126
+ if (!React.isValidElement(child)) return null;
127
+ const childProps = child.props;
128
+ const merged = __spreadValues({}, props);
129
+ for (const key of Object.keys(childProps)) {
130
+ if (key === "className") {
131
+ merged.className = [props.className, childProps.className].filter(Boolean).join(" ");
132
+ } else if (key === "style") {
133
+ merged.style = __spreadValues(__spreadValues({}, props.style), childProps.style);
134
+ } else if (key.startsWith("on") && typeof childProps[key] === "function") {
135
+ const parentHandler = props[key];
136
+ if (typeof parentHandler === "function") {
137
+ merged[key] = (...args) => {
138
+ childProps[key](...args);
139
+ parentHandler(...args);
140
+ };
141
+ } else {
142
+ merged[key] = childProps[key];
143
+ }
144
+ } else {
145
+ merged[key] = childProps[key];
146
+ }
147
+ }
148
+ const childRef = child.ref;
149
+ merged.ref = forwardedRef ? mergeRefs(forwardedRef, childRef) : childRef;
150
+ return React.cloneElement(
151
+ child,
152
+ merged
153
+ );
154
+ }
155
+ );
156
+ Slot.displayName = "Slot";
157
+
158
+ // src/components/ui/button.tsx
159
+ var import_jsx_runtime = require("react/jsx-runtime");
160
+ var buttonVariants = (0, import_class_variance_authority.cva)(
161
+ "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",
162
+ {
163
+ variants: {
164
+ variant: {
165
+ default: "bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",
166
+ secondary: "bg-brand-secondary text-brand-secondary-foreground shadow-xs hover:bg-brand-secondary/80 focus-visible:ring-brand-secondary/30",
167
+ 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",
168
+ outline: "border border-input bg-background shadow-xs hover:bg-accent hover:text-accent-foreground focus-visible:border-border focus-visible:ring-border/50 dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
169
+ "outline-primary": "border border-primary text-foreground bg-transparent shadow-xs hover:bg-primary/5 focus-visible:ring-primary/50",
170
+ "outline-secondary": "border border-brand-secondary text-brand-secondary bg-transparent shadow-xs hover:bg-brand-secondary/10 focus-visible:border-brand-secondary focus-visible:ring-brand-secondary/30",
171
+ ghost: "hover:bg-accent hover:text-accent-foreground hover:shadow-xs focus-visible:ring-border/50 dark:hover:bg-accent/50",
172
+ link: "text-primary underline-offset-4 hover:underline"
173
+ },
174
+ size: {
175
+ default: "h-9 px-4 py-2 has-[>svg]:px-3",
176
+ xs: "h-6 gap-1 px-2 text-button-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",
177
+ sm: "h-8 gap-1.5 px-3 has-[>svg]:px-2.5",
178
+ lg: "h-10 px-6 has-[>svg]:px-4",
179
+ icon: "size-9",
180
+ "icon-xs": "size-6 [&_svg:not([class*='size-'])]:size-3",
181
+ "icon-sm": "size-8",
182
+ "icon-lg": "size-10"
183
+ }
184
+ },
185
+ defaultVariants: {
186
+ variant: "default",
187
+ size: "default"
188
+ }
189
+ }
190
+ );
191
+ var Button = (0, import_react.forwardRef)(function Button2(_a, ref) {
192
+ var _b = _a, {
193
+ className,
194
+ variant,
195
+ size,
196
+ asChild = false,
197
+ loading = false,
198
+ disabled,
199
+ type = "button",
200
+ children
201
+ } = _b, props = __objRest(_b, [
202
+ "className",
203
+ "variant",
204
+ "size",
205
+ "asChild",
206
+ "loading",
207
+ "disabled",
208
+ "type",
209
+ "children"
210
+ ]);
211
+ const Comp = asChild ? Slot : "button";
212
+ const isIconOnly = size === "icon" || size === "icon-xs" || size === "icon-sm" || size === "icon-lg";
213
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
214
+ Comp,
215
+ __spreadProps(__spreadValues({
216
+ className: cn(buttonVariants({ variant, size, className })),
217
+ "data-size": size,
218
+ "data-slot": "button",
219
+ "data-variant": variant,
220
+ disabled: loading || disabled,
221
+ ref,
222
+ type
223
+ }, props), {
224
+ children: loading ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
225
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Loader2, { "aria-hidden": "true", className: "animate-spin" }),
226
+ !isIconOnly && children
227
+ ] }) : children
228
+ })
229
+ );
230
+ });
231
+
232
+ // src/components/ui/card.tsx
233
+ var import_jsx_runtime2 = require("react/jsx-runtime");
234
+ function Card(_a) {
235
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
236
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
237
+ "div",
238
+ __spreadValues({
239
+ className: cn(
240
+ "flex flex-col gap-6 border bg-card py-6 text-card-foreground shadow-sm",
241
+ className
242
+ ),
243
+ "data-slot": "card"
244
+ }, props)
245
+ );
246
+ }
247
+ function CardHeader(_a) {
248
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
249
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
250
+ "div",
251
+ __spreadValues({
252
+ className: cn(
253
+ "@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-center gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",
254
+ className
255
+ ),
256
+ "data-slot": "card-header"
257
+ }, props)
258
+ );
259
+ }
260
+ function CardTitle(_a) {
261
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
262
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
263
+ "div",
264
+ __spreadValues({
265
+ className: cn("text-label-large", className),
266
+ "data-slot": "card-title"
267
+ }, props)
268
+ );
269
+ }
270
+ function CardAction(_a) {
271
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
272
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
273
+ "div",
274
+ __spreadValues({
275
+ className: cn(
276
+ "col-start-2 row-span-2 row-start-1 self-start justify-self-end",
277
+ className
278
+ ),
279
+ "data-slot": "card-action"
280
+ }, props)
281
+ );
282
+ }
283
+ function CardContent(_a) {
284
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
285
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
286
+ "div",
287
+ __spreadValues({
288
+ className: cn("px-6", className),
289
+ "data-slot": "card-content"
290
+ }, props)
291
+ );
292
+ }
293
+
294
+ // src/components/ui/input.tsx
295
+ var import_jsx_runtime3 = require("react/jsx-runtime");
296
+ function Input(_a) {
297
+ var _b = _a, { className, type } = _b, props = __objRest(_b, ["className", "type"]);
298
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
299
+ "input",
300
+ __spreadValues({
301
+ className: cn(
302
+ "h-9 w-full min-w-0 border border-input bg-transparent px-3 py-1 text-body-medium font-sans shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-label-medium file:text-foreground placeholder:font-normal placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 dark:bg-input/30",
303
+ "focus-visible:border-primary focus-visible:ring-[3px] focus-visible:ring-primary/20",
304
+ "aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",
305
+ className
306
+ ),
307
+ "data-slot": "input",
308
+ type
309
+ }, props)
310
+ );
311
+ }
312
+
313
+ // src/components/ui/checkbox.tsx
314
+ var import_react2 = require("react");
315
+ var import_lucide_react2 = require("lucide-react");
316
+ var import_checkbox = require("@base-ui/react/checkbox");
317
+ var import_jsx_runtime4 = require("react/jsx-runtime");
318
+ function Checkbox(_a) {
319
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
320
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
321
+ import_checkbox.Checkbox.Root,
322
+ __spreadProps(__spreadValues({
323
+ className: cn(
324
+ "peer group inline-flex size-4 shrink-0 border border-input shadow-xs transition-all outline-none",
325
+ "focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50",
326
+ "disabled:cursor-not-allowed disabled:opacity-50",
327
+ "aria-invalid:border-destructive aria-invalid:ring-destructive/20",
328
+ "data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground",
329
+ "data-indeterminate:border-primary data-indeterminate:bg-primary data-indeterminate:text-primary-foreground",
330
+ // Dark mode (upstream shadcn)
331
+ "dark:bg-input/30 dark:aria-invalid:ring-destructive/40 dark:data-checked:bg-primary",
332
+ // Stacked (2 attr selectors) → wins over single-attr rules above
333
+ "aria-invalid:data-checked:border-destructive aria-invalid:data-checked:bg-destructive aria-invalid:data-checked:text-destructive-foreground",
334
+ "aria-invalid:data-indeterminate:border-destructive aria-invalid:data-indeterminate:bg-destructive aria-invalid:data-indeterminate:text-destructive-foreground",
335
+ className
336
+ ),
337
+ "data-slot": "checkbox"
338
+ }, props), {
339
+ children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
340
+ import_checkbox.Checkbox.Indicator,
341
+ {
342
+ className: "grid place-content-center text-current transition-none",
343
+ "data-slot": "checkbox-indicator",
344
+ children: [
345
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react2.CheckIcon, { className: "size-3.5 group-data-indeterminate:hidden" }),
346
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react2.MinusIcon, { className: "size-3.5 hidden group-data-indeterminate:block" })
347
+ ]
348
+ }
349
+ )
350
+ })
351
+ );
352
+ }
353
+
354
+ // src/components/ui/radio-group.tsx
355
+ var import_lucide_react3 = require("lucide-react");
356
+ var import_radio_group = require("@base-ui/react/radio-group");
357
+ var import_radio = require("@base-ui/react/radio");
358
+ var import_jsx_runtime5 = require("react/jsx-runtime");
359
+ var CIRCLE_BASE = "inline-flex items-center justify-center aspect-square size-4 shrink-0 rounded-full border border-primary bg-background";
360
+ var INDICATOR_DOT = "size-2 fill-background text-background";
361
+ function RadioGroup(_a) {
362
+ var _b = _a, {
363
+ className
364
+ } = _b, props = __objRest(_b, [
365
+ "className"
366
+ ]);
367
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
368
+ import_radio_group.RadioGroup,
369
+ __spreadValues({
370
+ className: cn("grid gap-3", className),
371
+ "data-slot": "radio-group"
372
+ }, props)
373
+ );
374
+ }
375
+ function RadioGroupItem(_a) {
376
+ var _b = _a, {
377
+ className
378
+ } = _b, props = __objRest(_b, [
379
+ "className"
380
+ ]);
381
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
382
+ import_radio.Radio.Root,
383
+ __spreadProps(__spreadValues({
384
+ className: cn(
385
+ CIRCLE_BASE,
386
+ "transition-all outline-none",
387
+ "focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50",
388
+ "disabled:cursor-not-allowed disabled:opacity-50",
389
+ "data-checked:bg-primary",
390
+ "aria-invalid:border-destructive aria-invalid:ring-destructive/20",
391
+ "aria-invalid:data-checked:border-destructive aria-invalid:data-checked:bg-destructive",
392
+ "dark:bg-input/30 dark:aria-invalid:ring-destructive/40",
393
+ className
394
+ ),
395
+ "data-slot": "radio-group-item"
396
+ }, props), {
397
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
398
+ import_radio.Radio.Indicator,
399
+ {
400
+ "data-slot": "radio-group-indicator",
401
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_lucide_react3.CircleIcon, { className: INDICATOR_DOT })
402
+ }
403
+ )
404
+ })
405
+ );
406
+ }
407
+
408
+ // src/components/ui/toggle-group.tsx
409
+ var React2 = __toESM(require("react"));
410
+ var import_toggle_group = require("@base-ui/react/toggle-group");
411
+ var import_toggle2 = require("@base-ui/react/toggle");
412
+
413
+ // src/components/ui/toggle.tsx
414
+ var import_class_variance_authority2 = require("class-variance-authority");
415
+ var import_toggle = require("@base-ui/react/toggle");
416
+ var import_jsx_runtime6 = require("react/jsx-runtime");
417
+ var toggleVariants = (0, import_class_variance_authority2.cva)(
418
+ "inline-flex items-center justify-center gap-2 whitespace-nowrap transition-[color,box-shadow] 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 data-pressed:bg-primary/10 data-pressed:inset-ring data-pressed:inset-ring-primary data-pressed:text-foreground data-pressed:hover:bg-primary/10 data-pressed:hover:text-foreground dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
419
+ {
420
+ variants: {
421
+ variant: {
422
+ default: "bg-transparent hover:bg-muted hover:text-muted-foreground",
423
+ outline: "border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"
424
+ },
425
+ size: {
426
+ default: "h-9 min-w-9 px-2 text-label-large",
427
+ sm: "h-8 min-w-8 px-1.5 text-label-medium",
428
+ lg: "h-10 min-w-10 px-2.5 text-h5"
429
+ }
430
+ },
431
+ defaultVariants: {
432
+ variant: "default",
433
+ size: "default"
434
+ }
435
+ }
436
+ );
437
+
438
+ // src/components/ui/toggle-group.tsx
439
+ var import_jsx_runtime7 = require("react/jsx-runtime");
440
+ var ToggleGroupContext = React2.createContext({
441
+ size: "default",
442
+ variant: "default",
443
+ spacing: 0
444
+ });
445
+ function ToggleGroup(_a) {
446
+ var _b = _a, {
447
+ className,
448
+ variant,
449
+ size,
450
+ spacing = 0,
451
+ type,
452
+ children
453
+ } = _b, props = __objRest(_b, [
454
+ "className",
455
+ "variant",
456
+ "size",
457
+ "spacing",
458
+ "type",
459
+ "children"
460
+ ]);
461
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
462
+ import_toggle_group.ToggleGroup,
463
+ __spreadProps(__spreadValues({
464
+ className: cn(
465
+ // WealthX: removed rounded-md (sharp corners) and shadow-xs (flat panels)
466
+ "group/toggle-group flex w-fit items-center gap-[--spacing(var(--gap))]",
467
+ className
468
+ ),
469
+ "data-size": size,
470
+ "data-slot": "toggle-group",
471
+ "data-spacing": spacing,
472
+ "data-variant": variant,
473
+ multiple: type === "multiple",
474
+ style: { "--gap": spacing }
475
+ }, props), {
476
+ children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(ToggleGroupContext.Provider, { value: { variant, size, spacing }, children })
477
+ })
478
+ );
479
+ }
480
+ function ToggleGroupItem(_a) {
481
+ var _b = _a, {
482
+ className,
483
+ children,
484
+ variant,
485
+ size
486
+ } = _b, props = __objRest(_b, [
487
+ "className",
488
+ "children",
489
+ "variant",
490
+ "size"
491
+ ]);
492
+ const context = React2.useContext(ToggleGroupContext);
493
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
494
+ import_toggle2.Toggle,
495
+ __spreadProps(__spreadValues({
496
+ className: cn(
497
+ toggleVariants({
498
+ variant: context.variant || variant,
499
+ size: context.size || size
500
+ }),
501
+ "w-auto min-w-0 shrink-0 focus:z-10 focus-visible:z-10",
502
+ // WealthX: no rounded corners on grouped items
503
+ "data-[spacing=0]:rounded-none data-[spacing=0]:shadow-none data-[spacing=0]:data-[variant=outline]:border-l-0 data-[spacing=0]:data-[variant=outline]:first:border-l",
504
+ className
505
+ ),
506
+ "data-size": context.size || size,
507
+ "data-slot": "toggle-group-item",
508
+ "data-spacing": context.spacing,
509
+ "data-variant": context.variant || variant
510
+ }, props), {
511
+ children
512
+ })
513
+ );
514
+ }
515
+
516
+ // src/components/ui/loan-option-group.tsx
517
+ var import_jsx_runtime8 = require("react/jsx-runtime");
518
+ function LoanOptionGroup({
519
+ title,
520
+ options,
521
+ value,
522
+ values = [],
523
+ onChange,
524
+ multiple = false,
525
+ max,
526
+ showRank = false,
527
+ allowUnSelect = true,
528
+ error = false,
529
+ helperText,
530
+ disabled = false,
531
+ className
532
+ }) {
533
+ const controlledValue = multiple ? values : value ? [value] : [];
534
+ const handleValueChange = (next) => {
535
+ var _a;
536
+ if (multiple) {
537
+ if (max !== void 0 && next.length > max) return;
538
+ onChange([...next]);
539
+ } else {
540
+ if (next.length === 0 && !allowUnSelect) return;
541
+ onChange((_a = next[0]) != null ? _a : "");
542
+ }
543
+ };
544
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: cn("flex flex-col gap-3 font-sans", className), children: [
545
+ title && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
546
+ "p",
547
+ {
548
+ className: cn(
549
+ "text-sm font-medium text-foreground",
550
+ error && "text-destructive"
551
+ ),
552
+ children: title
553
+ }
554
+ ),
555
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
556
+ ToggleGroup,
557
+ {
558
+ value: controlledValue,
559
+ onValueChange: handleValueChange,
560
+ variant: "outline",
561
+ type: multiple ? "multiple" : "single",
562
+ spacing: 2,
563
+ disabled,
564
+ className: "flex-wrap justify-start",
565
+ children: options.map((opt) => {
566
+ const rank = showRank && multiple ? values.indexOf(opt.value) : -1;
567
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
568
+ ToggleGroupItem,
569
+ {
570
+ value: opt.value,
571
+ className: "h-auto px-4 py-2 text-sm font-medium",
572
+ children: [
573
+ rank >= 0 && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "text-xs font-bold opacity-70", children: [
574
+ "#",
575
+ rank + 1
576
+ ] }),
577
+ opt.label
578
+ ]
579
+ },
580
+ opt.value
581
+ );
582
+ })
583
+ }
584
+ ),
585
+ error && helperText && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "text-xs text-destructive", children: helperText })
586
+ ] });
587
+ }
588
+
589
+ // src/components/ui/form-primitives.tsx
590
+ var React4 = __toESM(require("react"));
591
+ var import_lucide_react4 = require("lucide-react");
592
+
593
+ // src/components/ui/label.tsx
594
+ var import_jsx_runtime9 = (
595
+ // eslint-disable-next-line jsx-a11y/label-has-associated-control -- htmlFor is passed by the consumer
596
+ require("react/jsx-runtime")
597
+ );
598
+
599
+ // src/components/ui/slider.tsx
600
+ var React3 = __toESM(require("react"));
601
+ var import_slider = require("@base-ui/react/slider");
602
+ var import_jsx_runtime10 = require("react/jsx-runtime");
603
+ var Slider = React3.forwardRef(
604
+ ({
605
+ className,
606
+ value,
607
+ defaultValue = 0,
608
+ min = 0,
609
+ max = 100,
610
+ step = 1,
611
+ disabled = false,
612
+ onValueChange
613
+ }, ref) => {
614
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
615
+ import_slider.Slider.Root,
616
+ {
617
+ ref,
618
+ value,
619
+ defaultValue,
620
+ min,
621
+ max,
622
+ step,
623
+ disabled,
624
+ thumbAlignment: "edge",
625
+ onValueChange: (val) => onValueChange == null ? void 0 : onValueChange(val),
626
+ "data-slot": "slider",
627
+ className: cn(
628
+ "relative w-full touch-none select-none",
629
+ disabled && "opacity-50",
630
+ className
631
+ ),
632
+ children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
633
+ import_slider.Slider.Control,
634
+ {
635
+ className: "relative flex h-5 w-full cursor-pointer items-center",
636
+ "data-slot": "slider-control",
637
+ children: [
638
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
639
+ import_slider.Slider.Track,
640
+ {
641
+ className: "relative h-2 w-full overflow-hidden rounded-full bg-muted",
642
+ "data-slot": "slider-track",
643
+ children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
644
+ import_slider.Slider.Indicator,
645
+ {
646
+ className: "absolute h-full rounded-full bg-primary",
647
+ "data-slot": "slider-indicator"
648
+ }
649
+ )
650
+ }
651
+ ),
652
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
653
+ import_slider.Slider.Thumb,
654
+ {
655
+ className: cn(
656
+ "block size-5 rounded-full border-2 border-primary bg-background shadow-sm",
657
+ "outline-none"
658
+ ),
659
+ "data-slot": "slider-thumb"
660
+ }
661
+ )
662
+ ]
663
+ }
664
+ )
665
+ }
666
+ );
667
+ }
668
+ );
669
+ Slider.displayName = "Slider";
670
+
671
+ // src/components/ui/form-primitives.tsx
672
+ var import_jsx_runtime11 = require("react/jsx-runtime");
673
+ function parseCurrencyToNumber(raw) {
674
+ const cleaned = raw.replace(/[^0-9.]/g, "");
675
+ const n = parseFloat(cleaned);
676
+ return isNaN(n) ? 0 : n;
677
+ }
678
+ function formatNumberToCurrency(n) {
679
+ return "$" + Math.round(n).toLocaleString("en-AU");
680
+ }
681
+ function CurrencyInputWithSlider({
682
+ value: controlledValue,
683
+ defaultValue = 0,
684
+ min = 0,
685
+ max = 5e6,
686
+ step = 1e4,
687
+ disabled = false,
688
+ onValueChange,
689
+ className
690
+ }) {
691
+ const [internalValue, setInternalValue] = React4.useState(defaultValue);
692
+ const numericValue = controlledValue !== void 0 ? controlledValue : internalValue;
693
+ const [inputText, setInputText] = React4.useState(
694
+ formatNumberToCurrency(numericValue)
695
+ );
696
+ const [isFocused, setIsFocused] = React4.useState(false);
697
+ React4.useEffect(() => {
698
+ if (!isFocused) {
699
+ setInputText(formatNumberToCurrency(numericValue));
700
+ }
701
+ }, [numericValue, isFocused]);
702
+ const commitValue = (n) => {
703
+ const clamped = Math.max(min, Math.min(max, n));
704
+ if (controlledValue === void 0) setInternalValue(clamped);
705
+ onValueChange == null ? void 0 : onValueChange(clamped);
706
+ setInputText(formatNumberToCurrency(clamped));
707
+ };
708
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: cn("flex flex-col gap-3", className), children: [
709
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
710
+ Input,
711
+ {
712
+ type: "text",
713
+ value: isFocused ? inputText : formatNumberToCurrency(numericValue),
714
+ disabled,
715
+ onFocus: () => {
716
+ setIsFocused(true);
717
+ setInputText(formatNumberToCurrency(numericValue));
718
+ },
719
+ onChange: (e) => setInputText(e.target.value),
720
+ onBlur: () => {
721
+ setIsFocused(false);
722
+ commitValue(parseCurrencyToNumber(inputText));
723
+ },
724
+ onKeyDown: (e) => {
725
+ if (e.key === "Enter") {
726
+ e.target.blur();
727
+ }
728
+ },
729
+ className: "tabular-nums",
730
+ "aria-label": "Currency amount"
731
+ }
732
+ ),
733
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
734
+ Slider,
735
+ {
736
+ value: numericValue,
737
+ min,
738
+ max,
739
+ step,
740
+ disabled,
741
+ onValueChange: (n) => {
742
+ if (controlledValue === void 0) setInternalValue(n);
743
+ onValueChange == null ? void 0 : onValueChange(n);
744
+ }
745
+ }
746
+ )
747
+ ] });
748
+ }
749
+ var DEFAULT_SUGGESTIONS = [
750
+ {
751
+ id: "1",
752
+ label: "12 Harbour View Terrace, Mosman NSW 2088",
753
+ suburb: "Mosman",
754
+ state: "NSW",
755
+ postcode: "2088"
756
+ },
757
+ {
758
+ id: "2",
759
+ label: "5 Coastal Road, Manly NSW 2095",
760
+ suburb: "Manly",
761
+ state: "NSW",
762
+ postcode: "2095"
763
+ },
764
+ {
765
+ id: "3",
766
+ label: "24 Collins Street, Melbourne VIC 3000",
767
+ suburb: "Melbourne",
768
+ state: "VIC",
769
+ postcode: "3000"
770
+ },
771
+ {
772
+ id: "4",
773
+ label: "88 Pacific Highway, St Leonards NSW 2065",
774
+ suburb: "St Leonards",
775
+ state: "NSW",
776
+ postcode: "2065"
777
+ },
778
+ {
779
+ id: "5",
780
+ label: "1 Queen Street, Brisbane QLD 4000",
781
+ suburb: "Brisbane",
782
+ state: "QLD",
783
+ postcode: "4000"
784
+ }
785
+ ];
786
+ function AddressAutocomplete({
787
+ value: controlledValue,
788
+ placeholder = "Start typing an address\u2026",
789
+ suggestions = DEFAULT_SUGGESTIONS,
790
+ disabled = false,
791
+ onValueChange,
792
+ onSelect,
793
+ className
794
+ }) {
795
+ const [internalValue, setInternalValue] = React4.useState("");
796
+ const inputValue = controlledValue !== void 0 ? controlledValue : internalValue;
797
+ const [open, setOpen] = React4.useState(false);
798
+ const [activeIndex, setActiveIndex] = React4.useState(-1);
799
+ const containerRef = React4.useRef(null);
800
+ const listRef = React4.useRef(null);
801
+ const filtered = React4.useMemo(() => {
802
+ if (!inputValue.trim()) return suggestions.slice(0, 5);
803
+ const q = inputValue.toLowerCase();
804
+ return suggestions.filter((s) => s.label.toLowerCase().includes(q)).slice(0, 5);
805
+ }, [inputValue, suggestions]);
806
+ const setValue = (v) => {
807
+ if (controlledValue === void 0) setInternalValue(v);
808
+ onValueChange == null ? void 0 : onValueChange(v);
809
+ };
810
+ const handleSelect = (opt) => {
811
+ setValue(opt.label);
812
+ onSelect == null ? void 0 : onSelect(opt);
813
+ setOpen(false);
814
+ setActiveIndex(-1);
815
+ };
816
+ const handleKeyDown = (e) => {
817
+ if (!open) return;
818
+ if (e.key === "ArrowDown") {
819
+ e.preventDefault();
820
+ setActiveIndex((i) => Math.min(i + 1, filtered.length - 1));
821
+ } else if (e.key === "ArrowUp") {
822
+ e.preventDefault();
823
+ setActiveIndex((i) => Math.max(i - 1, -1));
824
+ } else if (e.key === "Enter" && activeIndex >= 0) {
825
+ e.preventDefault();
826
+ handleSelect(filtered[activeIndex]);
827
+ } else if (e.key === "Escape") {
828
+ setOpen(false);
829
+ }
830
+ };
831
+ React4.useEffect(() => {
832
+ const handler = (e) => {
833
+ if (containerRef.current && !containerRef.current.contains(e.target)) {
834
+ setOpen(false);
835
+ }
836
+ };
837
+ document.addEventListener("mousedown", handler);
838
+ return () => document.removeEventListener("mousedown", handler);
839
+ }, []);
840
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { ref: containerRef, className: cn("relative", className), children: [
841
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "relative", children: [
842
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_lucide_react4.Search, { className: "absolute left-2.5 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-muted-foreground pointer-events-none" }),
843
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
844
+ Input,
845
+ {
846
+ type: "text",
847
+ value: inputValue,
848
+ placeholder,
849
+ disabled,
850
+ className: "pl-8",
851
+ onChange: (e) => {
852
+ setValue(e.target.value);
853
+ setOpen(true);
854
+ setActiveIndex(-1);
855
+ },
856
+ onFocus: () => setOpen(true),
857
+ onKeyDown: handleKeyDown,
858
+ "aria-autocomplete": "list",
859
+ "aria-expanded": open
860
+ }
861
+ )
862
+ ] }),
863
+ open && filtered.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
864
+ "ul",
865
+ {
866
+ ref: listRef,
867
+ role: "listbox",
868
+ className: cn(
869
+ "absolute z-50 top-full left-0 right-0 mt-1",
870
+ "border border-border bg-popover shadow-md",
871
+ "max-h-48 overflow-y-auto py-1"
872
+ ),
873
+ children: filtered.map((opt, idx) => /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
874
+ "li",
875
+ {
876
+ role: "option",
877
+ "aria-selected": idx === activeIndex,
878
+ onMouseEnter: () => setActiveIndex(idx),
879
+ onMouseDown: (e) => {
880
+ e.preventDefault();
881
+ handleSelect(opt);
882
+ },
883
+ className: cn(
884
+ "flex items-center gap-2 px-3 py-2 text-sm cursor-pointer",
885
+ idx === activeIndex ? "bg-accent text-accent-foreground" : "hover:bg-accent/50"
886
+ ),
887
+ children: [
888
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "flex-1 truncate", children: opt.label }),
889
+ idx === activeIndex && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_lucide_react4.Check, { className: "h-3.5 w-3.5 shrink-0 text-primary" })
890
+ ]
891
+ },
892
+ opt.id
893
+ ))
894
+ }
895
+ )
896
+ ] });
897
+ }
898
+
899
+ // src/components/ui/accordion.tsx
900
+ var import_lucide_react5 = require("lucide-react");
901
+ var import_accordion = require("@base-ui/react/accordion");
902
+ var import_jsx_runtime12 = require("react/jsx-runtime");
903
+ function Accordion(props) {
904
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_accordion.Accordion.Root, __spreadValues({ "data-slot": "accordion" }, props));
905
+ }
906
+ function AccordionItem(_a) {
907
+ var _b = _a, {
908
+ className
909
+ } = _b, props = __objRest(_b, [
910
+ "className"
911
+ ]);
912
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
913
+ import_accordion.Accordion.Item,
914
+ __spreadValues({
915
+ className: cn("border-b", className),
916
+ "data-slot": "accordion-item"
917
+ }, props)
918
+ );
919
+ }
920
+ function AccordionTrigger(_a) {
921
+ var _b = _a, {
922
+ className,
923
+ children
924
+ } = _b, props = __objRest(_b, [
925
+ "className",
926
+ "children"
927
+ ]);
928
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_accordion.Accordion.Header, { className: "flex", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
929
+ import_accordion.Accordion.Trigger,
930
+ __spreadProps(__spreadValues({
931
+ className: cn(
932
+ // layout
933
+ "flex flex-1 items-center justify-between gap-4 py-4 text-left",
934
+ // typography
935
+ "text-label-medium",
936
+ // base
937
+ "rounded-none outline-none transition-[color,opacity]",
938
+ // interactive states
939
+ "hover:underline",
940
+ "focus-visible:ring-2 focus-visible:ring-foreground/30",
941
+ "disabled:pointer-events-none disabled:opacity-50",
942
+ // chevron rotation when open
943
+ "[&[data-panel-open]>svg]:rotate-180",
944
+ className
945
+ ),
946
+ "data-slot": "accordion-trigger"
947
+ }, props), {
948
+ children: [
949
+ children,
950
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react5.ChevronDownIcon, { className: "pointer-events-none size-4 shrink-0 text-muted-foreground transition-transform duration-200" })
951
+ ]
952
+ })
953
+ ) });
954
+ }
955
+ function AccordionContent(_a) {
956
+ var _b = _a, {
957
+ className,
958
+ children
959
+ } = _b, props = __objRest(_b, [
960
+ "className",
961
+ "children"
962
+ ]);
963
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
964
+ import_accordion.Accordion.Panel,
965
+ __spreadProps(__spreadValues({
966
+ className: "overflow-hidden text-body-small h-(--accordion-panel-height) transition-[height] duration-200 ease-out data-starting-style:h-0 data-ending-style:h-0",
967
+ "data-slot": "accordion-content"
968
+ }, props), {
969
+ children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: cn("pb-4 text-muted-foreground", className), children })
970
+ })
971
+ );
972
+ }
973
+
974
+ // src/components/ui/income-bar-chart.tsx
975
+ var import_react4 = require("react");
976
+ var import_chart = require("chart.js");
977
+ var import_react_chartjs_2 = require("react-chartjs-2");
978
+
979
+ // src/lib/theme-provider.tsx
980
+ var import_react3 = require("react");
981
+ var import_jsx_runtime13 = require("react/jsx-runtime");
982
+ var ThemeVarsContext = (0, import_react3.createContext)({});
983
+ function useThemeVars() {
984
+ return (0, import_react3.useContext)(ThemeVarsContext);
985
+ }
986
+
987
+ // src/components/ui/empty.tsx
988
+ var import_class_variance_authority3 = require("class-variance-authority");
989
+ var import_jsx_runtime14 = require("react/jsx-runtime");
990
+ function Empty(_a) {
991
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
992
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
993
+ "div",
994
+ __spreadValues({
995
+ className: cn(
996
+ "flex min-w-0 flex-1 flex-col items-center justify-center gap-6 border border-dashed p-6 text-center text-balance md:p-12",
997
+ className
998
+ ),
999
+ "data-slot": "empty"
1000
+ }, props)
1001
+ );
1002
+ }
1003
+ var emptyMediaVariants = (0, import_class_variance_authority3.cva)(
1004
+ "mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0",
1005
+ {
1006
+ variants: {
1007
+ variant: {
1008
+ default: "[&_svg:not([class*='size-'])]:size-10",
1009
+ icon: "flex size-10 shrink-0 items-center justify-center text-muted-foreground [&_svg:not([class*='size-'])]:size-6"
1010
+ }
1011
+ },
1012
+ defaultVariants: {
1013
+ variant: "default"
1014
+ }
1015
+ }
1016
+ );
1017
+ function EmptyDescription(_a) {
1018
+ var _b = _a, {
1019
+ className
1020
+ } = _b, props = __objRest(_b, [
1021
+ "className"
1022
+ ]);
1023
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1024
+ "div",
1025
+ __spreadValues({
1026
+ className: cn(
1027
+ "text-body-small leading-relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",
1028
+ className
1029
+ ),
1030
+ "data-slot": "empty-description"
1031
+ }, props)
1032
+ );
1033
+ }
1034
+
1035
+ // src/components/ui/skeleton.tsx
1036
+ var import_jsx_runtime15 = require("react/jsx-runtime");
1037
+ function Skeleton(_a) {
1038
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
1039
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1040
+ "div",
1041
+ __spreadValues({
1042
+ className: cn("animate-pulse bg-muted", className),
1043
+ "data-slot": "skeleton"
1044
+ }, props)
1045
+ );
1046
+ }
1047
+
1048
+ // src/lib/format-currency.ts
1049
+ function formatCurrency(value, options) {
1050
+ const { decimals = 0, showSign = false } = options != null ? options : {};
1051
+ const abs = Math.abs(value);
1052
+ const formatted = new Intl.NumberFormat("en-AU", {
1053
+ style: "currency",
1054
+ currency: "AUD",
1055
+ minimumFractionDigits: decimals,
1056
+ maximumFractionDigits: decimals
1057
+ }).format(abs);
1058
+ if (!showSign) return value < 0 ? `-${formatted}` : formatted;
1059
+ if (value > 0) return `+${formatted}`;
1060
+ if (value < 0) return `-${formatted}`;
1061
+ return formatted;
1062
+ }
1063
+
1064
+ // src/components/ui/chart-shared.tsx
1065
+ var import_jsx_runtime16 = require("react/jsx-runtime");
1066
+ var CHART_SLICE_COUNT = {
1067
+ monthly: { 1: 1, 3: 3, 6: 6, 12: 12 },
1068
+ daily: { 1: 30, 3: 90, 6: 180, 12: 365 }
1069
+ };
1070
+ var CHART_PERIODS = {
1071
+ monthly: [3, 6, 12],
1072
+ daily: [1, 3, 6, 12]
1073
+ };
1074
+ function hexToRgba(hex, alpha) {
1075
+ const clean = hex.replace("#", "");
1076
+ const full = clean.length === 3 ? clean.split("").map((c) => c + c).join("") : clean;
1077
+ const r = parseInt(full.slice(0, 2), 16);
1078
+ const g = parseInt(full.slice(2, 4), 16);
1079
+ const b = parseInt(full.slice(4, 6), 16);
1080
+ return `rgba(${r},${g},${b},${alpha})`;
1081
+ }
1082
+ var DATASET_ALPHAS = [1, 0.72, 0.52, 0.36, 0.24, 0.15];
1083
+ var FALLBACK_PRIMARY = "#33FF99";
1084
+ var FALLBACK_TICK = "#9EAAB5";
1085
+ function formatTooltipDate(iso, granularity) {
1086
+ const d = new Date(iso);
1087
+ return d.toLocaleDateString(
1088
+ "en-US",
1089
+ granularity === "daily" ? { month: "short", day: "numeric", year: "numeric" } : { month: "short", year: "numeric" }
1090
+ );
1091
+ }
1092
+ function ChartLegendItem({
1093
+ label,
1094
+ color,
1095
+ lineStyle
1096
+ }) {
1097
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex items-center gap-1.5", children: [
1098
+ lineStyle ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1099
+ "svg",
1100
+ {
1101
+ width: "20",
1102
+ height: "10",
1103
+ viewBox: "0 0 20 10",
1104
+ "aria-hidden": "true",
1105
+ style: { flexShrink: 0 },
1106
+ children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1107
+ "line",
1108
+ {
1109
+ x1: "0",
1110
+ y1: "5",
1111
+ x2: "20",
1112
+ y2: "5",
1113
+ stroke: color,
1114
+ strokeWidth: "2",
1115
+ strokeLinecap: "square",
1116
+ strokeDasharray: lineStyle === "dashed" ? "5 3" : void 0
1117
+ }
1118
+ )
1119
+ }
1120
+ ) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1121
+ "div",
1122
+ {
1123
+ style: {
1124
+ width: 10,
1125
+ height: 10,
1126
+ backgroundColor: color,
1127
+ flexShrink: 0
1128
+ }
1129
+ }
1130
+ ),
1131
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "text-[11px] text-muted-foreground leading-none", children: label })
1132
+ ] });
1133
+ }
1134
+ function ChartPeriodButton({
1135
+ period,
1136
+ active,
1137
+ onClick,
1138
+ unit = "M"
1139
+ }) {
1140
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
1141
+ Button,
1142
+ {
1143
+ variant: active ? "default" : "outline",
1144
+ size: "xs",
1145
+ onClick,
1146
+ children: [
1147
+ period,
1148
+ unit
1149
+ ]
1150
+ }
1151
+ );
1152
+ }
1153
+
1154
+ // src/components/ui/income-bar-chart.tsx
1155
+ var import_jsx_runtime17 = require("react/jsx-runtime");
1156
+ import_chart.Chart.register(
1157
+ import_chart.CategoryScale,
1158
+ import_chart.LinearScale,
1159
+ import_chart.BarController,
1160
+ import_chart.BarElement,
1161
+ import_chart.Tooltip,
1162
+ import_chart.Legend
1163
+ );
1164
+ function IncomeBarChart({
1165
+ incomeData,
1166
+ title = "Income",
1167
+ showLegend = true,
1168
+ showXAxis = true,
1169
+ showYAxis = true,
1170
+ legendPosition = "top",
1171
+ defaultPeriod = 6,
1172
+ granularity = "monthly",
1173
+ height = 280,
1174
+ width = "100%",
1175
+ className,
1176
+ isLoading = false
1177
+ }) {
1178
+ const periods = CHART_PERIODS[granularity];
1179
+ const [period, setPeriod] = (0, import_react4.useState)(defaultPeriod);
1180
+ const isFirstRender = (0, import_react4.useRef)(true);
1181
+ (0, import_react4.useEffect)(() => {
1182
+ if (isFirstRender.current) {
1183
+ isFirstRender.current = false;
1184
+ return;
1185
+ }
1186
+ setPeriod(CHART_PERIODS[granularity][0]);
1187
+ }, [granularity]);
1188
+ const themeVars = useThemeVars();
1189
+ const brandPrimary = themeVars["--theme-primary"] || FALLBACK_PRIMARY;
1190
+ const fontFamily = themeVars["--font-sans"] || "Figtree, sans-serif";
1191
+ const sliced = (0, import_react4.useMemo)(() => {
1192
+ var _a, _b;
1193
+ if (!((_a = incomeData == null ? void 0 : incomeData.months) == null ? void 0 : _a.length) || !incomeData.datasets.length) return null;
1194
+ const count = Math.min(
1195
+ CHART_SLICE_COUNT[granularity][period],
1196
+ incomeData.months.length
1197
+ );
1198
+ const start = incomeData.months.length - count;
1199
+ return {
1200
+ months: incomeData.months.slice(start),
1201
+ dates: (_b = incomeData.dates) == null ? void 0 : _b.slice(start),
1202
+ datasets: incomeData.datasets.map((ds) => __spreadProps(__spreadValues({}, ds), {
1203
+ data: ds.data.slice(start)
1204
+ }))
1205
+ };
1206
+ }, [incomeData, period, granularity]);
1207
+ const datasetColors = (0, import_react4.useMemo)(
1208
+ () => {
1209
+ var _a;
1210
+ return (_a = sliced == null ? void 0 : sliced.datasets.map(
1211
+ (_, i) => hexToRgba(brandPrimary, DATASET_ALPHAS[i % DATASET_ALPHAS.length])
1212
+ )) != null ? _a : [];
1213
+ },
1214
+ [sliced, brandPrimary]
1215
+ );
1216
+ const chartData = (0, import_react4.useMemo)(() => {
1217
+ if (!sliced) return { labels: [], datasets: [] };
1218
+ return {
1219
+ labels: sliced.months,
1220
+ datasets: sliced.datasets.map((ds, i) => ({
1221
+ label: ds.label,
1222
+ data: ds.data,
1223
+ backgroundColor: datasetColors[i],
1224
+ hoverBackgroundColor: hexToRgba(
1225
+ brandPrimary,
1226
+ Math.min(DATASET_ALPHAS[i % DATASET_ALPHAS.length] + 0.15, 1)
1227
+ ),
1228
+ borderWidth: 0,
1229
+ borderRadius: 0,
1230
+ borderSkipped: false,
1231
+ barPercentage: 0.75,
1232
+ categoryPercentage: 0.7,
1233
+ stack: "income"
1234
+ }))
1235
+ };
1236
+ }, [sliced, datasetColors, brandPrimary]);
1237
+ const options = (0, import_react4.useMemo)(
1238
+ () => ({
1239
+ responsive: true,
1240
+ maintainAspectRatio: false,
1241
+ animation: { duration: 800, easing: "easeOutQuart" },
1242
+ layout: { padding: 0 },
1243
+ plugins: {
1244
+ legend: { display: false },
1245
+ tooltip: {
1246
+ mode: "index",
1247
+ intersect: false,
1248
+ padding: 12,
1249
+ cornerRadius: 0,
1250
+ titleFont: { size: 11, weight: 600 },
1251
+ bodyFont: { size: 12, weight: 500 },
1252
+ callbacks: {
1253
+ title: (tooltipItems) => {
1254
+ var _a, _b, _c, _d;
1255
+ const idx = (_a = tooltipItems[0]) == null ? void 0 : _a.dataIndex;
1256
+ if (idx != null && ((_b = sliced == null ? void 0 : sliced.dates) == null ? void 0 : _b[idx])) {
1257
+ return formatTooltipDate(sliced.dates[idx], granularity);
1258
+ }
1259
+ return (_d = (_c = tooltipItems[0]) == null ? void 0 : _c.label) != null ? _d : "";
1260
+ },
1261
+ label: (ctx) => {
1262
+ const val = ctx.raw;
1263
+ if (val === 0) return;
1264
+ return ` ${ctx.dataset.label}: $${val.toLocaleString()}`;
1265
+ }
1266
+ }
1267
+ }
1268
+ },
1269
+ scales: {
1270
+ x: {
1271
+ display: showXAxis,
1272
+ stacked: true,
1273
+ grid: { display: false },
1274
+ border: { display: false },
1275
+ ticks: { font: { size: 10 }, color: FALLBACK_TICK }
1276
+ },
1277
+ y: {
1278
+ display: showYAxis,
1279
+ stacked: true,
1280
+ grid: { display: false },
1281
+ border: { display: false },
1282
+ ticks: {
1283
+ font: { size: 10 },
1284
+ color: FALLBACK_TICK,
1285
+ maxTicksLimit: 5,
1286
+ padding: 8,
1287
+ callback: (v) => `$${Number(v).toLocaleString()}`
1288
+ }
1289
+ }
1290
+ }
1291
+ }),
1292
+ [showXAxis, showYAxis, sliced, granularity]
1293
+ );
1294
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
1295
+ Card,
1296
+ {
1297
+ className: cn("w-full py-4 sm:py-6 gap-2", className),
1298
+ style: { maxWidth: width, fontFamily },
1299
+ children: [
1300
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(CardHeader, { className: "px-3 sm:px-6", children: [
1301
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(CardTitle, { className: "text-xs font-semibold uppercase tracking-wide", children: title }),
1302
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(CardAction, { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "flex gap-0.5 sm:gap-1", children: periods.map((p) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1303
+ ChartPeriodButton,
1304
+ {
1305
+ period: p,
1306
+ active: period === p,
1307
+ onClick: () => setPeriod(p)
1308
+ },
1309
+ p
1310
+ )) }) })
1311
+ ] }),
1312
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(CardContent, { className: "px-3 sm:px-6", children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Skeleton, { style: { height, width: "100%" } }) : !sliced ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Empty, { className: "flex-none p-4", style: { height }, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(EmptyDescription, { children: "No data available" }) }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex flex-col gap-2", children: [
1313
+ showLegend && legendPosition === "top" && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "flex flex-wrap gap-x-3 gap-y-1.5 pb-2", children: sliced.datasets.map((ds, i) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1314
+ ChartLegendItem,
1315
+ {
1316
+ label: ds.label,
1317
+ color: datasetColors[i]
1318
+ },
1319
+ ds.label
1320
+ )) }),
1321
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { style: { height, width: "100%", position: "relative" }, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1322
+ import_react_chartjs_2.Chart,
1323
+ {
1324
+ type: "bar",
1325
+ data: chartData,
1326
+ options,
1327
+ "aria-label": title
1328
+ },
1329
+ brandPrimary
1330
+ ) }),
1331
+ showLegend && legendPosition === "bottom" && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "flex flex-wrap gap-x-3 gap-y-1.5 pt-2", children: sliced.datasets.map((ds, i) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1332
+ ChartLegendItem,
1333
+ {
1334
+ label: ds.label,
1335
+ color: datasetColors[i]
1336
+ },
1337
+ ds.label
1338
+ )) })
1339
+ ] }) })
1340
+ ]
1341
+ }
1342
+ );
1343
+ }
1344
+
1345
+ // src/components/ui/income-work-details.tsx
1346
+ var import_jsx_runtime18 = require("react/jsx-runtime");
1347
+ var EMPLOYMENT_TYPE_OPTIONS = [
1348
+ { value: "payg", label: "PAYG" },
1349
+ { value: "self-employed", label: "Self Employed" },
1350
+ { value: "unemployed", label: "Unemployed" },
1351
+ { value: "retired", label: "Retired" }
1352
+ ];
1353
+ var EMPLOYMENT_STATUS_OPTIONS = [
1354
+ { value: "primary", label: "Primary" },
1355
+ { value: "secondary", label: "Secondary" }
1356
+ ];
1357
+ var EMPLOYMENT_BASIS_OPTIONS = [
1358
+ { value: "contract", label: "Contract" },
1359
+ { value: "temporary", label: "Temporary" },
1360
+ { value: "casual", label: "Casual" }
1361
+ ];
1362
+ var INCOME_FREQUENCY_OPTIONS = [
1363
+ { value: "monthly", label: "Monthly" },
1364
+ { value: "weekly", label: "Weekly" }
1365
+ ];
1366
+ function IncomeSourceForm({
1367
+ source,
1368
+ onChange
1369
+ }) {
1370
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
1371
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex flex-col gap-4 pt-2", children: [
1372
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1373
+ LoanOptionGroup,
1374
+ {
1375
+ options: EMPLOYMENT_TYPE_OPTIONS,
1376
+ value: (_a = source.employmentType) != null ? _a : "",
1377
+ onChange: (v) => {
1378
+ if (typeof v === "string")
1379
+ onChange({ employmentType: v });
1380
+ }
1381
+ }
1382
+ ),
1383
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1384
+ LoanOptionGroup,
1385
+ {
1386
+ title: "Employment Status",
1387
+ options: EMPLOYMENT_STATUS_OPTIONS,
1388
+ value: (_b = source.employmentStatus) != null ? _b : "",
1389
+ onChange: (v) => {
1390
+ if (typeof v === "string")
1391
+ onChange({ employmentStatus: v });
1392
+ }
1393
+ }
1394
+ ),
1395
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1396
+ LoanOptionGroup,
1397
+ {
1398
+ title: "Employment Type",
1399
+ options: EMPLOYMENT_BASIS_OPTIONS,
1400
+ value: (_c = source.employmentBasis) != null ? _c : "",
1401
+ onChange: (v) => {
1402
+ if (typeof v === "string")
1403
+ onChange({ employmentBasis: v });
1404
+ }
1405
+ }
1406
+ ),
1407
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex flex-col gap-1.5", children: [
1408
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("label", { className: "text-label-small text-muted-foreground", children: "Job Title" }),
1409
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1410
+ Input,
1411
+ {
1412
+ value: (_d = source.jobTitle) != null ? _d : "",
1413
+ onChange: (e) => onChange({ jobTitle: e.target.value }),
1414
+ placeholder: "e.g. Software Engineer"
1415
+ }
1416
+ )
1417
+ ] }),
1418
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
1419
+ "div",
1420
+ {
1421
+ className: source.stillInPosition === false ? "grid grid-cols-2 gap-3" : void 0,
1422
+ children: [
1423
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex flex-col gap-1.5", children: [
1424
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("label", { className: "text-label-small text-muted-foreground", children: "Start Date" }),
1425
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1426
+ Input,
1427
+ {
1428
+ type: "date",
1429
+ value: (_e = source.startDate) != null ? _e : "",
1430
+ onChange: (e) => onChange({ startDate: e.target.value })
1431
+ }
1432
+ )
1433
+ ] }),
1434
+ source.stillInPosition === false && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex flex-col gap-1.5", children: [
1435
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("label", { className: "text-label-small text-muted-foreground", children: "End Date" }),
1436
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1437
+ Input,
1438
+ {
1439
+ type: "date",
1440
+ value: (_f = source.endDate) != null ? _f : "",
1441
+ onChange: (e) => onChange({ endDate: e.target.value })
1442
+ }
1443
+ )
1444
+ ] })
1445
+ ]
1446
+ }
1447
+ ),
1448
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex items-center gap-2", children: [
1449
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1450
+ Checkbox,
1451
+ {
1452
+ id: `${source.id}-still-in-position`,
1453
+ checked: (_g = source.stillInPosition) != null ? _g : true,
1454
+ onCheckedChange: (checked) => onChange({ stillInPosition: checked === true })
1455
+ }
1456
+ ),
1457
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1458
+ "label",
1459
+ {
1460
+ htmlFor: `${source.id}-still-in-position`,
1461
+ className: "text-body-small cursor-pointer",
1462
+ children: "Still in position"
1463
+ }
1464
+ )
1465
+ ] }),
1466
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex flex-col gap-1.5", children: [
1467
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("label", { className: "text-label-small text-muted-foreground", children: "Company Name" }),
1468
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1469
+ Input,
1470
+ {
1471
+ value: (_h = source.companyName) != null ? _h : "",
1472
+ onChange: (e) => onChange({ companyName: e.target.value }),
1473
+ placeholder: "e.g. Acme Corporation"
1474
+ }
1475
+ )
1476
+ ] }),
1477
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex flex-col gap-1.5", children: [
1478
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("label", { className: "text-label-small text-muted-foreground", children: "Company Address" }),
1479
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1480
+ AddressAutocomplete,
1481
+ {
1482
+ value: (_i = source.companyAddress) != null ? _i : "",
1483
+ onValueChange: (v) => onChange({ companyAddress: v })
1484
+ }
1485
+ )
1486
+ ] }),
1487
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex flex-col gap-1.5", children: [
1488
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("label", { className: "text-label-small text-muted-foreground", children: "Income Amount" }),
1489
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex items-start gap-3", children: [
1490
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1491
+ CurrencyInputWithSlider,
1492
+ {
1493
+ className: "flex-1",
1494
+ value: (_j = source.incomeAmount) != null ? _j : 0,
1495
+ min: 0,
1496
+ max: 5e4,
1497
+ step: 100,
1498
+ onValueChange: (v) => onChange({ incomeAmount: v })
1499
+ }
1500
+ ),
1501
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1502
+ LoanOptionGroup,
1503
+ {
1504
+ className: "shrink-0",
1505
+ options: INCOME_FREQUENCY_OPTIONS,
1506
+ value: (_k = source.incomeFrequency) != null ? _k : "",
1507
+ onChange: (v) => {
1508
+ if (typeof v === "string")
1509
+ onChange({ incomeFrequency: v });
1510
+ }
1511
+ }
1512
+ )
1513
+ ] })
1514
+ ] }),
1515
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex flex-col gap-2", children: [
1516
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-label-small text-muted-foreground", children: "Type of Company" }),
1517
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
1518
+ RadioGroup,
1519
+ {
1520
+ value: source.companyType,
1521
+ onValueChange: (v) => onChange({ companyType: v }),
1522
+ className: "flex flex-row gap-4",
1523
+ children: [
1524
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex items-center gap-2", children: [
1525
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(RadioGroupItem, { value: "public", id: `${source.id}-public` }),
1526
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1527
+ "label",
1528
+ {
1529
+ htmlFor: `${source.id}-public`,
1530
+ className: "text-body-small cursor-pointer",
1531
+ children: "Public"
1532
+ }
1533
+ )
1534
+ ] }),
1535
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex items-center gap-2", children: [
1536
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(RadioGroupItem, { value: "private", id: `${source.id}-private` }),
1537
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1538
+ "label",
1539
+ {
1540
+ htmlFor: `${source.id}-private`,
1541
+ className: "text-body-small cursor-pointer",
1542
+ children: "Private"
1543
+ }
1544
+ )
1545
+ ] })
1546
+ ]
1547
+ }
1548
+ )
1549
+ ] })
1550
+ ] });
1551
+ }
1552
+ function IncomeWorkDetails({
1553
+ applicantName,
1554
+ totalIncome,
1555
+ incomeData,
1556
+ sources,
1557
+ onSourceChange,
1558
+ onAddSource,
1559
+ onConnectMore,
1560
+ className
1561
+ }) {
1562
+ const [openItems, setOpenItems] = React7.useState(
1563
+ sources.length > 0 ? [sources[0].id] : []
1564
+ );
1565
+ React7.useEffect(() => {
1566
+ setOpenItems((current) => {
1567
+ const currentSet = new Set(current);
1568
+ const newIds = sources.map((s) => s.id).filter((id) => !currentSet.has(id));
1569
+ return newIds.length > 0 ? [...current, ...newIds] : current;
1570
+ });
1571
+ }, [sources]);
1572
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: cn("flex flex-col gap-6 font-sans", className), children: [
1573
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("h2", { className: "text-h1 text-foreground", children: [
1574
+ applicantName,
1575
+ "'s Income"
1576
+ ] }),
1577
+ totalIncome !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex items-center gap-4", children: [
1578
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Card, { className: "shrink-0 w-[202px]", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(CardContent, { className: "flex flex-col gap-3 p-4", children: [
1579
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex flex-col gap-1 flex-1", children: [
1580
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-h2 text-foreground", children: formatCurrency(totalIncome) }),
1581
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-body-small text-muted-foreground", children: "Total latest 12 months" })
1582
+ ] }),
1583
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1584
+ Button,
1585
+ {
1586
+ variant: "secondary",
1587
+ size: "sm",
1588
+ className: "w-fit",
1589
+ onClick: onConnectMore,
1590
+ children: "Add More Account +"
1591
+ }
1592
+ )
1593
+ ] }) }),
1594
+ incomeData && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1595
+ IncomeBarChart,
1596
+ {
1597
+ incomeData,
1598
+ bare: true,
1599
+ showLegend: false,
1600
+ showYAxis: true,
1601
+ showXAxis: true,
1602
+ defaultPeriod: 12,
1603
+ height: 160,
1604
+ className: "flex-1"
1605
+ }
1606
+ )
1607
+ ] }),
1608
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex flex-col gap-2", children: [
1609
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("h3", { className: "text-h3 text-foreground", children: "Income Sources" }),
1610
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex flex-col gap-1.5", children: [
1611
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-label-small text-muted-foreground", children: "Total Income" }),
1612
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1613
+ "div",
1614
+ {
1615
+ className: cn(
1616
+ "h-5 w-full",
1617
+ totalIncome ? "bg-primary" : "bg-muted"
1618
+ )
1619
+ }
1620
+ )
1621
+ ] })
1622
+ ] }),
1623
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex flex-col gap-3", children: [
1624
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("h3", { className: "text-h3 text-foreground", children: "Work Details" }),
1625
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1626
+ Accordion,
1627
+ {
1628
+ type: "multiple",
1629
+ value: openItems,
1630
+ onValueChange: setOpenItems,
1631
+ className: "border-t border-border",
1632
+ children: sources.map((source) => {
1633
+ var _a;
1634
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(AccordionItem, { value: source.id, children: [
1635
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(AccordionTrigger, { children: (_a = source.label) != null ? _a : "Main Income Source" }),
1636
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(AccordionContent, { className: "text-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1637
+ IncomeSourceForm,
1638
+ {
1639
+ source,
1640
+ onChange: (updates) => onSourceChange == null ? void 0 : onSourceChange(source.id, updates)
1641
+ }
1642
+ ) })
1643
+ ] }, source.id);
1644
+ })
1645
+ }
1646
+ ),
1647
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1648
+ Button,
1649
+ {
1650
+ variant: "outline",
1651
+ size: "sm",
1652
+ className: "w-fit",
1653
+ onClick: onAddSource,
1654
+ children: "Add More +"
1655
+ }
1656
+ )
1657
+ ] })
1658
+ ] });
1659
+ }
1660
+ // Annotate the CommonJS export names for ESM import in node:
1661
+ 0 && (module.exports = {
1662
+ IncomeWorkDetails
1663
+ });