@wealthx/shadcn 1.3.1 → 1.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (313) hide show
  1. package/.turbo/turbo-build.log +259 -223
  2. package/CHANGELOG.md +12 -0
  3. package/dist/{chunk-2UM72RJ7.mjs → chunk-2D3HQPFN.mjs} +12 -10
  4. package/dist/chunk-2EM2FRU6.mjs +613 -0
  5. package/dist/{chunk-FH6QVUVZ.mjs → chunk-2GIYVERS.mjs} +2 -2
  6. package/dist/chunk-2P7HP7LR.mjs +68 -0
  7. package/dist/{chunk-HISNT2MG.mjs → chunk-37AE3OM5.mjs} +5 -5
  8. package/dist/{chunk-HBZLGDIN.mjs → chunk-3ERBUVHC.mjs} +169 -110
  9. package/dist/{chunk-C7CQJNMR.mjs → chunk-3VDET466.mjs} +2 -2
  10. package/dist/{chunk-462HMNO4.mjs → chunk-4MM7LHM5.mjs} +2 -2
  11. package/dist/{chunk-QMY3AZJH.mjs → chunk-4Z66LMIQ.mjs} +2 -2
  12. package/dist/{chunk-U5X52X37.mjs → chunk-57ZXILTS.mjs} +6 -6
  13. package/dist/{chunk-3OYFOX3X.mjs → chunk-5VOTTIXF.mjs} +2 -2
  14. package/dist/{chunk-LBMRIB3G.mjs → chunk-6AJUS7VX.mjs} +1 -1
  15. package/dist/{chunk-OODBHKG7.mjs → chunk-6HIOM2HL.mjs} +7 -4
  16. package/dist/{chunk-BDYZCBRT.mjs → chunk-6QAFGZC2.mjs} +2 -2
  17. package/dist/{chunk-U4NDAF2P.mjs → chunk-6TX73WG7.mjs} +1 -1
  18. package/dist/{chunk-GD4BJDJR.mjs → chunk-7BTFGCFC.mjs} +4 -4
  19. package/dist/{chunk-FAKPBKLT.mjs → chunk-7GWRPXHD.mjs} +4 -4
  20. package/dist/{chunk-NMOI6CQD.mjs → chunk-7YI3HEBH.mjs} +5 -5
  21. package/dist/{chunk-T4BJLT57.mjs → chunk-AE7MASLF.mjs} +5 -5
  22. package/dist/{chunk-VLQZANBF.mjs → chunk-AFML43VJ.mjs} +6 -1
  23. package/dist/chunk-BBXSNDS3.mjs +260 -0
  24. package/dist/chunk-BOW7U26Y.mjs +203 -0
  25. package/dist/{chunk-34NWQURD.mjs → chunk-BS75ICOO.mjs} +2 -2
  26. package/dist/chunk-D2NSIIXG.mjs +394 -0
  27. package/dist/{chunk-3GF7OVTP.mjs → chunk-DGNHGNYH.mjs} +2 -2
  28. package/dist/{chunk-VLARHE5V.mjs → chunk-DMXYRCHM.mjs} +6 -6
  29. package/dist/{chunk-OGOYQ7BG.mjs → chunk-DQB4EPIS.mjs} +1 -1
  30. package/dist/{chunk-MIZQHHUO.mjs → chunk-FL6DZFJK.mjs} +106 -38
  31. package/dist/{chunk-I3RZS7V2.mjs → chunk-FLL633WS.mjs} +19 -33
  32. package/dist/{chunk-PBL4OQV2.mjs → chunk-FTPBQVQ6.mjs} +4 -4
  33. package/dist/chunk-FYPSTTEJ.mjs +169 -0
  34. package/dist/{chunk-6O6KD7CE.mjs → chunk-G27TSQLQ.mjs} +6 -6
  35. package/dist/{chunk-66MI7Q4B.mjs → chunk-GT3RU6GA.mjs} +2 -2
  36. package/dist/{chunk-D6ID6M4V.mjs → chunk-GTAVSBDO.mjs} +2 -2
  37. package/dist/{chunk-24FUO7TD.mjs → chunk-H6NQTIF4.mjs} +2 -2
  38. package/dist/{chunk-7DHU4VGG.mjs → chunk-HK4HUQTV.mjs} +2 -2
  39. package/dist/chunk-I4KVSZCH.mjs +101 -0
  40. package/dist/{chunk-RGVKLTLH.mjs → chunk-IKXYTCSB.mjs} +2 -2
  41. package/dist/{chunk-Y6DWJSKZ.mjs → chunk-ISUA7DSB.mjs} +1 -1
  42. package/dist/{chunk-2A5RRQGG.mjs → chunk-JD3YWRNP.mjs} +10 -14
  43. package/dist/{chunk-J5UICVJS.mjs → chunk-JPGL36WQ.mjs} +2 -2
  44. package/dist/{chunk-7XJHLGUV.mjs → chunk-JTK6VJXY.mjs} +2 -2
  45. package/dist/{chunk-7YAU5CY6.mjs → chunk-JVMXMFBB.mjs} +2 -2
  46. package/dist/{chunk-IAE3F7DR.mjs → chunk-JZY6TNIS.mjs} +21 -21
  47. package/dist/{chunk-K5A5L6T2.mjs → chunk-K4KOD3KR.mjs} +12 -12
  48. package/dist/{chunk-MBON7YRJ.mjs → chunk-K5QV4TT6.mjs} +3 -3
  49. package/dist/{chunk-IHMFS7NZ.mjs → chunk-K5VHK7CM.mjs} +21 -21
  50. package/dist/{chunk-RJI6GKVF.mjs → chunk-KCWNDYPZ.mjs} +5 -5
  51. package/dist/{chunk-UFYSFDER.mjs → chunk-KFH36NKF.mjs} +1 -1
  52. package/dist/{chunk-EBXQWIYG.mjs → chunk-KLTACJ2G.mjs} +5 -5
  53. package/dist/{chunk-3TTACBDP.mjs → chunk-KWD6GANL.mjs} +4 -4
  54. package/dist/{chunk-IOJRDS6V.mjs → chunk-L4NSRQ3T.mjs} +218 -147
  55. package/dist/{chunk-GYMYRIZP.mjs → chunk-LBTHZSBT.mjs} +2 -2
  56. package/dist/{chunk-AMQZRHEZ.mjs → chunk-LQULK2E3.mjs} +5 -5
  57. package/dist/{chunk-YJG55G2H.mjs → chunk-LR6LHDP3.mjs} +5 -5
  58. package/dist/{chunk-7PV3IWCN.mjs → chunk-M4VYX2PV.mjs} +19 -1
  59. package/dist/{chunk-P76HMUI6.mjs → chunk-MDUKXXIL.mjs} +2 -2
  60. package/dist/{chunk-LV35NGVG.mjs → chunk-N6Q5IPKT.mjs} +9 -9
  61. package/dist/{chunk-DOEO3CDL.mjs → chunk-NB3ZL36B.mjs} +1 -1
  62. package/dist/{chunk-XREGSKX3.mjs → chunk-NOOEKOWY.mjs} +5 -5
  63. package/dist/{chunk-NL3ZO62D.mjs → chunk-NT4FX27K.mjs} +1 -1
  64. package/dist/{chunk-QZ4RE6NA.mjs → chunk-NTYQWVLI.mjs} +6 -6
  65. package/dist/{chunk-ERGGHC2V.mjs → chunk-OEOOYMC2.mjs} +2 -2
  66. package/dist/{chunk-4GAWMKMI.mjs → chunk-OIKBW2QD.mjs} +291 -54
  67. package/dist/{chunk-DUJTAXMH.mjs → chunk-OKTJFDPN.mjs} +6 -6
  68. package/dist/chunk-OLKMCXAR.mjs +1219 -0
  69. package/dist/{chunk-EI5F6FMT.mjs → chunk-OWFQSXVD.mjs} +3 -3
  70. package/dist/{chunk-6DZEXFNB.mjs → chunk-P2N2PEFY.mjs} +3 -3
  71. package/dist/{chunk-NSLMILBT.mjs → chunk-P7CEBZM6.mjs} +2 -2
  72. package/dist/{chunk-7S5AESZO.mjs → chunk-PNRUH7JY.mjs} +6 -6
  73. package/dist/{chunk-ZU4NV6RG.mjs → chunk-PNSYFE3K.mjs} +2 -2
  74. package/dist/{chunk-JKGDCQTZ.mjs → chunk-QTRSCVQ3.mjs} +5 -5
  75. package/dist/{chunk-ABFDMHOR.mjs → chunk-QX7IFQSF.mjs} +5 -5
  76. package/dist/{chunk-CFMQP5QS.mjs → chunk-QXKGOMUX.mjs} +6 -6
  77. package/dist/{chunk-NQPOYKAQ.mjs → chunk-R2ON6CAN.mjs} +2 -2
  78. package/dist/{chunk-DBHJ5KC3.mjs → chunk-R4HCRDU5.mjs} +1 -1
  79. package/dist/{chunk-EWRB4PAD.mjs → chunk-RCAOCHWA.mjs} +14 -14
  80. package/dist/{chunk-EFRENWEJ.mjs → chunk-RSUIPKGX.mjs} +2 -2
  81. package/dist/{chunk-DGHAXJBN.mjs → chunk-S2FKV4M5.mjs} +5 -5
  82. package/dist/{chunk-RGU7HOEC.mjs → chunk-SET2ANTY.mjs} +5 -7
  83. package/dist/chunk-SFH2NJEJ.mjs +47 -0
  84. package/dist/{chunk-6AW4KJHE.mjs → chunk-SIVYAI3M.mjs} +12 -12
  85. package/dist/{chunk-5FQIKDKP.mjs → chunk-THVO2N47.mjs} +8 -8
  86. package/dist/{chunk-JMHR3YGZ.mjs → chunk-TLAWKTSA.mjs} +3 -3
  87. package/dist/{chunk-HVY6KCCF.mjs → chunk-TOWTPLRC.mjs} +68 -72
  88. package/dist/{chunk-6JQFUE5I.mjs → chunk-UALR6JGV.mjs} +2 -2
  89. package/dist/{chunk-MLNEWRWV.mjs → chunk-UJZ4UHWI.mjs} +10 -15
  90. package/dist/{chunk-MARPPFOJ.mjs → chunk-UNACI2YK.mjs} +2 -2
  91. package/dist/{chunk-3NCUZIFP.mjs → chunk-V6XGXYCJ.mjs} +7 -7
  92. package/dist/chunk-VB5M6OZQ.mjs +57 -0
  93. package/dist/{chunk-5IS7G74I.mjs → chunk-VY5NEUP7.mjs} +6 -6
  94. package/dist/{chunk-JHJHG4GO.mjs → chunk-WE4YKBDE.mjs} +2 -2
  95. package/dist/{chunk-BKNFWEH2.mjs → chunk-WL6WVV47.mjs} +3 -3
  96. package/dist/{chunk-FWCSY2DS.mjs → chunk-WNQUEZJF.mjs} +22 -1
  97. package/dist/{chunk-2Y7YJKPE.mjs → chunk-WZ6UJCBL.mjs} +1 -1
  98. package/dist/{chunk-UMTOX62O.mjs → chunk-XYPW2XA5.mjs} +13 -10
  99. package/dist/chunk-Y2MTAVAK.mjs +34 -0
  100. package/dist/{chunk-6CR5N2JW.mjs → chunk-YCWLFG27.mjs} +6 -6
  101. package/dist/{chunk-PU4YZQXV.mjs → chunk-YE67AALL.mjs} +12 -12
  102. package/dist/{chunk-M3FV7LOK.mjs → chunk-YEWNFK5S.mjs} +6 -1
  103. package/dist/{chunk-R3VSPKNP.mjs → chunk-YIZHS72Z.mjs} +11 -12
  104. package/dist/{chunk-7PYJD5JI.mjs → chunk-ZEDMKQK2.mjs} +2 -2
  105. package/dist/{chunk-N2PT566P.mjs → chunk-ZFCDYW6N.mjs} +4 -4
  106. package/dist/chunk-ZGQIVGIN.mjs +57 -0
  107. package/dist/{chunk-Q2BGOAMG.mjs → chunk-ZKWXDQDG.mjs} +4 -4
  108. package/dist/{chunk-GHC7LLUX.mjs → chunk-ZOWL2L5J.mjs} +5 -5
  109. package/dist/components/ui/accordion.mjs +3 -3
  110. package/dist/components/ui/add-column-modal.js +2 -2
  111. package/dist/components/ui/add-column-modal.mjs +10 -10
  112. package/dist/components/ui/add-lead-modal.js +424 -82
  113. package/dist/components/ui/add-lead-modal.mjs +12 -9
  114. package/dist/components/ui/advisor-card.js +2 -2
  115. package/dist/components/ui/advisor-card.mjs +8 -8
  116. package/dist/components/ui/ai-assistant-drawer.js +2 -2
  117. package/dist/components/ui/ai-assistant-drawer.mjs +9 -9
  118. package/dist/components/ui/ai-builder.js +958 -0
  119. package/dist/components/ui/ai-builder.mjs +25 -0
  120. package/dist/components/ui/ai-conversations.js +2045 -0
  121. package/dist/components/ui/ai-conversations.mjs +41 -0
  122. package/dist/components/ui/alert-dialog.js +2 -2
  123. package/dist/components/ui/alert-dialog.mjs +5 -5
  124. package/dist/components/ui/alert.mjs +3 -3
  125. package/dist/components/ui/appointment-action-dialogs.js +19 -3
  126. package/dist/components/ui/appointment-action-dialogs.mjs +15 -14
  127. package/dist/components/ui/appointment-availability-settings.js +181 -111
  128. package/dist/components/ui/appointment-availability-settings.mjs +20 -18
  129. package/dist/components/ui/appointment-book-dialog.js +113 -24
  130. package/dist/components/ui/appointment-book-dialog.mjs +21 -20
  131. package/dist/components/ui/appointment-calendar-view.js +19 -3
  132. package/dist/components/ui/appointment-calendar-view.mjs +10 -9
  133. package/dist/components/ui/appointment-detail-sheet.js +19 -3
  134. package/dist/components/ui/appointment-detail-sheet.mjs +18 -17
  135. package/dist/components/ui/appointment-gmail-connect.js +49 -89
  136. package/dist/components/ui/appointment-gmail-connect.mjs +8 -9
  137. package/dist/components/ui/appointment-mini-card.js +2 -2
  138. package/dist/components/ui/appointment-mini-card.mjs +6 -6
  139. package/dist/components/ui/appointment-time-slot-picker.mjs +6 -6
  140. package/dist/components/ui/appointment-upcoming-card.js +19 -3
  141. package/dist/components/ui/appointment-upcoming-card.mjs +15 -14
  142. package/dist/components/ui/auth-logo.js +95 -0
  143. package/dist/components/ui/auth-logo.mjs +8 -0
  144. package/dist/components/ui/auth-page-layout.js +108 -0
  145. package/dist/components/ui/auth-page-layout.mjs +8 -0
  146. package/dist/components/ui/avatar.mjs +3 -3
  147. package/dist/components/ui/backoffice-alert-history-chart.js +2 -2
  148. package/dist/components/ui/backoffice-alert-history-chart.mjs +9 -9
  149. package/dist/components/ui/backoffice-alerts-chart.js +2 -2
  150. package/dist/components/ui/backoffice-alerts-chart.mjs +11 -11
  151. package/dist/components/ui/backoffice-connections-chart.js +2 -2
  152. package/dist/components/ui/backoffice-connections-chart.mjs +11 -11
  153. package/dist/components/ui/backoffice-contact-history-chart.js +2 -2
  154. package/dist/components/ui/backoffice-contact-history-chart.mjs +9 -9
  155. package/dist/components/ui/badge.mjs +4 -4
  156. package/dist/components/ui/borrowing-capacity-line-chart.js +145 -132
  157. package/dist/components/ui/borrowing-capacity-line-chart.mjs +9 -9
  158. package/dist/components/ui/button.js +2 -2
  159. package/dist/components/ui/button.mjs +4 -4
  160. package/dist/components/ui/calendar.js +17 -3
  161. package/dist/components/ui/calendar.mjs +6 -5
  162. package/dist/components/ui/card.mjs +3 -3
  163. package/dist/components/ui/cash-balance-line-chart.js +157 -152
  164. package/dist/components/ui/cash-balance-line-chart.mjs +9 -9
  165. package/dist/components/ui/cashflow-bar-chart.js +2 -2
  166. package/dist/components/ui/cashflow-bar-chart.mjs +9 -9
  167. package/dist/components/ui/chat-widget-primitives.js +573 -0
  168. package/dist/components/ui/chat-widget-primitives.mjs +21 -0
  169. package/dist/components/ui/chat-widget.js +1268 -0
  170. package/dist/components/ui/chat-widget.mjs +29 -0
  171. package/dist/components/ui/checkbox.mjs +3 -3
  172. package/dist/components/ui/chip.js +2 -2
  173. package/dist/components/ui/chip.mjs +6 -6
  174. package/dist/components/ui/color-picker.js +2 -2
  175. package/dist/components/ui/color-picker.mjs +7 -7
  176. package/dist/components/ui/combobox.mjs +3 -3
  177. package/dist/components/ui/data-table.js +2 -2
  178. package/dist/components/ui/data-table.mjs +12 -12
  179. package/dist/components/ui/date-picker.js +22 -6
  180. package/dist/components/ui/date-picker.mjs +9 -8
  181. package/dist/components/ui/dialog.js +2 -2
  182. package/dist/components/ui/dialog.mjs +5 -5
  183. package/dist/components/ui/document-checklist-template.js +630 -0
  184. package/dist/components/ui/document-checklist-template.mjs +15 -0
  185. package/dist/components/ui/drawer.js +2 -2
  186. package/dist/components/ui/drawer.mjs +3 -3
  187. package/dist/components/ui/dropdown-menu.mjs +3 -3
  188. package/dist/components/ui/empty.mjs +3 -3
  189. package/dist/components/ui/expense-bar-chart.js +2 -2
  190. package/dist/components/ui/expense-bar-chart.mjs +9 -9
  191. package/dist/components/ui/field.mjs +5 -5
  192. package/dist/components/ui/financial-cards.js +431 -291
  193. package/dist/components/ui/financial-cards.mjs +10 -9
  194. package/dist/components/ui/financial-drawers.js +4 -4
  195. package/dist/components/ui/financial-drawers.mjs +8 -8
  196. package/dist/components/ui/financial-primitives.mjs +3 -3
  197. package/dist/components/ui/financial-sections.js +8 -9
  198. package/dist/components/ui/financial-sections.mjs +12 -12
  199. package/dist/components/ui/form-primitives.mjs +8 -8
  200. package/dist/components/ui/income-bar-chart.js +2 -2
  201. package/dist/components/ui/income-bar-chart.mjs +9 -9
  202. package/dist/components/ui/input-group.js +2 -2
  203. package/dist/components/ui/input-group.mjs +7 -7
  204. package/dist/components/ui/input-otp.mjs +3 -3
  205. package/dist/components/ui/input.mjs +3 -3
  206. package/dist/components/ui/kanban-column.js +19 -23
  207. package/dist/components/ui/kanban-column.mjs +14 -14
  208. package/dist/components/ui/label.mjs +3 -3
  209. package/dist/components/ui/onboarding-layout.js +476 -0
  210. package/dist/components/ui/onboarding-layout.mjs +11 -0
  211. package/dist/components/ui/opportunity-card.js +2 -2
  212. package/dist/components/ui/opportunity-card.mjs +12 -12
  213. package/dist/components/ui/opportunity-edit-modals.js +22 -6
  214. package/dist/components/ui/opportunity-edit-modals.mjs +21 -20
  215. package/dist/components/ui/opportunity-summary-tab.js +991 -674
  216. package/dist/components/ui/opportunity-summary-tab.mjs +26 -26
  217. package/dist/components/ui/page-header.mjs +3 -3
  218. package/dist/components/ui/page-top-bar.mjs +3 -3
  219. package/dist/components/ui/pagination.js +2 -2
  220. package/dist/components/ui/pagination.mjs +6 -6
  221. package/dist/components/ui/password-strength-tooltip.js +197 -0
  222. package/dist/components/ui/password-strength-tooltip.mjs +11 -0
  223. package/dist/components/ui/pipeline-alerts.mjs +3 -3
  224. package/dist/components/ui/pipeline-board.js +19 -23
  225. package/dist/components/ui/pipeline-board.mjs +18 -18
  226. package/dist/components/ui/pipeline-chart.js +12 -6
  227. package/dist/components/ui/pipeline-chart.mjs +4 -3
  228. package/dist/components/ui/pipeline-dialogs.js +28 -12
  229. package/dist/components/ui/pipeline-dialogs.mjs +14 -13
  230. package/dist/components/ui/pipeline-primitives.mjs +6 -6
  231. package/dist/components/ui/popover.mjs +3 -3
  232. package/dist/components/ui/progress.mjs +3 -3
  233. package/dist/components/ui/property-cashflow-doughnut-chart.js +2 -2
  234. package/dist/components/ui/property-cashflow-doughnut-chart.mjs +9 -9
  235. package/dist/components/ui/property-debt-equity-doughnut-chart.js +2 -2
  236. package/dist/components/ui/property-debt-equity-doughnut-chart.mjs +9 -9
  237. package/dist/components/ui/property-mobile-estimate-line-chart.js +2 -2
  238. package/dist/components/ui/property-mobile-estimate-line-chart.mjs +9 -9
  239. package/dist/components/ui/radio-group.mjs +3 -3
  240. package/dist/components/ui/select.mjs +3 -3
  241. package/dist/components/ui/separator.mjs +3 -3
  242. package/dist/components/ui/sheet.mjs +3 -3
  243. package/dist/components/ui/sidebar-nav.js +7 -9
  244. package/dist/components/ui/sidebar-nav.mjs +7 -7
  245. package/dist/components/ui/skeleton.mjs +3 -3
  246. package/dist/components/ui/slider.mjs +3 -3
  247. package/dist/components/ui/sonner.mjs +2 -2
  248. package/dist/components/ui/spinner.mjs +3 -3
  249. package/dist/components/ui/stage-timeline.mjs +10 -10
  250. package/dist/components/ui/stepper.mjs +3 -3
  251. package/dist/components/ui/switch.mjs +3 -3
  252. package/dist/components/ui/table.mjs +3 -3
  253. package/dist/components/ui/tabs.mjs +3 -3
  254. package/dist/components/ui/textarea.mjs +3 -3
  255. package/dist/components/ui/toggle-group.mjs +4 -4
  256. package/dist/components/ui/toggle.mjs +3 -3
  257. package/dist/components/ui/tooltip.mjs +3 -3
  258. package/dist/components/ui/transactions-expense-categories-doughnut-chart.js +2 -2
  259. package/dist/components/ui/transactions-expense-categories-doughnut-chart.mjs +9 -9
  260. package/dist/components/ui/transactions-income-expense-bar-chart.js +2 -2
  261. package/dist/components/ui/transactions-income-expense-bar-chart.mjs +9 -9
  262. package/dist/components/ui/transactions-liabilities-breakdown-doughnut-chart.js +2 -2
  263. package/dist/components/ui/transactions-liabilities-breakdown-doughnut-chart.mjs +9 -9
  264. package/dist/components/ui/two-fa-setup-form.js +612 -0
  265. package/dist/components/ui/two-fa-setup-form.mjs +16 -0
  266. package/dist/components/ui/upload-card.js +187 -0
  267. package/dist/components/ui/upload-card.mjs +10 -0
  268. package/dist/components/ui/video-background.js +118 -0
  269. package/dist/components/ui/video-background.mjs +8 -0
  270. package/dist/index.js +12765 -9400
  271. package/dist/index.mjs +341 -245
  272. package/dist/lib/colors.mjs +1 -1
  273. package/dist/lib/theme-provider.mjs +1 -1
  274. package/dist/lib/typography.mjs +2 -2
  275. package/dist/lib/utils.js +8 -2
  276. package/dist/lib/utils.mjs +6 -4
  277. package/dist/styles.css +1 -1
  278. package/package.json +61 -1
  279. package/src/components/index.tsx +126 -1
  280. package/src/components/ui/add-lead-modal.tsx +101 -142
  281. package/src/components/ui/ai-builder.tsx +560 -0
  282. package/src/components/ui/ai-conversations.tsx +1690 -0
  283. package/src/components/ui/appointment-availability-settings.tsx +152 -101
  284. package/src/components/ui/appointment-book-dialog.tsx +138 -24
  285. package/src/components/ui/appointment-calendar-view.tsx +2 -3
  286. package/src/components/ui/appointment-gmail-connect.tsx +23 -42
  287. package/src/components/ui/auth-logo.tsx +50 -0
  288. package/src/components/ui/auth-page-layout.tsx +59 -0
  289. package/src/components/ui/borrowing-capacity-line-chart.tsx +10 -8
  290. package/src/components/ui/button.tsx +2 -2
  291. package/src/components/ui/calendar.tsx +2 -1
  292. package/src/components/ui/cash-balance-line-chart.tsx +10 -14
  293. package/src/components/ui/chart-shared.tsx +10 -0
  294. package/src/components/ui/chat-widget-primitives.tsx +336 -0
  295. package/src/components/ui/chat-widget.tsx +822 -0
  296. package/src/components/ui/document-checklist-template.tsx +264 -0
  297. package/src/components/ui/drawer.tsx +2 -2
  298. package/src/components/ui/financial-cards.tsx +176 -78
  299. package/src/components/ui/financial-drawers.tsx +2 -2
  300. package/src/components/ui/financial-sections.tsx +1 -1
  301. package/src/components/ui/kanban-column.tsx +2 -5
  302. package/src/components/ui/onboarding-layout.tsx +109 -0
  303. package/src/components/ui/opportunity-summary-tab.tsx +469 -142
  304. package/src/components/ui/password-strength-tooltip.tsx +70 -0
  305. package/src/components/ui/pipeline-chart.tsx +2 -6
  306. package/src/components/ui/sidebar-nav.tsx +2 -15
  307. package/src/components/ui/two-fa-setup-form.tsx +229 -0
  308. package/src/components/ui/upload-card.tsx +98 -0
  309. package/src/components/ui/video-background.tsx +55 -0
  310. package/src/lib/format-date.ts +26 -0
  311. package/src/lib/utils.ts +11 -0
  312. package/src/styles/styles-css.ts +1 -1
  313. package/tsup.config.ts +13 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @wealthx/shadcn
2
2
 
3
+ ## 1.3.3
4
+
5
+ ### Patch Changes
6
+
7
+ - 7d5ec25: Add more components/layout
8
+
9
+ ## 1.3.2
10
+
11
+ ### Patch Changes
12
+
13
+ - 5810c40: Change sidebar default color to align with theme color
14
+
3
15
  ## 1.3.1
4
16
 
5
17
  ### Patch Changes
@@ -1,13 +1,15 @@
1
1
  import {
2
2
  Skeleton
3
- } from "./chunk-D6ID6M4V.mjs";
3
+ } from "./chunk-GTAVSBDO.mjs";
4
4
  import {
5
5
  ChartLegendItem,
6
6
  FALLBACK_BG,
7
7
  FALLBACK_FOREGROUND,
8
8
  FALLBACK_PRIMARY,
9
- FALLBACK_TICK
10
- } from "./chunk-M3FV7LOK.mjs";
9
+ FALLBACK_TICK,
10
+ formatMonthLabel,
11
+ formatTooltipDate
12
+ } from "./chunk-YEWNFK5S.mjs";
11
13
  import {
12
14
  formatCurrency,
13
15
  formatCurrencyAbbrev
@@ -15,19 +17,19 @@ import {
15
17
  import {
16
18
  Empty,
17
19
  EmptyDescription
18
- } from "./chunk-NQPOYKAQ.mjs";
20
+ } from "./chunk-R2ON6CAN.mjs";
19
21
  import {
20
22
  Card,
21
23
  CardContent,
22
24
  CardHeader,
23
25
  CardTitle
24
- } from "./chunk-C7CQJNMR.mjs";
26
+ } from "./chunk-3VDET466.mjs";
25
27
  import {
26
28
  useThemeVars
27
29
  } from "./chunk-FEZKMUCF.mjs";
28
30
  import {
29
31
  cn
30
- } from "./chunk-VLQZANBF.mjs";
32
+ } from "./chunk-AFML43VJ.mjs";
31
33
 
32
34
  // src/components/ui/borrowing-capacity-line-chart.tsx
33
35
  import { useMemo } from "react";
@@ -77,12 +79,12 @@ var SERIES_LEGEND_ORDER = [
77
79
  ];
78
80
  var DASH_PATTERN = [6, 4];
79
81
  function formatDateLabel(iso) {
80
- const d = /* @__PURE__ */ new Date(`${iso.slice(0, 7)}-01T00:00:00`);
81
- return d.toLocaleDateString("en-US", { month: "short", year: "2-digit" });
82
+ const normalized = `${iso.slice(0, 7)}-01T00:00:00`;
83
+ return formatMonthLabel(normalized);
82
84
  }
83
85
  function formatDateTooltip(iso) {
84
- const d = /* @__PURE__ */ new Date(`${iso.slice(0, 7)}-01T00:00:00`);
85
- return d.toLocaleDateString("en-US", { month: "short", year: "numeric" });
86
+ const normalized = `${iso.slice(0, 7)}-01T00:00:00`;
87
+ return formatTooltipDate(normalized, "monthly");
86
88
  }
87
89
  function BorrowingCapacityLineChart({
88
90
  series,
@@ -0,0 +1,613 @@
1
+ import {
2
+ Field,
3
+ FieldError,
4
+ FieldLabel
5
+ } from "./chunk-7BTFGCFC.mjs";
6
+ import {
7
+ ChatWidgetHeader,
8
+ ChatWidgetInputBar,
9
+ ChatWidgetLauncher,
10
+ ChatWidgetMessage
11
+ } from "./chunk-BBXSNDS3.mjs";
12
+ import {
13
+ Input
14
+ } from "./chunk-LBTHZSBT.mjs";
15
+ import {
16
+ Button
17
+ } from "./chunk-NOOEKOWY.mjs";
18
+ import {
19
+ cn
20
+ } from "./chunk-AFML43VJ.mjs";
21
+ import {
22
+ __spreadProps,
23
+ __spreadValues
24
+ } from "./chunk-WNQUEZJF.mjs";
25
+
26
+ // src/components/ui/chat-widget.tsx
27
+ import React, { useState, useCallback } from "react";
28
+ import {
29
+ Home,
30
+ RefreshCw,
31
+ TrendingUp,
32
+ Key,
33
+ CalendarDays,
34
+ HelpCircle,
35
+ Lock,
36
+ Calendar,
37
+ CheckCircle2,
38
+ ArrowLeft,
39
+ ArrowRight,
40
+ ExternalLink,
41
+ Video,
42
+ Phone,
43
+ MapPin,
44
+ MessageSquare,
45
+ User
46
+ } from "lucide-react";
47
+ import { jsx, jsxs } from "react/jsx-runtime";
48
+ var DEFAULT_CHAT_WIDGET_TOPICS = [
49
+ {
50
+ id: "buy_home",
51
+ icon: /* @__PURE__ */ jsx(Home, { className: "size-5" }),
52
+ label: "Buy a Home",
53
+ description: "Purchase your first or next property"
54
+ },
55
+ {
56
+ id: "refinance",
57
+ icon: /* @__PURE__ */ jsx(RefreshCw, { className: "size-5" }),
58
+ label: "Refinance",
59
+ description: "Get a better rate on your current loan"
60
+ },
61
+ {
62
+ id: "investment",
63
+ icon: /* @__PURE__ */ jsx(TrendingUp, { className: "size-5" }),
64
+ label: "Investment Property",
65
+ description: "Grow your property portfolio"
66
+ },
67
+ {
68
+ id: "first_home_buyer",
69
+ icon: /* @__PURE__ */ jsx(Key, { className: "size-5" }),
70
+ label: "First Home Buyer",
71
+ description: "First home buyer grants & schemes"
72
+ },
73
+ {
74
+ id: "book_meeting",
75
+ icon: /* @__PURE__ */ jsx(CalendarDays, { className: "size-5" }),
76
+ label: "Book a Meeting",
77
+ description: "Talk directly with an advisor"
78
+ },
79
+ {
80
+ id: "general_question",
81
+ icon: /* @__PURE__ */ jsx(HelpCircle, { className: "size-5" }),
82
+ label: "General Question",
83
+ description: "Ask anything about home loans"
84
+ }
85
+ ];
86
+ function ChatWidgetIntakeForm({
87
+ brokerName,
88
+ onSubmit,
89
+ isSubmitting,
90
+ className
91
+ }) {
92
+ const [name, setName] = useState("");
93
+ const [phone, setPhone] = useState("");
94
+ const [email, setEmail] = useState("");
95
+ const [errors, setErrors] = useState({});
96
+ const clearError = (field) => setErrors((prev) => __spreadProps(__spreadValues({}, prev), { [field]: void 0 }));
97
+ const validate = () => {
98
+ const e = {};
99
+ if (!name.trim()) e.name = "Name is required";
100
+ if (!phone.trim()) e.phone = "Phone number is required";
101
+ if (!email.trim()) e.email = "Email is required";
102
+ else if (!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email))
103
+ e.email = "Enter a valid email address";
104
+ return e;
105
+ };
106
+ const handleSubmit = (e) => {
107
+ e.preventDefault();
108
+ const errs = validate();
109
+ if (Object.keys(errs).length > 0) {
110
+ setErrors(errs);
111
+ return;
112
+ }
113
+ onSubmit({ name: name.trim(), phone: phone.trim(), email: email.trim() });
114
+ };
115
+ return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col gap-5 p-5", className), children: [
116
+ /* @__PURE__ */ jsxs("div", { children: [
117
+ /* @__PURE__ */ jsx("p", { className: "text-body-large font-semibold text-foreground", children: brokerName ? `Hi from ${brokerName}!` : "Hi there!" }),
118
+ /* @__PURE__ */ jsx("p", { className: "mt-1 text-body-medium text-muted-foreground", children: "To get started, please share your contact details." })
119
+ ] }),
120
+ /* @__PURE__ */ jsxs("form", { onSubmit: handleSubmit, noValidate: true, className: "flex flex-col gap-3", children: [
121
+ /* @__PURE__ */ jsxs(Field, { children: [
122
+ /* @__PURE__ */ jsxs(FieldLabel, { children: [
123
+ "Full Name ",
124
+ /* @__PURE__ */ jsx("span", { className: "text-destructive", children: "*" })
125
+ ] }),
126
+ /* @__PURE__ */ jsx(
127
+ Input,
128
+ {
129
+ value: name,
130
+ onChange: (e) => {
131
+ setName(e.target.value);
132
+ clearError("name");
133
+ },
134
+ placeholder: "Jane Smith",
135
+ disabled: isSubmitting,
136
+ "aria-invalid": !!errors.name || void 0
137
+ }
138
+ ),
139
+ errors.name && /* @__PURE__ */ jsx(FieldError, { children: errors.name })
140
+ ] }),
141
+ /* @__PURE__ */ jsxs(Field, { children: [
142
+ /* @__PURE__ */ jsxs(FieldLabel, { children: [
143
+ "Phone Number ",
144
+ /* @__PURE__ */ jsx("span", { className: "text-destructive", children: "*" })
145
+ ] }),
146
+ /* @__PURE__ */ jsx(
147
+ Input,
148
+ {
149
+ type: "tel",
150
+ value: phone,
151
+ onChange: (e) => {
152
+ setPhone(e.target.value);
153
+ clearError("phone");
154
+ },
155
+ placeholder: "0400 000 000",
156
+ disabled: isSubmitting,
157
+ "aria-invalid": !!errors.phone || void 0
158
+ }
159
+ ),
160
+ errors.phone && /* @__PURE__ */ jsx(FieldError, { children: errors.phone })
161
+ ] }),
162
+ /* @__PURE__ */ jsxs(Field, { children: [
163
+ /* @__PURE__ */ jsxs(FieldLabel, { children: [
164
+ "Email Address ",
165
+ /* @__PURE__ */ jsx("span", { className: "text-destructive", children: "*" })
166
+ ] }),
167
+ /* @__PURE__ */ jsx(
168
+ Input,
169
+ {
170
+ type: "email",
171
+ value: email,
172
+ onChange: (e) => {
173
+ setEmail(e.target.value);
174
+ clearError("email");
175
+ },
176
+ placeholder: "jane@example.com",
177
+ disabled: isSubmitting,
178
+ "aria-invalid": !!errors.email || void 0
179
+ }
180
+ ),
181
+ errors.email && /* @__PURE__ */ jsx(FieldError, { children: errors.email })
182
+ ] }),
183
+ /* @__PURE__ */ jsxs(
184
+ Button,
185
+ {
186
+ type: "submit",
187
+ variant: "default",
188
+ className: "mt-1 w-full",
189
+ disabled: isSubmitting,
190
+ loading: isSubmitting,
191
+ children: [
192
+ "Start Chat",
193
+ /* @__PURE__ */ jsx(ArrowRight, { className: "size-4" })
194
+ ]
195
+ }
196
+ )
197
+ ] }),
198
+ /* @__PURE__ */ jsxs("p", { className: "flex items-center justify-center gap-1 text-center text-[11px] text-muted-foreground", children: [
199
+ /* @__PURE__ */ jsx(Lock, { className: "size-3" }),
200
+ "Your info is safe with us"
201
+ ] })
202
+ ] });
203
+ }
204
+ function ChatWidgetTopicCard({
205
+ topic,
206
+ onClick,
207
+ className
208
+ }) {
209
+ return /* @__PURE__ */ jsxs(
210
+ Button,
211
+ {
212
+ variant: "outline",
213
+ onClick: () => onClick(topic.id),
214
+ className: cn(
215
+ "h-auto w-full flex-col items-start gap-1.5 whitespace-normal border-border px-3 py-3 text-left",
216
+ "hover:border-primary hover:bg-primary/5",
217
+ className
218
+ ),
219
+ children: [
220
+ /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", "aria-hidden": "true", children: topic.icon }),
221
+ /* @__PURE__ */ jsx("span", { className: "text-body-medium font-semibold text-foreground", children: topic.label }),
222
+ topic.description && /* @__PURE__ */ jsx("span", { className: "text-body-small leading-snug text-muted-foreground", children: topic.description })
223
+ ]
224
+ }
225
+ );
226
+ }
227
+ function ChatWidgetTopicGrid({
228
+ userName,
229
+ topics = DEFAULT_CHAT_WIDGET_TOPICS,
230
+ onTopicSelect,
231
+ className
232
+ }) {
233
+ return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col gap-4 p-5", className), children: [
234
+ /* @__PURE__ */ jsxs("div", { children: [
235
+ /* @__PURE__ */ jsxs("p", { className: "text-body-large font-semibold text-foreground", children: [
236
+ "Hi ",
237
+ userName,
238
+ "!"
239
+ ] }),
240
+ /* @__PURE__ */ jsx("p", { className: "mt-0.5 text-body-medium text-muted-foreground", children: "What would you like to discuss today?" })
241
+ ] }),
242
+ /* @__PURE__ */ jsx("div", { className: "grid grid-cols-2 gap-2", children: topics.map((topic) => /* @__PURE__ */ jsx(
243
+ ChatWidgetTopicCard,
244
+ {
245
+ topic,
246
+ onClick: onTopicSelect
247
+ },
248
+ topic.id
249
+ )) })
250
+ ] });
251
+ }
252
+ var MEETING_TYPE_LABELS = {
253
+ video: "Video Call",
254
+ phone: "Phone Call",
255
+ "in-person": "In-Person Meeting"
256
+ };
257
+ function MeetingTypeIcon({
258
+ id,
259
+ className = "size-4"
260
+ }) {
261
+ const Icon = id === "video" ? Video : id === "phone" ? Phone : MapPin;
262
+ return /* @__PURE__ */ jsx(Icon, { className: cn("shrink-0 text-muted-foreground", className) });
263
+ }
264
+ function ChatWidgetInteractiveCard({
265
+ type,
266
+ options,
267
+ onQuickReply,
268
+ slots,
269
+ onSlotSelect,
270
+ meetingTypes,
271
+ onMeetingTypeSelect,
272
+ confirmedSlot,
273
+ meetingType,
274
+ topic,
275
+ advisorName,
276
+ className
277
+ }) {
278
+ if (type === "quick-reply") {
279
+ return /* @__PURE__ */ jsx("div", { className: cn("flex flex-wrap gap-2 pt-1", className), children: options == null ? void 0 : options.map((opt) => /* @__PURE__ */ jsx(
280
+ Button,
281
+ {
282
+ variant: "outline-primary",
283
+ size: "sm",
284
+ onClick: () => onQuickReply == null ? void 0 : onQuickReply(opt.id),
285
+ children: opt.label
286
+ },
287
+ opt.id
288
+ )) });
289
+ }
290
+ if (type === "appointment") {
291
+ return /* @__PURE__ */ jsxs(
292
+ "div",
293
+ {
294
+ className: cn(
295
+ "flex flex-col gap-2 border border-border bg-card p-3",
296
+ className
297
+ ),
298
+ children: [
299
+ /* @__PURE__ */ jsx("p", { className: "text-body-small font-semibold text-foreground", children: "Choose a time" }),
300
+ slots == null ? void 0 : slots.map((slot) => /* @__PURE__ */ jsxs(
301
+ Button,
302
+ {
303
+ variant: "outline",
304
+ onClick: () => onSlotSelect == null ? void 0 : onSlotSelect(slot.id),
305
+ className: "h-auto w-full justify-start gap-2 px-3 py-2 hover:border-primary hover:bg-primary/5",
306
+ children: [
307
+ /* @__PURE__ */ jsx(Calendar, { className: "size-4 shrink-0 text-muted-foreground" }),
308
+ /* @__PURE__ */ jsx("span", { className: "text-foreground", children: slot.datetime })
309
+ ]
310
+ },
311
+ slot.id
312
+ ))
313
+ ]
314
+ }
315
+ );
316
+ }
317
+ if (type === "meeting-type") {
318
+ return /* @__PURE__ */ jsxs(
319
+ "div",
320
+ {
321
+ className: cn(
322
+ "flex flex-col gap-2 border border-border bg-card p-3",
323
+ className
324
+ ),
325
+ children: [
326
+ /* @__PURE__ */ jsx("p", { className: "text-body-small font-semibold text-foreground", children: "How would you prefer to meet?" }),
327
+ meetingTypes == null ? void 0 : meetingTypes.map((mt) => /* @__PURE__ */ jsxs(
328
+ Button,
329
+ {
330
+ variant: "outline",
331
+ onClick: () => onMeetingTypeSelect == null ? void 0 : onMeetingTypeSelect(mt.id),
332
+ className: "h-auto w-full justify-start gap-2 px-3 py-2 hover:border-primary hover:bg-primary/5",
333
+ children: [
334
+ /* @__PURE__ */ jsx(MeetingTypeIcon, { id: mt.id }),
335
+ /* @__PURE__ */ jsx("span", { className: "text-foreground", children: mt.label })
336
+ ]
337
+ },
338
+ mt.id
339
+ ))
340
+ ]
341
+ }
342
+ );
343
+ }
344
+ if (type === "confirmation") {
345
+ return /* @__PURE__ */ jsxs(
346
+ "div",
347
+ {
348
+ className: cn(
349
+ "flex flex-col gap-3 border border-border bg-card p-3",
350
+ className
351
+ ),
352
+ children: [
353
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
354
+ /* @__PURE__ */ jsx(CheckCircle2, { className: "size-4 shrink-0 text-green-600" }),
355
+ /* @__PURE__ */ jsx("p", { className: "text-body-medium font-semibold text-foreground", children: "Appointment Confirmed" })
356
+ ] }),
357
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1.5 border-t border-border pt-2 text-body-small text-muted-foreground", children: [
358
+ confirmedSlot && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
359
+ /* @__PURE__ */ jsx(Calendar, { className: "size-3.5 shrink-0" }),
360
+ /* @__PURE__ */ jsx("span", { children: confirmedSlot.datetime })
361
+ ] }),
362
+ meetingType && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
363
+ /* @__PURE__ */ jsx(MeetingTypeIcon, { id: meetingType, className: "size-3.5" }),
364
+ /* @__PURE__ */ jsx("span", { children: MEETING_TYPE_LABELS[meetingType] })
365
+ ] }),
366
+ topic && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
367
+ /* @__PURE__ */ jsx(MessageSquare, { className: "size-3.5 shrink-0" }),
368
+ /* @__PURE__ */ jsx("span", { children: topic })
369
+ ] }),
370
+ advisorName && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
371
+ /* @__PURE__ */ jsx(User, { className: "size-3.5 shrink-0" }),
372
+ /* @__PURE__ */ jsxs("span", { children: [
373
+ "with ",
374
+ advisorName
375
+ ] })
376
+ ] })
377
+ ] })
378
+ ]
379
+ }
380
+ );
381
+ }
382
+ return null;
383
+ }
384
+ function ChatWidgetWindow({
385
+ isOpen,
386
+ brokerName = "Your Broker",
387
+ brandColor,
388
+ gradientFrom,
389
+ gradientTo,
390
+ onMinimize,
391
+ onIntakeSubmit,
392
+ isSubmittingIntake,
393
+ topics,
394
+ onTopicSelect,
395
+ bookingUrl,
396
+ messages = [],
397
+ inputValue = "",
398
+ onInputChange,
399
+ onSend,
400
+ isStreaming,
401
+ onSlotSelect,
402
+ onQuickReply,
403
+ onMeetingTypeSelect,
404
+ initialScreen,
405
+ initialUser,
406
+ className
407
+ }) {
408
+ var _a;
409
+ const [screen, setScreen] = useState(
410
+ () => initialScreen != null ? initialScreen : "topics"
411
+ );
412
+ const [user, setUser] = useState(
413
+ () => initialUser != null ? initialUser : null
414
+ );
415
+ const handleIntakeSubmit = useCallback(
416
+ (data) => {
417
+ setUser(data);
418
+ setScreen("topics");
419
+ onIntakeSubmit == null ? void 0 : onIntakeSubmit(data);
420
+ },
421
+ [onIntakeSubmit]
422
+ );
423
+ const handleTopicSelect = useCallback(
424
+ (topicId) => {
425
+ setScreen(topicId === "book_meeting" && bookingUrl ? "booking" : "chat");
426
+ onTopicSelect == null ? void 0 : onTopicSelect(topicId);
427
+ },
428
+ [onTopicSelect, bookingUrl]
429
+ );
430
+ if (!isOpen) return null;
431
+ const showBackBar = screen === "chat" || screen === "booking";
432
+ return /* @__PURE__ */ jsxs(
433
+ "div",
434
+ {
435
+ className: cn(
436
+ "flex h-[600px] w-[360px] flex-col overflow-hidden border border-border bg-background shadow-xl",
437
+ className
438
+ ),
439
+ style: brandColor ? { "--primary": brandColor } : void 0,
440
+ children: [
441
+ /* @__PURE__ */ jsx(
442
+ ChatWidgetHeader,
443
+ {
444
+ brokerName,
445
+ gradientFrom,
446
+ gradientTo,
447
+ onMinimize
448
+ }
449
+ ),
450
+ /* @__PURE__ */ jsxs("div", { className: "flex-1 overflow-y-auto", tabIndex: 0, children: [
451
+ screen === "intake" && /* @__PURE__ */ jsx(
452
+ ChatWidgetIntakeForm,
453
+ {
454
+ brokerName,
455
+ onSubmit: handleIntakeSubmit,
456
+ isSubmitting: isSubmittingIntake
457
+ }
458
+ ),
459
+ screen === "topics" && /* @__PURE__ */ jsx(
460
+ ChatWidgetTopicGrid,
461
+ {
462
+ userName: (_a = user == null ? void 0 : user.name) != null ? _a : "there",
463
+ topics,
464
+ onTopicSelect: handleTopicSelect
465
+ }
466
+ ),
467
+ screen === "chat" && /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-3 p-4", children: messages.map((msg) => /* @__PURE__ */ jsxs(React.Fragment, { children: [
468
+ (msg.content || msg.isStreaming) && /* @__PURE__ */ jsx(
469
+ ChatWidgetMessage,
470
+ {
471
+ role: msg.role,
472
+ content: msg.content,
473
+ timestamp: msg.timestamp,
474
+ isStreaming: msg.isStreaming
475
+ }
476
+ ),
477
+ msg.interactiveCard && /* @__PURE__ */ jsx(
478
+ ChatWidgetInteractiveCard,
479
+ __spreadProps(__spreadValues({}, msg.interactiveCard), {
480
+ onSlotSelect,
481
+ onQuickReply,
482
+ onMeetingTypeSelect
483
+ })
484
+ )
485
+ ] }, msg.id)) }),
486
+ screen === "booking" && bookingUrl && /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-5 px-6 py-10 text-center", children: [
487
+ /* @__PURE__ */ jsx("div", { className: "flex size-14 items-center justify-center bg-primary/10", children: /* @__PURE__ */ jsx(CalendarDays, { className: "size-7 text-foreground" }) }),
488
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1", children: [
489
+ /* @__PURE__ */ jsx("p", { className: "text-body-large font-semibold text-foreground", children: "Book an Appointment" }),
490
+ /* @__PURE__ */ jsx("p", { className: "text-body-medium text-muted-foreground", children: "Choose a time that works for you with one of our advisors." })
491
+ ] }),
492
+ /* @__PURE__ */ jsxs(
493
+ Button,
494
+ {
495
+ variant: "default",
496
+ className: "w-full",
497
+ onClick: () => window.open(bookingUrl, "_blank"),
498
+ children: [
499
+ "Open Booking Page",
500
+ /* @__PURE__ */ jsx(ExternalLink, { className: "size-4" })
501
+ ]
502
+ }
503
+ )
504
+ ] })
505
+ ] }),
506
+ showBackBar && /* @__PURE__ */ jsx("div", { className: "border-t border-border px-4 py-1.5 text-center", children: /* @__PURE__ */ jsxs(Button, { variant: "ghost", size: "sm", onClick: () => setScreen("topics"), children: [
507
+ /* @__PURE__ */ jsx(ArrowLeft, { className: "size-3" }),
508
+ "Change topic"
509
+ ] }) }),
510
+ screen === "chat" && onInputChange && onSend && /* @__PURE__ */ jsx(
511
+ ChatWidgetInputBar,
512
+ {
513
+ value: inputValue,
514
+ onChange: onInputChange,
515
+ onSend,
516
+ disabled: isStreaming
517
+ }
518
+ )
519
+ ]
520
+ }
521
+ );
522
+ }
523
+ function ChatWidget({
524
+ brokerName = "Your Broker",
525
+ brandColor,
526
+ gradientFrom,
527
+ gradientTo,
528
+ bookingUrl,
529
+ position = "bottom-right",
530
+ defaultOpen = false,
531
+ onTopicSelected,
532
+ onMessageSent
533
+ }) {
534
+ const [isOpen, setIsOpen] = useState(defaultOpen);
535
+ const [messages, setMessages] = useState([]);
536
+ const [inputValue, setInputValue] = useState("");
537
+ const handleTopicSelect = useCallback(
538
+ (topicId) => {
539
+ if (topicId !== "book_meeting" || !bookingUrl) {
540
+ const topic = DEFAULT_CHAT_WIDGET_TOPICS.find((t) => t.id === topicId);
541
+ if (topic) {
542
+ setMessages([
543
+ {
544
+ id: "welcome",
545
+ role: "bot",
546
+ content: `Great choice! I can help you with ${topic.label.toLowerCase()}. What would you like to know?`
547
+ }
548
+ ]);
549
+ }
550
+ }
551
+ onTopicSelected == null ? void 0 : onTopicSelected(topicId);
552
+ },
553
+ [onTopicSelected, bookingUrl]
554
+ );
555
+ const handleSend = useCallback(
556
+ (value) => {
557
+ if (!value.trim()) return;
558
+ setMessages((prev) => [
559
+ ...prev,
560
+ { id: `msg-${Date.now()}`, role: "user", content: value }
561
+ ]);
562
+ setInputValue("");
563
+ onMessageSent == null ? void 0 : onMessageSent(value);
564
+ },
565
+ [onMessageSent]
566
+ );
567
+ return /* @__PURE__ */ jsxs(
568
+ "div",
569
+ {
570
+ className: cn(
571
+ "fixed bottom-6 z-50 flex flex-col items-end gap-3",
572
+ position === "bottom-right" ? "right-6" : "left-6"
573
+ ),
574
+ children: [
575
+ isOpen && /* @__PURE__ */ jsx(
576
+ ChatWidgetWindow,
577
+ {
578
+ isOpen,
579
+ brokerName,
580
+ brandColor,
581
+ gradientFrom,
582
+ gradientTo,
583
+ bookingUrl,
584
+ onMinimize: () => setIsOpen(false),
585
+ messages,
586
+ inputValue,
587
+ onInputChange: setInputValue,
588
+ onSend: handleSend,
589
+ onTopicSelect: handleTopicSelect
590
+ }
591
+ ),
592
+ /* @__PURE__ */ jsx(
593
+ ChatWidgetLauncher,
594
+ {
595
+ isOpen,
596
+ onClick: () => setIsOpen((prev) => !prev),
597
+ brandColor
598
+ }
599
+ )
600
+ ]
601
+ }
602
+ );
603
+ }
604
+
605
+ export {
606
+ DEFAULT_CHAT_WIDGET_TOPICS,
607
+ ChatWidgetIntakeForm,
608
+ ChatWidgetTopicCard,
609
+ ChatWidgetTopicGrid,
610
+ ChatWidgetInteractiveCard,
611
+ ChatWidgetWindow,
612
+ ChatWidget
613
+ };
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  cn
3
- } from "./chunk-VLQZANBF.mjs";
3
+ } from "./chunk-AFML43VJ.mjs";
4
4
  import {
5
5
  __objRest,
6
6
  __spreadValues
7
- } from "./chunk-FWCSY2DS.mjs";
7
+ } from "./chunk-WNQUEZJF.mjs";
8
8
 
9
9
  // src/components/ui/separator.tsx
10
10
  import { Separator as SeparatorPrimitive } from "@base-ui/react/separator";