maz-ui 4.0.0-beta.2 → 4.0.0-beta.21
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.BFhP-9HO.css +1 -0
- package/dist/assets/MazCard.DBuQhXtl.css +1 -0
- package/dist/assets/{MazCardSpotlight.Dy-wuLQq.css → MazCardSpotlight.IbPp_y0j.css} +1 -1
- package/dist/assets/MazCheckbox.aH1IKnrR.css +1 -0
- package/dist/assets/MazChecklist.BzF5KtZ3.css +1 -0
- package/dist/assets/MazDatePicker.8GyrtM-j.css +1 -0
- package/dist/assets/MazDropzone.CXu1QtnY.css +1 -0
- package/dist/assets/MazInput.ByolKDfx.css +1 -0
- package/dist/assets/MazInputCode.FA2z4HQd.css +1 -0
- package/dist/assets/MazInputPhoneNumber.CrXS7DOY.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/MazPickerCalendarMonth.Boe_8k4x.css +1 -0
- package/dist/assets/MazPickerMonthSwitcher.CszcpCcY.css +1 -0
- package/dist/assets/{MazPickerYearSwitcher.Dl30Dwor.css → MazPickerYearSwitcher.Cn-nS-Vv.css} +1 -1
- package/dist/assets/MazPopover.rBpotMKW.css +1 -0
- package/dist/assets/MazPullToRefresh.BQ64UvzA.css +1 -0
- package/dist/assets/MazRadio.aTHM-mpx.css +1 -0
- package/dist/assets/MazRadioButtons.SGytq4d7.css +1 -0
- package/dist/assets/MazReadingProgressBar.CwBVXE3g.css +1 -0
- package/dist/assets/MazSelect.CwjnAZiu.css +1 -0
- package/dist/assets/{MazSelectCountry.D2Qudf0K.css → MazSelectCountry.t3GsKyqw.css} +1 -1
- package/dist/assets/{MazSlider.D5SgmZLH.css → MazSlider.y4qpnD0N.css} +1 -1
- 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.BJiKqOF6.css} +1 -1
- package/dist/assets/{fullscreen-img.pvt6196l.css → fullscreen-img.Bkuz1GOX.css} +1 -1
- package/dist/assets/{toast.kunueRvo.css → toast.CC2VQab8.css} +1 -1
- package/dist/chunks/{MazDatePicker.CT5yJhSN.js → MazDatePicker.De3Ltb2F.js} +29 -31
- 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.BES3jpuw.js} +12 -22
- package/dist/chunks/{MazInputPhoneNumber.Uwhn1Q9j.js → MazInputPhoneNumber.Ch-PCGiv.js} +14 -12
- 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.DKXNI8O4.js} +1 -1
- package/dist/chunks/{MazPickerCalendarMonth.hQBSVkc9.js → MazPickerCalendarMonth.DKBqgrNp.js} +5 -5
- package/dist/chunks/{MazPickerCalendarSwitcher.Cp2ux3E4.js → MazPickerCalendarSwitcher.CzIZol3Z.js} +1 -1
- package/dist/chunks/{MazPickerContainer.DnfB3Dqg.js → MazPickerContainer.Mrh-Q52I.js} +1 -1
- package/dist/chunks/{MazPickerHeader.Dlz2yJ1D.js → MazPickerHeader.Bm9vIrtB.js} +1 -1
- package/dist/chunks/{MazPickerMonthSwitcher.BpfCGGxQ.js → MazPickerMonthSwitcher.BSD2GtY6.js} +5 -6
- package/dist/chunks/{MazPickerTime.EuWWNfid.js → MazPickerTime.D0hilq5b.js} +1 -1
- package/dist/chunks/{MazPickerYearSwitcher.D4aO09D3.js → MazPickerYearSwitcher.BIUYJMvj.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.BzL1_XS5.js} +5 -4
- 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/types.D0Bp_UhS.js +6 -0
- package/dist/chunks/{normalizeString.CFe2M8S_.js → useStringMatching.Ba1yCuA4.js} +40 -1
- 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 +1 -1
- 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 +177 -89
- package/dist/components/MazPullToRefresh.js +8 -3
- package/dist/components/MazRadio.js +8 -16
- package/dist/components/MazRadioButtons.js +7 -6
- package/dist/components/MazReadingProgressBar.js +10 -3
- package/dist/components/MazSelect.js +24 -14
- package/dist/components/MazSelectCountry.js +15 -9
- package/dist/components/MazSlider.js +2 -2
- 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 +7 -1
- 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/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 -60
- package/dist/index.js +1 -114
- package/dist/plugins/dialog.js +3 -3
- package/dist/plugins/maz-ui.js +150 -143
- package/dist/plugins/toast.js +8 -11
- package/dist/resolvers/MazComponentsResolver.js +7 -1
- package/dist/resolvers/MazDirectivesResolver.js +1 -1
- package/dist/resolvers/MazModulesResolver.js +3 -1
- 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/MazCheckbox.vue.d.ts +0 -6
- package/dist/types/components/MazChecklist.vue.d.ts +1 -1
- package/dist/types/components/MazDatePicker.vue.d.ts +15 -23
- 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 +2 -2
- package/dist/types/components/MazInputPhoneNumber/useLibphonenumber.d.ts +2 -2
- package/dist/types/components/MazInputPhoneNumber/useMazInputPhoneNumber.d.ts +6 -2
- package/dist/types/components/MazInputPhoneNumber.vue.d.ts +38 -15
- 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 +18 -15
- package/dist/types/components/MazRadioButtons.vue.d.ts +1 -1
- package/dist/types/components/MazSelect.vue.d.ts +2 -2
- package/dist/types/components/MazSelectCountry.vue.d.ts +13 -4
- 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 +2 -2
- 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/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 +42 -39
- 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/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/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/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/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
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { MazCalendar, MazClock } from "@maz-ui/icons";
|
|
3
|
-
import { u as useTranslations } from "./useTranslations.
|
|
4
|
-
import { f as formatDate } from "./formatDate.DZ_OzdnV.js";
|
|
1
|
+
import { defineComponent, mergeModels, defineAsyncComponent, computed, useModel, useTemplateRef, onBeforeMount, ref, watch, createBlock, openBlock, unref, normalizeStyle, normalizeClass, withCtx, createVNode, renderSlot, withDirectives, mergeProps, createCommentVNode, vShow } from "vue";
|
|
2
|
+
import { MazChevronDown, MazCalendar, MazClock } from "@maz-ui/icons";
|
|
3
|
+
import { u as useTranslations } from "./useTranslations.D5aoYwD7.js";
|
|
5
4
|
import dayjs from "dayjs";
|
|
6
5
|
import customParseFormat from "dayjs/plugin/customParseFormat";
|
|
7
6
|
import isBetween from "dayjs/plugin/isBetween";
|
|
@@ -9,25 +8,24 @@ import { useInstanceUniqId } from "../composables/useInstanceUniqId.js";
|
|
|
9
8
|
import { c as capitalize } from "./capitalize.BF6CDS_4.js";
|
|
10
9
|
import weekday from "dayjs/plugin/weekday";
|
|
11
10
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper.B--vMWp3.js";
|
|
12
|
-
import '../assets/MazDatePicker.
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
fill: "none",
|
|
17
|
-
viewBox: "0 0 24 24"
|
|
11
|
+
import '../assets/MazDatePicker.8GyrtM-j.css';const DEFAULT_OPTIONS = {
|
|
12
|
+
month: "short",
|
|
13
|
+
day: "numeric",
|
|
14
|
+
year: "numeric"
|
|
18
15
|
};
|
|
19
|
-
function
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
16
|
+
function formatDate(date, locale, options) {
|
|
17
|
+
if (locale === void 0)
|
|
18
|
+
throw new TypeError("[maz-ui](FilterDate) The `locale` attribute is required.");
|
|
19
|
+
if (typeof locale != "string")
|
|
20
|
+
throw new TypeError("[maz-ui](FilterDate) The `locale` attribute must be a string.");
|
|
21
|
+
const opts = options ?? DEFAULT_OPTIONS;
|
|
22
|
+
try {
|
|
23
|
+
const usedDate = date instanceof Date ? date : new Date(date);
|
|
24
|
+
return new Intl.DateTimeFormat(locale, opts).format(usedDate);
|
|
25
|
+
} catch (error) {
|
|
26
|
+
throw new Error(`[maz-ui](FilterDate) ${error}`);
|
|
27
|
+
}
|
|
29
28
|
}
|
|
30
|
-
const MazChevronDownIcon = { render };
|
|
31
29
|
dayjs.extend(weekday);
|
|
32
30
|
function getFormattedDate({
|
|
33
31
|
value,
|
|
@@ -237,7 +235,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
237
235
|
setup(__props, { emit: __emit }) {
|
|
238
236
|
const props = __props, emits = __emit, { t, locale } = useTranslations();
|
|
239
237
|
dayjs.extend(customParseFormat), dayjs.extend(isBetween);
|
|
240
|
-
const MazInput = defineAsyncComponent(() => import("../components/MazInput.js")), MazPopover = defineAsyncComponent(() => import("../components/MazPopover.js")), MazPickerContainer = defineAsyncComponent(() => import("./MazPickerContainer.
|
|
238
|
+
const MazInput = defineAsyncComponent(() => import("../components/MazInput.js")), MazPopover = defineAsyncComponent(() => import("../components/MazPopover.js")), MazPickerContainer = defineAsyncComponent(() => import("./MazPickerContainer.Mrh-Q52I.js")), instanceId = useInstanceUniqId({ componentName: "MazDatePicker", providedId: props.id }), currentValue = computed({
|
|
241
239
|
get: () => typeof props.modelValue == "object" || props.range ? {
|
|
242
240
|
start: typeof props.modelValue == "object" && props.modelValue.start ? dayjs(props.modelValue.start, props.format).format() : void 0,
|
|
243
241
|
end: typeof props.modelValue == "object" && props.modelValue.end ? dayjs(props.modelValue.end, props.format).format() : void 0
|
|
@@ -407,7 +405,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
407
405
|
disabled: _ctx.disabled,
|
|
408
406
|
block: _ctx.block,
|
|
409
407
|
"prefer-position": _ctx.pickerPosition,
|
|
410
|
-
"position-delay": 100,
|
|
411
408
|
"fallback-position": "top-start"
|
|
412
409
|
}, {
|
|
413
410
|
trigger: withCtx(({ isOpen, close, open: openPicker, toggle: togglePicker }) => [
|
|
@@ -439,7 +436,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
439
436
|
})) : createCommentVNode("", !0)
|
|
440
437
|
]),
|
|
441
438
|
"right-icon": withCtx(() => [
|
|
442
|
-
createVNode(unref(
|
|
439
|
+
createVNode(unref(MazChevronDown), { class: "m-date-picker__button__chevron maz-text-lg" })
|
|
443
440
|
]),
|
|
444
441
|
_: 1
|
|
445
442
|
}, 16, ["model-value", "label", "disabled", "placeholder", "color"]), [
|
|
@@ -481,16 +478,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
481
478
|
_: 3
|
|
482
479
|
}, 8, ["style", "class", "disabled", "block", "prefer-position"]));
|
|
483
480
|
}
|
|
484
|
-
}), MazDatePicker = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
481
|
+
}), MazDatePicker = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-f42bdf0e"]]);
|
|
485
482
|
export {
|
|
486
483
|
MazDatePicker as M,
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
484
|
+
findNearestNumberInList as a,
|
|
485
|
+
getDaysInMonth as b,
|
|
486
|
+
getFirstDayOfMonth as c,
|
|
487
|
+
isRangeValue as d,
|
|
488
|
+
isValidDate as e,
|
|
489
|
+
formatDate as f,
|
|
493
490
|
getDaysOfWeek as g,
|
|
491
|
+
isSameDay as h,
|
|
494
492
|
isSameDate as i,
|
|
495
493
|
scrollToTarget as s
|
|
496
494
|
};
|
|
@@ -1,17 +1,21 @@
|
|
|
1
|
-
import { ref, defineComponent, createPropsRestProxy, defineAsyncComponent, computed, createBlock, openBlock, mergeProps, unref, withCtx, renderSlot, createElementVNode, createElementBlock,
|
|
1
|
+
import { ref, defineComponent, createPropsRestProxy, defineAsyncComponent, computed, createBlock, openBlock, mergeProps, unref, withCtx, renderSlot, createElementVNode, createElementBlock, Fragment, renderList, createTextVNode, toDisplayString, createCommentVNode } from "vue";
|
|
2
2
|
import MazDialog from "../components/MazDialog.js";
|
|
3
3
|
const defaultData = {
|
|
4
|
-
buttons:
|
|
5
|
-
|
|
4
|
+
buttons: void 0,
|
|
5
|
+
acceptText: "Confirm",
|
|
6
|
+
hideAcceptButton: !1,
|
|
7
|
+
acceptProps: {
|
|
6
8
|
color: "success",
|
|
7
9
|
type: "accept",
|
|
8
10
|
response: "accept"
|
|
9
|
-
},
|
|
10
|
-
|
|
11
|
+
},
|
|
12
|
+
rejectText: "Cancel",
|
|
13
|
+
hideRejectButton: !1,
|
|
14
|
+
rejectProps: {
|
|
11
15
|
color: "destructive",
|
|
12
16
|
type: "reject",
|
|
13
17
|
response: "reject"
|
|
14
|
-
}
|
|
18
|
+
}
|
|
15
19
|
}, data = ref(defaultData), dialogState = ref([]);
|
|
16
20
|
function showDialogAndWaitChoice(identifier, callback) {
|
|
17
21
|
return new Promise((resolve, reject) => {
|
|
@@ -39,7 +43,7 @@ function responseDialog(type, currentDialog, response) {
|
|
|
39
43
|
removeDialogFromState(currentDialog.id);
|
|
40
44
|
}, 500), response;
|
|
41
45
|
}
|
|
42
|
-
function
|
|
46
|
+
function useMazDialogConfirm() {
|
|
43
47
|
return {
|
|
44
48
|
data,
|
|
45
49
|
dialogState,
|
|
@@ -49,11 +53,17 @@ function useMazDialogPromise() {
|
|
|
49
53
|
};
|
|
50
54
|
}
|
|
51
55
|
const _hoisted_1 = { class: "maz-flex maz-items-center maz-gap-2" }, _sfc_main = /* @__PURE__ */ defineComponent({
|
|
52
|
-
__name: "
|
|
56
|
+
__name: "MazDialogConfirm",
|
|
53
57
|
props: {
|
|
54
58
|
identifier: {},
|
|
55
59
|
title: {},
|
|
56
60
|
message: {},
|
|
61
|
+
rejectText: {},
|
|
62
|
+
rejectProps: {},
|
|
63
|
+
hideRejectButton: { type: Boolean },
|
|
64
|
+
acceptText: {},
|
|
65
|
+
acceptProps: {},
|
|
66
|
+
hideAcceptButton: { type: Boolean },
|
|
57
67
|
buttons: {},
|
|
58
68
|
modelValue: { type: Boolean },
|
|
59
69
|
hideCloseButton: { type: Boolean },
|
|
@@ -74,10 +84,43 @@ const _hoisted_1 = { class: "maz-flex maz-items-center maz-gap-2" }, _sfc_main =
|
|
|
74
84
|
},
|
|
75
85
|
emits: ["open", "close"],
|
|
76
86
|
setup(__props, { expose: __expose }) {
|
|
77
|
-
const dialogProps = createPropsRestProxy(__props, ["identifier", "message", "buttons", "title", "modelValue", "closeOnEscape"]), MazBtn = defineAsyncComponent(() => import("../components/MazBtn.js")), { dialogState: dialogState2, reject, accept, data:
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
87
|
+
const dialogProps = createPropsRestProxy(__props, ["identifier", "message", "buttons", "title", "modelValue", "closeOnEscape", "rejectText", "acceptText", "rejectProps", "acceptProps", "hideRejectButton", "hideAcceptButton"]), MazBtn = defineAsyncComponent(() => import("../components/MazBtn.js")), { dialogState: dialogState2, reject, accept, data: data2 } = useMazDialogConfirm(), currentData = computed(() => {
|
|
88
|
+
const baseData = {
|
|
89
|
+
...defaultData,
|
|
90
|
+
...data2.value,
|
|
91
|
+
hideAcceptButton: data2.value.hideAcceptButton ?? defaultData.hideAcceptButton,
|
|
92
|
+
hideRejectButton: data2.value.hideRejectButton ?? defaultData.hideRejectButton,
|
|
93
|
+
acceptProps: {
|
|
94
|
+
...defaultData.acceptProps,
|
|
95
|
+
...data2.value.acceptProps,
|
|
96
|
+
text: __props.acceptText ?? data2.value.acceptText ?? data2.value.acceptProps?.text ?? defaultData.acceptText,
|
|
97
|
+
type: data2.value.acceptProps?.type ?? defaultData.acceptProps.type
|
|
98
|
+
},
|
|
99
|
+
rejectProps: {
|
|
100
|
+
...defaultData.rejectProps,
|
|
101
|
+
...data2.value.rejectProps,
|
|
102
|
+
text: __props.rejectText ?? data2.value.rejectText ?? data2.value.rejectProps?.text ?? defaultData.rejectText,
|
|
103
|
+
type: data2.value.rejectProps?.type ?? defaultData.rejectProps.type
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
return {
|
|
107
|
+
...baseData,
|
|
108
|
+
acceptText: __props.acceptText ?? baseData.acceptText,
|
|
109
|
+
rejectText: __props.rejectText ?? baseData.rejectText,
|
|
110
|
+
hideAcceptButton: __props.hideAcceptButton ?? baseData.hideAcceptButton,
|
|
111
|
+
hideRejectButton: __props.hideRejectButton ?? baseData.hideRejectButton,
|
|
112
|
+
acceptProps: {
|
|
113
|
+
...baseData.acceptProps,
|
|
114
|
+
...__props.acceptProps,
|
|
115
|
+
text: __props.acceptText ?? __props.acceptProps?.text ?? baseData.acceptText ?? baseData.acceptProps.text
|
|
116
|
+
},
|
|
117
|
+
rejectProps: {
|
|
118
|
+
...baseData.rejectProps,
|
|
119
|
+
...__props.rejectProps,
|
|
120
|
+
text: __props.rejectText ?? __props.rejectProps?.text ?? baseData.rejectText ?? baseData.rejectProps?.text
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
}), currentButtons = computed(() => __props.buttons ?? currentData.value.buttons), currentModal = computed(
|
|
81
124
|
() => dialogState2.value.find(({ id }) => id === __props.identifier)
|
|
82
125
|
), dialog = ref();
|
|
83
126
|
__expose({
|
|
@@ -93,7 +136,7 @@ const _hoisted_1 = { class: "maz-flex maz-items-center maz-gap-2" }, _sfc_main =
|
|
|
93
136
|
isActive: computed(() => currentModal.value?.isActive ?? __props.modelValue ?? !1)
|
|
94
137
|
});
|
|
95
138
|
function isPromiseButton(button) {
|
|
96
|
-
return "type" in button && (button.type === "accept" || button.type === "reject");
|
|
139
|
+
return button ? "type" in button && (button.type === "accept" || button.type === "reject") : !1;
|
|
97
140
|
}
|
|
98
141
|
function buttonClick(currentModal2, button) {
|
|
99
142
|
return isPromiseButton(button) ? button.type === "accept" ? accept(currentModal2, button.response) : reject(currentModal2, button.response) : accept(currentModal2, void 0, button.onClick);
|
|
@@ -104,9 +147,9 @@ const _hoisted_1 = { class: "maz-flex maz-items-center maz-gap-2" }, _sfc_main =
|
|
|
104
147
|
}, { ..._ctx.$attrs, ...dialogProps }, {
|
|
105
148
|
"close-on-escape": _ctx.closeOnEscape,
|
|
106
149
|
"model-value": currentModal.value?.isActive ?? _ctx.modelValue ?? !1,
|
|
107
|
-
onClose: _cache[
|
|
108
|
-
onOpen: _cache[
|
|
109
|
-
"onUpdate:modelValue": _cache[
|
|
150
|
+
onClose: _cache[2] || (_cache[2] = ($event) => _ctx.$emit("close", $event)),
|
|
151
|
+
onOpen: _cache[3] || (_cache[3] = ($event) => _ctx.$emit("open", $event)),
|
|
152
|
+
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => unref(reject)(currentModal.value))
|
|
110
153
|
}), {
|
|
111
154
|
title: withCtx(() => [
|
|
112
155
|
renderSlot(_ctx.$slots, "title", {}, () => [
|
|
@@ -138,7 +181,24 @@ const _hoisted_1 = { class: "maz-flex maz-items-center maz-gap-2" }, _sfc_main =
|
|
|
138
181
|
createTextVNode(toDisplayString(button.text), 1)
|
|
139
182
|
]),
|
|
140
183
|
_: 2
|
|
141
|
-
}, 1040, ["onClick"]))), 128)) :
|
|
184
|
+
}, 1040, ["onClick"]))), 128)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
185
|
+
currentData.value.hideAcceptButton ? createCommentVNode("", !0) : (openBlock(), createBlock(unref(MazBtn), mergeProps({ key: 0 }, {
|
|
186
|
+
...currentData.value.acceptProps,
|
|
187
|
+
type: "button",
|
|
188
|
+
// onClick: undefined,
|
|
189
|
+
text: currentData.value.acceptText ?? currentData.value.acceptProps?.text
|
|
190
|
+
}, {
|
|
191
|
+
onClick: _cache[0] || (_cache[0] = ($event) => isPromiseButton(currentData.value.acceptProps) ? unref(accept)(currentModal.value, currentData.value.acceptProps.response) : currentData.value.acceptProps?.onClick?.())
|
|
192
|
+
}), null, 16)),
|
|
193
|
+
currentData.value.hideRejectButton ? createCommentVNode("", !0) : (openBlock(), createBlock(unref(MazBtn), mergeProps({ key: 1 }, {
|
|
194
|
+
...currentData.value.rejectProps,
|
|
195
|
+
type: "button",
|
|
196
|
+
onClick: void 0,
|
|
197
|
+
text: currentData.value.rejectText ?? currentData.value.rejectProps?.text
|
|
198
|
+
}, {
|
|
199
|
+
onClick: _cache[1] || (_cache[1] = ($event) => isPromiseButton(currentData.value.rejectProps) ? unref(reject)(currentModal.value, currentData.value.rejectProps.response) : currentData.value.rejectProps?.onClick?.())
|
|
200
|
+
}), null, 16))
|
|
201
|
+
], 64))
|
|
142
202
|
])
|
|
143
203
|
])
|
|
144
204
|
]),
|
|
@@ -148,5 +208,5 @@ const _hoisted_1 = { class: "maz-flex maz-items-center maz-gap-2" }, _sfc_main =
|
|
|
148
208
|
});
|
|
149
209
|
export {
|
|
150
210
|
_sfc_main as _,
|
|
151
|
-
|
|
211
|
+
useMazDialogConfirm as u
|
|
152
212
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent, mergeModels, defineAsyncComponent, useModel, computed, watch, createBlock, openBlock, normalizeStyle, normalizeClass, withCtx, createElementVNode, unref, renderSlot, createElementBlock, Fragment, renderList,
|
|
1
|
+
import { defineComponent, mergeModels, defineAsyncComponent, useModel, computed, watch, createBlock, openBlock, normalizeStyle, normalizeClass, withCtx, createElementVNode, unref, renderSlot, createElementBlock, Fragment, renderList, mergeProps, withModifiers, createTextVNode, toDisplayString, withKeys, createVNode, createSlots, resolveDynamicComponent } from "vue";
|
|
2
2
|
import { MazChevronDown } from "@maz-ui/icons";
|
|
3
|
-
import { u as useTranslations } from "./useTranslations.
|
|
3
|
+
import { u as useTranslations } from "./useTranslations.D5aoYwD7.js";
|
|
4
4
|
import { i as isClient } from "./isClient.WI4oSt66.js";
|
|
5
5
|
import { useInstanceUniqId } from "../composables/useInstanceUniqId.js";
|
|
6
6
|
import MazPopover from "../components/MazPopover.js";
|
|
7
|
-
import '../assets/MazDropdown.C6vjLIeN.css';const _hoisted_1 = ["id", "aria-expanded"
|
|
7
|
+
import '../assets/MazDropdown.C6vjLIeN.css';const _hoisted_1 = ["id", "aria-expanded"], _hoisted_2 = ["id"], _hoisted_3 = ["id"], _hoisted_4 = ["onClick", "onKeypress"], _sfc_main = /* @__PURE__ */ defineComponent({
|
|
8
8
|
inheritAttrs: !1,
|
|
9
9
|
__name: "MazDropdown",
|
|
10
10
|
props: /* @__PURE__ */ mergeModels({
|
|
@@ -13,7 +13,7 @@ import '../assets/MazDropdown.C6vjLIeN.css';const _hoisted_1 = ["id", "aria-expa
|
|
|
13
13
|
class: {},
|
|
14
14
|
items: { default: () => [] },
|
|
15
15
|
id: {},
|
|
16
|
-
trigger: { default: "
|
|
16
|
+
trigger: { default: "adaptive" },
|
|
17
17
|
color: { default: "transparent" },
|
|
18
18
|
position: { default: "auto" },
|
|
19
19
|
preferPosition: { default: "bottom-start" },
|
|
@@ -46,7 +46,7 @@ import '../assets/MazDropdown.C6vjLIeN.css';const _hoisted_1 = ["id", "aria-expa
|
|
|
46
46
|
ariaDescribedby: {},
|
|
47
47
|
trapFocus: { type: Boolean },
|
|
48
48
|
keepOpenOnHover: { type: Boolean },
|
|
49
|
-
|
|
49
|
+
positionReference: {}
|
|
50
50
|
}, {
|
|
51
51
|
modelValue: { type: Boolean, required: !1, default: !1 },
|
|
52
52
|
modelModifiers: {}
|
|
@@ -60,9 +60,6 @@ import '../assets/MazDropdown.C6vjLIeN.css';const _hoisted_1 = ["id", "aria-expa
|
|
|
60
60
|
function setDropdown(value) {
|
|
61
61
|
__props.disabled || (modelValue.value = value);
|
|
62
62
|
}
|
|
63
|
-
function isActionItem(item) {
|
|
64
|
-
return "onClick" in item;
|
|
65
|
-
}
|
|
66
63
|
function isLinkItem(item) {
|
|
67
64
|
return "href" in item || "to" in item;
|
|
68
65
|
}
|
|
@@ -103,23 +100,17 @@ import '../assets/MazDropdown.C6vjLIeN.css';const _hoisted_1 = ["id", "aria-expa
|
|
|
103
100
|
color: "background",
|
|
104
101
|
position: _ctx.position,
|
|
105
102
|
disabled: _ctx.disabled,
|
|
106
|
-
"keep-open-on-hover": _ctx.trigger === "hover",
|
|
103
|
+
"keep-open-on-hover": _ctx.trigger === "hover" || _ctx.trigger === "adaptive",
|
|
107
104
|
block: _ctx.block,
|
|
108
105
|
"onUpdate:modelValue": setDropdown
|
|
109
106
|
}, {
|
|
110
107
|
trigger: withCtx(({ toggle, close, isOpen, open }) => [
|
|
111
108
|
createElementVNode("div", {
|
|
112
109
|
id: unref(instanceId),
|
|
113
|
-
|
|
114
|
-
tabindex: "0",
|
|
110
|
+
tabindex: "-1",
|
|
115
111
|
class: "m-dropdown__wrapper",
|
|
116
112
|
"aria-expanded": modelValue.value,
|
|
117
|
-
"aria-haspopup": "menu"
|
|
118
|
-
onClick: withModifiers(toggle, ["stop"]),
|
|
119
|
-
onKeypress: [
|
|
120
|
-
withKeys(withModifiers(toggle, ["stop", "prevent"]), ["enter"]),
|
|
121
|
-
withKeys(withModifiers(toggle, ["stop", "prevent"]), ["space"])
|
|
122
|
-
]
|
|
113
|
+
"aria-haspopup": "menu"
|
|
123
114
|
}, [
|
|
124
115
|
createElementVNode("span", {
|
|
125
116
|
id: `${unref(instanceId)}-labelspan`,
|
|
@@ -140,7 +131,6 @@ import '../assets/MazDropdown.C6vjLIeN.css';const _hoisted_1 = ["id", "aria-expa
|
|
|
140
131
|
color: _ctx.color,
|
|
141
132
|
disabled: _ctx.disabled
|
|
142
133
|
}, _ctx.$attrs, {
|
|
143
|
-
tabindex: "-1",
|
|
144
134
|
block: _ctx.block,
|
|
145
135
|
size: _ctx.size
|
|
146
136
|
}), createSlots({
|
|
@@ -175,7 +165,7 @@ import '../assets/MazDropdown.C6vjLIeN.css';const _hoisted_1 = ["id", "aria-expa
|
|
|
175
165
|
} : void 0
|
|
176
166
|
]), 1040, ["aria-labelledby", "color", "disabled", "block", "size"])
|
|
177
167
|
])
|
|
178
|
-
],
|
|
168
|
+
], 8, _hoisted_1)
|
|
179
169
|
]),
|
|
180
170
|
default: withCtx(({ open, close, isOpen, toggle }) => [
|
|
181
171
|
createElementVNode("div", {
|
|
@@ -224,11 +214,11 @@ import '../assets/MazDropdown.C6vjLIeN.css';const _hoisted_1 = ["id", "aria-expa
|
|
|
224
214
|
])
|
|
225
215
|
]),
|
|
226
216
|
_: 2
|
|
227
|
-
}, 1040, ["target", "to", "href", "color", "underline-only-hover", "class"])) :
|
|
217
|
+
}, 1040, ["target", "to", "href", "color", "underline-only-hover", "class"])) : (openBlock(), createElementBlock("button", mergeProps({
|
|
228
218
|
key: 1,
|
|
229
219
|
type: "button"
|
|
230
220
|
}, { ref_for: !0 }, { ...item, onClick: void 0 }, {
|
|
231
|
-
class: ["menuitem menuitem__button", [item.class, `--${item.color
|
|
221
|
+
class: ["menuitem menuitem__button", [item.class, item.color ? `--${item.color}` : ""]],
|
|
232
222
|
onClick: withModifiers(($event) => runAction(item, $event), ["stop"]),
|
|
233
223
|
onKeypress: withKeys(withModifiers(($event) => runAction(item, $event), ["stop", "prevent"]), ["enter"])
|
|
234
224
|
}), [
|
|
@@ -241,7 +231,7 @@ import '../assets/MazDropdown.C6vjLIeN.css';const _hoisted_1 = ["id", "aria-expa
|
|
|
241
231
|
}, () => [
|
|
242
232
|
createTextVNode(toDisplayString(item.label), 1)
|
|
243
233
|
])
|
|
244
|
-
], 16, _hoisted_4))
|
|
234
|
+
], 16, _hoisted_4))
|
|
245
235
|
])), 128))
|
|
246
236
|
])
|
|
247
237
|
], 14, _hoisted_3)
|
|
@@ -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.CrXS7DOY.css';const examples = ref();
|
|
7
7
|
function isCountryAvailable(locale) {
|
|
8
8
|
try {
|
|
9
9
|
const response = isSupportedCountry(locale);
|
|
@@ -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();
|
|
@@ -156,7 +156,7 @@ function useMazInputPhoneNumber() {
|
|
|
156
156
|
getCountryList
|
|
157
157
|
};
|
|
158
158
|
}
|
|
159
|
-
const _hoisted_1 = { class: "m-input-phone-number__country-list-code" }, _sfc_main = /* @__PURE__ */ defineComponent({
|
|
159
|
+
const _hoisted_1 = ["id"], _hoisted_2 = { class: "m-input-phone-number__country-list-code" }, _sfc_main = /* @__PURE__ */ defineComponent({
|
|
160
160
|
name: "MazInputPhoneNumber",
|
|
161
161
|
inheritAttrs: !1,
|
|
162
162
|
__name: "MazInputPhoneNumber",
|
|
@@ -209,7 +209,7 @@ const _hoisted_1 = { class: "m-input-phone-number__country-list-code" }, _sfc_ma
|
|
|
209
209
|
},
|
|
210
210
|
emits: ["update:model-value", "country-code", "update:country-code", "data"],
|
|
211
211
|
setup(__props, { emit: __emit }) {
|
|
212
|
-
const props = __props, emits = __emit, MazSelectCountry = defineAsyncComponent(() => import("../components/MazSelectCountry.js")), PhoneInput = defineAsyncComponent(() => import("./PhoneInput.
|
|
212
|
+
const props = __props, emits = __emit, MazSelectCountry = defineAsyncComponent(() => import("../components/MazSelectCountry.js")), PhoneInput = defineAsyncComponent(() => import("./PhoneInput.BzL1_XS5.js")), { fetchCountryCode: fetchCountryCode2, getBrowserLocale: getBrowserLocale2, getCountryList: getCountryList2 } = useMazInputPhoneNumber(), { isCountryAvailable: isCountryAvailable2, getPhoneNumberResults: getPhoneNumberResults2 } = useLibphonenumber(), instanceId = useInstanceUniqId({
|
|
213
213
|
componentName: "MazInputPhoneNumber",
|
|
214
214
|
providedId: props.id
|
|
215
215
|
}), phoneNumber = ref(), selectedCountry = ref(), { t } = useTranslations(), messages = computed(() => ({
|
|
@@ -273,7 +273,7 @@ const _hoisted_1 = { class: "m-input-phone-number__country-list-code" }, _sfc_ma
|
|
|
273
273
|
updateTheResults({ phone: newPhoneNumber }), results.value.parsedCountryCode && results.value.parsedCountryCode !== selectedCountry.value && onCountryChanged({
|
|
274
274
|
countryCode: results.value.parsedCountryCode,
|
|
275
275
|
updateResults: !1
|
|
276
|
-
}), results.value.isValid && hasAutoFormat.value ? phoneNumber.value = results.value.formatNational?.trim().
|
|
276
|
+
}), results.value.isValid && hasAutoFormat.value ? 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
277
|
isPhoneNumberInternalUpdate.value = !1;
|
|
278
278
|
}, 0);
|
|
279
279
|
}
|
|
@@ -323,6 +323,7 @@ const _hoisted_1 = { class: "m-input-phone-number__country-list-code" }, _sfc_ma
|
|
|
323
323
|
phoneNumber,
|
|
324
324
|
results
|
|
325
325
|
}), (_ctx, _cache) => (openBlock(), createElementBlock("div", {
|
|
326
|
+
id: unref(instanceId),
|
|
326
327
|
class: normalizeClass(["m-input-phone-number m-reset-css", [props.class, { "--block": _ctx.block }, _ctx.orientation ? `--${_ctx.orientation}` : void 0]]),
|
|
327
328
|
style: normalizeStyle(_ctx.style)
|
|
328
329
|
}, [
|
|
@@ -367,7 +368,7 @@ const _hoisted_1 = { class: "m-input-phone-number__country-list-code" }, _sfc_ma
|
|
|
367
368
|
}, void 0, !0)
|
|
368
369
|
]),
|
|
369
370
|
"country-list-code": withCtx(({ option }) => [
|
|
370
|
-
createElementVNode("span",
|
|
371
|
+
createElementVNode("span", _hoisted_2, " +" + toDisplayString(option.dialCode), 1)
|
|
371
372
|
]),
|
|
372
373
|
_: 3
|
|
373
374
|
}, 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"])),
|
|
@@ -384,6 +385,7 @@ const _hoisted_1 = { class: "m-input-phone-number__country-list-code" }, _sfc_ma
|
|
|
384
385
|
example: _ctx.example,
|
|
385
386
|
block: "",
|
|
386
387
|
disabled: _ctx.disabled,
|
|
388
|
+
name: _ctx.phoneInputAttributes.name,
|
|
387
389
|
"has-radius": !_ctx.hideCountrySelect,
|
|
388
390
|
success: _ctx.success || (_ctx.validationSuccess ? results.value.isValid : !1),
|
|
389
391
|
error: _ctx.error || (_ctx.validationError ? !!phoneNumber.value && !results.value.isValid : !1),
|
|
@@ -391,10 +393,10 @@ const _hoisted_1 = { class: "m-input-phone-number__country-list-code" }, _sfc_ma
|
|
|
391
393
|
label: _ctx.label,
|
|
392
394
|
placeholder: _ctx.placeholder,
|
|
393
395
|
"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
|
-
],
|
|
396
|
+
}), null, 16, ["id", "model-value", "color", "size", "auto-format", "example", "disabled", "name", "has-radius", "success", "error", "locales", "label", "placeholder"])
|
|
397
|
+
], 14, _hoisted_1));
|
|
396
398
|
}
|
|
397
|
-
}), MazInputPhoneNumber = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
399
|
+
}), MazInputPhoneNumber = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-941c0e2b"]]);
|
|
398
400
|
export {
|
|
399
401
|
MazInputPhoneNumber as M,
|
|
400
402
|
useLibphonenumber as u
|
|
@@ -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: {
|
|
@@ -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, MazDatePickerCalendarMonth = defineAsyncComponent(() => import("./MazPickerCalendarMonth.
|
|
24
|
+
const props = __props, emits = __emit, MazDatePickerCalendarMonth = defineAsyncComponent(() => import("./MazPickerCalendarMonth.DKBqgrNp.js")), MazDatePickerCalendarSwitcher = defineAsyncComponent(() => import("./MazPickerCalendarSwitcher.CzIZol3Z.js")), MazDatePickerMonthSwitcher = defineAsyncComponent(() => import("./MazPickerMonthSwitcher.BSD2GtY6.js")), MazDatePickerShortcuts = defineAsyncComponent(() => import("./MazPickerShortcuts.CMySiKny.js")), MazDatePickerYearSwitcher = defineAsyncComponent(() => import("./MazPickerYearSwitcher.BIUYJMvj.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,
|
package/dist/chunks/{MazPickerCalendarMonth.hQBSVkc9.js → MazPickerCalendarMonth.DKBqgrNp.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.De3Ltb2F.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.Boe_8k4x.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 },
|
|
@@ -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
|
+
"4994ba23": hoverColor.value,
|
|
43
|
+
"2d754e14": 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
|
-
}), MazDatePickerCalendarGrid = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-
|
|
188
|
+
}), MazDatePickerCalendarGrid = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-39e153c9"]]), _sfc_main = /* @__PURE__ */ defineComponent({
|
|
189
189
|
__name: "MazPickerCalendarMonth",
|
|
190
190
|
props: {
|
|
191
191
|
modelValue: {
|
package/dist/chunks/{MazPickerCalendarSwitcher.Cp2ux3E4.js → MazPickerCalendarSwitcher.CzIZol3Z.js}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
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.De3Ltb2F.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";
|
|
@@ -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.DKXNI8O4.js")), MazPickerHeader = defineAsyncComponent(() => import("./MazPickerHeader.Bm9vIrtB.js")), MazPickerTime = defineAsyncComponent(() => import("./MazPickerTime.D0hilq5b.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
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
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.De3Ltb2F.js";
|
|
4
4
|
import dayjs from "dayjs";
|
|
5
5
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper.B--vMWp3.js";
|
|
6
6
|
import '../assets/MazPickerHeader.ZYCJY5bX.css';const _hoisted_1 = {
|
package/dist/chunks/{MazPickerMonthSwitcher.BpfCGGxQ.js → MazPickerMonthSwitcher.BSD2GtY6.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.De3Ltb2F.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.CszcpCcY.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-656f003a"]]);
|
|
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.De3Ltb2F.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",
|