@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,1183 @@
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-dialogs.tsx
60
+ var pipeline_dialogs_exports = {};
61
+ __export(pipeline_dialogs_exports, {
62
+ ChangePriorityDialog: () => ChangePriorityDialog,
63
+ DeleteOpportunityDialog: () => DeleteOpportunityDialog,
64
+ PutOnHoldDialog: () => PutOnHoldDialog
65
+ });
66
+ module.exports = __toCommonJS(pipeline_dialogs_exports);
67
+ var React6 = __toESM(require("react"));
68
+ var import_date_fns2 = require("date-fns");
69
+
70
+ // src/lib/utils.ts
71
+ var import_clsx = require("clsx");
72
+ var import_tailwind_merge = require("tailwind-merge");
73
+ var twMerge = (0, import_tailwind_merge.extendTailwindMerge)({
74
+ extend: {
75
+ classGroups: {
76
+ "font-size": [
77
+ {
78
+ text: [
79
+ "display-large",
80
+ "display-medium",
81
+ "display-small",
82
+ "h1",
83
+ "h2",
84
+ "h3",
85
+ "h4",
86
+ "h5",
87
+ "h6",
88
+ "body-large",
89
+ "body-medium",
90
+ "body-small",
91
+ "label-large",
92
+ "label-medium",
93
+ "label-small",
94
+ "button",
95
+ "button-xs",
96
+ "caption",
97
+ "overline",
98
+ "code"
99
+ ]
100
+ }
101
+ ]
102
+ }
103
+ }
104
+ });
105
+ function cn(...inputs) {
106
+ return twMerge((0, import_clsx.clsx)(inputs));
107
+ }
108
+
109
+ // src/components/ui/dialog.tsx
110
+ var import_lucide_react2 = require("lucide-react");
111
+ var import_dialog = require("@base-ui/react/dialog");
112
+
113
+ // src/lib/theme-provider.tsx
114
+ var import_react = require("react");
115
+ var import_jsx_runtime = require("react/jsx-runtime");
116
+ var ThemeVarsContext = (0, import_react.createContext)({});
117
+ function useThemeVars() {
118
+ return (0, import_react.useContext)(ThemeVarsContext);
119
+ }
120
+
121
+ // src/components/ui/button.tsx
122
+ var import_react2 = require("react");
123
+ var import_class_variance_authority = require("class-variance-authority");
124
+ var import_lucide_react = require("lucide-react");
125
+
126
+ // src/lib/slot.tsx
127
+ var React2 = __toESM(require("react"));
128
+ function mergeRefs(...refs) {
129
+ return (value) => {
130
+ for (const ref of refs) {
131
+ if (typeof ref === "function") ref(value);
132
+ else if (ref !== null)
133
+ ref.current = value;
134
+ }
135
+ };
136
+ }
137
+ var Slot = React2.forwardRef(
138
+ (_a, forwardedRef) => {
139
+ var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
140
+ const child = React2.Children.only(children);
141
+ if (!React2.isValidElement(child)) return null;
142
+ const childProps = child.props;
143
+ const merged = __spreadValues({}, props);
144
+ for (const key of Object.keys(childProps)) {
145
+ if (key === "className") {
146
+ merged.className = [props.className, childProps.className].filter(Boolean).join(" ");
147
+ } else if (key === "style") {
148
+ merged.style = __spreadValues(__spreadValues({}, props.style), childProps.style);
149
+ } else if (key.startsWith("on") && typeof childProps[key] === "function") {
150
+ const parentHandler = props[key];
151
+ if (typeof parentHandler === "function") {
152
+ merged[key] = (...args) => {
153
+ childProps[key](...args);
154
+ parentHandler(...args);
155
+ };
156
+ } else {
157
+ merged[key] = childProps[key];
158
+ }
159
+ } else {
160
+ merged[key] = childProps[key];
161
+ }
162
+ }
163
+ const childRef = child.ref;
164
+ merged.ref = forwardedRef ? mergeRefs(forwardedRef, childRef) : childRef;
165
+ return React2.cloneElement(
166
+ child,
167
+ merged
168
+ );
169
+ }
170
+ );
171
+ Slot.displayName = "Slot";
172
+
173
+ // src/components/ui/button.tsx
174
+ var import_jsx_runtime2 = require("react/jsx-runtime");
175
+ var buttonVariants = (0, import_class_variance_authority.cva)(
176
+ "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",
177
+ {
178
+ variants: {
179
+ variant: {
180
+ default: "bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",
181
+ secondary: "bg-brand-secondary text-brand-secondary-foreground shadow-xs hover:bg-brand-secondary/80 focus-visible:ring-brand-secondary/30",
182
+ 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",
183
+ 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",
184
+ "outline-primary": "border border-primary text-foreground bg-transparent shadow-xs hover:bg-primary/5 focus-visible:ring-primary/50",
185
+ "outline-secondary": "border border-brand-secondary text-brand-secondary bg-transparent shadow-xs hover:bg-brand-secondary/10 focus-visible:ring-brand-secondary/30",
186
+ ghost: "hover:bg-accent hover:text-accent-foreground hover:shadow-xs dark:hover:bg-accent/50",
187
+ link: "text-primary underline-offset-4 hover:underline"
188
+ },
189
+ size: {
190
+ default: "h-9 px-4 py-2 has-[>svg]:px-3",
191
+ xs: "h-6 gap-1 px-2 text-button-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",
192
+ sm: "h-8 gap-1.5 px-3 has-[>svg]:px-2.5",
193
+ lg: "h-10 px-6 has-[>svg]:px-4",
194
+ icon: "size-9",
195
+ "icon-xs": "size-6 [&_svg:not([class*='size-'])]:size-3",
196
+ "icon-sm": "size-8",
197
+ "icon-lg": "size-10"
198
+ }
199
+ },
200
+ defaultVariants: {
201
+ variant: "default",
202
+ size: "default"
203
+ }
204
+ }
205
+ );
206
+ var Button = (0, import_react2.forwardRef)(function Button2(_a, ref) {
207
+ var _b = _a, {
208
+ className,
209
+ variant,
210
+ size,
211
+ asChild = false,
212
+ loading = false,
213
+ disabled,
214
+ type = "button",
215
+ children
216
+ } = _b, props = __objRest(_b, [
217
+ "className",
218
+ "variant",
219
+ "size",
220
+ "asChild",
221
+ "loading",
222
+ "disabled",
223
+ "type",
224
+ "children"
225
+ ]);
226
+ const Comp = asChild ? Slot : "button";
227
+ const isIconOnly = size === "icon" || size === "icon-xs" || size === "icon-sm" || size === "icon-lg";
228
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
229
+ Comp,
230
+ __spreadProps(__spreadValues({
231
+ className: cn(buttonVariants({ variant, size, className })),
232
+ "data-size": size,
233
+ "data-slot": "button",
234
+ "data-variant": variant,
235
+ disabled: loading || disabled,
236
+ ref,
237
+ type
238
+ }, props), {
239
+ children: loading ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
240
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_lucide_react.Loader2, { "aria-hidden": "true", className: "animate-spin" }),
241
+ !isIconOnly && children
242
+ ] }) : children
243
+ })
244
+ );
245
+ });
246
+
247
+ // src/components/ui/dialog.tsx
248
+ var import_jsx_runtime3 = require("react/jsx-runtime");
249
+ function Dialog(_a) {
250
+ var props = __objRest(_a, []);
251
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_dialog.Dialog.Root, __spreadValues({ "data-slot": "dialog" }, props));
252
+ }
253
+ function DialogPortal(_a) {
254
+ var props = __objRest(_a, []);
255
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_dialog.Dialog.Portal, __spreadValues({ "data-slot": "dialog-portal" }, props));
256
+ }
257
+ function DialogOverlay(_a) {
258
+ var _b = _a, {
259
+ className
260
+ } = _b, props = __objRest(_b, [
261
+ "className"
262
+ ]);
263
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
264
+ import_dialog.Dialog.Backdrop,
265
+ __spreadValues({
266
+ className: cn(
267
+ // WealthX: foreground/50 scrim (matches Figma — foreground token at 50% opacity)
268
+ "fixed inset-0 z-50 bg-foreground/50 data-ending-style:animate-out data-ending-style:fade-out-0 data-ending-style:fill-mode-forwards data-open:animate-in data-open:fade-in-0",
269
+ className
270
+ ),
271
+ "data-slot": "dialog-overlay"
272
+ }, props)
273
+ );
274
+ }
275
+ function DialogContent(_a) {
276
+ var _b = _a, {
277
+ className,
278
+ children,
279
+ showCloseButton = true,
280
+ style
281
+ } = _b, props = __objRest(_b, [
282
+ "className",
283
+ "children",
284
+ "showCloseButton",
285
+ "style"
286
+ ]);
287
+ const themeVars = useThemeVars();
288
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(DialogPortal, { children: [
289
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(DialogOverlay, { style: themeVars }),
290
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
291
+ import_dialog.Dialog.Popup,
292
+ __spreadProps(__spreadValues({
293
+ className: cn(
294
+ // WealthX: removed rounded-lg (sharp corners), shadow-lg (flat panels), foreground/50 scrim via DialogOverlay
295
+ "fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 duration-200 outline-none 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 sm:max-w-lg",
296
+ className
297
+ ),
298
+ "data-slot": "dialog-content",
299
+ style: __spreadValues(__spreadValues({}, themeVars), style)
300
+ }, props), {
301
+ children: [
302
+ children,
303
+ showCloseButton ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
304
+ import_dialog.Dialog.Close,
305
+ {
306
+ className: "absolute top-4 right-4 transition-colors hover:bg-foreground/5 focus:outline-hidden focus:ring-2 focus:ring-border focus:ring-offset-0 disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
307
+ "data-slot": "dialog-close",
308
+ children: [
309
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_lucide_react2.XIcon, {}),
310
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "sr-only", children: "Close" })
311
+ ]
312
+ }
313
+ ) : null
314
+ ]
315
+ })
316
+ )
317
+ ] });
318
+ }
319
+ function DialogHeader(_a) {
320
+ var _b = _a, {
321
+ className
322
+ } = _b, props = __objRest(_b, [
323
+ "className"
324
+ ]);
325
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
326
+ "div",
327
+ __spreadValues({
328
+ className: cn("flex flex-col gap-1.5", className),
329
+ "data-slot": "dialog-header"
330
+ }, props)
331
+ );
332
+ }
333
+ function DialogFooter(_a) {
334
+ var _b = _a, {
335
+ className,
336
+ showCloseButton = false,
337
+ children
338
+ } = _b, props = __objRest(_b, [
339
+ "className",
340
+ "showCloseButton",
341
+ "children"
342
+ ]);
343
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
344
+ "div",
345
+ __spreadProps(__spreadValues({
346
+ className: cn(
347
+ // WealthX: always row layout, right-aligned, separator above footer
348
+ "flex flex-row justify-end gap-2 border-t border-border pt-4",
349
+ className
350
+ ),
351
+ "data-slot": "dialog-footer"
352
+ }, props), {
353
+ children: [
354
+ children,
355
+ showCloseButton ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
356
+ import_dialog.Dialog.Close,
357
+ {
358
+ className: cn(buttonVariants({ variant: "outline" })),
359
+ children: "Close"
360
+ }
361
+ ) : null
362
+ ]
363
+ })
364
+ );
365
+ }
366
+ function DialogTitle(_a) {
367
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
368
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
369
+ import_dialog.Dialog.Title,
370
+ __spreadValues({
371
+ className: cn("text-h5 leading-none", className),
372
+ "data-slot": "dialog-title"
373
+ }, props)
374
+ );
375
+ }
376
+ function DialogDescription(_a) {
377
+ var _b = _a, {
378
+ className
379
+ } = _b, props = __objRest(_b, [
380
+ "className"
381
+ ]);
382
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
383
+ import_dialog.Dialog.Description,
384
+ __spreadValues({
385
+ className: cn("text-body-small text-muted-foreground", className),
386
+ "data-slot": "dialog-description"
387
+ }, props)
388
+ );
389
+ }
390
+
391
+ // src/components/ui/select.tsx
392
+ var import_lucide_react3 = require("lucide-react");
393
+ var import_select = require("@base-ui/react/select");
394
+ var import_jsx_runtime4 = require("react/jsx-runtime");
395
+ function Select(_a) {
396
+ var props = __objRest(_a, []);
397
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_select.Select.Root, __spreadValues({ "data-slot": "select" }, props));
398
+ }
399
+ function SelectTrigger(_a) {
400
+ var _b = _a, {
401
+ className,
402
+ size = "default",
403
+ children
404
+ } = _b, props = __objRest(_b, [
405
+ "className",
406
+ "size",
407
+ "children"
408
+ ]);
409
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
410
+ import_select.Select.Trigger,
411
+ __spreadProps(__spreadValues({
412
+ className: cn(
413
+ "flex w-fit items-center justify-between gap-2 border border-input bg-transparent px-3 py-2 text-body-medium whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-primary focus-visible:ring-[3px] focus-visible:ring-primary/20 data-popup-open:border-primary data-popup-open:ring-[3px] data-popup-open:ring-primary/20 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-placeholder:font-normal data-placeholder:text-muted-foreground data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",
414
+ className
415
+ ),
416
+ "data-size": size,
417
+ "data-slot": "select-trigger"
418
+ }, props), {
419
+ children: [
420
+ children,
421
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_select.Select.Icon, { className: "transition-transform duration-200 data-popup-open:rotate-180", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react3.ChevronDownIcon, { className: "size-4 opacity-50" }) })
422
+ ]
423
+ })
424
+ );
425
+ }
426
+ function SelectContent(_a) {
427
+ var _b = _a, {
428
+ className,
429
+ children,
430
+ style
431
+ } = _b, props = __objRest(_b, [
432
+ "className",
433
+ "children",
434
+ "style"
435
+ ]);
436
+ const themeVars = useThemeVars();
437
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_select.Select.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
438
+ import_select.Select.Positioner,
439
+ {
440
+ className: "z-[200]",
441
+ align: "start",
442
+ alignItemWithTrigger: false,
443
+ sideOffset: 4,
444
+ children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
445
+ import_select.Select.Popup,
446
+ __spreadProps(__spreadValues({
447
+ className: cn(
448
+ "relative max-h-[var(--available-height)] min-w-[var(--anchor-width,8rem)] overflow-x-hidden overflow-y-auto 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",
449
+ className
450
+ ),
451
+ "data-slot": "select-content",
452
+ style: __spreadValues(__spreadValues({}, themeVars), style)
453
+ }, props), {
454
+ children: [
455
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(SelectScrollUpButton, {}),
456
+ children,
457
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(SelectScrollDownButton, {})
458
+ ]
459
+ })
460
+ )
461
+ }
462
+ ) });
463
+ }
464
+ function SelectItem(_a) {
465
+ var _b = _a, {
466
+ className,
467
+ children
468
+ } = _b, props = __objRest(_b, [
469
+ "className",
470
+ "children"
471
+ ]);
472
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
473
+ import_select.Select.Item,
474
+ __spreadProps(__spreadValues({
475
+ className: cn(
476
+ "relative flex w-full cursor-default items-center gap-2 py-1.5 pr-8 pl-2 text-body-small outline-hidden select-none data-highlighted:bg-primary/5 data-highlighted:text-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
477
+ className
478
+ ),
479
+ "data-slot": "select-item"
480
+ }, props), {
481
+ children: [
482
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
483
+ "span",
484
+ {
485
+ className: "absolute right-2 flex size-3.5 items-center justify-center",
486
+ "data-slot": "select-item-indicator",
487
+ children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_select.Select.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react3.CheckIcon, { className: "size-4" }) })
488
+ }
489
+ ),
490
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_select.Select.ItemText, { children })
491
+ ]
492
+ })
493
+ );
494
+ }
495
+ function SelectScrollUpButton(_a) {
496
+ var _b = _a, {
497
+ className
498
+ } = _b, props = __objRest(_b, [
499
+ "className"
500
+ ]);
501
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
502
+ import_select.Select.ScrollUpArrow,
503
+ __spreadProps(__spreadValues({
504
+ className: cn(
505
+ "flex cursor-default items-center justify-center py-1",
506
+ className
507
+ ),
508
+ "data-slot": "select-scroll-up-button"
509
+ }, props), {
510
+ children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react3.ChevronUpIcon, { className: "size-4" })
511
+ })
512
+ );
513
+ }
514
+ function SelectScrollDownButton(_a) {
515
+ var _b = _a, {
516
+ className
517
+ } = _b, props = __objRest(_b, [
518
+ "className"
519
+ ]);
520
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
521
+ import_select.Select.ScrollDownArrow,
522
+ __spreadProps(__spreadValues({
523
+ className: cn(
524
+ "flex cursor-default items-center justify-center py-1",
525
+ className
526
+ ),
527
+ "data-slot": "select-scroll-down-button"
528
+ }, props), {
529
+ children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react3.ChevronDownIcon, { className: "size-4" })
530
+ })
531
+ );
532
+ }
533
+
534
+ // src/components/ui/toggle-group.tsx
535
+ var React3 = __toESM(require("react"));
536
+ var import_toggle_group = require("@base-ui/react/toggle-group");
537
+ var import_toggle2 = require("@base-ui/react/toggle");
538
+
539
+ // src/components/ui/toggle.tsx
540
+ var import_class_variance_authority2 = require("class-variance-authority");
541
+ var import_toggle = require("@base-ui/react/toggle");
542
+ var import_jsx_runtime5 = require("react/jsx-runtime");
543
+ var toggleVariants = (0, import_class_variance_authority2.cva)(
544
+ "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",
545
+ {
546
+ variants: {
547
+ variant: {
548
+ default: "bg-transparent hover:bg-muted hover:text-muted-foreground",
549
+ outline: "border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"
550
+ },
551
+ size: {
552
+ default: "h-9 min-w-9 px-2",
553
+ sm: "h-8 min-w-8 px-1.5 text-caption",
554
+ lg: "h-10 min-w-10 px-2.5"
555
+ }
556
+ },
557
+ defaultVariants: {
558
+ variant: "default",
559
+ size: "default"
560
+ }
561
+ }
562
+ );
563
+
564
+ // src/components/ui/toggle-group.tsx
565
+ var import_jsx_runtime6 = require("react/jsx-runtime");
566
+ var ToggleGroupContext = React3.createContext({
567
+ size: "default",
568
+ variant: "default",
569
+ spacing: 0
570
+ });
571
+ function ToggleGroup(_a) {
572
+ var _b = _a, {
573
+ className,
574
+ variant,
575
+ size,
576
+ spacing = 0,
577
+ type,
578
+ children
579
+ } = _b, props = __objRest(_b, [
580
+ "className",
581
+ "variant",
582
+ "size",
583
+ "spacing",
584
+ "type",
585
+ "children"
586
+ ]);
587
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
588
+ import_toggle_group.ToggleGroup,
589
+ __spreadProps(__spreadValues({
590
+ className: cn(
591
+ // WealthX: removed rounded-md (sharp corners) and shadow-xs (flat panels)
592
+ "group/toggle-group flex w-fit items-center gap-[--spacing(var(--gap))]",
593
+ className
594
+ ),
595
+ "data-size": size,
596
+ "data-slot": "toggle-group",
597
+ "data-spacing": spacing,
598
+ "data-variant": variant,
599
+ multiple: type === "multiple",
600
+ style: { "--gap": spacing }
601
+ }, props), {
602
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ToggleGroupContext.Provider, { value: { variant, size, spacing }, children })
603
+ })
604
+ );
605
+ }
606
+ function ToggleGroupItem(_a) {
607
+ var _b = _a, {
608
+ className,
609
+ children,
610
+ variant,
611
+ size
612
+ } = _b, props = __objRest(_b, [
613
+ "className",
614
+ "children",
615
+ "variant",
616
+ "size"
617
+ ]);
618
+ const context = React3.useContext(ToggleGroupContext);
619
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
620
+ import_toggle2.Toggle,
621
+ __spreadProps(__spreadValues({
622
+ className: cn(
623
+ toggleVariants({
624
+ variant: context.variant || variant,
625
+ size: context.size || size
626
+ }),
627
+ "w-auto min-w-0 shrink-0 focus:z-10 focus-visible:z-10",
628
+ // WealthX: no rounded corners on grouped items
629
+ "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",
630
+ className
631
+ ),
632
+ "data-size": context.size || size,
633
+ "data-slot": "toggle-group-item",
634
+ "data-spacing": context.spacing,
635
+ "data-variant": context.variant || variant
636
+ }, props), {
637
+ children
638
+ })
639
+ );
640
+ }
641
+
642
+ // src/components/ui/date-picker.tsx
643
+ var React5 = __toESM(require("react"));
644
+ var import_date_fns = require("date-fns");
645
+ var import_lucide_react5 = require("lucide-react");
646
+
647
+ // src/components/ui/calendar.tsx
648
+ var React4 = __toESM(require("react"));
649
+ var import_lucide_react4 = require("lucide-react");
650
+ var import_react_day_picker = require("react-day-picker");
651
+ var import_jsx_runtime7 = require("react/jsx-runtime");
652
+ function CalendarRoot(_a) {
653
+ var _b = _a, {
654
+ className,
655
+ rootRef
656
+ } = _b, props = __objRest(_b, [
657
+ "className",
658
+ "rootRef"
659
+ ]);
660
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
661
+ "div",
662
+ __spreadValues({
663
+ className: cn(className),
664
+ "data-slot": "calendar",
665
+ ref: rootRef
666
+ }, props)
667
+ );
668
+ }
669
+ function CalendarChevron(_a) {
670
+ var _b = _a, {
671
+ className,
672
+ orientation
673
+ } = _b, props = __objRest(_b, [
674
+ "className",
675
+ "orientation"
676
+ ]);
677
+ if (orientation === "left") {
678
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react4.ChevronLeftIcon, __spreadValues({ className: cn("size-4", className) }, props));
679
+ }
680
+ if (orientation === "right") {
681
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react4.ChevronRightIcon, __spreadValues({ className: cn("size-4", className) }, props));
682
+ }
683
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react4.ChevronDownIcon, __spreadValues({ className: cn("size-4", className) }, props));
684
+ }
685
+ function CalendarWeekNumber(_a) {
686
+ var _b = _a, {
687
+ children
688
+ } = _b, props = __objRest(_b, [
689
+ "children"
690
+ ]);
691
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("td", __spreadProps(__spreadValues({}, props), { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "flex size-(--cell-size) items-center justify-center text-center", children }) }));
692
+ }
693
+ function Calendar(_a) {
694
+ var _b = _a, {
695
+ className,
696
+ classNames,
697
+ showOutsideDays = true,
698
+ captionLayout = "dropdown",
699
+ buttonVariant = "ghost",
700
+ formatters,
701
+ components
702
+ } = _b, props = __objRest(_b, [
703
+ "className",
704
+ "classNames",
705
+ "showOutsideDays",
706
+ "captionLayout",
707
+ "buttonVariant",
708
+ "formatters",
709
+ "components"
710
+ ]);
711
+ const defaultClassNames = (0, import_react_day_picker.getDefaultClassNames)();
712
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
713
+ import_react_day_picker.DayPicker,
714
+ __spreadValues({
715
+ captionLayout,
716
+ className: cn(
717
+ "group/calendar bg-background p-3 font-sans border border-border shadow-sm [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",
718
+ String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,
719
+ String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,
720
+ className
721
+ ),
722
+ classNames: __spreadValues({
723
+ root: cn("w-fit", defaultClassNames.root),
724
+ months: cn(
725
+ "relative flex flex-col gap-4 md:flex-row",
726
+ defaultClassNames.months
727
+ ),
728
+ month: cn("flex w-full flex-col gap-4", defaultClassNames.month),
729
+ nav: cn(
730
+ "absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",
731
+ defaultClassNames.nav
732
+ ),
733
+ button_previous: cn(
734
+ buttonVariants({ variant: buttonVariant }),
735
+ "size-(--cell-size) p-0 select-none aria-disabled:opacity-50",
736
+ defaultClassNames.button_previous
737
+ ),
738
+ button_next: cn(
739
+ buttonVariants({ variant: buttonVariant }),
740
+ "size-(--cell-size) p-0 select-none aria-disabled:opacity-50",
741
+ defaultClassNames.button_next
742
+ ),
743
+ month_caption: cn(
744
+ "flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)",
745
+ defaultClassNames.month_caption
746
+ ),
747
+ dropdowns: cn(
748
+ "flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-label-small",
749
+ defaultClassNames.dropdowns
750
+ ),
751
+ dropdown_root: cn(
752
+ "relative border border-input shadow-xs has-focus:border-ring has-focus:ring-[3px] has-focus:ring-ring/50",
753
+ defaultClassNames.dropdown_root
754
+ ),
755
+ dropdown: cn(
756
+ "absolute inset-0 bg-popover opacity-0",
757
+ defaultClassNames.dropdown
758
+ ),
759
+ caption_label: cn(
760
+ "select-none",
761
+ captionLayout === "label" ? "text-label-small" : "flex h-8 items-center gap-1 pr-1 pl-2 text-label-small [&>svg]:size-3.5 [&>svg]:text-muted-foreground",
762
+ defaultClassNames.caption_label
763
+ ),
764
+ table: "w-full border-collapse",
765
+ weekdays: cn("flex", defaultClassNames.weekdays),
766
+ weekday: cn(
767
+ "flex-1 text-caption font-normal text-muted-foreground select-none",
768
+ defaultClassNames.weekday
769
+ ),
770
+ week: cn("mt-2 flex w-full", defaultClassNames.week),
771
+ week_number_header: cn(
772
+ "w-(--cell-size) select-none",
773
+ defaultClassNames.week_number_header
774
+ ),
775
+ week_number: cn(
776
+ "text-caption text-muted-foreground select-none",
777
+ defaultClassNames.week_number
778
+ ),
779
+ day: cn(
780
+ "group/day relative aspect-square h-full w-full p-0 text-center select-none",
781
+ defaultClassNames.day
782
+ ),
783
+ range_start: cn("bg-accent", defaultClassNames.range_start),
784
+ range_middle: cn("rounded-none", defaultClassNames.range_middle),
785
+ range_end: cn("bg-accent", defaultClassNames.range_end),
786
+ today: cn("bg-accent text-accent-foreground", defaultClassNames.today),
787
+ outside: cn(
788
+ "text-muted-foreground aria-selected:text-muted-foreground",
789
+ defaultClassNames.outside
790
+ ),
791
+ disabled: cn(
792
+ "text-muted-foreground opacity-50",
793
+ defaultClassNames.disabled
794
+ ),
795
+ hidden: cn("invisible", defaultClassNames.hidden)
796
+ }, classNames),
797
+ components: __spreadValues({
798
+ Root: CalendarRoot,
799
+ Chevron: CalendarChevron,
800
+ DayButton: CalendarDayButton,
801
+ WeekNumber: CalendarWeekNumber
802
+ }, components),
803
+ formatters: __spreadValues({
804
+ formatMonthDropdown: (date) => date.toLocaleString("default", { month: "short" })
805
+ }, formatters),
806
+ showOutsideDays
807
+ }, props)
808
+ );
809
+ }
810
+ function CalendarDayButton(_a) {
811
+ var _b = _a, {
812
+ className,
813
+ day,
814
+ modifiers
815
+ } = _b, props = __objRest(_b, [
816
+ "className",
817
+ "day",
818
+ "modifiers"
819
+ ]);
820
+ const defaultClassNames = (0, import_react_day_picker.getDefaultClassNames)();
821
+ const ref = React4.useRef(null);
822
+ React4.useEffect(() => {
823
+ var _a2;
824
+ if (modifiers.focused) (_a2 = ref.current) == null ? void 0 : _a2.focus();
825
+ }, [modifiers.focused]);
826
+ const selectedSingle = modifiers.selected && !modifiers.range_start && !modifiers.range_end ? !modifiers.range_middle : null;
827
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
828
+ Button,
829
+ __spreadValues({
830
+ className: cn(
831
+ "flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 font-normal rounded-none group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-ring/50 data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground dark:hover:text-accent-foreground [&>span]:text-caption [&>span]:opacity-70",
832
+ defaultClassNames.day,
833
+ className
834
+ ),
835
+ "data-day": day.date.toLocaleDateString(),
836
+ "data-range-end": modifiers.range_end,
837
+ "data-range-middle": modifiers.range_middle,
838
+ "data-range-start": modifiers.range_start,
839
+ "data-selected-single": selectedSingle,
840
+ ref,
841
+ size: "icon",
842
+ variant: "ghost"
843
+ }, props)
844
+ );
845
+ }
846
+
847
+ // src/components/ui/popover.tsx
848
+ var import_popover = require("@base-ui/react/popover");
849
+ var import_jsx_runtime8 = require("react/jsx-runtime");
850
+ function Popover(_a) {
851
+ var props = __objRest(_a, []);
852
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_popover.Popover.Root, __spreadValues({ "data-slot": "popover" }, props));
853
+ }
854
+ function PopoverTrigger(_a) {
855
+ var props = __objRest(_a, []);
856
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_popover.Popover.Trigger, __spreadValues({ "data-slot": "popover-trigger" }, props));
857
+ }
858
+ function PopoverContent(_a) {
859
+ var _b = _a, {
860
+ className,
861
+ align = "center",
862
+ sideOffset = 4,
863
+ style
864
+ } = _b, props = __objRest(_b, [
865
+ "className",
866
+ "align",
867
+ "sideOffset",
868
+ "style"
869
+ ]);
870
+ const themeVars = useThemeVars();
871
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_popover.Popover.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
872
+ import_popover.Popover.Positioner,
873
+ {
874
+ className: "z-[200]",
875
+ align,
876
+ sideOffset,
877
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
878
+ import_popover.Popover.Popup,
879
+ __spreadValues({
880
+ className: cn(
881
+ "z-50 w-72 border border-border bg-popover p-4 text-popover-foreground shadow-md outline-hidden 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",
882
+ className
883
+ ),
884
+ "data-slot": "popover-content",
885
+ style: __spreadValues(__spreadValues({}, themeVars), style)
886
+ }, props)
887
+ )
888
+ }
889
+ ) });
890
+ }
891
+
892
+ // src/components/ui/date-picker.tsx
893
+ var import_jsx_runtime9 = require("react/jsx-runtime");
894
+ function DatePicker({
895
+ value,
896
+ onChange,
897
+ placeholder = "Pick a date",
898
+ showTimePicker = false,
899
+ disabled = false,
900
+ className,
901
+ calendarProps
902
+ }) {
903
+ const [open, setOpen] = React5.useState(false);
904
+ function handleDaySelect(day) {
905
+ if (!day) {
906
+ onChange == null ? void 0 : onChange(void 0);
907
+ return;
908
+ }
909
+ if (showTimePicker && value) {
910
+ day.setHours(value.getHours(), value.getMinutes());
911
+ }
912
+ onChange == null ? void 0 : onChange(day);
913
+ if (!showTimePicker) setOpen(false);
914
+ }
915
+ function handleTimeChange(e) {
916
+ const [hours, minutes] = e.target.value.split(":").map(Number);
917
+ const next = value ? new Date(value) : /* @__PURE__ */ new Date();
918
+ next.setHours(hours, minutes, 0, 0);
919
+ onChange == null ? void 0 : onChange(next);
920
+ }
921
+ const timeValue = value ? `${String(value.getHours()).padStart(2, "0")}:${String(value.getMinutes()).padStart(2, "0")}` : "";
922
+ let displayValue;
923
+ if (value && showTimePicker) {
924
+ displayValue = (0, import_date_fns.format)(value, "dd/MM/yyyy HH:mm");
925
+ } else if (value) {
926
+ displayValue = (0, import_date_fns.format)(value, "dd/MM/yyyy");
927
+ }
928
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(Popover, { onOpenChange: disabled ? void 0 : setOpen, open, children: [
929
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
930
+ PopoverTrigger,
931
+ {
932
+ render: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
933
+ Button,
934
+ {
935
+ className: cn(
936
+ "w-full justify-start rounded-none font-normal data-[empty=true]:text-muted-foreground",
937
+ className
938
+ ),
939
+ "data-empty": !value,
940
+ "data-slot": "date-picker-trigger",
941
+ disabled,
942
+ variant: "outline"
943
+ }
944
+ ),
945
+ children: [
946
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react5.CalendarIcon, {}),
947
+ value ? displayValue : placeholder
948
+ ]
949
+ }
950
+ ),
951
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
952
+ PopoverContent,
953
+ {
954
+ align: "start",
955
+ className: "w-auto rounded-none p-0 shadow-sm",
956
+ children: [
957
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
958
+ Calendar,
959
+ __spreadProps(__spreadValues({
960
+ captionLayout: "dropdown",
961
+ mode: "single",
962
+ onSelect: handleDaySelect,
963
+ selected: value
964
+ }, calendarProps), {
965
+ className: cn(
966
+ "rounded-none border-0 shadow-none",
967
+ calendarProps == null ? void 0 : calendarProps.className
968
+ )
969
+ })
970
+ ),
971
+ showTimePicker ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "border-t border-border px-3 pb-3 pt-2", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("label", { className: "mb-1.5 block text-xs font-medium text-muted-foreground", children: [
972
+ "Time",
973
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
974
+ "input",
975
+ {
976
+ className: "mt-1.5 h-8 w-full rounded-none border border-input bg-transparent px-2 text-sm font-sans outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50",
977
+ onChange: handleTimeChange,
978
+ type: "time",
979
+ value: timeValue
980
+ }
981
+ )
982
+ ] }) }) : null
983
+ ]
984
+ }
985
+ )
986
+ ] });
987
+ }
988
+
989
+ // src/components/ui/pipeline-dialogs.tsx
990
+ var import_jsx_runtime10 = require("react/jsx-runtime");
991
+ function DeleteOpportunityDialog({
992
+ open,
993
+ loading = false,
994
+ onOpenChange,
995
+ onConfirm,
996
+ className
997
+ }) {
998
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Dialog, { open, onOpenChange: loading ? void 0 : onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
999
+ DialogContent,
1000
+ {
1001
+ showCloseButton: !loading,
1002
+ className: cn("max-w-sm", className),
1003
+ children: [
1004
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(DialogHeader, { children: [
1005
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(DialogTitle, { children: "Want to delete this card?" }),
1006
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(DialogDescription, { children: "Doing so will also remove all associated loan applications and tasks. This action cannot be undone." })
1007
+ ] }),
1008
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(DialogFooter, { children: [
1009
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1010
+ Button,
1011
+ {
1012
+ variant: "outline",
1013
+ onClick: () => onOpenChange(false),
1014
+ disabled: loading,
1015
+ children: "Cancel"
1016
+ }
1017
+ ),
1018
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Button, { variant: "destructive", onClick: onConfirm, disabled: loading, children: loading ? "Deleting\u2026" : "Delete" })
1019
+ ] })
1020
+ ]
1021
+ }
1022
+ ) });
1023
+ }
1024
+ var PRIORITY_OPTIONS = [
1025
+ { value: "auto", label: "Auto", color: "var(--color-muted-foreground)" },
1026
+ { value: "low", label: "Low", color: "var(--color-success)" },
1027
+ { value: "medium", label: "Medium", color: "var(--color-warning)" },
1028
+ { value: "high", label: "High", color: "var(--color-destructive)" }
1029
+ ];
1030
+ function ChangePriorityDialog({
1031
+ open,
1032
+ value,
1033
+ loading = false,
1034
+ onOpenChange,
1035
+ onSave,
1036
+ onSelectionChange,
1037
+ className
1038
+ }) {
1039
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Dialog, { open, onOpenChange: loading ? void 0 : onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(DialogContent, { className: cn("max-w-sm", className), children: [
1040
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(DialogHeader, { children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(DialogTitle, { children: "Change priority" }) }),
1041
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
1042
+ Select,
1043
+ {
1044
+ value,
1045
+ onValueChange: (v) => onSelectionChange(v),
1046
+ children: [
1047
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SelectTrigger, { className: "w-full", children: (() => {
1048
+ const opt = PRIORITY_OPTIONS.find((o) => o.value === value);
1049
+ return opt ? /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("span", { className: "flex items-center gap-2", children: [
1050
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1051
+ "span",
1052
+ {
1053
+ className: "inline-block size-2 shrink-0 rounded-full",
1054
+ style: { backgroundColor: opt.color },
1055
+ "aria-hidden": "true"
1056
+ }
1057
+ ),
1058
+ opt.label
1059
+ ] }) : null;
1060
+ })() }),
1061
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SelectContent, { children: PRIORITY_OPTIONS.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SelectItem, { value: opt.value, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("span", { className: "flex items-center gap-2", children: [
1062
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1063
+ "span",
1064
+ {
1065
+ className: "inline-block size-2 shrink-0 rounded-full",
1066
+ style: { backgroundColor: opt.color },
1067
+ "aria-hidden": "true"
1068
+ }
1069
+ ),
1070
+ opt.label
1071
+ ] }) }, opt.value)) })
1072
+ ]
1073
+ }
1074
+ ),
1075
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(DialogFooter, { children: [
1076
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1077
+ Button,
1078
+ {
1079
+ variant: "outline",
1080
+ onClick: () => onOpenChange(false),
1081
+ disabled: loading,
1082
+ children: "Cancel"
1083
+ }
1084
+ ),
1085
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Button, { onClick: onSave, disabled: loading, children: loading ? "Saving\u2026" : "Save" })
1086
+ ] })
1087
+ ] }) });
1088
+ }
1089
+ var HOLD_OPTIONS = [
1090
+ { value: "90", label: "90 Days" },
1091
+ { value: "180", label: "180 Days" },
1092
+ { value: "360", label: "360 Days" },
1093
+ { value: "custom", label: "Custom" }
1094
+ ];
1095
+ function PutOnHoldDialog({
1096
+ open,
1097
+ loading = false,
1098
+ onOpenChange,
1099
+ onSave,
1100
+ className
1101
+ }) {
1102
+ const [duration, setDuration] = React6.useState("90");
1103
+ const [customDate, setCustomDate] = React6.useState();
1104
+ const today = React6.useMemo(() => (0, import_date_fns2.startOfDay)(/* @__PURE__ */ new Date()), []);
1105
+ const resolvedDate = React6.useMemo(() => {
1106
+ if (duration === "custom") return customDate;
1107
+ return (0, import_date_fns2.addDays)(today, parseInt(duration, 10));
1108
+ }, [duration, customDate, today]);
1109
+ const isValid = resolvedDate !== void 0 && resolvedDate >= today;
1110
+ function handleSave() {
1111
+ if (!resolvedDate) return;
1112
+ onSave((0, import_date_fns2.format)(resolvedDate, "yyyy-MM-dd"));
1113
+ }
1114
+ React6.useEffect(() => {
1115
+ if (open) {
1116
+ setDuration("90");
1117
+ setCustomDate(void 0);
1118
+ }
1119
+ }, [open]);
1120
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Dialog, { open, onOpenChange: loading ? void 0 : onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(DialogContent, { className: cn("max-w-sm", className), children: [
1121
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(DialogHeader, { children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(DialogTitle, { children: "Hold and Hide Until Later Date" }) }),
1122
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex flex-col gap-4", children: [
1123
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1124
+ ToggleGroup,
1125
+ {
1126
+ type: "single",
1127
+ variant: "outline",
1128
+ size: "sm",
1129
+ value: [duration],
1130
+ onValueChange: (v) => {
1131
+ if (v.length) setDuration(v[0]);
1132
+ },
1133
+ className: "w-full",
1134
+ children: HOLD_OPTIONS.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1135
+ ToggleGroupItem,
1136
+ {
1137
+ value: opt.value,
1138
+ className: "flex-1",
1139
+ children: opt.label
1140
+ },
1141
+ opt.value
1142
+ ))
1143
+ }
1144
+ ),
1145
+ duration === "custom" ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1146
+ DatePicker,
1147
+ {
1148
+ value: customDate,
1149
+ onChange: setCustomDate,
1150
+ placeholder: "Pick a date",
1151
+ calendarProps: { disabled: { before: today } }
1152
+ }
1153
+ ) : resolvedDate && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex h-9 items-center border border-input bg-muted/30 px-3 text-sm text-muted-foreground", children: [
1154
+ "Hold until:",
1155
+ " ",
1156
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "ml-1 font-medium text-foreground", children: (0, import_date_fns2.format)(resolvedDate, "dd MMM yyyy") })
1157
+ ] }),
1158
+ duration === "custom" && customDate && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("p", { className: "text-sm text-muted-foreground", children: [
1159
+ "Hold until:",
1160
+ " ",
1161
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "font-medium text-foreground", children: (0, import_date_fns2.format)(customDate, "dd MMM yyyy") })
1162
+ ] })
1163
+ ] }),
1164
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(DialogFooter, { children: [
1165
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1166
+ Button,
1167
+ {
1168
+ variant: "outline",
1169
+ onClick: () => onOpenChange(false),
1170
+ disabled: loading,
1171
+ children: "Cancel"
1172
+ }
1173
+ ),
1174
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Button, { onClick: handleSave, disabled: loading || !isValid, children: loading ? "Saving\u2026" : "Save" })
1175
+ ] })
1176
+ ] }) });
1177
+ }
1178
+ // Annotate the CommonJS export names for ESM import in node:
1179
+ 0 && (module.exports = {
1180
+ ChangePriorityDialog,
1181
+ DeleteOpportunityDialog,
1182
+ PutOnHoldDialog
1183
+ });