@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
@@ -1,3551 +0,0 @@
1
- import { jsx as t, jsxs as p, Fragment as ie } from "react/jsx-runtime";
2
- import * as c from "react";
3
- import z from "react";
4
- import { g as X, P as _, j as D, m as ge, h as L, i as Ct, u as ve, e as He, c as Rt, a as W, B as fe, l as Tt, k as me, q as oo, X as no, C as so } from "./scroll-area-A3jGu-Ta.js";
5
- import { u as Z, p as Ke, q as ze, D as St, a as Et, b as At, c as Pt, y as be, z as Dt, B as _t, x as je, E as io, G as co, H as lo, P as uo, I as fo } from "./input-BgPy-4Qu.js";
6
- import { c as y } from "./index-DtaLkIY8.js";
7
- import { C as Ge } from "./chevron-down-BiUlxZA-.js";
8
- import { c as We, T as oe, a as ne, b as se, S as _e } from "./separator-DyarVo1-.js";
9
- import { u as Ue } from "./checkbox-BY2zxQVv.js";
10
- import { u as mo } from "./use-toast-DG2qdYhl.js";
11
- import * as po from "react-dom";
12
- import { a as It } from "./index-Dk_Et2WJ.js";
13
- import { c as Mt, R as ho, P as go, T as vo, O as bo, W as wo, a as yo, b as xo, D as No, C as kt } from "./index-XnFSmCuh.js";
14
- import { i as Y, b as qe, c as $t, L as Co, s as Ye, e as Xe, d as Je, f as we, g as Ot, h as Ft, a as Ro, j as To } from "./calendar-DgnhzEfp.js";
15
- import { a as So, I as vt, C as Eo, T as Ao, F as bt, M as Po } from "./progress-CTTt_CP3.js";
16
- import { A as Lt, a as Vt, b as Bt } from "./avatar-C5-ZWIqT.js";
17
- import { C as Ht } from "./chevron-right-BLyGmyaF.js";
18
- import { c as Do, t as q, n as _o, a as ye, f as G, u as re, s as Ze, p as Kt } from "./use-formatters-Bgj3JA4i.js";
19
- import { C as Io, a as Mo, c as ko, d as $o, e as Oo } from "./card-fId5vof_.js";
20
- import { L as wt, P as Fo, r as Lo, s as Vo } from "./popover-PI9jbhnS.js";
21
- import { c as Qe } from "./createLucideIcon-BC8wu-bu.js";
22
- import { S as T } from "./skeleton-Bl6FAxHT.js";
23
- import { S as Bo, c as Ho, b as Ko, d as zo, f as de } from "./select-BJpZrtep.js";
24
- var xe = "Collapsible", [jo, zt] = X(xe), [Go, et] = jo(xe), jt = c.forwardRef(
25
- (e, a) => {
26
- const {
27
- __scopeCollapsible: r,
28
- open: o,
29
- defaultOpen: n,
30
- disabled: i,
31
- onOpenChange: s,
32
- ...d
33
- } = e, [u, f] = Z({
34
- prop: o,
35
- defaultProp: n ?? !1,
36
- onChange: s,
37
- caller: xe
38
- });
39
- return /* @__PURE__ */ t(
40
- Go,
41
- {
42
- scope: r,
43
- disabled: i,
44
- contentId: Ke(),
45
- open: u,
46
- onOpenToggle: c.useCallback(() => f((m) => !m), [f]),
47
- children: /* @__PURE__ */ t(
48
- _.div,
49
- {
50
- "data-state": ot(u),
51
- "data-disabled": i ? "" : void 0,
52
- ...d,
53
- ref: a
54
- }
55
- )
56
- }
57
- );
58
- }
59
- );
60
- jt.displayName = xe;
61
- var Gt = "CollapsibleTrigger", tt = c.forwardRef(
62
- (e, a) => {
63
- const { __scopeCollapsible: r, ...o } = e, n = et(Gt, r);
64
- return /* @__PURE__ */ t(
65
- _.button,
66
- {
67
- type: "button",
68
- "aria-controls": n.contentId,
69
- "aria-expanded": n.open || !1,
70
- "data-state": ot(n.open),
71
- "data-disabled": n.disabled ? "" : void 0,
72
- disabled: n.disabled,
73
- ...o,
74
- ref: a,
75
- onClick: D(e.onClick, n.onOpenToggle)
76
- }
77
- );
78
- }
79
- );
80
- tt.displayName = Gt;
81
- var rt = "CollapsibleContent", at = c.forwardRef(
82
- (e, a) => {
83
- const { forceMount: r, ...o } = e, n = et(rt, e.__scopeCollapsible);
84
- return /* @__PURE__ */ t(ge, { present: r || n.open, children: ({ present: i }) => /* @__PURE__ */ t(Wo, { ...o, ref: a, present: i }) });
85
- }
86
- );
87
- at.displayName = rt;
88
- var Wo = c.forwardRef((e, a) => {
89
- const { __scopeCollapsible: r, present: o, children: n, ...i } = e, s = et(rt, r), [d, u] = c.useState(o), f = c.useRef(null), m = L(a, f), l = c.useRef(0), g = l.current, h = c.useRef(0), b = h.current, v = s.open || d, w = c.useRef(v), N = c.useRef(void 0);
90
- return c.useEffect(() => {
91
- const x = requestAnimationFrame(() => w.current = !1);
92
- return () => cancelAnimationFrame(x);
93
- }, []), Ct(() => {
94
- const x = f.current;
95
- if (x) {
96
- N.current = N.current || {
97
- transitionDuration: x.style.transitionDuration,
98
- animationName: x.style.animationName
99
- }, x.style.transitionDuration = "0s", x.style.animationName = "none";
100
- const C = x.getBoundingClientRect();
101
- l.current = C.height, h.current = C.width, w.current || (x.style.transitionDuration = N.current.transitionDuration, x.style.animationName = N.current.animationName), u(o);
102
- }
103
- }, [s.open, o]), /* @__PURE__ */ t(
104
- _.div,
105
- {
106
- "data-state": ot(s.open),
107
- "data-disabled": s.disabled ? "" : void 0,
108
- id: s.contentId,
109
- hidden: !v,
110
- ...i,
111
- ref: m,
112
- style: {
113
- "--radix-collapsible-content-height": g ? `${g}px` : void 0,
114
- "--radix-collapsible-content-width": b ? `${b}px` : void 0,
115
- ...e.style
116
- },
117
- children: v && n
118
- }
119
- );
120
- });
121
- function ot(e) {
122
- return e ? "open" : "closed";
123
- }
124
- var Wt = jt, Uo = tt, qo = at, U = "Accordion", Yo = ["Home", "End", "ArrowDown", "ArrowUp", "ArrowLeft", "ArrowRight"], [nt, Xo, Jo] = ze(U), [Ne] = X(U, [
125
- Jo,
126
- zt
127
- ]), st = zt(), Ut = z.forwardRef(
128
- (e, a) => {
129
- const { type: r, ...o } = e, n = o, i = o;
130
- return /* @__PURE__ */ t(nt.Provider, { scope: e.__scopeAccordion, children: r === "multiple" ? /* @__PURE__ */ t(tn, { ...i, ref: a }) : /* @__PURE__ */ t(en, { ...n, ref: a }) });
131
- }
132
- );
133
- Ut.displayName = U;
134
- var [qt, Zo] = Ne(U), [Yt, Qo] = Ne(
135
- U,
136
- { collapsible: !1 }
137
- ), en = z.forwardRef(
138
- (e, a) => {
139
- const {
140
- value: r,
141
- defaultValue: o,
142
- onValueChange: n = () => {
143
- },
144
- collapsible: i = !1,
145
- ...s
146
- } = e, [d, u] = Z({
147
- prop: r,
148
- defaultProp: o ?? "",
149
- onChange: n,
150
- caller: U
151
- });
152
- return /* @__PURE__ */ t(
153
- qt,
154
- {
155
- scope: e.__scopeAccordion,
156
- value: z.useMemo(() => d ? [d] : [], [d]),
157
- onItemOpen: u,
158
- onItemClose: z.useCallback(() => i && u(""), [i, u]),
159
- children: /* @__PURE__ */ t(Yt, { scope: e.__scopeAccordion, collapsible: i, children: /* @__PURE__ */ t(Xt, { ...s, ref: a }) })
160
- }
161
- );
162
- }
163
- ), tn = z.forwardRef((e, a) => {
164
- const {
165
- value: r,
166
- defaultValue: o,
167
- onValueChange: n = () => {
168
- },
169
- ...i
170
- } = e, [s, d] = Z({
171
- prop: r,
172
- defaultProp: o ?? [],
173
- onChange: n,
174
- caller: U
175
- }), u = z.useCallback(
176
- (m) => d((l = []) => [...l, m]),
177
- [d]
178
- ), f = z.useCallback(
179
- (m) => d((l = []) => l.filter((g) => g !== m)),
180
- [d]
181
- );
182
- return /* @__PURE__ */ t(
183
- qt,
184
- {
185
- scope: e.__scopeAccordion,
186
- value: s,
187
- onItemOpen: u,
188
- onItemClose: f,
189
- children: /* @__PURE__ */ t(Yt, { scope: e.__scopeAccordion, collapsible: !0, children: /* @__PURE__ */ t(Xt, { ...i, ref: a }) })
190
- }
191
- );
192
- }), [rn, Ce] = Ne(U), Xt = z.forwardRef(
193
- (e, a) => {
194
- const { __scopeAccordion: r, disabled: o, dir: n, orientation: i = "vertical", ...s } = e, d = z.useRef(null), u = L(d, a), f = Xo(r), l = ve(n) === "ltr", g = D(e.onKeyDown, (h) => {
195
- var $;
196
- if (!Yo.includes(h.key)) return;
197
- const b = h.target, v = f().filter((M) => {
198
- var k;
199
- return !((k = M.ref.current) != null && k.disabled);
200
- }), w = v.findIndex((M) => M.ref.current === b), N = v.length;
201
- if (w === -1) return;
202
- h.preventDefault();
203
- let x = w;
204
- const C = 0, R = N - 1, S = () => {
205
- x = w + 1, x > R && (x = C);
206
- }, I = () => {
207
- x = w - 1, x < C && (x = R);
208
- };
209
- switch (h.key) {
210
- case "Home":
211
- x = C;
212
- break;
213
- case "End":
214
- x = R;
215
- break;
216
- case "ArrowRight":
217
- i === "horizontal" && (l ? S() : I());
218
- break;
219
- case "ArrowDown":
220
- i === "vertical" && S();
221
- break;
222
- case "ArrowLeft":
223
- i === "horizontal" && (l ? I() : S());
224
- break;
225
- case "ArrowUp":
226
- i === "vertical" && I();
227
- break;
228
- }
229
- const A = x % N;
230
- ($ = v[A].ref.current) == null || $.focus();
231
- });
232
- return /* @__PURE__ */ t(
233
- rn,
234
- {
235
- scope: r,
236
- disabled: o,
237
- direction: n,
238
- orientation: i,
239
- children: /* @__PURE__ */ t(nt.Slot, { scope: r, children: /* @__PURE__ */ t(
240
- _.div,
241
- {
242
- ...s,
243
- "data-orientation": i,
244
- ref: u,
245
- onKeyDown: o ? void 0 : g
246
- }
247
- ) })
248
- }
249
- );
250
- }
251
- ), pe = "AccordionItem", [an, it] = Ne(pe), Jt = z.forwardRef(
252
- (e, a) => {
253
- const { __scopeAccordion: r, value: o, ...n } = e, i = Ce(pe, r), s = Zo(pe, r), d = st(r), u = Ke(), f = o && s.value.includes(o) || !1, m = i.disabled || e.disabled;
254
- return /* @__PURE__ */ t(
255
- an,
256
- {
257
- scope: r,
258
- open: f,
259
- disabled: m,
260
- triggerId: u,
261
- children: /* @__PURE__ */ t(
262
- Wt,
263
- {
264
- "data-orientation": i.orientation,
265
- "data-state": ar(f),
266
- ...d,
267
- ...n,
268
- ref: a,
269
- disabled: m,
270
- open: f,
271
- onOpenChange: (l) => {
272
- l ? s.onItemOpen(o) : s.onItemClose(o);
273
- }
274
- }
275
- )
276
- }
277
- );
278
- }
279
- );
280
- Jt.displayName = pe;
281
- var Zt = "AccordionHeader", Qt = z.forwardRef(
282
- (e, a) => {
283
- const { __scopeAccordion: r, ...o } = e, n = Ce(U, r), i = it(Zt, r);
284
- return /* @__PURE__ */ t(
285
- _.h3,
286
- {
287
- "data-orientation": n.orientation,
288
- "data-state": ar(i.open),
289
- "data-disabled": i.disabled ? "" : void 0,
290
- ...o,
291
- ref: a
292
- }
293
- );
294
- }
295
- );
296
- Qt.displayName = Zt;
297
- var ke = "AccordionTrigger", er = z.forwardRef(
298
- (e, a) => {
299
- const { __scopeAccordion: r, ...o } = e, n = Ce(U, r), i = it(ke, r), s = Qo(ke, r), d = st(r);
300
- return /* @__PURE__ */ t(nt.ItemSlot, { scope: r, children: /* @__PURE__ */ t(
301
- Uo,
302
- {
303
- "aria-disabled": i.open && !s.collapsible || void 0,
304
- "data-orientation": n.orientation,
305
- id: i.triggerId,
306
- ...d,
307
- ...o,
308
- ref: a
309
- }
310
- ) });
311
- }
312
- );
313
- er.displayName = ke;
314
- var tr = "AccordionContent", rr = z.forwardRef(
315
- (e, a) => {
316
- const { __scopeAccordion: r, ...o } = e, n = Ce(U, r), i = it(tr, r), s = st(r);
317
- return /* @__PURE__ */ t(
318
- qo,
319
- {
320
- role: "region",
321
- "aria-labelledby": i.triggerId,
322
- "data-orientation": n.orientation,
323
- ...s,
324
- ...o,
325
- ref: a,
326
- style: {
327
- "--radix-accordion-content-height": "var(--radix-collapsible-content-height)",
328
- "--radix-accordion-content-width": "var(--radix-collapsible-content-width)",
329
- ...e.style
330
- }
331
- }
332
- );
333
- }
334
- );
335
- rr.displayName = tr;
336
- function ar(e) {
337
- return e ? "open" : "closed";
338
- }
339
- var on = Ut, nn = Jt, sn = Qt, or = er, nr = rr;
340
- /**
341
- * @license lucide-react v0.441.0 - ISC
342
- *
343
- * This source code is licensed under the ISC license.
344
- * See the LICENSE file in the root directory of this source tree.
345
- */
346
- const yt = Qe("Download", [
347
- ["path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4", key: "ih7n3h" }],
348
- ["polyline", { points: "7 10 12 15 17 10", key: "2ggqvy" }],
349
- ["line", { x1: "12", x2: "12", y1: "15", y2: "3", key: "1vk2je" }]
350
- ]);
351
- /**
352
- * @license lucide-react v0.441.0 - ISC
353
- *
354
- * This source code is licensed under the ISC license.
355
- * See the LICENSE file in the root directory of this source tree.
356
- */
357
- const cn = Qe("FileJson", [
358
- ["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z", key: "1rqfz7" }],
359
- ["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
360
- [
361
- "path",
362
- { d: "M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1", key: "1oajmo" }
363
- ],
364
- [
365
- "path",
366
- { d: "M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1", key: "mpwhp6" }
367
- ]
368
- ]);
369
- /**
370
- * @license lucide-react v0.441.0 - ISC
371
- *
372
- * This source code is licensed under the ISC license.
373
- * See the LICENSE file in the root directory of this source tree.
374
- */
375
- const ln = Qe("FileSpreadsheet", [
376
- ["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z", key: "1rqfz7" }],
377
- ["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
378
- ["path", { d: "M8 13h2", key: "yr2amv" }],
379
- ["path", { d: "M14 13h2", key: "un5t4a" }],
380
- ["path", { d: "M8 17h2", key: "2yhykz" }],
381
- ["path", { d: "M14 17h2", key: "10kma7" }]
382
- ]), Qi = on, dn = c.forwardRef(({ className: e, ...a }, r) => /* @__PURE__ */ t(nn, { ref: r, className: y("border-b", e), ...a }));
383
- dn.displayName = "AccordionItem";
384
- const un = c.forwardRef(({ className: e, children: a, ...r }, o) => /* @__PURE__ */ t(sn, { className: "flex", children: /* @__PURE__ */ p(
385
- or,
386
- {
387
- ref: o,
388
- className: y(
389
- "flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",
390
- e
391
- ),
392
- ...r,
393
- children: [
394
- a,
395
- /* @__PURE__ */ t(Ge, { className: "h-4 w-4 shrink-0 transition-transform duration-200" })
396
- ]
397
- }
398
- ) }));
399
- un.displayName = or.displayName;
400
- const fn = c.forwardRef(({ className: e, children: a, ...r }, o) => /* @__PURE__ */ t(
401
- nr,
402
- {
403
- ref: o,
404
- className: "overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",
405
- ...r,
406
- children: /* @__PURE__ */ t("div", { className: y("pb-4 pt-0", e), children: a })
407
- }
408
- ));
409
- fn.displayName = nr.displayName;
410
- const mn = He(
411
- "relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",
412
- {
413
- variants: {
414
- variant: {
415
- default: "bg-background text-foreground",
416
- destructive: "border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive",
417
- success: "border-success/50 text-success dark:border-success [&>svg]:text-success bg-success/10",
418
- warning: "border-warning/50 text-warning dark:border-warning [&>svg]:text-warning bg-warning/10",
419
- info: "border-info/50 text-info dark:border-info [&>svg]:text-info bg-info/10"
420
- }
421
- },
422
- defaultVariants: {
423
- variant: "default"
424
- }
425
- }
426
- ), pn = c.forwardRef(({ className: e, variant: a, ...r }, o) => /* @__PURE__ */ t("div", { ref: o, role: "alert", className: y(mn({ variant: a }), e), ...r }));
427
- pn.displayName = "Alert";
428
- const hn = c.forwardRef(
429
- ({ className: e, ...a }, r) => /* @__PURE__ */ t(
430
- "h5",
431
- {
432
- ref: r,
433
- className: y("mb-1 font-medium leading-none tracking-tight", e),
434
- ...a
435
- }
436
- )
437
- );
438
- hn.displayName = "AlertTitle";
439
- const gn = c.forwardRef(({ className: e, ...a }, r) => /* @__PURE__ */ t("div", { ref: r, className: y("text-sm [&_p]:leading-relaxed", e), ...a }));
440
- gn.displayName = "AlertDescription";
441
- var vn = Symbol("radix.slottable");
442
- // @__NO_SIDE_EFFECTS__
443
- function bn(e) {
444
- const a = ({ children: r }) => /* @__PURE__ */ t(ie, { children: r });
445
- return a.displayName = `${e}.Slottable`, a.__radixId = vn, a;
446
- }
447
- var sr = "AlertDialog", [wn] = X(sr, [
448
- Mt
449
- ]), J = Mt(), ir = (e) => {
450
- const { __scopeAlertDialog: a, ...r } = e, o = J(a);
451
- return /* @__PURE__ */ t(ho, { ...o, ...r, modal: !0 });
452
- };
453
- ir.displayName = sr;
454
- var yn = "AlertDialogTrigger", cr = c.forwardRef(
455
- (e, a) => {
456
- const { __scopeAlertDialog: r, ...o } = e, n = J(r);
457
- return /* @__PURE__ */ t(vo, { ...n, ...o, ref: a });
458
- }
459
- );
460
- cr.displayName = yn;
461
- var xn = "AlertDialogPortal", lr = (e) => {
462
- const { __scopeAlertDialog: a, ...r } = e, o = J(a);
463
- return /* @__PURE__ */ t(go, { ...o, ...r });
464
- };
465
- lr.displayName = xn;
466
- var Nn = "AlertDialogOverlay", dr = c.forwardRef(
467
- (e, a) => {
468
- const { __scopeAlertDialog: r, ...o } = e, n = J(r);
469
- return /* @__PURE__ */ t(bo, { ...n, ...o, ref: a });
470
- }
471
- );
472
- dr.displayName = Nn;
473
- var ee = "AlertDialogContent", [Cn, Rn] = wn(ee), Tn = /* @__PURE__ */ bn("AlertDialogContent"), ur = c.forwardRef(
474
- (e, a) => {
475
- const { __scopeAlertDialog: r, children: o, ...n } = e, i = J(r), s = c.useRef(null), d = L(a, s), u = c.useRef(null);
476
- return /* @__PURE__ */ t(
477
- wo,
478
- {
479
- contentName: ee,
480
- titleName: fr,
481
- docsSlug: "alert-dialog",
482
- children: /* @__PURE__ */ t(Cn, { scope: r, cancelRef: u, children: /* @__PURE__ */ p(
483
- yo,
484
- {
485
- role: "alertdialog",
486
- ...i,
487
- ...n,
488
- ref: d,
489
- onOpenAutoFocus: D(n.onOpenAutoFocus, (f) => {
490
- var m;
491
- f.preventDefault(), (m = u.current) == null || m.focus({ preventScroll: !0 });
492
- }),
493
- onPointerDownOutside: (f) => f.preventDefault(),
494
- onInteractOutside: (f) => f.preventDefault(),
495
- children: [
496
- /* @__PURE__ */ t(Tn, { children: o }),
497
- /* @__PURE__ */ t(En, { contentRef: s })
498
- ]
499
- }
500
- ) })
501
- }
502
- );
503
- }
504
- );
505
- ur.displayName = ee;
506
- var fr = "AlertDialogTitle", mr = c.forwardRef(
507
- (e, a) => {
508
- const { __scopeAlertDialog: r, ...o } = e, n = J(r);
509
- return /* @__PURE__ */ t(xo, { ...n, ...o, ref: a });
510
- }
511
- );
512
- mr.displayName = fr;
513
- var pr = "AlertDialogDescription", hr = c.forwardRef((e, a) => {
514
- const { __scopeAlertDialog: r, ...o } = e, n = J(r);
515
- return /* @__PURE__ */ t(No, { ...n, ...o, ref: a });
516
- });
517
- hr.displayName = pr;
518
- var Sn = "AlertDialogAction", gr = c.forwardRef(
519
- (e, a) => {
520
- const { __scopeAlertDialog: r, ...o } = e, n = J(r);
521
- return /* @__PURE__ */ t(kt, { ...n, ...o, ref: a });
522
- }
523
- );
524
- gr.displayName = Sn;
525
- var vr = "AlertDialogCancel", br = c.forwardRef(
526
- (e, a) => {
527
- const { __scopeAlertDialog: r, ...o } = e, { cancelRef: n } = Rn(vr, r), i = J(r), s = L(a, n);
528
- return /* @__PURE__ */ t(kt, { ...i, ...o, ref: s });
529
- }
530
- );
531
- br.displayName = vr;
532
- var En = ({ contentRef: e }) => {
533
- const a = `\`${ee}\` requires a description for the component to be accessible for screen reader users.
534
-
535
- You can add a description to the \`${ee}\` by passing a \`${pr}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
536
-
537
- Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${ee}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
538
-
539
- For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;
540
- return c.useEffect(() => {
541
- var o;
542
- document.getElementById(
543
- (o = e.current) == null ? void 0 : o.getAttribute("aria-describedby")
544
- ) || console.warn(a);
545
- }, [a, e]), null;
546
- }, An = ir, Pn = cr, Dn = lr, wr = dr, yr = ur, xr = gr, Nr = br, Cr = mr, Rr = hr;
547
- const _n = An, ec = Pn, In = Dn, Tr = c.forwardRef(({ className: e, ...a }, r) => /* @__PURE__ */ t(
548
- wr,
549
- {
550
- className: y(
551
- "fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
552
- e
553
- ),
554
- ...a,
555
- ref: r
556
- }
557
- ));
558
- Tr.displayName = wr.displayName;
559
- const Sr = c.forwardRef(({ className: e, ...a }, r) => /* @__PURE__ */ p(In, { children: [
560
- /* @__PURE__ */ t(Tr, {}),
561
- /* @__PURE__ */ t(
562
- yr,
563
- {
564
- ref: r,
565
- className: y(
566
- "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
567
- e
568
- ),
569
- ...a
570
- }
571
- )
572
- ] }));
573
- Sr.displayName = yr.displayName;
574
- const Er = ({ className: e, ...a }) => /* @__PURE__ */ t("div", { className: y("flex flex-col space-y-2 text-center sm:text-left", e), ...a });
575
- Er.displayName = "AlertDialogHeader";
576
- const Ar = ({ className: e, ...a }) => /* @__PURE__ */ t(
577
- "div",
578
- {
579
- className: y("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", e),
580
- ...a
581
- }
582
- );
583
- Ar.displayName = "AlertDialogFooter";
584
- const Pr = c.forwardRef(({ className: e, ...a }, r) => /* @__PURE__ */ t(
585
- Cr,
586
- {
587
- ref: r,
588
- className: y("text-lg font-semibold", e),
589
- ...a
590
- }
591
- ));
592
- Pr.displayName = Cr.displayName;
593
- const Dr = c.forwardRef(({ className: e, ...a }, r) => /* @__PURE__ */ t(
594
- Rr,
595
- {
596
- ref: r,
597
- className: y("text-sm text-muted-foreground", e),
598
- ...a
599
- }
600
- ));
601
- Dr.displayName = Rr.displayName;
602
- const _r = c.forwardRef(({ className: e, ...a }, r) => /* @__PURE__ */ t(xr, { ref: r, className: y(Rt(), e), ...a }));
603
- _r.displayName = xr.displayName;
604
- const Ir = c.forwardRef(({ className: e, ...a }, r) => /* @__PURE__ */ t(
605
- Nr,
606
- {
607
- ref: r,
608
- className: y(Rt({ variant: "outline" }), "mt-2 sm:mt-0", e),
609
- ...a
610
- }
611
- ));
612
- Ir.displayName = Nr.displayName;
613
- const Mn = c.forwardRef(
614
- ({
615
- className: e,
616
- variant: a = "default",
617
- size: r = "default",
618
- children: o,
619
- options: n,
620
- onClick: i,
621
- dropdownAlign: s = "end",
622
- disabled: d,
623
- ...u
624
- }, f) => /* @__PURE__ */ p("div", { className: "flex", children: [
625
- /* @__PURE__ */ t(
626
- W,
627
- {
628
- ref: f,
629
- variant: a,
630
- size: r,
631
- className: y("rounded-r-none border-r-0", e),
632
- onClick: i,
633
- disabled: d,
634
- ...u,
635
- children: o
636
- }
637
- ),
638
- /* @__PURE__ */ p(St, { children: [
639
- /* @__PURE__ */ t(Et, { asChild: !0, children: /* @__PURE__ */ p(
640
- W,
641
- {
642
- variant: a,
643
- size: r,
644
- className: "rounded-l-none px-2",
645
- disabled: d,
646
- children: [
647
- /* @__PURE__ */ t(Ge, { className: "h-4 w-4" }),
648
- /* @__PURE__ */ t("span", { className: "sr-only", children: "More options" })
649
- ]
650
- }
651
- ) }),
652
- /* @__PURE__ */ t(At, { align: s, children: n.map((m, l) => /* @__PURE__ */ p(
653
- Pt,
654
- {
655
- onClick: m.onClick,
656
- disabled: m.disabled,
657
- className: "flex items-center gap-2",
658
- children: [
659
- m.icon && /* @__PURE__ */ t("span", { className: "h-4 w-4", children: m.icon }),
660
- m.label
661
- ]
662
- },
663
- l
664
- )) })
665
- ] })
666
- ] })
667
- );
668
- Mn.displayName = "SplitButton";
669
- const kn = He(
670
- "inline-flex items-center justify-center rounded-lg transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
671
- {
672
- variants: {
673
- variant: {
674
- default: "bg-primary text-primary-foreground hover:bg-primary/90",
675
- destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
676
- outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
677
- secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
678
- ghost: "hover:bg-accent hover:text-accent-foreground",
679
- link: "text-primary underline-offset-4 hover:underline"
680
- },
681
- size: {
682
- default: "h-10 w-10",
683
- sm: "h-8 w-8",
684
- lg: "h-12 w-12",
685
- xl: "h-14 w-14"
686
- }
687
- },
688
- defaultVariants: {
689
- variant: "default",
690
- size: "default"
691
- }
692
- }
693
- ), $n = c.forwardRef(
694
- ({
695
- className: e,
696
- variant: a,
697
- size: r,
698
- icon: o,
699
- tooltip: n,
700
- tooltipSide: i = "top",
701
- loading: s = !1,
702
- disabled: d,
703
- ...u
704
- }, f) => {
705
- const m = /* @__PURE__ */ t(
706
- "button",
707
- {
708
- ref: f,
709
- className: y(kn({ variant: a, size: r }), e),
710
- disabled: d || s,
711
- ...u,
712
- children: s ? /* @__PURE__ */ p(
713
- "svg",
714
- {
715
- className: "h-4 w-4 animate-spin",
716
- xmlns: "http://www.w3.org/2000/svg",
717
- fill: "none",
718
- viewBox: "0 0 24 24",
719
- children: [
720
- /* @__PURE__ */ t(
721
- "circle",
722
- {
723
- className: "opacity-25",
724
- cx: "12",
725
- cy: "12",
726
- r: "10",
727
- stroke: "currentColor",
728
- strokeWidth: "4"
729
- }
730
- ),
731
- /* @__PURE__ */ t(
732
- "path",
733
- {
734
- className: "opacity-75",
735
- fill: "currentColor",
736
- d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
737
- }
738
- )
739
- ]
740
- }
741
- ) : o
742
- }
743
- );
744
- return n ? /* @__PURE__ */ t(We, { children: /* @__PURE__ */ p(oe, { children: [
745
- /* @__PURE__ */ t(ne, { asChild: !0, children: m }),
746
- /* @__PURE__ */ t(se, { side: i, children: /* @__PURE__ */ t("p", { children: n }) })
747
- ] }) }) : m;
748
- }
749
- );
750
- $n.displayName = "IconButton";
751
- const On = c.forwardRef(
752
- ({
753
- className: e,
754
- children: a,
755
- badge: r,
756
- badgeVariant: o = "destructive",
757
- badgePosition: n = "top-right",
758
- showBadge: i = !0,
759
- ...s
760
- }, d) => {
761
- const u = i && r !== void 0 && r !== null && r !== "";
762
- if (n === "inline")
763
- return /* @__PURE__ */ p(W, { ref: d, className: y("gap-2", e), ...s, children: [
764
- a,
765
- u && /* @__PURE__ */ t(fe, { variant: o, className: "ml-1 h-5 min-w-5 rounded-full px-1.5", children: r })
766
- ] });
767
- const f = {
768
- "top-right": "-right-1 -top-1",
769
- "top-left": "-left-1 -top-1",
770
- "bottom-right": "-bottom-1 -right-1",
771
- "bottom-left": "-bottom-1 -left-1"
772
- };
773
- return /* @__PURE__ */ p("div", { className: "relative inline-flex", children: [
774
- /* @__PURE__ */ t(W, { ref: d, className: e, ...s, children: a }),
775
- u && /* @__PURE__ */ t(
776
- fe,
777
- {
778
- variant: o,
779
- className: y(
780
- "absolute flex h-5 min-w-5 items-center justify-center rounded-full px-1.5 text-xs",
781
- f[n]
782
- ),
783
- children: typeof r == "number" && r > 99 ? "99+" : r
784
- }
785
- )
786
- ] });
787
- }
788
- );
789
- On.displayName = "ButtonWithBadge";
790
- const tc = Wt, rc = tt, ac = at;
791
- var ct = "Radio", [Fn, Mr] = X(ct), [Ln, Vn] = Fn(ct), kr = c.forwardRef(
792
- (e, a) => {
793
- const {
794
- __scopeRadio: r,
795
- name: o,
796
- checked: n = !1,
797
- required: i,
798
- disabled: s,
799
- value: d = "on",
800
- onCheck: u,
801
- form: f,
802
- ...m
803
- } = e, [l, g] = c.useState(null), h = L(a, (w) => g(w)), b = c.useRef(!1), v = l ? f || !!l.closest("form") : !0;
804
- return /* @__PURE__ */ p(Ln, { scope: r, checked: n, disabled: s, children: [
805
- /* @__PURE__ */ t(
806
- _.button,
807
- {
808
- type: "button",
809
- role: "radio",
810
- "aria-checked": n,
811
- "data-state": Lr(n),
812
- "data-disabled": s ? "" : void 0,
813
- disabled: s,
814
- value: d,
815
- ...m,
816
- ref: h,
817
- onClick: D(e.onClick, (w) => {
818
- n || u == null || u(), v && (b.current = w.isPropagationStopped(), b.current || w.stopPropagation());
819
- })
820
- }
821
- ),
822
- v && /* @__PURE__ */ t(
823
- Fr,
824
- {
825
- control: l,
826
- bubbles: !b.current,
827
- name: o,
828
- value: d,
829
- checked: n,
830
- required: i,
831
- disabled: s,
832
- form: f,
833
- style: { transform: "translateX(-100%)" }
834
- }
835
- )
836
- ] });
837
- }
838
- );
839
- kr.displayName = ct;
840
- var $r = "RadioIndicator", Or = c.forwardRef(
841
- (e, a) => {
842
- const { __scopeRadio: r, forceMount: o, ...n } = e, i = Vn($r, r);
843
- return /* @__PURE__ */ t(ge, { present: o || i.checked, children: /* @__PURE__ */ t(
844
- _.span,
845
- {
846
- "data-state": Lr(i.checked),
847
- "data-disabled": i.disabled ? "" : void 0,
848
- ...n,
849
- ref: a
850
- }
851
- ) });
852
- }
853
- );
854
- Or.displayName = $r;
855
- var Bn = "RadioBubbleInput", Fr = c.forwardRef(
856
- ({
857
- __scopeRadio: e,
858
- control: a,
859
- checked: r,
860
- bubbles: o = !0,
861
- ...n
862
- }, i) => {
863
- const s = c.useRef(null), d = L(s, i), u = Ue(r), f = je(a);
864
- return c.useEffect(() => {
865
- const m = s.current;
866
- if (!m) return;
867
- const l = window.HTMLInputElement.prototype, h = Object.getOwnPropertyDescriptor(
868
- l,
869
- "checked"
870
- ).set;
871
- if (u !== r && h) {
872
- const b = new Event("click", { bubbles: o });
873
- h.call(m, r), m.dispatchEvent(b);
874
- }
875
- }, [u, r, o]), /* @__PURE__ */ t(
876
- _.input,
877
- {
878
- type: "radio",
879
- "aria-hidden": !0,
880
- defaultChecked: r,
881
- ...n,
882
- tabIndex: -1,
883
- ref: d,
884
- style: {
885
- ...n.style,
886
- ...f,
887
- position: "absolute",
888
- pointerEvents: "none",
889
- opacity: 0,
890
- margin: 0
891
- }
892
- }
893
- );
894
- }
895
- );
896
- Fr.displayName = Bn;
897
- function Lr(e) {
898
- return e ? "checked" : "unchecked";
899
- }
900
- var Hn = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], Re = "RadioGroup", [Kn] = X(Re, [
901
- be,
902
- Mr
903
- ]), Vr = be(), Br = Mr(), [zn, jn] = Kn(Re), Hr = c.forwardRef(
904
- (e, a) => {
905
- const {
906
- __scopeRadioGroup: r,
907
- name: o,
908
- defaultValue: n,
909
- value: i,
910
- required: s = !1,
911
- disabled: d = !1,
912
- orientation: u,
913
- dir: f,
914
- loop: m = !0,
915
- onValueChange: l,
916
- ...g
917
- } = e, h = Vr(r), b = ve(f), [v, w] = Z({
918
- prop: i,
919
- defaultProp: n ?? null,
920
- onChange: l,
921
- caller: Re
922
- });
923
- return /* @__PURE__ */ t(
924
- zn,
925
- {
926
- scope: r,
927
- name: o,
928
- required: s,
929
- disabled: d,
930
- value: v,
931
- onValueChange: w,
932
- children: /* @__PURE__ */ t(
933
- Dt,
934
- {
935
- asChild: !0,
936
- ...h,
937
- orientation: u,
938
- dir: b,
939
- loop: m,
940
- children: /* @__PURE__ */ t(
941
- _.div,
942
- {
943
- role: "radiogroup",
944
- "aria-required": s,
945
- "aria-orientation": u,
946
- "data-disabled": d ? "" : void 0,
947
- dir: b,
948
- ...g,
949
- ref: a
950
- }
951
- )
952
- }
953
- )
954
- }
955
- );
956
- }
957
- );
958
- Hr.displayName = Re;
959
- var Kr = "RadioGroupItem", zr = c.forwardRef(
960
- (e, a) => {
961
- const { __scopeRadioGroup: r, disabled: o, ...n } = e, i = jn(Kr, r), s = i.disabled || o, d = Vr(r), u = Br(r), f = c.useRef(null), m = L(a, f), l = i.value === n.value, g = c.useRef(!1);
962
- return c.useEffect(() => {
963
- const h = (v) => {
964
- Hn.includes(v.key) && (g.current = !0);
965
- }, b = () => g.current = !1;
966
- return document.addEventListener("keydown", h), document.addEventListener("keyup", b), () => {
967
- document.removeEventListener("keydown", h), document.removeEventListener("keyup", b);
968
- };
969
- }, []), /* @__PURE__ */ t(
970
- _t,
971
- {
972
- asChild: !0,
973
- ...d,
974
- focusable: !s,
975
- active: l,
976
- children: /* @__PURE__ */ t(
977
- kr,
978
- {
979
- disabled: s,
980
- required: i.required,
981
- checked: l,
982
- ...u,
983
- ...n,
984
- name: i.name,
985
- ref: m,
986
- onCheck: () => i.onValueChange(n.value),
987
- onKeyDown: D((h) => {
988
- h.key === "Enter" && h.preventDefault();
989
- }),
990
- onFocus: D(n.onFocus, () => {
991
- var h;
992
- g.current && ((h = f.current) == null || h.click());
993
- })
994
- }
995
- )
996
- }
997
- );
998
- }
999
- );
1000
- zr.displayName = Kr;
1001
- var Gn = "RadioGroupIndicator", jr = c.forwardRef(
1002
- (e, a) => {
1003
- const { __scopeRadioGroup: r, ...o } = e, n = Br(r);
1004
- return /* @__PURE__ */ t(Or, { ...n, ...o, ref: a });
1005
- }
1006
- );
1007
- jr.displayName = Gn;
1008
- var Gr = Hr, Wr = zr, Wn = jr;
1009
- const Un = c.forwardRef(({ className: e, ...a }, r) => /* @__PURE__ */ t(Gr, { className: y("grid gap-2", e), ...a, ref: r }));
1010
- Un.displayName = Gr.displayName;
1011
- const qn = c.forwardRef(({ className: e, ...a }, r) => /* @__PURE__ */ t(
1012
- Wr,
1013
- {
1014
- ref: r,
1015
- className: y(
1016
- "aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
1017
- e
1018
- ),
1019
- ...a,
1020
- children: /* @__PURE__ */ t(Wn, { className: "flex items-center justify-center", children: /* @__PURE__ */ t(io, { className: "h-2.5 w-2.5 fill-current text-current" }) })
1021
- }
1022
- ));
1023
- qn.displayName = Wr.displayName;
1024
- var Ur = ["PageUp", "PageDown"], qr = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], Yr = {
1025
- "from-left": ["Home", "PageDown", "ArrowDown", "ArrowLeft"],
1026
- "from-right": ["Home", "PageDown", "ArrowDown", "ArrowRight"],
1027
- "from-bottom": ["Home", "PageDown", "ArrowDown", "ArrowLeft"],
1028
- "from-top": ["Home", "PageDown", "ArrowUp", "ArrowLeft"]
1029
- }, ae = "Slider", [$e, Yn, Xn] = ze(ae), [Xr] = X(ae, [
1030
- Xn
1031
- ]), [Jn, Te] = Xr(ae), Jr = c.forwardRef(
1032
- (e, a) => {
1033
- const {
1034
- name: r,
1035
- min: o = 0,
1036
- max: n = 100,
1037
- step: i = 1,
1038
- orientation: s = "horizontal",
1039
- disabled: d = !1,
1040
- minStepsBetweenThumbs: u = 0,
1041
- defaultValue: f = [o],
1042
- value: m,
1043
- onValueChange: l = () => {
1044
- },
1045
- onValueCommit: g = () => {
1046
- },
1047
- inverted: h = !1,
1048
- form: b,
1049
- ...v
1050
- } = e, w = c.useRef(/* @__PURE__ */ new Set()), N = c.useRef(0), C = s === "horizontal" ? Zn : Qn, [R = [], S] = Z({
1051
- prop: m,
1052
- defaultProp: f,
1053
- onChange: (P) => {
1054
- var B;
1055
- (B = [...w.current][N.current]) == null || B.focus(), l(P);
1056
- }
1057
- }), I = c.useRef(R);
1058
- function A(P) {
1059
- const O = os(R, P);
1060
- k(P, O);
1061
- }
1062
- function $(P) {
1063
- k(P, N.current);
1064
- }
1065
- function M() {
1066
- const P = I.current[N.current];
1067
- R[N.current] !== P && g(R);
1068
- }
1069
- function k(P, O, { commit: B } = { commit: !1 }) {
1070
- const E = cs(i), V = ls(Math.round((P - o) / i) * i + o, E), H = Tt(V, [o, n]);
1071
- S((j = []) => {
1072
- const K = rs(j, H, O);
1073
- if (is(K, u * i)) {
1074
- N.current = K.indexOf(H);
1075
- const Q = String(K) !== String(j);
1076
- return Q && B && g(K), Q ? K : j;
1077
- } else
1078
- return j;
1079
- });
1080
- }
1081
- return /* @__PURE__ */ t(
1082
- Jn,
1083
- {
1084
- scope: e.__scopeSlider,
1085
- name: r,
1086
- disabled: d,
1087
- min: o,
1088
- max: n,
1089
- valueIndexToChangeRef: N,
1090
- thumbs: w.current,
1091
- values: R,
1092
- orientation: s,
1093
- form: b,
1094
- children: /* @__PURE__ */ t($e.Provider, { scope: e.__scopeSlider, children: /* @__PURE__ */ t($e.Slot, { scope: e.__scopeSlider, children: /* @__PURE__ */ t(
1095
- C,
1096
- {
1097
- "aria-disabled": d,
1098
- "data-disabled": d ? "" : void 0,
1099
- ...v,
1100
- ref: a,
1101
- onPointerDown: D(v.onPointerDown, () => {
1102
- d || (I.current = R);
1103
- }),
1104
- min: o,
1105
- max: n,
1106
- inverted: h,
1107
- onSlideStart: d ? void 0 : A,
1108
- onSlideMove: d ? void 0 : $,
1109
- onSlideEnd: d ? void 0 : M,
1110
- onHomeKeyDown: () => !d && k(o, 0, { commit: !0 }),
1111
- onEndKeyDown: () => !d && k(n, R.length - 1, { commit: !0 }),
1112
- onStepKeyDown: ({ event: P, direction: O }) => {
1113
- if (!d) {
1114
- const V = Ur.includes(P.key) || P.shiftKey && qr.includes(P.key) ? 10 : 1, H = N.current, j = R[H], K = i * V * O;
1115
- k(j + K, H, { commit: !0 });
1116
- }
1117
- }
1118
- }
1119
- ) }) })
1120
- }
1121
- );
1122
- }
1123
- );
1124
- Jr.displayName = ae;
1125
- var [Zr, Qr] = Xr(ae, {
1126
- startEdge: "left",
1127
- endEdge: "right",
1128
- size: "width",
1129
- direction: 1
1130
- }), Zn = c.forwardRef(
1131
- (e, a) => {
1132
- const {
1133
- min: r,
1134
- max: o,
1135
- dir: n,
1136
- inverted: i,
1137
- onSlideStart: s,
1138
- onSlideMove: d,
1139
- onSlideEnd: u,
1140
- onStepKeyDown: f,
1141
- ...m
1142
- } = e, [l, g] = c.useState(null), h = L(a, (C) => g(C)), b = c.useRef(void 0), v = ve(n), w = v === "ltr", N = w && !i || !w && i;
1143
- function x(C) {
1144
- const R = b.current || l.getBoundingClientRect(), S = [0, R.width], A = lt(S, N ? [r, o] : [o, r]);
1145
- return b.current = R, A(C - R.left);
1146
- }
1147
- return /* @__PURE__ */ t(
1148
- Zr,
1149
- {
1150
- scope: e.__scopeSlider,
1151
- startEdge: N ? "left" : "right",
1152
- endEdge: N ? "right" : "left",
1153
- direction: N ? 1 : -1,
1154
- size: "width",
1155
- children: /* @__PURE__ */ t(
1156
- ea,
1157
- {
1158
- dir: v,
1159
- "data-orientation": "horizontal",
1160
- ...m,
1161
- ref: h,
1162
- style: {
1163
- ...m.style,
1164
- "--radix-slider-thumb-transform": "translateX(-50%)"
1165
- },
1166
- onSlideStart: (C) => {
1167
- const R = x(C.clientX);
1168
- s == null || s(R);
1169
- },
1170
- onSlideMove: (C) => {
1171
- const R = x(C.clientX);
1172
- d == null || d(R);
1173
- },
1174
- onSlideEnd: () => {
1175
- b.current = void 0, u == null || u();
1176
- },
1177
- onStepKeyDown: (C) => {
1178
- const S = Yr[N ? "from-left" : "from-right"].includes(C.key);
1179
- f == null || f({ event: C, direction: S ? -1 : 1 });
1180
- }
1181
- }
1182
- )
1183
- }
1184
- );
1185
- }
1186
- ), Qn = c.forwardRef(
1187
- (e, a) => {
1188
- const {
1189
- min: r,
1190
- max: o,
1191
- inverted: n,
1192
- onSlideStart: i,
1193
- onSlideMove: s,
1194
- onSlideEnd: d,
1195
- onStepKeyDown: u,
1196
- ...f
1197
- } = e, m = c.useRef(null), l = L(a, m), g = c.useRef(void 0), h = !n;
1198
- function b(v) {
1199
- const w = g.current || m.current.getBoundingClientRect(), N = [0, w.height], C = lt(N, h ? [o, r] : [r, o]);
1200
- return g.current = w, C(v - w.top);
1201
- }
1202
- return /* @__PURE__ */ t(
1203
- Zr,
1204
- {
1205
- scope: e.__scopeSlider,
1206
- startEdge: h ? "bottom" : "top",
1207
- endEdge: h ? "top" : "bottom",
1208
- size: "height",
1209
- direction: h ? 1 : -1,
1210
- children: /* @__PURE__ */ t(
1211
- ea,
1212
- {
1213
- "data-orientation": "vertical",
1214
- ...f,
1215
- ref: l,
1216
- style: {
1217
- ...f.style,
1218
- "--radix-slider-thumb-transform": "translateY(50%)"
1219
- },
1220
- onSlideStart: (v) => {
1221
- const w = b(v.clientY);
1222
- i == null || i(w);
1223
- },
1224
- onSlideMove: (v) => {
1225
- const w = b(v.clientY);
1226
- s == null || s(w);
1227
- },
1228
- onSlideEnd: () => {
1229
- g.current = void 0, d == null || d();
1230
- },
1231
- onStepKeyDown: (v) => {
1232
- const N = Yr[h ? "from-bottom" : "from-top"].includes(v.key);
1233
- u == null || u({ event: v, direction: N ? -1 : 1 });
1234
- }
1235
- }
1236
- )
1237
- }
1238
- );
1239
- }
1240
- ), ea = c.forwardRef(
1241
- (e, a) => {
1242
- const {
1243
- __scopeSlider: r,
1244
- onSlideStart: o,
1245
- onSlideMove: n,
1246
- onSlideEnd: i,
1247
- onHomeKeyDown: s,
1248
- onEndKeyDown: d,
1249
- onStepKeyDown: u,
1250
- ...f
1251
- } = e, m = Te(ae, r);
1252
- return /* @__PURE__ */ t(
1253
- _.span,
1254
- {
1255
- ...f,
1256
- ref: a,
1257
- onKeyDown: D(e.onKeyDown, (l) => {
1258
- l.key === "Home" ? (s(l), l.preventDefault()) : l.key === "End" ? (d(l), l.preventDefault()) : Ur.concat(qr).includes(l.key) && (u(l), l.preventDefault());
1259
- }),
1260
- onPointerDown: D(e.onPointerDown, (l) => {
1261
- const g = l.target;
1262
- g.setPointerCapture(l.pointerId), l.preventDefault(), m.thumbs.has(g) ? g.focus() : o(l);
1263
- }),
1264
- onPointerMove: D(e.onPointerMove, (l) => {
1265
- l.target.hasPointerCapture(l.pointerId) && n(l);
1266
- }),
1267
- onPointerUp: D(e.onPointerUp, (l) => {
1268
- const g = l.target;
1269
- g.hasPointerCapture(l.pointerId) && (g.releasePointerCapture(l.pointerId), i(l));
1270
- })
1271
- }
1272
- );
1273
- }
1274
- ), ta = "SliderTrack", ra = c.forwardRef(
1275
- (e, a) => {
1276
- const { __scopeSlider: r, ...o } = e, n = Te(ta, r);
1277
- return /* @__PURE__ */ t(
1278
- _.span,
1279
- {
1280
- "data-disabled": n.disabled ? "" : void 0,
1281
- "data-orientation": n.orientation,
1282
- ...o,
1283
- ref: a
1284
- }
1285
- );
1286
- }
1287
- );
1288
- ra.displayName = ta;
1289
- var Oe = "SliderRange", aa = c.forwardRef(
1290
- (e, a) => {
1291
- const { __scopeSlider: r, ...o } = e, n = Te(Oe, r), i = Qr(Oe, r), s = c.useRef(null), d = L(a, s), u = n.values.length, f = n.values.map(
1292
- (g) => sa(g, n.min, n.max)
1293
- ), m = u > 1 ? Math.min(...f) : 0, l = 100 - Math.max(...f);
1294
- return /* @__PURE__ */ t(
1295
- _.span,
1296
- {
1297
- "data-orientation": n.orientation,
1298
- "data-disabled": n.disabled ? "" : void 0,
1299
- ...o,
1300
- ref: d,
1301
- style: {
1302
- ...e.style,
1303
- [i.startEdge]: m + "%",
1304
- [i.endEdge]: l + "%"
1305
- }
1306
- }
1307
- );
1308
- }
1309
- );
1310
- aa.displayName = Oe;
1311
- var Fe = "SliderThumb", oa = c.forwardRef(
1312
- (e, a) => {
1313
- const r = Yn(e.__scopeSlider), [o, n] = c.useState(null), i = L(a, (d) => n(d)), s = c.useMemo(
1314
- () => o ? r().findIndex((d) => d.ref.current === o) : -1,
1315
- [r, o]
1316
- );
1317
- return /* @__PURE__ */ t(es, { ...e, ref: i, index: s });
1318
- }
1319
- ), es = c.forwardRef(
1320
- (e, a) => {
1321
- const { __scopeSlider: r, index: o, name: n, ...i } = e, s = Te(Fe, r), d = Qr(Fe, r), [u, f] = c.useState(null), m = L(a, (x) => f(x)), l = u ? s.form || !!u.closest("form") : !0, g = je(u), h = s.values[o], b = h === void 0 ? 0 : sa(h, s.min, s.max), v = as(o, s.values.length), w = g == null ? void 0 : g[d.size], N = w ? ns(w, b, d.direction) : 0;
1322
- return c.useEffect(() => {
1323
- if (u)
1324
- return s.thumbs.add(u), () => {
1325
- s.thumbs.delete(u);
1326
- };
1327
- }, [u, s.thumbs]), /* @__PURE__ */ p(
1328
- "span",
1329
- {
1330
- style: {
1331
- transform: "var(--radix-slider-thumb-transform)",
1332
- position: "absolute",
1333
- [d.startEdge]: `calc(${b}% + ${N}px)`
1334
- },
1335
- children: [
1336
- /* @__PURE__ */ t($e.ItemSlot, { scope: e.__scopeSlider, children: /* @__PURE__ */ t(
1337
- _.span,
1338
- {
1339
- role: "slider",
1340
- "aria-label": e["aria-label"] || v,
1341
- "aria-valuemin": s.min,
1342
- "aria-valuenow": h,
1343
- "aria-valuemax": s.max,
1344
- "aria-orientation": s.orientation,
1345
- "data-orientation": s.orientation,
1346
- "data-disabled": s.disabled ? "" : void 0,
1347
- tabIndex: s.disabled ? void 0 : 0,
1348
- ...i,
1349
- ref: m,
1350
- style: h === void 0 ? { display: "none" } : e.style,
1351
- onFocus: D(e.onFocus, () => {
1352
- s.valueIndexToChangeRef.current = o;
1353
- })
1354
- }
1355
- ) }),
1356
- l && /* @__PURE__ */ t(
1357
- na,
1358
- {
1359
- name: n ?? (s.name ? s.name + (s.values.length > 1 ? "[]" : "") : void 0),
1360
- form: s.form,
1361
- value: h
1362
- },
1363
- o
1364
- )
1365
- ]
1366
- }
1367
- );
1368
- }
1369
- );
1370
- oa.displayName = Fe;
1371
- var ts = "RadioBubbleInput", na = c.forwardRef(
1372
- ({ __scopeSlider: e, value: a, ...r }, o) => {
1373
- const n = c.useRef(null), i = L(n, o), s = Ue(a);
1374
- return c.useEffect(() => {
1375
- const d = n.current;
1376
- if (!d) return;
1377
- const u = window.HTMLInputElement.prototype, m = Object.getOwnPropertyDescriptor(u, "value").set;
1378
- if (s !== a && m) {
1379
- const l = new Event("input", { bubbles: !0 });
1380
- m.call(d, a), d.dispatchEvent(l);
1381
- }
1382
- }, [s, a]), /* @__PURE__ */ t(
1383
- _.input,
1384
- {
1385
- style: { display: "none" },
1386
- ...r,
1387
- ref: i,
1388
- defaultValue: a
1389
- }
1390
- );
1391
- }
1392
- );
1393
- na.displayName = ts;
1394
- function rs(e = [], a, r) {
1395
- const o = [...e];
1396
- return o[r] = a, o.sort((n, i) => n - i);
1397
- }
1398
- function sa(e, a, r) {
1399
- const i = 100 / (r - a) * (e - a);
1400
- return Tt(i, [0, 100]);
1401
- }
1402
- function as(e, a) {
1403
- return a > 2 ? `Value ${e + 1} of ${a}` : a === 2 ? ["Minimum", "Maximum"][e] : void 0;
1404
- }
1405
- function os(e, a) {
1406
- if (e.length === 1) return 0;
1407
- const r = e.map((n) => Math.abs(n - a)), o = Math.min(...r);
1408
- return r.indexOf(o);
1409
- }
1410
- function ns(e, a, r) {
1411
- const o = e / 2, i = lt([0, 50], [0, o]);
1412
- return (o - i(a) * r) * r;
1413
- }
1414
- function ss(e) {
1415
- return e.slice(0, -1).map((a, r) => e[r + 1] - a);
1416
- }
1417
- function is(e, a) {
1418
- if (a > 0) {
1419
- const r = ss(e);
1420
- return Math.min(...r) >= a;
1421
- }
1422
- return !0;
1423
- }
1424
- function lt(e, a) {
1425
- return (r) => {
1426
- if (e[0] === e[1] || a[0] === a[1]) return a[0];
1427
- const o = (a[1] - a[0]) / (e[1] - e[0]);
1428
- return a[0] + o * (r - e[0]);
1429
- };
1430
- }
1431
- function cs(e) {
1432
- return (String(e).split(".")[1] || "").length;
1433
- }
1434
- function ls(e, a) {
1435
- const r = Math.pow(10, a);
1436
- return Math.round(e * r) / r;
1437
- }
1438
- var ia = Jr, ds = ra, us = aa, fs = oa;
1439
- const ms = c.forwardRef(({ className: e, ...a }, r) => /* @__PURE__ */ p(
1440
- ia,
1441
- {
1442
- ref: r,
1443
- className: y("relative flex w-full touch-none select-none items-center", e),
1444
- ...a,
1445
- children: [
1446
- /* @__PURE__ */ t(ds, { className: "relative h-2 w-full grow overflow-hidden rounded-full bg-secondary", children: /* @__PURE__ */ t(us, { className: "absolute h-full bg-primary" }) }),
1447
- /* @__PURE__ */ t(fs, { className: "block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50" })
1448
- ]
1449
- }
1450
- ));
1451
- ms.displayName = ia.displayName;
1452
- var Se = "Switch", [ps] = X(Se), [hs, gs] = ps(Se), ca = c.forwardRef(
1453
- (e, a) => {
1454
- const {
1455
- __scopeSwitch: r,
1456
- name: o,
1457
- checked: n,
1458
- defaultChecked: i,
1459
- required: s,
1460
- disabled: d,
1461
- value: u = "on",
1462
- onCheckedChange: f,
1463
- form: m,
1464
- ...l
1465
- } = e, [g, h] = c.useState(null), b = L(a, (C) => h(C)), v = c.useRef(!1), w = g ? m || !!g.closest("form") : !0, [N, x] = Z({
1466
- prop: n,
1467
- defaultProp: i ?? !1,
1468
- onChange: f,
1469
- caller: Se
1470
- });
1471
- return /* @__PURE__ */ p(hs, { scope: r, checked: N, disabled: d, children: [
1472
- /* @__PURE__ */ t(
1473
- _.button,
1474
- {
1475
- type: "button",
1476
- role: "switch",
1477
- "aria-checked": N,
1478
- "aria-required": s,
1479
- "data-state": fa(N),
1480
- "data-disabled": d ? "" : void 0,
1481
- disabled: d,
1482
- value: u,
1483
- ...l,
1484
- ref: b,
1485
- onClick: D(e.onClick, (C) => {
1486
- x((R) => !R), w && (v.current = C.isPropagationStopped(), v.current || C.stopPropagation());
1487
- })
1488
- }
1489
- ),
1490
- w && /* @__PURE__ */ t(
1491
- ua,
1492
- {
1493
- control: g,
1494
- bubbles: !v.current,
1495
- name: o,
1496
- value: u,
1497
- checked: N,
1498
- required: s,
1499
- disabled: d,
1500
- form: m,
1501
- style: { transform: "translateX(-100%)" }
1502
- }
1503
- )
1504
- ] });
1505
- }
1506
- );
1507
- ca.displayName = Se;
1508
- var la = "SwitchThumb", da = c.forwardRef(
1509
- (e, a) => {
1510
- const { __scopeSwitch: r, ...o } = e, n = gs(la, r);
1511
- return /* @__PURE__ */ t(
1512
- _.span,
1513
- {
1514
- "data-state": fa(n.checked),
1515
- "data-disabled": n.disabled ? "" : void 0,
1516
- ...o,
1517
- ref: a
1518
- }
1519
- );
1520
- }
1521
- );
1522
- da.displayName = la;
1523
- var vs = "SwitchBubbleInput", ua = c.forwardRef(
1524
- ({
1525
- __scopeSwitch: e,
1526
- control: a,
1527
- checked: r,
1528
- bubbles: o = !0,
1529
- ...n
1530
- }, i) => {
1531
- const s = c.useRef(null), d = L(s, i), u = Ue(r), f = je(a);
1532
- return c.useEffect(() => {
1533
- const m = s.current;
1534
- if (!m) return;
1535
- const l = window.HTMLInputElement.prototype, h = Object.getOwnPropertyDescriptor(
1536
- l,
1537
- "checked"
1538
- ).set;
1539
- if (u !== r && h) {
1540
- const b = new Event("click", { bubbles: o });
1541
- h.call(m, r), m.dispatchEvent(b);
1542
- }
1543
- }, [u, r, o]), /* @__PURE__ */ t(
1544
- "input",
1545
- {
1546
- type: "checkbox",
1547
- "aria-hidden": !0,
1548
- defaultChecked: r,
1549
- ...n,
1550
- tabIndex: -1,
1551
- ref: d,
1552
- style: {
1553
- ...n.style,
1554
- ...f,
1555
- position: "absolute",
1556
- pointerEvents: "none",
1557
- opacity: 0,
1558
- margin: 0
1559
- }
1560
- }
1561
- );
1562
- }
1563
- );
1564
- ua.displayName = vs;
1565
- function fa(e) {
1566
- return e ? "checked" : "unchecked";
1567
- }
1568
- var ma = ca, bs = da;
1569
- const ws = c.forwardRef(({ className: e, ...a }, r) => /* @__PURE__ */ t(
1570
- ma,
1571
- {
1572
- className: y(
1573
- "peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",
1574
- e
1575
- ),
1576
- ...a,
1577
- ref: r,
1578
- children: /* @__PURE__ */ t(
1579
- bs,
1580
- {
1581
- className: y(
1582
- "pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0"
1583
- )
1584
- }
1585
- )
1586
- }
1587
- ));
1588
- ws.displayName = ma.displayName;
1589
- var Ee = "Tabs", [ys] = X(Ee, [
1590
- be
1591
- ]), pa = be(), [xs, dt] = ys(Ee), ha = c.forwardRef(
1592
- (e, a) => {
1593
- const {
1594
- __scopeTabs: r,
1595
- value: o,
1596
- onValueChange: n,
1597
- defaultValue: i,
1598
- orientation: s = "horizontal",
1599
- dir: d,
1600
- activationMode: u = "automatic",
1601
- ...f
1602
- } = e, m = ve(d), [l, g] = Z({
1603
- prop: o,
1604
- onChange: n,
1605
- defaultProp: i ?? "",
1606
- caller: Ee
1607
- });
1608
- return /* @__PURE__ */ t(
1609
- xs,
1610
- {
1611
- scope: r,
1612
- baseId: Ke(),
1613
- value: l,
1614
- onValueChange: g,
1615
- orientation: s,
1616
- dir: m,
1617
- activationMode: u,
1618
- children: /* @__PURE__ */ t(
1619
- _.div,
1620
- {
1621
- dir: m,
1622
- "data-orientation": s,
1623
- ...f,
1624
- ref: a
1625
- }
1626
- )
1627
- }
1628
- );
1629
- }
1630
- );
1631
- ha.displayName = Ee;
1632
- var ga = "TabsList", va = c.forwardRef(
1633
- (e, a) => {
1634
- const { __scopeTabs: r, loop: o = !0, ...n } = e, i = dt(ga, r), s = pa(r);
1635
- return /* @__PURE__ */ t(
1636
- Dt,
1637
- {
1638
- asChild: !0,
1639
- ...s,
1640
- orientation: i.orientation,
1641
- dir: i.dir,
1642
- loop: o,
1643
- children: /* @__PURE__ */ t(
1644
- _.div,
1645
- {
1646
- role: "tablist",
1647
- "aria-orientation": i.orientation,
1648
- ...n,
1649
- ref: a
1650
- }
1651
- )
1652
- }
1653
- );
1654
- }
1655
- );
1656
- va.displayName = ga;
1657
- var ba = "TabsTrigger", wa = c.forwardRef(
1658
- (e, a) => {
1659
- const { __scopeTabs: r, value: o, disabled: n = !1, ...i } = e, s = dt(ba, r), d = pa(r), u = Na(s.baseId, o), f = Ca(s.baseId, o), m = o === s.value;
1660
- return /* @__PURE__ */ t(
1661
- _t,
1662
- {
1663
- asChild: !0,
1664
- ...d,
1665
- focusable: !n,
1666
- active: m,
1667
- children: /* @__PURE__ */ t(
1668
- _.button,
1669
- {
1670
- type: "button",
1671
- role: "tab",
1672
- "aria-selected": m,
1673
- "aria-controls": f,
1674
- "data-state": m ? "active" : "inactive",
1675
- "data-disabled": n ? "" : void 0,
1676
- disabled: n,
1677
- id: u,
1678
- ...i,
1679
- ref: a,
1680
- onMouseDown: D(e.onMouseDown, (l) => {
1681
- !n && l.button === 0 && l.ctrlKey === !1 ? s.onValueChange(o) : l.preventDefault();
1682
- }),
1683
- onKeyDown: D(e.onKeyDown, (l) => {
1684
- [" ", "Enter"].includes(l.key) && s.onValueChange(o);
1685
- }),
1686
- onFocus: D(e.onFocus, () => {
1687
- const l = s.activationMode !== "manual";
1688
- !m && !n && l && s.onValueChange(o);
1689
- })
1690
- }
1691
- )
1692
- }
1693
- );
1694
- }
1695
- );
1696
- wa.displayName = ba;
1697
- var ya = "TabsContent", xa = c.forwardRef(
1698
- (e, a) => {
1699
- const { __scopeTabs: r, value: o, forceMount: n, children: i, ...s } = e, d = dt(ya, r), u = Na(d.baseId, o), f = Ca(d.baseId, o), m = o === d.value, l = c.useRef(m);
1700
- return c.useEffect(() => {
1701
- const g = requestAnimationFrame(() => l.current = !1);
1702
- return () => cancelAnimationFrame(g);
1703
- }, []), /* @__PURE__ */ t(ge, { present: n || m, children: ({ present: g }) => /* @__PURE__ */ t(
1704
- _.div,
1705
- {
1706
- "data-state": m ? "active" : "inactive",
1707
- "data-orientation": d.orientation,
1708
- role: "tabpanel",
1709
- "aria-labelledby": u,
1710
- hidden: !g,
1711
- id: f,
1712
- tabIndex: 0,
1713
- ...s,
1714
- ref: a,
1715
- style: {
1716
- ...e.style,
1717
- animationDuration: l.current ? "0s" : void 0
1718
- },
1719
- children: g && i
1720
- }
1721
- ) });
1722
- }
1723
- );
1724
- xa.displayName = ya;
1725
- function Na(e, a) {
1726
- return `${e}-trigger-${a}`;
1727
- }
1728
- function Ca(e, a) {
1729
- return `${e}-content-${a}`;
1730
- }
1731
- var Ns = ha, Ra = va, Ta = wa, Sa = xa;
1732
- const oc = Ns, Cs = c.forwardRef(({ className: e, ...a }, r) => /* @__PURE__ */ t(
1733
- Ra,
1734
- {
1735
- ref: r,
1736
- className: y(
1737
- "inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",
1738
- e
1739
- ),
1740
- ...a
1741
- }
1742
- ));
1743
- Cs.displayName = Ra.displayName;
1744
- const Rs = c.forwardRef(({ className: e, ...a }, r) => /* @__PURE__ */ t(
1745
- Ta,
1746
- {
1747
- ref: r,
1748
- className: y(
1749
- "inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",
1750
- e
1751
- ),
1752
- ...a
1753
- }
1754
- ));
1755
- Rs.displayName = Ta.displayName;
1756
- const Ts = c.forwardRef(({ className: e, ...a }, r) => /* @__PURE__ */ t(
1757
- Sa,
1758
- {
1759
- ref: r,
1760
- className: y(
1761
- "mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
1762
- e
1763
- ),
1764
- ...a
1765
- }
1766
- ));
1767
- Ts.displayName = Sa.displayName;
1768
- const Ss = c.forwardRef(
1769
- ({ className: e, ...a }, r) => /* @__PURE__ */ t(
1770
- "textarea",
1771
- {
1772
- className: y(
1773
- "flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
1774
- e
1775
- ),
1776
- ref: r,
1777
- ...a
1778
- }
1779
- )
1780
- );
1781
- Ss.displayName = "Textarea";
1782
- var ut = "ToastProvider", [ft, Es, As] = ze("Toast"), [Ea] = X("Toast", [As]), [Ps, Ae] = Ea(ut), Aa = (e) => {
1783
- const {
1784
- __scopeToast: a,
1785
- label: r = "Notification",
1786
- duration: o = 5e3,
1787
- swipeDirection: n = "right",
1788
- swipeThreshold: i = 50,
1789
- children: s
1790
- } = e, [d, u] = c.useState(null), [f, m] = c.useState(0), l = c.useRef(!1), g = c.useRef(!1);
1791
- return r.trim() || console.error(
1792
- `Invalid prop \`label\` supplied to \`${ut}\`. Expected non-empty \`string\`.`
1793
- ), /* @__PURE__ */ t(ft.Provider, { scope: a, children: /* @__PURE__ */ t(
1794
- Ps,
1795
- {
1796
- scope: a,
1797
- label: r,
1798
- duration: o,
1799
- swipeDirection: n,
1800
- swipeThreshold: i,
1801
- toastCount: f,
1802
- viewport: d,
1803
- onViewportChange: u,
1804
- onToastAdd: c.useCallback(() => m((h) => h + 1), []),
1805
- onToastRemove: c.useCallback(() => m((h) => h - 1), []),
1806
- isFocusedToastEscapeKeyDownRef: l,
1807
- isClosePausedRef: g,
1808
- children: s
1809
- }
1810
- ) });
1811
- };
1812
- Aa.displayName = ut;
1813
- var Pa = "ToastViewport", Ds = ["F8"], Le = "toast.viewportPause", Ve = "toast.viewportResume", Da = c.forwardRef(
1814
- (e, a) => {
1815
- const {
1816
- __scopeToast: r,
1817
- hotkey: o = Ds,
1818
- label: n = "Notifications ({hotkey})",
1819
- ...i
1820
- } = e, s = Ae(Pa, r), d = Es(r), u = c.useRef(null), f = c.useRef(null), m = c.useRef(null), l = c.useRef(null), g = L(a, l, s.onViewportChange), h = o.join("+").replace(/Key/g, "").replace(/Digit/g, ""), b = s.toastCount > 0;
1821
- c.useEffect(() => {
1822
- const w = (N) => {
1823
- var C;
1824
- o.length !== 0 && o.every((R) => N[R] || N.code === R) && ((C = l.current) == null || C.focus());
1825
- };
1826
- return document.addEventListener("keydown", w), () => document.removeEventListener("keydown", w);
1827
- }, [o]), c.useEffect(() => {
1828
- const w = u.current, N = l.current;
1829
- if (b && w && N) {
1830
- const x = () => {
1831
- if (!s.isClosePausedRef.current) {
1832
- const I = new CustomEvent(Le);
1833
- N.dispatchEvent(I), s.isClosePausedRef.current = !0;
1834
- }
1835
- }, C = () => {
1836
- if (s.isClosePausedRef.current) {
1837
- const I = new CustomEvent(Ve);
1838
- N.dispatchEvent(I), s.isClosePausedRef.current = !1;
1839
- }
1840
- }, R = (I) => {
1841
- !w.contains(I.relatedTarget) && C();
1842
- }, S = () => {
1843
- w.contains(document.activeElement) || C();
1844
- };
1845
- return w.addEventListener("focusin", x), w.addEventListener("focusout", R), w.addEventListener("pointermove", x), w.addEventListener("pointerleave", S), window.addEventListener("blur", x), window.addEventListener("focus", C), () => {
1846
- w.removeEventListener("focusin", x), w.removeEventListener("focusout", R), w.removeEventListener("pointermove", x), w.removeEventListener("pointerleave", S), window.removeEventListener("blur", x), window.removeEventListener("focus", C);
1847
- };
1848
- }
1849
- }, [b, s.isClosePausedRef]);
1850
- const v = c.useCallback(
1851
- ({ tabbingDirection: w }) => {
1852
- const x = d().map((C) => {
1853
- const R = C.ref.current, S = [R, ...zs(R)];
1854
- return w === "forwards" ? S : S.reverse();
1855
- });
1856
- return (w === "forwards" ? x.reverse() : x).flat();
1857
- },
1858
- [d]
1859
- );
1860
- return c.useEffect(() => {
1861
- const w = l.current;
1862
- if (w) {
1863
- const N = (x) => {
1864
- var S, I, A;
1865
- const C = x.altKey || x.ctrlKey || x.metaKey;
1866
- if (x.key === "Tab" && !C) {
1867
- const $ = document.activeElement, M = x.shiftKey;
1868
- if (x.target === w && M) {
1869
- (S = f.current) == null || S.focus();
1870
- return;
1871
- }
1872
- const O = v({ tabbingDirection: M ? "backwards" : "forwards" }), B = O.findIndex((E) => E === $);
1873
- Ie(O.slice(B + 1)) ? x.preventDefault() : M ? (I = f.current) == null || I.focus() : (A = m.current) == null || A.focus();
1874
- }
1875
- };
1876
- return w.addEventListener("keydown", N), () => w.removeEventListener("keydown", N);
1877
- }
1878
- }, [d, v]), /* @__PURE__ */ p(
1879
- co,
1880
- {
1881
- ref: u,
1882
- role: "region",
1883
- "aria-label": n.replace("{hotkey}", h),
1884
- tabIndex: -1,
1885
- style: { pointerEvents: b ? void 0 : "none" },
1886
- children: [
1887
- b && /* @__PURE__ */ t(
1888
- Be,
1889
- {
1890
- ref: f,
1891
- onFocusFromOutsideViewport: () => {
1892
- const w = v({
1893
- tabbingDirection: "forwards"
1894
- });
1895
- Ie(w);
1896
- }
1897
- }
1898
- ),
1899
- /* @__PURE__ */ t(ft.Slot, { scope: r, children: /* @__PURE__ */ t(_.ol, { tabIndex: -1, ...i, ref: g }) }),
1900
- b && /* @__PURE__ */ t(
1901
- Be,
1902
- {
1903
- ref: m,
1904
- onFocusFromOutsideViewport: () => {
1905
- const w = v({
1906
- tabbingDirection: "backwards"
1907
- });
1908
- Ie(w);
1909
- }
1910
- }
1911
- )
1912
- ]
1913
- }
1914
- );
1915
- }
1916
- );
1917
- Da.displayName = Pa;
1918
- var _a = "ToastFocusProxy", Be = c.forwardRef(
1919
- (e, a) => {
1920
- const { __scopeToast: r, onFocusFromOutsideViewport: o, ...n } = e, i = Ae(_a, r);
1921
- return /* @__PURE__ */ t(
1922
- It,
1923
- {
1924
- tabIndex: 0,
1925
- ...n,
1926
- ref: a,
1927
- style: { position: "fixed" },
1928
- onFocus: (s) => {
1929
- var f;
1930
- const d = s.relatedTarget;
1931
- !((f = i.viewport) != null && f.contains(d)) && o();
1932
- }
1933
- }
1934
- );
1935
- }
1936
- );
1937
- Be.displayName = _a;
1938
- var ce = "Toast", _s = "toast.swipeStart", Is = "toast.swipeMove", Ms = "toast.swipeCancel", ks = "toast.swipeEnd", Ia = c.forwardRef(
1939
- (e, a) => {
1940
- const { forceMount: r, open: o, defaultOpen: n, onOpenChange: i, ...s } = e, [d, u] = Z({
1941
- prop: o,
1942
- defaultProp: n ?? !0,
1943
- onChange: i,
1944
- caller: ce
1945
- });
1946
- return /* @__PURE__ */ t(ge, { present: r || d, children: /* @__PURE__ */ t(
1947
- Fs,
1948
- {
1949
- open: d,
1950
- ...s,
1951
- ref: a,
1952
- onClose: () => u(!1),
1953
- onPause: me(e.onPause),
1954
- onResume: me(e.onResume),
1955
- onSwipeStart: D(e.onSwipeStart, (f) => {
1956
- f.currentTarget.setAttribute("data-swipe", "start");
1957
- }),
1958
- onSwipeMove: D(e.onSwipeMove, (f) => {
1959
- const { x: m, y: l } = f.detail.delta;
1960
- f.currentTarget.setAttribute("data-swipe", "move"), f.currentTarget.style.setProperty("--radix-toast-swipe-move-x", `${m}px`), f.currentTarget.style.setProperty("--radix-toast-swipe-move-y", `${l}px`);
1961
- }),
1962
- onSwipeCancel: D(e.onSwipeCancel, (f) => {
1963
- f.currentTarget.setAttribute("data-swipe", "cancel"), f.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"), f.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"), f.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"), f.currentTarget.style.removeProperty("--radix-toast-swipe-end-y");
1964
- }),
1965
- onSwipeEnd: D(e.onSwipeEnd, (f) => {
1966
- const { x: m, y: l } = f.detail.delta;
1967
- f.currentTarget.setAttribute("data-swipe", "end"), f.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"), f.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"), f.currentTarget.style.setProperty("--radix-toast-swipe-end-x", `${m}px`), f.currentTarget.style.setProperty("--radix-toast-swipe-end-y", `${l}px`), u(!1);
1968
- })
1969
- }
1970
- ) });
1971
- }
1972
- );
1973
- Ia.displayName = ce;
1974
- var [$s, Os] = Ea(ce, {
1975
- onClose() {
1976
- }
1977
- }), Fs = c.forwardRef(
1978
- (e, a) => {
1979
- const {
1980
- __scopeToast: r,
1981
- type: o = "foreground",
1982
- duration: n,
1983
- open: i,
1984
- onClose: s,
1985
- onEscapeKeyDown: d,
1986
- onPause: u,
1987
- onResume: f,
1988
- onSwipeStart: m,
1989
- onSwipeMove: l,
1990
- onSwipeCancel: g,
1991
- onSwipeEnd: h,
1992
- ...b
1993
- } = e, v = Ae(ce, r), [w, N] = c.useState(null), x = L(a, (E) => N(E)), C = c.useRef(null), R = c.useRef(null), S = n || v.duration, I = c.useRef(0), A = c.useRef(S), $ = c.useRef(0), { onToastAdd: M, onToastRemove: k } = v, P = me(() => {
1994
- var V;
1995
- (w == null ? void 0 : w.contains(document.activeElement)) && ((V = v.viewport) == null || V.focus()), s();
1996
- }), O = c.useCallback(
1997
- (E) => {
1998
- !E || E === 1 / 0 || (window.clearTimeout($.current), I.current = (/* @__PURE__ */ new Date()).getTime(), $.current = window.setTimeout(P, E));
1999
- },
2000
- [P]
2001
- );
2002
- c.useEffect(() => {
2003
- const E = v.viewport;
2004
- if (E) {
2005
- const V = () => {
2006
- O(A.current), f == null || f();
2007
- }, H = () => {
2008
- const j = (/* @__PURE__ */ new Date()).getTime() - I.current;
2009
- A.current = A.current - j, window.clearTimeout($.current), u == null || u();
2010
- };
2011
- return E.addEventListener(Le, H), E.addEventListener(Ve, V), () => {
2012
- E.removeEventListener(Le, H), E.removeEventListener(Ve, V);
2013
- };
2014
- }
2015
- }, [v.viewport, S, u, f, O]), c.useEffect(() => {
2016
- i && !v.isClosePausedRef.current && O(S);
2017
- }, [i, S, v.isClosePausedRef, O]), c.useEffect(() => (M(), () => k()), [M, k]);
2018
- const B = c.useMemo(() => w ? Va(w) : null, [w]);
2019
- return v.viewport ? /* @__PURE__ */ p(ie, { children: [
2020
- B && /* @__PURE__ */ t(
2021
- Ls,
2022
- {
2023
- __scopeToast: r,
2024
- role: "status",
2025
- "aria-live": o === "foreground" ? "assertive" : "polite",
2026
- children: B
2027
- }
2028
- ),
2029
- /* @__PURE__ */ t($s, { scope: r, onClose: P, children: po.createPortal(
2030
- /* @__PURE__ */ t(ft.ItemSlot, { scope: r, children: /* @__PURE__ */ t(
2031
- lo,
2032
- {
2033
- asChild: !0,
2034
- onEscapeKeyDown: D(d, () => {
2035
- v.isFocusedToastEscapeKeyDownRef.current || P(), v.isFocusedToastEscapeKeyDownRef.current = !1;
2036
- }),
2037
- children: /* @__PURE__ */ t(
2038
- _.li,
2039
- {
2040
- tabIndex: 0,
2041
- "data-state": i ? "open" : "closed",
2042
- "data-swipe-direction": v.swipeDirection,
2043
- ...b,
2044
- ref: x,
2045
- style: { userSelect: "none", touchAction: "none", ...e.style },
2046
- onKeyDown: D(e.onKeyDown, (E) => {
2047
- E.key === "Escape" && (d == null || d(E.nativeEvent), E.nativeEvent.defaultPrevented || (v.isFocusedToastEscapeKeyDownRef.current = !0, P()));
2048
- }),
2049
- onPointerDown: D(e.onPointerDown, (E) => {
2050
- E.button === 0 && (C.current = { x: E.clientX, y: E.clientY });
2051
- }),
2052
- onPointerMove: D(e.onPointerMove, (E) => {
2053
- if (!C.current) return;
2054
- const V = E.clientX - C.current.x, H = E.clientY - C.current.y, j = !!R.current, K = ["left", "right"].includes(v.swipeDirection), Q = ["left", "up"].includes(v.swipeDirection) ? Math.min : Math.max, ro = K ? Q(0, V) : 0, ao = K ? 0 : Q(0, H), De = E.pointerType === "touch" ? 10 : 2, le = { x: ro, y: ao }, gt = { originalEvent: E, delta: le };
2055
- j ? (R.current = le, ue(Is, l, gt, {
2056
- discrete: !1
2057
- })) : xt(le, v.swipeDirection, De) ? (R.current = le, ue(_s, m, gt, {
2058
- discrete: !1
2059
- }), E.target.setPointerCapture(E.pointerId)) : (Math.abs(V) > De || Math.abs(H) > De) && (C.current = null);
2060
- }),
2061
- onPointerUp: D(e.onPointerUp, (E) => {
2062
- const V = R.current, H = E.target;
2063
- if (H.hasPointerCapture(E.pointerId) && H.releasePointerCapture(E.pointerId), R.current = null, C.current = null, V) {
2064
- const j = E.currentTarget, K = { originalEvent: E, delta: V };
2065
- xt(V, v.swipeDirection, v.swipeThreshold) ? ue(ks, h, K, {
2066
- discrete: !0
2067
- }) : ue(
2068
- Ms,
2069
- g,
2070
- K,
2071
- {
2072
- discrete: !0
2073
- }
2074
- ), j.addEventListener("click", (Q) => Q.preventDefault(), {
2075
- once: !0
2076
- });
2077
- }
2078
- })
2079
- }
2080
- )
2081
- }
2082
- ) }),
2083
- v.viewport
2084
- ) })
2085
- ] }) : null;
2086
- }
2087
- ), Ls = (e) => {
2088
- const { __scopeToast: a, children: r, ...o } = e, n = Ae(ce, a), [i, s] = c.useState(!1), [d, u] = c.useState(!1);
2089
- return Hs(() => s(!0)), c.useEffect(() => {
2090
- const f = window.setTimeout(() => u(!0), 1e3);
2091
- return () => window.clearTimeout(f);
2092
- }, []), d ? null : /* @__PURE__ */ t(uo, { asChild: !0, children: /* @__PURE__ */ t(It, { ...o, children: i && /* @__PURE__ */ p(ie, { children: [
2093
- n.label,
2094
- " ",
2095
- r
2096
- ] }) }) });
2097
- }, Vs = "ToastTitle", Ma = c.forwardRef(
2098
- (e, a) => {
2099
- const { __scopeToast: r, ...o } = e;
2100
- return /* @__PURE__ */ t(_.div, { ...o, ref: a });
2101
- }
2102
- );
2103
- Ma.displayName = Vs;
2104
- var Bs = "ToastDescription", ka = c.forwardRef(
2105
- (e, a) => {
2106
- const { __scopeToast: r, ...o } = e;
2107
- return /* @__PURE__ */ t(_.div, { ...o, ref: a });
2108
- }
2109
- );
2110
- ka.displayName = Bs;
2111
- var $a = "ToastAction", Oa = c.forwardRef(
2112
- (e, a) => {
2113
- const { altText: r, ...o } = e;
2114
- return r.trim() ? /* @__PURE__ */ t(La, { altText: r, asChild: !0, children: /* @__PURE__ */ t(mt, { ...o, ref: a }) }) : (console.error(
2115
- `Invalid prop \`altText\` supplied to \`${$a}\`. Expected non-empty \`string\`.`
2116
- ), null);
2117
- }
2118
- );
2119
- Oa.displayName = $a;
2120
- var Fa = "ToastClose", mt = c.forwardRef(
2121
- (e, a) => {
2122
- const { __scopeToast: r, ...o } = e, n = Os(Fa, r);
2123
- return /* @__PURE__ */ t(La, { asChild: !0, children: /* @__PURE__ */ t(
2124
- _.button,
2125
- {
2126
- type: "button",
2127
- ...o,
2128
- ref: a,
2129
- onClick: D(e.onClick, n.onClose)
2130
- }
2131
- ) });
2132
- }
2133
- );
2134
- mt.displayName = Fa;
2135
- var La = c.forwardRef((e, a) => {
2136
- const { __scopeToast: r, altText: o, ...n } = e;
2137
- return /* @__PURE__ */ t(
2138
- _.div,
2139
- {
2140
- "data-radix-toast-announce-exclude": "",
2141
- "data-radix-toast-announce-alt": o || void 0,
2142
- ...n,
2143
- ref: a
2144
- }
2145
- );
2146
- });
2147
- function Va(e) {
2148
- const a = [];
2149
- return Array.from(e.childNodes).forEach((o) => {
2150
- if (o.nodeType === o.TEXT_NODE && o.textContent && a.push(o.textContent), Ks(o)) {
2151
- const n = o.ariaHidden || o.hidden || o.style.display === "none", i = o.dataset.radixToastAnnounceExclude === "";
2152
- if (!n)
2153
- if (i) {
2154
- const s = o.dataset.radixToastAnnounceAlt;
2155
- s && a.push(s);
2156
- } else
2157
- a.push(...Va(o));
2158
- }
2159
- }), a;
2160
- }
2161
- function ue(e, a, r, { discrete: o }) {
2162
- const n = r.originalEvent.currentTarget, i = new CustomEvent(e, { bubbles: !0, cancelable: !0, detail: r });
2163
- a && n.addEventListener(e, a, { once: !0 }), o ? oo(n, i) : n.dispatchEvent(i);
2164
- }
2165
- var xt = (e, a, r = 0) => {
2166
- const o = Math.abs(e.x), n = Math.abs(e.y), i = o > n;
2167
- return a === "left" || a === "right" ? i && o > r : !i && n > r;
2168
- };
2169
- function Hs(e = () => {
2170
- }) {
2171
- const a = me(e);
2172
- Ct(() => {
2173
- let r = 0, o = 0;
2174
- return r = window.requestAnimationFrame(() => o = window.requestAnimationFrame(a)), () => {
2175
- window.cancelAnimationFrame(r), window.cancelAnimationFrame(o);
2176
- };
2177
- }, [a]);
2178
- }
2179
- function Ks(e) {
2180
- return e.nodeType === e.ELEMENT_NODE;
2181
- }
2182
- function zs(e) {
2183
- const a = [], r = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
2184
- acceptNode: (o) => {
2185
- const n = o.tagName === "INPUT" && o.type === "hidden";
2186
- return o.disabled || o.hidden || n ? NodeFilter.FILTER_SKIP : o.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
2187
- }
2188
- });
2189
- for (; r.nextNode(); ) a.push(r.currentNode);
2190
- return a;
2191
- }
2192
- function Ie(e) {
2193
- const a = document.activeElement;
2194
- return e.some((r) => r === a ? !0 : (r.focus(), document.activeElement !== a));
2195
- }
2196
- var js = Aa, Ba = Da, Ha = Ia, Ka = Ma, za = ka, ja = Oa, Ga = mt;
2197
- const Gs = js, Wa = c.forwardRef(({ className: e, ...a }, r) => /* @__PURE__ */ t(
2198
- Ba,
2199
- {
2200
- ref: r,
2201
- className: y(
2202
- "fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",
2203
- e
2204
- ),
2205
- ...a
2206
- }
2207
- ));
2208
- Wa.displayName = Ba.displayName;
2209
- const Ws = He(
2210
- "group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",
2211
- {
2212
- variants: {
2213
- variant: {
2214
- default: "border bg-background text-foreground",
2215
- destructive: "destructive group border-destructive bg-destructive text-destructive-foreground",
2216
- success: "border-success bg-success text-success-foreground",
2217
- warning: "border-warning bg-warning text-warning-foreground"
2218
- }
2219
- },
2220
- defaultVariants: {
2221
- variant: "default"
2222
- }
2223
- }
2224
- ), Ua = c.forwardRef(({ className: e, variant: a, ...r }, o) => /* @__PURE__ */ t(
2225
- Ha,
2226
- {
2227
- ref: o,
2228
- className: y(Ws({ variant: a }), e),
2229
- ...r
2230
- }
2231
- ));
2232
- Ua.displayName = Ha.displayName;
2233
- const Us = c.forwardRef(({ className: e, ...a }, r) => /* @__PURE__ */ t(
2234
- ja,
2235
- {
2236
- ref: r,
2237
- className: y(
2238
- "inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",
2239
- e
2240
- ),
2241
- ...a
2242
- }
2243
- ));
2244
- Us.displayName = ja.displayName;
2245
- const qa = c.forwardRef(({ className: e, ...a }, r) => /* @__PURE__ */ t(
2246
- Ga,
2247
- {
2248
- ref: r,
2249
- className: y(
2250
- "absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",
2251
- e
2252
- ),
2253
- "toast-close": "",
2254
- ...a,
2255
- children: /* @__PURE__ */ t(no, { className: "h-4 w-4" })
2256
- }
2257
- ));
2258
- qa.displayName = Ga.displayName;
2259
- const Ya = c.forwardRef(({ className: e, ...a }, r) => /* @__PURE__ */ t(Ka, { ref: r, className: y("text-sm font-semibold", e), ...a }));
2260
- Ya.displayName = Ka.displayName;
2261
- const Xa = c.forwardRef(({ className: e, ...a }, r) => /* @__PURE__ */ t(
2262
- za,
2263
- {
2264
- ref: r,
2265
- className: y("text-sm opacity-90", e),
2266
- ...a
2267
- }
2268
- ));
2269
- Xa.displayName = za.displayName;
2270
- function nc() {
2271
- const { toasts: e } = mo();
2272
- return /* @__PURE__ */ p(Gs, { children: [
2273
- e.map(function({ id: a, title: r, description: o, action: n, ...i }) {
2274
- return /* @__PURE__ */ p(Ua, { ...i, children: [
2275
- /* @__PURE__ */ p("div", { className: "grid gap-1", children: [
2276
- r && /* @__PURE__ */ t(Ya, { children: r }),
2277
- o && /* @__PURE__ */ t(Xa, { children: o })
2278
- ] }),
2279
- n,
2280
- /* @__PURE__ */ t(qa, {})
2281
- ] }, a);
2282
- }),
2283
- /* @__PURE__ */ t(Wa, {})
2284
- ] });
2285
- }
2286
- function qs(e) {
2287
- return Do(e, Date.now());
2288
- }
2289
- function Ys(e) {
2290
- return (a) => {
2291
- const r = Math.trunc, o = r(a);
2292
- return o === 0 ? 0 : o;
2293
- };
2294
- }
2295
- function Xs(e, a) {
2296
- return +q(e) - +q(a);
2297
- }
2298
- function Ja(e, a, r) {
2299
- const o = Xs(e, a) / _o;
2300
- return Ys()(o);
2301
- }
2302
- function pt(e) {
2303
- const a = q(e);
2304
- return a.setHours(23, 59, 59, 999), a;
2305
- }
2306
- function Za(e) {
2307
- return q(e).getHours();
2308
- }
2309
- function Qa(e) {
2310
- return q(e).getMinutes();
2311
- }
2312
- function Pe(e) {
2313
- return Y(e, qs(e));
2314
- }
2315
- function ht(e, a) {
2316
- const r = +q(e), [o, n] = [
2317
- +q(a.start),
2318
- +q(a.end)
2319
- ].sort((i, s) => i - s);
2320
- return r >= o && r <= n;
2321
- }
2322
- function he(e, a) {
2323
- const r = q(e);
2324
- return r.setHours(a), r;
2325
- }
2326
- function eo(e, a) {
2327
- const r = q(e);
2328
- return r.setMinutes(a), r;
2329
- }
2330
- function to(e, a) {
2331
- return qe(e, -1);
2332
- }
2333
- function Js(e, a) {
2334
- return $t(e, -1);
2335
- }
2336
- const Zs = {
2337
- default: {
2338
- icon: vt,
2339
- iconColor: "text-foreground",
2340
- buttonVariant: "default"
2341
- },
2342
- destructive: {
2343
- icon: Ao,
2344
- iconColor: "text-destructive",
2345
- buttonVariant: "destructive"
2346
- },
2347
- warning: {
2348
- icon: Eo,
2349
- iconColor: "text-warning",
2350
- buttonVariant: "default"
2351
- },
2352
- info: {
2353
- icon: vt,
2354
- iconColor: "text-info",
2355
- buttonVariant: "default"
2356
- },
2357
- success: {
2358
- icon: So,
2359
- iconColor: "text-success",
2360
- buttonVariant: "default"
2361
- }
2362
- }, Qs = c.forwardRef(
2363
- ({
2364
- open: e,
2365
- onOpenChange: a,
2366
- title: r,
2367
- description: o,
2368
- confirmLabel: n = "Confirm",
2369
- cancelLabel: i = "Cancel",
2370
- onConfirm: s,
2371
- onCancel: d,
2372
- variant: u = "default",
2373
- loading: f = !1,
2374
- confirmationText: m,
2375
- confirmationPlaceholder: l = "Type to confirm"
2376
- }, g) => {
2377
- const [h, b] = c.useState(""), v = Zs[u], w = v.icon, N = m && h !== m || f, x = () => {
2378
- s(), b("");
2379
- }, C = () => {
2380
- d == null || d(), b(""), a(!1);
2381
- };
2382
- return /* @__PURE__ */ t(_n, { open: e, onOpenChange: a, children: /* @__PURE__ */ p(Sr, { ref: g, children: [
2383
- /* @__PURE__ */ t(Er, { children: /* @__PURE__ */ p("div", { className: "flex items-start gap-4", children: [
2384
- /* @__PURE__ */ t(
2385
- "div",
2386
- {
2387
- className: y(
2388
- "flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-full",
2389
- u === "destructive" && "bg-destructive/10",
2390
- u === "warning" && "bg-warning/10",
2391
- u === "info" && "bg-info/10",
2392
- u === "success" && "bg-success/10",
2393
- u === "default" && "bg-muted"
2394
- ),
2395
- children: /* @__PURE__ */ t(w, { className: y("h-5 w-5", v.iconColor) })
2396
- }
2397
- ),
2398
- /* @__PURE__ */ p("div", { className: "flex-1", children: [
2399
- /* @__PURE__ */ t(Pr, { children: r }),
2400
- /* @__PURE__ */ t(Dr, { className: "mt-2", children: o })
2401
- ] })
2402
- ] }) }),
2403
- m && /* @__PURE__ */ p("div", { className: "mt-4 space-y-2", children: [
2404
- /* @__PURE__ */ p(Co, { htmlFor: "confirmation-input", className: "text-sm", children: [
2405
- "Type ",
2406
- /* @__PURE__ */ t("span", { className: "font-mono font-bold", children: m }),
2407
- " to confirm"
2408
- ] }),
2409
- /* @__PURE__ */ t(
2410
- fo,
2411
- {
2412
- id: "confirmation-input",
2413
- value: h,
2414
- onChange: (R) => b(R.target.value),
2415
- placeholder: l,
2416
- autoComplete: "off"
2417
- }
2418
- )
2419
- ] }),
2420
- /* @__PURE__ */ p(Ar, { className: "mt-4", children: [
2421
- /* @__PURE__ */ t(Ir, { onClick: C, disabled: f, children: i }),
2422
- /* @__PURE__ */ t(
2423
- _r,
2424
- {
2425
- onClick: x,
2426
- disabled: N,
2427
- className: y(
2428
- u === "destructive" && "bg-destructive text-destructive-foreground hover:bg-destructive/90"
2429
- ),
2430
- children: f ? "Loading..." : n
2431
- }
2432
- )
2433
- ] })
2434
- ] }) });
2435
- }
2436
- );
2437
- Qs.displayName = "ConfirmationDialog";
2438
- const Me = {
2439
- sm: "h-6 w-6 text-[10px]",
2440
- md: "h-8 w-8 text-xs",
2441
- lg: "h-10 w-10 text-sm"
2442
- }, ei = c.forwardRef(
2443
- ({
2444
- className: e,
2445
- avatars: a,
2446
- max: r = 4,
2447
- size: o = "md",
2448
- showTooltip: n = !0,
2449
- onMoreClick: i,
2450
- ...s
2451
- }, d) => {
2452
- const u = a.slice(0, r), f = a.length - r, m = f > 0, l = (h) => h.split(" ").map((b) => b[0]).join("").toUpperCase().slice(0, 2), g = (h, b) => {
2453
- const v = /* @__PURE__ */ p(
2454
- Lt,
2455
- {
2456
- className: y(
2457
- Me[o],
2458
- "border-2 border-background",
2459
- b > 0 && "-ml-2"
2460
- ),
2461
- children: [
2462
- h.image && /* @__PURE__ */ t(Vt, { src: h.image, alt: h.name }),
2463
- /* @__PURE__ */ t(Bt, { className: y(Me[o], "font-medium"), children: l(h.name) })
2464
- ]
2465
- },
2466
- b
2467
- );
2468
- return h.href ? /* @__PURE__ */ t("a", { href: h.href, className: "focus:outline-none focus:ring-2 focus:ring-ring rounded-full", children: n ? /* @__PURE__ */ p(oe, { children: [
2469
- /* @__PURE__ */ t(ne, { asChild: !0, children: v }),
2470
- /* @__PURE__ */ t(se, { children: /* @__PURE__ */ t("p", { children: h.name }) })
2471
- ] }) : v }, b) : n ? /* @__PURE__ */ p(oe, { children: [
2472
- /* @__PURE__ */ t(ne, { asChild: !0, children: v }),
2473
- /* @__PURE__ */ t(se, { children: /* @__PURE__ */ t("p", { children: h.name }) })
2474
- ] }, b) : v;
2475
- };
2476
- return /* @__PURE__ */ t(We, { children: /* @__PURE__ */ p("div", { ref: d, className: y("flex items-center", e), ...s, children: [
2477
- u.map((h, b) => g(h, b)),
2478
- m && /* @__PURE__ */ p(oe, { children: [
2479
- /* @__PURE__ */ t(ne, { asChild: !0, children: /* @__PURE__ */ p(
2480
- "button",
2481
- {
2482
- onClick: i,
2483
- className: y(
2484
- Me[o],
2485
- "relative -ml-2 flex items-center justify-center rounded-full border-2 border-background bg-muted font-medium text-muted-foreground hover:bg-muted/80",
2486
- i && "cursor-pointer"
2487
- ),
2488
- children: [
2489
- "+",
2490
- f
2491
- ]
2492
- }
2493
- ) }),
2494
- /* @__PURE__ */ t(se, { children: /* @__PURE__ */ t("div", { className: "space-y-1", children: a.slice(r).map((h, b) => /* @__PURE__ */ t("p", { children: h.name }, b)) }) })
2495
- ] })
2496
- ] }) });
2497
- }
2498
- );
2499
- ei.displayName = "AvatarGroup";
2500
- const ti = {
2501
- sm: "h-8 w-8",
2502
- md: "h-10 w-10",
2503
- lg: "h-12 w-12",
2504
- xl: "h-16 w-16"
2505
- }, ri = {
2506
- sm: "h-2.5 w-2.5",
2507
- md: "h-3 w-3",
2508
- lg: "h-3.5 w-3.5",
2509
- xl: "h-4 w-4"
2510
- }, ai = {
2511
- online: "bg-success",
2512
- offline: "bg-muted-foreground",
2513
- away: "bg-warning",
2514
- busy: "bg-destructive",
2515
- dnd: "bg-destructive"
2516
- }, oi = {
2517
- "bottom-right": "bottom-0 right-0",
2518
- "bottom-left": "bottom-0 left-0",
2519
- "top-right": "top-0 right-0",
2520
- "top-left": "top-0 left-0"
2521
- }, ni = c.forwardRef(
2522
- ({
2523
- className: e,
2524
- name: a,
2525
- image: r,
2526
- status: o = "offline",
2527
- showStatus: n = !0,
2528
- size: i = "md",
2529
- statusPosition: s = "bottom-right",
2530
- ...d
2531
- }, u) => {
2532
- const f = (m) => m.split(" ").map((l) => l[0]).join("").toUpperCase().slice(0, 2);
2533
- return /* @__PURE__ */ p("div", { ref: u, className: y("relative inline-block", e), ...d, children: [
2534
- /* @__PURE__ */ p(Lt, { className: ti[i], children: [
2535
- r && /* @__PURE__ */ t(Vt, { src: r, alt: a }),
2536
- /* @__PURE__ */ t(Bt, { children: f(a) })
2537
- ] }),
2538
- n && /* @__PURE__ */ t(
2539
- "span",
2540
- {
2541
- className: y(
2542
- "absolute block rounded-full border-2 border-background",
2543
- ri[i],
2544
- ai[o],
2545
- oi[s]
2546
- ),
2547
- title: o.charAt(0).toUpperCase() + o.slice(1)
2548
- }
2549
- )
2550
- ] });
2551
- }
2552
- );
2553
- ni.displayName = "AvatarWithStatus";
2554
- const si = c.forwardRef(
2555
- ({
2556
- className: e,
2557
- steps: a,
2558
- currentStep: r,
2559
- orientation: o = "horizontal",
2560
- onStepClick: n,
2561
- allowClickPast: i = !1,
2562
- showStepNumber: s = !0,
2563
- ...d
2564
- }, u) => {
2565
- const f = (m) => {
2566
- n && (i || m <= r) && n(m);
2567
- };
2568
- return /* @__PURE__ */ t(
2569
- "div",
2570
- {
2571
- ref: u,
2572
- className: y(
2573
- "flex",
2574
- o === "horizontal" ? "flex-row items-center" : "flex-col",
2575
- e
2576
- ),
2577
- ...d,
2578
- children: a.map((m, l) => {
2579
- const g = l < r, h = l === r, b = n && (i || l <= r);
2580
- return /* @__PURE__ */ p(c.Fragment, { children: [
2581
- /* @__PURE__ */ p(
2582
- "div",
2583
- {
2584
- className: y(
2585
- "flex",
2586
- o === "horizontal" ? "flex-col items-center" : "flex-row items-start gap-4",
2587
- b && "cursor-pointer"
2588
- ),
2589
- onClick: () => f(l),
2590
- children: [
2591
- /* @__PURE__ */ t(
2592
- "div",
2593
- {
2594
- className: y(
2595
- "flex h-10 w-10 items-center justify-center rounded-full border-2 text-sm font-medium transition-colors",
2596
- g && "border-primary bg-primary text-primary-foreground",
2597
- h && "border-primary text-primary",
2598
- !g && !h && "border-muted-foreground/30 text-muted-foreground"
2599
- ),
2600
- children: g ? /* @__PURE__ */ t(so, { className: "h-5 w-5" }) : m.icon ? m.icon : s ? l + 1 : null
2601
- }
2602
- ),
2603
- /* @__PURE__ */ p(
2604
- "div",
2605
- {
2606
- className: y(
2607
- "text-center",
2608
- o === "horizontal" ? "mt-2" : "flex-1",
2609
- o === "vertical" && "text-left"
2610
- ),
2611
- children: [
2612
- /* @__PURE__ */ p(
2613
- "p",
2614
- {
2615
- className: y(
2616
- "text-sm font-medium",
2617
- h && "text-primary",
2618
- !g && !h && "text-muted-foreground"
2619
- ),
2620
- children: [
2621
- m.title,
2622
- m.optional && /* @__PURE__ */ t("span", { className: "ml-1 text-xs font-normal text-muted-foreground", children: "(Optional)" })
2623
- ]
2624
- }
2625
- ),
2626
- m.description && /* @__PURE__ */ t("p", { className: "text-xs text-muted-foreground", children: m.description })
2627
- ]
2628
- }
2629
- )
2630
- ]
2631
- }
2632
- ),
2633
- l < a.length - 1 && /* @__PURE__ */ t(
2634
- "div",
2635
- {
2636
- className: y(
2637
- "bg-muted-foreground/30",
2638
- o === "horizontal" ? "mx-4 h-0.5 flex-1" : "ml-5 mt-2 mb-2 w-0.5 min-h-8",
2639
- l < r && "bg-primary"
2640
- )
2641
- }
2642
- )
2643
- ] }, m.id);
2644
- })
2645
- }
2646
- );
2647
- }
2648
- );
2649
- si.displayName = "Stepper";
2650
- const ii = c.forwardRef(
2651
- ({
2652
- className: e,
2653
- value: a,
2654
- onChange: r,
2655
- minDate: o,
2656
- maxDate: n,
2657
- disabledDates: i = [],
2658
- highlightedDates: s = [],
2659
- ...d
2660
- }, u) => {
2661
- const [f, m] = c.useState(a || /* @__PURE__ */ new Date()), l = Ye(f), g = Xe(l), h = ye(l), b = Je(g), v = [];
2662
- let w = h;
2663
- for (; w <= b; )
2664
- v.push(w), w = we(w, 1);
2665
- const N = (A) => o && A < o || n && A > n ? !0 : i.some(($) => Y($, A)), x = (A) => s.some(($) => Y($, A)), C = () => m(to(f)), R = () => m(qe(f, 1)), S = (A) => {
2666
- N(A) || r == null || r(A);
2667
- }, I = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"];
2668
- return /* @__PURE__ */ p("div", { ref: u, className: y("w-64 rounded-lg border bg-card p-3", e), ...d, children: [
2669
- /* @__PURE__ */ p("div", { className: "mb-2 flex items-center justify-between", children: [
2670
- /* @__PURE__ */ t(
2671
- W,
2672
- {
2673
- variant: "ghost",
2674
- size: "icon",
2675
- className: "h-7 w-7",
2676
- onClick: C,
2677
- children: /* @__PURE__ */ t(Ot, { className: "h-4 w-4" })
2678
- }
2679
- ),
2680
- /* @__PURE__ */ t("span", { className: "text-sm font-medium", children: G(f, "MMMM yyyy") }),
2681
- /* @__PURE__ */ t(
2682
- W,
2683
- {
2684
- variant: "ghost",
2685
- size: "icon",
2686
- className: "h-7 w-7",
2687
- onClick: R,
2688
- children: /* @__PURE__ */ t(Ht, { className: "h-4 w-4" })
2689
- }
2690
- )
2691
- ] }),
2692
- /* @__PURE__ */ t("div", { className: "mb-1 grid grid-cols-7 gap-0", children: I.map((A) => /* @__PURE__ */ t(
2693
- "div",
2694
- {
2695
- className: "flex h-8 items-center justify-center text-xs font-medium text-muted-foreground",
2696
- children: A
2697
- },
2698
- A
2699
- )) }),
2700
- /* @__PURE__ */ t("div", { className: "grid grid-cols-7 gap-0", children: v.map((A, $) => {
2701
- const M = Ft(A, f), k = a && Y(A, a), P = Pe(A), O = N(A), B = x(A);
2702
- return /* @__PURE__ */ p(
2703
- "button",
2704
- {
2705
- onClick: () => S(A),
2706
- disabled: O,
2707
- className: y(
2708
- "relative flex h-8 w-8 items-center justify-center rounded-md text-sm transition-colors",
2709
- !M && "text-muted-foreground/40",
2710
- M && "hover:bg-accent",
2711
- P && "font-bold",
2712
- P && !k && "text-primary",
2713
- k && "bg-primary text-primary-foreground hover:bg-primary",
2714
- O && "cursor-not-allowed opacity-50",
2715
- B && !k && "bg-accent"
2716
- ),
2717
- children: [
2718
- G(A, "d"),
2719
- B && !k && /* @__PURE__ */ t("span", { className: "absolute bottom-1 h-1 w-1 rounded-full bg-primary" })
2720
- ]
2721
- },
2722
- $
2723
- );
2724
- }) })
2725
- ] });
2726
- }
2727
- );
2728
- ii.displayName = "MiniCalendar";
2729
- const ci = c.forwardRef(
2730
- ({ className: e, title: a, description: r, children: o, footer: n, variant: i = "default", ...s }, d) => i === "card" ? /* @__PURE__ */ p(Io, { ref: d, className: e, ...s, children: [
2731
- /* @__PURE__ */ p(Mo, { children: [
2732
- /* @__PURE__ */ t(ko, { className: "text-lg", children: a }),
2733
- r && /* @__PURE__ */ t($o, { children: r })
2734
- ] }),
2735
- /* @__PURE__ */ t(Oo, { className: "space-y-4", children: o }),
2736
- n && /* @__PURE__ */ p(ie, { children: [
2737
- /* @__PURE__ */ t(_e, {}),
2738
- /* @__PURE__ */ t("div", { className: "flex items-center justify-end gap-2 p-4", children: n })
2739
- ] })
2740
- ] }) : /* @__PURE__ */ p("div", { ref: d, className: y("space-y-4", e), ...s, children: [
2741
- /* @__PURE__ */ p("div", { children: [
2742
- /* @__PURE__ */ t("h3", { className: "text-lg font-medium", children: a }),
2743
- r && /* @__PURE__ */ t("p", { className: "text-sm text-muted-foreground", children: r })
2744
- ] }),
2745
- /* @__PURE__ */ t(_e, {}),
2746
- /* @__PURE__ */ t("div", { className: "space-y-4", children: o }),
2747
- n && /* @__PURE__ */ p(ie, { children: [
2748
- /* @__PURE__ */ t(_e, {}),
2749
- /* @__PURE__ */ t("div", { className: "flex items-center justify-end gap-2", children: n })
2750
- ] })
2751
- ] })
2752
- );
2753
- ci.displayName = "SettingsSection";
2754
- const li = c.forwardRef(
2755
- ({ className: e, label: a, description: r, children: o, htmlFor: n, ...i }, s) => /* @__PURE__ */ p(
2756
- "div",
2757
- {
2758
- ref: s,
2759
- className: y("flex items-start justify-between gap-4", e),
2760
- ...i,
2761
- children: [
2762
- /* @__PURE__ */ p("div", { className: "space-y-0.5", children: [
2763
- /* @__PURE__ */ t("label", { htmlFor: n, className: "text-sm font-medium", children: a }),
2764
- r && /* @__PURE__ */ t("p", { className: "text-xs text-muted-foreground", children: r })
2765
- ] }),
2766
- /* @__PURE__ */ t("div", { className: "flex-shrink-0", children: o })
2767
- ]
2768
- }
2769
- )
2770
- );
2771
- li.displayName = "SettingsRow";
2772
- const di = [
2773
- { format: "csv", label: "Export as CSV", icon: /* @__PURE__ */ t(bt, { className: "h-4 w-4" }) },
2774
- { format: "excel", label: "Export as Excel", icon: /* @__PURE__ */ t(ln, { className: "h-4 w-4" }) },
2775
- { format: "pdf", label: "Export as PDF", icon: /* @__PURE__ */ t(bt, { className: "h-4 w-4" }) },
2776
- { format: "json", label: "Export as JSON", icon: /* @__PURE__ */ t(cn, { className: "h-4 w-4" }) }
2777
- ], ui = c.forwardRef(
2778
- ({
2779
- className: e,
2780
- onExport: a,
2781
- options: r = di,
2782
- loading: o = !1,
2783
- defaultFormat: n = "csv",
2784
- showDropdown: i = !0,
2785
- variant: s = "outline",
2786
- size: d = "sm",
2787
- children: u,
2788
- ...f
2789
- }, m) => {
2790
- const [l, g] = c.useState(!1), h = async (v) => {
2791
- g(!0);
2792
- try {
2793
- await a(v);
2794
- } finally {
2795
- g(!1);
2796
- }
2797
- }, b = o || l;
2798
- return !i || r.length === 1 ? /* @__PURE__ */ p(
2799
- W,
2800
- {
2801
- ref: m,
2802
- variant: s,
2803
- size: d,
2804
- className: y("gap-2", e),
2805
- onClick: () => {
2806
- var v;
2807
- return h(((v = r[0]) == null ? void 0 : v.format) || n);
2808
- },
2809
- disabled: b,
2810
- ...f,
2811
- children: [
2812
- b ? /* @__PURE__ */ t(wt, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ t(yt, { className: "h-4 w-4" }),
2813
- u || "Export"
2814
- ]
2815
- }
2816
- ) : /* @__PURE__ */ p(St, { children: [
2817
- /* @__PURE__ */ t(Et, { asChild: !0, children: /* @__PURE__ */ p(
2818
- W,
2819
- {
2820
- ref: m,
2821
- variant: s,
2822
- size: d,
2823
- className: y("gap-2", e),
2824
- disabled: b,
2825
- ...f,
2826
- children: [
2827
- b ? /* @__PURE__ */ t(wt, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ t(yt, { className: "h-4 w-4" }),
2828
- u || "Export",
2829
- /* @__PURE__ */ t(Ge, { className: "h-3 w-3 opacity-50" })
2830
- ]
2831
- }
2832
- ) }),
2833
- /* @__PURE__ */ t(At, { align: "end", children: r.map((v) => /* @__PURE__ */ p(
2834
- Pt,
2835
- {
2836
- onClick: () => h(v.format),
2837
- disabled: v.disabled,
2838
- className: "gap-2",
2839
- children: [
2840
- v.icon,
2841
- v.label
2842
- ]
2843
- },
2844
- v.format
2845
- )) })
2846
- ] });
2847
- }
2848
- );
2849
- ui.displayName = "ExportButton";
2850
- const fi = c.forwardRef(
2851
- ({ className: e, ...a }, r) => /* @__PURE__ */ p("div", { ref: r, className: y("space-y-3 rounded-lg border p-4", e), ...a, children: [
2852
- /* @__PURE__ */ t(T, { className: "h-4 w-1/2" }),
2853
- /* @__PURE__ */ t(T, { className: "h-8 w-3/4" }),
2854
- /* @__PURE__ */ t(T, { className: "h-3 w-full" }),
2855
- /* @__PURE__ */ t(T, { className: "h-3 w-2/3" })
2856
- ] })
2857
- );
2858
- fi.displayName = "SkeletonCard";
2859
- const Nt = () => /* @__PURE__ */ p("div", { className: "space-y-3 rounded-lg border p-4", children: [
2860
- /* @__PURE__ */ t(T, { className: "h-4 w-1/2" }),
2861
- /* @__PURE__ */ t(T, { className: "h-8 w-3/4" }),
2862
- /* @__PURE__ */ t(T, { className: "h-3 w-full" }),
2863
- /* @__PURE__ */ t(T, { className: "h-3 w-2/3" })
2864
- ] }), mi = c.forwardRef(
2865
- ({ className: e, rows: a = 5, columns: r = 4, ...o }, n) => /* @__PURE__ */ p("div", { ref: n, className: y("space-y-2", e), ...o, children: [
2866
- /* @__PURE__ */ t("div", { className: "flex gap-4 border-b pb-2", children: Array.from({ length: r }).map((i, s) => /* @__PURE__ */ t(T, { className: "h-4 flex-1" }, s)) }),
2867
- Array.from({ length: a }).map((i, s) => /* @__PURE__ */ t("div", { className: "flex gap-4 py-2", children: Array.from({ length: r }).map((d, u) => /* @__PURE__ */ t(T, { className: "h-4 flex-1" }, u)) }, s))
2868
- ] })
2869
- );
2870
- mi.displayName = "SkeletonTable";
2871
- const pi = ({ rows: e = 5 }) => /* @__PURE__ */ p("div", { className: "space-y-2", children: [
2872
- /* @__PURE__ */ p("div", { className: "flex gap-4 border-b pb-2", children: [
2873
- /* @__PURE__ */ t(T, { className: "h-4 w-1/4" }),
2874
- /* @__PURE__ */ t(T, { className: "h-4 w-1/4" }),
2875
- /* @__PURE__ */ t(T, { className: "h-4 w-1/4" }),
2876
- /* @__PURE__ */ t(T, { className: "h-4 w-1/4" })
2877
- ] }),
2878
- Array.from({ length: e }).map((a, r) => /* @__PURE__ */ p("div", { className: "flex gap-4 py-2", children: [
2879
- /* @__PURE__ */ t(T, { className: "h-4 w-1/4" }),
2880
- /* @__PURE__ */ t(T, { className: "h-4 w-1/4" }),
2881
- /* @__PURE__ */ t(T, { className: "h-4 w-1/4" }),
2882
- /* @__PURE__ */ t(T, { className: "h-4 w-1/4" })
2883
- ] }, r))
2884
- ] }), hi = c.forwardRef(
2885
- ({ className: e, items: a = 3, ...r }, o) => /* @__PURE__ */ t("div", { ref: o, className: y("space-y-3", e), ...r, children: Array.from({ length: a }).map((n, i) => /* @__PURE__ */ p("div", { className: "flex items-center gap-3", children: [
2886
- /* @__PURE__ */ t(T, { className: "h-10 w-10 rounded-full" }),
2887
- /* @__PURE__ */ p("div", { className: "flex-1 space-y-1.5", children: [
2888
- /* @__PURE__ */ t(T, { className: "h-4 w-1/3" }),
2889
- /* @__PURE__ */ t(T, { className: "h-3 w-2/3" })
2890
- ] })
2891
- ] }, i)) })
2892
- );
2893
- hi.displayName = "SkeletonList";
2894
- const gi = ({ items: e = 3 }) => /* @__PURE__ */ t("div", { className: "space-y-3", children: Array.from({ length: e }).map((a, r) => /* @__PURE__ */ p("div", { className: "flex items-center gap-3", children: [
2895
- /* @__PURE__ */ t(T, { className: "h-10 w-10 rounded-full" }),
2896
- /* @__PURE__ */ p("div", { className: "flex-1 space-y-1.5", children: [
2897
- /* @__PURE__ */ t(T, { className: "h-4 w-1/3" }),
2898
- /* @__PURE__ */ t(T, { className: "h-3 w-2/3" })
2899
- ] })
2900
- ] }, r)) }), vi = () => /* @__PURE__ */ p("div", { className: "space-y-4", children: [
2901
- /* @__PURE__ */ p("div", { className: "space-y-2", children: [
2902
- /* @__PURE__ */ t(T, { className: "h-4 w-20" }),
2903
- /* @__PURE__ */ t(T, { className: "h-10 w-full" })
2904
- ] }),
2905
- /* @__PURE__ */ p("div", { className: "space-y-2", children: [
2906
- /* @__PURE__ */ t(T, { className: "h-4 w-24" }),
2907
- /* @__PURE__ */ t(T, { className: "h-10 w-full" })
2908
- ] }),
2909
- /* @__PURE__ */ p("div", { className: "space-y-2", children: [
2910
- /* @__PURE__ */ t(T, { className: "h-4 w-16" }),
2911
- /* @__PURE__ */ t(T, { className: "h-24 w-full" })
2912
- ] }),
2913
- /* @__PURE__ */ t(T, { className: "h-10 w-24" })
2914
- ] }), bi = c.forwardRef(
2915
- ({ className: e, ...a }, r) => /* @__PURE__ */ p("div", { ref: r, className: y("flex items-start gap-4", e), ...a, children: [
2916
- /* @__PURE__ */ t(T, { className: "h-20 w-20 rounded-full" }),
2917
- /* @__PURE__ */ p("div", { className: "flex-1 space-y-2", children: [
2918
- /* @__PURE__ */ t(T, { className: "h-6 w-48" }),
2919
- /* @__PURE__ */ t(T, { className: "h-4 w-32" }),
2920
- /* @__PURE__ */ t(T, { className: "h-3 w-64" })
2921
- ] })
2922
- ] })
2923
- );
2924
- bi.displayName = "SkeletonProfile";
2925
- const wi = () => /* @__PURE__ */ p("div", { className: "flex items-start gap-4", children: [
2926
- /* @__PURE__ */ t(T, { className: "h-20 w-20 rounded-full" }),
2927
- /* @__PURE__ */ p("div", { className: "flex-1 space-y-2", children: [
2928
- /* @__PURE__ */ t(T, { className: "h-6 w-48" }),
2929
- /* @__PURE__ */ t(T, { className: "h-4 w-32" }),
2930
- /* @__PURE__ */ t(T, { className: "h-3 w-64" })
2931
- ] })
2932
- ] }), yi = ({ count: e = 4 }) => /* @__PURE__ */ t("div", { className: "grid grid-cols-2 gap-4 md:grid-cols-4", children: Array.from({ length: e }).map((a, r) => /* @__PURE__ */ p("div", { className: "space-y-2 rounded-lg border p-4", children: [
2933
- /* @__PURE__ */ t(T, { className: "h-3 w-20" }),
2934
- /* @__PURE__ */ t(T, { className: "h-8 w-24" }),
2935
- /* @__PURE__ */ t(T, { className: "h-3 w-16" })
2936
- ] }, r)) }), xi = c.forwardRef(
2937
- ({ className: e, lines: a = 3, ...r }, o) => /* @__PURE__ */ t("div", { ref: o, className: y("space-y-2", e), ...r, children: Array.from({ length: a }).map((n, i) => /* @__PURE__ */ t(
2938
- T,
2939
- {
2940
- className: y("h-4", i === a - 1 ? "w-3/4" : "w-full")
2941
- },
2942
- i
2943
- )) })
2944
- );
2945
- xi.displayName = "SkeletonText";
2946
- const Ni = c.forwardRef(
2947
- ({ className: e, variant: a = "card", count: r = 1, ...o }, n) => {
2948
- const i = () => {
2949
- switch (a) {
2950
- case "card":
2951
- return Array.from({ length: r }).map((s, d) => /* @__PURE__ */ t(Nt, {}, d));
2952
- case "table":
2953
- return /* @__PURE__ */ t(pi, { rows: r });
2954
- case "list":
2955
- return /* @__PURE__ */ t(gi, { items: r });
2956
- case "form":
2957
- return /* @__PURE__ */ t(vi, {});
2958
- case "profile":
2959
- return /* @__PURE__ */ t(wi, {});
2960
- case "stats":
2961
- return /* @__PURE__ */ t(yi, { count: r });
2962
- default:
2963
- return /* @__PURE__ */ t(Nt, {});
2964
- }
2965
- };
2966
- return /* @__PURE__ */ t(
2967
- "div",
2968
- {
2969
- ref: n,
2970
- className: y(a === "card" && r > 1 && "grid gap-4 md:grid-cols-2 lg:grid-cols-3", e),
2971
- ...o,
2972
- children: i()
2973
- }
2974
- );
2975
- }
2976
- );
2977
- Ni.displayName = "SkeletonLoader";
2978
- const Ci = {
2979
- beta: {
2980
- label: "Beta",
2981
- className: "bg-info/20 text-info hover:bg-info/30 border-info/30",
2982
- defaultTooltip: "This feature is in beta and may change"
2983
- },
2984
- new: {
2985
- label: "New",
2986
- className: "bg-success/20 text-success hover:bg-success/30 border-success/30",
2987
- defaultTooltip: "This feature was recently added"
2988
- },
2989
- experimental: {
2990
- label: "Experimental",
2991
- className: "bg-warning/20 text-warning hover:bg-warning/30 border-warning/30",
2992
- defaultTooltip: "This feature is experimental and may not work as expected"
2993
- },
2994
- "coming-soon": {
2995
- label: "Coming Soon",
2996
- className: "bg-muted text-muted-foreground hover:bg-muted/80 border-muted",
2997
- defaultTooltip: "This feature is coming soon"
2998
- },
2999
- deprecated: {
3000
- label: "Deprecated",
3001
- className: "bg-destructive/20 text-destructive hover:bg-destructive/30 border-destructive/30",
3002
- defaultTooltip: "This feature is deprecated and will be removed"
3003
- }
3004
- }, Ri = c.forwardRef(
3005
- ({ className: e, variant: a = "beta", tooltip: r, showTooltip: o = !0, children: n, ...i }, s) => {
3006
- const d = Ci[a], u = r || d.defaultTooltip, f = /* @__PURE__ */ t("span", { ref: s, children: /* @__PURE__ */ t(
3007
- fe,
3008
- {
3009
- className: y("text-xs font-medium border", d.className, e),
3010
- ...i,
3011
- children: n || d.label
3012
- }
3013
- ) });
3014
- return o ? /* @__PURE__ */ t(We, { children: /* @__PURE__ */ p(oe, { children: [
3015
- /* @__PURE__ */ t(ne, { asChild: !0, children: f }),
3016
- /* @__PURE__ */ t(se, { children: /* @__PURE__ */ t("p", { children: u }) })
3017
- ] }) }) : f;
3018
- }
3019
- );
3020
- Ri.displayName = "BetaBadge";
3021
- const Ti = {
3022
- default: { bg: "bg-primary/10", text: "text-primary", border: "border-primary" },
3023
- work: { bg: "bg-blue-100", text: "text-blue-700", border: "border-blue-500" },
3024
- personal: { bg: "bg-green-100", text: "text-green-700", border: "border-green-500" },
3025
- meeting: { bg: "bg-purple-100", text: "text-purple-700", border: "border-purple-500" },
3026
- reminder: { bg: "bg-yellow-100", text: "text-yellow-700", border: "border-yellow-500" },
3027
- holiday: { bg: "bg-red-100", text: "text-red-700", border: "border-red-500" }
3028
- }, F = (e) => typeof e == "string" ? Kt(e) : e, Si = ({
3029
- date: e,
3030
- view: a,
3031
- onViewChange: r,
3032
- onNavigate: o,
3033
- showViewSelector: n = !0,
3034
- showNavigation: i = !0,
3035
- showToday: s = !0
3036
- }) => {
3037
- const { t: d, formatDate: u } = re(), f = () => {
3038
- switch (a) {
3039
- case "month":
3040
- return u(e, "MMMM yyyy");
3041
- case "week":
3042
- const m = ye(e), l = Je(e);
3043
- return m.getMonth() === l.getMonth() ? `${u(m, "MMM d")} - ${u(l, "d, yyyy")}` : `${u(m, "MMM d")} - ${u(l, "MMM d, yyyy")}`;
3044
- case "day":
3045
- return u(e, "EEEE, MMMM d, yyyy");
3046
- case "agenda":
3047
- return u(e, "MMMM yyyy");
3048
- default:
3049
- return u(e, "MMMM yyyy");
3050
- }
3051
- };
3052
- return /* @__PURE__ */ p("div", { className: "flex items-center justify-between border-b p-4", children: [
3053
- /* @__PURE__ */ p("div", { className: "flex items-center gap-4", children: [
3054
- i && /* @__PURE__ */ p("div", { className: "flex items-center gap-1", children: [
3055
- /* @__PURE__ */ t(
3056
- W,
3057
- {
3058
- variant: "outline",
3059
- size: "icon",
3060
- onClick: () => o("prev"),
3061
- className: "h-8 w-8",
3062
- children: /* @__PURE__ */ t(Ot, { className: "h-4 w-4" })
3063
- }
3064
- ),
3065
- /* @__PURE__ */ t(
3066
- W,
3067
- {
3068
- variant: "outline",
3069
- size: "icon",
3070
- onClick: () => o("next"),
3071
- className: "h-8 w-8",
3072
- children: /* @__PURE__ */ t(Ht, { className: "h-4 w-4" })
3073
- }
3074
- )
3075
- ] }),
3076
- s && /* @__PURE__ */ t(W, { variant: "outline", size: "sm", onClick: () => o("today"), children: d("calendar.today") }),
3077
- /* @__PURE__ */ t("h2", { className: "text-lg font-semibold", children: f() })
3078
- ] }),
3079
- n && /* @__PURE__ */ p(Bo, { value: a, onValueChange: (m) => r(m), children: [
3080
- /* @__PURE__ */ t(Ho, { className: "w-32", children: /* @__PURE__ */ t(Ko, {}) }),
3081
- /* @__PURE__ */ p(zo, { children: [
3082
- /* @__PURE__ */ t(de, { value: "month", children: d("calendar.month") }),
3083
- /* @__PURE__ */ t(de, { value: "week", children: d("calendar.week") }),
3084
- /* @__PURE__ */ t(de, { value: "day", children: d("calendar.day") }),
3085
- /* @__PURE__ */ t(de, { value: "agenda", children: d("calendar.agenda") })
3086
- ] })
3087
- ] })
3088
- ] });
3089
- }, te = ({ event: e, compact: a = !1, onClick: r }) => {
3090
- const { t: o, formatDate: n } = re(), i = e.category || "default", s = Ti[i], d = F(e.start), u = F(e.end);
3091
- return a ? /* @__PURE__ */ p(
3092
- "button",
3093
- {
3094
- onClick: () => r == null ? void 0 : r(e),
3095
- className: y(
3096
- "w-full truncate rounded px-1 py-0.5 text-left text-xs",
3097
- s.bg,
3098
- s.text,
3099
- "hover:opacity-80 transition-opacity"
3100
- ),
3101
- children: [
3102
- !e.allDay && /* @__PURE__ */ p("span", { className: "font-medium", children: [
3103
- G(d, "h:mm"),
3104
- " "
3105
- ] }),
3106
- e.title
3107
- ]
3108
- }
3109
- ) : /* @__PURE__ */ p(Fo, { children: [
3110
- /* @__PURE__ */ t(Lo, { asChild: !0, children: /* @__PURE__ */ p(
3111
- "button",
3112
- {
3113
- className: y(
3114
- "w-full truncate rounded-md px-2 py-1 text-left text-sm border-l-2",
3115
- s.bg,
3116
- s.text,
3117
- s.border,
3118
- "hover:opacity-80 transition-opacity"
3119
- ),
3120
- children: [
3121
- /* @__PURE__ */ t("div", { className: "font-medium truncate", children: e.title }),
3122
- !e.allDay && /* @__PURE__ */ p("div", { className: "text-xs opacity-75", children: [
3123
- G(d, "h:mm a"),
3124
- " - ",
3125
- G(u, "h:mm a")
3126
- ] })
3127
- ]
3128
- }
3129
- ) }),
3130
- /* @__PURE__ */ t(Vo, { className: "w-80", align: "start", children: /* @__PURE__ */ p("div", { className: "space-y-3", children: [
3131
- /* @__PURE__ */ p("div", { className: "flex items-start justify-between", children: [
3132
- /* @__PURE__ */ t("h3", { className: "font-semibold text-lg", children: e.title }),
3133
- /* @__PURE__ */ t(fe, { variant: "secondary", className: y("capitalize", s.bg, s.text), children: i })
3134
- ] }),
3135
- /* @__PURE__ */ p("div", { className: "space-y-2 text-sm", children: [
3136
- /* @__PURE__ */ p("div", { className: "flex items-center gap-2 text-muted-foreground", children: [
3137
- /* @__PURE__ */ t(Ro, { className: "h-4 w-4" }),
3138
- e.allDay ? /* @__PURE__ */ t("span", { children: o("calendar.allDay") }) : /* @__PURE__ */ p("span", { children: [
3139
- n(d, "MMM d, h:mm a"),
3140
- " - ",
3141
- G(u, "h:mm a")
3142
- ] })
3143
- ] }),
3144
- e.location && /* @__PURE__ */ p("div", { className: "flex items-center gap-2 text-muted-foreground", children: [
3145
- /* @__PURE__ */ t(Po, { className: "h-4 w-4" }),
3146
- /* @__PURE__ */ t("span", { children: e.location })
3147
- ] }),
3148
- e.description && /* @__PURE__ */ t("p", { className: "text-muted-foreground pt-2", children: e.description })
3149
- ] }),
3150
- /* @__PURE__ */ t("div", { className: "flex gap-2 pt-2", children: /* @__PURE__ */ t(W, { size: "sm", className: "flex-1", onClick: () => r == null ? void 0 : r(e), children: o("calendar.viewDetails") }) })
3151
- ] }) })
3152
- ] });
3153
- }, Ei = ({
3154
- date: e,
3155
- events: a,
3156
- onEventClick: r,
3157
- onDateClick: o
3158
- }) => {
3159
- const { t: n, formatDate: i } = re(), s = Ye(e), d = Xe(s), u = ye(s), f = Je(d), m = [];
3160
- let l = u;
3161
- for (; l <= f; )
3162
- m.push(l), l = we(l, 1);
3163
- const g = (b) => a.filter((v) => {
3164
- const w = Ze(F(v.start)), N = pt(F(v.end));
3165
- return ht(b, { start: w, end: N }) || Y(w, b);
3166
- }), h = c.useMemo(() => [0, 1, 2, 3, 4, 5, 6].map((b) => {
3167
- const v = new Date(2024, 0, b);
3168
- return i(v, "EEE");
3169
- }), [i]);
3170
- return /* @__PURE__ */ p("div", { className: "flex-1 overflow-auto", children: [
3171
- /* @__PURE__ */ t("div", { className: "grid grid-cols-7 border-b", children: h.map((b, v) => /* @__PURE__ */ t(
3172
- "div",
3173
- {
3174
- className: "border-r last:border-r-0 px-2 py-2 text-center text-sm font-medium text-muted-foreground",
3175
- children: b
3176
- },
3177
- v
3178
- )) }),
3179
- /* @__PURE__ */ t("div", { className: "grid grid-cols-7 flex-1", children: m.map((b, v) => {
3180
- const w = Ft(b, e), N = Pe(b), x = g(b);
3181
- return /* @__PURE__ */ p(
3182
- "div",
3183
- {
3184
- className: y(
3185
- "min-h-[100px] border-r border-b last:border-r-0 p-1",
3186
- !w && "bg-muted/30"
3187
- ),
3188
- onClick: () => o == null ? void 0 : o(b),
3189
- children: [
3190
- /* @__PURE__ */ t("div", { className: "flex items-center justify-between mb-1", children: /* @__PURE__ */ t(
3191
- "span",
3192
- {
3193
- className: y(
3194
- "flex h-6 w-6 items-center justify-center rounded-full text-sm",
3195
- N && "bg-primary text-primary-foreground font-bold",
3196
- !w && "text-muted-foreground"
3197
- ),
3198
- children: G(b, "d")
3199
- }
3200
- ) }),
3201
- /* @__PURE__ */ p("div", { className: "space-y-0.5", children: [
3202
- x.slice(0, 3).map((C) => /* @__PURE__ */ t(
3203
- te,
3204
- {
3205
- event: C,
3206
- compact: !0,
3207
- onClick: r
3208
- },
3209
- C.id
3210
- )),
3211
- x.length > 3 && /* @__PURE__ */ t("div", { className: "text-xs text-muted-foreground px-1", children: n("calendar.more", { count: x.length - 3 }) })
3212
- ] })
3213
- ]
3214
- },
3215
- v
3216
- );
3217
- }) })
3218
- ] });
3219
- }, Ai = ({
3220
- date: e,
3221
- events: a,
3222
- onEventClick: r,
3223
- onDateClick: o
3224
- }) => {
3225
- const { t: n, formatDate: i } = re(), s = ye(e), d = Array.from({ length: 24 }, (l, g) => g), u = Array.from({ length: 7 }, (l, g) => we(s, g)), f = (l, g) => a.filter((h) => {
3226
- if (h.allDay) return !1;
3227
- const b = F(h.start);
3228
- return Y(b, l) && Za(b) === g;
3229
- }), m = (l) => a.filter((g) => {
3230
- if (!g.allDay) return !1;
3231
- const h = Ze(F(g.start)), b = pt(F(g.end));
3232
- return ht(l, { start: h, end: b }) || Y(h, l);
3233
- });
3234
- return /* @__PURE__ */ p("div", { className: "flex-1 flex flex-col overflow-hidden", children: [
3235
- /* @__PURE__ */ p("div", { className: "flex border-b", children: [
3236
- /* @__PURE__ */ t("div", { className: "w-16 flex-shrink-0" }),
3237
- u.map((l) => /* @__PURE__ */ p(
3238
- "div",
3239
- {
3240
- className: "flex-1 border-l px-2 py-2 text-center",
3241
- children: [
3242
- /* @__PURE__ */ t("div", { className: "text-sm text-muted-foreground", children: i(l, "EEE") }),
3243
- /* @__PURE__ */ t(
3244
- "div",
3245
- {
3246
- className: y(
3247
- "text-lg font-semibold",
3248
- Pe(l) && "text-primary"
3249
- ),
3250
- children: G(l, "d")
3251
- }
3252
- )
3253
- ]
3254
- },
3255
- l.toISOString()
3256
- ))
3257
- ] }),
3258
- /* @__PURE__ */ p("div", { className: "flex border-b", children: [
3259
- /* @__PURE__ */ t("div", { className: "w-16 flex-shrink-0 px-2 py-1 text-xs text-muted-foreground", children: n("calendar.allDay") }),
3260
- u.map((l) => {
3261
- const g = m(l);
3262
- return /* @__PURE__ */ t("div", { className: "flex-1 border-l px-1 py-1 min-h-[40px]", children: g.map((h) => /* @__PURE__ */ t(te, { event: h, compact: !0, onClick: r }, h.id)) }, l.toISOString());
3263
- })
3264
- ] }),
3265
- /* @__PURE__ */ t("div", { className: "flex-1 overflow-auto", children: /* @__PURE__ */ t("div", { className: "relative", children: d.map((l) => /* @__PURE__ */ p("div", { className: "flex h-12 border-b", children: [
3266
- /* @__PURE__ */ t("div", { className: "w-16 flex-shrink-0 px-2 py-1 text-xs text-muted-foreground text-right", children: G(he(/* @__PURE__ */ new Date(), l), "h a") }),
3267
- u.map((g) => {
3268
- const h = f(g, l);
3269
- return /* @__PURE__ */ t(
3270
- "div",
3271
- {
3272
- className: "flex-1 border-l relative",
3273
- onClick: () => o == null ? void 0 : o(he(eo(g, 0), l)),
3274
- children: h.map((b) => {
3275
- const v = F(b.start), w = F(b.end), N = Ja(w, v), x = Qa(v) / 60 * 100, C = Math.max(N / 60 * 100, 25);
3276
- return /* @__PURE__ */ t(
3277
- "div",
3278
- {
3279
- className: "absolute left-0 right-0 mx-0.5 overflow-hidden",
3280
- style: {
3281
- top: `${x}%`,
3282
- height: `${C}%`,
3283
- minHeight: "20px"
3284
- },
3285
- children: /* @__PURE__ */ t(te, { event: b, compact: !0, onClick: r })
3286
- },
3287
- b.id
3288
- );
3289
- })
3290
- },
3291
- g.toISOString()
3292
- );
3293
- })
3294
- ] }, l)) }) })
3295
- ] });
3296
- }, Pi = ({
3297
- date: e,
3298
- events: a,
3299
- onEventClick: r,
3300
- onDateClick: o
3301
- }) => {
3302
- const { t: n } = re(), i = Array.from({ length: 24 }, (u, f) => f), s = (u) => a.filter((f) => {
3303
- if (f.allDay) return !1;
3304
- const m = F(f.start);
3305
- return Y(m, e) && Za(m) === u;
3306
- }), d = a.filter((u) => {
3307
- if (!u.allDay) return !1;
3308
- const f = Ze(F(u.start)), m = pt(F(u.end));
3309
- return ht(e, { start: f, end: m }) || Y(f, e);
3310
- });
3311
- return /* @__PURE__ */ p("div", { className: "flex-1 flex flex-col overflow-hidden", children: [
3312
- d.length > 0 && /* @__PURE__ */ p("div", { className: "border-b p-2 space-y-1", children: [
3313
- /* @__PURE__ */ t("div", { className: "text-xs text-muted-foreground mb-1", children: n("calendar.allDay") }),
3314
- d.map((u) => /* @__PURE__ */ t(te, { event: u, onClick: r }, u.id))
3315
- ] }),
3316
- /* @__PURE__ */ t("div", { className: "flex-1 overflow-auto", children: i.map((u) => {
3317
- const f = s(u);
3318
- return /* @__PURE__ */ p(
3319
- "div",
3320
- {
3321
- className: "flex h-16 border-b hover:bg-muted/50 transition-colors",
3322
- onClick: () => o == null ? void 0 : o(he(eo(e, 0), u)),
3323
- children: [
3324
- /* @__PURE__ */ t("div", { className: "w-20 flex-shrink-0 px-3 py-1 text-sm text-muted-foreground text-right border-r", children: G(he(/* @__PURE__ */ new Date(), u), "h:mm a") }),
3325
- /* @__PURE__ */ t("div", { className: "flex-1 px-2 py-1 relative", children: f.map((m) => {
3326
- const l = F(m.start), g = F(m.end), h = Ja(g, l), b = Math.max(h / 60 * 64, 32);
3327
- return /* @__PURE__ */ t(
3328
- "div",
3329
- {
3330
- className: "absolute left-2 right-2",
3331
- style: {
3332
- top: `${Qa(l) / 60 * 100}%`,
3333
- height: `${b}px`
3334
- },
3335
- children: /* @__PURE__ */ t(te, { event: m, onClick: r })
3336
- },
3337
- m.id
3338
- );
3339
- }) })
3340
- ]
3341
- },
3342
- u
3343
- );
3344
- }) })
3345
- ] });
3346
- }, Di = ({ date: e, events: a, onEventClick: r }) => {
3347
- const { t: o, formatDate: n } = re(), i = Ye(e), s = Xe(e), u = a.filter((m) => {
3348
- const l = F(m.start);
3349
- return l >= i && l <= s;
3350
- }).sort((m, l) => F(m.start).getTime() - F(l.start).getTime()).reduce((m, l) => {
3351
- const g = G(F(l.start), "yyyy-MM-dd");
3352
- return m[g] || (m[g] = []), m[g].push(l), m;
3353
- }, {}), f = Object.keys(u).sort();
3354
- return f.length === 0 ? /* @__PURE__ */ t("div", { className: "flex-1 flex items-center justify-center text-muted-foreground", children: o("calendar.noEvents") }) : /* @__PURE__ */ t("div", { className: "flex-1 overflow-auto p-4", children: /* @__PURE__ */ t("div", { className: "space-y-6", children: f.map((m) => {
3355
- const l = Kt(m), g = u[m];
3356
- return /* @__PURE__ */ p("div", { children: [
3357
- /* @__PURE__ */ p("div", { className: "flex items-center gap-3 mb-3", children: [
3358
- /* @__PURE__ */ p(
3359
- "div",
3360
- {
3361
- className: y(
3362
- "flex h-12 w-12 flex-col items-center justify-center rounded-lg",
3363
- Pe(l) ? "bg-primary text-primary-foreground" : "bg-muted"
3364
- ),
3365
- children: [
3366
- /* @__PURE__ */ t("span", { className: "text-xs font-medium uppercase", children: n(l, "EEE") }),
3367
- /* @__PURE__ */ t("span", { className: "text-lg font-bold", children: G(l, "d") })
3368
- ]
3369
- }
3370
- ),
3371
- /* @__PURE__ */ p("div", { children: [
3372
- /* @__PURE__ */ t("div", { className: "font-semibold", children: n(l, "EEEE") }),
3373
- /* @__PURE__ */ t("div", { className: "text-sm text-muted-foreground", children: n(l, "MMMM d, yyyy") })
3374
- ] })
3375
- ] }),
3376
- /* @__PURE__ */ t("div", { className: "space-y-2 pl-15", children: g.map((h) => /* @__PURE__ */ t(te, { event: h, onClick: r }, h.id)) })
3377
- ] }, m);
3378
- }) }) });
3379
- }, _i = c.forwardRef(
3380
- ({
3381
- className: e,
3382
- events: a = [],
3383
- view: r,
3384
- defaultView: o = "month",
3385
- onViewChange: n,
3386
- date: i,
3387
- defaultDate: s,
3388
- onDateChange: d,
3389
- onEventClick: u,
3390
- onDateClick: f,
3391
- onEventCreate: m,
3392
- showViewSelector: l = !0,
3393
- showNavigation: g = !0,
3394
- showToday: h = !0,
3395
- ...b
3396
- }, v) => {
3397
- const [w, N] = c.useState(o), [x, C] = c.useState(s || /* @__PURE__ */ new Date()), R = r ?? w, S = i ?? x, I = (M) => {
3398
- r === void 0 && N(M), n == null || n(M);
3399
- }, A = (M) => {
3400
- i === void 0 && C(M), d == null || d(M);
3401
- }, $ = (M) => {
3402
- let k;
3403
- if (M === "today")
3404
- k = /* @__PURE__ */ new Date();
3405
- else {
3406
- const P = M === "prev" ? -1 : 1;
3407
- switch (R) {
3408
- case "month":
3409
- case "agenda":
3410
- k = P > 0 ? qe(S, 1) : to(S);
3411
- break;
3412
- case "week":
3413
- k = P > 0 ? $t(S, 1) : Js(S);
3414
- break;
3415
- case "day":
3416
- k = P > 0 ? we(S, 1) : To(S, 1);
3417
- break;
3418
- default:
3419
- k = S;
3420
- }
3421
- }
3422
- A(k);
3423
- };
3424
- return /* @__PURE__ */ p(
3425
- "div",
3426
- {
3427
- ref: v,
3428
- className: y("flex flex-col h-full border rounded-lg bg-background", e),
3429
- ...b,
3430
- children: [
3431
- /* @__PURE__ */ t(
3432
- Si,
3433
- {
3434
- date: S,
3435
- view: R,
3436
- onViewChange: I,
3437
- onNavigate: $,
3438
- showViewSelector: l,
3439
- showNavigation: g,
3440
- showToday: h
3441
- }
3442
- ),
3443
- R === "month" && /* @__PURE__ */ t(
3444
- Ei,
3445
- {
3446
- date: S,
3447
- events: a,
3448
- onEventClick: u,
3449
- onDateClick: f
3450
- }
3451
- ),
3452
- R === "week" && /* @__PURE__ */ t(
3453
- Ai,
3454
- {
3455
- date: S,
3456
- events: a,
3457
- onEventClick: u,
3458
- onDateClick: f
3459
- }
3460
- ),
3461
- R === "day" && /* @__PURE__ */ t(
3462
- Pi,
3463
- {
3464
- date: S,
3465
- events: a,
3466
- onEventClick: u,
3467
- onDateClick: f
3468
- }
3469
- ),
3470
- R === "agenda" && /* @__PURE__ */ t(
3471
- Di,
3472
- {
3473
- date: S,
3474
- events: a,
3475
- onEventClick: u
3476
- }
3477
- )
3478
- ]
3479
- }
3480
- );
3481
- }
3482
- );
3483
- _i.displayName = "FullCalendar";
3484
- export {
3485
- hi as $,
3486
- Qi as A,
3487
- On as B,
3488
- tc as C,
3489
- Ss as D,
3490
- Gs as E,
3491
- Wa as F,
3492
- Ua as G,
3493
- Ya as H,
3494
- $n as I,
3495
- Xa as J,
3496
- qa as K,
3497
- Us as L,
3498
- nc as M,
3499
- Qs as N,
3500
- ei as O,
3501
- ni as P,
3502
- si as Q,
3503
- Un as R,
3504
- Mn as S,
3505
- oc as T,
3506
- ii as U,
3507
- ci as V,
3508
- li as W,
3509
- ui as X,
3510
- Ni as Y,
3511
- fi as Z,
3512
- mi as _,
3513
- dn as a,
3514
- bi as a0,
3515
- xi as a1,
3516
- Ri as a2,
3517
- _i as a3,
3518
- Si as a4,
3519
- te as a5,
3520
- Ei as a6,
3521
- Ai as a7,
3522
- Pi as a8,
3523
- Di as a9,
3524
- Ti as aa,
3525
- un as b,
3526
- fn as c,
3527
- pn as d,
3528
- hn as e,
3529
- gn as f,
3530
- _n as g,
3531
- In as h,
3532
- Tr as i,
3533
- ec as j,
3534
- Sr as k,
3535
- Er as l,
3536
- Ar as m,
3537
- Pr as n,
3538
- Dr as o,
3539
- _r as p,
3540
- Ir as q,
3541
- kn as r,
3542
- rc as s,
3543
- ac as t,
3544
- qn as u,
3545
- ms as v,
3546
- ws as w,
3547
- Cs as x,
3548
- Rs as y,
3549
- Ts as z
3550
- };
3551
- //# sourceMappingURL=full-calendar-5Z4JSj8g.js.map