@senitix/ui 0.4.1 → 0.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (393) hide show
  1. package/dist/accordion-BcwB0wwz.cjs +2 -0
  2. package/dist/accordion-BcwB0wwz.cjs.map +1 -0
  3. package/dist/accordion-BwnJKrKm.js +360 -0
  4. package/dist/accordion-BwnJKrKm.js.map +1 -0
  5. package/dist/appointment-scheduler-BoQQO51F.cjs +2 -0
  6. package/dist/appointment-scheduler-BoQQO51F.cjs.map +1 -0
  7. package/dist/appointment-scheduler-DHAs-mF_.js +192 -0
  8. package/dist/appointment-scheduler-DHAs-mF_.js.map +1 -0
  9. package/dist/arrow-right-CM3nmiZe.js +15 -0
  10. package/dist/arrow-right-CM3nmiZe.js.map +1 -0
  11. package/dist/arrow-right-vDxRZOfm.cjs +7 -0
  12. package/dist/arrow-right-vDxRZOfm.cjs.map +1 -0
  13. package/dist/avatar-BlEcWE7T.js +191 -0
  14. package/dist/avatar-BlEcWE7T.js.map +1 -0
  15. package/dist/avatar-Cl38Ye4J.cjs +2 -0
  16. package/dist/avatar-Cl38Ye4J.cjs.map +1 -0
  17. package/dist/badge-BZcdBG5J.cjs +23 -0
  18. package/dist/badge-BZcdBG5J.cjs.map +1 -0
  19. package/dist/badge-D0C_rP2l.js +157 -0
  20. package/dist/badge-D0C_rP2l.js.map +1 -0
  21. package/dist/button-BP_ug5gP.js +126 -0
  22. package/dist/button-BP_ug5gP.js.map +1 -0
  23. package/dist/button-CPuCii0R.cjs +2 -0
  24. package/dist/button-CPuCii0R.cjs.map +1 -0
  25. package/dist/{calendar-DgnhzEfp.js → calendar-86qoSnO7.js} +368 -433
  26. package/dist/calendar-86qoSnO7.js.map +1 -0
  27. package/dist/{calendar-D3RWU0_G.cjs → calendar-BH-AuyiB.cjs} +2 -2
  28. package/dist/{calendar-D3RWU0_G.cjs.map → calendar-BH-AuyiB.cjs.map} +1 -1
  29. package/dist/calendar-CSJ060ym.cjs +2 -0
  30. package/dist/calendar-CSJ060ym.cjs.map +1 -0
  31. package/dist/{calendar-CUxm1K7J.js → calendar-JUSWONQ0.js} +2 -2
  32. package/dist/{calendar-CUxm1K7J.js.map → calendar-JUSWONQ0.js.map} +1 -1
  33. package/dist/{card-DISL3sPJ.cjs → card-CToWUN1K.cjs} +2 -2
  34. package/dist/{card-DISL3sPJ.cjs.map → card-CToWUN1K.cjs.map} +1 -1
  35. package/dist/{card-fId5vof_.js → card-yxbWFvZ1.js} +2 -2
  36. package/dist/{card-fId5vof_.js.map → card-yxbWFvZ1.js.map} +1 -1
  37. package/dist/checkbox-BmugT50K.cjs +2 -0
  38. package/dist/checkbox-BmugT50K.cjs.map +1 -0
  39. package/dist/{checkbox-BY2zxQVv.js → checkbox-CTa9e4SG.js} +95 -97
  40. package/dist/checkbox-CTa9e4SG.js.map +1 -0
  41. package/dist/chevron-left-5h87iFo_.cjs +7 -0
  42. package/dist/chevron-left-5h87iFo_.cjs.map +1 -0
  43. package/dist/chevron-left-DD5mQuvf.js +14 -0
  44. package/dist/chevron-left-DD5mQuvf.js.map +1 -0
  45. package/dist/{chevron-right-Bxf8i4gi.cjs → chevron-right-D-TdAZ7l.cjs} +2 -2
  46. package/dist/{chevron-right-Bxf8i4gi.cjs.map → chevron-right-D-TdAZ7l.cjs.map} +1 -1
  47. package/dist/{chevron-right-BLyGmyaF.js → chevron-right-Di90aqSn.js} +2 -2
  48. package/dist/{chevron-right-BLyGmyaF.js.map → chevron-right-Di90aqSn.js.map} +1 -1
  49. package/dist/chevron-up-Bq55Db6X.cjs +7 -0
  50. package/dist/{chevron-up-C3RClqXD.cjs.map → chevron-up-Bq55Db6X.cjs.map} +1 -1
  51. package/dist/{chevron-up-BmYZUtrk.js → chevron-up-Dr7EIn9V.js} +2 -2
  52. package/dist/{chevron-up-BmYZUtrk.js.map → chevron-up-Dr7EIn9V.js.map} +1 -1
  53. package/dist/clock-BjJE8PGr.js +15 -0
  54. package/dist/clock-BjJE8PGr.js.map +1 -0
  55. package/dist/clock-CnxBAA_O.cjs +7 -0
  56. package/dist/clock-CnxBAA_O.cjs.map +1 -0
  57. package/dist/command-BEpaOk-5.cjs +2 -0
  58. package/dist/command-BEpaOk-5.cjs.map +1 -0
  59. package/dist/command-CYhMM7gX.js +404 -0
  60. package/dist/command-CYhMM7gX.js.map +1 -0
  61. package/dist/components/builders/index.cjs.js +2 -0
  62. package/dist/components/builders/index.cjs.js.map +1 -0
  63. package/dist/components/builders/index.es.js +42 -0
  64. package/dist/components/builders/index.es.js.map +1 -0
  65. package/dist/components/charts/index.cjs.js +1 -1
  66. package/dist/components/charts/index.es.js +7 -6
  67. package/dist/components/charts/index.es.js.map +1 -1
  68. package/dist/components/data-display/index.cjs.js +1 -1
  69. package/dist/components/data-display/index.es.js +43 -20
  70. package/dist/components/dnd/index.cjs.js +1 -1
  71. package/dist/components/dnd/index.es.js +1 -1
  72. package/dist/components/feedback/index.cjs.js +1 -1
  73. package/dist/components/feedback/index.es.js +1 -1
  74. package/dist/components/forms/index.cjs.js +1 -1
  75. package/dist/components/forms/index.es.js +24 -23
  76. package/dist/components/forms/index.es.js.map +1 -1
  77. package/dist/components/layouts/index.cjs.js +1 -1
  78. package/dist/components/layouts/index.es.js +45 -21
  79. package/dist/components/messaging/index.cjs.js +2 -0
  80. package/dist/components/messaging/index.cjs.js.map +1 -0
  81. package/dist/components/messaging/index.es.js +15 -0
  82. package/dist/components/messaging/index.es.js.map +1 -0
  83. package/dist/components/navigation/index.cjs.js +1 -1
  84. package/dist/components/navigation/index.es.js +1 -1
  85. package/dist/components/scheduling/index.cjs.js +2 -0
  86. package/dist/components/scheduling/index.cjs.js.map +1 -0
  87. package/dist/components/scheduling/index.es.js +6 -0
  88. package/dist/components/scheduling/index.es.js.map +1 -0
  89. package/dist/components/ui/index.cjs.js +1 -1
  90. package/dist/components/ui/index.es.js +168 -158
  91. package/dist/components/ui/index.es.js.map +1 -1
  92. package/dist/dialog-Cr9SYCaD.cjs +6 -0
  93. package/dist/dialog-Cr9SYCaD.cjs.map +1 -0
  94. package/dist/dialog-MYAx3Qrc.js +387 -0
  95. package/dist/dialog-MYAx3Qrc.js.map +1 -0
  96. package/dist/dropdown-menu-CkCCV_tw.js +969 -0
  97. package/dist/dropdown-menu-CkCCV_tw.js.map +1 -0
  98. package/dist/dropdown-menu-ejikFvg2.cjs +7 -0
  99. package/dist/dropdown-menu-ejikFvg2.cjs.map +1 -0
  100. package/dist/{ellipsis-6eUne95u.js → ellipsis-CKhpjj5H.js} +2 -2
  101. package/dist/{ellipsis-6eUne95u.js.map → ellipsis-CKhpjj5H.js.map} +1 -1
  102. package/dist/{ellipsis-DkM3GBF5.cjs → ellipsis-Dk7Wfc4i.cjs} +3 -3
  103. package/dist/{ellipsis-DkM3GBF5.cjs.map → ellipsis-Dk7Wfc4i.cjs.map} +1 -1
  104. package/dist/external-link-CGBqsrbm.cjs +7 -0
  105. package/dist/external-link-CGBqsrbm.cjs.map +1 -0
  106. package/dist/external-link-UeWW0ty3.js +16 -0
  107. package/dist/external-link-UeWW0ty3.js.map +1 -0
  108. package/dist/eye-Cved4eAo.cjs +7 -0
  109. package/dist/eye-Cved4eAo.cjs.map +1 -0
  110. package/dist/eye-KdCUpmO8.js +21 -0
  111. package/dist/eye-KdCUpmO8.js.map +1 -0
  112. package/dist/{file-Cw_u_aJB.js → file-CHbdXCWO.js} +2 -2
  113. package/dist/{file-Cw_u_aJB.js.map → file-CHbdXCWO.js.map} +1 -1
  114. package/dist/{file-Cp5UoYUZ.cjs → file-CqYRamm8.cjs} +3 -3
  115. package/dist/{file-Cp5UoYUZ.cjs.map → file-CqYRamm8.cjs.map} +1 -1
  116. package/dist/file-spreadsheet-CpySxI0-.cjs +7 -0
  117. package/dist/file-spreadsheet-CpySxI0-.cjs.map +1 -0
  118. package/dist/file-spreadsheet-EqZMR-mM.js +19 -0
  119. package/dist/file-spreadsheet-EqZMR-mM.js.map +1 -0
  120. package/dist/form-preview-Bm5xHtkw.js +12075 -0
  121. package/dist/form-preview-Bm5xHtkw.js.map +1 -0
  122. package/dist/form-preview-IPEZdspX.cjs +111 -0
  123. package/dist/form-preview-IPEZdspX.cjs.map +1 -0
  124. package/dist/full-calendar-4Ut52QNO.cjs +18 -0
  125. package/dist/full-calendar-4Ut52QNO.cjs.map +1 -0
  126. package/dist/full-calendar-DD_tBy69.js +2631 -0
  127. package/dist/full-calendar-DD_tBy69.js.map +1 -0
  128. package/dist/funnel-chart-Dfj1pOyV.cjs +6 -0
  129. package/dist/funnel-chart-Dfj1pOyV.cjs.map +1 -0
  130. package/dist/funnel-chart-o9qcEMgg.js +2952 -0
  131. package/dist/funnel-chart-o9qcEMgg.js.map +1 -0
  132. package/dist/global-search-DcBKVaM4.cjs +22 -0
  133. package/dist/global-search-DcBKVaM4.cjs.map +1 -0
  134. package/dist/global-search-Dul9CD6-.js +1331 -0
  135. package/dist/global-search-Dul9CD6-.js.map +1 -0
  136. package/dist/hooks/index.cjs.js +1 -1
  137. package/dist/hooks/index.es.js +9 -7
  138. package/dist/hooks/index.es.js.map +1 -1
  139. package/dist/{index-DtaLkIY8.js → index-BGUveO6l.js} +84 -79
  140. package/dist/{index-DtaLkIY8.js.map → index-BGUveO6l.js.map} +1 -1
  141. package/dist/{index-gVbM3K4f.cjs → index-Bhee6XHk.cjs} +2 -2
  142. package/dist/{index-gVbM3K4f.cjs.map → index-Bhee6XHk.cjs.map} +1 -1
  143. package/dist/index-CrSlyWAA.js +1090 -0
  144. package/dist/index-CrSlyWAA.js.map +1 -0
  145. package/dist/{index-Dk_Et2WJ.js → index-D8-pHJim.js} +2 -2
  146. package/dist/{index-Dk_Et2WJ.js.map → index-D8-pHJim.js.map} +1 -1
  147. package/dist/index-Dy_9oyP3.cjs +2 -0
  148. package/dist/{index-D2U2F80P.cjs.map → index-Dy_9oyP3.cjs.map} +1 -1
  149. package/dist/index-hnbbvGmb.cjs +21 -0
  150. package/dist/index-hnbbvGmb.cjs.map +1 -0
  151. package/dist/index.cjs.js +1 -1
  152. package/dist/index.es.js +434 -319
  153. package/dist/index.es.js.map +1 -1
  154. package/dist/input-Pfq8fkiV.js +2718 -0
  155. package/dist/input-Pfq8fkiV.js.map +1 -0
  156. package/dist/input-UBp7V7li.cjs +52 -0
  157. package/dist/input-UBp7V7li.cjs.map +1 -0
  158. package/dist/label-CExiitfO.js +50 -0
  159. package/dist/label-CExiitfO.js.map +1 -0
  160. package/dist/label-F0zGAiI2.cjs +2 -0
  161. package/dist/label-F0zGAiI2.cjs.map +1 -0
  162. package/dist/loader-circle-CBVYGIRp.js +14 -0
  163. package/dist/loader-circle-CBVYGIRp.js.map +1 -0
  164. package/dist/loader-circle-IaJKvYsP.cjs +7 -0
  165. package/dist/loader-circle-IaJKvYsP.cjs.map +1 -0
  166. package/dist/locale-provider-BHGNO4j7.js +1786 -0
  167. package/dist/locale-provider-BHGNO4j7.js.map +1 -0
  168. package/dist/locale-provider-BScpm-eC.cjs +2 -0
  169. package/dist/locale-provider-BScpm-eC.cjs.map +1 -0
  170. package/dist/locale-selector-CRC0VBKl.cjs +12 -0
  171. package/dist/locale-selector-CRC0VBKl.cjs.map +1 -0
  172. package/dist/locale-selector-HuzfE0zZ.js +1740 -0
  173. package/dist/locale-selector-HuzfE0zZ.js.map +1 -0
  174. package/dist/map-pin-CHh0xl6i.js +46 -0
  175. package/dist/map-pin-CHh0xl6i.js.map +1 -0
  176. package/dist/map-pin-DGObSZ40.cjs +17 -0
  177. package/dist/map-pin-DGObSZ40.cjs.map +1 -0
  178. package/dist/message-square-B_xLey5D.js +14 -0
  179. package/dist/message-square-B_xLey5D.js.map +1 -0
  180. package/dist/message-square-_69ua8rH.cjs +7 -0
  181. package/dist/message-square-_69ua8rH.cjs.map +1 -0
  182. package/dist/minus-BUFkTM0k.cjs +7 -0
  183. package/dist/{minus-C0uyaz70.cjs.map → minus-BUFkTM0k.cjs.map} +1 -1
  184. package/dist/{minus-CiwV65ZG.js → minus-DJ0tmymW.js} +2 -2
  185. package/dist/{minus-CiwV65ZG.js.map → minus-DJ0tmymW.js.map} +1 -1
  186. package/dist/multi-container-CytCGxsc.cjs +7 -0
  187. package/dist/multi-container-CytCGxsc.cjs.map +1 -0
  188. package/dist/multi-container-DmkgnCJN.js +799 -0
  189. package/dist/multi-container-DmkgnCJN.js.map +1 -0
  190. package/dist/multi-select-Bj_kIDHE.cjs +7 -0
  191. package/dist/multi-select-Bj_kIDHE.cjs.map +1 -0
  192. package/dist/multi-select-CPF7w871.js +224 -0
  193. package/dist/multi-select-CPF7w871.js.map +1 -0
  194. package/dist/pencil-BJULwaDl.cjs +12 -0
  195. package/dist/pencil-BJULwaDl.cjs.map +1 -0
  196. package/dist/pencil-HL0trGIs.js +31 -0
  197. package/dist/pencil-HL0trGIs.js.map +1 -0
  198. package/dist/permission-matrix-BRqw2RPb.js +6128 -0
  199. package/dist/permission-matrix-BRqw2RPb.js.map +1 -0
  200. package/dist/permission-matrix-CqE8q8Hi.cjs +93 -0
  201. package/dist/permission-matrix-CqE8q8Hi.cjs.map +1 -0
  202. package/dist/phone-B0J1dGIE.js +31 -0
  203. package/dist/phone-B0J1dGIE.js.map +1 -0
  204. package/dist/phone-DPA6vucM.cjs +12 -0
  205. package/dist/phone-DPA6vucM.cjs.map +1 -0
  206. package/dist/plus-Bcuujcqd.cjs +7 -0
  207. package/dist/{plus-BsV82JJ5.cjs.map → plus-Bcuujcqd.cjs.map} +1 -1
  208. package/dist/{plus-DxD6rofl.js → plus-D7DMDKb8.js} +2 -2
  209. package/dist/{plus-DxD6rofl.js.map → plus-D7DMDKb8.js.map} +1 -1
  210. package/dist/popover-Bba1ELMX.cjs +2 -0
  211. package/dist/popover-Bba1ELMX.cjs.map +1 -0
  212. package/dist/popover-CZWAuYUL.js +281 -0
  213. package/dist/popover-CZWAuYUL.js.map +1 -0
  214. package/dist/progress-BPpsmZ48.js +218 -0
  215. package/dist/progress-BPpsmZ48.js.map +1 -0
  216. package/dist/progress-BrzjVhWG.cjs +22 -0
  217. package/dist/progress-BrzjVhWG.cjs.map +1 -0
  218. package/dist/providers/index.cjs.js +1 -1
  219. package/dist/providers/index.es.js +1 -1
  220. package/dist/radio-group-B9RM_c7e.js +244 -0
  221. package/dist/radio-group-B9RM_c7e.js.map +1 -0
  222. package/dist/radio-group-_n8TTqNQ.cjs +2 -0
  223. package/dist/radio-group-_n8TTqNQ.cjs.map +1 -0
  224. package/dist/record-dialog-footer-DbH9A6eA.js +2577 -0
  225. package/dist/record-dialog-footer-DbH9A6eA.js.map +1 -0
  226. package/dist/record-dialog-footer-DpDxH5wX.cjs +37 -0
  227. package/dist/record-dialog-footer-DpDxH5wX.cjs.map +1 -0
  228. package/dist/scroll-area-CGNbDUBQ.js +889 -0
  229. package/dist/scroll-area-CGNbDUBQ.js.map +1 -0
  230. package/dist/scroll-area-HsTSI_58.cjs +22 -0
  231. package/dist/scroll-area-HsTSI_58.cjs.map +1 -0
  232. package/dist/select-CEsYpjPi.cjs +2 -0
  233. package/dist/select-CEsYpjPi.cjs.map +1 -0
  234. package/dist/{select-BJpZrtep.js → select-Ce2C2acZ.js} +184 -179
  235. package/dist/select-Ce2C2acZ.js.map +1 -0
  236. package/dist/send-DIkOd-pu.js +21 -0
  237. package/dist/send-DIkOd-pu.js.map +1 -0
  238. package/dist/send-H6HC-rS8.cjs +7 -0
  239. package/dist/send-H6HC-rS8.cjs.map +1 -0
  240. package/dist/shared-inbox-Bv0AgLew.js +702 -0
  241. package/dist/shared-inbox-Bv0AgLew.js.map +1 -0
  242. package/dist/shared-inbox-DWEKfDX3.cjs +22 -0
  243. package/dist/shared-inbox-DWEKfDX3.cjs.map +1 -0
  244. package/dist/sheet-DTimb4SJ.cjs +2 -0
  245. package/dist/sheet-DTimb4SJ.cjs.map +1 -0
  246. package/dist/sheet-DgpAPCAp.js +147 -0
  247. package/dist/sheet-DgpAPCAp.js.map +1 -0
  248. package/dist/{skeleton-Bl6FAxHT.js → skeleton-C_dwS3_6.js} +2 -2
  249. package/dist/{skeleton-Bl6FAxHT.js.map → skeleton-C_dwS3_6.js.map} +1 -1
  250. package/dist/{skeleton-Cb6MWerF.cjs → skeleton-D3YsjVWD.cjs} +2 -2
  251. package/dist/{skeleton-Cb6MWerF.cjs.map → skeleton-D3YsjVWD.cjs.map} +1 -1
  252. package/dist/sparkline-chart-BP4bk24J.js +15881 -0
  253. package/dist/sparkline-chart-BP4bk24J.js.map +1 -0
  254. package/dist/sparkline-chart-D6SLZVjp.cjs +79 -0
  255. package/dist/sparkline-chart-D6SLZVjp.cjs.map +1 -0
  256. package/dist/styles.css +1 -1
  257. package/dist/switch-AEZvZSRV.cjs +2 -0
  258. package/dist/switch-AEZvZSRV.cjs.map +1 -0
  259. package/dist/switch-BF4LLvaU.js +147 -0
  260. package/dist/switch-BF4LLvaU.js.map +1 -0
  261. package/dist/table-2-Bn-YjZ9s.cjs +17 -0
  262. package/dist/table-2-Bn-YjZ9s.cjs.map +1 -0
  263. package/dist/table-2-C7E_N72K.js +52 -0
  264. package/dist/table-2-C7E_N72K.js.map +1 -0
  265. package/dist/textarea-4qZDuQ-C.js +206 -0
  266. package/dist/textarea-4qZDuQ-C.js.map +1 -0
  267. package/dist/textarea-Bq_zyt0L.cjs +2 -0
  268. package/dist/textarea-Bq_zyt0L.cjs.map +1 -0
  269. package/dist/tooltip-Dd7le9EO.cjs +2 -0
  270. package/dist/tooltip-Dd7le9EO.cjs.map +1 -0
  271. package/dist/tooltip-Dee-pNPI.js +338 -0
  272. package/dist/tooltip-Dee-pNPI.js.map +1 -0
  273. package/dist/trash-2-B3EP3JfM.js +18 -0
  274. package/dist/trash-2-B3EP3JfM.js.map +1 -0
  275. package/dist/trash-2-DWEeKlWT.cjs +7 -0
  276. package/dist/trash-2-DWEeKlWT.cjs.map +1 -0
  277. package/dist/{trending-up-BHFXgLWy.js → trending-up-ljWtN4pj.js} +2 -2
  278. package/dist/{trending-up-BHFXgLWy.js.map → trending-up-ljWtN4pj.js.map} +1 -1
  279. package/dist/{trending-up-BBjz_E69.cjs → trending-up-mLgmkp--.cjs} +2 -2
  280. package/dist/{trending-up-BBjz_E69.cjs.map → trending-up-mLgmkp--.cjs.map} +1 -1
  281. package/dist/upload-2tm-XihE.cjs +7 -0
  282. package/dist/upload-2tm-XihE.cjs.map +1 -0
  283. package/dist/upload-C_JDP8O0.js +16 -0
  284. package/dist/upload-C_JDP8O0.js.map +1 -0
  285. package/dist/use-controllable-state-3ATd6Fqd.cjs +2 -0
  286. package/dist/use-controllable-state-3ATd6Fqd.cjs.map +1 -0
  287. package/dist/use-controllable-state-CEa-Zlq6.js +23 -0
  288. package/dist/use-controllable-state-CEa-Zlq6.js.map +1 -0
  289. package/dist/use-formatters-Bb0fX1lW.cjs +2 -0
  290. package/dist/{use-formatters-CObUgipW.cjs.map → use-formatters-Bb0fX1lW.cjs.map} +1 -1
  291. package/dist/{use-formatters-Bgj3JA4i.js → use-formatters-xeMS4gdV.js} +1160 -1165
  292. package/dist/{use-formatters-Bgj3JA4i.js.map → use-formatters-xeMS4gdV.js.map} +1 -1
  293. package/dist/utils/index.cjs.js +1 -1
  294. package/dist/utils/index.es.js +1 -1
  295. package/dist/welcome-card-Ccbl_miQ.js +1007 -0
  296. package/dist/welcome-card-Ccbl_miQ.js.map +1 -0
  297. package/dist/welcome-card-D-ShMkaS.cjs +37 -0
  298. package/dist/welcome-card-D-ShMkaS.cjs.map +1 -0
  299. package/dist/x-BBkgEhUv.js +15 -0
  300. package/dist/x-BBkgEhUv.js.map +1 -0
  301. package/dist/x-D-El5XAY.cjs +7 -0
  302. package/dist/x-D-El5XAY.cjs.map +1 -0
  303. package/package.json +20 -2
  304. package/dist/avatar-BT_SPwFW.cjs +0 -18
  305. package/dist/avatar-BT_SPwFW.cjs.map +0 -1
  306. package/dist/avatar-C5-ZWIqT.js +0 -305
  307. package/dist/avatar-C5-ZWIqT.js.map +0 -1
  308. package/dist/calendar-BF5drX5u.cjs +0 -12
  309. package/dist/calendar-BF5drX5u.cjs.map +0 -1
  310. package/dist/calendar-DgnhzEfp.js.map +0 -1
  311. package/dist/checkbox-BY2zxQVv.js.map +0 -1
  312. package/dist/checkbox-CL6u7vL6.cjs +0 -2
  313. package/dist/checkbox-CL6u7vL6.cjs.map +0 -1
  314. package/dist/chevron-down-BiUlxZA-.js +0 -14
  315. package/dist/chevron-down-BiUlxZA-.js.map +0 -1
  316. package/dist/chevron-down-Ce0kqXiD.cjs +0 -7
  317. package/dist/chevron-down-Ce0kqXiD.cjs.map +0 -1
  318. package/dist/chevron-up-C3RClqXD.cjs +0 -7
  319. package/dist/createLucideIcon-BC8wu-bu.js +0 -80
  320. package/dist/createLucideIcon-BC8wu-bu.js.map +0 -1
  321. package/dist/createLucideIcon-Cv8nC2E9.cjs +0 -22
  322. package/dist/createLucideIcon-Cv8nC2E9.cjs.map +0 -1
  323. package/dist/filter-tags-DoRzXjuY.cjs +0 -48
  324. package/dist/filter-tags-DoRzXjuY.cjs.map +0 -1
  325. package/dist/filter-tags-zEQmRhEU.js +0 -2712
  326. package/dist/filter-tags-zEQmRhEU.js.map +0 -1
  327. package/dist/full-calendar-5Z4JSj8g.js +0 -3551
  328. package/dist/full-calendar-5Z4JSj8g.js.map +0 -1
  329. package/dist/full-calendar-DjAvCfuE.cjs +0 -23
  330. package/dist/full-calendar-DjAvCfuE.cjs.map +0 -1
  331. package/dist/global-search-BbZfc-VL.js +0 -1216
  332. package/dist/global-search-BbZfc-VL.js.map +0 -1
  333. package/dist/global-search-Bd74_wPV.cjs +0 -22
  334. package/dist/global-search-Bd74_wPV.cjs.map +0 -1
  335. package/dist/index-D2U2F80P.cjs +0 -2
  336. package/dist/index-DG0KV-sw.cjs +0 -11
  337. package/dist/index-DG0KV-sw.cjs.map +0 -1
  338. package/dist/index-XnFSmCuh.js +0 -299
  339. package/dist/index-XnFSmCuh.js.map +0 -1
  340. package/dist/input-BgPy-4Qu.js +0 -3658
  341. package/dist/input-BgPy-4Qu.js.map +0 -1
  342. package/dist/input-Cfr2WB-P.cjs +0 -47
  343. package/dist/input-Cfr2WB-P.cjs.map +0 -1
  344. package/dist/locale-provider-BojNdf1Y.cjs +0 -2
  345. package/dist/locale-provider-BojNdf1Y.cjs.map +0 -1
  346. package/dist/locale-provider-DzBeb-X3.js +0 -1013
  347. package/dist/locale-provider-DzBeb-X3.js.map +0 -1
  348. package/dist/locale-selector-BD1IWk6X.cjs +0 -22
  349. package/dist/locale-selector-BD1IWk6X.cjs.map +0 -1
  350. package/dist/locale-selector-DLRSyVye.js +0 -1772
  351. package/dist/locale-selector-DLRSyVye.js.map +0 -1
  352. package/dist/minus-C0uyaz70.cjs +0 -7
  353. package/dist/multi-container-BZia7HCU.js +0 -748
  354. package/dist/multi-container-BZia7HCU.js.map +0 -1
  355. package/dist/multi-container-BdNbgtPZ.cjs +0 -7
  356. package/dist/multi-container-BdNbgtPZ.cjs.map +0 -1
  357. package/dist/pipeline-Dh052Dvj.cjs +0 -27
  358. package/dist/pipeline-Dh052Dvj.cjs.map +0 -1
  359. package/dist/pipeline-DqWvleNy.js +0 -1076
  360. package/dist/pipeline-DqWvleNy.js.map +0 -1
  361. package/dist/plus-BsV82JJ5.cjs +0 -7
  362. package/dist/popover-BgLxmm1z.cjs +0 -7
  363. package/dist/popover-BgLxmm1z.cjs.map +0 -1
  364. package/dist/popover-PI9jbhnS.js +0 -775
  365. package/dist/popover-PI9jbhnS.js.map +0 -1
  366. package/dist/progress-CTTt_CP3.js +0 -260
  367. package/dist/progress-CTTt_CP3.js.map +0 -1
  368. package/dist/progress-CTWb7X1Q.cjs +0 -37
  369. package/dist/progress-CTWb7X1Q.cjs.map +0 -1
  370. package/dist/scroll-area-A3jGu-Ta.js +0 -974
  371. package/dist/scroll-area-A3jGu-Ta.js.map +0 -1
  372. package/dist/scroll-area-DzDnWIYJ.cjs +0 -12
  373. package/dist/scroll-area-DzDnWIYJ.cjs.map +0 -1
  374. package/dist/select-BJpZrtep.js.map +0 -1
  375. package/dist/select-Ii8HRuXa.cjs +0 -2
  376. package/dist/select-Ii8HRuXa.cjs.map +0 -1
  377. package/dist/separator-BzcDE0Ei.cjs +0 -2
  378. package/dist/separator-BzcDE0Ei.cjs.map +0 -1
  379. package/dist/separator-DyarVo1-.js +0 -396
  380. package/dist/separator-DyarVo1-.js.map +0 -1
  381. package/dist/sheet-DPSdOoE6.js +0 -84
  382. package/dist/sheet-DPSdOoE6.js.map +0 -1
  383. package/dist/sheet-XtjvbEMq.cjs +0 -2
  384. package/dist/sheet-XtjvbEMq.cjs.map +0 -1
  385. package/dist/sparkline-chart-CeCDeMNk.cjs +0 -102
  386. package/dist/sparkline-chart-CeCDeMNk.cjs.map +0 -1
  387. package/dist/sparkline-chart-DUS4CoW_.js +0 -19787
  388. package/dist/sparkline-chart-DUS4CoW_.js.map +0 -1
  389. package/dist/use-formatters-CObUgipW.cjs +0 -2
  390. package/dist/welcome-card-CNuEa6Ck.cjs +0 -67
  391. package/dist/welcome-card-CNuEa6Ck.cjs.map +0 -1
  392. package/dist/welcome-card-Cp6t6G3j.js +0 -1041
  393. package/dist/welcome-card-Cp6t6G3j.js.map +0 -1
@@ -0,0 +1,37 @@
1
+ "use strict";const e=require("react/jsx-runtime"),se=require("react"),b=require("./index-Dy_9oyP3.cjs"),ps=require("./use-mobile-DY7TJ5lx.cjs"),U=require("./use-controllable-state-3ATd6Fqd.cjs"),V=require("./sheet-DTimb4SJ.cjs"),S=require("./scroll-area-HsTSI_58.cjs"),L=require("./sortable.esm-5DsiICDg.cjs"),k=require("./button-CPuCii0R.cjs"),X=require("./input-UBp7V7li.cjs"),q=require("./badge-BZcdBG5J.cjs"),C=require("./dropdown-menu-ejikFvg2.cjs"),te=require("./card-CToWUN1K.cjs"),ae=require("./checkbox-BmugT50K.cjs"),G=require("./use-formatters-Bb0fX1lW.cjs"),ne=require("./table-2-Bn-YjZ9s.cjs"),Z=require("./calendar-BH-AuyiB.cjs"),xe=require("./pencil-BJULwaDl.cjs"),re=require("./plus-Bcuujcqd.cjs"),le=require("./ellipsis-Dk7Wfc4i.cjs"),P=require("./locale-provider-BScpm-eC.cjs"),R=require("./textarea-Bq_zyt0L.cjs"),H=require("./avatar-Cl38Ye4J.cjs"),K=require("./phone-DPA6vucM.cjs"),ce=require("./message-square-_69ua8rH.cjs"),we=require("./chevron-right-D-TdAZ7l.cjs"),De=require("./send-H6HC-rS8.cjs"),he=require("./x-D-El5XAY.cjs"),ue=require("./popover-Bba1ELMX.cjs"),gs=require("./external-link-CGBqsrbm.cjs"),z=require("./dialog-Cr9SYCaD.cjs"),fs=require("./label-F0zGAiI2.cjs"),T=require("./select-CEsYpjPi.cjs"),js=require("./minus-BUFkTM0k.cjs"),ee=require("./accordion-BcwB0wwz.cjs"),bs=require("./loader-circle-IaJKvYsP.cjs");function vs(s){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(s){for(const a in s)if(a!=="default"){const o=Object.getOwnPropertyDescriptor(s,a);Object.defineProperty(t,a,o.get?o:{enumerable:!0,get:()=>s[a]})}}return t.default=s,Object.freeze(t)}const p=vs(se);/**
2
+ * @license lucide-react v0.441.0 - ISC
3
+ *
4
+ * This source code is licensed under the ISC license.
5
+ * See the LICENSE file in the root directory of this source tree.
6
+ */const ke=S.createLucideIcon("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/**
7
+ * @license lucide-react v0.441.0 - ISC
8
+ *
9
+ * This source code is licensed under the ISC license.
10
+ * See the LICENSE file in the root directory of this source tree.
11
+ */const Ns=S.createLucideIcon("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/**
12
+ * @license lucide-react v0.441.0 - ISC
13
+ *
14
+ * This source code is licensed under the ISC license.
15
+ * See the LICENSE file in the root directory of this source tree.
16
+ */const ys=S.createLucideIcon("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
17
+ * @license lucide-react v0.441.0 - ISC
18
+ *
19
+ * This source code is licensed under the ISC license.
20
+ * See the LICENSE file in the root directory of this source tree.
21
+ */const oe=S.createLucideIcon("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
22
+ * @license lucide-react v0.441.0 - ISC
23
+ *
24
+ * This source code is licensed under the ISC license.
25
+ * See the LICENSE file in the root directory of this source tree.
26
+ */const ws=S.createLucideIcon("LayoutGrid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]);/**
27
+ * @license lucide-react v0.441.0 - ISC
28
+ *
29
+ * This source code is licensed under the ISC license.
30
+ * See the LICENSE file in the root directory of this source tree.
31
+ */const Ce=S.createLucideIcon("Link2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);/**
32
+ * @license lucide-react v0.441.0 - ISC
33
+ *
34
+ * This source code is licensed under the ISC license.
35
+ * See the LICENSE file in the root directory of this source tree.
36
+ */const Ds=S.createLucideIcon("List",[["line",{x1:"8",x2:"21",y1:"6",y2:"6",key:"7ey8pc"}],["line",{x1:"8",x2:"21",y1:"12",y2:"12",key:"rjfblc"}],["line",{x1:"8",x2:"21",y1:"18",y2:"18",key:"c3b1m8"}],["line",{x1:"3",x2:"3.01",y1:"6",y2:"6",key:"1g7gq3"}],["line",{x1:"3",x2:"3.01",y1:"12",y2:"12",key:"1pjlvk"}],["line",{x1:"3",x2:"3.01",y1:"18",y2:"18",key:"28t2mc"}]]),Se=p.forwardRef(({className:s,children:t,...a},o)=>e.jsx("div",{ref:o,className:b.cn("flex min-h-screen w-full flex-col bg-background",s),...a,children:t}));Se.displayName="AppShell";const Re=p.forwardRef(({className:s,...t},a)=>e.jsx("header",{ref:a,className:b.cn("sticky top-0 z-50 flex h-16 items-center gap-4 border-b bg-background px-4 md:px-6",s),...t}));Re.displayName="AppShellHeader";const Me=p.forwardRef(({className:s,...t},a)=>e.jsx("main",{ref:a,className:b.cn("flex flex-1 flex-col gap-4 p-4 md:gap-8 md:p-6",s),...t}));Me.displayName="AppShellMain";const Te=p.forwardRef(({className:s,...t},a)=>e.jsx("footer",{ref:a,className:b.cn("border-t bg-background px-4 py-6 md:px-6",s),...t}));Te.displayName="AppShellFooter";const Pe=p.forwardRef(({className:s,heading:t,description:a,actions:o,children:r,...n},l)=>e.jsxs("div",{ref:l,className:b.cn("flex flex-col gap-4 md:flex-row md:items-center md:justify-between",s),...n,children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("h1",{className:"text-2xl font-bold tracking-tight md:text-3xl",children:t}),a&&e.jsx("p",{className:"text-muted-foreground",children:a})]}),o&&e.jsx("div",{className:"flex items-center gap-2",children:o}),r]}));Pe.displayName="PageHeader";const Ie=p.createContext(null);function pe(){const s=p.useContext(Ie);if(!s)throw new Error("useDashboardLayout must be used within a DashboardLayout.");return s}const Ae=p.forwardRef(({className:s,children:t,sidebarOpen:a,onSidebarOpenChange:o,sidebarCollapsed:r,onSidebarCollapsedChange:n,defaultSidebarOpen:l=!0,defaultSidebarCollapsed:i=!1,sidebarWidth:m="16rem",sidebarCollapsedWidth:h="4rem",...j},u)=>{const d=ps.useIsMobile(),[g,f]=U.useControllableState({value:a,defaultValue:l,onChange:o}),[v,N]=U.useControllableState({value:r,defaultValue:i,onChange:n}),c=p.useCallback(()=>{d?f(y=>!y):N(y=>!y)},[d,N,f]);p.useEffect(()=>{const y=D=>{D.key==="b"&&(D.metaKey||D.ctrlKey)&&(D.preventDefault(),c())};return window.addEventListener("keydown",y),()=>window.removeEventListener("keydown",y)},[c]);const x=p.useMemo(()=>({sidebarOpen:g,setSidebarOpen:f,sidebarCollapsed:v,setSidebarCollapsed:N,isMobile:d,toggleSidebar:c}),[g,f,v,N,d,c]);return e.jsx(Ie.Provider,{value:x,children:e.jsx("div",{ref:u,style:{"--sidebar-width":m,"--sidebar-collapsed-width":h},className:b.cn("flex min-h-screen w-full bg-background",s),...j,children:t})})});Ae.displayName="DashboardLayout";const Le=p.forwardRef(({className:s,children:t,...a},o)=>{const{sidebarOpen:r,setSidebarOpen:n,sidebarCollapsed:l,isMobile:i}=pe();return i?e.jsx(V.Sheet,{open:r,onOpenChange:n,children:e.jsx(V.SheetContent,{side:"left",className:"w-[var(--sidebar-width)] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",children:e.jsx("aside",{className:"flex h-full w-full flex-col",children:t})})}):e.jsx("aside",{ref:o,"data-collapsed":l,className:b.cn("fixed inset-y-0 left-0 z-30 flex h-screen flex-col border-r bg-sidebar text-sidebar-foreground transition-[width] duration-200 ease-in-out",l?"w-[var(--sidebar-collapsed-width)]":"w-[var(--sidebar-width)]",s),...a,children:t})});Le.displayName="DashboardSidebar";const Fe=p.forwardRef(({className:s,children:t,...a},o)=>{const{sidebarCollapsed:r,isMobile:n}=pe();return e.jsx("div",{ref:o,className:b.cn("flex flex-1 flex-col transition-[margin-left] duration-200 ease-in-out",!n&&(r?"ml-[var(--sidebar-collapsed-width)]":"ml-[var(--sidebar-width)]"),s),...a,children:t})});Fe.displayName="DashboardContent";const Ee=p.forwardRef(({className:s,children:t,...a},o)=>e.jsx("header",{ref:o,className:b.cn("sticky top-0 z-20 flex h-16 items-center gap-4 border-b bg-background px-4 md:px-6",s),...a,children:t}));Ee.displayName="DashboardHeader";const Be=p.forwardRef(({className:s,children:t,...a},o)=>e.jsx("main",{ref:o,className:b.cn("flex-1 overflow-auto p-4 md:p-6",s),...a,children:t}));Be.displayName="DashboardMain";const qe=p.forwardRef(({className:s,children:t,...a},o)=>e.jsx("footer",{ref:o,className:b.cn("border-t bg-background px-4 py-4 md:px-6",s),...a,children:t}));qe.displayName="DashboardFooter";const ks={sm:"sm:max-w-[360px]",md:"sm:max-w-[460px]",lg:"sm:max-w-[620px]"},ze=p.forwardRef(({open:s,onOpenChange:t,size:a="md",children:o,className:r},n)=>e.jsx(V.Sheet,{open:s,onOpenChange:t,children:e.jsx(V.SheetContent,{ref:n,side:"right",className:b.cn("flex w-full flex-col gap-0 p-0",ks[a],r),children:e.jsx(S.ScrollArea,{className:"flex-1",children:e.jsx("div",{className:"flex flex-col",children:o})})})}));ze.displayName="DashboardRightPanel";const Cs={low:"bg-muted text-muted-foreground",medium:"bg-warning/15 text-warning",high:"bg-destructive/15 text-destructive"},Oe=p.createContext(null);function $(){const s=p.useContext(Oe);if(!s)throw new Error("usePipeline must be used within a Pipeline component");return s}const Ve=p.forwardRef(({className:s,stages:t,items:a,defaultView:o="kanban",view:r,onViewChange:n,selectedItems:l,defaultSelectedItems:i=[],onSelectedItemsChange:m,searchQuery:h,defaultSearchQuery:j="",onSearchQueryChange:u,groupBy:d,defaultGroupBy:g="",onGroupByChange:f,onItemMove:v,onItemClick:N,onItemAdd:c,onItemEdit:x,onItemDelete:y,children:D,..._},F)=>{const[Q,w]=U.useControllableState({value:r,defaultValue:o,onChange:n}),[I,M]=U.useControllableState({value:l,defaultValue:i,onChange:m}),[E,B]=U.useControllableState({value:h,defaultValue:j,onChange:u}),[ie,W]=U.useControllableState({value:d,defaultValue:g,onChange:A=>f==null?void 0:f(A||void 0)}),O=ie||void 0,J=p.useMemo(()=>{if(!E)return a;const A=E.toLowerCase();return a.filter(me=>{var ve,Ne;return me.title.toLowerCase().includes(A)||((ve=me.company)==null?void 0:ve.toLowerCase().includes(A))||((Ne=me.owner)==null?void 0:Ne.name.toLowerCase().includes(A))})},[a,E]),de=p.useMemo(()=>({view:Q,setView:A=>w(A),stages:t,items:J,selectedItems:I,setSelectedItems:A=>M(A),onItemMove:v,onItemClick:N,onItemAdd:c,onItemEdit:x,onItemDelete:y,searchQuery:E,setSearchQuery:A=>B(A),groupBy:O,setGroupBy:A=>W(A??"")}),[Q,t,J,I,E,O,v,N,c,x,y,w,M,B,W]);return e.jsx(Oe.Provider,{value:de,children:e.jsx("div",{ref:F,className:b.cn("flex h-full flex-col",s),..._,children:D})})});Ve.displayName="Pipeline";const He=p.forwardRef(({className:s,showViewSelector:t=!0,showSearch:a=!0,showAddButton:o=!0,addButtonLabel:r,onAdd:n,title:l,actions:i,...m},h)=>{const{view:j,setView:u,searchQuery:d,setSearchQuery:g,selectedItems:f}=$(),{t:v}=G.useFormatters(),N=[{value:"kanban",icon:e.jsx(ws,{className:"h-4 w-4"}),label:v("pipeline.kanban")},{value:"list",icon:e.jsx(Ds,{className:"h-4 w-4"}),label:v("calendar.agenda")},{value:"table",icon:e.jsx(ne.Table2,{className:"h-4 w-4"}),label:v("pipeline.table")},{value:"timeline",icon:e.jsx(Z.Calendar,{className:"h-4 w-4"}),label:v("pipeline.timeline")}];return e.jsxs("div",{ref:h,className:b.cn("flex flex-wrap items-center justify-between gap-4 border-b bg-background p-4",s),...m,children:[e.jsxs("div",{className:"flex items-center gap-4",children:[l&&e.jsx("h2",{className:"text-lg font-semibold",children:l}),f.length>0&&e.jsx(q.Badge,{variant:"secondary",children:v("pipeline.selected",{count:f.length})})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[a&&e.jsxs("div",{className:"relative",children:[e.jsx(C.Search,{className:"absolute left-2.5 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),e.jsx(X.Input,{placeholder:v("common.search"),value:d,onChange:c=>g(c.target.value),className:"h-9 w-[200px] pl-8"})]}),t&&e.jsx("div",{className:"flex items-center rounded-md border bg-muted/50 p-1",children:N.map(c=>e.jsx(k.Button,{variant:j===c.value?"secondary":"ghost",size:"sm",className:"h-7 px-2",onClick:()=>u(c.value),title:c.label,children:c.icon},c.value))}),e.jsxs(k.Button,{variant:"outline",size:"sm",className:"h-9",children:[e.jsx(xe.Filter,{className:"mr-2 h-4 w-4"}),v("common.filter")]}),i,o&&e.jsxs(k.Button,{size:"sm",className:"h-9",onClick:n,children:[e.jsx(re.Plus,{className:"mr-2 h-4 w-4"}),r||v("common.create")]})]})]})});He.displayName="PipelineHeader";const _e=p.forwardRef(({className:s,children:t,...a},o)=>{const{view:r}=$();return e.jsx("div",{ref:o,className:b.cn("flex-1 overflow-hidden",s),...a,children:t||e.jsxs(e.Fragment,{children:[r==="kanban"&&e.jsx(ge,{}),r==="list"&&e.jsx(fe,{}),r==="table"&&e.jsx(je,{}),r==="timeline"&&e.jsx(be,{})]})})});_e.displayName="PipelineContent";const Ss=p.memo(function({item:t,stageId:a,renderItem:o,defaultRenderItem:r,onItemClick:n}){const{attributes:l,listeners:i,setNodeRef:m,transform:h,transition:j,isDragging:u}=L.useSortable({id:t.id,data:{type:"item",item:t,stageId:a}}),d={transform:L.CSS.Transform.toString(h),transition:j,opacity:u?.5:1,cursor:"grab"};return e.jsx("div",{ref:m,style:d,...l,...i,onClick:g=>{g.stopPropagation(),n==null||n(t)},children:o?o(t,a):r(t)})}),Rs=p.memo(function({stage:t,items:a,columnWidth:o,showAddButton:r,onItemAdd:n,onItemClick:l,renderItem:i,defaultRenderItem:m,getStageTotal:h,formatCurrency:j,t:u}){const d=p.useMemo(()=>a.map(f=>f.id),[a]),g=t.maxItems!==void 0&&a.length>t.maxItems;return e.jsxs("div",{className:"flex shrink-0 flex-col rounded-lg bg-muted/30",style:{width:o},children:[t.color&&e.jsx("div",{className:"h-[3px] rounded-t-lg",style:{backgroundColor:t.color}}),e.jsxs("div",{className:"flex items-center justify-between p-3 border-b",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[t.color&&e.jsx("div",{className:"h-3 w-3 rounded-full",style:{backgroundColor:t.color}}),e.jsx("h3",{className:"text-sm font-semibold",children:t.name}),e.jsxs(q.Badge,{variant:g?"destructive":"secondary",className:"text-xs",children:[a.length,t.maxItems!==void 0?`/${t.maxItems}`:""]})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[r&&n&&e.jsx(k.Button,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:()=>n(t.id),children:e.jsx(re.Plus,{className:"h-4 w-4"})}),e.jsxs(C.DropdownMenu,{children:[e.jsx(C.DropdownMenuTrigger,{asChild:!0,children:e.jsx(k.Button,{variant:"ghost",size:"icon",className:"h-6 w-6",children:e.jsx(le.Ellipsis,{className:"h-4 w-4"})})}),e.jsxs(C.DropdownMenuContent,{align:"end",children:[e.jsx(C.DropdownMenuItem,{children:u("common.edit")}),e.jsx(C.DropdownMenuSeparator,{}),e.jsx(C.DropdownMenuItem,{className:"text-destructive",children:u("common.delete")})]})]})]})]}),e.jsxs("div",{className:"px-3 py-2 text-xs text-muted-foreground border-b",children:[u("deal.value"),":"," ",e.jsx("span",{className:"font-medium text-foreground",children:j(h(t.id),{minimumFractionDigits:0,maximumFractionDigits:0})})]}),e.jsx(S.ScrollArea,{className:"flex-1",children:e.jsxs("div",{className:"flex flex-col gap-2 p-2 min-h-[100px]",children:[e.jsx(L.SortableContext,{items:d,strategy:L.verticalListSortingStrategy,children:a.map(f=>e.jsx(Ss,{item:f,stageId:t.id,renderItem:i,defaultRenderItem:m,onItemClick:l},f.id))}),a.length===0&&e.jsx("div",{className:"flex flex-col items-center justify-center rounded-lg border-2 border-dashed border-muted-foreground/20 py-8 text-center transition-colors",children:e.jsx("p",{className:"text-sm text-muted-foreground",children:u("common.noData")})})]})})]})}),ge=p.forwardRef(({className:s,columnWidth:t=320,showAddButton:a=!0,renderItem:o,...r},n)=>{const{stages:l,items:i,onItemMove:m,onItemClick:h,onItemAdd:j}=$(),{formatCurrency:u,formatDate:d,t:g}=G.useFormatters(),[f,v]=p.useState(null),N=L.useSensors(L.useSensor(L.PointerSensor,{activationConstraint:{delay:150,tolerance:5}}),L.useSensor(L.KeyboardSensor,{coordinateGetter:L.sortableKeyboardCoordinates})),c=p.useMemo(()=>{const w={};return l.forEach(I=>{w[I.id]=i.filter(M=>M.stageId===I.id)}),w},[l,i]),x=p.useCallback(w=>{var I;return((I=c[w])==null?void 0:I.reduce((M,E)=>M+(E.value||0),0))||0},[c]),y=p.useCallback(w=>e.jsx(te.Card,{className:"cursor-pointer transition-all hover:shadow-md",children:e.jsxs(te.CardContent,{className:"p-3 space-y-2",children:[e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("h4",{className:"font-medium text-sm truncate",children:w.title}),w.company&&e.jsx("p",{className:"text-xs text-muted-foreground truncate",children:w.company})]}),w.priority&&e.jsx(q.Badge,{className:b.cn("text-[10px] ml-2",Cs[w.priority]),children:w.priority})]}),w.value!==void 0&&e.jsx("div",{className:"text-sm font-semibold",children:u(w.value,{minimumFractionDigits:0,maximumFractionDigits:0})}),e.jsxs("div",{className:"flex items-center justify-between text-xs text-muted-foreground",children:[w.dueDate&&e.jsx("span",{children:d(w.dueDate)}),w.owner&&e.jsx("span",{className:"truncate max-w-[100px]",children:w.owner.name})]}),w.probability!==void 0&&e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"flex-1 h-1.5 bg-muted rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full bg-primary rounded-full",style:{width:`${w.probability}%`}})}),e.jsxs("span",{className:"text-[10px] text-muted-foreground",children:[w.probability,"%"]})]})]})}),[u,d]),D=p.useCallback(w=>{const{active:I}=w,M=I.data.current;M!=null&&M.item&&v(M.item)},[]),_=p.useCallback(w=>{},[]),F=p.useCallback(w=>{const{active:I,over:M}=w;if(v(null),!M)return;const E=I.data.current,B=M.data.current;if(!E)return;const ie=E.item,W=E.stageId;let O=null;if((B==null?void 0:B.type)==="item")O=B.stageId;else if((B==null?void 0:B.type)==="column")O=B.stageId;else{const J=i.find(de=>de.id===M.id);J&&(O=J.stageId)}O&&W!==O&&(m==null||m(ie.id,W,O))},[i,m]),Q=p.useMemo(()=>[...l].sort((w,I)=>w.order-I.order),[l]);return e.jsx("div",{ref:n,className:b.cn("h-full",s),...r,children:e.jsxs(L.DndContext,{sensors:N,collisionDetection:L.closestCorners,onDragStart:D,onDragOver:_,onDragEnd:F,children:[e.jsxs(S.ScrollArea,{className:"h-full",children:[e.jsx("div",{className:"flex gap-4 p-4 h-full",children:Q.map(w=>e.jsx(Rs,{stage:w,items:c[w.id]||[],columnWidth:t,showAddButton:a,onItemAdd:j,onItemClick:h,renderItem:o,defaultRenderItem:y,getStageTotal:x,formatCurrency:u,t:g},w.id))}),e.jsx(S.ScrollBar,{orientation:"horizontal"})]}),e.jsx(L.DragOverlay,{dropAnimation:{duration:200,easing:"cubic-bezier(0.18, 0.67, 0.6, 1.22)"},children:f?e.jsx("div",{className:"opacity-90 shadow-xl rotate-1 scale-[1.02]",children:o?o(f,f.stageId):y(f)}):null})]})})});ge.displayName="PipelineKanban";const fe=p.forwardRef(({className:s,renderItem:t,...a},o)=>{const{stages:r,items:n,selectedItems:l,setSelectedItems:i,onItemClick:m,onItemEdit:h,onItemDelete:j}=$(),{formatCurrency:u,formatDate:d,t:g}=G.useFormatters(),f=p.useMemo(()=>{const x={};return r.forEach(y=>{x[y.id]=n.filter(D=>D.stageId===y.id)}),x},[r,n]),v=x=>{l.includes(x)?i(l.filter(y=>y!==x)):i([...l,x])},N={low:"bg-muted text-muted-foreground",medium:"bg-warning/15 text-warning",high:"bg-destructive/15 text-destructive"},c=(x,y)=>e.jsxs("div",{className:b.cn("flex items-center gap-4 rounded-lg border bg-card p-4 transition-colors hover:bg-muted/50",l.includes(x.id)&&"bg-muted/50 border-primary"),children:[e.jsx(ae.Checkbox,{checked:l.includes(x.id),onCheckedChange:()=>v(x.id)}),e.jsx(ne.GripVertical,{className:"h-4 w-4 text-muted-foreground cursor-grab"}),e.jsxs("div",{className:"flex-1 min-w-0 cursor-pointer",onClick:()=>m==null?void 0:m(x),children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx("h4",{className:"font-medium truncate",children:x.title}),x.priority&&e.jsx(q.Badge,{className:b.cn("text-xs",N[x.priority]),children:x.priority})]}),e.jsxs("div",{className:"flex items-center gap-4 text-sm text-muted-foreground",children:[x.company&&e.jsx("span",{children:x.company}),x.owner&&e.jsx("span",{children:x.owner.name})]})]}),e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[y.color&&e.jsx("div",{className:"h-2 w-2 rounded-full",style:{backgroundColor:y.color}}),e.jsx("span",{className:"text-sm",children:y.name})]}),x.value!==void 0&&e.jsx("div",{className:"font-semibold min-w-[100px] text-right",children:u(x.value,{minimumFractionDigits:0,maximumFractionDigits:0})}),x.dueDate&&e.jsx("div",{className:"text-sm text-muted-foreground min-w-[100px]",children:d(x.dueDate)}),e.jsxs(C.DropdownMenu,{children:[e.jsx(C.DropdownMenuTrigger,{asChild:!0,children:e.jsx(k.Button,{variant:"ghost",size:"icon",className:"h-8 w-8",children:e.jsx(le.Ellipsis,{className:"h-4 w-4"})})}),e.jsxs(C.DropdownMenuContent,{align:"end",children:[e.jsx(C.DropdownMenuItem,{onClick:()=>h==null?void 0:h(x),children:g("common.edit")}),e.jsx(C.DropdownMenuSeparator,{}),e.jsx(C.DropdownMenuItem,{className:"text-destructive",onClick:()=>j==null?void 0:j(x.id),children:g("common.delete")})]})]})]})]});return e.jsx("div",{ref:o,className:b.cn("h-full",s),...a,children:e.jsx(S.ScrollArea,{className:"h-full",children:e.jsx("div",{className:"p-4 space-y-6",children:r.sort((x,y)=>x.order-y.order).map(x=>{var y,D,_;return e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[x.color&&e.jsx("div",{className:"h-3 w-3 rounded-full",style:{backgroundColor:x.color}}),e.jsx("h3",{className:"font-semibold",children:x.name}),e.jsx(q.Badge,{variant:"secondary",children:((y=f[x.id])==null?void 0:y.length)||0})]}),e.jsxs("div",{className:"space-y-2",children:[(D=f[x.id])==null?void 0:D.map(F=>t?e.jsx("div",{children:t(F)},F.id):e.jsx("div",{children:c(F,x)},F.id)),((_=f[x.id])==null?void 0:_.length)===0&&e.jsx("div",{className:"py-4 text-center text-sm text-muted-foreground border rounded-lg",children:g("common.noData")})]})]},x.id)})})})})});fe.displayName="PipelineList";const je=p.forwardRef(({className:s,...t},a)=>{const{stages:o,items:r,selectedItems:n,setSelectedItems:l,onItemClick:i,onItemEdit:m,onItemDelete:h}=$(),{formatCurrency:j,formatDate:u,t:d}=G.useFormatters(),g=p.useMemo(()=>{const c={};return o.forEach(x=>{c[x.id]=x}),c},[o]),f=()=>{n.length===r.length?l([]):l(r.map(c=>c.id))},v=c=>{n.includes(c)?l(n.filter(x=>x!==c)):l([...n,c])},N={low:"bg-muted text-muted-foreground",medium:"bg-warning/15 text-warning",high:"bg-destructive/15 text-destructive"};return e.jsx("div",{ref:a,className:b.cn("h-full",s),...t,children:e.jsx(S.ScrollArea,{className:"h-full",children:e.jsx("div",{className:"p-4",children:e.jsx("div",{className:"rounded-lg border",children:e.jsxs("table",{className:"w-full",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b bg-muted/50",children:[e.jsx("th",{className:"w-[40px] p-3",children:e.jsx(ae.Checkbox,{checked:n.length===r.length&&r.length>0,onCheckedChange:f})}),e.jsx("th",{className:"text-left p-3 font-medium text-sm",children:d("pipeline.title")}),e.jsx("th",{className:"text-left p-3 font-medium text-sm",children:d("pipeline.company")}),e.jsx("th",{className:"text-left p-3 font-medium text-sm",children:d("deal.stage")}),e.jsx("th",{className:"text-right p-3 font-medium text-sm",children:d("deal.value")}),e.jsx("th",{className:"text-center p-3 font-medium text-sm",children:d("deal.probability")}),e.jsx("th",{className:"text-left p-3 font-medium text-sm",children:d("pipeline.owner")}),e.jsx("th",{className:"text-left p-3 font-medium text-sm",children:d("deal.closeDate")}),e.jsx("th",{className:"text-left p-3 font-medium text-sm",children:d("pipeline.priority")}),e.jsx("th",{className:"w-[60px] p-3"})]})}),e.jsxs("tbody",{children:[r.map(c=>{var y;const x=g[c.stageId];return e.jsxs("tr",{className:b.cn("border-b transition-colors hover:bg-muted/50",n.includes(c.id)&&"bg-muted/50"),children:[e.jsx("td",{className:"p-3",children:e.jsx(ae.Checkbox,{checked:n.includes(c.id),onCheckedChange:()=>v(c.id)})}),e.jsx("td",{className:"p-3 font-medium cursor-pointer",onClick:()=>i==null?void 0:i(c),children:c.title}),e.jsx("td",{className:"p-3 text-muted-foreground",children:c.company}),e.jsx("td",{className:"p-3",children:e.jsxs("div",{className:"flex items-center gap-2",children:[(x==null?void 0:x.color)&&e.jsx("div",{className:"h-2 w-2 rounded-full",style:{backgroundColor:x.color}}),e.jsx("span",{children:x==null?void 0:x.name})]})}),e.jsx("td",{className:"p-3 text-right font-medium",children:c.value!==void 0?j(c.value,{minimumFractionDigits:0,maximumFractionDigits:0}):"-"}),e.jsx("td",{className:"p-3 text-center",children:c.probability!==void 0?`${c.probability}%`:"-"}),e.jsx("td",{className:"p-3 text-muted-foreground",children:((y=c.owner)==null?void 0:y.name)||"-"}),e.jsx("td",{className:"p-3 text-muted-foreground",children:c.dueDate?u(c.dueDate):"-"}),e.jsx("td",{className:"p-3",children:c.priority&&e.jsx(q.Badge,{className:b.cn("text-xs",N[c.priority]),children:c.priority})}),e.jsx("td",{className:"p-3",children:e.jsxs(C.DropdownMenu,{children:[e.jsx(C.DropdownMenuTrigger,{asChild:!0,children:e.jsx(k.Button,{variant:"ghost",size:"icon",className:"h-8 w-8",children:e.jsx(le.Ellipsis,{className:"h-4 w-4"})})}),e.jsxs(C.DropdownMenuContent,{align:"end",children:[e.jsx(C.DropdownMenuItem,{onClick:()=>m==null?void 0:m(c),children:d("common.edit")}),e.jsx(C.DropdownMenuSeparator,{}),e.jsx(C.DropdownMenuItem,{className:"text-destructive",onClick:()=>h==null?void 0:h(c.id),children:d("common.delete")})]})]})})]},c.id)}),r.length===0&&e.jsx("tr",{children:e.jsx("td",{colSpan:10,className:"p-8 text-center text-muted-foreground",children:d("common.noData")})})]})]})})})})})});je.displayName="PipelineTable";const be=p.forwardRef(({className:s,...t},a)=>{const{stages:o,items:r,onItemClick:n}=$(),{formatCurrency:l,formatDate:i,t:m}=G.useFormatters(),h=p.useMemo(()=>{const v={};return new Date().setHours(0,0,0,0),r.filter(c=>c.dueDate).sort((c,x)=>{const y=new Date(c.dueDate),D=new Date(x.dueDate);return y.getTime()-D.getTime()}).forEach(c=>{const y=new Date(c.dueDate).toISOString().split("T")[0];v[y]||(v[y]=[]),v[y].push(c)}),v},[r]),j=p.useMemo(()=>{const v={};return o.forEach(N=>{v[N.id]=N}),v},[o]),u=Object.keys(h).sort(),d=new Date().toISOString().split("T")[0],g=v=>{const N=new Date(v),c=new Date;c.setHours(0,0,0,0);const x=Math.ceil((N.getTime()-c.getTime())/(1e3*60*60*24));return x===0?m("date.today"):x===1?m("date.tomorrow"):x===-1?m("date.yesterday"):i(N,"EEEE, MMMM d")},f=v=>v<d;return e.jsx("div",{ref:a,className:b.cn("h-full",s),...t,children:e.jsx(S.ScrollArea,{className:"h-full",children:e.jsx("div",{className:"p-4",children:u.length===0?e.jsx("div",{className:"py-12 text-center text-muted-foreground",children:m("common.noData")}):e.jsx("div",{className:"relative space-y-8 before:absolute before:inset-0 before:ml-5 before:h-full before:w-0.5 before:-translate-x-px before:bg-border md:before:mx-auto md:before:translate-x-0",children:u.map(v=>e.jsxs("div",{className:"relative flex items-start gap-6 md:gap-12",children:[e.jsx("div",{className:"flex items-center justify-center w-10 h-10 rounded-full bg-background border-2 border-muted shrink-0 md:order-1 md:mx-auto",children:e.jsx("div",{className:b.cn("w-3 h-3 rounded-full",f(v)?"bg-destructive":"bg-primary")})}),e.jsxs("div",{className:"hidden md:block md:w-1/2 md:text-right md:pr-8",children:[e.jsx("span",{className:b.cn("font-semibold",f(v)&&"text-destructive"),children:g(v)}),e.jsx("span",{className:"block text-sm text-muted-foreground",children:m("pipeline.items",{count:h[v].length})})]}),e.jsxs("div",{className:"flex-1 md:w-1/2 md:pl-8",children:[e.jsx("div",{className:"md:hidden mb-2",children:e.jsx("span",{className:b.cn("font-semibold",f(v)&&"text-destructive"),children:g(v)})}),e.jsx("div",{className:"space-y-3",children:h[v].map(N=>{const c=j[N.stageId];return e.jsx(te.Card,{className:"cursor-pointer hover:shadow-md transition-shadow",onClick:()=>n==null?void 0:n(N),children:e.jsxs(te.CardContent,{className:"p-4",children:[e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("h4",{className:"font-medium truncate",children:N.title}),N.company&&e.jsx("p",{className:"text-sm text-muted-foreground",children:N.company})]}),N.value!==void 0&&e.jsx("div",{className:"font-semibold",children:l(N.value,{minimumFractionDigits:0,maximumFractionDigits:0})})]}),e.jsxs("div",{className:"flex items-center gap-3 mt-3 text-sm",children:[c&&e.jsxs("div",{className:"flex items-center gap-1.5",children:[c.color&&e.jsx("div",{className:"h-2 w-2 rounded-full",style:{backgroundColor:c.color}}),e.jsx("span",{children:c.name})]}),N.owner&&e.jsx("span",{className:"text-muted-foreground",children:N.owner.name})]})]})},N.id)})})]})]},v))})})})})});be.displayName="PipelineTimeline";const Ke=p.forwardRef(({className:s,...t},a)=>{const{stages:o,items:r}=$(),{formatCurrency:n,t:l}=G.useFormatters(),i=r.reduce((j,u)=>j+(u.value||0),0),m=r.length,h=p.useMemo(()=>o.map(j=>{const u=r.filter(g=>g.stageId===j.id),d=u.reduce((g,f)=>g+(f.value||0),0);return{...j,count:u.length,value:d}}),[o,r]);return e.jsx("div",{ref:a,className:b.cn("border-t bg-muted/30 px-4 py-3",s),...t,children:e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-4",children:[e.jsxs("div",{className:"flex items-center gap-6",children:[e.jsxs("div",{children:[e.jsx("span",{className:"text-sm text-muted-foreground",children:l("common.total")}),e.jsx("div",{className:"font-semibold",children:n(i,{minimumFractionDigits:0,maximumFractionDigits:0})})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-sm text-muted-foreground",children:l("common.items")}),e.jsx("div",{className:"font-semibold",children:m})]})]}),e.jsx("div",{className:"flex items-center gap-4",children:h.map(j=>e.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[j.color&&e.jsx("div",{className:"h-2 w-2 rounded-full",style:{backgroundColor:j.color}}),e.jsxs("span",{className:"text-muted-foreground",children:[j.name,":"]}),e.jsx("span",{className:"font-medium",children:j.count})]},j.id))})]})})});Ke.displayName="PipelineSummary";function $e({title:s,subtitle:t,avatar:a,status:o,actions:r,fields:n,className:l}){return e.jsxs("div",{className:b.cn("border-b bg-background",l),children:[e.jsxs("div",{className:"flex items-start justify-between gap-4 px-6 pt-5 pb-3",children:[e.jsxs("div",{className:"flex items-start gap-3 min-w-0",children:[a&&e.jsx("div",{className:"shrink-0",children:a}),e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("h1",{className:"truncate text-lg font-semibold",children:s}),o]}),t&&e.jsx("p",{className:"truncate text-sm text-muted-foreground",children:t})]})]}),r&&e.jsx("div",{className:"flex shrink-0 items-center gap-2",children:r})]}),n&&n.length>0&&e.jsx("div",{className:"flex flex-wrap gap-x-6 gap-y-1.5 border-t px-6 py-2.5",children:n.map(i=>e.jsxs("div",{className:"flex items-center gap-1.5 text-sm",children:[e.jsxs("span",{className:"text-muted-foreground",children:[i.label,":"]}),e.jsx("span",{className:"font-medium",children:i.value})]},i.id))})]})}const Ms={note:e.jsx(ce.MessageSquare,{className:"h-3.5 w-3.5"}),email:e.jsx(K.Mail,{className:"h-3.5 w-3.5"}),call:e.jsx(K.Phone,{className:"h-3.5 w-3.5"}),meeting:e.jsx(Z.Calendar,{className:"h-3.5 w-3.5"}),task:e.jsx(oe,{className:"h-3.5 w-3.5"}),update:e.jsx(ne.PenLine,{className:"h-3.5 w-3.5"}),custom:e.jsx(ke,{className:"h-3.5 w-3.5"})},Ts={note:"bg-blue-100 text-blue-600",email:"bg-purple-100 text-purple-600",call:"bg-green-100 text-green-600",meeting:"bg-amber-100 text-amber-600",task:"bg-emerald-100 text-emerald-600",update:"bg-muted text-muted-foreground",custom:"bg-muted text-muted-foreground"};function Ps(s){return s.split(" ").map(t=>t[0]).join("").toUpperCase().slice(0,2)}function Is(s){const t=new Map;for(const a of s){const r=(a.timestamp instanceof Date?a.timestamp:new Date(a.timestamp)).toLocaleDateString(),n=t.get(r)??[];n.push(a),t.set(r,n)}return Array.from(t.entries()).map(([a,o])=>({date:a,items:o}))}function Qe({activities:s,className:t}){const{t:a}=P.useLocale(),o=n=>{const l=n instanceof Date?n:new Date(n),m=new Date().getTime()-l.getTime(),h=Math.floor(m/6e4);if(h<1)return a("record.justNow");if(h<60)return a("record.minutesAgo",{count:h});const j=Math.floor(h/60);if(j<24)return a("record.hoursAgo",{count:j});const u=Math.floor(j/24);return u<7?a("record.daysAgo",{count:u}):l.toLocaleDateString()},r=Is([...s].sort((n,l)=>{const i=n.timestamp instanceof Date?n.timestamp:new Date(n.timestamp);return(l.timestamp instanceof Date?l.timestamp:new Date(l.timestamp)).getTime()-i.getTime()}));return s.length===0?e.jsx("div",{className:"flex items-center justify-center py-8 text-sm text-muted-foreground",children:a("record.noActivity")}):e.jsx(S.ScrollArea,{className:b.cn("flex-1",t),children:e.jsx("div",{className:"space-y-6 p-4",children:r.map(n=>e.jsxs("div",{children:[e.jsx("p",{className:"mb-3 text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:n.date}),e.jsx("div",{className:"space-y-3",children:n.items.map(l=>e.jsxs("div",{className:"flex gap-3",children:[e.jsx("div",{className:b.cn("flex h-7 w-7 shrink-0 items-center justify-center rounded-full",Ts[l.type]),children:l.icon??Ms[l.type]}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-sm font-medium",children:l.title}),e.jsx("span",{className:"text-[10px] text-muted-foreground",children:o(l.timestamp)})]}),l.description&&e.jsx("p",{className:"mt-0.5 text-xs text-muted-foreground line-clamp-2",children:l.description}),l.user&&e.jsxs("div",{className:"mt-1 flex items-center gap-1.5",children:[e.jsxs(H.Avatar,{className:"h-4 w-4",children:[e.jsx(H.AvatarImage,{src:l.user.avatar,alt:l.user.name}),e.jsx(H.AvatarFallback,{className:"text-[7px]",children:Ps(l.user.name)})]}),e.jsx("span",{className:"text-[10px] text-muted-foreground",children:l.user.name})]})]})]},l.id))})]},n.date))})})}function Ye({entities:s,className:t}){const{t:a}=P.useLocale();if(s.length===0)return e.jsx("div",{className:"flex items-center justify-center py-6 text-sm text-muted-foreground",children:a("record.noRelated")});const o=new Map;for(const r of s){const n=o.get(r.type)??[];n.push(r),o.set(r.type,n)}return e.jsx(S.ScrollArea,{className:b.cn("flex-1",t),children:e.jsx("div",{className:"space-y-4 p-4",children:Array.from(o.entries()).map(([r,n])=>e.jsxs("div",{children:[e.jsxs("div",{className:"mb-2 flex items-center gap-1.5",children:[e.jsx(Ce,{className:"h-3 w-3 text-muted-foreground"}),e.jsxs("p",{className:"text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:[r," (",n.length,")"]})]}),e.jsx("div",{className:"space-y-1",children:n.map(l=>e.jsxs("button",{type:"button",onClick:l.onClick,className:b.cn("flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-left transition-colors hover:bg-muted",l.onClick&&"cursor-pointer",!l.onClick&&"cursor-default"),children:[l.icon&&e.jsx("div",{className:"flex h-6 w-6 shrink-0 items-center justify-center rounded bg-muted text-muted-foreground",children:l.icon}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("p",{className:"truncate text-sm font-medium",children:l.label}),l.subtitle&&e.jsx("p",{className:"truncate text-[10px] text-muted-foreground",children:l.subtitle})]}),l.onClick&&e.jsx(we.ChevronRight,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground/50"})]},l.id))})]},r))})})}const As=[{type:"note",label:"Note",icon:e.jsx(ce.MessageSquare,{className:"h-3.5 w-3.5"})},{type:"email",label:"Email",icon:e.jsx(K.Mail,{className:"h-3.5 w-3.5"})},{type:"call",label:"Call",icon:e.jsx(K.Phone,{className:"h-3.5 w-3.5"})},{type:"meeting",label:"Meeting",icon:e.jsx(Z.Calendar,{className:"h-3.5 w-3.5"})},{type:"task",label:"Task",icon:e.jsx(oe,{className:"h-3.5 w-3.5"})}];function Ue({onSubmit:s,className:t}){const[a,o]=se.useState("note"),[r,n]=se.useState(""),{t:l}=P.useLocale(),i={note:l("activity.note"),email:l("activity.email"),call:l("activity.call"),meeting:l("activity.meeting"),task:l("activity.task")},m=()=>{r.trim()&&(s==null||s(a,r.trim()),n(""))};return e.jsxs("div",{className:b.cn("border-t bg-background",t),children:[e.jsx("div",{className:"flex items-center gap-1 border-b px-3 py-1.5",children:As.map(h=>e.jsxs("button",{type:"button",onClick:()=>o(h.type),className:b.cn("flex items-center gap-1.5 rounded-md px-2.5 py-1 text-xs transition-colors",a===h.type?"bg-primary/10 text-primary font-medium":"text-muted-foreground hover:bg-muted hover:text-foreground"),children:[h.icon,i[h.type]??h.label]},h.type))}),e.jsxs("div",{className:"flex items-end gap-2 px-3 py-2.5",children:[e.jsx(R.Textarea,{value:r,onChange:h=>n(h.target.value),placeholder:l("activity.addPlaceholder",{type:i[a]??a}),rows:2,className:"min-h-[60px] resize-none text-sm",onKeyDown:h=>{h.key==="Enter"&&!h.shiftKey&&(h.preventDefault(),m())}}),e.jsx(k.Button,{size:"sm",onClick:m,disabled:!r.trim(),className:"shrink-0",children:e.jsx(De.Send,{className:"h-3.5 w-3.5"})})]})]})}function Xe({title:s,subtitle:t,avatar:a,status:o,actions:r,fields:n,activities:l=[],relatedEntities:i=[],tabs:m=[],defaultTab:h,activeTab:j,onTabChange:u,onActivityCreate:d,showComposer:g=!0,sidebarContent:f,className:v}){var F,Q;const{t:N}=P.useLocale(),[c,x]=se.useState(h??((F=m[0])==null?void 0:F.id)??""),y=j??c,D=w=>{j||x(w),u==null||u(w)},_=(Q=m.find(w=>w.id===y))==null?void 0:Q.content;return e.jsxs("div",{className:b.cn("flex h-full flex-col bg-background",v),children:[e.jsx($e,{title:s,subtitle:t,avatar:a,status:o,actions:r,fields:n}),e.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[e.jsxs("div",{className:"flex flex-1 flex-col border-r",children:[m.length>0&&e.jsx(R.Tabs,{value:y,onValueChange:D,children:e.jsxs(R.TabsList,{className:"w-full justify-start rounded-none border-b bg-transparent px-4 py-0 h-auto",children:[e.jsx(R.TabsTrigger,{value:"__timeline__",className:"rounded-none border-b-2 border-transparent data-[state=active]:border-primary data-[state=active]:shadow-none text-xs py-2",children:N("record.timeline")}),m.map(w=>e.jsxs(R.TabsTrigger,{value:w.id,className:"rounded-none border-b-2 border-transparent data-[state=active]:border-primary data-[state=active]:shadow-none text-xs py-2 gap-1.5",children:[w.icon,w.label,w.badge!=null&&e.jsx(q.Badge,{variant:"secondary",className:"ml-1 h-4 min-w-[16px] px-1 text-[9px]",children:w.badge})]},w.id))]})}),e.jsx("div",{className:"flex flex-1 flex-col overflow-hidden",children:y==="__timeline__"||m.length===0?e.jsx(Qe,{activities:l}):e.jsx("div",{className:"flex-1 overflow-auto p-4",children:_})}),g&&d&&e.jsx(Ue,{onSubmit:d})]}),e.jsxs("div",{className:"flex w-[280px] shrink-0 flex-col lg:w-[320px]",children:[i.length>0&&e.jsx(Ye,{entities:i}),f&&e.jsx("div",{className:"border-t p-4",children:f})]})]})]})}Xe.displayName="RecordShell";const Ls={sm:"sm:max-w-[400px]",md:"sm:max-w-[560px]",lg:"sm:max-w-[720px]",xl:"sm:max-w-[900px]"},Ge=p.forwardRef(({open:s,onOpenChange:t,size:a="md",children:o,className:r},n)=>e.jsx(V.Sheet,{open:s,onOpenChange:t,children:e.jsx(V.SheetContent,{ref:n,side:"right",className:b.cn("flex w-full flex-col gap-0 p-0",Ls[a],r),children:e.jsx(S.ScrollArea,{className:"flex-1",children:e.jsx("div",{className:"flex flex-col",children:o})})})}));Ge.displayName="RecordPanel";const We=p.forwardRef(({title:s,subtitle:t,avatar:a,status:o,actions:r,className:n},l)=>e.jsxs("div",{ref:l,className:b.cn("flex items-start justify-between gap-4 border-b px-6 pb-4 pt-6",n),children:[e.jsxs("div",{className:"flex items-start gap-3 min-w-0",children:[a&&e.jsx("div",{className:"shrink-0",children:a}),e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("h2",{className:"truncate text-lg font-semibold leading-tight",children:s}),o]}),t&&e.jsx("p",{className:"mt-0.5 truncate text-sm text-muted-foreground",children:t})]})]}),r&&r.length>0&&e.jsx("div",{className:"flex shrink-0 items-center gap-1.5",children:r.map(i=>e.jsxs(k.Button,{variant:i.variant??"outline",size:"sm",onClick:i.onClick,children:[i.icon&&e.jsx("span",{className:"mr-1.5 inline-flex",children:i.icon}),i.label]},i.id))})]}));We.displayName="RecordPanelHeader";function Fs({field:s}){const{t}=P.useLocale(),[a,o]=p.useState(!1),[r,n]=p.useState(String(s.value??"")),l=p.useRef(null);p.useEffect(()=>{var u,d;a&&((u=l.current)==null||u.focus(),(d=l.current)==null||d.select())},[a]);const i=()=>{var u;o(!1),r!==String(s.value??"")&&((u=s.onEdit)==null||u.call(s,s.type==="number"?Number(r):r))},m=()=>{o(!1),n(String(s.value??""))},h=u=>{u.key==="Enter"?(u.preventDefault(),i()):u.key==="Escape"&&(u.preventDefault(),m())},j=u=>u.preventDefault();return a?e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(X.Input,{ref:l,type:s.type==="number"?"number":s.type==="date"?"date":"text",value:r,onChange:u=>n(u.target.value),onBlur:i,onKeyDown:h,className:"h-7 text-sm"}),e.jsx("button",{onMouseDown:j,onClick:i,className:"flex h-6 w-6 shrink-0 items-center justify-center rounded text-primary hover:text-primary/80 hover:bg-muted transition-colors","aria-label":t("editable.save"),children:e.jsx(q.Check,{className:"h-3.5 w-3.5"})}),e.jsx("button",{onMouseDown:j,onClick:m,className:"flex h-6 w-6 shrink-0 items-center justify-center rounded text-muted-foreground hover:text-foreground hover:bg-muted transition-colors","aria-label":t("editable.cancel"),children:e.jsx(he.X,{className:"h-3.5 w-3.5"})})]}):e.jsxs("div",{className:"group/field flex min-h-[28px] cursor-default items-center gap-1.5",role:s.editable?"button":void 0,tabIndex:s.editable?0:void 0,onClick:()=>s.editable&&o(!0),onKeyDown:u=>{s.editable&&(u.key==="Enter"||u.key===" ")&&(u.preventDefault(),o(!0))},children:[e.jsx("span",{className:"text-sm",children:s.value??e.jsx("span",{className:"text-muted-foreground",children:t("editable.emptyValue")})}),s.editable&&e.jsx(xe.Pencil,{className:"h-3 w-3 shrink-0 text-muted-foreground opacity-0 transition-opacity group-hover/field:opacity-100"})]})}const Je=p.forwardRef(({fields:s,className:t},a)=>e.jsx("div",{ref:a,className:b.cn("border-b px-6 py-4",t),children:e.jsx("div",{className:"grid grid-cols-[minmax(100px,auto)_1fr] gap-x-4 gap-y-2",children:s.map(o=>e.jsxs(p.Fragment,{children:[e.jsx("span",{className:"flex items-center text-sm text-muted-foreground",children:o.label}),e.jsx(Fs,{field:o})]},o.id))})}));Je.displayName="RecordPanelFields";const Ze=p.forwardRef(({tabs:s,defaultTab:t,activeTab:a,onTabChange:o,className:r},n)=>{var i;const l=t??((i=s[0])==null?void 0:i.id);return e.jsx("div",{ref:n,className:b.cn("flex flex-col",r),children:e.jsxs(R.Tabs,{value:a,defaultValue:a?void 0:l,onValueChange:o,children:[e.jsx(R.TabsList,{className:"w-full justify-start rounded-none border-b bg-transparent px-6 py-0 h-auto",children:s.map(m=>e.jsxs(R.TabsTrigger,{value:m.id,className:"rounded-none border-b-2 border-transparent px-3 py-2.5 text-sm data-[state=active]:border-primary data-[state=active]:bg-transparent data-[state=active]:shadow-none gap-1.5",children:[m.icon&&e.jsx("span",{className:"inline-flex",children:m.icon}),m.label,m.badge!=null&&e.jsx(q.Badge,{variant:"secondary",className:"ml-1 h-4 min-w-[16px] px-1 text-[10px]",children:m.badge})]},m.id))}),s.map(m=>e.jsx(R.TabsContent,{value:m.id,className:"mt-0 px-6 py-4",children:m.content},m.id))]})})});Ze.displayName="RecordPanelTabs";function Es(s){return s.split(" ").map(t=>t[0]).join("").toUpperCase().slice(0,2)}const es=p.forwardRef(({activities:s,maxItems:t=5,onViewAll:a,className:o},r)=>{const n=s.slice(0,t),l=s.length>t,{t:i}=P.useLocale(),m=h=>{const j=typeof h=="string"?new Date(h):h,d=new Date().getTime()-j.getTime(),g=Math.floor(d/6e4),f=Math.floor(g/60),v=Math.floor(f/24);return g<1?i("record.justNow"):g<60?i("record.minutesAgo",{count:g}):f<24?i("record.hoursAgo",{count:f}):v<7?i("record.daysAgo",{count:v}):j.toLocaleDateString(void 0,{month:"short",day:"numeric"})};return s.length===0?e.jsx("div",{ref:r,className:b.cn("px-6 py-4",o),children:e.jsx("p",{className:"text-sm text-muted-foreground",children:i("record.noActivity")})}):e.jsxs("div",{ref:r,className:b.cn("px-6 py-4",o),children:[e.jsx("h3",{className:"mb-3 text-sm font-medium",children:i("record.recentActivity")}),e.jsx("div",{className:"space-y-3",children:n.map(h=>e.jsxs("div",{className:"flex items-start gap-3",children:[h.user?e.jsxs(H.Avatar,{className:"h-7 w-7 shrink-0",children:[h.user.avatar&&e.jsx(H.AvatarImage,{src:h.user.avatar,alt:h.user.name}),e.jsx(H.AvatarFallback,{className:"text-[10px]",children:Es(h.user.name)})]}):e.jsx("div",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-full bg-muted",children:e.jsx("div",{className:"h-2 w-2 rounded-full bg-muted-foreground/50"})}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-baseline justify-between gap-2",children:[e.jsx("p",{className:"truncate text-sm font-medium",children:h.title}),e.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:m(h.timestamp)})]}),h.description&&e.jsx("p",{className:"mt-0.5 truncate text-xs text-muted-foreground",children:h.description})]})]},h.id))}),l&&a&&e.jsx(k.Button,{variant:"link",size:"sm",className:"mt-2 h-auto p-0 text-xs",onClick:a,children:i("record.viewAll",{count:s.length})})]})});es.displayName="RecordPanelActivity";const ss=p.forwardRef(({trigger:s,fields:t,title:a,subtitle:o,avatar:r,actions:n,onOpenFull:l,mode:i="hover",className:m},h)=>{const[j,u]=p.useState(!1),d=p.useRef(),g=i==="hover",{t:f}=P.useLocale(),v=()=>{d.current&&(clearTimeout(d.current),d.current=void 0)},N=()=>{v(),d.current=setTimeout(()=>u(!1),200)};p.useEffect(()=>()=>v(),[]);const c=g?{onMouseEnter:()=>{v(),u(!0)},onMouseLeave:N}:{},x=g?{onMouseEnter:v,onMouseLeave:N}:{},y=e.jsxs("div",{ref:h,className:b.cn("flex flex-col",m),...x,children:[e.jsxs("div",{className:"flex items-start gap-3",children:[r&&e.jsx("div",{className:"shrink-0",children:r}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"truncate text-sm font-semibold",children:a}),o&&e.jsx("p",{className:"truncate text-xs text-muted-foreground",children:o})]})]}),t.length>0&&e.jsxs(e.Fragment,{children:[e.jsx(V.Separator,{className:"my-3"}),e.jsx("div",{className:"grid grid-cols-[auto_1fr] gap-x-3 gap-y-1.5",children:t.map(D=>e.jsxs(p.Fragment,{children:[e.jsx("span",{className:"text-xs text-muted-foreground",children:D.label}),e.jsx("span",{className:"truncate text-xs",children:D.value??f("editable.emptyValue")})]},D.id))})]}),n&&n.length>0&&e.jsxs(e.Fragment,{children:[e.jsx(V.Separator,{className:"my-3"}),e.jsx("div",{className:"flex flex-wrap gap-1.5",children:n.map(D=>e.jsxs(k.Button,{variant:D.variant??"outline",size:"sm",className:"h-7 text-xs",onClick:D.onClick,children:[D.icon&&e.jsx("span",{className:"mr-1 inline-flex",children:D.icon}),D.label]},D.id))})]}),l&&e.jsxs(e.Fragment,{children:[e.jsx(V.Separator,{className:"my-3"}),e.jsxs(k.Button,{variant:"link",size:"sm",className:"h-auto justify-start p-0 text-xs",onClick:l,children:[e.jsx(gs.ExternalLink,{className:"mr-1 h-3 w-3"}),f("record.openFullRecord")]})]})]});return e.jsxs(ue.Popover,{open:j,onOpenChange:g?void 0:u,children:[e.jsx(ue.PopoverTrigger,{asChild:!0,children:e.jsx("span",{...c,children:s})}),e.jsx(ue.PopoverContent,{align:"start",sideOffset:8,className:"w-80",onOpenAutoFocus:D=>{g&&D.preventDefault()},children:y})]})});ss.displayName="QuickView";function Bs(s){switch(s){case"number":return"number";case"date":return"date";case"email":return"email";case"phone":return"tel";case"url":return"url";default:return"text"}}const ts=p.forwardRef(({open:s,onOpenChange:t,mode:a,title:o,fields:r,defaultValues:n,onSubmit:l,className:i},m)=>{const[h,j]=p.useState({}),[u,d]=p.useState(!1),{t:g}=P.useLocale();p.useEffect(()=>{if(s){const c={};for(const x of r)c[x.id]=(n==null?void 0:n[x.id])??(typeof x.value=="string"?x.value:"");j(c)}},[s,r,n]);const f=(c,x)=>{j(y=>({...y,[c]:x}))},v=async c=>{c.preventDefault(),d(!0);try{await l(h),t(!1)}finally{d(!1)}},N=o??g(a==="create"?"record.createRecord":"record.editRecord");return e.jsx(z.Dialog,{open:s,onOpenChange:t,children:e.jsx(z.DialogContent,{ref:m,size:"md",className:b.cn("sm:max-w-lg",i),children:e.jsxs("form",{onSubmit:v,children:[e.jsxs(z.DialogHeader,{children:[e.jsx(z.DialogTitle,{children:N}),e.jsx(z.DialogDescription,{children:g(a==="create"?"record.createDescription":"record.editDescription")})]}),e.jsx("div",{className:"mt-4 grid gap-4",children:r.map(c=>e.jsxs("div",{className:"grid gap-2",children:[e.jsx(fs.Label,{htmlFor:`record-form-${c.id}`,children:c.label}),c.type==="select"&&c.options?e.jsxs(T.Select,{value:String(h[c.id]??""),onValueChange:x=>f(c.id,x),children:[e.jsx(T.SelectTrigger,{id:`record-form-${c.id}`,size:"sm",children:e.jsx(T.SelectValue,{placeholder:`Select ${c.label.toLowerCase()}`})}),e.jsx(T.SelectContent,{children:c.options.map(x=>e.jsx(T.SelectItem,{value:x.value,children:x.label},x.value))})]}):e.jsx(X.Input,{id:`record-form-${c.id}`,type:Bs(c.type),value:String(h[c.id]??""),onChange:x=>f(c.id,c.type==="number"?Number(x.target.value):x.target.value),placeholder:c.label})]},c.id))}),e.jsxs(z.DialogFooter,{className:"mt-6",children:[e.jsx(k.Button,{type:"button",variant:"outline",onClick:()=>t(!1),disabled:u,children:g("common.cancel")}),e.jsx(k.Button,{type:"submit",disabled:u,children:g(u?a==="create"?"record.creating":"record.saving":a==="create"?"record.create":"record.saveChanges")})]})]})})})});ts.displayName="RecordFormDialog";const as=p.createContext(null);function Y(){const s=p.useContext(as);if(!s)throw new Error("useRecordDialog must be used within a RecordDialog component");return s}function rs({mode:s,onModeChange:t,children:a}){const[o,r]=p.useState(!1),[n,l]=p.useState(!1),i=p.useCallback(h=>{t==null||t(h)},[t]),m=p.useMemo(()=>({mode:s,setMode:i,isDirty:o,setIsDirty:r,isSubmitting:n,setIsSubmitting:l}),[s,i,o,n]);return e.jsx(as.Provider,{value:m,children:a})}const ns=p.forwardRef(({open:s,onOpenChange:t,mode:a,onModeChange:o,ariaTitle:r,children:n,className:l},i)=>e.jsx(z.Dialog,{open:s,onOpenChange:t,children:e.jsxs(z.DialogContent,{ref:i,size:"4xl",className:b.cn("flex flex-col gap-0 overflow-hidden p-0","max-w-[98vw] sm:max-w-[92vw] lg:max-w-[90vw] 2xl:max-w-[1600px]","h-[95vh] sm:h-[88vh] lg:h-[85vh]","[&>button.absolute]:hidden",l),children:[e.jsx(z.DialogTitle,{className:"sr-only",children:r??"Record"}),e.jsx(rs,{mode:a,onModeChange:o,children:n})]})}));ns.displayName="RecordDialog";const ls=p.forwardRef(({title:s,subtitle:t,avatar:a,status:o,actions:r=[],className:n},l)=>{const{mode:i}=Y(),{t:m}=P.useLocale(),h=r.filter(d=>!d.showInModes||d.showInModes.includes(i)),j=h.slice(0,2),u=h.slice(2);return e.jsxs("div",{ref:l,className:b.cn("sticky top-0 z-10 flex items-start gap-4 border-b bg-background px-6 py-4 sm:px-8",n),children:[a&&e.jsx("div",{className:"shrink-0",children:a}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("h2",{className:"truncate text-lg font-semibold",children:s}),o&&e.jsx("div",{className:"shrink-0",children:o})]}),t&&e.jsx("p",{className:"mt-0.5 truncate text-sm text-muted-foreground",children:t})]}),e.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[j.map(d=>e.jsxs(k.Button,{variant:d.variant??"outline",size:"sm",onClick:d.onClick,disabled:d.disabled||d.loading,children:[d.icon&&e.jsx("span",{className:"mr-1.5",children:d.icon}),d.label]},d.id)),u.length>0&&e.jsxs(C.DropdownMenu,{children:[e.jsx(C.DropdownMenuTrigger,{asChild:!0,children:e.jsx(k.Button,{variant:"ghost",size:"icon",className:"h-8 w-8",children:e.jsx(le.Ellipsis,{className:"h-4 w-4"})})}),e.jsx(C.DropdownMenuContent,{align:"end",children:u.map(d=>e.jsxs(C.DropdownMenuItem,{onClick:d.onClick,disabled:d.disabled,className:d.variant==="destructive"?"text-destructive":void 0,children:[d.icon&&e.jsx("span",{className:"mr-2",children:d.icon}),d.label]},d.id))})]}),e.jsx(z.DialogClose,{asChild:!0,children:e.jsxs(k.Button,{variant:"ghost",size:"icon",className:"h-8 w-8",children:[e.jsx(he.X,{className:"h-4 w-4"}),e.jsx("span",{className:"sr-only",children:m("recordDialog.close")})]})})]})]})});ls.displayName="RecordDialogHeader";const qs={up:"text-emerald-600",down:"text-destructive",neutral:"text-muted-foreground"},zs={up:e.jsx(ys,{className:"h-3 w-3"}),down:e.jsx(Ns,{className:"h-3 w-3"}),neutral:e.jsx(js.Minus,{className:"h-3 w-3"})},cs=p.forwardRef(({fields:s,className:t},a)=>{const{mode:o}=Y();return o==="create"||s.length===0?null:e.jsx("div",{ref:a,className:b.cn("border-b bg-muted/30 px-6 py-4 sm:px-8",t),children:e.jsx("div",{className:b.cn("grid gap-4 divide-x",s.length===1&&"grid-cols-1",s.length===2&&"grid-cols-2",s.length===3&&"grid-cols-2 sm:grid-cols-3",s.length>=4&&"grid-cols-2 sm:grid-cols-4"),children:s.map((r,n)=>e.jsxs("div",{className:b.cn("flex flex-col gap-1",n>0&&"pl-4"),children:[e.jsxs("div",{className:"flex items-center gap-1.5 text-xs font-medium text-muted-foreground",children:[r.icon&&e.jsx("span",{className:"shrink-0",children:r.icon}),r.label]}),e.jsx("div",{className:"text-sm font-semibold",children:r.value}),r.change&&e.jsxs("div",{className:b.cn("flex items-center gap-0.5 text-xs font-medium",qs[r.change.direction]),children:[zs[r.change.direction],r.change.value]})]},r.id))})})});cs.displayName="RecordDialogHighlight";const os=p.forwardRef(({tabs:s=[],defaultTab:t,activeTab:a,onTabChange:o,children:r,className:n},l)=>{var j;const{mode:i}=Y(),m=s.filter(u=>!u.hideInModes||!u.hideInModes.includes(i));if(m.length===0)return e.jsx("div",{ref:l,className:b.cn("flex-1 overflow-hidden",n),children:e.jsx(S.ScrollArea,{className:"h-full",children:e.jsx("div",{className:"px-6 py-6 sm:px-8",children:r})})});const h=t??((j=m[0])==null?void 0:j.id);return e.jsx("div",{ref:l,className:b.cn("flex flex-1 flex-col overflow-hidden",n),children:e.jsxs(R.Tabs,{value:a,defaultValue:h,onValueChange:o,className:"flex flex-1 flex-col overflow-hidden",children:[e.jsx(R.TabsList,{className:"h-auto w-full justify-start gap-0 rounded-none border-b bg-transparent p-0 px-6 sm:px-8",children:m.map(u=>e.jsx(R.TabsTrigger,{value:u.id,className:b.cn("relative rounded-none border-b-2 border-transparent bg-transparent px-4 py-2.5 text-sm font-medium text-muted-foreground shadow-none transition-none","data-[state=active]:border-primary data-[state=active]:bg-transparent data-[state=active]:text-foreground data-[state=active]:shadow-none"),children:e.jsxs("span",{className:"flex items-center gap-2",children:[u.icon,u.label,u.badge!=null&&e.jsx(q.Badge,{variant:"secondary",className:"h-5 min-w-[20px] px-1.5 text-[10px]",children:u.badge})]})},u.id))}),m.map(u=>e.jsx(R.TabsContent,{value:u.id,className:"mt-0 flex-1 overflow-hidden data-[state=inactive]:hidden",children:e.jsx(S.ScrollArea,{className:"h-full",children:e.jsx("div",{className:"px-6 py-6 sm:px-8",children:u.content})})},u.id))]})})});os.displayName="RecordDialogBody";const is=p.forwardRef(({id:s,title:t,icon:a,defaultCollapsed:o=!1,children:r,className:n},l)=>e.jsx("div",{ref:l,className:n,children:e.jsx(ee.Accordion,{type:"multiple",defaultValue:o?[]:[s],children:e.jsxs(ee.AccordionItem,{value:s,className:"border-b-0",children:[e.jsx(ee.AccordionTrigger,{className:"text-base font-semibold py-4 hover:no-underline",children:e.jsxs("div",{className:"flex items-center gap-2",children:[a&&e.jsx("span",{className:"text-muted-foreground",children:a}),t]})}),e.jsx(ee.AccordionContent,{children:r})]})})}));is.displayName="RecordDialogSection";function Os({field:s}){var u;const{t}=P.useLocale(),[a,o]=p.useState(!1),[r,n]=p.useState(String(s.value??"")),l=p.useRef(null);p.useEffect(()=>{var d;a&&((d=l.current)==null||d.focus(),l.current instanceof HTMLInputElement&&l.current.select())},[a]);const i=()=>{var d;o(!1),r!==String(s.value??"")&&((d=s.onEdit)==null||d.call(s,s.type==="number"?Number(r):r))},m=()=>{o(!1),n(String(s.value??""))},h=d=>{d.key==="Enter"&&s.type!=="textarea"?(d.preventDefault(),i()):d.key==="Escape"&&(d.preventDefault(),m())},j=d=>d.preventDefault();return a?e.jsxs("div",{className:"flex items-center gap-1",children:[s.type==="textarea"?e.jsx(R.Textarea,{ref:l,value:r,onChange:d=>n(d.target.value),onBlur:i,onKeyDown:d=>{d.key==="Escape"&&(d.preventDefault(),m())},rows:3,className:"text-sm"}):s.type==="select"?e.jsxs(T.Select,{value:r,onValueChange:d=>{var g;(g=s.onEdit)==null||g.call(s,d),o(!1)},children:[e.jsx(T.SelectTrigger,{className:"h-8 text-sm",children:e.jsx(T.SelectValue,{})}),e.jsx(T.SelectContent,{children:(u=s.options)==null?void 0:u.map(d=>e.jsx(T.SelectItem,{value:d.value,children:d.label},d.value))})]}):e.jsx(X.Input,{ref:l,type:ms(s.type),value:r,onChange:d=>n(d.target.value),onBlur:i,onKeyDown:h,className:"h-8 text-sm"}),s.type!=="select"&&e.jsxs(e.Fragment,{children:[e.jsx("button",{onMouseDown:j,onClick:i,className:"flex h-6 w-6 shrink-0 items-center justify-center rounded text-primary hover:text-primary/80 hover:bg-muted transition-colors","aria-label":t("editable.save"),children:e.jsx(q.Check,{className:"h-3.5 w-3.5"})}),e.jsx("button",{onMouseDown:j,onClick:m,className:"flex h-6 w-6 shrink-0 items-center justify-center rounded text-muted-foreground hover:text-foreground hover:bg-muted transition-colors","aria-label":t("editable.cancel"),children:e.jsx(he.X,{className:"h-3.5 w-3.5"})})]})]}):e.jsxs("div",{className:"group/field flex min-h-[28px] cursor-default items-center gap-1.5",role:s.editable?"button":void 0,tabIndex:s.editable?0:void 0,onClick:()=>s.editable&&o(!0),onKeyDown:d=>{s.editable&&(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),o(!0))},children:[s.renderView?s.renderView(s.value):e.jsx("span",{className:"text-sm",children:s.value??e.jsx("span",{className:"text-muted-foreground",children:t("editable.emptyValue")})}),s.editable&&e.jsx(xe.Pencil,{className:"h-3 w-3 shrink-0 text-muted-foreground opacity-0 transition-opacity group-hover/field:opacity-100"})]})}function ye({field:s}){var o;const{t}=P.useLocale(),{mode:a}=Y();return s.type==="custom"&&s.renderEdit?e.jsx(e.Fragment,{children:s.renderEdit(s.value,r=>{var n;return(n=s.onEdit)==null?void 0:n.call(s,r)})}):s.type==="checkbox"?e.jsxs("div",{className:"flex items-center gap-2 pt-1",children:[e.jsx(ae.Checkbox,{id:`field-${s.id}`,checked:!!s.value,onCheckedChange:r=>{var n;return(n=s.onEdit)==null?void 0:n.call(s,r)},disabled:!s.editable&&a!=="create"}),e.jsx("label",{htmlFor:`field-${s.id}`,className:"text-sm",children:s.label})]}):s.type==="select"?e.jsxs(T.Select,{value:String(s.value??""),onValueChange:r=>{var n;return(n=s.onEdit)==null?void 0:n.call(s,r)},disabled:!s.editable&&a!=="create",children:[e.jsx(T.SelectTrigger,{className:"h-9 text-sm",children:e.jsx(T.SelectValue,{placeholder:s.placeholder||t("common.select")})}),e.jsx(T.SelectContent,{children:(o=s.options)==null?void 0:o.map(r=>e.jsx(T.SelectItem,{value:r.value,children:r.label},r.value))})]}):s.type==="textarea"?e.jsx(R.Textarea,{value:String(s.value??""),onChange:r=>{var n;return(n=s.onEdit)==null?void 0:n.call(s,r.target.value)},placeholder:s.placeholder,rows:3,className:"text-sm",disabled:!s.editable&&a!=="create"}):s.type==="currency"?e.jsxs("div",{className:"relative",children:[e.jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-sm text-muted-foreground",children:"$"}),e.jsx(X.Input,{type:"number",value:String(s.value??""),onChange:r=>{var n;return(n=s.onEdit)==null?void 0:n.call(s,r.target.value?Number(r.target.value):"")},placeholder:s.placeholder,className:"h-9 pl-7 text-sm",disabled:!s.editable&&a!=="create"})]}):e.jsx(X.Input,{type:ms(s.type),value:String(s.value??""),onChange:r=>{var n;return(n=s.onEdit)==null?void 0:n.call(s,s.type==="number"?Number(r.target.value):r.target.value)},placeholder:s.placeholder,className:"h-9 text-sm",disabled:!s.editable&&a!=="create"})}const ds=p.forwardRef(({fields:s,columns:t=2,className:a},o)=>{const{mode:r}=Y(),{t:n}=P.useLocale();if(s.length===0)return e.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:n("recordDialog.noFields")});const l=b.cn("grid gap-x-8 gap-y-5",t===1&&"grid-cols-1",t===2&&"grid-cols-1 sm:grid-cols-2",t===3&&"grid-cols-1 sm:grid-cols-2 lg:grid-cols-3");return e.jsx("div",{ref:o,className:b.cn(l,a),children:s.map(i=>{const h=(r==="edit"||r==="create")&&(i.editable||r==="create")&&i.type!=="checkbox";return e.jsxs("div",{className:b.cn(i.fullWidth&&"col-span-full"),children:[i.type!=="checkbox"&&e.jsxs("label",{className:"mb-1 block text-sm font-medium text-muted-foreground",children:[i.label,i.required&&e.jsx("span",{className:"ml-0.5 text-destructive",children:"*"})]}),h?e.jsx(ye,{field:i}):i.type==="checkbox"?e.jsx(ye,{field:i}):e.jsx(Os,{field:i}),i.helpText&&e.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:i.helpText})]},i.id)})})});ds.displayName="RecordDialogFields";function ms(s){switch(s){case"number":case"currency":return"number";case"date":return"date";case"email":return"email";case"phone":return"tel";case"url":return"url";default:return"text"}}const Vs={note:e.jsx(ce.MessageSquare,{className:"h-3.5 w-3.5"}),email:e.jsx(K.Mail,{className:"h-3.5 w-3.5"}),call:e.jsx(K.Phone,{className:"h-3.5 w-3.5"}),meeting:e.jsx(Z.Calendar,{className:"h-3.5 w-3.5"}),task:e.jsx(oe,{className:"h-3.5 w-3.5"}),update:e.jsx(ne.PenLine,{className:"h-3.5 w-3.5"}),custom:e.jsx(ke,{className:"h-3.5 w-3.5"})},Hs={note:"bg-blue-100 text-blue-600",email:"bg-purple-100 text-purple-600",call:"bg-green-100 text-green-600",meeting:"bg-amber-100 text-amber-600",task:"bg-emerald-100 text-emerald-600",update:"bg-muted text-muted-foreground",custom:"bg-muted text-muted-foreground"},_s=[{type:"note",labelKey:"activity.note",icon:e.jsx(ce.MessageSquare,{className:"h-3.5 w-3.5"})},{type:"email",labelKey:"activity.email",icon:e.jsx(K.Mail,{className:"h-3.5 w-3.5"})},{type:"call",labelKey:"activity.call",icon:e.jsx(K.Phone,{className:"h-3.5 w-3.5"})},{type:"meeting",labelKey:"activity.meeting",icon:e.jsx(Z.Calendar,{className:"h-3.5 w-3.5"})},{type:"task",labelKey:"activity.task",icon:e.jsx(oe,{className:"h-3.5 w-3.5"})}];function Ks(s){return s.split(" ").map(t=>t[0]).join("").toUpperCase().slice(0,2)}function $s(s){const t=new Map;for(const a of s){const r=(a.timestamp instanceof Date?a.timestamp:new Date(a.timestamp)).toLocaleDateString(),n=t.get(r)??[];n.push(a),t.set(r,n)}return Array.from(t.entries()).map(([a,o])=>({date:a,items:o}))}const us=p.forwardRef(({activities:s,showComposer:t,onActivityCreate:a,className:o},r)=>{const{t:n}=P.useLocale(),[l,i]=p.useState("note"),[m,h]=p.useState(""),j=g=>{const f=g instanceof Date?g:new Date(g),N=new Date().getTime()-f.getTime(),c=Math.floor(N/6e4);if(c<1)return n("record.justNow");if(c<60)return n("record.minutesAgo",{count:c});const x=Math.floor(c/60);if(x<24)return n("record.hoursAgo",{count:x});const y=Math.floor(x/24);return y<7?n("record.daysAgo",{count:y}):f.toLocaleDateString()},u=$s([...s].sort((g,f)=>{const v=g.timestamp instanceof Date?g.timestamp:new Date(g.timestamp);return(f.timestamp instanceof Date?f.timestamp:new Date(f.timestamp)).getTime()-v.getTime()})),d=()=>{m.trim()&&(a==null||a(l,m.trim()),h(""))};return e.jsxs("div",{ref:r,className:b.cn("flex flex-col",o),children:[t&&a&&e.jsxs("div",{className:"mb-6 rounded-lg border bg-muted/30",children:[e.jsx("div",{className:"flex items-center gap-1 border-b px-3 py-1.5",children:_s.map(g=>e.jsxs("button",{type:"button",onClick:()=>i(g.type),className:b.cn("flex items-center gap-1.5 rounded-md px-2.5 py-1 text-xs transition-colors",l===g.type?"bg-primary/10 text-primary font-medium":"text-muted-foreground hover:bg-muted hover:text-foreground"),children:[g.icon,n(g.labelKey)]},g.type))}),e.jsxs("div",{className:"flex items-end gap-2 px-3 py-2.5",children:[e.jsx(R.Textarea,{value:m,onChange:g=>h(g.target.value),placeholder:n("activity.addPlaceholder",{type:n(`activity.${l}`)}),rows:2,className:"min-h-[60px] resize-none text-sm",onKeyDown:g=>{g.key==="Enter"&&!g.shiftKey&&(g.preventDefault(),d())}}),e.jsx(k.Button,{size:"sm",onClick:d,disabled:!m.trim(),className:"shrink-0",children:e.jsx(De.Send,{className:"h-3.5 w-3.5"})})]})]}),s.length===0?e.jsx("div",{className:"flex items-center justify-center py-8 text-sm text-muted-foreground",children:n("record.noActivity")}):e.jsx("div",{className:"space-y-6",children:u.map(g=>e.jsxs("div",{children:[e.jsx("p",{className:"mb-3 text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:g.date}),e.jsx("div",{className:"space-y-3",children:g.items.map(f=>e.jsxs("div",{className:"flex gap-3",children:[e.jsx("div",{className:b.cn("flex h-8 w-8 shrink-0 items-center justify-center rounded-full",Hs[f.type]),children:f.icon??Vs[f.type]}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-sm font-medium",children:f.title}),e.jsx("span",{className:"text-[10px] text-muted-foreground",children:j(f.timestamp)})]}),f.description&&e.jsx("p",{className:"mt-0.5 text-xs text-muted-foreground line-clamp-2",children:f.description}),f.user&&e.jsxs("div",{className:"mt-1 flex items-center gap-1.5",children:[e.jsxs(H.Avatar,{className:"h-4 w-4",children:[e.jsx(H.AvatarImage,{src:f.user.avatar,alt:f.user.name}),e.jsx(H.AvatarFallback,{className:"text-[7px]",children:Ks(f.user.name)})]}),e.jsx("span",{className:"text-[10px] text-muted-foreground",children:f.user.name})]})]})]},f.id))})]},g.date))})]})});us.displayName="RecordDialogActivity";const xs=p.forwardRef(({entities:s,onAdd:t,className:a},o)=>{const{t:r}=P.useLocale();if(s.length===0)return e.jsxs("div",{ref:o,className:b.cn("flex flex-col items-center justify-center py-8",a),children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:r("record.noRelated")}),t&&e.jsxs(k.Button,{variant:"outline",size:"sm",onClick:t,className:"mt-3",children:[e.jsx(re.Plus,{className:"mr-1.5 h-3.5 w-3.5"}),r("recordDialog.addRelated")]})]});const n=new Map;for(const l of s){const i=n.get(l.type)??[];i.push(l),n.set(l.type,i)}return e.jsxs("div",{ref:o,className:b.cn("space-y-6",a),children:[t&&e.jsx("div",{className:"flex justify-end",children:e.jsxs(k.Button,{variant:"outline",size:"sm",onClick:t,children:[e.jsx(re.Plus,{className:"mr-1.5 h-3.5 w-3.5"}),r("recordDialog.addRelated")]})}),Array.from(n.entries()).map(([l,i])=>e.jsxs("div",{children:[e.jsxs("div",{className:"mb-2 flex items-center gap-1.5",children:[e.jsx(Ce,{className:"h-3.5 w-3.5 text-muted-foreground"}),e.jsxs("p",{className:"text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:[l," (",i.length,")"]})]}),e.jsx("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:i.map(m=>e.jsxs("button",{type:"button",onClick:m.onClick,className:b.cn("flex w-full items-center gap-3 rounded-lg border bg-card p-3 text-left transition-colors hover:bg-muted/50",m.onClick&&"cursor-pointer",!m.onClick&&"cursor-default"),children:[m.icon&&e.jsx("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-md bg-muted text-muted-foreground",children:m.icon}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("p",{className:"truncate text-sm font-medium",children:m.label}),m.subtitle&&e.jsx("p",{className:"truncate text-xs text-muted-foreground",children:m.subtitle})]}),m.onClick&&e.jsx(we.ChevronRight,{className:"h-4 w-4 shrink-0 text-muted-foreground/50"})]},m.id))})]},l))]})});xs.displayName="RecordDialogRelated";const hs=p.forwardRef(({actions:s=[],onSubmit:t,onCancel:a,submitLabel:o,cancelLabel:r,className:n},l)=>{const{mode:i,isSubmitting:m,setIsSubmitting:h}=Y(),{t:j}=P.useLocale(),u=s.filter(c=>!c.showInModes||c.showInModes.includes(i)),d=u.filter(c=>c.variant==="destructive"),g=u.filter(c=>c.variant!=="destructive"),f=async()=>{if(t){h(!0);try{await t()}finally{h(!1)}}},v=()=>m?j(i==="create"?"record.creating":"record.saving"):o??j(i==="create"?"record.create":"record.saveChanges"),N=i==="edit"||i==="create";return e.jsxs("div",{ref:l,className:b.cn("sticky bottom-0 z-10 flex items-center justify-between border-t bg-background px-6 py-3 sm:px-8",n),children:[e.jsx("div",{className:"flex items-center gap-2",children:d.map(c=>e.jsxs(k.Button,{variant:c.variant,size:"sm",onClick:c.onClick,disabled:c.disabled||c.loading||m,children:[c.icon&&e.jsx("span",{className:"mr-1.5",children:c.icon}),c.label]},c.id))}),e.jsxs("div",{className:"flex items-center gap-2",children:[g.map(c=>e.jsxs(k.Button,{variant:c.variant??"outline",size:"sm",onClick:c.onClick,disabled:c.disabled||c.loading||m,children:[c.icon&&e.jsx("span",{className:"mr-1.5",children:c.icon}),c.label]},c.id)),N&&a&&e.jsx(k.Button,{variant:"outline",size:"sm",onClick:a,disabled:m,children:r??j("common.cancel")}),N&&t&&e.jsxs(k.Button,{size:"sm",onClick:f,disabled:m,children:[m&&e.jsx(bs.LoaderCircle,{className:"mr-1.5 h-4 w-4 animate-spin"}),v()]})]})]})});hs.displayName="RecordDialogFooter";exports.AppShell=Se;exports.AppShellFooter=Te;exports.AppShellHeader=Re;exports.AppShellMain=Me;exports.DashboardContent=Fe;exports.DashboardFooter=qe;exports.DashboardHeader=Ee;exports.DashboardLayout=Ae;exports.DashboardMain=Be;exports.DashboardRightPanel=ze;exports.DashboardSidebar=Le;exports.PageHeader=Pe;exports.Pipeline=Ve;exports.PipelineContent=_e;exports.PipelineHeader=He;exports.PipelineKanban=ge;exports.PipelineList=fe;exports.PipelineSummary=Ke;exports.PipelineTable=je;exports.PipelineTimeline=be;exports.QuickView=ss;exports.RecordActivityComposer=Ue;exports.RecordDialog=ns;exports.RecordDialogActivity=us;exports.RecordDialogBody=os;exports.RecordDialogFields=ds;exports.RecordDialogFooter=hs;exports.RecordDialogHeader=ls;exports.RecordDialogHighlight=cs;exports.RecordDialogProvider=rs;exports.RecordDialogRelated=xs;exports.RecordDialogSection=is;exports.RecordFormDialog=ts;exports.RecordHeader=$e;exports.RecordPanel=Ge;exports.RecordPanelActivity=es;exports.RecordPanelFields=Je;exports.RecordPanelHeader=We;exports.RecordPanelTabs=Ze;exports.RecordRelated=Ye;exports.RecordShell=Xe;exports.RecordTimeline=Qe;exports.useDashboardLayout=pe;exports.usePipeline=$;exports.useRecordDialog=Y;
37
+ //# sourceMappingURL=record-dialog-footer-DpDxH5wX.cjs.map