@customafk/lunas-ui 0.0.79 → 0.0.80

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 (296) hide show
  1. package/dist/{add-new-_5opEbrI.js → add-new-DfniMrHa.js} +1 -1
  2. package/dist/{add-new-_5opEbrI.js.map → add-new-DfniMrHa.js.map} +1 -1
  3. package/dist/{add-new-BaA0yy6U.cjs → add-new-dgznne6n.cjs} +1 -1
  4. package/dist/{add-new-BaA0yy6U.cjs.map → add-new-dgznne6n.cjs.map} +1 -1
  5. package/dist/{alert-dialog-brXudt77.cjs → alert-dialog-BgEaBYoh.cjs} +1 -1
  6. package/dist/{alert-dialog-brXudt77.cjs.map → alert-dialog-BgEaBYoh.cjs.map} +1 -1
  7. package/dist/{alert-dialog-DcQKEgVC.js → alert-dialog-UwGNuTYk.js} +1 -1
  8. package/dist/{alert-dialog-DcQKEgVC.js.map → alert-dialog-UwGNuTYk.js.map} +1 -1
  9. package/dist/{button-MK4kEvtG.d.cts → button-BdYhnlA1.d.ts} +6 -6
  10. package/dist/{button-Bu22bfSc.d.ts → button-CGIJb6H5.d.cts} +6 -6
  11. package/dist/{calendar-DdIUj5Dk.js → calendar-C2yGJ9AV.js} +1 -1
  12. package/dist/{calendar-DdIUj5Dk.js.map → calendar-C2yGJ9AV.js.map} +1 -1
  13. package/dist/{calendar-DGqBIV7n.cjs → calendar-Fjm1d0mU.cjs} +1 -1
  14. package/dist/{calendar-DGqBIV7n.cjs.map → calendar-Fjm1d0mU.cjs.map} +1 -1
  15. package/dist/cards/simple-card.d.cts +2 -2
  16. package/dist/{command-KDJ9A-WG.d.ts → command-B23xCgK_.d.ts} +12 -12
  17. package/dist/{command-DlFoBoLD.d.cts → command-BWvqtwPS.d.cts} +12 -12
  18. package/dist/{command-BaW_SRkQ.cjs → command-DHGZlBKd.cjs} +2 -2
  19. package/dist/{command-BaW_SRkQ.cjs.map → command-DHGZlBKd.cjs.map} +1 -1
  20. package/dist/{command-CRNFM6Sb.js → command-DhSE6UaR.js} +2 -2
  21. package/dist/{command-CRNFM6Sb.js.map → command-DhSE6UaR.js.map} +1 -1
  22. package/dist/data-display/empty.d.cts +2 -2
  23. package/dist/data-display/statistic.d.cts +2 -2
  24. package/dist/{dialog-SbX5GvMK.js → dialog-B2LS2JLb.js} +1 -1
  25. package/dist/{dialog-SbX5GvMK.js.map → dialog-B2LS2JLb.js.map} +1 -1
  26. package/dist/{dialog-DqP1cjOr.d.ts → dialog-BFtz_6mv.d.cts} +1 -1
  27. package/dist/{dialog-DGbWt3A4.cjs → dialog-BSdn3QaW.cjs} +1 -1
  28. package/dist/{dialog-DGbWt3A4.cjs.map → dialog-BSdn3QaW.cjs.map} +1 -1
  29. package/dist/{dialog-ONWCpHMt.d.cts → dialog-Dn2Q-QRw.d.ts} +12 -12
  30. package/dist/dialogs/confirm-dialog.cjs +1 -1
  31. package/dist/dialogs/confirm-dialog.js +1 -1
  32. package/dist/dialogs/detail-dialog/component/sidebar.cjs +1 -1
  33. package/dist/dialogs/detail-dialog/component/sidebar.d.cts +29 -29
  34. package/dist/dialogs/detail-dialog/component/sidebar.d.ts +4 -4
  35. package/dist/dialogs/detail-dialog/component/sidebar.js +1 -1
  36. package/dist/dialogs/detail-dialog/index.cjs +1 -1
  37. package/dist/dialogs/detail-dialog/index.js +1 -1
  38. package/dist/dialogs/error-dialog.cjs +1 -1
  39. package/dist/dialogs/error-dialog.js +1 -1
  40. package/dist/dialogs/form-dialog.cjs +1 -1
  41. package/dist/dialogs/form-dialog.d.cts +2 -2
  42. package/dist/dialogs/form-dialog.d.ts +2 -2
  43. package/dist/dialogs/form-dialog.js +1 -1
  44. package/dist/dialogs/loading-dialog.cjs +1 -1
  45. package/dist/dialogs/loading-dialog.js +1 -1
  46. package/dist/{drawer-hi51Beoq.js → drawer-COD1n5aA.js} +1 -1
  47. package/dist/{drawer-hi51Beoq.js.map → drawer-COD1n5aA.js.map} +1 -1
  48. package/dist/{drawer-CaX-sUvZ.cjs → drawer-CsCzBHvx.cjs} +1 -1
  49. package/dist/{drawer-CaX-sUvZ.cjs.map → drawer-CsCzBHvx.cjs.map} +1 -1
  50. package/dist/{dropdown-menu-DS1A05D0.js → dropdown-menu-Brlye320.js} +1 -1
  51. package/dist/{dropdown-menu-DS1A05D0.js.map → dropdown-menu-Brlye320.js.map} +1 -1
  52. package/dist/{dropdown-menu-Djtt8w9D.cjs → dropdown-menu-DwI8o0uQ.cjs} +1 -1
  53. package/dist/{dropdown-menu-Djtt8w9D.cjs.map → dropdown-menu-DwI8o0uQ.cjs.map} +1 -1
  54. package/dist/{error-dialog-BeYJOtSH.js → error-dialog-BF1VNZXk.js} +2 -2
  55. package/dist/{error-dialog-BeYJOtSH.js.map → error-dialog-BF1VNZXk.js.map} +1 -1
  56. package/dist/{error-dialog-DMbJhWyk.cjs → error-dialog-C3b4fqAI.cjs} +2 -2
  57. package/dist/{error-dialog-DMbJhWyk.cjs.map → error-dialog-C3b4fqAI.cjs.map} +1 -1
  58. package/dist/{form-wrapper-bC0IEtWT.cjs → form-wrapper-CI2iMUNJ.cjs} +2 -2
  59. package/dist/{form-wrapper-bC0IEtWT.cjs.map → form-wrapper-CI2iMUNJ.cjs.map} +1 -1
  60. package/dist/{form-wrapper-CFcpJdfv.js → form-wrapper-DaguHv9W.js} +2 -2
  61. package/dist/{form-wrapper-CFcpJdfv.js.map → form-wrapper-DaguHv9W.js.map} +1 -1
  62. package/dist/forms/combobox-field.cjs +1 -1
  63. package/dist/forms/combobox-field.d.cts +2 -2
  64. package/dist/forms/combobox-field.js +1 -1
  65. package/dist/forms/date-field.cjs +1 -1
  66. package/dist/forms/date-field.d.cts +2 -2
  67. package/dist/forms/date-field.d.ts +2 -2
  68. package/dist/forms/date-field.js +1 -1
  69. package/dist/forms/form-wrapper.cjs +1 -1
  70. package/dist/forms/form-wrapper.d.cts +2 -2
  71. package/dist/forms/form-wrapper.js +1 -1
  72. package/dist/forms/multi-select-field.cjs +1 -1
  73. package/dist/forms/multi-select-field.cjs.map +1 -1
  74. package/dist/forms/multi-select-field.d.cts +2 -2
  75. package/dist/forms/multi-select-field.d.ts +2 -2
  76. package/dist/forms/multi-select-field.js +1 -1
  77. package/dist/forms/number-field.cjs +1 -1
  78. package/dist/forms/number-field.d.cts +2 -2
  79. package/dist/forms/number-field.d.ts +2 -2
  80. package/dist/forms/number-field.js +1 -1
  81. package/dist/forms/password-field.cjs +1 -1
  82. package/dist/forms/password-field.d.cts +2 -2
  83. package/dist/forms/password-field.d.ts +2 -2
  84. package/dist/forms/password-field.js +1 -1
  85. package/dist/forms/select-field.cjs +1 -1
  86. package/dist/forms/select-field.d.cts +2 -2
  87. package/dist/forms/select-field.js +1 -1
  88. package/dist/forms/switch-field.cjs +1 -1
  89. package/dist/forms/switch-field.d.cts +2 -2
  90. package/dist/forms/switch-field.d.ts +2 -2
  91. package/dist/forms/switch-field.js +1 -1
  92. package/dist/forms/text-field.cjs +1 -1
  93. package/dist/forms/text-field.d.cts +2 -2
  94. package/dist/forms/text-field.d.ts +2 -2
  95. package/dist/forms/text-field.js +1 -1
  96. package/dist/forms/textarea-field.cjs +1 -1
  97. package/dist/forms/textarea-field.d.cts +2 -2
  98. package/dist/forms/textarea-field.d.ts +2 -2
  99. package/dist/forms/textarea-field.js +1 -1
  100. package/dist/{input-ZyZ1HKHN.js → input-BtT8HfYE.js} +1 -1
  101. package/dist/{input-ZyZ1HKHN.js.map → input-BtT8HfYE.js.map} +1 -1
  102. package/dist/{input-CG09_mqs.d.ts → input-CwuYXUPY.d.ts} +3 -3
  103. package/dist/{input-GHXBt6hz.cjs → input-DfGojpRF.cjs} +1 -1
  104. package/dist/{input-GHXBt6hz.cjs.map → input-DfGojpRF.cjs.map} +1 -1
  105. package/dist/{input-C6NFFJxS.d.cts → input-Kq2bOgsM.d.cts} +3 -3
  106. package/dist/layouts/app-layout/index.d.cts +4 -4
  107. package/dist/layouts/app-layout/index.d.ts +3 -3
  108. package/dist/layouts/flex.d.cts +2 -2
  109. package/dist/layouts/service-layout/index.cjs +1 -1
  110. package/dist/layouts/service-layout/index.d.cts +4 -4
  111. package/dist/layouts/service-layout/index.d.ts +3 -3
  112. package/dist/layouts/service-layout/index.js +1 -1
  113. package/dist/layouts/service-layout/index.js.map +1 -1
  114. package/dist/{multi-select-DIZCHmU4.cjs → multi-select-C0dFenI-.cjs} +2 -2
  115. package/dist/{multi-select-DIZCHmU4.cjs.map → multi-select-C0dFenI-.cjs.map} +1 -1
  116. package/dist/{multi-select-DzKtuSER.js → multi-select-l0HITJuv.js} +2 -2
  117. package/dist/{multi-select-DzKtuSER.js.map → multi-select-l0HITJuv.js.map} +1 -1
  118. package/dist/{popover-DvXi2pyH.js → popover-BJWOgxQ5.js} +1 -1
  119. package/dist/{popover-DvXi2pyH.js.map → popover-BJWOgxQ5.js.map} +1 -1
  120. package/dist/{popover-DLbTz02b.cjs → popover-BrDe5Jb8.cjs} +1 -1
  121. package/dist/{popover-DLbTz02b.cjs.map → popover-BrDe5Jb8.cjs.map} +1 -1
  122. package/dist/{refresh-BHjc0ETv.js → refresh-BiOPtbhd.js} +1 -1
  123. package/dist/{refresh-BHjc0ETv.js.map → refresh-BiOPtbhd.js.map} +1 -1
  124. package/dist/{refresh-Bt9GEyuC.cjs → refresh-DgFpv8mw.cjs} +1 -1
  125. package/dist/{refresh-Bt9GEyuC.cjs.map → refresh-DgFpv8mw.cjs.map} +1 -1
  126. package/dist/{scroll-area-BKJYk4zH.js → scroll-area-BJYI14s5.js} +1 -1
  127. package/dist/{scroll-area-BKJYk4zH.js.map → scroll-area-BJYI14s5.js.map} +1 -1
  128. package/dist/{scroll-area-bTF4NokG.cjs → scroll-area-slD5Jekm.cjs} +1 -1
  129. package/dist/{scroll-area-bTF4NokG.cjs.map → scroll-area-slD5Jekm.cjs.map} +1 -1
  130. package/dist/{search-input-DM9ePMxA.js → search-input--FQFzdW3.js} +2 -2
  131. package/dist/{search-input-DM9ePMxA.js.map → search-input--FQFzdW3.js.map} +1 -1
  132. package/dist/{search-input-DFgHJyOp.cjs → search-input-DV8zjsMQ.cjs} +2 -2
  133. package/dist/{search-input-DFgHJyOp.cjs.map → search-input-DV8zjsMQ.cjs.map} +1 -1
  134. package/dist/{select-CvPIAeWb.cjs → select-Ce-YROpe.cjs} +1 -1
  135. package/dist/{select-CvPIAeWb.cjs.map → select-Ce-YROpe.cjs.map} +1 -1
  136. package/dist/{select---jN6Yy0.js → select-Di8fOKVF.js} +1 -1
  137. package/dist/{select---jN6Yy0.js.map → select-Di8fOKVF.js.map} +1 -1
  138. package/dist/{separator-DUymk2P4.d.ts → separator-C4wU5Rr6.d.ts} +3 -3
  139. package/dist/{separator-DIIArEUd.d.cts → separator-mZ8r56s2.d.cts} +3 -3
  140. package/dist/{sidebar-BF_5REY5.cjs → sidebar-B6s0ZZHA.cjs} +2 -2
  141. package/dist/{sidebar-BF_5REY5.cjs.map → sidebar-B6s0ZZHA.cjs.map} +1 -1
  142. package/dist/{sidebar-BgOz0zZh.js → sidebar-CBEPWmnf.js} +2 -2
  143. package/dist/{sidebar-BgOz0zZh.js.map → sidebar-CBEPWmnf.js.map} +1 -1
  144. package/dist/{switch-C8OMYLfj.js → switch-C7foFKpS.js} +1 -1
  145. package/dist/{switch-C8OMYLfj.js.map → switch-C7foFKpS.js.map} +1 -1
  146. package/dist/{switch-BLfDkOOl.cjs → switch-DOgkZVAD.cjs} +1 -1
  147. package/dist/{switch-BLfDkOOl.cjs.map → switch-DOgkZVAD.cjs.map} +1 -1
  148. package/dist/table/index.cjs +1 -1
  149. package/dist/table/index.d.cts +2 -2
  150. package/dist/table/index.d.ts +2 -2
  151. package/dist/table/index.js +1 -1
  152. package/dist/{table-B7a9Rpsg.js → table-CKNAm27W.js} +1 -1
  153. package/dist/{table-B7a9Rpsg.js.map → table-CKNAm27W.js.map} +1 -1
  154. package/dist/{table-3FiYZeab.cjs → table-CzMEpN9D.cjs} +1 -1
  155. package/dist/{table-3FiYZeab.cjs.map → table-CzMEpN9D.cjs.map} +1 -1
  156. package/dist/{textarea-jrCmozqt.cjs → textarea-Ewj89Eq3.cjs} +1 -1
  157. package/dist/{textarea-jrCmozqt.cjs.map → textarea-Ewj89Eq3.cjs.map} +1 -1
  158. package/dist/{textarea-Br_DX1wm.js → textarea-n8OO0QsI.js} +1 -1
  159. package/dist/{textarea-Br_DX1wm.js.map → textarea-n8OO0QsI.js.map} +1 -1
  160. package/dist/{title-CfI-y7Xt.cjs → title-DONX1fR6.cjs} +1 -1
  161. package/dist/{title-CfI-y7Xt.cjs.map → title-DONX1fR6.cjs.map} +1 -1
  162. package/dist/{title-C5OV9Ei4.js → title-itXqz0us.js} +1 -1
  163. package/dist/{title-C5OV9Ei4.js.map → title-itXqz0us.js.map} +1 -1
  164. package/dist/{toggle-2VFLb0ul.d.cts → toggle-DPTA8XO2.d.ts} +5 -5
  165. package/dist/{toggle-Ch4ddcGF.d.ts → toggle-DYeyKWVE.d.cts} +4 -4
  166. package/dist/{tooltip-Cfp93PmG.d.ts → tooltip-Dt83PTkc.d.ts} +6 -6
  167. package/dist/typography/paragraph.d.cts +2 -2
  168. package/dist/typography/paragraph.d.ts +2 -2
  169. package/dist/typography/title.cjs +1 -1
  170. package/dist/typography/title.d.cts +2 -2
  171. package/dist/typography/title.d.ts +2 -2
  172. package/dist/typography/title.js +1 -1
  173. package/dist/ui/alert-dialog.cjs +1 -1
  174. package/dist/ui/alert-dialog.d.cts +12 -12
  175. package/dist/ui/alert-dialog.d.ts +12 -12
  176. package/dist/ui/alert-dialog.js +1 -1
  177. package/dist/ui/alert.d.cts +7 -7
  178. package/dist/ui/alert.d.ts +7 -7
  179. package/dist/ui/aspect-ratio.d.cts +2 -2
  180. package/dist/ui/aspect-ratio.d.ts +2 -2
  181. package/dist/ui/avatar.d.cts +4 -4
  182. package/dist/ui/avatar.d.ts +4 -4
  183. package/dist/ui/badge.d.cts +2 -2
  184. package/dist/ui/badge.d.ts +2 -2
  185. package/dist/ui/breadcrumb.d.cts +8 -8
  186. package/dist/ui/breadcrumb.d.ts +8 -8
  187. package/dist/ui/button.d.cts +1 -1
  188. package/dist/ui/button.d.ts +1 -1
  189. package/dist/ui/buttons/add-new.cjs +1 -1
  190. package/dist/ui/buttons/add-new.js +1 -1
  191. package/dist/ui/buttons/refresh.cjs +1 -1
  192. package/dist/ui/buttons/refresh.js +1 -1
  193. package/dist/ui/calendar.cjs +1 -1
  194. package/dist/ui/calendar.d.cts +4 -4
  195. package/dist/ui/calendar.d.ts +4 -4
  196. package/dist/ui/calendar.js +1 -1
  197. package/dist/ui/card.d.cts +8 -8
  198. package/dist/ui/card.d.ts +8 -8
  199. package/dist/ui/carousel.d.cts +7 -7
  200. package/dist/ui/carousel.d.ts +7 -7
  201. package/dist/ui/collapsible.d.cts +4 -4
  202. package/dist/ui/collapsible.d.ts +4 -4
  203. package/dist/ui/command.cjs +1 -1
  204. package/dist/ui/command.d.cts +2 -2
  205. package/dist/ui/command.d.ts +2 -2
  206. package/dist/ui/command.js +1 -1
  207. package/dist/ui/context-menu.d.cts +16 -16
  208. package/dist/ui/context-menu.d.ts +16 -16
  209. package/dist/ui/dialog.cjs +1 -1
  210. package/dist/ui/dialog.d.cts +1 -1
  211. package/dist/ui/dialog.d.ts +1 -1
  212. package/dist/ui/dialog.js +1 -1
  213. package/dist/ui/dropdown-menu.cjs +1 -1
  214. package/dist/ui/dropdown-menu.d.cts +16 -16
  215. package/dist/ui/dropdown-menu.d.ts +16 -16
  216. package/dist/ui/dropdown-menu.js +1 -1
  217. package/dist/ui/file-uploader.d.cts +2 -2
  218. package/dist/ui/file-uploader.d.ts +2 -2
  219. package/dist/ui/form.d.cts +7 -7
  220. package/dist/ui/form.d.ts +7 -7
  221. package/dist/ui/hover-card.d.cts +4 -4
  222. package/dist/ui/hover-card.d.ts +4 -4
  223. package/dist/ui/input-otp.d.cts +5 -5
  224. package/dist/ui/input-otp.d.ts +5 -5
  225. package/dist/ui/input.cjs +1 -1
  226. package/dist/ui/input.d.cts +1 -1
  227. package/dist/ui/input.d.ts +1 -1
  228. package/dist/ui/input.js +1 -1
  229. package/dist/ui/inputs/search-input.cjs +1 -1
  230. package/dist/ui/inputs/search-input.d.cts +3 -3
  231. package/dist/ui/inputs/search-input.d.ts +3 -3
  232. package/dist/ui/inputs/search-input.js +1 -1
  233. package/dist/ui/label.d.cts +2 -2
  234. package/dist/ui/label.d.ts +2 -2
  235. package/dist/ui/menubar.d.cts +17 -17
  236. package/dist/ui/menubar.d.ts +17 -17
  237. package/dist/ui/multi-select.cjs +1 -1
  238. package/dist/ui/multi-select.d.cts +2 -2
  239. package/dist/ui/multi-select.d.ts +2 -2
  240. package/dist/ui/multi-select.js +1 -1
  241. package/dist/ui/navigation-menu.d.cts +9 -9
  242. package/dist/ui/navigation-menu.d.ts +9 -9
  243. package/dist/ui/pagination.d.cts +9 -9
  244. package/dist/ui/pagination.d.ts +9 -9
  245. package/dist/ui/popover.cjs +1 -1
  246. package/dist/ui/popover.d.cts +5 -5
  247. package/dist/ui/popover.d.ts +5 -5
  248. package/dist/ui/popover.js +1 -1
  249. package/dist/ui/progress.d.cts +2 -2
  250. package/dist/ui/progress.d.ts +2 -2
  251. package/dist/ui/radio-group.d.cts +3 -3
  252. package/dist/ui/radio-group.d.ts +3 -3
  253. package/dist/ui/resizable.d.cts +4 -4
  254. package/dist/ui/resizable.d.ts +4 -4
  255. package/dist/ui/scroll-area.cjs +1 -1
  256. package/dist/ui/scroll-area.d.cts +3 -3
  257. package/dist/ui/scroll-area.d.ts +3 -3
  258. package/dist/ui/scroll-area.js +1 -1
  259. package/dist/ui/select.cjs +1 -1
  260. package/dist/ui/select.d.cts +11 -11
  261. package/dist/ui/select.d.ts +11 -11
  262. package/dist/ui/select.js +1 -1
  263. package/dist/ui/separator.d.cts +1 -1
  264. package/dist/ui/separator.d.ts +1 -1
  265. package/dist/ui/sheet.d.cts +9 -9
  266. package/dist/ui/sheet.d.ts +9 -9
  267. package/dist/ui/sidebar.cjs +1 -1
  268. package/dist/ui/sidebar.d.cts +27 -27
  269. package/dist/ui/sidebar.d.ts +30 -30
  270. package/dist/ui/sidebar.js +1 -1
  271. package/dist/ui/skeleton.d.cts +2 -2
  272. package/dist/ui/skeleton.d.ts +2 -2
  273. package/dist/ui/slider.d.cts +2 -2
  274. package/dist/ui/slider.d.ts +2 -2
  275. package/dist/ui/sonner.d.cts +2 -2
  276. package/dist/ui/sonner.d.ts +2 -2
  277. package/dist/ui/switch.cjs +1 -1
  278. package/dist/ui/switch.d.cts +2 -2
  279. package/dist/ui/switch.d.ts +2 -2
  280. package/dist/ui/switch.js +1 -1
  281. package/dist/ui/table.cjs +1 -1
  282. package/dist/ui/table.d.cts +9 -9
  283. package/dist/ui/table.d.ts +9 -9
  284. package/dist/ui/table.js +1 -1
  285. package/dist/ui/tabs.d.cts +5 -5
  286. package/dist/ui/tabs.d.ts +5 -5
  287. package/dist/ui/textarea.cjs +1 -1
  288. package/dist/ui/textarea.d.cts +2 -2
  289. package/dist/ui/textarea.d.ts +2 -2
  290. package/dist/ui/textarea.js +1 -1
  291. package/dist/ui/toggle-group.d.cts +4 -4
  292. package/dist/ui/toggle-group.d.ts +4 -4
  293. package/dist/ui/toggle.d.cts +1 -1
  294. package/dist/ui/toggle.d.ts +1 -1
  295. package/dist/ui/tooltip.d.ts +1 -1
  296. package/package.json +2 -2
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime9 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime8 from "react/jsx-runtime";
2
2
  import { FieldPath, FieldValues } from "react-hook-form";
3
3
 
4
4
  //#region packages/components/forms/number-field.d.ts
@@ -22,7 +22,7 @@ declare const NumberField: <TFieldValues extends FieldValues = FieldValues>({
22
22
  unitText,
23
23
  description,
24
24
  onValueChange
25
- }: Props<TFieldValues>) => react_jsx_runtime9.JSX.Element;
25
+ }: Props<TFieldValues>) => react_jsx_runtime8.JSX.Element;
26
26
  //#endregion
27
27
  export { NumberField };
28
28
  //# sourceMappingURL=number-field.d.cts.map
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime7 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime5 from "react/jsx-runtime";
2
2
  import { FieldPath, FieldValues } from "react-hook-form";
3
3
 
4
4
  //#region packages/components/forms/number-field.d.ts
@@ -22,7 +22,7 @@ declare const NumberField: <TFieldValues extends FieldValues = FieldValues>({
22
22
  unitText,
23
23
  description,
24
24
  onValueChange
25
- }: Props<TFieldValues>) => react_jsx_runtime7.JSX.Element;
25
+ }: Props<TFieldValues>) => react_jsx_runtime5.JSX.Element;
26
26
  //#endregion
27
27
  export { NumberField };
28
28
  //# sourceMappingURL=number-field.d.ts.map
@@ -1,2 +1,2 @@
1
- import"../label-CdrxlBJ8.js";import{FormControl as e,FormDescription as t,FormField as n,FormItem as r,FormLabel as i,FormMessage as a}from"../form-BT1TbgK6.js";import{Input as o}from"../input-ZyZ1HKHN.js";import{cn as s}from"@customafk/react-toolkit/utils";import{useCallback as c,useEffect as l,useMemo as u,useRef as d,useState as f}from"react";import{jsx as p,jsxs as m}from"react/jsx-runtime";import{useWatch as h}from"react-hook-form";const g=e=>e?/^-?\d*\.?\d*$/:/^\d*\.?\d*$/,_=e=>Number(e).toLocaleString(),v=({disabled:e=!1,readonly:t=!1,allowNegative:n=!1,numberAfterDecimalPoint:r=2,roundingRule:i=`none`,value:a=``,unitText:h,decimal:v,placeholder:y,precision:b,onChange:x,onValueChange:S,onBlur:C,...w})=>{let T=d(null),E=d(null),[D,O]=f(a.toString()),k=v?.[1]??r,A=v&&v[0]-v[1],j=u(()=>g(n),[n]),M=c(e=>{if(!k&&e.includes(`.`))return!1;let t=e.split(`.`)[1];return!t||t.length<=k},[k]),N=c(e=>{if(!v||e===`-`)return!0;let[t,n=``]=e.split(`.`);return n.length<=v[1]&&(t.startsWith(`-`)?t.length-1:t.length)<=A},[v,A]),P=c((e,t)=>{if(i===`none`)return e;let n=Math.pow(10,t),r=e*n;switch(i){case`up`:return Math.ceil(r)/n;case`down`:return Math.floor(r)/n;case`nearest`:return r%1<.1?Math.floor(r)/n:r%1>=.59?Math.ceil(r)/n:(Math.floor(r)+.5)/n;default:return e}},[i]),F=c(e=>!r&&e.includes(`.`)||e.split(`.`)[1]?.length>r,[r]),I=c(e=>{if(e===`0`)return`0`;if(!Number(e))return``;let t=parseFloat(e),n=Math.min(k-1,b||0),r=P(t,n).toString(),[i,a=``]=r.split(`.`),o=_(i);return a?`${o}.${a}`:o},[P,k,b]),L=c(e=>{if(!v||e===`-`)return!0;let[t,n=``]=e.split(`.`),r=t.startsWith(`-`)?t.length-1:t.length,i=v[0]-v[1];return n.length<=v[1]&&r<=i},[v]),R=c(e=>{x?.(e);let{value:t}=e.target;if(!t){S?.(void 0),O(``);return}let r=t===`0`,i=t===`-`&&n;if(r||i){S?.(0),O(t);return}let a=j.test(t)&&N(t)&&(v||M(t));if(!a)return;let o=parseFloat(t)||0;S?.(o),O(t)},[n,v,M,N,x,S,j]),z=c(()=>{t||O(e=>e.replace(/,/g,``))},[t]),B=c(()=>{t||(C?.(),O(e=>I(e)))},[t,C,I]);return l(()=>{let e=document.activeElement===E.current;if(!a||!j.test(a.toString())||!L(a.toString())||!v&&F(a.toString())){O(``);return}O(t=>t===`-`?`-`:t?e?a.toString():I(a.toString()):``)},[v,I,a,F,L,j]),l(()=>{if(!T.current||!E.current||!h)return;let e=T.current.offsetWidth;E.current.style.setProperty(`padding-right`,`${(e+10)/16}rem`)},[e,h]),m(`div`,{className:`relative`,children:[p(o,{...w,ref:E,value:D||(t?`0`:``),placeholder:y,disabled:e,readOnly:t,className:s(`font-number text-end`,t&&`bg-muted text-muted-foreground`),onChange:R,onFocus:z,onBlur:B}),h&&p(`span`,{ref:T,className:`text-muted-foreground pointer-events-none absolute top-1/2 right-2 -translate-y-1/2 text-sm`,children:h})]})},y=({name:o,label:s=`Number Field`,placeholder:c=`0`,isShowErrorMsg:l=!1,isShowCount:u=!1,unitText:d=``,description:f=``,onValueChange:g})=>{let _=h({name:o});return p(n,{name:o,render:({field:{onChange:n,...o}})=>m(r,{className:`w-full gap-0`,children:[p(i,{children:s}),p(e,{children:p(v,{...o,placeholder:c,className:`w-full`,unitText:d,onValueChange:e=>{n(e),g?.(e)}})}),u&&m(`div`,{className:`text-muted-foreground text-end text-xs`,children:[_?.length??0,` characters`]}),!!f&&p(t,{children:f}),l&&p(a,{})]})})};export{y as NumberField};
1
+ import"../label-CdrxlBJ8.js";import{FormControl as e,FormDescription as t,FormField as n,FormItem as r,FormLabel as i,FormMessage as a}from"../form-BT1TbgK6.js";import{Input as o}from"../input-BtT8HfYE.js";import{cn as s}from"@customafk/react-toolkit/utils";import{useCallback as c,useEffect as l,useMemo as u,useRef as d,useState as f}from"react";import{jsx as p,jsxs as m}from"react/jsx-runtime";import{useWatch as h}from"react-hook-form";const g=e=>e?/^-?\d*\.?\d*$/:/^\d*\.?\d*$/,_=e=>Number(e).toLocaleString(),v=({disabled:e=!1,readonly:t=!1,allowNegative:n=!1,numberAfterDecimalPoint:r=2,roundingRule:i=`none`,value:a=``,unitText:h,decimal:v,placeholder:y,precision:b,onChange:x,onValueChange:S,onBlur:C,...w})=>{let T=d(null),E=d(null),[D,O]=f(a.toString()),k=v?.[1]??r,A=v&&v[0]-v[1],j=u(()=>g(n),[n]),M=c(e=>{if(!k&&e.includes(`.`))return!1;let t=e.split(`.`)[1];return!t||t.length<=k},[k]),N=c(e=>{if(!v||e===`-`)return!0;let[t,n=``]=e.split(`.`);return n.length<=v[1]&&(t.startsWith(`-`)?t.length-1:t.length)<=A},[v,A]),P=c((e,t)=>{if(i===`none`)return e;let n=Math.pow(10,t),r=e*n;switch(i){case`up`:return Math.ceil(r)/n;case`down`:return Math.floor(r)/n;case`nearest`:return r%1<.1?Math.floor(r)/n:r%1>=.59?Math.ceil(r)/n:(Math.floor(r)+.5)/n;default:return e}},[i]),F=c(e=>!r&&e.includes(`.`)||e.split(`.`)[1]?.length>r,[r]),I=c(e=>{if(e===`0`)return`0`;if(!Number(e))return``;let t=parseFloat(e),n=Math.min(k-1,b||0),r=P(t,n).toString(),[i,a=``]=r.split(`.`),o=_(i);return a?`${o}.${a}`:o},[P,k,b]),L=c(e=>{if(!v||e===`-`)return!0;let[t,n=``]=e.split(`.`),r=t.startsWith(`-`)?t.length-1:t.length,i=v[0]-v[1];return n.length<=v[1]&&r<=i},[v]),R=c(e=>{x?.(e);let{value:t}=e.target;if(!t){S?.(void 0),O(``);return}let r=t===`0`,i=t===`-`&&n;if(r||i){S?.(0),O(t);return}let a=j.test(t)&&N(t)&&(v||M(t));if(!a)return;let o=parseFloat(t)||0;S?.(o),O(t)},[n,v,M,N,x,S,j]),z=c(()=>{t||O(e=>e.replace(/,/g,``))},[t]),B=c(()=>{t||(C?.(),O(e=>I(e)))},[t,C,I]);return l(()=>{let e=document.activeElement===E.current;if(!a||!j.test(a.toString())||!L(a.toString())||!v&&F(a.toString())){O(``);return}O(t=>t===`-`?`-`:t?e?a.toString():I(a.toString()):``)},[v,I,a,F,L,j]),l(()=>{if(!T.current||!E.current||!h)return;let e=T.current.offsetWidth;E.current.style.setProperty(`padding-right`,`${(e+10)/16}rem`)},[e,h]),m(`div`,{className:`relative`,children:[p(o,{...w,ref:E,value:D||(t?`0`:``),placeholder:y,disabled:e,readOnly:t,className:s(`font-number text-end`,t&&`bg-muted text-muted-foreground`),onChange:R,onFocus:z,onBlur:B}),h&&p(`span`,{ref:T,className:`text-muted-foreground pointer-events-none absolute top-1/2 right-2 -translate-y-1/2 text-sm`,children:h})]})},y=({name:o,label:s=`Number Field`,placeholder:c=`0`,isShowErrorMsg:l=!1,isShowCount:u=!1,unitText:d=``,description:f=``,onValueChange:g})=>{let _=h({name:o});return p(n,{name:o,render:({field:{onChange:n,...o}})=>m(r,{className:`w-full gap-0`,children:[p(i,{children:s}),p(e,{children:p(v,{...o,placeholder:c,className:`w-full`,unitText:d,onValueChange:e=>{n(e),g?.(e)}})}),u&&m(`div`,{className:`text-muted-foreground text-end text-xs`,children:[_?.length??0,` characters`]}),!!f&&p(t,{children:f}),l&&p(a,{})]})})};export{y as NumberField};
2
2
  //# sourceMappingURL=number-field.js.map
@@ -1,2 +1,2 @@
1
- "use client";const e=require(`../chunk-CUT6urMc.cjs`);require(`../label-CHNSlaoz.cjs`);const t=require(`../form-DyH5iWq7.cjs`),n=require(`../input-GHXBt6hz.cjs`),r=e.__toESM(require(`lucide-react`)),i=e.__toESM(require(`@customafk/react-toolkit/utils`)),a=e.__toESM(require(`react`)),o=e.__toESM(require(`react/jsx-runtime`)),s=({className:e,...t})=>{let s=(0,a.useId)(),[c,l]=(0,a.useState)(!1),u=(0,a.useCallback)(()=>l(e=>!e),[]);return(0,o.jsxs)(`div`,{className:`relative`,children:[(0,o.jsx)(n.Input,{...t,id:s,placeholder:`Password`,type:c?`text`:`password`,className:(0,i.cn)(`pe-9`,e)}),(0,o.jsx)(`button`,{className:`text-muted-foreground/80 hover:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 absolute inset-y-0 end-0 flex h-full w-9 items-center justify-center rounded-e-md transition-[color,box-shadow] outline-none focus:z-10 focus-visible:ring-[3px] disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50`,type:`button`,onClick:u,"aria-label":c?`Hide password`:`Show password`,"aria-pressed":c,"aria-controls":`password`,children:c?(0,o.jsx)(r.EyeOffIcon,{size:16,"aria-hidden":`true`}):(0,o.jsx)(r.EyeIcon,{size:16,"aria-hidden":`true`})})]})},c=({name:e,label:n=`Text Field`,placeholder:r=`Enter text here`,isShowErrorMsg:i=!1,description:a,onValueChange:c})=>(0,o.jsx)(t.FormField,{name:e,render:({field:e})=>(0,o.jsxs)(t.FormItem,{className:`w-full`,children:[(0,o.jsx)(t.FormLabel,{children:n}),(0,o.jsx)(t.FormControl,{children:(0,o.jsx)(s,{placeholder:r,...e,onValueChange:c})}),!!a&&(0,o.jsx)(t.FormDescription,{children:a}),i&&(0,o.jsx)(t.FormMessage,{})]})});exports.PasswordField=c;
1
+ "use client";const e=require(`../chunk-CUT6urMc.cjs`);require(`../label-CHNSlaoz.cjs`);const t=require(`../form-DyH5iWq7.cjs`),n=require(`../input-DfGojpRF.cjs`),r=e.__toESM(require(`lucide-react`)),i=e.__toESM(require(`@customafk/react-toolkit/utils`)),a=e.__toESM(require(`react`)),o=e.__toESM(require(`react/jsx-runtime`)),s=({className:e,...t})=>{let s=(0,a.useId)(),[c,l]=(0,a.useState)(!1),u=(0,a.useCallback)(()=>l(e=>!e),[]);return(0,o.jsxs)(`div`,{className:`relative`,children:[(0,o.jsx)(n.Input,{...t,id:s,placeholder:`Password`,type:c?`text`:`password`,className:(0,i.cn)(`pe-9`,e)}),(0,o.jsx)(`button`,{className:`text-muted-foreground/80 hover:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 absolute inset-y-0 end-0 flex h-full w-9 items-center justify-center rounded-e-md transition-[color,box-shadow] outline-none focus:z-10 focus-visible:ring-[3px] disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50`,type:`button`,onClick:u,"aria-label":c?`Hide password`:`Show password`,"aria-pressed":c,"aria-controls":`password`,children:c?(0,o.jsx)(r.EyeOffIcon,{size:16,"aria-hidden":`true`}):(0,o.jsx)(r.EyeIcon,{size:16,"aria-hidden":`true`})})]})},c=({name:e,label:n=`Text Field`,placeholder:r=`Enter text here`,isShowErrorMsg:i=!1,description:a,onValueChange:c})=>(0,o.jsx)(t.FormField,{name:e,render:({field:e})=>(0,o.jsxs)(t.FormItem,{className:`w-full`,children:[(0,o.jsx)(t.FormLabel,{children:n}),(0,o.jsx)(t.FormControl,{children:(0,o.jsx)(s,{placeholder:r,...e,onValueChange:c})}),!!a&&(0,o.jsx)(t.FormDescription,{children:a}),i&&(0,o.jsx)(t.FormMessage,{})]})});exports.PasswordField=c;
2
2
  //# sourceMappingURL=password-field.cjs.map
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime2 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime5 from "react/jsx-runtime";
2
2
  import { FieldPath, FieldValues } from "react-hook-form";
3
3
 
4
4
  //#region packages/components/forms/password-field.d.ts
@@ -17,7 +17,7 @@ declare const PasswordField: <TFieldValues extends FieldValues = FieldValues>({
17
17
  isShowErrorMsg,
18
18
  description,
19
19
  onValueChange
20
- }: Props<TFieldValues>) => react_jsx_runtime2.JSX.Element;
20
+ }: Props<TFieldValues>) => react_jsx_runtime5.JSX.Element;
21
21
  //#endregion
22
22
  export { PasswordField };
23
23
  //# sourceMappingURL=password-field.d.cts.map
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime6 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime7 from "react/jsx-runtime";
2
2
  import { FieldPath, FieldValues } from "react-hook-form";
3
3
 
4
4
  //#region packages/components/forms/password-field.d.ts
@@ -17,7 +17,7 @@ declare const PasswordField: <TFieldValues extends FieldValues = FieldValues>({
17
17
  isShowErrorMsg,
18
18
  description,
19
19
  onValueChange
20
- }: Props<TFieldValues>) => react_jsx_runtime6.JSX.Element;
20
+ }: Props<TFieldValues>) => react_jsx_runtime7.JSX.Element;
21
21
  //#endregion
22
22
  export { PasswordField };
23
23
  //# sourceMappingURL=password-field.d.ts.map
@@ -1,2 +1,2 @@
1
- "use client";import"../label-CdrxlBJ8.js";import{FormControl as e,FormDescription as t,FormField as n,FormItem as r,FormLabel as i,FormMessage as a}from"../form-BT1TbgK6.js";import{Input as o}from"../input-ZyZ1HKHN.js";import{EyeIcon as s,EyeOffIcon as c}from"lucide-react";import{cn as l}from"@customafk/react-toolkit/utils";import{useCallback as u,useId as d,useState as f}from"react";import{jsx as p,jsxs as m}from"react/jsx-runtime";const h=({className:e,...t})=>{let n=d(),[r,i]=f(!1),a=u(()=>i(e=>!e),[]);return m(`div`,{className:`relative`,children:[p(o,{...t,id:n,placeholder:`Password`,type:r?`text`:`password`,className:l(`pe-9`,e)}),p(`button`,{className:`text-muted-foreground/80 hover:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 absolute inset-y-0 end-0 flex h-full w-9 items-center justify-center rounded-e-md transition-[color,box-shadow] outline-none focus:z-10 focus-visible:ring-[3px] disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50`,type:`button`,onClick:a,"aria-label":r?`Hide password`:`Show password`,"aria-pressed":r,"aria-controls":`password`,children:p(r?c:s,{size:16,"aria-hidden":`true`})})]})},g=({name:o,label:s=`Text Field`,placeholder:c=`Enter text here`,isShowErrorMsg:l=!1,description:u,onValueChange:d})=>p(n,{name:o,render:({field:n})=>m(r,{className:`w-full`,children:[p(i,{children:s}),p(e,{children:p(h,{placeholder:c,...n,onValueChange:d})}),!!u&&p(t,{children:u}),l&&p(a,{})]})});export{g as PasswordField};
1
+ "use client";import"../label-CdrxlBJ8.js";import{FormControl as e,FormDescription as t,FormField as n,FormItem as r,FormLabel as i,FormMessage as a}from"../form-BT1TbgK6.js";import{Input as o}from"../input-BtT8HfYE.js";import{EyeIcon as s,EyeOffIcon as c}from"lucide-react";import{cn as l}from"@customafk/react-toolkit/utils";import{useCallback as u,useId as d,useState as f}from"react";import{jsx as p,jsxs as m}from"react/jsx-runtime";const h=({className:e,...t})=>{let n=d(),[r,i]=f(!1),a=u(()=>i(e=>!e),[]);return m(`div`,{className:`relative`,children:[p(o,{...t,id:n,placeholder:`Password`,type:r?`text`:`password`,className:l(`pe-9`,e)}),p(`button`,{className:`text-muted-foreground/80 hover:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 absolute inset-y-0 end-0 flex h-full w-9 items-center justify-center rounded-e-md transition-[color,box-shadow] outline-none focus:z-10 focus-visible:ring-[3px] disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50`,type:`button`,onClick:a,"aria-label":r?`Hide password`:`Show password`,"aria-pressed":r,"aria-controls":`password`,children:p(r?c:s,{size:16,"aria-hidden":`true`})})]})},g=({name:o,label:s=`Text Field`,placeholder:c=`Enter text here`,isShowErrorMsg:l=!1,description:u,onValueChange:d})=>p(n,{name:o,render:({field:n})=>m(r,{className:`w-full`,children:[p(i,{children:s}),p(e,{children:p(h,{placeholder:c,...n,onValueChange:d})}),!!u&&p(t,{children:u}),l&&p(a,{})]})});export{g as PasswordField};
2
2
  //# sourceMappingURL=password-field.js.map
@@ -1,2 +1,2 @@
1
- "use client";const e=require(`../chunk-CUT6urMc.cjs`);require(`../label-CHNSlaoz.cjs`);const t=require(`../form-DyH5iWq7.cjs`),n=require(`../select-CvPIAeWb.cjs`),r=e.__toESM(require(`@customafk/react-toolkit/utils`)),i=e.__toESM(require(`react/jsx-runtime`)),a=({name:e,label:a=`Select Field`,placeholder:o=`Select an option`,disabledValues:s=[],options:c=[],isShowLabel:l=!0,isShowErrorMsg:u=!1,description:d=``,className:f=``})=>(0,i.jsx)(t.FormField,{name:e,render:({field:e})=>(0,i.jsxs)(t.FormItem,{className:(0,r.cn)(`w-full`,f),children:[l&&(0,i.jsx)(t.FormLabel,{children:a}),(0,i.jsxs)(n.Select,{defaultValue:e.value,onValueChange:e.onChange,children:[(0,i.jsx)(t.FormControl,{children:(0,i.jsx)(n.SelectTrigger,{className:`w-full`,children:(0,i.jsx)(n.SelectValue,{placeholder:o})})}),(0,i.jsx)(n.SelectContent,{children:c.map(e=>(0,i.jsx)(n.SelectItem,{disabled:s.includes(e.value),value:e.value,children:e.label},e.value))})]}),!!d&&(0,i.jsx)(t.FormDescription,{children:d}),u&&(0,i.jsx)(t.FormMessage,{})]})});exports.SelectField=a;
1
+ "use client";const e=require(`../chunk-CUT6urMc.cjs`);require(`../label-CHNSlaoz.cjs`);const t=require(`../form-DyH5iWq7.cjs`),n=require(`../select-Ce-YROpe.cjs`),r=e.__toESM(require(`@customafk/react-toolkit/utils`)),i=e.__toESM(require(`react/jsx-runtime`)),a=({name:e,label:a=`Select Field`,placeholder:o=`Select an option`,disabledValues:s=[],options:c=[],isShowLabel:l=!0,isShowErrorMsg:u=!1,description:d=``,className:f=``})=>(0,i.jsx)(t.FormField,{name:e,render:({field:e})=>(0,i.jsxs)(t.FormItem,{className:(0,r.cn)(`w-full`,f),children:[l&&(0,i.jsx)(t.FormLabel,{children:a}),(0,i.jsxs)(n.Select,{defaultValue:e.value,onValueChange:e.onChange,children:[(0,i.jsx)(t.FormControl,{children:(0,i.jsx)(n.SelectTrigger,{className:`w-full`,children:(0,i.jsx)(n.SelectValue,{placeholder:o})})}),(0,i.jsx)(n.SelectContent,{children:c.map(e=>(0,i.jsx)(n.SelectItem,{disabled:s.includes(e.value),value:e.value,children:e.label},e.value))})]}),!!d&&(0,i.jsx)(t.FormDescription,{children:d}),u&&(0,i.jsx)(t.FormMessage,{})]})});exports.SelectField=a;
2
2
  //# sourceMappingURL=select-field.cjs.map
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime6 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime7 from "react/jsx-runtime";
2
2
  import { FieldPath, FieldValues } from "react-hook-form";
3
3
 
4
4
  //#region packages/components/forms/select-field.d.ts
@@ -27,7 +27,7 @@ declare const SelectField: <TFieldValues extends FieldValues = FieldValues>({
27
27
  isShowErrorMsg,
28
28
  description,
29
29
  className
30
- }: Props<TFieldValues>) => react_jsx_runtime6.JSX.Element;
30
+ }: Props<TFieldValues>) => react_jsx_runtime7.JSX.Element;
31
31
  //#endregion
32
32
  export { SelectField };
33
33
  //# sourceMappingURL=select-field.d.cts.map
@@ -1,2 +1,2 @@
1
- "use client";import"../label-CdrxlBJ8.js";import{FormControl as e,FormDescription as t,FormField as n,FormItem as r,FormLabel as i,FormMessage as a}from"../form-BT1TbgK6.js";import{Select as o,SelectContent as s,SelectItem as c,SelectTrigger as l,SelectValue as u}from"../select---jN6Yy0.js";import{cn as d}from"@customafk/react-toolkit/utils";import{jsx as f,jsxs as p}from"react/jsx-runtime";const m=({name:m,label:h=`Select Field`,placeholder:g=`Select an option`,disabledValues:_=[],options:v=[],isShowLabel:y=!0,isShowErrorMsg:b=!1,description:x=``,className:S=``})=>f(n,{name:m,render:({field:n})=>p(r,{className:d(`w-full`,S),children:[y&&f(i,{children:h}),p(o,{defaultValue:n.value,onValueChange:n.onChange,children:[f(e,{children:f(l,{className:`w-full`,children:f(u,{placeholder:g})})}),f(s,{children:v.map(e=>f(c,{disabled:_.includes(e.value),value:e.value,children:e.label},e.value))})]}),!!x&&f(t,{children:x}),b&&f(a,{})]})});export{m as SelectField};
1
+ "use client";import"../label-CdrxlBJ8.js";import{FormControl as e,FormDescription as t,FormField as n,FormItem as r,FormLabel as i,FormMessage as a}from"../form-BT1TbgK6.js";import{Select as o,SelectContent as s,SelectItem as c,SelectTrigger as l,SelectValue as u}from"../select-Di8fOKVF.js";import{cn as d}from"@customafk/react-toolkit/utils";import{jsx as f,jsxs as p}from"react/jsx-runtime";const m=({name:m,label:h=`Select Field`,placeholder:g=`Select an option`,disabledValues:_=[],options:v=[],isShowLabel:y=!0,isShowErrorMsg:b=!1,description:x=``,className:S=``})=>f(n,{name:m,render:({field:n})=>p(r,{className:d(`w-full`,S),children:[y&&f(i,{children:h}),p(o,{defaultValue:n.value,onValueChange:n.onChange,children:[f(e,{children:f(l,{className:`w-full`,children:f(u,{placeholder:g})})}),f(s,{children:v.map(e=>f(c,{disabled:_.includes(e.value),value:e.value,children:e.label},e.value))})]}),!!x&&f(t,{children:x}),b&&f(a,{})]})});export{m as SelectField};
2
2
  //# sourceMappingURL=select-field.js.map
@@ -1,2 +1,2 @@
1
- "use client";const e=require(`../chunk-CUT6urMc.cjs`);require(`../label-CHNSlaoz.cjs`);const t=require(`../form-DyH5iWq7.cjs`),n=require(`../switch-BLfDkOOl.cjs`),r=e.__toESM(require(`@customafk/react-toolkit/utils`)),i=e.__toESM(require(`react/jsx-runtime`)),a=({name:e,label:a=`Switch Field`,description:o,isShowErrorMsg:s=!1})=>(0,i.jsx)(t.FormField,{name:e,render:({field:e})=>(0,i.jsxs)(`div`,{className:`spage-y-1`,children:[(0,i.jsxs)(t.FormItem,{className:(0,r.cn)(`border-border-weak flex flex-row items-center justify-between rounded-lg border p-3 shadow-xs`),children:[(0,i.jsxs)(`div`,{className:`space-y-0.5`,children:[(0,i.jsx)(t.FormLabel,{className:`cursor-pointer text-sm`,children:a}),o&&(0,i.jsx)(t.FormDescription,{className:`text-xs`,children:o})]}),(0,i.jsx)(t.FormControl,{children:(0,i.jsx)(n.Switch,{checked:e.value,onCheckedChange:e.onChange})})]}),s&&(0,i.jsx)(t.FormMessage,{})]})});exports.SwitchField=a;
1
+ "use client";const e=require(`../chunk-CUT6urMc.cjs`);require(`../label-CHNSlaoz.cjs`);const t=require(`../form-DyH5iWq7.cjs`),n=require(`../switch-DOgkZVAD.cjs`),r=e.__toESM(require(`@customafk/react-toolkit/utils`)),i=e.__toESM(require(`react/jsx-runtime`)),a=({name:e,label:a=`Switch Field`,description:o,isShowErrorMsg:s=!1})=>(0,i.jsx)(t.FormField,{name:e,render:({field:e})=>(0,i.jsxs)(`div`,{className:`spage-y-1`,children:[(0,i.jsxs)(t.FormItem,{className:(0,r.cn)(`border-border-weak flex flex-row items-center justify-between rounded-lg border p-3 shadow-xs`),children:[(0,i.jsxs)(`div`,{className:`space-y-0.5`,children:[(0,i.jsx)(t.FormLabel,{className:`cursor-pointer text-sm`,children:a}),o&&(0,i.jsx)(t.FormDescription,{className:`text-xs`,children:o})]}),(0,i.jsx)(t.FormControl,{children:(0,i.jsx)(n.Switch,{checked:e.value,onCheckedChange:e.onChange})})]}),s&&(0,i.jsx)(t.FormMessage,{})]})});exports.SwitchField=a;
2
2
  //# sourceMappingURL=switch-field.cjs.map
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime3 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime4 from "react/jsx-runtime";
2
2
  import { FieldPath, FieldValues } from "react-hook-form";
3
3
 
4
4
  //#region packages/components/forms/switch-field.d.ts
@@ -13,7 +13,7 @@ declare const SwitchField: <TFieldValues extends FieldValues = FieldValues>({
13
13
  label,
14
14
  description,
15
15
  isShowErrorMsg
16
- }: Props<TFieldValues>) => react_jsx_runtime3.JSX.Element;
16
+ }: Props<TFieldValues>) => react_jsx_runtime4.JSX.Element;
17
17
  //#endregion
18
18
  export { SwitchField };
19
19
  //# sourceMappingURL=switch-field.d.cts.map
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime11 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime25 from "react/jsx-runtime";
2
2
  import { FieldPath, FieldValues } from "react-hook-form";
3
3
 
4
4
  //#region packages/components/forms/switch-field.d.ts
@@ -13,7 +13,7 @@ declare const SwitchField: <TFieldValues extends FieldValues = FieldValues>({
13
13
  label,
14
14
  description,
15
15
  isShowErrorMsg
16
- }: Props<TFieldValues>) => react_jsx_runtime11.JSX.Element;
16
+ }: Props<TFieldValues>) => react_jsx_runtime25.JSX.Element;
17
17
  //#endregion
18
18
  export { SwitchField };
19
19
  //# sourceMappingURL=switch-field.d.ts.map
@@ -1,2 +1,2 @@
1
- "use client";import"../label-CdrxlBJ8.js";import{FormControl as e,FormDescription as t,FormField as n,FormItem as r,FormLabel as i,FormMessage as a}from"../form-BT1TbgK6.js";import{Switch as o}from"../switch-C8OMYLfj.js";import{cn as s}from"@customafk/react-toolkit/utils";import{jsx as c,jsxs as l}from"react/jsx-runtime";const u=({name:u,label:d=`Switch Field`,description:f,isShowErrorMsg:p=!1})=>c(n,{name:u,render:({field:n})=>l(`div`,{className:`spage-y-1`,children:[l(r,{className:s(`border-border-weak flex flex-row items-center justify-between rounded-lg border p-3 shadow-xs`),children:[l(`div`,{className:`space-y-0.5`,children:[c(i,{className:`cursor-pointer text-sm`,children:d}),f&&c(t,{className:`text-xs`,children:f})]}),c(e,{children:c(o,{checked:n.value,onCheckedChange:n.onChange})})]}),p&&c(a,{})]})});export{u as SwitchField};
1
+ "use client";import"../label-CdrxlBJ8.js";import{FormControl as e,FormDescription as t,FormField as n,FormItem as r,FormLabel as i,FormMessage as a}from"../form-BT1TbgK6.js";import{Switch as o}from"../switch-C7foFKpS.js";import{cn as s}from"@customafk/react-toolkit/utils";import{jsx as c,jsxs as l}from"react/jsx-runtime";const u=({name:u,label:d=`Switch Field`,description:f,isShowErrorMsg:p=!1})=>c(n,{name:u,render:({field:n})=>l(`div`,{className:`spage-y-1`,children:[l(r,{className:s(`border-border-weak flex flex-row items-center justify-between rounded-lg border p-3 shadow-xs`),children:[l(`div`,{className:`space-y-0.5`,children:[c(i,{className:`cursor-pointer text-sm`,children:d}),f&&c(t,{className:`text-xs`,children:f})]}),c(e,{children:c(o,{checked:n.value,onCheckedChange:n.onChange})})]}),p&&c(a,{})]})});export{u as SwitchField};
2
2
  //# sourceMappingURL=switch-field.js.map
@@ -1,2 +1,2 @@
1
- "use client";const e=require(`../chunk-CUT6urMc.cjs`),t=require(`../flex-DS4mxjtf.cjs`);require(`../label-CHNSlaoz.cjs`);const n=require(`../form-DyH5iWq7.cjs`),r=require(`../input-GHXBt6hz.cjs`),i=e.__toESM(require(`lucide-react`)),a=e.__toESM(require(`@customafk/react-toolkit/utils`)),o=e.__toESM(require(`react`)),s=e.__toESM(require(`react/jsx-runtime`)),c=e.__toESM(require(`react-hook-form`)),l=({name:e,label:l=`Text Field`,placeholder:u=`Enter text here`,isShowLabel:d=!0,isShowClearButton:f=!1,isShowErrorMsg:p=!1,isShowCount:m=!1,description:h,className:g=``,onValueChange:_})=>{let{resetField:v}=n.useFormField(),y=(0,c.useWatch)({name:e}),b=(0,o.useCallback)(()=>{v(e)},[v,e]);return(0,s.jsx)(n.FormField,{name:e,render:({field:e})=>(0,s.jsxs)(n.FormItem,{className:(0,a.cn)(`w-full gap-0`,m||!!h&&`space-y-1`,g),children:[d&&(0,s.jsx)(n.FormLabel,{children:l}),(0,s.jsxs)(`div`,{className:`relative`,children:[(0,s.jsx)(n.FormControl,{children:(0,s.jsx)(r.Input,{...e,placeholder:u,className:(0,a.cn)(`w-full`,f&&`pr-9`),onValueChange:_})}),f&&y&&(0,s.jsx)(`button`,{type:`button`,className:`text-text-positive-weak hover:text-text-positive focus-visible:ring-border absolute inset-y-0 end-0 flex h-full w-8 cursor-pointer items-center justify-center rounded-e-md transition-[color,box-shadow] outline-none focus:z-10 focus-visible:ring-2`,"aria-label":`Clear input`,onClick:b,children:(0,s.jsx)(i.XIcon,{size:14,"aria-hidden":`true`})})]}),(0,s.jsxs)(t.Flex,{width:`full`,padding:`none`,justify:`end`,children:[p&&(0,s.jsx)(n.FormMessage,{className:`grow`}),m&&(0,s.jsxs)(`div`,{className:`text-text-positive-weak text-end text-xs`,children:[y?.length??0,` characters`]})]}),!!h&&(0,s.jsx)(n.FormDescription,{children:h})]})})};exports.TextField=l;
1
+ "use client";const e=require(`../chunk-CUT6urMc.cjs`),t=require(`../flex-DS4mxjtf.cjs`);require(`../label-CHNSlaoz.cjs`);const n=require(`../form-DyH5iWq7.cjs`),r=require(`../input-DfGojpRF.cjs`),i=e.__toESM(require(`lucide-react`)),a=e.__toESM(require(`@customafk/react-toolkit/utils`)),o=e.__toESM(require(`react`)),s=e.__toESM(require(`react/jsx-runtime`)),c=e.__toESM(require(`react-hook-form`)),l=({name:e,label:l=`Text Field`,placeholder:u=`Enter text here`,isShowLabel:d=!0,isShowClearButton:f=!1,isShowErrorMsg:p=!1,isShowCount:m=!1,description:h,className:g=``,onValueChange:_})=>{let{resetField:v}=n.useFormField(),y=(0,c.useWatch)({name:e}),b=(0,o.useCallback)(()=>{v(e)},[v,e]);return(0,s.jsx)(n.FormField,{name:e,render:({field:e})=>(0,s.jsxs)(n.FormItem,{className:(0,a.cn)(`w-full gap-0`,m||!!h&&`space-y-1`,g),children:[d&&(0,s.jsx)(n.FormLabel,{children:l}),(0,s.jsxs)(`div`,{className:`relative`,children:[(0,s.jsx)(n.FormControl,{children:(0,s.jsx)(r.Input,{...e,placeholder:u,className:(0,a.cn)(`w-full`,f&&`pr-9`),onValueChange:_})}),f&&y&&(0,s.jsx)(`button`,{type:`button`,className:`text-text-positive-weak hover:text-text-positive focus-visible:ring-border absolute inset-y-0 end-0 flex h-full w-8 cursor-pointer items-center justify-center rounded-e-md transition-[color,box-shadow] outline-none focus:z-10 focus-visible:ring-2`,"aria-label":`Clear input`,onClick:b,children:(0,s.jsx)(i.XIcon,{size:14,"aria-hidden":`true`})})]}),(0,s.jsxs)(t.Flex,{width:`full`,padding:`none`,justify:`end`,children:[p&&(0,s.jsx)(n.FormMessage,{className:`grow`}),m&&(0,s.jsxs)(`div`,{className:`text-text-positive-weak text-end text-xs`,children:[y?.length??0,` characters`]})]}),!!h&&(0,s.jsx)(n.FormDescription,{children:h})]})})};exports.TextField=l;
2
2
  //# sourceMappingURL=text-field.cjs.map
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime5 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime49 from "react/jsx-runtime";
2
2
  import { FieldPath, FieldValues } from "react-hook-form";
3
3
 
4
4
  //#region packages/components/forms/text-field.d.ts
@@ -25,7 +25,7 @@ declare const TextField: <TFieldValues extends FieldValues = FieldValues>({
25
25
  description,
26
26
  className,
27
27
  onValueChange
28
- }: Props<TFieldValues>) => react_jsx_runtime5.JSX.Element;
28
+ }: Props<TFieldValues>) => react_jsx_runtime49.JSX.Element;
29
29
  //#endregion
30
30
  export { TextField };
31
31
  //# sourceMappingURL=text-field.d.cts.map
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime10 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime9 from "react/jsx-runtime";
2
2
  import { FieldPath, FieldValues } from "react-hook-form";
3
3
 
4
4
  //#region packages/components/forms/text-field.d.ts
@@ -25,7 +25,7 @@ declare const TextField: <TFieldValues extends FieldValues = FieldValues>({
25
25
  description,
26
26
  className,
27
27
  onValueChange
28
- }: Props<TFieldValues>) => react_jsx_runtime10.JSX.Element;
28
+ }: Props<TFieldValues>) => react_jsx_runtime9.JSX.Element;
29
29
  //#endregion
30
30
  export { TextField };
31
31
  //# sourceMappingURL=text-field.d.ts.map
@@ -1,2 +1,2 @@
1
- "use client";import{Flex as e}from"../flex-D6XrXRQW.js";import"../label-CdrxlBJ8.js";import{FormControl as t,FormDescription as n,FormField as r,FormItem as i,FormLabel as a,FormMessage as o,useFormField as s}from"../form-BT1TbgK6.js";import{Input as c}from"../input-ZyZ1HKHN.js";import{XIcon as l}from"lucide-react";import{cn as u}from"@customafk/react-toolkit/utils";import{useCallback as d}from"react";import{jsx as f,jsxs as p}from"react/jsx-runtime";import{useWatch as m}from"react-hook-form";const h=({name:h,label:g=`Text Field`,placeholder:_=`Enter text here`,isShowLabel:v=!0,isShowClearButton:y=!1,isShowErrorMsg:b=!1,isShowCount:x=!1,description:S,className:C=``,onValueChange:w})=>{let{resetField:T}=s(),E=m({name:h}),D=d(()=>{T(h)},[T,h]);return f(r,{name:h,render:({field:r})=>p(i,{className:u(`w-full gap-0`,x||!!S&&`space-y-1`,C),children:[v&&f(a,{children:g}),p(`div`,{className:`relative`,children:[f(t,{children:f(c,{...r,placeholder:_,className:u(`w-full`,y&&`pr-9`),onValueChange:w})}),y&&E&&f(`button`,{type:`button`,className:`text-text-positive-weak hover:text-text-positive focus-visible:ring-border absolute inset-y-0 end-0 flex h-full w-8 cursor-pointer items-center justify-center rounded-e-md transition-[color,box-shadow] outline-none focus:z-10 focus-visible:ring-2`,"aria-label":`Clear input`,onClick:D,children:f(l,{size:14,"aria-hidden":`true`})})]}),p(e,{width:`full`,padding:`none`,justify:`end`,children:[b&&f(o,{className:`grow`}),x&&p(`div`,{className:`text-text-positive-weak text-end text-xs`,children:[E?.length??0,` characters`]})]}),!!S&&f(n,{children:S})]})})};export{h as TextField};
1
+ "use client";import{Flex as e}from"../flex-D6XrXRQW.js";import"../label-CdrxlBJ8.js";import{FormControl as t,FormDescription as n,FormField as r,FormItem as i,FormLabel as a,FormMessage as o,useFormField as s}from"../form-BT1TbgK6.js";import{Input as c}from"../input-BtT8HfYE.js";import{XIcon as l}from"lucide-react";import{cn as u}from"@customafk/react-toolkit/utils";import{useCallback as d}from"react";import{jsx as f,jsxs as p}from"react/jsx-runtime";import{useWatch as m}from"react-hook-form";const h=({name:h,label:g=`Text Field`,placeholder:_=`Enter text here`,isShowLabel:v=!0,isShowClearButton:y=!1,isShowErrorMsg:b=!1,isShowCount:x=!1,description:S,className:C=``,onValueChange:w})=>{let{resetField:T}=s(),E=m({name:h}),D=d(()=>{T(h)},[T,h]);return f(r,{name:h,render:({field:r})=>p(i,{className:u(`w-full gap-0`,x||!!S&&`space-y-1`,C),children:[v&&f(a,{children:g}),p(`div`,{className:`relative`,children:[f(t,{children:f(c,{...r,placeholder:_,className:u(`w-full`,y&&`pr-9`),onValueChange:w})}),y&&E&&f(`button`,{type:`button`,className:`text-text-positive-weak hover:text-text-positive focus-visible:ring-border absolute inset-y-0 end-0 flex h-full w-8 cursor-pointer items-center justify-center rounded-e-md transition-[color,box-shadow] outline-none focus:z-10 focus-visible:ring-2`,"aria-label":`Clear input`,onClick:D,children:f(l,{size:14,"aria-hidden":`true`})})]}),p(e,{width:`full`,padding:`none`,justify:`end`,children:[b&&f(o,{className:`grow`}),x&&p(`div`,{className:`text-text-positive-weak text-end text-xs`,children:[E?.length??0,` characters`]})]}),!!S&&f(n,{children:S})]})})};export{h as TextField};
2
2
  //# sourceMappingURL=text-field.js.map
@@ -1,2 +1,2 @@
1
- "use client";const e=require(`../chunk-CUT6urMc.cjs`);require(`../label-CHNSlaoz.cjs`);const t=require(`../form-DyH5iWq7.cjs`),n=require(`../textarea-jrCmozqt.cjs`),r=e.__toESM(require(`react/jsx-runtime`)),i=e.__toESM(require(`react-hook-form`)),a=({name:e,label:a=`Textarea Field`,placeholder:o=`Enter text here`,isShowErrorMsg:s=!1,isShowCount:c=!1,description:l,rows:u=3,onValueChange:d})=>{let f=(0,i.useWatch)({name:e});return(0,r.jsx)(t.FormField,{name:e,render:({field:e})=>(0,r.jsxs)(t.FormItem,{className:`w-full`,children:[(0,r.jsx)(t.FormLabel,{children:a}),(0,r.jsx)(t.FormControl,{children:(0,r.jsx)(n.Textarea,{...e,placeholder:o,className:`w-full`,rows:u,onValueChange:d})}),c&&(0,r.jsxs)(`div`,{className:`text-muted-foreground text-end text-xs`,children:[f?.length??0,` characters`]}),!!l&&(0,r.jsx)(t.FormDescription,{children:l}),s&&(0,r.jsx)(t.FormMessage,{})]})})};exports.TextareaField=a;
1
+ "use client";const e=require(`../chunk-CUT6urMc.cjs`);require(`../label-CHNSlaoz.cjs`);const t=require(`../form-DyH5iWq7.cjs`),n=require(`../textarea-Ewj89Eq3.cjs`),r=e.__toESM(require(`react/jsx-runtime`)),i=e.__toESM(require(`react-hook-form`)),a=({name:e,label:a=`Textarea Field`,placeholder:o=`Enter text here`,isShowErrorMsg:s=!1,isShowCount:c=!1,description:l,rows:u=3,onValueChange:d})=>{let f=(0,i.useWatch)({name:e});return(0,r.jsx)(t.FormField,{name:e,render:({field:e})=>(0,r.jsxs)(t.FormItem,{className:`w-full`,children:[(0,r.jsx)(t.FormLabel,{children:a}),(0,r.jsx)(t.FormControl,{children:(0,r.jsx)(n.Textarea,{...e,placeholder:o,className:`w-full`,rows:u,onValueChange:d})}),c&&(0,r.jsxs)(`div`,{className:`text-muted-foreground text-end text-xs`,children:[f?.length??0,` characters`]}),!!l&&(0,r.jsx)(t.FormDescription,{children:l}),s&&(0,r.jsx)(t.FormMessage,{})]})})};exports.TextareaField=a;
2
2
  //# sourceMappingURL=textarea-field.cjs.map
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime0 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime10 from "react/jsx-runtime";
2
2
  import { FieldPath, FieldValues } from "react-hook-form";
3
3
 
4
4
  //#region packages/components/forms/textarea-field.d.ts
@@ -21,7 +21,7 @@ declare const TextareaField: <TFieldValues extends FieldValues = FieldValues>({
21
21
  description,
22
22
  rows,
23
23
  onValueChange
24
- }: Props<TFieldValues>) => react_jsx_runtime0.JSX.Element;
24
+ }: Props<TFieldValues>) => react_jsx_runtime10.JSX.Element;
25
25
  //#endregion
26
26
  export { TextareaField };
27
27
  //# sourceMappingURL=textarea-field.d.cts.map
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime13 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime10 from "react/jsx-runtime";
2
2
  import { FieldPath, FieldValues } from "react-hook-form";
3
3
 
4
4
  //#region packages/components/forms/textarea-field.d.ts
@@ -21,7 +21,7 @@ declare const TextareaField: <TFieldValues extends FieldValues = FieldValues>({
21
21
  description,
22
22
  rows,
23
23
  onValueChange
24
- }: Props<TFieldValues>) => react_jsx_runtime13.JSX.Element;
24
+ }: Props<TFieldValues>) => react_jsx_runtime10.JSX.Element;
25
25
  //#endregion
26
26
  export { TextareaField };
27
27
  //# sourceMappingURL=textarea-field.d.ts.map
@@ -1,2 +1,2 @@
1
- "use client";import"../label-CdrxlBJ8.js";import{FormControl as e,FormDescription as t,FormField as n,FormItem as r,FormLabel as i,FormMessage as a}from"../form-BT1TbgK6.js";import{Textarea as o}from"../textarea-Br_DX1wm.js";import{jsx as s,jsxs as c}from"react/jsx-runtime";import{useWatch as l}from"react-hook-form";const u=({name:u,label:d=`Textarea Field`,placeholder:f=`Enter text here`,isShowErrorMsg:p=!1,isShowCount:m=!1,description:h,rows:g=3,onValueChange:_})=>{let v=l({name:u});return s(n,{name:u,render:({field:n})=>c(r,{className:`w-full`,children:[s(i,{children:d}),s(e,{children:s(o,{...n,placeholder:f,className:`w-full`,rows:g,onValueChange:_})}),m&&c(`div`,{className:`text-muted-foreground text-end text-xs`,children:[v?.length??0,` characters`]}),!!h&&s(t,{children:h}),p&&s(a,{})]})})};export{u as TextareaField};
1
+ "use client";import"../label-CdrxlBJ8.js";import{FormControl as e,FormDescription as t,FormField as n,FormItem as r,FormLabel as i,FormMessage as a}from"../form-BT1TbgK6.js";import{Textarea as o}from"../textarea-n8OO0QsI.js";import{jsx as s,jsxs as c}from"react/jsx-runtime";import{useWatch as l}from"react-hook-form";const u=({name:u,label:d=`Textarea Field`,placeholder:f=`Enter text here`,isShowErrorMsg:p=!1,isShowCount:m=!1,description:h,rows:g=3,onValueChange:_})=>{let v=l({name:u});return s(n,{name:u,render:({field:n})=>c(r,{className:`w-full`,children:[s(i,{children:d}),s(e,{children:s(o,{...n,placeholder:f,className:`w-full`,rows:g,onValueChange:_})}),m&&c(`div`,{className:`text-muted-foreground text-end text-xs`,children:[v?.length??0,` characters`]}),!!h&&s(t,{children:h}),p&&s(a,{})]})})};export{u as TextareaField};
2
2
  //# sourceMappingURL=textarea-field.js.map
@@ -1,2 +1,2 @@
1
1
  import{cn as e}from"@customafk/react-toolkit/utils";import{useCallback as t}from"react";import{jsx as n}from"react/jsx-runtime";function r({className:r,onChange:i,onValueChange:a,...o}){let s=t(e=>{i?.(e),a?.(e.target.value)},[i,a]);return n(`input`,{"data-slot":`input`,className:e(`flex h-9 w-full px-3 py-2`,`rounded-md border transition-all duration-200`,`text-text-positive-strong bg-transparent text-sm`,`border-border-weak shadow-input`,`caret-primary outline-none`,`placeholder:text-text-positive-muted`,`hover:border-border hover:shadow-input`,`focus:border-primary-strong focus:shadow-none`,`focus-visible:ring-primary-muted focus-visible:ring-4`,`aria-invalid:border-danger aria-invalid:ring-danger-muted`,`aria-invalid:hover:border-danger-strong`,`disabled:cursor-not-allowed disabled:opacity-50`,`disabled:pointer-events-none`,`disabled:border-border-weak/50 disabled:bg-secondary-muted/10`,r),...o,onChange:s})}export{r as Input};
2
- //# sourceMappingURL=input-ZyZ1HKHN.js.map
2
+ //# sourceMappingURL=input-BtT8HfYE.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"input-ZyZ1HKHN.js","names":[],"sources":["../packages/components/ui/input.tsx"],"sourcesContent":["'use client'\nimport { useCallback } from 'react'\nimport { cn } from '@customafk/react-toolkit/utils'\n\nfunction Input({\n className,\n onChange,\n onValueChange,\n ...props\n}: React.ComponentProps<'input'> & {\n onValueChange?: (value: string) => void\n}) {\n const handleChange = useCallback(\n (e: React.ChangeEvent<HTMLInputElement>) => {\n onChange?.(e)\n onValueChange?.(e.target.value)\n },\n [onChange, onValueChange],\n )\n return (\n <input\n data-slot=\"input\"\n className={cn(\n // Base styles\n 'flex h-9 w-full px-3 py-2',\n 'rounded-md border transition-all duration-200',\n 'text-text-positive-strong bg-transparent text-sm',\n\n // Border and shadow styles\n 'border-border-weak shadow-input',\n 'caret-primary outline-none',\n\n // Placeholder styling\n 'placeholder:text-text-positive-muted',\n\n // State styles\n 'hover:border-border hover:shadow-input',\n 'focus:border-primary-strong focus:shadow-none',\n 'focus-visible:ring-primary-muted focus-visible:ring-4',\n\n // Invalid state\n 'aria-invalid:border-danger aria-invalid:ring-danger-muted',\n 'aria-invalid:hover:border-danger-strong',\n\n // Disabled state\n 'disabled:cursor-not-allowed disabled:opacity-50',\n 'disabled:pointer-events-none',\n 'disabled:border-border-weak/50 disabled:bg-secondary-muted/10',\n\n // Additional custom styling\n className,\n )}\n {...props}\n onChange={handleChange}\n />\n )\n}\n\nexport { Input }\n"],"mappings":"gIAIA,SAAS,EAAM,CACb,YACA,WACA,gBACA,GAAG,GAGF,CACD,IAAM,EAAe,EAClB,GAA2C,CAC1C,IAAW,GACX,IAAgB,EAAE,OAAO,QAE3B,CAAC,EAAU,IAEb,OACE,EAAC,QAAA,CACC,YAAU,QACV,UAAW,EAET,4BACA,gDACA,mDAGA,kCACA,6BAGA,uCAGA,yCACA,gDACA,wDAGA,4DACA,0CAGA,kDACA,+BACA,gEAGA,GAEF,GAAI,EACJ,SAAU"}
1
+ {"version":3,"file":"input-BtT8HfYE.js","names":[],"sources":["../packages/components/ui/input.tsx"],"sourcesContent":["'use client'\nimport { useCallback } from 'react'\nimport { cn } from '@customafk/react-toolkit/utils'\n\nfunction Input({\n className,\n onChange,\n onValueChange,\n ...props\n}: React.ComponentProps<'input'> & {\n onValueChange?: (value: string) => void\n}) {\n const handleChange = useCallback(\n (e: React.ChangeEvent<HTMLInputElement>) => {\n onChange?.(e)\n onValueChange?.(e.target.value)\n },\n [onChange, onValueChange],\n )\n return (\n <input\n data-slot=\"input\"\n className={cn(\n // Base styles\n 'flex h-9 w-full px-3 py-2',\n 'rounded-md border transition-all duration-200',\n 'text-text-positive-strong bg-transparent text-sm',\n\n // Border and shadow styles\n 'border-border-weak shadow-input',\n 'caret-primary outline-none',\n\n // Placeholder styling\n 'placeholder:text-text-positive-muted',\n\n // State styles\n 'hover:border-border hover:shadow-input',\n 'focus:border-primary-strong focus:shadow-none',\n 'focus-visible:ring-primary-muted focus-visible:ring-4',\n\n // Invalid state\n 'aria-invalid:border-danger aria-invalid:ring-danger-muted',\n 'aria-invalid:hover:border-danger-strong',\n\n // Disabled state\n 'disabled:cursor-not-allowed disabled:opacity-50',\n 'disabled:pointer-events-none',\n 'disabled:border-border-weak/50 disabled:bg-secondary-muted/10',\n\n // Additional custom styling\n className,\n )}\n {...props}\n onChange={handleChange}\n />\n )\n}\n\nexport { Input }\n"],"mappings":"gIAIA,SAAS,EAAM,CACb,YACA,WACA,gBACA,GAAG,GAGF,CACD,IAAM,EAAe,EAClB,GAA2C,CAC1C,IAAW,GACX,IAAgB,EAAE,OAAO,QAE3B,CAAC,EAAU,IAEb,OACE,EAAC,QAAA,CACC,YAAU,QACV,UAAW,EAET,4BACA,gDACA,mDAGA,kCACA,6BAGA,uCAGA,yCACA,gDACA,wDAGA,4DACA,0CAGA,kDACA,+BACA,gEAGA,GAEF,GAAI,EACJ,SAAU"}
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime125 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime124 from "react/jsx-runtime";
2
2
 
3
3
  //#region packages/components/ui/input.d.ts
4
4
  declare function Input({
@@ -8,7 +8,7 @@ declare function Input({
8
8
  ...props
9
9
  }: React.ComponentProps<'input'> & {
10
10
  onValueChange?: (value: string) => void;
11
- }): react_jsx_runtime125.JSX.Element;
11
+ }): react_jsx_runtime124.JSX.Element;
12
12
  //#endregion
13
13
  export { Input };
14
- //# sourceMappingURL=input-CG09_mqs.d.ts.map
14
+ //# sourceMappingURL=input-CwuYXUPY.d.ts.map
@@ -1,2 +1,2 @@
1
1
  const e=require(`./chunk-CUT6urMc.cjs`),t=e.__toESM(require(`@customafk/react-toolkit/utils`)),n=e.__toESM(require(`react`)),r=e.__toESM(require(`react/jsx-runtime`));function i({className:e,onChange:i,onValueChange:a,...o}){let s=(0,n.useCallback)(e=>{i?.(e),a?.(e.target.value)},[i,a]);return(0,r.jsx)(`input`,{"data-slot":`input`,className:(0,t.cn)(`flex h-9 w-full px-3 py-2`,`rounded-md border transition-all duration-200`,`text-text-positive-strong bg-transparent text-sm`,`border-border-weak shadow-input`,`caret-primary outline-none`,`placeholder:text-text-positive-muted`,`hover:border-border hover:shadow-input`,`focus:border-primary-strong focus:shadow-none`,`focus-visible:ring-primary-muted focus-visible:ring-4`,`aria-invalid:border-danger aria-invalid:ring-danger-muted`,`aria-invalid:hover:border-danger-strong`,`disabled:cursor-not-allowed disabled:opacity-50`,`disabled:pointer-events-none`,`disabled:border-border-weak/50 disabled:bg-secondary-muted/10`,e),...o,onChange:s})}Object.defineProperty(exports,`Input`,{enumerable:!0,get:function(){return i}});
2
- //# sourceMappingURL=input-GHXBt6hz.cjs.map
2
+ //# sourceMappingURL=input-DfGojpRF.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"input-GHXBt6hz.cjs","names":[],"sources":["../packages/components/ui/input.tsx"],"sourcesContent":["'use client'\nimport { useCallback } from 'react'\nimport { cn } from '@customafk/react-toolkit/utils'\n\nfunction Input({\n className,\n onChange,\n onValueChange,\n ...props\n}: React.ComponentProps<'input'> & {\n onValueChange?: (value: string) => void\n}) {\n const handleChange = useCallback(\n (e: React.ChangeEvent<HTMLInputElement>) => {\n onChange?.(e)\n onValueChange?.(e.target.value)\n },\n [onChange, onValueChange],\n )\n return (\n <input\n data-slot=\"input\"\n className={cn(\n // Base styles\n 'flex h-9 w-full px-3 py-2',\n 'rounded-md border transition-all duration-200',\n 'text-text-positive-strong bg-transparent text-sm',\n\n // Border and shadow styles\n 'border-border-weak shadow-input',\n 'caret-primary outline-none',\n\n // Placeholder styling\n 'placeholder:text-text-positive-muted',\n\n // State styles\n 'hover:border-border hover:shadow-input',\n 'focus:border-primary-strong focus:shadow-none',\n 'focus-visible:ring-primary-muted focus-visible:ring-4',\n\n // Invalid state\n 'aria-invalid:border-danger aria-invalid:ring-danger-muted',\n 'aria-invalid:hover:border-danger-strong',\n\n // Disabled state\n 'disabled:cursor-not-allowed disabled:opacity-50',\n 'disabled:pointer-events-none',\n 'disabled:border-border-weak/50 disabled:bg-secondary-muted/10',\n\n // Additional custom styling\n className,\n )}\n {...props}\n onChange={handleChange}\n />\n )\n}\n\nexport { Input }\n"],"mappings":"uKAIA,SAAS,EAAM,CACb,YACA,WACA,gBACA,GAAG,GAGF,CACD,IAAM,GAAA,EAAA,EAAA,aACH,GAA2C,CAC1C,IAAW,GACX,IAAgB,EAAE,OAAO,QAE3B,CAAC,EAAU,IAEb,OACE,EAAA,EAAA,KAAC,QAAA,CACC,YAAU,QACV,WAAA,EAAA,EAAA,IAEE,4BACA,gDACA,mDAGA,kCACA,6BAGA,uCAGA,yCACA,gDACA,wDAGA,4DACA,0CAGA,kDACA,+BACA,gEAGA,GAEF,GAAI,EACJ,SAAU"}
1
+ {"version":3,"file":"input-DfGojpRF.cjs","names":[],"sources":["../packages/components/ui/input.tsx"],"sourcesContent":["'use client'\nimport { useCallback } from 'react'\nimport { cn } from '@customafk/react-toolkit/utils'\n\nfunction Input({\n className,\n onChange,\n onValueChange,\n ...props\n}: React.ComponentProps<'input'> & {\n onValueChange?: (value: string) => void\n}) {\n const handleChange = useCallback(\n (e: React.ChangeEvent<HTMLInputElement>) => {\n onChange?.(e)\n onValueChange?.(e.target.value)\n },\n [onChange, onValueChange],\n )\n return (\n <input\n data-slot=\"input\"\n className={cn(\n // Base styles\n 'flex h-9 w-full px-3 py-2',\n 'rounded-md border transition-all duration-200',\n 'text-text-positive-strong bg-transparent text-sm',\n\n // Border and shadow styles\n 'border-border-weak shadow-input',\n 'caret-primary outline-none',\n\n // Placeholder styling\n 'placeholder:text-text-positive-muted',\n\n // State styles\n 'hover:border-border hover:shadow-input',\n 'focus:border-primary-strong focus:shadow-none',\n 'focus-visible:ring-primary-muted focus-visible:ring-4',\n\n // Invalid state\n 'aria-invalid:border-danger aria-invalid:ring-danger-muted',\n 'aria-invalid:hover:border-danger-strong',\n\n // Disabled state\n 'disabled:cursor-not-allowed disabled:opacity-50',\n 'disabled:pointer-events-none',\n 'disabled:border-border-weak/50 disabled:bg-secondary-muted/10',\n\n // Additional custom styling\n className,\n )}\n {...props}\n onChange={handleChange}\n />\n )\n}\n\nexport { Input }\n"],"mappings":"uKAIA,SAAS,EAAM,CACb,YACA,WACA,gBACA,GAAG,GAGF,CACD,IAAM,GAAA,EAAA,EAAA,aACH,GAA2C,CAC1C,IAAW,GACX,IAAgB,EAAE,OAAO,QAE3B,CAAC,EAAU,IAEb,OACE,EAAA,EAAA,KAAC,QAAA,CACC,YAAU,QACV,WAAA,EAAA,EAAA,IAEE,4BACA,gDACA,mDAGA,kCACA,6BAGA,uCAGA,yCACA,gDACA,wDAGA,4DACA,0CAGA,kDACA,+BACA,gEAGA,GAEF,GAAI,EACJ,SAAU"}
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime131 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime121 from "react/jsx-runtime";
2
2
 
3
3
  //#region packages/components/ui/input.d.ts
4
4
  declare function Input({
@@ -8,7 +8,7 @@ declare function Input({
8
8
  ...props
9
9
  }: React.ComponentProps<'input'> & {
10
10
  onValueChange?: (value: string) => void;
11
- }): react_jsx_runtime131.JSX.Element;
11
+ }): react_jsx_runtime121.JSX.Element;
12
12
  //#endregion
13
13
  export { Input };
14
- //# sourceMappingURL=input-C6NFFJxS.d.cts.map
14
+ //# sourceMappingURL=input-Kq2bOgsM.d.cts.map
@@ -1,8 +1,8 @@
1
- import { Button } from "../../button-MK4kEvtG.cjs";
2
- import { Separator } from "../../separator-DIIArEUd.cjs";
1
+ import { Button } from "../../button-CGIJb6H5.cjs";
2
+ import { Separator } from "../../separator-mZ8r56s2.cjs";
3
3
  import { TooltipContent } from "../../tooltip-DijjzZk1.cjs";
4
4
  import * as react_jsx_runtime259 from "react/jsx-runtime";
5
- import * as class_variance_authority_types7 from "class-variance-authority/types";
5
+ import * as class_variance_authority_types6 from "class-variance-authority/types";
6
6
  import { VariantProps } from "class-variance-authority";
7
7
 
8
8
  //#region packages/components/layouts/app-layout/sidebar.d.ts
@@ -104,7 +104,7 @@ declare function AppLayoutSidebarMenuItem({
104
104
  declare const sidebarMenuButtonVariants: (props?: ({
105
105
  variant?: "default" | "outline" | null | undefined;
106
106
  size?: "sm" | "lg" | "default" | null | undefined;
107
- } & class_variance_authority_types7.ClassProp) | undefined) => string;
107
+ } & class_variance_authority_types6.ClassProp) | undefined) => string;
108
108
  declare function AppLayoutSidebarMenuButton({
109
109
  asChild,
110
110
  isActive,
@@ -1,6 +1,6 @@
1
- import { Button } from "../../button-Bu22bfSc.js";
2
- import { Separator } from "../../separator-DUymk2P4.js";
3
- import { TooltipContent } from "../../tooltip-Cfp93PmG.js";
1
+ import { Button } from "../../button-BdYhnlA1.js";
2
+ import { Separator } from "../../separator-C4wU5Rr6.js";
3
+ import { TooltipContent } from "../../tooltip-Dt83PTkc.js";
4
4
  import * as react_jsx_runtime259 from "react/jsx-runtime";
5
5
  import { VariantProps } from "class-variance-authority";
6
6
  import * as class_variance_authority_types7 from "class-variance-authority/types";
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime8 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime30 from "react/jsx-runtime";
2
2
  import * as class_variance_authority_types0 from "class-variance-authority/types";
3
3
  import { VariantProps } from "class-variance-authority";
4
4
 
@@ -27,7 +27,7 @@ declare const Flex: ({
27
27
  align,
28
28
  className,
29
29
  children
30
- }: React.PropsWithChildren<Props>) => react_jsx_runtime8.JSX.Element;
30
+ }: React.PropsWithChildren<Props>) => react_jsx_runtime30.JSX.Element;
31
31
  //#endregion
32
32
  export { Flex };
33
33
  //# sourceMappingURL=flex.d.cts.map
@@ -1,2 +1,2 @@
1
- const e=require(`../../chunk-CUT6urMc.cjs`);require(`../../dist-D0uO1qIz.cjs`),require(`../../button-variants-CCiseNSC.cjs`);const t=require(`../../button-CuV2l4ge.cjs`),n=require(`../../card-Pnxpehsp.cjs`);require(`../../skeleton-BA-3d3bn.cjs`);const r=require(`../../image-j62jo7bK.cjs`),i=require(`../../tooltip-DXvcPsvM.cjs`),a=require(`../../avatar-B4pklWJt.cjs`),o=require(`../../dialog-DGbWt3A4.cjs`),s=require(`../../drawer-CaX-sUvZ.cjs`),c=require(`../../input-GHXBt6hz.cjs`),l=require(`../../dropdown-menu-Djtt8w9D.cjs`),u=require(`../../scroll-area-bTF4NokG.cjs`),d=require(`../../separator-WF5zTNGS.cjs`),f=require(`../../sheet-cjXJAfUE.cjs`),p=require(`../../tabs-MolLf09Q.cjs`),m=e.__toESM(require(`lucide-react`)),h=e.__toESM(require(`@customafk/react-toolkit/utils`)),g=e.__toESM(require(`react`)),_=e.__toESM(require(`react/jsx-runtime`)),v=e.__toESM(require(`class-variance-authority`)),y=e.__toESM(require(`radix-ui`)),b=e.__toESM(require(`@customafk/react-toolkit/hooks/useMediaQuery`)),x=e.__toESM(require(`@react-oauth/google`)),S=e.__toESM(require(`@customafk/react-toolkit/hooks/useMobile`)),C=e.__toESM(require(`@customafk/react-toolkit/hooks/useDebounceCallback`)),w=(0,g.createContext)(null),T=()=>{let e=(0,g.useContext)(w);if(!e)throw Error(`useServiceLayoutContext must be used within a ServiceLayoutProvider`);return e},E=({type:e,productUuid:i,variantUuid:a,productName:o,variantName:s,imageUrl:l,optionValue:u,optionTitle:d,quantity:f,price:p})=>{let{onDeletingCart:h,onUpdatingCart:v}=T(),[y,b]=(0,g.useState)(f),[x,S]=(0,g.useState)(!1),w=(0,g.useCallback)(()=>{v?.(a,y,e)},[v,a,y,e]),E=(0,C.useDebounceCallback)(w,500),D=(0,g.useCallback)(e=>{e<1&&(e=1),e>99&&(e=99),b(e)},[]),O=(0,g.useCallback)(async()=>{S(!0),await h?.(i),S(!1)},[i,h]);return(0,g.useEffect)(()=>(y!==f&&E(),()=>{E.cancel()}),[y,f,E]),(0,_.jsxs)(n.Card,{className:`border-border-weak relative mb-3 overflow-x-auto border p-4 shadow-none`,children:[x&&(0,_.jsx)(`div`,{className:`bg-muted-muted/80 absolute inset-0 z-10 flex items-center justify-center`,children:(0,_.jsx)(`div`,{className:`loader-dots`})}),(0,_.jsxs)(n.CardContent,{className:`p-0`,children:[(0,_.jsxs)(t.Button,{variant:`ghost`,size:`icon`,color:`muted`,disabled:x,className:`text-text-positive-weak absolute top-2 right-2 z-10`,onClick:O,children:[(0,_.jsx)(m.Trash2,{className:`h-4 w-4`}),(0,_.jsx)(`span`,{className:`sr-only`,children:`Remove item`})]}),(0,_.jsxs)(`div`,{className:`flex gap-3`,children:[(0,_.jsx)(`div`,{className:`relative size-20 flex-shrink-0`,children:l?(0,_.jsx)(r.Image,{src:l,alt:o,className:`rounded-md border-none shadow-xs`,width:80,height:80}):(0,_.jsx)(`div`,{className:`bg-muted text-muted-foreground flex size-full items-center justify-center text-xs`,children:`No image`})}),(0,_.jsxs)(`div`,{className:`flex flex-1 flex-col`,children:[(0,_.jsx)(`div`,{className:`flex justify-between`,children:(0,_.jsx)(`h3`,{className:`text-text-positive line-clamp-1 text-sm font-medium`,children:o})}),(0,_.jsxs)(`p`,{className:`text-text-positive-weak mb-1 text-xs`,children:[s,d&&` - ${d}: ${u}`]}),(0,_.jsxs)(`div`,{className:`mt-auto flex items-center justify-between`,children:[(0,_.jsxs)(`div`,{className:`flex items-center space-x-1`,children:[(0,_.jsx)(`button`,{disabled:y<=1,className:`border-border active:bg-muted-muted flex size-6 cursor-pointer items-center justify-center rounded-full border transition-all disabled:opacity-60`,onClick:()=>D(y-1),children:(0,_.jsx)(m.Minus,{size:12})}),(0,_.jsx)(c.Input,{value:y,onChange:e=>D(parseInt(e.target.value||`1`)),className:`border-border h-6.5 w-14 rounded-md border p-1 text-center text-sm`,min:1}),(0,_.jsx)(`button`,{disabled:y>=99,className:`border-border active:bg-muted-muted flex size-6 cursor-pointer items-center justify-center rounded-full border transition-all disabled:opacity-60`,onClick:()=>D(y+1),children:(0,_.jsx)(m.Plus,{size:12})})]}),(0,_.jsxs)(`div`,{className:`text-sm font-semibold`,children:[(p*y).toLocaleString(),` ₫`]})]})]})]})]})]})},D=({items:e=[],cartType:n,className:r})=>{let i=e.reduce((e,t)=>e+t.price*t.quantity,0);return e.length===0?(0,_.jsxs)(`div`,{className:(0,h.cn)(`bg-muted-muted flex size-full max-h-80 flex-col items-center justify-center rounded-lg p-8`,r),children:[(0,_.jsx)(`div`,{className:`text-text-positive-weak bg-card shadow-card mb-4 flex size-20 items-center justify-center rounded-full text-5xl`,children:(0,_.jsx)(m.ShoppingBasketIcon,{size:42,strokeWidth:1})}),(0,_.jsxs)(`div`,{className:`flex flex-col space-y-1`,children:[(0,_.jsx)(`p`,{className:`text-text-positive text-center text-base font-semibold`,children:`Giỏ hàng trống`}),(0,_.jsx)(`p`,{className:`text-text-positive-weak mb-4 text-center text-sm`,children:n===`in_stock`?`Thêm sản phẩm có sẵn vào giỏ hàng của bạn!`:`Thêm sản phẩm đặt trước vào giỏ hàng của bạn!`})]})]}):(0,_.jsxs)(`div`,{className:(0,h.cn)(`flex h-full flex-col space-y-4 overflow-y-auto`,r),children:[(0,_.jsx)(u.ScrollArea,{className:`h-full flex-1`,children:e.map(e=>(0,_.jsx)(E,{...e,type:n},`${e.productUuid}-${e.variantUuid}`))}),(0,_.jsxs)(`div`,{className:`flex-0 space-y-3`,children:[(0,_.jsxs)(`div`,{className:`flex justify-between`,children:[(0,_.jsx)(`span`,{className:`text-text-positive-weak text-sm`,children:`Tạm tính:`}),(0,_.jsxs)(`span`,{className:`text-sm`,children:[i.toLocaleString(),` ₫`]})]}),(0,_.jsx)(d.Separator,{}),(0,_.jsxs)(`div`,{className:`flex justify-between`,children:[(0,_.jsx)(`span`,{className:`text-text-positive font-medium`,children:`Tổng cộng:`}),(0,_.jsxs)(`span`,{className:`text-lg font-semibold`,children:[i.toLocaleString(),` ₫`]})]}),(0,_.jsx)(t.Button,{className:`mt-2 w-full`,children:`Thanh toán ngay`}),n===`pre_order`&&(0,_.jsx)(`p`,{className:`text-text-positive-weak text-center text-xs italic`,children:`* Sản phẩm đặt trước sẽ được giao sau khi có hàng`})]})]})},O=(0,g.createContext)(null),k=()=>{let e=(0,g.useContext)(O);if(!e)throw Error(`useSidebar must be used within a SidebarProvider.`);return e},ee=`sidebar_state`,te=3600*24*7,ne=`16rem`,re=`16rem`,ie=`3rem`,ae=`b`;function A({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:a,children:o,...s}){let c=(0,S.useIsMobile)(),[l,u]=(0,g.useState)(!1),[d,f]=(0,g.useState)(e),p=t??d,m=(0,g.useCallback)(e=>{let t=typeof e==`function`?e(p):e;n?n(t):f(t),document.cookie=`sidebar_state=${t}; path=/; max-age=604800`},[n,p]),v=(0,g.useCallback)(()=>c?u(e=>!e):m(e=>!e),[c,m,u]);(0,g.useEffect)(()=>{let e=e=>{e.key===`b`&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),v())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[v]);let y=p?`expanded`:`collapsed`,b=(0,g.useMemo)(()=>({state:y,isMobile:c,toggleSidebar:v,open:p,setOpen:m,openMobile:l,setOpenMobile:u}),[y,p,m,c,l,u,v]);return(0,_.jsx)(O.Provider,{value:b,children:(0,_.jsx)(i.TooltipProvider,{delayDuration:0,children:(0,_.jsx)(`div`,{"data-slot":`sidebar-wrapper`,style:{"--sidebar-width":`16rem`,"--sidebar-width-icon":`3rem`,...a},className:(0,h.cn)(`group/sidebar-wrapper`,`has-data-[variant=inset]:bg-sidebar`,`flex h-dvh w-full`,r),...s,children:o})})})}function j({side:e=`left`,variant:t=`sidebar`,collapsible:n=`offcanvas`,className:r,children:i,...a}){let{isMobile:o,state:c,openMobile:l,setOpenMobile:u}=k();return n===`none`?(0,_.jsx)(`aside`,{"data-slot":`sidebar`,className:(0,h.cn)(`bg-sidebar`,`text-sidebar-foreground`,`flex h-full w-(--sidebar-width) flex-col`,r),...a,children:i}):o?(0,_.jsx)(s.Drawer,{direction:`left`,open:l,onOpenChange:u,children:(0,_.jsxs)(s.DrawerContent,{"data-sidebar":`sidebar`,"data-slot":`sidebar`,"data-mobile":`true`,className:`bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 data-[vaul-drawer-direction=left]:w-3xs data-[vaul-drawer-direction=left]:sm:max-w-3xs [&>button]:hidden`,style:{"--sidebar-width":`16rem`},children:[(0,_.jsxs)(s.DrawerHeader,{className:`sr-only`,children:[(0,_.jsx)(s.DrawerTitle,{children:`Sidebar`}),(0,_.jsx)(s.DrawerDescription,{children:`Displays the mobile sidebar.`})]}),(0,_.jsxs)(`div`,{className:`flex size-full flex-col`,children:[(0,_.jsxs)(`div`,{className:`border-border-weak flex flex-0 items-center gap-x-2 border-b p-2 pr-4`,children:[(0,_.jsx)(M,{}),(0,_.jsx)(`div`,{className:`bg-sidebar-primary text-sidebar-primary-foreground ml-2 flex aspect-square size-8 items-center justify-center rounded-lg`,children:(0,_.jsx)(m.ShoppingCartIcon,{size:20})}),(0,_.jsxs)(`div`,{className:`grid flex-1 text-left text-sm leading-tight`,children:[(0,_.jsx)(`span`,{className:`truncate font-medium`,children:`Lunas Store`}),(0,_.jsx)(`span`,{className:`truncate text-xs`,children:`Established 2023`})]})]}),(0,_.jsx)(`div`,{className:`flex flex-1 flex-col p-2`,children:i})]})]})}):(0,_.jsxs)(`aside`,{className:`group peer text-sidebar-foreground bg-card hidden md:block`,"data-state":c,"data-collapsible":c===`collapsed`?n:``,"data-variant":t,"data-side":e,"data-slot":`sidebar`,children:[(0,_.jsx)(`div`,{"data-slot":`sidebar-gap`,className:(0,h.cn)(`relative`,`bg-transparent`,`transition-[width] duration-200 ease-linear`,`h-(--header-height) w-(--sidebar-width)`,`sm:h-[calc(var(--header-height) + 0.5rem)]`,`group-data-[collapsible=offcanvas]:w-0`,`group-data-[side=right]:rotate-180`,t===`floating`||t===`inset`?`group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon)`)}),(0,_.jsx)(`div`,{"data-slot":`sidebar-container`,className:(0,h.cn)(`hidden md:flex`,`shadow-nav fixed inset-y-0 top-14 z-10`,`h-[calc(100dvh-3.5rem)] w-(--sidebar-width)`,`transition-[left,right,width] duration-200 ease-linear`,e===`left`&&`left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]`,e===`right`&&`right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]`,t===`floating`||t===`inset`?`p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l`,r),...a,children:(0,_.jsx)(`div`,{"data-sidebar":`sidebar`,"data-slot":`sidebar-inner`,className:(0,h.cn)(`flex size-full flex-col`,`group-data-[variant=floating]:rounded-lg`,`group-data-[variant=floating]:border`,`group-data-[variant=floating]:border-sidebar-border`,`group-data-[variant=floating]:shadow-sm`),children:i})})]})}function M({className:e,onClick:n,...r}){let{toggleSidebar:i}=k();return(0,_.jsxs)(t.Button,{"data-sidebar":`trigger`,"data-slot":`sidebar-trigger`,variant:`ghost`,color:`muted`,size:`icon`,className:(0,h.cn)(`size-10 rounded-full`,e),onClick:e=>{n?.(e),i()},...r,children:[(0,_.jsx)(m.MenuIcon,{className:`!size-6`}),(0,_.jsx)(`span`,{className:`sr-only`,children:`Toggle Sidebar`})]})}function N({className:e,children:t,...n}){return(0,_.jsxs)(`main`,{"data-slot":`sidebar-inset`,className:(0,h.cn)(`relative flex w-full flex-1 flex-col`,e),...n,children:[(0,_.jsx)(`div`,{className:`h-(--header-height) w-full sm:h-[calc(var(--header-height)_+_0.5rem)]`}),(0,_.jsx)(`div`,{className:(0,h.cn)(`flex-1 inset-shadow-sm`),children:t})]})}function P({className:e,children:t,...n}){let{open:r}=k(),{onLogout:i}=T();return(0,_.jsxs)(`div`,{"data-slot":`sidebar-footer`,"data-sidebar":`footer`,className:(0,h.cn)(`flex flex-col gap-2`,e),...n,children:[t,(0,_.jsxs)(z,{children:[(0,_.jsx)(B,{children:(0,_.jsxs)(H,{className:`border-border border`,onClick:i,children:[(0,_.jsx)(m.LogOutIcon,{className:`text-text-positive-weak`}),`Đăng xuất`]})}),r&&(0,_.jsx)(B,{className:`border-t-border mt-2 border-t`,children:(0,_.jsx)(`p`,{className:`text-muted-foreground pt-2 text-center text-xs`,children:`Copyright © 2025, Lunas.`})})]})]})}function F({className:e,...t}){return(0,_.jsx)(`div`,{"data-slot":`sidebar-content`,"data-sidebar":`content`,className:(0,h.cn)(`flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden`,e),...t})}function I({className:e,...t}){return(0,_.jsx)(`div`,{"data-slot":`sidebar-group`,"data-sidebar":`group`,className:(0,h.cn)(`relative flex w-full min-w-0 flex-col`,e),...t})}function L({className:e,asChild:t=!1,...n}){let r=t?y.Slot.Slot:`div`;return(0,_.jsx)(r,{"data-slot":`sidebar-group-label`,"data-sidebar":`group-label`,className:(0,h.cn)(`flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2`,`text-sidebar-foreground/70`,`ring-sidebar-ring`,`[&>svg]:size-4`,`[&>svg]:shrink-0`,`group-data-[collapsible=icon]:-mt-8`,`group-data-[collapsible=icon]:opacity-0`,e),...n})}function R({className:e,...t}){return(0,_.jsx)(`div`,{"data-slot":`sidebar-group-content`,"data-sidebar":`group-content`,className:(0,h.cn)(`w-full text-sm`,e),...t})}function z({className:e,...t}){return(0,_.jsx)(`ul`,{"data-slot":`sidebar-menu`,"data-sidebar":`menu`,className:(0,h.cn)(`flex w-full min-w-0 flex-col gap-1`,e),...t})}function B({className:e,...t}){return(0,_.jsx)(`li`,{"data-slot":`sidebar-menu-item`,"data-sidebar":`menu-item`,className:(0,h.cn)(`group/menu-item relative`,e),...t})}const V=(0,v.cva)(`peer/menu-button.cursor-pointer.flex w-full items-center gap-2.overflow-hidden rounded-md p-2 outline-hidden.text-left truncate.transition-[color,width,height,padding].hover:bg-sidebar-accent.hover:text-sidebar-accent-foreground.active:bg-sidebar-accent.active:text-sidebar-accent-foreground.disabled:pointer-events-none.disabled:opacity-50.group-has-data-[sidebar=menu-action]/menu-item:pr-8.aria-disabled:pointer-events-none.aria-disabled:opacity-50.data-[active=true]:bg-sidebar-primary-muted.data-[active=true]:font-medium.data-[active=true]:text-sidebar-primary.data-[state=open]:hover:bg-sidebar-accent.data-[state=open]:hover:text-sidebar-accent-foreground.group-data-[collapsible=icon]:size-12!.group-data-[collapsible=icon]:p-3!.group-data-[collapsible=icon]:gap-3!.[&>svg]:size-6.[&>svg]:shrink-0.[&>span:last-child]:truncate`.split(`.`),{variants:{variant:{default:`hover:bg-sidebar-accent/60 hover:text-sidebar-accent-foreground/80`,outline:`bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]`},size:{default:`h-10 text-sm`,sm:`h-7 text-xs`,lg:`h-12 text-sm group-data-[collapsible=icon]:p-0!`}},defaultVariants:{variant:`default`,size:`default`}});function H({asChild:e=!1,isActive:t=!1,variant:n=`default`,size:r=`default`,tooltip:a,className:o,...s}){let c=e?y.Slot.Slot:`button`,{isMobile:l,state:u}=k(),d=(0,_.jsx)(c,{"data-slot":`sidebar-menu-button`,"data-sidebar":`menu-button`,"data-size":r,"data-active":t,className:(0,h.cn)(V({variant:n,size:r}),o),...s});return a?(typeof a==`string`&&(a={children:a}),(0,_.jsxs)(i.Tooltip,{children:[(0,_.jsx)(i.TooltipTrigger,{asChild:!0,children:d}),(0,_.jsx)(i.TooltipContent,{side:`right`,align:`center`,hidden:u!==`collapsed`||l,...a})]})):d}const U=({isLoggedIn:e=!1,username:t,email:n,inStockCarts:r,orderedCarts:i,onGoogleLoginSuccess:a,onUpdatingCart:o,onDeletingCart:s,onLogout:c,children:l})=>(0,_.jsx)(w.Provider,{value:{isLoggedIn:e,username:t,email:n,inStockCarts:r,orderedCarts:i,onGoogleLoginSuccess:a,onUpdatingCart:o,onDeletingCart:s,onLogout:c},children:l}),W=({children:e})=>(0,_.jsx)(A,{children:e}),G=({userName:e=`Keith Kennedy`,userEmail:n=`k.kennedy@originui.com`,onLogout:r})=>(0,_.jsxs)(l.DropdownMenu,{children:[(0,_.jsx)(l.DropdownMenuTrigger,{asChild:!0,children:(0,_.jsx)(t.Button,{size:`icon`,variant:`ghost`,color:`secondary`,className:`size-10 rounded-full`,children:(0,_.jsxs)(a.Avatar,{className:`size-10`,children:[(0,_.jsx)(a.AvatarImage,{}),(0,_.jsx)(a.AvatarFallback,{className:`bg-muted-muted size-full`,children:(0,_.jsx)(m.UserIcon,{})})]})})}),(0,_.jsxs)(l.DropdownMenuContent,{align:`end`,className:`max-w-64`,children:[(0,_.jsxs)(l.DropdownMenuLabel,{className:`flex min-w-0 flex-col`,children:[(0,_.jsx)(`span`,{className:`text-text-positive truncate text-sm font-medium`,children:e}),(0,_.jsx)(`span`,{className:`text-text-positive-weak truncate text-xs font-normal`,children:n})]}),(0,_.jsx)(l.DropdownMenuSeparator,{}),(0,_.jsxs)(l.DropdownMenuItem,{onClick:r,children:[(0,_.jsx)(m.LogOutIcon,{size:16,"aria-hidden":`true`}),(0,_.jsx)(`span`,{className:`text-text-positive`,children:`Logout`})]})]})]}),K=()=>{let{inStockCarts:e=[],orderedCarts:n=[]}=T(),r=e.length,i=n.length,a=r+i;return(0,_.jsxs)(f.Sheet,{children:[(0,_.jsx)(f.SheetTrigger,{asChild:!0,children:(0,_.jsxs)(t.Button,{size:`icon`,variant:`ghost`,color:`secondary`,className:`relative size-10 rounded-full`,children:[(0,_.jsx)(m.ShoppingCartIcon,{}),a>0&&(0,_.jsx)(`span`,{className:`bg-primary text-primary-foreground absolute -top-1 -right-1 flex h-4 min-w-4 items-center justify-center rounded-full px-1 text-xs font-bold`,children:a})]})}),(0,_.jsxs)(f.SheetContent,{className:`w-[95vw] sm:max-w-md`,children:[(0,_.jsx)(f.SheetHeader,{className:`border-border-weak flex-0 border-b pb-3`,children:(0,_.jsxs)(f.SheetTitle,{className:`flex items-center gap-2`,children:[(0,_.jsx)(m.ShoppingBag,{className:`h-5 w-5`}),(0,_.jsx)(`span`,{children:`Giỏ hàng của bạn`}),a>0&&(0,_.jsxs)(`span`,{className:`text-text-positive-weak text-sm font-normal`,children:[`(`,a,` sản phẩm)`]})]})}),(0,_.jsxs)(p.Tabs,{defaultValue:i>0?`pre_order`:`in_stock`,className:`h-full flex-1 overflow-y-auto p-4 pt-0`,children:[(0,_.jsxs)(p.TabsList,{className:`w-full flex-0`,children:[(0,_.jsxs)(p.TabsTrigger,{value:`in_stock`,className:`relative`,children:[`Có sẵn`,r>0&&(0,_.jsxs)(`span`,{children:[`(`,r,`)`]})]}),(0,_.jsxs)(p.TabsTrigger,{value:`pre_order`,className:`relative`,children:[`Đặt trước`,i>0&&(0,_.jsxs)(`span`,{children:[`(`,i,`)`]})]})]}),(0,_.jsx)(p.TabsContent,{value:`pre_order`,className:`flex-1 overflow-y-auto`,children:(0,_.jsx)(D,{items:n,cartType:`pre_order`})}),(0,_.jsx)(p.TabsContent,{value:`in_stock`,className:`flex-1 overflow-y-auto`,children:(0,_.jsx)(D,{items:e,cartType:`in_stock`})})]})]})]})},q=()=>{let{isLoggedIn:e,username:n,email:r,onGoogleLoginSuccess:i,onLogout:a}=T(),c=(0,b.useMediaQuery)(`(min-width: 640px)`),[l,u]=(0,g.useState)(!1);return(0,_.jsxs)(`header`,{className:(0,h.cn)(`bg-card`,`h-(--header-height)`,`sm:h-[calc(var(--header-height)_+_0.5rem)] sm:px-4 sm:pr-6`,`absolute inset-x-0 top-0 z-20 gap-2 px-2 pr-4.5`,`shadow-nav flex items-center`,`transition-[width,height] ease-linear`),children:[e&&(0,_.jsx)(M,{}),(0,_.jsxs)(`div`,{className:`flex gap-x-2 sm:ml-2.5`,children:[(0,_.jsx)(`div`,{className:`bg-sidebar-primary text-sidebar-primary-foreground flex aspect-square size-8 items-center justify-center rounded-lg`,children:(0,_.jsx)(m.ShoppingCartIcon,{size:20})}),(0,_.jsxs)(`div`,{className:`grid flex-1 text-left text-sm leading-tight`,children:[(0,_.jsx)(`span`,{className:`truncate font-medium`,children:`Lunas Store`}),(0,_.jsx)(`span`,{className:`truncate text-xs`,children:`Established 2023`})]})]}),(0,_.jsxs)(`div`,{className:`flex flex-1 items-center justify-end gap-x-2`,children:[!e&&(0,_.jsxs)(t.Button,{className:`w-8 sm:w-fit`,onClick:()=>u(!0),children:[(0,_.jsx)(m.LogInIcon,{}),(0,_.jsx)(`span`,{className:`sr-only sm:not-sr-only`,children:`Đăng nhập`})]}),e&&(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(G,{userName:n,userEmail:r,onLogout:a}),(0,_.jsx)(d.Separator,{orientation:`vertical`,className:`min-h-6 w-px`}),(0,_.jsx)(K,{})]})]}),c&&(0,_.jsx)(o.Dialog,{open:l,onOpenChange:u,children:(0,_.jsxs)(o.DialogContent,{showCloseButton:!1,className:`flex flex-col gap-0 border-none p-0 sm:max-w-sm`,children:[(0,_.jsx)(o.DialogHeader,{className:`flex-0 gap-2 p-6`,children:(0,_.jsx)(o.DialogTitle,{className:`text-center`,children:`Chào mừng bạn đến với Lunas Store!`})}),(0,_.jsx)(`div`,{className:`flex flex-1 flex-col`,children:(0,_.jsx)(`main`,{className:`bg-card size-full flex-1 p-4 pt-0`,children:(0,_.jsxs)(`div`,{className:`flex flex-col items-center gap-y-1`,children:[(0,_.jsx)(`p`,{className:`text-text-positive-weak text-sm`,children:`Đăng nhập với Google`}),(0,_.jsx)(x.GoogleLogin,{size:`large`,theme:`outline`,width:240,onSuccess:async e=>{!e.clientId||!e.credential||!e.select_by||await i?.(e)}})]})})}),(0,_.jsx)(o.DialogFooter,{className:`p-2`})]})}),!c&&(0,_.jsx)(s.Drawer,{open:l,onOpenChange:u,children:(0,_.jsxs)(s.DrawerContent,{children:[(0,_.jsx)(s.DrawerHeader,{className:`text-left`,children:(0,_.jsx)(s.DrawerTitle,{children:`Chào mừng bạn đến với Lunas Store!`})}),(0,_.jsx)(`div`,{className:`flex flex-1 flex-col`,children:(0,_.jsx)(`main`,{className:`flex size-full flex-1 flex-col p-4 pt-0`,children:(0,_.jsxs)(`div`,{className:`flex flex-col items-center gap-y-1`,children:[(0,_.jsx)(`p`,{className:`text-text-positive-weak text-sm`,children:`Đăng nhập với Google`}),(0,_.jsx)(x.GoogleLogin,{size:`large`,theme:`outline`,onSuccess:async e=>{!e.clientId||!e.credential||!e.select_by||await i?.(e)}})]})})}),(0,_.jsx)(s.DrawerFooter,{})]})})]})},J=({children:e,...t})=>{let{isLoggedIn:n}=T();return n?(0,_.jsx)(j,{variant:`inset`,collapsible:`icon`,...t,children:e}):null},Y=({children:e})=>{let{isLoggedIn:n,onGoogleLoginSuccess:r}=T(),i=(0,b.useMediaQuery)(`(min-width: 640px)`),[a,c]=(0,g.useState)(!1);return n?(0,_.jsx)(N,{children:(0,_.jsx)(`section`,{className:`relative size-full`,children:(0,_.jsx)(`div`,{className:`absolute inset-0 flex flex-col`,children:e})})}):(0,_.jsx)(`div`,{className:`size-full p-4 pt-[calc(var(--header-height)+1.5rem)]`,children:(0,_.jsxs)(`div`,{className:`bg-card shadow-card flex size-full flex-col items-center justify-center gap-6 rounded-lg p-8 text-center`,children:[(0,_.jsx)(`div`,{className:`bg-muted-foreground/10 flex size-20 items-center justify-center rounded-full`,children:(0,_.jsx)(m.LockIcon,{className:`text-primary size-10`})}),(0,_.jsxs)(`div`,{className:`flex max-w-md flex-col gap-2`,children:[(0,_.jsx)(`h2`,{className:`text-2xl font-semibold`,children:`Bạn chưa đăng nhập`}),(0,_.jsx)(`p`,{className:`text-text-positive-weak`,children:`Đăng nhập để khám phá đầy đủ các tính năng của Lunas Store và truy cập vào tài khoản của bạn.`})]}),(0,_.jsxs)(t.Button,{size:`lg`,className:`gap-2`,onClick:()=>c(!0),children:[(0,_.jsx)(m.LogInIcon,{size:18}),(0,_.jsx)(`span`,{children:`Đăng nhập ngay`})]}),i&&(0,_.jsx)(o.Dialog,{open:a,onOpenChange:c,children:(0,_.jsxs)(o.DialogContent,{showCloseButton:!1,className:`flex flex-col gap-0 border-none p-0 sm:max-w-sm`,children:[(0,_.jsx)(o.DialogHeader,{className:`flex-0 gap-2 p-6`,children:(0,_.jsx)(o.DialogTitle,{className:`text-center`,children:`Chào mừng bạn đến với Lunas Store!`})}),(0,_.jsx)(`div`,{className:`flex flex-1 flex-col`,children:(0,_.jsx)(`main`,{className:`bg-card size-full flex-1 p-4 pt-0`,children:(0,_.jsxs)(`div`,{className:`flex flex-col items-center gap-y-1`,children:[(0,_.jsx)(`p`,{className:`text-text-positive-weak text-sm`,children:`Đăng nhập với Google`}),(0,_.jsx)(x.GoogleLogin,{size:`large`,theme:`outline`,width:240,onSuccess:async e=>{!e.clientId||!e.credential||!e.select_by||(await r?.(e),c(!1))}})]})})}),(0,_.jsx)(o.DialogFooter,{className:`p-2`})]})}),!i&&(0,_.jsx)(s.Drawer,{open:a,onOpenChange:c,children:(0,_.jsxs)(s.DrawerContent,{children:[(0,_.jsx)(s.DrawerHeader,{className:`text-left`,children:(0,_.jsx)(s.DrawerTitle,{children:`Chào mừng bạn đến với Lunas Store!`})}),(0,_.jsx)(`div`,{className:`flex flex-1 flex-col`,children:(0,_.jsx)(`main`,{className:`flex size-full flex-1 flex-col p-4 pt-0`,children:(0,_.jsxs)(`div`,{className:`flex flex-col items-center gap-y-1`,children:[(0,_.jsx)(`p`,{className:`text-text-positive-weak text-sm`,children:`Đăng nhập với Google`}),(0,_.jsx)(x.GoogleLogin,{size:`large`,theme:`outline`,onSuccess:async e=>{!e.clientId||!e.credential||!e.select_by||(await r?.(e),c(!1))}})]})})}),(0,_.jsx)(s.DrawerFooter,{})]})})]})})},X=({className:e,children:t})=>(0,_.jsx)(`div`,{"data-slot":`main-header`,className:(0,h.cn)(`flex-0 snap-start`,e),children:t}),Z=({className:e,children:t})=>(0,_.jsx)(`div`,{"data-slot":`main-content`,className:(0,h.cn)(`flex w-full flex-1 flex-col gap-4 overflow-y-auto px-2 sm:px-4`,e),children:t}),Q=({className:e,children:t})=>(0,_.jsx)(`div`,{"data-slot":`main-footer`,className:(0,h.cn)(`border-border-weak hidden w-full flex-0 border-t pt-2 sm:flex`,e),children:t}),$=({children:e,className:t})=>(0,_.jsx)(`div`,{"data-slot":`main-group`,className:(0,h.cn)(`flex size-full flex-col gap-4`,t),children:e}),oe=({className:e,children:t})=>(0,_.jsx)(`div`,{"data-slot":`main-group-content`,className:(0,h.cn)(`bg-card shadow-card max-w-8xl size-full flex-1 rounded-md p-4`,e),children:t});exports.ServiceLayoutCartInfo=K,exports.ServiceLayoutHeader=q,exports.ServiceLayoutMain=Y,exports.ServiceLayoutMainContent=Z,exports.ServiceLayoutMainFooter=Q,exports.ServiceLayoutMainGroup=$,exports.ServiceLayoutMainGroupContent=oe,exports.ServiceLayoutMainHeader=X,exports.ServiceLayoutProvider=U,exports.ServiceLayoutSidebar=J,exports.ServiceLayoutSidebarContent=F,exports.ServiceLayoutSidebarFooter=P,exports.ServiceLayoutSidebarGroup=I,exports.ServiceLayoutSidebarGroupContent=R,exports.ServiceLayoutSidebarGroupLabel=L,exports.ServiceLayoutSidebarMenu=z,exports.ServiceLayoutSidebarMenuButton=H,exports.ServiceLayoutSidebarMenuItem=B,exports.ServiceLayoutUserInfo=G,exports.ServiceLayoutWrapper=W;
1
+ const e=require(`../../chunk-CUT6urMc.cjs`);require(`../../dist-D0uO1qIz.cjs`),require(`../../button-variants-CCiseNSC.cjs`);const t=require(`../../button-CuV2l4ge.cjs`),n=require(`../../card-Pnxpehsp.cjs`);require(`../../skeleton-BA-3d3bn.cjs`);const r=require(`../../image-j62jo7bK.cjs`),i=require(`../../tooltip-DXvcPsvM.cjs`),a=require(`../../avatar-B4pklWJt.cjs`),o=require(`../../dialog-BSdn3QaW.cjs`),s=require(`../../input-DfGojpRF.cjs`),c=require(`../../drawer-CsCzBHvx.cjs`),l=require(`../../dropdown-menu-DwI8o0uQ.cjs`),u=require(`../../scroll-area-slD5Jekm.cjs`),d=require(`../../separator-WF5zTNGS.cjs`),f=require(`../../sheet-cjXJAfUE.cjs`),p=require(`../../tabs-MolLf09Q.cjs`),m=e.__toESM(require(`lucide-react`)),h=e.__toESM(require(`@customafk/react-toolkit/utils`)),g=e.__toESM(require(`react`)),_=e.__toESM(require(`react/jsx-runtime`)),v=e.__toESM(require(`class-variance-authority`)),y=e.__toESM(require(`radix-ui`)),b=e.__toESM(require(`@customafk/react-toolkit/hooks/useMediaQuery`)),x=e.__toESM(require(`@react-oauth/google`)),S=e.__toESM(require(`@customafk/react-toolkit/hooks/useMobile`)),C=e.__toESM(require(`@customafk/react-toolkit/hooks/useDebounceCallback`)),w=(0,g.createContext)(null),T=()=>{let e=(0,g.useContext)(w);if(!e)throw Error(`useServiceLayoutContext must be used within a ServiceLayoutProvider`);return e},E=({type:e,productUuid:i,variantUuid:a,productName:o,variantName:c,imageUrl:l,optionValue:u,optionTitle:d,quantity:f,price:p})=>{let{onDeletingCart:h,onUpdatingCart:v}=T(),[y,b]=(0,g.useState)(f),[x,S]=(0,g.useState)(!1),w=(0,g.useCallback)(()=>{v?.(a,y,e)},[v,a,y,e]),E=(0,C.useDebounceCallback)(w,500),D=(0,g.useCallback)(e=>{e<1&&(e=1),e>99&&(e=99),b(e)},[]),O=(0,g.useCallback)(async()=>{S(!0),await h?.(i),S(!1)},[i,h]);return(0,g.useEffect)(()=>(y!==f&&E(),()=>{E.cancel()}),[y,f,E]),(0,_.jsxs)(n.Card,{className:`border-border-weak relative mb-3 overflow-x-auto border p-4 shadow-none`,children:[x&&(0,_.jsx)(`div`,{className:`bg-muted-muted/80 absolute inset-0 z-10 flex items-center justify-center`,children:(0,_.jsx)(`div`,{className:`loader-dots`})}),(0,_.jsxs)(n.CardContent,{className:`p-0`,children:[(0,_.jsxs)(t.Button,{variant:`ghost`,size:`icon`,color:`muted`,disabled:x,className:`text-text-positive-weak absolute top-2 right-2 z-10`,onClick:O,children:[(0,_.jsx)(m.Trash2,{className:`h-4 w-4`}),(0,_.jsx)(`span`,{className:`sr-only`,children:`Remove item`})]}),(0,_.jsxs)(`div`,{className:`flex gap-3`,children:[(0,_.jsx)(`div`,{className:`relative size-20 flex-shrink-0`,children:l?(0,_.jsx)(r.Image,{src:l,alt:o,className:`rounded-md border-none shadow-xs`,width:80,height:80}):(0,_.jsx)(`div`,{className:`bg-muted text-muted-foreground flex size-full items-center justify-center text-xs`,children:`No image`})}),(0,_.jsxs)(`div`,{className:`flex flex-1 flex-col`,children:[(0,_.jsx)(`div`,{className:`flex justify-between`,children:(0,_.jsx)(`h3`,{className:`text-text-positive line-clamp-1 text-sm font-medium`,children:o})}),(0,_.jsxs)(`p`,{className:`text-text-positive-weak mb-1 text-xs`,children:[c,d&&` - ${d}: ${u}`]}),(0,_.jsxs)(`div`,{className:`mt-auto flex items-center justify-between`,children:[(0,_.jsxs)(`div`,{className:`flex items-center space-x-1`,children:[(0,_.jsx)(`button`,{disabled:y<=1,className:`border-border active:bg-muted-muted flex size-6 cursor-pointer items-center justify-center rounded-full border transition-all disabled:opacity-60`,onClick:()=>D(y-1),children:(0,_.jsx)(m.Minus,{size:12})}),(0,_.jsx)(s.Input,{value:y,onChange:e=>D(parseInt(e.target.value||`1`)),className:`border-border h-6.5 w-14 rounded-md border p-1 text-center text-sm`,min:1}),(0,_.jsx)(`button`,{disabled:y>=99,className:`border-border active:bg-muted-muted flex size-6 cursor-pointer items-center justify-center rounded-full border transition-all disabled:opacity-60`,onClick:()=>D(y+1),children:(0,_.jsx)(m.Plus,{size:12})})]}),(0,_.jsxs)(`div`,{className:`text-sm font-semibold`,children:[(p*y).toLocaleString(),` ₫`]})]})]})]})]})]})},D=({items:e=[],cartType:n,className:r})=>{let i=e.reduce((e,t)=>e+t.price*t.quantity,0);return e.length===0?(0,_.jsxs)(`div`,{className:(0,h.cn)(`bg-muted-muted flex size-full max-h-80 flex-col items-center justify-center rounded-lg p-8`,r),children:[(0,_.jsx)(`div`,{className:`text-text-positive-weak bg-card shadow-card mb-4 flex size-20 items-center justify-center rounded-full text-5xl`,children:(0,_.jsx)(m.ShoppingBasketIcon,{size:42,strokeWidth:1})}),(0,_.jsxs)(`div`,{className:`flex flex-col space-y-1`,children:[(0,_.jsx)(`p`,{className:`text-text-positive text-center text-base font-semibold`,children:`Giỏ hàng trống`}),(0,_.jsx)(`p`,{className:`text-text-positive-weak mb-4 text-center text-sm`,children:n===`in_stock`?`Thêm sản phẩm có sẵn vào giỏ hàng của bạn!`:`Thêm sản phẩm đặt trước vào giỏ hàng của bạn!`})]})]}):(0,_.jsxs)(`div`,{className:(0,h.cn)(`flex h-full flex-col space-y-4 overflow-y-auto`,r),children:[(0,_.jsx)(u.ScrollArea,{className:`h-full flex-1`,children:e.map(e=>(0,_.jsx)(E,{...e,type:n},`${e.productUuid}-${e.variantUuid}`))}),(0,_.jsxs)(`div`,{className:`flex-0 space-y-3`,children:[(0,_.jsxs)(`div`,{className:`flex justify-between`,children:[(0,_.jsx)(`span`,{className:`text-text-positive-weak text-sm`,children:`Tạm tính:`}),(0,_.jsxs)(`span`,{className:`text-sm`,children:[i.toLocaleString(),` ₫`]})]}),(0,_.jsx)(d.Separator,{}),(0,_.jsxs)(`div`,{className:`flex justify-between`,children:[(0,_.jsx)(`span`,{className:`text-text-positive font-medium`,children:`Tổng cộng:`}),(0,_.jsxs)(`span`,{className:`text-lg font-semibold`,children:[i.toLocaleString(),` ₫`]})]}),(0,_.jsx)(t.Button,{className:`mt-2 w-full`,children:`Thanh toán ngay`}),n===`pre_order`&&(0,_.jsx)(`p`,{className:`text-text-positive-weak text-center text-xs italic`,children:`* Sản phẩm đặt trước sẽ được giao sau khi có hàng`})]})]})},O=(0,g.createContext)(null),k=()=>{let e=(0,g.useContext)(O);if(!e)throw Error(`useSidebar must be used within a SidebarProvider.`);return e},ee=`sidebar_state`,te=3600*24*7,ne=`16rem`,re=`16rem`,ie=`3rem`,ae=`b`;function A({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:a,children:o,...s}){let c=(0,S.useIsMobile)(),[l,u]=(0,g.useState)(!1),[d,f]=(0,g.useState)(e),p=t??d,m=(0,g.useCallback)(e=>{let t=typeof e==`function`?e(p):e;n?n(t):f(t),document.cookie=`sidebar_state=${t}; path=/; max-age=604800`},[n,p]),v=(0,g.useCallback)(()=>c?u(e=>!e):m(e=>!e),[c,m,u]);(0,g.useEffect)(()=>{let e=e=>{e.key===`b`&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),v())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[v]);let y=p?`expanded`:`collapsed`,b=(0,g.useMemo)(()=>({state:y,isMobile:c,toggleSidebar:v,open:p,setOpen:m,openMobile:l,setOpenMobile:u}),[y,p,m,c,l,u,v]);return(0,_.jsx)(O.Provider,{value:b,children:(0,_.jsx)(i.TooltipProvider,{delayDuration:0,children:(0,_.jsx)(`div`,{"data-slot":`sidebar-wrapper`,style:{"--sidebar-width":`16rem`,"--sidebar-width-icon":`3rem`,...a},className:(0,h.cn)(`group/sidebar-wrapper`,`has-data-[variant=inset]:bg-sidebar`,`flex h-dvh w-full`,r),...s,children:o})})})}function j({side:e=`left`,variant:t=`sidebar`,collapsible:n=`offcanvas`,className:r,children:i,...a}){let{isMobile:o,state:s,openMobile:l,setOpenMobile:u}=k();return n===`none`?(0,_.jsx)(`aside`,{"data-slot":`sidebar`,className:(0,h.cn)(`bg-sidebar`,`text-sidebar-foreground`,`flex h-full w-(--sidebar-width) flex-col`,r),...a,children:i}):o?(0,_.jsx)(c.Drawer,{direction:`left`,open:l,onOpenChange:u,children:(0,_.jsxs)(c.DrawerContent,{"data-sidebar":`sidebar`,"data-slot":`sidebar`,"data-mobile":`true`,className:`bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 data-[vaul-drawer-direction=left]:w-3xs data-[vaul-drawer-direction=left]:sm:max-w-3xs [&>button]:hidden`,style:{"--sidebar-width":`16rem`},children:[(0,_.jsxs)(c.DrawerHeader,{className:`sr-only`,children:[(0,_.jsx)(c.DrawerTitle,{children:`Sidebar`}),(0,_.jsx)(c.DrawerDescription,{children:`Displays the mobile sidebar.`})]}),(0,_.jsxs)(`div`,{className:`flex size-full flex-col`,children:[(0,_.jsxs)(`div`,{className:`border-border-weak flex flex-0 items-center gap-x-2 border-b p-2 pr-4`,children:[(0,_.jsx)(M,{}),(0,_.jsx)(`div`,{className:`bg-sidebar-primary text-sidebar-primary-foreground ml-2 flex aspect-square size-8 items-center justify-center rounded-lg`,children:(0,_.jsx)(m.ShoppingCartIcon,{size:20})}),(0,_.jsxs)(`div`,{className:`grid flex-1 text-left text-sm leading-tight`,children:[(0,_.jsx)(`span`,{className:`truncate font-medium`,children:`Lunas Store`}),(0,_.jsx)(`span`,{className:`truncate text-xs`,children:`Established 2023`})]})]}),(0,_.jsx)(`div`,{className:`flex flex-1 flex-col p-2`,children:i})]})]})}):(0,_.jsxs)(`aside`,{className:`group peer text-sidebar-foreground bg-card hidden md:block`,"data-state":s,"data-collapsible":s===`collapsed`?n:``,"data-variant":t,"data-side":e,"data-slot":`sidebar`,children:[(0,_.jsx)(`div`,{"data-slot":`sidebar-gap`,className:(0,h.cn)(`relative`,`bg-transparent`,`transition-[width] duration-200 ease-linear`,`h-(--header-height) w-(--sidebar-width)`,`sm:h-[calc(var(--header-height) + 0.5rem)]`,`group-data-[collapsible=offcanvas]:w-0`,`group-data-[side=right]:rotate-180`,t===`floating`||t===`inset`?`group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon)`)}),(0,_.jsx)(`div`,{"data-slot":`sidebar-container`,className:(0,h.cn)(`hidden md:flex`,`shadow-nav fixed inset-y-0 top-14 z-10`,`h-[calc(100dvh-3.5rem)] w-(--sidebar-width)`,`transition-[left,right,width] duration-200 ease-linear`,e===`left`&&`left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]`,e===`right`&&`right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]`,t===`floating`||t===`inset`?`p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l`,r),...a,children:(0,_.jsx)(`div`,{"data-sidebar":`sidebar`,"data-slot":`sidebar-inner`,className:(0,h.cn)(`flex size-full flex-col`,`group-data-[variant=floating]:rounded-lg`,`group-data-[variant=floating]:border`,`group-data-[variant=floating]:border-sidebar-border`,`group-data-[variant=floating]:shadow-sm`),children:i})})]})}function M({className:e,onClick:n,...r}){let{toggleSidebar:i}=k();return(0,_.jsxs)(t.Button,{"data-sidebar":`trigger`,"data-slot":`sidebar-trigger`,variant:`ghost`,color:`muted`,size:`icon`,className:(0,h.cn)(`size-10 rounded-full`,e),onClick:e=>{n?.(e),i()},...r,children:[(0,_.jsx)(m.MenuIcon,{className:`!size-6`}),(0,_.jsx)(`span`,{className:`sr-only`,children:`Toggle Sidebar`})]})}function N({className:e,children:t,...n}){return(0,_.jsxs)(`main`,{"data-slot":`sidebar-inset`,className:(0,h.cn)(`relative flex w-full flex-1 flex-col`,e),...n,children:[(0,_.jsx)(`div`,{className:`h-(--header-height) w-full sm:h-[calc(var(--header-height)_+_0.5rem)]`}),(0,_.jsx)(`div`,{className:(0,h.cn)(`flex-1 inset-shadow-sm`),children:t})]})}function P({className:e,children:t,...n}){let{open:r}=k(),{onLogout:i}=T();return(0,_.jsxs)(`div`,{"data-slot":`sidebar-footer`,"data-sidebar":`footer`,className:(0,h.cn)(`flex flex-col gap-2`,e),...n,children:[t,(0,_.jsxs)(z,{children:[(0,_.jsx)(B,{children:(0,_.jsxs)(H,{className:`border-border border`,onClick:i,children:[(0,_.jsx)(m.LogOutIcon,{className:`text-text-positive-weak`}),`Đăng xuất`]})}),r&&(0,_.jsx)(B,{className:`border-t-border mt-2 border-t`,children:(0,_.jsx)(`p`,{className:`text-muted-foreground pt-2 text-center text-xs`,children:`Copyright © 2025, Lunas.`})})]})]})}function F({className:e,...t}){return(0,_.jsx)(`div`,{"data-slot":`sidebar-content`,"data-sidebar":`content`,className:(0,h.cn)(`flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden`,e),...t})}function I({className:e,...t}){return(0,_.jsx)(`div`,{"data-slot":`sidebar-group`,"data-sidebar":`group`,className:(0,h.cn)(`relative flex w-full min-w-0 flex-col`,e),...t})}function L({className:e,asChild:t=!1,...n}){let r=t?y.Slot.Slot:`div`;return(0,_.jsx)(r,{"data-slot":`sidebar-group-label`,"data-sidebar":`group-label`,className:(0,h.cn)(`flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2`,`text-sidebar-foreground/70`,`ring-sidebar-ring`,`[&>svg]:size-4`,`[&>svg]:shrink-0`,`group-data-[collapsible=icon]:-mt-8`,`group-data-[collapsible=icon]:opacity-0`,e),...n})}function R({className:e,...t}){return(0,_.jsx)(`div`,{"data-slot":`sidebar-group-content`,"data-sidebar":`group-content`,className:(0,h.cn)(`w-full text-sm`,e),...t})}function z({className:e,...t}){return(0,_.jsx)(`ul`,{"data-slot":`sidebar-menu`,"data-sidebar":`menu`,className:(0,h.cn)(`flex w-full min-w-0 flex-col gap-1`,e),...t})}function B({className:e,...t}){return(0,_.jsx)(`li`,{"data-slot":`sidebar-menu-item`,"data-sidebar":`menu-item`,className:(0,h.cn)(`group/menu-item relative`,e),...t})}const V=(0,v.cva)(`peer/menu-button.cursor-pointer.flex w-full items-center gap-2.overflow-hidden rounded-md p-2 outline-hidden.text-left truncate.transition-[color,width,height,padding].hover:bg-sidebar-accent.hover:text-sidebar-accent-foreground.active:bg-sidebar-accent.active:text-sidebar-accent-foreground.disabled:pointer-events-none.disabled:opacity-50.group-has-data-[sidebar=menu-action]/menu-item:pr-8.aria-disabled:pointer-events-none.aria-disabled:opacity-50.data-[active=true]:bg-sidebar-primary-muted.data-[active=true]:font-medium.data-[active=true]:text-sidebar-primary.data-[state=open]:hover:bg-sidebar-accent.data-[state=open]:hover:text-sidebar-accent-foreground.group-data-[collapsible=icon]:size-12!.group-data-[collapsible=icon]:p-3!.group-data-[collapsible=icon]:gap-3!.[&>svg]:size-6.[&>svg]:shrink-0.[&>span:last-child]:truncate`.split(`.`),{variants:{variant:{default:`hover:bg-sidebar-accent/60 hover:text-sidebar-accent-foreground/80`,outline:`bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]`},size:{default:`h-10 text-sm`,sm:`h-7 text-xs`,lg:`h-12 text-sm group-data-[collapsible=icon]:p-0!`}},defaultVariants:{variant:`default`,size:`default`}});function H({asChild:e=!1,isActive:t=!1,variant:n=`default`,size:r=`default`,tooltip:a,className:o,...s}){let c=e?y.Slot.Slot:`button`,{isMobile:l,state:u}=k(),d=(0,_.jsx)(c,{"data-slot":`sidebar-menu-button`,"data-sidebar":`menu-button`,"data-size":r,"data-active":t,className:(0,h.cn)(V({variant:n,size:r}),o),...s});return a?(typeof a==`string`&&(a={children:a}),(0,_.jsxs)(i.Tooltip,{children:[(0,_.jsx)(i.TooltipTrigger,{asChild:!0,children:d}),(0,_.jsx)(i.TooltipContent,{side:`right`,align:`center`,hidden:u!==`collapsed`||l,...a})]})):d}const U=({isLoggedIn:e=!1,username:t,email:n,inStockCarts:r,orderedCarts:i,onGoogleLoginSuccess:a,onUpdatingCart:o,onDeletingCart:s,onLogout:c,children:l})=>(0,_.jsx)(w.Provider,{value:{isLoggedIn:e,username:t,email:n,inStockCarts:r,orderedCarts:i,onGoogleLoginSuccess:a,onUpdatingCart:o,onDeletingCart:s,onLogout:c},children:l}),W=({children:e})=>(0,_.jsx)(A,{children:e}),G=({userName:e=`Keith Kennedy`,userEmail:n=`k.kennedy@originui.com`,onLogout:r})=>(0,_.jsxs)(l.DropdownMenu,{children:[(0,_.jsx)(l.DropdownMenuTrigger,{asChild:!0,children:(0,_.jsx)(t.Button,{size:`icon`,variant:`ghost`,color:`secondary`,className:`size-10 rounded-full`,children:(0,_.jsxs)(a.Avatar,{className:`size-10`,children:[(0,_.jsx)(a.AvatarImage,{}),(0,_.jsx)(a.AvatarFallback,{className:`bg-muted-muted size-full`,children:(0,_.jsx)(m.UserIcon,{})})]})})}),(0,_.jsxs)(l.DropdownMenuContent,{align:`end`,className:`max-w-64`,children:[(0,_.jsxs)(l.DropdownMenuLabel,{className:`flex min-w-0 flex-col`,children:[(0,_.jsx)(`span`,{className:`text-text-positive truncate text-sm font-medium`,children:e}),(0,_.jsx)(`span`,{className:`text-text-positive-weak truncate text-xs font-normal`,children:n})]}),(0,_.jsx)(l.DropdownMenuSeparator,{}),(0,_.jsxs)(l.DropdownMenuItem,{onClick:r,children:[(0,_.jsx)(m.LogOutIcon,{size:16,"aria-hidden":`true`}),(0,_.jsx)(`span`,{className:`text-text-positive`,children:`Logout`})]})]})]}),K=()=>{let{inStockCarts:e=[],orderedCarts:n=[]}=T(),r=e.length,i=n.length,a=r+i;return(0,_.jsxs)(f.Sheet,{children:[(0,_.jsx)(f.SheetTrigger,{asChild:!0,children:(0,_.jsxs)(t.Button,{size:`icon`,variant:`ghost`,color:`secondary`,className:`relative size-10 rounded-full`,children:[(0,_.jsx)(m.ShoppingCartIcon,{}),a>0&&(0,_.jsx)(`span`,{className:`bg-primary text-primary-foreground absolute -top-1 -right-1 flex h-4 min-w-4 items-center justify-center rounded-full px-1 text-xs font-bold`,children:a})]})}),(0,_.jsxs)(f.SheetContent,{className:`w-[95vw] sm:max-w-md`,children:[(0,_.jsx)(f.SheetHeader,{className:`border-border-weak flex-0 border-b pb-3`,children:(0,_.jsxs)(f.SheetTitle,{className:`flex items-center gap-2`,children:[(0,_.jsx)(m.ShoppingBag,{className:`h-5 w-5`}),(0,_.jsx)(`span`,{children:`Giỏ hàng của bạn`}),a>0&&(0,_.jsxs)(`span`,{className:`text-text-positive-weak text-sm font-normal`,children:[`(`,a,` sản phẩm)`]})]})}),(0,_.jsxs)(p.Tabs,{defaultValue:i>0?`pre_order`:`in_stock`,className:`h-full flex-1 overflow-y-auto p-4 pt-0`,children:[(0,_.jsxs)(p.TabsList,{className:`w-full flex-0`,children:[(0,_.jsxs)(p.TabsTrigger,{value:`in_stock`,className:`relative`,children:[`Có sẵn`,r>0&&(0,_.jsxs)(`span`,{children:[`(`,r,`)`]})]}),(0,_.jsxs)(p.TabsTrigger,{value:`pre_order`,className:`relative`,children:[`Đặt trước`,i>0&&(0,_.jsxs)(`span`,{children:[`(`,i,`)`]})]})]}),(0,_.jsx)(p.TabsContent,{value:`pre_order`,className:`flex-1 overflow-y-auto`,children:(0,_.jsx)(D,{items:n,cartType:`pre_order`})}),(0,_.jsx)(p.TabsContent,{value:`in_stock`,className:`flex-1 overflow-y-auto`,children:(0,_.jsx)(D,{items:e,cartType:`in_stock`})})]})]})]})},q=()=>{let{isLoggedIn:e,username:n,email:r,onGoogleLoginSuccess:i,onLogout:a}=T(),s=(0,b.useMediaQuery)(`(min-width: 640px)`),[l,u]=(0,g.useState)(!1);return(0,_.jsxs)(`header`,{className:(0,h.cn)(`bg-card`,`h-(--header-height)`,`sm:h-[calc(var(--header-height)_+_0.5rem)] sm:px-4 sm:pr-6`,`absolute inset-x-0 top-0 z-20 gap-2 px-2 pr-4.5`,`shadow-nav flex items-center`,`transition-[width,height] ease-linear`),children:[e&&(0,_.jsx)(M,{}),(0,_.jsxs)(`div`,{className:`flex gap-x-2 sm:ml-2.5`,children:[(0,_.jsx)(`div`,{className:`bg-sidebar-primary text-sidebar-primary-foreground flex aspect-square size-8 items-center justify-center rounded-lg`,children:(0,_.jsx)(m.ShoppingCartIcon,{size:20})}),(0,_.jsxs)(`div`,{className:`grid flex-1 text-left text-sm leading-tight`,children:[(0,_.jsx)(`span`,{className:`truncate font-medium`,children:`Lunas Store`}),(0,_.jsx)(`span`,{className:`truncate text-xs`,children:`Established 2023`})]})]}),(0,_.jsxs)(`div`,{className:`flex flex-1 items-center justify-end gap-x-2`,children:[!e&&(0,_.jsxs)(t.Button,{className:`w-8 sm:w-fit`,onClick:()=>u(!0),children:[(0,_.jsx)(m.LogInIcon,{}),(0,_.jsx)(`span`,{className:`sr-only sm:not-sr-only`,children:`Đăng nhập`})]}),e&&(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(G,{userName:n,userEmail:r,onLogout:a}),(0,_.jsx)(d.Separator,{orientation:`vertical`,className:`min-h-6 w-px`}),(0,_.jsx)(K,{})]})]}),s&&(0,_.jsx)(o.Dialog,{open:l,onOpenChange:u,children:(0,_.jsxs)(o.DialogContent,{showCloseButton:!1,className:`flex flex-col gap-0 border-none p-0 sm:max-w-sm`,children:[(0,_.jsx)(o.DialogHeader,{className:`flex-0 gap-2 p-6`,children:(0,_.jsx)(o.DialogTitle,{className:`text-center`,children:`Chào mừng bạn đến với Lunas Store!`})}),(0,_.jsx)(`div`,{className:`flex flex-1 flex-col`,children:(0,_.jsx)(`main`,{className:`bg-card size-full flex-1 p-4 pt-0`,children:(0,_.jsxs)(`div`,{className:`flex flex-col items-center gap-y-1`,children:[(0,_.jsx)(`p`,{className:`text-text-positive-weak text-sm`,children:`Đăng nhập với Google`}),(0,_.jsx)(x.GoogleLogin,{size:`large`,theme:`outline`,width:240,onSuccess:async e=>{!e.clientId||!e.credential||!e.select_by||await i?.(e)}})]})})}),(0,_.jsx)(o.DialogFooter,{className:`p-2`})]})}),!s&&(0,_.jsx)(c.Drawer,{open:l,onOpenChange:u,children:(0,_.jsxs)(c.DrawerContent,{children:[(0,_.jsx)(c.DrawerHeader,{className:`text-left`,children:(0,_.jsx)(c.DrawerTitle,{children:`Chào mừng bạn đến với Lunas Store!`})}),(0,_.jsx)(`div`,{className:`flex flex-1 flex-col`,children:(0,_.jsx)(`main`,{className:`flex size-full flex-1 flex-col p-4 pt-0`,children:(0,_.jsxs)(`div`,{className:`flex flex-col items-center gap-y-1`,children:[(0,_.jsx)(`p`,{className:`text-text-positive-weak text-sm`,children:`Đăng nhập với Google`}),(0,_.jsx)(x.GoogleLogin,{size:`large`,theme:`outline`,onSuccess:async e=>{!e.clientId||!e.credential||!e.select_by||await i?.(e)}})]})})}),(0,_.jsx)(c.DrawerFooter,{})]})})]})},J=({children:e,...t})=>{let{isLoggedIn:n}=T();return n?(0,_.jsx)(j,{variant:`inset`,collapsible:`icon`,...t,children:e}):null},Y=({children:e})=>{let{isLoggedIn:n,onGoogleLoginSuccess:r}=T(),i=(0,b.useMediaQuery)(`(min-width: 640px)`),[a,s]=(0,g.useState)(!1);return n?(0,_.jsx)(N,{children:(0,_.jsx)(`section`,{className:`relative size-full`,children:(0,_.jsx)(`div`,{className:`absolute inset-0 flex flex-col`,children:e})})}):(0,_.jsx)(`div`,{className:`size-full p-4 pt-[calc(var(--header-height)+1.5rem)]`,children:(0,_.jsxs)(`div`,{className:`bg-card shadow-card flex size-full flex-col items-center justify-center gap-6 rounded-lg p-8 text-center`,children:[(0,_.jsx)(`div`,{className:`bg-muted-foreground/10 flex size-20 items-center justify-center rounded-full`,children:(0,_.jsx)(m.LockIcon,{className:`text-primary size-10`})}),(0,_.jsxs)(`div`,{className:`flex max-w-md flex-col gap-2`,children:[(0,_.jsx)(`h2`,{className:`text-2xl font-semibold`,children:`Bạn chưa đăng nhập`}),(0,_.jsx)(`p`,{className:`text-text-positive-weak`,children:`Đăng nhập để khám phá đầy đủ các tính năng của Lunas Store và truy cập vào tài khoản của bạn.`})]}),(0,_.jsxs)(t.Button,{size:`lg`,className:`gap-2`,onClick:()=>s(!0),children:[(0,_.jsx)(m.LogInIcon,{size:18}),(0,_.jsx)(`span`,{children:`Đăng nhập ngay`})]}),i&&(0,_.jsx)(o.Dialog,{open:a,onOpenChange:s,children:(0,_.jsxs)(o.DialogContent,{showCloseButton:!1,className:`flex flex-col gap-0 border-none p-0 sm:max-w-sm`,children:[(0,_.jsx)(o.DialogHeader,{className:`flex-0 gap-2 p-6`,children:(0,_.jsx)(o.DialogTitle,{className:`text-center`,children:`Chào mừng bạn đến với Lunas Store!`})}),(0,_.jsx)(`div`,{className:`flex flex-1 flex-col`,children:(0,_.jsx)(`main`,{className:`bg-card size-full flex-1 p-4 pt-0`,children:(0,_.jsxs)(`div`,{className:`flex flex-col items-center gap-y-1`,children:[(0,_.jsx)(`p`,{className:`text-text-positive-weak text-sm`,children:`Đăng nhập với Google`}),(0,_.jsx)(x.GoogleLogin,{size:`large`,theme:`outline`,width:240,onSuccess:async e=>{!e.clientId||!e.credential||!e.select_by||(await r?.(e),s(!1))}})]})})}),(0,_.jsx)(o.DialogFooter,{className:`p-2`})]})}),!i&&(0,_.jsx)(c.Drawer,{open:a,onOpenChange:s,children:(0,_.jsxs)(c.DrawerContent,{children:[(0,_.jsx)(c.DrawerHeader,{className:`text-left`,children:(0,_.jsx)(c.DrawerTitle,{children:`Chào mừng bạn đến với Lunas Store!`})}),(0,_.jsx)(`div`,{className:`flex flex-1 flex-col`,children:(0,_.jsx)(`main`,{className:`flex size-full flex-1 flex-col p-4 pt-0`,children:(0,_.jsxs)(`div`,{className:`flex flex-col items-center gap-y-1`,children:[(0,_.jsx)(`p`,{className:`text-text-positive-weak text-sm`,children:`Đăng nhập với Google`}),(0,_.jsx)(x.GoogleLogin,{size:`large`,theme:`outline`,onSuccess:async e=>{!e.clientId||!e.credential||!e.select_by||(await r?.(e),s(!1))}})]})})}),(0,_.jsx)(c.DrawerFooter,{})]})})]})})},X=({className:e,children:t})=>(0,_.jsx)(`div`,{"data-slot":`main-header`,className:(0,h.cn)(`flex-0 snap-start`,e),children:t}),Z=({className:e,children:t})=>(0,_.jsx)(`div`,{"data-slot":`main-content`,className:(0,h.cn)(`flex w-full flex-1 flex-col gap-4 overflow-y-auto px-2 sm:px-4`,e),children:t}),Q=({className:e,children:t})=>(0,_.jsx)(`div`,{"data-slot":`main-footer`,className:(0,h.cn)(`border-border-weak hidden w-full flex-0 border-t pt-2 sm:flex`,e),children:t}),$=({children:e,className:t})=>(0,_.jsx)(`div`,{"data-slot":`main-group`,className:(0,h.cn)(`flex size-full flex-col gap-4`,t),children:e}),oe=({className:e,children:t})=>(0,_.jsx)(`div`,{"data-slot":`main-group-content`,className:(0,h.cn)(`bg-card shadow-card max-w-8xl size-full flex-1 rounded-md p-4`,e),children:t});exports.ServiceLayoutCartInfo=K,exports.ServiceLayoutHeader=q,exports.ServiceLayoutMain=Y,exports.ServiceLayoutMainContent=Z,exports.ServiceLayoutMainFooter=Q,exports.ServiceLayoutMainGroup=$,exports.ServiceLayoutMainGroupContent=oe,exports.ServiceLayoutMainHeader=X,exports.ServiceLayoutProvider=U,exports.ServiceLayoutSidebar=J,exports.ServiceLayoutSidebarContent=F,exports.ServiceLayoutSidebarFooter=P,exports.ServiceLayoutSidebarGroup=I,exports.ServiceLayoutSidebarGroupContent=R,exports.ServiceLayoutSidebarGroupLabel=L,exports.ServiceLayoutSidebarMenu=z,exports.ServiceLayoutSidebarMenuButton=H,exports.ServiceLayoutSidebarMenuItem=B,exports.ServiceLayoutUserInfo=G,exports.ServiceLayoutWrapper=W;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1,8 +1,8 @@
1
- import "../../button-MK4kEvtG.cjs";
2
- import "../../separator-DIIArEUd.cjs";
1
+ import "../../button-CGIJb6H5.cjs";
2
+ import "../../separator-mZ8r56s2.cjs";
3
3
  import { TooltipContent } from "../../tooltip-DijjzZk1.cjs";
4
4
  import * as react_jsx_runtime281 from "react/jsx-runtime";
5
- import * as class_variance_authority_types8 from "class-variance-authority/types";
5
+ import * as class_variance_authority_types7 from "class-variance-authority/types";
6
6
  import { VariantProps } from "class-variance-authority";
7
7
  import { CredentialResponse } from "@react-oauth/google";
8
8
 
@@ -78,7 +78,7 @@ declare function ServiceLayoutSidebarMenuItem({
78
78
  declare const sidebarMenuButtonVariants: (props?: ({
79
79
  variant?: "default" | "outline" | null | undefined;
80
80
  size?: "sm" | "lg" | "default" | null | undefined;
81
- } & class_variance_authority_types8.ClassProp) | undefined) => string;
81
+ } & class_variance_authority_types7.ClassProp) | undefined) => string;
82
82
  declare function ServiceLayoutSidebarMenuButton({
83
83
  asChild,
84
84
  isActive,
@@ -1,6 +1,6 @@
1
- import "../../button-Bu22bfSc.js";
2
- import "../../separator-DUymk2P4.js";
3
- import { TooltipContent } from "../../tooltip-Cfp93PmG.js";
1
+ import "../../button-BdYhnlA1.js";
2
+ import "../../separator-C4wU5Rr6.js";
3
+ import { TooltipContent } from "../../tooltip-Dt83PTkc.js";
4
4
  import "react";
5
5
  import * as react_jsx_runtime281 from "react/jsx-runtime";
6
6
  import { VariantProps } from "class-variance-authority";