maz-ui 4.0.0-beta.33 → 4.0.0-beta.37

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 (345) hide show
  1. package/dist/assets/{MazAnimatedCounter.DkZNPRLp.css → MazAnimatedCounter.LK7oyUrl.css} +1 -1
  2. package/dist/assets/MazAnimatedText.CHvAudRU.css +1 -0
  3. package/dist/assets/MazBackdrop.09bziTPM.css +1 -0
  4. package/dist/assets/MazBtn.BvC8ftmc.css +1 -0
  5. package/dist/assets/MazCard.Dv02b2P6.css +1 -0
  6. package/dist/assets/MazCardSpotlight.B7lFD7Pi.css +1 -0
  7. package/dist/assets/MazCarousel.BLHpZIu5.css +1 -0
  8. package/dist/assets/{MazCheckbox.aH1IKnrR.css → MazCheckbox.Di88TJ3e.css} +1 -1
  9. package/dist/assets/MazChecklist.Bu8wERn6.css +1 -0
  10. package/dist/assets/MazDatePicker.G6V7jjin.css +1 -0
  11. package/dist/assets/{MazDialog.DEmRfAv7.css → MazDialog.TS06kRcu.css} +1 -1
  12. package/dist/assets/MazDropdown.D90GEKDB.css +1 -0
  13. package/dist/assets/MazDropzone._2HwHowu.css +1 -0
  14. package/dist/assets/MazGallery.BTNB3D6k.css +1 -0
  15. package/dist/assets/MazInput.BvuxfP9k.css +1 -0
  16. package/dist/assets/MazInputCode.BYi64Mof.css +1 -0
  17. package/dist/assets/MazInputPhoneNumber.Baeyskod.css +1 -0
  18. package/dist/assets/MazInputTags.is2jSJk-.css +1 -0
  19. package/dist/assets/MazLazyImg.DO7a4PDm.css +1 -0
  20. package/dist/assets/{MazPagination.C6cUh-p4.css → MazPagination.BUhf2Qr7.css} +1 -1
  21. package/dist/assets/MazPickerCalendarMonth.DpijYq-O.css +1 -0
  22. package/dist/assets/{MazPickerCalendarSwitcher.CI9Vw1sJ.css → MazPickerCalendarSwitcher.ByAVjy00.css} +1 -1
  23. package/dist/assets/{MazPickerHeader.C4W93yMD.css → MazPickerHeader.D7JXgA3q.css} +1 -1
  24. package/dist/assets/MazPickerMonthSwitcher.BJGGy53r.css +1 -0
  25. package/dist/assets/{MazPickerYearSwitcher.CFiH13QC.css → MazPickerYearSwitcher.DPD1_dfz.css} +1 -1
  26. package/dist/assets/MazPopover.DIE65uVT.css +1 -0
  27. package/dist/assets/MazPullToRefresh.C0HGlupm.css +1 -0
  28. package/dist/assets/{MazRadio.aTHM-mpx.css → MazRadio.B0B3P1QS.css} +1 -1
  29. package/dist/assets/MazRadioButtons.CfiHq8H9.css +1 -0
  30. package/dist/assets/MazReadingProgressBar.dzfwQFNg.css +1 -0
  31. package/dist/assets/MazSelect.DIwjMD31.css +1 -0
  32. package/dist/assets/{MazSelectCountry.EW8fKXFX.css → MazSelectCountry.B0tlbfgr.css} +1 -1
  33. package/dist/assets/MazSlider.WcnBC9zc.css +1 -0
  34. package/dist/assets/{MazStepper.BD2gDGAX.css → MazStepper.C9R7g43I.css} +1 -1
  35. package/dist/assets/MazSwitch.LCcK91L7.css +1 -0
  36. package/dist/assets/MazTable.Cq7FEz09.css +1 -0
  37. package/dist/assets/MazTableRow.C0Ko4yDk.css +1 -0
  38. package/dist/assets/{MazTabsBar.gcS2Fc-B.css → MazTabsBar.BRr1XiYu.css} +1 -1
  39. package/dist/assets/MazTextarea.C9sZpRDZ.css +1 -0
  40. package/dist/assets/{PhoneInput.DCWA_-gC.css → PhoneInput.DkOXlrI9.css} +1 -1
  41. package/dist/assets/{fullscreen-img.Bkuz1GOX.css → fullscreen-img.Br983fLC.css} +1 -1
  42. package/dist/assets/{toast.DH9mbkvs.css → toast.BDNNJSjj.css} +1 -1
  43. package/dist/chunks/{MazDatePicker.bKFpslPf.js → MazDatePicker.B1B6gUrC.js} +24 -24
  44. package/dist/chunks/{MazDialogConfirm.vue_vue_type_script_setup_true_lang.Grn2kB3x.js → MazDialogConfirm.vue_vue_type_script_setup_true_lang.DuEcluOw.js} +3 -1
  45. package/dist/chunks/{MazDropdown.vue_vue_type_style_index_0_lang.X8ygqBUZ.js → MazDropdown.vue_vue_type_style_index_0_lang.DULnKQ2W.js} +8 -7
  46. package/dist/chunks/{MazInputNumber.vue_vue_type_style_index_0_lang.B6DYpHfi.js → MazInputNumber.vue_vue_type_style_index_0_lang.B0D4Zzds.js} +2 -2
  47. package/dist/chunks/{MazInputPhoneNumber.BVHi0OiN.js → MazInputPhoneNumber.CDy6n_Qj.js} +10 -10
  48. package/dist/chunks/{MazInputPrice.vue_vue_type_script_setup_true_lang.BA6TDX-T.js → MazInputPrice.vue_vue_type_script_setup_true_lang.3pKYuG8H.js} +18 -18
  49. package/dist/chunks/{MazPickerCalendar.lLfvUtrb.js → MazPickerCalendar.BSBQciuG.js} +1 -1
  50. package/dist/chunks/{MazPickerCalendarMonth.Djzgo1tF.js → MazPickerCalendarMonth.CFJHTFp5.js} +10 -10
  51. package/dist/chunks/{MazPickerCalendarSwitcher.Bf24kKw6.js → MazPickerCalendarSwitcher.DC21FpTy.js} +10 -10
  52. package/dist/chunks/{MazPickerContainer.7hYHiOaa.js → MazPickerContainer.CRPzAbRt.js} +1 -1
  53. package/dist/chunks/{MazPickerHeader.B00RAQPS.js → MazPickerHeader.D7Tbm-yH.js} +14 -14
  54. package/dist/chunks/{MazPickerMonthSwitcher.B2ZgNJWy.js → MazPickerMonthSwitcher.DzHOKbe4.js} +10 -10
  55. package/dist/chunks/{MazPickerTime.Bd4khA2e.js → MazPickerTime.EZK1foEx.js} +1 -1
  56. package/dist/chunks/{MazPickerYearSwitcher.BIy9xGIw.js → MazPickerYearSwitcher.BcT8GENl.js} +4 -4
  57. package/dist/chunks/{MazSwitch.vue_vue_type_style_index_0_lang.CU43Y1ky.js → MazSwitch.vue_vue_type_style_index_0_lang.Dz7-dIc9.js} +1 -1
  58. package/dist/chunks/{MazTable.vue_vue_type_script_setup_true_lang.BcTw9Tyh.js → MazTable.vue_vue_type_script_setup_true_lang.Ct1Gtp2Q.js} +5 -5
  59. package/dist/chunks/{MazTabsContent.vue_vue_type_script_setup_true_lang.arGqYTL5.js → MazTabsContent.vue_vue_type_script_setup_true_lang.hIwO-24k.js} +2 -2
  60. package/dist/chunks/{PhoneInput.D9vRIgS6.js → PhoneInput.DukRZp5u.js} +4 -4
  61. package/dist/chunks/capitalize.CVQ1jDrh.js +6 -0
  62. package/dist/chunks/checkAvailability.UFZSC8-1.js +16 -0
  63. package/dist/chunks/debounce.DhXdop6X.js +11 -0
  64. package/dist/chunks/{dom-events.Bbe7wDQl.js → dom-events.H9KIOv83.js} +52 -52
  65. package/dist/chunks/{fullscreen-img.directive.Be383en8.js → fullscreen-img.directive.D9oQ3Gni.js} +4 -4
  66. package/dist/chunks/{isClient.WI4oSt66.js → isClient.8V3qjGdO.js} +2 -2
  67. package/dist/chunks/{mazUi.D6UdqpTO.js → mazUi.0b7z2u9g.js} +2 -2
  68. package/dist/chunks/{obsidian.Cy0R8RHy.js → obsidian.C6upWOVF.js} +2 -2
  69. package/dist/chunks/{ocean.pHrY5H_S.js → ocean.ehMlC0HV.js} +2 -2
  70. package/dist/chunks/pascalCase.BKTE3qqE.js +19 -0
  71. package/dist/chunks/{pristine.CxBZzgUG.js → pristine.DMG3eBuN.js} +2 -2
  72. package/dist/chunks/sleep.Ci7GE4BQ.js +6 -0
  73. package/dist/chunks/truthyFilter.DZvXmxeK.js +6 -0
  74. package/dist/chunks/{useStringMatching.BBezu-6J.js → useStringMatching.DzSigyZ7.js} +27 -27
  75. package/dist/chunks/{vClickOutside.DIOiluy0.js → vClickOutside.CJBKY5no.js} +6 -6
  76. package/dist/components/MazAccordion.vue.d.ts +36 -0
  77. package/dist/components/MazAnimatedCounter.js +5 -5
  78. package/dist/components/MazAnimatedCounter.vue.d.ts +59 -0
  79. package/dist/components/MazAnimatedElement.vue.d.ts +44 -0
  80. package/dist/components/MazAnimatedText.js +4 -4
  81. package/dist/components/MazAnimatedText.vue.d.ts +57 -0
  82. package/dist/components/MazAvatar.vue.d.ts +99 -0
  83. package/dist/components/MazBackdrop.js +70 -31
  84. package/dist/components/MazBackdrop.vue.d.ts +91 -0
  85. package/dist/components/MazBadge.vue.d.ts +61 -0
  86. package/dist/components/MazBottomSheet.vue.d.ts +35 -0
  87. package/dist/components/MazBtn.js +2 -2
  88. package/dist/components/MazBtn.vue.d.ts +105 -0
  89. package/dist/components/MazCard.js +3 -3
  90. package/dist/components/MazCard.vue.d.ts +77 -0
  91. package/dist/components/MazCardSpotlight.js +2 -2
  92. package/dist/components/MazCardSpotlight.vue.d.ts +57 -0
  93. package/dist/components/MazCarousel.js +3 -3
  94. package/dist/components/MazCarousel.vue.d.ts +48 -0
  95. package/dist/components/MazChart.vue.d.ts +53 -0
  96. package/dist/components/MazCheckbox.js +2 -2
  97. package/dist/components/MazCheckbox.vue.d.ts +55 -0
  98. package/dist/components/MazChecklist.js +7 -7
  99. package/dist/components/MazChecklist.vue.d.ts +87 -0
  100. package/dist/components/MazCircularProgressBar.vue.d.ts +106 -0
  101. package/dist/components/MazDatePicker/MazPickerCalendar.vue.d.ts +27 -0
  102. package/dist/components/MazDatePicker/MazPickerCalendarMonth/MazPickerCalendarDays.vue.d.ts +20 -0
  103. package/dist/components/MazDatePicker/MazPickerCalendarMonth/MazPickerCalendarGrid.vue.d.ts +125 -0
  104. package/dist/components/MazDatePicker/MazPickerCalendarMonth/MazPickerCalendarMonth.vue.d.ts +134 -0
  105. package/dist/components/MazDatePicker/MazPickerCalendarSwitcher.vue.d.ts +42 -0
  106. package/dist/components/MazDatePicker/MazPickerContainer.vue.d.ts +38 -0
  107. package/dist/components/MazDatePicker/MazPickerHeader.vue.d.ts +15 -0
  108. package/dist/components/MazDatePicker/MazPickerMonthSwitcher.vue.d.ts +44 -0
  109. package/dist/components/MazDatePicker/MazPickerShortcuts.vue.d.ts +16 -0
  110. package/dist/components/MazDatePicker/MazPickerTime.vue.d.ts +107 -0
  111. package/dist/components/MazDatePicker/MazPickerYearSwitcher.vue.d.ts +36 -0
  112. package/dist/components/MazDatePicker/types.d.ts +14 -0
  113. package/dist/components/MazDatePicker/utils.d.ts +61 -0
  114. package/dist/components/MazDatePicker.js +1 -1
  115. package/dist/components/MazDatePicker.vue.d.ts +547 -0
  116. package/dist/components/MazDialog.js +9 -16
  117. package/dist/components/MazDialog.vue.d.ts +247 -0
  118. package/dist/components/MazDialogConfirm/useMazDialogConfirm.d.ts +47 -0
  119. package/dist/components/MazDialogConfirm.js +2 -2
  120. package/dist/components/MazDialogConfirm.vue.d.ts +270 -0
  121. package/dist/components/MazDrawer.vue.d.ts +52 -0
  122. package/dist/components/MazDropdown.js +1 -1
  123. package/dist/components/MazDropdown.vue.d.ts +249 -0
  124. package/dist/components/MazDropzone.js +6 -6
  125. package/dist/components/MazDropzone.vue.d.ts +305 -0
  126. package/dist/components/MazExpandAnimation.vue.d.ts +44 -0
  127. package/dist/components/MazFullscreenLoader.vue.d.ts +26 -0
  128. package/dist/components/MazGallery.js +4 -4
  129. package/dist/components/MazGallery.vue.d.ts +85 -0
  130. package/dist/components/MazIcon.vue.d.ts +26 -0
  131. package/dist/components/MazInput.js +4 -4
  132. package/dist/components/MazInput.vue.d.ts +225 -0
  133. package/dist/components/MazInputCode.js +2 -2
  134. package/dist/components/MazInputCode.vue.d.ts +49 -0
  135. package/dist/components/MazInputNumber.js +1 -1
  136. package/dist/components/MazInputNumber.vue.d.ts +125 -0
  137. package/dist/components/MazInputPhoneNumber/PhoneInput.vue.d.ts +29 -0
  138. package/dist/components/MazInputPhoneNumber/useLibphonenumber.d.ts +26 -0
  139. package/dist/components/MazInputPhoneNumber/useMazInputPhoneNumber.d.ts +26 -0
  140. package/dist/components/MazInputPhoneNumber.js +1 -1
  141. package/dist/components/MazInputPhoneNumber.vue.d.ts +421 -0
  142. package/dist/components/MazInputPrice.js +1 -1
  143. package/dist/components/MazInputPrice.vue.d.ts +48 -0
  144. package/dist/components/MazInputTags.js +6 -6
  145. package/dist/components/MazInputTags.vue.d.ts +51 -0
  146. package/dist/components/MazLazyImg.js +2 -2
  147. package/dist/components/MazLazyImg.vue.d.ts +78 -0
  148. package/dist/components/MazLink.vue.d.ts +115 -0
  149. package/dist/components/MazLoadingBar.vue.d.ts +12 -0
  150. package/dist/components/MazPagination.js +3 -3
  151. package/dist/components/MazPagination.vue.d.ts +83 -0
  152. package/dist/components/MazPopover.js +12 -12
  153. package/dist/components/MazPopover.vue.d.ts +256 -0
  154. package/dist/components/MazPullToRefresh.js +7 -7
  155. package/dist/components/MazPullToRefresh.vue.d.ts +52 -0
  156. package/dist/components/MazRadio.js +2 -2
  157. package/dist/components/MazRadio.vue.d.ts +55 -0
  158. package/dist/components/MazRadioButtons.js +2 -2
  159. package/dist/components/MazRadioButtons.vue.d.ts +69 -0
  160. package/dist/components/MazReadingProgressBar.js +8 -8
  161. package/dist/components/MazReadingProgressBar.vue.d.ts +55 -0
  162. package/dist/components/MazSelect.js +10 -10
  163. package/dist/components/MazSelect.vue.d.ts +178 -0
  164. package/dist/components/MazSelectCountry.js +15 -15
  165. package/dist/components/MazSelectCountry.vue.d.ts +171 -0
  166. package/dist/components/MazSlider/utils.d.ts +15 -0
  167. package/dist/components/MazSlider.js +36 -36
  168. package/dist/components/MazSlider.vue.d.ts +31 -0
  169. package/dist/components/MazSpinner.vue.d.ts +15 -0
  170. package/dist/components/MazStepper.js +2 -2
  171. package/dist/components/MazStepper.vue.d.ts +60 -0
  172. package/dist/components/MazSwitch.js +1 -1
  173. package/dist/components/MazSwitch.vue.d.ts +69 -0
  174. package/dist/components/MazTable.js +3 -3
  175. package/dist/components/MazTable.vue.d.ts +324 -0
  176. package/dist/components/MazTableCell.js +1 -1
  177. package/dist/components/MazTableCell.vue.d.ts +17 -0
  178. package/dist/components/MazTableRow.js +6 -5
  179. package/dist/components/MazTableRow.vue.d.ts +23 -0
  180. package/dist/components/MazTableTitle.js +1 -1
  181. package/dist/components/MazTableTitle.vue.d.ts +17 -0
  182. package/dist/components/MazTabs.vue.d.ts +30 -0
  183. package/dist/components/MazTabsBar.js +4 -4
  184. package/dist/components/MazTabsBar.vue.d.ts +96 -0
  185. package/dist/components/MazTabsContent.js +1 -1
  186. package/dist/components/MazTabsContent.vue.d.ts +17 -0
  187. package/dist/components/MazTabsContentItem.vue.d.ts +31 -0
  188. package/dist/components/MazTextarea.js +6 -6
  189. package/dist/components/MazTextarea.vue.d.ts +88 -0
  190. package/dist/components/constantes.d.ts +2 -0
  191. package/dist/components/index.d.ts +109 -0
  192. package/dist/components/index.js +8 -8
  193. package/dist/components/types.d.ts +4 -0
  194. package/dist/composables/index.d.ts +21 -0
  195. package/dist/composables/index.js +1 -1
  196. package/dist/composables/useAos.d.ts +2 -0
  197. package/dist/composables/useBreakpoints.d.ts +38 -0
  198. package/dist/composables/useDialog.d.ts +2 -0
  199. package/dist/composables/useDisplayNames.d.ts +101 -0
  200. package/dist/composables/useDisplayNames.js +10 -16
  201. package/dist/composables/useDropzone.d.ts +27 -0
  202. package/dist/composables/useDropzone.js +2 -2
  203. package/dist/composables/useFormField.d.ts +16 -0
  204. package/dist/composables/useFormField.js +2 -2
  205. package/dist/composables/useFormValidator/config.d.ts +7 -0
  206. package/dist/composables/useFormValidator/dom-events.d.ts +19 -0
  207. package/dist/composables/useFormValidator/state-management.d.ts +72 -0
  208. package/dist/composables/useFormValidator/types.d.ts +98 -0
  209. package/dist/composables/useFormValidator/validation.d.ts +37 -0
  210. package/dist/composables/useFormValidator.d.ts +23 -0
  211. package/dist/composables/useFormValidator.js +1 -1
  212. package/dist/composables/useFreezeValue.d.ts +5 -0
  213. package/dist/composables/useIdleTimeout.d.ts +5 -0
  214. package/dist/composables/useIdleTimeout.js +27 -27
  215. package/dist/composables/useInjectStrict.d.ts +2 -0
  216. package/dist/composables/useInstanceUniqId.d.ts +4 -0
  217. package/dist/composables/useMountComponent.d.ts +14 -0
  218. package/dist/composables/useReadingTime.d.ts +25 -0
  219. package/dist/composables/useStringMatching.d.ts +5 -0
  220. package/dist/composables/useStringMatching.js +1 -1
  221. package/dist/composables/useSwipe.d.ts +14 -0
  222. package/dist/composables/useSwipe.js +22 -22
  223. package/dist/composables/useTimer.d.ts +30 -0
  224. package/dist/composables/useToast.d.ts +22 -0
  225. package/dist/composables/useUserVisibility.d.ts +5 -0
  226. package/dist/composables/useUserVisibility.js +8 -8
  227. package/dist/composables/useWait.d.ts +2 -0
  228. package/dist/composables/useWindowSize.d.ts +32 -0
  229. package/dist/composables/useWindowSize.js +2 -2
  230. package/dist/css/main.css +1 -1
  231. package/dist/directives/index.d.ts +5 -0
  232. package/dist/directives/index.js +2 -2
  233. package/dist/directives/vClickOutside.d.ts +36 -0
  234. package/dist/directives/vClickOutside.js +1 -1
  235. package/dist/directives/vFullscreenImg/MazFullscreenImg.vue.d.ts +50 -0
  236. package/dist/directives/vFullscreenImg/fullscreen-img.directive.d.ts +5 -0
  237. package/dist/directives/vFullscreenImg/fullscreen-img.handler.d.ts +36 -0
  238. package/dist/directives/vFullscreenImg.d.ts +11 -0
  239. package/dist/directives/vFullscreenImg.js +1 -1
  240. package/dist/directives/vLazyImg/lazy-img.directive.d.ts +5 -0
  241. package/dist/directives/vLazyImg/lazy-img.handler.d.ts +38 -0
  242. package/dist/directives/vLazyImg/types.d.ts +29 -0
  243. package/dist/directives/vLazyImg.d.ts +12 -0
  244. package/dist/directives/vTooltip.d.ts +54 -0
  245. package/dist/directives/vZoomImg/style.d.ts +1 -0
  246. package/dist/directives/vZoomImg/svgs.d.ts +3 -0
  247. package/dist/directives/vZoomImg/zoom-img.directive.d.ts +8 -0
  248. package/dist/directives/vZoomImg/zoom-img.handler.d.ts +46 -0
  249. package/dist/directives/vZoomImg.d.ts +10 -0
  250. package/dist/index.d.ts +1 -0
  251. package/dist/plugins/aos.d.ts +81 -0
  252. package/dist/plugins/aos.js +5 -5
  253. package/dist/plugins/dialog/DialogHandler.d.ts +16 -0
  254. package/dist/plugins/dialog.d.ts +26 -0
  255. package/dist/plugins/dialog.js +1 -1
  256. package/dist/plugins/index.d.ts +5 -0
  257. package/dist/plugins/maz-ui.d.ts +43 -0
  258. package/dist/plugins/maz-ui.js +211 -373
  259. package/dist/plugins/toast/MazToast.vue.d.ts +34 -0
  260. package/dist/plugins/toast/ToastHandler.d.ts +29 -0
  261. package/dist/plugins/toast/types.d.ts +104 -0
  262. package/dist/plugins/toast.d.ts +25 -0
  263. package/dist/plugins/toast.js +2 -2
  264. package/dist/plugins/wait.d.ts +33 -0
  265. package/dist/resolvers/MazComponentsResolver.d.ts +10 -0
  266. package/dist/resolvers/MazComponentsResolver.js +2 -2
  267. package/dist/resolvers/MazDirectivesResolver.d.ts +11 -0
  268. package/dist/resolvers/MazDirectivesResolver.js +2 -2
  269. package/dist/resolvers/MazModulesResolver.d.ts +11 -0
  270. package/dist/resolvers/MazModulesResolver.js +3 -3
  271. package/dist/resolvers/index.d.ts +3 -0
  272. package/dist/tailwindcss/index.d.ts +6 -0
  273. package/dist/tailwindcss/tailwind.config.d.ts +89 -0
  274. package/dist/tailwindcss/utils/colors.d.ts +7 -0
  275. package/dist/tailwindcss/variables/breakpoints.d.ts +15 -0
  276. package/dist/tailwindcss/variables/colors.d.ts +20 -0
  277. package/dist/tailwindcss/variables/design-tokens.d.ts +35 -0
  278. package/dist/tailwindcss/variables/utilities.d.ts +17 -0
  279. package/dist/tailwindcss/variables/z-indexes.d.ts +14 -0
  280. package/dist/types/components/MazAnimatedCounter.vue.d.ts +1 -1
  281. package/dist/types/components/MazBackdrop.vue.d.ts +26 -6
  282. package/dist/types/components/MazCarousel.vue.d.ts +4 -4
  283. package/dist/types/components/MazChecklist.vue.d.ts +5 -5
  284. package/dist/types/components/MazDatePicker/utils.d.ts +2 -2
  285. package/dist/types/components/MazDatePicker.vue.d.ts +1 -1
  286. package/dist/types/components/MazDialog.vue.d.ts +10 -19
  287. package/dist/types/components/MazDialogConfirm.vue.d.ts +7 -11
  288. package/dist/types/components/MazDropdown.vue.d.ts +9 -2
  289. package/dist/types/components/MazInputNumber.vue.d.ts +1 -1
  290. package/dist/types/components/MazInputPhoneNumber.vue.d.ts +4 -4
  291. package/dist/types/components/MazInputPrice.vue.d.ts +1 -1
  292. package/dist/types/components/MazSelect.vue.d.ts +3 -3
  293. package/dist/types/components/MazSelectCountry.vue.d.ts +4 -4
  294. package/dist/types/components/MazTable.vue.d.ts +5 -5
  295. package/dist/types/components/MazTableRow.vue.d.ts +2 -0
  296. package/dist/types/composables/useDisplayNames.d.ts +60 -1
  297. package/dist/types/composables/useFormValidator.d.ts +1 -1
  298. package/dist/types/composables/useIdleTimeout.d.ts +1 -1
  299. package/dist/types/composables/useSwipe.d.ts +1 -1
  300. package/dist/types/composables/useUserVisibility.d.ts +1 -1
  301. package/dist/types/plugins/maz-ui.d.ts +5 -5
  302. package/package.json +30 -18
  303. package/dist/assets/MazAnimatedText.DDqCxrFX.css +0 -1
  304. package/dist/assets/MazBackdrop.BnhcmjbP.css +0 -1
  305. package/dist/assets/MazBtn.BYOKMl_2.css +0 -1
  306. package/dist/assets/MazCard.D0ksni8A.css +0 -1
  307. package/dist/assets/MazCardSpotlight.IbPp_y0j.css +0 -1
  308. package/dist/assets/MazCarousel.D4zTkRsG.css +0 -1
  309. package/dist/assets/MazChecklist.BzF5KtZ3.css +0 -1
  310. package/dist/assets/MazDatePicker.BUVI9tfN.css +0 -1
  311. package/dist/assets/MazDropdown.C6vjLIeN.css +0 -1
  312. package/dist/assets/MazDropzone.C2SunLAI.css +0 -1
  313. package/dist/assets/MazGallery.DZ3TyggM.css +0 -1
  314. package/dist/assets/MazInput.BPhjbYZG.css +0 -1
  315. package/dist/assets/MazInputCode.FA2z4HQd.css +0 -1
  316. package/dist/assets/MazInputPhoneNumber.DQKElfIM.css +0 -1
  317. package/dist/assets/MazInputTags.KNTpDHof.css +0 -1
  318. package/dist/assets/MazLazyImg.NlPRN3Nk.css +0 -1
  319. package/dist/assets/MazPickerCalendarMonth.BRoEh_ad.css +0 -1
  320. package/dist/assets/MazPickerMonthSwitcher.D9lfVzYo.css +0 -1
  321. package/dist/assets/MazPopover.BkR4UUzj.css +0 -1
  322. package/dist/assets/MazPullToRefresh.BQ64UvzA.css +0 -1
  323. package/dist/assets/MazRadioButtons.DN_rAzT9.css +0 -1
  324. package/dist/assets/MazReadingProgressBar.CwBVXE3g.css +0 -1
  325. package/dist/assets/MazSelect.DuRAHZGW.css +0 -1
  326. package/dist/assets/MazSlider.y4qpnD0N.css +0 -1
  327. package/dist/assets/MazSwitch.Bxmh2iFj.css +0 -1
  328. package/dist/assets/MazTable.DMlQdImb.css +0 -1
  329. package/dist/assets/MazTableRow.DgBXpK9J.css +0 -1
  330. package/dist/assets/MazTextarea.li9dWBax.css +0 -1
  331. package/dist/chunks/capitalize.BF6CDS_4.js +0 -6
  332. package/dist/chunks/checkAvailability.aTpZidex.js +0 -16
  333. package/dist/chunks/de.B15Maq8Z.js +0 -82
  334. package/dist/chunks/debounce.Brzkn9pm.js +0 -11
  335. package/dist/chunks/en.Q_4-KljL.js +0 -157
  336. package/dist/chunks/es.BV1TlfTw.js +0 -82
  337. package/dist/chunks/fr.BVPG-7Dk.js +0 -82
  338. package/dist/chunks/it.Be9xhI4P.js +0 -82
  339. package/dist/chunks/ja.CWU7KYEA.js +0 -82
  340. package/dist/chunks/pascalCase.GdDKKQ-O.js +0 -19
  341. package/dist/chunks/pt.CfaFSxVt.js +0 -82
  342. package/dist/chunks/sleep.BLRH1qZG.js +0 -6
  343. package/dist/chunks/truthyFilter.C2WOKUCG.js +0 -6
  344. package/dist/chunks/useTranslations.D5aoYwD7.js +0 -10
  345. package/dist/chunks/zh-CN.CCkuvk-E.js +0 -82
@@ -1,73 +1,59 @@
1
- import { reactive, ref } from "vue";
2
- function parseHSL(hsl) {
3
- const match = hsl.match(/^(\d+(?:\.\d+)?)\s+(\d+(?:\.\d+)?)%\s+(\d+(?:\.\d+)?)%$/);
4
- if (!match)
5
- throw new Error(`Invalid HSL format: ${hsl}`);
1
+ import { reactive } from "vue";
2
+ import { MazUiTranslations } from "@maz-ui/translations";
3
+ function l(n2) {
4
+ const t2 = n2.match(/^(\d+(?:\.\d+)?)\s+(\d+(?:\.\d+)?)%\s+(\d+(?:\.\d+)?)%$/);
5
+ if (!t2)
6
+ throw new Error(`Invalid HSL format: ${n2}`);
6
7
  return {
7
- h: Number.parseFloat(match[1]),
8
- s: Number.parseFloat(match[2]),
9
- l: Number.parseFloat(match[3])
8
+ h: Number.parseFloat(t2[1]),
9
+ s: Number.parseFloat(t2[2]),
10
+ l: Number.parseFloat(t2[3])
10
11
  };
11
12
  }
12
- function formatHSL(h, s, l) {
13
- const roundedH = Math.round(h * 10) / 10, roundedS = Math.round(s * 10) / 10, roundedL = Math.round(l * 10) / 10;
14
- return `${roundedH} ${roundedS}% ${roundedL}%`;
13
+ function i(n2, t2, r) {
14
+ const o2 = Math.round(n2 * 10) / 10, s = Math.round(t2 * 10) / 10, e = Math.round(r * 10) / 10;
15
+ return `${o2} ${s}% ${e}%`;
15
16
  }
16
- const LUMINOSITY_OFFSETS = {
17
+ const d = {
17
18
  50: 37.5,
18
- // Base + 50% = very light
19
19
  100: 30,
20
- // Base + 35% = light
21
20
  200: 22.5,
22
- // Base + 20% = moderately light
23
21
  300: 15,
24
- // Base + 10% = slightly lighter
25
22
  400: 7.5,
26
- // Base + 5% = slightly lighter
27
23
  500: 0,
28
- // Base (original color)
29
24
  600: -7.5,
30
- // Base - 5% = slightly darker
31
25
  700: -15,
32
- // Base - 15% = dark
33
26
  800: -22.5,
34
- // Base - 20% = very dark
35
- 900: -30
36
- // Base - 25% = extremely dark
27
+ 900: -30,
28
+ 950: -37.5
37
29
  };
38
- function calculateSaturationMultiplier(baseVariant, targetVariant, baseSaturation) {
39
- if (targetVariant === baseVariant)
30
+ function p$1(n2, t2, r) {
31
+ if (t2 === n2)
40
32
  return 1;
41
- const saturationFactor = Math.min(baseSaturation / 100, 1), variantDiff = Math.abs(targetVariant - baseVariant);
42
- if (targetVariant < baseVariant) {
43
- const reduction = variantDiff / 500 * 0.25 * saturationFactor;
44
- return Math.max(0.3, 1 - reduction);
33
+ const o2 = Math.min(r / 100, 1), s = Math.abs(t2 - n2);
34
+ if (t2 < n2) {
35
+ const e = s / 500 * 0.25 * o2;
36
+ return Math.max(0.3, 1 - e);
45
37
  } else {
46
- const increase = variantDiff / 400 * 0.15 * saturationFactor;
47
- return Math.min(1.3, 1 + increase);
38
+ const e = s / 400 * 0.15 * o2;
39
+ return Math.min(1.3, 1 + e);
48
40
  }
49
41
  }
50
- function generateColorScale(baseColor) {
51
- const { h, s, l } = parseHSL(baseColor), baseVariant = 500, baseLuminosity = l, variants = [50, 100, 200, 300, 400, 500, 600, 700, 800, 900], scale = {};
52
- return variants.forEach((variant) => {
53
- if (variant === baseVariant)
54
- scale[variant.toString()] = formatHSL(h, s, l);
42
+ function b(n2) {
43
+ const { h: t2, s: r, l: o2 } = l(n2), s = 500, e = o2, m2 = Object.keys(d).map(Number), u2 = {};
44
+ return m2.forEach((c2) => {
45
+ if (c2 === s)
46
+ u2[c2] = i(t2, r, o2);
55
47
  else {
56
- const luminosityOffset = LUMINOSITY_OFFSETS[variant];
57
- let targetLuminosity = baseLuminosity + luminosityOffset;
58
- targetLuminosity = Math.min(95, Math.max(5, targetLuminosity));
59
- const saturationMultiplier = calculateSaturationMultiplier(baseVariant, variant, s), adjustedSaturation = Math.min(100, Math.max(5, s * saturationMultiplier));
60
- scale[variant.toString()] = formatHSL(h, adjustedSaturation, targetLuminosity);
48
+ const h2 = c2 < s, f2 = c2 > s, M2 = d[c2];
49
+ let a;
50
+ h2 && o2 >= 100 ? a = e : a = e + M2, f2 && o2 <= 0 && (a = 0), a = Math.min(100, Math.max(0, a));
51
+ const S2 = p$1(s, c2, r), L = Math.min(100, Math.max(5, r * S2));
52
+ u2[c2] = i(t2, L, a);
61
53
  }
62
- }), scale;
54
+ }), u2;
63
55
  }
64
- function getCookie(key) {
65
- if (typeof document > "u")
66
- return null;
67
- const cookie = document.cookie.split(";").find((c) => c.trim().startsWith(`${key}=`));
68
- return cookie ? decodeURIComponent(cookie.split("=")[1]) : null;
69
- }
70
- const DEFAULT_CRITICAL_COLORS = [
56
+ const h = [
71
57
  "background",
72
58
  "foreground",
73
59
  "primary",
@@ -89,418 +75,270 @@ const DEFAULT_CRITICAL_COLORS = [
89
75
  "muted",
90
76
  "shadow",
91
77
  "border"
92
- ], DEFAULT_CRITICAL_FOUNDATION = [
78
+ ], C = [
93
79
  "radius",
94
80
  "font-family",
95
81
  "base-font-size",
96
82
  "border-width"
97
- ], scaleColors = ["primary", "secondary", "accent", "destructive", "success", "warning", "info", "contrast", "background", "foreground", "border", "muted", "overlay", "shadow"];
98
- function generateCriticalCSS(preset, options = {
83
+ ], S = ["primary", "secondary", "accent", "destructive", "success", "warning", "info", "contrast", "background", "foreground", "border", "muted", "overlay", "shadow"];
84
+ function j(e, o2 = {
99
85
  mode: "both",
100
86
  darkSelectorStrategy: "class"
101
87
  }) {
102
88
  const {
103
- criticalColors = DEFAULT_CRITICAL_COLORS,
104
- criticalFoundation = DEFAULT_CRITICAL_FOUNDATION,
105
- mode,
106
- darkSelectorStrategy,
107
- prefix = "maz"
108
- } = options, foundationCritical = extractCriticalFoundation(preset.foundation, criticalFoundation);
109
- let css = `@layer maz-ui-theme {
89
+ criticalColors: r = h,
90
+ criticalFoundation: c2 = C,
91
+ mode: t2,
92
+ darkSelectorStrategy: s,
93
+ prefix: i2 = "maz"
94
+ } = o2, l2 = y(e.foundation, c2);
95
+ let n2 = `@layer maz-ui-theme {
110
96
  `;
111
- if (mode === "light" || mode === "both") {
112
- const lightCritical = extractCriticalVariables(preset.colors.light, criticalColors);
113
- css += generateVariablesBlock({
97
+ if (t2 === "light" || t2 === "both") {
98
+ const a = m(e.colors.light, r);
99
+ n2 += f$1({
114
100
  selector: ":root",
115
- colors: lightCritical,
116
- foundation: foundationCritical,
117
- prefix
101
+ colors: a,
102
+ foundation: l2,
103
+ prefix: i2
118
104
  });
119
105
  }
120
- if (mode === "dark" || mode === "both") {
121
- const darkCritical = extractCriticalVariables(preset.colors.dark, criticalColors);
122
- css += generateVariablesBlock({
123
- selector: darkSelectorStrategy === "media" ? ":root" : ".dark",
124
- mediaQuery: darkSelectorStrategy === "media" ? "@media (prefers-color-scheme: dark)" : void 0,
125
- colors: darkCritical,
126
- foundation: foundationCritical,
127
- prefix
106
+ if (t2 === "dark" || t2 === "both") {
107
+ const a = m(e.colors.dark, r);
108
+ n2 += f$1({
109
+ selector: s === "media" ? ":root" : ".dark",
110
+ mediaQuery: s === "media" ? "@media (prefers-color-scheme: dark)" : void 0,
111
+ colors: a,
112
+ foundation: l2,
113
+ prefix: i2
128
114
  });
129
115
  }
130
- return css += `}
131
- `, css;
116
+ return n2 += `}
117
+ `, n2;
132
118
  }
133
- function generateFullCSS(preset, options = {
119
+ function p(e, o2 = {
134
120
  mode: "both",
135
121
  darkSelectorStrategy: "class"
136
122
  }) {
137
123
  const {
138
- excludeCritical = DEFAULT_CRITICAL_COLORS,
139
- mode,
140
- darkSelectorStrategy,
141
- prefix = "maz",
142
- includeColorScales = !0
143
- } = options, foundation = excludeFoundationVariables(preset.foundation, DEFAULT_CRITICAL_FOUNDATION);
144
- let css = `@layer maz-ui-theme {
124
+ excludeCritical: r = h,
125
+ mode: c2,
126
+ darkSelectorStrategy: t2,
127
+ prefix: s = "maz",
128
+ includeColorScales: i2 = !0
129
+ } = o2, l2 = k$1(e.foundation, C);
130
+ let n2 = `@layer maz-ui-theme {
145
131
  `;
146
- if (mode === "light" || mode === "both") {
147
- const lightColors = excludeVariables(preset.colors.light, excludeCritical);
148
- css += generateVariablesBlock({
132
+ if (c2 === "light" || c2 === "both") {
133
+ const a = g$1(e.colors.light, r);
134
+ n2 += f$1({
149
135
  selector: ":root",
150
- colors: lightColors,
151
- foundation,
152
- prefix,
153
- includeScales: includeColorScales,
154
- preset
136
+ colors: a,
137
+ foundation: l2,
138
+ prefix: s,
139
+ includeScales: i2,
140
+ preset: e
155
141
  });
156
142
  }
157
- if (mode === "dark" || mode === "both") {
158
- const darkColors = excludeVariables(preset.colors.dark, excludeCritical);
159
- css += generateVariablesBlock({
160
- selector: darkSelectorStrategy === "media" ? ":root" : ".dark",
161
- mediaQuery: darkSelectorStrategy === "media" ? "@media (prefers-color-scheme: dark)" : void 0,
162
- colors: darkColors,
163
- foundation: mode === "dark" ? foundation : void 0,
143
+ if (c2 === "dark" || c2 === "both") {
144
+ const a = g$1(e.colors.dark, r);
145
+ n2 += f$1({
146
+ selector: t2 === "media" ? ":root" : ".dark",
147
+ mediaQuery: t2 === "media" ? "@media (prefers-color-scheme: dark)" : void 0,
148
+ colors: a,
149
+ foundation: c2 === "dark" ? l2 : void 0,
164
150
  // Appearance only if dark mode only
165
- prefix,
166
- includeScales: includeColorScales,
167
- preset,
151
+ prefix: s,
152
+ includeScales: i2,
153
+ preset: e,
168
154
  isDark: !0
169
155
  });
170
156
  }
171
- return css += `}
172
- `, css;
157
+ return n2 += `}
158
+ `, n2;
173
159
  }
174
- function extractCriticalVariables(colors, criticalKeys) {
160
+ function m(e, o2) {
175
161
  return Object.fromEntries(
176
- criticalKeys.filter((key) => colors[key]).map((key) => [key, colors[key]])
162
+ o2.filter((r) => e[r]).map((r) => [r, e[r]])
177
163
  );
178
164
  }
179
- function extractCriticalFoundation(foundation, criticalKeys) {
180
- return foundation ? Object.fromEntries(
181
- criticalKeys.filter((key) => foundation[key]).map((key) => [key, foundation[key]])
165
+ function y(e, o2) {
166
+ return e ? Object.fromEntries(
167
+ o2.filter((r) => e[r]).map((r) => [r, e[r]])
182
168
  ) : {};
183
169
  }
184
- function excludeVariables(colors, excludeKeys) {
170
+ function g$1(e, o2) {
185
171
  return Object.fromEntries(
186
- Object.entries(colors).filter(([key]) => !excludeKeys.includes(key))
172
+ Object.entries(e).filter(([r]) => !o2.includes(r))
187
173
  );
188
174
  }
189
- function excludeFoundationVariables(foundation, excludeKeys) {
190
- return foundation ? Object.fromEntries(
191
- Object.entries(foundation).filter(([key]) => !excludeKeys.includes(key))
175
+ function k$1(e, o2) {
176
+ return e ? Object.fromEntries(
177
+ Object.entries(e).filter(([r]) => !o2.includes(r))
192
178
  ) : {};
193
179
  }
194
- function generateVariablesBlock({
195
- selector,
196
- mediaQuery,
197
- colors,
198
- foundation,
199
- prefix,
200
- includeScales = !1,
201
- preset,
202
- isDark = !1
180
+ function f$1({
181
+ selector: e,
182
+ mediaQuery: o2,
183
+ colors: r,
184
+ foundation: c2,
185
+ prefix: t2,
186
+ includeScales: s = !1,
187
+ preset: i2,
188
+ isDark: l2 = !1
203
189
  }) {
204
- const variables = [];
205
- if (colors && Object.entries(colors).forEach(([key, value]) => {
206
- value && variables.push(` --${prefix}-${key}: ${value};`);
207
- }), foundation && Object.entries(foundation).forEach(([key, value]) => {
208
- value && variables.push(` --${prefix}-${key}: ${value};`);
209
- }), includeScales && preset) {
210
- const sourceColors = isDark ? preset.colors.dark : preset.colors.light, colorScales = generateAllColorScales(sourceColors, prefix);
211
- variables.push(...colorScales);
190
+ const n2 = [];
191
+ if (r && Object.entries(r).forEach(([u2, d2]) => {
192
+ d2 && n2.push(` --${t2}-${u2}: ${d2};`);
193
+ }), c2 && Object.entries(c2).forEach(([u2, d2]) => {
194
+ d2 && n2.push(` --${t2}-${u2}: ${d2};`);
195
+ }), s && i2) {
196
+ const u2 = l2 ? i2.colors.dark : i2.colors.light, d2 = E(u2, t2);
197
+ n2.push(...d2);
212
198
  }
213
- const content = variables.join(`
199
+ const a = n2.join(`
214
200
  `);
215
- return mediaQuery ? `
216
- ${mediaQuery} {
217
- ${selector} {
218
- ${content.replace(/^/gm, " ")}
201
+ return o2 ? `
202
+ ${o2} {
203
+ ${e} {
204
+ ${a.replace(/^/gm, " ")}
219
205
  }
220
206
  }
221
207
  ` : `
222
- ${selector} {
223
- ${content}
208
+ ${e} {
209
+ ${a}
224
210
  }
225
211
  `;
226
212
  }
227
- function generateAllColorScales(colors, prefix) {
228
- const colorScales = [];
229
- return scaleColors.forEach((colorName) => {
230
- const baseColor = colors[colorName];
231
- if (baseColor) {
232
- const scale = generateColorScale(baseColor);
233
- Object.entries(scale).forEach(([scaleKey, scaleValue]) => {
234
- colorScales.push(` --${prefix}-${colorName}-${scaleKey}: ${scaleValue};`);
213
+ function E(e, o2) {
214
+ const r = [];
215
+ return S.forEach((c2) => {
216
+ const t2 = e[c2];
217
+ if (t2) {
218
+ const s = b(t2);
219
+ Object.entries(s).forEach(([i2, l2]) => {
220
+ r.push(` --${o2}-${c2}-${i2}: ${l2};`);
235
221
  });
236
222
  }
237
- }), colorScales;
223
+ }), r;
238
224
  }
239
- var CSS_IDS = /* @__PURE__ */ ((CSS_IDS2) => (CSS_IDS2.FULL = "maz-theme-full", CSS_IDS2.CRITICAL = "maz-theme-critical", CSS_IDS2))(CSS_IDS || {});
240
- function injectCSS(id, css) {
225
+ var $ = /* @__PURE__ */ ((e) => (e.FULL = "maz-theme-full", e.CRITICAL = "maz-theme-critical", e))($ || {});
226
+ function v$1(e, o2) {
241
227
  if (typeof document > "u")
242
228
  return;
243
- let styleElement = document.getElementById(id);
244
- styleElement || (styleElement = document.createElement("style"), styleElement.id = id, document.head.appendChild(styleElement)), styleElement.textContent = css;
229
+ let r = document.getElementById(e);
230
+ r || (r = document.createElement("style"), r.id = e, document.head.appendChild(r)), r.textContent = o2;
231
+ }
232
+ function c(e) {
233
+ if (typeof document > "u")
234
+ return null;
235
+ const t2 = document.cookie.split(";").find((n2) => n2.trim().startsWith(`${e}=`));
236
+ return t2 ? decodeURIComponent(t2.split("=")[1]) : null;
237
+ }
238
+ function o$1(e) {
239
+ if (e && ["light", "dark"].includes(e))
240
+ return e;
241
+ const t2 = c("maz-color-mode");
242
+ return t2 && ["light", "dark"].includes(t2) ? t2 : "auto";
245
243
  }
246
- function isPresetObject(preset) {
247
- return typeof preset == "object" && preset !== null && !!preset.name;
244
+ function n() {
245
+ return typeof globalThis.window < "u" && typeof globalThis.matchMedia == "function" && globalThis.matchMedia("(prefers-color-scheme: dark)").matches;
248
246
  }
249
- async function getPreset(preset) {
250
- if (isPresetObject(preset))
251
- return preset;
252
- if (preset === "mazUi" || !preset || preset === "maz-ui") {
253
- const { mazUi } = await import("../chunks/mazUi.D6UdqpTO.js");
254
- return mazUi;
247
+ function t(i2) {
248
+ return typeof i2 == "object" && i2 !== null && !!i2.name;
249
+ }
250
+ async function o(i2) {
251
+ if (t(i2))
252
+ return i2;
253
+ if (i2 === "mazUi" || !i2 || i2 === "maz-ui") {
254
+ const { mazUi: n2 } = await import("../chunks/mazUi.0b7z2u9g.js");
255
+ return n2;
255
256
  }
256
- if (preset === "ocean") {
257
- const { ocean } = await import("../chunks/ocean.pHrY5H_S.js");
258
- return ocean;
257
+ if (i2 === "ocean") {
258
+ const { ocean: n2 } = await import("../chunks/ocean.ehMlC0HV.js");
259
+ return n2;
259
260
  }
260
- if (preset === "pristine") {
261
- const { pristine } = await import("../chunks/pristine.CxBZzgUG.js");
262
- return pristine;
261
+ if (i2 === "pristine") {
262
+ const { pristine: n2 } = await import("../chunks/pristine.DMG3eBuN.js");
263
+ return n2;
263
264
  }
264
- if (preset === "obsidian") {
265
- const { obsidian } = await import("../chunks/obsidian.Cy0R8RHy.js");
266
- return obsidian;
265
+ if (i2 === "obsidian") {
266
+ const { obsidian: n2 } = await import("../chunks/obsidian.C6upWOVF.js");
267
+ return n2;
267
268
  }
268
- throw new TypeError(`[@maz-ui/themes] Preset ${preset} not found`);
269
+ throw new TypeError(`[@maz-ui/themes] Preset ${i2} not found`);
269
270
  }
270
- function mergePresets(base, overrides) {
271
+ function f(n2, o2) {
271
272
  return {
272
- name: overrides.name || base.name,
273
+ name: o2.name || n2.name,
273
274
  foundation: {
274
- ...base.foundation,
275
- ...overrides.foundation
275
+ ...n2.foundation,
276
+ ...o2.foundation
276
277
  },
277
278
  colors: {
278
- light: mergeColors(base.colors.light, overrides.colors?.light),
279
- dark: mergeColors(base.colors.dark, overrides.colors?.dark)
279
+ light: u(n2.colors.light, o2.colors?.light),
280
+ dark: u(n2.colors.dark, o2.colors?.dark)
280
281
  }
281
282
  };
282
283
  }
283
- function mergeColors(base, overrides) {
284
- return overrides ? {
285
- ...base,
286
- ...overrides
287
- } : base;
284
+ function u(n2, o2) {
285
+ return o2 ? {
286
+ ...n2,
287
+ ...o2
288
+ } : n2;
288
289
  }
289
- function getColorMode(colorMode) {
290
- if (colorMode && ["light", "dark"].includes(colorMode))
291
- return colorMode;
292
- const savedMode = getCookie("maz-color-mode");
293
- return savedMode && ["light", "dark"].includes(savedMode) ? savedMode : "auto";
290
+ function g(r, t2) {
291
+ typeof document > "u" || r !== "class" || (t2 ? document.documentElement.classList.add("dark") : document.documentElement.classList.remove("dark"));
294
292
  }
295
- function isSystemPrefersDark() {
296
- return typeof globalThis.window < "u" && typeof globalThis.matchMedia == "function" && globalThis.matchMedia("(prefers-color-scheme: dark)").matches;
297
- }
298
- function applyDarkMode(darkModeStrategy, isDark) {
299
- typeof document > "u" || darkModeStrategy !== "class" || (isDark ? document.documentElement.classList.add("dark") : document.documentElement.classList.remove("dark"));
300
- }
301
- function injectThemeCSS(finalPreset, config) {
293
+ function k(r, t2) {
302
294
  if (typeof document > "u")
303
295
  return;
304
- const cssOptions = {
305
- mode: config.mode,
306
- darkSelectorStrategy: config.darkModeStrategy
296
+ const e = {
297
+ mode: t2.mode,
298
+ darkSelectorStrategy: t2.darkModeStrategy
307
299
  };
308
- if (config.injectCriticalCSS) {
309
- const criticalCSS = generateCriticalCSS(finalPreset, cssOptions);
310
- injectCSS(CSS_IDS.CRITICAL, criticalCSS);
300
+ if (t2.injectCriticalCSS) {
301
+ const a = j(r, e);
302
+ v$1($.CRITICAL, a);
311
303
  }
312
- if (!config.injectFullCSS)
304
+ if (!t2.injectFullCSS)
313
305
  return;
314
- const fullCSS = generateFullCSS(finalPreset, cssOptions);
315
- config.strategy === "runtime" ? injectCSS(CSS_IDS.FULL, fullCSS) : config.strategy === "hybrid" && requestIdleCallback(() => {
316
- injectCSS(CSS_IDS.FULL, fullCSS);
306
+ const o2 = p(r, e);
307
+ t2.strategy === "runtime" ? v$1($.FULL, o2) : t2.strategy === "hybrid" && requestIdleCallback(() => {
308
+ v$1($.FULL, o2);
317
309
  }, { timeout: 100 });
318
310
  }
319
- function injectThemeState(app, themeState) {
320
- app.provide("mazThemeState", themeState), app.config.globalProperties.$mazThemeState = themeState;
311
+ function M(r, t2) {
312
+ r.provide("mazThemeState", t2), r.config.globalProperties.$mazThemeState = t2;
321
313
  }
322
- const MazUiTheme = {
323
- async install(app, options = {}) {
324
- const config = {
325
- preset: "maz-ui",
314
+ const v = {
315
+ async install(r, t2) {
316
+ const e = {
326
317
  strategy: "runtime",
327
318
  overrides: {},
328
319
  darkModeStrategy: "class",
329
- colorMode: (options.mode !== "both" ? options.mode : options.colorMode) ?? "auto",
320
+ colorMode: (t2?.mode !== "both" ? t2?.mode : t2?.colorMode) ?? "auto",
330
321
  injectCriticalCSS: !0,
331
322
  injectFullCSS: !0,
332
323
  mode: "both",
333
- ...options
334
- }, colorMode = config.mode !== "both" ? config.mode : getColorMode(config.colorMode), isDark = colorMode === "auto" && config.mode === "both" ? isSystemPrefersDark() : colorMode === "dark" || config.mode === "dark", themeState = reactive({
324
+ ...t2
325
+ }, o$2 = e.mode !== "both" ? e.mode : o$1(e.colorMode), a = o$2 === "auto" && e.mode === "both" ? n() : o$2 === "dark" || e.mode === "dark", s = reactive({
335
326
  // @ts-expect-error - empty currentPreset to avoid error
336
327
  currentPreset: {},
337
- mode: config.mode,
338
- colorMode,
339
- isDark,
340
- strategy: config.strategy,
341
- darkModeStrategy: config.darkModeStrategy
328
+ mode: e.mode,
329
+ colorMode: o$2,
330
+ isDark: a,
331
+ strategy: e.strategy,
332
+ darkModeStrategy: e.darkModeStrategy
342
333
  });
343
- applyDarkMode(config.darkModeStrategy, isDark), injectThemeState(app, themeState);
344
- const preset = await getPreset(config.preset), finalPreset = Object.keys(config.overrides).length > 0 ? mergePresets(preset, config.overrides) : preset;
345
- themeState.currentPreset = finalPreset, config.strategy !== "buildtime" && injectThemeCSS(finalPreset, config);
346
- }
347
- }, defaultLocalesLoaders = {
348
- "./locales/de.ts": () => import("../chunks/de.B15Maq8Z.js").then((m) => ({ default: m.default })),
349
- "./locales/en.ts": () => import("../chunks/en.Q_4-KljL.js").then((m) => ({ default: m.default })),
350
- "./locales/es.ts": () => import("../chunks/es.BV1TlfTw.js").then((m) => ({ default: m.default })),
351
- "./locales/fr.ts": () => import("../chunks/fr.BVPG-7Dk.js").then((m) => ({ default: m.default })),
352
- "./locales/it.ts": () => import("../chunks/it.Be9xhI4P.js").then((m) => ({ default: m.default })),
353
- "./locales/ja.ts": () => import("../chunks/ja.CWU7KYEA.js").then((m) => ({ default: m.default })),
354
- "./locales/pt.ts": () => import("../chunks/pt.CfaFSxVt.js").then((m) => ({ default: m.default })),
355
- "./locales/zh-CN.ts": () => import("../chunks/zh-CN.CCkuvk-E.js").then((m) => ({ default: m.default }))
356
- }, defaultMessagesCache = /* @__PURE__ */ new Map(), globalState = reactive({
357
- loadedLocales: /* @__PURE__ */ new Set(),
358
- messages: {},
359
- userMessages: {},
360
- loadingPromises: /* @__PURE__ */ new Map()
361
- });
362
- function getMessage(obj, path) {
363
- return path.split(".").reduce((current, key) => current?.[key], obj);
364
- }
365
- function setMessage(obj, path, value) {
366
- const keys = path.split("."), lastKey = keys.pop(), target = keys.reduce((current, key) => ((!current[key] || typeof current[key] != "object") && (current[key] = {}), current[key]), obj);
367
- target[lastKey] = value;
368
- }
369
- function isFlattenedObject(obj) {
370
- return !obj || typeof obj != "object" ? !1 : Object.keys(obj).some((key) => key.includes("."));
371
- }
372
- function flattenToNested(flatObj) {
373
- if (!isFlattenedObject(flatObj))
374
- return flatObj;
375
- const nested = {};
376
- for (const [key, value] of Object.entries(flatObj))
377
- key.includes(".") ? setMessage(nested, key, value) : nested[key] = value;
378
- return nested;
379
- }
380
- function mergeMessages(target, source) {
381
- const normalizedSource = flattenToNested(source), result = { ...flattenToNested(target) };
382
- for (const key in normalizedSource)
383
- normalizedSource[key] && typeof normalizedSource[key] == "object" ? result[key] = mergeMessages(result[key] || {}, normalizedSource[key]) : result[key] = normalizedSource[key];
384
- return result;
385
- }
386
- function interpolate(message, variables) {
387
- return variables ? message.replace(/\{(\w+)\}/g, (match, key) => variables[key] !== void 0 ? String(variables[key]) : match) : message;
388
- }
389
- async function loadDefaultMessages(locale) {
390
- if (defaultMessagesCache.has(locale))
391
- return defaultMessagesCache.get(locale);
392
- const loaderPath = `./locales/${locale}.ts`, loader = defaultLocalesLoaders[loaderPath];
393
- if (!loader)
394
- return {};
395
- try {
396
- const messages = (await loader()).default;
397
- return defaultMessagesCache.set(locale, messages), messages;
398
- } catch (error) {
399
- return console.error(`Failed to load default messages for locale "${locale}":`, error), {};
400
- }
401
- }
402
- function loadLocale(targetLocale) {
403
- if (globalState.loadedLocales.has(targetLocale))
404
- return Promise.resolve();
405
- if (globalState.loadingPromises.has(targetLocale))
406
- return globalState.loadingPromises.get(targetLocale);
407
- const loadingPromise = (async () => {
408
- try {
409
- const localeDefaultMessages = await loadDefaultMessages(targetLocale);
410
- let localeUserMessages = {};
411
- const userLoader = globalState.userMessages[targetLocale];
412
- if (userLoader)
413
- if (typeof userLoader == "function")
414
- try {
415
- const userMessages = await userLoader();
416
- localeUserMessages = "default" in userMessages ? userMessages.default : userMessages;
417
- } catch (error) {
418
- console.error(`Failed to load user translations for locale "${targetLocale}":`, error), localeUserMessages = {};
419
- }
420
- else
421
- localeUserMessages = userLoader;
422
- globalState.messages[targetLocale] = mergeMessages(localeDefaultMessages, localeUserMessages), globalState.loadedLocales.add(targetLocale);
423
- } catch (error) {
424
- console.error(`Failed to load translations for locale "${targetLocale}":`, error), globalState.messages[targetLocale] = {}, globalState.loadedLocales.add(targetLocale);
425
- } finally {
426
- globalState.loadingPromises.delete(targetLocale);
427
- }
428
- })();
429
- return globalState.loadingPromises.set(targetLocale, loadingPromise), loadingPromise;
430
- }
431
- function createMazTranslations(options = {}) {
432
- const {
433
- locale: initialLocale = "en",
434
- fallbackLocale = "en",
435
- preloadFallback = !0,
436
- messages = {}
437
- } = options, locale = ref(initialLocale);
438
- for (const [loc, msgs] of Object.entries(messages))
439
- globalState.userMessages[loc] = msgs, msgs && typeof msgs == "object" && (globalState.messages[loc] = { ...globalState.messages[loc], ...msgs });
440
- setTimeout(() => {
441
- loadLocale(initialLocale).catch(console.error), preloadFallback && fallbackLocale !== initialLocale && loadLocale(fallbackLocale).catch(console.error);
442
- }, 0);
443
- function t(key, variables) {
444
- let message = getMessage(globalState.messages[locale.value], key);
445
- if (!message && fallbackLocale && locale.value !== fallbackLocale) {
446
- if (!globalState.loadedLocales.has(fallbackLocale))
447
- return loadLocale(fallbackLocale).catch(console.error), key;
448
- message = getMessage(globalState.messages[fallbackLocale], key);
449
- }
450
- if (!message && fallbackLocale !== "en" && locale.value !== "en") {
451
- if (!globalState.loadedLocales.has("en"))
452
- return loadLocale("en").catch(console.error), key;
453
- message = getMessage(globalState.messages.en, key);
454
- }
455
- return message ? interpolate(String(message), variables) : (console.warn(`[@maz-ui/translations] Translation not found for key: ${key}`), key);
456
- }
457
- async function setLocale(newLocale) {
458
- globalState.loadedLocales.has(newLocale) || await loadLocale(newLocale), locale.value = newLocale;
459
- }
460
- function isLocaleLoaded(localeToCheck) {
461
- return globalState.loadedLocales.has(localeToCheck);
462
- }
463
- function isLocaleLoading(localeToCheck) {
464
- return globalState.loadingPromises.has(localeToCheck);
465
- }
466
- function getAvailableLocales() {
467
- const locales = /* @__PURE__ */ new Set();
468
- for (const [path, loader] of Object.entries(defaultLocalesLoaders))
469
- loader && typeof loader == "function" && locales.add(path.replace("./locales/", "").replace(".ts", ""));
470
- for (const path of Object.keys(globalState.userMessages))
471
- locales.add(path);
472
- return Array.from(locales);
473
- }
474
- function getMessages() {
475
- return globalState.messages;
476
- }
477
- function getLoadedLocales() {
478
- return Object.keys(globalState.messages);
479
- }
480
- function setLocaleMessage(targetLocale, messages2) {
481
- globalState.messages[targetLocale] || (globalState.messages[targetLocale] = {}), globalState.messages[targetLocale] = mergeMessages(globalState.messages[targetLocale], messages2), globalState.loadedLocales.add(targetLocale);
482
- }
483
- return {
484
- locale,
485
- t,
486
- setLocale,
487
- isLocaleLoaded,
488
- isLocaleLoading,
489
- getAvailableLocales,
490
- setLocaleMessage,
491
- getMessages,
492
- getLoadedLocales
493
- };
494
- }
495
- const MazTranslations = {
496
- install(app, options = {}) {
497
- const i18n = createMazTranslations(options);
498
- return app.config.globalProperties.$mazTranslations = i18n, app.provide("mazTranslations", i18n), i18n;
334
+ g(e.darkModeStrategy, a), M(r, s);
335
+ const c2 = await o(e.preset), m2 = Object.keys(e.overrides).length > 0 ? f(c2, e.overrides) : c2;
336
+ s.currentPreset = m2, e.strategy !== "buildtime" && k(m2, e);
499
337
  }
500
338
  }, MazUi = {
501
- install(app, options = {}) {
339
+ install(app, options) {
502
340
  const { theme, translations } = options;
503
- app.use(MazUiTheme, theme), app.use(MazTranslations, translations);
341
+ app.use(v, theme), app.use(MazUiTranslations, translations);
504
342
  }
505
343
  };
506
344
  export {