@customafk/lunas-ui 0.2.44 → 0.2.47

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 (620) hide show
  1. package/dist/{alert-BbvPwf2x.mjs → alert-BzBDfGk2.js} +1 -1
  2. package/dist/alert-BzBDfGk2.js.map +1 -0
  3. package/dist/{alert-B02cVKWp.d.cts → alert-CNFuxKp7.d.cts} +6 -6
  4. package/dist/{alert-DHSm8bMn.d.mts → alert-EH6BsbAj.d.ts} +8 -8
  5. package/dist/{avatar-fltdRVsJ.mjs → avatar-Hpj8lmux.js} +1 -1
  6. package/dist/avatar-Hpj8lmux.js.map +1 -0
  7. package/dist/{badge-CDGBGq8X.mjs → badge-CRpRXSuO.js} +1 -1
  8. package/dist/badge-CRpRXSuO.js.map +1 -0
  9. package/dist/{badge-BxSbkHQL.d.mts → badge-Cca0AHjT.d.ts} +7 -7
  10. package/dist/{badge-zrAIDd-9.d.cts → badge-D0JnPurs.d.cts} +7 -7
  11. package/dist/{button-D3d7M90P.d.mts → button-Cr817M3U.d.cts} +6 -6
  12. package/dist/{button-D3QvCdr6.d.cts → button-DuZy_wDo.d.ts} +7 -7
  13. package/dist/button-LMMbL-uH.js +2 -0
  14. package/dist/button-LMMbL-uH.js.map +1 -0
  15. package/dist/{button.variants-DkMqWB8G.mjs → button.variants-CoSpd71B.js} +1 -1
  16. package/dist/button.variants-CoSpd71B.js.map +1 -0
  17. package/dist/calendar-DzPt7b6k.js +2 -0
  18. package/dist/calendar-DzPt7b6k.js.map +1 -0
  19. package/dist/cards/{grid-product-card.d.mts → grid-product-card.d.ts} +1 -1
  20. package/dist/cards/grid-product-card.js +2 -0
  21. package/dist/cards/grid-product-card.js.map +1 -0
  22. package/dist/cards/{product-card.d.mts → product-card.d.ts} +1 -1
  23. package/dist/cards/product-card.js +2 -0
  24. package/dist/cards/product-card.js.map +1 -0
  25. package/dist/cards/{simple-card.d.mts → simple-card.d.ts} +1 -1
  26. package/dist/cards/simple-card.js +2 -0
  27. package/dist/cards/simple-card.js.map +1 -0
  28. package/dist/{checkbox-Cat3i08X.mjs → checkbox-DLGDoU-1.js} +1 -1
  29. package/dist/checkbox-DLGDoU-1.js.map +1 -0
  30. package/dist/{close-_UHFeiLS.mjs → close-C0PdZGxr.js} +1 -1
  31. package/dist/close-C0PdZGxr.js.map +1 -0
  32. package/dist/cms-layout-tPwrgJZc.js +2 -0
  33. package/dist/cms-layout-tPwrgJZc.js.map +1 -0
  34. package/dist/command-2gUejA6g.js +2 -0
  35. package/dist/command-2gUejA6g.js.map +1 -0
  36. package/dist/data-display/{country.d.mts → country.d.ts} +2 -2
  37. package/dist/data-display/country.js +2 -0
  38. package/dist/data-display/country.js.map +1 -0
  39. package/dist/data-display/{data-list.d.mts → data-list.d.ts} +1 -1
  40. package/dist/data-display/{data-list.mjs → data-list.js} +1 -1
  41. package/dist/data-display/data-list.js.map +1 -0
  42. package/dist/data-display/{date-tooltip.d.mts → date-tooltip.d.ts} +1 -1
  43. package/dist/data-display/date-tooltip.js +2 -0
  44. package/dist/data-display/date-tooltip.js.map +1 -0
  45. package/dist/data-display/{date.d.mts → date.d.ts} +1 -1
  46. package/dist/data-display/date.js +1 -0
  47. package/dist/data-display/{empty.d.mts → empty.d.ts} +1 -1
  48. package/dist/data-display/{empty.mjs → empty.js} +1 -1
  49. package/dist/data-display/empty.js.map +1 -0
  50. package/dist/data-display/{name.d.mts → name.d.ts} +1 -1
  51. package/dist/data-display/name.js +2 -0
  52. package/dist/data-display/name.js.map +1 -0
  53. package/dist/data-display/{phone-number.d.mts → phone-number.d.ts} +1 -1
  54. package/dist/data-display/phone-number.js +2 -0
  55. package/dist/data-display/phone-number.js.map +1 -0
  56. package/dist/data-display/{role-badge.d.mts → role-badge.d.ts} +2 -2
  57. package/dist/data-display/role-badge.js +2 -0
  58. package/dist/data-display/role-badge.js.map +1 -0
  59. package/dist/data-display/statistic.d.cts +1 -1
  60. package/dist/data-display/{statistic.d.mts → statistic.d.ts} +7 -7
  61. package/dist/data-display/statistic.js +1 -0
  62. package/dist/data-display/{user.d.mts → user.d.ts} +1 -1
  63. package/dist/data-display/user.js +1 -0
  64. package/dist/{date-fY3sUcLp.mjs → date-BIqCFM1Z.js} +1 -1
  65. package/dist/date-BIqCFM1Z.js.map +1 -0
  66. package/dist/{dialog-Bd5cOZia.d.mts → dialog-C48T3MZN.d.cts} +12 -12
  67. package/dist/{dialog-DEmYNufN.d.cts → dialog-CQygxUtj.d.ts} +12 -12
  68. package/dist/dialog-CmutQ3rp.js +2 -0
  69. package/dist/dialog-CmutQ3rp.js.map +1 -0
  70. package/dist/dialogs/{confirm-dialog.d.mts → confirm-dialog.d.ts} +1 -1
  71. package/dist/dialogs/confirm-dialog.js +2 -0
  72. package/dist/dialogs/confirm-dialog.js.map +1 -0
  73. package/dist/dialogs/detail-dialog/components/sidebar.d.cts +27 -27
  74. package/dist/dialogs/detail-dialog/components/{sidebar.d.mts → sidebar.d.ts} +30 -30
  75. package/dist/dialogs/detail-dialog/components/sidebar.js +1 -0
  76. package/dist/dialogs/detail-dialog/{index.d.mts → index.d.ts} +1 -1
  77. package/dist/dialogs/detail-dialog/index.js +2 -0
  78. package/dist/dialogs/detail-dialog/index.js.map +1 -0
  79. package/dist/dialogs/{error-dialog.d.mts → error-dialog.d.ts} +1 -1
  80. package/dist/dialogs/error-dialog.js +2 -0
  81. package/dist/dialogs/error-dialog.js.map +1 -0
  82. package/dist/dialogs/{loading-dialog.d.mts → loading-dialog.d.ts} +1 -1
  83. package/dist/dialogs/loading-dialog.js +2 -0
  84. package/dist/dialogs/loading-dialog.js.map +1 -0
  85. package/dist/{dist-DVrfqn8H.mjs → dist-EPxjIRJp.js} +1 -1
  86. package/dist/dist-EPxjIRJp.js.map +1 -0
  87. package/dist/{drawer-CMD7JWH8.mjs → drawer-B3qXaN5p.js} +1 -1
  88. package/dist/drawer-B3qXaN5p.js.map +1 -0
  89. package/dist/{dropdown-menu-BWhiVsEf.mjs → dropdown-menu-DeHCVyby.js} +1 -1
  90. package/dist/dropdown-menu-DeHCVyby.js.map +1 -0
  91. package/dist/features/descriptions/index.d.cts +4 -4
  92. package/dist/features/descriptions/{index.d.mts → index.d.ts} +8 -8
  93. package/dist/features/descriptions/index.js +2 -0
  94. package/dist/features/descriptions/index.js.map +1 -0
  95. package/dist/features/search-modal/index.d.cts +2 -2
  96. package/dist/features/search-modal/{index.d.mts → index.d.ts} +3 -3
  97. package/dist/features/search-modal/index.js +1 -0
  98. package/dist/features/tables/index.d.cts +1 -1
  99. package/dist/features/tables/{index.d.mts → index.d.ts} +2 -2
  100. package/dist/features/tables/index.js +1 -0
  101. package/dist/features/tanstack-form/index.cjs +1 -1
  102. package/dist/features/tanstack-form/index.d.cts +2 -2
  103. package/dist/features/tanstack-form/index.d.ts +2 -0
  104. package/dist/features/tanstack-form/index.js +1 -0
  105. package/dist/features/text-editor/index.d.cts +1 -1
  106. package/dist/features/text-editor/{index.d.mts → index.d.ts} +1 -1
  107. package/dist/features/text-editor/index.js +1 -0
  108. package/dist/field-DpoKF1nY.js +2 -0
  109. package/dist/field-DpoKF1nY.js.map +1 -0
  110. package/dist/{flex-B6YSJzGe.mjs → flex-CinRrgEy.js} +1 -1
  111. package/dist/flex-CinRrgEy.js.map +1 -0
  112. package/dist/{heading-De4Pn3mZ.mjs → heading-Bz-hSatD.js} +1 -1
  113. package/dist/heading-Bz-hSatD.js.map +1 -0
  114. package/dist/image-BpTuF_1w.js +2 -0
  115. package/dist/image-BpTuF_1w.js.map +1 -0
  116. package/dist/{index-CiG1i12w.d.cts → index-Bc9X8pLk.d.cts} +7 -7
  117. package/dist/{index-Cm62M0Ft.d.mts → index-BlQGXGqt.d.ts} +1 -1
  118. package/dist/{index-DNozPoRR.d.mts → index-C1O2C-cg.d.ts} +7 -7
  119. package/dist/{index-BhiLHeUb.d.cts → index-CgH0tiiC.d.cts} +30 -30
  120. package/dist/{index-DSciiDhn.d.cts → index-D5u9CKyd.d.cts} +309 -950
  121. package/dist/{index-DriviV-i.d.mts → index-DFUF27Yy.d.ts} +31 -31
  122. package/dist/{index-Cl_7tlH_.d.mts → index-Ilj04YNO.d.ts} +309 -950
  123. package/dist/index.cjs +1 -1
  124. package/dist/index.d.cts +9 -9
  125. package/dist/index.d.ts +93 -0
  126. package/dist/index.js +1 -0
  127. package/dist/{input-BtuZm0BQ.d.mts → input-B_gst0eJ.d.cts} +7 -7
  128. package/dist/{input-CD4zf7t1.d.cts → input-BkHdaXGY.d.ts} +7 -7
  129. package/dist/{input-NJP2wQOm.mjs → input-DAfP6LZ7.js} +1 -1
  130. package/dist/input-DAfP6LZ7.js.map +1 -0
  131. package/dist/{label-CUCpwS5D.mjs → label-B8cAG2kc.js} +1 -1
  132. package/dist/label-B8cAG2kc.js.map +1 -0
  133. package/dist/layouts/cms-layout/index.d.ts +2 -0
  134. package/dist/layouts/cms-layout/index.js +1 -0
  135. package/dist/layouts/flex.d.cts +4 -4
  136. package/dist/layouts/{flex.d.mts → flex.d.ts} +5 -5
  137. package/dist/layouts/flex.js +1 -0
  138. package/dist/layouts/{grid.d.mts → grid.d.ts} +1 -1
  139. package/dist/layouts/{grid.mjs → grid.js} +1 -1
  140. package/dist/layouts/grid.js.map +1 -0
  141. package/dist/layouts/payment-layout/{index.d.mts → index.d.ts} +1 -1
  142. package/dist/layouts/payment-layout/index.js +1 -0
  143. package/dist/pages/FeatureDeveloping.d.cts +2 -2
  144. package/dist/pages/{FeatureDeveloping.d.mts → FeatureDeveloping.d.ts} +3 -3
  145. package/dist/pages/FeatureDeveloping.js +2 -0
  146. package/dist/pages/FeatureDeveloping.js.map +1 -0
  147. package/dist/pages/FeatureFixing.d.cts +2 -2
  148. package/dist/pages/{FeatureFixing.d.mts → FeatureFixing.d.ts} +3 -3
  149. package/dist/pages/FeatureFixing.js +2 -0
  150. package/dist/pages/FeatureFixing.js.map +1 -0
  151. package/dist/pages/LoginPage.d.cts +2 -2
  152. package/dist/pages/{LoginPage.d.mts → LoginPage.d.ts} +3 -3
  153. package/dist/pages/LoginPage.js +2 -0
  154. package/dist/pages/LoginPage.js.map +1 -0
  155. package/dist/pages/NotAuthorized.d.cts +2 -2
  156. package/dist/pages/{NotAuthorized.d.mts → NotAuthorized.d.ts} +3 -3
  157. package/dist/pages/NotAuthorized.js +2 -0
  158. package/dist/pages/NotAuthorized.js.map +1 -0
  159. package/dist/pages/NotFound.d.cts +2 -2
  160. package/dist/pages/{NotFound.d.mts → NotFound.d.ts} +3 -3
  161. package/dist/pages/NotFound.js +2 -0
  162. package/dist/pages/NotFound.js.map +1 -0
  163. package/dist/pages/RegisterPage.d.cts +2 -2
  164. package/dist/pages/{RegisterPage.d.mts → RegisterPage.d.ts} +3 -3
  165. package/dist/pages/RegisterPage.js +2 -0
  166. package/dist/pages/RegisterPage.js.map +1 -0
  167. package/dist/pages/VerifyEmailPage.d.cts +2 -2
  168. package/dist/pages/{VerifyEmailPage.d.mts → VerifyEmailPage.d.ts} +3 -3
  169. package/dist/pages/VerifyEmailPage.js +2 -0
  170. package/dist/pages/VerifyEmailPage.js.map +1 -0
  171. package/dist/{paragraph-DYLaQtTV.mjs → paragraph-Cc13ZI4d.js} +1 -1
  172. package/dist/paragraph-Cc13ZI4d.js.map +1 -0
  173. package/dist/payment-layout-giaGvs8T.js +2 -0
  174. package/dist/payment-layout-giaGvs8T.js.map +1 -0
  175. package/dist/popover-6233wU1s.js +2 -0
  176. package/dist/popover-6233wU1s.js.map +1 -0
  177. package/dist/{progress-CLeM0e7Z.mjs → progress-AYknlEgK.js} +1 -1
  178. package/dist/progress-AYknlEgK.js.map +1 -0
  179. package/dist/{radio-group-Y9bhdr55.mjs → radio-group-ImoBjpqZ.js} +1 -1
  180. package/dist/radio-group-ImoBjpqZ.js.map +1 -0
  181. package/dist/{resizable-CpCaSCFB.mjs → resizable-C-M-mu6b.js} +1 -1
  182. package/dist/resizable-C-M-mu6b.js.map +1 -0
  183. package/dist/search-modal-b2AE5WEW.js +2 -0
  184. package/dist/search-modal-b2AE5WEW.js.map +1 -0
  185. package/dist/{select-LlPCZFSF.mjs → select-CryLzZA0.js} +1 -1
  186. package/dist/select-CryLzZA0.js.map +1 -0
  187. package/dist/{separator-D3Gmkxzq.mjs → separator-BM8hA4DP.js} +1 -1
  188. package/dist/separator-BM8hA4DP.js.map +1 -0
  189. package/dist/{sheet-BFlIfNaA.mjs → sheet-DGXXYgWB.js} +1 -1
  190. package/dist/sheet-DGXXYgWB.js.map +1 -0
  191. package/dist/sidebar-BDrsbzo5.js +2 -0
  192. package/dist/sidebar-BDrsbzo5.js.map +1 -0
  193. package/dist/{skeleton-C51IdOfK.mjs → skeleton-DlRDNM97.js} +1 -1
  194. package/dist/skeleton-DlRDNM97.js.map +1 -0
  195. package/dist/{spinner-eClTgHjk.mjs → spinner-C1eamx3w.js} +1 -1
  196. package/dist/spinner-C1eamx3w.js.map +1 -0
  197. package/dist/{statistic-cwLwcukn.mjs → statistic-CYMqAYNc.js} +1 -1
  198. package/dist/statistic-CYMqAYNc.js.map +1 -0
  199. package/dist/{switch-BP7EPatj.mjs → switch-BLHmdRq2.js} +1 -1
  200. package/dist/switch-BLHmdRq2.js.map +1 -0
  201. package/dist/systems/{google.d.mts → google.d.ts} +1 -1
  202. package/dist/systems/{google.mjs → google.js} +1 -1
  203. package/dist/systems/google.js.map +1 -0
  204. package/dist/tables-DWQytYNm.js +4 -0
  205. package/dist/tables-DWQytYNm.js.map +1 -0
  206. package/dist/tanstack-form-CCDV-3Ml.js +12 -0
  207. package/dist/tanstack-form-CCDV-3Ml.js.map +1 -0
  208. package/dist/{tanstack-form-DatI41wz.cjs → tanstack-form-DoI86Ezs.cjs} +2 -2
  209. package/dist/{tanstack-form-DatI41wz.cjs.map → tanstack-form-DoI86Ezs.cjs.map} +1 -1
  210. package/dist/text-editor-WbS7pJJs.js +2 -0
  211. package/dist/text-editor-WbS7pJJs.js.map +1 -0
  212. package/dist/{textarea-7HDXcaK9.mjs → textarea-Bp6VvhiA.js} +1 -1
  213. package/dist/textarea-Bp6VvhiA.js.map +1 -0
  214. package/dist/{tooltip-Dxl5Wa8i.mjs → tooltip-CVIl6Hln.js} +1 -1
  215. package/dist/tooltip-CVIl6Hln.js.map +1 -0
  216. package/dist/{types-YLu40dXY.d.mts → types-BVSfF-1o.d.ts} +1 -1
  217. package/dist/{types-B5nyTWtO.mjs → types-BZqffRVJ.js} +1 -1
  218. package/dist/types-BZqffRVJ.js.map +1 -0
  219. package/dist/typography/paragraph.d.cts +5 -5
  220. package/dist/typography/{paragraph.d.mts → paragraph.d.ts} +6 -6
  221. package/dist/typography/paragraph.js +1 -0
  222. package/dist/typography/{title.d.mts → title.d.ts} +1 -1
  223. package/dist/typography/{title.mjs → title.js} +1 -1
  224. package/dist/typography/title.js.map +1 -0
  225. package/dist/ui/alert-dialog.d.cts +12 -12
  226. package/dist/ui/{alert-dialog.d.mts → alert-dialog.d.ts} +13 -13
  227. package/dist/ui/alert-dialog.js +2 -0
  228. package/dist/ui/alert-dialog.js.map +1 -0
  229. package/dist/ui/alert.d.cts +1 -1
  230. package/dist/ui/{alert.d.mts → alert.d.ts} +1 -1
  231. package/dist/ui/alert.js +1 -0
  232. package/dist/ui/aspect-ratio.d.cts +2 -2
  233. package/dist/ui/{aspect-ratio.d.mts → aspect-ratio.d.ts} +3 -3
  234. package/dist/ui/{aspect-ratio.mjs → aspect-ratio.js} +1 -1
  235. package/dist/ui/aspect-ratio.js.map +1 -0
  236. package/dist/ui/avatar.d.cts +4 -4
  237. package/dist/ui/{avatar.d.mts → avatar.d.ts} +5 -5
  238. package/dist/ui/avatar.js +1 -0
  239. package/dist/ui/badge.d.cts +1 -1
  240. package/dist/ui/badge.d.ts +2 -0
  241. package/dist/ui/badge.js +1 -0
  242. package/dist/ui/breadcrumb.d.cts +8 -8
  243. package/dist/ui/{breadcrumb.d.mts → breadcrumb.d.ts} +9 -9
  244. package/dist/ui/breadcrumb.js +2 -0
  245. package/dist/ui/breadcrumb.js.map +1 -0
  246. package/dist/ui/button-group.d.cts +6 -6
  247. package/dist/ui/{button-group.d.mts → button-group.d.ts} +8 -8
  248. package/dist/ui/button-group.js +2 -0
  249. package/dist/ui/button-group.js.map +1 -0
  250. package/dist/ui/button.d.cts +1 -1
  251. package/dist/ui/button.d.ts +2 -0
  252. package/dist/ui/button.js +1 -0
  253. package/dist/ui/buttons/{add-new.d.mts → add-new.d.ts} +1 -1
  254. package/dist/ui/buttons/add-new.js +2 -0
  255. package/dist/ui/buttons/add-new.js.map +1 -0
  256. package/dist/ui/buttons/{edit.d.mts → edit.d.ts} +1 -1
  257. package/dist/ui/buttons/edit.js +2 -0
  258. package/dist/ui/buttons/edit.js.map +1 -0
  259. package/dist/ui/buttons/{refresh.d.mts → refresh.d.ts} +1 -1
  260. package/dist/ui/buttons/refresh.js +2 -0
  261. package/dist/ui/buttons/refresh.js.map +1 -0
  262. package/dist/ui/buttons/{trash.d.mts → trash.d.ts} +1 -1
  263. package/dist/ui/buttons/trash.js +2 -0
  264. package/dist/ui/buttons/trash.js.map +1 -0
  265. package/dist/ui/buttons/{upload-image.d.mts → upload-image.d.ts} +1 -1
  266. package/dist/ui/buttons/upload-image.js +2 -0
  267. package/dist/ui/buttons/upload-image.js.map +1 -0
  268. package/dist/ui/calendar.d.cts +4 -4
  269. package/dist/ui/{calendar.d.mts → calendar.d.ts} +5 -5
  270. package/dist/ui/calendar.js +1 -0
  271. package/dist/ui/card.d.cts +8 -8
  272. package/dist/ui/{card.d.mts → card.d.ts} +9 -9
  273. package/dist/ui/card.js +2 -0
  274. package/dist/ui/card.js.map +1 -0
  275. package/dist/ui/carousel.d.cts +7 -7
  276. package/dist/ui/{carousel.d.mts → carousel.d.ts} +8 -8
  277. package/dist/ui/carousel.js +2 -0
  278. package/dist/ui/carousel.js.map +1 -0
  279. package/dist/ui/checkbox.d.cts +2 -2
  280. package/dist/ui/{checkbox.d.mts → checkbox.d.ts} +3 -3
  281. package/dist/ui/checkbox.js +1 -0
  282. package/dist/ui/collapsible.d.cts +4 -4
  283. package/dist/ui/{collapsible.d.mts → collapsible.d.ts} +5 -5
  284. package/dist/ui/{collapsible.mjs → collapsible.js} +1 -1
  285. package/dist/ui/collapsible.js.map +1 -0
  286. package/dist/ui/command.d.cts +11 -11
  287. package/dist/ui/{command.d.mts → command.d.ts} +12 -12
  288. package/dist/ui/command.js +1 -0
  289. package/dist/ui/context-menu.d.cts +16 -16
  290. package/dist/ui/{context-menu.d.mts → context-menu.d.ts} +17 -17
  291. package/dist/ui/{context-menu.mjs → context-menu.js} +1 -1
  292. package/dist/ui/context-menu.js.map +1 -0
  293. package/dist/ui/dialog.d.cts +1 -1
  294. package/dist/ui/{dialog.d.mts → dialog.d.ts} +1 -1
  295. package/dist/ui/dialog.js +1 -0
  296. package/dist/ui/drawer.d.cts +11 -11
  297. package/dist/ui/{drawer.d.mts → drawer.d.ts} +12 -12
  298. package/dist/ui/drawer.js +1 -0
  299. package/dist/ui/dropdown-menu.d.cts +16 -16
  300. package/dist/ui/{dropdown-menu.d.mts → dropdown-menu.d.ts} +17 -17
  301. package/dist/ui/dropdown-menu.js +1 -0
  302. package/dist/ui/empty.d.cts +9 -9
  303. package/dist/ui/{empty.d.mts → empty.d.ts} +10 -10
  304. package/dist/ui/{empty.mjs → empty.js} +1 -1
  305. package/dist/ui/empty.js.map +1 -0
  306. package/dist/ui/field.d.cts +23 -23
  307. package/dist/ui/field.d.ts +65 -0
  308. package/dist/ui/field.js +1 -0
  309. package/dist/ui/file-uploader.d.cts +2 -2
  310. package/dist/ui/{file-uploader.d.mts → file-uploader.d.ts} +3 -3
  311. package/dist/ui/file-uploader.js +3 -0
  312. package/dist/ui/file-uploader.js.map +1 -0
  313. package/dist/ui/form.d.cts +10 -10
  314. package/dist/ui/{form.d.mts → form.d.ts} +11 -11
  315. package/dist/ui/form.js +2 -0
  316. package/dist/ui/form.js.map +1 -0
  317. package/dist/ui/hover-card.d.cts +4 -4
  318. package/dist/ui/{hover-card.d.mts → hover-card.d.ts} +5 -5
  319. package/dist/ui/{hover-card.mjs → hover-card.js} +1 -1
  320. package/dist/ui/hover-card.js.map +1 -0
  321. package/dist/ui/{image.d.mts → image.d.ts} +1 -1
  322. package/dist/ui/image.js +1 -0
  323. package/dist/ui/input-otp.d.cts +5 -5
  324. package/dist/ui/{input-otp.d.mts → input-otp.d.ts} +6 -6
  325. package/dist/ui/{input-otp.mjs → input-otp.js} +1 -1
  326. package/dist/ui/input-otp.js.map +1 -0
  327. package/dist/ui/input.d.cts +1 -1
  328. package/dist/ui/input.d.ts +2 -0
  329. package/dist/ui/input.js +1 -0
  330. package/dist/ui/inputs/search-input.d.cts +3 -3
  331. package/dist/ui/inputs/{search-input.d.mts → search-input.d.ts} +4 -4
  332. package/dist/ui/inputs/search-input.js +2 -0
  333. package/dist/ui/inputs/search-input.js.map +1 -0
  334. package/dist/ui/item.d.cts +16 -16
  335. package/dist/ui/{item.d.mts → item.d.ts} +18 -18
  336. package/dist/ui/item.js +2 -0
  337. package/dist/ui/item.js.map +1 -0
  338. package/dist/ui/label.d.cts +2 -2
  339. package/dist/ui/{label.d.mts → label.d.ts} +3 -3
  340. package/dist/ui/label.js +1 -0
  341. package/dist/ui/menubar.d.cts +17 -17
  342. package/dist/ui/{menubar.d.mts → menubar.d.ts} +18 -18
  343. package/dist/ui/{menubar.mjs → menubar.js} +1 -1
  344. package/dist/ui/menubar.js.map +1 -0
  345. package/dist/ui/multi-select.d.cts +2 -2
  346. package/dist/ui/{multi-select.d.mts → multi-select.d.ts} +5 -5
  347. package/dist/ui/multi-select.js +2 -0
  348. package/dist/ui/multi-select.js.map +1 -0
  349. package/dist/ui/navigation-menu.d.cts +11 -11
  350. package/dist/ui/{navigation-menu.d.mts → navigation-menu.d.ts} +12 -12
  351. package/dist/ui/{navigation-menu.mjs → navigation-menu.js} +1 -1
  352. package/dist/ui/navigation-menu.js.map +1 -0
  353. package/dist/ui/pagination.d.cts +9 -9
  354. package/dist/ui/{pagination.d.mts → pagination.d.ts} +10 -10
  355. package/dist/ui/pagination.js +2 -0
  356. package/dist/ui/pagination.js.map +1 -0
  357. package/dist/ui/popover.d.cts +6 -6
  358. package/dist/ui/{popover.d.mts → popover.d.ts} +7 -7
  359. package/dist/ui/popover.js +1 -0
  360. package/dist/ui/progress.d.cts +2 -2
  361. package/dist/ui/{progress.d.mts → progress.d.ts} +3 -3
  362. package/dist/ui/progress.js +1 -0
  363. package/dist/ui/radio-group.d.cts +3 -3
  364. package/dist/ui/{radio-group.d.mts → radio-group.d.ts} +4 -4
  365. package/dist/ui/radio-group.js +1 -0
  366. package/dist/ui/resizable.d.cts +9 -9
  367. package/dist/ui/{resizable.d.mts → resizable.d.ts} +10 -10
  368. package/dist/ui/resizable.js +1 -0
  369. package/dist/ui/scroll-area.d.cts +5 -5
  370. package/dist/ui/{scroll-area.d.mts → scroll-area.d.ts} +6 -6
  371. package/dist/ui/{scroll-area.mjs → scroll-area.js} +1 -1
  372. package/dist/ui/scroll-area.js.map +1 -0
  373. package/dist/ui/select.d.cts +9 -9
  374. package/dist/ui/{select.d.mts → select.d.ts} +10 -10
  375. package/dist/ui/select.js +1 -0
  376. package/dist/ui/separator.d.cts +2 -2
  377. package/dist/ui/{separator.d.mts → separator.d.ts} +3 -3
  378. package/dist/ui/separator.js +1 -0
  379. package/dist/ui/sheet.d.cts +9 -9
  380. package/dist/ui/{sheet.d.mts → sheet.d.ts} +10 -10
  381. package/dist/ui/sheet.js +1 -0
  382. package/dist/ui/skeleton.d.cts +2 -2
  383. package/dist/ui/{skeleton.d.mts → skeleton.d.ts} +3 -3
  384. package/dist/ui/skeleton.js +1 -0
  385. package/dist/ui/slider.d.cts +2 -2
  386. package/dist/ui/{slider.d.mts → slider.d.ts} +3 -3
  387. package/dist/ui/{slider.mjs → slider.js} +1 -1
  388. package/dist/ui/slider.js.map +1 -0
  389. package/dist/ui/sonner.d.cts +2 -2
  390. package/dist/ui/{sonner.d.mts → sonner.d.ts} +3 -3
  391. package/dist/ui/{sonner.mjs → sonner.js} +1 -1
  392. package/dist/ui/sonner.js.map +1 -0
  393. package/dist/ui/spinner.d.cts +2 -2
  394. package/dist/ui/{spinner.d.mts → spinner.d.ts} +3 -3
  395. package/dist/ui/spinner.js +1 -0
  396. package/dist/ui/switch.d.cts +2 -2
  397. package/dist/ui/{switch.d.mts → switch.d.ts} +3 -3
  398. package/dist/ui/switch.js +1 -0
  399. package/dist/ui/table.d.cts +17 -17
  400. package/dist/ui/{table.d.mts → table.d.ts} +18 -18
  401. package/dist/ui/{table.mjs → table.js} +1 -1
  402. package/dist/ui/table.js.map +1 -0
  403. package/dist/ui/tabs.d.cts +5 -5
  404. package/dist/ui/{tabs.d.mts → tabs.d.ts} +6 -6
  405. package/dist/ui/{tabs.mjs → tabs.js} +1 -1
  406. package/dist/ui/tabs.js.map +1 -0
  407. package/dist/ui/textarea.d.cts +2 -2
  408. package/dist/ui/{textarea.d.mts → textarea.d.ts} +3 -3
  409. package/dist/ui/textarea.js +1 -0
  410. package/dist/ui/toggle-group.d.cts +3 -3
  411. package/dist/ui/{toggle-group.d.mts → toggle-group.d.ts} +5 -5
  412. package/dist/ui/toggle-group.js +2 -0
  413. package/dist/ui/toggle-group.js.map +1 -0
  414. package/dist/ui/toggle.d.cts +5 -5
  415. package/dist/ui/{toggle.d.mts → toggle.d.ts} +4 -4
  416. package/dist/ui/{toggle.mjs → toggle.js} +1 -1
  417. package/dist/ui/toggle.js.map +1 -0
  418. package/dist/ui/tooltip.d.cts +5 -5
  419. package/dist/ui/{tooltip.d.mts → tooltip.d.ts} +6 -6
  420. package/dist/ui/tooltip.js +1 -0
  421. package/dist/user-BSpgswEC.js +2 -0
  422. package/dist/user-BSpgswEC.js.map +1 -0
  423. package/package.json +97 -97
  424. package/dist/alert-BbvPwf2x.mjs.map +0 -1
  425. package/dist/avatar-fltdRVsJ.mjs.map +0 -1
  426. package/dist/badge-CDGBGq8X.mjs.map +0 -1
  427. package/dist/button-CCVJTHBI.mjs +0 -2
  428. package/dist/button-CCVJTHBI.mjs.map +0 -1
  429. package/dist/button.variants-DkMqWB8G.mjs.map +0 -1
  430. package/dist/calendar-R866yyd1.mjs +0 -2
  431. package/dist/calendar-R866yyd1.mjs.map +0 -1
  432. package/dist/cards/grid-product-card.mjs +0 -2
  433. package/dist/cards/grid-product-card.mjs.map +0 -1
  434. package/dist/cards/product-card.mjs +0 -2
  435. package/dist/cards/product-card.mjs.map +0 -1
  436. package/dist/cards/simple-card.mjs +0 -2
  437. package/dist/cards/simple-card.mjs.map +0 -1
  438. package/dist/checkbox-Cat3i08X.mjs.map +0 -1
  439. package/dist/close-_UHFeiLS.mjs.map +0 -1
  440. package/dist/cms-layout-DkCR1AfG.mjs +0 -2
  441. package/dist/cms-layout-DkCR1AfG.mjs.map +0 -1
  442. package/dist/command-D6_CSbwJ.mjs +0 -2
  443. package/dist/command-D6_CSbwJ.mjs.map +0 -1
  444. package/dist/data-display/country.mjs +0 -2
  445. package/dist/data-display/country.mjs.map +0 -1
  446. package/dist/data-display/data-list.mjs.map +0 -1
  447. package/dist/data-display/date-tooltip.mjs +0 -2
  448. package/dist/data-display/date-tooltip.mjs.map +0 -1
  449. package/dist/data-display/date.mjs +0 -1
  450. package/dist/data-display/empty.mjs.map +0 -1
  451. package/dist/data-display/name.mjs +0 -2
  452. package/dist/data-display/name.mjs.map +0 -1
  453. package/dist/data-display/phone-number.mjs +0 -2
  454. package/dist/data-display/phone-number.mjs.map +0 -1
  455. package/dist/data-display/role-badge.mjs +0 -2
  456. package/dist/data-display/role-badge.mjs.map +0 -1
  457. package/dist/data-display/statistic.mjs +0 -1
  458. package/dist/data-display/user.mjs +0 -1
  459. package/dist/date-fY3sUcLp.mjs.map +0 -1
  460. package/dist/dialog-CLDnvNH_.mjs +0 -2
  461. package/dist/dialog-CLDnvNH_.mjs.map +0 -1
  462. package/dist/dialogs/confirm-dialog.mjs +0 -2
  463. package/dist/dialogs/confirm-dialog.mjs.map +0 -1
  464. package/dist/dialogs/detail-dialog/components/sidebar.mjs +0 -1
  465. package/dist/dialogs/detail-dialog/index.mjs +0 -2
  466. package/dist/dialogs/detail-dialog/index.mjs.map +0 -1
  467. package/dist/dialogs/error-dialog.mjs +0 -2
  468. package/dist/dialogs/error-dialog.mjs.map +0 -1
  469. package/dist/dialogs/loading-dialog.mjs +0 -2
  470. package/dist/dialogs/loading-dialog.mjs.map +0 -1
  471. package/dist/dist-DVrfqn8H.mjs.map +0 -1
  472. package/dist/drawer-CMD7JWH8.mjs.map +0 -1
  473. package/dist/dropdown-menu-BWhiVsEf.mjs.map +0 -1
  474. package/dist/features/descriptions/index.mjs +0 -2
  475. package/dist/features/descriptions/index.mjs.map +0 -1
  476. package/dist/features/search-modal/index.mjs +0 -1
  477. package/dist/features/tables/index.mjs +0 -1
  478. package/dist/features/tanstack-form/index.d.mts +0 -2
  479. package/dist/features/tanstack-form/index.mjs +0 -1
  480. package/dist/features/text-editor/index.mjs +0 -1
  481. package/dist/field-dYemS0hQ.mjs +0 -2
  482. package/dist/field-dYemS0hQ.mjs.map +0 -1
  483. package/dist/flex-B6YSJzGe.mjs.map +0 -1
  484. package/dist/heading-De4Pn3mZ.mjs.map +0 -1
  485. package/dist/image-D7OZ13Ib.mjs +0 -2
  486. package/dist/image-D7OZ13Ib.mjs.map +0 -1
  487. package/dist/index.d.mts +0 -93
  488. package/dist/index.mjs +0 -1
  489. package/dist/input-NJP2wQOm.mjs.map +0 -1
  490. package/dist/label-CUCpwS5D.mjs.map +0 -1
  491. package/dist/layouts/cms-layout/index.d.mts +0 -2
  492. package/dist/layouts/cms-layout/index.mjs +0 -1
  493. package/dist/layouts/flex.mjs +0 -1
  494. package/dist/layouts/grid.mjs.map +0 -1
  495. package/dist/layouts/payment-layout/index.mjs +0 -1
  496. package/dist/pages/FeatureDeveloping.mjs +0 -2
  497. package/dist/pages/FeatureDeveloping.mjs.map +0 -1
  498. package/dist/pages/FeatureFixing.mjs +0 -2
  499. package/dist/pages/FeatureFixing.mjs.map +0 -1
  500. package/dist/pages/LoginPage.mjs +0 -2
  501. package/dist/pages/LoginPage.mjs.map +0 -1
  502. package/dist/pages/NotAuthorized.mjs +0 -2
  503. package/dist/pages/NotAuthorized.mjs.map +0 -1
  504. package/dist/pages/NotFound.mjs +0 -2
  505. package/dist/pages/NotFound.mjs.map +0 -1
  506. package/dist/pages/RegisterPage.mjs +0 -2
  507. package/dist/pages/RegisterPage.mjs.map +0 -1
  508. package/dist/pages/VerifyEmailPage.mjs +0 -2
  509. package/dist/pages/VerifyEmailPage.mjs.map +0 -1
  510. package/dist/paragraph-DYLaQtTV.mjs.map +0 -1
  511. package/dist/payment-layout-DrQ0kZPX.mjs +0 -2
  512. package/dist/payment-layout-DrQ0kZPX.mjs.map +0 -1
  513. package/dist/popover-C8rcemA3.mjs +0 -2
  514. package/dist/popover-C8rcemA3.mjs.map +0 -1
  515. package/dist/progress-CLeM0e7Z.mjs.map +0 -1
  516. package/dist/radio-group-Y9bhdr55.mjs.map +0 -1
  517. package/dist/resizable-CpCaSCFB.mjs.map +0 -1
  518. package/dist/search-modal-Bn-GOOCy.mjs +0 -2
  519. package/dist/search-modal-Bn-GOOCy.mjs.map +0 -1
  520. package/dist/select-LlPCZFSF.mjs.map +0 -1
  521. package/dist/separator-D3Gmkxzq.mjs.map +0 -1
  522. package/dist/sheet-BFlIfNaA.mjs.map +0 -1
  523. package/dist/sidebar-ChtCyu-n.mjs +0 -2
  524. package/dist/sidebar-ChtCyu-n.mjs.map +0 -1
  525. package/dist/skeleton-C51IdOfK.mjs.map +0 -1
  526. package/dist/spinner-eClTgHjk.mjs.map +0 -1
  527. package/dist/statistic-cwLwcukn.mjs.map +0 -1
  528. package/dist/switch-BP7EPatj.mjs.map +0 -1
  529. package/dist/systems/google.mjs.map +0 -1
  530. package/dist/tables-CFrsk2lM.mjs +0 -4
  531. package/dist/tables-CFrsk2lM.mjs.map +0 -1
  532. package/dist/tanstack-form-DT1TqIDl.mjs +0 -12
  533. package/dist/tanstack-form-DT1TqIDl.mjs.map +0 -1
  534. package/dist/text-editor-5mA7XyaI.mjs +0 -2
  535. package/dist/text-editor-5mA7XyaI.mjs.map +0 -1
  536. package/dist/textarea-7HDXcaK9.mjs.map +0 -1
  537. package/dist/tooltip-Dxl5Wa8i.mjs.map +0 -1
  538. package/dist/types-B5nyTWtO.mjs.map +0 -1
  539. package/dist/typography/paragraph.mjs +0 -1
  540. package/dist/typography/title.mjs.map +0 -1
  541. package/dist/ui/alert-dialog.mjs +0 -2
  542. package/dist/ui/alert-dialog.mjs.map +0 -1
  543. package/dist/ui/alert.mjs +0 -1
  544. package/dist/ui/aspect-ratio.mjs.map +0 -1
  545. package/dist/ui/avatar.mjs +0 -1
  546. package/dist/ui/badge.d.mts +0 -2
  547. package/dist/ui/badge.mjs +0 -1
  548. package/dist/ui/breadcrumb.mjs +0 -2
  549. package/dist/ui/breadcrumb.mjs.map +0 -1
  550. package/dist/ui/button-group.mjs +0 -2
  551. package/dist/ui/button-group.mjs.map +0 -1
  552. package/dist/ui/button.d.mts +0 -2
  553. package/dist/ui/button.mjs +0 -1
  554. package/dist/ui/buttons/add-new.mjs +0 -2
  555. package/dist/ui/buttons/add-new.mjs.map +0 -1
  556. package/dist/ui/buttons/edit.mjs +0 -2
  557. package/dist/ui/buttons/edit.mjs.map +0 -1
  558. package/dist/ui/buttons/refresh.mjs +0 -2
  559. package/dist/ui/buttons/refresh.mjs.map +0 -1
  560. package/dist/ui/buttons/trash.mjs +0 -2
  561. package/dist/ui/buttons/trash.mjs.map +0 -1
  562. package/dist/ui/buttons/upload-image.mjs +0 -2
  563. package/dist/ui/buttons/upload-image.mjs.map +0 -1
  564. package/dist/ui/calendar.mjs +0 -1
  565. package/dist/ui/card.mjs +0 -2
  566. package/dist/ui/card.mjs.map +0 -1
  567. package/dist/ui/carousel.mjs +0 -2
  568. package/dist/ui/carousel.mjs.map +0 -1
  569. package/dist/ui/checkbox.mjs +0 -1
  570. package/dist/ui/collapsible.mjs.map +0 -1
  571. package/dist/ui/command.mjs +0 -1
  572. package/dist/ui/context-menu.mjs.map +0 -1
  573. package/dist/ui/dialog.mjs +0 -1
  574. package/dist/ui/drawer.mjs +0 -1
  575. package/dist/ui/dropdown-menu.mjs +0 -1
  576. package/dist/ui/empty.mjs.map +0 -1
  577. package/dist/ui/field.d.mts +0 -65
  578. package/dist/ui/field.mjs +0 -1
  579. package/dist/ui/file-uploader.mjs +0 -3
  580. package/dist/ui/file-uploader.mjs.map +0 -1
  581. package/dist/ui/form.mjs +0 -2
  582. package/dist/ui/form.mjs.map +0 -1
  583. package/dist/ui/hover-card.mjs.map +0 -1
  584. package/dist/ui/image.mjs +0 -1
  585. package/dist/ui/input-otp.mjs.map +0 -1
  586. package/dist/ui/input.d.mts +0 -2
  587. package/dist/ui/input.mjs +0 -1
  588. package/dist/ui/inputs/search-input.mjs +0 -2
  589. package/dist/ui/inputs/search-input.mjs.map +0 -1
  590. package/dist/ui/item.mjs +0 -2
  591. package/dist/ui/item.mjs.map +0 -1
  592. package/dist/ui/label.mjs +0 -1
  593. package/dist/ui/menubar.mjs.map +0 -1
  594. package/dist/ui/multi-select.mjs +0 -2
  595. package/dist/ui/multi-select.mjs.map +0 -1
  596. package/dist/ui/navigation-menu.mjs.map +0 -1
  597. package/dist/ui/pagination.mjs +0 -2
  598. package/dist/ui/pagination.mjs.map +0 -1
  599. package/dist/ui/popover.mjs +0 -1
  600. package/dist/ui/progress.mjs +0 -1
  601. package/dist/ui/radio-group.mjs +0 -1
  602. package/dist/ui/resizable.mjs +0 -1
  603. package/dist/ui/scroll-area.mjs.map +0 -1
  604. package/dist/ui/select.mjs +0 -1
  605. package/dist/ui/separator.mjs +0 -1
  606. package/dist/ui/sheet.mjs +0 -1
  607. package/dist/ui/skeleton.mjs +0 -1
  608. package/dist/ui/slider.mjs.map +0 -1
  609. package/dist/ui/sonner.mjs.map +0 -1
  610. package/dist/ui/spinner.mjs +0 -1
  611. package/dist/ui/switch.mjs +0 -1
  612. package/dist/ui/table.mjs.map +0 -1
  613. package/dist/ui/tabs.mjs.map +0 -1
  614. package/dist/ui/textarea.mjs +0 -1
  615. package/dist/ui/toggle-group.mjs +0 -2
  616. package/dist/ui/toggle-group.mjs.map +0 -1
  617. package/dist/ui/toggle.mjs.map +0 -1
  618. package/dist/ui/tooltip.mjs +0 -1
  619. package/dist/user-DtZy4P9d.mjs +0 -2
  620. package/dist/user-DtZy4P9d.mjs.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-uploader.js","names":[],"sources":["../../packages/components/ui/file-uploader.tsx"],"sourcesContent":["'use client';\nimport { useCallback, useEffect } from 'react';\nimport Dropzone, { type DropzoneProps, type FileRejection } from 'react-dropzone';\nimport { useControllableState } from '@customafk/react-toolkit/hooks/useControllableState';\nimport { cn, formatBytes } from '@customafk/react-toolkit/utils';\n\nimport { FileText, Image, Trash2, Upload } from 'lucide-react';\nimport { toast } from 'sonner';\n\nimport { Button } from '@/components/ui/button';\nimport { Progress } from '@/components/ui/progress';\n\n/**\n * Props for the FileUploader component.\n *\n * @example\n * ```tsx\n * import { FileUploader } from '@customafk/lunas-ui/ui/file-uploader';\n *\n * <FileUploader\n * accept={{ 'image/*': [] }}\n * maxSize={1024 * 1024 * 5}\n * maxFileCount={3}\n * multiple\n * onUpload={async (files) => { await uploadFiles(files); }}\n * />\n * ```\n */\ninterface FileUploaderProps extends React.HTMLAttributes<HTMLDivElement> {\n /**\n * Value of the uploader.\n * @type File[]\n * @default undefined\n * @example value={files}\n */\n value?: File[];\n\n /**\n * Function to be called when the value changes.\n * @type (files: File[]) => void\n * @default undefined\n * @example onValueChange={(files) => setFiles(files)}\n */\n onValueChange?: (files: File[]) => void;\n\n /**\n * Function to be called when files are uploaded.\n * @type (files: File[]) => Promise<void>\n * @default undefined\n * @example onUpload={(files) => uploadFiles(files)}\n */\n onUpload?: (files: File[]) => Promise<void>;\n\n /**\n * Progress of the uploaded files.\n * @type Record<string, number> | undefined\n * @default undefined\n * @example progresses={{ \"file1.png\": 50 }}\n */\n progresses?: Record<string, number>;\n\n /**\n * Accepted file types for the uploader.\n * @type { [key: string]: string[]}\n * @default\n * ```ts\n * { \"image/*\": [] }\n * ```\n * @example accept={[\"image/png\", \"image/jpeg\"]}\n */\n accept?: DropzoneProps['accept'];\n\n /**\n * Maximum file size for the uploader.\n * @type number | undefined\n * @default 1024 * 1024 * 2 // 2MB\n * @example maxSize={1024 * 1024 * 2} // 2MB\n */\n maxSize?: DropzoneProps['maxSize'];\n\n /**\n * Maximum number of files for the uploader.\n * @type number | undefined\n * @default 1\n * @example maxFileCount={4}\n */\n maxFileCount?: DropzoneProps['maxFiles'];\n\n /**\n * Whether the uploader should accept multiple files.\n * @type boolean\n * @default false\n * @example multiple\n */\n multiple?: boolean;\n\n /**\n * Whether the uploader is disabled.\n * @type boolean\n * @default false\n * @example disabled\n */\n disabled?: boolean;\n\n /**\n * Whether to show the instructional drag-and-drop text inside the drop zone.\n * @default true\n */\n showText?: boolean;\n /** Size in pixels for the upload icon. */\n iconSize?: number;\n}\n\n/**\n * A drag-and-drop file upload zone that manages file selection, validation, preview generation, and optional async upload with progress tracking.\n */\nexport function FileUploader(props: FileUploaderProps) {\n const {\n value: valueProp,\n onValueChange,\n onUpload,\n progresses,\n accept = {\n 'image/*': [],\n },\n maxSize = 1024 * 1024 * 2,\n maxFileCount = 1,\n multiple = false,\n disabled = false,\n showText = true,\n iconSize,\n className,\n ...dropzoneProps\n } = props;\n\n const [files, setFiles] = useControllableState({\n prop: valueProp,\n onChange: onValueChange,\n });\n\n const onDrop = useCallback(\n (acceptedFiles: File[], rejectedFiles: FileRejection[]) => {\n if (!multiple && maxFileCount === 1 && acceptedFiles.length > 1) {\n toast.error('Cannot upload more than 1 file at a time');\n\n return;\n }\n\n if ((files?.length ?? 0) + acceptedFiles.length > maxFileCount) {\n toast.error(`Cannot upload more than ${maxFileCount} files`);\n return;\n }\n\n const newFiles = acceptedFiles.map(file =>\n Object.assign(file, {\n preview: URL.createObjectURL(file),\n })\n );\n\n const updatedFiles = files ? [...files, ...newFiles] : newFiles;\n\n setFiles(updatedFiles);\n\n if (rejectedFiles.length > 0) {\n rejectedFiles.forEach(({ file }) => {\n toast.error(`File ${file.name} was rejected`);\n });\n }\n\n if (onUpload && updatedFiles.length > 0 && updatedFiles.length <= maxFileCount) {\n const target = updatedFiles.length > 0 ? `${updatedFiles.length} files` : `file`;\n\n onUpload(updatedFiles).then(() => {\n setFiles([]);\n toast(`${target} uploaded`);\n });\n }\n },\n\n [files, maxFileCount, multiple, onUpload, setFiles]\n );\n\n function onRemove(index: number) {\n if (!files) return;\n\n if (isFileWithPreview(files[index])) {\n URL.revokeObjectURL(files[index].preview);\n }\n\n const newFiles = files.filter((_, i) => i !== index);\n setFiles(newFiles);\n onValueChange?.(newFiles);\n }\n\n // Revoke preview url when component unmounts\n useEffect(() => {\n return () => {\n if (!files) return;\n files.forEach(file => {\n if (isFileWithPreview(file)) {\n URL.revokeObjectURL(file.preview);\n }\n });\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n const isDisabled = disabled || (files?.length ?? 0) >= maxFileCount;\n\n return (\n <div className=\"relative flex w-full flex-col gap-6\">\n <Dropzone onDrop={onDrop} accept={accept} maxSize={maxSize} maxFiles={maxFileCount} multiple={maxFileCount > 1 || multiple} disabled={isDisabled}>\n {({ getRootProps, getInputProps, isDragActive }) => (\n <div\n {...getRootProps()}\n className={cn(\n 'group',\n 'border-border-weak',\n 'hover:bg-border-weak/20',\n 'relative grid h-52 w-full cursor-pointer place-items-center rounded-lg border-2 border-dashed px-5 py-2.5 text-center transition',\n 'ring-offset-background',\n 'focus-visible:ring-primary-weak',\n 'focus-visible:ring-2',\n 'focus-visible:ring-offset-2',\n 'focus-visible:outline-hidden',\n isDragActive && 'border-border-primary-strong bg-border-weak/40',\n isDisabled && 'pointer-events-none opacity-60',\n className\n )}\n {...dropzoneProps}\n >\n <input {...getInputProps()} />\n {isDragActive ? (\n <div className=\"flex flex-col items-center justify-center gap-4 sm:px-5\">\n <div className=\"rounded-full border border-dashed p-3\">\n <Upload className=\"text-text-positive-muted size-7\" aria-hidden=\"true\" />\n </div>\n <p className=\"text-text-positive-muted font-medium\">Drop the files here</p>\n </div>\n ) : (\n <div className=\"flex flex-col items-center justify-center gap-4 sm:px-5\">\n <div className=\"rounded-full border border-dashed p-3\">\n <Upload size={iconSize || 24} className=\"text-muted-foreground\" aria-hidden=\"true\" />\n </div>\n {showText && (\n <div className=\"flex flex-col gap-px\">\n <p className=\"text-text-positive-weak text-xs font-medium\">Drag {`'n'`} drop files here, or click to select files</p>\n <p className=\"text-text-positive-muted text-xs\">\n You can upload\n {maxFileCount > 1\n ? ` ${maxFileCount === Infinity ? 'multiple' : maxFileCount}\n files (up to ${formatBytes(maxSize)} each)`\n : ` a file with ${formatBytes(maxSize)}`}\n </p>\n </div>\n )}\n </div>\n )}\n </div>\n )}\n </Dropzone>\n {files?.length ? (\n <div className=\"h-fit w-full overflow-y-auto\">\n <div className=\"flex items-center justify-between px-3 py-2.5\">\n <div className=\"text-text-positive-weak flex items-center gap-1\">\n <Image size={16} aria-hidden=\"true\" />\n <p className=\"text-sm\">Ảnh đã tải lên ({files.length})</p>\n </div>\n <button\n className=\"hover:text-text-positive text-text-positive-muted flex cursor-pointer items-center gap-1 transition-colors duration-200\"\n onClick={() => {\n if (!files) return;\n files.forEach(file => {\n if (!isFileWithPreview(file)) return;\n URL.revokeObjectURL(file.preview);\n });\n setFiles([]);\n onValueChange?.([]);\n }}\n >\n <Trash2 size={16} aria-hidden=\"true\" />\n <p className=\"text-sm\">Xóa tất cả</p>\n </button>\n </div>\n <div className=\"flex flex-col gap-2.5\">\n {files?.map((file, index) => (\n <FileCard key={index} file={file} onRemove={() => onRemove(index)} progress={progresses?.[file.name]} />\n ))}\n </div>\n </div>\n ) : null}\n </div>\n );\n}\n\ninterface FileCardProps {\n file: File;\n onRemove: () => void;\n progress?: number;\n}\n\nfunction FileCard({ file, progress, onRemove }: FileCardProps) {\n return (\n <div className=\"border-border-weak hover:border-border relative flex items-center gap-4 rounded-md border py-2 pr-3 pl-2 shadow-xs transition-colors\">\n <div className=\"flex flex-1 gap-2.5\">\n {isFileWithPreview(file) ? <FilePreview file={file} /> : null}\n <div className=\"flex w-full flex-col gap-2\">\n <div className=\"flex flex-col gap-y-0.5\">\n <p className=\"text-text-positive line-clamp-1 text-sm\">{file.name}</p>\n <p className=\"text-text-positive-muted text-xs\">{formatBytes(file.size)}</p>\n </div>\n {progress ? <Progress value={progress} /> : null}\n </div>\n </div>\n <div className=\"flex items-center gap-2\">\n <Button type=\"button\" variant=\"ghost\" color=\"secondary\" size=\"icon\" className=\"size-7\" onClick={onRemove}>\n <Trash2 size={16} className=\"text-text-positive-muted\" aria-hidden=\"true\" />\n <span className=\"sr-only\">Remove file</span>\n </Button>\n </div>\n </div>\n );\n}\n\nfunction isFileWithPreview(file: File): file is File & { preview: string } {\n return 'preview' in file && typeof file.preview === 'string';\n}\n\ninterface FilePreviewProps {\n file: File & { preview: string };\n}\n\nfunction FilePreview({ file }: FilePreviewProps) {\n if (file.type.startsWith('image/')) {\n return <img src={file.preview} className=\"border-border aspect-square size-10 shrink-0 rounded border object-cover object-top shadow-sm\" />;\n }\n\n return <FileText className=\"text-text-positive-muted size-10 border\" aria-hidden=\"true\" />;\n}\n"],"mappings":"khBAoHA,SAAgB,EAAa,EAA0B,CACrD,GAAM,CACJ,MAAO,EACP,gBACA,WACA,aACA,SAAS,CACP,UAAW,EAAE,CACd,CACD,UAAU,KAAO,KAAO,EACxB,eAAe,EACf,WAAW,GACX,WAAW,GACX,WAAW,GACX,WACA,YACA,GAAG,GACD,EAEE,CAAC,EAAO,GAAY,EAAqB,CAC7C,KAAM,EACN,SAAU,EACX,CAAC,CAEI,EAAS,GACZ,EAAuB,IAAmC,CACzD,GAAI,CAAC,GAAY,IAAiB,GAAK,EAAc,OAAS,EAAG,CAC/D,EAAM,MAAM,2CAA2C,CAEvD,OAGF,IAAK,GAAO,QAAU,GAAK,EAAc,OAAS,EAAc,CAC9D,EAAM,MAAM,2BAA2B,EAAa,QAAQ,CAC5D,OAGF,IAAM,EAAW,EAAc,IAAI,GACjC,OAAO,OAAO,EAAM,CAClB,QAAS,IAAI,gBAAgB,EAAK,CACnC,CAAC,CACH,CAEK,EAAe,EAAQ,CAAC,GAAG,EAAO,GAAG,EAAS,CAAG,EAUvD,GARA,EAAS,EAAa,CAElB,EAAc,OAAS,GACzB,EAAc,SAAS,CAAE,UAAW,CAClC,EAAM,MAAM,QAAQ,EAAK,KAAK,eAAe,EAC7C,CAGA,GAAY,EAAa,OAAS,GAAK,EAAa,QAAU,EAAc,CAC9E,IAAM,EAAS,EAAa,OAAS,EAAI,GAAG,EAAa,OAAO,QAAU,OAE1E,EAAS,EAAa,CAAC,SAAW,CAChC,EAAS,EAAE,CAAC,CACZ,EAAM,GAAG,EAAO,WAAW,EAC3B,GAIN,CAAC,EAAO,EAAc,EAAU,EAAU,EAAS,CACpD,CAED,SAAS,EAAS,EAAe,CAC/B,GAAI,CAAC,EAAO,OAER,EAAkB,EAAM,GAAO,EACjC,IAAI,gBAAgB,EAAM,GAAO,QAAQ,CAG3C,IAAM,EAAW,EAAM,QAAQ,EAAG,IAAM,IAAM,EAAM,CACpD,EAAS,EAAS,CAClB,IAAgB,EAAS,CAI3B,UACe,CACN,GACL,EAAM,QAAQ,GAAQ,CAChB,EAAkB,EAAK,EACzB,IAAI,gBAAgB,EAAK,QAAQ,EAEnC,EAGH,EAAE,CAAC,CAEN,IAAM,EAAa,IAAa,GAAO,QAAU,IAAM,EAEvD,OACE,EAAC,MAAA,CAAI,UAAU,gDACb,EAAC,EAAA,CAAiB,SAAgB,SAAiB,UAAS,SAAU,EAAc,SAAU,EAAe,GAAK,EAAU,SAAU,YAClI,CAAE,eAAc,gBAAe,kBAC/B,EAAC,MAAA,CACC,GAAI,GAAc,CAClB,UAAW,EACT,QACA,qBACA,0BACA,mIACA,yBACA,kCACA,uBACA,8BACA,+BACA,GAAgB,iDAChB,GAAc,iCACd,EACD,CACD,GAAI,YAEJ,EAAC,QAAA,CAAM,GAAI,GAAe,CAAA,CAAI,CAC7B,EACC,EAAC,MAAA,CAAI,UAAU,oEACb,EAAC,MAAA,CAAI,UAAU,iDACb,EAAC,EAAA,CAAO,UAAU,kCAAkC,cAAY,QAAS,EACrE,CACN,EAAC,IAAA,CAAE,UAAU,gDAAuC,uBAAuB,CAAA,EACvE,CAEN,EAAC,MAAA,CAAI,UAAU,oEACb,EAAC,MAAA,CAAI,UAAU,iDACb,EAAC,EAAA,CAAO,KAAM,GAAY,GAAI,UAAU,wBAAwB,cAAY,QAAS,EACjF,CACL,GACC,EAAC,MAAA,CAAI,UAAU,iCACb,EAAC,IAAA,CAAE,UAAU,wDAA8C,QAAM,MAAM,+CAA8C,CACrH,EAAC,IAAA,CAAE,UAAU,6CAAmC,iBAE7C,EAAe,EACZ,IAAI,IAAiB,IAAW,WAAa,EAAa;qCAC/C,EAAY,EAAQ,CAAC,QAChC,gBAAgB,EAAY,EAAQ,GAAA,EACtC,CAAA,EACA,CAAA,EAEJ,CAAA,EAEJ,EAEC,CACV,GAAO,OACN,EAAC,MAAA,CAAI,UAAU,yCACb,EAAC,MAAA,CAAI,UAAU,0DACb,EAAC,MAAA,CAAI,UAAU,4DACb,EAAC,EAAA,CAAM,KAAM,GAAI,cAAY,QAAS,CACtC,EAAC,IAAA,CAAE,UAAU,oBAAU,mBAAiB,EAAM,OAAO,MAAK,CAAA,EACtD,CACN,EAAC,SAAA,CACC,UAAU,0HACV,YAAe,CACR,IACL,EAAM,QAAQ,GAAQ,CACf,EAAkB,EAAK,EAC5B,IAAI,gBAAgB,EAAK,QAAQ,EACjC,CACF,EAAS,EAAE,CAAC,CACZ,IAAgB,EAAE,CAAC,aAGrB,EAAC,EAAA,CAAO,KAAM,GAAI,cAAY,QAAS,CACvC,EAAC,IAAA,CAAE,UAAU,mBAAU,cAAc,CAAA,EAC9B,CAAA,EACL,CACN,EAAC,MAAA,CAAI,UAAU,iCACZ,GAAO,KAAK,EAAM,IACjB,EAAC,EAAA,CAA2B,OAAM,aAAgB,EAAS,EAAM,CAAE,SAAU,IAAa,EAAK,OAAhF,EAAyF,CACxG,EACE,CAAA,EACF,CACJ,KAAA,EACA,CAUV,SAAS,EAAS,CAAE,OAAM,WAAU,YAA2B,CAC7D,OACE,EAAC,MAAA,CAAI,UAAU,iJACb,EAAC,MAAA,CAAI,UAAU,gCACZ,EAAkB,EAAK,CAAG,EAAC,EAAA,CAAkB,OAAA,CAAQ,CAAG,KACzD,EAAC,MAAA,CAAI,UAAU,uCACb,EAAC,MAAA,CAAI,UAAU,oCACb,EAAC,IAAA,CAAE,UAAU,mDAA2C,EAAK,MAAS,CACtE,EAAC,IAAA,CAAE,UAAU,4CAAoC,EAAY,EAAK,KAAK,EAAK,CAAA,EACxE,CACL,EAAW,EAAC,EAAA,CAAS,MAAO,EAAA,CAAY,CAAG,KAAA,EACxC,CAAA,EACF,CACN,EAAC,MAAA,CAAI,UAAU,mCACb,EAAC,EAAA,CAAO,KAAK,SAAS,QAAQ,QAAQ,MAAM,YAAY,KAAK,OAAO,UAAU,SAAS,QAAS,YAC9F,EAAC,EAAA,CAAO,KAAM,GAAI,UAAU,2BAA2B,cAAY,QAAS,CAC5E,EAAC,OAAA,CAAK,UAAU,mBAAU,eAAkB,CAAA,EACrC,EACL,CAAA,EACF,CAIV,SAAS,EAAkB,EAAgD,CACzE,MAAO,YAAa,GAAQ,OAAO,EAAK,SAAY,SAOtD,SAAS,EAAY,CAAE,QAA0B,CAK/C,OAJI,EAAK,KAAK,WAAW,SAAS,CACzB,EAAC,MAAA,CAAI,IAAK,EAAK,QAAS,UAAU,iGAAkG,CAGtI,EAAC,EAAA,CAAS,UAAU,0CAA0C,cAAY,QAAS"}
@@ -1,4 +1,4 @@
1
- import * as react97 from "react";
1
+ import * as react33 from "react";
2
2
  import { Label, Slot } from "radix-ui";
3
3
  import * as react_hook_form0 from "react-hook-form";
4
4
  import { ControllerProps, FieldPath, FieldValues } from "react-hook-form";
@@ -57,7 +57,7 @@ declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransfor
57
57
  */
58
58
  declare const FormField: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({
59
59
  ...props
60
- }: ControllerProps<TFieldValues, TName>) => react97.JSX.Element;
60
+ }: ControllerProps<TFieldValues, TName>) => react33.JSX.Element;
61
61
  /**
62
62
  * Hook that returns the field state and IDs for the enclosing FormField.
63
63
  * Must be called inside a component rendered within a `<FormField>`.
@@ -81,32 +81,32 @@ declare const useFormField: () => {
81
81
  *
82
82
  * @param orientation - Layout direction: `'vertical'`, `'horizontal'`, or `'responsive'` (default).
83
83
  */
84
- declare const FormItem: react97.MemoExoticComponent<({
84
+ declare const FormItem: react33.MemoExoticComponent<({
85
85
  className,
86
86
  orientation,
87
87
  ...props
88
88
  }: React.ComponentProps<"div"> & {
89
89
  orientation?: "vertical" | "horizontal" | "responsive";
90
- }) => react97.JSX.Element>;
90
+ }) => react33.JSX.Element>;
91
91
  /** Styled label automatically associated with the FormItem's control via `htmlFor`. */
92
- declare const FormLabel: react97.MemoExoticComponent<({
92
+ declare const FormLabel: react33.MemoExoticComponent<({
93
93
  ...props
94
- }: React.ComponentProps<typeof Label.Root>) => react97.JSX.Element>;
94
+ }: React.ComponentProps<typeof Label.Root>) => react33.JSX.Element>;
95
95
  /** Radix Slot wrapper that wires the correct `id`, `aria-describedby`, and `aria-invalid` attributes onto the underlying control element. */
96
- declare const FormControl: react97.MemoExoticComponent<({
96
+ declare const FormControl: react33.MemoExoticComponent<({
97
97
  ...props
98
- }: React.ComponentProps<typeof Slot.Slot>) => react97.JSX.Element>;
98
+ }: React.ComponentProps<typeof Slot.Slot>) => react33.JSX.Element>;
99
99
  /** Helper text displayed below the control that provides additional context about the field. */
100
100
  declare function FormDescription({
101
101
  className,
102
102
  ...props
103
- }: React.ComponentProps<'p'>): react97.JSX.Element;
103
+ }: React.ComponentProps<'p'>): react33.JSX.Element;
104
104
  /** Displays the validation error message for the field, or falls back to `children` when there is no error. */
105
105
  declare function FormMessage({
106
106
  className,
107
107
  children,
108
108
  ...props
109
- }: React.ComponentProps<'p'>): react97.JSX.Element;
109
+ }: React.ComponentProps<'p'>): react33.JSX.Element;
110
110
  //#endregion
111
111
  export { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, useFormField };
112
112
  //# sourceMappingURL=form.d.cts.map
@@ -1,4 +1,4 @@
1
- import * as react162 from "react";
1
+ import * as react58 from "react";
2
2
  import { Label, Slot } from "radix-ui";
3
3
  import * as react_hook_form0 from "react-hook-form";
4
4
  import { ControllerProps, FieldPath, FieldValues } from "react-hook-form";
@@ -57,7 +57,7 @@ declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransfor
57
57
  */
58
58
  declare const FormField: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({
59
59
  ...props
60
- }: ControllerProps<TFieldValues, TName>) => react162.JSX.Element;
60
+ }: ControllerProps<TFieldValues, TName>) => react58.JSX.Element;
61
61
  /**
62
62
  * Hook that returns the field state and IDs for the enclosing FormField.
63
63
  * Must be called inside a component rendered within a `<FormField>`.
@@ -81,32 +81,32 @@ declare const useFormField: () => {
81
81
  *
82
82
  * @param orientation - Layout direction: `'vertical'`, `'horizontal'`, or `'responsive'` (default).
83
83
  */
84
- declare const FormItem: react162.MemoExoticComponent<({
84
+ declare const FormItem: react58.MemoExoticComponent<({
85
85
  className,
86
86
  orientation,
87
87
  ...props
88
88
  }: React.ComponentProps<"div"> & {
89
89
  orientation?: "vertical" | "horizontal" | "responsive";
90
- }) => react162.JSX.Element>;
90
+ }) => react58.JSX.Element>;
91
91
  /** Styled label automatically associated with the FormItem's control via `htmlFor`. */
92
- declare const FormLabel: react162.MemoExoticComponent<({
92
+ declare const FormLabel: react58.MemoExoticComponent<({
93
93
  ...props
94
- }: React.ComponentProps<typeof Label.Root>) => react162.JSX.Element>;
94
+ }: React.ComponentProps<typeof Label.Root>) => react58.JSX.Element>;
95
95
  /** Radix Slot wrapper that wires the correct `id`, `aria-describedby`, and `aria-invalid` attributes onto the underlying control element. */
96
- declare const FormControl: react162.MemoExoticComponent<({
96
+ declare const FormControl: react58.MemoExoticComponent<({
97
97
  ...props
98
- }: React.ComponentProps<typeof Slot.Slot>) => react162.JSX.Element>;
98
+ }: React.ComponentProps<typeof Slot.Slot>) => react58.JSX.Element>;
99
99
  /** Helper text displayed below the control that provides additional context about the field. */
100
100
  declare function FormDescription({
101
101
  className,
102
102
  ...props
103
- }: React.ComponentProps<'p'>): react162.JSX.Element;
103
+ }: React.ComponentProps<'p'>): react58.JSX.Element;
104
104
  /** Displays the validation error message for the field, or falls back to `children` when there is no error. */
105
105
  declare function FormMessage({
106
106
  className,
107
107
  children,
108
108
  ...props
109
- }: React.ComponentProps<'p'>): react162.JSX.Element;
109
+ }: React.ComponentProps<'p'>): react58.JSX.Element;
110
110
  //#endregion
111
111
  export { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, useFormField };
112
- //# sourceMappingURL=form.d.mts.map
112
+ //# sourceMappingURL=form.d.ts.map
@@ -0,0 +1,2 @@
1
+ "use client";import"../separator-BM8hA4DP.js";import"../label-B8cAG2kc.js";import{o as e,r as t,t as n}from"../field-DpoKF1nY.js";import{createContext as r,memo as i,use as a,useId as o}from"react";import{cn as s}from"@customafk/react-toolkit/utils";import{jsx as c}from"react/jsx-runtime";import{Slot as l}from"radix-ui";import{Controller as u,FormProvider as d,useFormContext as f,useFormState as p}from"react-hook-form";const m=d,h=r({}),g=({...e})=>c(h.Provider,{value:{name:e.name},children:c(u,{...e})}),_=()=>{let e=a(h),t=a(v),{getFieldState:n,control:r,resetField:i}=f(),o=p({name:e.name}),s=n(e.name,o);if(!e)throw Error(`useFormField should be used within <FormField>`);let{id:c}=t;return{id:c,control:r,resetField:i,name:e.name,formItemId:`${c}-form-item`,formDescriptionId:`${c}-form-item-description`,formMessageId:`${c}-form-item-message`,...s}},v=r({}),y=i(({className:e,orientation:t=`responsive`,...r})=>{let i=o();return c(v.Provider,{value:{id:i},children:c(n,{orientation:t,...r,className:e})})});y.displayName=`FormItem`;const b=i(({...t})=>{let{formItemId:n}=_();return c(e,{htmlFor:n,...t})});b.displayName=`FormLabel`;const x=i(({...e})=>{let{error:t,formItemId:n,formDescriptionId:r,formMessageId:i}=_();return c(l.Slot,{"data-slot":`form-control`,id:n,"aria-describedby":t?`${r} ${i}`:`${r}`,"aria-invalid":!!t,...e})});x.displayName=`FormControl`;function S({className:e,...n}){let{formDescriptionId:r}=_();return c(t,{id:r,className:s(`text-text-positive-weak text-sm/6 leading-normal font-normal`,`group-has-data-[orientation=horizontal]/field:text-balance`,`last:mt-0 nth-last-2:-mt-1 [[data-variant=legend]+&]:-mt-1.5`,`[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4`,e),...n})}function C({className:e,children:t,...n}){let{error:r,formMessageId:i}=_();return c(`span`,{"data-slot":`form-message`,id:i,className:s(`text-danger text-xs`,e),...n,children:r?String(r?.message??``):t})}export{m as Form,x as FormControl,S as FormDescription,g as FormField,y as FormItem,b as FormLabel,C as FormMessage,_ as useFormField};
2
+ //# sourceMappingURL=form.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"form.js","names":["SlotPrimitive"],"sources":["../../packages/components/ui/form.tsx"],"sourcesContent":["'use client';\n\nimport { cn } from '@customafk/react-toolkit/utils';\nimport { type Label as LabelPrimitive, Slot as SlotPrimitive } from 'radix-ui';\nimport { createContext, memo, use, useId } from 'react';\nimport type { ControllerProps, FieldPath, FieldValues } from 'react-hook-form';\nimport { Controller, FormProvider, useFormContext, useFormState } from 'react-hook-form';\nimport { Field, FieldDescription, FieldLabel } from './field';\n\n/**\n * Re-export of react-hook-form's `FormProvider`; wrap your form with this to give all nested form components access to the form context.\n *\n * @example\n * ```tsx\n * import { Form, FormField, FormItem, FormLabel, FormControl, FormMessage } from '@customafk/lunas-ui/ui/form';\n * import { useForm } from 'react-hook-form';\n *\n * const form = useForm<{ username: string }>();\n *\n * <Form {...form}>\n * <form onSubmit={form.handleSubmit(onSubmit)}>\n * <FormField\n * control={form.control}\n * name=\"username\"\n * render={({ field }) => (\n * <FormItem>\n * <FormLabel>Username</FormLabel>\n * <FormControl><input {...field} /></FormControl>\n * <FormMessage />\n * </FormItem>\n * )}\n * />\n * </form>\n * </Form>\n * ```\n */\nconst Form = FormProvider;\n\ntype FormFieldContextValue<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> = {\n name: TName;\n};\n\nconst FormFieldContext = createContext<FormFieldContextValue>({} as FormFieldContextValue);\n\n/**\n * Connects a single react-hook-form field to the form context; renders a `Controller` and passes `name` down to nested FormItem, FormLabel, FormControl, and FormMessage.\n */\nconst FormField = <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({\n ...props\n}: ControllerProps<TFieldValues, TName>) => {\n return (\n <FormFieldContext.Provider value={{ name: props.name }}>\n <Controller {...props} />\n </FormFieldContext.Provider>\n );\n};\n\n/**\n * Hook that returns the field state and IDs for the enclosing FormField.\n * Must be called inside a component rendered within a `<FormField>`.\n */\nconst useFormField = () => {\n const fieldContext = use(FormFieldContext);\n const itemContext = use(FormItemContext);\n const { getFieldState, control, resetField } = useFormContext();\n const formState = useFormState({ name: fieldContext.name });\n const fieldState = getFieldState(fieldContext.name, formState);\n\n if (!fieldContext) {\n throw new Error('useFormField should be used within <FormField>');\n }\n\n const { id } = itemContext;\n\n return {\n id,\n control,\n resetField,\n name: fieldContext.name,\n formItemId: `${id}-form-item`,\n formDescriptionId: `${id}-form-item-description`,\n formMessageId: `${id}-form-item-message`,\n ...fieldState,\n };\n};\n\ntype FormItemContextValue = {\n id: string;\n};\n\nconst FormItemContext = createContext<FormItemContextValue>({} as FormItemContextValue);\n\n/**\n * Container for a single form field — generates a unique ID and provides it via context to FormLabel, FormControl, and FormMessage.\n *\n * @param orientation - Layout direction: `'vertical'`, `'horizontal'`, or `'responsive'` (default).\n */\nconst FormItem = memo(\n ({\n className,\n orientation = 'responsive',\n ...props\n }: React.ComponentProps<'div'> & {\n orientation?: 'vertical' | 'horizontal' | 'responsive';\n }) => {\n const id = useId();\n\n return (\n <FormItemContext.Provider value={{ id }}>\n <Field orientation={orientation} {...props} className={className} />\n </FormItemContext.Provider>\n );\n }\n);\nFormItem.displayName = 'FormItem';\n\n/** Styled label automatically associated with the FormItem's control via `htmlFor`. */\nconst FormLabel = memo(({ ...props }: React.ComponentProps<typeof LabelPrimitive.Root>) => {\n const { formItemId } = useFormField();\n return <FieldLabel htmlFor={formItemId} {...props} />;\n});\nFormLabel.displayName = 'FormLabel';\n\n/** Radix Slot wrapper that wires the correct `id`, `aria-describedby`, and `aria-invalid` attributes onto the underlying control element. */\nconst FormControl = memo(({ ...props }: React.ComponentProps<typeof SlotPrimitive.Slot>) => {\n const { error, formItemId, formDescriptionId, formMessageId } = useFormField();\n\n return (\n <SlotPrimitive.Slot\n data-slot=\"form-control\"\n id={formItemId}\n aria-describedby={!error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`}\n aria-invalid={!!error}\n {...props}\n />\n );\n});\nFormControl.displayName = 'FormControl';\n\n/** Helper text displayed below the control that provides additional context about the field. */\nfunction FormDescription({ className, ...props }: React.ComponentProps<'p'>) {\n const { formDescriptionId } = useFormField();\n\n return (\n <FieldDescription\n id={formDescriptionId}\n className={cn(\n 'text-text-positive-weak text-sm/6 leading-normal font-normal',\n 'group-has-data-[orientation=horizontal]/field:text-balance',\n 'last:mt-0 nth-last-2:-mt-1 [[data-variant=legend]+&]:-mt-1.5',\n '[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4',\n className\n )}\n {...props}\n />\n );\n}\n\n/** Displays the validation error message for the field, or falls back to `children` when there is no error. */\nfunction FormMessage({ className, children, ...props }: React.ComponentProps<'p'>) {\n const { error, formMessageId } = useFormField();\n\n return (\n <span data-slot=\"form-message\" id={formMessageId} className={cn('text-danger text-xs', className)} {...props}>\n {error ? String(error?.message ?? '') : children}\n </span>\n );\n}\n\n// eslint-disable-next-line react-refresh/only-export-components\nexport { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, useFormField };\n"],"mappings":"uaAoCA,MAAM,EAAO,EAMP,EAAmB,EAAqC,EAAE,CAA0B,CAKpF,GAA8H,CAClI,GAAG,KAGD,EAAC,EAAiB,SAAA,CAAS,MAAO,CAAE,KAAM,EAAM,KAAM,UACpD,EAAC,EAAA,CAAW,GAAI,EAAA,CAAS,EACC,CAQ1B,MAAqB,CACzB,IAAM,EAAe,EAAI,EAAiB,CACpC,EAAc,EAAI,EAAgB,CAClC,CAAE,gBAAe,UAAS,cAAe,GAAgB,CACzD,EAAY,EAAa,CAAE,KAAM,EAAa,KAAM,CAAC,CACrD,EAAa,EAAc,EAAa,KAAM,EAAU,CAE9D,GAAI,CAAC,EACH,MAAU,MAAM,iDAAiD,CAGnE,GAAM,CAAE,MAAO,EAEf,MAAO,CACL,KACA,UACA,aACA,KAAM,EAAa,KACnB,WAAY,GAAG,EAAG,YAClB,kBAAmB,GAAG,EAAG,wBACzB,cAAe,GAAG,EAAG,oBACrB,GAAG,EACJ,EAOG,EAAkB,EAAoC,EAAE,CAAyB,CAOjF,EAAW,GACd,CACC,YACA,cAAc,aACd,GAAG,KAGC,CACJ,IAAM,EAAK,GAAO,CAElB,OACE,EAAC,EAAgB,SAAA,CAAS,MAAO,CAAE,KAAI,UACrC,EAAC,EAAA,CAAmB,cAAa,GAAI,EAAkB,aAAa,EAC3C,EAGhC,CACD,EAAS,YAAc,WAGvB,MAAM,EAAY,GAAM,CAAE,GAAG,KAA8D,CACzF,GAAM,CAAE,cAAe,GAAc,CACrC,OAAO,EAAC,EAAA,CAAW,QAAS,EAAY,GAAI,GAAS,EACrD,CACF,EAAU,YAAc,YAGxB,MAAM,EAAc,GAAM,CAAE,GAAG,KAA6D,CAC1F,GAAM,CAAE,QAAO,aAAY,oBAAmB,iBAAkB,GAAc,CAE9E,OACE,EAACA,EAAc,KAAA,CACb,YAAU,eACV,GAAI,EACJ,mBAAmB,EAAiC,GAAG,EAAkB,GAAG,IAAjD,GAAG,IAC9B,eAAc,CAAC,CAAC,EAChB,GAAI,GACJ,EAEJ,CACF,EAAY,YAAc,cAG1B,SAAS,EAAgB,CAAE,YAAW,GAAG,GAAoC,CAC3E,GAAM,CAAE,qBAAsB,GAAc,CAE5C,OACE,EAAC,EAAA,CACC,GAAI,EACJ,UAAW,EACT,+DACA,6DACA,+DACA,oEACA,EACD,CACD,GAAI,GACJ,CAKN,SAAS,EAAY,CAAE,YAAW,WAAU,GAAG,GAAoC,CACjF,GAAM,CAAE,QAAO,iBAAkB,GAAc,CAE/C,OACE,EAAC,OAAA,CAAK,YAAU,eAAe,GAAI,EAAe,UAAW,EAAG,sBAAuB,EAAU,CAAE,GAAI,WACpG,EAAQ,OAAO,GAAO,SAAW,GAAG,CAAG,GACnC"}
@@ -1,4 +1,4 @@
1
- import * as react92 from "react";
1
+ import * as react57 from "react";
2
2
  import { HoverCard as HoverCard$1 } from "radix-ui";
3
3
 
4
4
  //#region packages/components/ui/hover-card.d.ts
@@ -20,18 +20,18 @@ import { HoverCard as HoverCard$1 } from "radix-ui";
20
20
  */
21
21
  declare function HoverCard({
22
22
  ...props
23
- }: React.ComponentProps<typeof HoverCard$1.Root>): react92.JSX.Element;
23
+ }: React.ComponentProps<typeof HoverCard$1.Root>): react57.JSX.Element;
24
24
  /** The element that triggers the HoverCard on pointer enter. */
25
25
  declare function HoverCardTrigger({
26
26
  ...props
27
- }: React.ComponentProps<typeof HoverCard$1.Trigger>): react92.JSX.Element;
27
+ }: React.ComponentProps<typeof HoverCard$1.Trigger>): react57.JSX.Element;
28
28
  /** The floating card panel displayed when the trigger is hovered. */
29
29
  declare function HoverCardContent({
30
30
  className,
31
31
  align,
32
32
  sideOffset,
33
33
  ...props
34
- }: React.ComponentProps<typeof HoverCard$1.Content>): react92.JSX.Element;
34
+ }: React.ComponentProps<typeof HoverCard$1.Content>): react57.JSX.Element;
35
35
  //#endregion
36
36
  export { HoverCard, HoverCardContent, HoverCardTrigger };
37
37
  //# sourceMappingURL=hover-card.d.cts.map
@@ -1,4 +1,4 @@
1
- import * as react77 from "react";
1
+ import * as react134 from "react";
2
2
  import { HoverCard as HoverCard$1 } from "radix-ui";
3
3
 
4
4
  //#region packages/components/ui/hover-card.d.ts
@@ -20,18 +20,18 @@ import { HoverCard as HoverCard$1 } from "radix-ui";
20
20
  */
21
21
  declare function HoverCard({
22
22
  ...props
23
- }: React.ComponentProps<typeof HoverCard$1.Root>): react77.JSX.Element;
23
+ }: React.ComponentProps<typeof HoverCard$1.Root>): react134.JSX.Element;
24
24
  /** The element that triggers the HoverCard on pointer enter. */
25
25
  declare function HoverCardTrigger({
26
26
  ...props
27
- }: React.ComponentProps<typeof HoverCard$1.Trigger>): react77.JSX.Element;
27
+ }: React.ComponentProps<typeof HoverCard$1.Trigger>): react134.JSX.Element;
28
28
  /** The floating card panel displayed when the trigger is hovered. */
29
29
  declare function HoverCardContent({
30
30
  className,
31
31
  align,
32
32
  sideOffset,
33
33
  ...props
34
- }: React.ComponentProps<typeof HoverCard$1.Content>): react77.JSX.Element;
34
+ }: React.ComponentProps<typeof HoverCard$1.Content>): react134.JSX.Element;
35
35
  //#endregion
36
36
  export { HoverCard, HoverCardContent, HoverCardTrigger };
37
- //# sourceMappingURL=hover-card.d.mts.map
37
+ //# sourceMappingURL=hover-card.d.ts.map
@@ -1,2 +1,2 @@
1
1
  "use client";import{cn as e}from"@customafk/react-toolkit/utils";import{jsx as t}from"react/jsx-runtime";import{HoverCard as n}from"radix-ui";function r({...e}){return t(n.Root,{"data-slot":`hover-card`,...e})}function i({...e}){return t(n.Trigger,{"data-slot":`hover-card-trigger`,...e})}function a({className:r,align:i=`center`,sideOffset:a=4,...o}){return t(n.Portal,{"data-slot":`hover-card-portal`,children:t(n.Content,{"data-slot":`hover-card-content`,align:i,sideOffset:a,className:e(`bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden`,r),...o})})}export{r as HoverCard,a as HoverCardContent,i as HoverCardTrigger};
2
- //# sourceMappingURL=hover-card.mjs.map
2
+ //# sourceMappingURL=hover-card.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hover-card.js","names":["HoverCardPrimitive"],"sources":["../../packages/components/ui/hover-card.tsx"],"sourcesContent":["'use client';\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { HoverCard as HoverCardPrimitive } from 'radix-ui';\n\n/**\n * Root provider for the HoverCard — shows a floating card when the trigger is hovered.\n *\n * @example\n * ```tsx\n * import { HoverCard, HoverCardTrigger, HoverCardContent } from '@customafk/lunas-ui/ui/hover-card';\n *\n * <HoverCard>\n * <HoverCardTrigger>@username</HoverCardTrigger>\n * <HoverCardContent>\n * <p>Profile details here</p>\n * </HoverCardContent>\n * </HoverCard>\n * ```\n */\nfunction HoverCard({ ...props }: React.ComponentProps<typeof HoverCardPrimitive.Root>) {\n return <HoverCardPrimitive.Root data-slot=\"hover-card\" {...props} />;\n}\n\n/** The element that triggers the HoverCard on pointer enter. */\nfunction HoverCardTrigger({ ...props }: React.ComponentProps<typeof HoverCardPrimitive.Trigger>) {\n return <HoverCardPrimitive.Trigger data-slot=\"hover-card-trigger\" {...props} />;\n}\n\n/** The floating card panel displayed when the trigger is hovered. */\nfunction HoverCardContent({ className, align = 'center', sideOffset = 4, ...props }: React.ComponentProps<typeof HoverCardPrimitive.Content>) {\n return (\n <HoverCardPrimitive.Portal data-slot=\"hover-card-portal\">\n <HoverCardPrimitive.Content\n data-slot=\"hover-card-content\"\n align={align}\n sideOffset={sideOffset}\n className={cn(\n 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden',\n className\n )}\n {...props}\n />\n </HoverCardPrimitive.Portal>\n );\n}\n\nexport { HoverCard, HoverCardContent, HoverCardTrigger };\n"],"mappings":"8IAoBA,SAAS,EAAU,CAAE,GAAG,GAA+D,CACrF,OAAO,EAACA,EAAmB,KAAA,CAAK,YAAU,aAAa,GAAI,GAAS,CAItE,SAAS,EAAiB,CAAE,GAAG,GAAkE,CAC/F,OAAO,EAACA,EAAmB,QAAA,CAAQ,YAAU,qBAAqB,GAAI,GAAS,CAIjF,SAAS,EAAiB,CAAE,YAAW,QAAQ,SAAU,aAAa,EAAG,GAAG,GAAkE,CAC5I,OACE,EAACA,EAAmB,OAAA,CAAO,YAAU,6BACnC,EAACA,EAAmB,QAAA,CAClB,YAAU,qBACH,QACK,aACZ,UAAW,EACT,oeACA,EACD,CACD,GAAI,GACJ,EACwB"}
@@ -33,4 +33,4 @@ type Props = {
33
33
  declare const Image: React.FC<Props>;
34
34
  //#endregion
35
35
  export { Image };
36
- //# sourceMappingURL=image.d.mts.map
36
+ //# sourceMappingURL=image.d.ts.map
@@ -0,0 +1 @@
1
+ import"../skeleton-DlRDNM97.js";import{t as e}from"../image-BpTuF_1w.js";export{e as Image};
@@ -1,4 +1,4 @@
1
- import * as react116 from "react";
1
+ import * as react111 from "react";
2
2
  import { OTPInput } from "input-otp";
3
3
 
4
4
  //#region packages/components/ui/input-otp.d.ts
@@ -32,12 +32,12 @@ declare function InputOTP({
32
32
  }: React.ComponentProps<typeof OTPInput> & {
33
33
  /** Class name applied to the outer container div. */
34
34
  containerClassName?: string;
35
- }): react116.JSX.Element;
35
+ }): react111.JSX.Element;
36
36
  /** Flex container that groups a sequence of InputOTPSlot elements. */
37
37
  declare function InputOTPGroup({
38
38
  className,
39
39
  ...props
40
- }: React.ComponentProps<'div'>): react116.JSX.Element;
40
+ }: React.ComponentProps<'div'>): react111.JSX.Element;
41
41
  /**
42
42
  * A single character slot in an InputOTP — displays the typed character and a blinking caret when focused.
43
43
  *
@@ -49,11 +49,11 @@ declare function InputOTPSlot({
49
49
  ...props
50
50
  }: React.ComponentProps<'div'> & {
51
51
  index: number;
52
- }): react116.JSX.Element;
52
+ }): react111.JSX.Element;
53
53
  /** Visual separator (dash) placed between InputOTPGroup elements. */
54
54
  declare function InputOTPSeparator({
55
55
  ...props
56
- }: React.ComponentProps<'div'>): react116.JSX.Element;
56
+ }: React.ComponentProps<'div'>): react111.JSX.Element;
57
57
  //#endregion
58
58
  export { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot };
59
59
  //# sourceMappingURL=input-otp.d.cts.map
@@ -1,4 +1,4 @@
1
- import * as react56 from "react";
1
+ import * as react245 from "react";
2
2
  import { OTPInput } from "input-otp";
3
3
 
4
4
  //#region packages/components/ui/input-otp.d.ts
@@ -32,12 +32,12 @@ declare function InputOTP({
32
32
  }: React.ComponentProps<typeof OTPInput> & {
33
33
  /** Class name applied to the outer container div. */
34
34
  containerClassName?: string;
35
- }): react56.JSX.Element;
35
+ }): react245.JSX.Element;
36
36
  /** Flex container that groups a sequence of InputOTPSlot elements. */
37
37
  declare function InputOTPGroup({
38
38
  className,
39
39
  ...props
40
- }: React.ComponentProps<'div'>): react56.JSX.Element;
40
+ }: React.ComponentProps<'div'>): react245.JSX.Element;
41
41
  /**
42
42
  * A single character slot in an InputOTP — displays the typed character and a blinking caret when focused.
43
43
  *
@@ -49,11 +49,11 @@ declare function InputOTPSlot({
49
49
  ...props
50
50
  }: React.ComponentProps<'div'> & {
51
51
  index: number;
52
- }): react56.JSX.Element;
52
+ }): react245.JSX.Element;
53
53
  /** Visual separator (dash) placed between InputOTPGroup elements. */
54
54
  declare function InputOTPSeparator({
55
55
  ...props
56
- }: React.ComponentProps<'div'>): react56.JSX.Element;
56
+ }: React.ComponentProps<'div'>): react245.JSX.Element;
57
57
  //#endregion
58
58
  export { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot };
59
- //# sourceMappingURL=input-otp.d.mts.map
59
+ //# sourceMappingURL=input-otp.d.ts.map
@@ -1,2 +1,2 @@
1
1
  "use client";import{MinusIcon as e}from"lucide-react";import{use as t}from"react";import{cn as n}from"@customafk/react-toolkit/utils";import{jsx as r,jsxs as i}from"react/jsx-runtime";import{OTPInput as a,OTPInputContext as o}from"input-otp";function s({className:e,containerClassName:t,...i}){return r(a,{"data-slot":`input-otp`,containerClassName:n(`flex items-center gap-2 has-disabled:opacity-50`,t),className:n(`disabled:cursor-not-allowed`,e),...i})}function c({className:e,...t}){return r(`div`,{"data-slot":`input-otp-group`,className:n(`flex items-center`,e),...t})}function l({index:e,className:a,...s}){let{char:c,hasFakeCaret:l,isActive:u}=t(o)?.slots[e]??{};return i(`div`,{"data-slot":`input-otp-slot`,"data-active":u,className:n(`data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:ring-destructive/20 dark:data-[active=true]:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive dark:bg-input/30 border-input relative flex h-9 w-9 items-center justify-center border-y border-r text-sm shadow-xs transition-all outline-none first:rounded-l-md first:border-l last:rounded-r-md data-[active=true]:z-10 data-[active=true]:ring-[3px]`,a),...s,children:[c,l&&r(`div`,{className:`pointer-events-none absolute inset-0 flex items-center justify-center`,children:r(`div`,{className:`animate-caret-blink bg-foreground h-4 w-px duration-1000`})})]})}function u({...t}){return r(`div`,{"data-slot":`input-otp-separator`,role:`separator`,...t,children:r(e,{})})}export{s as InputOTP,c as InputOTPGroup,u as InputOTPSeparator,l as InputOTPSlot};
2
- //# sourceMappingURL=input-otp.mjs.map
2
+ //# sourceMappingURL=input-otp.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input-otp.js","names":[],"sources":["../../packages/components/ui/input-otp.tsx"],"sourcesContent":["'use client';\nimport { use } from 'react';\n\nimport { MinusIcon } from 'lucide-react';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { OTPInput, OTPInputContext } from 'input-otp';\n\n/**\n * One-time password (OTP) input composed of individual character slots.\n *\n * @example\n * ```tsx\n * import { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator } from '@customafk/lunas-ui/ui/input-otp';\n *\n * <InputOTP maxLength={6}>\n * <InputOTPGroup>\n * <InputOTPSlot index={0} />\n * <InputOTPSlot index={1} />\n * <InputOTPSlot index={2} />\n * </InputOTPGroup>\n * <InputOTPSeparator />\n * <InputOTPGroup>\n * <InputOTPSlot index={3} />\n * <InputOTPSlot index={4} />\n * <InputOTPSlot index={5} />\n * </InputOTPGroup>\n * </InputOTP>\n * ```\n */\nfunction InputOTP({\n className,\n containerClassName,\n ...props\n}: React.ComponentProps<typeof OTPInput> & {\n /** Class name applied to the outer container div. */\n containerClassName?: string;\n}) {\n return (\n <OTPInput\n data-slot=\"input-otp\"\n containerClassName={cn('flex items-center gap-2 has-disabled:opacity-50', containerClassName)}\n className={cn('disabled:cursor-not-allowed', className)}\n {...props}\n />\n );\n}\n\n/** Flex container that groups a sequence of InputOTPSlot elements. */\nfunction InputOTPGroup({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"input-otp-group\" className={cn('flex items-center', className)} {...props} />;\n}\n\n/**\n * A single character slot in an InputOTP — displays the typed character and a blinking caret when focused.\n *\n * @param index - Zero-based position of this slot within the OTP sequence.\n */\nfunction InputOTPSlot({\n index,\n className,\n ...props\n}: React.ComponentProps<'div'> & {\n index: number;\n}) {\n const inputOTPContext = use(OTPInputContext);\n const { char, hasFakeCaret, isActive } = inputOTPContext?.slots[index] ?? {};\n\n return (\n <div\n data-slot=\"input-otp-slot\"\n data-active={isActive}\n className={cn(\n 'data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:ring-destructive/20 dark:data-[active=true]:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive dark:bg-input/30 border-input relative flex h-9 w-9 items-center justify-center border-y border-r text-sm shadow-xs transition-all outline-none first:rounded-l-md first:border-l last:rounded-r-md data-[active=true]:z-10 data-[active=true]:ring-[3px]',\n className\n )}\n {...props}\n >\n {char}\n {hasFakeCaret && (\n <div className=\"pointer-events-none absolute inset-0 flex items-center justify-center\">\n <div className=\"animate-caret-blink bg-foreground h-4 w-px duration-1000\" />\n </div>\n )}\n </div>\n );\n}\n\n/** Visual separator (dash) placed between InputOTPGroup elements. */\nfunction InputOTPSeparator({ ...props }: React.ComponentProps<'div'>) {\n return (\n <div data-slot=\"input-otp-separator\" role=\"separator\" {...props}>\n <MinusIcon />\n </div>\n );\n}\n\nexport { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot };\n"],"mappings":"kPA+BA,SAAS,EAAS,CAChB,YACA,qBACA,GAAG,GAIF,CACD,OACE,EAAC,EAAA,CACC,YAAU,YACV,mBAAoB,EAAG,kDAAmD,EAAmB,CAC7F,UAAW,EAAG,8BAA+B,EAAU,CACvD,GAAI,GACJ,CAKN,SAAS,EAAc,CAAE,YAAW,GAAG,GAAsC,CAC3E,OAAO,EAAC,MAAA,CAAI,YAAU,kBAAkB,UAAW,EAAG,oBAAqB,EAAU,CAAE,GAAI,GAAS,CAQtG,SAAS,EAAa,CACpB,QACA,YACA,GAAG,GAGF,CAED,GAAM,CAAE,OAAM,eAAc,YADJ,EAAI,EAAgB,EACc,MAAM,IAAU,EAAE,CAE5E,OACE,EAAC,MAAA,CACC,YAAU,iBACV,cAAa,EACb,UAAW,EACT,2fACA,EACD,CACD,GAAI,YAEH,EACA,GACC,EAAC,MAAA,CAAI,UAAU,iFACb,EAAC,MAAA,CAAI,UAAU,2DAAA,CAA6D,EACxE,CAAA,EAEJ,CAKV,SAAS,EAAkB,CAAE,GAAG,GAAsC,CACpE,OACE,EAAC,MAAA,CAAI,YAAU,sBAAsB,KAAK,YAAY,GAAI,WACxD,EAAC,EAAA,EAAA,CAAY,EACT"}
@@ -1,2 +1,2 @@
1
- import { n as InputVariantProps, r as inputVariants, t as Input } from "../input-CD4zf7t1.cjs";
1
+ import { n as InputVariantProps, r as inputVariants, t as Input } from "../input-B_gst0eJ.cjs";
2
2
  export { Input, InputVariantProps, inputVariants };
@@ -0,0 +1,2 @@
1
+ import { n as InputVariantProps, r as inputVariants, t as Input } from "../input-BkHdaXGY.js";
2
+ export { Input, InputVariantProps, inputVariants };
@@ -0,0 +1 @@
1
+ "use client";import{n as e,t}from"../input-DAfP6LZ7.js";export{t as Input,e as inputVariants};
@@ -1,5 +1,5 @@
1
- import { t as Input } from "../../input-CD4zf7t1.cjs";
2
- import * as react2 from "react";
1
+ import { t as Input } from "../../input-B_gst0eJ.cjs";
2
+ import * as react5 from "react";
3
3
 
4
4
  //#region packages/components/ui/inputs/search-input.d.ts
5
5
 
@@ -23,7 +23,7 @@ type Props = React.ComponentPropsWithoutRef<typeof Input>;
23
23
  declare const SearchInput: ({
24
24
  className,
25
25
  ...rest
26
- }: Props) => react2.JSX.Element;
26
+ }: Props) => react5.JSX.Element;
27
27
  //#endregion
28
28
  export { SearchInput };
29
29
  //# sourceMappingURL=search-input.d.cts.map
@@ -1,5 +1,5 @@
1
- import { t as Input } from "../../input-BtuZm0BQ.mjs";
2
- import * as react76 from "react";
1
+ import { t as Input } from "../../input-BkHdaXGY.js";
2
+ import * as react225 from "react";
3
3
 
4
4
  //#region packages/components/ui/inputs/search-input.d.ts
5
5
 
@@ -23,7 +23,7 @@ type Props = React.ComponentPropsWithoutRef<typeof Input>;
23
23
  declare const SearchInput: ({
24
24
  className,
25
25
  ...rest
26
- }: Props) => react76.JSX.Element;
26
+ }: Props) => react225.JSX.Element;
27
27
  //#endregion
28
28
  export { SearchInput };
29
- //# sourceMappingURL=search-input.d.mts.map
29
+ //# sourceMappingURL=search-input.d.ts.map
@@ -0,0 +1,2 @@
1
+ import{t as e}from"../../input-DAfP6LZ7.js";import{ArrowRightIcon as t,SearchIcon as n}from"lucide-react";import{cn as r}from"@customafk/react-toolkit/utils";import{jsx as i,jsxs as a}from"react/jsx-runtime";const o=({className:o,...s})=>a(`div`,{className:`relative`,children:[i(e,{...s,type:`search`,className:r(`ps-9 pe-9`,o)}),i(`div`,{className:`pointer-events-none absolute inset-y-0 start-0 flex items-center justify-center ps-3 text-text-positive-weak peer-disabled:opacity-50`,children:i(n,{size:16})}),i(`button`,{className:`absolute inset-y-0 end-0 flex h-full w-9 items-center justify-center rounded-e-md text-text-positive-weak outline-none transition-[color,box-shadow] hover:text-text-positive focus:z-10 focus-visible:border focus-visible:border-primary-strong focus-visible:ring-[3px] focus-visible:ring-primary-weak disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50`,"aria-label":`Submit search`,type:`submit`,children:i(t,{size:16,"aria-hidden":`true`})})]});export{o as SearchInput};
2
+ //# sourceMappingURL=search-input.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search-input.js","names":[],"sources":["../../../packages/components/ui/inputs/search-input.tsx"],"sourcesContent":["import { ArrowRightIcon, SearchIcon } from 'lucide-react';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { Input } from '../input';\n\n/**\n * Props for {@link SearchInput}. Accepts all native props of the underlying\n * `Input` component (itself a thin wrapper around `<input>`), including\n * `value`, `defaultValue`, `onChange`, `placeholder`, `disabled`, etc.\n * The `type` prop is fixed to `\"search\"` and cannot be overridden.\n */\ntype Props = React.ComponentPropsWithoutRef<typeof Input>;\n\n/**\n * A search input field with a leading search icon and a trailing arrow submit button, intended for use inside an HTML `<form>` element.\n *\n * @example\n * import { SearchInput } from '@customafk/lunas-ui/ui/inputs/search-input';\n *\n * <form onSubmit={handleSearch}>\n * <SearchInput placeholder=\"Search…\" value={query} onChange={(e) => setQuery(e.target.value)} />\n * </form>\n */\nexport const SearchInput = ({ className, ...rest }: Props) => {\n return (\n <div className=\"relative\">\n <Input {...rest} type=\"search\" className={cn('ps-9 pe-9', className)} />\n <div className=\"pointer-events-none absolute inset-y-0 start-0 flex items-center justify-center ps-3 text-text-positive-weak peer-disabled:opacity-50\">\n <SearchIcon size={16} />\n </div>\n <button\n className=\"absolute inset-y-0 end-0 flex h-full w-9 items-center justify-center rounded-e-md text-text-positive-weak outline-none transition-[color,box-shadow] hover:text-text-positive focus:z-10 focus-visible:border focus-visible:border-primary-strong focus-visible:ring-[3px] focus-visible:ring-primary-weak disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50\"\n aria-label=\"Submit search\"\n type=\"submit\"\n >\n <ArrowRightIcon size={16} aria-hidden=\"true\" />\n </button>\n </div>\n );\n};\n"],"mappings":"gNAwBA,MAAa,GAAe,CAAE,YAAW,GAAG,KAExC,EAAC,MAAA,CAAI,UAAU,qBACb,EAAC,EAAA,CAAM,GAAI,EAAM,KAAK,SAAS,UAAW,EAAG,YAAa,EAAU,EAAI,CACxE,EAAC,MAAA,CAAI,UAAU,iJACb,EAAC,EAAA,CAAW,KAAM,GAAA,CAAM,EACpB,CACN,EAAC,SAAA,CACC,UAAU,0XACV,aAAW,gBACX,KAAK,kBAEL,EAAC,EAAA,CAAe,KAAM,GAAI,cAAY,QAAS,EACxC,GACL"}
@@ -1,6 +1,6 @@
1
1
  import { Separator } from "./separator.cjs";
2
- import * as react285 from "react";
3
- import * as class_variance_authority_types8 from "class-variance-authority/types";
2
+ import * as react61 from "react";
3
+ import * as class_variance_authority_types4 from "class-variance-authority/types";
4
4
  import { VariantProps } from "class-variance-authority";
5
5
 
6
6
  //#region packages/components/ui/item.d.ts
@@ -28,16 +28,16 @@ import { VariantProps } from "class-variance-authority";
28
28
  declare function ItemGroup({
29
29
  className,
30
30
  ...props
31
- }: React.ComponentProps<'div'>): react285.JSX.Element;
31
+ }: React.ComponentProps<'div'>): react61.JSX.Element;
32
32
  /** Horizontal separator rendered between items in an ItemGroup. */
33
33
  declare function ItemSeparator({
34
34
  className,
35
35
  ...props
36
- }: React.ComponentProps<typeof Separator>): react285.JSX.Element;
36
+ }: React.ComponentProps<typeof Separator>): react61.JSX.Element;
37
37
  declare const itemVariants: (props?: ({
38
- variant?: "outline" | "muted" | "default" | null | undefined;
38
+ variant?: "default" | "outline" | "muted" | null | undefined;
39
39
  size?: "sm" | "default" | null | undefined;
40
- } & class_variance_authority_types8.ClassProp) | undefined) => string;
40
+ } & class_variance_authority_types4.ClassProp) | undefined) => string;
41
41
  /**
42
42
  * The primary row container inside an ItemGroup.
43
43
  *
@@ -53,10 +53,10 @@ declare function Item({
53
53
  ...props
54
54
  }: React.ComponentProps<'div'> & VariantProps<typeof itemVariants> & {
55
55
  asChild?: boolean;
56
- }): react285.JSX.Element;
56
+ }): react61.JSX.Element;
57
57
  declare const itemMediaVariants: (props?: ({
58
- variant?: "image" | "default" | "icon" | null | undefined;
59
- } & class_variance_authority_types8.ClassProp) | undefined) => string;
58
+ variant?: "default" | "image" | "icon" | null | undefined;
59
+ } & class_variance_authority_types4.ClassProp) | undefined) => string;
60
60
  /**
61
61
  * Left-aligned slot for an avatar, icon, or image within an Item.
62
62
  *
@@ -66,37 +66,37 @@ declare function ItemMedia({
66
66
  className,
67
67
  variant,
68
68
  ...props
69
- }: React.ComponentProps<'div'> & VariantProps<typeof itemMediaVariants>): react285.JSX.Element;
69
+ }: React.ComponentProps<'div'> & VariantProps<typeof itemMediaVariants>): react61.JSX.Element;
70
70
  /** Flex-1 column that holds the ItemTitle and ItemDescription. */
71
71
  declare function ItemContent({
72
72
  className,
73
73
  ...props
74
- }: React.ComponentProps<'div'>): react285.JSX.Element;
74
+ }: React.ComponentProps<'div'>): react61.JSX.Element;
75
75
  /** Primary label text rendered in medium weight inside an ItemContent. */
76
76
  declare function ItemTitle({
77
77
  className,
78
78
  ...props
79
- }: React.ComponentProps<'div'>): react285.JSX.Element;
79
+ }: React.ComponentProps<'div'>): react61.JSX.Element;
80
80
  /** Secondary, muted body text clamped to two lines inside an ItemContent. */
81
81
  declare function ItemDescription({
82
82
  className,
83
83
  ...props
84
- }: React.ComponentProps<'p'>): react285.JSX.Element;
84
+ }: React.ComponentProps<'p'>): react61.JSX.Element;
85
85
  /** Right-aligned slot for buttons or other interactive controls within an Item. */
86
86
  declare function ItemActions({
87
87
  className,
88
88
  ...props
89
- }: React.ComponentProps<'div'>): react285.JSX.Element;
89
+ }: React.ComponentProps<'div'>): react61.JSX.Element;
90
90
  /** Full-width row at the top of an Item for header-level labels or metadata. */
91
91
  declare function ItemHeader({
92
92
  className,
93
93
  ...props
94
- }: React.ComponentProps<'div'>): react285.JSX.Element;
94
+ }: React.ComponentProps<'div'>): react61.JSX.Element;
95
95
  /** Full-width row at the bottom of an Item for footer-level content or secondary actions. */
96
96
  declare function ItemFooter({
97
97
  className,
98
98
  ...props
99
- }: React.ComponentProps<'div'>): react285.JSX.Element;
99
+ }: React.ComponentProps<'div'>): react61.JSX.Element;
100
100
  //#endregion
101
101
  export { Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle };
102
102
  //# sourceMappingURL=item.d.cts.map
@@ -1,7 +1,7 @@
1
- import { Separator } from "./separator.mjs";
2
- import * as react171 from "react";
1
+ import { Separator } from "./separator.js";
2
+ import * as react255 from "react";
3
3
  import { VariantProps } from "class-variance-authority";
4
- import * as class_variance_authority_types5 from "class-variance-authority/types";
4
+ import * as class_variance_authority_types7 from "class-variance-authority/types";
5
5
 
6
6
  //#region packages/components/ui/item.d.ts
7
7
 
@@ -28,16 +28,16 @@ import * as class_variance_authority_types5 from "class-variance-authority/types
28
28
  declare function ItemGroup({
29
29
  className,
30
30
  ...props
31
- }: React.ComponentProps<'div'>): react171.JSX.Element;
31
+ }: React.ComponentProps<'div'>): react255.JSX.Element;
32
32
  /** Horizontal separator rendered between items in an ItemGroup. */
33
33
  declare function ItemSeparator({
34
34
  className,
35
35
  ...props
36
- }: React.ComponentProps<typeof Separator>): react171.JSX.Element;
36
+ }: React.ComponentProps<typeof Separator>): react255.JSX.Element;
37
37
  declare const itemVariants: (props?: ({
38
- variant?: "outline" | "muted" | "default" | null | undefined;
38
+ variant?: "default" | "outline" | "muted" | null | undefined;
39
39
  size?: "sm" | "default" | null | undefined;
40
- } & class_variance_authority_types5.ClassProp) | undefined) => string;
40
+ } & class_variance_authority_types7.ClassProp) | undefined) => string;
41
41
  /**
42
42
  * The primary row container inside an ItemGroup.
43
43
  *
@@ -53,10 +53,10 @@ declare function Item({
53
53
  ...props
54
54
  }: React.ComponentProps<'div'> & VariantProps<typeof itemVariants> & {
55
55
  asChild?: boolean;
56
- }): react171.JSX.Element;
56
+ }): react255.JSX.Element;
57
57
  declare const itemMediaVariants: (props?: ({
58
- variant?: "image" | "default" | "icon" | null | undefined;
59
- } & class_variance_authority_types5.ClassProp) | undefined) => string;
58
+ variant?: "default" | "image" | "icon" | null | undefined;
59
+ } & class_variance_authority_types7.ClassProp) | undefined) => string;
60
60
  /**
61
61
  * Left-aligned slot for an avatar, icon, or image within an Item.
62
62
  *
@@ -66,37 +66,37 @@ declare function ItemMedia({
66
66
  className,
67
67
  variant,
68
68
  ...props
69
- }: React.ComponentProps<'div'> & VariantProps<typeof itemMediaVariants>): react171.JSX.Element;
69
+ }: React.ComponentProps<'div'> & VariantProps<typeof itemMediaVariants>): react255.JSX.Element;
70
70
  /** Flex-1 column that holds the ItemTitle and ItemDescription. */
71
71
  declare function ItemContent({
72
72
  className,
73
73
  ...props
74
- }: React.ComponentProps<'div'>): react171.JSX.Element;
74
+ }: React.ComponentProps<'div'>): react255.JSX.Element;
75
75
  /** Primary label text rendered in medium weight inside an ItemContent. */
76
76
  declare function ItemTitle({
77
77
  className,
78
78
  ...props
79
- }: React.ComponentProps<'div'>): react171.JSX.Element;
79
+ }: React.ComponentProps<'div'>): react255.JSX.Element;
80
80
  /** Secondary, muted body text clamped to two lines inside an ItemContent. */
81
81
  declare function ItemDescription({
82
82
  className,
83
83
  ...props
84
- }: React.ComponentProps<'p'>): react171.JSX.Element;
84
+ }: React.ComponentProps<'p'>): react255.JSX.Element;
85
85
  /** Right-aligned slot for buttons or other interactive controls within an Item. */
86
86
  declare function ItemActions({
87
87
  className,
88
88
  ...props
89
- }: React.ComponentProps<'div'>): react171.JSX.Element;
89
+ }: React.ComponentProps<'div'>): react255.JSX.Element;
90
90
  /** Full-width row at the top of an Item for header-level labels or metadata. */
91
91
  declare function ItemHeader({
92
92
  className,
93
93
  ...props
94
- }: React.ComponentProps<'div'>): react171.JSX.Element;
94
+ }: React.ComponentProps<'div'>): react255.JSX.Element;
95
95
  /** Full-width row at the bottom of an Item for footer-level content or secondary actions. */
96
96
  declare function ItemFooter({
97
97
  className,
98
98
  ...props
99
- }: React.ComponentProps<'div'>): react171.JSX.Element;
99
+ }: React.ComponentProps<'div'>): react255.JSX.Element;
100
100
  //#endregion
101
101
  export { Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle };
102
- //# sourceMappingURL=item.d.mts.map
102
+ //# sourceMappingURL=item.d.ts.map
@@ -0,0 +1,2 @@
1
+ import{t as e}from"../dist-EPxjIRJp.js";import{t}from"../separator-BM8hA4DP.js";import{cn as n}from"@customafk/react-toolkit/utils";import{cva as r}from"class-variance-authority";import{jsx as i}from"react/jsx-runtime";function a({className:e,...t}){return i(`div`,{role:`list`,"data-slot":`item-group`,className:n(`group/item-group flex flex-col`,e),...t})}function o({className:e,...r}){return i(t,{"data-slot":`item-separator`,orientation:`horizontal`,className:n(`my-0`,e),...r})}const s=r(`group/item flex items-center border border-transparent text-sm rounded-md transition-colors [a]:hover:bg-accent/50 [a]:transition-colors duration-100 flex-wrap outline-none focus-visible:border-primary-strong focus-visible:ring-primary-weak focus-visible:ring-[3px]`,{variants:{variant:{default:`bg-transparent`,outline:`border-border`,muted:`bg-muted-weak`},size:{default:`p-4 gap-4 `,sm:`py-3 px-4 gap-2.5`}},defaultVariants:{variant:`default`,size:`default`}});function c({className:t,variant:r=`default`,size:a=`default`,asChild:o=!1,...c}){return i(o?e:`div`,{"data-slot":`item`,"data-variant":r,"data-size":a,className:n(s({variant:r,size:a,className:t})),...c})}const l=r(`flex shrink-0 items-center justify-center gap-2 group-has-[[data-slot=item-description]]/item:self-start [&_svg]:pointer-events-none group-has-[[data-slot=item-description]]/item:translate-y-0.5`,{variants:{variant:{default:`bg-transparent`,icon:`size-8 border rounded-sm bg-muted [&_svg:not([class*='size-'])]:size-4`,image:`size-10 rounded-sm overflow-hidden [&_img]:size-full [&_img]:object-cover`}},defaultVariants:{variant:`default`}});function u({className:e,variant:t=`default`,...r}){return i(`div`,{"data-slot":`item-media`,"data-variant":t,className:n(l({variant:t,className:e})),...r})}function d({className:e,...t}){return i(`div`,{"data-slot":`item-content`,className:n(`flex flex-1 flex-col gap-1 [&+[data-slot=item-content]]:flex-none`,e),...t})}function f({className:e,...t}){return i(`div`,{"data-slot":`item-title`,className:n(`flex w-fit items-center gap-2 text-sm leading-snug font-medium`,e),...t})}function p({className:e,...t}){return i(`p`,{"data-slot":`item-description`,className:n(`text-muted-foreground line-clamp-2 text-sm leading-normal font-normal text-balance`,`[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4`,e),...t})}function m({className:e,...t}){return i(`div`,{"data-slot":`item-actions`,className:n(`flex items-center gap-2`,e),...t})}function h({className:e,...t}){return i(`div`,{"data-slot":`item-header`,className:n(`flex basis-full items-center justify-between gap-2`,e),...t})}function g({className:e,...t}){return i(`div`,{"data-slot":`item-footer`,className:n(`flex basis-full items-center justify-between gap-2`,e),...t})}export{c as Item,m as ItemActions,d as ItemContent,p as ItemDescription,g as ItemFooter,a as ItemGroup,h as ItemHeader,u as ItemMedia,o as ItemSeparator,f as ItemTitle};
2
+ //# sourceMappingURL=item.js.map