@customafk/lunas-ui 0.2.20 → 0.2.22

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 (341) hide show
  1. package/dist/{alert-Dn5x8pBc.mjs → alert-C-Y4ZWNd.mjs} +1 -1
  2. package/dist/{alert-Dn5x8pBc.mjs.map → alert-C-Y4ZWNd.mjs.map} +1 -1
  3. package/dist/{alert-iwPuxYjG.d.cts → alert-CrrRLYNJ.d.mts} +7 -7
  4. package/dist/{alert-CwIH3Hkd.d.mts → alert-YcsH9M6y.d.cts} +7 -7
  5. package/dist/{avatar-5LzTjIjo.mjs → avatar-SJmvlfqm.mjs} +1 -1
  6. package/dist/{avatar-5LzTjIjo.mjs.map → avatar-SJmvlfqm.mjs.map} +1 -1
  7. package/dist/{badge-DBsYYM8d.d.cts → badge-84HgXhHg.d.cts} +7 -7
  8. package/dist/{badge-CINaZwOW.d.mts → badge-BiFukfpS.d.mts} +5 -5
  9. package/dist/{badge-DYcJtNU0.mjs → badge-DSwkF4C4.mjs} +1 -1
  10. package/dist/{badge-DYcJtNU0.mjs.map → badge-DSwkF4C4.mjs.map} +1 -1
  11. package/dist/{button-DPABon17.mjs → button-Bc8L9sFb.mjs} +2 -2
  12. package/dist/{button-DPABon17.mjs.map → button-Bc8L9sFb.mjs.map} +1 -1
  13. package/dist/{button-DdwLbwWQ.d.mts → button-DXeUzeTa.d.cts} +7 -7
  14. package/dist/{button-UgIAM1cP.d.cts → button-xMJ2hylr.d.mts} +7 -7
  15. package/dist/{button.variants-B8KCLWPT.mjs → button.variants-CwcJHcI5.mjs} +1 -1
  16. package/dist/{button.variants-B8KCLWPT.mjs.map → button.variants-CwcJHcI5.mjs.map} +1 -1
  17. package/dist/{calendar-DJnuujFC.mjs → calendar-C2psGpju.mjs} +2 -2
  18. package/dist/{calendar-DJnuujFC.mjs.map → calendar-C2psGpju.mjs.map} +1 -1
  19. package/dist/cards/grid-product-card.mjs +1 -1
  20. package/dist/cards/product-card.mjs +1 -1
  21. package/dist/cards/simple-card.d.mts +2 -2
  22. package/dist/cards/simple-card.mjs +1 -1
  23. package/dist/{checkbox-dDSDiwLB.mjs → checkbox-Bwy_4QS_.mjs} +1 -1
  24. package/dist/{checkbox-dDSDiwLB.mjs.map → checkbox-Bwy_4QS_.mjs.map} +1 -1
  25. package/dist/{close-BcOkVqd8.mjs → close-BS6EeCrQ.mjs} +1 -1
  26. package/dist/{close-BcOkVqd8.mjs.map → close-BS6EeCrQ.mjs.map} +1 -1
  27. package/dist/{cms-layout-CujBx9FA.mjs → cms-layout-DCODI3eE.mjs} +2 -2
  28. package/dist/{cms-layout-CujBx9FA.mjs.map → cms-layout-DCODI3eE.mjs.map} +1 -1
  29. package/dist/{command-B8y4H5q5.mjs → command-B5DpL6OG.mjs} +2 -2
  30. package/dist/{command-B8y4H5q5.mjs.map → command-B5DpL6OG.mjs.map} +1 -1
  31. package/dist/data-display/country.d.cts +1 -1
  32. package/dist/data-display/country.d.mts +1 -1
  33. package/dist/data-display/country.mjs +1 -1
  34. package/dist/data-display/date-tooltip.mjs +1 -1
  35. package/dist/data-display/date.mjs +1 -1
  36. package/dist/data-display/name.mjs +1 -1
  37. package/dist/data-display/phone-number.mjs +1 -1
  38. package/dist/data-display/role-badge.d.cts +1 -1
  39. package/dist/data-display/role-badge.d.mts +1 -1
  40. package/dist/data-display/role-badge.mjs +1 -1
  41. package/dist/data-display/statistic.d.mts +6 -6
  42. package/dist/data-display/user.mjs +1 -1
  43. package/dist/{date-C76vNHGL.mjs → date-D_nB7Lh1.mjs} +1 -1
  44. package/dist/{date-C76vNHGL.mjs.map → date-D_nB7Lh1.mjs.map} +1 -1
  45. package/dist/{dialog-dqqupmOT.mjs → dialog-DG4vMCr5.mjs} +2 -2
  46. package/dist/{dialog-dqqupmOT.mjs.map → dialog-DG4vMCr5.mjs.map} +1 -1
  47. package/dist/{dialog-CfbtCisP.d.mts → dialog-DeQiptoB.d.cts} +12 -12
  48. package/dist/{dialog-HXH3FYKH.d.cts → dialog-Dsuo8PP7.d.mts} +12 -12
  49. package/dist/dialogs/confirm-dialog.mjs +1 -1
  50. package/dist/dialogs/detail-dialog/components/sidebar.d.cts +2 -2
  51. package/dist/dialogs/detail-dialog/components/sidebar.d.mts +27 -27
  52. package/dist/dialogs/detail-dialog/components/sidebar.mjs +1 -1
  53. package/dist/dialogs/detail-dialog/index.mjs +1 -1
  54. package/dist/dialogs/error-dialog.mjs +1 -1
  55. package/dist/dialogs/loading-dialog.mjs +1 -1
  56. package/dist/{dist-DPEjz4kv.mjs → dist-XxWAVHy8.mjs} +1 -1
  57. package/dist/{dist-DPEjz4kv.mjs.map → dist-XxWAVHy8.mjs.map} +1 -1
  58. package/dist/{dropdown-menu-BocQ2Vev.mjs → dropdown-menu-BlsIwe4B.mjs} +1 -1
  59. package/dist/{dropdown-menu-BocQ2Vev.mjs.map → dropdown-menu-BlsIwe4B.mjs.map} +1 -1
  60. package/dist/features/descriptions/index.d.cts +7 -7
  61. package/dist/features/descriptions/index.d.mts +3 -3
  62. package/dist/features/descriptions/index.mjs +1 -1
  63. package/dist/features/search-modal/index.d.cts +2 -2
  64. package/dist/features/search-modal/index.d.mts +2 -2
  65. package/dist/features/search-modal/index.mjs +1 -1
  66. package/dist/features/tables/index.cjs +1 -1
  67. package/dist/features/tables/index.d.cts +1 -1
  68. package/dist/features/tables/index.d.mts +2 -2
  69. package/dist/features/tables/index.mjs +1 -1
  70. package/dist/features/tanstack-form/index.d.cts +1 -1
  71. package/dist/features/tanstack-form/index.d.mts +1 -1
  72. package/dist/features/tanstack-form/index.mjs +1 -1
  73. package/dist/features/text-editor/index.d.cts +1 -1
  74. package/dist/features/text-editor/index.d.mts +1 -1
  75. package/dist/features/text-editor/index.mjs +1 -1
  76. package/dist/{field-DaZocB_E.mjs → field-Mn2bf2Ns.mjs} +2 -2
  77. package/dist/{field-DaZocB_E.mjs.map → field-Mn2bf2Ns.mjs.map} +1 -1
  78. package/dist/{flex-zl_w1yeZ.mjs → flex-Br7F9Fln.mjs} +1 -1
  79. package/dist/{flex-zl_w1yeZ.mjs.map → flex-Br7F9Fln.mjs.map} +1 -1
  80. package/dist/{heading-D8K7UGv2.mjs → heading-BnaNuvDS.mjs} +1 -1
  81. package/dist/{heading-D8K7UGv2.mjs.map → heading-BnaNuvDS.mjs.map} +1 -1
  82. package/dist/{image-WRAFECmc.mjs → image-C-CdKKP1.mjs} +2 -2
  83. package/dist/{image-WRAFECmc.mjs.map → image-C-CdKKP1.mjs.map} +1 -1
  84. package/dist/{index-D09-9eQ8.d.cts → index-6xsKIhtm.d.mts} +193 -193
  85. package/dist/{index-DXXR4oq-.d.mts → index-BG-MpSBd.d.cts} +340 -340
  86. package/dist/{index-Dn6FVL5X.d.cts → index-BMUK7c5C.d.cts} +4 -4
  87. package/dist/{index-3ZBP9XKI.d.mts → index-Bway3IIA.d.mts} +4 -4
  88. package/dist/{index-DWGlOnex.d.cts → index-CpeGB7w3.d.cts} +9 -9
  89. package/dist/{index-BreahdZP.d.mts → index-DriR2xP5.d.mts} +29 -29
  90. package/dist/index.cjs +1 -1
  91. package/dist/index.d.cts +13 -10
  92. package/dist/index.d.mts +13 -10
  93. package/dist/index.mjs +1 -1
  94. package/dist/{input-DjEul_uK.d.cts → input-BdcIab9N.d.cts} +6 -6
  95. package/dist/{input-BTm2GrZP.mjs → input-DLRypEj3.mjs} +1 -1
  96. package/dist/{input-BTm2GrZP.mjs.map → input-DLRypEj3.mjs.map} +1 -1
  97. package/dist/{input-BpTmuYnJ.d.mts → input-DLztWYaq.d.mts} +6 -6
  98. package/dist/{label-BC2u42kJ.mjs → label-BukQnBn7.mjs} +1 -1
  99. package/dist/{label-BC2u42kJ.mjs.map → label-BukQnBn7.mjs.map} +1 -1
  100. package/dist/layouts/cms-layout/index.mjs +1 -1
  101. package/dist/layouts/flex.d.cts +8 -8
  102. package/dist/layouts/flex.d.mts +12 -12
  103. package/dist/layouts/flex.mjs +1 -1
  104. package/dist/layouts/payment-layout/index.cjs +1 -1
  105. package/dist/layouts/payment-layout/index.d.cts +17 -2
  106. package/dist/layouts/payment-layout/index.d.mts +17 -2
  107. package/dist/layouts/payment-layout/index.mjs +1 -1
  108. package/dist/pages/FeatureDeveloping.d.cts +2 -2
  109. package/dist/pages/FeatureDeveloping.d.mts +2 -2
  110. package/dist/pages/FeatureDeveloping.mjs +1 -1
  111. package/dist/pages/FeatureFixing.d.mts +2 -2
  112. package/dist/pages/FeatureFixing.mjs +1 -1
  113. package/dist/pages/LoginPage.cjs +2 -0
  114. package/dist/pages/LoginPage.cjs.map +1 -0
  115. package/dist/pages/LoginPage.d.cts +55 -0
  116. package/dist/pages/LoginPage.d.mts +55 -0
  117. package/dist/pages/LoginPage.mjs +2 -0
  118. package/dist/pages/LoginPage.mjs.map +1 -0
  119. package/dist/pages/NotAuthorized.d.cts +2 -2
  120. package/dist/pages/NotAuthorized.d.mts +2 -2
  121. package/dist/pages/NotAuthorized.mjs +1 -1
  122. package/dist/pages/NotFound.d.cts +2 -2
  123. package/dist/pages/NotFound.d.mts +2 -2
  124. package/dist/pages/NotFound.mjs +1 -1
  125. package/dist/pages/RegisterPage.cjs +2 -0
  126. package/dist/pages/RegisterPage.cjs.map +1 -0
  127. package/dist/pages/RegisterPage.d.cts +52 -0
  128. package/dist/pages/RegisterPage.d.mts +52 -0
  129. package/dist/pages/RegisterPage.mjs +2 -0
  130. package/dist/pages/RegisterPage.mjs.map +1 -0
  131. package/dist/pages/VerifyEmailPage.cjs +2 -0
  132. package/dist/pages/VerifyEmailPage.cjs.map +1 -0
  133. package/dist/pages/VerifyEmailPage.d.cts +64 -0
  134. package/dist/pages/VerifyEmailPage.d.mts +64 -0
  135. package/dist/pages/VerifyEmailPage.mjs +2 -0
  136. package/dist/pages/VerifyEmailPage.mjs.map +1 -0
  137. package/dist/{paragraph-jzLzzEYZ.mjs → paragraph-CnHNC0rS.mjs} +1 -1
  138. package/dist/{paragraph-jzLzzEYZ.mjs.map → paragraph-CnHNC0rS.mjs.map} +1 -1
  139. package/dist/payment-layout-0mqqno1V.cjs +2 -0
  140. package/dist/payment-layout-0mqqno1V.cjs.map +1 -0
  141. package/dist/payment-layout-ClqGIxV7.mjs +2 -0
  142. package/dist/payment-layout-ClqGIxV7.mjs.map +1 -0
  143. package/dist/{popover-HZvZNeka.mjs → popover-DvGJ23lJ.mjs} +2 -2
  144. package/dist/{popover-HZvZNeka.mjs.map → popover-DvGJ23lJ.mjs.map} +1 -1
  145. package/dist/{progress-CgQ13rSf.mjs → progress-2G9rCupJ.mjs} +1 -1
  146. package/dist/{progress-CgQ13rSf.mjs.map → progress-2G9rCupJ.mjs.map} +1 -1
  147. package/dist/{radio-group-BN5y5gZY.mjs → radio-group-fN6o0QBx.mjs} +1 -1
  148. package/dist/{radio-group-BN5y5gZY.mjs.map → radio-group-fN6o0QBx.mjs.map} +1 -1
  149. package/dist/{resizable-CLUR91Hx.mjs → resizable-BxsL978e.mjs} +1 -1
  150. package/dist/{resizable-CLUR91Hx.mjs.map → resizable-BxsL978e.mjs.map} +1 -1
  151. package/dist/{search-modal-Dz7rfifb.mjs → search-modal-DZI6O6ua.mjs} +2 -2
  152. package/dist/{search-modal-Dz7rfifb.mjs.map → search-modal-DZI6O6ua.mjs.map} +1 -1
  153. package/dist/{select-1Z1p9bmp.mjs → select-Ze8Fq88G.mjs} +1 -1
  154. package/dist/{select-1Z1p9bmp.mjs.map → select-Ze8Fq88G.mjs.map} +1 -1
  155. package/dist/{separator-DVI2h_rd.mjs → separator-DXnFHf3v.mjs} +1 -1
  156. package/dist/{separator-DVI2h_rd.mjs.map → separator-DXnFHf3v.mjs.map} +1 -1
  157. package/dist/{sheet-BRXYSJDv.mjs → sheet-GUUifKAd.mjs} +1 -1
  158. package/dist/{sheet-BRXYSJDv.mjs.map → sheet-GUUifKAd.mjs.map} +1 -1
  159. package/dist/{sidebar-QPaK3ryM.mjs → sidebar-C_jArO1q.mjs} +2 -2
  160. package/dist/{sidebar-QPaK3ryM.mjs.map → sidebar-C_jArO1q.mjs.map} +1 -1
  161. package/dist/{skeleton-CZVkWN4p.mjs → skeleton-BLwzHejl.mjs} +1 -1
  162. package/dist/{skeleton-CZVkWN4p.mjs.map → skeleton-BLwzHejl.mjs.map} +1 -1
  163. package/dist/{spinner-DkmcGiVT.mjs → spinner-BaZ19Lla.mjs} +1 -1
  164. package/dist/{spinner-DkmcGiVT.mjs.map → spinner-BaZ19Lla.mjs.map} +1 -1
  165. package/dist/tables-CI2AZcbt.cjs +4 -0
  166. package/dist/tables-CI2AZcbt.cjs.map +1 -0
  167. package/dist/tables-EnSyNV7J.mjs +4 -0
  168. package/dist/tables-EnSyNV7J.mjs.map +1 -0
  169. package/dist/{tanstack-form-Sqj9ZD9z.mjs → tanstack-form-C1EVQJ-n.mjs} +2 -2
  170. package/dist/{tanstack-form-Sqj9ZD9z.mjs.map → tanstack-form-C1EVQJ-n.mjs.map} +1 -1
  171. package/dist/{text-editor-BLK_EeiU.mjs → text-editor-ae2UTKW8.mjs} +1 -1
  172. package/dist/{text-editor-BLK_EeiU.mjs.map → text-editor-ae2UTKW8.mjs.map} +1 -1
  173. package/dist/{textarea-D2ILgz82.mjs → textarea-CEtUNLwy.mjs} +1 -1
  174. package/dist/{textarea-D2ILgz82.mjs.map → textarea-CEtUNLwy.mjs.map} +1 -1
  175. package/dist/{tooltip-C7UhtrFf.mjs → tooltip-Cy0HbyAx.mjs} +1 -1
  176. package/dist/{tooltip-C7UhtrFf.mjs.map → tooltip-Cy0HbyAx.mjs.map} +1 -1
  177. package/dist/{types-BonWRhox.d.mts → types-CLkAmCre.d.cts} +1 -1
  178. package/dist/{types-COppLTPh.mjs → types-CuAlMviO.mjs} +1 -1
  179. package/dist/{types-COppLTPh.mjs.map → types-CuAlMviO.mjs.map} +1 -1
  180. package/dist/{types-CILbFL3j.d.cts → types-wApFGHmV.d.mts} +1 -1
  181. package/dist/typography/paragraph.d.cts +3 -3
  182. package/dist/typography/paragraph.d.mts +5 -5
  183. package/dist/typography/paragraph.mjs +1 -1
  184. package/dist/typography/title.d.cts +2 -2
  185. package/dist/typography/title.d.mts +2 -2
  186. package/dist/ui/alert-dialog.d.cts +12 -12
  187. package/dist/ui/alert-dialog.d.mts +12 -12
  188. package/dist/ui/alert-dialog.mjs +1 -1
  189. package/dist/ui/alert.d.cts +1 -1
  190. package/dist/ui/alert.d.mts +1 -1
  191. package/dist/ui/alert.mjs +1 -1
  192. package/dist/ui/aspect-ratio.d.cts +2 -2
  193. package/dist/ui/aspect-ratio.d.mts +2 -2
  194. package/dist/ui/avatar.d.cts +4 -4
  195. package/dist/ui/avatar.d.mts +4 -4
  196. package/dist/ui/avatar.mjs +1 -1
  197. package/dist/ui/badge.d.cts +1 -1
  198. package/dist/ui/badge.d.mts +1 -1
  199. package/dist/ui/badge.mjs +1 -1
  200. package/dist/ui/breadcrumb.d.cts +8 -8
  201. package/dist/ui/breadcrumb.d.mts +8 -8
  202. package/dist/ui/breadcrumb.mjs +1 -1
  203. package/dist/ui/button-group.d.cts +7 -7
  204. package/dist/ui/button-group.d.mts +7 -7
  205. package/dist/ui/button-group.mjs +1 -1
  206. package/dist/ui/button.d.cts +1 -1
  207. package/dist/ui/button.d.mts +1 -1
  208. package/dist/ui/button.mjs +1 -1
  209. package/dist/ui/buttons/add-new.mjs +1 -1
  210. package/dist/ui/buttons/edit.mjs +1 -1
  211. package/dist/ui/buttons/refresh.mjs +1 -1
  212. package/dist/ui/buttons/trash.mjs +1 -1
  213. package/dist/ui/buttons/upload-image.mjs +1 -1
  214. package/dist/ui/calendar.d.cts +4 -4
  215. package/dist/ui/calendar.d.mts +4 -4
  216. package/dist/ui/calendar.mjs +1 -1
  217. package/dist/ui/card.d.cts +8 -8
  218. package/dist/ui/card.d.mts +8 -8
  219. package/dist/ui/card.mjs +1 -1
  220. package/dist/ui/carousel.d.cts +7 -7
  221. package/dist/ui/carousel.d.mts +7 -7
  222. package/dist/ui/carousel.mjs +1 -1
  223. package/dist/ui/checkbox.d.cts +2 -2
  224. package/dist/ui/checkbox.d.mts +2 -2
  225. package/dist/ui/checkbox.mjs +1 -1
  226. package/dist/ui/collapsible.d.cts +4 -4
  227. package/dist/ui/collapsible.d.mts +4 -4
  228. package/dist/ui/command.d.cts +11 -11
  229. package/dist/ui/command.d.mts +11 -11
  230. package/dist/ui/command.mjs +1 -1
  231. package/dist/ui/context-menu.d.cts +16 -16
  232. package/dist/ui/context-menu.d.mts +16 -16
  233. package/dist/ui/dialog.d.cts +1 -1
  234. package/dist/ui/dialog.d.mts +1 -1
  235. package/dist/ui/dialog.mjs +1 -1
  236. package/dist/ui/drawer.d.cts +11 -11
  237. package/dist/ui/drawer.d.mts +11 -11
  238. package/dist/ui/dropdown-menu.d.cts +16 -16
  239. package/dist/ui/dropdown-menu.d.mts +16 -16
  240. package/dist/ui/dropdown-menu.mjs +1 -1
  241. package/dist/ui/empty.d.cts +9 -9
  242. package/dist/ui/empty.d.mts +9 -9
  243. package/dist/ui/field.d.cts +25 -25
  244. package/dist/ui/field.d.mts +25 -25
  245. package/dist/ui/field.mjs +1 -1
  246. package/dist/ui/file-uploader.d.cts +2 -2
  247. package/dist/ui/file-uploader.d.mts +2 -2
  248. package/dist/ui/file-uploader.mjs +1 -1
  249. package/dist/ui/form.d.cts +11 -11
  250. package/dist/ui/form.d.mts +11 -11
  251. package/dist/ui/form.mjs +1 -1
  252. package/dist/ui/hover-card.d.cts +4 -4
  253. package/dist/ui/hover-card.d.mts +4 -4
  254. package/dist/ui/image.mjs +1 -1
  255. package/dist/ui/input-otp.d.cts +5 -5
  256. package/dist/ui/input-otp.d.mts +5 -5
  257. package/dist/ui/input.d.cts +1 -1
  258. package/dist/ui/input.d.mts +1 -1
  259. package/dist/ui/input.mjs +1 -1
  260. package/dist/ui/inputs/search-input.d.cts +3 -3
  261. package/dist/ui/inputs/search-input.d.mts +3 -3
  262. package/dist/ui/inputs/search-input.mjs +1 -1
  263. package/dist/ui/item.d.cts +16 -16
  264. package/dist/ui/item.d.mts +16 -16
  265. package/dist/ui/item.mjs +1 -1
  266. package/dist/ui/label.d.cts +2 -2
  267. package/dist/ui/label.d.mts +2 -2
  268. package/dist/ui/label.mjs +1 -1
  269. package/dist/ui/menubar.d.cts +17 -17
  270. package/dist/ui/menubar.d.mts +17 -17
  271. package/dist/ui/multi-select.d.cts +2 -2
  272. package/dist/ui/multi-select.d.mts +3 -3
  273. package/dist/ui/multi-select.mjs +1 -1
  274. package/dist/ui/navigation-menu.d.cts +11 -11
  275. package/dist/ui/navigation-menu.d.mts +11 -11
  276. package/dist/ui/pagination.d.cts +9 -9
  277. package/dist/ui/pagination.d.mts +9 -9
  278. package/dist/ui/pagination.mjs +1 -1
  279. package/dist/ui/popover.d.cts +6 -6
  280. package/dist/ui/popover.d.mts +6 -6
  281. package/dist/ui/popover.mjs +1 -1
  282. package/dist/ui/progress.d.cts +2 -2
  283. package/dist/ui/progress.d.mts +2 -2
  284. package/dist/ui/progress.mjs +1 -1
  285. package/dist/ui/radio-group.d.cts +3 -3
  286. package/dist/ui/radio-group.d.mts +3 -3
  287. package/dist/ui/radio-group.mjs +1 -1
  288. package/dist/ui/resizable.d.cts +9 -9
  289. package/dist/ui/resizable.d.mts +9 -9
  290. package/dist/ui/resizable.mjs +1 -1
  291. package/dist/ui/scroll-area.d.cts +6 -6
  292. package/dist/ui/scroll-area.d.mts +6 -6
  293. package/dist/ui/select.d.cts +9 -9
  294. package/dist/ui/select.d.mts +9 -9
  295. package/dist/ui/select.mjs +1 -1
  296. package/dist/ui/separator.d.cts +2 -2
  297. package/dist/ui/separator.d.mts +2 -2
  298. package/dist/ui/separator.mjs +1 -1
  299. package/dist/ui/sheet.d.cts +9 -9
  300. package/dist/ui/sheet.d.mts +9 -9
  301. package/dist/ui/sheet.mjs +1 -1
  302. package/dist/ui/sidebar.d.cts +29 -29
  303. package/dist/ui/sidebar.d.mts +29 -29
  304. package/dist/ui/sidebar.mjs +1 -1
  305. package/dist/ui/skeleton.d.cts +2 -2
  306. package/dist/ui/skeleton.d.mts +2 -2
  307. package/dist/ui/skeleton.mjs +1 -1
  308. package/dist/ui/slider.d.cts +2 -2
  309. package/dist/ui/slider.d.mts +2 -2
  310. package/dist/ui/sonner.d.cts +2 -2
  311. package/dist/ui/sonner.d.mts +2 -2
  312. package/dist/ui/spinner.d.cts +2 -2
  313. package/dist/ui/spinner.d.mts +2 -2
  314. package/dist/ui/spinner.mjs +1 -1
  315. package/dist/ui/switch.d.cts +2 -2
  316. package/dist/ui/switch.d.mts +2 -2
  317. package/dist/ui/table.d.cts +18 -18
  318. package/dist/ui/table.d.mts +18 -18
  319. package/dist/ui/tabs.d.cts +5 -5
  320. package/dist/ui/tabs.d.mts +5 -5
  321. package/dist/ui/textarea.d.cts +2 -2
  322. package/dist/ui/textarea.d.mts +2 -2
  323. package/dist/ui/textarea.mjs +1 -1
  324. package/dist/ui/toggle-group.d.cts +3 -3
  325. package/dist/ui/toggle-group.d.mts +3 -3
  326. package/dist/ui/toggle.d.cts +5 -5
  327. package/dist/ui/toggle.d.mts +5 -5
  328. package/dist/ui/tooltip.d.cts +5 -5
  329. package/dist/ui/tooltip.d.mts +5 -5
  330. package/dist/ui/tooltip.mjs +1 -1
  331. package/dist/{user-DIEH54XW.mjs → user-DxSilm4V.mjs} +2 -2
  332. package/dist/{user-DIEH54XW.mjs.map → user-DxSilm4V.mjs.map} +1 -1
  333. package/package.json +13 -1
  334. package/dist/payment-layout-BKJ5xJra.mjs +0 -2
  335. package/dist/payment-layout-BKJ5xJra.mjs.map +0 -1
  336. package/dist/payment-layout-CcMvKPaX.cjs +0 -2
  337. package/dist/payment-layout-CcMvKPaX.cjs.map +0 -1
  338. package/dist/tables--hUSBZFP.cjs +0 -4
  339. package/dist/tables--hUSBZFP.cjs.map +0 -1
  340. package/dist/tables-BZ5jLRGG.mjs +0 -4
  341. package/dist/tables-BZ5jLRGG.mjs.map +0 -1
@@ -1,13 +1,13 @@
1
- import * as react0 from "react";
2
- import * as react_jsx_runtime0 from "react/jsx-runtime";
1
+ import * as react23 from "react";
2
+ import * as react_jsx_runtime180 from "react/jsx-runtime";
3
3
  import { VariantProps } from "class-variance-authority";
4
- import * as class_variance_authority_types0 from "class-variance-authority/types";
4
+ import * as class_variance_authority_types8 from "class-variance-authority/types";
5
5
 
6
6
  //#region packages/components/data-display/statistic.d.ts
7
7
  declare const statisticVariants: (props?: ({
8
8
  size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
9
9
  trend?: "neutral" | "up" | "down" | null | undefined;
10
- } & class_variance_authority_types0.ClassProp) | undefined) => string;
10
+ } & class_variance_authority_types8.ClassProp) | undefined) => string;
11
11
  type StatisticProps = VariantProps<typeof statisticVariants> & {
12
12
  /** Character used to separate the decimal part. Defaults to `'.'`. */
13
13
  decimalSeparator?: string;
@@ -40,7 +40,7 @@ type StatisticProps = VariantProps<typeof statisticVariants> & {
40
40
  * <Statistic value={1234567.89} precision={2} prefix="$" trend="up" size="lg" />
41
41
  * ```
42
42
  */
43
- declare const Statistic: react0.MemoExoticComponent<({
43
+ declare const Statistic: react23.MemoExoticComponent<({
44
44
  decimalSeparator,
45
45
  groupSeparator,
46
46
  prefix: Prefix,
@@ -52,7 +52,7 @@ declare const Statistic: react0.MemoExoticComponent<({
52
52
  trend,
53
53
  value,
54
54
  className
55
- }: StatisticProps) => react_jsx_runtime0.JSX.Element>;
55
+ }: StatisticProps) => react_jsx_runtime180.JSX.Element>;
56
56
  //#endregion
57
57
  export { Statistic, StatisticProps };
58
58
  //# sourceMappingURL=statistic.d.mts.map
@@ -1 +1 @@
1
- "use client";import"../paragraph-jzLzzEYZ.mjs";import"../flex-zl_w1yeZ.mjs";import"../avatar-5LzTjIjo.mjs";import{t as e}from"../user-DIEH54XW.mjs";export{e as UserDataDisplay};
1
+ "use client";import"../paragraph-CnHNC0rS.mjs";import"../flex-Br7F9Fln.mjs";import"../avatar-SJmvlfqm.mjs";import{t as e}from"../user-DxSilm4V.mjs";export{e as UserDataDisplay};
@@ -1,2 +1,2 @@
1
1
  import{useCallback as e,useMemo as t}from"react";import{jsx as n}from"react/jsx-runtime";import{cn as r}from"@customafk/react-toolkit/utils";import{format as i,isThisMonth as a,isThisWeek as o,isThisYear as s,isToday as c,isTomorrow as l,isValid as u,isYesterday as d,parseISO as f}from"@customafk/react-toolkit/date-fns";const p={weekdays:[`Chủ Nhật`,`Thứ Hai`,`Thứ Ba`,`Thứ Tư`,`Thứ Năm`,`Thứ Sáu`,`Thứ Bảy`],weekdaysShort:[`CN`,`T2`,`T3`,`T4`,`T5`,`T6`,`T7`],months:[`Tháng 01`,`Tháng 02`,`Tháng 03`,`Tháng 04`,`Tháng 05`,`Tháng 06`,`Tháng 07`,`Tháng 08`,`Tháng 09`,`Tháng 10`,`Tháng 11`,`Tháng 12`],monthsShort:[`T1`,`T2`,`T3`,`T4`,`T5`,`T6`,`T7`,`T8`,`T9`,`T10`,`T11`,`T12`]},m={"01-01":`Tết Dương lịch`,"03-08":`Quốc tế Phụ nữ`,"04-30":`Ngày Giải phóng miền Nam`,"05-01":`Quốc tế Lao động`,"09-02":`Quốc khánh`,"10-20":`Ngày Phụ nữ Việt Nam`,"11-20":`Ngày Nhà giáo Việt Nam`};Object.freeze({SECOND:1e3,MINUTE:60*1e3,HOUR:3600*1e3,DAY:1440*60*1e3,WEEK:10080*60*1e3,MONTH:720*60*60*1e3,YEAR:365*24*60*60*1e3});const h=Object.freeze({MINUTE:60,HOUR:3600,DAY:1440*60,WEEK:10080*60,MONTH:720*60*60,YEAR:365*24*60*60});Object.freeze({HOUR:60,DAY:1440,WEEK:10080,MONTH:720*60});const g=({date:g,format:_=`medium`,showHoliday:v=!1,showTime:y=!1,className:b=``,title:x})=>{let S=t(()=>{try{if(g instanceof Date)return u(g)?g:null;if(typeof g==`string`){let e=f(g);return u(e)?e:new Date(g)}if(typeof g==`number`){let e=new Date(g);return u(e)?e:null}return null}catch{return null}},[g]),C=e(e=>{let t=Math.floor((Date.now()-e.getTime())/1e3);return t<60?`Vừa xong`:t<3600?`${Math.floor(t/h.MINUTE)} phút trước`:t<86400?`${Math.floor(t/h.HOUR)} giờ trước`:t<604800?`${Math.floor(t/h.DAY)} ngày trước`:t<2592e3?`${Math.floor(t/h.WEEK)} tuần trước`:t<31536e3?`${Math.floor(t/h.MONTH)} tháng trước`:`${Math.floor(t/h.YEAR)} năm trước`},[]),w=e((e,t=!1)=>t?p.weekdaysShort[e.getDay()]:p.weekdays[e.getDay()],[]),T=e((e,t=!1)=>t?p.monthsShort[e.getMonth()]:p.months[e.getMonth()],[]),E=e(e=>m[i(e,`MM-dd`)]||null,[]),D=e(e=>{if(c(e))return y?`Hôm nay ${i(e,`HH:mm`)}`:`Hôm nay`;if(d(e))return y?`Hôm qua ${i(e,`HH:mm`)}`:`Hôm qua`;if(l(e))return y?`Ngày mai ${i(e,`HH:mm`)}`:`Ngày mai`;if(o(e)){let t=w(e);return y?`${t} ${i(e,`HH:mm`)}`:t}if(a(e)){let t=i(e,`d`);return y?`${t}/${i(e,`M`)} ${i(e,`HH:mm`)}`:`${t}/${i(e,`M`)}`}return s(e)?y?i(e,`d/M HH:mm`):i(e,`d/M`):y?i(e,`d/M/yyyy HH:mm`):i(e,`d/M/yyyy`)},[w,y]),O=e((e,t)=>{let n=y?i(e,`, HH:mm:ss`):``;switch(t){case`short`:return i(e,`d/M/yy`)+n;case`medium`:return i(e,`dd/MM/yyyy`)+n;case`long`:return`${i(e,`d`)} ${T(e)} ${i(e,`yyyy`)}`+n;case`full`:return`${w(e)}, ngày ${i(e,`d`)} ${T(e)} năm ${i(e,`yyyy`)}`+n;case`relative`:return C(e);case`datetime`:return i(e,`d/M/yyyy HH:mm`);case`time`:return i(e,`HH:mm`);case`smart`:return D(e);default:return i(e,`d/M/yyyy`)+n}},[D,T,w,C,y]);if(!S)return n(`span`,{className:r(`text-sm text-text-positive-subtle`,b),children:`--/--/----`});let k=O(S,_),A=v?E(S):null,j=A?`${k} (${A})`:k,M=x||i(S,`EEEE, d MMMM yyyy HH:mm:ss`);return n(`time`,{"data-slot":`date-display`,dateTime:S.toISOString(),className:r(`tabular-nums text-xs text-text-positive-weak transition-colors`,b),title:M,children:j})};export{g as t};
2
- //# sourceMappingURL=date-C76vNHGL.mjs.map
2
+ //# sourceMappingURL=date-D_nB7Lh1.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"date-C76vNHGL.mjs","names":["DateDisplay: React.FC<DateDisplayProps>"],"sources":["../packages/constants.tsx","../packages/components/data-display/date.tsx"],"sourcesContent":["// Vietnamese locale configuration\nexport const vietnameseLocale = {\n weekdays: ['Chủ Nhật', 'Thứ Hai', 'Thứ Ba', 'Thứ Tư', 'Thứ Năm', 'Thứ Sáu', 'Thứ Bảy'],\n weekdaysShort: ['CN', 'T2', 'T3', 'T4', 'T5', 'T6', 'T7'],\n months: ['Tháng 01', 'Tháng 02', 'Tháng 03', 'Tháng 04', 'Tháng 05', 'Tháng 06', 'Tháng 07', 'Tháng 08', 'Tháng 09', 'Tháng 10', 'Tháng 11', 'Tháng 12'],\n monthsShort: ['T1', 'T2', 'T3', 'T4', 'T5', 'T6', 'T7', 'T8', 'T9', 'T10', 'T11', 'T12'],\n};\n\n// Vietnamese holidays\nexport const vietnameseHolidays = {\n '01-01': 'Tết Dương lịch',\n '03-08': 'Quốc tế Phụ nữ',\n '04-30': 'Ngày Giải phóng miền Nam',\n '05-01': 'Quốc tế Lao động',\n '09-02': 'Quốc khánh',\n '10-20': 'Ngày Phụ nữ Việt Nam',\n '11-20': 'Ngày Nhà giáo Việt Nam',\n};\n\n// Time Constants in milliseconds, seconds, and minutes\nexport const TIME_IN_MS = Object.freeze({\n SECOND: 1000,\n MINUTE: 60 * 1000,\n HOUR: 60 * 60 * 1000,\n DAY: 24 * 60 * 60 * 1000,\n WEEK: 7 * 24 * 60 * 60 * 1000,\n MONTH: 30 * 24 * 60 * 60 * 1000, // Approximation for month length = 30 days\n YEAR: 365 * 24 * 60 * 60 * 1000,\n});\n\nexport const TIME_IN_SECONDS = Object.freeze({\n MINUTE: 60,\n HOUR: 60 * 60,\n DAY: 24 * 60 * 60,\n WEEK: 7 * 24 * 60 * 60,\n MONTH: 30 * 24 * 60 * 60,\n YEAR: 365 * 24 * 60 * 60,\n});\n\nexport const TIME_IN_MINUTES = Object.freeze({\n HOUR: 60,\n DAY: 24 * 60,\n WEEK: 7 * 24 * 60,\n MONTH: 30 * 24 * 60,\n});\n","'use client';\n\nimport { useCallback, useMemo } from 'react';\n\nimport { format, isThisMonth, isThisWeek, isThisYear, isToday, isTomorrow, isValid, isYesterday, parseISO } from '@customafk/react-toolkit/date-fns';\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { TIME_IN_SECONDS, vietnameseHolidays, vietnameseLocale } from '@/constants';\n\ninterface DateDisplayProps {\n /** The date value to display; accepts a `Date` object, an ISO string, or a Unix timestamp (ms). */\n date: Date | string | number;\n /**\n * Controls how the date is formatted.\n * - `'short'` — `15/03/24`\n * - `'medium'` — `15/03/2024` (default)\n * - `'long'` — `15 tháng 3, 2024`\n * - `'full'` — `Thứ Sáu, ngày 15 tháng 3 năm 2024`\n * - `'relative'` — `2 giờ trước`\n * - `'datetime'` — `15/03/2024 14:30`\n * - `'time'` — `14:30`\n * - `'smart'` — auto-selects the most human-readable format based on recency\n */\n format?:\n | 'short' // 15/03/24\n | 'medium' // 15/03/2024\n | 'long' // 15 tháng 3, 2024\n | 'full' // Thứ Sáu, ngày 15 tháng 3 năm 2024\n | 'relative' // 2 giờ trước\n | 'datetime' // 15/03/2024 14:30\n | 'time' // 14:30\n | 'smart'; // auto-selects format based on recency\n /** When `true`, appends any recognised Vietnamese public holiday name to the formatted date. Defaults to `false`. */\n showHoliday?: boolean;\n /** When `true`, appends the time component to the formatted output. Defaults to `false`. */\n showTime?: boolean;\n /** Additional CSS classes applied to the `<time>` element. */\n className?: string;\n /** Custom HTML `title` attribute; defaults to the full ISO datetime string. */\n title?: string;\n}\n\n/**\n * Renders a formatted date using Vietnamese locale conventions inside a semantic `<time>` element.\n *\n * @example\n * ```tsx\n * import { DateDisplay } from '@customafk/lunas-ui/data-display/date';\n *\n * <DateDisplay date=\"2024-03-15T14:30:00Z\" format=\"medium\" showTime />\n * ```\n */\nexport const DateDisplay: React.FC<DateDisplayProps> = ({\n date,\n format: formatType = 'medium',\n showHoliday = false,\n showTime = false,\n className = '',\n title,\n}) => {\n const parsedDate = useMemo(() => {\n try {\n if (date instanceof Date) return isValid(date) ? date : null;\n if (typeof date === 'string') {\n const parsed = parseISO(date);\n return isValid(parsed) ? parsed : new Date(date);\n }\n if (typeof date === 'number') {\n const parsed = new Date(date);\n return isValid(parsed) ? parsed : null;\n }\n return null;\n } catch {\n return null;\n }\n }, [date]);\n\n const formatRelativeTime = useCallback((d: Date): string => {\n const diffInSeconds = Math.floor((Date.now() - d.getTime()) / 1000);\n if (diffInSeconds < 60) return 'Vừa xong';\n if (diffInSeconds < 3600) return `${Math.floor(diffInSeconds / TIME_IN_SECONDS.MINUTE)} phút trước`;\n if (diffInSeconds < 86400) return `${Math.floor(diffInSeconds / TIME_IN_SECONDS.HOUR)} giờ trước`;\n if (diffInSeconds < 604800) return `${Math.floor(diffInSeconds / TIME_IN_SECONDS.DAY)} ngày trước`;\n if (diffInSeconds < 2592000) return `${Math.floor(diffInSeconds / TIME_IN_SECONDS.WEEK)} tuần trước`;\n if (diffInSeconds < 31536000) return `${Math.floor(diffInSeconds / TIME_IN_SECONDS.MONTH)} tháng trước`;\n return `${Math.floor(diffInSeconds / TIME_IN_SECONDS.YEAR)} năm trước`;\n }, []);\n\n const getVietnameseWeekday = useCallback((d: Date, short = false): string => {\n return short ? vietnameseLocale.weekdaysShort[d.getDay()] : vietnameseLocale.weekdays[d.getDay()];\n }, []);\n\n const getVietnameseMonth = useCallback((d: Date, short = false): string => {\n return short ? vietnameseLocale.monthsShort[d.getMonth()] : vietnameseLocale.months[d.getMonth()];\n }, []);\n\n const getHoliday = useCallback((d: Date): string | null => {\n const monthDay = format(d, 'MM-dd') as keyof typeof vietnameseHolidays;\n return vietnameseHolidays[monthDay] || null;\n }, []);\n\n const getSmartFormat = useCallback(\n (d: Date): string => {\n if (isToday(d)) return showTime ? `Hôm nay ${format(d, 'HH:mm')}` : 'Hôm nay';\n if (isYesterday(d)) return showTime ? `Hôm qua ${format(d, 'HH:mm')}` : 'Hôm qua';\n if (isTomorrow(d)) return showTime ? `Ngày mai ${format(d, 'HH:mm')}` : 'Ngày mai';\n if (isThisWeek(d)) {\n const weekday = getVietnameseWeekday(d);\n return showTime ? `${weekday} ${format(d, 'HH:mm')}` : weekday;\n }\n if (isThisMonth(d)) {\n const day = format(d, 'd');\n return showTime ? `${day}/${format(d, 'M')} ${format(d, 'HH:mm')}` : `${day}/${format(d, 'M')}`;\n }\n if (isThisYear(d)) return showTime ? format(d, 'd/M HH:mm') : format(d, 'd/M');\n return showTime ? format(d, 'd/M/yyyy HH:mm') : format(d, 'd/M/yyyy');\n },\n [getVietnameseWeekday, showTime]\n );\n\n const formatDate = useCallback(\n (d: Date, type: string): string => {\n const timeStr = showTime ? format(d, ', HH:mm:ss') : '';\n switch (type) {\n case 'short':\n return format(d, 'd/M/yy') + timeStr;\n case 'medium':\n return format(d, 'dd/MM/yyyy') + timeStr;\n case 'long':\n return `${format(d, 'd')} ${getVietnameseMonth(d)} ${format(d, 'yyyy')}` + timeStr;\n case 'full':\n return `${getVietnameseWeekday(d)}, ngày ${format(d, 'd')} ${getVietnameseMonth(d)} năm ${format(d, 'yyyy')}` + timeStr;\n case 'relative':\n return formatRelativeTime(d);\n case 'datetime':\n return format(d, 'd/M/yyyy HH:mm');\n case 'time':\n return format(d, 'HH:mm');\n case 'smart':\n return getSmartFormat(d);\n default:\n return format(d, 'd/M/yyyy') + timeStr;\n }\n },\n [getSmartFormat, getVietnameseMonth, getVietnameseWeekday, formatRelativeTime, showTime]\n );\n\n if (!parsedDate) {\n return <span className={cn('text-sm text-text-positive-subtle', className)}>--/--/----</span>;\n }\n\n const formattedDate = formatDate(parsedDate, formatType);\n const holiday = showHoliday ? getHoliday(parsedDate) : null;\n const displayText = holiday ? `${formattedDate} (${holiday})` : formattedDate;\n const tooltipTitle = title || format(parsedDate, 'EEEE, d MMMM yyyy HH:mm:ss');\n\n return (\n <time\n data-slot=\"date-display\"\n dateTime={parsedDate.toISOString()}\n className={cn('tabular-nums text-xs text-text-positive-weak transition-colors', className)}\n title={tooltipTitle}\n >\n {displayText}\n </time>\n );\n};\n"],"mappings":"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"}
1
+ {"version":3,"file":"date-D_nB7Lh1.mjs","names":["DateDisplay: React.FC<DateDisplayProps>"],"sources":["../packages/constants.tsx","../packages/components/data-display/date.tsx"],"sourcesContent":["// Vietnamese locale configuration\nexport const vietnameseLocale = {\n weekdays: ['Chủ Nhật', 'Thứ Hai', 'Thứ Ba', 'Thứ Tư', 'Thứ Năm', 'Thứ Sáu', 'Thứ Bảy'],\n weekdaysShort: ['CN', 'T2', 'T3', 'T4', 'T5', 'T6', 'T7'],\n months: ['Tháng 01', 'Tháng 02', 'Tháng 03', 'Tháng 04', 'Tháng 05', 'Tháng 06', 'Tháng 07', 'Tháng 08', 'Tháng 09', 'Tháng 10', 'Tháng 11', 'Tháng 12'],\n monthsShort: ['T1', 'T2', 'T3', 'T4', 'T5', 'T6', 'T7', 'T8', 'T9', 'T10', 'T11', 'T12'],\n};\n\n// Vietnamese holidays\nexport const vietnameseHolidays = {\n '01-01': 'Tết Dương lịch',\n '03-08': 'Quốc tế Phụ nữ',\n '04-30': 'Ngày Giải phóng miền Nam',\n '05-01': 'Quốc tế Lao động',\n '09-02': 'Quốc khánh',\n '10-20': 'Ngày Phụ nữ Việt Nam',\n '11-20': 'Ngày Nhà giáo Việt Nam',\n};\n\n// Time Constants in milliseconds, seconds, and minutes\nexport const TIME_IN_MS = Object.freeze({\n SECOND: 1000,\n MINUTE: 60 * 1000,\n HOUR: 60 * 60 * 1000,\n DAY: 24 * 60 * 60 * 1000,\n WEEK: 7 * 24 * 60 * 60 * 1000,\n MONTH: 30 * 24 * 60 * 60 * 1000, // Approximation for month length = 30 days\n YEAR: 365 * 24 * 60 * 60 * 1000,\n});\n\nexport const TIME_IN_SECONDS = Object.freeze({\n MINUTE: 60,\n HOUR: 60 * 60,\n DAY: 24 * 60 * 60,\n WEEK: 7 * 24 * 60 * 60,\n MONTH: 30 * 24 * 60 * 60,\n YEAR: 365 * 24 * 60 * 60,\n});\n\nexport const TIME_IN_MINUTES = Object.freeze({\n HOUR: 60,\n DAY: 24 * 60,\n WEEK: 7 * 24 * 60,\n MONTH: 30 * 24 * 60,\n});\n","'use client';\n\nimport { useCallback, useMemo } from 'react';\n\nimport { format, isThisMonth, isThisWeek, isThisYear, isToday, isTomorrow, isValid, isYesterday, parseISO } from '@customafk/react-toolkit/date-fns';\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { TIME_IN_SECONDS, vietnameseHolidays, vietnameseLocale } from '@/constants';\n\ninterface DateDisplayProps {\n /** The date value to display; accepts a `Date` object, an ISO string, or a Unix timestamp (ms). */\n date: Date | string | number;\n /**\n * Controls how the date is formatted.\n * - `'short'` — `15/03/24`\n * - `'medium'` — `15/03/2024` (default)\n * - `'long'` — `15 tháng 3, 2024`\n * - `'full'` — `Thứ Sáu, ngày 15 tháng 3 năm 2024`\n * - `'relative'` — `2 giờ trước`\n * - `'datetime'` — `15/03/2024 14:30`\n * - `'time'` — `14:30`\n * - `'smart'` — auto-selects the most human-readable format based on recency\n */\n format?:\n | 'short' // 15/03/24\n | 'medium' // 15/03/2024\n | 'long' // 15 tháng 3, 2024\n | 'full' // Thứ Sáu, ngày 15 tháng 3 năm 2024\n | 'relative' // 2 giờ trước\n | 'datetime' // 15/03/2024 14:30\n | 'time' // 14:30\n | 'smart'; // auto-selects format based on recency\n /** When `true`, appends any recognised Vietnamese public holiday name to the formatted date. Defaults to `false`. */\n showHoliday?: boolean;\n /** When `true`, appends the time component to the formatted output. Defaults to `false`. */\n showTime?: boolean;\n /** Additional CSS classes applied to the `<time>` element. */\n className?: string;\n /** Custom HTML `title` attribute; defaults to the full ISO datetime string. */\n title?: string;\n}\n\n/**\n * Renders a formatted date using Vietnamese locale conventions inside a semantic `<time>` element.\n *\n * @example\n * ```tsx\n * import { DateDisplay } from '@customafk/lunas-ui/data-display/date';\n *\n * <DateDisplay date=\"2024-03-15T14:30:00Z\" format=\"medium\" showTime />\n * ```\n */\nexport const DateDisplay: React.FC<DateDisplayProps> = ({\n date,\n format: formatType = 'medium',\n showHoliday = false,\n showTime = false,\n className = '',\n title,\n}) => {\n const parsedDate = useMemo(() => {\n try {\n if (date instanceof Date) return isValid(date) ? date : null;\n if (typeof date === 'string') {\n const parsed = parseISO(date);\n return isValid(parsed) ? parsed : new Date(date);\n }\n if (typeof date === 'number') {\n const parsed = new Date(date);\n return isValid(parsed) ? parsed : null;\n }\n return null;\n } catch {\n return null;\n }\n }, [date]);\n\n const formatRelativeTime = useCallback((d: Date): string => {\n const diffInSeconds = Math.floor((Date.now() - d.getTime()) / 1000);\n if (diffInSeconds < 60) return 'Vừa xong';\n if (diffInSeconds < 3600) return `${Math.floor(diffInSeconds / TIME_IN_SECONDS.MINUTE)} phút trước`;\n if (diffInSeconds < 86400) return `${Math.floor(diffInSeconds / TIME_IN_SECONDS.HOUR)} giờ trước`;\n if (diffInSeconds < 604800) return `${Math.floor(diffInSeconds / TIME_IN_SECONDS.DAY)} ngày trước`;\n if (diffInSeconds < 2592000) return `${Math.floor(diffInSeconds / TIME_IN_SECONDS.WEEK)} tuần trước`;\n if (diffInSeconds < 31536000) return `${Math.floor(diffInSeconds / TIME_IN_SECONDS.MONTH)} tháng trước`;\n return `${Math.floor(diffInSeconds / TIME_IN_SECONDS.YEAR)} năm trước`;\n }, []);\n\n const getVietnameseWeekday = useCallback((d: Date, short = false): string => {\n return short ? vietnameseLocale.weekdaysShort[d.getDay()] : vietnameseLocale.weekdays[d.getDay()];\n }, []);\n\n const getVietnameseMonth = useCallback((d: Date, short = false): string => {\n return short ? vietnameseLocale.monthsShort[d.getMonth()] : vietnameseLocale.months[d.getMonth()];\n }, []);\n\n const getHoliday = useCallback((d: Date): string | null => {\n const monthDay = format(d, 'MM-dd') as keyof typeof vietnameseHolidays;\n return vietnameseHolidays[monthDay] || null;\n }, []);\n\n const getSmartFormat = useCallback(\n (d: Date): string => {\n if (isToday(d)) return showTime ? `Hôm nay ${format(d, 'HH:mm')}` : 'Hôm nay';\n if (isYesterday(d)) return showTime ? `Hôm qua ${format(d, 'HH:mm')}` : 'Hôm qua';\n if (isTomorrow(d)) return showTime ? `Ngày mai ${format(d, 'HH:mm')}` : 'Ngày mai';\n if (isThisWeek(d)) {\n const weekday = getVietnameseWeekday(d);\n return showTime ? `${weekday} ${format(d, 'HH:mm')}` : weekday;\n }\n if (isThisMonth(d)) {\n const day = format(d, 'd');\n return showTime ? `${day}/${format(d, 'M')} ${format(d, 'HH:mm')}` : `${day}/${format(d, 'M')}`;\n }\n if (isThisYear(d)) return showTime ? format(d, 'd/M HH:mm') : format(d, 'd/M');\n return showTime ? format(d, 'd/M/yyyy HH:mm') : format(d, 'd/M/yyyy');\n },\n [getVietnameseWeekday, showTime]\n );\n\n const formatDate = useCallback(\n (d: Date, type: string): string => {\n const timeStr = showTime ? format(d, ', HH:mm:ss') : '';\n switch (type) {\n case 'short':\n return format(d, 'd/M/yy') + timeStr;\n case 'medium':\n return format(d, 'dd/MM/yyyy') + timeStr;\n case 'long':\n return `${format(d, 'd')} ${getVietnameseMonth(d)} ${format(d, 'yyyy')}` + timeStr;\n case 'full':\n return `${getVietnameseWeekday(d)}, ngày ${format(d, 'd')} ${getVietnameseMonth(d)} năm ${format(d, 'yyyy')}` + timeStr;\n case 'relative':\n return formatRelativeTime(d);\n case 'datetime':\n return format(d, 'd/M/yyyy HH:mm');\n case 'time':\n return format(d, 'HH:mm');\n case 'smart':\n return getSmartFormat(d);\n default:\n return format(d, 'd/M/yyyy') + timeStr;\n }\n },\n [getSmartFormat, getVietnameseMonth, getVietnameseWeekday, formatRelativeTime, showTime]\n );\n\n if (!parsedDate) {\n return <span className={cn('text-sm text-text-positive-subtle', className)}>--/--/----</span>;\n }\n\n const formattedDate = formatDate(parsedDate, formatType);\n const holiday = showHoliday ? getHoliday(parsedDate) : null;\n const displayText = holiday ? `${formattedDate} (${holiday})` : formattedDate;\n const tooltipTitle = title || format(parsedDate, 'EEEE, d MMMM yyyy HH:mm:ss');\n\n return (\n <time\n data-slot=\"date-display\"\n dateTime={parsedDate.toISOString()}\n className={cn('tabular-nums text-xs text-text-positive-weak transition-colors', className)}\n title={tooltipTitle}\n >\n {displayText}\n </time>\n );\n};\n"],"mappings":"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"}
@@ -1,2 +1,2 @@
1
- import{t as e}from"./heading-D8K7UGv2.mjs";import{n as t}from"./paragraph-jzLzzEYZ.mjs";import{t as n}from"./close-BcOkVqd8.mjs";import{jsx as r,jsxs as i}from"react/jsx-runtime";import{cn as a}from"@customafk/react-toolkit/utils";import{Dialog as o}from"radix-ui";function s({...e}){return r(o.Root,{"data-slot":`dialog`,...e})}function c({...e}){return r(o.Trigger,{"data-slot":`dialog-trigger`,...e})}function l({...e}){return r(o.Portal,{"data-slot":`dialog-portal`,...e})}function u({...e}){return r(o.Close,{"data-slot":`dialog-close`,...e})}function d({className:e,...t}){return r(o.Overlay,{"data-slot":`dialog-overlay`,className:a(`fixed inset-0 z-50 bg-black/50`,`data-[state=open]:animate-in data-[state=open]:fade-in-0`,`data-[state=closed]:animate-out data-[state=closed]:fade-out-0`,e),...t})}function f({className:e,children:t,showCloseButton:s=!0,...c}){return i(l,{children:[r(d,{}),i(o.Content,{"data-slot":`dialog-content`,className:a(`fixed top-1/2 left-1/2 z-50 -translate-x-1/2 -translate-y-1/2`,`grid w-full max-w-[calc(100%-2rem)] bg-background`,`max-h-[85dvh] gap-4 rounded-2xl p-6 shadow-dialog outline-none duration-200`,`sm:max-w-lg`,`data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-80`,`data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-80`,e),...c,children:[t,s&&r(o.Close,{"data-slot":`dialog-close`,tabIndex:-1,asChild:!0,className:`absolute top-3 right-3`,children:r(n,{})})]})]})}function p({className:e,...t}){return r(`div`,{"data-slot":`dialog-header`,className:a(`flex flex-col gap-2 text-center sm:text-left`,e),...t})}function m({className:e,...t}){return r(`div`,{"data-slot":`dialog-footer`,className:a(`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,e),...t})}function h({className:t,...n}){return r(o.Title,{"data-slot":`dialog-title`,className:a(e({level:`h3`}),t),...n})}function g({className:e,...n}){return r(o.Description,{"data-slot":`dialog-description`,className:a(t({variant:`muted`}),e),...n})}export{m as a,l as c,g as i,h as l,u as n,p as o,f as r,d as s,s as t,c as u};
2
- //# sourceMappingURL=dialog-dqqupmOT.mjs.map
1
+ import{t as e}from"./heading-BnaNuvDS.mjs";import{n as t}from"./paragraph-CnHNC0rS.mjs";import{t as n}from"./close-BS6EeCrQ.mjs";import{jsx as r,jsxs as i}from"react/jsx-runtime";import{cn as a}from"@customafk/react-toolkit/utils";import{Dialog as o}from"radix-ui";function s({...e}){return r(o.Root,{"data-slot":`dialog`,...e})}function c({...e}){return r(o.Trigger,{"data-slot":`dialog-trigger`,...e})}function l({...e}){return r(o.Portal,{"data-slot":`dialog-portal`,...e})}function u({...e}){return r(o.Close,{"data-slot":`dialog-close`,...e})}function d({className:e,...t}){return r(o.Overlay,{"data-slot":`dialog-overlay`,className:a(`fixed inset-0 z-50 bg-black/50`,`data-[state=open]:animate-in data-[state=open]:fade-in-0`,`data-[state=closed]:animate-out data-[state=closed]:fade-out-0`,e),...t})}function f({className:e,children:t,showCloseButton:s=!0,...c}){return i(l,{children:[r(d,{}),i(o.Content,{"data-slot":`dialog-content`,className:a(`fixed top-1/2 left-1/2 z-50 -translate-x-1/2 -translate-y-1/2`,`grid w-full max-w-[calc(100%-2rem)] bg-background`,`max-h-[85dvh] gap-4 rounded-2xl p-6 shadow-dialog outline-none duration-200`,`sm:max-w-lg`,`data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-80`,`data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-80`,e),...c,children:[t,s&&r(o.Close,{"data-slot":`dialog-close`,tabIndex:-1,asChild:!0,className:`absolute top-3 right-3`,children:r(n,{})})]})]})}function p({className:e,...t}){return r(`div`,{"data-slot":`dialog-header`,className:a(`flex flex-col gap-2 text-center sm:text-left`,e),...t})}function m({className:e,...t}){return r(`div`,{"data-slot":`dialog-footer`,className:a(`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,e),...t})}function h({className:t,...n}){return r(o.Title,{"data-slot":`dialog-title`,className:a(e({level:`h3`}),t),...n})}function g({className:e,...n}){return r(o.Description,{"data-slot":`dialog-description`,className:a(t({variant:`muted`}),e),...n})}export{m as a,l as c,g as i,h as l,u as n,p as o,f as r,d as s,s as t,c as u};
2
+ //# sourceMappingURL=dialog-DG4vMCr5.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"dialog-dqqupmOT.mjs","names":["Dialog","DialogPrimitive"],"sources":["../packages/components/ui/dialog.tsx"],"sourcesContent":["'use client';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { Dialog as DialogPrimitive } from 'radix-ui';\nimport { CloseButton } from './buttons/close';\nimport { headingVariants } from '../typography/heading';\nimport { paragraphVariants } from '../typography/paragraph';\n\n/**\n * Accessible modal dialog built on Radix UI's Dialog primitives with animated overlay, close button, and responsive sizing.\n *\n * @example\n * ```tsx\n * import {\n * Dialog, DialogTrigger, DialogContent,\n * DialogHeader, DialogTitle, DialogDescription, DialogFooter,\n * } from '@customafk/lunas-ui/ui/dialog';\n * import { Button } from '@customafk/lunas-ui/ui/button';\n *\n * <Dialog>\n * <DialogTrigger asChild>\n * <Button>Open dialog</Button>\n * </DialogTrigger>\n * <DialogContent>\n * <DialogHeader>\n * <DialogTitle>Confirm action</DialogTitle>\n * <DialogDescription>This cannot be undone.</DialogDescription>\n * </DialogHeader>\n * <DialogFooter>\n * <Button variant=\"outline\">Cancel</Button>\n * <Button>Confirm</Button>\n * </DialogFooter>\n * </DialogContent>\n * </Dialog>\n * ```\n */\nfunction Dialog({ ...props }: React.ComponentProps<typeof DialogPrimitive.Root>) {\n return <DialogPrimitive.Root data-slot=\"dialog\" {...props} />;\n}\n\n/** Element that opens the dialog when clicked; typically wrapped with `asChild` around a `Button`. */\nfunction DialogTrigger({ ...props }: React.ComponentProps<typeof DialogPrimitive.Trigger>) {\n return <DialogPrimitive.Trigger data-slot=\"dialog-trigger\" {...props} />;\n}\n\n/** Renders dialog overlay and content into a portal outside the normal React tree. */\nfunction DialogPortal({ ...props }: React.ComponentProps<typeof DialogPrimitive.Portal>) {\n return <DialogPrimitive.Portal data-slot=\"dialog-portal\" {...props} />;\n}\n\n/** Button that closes the dialog; can be composed with `asChild` to use a custom element. */\nfunction DialogClose({ ...props }: React.ComponentProps<typeof DialogPrimitive.Close>) {\n return <DialogPrimitive.Close data-slot=\"dialog-close\" {...props} />;\n}\n\n/** Semi-transparent backdrop rendered behind the dialog panel with fade-in/out animation. */\nfunction DialogOverlay({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Overlay>) {\n return (\n <DialogPrimitive.Overlay\n data-slot=\"dialog-overlay\"\n className={cn(\n 'fixed inset-0 z-50 bg-black/50',\n 'data-[state=open]:animate-in data-[state=open]:fade-in-0',\n 'data-[state=closed]:animate-out data-[state=closed]:fade-out-0',\n className\n )}\n {...props}\n />\n );\n}\n\n/**\n * Animated dialog panel centred on screen; includes `DialogOverlay` and an optional close button.\n *\n * @param showCloseButton - When `true` (default), renders a `CloseButton` in the top-right corner.\n */\nfunction DialogContent({\n className,\n children,\n showCloseButton = true,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Content> & {\n /** When `true` (default), renders an `×` close button fixed to the top-right corner of the panel. */\n showCloseButton?: boolean;\n}) {\n return (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n data-slot=\"dialog-content\"\n className={cn(\n 'fixed top-1/2 left-1/2 z-50 -translate-x-1/2 -translate-y-1/2',\n 'grid w-full max-w-[calc(100%-2rem)] bg-background',\n 'max-h-[85dvh] gap-4 rounded-2xl p-6 shadow-dialog outline-none duration-200',\n 'sm:max-w-lg',\n 'data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-80',\n 'data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-80',\n className\n )}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close data-slot=\"dialog-close\" tabIndex={-1} asChild className=\"absolute top-3 right-3\">\n <CloseButton />\n </DialogPrimitive.Close>\n )}\n </DialogPrimitive.Content>\n </DialogPortal>\n );\n}\n\n/** Layout wrapper for the dialog title and description, stacked vertically with left alignment on wider screens. */\nfunction DialogHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"dialog-header\" className={cn('flex flex-col gap-2 text-center sm:text-left', className)} {...props} />;\n}\n\n/** Layout wrapper for dialog action buttons, stacked on mobile and right-aligned in a row on wider screens. */\nfunction DialogFooter({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"dialog-footer\" className={cn('flex flex-col-reverse gap-2 sm:flex-row sm:justify-end', className)} {...props} />;\n}\n\n/** Accessible heading for the dialog panel, styled with the h3 heading variant and announced by screen readers. */\nfunction DialogTitle({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Title>) {\n return <DialogPrimitive.Title data-slot=\"dialog-title\" className={cn(headingVariants({ level: 'h3' }), className)} {...props} />;\n}\n\n/** Muted supporting text that describes the dialog's purpose; read by screen readers alongside the title. */\nfunction DialogDescription({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Description>) {\n return <DialogPrimitive.Description data-slot=\"dialog-description\" className={cn(paragraphVariants({ variant: 'muted' }), className)} {...props} />;\n}\n\nexport { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger };\n"],"mappings":"yQAqCA,SAASA,EAAO,CAAE,GAAG,GAA4D,CAC/E,OAAO,EAACC,EAAgB,KAAA,CAAK,YAAU,SAAS,GAAI,GAAS,CAI/D,SAAS,EAAc,CAAE,GAAG,GAA+D,CACzF,OAAO,EAACA,EAAgB,QAAA,CAAQ,YAAU,iBAAiB,GAAI,GAAS,CAI1E,SAAS,EAAa,CAAE,GAAG,GAA8D,CACvF,OAAO,EAACA,EAAgB,OAAA,CAAO,YAAU,gBAAgB,GAAI,GAAS,CAIxE,SAAS,EAAY,CAAE,GAAG,GAA6D,CACrF,OAAO,EAACA,EAAgB,MAAA,CAAM,YAAU,eAAe,GAAI,GAAS,CAItE,SAAS,EAAc,CAAE,YAAW,GAAG,GAA+D,CACpG,OACE,EAACA,EAAgB,QAAA,CACf,YAAU,iBACV,UAAW,EACT,iCACA,2DACA,iEACA,EACD,CACD,GAAI,GACJ,CASN,SAAS,EAAc,CACrB,YACA,WACA,kBAAkB,GAClB,GAAG,GAIF,CACD,OACE,EAAC,EAAA,CAAA,SAAA,CACC,EAAC,EAAA,EAAA,CAAgB,CACjB,EAACA,EAAgB,QAAA,CACf,YAAU,iBACV,UAAW,EACT,gEACA,oDACA,8EACA,cACA,wFACA,iGACA,EACD,CACD,GAAI,YAEH,EACA,GACC,EAACA,EAAgB,MAAA,CAAM,YAAU,eAAe,SAAU,GAAI,QAAA,GAAQ,UAAU,kCAC9E,EAAC,EAAA,EAAA,CAAc,EACO,CAAA,EAEF,CAAA,CAAA,CACb,CAKnB,SAAS,EAAa,CAAE,YAAW,GAAG,GAAsC,CAC1E,OAAO,EAAC,MAAA,CAAI,YAAU,gBAAgB,UAAW,EAAG,+CAAgD,EAAU,CAAE,GAAI,GAAS,CAI/H,SAAS,EAAa,CAAE,YAAW,GAAG,GAAsC,CAC1E,OAAO,EAAC,MAAA,CAAI,YAAU,gBAAgB,UAAW,EAAG,yDAA0D,EAAU,CAAE,GAAI,GAAS,CAIzI,SAAS,EAAY,CAAE,YAAW,GAAG,GAA6D,CAChG,OAAO,EAACA,EAAgB,MAAA,CAAM,YAAU,eAAe,UAAW,EAAG,EAAgB,CAAE,MAAO,KAAM,CAAC,CAAE,EAAU,CAAE,GAAI,GAAS,CAIlI,SAAS,EAAkB,CAAE,YAAW,GAAG,GAAmE,CAC5G,OAAO,EAACA,EAAgB,YAAA,CAAY,YAAU,qBAAqB,UAAW,EAAG,EAAkB,CAAE,QAAS,QAAS,CAAC,CAAE,EAAU,CAAE,GAAI,GAAS"}
1
+ {"version":3,"file":"dialog-DG4vMCr5.mjs","names":["Dialog","DialogPrimitive"],"sources":["../packages/components/ui/dialog.tsx"],"sourcesContent":["'use client';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { Dialog as DialogPrimitive } from 'radix-ui';\nimport { CloseButton } from './buttons/close';\nimport { headingVariants } from '../typography/heading';\nimport { paragraphVariants } from '../typography/paragraph';\n\n/**\n * Accessible modal dialog built on Radix UI's Dialog primitives with animated overlay, close button, and responsive sizing.\n *\n * @example\n * ```tsx\n * import {\n * Dialog, DialogTrigger, DialogContent,\n * DialogHeader, DialogTitle, DialogDescription, DialogFooter,\n * } from '@customafk/lunas-ui/ui/dialog';\n * import { Button } from '@customafk/lunas-ui/ui/button';\n *\n * <Dialog>\n * <DialogTrigger asChild>\n * <Button>Open dialog</Button>\n * </DialogTrigger>\n * <DialogContent>\n * <DialogHeader>\n * <DialogTitle>Confirm action</DialogTitle>\n * <DialogDescription>This cannot be undone.</DialogDescription>\n * </DialogHeader>\n * <DialogFooter>\n * <Button variant=\"outline\">Cancel</Button>\n * <Button>Confirm</Button>\n * </DialogFooter>\n * </DialogContent>\n * </Dialog>\n * ```\n */\nfunction Dialog({ ...props }: React.ComponentProps<typeof DialogPrimitive.Root>) {\n return <DialogPrimitive.Root data-slot=\"dialog\" {...props} />;\n}\n\n/** Element that opens the dialog when clicked; typically wrapped with `asChild` around a `Button`. */\nfunction DialogTrigger({ ...props }: React.ComponentProps<typeof DialogPrimitive.Trigger>) {\n return <DialogPrimitive.Trigger data-slot=\"dialog-trigger\" {...props} />;\n}\n\n/** Renders dialog overlay and content into a portal outside the normal React tree. */\nfunction DialogPortal({ ...props }: React.ComponentProps<typeof DialogPrimitive.Portal>) {\n return <DialogPrimitive.Portal data-slot=\"dialog-portal\" {...props} />;\n}\n\n/** Button that closes the dialog; can be composed with `asChild` to use a custom element. */\nfunction DialogClose({ ...props }: React.ComponentProps<typeof DialogPrimitive.Close>) {\n return <DialogPrimitive.Close data-slot=\"dialog-close\" {...props} />;\n}\n\n/** Semi-transparent backdrop rendered behind the dialog panel with fade-in/out animation. */\nfunction DialogOverlay({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Overlay>) {\n return (\n <DialogPrimitive.Overlay\n data-slot=\"dialog-overlay\"\n className={cn(\n 'fixed inset-0 z-50 bg-black/50',\n 'data-[state=open]:animate-in data-[state=open]:fade-in-0',\n 'data-[state=closed]:animate-out data-[state=closed]:fade-out-0',\n className\n )}\n {...props}\n />\n );\n}\n\n/**\n * Animated dialog panel centred on screen; includes `DialogOverlay` and an optional close button.\n *\n * @param showCloseButton - When `true` (default), renders a `CloseButton` in the top-right corner.\n */\nfunction DialogContent({\n className,\n children,\n showCloseButton = true,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Content> & {\n /** When `true` (default), renders an `×` close button fixed to the top-right corner of the panel. */\n showCloseButton?: boolean;\n}) {\n return (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n data-slot=\"dialog-content\"\n className={cn(\n 'fixed top-1/2 left-1/2 z-50 -translate-x-1/2 -translate-y-1/2',\n 'grid w-full max-w-[calc(100%-2rem)] bg-background',\n 'max-h-[85dvh] gap-4 rounded-2xl p-6 shadow-dialog outline-none duration-200',\n 'sm:max-w-lg',\n 'data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-80',\n 'data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-80',\n className\n )}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close data-slot=\"dialog-close\" tabIndex={-1} asChild className=\"absolute top-3 right-3\">\n <CloseButton />\n </DialogPrimitive.Close>\n )}\n </DialogPrimitive.Content>\n </DialogPortal>\n );\n}\n\n/** Layout wrapper for the dialog title and description, stacked vertically with left alignment on wider screens. */\nfunction DialogHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"dialog-header\" className={cn('flex flex-col gap-2 text-center sm:text-left', className)} {...props} />;\n}\n\n/** Layout wrapper for dialog action buttons, stacked on mobile and right-aligned in a row on wider screens. */\nfunction DialogFooter({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"dialog-footer\" className={cn('flex flex-col-reverse gap-2 sm:flex-row sm:justify-end', className)} {...props} />;\n}\n\n/** Accessible heading for the dialog panel, styled with the h3 heading variant and announced by screen readers. */\nfunction DialogTitle({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Title>) {\n return <DialogPrimitive.Title data-slot=\"dialog-title\" className={cn(headingVariants({ level: 'h3' }), className)} {...props} />;\n}\n\n/** Muted supporting text that describes the dialog's purpose; read by screen readers alongside the title. */\nfunction DialogDescription({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Description>) {\n return <DialogPrimitive.Description data-slot=\"dialog-description\" className={cn(paragraphVariants({ variant: 'muted' }), className)} {...props} />;\n}\n\nexport { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger };\n"],"mappings":"yQAqCA,SAASA,EAAO,CAAE,GAAG,GAA4D,CAC/E,OAAO,EAACC,EAAgB,KAAA,CAAK,YAAU,SAAS,GAAI,GAAS,CAI/D,SAAS,EAAc,CAAE,GAAG,GAA+D,CACzF,OAAO,EAACA,EAAgB,QAAA,CAAQ,YAAU,iBAAiB,GAAI,GAAS,CAI1E,SAAS,EAAa,CAAE,GAAG,GAA8D,CACvF,OAAO,EAACA,EAAgB,OAAA,CAAO,YAAU,gBAAgB,GAAI,GAAS,CAIxE,SAAS,EAAY,CAAE,GAAG,GAA6D,CACrF,OAAO,EAACA,EAAgB,MAAA,CAAM,YAAU,eAAe,GAAI,GAAS,CAItE,SAAS,EAAc,CAAE,YAAW,GAAG,GAA+D,CACpG,OACE,EAACA,EAAgB,QAAA,CACf,YAAU,iBACV,UAAW,EACT,iCACA,2DACA,iEACA,EACD,CACD,GAAI,GACJ,CASN,SAAS,EAAc,CACrB,YACA,WACA,kBAAkB,GAClB,GAAG,GAIF,CACD,OACE,EAAC,EAAA,CAAA,SAAA,CACC,EAAC,EAAA,EAAA,CAAgB,CACjB,EAACA,EAAgB,QAAA,CACf,YAAU,iBACV,UAAW,EACT,gEACA,oDACA,8EACA,cACA,wFACA,iGACA,EACD,CACD,GAAI,YAEH,EACA,GACC,EAACA,EAAgB,MAAA,CAAM,YAAU,eAAe,SAAU,GAAI,QAAA,GAAQ,UAAU,kCAC9E,EAAC,EAAA,EAAA,CAAc,EACO,CAAA,EAEF,CAAA,CAAA,CACb,CAKnB,SAAS,EAAa,CAAE,YAAW,GAAG,GAAsC,CAC1E,OAAO,EAAC,MAAA,CAAI,YAAU,gBAAgB,UAAW,EAAG,+CAAgD,EAAU,CAAE,GAAI,GAAS,CAI/H,SAAS,EAAa,CAAE,YAAW,GAAG,GAAsC,CAC1E,OAAO,EAAC,MAAA,CAAI,YAAU,gBAAgB,UAAW,EAAG,yDAA0D,EAAU,CAAE,GAAI,GAAS,CAIzI,SAAS,EAAY,CAAE,YAAW,GAAG,GAA6D,CAChG,OAAO,EAACA,EAAgB,MAAA,CAAM,YAAU,eAAe,UAAW,EAAG,EAAgB,CAAE,MAAO,KAAM,CAAC,CAAE,EAAU,CAAE,GAAI,GAAS,CAIlI,SAAS,EAAkB,CAAE,YAAW,GAAG,GAAmE,CAC5G,OAAO,EAACA,EAAgB,YAAA,CAAY,YAAU,qBAAqB,UAAW,EAAG,EAAkB,CAAE,QAAS,QAAS,CAAC,CAAE,EAAU,CAAE,GAAI,GAAS"}
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime119 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime126 from "react/jsx-runtime";
2
2
  import { Dialog } from "radix-ui";
3
3
 
4
4
  //#region packages/components/ui/dialog.d.ts
@@ -33,24 +33,24 @@ import { Dialog } from "radix-ui";
33
33
  */
34
34
  declare function Dialog$1({
35
35
  ...props
36
- }: React.ComponentProps<typeof Dialog.Root>): react_jsx_runtime119.JSX.Element;
36
+ }: React.ComponentProps<typeof Dialog.Root>): react_jsx_runtime126.JSX.Element;
37
37
  /** Element that opens the dialog when clicked; typically wrapped with `asChild` around a `Button`. */
38
38
  declare function DialogTrigger({
39
39
  ...props
40
- }: React.ComponentProps<typeof Dialog.Trigger>): react_jsx_runtime119.JSX.Element;
40
+ }: React.ComponentProps<typeof Dialog.Trigger>): react_jsx_runtime126.JSX.Element;
41
41
  /** Renders dialog overlay and content into a portal outside the normal React tree. */
42
42
  declare function DialogPortal({
43
43
  ...props
44
- }: React.ComponentProps<typeof Dialog.Portal>): react_jsx_runtime119.JSX.Element;
44
+ }: React.ComponentProps<typeof Dialog.Portal>): react_jsx_runtime126.JSX.Element;
45
45
  /** Button that closes the dialog; can be composed with `asChild` to use a custom element. */
46
46
  declare function DialogClose({
47
47
  ...props
48
- }: React.ComponentProps<typeof Dialog.Close>): react_jsx_runtime119.JSX.Element;
48
+ }: React.ComponentProps<typeof Dialog.Close>): react_jsx_runtime126.JSX.Element;
49
49
  /** Semi-transparent backdrop rendered behind the dialog panel with fade-in/out animation. */
50
50
  declare function DialogOverlay({
51
51
  className,
52
52
  ...props
53
- }: React.ComponentProps<typeof Dialog.Overlay>): react_jsx_runtime119.JSX.Element;
53
+ }: React.ComponentProps<typeof Dialog.Overlay>): react_jsx_runtime126.JSX.Element;
54
54
  /**
55
55
  * Animated dialog panel centred on screen; includes `DialogOverlay` and an optional close button.
56
56
  *
@@ -64,27 +64,27 @@ declare function DialogContent({
64
64
  }: React.ComponentProps<typeof Dialog.Content> & {
65
65
  /** When `true` (default), renders an `×` close button fixed to the top-right corner of the panel. */
66
66
  showCloseButton?: boolean;
67
- }): react_jsx_runtime119.JSX.Element;
67
+ }): react_jsx_runtime126.JSX.Element;
68
68
  /** Layout wrapper for the dialog title and description, stacked vertically with left alignment on wider screens. */
69
69
  declare function DialogHeader({
70
70
  className,
71
71
  ...props
72
- }: React.ComponentProps<'div'>): react_jsx_runtime119.JSX.Element;
72
+ }: React.ComponentProps<'div'>): react_jsx_runtime126.JSX.Element;
73
73
  /** Layout wrapper for dialog action buttons, stacked on mobile and right-aligned in a row on wider screens. */
74
74
  declare function DialogFooter({
75
75
  className,
76
76
  ...props
77
- }: React.ComponentProps<'div'>): react_jsx_runtime119.JSX.Element;
77
+ }: React.ComponentProps<'div'>): react_jsx_runtime126.JSX.Element;
78
78
  /** Accessible heading for the dialog panel, styled with the h3 heading variant and announced by screen readers. */
79
79
  declare function DialogTitle({
80
80
  className,
81
81
  ...props
82
- }: React.ComponentProps<typeof Dialog.Title>): react_jsx_runtime119.JSX.Element;
82
+ }: React.ComponentProps<typeof Dialog.Title>): react_jsx_runtime126.JSX.Element;
83
83
  /** Muted supporting text that describes the dialog's purpose; read by screen readers alongside the title. */
84
84
  declare function DialogDescription({
85
85
  className,
86
86
  ...props
87
- }: React.ComponentProps<typeof Dialog.Description>): react_jsx_runtime119.JSX.Element;
87
+ }: React.ComponentProps<typeof Dialog.Description>): react_jsx_runtime126.JSX.Element;
88
88
  //#endregion
89
89
  export { DialogFooter as a, DialogPortal as c, DialogDescription as i, DialogTitle as l, DialogClose as n, DialogHeader as o, DialogContent as r, DialogOverlay as s, Dialog$1 as t, DialogTrigger as u };
90
- //# sourceMappingURL=dialog-CfbtCisP.d.mts.map
90
+ //# sourceMappingURL=dialog-DeQiptoB.d.cts.map
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime144 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime149 from "react/jsx-runtime";
2
2
  import { Dialog } from "radix-ui";
3
3
 
4
4
  //#region packages/components/ui/dialog.d.ts
@@ -33,24 +33,24 @@ import { Dialog } from "radix-ui";
33
33
  */
34
34
  declare function Dialog$1({
35
35
  ...props
36
- }: React.ComponentProps<typeof Dialog.Root>): react_jsx_runtime144.JSX.Element;
36
+ }: React.ComponentProps<typeof Dialog.Root>): react_jsx_runtime149.JSX.Element;
37
37
  /** Element that opens the dialog when clicked; typically wrapped with `asChild` around a `Button`. */
38
38
  declare function DialogTrigger({
39
39
  ...props
40
- }: React.ComponentProps<typeof Dialog.Trigger>): react_jsx_runtime144.JSX.Element;
40
+ }: React.ComponentProps<typeof Dialog.Trigger>): react_jsx_runtime149.JSX.Element;
41
41
  /** Renders dialog overlay and content into a portal outside the normal React tree. */
42
42
  declare function DialogPortal({
43
43
  ...props
44
- }: React.ComponentProps<typeof Dialog.Portal>): react_jsx_runtime144.JSX.Element;
44
+ }: React.ComponentProps<typeof Dialog.Portal>): react_jsx_runtime149.JSX.Element;
45
45
  /** Button that closes the dialog; can be composed with `asChild` to use a custom element. */
46
46
  declare function DialogClose({
47
47
  ...props
48
- }: React.ComponentProps<typeof Dialog.Close>): react_jsx_runtime144.JSX.Element;
48
+ }: React.ComponentProps<typeof Dialog.Close>): react_jsx_runtime149.JSX.Element;
49
49
  /** Semi-transparent backdrop rendered behind the dialog panel with fade-in/out animation. */
50
50
  declare function DialogOverlay({
51
51
  className,
52
52
  ...props
53
- }: React.ComponentProps<typeof Dialog.Overlay>): react_jsx_runtime144.JSX.Element;
53
+ }: React.ComponentProps<typeof Dialog.Overlay>): react_jsx_runtime149.JSX.Element;
54
54
  /**
55
55
  * Animated dialog panel centred on screen; includes `DialogOverlay` and an optional close button.
56
56
  *
@@ -64,27 +64,27 @@ declare function DialogContent({
64
64
  }: React.ComponentProps<typeof Dialog.Content> & {
65
65
  /** When `true` (default), renders an `×` close button fixed to the top-right corner of the panel. */
66
66
  showCloseButton?: boolean;
67
- }): react_jsx_runtime144.JSX.Element;
67
+ }): react_jsx_runtime149.JSX.Element;
68
68
  /** Layout wrapper for the dialog title and description, stacked vertically with left alignment on wider screens. */
69
69
  declare function DialogHeader({
70
70
  className,
71
71
  ...props
72
- }: React.ComponentProps<'div'>): react_jsx_runtime144.JSX.Element;
72
+ }: React.ComponentProps<'div'>): react_jsx_runtime149.JSX.Element;
73
73
  /** Layout wrapper for dialog action buttons, stacked on mobile and right-aligned in a row on wider screens. */
74
74
  declare function DialogFooter({
75
75
  className,
76
76
  ...props
77
- }: React.ComponentProps<'div'>): react_jsx_runtime144.JSX.Element;
77
+ }: React.ComponentProps<'div'>): react_jsx_runtime149.JSX.Element;
78
78
  /** Accessible heading for the dialog panel, styled with the h3 heading variant and announced by screen readers. */
79
79
  declare function DialogTitle({
80
80
  className,
81
81
  ...props
82
- }: React.ComponentProps<typeof Dialog.Title>): react_jsx_runtime144.JSX.Element;
82
+ }: React.ComponentProps<typeof Dialog.Title>): react_jsx_runtime149.JSX.Element;
83
83
  /** Muted supporting text that describes the dialog's purpose; read by screen readers alongside the title. */
84
84
  declare function DialogDescription({
85
85
  className,
86
86
  ...props
87
- }: React.ComponentProps<typeof Dialog.Description>): react_jsx_runtime144.JSX.Element;
87
+ }: React.ComponentProps<typeof Dialog.Description>): react_jsx_runtime149.JSX.Element;
88
88
  //#endregion
89
89
  export { DialogFooter as a, DialogPortal as c, DialogDescription as i, DialogTitle as l, DialogClose as n, DialogHeader as o, DialogContent as r, DialogOverlay as s, Dialog$1 as t, DialogTrigger as u };
90
- //# sourceMappingURL=dialog-HXH3FYKH.d.cts.map
90
+ //# sourceMappingURL=dialog-Dsuo8PP7.d.mts.map
@@ -1,2 +1,2 @@
1
- "use client";import"../button.variants-B8KCLWPT.mjs";import"../heading-D8K7UGv2.mjs";import"../paragraph-jzLzzEYZ.mjs";import{AlertDialog as e,AlertDialogAction as t,AlertDialogCancel as n,AlertDialogContent as r,AlertDialogDescription as i,AlertDialogFooter as a,AlertDialogHeader as o,AlertDialogTitle as s}from"../ui/alert-dialog.mjs";import{TriangleAlert as c}from"lucide-react";import{useCallback as l}from"react";import{jsx as u,jsxs as d}from"react/jsx-runtime";const f=({open:f,isLoading:p=!1,title:m,description:h,cancelText:g=`Cancel`,submitText:_=`Confirm`,descriptionClassName:v,onOpenChange:y,onConfirm:b})=>{let x=l(e=>{e.preventDefault(),e.stopPropagation(),b?.()},[b]);return u(e,{open:f,onOpenChange:y,children:d(r,{className:`p-4 pb-5`,children:[d(o,{className:`gap-2`,children:[d(s,{className:`inline-flex items-center gap-x-1`,children:[u(c,{size:20}),u(`p`,{children:m})]}),u(i,{className:v,children:h})]}),d(a,{children:[u(n,{children:g}),u(t,{type:`button`,className:`min-h-9 w-full md:w-24`,onClick:x,children:p?u(`div`,{className:`absolute inset-0 flex items-center justify-center`,children:u(`div`,{className:`loader-spinner text-text-positive-weak`})}):_})]})]})})};export{f as ConfirmDialog};
1
+ "use client";import"../button.variants-CwcJHcI5.mjs";import"../heading-BnaNuvDS.mjs";import"../paragraph-CnHNC0rS.mjs";import{AlertDialog as e,AlertDialogAction as t,AlertDialogCancel as n,AlertDialogContent as r,AlertDialogDescription as i,AlertDialogFooter as a,AlertDialogHeader as o,AlertDialogTitle as s}from"../ui/alert-dialog.mjs";import{TriangleAlert as c}from"lucide-react";import{useCallback as l}from"react";import{jsx as u,jsxs as d}from"react/jsx-runtime";const f=({open:f,isLoading:p=!1,title:m,description:h,cancelText:g=`Cancel`,submitText:_=`Confirm`,descriptionClassName:v,onOpenChange:y,onConfirm:b})=>{let x=l(e=>{e.preventDefault(),e.stopPropagation(),b?.()},[b]);return u(e,{open:f,onOpenChange:y,children:d(r,{className:`p-4 pb-5`,children:[d(o,{className:`gap-2`,children:[d(s,{className:`inline-flex items-center gap-x-1`,children:[u(c,{size:20}),u(`p`,{children:m})]}),u(i,{className:v,children:h})]}),d(a,{children:[u(n,{children:g}),u(t,{type:`button`,className:`min-h-9 w-full md:w-24`,onClick:x,children:p?u(`div`,{className:`absolute inset-0 flex items-center justify-center`,children:u(`div`,{className:`loader-spinner text-text-positive-weak`})}):_})]})]})})};export{f as ConfirmDialog};
2
2
  //# sourceMappingURL=confirm-dialog.mjs.map
@@ -1,4 +1,4 @@
1
- import { t as Button } from "../../../button-UgIAM1cP.cjs";
1
+ import { t as Button } from "../../../button-DXeUzeTa.cjs";
2
2
  import { Separator } from "../../../ui/separator.cjs";
3
3
  import { TooltipContent } from "../../../ui/tooltip.cjs";
4
4
  import * as react_jsx_runtime1 from "react/jsx-runtime";
@@ -149,7 +149,7 @@ declare function DetailDialogSidebarMenuItem({
149
149
  ...props
150
150
  }: React.ComponentProps<'li'>): react_jsx_runtime1.JSX.Element;
151
151
  declare const sidebarMenuButtonVariants: (props?: ({
152
- variant?: "default" | "outline" | null | undefined;
152
+ variant?: "outline" | "default" | null | undefined;
153
153
  size?: "sm" | "lg" | "default" | null | undefined;
154
154
  } & class_variance_authority_types0.ClassProp) | undefined) => string;
155
155
  declare function DetailDialogSidebarMenuButton({
@@ -1,9 +1,9 @@
1
- import { t as Button } from "../../../button-DdwLbwWQ.mjs";
1
+ import { t as Button } from "../../../button-xMJ2hylr.mjs";
2
2
  import { Separator } from "../../../ui/separator.mjs";
3
3
  import { TooltipContent } from "../../../ui/tooltip.mjs";
4
- import * as react_jsx_runtime4 from "react/jsx-runtime";
4
+ import * as react_jsx_runtime199 from "react/jsx-runtime";
5
5
  import { VariantProps } from "class-variance-authority";
6
- import * as class_variance_authority_types0 from "class-variance-authority/types";
6
+ import * as class_variance_authority_types10 from "class-variance-authority/types";
7
7
 
8
8
  //#region packages/components/dialogs/detail-dialog/components/sidebar.d.ts
9
9
  type SidebarContextProps = {
@@ -50,7 +50,7 @@ declare function SidebarProvider({
50
50
  open?: boolean;
51
51
  /** Callback fired when the open state changes in controlled mode. */
52
52
  onOpenChange?: (open: boolean) => void;
53
- }): react_jsx_runtime4.JSX.Element;
53
+ }): react_jsx_runtime199.JSX.Element;
54
54
  /**
55
55
  * Responsive sidebar container that supports desktop icon-collapse and a mobile Sheet overlay.
56
56
  *
@@ -77,7 +77,7 @@ declare function Sidebar({
77
77
  variant?: 'sidebar' | 'floating' | 'inset';
78
78
  /** Collapse behaviour — slides off-canvas, shrinks to icon strip, or stays fixed. Defaults to `'offcanvas'`. */
79
79
  collapsible?: 'offcanvas' | 'icon' | 'none';
80
- }): react_jsx_runtime4.JSX.Element;
80
+ }): react_jsx_runtime199.JSX.Element;
81
81
  /**
82
82
  * Icon button that toggles the detail-dialog sidebar open or collapsed.
83
83
  *
@@ -92,66 +92,66 @@ declare function DetailDialogSidebarTrigger({
92
92
  className,
93
93
  onClick,
94
94
  ...props
95
- }: React.ComponentProps<typeof Button>): react_jsx_runtime4.JSX.Element;
95
+ }: React.ComponentProps<typeof Button>): react_jsx_runtime199.JSX.Element;
96
96
  declare function DetailDialogSidebarRail({
97
97
  className,
98
98
  ...props
99
- }: React.ComponentProps<'button'>): react_jsx_runtime4.JSX.Element;
99
+ }: React.ComponentProps<'button'>): react_jsx_runtime199.JSX.Element;
100
100
  declare function SidebarInset({
101
101
  className,
102
102
  ...props
103
- }: React.ComponentProps<'main'>): react_jsx_runtime4.JSX.Element;
103
+ }: React.ComponentProps<'main'>): react_jsx_runtime199.JSX.Element;
104
104
  declare function DetailDialogSidebarHeader({
105
105
  className,
106
106
  ...props
107
- }: React.ComponentProps<'div'>): react_jsx_runtime4.JSX.Element;
107
+ }: React.ComponentProps<'div'>): react_jsx_runtime199.JSX.Element;
108
108
  declare function DetailDialogSidebarFooter({
109
109
  className,
110
110
  children,
111
111
  ...props
112
- }: React.ComponentProps<'div'>): react_jsx_runtime4.JSX.Element;
112
+ }: React.ComponentProps<'div'>): react_jsx_runtime199.JSX.Element;
113
113
  declare function DetailDialogSidebarSeparator({
114
114
  className,
115
115
  ...props
116
- }: React.ComponentProps<typeof Separator>): react_jsx_runtime4.JSX.Element;
116
+ }: React.ComponentProps<typeof Separator>): react_jsx_runtime199.JSX.Element;
117
117
  declare function DetailDialogSidebarContent({
118
118
  className,
119
119
  ...props
120
- }: React.ComponentProps<'div'>): react_jsx_runtime4.JSX.Element;
120
+ }: React.ComponentProps<'div'>): react_jsx_runtime199.JSX.Element;
121
121
  declare function DetailDialogSidebarGroup({
122
122
  className,
123
123
  ...props
124
- }: React.ComponentProps<'div'>): react_jsx_runtime4.JSX.Element;
124
+ }: React.ComponentProps<'div'>): react_jsx_runtime199.JSX.Element;
125
125
  declare function DetailDialogSidebarGroupLabel({
126
126
  className,
127
127
  asChild,
128
128
  ...props
129
129
  }: React.ComponentProps<'div'> & {
130
130
  asChild?: boolean;
131
- }): react_jsx_runtime4.JSX.Element;
131
+ }): react_jsx_runtime199.JSX.Element;
132
132
  declare function DetailDialogSidebarGroupAction({
133
133
  className,
134
134
  asChild,
135
135
  ...props
136
136
  }: React.ComponentProps<'button'> & {
137
137
  asChild?: boolean;
138
- }): react_jsx_runtime4.JSX.Element;
138
+ }): react_jsx_runtime199.JSX.Element;
139
139
  declare function DetailDialogSidebarGroupContent({
140
140
  className,
141
141
  ...props
142
- }: React.ComponentProps<'div'>): react_jsx_runtime4.JSX.Element;
142
+ }: React.ComponentProps<'div'>): react_jsx_runtime199.JSX.Element;
143
143
  declare function DetailDialogSidebarMenu({
144
144
  className,
145
145
  ...props
146
- }: React.ComponentProps<'ul'>): react_jsx_runtime4.JSX.Element;
146
+ }: React.ComponentProps<'ul'>): react_jsx_runtime199.JSX.Element;
147
147
  declare function DetailDialogSidebarMenuItem({
148
148
  className,
149
149
  ...props
150
- }: React.ComponentProps<'li'>): react_jsx_runtime4.JSX.Element;
150
+ }: React.ComponentProps<'li'>): react_jsx_runtime199.JSX.Element;
151
151
  declare const sidebarMenuButtonVariants: (props?: ({
152
- variant?: "default" | "outline" | null | undefined;
152
+ variant?: "outline" | "default" | null | undefined;
153
153
  size?: "sm" | "lg" | "default" | null | undefined;
154
- } & class_variance_authority_types0.ClassProp) | undefined) => string;
154
+ } & class_variance_authority_types10.ClassProp) | undefined) => string;
155
155
  declare function DetailDialogSidebarMenuButton({
156
156
  asChild,
157
157
  isActive,
@@ -164,7 +164,7 @@ declare function DetailDialogSidebarMenuButton({
164
164
  asChild?: boolean;
165
165
  isActive?: boolean;
166
166
  tooltip?: string | React.ComponentProps<typeof TooltipContent>;
167
- } & VariantProps<typeof sidebarMenuButtonVariants>): react_jsx_runtime4.JSX.Element;
167
+ } & VariantProps<typeof sidebarMenuButtonVariants>): react_jsx_runtime199.JSX.Element;
168
168
  declare function DetailDialogSidebarMenuAction({
169
169
  className,
170
170
  asChild,
@@ -173,26 +173,26 @@ declare function DetailDialogSidebarMenuAction({
173
173
  }: React.ComponentProps<'button'> & {
174
174
  asChild?: boolean;
175
175
  showOnHover?: boolean;
176
- }): react_jsx_runtime4.JSX.Element;
176
+ }): react_jsx_runtime199.JSX.Element;
177
177
  declare function DetailDialogSidebarMenuBadge({
178
178
  className,
179
179
  ...props
180
- }: React.ComponentProps<'div'>): react_jsx_runtime4.JSX.Element;
180
+ }: React.ComponentProps<'div'>): react_jsx_runtime199.JSX.Element;
181
181
  declare function DetailDialogSidebarMenuSkeleton({
182
182
  className,
183
183
  showIcon,
184
184
  ...props
185
185
  }: React.ComponentProps<'div'> & {
186
186
  showIcon?: boolean;
187
- }): react_jsx_runtime4.JSX.Element;
187
+ }): react_jsx_runtime199.JSX.Element;
188
188
  declare function DetailDialogSidebarMenuSub({
189
189
  className,
190
190
  ...props
191
- }: React.ComponentProps<'ul'>): react_jsx_runtime4.JSX.Element;
191
+ }: React.ComponentProps<'ul'>): react_jsx_runtime199.JSX.Element;
192
192
  declare function DetailDialogSidebarMenuSubItem({
193
193
  className,
194
194
  ...props
195
- }: React.ComponentProps<'li'>): react_jsx_runtime4.JSX.Element;
195
+ }: React.ComponentProps<'li'>): react_jsx_runtime199.JSX.Element;
196
196
  declare function DetailDialogSidebarMenuSubButton({
197
197
  asChild,
198
198
  size,
@@ -203,7 +203,7 @@ declare function DetailDialogSidebarMenuSubButton({
203
203
  asChild?: boolean;
204
204
  size?: 'sm' | 'md';
205
205
  isActive?: boolean;
206
- }): react_jsx_runtime4.JSX.Element;
206
+ }): react_jsx_runtime199.JSX.Element;
207
207
  //#endregion
208
208
  export { DetailDialogSidebarContent, DetailDialogSidebarFooter, DetailDialogSidebarGroup, DetailDialogSidebarGroupAction, DetailDialogSidebarGroupContent, DetailDialogSidebarGroupLabel, DetailDialogSidebarHeader, DetailDialogSidebarMenu, DetailDialogSidebarMenuAction, DetailDialogSidebarMenuBadge, DetailDialogSidebarMenuButton, DetailDialogSidebarMenuItem, DetailDialogSidebarMenuSkeleton, DetailDialogSidebarMenuSub, DetailDialogSidebarMenuSubButton, DetailDialogSidebarMenuSubItem, DetailDialogSidebarRail, DetailDialogSidebarSeparator, DetailDialogSidebarTrigger, Sidebar, SidebarInset, SidebarProvider, useSidebar };
209
209
  //# sourceMappingURL=sidebar.d.mts.map
@@ -1 +1 @@
1
- "use client";import"../../../button.variants-B8KCLWPT.mjs";import"../../../button-DPABon17.mjs";import"../../../skeleton-CZVkWN4p.mjs";import"../../../tooltip-C7UhtrFf.mjs";import"../../../separator-DVI2h_rd.mjs";import"../../../sheet-BRXYSJDv.mjs";import{C as e,S as t,_ as n,a as r,b as i,c as a,d as o,f as s,g as c,h as l,i as u,l as d,m as f,n as p,o as m,p as h,r as g,s as _,t as v,u as y,v as b,x,y as S}from"../../../sidebar-QPaK3ryM.mjs";export{v as DetailDialogSidebarContent,p as DetailDialogSidebarFooter,g as DetailDialogSidebarGroup,u as DetailDialogSidebarGroupAction,r as DetailDialogSidebarGroupContent,m as DetailDialogSidebarGroupLabel,_ as DetailDialogSidebarHeader,a as DetailDialogSidebarMenu,d as DetailDialogSidebarMenuAction,y as DetailDialogSidebarMenuBadge,o as DetailDialogSidebarMenuButton,s as DetailDialogSidebarMenuItem,h as DetailDialogSidebarMenuSkeleton,f as DetailDialogSidebarMenuSub,l as DetailDialogSidebarMenuSubButton,c as DetailDialogSidebarMenuSubItem,n as DetailDialogSidebarRail,b as DetailDialogSidebarSeparator,S as DetailDialogSidebarTrigger,i as Sidebar,x as SidebarInset,t as SidebarProvider,e as useSidebar};
1
+ "use client";import"../../../button.variants-CwcJHcI5.mjs";import"../../../button-Bc8L9sFb.mjs";import"../../../skeleton-BLwzHejl.mjs";import"../../../tooltip-Cy0HbyAx.mjs";import"../../../separator-DXnFHf3v.mjs";import"../../../sheet-GUUifKAd.mjs";import{C as e,S as t,_ as n,a as r,b as i,c as a,d as o,f as s,g as c,h as l,i as u,l as d,m as f,n as p,o as m,p as h,r as g,s as _,t as v,u as y,v as b,x,y as S}from"../../../sidebar-C_jArO1q.mjs";export{v as DetailDialogSidebarContent,p as DetailDialogSidebarFooter,g as DetailDialogSidebarGroup,u as DetailDialogSidebarGroupAction,r as DetailDialogSidebarGroupContent,m as DetailDialogSidebarGroupLabel,_ as DetailDialogSidebarHeader,a as DetailDialogSidebarMenu,d as DetailDialogSidebarMenuAction,y as DetailDialogSidebarMenuBadge,o as DetailDialogSidebarMenuButton,s as DetailDialogSidebarMenuItem,h as DetailDialogSidebarMenuSkeleton,f as DetailDialogSidebarMenuSub,l as DetailDialogSidebarMenuSubButton,c as DetailDialogSidebarMenuSubItem,n as DetailDialogSidebarRail,b as DetailDialogSidebarSeparator,S as DetailDialogSidebarTrigger,i as Sidebar,x as SidebarInset,t as SidebarProvider,e as useSidebar};
@@ -1,2 +1,2 @@
1
- "use client";import"../../button.variants-B8KCLWPT.mjs";import"../../button-DPABon17.mjs";import"../../skeleton-CZVkWN4p.mjs";import{t as e}from"../../flex-zl_w1yeZ.mjs";import{t}from"../../date-C76vNHGL.mjs";import"../../tooltip-C7UhtrFf.mjs";import{Title as n}from"../../typography/title.mjs";import"../../separator-DVI2h_rd.mjs";import"../../sheet-BRXYSJDv.mjs";import{S as r,b as i,c as a,d as o,f as s,n as c,s as l,t as u,y as d}from"../../sidebar-QPaK3ryM.mjs";import{CalendarIcon as f,CatIcon as p,XIcon as m}from"lucide-react";import{useCallback as h}from"react";import{jsx as g,jsxs as _}from"react/jsx-runtime";import{cn as v}from"@customafk/react-toolkit/utils";import{Dialog as y}from"radix-ui";const b=({open:b,isLoading:x,title:S,createdAt:C,onOpenChange:w,sidebar:T,children:E})=>{let{content:D,footer:O}=T||{},k=h(e=>{e.preventDefault(),e.stopPropagation()},[]);return g(y.Root,{"data-slot":`detail-dialog`,open:b,onOpenChange:w,children:_(y.Portal,{"data-slot":`detail-dialog-portal`,children:[g(y.Overlay,{"data-slot":`detail-dialog-overlay`,className:`fixed inset-0 z-50 bg-black/50 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0`}),g(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center`,children:_(y.Content,{"data-slot":`dialog-content`,className:v(`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-80 data-[state=open]:zoom-in-80`,`relative z-50 grid`,`gap-4 overflow-hidden rounded-none border-none bg-background p-0 shadow-dialog outline-none duration-200`,`h-full max-h-dvh w-full max-w-svw`,`sm:rounded-lg`,`sm:max-w-lg`,`md:max-h-[calc(100dvh-2rem)]`,`md:max-w-[calc(100svw-2rem)]`),onInteractOutside:k,children:[_(r,{children:[_(i,{collapsible:`icon`,children:[g(l,{children:g(a,{children:g(s,{children:_(o,{size:`lg`,tabIndex:-1,children:[g(`div`,{className:`flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground`,children:g(p,{size:16})}),_(`div`,{className:`grid flex-1 text-left text-sm leading-tight`,children:[g(`span`,{className:`truncate font-medium`,children:T?.title||`Detail Dialog`}),g(`span`,{className:`truncate text-xs`,children:`Lunas Enterprise`})]})]})})})}),g(u,{children:D}),g(c,{children:O})]}),g(`main`,{"data-slot":`detail-dialog-main`,className:`relative h-full flex-1`,children:_(e,{padding:`none`,gap:`none`,vertical:!0,align:`stretch`,className:`absolute inset-0 size-full`,children:[_(`header`,{className:`flex w-full flex-0 items-start gap-x-2.5 border-b border-border-weak bg-card py-2.5 pr-12 pl-2`,children:[g(d,{}),_(e,{vertical:!0,align:`start`,padding:`none`,width:`null`,wrap:!1,className:`flex-1 gap-0`,children:[g(n,{level:5,className:`line-clamp-1 truncate text-wrap`,children:S||`Detail Dialog`}),!!C&&_(e,{padding:`none`,className:`relative items-center text-text-positive-weak`,children:[g(f,{size:12}),g(t,{showTime:!0,showHoliday:!0,date:C,format:`full`})]})]})]}),x?g(e,{justify:`center`,className:`inset-shadow-sm w-full flex-1 bg-muted-muted`,children:g(`div`,{className:`loader`})}):g(`section`,{"data-slot":`detail-dialog-body`,className:`relative inset-shadow-sm flex flex-1 snap-y flex-col gap-0 overflow-y-auto bg-white`,children:E})]})})]}),g(y.Close,{"data-slot":`dialog-close`,tabIndex:-1,asChild:!0,className:`absolute top-3 right-3`,children:g(`button`,{className:`flex cursor-pointer items-center justify-center rounded-full p-2 text-text-positive-weak transition-colors hover:bg-muted-muted hover:text-text-positive active:bg-muted-weak active:text-text-positive-strong disabled:pointer-events-none disabled:opacity-60`,children:g(m,{size:24})})})]})})]})})};export{b as DetailDialog};
1
+ "use client";import"../../button.variants-CwcJHcI5.mjs";import"../../button-Bc8L9sFb.mjs";import"../../skeleton-BLwzHejl.mjs";import{t as e}from"../../flex-Br7F9Fln.mjs";import{t}from"../../date-D_nB7Lh1.mjs";import"../../tooltip-Cy0HbyAx.mjs";import{Title as n}from"../../typography/title.mjs";import"../../separator-DXnFHf3v.mjs";import"../../sheet-GUUifKAd.mjs";import{S as r,b as i,c as a,d as o,f as s,n as c,s as l,t as u,y as d}from"../../sidebar-C_jArO1q.mjs";import{CalendarIcon as f,CatIcon as p,XIcon as m}from"lucide-react";import{useCallback as h}from"react";import{jsx as g,jsxs as _}from"react/jsx-runtime";import{cn as v}from"@customafk/react-toolkit/utils";import{Dialog as y}from"radix-ui";const b=({open:b,isLoading:x,title:S,createdAt:C,onOpenChange:w,sidebar:T,children:E})=>{let{content:D,footer:O}=T||{},k=h(e=>{e.preventDefault(),e.stopPropagation()},[]);return g(y.Root,{"data-slot":`detail-dialog`,open:b,onOpenChange:w,children:_(y.Portal,{"data-slot":`detail-dialog-portal`,children:[g(y.Overlay,{"data-slot":`detail-dialog-overlay`,className:`fixed inset-0 z-50 bg-black/50 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0`}),g(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center`,children:_(y.Content,{"data-slot":`dialog-content`,className:v(`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-80 data-[state=open]:zoom-in-80`,`relative z-50 grid`,`gap-4 overflow-hidden rounded-none border-none bg-background p-0 shadow-dialog outline-none duration-200`,`h-full max-h-dvh w-full max-w-svw`,`sm:rounded-lg`,`sm:max-w-lg`,`md:max-h-[calc(100dvh-2rem)]`,`md:max-w-[calc(100svw-2rem)]`),onInteractOutside:k,children:[_(r,{children:[_(i,{collapsible:`icon`,children:[g(l,{children:g(a,{children:g(s,{children:_(o,{size:`lg`,tabIndex:-1,children:[g(`div`,{className:`flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground`,children:g(p,{size:16})}),_(`div`,{className:`grid flex-1 text-left text-sm leading-tight`,children:[g(`span`,{className:`truncate font-medium`,children:T?.title||`Detail Dialog`}),g(`span`,{className:`truncate text-xs`,children:`Lunas Enterprise`})]})]})})})}),g(u,{children:D}),g(c,{children:O})]}),g(`main`,{"data-slot":`detail-dialog-main`,className:`relative h-full flex-1`,children:_(e,{padding:`none`,gap:`none`,vertical:!0,align:`stretch`,className:`absolute inset-0 size-full`,children:[_(`header`,{className:`flex w-full flex-0 items-start gap-x-2.5 border-b border-border-weak bg-card py-2.5 pr-12 pl-2`,children:[g(d,{}),_(e,{vertical:!0,align:`start`,padding:`none`,width:`null`,wrap:!1,className:`flex-1 gap-0`,children:[g(n,{level:5,className:`line-clamp-1 truncate text-wrap`,children:S||`Detail Dialog`}),!!C&&_(e,{padding:`none`,className:`relative items-center text-text-positive-weak`,children:[g(f,{size:12}),g(t,{showTime:!0,showHoliday:!0,date:C,format:`full`})]})]})]}),x?g(e,{justify:`center`,className:`inset-shadow-sm w-full flex-1 bg-muted-muted`,children:g(`div`,{className:`loader`})}):g(`section`,{"data-slot":`detail-dialog-body`,className:`relative inset-shadow-sm flex flex-1 snap-y flex-col gap-0 overflow-y-auto bg-white`,children:E})]})})]}),g(y.Close,{"data-slot":`dialog-close`,tabIndex:-1,asChild:!0,className:`absolute top-3 right-3`,children:g(`button`,{className:`flex cursor-pointer items-center justify-center rounded-full p-2 text-text-positive-weak transition-colors hover:bg-muted-muted hover:text-text-positive active:bg-muted-weak active:text-text-positive-strong disabled:pointer-events-none disabled:opacity-60`,children:g(m,{size:24})})})]})})]})})};export{b as DetailDialog};
2
2
  //# sourceMappingURL=index.mjs.map
@@ -1,2 +1,2 @@
1
- "use client";import"../button.variants-B8KCLWPT.mjs";import"../heading-D8K7UGv2.mjs";import"../paragraph-jzLzzEYZ.mjs";import{AlertDialog as e,AlertDialogAction as t,AlertDialogContent as n,AlertDialogFooter as r,AlertDialogHeader as i,AlertDialogTitle as a}from"../ui/alert-dialog.mjs";import{AlertTriangleIcon as o}from"lucide-react";import{useCallback as s}from"react";import{jsx as c,jsxs as l}from"react/jsx-runtime";const u=({open:u,title:d,children:f,onOpenChange:p})=>{let m=s(()=>{p?.(!1)},[p]);return c(e,{open:u,onOpenChange:p,children:l(n,{className:`gap-8 p-4 sm:max-w-md`,children:[c(i,{children:l(`div`,{className:`flex flex-col items-center text-danger`,children:[c(o,{size:42}),c(a,{className:`text-xl font-medium`,children:d||`An error occurred`})]})}),f,c(r,{children:c(t,{className:`w-full sm:w-28`,onClick:m,children:`Close`})})]})})};export{u as ErrorDialog};
1
+ "use client";import"../button.variants-CwcJHcI5.mjs";import"../heading-BnaNuvDS.mjs";import"../paragraph-CnHNC0rS.mjs";import{AlertDialog as e,AlertDialogAction as t,AlertDialogContent as n,AlertDialogFooter as r,AlertDialogHeader as i,AlertDialogTitle as a}from"../ui/alert-dialog.mjs";import{AlertTriangleIcon as o}from"lucide-react";import{useCallback as s}from"react";import{jsx as c,jsxs as l}from"react/jsx-runtime";const u=({open:u,title:d,children:f,onOpenChange:p})=>{let m=s(()=>{p?.(!1)},[p]);return c(e,{open:u,onOpenChange:p,children:l(n,{className:`gap-8 p-4 sm:max-w-md`,children:[c(i,{children:l(`div`,{className:`flex flex-col items-center text-danger`,children:[c(o,{size:42}),c(a,{className:`text-xl font-medium`,children:d||`An error occurred`})]})}),f,c(r,{children:c(t,{className:`w-full sm:w-28`,onClick:m,children:`Close`})})]})})};export{u as ErrorDialog};
2
2
  //# sourceMappingURL=error-dialog.mjs.map
@@ -1,2 +1,2 @@
1
- "use client";import"../heading-D8K7UGv2.mjs";import"../paragraph-jzLzzEYZ.mjs";import"../close-BcOkVqd8.mjs";import{l as e,r as t,t as n}from"../dialog-dqqupmOT.mjs";import{jsx as r,jsxs as i}from"react/jsx-runtime";const a=({open:a,onOpenChange:o})=>r(n,{open:a,onOpenChange:o,children:i(t,{showCloseButton:!1,className:`pointer-events-none border-none bg-transparent shadow-none outline-none [&>div]:bg-transparent`,children:[r(e,{}),r(`div`,{className:`flex items-center justify-center`,children:r(`div`,{className:`loader opacity-60`})})]})});export{a as LoadingDialog};
1
+ "use client";import"../heading-BnaNuvDS.mjs";import"../paragraph-CnHNC0rS.mjs";import"../close-BS6EeCrQ.mjs";import{l as e,r as t,t as n}from"../dialog-DG4vMCr5.mjs";import{jsx as r,jsxs as i}from"react/jsx-runtime";const a=({open:a,onOpenChange:o})=>r(n,{open:a,onOpenChange:o,children:i(t,{showCloseButton:!1,className:`pointer-events-none border-none bg-transparent shadow-none outline-none [&>div]:bg-transparent`,children:[r(e,{}),r(`div`,{className:`flex items-center justify-center`,children:r(`div`,{className:`loader opacity-60`})})]})});export{a as LoadingDialog};
2
2
  //# sourceMappingURL=loading-dialog.mjs.map
@@ -1,2 +1,2 @@
1
1
  import*as e from"react";import{Fragment as t,jsx as n}from"react/jsx-runtime";function r(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function i(...e){return t=>{let n=!1,i=e.map(e=>{let i=r(e,t);return!n&&typeof i==`function`&&(n=!0),i});if(n)return()=>{for(let t=0;t<i.length;t++){let n=i[t];typeof n==`function`?n():r(e[t],null)}}}}function a(t){let r=s(t),i=e.forwardRef((t,i)=>{let{children:a,...o}=t,s=e.Children.toArray(a),c=s.find(l);if(c){let t=c.props.children,a=s.map(n=>n===c?e.Children.count(t)>1?e.Children.only(null):e.isValidElement(t)?t.props.children:null:n);return n(r,{...o,ref:i,children:e.isValidElement(t)?e.cloneElement(t,void 0,a):null})}return n(r,{...o,ref:i,children:a})});return i.displayName=`${t}.Slot`,i}var o=a(`Slot`);function s(t){let n=e.forwardRef((t,n)=>{let{children:r,...a}=t;if(e.isValidElement(r)){let t=d(r),o=u(a,r.props);return r.type!==e.Fragment&&(o.ref=n?i(n,t):t),e.cloneElement(r,o)}return e.Children.count(r)>1?e.Children.only(null):null});return n.displayName=`${t}.SlotClone`,n}var c=Symbol(`radix.slottable`);function l(t){return e.isValidElement(t)&&typeof t.type==`function`&&`__radixId`in t.type&&t.type.__radixId===c}function u(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function d(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}export{o as t};
2
- //# sourceMappingURL=dist-DPEjz4kv.mjs.map
2
+ //# sourceMappingURL=dist-XxWAVHy8.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"dist-DPEjz4kv.mjs","names":[],"sources":["../node_modules/@radix-ui/react-compose-refs/dist/index.mjs","../node_modules/@radix-ui/react-slot/dist/index.mjs"],"sourcesContent":["// packages/react/compose-refs/src/compose-refs.tsx\nimport * as React from \"react\";\nfunction setRef(ref, value) {\n if (typeof ref === \"function\") {\n return ref(value);\n } else if (ref !== null && ref !== void 0) {\n ref.current = value;\n }\n}\nfunction composeRefs(...refs) {\n return (node) => {\n let hasCleanup = false;\n const cleanups = refs.map((ref) => {\n const cleanup = setRef(ref, node);\n if (!hasCleanup && typeof cleanup == \"function\") {\n hasCleanup = true;\n }\n return cleanup;\n });\n if (hasCleanup) {\n return () => {\n for (let i = 0; i < cleanups.length; i++) {\n const cleanup = cleanups[i];\n if (typeof cleanup == \"function\") {\n cleanup();\n } else {\n setRef(refs[i], null);\n }\n }\n };\n }\n };\n}\nfunction useComposedRefs(...refs) {\n return React.useCallback(composeRefs(...refs), refs);\n}\nexport {\n composeRefs,\n useComposedRefs\n};\n//# sourceMappingURL=index.mjs.map\n","// src/slot.tsx\nimport * as React from \"react\";\nimport { composeRefs } from \"@radix-ui/react-compose-refs\";\nimport { Fragment as Fragment2, jsx } from \"react/jsx-runtime\";\n// @__NO_SIDE_EFFECTS__\nfunction createSlot(ownerName) {\n const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);\n const Slot2 = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n const childrenArray = React.Children.toArray(children);\n const slottable = childrenArray.find(isSlottable);\n if (slottable) {\n const newElement = slottable.props.children;\n const newChildren = childrenArray.map((child) => {\n if (child === slottable) {\n if (React.Children.count(newElement) > 1) return React.Children.only(null);\n return React.isValidElement(newElement) ? newElement.props.children : null;\n } else {\n return child;\n }\n });\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });\n }\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });\n });\n Slot2.displayName = `${ownerName}.Slot`;\n return Slot2;\n}\nvar Slot = /* @__PURE__ */ createSlot(\"Slot\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlotClone(ownerName) {\n const SlotClone = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n if (React.isValidElement(children)) {\n const childrenRef = getElementRef(children);\n const props2 = mergeProps(slotProps, children.props);\n if (children.type !== React.Fragment) {\n props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;\n }\n return React.cloneElement(children, props2);\n }\n return React.Children.count(children) > 1 ? React.Children.only(null) : null;\n });\n SlotClone.displayName = `${ownerName}.SlotClone`;\n return SlotClone;\n}\nvar SLOTTABLE_IDENTIFIER = Symbol(\"radix.slottable\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlottable(ownerName) {\n const Slottable2 = ({ children }) => {\n return /* @__PURE__ */ jsx(Fragment2, { children });\n };\n Slottable2.displayName = `${ownerName}.Slottable`;\n Slottable2.__radixId = SLOTTABLE_IDENTIFIER;\n return Slottable2;\n}\nvar Slottable = /* @__PURE__ */ createSlottable(\"Slottable\");\nfunction isSlottable(child) {\n return React.isValidElement(child) && typeof child.type === \"function\" && \"__radixId\" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;\n}\nfunction mergeProps(slotProps, childProps) {\n const overrideProps = { ...childProps };\n for (const propName in childProps) {\n const slotPropValue = slotProps[propName];\n const childPropValue = childProps[propName];\n const isHandler = /^on[A-Z]/.test(propName);\n if (isHandler) {\n if (slotPropValue && childPropValue) {\n overrideProps[propName] = (...args) => {\n const result = childPropValue(...args);\n slotPropValue(...args);\n return result;\n };\n } else if (slotPropValue) {\n overrideProps[propName] = slotPropValue;\n }\n } else if (propName === \"style\") {\n overrideProps[propName] = { ...slotPropValue, ...childPropValue };\n } else if (propName === \"className\") {\n overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(\" \");\n }\n }\n return { ...slotProps, ...overrideProps };\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nexport {\n Slot as Root,\n Slot,\n Slottable,\n createSlot,\n createSlottable\n};\n//# sourceMappingURL=index.mjs.map\n"],"x_google_ignoreList":[0,1],"mappings":"8EAEA,SAAS,EAAO,EAAK,EAAO,CAC1B,GAAI,OAAO,GAAQ,WACjB,OAAO,EAAI,EAAM,CACR,GAAQ,OACjB,EAAI,QAAU,GAGlB,SAAS,EAAY,GAAG,EAAM,CAC5B,MAAQ,IAAS,CACf,IAAI,EAAa,GACX,EAAW,EAAK,IAAK,GAAQ,CACjC,IAAM,EAAU,EAAO,EAAK,EAAK,CAIjC,MAHI,CAAC,GAAc,OAAO,GAAW,aACnC,EAAa,IAER,GACP,CACF,GAAI,EACF,UAAa,CACX,IAAK,IAAI,EAAI,EAAG,EAAI,EAAS,OAAQ,IAAK,CACxC,IAAM,EAAU,EAAS,GACrB,OAAO,GAAW,WACpB,GAAS,CAET,EAAO,EAAK,GAAI,KAAK,ICrBjC,SAAS,EAAW,EAAW,CAC7B,IAAM,EAA4B,EAAgB,EAAU,CACtD,EAAQ,EAAM,YAAY,EAAO,IAAiB,CACtD,GAAM,CAAE,WAAU,GAAG,GAAc,EAC7B,EAAgB,EAAM,SAAS,QAAQ,EAAS,CAChD,EAAY,EAAc,KAAK,EAAY,CACjD,GAAI,EAAW,CACb,IAAM,EAAa,EAAU,MAAM,SAC7B,EAAc,EAAc,IAAK,GACjC,IAAU,EACR,EAAM,SAAS,MAAM,EAAW,CAAG,EAAU,EAAM,SAAS,KAAK,KAAK,CACnE,EAAM,eAAe,EAAW,CAAG,EAAW,MAAM,SAAW,KAE/D,EAET,CACF,OAAuB,EAAI,EAAW,CAAE,GAAG,EAAW,IAAK,EAAc,SAAU,EAAM,eAAe,EAAW,CAAG,EAAM,aAAa,EAAY,IAAK,GAAG,EAAY,CAAG,KAAM,CAAC,CAErL,OAAuB,EAAI,EAAW,CAAE,GAAG,EAAW,IAAK,EAAc,WAAU,CAAC,EACpF,CAEF,MADA,GAAM,YAAc,GAAG,EAAU,OAC1B,EAET,IAAI,EAAuB,EAAW,OAAO,CAE7C,SAAS,EAAgB,EAAW,CAClC,IAAM,EAAY,EAAM,YAAY,EAAO,IAAiB,CAC1D,GAAM,CAAE,WAAU,GAAG,GAAc,EACnC,GAAI,EAAM,eAAe,EAAS,CAAE,CAClC,IAAM,EAAc,EAAc,EAAS,CACrC,EAAS,EAAW,EAAW,EAAS,MAAM,CAIpD,OAHI,EAAS,OAAS,EAAM,WAC1B,EAAO,IAAM,EAAe,EAAY,EAAc,EAAY,CAAG,GAEhE,EAAM,aAAa,EAAU,EAAO,CAE7C,OAAO,EAAM,SAAS,MAAM,EAAS,CAAG,EAAI,EAAM,SAAS,KAAK,KAAK,CAAG,MACxE,CAEF,MADA,GAAU,YAAc,GAAG,EAAU,YAC9B,EAET,IAAI,EAAuB,OAAO,kBAAkB,CAWpD,SAAS,EAAY,EAAO,CAC1B,OAAO,EAAM,eAAe,EAAM,EAAI,OAAO,EAAM,MAAS,YAAc,cAAe,EAAM,MAAQ,EAAM,KAAK,YAAc,EAElI,SAAS,EAAW,EAAW,EAAY,CACzC,IAAM,EAAgB,CAAE,GAAG,EAAY,CACvC,IAAK,IAAM,KAAY,EAAY,CACjC,IAAM,EAAgB,EAAU,GAC1B,EAAiB,EAAW,GAChB,WAAW,KAAK,EAAS,CAErC,GAAiB,EACnB,EAAc,IAAa,GAAG,IAAS,CACrC,IAAM,EAAS,EAAe,GAAG,EAAK,CAEtC,OADA,EAAc,GAAG,EAAK,CACf,GAEA,IACT,EAAc,GAAY,GAEnB,IAAa,QACtB,EAAc,GAAY,CAAE,GAAG,EAAe,GAAG,EAAgB,CACxD,IAAa,cACtB,EAAc,GAAY,CAAC,EAAe,EAAe,CAAC,OAAO,QAAQ,CAAC,KAAK,IAAI,EAGvF,MAAO,CAAE,GAAG,EAAW,GAAG,EAAe,CAE3C,SAAS,EAAc,EAAS,CAC9B,IAAI,EAAS,OAAO,yBAAyB,EAAQ,MAAO,MAAM,EAAE,IAChE,EAAU,GAAU,mBAAoB,GAAU,EAAO,eAS7D,OARI,EACK,EAAQ,KAEjB,EAAS,OAAO,yBAAyB,EAAS,MAAM,EAAE,IAC1D,EAAU,GAAU,mBAAoB,GAAU,EAAO,eACrD,EACK,EAAQ,MAAM,IAEhB,EAAQ,MAAM,KAAO,EAAQ"}
1
+ {"version":3,"file":"dist-XxWAVHy8.mjs","names":[],"sources":["../node_modules/@radix-ui/react-compose-refs/dist/index.mjs","../node_modules/@radix-ui/react-slot/dist/index.mjs"],"sourcesContent":["// packages/react/compose-refs/src/compose-refs.tsx\nimport * as React from \"react\";\nfunction setRef(ref, value) {\n if (typeof ref === \"function\") {\n return ref(value);\n } else if (ref !== null && ref !== void 0) {\n ref.current = value;\n }\n}\nfunction composeRefs(...refs) {\n return (node) => {\n let hasCleanup = false;\n const cleanups = refs.map((ref) => {\n const cleanup = setRef(ref, node);\n if (!hasCleanup && typeof cleanup == \"function\") {\n hasCleanup = true;\n }\n return cleanup;\n });\n if (hasCleanup) {\n return () => {\n for (let i = 0; i < cleanups.length; i++) {\n const cleanup = cleanups[i];\n if (typeof cleanup == \"function\") {\n cleanup();\n } else {\n setRef(refs[i], null);\n }\n }\n };\n }\n };\n}\nfunction useComposedRefs(...refs) {\n return React.useCallback(composeRefs(...refs), refs);\n}\nexport {\n composeRefs,\n useComposedRefs\n};\n//# sourceMappingURL=index.mjs.map\n","// src/slot.tsx\nimport * as React from \"react\";\nimport { composeRefs } from \"@radix-ui/react-compose-refs\";\nimport { Fragment as Fragment2, jsx } from \"react/jsx-runtime\";\n// @__NO_SIDE_EFFECTS__\nfunction createSlot(ownerName) {\n const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);\n const Slot2 = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n const childrenArray = React.Children.toArray(children);\n const slottable = childrenArray.find(isSlottable);\n if (slottable) {\n const newElement = slottable.props.children;\n const newChildren = childrenArray.map((child) => {\n if (child === slottable) {\n if (React.Children.count(newElement) > 1) return React.Children.only(null);\n return React.isValidElement(newElement) ? newElement.props.children : null;\n } else {\n return child;\n }\n });\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });\n }\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });\n });\n Slot2.displayName = `${ownerName}.Slot`;\n return Slot2;\n}\nvar Slot = /* @__PURE__ */ createSlot(\"Slot\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlotClone(ownerName) {\n const SlotClone = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n if (React.isValidElement(children)) {\n const childrenRef = getElementRef(children);\n const props2 = mergeProps(slotProps, children.props);\n if (children.type !== React.Fragment) {\n props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;\n }\n return React.cloneElement(children, props2);\n }\n return React.Children.count(children) > 1 ? React.Children.only(null) : null;\n });\n SlotClone.displayName = `${ownerName}.SlotClone`;\n return SlotClone;\n}\nvar SLOTTABLE_IDENTIFIER = Symbol(\"radix.slottable\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlottable(ownerName) {\n const Slottable2 = ({ children }) => {\n return /* @__PURE__ */ jsx(Fragment2, { children });\n };\n Slottable2.displayName = `${ownerName}.Slottable`;\n Slottable2.__radixId = SLOTTABLE_IDENTIFIER;\n return Slottable2;\n}\nvar Slottable = /* @__PURE__ */ createSlottable(\"Slottable\");\nfunction isSlottable(child) {\n return React.isValidElement(child) && typeof child.type === \"function\" && \"__radixId\" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;\n}\nfunction mergeProps(slotProps, childProps) {\n const overrideProps = { ...childProps };\n for (const propName in childProps) {\n const slotPropValue = slotProps[propName];\n const childPropValue = childProps[propName];\n const isHandler = /^on[A-Z]/.test(propName);\n if (isHandler) {\n if (slotPropValue && childPropValue) {\n overrideProps[propName] = (...args) => {\n const result = childPropValue(...args);\n slotPropValue(...args);\n return result;\n };\n } else if (slotPropValue) {\n overrideProps[propName] = slotPropValue;\n }\n } else if (propName === \"style\") {\n overrideProps[propName] = { ...slotPropValue, ...childPropValue };\n } else if (propName === \"className\") {\n overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(\" \");\n }\n }\n return { ...slotProps, ...overrideProps };\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nexport {\n Slot as Root,\n Slot,\n Slottable,\n createSlot,\n createSlottable\n};\n//# sourceMappingURL=index.mjs.map\n"],"x_google_ignoreList":[0,1],"mappings":"8EAEA,SAAS,EAAO,EAAK,EAAO,CAC1B,GAAI,OAAO,GAAQ,WACjB,OAAO,EAAI,EAAM,CACR,GAAQ,OACjB,EAAI,QAAU,GAGlB,SAAS,EAAY,GAAG,EAAM,CAC5B,MAAQ,IAAS,CACf,IAAI,EAAa,GACX,EAAW,EAAK,IAAK,GAAQ,CACjC,IAAM,EAAU,EAAO,EAAK,EAAK,CAIjC,MAHI,CAAC,GAAc,OAAO,GAAW,aACnC,EAAa,IAER,GACP,CACF,GAAI,EACF,UAAa,CACX,IAAK,IAAI,EAAI,EAAG,EAAI,EAAS,OAAQ,IAAK,CACxC,IAAM,EAAU,EAAS,GACrB,OAAO,GAAW,WACpB,GAAS,CAET,EAAO,EAAK,GAAI,KAAK,ICrBjC,SAAS,EAAW,EAAW,CAC7B,IAAM,EAA4B,EAAgB,EAAU,CACtD,EAAQ,EAAM,YAAY,EAAO,IAAiB,CACtD,GAAM,CAAE,WAAU,GAAG,GAAc,EAC7B,EAAgB,EAAM,SAAS,QAAQ,EAAS,CAChD,EAAY,EAAc,KAAK,EAAY,CACjD,GAAI,EAAW,CACb,IAAM,EAAa,EAAU,MAAM,SAC7B,EAAc,EAAc,IAAK,GACjC,IAAU,EACR,EAAM,SAAS,MAAM,EAAW,CAAG,EAAU,EAAM,SAAS,KAAK,KAAK,CACnE,EAAM,eAAe,EAAW,CAAG,EAAW,MAAM,SAAW,KAE/D,EAET,CACF,OAAuB,EAAI,EAAW,CAAE,GAAG,EAAW,IAAK,EAAc,SAAU,EAAM,eAAe,EAAW,CAAG,EAAM,aAAa,EAAY,IAAK,GAAG,EAAY,CAAG,KAAM,CAAC,CAErL,OAAuB,EAAI,EAAW,CAAE,GAAG,EAAW,IAAK,EAAc,WAAU,CAAC,EACpF,CAEF,MADA,GAAM,YAAc,GAAG,EAAU,OAC1B,EAET,IAAI,EAAuB,EAAW,OAAO,CAE7C,SAAS,EAAgB,EAAW,CAClC,IAAM,EAAY,EAAM,YAAY,EAAO,IAAiB,CAC1D,GAAM,CAAE,WAAU,GAAG,GAAc,EACnC,GAAI,EAAM,eAAe,EAAS,CAAE,CAClC,IAAM,EAAc,EAAc,EAAS,CACrC,EAAS,EAAW,EAAW,EAAS,MAAM,CAIpD,OAHI,EAAS,OAAS,EAAM,WAC1B,EAAO,IAAM,EAAe,EAAY,EAAc,EAAY,CAAG,GAEhE,EAAM,aAAa,EAAU,EAAO,CAE7C,OAAO,EAAM,SAAS,MAAM,EAAS,CAAG,EAAI,EAAM,SAAS,KAAK,KAAK,CAAG,MACxE,CAEF,MADA,GAAU,YAAc,GAAG,EAAU,YAC9B,EAET,IAAI,EAAuB,OAAO,kBAAkB,CAWpD,SAAS,EAAY,EAAO,CAC1B,OAAO,EAAM,eAAe,EAAM,EAAI,OAAO,EAAM,MAAS,YAAc,cAAe,EAAM,MAAQ,EAAM,KAAK,YAAc,EAElI,SAAS,EAAW,EAAW,EAAY,CACzC,IAAM,EAAgB,CAAE,GAAG,EAAY,CACvC,IAAK,IAAM,KAAY,EAAY,CACjC,IAAM,EAAgB,EAAU,GAC1B,EAAiB,EAAW,GAChB,WAAW,KAAK,EAAS,CAErC,GAAiB,EACnB,EAAc,IAAa,GAAG,IAAS,CACrC,IAAM,EAAS,EAAe,GAAG,EAAK,CAEtC,OADA,EAAc,GAAG,EAAK,CACf,GAEA,IACT,EAAc,GAAY,GAEnB,IAAa,QACtB,EAAc,GAAY,CAAE,GAAG,EAAe,GAAG,EAAgB,CACxD,IAAa,cACtB,EAAc,GAAY,CAAC,EAAe,EAAe,CAAC,OAAO,QAAQ,CAAC,KAAK,IAAI,EAGvF,MAAO,CAAE,GAAG,EAAW,GAAG,EAAe,CAE3C,SAAS,EAAc,EAAS,CAC9B,IAAI,EAAS,OAAO,yBAAyB,EAAQ,MAAO,MAAM,EAAE,IAChE,EAAU,GAAU,mBAAoB,GAAU,EAAO,eAS7D,OARI,EACK,EAAQ,KAEjB,EAAS,OAAO,yBAAyB,EAAS,MAAM,EAAE,IAC1D,EAAU,GAAU,mBAAoB,GAAU,EAAO,eACrD,EACK,EAAQ,MAAM,IAEhB,EAAQ,MAAM,KAAO,EAAQ"}