@wealthx/shadcn 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (300) hide show
  1. package/.turbo/turbo-build.log +235 -154
  2. package/CHANGELOG.md +6 -0
  3. package/dist/{chunk-6OJF6XRN.mjs → chunk-24FUO7TD.mjs} +4 -8
  4. package/dist/{chunk-4AJ5HWHD.mjs → chunk-2I5S2AMY.mjs} +3 -3
  5. package/dist/chunk-2SF672SZ.mjs +161 -0
  6. package/dist/{chunk-GPRJQ24C.mjs → chunk-34NWQURD.mjs} +2 -2
  7. package/dist/{chunk-MQ72DIBH.mjs → chunk-3GF7OVTP.mjs} +14 -5
  8. package/dist/chunk-3WMX6KWS.mjs +245 -0
  9. package/dist/{chunk-PMKODV6M.mjs → chunk-462HMNO4.mjs} +6 -10
  10. package/dist/chunk-4CX4SBRO.mjs +153 -0
  11. package/dist/chunk-4MN6UQHG.mjs +443 -0
  12. package/dist/{chunk-GLW2UO6O.mjs → chunk-5QQVZTVZ.mjs} +82 -61
  13. package/dist/{chunk-BGP2N52Z.mjs → chunk-66MI7Q4B.mjs} +5 -5
  14. package/dist/chunk-6FCGKSZX.mjs +268 -0
  15. package/dist/{chunk-CGOKTPXU.mjs → chunk-6JQFUE5I.mjs} +20 -23
  16. package/dist/{chunk-Z3MK2KKZ.mjs → chunk-7DHU4VGG.mjs} +7 -3
  17. package/dist/{chunk-VZ2NR7L3.mjs → chunk-7PYJD5JI.mjs} +35 -27
  18. package/dist/{chunk-JU2RUWHF.mjs → chunk-7XJHLGUV.mjs} +1 -1
  19. package/dist/{chunk-BMFN37JH.mjs → chunk-7YAU5CY6.mjs} +1 -1
  20. package/dist/chunk-A56YQQHG.mjs +402 -0
  21. package/dist/chunk-AH52LG6N.mjs +315 -0
  22. package/dist/{chunk-SLWCCURD.mjs → chunk-CLIN5525.mjs} +8 -4
  23. package/dist/{chunk-3VQNJ235.mjs → chunk-CSDO6VBW.mjs} +7 -0
  24. package/dist/chunk-D4ILTPOG.mjs +293 -0
  25. package/dist/{chunk-HS7TFG7V.mjs → chunk-D6ID6M4V.mjs} +1 -1
  26. package/dist/chunk-DOH3EHX7.mjs +378 -0
  27. package/dist/{chunk-MJIEMGRD.mjs → chunk-EFRENWEJ.mjs} +9 -17
  28. package/dist/{chunk-YBXCIF5Q.mjs → chunk-ERGGHC2V.mjs} +36 -49
  29. package/dist/{chunk-OXQQNQZI.mjs → chunk-FEZKMUCF.mjs} +10 -1
  30. package/dist/{chunk-55CEW76V.mjs → chunk-FH6QVUVZ.mjs} +1 -1
  31. package/dist/chunk-FMAXJ2SI.mjs +71 -0
  32. package/dist/chunk-FZIXGLMV.mjs +173 -0
  33. package/dist/{chunk-DS2AMHN2.mjs → chunk-GYMYRIZP.mjs} +2 -2
  34. package/dist/{chunk-KQDD5MU3.mjs → chunk-H45TKD34.mjs} +5 -5
  35. package/dist/{chunk-BBJBJSXQ.mjs → chunk-J5UICVJS.mjs} +1 -1
  36. package/dist/{chunk-RL772EH7.mjs → chunk-JHJHG4GO.mjs} +4 -12
  37. package/dist/{chunk-RN67642N.mjs → chunk-KMCGSZTX.mjs} +47 -41
  38. package/dist/{chunk-FHNT55I5.mjs → chunk-KUDCQ4FI.mjs} +4 -4
  39. package/dist/chunk-LE6YFY6D.mjs +209 -0
  40. package/dist/{chunk-NLLKTU4B.mjs → chunk-LLVQKSU3.mjs} +21 -17
  41. package/dist/{chunk-KKHTJNMM.mjs → chunk-MARPPFOJ.mjs} +8 -4
  42. package/dist/{chunk-6AFMNC42.mjs → chunk-N2PT566P.mjs} +15 -11
  43. package/dist/chunk-NLCKVHWB.mjs +161 -0
  44. package/dist/{chunk-YN5SYTOO.mjs → chunk-NQPOYKAQ.mjs} +9 -5
  45. package/dist/{chunk-ZZV5JVNW.mjs → chunk-NSLMILBT.mjs} +3 -7
  46. package/dist/chunk-NXA3CZ7A.mjs +248 -0
  47. package/dist/chunk-OGOYQ7BG.mjs +150 -0
  48. package/dist/{chunk-3NQGYJEZ.mjs → chunk-P6AM5V7O.mjs} +10 -18
  49. package/dist/{chunk-CZ3BW5GL.mjs → chunk-P76HMUI6.mjs} +5 -11
  50. package/dist/chunk-PCPLO5HT.mjs +671 -0
  51. package/dist/chunk-PG6K5XEC.mjs +475 -0
  52. package/dist/{chunk-5JGQAAQV.mjs → chunk-PJHPSRYD.mjs} +84 -62
  53. package/dist/{chunk-DDPA2XXS.mjs → chunk-PMB3A7V3.mjs} +2 -2
  54. package/dist/chunk-PR6V5XKM.mjs +209 -0
  55. package/dist/{chunk-46OFHMQA.mjs → chunk-Q76O3RIQ.mjs} +10 -6
  56. package/dist/chunk-QVKWW6KE.mjs +272 -0
  57. package/dist/chunk-RGU7HOEC.mjs +140 -0
  58. package/dist/{chunk-JF4PHPD5.mjs → chunk-RGVKLTLH.mjs} +4 -4
  59. package/dist/{chunk-VG6UF6UT.mjs → chunk-RP3SQYA3.mjs} +2 -2
  60. package/dist/chunk-RRBS6D63.mjs +163 -0
  61. package/dist/{chunk-UEL4RD5P.mjs → chunk-SMQ3DG25.mjs} +80 -67
  62. package/dist/chunk-SPJ5KXW7.mjs +199 -0
  63. package/dist/chunk-SYOD63OZ.mjs +225 -0
  64. package/dist/chunk-UFYSFDER.mjs +42 -0
  65. package/dist/chunk-VACKZOMY.mjs +190 -0
  66. package/dist/chunk-VLQZANBF.mjs +42 -0
  67. package/dist/chunk-WA6O6EUR.mjs +1885 -0
  68. package/dist/{chunk-E3K6O4FZ.mjs → chunk-WAZD7NFU.mjs} +5 -2
  69. package/dist/chunk-WG6JGJXB.mjs +165 -0
  70. package/dist/{chunk-I64K754C.mjs → chunk-WNGWBVLV.mjs} +2 -2
  71. package/dist/{chunk-3U7SD3MS.mjs → chunk-WOEHFRGB.mjs} +3 -3
  72. package/dist/{chunk-DKZRJOMF.mjs → chunk-XIRTEFKH.mjs} +12 -12
  73. package/dist/chunk-Y6DWJSKZ.mjs +79 -0
  74. package/dist/chunk-YKPROFLB.mjs +161 -0
  75. package/dist/{chunk-CJ46PDXE.mjs → chunk-ZRO5JO3H.mjs} +106 -66
  76. package/dist/{chunk-VYMHBV6D.mjs → chunk-ZU4NV6RG.mjs} +5 -3
  77. package/dist/components/ui/accordion.js +40 -4
  78. package/dist/components/ui/accordion.mjs +2 -2
  79. package/dist/components/ui/add-column-modal.js +789 -0
  80. package/dist/components/ui/add-column-modal.mjs +17 -0
  81. package/dist/components/ui/add-lead-modal.js +647 -0
  82. package/dist/components/ui/add-lead-modal.mjs +16 -0
  83. package/dist/components/ui/ai-assistant-drawer.js +686 -0
  84. package/dist/components/ui/ai-assistant-drawer.mjs +16 -0
  85. package/dist/components/ui/alert-dialog.js +37 -5
  86. package/dist/components/ui/alert-dialog.mjs +4 -4
  87. package/dist/components/ui/alert.js +37 -11
  88. package/dist/components/ui/alert.mjs +2 -2
  89. package/dist/components/ui/avatar.js +36 -8
  90. package/dist/components/ui/avatar.mjs +2 -2
  91. package/dist/components/ui/backoffice-alert-history-chart.js +624 -0
  92. package/dist/components/ui/backoffice-alert-history-chart.mjs +16 -0
  93. package/dist/components/ui/backoffice-contact-history-chart.js +687 -0
  94. package/dist/components/ui/backoffice-contact-history-chart.mjs +16 -0
  95. package/dist/components/ui/badge.js +37 -2
  96. package/dist/components/ui/badge.mjs +2 -2
  97. package/dist/components/ui/borrowing-capacity-line-chart.js +639 -0
  98. package/dist/components/ui/borrowing-capacity-line-chart.mjs +16 -0
  99. package/dist/components/ui/button.js +35 -3
  100. package/dist/components/ui/button.mjs +2 -2
  101. package/dist/components/ui/calendar.js +43 -19
  102. package/dist/components/ui/calendar.mjs +3 -3
  103. package/dist/components/ui/card.js +40 -4
  104. package/dist/components/ui/card.mjs +2 -2
  105. package/dist/components/ui/cash-balance-line-chart.js +627 -0
  106. package/dist/components/ui/cash-balance-line-chart.mjs +16 -0
  107. package/dist/components/ui/cashflow-bar-chart.js +123 -69
  108. package/dist/components/ui/cashflow-bar-chart.mjs +8 -8
  109. package/dist/components/ui/checkbox.js +36 -5
  110. package/dist/components/ui/checkbox.mjs +2 -3
  111. package/dist/components/ui/chip.js +37 -2
  112. package/dist/components/ui/chip.mjs +3 -3
  113. package/dist/components/ui/combobox.js +68 -49
  114. package/dist/components/ui/combobox.mjs +2 -2
  115. package/dist/components/ui/data-table.js +160 -88
  116. package/dist/components/ui/data-table.mjs +10 -11
  117. package/dist/components/ui/date-picker.js +44 -20
  118. package/dist/components/ui/date-picker.mjs +6 -7
  119. package/dist/components/ui/dialog.js +44 -12
  120. package/dist/components/ui/dialog.mjs +4 -4
  121. package/dist/components/ui/drawer.js +46 -10
  122. package/dist/components/ui/drawer.mjs +3 -3
  123. package/dist/components/ui/dropdown-menu.js +40 -16
  124. package/dist/components/ui/dropdown-menu.mjs +3 -3
  125. package/dist/components/ui/empty.js +41 -5
  126. package/dist/components/ui/empty.mjs +2 -2
  127. package/dist/components/ui/expense-bar-chart.js +165 -66
  128. package/dist/components/ui/expense-bar-chart.mjs +8 -8
  129. package/dist/components/ui/field.js +53 -21
  130. package/dist/components/ui/field.mjs +4 -4
  131. package/dist/components/ui/financial-cards.js +1002 -0
  132. package/dist/components/ui/financial-cards.mjs +24 -0
  133. package/dist/components/ui/financial-drawers.js +637 -0
  134. package/dist/components/ui/financial-drawers.mjs +17 -0
  135. package/dist/components/ui/financial-primitives.js +218 -0
  136. package/dist/components/ui/financial-primitives.mjs +22 -0
  137. package/dist/components/ui/financial-sections.js +1422 -0
  138. package/dist/components/ui/financial-sections.mjs +30 -0
  139. package/dist/components/ui/form-primitives.js +682 -0
  140. package/dist/components/ui/form-primitives.mjs +19 -0
  141. package/dist/components/ui/income-bar-chart.js +163 -65
  142. package/dist/components/ui/income-bar-chart.mjs +8 -8
  143. package/dist/components/ui/input-group.js +43 -7
  144. package/dist/components/ui/input-group.mjs +5 -5
  145. package/dist/components/ui/input-otp.js +39 -3
  146. package/dist/components/ui/input-otp.mjs +2 -2
  147. package/dist/components/ui/input.js +34 -2
  148. package/dist/components/ui/input.mjs +2 -2
  149. package/dist/components/ui/kanban-column.js +1143 -0
  150. package/dist/components/ui/kanban-column.mjs +20 -0
  151. package/dist/components/ui/label.js +35 -7
  152. package/dist/components/ui/label.mjs +2 -2
  153. package/dist/components/ui/opportunity-card.js +960 -0
  154. package/dist/components/ui/opportunity-card.mjs +20 -0
  155. package/dist/components/ui/opportunity-edit-modals.js +3360 -0
  156. package/dist/components/ui/opportunity-edit-modals.mjs +37 -0
  157. package/dist/components/ui/opportunity-summary-tab.js +4365 -0
  158. package/dist/components/ui/opportunity-summary-tab.mjs +34 -0
  159. package/dist/components/ui/pagination.js +35 -3
  160. package/dist/components/ui/pagination.mjs +3 -3
  161. package/dist/components/ui/pipeline-alerts.js +103 -0
  162. package/dist/components/ui/pipeline-alerts.mjs +8 -0
  163. package/dist/components/ui/pipeline-board.js +1408 -0
  164. package/dist/components/ui/pipeline-board.mjs +24 -0
  165. package/dist/components/ui/pipeline-chart.js +216 -0
  166. package/dist/components/ui/pipeline-chart.mjs +10 -0
  167. package/dist/components/ui/pipeline-dialogs.js +1183 -0
  168. package/dist/components/ui/pipeline-dialogs.mjs +23 -0
  169. package/dist/components/ui/pipeline-primitives.js +300 -0
  170. package/dist/components/ui/pipeline-primitives.mjs +11 -0
  171. package/dist/components/ui/popover.js +45 -4
  172. package/dist/components/ui/popover.mjs +3 -3
  173. package/dist/components/ui/progress.js +33 -1
  174. package/dist/components/ui/progress.mjs +2 -2
  175. package/dist/components/ui/property-cashflow-doughnut-chart.js +523 -0
  176. package/dist/components/ui/property-cashflow-doughnut-chart.mjs +16 -0
  177. package/dist/components/ui/property-debt-equity-doughnut-chart.js +521 -0
  178. package/dist/components/ui/property-debt-equity-doughnut-chart.mjs +16 -0
  179. package/dist/components/ui/property-mobile-estimate-line-chart.js +682 -0
  180. package/dist/components/ui/property-mobile-estimate-line-chart.mjs +16 -0
  181. package/dist/components/ui/radio-group.js +33 -1
  182. package/dist/components/ui/radio-group.mjs +2 -2
  183. package/dist/components/ui/select.js +66 -26
  184. package/dist/components/ui/select.mjs +3 -3
  185. package/dist/components/ui/separator.js +33 -1
  186. package/dist/components/ui/separator.mjs +2 -2
  187. package/dist/components/ui/sheet.js +37 -9
  188. package/dist/components/ui/sheet.mjs +3 -3
  189. package/dist/components/ui/skeleton.js +33 -1
  190. package/dist/components/ui/skeleton.mjs +2 -2
  191. package/dist/components/ui/slider.js +86 -102
  192. package/dist/components/ui/slider.mjs +2 -2
  193. package/dist/components/ui/spinner.js +33 -1
  194. package/dist/components/ui/spinner.mjs +2 -2
  195. package/dist/components/ui/stage-timeline.js +579 -0
  196. package/dist/components/ui/stage-timeline.mjs +15 -0
  197. package/dist/components/ui/switch.js +37 -4
  198. package/dist/components/ui/switch.mjs +2 -3
  199. package/dist/components/ui/table.js +37 -5
  200. package/dist/components/ui/table.mjs +2 -2
  201. package/dist/components/ui/tabs.js +36 -12
  202. package/dist/components/ui/tabs.mjs +2 -2
  203. package/dist/components/ui/textarea.js +34 -2
  204. package/dist/components/ui/textarea.mjs +2 -2
  205. package/dist/components/ui/toggle-group.js +35 -4
  206. package/dist/components/ui/toggle-group.mjs +3 -4
  207. package/dist/components/ui/toggle.js +35 -4
  208. package/dist/components/ui/toggle.mjs +2 -3
  209. package/dist/components/ui/tooltip.js +51 -22
  210. package/dist/components/ui/tooltip.mjs +3 -3
  211. package/dist/components/ui/transactions-expense-categories-doughnut-chart.js +528 -0
  212. package/dist/components/ui/transactions-expense-categories-doughnut-chart.mjs +16 -0
  213. package/dist/components/ui/transactions-income-expense-bar-chart.js +76 -38
  214. package/dist/components/ui/transactions-income-expense-bar-chart.mjs +8 -8
  215. package/dist/components/ui/transactions-liabilities-breakdown-doughnut-chart.js +528 -0
  216. package/dist/components/ui/transactions-liabilities-breakdown-doughnut-chart.mjs +16 -0
  217. package/dist/index.js +11616 -3831
  218. package/dist/index.mjs +333 -161
  219. package/dist/lib/theme-provider.js +10 -1
  220. package/dist/lib/theme-provider.mjs +1 -1
  221. package/dist/lib/typography.js +8 -0
  222. package/dist/lib/typography.mjs +3 -1
  223. package/dist/lib/utils.js +33 -1
  224. package/dist/lib/utils.mjs +1 -1
  225. package/dist/styles.css +1 -1
  226. package/package.json +140 -5
  227. package/src/components/index.tsx +296 -42
  228. package/src/components/ui/accordion.tsx +6 -3
  229. package/src/components/ui/add-column-modal.tsx +339 -0
  230. package/src/components/ui/add-lead-modal.tsx +290 -0
  231. package/src/components/ui/ai-assistant-drawer.tsx +408 -0
  232. package/src/components/ui/alert-dialog.tsx +80 -54
  233. package/src/components/ui/alert.tsx +28 -28
  234. package/src/components/ui/avatar.tsx +30 -29
  235. package/src/components/ui/backoffice-alert-history-chart.tsx +260 -0
  236. package/src/components/ui/backoffice-contact-history-chart.tsx +325 -0
  237. package/src/components/ui/badge.tsx +17 -15
  238. package/src/components/ui/borrowing-capacity-line-chart.tsx +357 -0
  239. package/src/components/ui/button.tsx +30 -27
  240. package/src/components/ui/calendar.tsx +53 -67
  241. package/src/components/ui/card.tsx +27 -24
  242. package/src/components/ui/cash-balance-line-chart.tsx +302 -0
  243. package/src/components/ui/cashflow-bar-chart.tsx +104 -77
  244. package/src/components/ui/chart-shared.tsx +176 -15
  245. package/src/components/ui/checkbox.tsx +30 -26
  246. package/src/components/ui/combobox.tsx +78 -72
  247. package/src/components/ui/data-table.tsx +160 -99
  248. package/src/components/ui/date-picker.tsx +0 -2
  249. package/src/components/ui/dialog.tsx +70 -60
  250. package/src/components/ui/drawer.tsx +57 -48
  251. package/src/components/ui/dropdown-menu.tsx +90 -82
  252. package/src/components/ui/empty.tsx +31 -27
  253. package/src/components/ui/expense-bar-chart.tsx +83 -65
  254. package/src/components/ui/field.tsx +70 -62
  255. package/src/components/ui/financial-cards.tsx +830 -0
  256. package/src/components/ui/financial-drawers.tsx +339 -0
  257. package/src/components/ui/financial-primitives.tsx +331 -0
  258. package/src/components/ui/financial-sections.tsx +672 -0
  259. package/src/components/ui/form-primitives.tsx +536 -0
  260. package/src/components/ui/income-bar-chart.tsx +79 -60
  261. package/src/components/ui/input-group.tsx +41 -34
  262. package/src/components/ui/input-otp.tsx +29 -24
  263. package/src/components/ui/input.tsx +8 -8
  264. package/src/components/ui/kanban-column.tsx +333 -0
  265. package/src/components/ui/label.tsx +9 -12
  266. package/src/components/ui/opportunity-card.tsx +616 -0
  267. package/src/components/ui/opportunity-edit-modals.tsx +2528 -0
  268. package/src/components/ui/opportunity-summary-tab.tsx +579 -0
  269. package/src/components/ui/pipeline-alerts.tsx +74 -0
  270. package/src/components/ui/pipeline-board.tsx +268 -0
  271. package/src/components/ui/pipeline-chart.tsx +173 -0
  272. package/src/components/ui/pipeline-dialogs.tsx +303 -0
  273. package/src/components/ui/pipeline-primitives.tsx +108 -0
  274. package/src/components/ui/popover.tsx +41 -36
  275. package/src/components/ui/property-cashflow-doughnut-chart.tsx +188 -0
  276. package/src/components/ui/property-debt-equity-doughnut-chart.tsx +185 -0
  277. package/src/components/ui/property-mobile-estimate-line-chart.tsx +393 -0
  278. package/src/components/ui/select.tsx +65 -52
  279. package/src/components/ui/sheet.tsx +55 -52
  280. package/src/components/ui/slider.tsx +54 -77
  281. package/src/components/ui/stage-timeline.tsx +205 -0
  282. package/src/components/ui/switch.tsx +42 -29
  283. package/src/components/ui/table.tsx +28 -28
  284. package/src/components/ui/tabs.tsx +22 -28
  285. package/src/components/ui/textarea.tsx +8 -8
  286. package/src/components/ui/toggle-group.tsx +0 -2
  287. package/src/components/ui/toggle.tsx +13 -15
  288. package/src/components/ui/tooltip.tsx +30 -28
  289. package/src/components/ui/transactions-expense-categories-doughnut-chart.tsx +191 -0
  290. package/src/components/ui/transactions-income-expense-bar-chart.tsx +45 -38
  291. package/src/components/ui/transactions-liabilities-breakdown-doughnut-chart.tsx +191 -0
  292. package/src/lib/theme-provider.tsx +10 -0
  293. package/src/lib/typography.ts +9 -0
  294. package/src/lib/utils.ts +41 -3
  295. package/src/styles/globals.css +371 -124
  296. package/src/styles/styles-css.ts +1 -1
  297. package/tsup.config.ts +27 -0
  298. package/dist/chunk-3EQP72AW.mjs +0 -58
  299. package/dist/chunk-K74JRTJR.mjs +0 -105
  300. package/dist/chunk-V7CNWJT3.mjs +0 -10
@@ -0,0 +1,1408 @@
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/pipeline-board.tsx
60
+ var pipeline_board_exports = {};
61
+ __export(pipeline_board_exports, {
62
+ PipelineBoard: () => PipelineBoard
63
+ });
64
+ module.exports = __toCommonJS(pipeline_board_exports);
65
+ var import_lucide_react8 = require("lucide-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/input.tsx
107
+ var import_jsx_runtime = require("react/jsx-runtime");
108
+ function Input(_a) {
109
+ var _b = _a, { className, type } = _b, props = __objRest(_b, ["className", "type"]);
110
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
111
+ "input",
112
+ __spreadValues({
113
+ className: cn(
114
+ "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",
115
+ "focus-visible:border-primary focus-visible:ring-[3px] focus-visible:ring-primary/20",
116
+ "aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",
117
+ className
118
+ ),
119
+ "data-slot": "input",
120
+ type
121
+ }, props)
122
+ );
123
+ }
124
+
125
+ // src/components/ui/toggle-group.tsx
126
+ var React = __toESM(require("react"));
127
+ var import_toggle_group = require("@base-ui/react/toggle-group");
128
+ var import_toggle2 = require("@base-ui/react/toggle");
129
+
130
+ // src/components/ui/toggle.tsx
131
+ var import_class_variance_authority = require("class-variance-authority");
132
+ var import_toggle = require("@base-ui/react/toggle");
133
+ var import_jsx_runtime2 = require("react/jsx-runtime");
134
+ var toggleVariants = (0, import_class_variance_authority.cva)(
135
+ "inline-flex items-center justify-center gap-2 text-label-medium 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",
136
+ {
137
+ variants: {
138
+ variant: {
139
+ default: "bg-transparent hover:bg-muted hover:text-muted-foreground",
140
+ outline: "border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"
141
+ },
142
+ size: {
143
+ default: "h-9 min-w-9 px-2",
144
+ sm: "h-8 min-w-8 px-1.5 text-caption",
145
+ lg: "h-10 min-w-10 px-2.5"
146
+ }
147
+ },
148
+ defaultVariants: {
149
+ variant: "default",
150
+ size: "default"
151
+ }
152
+ }
153
+ );
154
+
155
+ // src/components/ui/toggle-group.tsx
156
+ var import_jsx_runtime3 = require("react/jsx-runtime");
157
+ var ToggleGroupContext = React.createContext({
158
+ size: "default",
159
+ variant: "default",
160
+ spacing: 0
161
+ });
162
+ function ToggleGroup(_a) {
163
+ var _b = _a, {
164
+ className,
165
+ variant,
166
+ size,
167
+ spacing = 0,
168
+ type,
169
+ children
170
+ } = _b, props = __objRest(_b, [
171
+ "className",
172
+ "variant",
173
+ "size",
174
+ "spacing",
175
+ "type",
176
+ "children"
177
+ ]);
178
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
179
+ import_toggle_group.ToggleGroup,
180
+ __spreadProps(__spreadValues({
181
+ className: cn(
182
+ // WealthX: removed rounded-md (sharp corners) and shadow-xs (flat panels)
183
+ "group/toggle-group flex w-fit items-center gap-[--spacing(var(--gap))]",
184
+ className
185
+ ),
186
+ "data-size": size,
187
+ "data-slot": "toggle-group",
188
+ "data-spacing": spacing,
189
+ "data-variant": variant,
190
+ multiple: type === "multiple",
191
+ style: { "--gap": spacing }
192
+ }, props), {
193
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ToggleGroupContext.Provider, { value: { variant, size, spacing }, children })
194
+ })
195
+ );
196
+ }
197
+ function ToggleGroupItem(_a) {
198
+ var _b = _a, {
199
+ className,
200
+ children,
201
+ variant,
202
+ size
203
+ } = _b, props = __objRest(_b, [
204
+ "className",
205
+ "children",
206
+ "variant",
207
+ "size"
208
+ ]);
209
+ const context = React.useContext(ToggleGroupContext);
210
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
211
+ import_toggle2.Toggle,
212
+ __spreadProps(__spreadValues({
213
+ className: cn(
214
+ toggleVariants({
215
+ variant: context.variant || variant,
216
+ size: context.size || size
217
+ }),
218
+ "w-auto min-w-0 shrink-0 focus:z-10 focus-visible:z-10",
219
+ // WealthX: no rounded corners on grouped items
220
+ "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",
221
+ className
222
+ ),
223
+ "data-size": context.size || size,
224
+ "data-slot": "toggle-group-item",
225
+ "data-spacing": context.spacing,
226
+ "data-variant": context.variant || variant
227
+ }, props), {
228
+ children
229
+ })
230
+ );
231
+ }
232
+
233
+ // src/components/ui/kanban-column.tsx
234
+ var import_lucide_react7 = require("lucide-react");
235
+
236
+ // src/lib/theme-provider.tsx
237
+ var import_react = require("react");
238
+ var import_jsx_runtime4 = require("react/jsx-runtime");
239
+ var ThemeVarsContext = (0, import_react.createContext)({});
240
+ function useThemeVars() {
241
+ return (0, import_react.useContext)(ThemeVarsContext);
242
+ }
243
+
244
+ // src/components/ui/badge.tsx
245
+ var import_class_variance_authority2 = require("class-variance-authority");
246
+
247
+ // src/lib/slot.tsx
248
+ var React3 = __toESM(require("react"));
249
+ function mergeRefs(...refs) {
250
+ return (value) => {
251
+ for (const ref of refs) {
252
+ if (typeof ref === "function") ref(value);
253
+ else if (ref !== null)
254
+ ref.current = value;
255
+ }
256
+ };
257
+ }
258
+ var Slot = React3.forwardRef(
259
+ (_a, forwardedRef) => {
260
+ var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
261
+ const child = React3.Children.only(children);
262
+ if (!React3.isValidElement(child)) return null;
263
+ const childProps = child.props;
264
+ const merged = __spreadValues({}, props);
265
+ for (const key of Object.keys(childProps)) {
266
+ if (key === "className") {
267
+ merged.className = [props.className, childProps.className].filter(Boolean).join(" ");
268
+ } else if (key === "style") {
269
+ merged.style = __spreadValues(__spreadValues({}, props.style), childProps.style);
270
+ } else if (key.startsWith("on") && typeof childProps[key] === "function") {
271
+ const parentHandler = props[key];
272
+ if (typeof parentHandler === "function") {
273
+ merged[key] = (...args) => {
274
+ childProps[key](...args);
275
+ parentHandler(...args);
276
+ };
277
+ } else {
278
+ merged[key] = childProps[key];
279
+ }
280
+ } else {
281
+ merged[key] = childProps[key];
282
+ }
283
+ }
284
+ const childRef = child.ref;
285
+ merged.ref = forwardedRef ? mergeRefs(forwardedRef, childRef) : childRef;
286
+ return React3.cloneElement(
287
+ child,
288
+ merged
289
+ );
290
+ }
291
+ );
292
+ Slot.displayName = "Slot";
293
+
294
+ // src/components/ui/badge.tsx
295
+ var import_jsx_runtime5 = require("react/jsx-runtime");
296
+ var badgeVariants = (0, import_class_variance_authority2.cva)(
297
+ "inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2.5 py-0.5 text-xs font-medium font-sans whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3",
298
+ {
299
+ variants: {
300
+ variant: {
301
+ default: "bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
302
+ secondary: "bg-muted text-muted-foreground [a&]:hover:bg-muted/80",
303
+ destructive: "bg-destructive text-destructive-foreground focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90",
304
+ success: "bg-success text-success-foreground [a&]:hover:bg-success/90",
305
+ warning: "bg-warning text-warning-foreground [a&]:hover:bg-warning/90",
306
+ info: "bg-info text-info-foreground [a&]:hover:bg-info/90",
307
+ outline: "border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
308
+ ghost: "[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
309
+ link: "text-primary underline-offset-4 [a&]:hover:underline"
310
+ }
311
+ },
312
+ defaultVariants: {
313
+ variant: "default"
314
+ }
315
+ }
316
+ );
317
+ function Badge(_a) {
318
+ var _b = _a, {
319
+ className,
320
+ variant = "default",
321
+ asChild = false
322
+ } = _b, props = __objRest(_b, [
323
+ "className",
324
+ "variant",
325
+ "asChild"
326
+ ]);
327
+ const Comp = asChild ? Slot : "span";
328
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
329
+ Comp,
330
+ __spreadValues({
331
+ className: cn(badgeVariants({ variant }), className),
332
+ "data-slot": "badge",
333
+ "data-variant": variant
334
+ }, props)
335
+ );
336
+ }
337
+
338
+ // src/components/ui/button.tsx
339
+ var import_react2 = require("react");
340
+ var import_class_variance_authority3 = require("class-variance-authority");
341
+ var import_lucide_react = require("lucide-react");
342
+ var import_jsx_runtime6 = require("react/jsx-runtime");
343
+ var buttonVariants = (0, import_class_variance_authority3.cva)(
344
+ "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",
345
+ {
346
+ variants: {
347
+ variant: {
348
+ default: "bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",
349
+ secondary: "bg-brand-secondary text-brand-secondary-foreground shadow-xs hover:bg-brand-secondary/80 focus-visible:ring-brand-secondary/30",
350
+ 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",
351
+ outline: "border border-input bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
352
+ "outline-primary": "border border-primary text-foreground bg-transparent shadow-xs hover:bg-primary/5 focus-visible:ring-primary/50",
353
+ "outline-secondary": "border border-brand-secondary text-brand-secondary bg-transparent shadow-xs hover:bg-brand-secondary/10 focus-visible:ring-brand-secondary/30",
354
+ ghost: "hover:bg-accent hover:text-accent-foreground hover:shadow-xs dark:hover:bg-accent/50",
355
+ link: "text-primary underline-offset-4 hover:underline"
356
+ },
357
+ size: {
358
+ default: "h-9 px-4 py-2 has-[>svg]:px-3",
359
+ xs: "h-6 gap-1 px-2 text-button-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",
360
+ sm: "h-8 gap-1.5 px-3 has-[>svg]:px-2.5",
361
+ lg: "h-10 px-6 has-[>svg]:px-4",
362
+ icon: "size-9",
363
+ "icon-xs": "size-6 [&_svg:not([class*='size-'])]:size-3",
364
+ "icon-sm": "size-8",
365
+ "icon-lg": "size-10"
366
+ }
367
+ },
368
+ defaultVariants: {
369
+ variant: "default",
370
+ size: "default"
371
+ }
372
+ }
373
+ );
374
+ var Button = (0, import_react2.forwardRef)(function Button2(_a, ref) {
375
+ var _b = _a, {
376
+ className,
377
+ variant,
378
+ size,
379
+ asChild = false,
380
+ loading = false,
381
+ disabled,
382
+ type = "button",
383
+ children
384
+ } = _b, props = __objRest(_b, [
385
+ "className",
386
+ "variant",
387
+ "size",
388
+ "asChild",
389
+ "loading",
390
+ "disabled",
391
+ "type",
392
+ "children"
393
+ ]);
394
+ const Comp = asChild ? Slot : "button";
395
+ const isIconOnly = size === "icon" || size === "icon-xs" || size === "icon-sm" || size === "icon-lg";
396
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
397
+ Comp,
398
+ __spreadProps(__spreadValues({
399
+ className: cn(buttonVariants({ variant, size, className })),
400
+ "data-size": size,
401
+ "data-slot": "button",
402
+ "data-variant": variant,
403
+ disabled: loading || disabled,
404
+ ref,
405
+ type
406
+ }, props), {
407
+ children: loading ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
408
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_lucide_react.Loader2, { "aria-hidden": "true", className: "animate-spin" }),
409
+ !isIconOnly && children
410
+ ] }) : children
411
+ })
412
+ );
413
+ });
414
+
415
+ // src/components/ui/spinner.tsx
416
+ var import_class_variance_authority4 = require("class-variance-authority");
417
+ var import_lucide_react2 = require("lucide-react");
418
+ var import_jsx_runtime7 = require("react/jsx-runtime");
419
+ var spinnerVariants = (0, import_class_variance_authority4.cva)("animate-spin shrink-0", {
420
+ variants: {
421
+ size: {
422
+ sm: "size-3",
423
+ default: "size-4",
424
+ lg: "size-6",
425
+ xl: "size-8"
426
+ }
427
+ },
428
+ defaultVariants: {
429
+ size: "default"
430
+ }
431
+ });
432
+ function Spinner(_a) {
433
+ var _b = _a, { className, size } = _b, props = __objRest(_b, ["className", "size"]);
434
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
435
+ import_lucide_react2.LoaderCircle,
436
+ __spreadValues({
437
+ "aria-hidden": "true",
438
+ className: cn(spinnerVariants({ size }), className),
439
+ "data-slot": "spinner"
440
+ }, props)
441
+ );
442
+ }
443
+
444
+ // src/components/ui/dropdown-menu.tsx
445
+ var import_lucide_react3 = require("lucide-react");
446
+ var import_menu = require("@base-ui/react/menu");
447
+ var import_jsx_runtime8 = require("react/jsx-runtime");
448
+ function DropdownMenu(_a) {
449
+ var props = __objRest(_a, []);
450
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_menu.Menu.Root, __spreadValues({ "data-slot": "dropdown-menu" }, props));
451
+ }
452
+ function DropdownMenuTrigger(_a) {
453
+ var props = __objRest(_a, []);
454
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_menu.Menu.Trigger, __spreadValues({ "data-slot": "dropdown-menu-trigger" }, props));
455
+ }
456
+ function DropdownMenuContent(_a) {
457
+ var _b = _a, {
458
+ className,
459
+ sideOffset = 4,
460
+ style
461
+ } = _b, props = __objRest(_b, [
462
+ "className",
463
+ "sideOffset",
464
+ "style"
465
+ ]);
466
+ const themeVars = useThemeVars();
467
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_menu.Menu.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_menu.Menu.Positioner, { sideOffset, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
468
+ import_menu.Menu.Popup,
469
+ __spreadValues({
470
+ className: cn(
471
+ "z-50 min-w-[8rem] overflow-x-hidden overflow-y-auto rounded-none border bg-popover p-1 text-popover-foreground shadow-md data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-ending-style:animate-out data-ending-style:fade-out-0 data-ending-style:zoom-out-95 data-ending-style:fill-mode-forwards data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95",
472
+ className
473
+ ),
474
+ "data-slot": "dropdown-menu-content",
475
+ style: __spreadValues(__spreadValues({}, themeVars), style)
476
+ }, props)
477
+ ) }) });
478
+ }
479
+ function DropdownMenuItem(_a) {
480
+ var _b = _a, {
481
+ className,
482
+ inset,
483
+ variant = "default"
484
+ } = _b, props = __objRest(_b, [
485
+ "className",
486
+ "inset",
487
+ "variant"
488
+ ]);
489
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
490
+ import_menu.Menu.Item,
491
+ __spreadValues({
492
+ className: cn(
493
+ "relative flex cursor-default items-center gap-2 rounded-none px-2 py-1.5 text-body-small outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:*:[svg]:text-destructive!",
494
+ className
495
+ ),
496
+ "data-inset": inset,
497
+ "data-slot": "dropdown-menu-item",
498
+ "data-variant": variant
499
+ }, props)
500
+ );
501
+ }
502
+ function DropdownMenuSeparator(_a) {
503
+ var _b = _a, {
504
+ className
505
+ } = _b, props = __objRest(_b, [
506
+ "className"
507
+ ]);
508
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
509
+ import_menu.Menu.Separator,
510
+ __spreadValues({
511
+ className: cn("-mx-1 my-1 h-px bg-border", className),
512
+ "data-slot": "dropdown-menu-separator"
513
+ }, props)
514
+ );
515
+ }
516
+
517
+ // src/components/ui/opportunity-card.tsx
518
+ var import_lucide_react6 = require("lucide-react");
519
+
520
+ // src/components/ui/separator.tsx
521
+ var import_separator = require("@base-ui/react/separator");
522
+ var import_jsx_runtime9 = require("react/jsx-runtime");
523
+ function Separator(_a) {
524
+ var _b = _a, {
525
+ className,
526
+ orientation = "horizontal"
527
+ } = _b, props = __objRest(_b, [
528
+ "className",
529
+ "orientation"
530
+ ]);
531
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
532
+ import_separator.Separator,
533
+ __spreadValues({
534
+ className: cn(
535
+ "shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
536
+ className
537
+ ),
538
+ "data-orientation": orientation,
539
+ "data-slot": "separator"
540
+ }, props)
541
+ );
542
+ }
543
+
544
+ // src/components/ui/accordion.tsx
545
+ var import_lucide_react4 = require("lucide-react");
546
+ var import_accordion = require("@base-ui/react/accordion");
547
+ var import_jsx_runtime10 = require("react/jsx-runtime");
548
+ function Accordion(props) {
549
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_accordion.Accordion.Root, __spreadValues({ "data-slot": "accordion" }, props));
550
+ }
551
+ function AccordionItem(_a) {
552
+ var _b = _a, {
553
+ className
554
+ } = _b, props = __objRest(_b, [
555
+ "className"
556
+ ]);
557
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
558
+ import_accordion.Accordion.Item,
559
+ __spreadValues({
560
+ className: cn("border-b", className),
561
+ "data-slot": "accordion-item"
562
+ }, props)
563
+ );
564
+ }
565
+ function AccordionTrigger(_a) {
566
+ var _b = _a, {
567
+ className,
568
+ children
569
+ } = _b, props = __objRest(_b, [
570
+ "className",
571
+ "children"
572
+ ]);
573
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_accordion.Accordion.Header, { className: "flex", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
574
+ import_accordion.Accordion.Trigger,
575
+ __spreadProps(__spreadValues({
576
+ className: cn(
577
+ // layout
578
+ "flex flex-1 items-center justify-between gap-4 py-4 text-left",
579
+ // typography
580
+ "text-label-medium",
581
+ // base
582
+ "rounded-none outline-none transition-[color,opacity]",
583
+ // interactive states
584
+ "hover:underline",
585
+ "focus-visible:ring-2 focus-visible:ring-foreground/30",
586
+ "disabled:pointer-events-none disabled:opacity-50",
587
+ // chevron rotation when open
588
+ "[&[data-panel-open]>svg]:rotate-180",
589
+ className
590
+ ),
591
+ "data-slot": "accordion-trigger"
592
+ }, props), {
593
+ children: [
594
+ children,
595
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_lucide_react4.ChevronDownIcon, { className: "pointer-events-none size-4 shrink-0 text-muted-foreground transition-transform duration-200" })
596
+ ]
597
+ })
598
+ ) });
599
+ }
600
+ function AccordionContent(_a) {
601
+ var _b = _a, {
602
+ className,
603
+ children
604
+ } = _b, props = __objRest(_b, [
605
+ "className",
606
+ "children"
607
+ ]);
608
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
609
+ import_accordion.Accordion.Panel,
610
+ __spreadProps(__spreadValues({
611
+ 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",
612
+ "data-slot": "accordion-content"
613
+ }, props), {
614
+ children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: cn("pb-4 text-muted-foreground", className), children })
615
+ })
616
+ );
617
+ }
618
+
619
+ // src/components/ui/checkbox.tsx
620
+ var import_react3 = require("react");
621
+ var import_lucide_react5 = require("lucide-react");
622
+ var import_checkbox = require("@base-ui/react/checkbox");
623
+ var import_jsx_runtime11 = require("react/jsx-runtime");
624
+ function Checkbox(_a) {
625
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
626
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
627
+ import_checkbox.Checkbox.Root,
628
+ __spreadProps(__spreadValues({
629
+ className: cn(
630
+ "peer group inline-flex size-4 shrink-0 border border-input shadow-xs transition-all outline-none",
631
+ "focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50",
632
+ "disabled:cursor-not-allowed disabled:opacity-50",
633
+ "aria-invalid:border-destructive aria-invalid:ring-destructive/20",
634
+ "data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground",
635
+ "data-indeterminate:border-primary data-indeterminate:bg-primary data-indeterminate:text-primary-foreground",
636
+ // Dark mode (upstream shadcn)
637
+ "dark:bg-input/30 dark:aria-invalid:ring-destructive/40 dark:data-checked:bg-primary",
638
+ // Stacked (2 attr selectors) → wins over single-attr rules above
639
+ "aria-invalid:data-checked:border-destructive aria-invalid:data-checked:bg-destructive aria-invalid:data-checked:text-destructive-foreground",
640
+ "aria-invalid:data-indeterminate:border-destructive aria-invalid:data-indeterminate:bg-destructive aria-invalid:data-indeterminate:text-destructive-foreground",
641
+ className
642
+ ),
643
+ "data-slot": "checkbox"
644
+ }, props), {
645
+ children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
646
+ import_checkbox.Checkbox.Indicator,
647
+ {
648
+ className: "grid place-content-center text-current transition-none",
649
+ "data-slot": "checkbox-indicator",
650
+ children: [
651
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_lucide_react5.CheckIcon, { className: "size-3.5 group-data-indeterminate:hidden" }),
652
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_lucide_react5.MinusIcon, { className: "size-3.5 hidden group-data-indeterminate:block" })
653
+ ]
654
+ }
655
+ )
656
+ })
657
+ );
658
+ }
659
+
660
+ // src/components/ui/pipeline-primitives.tsx
661
+ var import_jsx_runtime12 = require("react/jsx-runtime");
662
+ function TaskCheckItem({
663
+ title,
664
+ completed,
665
+ aiAgentName,
666
+ onToggle,
667
+ disabled = false,
668
+ size = "xs",
669
+ className
670
+ }) {
671
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
672
+ "div",
673
+ {
674
+ className: cn(
675
+ "flex cursor-pointer items-start gap-2 py-1.5",
676
+ disabled && "pointer-events-none opacity-60",
677
+ className
678
+ ),
679
+ onClick: () => onToggle == null ? void 0 : onToggle(),
680
+ "data-slot": "task-check-item",
681
+ children: [
682
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { onClick: (e) => e.stopPropagation(), className: "mt-0.5 shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
683
+ Checkbox,
684
+ {
685
+ checked: completed,
686
+ onCheckedChange: () => onToggle == null ? void 0 : onToggle(),
687
+ disabled
688
+ }
689
+ ) }),
690
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [
691
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
692
+ "span",
693
+ {
694
+ className: cn(
695
+ "leading-snug text-foreground",
696
+ size === "sm" ? "text-sm" : "text-xs",
697
+ completed && "text-muted-foreground line-through"
698
+ ),
699
+ children: title
700
+ }
701
+ ),
702
+ aiAgentName && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(Badge, { variant: "secondary", className: "gap-1 text-[10px]", children: [
703
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
704
+ "span",
705
+ {
706
+ className: "size-1.5 rounded-full bg-primary",
707
+ "aria-hidden": "true"
708
+ }
709
+ ),
710
+ aiAgentName
711
+ ] })
712
+ ] })
713
+ ]
714
+ }
715
+ );
716
+ }
717
+
718
+ // src/components/ui/opportunity-card.tsx
719
+ var import_jsx_runtime13 = require("react/jsx-runtime");
720
+ var PRIORITY_COLORS = {
721
+ HIGH: "var(--color-destructive)",
722
+ MEDIUM: "var(--color-warning)",
723
+ LOW: "var(--color-success)",
724
+ NONE: "var(--color-muted-foreground)"
725
+ };
726
+ var PRIORITY_TEXT_COLORS = {
727
+ HIGH: "var(--color-destructive-text)",
728
+ MEDIUM: "var(--color-warning-text)",
729
+ LOW: "var(--color-success-text)",
730
+ NONE: "var(--color-muted-foreground)"
731
+ };
732
+ function resolvePriority(days, warningDays, priorityDays, priority) {
733
+ if (days === void 0) return priority;
734
+ if (priorityDays !== void 0 && days >= priorityDays) return "HIGH";
735
+ if (warningDays !== void 0 && days >= warningDays) return "MEDIUM";
736
+ if (warningDays !== void 0 || priorityDays !== void 0) return "LOW";
737
+ return priority;
738
+ }
739
+ function formatAmount(amount) {
740
+ return new Intl.NumberFormat("en-AU", {
741
+ style: "currency",
742
+ currency: "AUD",
743
+ maximumFractionDigits: 0
744
+ }).format(amount);
745
+ }
746
+ function formatDate(iso) {
747
+ try {
748
+ return new Date(iso).toLocaleDateString("en-AU", {
749
+ day: "2-digit",
750
+ month: "short",
751
+ year: "numeric"
752
+ });
753
+ } catch (e) {
754
+ return iso;
755
+ }
756
+ }
757
+ function formatHoldDate(iso) {
758
+ try {
759
+ return new Date(iso).toLocaleDateString("en-AU", {
760
+ day: "2-digit",
761
+ month: "short"
762
+ });
763
+ } catch (e) {
764
+ return iso;
765
+ }
766
+ }
767
+ function formatLoanType(type) {
768
+ return type.split("-").map((w) => w.charAt(0).toUpperCase() + w.slice(1)).join(" ");
769
+ }
770
+ function OpportunityCard({
771
+ customerName,
772
+ customerPhone,
773
+ customerEmail,
774
+ additionalContacts,
775
+ loanType,
776
+ loanPurposeLabel,
777
+ amount,
778
+ date,
779
+ priority,
780
+ daysSinceColumnChanged,
781
+ warningDays,
782
+ priorityDays,
783
+ onHoldTo,
784
+ isModifyCompletedLoan,
785
+ tasks = [],
786
+ nextTask,
787
+ onViewDetails,
788
+ onTaskToggle,
789
+ onMarkAsDone,
790
+ onMoveToNextStage,
791
+ onLaunchAssistant,
792
+ onChangePriority,
793
+ onDelete,
794
+ onPutOnHold,
795
+ isSubmitting = false,
796
+ className
797
+ }) {
798
+ const resolvedPriority = resolvePriority(
799
+ daysSinceColumnChanged,
800
+ warningDays,
801
+ priorityDays,
802
+ priority
803
+ );
804
+ const priorityColor = PRIORITY_COLORS[resolvedPriority];
805
+ const priorityTextColor = PRIORITY_TEXT_COLORS[resolvedPriority];
806
+ const completedCount = tasks.filter((t) => t.completed).length;
807
+ const hasTasks = tasks.length > 0;
808
+ const hasActions = onMarkAsDone || onMoveToNextStage;
809
+ const hasMenu = onViewDetails || onChangePriority || onPutOnHold || onDelete;
810
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
811
+ "div",
812
+ {
813
+ className: cn(
814
+ "flex flex-col gap-2 border border-border bg-background p-4 text-foreground shadow-sm",
815
+ isSubmitting && "opacity-60",
816
+ className
817
+ ),
818
+ "data-slot": "opportunity-card",
819
+ children: [
820
+ onHoldTo && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
821
+ "div",
822
+ {
823
+ className: "flex items-center gap-1.5 rounded border border-warning/30 bg-warning/10 px-2 py-1 text-xs font-medium",
824
+ style: { color: "var(--color-warning-text)" },
825
+ children: [
826
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react6.Clock, { className: "size-3 shrink-0" }),
827
+ "On hold until ",
828
+ formatHoldDate(onHoldTo)
829
+ ]
830
+ }
831
+ ),
832
+ isModifyCompletedLoan && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
833
+ "div",
834
+ {
835
+ className: "flex items-center gap-1.5 rounded border border-info/30 bg-info/10 px-2 py-1 text-xs font-medium",
836
+ style: { color: "var(--color-info-text)" },
837
+ children: "Modify completed loan"
838
+ }
839
+ ),
840
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex items-start justify-between gap-2", children: [
841
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-1", children: [
842
+ (loanPurposeLabel || loanType) && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Badge, { variant: "outline", className: "self-start", children: loanPurposeLabel != null ? loanPurposeLabel : formatLoanType(loanType) }),
843
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "text-base font-bold tabular-nums text-foreground", children: formatAmount(amount) })
844
+ ] }),
845
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex items-center gap-1 -mr-1 -mt-1", children: [
846
+ onLaunchAssistant && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
847
+ "button",
848
+ {
849
+ type: "button",
850
+ className: cn(
851
+ buttonVariants({ variant: "ghost", size: "icon" }),
852
+ "size-7 shrink-0"
853
+ ),
854
+ onClick: onLaunchAssistant,
855
+ "aria-label": "Launch AI Assistant",
856
+ title: "Launch AI Assistant",
857
+ children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react6.Bot, { className: "size-4" })
858
+ }
859
+ ),
860
+ hasMenu && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(DropdownMenu, { children: [
861
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
862
+ DropdownMenuTrigger,
863
+ {
864
+ className: cn(
865
+ buttonVariants({ variant: "ghost", size: "icon" }),
866
+ "size-7 shrink-0"
867
+ ),
868
+ "aria-label": "Opportunity actions",
869
+ children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react6.MoreVertical, { className: "size-4" })
870
+ }
871
+ ),
872
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(DropdownMenuContent, { align: "end", children: [
873
+ onViewDetails && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DropdownMenuItem, { onClick: onViewDetails, children: "View details" }),
874
+ onChangePriority && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DropdownMenuItem, { onClick: onChangePriority, children: "Change priority" }),
875
+ onPutOnHold && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DropdownMenuItem, { onClick: onPutOnHold, children: "Put on hold" }),
876
+ onDelete && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
877
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DropdownMenuSeparator, {}),
878
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DropdownMenuItem, { onClick: onDelete, variant: "destructive", children: "Delete" })
879
+ ] })
880
+ ] })
881
+ ] })
882
+ ] })
883
+ ] }),
884
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Separator, {}),
885
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex flex-col gap-1", children: [
886
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex items-center justify-between gap-2", children: [
887
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "truncate text-sm font-semibold text-foreground", children: customerName }),
888
+ additionalContacts && additionalContacts > 0 ? /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(Badge, { variant: "secondary", className: "shrink-0 gap-1", children: [
889
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react6.Users, { className: "size-3", "aria-hidden": "true" }),
890
+ "Joint"
891
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(Badge, { variant: "secondary", className: "shrink-0 gap-1", children: [
892
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react6.User, { className: "size-3", "aria-hidden": "true" }),
893
+ "Individual"
894
+ ] })
895
+ ] }),
896
+ customerPhone && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { className: "flex items-center gap-1.5 text-xs text-muted-foreground", children: [
897
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react6.Phone, { className: "size-3 shrink-0", "aria-hidden": "true" }),
898
+ customerPhone
899
+ ] }),
900
+ customerEmail && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { className: "flex items-center gap-1.5 text-xs text-muted-foreground", children: [
901
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react6.Mail, { className: "size-3 shrink-0", "aria-hidden": "true" }),
902
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "truncate", children: customerEmail })
903
+ ] })
904
+ ] }),
905
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Separator, {}),
906
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex items-center justify-between", children: [
907
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { className: "flex items-center gap-1.5 text-xs text-muted-foreground", children: [
908
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react6.Calendar, { className: "size-3 shrink-0", "aria-hidden": "true" }),
909
+ formatDate(date)
910
+ ] }),
911
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { className: "flex items-center gap-1.5", children: [
912
+ daysSinceColumnChanged !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
913
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
914
+ import_lucide_react6.Clock,
915
+ {
916
+ className: "size-3 shrink-0",
917
+ style: { color: priorityTextColor },
918
+ "aria-hidden": "true"
919
+ }
920
+ ),
921
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
922
+ "span",
923
+ {
924
+ className: "text-xs font-medium tabular-nums",
925
+ style: { color: priorityTextColor },
926
+ children: [
927
+ daysSinceColumnChanged,
928
+ "d"
929
+ ]
930
+ }
931
+ )
932
+ ] }),
933
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
934
+ "span",
935
+ {
936
+ role: "img",
937
+ className: "inline-block size-2 shrink-0 rounded-full",
938
+ style: { backgroundColor: priorityColor },
939
+ "aria-label": `Priority: ${resolvedPriority}`
940
+ }
941
+ )
942
+ ] })
943
+ ] }),
944
+ hasTasks && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
945
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
946
+ "div",
947
+ {
948
+ className: "flex gap-0.5",
949
+ role: "progressbar",
950
+ "aria-valuenow": completedCount,
951
+ "aria-valuemin": 0,
952
+ "aria-valuemax": tasks.length,
953
+ "aria-label": `${completedCount} of ${tasks.length} tasks complete`,
954
+ children: tasks.map((t, i) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
955
+ "div",
956
+ {
957
+ className: cn(
958
+ "h-[7px] flex-1",
959
+ i < completedCount ? "bg-primary" : "bg-muted"
960
+ )
961
+ },
962
+ t.id
963
+ ))
964
+ }
965
+ ),
966
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Accordion, { type: "single", collapsible: true, className: "-mx-4", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(AccordionItem, { value: "tasks", className: "border-0", children: [
967
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(AccordionTrigger, { className: "px-4 py-1.5 text-xs font-normal text-muted-foreground hover:no-underline hover:text-foreground [&>svg]:size-3.5", children: [
968
+ "Tasks (",
969
+ completedCount,
970
+ "/",
971
+ tasks.length,
972
+ ")"
973
+ ] }),
974
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(AccordionContent, { className: "px-4", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "flex flex-col", children: tasks.map((task) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
975
+ TaskCheckItem,
976
+ {
977
+ title: task.title,
978
+ completed: task.completed,
979
+ aiAgentName: task.aiAgentName,
980
+ onToggle: onTaskToggle ? () => onTaskToggle(task.id) : void 0,
981
+ disabled: isSubmitting
982
+ },
983
+ task.id
984
+ )) }) })
985
+ ] }) }),
986
+ nextTask && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex items-start gap-1.5 border border-primary/30 bg-primary/5 px-2 py-1.5 text-xs", children: [
987
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
988
+ import_lucide_react6.ArrowRight,
989
+ {
990
+ className: "mt-0.5 size-3 shrink-0 text-primary",
991
+ "aria-hidden": "true"
992
+ }
993
+ ),
994
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "font-medium", children: "Next:" }),
995
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "text-muted-foreground", children: nextTask })
996
+ ] })
997
+ ] }),
998
+ hasActions && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
999
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Separator, {}),
1000
+ (onMoveToNextStage || onMarkAsDone) && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex gap-2", children: [
1001
+ onMoveToNextStage && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1002
+ Button,
1003
+ {
1004
+ variant: "outline",
1005
+ size: "sm",
1006
+ className: "flex-1 text-caption",
1007
+ onClick: onMoveToNextStage,
1008
+ disabled: isSubmitting,
1009
+ children: "Move to next stage"
1010
+ }
1011
+ ),
1012
+ onMarkAsDone && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1013
+ Button,
1014
+ {
1015
+ variant: "default",
1016
+ size: "sm",
1017
+ className: "flex-1 text-caption",
1018
+ onClick: onMarkAsDone,
1019
+ disabled: isSubmitting,
1020
+ children: "Mark as done"
1021
+ }
1022
+ )
1023
+ ] })
1024
+ ] })
1025
+ ]
1026
+ }
1027
+ );
1028
+ }
1029
+ function LeadCard({
1030
+ customerName,
1031
+ customerPhone,
1032
+ customerEmail,
1033
+ onSendLoanApplication,
1034
+ loanApplicationUrl,
1035
+ onDelete,
1036
+ isSubmitting = false,
1037
+ className
1038
+ }) {
1039
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
1040
+ "div",
1041
+ {
1042
+ className: cn(
1043
+ "flex flex-col gap-3 border border-border bg-background p-4 text-foreground shadow-sm",
1044
+ isSubmitting && "opacity-60",
1045
+ className
1046
+ ),
1047
+ "data-slot": "lead-card",
1048
+ children: [
1049
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex items-start justify-between gap-2", children: [
1050
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-1", children: [
1051
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "text-sm font-semibold text-foreground", children: customerName }),
1052
+ customerPhone && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { className: "flex items-center gap-1.5 text-xs text-muted-foreground", children: [
1053
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react6.Phone, { className: "size-3 shrink-0", "aria-hidden": "true" }),
1054
+ customerPhone
1055
+ ] }),
1056
+ customerEmail && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { className: "flex items-center gap-1.5 text-xs text-muted-foreground", children: [
1057
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react6.Mail, { className: "size-3 shrink-0", "aria-hidden": "true" }),
1058
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "truncate", children: customerEmail })
1059
+ ] })
1060
+ ] }),
1061
+ onDelete && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(DropdownMenu, { children: [
1062
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1063
+ DropdownMenuTrigger,
1064
+ {
1065
+ className: cn(
1066
+ buttonVariants({ variant: "ghost", size: "icon" }),
1067
+ "-mr-1 -mt-1 size-7 shrink-0"
1068
+ ),
1069
+ "aria-label": "Lead actions",
1070
+ children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react6.MoreVertical, { className: "size-4" })
1071
+ }
1072
+ ),
1073
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DropdownMenuContent, { align: "end", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1074
+ DropdownMenuItem,
1075
+ {
1076
+ onClick: onDelete,
1077
+ className: "text-destructive focus:text-destructive",
1078
+ children: "Delete"
1079
+ }
1080
+ ) })
1081
+ ] })
1082
+ ] }),
1083
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Separator, {}),
1084
+ onSendLoanApplication && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex flex-col gap-2", children: [
1085
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1086
+ Button,
1087
+ {
1088
+ variant: "outline",
1089
+ size: "sm",
1090
+ className: "w-full text-caption",
1091
+ onClick: onSendLoanApplication,
1092
+ disabled: isSubmitting,
1093
+ children: "Send Loan Application Request"
1094
+ }
1095
+ ),
1096
+ loanApplicationUrl && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("p", { className: "text-xs text-muted-foreground", children: [
1097
+ "Or the link below to fill out the loan application directly.",
1098
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("br", {}),
1099
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1100
+ "a",
1101
+ {
1102
+ href: `https://${loanApplicationUrl.replace(/^https?:\/\//, "")}`,
1103
+ target: "_blank",
1104
+ rel: "noreferrer",
1105
+ className: "text-primary underline-offset-2 hover:underline",
1106
+ children: loanApplicationUrl
1107
+ }
1108
+ )
1109
+ ] })
1110
+ ] })
1111
+ ]
1112
+ }
1113
+ );
1114
+ }
1115
+
1116
+ // src/components/ui/kanban-column.tsx
1117
+ var import_jsx_runtime14 = require("react/jsx-runtime");
1118
+ function formatTotalValue(value) {
1119
+ return new Intl.NumberFormat("en-AU", {
1120
+ style: "currency",
1121
+ currency: "AUD",
1122
+ maximumFractionDigits: 0
1123
+ }).format(value);
1124
+ }
1125
+ function growthColor(growth) {
1126
+ return growth > 0 ? "var(--color-success-text)" : "var(--color-destructive-text)";
1127
+ }
1128
+ function KanbanColumn({
1129
+ stage,
1130
+ opportunities,
1131
+ isDragging = false,
1132
+ isDropTarget = false,
1133
+ isDefault = false,
1134
+ isLoading = false,
1135
+ isLoadingMore = false,
1136
+ hasMore = false,
1137
+ loaderRef,
1138
+ onEditColumn,
1139
+ onDeleteColumn,
1140
+ onTaskToggle,
1141
+ onMarkAsDone,
1142
+ onMoveToNextStage,
1143
+ onSendLoanApplication,
1144
+ onViewDetails,
1145
+ onChangePriority,
1146
+ onLaunchAssistant,
1147
+ onPutOnHold,
1148
+ onDeleteOpportunity,
1149
+ submittingOpportunityId,
1150
+ className
1151
+ }) {
1152
+ var _a;
1153
+ const themeVars = useThemeVars();
1154
+ const accentColor = (_a = stage.accentColor) != null ? _a : "var(--color-border)";
1155
+ const hasMenu = onEditColumn || !isDefault && onDeleteColumn;
1156
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
1157
+ "div",
1158
+ {
1159
+ className: cn(
1160
+ "flex w-[292px] shrink-0 flex-col bg-muted/40",
1161
+ isDragging && "opacity-50",
1162
+ isDropTarget && "ring-2 ring-primary ring-inset",
1163
+ className
1164
+ ),
1165
+ style: __spreadProps(__spreadValues({}, themeVars), {
1166
+ borderTop: `2px solid ${accentColor}`
1167
+ }),
1168
+ "data-slot": "kanban-column",
1169
+ children: [
1170
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex flex-col gap-2 border-b border-border bg-background px-3 py-3", children: [
1171
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex items-center justify-between gap-2", children: [
1172
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("h2", { className: "text-sm font-semibold text-foreground", children: [
1173
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "text-muted-foreground", children: stage.count }),
1174
+ " ",
1175
+ stage.name
1176
+ ] }),
1177
+ hasMenu && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(DropdownMenu, { children: [
1178
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1179
+ DropdownMenuTrigger,
1180
+ {
1181
+ className: cn(
1182
+ buttonVariants({ variant: "ghost", size: "icon" }),
1183
+ "-mr-1 size-7 shrink-0"
1184
+ ),
1185
+ "aria-label": "Column actions",
1186
+ children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react7.MoreVertical, { className: "size-4" })
1187
+ }
1188
+ ),
1189
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(DropdownMenuContent, { align: "end", children: [
1190
+ onEditColumn && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DropdownMenuItem, { onClick: onEditColumn, children: "Edit column settings" }),
1191
+ !isDefault && onDeleteColumn && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
1192
+ onEditColumn && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DropdownMenuSeparator, {}),
1193
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1194
+ DropdownMenuItem,
1195
+ {
1196
+ onClick: onDeleteColumn,
1197
+ className: "text-destructive focus:text-destructive",
1198
+ children: "Delete column"
1199
+ }
1200
+ )
1201
+ ] })
1202
+ ] })
1203
+ ] })
1204
+ ] }),
1205
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex items-center justify-between gap-2", children: [
1206
+ stage.growth != null ? /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
1207
+ Badge,
1208
+ {
1209
+ variant: "outline",
1210
+ style: { color: growthColor(stage.growth) },
1211
+ children: [
1212
+ stage.growth > 0 ? "+" : "",
1213
+ stage.growth
1214
+ ]
1215
+ }
1216
+ ) : /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", {}),
1217
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "text-xs font-medium tabular-nums text-muted-foreground", children: formatTotalValue(stage.totalValue) })
1218
+ ] })
1219
+ ] }),
1220
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex flex-1 flex-col gap-2 overflow-y-auto p-2", children: [
1221
+ isDropTarget && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "border border-dashed border-primary/40 bg-primary/5 px-3 py-2 text-center text-xs text-primary", children: [
1222
+ "Drop here \u2192 ",
1223
+ stage.name
1224
+ ] }),
1225
+ isLoading ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "flex flex-1 items-center justify-center py-8", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Spinner, { className: "size-5 text-muted-foreground" }) }) : opportunities.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "flex flex-1 items-center justify-center py-8", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "text-xs text-muted-foreground", children: "No opportunities in this stage" }) }) : /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
1226
+ opportunities.map(
1227
+ (opp) => onSendLoanApplication ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1228
+ LeadCard,
1229
+ {
1230
+ id: opp.id,
1231
+ customerName: opp.customerName,
1232
+ customerPhone: opp.customerPhone,
1233
+ customerEmail: opp.customerEmail,
1234
+ loanApplicationUrl: opp.loanApplicationUrl,
1235
+ onSendLoanApplication: () => onSendLoanApplication(opp.id),
1236
+ onDelete: onDeleteOpportunity ? () => onDeleteOpportunity(opp.id) : void 0,
1237
+ isSubmitting: submittingOpportunityId === opp.id
1238
+ },
1239
+ opp.id
1240
+ ) : /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1241
+ OpportunityCard,
1242
+ __spreadProps(__spreadValues({}, opp), {
1243
+ onTaskToggle: onTaskToggle ? (taskId) => onTaskToggle(opp.id, taskId) : void 0,
1244
+ onMarkAsDone: onMarkAsDone ? () => onMarkAsDone(opp.id) : void 0,
1245
+ onMoveToNextStage: onMoveToNextStage ? () => onMoveToNextStage(opp.id) : void 0,
1246
+ onViewDetails: onViewDetails ? () => onViewDetails(opp.id) : void 0,
1247
+ onChangePriority: onChangePriority ? () => onChangePriority(opp.id) : void 0,
1248
+ onLaunchAssistant: onLaunchAssistant ? () => onLaunchAssistant(opp.id) : void 0,
1249
+ onPutOnHold: onPutOnHold ? () => onPutOnHold(opp.id) : void 0,
1250
+ onDelete: onDeleteOpportunity ? () => onDeleteOpportunity(opp.id) : void 0,
1251
+ isSubmitting: submittingOpportunityId === opp.id
1252
+ }),
1253
+ opp.id
1254
+ )
1255
+ ),
1256
+ hasMore && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1257
+ "div",
1258
+ {
1259
+ ref: loaderRef,
1260
+ className: "flex min-h-[50px] items-center justify-center",
1261
+ children: isLoadingMore && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Spinner, { className: "size-5 text-muted-foreground" })
1262
+ }
1263
+ )
1264
+ ] })
1265
+ ] })
1266
+ ]
1267
+ }
1268
+ );
1269
+ }
1270
+
1271
+ // src/components/ui/pipeline-board.tsx
1272
+ var import_jsx_runtime15 = require("react/jsx-runtime");
1273
+ function Toolbar({
1274
+ searchValue,
1275
+ onSearchChange,
1276
+ filterOptions,
1277
+ activeFilters,
1278
+ onFilterChange,
1279
+ onRefresh
1280
+ }) {
1281
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex flex-wrap items-center gap-3 border-b border-border bg-background px-4 py-3", children: [
1282
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "relative w-56 shrink-0", children: [
1283
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react8.Search, { className: "absolute left-2.5 top-1/2 size-3.5 -translate-y-1/2 text-muted-foreground" }),
1284
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1285
+ Input,
1286
+ {
1287
+ placeholder: "Search opportunities\u2026",
1288
+ value: searchValue,
1289
+ onChange: (e) => onSearchChange(e.target.value),
1290
+ className: "h-8 pl-8 text-sm"
1291
+ }
1292
+ ),
1293
+ searchValue && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1294
+ "button",
1295
+ {
1296
+ onClick: () => onSearchChange(""),
1297
+ className: "absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",
1298
+ "aria-label": "Clear search",
1299
+ children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react8.X, { className: "size-3.5" })
1300
+ }
1301
+ )
1302
+ ] }),
1303
+ filterOptions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1304
+ ToggleGroup,
1305
+ {
1306
+ type: "multiple",
1307
+ variant: "outline",
1308
+ size: "sm",
1309
+ spacing: 1.5,
1310
+ value: activeFilters,
1311
+ onValueChange: (newValues) => {
1312
+ var _a;
1313
+ const toggled = (_a = newValues.find((v) => !activeFilters.includes(v))) != null ? _a : activeFilters.find((v) => !newValues.includes(v));
1314
+ if (toggled) onFilterChange(toggled);
1315
+ },
1316
+ children: filterOptions.map((option) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ToggleGroupItem, { value: option, children: option }, option))
1317
+ }
1318
+ ),
1319
+ onRefresh && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1320
+ "button",
1321
+ {
1322
+ onClick: onRefresh,
1323
+ className: "ml-auto text-muted-foreground hover:text-foreground",
1324
+ "aria-label": "Refresh board",
1325
+ children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react8.RefreshCw, { className: "size-4" })
1326
+ }
1327
+ )
1328
+ ] });
1329
+ }
1330
+ function PipelineBoard({
1331
+ columns,
1332
+ searchValue = "",
1333
+ onSearchChange,
1334
+ filterOptions = [],
1335
+ activeFilters = [],
1336
+ onFilterChange,
1337
+ onRefresh,
1338
+ onEditColumn,
1339
+ onDeleteColumn,
1340
+ onTaskToggle,
1341
+ onMarkAsDone,
1342
+ onMoveToNextStage,
1343
+ onViewDetails,
1344
+ onChangePriority,
1345
+ onLaunchAssistant,
1346
+ onPutOnHold,
1347
+ onDeleteOpportunity,
1348
+ submittingOpportunityId,
1349
+ className
1350
+ }) {
1351
+ const hasToolbar = onSearchChange || filterOptions.length > 0 && onFilterChange;
1352
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
1353
+ "div",
1354
+ {
1355
+ className: cn("flex h-full flex-col bg-muted/20", className),
1356
+ "data-slot": "pipeline-board",
1357
+ children: [
1358
+ hasToolbar && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1359
+ Toolbar,
1360
+ {
1361
+ searchValue,
1362
+ onSearchChange: onSearchChange != null ? onSearchChange : (() => {
1363
+ }),
1364
+ filterOptions,
1365
+ activeFilters,
1366
+ onFilterChange: onFilterChange != null ? onFilterChange : (() => {
1367
+ }),
1368
+ onRefresh
1369
+ }
1370
+ ),
1371
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex flex-1 gap-3 overflow-x-auto p-4", children: [
1372
+ columns.map((col) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1373
+ KanbanColumn,
1374
+ {
1375
+ stage: col.stage,
1376
+ opportunities: col.opportunities,
1377
+ isDragging: col.isDragging,
1378
+ isDropTarget: col.isDropTarget,
1379
+ isDefault: col.isDefault,
1380
+ isLoading: col.isLoading,
1381
+ isLoadingMore: col.isLoadingMore,
1382
+ hasMore: col.hasMore,
1383
+ loaderRef: col.loaderRef,
1384
+ onEditColumn: onEditColumn ? () => onEditColumn(col.stage.id) : void 0,
1385
+ onDeleteColumn: onDeleteColumn && !col.isDefault ? () => onDeleteColumn(col.stage.id) : void 0,
1386
+ onTaskToggle,
1387
+ onMarkAsDone,
1388
+ onMoveToNextStage,
1389
+ onSendLoanApplication: col.onSendLoanApplication,
1390
+ onViewDetails,
1391
+ onChangePriority,
1392
+ onLaunchAssistant,
1393
+ onPutOnHold,
1394
+ onDeleteOpportunity,
1395
+ submittingOpportunityId
1396
+ },
1397
+ col.key
1398
+ )),
1399
+ columns.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "flex flex-1 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "text-sm text-muted-foreground", children: "No columns to display." }) })
1400
+ ] })
1401
+ ]
1402
+ }
1403
+ );
1404
+ }
1405
+ // Annotate the CommonJS export names for ESM import in node:
1406
+ 0 && (module.exports = {
1407
+ PipelineBoard
1408
+ });