maz-ui 4.0.0-beta.5 → 4.0.0-beta.6

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 (434) hide show
  1. package/dist/assets/MazAccordion.DUQCf8vy.css +1 -0
  2. package/dist/assets/{MazBtn.BnRxVlqS.css → MazBtn.FsG6p6NF.css} +1 -1
  3. package/dist/assets/MazCheckbox.CFqw9ybT.css +1 -0
  4. package/dist/assets/MazDatePicker.8GyrtM-j.css +1 -0
  5. package/dist/assets/MazInput.WPopv89k.css +1 -0
  6. package/dist/assets/MazPickerMonthSwitcher.CszcpCcY.css +1 -0
  7. package/dist/assets/{MazPickerYearSwitcher.Dl30Dwor.css → MazPickerYearSwitcher.Cn-nS-Vv.css} +1 -1
  8. package/dist/assets/MazPopover.D-WwUjU_.css +1 -0
  9. package/dist/assets/MazRadio.XGYnbTuB.css +1 -0
  10. package/dist/assets/MazSelect.DEBsk61Q.css +1 -0
  11. package/dist/assets/{MazStepper.DYMde9uq.css → MazStepper.DtWZmm-f.css} +1 -1
  12. package/dist/assets/MazSwitch.Bxmh2iFj.css +1 -0
  13. package/dist/assets/{MazTable.B1tkeUfE.css → MazTable.DMlQdImb.css} +1 -1
  14. package/dist/assets/{toast.kunueRvo.css → toast.CC2VQab8.css} +1 -1
  15. package/dist/chunks/{MazDatePicker.Bgd0WwZk.js → MazDatePicker.EVP68BQf.js} +8 -28
  16. package/dist/chunks/{MazDropdown.vue_vue_type_style_index_0_lang.WRjG5bff.js → MazDropdown.vue_vue_type_style_index_0_lang.DjPJ9-gt.js} +3 -3
  17. package/dist/chunks/{MazInputNumber.vue_vue_type_style_index_0_lang.BUOLoXtV.js → MazInputNumber.vue_vue_type_style_index_0_lang.B6DYpHfi.js} +3 -3
  18. package/dist/chunks/{MazInputPrice.vue_vue_type_script_setup_true_lang.CT1Y2-_T.js → MazInputPrice.vue_vue_type_script_setup_true_lang.BA6TDX-T.js} +2 -2
  19. package/dist/chunks/{MazPickerCalendar.BkmubImp.js → MazPickerCalendar.CzPlAVdQ.js} +1 -1
  20. package/dist/chunks/{MazPickerCalendarMonth.Df2qar5v.js → MazPickerCalendarMonth.gZBcslia.js} +1 -1
  21. package/dist/chunks/{MazPickerCalendarSwitcher.DyrEWPLk.js → MazPickerCalendarSwitcher.CzAkb2yj.js} +4 -4
  22. package/dist/chunks/{MazPickerContainer.B4fyKYAE.js → MazPickerContainer.BodulCQp.js} +1 -1
  23. package/dist/chunks/{MazPickerHeader.DoXGZZFX.js → MazPickerHeader.ns_pHhiy.js} +1 -1
  24. package/dist/chunks/{MazPickerMonthSwitcher.CXuVHGVq.js → MazPickerMonthSwitcher.BuZuUauW.js} +5 -5
  25. package/dist/chunks/{MazPickerTime.CueS5GPb.js → MazPickerTime.DMVpW3Ha.js} +1 -1
  26. package/dist/chunks/{MazPickerYearSwitcher.DNdhvfKw.js → MazPickerYearSwitcher.METGgjem.js} +8 -26
  27. package/dist/chunks/{MazSwitch.vue_vue_type_style_index_0_lang.DQE0vFhe.js → MazSwitch.vue_vue_type_style_index_0_lang.CU43Y1ky.js} +1 -1
  28. package/dist/chunks/{MazTable.vue_vue_type_script_setup_true_lang.By5YbgRn.js → MazTable.vue_vue_type_script_setup_true_lang.CK2bk5tI.js} +9 -9
  29. package/dist/chunks/{utils.D9NiqfdV.js → dom-events.CvkK8Xn2.js} +161 -114
  30. package/dist/chunks/{fullscreen-img.directive.ClMlhEtN.js → fullscreen-img.directive.CyOHexcO.js} +4 -4
  31. package/dist/components/MazAccordion.js +4 -4
  32. package/dist/components/MazAvatar.js +2 -2
  33. package/dist/components/MazBottomSheet.js +2 -2
  34. package/dist/components/MazBtn.js +2 -3
  35. package/dist/components/MazCard.js +2 -2
  36. package/dist/components/MazCarousel.js +3 -3
  37. package/dist/components/MazCheckbox.js +12 -14
  38. package/dist/components/MazChecklist.js +3 -3
  39. package/dist/components/MazDatePicker.js +1 -1
  40. package/dist/components/MazDialog.js +2 -2
  41. package/dist/components/MazDrawer.js +2 -2
  42. package/dist/components/MazDropdown.js +1 -1
  43. package/dist/components/MazDropzone.js +5 -5
  44. package/dist/components/MazGallery.js +3 -3
  45. package/dist/components/MazInput.js +12 -13
  46. package/dist/components/MazInputNumber.js +1 -1
  47. package/dist/components/MazInputPrice.js +1 -1
  48. package/dist/components/MazInputTags.js +2 -2
  49. package/dist/components/MazLink.js +2 -2
  50. package/dist/components/MazPagination.js +6 -6
  51. package/dist/components/MazPopover.js +162 -76
  52. package/dist/components/MazRadio.js +8 -16
  53. package/dist/components/MazRadioButtons.js +2 -2
  54. package/dist/components/MazReadingProgressBar.js +9 -2
  55. package/dist/components/MazSelect.js +21 -13
  56. package/dist/components/MazStepper.js +4 -4
  57. package/dist/components/MazSwitch.js +1 -1
  58. package/dist/components/MazTable.js +3 -3
  59. package/dist/components/MazTableCell.js +1 -1
  60. package/dist/components/MazTableRow.js +1 -1
  61. package/dist/components/MazTableTitle.js +1 -1
  62. package/dist/components/index.js +5 -5
  63. package/dist/composables/useDisplayNames.js +7 -1
  64. package/dist/composables/useFormField.js +15 -18
  65. package/dist/composables/useFormValidator.js +41 -28
  66. package/dist/css/main.css +1 -1
  67. package/dist/directives/index.js +1 -1
  68. package/dist/directives/vFullscreenImg.js +1 -1
  69. package/dist/directives/vTooltip.js +96 -59
  70. package/dist/plugins/toast.js +15 -18
  71. package/dist/resolvers/MazModulesResolver.js +3 -0
  72. package/dist/tailwindcss/tailwind.config.js +5 -2
  73. package/dist/tailwindcss/variables/design-tokens.js +3 -0
  74. package/dist/types/components/MazAccordion.vue.d.ts +15 -2
  75. package/dist/types/components/MazCheckbox.vue.d.ts +0 -6
  76. package/dist/types/components/MazDatePicker.vue.d.ts +4 -12
  77. package/dist/types/components/MazInputNumber.vue.d.ts +1 -1
  78. package/dist/types/components/MazPopover.vue.d.ts +7 -4
  79. package/dist/types/components/MazStepper.vue.d.ts +13 -2
  80. package/dist/types/components/MazTable.vue.d.ts +63 -2
  81. package/dist/types/components/index.d.ts +1 -1
  82. package/dist/types/composables/index.d.ts +1 -1
  83. package/dist/types/composables/useDisplayNames.d.ts +3 -3
  84. package/dist/types/composables/useFormField.d.ts +3 -41
  85. package/dist/types/composables/useFormValidator/dom-events.d.ts +19 -0
  86. package/dist/types/composables/useFormValidator/state-management.d.ts +54 -0
  87. package/dist/types/composables/useFormValidator/types.d.ts +9 -20
  88. package/dist/types/composables/useFormValidator/validation.d.ts +43 -0
  89. package/dist/types/composables/useFormValidator.d.ts +16 -10
  90. package/dist/types/directives/vTooltip.d.ts +2 -2
  91. package/dist/types/tailwindcss/tailwind.config.d.ts +5 -0
  92. package/dist/types/tailwindcss/variables/design-tokens.d.ts +3 -0
  93. package/package.json +8 -8
  94. package/dist/assets/MazAccordion.esK3rR4p.css +0 -1
  95. package/dist/assets/MazCheckbox.BFo5eYS6.css +0 -1
  96. package/dist/assets/MazDatePicker.V5JwKPrQ.css +0 -1
  97. package/dist/assets/MazInput.DW2KOJHY.css +0 -1
  98. package/dist/assets/MazPickerMonthSwitcher.168v7Hs1.css +0 -1
  99. package/dist/assets/MazPopover.COR-tym7.css +0 -1
  100. package/dist/assets/MazRadio.DKMFWwy_.css +0 -1
  101. package/dist/assets/MazSelect.DZZpDg8z.css +0 -1
  102. package/dist/assets/MazSwitch.Z1ZMm7tx.css +0 -1
  103. package/dist/chunks/academic-cap.BjcfXmGu.CCSXStjO.js +0 -24
  104. package/dist/chunks/adjustments-horizontal.CT-QeIwW.CRspwA1D.js +0 -24
  105. package/dist/chunks/adjustments-vertical.BHXET8iZ.DXKjofVz.js +0 -24
  106. package/dist/chunks/archive-box-arrow-down.DY2jR2sP.D5q20o-C.js +0 -24
  107. package/dist/chunks/archive-box-x-mark.DP7eLVaB.D9lYjTGp.js +0 -24
  108. package/dist/chunks/archive-box.CVwekUWp.CAar5Lvs.js +0 -24
  109. package/dist/chunks/arrow-down-circle.DL2lvwk5.CGlJ9wP0.js +0 -24
  110. package/dist/chunks/arrow-down-left.C3nEVXaG.DsaJ0TwT.js +0 -24
  111. package/dist/chunks/arrow-down-on-square-stack.BKDRxXkf.DOjZT9_M.js +0 -24
  112. package/dist/chunks/arrow-down-on-square.DAMoXY4b.Brdd_BB2.js +0 -24
  113. package/dist/chunks/arrow-down-right.hs3isRLs.9WxtifNr.js +0 -24
  114. package/dist/chunks/arrow-down-tray.w1Emiyu3.yRzoHE0I.js +0 -24
  115. package/dist/chunks/arrow-down.DEawGjfB.CguAHec6.js +0 -24
  116. package/dist/chunks/arrow-left-circle.BlKwmMyr.BF9vGCFO.js +0 -24
  117. package/dist/chunks/arrow-left-end-on-rectangle.BwEAWEQp.D7I0qUqw.js +0 -24
  118. package/dist/chunks/arrow-left-on-rectangle.DabmkYhe.CmIlQ7wf.js +0 -24
  119. package/dist/chunks/arrow-left-start-on-rectangle.BaoR6nlq.BtEBN2A6.js +0 -24
  120. package/dist/chunks/arrow-left.D_6VKA-e.CmQE04VA.js +0 -24
  121. package/dist/chunks/arrow-long-down.5N2s8Cpw.B9JKDT7M.js +0 -24
  122. package/dist/chunks/arrow-long-left.B7AX0id9.CywMhkhH.js +0 -24
  123. package/dist/chunks/arrow-long-right.CKMPfwrE.D3pLqdNX.js +0 -24
  124. package/dist/chunks/arrow-long-up.CT8DU9jc.CIOIdvGB.js +0 -24
  125. package/dist/chunks/arrow-path-rounded-square.65lulTVg.CQh60_RA.js +0 -24
  126. package/dist/chunks/arrow-path.CJ9Wswu_.BlR1BJ4i.js +0 -24
  127. package/dist/chunks/arrow-right-circle.DDZurzmk.DPzHFj8G.js +0 -24
  128. package/dist/chunks/arrow-right-end-on-rectangle.jNNaV464.DfFRTcEu.js +0 -24
  129. package/dist/chunks/arrow-right-on-rectangle.BQLAkJlS.D4JfF9Ov.js +0 -24
  130. package/dist/chunks/arrow-right-start-on-rectangle.DgFTLubq.3qbrqXCj.js +0 -24
  131. package/dist/chunks/arrow-right.h5GY-bzG.CKBQ5VHM.js +0 -24
  132. package/dist/chunks/arrow-small-down.3SdgC1Fw.vODsecnG.js +0 -24
  133. package/dist/chunks/arrow-small-left.Dbw5rTas.C-bYHDKK.js +0 -24
  134. package/dist/chunks/arrow-small-right.DAmxBfl5.n7vH-w9t.js +0 -24
  135. package/dist/chunks/arrow-small-up.WQQD-lUO.FvbI2uG_.js +0 -24
  136. package/dist/chunks/arrow-top-right-on-square.DJeWWj5d.DWV1wrwq.js +0 -24
  137. package/dist/chunks/arrow-trending-down.CSIGp7a0.DLp5ZExP.js +0 -24
  138. package/dist/chunks/arrow-trending-up.BGar-3Mt.Cx6Pgj8o.js +0 -24
  139. package/dist/chunks/arrow-turn-down-left.C4BtwCb-.C7vbo0bi.js +0 -24
  140. package/dist/chunks/arrow-turn-down-right.Cxu2KBHI.J8piVbUW.js +0 -24
  141. package/dist/chunks/arrow-turn-left-down.BfjbBrut.D-KMuKDz.js +0 -24
  142. package/dist/chunks/arrow-turn-left-up.Bsm0aGLO.WVDAyWpM.js +0 -24
  143. package/dist/chunks/arrow-turn-right-down.DH2Wh74o.dNtSWH1C.js +0 -24
  144. package/dist/chunks/arrow-turn-right-up.ou0Uaevi.Buzu0SB-.js +0 -24
  145. package/dist/chunks/arrow-turn-up-left.Bg5YgZsj.Bkn43xjW.js +0 -24
  146. package/dist/chunks/arrow-turn-up-right.mBRM1THn.BNiuRqzk.js +0 -24
  147. package/dist/chunks/arrow-up-circle.Bzu19hQF.aerjnsXO.js +0 -24
  148. package/dist/chunks/arrow-up-left.IRrqyawV.CYNpIPVM.js +0 -24
  149. package/dist/chunks/arrow-up-on-square-stack.C1q8upHF.BtGNYi9R.js +0 -24
  150. package/dist/chunks/arrow-up-on-square.Zzd3wPoG.DSV_2koo.js +0 -24
  151. package/dist/chunks/arrow-up-right.BbJO1c1E.CgNQXpr2.js +0 -24
  152. package/dist/chunks/arrow-up-tray.BYRIGMnv.DVLg9Kkw.js +0 -24
  153. package/dist/chunks/arrow-up.DlpZOcZ-.Dc_qfm_w.js +0 -24
  154. package/dist/chunks/arrow-uturn-down.R4GNIFWx.1xJeI9TW.js +0 -24
  155. package/dist/chunks/arrow-uturn-left.C1uMohdz.DQroNRfS.js +0 -24
  156. package/dist/chunks/arrow-uturn-right.OoQi1rgb.D4ddYi69.js +0 -24
  157. package/dist/chunks/arrow-uturn-up.CA4h-qqY.CRk_dwWh.js +0 -24
  158. package/dist/chunks/arrows-pointing-in.BxJHq5jK.GkaFX_uo.js +0 -24
  159. package/dist/chunks/arrows-pointing-out.DSyAjelZ.DBsKw4zk.js +0 -24
  160. package/dist/chunks/arrows-right-left.CDFOwlcC.QpbG2nK3.js +0 -24
  161. package/dist/chunks/arrows-up-down.CzfSf__L.DQ5gcMh8.js +0 -24
  162. package/dist/chunks/at-symbol.DaUFyuwg.FAKonxFg.js +0 -24
  163. package/dist/chunks/backspace.Cu9cbNxd.DcCOHSU3.js +0 -24
  164. package/dist/chunks/backward.B68JN4JS.CqwNvpdK.js +0 -24
  165. package/dist/chunks/banknotes.Dz4gb6DH.Bc_vmzxh.js +0 -24
  166. package/dist/chunks/bars-2.C0E0O7Qs.BkkB9qGT.js +0 -24
  167. package/dist/chunks/bars-3-bottom-left.DKFMX51P.C0SPJDh6.js +0 -24
  168. package/dist/chunks/bars-3-bottom-right.Ct1xrw2s.KKvQgup3.js +0 -24
  169. package/dist/chunks/bars-3-center-left.DjUpkdr4.DbP3YQA5.js +0 -24
  170. package/dist/chunks/bars-3.B-K8M_78.Cf4kHUcq.js +0 -24
  171. package/dist/chunks/bars-4.BEt3xG4t.CUkKbYOi.js +0 -24
  172. package/dist/chunks/bars-arrow-down.CfQGLJeK.cH_4-4i2.js +0 -24
  173. package/dist/chunks/bars-arrow-up.CNsLQ8yw.Cwfjtvt4.js +0 -24
  174. package/dist/chunks/battery-0.C_-hFpYX.BSF335Bw.js +0 -24
  175. package/dist/chunks/battery-100.B69VsGq_.6MJf6W8Q.js +0 -24
  176. package/dist/chunks/battery-50.1CCBNwk2.xCj7wvTy.js +0 -24
  177. package/dist/chunks/beaker.DFKLDGeW.21Nm6WlZ.js +0 -24
  178. package/dist/chunks/bell-alert.BbDqk2az.D3ABDQ-w.js +0 -24
  179. package/dist/chunks/bell-slash.C3bKvJAV.n68SmjIt.js +0 -24
  180. package/dist/chunks/bell-snooze.C2COKl8x.Bca4lBpS.js +0 -24
  181. package/dist/chunks/bell.Fm9I5urF.DMLNQRjv.js +0 -24
  182. package/dist/chunks/bold.BDPvVUAR.BvlPriBT.js +0 -23
  183. package/dist/chunks/bolt-slash.DZlEBjB4.CEL1Y-CI.js +0 -24
  184. package/dist/chunks/bolt.B8RYziBX.ydwrTz2s.js +0 -24
  185. package/dist/chunks/book-open.CWUGLre3.DXKaHSLM.js +0 -24
  186. package/dist/chunks/bookmark-slash.Ff--gHir.ClEojQnD.js +0 -24
  187. package/dist/chunks/bookmark-square.CJBzX9qk.kdKOPQ-6.js +0 -24
  188. package/dist/chunks/bookmark.Cb2OSlaK.C3oubrJL.js +0 -24
  189. package/dist/chunks/briefcase.CTgTVSEh.DX78R1hk.js +0 -24
  190. package/dist/chunks/bug-ant.B0vPk3_N.Ct6xqXqe.js +0 -24
  191. package/dist/chunks/building-library.BqdrL-Ec.CA7EOKpn.js +0 -24
  192. package/dist/chunks/building-office-2.C1qF28CI.BTj9K19P.js +0 -24
  193. package/dist/chunks/building-office.BR20ANeD.DcYLUjuP.js +0 -24
  194. package/dist/chunks/building-storefront.D_Lbpsda.BBHRe1sf.js +0 -24
  195. package/dist/chunks/cake.Bvc4oe_S.etQ39ySd.js +0 -24
  196. package/dist/chunks/calculator.TIoQepn_.DCacd6Vr.js +0 -24
  197. package/dist/chunks/calendar-date-range.Dy5vs7S_.D2iryGH7.js +0 -24
  198. package/dist/chunks/calendar-days.oMae6t-4.KdXSppPh.js +0 -24
  199. package/dist/chunks/calendar.DxxJBJoK.CeJ8fSPb.js +0 -24
  200. package/dist/chunks/camera.Cm_7RSqq.B2qog63I.js +0 -31
  201. package/dist/chunks/chart-bar-square.C_56q4ax.D88dnWFr.js +0 -24
  202. package/dist/chunks/chart-bar.CR-2VE6U.BpP0YDjf.js +0 -24
  203. package/dist/chunks/chart-pie.CRPh8b79.DKBryPfA.js +0 -31
  204. package/dist/chunks/chat-bubble-bottom-center-text.ChYHSzWk.Bg8ClnIa.js +0 -24
  205. package/dist/chunks/chat-bubble-bottom-center.BTTqABms.D9d0N1iO.js +0 -24
  206. package/dist/chunks/chat-bubble-left-ellipsis.WSEjQ7jL.CjqH2if2.js +0 -24
  207. package/dist/chunks/chat-bubble-left-right.DqOV8vN_.BKm2s-Hz.js +0 -24
  208. package/dist/chunks/chat-bubble-left.BvdvHHlA.zR-JhdYC.js +0 -24
  209. package/dist/chunks/chat-bubble-oval-left-ellipsis.CpHCuPeS.r5W8LOR8.js +0 -24
  210. package/dist/chunks/chat-bubble-oval-left.CdqaR91h.BW9JRF8r.js +0 -24
  211. package/dist/chunks/check-badge.GjHXGEG0.C_oOCt78.js +0 -24
  212. package/dist/chunks/check-circle.CFcKgPZ4.DfY78EtL.js +0 -24
  213. package/dist/chunks/check.DfYjeOVQ.DXNsuRna.js +0 -24
  214. package/dist/chunks/chevron-double-down.CZMayNS1.CisfSsZ8.js +0 -24
  215. package/dist/chunks/chevron-double-left.De8TBs-I.DAucus_w.js +0 -24
  216. package/dist/chunks/chevron-double-right.XnTrUsod.Cuu5xoTt.js +0 -24
  217. package/dist/chunks/chevron-double-up.F7fkhaor.DRJWwQ9F.js +0 -31
  218. package/dist/chunks/chevron-down.ChGfmxD1.CQ7rtF0T.js +0 -24
  219. package/dist/chunks/chevron-left.CTBM8oHi.Ba3U4jcW.js +0 -24
  220. package/dist/chunks/chevron-right.BXTR7Es5.C6KI-hWC.js +0 -24
  221. package/dist/chunks/chevron-up-down.C7-HMAjy.DKw8M2-I.js +0 -24
  222. package/dist/chunks/chevron-up.cK7QDv75.B2N-Hk-6.js +0 -24
  223. package/dist/chunks/circle-stack.BnyTq7sI.1XtJbY6M.js +0 -24
  224. package/dist/chunks/clipboard-document-check.CJ3xBd7t.Br9n89F9.js +0 -24
  225. package/dist/chunks/clipboard-document-list.CF1likOV.D3KAtz_z.js +0 -24
  226. package/dist/chunks/clipboard-document.CdTKuGSv.ChOrKMSS.js +0 -24
  227. package/dist/chunks/clipboard.CzjWQfRH.Da-cebFK.js +0 -24
  228. package/dist/chunks/clock.NNdb3vyA.D3jUXhQ7.js +0 -24
  229. package/dist/chunks/cloud-arrow-down.CvtCNIxh.D1aF62k3.js +0 -24
  230. package/dist/chunks/cloud-arrow-up.D1JeGPbq.C4jLYHme.js +0 -24
  231. package/dist/chunks/cloud.C9fdU5-X.cydYlCh2.js +0 -24
  232. package/dist/chunks/code-bracket-square.BsQyTz1s.BeZZZPk2.js +0 -24
  233. package/dist/chunks/code-bracket.DJDL79-i.B4G6-VO6.js +0 -24
  234. package/dist/chunks/cog-6-tooth.BbV5JYl1.DeTgzUXG.js +0 -31
  235. package/dist/chunks/cog-8-tooth.BnBTLB6M.D8tH-0GQ.js +0 -31
  236. package/dist/chunks/cog.BXgqaz3X.CF2Pe_yh.js +0 -24
  237. package/dist/chunks/command-line.w_Y9_Kkc.BMaD58fF.js +0 -24
  238. package/dist/chunks/computer-desktop.BpRzP4fc.BWRlZKsP.js +0 -24
  239. package/dist/chunks/cpu-chip.ho-tmFIn.ClPQmB5Q.js +0 -24
  240. package/dist/chunks/credit-card.DkrZZI4D.ChD3ISF_.js +0 -24
  241. package/dist/chunks/cube-transparent.C8Wdi45T.CgHVrtio.js +0 -24
  242. package/dist/chunks/cube.B9UcKOKF.DVXGNDI0.js +0 -24
  243. package/dist/chunks/currency-bangladeshi.DzhT0-h5.BhxC0NCe.js +0 -24
  244. package/dist/chunks/currency-dollar.Bfi6fPEz.DxEvUH91.js +0 -24
  245. package/dist/chunks/currency-euro.Jpiq8P6z.C5ljNb5d.js +0 -24
  246. package/dist/chunks/currency-pound.DrqWKbpM.BxOh3Nry.js +0 -24
  247. package/dist/chunks/currency-rupee.DHxnpaCI.Ynrf76Aj.js +0 -24
  248. package/dist/chunks/currency-yen.DQVa07WN.DdpYfRy5.js +0 -24
  249. package/dist/chunks/cursor-arrow-rays.MVP12F6C.hM5N0ZS3.js +0 -24
  250. package/dist/chunks/cursor-arrow-ripple.xLXix2uM.UbRX2pFw.js +0 -24
  251. package/dist/chunks/device-phone-mobile.B-57CfH5.D6VQ256l.js +0 -24
  252. package/dist/chunks/device-tablet.Bjsa72o7.CH-OVJkh.js +0 -24
  253. package/dist/chunks/divide.CV4gt445.Cv9KyNuJ.js +0 -24
  254. package/dist/chunks/document-arrow-down.B_57Gtno.BlZeqf-M.js +0 -24
  255. package/dist/chunks/document-arrow-up.BF_OVDJs.CbEXCmN0.js +0 -24
  256. package/dist/chunks/document-chart-bar.B46OY9CL.CIBAYVab.js +0 -24
  257. package/dist/chunks/document-check.CvLYBdnm.DluZSYpL.js +0 -24
  258. package/dist/chunks/document-currency-bangladeshi.HbXz9Sub.Cew_CE25.js +0 -24
  259. package/dist/chunks/document-currency-dollar.DPjKxFMa.jXB-YTux.js +0 -24
  260. package/dist/chunks/document-currency-euro.C-L5djvR.C9UJW2-n.js +0 -24
  261. package/dist/chunks/document-currency-pound.BzcYNgGa.CgLXYWAs.js +0 -24
  262. package/dist/chunks/document-currency-rupee.DescAEsg.CzFKJayN.js +0 -24
  263. package/dist/chunks/document-currency-yen.CyrkAYT6.B16hPkmM.js +0 -24
  264. package/dist/chunks/document-duplicate.D7vGJG_8.CIombGpo.js +0 -24
  265. package/dist/chunks/document-magnifying-glass.Burq7Xn2.QtA02zrk.js +0 -24
  266. package/dist/chunks/document-minus.DxGQQWCr.kiSQpPdH.js +0 -24
  267. package/dist/chunks/document-plus.DKk5zAwV.H3B6AI11.js +0 -24
  268. package/dist/chunks/document-text.CSCb2U2T.ZDLRpT-o.js +0 -24
  269. package/dist/chunks/document.CS0Ohrgt.DE8cSIrm.js +0 -24
  270. package/dist/chunks/ellipsis-horizontal-circle.BFOXQi09.CTDaeIGM.js +0 -24
  271. package/dist/chunks/ellipsis-horizontal.DqhpkTUz.CclJBCQG.js +0 -24
  272. package/dist/chunks/ellipsis-vertical.B8W0CqqN.B7I6k_qQ.js +0 -24
  273. package/dist/chunks/envelope-open.BQygUrrv.LFK3EzRF.js +0 -24
  274. package/dist/chunks/envelope.DFplr4Iv.Da66rxN8.js +0 -24
  275. package/dist/chunks/equals.Y4339RW6.CKookNbc.js +0 -24
  276. package/dist/chunks/exclamation-circle.PMllX_sR.BiDbdO8o.js +0 -24
  277. package/dist/chunks/exclamation-triangle.DP_ZdqKK.D-pRZiWC.js +0 -24
  278. package/dist/chunks/eye-dropper.BB7xFmZf.CfuOHkRE.js +0 -24
  279. package/dist/chunks/eye-slash.B-Q7zAl9.Z-QG3_NS.js +0 -24
  280. package/dist/chunks/eye.rnBIUryK.CTGdXztX.js +0 -31
  281. package/dist/chunks/face-frown.BdZUKORe.CTMmkA6s.js +0 -24
  282. package/dist/chunks/face-smile.BgHmgpsD.BD0FSBwY.js +0 -24
  283. package/dist/chunks/film.CvtqcSvO.fo_u8ciz.js +0 -24
  284. package/dist/chunks/finger-print.BalGxdl5.lX4SOFcC.js +0 -24
  285. package/dist/chunks/fire.C2S-dlHW.D_I1XNHh.js +0 -31
  286. package/dist/chunks/flag.BDHI8kIc.9T2ghrYf.js +0 -24
  287. package/dist/chunks/folder-arrow-down.CMe8l5qs.CY2PCaTR.js +0 -24
  288. package/dist/chunks/folder-minus.BIP4kiBI.CVSaimPJ.js +0 -24
  289. package/dist/chunks/folder-open.vCqZvh13.CVTeu5UO.js +0 -24
  290. package/dist/chunks/folder-plus.UKgqnCMI.BvhuTxMF.js +0 -24
  291. package/dist/chunks/folder.VY6d7M0v.BjpXSXu9.js +0 -24
  292. package/dist/chunks/fork.Bx0SP5G0.B7BHLQyz.js +0 -49
  293. package/dist/chunks/forward.CJadSay_.BBS11cS_.js +0 -24
  294. package/dist/chunks/funnel.CI1X4xTV.C2sbt1gJ.js +0 -24
  295. package/dist/chunks/gif.3w8BBVap.p3RkEv10.js +0 -24
  296. package/dist/chunks/gift-top.DGrJVe5T.LHgvzIEw.js +0 -24
  297. package/dist/chunks/gift.BdjKoMjg.Bf_lfrxv.js +0 -24
  298. package/dist/chunks/github.DR-YREFz.BKzaMPzV.js +0 -20
  299. package/dist/chunks/globe-alt.Ci-4WkuA.Df2W4RpY.js +0 -24
  300. package/dist/chunks/globe-americas.8k4TjYg9.DwAgObeI.js +0 -24
  301. package/dist/chunks/globe-asia-australia.CJy-S58s.BsXl4X35.js +0 -24
  302. package/dist/chunks/globe-europe-africa.Ch0apA4Z.ChCxgvsh.js +0 -24
  303. package/dist/chunks/h1.B0UxaUz3.B-fMNckN.js +0 -24
  304. package/dist/chunks/h2.CoDly_Rk.xn2P59Pu.js +0 -24
  305. package/dist/chunks/h3.BiPu_1GK.BtUGrtqm.js +0 -24
  306. package/dist/chunks/hand-raised.BibTyl03.Bmxt1b7s.js +0 -24
  307. package/dist/chunks/hand-thumb-down.BJoc9FWD.CTxVd9E4.js +0 -24
  308. package/dist/chunks/hand-thumb-up.BZWQJYwr.Byh64TmW.js +0 -24
  309. package/dist/chunks/hashtag.EamZCy49.-5GV13nB.js +0 -24
  310. package/dist/chunks/heart.DvH7fa-0.DC7zVVeb.js +0 -24
  311. package/dist/chunks/home-modern.L4UFeQLe.Q-aoULM-.js +0 -24
  312. package/dist/chunks/home.QELZheLi.CQ5VBdS-.js +0 -24
  313. package/dist/chunks/identification.CU9KU-bX.CFRzYkwU.js +0 -24
  314. package/dist/chunks/inbox-arrow-down.6HTSO1kx.DaoUuGHv.js +0 -24
  315. package/dist/chunks/inbox-stack.BfdiokBq.mWxjLRtV.js +0 -24
  316. package/dist/chunks/inbox.Biazzhd4.cuiJovdp.js +0 -24
  317. package/dist/chunks/index.CvKh762h.js +0 -352
  318. package/dist/chunks/information-circle.yhJPMoUQ.CkqMaCTJ.js +0 -24
  319. package/dist/chunks/italic.njlz_SwH.B8t1zdyt.js +0 -24
  320. package/dist/chunks/key.C8y1z_Nx.CWRIUYtz.js +0 -24
  321. package/dist/chunks/language.1Xs8PuP5.eK68tCI2.js +0 -24
  322. package/dist/chunks/lifebuoy.uldI5FjH.ttPYeOpt.js +0 -24
  323. package/dist/chunks/light-bulb.BnZMjrix.Nn8bb3uA.js +0 -24
  324. package/dist/chunks/link-slash.DYM_8hTp.DbbqWpYf.js +0 -24
  325. package/dist/chunks/link._zvxE-ZN.DCRS1Nhm.js +0 -24
  326. package/dist/chunks/list-bullet.Ck8i-zl1.DYTtynEe.js +0 -24
  327. package/dist/chunks/lock-closed.Do5wxxfB.BoHZR_Cx.js +0 -24
  328. package/dist/chunks/lock-open.DmUSVzU7.CIioMjR4.js +0 -24
  329. package/dist/chunks/magnifying-glass-circle.BBKKo-36.D6LZubsX.js +0 -24
  330. package/dist/chunks/magnifying-glass-minus.D1YH2gJK.DtYqNUQw.js +0 -24
  331. package/dist/chunks/magnifying-glass-plus.BgJ8lfbV.BBOa_lQz.js +0 -24
  332. package/dist/chunks/magnifying-glass.Bi8efyWn.BLzbV1BL.js +0 -24
  333. package/dist/chunks/map-pin.Bxbb--MZ.ea0oLEJ4.js +0 -31
  334. package/dist/chunks/map.DRcXyo0s.DMK4_gRD.js +0 -24
  335. package/dist/chunks/megaphone.BTvu-vIj.H3XYCMYF.js +0 -24
  336. package/dist/chunks/microphone.BJqDhEd7.BsJEAG9l.js +0 -24
  337. package/dist/chunks/minus-circle.DX_Wo_R6.CfihDX_c.js +0 -24
  338. package/dist/chunks/minus-small.BdK3wxa2.BruhEWWT.js +0 -24
  339. package/dist/chunks/minus.KSG6SL-A.Ci3tO7z7.js +0 -24
  340. package/dist/chunks/moon.BAqSTWOk.y5qE-JgT.js +0 -24
  341. package/dist/chunks/musical-note.Erx2eYZM.CeYcRysR.js +0 -24
  342. package/dist/chunks/newspaper.BxEeFWo5.Caqcj866.js +0 -24
  343. package/dist/chunks/no-image.G9oAqLYN.QYfh20At.js +0 -18
  344. package/dist/chunks/no-symbol.v1ZxT7PS.CLiEtcjA.js +0 -24
  345. package/dist/chunks/numbered-list.D4--Brg5.DPb7JWAD.js +0 -24
  346. package/dist/chunks/paint-brush.9Oq01j7X.BaQOU4-k.js +0 -24
  347. package/dist/chunks/paper-airplane.DKx_Ww6M.Dx_A6-r1.js +0 -24
  348. package/dist/chunks/paper-clip.Cd3ICjAc.Di3lmXzN.js +0 -24
  349. package/dist/chunks/pause-circle.Dyaqta5w.Bf5lVO6T.js +0 -24
  350. package/dist/chunks/pause.Xl-ti251.BrVoKvOq.js +0 -24
  351. package/dist/chunks/pencil-square.83G17jv5.BieHF6-5.js +0 -24
  352. package/dist/chunks/pencil.Bv-2uNMw.B6t0Zv85.js +0 -24
  353. package/dist/chunks/percent-badge.BR-COyYt.D9uZiuV4.js +0 -24
  354. package/dist/chunks/phone-arrow-down-left.bgYNFdYw.DlXuTKyQ.js +0 -24
  355. package/dist/chunks/phone-arrow-up-right.DL8xnmCp.B6ny9DGc.js +0 -24
  356. package/dist/chunks/phone-x-mark.EJ8g8Io4.iD9I0F8O.js +0 -24
  357. package/dist/chunks/phone.C9HcOJV4.DR_ydb9P.js +0 -24
  358. package/dist/chunks/photo.D2i5ltv-.Bx4bun8k.js +0 -24
  359. package/dist/chunks/play-circle.sQgQYbxL.DIVhJ_VT.js +0 -31
  360. package/dist/chunks/play-pause.7fATndsv.BlbQnYtP.js +0 -24
  361. package/dist/chunks/play.DPQ51d76.CXxYnamK.js +0 -24
  362. package/dist/chunks/plus-circle.t0rIMK17.CJuEO_hV.js +0 -24
  363. package/dist/chunks/plus-small.q2_UTnSJ.D00Lo6Gm.js +0 -24
  364. package/dist/chunks/plus.B4eFPhg5.Bjb51_89.js +0 -24
  365. package/dist/chunks/power.DbnsGjcP.ADCLCnp1.js +0 -24
  366. package/dist/chunks/presentation-chart-bar.qOHPrVoA.DzoUJVBk.js +0 -24
  367. package/dist/chunks/presentation-chart-line.kt2UcfXU.ByalT4af.js +0 -24
  368. package/dist/chunks/printer.DgYbu-oZ.oyHdK_Er.js +0 -24
  369. package/dist/chunks/puzzle-piece.DPVPnROW.Dj5Pkwqw.js +0 -24
  370. package/dist/chunks/qr-code.Cz6_gY5W.BRQos2fl.js +0 -31
  371. package/dist/chunks/question-mark-circle.BI3Pj1lM.CUkVvnjz.js +0 -24
  372. package/dist/chunks/queue-list.BTtd9gV_.BZqvXCX1.js +0 -24
  373. package/dist/chunks/radio.NXQa70KZ.DcLeSUt8.js +0 -24
  374. package/dist/chunks/receipt-percent.BEffIYGJ.C5vDjent.js +0 -24
  375. package/dist/chunks/receipt-refund.hLJiXRl-.BvT1RelP.js +0 -24
  376. package/dist/chunks/rectangle-group.DUnjEoiP.9pML-9-S.js +0 -24
  377. package/dist/chunks/rectangle-stack.DxfbSUKM.BS0h3Qu8.js +0 -24
  378. package/dist/chunks/rocket-launch.X-OfcjiP.BRHh-FkZ.js +0 -24
  379. package/dist/chunks/rss.BLvK5jPr.CckNH6AG.js +0 -24
  380. package/dist/chunks/scale.DEEYJ6Zk.CXnrDRjc.js +0 -24
  381. package/dist/chunks/scissors.Bu_6BaOX.CgCRjlsD.js +0 -24
  382. package/dist/chunks/server-stack.DmncQkqn.DlXBXJ68.js +0 -24
  383. package/dist/chunks/server.LyXBRSxY.DiraGD0N.js +0 -24
  384. package/dist/chunks/share.Cf9OjBgL.RQldJRZ9.js +0 -24
  385. package/dist/chunks/shield-check.VQpLzd2v.Bv6XREpP.js +0 -24
  386. package/dist/chunks/shield-exclamation.Be0w3_jk.Czs5h8N1.js +0 -24
  387. package/dist/chunks/shopping-bag.CmqEq0ln.Co-ENH4J.js +0 -24
  388. package/dist/chunks/shopping-cart.sDo0rmyp.Dwxg9WFh.js +0 -24
  389. package/dist/chunks/signal-slash.Cj_p1Nk-.Bos1dz3M.js +0 -24
  390. package/dist/chunks/signal.CDdRnntO.zs66muqE.js +0 -24
  391. package/dist/chunks/slash.DLlsJ67p.BovzBFnY.js +0 -24
  392. package/dist/chunks/sparkles.Cl4CxIOA.CJtVBamV.js +0 -24
  393. package/dist/chunks/speaker-wave.Dhz2ha5o.BKHqvdzL.js +0 -24
  394. package/dist/chunks/speaker-x-mark.D5bJpGdc.B-98J4TH.js +0 -24
  395. package/dist/chunks/square-2-stack.B_K3e5Xo.BpuWW3zQ.js +0 -24
  396. package/dist/chunks/square-3-stack-3d.kEZ7HRU8.u3pEG_dB.js +0 -24
  397. package/dist/chunks/squares-2x2.DbpIJWWH.czohOArw.js +0 -24
  398. package/dist/chunks/squares-plus.DJoqsZG-.C56wwQo6.js +0 -24
  399. package/dist/chunks/star-solid.ith3udUr.fI6COBY6.js +0 -22
  400. package/dist/chunks/star.BOm1sCet.CrlFtkIH.js +0 -24
  401. package/dist/chunks/stop-circle.i8k9ENGo.Bvg3kAtp.js +0 -31
  402. package/dist/chunks/stop.BvbL0z5G.BzZa9cz4.js +0 -24
  403. package/dist/chunks/strikethrough.D9IxMEze.CG0o3e8f.js +0 -24
  404. package/dist/chunks/sun.DtlkYkWH.BY6FsaIr.js +0 -24
  405. package/dist/chunks/swatch.BQEbGG5v.mzOiKL2U.js +0 -24
  406. package/dist/chunks/table-cells.DgYgkJao.D_ev8kjA.js +0 -24
  407. package/dist/chunks/tag.9pi2-WVW.AW6frX03.js +0 -31
  408. package/dist/chunks/throttle.DN8ARw0a.js +0 -11
  409. package/dist/chunks/ticket.CoeaVN1f.D8B_ZCyj.js +0 -24
  410. package/dist/chunks/trash.CKFg-ylA.BeH6WFxu.js +0 -24
  411. package/dist/chunks/trophy.DqS7is9J.BqpYwRUm.js +0 -24
  412. package/dist/chunks/truck.CiPiMFO5.I1lYcatr.js +0 -24
  413. package/dist/chunks/tv.FRI46IJL.DYLIUXzl.js +0 -24
  414. package/dist/chunks/underline.CTS7x7HZ.BTMyDX0M.js +0 -24
  415. package/dist/chunks/user-circle.jg7OpkHK.BzdqSzzl.js +0 -24
  416. package/dist/chunks/user-group.ZzJJeNOR.DqrCBO8z.js +0 -24
  417. package/dist/chunks/user-minus.CFpE7tJo.Cc-_xIha.js +0 -24
  418. package/dist/chunks/user-plus.56xx_RZF.DeJBUlvA.js +0 -24
  419. package/dist/chunks/user.BHnHyDaq.DDyUV-u5.js +0 -24
  420. package/dist/chunks/users.CcE72INP.DbTawkoy.js +0 -24
  421. package/dist/chunks/variable.D2aSg3jI.B9JN_cwv.js +0 -24
  422. package/dist/chunks/video-camera-slash.BwxNb0cm.SnSS7S5P.js +0 -24
  423. package/dist/chunks/video-camera.CoJgwP4F.BmMWt0vs.js +0 -24
  424. package/dist/chunks/view-columns.LoFVFzBR.CIMGv7mf.js +0 -24
  425. package/dist/chunks/viewfinder-circle.CaQlvTWC.CJVVM5_n.js +0 -24
  426. package/dist/chunks/wallet.CqM_mibw.kwMG5OEh.js +0 -24
  427. package/dist/chunks/wifi.DUdIKgQN.DqZ0nPHO.js +0 -24
  428. package/dist/chunks/window.BeFPU0ZR.Cqieba0K.js +0 -24
  429. package/dist/chunks/wrench-screwdriver.BcMJDiuu.Ces3a6-S.js +0 -24
  430. package/dist/chunks/wrench.DhPW3HZx.CNeKEI4i.js +0 -31
  431. package/dist/chunks/x-circle.Bv0-dC8L.BikPLDPw.js +0 -24
  432. package/dist/chunks/x-mark.CTalOvvY.js +0 -23
  433. package/dist/chunks/x-mark.umAR9tn5.iu8PJ4nS.js +0 -24
  434. package/dist/types/composables/useFormValidator/utils.d.ts +0 -116
@@ -14,11 +14,11 @@ import { _ } from "../chunks/MazChart.vue_vue_type_script_setup_true_lang.JSYXGy
14
14
  import { default as default14 } from "./MazCheckbox.js";
15
15
  import { default as default15 } from "./MazChecklist.js";
16
16
  import { default as default16 } from "./MazCircularProgressBar.js";
17
- import { M } from "../chunks/MazDatePicker.Bgd0WwZk.js";
17
+ import { M } from "../chunks/MazDatePicker.EVP68BQf.js";
18
18
  import { default as default17 } from "./MazDialog.js";
19
19
  import { _ as _2, u } from "../chunks/MazDialogPromise.vue_vue_type_script_setup_true_lang.BQvDEofz.js";
20
20
  import { default as default18 } from "./MazDrawer.js";
21
- import { _ as _3 } from "../chunks/MazDropdown.vue_vue_type_style_index_0_lang.WRjG5bff.js";
21
+ import { _ as _3 } from "../chunks/MazDropdown.vue_vue_type_style_index_0_lang.DjPJ9-gt.js";
22
22
  import { default as default19 } from "./MazDropzone.js";
23
23
  import { default as default20 } from "./MazExpandAnimation.js";
24
24
  import { default as default21 } from "./MazFullscreenLoader.js";
@@ -26,9 +26,9 @@ import { default as default22 } from "./MazGallery.js";
26
26
  import { default as default23 } from "./MazIcon.js";
27
27
  import { default as default24 } from "./MazInput.js";
28
28
  import { default as default25 } from "./MazInputCode.js";
29
- import { _ as _4 } from "../chunks/MazInputNumber.vue_vue_type_style_index_0_lang.BUOLoXtV.js";
29
+ import { _ as _4 } from "../chunks/MazInputNumber.vue_vue_type_style_index_0_lang.B6DYpHfi.js";
30
30
  import { M as M2 } from "../chunks/MazInputPhoneNumber.B7mxCHgU.js";
31
- import { _ as _5 } from "../chunks/MazInputPrice.vue_vue_type_script_setup_true_lang.CT1Y2-_T.js";
31
+ import { _ as _5 } from "../chunks/MazInputPrice.vue_vue_type_script_setup_true_lang.BA6TDX-T.js";
32
32
  import { default as default26 } from "./MazInputTags.js";
33
33
  import { default as default27 } from "./MazLazyImg.js";
34
34
  import { default as default28 } from "./MazLink.js";
@@ -44,7 +44,7 @@ import { default as default37 } from "./MazSelectCountry.js";
44
44
  import { default as default38 } from "./MazSlider.js";
45
45
  import { default as default39 } from "./MazSpinner.js";
46
46
  import { default as default40 } from "./MazStepper.js";
47
- import { _ as _6 } from "../chunks/MazSwitch.vue_vue_type_style_index_0_lang.DQE0vFhe.js";
47
+ import { _ as _6 } from "../chunks/MazSwitch.vue_vue_type_style_index_0_lang.CU43Y1ky.js";
48
48
  import { default as default41 } from "./MazTable.js";
49
49
  import { default as default42 } from "./MazTableCell.js";
50
50
  import { default as default43 } from "./MazTableRow.js";
@@ -7,6 +7,12 @@ const bcp47Codes = ["af-ZA", "sq-AL", "ar-DZ", "ar-BH", "ar-EG", "ar-IQ", "ar-JO
7
7
  style: "long",
8
8
  localeMatcher: "lookup"
9
9
  }, displayNamesCache = /* @__PURE__ */ new Map();
10
+ let cacheCleanupTimer = null;
11
+ function scheduleCacheCleanup() {
12
+ cacheCleanupTimer && clearTimeout(cacheCleanupTimer), cacheCleanupTimer = setTimeout(() => {
13
+ displayNamesCache.size > 50 && displayNamesCache.clear(), cacheCleanupTimer = null;
14
+ }, 5 * 60 * 1e3);
15
+ }
10
16
  function isSameLanguageThanCode(language, code) {
11
17
  return !language || language?.toLocaleLowerCase() === code.toLocaleLowerCase();
12
18
  }
@@ -21,7 +27,7 @@ function getDisplayNamesInstance(locale, options = DEFAULT_DISPLAY_NAMES_OPTIONS
21
27
  ...options,
22
28
  type: options.type ?? DEFAULT_DISPLAY_NAMES_OPTIONS.type
23
29
  });
24
- displayNamesCache.set(cacheKey, instance);
30
+ displayNamesCache.set(cacheKey, instance), scheduleCacheCleanup();
25
31
  } catch (error) {
26
32
  return console.warn(`[maz-ui] (useDisplayNames) Failed to create DisplayNames instance for locale ${locale}:`, error), null;
27
33
  }
@@ -1,5 +1,4 @@
1
- import { c as checkAvailability } from "../chunks/checkAvailability.aTpZidex.js";
2
- import { e as getContext, f as fieldHasValidation, i as updateFieldState, j as isEqual, k as setFieldValidationState, l as getValidationEvents, d as hasModeIncludes, r as removeEventFromInteractiveElements, m as handleFieldBlur, n as findInteractiveElements, o as addEventToInteractiveElements } from "../chunks/utils.D9NiqfdV.js";
1
+ import { e as getContext, f as fieldHasValidation, i as updateFieldState, j as isEqual, k as setFieldValidationState, l as getValidationEvents, h as hasModeIncludes, r as removeEventFromInteractiveElements, m as findInteractiveElements, n as addEventToInteractiveElements, o as handleFieldBlur } from "../chunks/dom-events.CvkK8Xn2.js";
3
2
  import { computed, onMounted, onUnmounted } from "vue";
4
3
  import { useFreezeValue } from "./useFreezeValue.js";
5
4
  function useFormField(name, options) {
@@ -13,17 +12,17 @@ function useFormField(name, options) {
13
12
  internalSchema,
14
13
  errorMessages,
15
14
  isSubmitted
16
- } = getContext(opts.formIdentifier, "useFormField"), fieldMode = fieldHasValidation(name, internalSchema.value) ? options?.mode ?? formOptions.mode : void 0;
17
- opts.mode = fieldMode;
15
+ } = getContext(opts.formIdentifier, "useFormField"), finalOpts = opts, fieldMode = fieldHasValidation(name, internalSchema.value) ? options?.mode ?? formOptions.mode : void 0;
16
+ finalOpts.mode = fieldMode;
18
17
  const fieldState = computed(() => fieldsStates.value[name]);
19
18
  if (fieldsStates.value[name] = updateFieldState({
20
19
  name,
21
20
  fieldState: fieldState.value,
22
21
  payload: payload.value,
23
22
  schema: internalSchema.value,
24
- options: { ...formOptions, ...opts }
25
- }), opts.defaultValue !== void 0 && !isEqual(payload.value[name], opts.defaultValue)) {
26
- const initialValue = opts.defaultValue;
23
+ options: { ...formOptions, ...finalOpts }
24
+ }), finalOpts.defaultValue !== void 0 && !isEqual(payload.value[name], finalOpts.defaultValue)) {
25
+ const initialValue = finalOpts.defaultValue;
27
26
  payload.value[name] = initialValue, fieldsStates.value[name].initialValue = useFreezeValue(initialValue);
28
27
  }
29
28
  fieldMode && setFieldValidationState({
@@ -45,27 +44,26 @@ function useFormField(name, options) {
45
44
  }
46
45
  const validationEvents = computed(
47
46
  () => getValidationEvents({
48
- hasRef: !!opts.ref?.value,
47
+ hasRef: !!finalOpts.ref?.value,
49
48
  onBlur,
50
49
  fieldState: fieldState.value
51
50
  })
52
51
  );
53
- if (opts.ref && hasModeIncludes(["eager", "blur", "progressive"], fieldMode)) {
52
+ if (finalOpts.ref && fieldMode && hasModeIncludes(["eager", "blur", "progressive"], fieldMode)) {
54
53
  let interactiveElements = [];
55
54
  const handleInteractiveElements = (element) => {
56
- interactiveElements = findInteractiveElements(element), addEventToInteractiveElements({
55
+ interactiveElements.length > 0 && removeEventFromInteractiveElements({
56
+ interactiveElements,
57
+ onBlur
58
+ }), interactiveElements = findInteractiveElements(element), addEventToInteractiveElements({
57
59
  interactiveElements,
58
60
  onBlur,
59
61
  mode: fieldMode
60
62
  });
61
63
  };
62
64
  onMounted(() => {
63
- checkAvailability(() => opts.ref?.value, (element) => {
64
- const interactiveElement = element instanceof HTMLElement ? element : element?.$el;
65
- interactiveElement && handleInteractiveElements(interactiveElement);
66
- }, {
67
- errorMessage: `[maz-ui](useFormField) No element found for ref ${opts.ref} for field ${name}`
68
- });
65
+ const element = finalOpts.ref?.value, elementToBind = element instanceof HTMLElement ? element : element?.$el;
66
+ elementToBind instanceof HTMLElement ? handleInteractiveElements(elementToBind) : console.warn(`[maz-ui](useFormField) No element found for ref in field '${String(name)}'. Make sure the ref is properly bound to an HTMLElement or Vue component (form identifier: ${formOptions.identifier})`);
69
67
  }), onUnmounted(() => {
70
68
  removeEventFromInteractiveElements({
71
69
  interactiveElements,
@@ -87,8 +85,7 @@ function useFormField(name, options) {
87
85
  get: () => payload.value[name],
88
86
  set: (value) => payload.value[name] = value
89
87
  }),
90
- validationEvents,
91
- onBlur
88
+ validationEvents
92
89
  };
93
90
  }
94
91
  export {
@@ -1,5 +1,20 @@
1
- import { ref, computed, watch, provide, nextTick } from "vue";
2
- import { g as getInstance, a as getFieldsStates, b as getFieldsErrors, c as getErrorMessages, u as updateFieldsStates, v as validateForm, C as CONFIG, s as scrollToError, h as handleFieldInput, d as hasModeIncludes } from "../chunks/utils.D9NiqfdV.js";
1
+ import { ref, toValue, computed, watch, provide, nextTick } from "vue";
2
+ import { g as getInstance, a as getFieldsStates, b as getFieldsErrors, c as getErrorMessages, u as updateFieldsStates, v as validateForm, C as CONFIG, s as scrollToError, h as hasModeIncludes, d as handleFieldInput } from "../chunks/dom-events.CvkK8Xn2.js";
3
+ function createValidationProcessor(fieldsToValidate, fieldsStates, payload, internalSchema, isSubmitted) {
4
+ return () => {
5
+ fieldsToValidate.forEach((name) => {
6
+ const fieldState = fieldsStates.value[name];
7
+ handleFieldInput({
8
+ name,
9
+ fieldState,
10
+ payload: payload.value,
11
+ schema: internalSchema.value,
12
+ isSubmitted: isSubmitted.value,
13
+ forceValidation: !0
14
+ });
15
+ });
16
+ };
17
+ }
3
18
  function useFormValidator({ schema, defaultValues, model, options }) {
4
19
  const instance = getInstance("useFormValidator"), opts = {
5
20
  mode: CONFIG.mode,
@@ -8,7 +23,7 @@ function useFormValidator({ schema, defaultValues, model, options }) {
8
23
  throttledFields: null,
9
24
  identifier: "main-form-validator",
10
25
  ...options
11
- }, internalDefaultValues = ref(defaultValues), payload = ref({ ...internalDefaultValues.value, ...model?.value }), internalSchema = ref(schema), fieldsStates = ref(
26
+ }, internalDefaultValues = ref(toValue(defaultValues)), payload = ref({ ...internalDefaultValues.value, ...model?.value }), internalSchema = ref(toValue(schema)), fieldsStates = ref(
12
27
  getFieldsStates({
13
28
  schema: internalSchema.value,
14
29
  payload: payload.value,
@@ -39,39 +54,37 @@ function useFormValidator({ schema, defaultValues, model, options }) {
39
54
  },
40
55
  { deep: !0 }
41
56
  ), internalValidateForm();
42
- function internalValidateForm(showErrors = opts.mode === "aggressive") {
57
+ function internalValidateForm(setErrors = opts.mode === "aggressive") {
43
58
  return validateForm({
44
59
  fieldsStates: fieldsStates.value,
45
60
  payload: payload.value,
46
61
  schema: internalSchema.value,
47
- showErrors
62
+ setErrors
48
63
  });
49
64
  }
50
- const watchedPayloadStopFunctions = [];
51
- async function addFieldValidationWatch(name) {
52
- await nextTick();
53
- const watchStopFunc = watch(
54
- () => payload.value[name],
55
- () => {
56
- const fieldState = fieldsStates.value[name];
57
- handleFieldInput({
58
- name,
59
- fieldState,
60
- payload: payload.value,
61
- schema: internalSchema.value,
62
- isSubmitted: isSubmitted.value,
63
- forceValidation: hasModeIncludes(["aggressive", "lazy", "progressive"], fieldState.mode)
65
+ let payloadWatchStop = null;
66
+ function setupOptimizedWatch() {
67
+ payloadWatchStop && payloadWatchStop();
68
+ const payloadSnapshot = computed(() => {
69
+ const snapshot = {};
70
+ for (const key of Object.keys(internalSchema.value))
71
+ snapshot[key] = payload.value[key];
72
+ return snapshot;
73
+ });
74
+ payloadWatchStop = watch(
75
+ payloadSnapshot,
76
+ (newSnapshot, oldSnapshot) => {
77
+ const fieldsToValidate = Object.keys(internalSchema.value).filter((name) => {
78
+ const fieldState = fieldsStates.value[name];
79
+ return fieldState && newSnapshot[name] !== oldSnapshot?.[name] && hasModeIncludes(["aggressive", "lazy", "progressive"], fieldState.mode);
64
80
  });
81
+ if (fieldsToValidate.length > 0) {
82
+ const processValidations = createValidationProcessor(fieldsToValidate, fieldsStates, payload, internalSchema, isSubmitted);
83
+ typeof requestIdleCallback < "u" ? requestIdleCallback(processValidations, { timeout: 100 }) : nextTick(processValidations);
84
+ }
65
85
  },
66
- { deep: typeof internalSchema.value[name] == "object" }
86
+ { deep: !0 }
67
87
  );
68
- watchedPayloadStopFunctions.push(watchStopFunc);
69
- }
70
- function addFieldsValidationWatch() {
71
- for (const watchStopFunc of watchedPayloadStopFunctions)
72
- watchStopFunc();
73
- for (const name of Object.keys(internalSchema.value))
74
- addFieldValidationWatch(name);
75
88
  }
76
89
  function handleSubmit(successCallback, enableScrollOrSelector) {
77
90
  return async (event) => {
@@ -96,7 +109,7 @@ function useFormValidator({ schema, defaultValues, model, options }) {
96
109
  errorMessages,
97
110
  isSubmitted
98
111
  };
99
- return instance.formContexts ??= /* @__PURE__ */ new Map(), instance.formContexts.set(opts.identifier, context), provide(opts.identifier, context), addFieldsValidationWatch(), {
112
+ return instance.formContexts ??= /* @__PURE__ */ new Map(), instance.formContexts.set(opts.identifier, context), provide(opts.identifier, context), setupOptimizedWatch(), {
100
113
  identifier: opts.identifier,
101
114
  isDirty,
102
115
  isSubmitting,
package/dist/css/main.css CHANGED
@@ -1 +1 @@
1
- @layer maz-ui-reset, maz-ui-theme, maz-ui-animations, maz-ui-utilities;@layer maz-ui-reset{.m-reset-css,.m-reset-css *,.m-reset-css:after,.m-reset-css:before{border:0 solid;box-sizing:border-box}.m-reset-css button,.m-reset-css:is(button){background-color:inherit;padding:inherit}.m-reset-css button,.m-reset-css input,.m-reset-css optgroup,.m-reset-css select,.m-reset-css textarea,.m-reset-css:is(button),.m-reset-css:is(input),.m-reset-css:is(optgroup),.m-reset-css:is(select),.m-reset-css:is(textarea){color:inherit;font-family:inherit;font-feature-settings:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0}}@layer maz-ui-utilities{:root{--maz-container-padding-mobile:1rem;--maz-container-padding-tablet:2rem;--maz-container-padding-desktop:2.5rem;--maz-container-padding-value:var(--maz-container-padding-mobile);--maz-container-width:calc(100% - var(--maz-container-padding-value)*2);--maz-container-padding:calc(50% - var(--maz-container-width)/2);--maz-container-max-width:1440px}@media only screen and (width >= 1520px){:root{--maz-container-width:var(--maz-container-max-width)}}@media (min-width:576px){:root{--maz-container-padding-value:var(--maz-container-padding-tablet)}}@media (min-width:1024px){:root{--maz-container-padding-value:var(--maz-container-padding-desktop)}}}@layer maz-ui-animations{.maz-scale-enter-active,.maz-scale-leave-active{opacity:1;transition:all .2s cubic-bezier(.4,.52,.26,.9);z-index:1}.maz-scale-enter-from,.maz-scale-leave-to{opacity:.4;transform:scale(0);z-index:1}.maz-scale-fade-enter-active,.maz-scale-fade-leave-active{opacity:1;transition:all .2s cubic-bezier(.4,.52,.26,.9);z-index:1}.maz-scale-fade-enter-from,.maz-scale-fade-leave-to{opacity:0;transform:scale(.5);z-index:1}.maz-scale-loading-enter-active,.maz-scale-loading-leave-active{opacity:1;transition:all .5s cubic-bezier(.4,.52,.26,.9)}.maz-scale-loading-enter-active .app-loader__content,.maz-scale-loading-leave-active .app-loader__content{opacity:1;transform:scale(1);transition:all .5s cubic-bezier(.4,.52,.26,.9);z-index:1}.maz-scale-loading-enter-from .app-loader__content,.maz-scale-loading-leave-to .app-loader__content{opacity:.4;transform:scale(0);z-index:1}.maz-scale-loading-enter-from,.maz-scale-loading-leave-to{opacity:0;transition:all .5s cubic-bezier(.4,.52,.26,.9)}.maz-slidevnext-enter-active,.maz-slidevnext-leave-active,.maz-slidevprev-enter-active,.maz-slidevprev-leave-active{position:absolute;transition:all .2s}.maz-slidevnext-enter-from,.maz-slidevprev-leave-to{opacity:0;transform:translateY(100%)}.maz-slidevnext-leave-to,.maz-slidevprev-enter-from{opacity:0;transform:translateY(-100%)}.maz-slide-enter-active,.maz-slide-leave-active{opacity:1;transform:translateY(0);transition:all .2s ease-in-out;z-index:998}.maz-slide-enter-from,.maz-slide-leave-to{opacity:0;transform:translateY(-20px);z-index:998}.maz-slideinvert-enter-active,.maz-slideinvert-leave-active{opacity:1;transform:translateY(0);transition:all .2s ease-in-out;z-index:998}.maz-slideinvert-enter-from,.maz-slideinvert-leave-to{opacity:0;transform:translateY(40px);z-index:998}.maz-tags-enter-active,.maz-tags-leave-active{opacity:1;transform:translateX(0);transition:all .2s ease-in-out}.maz-tags-enter-from,.maz-tags-leave-to{opacity:0;transform:translateX(-100%);transition:all .2s ease-in-out}.maz-tags-invert-enter-active,.maz-tags-invert-leave-active{opacity:1;transform:translateX(0);transition:transform .2s,opacity .2s}.maz-tags-invert-enter-from,.maz-tags-invert-leave-to{opacity:0;transform:translateX(100%)}.maz-expand-enter-active,.maz-expand-leave-active{overflow:hidden;transition:all .2s ease-in-out;transition-property:opacity,height}.maz-expand-enter-from,.maz-expand-leave-to{height:0;opacity:0}.maz-tab-transition-enter-from{transform:translate(100%)}.maz-tab-transition-leave,.maz-tab-transition-leave-active{position:absolute!important;top:0}.maz-tab-transition-leave-to{position:absolute!important;transform:translate(-100%)}.maz-tab-reverse-transition-enter-from{transform:translate(-100%)}.maz-tab-reverse-transition-leave,.maz-tab-reverse-transition-leave-active{position:absolute!important;top:0}.maz-tab-reverse-transition-leave,.maz-tab-reverse-transition-leave-to{position:absolute!important;top:0;transform:translate(100%)}@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}}*,:after,:before{--maz-tw-border-spacing-x:0;--maz-tw-border-spacing-y:0;--maz-tw-translate-x:0;--maz-tw-translate-y:0;--maz-tw-rotate:0;--maz-tw-skew-x:0;--maz-tw-skew-y:0;--maz-tw-scale-x:1;--maz-tw-scale-y:1;--maz-tw-pan-x: ;--maz-tw-pan-y: ;--maz-tw-pinch-zoom: ;--maz-tw-scroll-snap-strictness:proximity;--maz-tw-gradient-from-position: ;--maz-tw-gradient-via-position: ;--maz-tw-gradient-to-position: ;--maz-tw-ordinal: ;--maz-tw-slashed-zero: ;--maz-tw-numeric-figure: ;--maz-tw-numeric-spacing: ;--maz-tw-numeric-fraction: ;--maz-tw-ring-inset: ;--maz-tw-ring-offset-width:0px;--maz-tw-ring-offset-color:#fff;--maz-tw-ring-color:rgba(59,130,246,.5);--maz-tw-ring-offset-shadow:0 0 #0000;--maz-tw-ring-shadow:0 0 #0000;--maz-tw-shadow:0 0 #0000;--maz-tw-shadow-colored:0 0 #0000;--maz-tw-blur: ;--maz-tw-brightness: ;--maz-tw-contrast: ;--maz-tw-grayscale: ;--maz-tw-hue-rotate: ;--maz-tw-invert: ;--maz-tw-saturate: ;--maz-tw-sepia: ;--maz-tw-drop-shadow: ;--maz-tw-backdrop-blur: ;--maz-tw-backdrop-brightness: ;--maz-tw-backdrop-contrast: ;--maz-tw-backdrop-grayscale: ;--maz-tw-backdrop-hue-rotate: ;--maz-tw-backdrop-invert: ;--maz-tw-backdrop-opacity: ;--maz-tw-backdrop-saturate: ;--maz-tw-backdrop-sepia: ;--maz-tw-contain-size: ;--maz-tw-contain-layout: ;--maz-tw-contain-paint: ;--maz-tw-contain-style: }::backdrop{--maz-tw-border-spacing-x:0;--maz-tw-border-spacing-y:0;--maz-tw-translate-x:0;--maz-tw-translate-y:0;--maz-tw-rotate:0;--maz-tw-skew-x:0;--maz-tw-skew-y:0;--maz-tw-scale-x:1;--maz-tw-scale-y:1;--maz-tw-pan-x: ;--maz-tw-pan-y: ;--maz-tw-pinch-zoom: ;--maz-tw-scroll-snap-strictness:proximity;--maz-tw-gradient-from-position: ;--maz-tw-gradient-via-position: ;--maz-tw-gradient-to-position: ;--maz-tw-ordinal: ;--maz-tw-slashed-zero: ;--maz-tw-numeric-figure: ;--maz-tw-numeric-spacing: ;--maz-tw-numeric-fraction: ;--maz-tw-ring-inset: ;--maz-tw-ring-offset-width:0px;--maz-tw-ring-offset-color:#fff;--maz-tw-ring-color:rgba(59,130,246,.5);--maz-tw-ring-offset-shadow:0 0 #0000;--maz-tw-ring-shadow:0 0 #0000;--maz-tw-shadow:0 0 #0000;--maz-tw-shadow-colored:0 0 #0000;--maz-tw-blur: ;--maz-tw-brightness: ;--maz-tw-contrast: ;--maz-tw-grayscale: ;--maz-tw-hue-rotate: ;--maz-tw-invert: ;--maz-tw-saturate: ;--maz-tw-sepia: ;--maz-tw-drop-shadow: ;--maz-tw-backdrop-blur: ;--maz-tw-backdrop-brightness: ;--maz-tw-backdrop-contrast: ;--maz-tw-backdrop-grayscale: ;--maz-tw-backdrop-hue-rotate: ;--maz-tw-backdrop-invert: ;--maz-tw-backdrop-opacity: ;--maz-tw-backdrop-saturate: ;--maz-tw-backdrop-sepia: ;--maz-tw-contain-size: ;--maz-tw-contain-layout: ;--maz-tw-contain-paint: ;--maz-tw-contain-style: }.maz-sr-only{height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;clip:rect(0,0,0,0);border-width:0;white-space:nowrap}.maz-invisible{visibility:hidden}.\!maz-absolute{position:absolute!important}.maz-relative{position:relative}.\!maz-my-0{margin-bottom:0!important;margin-top:0!important}.maz-ml-2{margin-left:.5rem}.maz-flex{display:flex}.maz-inline-flex{display:inline-flex}.maz-table{display:table}.maz-hidden{display:none}.maz-size-5{height:1.25rem;width:1.25rem}.maz-size-6{height:1.5rem;width:1.5rem}.maz-size-8{height:2rem;width:2rem}.maz-size-full{height:100%;width:100%}.maz-h-5{height:1.25rem}.maz-h-full{height:100%}.maz-w-5{width:1.25rem}.maz-w-full{width:100%}.maz-min-w-0{min-width:0}.maz-max-w-full{max-width:100%}.maz-max-w-xs{max-width:20rem}.maz-flex-1{flex:1 1 0%}.maz-flex-none{flex:none}.-maz-rotate-180{--maz-tw-rotate:-180deg}.-maz-rotate-180,.maz-rotate-180{transform:translate(var(--maz-tw-translate-x),var(--maz-tw-translate-y)) rotate(var(--maz-tw-rotate)) skewX(var(--maz-tw-skew-x)) skewY(var(--maz-tw-skew-y)) scaleX(var(--maz-tw-scale-x)) scaleY(var(--maz-tw-scale-y))}.maz-rotate-180{--maz-tw-rotate:180deg}.maz-flex-col{flex-direction:column}.maz-items-center{align-items:center}.maz-justify-end{justify-content:flex-end}.maz-justify-between{justify-content:space-between}.maz-gap-2{gap:.5rem}.maz-space-x-2>:not([hidden])~:not([hidden]){--maz-tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--maz-tw-space-x-reverse)));margin-right:calc(.5rem*var(--maz-tw-space-x-reverse))}.maz-overflow-hidden{overflow:hidden}.maz-overflow-x-auto{overflow-x:auto}.maz-truncate{overflow:hidden;text-overflow:ellipsis}.maz-truncate,.maz-whitespace-nowrap{white-space:nowrap}.maz-whitespace-pre-wrap{white-space:pre-wrap}.maz-break-words{overflow-wrap:break-word}.maz-rounded{border-radius:var(--maz-radius)}.maz-rounded-xl{border-radius:calc(var(--maz-radius) + 8px)}.maz-rounded-t{border-top-left-radius:var(--maz-radius);border-top-right-radius:var(--maz-radius)}.maz-border{border-width:var(--maz-border-width)}.maz-border-b{border-bottom-width:var(--maz-border-width)}.maz-border-t{border-top-width:var(--maz-border-width)}.maz-border-solid{border-style:solid}.\!maz-border-destructive{--maz-tw-border-opacity:1!important;border-color:hsl(var(--maz-destructive)/var(--maz-tw-border-opacity,1))!important}.\!maz-border-success{--maz-tw-border-opacity:1!important;border-color:hsl(var(--maz-success)/var(--maz-tw-border-opacity,1))!important}.\!maz-border-warning{--maz-tw-border-opacity:1!important;border-color:hsl(var(--maz-warning)/var(--maz-tw-border-opacity,1))!important}.maz-border-accent{--maz-tw-border-opacity:1;border-color:hsl(var(--maz-accent)/var(--maz-tw-border-opacity,1))}.maz-border-contrast{--maz-tw-border-opacity:1;border-color:hsl(var(--maz-contrast)/var(--maz-tw-border-opacity,1))}.maz-border-destructive{--maz-tw-border-opacity:1;border-color:hsl(var(--maz-destructive)/var(--maz-tw-border-opacity,1))}.maz-border-divider{--maz-tw-border-opacity:1;border-color:hsl(var(--maz-border)/var(--maz-tw-border-opacity,1))}.maz-border-divider-400{--maz-tw-border-opacity:1;border-color:hsl(var(--maz-border-400)/var(--maz-tw-border-opacity,1))}.maz-border-info{--maz-tw-border-opacity:1;border-color:hsl(var(--maz-info)/var(--maz-tw-border-opacity,1))}.maz-border-primary{--maz-tw-border-opacity:1;border-color:hsl(var(--maz-primary)/var(--maz-tw-border-opacity,1))}.maz-border-secondary{--maz-tw-border-opacity:1;border-color:hsl(var(--maz-secondary)/var(--maz-tw-border-opacity,1))}.maz-border-success{--maz-tw-border-opacity:1;border-color:hsl(var(--maz-success)/var(--maz-tw-border-opacity,1))}.maz-border-transparent{border-color:transparent}.maz-border-warning{--maz-tw-border-opacity:1;border-color:hsl(var(--maz-warning)/var(--maz-tw-border-opacity,1))}.maz-bg-contrast-700{--maz-tw-bg-opacity:1;background-color:hsl(var(--maz-contrast-700)/var(--maz-tw-bg-opacity,1))}.maz-bg-destructive-700{--maz-tw-bg-opacity:1;background-color:hsl(var(--maz-destructive-700)/var(--maz-tw-bg-opacity,1))}.maz-bg-info-700{--maz-tw-bg-opacity:1;background-color:hsl(var(--maz-info-700)/var(--maz-tw-bg-opacity,1))}.maz-bg-success-700{--maz-tw-bg-opacity:1;background-color:hsl(var(--maz-success-700)/var(--maz-tw-bg-opacity,1))}.maz-bg-surface-400{--maz-tw-bg-opacity:1;background-color:hsl(var(--maz-background-400)/var(--maz-tw-bg-opacity,1))}.maz-bg-warning-700{--maz-tw-bg-opacity:1;background-color:hsl(var(--maz-warning-700)/var(--maz-tw-bg-opacity,1))}.maz-p-2{padding:.5rem}.maz-p-3{padding:.75rem}.maz-p-4{padding:1rem}.maz-text-center{text-align:center}.maz-text-start{text-align:start}.maz-text-end{text-align:end}.maz-text-2xl{font-size:1.5rem;line-height:2rem}.maz-text-3xl{font-size:1.875rem;line-height:2.25rem}.maz-text-base{font-size:1rem;line-height:1.5rem}.maz-text-lg{font-size:1.125rem;line-height:1.75rem}.maz-text-sm{font-size:.875rem;line-height:1.25rem}.maz-text-xl{font-size:1.25rem;line-height:1.75rem}.maz-text-xs{font-size:.75rem;line-height:1rem}.maz-font-semibold{font-weight:600}.maz-text-destructive-600{--maz-tw-text-opacity:1;color:hsl(var(--maz-destructive-600)/var(--maz-tw-text-opacity,1))}.maz-text-foreground{--maz-tw-text-opacity:1;color:hsl(var(--maz-foreground)/var(--maz-tw-text-opacity,1))}.maz-text-muted{--maz-tw-text-opacity:1;color:hsl(var(--maz-muted)/var(--maz-tw-text-opacity,1))}.maz-text-success-600{--maz-tw-text-opacity:1;color:hsl(var(--maz-success-600)/var(--maz-tw-text-opacity,1))}.maz-text-warning-600{--maz-tw-text-opacity:1;color:hsl(var(--maz-warning-600)/var(--maz-tw-text-opacity,1))}.maz-shadow-elevation{--maz-tw-shadow-color:hsl(var(--maz-shadow)/1);--maz-tw-shadow:var(--maz-tw-shadow-colored)}.maz-drop-shadow-md{--maz-tw-drop-shadow:drop-shadow(0 4px 3px rgba(0,0,0,.07)) drop-shadow(0 2px 2px rgba(0,0,0,.06));filter:var(--maz-tw-blur) var(--maz-tw-brightness) var(--maz-tw-contrast) var(--maz-tw-grayscale) var(--maz-tw-hue-rotate) var(--maz-tw-invert) var(--maz-tw-saturate) var(--maz-tw-sepia) var(--maz-tw-drop-shadow)}.maz-flex-center{align-items:center;justify-content:center}.maz-padded-container{padding-inline:var(--maz-container-padding);width:100%}.maz-group:hover .group-hover\:maz-block{display:block}@media (min-width:640px){.tab-s\:maz-block{display:block}}
1
+ @layer maz-ui-reset, maz-ui-theme, maz-ui-animations, maz-ui-utilities;@layer maz-ui-reset{.m-reset-css,.m-reset-css *,.m-reset-css:after,.m-reset-css:before{border:0 solid;box-sizing:border-box}.m-reset-css button,.m-reset-css:is(button){background-color:inherit;padding:inherit}.m-reset-css button,.m-reset-css input,.m-reset-css optgroup,.m-reset-css select,.m-reset-css textarea,.m-reset-css:is(button),.m-reset-css:is(input),.m-reset-css:is(optgroup),.m-reset-css:is(select),.m-reset-css:is(textarea){color:inherit;font-family:inherit;font-feature-settings:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0}}@layer maz-ui-utilities{:root{--maz-container-padding-mobile:1rem;--maz-container-padding-tablet:2rem;--maz-container-padding-desktop:2.5rem;--maz-container-padding-value:var(--maz-container-padding-mobile);--maz-container-width:calc(100% - var(--maz-container-padding-value)*2);--maz-container-padding:calc(50% - var(--maz-container-width)/2);--maz-container-max-width:1440px}@media only screen and (width >= 1520px){:root{--maz-container-width:var(--maz-container-max-width)}}@media (min-width:576px){:root{--maz-container-padding-value:var(--maz-container-padding-tablet)}}@media (min-width:1024px){:root{--maz-container-padding-value:var(--maz-container-padding-desktop)}}}@layer maz-ui-animations{.maz-scale-enter-active,.maz-scale-leave-active{opacity:1;transition:all .2s cubic-bezier(.4,.52,.26,.9);z-index:1}.maz-scale-enter-from,.maz-scale-leave-to{opacity:.4;transform:scale(0);z-index:1}.maz-scale-fade-enter-active,.maz-scale-fade-leave-active{opacity:1;transition:all .2s cubic-bezier(.4,.52,.26,.9);z-index:1}.maz-scale-fade-enter-from,.maz-scale-fade-leave-to{opacity:0;transform:scale(.5);z-index:1}.maz-scale-loading-enter-active,.maz-scale-loading-leave-active{opacity:1;transition:all .5s cubic-bezier(.4,.52,.26,.9)}.maz-scale-loading-enter-active .app-loader__content,.maz-scale-loading-leave-active .app-loader__content{opacity:1;transform:scale(1);transition:all .5s cubic-bezier(.4,.52,.26,.9);z-index:1}.maz-scale-loading-enter-from .app-loader__content,.maz-scale-loading-leave-to .app-loader__content{opacity:.4;transform:scale(0);z-index:1}.maz-scale-loading-enter-from,.maz-scale-loading-leave-to{opacity:0;transition:all .5s cubic-bezier(.4,.52,.26,.9)}.maz-slidevnext-enter-active,.maz-slidevnext-leave-active,.maz-slidevprev-enter-active,.maz-slidevprev-leave-active{position:absolute;transition:all .2s}.maz-slidevnext-enter-from,.maz-slidevprev-leave-to{opacity:0;transform:translateY(100%)}.maz-slidevnext-leave-to,.maz-slidevprev-enter-from{opacity:0;transform:translateY(-100%)}.maz-slide-enter-active,.maz-slide-leave-active{opacity:1;transform:translateY(0);transition:all .2s ease-in-out;z-index:998}.maz-slide-enter-from,.maz-slide-leave-to{opacity:0;transform:translateY(-20px);z-index:998}.maz-slideinvert-enter-active,.maz-slideinvert-leave-active{opacity:1;transform:translateY(0);transition:all .2s ease-in-out;z-index:998}.maz-slideinvert-enter-from,.maz-slideinvert-leave-to{opacity:0;transform:translateY(40px);z-index:998}.maz-tags-enter-active,.maz-tags-leave-active{opacity:1;transform:translateX(0);transition:all .2s ease-in-out}.maz-tags-enter-from,.maz-tags-leave-to{opacity:0;transform:translateX(-100%);transition:all .2s ease-in-out}.maz-tags-invert-enter-active,.maz-tags-invert-leave-active{opacity:1;transform:translateX(0);transition:transform .2s,opacity .2s}.maz-tags-invert-enter-from,.maz-tags-invert-leave-to{opacity:0;transform:translateX(100%)}.maz-expand-enter-active,.maz-expand-leave-active{overflow:hidden;transition:all .2s ease-in-out;transition-property:opacity,height}.maz-expand-enter-from,.maz-expand-leave-to{height:0;opacity:0}.maz-tab-transition-enter-from{transform:translate(100%)}.maz-tab-transition-leave,.maz-tab-transition-leave-active{position:absolute!important;top:0}.maz-tab-transition-leave-to{position:absolute!important;transform:translate(-100%)}.maz-tab-reverse-transition-enter-from{transform:translate(-100%)}.maz-tab-reverse-transition-leave,.maz-tab-reverse-transition-leave-active{position:absolute!important;top:0}.maz-tab-reverse-transition-leave,.maz-tab-reverse-transition-leave-to{position:absolute!important;top:0;transform:translate(100%)}@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}}*,:after,:before{--maz-tw-border-spacing-x:0;--maz-tw-border-spacing-y:0;--maz-tw-translate-x:0;--maz-tw-translate-y:0;--maz-tw-rotate:0;--maz-tw-skew-x:0;--maz-tw-skew-y:0;--maz-tw-scale-x:1;--maz-tw-scale-y:1;--maz-tw-pan-x: ;--maz-tw-pan-y: ;--maz-tw-pinch-zoom: ;--maz-tw-scroll-snap-strictness:proximity;--maz-tw-gradient-from-position: ;--maz-tw-gradient-via-position: ;--maz-tw-gradient-to-position: ;--maz-tw-ordinal: ;--maz-tw-slashed-zero: ;--maz-tw-numeric-figure: ;--maz-tw-numeric-spacing: ;--maz-tw-numeric-fraction: ;--maz-tw-ring-inset: ;--maz-tw-ring-offset-width:0px;--maz-tw-ring-offset-color:#fff;--maz-tw-ring-color:rgba(59,130,246,.5);--maz-tw-ring-offset-shadow:0 0 #0000;--maz-tw-ring-shadow:0 0 #0000;--maz-tw-shadow:0 0 #0000;--maz-tw-shadow-colored:0 0 #0000;--maz-tw-blur: ;--maz-tw-brightness: ;--maz-tw-contrast: ;--maz-tw-grayscale: ;--maz-tw-hue-rotate: ;--maz-tw-invert: ;--maz-tw-saturate: ;--maz-tw-sepia: ;--maz-tw-drop-shadow: ;--maz-tw-backdrop-blur: ;--maz-tw-backdrop-brightness: ;--maz-tw-backdrop-contrast: ;--maz-tw-backdrop-grayscale: ;--maz-tw-backdrop-hue-rotate: ;--maz-tw-backdrop-invert: ;--maz-tw-backdrop-opacity: ;--maz-tw-backdrop-saturate: ;--maz-tw-backdrop-sepia: ;--maz-tw-contain-size: ;--maz-tw-contain-layout: ;--maz-tw-contain-paint: ;--maz-tw-contain-style: }::backdrop{--maz-tw-border-spacing-x:0;--maz-tw-border-spacing-y:0;--maz-tw-translate-x:0;--maz-tw-translate-y:0;--maz-tw-rotate:0;--maz-tw-skew-x:0;--maz-tw-skew-y:0;--maz-tw-scale-x:1;--maz-tw-scale-y:1;--maz-tw-pan-x: ;--maz-tw-pan-y: ;--maz-tw-pinch-zoom: ;--maz-tw-scroll-snap-strictness:proximity;--maz-tw-gradient-from-position: ;--maz-tw-gradient-via-position: ;--maz-tw-gradient-to-position: ;--maz-tw-ordinal: ;--maz-tw-slashed-zero: ;--maz-tw-numeric-figure: ;--maz-tw-numeric-spacing: ;--maz-tw-numeric-fraction: ;--maz-tw-ring-inset: ;--maz-tw-ring-offset-width:0px;--maz-tw-ring-offset-color:#fff;--maz-tw-ring-color:rgba(59,130,246,.5);--maz-tw-ring-offset-shadow:0 0 #0000;--maz-tw-ring-shadow:0 0 #0000;--maz-tw-shadow:0 0 #0000;--maz-tw-shadow-colored:0 0 #0000;--maz-tw-blur: ;--maz-tw-brightness: ;--maz-tw-contrast: ;--maz-tw-grayscale: ;--maz-tw-hue-rotate: ;--maz-tw-invert: ;--maz-tw-saturate: ;--maz-tw-sepia: ;--maz-tw-drop-shadow: ;--maz-tw-backdrop-blur: ;--maz-tw-backdrop-brightness: ;--maz-tw-backdrop-contrast: ;--maz-tw-backdrop-grayscale: ;--maz-tw-backdrop-hue-rotate: ;--maz-tw-backdrop-invert: ;--maz-tw-backdrop-opacity: ;--maz-tw-backdrop-saturate: ;--maz-tw-backdrop-sepia: ;--maz-tw-contain-size: ;--maz-tw-contain-layout: ;--maz-tw-contain-paint: ;--maz-tw-contain-style: }.maz-sr-only{height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;clip:rect(0,0,0,0);border-width:0;white-space:nowrap}.maz-invisible{visibility:hidden}.\!maz-absolute{position:absolute!important}.maz-relative{position:relative}.\!maz-my-0{margin-bottom:0!important;margin-top:0!important}.maz-ml-2{margin-left:.5rem}.maz-flex{display:flex}.maz-inline-flex{display:inline-flex}.maz-table{display:table}.maz-hidden{display:none}.maz-size-5{height:1.25rem;width:1.25rem}.maz-size-6{height:1.5rem;width:1.5rem}.maz-size-8{height:2rem;width:2rem}.maz-size-full{height:100%;width:100%}.maz-h-5{height:1.25rem}.maz-h-full{height:100%}.maz-w-5{width:1.25rem}.maz-w-full{width:100%}.maz-min-w-0{min-width:0}.maz-max-w-full{max-width:100%}.maz-max-w-xs{max-width:20rem}.maz-flex-1{flex:1 1 0%}.maz-flex-none{flex:none}.-maz-rotate-180{--maz-tw-rotate:-180deg}.-maz-rotate-180,.maz-rotate-180{transform:translate(var(--maz-tw-translate-x),var(--maz-tw-translate-y)) rotate(var(--maz-tw-rotate)) skewX(var(--maz-tw-skew-x)) skewY(var(--maz-tw-skew-y)) scaleX(var(--maz-tw-scale-x)) scaleY(var(--maz-tw-scale-y))}.maz-rotate-180{--maz-tw-rotate:180deg}.maz-flex-col{flex-direction:column}.maz-items-center{align-items:center}.maz-justify-end{justify-content:flex-end}.maz-justify-between{justify-content:space-between}.maz-gap-2{gap:.5rem}.maz-space-x-2>:not([hidden])~:not([hidden]){--maz-tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--maz-tw-space-x-reverse)));margin-right:calc(.5rem*var(--maz-tw-space-x-reverse))}.maz-overflow-hidden{overflow:hidden}.maz-overflow-x-auto{overflow-x:auto}.maz-truncate{overflow:hidden;text-overflow:ellipsis}.maz-truncate,.maz-whitespace-nowrap{white-space:nowrap}.maz-whitespace-pre-wrap{white-space:pre-wrap}.maz-break-words{overflow-wrap:break-word}.maz-rounded{border-radius:var(--maz-radius)}.maz-rounded-xl{border-radius:calc(var(--maz-radius) + 8px)}.maz-rounded-t{border-top-left-radius:var(--maz-radius);border-top-right-radius:var(--maz-radius)}.maz-border{border-width:var(--maz-border-width)}.maz-border-b{border-bottom-width:var(--maz-border-width)}.maz-border-t{border-top-width:var(--maz-border-width)}.maz-border-solid{border-style:solid}.\!maz-border-destructive{--maz-tw-border-opacity:1!important;border-color:hsl(var(--maz-destructive)/var(--maz-tw-border-opacity,1))!important}.\!maz-border-success{--maz-tw-border-opacity:1!important;border-color:hsl(var(--maz-success)/var(--maz-tw-border-opacity,1))!important}.\!maz-border-warning{--maz-tw-border-opacity:1!important;border-color:hsl(var(--maz-warning)/var(--maz-tw-border-opacity,1))!important}.maz-border-accent{--maz-tw-border-opacity:1;border-color:hsl(var(--maz-accent)/var(--maz-tw-border-opacity,1))}.maz-border-contrast{--maz-tw-border-opacity:1;border-color:hsl(var(--maz-contrast)/var(--maz-tw-border-opacity,1))}.maz-border-destructive{--maz-tw-border-opacity:1;border-color:hsl(var(--maz-destructive)/var(--maz-tw-border-opacity,1))}.maz-border-divider{--maz-tw-border-opacity:1;border-color:hsl(var(--maz-border)/var(--maz-tw-border-opacity,1))}.maz-border-divider-400{--maz-tw-border-opacity:1;border-color:hsl(var(--maz-border-400)/var(--maz-tw-border-opacity,1))}.maz-border-info{--maz-tw-border-opacity:1;border-color:hsl(var(--maz-info)/var(--maz-tw-border-opacity,1))}.maz-border-primary{--maz-tw-border-opacity:1;border-color:hsl(var(--maz-primary)/var(--maz-tw-border-opacity,1))}.maz-border-secondary{--maz-tw-border-opacity:1;border-color:hsl(var(--maz-secondary)/var(--maz-tw-border-opacity,1))}.maz-border-success{--maz-tw-border-opacity:1;border-color:hsl(var(--maz-success)/var(--maz-tw-border-opacity,1))}.maz-border-transparent{border-color:transparent}.maz-border-warning{--maz-tw-border-opacity:1;border-color:hsl(var(--maz-warning)/var(--maz-tw-border-opacity,1))}.maz-bg-contrast-700{--maz-tw-bg-opacity:1;background-color:hsl(var(--maz-contrast-700)/var(--maz-tw-bg-opacity,1))}.maz-bg-destructive-700{--maz-tw-bg-opacity:1;background-color:hsl(var(--maz-destructive-700)/var(--maz-tw-bg-opacity,1))}.maz-bg-info-700{--maz-tw-bg-opacity:1;background-color:hsl(var(--maz-info-700)/var(--maz-tw-bg-opacity,1))}.maz-bg-success-700{--maz-tw-bg-opacity:1;background-color:hsl(var(--maz-success-700)/var(--maz-tw-bg-opacity,1))}.maz-bg-surface-400{--maz-tw-bg-opacity:1;background-color:hsl(var(--maz-background-400)/var(--maz-tw-bg-opacity,1))}.maz-bg-warning-700{--maz-tw-bg-opacity:1;background-color:hsl(var(--maz-warning-700)/var(--maz-tw-bg-opacity,1))}.maz-p-2{padding:.5rem}.maz-p-3{padding:.75rem}.maz-p-4{padding:1rem}.maz-text-center{text-align:center}.maz-text-start{text-align:start}.maz-text-end{text-align:end}.maz-text-2xl{font-size:1.5rem;line-height:2rem}.maz-text-3xl{font-size:1.875rem;line-height:2.25rem}.maz-text-base{font-size:1rem;line-height:1.5rem}.maz-text-lg{font-size:1.125rem;line-height:1.75rem}.maz-text-sm{font-size:.875rem;line-height:1.25rem}.maz-text-xl{font-size:1.25rem;line-height:1.75rem}.maz-text-xs{font-size:.75rem;line-height:1rem}.maz-font-semibold{font-weight:600}.\!maz-text-destructive-600{--maz-tw-text-opacity:1!important;color:hsl(var(--maz-destructive-600)/var(--maz-tw-text-opacity,1))!important}.\!maz-text-success-600{--maz-tw-text-opacity:1!important;color:hsl(var(--maz-success-600)/var(--maz-tw-text-opacity,1))!important}.\!maz-text-warning-600{--maz-tw-text-opacity:1!important;color:hsl(var(--maz-warning-600)/var(--maz-tw-text-opacity,1))!important}.maz-text-destructive-600{--maz-tw-text-opacity:1;color:hsl(var(--maz-destructive-600)/var(--maz-tw-text-opacity,1))}.maz-text-foreground{--maz-tw-text-opacity:1;color:hsl(var(--maz-foreground)/var(--maz-tw-text-opacity,1))}.maz-text-muted{--maz-tw-text-opacity:1;color:hsl(var(--maz-muted)/var(--maz-tw-text-opacity,1))}.maz-text-success-600{--maz-tw-text-opacity:1;color:hsl(var(--maz-success-600)/var(--maz-tw-text-opacity,1))}.maz-text-warning-600{--maz-tw-text-opacity:1;color:hsl(var(--maz-warning-600)/var(--maz-tw-text-opacity,1))}.maz-shadow-elevation{--maz-tw-shadow-color:hsl(var(--maz-shadow)/1);--maz-tw-shadow:var(--maz-tw-shadow-colored)}.maz-drop-shadow-md{--maz-tw-drop-shadow:drop-shadow(0 4px 3px rgba(0,0,0,.07)) drop-shadow(0 2px 2px rgba(0,0,0,.06));filter:var(--maz-tw-blur) var(--maz-tw-brightness) var(--maz-tw-contrast) var(--maz-tw-grayscale) var(--maz-tw-hue-rotate) var(--maz-tw-invert) var(--maz-tw-saturate) var(--maz-tw-sepia) var(--maz-tw-drop-shadow)}.maz-flex-center{align-items:center;justify-content:center}.maz-padded-container{padding-inline:var(--maz-container-padding);width:100%}.maz-group:hover .group-hover\:maz-block{display:block}@media (min-width:640px){.tab-s\:maz-block{display:block}}
@@ -3,7 +3,7 @@ import { vFullscreenImgInstall } from "./vFullscreenImg.js";
3
3
  import { vLazyImgInstall } from "./vLazyImg.js";
4
4
  import { vTooltip, vTooltipInstall } from "./vTooltip.js";
5
5
  import { vZoomImg, vZoomImgInstall } from "./vZoomImg.js";
6
- import { d as d2 } from "../chunks/fullscreen-img.directive.ClMlhEtN.js";
6
+ import { d as d2 } from "../chunks/fullscreen-img.directive.CyOHexcO.js";
7
7
  import { d as d3 } from "../chunks/lazy-img.directive.D5zCo3Zi.js";
8
8
  export {
9
9
  d as vClickOutside,
@@ -1,4 +1,4 @@
1
- import { d as directive } from "../chunks/fullscreen-img.directive.ClMlhEtN.js";
1
+ import { d as directive } from "../chunks/fullscreen-img.directive.CyOHexcO.js";
2
2
  const plugin = {
3
3
  install(app) {
4
4
  app.directive("fullscreen-img", directive);
@@ -1,4 +1,4 @@
1
- import { h } from "vue";
1
+ import { ref, nextTick, watch, h } from "vue";
2
2
  import MazPopover from "../components/MazPopover.js";
3
3
  import { useMountComponent } from "../composables/useMountComponent.js";
4
4
  const tooltipInstances = /* @__PURE__ */ new WeakMap();
@@ -7,8 +7,7 @@ class TooltipHandler {
7
7
  constructor(options = {}) {
8
8
  this.defaultProps = {
9
9
  open: !1,
10
- positionDelay: 0,
11
- preferPosition: "top",
10
+ position: "top",
12
11
  trigger: "hover",
13
12
  role: "tooltip",
14
13
  closeOnClickOutside: !1,
@@ -17,7 +16,7 @@ class TooltipHandler {
17
16
  ...options
18
17
  };
19
18
  }
20
- getPopoverProps(binding) {
19
+ getTooltipProps(binding) {
21
20
  const baseOptions = { ...this.defaultProps };
22
21
  return typeof binding.value == "string" ? {
23
22
  ...baseOptions,
@@ -30,79 +29,117 @@ class TooltipHandler {
30
29
  };
31
30
  }
32
31
  getPositionFromModifiers(binding) {
33
- if (binding.modifiers.top)
34
- return "top";
35
- if (binding.modifiers.bottom)
36
- return "bottom";
37
- if (binding.modifiers.left)
38
- return "left";
39
- if (binding.modifiers.right)
40
- return "right";
41
- if (binding.modifiers["top-start"])
42
- return "top-start";
43
- if (binding.modifiers["top-end"])
44
- return "top-end";
45
- if (binding.modifiers["bottom-start"])
46
- return "bottom-start";
47
- if (binding.modifiers["bottom-end"])
48
- return "bottom-end";
49
- if (binding.modifiers["left-start"])
50
- return "left-start";
51
- if (binding.modifiers["left-end"])
52
- return "left-end";
53
- if (binding.modifiers["right-start"])
54
- return "right-start";
55
- if (binding.modifiers["right-end"])
56
- return "right-end";
57
- if (binding.modifiers.auto)
58
- return "auto";
32
+ const modifiers = Object.keys(binding.modifiers), validPositions = [
33
+ "top",
34
+ "bottom",
35
+ "left",
36
+ "right",
37
+ "top-start",
38
+ "top-end",
39
+ "bottom-start",
40
+ "bottom-end",
41
+ "left-start",
42
+ "left-end",
43
+ "right-start",
44
+ "right-end",
45
+ "auto"
46
+ ];
47
+ for (const modifier of modifiers)
48
+ if (validPositions.includes(modifier))
49
+ return modifier;
59
50
  }
60
51
  mount(el, binding) {
61
52
  this.unmount(el);
62
- const props = this.getPopoverProps(binding);
63
- if (!props.text && !props.html) {
53
+ const tooltipProps = this.getTooltipProps(binding);
54
+ if (!tooltipProps.text && !tooltipProps.html) {
64
55
  console.warn("[maz-ui](vTooltip) No text or html content provided");
65
56
  return;
66
57
  }
67
- const popoverWrapper = document.createElement("div");
68
- popoverWrapper.classList.add("m-tooltip-wrapper"), popoverWrapper.style.display = "inline-flex", el.parentNode && el.parentNode.replaceChild(popoverWrapper, el);
69
- const popoverProps = {
70
- ...props,
71
- panelClass: ["m-tooltip-panel", "maz-text-sm", "maz-whitespace-pre-wrap", "maz-break-words", "maz-p-2", "maz-max-w-xs", props.panelClass].filter(Boolean).join(" "),
72
- modelValue: props.open
73
- }, { destroy } = useMountComponent(MazPopover, {
74
- props: popoverProps,
75
- children: {
76
- trigger: () => h("div", {
77
- ref: (triggerDiv) => {
78
- triggerDiv && triggerDiv instanceof HTMLElement && !triggerDiv.contains(el) && triggerDiv.replaceWith(el);
58
+ const isOpen = ref(!!tooltipProps.open), tooltipContainer = document.createElement("div");
59
+ document.body.appendChild(tooltipContainer);
60
+ let vNodeInstance = null;
61
+ const createTooltip = () => {
62
+ const popoverProps = {
63
+ ...tooltipProps,
64
+ panelClass: [
65
+ "m-tooltip-panel",
66
+ "maz-text-sm",
67
+ "maz-whitespace-pre-wrap",
68
+ "maz-break-words",
69
+ "maz-p-2",
70
+ "maz-max-w-xs",
71
+ tooltipProps.panelClass
72
+ ].filter(Boolean).join(" "),
73
+ modelValue: isOpen.value,
74
+ positionReference: el
75
+ // Use original element as reference
76
+ };
77
+ vNodeInstance && vNodeInstance.destroy(), vNodeInstance = useMountComponent(MazPopover, {
78
+ props: {
79
+ ...popoverProps,
80
+ modelValue: isOpen.value,
81
+ "onUpdate:modelValue": (value) => {
82
+ isOpen.value = value;
79
83
  }
80
- }),
81
- default: () => props.html ? h("div", { innerHTML: props.html }) : props.text || ""
82
- },
83
- element: popoverWrapper
84
+ },
85
+ children: {
86
+ // Use a dummy trigger since we control positioning via positionReference
87
+ // trigger: () => h('div', { style: 'display: none;' }),
88
+ default: () => tooltipProps.html ? h("div", { innerHTML: tooltipProps.html }) : tooltipProps.text || ""
89
+ },
90
+ element: tooltipContainer
91
+ });
92
+ };
93
+ function isTouchDevice() {
94
+ return "ontouchstart" in window || navigator.maxTouchPoints > 0;
95
+ }
96
+ function getEffectiveTrigger() {
97
+ return tooltipProps.trigger === "adaptive" ? isTouchDevice() ? "click" : "hover" : tooltipProps.trigger || "hover";
98
+ }
99
+ let mouseEnterHandler = null, mouseLeaveHandler = null, clickHandler = null;
100
+ function setupTriggers() {
101
+ cleanupTriggers();
102
+ const effectiveTrigger = getEffectiveTrigger();
103
+ effectiveTrigger === "hover" ? (mouseEnterHandler = () => {
104
+ isOpen.value = !0;
105
+ }, mouseLeaveHandler = () => {
106
+ isOpen.value = !1;
107
+ }, el.addEventListener("mouseenter", mouseEnterHandler), el.addEventListener("mouseleave", mouseLeaveHandler)) : effectiveTrigger === "click" && (clickHandler = () => {
108
+ isOpen.value = !isOpen.value;
109
+ }, el.addEventListener("click", clickHandler));
110
+ }
111
+ function cleanupTriggers() {
112
+ mouseEnterHandler && (el.removeEventListener("mouseenter", mouseEnterHandler), mouseEnterHandler = null), mouseLeaveHandler && (el.removeEventListener("mouseleave", mouseLeaveHandler), mouseLeaveHandler = null), clickHandler && (el.removeEventListener("click", clickHandler), clickHandler = null);
113
+ }
114
+ nextTick(() => {
115
+ createTooltip(), setupTriggers();
116
+ }), watch(isOpen, () => {
117
+ createTooltip();
84
118
  });
85
- function cleanup(shouldRestore = !0) {
86
- if (destroy(), shouldRestore && popoverWrapper.parentNode)
87
- try {
88
- popoverWrapper.parentNode.insertBefore(el, popoverWrapper), popoverWrapper.parentNode.removeChild(popoverWrapper);
89
- } catch (error) {
90
- console.warn("[maz-ui](vTooltip) Failed to restore original element:", error);
91
- }
119
+ function destroy() {
120
+ cleanupTriggers(), vNodeInstance && (vNodeInstance.destroy(), vNodeInstance = null), tooltipContainer.parentNode && tooltipContainer.parentNode.removeChild(tooltipContainer);
121
+ }
122
+ function updateProps(newProps) {
123
+ const oldTrigger = tooltipProps.trigger;
124
+ Object.assign(tooltipProps, newProps), isOpen.value = !!newProps.open, oldTrigger !== newProps.trigger && setupTriggers(), createTooltip();
92
125
  }
93
126
  tooltipInstances.set(el, {
94
127
  destroy,
95
- popoverWrapper,
96
- cleanup
128
+ updateProps,
129
+ isOpen
97
130
  });
98
131
  }
99
132
  update(el, binding) {
100
133
  const instance = tooltipInstances.get(el);
101
- instance && (instance.cleanup(!0), tooltipInstances.delete(el)), this.mount(el, binding);
134
+ if (instance) {
135
+ const newProps = this.getTooltipProps(binding);
136
+ instance.updateProps(newProps);
137
+ } else
138
+ this.mount(el, binding);
102
139
  }
103
140
  unmount(el) {
104
141
  const instance = tooltipInstances.get(el);
105
- instance && (instance.cleanup(!1), tooltipInstances.delete(el));
142
+ instance && (instance.destroy(), tooltipInstances.delete(el));
106
143
  }
107
144
  }
108
145
  let globalHandler;
@@ -1,9 +1,9 @@
1
1
  import { useMountComponent } from "../composables/useMountComponent.js";
2
2
  import { defineComponent, defineAsyncComponent, ref, computed, watch, onMounted, createBlock, openBlock, Transition, withCtx, withDirectives, createElementVNode, normalizeClass, withModifiers, createCommentVNode, createElementBlock, resolveDynamicComponent, toDisplayString, Fragment, renderList, unref, mergeProps, normalizeStyle, createVNode, vShow } from "vue";
3
- import { u as ur, b as at, t as tn, w as wr, d as si, E, f as mn } from "../chunks/index.CvKh762h.js";
3
+ import { MazExclamationCircle, MazCheckCircle, MazInformationCircle, MazExclamationTriangle, MazXMark, MazArrowTopRightOnSquare, MazLinkIcon } from "@maz-ui/icons";
4
4
  import { useTimer } from "../composables/useTimer.js";
5
5
  import { _ as _export_sfc } from "../chunks/_plugin-vue_export-helper.B--vMWp3.js";
6
- import '../assets/toast.kunueRvo.css';const _hoisted_1 = ["textContent", "innerHTML"], _hoisted_2 = {
6
+ import '../assets/toast.CC2VQab8.css';const _hoisted_1 = ["textContent", "innerHTML"], _hoisted_2 = {
7
7
  key: 1,
8
8
  class: "m-toast__progress-bar"
9
9
  }, _sfc_main = /* @__PURE__ */ defineComponent({
@@ -32,13 +32,13 @@ import '../assets/toast.kunueRvo.css';const _hoisted_1 = ["textContent", "innerH
32
32
  if (__props.icon)
33
33
  switch (__props.type) {
34
34
  case "destructive":
35
- return wr;
35
+ return MazExclamationTriangle;
36
36
  case "info":
37
- return tn;
37
+ return MazInformationCircle;
38
38
  case "success":
39
- return at;
39
+ return MazCheckCircle;
40
40
  case "warning":
41
- return ur;
41
+ return MazExclamationCircle;
42
42
  default:
43
43
  return;
44
44
  }
@@ -116,7 +116,7 @@ import '../assets/toast.kunueRvo.css';const _hoisted_1 = ["textContent", "innerH
116
116
  }
117
117
  function getButtonRightIcon(button) {
118
118
  if (!(!button.to && !button.href))
119
- return button.target === "_blank" ? E : mn;
119
+ return button.target === "_blank" ? MazArrowTopRightOnSquare : MazLinkIcon;
120
120
  }
121
121
  return __expose({
122
122
  /**
@@ -148,8 +148,8 @@ import '../assets/toast.kunueRvo.css';const _hoisted_1 = ["textContent", "innerH
148
148
  class: "m-toast__button",
149
149
  onMouseover: _cache[0] || (_cache[0] = ($event) => toggleTimer(!0)),
150
150
  onMouseleave: _cache[1] || (_cache[1] = ($event) => toggleTimer(!1)),
151
- onTouchstart: _cache[2] || (_cache[2] = ($event) => toggleTimer(!0)),
152
- onTouchend: _cache[3] || (_cache[3] = ($event) => toggleTimer(!1)),
151
+ onTouchstartPassive: _cache[2] || (_cache[2] = ($event) => toggleTimer(!0)),
152
+ onTouchendPassive: _cache[3] || (_cache[3] = ($event) => toggleTimer(!1)),
153
153
  onClick: _cache[4] || (_cache[4] = withModifiers(($event) => click($event), ["stop"]))
154
154
  }, [
155
155
  iconComponent.value ? (openBlock(), createBlock(resolveDynamicComponent(iconComponent.value), {
@@ -161,13 +161,10 @@ import '../assets/toast.kunueRvo.css';const _hoisted_1 = ["textContent", "innerH
161
161
  textContent: toDisplayString(_ctx.html ? void 0 : _ctx.message),
162
162
  innerHTML: _ctx.html ? _ctx.message : void 0
163
163
  }, null, 8, _hoisted_1),
164
- (openBlock(!0), createElementBlock(Fragment, null, renderList(internalButtons.value, (_button, index) => (openBlock(), createBlock(unref(MazBtn), mergeProps({
165
- key: index,
166
- ref_for: !0
167
- }, _button, {
168
- loading: isActionLoading.value || _button.loading,
169
- "right-icon": getButtonRightIcon(_button),
170
- onClick: withModifiers(($event) => onButtonClick(_button, $event), ["stop"])
164
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(internalButtons.value, (toastButton, index) => (openBlock(), createBlock(unref(MazBtn), mergeProps({ key: index }, { ref_for: !0 }, toastButton, {
165
+ loading: isActionLoading.value || toastButton.loading,
166
+ "right-icon": getButtonRightIcon(toastButton),
167
+ onClick: withModifiers(($event) => onButtonClick(toastButton, $event), ["stop"])
171
168
  }), null, 16, ["loading", "right-icon", "onClick"]))), 128)),
172
169
  typeof _ctx.timeout == "number" && _ctx.timeout > 0 && !_ctx.persistent ? (openBlock(), createElementBlock("div", _hoisted_2, [
173
170
  createElementVNode("div", {
@@ -182,7 +179,7 @@ import '../assets/toast.kunueRvo.css';const _hoisted_1 = ["textContent", "innerH
182
179
  class: "m-toast__close",
183
180
  onClick: _cache[5] || (_cache[5] = withModifiers(($event) => click($event), ["stop"]))
184
181
  }, [
185
- createVNode(unref(si), { class: "m-toast__close-icon" })
182
+ createVNode(unref(MazXMark), { class: "m-toast__close-icon" })
186
183
  ])
187
184
  ], 2), [
188
185
  [vShow, isActive.value]
@@ -191,7 +188,7 @@ import '../assets/toast.kunueRvo.css';const _hoisted_1 = ["textContent", "innerH
191
188
  _: 1
192
189
  }, 8, ["name"]));
193
190
  }
194
- }), MazToast = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-d17b7c4b"]]), DEFAULT_OPTIONS = {
191
+ }), MazToast = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-7235a0f8"]]), DEFAULT_OPTIONS = {
195
192
  position: "bottom-right",
196
193
  timeout: 1e4,
197
194
  persistent: !1
@@ -21,6 +21,9 @@ const composablesMap = {
21
21
  useMountComponent: !0
22
22
  }, modulesMap = {
23
23
  capitalize: !0,
24
+ execPromise: !0,
25
+ getErrorMessage: !0,
26
+ logger: !0,
24
27
  checkAvailability: !0,
25
28
  countryCodeToUnicodeFlag: !0,
26
29
  formatCurrency: !0,
@@ -67,7 +67,7 @@ function requirePlugin() {
67
67
  }
68
68
  var pluginExports = /* @__PURE__ */ requirePlugin();
69
69
  const plugin = /* @__PURE__ */ getDefaultExportFromCjs(pluginExports);
70
- function defineMazTailwindConfig(config) {
70
+ function defineMazTailwindConfig(config, { utilities: utilities$1 } = {}) {
71
71
  return {
72
72
  darkMode: ["class", '[class~="dark"]'],
73
73
  content: [],
@@ -81,7 +81,10 @@ function defineMazTailwindConfig(config) {
81
81
  },
82
82
  plugins: [
83
83
  plugin(({ addUtilities }) => {
84
- addUtilities(utilities);
84
+ addUtilities({
85
+ ...utilities,
86
+ ...utilities$1
87
+ });
85
88
  })
86
89
  ],
87
90
  ...config