maz-ui 4.0.0-beta.3 → 4.0.0-beta.31
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/MazAccordion.DUQCf8vy.css +1 -0
- package/dist/assets/{MazAnimatedCounter.CTG-PC5W.css → MazAnimatedCounter.DkZNPRLp.css} +1 -1
- package/dist/assets/MazAnimatedText.DDqCxrFX.css +1 -0
- package/dist/assets/MazBackdrop.BnhcmjbP.css +1 -0
- package/dist/assets/{MazBadge.DN8tdE8_.css → MazBadge.ChI2DaTU.css} +1 -1
- package/dist/assets/MazBtn.BYOKMl_2.css +1 -0
- package/dist/assets/MazCard.D0ksni8A.css +1 -0
- package/dist/assets/{MazCardSpotlight.Dy-wuLQq.css → MazCardSpotlight.IbPp_y0j.css} +1 -1
- package/dist/assets/MazCarousel.D4zTkRsG.css +1 -0
- package/dist/assets/MazCheckbox.aH1IKnrR.css +1 -0
- package/dist/assets/MazChecklist.BzF5KtZ3.css +1 -0
- package/dist/assets/MazDatePicker.BUVI9tfN.css +1 -0
- package/dist/assets/MazDropzone.C2SunLAI.css +1 -0
- package/dist/assets/MazInput.BPhjbYZG.css +1 -0
- package/dist/assets/MazInputCode.FA2z4HQd.css +1 -0
- package/dist/assets/MazInputPhoneNumber.DQKElfIM.css +1 -0
- package/dist/assets/MazInputTags.KNTpDHof.css +1 -0
- package/dist/assets/MazLazyImg.NlPRN3Nk.css +1 -0
- package/dist/assets/MazLink.CFscNMFr.css +1 -0
- package/dist/assets/MazPickerCalendar.e-eF8E7m.css +1 -0
- package/dist/assets/MazPickerCalendarMonth.BRoEh_ad.css +1 -0
- package/dist/assets/{MazPickerCalendarSwitcher.uni8vJJv.css → MazPickerCalendarSwitcher.CI9Vw1sJ.css} +1 -1
- package/dist/assets/{MazPickerContainer.k3DGjyHC.css → MazPickerContainer.DmHuaFqE.css} +1 -1
- package/dist/assets/{MazPickerHeader.ZYCJY5bX.css → MazPickerHeader.C4W93yMD.css} +1 -1
- package/dist/assets/MazPickerMonthSwitcher.D9lfVzYo.css +1 -0
- package/dist/assets/{MazPickerYearSwitcher.Dl30Dwor.css → MazPickerYearSwitcher.CFiH13QC.css} +1 -1
- package/dist/assets/MazPopover.B3kR2Gsa.css +1 -0
- package/dist/assets/MazPullToRefresh.BQ64UvzA.css +1 -0
- package/dist/assets/MazRadio.aTHM-mpx.css +1 -0
- package/dist/assets/MazRadioButtons.DN_rAzT9.css +1 -0
- package/dist/assets/MazReadingProgressBar.CwBVXE3g.css +1 -0
- package/dist/assets/MazSelect.DuRAHZGW.css +1 -0
- package/dist/assets/{MazSelectCountry.D2Qudf0K.css → MazSelectCountry.EW8fKXFX.css} +1 -1
- package/dist/assets/{MazSlider.D5SgmZLH.css → MazSlider.y4qpnD0N.css} +1 -1
- package/dist/assets/MazSpinner.CsiFJ1DS.css +1 -0
- package/dist/assets/MazStepper.BD2gDGAX.css +1 -0
- package/dist/assets/MazSwitch.Bxmh2iFj.css +1 -0
- package/dist/assets/{MazTable.B1tkeUfE.css → MazTable.DMlQdImb.css} +1 -1
- package/dist/assets/MazTableRow.DgBXpK9J.css +1 -0
- package/dist/assets/{MazTabsBar.B9N_jdqU.css → MazTabsBar.gcS2Fc-B.css} +1 -1
- package/dist/assets/{MazTabsContentItem.CHfy19ZF.css → MazTabsContentItem.C84SDmj0.css} +1 -1
- package/dist/assets/MazTextarea.li9dWBax.css +1 -0
- package/dist/assets/{PhoneInput.CyWO76iq.css → PhoneInput.DCWA_-gC.css} +1 -1
- package/dist/assets/{fullscreen-img.pvt6196l.css → fullscreen-img.Bkuz1GOX.css} +1 -1
- package/dist/assets/{toast.kunueRvo.css → toast.DH9mbkvs.css} +1 -1
- package/dist/chunks/{MazDatePicker.CT5yJhSN.js → MazDatePicker.bKFpslPf.js} +54 -44
- package/dist/chunks/{MazDialogPromise.vue_vue_type_script_setup_true_lang.BQvDEofz.js → MazDialogConfirm.vue_vue_type_script_setup_true_lang.Grn2kB3x.js} +78 -18
- package/dist/chunks/{MazDropdown.vue_vue_type_style_index_0_lang.abk1IbMX.js → MazDropdown.vue_vue_type_style_index_0_lang.X8ygqBUZ.js} +22 -27
- package/dist/chunks/{MazInputPhoneNumber.Uwhn1Q9j.js → MazInputPhoneNumber.BVHi0OiN.js} +28 -18
- package/dist/chunks/{MazInputPrice.vue_vue_type_script_setup_true_lang.GMKzSu7R.js → MazInputPrice.vue_vue_type_script_setup_true_lang.BA6TDX-T.js} +31 -1
- package/dist/chunks/{MazPickerCalendar.RS6ZMdDK.js → MazPickerCalendar.lLfvUtrb.js} +8 -8
- package/dist/chunks/{MazPickerCalendarMonth.hQBSVkc9.js → MazPickerCalendarMonth.Djzgo1tF.js} +9 -9
- package/dist/chunks/{MazPickerCalendarSwitcher.Cp2ux3E4.js → MazPickerCalendarSwitcher.Bf24kKw6.js} +3 -3
- package/dist/chunks/{MazPickerContainer.DnfB3Dqg.js → MazPickerContainer.7hYHiOaa.js} +4 -6
- package/dist/chunks/{MazPickerHeader.Dlz2yJ1D.js → MazPickerHeader.B00RAQPS.js} +3 -3
- package/dist/chunks/{MazPickerMonthSwitcher.BpfCGGxQ.js → MazPickerMonthSwitcher.B2ZgNJWy.js} +5 -6
- package/dist/chunks/{MazPickerTime.EuWWNfid.js → MazPickerTime.Bd4khA2e.js} +1 -1
- package/dist/chunks/{MazPickerYearSwitcher.D4aO09D3.js → MazPickerYearSwitcher.BIy9xGIw.js} +8 -27
- package/dist/chunks/{MazSwitch.vue_vue_type_style_index_0_lang.DnCjlD6D.js → MazSwitch.vue_vue_type_style_index_0_lang.CU43Y1ky.js} +2 -2
- package/dist/chunks/{MazTable.vue_vue_type_script_setup_true_lang.bm7ng8fK.js → MazTable.vue_vue_type_script_setup_true_lang.BcTw9Tyh.js} +3 -3
- package/dist/chunks/{PhoneInput.CPjyZ8Sq.js → PhoneInput.D9vRIgS6.js} +21 -27
- package/dist/chunks/{utils.BBuYjMbK.js → dom-events.Bbe7wDQl.js} +221 -115
- package/dist/chunks/{en.BzBlrE0C.js → en.Q_4-KljL.js} +12 -0
- package/dist/chunks/{fullscreen-img.directive.CyOHexcO.js → fullscreen-img.directive.Be383en8.js} +2 -2
- package/dist/chunks/{lazy-img.directive.D5zCo3Zi.js → lazy-img.directive.BLFnGqQa.js} +1 -1
- package/dist/chunks/pascalCase.GdDKKQ-O.js +19 -0
- package/dist/chunks/types.D0Bp_UhS.js +6 -0
- package/dist/chunks/useStringMatching.BBezu-6J.js +134 -0
- package/dist/chunks/{useTranslations.BXuww4ux.js → useTranslations.D5aoYwD7.js} +1 -1
- package/dist/chunks/vClickOutside.DIOiluy0.js +107 -0
- package/dist/components/MazAccordion.js +2 -2
- package/dist/components/MazAnimatedCounter.js +3 -3
- package/dist/components/MazAnimatedText.js +2 -2
- package/dist/components/MazBackdrop.js +3 -3
- package/dist/components/MazBadge.js +5 -4
- package/dist/components/MazBtn.js +9 -7
- package/dist/components/MazCard.js +2 -2
- package/dist/components/MazCardSpotlight.js +4 -4
- package/dist/components/MazCarousel.js +12 -9
- package/dist/components/MazCheckbox.js +10 -12
- package/dist/components/MazChecklist.js +4 -5
- package/dist/components/MazDatePicker.js +1 -1
- package/dist/components/MazDialogConfirm.js +6 -0
- package/dist/components/MazDropdown.js +1 -1
- package/dist/components/MazDropzone.js +5 -5
- package/dist/components/MazGallery.js +2 -2
- package/dist/components/MazInput.js +21 -16
- package/dist/components/MazInputCode.js +2 -2
- package/dist/components/MazInputPhoneNumber.js +1 -1
- package/dist/components/MazInputPrice.js +1 -1
- package/dist/components/MazInputTags.js +2 -2
- package/dist/components/MazLazyImg.js +9 -9
- package/dist/components/MazLink.js +9 -5
- package/dist/components/MazPagination.js +1 -1
- package/dist/components/MazPopover.js +124 -162
- package/dist/components/MazPullToRefresh.js +8 -3
- package/dist/components/MazRadio.js +8 -16
- package/dist/components/MazRadioButtons.js +8 -7
- package/dist/components/MazReadingProgressBar.js +10 -3
- package/dist/components/MazSelect.js +31 -18
- package/dist/components/MazSelectCountry.js +18 -11
- package/dist/components/MazSlider.js +2 -2
- package/dist/components/MazSpinner.js +3 -4
- package/dist/components/MazStepper.js +2 -2
- package/dist/components/MazSwitch.js +1 -1
- package/dist/components/MazTable.js +3 -3
- package/dist/components/MazTableCell.js +1 -1
- package/dist/components/MazTableRow.js +3 -3
- package/dist/components/MazTableTitle.js +1 -1
- package/dist/components/MazTabsBar.js +6 -6
- package/dist/components/MazTabsContentItem.js +6 -7
- package/dist/components/MazTextarea.js +24 -3
- package/dist/components/index.js +8 -8
- package/dist/composables/index.js +4 -2
- package/dist/composables/useAos.js +1 -1
- package/dist/composables/useDialog.js +1 -1
- package/dist/composables/useDisplayNames.js +17 -13
- package/dist/composables/useDropzone.js +7 -7
- package/dist/composables/useFormField.js +15 -19
- package/dist/composables/useFormValidator.js +58 -29
- package/dist/composables/useIdleTimeout.js +108 -1
- package/dist/composables/useInjectStrict.js +2 -2
- package/dist/composables/useInstanceUniqId.js +3 -2
- package/dist/composables/useStringMatching.js +3 -40
- package/dist/composables/useSwipe.js +77 -1
- package/dist/composables/useToast.js +1 -1
- package/dist/composables/useUserVisibility.js +47 -1
- package/dist/composables/useWait.js +1 -1
- package/dist/composables/useWindowSize.js +1 -1
- package/dist/css/main.css +1 -1
- package/dist/directives/index.js +7 -7
- package/dist/directives/vClickOutside.js +4 -102
- package/dist/directives/vFullscreenImg.js +1 -1
- package/dist/directives/vLazyImg.js +2 -2
- package/dist/directives/vTooltip.js +97 -62
- package/dist/index.js +1 -114
- package/dist/plugins/dialog.js +3 -3
- package/dist/plugins/maz-ui.js +235 -195
- package/dist/plugins/toast.js +13 -14
- package/dist/resolvers/MazComponentsResolver.js +1 -1
- package/dist/resolvers/MazDirectivesResolver.js +1 -1
- package/dist/resolvers/MazModulesResolver.js +6 -2
- package/dist/tailwindcss/tailwind.config.js +5 -2
- package/dist/tailwindcss/variables/design-tokens.js +3 -0
- package/dist/types/components/MazAccordion.vue.d.ts +15 -2
- package/dist/types/components/MazBtn.vue.d.ts +1 -0
- package/dist/types/components/MazCard.vue.d.ts +1 -1
- package/dist/types/components/MazCarousel.vue.d.ts +4 -1
- package/dist/types/components/MazCheckbox.vue.d.ts +0 -6
- package/dist/types/components/MazChecklist.vue.d.ts +1 -1
- package/dist/types/components/MazDatePicker/utils.d.ts +5 -4
- package/dist/types/components/MazDatePicker.vue.d.ts +39 -51
- package/dist/types/components/MazDialogConfirm/useMazDialogConfirm.d.ts +47 -0
- package/dist/types/components/{MazDialogPromise.vue.d.ts → MazDialogConfirm.vue.d.ts} +43 -10
- package/dist/types/components/MazDropdown.vue.d.ts +12 -12
- package/dist/types/components/MazInput.vue.d.ts +7 -0
- 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 +3 -3
- package/dist/types/components/MazInputPhoneNumber/useMazInputPhoneNumber.d.ts +8 -2
- package/dist/types/components/MazInputPhoneNumber.vue.d.ts +45 -23
- package/dist/types/components/MazInputPrice.vue.d.ts +3 -3
- package/dist/types/components/MazInputTags.vue.d.ts +1 -1
- package/dist/types/components/MazLazyImg.vue.d.ts +8 -8
- package/dist/types/components/MazLink.vue.d.ts +11 -0
- package/dist/types/components/MazPopover.vue.d.ts +26 -20
- 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 +11 -4
- package/dist/types/components/MazSelectCountry.vue.d.ts +15 -6
- package/dist/types/components/MazStepper.vue.d.ts +13 -2
- package/dist/types/components/MazTable.vue.d.ts +63 -2
- package/dist/types/components/index.d.ts +4 -4
- package/dist/types/components/types.d.ts +1 -0
- package/dist/types/composables/index.d.ts +2 -1
- package/dist/types/composables/useDisplayNames.d.ts +3 -8
- package/dist/types/composables/useDropzone.d.ts +3 -3
- package/dist/types/composables/useFormField.d.ts +16 -56
- package/dist/types/composables/useFormValidator/config.d.ts +2 -2
- package/dist/types/composables/useFormValidator/dom-events.d.ts +19 -0
- package/dist/types/composables/useFormValidator/state-management.d.ts +72 -0
- package/dist/types/composables/useFormValidator/types.d.ts +20 -32
- package/dist/types/composables/useFormValidator/validation.d.ts +37 -0
- package/dist/types/composables/useFormValidator.d.ts +16 -10
- package/dist/types/composables/useIdleTimeout.d.ts +1 -1
- package/dist/types/composables/useInjectStrict.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/vClickOutside.d.ts +11 -18
- package/dist/types/directives/vFullscreenImg/MazFullscreenImg.vue.d.ts +2 -2
- package/dist/types/directives/vFullscreenImg/fullscreen-img.directive.d.ts +3 -5
- package/dist/types/directives/vFullscreenImg.d.ts +9 -4
- package/dist/types/directives/vLazyImg/lazy-img.directive.d.ts +3 -5
- package/dist/types/directives/vLazyImg.d.ts +11 -6
- package/dist/types/directives/vTooltip.d.ts +14 -14
- package/dist/types/directives/vZoomImg/zoom-img.directive.d.ts +2 -0
- package/dist/types/directives/vZoomImg.d.ts +9 -5
- package/dist/types/index.d.ts +1 -1
- package/dist/types/plugins/aos.d.ts +30 -4
- package/dist/types/plugins/dialog/DialogHandler.d.ts +2 -2
- package/dist/types/plugins/dialog.d.ts +2 -4
- package/dist/types/plugins/maz-ui.d.ts +2 -63
- package/dist/types/plugins/toast.d.ts +2 -4
- package/dist/types/plugins/wait.d.ts +2 -3
- package/dist/types/tailwindcss/tailwind.config.d.ts +5 -0
- package/dist/types/tailwindcss/variables/design-tokens.d.ts +3 -0
- package/package.json +38 -37
- package/dist/assets/MazAccordion.esK3rR4p.css +0 -1
- package/dist/assets/MazAnimatedText.BrOwWuqf.css +0 -1
- package/dist/assets/MazBackdrop.DNpnLh63.css +0 -1
- package/dist/assets/MazBtn.BnRxVlqS.css +0 -1
- package/dist/assets/MazCard.C6nDaeIC.css +0 -1
- package/dist/assets/MazCarousel.BaqN4hLP.css +0 -1
- package/dist/assets/MazCheckbox.C_qIngLy.css +0 -1
- package/dist/assets/MazChecklist.CWK_Gl-t.css +0 -1
- package/dist/assets/MazDatePicker.V5JwKPrQ.css +0 -1
- package/dist/assets/MazDropzone.DafxQwbq.css +0 -1
- package/dist/assets/MazInput.DW2KOJHY.css +0 -1
- package/dist/assets/MazInputCode.CG6EJBEk.css +0 -1
- package/dist/assets/MazInputPhoneNumber.vpA2mrZn.css +0 -1
- package/dist/assets/MazInputTags.B_s9J3sw.css +0 -1
- package/dist/assets/MazLazyImg.BNaVtpfX.css +0 -1
- package/dist/assets/MazLink.CCfbrUs0.css +0 -1
- package/dist/assets/MazPickerCalendar.CHpWIzhL.css +0 -1
- package/dist/assets/MazPickerCalendarMonth.zkrPVHDv.css +0 -1
- package/dist/assets/MazPickerMonthSwitcher.168v7Hs1.css +0 -1
- package/dist/assets/MazPopover.Bth9NWia.css +0 -1
- package/dist/assets/MazPullToRefresh.DABqbGtK.css +0 -1
- package/dist/assets/MazRadio.DKMFWwy_.css +0 -1
- package/dist/assets/MazRadioButtons.BA4rjgK9.css +0 -1
- package/dist/assets/MazReadingProgressBar.n1Is8_Y3.css +0 -1
- package/dist/assets/MazSelect.DZZpDg8z.css +0 -1
- package/dist/assets/MazSpinner.CP85N7RJ.css +0 -1
- package/dist/assets/MazStepper.DYMde9uq.css +0 -1
- package/dist/assets/MazSwitch.Z1ZMm7tx.css +0 -1
- package/dist/assets/MazTableRow.B78Bd4Kv.css +0 -1
- package/dist/assets/MazTextarea.Dz11mUeK.css +0 -1
- package/dist/chunks/TextareaAutogrow.C22LQx0k.js +0 -25
- package/dist/chunks/debounceCallback.B69vn57Q.js +0 -7
- package/dist/chunks/formatCurrency.C8NzW9Ii.js +0 -34
- package/dist/chunks/formatDate.DZ_OzdnV.js +0 -21
- package/dist/chunks/getCountryFlagUrl.dQjriBXx.js +0 -9
- package/dist/chunks/idleTimeout.-ICpdeGV.js +0 -111
- package/dist/chunks/isServer.BokzeB-Q.js +0 -6
- package/dist/chunks/isStandaloneMode.BpUpOTbA.js +0 -10
- package/dist/chunks/normalizeString.CFe2M8S_.js +0 -69
- package/dist/chunks/pascalCase.D_nuQ66I.js +0 -11
- package/dist/chunks/swipeHandler.8emelhOL.js +0 -80
- package/dist/chunks/throttle.DN8ARw0a.js +0 -11
- package/dist/chunks/throttleId.7PhWZjcS.js +0 -62
- package/dist/chunks/userVisibility.BbQSJASv.js +0 -50
- package/dist/chunks/x-mark.CTalOvvY.js +0 -23
- package/dist/components/MazDialogPromise.js +0 -6
- package/dist/types/components/MazDialogPromise/useMazDialogPromise.d.ts +0 -54
- package/dist/types/components/MazInputPhoneNumber/types.d.ts +0 -22
- package/dist/types/composables/useFormValidator/utils.d.ts +0 -116
- package/dist/chunks/{pristine.ylgbwjxO.js → pristine.CxBZzgUG.js} +4 -4
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { ref, defineComponent, defineAsyncComponent, computed, onBeforeMount, onMounted, watch, provide, createElementBlock, openBlock, normalizeStyle, normalizeClass, createBlock, createCommentVNode, createVNode,
|
|
2
|
-
import { u as useTranslations } from "./useTranslations.
|
|
1
|
+
import { ref, defineComponent, defineAsyncComponent, computed, onBeforeMount, onMounted, watch, provide, createElementBlock, openBlock, normalizeStyle, normalizeClass, unref, createBlock, createCommentVNode, createVNode, mergeProps, withCtx, createElementVNode, toDisplayString, renderSlot, nextTick } from "vue";
|
|
2
|
+
import { u as useTranslations } from "./useTranslations.D5aoYwD7.js";
|
|
3
3
|
import { useInstanceUniqId } from "../composables/useInstanceUniqId.js";
|
|
4
4
|
import { getCountryCallingCode, getCountries, isSupportedCountry, getExampleNumber, parsePhoneNumberFromString, AsYouType } from "libphonenumber-js";
|
|
5
5
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper.B--vMWp3.js";
|
|
6
|
-
import '../assets/MazInputPhoneNumber.
|
|
6
|
+
import '../assets/MazInputPhoneNumber.DQKElfIM.css';const examples = ref();
|
|
7
7
|
function isCountryAvailable(locale) {
|
|
8
8
|
try {
|
|
9
9
|
const response = isSupportedCountry(locale);
|
|
@@ -57,9 +57,9 @@ function getPhoneNumberExample(countryCode) {
|
|
|
57
57
|
}
|
|
58
58
|
function getAsYouTypeFormat(countryCode, phoneNumber) {
|
|
59
59
|
try {
|
|
60
|
-
return !phoneNumber || !countryCode ?
|
|
60
|
+
return !phoneNumber || !countryCode || typeof countryCode != "string" || countryCode.length !== 2 ? phoneNumber : new AsYouType(countryCode).input(phoneNumber);
|
|
61
61
|
} catch (error) {
|
|
62
|
-
|
|
62
|
+
return console.error(`[MazInputPhoneNumber](getAsYouTypeFormat) Error with countryCode: "${countryCode}", phoneNumber: "${phoneNumber}"`, error), phoneNumber;
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
function isSameCountryCallingCode(countryCode, countryCode2) {
|
|
@@ -98,9 +98,9 @@ async function fetchLocaleIp() {
|
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
function getBrowserLocale() {
|
|
101
|
-
if (typeof window > "u")
|
|
101
|
+
if (typeof globalThis.window > "u")
|
|
102
102
|
return;
|
|
103
|
-
const browserLocale =
|
|
103
|
+
const browserLocale = globalThis.navigator.language;
|
|
104
104
|
if (!browserLocale)
|
|
105
105
|
return;
|
|
106
106
|
let locale = browserLocale.slice(3, 7).toUpperCase();
|
|
@@ -149,14 +149,21 @@ async function fetchCountryCode() {
|
|
|
149
149
|
};
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
|
+
function sanitizePhoneNumber(input) {
|
|
153
|
+
if (!input)
|
|
154
|
+
return "";
|
|
155
|
+
const regex = new RegExp(/[^\d ()+-]/g);
|
|
156
|
+
return input.replaceAll(regex, "").trim();
|
|
157
|
+
}
|
|
152
158
|
function useMazInputPhoneNumber() {
|
|
153
159
|
return {
|
|
154
160
|
fetchCountryCode,
|
|
155
161
|
getBrowserLocale,
|
|
156
|
-
getCountryList
|
|
162
|
+
getCountryList,
|
|
163
|
+
sanitizePhoneNumber
|
|
157
164
|
};
|
|
158
165
|
}
|
|
159
|
-
const _hoisted_1 = { class: "m-input-phone-number__country-list-code" }, _sfc_main = /* @__PURE__ */ defineComponent({
|
|
166
|
+
const _hoisted_1 = ["id"], _hoisted_2 = { class: "m-input-phone-number__country-list-code" }, _sfc_main = /* @__PURE__ */ defineComponent({
|
|
160
167
|
name: "MazInputPhoneNumber",
|
|
161
168
|
inheritAttrs: !1,
|
|
162
169
|
__name: "MazInputPhoneNumber",
|
|
@@ -185,7 +192,7 @@ const _hoisted_1 = { class: "m-input-phone-number__country-list-code" }, _sfc_ma
|
|
|
185
192
|
hideCountrySelect: { type: Boolean, default: !1 },
|
|
186
193
|
showCodeInList: { type: Boolean, default: !1 },
|
|
187
194
|
customCountriesList: { default: void 0 },
|
|
188
|
-
autoFormat: { type: Boolean, default:
|
|
195
|
+
autoFormat: { type: [String, Boolean], default: "blur" },
|
|
189
196
|
countryLocale: { default: void 0 },
|
|
190
197
|
validationError: { type: Boolean, default: !0 },
|
|
191
198
|
validationSuccess: { type: Boolean, default: !0 },
|
|
@@ -209,7 +216,7 @@ const _hoisted_1 = { class: "m-input-phone-number__country-list-code" }, _sfc_ma
|
|
|
209
216
|
},
|
|
210
217
|
emits: ["update:model-value", "country-code", "update:country-code", "data"],
|
|
211
218
|
setup(__props, { emit: __emit }) {
|
|
212
|
-
const props = __props, emits = __emit, MazSelectCountry = defineAsyncComponent(() => import("../components/MazSelectCountry.js")), PhoneInput = defineAsyncComponent(() => import("./PhoneInput.
|
|
219
|
+
const props = __props, emits = __emit, MazSelectCountry = defineAsyncComponent(() => import("../components/MazSelectCountry.js")), PhoneInput = defineAsyncComponent(() => import("./PhoneInput.D9vRIgS6.js")), { fetchCountryCode: fetchCountryCode2, getBrowserLocale: getBrowserLocale2, getCountryList: getCountryList2 } = useMazInputPhoneNumber(), { isCountryAvailable: isCountryAvailable2, getPhoneNumberResults: getPhoneNumberResults2 } = useLibphonenumber(), instanceId = useInstanceUniqId({
|
|
213
220
|
componentName: "MazInputPhoneNumber",
|
|
214
221
|
providedId: props.id
|
|
215
222
|
}), phoneNumber = ref(), selectedCountry = ref(), { t } = useTranslations(), messages = computed(() => ({
|
|
@@ -222,7 +229,7 @@ const _hoisted_1 = { class: "m-input-phone-number__country-list-code" }, _sfc_ma
|
|
|
222
229
|
placeholder: props.translations?.phoneInput?.placeholder || t("inputPhoneNumber.phoneInput.placeholder"),
|
|
223
230
|
example: props.translations?.phoneInput?.example
|
|
224
231
|
}
|
|
225
|
-
})), isPhoneNumberInternalUpdate = ref(!1), isCountryInternalUpdate = ref(!1),
|
|
232
|
+
})), isPhoneNumberInternalUpdate = ref(!1), isCountryInternalUpdate = ref(!1), results = ref({
|
|
226
233
|
isValid: !1,
|
|
227
234
|
countryCode: props.countryCode,
|
|
228
235
|
phoneNumber: props.modelValue
|
|
@@ -273,7 +280,7 @@ const _hoisted_1 = { class: "m-input-phone-number__country-list-code" }, _sfc_ma
|
|
|
273
280
|
updateTheResults({ phone: newPhoneNumber }), results.value.parsedCountryCode && results.value.parsedCountryCode !== selectedCountry.value && onCountryChanged({
|
|
274
281
|
countryCode: results.value.parsedCountryCode,
|
|
275
282
|
updateResults: !1
|
|
276
|
-
}), results.value.isValid &&
|
|
283
|
+
}), results.value.isValid && (props.autoFormat === "blur" || props.autoFormat === "typing") ? phoneNumber.value = results.value.formatNational?.trim().replace(new RegExp(/\D/g), "") : phoneNumber.value = newPhoneNumber, isPhoneNumberInternalUpdate.value = !0, results.value.e164 ? emits("update:model-value", results.value.e164) : emits("update:model-value", results.value.phoneNumber), setTimeout(() => {
|
|
277
284
|
isPhoneNumberInternalUpdate.value = !1;
|
|
278
285
|
}, 0);
|
|
279
286
|
}
|
|
@@ -323,6 +330,7 @@ const _hoisted_1 = { class: "m-input-phone-number__country-list-code" }, _sfc_ma
|
|
|
323
330
|
phoneNumber,
|
|
324
331
|
results
|
|
325
332
|
}), (_ctx, _cache) => (openBlock(), createElementBlock("div", {
|
|
333
|
+
id: unref(instanceId),
|
|
326
334
|
class: normalizeClass(["m-input-phone-number m-reset-css", [props.class, { "--block": _ctx.block }, _ctx.orientation ? `--${_ctx.orientation}` : void 0]]),
|
|
327
335
|
style: normalizeStyle(_ctx.style)
|
|
328
336
|
}, [
|
|
@@ -367,7 +375,7 @@ const _hoisted_1 = { class: "m-input-phone-number__country-list-code" }, _sfc_ma
|
|
|
367
375
|
}, void 0, !0)
|
|
368
376
|
]),
|
|
369
377
|
"country-list-code": withCtx(({ option }) => [
|
|
370
|
-
createElementVNode("span",
|
|
378
|
+
createElementVNode("span", _hoisted_2, " +" + toDisplayString(option.dialCode), 1)
|
|
371
379
|
]),
|
|
372
380
|
_: 3
|
|
373
381
|
}, 16, ["id", "model-value", "option-input-value-key", "color", "size", "locale", "countries-list", "list-position", "hide-flags", "search", "block", "error", "success", "translations", "hint", "options", "disabled", "search-threshold", "format-input-value", "show-code-in-list", "label"])),
|
|
@@ -380,10 +388,11 @@ const _hoisted_1 = { class: "m-input-phone-number__country-list-code" }, _sfc_ma
|
|
|
380
388
|
}, { ..._ctx.$attrs, ..._ctx.phoneInputAttributes }, {
|
|
381
389
|
color: _ctx.color,
|
|
382
390
|
size: _ctx.size,
|
|
383
|
-
"auto-format":
|
|
391
|
+
"auto-format": _ctx.autoFormat,
|
|
384
392
|
example: _ctx.example,
|
|
385
393
|
block: "",
|
|
386
394
|
disabled: _ctx.disabled,
|
|
395
|
+
name: _ctx.phoneInputAttributes.name,
|
|
387
396
|
"has-radius": !_ctx.hideCountrySelect,
|
|
388
397
|
success: _ctx.success || (_ctx.validationSuccess ? results.value.isValid : !1),
|
|
389
398
|
error: _ctx.error || (_ctx.validationError ? !!phoneNumber.value && !results.value.isValid : !1),
|
|
@@ -391,11 +400,12 @@ const _hoisted_1 = { class: "m-input-phone-number__country-list-code" }, _sfc_ma
|
|
|
391
400
|
label: _ctx.label,
|
|
392
401
|
placeholder: _ctx.placeholder,
|
|
393
402
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => onPhoneNumberChanged({ newPhoneNumber: $event }))
|
|
394
|
-
}), null, 16, ["id", "model-value", "color", "size", "auto-format", "example", "disabled", "has-radius", "success", "error", "locales", "label", "placeholder"])
|
|
395
|
-
],
|
|
403
|
+
}), null, 16, ["id", "model-value", "color", "size", "auto-format", "example", "disabled", "name", "has-radius", "success", "error", "locales", "label", "placeholder"])
|
|
404
|
+
], 14, _hoisted_1));
|
|
396
405
|
}
|
|
397
|
-
}), MazInputPhoneNumber = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
406
|
+
}), MazInputPhoneNumber = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-1180c2f2"]]);
|
|
398
407
|
export {
|
|
399
408
|
MazInputPhoneNumber as M,
|
|
409
|
+
useMazInputPhoneNumber as a,
|
|
400
410
|
useLibphonenumber as u
|
|
401
411
|
};
|
|
@@ -1,7 +1,37 @@
|
|
|
1
1
|
import { defineComponent, ref, watch, computed, onMounted, createBlock, openBlock, withKeys, unref, nextTick } from "vue";
|
|
2
2
|
import { MazBanknotes } from "@maz-ui/icons";
|
|
3
|
-
import { f as formatCurrency } from "./formatCurrency.C8NzW9Ii.js";
|
|
4
3
|
import MazInput from "../components/MazInput.js";
|
|
4
|
+
const DEFAULT_OPTIONS = {
|
|
5
|
+
style: "currency",
|
|
6
|
+
minimumFractionDigits: 2,
|
|
7
|
+
round: !1
|
|
8
|
+
};
|
|
9
|
+
function getFormattedCurrency(number, locale, options) {
|
|
10
|
+
let numberToFormat = +number;
|
|
11
|
+
return options.round && (numberToFormat = Math.floor(numberToFormat), options.minimumFractionDigits = 0), new Intl.NumberFormat(locale, options).format(numberToFormat);
|
|
12
|
+
}
|
|
13
|
+
function validRequiredAttributes(number, locale, options) {
|
|
14
|
+
if (number === void 0)
|
|
15
|
+
throw new TypeError("[maz-ui](FilterCurrency) The `number` attribute is required.");
|
|
16
|
+
if (locale === void 0)
|
|
17
|
+
throw new TypeError("[maz-ui](FilterCurrency) The `locale` attribute is required.");
|
|
18
|
+
if (typeof locale != "string")
|
|
19
|
+
throw new TypeError("[maz-ui](FilterCurrency) The `locale` attribute must be a string.");
|
|
20
|
+
if (options.currency === void 0)
|
|
21
|
+
throw new TypeError("[maz-ui](FilterCurrency) The `options.currency` attribute is required.");
|
|
22
|
+
}
|
|
23
|
+
function formatCurrency(number, locale, options) {
|
|
24
|
+
const options_ = {
|
|
25
|
+
...DEFAULT_OPTIONS,
|
|
26
|
+
...options
|
|
27
|
+
};
|
|
28
|
+
validRequiredAttributes(number, locale, options_);
|
|
29
|
+
try {
|
|
30
|
+
return getFormattedCurrency(number, locale, options_);
|
|
31
|
+
} catch (error) {
|
|
32
|
+
throw new Error(`[maz-ui](FilterCurrency) ${error}`);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
5
35
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
6
36
|
__name: "MazInputPrice",
|
|
7
37
|
props: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, defineAsyncComponent, ref, computed, createElementBlock, openBlock, createBlock, createCommentVNode, createElementVNode, unref, normalizeClass, createVNode, Transition, withCtx, Fragment, renderList } from "vue";
|
|
2
2
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper.B--vMWp3.js";
|
|
3
|
-
import '../assets/MazPickerCalendar.
|
|
3
|
+
import '../assets/MazPickerCalendar.e-eF8E7m.css';const _hoisted_1 = { class: "maz-picker-calendar flex" }, _sfc_main = /* @__PURE__ */ defineComponent({
|
|
4
4
|
__name: "MazPickerCalendar",
|
|
5
5
|
props: {
|
|
6
6
|
modelValue: {},
|
|
@@ -21,7 +21,7 @@ import '../assets/MazPickerCalendar.CHpWIzhL.css';const _hoisted_1 = { class: "m
|
|
|
21
21
|
},
|
|
22
22
|
emits: ["update:model-value", "update:calendar-date"],
|
|
23
23
|
setup(__props, { emit: __emit }) {
|
|
24
|
-
const props = __props, emits = __emit,
|
|
24
|
+
const props = __props, emits = __emit, MazPickerCalendarMonth = defineAsyncComponent(() => import("./MazPickerCalendarMonth.Djzgo1tF.js")), MazPickerCalendarSwitcher = defineAsyncComponent(() => import("./MazPickerCalendarSwitcher.Bf24kKw6.js")), MazPickerMonthSwitcher = defineAsyncComponent(() => import("./MazPickerMonthSwitcher.B2ZgNJWy.js")), MazPickerShortcuts = defineAsyncComponent(() => import("./MazPickerShortcuts.CMySiKny.js")), MazPickerYearSwitcher = defineAsyncComponent(() => import("./MazPickerYearSwitcher.BIy9xGIw.js")), hoverredDay = ref(), hasShortcuts = computed(
|
|
25
25
|
() => props.shortcuts && props.shortcuts.length > 0 && props.range
|
|
26
26
|
), monthSwitcherOpen = ref(!1), yearSwitcherOpen = ref(!1), currentValue = computed({
|
|
27
27
|
get: () => props.modelValue,
|
|
@@ -31,7 +31,7 @@ import '../assets/MazPickerCalendar.CHpWIzhL.css';const _hoisted_1 = { class: "m
|
|
|
31
31
|
set: (calendarDate2) => emits("update:calendar-date", calendarDate2)
|
|
32
32
|
});
|
|
33
33
|
return (_ctx, _cache) => (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
34
|
-
hasShortcuts.value ? (openBlock(), createBlock(unref(
|
|
34
|
+
hasShortcuts.value ? (openBlock(), createBlock(unref(MazPickerShortcuts), {
|
|
35
35
|
key: 0,
|
|
36
36
|
modelValue: currentValue.value,
|
|
37
37
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => currentValue.value = $event),
|
|
@@ -44,7 +44,7 @@ import '../assets/MazPickerCalendar.CHpWIzhL.css';const _hoisted_1 = { class: "m
|
|
|
44
44
|
createElementVNode("div", {
|
|
45
45
|
class: normalizeClass(["maz-picker-calendar__main", { "--has-double": _ctx.double }])
|
|
46
46
|
}, [
|
|
47
|
-
createVNode(unref(
|
|
47
|
+
createVNode(unref(MazPickerCalendarSwitcher), {
|
|
48
48
|
"calendar-date": calendarDate.value,
|
|
49
49
|
"onUpdate:calendarDate": _cache[1] || (_cache[1] = ($event) => calendarDate.value = $event),
|
|
50
50
|
locale: _ctx.locale,
|
|
@@ -54,7 +54,7 @@ import '../assets/MazPickerCalendar.CHpWIzhL.css';const _hoisted_1 = { class: "m
|
|
|
54
54
|
}, null, 8, ["calendar-date", "locale", "double"]),
|
|
55
55
|
createVNode(Transition, { name: "maz-picker-slide" }, {
|
|
56
56
|
default: withCtx(() => [
|
|
57
|
-
monthSwitcherOpen.value ? (openBlock(), createBlock(unref(
|
|
57
|
+
monthSwitcherOpen.value ? (openBlock(), createBlock(unref(MazPickerMonthSwitcher), {
|
|
58
58
|
key: 0,
|
|
59
59
|
"calendar-date": calendarDate.value,
|
|
60
60
|
"onUpdate:calendarDate": _cache[4] || (_cache[4] = ($event) => calendarDate.value = $event),
|
|
@@ -68,7 +68,7 @@ import '../assets/MazPickerCalendar.CHpWIzhL.css';const _hoisted_1 = { class: "m
|
|
|
68
68
|
}),
|
|
69
69
|
createVNode(Transition, { name: "maz-picker-slide" }, {
|
|
70
70
|
default: withCtx(() => [
|
|
71
|
-
yearSwitcherOpen.value ? (openBlock(), createBlock(unref(
|
|
71
|
+
yearSwitcherOpen.value ? (openBlock(), createBlock(unref(MazPickerYearSwitcher), {
|
|
72
72
|
key: 0,
|
|
73
73
|
"calendar-date": calendarDate.value,
|
|
74
74
|
"onUpdate:calendarDate": _cache[6] || (_cache[6] = ($event) => calendarDate.value = $event),
|
|
@@ -82,7 +82,7 @@ import '../assets/MazPickerCalendar.CHpWIzhL.css';const _hoisted_1 = { class: "m
|
|
|
82
82
|
createElementVNode("div", {
|
|
83
83
|
class: normalizeClass(["maz-picker-calendar__months", { "--is-range": _ctx.range }])
|
|
84
84
|
}, [
|
|
85
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(months.value, (month) => (openBlock(), createBlock(unref(
|
|
85
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(months.value, (month) => (openBlock(), createBlock(unref(MazPickerCalendarMonth), {
|
|
86
86
|
key: month,
|
|
87
87
|
modelValue: currentValue.value,
|
|
88
88
|
"onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => currentValue.value = $event),
|
|
@@ -105,7 +105,7 @@ import '../assets/MazPickerCalendar.CHpWIzhL.css';const _hoisted_1 = { class: "m
|
|
|
105
105
|
], 2)
|
|
106
106
|
]));
|
|
107
107
|
}
|
|
108
|
-
}), MazPickerCalendar = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
108
|
+
}), MazPickerCalendar = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-9e444411"]]);
|
|
109
109
|
export {
|
|
110
110
|
MazPickerCalendar as default
|
|
111
111
|
};
|
package/dist/chunks/{MazPickerCalendarMonth.hQBSVkc9.js → MazPickerCalendarMonth.Djzgo1tF.js}
RENAMED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { defineComponent, computed, createElementBlock, openBlock, Fragment, renderList, toDisplayString, useCssVars, ref, watch, createVNode, TransitionGroup, withCtx, normalizeClass, createBlock, createElementVNode } from "vue";
|
|
2
2
|
import dayjs from "dayjs";
|
|
3
|
-
import { g as getDaysOfWeek,
|
|
3
|
+
import { g as getDaysOfWeek, b as getDaysInMonth, c as getFirstDayOfMonth, d as isRangeValue, i as isSameDate, e as isValidDate, h as isSameDay } from "./MazDatePicker.bKFpslPf.js";
|
|
4
4
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper.B--vMWp3.js";
|
|
5
5
|
import { d as debounce } from "./debounce.Brzkn9pm.js";
|
|
6
6
|
import MazBtn from "../components/MazBtn.js";
|
|
7
|
-
import '../assets/MazPickerCalendarMonth.
|
|
7
|
+
import '../assets/MazPickerCalendarMonth.BRoEh_ad.css';const _hoisted_1 = { class: "maz-picker-calendar-days" }, _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
8
8
|
__name: "MazPickerCalendarDays",
|
|
9
9
|
props: {
|
|
10
10
|
locale: { type: String, required: !0 },
|
|
@@ -16,7 +16,7 @@ import '../assets/MazPickerCalendarMonth.zkrPVHDv.css';const _hoisted_1 = { clas
|
|
|
16
16
|
(openBlock(!0), createElementBlock(Fragment, null, renderList(days.value, (label) => (openBlock(), createElementBlock("span", { key: label }, toDisplayString(label), 1))), 128))
|
|
17
17
|
]));
|
|
18
18
|
}
|
|
19
|
-
}),
|
|
19
|
+
}), MazPickerCalendarDays = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-491de61c"]]), _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
20
20
|
__name: "MazPickerCalendarGrid",
|
|
21
21
|
props: {
|
|
22
22
|
modelValue: {
|
|
@@ -39,8 +39,8 @@ import '../assets/MazPickerCalendarMonth.zkrPVHDv.css';const _hoisted_1 = { clas
|
|
|
39
39
|
emits: ["update:model-value", "update:hoverred-day"],
|
|
40
40
|
setup(__props, { emit: __emit }) {
|
|
41
41
|
useCssVars((_ctx) => ({
|
|
42
|
-
"
|
|
43
|
-
|
|
42
|
+
"0b46b82a": hoverColor.value,
|
|
43
|
+
"8619c284": hoverTextColor.value
|
|
44
44
|
}));
|
|
45
45
|
const props = __props, emits = __emit, MazDatePickerGrid = ref(), transitionName = ref("maz-slidenext"), calendarDateArray = computed(() => [props.calendarDate]), hoverColor = computed(() => `hsl(var(--maz-${props.color}) / 20%)`), hoverTextColor = computed(() => `hsl(var(--maz-${props.color}-foreground))`), modelValue = computed({
|
|
46
46
|
get: () => props.modelValue,
|
|
@@ -185,7 +185,7 @@ import '../assets/MazPickerCalendarMonth.zkrPVHDv.css';const _hoisted_1 = { clas
|
|
|
185
185
|
}, 8, ["name"])
|
|
186
186
|
], 512));
|
|
187
187
|
}
|
|
188
|
-
}),
|
|
188
|
+
}), MazPickerCalendarGrid = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-5c1545fa"]]), _sfc_main = /* @__PURE__ */ defineComponent({
|
|
189
189
|
__name: "MazPickerCalendarMonth",
|
|
190
190
|
props: {
|
|
191
191
|
modelValue: {
|
|
@@ -225,12 +225,12 @@ import '../assets/MazPickerCalendarMonth.zkrPVHDv.css';const _hoisted_1 = { clas
|
|
|
225
225
|
return (_ctx, _cache) => (openBlock(), createElementBlock("div", {
|
|
226
226
|
class: normalizeClass(["maz-picker-calendar-month", { "--has-padding": !__props.range }])
|
|
227
227
|
}, [
|
|
228
|
-
createVNode(
|
|
228
|
+
createVNode(MazPickerCalendarDays, {
|
|
229
229
|
locale: __props.locale,
|
|
230
230
|
"first-day-of-week": __props.firstDayOfWeek,
|
|
231
231
|
class: "maz-picker-calendar-month__days"
|
|
232
232
|
}, null, 8, ["locale", "first-day-of-week"]),
|
|
233
|
-
createVNode(
|
|
233
|
+
createVNode(MazPickerCalendarGrid, {
|
|
234
234
|
modelValue: modelValue.value,
|
|
235
235
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modelValue.value = $event),
|
|
236
236
|
"hoverred-day": hoverredDay.value,
|
|
@@ -249,7 +249,7 @@ import '../assets/MazPickerCalendarMonth.zkrPVHDv.css';const _hoisted_1 = { clas
|
|
|
249
249
|
}, null, 8, ["modelValue", "hoverred-day", "locale", "color", "has-time", "calendar-date", "first-day-of-week", "min-date", "max-date", "disabled-weekly", "disabled-dates", "disabled", "range"])
|
|
250
250
|
], 2));
|
|
251
251
|
}
|
|
252
|
-
}), MazPickerCalendarMonth = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
252
|
+
}), MazPickerCalendarMonth = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-d6d0805c"]]);
|
|
253
253
|
export {
|
|
254
254
|
MazPickerCalendarMonth as default
|
|
255
255
|
};
|
package/dist/chunks/{MazPickerCalendarSwitcher.Cp2ux3E4.js → MazPickerCalendarSwitcher.Bf24kKw6.js}
RENAMED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { defineComponent, computed, createElementBlock, openBlock, createVNode, withCtx, unref, createTextVNode, toDisplayString } from "vue";
|
|
2
2
|
import { MazChevronLeft } from "@maz-ui/icons";
|
|
3
3
|
import { c as capitalize } from "./capitalize.BF6CDS_4.js";
|
|
4
|
-
import { f as formatDate } from "./
|
|
4
|
+
import { f as formatDate } from "./MazDatePicker.bKFpslPf.js";
|
|
5
5
|
import dayjs from "dayjs";
|
|
6
6
|
import MazBtn from "../components/MazBtn.js";
|
|
7
7
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper.B--vMWp3.js";
|
|
8
|
-
import '../assets/MazPickerCalendarSwitcher.
|
|
8
|
+
import '../assets/MazPickerCalendarSwitcher.CI9Vw1sJ.css';const _hoisted_1 = { class: "m-date-picker-calendar-switcher" }, _sfc_main = /* @__PURE__ */ defineComponent({
|
|
9
9
|
__name: "MazPickerCalendarSwitcher",
|
|
10
10
|
props: {
|
|
11
11
|
calendarDate: { type: String, default: void 0 },
|
|
@@ -84,7 +84,7 @@ import '../assets/MazPickerCalendarSwitcher.uni8vJJv.css';const _hoisted_1 = { c
|
|
|
84
84
|
})
|
|
85
85
|
]));
|
|
86
86
|
}
|
|
87
|
-
}), MazPickerCalendarSwitcher = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
87
|
+
}), MazPickerCalendarSwitcher = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-aa76b452"]]);
|
|
88
88
|
export {
|
|
89
89
|
MazPickerCalendarSwitcher as default
|
|
90
90
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, defineAsyncComponent, ref, computed, createElementBlock, openBlock, normalizeClass, createBlock, createCommentVNode, createElementVNode, unref } from "vue";
|
|
2
2
|
import dayjs from "dayjs";
|
|
3
3
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper.B--vMWp3.js";
|
|
4
|
-
import '../assets/MazPickerContainer.
|
|
4
|
+
import '../assets/MazPickerContainer.DmHuaFqE.css';const _hoisted_1 = { class: "m-date-picker-container__wrapper" }, _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
5
|
__name: "MazPickerContainer",
|
|
6
6
|
props: {
|
|
7
7
|
modelValue: {},
|
|
@@ -30,7 +30,7 @@ import '../assets/MazPickerContainer.k3DGjyHC.css';const _hoisted_1 = { class: "
|
|
|
30
30
|
},
|
|
31
31
|
emits: ["update:model-value", "update:calendar-date", "close"],
|
|
32
32
|
setup(__props, { emit: __emit }) {
|
|
33
|
-
const emits = __emit, MazPickerCalendar = defineAsyncComponent(() => import("./MazPickerCalendar.
|
|
33
|
+
const emits = __emit, MazPickerCalendar = defineAsyncComponent(() => import("./MazPickerCalendar.lLfvUtrb.js")), MazPickerHeader = defineAsyncComponent(() => import("./MazPickerHeader.B00RAQPS.js")), MazPickerTime = defineAsyncComponent(() => import("./MazPickerTime.Bd4khA2e.js")), lastTimeValue = ref(typeof __props.modelValue == "string" && __props.hasTime ? dayjs(__props.modelValue).format("HH:mm") : "00:00");
|
|
34
34
|
function saveLastTimeValue(value) {
|
|
35
35
|
lastTimeValue.value = dayjs(value).format("HH:mm"), emits("update:model-value", value);
|
|
36
36
|
}
|
|
@@ -43,9 +43,7 @@ import '../assets/MazPickerContainer.k3DGjyHC.css';const _hoisted_1 = { class: "
|
|
|
43
43
|
}
|
|
44
44
|
const currentDate = computed({
|
|
45
45
|
get: () => __props.modelValue,
|
|
46
|
-
set: (value) =>
|
|
47
|
-
emits("update:model-value", value);
|
|
48
|
-
}
|
|
46
|
+
set: (value) => emits("update:model-value", value)
|
|
49
47
|
}), currentCalendarDate = computed({
|
|
50
48
|
get: () => __props.calendarDate,
|
|
51
49
|
set: (calendarDate) => emits("update:calendar-date", calendarDate)
|
|
@@ -111,7 +109,7 @@ import '../assets/MazPickerContainer.k3DGjyHC.css';const _hoisted_1 = { class: "
|
|
|
111
109
|
])
|
|
112
110
|
], 2));
|
|
113
111
|
}
|
|
114
|
-
}), MazPickerContainer = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
112
|
+
}), MazPickerContainer = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-69e91845"]]);
|
|
115
113
|
export {
|
|
116
114
|
MazPickerContainer as default
|
|
117
115
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { defineComponent, computed, ref, watch, createElementBlock, openBlock, normalizeClass, createCommentVNode, createVNode, TransitionGroup, withCtx, Fragment, renderList, toDisplayString } from "vue";
|
|
2
2
|
import { c as capitalize } from "./capitalize.BF6CDS_4.js";
|
|
3
|
-
import { f as formatDate } from "./
|
|
3
|
+
import { f as formatDate } from "./MazDatePicker.bKFpslPf.js";
|
|
4
4
|
import dayjs from "dayjs";
|
|
5
5
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper.B--vMWp3.js";
|
|
6
|
-
import '../assets/MazPickerHeader.
|
|
6
|
+
import '../assets/MazPickerHeader.C4W93yMD.css';const _hoisted_1 = {
|
|
7
7
|
key: 0,
|
|
8
8
|
class: "m-date-picker-header__date"
|
|
9
9
|
}, _sfc_main = /* @__PURE__ */ defineComponent({
|
|
@@ -120,7 +120,7 @@ import '../assets/MazPickerHeader.ZYCJY5bX.css';const _hoisted_1 = {
|
|
|
120
120
|
], 2)) : createCommentVNode("", !0)
|
|
121
121
|
], 2));
|
|
122
122
|
}
|
|
123
|
-
}), MazPickerHeader = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
123
|
+
}), MazPickerHeader = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-5f5273ba"]]);
|
|
124
124
|
export {
|
|
125
125
|
MazPickerHeader as default
|
|
126
126
|
};
|
package/dist/chunks/{MazPickerMonthSwitcher.BpfCGGxQ.js → MazPickerMonthSwitcher.B2ZgNJWy.js}
RENAMED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { defineComponent, computed, createElementBlock, openBlock, createElementVNode, createVNode, withModifiers, withCtx, unref, normalizeClass, Fragment, renderList, createBlock, createTextVNode, toDisplayString } from "vue";
|
|
2
|
-
import {
|
|
2
|
+
import { MazXMark } from "@maz-ui/icons";
|
|
3
3
|
import { c as capitalize } from "./capitalize.BF6CDS_4.js";
|
|
4
|
-
import { f as formatDate } from "./
|
|
4
|
+
import { f as formatDate, i as isSameDate } from "./MazDatePicker.bKFpslPf.js";
|
|
5
5
|
import dayjs from "dayjs";
|
|
6
6
|
import MazBtn from "../components/MazBtn.js";
|
|
7
|
-
import { i as isSameDate } from "./MazDatePicker.CT5yJhSN.js";
|
|
8
7
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper.B--vMWp3.js";
|
|
9
|
-
import '../assets/MazPickerMonthSwitcher.
|
|
8
|
+
import '../assets/MazPickerMonthSwitcher.D9lfVzYo.css';const _hoisted_1 = { class: "maz-picker-month-switcher" }, _hoisted_2 = { class: "maz-picker-month-switcher__header" }, _sfc_main = /* @__PURE__ */ defineComponent({
|
|
10
9
|
__name: "MazPickerMonthSwitcher",
|
|
11
10
|
props: {
|
|
12
11
|
calendarDate: { type: String, required: !0 },
|
|
@@ -50,7 +49,7 @@ import '../assets/MazPickerMonthSwitcher.168v7Hs1.css';const _hoisted_1 = { clas
|
|
|
50
49
|
onClick: _cache[0] || (_cache[0] = withModifiers(($event) => _ctx.$emit("close", $event), ["stop"]))
|
|
51
50
|
}, {
|
|
52
51
|
default: withCtx(() => [
|
|
53
|
-
createVNode(unref(
|
|
52
|
+
createVNode(unref(MazXMark), { class: "maz-text-lg" })
|
|
54
53
|
]),
|
|
55
54
|
_: 1
|
|
56
55
|
})
|
|
@@ -76,7 +75,7 @@ import '../assets/MazPickerMonthSwitcher.168v7Hs1.css';const _hoisted_1 = { clas
|
|
|
76
75
|
], 2)
|
|
77
76
|
]));
|
|
78
77
|
}
|
|
79
|
-
}), MazPickerMonthSwitcher = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
78
|
+
}), MazPickerMonthSwitcher = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-ccb4182e"]]);
|
|
80
79
|
export {
|
|
81
80
|
MazPickerMonthSwitcher as default
|
|
82
81
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, computed, ref, onMounted, watch, nextTick, createElementBlock, openBlock, normalizeClass, Fragment, renderList, createElementVNode, normalizeStyle, createBlock, withModifiers, withCtx, createTextVNode, toDisplayString } from "vue";
|
|
2
2
|
import dayjs from "dayjs";
|
|
3
3
|
import MazBtn from "../components/MazBtn.js";
|
|
4
|
-
import {
|
|
4
|
+
import { a as findNearestNumberInList, s as scrollToTarget } from "./MazDatePicker.bKFpslPf.js";
|
|
5
5
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper.B--vMWp3.js";
|
|
6
6
|
import '../assets/MazPickerTime.yINUjbDZ.css';const _hoisted_1 = { class: "m-date-picker-time__column__items" }, _sfc_main = /* @__PURE__ */ defineComponent({
|
|
7
7
|
__name: "MazPickerTime",
|
|
@@ -1,29 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { f as formatDate } from "./
|
|
1
|
+
import { defineComponent, ref, computed, createElementBlock, openBlock, createElementVNode, createVNode, withModifiers, withCtx, unref, Fragment, renderList, createBlock, normalizeClass, createTextVNode, toDisplayString } from "vue";
|
|
2
|
+
import { MazChevronLeft, MazXMark } from "@maz-ui/icons";
|
|
3
|
+
import { f as formatDate, i as isSameDate } from "./MazDatePicker.bKFpslPf.js";
|
|
4
4
|
import dayjs from "dayjs";
|
|
5
5
|
import MazBtn from "../components/MazBtn.js";
|
|
6
|
-
import { i as isSameDate } from "./MazDatePicker.CT5yJhSN.js";
|
|
7
6
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper.B--vMWp3.js";
|
|
8
|
-
import '../assets/MazPickerYearSwitcher.
|
|
9
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
10
|
-
width: "1em",
|
|
11
|
-
height: "1em",
|
|
12
|
-
fill: "none",
|
|
13
|
-
viewBox: "0 0 24 24"
|
|
14
|
-
};
|
|
15
|
-
function render(_ctx, _cache) {
|
|
16
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$1, _cache[0] || (_cache[0] = [
|
|
17
|
-
createElementVNode("path", {
|
|
18
|
-
stroke: "currentColor",
|
|
19
|
-
"stroke-linecap": "round",
|
|
20
|
-
"stroke-linejoin": "round",
|
|
21
|
-
"stroke-width": "1.5",
|
|
22
|
-
d: "M15.75 19.5 8.25 12l7.5-7.5"
|
|
23
|
-
}, null, -1)
|
|
24
|
-
]));
|
|
25
|
-
}
|
|
26
|
-
const ChevronLeft = { render }, _hoisted_1 = { class: "maz-picker-year-switcher" }, _hoisted_2 = { class: "maz-picker-year-switcher__header" }, _hoisted_3 = { class: "maz-flex maz-space-x-2" }, _hoisted_4 = { class: "maz-picker-year-switcher__main" }, _sfc_main = /* @__PURE__ */ defineComponent({
|
|
7
|
+
import '../assets/MazPickerYearSwitcher.CFiH13QC.css';const _hoisted_1 = { class: "maz-picker-year-switcher" }, _hoisted_2 = { class: "maz-picker-year-switcher__header" }, _hoisted_3 = { class: "maz-flex maz-space-x-2" }, _hoisted_4 = { class: "maz-picker-year-switcher__main" }, _sfc_main = /* @__PURE__ */ defineComponent({
|
|
27
8
|
__name: "MazPickerYearSwitcher",
|
|
28
9
|
props: {
|
|
29
10
|
color: { type: String, required: !0 },
|
|
@@ -60,7 +41,7 @@ const ChevronLeft = { render }, _hoisted_1 = { class: "maz-picker-year-switcher"
|
|
|
60
41
|
onClick: withModifiers(previousYears, ["stop"])
|
|
61
42
|
}, {
|
|
62
43
|
default: withCtx(() => [
|
|
63
|
-
createVNode(unref(
|
|
44
|
+
createVNode(unref(MazChevronLeft), { class: "maz-text-lg" })
|
|
64
45
|
]),
|
|
65
46
|
_: 1
|
|
66
47
|
}),
|
|
@@ -71,7 +52,7 @@ const ChevronLeft = { render }, _hoisted_1 = { class: "maz-picker-year-switcher"
|
|
|
71
52
|
onClick: withModifiers(nextYears, ["stop"])
|
|
72
53
|
}, {
|
|
73
54
|
default: withCtx(() => [
|
|
74
|
-
createVNode(unref(
|
|
55
|
+
createVNode(unref(MazChevronLeft), { class: "maz-rotate-180 maz-text-lg" })
|
|
75
56
|
]),
|
|
76
57
|
_: 1
|
|
77
58
|
})
|
|
@@ -83,7 +64,7 @@ const ChevronLeft = { render }, _hoisted_1 = { class: "maz-picker-year-switcher"
|
|
|
83
64
|
onClick: _cache[0] || (_cache[0] = withModifiers(($event) => _ctx.$emit("close", $event), ["stop"]))
|
|
84
65
|
}, {
|
|
85
66
|
default: withCtx(() => [
|
|
86
|
-
createVNode(unref(
|
|
67
|
+
createVNode(unref(MazXMark), { class: "maz-text-lg" })
|
|
87
68
|
]),
|
|
88
69
|
_: 1
|
|
89
70
|
})
|
|
@@ -107,7 +88,7 @@ const ChevronLeft = { render }, _hoisted_1 = { class: "maz-picker-year-switcher"
|
|
|
107
88
|
])
|
|
108
89
|
]));
|
|
109
90
|
}
|
|
110
|
-
}), MazPickerYearSwitcher = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
91
|
+
}), MazPickerYearSwitcher = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-f4cfe332"]]);
|
|
111
92
|
export {
|
|
112
93
|
MazPickerYearSwitcher as default
|
|
113
94
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, computed, ref, createElementBlock, openBlock, normalizeStyle, normalizeClass, unref, createElementVNode, createCommentVNode, mergeProps, renderSlot, createTextVNode, toDisplayString } from "vue";
|
|
2
2
|
import { useInstanceUniqId } from "../composables/useInstanceUniqId.js";
|
|
3
|
-
import '../assets/MazSwitch.
|
|
3
|
+
import '../assets/MazSwitch.Bxmh2iFj.css';const _hoisted_1 = ["for", "aria-checked"], _hoisted_2 = ["id", "name", "checked", "aria-label", "disabled"], _hoisted_3 = {
|
|
4
4
|
key: 0,
|
|
5
5
|
class: "m-switch__text"
|
|
6
6
|
}, _sfc_main = /* @__PURE__ */ defineComponent({
|
|
@@ -25,7 +25,7 @@ import '../assets/MazSwitch.Z1ZMm7tx.css';const _hoisted_1 = ["for", "aria-check
|
|
|
25
25
|
const props = __props, emits = __emit, instanceId = useInstanceUniqId({
|
|
26
26
|
componentName: "MazSwitch",
|
|
27
27
|
providedId: props.id
|
|
28
|
-
}), bgColorClassVar = computed(() => `hsl(var(--maz-${props.color})
|
|
28
|
+
}), bgColorClassVar = computed(() => `hsl(var(--maz-${props.color}))`);
|
|
29
29
|
function emit() {
|
|
30
30
|
emits("update:model-value", !props.modelValue), emits("change", !props.modelValue);
|
|
31
31
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, useCssVars, defineAsyncComponent, computed, toRefs, provide, ref, watch, useSlots, onBeforeMount, createElementBlock, openBlock, normalizeClass, createCommentVNode, createElementVNode, renderSlot, toDisplayString, createBlock, createVNode, unref, normalizeStyle, createTextVNode, withCtx, Fragment, renderList } from "vue";
|
|
2
2
|
import { MazMagnifyingGlass, MazArrowUp, MazChevronDoubleLeft, MazChevronLeft } from "@maz-ui/icons";
|
|
3
|
-
import { u as useTranslations } from "./useTranslations.
|
|
3
|
+
import { u as useTranslations } from "./useTranslations.D5aoYwD7.js";
|
|
4
4
|
const _hoisted_1 = {
|
|
5
5
|
key: 0,
|
|
6
6
|
class: "m-table-header"
|
|
@@ -64,8 +64,8 @@ const _hoisted_1 = {
|
|
|
64
64
|
emits: ["update:model-value", "update:search-query", "update:page", "update:page-size"],
|
|
65
65
|
setup(__props, { emit: __emit }) {
|
|
66
66
|
useCssVars((_ctx) => ({
|
|
67
|
-
"
|
|
68
|
-
|
|
67
|
+
"4483cedd": _ctx.tableLayout,
|
|
68
|
+
"67d872bc": _ctx.captionSide
|
|
69
69
|
}));
|
|
70
70
|
const props = __props, emits = __emit, MazBtn = defineAsyncComponent(() => import("../components/MazBtn.js")), MazCheckbox = defineAsyncComponent(() => import("../components/MazCheckbox.js")), MazInput = defineAsyncComponent(() => import("../components/MazInput.js")), MazLoadingBar = defineAsyncComponent(() => import("../components/MazLoadingBar.js")), MazSelect = defineAsyncComponent(() => import("../components/MazSelect.js")), MazTableCell = defineAsyncComponent(() => import("../components/MazTableCell.js")), MazTableRowComponent = defineAsyncComponent(() => import("../components/MazTableRow.js")), MazTableTitle = defineAsyncComponent(() => import("../components/MazTableTitle.js")), { t } = useTranslations(), messages = computed(() => ({
|
|
71
71
|
noResults: props.translations?.noResults ?? t("table.noResults"),
|