maz-ui 3.47.1 → 3.47.2-beta.10
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/components/MazAccordion.d.ts +3 -2
- package/components/MazAccordion.mjs +82 -90
- package/components/MazAnimatedCounter.d.ts +16 -32
- package/components/MazAnimatedCounter.mjs +27 -29
- package/components/MazAvatar.d.ts +2 -1
- package/components/MazAvatar.mjs +1 -1
- package/components/MazBackdrop.d.ts +2 -1
- package/components/MazBadge.d.ts +7 -2
- package/components/MazBadge.mjs +1 -1
- package/components/MazBottomSheet.d.ts +2 -1
- package/components/MazBottomSheet.mjs +1 -1
- package/components/MazBtn.d.ts +4 -3
- package/components/MazBtn.mjs +1 -1
- package/components/MazCard.d.ts +5 -4
- package/components/MazCard.mjs +1 -1
- package/components/MazCardSpotlight.d.ts +3 -2
- package/components/MazCardSpotlight.mjs +18 -22
- package/components/MazCarousel.d.ts +3 -2
- package/components/MazCarousel.mjs +1 -1
- package/components/MazChart.d.ts +1 -1
- package/components/MazChart.mjs +23 -32
- package/components/MazCheckbox.d.ts +4 -3
- package/components/MazCheckbox.mjs +74 -70
- package/components/MazChecklist.d.ts +2 -5
- package/components/MazChecklist.mjs +1 -1
- package/components/MazCircularProgressBar.d.ts +19 -66
- package/components/MazCircularProgressBar.mjs +47 -52
- package/components/MazDialog.d.ts +5 -3
- package/components/MazDialog.mjs +1 -1
- package/components/MazDialogPromise.mjs +1 -1
- package/components/MazDrawer.d.ts +2 -1
- package/components/MazDrawer.mjs +1 -1
- package/components/MazDropdown.d.ts +25 -3
- package/components/MazDropdown.mjs +2 -348
- package/components/MazDropzone.d.ts +1 -1
- package/components/MazExpandAnimation.d.ts +6 -5
- package/components/MazExpandAnimation.mjs +27 -31
- package/components/MazFullscreenLoader.d.ts +2 -1
- package/components/MazGallery.d.ts +1 -1
- package/components/MazGallery.mjs +1 -1
- package/components/MazIcon.mjs +14 -13
- package/components/MazInput.d.ts +16 -3
- package/components/MazInput.mjs +1 -1
- package/components/MazInputCode.d.ts +1 -1
- package/components/MazInputCode.mjs +26 -30
- package/components/MazInputNumber.d.ts +2 -2
- package/components/MazInputNumber.mjs +1 -1
- package/components/MazInputPrice.d.ts +4 -3
- package/components/MazInputPrice.mjs +1 -1
- package/components/MazInputTags.mjs +1 -1
- package/components/MazLazyImg.d.ts +2 -1
- package/components/MazLink.d.ts +2 -1
- package/components/MazLink.mjs +19 -31
- package/components/MazLoadingBar.d.ts +1 -1
- package/components/MazLoadingBar.mjs +31 -27
- package/components/MazPagination.d.ts +3 -2
- package/components/MazPagination.mjs +1 -1
- package/components/MazPhoneNumberInput/CountrySelector.vue.d.ts +29 -53
- package/components/MazPhoneNumberInput/PhoneInput.vue.d.ts +4 -4
- package/components/MazPhoneNumberInput.d.ts +6 -5
- package/components/MazPhoneNumberInput.mjs +1 -1
- package/components/MazPicker/MazPickerCalendar.vue.d.ts +1 -1
- package/components/MazPicker/MazPickerCalendarMonth/MazPickerCalendarDays.vue.d.ts +1 -1
- package/components/MazPicker/MazPickerCalendarMonth/MazPickerCalendarGrid.vue.d.ts +1 -1
- package/components/MazPicker/MazPickerCalendarMonth/MazPickerCalendarMonth.vue.d.ts +1 -1
- package/components/MazPicker/MazPickerCalendarSwitcher.vue.d.ts +1 -1
- package/components/MazPicker/MazPickerContainer.vue.d.ts +1 -1
- package/components/MazPicker/MazPickerFooter.vue.d.ts +1 -1
- package/components/MazPicker/MazPickerHeader.vue.d.ts +1 -1
- package/components/MazPicker/MazPickerMonthSwitcher.vue.d.ts +1 -1
- package/components/MazPicker/MazPickerShortcuts.vue.d.ts +1 -1
- package/components/MazPicker/MazPickerTime.vue.d.ts +1 -1
- package/components/MazPicker/MazPickerYearSwitcher.vue.d.ts +1 -1
- package/components/MazPicker.d.ts +3 -1
- package/components/MazPicker.mjs +1 -1
- package/components/MazPullToRefresh.d.ts +4 -3
- package/components/MazRadio.d.ts +1 -1
- package/components/MazRadio.mjs +27 -37
- package/components/MazRadioButtons.d.ts +1 -1
- package/components/MazRadioButtons.mjs +61 -66
- package/components/MazReadingProgressBar.d.ts +1 -1
- package/components/MazSelect.d.ts +1 -1
- package/components/MazSelect.mjs +1 -1
- package/components/MazSlider.d.ts +1 -1
- package/components/MazSlider.mjs +107 -116
- package/components/MazSpinner.d.ts +1 -1
- package/components/MazStepper.d.ts +3 -2
- package/components/MazStepper.mjs +1 -1
- package/components/MazSwitch.d.ts +2 -1
- package/components/MazSwitch.mjs +20 -27
- package/components/MazTable.d.ts +38 -55
- package/components/MazTable.mjs +3 -2
- package/components/MazTableCell.d.ts +3 -2
- package/components/MazTableCell.mjs +12 -12
- package/components/MazTableRow.d.ts +3 -2
- package/components/MazTableRow.mjs +16 -16
- package/components/MazTableTitle.d.ts +3 -2
- package/components/MazTableTitle.mjs +18 -18
- package/components/MazTabs.d.ts +3 -2
- package/components/MazTabsBar.d.ts +3 -2
- package/components/MazTabsBar.mjs +1 -1
- package/components/MazTabsContent.d.ts +3 -2
- package/components/MazTabsContent.mjs +4 -4
- package/components/MazTabsContentItem.d.ts +2 -1
- package/components/MazTabsContentItem.mjs +7 -7
- package/components/MazTextarea.d.ts +58 -32
- package/components/MazTextarea.mjs +125 -107
- package/components/MazTransitionExpand.d.ts +2 -1
- package/components/MazTransitionExpand.mjs +9 -9
- package/components/assets/MazAccordion.css +1 -1
- package/components/assets/MazAnimatedCounter.css +1 -1
- package/components/assets/MazAvatar.css +1 -1
- package/components/assets/MazBadge.css +1 -1
- package/components/assets/MazBtn.css +1 -1
- package/components/assets/MazCardSpotlight.css +1 -1
- package/components/assets/MazCheckbox.css +1 -1
- package/components/assets/MazChecklist.css +1 -1
- package/components/assets/MazCircularProgressBar.css +1 -1
- package/components/assets/MazDropdown.css +1 -1
- package/components/assets/MazExpandAnimation.css +1 -1
- package/components/assets/MazGallery.css +1 -1
- package/components/assets/MazInput.css +1 -1
- package/components/assets/MazInputCode.css +1 -1
- package/components/assets/MazInputNumber.css +1 -1
- package/components/assets/MazInputPrice.css +1 -1
- package/components/assets/MazInputTags.css +1 -1
- package/components/assets/MazLink.css +1 -1
- package/components/assets/MazLoadingBar.css +1 -1
- package/components/assets/MazPagination.css +1 -1
- package/components/assets/MazPhoneNumberInput.css +1 -1
- package/components/assets/MazPicker.css +1 -1
- package/components/assets/MazRadio.css +1 -1
- package/components/assets/MazSelect.css +1 -1
- package/components/assets/MazStepper.css +1 -1
- package/components/assets/MazSwitch.css +1 -1
- package/components/assets/MazTable.css +1 -1
- package/components/assets/MazTableCell.css +1 -1
- package/components/assets/MazTableRow.css +1 -1
- package/components/assets/MazTableTitle.css +1 -1
- package/components/assets/MazTabsBar.css +1 -1
- package/components/assets/MazTextarea.css +1 -1
- package/components/assets/MazTransitionExpand.css +1 -1
- package/components/chunks/{MazAvatar-DFoZvWmg.mjs → MazAvatar-CZzOIbzh.mjs} +54 -54
- package/components/chunks/{MazBadge-CNSfzYq-.mjs → MazBadge-CupQjB8D.mjs} +2 -2
- package/components/chunks/{MazBottomSheet-DqK0EOsq.mjs → MazBottomSheet-D9EPpEV8.mjs} +28 -29
- package/components/chunks/MazBtn-BSgCMRt0.mjs +103 -0
- package/components/chunks/MazBtn-BVWOyFm-.mjs +103 -0
- package/components/chunks/MazBtn-BfIn7glE.mjs +103 -0
- package/components/chunks/MazBtn-Br3xKJMD.mjs +103 -0
- package/components/chunks/MazBtn-CB6xVwox.mjs +103 -0
- package/components/chunks/MazBtn-CIAdgMGr.mjs +111 -0
- package/components/chunks/MazBtn-CM-xSnA5.mjs +108 -0
- package/components/chunks/MazBtn-CQq-U8qQ.mjs +103 -0
- package/components/chunks/MazBtn-Chk7DWOF.mjs +103 -0
- package/components/chunks/MazBtn-Ck84sP9a.mjs +103 -0
- package/components/chunks/MazBtn-DI80W9rl.mjs +103 -0
- package/components/chunks/MazBtn-DhSKmF01.mjs +103 -0
- package/components/chunks/MazBtn-DzwuLea3.mjs +103 -0
- package/components/chunks/MazBtn-tOUtVpek.mjs +103 -0
- package/components/chunks/{MazCard-CfkvpcGL.mjs → MazCard-XBaeDZkg.mjs} +18 -19
- package/components/chunks/{MazCarousel-BEl86YGW.mjs → MazCarousel-COTaKhKF.mjs} +20 -21
- package/components/chunks/{MazCheckbox-Byqz8JJB.mjs → MazCheckbox-B-Sw22La.mjs} +63 -60
- package/components/chunks/{MazCheckbox-CI8ml-P8.mjs → MazCheckbox-DjY15PA3.mjs} +63 -58
- package/components/chunks/{MazCheckbox-BKCo6EzO.mjs → MazCheckbox-DxfneUvu.mjs} +63 -59
- package/components/chunks/{MazChecklist-BLxsNHMP.mjs → MazChecklist-DaozZlNb.mjs} +160 -166
- package/components/chunks/{MazDialog-CPgFpAlq.mjs → MazDialog-XiX9LEiz.mjs} +66 -81
- package/components/chunks/MazDialogPromise-B9_e3Ma9.mjs +488 -0
- package/components/chunks/MazDropdown-CKuIGitT.mjs +427 -0
- package/components/chunks/MazExpandAnimation-Bdf0-L85.mjs +54 -0
- package/components/chunks/{MazGallery-BKL7gfrz.mjs → MazGallery-BooLoRWi.mjs} +247 -208
- package/components/chunks/{MazGallery-BMFwld84.mjs → MazGallery-DUOQamrE.mjs} +265 -226
- package/components/chunks/MazIcon-BX2Gbz8R.mjs +4 -0
- package/components/chunks/{MazIcon-DjMuw8Bz.mjs → MazIcon-C-aPrqx2.mjs} +4 -3
- package/components/chunks/{MazIcon-D8V8ixhf.mjs → MazIcon-DFW4cVVf.mjs} +4 -3
- package/components/chunks/{MazIcon-BbvBov5G.mjs → MazIcon-_hN-Kivn.mjs} +14 -13
- package/components/chunks/MazInput-BWAWlxDa.mjs +314 -0
- package/components/chunks/MazInput-DIN1VAoX.mjs +325 -0
- package/components/chunks/MazInput-HLPtw5QK.mjs +313 -0
- package/components/chunks/MazInputNumber-7Ku2ZcG-.mjs +601 -0
- package/components/chunks/{MazInputPrice-DZD7ZZpm.mjs → MazInputPrice-C5yErBFP.mjs} +199 -176
- package/components/chunks/MazInputTags-DvbQ2mK8.mjs +614 -0
- package/components/chunks/{MazLazyImg-C03sUOXs.mjs → MazLazyImg-DQLwaKKz.mjs} +2 -2
- package/components/chunks/MazLink-mrqHeBS0.mjs +67 -0
- package/components/chunks/MazLoadingBar-CNm3Yt6D.mjs +36 -0
- package/components/chunks/MazPagination-BSu0Ifkp.mjs +327 -0
- package/components/chunks/{MazPhoneNumberInput-C4TX1tGw.mjs → MazPhoneNumberInput-B5Up8CqL.mjs} +597 -613
- package/components/chunks/MazPicker-CzYUZcLy.mjs +2487 -0
- package/components/chunks/{MazPickerMonthSwitcher-hCAkEd5r.mjs → MazPickerMonthSwitcher-Ds5agR3Z.mjs} +1 -1
- package/components/chunks/{MazPickerShortcuts-vpLyw1de.mjs → MazPickerShortcuts-BP6CY9-c.mjs} +1 -1
- package/components/chunks/{MazPickerYearSwitcher-DvC79vrt.mjs → MazPickerYearSwitcher-PM8qZMzR.mjs} +1 -1
- package/components/chunks/MazSelect-DOexatNj.mjs +871 -0
- package/components/chunks/{MazSelect-Baj2BQH7.mjs → MazSelect-DaDRzcT_.mjs} +172 -188
- package/components/chunks/{MazSpinner-DwSGm0-X.mjs → MazSpinner-9M_EGMpy.mjs} +1 -1
- package/components/chunks/MazSpinner-BJpv1muf.mjs +34 -0
- package/components/chunks/{MazSpinner-Cqp-BMvL.mjs → MazSpinner-BlbTztM3.mjs} +1 -1
- package/components/chunks/{MazSpinner-C1SiKhfK.mjs → MazSpinner-Bsy1nA3c.mjs} +1 -1
- package/components/chunks/MazSpinner-C30YfScc.mjs +34 -0
- package/components/chunks/MazSpinner-C5mnD76l.mjs +34 -0
- package/components/chunks/{MazSpinner-CAbYLlEZ.mjs → MazSpinner-CDx6lo7l.mjs} +1 -1
- package/components/chunks/MazSpinner-C_GueolV.mjs +34 -0
- package/components/chunks/{MazSpinner-Cb3_S0zT.mjs → MazSpinner-Cc-KlPEG.mjs} +1 -1
- package/components/chunks/MazSpinner-Cgg2dkzQ.mjs +34 -0
- package/components/chunks/{MazSpinner-B5lezvu4.mjs → MazSpinner-CkKIUYXO.mjs} +1 -1
- package/components/chunks/{MazSpinner-B8akphXs.mjs → MazSpinner-CxyUHAvm.mjs} +1 -1
- package/components/chunks/MazSpinner-DROgQW2M.mjs +34 -0
- package/components/chunks/{MazSpinner-Bvb-lKER.mjs → MazSpinner-DjUU4G1h.mjs} +1 -1
- package/components/chunks/MazSpinner-Dzs2W0kq.mjs +34 -0
- package/components/chunks/MazSpinner-NCtEpFMm.mjs +34 -0
- package/components/chunks/MazSpinner-QfPXLpa_.mjs +34 -0
- package/components/chunks/MazSpinner-ZPQe8ON_.mjs +34 -0
- package/components/chunks/{MazSpinner-C-z3-68w.mjs → MazSpinner-b90e3OQK.mjs} +1 -1
- package/components/chunks/MazStepper-B3fuhbye.mjs +218 -0
- package/components/chunks/{MazTable-CulBGLaj.mjs → MazTable-Ci8nhgOP.mjs} +199 -239
- package/components/chunks/MazTableCell-BIganK6X.mjs +23 -0
- package/components/chunks/MazTableRow-CIO-x6Lb.mjs +30 -0
- package/components/chunks/{MazTableTitle-uirsgvk_.mjs → MazTableTitle-OEgTPQB3.mjs} +4 -4
- package/components/chunks/MazTabsBar-CT35SCIK.mjs +177 -0
- package/components/chunks/{MazTransitionExpand-4Ll_5LDO.mjs → MazTransitionExpand-Bcwdl9g2.mjs} +8 -8
- package/components/chunks/{inject-strict-BmiaNiwC.mjs → inject-strict-DEDSuzCz.mjs} +3 -3
- package/css/main.css +1 -1
- package/modules/assets/MazBtn.css +1 -1
- package/modules/assets/index.css +1 -1
- package/modules/chunks/MazBtn-0CRjeBvn.mjs +103 -0
- package/modules/chunks/MazBtn-DRqCRJD-.cjs +1 -0
- package/modules/chunks/{MazIcon-BB0DMfOc.mjs → MazIcon-CeT6HK_q.mjs} +4 -3
- package/modules/chunks/{MazIcon-BtomZnkQ.cjs → MazIcon-D-Gna0vz.cjs} +1 -1
- package/modules/chunks/{MazSpinner-CDJhmIRl.mjs → MazSpinner-DV--lwdI.mjs} +1 -1
- package/modules/chunks/{MazSpinner-BASKjaLe.cjs → MazSpinner-DersvZQw.cjs} +1 -1
- package/modules/chunks/index-DvromXrX.cjs +124 -0
- package/modules/chunks/{index-C2yAjM0P.mjs → index-Kry9j5uD.mjs} +948 -944
- package/modules/index.cjs +1 -1
- package/modules/index.mjs +1 -1
- package/nuxt/index.json +1 -1
- package/package.json +22 -21
- package/tailwindcss/variables/colors.ts +2 -0
- package/types/components/MazAccordion.vue.d.ts +3 -2
- package/types/components/MazAnimatedCounter.vue.d.ts +16 -32
- package/types/components/MazAvatar.vue.d.ts +2 -1
- package/types/components/MazBackdrop.vue.d.ts +2 -1
- package/types/components/MazBadge.vue.d.ts +7 -2
- package/types/components/MazBottomSheet.vue.d.ts +2 -1
- package/types/components/MazBtn.vue.d.ts +4 -3
- package/types/components/MazCard.vue.d.ts +5 -4
- package/types/components/MazCardSpotlight.vue.d.ts +3 -2
- package/types/components/MazCarousel.vue.d.ts +3 -2
- package/types/components/MazChart.vue.d.ts +1 -1
- package/types/components/MazCheckbox.vue.d.ts +4 -3
- package/types/components/MazChecklist.vue.d.ts +2 -5
- package/types/components/MazCircularProgressBar.vue.d.ts +19 -66
- package/types/components/MazDialog.vue.d.ts +5 -3
- package/types/components/MazDrawer.vue.d.ts +2 -1
- package/types/components/MazDropdown.vue.d.ts +25 -3
- package/types/components/MazDropzone.vue.d.ts +1 -1
- package/types/components/MazExpandAnimation.vue.d.ts +6 -5
- package/types/components/MazFullscreenLoader.vue.d.ts +2 -1
- package/types/components/MazGallery.vue.d.ts +1 -1
- package/types/components/MazInput.vue.d.ts +16 -3
- package/types/components/MazInputCode.vue.d.ts +1 -1
- package/types/components/MazInputNumber.vue.d.ts +2 -2
- package/types/components/MazInputPrice.vue.d.ts +4 -3
- package/types/components/MazLazyImg.vue.d.ts +2 -1
- package/types/components/MazLink.vue.d.ts +2 -1
- package/types/components/MazLoadingBar.vue.d.ts +1 -1
- package/types/components/MazPagination.vue.d.ts +3 -2
- package/types/components/MazPhoneNumberInput/CountrySelector.vue.d.ts +29 -53
- package/types/components/MazPhoneNumberInput/PhoneInput.vue.d.ts +4 -4
- package/types/components/MazPhoneNumberInput.vue.d.ts +6 -5
- package/types/components/MazPicker/MazPickerCalendar.vue.d.ts +1 -1
- package/types/components/MazPicker/MazPickerCalendarMonth/MazPickerCalendarDays.vue.d.ts +1 -1
- package/types/components/MazPicker/MazPickerCalendarMonth/MazPickerCalendarGrid.vue.d.ts +1 -1
- package/types/components/MazPicker/MazPickerCalendarMonth/MazPickerCalendarMonth.vue.d.ts +1 -1
- package/types/components/MazPicker/MazPickerCalendarSwitcher.vue.d.ts +1 -1
- package/types/components/MazPicker/MazPickerContainer.vue.d.ts +1 -1
- package/types/components/MazPicker/MazPickerFooter.vue.d.ts +1 -1
- package/types/components/MazPicker/MazPickerHeader.vue.d.ts +1 -1
- package/types/components/MazPicker/MazPickerMonthSwitcher.vue.d.ts +1 -1
- package/types/components/MazPicker/MazPickerShortcuts.vue.d.ts +1 -1
- package/types/components/MazPicker/MazPickerTime.vue.d.ts +1 -1
- package/types/components/MazPicker/MazPickerYearSwitcher.vue.d.ts +1 -1
- package/types/components/MazPicker.vue.d.ts +3 -1
- package/types/components/MazPullToRefresh.vue.d.ts +4 -3
- package/types/components/MazRadio.vue.d.ts +1 -1
- package/types/components/MazRadioButtons.vue.d.ts +1 -1
- package/types/components/MazReadingProgressBar.vue.d.ts +1 -1
- package/types/components/MazSelect.vue.d.ts +1 -1
- package/types/components/MazSlider.vue.d.ts +1 -1
- package/types/components/MazSpinner.vue.d.ts +1 -1
- package/types/components/MazStepper.vue.d.ts +3 -2
- package/types/components/MazSwitch.vue.d.ts +2 -1
- package/types/components/MazTable.vue.d.ts +38 -55
- package/types/components/MazTableCell.vue.d.ts +3 -2
- package/types/components/MazTableRow.vue.d.ts +3 -2
- package/types/components/MazTableTitle.vue.d.ts +3 -2
- package/types/components/MazTabs.vue.d.ts +3 -2
- package/types/components/MazTabsBar.vue.d.ts +3 -2
- package/types/components/MazTabsContent.vue.d.ts +3 -2
- package/types/components/MazTabsContentItem.vue.d.ts +2 -1
- package/types/components/MazTextarea.vue.d.ts +58 -32
- package/types/components/MazTransitionExpand.vue.d.ts +2 -1
- package/types/modules/composables/useFormValidator/types.d.ts +9 -5
- package/types/modules/composables/useFormValidator/useFormField.d.ts +3 -3
- package/types/modules/composables/useFormValidator/useFormValidator.d.ts +4 -4
- package/types/modules/composables/useFormValidator/utils.d.ts +17 -17
- package/types/modules/directives/v-fullscreen-img/MazFullscreenImg.vue.d.ts +7 -7
- package/types/modules/helpers/check-availability.d.ts +1 -0
- package/types/modules/helpers/inject-strict.d.ts +2 -1
- package/types/tailwindcss/variables/colors.d.ts +2 -0
- package/components/chunks/MazBtn-BRUaoP8j.mjs +0 -126
- package/components/chunks/MazBtn-BRnLMzhy.mjs +0 -118
- package/components/chunks/MazBtn-BhnOApJu.mjs +0 -118
- package/components/chunks/MazBtn-C28vKP_v.mjs +0 -118
- package/components/chunks/MazBtn-CnqRnXh_.mjs +0 -118
- package/components/chunks/MazBtn-CweCwE_4.mjs +0 -118
- package/components/chunks/MazBtn-D6Jxw9Nr.mjs +0 -118
- package/components/chunks/MazBtn-D7IKoL2c.mjs +0 -118
- package/components/chunks/MazBtn-DlD5m7T4.mjs +0 -118
- package/components/chunks/MazBtn-Dt8lr0GH.mjs +0 -118
- package/components/chunks/MazBtn-DzBXfedt.mjs +0 -123
- package/components/chunks/MazBtn-Mu18egu5.mjs +0 -118
- package/components/chunks/MazBtn-TkePGm5o.mjs +0 -118
- package/components/chunks/MazBtn-igor8wRn.mjs +0 -118
- package/components/chunks/MazDialogPromise-BCCdkrea.mjs +0 -522
- package/components/chunks/MazExpandAnimation-Bkw_wFTi.mjs +0 -58
- package/components/chunks/MazInput-CBiCdd0F.mjs +0 -302
- package/components/chunks/MazInput-Dx2cCzFS.mjs +0 -290
- package/components/chunks/MazInput-O6Q41Fm0.mjs +0 -291
- package/components/chunks/MazInputNumber-DYPVUz4k.mjs +0 -593
- package/components/chunks/MazInputTags-CxXBsTdM.mjs +0 -605
- package/components/chunks/MazLink-Dl9ePCGm.mjs +0 -79
- package/components/chunks/MazLoadingBar-Di2OIrPD.mjs +0 -32
- package/components/chunks/MazPagination-CHTMRRqE.mjs +0 -362
- package/components/chunks/MazPicker-BcQ_-AJH.mjs +0 -2477
- package/components/chunks/MazSelect-BXzgSKmL.mjs +0 -863
- package/components/chunks/MazSpinner-Cg26sBU2.mjs +0 -34
- package/components/chunks/MazSpinner-CsEQ9EXb.mjs +0 -34
- package/components/chunks/MazSpinner-CvT-9sC7.mjs +0 -34
- package/components/chunks/MazSpinner-DH6C15pU.mjs +0 -34
- package/components/chunks/MazSpinner-DlMKBtyt.mjs +0 -34
- package/components/chunks/MazSpinner-Dyf9yb51.mjs +0 -34
- package/components/chunks/MazSpinner-M4r0cykl.mjs +0 -34
- package/components/chunks/MazSpinner-QHjOczon.mjs +0 -34
- package/components/chunks/MazSpinner-cqcpf_FX.mjs +0 -34
- package/components/chunks/MazSpinner-yPkPj7Q8.mjs +0 -34
- package/components/chunks/MazStepper-DRWtYHZR.mjs +0 -232
- package/components/chunks/MazTableCell-BXDbkEJq.mjs +0 -23
- package/components/chunks/MazTableRow-Ds3CDEit.mjs +0 -30
- package/components/chunks/MazTabsBar-MZYefBb8.mjs +0 -204
- package/modules/chunks/MazBtn-CTqI4qhg.mjs +0 -118
- package/modules/chunks/MazBtn-D_CpNgpD.cjs +0 -9
- package/modules/chunks/index-BIX1NMzX.cjs +0 -149
package/components/chunks/{MazPhoneNumberInput-C4TX1tGw.mjs → MazPhoneNumberInput-B5Up8CqL.mjs}
RENAMED
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import '../assets/MazPhoneNumberInput.css';var Ge = Object.defineProperty;
|
|
2
|
-
var Je = (
|
|
3
|
-
var _ = (
|
|
4
|
-
import { useId as Ze, computed as h, inject as Xe, defineComponent as
|
|
5
|
-
import { getCountries as Oe, getCountryCallingCode as ce, isSupportedCountry as
|
|
2
|
+
var Je = (a, o, e) => o in a ? Ge(a, o, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[o] = e;
|
|
3
|
+
var _ = (a, o, e) => Je(a, typeof o != "symbol" ? o + "" : o, e);
|
|
4
|
+
import { useId as Ze, computed as h, inject as Xe, defineComponent as ne, defineAsyncComponent as q, withDirectives as ze, openBlock as y, createElementBlock as P, normalizeClass as M, normalizeStyle as ee, Fragment as be, renderList as Be, createElementVNode as j, mergeProps as te, createVNode as H, unref as k, createCommentVNode as E, renderSlot as N, ref as L, onMounted as Ie, useSlots as xe, toDisplayString as oe, createBlock as U, resolveDynamicComponent as ke, toHandlers as _e, vModelDynamic as eo, createTextVNode as oo, withModifiers as se, withCtx as G, onBeforeMount as to, nextTick as ue, Transition as lo, mergeModels as Pe, useModel as ao, provide as so, watch as he } from "vue";
|
|
5
|
+
import { getCountries as Oe, getCountryCallingCode as ce, isSupportedCountry as no, parsePhoneNumberFromString as ro, AsYouType as io, getExampleNumber as uo } from "libphonenumber-js";
|
|
6
6
|
function Ae({
|
|
7
|
-
componentName:
|
|
7
|
+
componentName: a,
|
|
8
8
|
providedId: o
|
|
9
9
|
}) {
|
|
10
10
|
const e = Ze();
|
|
11
|
-
return h(() => o ?? `${
|
|
11
|
+
return h(() => o ?? `${a}-${e}`);
|
|
12
12
|
}
|
|
13
|
-
function
|
|
14
|
-
return `https://flagcdn.com/${o}/${
|
|
13
|
+
function Le(a, o = "20x15") {
|
|
14
|
+
return `https://flagcdn.com/${o}/${a.toLowerCase()}.png`;
|
|
15
15
|
}
|
|
16
|
-
function Me(
|
|
17
|
-
const e = Xe(
|
|
16
|
+
function Me(a, o) {
|
|
17
|
+
const e = Xe(a, o);
|
|
18
18
|
if (!e)
|
|
19
|
-
throw new TypeError(`[maz-ui](injectStrict) Could not resolve ${
|
|
19
|
+
throw new TypeError(`[maz-ui](injectStrict) Could not resolve ${a.toString()}`);
|
|
20
20
|
return e;
|
|
21
21
|
}
|
|
22
|
-
function
|
|
23
|
-
return !!
|
|
22
|
+
function co(a) {
|
|
23
|
+
return !!a;
|
|
24
24
|
}
|
|
25
|
-
const mo = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",
|
|
25
|
+
const mo = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7", po = {
|
|
26
26
|
baseClass: "m-lazy-img",
|
|
27
27
|
loadedClass: "m-lazy-loaded",
|
|
28
28
|
loadingClass: "m-lazy-loading",
|
|
@@ -36,10 +36,10 @@ const mo = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAA
|
|
|
36
36
|
threshold: 0.1
|
|
37
37
|
}
|
|
38
38
|
};
|
|
39
|
-
class
|
|
39
|
+
class fo {
|
|
40
40
|
constructor(o = {}) {
|
|
41
41
|
_(this, "observers", []);
|
|
42
|
-
_(this, "defaultOptions",
|
|
42
|
+
_(this, "defaultOptions", po);
|
|
43
43
|
_(this, "options");
|
|
44
44
|
_(this, "onImgLoadedCallback");
|
|
45
45
|
_(this, "onImgErrorCallback");
|
|
@@ -149,18 +149,18 @@ class ho {
|
|
|
149
149
|
t.src = e;
|
|
150
150
|
}
|
|
151
151
|
handleIntersectionObserver(o, e, t, r) {
|
|
152
|
-
var u,
|
|
152
|
+
var u, v;
|
|
153
153
|
this.observers.push(r);
|
|
154
|
-
for (const
|
|
155
|
-
if (
|
|
156
|
-
if ((
|
|
154
|
+
for (const p of t)
|
|
155
|
+
if (p.isIntersecting) {
|
|
156
|
+
if ((v = (u = this.options).onIntersecting) == null || v.call(u, p.target), this.options.observerOnce && r.unobserve(o), this.options.loadOnce && this.hasImgLoaded)
|
|
157
157
|
return;
|
|
158
158
|
this.loadImage(o, e);
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
161
|
createObserver(o, e) {
|
|
162
|
-
const t = (
|
|
163
|
-
this.handleIntersectionObserver(o, e,
|
|
162
|
+
const t = (v, p) => {
|
|
163
|
+
this.handleIntersectionObserver(o, e, v, p);
|
|
164
164
|
}, r = this.options.observerOptions;
|
|
165
165
|
new IntersectionObserver(t, r).observe(o);
|
|
166
166
|
}
|
|
@@ -190,21 +190,21 @@ class ho {
|
|
|
190
190
|
}
|
|
191
191
|
}
|
|
192
192
|
let de;
|
|
193
|
-
const
|
|
194
|
-
created(
|
|
193
|
+
const ho = {
|
|
194
|
+
created(a, o) {
|
|
195
195
|
const e = typeof o.value == "object" ? o.value : {};
|
|
196
|
-
de = new
|
|
196
|
+
de = new fo(e), de.add(a, o);
|
|
197
197
|
},
|
|
198
|
-
updated(
|
|
199
|
-
de.update(
|
|
198
|
+
updated(a, o) {
|
|
199
|
+
de.update(a, o);
|
|
200
200
|
},
|
|
201
|
-
unmounted(
|
|
202
|
-
de.remove(
|
|
201
|
+
unmounted(a, o) {
|
|
202
|
+
de.remove(a, o);
|
|
203
203
|
}
|
|
204
|
-
}, vo = ["data-lazy-srcset", "media"],
|
|
204
|
+
}, vo = ["data-lazy-srcset", "media"], yo = ["alt"], go = {
|
|
205
205
|
key: 0,
|
|
206
206
|
class: "m-lazy-img-component-loader"
|
|
207
|
-
},
|
|
207
|
+
}, bo = /* @__PURE__ */ ne({
|
|
208
208
|
inheritAttrs: !1,
|
|
209
209
|
__name: "MazLazyImg",
|
|
210
210
|
props: {
|
|
@@ -224,36 +224,36 @@ const yo = {
|
|
|
224
224
|
block: { type: Boolean }
|
|
225
225
|
},
|
|
226
226
|
emits: ["intersecting", "loading", "loaded", "error"],
|
|
227
|
-
setup(
|
|
228
|
-
const o =
|
|
227
|
+
setup(a) {
|
|
228
|
+
const o = a, e = q(() => import("./MazSpinner-NCtEpFMm.mjs")), t = h(() => o.image || o.src), r = h(() => {
|
|
229
229
|
var u;
|
|
230
230
|
return typeof t.value == "string" ? [{ srcset: t.value }] : (u = t.value) == null ? void 0 : u.sources;
|
|
231
231
|
});
|
|
232
|
-
return (u,
|
|
232
|
+
return (u, v) => ze((y(), P(
|
|
233
233
|
"picture",
|
|
234
234
|
{
|
|
235
|
-
class:
|
|
235
|
+
class: M(["m-lazy-img-component", [{ "--use-loader": !u.noLoader, "--height-full": u.imageHeightFull, "--block": u.block }, o.class]]),
|
|
236
236
|
style: ee(u.style)
|
|
237
237
|
},
|
|
238
238
|
[
|
|
239
|
-
(
|
|
239
|
+
(y(!0), P(
|
|
240
240
|
be,
|
|
241
241
|
null,
|
|
242
|
-
Be(r.value, ({ srcset:
|
|
242
|
+
Be(r.value, ({ srcset: p, media: O }, $) => (y(), P("source", {
|
|
243
243
|
key: $,
|
|
244
|
-
"data-lazy-srcset":
|
|
244
|
+
"data-lazy-srcset": p,
|
|
245
245
|
media: O
|
|
246
246
|
}, null, 8, vo))),
|
|
247
247
|
128
|
|
248
248
|
/* KEYED_FRAGMENT */
|
|
249
249
|
)),
|
|
250
|
-
j("img",
|
|
250
|
+
j("img", te(u.$attrs, {
|
|
251
251
|
src: "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",
|
|
252
252
|
loading: "lazy",
|
|
253
253
|
alt: u.alt,
|
|
254
254
|
class: u.imgClass
|
|
255
|
-
}), null, 16,
|
|
256
|
-
u.noLoader ?
|
|
255
|
+
}), null, 16, yo),
|
|
256
|
+
u.noLoader ? E("v-if", !0) : (y(), P("div", go, [
|
|
257
257
|
H(k(e), { size: "2em" })
|
|
258
258
|
])),
|
|
259
259
|
N(u.$slots, "default", {}, void 0, !0)
|
|
@@ -261,25 +261,25 @@ const yo = {
|
|
|
261
261
|
6
|
|
262
262
|
/* CLASS, STYLE */
|
|
263
263
|
)), [
|
|
264
|
-
[k(
|
|
264
|
+
[k(ho), {
|
|
265
265
|
noPhoto: u.noPhoto,
|
|
266
266
|
loadOnce: u.loadOnce,
|
|
267
267
|
observerOptions: u.observerOptions,
|
|
268
268
|
fallbackSrc: u.fallbackSrc,
|
|
269
269
|
observerOnce: !u.noObserverOnce,
|
|
270
|
-
onIntersecting: (
|
|
271
|
-
onLoading: (
|
|
272
|
-
onLoaded: (
|
|
273
|
-
onError: (
|
|
270
|
+
onIntersecting: (p) => u.$emit("intersecting", p),
|
|
271
|
+
onLoading: (p) => u.$emit("loading", p),
|
|
272
|
+
onLoaded: (p) => u.$emit("loaded", p),
|
|
273
|
+
onError: (p) => u.$emit("error", p)
|
|
274
274
|
}]
|
|
275
275
|
]);
|
|
276
276
|
}
|
|
277
|
-
}), re = (
|
|
278
|
-
const e =
|
|
277
|
+
}), re = (a, o) => {
|
|
278
|
+
const e = a.__vccOpts || a;
|
|
279
279
|
for (const [t, r] of o)
|
|
280
280
|
e[t] = r;
|
|
281
281
|
return e;
|
|
282
|
-
},
|
|
282
|
+
}, Ee = /* @__PURE__ */ re(bo, [["__scopeId", "data-v-83e40430"]]), Co = {
|
|
283
283
|
removeAccents: !0,
|
|
284
284
|
caseSensitive: !1,
|
|
285
285
|
replaceSpaces: !0,
|
|
@@ -289,8 +289,8 @@ const yo = {
|
|
|
289
289
|
removeNumbers: !1,
|
|
290
290
|
customNormalizationForms: ["NFC", "NFKD"]
|
|
291
291
|
};
|
|
292
|
-
function
|
|
293
|
-
const e = { ...
|
|
292
|
+
function me(a, o) {
|
|
293
|
+
const e = { ...Co, ...o }, t = {
|
|
294
294
|
À: "A",
|
|
295
295
|
Á: "A",
|
|
296
296
|
Â: "A",
|
|
@@ -339,101 +339,101 @@ function pe(n, o) {
|
|
|
339
339
|
ñ: "n",
|
|
340
340
|
ó: "o"
|
|
341
341
|
};
|
|
342
|
-
let r =
|
|
342
|
+
let r = a.toString();
|
|
343
343
|
if (e.trim && (r = r.trim()), e.normalizeSpaces && (r = r.replaceAll(/\s+/g, " ")), e.replaceSpaces && (r = r.replaceAll(" ", "-")), e.removeNumbers && (r = r.replaceAll(/\d/g, "")), e.removeAccents && (r = r.replaceAll(/[ÀÁÂÃÄÅÇÈÉÊËÎÏÑÔÕÖØÙÚÛÜàáâãäåçèéêëíîïñóôõöøùúûüÿ]/g, (u) => t[u] || u), r = r.replaceAll(/[\u0300-\u036F]/g, "")), e.caseSensitive === !1 && (r = r.toLowerCase()), e.removeSpecialCharacters && (r = r.replaceAll(/[^\dA-Z-]/gi, "")), e.trim && (r = r.trim()), e.customNormalizationForms)
|
|
344
344
|
for (const u of e.customNormalizationForms)
|
|
345
345
|
r = r.normalize(u);
|
|
346
346
|
return r;
|
|
347
347
|
}
|
|
348
|
-
function
|
|
349
|
-
const e =
|
|
348
|
+
function zo(a, o) {
|
|
349
|
+
const e = a.length, t = o.length, r = [];
|
|
350
350
|
for (let u = 0; u <= e; u++)
|
|
351
351
|
r[u] = [u];
|
|
352
352
|
for (let u = 0; u <= t; u++)
|
|
353
353
|
r[0][u] = u;
|
|
354
354
|
for (let u = 1; u <= e; u++)
|
|
355
|
-
for (let
|
|
356
|
-
const
|
|
357
|
-
r[u][
|
|
358
|
-
r[u - 1][
|
|
359
|
-
r[u][
|
|
360
|
-
r[u - 1][
|
|
355
|
+
for (let v = 1; v <= t; v++) {
|
|
356
|
+
const p = a[u - 1] === o[v - 1] ? 0 : 1;
|
|
357
|
+
r[u][v] = Math.min(
|
|
358
|
+
r[u - 1][v] + 1,
|
|
359
|
+
r[u][v - 1] + 1,
|
|
360
|
+
r[u - 1][v - 1] + p
|
|
361
361
|
);
|
|
362
362
|
}
|
|
363
363
|
return r[e][t];
|
|
364
364
|
}
|
|
365
|
-
function Te(
|
|
366
|
-
const e =
|
|
365
|
+
function Te(a, o) {
|
|
366
|
+
const e = zo(a, o), t = Math.max(a.length, o.length);
|
|
367
367
|
return 1 - e / t;
|
|
368
368
|
}
|
|
369
|
-
function
|
|
370
|
-
return Te(
|
|
369
|
+
function Io(a, o, e = 0.75) {
|
|
370
|
+
return Te(a, o) >= e;
|
|
371
371
|
}
|
|
372
|
-
function
|
|
372
|
+
function ve(a, o, e = 0.75) {
|
|
373
373
|
const t = h(
|
|
374
|
-
() =>
|
|
374
|
+
() => me(typeof a == "string" ? a : a.value)
|
|
375
375
|
), r = h(
|
|
376
|
-
() =>
|
|
377
|
-
), u = h(() => typeof e == "number" ? e : e.value),
|
|
376
|
+
() => me(typeof o == "string" ? o : o.value)
|
|
377
|
+
), u = h(() => typeof e == "number" ? e : e.value), v = h(() => Te(t.value, r.value));
|
|
378
378
|
return {
|
|
379
379
|
isMatching: h(
|
|
380
|
-
() =>
|
|
380
|
+
() => Io(t.value, r.value, u.value)
|
|
381
381
|
),
|
|
382
|
-
score:
|
|
382
|
+
score: v
|
|
383
383
|
};
|
|
384
384
|
}
|
|
385
|
-
function Fe(
|
|
386
|
-
var
|
|
387
|
-
|
|
385
|
+
function Fe(a, o, e) {
|
|
386
|
+
var v;
|
|
387
|
+
a.stopPropagation();
|
|
388
388
|
const t = typeof e.value == "function" ? e.value : e.value.handler, r = typeof e.value == "object" ? e.value.exclude : void 0;
|
|
389
389
|
let u = !1;
|
|
390
390
|
if (r && r.length > 0) {
|
|
391
|
-
for (const
|
|
392
|
-
if (!u &&
|
|
393
|
-
const O = (
|
|
394
|
-
u =
|
|
391
|
+
for (const p of r)
|
|
392
|
+
if (!u && a.target instanceof HTMLElement) {
|
|
393
|
+
const O = (v = document.querySelector(p)) == null ? void 0 : v.getAttribute("id");
|
|
394
|
+
u = a.target.getAttribute("id") === O;
|
|
395
395
|
}
|
|
396
396
|
}
|
|
397
|
-
!o.contains(
|
|
397
|
+
!o.contains(a.target) && !u && (t == null || t());
|
|
398
398
|
}
|
|
399
399
|
function Ne() {
|
|
400
400
|
return document.ontouchstart === null ? "touchstart" : "click";
|
|
401
401
|
}
|
|
402
|
-
function
|
|
402
|
+
function Ao(a, o) {
|
|
403
403
|
const e = Ne();
|
|
404
|
-
document.removeEventListener(e, (t) => Fe(t,
|
|
404
|
+
document.removeEventListener(e, (t) => Fe(t, a, o));
|
|
405
405
|
}
|
|
406
|
-
function
|
|
406
|
+
function wo(a, o) {
|
|
407
407
|
if (typeof o.value != "function" && typeof o.value == "object" && typeof o.value.handler != "function") {
|
|
408
408
|
console.error("[maz-ui](vClosable) v-closable directive requires a handler function");
|
|
409
409
|
return;
|
|
410
410
|
}
|
|
411
411
|
const e = Ne();
|
|
412
|
-
document.addEventListener(e, (t) => Fe(t,
|
|
412
|
+
document.addEventListener(e, (t) => Fe(t, a, o));
|
|
413
413
|
}
|
|
414
|
-
const
|
|
415
|
-
mounted:
|
|
416
|
-
unmounted:
|
|
414
|
+
const So = {
|
|
415
|
+
mounted: wo,
|
|
416
|
+
unmounted: Ao
|
|
417
417
|
};
|
|
418
|
-
|
|
419
|
-
function Po(n, o) {
|
|
420
|
-
ve && clearTimeout(ve), ve = setTimeout(n, o);
|
|
421
|
-
}
|
|
422
|
-
function ko(n, o) {
|
|
418
|
+
function Vo(a, o) {
|
|
423
419
|
let e;
|
|
424
420
|
return function(...t) {
|
|
425
421
|
clearTimeout(e), e = setTimeout(() => {
|
|
426
|
-
|
|
422
|
+
a.apply(this, t);
|
|
427
423
|
}, o);
|
|
428
424
|
};
|
|
429
425
|
}
|
|
430
|
-
|
|
426
|
+
let ye = null;
|
|
427
|
+
function ko(a, o) {
|
|
428
|
+
ye && clearTimeout(ye), ye = setTimeout(a, o);
|
|
429
|
+
}
|
|
430
|
+
const Po = ["for"], Lo = {
|
|
431
431
|
key: 0,
|
|
432
432
|
class: "m-input-wrapper-left"
|
|
433
|
-
},
|
|
433
|
+
}, Eo = ["id", "type", "name", "inputmode", "placeholder", "aria-label", "disabled", "readonly", "required"], $o = { key: 0 }, Bo = {
|
|
434
434
|
key: 1,
|
|
435
435
|
class: "m-input-wrapper-right"
|
|
436
|
-
},
|
|
436
|
+
}, Oo = /* @__PURE__ */ ne({
|
|
437
437
|
inheritAttrs: !1,
|
|
438
438
|
__name: "MazInput",
|
|
439
439
|
props: {
|
|
@@ -442,6 +442,8 @@ const Eo = {
|
|
|
442
442
|
modelValue: { default: void 0 },
|
|
443
443
|
placeholder: { default: void 0 },
|
|
444
444
|
label: { default: void 0 },
|
|
445
|
+
topLabel: {},
|
|
446
|
+
assistiveText: {},
|
|
445
447
|
name: { default: void 0 },
|
|
446
448
|
color: { default: "primary" },
|
|
447
449
|
type: { default: "text" },
|
|
@@ -470,16 +472,16 @@ const Eo = {
|
|
|
470
472
|
block: { type: Boolean }
|
|
471
473
|
},
|
|
472
474
|
emits: ["update:model-value", "focus", "blur", "click", "change", "input"],
|
|
473
|
-
setup(
|
|
474
|
-
const e =
|
|
475
|
+
setup(a, { emit: o }) {
|
|
476
|
+
const e = a, t = o, r = q(() => import("./MazBtn-CB6xVwox.mjs")), u = q(() => import("./MazIcon-DFW4cVVf.mjs")), v = q(() => import("./eye-slash-BoO00xzs.mjs")), p = q(() => import("./eye-f8zAUc30.mjs")), O = q(() => import("./check-C9Q_W85g.mjs")), $ = L(!1), g = L(!1), V = L(), i = Ae({
|
|
475
477
|
componentName: "MazInput",
|
|
476
478
|
providedId: e.id
|
|
477
479
|
});
|
|
478
480
|
Ie(() => {
|
|
479
481
|
var s;
|
|
480
|
-
e.autoFocus && ((s =
|
|
482
|
+
e.autoFocus && ((s = V.value) == null || s.focus());
|
|
481
483
|
});
|
|
482
|
-
const f = h(() => e.type === "password"),
|
|
484
|
+
const f = h(() => e.type === "password"), z = h(() => $.value ? "text" : e.type), w = h(() => {
|
|
483
485
|
if (!e.noBorder) {
|
|
484
486
|
if (e.error)
|
|
485
487
|
return "maz-border-danger";
|
|
@@ -487,7 +489,7 @@ const Eo = {
|
|
|
487
489
|
return "maz-border-success";
|
|
488
490
|
if (e.warning)
|
|
489
491
|
return "maz-border-warning";
|
|
490
|
-
if (
|
|
492
|
+
if (g.value || e.borderActive) {
|
|
491
493
|
if (e.color === "black")
|
|
492
494
|
return "maz-border-black";
|
|
493
495
|
if (e.color === "danger")
|
|
@@ -507,49 +509,49 @@ const Eo = {
|
|
|
507
509
|
}
|
|
508
510
|
return "--default-border";
|
|
509
511
|
}
|
|
510
|
-
}),
|
|
511
|
-
const { required: s, placeholder:
|
|
512
|
-
if (
|
|
513
|
-
return s ? `${
|
|
514
|
-
}), J = h(() => C.value !== void 0 && C.value !== ""),
|
|
512
|
+
}), D = xe(), Y = h(() => {
|
|
513
|
+
const { required: s, placeholder: T } = e;
|
|
514
|
+
if (T)
|
|
515
|
+
return s ? `${T} *` : T;
|
|
516
|
+
}), J = h(() => C.value !== void 0 && C.value !== ""), b = Vo(
|
|
515
517
|
(s) => {
|
|
516
518
|
t("update:model-value", s);
|
|
517
519
|
},
|
|
518
520
|
typeof e.debounce == "number" ? e.debounce : e.debounceDelay ?? 500
|
|
519
521
|
);
|
|
520
|
-
function
|
|
522
|
+
function S(s) {
|
|
521
523
|
if (e.debounce)
|
|
522
|
-
return
|
|
524
|
+
return b(s);
|
|
523
525
|
t("update:model-value", s);
|
|
524
526
|
}
|
|
525
527
|
const C = h({
|
|
526
528
|
get: () => e.modelValue,
|
|
527
|
-
set: (s) =>
|
|
528
|
-
}), W = h(() => (!!e.label || !!e.hint) && (
|
|
529
|
-
function
|
|
530
|
-
return !!
|
|
529
|
+
set: (s) => S(s)
|
|
530
|
+
}), W = h(() => (!!e.label || !!e.hint) && (g.value || !!J.value || !!e.placeholder || ["date", "month", "week"].includes(e.type))), Z = h(() => !!e.label || !!e.hint);
|
|
531
|
+
function n() {
|
|
532
|
+
return !!D["right-icon"] || f.value || !!D["valid-button"] || e.validButton || !!e.rightIcon;
|
|
531
533
|
}
|
|
532
|
-
function
|
|
533
|
-
return !!
|
|
534
|
+
function A() {
|
|
535
|
+
return !!D["left-icon"] || !!e.leftIcon;
|
|
534
536
|
}
|
|
535
537
|
function K(s) {
|
|
536
|
-
t("focus", s),
|
|
538
|
+
t("focus", s), g.value = !0;
|
|
537
539
|
}
|
|
538
|
-
function
|
|
539
|
-
t("blur", s),
|
|
540
|
+
function F(s) {
|
|
541
|
+
t("blur", s), g.value = !1;
|
|
540
542
|
}
|
|
541
|
-
function
|
|
543
|
+
function le(s) {
|
|
542
544
|
return t("change", s);
|
|
543
545
|
}
|
|
544
546
|
function X(s) {
|
|
545
547
|
return t("input", s);
|
|
546
548
|
}
|
|
547
|
-
return (s,
|
|
549
|
+
return (s, T) => (y(), P(
|
|
548
550
|
"div",
|
|
549
551
|
{
|
|
550
|
-
class:
|
|
552
|
+
class: M(["m-input", [
|
|
551
553
|
{
|
|
552
|
-
"--is-focused":
|
|
554
|
+
"--is-focused": g.value || s.borderActive,
|
|
553
555
|
"--should-up": W.value,
|
|
554
556
|
"--has-label": Z.value,
|
|
555
557
|
"--is-disabled": s.disabled,
|
|
@@ -559,123 +561,127 @@ const Eo = {
|
|
|
559
561
|
"--block": s.block
|
|
560
562
|
},
|
|
561
563
|
e.class,
|
|
562
|
-
`--${s.color}
|
|
563
|
-
`--${s.size}`
|
|
564
|
+
`--${s.color}`
|
|
564
565
|
]]),
|
|
565
566
|
style: ee(s.style)
|
|
566
567
|
},
|
|
567
568
|
[
|
|
569
|
+
s.topLabel ? (y(), P("label", {
|
|
570
|
+
key: 0,
|
|
571
|
+
for: k(i),
|
|
572
|
+
class: "m-input-top-label"
|
|
573
|
+
}, oe(s.topLabel), 9, Po)) : E("v-if", !0),
|
|
568
574
|
j(
|
|
569
575
|
"div",
|
|
570
576
|
{
|
|
571
|
-
class:
|
|
577
|
+
class: M(["m-input-wrapper", [
|
|
572
578
|
s.inputClasses,
|
|
573
|
-
|
|
574
|
-
s.roundedSize ? `--rounded-${s.roundedSize}` : { "maz-rounded": !s.noRadius }
|
|
579
|
+
w.value,
|
|
580
|
+
s.roundedSize ? `--rounded-${s.roundedSize}` : { "maz-rounded": !s.noRadius },
|
|
581
|
+
{ "--block": s.block }
|
|
575
582
|
]])
|
|
576
583
|
},
|
|
577
584
|
[
|
|
578
|
-
|
|
579
|
-
z(`
|
|
580
|
-
@slot left-icon - The icon to display on the left of the input
|
|
581
|
-
`),
|
|
585
|
+
A() ? (y(), P("div", Lo, [
|
|
582
586
|
s.$slots["left-icon"] || s.leftIcon ? N(s.$slots, "left-icon", { key: 0 }, () => [
|
|
583
|
-
typeof s.leftIcon == "string" ? (
|
|
587
|
+
typeof s.leftIcon == "string" ? (y(), U(k(u), {
|
|
584
588
|
key: 0,
|
|
585
589
|
name: s.leftIcon,
|
|
586
590
|
class: "maz-text-xl maz-text-muted"
|
|
587
|
-
}, null, 8, ["name"])) : s.leftIcon ? (
|
|
591
|
+
}, null, 8, ["name"])) : s.leftIcon ? (y(), U(ke(s.leftIcon), {
|
|
588
592
|
key: 1,
|
|
589
593
|
class: "maz-text-xl maz-text-muted"
|
|
590
|
-
})) :
|
|
591
|
-
], !0) :
|
|
592
|
-
])) :
|
|
593
|
-
j(
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
594
|
+
})) : E("v-if", !0)
|
|
595
|
+
], !0) : E("v-if", !0)
|
|
596
|
+
])) : E("v-if", !0),
|
|
597
|
+
j(
|
|
598
|
+
"div",
|
|
599
|
+
{
|
|
600
|
+
class: M(["m-input-wrapper-input", [`--${s.size}`, { "--top-label": !!s.topLabel }]])
|
|
601
|
+
},
|
|
602
|
+
[
|
|
603
|
+
ze(j("input", te({
|
|
604
|
+
id: k(i),
|
|
605
|
+
ref_key: "input",
|
|
606
|
+
ref: V,
|
|
607
|
+
"onUpdate:modelValue": T[0] || (T[0] = (x) => C.value = x),
|
|
608
|
+
type: z.value,
|
|
609
|
+
name: s.name
|
|
610
|
+
}, s.$attrs, {
|
|
611
|
+
inputmode: s.inputmode,
|
|
612
|
+
placeholder: Y.value,
|
|
613
|
+
"aria-label": s.label || s.placeholder,
|
|
614
|
+
disabled: s.disabled,
|
|
615
|
+
readonly: s.readonly,
|
|
616
|
+
required: s.required,
|
|
617
|
+
class: "m-input-input"
|
|
618
|
+
}, _e({
|
|
619
|
+
blur: F,
|
|
620
|
+
focus: K,
|
|
621
|
+
change: le,
|
|
622
|
+
input: X
|
|
623
|
+
}, !0), {
|
|
624
|
+
onClick: T[1] || (T[1] = (x) => s.$emit("click", x))
|
|
625
|
+
}), null, 16, Eo), [
|
|
626
|
+
[eo, C.value]
|
|
627
|
+
]),
|
|
628
|
+
s.label || s.hint ? (y(), P(
|
|
629
|
+
"span",
|
|
630
|
+
{
|
|
631
|
+
key: 0,
|
|
632
|
+
class: M(["m-input-label", [
|
|
633
|
+
{
|
|
634
|
+
"maz-text-danger-600": s.error,
|
|
635
|
+
"maz-text-success-600": s.success,
|
|
636
|
+
"maz-text-warning-600": s.warning
|
|
637
|
+
}
|
|
638
|
+
]])
|
|
639
|
+
},
|
|
640
|
+
[
|
|
641
|
+
oo(
|
|
642
|
+
oe(s.hint || s.label) + " ",
|
|
643
|
+
1
|
|
644
|
+
/* TEXT */
|
|
645
|
+
),
|
|
646
|
+
s.required ? (y(), P("sup", $o, "*")) : E("v-if", !0)
|
|
647
|
+
],
|
|
648
|
+
2
|
|
649
|
+
/* CLASS */
|
|
650
|
+
)) : E("v-if", !0)
|
|
651
|
+
],
|
|
652
|
+
2
|
|
653
|
+
/* CLASS */
|
|
654
|
+
),
|
|
655
|
+
n() ? (y(), P("div", Bo, [
|
|
647
656
|
s.$slots["right-icon"] || s.rightIcon ? N(s.$slots, "right-icon", { key: 0 }, () => [
|
|
648
|
-
typeof s.rightIcon == "string" ? (
|
|
657
|
+
typeof s.rightIcon == "string" ? (y(), U(k(u), {
|
|
649
658
|
key: 0,
|
|
650
659
|
name: s.rightIcon,
|
|
651
660
|
class: "maz-text-xl maz-text-muted"
|
|
652
|
-
}, null, 8, ["name"])) : s.rightIcon ? (
|
|
661
|
+
}, null, 8, ["name"])) : s.rightIcon ? (y(), U(ke(s.rightIcon), {
|
|
653
662
|
key: 1,
|
|
654
663
|
class: "maz-text-xl maz-text-muted"
|
|
655
|
-
})) :
|
|
656
|
-
], !0) :
|
|
657
|
-
f.value ? (
|
|
664
|
+
})) : E("v-if", !0)
|
|
665
|
+
], !0) : E("v-if", !0),
|
|
666
|
+
f.value ? (y(), U(k(r), {
|
|
658
667
|
key: 1,
|
|
659
668
|
color: "transparent",
|
|
660
669
|
tabindex: "-1",
|
|
661
670
|
size: "mini",
|
|
662
|
-
onClick:
|
|
671
|
+
onClick: T[2] || (T[2] = se((x) => $.value = !$.value, ["stop"]))
|
|
663
672
|
}, {
|
|
664
673
|
default: G(() => [
|
|
665
|
-
$.value ? (
|
|
674
|
+
$.value ? (y(), U(k(v), {
|
|
666
675
|
key: 0,
|
|
667
676
|
class: "maz-text-xl maz-text-muted"
|
|
668
|
-
})) : (
|
|
677
|
+
})) : (y(), U(k(p), {
|
|
669
678
|
key: 1,
|
|
670
679
|
class: "maz-text-xl maz-text-muted"
|
|
671
680
|
}))
|
|
672
681
|
]),
|
|
673
682
|
_: 1
|
|
674
683
|
/* STABLE */
|
|
675
|
-
})) :
|
|
676
|
-
z(`
|
|
677
|
-
@slot valid-button - Replace the valid button by your own
|
|
678
|
-
`),
|
|
684
|
+
})) : E("v-if", !0),
|
|
679
685
|
s.$slots["valid-button"] || s.validButton ? N(s.$slots, "valid-button", { key: 2 }, () => [
|
|
680
686
|
H(k(r), {
|
|
681
687
|
color: "transparent",
|
|
@@ -692,22 +698,39 @@ const Eo = {
|
|
|
692
698
|
_: 1
|
|
693
699
|
/* STABLE */
|
|
694
700
|
}, 8, ["disabled", "loading"])
|
|
695
|
-
], !0) :
|
|
696
|
-
])) :
|
|
701
|
+
], !0) : E("v-if", !0)
|
|
702
|
+
])) : E("v-if", !0)
|
|
697
703
|
],
|
|
698
704
|
2
|
|
699
705
|
/* CLASS */
|
|
700
|
-
)
|
|
706
|
+
),
|
|
707
|
+
s.assistiveText ? (y(), P(
|
|
708
|
+
"div",
|
|
709
|
+
{
|
|
710
|
+
key: 1,
|
|
711
|
+
class: M(["m-input-bottom-text", [
|
|
712
|
+
{
|
|
713
|
+
"maz-text-danger-600": s.error,
|
|
714
|
+
"maz-text-success-600": s.success,
|
|
715
|
+
"maz-text-warning-600": s.warning,
|
|
716
|
+
"maz-text-muted": !s.error && !s.success && !s.warning
|
|
717
|
+
}
|
|
718
|
+
]])
|
|
719
|
+
},
|
|
720
|
+
oe(s.assistiveText),
|
|
721
|
+
3
|
|
722
|
+
/* TEXT, CLASS */
|
|
723
|
+
)) : E("v-if", !0)
|
|
701
724
|
],
|
|
702
725
|
6
|
|
703
726
|
/* CLASS, STYLE */
|
|
704
727
|
));
|
|
705
728
|
}
|
|
706
|
-
}), Ce = /* @__PURE__ */ re(
|
|
729
|
+
}), Ce = /* @__PURE__ */ re(Oo, [["__scopeId", "data-v-2cfe0ca2"]]), Mo = ["aria-label"], To = { class: "m-select-list__no-results" }, Fo = {
|
|
707
730
|
key: 2,
|
|
708
731
|
class: "m-select-list__scroll-wrapper",
|
|
709
732
|
tabindex: "-1"
|
|
710
|
-
},
|
|
733
|
+
}, No = { class: "m-select-list-optgroup" }, Ko = ["onClick"], Uo = /* @__PURE__ */ ne({
|
|
711
734
|
inheritAttrs: !1,
|
|
712
735
|
__name: "MazSelect",
|
|
713
736
|
props: {
|
|
@@ -739,28 +762,23 @@ const Eo = {
|
|
|
739
762
|
autocomplete: { default: "off" }
|
|
740
763
|
},
|
|
741
764
|
emits: ["close", "open", "blur", "focus", "change", "input", "update:model-value", "selected-option"],
|
|
742
|
-
setup(
|
|
743
|
-
|
|
744
|
-
cb149e58: I.value,
|
|
745
|
-
"215ff493": i.value,
|
|
746
|
-
"64d6cfbb": f.value
|
|
747
|
-
}));
|
|
748
|
-
const t = n, r = e, u = q(() => import("./MazCheckbox-BKCo6EzO.mjs")), y = q(() => import("./magnifying-glass--nBiyXot.mjs")), m = q(() => import("./chevron-down-BkvtON3b.mjs")), O = q(() => import("./no-symbol-CIgKzsrB.mjs"));
|
|
765
|
+
setup(a, { expose: o, emit: e }) {
|
|
766
|
+
const t = a, r = e, u = q(() => import("./MazCheckbox-B-Sw22La.mjs")), v = q(() => import("./magnifying-glass--nBiyXot.mjs")), p = q(() => import("./chevron-down-BkvtON3b.mjs")), O = q(() => import("./no-symbol-CIgKzsrB.mjs"));
|
|
749
767
|
o({
|
|
750
768
|
/** Method to open the option list */
|
|
751
|
-
openList:
|
|
769
|
+
openList: ie,
|
|
752
770
|
/** Method to close the option list */
|
|
753
|
-
closeList:
|
|
771
|
+
closeList: ae
|
|
754
772
|
});
|
|
755
|
-
const $ =
|
|
773
|
+
const $ = L(!1), g = L(), V = h(
|
|
756
774
|
() => ["black", "transparent", "white"].includes(t.color)
|
|
757
775
|
), i = h(
|
|
758
|
-
() =>
|
|
776
|
+
() => V.value ? "var(--maz-color-black)" : `var(--maz-color-${t.color}-800)`
|
|
759
777
|
), f = h(
|
|
760
|
-
() =>
|
|
761
|
-
),
|
|
762
|
-
() =>
|
|
763
|
-
),
|
|
778
|
+
() => V.value ? "var(--maz-color-muted)" : `var(--maz-color-${t.color}-100)`
|
|
779
|
+
), z = h(
|
|
780
|
+
() => V.value ? "var(--maz-color-muted)" : `var(--maz-color-${t.color}-200)`
|
|
781
|
+
), w = h(() => $.value || t.open), D = Ae({
|
|
764
782
|
componentName: "MazSelect",
|
|
765
783
|
providedId: t.id
|
|
766
784
|
});
|
|
@@ -779,135 +797,136 @@ const Eo = {
|
|
|
779
797
|
[t.optionInputValueKey]: l[t.optionInputValueKey]
|
|
780
798
|
};
|
|
781
799
|
}
|
|
782
|
-
const
|
|
800
|
+
const b = h(() => {
|
|
783
801
|
var d;
|
|
784
802
|
const l = [];
|
|
785
803
|
if (!((d = t.options) != null && d.length))
|
|
786
804
|
return [];
|
|
787
|
-
for (const
|
|
788
|
-
typeof
|
|
789
|
-
{ label:
|
|
790
|
-
...
|
|
805
|
+
for (const m of t.options)
|
|
806
|
+
typeof m == "string" || typeof m == "number" || typeof m == "boolean" ? l.push(Y(m)) : typeof m == "object" && "options" in m && Array.isArray(m.options) ? l.push(
|
|
807
|
+
{ label: m.label, isOptGroup: !0 },
|
|
808
|
+
...m.options.map(
|
|
791
809
|
(c) => typeof c == "string" || typeof c == "number" || typeof c == "boolean" ? Y(c) : J(c)
|
|
792
810
|
)
|
|
793
|
-
) : l.push(J(
|
|
811
|
+
) : l.push(J(m));
|
|
794
812
|
return l;
|
|
795
|
-
}),
|
|
813
|
+
}), S = h(
|
|
796
814
|
() => {
|
|
797
815
|
var l;
|
|
798
|
-
return ((l =
|
|
816
|
+
return ((l = b.value) == null ? void 0 : l.filter((d) => t.multiple ? Array.isArray(t.modelValue) ? t.modelValue.includes(d[t.optionValueKey]) && !A(d[t.optionValueKey]) : !1 : t.modelValue === d[t.optionValueKey] && !A(d[t.optionValueKey]))) ?? [];
|
|
799
817
|
}
|
|
800
818
|
);
|
|
801
|
-
|
|
819
|
+
to(() => {
|
|
802
820
|
var l;
|
|
803
821
|
(l = t.options) != null && l.length || console.warn("[maz-ui](MazSelect) you must provide options"), fe();
|
|
804
822
|
});
|
|
805
|
-
const C =
|
|
806
|
-
function
|
|
823
|
+
const C = L(), W = L(), Z = L(), n = L();
|
|
824
|
+
function A(l) {
|
|
807
825
|
return l == null;
|
|
808
826
|
}
|
|
809
827
|
function K(l) {
|
|
810
|
-
var
|
|
811
|
-
return (((
|
|
828
|
+
var m;
|
|
829
|
+
return (((m = S.value) == null ? void 0 : m.some(
|
|
812
830
|
(c) => c[t.optionValueKey] === l[t.optionValueKey]
|
|
813
|
-
)) ?? !1) && !
|
|
831
|
+
)) ?? !1) && !A(l[t.optionValueKey]);
|
|
814
832
|
}
|
|
815
|
-
const
|
|
833
|
+
const F = h(() => {
|
|
816
834
|
var d;
|
|
817
835
|
if (t.multiple && t.modelValue && Array.isArray(t.modelValue))
|
|
818
836
|
return t.modelValue.map(
|
|
819
|
-
(
|
|
820
|
-
var c,
|
|
821
|
-
return (
|
|
837
|
+
(m) => {
|
|
838
|
+
var c, I;
|
|
839
|
+
return (I = (c = b.value) == null ? void 0 : c.find((B) => B[t.optionValueKey] === m)) == null ? void 0 : I[t.optionInputValueKey];
|
|
822
840
|
}
|
|
823
841
|
).join(", ");
|
|
824
|
-
const l = (d =
|
|
825
|
-
(
|
|
842
|
+
const l = (d = b.value) == null ? void 0 : d.find(
|
|
843
|
+
(m) => m[t.optionValueKey] === t.modelValue
|
|
826
844
|
);
|
|
827
|
-
return
|
|
828
|
-
}),
|
|
845
|
+
return A(t.modelValue) || l == null ? void 0 : l[t.optionInputValueKey];
|
|
846
|
+
}), le = h(
|
|
829
847
|
() => t.listPosition.includes("bottom") ? "maz-slide" : "maz-slideinvert"
|
|
830
|
-
), X =
|
|
831
|
-
function
|
|
832
|
-
return d && l &&
|
|
848
|
+
), X = L(""), s = L("");
|
|
849
|
+
function T(l, d) {
|
|
850
|
+
return d && l && me(l).includes(me(d));
|
|
833
851
|
}
|
|
834
852
|
function x(l) {
|
|
835
853
|
var d;
|
|
836
|
-
return l ? (d =
|
|
837
|
-
const c =
|
|
838
|
-
return
|
|
839
|
-
}) :
|
|
854
|
+
return l ? (d = b.value) == null ? void 0 : d.filter((m) => {
|
|
855
|
+
const c = m[t.optionLabelKey], I = m[t.optionValueKey], B = m[t.optionInputValueKey], R = t.searchThreshold;
|
|
856
|
+
return T(c, l) || T(B, l) || T(I, l) || typeof c == "string" && ve(c, l, R).isMatching.value || typeof B == "string" && ve(B, l, R).isMatching.value || typeof I == "string" && ve(I, l, R).isMatching.value;
|
|
857
|
+
}) : b.value;
|
|
840
858
|
}
|
|
841
859
|
const Q = h(() => x(X.value));
|
|
842
|
-
async function
|
|
843
|
-
var
|
|
844
|
-
if (!
|
|
860
|
+
async function ae(l) {
|
|
861
|
+
var m, c;
|
|
862
|
+
if (!w.value)
|
|
845
863
|
return;
|
|
846
|
-
if (l && ("relatedTarget" in l && ((
|
|
864
|
+
if (l && ("relatedTarget" in l && ((m = C.value) != null && m.contains(l.relatedTarget)) || l.type === "keydown"))
|
|
847
865
|
return l.preventDefault();
|
|
848
866
|
const d = l && "relatedTarget" in l && l.relatedTarget instanceof HTMLElement && l.relatedTarget.getAttribute("id");
|
|
849
867
|
if ((c = t.excludeSelectors) != null && c.includes(`#${d}`))
|
|
850
868
|
return l == null ? void 0 : l.preventDefault();
|
|
851
|
-
await
|
|
869
|
+
await ue(), $.value = !1, g.value = 0, r("close", l);
|
|
852
870
|
}
|
|
853
|
-
async function
|
|
854
|
-
t.disabled ||
|
|
871
|
+
async function ie(l) {
|
|
872
|
+
t.disabled || w.value || (l == null || l.preventDefault(), $.value = !0, await pe(), r("focus", l), r("open", $.value));
|
|
855
873
|
}
|
|
856
874
|
function we() {
|
|
857
875
|
var l, d;
|
|
858
876
|
(d = ((l = W.value) == null ? void 0 : l.$el).querySelector("input")) == null || d.focus();
|
|
859
877
|
}
|
|
860
|
-
function
|
|
878
|
+
function De() {
|
|
861
879
|
var l, d;
|
|
862
880
|
(d = ((l = W.value) == null ? void 0 : l.$el).querySelector("input")) == null || d.dispatchEvent(new Event("input"));
|
|
863
881
|
}
|
|
864
|
-
function
|
|
865
|
-
$.value ?
|
|
882
|
+
function Re(l) {
|
|
883
|
+
$.value ? ae(l) : we();
|
|
866
884
|
}
|
|
867
885
|
function qe(l) {
|
|
868
|
-
var d,
|
|
869
|
-
X.value = l, (
|
|
886
|
+
var d, m;
|
|
887
|
+
X.value = l, (m = ((d = Z.value) == null ? void 0 : d.$el).querySelector("input")) == null || m.focus();
|
|
870
888
|
}
|
|
871
889
|
function je(l) {
|
|
872
|
-
var
|
|
890
|
+
var m;
|
|
873
891
|
l === "Backspace" && s.value.length > 0 ? s.value = s.value.slice(0, -1) : s.value += l;
|
|
874
892
|
const d = x(s.value);
|
|
875
|
-
d != null && d.length && (
|
|
893
|
+
d != null && d.length && (g.value = (m = Q.value) == null ? void 0 : m.findIndex(
|
|
876
894
|
(c) => c[t.optionValueKey] === d[0][t.optionValueKey]
|
|
877
|
-
), typeof
|
|
895
|
+
), typeof g.value == "number" && g.value >= 0 && pe(g.value)), ko(() => {
|
|
878
896
|
s.value = "";
|
|
879
897
|
}, 1e3);
|
|
880
898
|
}
|
|
881
899
|
function Ye(l) {
|
|
882
900
|
const d = l.key;
|
|
883
|
-
/^[\dA-Za-z\u0400-\u04FF]$/.test(d) ? (l.preventDefault(),
|
|
901
|
+
/^[\dA-Za-z\u0400-\u04FF]$/.test(d) ? (l.preventDefault(), ie(l), t.search ? qe(d) : je(d)) : Se(l);
|
|
884
902
|
}
|
|
885
903
|
function Se(l, d = !0) {
|
|
886
|
-
const
|
|
887
|
-
c ? We(l,
|
|
904
|
+
const m = l.code, c = ["ArrowUp", "ArrowDown"].includes(m), I = (d ? ["Enter", "Space"] : ["Enter"]).includes(m), B = m === "Escape" && w.value;
|
|
905
|
+
c ? We(l, g.value) : I ? Qe(l, g.value) : B && ae(l);
|
|
888
906
|
}
|
|
889
907
|
function We(l, d) {
|
|
890
|
-
var
|
|
908
|
+
var I;
|
|
891
909
|
l.preventDefault();
|
|
892
|
-
const
|
|
893
|
-
|
|
894
|
-
const c = (
|
|
895
|
-
c && (typeof d == "number" ? d === c - 1 &&
|
|
910
|
+
const m = l.code;
|
|
911
|
+
w.value || ie(l);
|
|
912
|
+
const c = (I = Q.value) == null ? void 0 : I.length;
|
|
913
|
+
c && (typeof d == "number" ? d === c - 1 && m === "ArrowDown" ? g.value = 0 : d === 0 && m === "ArrowUp" ? g.value = c - 1 : g.value = m === "ArrowDown" ? d + 1 : d - 1 : g.value = m === "ArrowDown" ? 0 : c - 1, pe(g.value));
|
|
896
914
|
}
|
|
897
915
|
function Qe(l, d) {
|
|
898
|
-
var c,
|
|
899
|
-
if (
|
|
900
|
-
return
|
|
901
|
-
|
|
902
|
-
|
|
916
|
+
var c, I, B;
|
|
917
|
+
if (!w.value)
|
|
918
|
+
return;
|
|
919
|
+
l.preventDefault();
|
|
920
|
+
const m = d ? ((c = Q.value) == null ? void 0 : c[d]) ?? ((I = Q.value) == null ? void 0 : I[0]) : (B = Q.value) == null ? void 0 : B[0];
|
|
921
|
+
A(m) || Ve(m);
|
|
903
922
|
}
|
|
904
|
-
async function
|
|
905
|
-
var
|
|
906
|
-
await
|
|
907
|
-
const d = l ??
|
|
923
|
+
async function pe(l) {
|
|
924
|
+
var m, c;
|
|
925
|
+
await ue(), typeof l != "number" && fe();
|
|
926
|
+
const d = l ?? g.value;
|
|
908
927
|
if (typeof d == "number" && d >= 0) {
|
|
909
|
-
const
|
|
910
|
-
(c =
|
|
928
|
+
const I = (m = n.value) == null ? void 0 : m.querySelectorAll(".m-select-list-item");
|
|
929
|
+
(c = I == null ? void 0 : I[d]) == null || c.scrollIntoView({
|
|
911
930
|
behavior: "auto",
|
|
912
931
|
block: "nearest",
|
|
913
932
|
inline: "start"
|
|
@@ -915,43 +934,43 @@ const Eo = {
|
|
|
915
934
|
}
|
|
916
935
|
}
|
|
917
936
|
function fe(l) {
|
|
918
|
-
var
|
|
919
|
-
const d = (
|
|
920
|
-
var
|
|
921
|
-
return t.multiple && Array.isArray(t.modelValue) ? l ? l[t.optionValueKey] === c[t.optionValueKey] : [...t.modelValue].reverse()[0] === c[t.optionValueKey] : ((B = (
|
|
937
|
+
var m;
|
|
938
|
+
const d = (m = Q.value) == null ? void 0 : m.findIndex((c) => {
|
|
939
|
+
var I, B;
|
|
940
|
+
return t.multiple && Array.isArray(t.modelValue) ? l ? l[t.optionValueKey] === c[t.optionValueKey] : [...t.modelValue].reverse()[0] === c[t.optionValueKey] : ((B = (I = S.value) == null ? void 0 : I[0]) == null ? void 0 : B[t.optionValueKey]) === c[t.optionValueKey];
|
|
922
941
|
});
|
|
923
|
-
|
|
942
|
+
g.value = d && d >= 0 ? d : 0;
|
|
924
943
|
}
|
|
925
944
|
function Ve(l, d = !0) {
|
|
926
945
|
var B;
|
|
927
|
-
d && !t.multiple &&
|
|
928
|
-
const
|
|
929
|
-
(
|
|
946
|
+
d && !t.multiple && ue(() => ae()), X.value = "";
|
|
947
|
+
const m = (B = S.value) == null ? void 0 : B.some(
|
|
948
|
+
(R) => R[t.optionValueKey] === l[t.optionValueKey]
|
|
930
949
|
);
|
|
931
|
-
let c =
|
|
932
|
-
|
|
933
|
-
(
|
|
950
|
+
let c = S.value;
|
|
951
|
+
m && t.multiple ? c = c == null ? void 0 : c.filter(
|
|
952
|
+
(R) => R[t.optionValueKey] !== l[t.optionValueKey]
|
|
934
953
|
) : t.multiple ? c.push(l) : c = [l];
|
|
935
|
-
const
|
|
936
|
-
r("update:model-value", t.multiple ?
|
|
954
|
+
const I = c.map((R) => R[t.optionValueKey]);
|
|
955
|
+
r("update:model-value", t.multiple ? I : I[0]), r("selected-option", l), De(), fe(l), we();
|
|
937
956
|
}
|
|
938
957
|
return (l, d) => {
|
|
939
|
-
var
|
|
940
|
-
return ze((
|
|
958
|
+
var m;
|
|
959
|
+
return ze((y(), P(
|
|
941
960
|
"div",
|
|
942
961
|
{
|
|
943
962
|
ref_key: "mazSelectElement",
|
|
944
963
|
ref: C,
|
|
945
|
-
class:
|
|
946
|
-
{ "--is-open":
|
|
964
|
+
class: M(["m-select", [
|
|
965
|
+
{ "--is-open": w.value, "--disabled": l.disabled, "--block": l.block },
|
|
947
966
|
t.class,
|
|
948
967
|
`--${l.size}`
|
|
949
968
|
]]),
|
|
950
|
-
style: ee(l.style)
|
|
969
|
+
style: ee([l.style, { "--keyboard-selected-bg-color": z.value, "--selected-bg-color": f.value, "--selected-text-color": i.value }])
|
|
951
970
|
},
|
|
952
971
|
[
|
|
953
|
-
H(Ce,
|
|
954
|
-
id: k(
|
|
972
|
+
H(Ce, te({
|
|
973
|
+
id: k(D),
|
|
955
974
|
ref_key: "mazInputComponent",
|
|
956
975
|
ref: W,
|
|
957
976
|
class: "m-select-input"
|
|
@@ -959,14 +978,14 @@ const Eo = {
|
|
|
959
978
|
required: l.required,
|
|
960
979
|
"border-active": $.value,
|
|
961
980
|
color: l.color,
|
|
962
|
-
"model-value":
|
|
981
|
+
"model-value": F.value,
|
|
963
982
|
size: l.size,
|
|
964
983
|
block: "",
|
|
965
984
|
autocomplete: l.autocomplete,
|
|
966
985
|
disabled: l.disabled,
|
|
967
|
-
onFocus:
|
|
968
|
-
onBlur: ae
|
|
969
|
-
onClick:
|
|
986
|
+
onFocus: se(ie, ["prevent", "stop"]),
|
|
987
|
+
onBlur: se(ae, ["prevent", "stop"]),
|
|
988
|
+
onClick: se(ie, ["prevent", "stop"]),
|
|
970
989
|
onChange: d[0] || (d[0] = (c) => r("change", c)),
|
|
971
990
|
onInput: d[1] || (d[1] = (c) => r("input", c)),
|
|
972
991
|
onKeydown: Ye
|
|
@@ -976,24 +995,24 @@ const Eo = {
|
|
|
976
995
|
tabindex: "-1",
|
|
977
996
|
type: "button",
|
|
978
997
|
class: "m-select-input__toggle-button maz-custom",
|
|
979
|
-
"aria-label": `${
|
|
980
|
-
onClick:
|
|
998
|
+
"aria-label": `${w.value ? "collapse" : "expand"} list of options`,
|
|
999
|
+
onClick: se(Re, ["stop"])
|
|
981
1000
|
}, [
|
|
982
|
-
H(k(
|
|
983
|
-
], 8,
|
|
1001
|
+
H(k(p), { class: "m-select-chevron maz-text-xl" })
|
|
1002
|
+
], 8, Mo)
|
|
984
1003
|
]),
|
|
985
1004
|
_: 1
|
|
986
1005
|
/* STABLE */
|
|
987
1006
|
}, 16, ["id", "required", "border-active", "color", "model-value", "size", "autocomplete", "disabled"]),
|
|
988
|
-
H(
|
|
1007
|
+
H(lo, { name: le.value }, {
|
|
989
1008
|
default: G(() => [
|
|
990
|
-
|
|
1009
|
+
w.value ? (y(), P(
|
|
991
1010
|
"div",
|
|
992
1011
|
{
|
|
993
1012
|
key: 0,
|
|
994
1013
|
ref_key: "optionsListElement",
|
|
995
|
-
ref:
|
|
996
|
-
class:
|
|
1014
|
+
ref: n,
|
|
1015
|
+
class: M(["m-select-list", {
|
|
997
1016
|
"--top": l.listPosition.includes("top"),
|
|
998
1017
|
"--left": l.listPosition.includes("left"),
|
|
999
1018
|
"--right": l.listPosition.includes("right"),
|
|
@@ -1007,14 +1026,14 @@ const Eo = {
|
|
|
1007
1026
|
})
|
|
1008
1027
|
},
|
|
1009
1028
|
[
|
|
1010
|
-
l.search ? (
|
|
1029
|
+
l.search ? (y(), U(Ce, {
|
|
1011
1030
|
key: 0,
|
|
1012
1031
|
ref_key: "searchInputComponent",
|
|
1013
1032
|
ref: Z,
|
|
1014
1033
|
modelValue: X.value,
|
|
1015
1034
|
"onUpdate:modelValue": [
|
|
1016
1035
|
d[2] || (d[2] = (c) => X.value = c),
|
|
1017
|
-
d[4] || (d[4] = (c) =>
|
|
1036
|
+
d[4] || (d[4] = (c) => g.value = 0)
|
|
1018
1037
|
],
|
|
1019
1038
|
size: "sm",
|
|
1020
1039
|
color: l.color,
|
|
@@ -1024,65 +1043,53 @@ const Eo = {
|
|
|
1024
1043
|
autocomplete: "off",
|
|
1025
1044
|
tabindex: "-1",
|
|
1026
1045
|
class: "m-select-list__search-input maz-flex-none",
|
|
1027
|
-
"left-icon": k(
|
|
1046
|
+
"left-icon": k(v),
|
|
1028
1047
|
onKeydown: d[3] || (d[3] = (c) => Se(c, !1))
|
|
1029
|
-
}, null, 8, ["modelValue", "color", "placeholder", "left-icon"])) :
|
|
1030
|
-
z(`
|
|
1031
|
-
@slot No results slot - Displayed when no results corresponding with search query
|
|
1032
|
-
`),
|
|
1048
|
+
}, null, 8, ["modelValue", "color", "placeholder", "left-icon"])) : E("v-if", !0),
|
|
1033
1049
|
!Q.value || Q.value.length <= 0 ? N(l.$slots, "no-results", { key: 1 }, () => [
|
|
1034
|
-
j("span",
|
|
1050
|
+
j("span", To, [
|
|
1035
1051
|
H(k(O), { class: "maz-h-6 maz-w-6 maz-text-normal" })
|
|
1036
1052
|
])
|
|
1037
|
-
], !0) : (
|
|
1038
|
-
(
|
|
1053
|
+
], !0) : (y(), P("div", Fo, [
|
|
1054
|
+
(y(!0), P(
|
|
1039
1055
|
be,
|
|
1040
1056
|
null,
|
|
1041
|
-
Be(Q.value, (c,
|
|
1057
|
+
Be(Q.value, (c, I) => (y(), P(
|
|
1042
1058
|
be,
|
|
1043
|
-
{ key:
|
|
1059
|
+
{ key: I },
|
|
1044
1060
|
[
|
|
1045
|
-
z(`
|
|
1046
|
-
@slot Custom optgroup label
|
|
1047
|
-
@binding {String} label - the label of the optgroup
|
|
1048
|
-
`),
|
|
1049
1061
|
c.label && c.isOptGroup ? N(l.$slots, "optgroup", {
|
|
1050
1062
|
key: 0,
|
|
1051
1063
|
label: c.label
|
|
1052
1064
|
}, () => [
|
|
1053
1065
|
j(
|
|
1054
1066
|
"span",
|
|
1055
|
-
|
|
1056
|
-
|
|
1067
|
+
No,
|
|
1068
|
+
oe(c.label),
|
|
1057
1069
|
1
|
|
1058
1070
|
/* TEXT */
|
|
1059
1071
|
)
|
|
1060
|
-
], !0) : (
|
|
1072
|
+
], !0) : (y(), P("button", {
|
|
1061
1073
|
key: 1,
|
|
1062
1074
|
tabindex: "-1",
|
|
1063
1075
|
type: "button",
|
|
1064
|
-
class:
|
|
1076
|
+
class: M(["m-select-list-item maz-custom maz-flex-none", [
|
|
1065
1077
|
{
|
|
1066
|
-
"--is-keyboard-selected":
|
|
1078
|
+
"--is-keyboard-selected": g.value === I,
|
|
1067
1079
|
"--is-selected": K(c),
|
|
1068
|
-
"--is-none-value":
|
|
1080
|
+
"--is-none-value": A(c[l.optionValueKey])
|
|
1069
1081
|
}
|
|
1070
1082
|
]]),
|
|
1071
1083
|
style: ee(l.itemHeight ? { height: `${l.itemHeight}px` } : void 0),
|
|
1072
|
-
onClick:
|
|
1084
|
+
onClick: se((B) => Ve(c), ["prevent", "stop"])
|
|
1073
1085
|
}, [
|
|
1074
|
-
l.multiple ? (
|
|
1086
|
+
l.multiple ? (y(), U(k(u), {
|
|
1075
1087
|
key: 0,
|
|
1076
1088
|
tabindex: "-1",
|
|
1077
1089
|
"model-value": K(c),
|
|
1078
1090
|
size: "sm",
|
|
1079
1091
|
color: l.color
|
|
1080
|
-
}, null, 8, ["model-value", "color"])) :
|
|
1081
|
-
z(`
|
|
1082
|
-
@slot Custom option
|
|
1083
|
-
@binding {Object} option - the option object
|
|
1084
|
-
@binding {Boolean} is-selected - if the option is selected
|
|
1085
|
-
`),
|
|
1092
|
+
}, null, 8, ["model-value", "color"])) : E("v-if", !0),
|
|
1086
1093
|
N(l.$slots, "default", {
|
|
1087
1094
|
option: c,
|
|
1088
1095
|
isSelected: K(c)
|
|
@@ -1090,12 +1097,12 @@ const Eo = {
|
|
|
1090
1097
|
j(
|
|
1091
1098
|
"span",
|
|
1092
1099
|
null,
|
|
1093
|
-
|
|
1100
|
+
oe(c[l.optionLabelKey]),
|
|
1094
1101
|
1
|
|
1095
1102
|
/* TEXT */
|
|
1096
1103
|
)
|
|
1097
1104
|
], !0)
|
|
1098
|
-
], 14,
|
|
1105
|
+
], 14, Ko))
|
|
1099
1106
|
],
|
|
1100
1107
|
64
|
|
1101
1108
|
/* STABLE_FRAGMENT */
|
|
@@ -1107,7 +1114,7 @@ const Eo = {
|
|
|
1107
1114
|
],
|
|
1108
1115
|
6
|
|
1109
1116
|
/* CLASS, STYLE */
|
|
1110
|
-
)) :
|
|
1117
|
+
)) : E("v-if", !0)
|
|
1111
1118
|
]),
|
|
1112
1119
|
_: 3
|
|
1113
1120
|
/* FORWARDED */
|
|
@@ -1116,76 +1123,76 @@ const Eo = {
|
|
|
1116
1123
|
6
|
|
1117
1124
|
/* CLASS, STYLE */
|
|
1118
1125
|
)), [
|
|
1119
|
-
[k(
|
|
1120
|
-
exclude: (
|
|
1121
|
-
handler:
|
|
1126
|
+
[k(So), {
|
|
1127
|
+
exclude: (m = l.excludeSelectors) != null && m.length ? l.excludeSelectors : [],
|
|
1128
|
+
handler: ae
|
|
1122
1129
|
}]
|
|
1123
1130
|
]);
|
|
1124
1131
|
};
|
|
1125
1132
|
}
|
|
1126
|
-
}),
|
|
1133
|
+
}), Ho = /* @__PURE__ */ re(Uo, [["__scopeId", "data-v-961aec79"]]);
|
|
1127
1134
|
function Ke() {
|
|
1128
1135
|
if (typeof window > "u")
|
|
1129
1136
|
return;
|
|
1130
|
-
const
|
|
1131
|
-
if (!
|
|
1137
|
+
const a = window.navigator.language;
|
|
1138
|
+
if (!a)
|
|
1132
1139
|
return;
|
|
1133
|
-
let o =
|
|
1134
|
-
return o === "" && (o =
|
|
1140
|
+
let o = a.slice(3, 7).toUpperCase();
|
|
1141
|
+
return o === "" && (o = a.slice(0, 2).toUpperCase()), o === "EN" && (o = "US"), o === "JA" && (o = "JP"), {
|
|
1135
1142
|
locale: o,
|
|
1136
|
-
browserLocale:
|
|
1143
|
+
browserLocale: a
|
|
1137
1144
|
};
|
|
1138
1145
|
}
|
|
1139
1146
|
let ge, $e;
|
|
1140
|
-
function Do(
|
|
1141
|
-
return e != null && e[o] ? e[o] : (($e !==
|
|
1147
|
+
function Do(a, o, e) {
|
|
1148
|
+
return e != null && e[o] ? e[o] : (($e !== a || !ge) && ($e = a, ge = new Intl.DisplayNames([a], { type: "region" })), ge.of(o));
|
|
1142
1149
|
}
|
|
1143
|
-
function
|
|
1150
|
+
function Ro(a, o) {
|
|
1144
1151
|
var r;
|
|
1145
1152
|
const e = [], t = Oe();
|
|
1146
|
-
|
|
1153
|
+
a = a ?? ((r = Ke()) == null ? void 0 : r.browserLocale) ?? "en-US";
|
|
1147
1154
|
for (const u of t) {
|
|
1148
|
-
const
|
|
1149
|
-
if (
|
|
1155
|
+
const v = Do(a, u, o);
|
|
1156
|
+
if (v)
|
|
1150
1157
|
try {
|
|
1151
|
-
const
|
|
1158
|
+
const p = ce(u);
|
|
1152
1159
|
e.push({
|
|
1153
1160
|
iso2: u,
|
|
1154
|
-
dialCode:
|
|
1155
|
-
name:
|
|
1161
|
+
dialCode: p,
|
|
1162
|
+
name: v
|
|
1156
1163
|
});
|
|
1157
|
-
} catch (
|
|
1158
|
-
console.error(`[MazPhoneNumberInput](getCountryCallingCode) ${
|
|
1164
|
+
} catch (p) {
|
|
1165
|
+
console.error(`[MazPhoneNumberInput](getCountryCallingCode) ${p}`);
|
|
1159
1166
|
}
|
|
1160
1167
|
}
|
|
1161
1168
|
return e;
|
|
1162
1169
|
}
|
|
1163
|
-
async function
|
|
1170
|
+
async function qo() {
|
|
1164
1171
|
try {
|
|
1165
|
-
const
|
|
1172
|
+
const a = await fetch("https://ipwho.is"), { country_code: o } = await a.json();
|
|
1166
1173
|
return o;
|
|
1167
|
-
} catch (
|
|
1168
|
-
throw new Error(`[MazPhoneNumberInput](fetchCountryCode) ${
|
|
1174
|
+
} catch (a) {
|
|
1175
|
+
throw new Error(`[MazPhoneNumberInput](fetchCountryCode) ${a}`);
|
|
1169
1176
|
}
|
|
1170
1177
|
}
|
|
1171
|
-
function
|
|
1172
|
-
if (!
|
|
1178
|
+
function jo(a) {
|
|
1179
|
+
if (!a)
|
|
1173
1180
|
return "";
|
|
1174
1181
|
const o = new RegExp(/[^\d ()+-]/g);
|
|
1175
|
-
return
|
|
1182
|
+
return a.replaceAll(o, "").trim();
|
|
1176
1183
|
}
|
|
1177
1184
|
function Ue() {
|
|
1178
1185
|
return {
|
|
1179
|
-
sanitizePhoneNumber:
|
|
1180
|
-
fetchCountryCode:
|
|
1186
|
+
sanitizePhoneNumber: jo,
|
|
1187
|
+
fetchCountryCode: qo,
|
|
1181
1188
|
getBrowserLocale: Ke,
|
|
1182
|
-
getCountriesList:
|
|
1189
|
+
getCountriesList: Ro
|
|
1183
1190
|
};
|
|
1184
1191
|
}
|
|
1185
|
-
const
|
|
1192
|
+
const Yo = ["id"], Wo = {
|
|
1186
1193
|
key: 0,
|
|
1187
1194
|
class: "m-country-selector__select__item__flag-container"
|
|
1188
|
-
},
|
|
1195
|
+
}, Qo = /* @__PURE__ */ ne({
|
|
1189
1196
|
__name: "CountrySelector",
|
|
1190
1197
|
props: {
|
|
1191
1198
|
style: { default: void 0 },
|
|
@@ -1213,34 +1220,34 @@ const Wo = ["id"], Qo = {
|
|
|
1213
1220
|
excludeSelectors: { default: void 0 }
|
|
1214
1221
|
},
|
|
1215
1222
|
emits: ["update:model-value"],
|
|
1216
|
-
setup(
|
|
1217
|
-
const o =
|
|
1223
|
+
setup(a) {
|
|
1224
|
+
const o = a, { phoneNumber: e } = Me("data"), t = L(), { getCountriesList: r } = Ue(), u = h(() => r(o.countryLocale, o.customCountriesList)), v = h(
|
|
1218
1225
|
() => {
|
|
1219
1226
|
var i;
|
|
1220
1227
|
return (i = u.value) == null ? void 0 : i.filter((f) => {
|
|
1221
|
-
var
|
|
1222
|
-
return !((
|
|
1228
|
+
var z;
|
|
1229
|
+
return !((z = o.ignoredCountries) != null && z.includes(f.iso2));
|
|
1223
1230
|
});
|
|
1224
1231
|
}
|
|
1225
|
-
),
|
|
1232
|
+
), p = h(() => {
|
|
1226
1233
|
const i = o.onlyCountries || o.preferredCountries;
|
|
1227
1234
|
return i == null ? void 0 : i.map(
|
|
1228
1235
|
(f) => {
|
|
1229
|
-
var
|
|
1230
|
-
return (
|
|
1236
|
+
var z;
|
|
1237
|
+
return (z = v.value) == null ? void 0 : z.find((w) => w.iso2.includes(f));
|
|
1231
1238
|
}
|
|
1232
1239
|
);
|
|
1233
1240
|
}), O = h(
|
|
1234
1241
|
() => {
|
|
1235
1242
|
var i;
|
|
1236
|
-
return (i =
|
|
1237
|
-
var
|
|
1238
|
-
return !((
|
|
1243
|
+
return (i = v.value) == null ? void 0 : i.filter((f) => {
|
|
1244
|
+
var z;
|
|
1245
|
+
return !((z = o.preferredCountries) != null && z.includes(f.iso2));
|
|
1239
1246
|
});
|
|
1240
1247
|
}
|
|
1241
1248
|
), $ = h(
|
|
1242
|
-
() => o.preferredCountries ? [...
|
|
1243
|
-
),
|
|
1249
|
+
() => o.preferredCountries ? [...p.value ?? [], ...O.value ?? []] : o.onlyCountries ? p.value : v.value
|
|
1250
|
+
), g = h(
|
|
1244
1251
|
() => {
|
|
1245
1252
|
var i;
|
|
1246
1253
|
return (i = $.value) == null ? void 0 : i.map(
|
|
@@ -1248,45 +1255,41 @@ const Wo = ["id"], Qo = {
|
|
|
1248
1255
|
...f,
|
|
1249
1256
|
dialCode: `+${f.dialCode}`
|
|
1250
1257
|
} : void 0
|
|
1251
|
-
).filter(
|
|
1258
|
+
).filter(co);
|
|
1252
1259
|
}
|
|
1253
1260
|
);
|
|
1254
|
-
async function
|
|
1261
|
+
async function V() {
|
|
1255
1262
|
var i, f;
|
|
1256
1263
|
(f = (i = t.value) == null ? void 0 : i.$el.querySelector("input")) == null || f.focus();
|
|
1257
1264
|
}
|
|
1258
|
-
return (i, f) => (
|
|
1265
|
+
return (i, f) => (y(), P(
|
|
1259
1266
|
"div",
|
|
1260
1267
|
{
|
|
1261
|
-
class:
|
|
1268
|
+
class: M(["m-country-selector", [o.class, { "--no-flags": i.noFlags }]]),
|
|
1262
1269
|
style: ee(i.style)
|
|
1263
1270
|
},
|
|
1264
1271
|
[
|
|
1265
|
-
i.modelValue && !i.noFlags ? (
|
|
1272
|
+
i.modelValue && !i.noFlags ? (y(), P("button", {
|
|
1266
1273
|
key: 0,
|
|
1267
1274
|
id: `country-selector-flag-button-${i.id}`,
|
|
1268
|
-
class:
|
|
1275
|
+
class: M(["m-country-selector__country-flag", {
|
|
1269
1276
|
"--should-have-bottom-flag": i.locales.countrySelector.placeholder.length > 0
|
|
1270
1277
|
}]),
|
|
1271
1278
|
tabindex: "-1",
|
|
1272
1279
|
type: "button",
|
|
1273
|
-
onClick:
|
|
1280
|
+
onClick: V
|
|
1274
1281
|
}, [
|
|
1275
|
-
z(`
|
|
1276
|
-
@slot Country selector flag
|
|
1277
|
-
@binding {String} country-code - current selected country code - Ex: \`"FR"\`
|
|
1278
|
-
`),
|
|
1279
1282
|
N(i.$slots, "selector-flag", { countryCode: i.modelValue }, () => [
|
|
1280
|
-
H(
|
|
1281
|
-
src: k(
|
|
1283
|
+
H(Ee, {
|
|
1284
|
+
src: k(Le)(i.modelValue, "h20"),
|
|
1282
1285
|
alt: i.modelValue,
|
|
1283
1286
|
width: "20",
|
|
1284
1287
|
height: "20",
|
|
1285
1288
|
"img-class": "maz-w-5 maz-h-4 maz-rounded-sm"
|
|
1286
1289
|
}, null, 8, ["src", "alt"])
|
|
1287
1290
|
], !0)
|
|
1288
|
-
], 10,
|
|
1289
|
-
H(
|
|
1291
|
+
], 10, Yo)) : E("v-if", !0),
|
|
1292
|
+
H(Ho, te({
|
|
1290
1293
|
id: `country-selector-${i.id}`,
|
|
1291
1294
|
ref_key: "CountrySelectorRef",
|
|
1292
1295
|
ref: t,
|
|
@@ -1308,64 +1311,58 @@ const Wo = ["id"], Qo = {
|
|
|
1308
1311
|
search: !i.noSearch,
|
|
1309
1312
|
"search-placeholder": i.locales.countrySelector.searchPlaceholder,
|
|
1310
1313
|
"search-threshold": i.searchThreshold,
|
|
1311
|
-
options:
|
|
1314
|
+
options: g.value,
|
|
1312
1315
|
hint: k(e) && !i.modelValue ? i.locales.countrySelector.error : void 0,
|
|
1313
1316
|
label: i.locales.countrySelector.placeholder,
|
|
1314
1317
|
style: {
|
|
1315
1318
|
width: i.width
|
|
1316
1319
|
},
|
|
1317
1320
|
"exclude-selectors": [`#country-selector-flag-button-${i.id}`, ...i.excludeSelectors ?? []],
|
|
1318
|
-
"onUpdate:modelValue": f[0] || (f[0] = (
|
|
1321
|
+
"onUpdate:modelValue": f[0] || (f[0] = (z) => i.$emit("update:model-value", z))
|
|
1319
1322
|
}), {
|
|
1320
1323
|
"no-results": G(() => [
|
|
1321
1324
|
N(i.$slots, "no-results", {}, void 0, !0)
|
|
1322
1325
|
]),
|
|
1323
|
-
default: G(({ option:
|
|
1326
|
+
default: G(({ option: z, isSelected: w }) => [
|
|
1324
1327
|
j(
|
|
1325
1328
|
"div",
|
|
1326
1329
|
{
|
|
1327
|
-
class:
|
|
1328
|
-
"m-country-selector__select__item--selected":
|
|
1330
|
+
class: M(["m-country-selector__select__item", {
|
|
1331
|
+
"m-country-selector__select__item--selected": w
|
|
1329
1332
|
}])
|
|
1330
1333
|
},
|
|
1331
1334
|
[
|
|
1332
|
-
!i.noFlags && typeof
|
|
1333
|
-
z(`
|
|
1334
|
-
@slot Country list flag
|
|
1335
|
-
@binding {String} country-code - country code of option - Ex: \`"FR"\`
|
|
1336
|
-
@binding {{ iso2: string; dialCode: string; name: string; }} option - country data
|
|
1337
|
-
@binding {Boolean} is-selected - \`true\` if option is selected
|
|
1338
|
-
`),
|
|
1335
|
+
!i.noFlags && typeof z.iso2 == "string" ? (y(), P("span", Wo, [
|
|
1339
1336
|
N(i.$slots, "country-list-flag", {
|
|
1340
|
-
countryCode:
|
|
1341
|
-
option:
|
|
1342
|
-
isSelected:
|
|
1337
|
+
countryCode: z.iso2,
|
|
1338
|
+
option: z,
|
|
1339
|
+
isSelected: w
|
|
1343
1340
|
}, () => [
|
|
1344
|
-
H(
|
|
1345
|
-
src: k(
|
|
1346
|
-
alt: `${
|
|
1341
|
+
H(Ee, {
|
|
1342
|
+
src: k(Le)(z.iso2, "h20"),
|
|
1343
|
+
alt: `${z.name} flag`,
|
|
1347
1344
|
width: "20",
|
|
1348
1345
|
height: "20",
|
|
1349
1346
|
"img-class": "maz-rounded-full maz-w-5 maz-h-5"
|
|
1350
1347
|
}, null, 8, ["src", "alt"])
|
|
1351
1348
|
], !0)
|
|
1352
|
-
])) :
|
|
1353
|
-
i.showCodeOnList ? (
|
|
1349
|
+
])) : E("v-if", !0),
|
|
1350
|
+
i.showCodeOnList ? (y(), P(
|
|
1354
1351
|
"span",
|
|
1355
1352
|
{
|
|
1356
1353
|
key: 1,
|
|
1357
|
-
class:
|
|
1354
|
+
class: M(["maz-w-9 maz-flex-none", { "maz-text-muted": !w }])
|
|
1358
1355
|
},
|
|
1359
|
-
|
|
1356
|
+
oe(z.dialCode),
|
|
1360
1357
|
3
|
|
1361
1358
|
/* TEXT, CLASS */
|
|
1362
|
-
)) :
|
|
1359
|
+
)) : E("v-if", !0),
|
|
1363
1360
|
j(
|
|
1364
1361
|
"span",
|
|
1365
1362
|
{
|
|
1366
|
-
class:
|
|
1363
|
+
class: M(["maz-flex-1 maz-truncate", { "maz-font-semibold": w }])
|
|
1367
1364
|
},
|
|
1368
|
-
|
|
1365
|
+
oe(z.name),
|
|
1369
1366
|
3
|
|
1370
1367
|
/* TEXT, CLASS */
|
|
1371
1368
|
)
|
|
@@ -1382,7 +1379,7 @@ const Wo = ["id"], Qo = {
|
|
|
1382
1379
|
/* CLASS, STYLE */
|
|
1383
1380
|
));
|
|
1384
1381
|
}
|
|
1385
|
-
}),
|
|
1382
|
+
}), Go = /* @__PURE__ */ re(Qo, [["__scopeId", "data-v-5995516e"]]), Jo = {
|
|
1386
1383
|
countrySelector: {
|
|
1387
1384
|
placeholder: "Country code",
|
|
1388
1385
|
error: "Choose country",
|
|
@@ -1393,25 +1390,25 @@ const Wo = ["id"], Qo = {
|
|
|
1393
1390
|
example: "Example:"
|
|
1394
1391
|
}
|
|
1395
1392
|
};
|
|
1396
|
-
function
|
|
1393
|
+
function Zo(a) {
|
|
1397
1394
|
try {
|
|
1398
|
-
const o =
|
|
1399
|
-
return o || (console.error(`[maz-ui](MazPhoneNumberInput) The code country "${
|
|
1395
|
+
const o = no(a);
|
|
1396
|
+
return o || (console.error(`[maz-ui](MazPhoneNumberInput) The code country "${a}" is not available`), !1);
|
|
1400
1397
|
} catch (o) {
|
|
1401
1398
|
return console.error(`[maz-ui](MazPhoneNumberInput) ${o}`), !1;
|
|
1402
1399
|
}
|
|
1403
1400
|
}
|
|
1404
|
-
function
|
|
1405
|
-
phoneNumber:
|
|
1401
|
+
function Xo({
|
|
1402
|
+
phoneNumber: a,
|
|
1406
1403
|
countryCode: o
|
|
1407
1404
|
}) {
|
|
1408
1405
|
try {
|
|
1409
|
-
if (!
|
|
1406
|
+
if (!a)
|
|
1410
1407
|
return {
|
|
1411
1408
|
isValid: !1,
|
|
1412
1409
|
countryCode: o
|
|
1413
1410
|
};
|
|
1414
|
-
const e =
|
|
1411
|
+
const e = ro(a, o);
|
|
1415
1412
|
return {
|
|
1416
1413
|
countryCode: (e == null ? void 0 : e.country) ?? o,
|
|
1417
1414
|
isValid: (e == null ? void 0 : e.isValid()) ?? !1,
|
|
@@ -1424,49 +1421,49 @@ function xo({
|
|
|
1424
1421
|
uri: e == null ? void 0 : e.getURI(),
|
|
1425
1422
|
e164: e == null ? void 0 : e.format("E.164"),
|
|
1426
1423
|
rfc3966: e == null ? void 0 : e.format("RFC3966"),
|
|
1427
|
-
phoneNumber:
|
|
1424
|
+
phoneNumber: a
|
|
1428
1425
|
};
|
|
1429
1426
|
} catch (e) {
|
|
1430
1427
|
throw new Error(`[MazPhoneNumberInput](getResultsFromPhoneNumber) ${e}`);
|
|
1431
1428
|
}
|
|
1432
1429
|
}
|
|
1433
|
-
function
|
|
1430
|
+
function xo(a, o) {
|
|
1434
1431
|
try {
|
|
1435
|
-
return o ? new
|
|
1432
|
+
return o ? new io(a).input(o) : "";
|
|
1436
1433
|
} catch (e) {
|
|
1437
1434
|
throw new Error(`[MazPhoneNumberInput](getAsYouTypeFormat) ${e}`);
|
|
1438
1435
|
}
|
|
1439
1436
|
}
|
|
1440
|
-
async function
|
|
1441
|
-
const { default:
|
|
1442
|
-
return
|
|
1437
|
+
async function _o() {
|
|
1438
|
+
const { default: a } = await import("./examples.mobile.json-JpNGylGv.mjs");
|
|
1439
|
+
return a;
|
|
1443
1440
|
}
|
|
1444
|
-
function
|
|
1441
|
+
function et(a, o) {
|
|
1445
1442
|
var e;
|
|
1446
1443
|
try {
|
|
1447
|
-
return
|
|
1444
|
+
return a && o ? (e = uo(o, a)) == null ? void 0 : e.formatNational() : void 0;
|
|
1448
1445
|
} catch (t) {
|
|
1449
1446
|
console.error(`[maz-ui](MazPhoneNumberInput) ${t}`);
|
|
1450
1447
|
}
|
|
1451
1448
|
}
|
|
1452
1449
|
function He() {
|
|
1453
|
-
function
|
|
1450
|
+
function a(o, e) {
|
|
1454
1451
|
return ce(o) === ce(e);
|
|
1455
1452
|
}
|
|
1456
1453
|
return {
|
|
1457
|
-
getAsYouTypeFormat:
|
|
1458
|
-
getPhoneNumberResults:
|
|
1459
|
-
getPhoneNumberExamplesFile:
|
|
1460
|
-
getPhoneNumberExample:
|
|
1461
|
-
isSameCountryCallingCode:
|
|
1462
|
-
isCountryAvailable:
|
|
1454
|
+
getAsYouTypeFormat: xo,
|
|
1455
|
+
getPhoneNumberResults: Xo,
|
|
1456
|
+
getPhoneNumberExamplesFile: _o,
|
|
1457
|
+
getPhoneNumberExample: et,
|
|
1458
|
+
isSameCountryCallingCode: a,
|
|
1459
|
+
isCountryAvailable: Zo,
|
|
1463
1460
|
getCountries: Oe,
|
|
1464
1461
|
getCountryCallingCode: ce
|
|
1465
1462
|
};
|
|
1466
1463
|
}
|
|
1467
|
-
const
|
|
1464
|
+
const ot = /* @__PURE__ */ ne({
|
|
1468
1465
|
__name: "PhoneInput",
|
|
1469
|
-
props: /* @__PURE__ */
|
|
1466
|
+
props: /* @__PURE__ */ Pe({
|
|
1470
1467
|
id: {},
|
|
1471
1468
|
color: {},
|
|
1472
1469
|
size: {},
|
|
@@ -1484,71 +1481,71 @@ const tt = /* @__PURE__ */ se({
|
|
|
1484
1481
|
modelValue: {},
|
|
1485
1482
|
modelModifiers: {}
|
|
1486
1483
|
}),
|
|
1487
|
-
emits: /* @__PURE__ */
|
|
1488
|
-
setup(
|
|
1489
|
-
const e =
|
|
1490
|
-
function i(
|
|
1491
|
-
const C =
|
|
1484
|
+
emits: /* @__PURE__ */ Pe(["update:model-value"], ["update:modelValue"]),
|
|
1485
|
+
setup(a, { emit: o }) {
|
|
1486
|
+
const e = a, t = o, r = ao(a, "modelValue"), { getPhoneNumberExamplesFile: u, getPhoneNumberExample: v } = He(), { selectionRange: p, results: O, selectedCountry: $ } = Me("data"), g = L(), V = L(!1);
|
|
1487
|
+
function i(b, S) {
|
|
1488
|
+
const C = v(b, S);
|
|
1492
1489
|
return C ? `${e.locales.phoneInput.example} ${C}` : void 0;
|
|
1493
1490
|
}
|
|
1494
1491
|
const f = h(() => {
|
|
1495
|
-
var
|
|
1492
|
+
var S;
|
|
1496
1493
|
if (e.label || e.placeholder)
|
|
1497
1494
|
return e.label || e.placeholder;
|
|
1498
|
-
const
|
|
1499
|
-
if (e.noExample || !
|
|
1500
|
-
return
|
|
1495
|
+
const b = e.locales.phoneInput.placeholder;
|
|
1496
|
+
if (e.noExample || !g.value)
|
|
1497
|
+
return b;
|
|
1501
1498
|
{
|
|
1502
|
-
const C = i(
|
|
1503
|
-
return (
|
|
1499
|
+
const C = i(g.value, $.value);
|
|
1500
|
+
return (S = O.value) != null && S.isValid || !C ? b : C;
|
|
1504
1501
|
}
|
|
1505
|
-
}),
|
|
1502
|
+
}), z = h(() => e.placeholder ? {
|
|
1506
1503
|
placeholder: f.value
|
|
1507
1504
|
} : {
|
|
1508
1505
|
label: f.value
|
|
1509
|
-
}),
|
|
1510
|
-
async function
|
|
1506
|
+
}), w = L();
|
|
1507
|
+
async function D() {
|
|
1511
1508
|
try {
|
|
1512
|
-
if (
|
|
1509
|
+
if (g.value)
|
|
1513
1510
|
return;
|
|
1514
|
-
|
|
1515
|
-
} catch (
|
|
1516
|
-
console.error("[maz-ui](MazPhoneNumberInput) while loading phone number examples file",
|
|
1511
|
+
g.value = await u();
|
|
1512
|
+
} catch (b) {
|
|
1513
|
+
console.error("[maz-ui](MazPhoneNumberInput) while loading phone number examples file", b);
|
|
1517
1514
|
}
|
|
1518
1515
|
}
|
|
1519
|
-
async function Y(
|
|
1520
|
-
|
|
1516
|
+
async function Y(b) {
|
|
1517
|
+
w.value && b && J(w.value, b), await ue(), t("update:model-value", b);
|
|
1521
1518
|
}
|
|
1522
|
-
function J(
|
|
1523
|
-
const C =
|
|
1524
|
-
|
|
1519
|
+
function J(b, S) {
|
|
1520
|
+
const C = b.$el.querySelector("input");
|
|
1521
|
+
p.value.start = C == null ? void 0 : C.selectionStart, p.value.end = C == null ? void 0 : C.selectionEnd, p.value.cursorAtEnd = S && typeof p.value.start == "number" && S.length > 0 ? p.value.start >= S.length : !0;
|
|
1525
1522
|
}
|
|
1526
1523
|
return Ie(() => {
|
|
1527
|
-
e.noExample ||
|
|
1528
|
-
}), (
|
|
1529
|
-
id:
|
|
1524
|
+
e.noExample || D();
|
|
1525
|
+
}), (b, S) => (y(), U(Ce, te({
|
|
1526
|
+
id: b.id,
|
|
1530
1527
|
ref_key: "PhoneInputRef",
|
|
1531
|
-
ref:
|
|
1528
|
+
ref: w,
|
|
1532
1529
|
"model-value": r.value
|
|
1533
|
-
}, { ...
|
|
1534
|
-
disabled:
|
|
1535
|
-
color:
|
|
1536
|
-
error:
|
|
1537
|
-
size:
|
|
1538
|
-
success:
|
|
1530
|
+
}, { ...b.$attrs, ...z.value }, {
|
|
1531
|
+
disabled: b.disabled,
|
|
1532
|
+
color: b.color,
|
|
1533
|
+
error: b.error,
|
|
1534
|
+
size: b.size,
|
|
1535
|
+
success: b.success,
|
|
1539
1536
|
class: ["m-phone-input", [
|
|
1540
1537
|
{
|
|
1541
|
-
"--border-radius":
|
|
1542
|
-
"--error":
|
|
1543
|
-
"--focused":
|
|
1538
|
+
"--border-radius": b.hasRadius,
|
|
1539
|
+
"--error": b.error || !k(O).isValid,
|
|
1540
|
+
"--focused": V.value
|
|
1544
1541
|
}
|
|
1545
1542
|
]],
|
|
1546
|
-
onFocus:
|
|
1547
|
-
onBlur:
|
|
1548
|
-
"onUpdate:modelValue":
|
|
1543
|
+
onFocus: S[0] || (S[0] = (C) => V.value = !0),
|
|
1544
|
+
onBlur: S[1] || (S[1] = (C) => V.value = !1),
|
|
1545
|
+
"onUpdate:modelValue": S[2] || (S[2] = (C) => Y(C))
|
|
1549
1546
|
}), null, 16, ["id", "model-value", "disabled", "color", "error", "size", "success", "class"]));
|
|
1550
1547
|
}
|
|
1551
|
-
}),
|
|
1548
|
+
}), tt = /* @__PURE__ */ re(ot, [["__scopeId", "data-v-ebe8f08f"]]), lt = /* @__PURE__ */ ne({
|
|
1552
1549
|
name: "MazPhoneNumberInput",
|
|
1553
1550
|
inheritAttrs: !1,
|
|
1554
1551
|
__name: "MazPhoneNumberInput",
|
|
@@ -1602,73 +1599,73 @@ const tt = /* @__PURE__ */ se({
|
|
|
1602
1599
|
}) }
|
|
1603
1600
|
},
|
|
1604
1601
|
emits: ["update:model-value", "country-code", "update:country-code", "update", "data"],
|
|
1605
|
-
setup(
|
|
1606
|
-
const e =
|
|
1602
|
+
setup(a, { emit: o }) {
|
|
1603
|
+
const e = a, t = o, { fetchCountryCode: r, sanitizePhoneNumber: u, getBrowserLocale: v } = Ue(), { isCountryAvailable: p, getPhoneNumberResults: O, getAsYouTypeFormat: $ } = He(), g = Ae({
|
|
1607
1604
|
componentName: "MazPhoneNumberInput",
|
|
1608
1605
|
providedId: e.id
|
|
1609
|
-
}),
|
|
1606
|
+
}), V = L(""), i = L(), f = L({
|
|
1610
1607
|
isValid: !1,
|
|
1611
1608
|
countryCode: void 0
|
|
1612
|
-
}),
|
|
1609
|
+
}), z = L(), w = L({
|
|
1613
1610
|
start: 0,
|
|
1614
1611
|
end: 0,
|
|
1615
1612
|
cursorAtEnd: !0
|
|
1616
1613
|
});
|
|
1617
1614
|
so("data", {
|
|
1618
1615
|
selectedCountry: i,
|
|
1619
|
-
phoneNumber:
|
|
1616
|
+
phoneNumber: V,
|
|
1620
1617
|
results: f,
|
|
1621
|
-
selectionRange:
|
|
1618
|
+
selectionRange: w
|
|
1622
1619
|
});
|
|
1623
|
-
const
|
|
1624
|
-
...
|
|
1620
|
+
const D = h(() => ({
|
|
1621
|
+
...Jo,
|
|
1625
1622
|
...e.translations
|
|
1626
1623
|
}));
|
|
1627
1624
|
Ie(async () => {
|
|
1628
|
-
var
|
|
1625
|
+
var n;
|
|
1629
1626
|
if (C(e.countryCode ?? e.defaultCountryCode), e.fetchCountry && !i.value) {
|
|
1630
|
-
const
|
|
1631
|
-
C(
|
|
1627
|
+
const A = await r();
|
|
1628
|
+
C(A);
|
|
1632
1629
|
}
|
|
1633
1630
|
if (!e.defaultCountryCode && !e.noUseBrowserLocale && !i.value) {
|
|
1634
|
-
const
|
|
1635
|
-
C(
|
|
1631
|
+
const A = (n = v()) == null ? void 0 : n.locale;
|
|
1632
|
+
C(A);
|
|
1636
1633
|
}
|
|
1637
1634
|
});
|
|
1638
|
-
const Y =
|
|
1635
|
+
const Y = L();
|
|
1639
1636
|
function J() {
|
|
1640
|
-
var
|
|
1641
|
-
return (
|
|
1637
|
+
var n;
|
|
1638
|
+
return (n = Y.value) == null ? void 0 : n.$el.querySelector("input");
|
|
1642
1639
|
}
|
|
1643
|
-
async function
|
|
1644
|
-
var
|
|
1645
|
-
await
|
|
1640
|
+
async function b() {
|
|
1641
|
+
var n;
|
|
1642
|
+
await ue(), (n = J()) == null || n.select();
|
|
1646
1643
|
}
|
|
1647
|
-
function
|
|
1644
|
+
function S(n) {
|
|
1648
1645
|
Z({
|
|
1649
|
-
countryCode:
|
|
1650
|
-
}),
|
|
1646
|
+
countryCode: n
|
|
1647
|
+
}), b();
|
|
1651
1648
|
}
|
|
1652
|
-
function C(
|
|
1653
|
-
if (
|
|
1654
|
-
if (!
|
|
1649
|
+
function C(n) {
|
|
1650
|
+
if (n) {
|
|
1651
|
+
if (!p(n)) {
|
|
1655
1652
|
i.value = void 0;
|
|
1656
1653
|
return;
|
|
1657
1654
|
}
|
|
1658
|
-
i.value =
|
|
1655
|
+
i.value = n;
|
|
1659
1656
|
}
|
|
1660
1657
|
}
|
|
1661
1658
|
function W({
|
|
1662
|
-
newPhoneNumber:
|
|
1663
|
-
updateResults:
|
|
1659
|
+
newPhoneNumber: n,
|
|
1660
|
+
updateResults: A = !0
|
|
1664
1661
|
}) {
|
|
1665
|
-
const K = u(
|
|
1666
|
-
if (
|
|
1662
|
+
const K = u(n);
|
|
1663
|
+
if (A && (f.value = O({
|
|
1667
1664
|
phoneNumber: K,
|
|
1668
1665
|
countryCode: i.value
|
|
1669
|
-
})),
|
|
1670
|
-
const
|
|
1671
|
-
|
|
1666
|
+
})), w.value.cursorAtEnd && !e.noFormattingAsYouType && e.autoFormat) {
|
|
1667
|
+
const F = f.value.isValid ? f.value.formatNational : K;
|
|
1668
|
+
z.value = $(i.value, F), V.value = z.value;
|
|
1672
1669
|
}
|
|
1673
1670
|
f.value.countryCode && f.value.countryCode !== i.value && Z({
|
|
1674
1671
|
countryCode: f.value.countryCode,
|
|
@@ -1676,26 +1673,26 @@ const tt = /* @__PURE__ */ se({
|
|
|
1676
1673
|
});
|
|
1677
1674
|
}
|
|
1678
1675
|
function Z({
|
|
1679
|
-
countryCode:
|
|
1680
|
-
updateResults:
|
|
1676
|
+
countryCode: n,
|
|
1677
|
+
updateResults: A = !0
|
|
1681
1678
|
}) {
|
|
1682
|
-
if (!
|
|
1679
|
+
if (!n) {
|
|
1683
1680
|
i.value = void 0;
|
|
1684
1681
|
return;
|
|
1685
1682
|
}
|
|
1686
|
-
|
|
1687
|
-
phoneNumber:
|
|
1688
|
-
countryCode:
|
|
1683
|
+
n !== i.value && C(n), A && (f.value = O({
|
|
1684
|
+
phoneNumber: V.value,
|
|
1685
|
+
countryCode: n
|
|
1689
1686
|
})), W({
|
|
1690
|
-
newPhoneNumber:
|
|
1687
|
+
newPhoneNumber: V.value,
|
|
1691
1688
|
updateResults: !1
|
|
1692
1689
|
});
|
|
1693
1690
|
}
|
|
1694
1691
|
return he(
|
|
1695
1692
|
() => e.modelValue ?? e.defaultPhoneNumber,
|
|
1696
|
-
(
|
|
1697
|
-
|
|
1698
|
-
newPhoneNumber:
|
|
1693
|
+
(n, A) => {
|
|
1694
|
+
n !== A && n !== V.value && W({
|
|
1695
|
+
newPhoneNumber: n
|
|
1699
1696
|
});
|
|
1700
1697
|
},
|
|
1701
1698
|
{
|
|
@@ -1703,9 +1700,9 @@ const tt = /* @__PURE__ */ se({
|
|
|
1703
1700
|
}
|
|
1704
1701
|
), he(
|
|
1705
1702
|
() => e.countryCode ?? e.defaultCountryCode,
|
|
1706
|
-
(
|
|
1707
|
-
|
|
1708
|
-
countryCode:
|
|
1703
|
+
(n, A) => {
|
|
1704
|
+
n && n !== A && n !== i.value && Z({
|
|
1705
|
+
countryCode: n
|
|
1709
1706
|
});
|
|
1710
1707
|
},
|
|
1711
1708
|
{
|
|
@@ -1713,98 +1710,85 @@ const tt = /* @__PURE__ */ se({
|
|
|
1713
1710
|
}
|
|
1714
1711
|
), he(
|
|
1715
1712
|
f,
|
|
1716
|
-
(
|
|
1717
|
-
t("update",
|
|
1713
|
+
(n) => {
|
|
1714
|
+
t("update", n), t("data", n), n.e164 && n.isValid ? t("update:model-value", n.e164) : t("update:model-value", V.value), t("country-code", i.value), t("update:country-code", i.value);
|
|
1718
1715
|
},
|
|
1719
1716
|
{
|
|
1720
1717
|
immediate: !0
|
|
1721
1718
|
}
|
|
1722
|
-
), (
|
|
1719
|
+
), (n, A) => {
|
|
1723
1720
|
var K;
|
|
1724
|
-
return
|
|
1721
|
+
return y(), P(
|
|
1725
1722
|
"div",
|
|
1726
1723
|
{
|
|
1727
|
-
class:
|
|
1728
|
-
style: ee(
|
|
1724
|
+
class: M(["m-phone-number-input", [e.class, { "--block": n.block }, n.orientation ? `--${n.orientation}` : void 0]]),
|
|
1725
|
+
style: ee(n.style)
|
|
1729
1726
|
},
|
|
1730
1727
|
[
|
|
1731
|
-
|
|
1728
|
+
n.noCountrySelector ? E("v-if", !0) : (y(), U(Go, te({
|
|
1732
1729
|
key: 0,
|
|
1733
|
-
id: k(
|
|
1734
|
-
},
|
|
1730
|
+
id: k(g)
|
|
1731
|
+
}, n.countrySelectAttributes, {
|
|
1735
1732
|
"model-value": i.value,
|
|
1736
|
-
color:
|
|
1737
|
-
size:
|
|
1738
|
-
"country-locale":
|
|
1739
|
-
"country-selector-display-name":
|
|
1740
|
-
"custom-countries-list":
|
|
1741
|
-
"ignored-countries":
|
|
1742
|
-
"list-position":
|
|
1743
|
-
"no-flags":
|
|
1744
|
-
"no-search":
|
|
1745
|
-
"exclude-selectors":
|
|
1746
|
-
error:
|
|
1747
|
-
success:
|
|
1748
|
-
locales:
|
|
1749
|
-
disabled:
|
|
1750
|
-
"search-threshold":
|
|
1751
|
-
"show-code-on-list":
|
|
1752
|
-
"only-countries":
|
|
1753
|
-
"preferred-countries":
|
|
1754
|
-
width:
|
|
1755
|
-
"onUpdate:modelValue":
|
|
1733
|
+
color: n.color,
|
|
1734
|
+
size: n.size,
|
|
1735
|
+
"country-locale": n.countryLocale,
|
|
1736
|
+
"country-selector-display-name": n.countrySelectorDisplayName,
|
|
1737
|
+
"custom-countries-list": n.customCountriesList,
|
|
1738
|
+
"ignored-countries": n.ignoredCountries,
|
|
1739
|
+
"list-position": n.listPosition,
|
|
1740
|
+
"no-flags": n.noFlags,
|
|
1741
|
+
"no-search": n.noSearch,
|
|
1742
|
+
"exclude-selectors": n.excludeSelectors,
|
|
1743
|
+
error: n.error || (n.noValidationError ? !1 : !!V.value && !i.value),
|
|
1744
|
+
success: n.success || (n.noValidationSuccess ? !1 : (K = f.value) == null ? void 0 : K.isValid),
|
|
1745
|
+
locales: D.value,
|
|
1746
|
+
disabled: n.disabled,
|
|
1747
|
+
"search-threshold": n.searchThreshold,
|
|
1748
|
+
"show-code-on-list": n.showCodeOnList,
|
|
1749
|
+
"only-countries": n.onlyCountries,
|
|
1750
|
+
"preferred-countries": n.preferredCountries,
|
|
1751
|
+
width: n.countrySelectorWidth,
|
|
1752
|
+
"onUpdate:modelValue": S
|
|
1756
1753
|
}), {
|
|
1757
1754
|
"no-results": G(() => [
|
|
1758
|
-
|
|
1759
|
-
@slot Replace the "no results" icon in the country selector list
|
|
1760
|
-
`),
|
|
1761
|
-
N(a.$slots, "no-results", {}, void 0, !0)
|
|
1755
|
+
N(n.$slots, "no-results", {}, void 0, !0)
|
|
1762
1756
|
]),
|
|
1763
|
-
"selector-flag": G(({ countryCode:
|
|
1764
|
-
|
|
1765
|
-
@slot Country selector flag
|
|
1766
|
-
@binding {String} country-code - current selected country code - Ex: \`"FR"\`
|
|
1767
|
-
`),
|
|
1768
|
-
N(a.$slots, "selector-flag", { countryCode: T }, void 0, !0)
|
|
1757
|
+
"selector-flag": G(({ countryCode: F }) => [
|
|
1758
|
+
N(n.$slots, "selector-flag", { countryCode: F }, void 0, !0)
|
|
1769
1759
|
]),
|
|
1770
|
-
"country-list-flag": G(({ isSelected:
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
@binding {Boolean} is-selected - \`true\` if option is selected
|
|
1776
|
-
`),
|
|
1777
|
-
N(a.$slots, "country-list-flag", {
|
|
1778
|
-
countryCode: te.iso2,
|
|
1779
|
-
option: te,
|
|
1780
|
-
isSelected: T
|
|
1760
|
+
"country-list-flag": G(({ isSelected: F, option: le }) => [
|
|
1761
|
+
N(n.$slots, "country-list-flag", {
|
|
1762
|
+
countryCode: le.iso2,
|
|
1763
|
+
option: le,
|
|
1764
|
+
isSelected: F
|
|
1781
1765
|
}, void 0, !0)
|
|
1782
1766
|
]),
|
|
1783
1767
|
_: 3
|
|
1784
1768
|
/* FORWARDED */
|
|
1785
1769
|
}, 16, ["id", "model-value", "color", "size", "country-locale", "country-selector-display-name", "custom-countries-list", "ignored-countries", "list-position", "no-flags", "no-search", "exclude-selectors", "error", "success", "locales", "disabled", "search-threshold", "show-code-on-list", "only-countries", "preferred-countries", "width"])),
|
|
1786
|
-
H(
|
|
1787
|
-
id: k(
|
|
1770
|
+
H(tt, te({
|
|
1771
|
+
id: k(g),
|
|
1788
1772
|
ref_key: "PhoneInputRef",
|
|
1789
1773
|
ref: Y,
|
|
1790
|
-
modelValue:
|
|
1791
|
-
"onUpdate:modelValue":
|
|
1792
|
-
}, { ...
|
|
1793
|
-
color:
|
|
1794
|
-
size:
|
|
1795
|
-
"no-example":
|
|
1774
|
+
modelValue: V.value,
|
|
1775
|
+
"onUpdate:modelValue": A[0] || (A[0] = (F) => V.value = F)
|
|
1776
|
+
}, { ...n.$attrs, ...n.phoneInputAttributes }, {
|
|
1777
|
+
color: n.color,
|
|
1778
|
+
size: n.size,
|
|
1779
|
+
"no-example": n.noExample,
|
|
1796
1780
|
block: "",
|
|
1797
|
-
disabled:
|
|
1798
|
-
"has-radius": !
|
|
1799
|
-
success:
|
|
1800
|
-
error:
|
|
1801
|
-
locales:
|
|
1802
|
-
"no-formatting-as-you-type":
|
|
1803
|
-
"auto-format":
|
|
1804
|
-
label:
|
|
1805
|
-
placeholder:
|
|
1806
|
-
"onUpdate:modelValue":
|
|
1807
|
-
newPhoneNumber:
|
|
1781
|
+
disabled: n.disabled,
|
|
1782
|
+
"has-radius": !n.noCountrySelector,
|
|
1783
|
+
success: n.success || (n.noValidationSuccess ? !1 : f.value.isValid),
|
|
1784
|
+
error: n.error || (n.noValidationError ? !1 : !!V.value && !f.value.isValid),
|
|
1785
|
+
locales: D.value,
|
|
1786
|
+
"no-formatting-as-you-type": n.noFormattingAsYouType,
|
|
1787
|
+
"auto-format": n.autoFormat,
|
|
1788
|
+
label: n.label,
|
|
1789
|
+
placeholder: n.placeholder,
|
|
1790
|
+
"onUpdate:modelValue": A[1] || (A[1] = (F) => W({
|
|
1791
|
+
newPhoneNumber: F
|
|
1808
1792
|
}))
|
|
1809
1793
|
}), null, 16, ["id", "modelValue", "color", "size", "no-example", "disabled", "has-radius", "success", "error", "locales", "no-formatting-as-you-type", "auto-format", "label", "placeholder"])
|
|
1810
1794
|
],
|
|
@@ -1813,9 +1797,9 @@ const tt = /* @__PURE__ */ se({
|
|
|
1813
1797
|
);
|
|
1814
1798
|
};
|
|
1815
1799
|
}
|
|
1816
|
-
}),
|
|
1800
|
+
}), rt = /* @__PURE__ */ re(lt, [["__scopeId", "data-v-420d6d4a"]]);
|
|
1817
1801
|
export {
|
|
1818
|
-
|
|
1802
|
+
rt as M,
|
|
1819
1803
|
re as _,
|
|
1820
1804
|
Me as i,
|
|
1821
1805
|
Ae as u
|