@customafk/lunas-ui 0.2.45 → 0.2.48

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 (614) 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-C32Lwu87.d.cts → alert-CNFuxKp7.d.cts} +5 -5
  4. package/dist/{alert-Cx-dxCP5.d.mts → alert-EH6BsbAj.d.ts} +7 -7
  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-B6WaU_xD.d.mts → badge-Cca0AHjT.d.ts} +6 -6
  10. package/dist/{badge-C-IINKGX.d.cts → badge-D0JnPurs.d.cts} +6 -6
  11. package/dist/{button-BrRUQsVc.d.mts → button-Cr817M3U.d.cts} +5 -5
  12. package/dist/{button-9rG12f55.d.cts → button-DuZy_wDo.d.ts} +6 -6
  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 +3 -3
  60. package/dist/data-display/{statistic.d.mts → statistic.d.ts} +1 -1
  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-CsltUGHB.d.mts → dialog-C48T3MZN.d.cts} +12 -12
  67. package/dist/{dialog-C44AIKLb.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 +26 -26
  74. package/dist/dialogs/detail-dialog/components/{sidebar.d.mts → sidebar.d.ts} +29 -29
  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 +6 -6
  92. package/dist/features/descriptions/{index.d.mts → index.d.ts} +7 -7
  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.d.cts +1 -1
  102. package/dist/features/tanstack-form/{index.d.mts → index.d.ts} +1 -1
  103. package/dist/features/tanstack-form/index.js +1 -0
  104. package/dist/features/text-editor/index.d.cts +1 -1
  105. package/dist/features/text-editor/{index.d.mts → index.d.ts} +1 -1
  106. package/dist/features/text-editor/index.js +1 -0
  107. package/dist/field-DpoKF1nY.js +2 -0
  108. package/dist/field-DpoKF1nY.js.map +1 -0
  109. package/dist/{flex-B6YSJzGe.mjs → flex-CinRrgEy.js} +1 -1
  110. package/dist/flex-CinRrgEy.js.map +1 -0
  111. package/dist/{heading-De4Pn3mZ.mjs → heading-Bz-hSatD.js} +1 -1
  112. package/dist/heading-Bz-hSatD.js.map +1 -0
  113. package/dist/image-BpTuF_1w.js +2 -0
  114. package/dist/image-BpTuF_1w.js.map +1 -0
  115. package/dist/{index-DrmdHOJL.d.mts → index-Bc9X8pLk.d.cts} +6 -6
  116. package/dist/{index-Cm62M0Ft.d.mts → index-BlQGXGqt.d.ts} +1 -1
  117. package/dist/{index-Bpsn3Z_G.d.cts → index-C1O2C-cg.d.ts} +6 -6
  118. package/dist/{index-Cuhf_ZXn.d.cts → index-CgH0tiiC.d.cts} +30 -30
  119. package/dist/{index-ks5jfaQb.d.mts → index-D5u9CKyd.d.cts} +305 -305
  120. package/dist/{index-DgHXQffp.d.mts → index-DFUF27Yy.d.ts} +31 -31
  121. package/dist/{index-D8d60P7q.d.cts → index-Ilj04YNO.d.ts} +305 -305
  122. package/dist/index.d.cts +8 -8
  123. package/dist/{index.d.mts → index.d.ts} +92 -92
  124. package/dist/index.js +1 -0
  125. package/dist/{input-hFHi7RiN.d.mts → input-B_gst0eJ.d.cts} +6 -6
  126. package/dist/{input-ff6sQNN4.d.cts → input-BkHdaXGY.d.ts} +6 -6
  127. package/dist/{input-NJP2wQOm.mjs → input-DAfP6LZ7.js} +1 -1
  128. package/dist/input-DAfP6LZ7.js.map +1 -0
  129. package/dist/{label-CUCpwS5D.mjs → label-B8cAG2kc.js} +1 -1
  130. package/dist/label-B8cAG2kc.js.map +1 -0
  131. package/dist/layouts/cms-layout/index.d.ts +2 -0
  132. package/dist/layouts/cms-layout/index.js +1 -0
  133. package/dist/layouts/flex.d.cts +3 -3
  134. package/dist/layouts/{flex.d.mts → flex.d.ts} +6 -6
  135. package/dist/layouts/flex.js +1 -0
  136. package/dist/layouts/{grid.d.mts → grid.d.ts} +1 -1
  137. package/dist/layouts/{grid.mjs → grid.js} +1 -1
  138. package/dist/layouts/grid.js.map +1 -0
  139. package/dist/layouts/payment-layout/{index.d.mts → index.d.ts} +1 -1
  140. package/dist/layouts/payment-layout/index.js +1 -0
  141. package/dist/pages/FeatureDeveloping.d.cts +2 -2
  142. package/dist/pages/{FeatureDeveloping.d.mts → FeatureDeveloping.d.ts} +3 -3
  143. package/dist/pages/FeatureDeveloping.js +2 -0
  144. package/dist/pages/FeatureDeveloping.js.map +1 -0
  145. package/dist/pages/FeatureFixing.d.cts +2 -2
  146. package/dist/pages/{FeatureFixing.d.mts → FeatureFixing.d.ts} +3 -3
  147. package/dist/pages/FeatureFixing.js +2 -0
  148. package/dist/pages/FeatureFixing.js.map +1 -0
  149. package/dist/pages/LoginPage.d.cts +2 -2
  150. package/dist/pages/{LoginPage.d.mts → LoginPage.d.ts} +3 -3
  151. package/dist/pages/LoginPage.js +2 -0
  152. package/dist/pages/LoginPage.js.map +1 -0
  153. package/dist/pages/NotAuthorized.d.cts +2 -2
  154. package/dist/pages/{NotAuthorized.d.mts → NotAuthorized.d.ts} +3 -3
  155. package/dist/pages/NotAuthorized.js +2 -0
  156. package/dist/pages/NotAuthorized.js.map +1 -0
  157. package/dist/pages/NotFound.d.cts +2 -2
  158. package/dist/pages/{NotFound.d.mts → NotFound.d.ts} +3 -3
  159. package/dist/pages/NotFound.js +2 -0
  160. package/dist/pages/NotFound.js.map +1 -0
  161. package/dist/pages/RegisterPage.d.cts +2 -2
  162. package/dist/pages/{RegisterPage.d.mts → RegisterPage.d.ts} +3 -3
  163. package/dist/pages/RegisterPage.js +2 -0
  164. package/dist/pages/RegisterPage.js.map +1 -0
  165. package/dist/pages/VerifyEmailPage.d.cts +2 -2
  166. package/dist/pages/{VerifyEmailPage.d.mts → VerifyEmailPage.d.ts} +3 -3
  167. package/dist/pages/VerifyEmailPage.js +2 -0
  168. package/dist/pages/VerifyEmailPage.js.map +1 -0
  169. package/dist/{paragraph-DYLaQtTV.mjs → paragraph-Cc13ZI4d.js} +1 -1
  170. package/dist/paragraph-Cc13ZI4d.js.map +1 -0
  171. package/dist/payment-layout-giaGvs8T.js +2 -0
  172. package/dist/payment-layout-giaGvs8T.js.map +1 -0
  173. package/dist/popover-6233wU1s.js +2 -0
  174. package/dist/popover-6233wU1s.js.map +1 -0
  175. package/dist/{progress-CLeM0e7Z.mjs → progress-AYknlEgK.js} +1 -1
  176. package/dist/progress-AYknlEgK.js.map +1 -0
  177. package/dist/{radio-group-Y9bhdr55.mjs → radio-group-ImoBjpqZ.js} +1 -1
  178. package/dist/radio-group-ImoBjpqZ.js.map +1 -0
  179. package/dist/{resizable-CpCaSCFB.mjs → resizable-C-M-mu6b.js} +1 -1
  180. package/dist/resizable-C-M-mu6b.js.map +1 -0
  181. package/dist/search-modal-b2AE5WEW.js +2 -0
  182. package/dist/search-modal-b2AE5WEW.js.map +1 -0
  183. package/dist/{select-LlPCZFSF.mjs → select-CryLzZA0.js} +1 -1
  184. package/dist/select-CryLzZA0.js.map +1 -0
  185. package/dist/{separator-D3Gmkxzq.mjs → separator-BM8hA4DP.js} +1 -1
  186. package/dist/separator-BM8hA4DP.js.map +1 -0
  187. package/dist/{sheet-BFlIfNaA.mjs → sheet-DGXXYgWB.js} +1 -1
  188. package/dist/sheet-DGXXYgWB.js.map +1 -0
  189. package/dist/sidebar-BDrsbzo5.js +2 -0
  190. package/dist/sidebar-BDrsbzo5.js.map +1 -0
  191. package/dist/{skeleton-C51IdOfK.mjs → skeleton-DlRDNM97.js} +1 -1
  192. package/dist/skeleton-DlRDNM97.js.map +1 -0
  193. package/dist/{spinner-eClTgHjk.mjs → spinner-C1eamx3w.js} +1 -1
  194. package/dist/spinner-C1eamx3w.js.map +1 -0
  195. package/dist/{statistic-cwLwcukn.mjs → statistic-CYMqAYNc.js} +1 -1
  196. package/dist/statistic-CYMqAYNc.js.map +1 -0
  197. package/dist/{switch-BP7EPatj.mjs → switch-BLHmdRq2.js} +1 -1
  198. package/dist/switch-BLHmdRq2.js.map +1 -0
  199. package/dist/systems/{google.d.mts → google.d.ts} +1 -1
  200. package/dist/systems/{google.mjs → google.js} +1 -1
  201. package/dist/systems/google.js.map +1 -0
  202. package/dist/tables-DWQytYNm.js +4 -0
  203. package/dist/tables-DWQytYNm.js.map +1 -0
  204. package/dist/tanstack-form-CCDV-3Ml.js +12 -0
  205. package/dist/tanstack-form-CCDV-3Ml.js.map +1 -0
  206. package/dist/text-editor-WbS7pJJs.js +2 -0
  207. package/dist/text-editor-WbS7pJJs.js.map +1 -0
  208. package/dist/{textarea-7HDXcaK9.mjs → textarea-Bp6VvhiA.js} +1 -1
  209. package/dist/textarea-Bp6VvhiA.js.map +1 -0
  210. package/dist/{tooltip-Dxl5Wa8i.mjs → tooltip-CVIl6Hln.js} +1 -1
  211. package/dist/tooltip-CVIl6Hln.js.map +1 -0
  212. package/dist/{types-YLu40dXY.d.mts → types-BVSfF-1o.d.ts} +1 -1
  213. package/dist/{types-B5nyTWtO.mjs → types-BZqffRVJ.js} +1 -1
  214. package/dist/types-BZqffRVJ.js.map +1 -0
  215. package/dist/typography/paragraph.d.cts +5 -5
  216. package/dist/typography/{paragraph.d.mts → paragraph.d.ts} +6 -6
  217. package/dist/typography/paragraph.js +1 -0
  218. package/dist/typography/{title.d.mts → title.d.ts} +1 -1
  219. package/dist/typography/{title.mjs → title.js} +1 -1
  220. package/dist/typography/title.js.map +1 -0
  221. package/dist/ui/alert-dialog.d.cts +12 -12
  222. package/dist/ui/{alert-dialog.d.mts → alert-dialog.d.ts} +13 -13
  223. package/dist/ui/alert-dialog.js +2 -0
  224. package/dist/ui/alert-dialog.js.map +1 -0
  225. package/dist/ui/alert.d.cts +1 -1
  226. package/dist/ui/{alert.d.mts → alert.d.ts} +1 -1
  227. package/dist/ui/alert.js +1 -0
  228. package/dist/ui/aspect-ratio.d.cts +2 -2
  229. package/dist/ui/{aspect-ratio.d.mts → aspect-ratio.d.ts} +3 -3
  230. package/dist/ui/{aspect-ratio.mjs → aspect-ratio.js} +1 -1
  231. package/dist/ui/aspect-ratio.js.map +1 -0
  232. package/dist/ui/avatar.d.cts +4 -4
  233. package/dist/ui/{avatar.d.mts → avatar.d.ts} +5 -5
  234. package/dist/ui/avatar.js +1 -0
  235. package/dist/ui/badge.d.cts +1 -1
  236. package/dist/ui/badge.d.ts +2 -0
  237. package/dist/ui/badge.js +1 -0
  238. package/dist/ui/breadcrumb.d.cts +8 -8
  239. package/dist/ui/{breadcrumb.d.mts → breadcrumb.d.ts} +9 -9
  240. package/dist/ui/breadcrumb.js +2 -0
  241. package/dist/ui/breadcrumb.js.map +1 -0
  242. package/dist/ui/button-group.d.cts +6 -6
  243. package/dist/ui/{button-group.d.mts → button-group.d.ts} +6 -6
  244. package/dist/ui/button-group.js +2 -0
  245. package/dist/ui/button-group.js.map +1 -0
  246. package/dist/ui/button.d.cts +1 -1
  247. package/dist/ui/button.d.ts +2 -0
  248. package/dist/ui/button.js +1 -0
  249. package/dist/ui/buttons/{add-new.d.mts → add-new.d.ts} +1 -1
  250. package/dist/ui/buttons/add-new.js +2 -0
  251. package/dist/ui/buttons/add-new.js.map +1 -0
  252. package/dist/ui/buttons/{edit.d.mts → edit.d.ts} +1 -1
  253. package/dist/ui/buttons/edit.js +2 -0
  254. package/dist/ui/buttons/edit.js.map +1 -0
  255. package/dist/ui/buttons/{refresh.d.mts → refresh.d.ts} +1 -1
  256. package/dist/ui/buttons/refresh.js +2 -0
  257. package/dist/ui/buttons/refresh.js.map +1 -0
  258. package/dist/ui/buttons/{trash.d.mts → trash.d.ts} +1 -1
  259. package/dist/ui/buttons/trash.js +2 -0
  260. package/dist/ui/buttons/trash.js.map +1 -0
  261. package/dist/ui/buttons/{upload-image.d.mts → upload-image.d.ts} +1 -1
  262. package/dist/ui/buttons/upload-image.js +2 -0
  263. package/dist/ui/buttons/upload-image.js.map +1 -0
  264. package/dist/ui/calendar.d.cts +4 -4
  265. package/dist/ui/{calendar.d.mts → calendar.d.ts} +5 -5
  266. package/dist/ui/calendar.js +1 -0
  267. package/dist/ui/card.d.cts +8 -8
  268. package/dist/ui/{card.d.mts → card.d.ts} +9 -9
  269. package/dist/ui/card.js +2 -0
  270. package/dist/ui/card.js.map +1 -0
  271. package/dist/ui/carousel.d.cts +7 -7
  272. package/dist/ui/{carousel.d.mts → carousel.d.ts} +8 -8
  273. package/dist/ui/carousel.js +2 -0
  274. package/dist/ui/carousel.js.map +1 -0
  275. package/dist/ui/checkbox.d.cts +2 -2
  276. package/dist/ui/{checkbox.d.mts → checkbox.d.ts} +3 -3
  277. package/dist/ui/checkbox.js +1 -0
  278. package/dist/ui/collapsible.d.cts +4 -4
  279. package/dist/ui/{collapsible.d.mts → collapsible.d.ts} +5 -5
  280. package/dist/ui/{collapsible.mjs → collapsible.js} +1 -1
  281. package/dist/ui/collapsible.js.map +1 -0
  282. package/dist/ui/command.d.cts +11 -11
  283. package/dist/ui/{command.d.mts → command.d.ts} +12 -12
  284. package/dist/ui/command.js +1 -0
  285. package/dist/ui/context-menu.d.cts +16 -16
  286. package/dist/ui/{context-menu.d.mts → context-menu.d.ts} +17 -17
  287. package/dist/ui/{context-menu.mjs → context-menu.js} +1 -1
  288. package/dist/ui/context-menu.js.map +1 -0
  289. package/dist/ui/dialog.d.cts +1 -1
  290. package/dist/ui/{dialog.d.mts → dialog.d.ts} +1 -1
  291. package/dist/ui/dialog.js +1 -0
  292. package/dist/ui/drawer.d.cts +11 -11
  293. package/dist/ui/{drawer.d.mts → drawer.d.ts} +12 -12
  294. package/dist/ui/drawer.js +1 -0
  295. package/dist/ui/dropdown-menu.d.cts +16 -16
  296. package/dist/ui/{dropdown-menu.d.mts → dropdown-menu.d.ts} +17 -17
  297. package/dist/ui/dropdown-menu.js +1 -0
  298. package/dist/ui/empty.d.cts +9 -9
  299. package/dist/ui/{empty.d.mts → empty.d.ts} +10 -10
  300. package/dist/ui/{empty.mjs → empty.js} +1 -1
  301. package/dist/ui/empty.js.map +1 -0
  302. package/dist/ui/field.d.cts +23 -23
  303. package/dist/ui/field.d.ts +65 -0
  304. package/dist/ui/field.js +1 -0
  305. package/dist/ui/file-uploader.d.cts +2 -2
  306. package/dist/ui/{file-uploader.d.mts → file-uploader.d.ts} +3 -3
  307. package/dist/ui/file-uploader.js +3 -0
  308. package/dist/ui/file-uploader.js.map +1 -0
  309. package/dist/ui/form.d.cts +10 -10
  310. package/dist/ui/{form.d.mts → form.d.ts} +11 -11
  311. package/dist/ui/form.js +2 -0
  312. package/dist/ui/form.js.map +1 -0
  313. package/dist/ui/hover-card.d.cts +4 -4
  314. package/dist/ui/{hover-card.d.mts → hover-card.d.ts} +5 -5
  315. package/dist/ui/{hover-card.mjs → hover-card.js} +1 -1
  316. package/dist/ui/hover-card.js.map +1 -0
  317. package/dist/ui/{image.d.mts → image.d.ts} +1 -1
  318. package/dist/ui/image.js +1 -0
  319. package/dist/ui/input-otp.d.cts +5 -5
  320. package/dist/ui/{input-otp.d.mts → input-otp.d.ts} +6 -6
  321. package/dist/ui/{input-otp.mjs → input-otp.js} +1 -1
  322. package/dist/ui/input-otp.js.map +1 -0
  323. package/dist/ui/input.d.cts +1 -1
  324. package/dist/ui/input.d.ts +2 -0
  325. package/dist/ui/input.js +1 -0
  326. package/dist/ui/inputs/search-input.d.cts +3 -3
  327. package/dist/ui/inputs/{search-input.d.mts → search-input.d.ts} +4 -4
  328. package/dist/ui/inputs/search-input.js +2 -0
  329. package/dist/ui/inputs/search-input.js.map +1 -0
  330. package/dist/ui/item.d.cts +14 -14
  331. package/dist/ui/{item.d.mts → item.d.ts} +13 -13
  332. package/dist/ui/item.js +2 -0
  333. package/dist/ui/item.js.map +1 -0
  334. package/dist/ui/label.d.cts +2 -2
  335. package/dist/ui/{label.d.mts → label.d.ts} +3 -3
  336. package/dist/ui/label.js +1 -0
  337. package/dist/ui/menubar.d.cts +17 -17
  338. package/dist/ui/{menubar.d.mts → menubar.d.ts} +18 -18
  339. package/dist/ui/{menubar.mjs → menubar.js} +1 -1
  340. package/dist/ui/menubar.js.map +1 -0
  341. package/dist/ui/multi-select.d.cts +2 -2
  342. package/dist/ui/{multi-select.d.mts → multi-select.d.ts} +5 -5
  343. package/dist/ui/multi-select.js +2 -0
  344. package/dist/ui/multi-select.js.map +1 -0
  345. package/dist/ui/navigation-menu.d.cts +9 -9
  346. package/dist/ui/{navigation-menu.d.mts → navigation-menu.d.ts} +12 -12
  347. package/dist/ui/{navigation-menu.mjs → navigation-menu.js} +1 -1
  348. package/dist/ui/navigation-menu.js.map +1 -0
  349. package/dist/ui/pagination.d.cts +9 -9
  350. package/dist/ui/{pagination.d.mts → pagination.d.ts} +10 -10
  351. package/dist/ui/pagination.js +2 -0
  352. package/dist/ui/pagination.js.map +1 -0
  353. package/dist/ui/popover.d.cts +6 -6
  354. package/dist/ui/{popover.d.mts → popover.d.ts} +7 -7
  355. package/dist/ui/popover.js +1 -0
  356. package/dist/ui/progress.d.cts +2 -2
  357. package/dist/ui/{progress.d.mts → progress.d.ts} +3 -3
  358. package/dist/ui/progress.js +1 -0
  359. package/dist/ui/radio-group.d.cts +3 -3
  360. package/dist/ui/{radio-group.d.mts → radio-group.d.ts} +4 -4
  361. package/dist/ui/radio-group.js +1 -0
  362. package/dist/ui/resizable.d.cts +9 -9
  363. package/dist/ui/{resizable.d.mts → resizable.d.ts} +10 -10
  364. package/dist/ui/resizable.js +1 -0
  365. package/dist/ui/scroll-area.d.cts +5 -5
  366. package/dist/ui/{scroll-area.d.mts → scroll-area.d.ts} +6 -6
  367. package/dist/ui/{scroll-area.mjs → scroll-area.js} +1 -1
  368. package/dist/ui/scroll-area.js.map +1 -0
  369. package/dist/ui/select.d.cts +9 -9
  370. package/dist/ui/{select.d.mts → select.d.ts} +10 -10
  371. package/dist/ui/select.js +1 -0
  372. package/dist/ui/separator.d.cts +2 -2
  373. package/dist/ui/{separator.d.mts → separator.d.ts} +3 -3
  374. package/dist/ui/separator.js +1 -0
  375. package/dist/ui/sheet.d.cts +9 -9
  376. package/dist/ui/{sheet.d.mts → sheet.d.ts} +10 -10
  377. package/dist/ui/sheet.js +1 -0
  378. package/dist/ui/skeleton.d.cts +2 -2
  379. package/dist/ui/{skeleton.d.mts → skeleton.d.ts} +3 -3
  380. package/dist/ui/skeleton.js +1 -0
  381. package/dist/ui/slider.d.cts +2 -2
  382. package/dist/ui/{slider.d.mts → slider.d.ts} +3 -3
  383. package/dist/ui/{slider.mjs → slider.js} +1 -1
  384. package/dist/ui/slider.js.map +1 -0
  385. package/dist/ui/sonner.d.cts +2 -2
  386. package/dist/ui/{sonner.d.mts → sonner.d.ts} +3 -3
  387. package/dist/ui/{sonner.mjs → sonner.js} +1 -1
  388. package/dist/ui/sonner.js.map +1 -0
  389. package/dist/ui/spinner.d.cts +2 -2
  390. package/dist/ui/{spinner.d.mts → spinner.d.ts} +3 -3
  391. package/dist/ui/spinner.js +1 -0
  392. package/dist/ui/switch.d.cts +2 -2
  393. package/dist/ui/{switch.d.mts → switch.d.ts} +3 -3
  394. package/dist/ui/switch.js +1 -0
  395. package/dist/ui/table.d.cts +17 -17
  396. package/dist/ui/{table.d.mts → table.d.ts} +18 -18
  397. package/dist/ui/{table.mjs → table.js} +1 -1
  398. package/dist/ui/table.js.map +1 -0
  399. package/dist/ui/tabs.d.cts +5 -5
  400. package/dist/ui/{tabs.d.mts → tabs.d.ts} +6 -6
  401. package/dist/ui/{tabs.mjs → tabs.js} +1 -1
  402. package/dist/ui/tabs.js.map +1 -0
  403. package/dist/ui/textarea.d.cts +2 -2
  404. package/dist/ui/{textarea.d.mts → textarea.d.ts} +3 -3
  405. package/dist/ui/textarea.js +1 -0
  406. package/dist/ui/toggle-group.d.cts +3 -3
  407. package/dist/ui/{toggle-group.d.mts → toggle-group.d.ts} +5 -5
  408. package/dist/ui/toggle-group.js +2 -0
  409. package/dist/ui/toggle-group.js.map +1 -0
  410. package/dist/ui/toggle.d.cts +4 -4
  411. package/dist/ui/{toggle.d.mts → toggle.d.ts} +5 -5
  412. package/dist/ui/{toggle.mjs → toggle.js} +1 -1
  413. package/dist/ui/toggle.js.map +1 -0
  414. package/dist/ui/tooltip.d.cts +5 -5
  415. package/dist/ui/{tooltip.d.mts → tooltip.d.ts} +6 -6
  416. package/dist/ui/tooltip.js +1 -0
  417. package/dist/user-BSpgswEC.js +2 -0
  418. package/dist/user-BSpgswEC.js.map +1 -0
  419. package/package.json +97 -97
  420. package/dist/alert-BbvPwf2x.mjs.map +0 -1
  421. package/dist/avatar-fltdRVsJ.mjs.map +0 -1
  422. package/dist/badge-CDGBGq8X.mjs.map +0 -1
  423. package/dist/button-CCVJTHBI.mjs +0 -2
  424. package/dist/button-CCVJTHBI.mjs.map +0 -1
  425. package/dist/button.variants-DkMqWB8G.mjs.map +0 -1
  426. package/dist/calendar-R866yyd1.mjs +0 -2
  427. package/dist/calendar-R866yyd1.mjs.map +0 -1
  428. package/dist/cards/grid-product-card.mjs +0 -2
  429. package/dist/cards/grid-product-card.mjs.map +0 -1
  430. package/dist/cards/product-card.mjs +0 -2
  431. package/dist/cards/product-card.mjs.map +0 -1
  432. package/dist/cards/simple-card.mjs +0 -2
  433. package/dist/cards/simple-card.mjs.map +0 -1
  434. package/dist/checkbox-Cat3i08X.mjs.map +0 -1
  435. package/dist/close-_UHFeiLS.mjs.map +0 -1
  436. package/dist/cms-layout-DkCR1AfG.mjs +0 -2
  437. package/dist/cms-layout-DkCR1AfG.mjs.map +0 -1
  438. package/dist/command-D6_CSbwJ.mjs +0 -2
  439. package/dist/command-D6_CSbwJ.mjs.map +0 -1
  440. package/dist/data-display/country.mjs +0 -2
  441. package/dist/data-display/country.mjs.map +0 -1
  442. package/dist/data-display/data-list.mjs.map +0 -1
  443. package/dist/data-display/date-tooltip.mjs +0 -2
  444. package/dist/data-display/date-tooltip.mjs.map +0 -1
  445. package/dist/data-display/date.mjs +0 -1
  446. package/dist/data-display/empty.mjs.map +0 -1
  447. package/dist/data-display/name.mjs +0 -2
  448. package/dist/data-display/name.mjs.map +0 -1
  449. package/dist/data-display/phone-number.mjs +0 -2
  450. package/dist/data-display/phone-number.mjs.map +0 -1
  451. package/dist/data-display/role-badge.mjs +0 -2
  452. package/dist/data-display/role-badge.mjs.map +0 -1
  453. package/dist/data-display/statistic.mjs +0 -1
  454. package/dist/data-display/user.mjs +0 -1
  455. package/dist/date-fY3sUcLp.mjs.map +0 -1
  456. package/dist/dialog-CLDnvNH_.mjs +0 -2
  457. package/dist/dialog-CLDnvNH_.mjs.map +0 -1
  458. package/dist/dialogs/confirm-dialog.mjs +0 -2
  459. package/dist/dialogs/confirm-dialog.mjs.map +0 -1
  460. package/dist/dialogs/detail-dialog/components/sidebar.mjs +0 -1
  461. package/dist/dialogs/detail-dialog/index.mjs +0 -2
  462. package/dist/dialogs/detail-dialog/index.mjs.map +0 -1
  463. package/dist/dialogs/error-dialog.mjs +0 -2
  464. package/dist/dialogs/error-dialog.mjs.map +0 -1
  465. package/dist/dialogs/loading-dialog.mjs +0 -2
  466. package/dist/dialogs/loading-dialog.mjs.map +0 -1
  467. package/dist/dist-DVrfqn8H.mjs.map +0 -1
  468. package/dist/drawer-CMD7JWH8.mjs.map +0 -1
  469. package/dist/dropdown-menu-BWhiVsEf.mjs.map +0 -1
  470. package/dist/features/descriptions/index.mjs +0 -2
  471. package/dist/features/descriptions/index.mjs.map +0 -1
  472. package/dist/features/search-modal/index.mjs +0 -1
  473. package/dist/features/tables/index.mjs +0 -1
  474. package/dist/features/tanstack-form/index.mjs +0 -1
  475. package/dist/features/text-editor/index.mjs +0 -1
  476. package/dist/field-dYemS0hQ.mjs +0 -2
  477. package/dist/field-dYemS0hQ.mjs.map +0 -1
  478. package/dist/flex-B6YSJzGe.mjs.map +0 -1
  479. package/dist/heading-De4Pn3mZ.mjs.map +0 -1
  480. package/dist/image-D7OZ13Ib.mjs +0 -2
  481. package/dist/image-D7OZ13Ib.mjs.map +0 -1
  482. package/dist/index.mjs +0 -1
  483. package/dist/input-NJP2wQOm.mjs.map +0 -1
  484. package/dist/label-CUCpwS5D.mjs.map +0 -1
  485. package/dist/layouts/cms-layout/index.d.mts +0 -2
  486. package/dist/layouts/cms-layout/index.mjs +0 -1
  487. package/dist/layouts/flex.mjs +0 -1
  488. package/dist/layouts/grid.mjs.map +0 -1
  489. package/dist/layouts/payment-layout/index.mjs +0 -1
  490. package/dist/pages/FeatureDeveloping.mjs +0 -2
  491. package/dist/pages/FeatureDeveloping.mjs.map +0 -1
  492. package/dist/pages/FeatureFixing.mjs +0 -2
  493. package/dist/pages/FeatureFixing.mjs.map +0 -1
  494. package/dist/pages/LoginPage.mjs +0 -2
  495. package/dist/pages/LoginPage.mjs.map +0 -1
  496. package/dist/pages/NotAuthorized.mjs +0 -2
  497. package/dist/pages/NotAuthorized.mjs.map +0 -1
  498. package/dist/pages/NotFound.mjs +0 -2
  499. package/dist/pages/NotFound.mjs.map +0 -1
  500. package/dist/pages/RegisterPage.mjs +0 -2
  501. package/dist/pages/RegisterPage.mjs.map +0 -1
  502. package/dist/pages/VerifyEmailPage.mjs +0 -2
  503. package/dist/pages/VerifyEmailPage.mjs.map +0 -1
  504. package/dist/paragraph-DYLaQtTV.mjs.map +0 -1
  505. package/dist/payment-layout-DrQ0kZPX.mjs +0 -2
  506. package/dist/payment-layout-DrQ0kZPX.mjs.map +0 -1
  507. package/dist/popover-C8rcemA3.mjs +0 -2
  508. package/dist/popover-C8rcemA3.mjs.map +0 -1
  509. package/dist/progress-CLeM0e7Z.mjs.map +0 -1
  510. package/dist/radio-group-Y9bhdr55.mjs.map +0 -1
  511. package/dist/resizable-CpCaSCFB.mjs.map +0 -1
  512. package/dist/search-modal-Bn-GOOCy.mjs +0 -2
  513. package/dist/search-modal-Bn-GOOCy.mjs.map +0 -1
  514. package/dist/select-LlPCZFSF.mjs.map +0 -1
  515. package/dist/separator-D3Gmkxzq.mjs.map +0 -1
  516. package/dist/sheet-BFlIfNaA.mjs.map +0 -1
  517. package/dist/sidebar-ChtCyu-n.mjs +0 -2
  518. package/dist/sidebar-ChtCyu-n.mjs.map +0 -1
  519. package/dist/skeleton-C51IdOfK.mjs.map +0 -1
  520. package/dist/spinner-eClTgHjk.mjs.map +0 -1
  521. package/dist/statistic-cwLwcukn.mjs.map +0 -1
  522. package/dist/switch-BP7EPatj.mjs.map +0 -1
  523. package/dist/systems/google.mjs.map +0 -1
  524. package/dist/tables-CFrsk2lM.mjs +0 -4
  525. package/dist/tables-CFrsk2lM.mjs.map +0 -1
  526. package/dist/tanstack-form-C_pyibTQ.mjs +0 -12
  527. package/dist/tanstack-form-C_pyibTQ.mjs.map +0 -1
  528. package/dist/text-editor-5mA7XyaI.mjs +0 -2
  529. package/dist/text-editor-5mA7XyaI.mjs.map +0 -1
  530. package/dist/textarea-7HDXcaK9.mjs.map +0 -1
  531. package/dist/tooltip-Dxl5Wa8i.mjs.map +0 -1
  532. package/dist/types-B5nyTWtO.mjs.map +0 -1
  533. package/dist/typography/paragraph.mjs +0 -1
  534. package/dist/typography/title.mjs.map +0 -1
  535. package/dist/ui/alert-dialog.mjs +0 -2
  536. package/dist/ui/alert-dialog.mjs.map +0 -1
  537. package/dist/ui/alert.mjs +0 -1
  538. package/dist/ui/aspect-ratio.mjs.map +0 -1
  539. package/dist/ui/avatar.mjs +0 -1
  540. package/dist/ui/badge.d.mts +0 -2
  541. package/dist/ui/badge.mjs +0 -1
  542. package/dist/ui/breadcrumb.mjs +0 -2
  543. package/dist/ui/breadcrumb.mjs.map +0 -1
  544. package/dist/ui/button-group.mjs +0 -2
  545. package/dist/ui/button-group.mjs.map +0 -1
  546. package/dist/ui/button.d.mts +0 -2
  547. package/dist/ui/button.mjs +0 -1
  548. package/dist/ui/buttons/add-new.mjs +0 -2
  549. package/dist/ui/buttons/add-new.mjs.map +0 -1
  550. package/dist/ui/buttons/edit.mjs +0 -2
  551. package/dist/ui/buttons/edit.mjs.map +0 -1
  552. package/dist/ui/buttons/refresh.mjs +0 -2
  553. package/dist/ui/buttons/refresh.mjs.map +0 -1
  554. package/dist/ui/buttons/trash.mjs +0 -2
  555. package/dist/ui/buttons/trash.mjs.map +0 -1
  556. package/dist/ui/buttons/upload-image.mjs +0 -2
  557. package/dist/ui/buttons/upload-image.mjs.map +0 -1
  558. package/dist/ui/calendar.mjs +0 -1
  559. package/dist/ui/card.mjs +0 -2
  560. package/dist/ui/card.mjs.map +0 -1
  561. package/dist/ui/carousel.mjs +0 -2
  562. package/dist/ui/carousel.mjs.map +0 -1
  563. package/dist/ui/checkbox.mjs +0 -1
  564. package/dist/ui/collapsible.mjs.map +0 -1
  565. package/dist/ui/command.mjs +0 -1
  566. package/dist/ui/context-menu.mjs.map +0 -1
  567. package/dist/ui/dialog.mjs +0 -1
  568. package/dist/ui/drawer.mjs +0 -1
  569. package/dist/ui/dropdown-menu.mjs +0 -1
  570. package/dist/ui/empty.mjs.map +0 -1
  571. package/dist/ui/field.d.mts +0 -65
  572. package/dist/ui/field.mjs +0 -1
  573. package/dist/ui/file-uploader.mjs +0 -3
  574. package/dist/ui/file-uploader.mjs.map +0 -1
  575. package/dist/ui/form.mjs +0 -2
  576. package/dist/ui/form.mjs.map +0 -1
  577. package/dist/ui/hover-card.mjs.map +0 -1
  578. package/dist/ui/image.mjs +0 -1
  579. package/dist/ui/input-otp.mjs.map +0 -1
  580. package/dist/ui/input.d.mts +0 -2
  581. package/dist/ui/input.mjs +0 -1
  582. package/dist/ui/inputs/search-input.mjs +0 -2
  583. package/dist/ui/inputs/search-input.mjs.map +0 -1
  584. package/dist/ui/item.mjs +0 -2
  585. package/dist/ui/item.mjs.map +0 -1
  586. package/dist/ui/label.mjs +0 -1
  587. package/dist/ui/menubar.mjs.map +0 -1
  588. package/dist/ui/multi-select.mjs +0 -2
  589. package/dist/ui/multi-select.mjs.map +0 -1
  590. package/dist/ui/navigation-menu.mjs.map +0 -1
  591. package/dist/ui/pagination.mjs +0 -2
  592. package/dist/ui/pagination.mjs.map +0 -1
  593. package/dist/ui/popover.mjs +0 -1
  594. package/dist/ui/progress.mjs +0 -1
  595. package/dist/ui/radio-group.mjs +0 -1
  596. package/dist/ui/resizable.mjs +0 -1
  597. package/dist/ui/scroll-area.mjs.map +0 -1
  598. package/dist/ui/select.mjs +0 -1
  599. package/dist/ui/separator.mjs +0 -1
  600. package/dist/ui/sheet.mjs +0 -1
  601. package/dist/ui/skeleton.mjs +0 -1
  602. package/dist/ui/slider.mjs.map +0 -1
  603. package/dist/ui/sonner.mjs.map +0 -1
  604. package/dist/ui/spinner.mjs +0 -1
  605. package/dist/ui/switch.mjs +0 -1
  606. package/dist/ui/table.mjs.map +0 -1
  607. package/dist/ui/tabs.mjs.map +0 -1
  608. package/dist/ui/textarea.mjs +0 -1
  609. package/dist/ui/toggle-group.mjs +0 -2
  610. package/dist/ui/toggle-group.mjs.map +0 -1
  611. package/dist/ui/toggle.mjs.map +0 -1
  612. package/dist/ui/tooltip.mjs +0 -1
  613. package/dist/user-DtZy4P9d.mjs +0 -2
  614. package/dist/user-DtZy4P9d.mjs.map +0 -1
@@ -0,0 +1,12 @@
1
+ import{t as e}from"./button-LMMbL-uH.js";import{i as t,n,t as r}from"./tooltip-CVIl6Hln.js";import{t as i}from"./separator-BM8hA4DP.js";import{t as a}from"./close-C0PdZGxr.js";import{c as o,l as s,n as c,r as l,s as u,t as d}from"./dialog-CmutQ3rp.js";import{a as f,i as p,o as m,r as h,s as g,t as _}from"./command-2gUejA6g.js";import{t as v}from"./checkbox-DLGDoU-1.js";import{t as y}from"./input-DAfP6LZ7.js";import{t as b}from"./label-B8cAG2kc.js";import{a as x,i as S,t as C}from"./popover-6233wU1s.js";import{c as w,i as T,n as E,s as D,t as O}from"./select-CryLzZA0.js";import{t as k}from"./switch-BLHmdRq2.js";import{l as A,n as j,o as M,r as ee,t as te}from"./drawer-B3qXaN5p.js";import{t as ne}from"./calendar-DzPt7b6k.js";import{n as re,t as ie}from"./radio-group-ImoBjpqZ.js";import{t as ae}from"./textarea-Bp6VvhiA.js";import{t as oe}from"./text-editor-WbS7pJJs.js";import{ArrowDownToLine as se,AtSignIcon as ce,BanIcon as le,CalendarDaysIcon as ue,CheckIcon as de,ChevronDownIcon as fe,CopyIcon as pe,EyeIcon as me,EyeOffIcon as he,HelpCircleIcon as ge,InfoIcon as _e,Loader2Icon as ve,PackagePlusIcon as ye,PlusIcon as be,Trash2Icon as xe,XIcon as N}from"lucide-react";import{memo as P,useCallback as F,useEffect as Se,useId as I,useMemo as Ce,useRef as we,useState as L}from"react";import{cn as R}from"@customafk/react-toolkit/utils";import{cva as Te}from"class-variance-authority";import{Fragment as Ee,jsx as z,jsxs as B}from"react/jsx-runtime";import{endOfToday as De,endOfTomorrow as Oe,endOfYesterday as ke,format as Ae,lastDayOfMonth as je,startOfMonth as Me,subDays as Ne}from"@customafk/react-toolkit/date-fns";import{Dialog as V,Label as Pe,Separator as Fe,Switch as Ie}from"radix-ui";import{useIsMobile as Le}from"@customafk/react-toolkit/hooks/useMobile";import{createFormHook as Re,createFormHookContexts as ze}from"@tanstack/react-form";var Be=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ve=(e=>typeof require<`u`?require:typeof Proxy<`u`?new Proxy(e,{get:(e,t)=>(typeof require<`u`?require:e)[t]}):e)(function(e){if(typeof require<`u`)return require.apply(this,arguments);throw Error('Calling `require` for "'+e+"\" in an environment that doesn't expose the `require` function.")});function He({width:e,className:t,children:n}){let r=e?{width:typeof e==`number`?`${e}px`:e,flexShrink:0}:{flex:1,minWidth:0};return z(`div`,{"data-slot":`array-col`,style:r,className:t,children:n})}function Ue({className:e,children:t}){return B(`div`,{"data-slot":`array-header-row`,className:R(`mb-1 flex items-center gap-2 px-1 text-xs font-medium text-text-positive-weak`,e),children:[t,z(`div`,{className:`min-w-8 w-8 shrink-0`})]})}function We({defaultRow:t,children:n,addLabel:r=`Thêm hàng`,className:i}){let a=$(),o=a.state.value??[],s=F(()=>{a.pushValue({...t})},[a,t]),c=F(e=>{a.removeValue(e)},[a]);return B(`div`,{"data-slot":`simple-array-field`,className:R(`flex flex-col gap-2`,i),children:[o.map((t,r)=>B(`div`,{className:`flex items-start gap-2`,children:[n(r),z(e,{type:`button`,size:`icon`,variant:`ghost`,color:`danger`,className:`min-w-8`,onClick:()=>c(r),children:z(xe,{size:14})})]},r)),z(`div`,{children:B(e,{type:`button`,variant:`outline`,color:`muted`,size:`xs`,onClick:s,children:[z(be,{size:13}),r]})})]})}
2
+ /**
3
+ * @license React
4
+ * use-sync-external-store-shim.production.js
5
+ *
6
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
7
+ *
8
+ * This source code is licensed under the MIT license found in the
9
+ * LICENSE file in the root directory of this source tree.
10
+ */
11
+ var Ge=Be((e=>{var t=Ve(`react`);function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var d=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?d:t.useSyncExternalStore})),Ke=Be(((e,t)=>{t.exports=Ge()})),qe=Be((e=>{var t=Ve(`react`),n=Ke();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useSyncExternalStore,o=t.useRef,s=t.useEffect,c=t.useMemo,l=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p}})),Je=Be(((e,t)=>{t.exports=qe()}))();function Ye(e,t){return e===t}function H(e,t=e=>e,n){let r=n?.compare??Ye,i=F(t=>{let{unsubscribe:n}=e.subscribe(t);return n},[e]),a=F(()=>e.get(),[e]);return(0,Je.useSyncExternalStoreWithSelector)(i,a,a,t,r)}function Xe({className:e,children:t,...n}){return B(Pe.Root,{"data-slot":`label`,className:R(`text-text-positive`,`flex w-full items-center justify-between`,`select-none font-medium text-sm/6 leading-none`,`group-data-[disabled=true]:pointer-events-none`,`group-data-[disabled=true]:opacity-50`,`peer-disabled:cursor-not-allowed`,`peer-disabled:opacity-50`,`aria-required:*:data-[slot=required-indicator]:inline-block`,e),...n,children:[z(`span`,{className:`flex items-center gap-1`,children:t}),z(`span`,{"data-slot":`required-indicator`,className:`hidden shrink-0 rounded-lg bg-danger-strong px-1.5 py-1 font-semibold text-[11px] leading-none text-white`,children:`Bắt buộc`})]})}const Ze=Te(`group/field flex w-full gap-2 data-[invalid=true]:text-danger *:data-[slot=field-content]:gap-0`,{variants:{orientation:{vertical:[`flex-col *:w-full [&>.sr-only]:w-auto`],horizontal:[`flex-row items-center gap-4`,`*:data-[slot=field-content]:basis-1/2`,`*:data-[slot=field-content-main]:flex-1`,`*:data-[slot=field-label]:flex-auto`,`has-[>[data-slot=field-content]]:items-start`,`has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`],responsive:[`flex-col *:w-full [&>.sr-only]:w-auto`,`@md/field-group:flex-row`,`@md/field-group:items-center`,`@md/field-group:gap-4`,`@md/field-group:*:w-auto`,`@md/field-group:*:data-[slot=field-content]:basis-1/2`,`@md/field-group:*:data-[slot=field-content-main]:basis-1/2`,`@md/field-group:*:data-[slot=field-label]:flex-auto`,`@md/field-group:has-[>[data-slot=field-content]]:items-start`,`@md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`]}},defaultVariants:{orientation:`vertical`}}),Qe=P(({className:e,...t})=>z(`fieldset`,{"data-slot":`field-set`,className:R(`flex flex-col gap-6 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3`,e),...t}));Qe.displayName=`FieldSet`;const $e=P(({className:e,variant:t=`legend`,...n})=>z(`legend`,{"data-slot":`field-legend`,"data-variant":t,className:R(`mb-3 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base`,e),...n}));$e.displayName=`FieldLegend`;const U=P(({className:e,...t})=>z(`div`,{"data-slot":`field-group`,className:R(`group/field-group @container/field-group`,`flex flex-col gap-7 pt-4`,`data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4`,e),...t}));U.displayName=`FieldGroup`;const W=P(({className:e,orientation:t=`vertical`,...n})=>z(`div`,{"data-slot":`field`,"data-orientation":t,className:R(Ze({orientation:t}),e),...n}));W.displayName=`Field`;const G=P(({className:e,...t})=>z(`div`,{"data-slot":`field-content`,className:R(`group/field-content flex flex-col gap-1.5 leading-snug`,e),...t}));G.displayName=`FieldContent`;const K=P(({className:e,...t})=>z(`div`,{"data-slot":`field-content-main`,className:R(`relative`,e),...t}));K.displayName=`FieldContentMain`;const q=P(({className:e,...t})=>z(Xe,{"data-slot":`field-label`,className:R(`group/field-label peer/field-label min-h-6 gap-1 font-medium leading-snug`,`has-[>[data-slot=field]]:w-full`,`has-[>[data-slot=field]]:flex-col`,`has-[>[data-slot=field]]:rounded-md`,`has-[>[data-slot=field]]:border`,`has-[>[data-slot=field]]:border-border`,`has-data-[state=checked]:border-primary`,`*:data-[slot=field]:p-4 group-data-[disabled=true]/field:opacity-50`,e),...t}));q.displayName=`FieldLabel`;const et=P(({className:e,...t})=>z(`div`,{"data-slot":`field-label`,className:R(`flex w-fit items-center gap-2 font-medium text-sm leading-snug group-data-[disabled=true]/field:opacity-50`,e),...t}));et.displayName=`FieldTitle`;const J=P(({className:e,...t})=>z(`p`,{"data-slot":`field-description`,className:R(`nth-last-2:-mt-1 font-normal text-text-positive-weak text-xs leading-normal last:mt-0 [&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4 [[data-variant=legend]+&]:-mt-1.5`,e),...t}));J.displayName=`FieldDescription`;const Y=P(({isShow:e=!0,className:t,children:n,...r})=>e===!1?null:B(`div`,{"data-slot":`field-note`,className:R(`flex items-start gap-1.5 rounded border border-primary-muted/60 bg-primary-bg-subtle/80 px-2.5 py-2 text-text-positive-weak text-xs`,t),...r,children:[z(_e,{size:12,className:`mt-0.5 shrink-0 text-primary/70`}),z(`span`,{children:n})]}));Y.displayName=`FieldNote`;const X=P(({tooltip:e})=>B(r,{children:[z(t,{asChild:!0,children:B(`button`,{type:`button`,tabIndex:-1,className:`inline-flex cursor-default items-center text-text-positive-weak/70 hover:text-text-positive focus:outline-none`,children:[z(ge,{size:13,"aria-hidden":`true`}),z(`span`,{className:`sr-only`,children:`Thêm thông tin`})]})}),z(n,{side:`top`,className:`max-w-xs text-balance`,children:e})]}));X.displayName=`FieldTooltip`;const Z=P(({children:e,className:t,...n})=>B(`div`,{"data-slot":`field-separator`,"data-content":!!e,className:R(`relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2`,t),...n,children:[z(i,{className:`absolute inset-0 top-1/2`}),e&&z(`span`,{className:`relative mx-auto block w-fit bg-background px-2 text-text-positive-weak`,"data-slot":`field-separator-content`,children:e})]}));Z.displayName=`FieldSeparator`;const Q=P(({className:e,children:t,errors:n,requiredMessage:r=`Trường này là bắt buộc`,...i})=>{let a=Ce(()=>{let e=e=>e.code===`invalid_type`?r:e.message;return t||(n?n?.length===1&&n[0]?.message?z(`div`,{className:`flex flex-row items-center justify-start gap-x-0.5`,children:z(`p`,{children:e(n[0])})}):z(`ul`,{className:`flex list-none flex-col`,children:n.map(t=>typeof t==`string`?z(`li`,{children:t},t):t?.message?z(`li`,{children:e(t)},t.code??t.message):null)}):null)},[t,n,r]);return a?z(`div`,{role:`alert`,"data-slot":`field-error`,className:R(`w-full font-medium text-danger-strong text-xs`,e),...i,children:a}):null});Q.displayName=`FieldError`;const tt=({label:e,required:t,disabled:n,variant:r=`checkbox`})=>{let i=I(),{form:a,name:o,state:s,handleBlur:c,handleChange:l}=$(),u=H(a.store,({isSubmitting:e})=>e),d=s.meta.isTouched&&!s.meta.isValid,f=s.value??!1,p=n||u,m=F(e=>{u||l(e)},[u,l]);return B(`div`,{className:`flex flex-col gap-1.5`,children:[B(`div`,{className:`flex items-center gap-2 h-9`,children:[z(r===`switch`?k:v,{id:i,name:o,checked:f,disabled:p,"aria-invalid":d,onBlur:c,onCheckedChange:m}),e&&B(b,{htmlFor:i,className:`cursor-pointer`,children:[e,t&&z(`span`,{className:`text-danger-strong`,children:`*`})]})]}),d&&z(Q,{errors:s.meta.errors})]})},nt=({label:t,placeholder:n,required:r,disabled:i,options:a})=>{let o=I(),{form:s,name:c,state:l,handleBlur:u,handleChange:d}=$(),v=H(s.store,({isSubmitting:e})=>e),y=Le(),[w,T]=L(!1),E=l.meta.isTouched&&!l.meta.isValid,D=i||v,O=a.find(({value:e})=>e===l.value)?.label,k=B(_,{children:[z(f,{placeholder:n??`Tìm kiếm…`}),B(g,{children:[z(h,{children:`Không tìm thấy kết quả.`}),z(p,{children:a.map(e=>z(m,{value:e.label,onSelect:()=>{d(e.value===l.value?null:e.value),T(!1)},children:e.label},e.value))})]})]});return y?B(`div`,{className:`flex flex-col gap-1.5`,children:[t&&B(b,{htmlFor:o,children:[t,r&&z(`span`,{className:`text-danger-strong`,children:`*`})]}),z(e,{id:o,type:`button`,variant:`outline`,color:`muted`,disabled:D,"aria-invalid":E,className:R(`w-full justify-start font-normal outline-1 outline-border -outline-offset-1`,!l.value&&`text-text-positive-muted`,E&&`outline-danger bg-danger-bg-subtle`),onBlur:u,onClick:()=>T(!0),children:O??z(`span`,{className:`text-text-positive-muted`,children:n})}),z(te,{open:w,onOpenChange:T,direction:`bottom`,children:B(ee,{children:[z(M,{children:z(A,{children:t??n??`Tìm kiếm…`})}),z(`div`,{className:`overflow-y-auto pb-safe-bottom`,children:k})]})}),E&&z(Q,{errors:l.meta.errors})]}):B(`div`,{className:`flex flex-col gap-1.5`,children:[t&&B(b,{htmlFor:o,children:[t,r&&z(`span`,{className:`text-danger-strong`,children:`*`})]}),B(C,{children:[z(x,{asChild:!0,children:z(e,{id:o,variant:`outline`,color:`muted`,size:`lg`,disabled:D,"aria-invalid":E,className:R(`flex w-full items-center justify-start rounded outline-border font-normal`,`hover:bg-transparent`,`focus:outline-1 focus:outline-primary-strong focus:ring-4 focus:ring-primary-weak`,`data-[state=open]:outline-1 data-[state=open]:outline-primary-strong data-[state=open]:ring-4 data-[state=open]:ring-primary-weak`,!l.value&&`text-text-positive-muted`),children:O??z(`span`,{className:`text-text-positive-muted`,children:n})})}),z(S,{align:`start`,side:`bottom`,className:`w-[--radix-popover-trigger-width] p-0 rounded`,onBlur:u,children:k})]}),E&&z(Q,{errors:l.meta.errors})]})},rt=({label:t,placeholder:n,required:r,disabled:i,minDate:a,maxDate:o})=>{let s=I(),{form:c,name:l,state:u,handleBlur:d,handleChange:f}=$(),p=H(c.store,({isSubmitting:e})=>e),m=u.meta.isTouched&&!u.meta.isValid;return B(`div`,{className:`flex flex-col gap-1.5`,children:[t&&B(b,{htmlFor:s,children:[t,r&&z(`span`,{className:`text-danger-strong`,children:`*`})]}),B(C,{children:[z(x,{asChild:!0,children:B(e,{id:s,variant:`outline`,color:`muted`,size:`lg`,disabled:i||p,"aria-invalid":m,className:R(`flex w-full items-center justify-between rounded outline-border font-normal`,`hover:bg-transparent`,`focus:outline-1 focus:outline-primary-strong focus:ring-4 focus:ring-primary-weak`,`data-[state=open]:outline-1 data-[state=open]:outline-primary-strong data-[state=open]:ring-4 data-[state=open]:ring-primary-weak`,u.value===null&&`text-text-positive-muted`),children:[z(`span`,{children:u.value?Ae(u.value,`PPP`):n??`Select date`}),z(ue,{strokeWidth:1})]})}),z(S,{align:`start`,side:`bottom`,className:`w-fit p-0 rounded`,onBlur:d,children:z(ne,{mode:`single`,selected:u.value??void 0,hidden:{before:a??new Date(1900,0,1),after:o??new Date(2100,11,31)},onSelect:e=>{e&&f(e)}})})]}),m&&z(Q,{errors:u.meta.errors})]})},it=({label:e,required:t,disabled:n,options:r,orientation:i=`vertical`})=>{let{form:a,name:o,state:s,handleBlur:c,handleChange:l}=$(),u=H(a.store,({isSubmitting:e})=>e),d=s.meta.isTouched&&!s.meta.isValid,f=n||u;return B(`div`,{className:`flex flex-col gap-1.5`,children:[e&&B(b,{children:[e,t&&z(`span`,{className:`text-danger-strong`,children:`*`})]}),z(ie,{name:o,value:s.value??``,disabled:f,"aria-invalid":d,className:i===`horizontal`?`flex flex-row flex-wrap gap-x-4 gap-y-2`:`flex flex-col gap-2`,onValueChange:l,onBlur:c,children:r.map(e=>B(`div`,{className:`flex items-center gap-2`,children:[z(re,{id:`${o}-${e.value}`,value:e.value}),z(b,{htmlFor:`${o}-${e.value}`,className:`cursor-pointer font-normal`,children:e.label})]},e.value))}),d&&z(Q,{errors:s.meta.errors})]})},at=({label:e,placeholder:t,required:n,maxLength:r,disabled:i})=>{let a=I(),{form:o,name:s,state:c,handleBlur:l,handleChange:u}=$(),d=H(o.store,({isSubmitting:e})=>e),f=c.meta.isTouched&&!c.meta.isValid,p=F(({target:{value:e}})=>{d||r&&e.length>r||u(e||null)},[d,r,u]);return B(`div`,{className:`flex flex-col gap-1.5`,children:[e&&B(b,{htmlFor:a,children:[e,n&&z(`span`,{className:`text-danger-strong`,children:`*`})]}),B(`div`,{className:`relative`,children:[z(y,{id:a,name:s,type:`email`,value:c.value??``,"aria-invalid":f,autoComplete:`email`,placeholder:t,disabled:i||d,className:R(`pl-9`),onBlur:l,onChange:p}),z(`div`,{className:`pointer-events-none absolute inset-y-0 left-0 flex size-9 items-center justify-center text-muted`,children:z(ce,{size:14})})]}),f&&z(Q,{errors:c.meta.errors})]})},ot=e=>e?/^-?\d*\.?\d*$/:/^\d*\.?\d*$/,st=e=>Number(e).toLocaleString(),ct=(e,t,n)=>{if(n===`none`)return e;let r=10**t,i=e*r;switch(n){case`up`:return Math.ceil(i)/r;case`down`:return Math.floor(i)/r;case`nearest`:return i%1<.1?Math.floor(i)/r:i%1>=.59?Math.ceil(i)/r:(Math.floor(i)+.5)/r;default:return e}},lt=({disabled:e=!1,readOnly:t=!1,allowNegative:n=!1,numberAfterDecimalPoint:r=2,roundingRule:i=`none`,value:a=null,unitText:o,decimal:s,placeholder:c,precision:l,wrapperClassName:u,className:d,onChange:f,onValueChange:p,onFocus:m,onBlur:h,...g})=>{let _=we(null),v=we(null),[b,x]=L(a?.toString()??null),S=Ce(()=>s?.[1]??r,[s,r]),C=Ce(()=>s&&s[0]-s[1],[s]),w=Ce(()=>ot(n),[n]),T=F(e=>{if(!S||e===`-`)return!0;let[t,n=``]=e.split(`.`),r=t.startsWith(`-`)?t.length-1:t.length;return n.length<=S&&r<=(C??1/0)},[S,C]),E=F(e=>{if(e===`0`)return`0`;if(!Number(e))return null;let[t,n=``]=ct(parseFloat(e),Math.min(S-1,l||0),i).toString().split(`.`),r=st(t);return n?`${r}.${n}`:r},[S,l,i]),D=F(e=>{let t=e===`0`,n=e===`-`||/^-0+(\.0+)?$/.test(e)||/^-0*\.$/.test(e);if(t){p?.(0),x(e);return}if(n){x(()=>(p?.(0),e));return}},[p]),O=F(e=>{f?.(e);let{value:t}=e.target;if(t===``||t===void 0){p?.(null),x(null);return}D(t),!(!w.test(t)||!T(t))&&(p?.(parseFloat(t)||0),x(t))},[T,f,p,D,w]),k=F(e=>{t||(m?.(e),x(e=>typeof e==`string`?e.replace(/,/g,``):null))},[t,m]),A=F(e=>{t||(h?.(e),x(e=>e===null?null:e===`0`||e===`-`||/^-0+(\.0+)?$/.test(e)||/^-0*\.$/.test(e)?`0`:typeof e==`string`?E(e):null))},[t,E,h]);return Se(()=>{let e=document.activeElement===v.current;if(a==null||!w.test(a.toString())||!T(a.toString())){x(null);return}x(t=>e?t:E(a.toString()))},[E,a,T,w]),Se(()=>{if(!_.current||!v.current||!o)return;let e=_.current.offsetWidth;v.current.style.setProperty(`padding-right`,`${(e+10)/16}rem`)},[o]),B(`div`,{className:R(`relative`,u),children:[z(y,{...g,ref:v,value:b||(t?`0`:``),placeholder:c,disabled:e,readOnly:t,className:R(`text-end font-number text-sm slashed-zero lining-nums tabular-nums`,t&&`bg-muted text-muted-foreground`,d),onChange:O,onFocus:k,onBlur:A}),o&&z(`span`,{ref:_,className:`-translate-y-1/2 pointer-events-none absolute top-1/2 right-2 text-muted-foreground text-sm`,children:o})]})},ut=({label:e,placeholder:t,required:n,unit:r,allowNegative:i,disabled:a})=>{let o=I(),{form:s,state:c,handleBlur:l,handleChange:u}=$(),d=H(s.store,({isSubmitting:e})=>e),f=c.meta.isTouched&&!c.meta.isValid,p=F(e=>{d||u(e)},[d,u]);return B(`div`,{className:`flex flex-col gap-1.5`,children:[e&&B(b,{htmlFor:o,children:[e,n&&z(`span`,{className:`text-danger-strong`,children:`*`})]}),z(lt,{id:o,value:c.value,placeholder:t,unitText:r,allowNegative:i,disabled:a||d,onBlur:l,onValueChange:p}),f&&z(Q,{errors:c.meta.errors})]})},dt=({label:e,placeholder:t,required:n,disabled:r})=>{let i=I(),{form:a,name:o,state:s,handleBlur:c,handleChange:l}=$(),u=H(a.store,({isSubmitting:e})=>e),[d,f]=L(!1),p=s.meta.isTouched&&!s.meta.isValid,m=F(()=>f(e=>!e),[]),h=F(({target:{value:e}})=>{u||l(e||null)},[u,l]);return B(`div`,{className:`flex flex-col gap-1.5`,children:[e&&B(b,{htmlFor:i,children:[e,n&&z(`span`,{className:`text-danger-strong`,children:`*`})]}),B(`div`,{className:`relative`,children:[z(y,{id:i,name:o,type:d?`text`:`password`,value:s.value??``,"aria-invalid":p,autoComplete:`current-password`,placeholder:t,disabled:r||u,className:`pr-9`,onBlur:c,onChange:h}),z(`button`,{type:`button`,tabIndex:-1,"aria-label":d?`Ẩn mật khẩu`:`Hiện mật khẩu`,"aria-pressed":d,"aria-controls":i,className:`absolute inset-y-0 right-0 flex size-9 items-center justify-center text-muted outline-none transition-colors hover:text-text-positive focus-visible:text-text-positive disabled:pointer-events-none disabled:opacity-50`,disabled:r||u,onClick:m,children:z(d?he:me,{size:16,"aria-hidden":`true`})})]}),p&&z(Q,{errors:s.meta.errors})]})},ft=({label:t,placeholder:n,required:r,options:i})=>{let a=I(),{state:o,handleBlur:s,handleChange:c}=$(),l=Le(),[u,d]=L(!1),f=o.meta.isTouched&&!o.meta.isValid,p=i.find(e=>e.value===o.value)?.label;return l?B(`div`,{className:`flex flex-col gap-1.5`,children:[t&&B(b,{htmlFor:a,children:[t,r&&z(`span`,{className:`text-danger-strong`,children:`*`})]}),z(e,{id:a,type:`button`,variant:`outline`,color:`muted`,className:R(`w-full justify-start font-normal outline-1 outline-border -outline-offset-1`,!o.value&&`text-text-positive-muted`,f&&`outline-danger bg-danger-bg-subtle`),"aria-invalid":f,onBlur:s,onClick:()=>d(!0),children:p??z(`span`,{className:`text-text-positive-muted`,children:n})}),z(te,{open:u,onOpenChange:d,direction:`bottom`,children:B(ee,{children:[z(M,{children:z(A,{children:t??n??`Select an option`})}),z(`div`,{className:`flex flex-col overflow-y-auto pb-safe-bottom`,children:i.length>0?i.map(e=>z(j,{asChild:!0,children:z(`button`,{type:`button`,className:R(`flex w-full items-center px-4 py-3 text-left text-sm transition-colors`,`hover:bg-muted-muted active:bg-muted-muted`,o.value===e.value&&`bg-primary-bg-subtle font-medium text-primary`),onClick:()=>{c(e.value),d(!1)},children:e.label})},e.value)):B(`div`,{className:`flex items-center justify-center gap-x-2 px-4 py-8 text-center text-sm text-text-positive-weak`,children:[z(ye,{strokeWidth:1}),`No options available`]})})]})}),f&&z(Q,{errors:o.meta.errors})]}):B(`div`,{className:`flex flex-col gap-1.5`,children:[t&&B(b,{htmlFor:a,children:[t,r&&z(`span`,{className:`text-danger-strong`,children:`*`})]}),B(O,{value:o.value??``,onValueChange:c,children:[z(D,{id:a,"aria-invalid":f?`true`:void 0,onBlur:s,children:z(w,{placeholder:n})}),z(E,{children:i.length>0?i.map(e=>z(T,{value:e.value,children:e.label},e.value)):B(`div`,{className:`flex items-center justify-center gap-x-2 rounded border border-border bg-muted-muted px-4 py-6.5 text-center text-sm text-text-positive-weak`,children:[z(ye,{strokeWidth:1}),`No options available`]})})]}),f&&z(Q,{errors:o.meta.errors})]})},pt=({label:e,placeholder:t,required:n,maxLength:r,rows:i,disabled:a})=>{let o=I(),{form:s,name:c,state:l,handleBlur:u,handleChange:d}=$(),f=H(s.store,({isSubmitting:e})=>e),p=l.meta.isTouched&&!l.meta.isValid,m=F(({target:{value:e}})=>{f||r&&e.length>r||d(e||null)},[f,r,d]);return B(`div`,{className:`flex flex-col gap-1.5`,children:[e&&B(b,{htmlFor:o,children:[e,n&&z(`span`,{className:`text-danger-strong`,children:`*`})]}),z(ae,{id:o,name:c,value:l.value??``,"aria-invalid":p,placeholder:t,rows:i,disabled:a||f,onBlur:u,onChange:m}),p&&z(Q,{errors:l.meta.errors})]})},mt=({label:e,placeholder:t,required:n,maxLength:r,disabled:i})=>{let a=I(),{form:o,name:s,state:c,handleBlur:l,handleChange:u}=$(),d=H(o.store,({isSubmitting:e})=>e),f=c.meta.isTouched&&!c.meta.isValid,p=F(({target:{value:e}})=>{d||r&&e.length>r||u(e||null)},[d,r,u]);return B(`div`,{className:`flex flex-col gap-1.5`,children:[e&&B(b,{htmlFor:a,children:[e,n&&z(`span`,{className:`text-danger-strong`,children:`*`})]}),z(y,{id:a,name:s,value:c.value??``,"aria-invalid":f,placeholder:t,autoComplete:`off`,disabled:i||d,onBlur:l,onChange:p}),f&&z(Q,{errors:c.meta.errors})]})},ht=({label:e,description:t,options:n,tooltip:r,helperText:i,orientation:a})=>{let o=$(),s=H(o.form.store,({isSubmitting:e})=>e);return B(U,{className:`gap-y-4 px-4`,children:[B(W,{orientation:a,children:[B(G,{children:[B(q,{children:[e,r&&z(X,{tooltip:r})]}),z(J,{children:t}),z(Y,{isShow:!!i,children:i})]}),z(K,{children:z(U,{className:`flex flex-col gap-y-2`,children:n.map(e=>B(W,{orientation:`horizontal`,children:[z(v,{id:`${o.name}-${e.value}`,name:o.name,checked:o.state.value?.includes(e.value)??!1,disabled:s,onCheckedChange:t=>{if(t&&o.state.value!==null)o.pushValue(e.value);else if(t&&o.state.value===null)o.setValue([e.value]);else if(!t&&o.state.value!==null){let t=o.state.value.indexOf(e.value);t>-1&&o.removeValue(t)}else o.setValue(null)}}),z(q,{htmlFor:`${o.name}-${e.value}`,className:`text-text-positive`,children:e.label})]},e.value))})})]}),z(Z,{})]})},gt=P(({label:t,description:n,placeholder:r,tooltip:i,helperText:a,orientation:s=`responsive`,options:l,required:v=!1,disabled:y=!1,clearable:b=!1,showErrorMessage:w=!0})=>{let T=I(),E=$(),D=Le(),[O,k]=L(!1),[A,j]=L(!1),M=H(E.form.store,({isSubmitting:e})=>e),ee=y||M,te=E.state.meta.isDirty||E.state.meta.isTouched,ne=te&&!E.state.meta.isValid,re=v&&E.state.value===null,ie=b&&!!E.state.value&&!ee,ae=l.find(({value:e})=>e===E.state.value)?.label,oe=()=>{E.handleChange(null),E.handleBlur()},se=t=>z(e,{variant:`outline`,color:`muted`,size:`lg`,disabled:ee,"aria-invalid":ne?!0:void 0,"aria-describedby":T,className:R(`flex w-full items-center justify-start rounded outline-border`,`hover:bg-transparent`,`focus-visible:outline-1 focus-visible:outline-primary-strong focus-visible:ring-4 focus-visible:ring-primary-weak`,`data-[state=open]:text-text-positive-muted data-[state=open]:outline-1 data-[state=open]:outline-primary-strong data-[state=open]:ring-4 data-[state=open]:ring-primary-weak`,ie&&`pr-8`,!E.state.value&&`text-text-positive-muted`,ne&&`outline-danger bg-danger-bg-subtle ring-4 ring-danger-weak`),onClick:t,children:ae?z(`p`,{className:`flex min-w-0 flex-1 items-center gap-2 truncate text-start`,children:ae}):z(`p`,{className:`flex-1 text-start text-text-positive-muted`,children:r})}),ce=e=>B(_,{className:`border-none`,children:[z(f,{placeholder:r??`Tìm kiếm…`}),B(g,{children:[z(h,{className:`flex min-h-30 items-center justify-center text-sm text-text-positive-weak`,children:`Không tìm thấy kết quả nào phù hợp.`}),z(p,{className:`max-h-60 overflow-y-auto`,children:l.map(({value:t,label:n})=>z(m,{value:n,onSelect:()=>e(t),children:n},t))})]})]});return B(U,{className:`gap-y-4 px-4`,children:[B(W,{orientation:s,"data-invalid":ne,children:[B(G,{children:[B(q,{"aria-required":re,htmlFor:E.name,children:[t,i&&z(X,{tooltip:i})]}),z(J,{children:n})]}),z(K,{className:`flex justify-end`,children:B(`div`,{className:`flex w-full flex-col`,children:[B(`div`,{className:`relative`,children:[D?B(Ee,{children:[se(()=>k(!0)),z(d,{open:O,onOpenChange:e=>{k(e),e||E.handleBlur()},children:B(o,{children:[z(u,{}),B(V.Content,{onOpenAutoFocus:e=>e.preventDefault(),className:R(`fixed inset-x-0 bottom-0 z-50`,`flex flex-col bg-background rounded-t-2xl outline-none`,`max-h-[80dvh] shadow-[0_-4px_24px_rgba(0,0,0,0.08)]`,`data-[state=open]:animate-in data-[state=open]:slide-in-from-bottom data-[state=open]:fade-in-0`,`data-[state=closed]:animate-out data-[state=closed]:slide-out-to-bottom data-[state=closed]:fade-out-0`,`duration-300`),children:[B(`div`,{className:`flex items-center justify-between px-4 py-3 border-b border-border shrink-0`,children:[z(`span`,{className:`font-semibold text-sm text-text-positive`,children:t}),z(c,{asChild:!0,children:z(`button`,{type:`button`,"aria-label":`Đóng`,className:`flex size-7 items-center justify-center rounded-md text-text-positive-weak transition-colors hover:bg-muted-muted hover:text-text-positive`,children:z(N,{size:16})})})]}),B(`div`,{className:`flex flex-col overflow-y-auto`,children:[ie&&z(c,{asChild:!0,children:B(`button`,{type:`button`,className:`flex w-full items-center gap-x-2 px-4 py-3 text-left text-sm text-danger-strong transition-colors hover:bg-danger-bg-subtle`,onClick:oe,children:[z(N,{size:14}),`Xóa lựa chọn`]})}),ce(e=>{E.handleChange(e),k(!1),E.handleBlur()})]}),z(`div`,{className:`shrink-0 h-safe-bottom`})]})]})})]}):B(C,{open:A,onOpenChange:e=>{j(e),e||E.handleBlur()},children:[z(x,{asChild:!0,children:se()}),z(S,{align:`end`,side:`bottom`,className:`flex w-fit rounded p-0`,children:ce(e=>{E.handleChange(e),j(!1),E.handleBlur()})})]}),ie&&z(`button`,{type:`button`,"aria-label":`Xóa lựa chọn`,className:`absolute right-2 top-1/2 -translate-y-1/2 flex size-4 cursor-pointer items-center justify-center rounded-md text-text-positive-weak outline-none transition-[color,transform] hover:text-text-positive focus-visible:text-primary-strong focus-visible:[&>svg]:scale-125 [&>svg]:size-3.5 [&>svg]:transition-transform`,onClick:oe,children:z(N,{"aria-hidden":`true`})})]}),te&&w&&z(Q,{id:T,className:`mt-1`,errors:E.state.meta.errors}),z(Y,{isShow:!!a,children:a})]})})]}),z(Z,{})]})});gt.displayName=`ComboboxField`;const _t=P(({label:t,description:n,placeholder:r,orientation:i=`responsive`,tooltip:a,helperText:o,showErrorMessage:s=!0,required:c=!1,disabled:l=!1,minDate:u,maxDate:d})=>{let f=I(),p=$(),[m,h]=L(!1),g=H(p.form.store,({isSubmitting:e})=>e),_=l||g,v=p.state.meta.isDirty||p.state.meta.isTouched,y=v&&!p.state.meta.isValid,b=c&&p.state.value===null,w=e=>{p.handleChange(e),h(!1)};return B(U,{className:`px-4`,children:[B(W,{orientation:i,"data-invalid":y,children:[B(G,{children:[B(q,{htmlFor:p.name,"aria-required":b,children:[t,a&&z(X,{tooltip:a})]}),z(J,{children:n})]}),z(K,{className:`flex flex-col space-y-1`,children:B(`div`,{className:`flex w-full flex-col`,children:[B(C,{open:m,onOpenChange:e=>{h(e),e||p.handleBlur()},children:[z(x,{asChild:!0,children:B(e,{variant:`outline`,color:`muted`,size:`lg`,disabled:_,"aria-invalid":y?!0:void 0,"aria-describedby":f,className:R(`flex items-center justify-between rounded font-normal outline-border`,`hover:bg-transparent`,`focus:outline-1 focus:outline-primary-strong focus:ring-4 focus:ring-primary-weak`,`data-[state=open]:outline-1 data-[state=open]:outline-primary-strong data-[state=open]:ring-4 data-[state=open]:ring-primary-weak`,p.state.value===null&&`text-text-positive-muted`,y&&`outline-danger bg-danger-bg-subtle ring-4 ring-danger-weak`),children:[z(`p`,{children:p.state.value===null?r??`Select date`:Ae(p.state.value,`PPPP`)}),z(ue,{strokeWidth:1})]})}),B(S,{align:`start`,side:`bottom`,className:`flex w-fit min-w-0 overflow-y-auto rounded p-0`,children:[B(`div`,{className:`flex h-full flex-col space-y-2 border-r border-r-border p-2 [&>button]:justify-start [&>button]:text-sm`,children:[z(e,{variant:`ghost`,color:`muted`,className:`w-32`,onClick:()=>w(De()),children:`Hôm nay`}),z(e,{variant:`ghost`,color:`muted`,className:`w-32`,onClick:()=>w(Oe()),children:`Ngày mai`}),z(e,{variant:`ghost`,color:`muted`,className:`w-32`,onClick:()=>w(ke()),children:`Hôm qua`}),z(e,{variant:`ghost`,color:`muted`,className:`w-32`,onClick:()=>w(Ne(De(),3)),children:`3 ngày qua`}),z(e,{variant:`ghost`,color:`muted`,className:`w-32`,onClick:()=>w(Ne(De(),7)),children:`7 ngày qua`}),z(e,{variant:`ghost`,color:`muted`,className:`w-32`,onClick:()=>w(Ne(De(),30)),children:`30 ngày qua`}),z(e,{variant:`ghost`,color:`muted`,className:`w-32`,onClick:()=>w(Me(De())),children:`Tháng này`}),z(e,{variant:`ghost`,color:`muted`,className:`w-32`,onClick:()=>w(je(De())),children:`Tháng trước`})]}),z(`div`,{className:`flex flex-1 flex-col`,children:z(`div`,{className:`min-w-73 border-b border-b-border p-2`,children:z(ne,{mode:`single`,selected:p.state.value??void 0,hidden:{before:u??new Date(1900,0,1),after:d??new Date(2100,11,31)},onSelect:e=>{e&&w(e)}})})})]})]}),v&&s&&z(Q,{id:f,className:`mt-1`,errors:p.state.meta.errors}),z(Y,{isShow:!!o,children:o})]})})]}),z(Z,{})]})});_t.displayName=`DateField`;const vt=({label:e,description:t,placeholder:n,tooltip:r,helperText:i,orientation:a=`responsive`,showErrorMessage:o=!0,required:s=!1,maxLength:c})=>{let{form:l,name:u,state:d,handleBlur:f,handleChange:p}=$(),m=H(l.store,({isSubmitting:e})=>e),h=d.meta.isDirty&&d.meta.isTouched&&!d.meta.isValid,g=s&&d.value===null,_=!m&&!!d.value,v=F(({target:{value:e}})=>{m||c&&e.length>c||p(e||null)},[m,c,p]),b=F(()=>{m||p(null)},[m,p]);return B(U,{className:`gap-y-4 px-4`,children:[B(W,{"data-invalid":h,orientation:a,children:[B(G,{children:[B(q,{htmlFor:u,"aria-required":g,children:[e,r&&z(X,{tooltip:r})]}),z(J,{children:t})]}),B(K,{children:[z(y,{id:u,name:u,value:d.value===null?``:d.value,"aria-invalid":h,autoComplete:`email`,placeholder:n,className:R(`pl-9`,_&&`pr-9`,m&&`pointer-events-none bg-muted-muted opacity-60`),onBlur:f,onChange:v}),z(`div`,{className:`absolute top-0 left-0 flex size-9 items-center justify-center text-muted`,children:z(ce,{size:14})}),_&&z(`button`,{type:`button`,"aria-label":`Xóa`,className:`absolute inset-e-0 inset-y-0 top-3 flex h-fit w-8 cursor-pointer items-center justify-center rounded-e-md text-text-positive-weak outline-none transition-[color,box-shadow] hover:text-text-positive focus:text-text-positive-strong`,onClick:b,children:z(N,{size:14,"aria-hidden":`true`})}),z(`div`,{className:`mt-1 flex w-full items-start justify-start`,children:o&&d.meta.isDirty&&z(Q,{errors:d.meta.errors})}),z(Y,{isShow:!!i,children:i})]})]}),z(Z,{})]})},yt=P(({label:e,description:t,placeholder:n,tooltip:r,helperText:i,orientation:a=`responsive`,showErrorMessage:o=!0,rounding:s,decimalPlaces:c,precision:l,unit:u,required:d=!1,disabled:f=!1,allowNegative:p})=>{let m=I(),h=I(),g=$(),_=H(g.form.store,({isSubmitting:e})=>e),v=f||_,y=g.state.meta.isDirty||g.state.meta.isTouched,b=y&&!g.state.meta.isValid,x=d&&g.state.value===null,S=!!g.state.meta.errors.length,C=F(e=>{v||g.handleChange(e)},[v,g.handleChange]);return B(U,{className:`gap-y-4 px-4`,children:[B(W,{orientation:a,"data-invalid":b,children:[B(G,{children:[B(q,{htmlFor:m,"aria-required":x,children:[e,r&&z(X,{tooltip:r})]}),z(J,{children:t})]}),B(K,{children:[B(`div`,{className:`relative w-full`,children:[z(lt,{id:m,value:g.state.value,"aria-invalid":b,"aria-describedby":h,placeholder:n,disabled:v,roundingRule:s,numberAfterDecimalPoint:c,precision:l,unitText:u,allowNegative:p,className:R(v&&`pointer-events-none opacity-60`),onBlur:g.handleBlur,onValueChange:C}),_&&z(`div`,{className:`pointer-events-none absolute inset-s-2 inset-y-0 top-2.5 [&>svg]:size-3.5`,children:z(ve,{className:`animate-spin text-primary-strong`})}),!_&&y&&o&&S&&z(`div`,{className:`pointer-events-none absolute inset-s-2 inset-y-0 top-2.75 text-danger-strong [&>svg]:size-3.5`,children:z(le,{})}),z(`div`,{className:`mt-1 flex w-full items-start justify-between gap-x-2`,children:y&&o?z(Q,{id:h,className:`flex-1`,errors:g.state.meta.errors}):z(`div`,{})})]}),z(Y,{isShow:!!i,children:i})]})]}),z(Z,{})]})});yt.displayName=`NumberField`;const bt=({label:e,description:t,placeholder:n,orientation:r=`responsive`,tooltip:i,helperText:a,showErrorMessage:o=!0})=>{let s=I(),{form:c,name:l,state:u,handleBlur:d,handleChange:f}=$(),p=H(c.store,({isSubmitting:e})=>e),[m,h]=L(!1),g=u.meta.isDirty&&u.meta.isTouched&&!u.meta.isValid,_=F(()=>h(e=>!e),[]),v=F(({target:{value:e}})=>{p||f(e||null)},[p,f]);return B(U,{className:`gap-y-4 px-4`,children:[B(W,{"data-invalid":g,orientation:r,children:[B(G,{children:[B(q,{htmlFor:s,children:[e,i&&z(X,{tooltip:i})]}),z(J,{children:t})]}),B(K,{children:[z(y,{id:s,name:l,type:m?`text`:`password`,placeholder:n,value:u.value??``,"aria-invalid":g,autoComplete:`new-password`,onBlur:d,onChange:v}),z(`button`,{className:`absolute inset-e-0 inset-y-0 flex size-9 items-center justify-center rounded-e-md text-muted outline-none transition-[color,box-shadow] focus:z-10 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50`,type:`button`,onClick:_,"aria-label":m?`Ẩn mật khẩu`:`Hiện mật khẩu`,"aria-pressed":m,"aria-controls":s,children:z(m?he:me,{size:16,"aria-hidden":`true`})}),z(`div`,{className:`mt-1 flex w-full items-start justify-start`,children:o&&u.meta.isDirty&&z(Q,{errors:u.meta.errors})}),z(Y,{isShow:!!a,children:a})]})]}),z(Z,{})]})},xt=({label:e,description:t,orientation:n,options:r,tooltip:i,helperText:a})=>{let o=$(),s=H(o.form.store,({isSubmitting:e})=>e);return B(U,{className:`px-4`,children:[B(W,{orientation:n,className:`flex-col gap-2`,children:[B(G,{children:[B(q,{children:[e,i&&z(X,{tooltip:i})]}),z(J,{children:t}),z(Y,{isShow:!!a,children:a})]}),z(K,{children:z(ie,{value:o.state.value??``,className:`w-full`,onValueChange:o.handleChange,children:r.map(e=>z(q,{className:R(`h-fit`,o.state.value===e.value&&`border-primary-weak! bg-primary-bg-subtle`,s&&`pointer-events-none bg-muted-muted opacity-60`,o.state.value===e.value&&s&&`border-border-strong!`),children:B(W,{orientation:`horizontal`,className:`items-start gap-3 rounded p-2!`,children:[z(re,{value:e.value,className:`mt-0.5 shrink-0`}),B(G,{className:`gap-0.5!`,children:[z(et,{children:e.label}),z(J,{className:`text-xs`,children:e.description})]})]})},e.value))})})]}),z(Z,{})]})},St=P(({label:e,description:t,placeholder:n,orientation:r=`responsive`,tooltip:i,options:a,helperText:s,clearable:l=!1,required:f=!1,disabled:p=!1,showErrorMessage:m=!0})=>{let h=I(),g=$(),_=Le(),[v,y]=L(!1),b=H(g.form.store,({isSubmitting:e})=>e),x=p||b,S=g.state.meta.isDirty||g.state.meta.isTouched,C=S&&!g.state.meta.isValid,k=f&&g.state.value===null,A=l&&!!g.state.value&&!x,j=a.find(e=>e.value===g.state.value)?.label,M=()=>{g.handleChange(null),g.handleBlur()};return B(U,{className:`gap-y-4 px-4`,children:[B(W,{orientation:r,"data-invalid":C,children:[B(G,{children:[B(q,{htmlFor:g.name,"aria-required":k,children:[e,i&&z(X,{tooltip:i})]}),z(J,{children:t})]}),B(K,{className:`flex flex-col`,children:[_?B(Ee,{children:[B(`button`,{id:g.name,type:`button`,disabled:x,"aria-invalid":C?`true`:void 0,"aria-describedby":h,onBlur:g.handleBlur,onClick:()=>y(!0),className:R(`flex w-full items-center justify-between`,`outline-1 outline-border -outline-offset-1`,`gap-2 rounded bg-transparent px-3 py-2`,`shadow-input transition-all cursor-pointer whitespace-nowrap text-sm`,`focus-visible:outline-primary-strong focus-visible:ring-4 focus-visible:ring-primary-weak`,`disabled:cursor-not-allowed disabled:opacity-50`,C&&`outline-danger bg-danger-bg-subtle ring-danger-weak`,!g.state.value&&`text-text-positive-muted`),children:[z(`span`,{className:`line-clamp-1`,children:j??n}),z(fe,{size:16,className:`shrink-0 opacity-50`})]}),z(d,{open:v,onOpenChange:e=>{y(e),e||g.handleBlur()},children:B(o,{children:[z(u,{}),B(V.Content,{onOpenAutoFocus:e=>e.preventDefault(),className:R(`fixed inset-x-0 bottom-0 z-50`,`flex flex-col bg-background rounded-t-2xl outline-none`,`max-h-[80dvh] shadow-[0_-4px_24px_rgba(0,0,0,0.08)]`,`data-[state=open]:animate-in data-[state=open]:slide-in-from-bottom data-[state=open]:fade-in-0`,`data-[state=closed]:animate-out data-[state=closed]:slide-out-to-bottom data-[state=closed]:fade-out-0`,`duration-300`),children:[B(`div`,{className:`flex items-center justify-between px-4 py-3 border-b border-border shrink-0`,children:[z(`span`,{className:`font-semibold text-sm text-text-positive`,children:e??n??`Chọn một tùy chọn`}),z(c,{asChild:!0,children:z(`button`,{type:`button`,"aria-label":`Đóng`,className:`flex size-7 items-center justify-center rounded-md text-text-positive-weak transition-colors hover:bg-muted-muted hover:text-text-positive`,children:z(N,{size:16})})})]}),B(`div`,{className:`flex flex-col overflow-y-auto`,children:[A&&z(c,{asChild:!0,children:B(`button`,{type:`button`,className:`flex w-full items-center gap-x-2 px-4 py-3 text-left text-sm text-danger-strong transition-colors hover:bg-danger-bg-subtle`,onClick:M,children:[z(N,{size:14}),`Xóa lựa chọn`]})}),a.length>0?a.map(e=>z(c,{asChild:!0,children:z(`button`,{type:`button`,className:R(`flex w-full items-center px-4 py-3 text-left text-sm transition-colors`,`hover:bg-muted-muted active:bg-muted-muted`,g.state.value===e.value&&`bg-primary-bg-subtle font-medium text-primary`),onClick:()=>{g.handleChange(e.value),g.handleBlur()},children:e.label})},e.value)):B(`div`,{className:`flex items-center justify-center gap-x-2 px-4 py-8 text-center text-sm text-text-positive-weak`,children:[z(ye,{strokeWidth:1}),`Không có tùy chọn`]})]}),z(`div`,{className:`shrink-0 h-safe-bottom`})]})]})})]}):B(`div`,{className:`relative`,children:[B(O,{value:g.state.value??``,disabled:x,onValueChange:g.handleChange,children:[z(D,{"aria-invalid":C?`true`:void 0,"aria-describedby":h,onBlur:g.handleBlur,children:z(w,{placeholder:n})}),z(E,{children:a.length>0?a.map(e=>z(T,{value:e.value,children:e.label},e.value)):B(`div`,{className:`flex items-center justify-center gap-x-2 rounded border border-border bg-muted-muted px-4 py-6.5 text-center text-sm text-text-positive-weak`,children:[z(ye,{strokeWidth:1}),`No options available`]})})]}),A&&z(`button`,{type:`button`,"aria-label":`Xóa lựa chọn`,className:`absolute right-7 top-1/2 -translate-y-1/2 flex size-4 cursor-pointer items-center justify-center rounded-md text-text-positive-weak outline-none transition-[color,transform] hover:text-text-positive focus-visible:text-primary-strong focus-visible:[&>svg]:scale-125 [&>svg]:size-3.5 [&>svg]:transition-transform`,onClick:M,children:z(N,{"aria-hidden":`true`})})]}),S&&m&&z(Q,{id:h,className:`mt-1`,errors:g.state.meta.errors}),z(Y,{isShow:!!s,children:s})]})]}),z(Z,{})]})});St.displayName=`SelectField`;function Ct({className:e,...t}){return z(Ie.Root,{"data-slot":`switch`,className:R(`peer`,`w-8 shrink-0 cursor-pointer items-center rounded-full shadow-xs transition-all`,`inline-flex h-5`,`focus-visible:border-primary-strong`,`focus-visible:ring-primary-weak`,`focus-visible:ring-4`,`disabled:cursor-not-allowed`,`disabled:opacity-50`,`-outline-offset-1 inset-shadow-2xs outline-1`,`data-[state=checked]:bg-primary`,`data-[state=checked]:outline-primary-strong`,`data-[state=unchecked]:bg-muted-weak`,`data-[state=unchecked]:outline-border`,`data-[state=unchecked]:[&_span]:size-4`,`data-[state=unchecked]:[&_span]:translate-x-0.5`,`data-[state=unchecked]:[&_span]:rtl:-translate-x-0.5`,e),...t,children:z(Ie.Thumb,{"data-slot":`switch-thumb`,className:R(`block size-4 bg-card shadow-xs`,`pointer-events-none rounded-full ring-0 transition-transform`,`data-[state=checked]:translate-x-[calc(100%-3px)]`,`data-[state=unchecked]:translate-x-0`)})})}const wt=({label:e,description:t,helperText:n})=>{let r=$();return B(U,{className:`gap-y-4 px-4`,children:[B(W,{orientation:`vertical`,className:`relative justify-between gap-y-1`,children:[B(G,{children:[z(et,{className:`cursor-pointer`,children:z(`label`,{htmlFor:r.name,children:e})}),z(J,{children:t}),z(Ct,{id:r.name,checked:r.state.value??!1,className:`absolute top-1 right-1`,onBlur:r.handleBlur,onCheckedChange:r.handleChange})]}),z(Y,{isShow:!!n,children:n})]}),z(Z,{})]})},Tt=e=>{e.key===`Enter`&&e.preventDefault()},Et=P(({label:e,description:t,placeholder:n,tooltip:r,helperText:i,counter:a=!1,orientation:o=`responsive`,showClearButton:s=!1,showErrorMessage:c=!0,required:l=!1,disabled:u=!1,maxLength:d})=>{let f=I(),p=I(),m=we(null),{form:h,name:g,state:_,handleBlur:v,handleChange:b}=$(),x=H(h.store,({isSubmitting:e})=>e),S=u||x,C=_.meta.isDirty||_.meta.isTouched,w=C&&!_.meta.isValid,T=l&&_.value===null,E=_.meta.errors.length>0,D=s&&!S&&!!_.value,O=a?_.value?.length??0:0,k=a&&!!d&&O>=d*.8,A=a&&!!d&&O>=d,j=a?d?`${O} / ${d} ký tự`:`${O} ký tự`:null,M=a||C&&c,ee=F(({target:{value:e}})=>{a&&d&&e.length>d||b(e||null)},[a,d,b]),te=F(()=>{b(null),m.current?.focus()},[b]);return B(U,{className:`gap-y-4 px-4`,children:[B(W,{orientation:o,"data-invalid":w,children:[B(G,{children:[B(q,{"aria-required":T,htmlFor:f,children:[e,r&&z(X,{tooltip:r})]}),t&&z(J,{children:t})]}),B(K,{children:[z(y,{ref:m,id:f,name:g,value:_.value??``,"aria-invalid":w,"aria-describedby":p,autoComplete:`off`,placeholder:n,autoCapitalize:`none`,autoCorrect:`off`,disabled:S,className:R(`pr-6`,S&&`pointer-events-none bg-muted-muted opacity-60`),onBlur:v,onChange:ee,onKeyDown:Tt}),D&&z(`button`,{type:`button`,"aria-label":`Xóa`,className:`absolute inset-e-1 top-2.5 flex size-4 cursor-pointer items-center justify-center rounded-md text-text-positive-weak outline-none transition-[color,transform] hover:text-text-positive focus-visible:text-primary-strong focus-visible:[&>svg]:scale-125 [&>svg]:size-3.5 [&>svg]:transition-transform`,onClick:te,children:z(N,{"aria-hidden":`true`})}),x&&z(`div`,{className:`absolute inset-e-2 inset-y-0 top-2.5 text-muted-weak`,children:z(ve,{size:14,className:`animate-spin text-primary-strong`})}),!D&&C&&c&&E&&z(`div`,{className:`absolute inset-e-2 inset-y-0 top-2.5 text-danger-strong`,children:z(le,{"aria-hidden":`true`,size:14})}),M&&B(`div`,{className:`my-1 flex w-full items-start justify-between gap-x-2`,children:[C&&c?z(Q,{id:p,className:`flex-1`,errors:_.meta.errors}):z(`div`,{}),a&&z(`p`,{className:R(`h-4 flex-0 text-nowrap text-end text-xs tabular-nums transition-colors`,A?`font-medium text-danger-strong`:k?`text-warning-strong`:`text-text-positive-weak`),children:j})]}),z(Y,{isShow:!!i,children:i})]})]}),z(Z,{})]})});Et.displayName=`TextField`;const Dt=P(({label:e,description:t,placeholder:n,tooltip:r,helperText:i,counter:a=!1,orientation:o=`responsive`,showErrorMessage:s=!0,required:c=!1,disabled:l=!1,maxLength:u})=>{let d=I(),f=I(),[p,m]=L(!1),h=we(null),{form:g,state:_,name:v,handleBlur:y,handleChange:b}=$(),x=H(g.store,({isSubmitting:e})=>e),S=l||x,C=_.value?.length??0,w=Ce(()=>a?u?`${C} / ${u} ký tự`:`${C} ký tự`:``,[C,a,u]),T=!!u&&C>=u*.8,E=!!u&&C>=u,D=_.meta.isDirty||_.meta.isTouched,O=D&&!_.meta.isValid,k=c&&_.value===null,A=!!_.meta.errors.length,j=!!_.value&&!S,M=Ce(()=>R(`h-4 flex-0 text-nowrap text-end text-xs tabular-nums transition-colors`,E?`font-medium text-danger-strong`:T?`text-warning-strong`:`text-text-positive-weak`),[E,T]),ee=F(({target:{value:e}})=>{S||a&&u&&e.length>u||b(e||null)},[S,a,u,b]),te=F(async()=>{_.value&&(await navigator.clipboard.writeText(_.value),h.current!==null&&clearTimeout(h.current),m(!0),h.current=setTimeout(()=>m(!1),1500))},[_.value]);return Se(()=>()=>{h.current!==null&&clearTimeout(h.current)},[]),B(U,{className:`gap-y-4 px-4`,children:[B(W,{orientation:o,"data-invalid":O,children:[B(G,{children:[B(q,{"aria-required":k,htmlFor:d,children:[e,r&&z(X,{tooltip:r})]}),z(J,{children:t})]}),B(K,{children:[z(ae,{id:d,name:v,value:_.value??``,"aria-invalid":O,"aria-describedby":f,autoCapitalize:`none`,autoComplete:`off`,autoCorrect:`off`,placeholder:n,disabled:S,className:R(S&&`pointer-events-none bg-muted-muted opacity-60`),onChange:ee,onBlur:y}),j&&z(`button`,{type:`button`,"aria-label":`Sao chép`,className:`absolute inset-e-1 top-2 flex size-4 cursor-pointer items-center justify-center rounded-md outline-none transition-[color,transform] focus-visible:[&>svg]:scale-125 [&>svg]:size-3.5 [&>svg]:transition-transform`,onClick:te,children:p?z(de,{"aria-hidden":`true`,className:`text-success-strong`}):z(pe,{"aria-hidden":`true`,className:`text-text-positive-weak transition-colors hover:text-text-positive focus-visible:text-primary-strong`})}),x&&z(`div`,{className:`absolute inset-e-2 inset-y-0 top-2.5 text-muted-weak`,children:z(ve,{size:14,className:`animate-spin text-primary-strong`})}),!j&&D&&s&&A&&z(`div`,{className:`absolute inset-e-2 inset-y-0 top-2.5 text-danger-strong`,children:z(le,{size:14})}),B(`div`,{className:`my-1 flex w-full items-start justify-between gap-x-2`,children:[D&&s?z(Q,{id:f,className:`flex-1`,errors:_.meta.errors}):z(`div`,{}),!!a&&z(`p`,{className:M,children:w})]}),z(Y,{isShow:!!i,children:i})]})]}),z(Z,{})]})});Dt.displayName=`TextareaField`;const Ot=P(({label:e,description:t,placeholder:n,tooltip:r,helperText:i,showErrorMessage:a=!0,required:o=!1})=>{let{form:s,state:c,handleChange:l}=$(),u=H(s.store,({isSubmitting:e})=>e),d=c.meta.isDirty&&c.meta.isTouched&&!c.meta.isValid,f=o&&c.value===null,p=F(e=>{u||l(e||null)},[u,l]);return B(U,{className:`gap-y-4 px-4`,children:[B(W,{orientation:`vertical`,"data-invalid":d,children:[B(G,{children:[B(q,{"aria-required":f,children:[e,r&&z(X,{tooltip:r})]}),z(J,{children:t})]}),z(oe,{value:c.value??``,placeholder:n,readOnly:u,onChange:p}),c.meta.isDirty&&a&&!!c.meta.errors.length&&z(Q,{errors:c.meta.errors}),z(Y,{isShow:!!i,children:i})]}),z(Z,{})]})});Ot.displayName=`TextEditorField`;const kt=({label:t,className:n})=>{let r=Gt(),i=F(async()=>{await r.handleSubmit({submitAction:`submit`}),r.state.isSubmitSuccessful&&r.reset()},[r]);return z(r.Subscribe,{selector:e=>({disabled:e.isPristine||!e.isValid||e.isValidating||e.isSubmitting||!e.canSubmit||e.isDefaultValue,isSubmitting:e.isSubmitting}),children:({disabled:r,isSubmitting:a})=>z(e,{type:`button`,size:`md`,disabled:r,isLoading:a,className:R(`min-h-8 min-w-32`,n),onClick:i,children:t??`Xác nhận`})})},At=({type:t=`create`})=>{let n=Gt();return B(`div`,{className:`flex h-8 items-center justify-between`,children:[z(n.Subscribe,{selector:e=>({disabled:e.isPristine||e.isSubmitting}),children:({disabled:t})=>z(e,{color:`muted`,variant:`outline`,type:`button`,size:`md`,disabled:t,className:`h-full min-w-32`,onClick:()=>n.reset(),children:`Hủy bỏ`})}),t===`create`&&z(n.Subscribe,{selector:e=>({disabled:e.isPristine||!e.isValid||e.isValidating||e.isSubmitting||!e.canSubmit||e.isDefaultValue,isSubmitting:e.isSubmitting}),children:({disabled:t,isSubmitting:r})=>B(e,{type:`submit`,size:`md`,disabled:t,isLoading:r,className:`h-full min-w-32`,onClick:async()=>{await n.handleSubmit({submitAction:`create`}),n.state.isSubmitSuccessful&&n.reset()},children:[z(be,{}),`Thêm mới`]})}),t===`update`&&z(n.Subscribe,{selector:e=>({disabled:e.isPristine||!e.isValid||e.isValidating||e.isSubmitting||!e.canSubmit||e.isDefaultValue,isSubmitting:e.isSubmitting}),children:({disabled:t,isSubmitting:r})=>B(e,{type:`submit`,size:`md`,disabled:t,isLoading:r,className:`h-full min-w-32`,onClick:async()=>{await n.handleSubmit({submitAction:`update`}),n.state.isSubmitSuccessful&&n.reset()},children:[z(se,{}),`Cập nhật`]})})]})};function jt({className:e,orientation:t=`horizontal`,decorative:n=!0,...r}){return z(Fe.Root,{"data-slot":`separator`,decorative:n,orientation:t,className:R(`shrink-0 bg-border-weak`,`data-[orientation=horizontal]:h-px`,`data-[orientation=horizontal]:w-full`,`data-[orientation=vertical]:h-full`,`data-[orientation=vertical]:w-px`,e),...r})}const Mt=({title:t,description:n,onDelete:r,children:i})=>B(`section`,{"data-slot":`card-form`,className:`relative flex flex-col rounded-md bg-card pb-4 shadow-card ring-1 ring-border`,children:[B(`div`,{"data-slot":`card-form-header`,className:`flex flex-col space-y-0.5 px-4 py-3`,children:[z(`p`,{className:`font-semibold text-base tracking-tight`,children:t}),!!n&&z(`p`,{className:`text-text-positive-weak text-sm`,children:n})]}),z(jt,{}),z(`div`,{"data-slot":`card-form-main`,className:`flex flex-col py-4`,children:i}),!!r&&B(e,{color:`danger`,variant:`ghost`,size:`sm`,className:`absolute top-2.5 right-3`,onClick:e=>{r?.(),e.preventDefault(),e.stopPropagation()},children:[z(xe,{}),`Remove`]})]}),Nt=({children:e})=>z(`div`,{"data-slot":`section-form`,className:`flex flex-col space-y-4`,children:e}),Pt=({disabled:t,className:n,onClick:r,children:i})=>z(e,{type:`button`,variant:`outline`,color:`muted`,disabled:t,className:R(`min-w-40`,n),onClick:r,children:i??`Huỷ`}),Ft=({isSubmitting:t,submitText:n=`Xác nhận`,disabled:r,className:i,onClick:a})=>z(e,{type:`button`,isLoading:t,disabled:r||t,className:R(`min-w-40`,i),onClick:a,children:n}),It=({title:e,submitText:t,width:n,maxWidth:r,className:a,open:c,onOpenChange:f,children:p})=>{let m=Gt(),h=F(e=>{e||m.reset(),f?.(e)},[m.reset,f]);return z(d,{open:c,onOpenChange:h,children:B(o,{"data-slot":`dialog-portal`,children:[z(u,{}),B(l,{style:{"--width":n,"--max-width":r},className:R(`flex size-full max-h-dvh max-w-dvw flex-col gap-0 overflow-y-auto rounded-none p-0 shadow-dialog sm:h-auto sm:max-h-[85dvh] sm:max-w-5xl sm:rounded-md`,n&&`sm:w-(--width)`,r&&`sm:max-w-(--max-width)`,a),onOpenAutoFocus:e=>{e.preventDefault()},children:[z(`div`,{"data-slot":`dialog-header`,className:`flex items-center justify-center gap-2 px-6 py-5 text-center sm:text-left`,children:z(s,{"data-slot":`dialog-title`,className:`font-semibold text-lg tracking-tight`,children:e})}),z(i,{}),z(`div`,{"data-slot":`dialog-content`,className:`relative flex flex-col overflow-y-auto p-0 pt-4 max-sm:flex-1 sm:p-4`,children:p}),z(i,{}),B(`div`,{"data-slot":`dialog-footer`,className:`flex flex-col-reverse items-center justify-end gap-2 px-6 py-4 sm:flex-row max-sm:[&>button]:w-full`,children:[z(m.Subscribe,{selector:e=>({disabled:e.isSubmitting}),children:({disabled:e})=>z(Pt,{disabled:e,onClick:()=>{m.reset(),h(!1)}})}),z(m.Subscribe,{selector:e=>({isSubmitting:e.isSubmitting,disabled:e.isPristine||!e.isValid||e.isValidating||e.isSubmitting||!e.canSubmit}),children:({isSubmitting:e,disabled:n})=>z(Ft,{isSubmitting:e,disabled:n,submitText:t,onClick:()=>m.handleSubmit()})})]})]})]})})},Lt=({label:e,description:t,helperText:n,orientation:r=`responsive`,children:i})=>B(U,{className:`gap-y-4 px-4`,children:[B(W,{orientation:r,children:[B(G,{children:[z(q,{children:e}),z(J,{children:t})]}),B(K,{children:[i,z(Y,{isShow:!!n,children:n})]})]}),z(Z,{})]}),Rt=({title:e,open:t,contentClassName:n,onOpenChange:r,children:i})=>{let o=Gt();return z(V.Root,{"data-slot":`dialog`,open:t,onOpenChange:r,children:B(V.Portal,{"data-slot":`dialog-portal`,children:[z(V.Overlay,{"data-slot":`dialog-overlay`,className:R(`fixed inset-0 z-40 bg-black/40 backdrop-blur-sm`,`data-[state=open]:animate-in data-[state=open]:fade-in`,`data-[state=closed]:animate-out data-[state=closed]:fade-out`)}),z(V.Content,{"data-slot":`dialog-content`,className:R(`fixed top-4 right-4 z-50 h-[calc(100dvh-2rem)] min-w-sm max-w-xl rounded-md bg-background shadow-lg ring-1 ring-border`,`duration-300`,`data-[state=open]:animate-in data-[state=open]:slide-in-from-right data-[state=open]:fade-in`,`data-[state=closed]:animate-out data-[state=closed]:slide-out-to-right data-[state=closed]:fade-out`),children:B(`section`,{className:`relative flex size-full flex-col`,children:[z(`header`,{className:`flex h-14 shrink-0 items-center border-b border-border px-5`,children:z(`h2`,{className:`font-semibold text-base tracking-tight text-text-positive`,children:e})}),z(`div`,{className:R(`flex flex-1 flex-col overflow-y-auto py-4`,n),children:i}),B(`div`,{className:`flex shrink-0 flex-col gap-2 border-t border-border px-4 py-3`,children:[z(o.Subscribe,{selector:e=>({isSubmitting:e.isSubmitting,disabled:e.isPristine||!e.isValid||e.isValidating||e.isSubmitting||!e.canSubmit}),children:({isSubmitting:e,disabled:t})=>z(Ft,{isSubmitting:e,disabled:t,className:`w-full`,onClick:()=>o.handleSubmit()})}),z(o.Subscribe,{selector:e=>({disabled:e.isPristine||e.isSubmitting}),children:({disabled:e})=>z(Pt,{disabled:e,className:`w-full`,onClick:()=>{o.reset(),r?.(!1)}})})]}),z(V.Close,{asChild:!0,children:z(a,{className:`absolute top-2.5 right-3`})})]})})]})})},zt=({children:e})=>z(`header`,{"data-slot":`section-header`,className:`flex items-center px-4 py-3 font-semibold text-base text-text-positive tracking-tight`,children:e}),Bt=({children:e})=>z(`main`,{"data-slot":`section-main`,className:`relative flex flex-col py-4`,children:e}),Vt=({title:e,children:t})=>B(`section`,{"data-slot":`section-form`,className:`flex flex-col rounded-md bg-background shadow-card ring-1 ring-border`,children:[z(zt,{children:e}),z(jt,{}),z(Bt,{children:t})]}),Ht=({title:e,description:t,helperText:n})=>B(U,{className:`gap-y-4 px-4`,children:[B(W,{className:`gap-0`,children:[B(G,{children:[z($e,{className:`mb-1`,children:e}),z(J,{children:t})]}),z(Y,{isShow:!!n,children:n})]}),z(Z,{})]}),{fieldContext:Ut,formContext:Wt,useFieldContext:$,useFormContext:Gt}=ze(),{useAppForm:Kt,withForm:qt,withFieldGroup:Jt}=Re({fieldContext:Ut,formContext:Wt,fieldComponents:{TextField:Et,TextareaField:Dt,TextEditorField:Ot,NumberField:yt,EmailField:vt,PasswordField:bt,SelectField:St,ComboboxField:gt,DateField:_t,SwitchField:wt,RadioGroupField:xt,CheckboxField:ht,SimpleTextField:mt,SimpleEmailField:at,SimplePasswordField:dt,SimpleTextareaField:pt,SimpleNumberField:ut,SimpleSelectField:ft,SimpleArrayField:We,SimpleBooleanField:tt,SimpleComboboxField:nt,SimpleDateField:rt,SimpleRadioGroupField:it,FieldGroup:U,Field:W,FieldContent:G,FieldLabel:q,FieldContentMain:K,FieldSeparator:Z,FieldError:Q},formComponents:{TanStackDialogForm:It,TanStackPopoverForm:Rt,TanStackContainerForm:Nt,TanStackSectionForm:Vt,TanStackCardForm:Mt,TanStackFieldGroup:Lt,TanStackTitleField:Ht,TanStackActionsForm:At,TanStackActionSubmit:kt,ArrayCol:He,ArrayHeaderRow:Ue}});export{qt as a,K as c,Z as d,Jt as i,Q as l,Kt as n,W as o,Gt as r,G as s,$ as t,U as u};
12
+ //# sourceMappingURL=tanstack-form-CCDV-3Ml.js.map