maz-ui 4.0.0-beta.8 → 4.0.0
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.
- package/README.md +1 -1
- package/dist/assets/{MazAnimatedCounter.DkZNPRLp.css → MazAnimatedCounter.LK7oyUrl.css} +1 -1
- package/dist/assets/MazAnimatedText.CHvAudRU.css +1 -0
- package/dist/assets/MazBackdrop.09bziTPM.css +1 -0
- package/dist/assets/{MazBadge.DN8tdE8_.css → MazBadge.ChI2DaTU.css} +1 -1
- package/dist/assets/MazBtn.BvC8ftmc.css +1 -0
- package/dist/assets/MazCard.Dv02b2P6.css +1 -0
- package/dist/assets/MazCardSpotlight.B7lFD7Pi.css +1 -0
- package/dist/assets/MazCarousel.BLHpZIu5.css +1 -0
- package/dist/assets/MazCheckbox.Di88TJ3e.css +1 -0
- package/dist/assets/MazChecklist.Bu8wERn6.css +1 -0
- package/dist/assets/MazDatePicker.G6V7jjin.css +1 -0
- package/dist/assets/{MazDialog.DEmRfAv7.css → MazDialog.TS06kRcu.css} +1 -1
- package/dist/assets/MazDropdown.D90GEKDB.css +1 -0
- package/dist/assets/MazDropzone._2HwHowu.css +1 -0
- package/dist/assets/MazGallery.BTNB3D6k.css +1 -0
- package/dist/assets/MazInput.BvuxfP9k.css +1 -0
- package/dist/assets/MazInputCode.BYi64Mof.css +1 -0
- package/dist/assets/MazInputPhoneNumber.Baeyskod.css +1 -0
- package/dist/assets/MazInputTags.is2jSJk-.css +1 -0
- package/dist/assets/MazLazyImg.DO7a4PDm.css +1 -0
- package/dist/assets/MazLink.CFscNMFr.css +1 -0
- package/dist/assets/{MazPagination.C6cUh-p4.css → MazPagination.BUhf2Qr7.css} +1 -1
- package/dist/assets/MazPickerCalendar.e-eF8E7m.css +1 -0
- package/dist/assets/MazPickerCalendarMonth.DpijYq-O.css +1 -0
- package/dist/assets/{MazPickerCalendarSwitcher.uni8vJJv.css → MazPickerCalendarSwitcher.ByAVjy00.css} +1 -1
- package/dist/assets/{MazPickerContainer.k3DGjyHC.css → MazPickerContainer.DmHuaFqE.css} +1 -1
- package/dist/assets/{MazPickerHeader.ZYCJY5bX.css → MazPickerHeader.D7JXgA3q.css} +1 -1
- package/dist/assets/MazPickerMonthSwitcher.BJGGy53r.css +1 -0
- package/dist/assets/{MazPickerYearSwitcher.Cn-nS-Vv.css → MazPickerYearSwitcher.DPD1_dfz.css} +1 -1
- package/dist/assets/MazPopover.DIE65uVT.css +1 -0
- package/dist/assets/MazPullToRefresh.C0HGlupm.css +1 -0
- package/dist/assets/MazRadio.B0B3P1QS.css +1 -0
- package/dist/assets/MazRadioButtons.CfiHq8H9.css +1 -0
- package/dist/assets/MazReadingProgressBar.dzfwQFNg.css +1 -0
- package/dist/assets/MazSelect.DIwjMD31.css +1 -0
- package/dist/assets/{MazSelectCountry.CdNTQPhr.css → MazSelectCountry.B0tlbfgr.css} +1 -1
- package/dist/assets/MazSlider.WcnBC9zc.css +1 -0
- package/dist/assets/MazSpinner.CsiFJ1DS.css +1 -0
- package/dist/assets/MazStepper.C9R7g43I.css +1 -0
- package/dist/assets/MazSwitch.LCcK91L7.css +1 -0
- package/dist/assets/MazTable.Cq7FEz09.css +1 -0
- package/dist/assets/MazTableRow.C0Ko4yDk.css +1 -0
- package/dist/assets/{MazTabsBar.gcS2Fc-B.css → MazTabsBar.BRr1XiYu.css} +1 -1
- package/dist/assets/{MazTabsContentItem.CHfy19ZF.css → MazTabsContentItem.C84SDmj0.css} +1 -1
- package/dist/assets/MazTextarea.C9sZpRDZ.css +1 -0
- package/dist/assets/{PhoneInput.DBLH22G1.css → PhoneInput.DkOXlrI9.css} +1 -1
- package/dist/assets/{fullscreen-img.Bkuz1GOX.css → fullscreen-img.Br983fLC.css} +1 -1
- package/dist/assets/{toast.CC2VQab8.css → toast.BDNNJSjj.css} +1 -1
- package/dist/chunks/{MazDatePicker.De3Ltb2F.js → MazDatePicker.B1B6gUrC.js} +49 -37
- package/dist/chunks/{MazDialogConfirm.vue_vue_type_script_setup_true_lang.-K3NpiFL.js → MazDialogConfirm.vue_vue_type_script_setup_true_lang.DuEcluOw.js} +23 -13
- package/dist/chunks/{MazDropdown.vue_vue_type_style_index_0_lang.BES3jpuw.js → MazDropdown.vue_vue_type_style_index_0_lang.DULnKQ2W.js} +16 -10
- 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
- package/dist/chunks/{MazInputPhoneNumber.DBncAmC5.js → MazInputPhoneNumber.CDy6n_Qj.js} +25 -17
- 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
- package/dist/chunks/{MazPickerCalendar.DKXNI8O4.js → MazPickerCalendar.BSBQciuG.js} +8 -8
- package/dist/chunks/{MazPickerCalendarMonth.DKBqgrNp.js → MazPickerCalendarMonth.CFJHTFp5.js} +14 -14
- package/dist/chunks/{MazPickerCalendarSwitcher.CzIZol3Z.js → MazPickerCalendarSwitcher.DC21FpTy.js} +10 -10
- package/dist/chunks/{MazPickerContainer.Mrh-Q52I.js → MazPickerContainer.CRPzAbRt.js} +4 -6
- package/dist/chunks/{MazPickerHeader.Bm9vIrtB.js → MazPickerHeader.D7Tbm-yH.js} +14 -14
- package/dist/chunks/{MazPickerMonthSwitcher.BSD2GtY6.js → MazPickerMonthSwitcher.DzHOKbe4.js} +10 -10
- package/dist/chunks/{MazPickerTime.D0hilq5b.js → MazPickerTime.EZK1foEx.js} +1 -1
- package/dist/chunks/{MazPickerYearSwitcher.BIUYJMvj.js → MazPickerYearSwitcher.BcT8GENl.js} +4 -4
- 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
- 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
- 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
- package/dist/chunks/{PhoneInput.iFkRoIFk.js → PhoneInput.DukRZp5u.js} +20 -27
- package/dist/chunks/capitalize.CVQ1jDrh.js +6 -0
- package/dist/chunks/checkAvailability.UFZSC8-1.js +16 -0
- package/dist/chunks/debounce.DhXdop6X.js +11 -0
- package/dist/chunks/{dom-events.Bbe7wDQl.js → dom-events.H9KIOv83.js} +52 -52
- package/dist/chunks/{fullscreen-img.directive.Be383en8.js → fullscreen-img.directive.D9oQ3Gni.js} +4 -4
- package/dist/chunks/{isClient.WI4oSt66.js → isClient.8V3qjGdO.js} +2 -2
- package/dist/chunks/{mazUi.D6UdqpTO.js → mazUi.0b7z2u9g.js} +2 -2
- package/dist/chunks/{obsidian.Cy0R8RHy.js → obsidian.C6upWOVF.js} +2 -2
- package/dist/chunks/{ocean.pHrY5H_S.js → ocean.ehMlC0HV.js} +2 -2
- package/dist/chunks/pascalCase.BKTE3qqE.js +19 -0
- package/dist/chunks/{pristine.ylgbwjxO.js → pristine.DMG3eBuN.js} +6 -6
- package/dist/chunks/sleep.Ci7GE4BQ.js +6 -0
- package/dist/chunks/truthyFilter.DZvXmxeK.js +6 -0
- package/dist/chunks/types.D0Bp_UhS.js +6 -0
- package/dist/chunks/{useStringMatching.D5UvsCUS.js → useStringMatching.DzSigyZ7.js} +40 -14
- package/dist/chunks/{vClickOutside.DIOiluy0.js → vClickOutside.CJBKY5no.js} +6 -6
- package/dist/components/MazAccordion.vue.d.ts +36 -0
- package/dist/components/MazAnimatedCounter.js +5 -5
- package/dist/components/MazAnimatedCounter.vue.d.ts +59 -0
- package/dist/components/MazAnimatedElement.vue.d.ts +44 -0
- package/dist/components/MazAnimatedText.js +4 -4
- package/dist/components/MazAnimatedText.vue.d.ts +57 -0
- package/dist/components/MazAvatar.vue.d.ts +99 -0
- package/dist/components/MazBackdrop.js +70 -31
- package/dist/components/MazBackdrop.vue.d.ts +91 -0
- package/dist/components/MazBadge.js +5 -4
- package/dist/components/MazBadge.vue.d.ts +61 -0
- package/dist/components/MazBottomSheet.vue.d.ts +35 -0
- package/dist/components/MazBtn.js +6 -5
- package/dist/components/MazBtn.vue.d.ts +105 -0
- package/dist/components/MazCard.js +3 -3
- package/dist/components/MazCard.vue.d.ts +77 -0
- package/dist/components/MazCardSpotlight.js +2 -2
- package/dist/components/MazCardSpotlight.vue.d.ts +57 -0
- package/dist/components/MazCarousel.js +12 -9
- package/dist/components/MazCarousel.vue.d.ts +48 -0
- package/dist/components/MazChart.vue.d.ts +53 -0
- package/dist/components/MazCheckbox.js +2 -2
- package/dist/components/MazCheckbox.vue.d.ts +55 -0
- package/dist/components/MazChecklist.js +7 -7
- package/dist/components/MazChecklist.vue.d.ts +87 -0
- package/dist/components/MazCircularProgressBar.vue.d.ts +106 -0
- package/dist/components/MazDatePicker/MazPickerCalendar.vue.d.ts +27 -0
- package/dist/components/MazDatePicker/MazPickerCalendarMonth/MazPickerCalendarDays.vue.d.ts +20 -0
- package/dist/components/MazDatePicker/MazPickerCalendarMonth/MazPickerCalendarGrid.vue.d.ts +125 -0
- package/dist/components/MazDatePicker/MazPickerCalendarMonth/MazPickerCalendarMonth.vue.d.ts +134 -0
- package/dist/components/MazDatePicker/MazPickerCalendarSwitcher.vue.d.ts +42 -0
- package/dist/components/MazDatePicker/MazPickerContainer.vue.d.ts +38 -0
- package/dist/components/MazDatePicker/MazPickerHeader.vue.d.ts +15 -0
- package/dist/components/MazDatePicker/MazPickerMonthSwitcher.vue.d.ts +44 -0
- package/dist/components/MazDatePicker/MazPickerShortcuts.vue.d.ts +16 -0
- package/dist/components/MazDatePicker/MazPickerTime.vue.d.ts +107 -0
- package/dist/components/MazDatePicker/MazPickerYearSwitcher.vue.d.ts +36 -0
- package/dist/components/MazDatePicker/types.d.ts +14 -0
- package/dist/components/MazDatePicker/utils.d.ts +61 -0
- package/dist/components/MazDatePicker.js +1 -1
- package/dist/components/MazDatePicker.vue.d.ts +547 -0
- package/dist/components/MazDialog.js +9 -16
- package/dist/components/MazDialog.vue.d.ts +247 -0
- package/dist/components/MazDialogConfirm/useMazDialogConfirm.d.ts +47 -0
- package/dist/components/MazDialogConfirm.js +2 -2
- package/dist/components/MazDialogConfirm.vue.d.ts +270 -0
- package/dist/components/MazDrawer.vue.d.ts +52 -0
- package/dist/components/MazDropdown.js +1 -1
- package/dist/components/MazDropdown.vue.d.ts +249 -0
- package/dist/components/MazDropzone.js +6 -6
- package/dist/components/MazDropzone.vue.d.ts +305 -0
- package/dist/components/MazExpandAnimation.vue.d.ts +44 -0
- package/dist/components/MazFullscreenLoader.vue.d.ts +26 -0
- package/dist/components/MazGallery.js +4 -4
- package/dist/components/MazGallery.vue.d.ts +85 -0
- package/dist/components/MazIcon.vue.d.ts +26 -0
- package/dist/components/MazInput.js +4 -4
- package/dist/components/MazInput.vue.d.ts +225 -0
- package/dist/components/MazInputCode.js +2 -2
- package/dist/components/MazInputCode.vue.d.ts +49 -0
- package/dist/components/MazInputNumber.js +1 -1
- package/dist/components/MazInputNumber.vue.d.ts +125 -0
- package/dist/components/MazInputPhoneNumber/PhoneInput.vue.d.ts +29 -0
- package/dist/components/MazInputPhoneNumber/useLibphonenumber.d.ts +26 -0
- package/dist/components/MazInputPhoneNumber/useMazInputPhoneNumber.d.ts +26 -0
- package/dist/components/MazInputPhoneNumber.js +1 -1
- package/dist/components/MazInputPhoneNumber.vue.d.ts +421 -0
- package/dist/components/MazInputPrice.js +1 -1
- package/dist/components/MazInputPrice.vue.d.ts +48 -0
- package/dist/components/MazInputTags.js +6 -6
- package/dist/components/MazInputTags.vue.d.ts +51 -0
- package/dist/components/MazLazyImg.js +2 -2
- package/dist/components/MazLazyImg.vue.d.ts +78 -0
- package/dist/components/MazLink.js +2 -2
- package/dist/components/MazLink.vue.d.ts +115 -0
- package/dist/components/MazLoadingBar.vue.d.ts +12 -0
- package/dist/components/MazPagination.js +3 -3
- package/dist/components/MazPagination.vue.d.ts +83 -0
- package/dist/components/MazPopover.js +98 -222
- package/dist/components/MazPopover.vue.d.ts +256 -0
- package/dist/components/MazPullToRefresh.js +7 -7
- package/dist/components/MazPullToRefresh.vue.d.ts +52 -0
- package/dist/components/MazRadio.js +2 -2
- package/dist/components/MazRadio.vue.d.ts +55 -0
- package/dist/components/MazRadioButtons.js +8 -7
- package/dist/components/MazRadioButtons.vue.d.ts +69 -0
- package/dist/components/MazReadingProgressBar.js +8 -8
- package/dist/components/MazReadingProgressBar.vue.d.ts +55 -0
- package/dist/components/MazSelect.js +17 -14
- package/dist/components/MazSelect.vue.d.ts +178 -0
- package/dist/components/MazSelectCountry.js +19 -18
- package/dist/components/MazSelectCountry.vue.d.ts +171 -0
- package/dist/components/MazSlider/utils.d.ts +15 -0
- package/dist/components/MazSlider.js +36 -36
- package/dist/components/MazSlider.vue.d.ts +31 -0
- package/dist/components/MazSpinner.js +3 -4
- package/dist/components/MazSpinner.vue.d.ts +15 -0
- package/dist/components/MazStepper.js +2 -2
- package/dist/components/MazStepper.vue.d.ts +60 -0
- package/dist/components/MazSwitch.js +1 -1
- package/dist/components/MazSwitch.vue.d.ts +69 -0
- package/dist/components/MazTable.js +3 -3
- package/dist/components/MazTable.vue.d.ts +324 -0
- package/dist/components/MazTableCell.js +1 -1
- package/dist/components/MazTableCell.vue.d.ts +17 -0
- package/dist/components/MazTableRow.js +6 -5
- package/dist/components/MazTableRow.vue.d.ts +23 -0
- package/dist/components/MazTableTitle.js +1 -1
- package/dist/components/MazTableTitle.vue.d.ts +17 -0
- package/dist/components/MazTabs.vue.d.ts +30 -0
- package/dist/components/MazTabsBar.js +4 -4
- package/dist/components/MazTabsBar.vue.d.ts +96 -0
- package/dist/components/MazTabsContent.js +1 -1
- package/dist/components/MazTabsContent.vue.d.ts +17 -0
- package/dist/components/MazTabsContentItem.js +6 -7
- package/dist/components/MazTabsContentItem.vue.d.ts +31 -0
- package/dist/components/MazTextarea.js +6 -6
- package/dist/components/MazTextarea.vue.d.ts +88 -0
- package/dist/components/constantes.d.ts +2 -0
- package/dist/components/index.d.ts +109 -0
- package/dist/components/index.js +8 -8
- package/dist/components/types.d.ts +4 -0
- package/dist/composables/index.d.ts +21 -0
- package/dist/composables/index.js +3 -1
- package/dist/composables/useAos.d.ts +2 -0
- package/dist/composables/useBreakpoints.d.ts +38 -0
- package/dist/composables/useDialog.d.ts +2 -0
- package/dist/composables/useDisplayNames.d.ts +101 -0
- package/dist/composables/useDisplayNames.js +20 -28
- package/dist/composables/useDropzone.d.ts +27 -0
- package/dist/composables/useDropzone.js +6 -6
- package/dist/composables/useFormField.d.ts +16 -0
- package/dist/composables/useFormField.js +3 -3
- package/dist/composables/useFormValidator/config.d.ts +7 -0
- package/dist/composables/useFormValidator/dom-events.d.ts +19 -0
- package/dist/composables/useFormValidator/state-management.d.ts +72 -0
- package/dist/composables/useFormValidator/types.d.ts +98 -0
- package/dist/composables/useFormValidator/validation.d.ts +37 -0
- package/dist/composables/useFormValidator.d.ts +23 -0
- package/dist/composables/useFormValidator.js +19 -3
- package/dist/composables/useFreezeValue.d.ts +5 -0
- package/dist/composables/useIdleTimeout.d.ts +5 -0
- package/dist/composables/useIdleTimeout.js +27 -27
- package/dist/composables/useInjectStrict.d.ts +2 -0
- package/dist/composables/useInstanceUniqId.d.ts +4 -0
- package/dist/composables/useInstanceUniqId.js +3 -2
- package/dist/composables/useMountComponent.d.ts +14 -0
- package/dist/composables/useReadingTime.d.ts +25 -0
- package/dist/composables/useStringMatching.d.ts +5 -0
- package/dist/composables/useStringMatching.js +1 -1
- package/dist/composables/useSwipe.d.ts +14 -0
- package/dist/composables/useSwipe.js +22 -22
- package/dist/composables/useTimer.d.ts +30 -0
- package/dist/composables/useToast.d.ts +22 -0
- package/dist/composables/useUserVisibility.d.ts +5 -0
- package/dist/composables/useUserVisibility.js +8 -8
- package/dist/composables/useWait.d.ts +2 -0
- package/dist/composables/useWindowSize.d.ts +32 -0
- package/dist/composables/useWindowSize.js +2 -2
- package/dist/css/main.css +1 -1
- package/dist/directives/index.d.ts +5 -0
- package/dist/directives/index.js +2 -2
- package/dist/directives/vClickOutside.d.ts +36 -0
- package/dist/directives/vClickOutside.js +1 -1
- package/dist/directives/vFullscreenImg/MazFullscreenImg.vue.d.ts +50 -0
- package/dist/directives/vFullscreenImg/fullscreen-img.directive.d.ts +5 -0
- package/dist/directives/vFullscreenImg/fullscreen-img.handler.d.ts +36 -0
- package/dist/directives/vFullscreenImg.d.ts +11 -0
- package/dist/directives/vFullscreenImg.js +1 -1
- package/dist/directives/vLazyImg/lazy-img.directive.d.ts +5 -0
- package/dist/directives/vLazyImg/lazy-img.handler.d.ts +38 -0
- package/dist/directives/vLazyImg/types.d.ts +29 -0
- package/dist/directives/vLazyImg.d.ts +12 -0
- package/dist/directives/vTooltip.d.ts +54 -0
- package/dist/directives/vTooltip.js +15 -23
- package/dist/directives/vZoomImg/style.d.ts +1 -0
- package/dist/directives/vZoomImg/svgs.d.ts +3 -0
- package/dist/directives/vZoomImg/zoom-img.directive.d.ts +8 -0
- package/dist/directives/vZoomImg/zoom-img.handler.d.ts +46 -0
- package/dist/directives/vZoomImg.d.ts +10 -0
- package/dist/index.d.ts +1 -0
- package/dist/plugins/aos.d.ts +81 -0
- package/dist/plugins/aos.js +5 -5
- package/dist/plugins/dialog/DialogHandler.d.ts +16 -0
- package/dist/plugins/dialog.d.ts +26 -0
- package/dist/plugins/dialog.js +1 -1
- package/dist/plugins/index.d.ts +5 -0
- package/dist/plugins/maz-ui.d.ts +43 -0
- package/dist/plugins/maz-ui.js +245 -371
- package/dist/plugins/toast/MazToast.vue.d.ts +34 -0
- package/dist/plugins/toast/ToastHandler.d.ts +29 -0
- package/dist/plugins/toast/types.d.ts +104 -0
- package/dist/plugins/toast.d.ts +25 -0
- package/dist/plugins/toast.js +8 -6
- package/dist/plugins/wait.d.ts +33 -0
- package/dist/resolvers/MazComponentsResolver.d.ts +10 -0
- package/dist/resolvers/MazComponentsResolver.js +516 -10
- package/dist/resolvers/MazDirectivesResolver.d.ts +11 -0
- package/dist/resolvers/MazDirectivesResolver.js +2 -2
- package/dist/resolvers/MazModulesResolver.d.ts +11 -0
- package/dist/resolvers/MazModulesResolver.js +8 -5
- package/dist/resolvers/index.d.ts +3 -0
- package/dist/tailwindcss/index.d.ts +6 -0
- package/dist/tailwindcss/tailwind.config.d.ts +89 -0
- package/dist/tailwindcss/utils/colors.d.ts +7 -0
- package/dist/tailwindcss/variables/breakpoints.d.ts +15 -0
- package/dist/tailwindcss/variables/colors.d.ts +20 -0
- package/dist/tailwindcss/variables/design-tokens.d.ts +35 -0
- package/dist/tailwindcss/variables/utilities.d.ts +17 -0
- package/dist/tailwindcss/variables/z-indexes.d.ts +14 -0
- package/dist/types/components/MazAnimatedCounter.vue.d.ts +1 -1
- package/dist/types/components/MazBackdrop.vue.d.ts +26 -6
- package/dist/types/components/MazCard.vue.d.ts +1 -1
- package/dist/types/components/MazCarousel.vue.d.ts +8 -5
- package/dist/types/components/MazChecklist.vue.d.ts +5 -5
- package/dist/types/components/MazDatePicker/utils.d.ts +7 -6
- package/dist/types/components/MazDatePicker.vue.d.ts +37 -33
- package/dist/types/components/MazDialog.vue.d.ts +10 -19
- package/dist/types/components/MazDialogConfirm/useMazDialogConfirm.d.ts +8 -6
- package/dist/types/components/MazDialogConfirm.vue.d.ts +18 -12
- package/dist/types/components/MazDropdown.vue.d.ts +10 -3
- package/dist/types/components/MazInputNumber.vue.d.ts +4 -4
- package/dist/types/components/MazInputPhoneNumber/PhoneInput.vue.d.ts +1 -1
- package/dist/types/components/MazInputPhoneNumber/useLibphonenumber.d.ts +1 -1
- package/dist/types/components/MazInputPhoneNumber/useMazInputPhoneNumber.d.ts +2 -0
- package/dist/types/components/MazInputPhoneNumber.vue.d.ts +11 -12
- package/dist/types/components/MazInputPrice.vue.d.ts +3 -3
- package/dist/types/components/MazInputTags.vue.d.ts +1 -1
- package/dist/types/components/MazLink.vue.d.ts +1 -1
- package/dist/types/components/MazPopover.vue.d.ts +13 -8
- package/dist/types/components/MazRadioButtons.vue.d.ts +9 -9
- package/dist/types/components/MazReadingProgressBar.vue.d.ts +1 -1
- package/dist/types/components/MazSelect.vue.d.ts +13 -6
- package/dist/types/components/MazSelectCountry.vue.d.ts +9 -9
- package/dist/types/components/MazTable.vue.d.ts +5 -5
- package/dist/types/components/MazTableRow.vue.d.ts +2 -0
- package/dist/types/components/types.d.ts +1 -0
- package/dist/types/composables/index.d.ts +1 -0
- package/dist/types/composables/useDisplayNames.d.ts +60 -6
- package/dist/types/composables/useFormField.d.ts +16 -18
- package/dist/types/composables/useFormValidator/config.d.ts +2 -2
- package/dist/types/composables/useFormValidator/dom-events.d.ts +4 -4
- package/dist/types/composables/useFormValidator/state-management.d.ts +40 -22
- package/dist/types/composables/useFormValidator/types.d.ts +15 -15
- package/dist/types/composables/useFormValidator/validation.d.ts +10 -16
- package/dist/types/composables/useFormValidator.d.ts +2 -2
- package/dist/types/composables/useIdleTimeout.d.ts +1 -1
- package/dist/types/composables/useSwipe.d.ts +1 -1
- package/dist/types/composables/useUserVisibility.d.ts +1 -1
- package/dist/types/directives/vFullscreenImg/MazFullscreenImg.vue.d.ts +2 -2
- package/dist/types/directives/vZoomImg.d.ts +1 -1
- package/dist/types/plugins/maz-ui.d.ts +5 -5
- package/package.json +46 -36
- package/dist/assets/MazAnimatedText.DDqCxrFX.css +0 -1
- package/dist/assets/MazBackdrop.BnhcmjbP.css +0 -1
- package/dist/assets/MazBtn.DUBbj2mt.css +0 -1
- package/dist/assets/MazCard.C6nDaeIC.css +0 -1
- package/dist/assets/MazCardSpotlight.IbPp_y0j.css +0 -1
- package/dist/assets/MazCarousel.BaqN4hLP.css +0 -1
- package/dist/assets/MazCheckbox.CFqw9ybT.css +0 -1
- package/dist/assets/MazChecklist.BzF5KtZ3.css +0 -1
- package/dist/assets/MazDatePicker.8GyrtM-j.css +0 -1
- package/dist/assets/MazDropdown.C6vjLIeN.css +0 -1
- package/dist/assets/MazDropzone.-8lzCrxJ.css +0 -1
- package/dist/assets/MazGallery.DZ3TyggM.css +0 -1
- package/dist/assets/MazInput.BcUsJg7p.css +0 -1
- package/dist/assets/MazInputCode.CG6EJBEk.css +0 -1
- package/dist/assets/MazInputPhoneNumber.CrXS7DOY.css +0 -1
- package/dist/assets/MazInputTags.DzTGy9z3.css +0 -1
- package/dist/assets/MazLazyImg.NlPRN3Nk.css +0 -1
- package/dist/assets/MazLink.wJoKRsCP.css +0 -1
- package/dist/assets/MazPickerCalendar.CHpWIzhL.css +0 -1
- package/dist/assets/MazPickerCalendarMonth.Boe_8k4x.css +0 -1
- package/dist/assets/MazPickerMonthSwitcher.CszcpCcY.css +0 -1
- package/dist/assets/MazPopover.DzCAfuWw.css +0 -1
- package/dist/assets/MazPullToRefresh.BQ64UvzA.css +0 -1
- package/dist/assets/MazRadio.XGYnbTuB.css +0 -1
- package/dist/assets/MazRadioButtons.BA4rjgK9.css +0 -1
- package/dist/assets/MazReadingProgressBar.CwBVXE3g.css +0 -1
- package/dist/assets/MazSelect.Cljh3PVV.css +0 -1
- package/dist/assets/MazSlider.y4qpnD0N.css +0 -1
- package/dist/assets/MazSpinner.CP85N7RJ.css +0 -1
- package/dist/assets/MazStepper.DtWZmm-f.css +0 -1
- package/dist/assets/MazSwitch.Bxmh2iFj.css +0 -1
- package/dist/assets/MazTable.DMlQdImb.css +0 -1
- package/dist/assets/MazTableRow.B78Bd4Kv.css +0 -1
- package/dist/assets/MazTextarea.DME7BHS5.css +0 -1
- package/dist/chunks/capitalize.BF6CDS_4.js +0 -6
- package/dist/chunks/checkAvailability.aTpZidex.js +0 -16
- package/dist/chunks/de.B15Maq8Z.js +0 -82
- package/dist/chunks/debounce.Brzkn9pm.js +0 -11
- package/dist/chunks/en.Q_4-KljL.js +0 -157
- package/dist/chunks/es.BV1TlfTw.js +0 -82
- package/dist/chunks/fr.BVPG-7Dk.js +0 -82
- package/dist/chunks/it.Be9xhI4P.js +0 -82
- package/dist/chunks/ja.CWU7KYEA.js +0 -82
- package/dist/chunks/pt.CfaFSxVt.js +0 -82
- package/dist/chunks/sleep.BLRH1qZG.js +0 -6
- package/dist/chunks/truthyFilter.C2WOKUCG.js +0 -6
- package/dist/chunks/useTranslations.D5aoYwD7.js +0 -10
- package/dist/chunks/zh-CN.CCkuvk-E.js +0 -82
package/dist/plugins/maz-ui.js
CHANGED
|
@@ -1,73 +1,59 @@
|
|
|
1
|
-
import { reactive
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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(
|
|
8
|
-
s: Number.parseFloat(
|
|
9
|
-
l: Number.parseFloat(
|
|
8
|
+
h: Number.parseFloat(t2[1]),
|
|
9
|
+
s: Number.parseFloat(t2[2]),
|
|
10
|
+
l: Number.parseFloat(t2[3])
|
|
10
11
|
};
|
|
11
12
|
}
|
|
12
|
-
function
|
|
13
|
-
const
|
|
14
|
-
return `${
|
|
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
|
|
17
|
-
50:
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
// Base + 30% = moderately light
|
|
23
|
-
300: 20,
|
|
24
|
-
// Base + 20% = light-medium
|
|
25
|
-
400: 10,
|
|
26
|
-
// Base + 10% = slightly lighter
|
|
17
|
+
const d = {
|
|
18
|
+
50: 37.5,
|
|
19
|
+
100: 30,
|
|
20
|
+
200: 22.5,
|
|
21
|
+
300: 15,
|
|
22
|
+
400: 7.5,
|
|
27
23
|
500: 0,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
800: -30,
|
|
34
|
-
// Base - 30% = very dark
|
|
35
|
-
900: -40
|
|
36
|
-
// Base - 40% = extremely dark
|
|
24
|
+
600: -7.5,
|
|
25
|
+
700: -15,
|
|
26
|
+
800: -22.5,
|
|
27
|
+
900: -30,
|
|
28
|
+
950: -37.5
|
|
37
29
|
};
|
|
38
|
-
function
|
|
39
|
-
if (
|
|
30
|
+
function p$1(n2, t2, r) {
|
|
31
|
+
if (t2 === n2)
|
|
40
32
|
return 1;
|
|
41
|
-
const
|
|
42
|
-
if (
|
|
43
|
-
const
|
|
44
|
-
return Math.max(0.3, 1 -
|
|
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
|
|
47
|
-
return Math.min(1.3, 1 +
|
|
38
|
+
const e = s / 400 * 0.15 * o2;
|
|
39
|
+
return Math.min(1.3, 1 + e);
|
|
48
40
|
}
|
|
49
41
|
}
|
|
50
|
-
function
|
|
51
|
-
const { h, s, l } =
|
|
52
|
-
return
|
|
53
|
-
if (
|
|
54
|
-
|
|
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
|
|
57
|
-
let
|
|
58
|
-
|
|
59
|
-
const
|
|
60
|
-
|
|
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
|
-
}),
|
|
54
|
+
}), u2;
|
|
63
55
|
}
|
|
64
|
-
|
|
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,382 +75,270 @@ const DEFAULT_CRITICAL_COLORS = [
|
|
|
89
75
|
"muted",
|
|
90
76
|
"shadow",
|
|
91
77
|
"border"
|
|
92
|
-
],
|
|
78
|
+
], C = [
|
|
93
79
|
"radius",
|
|
94
80
|
"font-family",
|
|
95
81
|
"base-font-size",
|
|
96
82
|
"border-width"
|
|
97
|
-
],
|
|
98
|
-
function
|
|
83
|
+
], S = ["primary", "secondary", "accent", "destructive", "success", "warning", "info", "contrast", "background", "foreground", "border", "muted", "overlay", "shadow"];
|
|
84
|
+
function j(e, o2 = {
|
|
85
|
+
mode: "both",
|
|
86
|
+
darkSelectorStrategy: "class"
|
|
87
|
+
}) {
|
|
99
88
|
const {
|
|
100
|
-
criticalColors =
|
|
101
|
-
criticalFoundation =
|
|
102
|
-
mode
|
|
103
|
-
darkSelectorStrategy
|
|
104
|
-
prefix = "maz"
|
|
105
|
-
} =
|
|
106
|
-
let
|
|
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 {
|
|
107
96
|
`;
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
97
|
+
if (t2 === "light" || t2 === "both") {
|
|
98
|
+
const a = m(e.colors.light, r);
|
|
99
|
+
n2 += f$1({
|
|
100
|
+
selector: ":root",
|
|
101
|
+
colors: a,
|
|
102
|
+
foundation: l2,
|
|
103
|
+
prefix: i2
|
|
104
|
+
});
|
|
105
|
+
}
|
|
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
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
return n2 += `}
|
|
117
|
+
`, n2;
|
|
121
118
|
}
|
|
122
|
-
function
|
|
119
|
+
function p(e, o2 = {
|
|
120
|
+
mode: "both",
|
|
121
|
+
darkSelectorStrategy: "class"
|
|
122
|
+
}) {
|
|
123
123
|
const {
|
|
124
|
-
excludeCritical =
|
|
125
|
-
mode
|
|
126
|
-
darkSelectorStrategy
|
|
127
|
-
prefix = "maz",
|
|
128
|
-
includeColorScales = !0
|
|
129
|
-
} =
|
|
130
|
-
let
|
|
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 {
|
|
131
131
|
`;
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
132
|
+
if (c2 === "light" || c2 === "both") {
|
|
133
|
+
const a = g$1(e.colors.light, r);
|
|
134
|
+
n2 += f$1({
|
|
135
|
+
selector: ":root",
|
|
136
|
+
colors: a,
|
|
137
|
+
foundation: l2,
|
|
138
|
+
prefix: s,
|
|
139
|
+
includeScales: i2,
|
|
140
|
+
preset: e
|
|
141
|
+
});
|
|
142
|
+
}
|
|
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,
|
|
150
|
+
// Appearance only if dark mode only
|
|
151
|
+
prefix: s,
|
|
152
|
+
includeScales: i2,
|
|
153
|
+
preset: e,
|
|
154
|
+
isDark: !0
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
return n2 += `}
|
|
158
|
+
`, n2;
|
|
151
159
|
}
|
|
152
|
-
function
|
|
160
|
+
function m(e, o2) {
|
|
153
161
|
return Object.fromEntries(
|
|
154
|
-
|
|
162
|
+
o2.filter((r) => e[r]).map((r) => [r, e[r]])
|
|
155
163
|
);
|
|
156
164
|
}
|
|
157
|
-
function
|
|
158
|
-
return
|
|
159
|
-
|
|
165
|
+
function y(e, o2) {
|
|
166
|
+
return e ? Object.fromEntries(
|
|
167
|
+
o2.filter((r) => e[r]).map((r) => [r, e[r]])
|
|
160
168
|
) : {};
|
|
161
169
|
}
|
|
162
|
-
function
|
|
170
|
+
function g$1(e, o2) {
|
|
163
171
|
return Object.fromEntries(
|
|
164
|
-
Object.entries(
|
|
172
|
+
Object.entries(e).filter(([r]) => !o2.includes(r))
|
|
165
173
|
);
|
|
166
174
|
}
|
|
167
|
-
function
|
|
168
|
-
return
|
|
169
|
-
Object.entries(
|
|
175
|
+
function k$1(e, o2) {
|
|
176
|
+
return e ? Object.fromEntries(
|
|
177
|
+
Object.entries(e).filter(([r]) => !o2.includes(r))
|
|
170
178
|
) : {};
|
|
171
179
|
}
|
|
172
|
-
function
|
|
173
|
-
selector,
|
|
174
|
-
mediaQuery,
|
|
175
|
-
colors,
|
|
176
|
-
foundation,
|
|
177
|
-
prefix,
|
|
178
|
-
includeScales = !1,
|
|
179
|
-
preset,
|
|
180
|
-
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
|
|
181
189
|
}) {
|
|
182
|
-
const
|
|
183
|
-
if (
|
|
184
|
-
|
|
185
|
-
}),
|
|
186
|
-
|
|
187
|
-
}),
|
|
188
|
-
const
|
|
189
|
-
|
|
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);
|
|
190
198
|
}
|
|
191
|
-
const
|
|
199
|
+
const a = n2.join(`
|
|
192
200
|
`);
|
|
193
|
-
return
|
|
194
|
-
${
|
|
195
|
-
${
|
|
196
|
-
${
|
|
201
|
+
return o2 ? `
|
|
202
|
+
${o2} {
|
|
203
|
+
${e} {
|
|
204
|
+
${a.replace(/^/gm, " ")}
|
|
197
205
|
}
|
|
198
206
|
}
|
|
199
207
|
` : `
|
|
200
|
-
${
|
|
201
|
-
${
|
|
208
|
+
${e} {
|
|
209
|
+
${a}
|
|
202
210
|
}
|
|
203
211
|
`;
|
|
204
212
|
}
|
|
205
|
-
function
|
|
206
|
-
const
|
|
207
|
-
return
|
|
208
|
-
const
|
|
209
|
-
if (
|
|
210
|
-
const
|
|
211
|
-
Object.entries(
|
|
212
|
-
|
|
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};`);
|
|
213
221
|
});
|
|
214
222
|
}
|
|
215
|
-
}),
|
|
223
|
+
}), r;
|
|
216
224
|
}
|
|
217
|
-
|
|
225
|
+
var $ = /* @__PURE__ */ ((e) => (e.FULL = "maz-theme-full", e.CRITICAL = "maz-theme-critical", e))($ || {});
|
|
226
|
+
function v$1(e, o2) {
|
|
218
227
|
if (typeof document > "u")
|
|
219
228
|
return;
|
|
220
|
-
let
|
|
221
|
-
|
|
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";
|
|
243
|
+
}
|
|
244
|
+
function n() {
|
|
245
|
+
return typeof globalThis.window < "u" && typeof globalThis.matchMedia == "function" && globalThis.matchMedia("(prefers-color-scheme: dark)").matches;
|
|
222
246
|
}
|
|
223
|
-
function
|
|
224
|
-
return typeof
|
|
247
|
+
function t(i2) {
|
|
248
|
+
return typeof i2 == "object" && i2 !== null && !!i2.name;
|
|
225
249
|
}
|
|
226
|
-
async function
|
|
227
|
-
if (
|
|
228
|
-
return
|
|
229
|
-
if (
|
|
230
|
-
const { mazUi } = await import("../chunks/mazUi.
|
|
231
|
-
return
|
|
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;
|
|
232
256
|
}
|
|
233
|
-
if (
|
|
234
|
-
const { ocean } = await import("../chunks/ocean.
|
|
235
|
-
return
|
|
257
|
+
if (i2 === "ocean") {
|
|
258
|
+
const { ocean: n2 } = await import("../chunks/ocean.ehMlC0HV.js");
|
|
259
|
+
return n2;
|
|
236
260
|
}
|
|
237
|
-
if (
|
|
238
|
-
const { pristine } = await import("../chunks/pristine.
|
|
239
|
-
return
|
|
261
|
+
if (i2 === "pristine") {
|
|
262
|
+
const { pristine: n2 } = await import("../chunks/pristine.DMG3eBuN.js");
|
|
263
|
+
return n2;
|
|
240
264
|
}
|
|
241
|
-
if (
|
|
242
|
-
const { obsidian } = await import("../chunks/obsidian.
|
|
243
|
-
return
|
|
265
|
+
if (i2 === "obsidian") {
|
|
266
|
+
const { obsidian: n2 } = await import("../chunks/obsidian.C6upWOVF.js");
|
|
267
|
+
return n2;
|
|
244
268
|
}
|
|
245
|
-
throw new TypeError(`[@maz-ui/themes] Preset ${
|
|
269
|
+
throw new TypeError(`[@maz-ui/themes] Preset ${i2} not found`);
|
|
246
270
|
}
|
|
247
|
-
function
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
271
|
+
function f(n2, o2) {
|
|
272
|
+
return {
|
|
273
|
+
name: o2.name || n2.name,
|
|
274
|
+
foundation: {
|
|
275
|
+
...n2.foundation,
|
|
276
|
+
...o2.foundation
|
|
277
|
+
},
|
|
278
|
+
colors: {
|
|
279
|
+
light: u(n2.colors.light, o2.colors?.light),
|
|
280
|
+
dark: u(n2.colors.dark, o2.colors?.dark)
|
|
281
|
+
}
|
|
282
|
+
};
|
|
252
283
|
}
|
|
253
|
-
function
|
|
254
|
-
return
|
|
284
|
+
function u(n2, o2) {
|
|
285
|
+
return o2 ? {
|
|
286
|
+
...n2,
|
|
287
|
+
...o2
|
|
288
|
+
} : n2;
|
|
255
289
|
}
|
|
256
|
-
function
|
|
257
|
-
typeof document > "u" ||
|
|
290
|
+
function g(r, t2) {
|
|
291
|
+
typeof document > "u" || r !== "class" || (t2 ? document.documentElement.classList.add("dark") : document.documentElement.classList.remove("dark"));
|
|
258
292
|
}
|
|
259
|
-
function
|
|
293
|
+
function k(r, t2) {
|
|
260
294
|
if (typeof document > "u")
|
|
261
295
|
return;
|
|
262
|
-
const
|
|
263
|
-
mode:
|
|
296
|
+
const e = {
|
|
297
|
+
mode: t2.mode,
|
|
298
|
+
darkSelectorStrategy: t2.darkModeStrategy
|
|
264
299
|
};
|
|
265
|
-
if (
|
|
266
|
-
const
|
|
267
|
-
|
|
300
|
+
if (t2.injectCriticalCSS) {
|
|
301
|
+
const a = j(r, e);
|
|
302
|
+
v$1($.CRITICAL, a);
|
|
268
303
|
}
|
|
269
|
-
if (!
|
|
304
|
+
if (!t2.injectFullCSS)
|
|
270
305
|
return;
|
|
271
|
-
const
|
|
272
|
-
|
|
273
|
-
|
|
306
|
+
const o2 = p(r, e);
|
|
307
|
+
t2.strategy === "runtime" ? v$1($.FULL, o2) : t2.strategy === "hybrid" && requestIdleCallback(() => {
|
|
308
|
+
v$1($.FULL, o2);
|
|
274
309
|
}, { timeout: 100 });
|
|
275
310
|
}
|
|
276
|
-
function
|
|
277
|
-
|
|
311
|
+
function M(r, t2) {
|
|
312
|
+
r.provide("mazThemeState", t2), r.config.globalProperties.$mazThemeState = t2;
|
|
278
313
|
}
|
|
279
|
-
const
|
|
280
|
-
async install(
|
|
281
|
-
const
|
|
282
|
-
preset: "maz-ui",
|
|
314
|
+
const v = {
|
|
315
|
+
async install(r, t2) {
|
|
316
|
+
const e = {
|
|
283
317
|
strategy: "runtime",
|
|
318
|
+
overrides: {},
|
|
284
319
|
darkModeStrategy: "class",
|
|
285
|
-
colorMode: "auto",
|
|
320
|
+
colorMode: (t2?.mode !== "both" ? t2?.mode : t2?.colorMode) ?? "auto",
|
|
286
321
|
injectCriticalCSS: !0,
|
|
287
322
|
injectFullCSS: !0,
|
|
288
|
-
|
|
289
|
-
|
|
323
|
+
mode: "both",
|
|
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({
|
|
290
326
|
// @ts-expect-error - empty currentPreset to avoid error
|
|
291
327
|
currentPreset: {},
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
328
|
+
mode: e.mode,
|
|
329
|
+
colorMode: o$2,
|
|
330
|
+
isDark: a,
|
|
331
|
+
strategy: e.strategy,
|
|
332
|
+
darkModeStrategy: e.darkModeStrategy
|
|
296
333
|
});
|
|
297
|
-
|
|
298
|
-
const
|
|
299
|
-
|
|
300
|
-
foundation: {
|
|
301
|
-
...preset.foundation,
|
|
302
|
-
...config.overrides.foundation
|
|
303
|
-
},
|
|
304
|
-
colors: {
|
|
305
|
-
light: { ...preset.colors.light, ...config.overrides.colors?.light },
|
|
306
|
-
dark: { ...preset.colors.dark, ...config.overrides.colors?.dark }
|
|
307
|
-
}
|
|
308
|
-
} : preset;
|
|
309
|
-
themeState.currentPreset = finalPreset, config.strategy !== "buildtime" && injectThemeCSS(finalPreset, config);
|
|
310
|
-
}
|
|
311
|
-
}, defaultLocalesLoaders = {
|
|
312
|
-
"./locales/de.ts": () => import("../chunks/de.B15Maq8Z.js").then((m) => ({ default: m.default })),
|
|
313
|
-
"./locales/en.ts": () => import("../chunks/en.Q_4-KljL.js").then((m) => ({ default: m.default })),
|
|
314
|
-
"./locales/es.ts": () => import("../chunks/es.BV1TlfTw.js").then((m) => ({ default: m.default })),
|
|
315
|
-
"./locales/fr.ts": () => import("../chunks/fr.BVPG-7Dk.js").then((m) => ({ default: m.default })),
|
|
316
|
-
"./locales/it.ts": () => import("../chunks/it.Be9xhI4P.js").then((m) => ({ default: m.default })),
|
|
317
|
-
"./locales/ja.ts": () => import("../chunks/ja.CWU7KYEA.js").then((m) => ({ default: m.default })),
|
|
318
|
-
"./locales/pt.ts": () => import("../chunks/pt.CfaFSxVt.js").then((m) => ({ default: m.default })),
|
|
319
|
-
"./locales/zh-CN.ts": () => import("../chunks/zh-CN.CCkuvk-E.js").then((m) => ({ default: m.default }))
|
|
320
|
-
}, defaultMessagesCache = /* @__PURE__ */ new Map(), globalState = reactive({
|
|
321
|
-
loadedLocales: /* @__PURE__ */ new Set(),
|
|
322
|
-
messages: {},
|
|
323
|
-
userMessages: {},
|
|
324
|
-
loadingPromises: /* @__PURE__ */ new Map()
|
|
325
|
-
});
|
|
326
|
-
function getMessage(obj, path) {
|
|
327
|
-
return path.split(".").reduce((current, key) => current?.[key], obj);
|
|
328
|
-
}
|
|
329
|
-
function setMessage(obj, path, value) {
|
|
330
|
-
const keys = path.split("."), lastKey = keys.pop(), target = keys.reduce((current, key) => ((!current[key] || typeof current[key] != "object") && (current[key] = {}), current[key]), obj);
|
|
331
|
-
target[lastKey] = value;
|
|
332
|
-
}
|
|
333
|
-
function isFlattenedObject(obj) {
|
|
334
|
-
return !obj || typeof obj != "object" ? !1 : Object.keys(obj).some((key) => key.includes("."));
|
|
335
|
-
}
|
|
336
|
-
function flattenToNested(flatObj) {
|
|
337
|
-
if (!isFlattenedObject(flatObj))
|
|
338
|
-
return flatObj;
|
|
339
|
-
const nested = {};
|
|
340
|
-
for (const [key, value] of Object.entries(flatObj))
|
|
341
|
-
key.includes(".") ? setMessage(nested, key, value) : nested[key] = value;
|
|
342
|
-
return nested;
|
|
343
|
-
}
|
|
344
|
-
function mergeMessages(target, source) {
|
|
345
|
-
const normalizedSource = flattenToNested(source), result = { ...flattenToNested(target) };
|
|
346
|
-
for (const key in normalizedSource)
|
|
347
|
-
normalizedSource[key] && typeof normalizedSource[key] == "object" ? result[key] = mergeMessages(result[key] || {}, normalizedSource[key]) : result[key] = normalizedSource[key];
|
|
348
|
-
return result;
|
|
349
|
-
}
|
|
350
|
-
function interpolate(message, variables) {
|
|
351
|
-
return variables ? message.replace(/\{(\w+)\}/g, (match, key) => variables[key] !== void 0 ? String(variables[key]) : match) : message;
|
|
352
|
-
}
|
|
353
|
-
async function loadDefaultMessages(locale) {
|
|
354
|
-
if (defaultMessagesCache.has(locale))
|
|
355
|
-
return defaultMessagesCache.get(locale);
|
|
356
|
-
const loaderPath = `./locales/${locale}.ts`, loader = defaultLocalesLoaders[loaderPath];
|
|
357
|
-
if (!loader)
|
|
358
|
-
return {};
|
|
359
|
-
try {
|
|
360
|
-
const messages = (await loader()).default;
|
|
361
|
-
return defaultMessagesCache.set(locale, messages), messages;
|
|
362
|
-
} catch (error) {
|
|
363
|
-
return console.error(`Failed to load default messages for locale "${locale}":`, error), {};
|
|
364
|
-
}
|
|
365
|
-
}
|
|
366
|
-
function loadLocale(targetLocale) {
|
|
367
|
-
if (globalState.loadedLocales.has(targetLocale))
|
|
368
|
-
return Promise.resolve();
|
|
369
|
-
if (globalState.loadingPromises.has(targetLocale))
|
|
370
|
-
return globalState.loadingPromises.get(targetLocale);
|
|
371
|
-
const loadingPromise = (async () => {
|
|
372
|
-
try {
|
|
373
|
-
const localeDefaultMessages = await loadDefaultMessages(targetLocale);
|
|
374
|
-
let localeUserMessages = {};
|
|
375
|
-
const userLoader = globalState.userMessages[targetLocale];
|
|
376
|
-
if (userLoader)
|
|
377
|
-
if (typeof userLoader == "function")
|
|
378
|
-
try {
|
|
379
|
-
const userMessages = await userLoader();
|
|
380
|
-
localeUserMessages = "default" in userMessages ? userMessages.default : userMessages;
|
|
381
|
-
} catch (error) {
|
|
382
|
-
console.error(`Failed to load user translations for locale "${targetLocale}":`, error), localeUserMessages = {};
|
|
383
|
-
}
|
|
384
|
-
else
|
|
385
|
-
localeUserMessages = userLoader;
|
|
386
|
-
globalState.messages[targetLocale] = mergeMessages(localeDefaultMessages, localeUserMessages), globalState.loadedLocales.add(targetLocale);
|
|
387
|
-
} catch (error) {
|
|
388
|
-
console.error(`Failed to load translations for locale "${targetLocale}":`, error), globalState.messages[targetLocale] = {}, globalState.loadedLocales.add(targetLocale);
|
|
389
|
-
} finally {
|
|
390
|
-
globalState.loadingPromises.delete(targetLocale);
|
|
391
|
-
}
|
|
392
|
-
})();
|
|
393
|
-
return globalState.loadingPromises.set(targetLocale, loadingPromise), loadingPromise;
|
|
394
|
-
}
|
|
395
|
-
function createMazTranslations(options = {}) {
|
|
396
|
-
const {
|
|
397
|
-
locale: initialLocale = "en",
|
|
398
|
-
fallbackLocale = "en",
|
|
399
|
-
preloadFallback = !0,
|
|
400
|
-
messages = {}
|
|
401
|
-
} = options, locale = ref(initialLocale);
|
|
402
|
-
for (const [loc, msgs] of Object.entries(messages))
|
|
403
|
-
globalState.userMessages[loc] = msgs, msgs && typeof msgs == "object" && (globalState.messages[loc] = { ...globalState.messages[loc], ...msgs });
|
|
404
|
-
setTimeout(() => {
|
|
405
|
-
loadLocale(initialLocale).catch(console.error), preloadFallback && fallbackLocale !== initialLocale && loadLocale(fallbackLocale).catch(console.error);
|
|
406
|
-
}, 0);
|
|
407
|
-
function t(key, variables) {
|
|
408
|
-
let message = getMessage(globalState.messages[locale.value], key);
|
|
409
|
-
if (!message && fallbackLocale && locale.value !== fallbackLocale) {
|
|
410
|
-
if (!globalState.loadedLocales.has(fallbackLocale))
|
|
411
|
-
return loadLocale(fallbackLocale).catch(console.error), key;
|
|
412
|
-
message = getMessage(globalState.messages[fallbackLocale], key);
|
|
413
|
-
}
|
|
414
|
-
if (!message && fallbackLocale !== "en" && locale.value !== "en") {
|
|
415
|
-
if (!globalState.loadedLocales.has("en"))
|
|
416
|
-
return loadLocale("en").catch(console.error), key;
|
|
417
|
-
message = getMessage(globalState.messages.en, key);
|
|
418
|
-
}
|
|
419
|
-
return message ? interpolate(String(message), variables) : (console.warn(`[@maz-ui/translations] Translation not found for key: ${key}`), key);
|
|
420
|
-
}
|
|
421
|
-
async function setLocale(newLocale) {
|
|
422
|
-
globalState.loadedLocales.has(newLocale) || await loadLocale(newLocale), locale.value = newLocale;
|
|
423
|
-
}
|
|
424
|
-
function isLocaleLoaded(localeToCheck) {
|
|
425
|
-
return globalState.loadedLocales.has(localeToCheck);
|
|
426
|
-
}
|
|
427
|
-
function isLocaleLoading(localeToCheck) {
|
|
428
|
-
return globalState.loadingPromises.has(localeToCheck);
|
|
429
|
-
}
|
|
430
|
-
function getAvailableLocales() {
|
|
431
|
-
const locales = /* @__PURE__ */ new Set();
|
|
432
|
-
for (const [path, loader] of Object.entries(defaultLocalesLoaders))
|
|
433
|
-
loader && typeof loader == "function" && locales.add(path.replace("./locales/", "").replace(".ts", ""));
|
|
434
|
-
for (const path of Object.keys(globalState.userMessages))
|
|
435
|
-
locales.add(path);
|
|
436
|
-
return Array.from(locales);
|
|
437
|
-
}
|
|
438
|
-
function getMessages() {
|
|
439
|
-
return globalState.messages;
|
|
440
|
-
}
|
|
441
|
-
function getLoadedLocales() {
|
|
442
|
-
return Object.keys(globalState.messages);
|
|
443
|
-
}
|
|
444
|
-
function setLocaleMessage(targetLocale, messages2) {
|
|
445
|
-
globalState.messages[targetLocale] || (globalState.messages[targetLocale] = {}), globalState.messages[targetLocale] = mergeMessages(globalState.messages[targetLocale], messages2), globalState.loadedLocales.add(targetLocale);
|
|
446
|
-
}
|
|
447
|
-
return {
|
|
448
|
-
locale,
|
|
449
|
-
t,
|
|
450
|
-
setLocale,
|
|
451
|
-
isLocaleLoaded,
|
|
452
|
-
isLocaleLoading,
|
|
453
|
-
getAvailableLocales,
|
|
454
|
-
setLocaleMessage,
|
|
455
|
-
getMessages,
|
|
456
|
-
getLoadedLocales
|
|
457
|
-
};
|
|
458
|
-
}
|
|
459
|
-
const MazTranslations = {
|
|
460
|
-
install(app, options = {}) {
|
|
461
|
-
const i18n = createMazTranslations(options);
|
|
462
|
-
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);
|
|
463
337
|
}
|
|
464
338
|
}, MazUi = {
|
|
465
|
-
install(app, options
|
|
339
|
+
install(app, options) {
|
|
466
340
|
const { theme, translations } = options;
|
|
467
|
-
app.use(
|
|
341
|
+
app.use(v, theme), app.use(MazUiTranslations, translations);
|
|
468
342
|
}
|
|
469
343
|
};
|
|
470
344
|
export {
|