maz-ui 3.47.2-beta.2 → 3.47.2-beta.20
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 +90 -98
- package/components/MazAnimatedCounter.d.ts +16 -32
- package/components/MazAnimatedCounter.mjs +26 -26
- package/components/MazAvatar.d.ts +2 -1
- package/components/MazAvatar.mjs +1 -1
- package/components/MazBackdrop.d.ts +23 -14
- package/components/MazBackdrop.mjs +107 -82
- package/components/MazBadge.d.ts +7 -2
- package/components/MazBadge.mjs +1 -1
- package/components/MazBottomSheet.d.ts +13 -25
- 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/MazCheckbox.d.ts +4 -3
- package/components/MazCheckbox.mjs +86 -83
- package/components/MazChecklist.d.ts +2 -5
- package/components/MazChecklist.mjs +1 -1
- package/components/MazCircularProgressBar.d.ts +31 -60
- package/components/MazCircularProgressBar.mjs +76 -74
- package/components/MazDialog.d.ts +24 -33
- package/components/MazDialog.mjs +1 -1
- package/components/MazDialogPromise.d.ts +3 -3
- package/components/MazDialogPromise.mjs +1 -1
- package/components/MazDrawer.d.ts +9 -5
- package/components/MazDrawer.mjs +2 -194
- package/components/MazDropdown.d.ts +25 -3
- package/components/MazDropdown.mjs +2 -325
- package/components/MazDropzone.d.ts +1 -1
- package/components/MazExpandAnimation.d.ts +6 -5
- package/components/MazExpandAnimation.mjs +22 -25
- package/components/MazFullscreenLoader.d.ts +2 -1
- package/components/MazFullscreenLoader.mjs +7 -7
- 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 +36 -39
- 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 +1 -1
- 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 +31 -55
- package/components/MazPhoneNumberInput/PhoneInput.vue.d.ts +5 -5
- package/components/MazPhoneNumberInput/types.d.ts +2 -1
- package/components/MazPhoneNumberInput/{use-libphonenumber.d.ts → useLibphonenumber.d.ts} +4 -4
- package/components/MazPhoneNumberInput/{use-maz-phone-number-input.d.ts → useMazPhoneNumberInput.d.ts} +1 -1
- package/components/MazPhoneNumberInput.d.ts +69 -25
- 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 +31 -37
- package/components/MazRadioButtons.d.ts +1 -1
- package/components/MazReadingProgressBar.d.ts +1 -1
- package/components/MazSelect.d.ts +2 -2
- package/components/MazSelect.mjs +1 -1
- package/components/MazSlider.d.ts +1 -1
- 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 +29 -33
- package/components/MazTable.d.ts +8 -2
- 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 +11 -11
- package/components/MazTextarea.d.ts +58 -32
- package/components/MazTextarea.mjs +128 -109
- 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/MazBackdrop.css +1 -1
- package/components/assets/MazBadge.css +1 -1
- package/components/assets/MazBottomSheet.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/MazDialog.css +1 -1
- package/components/assets/MazDialogPromise.css +1 -1
- package/components/assets/MazDrawer.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/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/MazTabsContentItem.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-CqppWg2j.mjs → MazBadge-DCzaExPj.mjs} +2 -2
- package/components/chunks/MazBottomSheet-DGsGO0zo.mjs +224 -0
- package/components/chunks/MazBtn-B5ioqwkK.mjs +103 -0
- package/components/chunks/MazBtn-BS2kvd1Z.mjs +103 -0
- package/components/chunks/MazBtn-BVWOyFm-.mjs +103 -0
- package/components/chunks/MazBtn-BrfhtojY.mjs +103 -0
- package/components/chunks/MazBtn-C4nwxs9T.mjs +103 -0
- package/components/chunks/MazBtn-C60T0UDa.mjs +103 -0
- package/components/chunks/MazBtn-CElHmZjv.mjs +103 -0
- package/components/chunks/MazBtn-CM-xSnA5.mjs +108 -0
- package/components/chunks/MazBtn-CsLtHm4K.mjs +103 -0
- package/components/chunks/MazBtn-D1jMqwE1.mjs +103 -0
- package/components/chunks/MazBtn-D4NOcykx.mjs +103 -0
- package/components/chunks/MazBtn-Db6ai-Mv.mjs +103 -0
- package/components/chunks/MazBtn-ZAcYNusG.mjs +103 -0
- package/components/chunks/MazBtn-oZhhJy09.mjs +103 -0
- package/components/chunks/{MazCard-BYB8y1_u.mjs → MazCard-98OuVlyK.mjs} +1 -1
- package/components/chunks/{MazCarousel-DccWVW8H.mjs → MazCarousel-COTaKhKF.mjs} +1 -1
- package/components/chunks/{MazCheckbox-DMogZVHl.mjs → MazCheckbox-B5ZcWc3y.mjs} +63 -59
- package/components/chunks/{MazCheckbox-B22OcHt8.mjs → MazCheckbox-BDPgDiU3.mjs} +63 -59
- package/components/chunks/{MazCheckbox-Db6sPUbV.mjs → MazCheckbox-BeLByOEa.mjs} +64 -60
- package/components/chunks/{MazChecklist-C95Y4Hb-.mjs → MazChecklist-BurPprmw.mjs} +110 -111
- package/components/chunks/MazDialog-Ca3jJ12T.mjs +297 -0
- package/components/chunks/MazDialogPromise-DOnmLhui.mjs +551 -0
- package/components/chunks/MazDrawer-Bas9dy0D.mjs +226 -0
- package/components/chunks/MazDropdown-0r445NfW.mjs +426 -0
- package/components/chunks/MazExpandAnimation-Bdf0-L85.mjs +54 -0
- package/components/chunks/{MazGallery-VTZUhBKC.mjs → MazGallery-r8SBTCgJ.mjs} +42 -45
- package/components/chunks/{MazGallery-CXQiXWFr.mjs → MazGallery-xPp1apvO.mjs} +94 -97
- package/components/chunks/MazIcon-BoTByt7n.mjs +4 -0
- package/components/chunks/{MazIcon-DjMuw8Bz.mjs → MazIcon-C-aPrqx2.mjs} +4 -3
- package/components/chunks/{MazIcon-BF5TFzse.mjs → MazIcon-CaXpmvN2.mjs} +4 -3
- package/components/chunks/{MazIcon-BbvBov5G.mjs → MazIcon-_hN-Kivn.mjs} +14 -13
- package/components/chunks/MazInput-BT-mbJfZ.mjs +313 -0
- package/components/chunks/MazInput-BTIdtLkD.mjs +314 -0
- package/components/chunks/MazInput-BfWJoPre.mjs +324 -0
- package/components/chunks/MazInputNumber-R0RzDeyD.mjs +600 -0
- package/components/chunks/{MazInputPrice-DoTnDDIN.mjs → MazInputPrice-CKSdqO4X.mjs} +200 -169
- package/components/chunks/{MazInputTags-Dj3sW-e5.mjs → MazInputTags-D6jQ2-Ia.mjs} +248 -220
- package/components/chunks/{MazLazyImg-C03sUOXs.mjs → MazLazyImg-DQLwaKKz.mjs} +2 -2
- package/components/chunks/{MazLink-C_3Wya94.mjs → MazLink-tud3eDgU.mjs} +1 -1
- package/components/chunks/MazLoadingBar-D3pDBJSb.mjs +36 -0
- package/components/chunks/MazPagination-BSu0Ifkp.mjs +327 -0
- package/components/chunks/{MazPhoneNumberInput-BbssOUzo.mjs → MazPhoneNumberInput-DibUhBpk.mjs} +762 -731
- package/components/chunks/MazPicker-CwiuW5Pv.mjs +2486 -0
- package/components/chunks/{MazPickerMonthSwitcher-CmFFQoPA.mjs → MazPickerMonthSwitcher-C65el7R0.mjs} +1 -1
- package/components/chunks/{MazPickerShortcuts-DaELz7aq.mjs → MazPickerShortcuts-DbrOoszH.mjs} +1 -1
- package/components/chunks/{MazPickerYearSwitcher-m1_KXnpA.mjs → MazPickerYearSwitcher-D9lqntyR.mjs} +1 -1
- package/components/chunks/MazSelect-CbT4tFqV.mjs +550 -0
- package/components/chunks/MazSelect-CyWAOXo4.mjs +867 -0
- package/components/chunks/MazSpinner-BDda3YzZ.mjs +34 -0
- package/components/chunks/{MazSpinner-BcB0szZB.mjs → MazSpinner-BlbTztM3.mjs} +1 -1
- package/components/chunks/{MazSpinner-CfiIXW8y.mjs → MazSpinner-C2-JMhVh.mjs} +1 -1
- package/components/chunks/{MazSpinner-BsYJDmi9.mjs → MazSpinner-C6h03sqc.mjs} +1 -1
- package/components/chunks/MazSpinner-CS1_l-tv.mjs +34 -0
- package/components/chunks/{MazSpinner-DmiLBQgR.mjs → MazSpinner-Cp_nPioh.mjs} +1 -1
- package/components/chunks/{MazSpinner-Bb3f2t6w.mjs → MazSpinner-CwmaAuL1.mjs} +1 -1
- package/components/chunks/{MazSpinner-BpkPcfCt.mjs → MazSpinner-D5Sbo759.mjs} +1 -1
- package/components/chunks/MazSpinner-DPur0-r-.mjs +34 -0
- package/components/chunks/MazSpinner-DYE8e9xl.mjs +34 -0
- package/components/chunks/MazSpinner-DjUU4G1h.mjs +34 -0
- package/components/chunks/{MazSpinner-C-64WJje.mjs → MazSpinner-DqD51Fb6.mjs} +1 -1
- package/components/chunks/MazSpinner-DudoF-cG.mjs +34 -0
- package/components/chunks/MazSpinner-EAz0nFxC.mjs +34 -0
- package/components/chunks/{MazSpinner-DoRGA1RI.mjs → MazSpinner-N-1gjTUE.mjs} +1 -1
- package/components/chunks/MazSpinner-QfPXLpa_.mjs +34 -0
- package/components/chunks/MazSpinner-ZFhNCy24.mjs +34 -0
- package/components/chunks/MazSpinner-b90e3OQK.mjs +34 -0
- package/components/chunks/MazSpinner-mtv0dluJ.mjs +34 -0
- package/components/chunks/MazStepper-B3fuhbye.mjs +218 -0
- package/components/chunks/{MazTable-BJDPdIJB.mjs → MazTable-hA0HicaL.mjs} +85 -81
- package/components/chunks/MazTableCell-DkCidYWY.mjs +23 -0
- package/components/chunks/MazTableRow-BAl6Fzm8.mjs +30 -0
- package/components/chunks/{MazTableTitle-Ch-nyY1E.mjs → MazTableTitle-CY_LNDOk.mjs} +4 -4
- package/components/chunks/{MazTabsBar-CM-w7V97.mjs → MazTabsBar--Xq_cpuz.mjs} +62 -78
- package/components/chunks/{MazTransitionExpand-PmUDa51_.mjs → MazTransitionExpand-Cedz9Ree.mjs} +8 -8
- package/components/chunks/{inject-strict-BmiaNiwC.mjs → inject-strict-DEDSuzCz.mjs} +3 -3
- package/components/chunks/useInstanceUniqId-BkOfxhk8.mjs +10 -0
- package/css/main.css +1 -1
- package/modules/assets/MazBtn.css +1 -1
- package/modules/assets/index.css +1 -1
- package/modules/chunks/MazBtn-CFge_w1W.cjs +1 -0
- package/modules/chunks/MazBtn-yNCoLFA6.mjs +103 -0
- package/modules/chunks/{MazIcon-DEgoQbMj.mjs → MazIcon-C3__MBEL.mjs} +4 -3
- package/modules/chunks/{MazIcon-CkuzyufF.cjs → MazIcon-CqhvM2xp.cjs} +1 -1
- package/modules/chunks/{MazSpinner-BurN-1pb.mjs → MazSpinner-C4XtaFJk.mjs} +1 -1
- package/modules/chunks/{MazSpinner-jP4QsCNE.cjs → MazSpinner-DkJAN36F.cjs} +1 -1
- package/modules/chunks/index-Bawg2UGE.cjs +124 -0
- package/modules/chunks/{index-CxFUggmu.mjs → index-CXu9R01-.mjs} +1207 -962
- package/modules/index.cjs +1 -1
- package/modules/index.mjs +47 -46
- package/nuxt/index.json +1 -1
- package/package.json +23 -22
- 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 +23 -14
- package/types/components/MazBadge.vue.d.ts +7 -2
- package/types/components/MazBottomSheet.vue.d.ts +13 -25
- 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/MazCheckbox.vue.d.ts +4 -3
- package/types/components/MazChecklist.vue.d.ts +2 -5
- package/types/components/MazCircularProgressBar.vue.d.ts +31 -60
- package/types/components/MazDialog.vue.d.ts +24 -33
- package/types/components/MazDialogPromise.vue.d.ts +3 -3
- package/types/components/MazDrawer.vue.d.ts +9 -5
- 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 +31 -55
- package/types/components/MazPhoneNumberInput/PhoneInput.vue.d.ts +5 -5
- package/types/components/MazPhoneNumberInput/types.d.ts +2 -1
- package/types/components/MazPhoneNumberInput/{use-libphonenumber.d.ts → useLibphonenumber.d.ts} +4 -4
- package/types/components/MazPhoneNumberInput/{use-maz-phone-number-input.d.ts → useMazPhoneNumberInput.d.ts} +1 -1
- package/types/components/MazPhoneNumberInput.vue.d.ts +69 -25
- 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 +2 -2
- 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 +8 -2
- 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 +8 -8
- package/types/modules/composables/useFormValidator/useFormField.d.ts +2 -2
- package/types/modules/composables/useFormValidator/useFormValidator.d.ts +3 -3
- package/types/modules/composables/useFormValidator/utils.d.ts +5 -5
- package/types/modules/composables/useLanguageDisplayNames.d.ts +13 -12
- package/types/modules/directives/closable.d.ts +1 -1
- package/types/modules/directives/tooltip/index.d.ts +21 -0
- package/types/modules/directives/v-fullscreen-img/MazFullscreenImg.vue.d.ts +2 -2
- package/types/modules/helpers/inject-strict.d.ts +2 -1
- package/types/tailwindcss/variables/colors.d.ts +2 -0
- package/components/chunks/MazBottomSheet-CGRvZmGd.mjs +0 -208
- package/components/chunks/MazBtn-2VKM1wZu.mjs +0 -106
- package/components/chunks/MazBtn-40lm8-AL.mjs +0 -106
- package/components/chunks/MazBtn-BB1FyYWv.mjs +0 -114
- package/components/chunks/MazBtn-BMYXMZuX.mjs +0 -106
- package/components/chunks/MazBtn-BijEMn4r.mjs +0 -106
- package/components/chunks/MazBtn-BmrcK2af.mjs +0 -106
- package/components/chunks/MazBtn-C72_1uvu.mjs +0 -106
- package/components/chunks/MazBtn-CWloP6MI.mjs +0 -111
- package/components/chunks/MazBtn-CcyV4DCc.mjs +0 -106
- package/components/chunks/MazBtn-DENEMy-c.mjs +0 -106
- package/components/chunks/MazBtn-DfqRZvbB.mjs +0 -106
- package/components/chunks/MazBtn-UnZQuu6P.mjs +0 -106
- package/components/chunks/MazBtn-cDJlUVVY.mjs +0 -106
- package/components/chunks/MazBtn-hUslV7wO.mjs +0 -106
- package/components/chunks/MazDialog-khofH-7I.mjs +0 -237
- package/components/chunks/MazDialogPromise-ZRA2ZrO4.mjs +0 -488
- package/components/chunks/MazExpandAnimation-MDimlZGj.mjs +0 -57
- package/components/chunks/MazInput-DC3S-CVu.mjs +0 -282
- package/components/chunks/MazInput-DzWkS-g8.mjs +0 -293
- package/components/chunks/MazInput-NE6H-10w.mjs +0 -281
- package/components/chunks/MazInputNumber-DRXQXHRv.mjs +0 -572
- package/components/chunks/MazLoadingBar-DdjHRC7g.mjs +0 -32
- package/components/chunks/MazPagination-BkT4_LLW.mjs +0 -330
- package/components/chunks/MazPicker-DwWiIYAR.mjs +0 -2456
- package/components/chunks/MazSelect-BJ07NVXQ.mjs +0 -843
- package/components/chunks/MazSelect-CDV9Fx6m.mjs +0 -556
- package/components/chunks/MazSpinner-BymqEMBk.mjs +0 -34
- package/components/chunks/MazSpinner-CEFbkZkM.mjs +0 -34
- package/components/chunks/MazSpinner-CsEQ9EXb.mjs +0 -34
- package/components/chunks/MazSpinner-CykRbNHD.mjs +0 -34
- package/components/chunks/MazSpinner-D3-pqOh3.mjs +0 -34
- package/components/chunks/MazSpinner-DS58mtzm.mjs +0 -34
- package/components/chunks/MazSpinner-Dmkr_r9u.mjs +0 -34
- package/components/chunks/MazSpinner-eC03bFP5.mjs +0 -34
- package/components/chunks/MazSpinner-edxn0ncQ.mjs +0 -34
- package/components/chunks/MazSpinner-f2Mc2eRO.mjs +0 -34
- package/components/chunks/MazSpinner-n4Dp5ZsH.mjs +0 -34
- package/components/chunks/MazStepper-BREfkpUb.mjs +0 -213
- package/components/chunks/MazTableCell-DILuUCTe.mjs +0 -23
- package/components/chunks/MazTableRow-D6H6-c8J.mjs +0 -30
- package/components/chunks/useInstanceUniqId-DW9jO1Sz.mjs +0 -11
- package/modules/chunks/MazBtn-B_Xlvgbg.cjs +0 -1
- package/modules/chunks/MazBtn-Dsr06Zgg.mjs +0 -106
- package/modules/chunks/index-CUNN0eIB.cjs +0 -124
package/components/chunks/{MazPhoneNumberInput-BbssOUzo.mjs → MazPhoneNumberInput-DibUhBpk.mjs}
RENAMED
|
@@ -1,28 +1,27 @@
|
|
|
1
|
-
import '../assets/MazPhoneNumberInput.css';var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import {
|
|
5
|
-
import { getCountries as
|
|
1
|
+
import '../assets/MazPhoneNumberInput.css';var Je = Object.defineProperty;
|
|
2
|
+
var Ze = (a, o, e) => o in a ? Je(a, o, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[o] = e;
|
|
3
|
+
var ee = (a, o, e) => Ze(a, typeof o != "symbol" ? o + "" : o, e);
|
|
4
|
+
import { computed as h, useId as Xe, inject as xe, defineComponent as ne, defineAsyncComponent as q, withDirectives as ze, openBlock as y, createElementBlock as P, normalizeClass as T, normalizeStyle as oe, Fragment as be, renderList as Be, createElementVNode as Y, mergeProps as le, createVNode as U, unref as k, createCommentVNode as $, renderSlot as N, ref as E, onMounted as Ie, useSlots as _e, toDisplayString as te, createBlock as K, resolveDynamicComponent as ke, toHandlers as eo, vModelDynamic as oo, createTextVNode as to, withModifiers as se, withCtx as J, onBeforeMount as Oe, nextTick as ue, Transition as lo, mergeModels as Pe, useModel as ao, provide as so, watch as he } from "vue";
|
|
5
|
+
import { getCountries as Me, getCountryCallingCode as ce, isSupportedCountry as no, parsePhoneNumberFromString as ro, getExampleNumber as io, AsYouType as uo } from "libphonenumber-js";
|
|
6
6
|
function Ae({
|
|
7
7
|
componentName: a,
|
|
8
8
|
providedId: o
|
|
9
9
|
}) {
|
|
10
|
-
|
|
11
|
-
return h(() => o ?? `${a}-${e}`);
|
|
10
|
+
return h(() => o ?? `${a}-${Xe().replace(/:/g, "")}`);
|
|
12
11
|
}
|
|
13
|
-
function
|
|
12
|
+
function Le(a, o = "20x15") {
|
|
14
13
|
return `https://flagcdn.com/${o}/${a.toLowerCase()}.png`;
|
|
15
14
|
}
|
|
16
|
-
function
|
|
17
|
-
const e =
|
|
15
|
+
function Te(a, o) {
|
|
16
|
+
const e = xe(a, o);
|
|
18
17
|
if (!e)
|
|
19
|
-
throw new TypeError(`[maz-ui](injectStrict) Could not resolve ${a}`);
|
|
18
|
+
throw new TypeError(`[maz-ui](injectStrict) Could not resolve ${a.toString()}`);
|
|
20
19
|
return e;
|
|
21
20
|
}
|
|
22
|
-
function
|
|
21
|
+
function co(a) {
|
|
23
22
|
return !!a;
|
|
24
23
|
}
|
|
25
|
-
const
|
|
24
|
+
const mo = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7", po = {
|
|
26
25
|
baseClass: "m-lazy-img",
|
|
27
26
|
loadedClass: "m-lazy-loaded",
|
|
28
27
|
loadingClass: "m-lazy-loading",
|
|
@@ -36,14 +35,14 @@ const fo = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAA
|
|
|
36
35
|
threshold: 0.1
|
|
37
36
|
}
|
|
38
37
|
};
|
|
39
|
-
class
|
|
38
|
+
class fo {
|
|
40
39
|
constructor(o = {}) {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
40
|
+
ee(this, "observers", []);
|
|
41
|
+
ee(this, "defaultOptions", po);
|
|
42
|
+
ee(this, "options");
|
|
43
|
+
ee(this, "onImgLoadedCallback");
|
|
44
|
+
ee(this, "onImgErrorCallback");
|
|
45
|
+
ee(this, "hasImgLoaded", !1);
|
|
47
46
|
this.options = this.buildOptions(o), this.onImgLoadedCallback = this.imageIsLoaded.bind(this), this.onImgErrorCallback = this.imageHasError.bind(this);
|
|
48
47
|
}
|
|
49
48
|
async loadErrorPhoto() {
|
|
@@ -151,16 +150,16 @@ class ho {
|
|
|
151
150
|
handleIntersectionObserver(o, e, t, r) {
|
|
152
151
|
var u, v;
|
|
153
152
|
this.observers.push(r);
|
|
154
|
-
for (const
|
|
155
|
-
if (
|
|
156
|
-
if ((v = (u = this.options).onIntersecting) == null || v.call(u,
|
|
153
|
+
for (const p of t)
|
|
154
|
+
if (p.isIntersecting) {
|
|
155
|
+
if ((v = (u = this.options).onIntersecting) == null || v.call(u, p.target), this.options.observerOnce && r.unobserve(o), this.options.loadOnce && this.hasImgLoaded)
|
|
157
156
|
return;
|
|
158
157
|
this.loadImage(o, e);
|
|
159
158
|
}
|
|
160
159
|
}
|
|
161
160
|
createObserver(o, e) {
|
|
162
|
-
const t = (v,
|
|
163
|
-
this.handleIntersectionObserver(o, e, v,
|
|
161
|
+
const t = (v, p) => {
|
|
162
|
+
this.handleIntersectionObserver(o, e, v, p);
|
|
164
163
|
}, r = this.options.observerOptions;
|
|
165
164
|
new IntersectionObserver(t, r).observe(o);
|
|
166
165
|
}
|
|
@@ -177,7 +176,7 @@ class ho {
|
|
|
177
176
|
async add(o, e) {
|
|
178
177
|
if (this.hasBgImgMode(e) && this.isPictureElement(o))
|
|
179
178
|
throw new Error(`[MazLazyImg] You can't use the "bg-image" mode with "<picture />" element`);
|
|
180
|
-
setTimeout(() => this.setBaseClass(o), 0), o.getAttribute("src") || this.setImgSrc(o,
|
|
179
|
+
setTimeout(() => this.setBaseClass(o), 0), o.getAttribute("src") || this.setImgSrc(o, mo), await this.bindUpdateHandler(o, e, "bind");
|
|
181
180
|
}
|
|
182
181
|
async update(o, e) {
|
|
183
182
|
e.value !== e.oldValue && (this.hasImgLoaded = !1, this.removeAllStateClasses(o), await this.bindUpdateHandler(o, e, "update"));
|
|
@@ -190,10 +189,10 @@ class ho {
|
|
|
190
189
|
}
|
|
191
190
|
}
|
|
192
191
|
let de;
|
|
193
|
-
const
|
|
192
|
+
const ho = {
|
|
194
193
|
created(a, o) {
|
|
195
194
|
const e = typeof o.value == "object" ? o.value : {};
|
|
196
|
-
de = new
|
|
195
|
+
de = new fo(e), de.add(a, o);
|
|
197
196
|
},
|
|
198
197
|
updated(a, o) {
|
|
199
198
|
de.update(a, o);
|
|
@@ -201,10 +200,10 @@ const vo = {
|
|
|
201
200
|
unmounted(a, o) {
|
|
202
201
|
de.remove(a, o);
|
|
203
202
|
}
|
|
204
|
-
},
|
|
203
|
+
}, vo = ["data-lazy-srcset", "media"], yo = ["alt"], go = {
|
|
205
204
|
key: 0,
|
|
206
205
|
class: "m-lazy-img-component-loader"
|
|
207
|
-
},
|
|
206
|
+
}, bo = /* @__PURE__ */ ne({
|
|
208
207
|
inheritAttrs: !1,
|
|
209
208
|
__name: "MazLazyImg",
|
|
210
209
|
props: {
|
|
@@ -225,52 +224,52 @@ const vo = {
|
|
|
225
224
|
},
|
|
226
225
|
emits: ["intersecting", "loading", "loaded", "error"],
|
|
227
226
|
setup(a) {
|
|
228
|
-
const o = a, e = q(() => import("./MazSpinner-
|
|
227
|
+
const o = a, e = q(() => import("./MazSpinner-EAz0nFxC.mjs")), t = h(() => o.image || o.src), r = h(() => {
|
|
229
228
|
var u;
|
|
230
229
|
return typeof t.value == "string" ? [{ srcset: t.value }] : (u = t.value) == null ? void 0 : u.sources;
|
|
231
230
|
});
|
|
232
|
-
return (u, v) => ze((
|
|
231
|
+
return (u, v) => ze((y(), P(
|
|
233
232
|
"picture",
|
|
234
233
|
{
|
|
235
|
-
class:
|
|
236
|
-
style:
|
|
234
|
+
class: T(["m-lazy-img-component", [{ "--use-loader": !u.noLoader, "--height-full": u.imageHeightFull, "--block": u.block }, o.class]]),
|
|
235
|
+
style: oe(u.style)
|
|
237
236
|
},
|
|
238
237
|
[
|
|
239
|
-
(
|
|
238
|
+
(y(!0), P(
|
|
240
239
|
be,
|
|
241
240
|
null,
|
|
242
|
-
Be(r.value, ({ srcset:
|
|
241
|
+
Be(r.value, ({ srcset: p, media: B }, L) => (y(), P("source", {
|
|
243
242
|
key: L,
|
|
244
|
-
"data-lazy-srcset":
|
|
245
|
-
media:
|
|
246
|
-
}, null, 8,
|
|
243
|
+
"data-lazy-srcset": p,
|
|
244
|
+
media: B
|
|
245
|
+
}, null, 8, vo))),
|
|
247
246
|
128
|
|
248
247
|
/* KEYED_FRAGMENT */
|
|
249
248
|
)),
|
|
250
|
-
|
|
249
|
+
Y("img", le(u.$attrs, {
|
|
251
250
|
src: "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",
|
|
252
251
|
loading: "lazy",
|
|
253
252
|
alt: u.alt,
|
|
254
253
|
class: u.imgClass
|
|
255
|
-
}), null, 16,
|
|
256
|
-
u.noLoader ? $("v-if", !0) : (
|
|
257
|
-
|
|
254
|
+
}), null, 16, yo),
|
|
255
|
+
u.noLoader ? $("v-if", !0) : (y(), P("div", go, [
|
|
256
|
+
U(k(e), { size: "2em" })
|
|
258
257
|
])),
|
|
259
258
|
N(u.$slots, "default", {}, void 0, !0)
|
|
260
259
|
],
|
|
261
260
|
6
|
|
262
261
|
/* CLASS, STYLE */
|
|
263
262
|
)), [
|
|
264
|
-
[
|
|
263
|
+
[k(ho), {
|
|
265
264
|
noPhoto: u.noPhoto,
|
|
266
265
|
loadOnce: u.loadOnce,
|
|
267
266
|
observerOptions: u.observerOptions,
|
|
268
267
|
fallbackSrc: u.fallbackSrc,
|
|
269
268
|
observerOnce: !u.noObserverOnce,
|
|
270
|
-
onIntersecting: (
|
|
271
|
-
onLoading: (
|
|
272
|
-
onLoaded: (
|
|
273
|
-
onError: (
|
|
269
|
+
onIntersecting: (p) => u.$emit("intersecting", p),
|
|
270
|
+
onLoading: (p) => u.$emit("loading", p),
|
|
271
|
+
onLoaded: (p) => u.$emit("loaded", p),
|
|
272
|
+
onError: (p) => u.$emit("error", p)
|
|
274
273
|
}]
|
|
275
274
|
]);
|
|
276
275
|
}
|
|
@@ -279,7 +278,7 @@ const vo = {
|
|
|
279
278
|
for (const [t, r] of o)
|
|
280
279
|
e[t] = r;
|
|
281
280
|
return e;
|
|
282
|
-
},
|
|
281
|
+
}, Ee = /* @__PURE__ */ re(bo, [["__scopeId", "data-v-83e40430"]]), Co = {
|
|
283
282
|
removeAccents: !0,
|
|
284
283
|
caseSensitive: !1,
|
|
285
284
|
replaceSpaces: !0,
|
|
@@ -290,7 +289,7 @@ const vo = {
|
|
|
290
289
|
customNormalizationForms: ["NFC", "NFKD"]
|
|
291
290
|
};
|
|
292
291
|
function me(a, o) {
|
|
293
|
-
const e = { ...
|
|
292
|
+
const e = { ...Co, ...o }, t = {
|
|
294
293
|
À: "A",
|
|
295
294
|
Á: "A",
|
|
296
295
|
Â: "A",
|
|
@@ -345,7 +344,7 @@ function me(a, o) {
|
|
|
345
344
|
r = r.normalize(u);
|
|
346
345
|
return r;
|
|
347
346
|
}
|
|
348
|
-
function
|
|
347
|
+
function zo(a, o) {
|
|
349
348
|
const e = a.length, t = o.length, r = [];
|
|
350
349
|
for (let u = 0; u <= e; u++)
|
|
351
350
|
r[u] = [u];
|
|
@@ -353,69 +352,73 @@ function Io(a, o) {
|
|
|
353
352
|
r[0][u] = u;
|
|
354
353
|
for (let u = 1; u <= e; u++)
|
|
355
354
|
for (let v = 1; v <= t; v++) {
|
|
356
|
-
const
|
|
355
|
+
const p = a[u - 1] === o[v - 1] ? 0 : 1;
|
|
357
356
|
r[u][v] = Math.min(
|
|
358
357
|
r[u - 1][v] + 1,
|
|
359
358
|
r[u][v - 1] + 1,
|
|
360
|
-
r[u - 1][v - 1] +
|
|
359
|
+
r[u - 1][v - 1] + p
|
|
361
360
|
);
|
|
362
361
|
}
|
|
363
362
|
return r[e][t];
|
|
364
363
|
}
|
|
365
|
-
function
|
|
366
|
-
const e =
|
|
364
|
+
function Fe(a, o) {
|
|
365
|
+
const e = zo(a, o), t = Math.max(a.length, o.length);
|
|
367
366
|
return 1 - e / t;
|
|
368
367
|
}
|
|
369
|
-
function
|
|
370
|
-
return
|
|
368
|
+
function Io(a, o, e = 0.75) {
|
|
369
|
+
return Fe(a, o) >= e;
|
|
371
370
|
}
|
|
372
371
|
function ve(a, o, e = 0.75) {
|
|
373
372
|
const t = h(
|
|
374
373
|
() => me(typeof a == "string" ? a : a.value)
|
|
375
374
|
), r = h(
|
|
376
375
|
() => me(typeof o == "string" ? o : o.value)
|
|
377
|
-
), u = h(() => typeof e == "number" ? e : e.value), v = h(() =>
|
|
376
|
+
), u = h(() => typeof e == "number" ? e : e.value), v = h(() => Fe(t.value, r.value));
|
|
378
377
|
return {
|
|
379
378
|
isMatching: h(
|
|
380
|
-
() =>
|
|
379
|
+
() => Io(t.value, r.value, u.value)
|
|
381
380
|
),
|
|
382
381
|
score: v
|
|
383
382
|
};
|
|
384
383
|
}
|
|
385
|
-
function
|
|
386
|
-
var v;
|
|
384
|
+
function Ne(a, o, e) {
|
|
385
|
+
var v, p;
|
|
387
386
|
a.stopPropagation();
|
|
388
387
|
const t = typeof e.value == "function" ? e.value : e.value.handler, r = typeof e.value == "object" ? e.value.exclude : void 0;
|
|
389
388
|
let u = !1;
|
|
390
389
|
if (r && r.length > 0) {
|
|
391
|
-
for (const
|
|
390
|
+
for (const B of r)
|
|
392
391
|
if (!u && a.target instanceof HTMLElement) {
|
|
393
|
-
const
|
|
394
|
-
u = a.target.getAttribute("id") ===
|
|
392
|
+
const L = (v = document.querySelector(B)) == null ? void 0 : v.getAttribute("id");
|
|
393
|
+
u = (a.target.getAttribute("id") === L || ((p = document.querySelector(B)) == null ? void 0 : p.contains(a.target))) ?? !1;
|
|
395
394
|
}
|
|
396
395
|
}
|
|
397
|
-
!o.contains(a.target) && !u && (t == null || t());
|
|
396
|
+
!o.contains(a.target) && !u && (t == null || t(a));
|
|
398
397
|
}
|
|
399
|
-
function
|
|
398
|
+
function Ke() {
|
|
400
399
|
return document.ontouchstart === null ? "touchstart" : "click";
|
|
401
400
|
}
|
|
402
|
-
function
|
|
403
|
-
const e =
|
|
404
|
-
document.removeEventListener(e, (t) =>
|
|
401
|
+
function Ao(a, o) {
|
|
402
|
+
const e = Ke();
|
|
403
|
+
document.removeEventListener(e, (t) => Ne(t, a, o));
|
|
405
404
|
}
|
|
406
|
-
function
|
|
405
|
+
function wo(a, o) {
|
|
407
406
|
if (typeof o.value != "function" && typeof o.value == "object" && typeof o.value.handler != "function") {
|
|
408
407
|
console.error("[maz-ui](vClosable) v-closable directive requires a handler function");
|
|
409
408
|
return;
|
|
410
409
|
}
|
|
411
|
-
const e =
|
|
412
|
-
document.addEventListener(e, (t) =>
|
|
410
|
+
const e = Ke();
|
|
411
|
+
document.addEventListener(e, (t) => Ne(t, a, o));
|
|
413
412
|
}
|
|
414
|
-
const
|
|
415
|
-
mounted:
|
|
416
|
-
unmounted:
|
|
413
|
+
const So = {
|
|
414
|
+
mounted: wo,
|
|
415
|
+
unmounted: Ao
|
|
417
416
|
};
|
|
418
|
-
|
|
417
|
+
let ye = null;
|
|
418
|
+
function Vo(a, o) {
|
|
419
|
+
ye && clearTimeout(ye), ye = setTimeout(a, o);
|
|
420
|
+
}
|
|
421
|
+
function ko(a, o) {
|
|
419
422
|
let e;
|
|
420
423
|
return function(...t) {
|
|
421
424
|
clearTimeout(e), e = setTimeout(() => {
|
|
@@ -423,17 +426,13 @@ function Po(a, o) {
|
|
|
423
426
|
}, o);
|
|
424
427
|
};
|
|
425
428
|
}
|
|
426
|
-
|
|
427
|
-
function ko(a, o) {
|
|
428
|
-
ye && clearTimeout(ye), ye = setTimeout(a, o);
|
|
429
|
-
}
|
|
430
|
-
const Eo = {
|
|
429
|
+
const Po = ["for"], Lo = {
|
|
431
430
|
key: 0,
|
|
432
431
|
class: "m-input-wrapper-left"
|
|
433
|
-
},
|
|
432
|
+
}, Eo = ["id", "type", "name", "inputmode", "placeholder", "aria-label", "disabled", "readonly", "required"], $o = { key: 0 }, Bo = {
|
|
434
433
|
key: 1,
|
|
435
434
|
class: "m-input-wrapper-right"
|
|
436
|
-
},
|
|
435
|
+
}, Oo = /* @__PURE__ */ ne({
|
|
437
436
|
inheritAttrs: !1,
|
|
438
437
|
__name: "MazInput",
|
|
439
438
|
props: {
|
|
@@ -442,6 +441,8 @@ const Eo = {
|
|
|
442
441
|
modelValue: { default: void 0 },
|
|
443
442
|
placeholder: { default: void 0 },
|
|
444
443
|
label: { default: void 0 },
|
|
444
|
+
topLabel: {},
|
|
445
|
+
assistiveText: {},
|
|
445
446
|
name: { default: void 0 },
|
|
446
447
|
color: { default: "primary" },
|
|
447
448
|
type: { default: "text" },
|
|
@@ -471,15 +472,15 @@ const Eo = {
|
|
|
471
472
|
},
|
|
472
473
|
emits: ["update:model-value", "focus", "blur", "click", "change", "input"],
|
|
473
474
|
setup(a, { emit: o }) {
|
|
474
|
-
const e = a, t = o, r = q(() => import("./MazBtn-
|
|
475
|
+
const e = a, t = o, r = q(() => import("./MazBtn-D4NOcykx.mjs")), u = q(() => import("./MazIcon-CaXpmvN2.mjs")), v = q(() => import("./eye-slash-BoO00xzs.mjs")), p = q(() => import("./eye-f8zAUc30.mjs")), B = q(() => import("./check-C9Q_W85g.mjs")), L = E(!1), g = E(!1), A = E(), i = Ae({
|
|
475
476
|
componentName: "MazInput",
|
|
476
477
|
providedId: e.id
|
|
477
478
|
});
|
|
478
479
|
Ie(() => {
|
|
479
|
-
var
|
|
480
|
-
e.autoFocus && ((
|
|
480
|
+
var s;
|
|
481
|
+
e.autoFocus && ((s = A.value) == null || s.focus());
|
|
481
482
|
});
|
|
482
|
-
const
|
|
483
|
+
const f = h(() => e.type === "password"), z = h(() => L.value ? "text" : e.type), w = h(() => {
|
|
483
484
|
if (!e.noBorder) {
|
|
484
485
|
if (e.error)
|
|
485
486
|
return "maz-border-danger";
|
|
@@ -487,7 +488,7 @@ const Eo = {
|
|
|
487
488
|
return "maz-border-success";
|
|
488
489
|
if (e.warning)
|
|
489
490
|
return "maz-border-warning";
|
|
490
|
-
if (
|
|
491
|
+
if (g.value || e.borderActive) {
|
|
491
492
|
if (e.color === "black")
|
|
492
493
|
return "maz-border-black";
|
|
493
494
|
if (e.color === "danger")
|
|
@@ -507,159 +508,172 @@ const Eo = {
|
|
|
507
508
|
}
|
|
508
509
|
return "--default-border";
|
|
509
510
|
}
|
|
510
|
-
}),
|
|
511
|
-
const { required:
|
|
512
|
-
if (
|
|
513
|
-
return
|
|
514
|
-
}),
|
|
515
|
-
(
|
|
516
|
-
t("update:model-value",
|
|
511
|
+
}), H = _e(), j = h(() => {
|
|
512
|
+
const { required: s, placeholder: F } = e;
|
|
513
|
+
if (F)
|
|
514
|
+
return s ? `${F} *` : F;
|
|
515
|
+
}), Z = h(() => C.value !== void 0 && C.value !== ""), b = ko(
|
|
516
|
+
(s) => {
|
|
517
|
+
t("update:model-value", s);
|
|
517
518
|
},
|
|
518
519
|
typeof e.debounce == "number" ? e.debounce : e.debounceDelay ?? 500
|
|
519
520
|
);
|
|
520
|
-
function S(
|
|
521
|
+
function S(s) {
|
|
521
522
|
if (e.debounce)
|
|
522
|
-
return
|
|
523
|
-
t("update:model-value",
|
|
523
|
+
return b(s);
|
|
524
|
+
t("update:model-value", s);
|
|
524
525
|
}
|
|
525
526
|
const C = h({
|
|
526
527
|
get: () => e.modelValue,
|
|
527
|
-
set: (
|
|
528
|
-
}), W = h(() => (!!e.label || !!e.hint) && (
|
|
529
|
-
function
|
|
530
|
-
return !!
|
|
528
|
+
set: (s) => S(s)
|
|
529
|
+
}), W = h(() => (!!e.label || !!e.hint) && (g.value || !!Z.value || !!e.placeholder || ["date", "month", "week"].includes(e.type))), X = h(() => !!e.label || !!e.hint);
|
|
530
|
+
function n() {
|
|
531
|
+
return !!H["right-icon"] || f.value || !!H["valid-button"] || e.validButton || !!e.rightIcon;
|
|
531
532
|
}
|
|
532
|
-
function
|
|
533
|
-
return !!
|
|
533
|
+
function V() {
|
|
534
|
+
return !!H["left-icon"] || !!e.leftIcon;
|
|
534
535
|
}
|
|
535
|
-
function
|
|
536
|
-
t("focus",
|
|
536
|
+
function D(s) {
|
|
537
|
+
t("focus", s), g.value = !0;
|
|
537
538
|
}
|
|
538
|
-
function
|
|
539
|
-
t("blur",
|
|
539
|
+
function M(s) {
|
|
540
|
+
t("blur", s), g.value = !1;
|
|
540
541
|
}
|
|
541
|
-
function
|
|
542
|
-
return t("change",
|
|
542
|
+
function Q(s) {
|
|
543
|
+
return t("change", s);
|
|
543
544
|
}
|
|
544
|
-
function
|
|
545
|
-
return t("input",
|
|
545
|
+
function x(s) {
|
|
546
|
+
return t("input", s);
|
|
546
547
|
}
|
|
547
|
-
return (
|
|
548
|
+
return (s, F) => (y(), P(
|
|
548
549
|
"div",
|
|
549
550
|
{
|
|
550
|
-
class:
|
|
551
|
+
class: T(["m-input", [
|
|
551
552
|
{
|
|
552
|
-
"--is-focused":
|
|
553
|
+
"--is-focused": g.value || s.borderActive,
|
|
553
554
|
"--should-up": W.value,
|
|
554
|
-
"--has-label":
|
|
555
|
-
"--is-disabled":
|
|
556
|
-
"--is-readonly":
|
|
557
|
-
"--has-z-2":
|
|
558
|
-
"--has-state":
|
|
559
|
-
"--block":
|
|
555
|
+
"--has-label": X.value,
|
|
556
|
+
"--is-disabled": s.disabled,
|
|
557
|
+
"--is-readonly": s.readonly,
|
|
558
|
+
"--has-z-2": s.error || s.warning || s.success,
|
|
559
|
+
"--has-state": s.error || s.warning || s.success,
|
|
560
|
+
"--block": s.block
|
|
560
561
|
},
|
|
561
562
|
e.class,
|
|
562
|
-
`--${
|
|
563
|
-
`--${n.size}`
|
|
563
|
+
`--${s.color}`
|
|
564
564
|
]]),
|
|
565
|
-
style:
|
|
565
|
+
style: oe(s.style)
|
|
566
566
|
},
|
|
567
567
|
[
|
|
568
|
-
|
|
568
|
+
s.topLabel ? (y(), P("label", {
|
|
569
|
+
key: 0,
|
|
570
|
+
for: k(i),
|
|
571
|
+
class: "m-input-top-label"
|
|
572
|
+
}, te(s.topLabel), 9, Po)) : $("v-if", !0),
|
|
573
|
+
Y(
|
|
569
574
|
"div",
|
|
570
575
|
{
|
|
571
|
-
class:
|
|
572
|
-
|
|
576
|
+
class: T(["m-input-wrapper", [
|
|
577
|
+
s.inputClasses,
|
|
573
578
|
w.value,
|
|
574
|
-
|
|
579
|
+
s.roundedSize ? `--rounded-${s.roundedSize}` : { "maz-rounded": !s.noRadius },
|
|
580
|
+
{ "--block": s.block }
|
|
575
581
|
]])
|
|
576
582
|
},
|
|
577
583
|
[
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
typeof
|
|
584
|
+
V() ? (y(), P("div", Lo, [
|
|
585
|
+
s.$slots["left-icon"] || s.leftIcon ? N(s.$slots, "left-icon", { key: 0 }, () => [
|
|
586
|
+
typeof s.leftIcon == "string" ? (y(), K(k(u), {
|
|
581
587
|
key: 0,
|
|
582
|
-
name:
|
|
588
|
+
name: s.leftIcon,
|
|
583
589
|
class: "maz-text-xl maz-text-muted"
|
|
584
|
-
}, null, 8, ["name"])) :
|
|
590
|
+
}, null, 8, ["name"])) : s.leftIcon ? (y(), K(ke(s.leftIcon), {
|
|
585
591
|
key: 1,
|
|
586
592
|
class: "maz-text-xl maz-text-muted"
|
|
587
593
|
})) : $("v-if", !0)
|
|
588
594
|
], !0) : $("v-if", !0)
|
|
589
595
|
])) : $("v-if", !0),
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
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
|
-
|
|
596
|
+
Y(
|
|
597
|
+
"div",
|
|
598
|
+
{
|
|
599
|
+
class: T(["m-input-wrapper-input", [`--${s.size}`, { "--top-label": !!s.topLabel }]])
|
|
600
|
+
},
|
|
601
|
+
[
|
|
602
|
+
ze(Y("input", le({
|
|
603
|
+
id: k(i),
|
|
604
|
+
ref_key: "input",
|
|
605
|
+
ref: A,
|
|
606
|
+
"onUpdate:modelValue": F[0] || (F[0] = (_) => C.value = _),
|
|
607
|
+
type: z.value,
|
|
608
|
+
name: s.name
|
|
609
|
+
}, s.$attrs, {
|
|
610
|
+
inputmode: s.inputmode,
|
|
611
|
+
placeholder: j.value,
|
|
612
|
+
"aria-label": s.label || s.placeholder,
|
|
613
|
+
disabled: s.disabled,
|
|
614
|
+
readonly: s.readonly,
|
|
615
|
+
required: s.required,
|
|
616
|
+
class: "m-input-input"
|
|
617
|
+
}, eo({
|
|
618
|
+
blur: M,
|
|
619
|
+
focus: D,
|
|
620
|
+
change: Q,
|
|
621
|
+
input: x
|
|
622
|
+
}, !0), {
|
|
623
|
+
onClick: F[1] || (F[1] = (_) => s.$emit("click", _))
|
|
624
|
+
}), null, 16, Eo), [
|
|
625
|
+
[oo, C.value]
|
|
626
|
+
]),
|
|
627
|
+
s.label || s.hint ? (y(), P(
|
|
628
|
+
"span",
|
|
629
|
+
{
|
|
630
|
+
key: 0,
|
|
631
|
+
class: T(["m-input-label", [
|
|
632
|
+
{
|
|
633
|
+
"maz-text-danger-600": s.error,
|
|
634
|
+
"maz-text-success-600": s.success,
|
|
635
|
+
"maz-text-warning-600": s.warning
|
|
636
|
+
}
|
|
637
|
+
]])
|
|
638
|
+
},
|
|
639
|
+
[
|
|
640
|
+
to(
|
|
641
|
+
te(s.hint || s.label) + " ",
|
|
642
|
+
1
|
|
643
|
+
/* TEXT */
|
|
644
|
+
),
|
|
645
|
+
s.required ? (y(), P("sup", $o, "*")) : $("v-if", !0)
|
|
646
|
+
],
|
|
647
|
+
2
|
|
648
|
+
/* CLASS */
|
|
649
|
+
)) : $("v-if", !0)
|
|
650
|
+
],
|
|
651
|
+
2
|
|
652
|
+
/* CLASS */
|
|
653
|
+
),
|
|
654
|
+
n() ? (y(), P("div", Bo, [
|
|
655
|
+
s.$slots["right-icon"] || s.rightIcon ? N(s.$slots, "right-icon", { key: 0 }, () => [
|
|
656
|
+
typeof s.rightIcon == "string" ? (y(), K(k(u), {
|
|
643
657
|
key: 0,
|
|
644
|
-
name:
|
|
658
|
+
name: s.rightIcon,
|
|
645
659
|
class: "maz-text-xl maz-text-muted"
|
|
646
|
-
}, null, 8, ["name"])) :
|
|
660
|
+
}, null, 8, ["name"])) : s.rightIcon ? (y(), K(ke(s.rightIcon), {
|
|
647
661
|
key: 1,
|
|
648
662
|
class: "maz-text-xl maz-text-muted"
|
|
649
663
|
})) : $("v-if", !0)
|
|
650
664
|
], !0) : $("v-if", !0),
|
|
651
|
-
|
|
665
|
+
f.value ? (y(), K(k(r), {
|
|
652
666
|
key: 1,
|
|
653
667
|
color: "transparent",
|
|
654
668
|
tabindex: "-1",
|
|
655
669
|
size: "mini",
|
|
656
|
-
onClick:
|
|
670
|
+
onClick: F[2] || (F[2] = se((_) => L.value = !L.value, ["stop"]))
|
|
657
671
|
}, {
|
|
658
|
-
default:
|
|
659
|
-
L.value ? (
|
|
672
|
+
default: J(() => [
|
|
673
|
+
L.value ? (y(), K(k(v), {
|
|
660
674
|
key: 0,
|
|
661
675
|
class: "maz-text-xl maz-text-muted"
|
|
662
|
-
})) : (
|
|
676
|
+
})) : (y(), K(k(p), {
|
|
663
677
|
key: 1,
|
|
664
678
|
class: "maz-text-xl maz-text-muted"
|
|
665
679
|
}))
|
|
@@ -667,18 +681,18 @@ const Eo = {
|
|
|
667
681
|
_: 1
|
|
668
682
|
/* STABLE */
|
|
669
683
|
})) : $("v-if", !0),
|
|
670
|
-
|
|
671
|
-
|
|
684
|
+
s.$slots["valid-button"] || s.validButton ? N(s.$slots, "valid-button", { key: 2 }, () => [
|
|
685
|
+
U(k(r), {
|
|
672
686
|
color: "transparent",
|
|
673
|
-
disabled:
|
|
687
|
+
disabled: s.disabled,
|
|
674
688
|
tabindex: "-1",
|
|
675
|
-
loading:
|
|
689
|
+
loading: s.validButtonLoading,
|
|
676
690
|
class: "m-input-valid-button",
|
|
677
691
|
size: "mini",
|
|
678
692
|
type: "submit"
|
|
679
693
|
}, {
|
|
680
|
-
default:
|
|
681
|
-
|
|
694
|
+
default: J(() => [
|
|
695
|
+
U(k(B), { class: "maz-text-2xl maz-text-normal" })
|
|
682
696
|
]),
|
|
683
697
|
_: 1
|
|
684
698
|
/* STABLE */
|
|
@@ -688,17 +702,34 @@ const Eo = {
|
|
|
688
702
|
],
|
|
689
703
|
2
|
|
690
704
|
/* CLASS */
|
|
691
|
-
)
|
|
705
|
+
),
|
|
706
|
+
s.assistiveText ? (y(), P(
|
|
707
|
+
"div",
|
|
708
|
+
{
|
|
709
|
+
key: 1,
|
|
710
|
+
class: T(["m-input-bottom-text", [
|
|
711
|
+
{
|
|
712
|
+
"maz-text-danger-600": s.error,
|
|
713
|
+
"maz-text-success-600": s.success,
|
|
714
|
+
"maz-text-warning-600": s.warning,
|
|
715
|
+
"maz-text-muted": !s.error && !s.success && !s.warning
|
|
716
|
+
}
|
|
717
|
+
]])
|
|
718
|
+
},
|
|
719
|
+
te(s.assistiveText),
|
|
720
|
+
3
|
|
721
|
+
/* TEXT, CLASS */
|
|
722
|
+
)) : $("v-if", !0)
|
|
692
723
|
],
|
|
693
724
|
6
|
|
694
725
|
/* CLASS, STYLE */
|
|
695
726
|
));
|
|
696
727
|
}
|
|
697
|
-
}), Ce = /* @__PURE__ */ re(
|
|
728
|
+
}), Ce = /* @__PURE__ */ re(Oo, [["__scopeId", "data-v-2cfe0ca2"]]), Mo = ["aria-label"], To = { class: "m-select-list__no-results" }, Fo = {
|
|
698
729
|
key: 2,
|
|
699
730
|
class: "m-select-list__scroll-wrapper",
|
|
700
731
|
tabindex: "-1"
|
|
701
|
-
},
|
|
732
|
+
}, No = { class: "m-select-list-optgroup" }, Ko = ["onClick"], Uo = /* @__PURE__ */ ne({
|
|
702
733
|
inheritAttrs: !1,
|
|
703
734
|
__name: "MazSelect",
|
|
704
735
|
props: {
|
|
@@ -731,38 +762,33 @@ const Eo = {
|
|
|
731
762
|
},
|
|
732
763
|
emits: ["close", "open", "blur", "focus", "change", "input", "update:model-value", "selected-option"],
|
|
733
764
|
setup(a, { expose: o, emit: e }) {
|
|
734
|
-
|
|
735
|
-
cb149e58: z.value,
|
|
736
|
-
"215ff493": i.value,
|
|
737
|
-
"64d6cfbb": p.value
|
|
738
|
-
}));
|
|
739
|
-
const t = a, r = e, u = q(() => import("./MazCheckbox-B22OcHt8.mjs")), v = q(() => import("./magnifying-glass--nBiyXot.mjs")), f = q(() => import("./chevron-down-BkvtON3b.mjs")), O = q(() => import("./no-symbol-CIgKzsrB.mjs"));
|
|
765
|
+
const t = a, r = e, u = q(() => import("./MazCheckbox-B5ZcWc3y.mjs")), v = q(() => import("./magnifying-glass--nBiyXot.mjs")), p = q(() => import("./chevron-down-BkvtON3b.mjs")), B = q(() => import("./no-symbol-CIgKzsrB.mjs"));
|
|
740
766
|
o({
|
|
741
767
|
/** Method to open the option list */
|
|
742
|
-
openList:
|
|
768
|
+
openList: ie,
|
|
743
769
|
/** Method to close the option list */
|
|
744
|
-
closeList:
|
|
770
|
+
closeList: ae
|
|
745
771
|
});
|
|
746
|
-
const L =
|
|
772
|
+
const L = E(!1), g = E(), A = h(
|
|
747
773
|
() => ["black", "transparent", "white"].includes(t.color)
|
|
748
774
|
), i = h(
|
|
749
|
-
() =>
|
|
750
|
-
),
|
|
751
|
-
() =>
|
|
775
|
+
() => A.value ? "var(--maz-color-black)" : `var(--maz-color-${t.color}-800)`
|
|
776
|
+
), f = h(
|
|
777
|
+
() => A.value ? "var(--maz-color-muted)" : `var(--maz-color-${t.color}-100)`
|
|
752
778
|
), z = h(
|
|
753
|
-
() =>
|
|
754
|
-
), w = h(() => L.value || t.open),
|
|
779
|
+
() => A.value ? "var(--maz-color-muted)" : `var(--maz-color-${t.color}-200)`
|
|
780
|
+
), w = h(() => L.value || t.open), H = Ae({
|
|
755
781
|
componentName: "MazSelect",
|
|
756
782
|
providedId: t.id
|
|
757
783
|
});
|
|
758
|
-
function
|
|
784
|
+
function j(l) {
|
|
759
785
|
return {
|
|
760
786
|
[t.optionValueKey]: l,
|
|
761
787
|
[t.optionLabelKey]: l,
|
|
762
788
|
[t.optionInputValueKey]: l
|
|
763
789
|
};
|
|
764
790
|
}
|
|
765
|
-
function
|
|
791
|
+
function Z(l) {
|
|
766
792
|
return {
|
|
767
793
|
...l,
|
|
768
794
|
[t.optionValueKey]: l[t.optionValueKey],
|
|
@@ -770,340 +796,339 @@ const Eo = {
|
|
|
770
796
|
[t.optionInputValueKey]: l[t.optionInputValueKey]
|
|
771
797
|
};
|
|
772
798
|
}
|
|
773
|
-
const
|
|
774
|
-
var
|
|
799
|
+
const b = h(() => {
|
|
800
|
+
var c;
|
|
775
801
|
const l = [];
|
|
776
|
-
if (!((
|
|
802
|
+
if (!((c = t.options) != null && c.length))
|
|
777
803
|
return [];
|
|
778
|
-
for (const
|
|
779
|
-
typeof
|
|
780
|
-
{ label:
|
|
781
|
-
...
|
|
782
|
-
(
|
|
804
|
+
for (const d of t.options)
|
|
805
|
+
typeof d == "string" || typeof d == "number" || typeof d == "boolean" ? l.push(j(d)) : typeof d == "object" && "options" in d && Array.isArray(d.options) ? l.push(
|
|
806
|
+
{ label: d.label, isOptGroup: !0 },
|
|
807
|
+
...d.options.map(
|
|
808
|
+
(m) => typeof m == "string" || typeof m == "number" || typeof m == "boolean" ? j(m) : Z(m)
|
|
783
809
|
)
|
|
784
|
-
) : l.push(
|
|
810
|
+
) : l.push(Z(d));
|
|
785
811
|
return l;
|
|
786
812
|
}), S = h(
|
|
787
813
|
() => {
|
|
788
814
|
var l;
|
|
789
|
-
return ((l =
|
|
815
|
+
return ((l = b.value) == null ? void 0 : l.filter((c) => t.multiple ? Array.isArray(t.modelValue) ? t.modelValue.includes(c[t.optionValueKey]) && !V(c[t.optionValueKey]) : !1 : t.modelValue === c[t.optionValueKey] && !V(c[t.optionValueKey]))) ?? [];
|
|
790
816
|
}
|
|
791
817
|
);
|
|
792
|
-
|
|
818
|
+
Oe(() => {
|
|
793
819
|
var l;
|
|
794
|
-
(l = t.options) != null && l.length || console.warn("[maz-ui](MazSelect) you must provide options"),
|
|
820
|
+
(l = t.options) != null && l.length || console.warn("[maz-ui](MazSelect) you must provide options"), fe();
|
|
795
821
|
});
|
|
796
|
-
const C =
|
|
797
|
-
function
|
|
822
|
+
const C = E(), W = E(), X = E(), n = E();
|
|
823
|
+
function V(l) {
|
|
798
824
|
return l == null;
|
|
799
825
|
}
|
|
800
|
-
function
|
|
801
|
-
var m;
|
|
802
|
-
return (((m = S.value) == null ? void 0 : m.some(
|
|
803
|
-
(c) => c[t.optionValueKey] === l[t.optionValueKey]
|
|
804
|
-
)) ?? !1) && !A(l[t.optionValueKey]);
|
|
805
|
-
}
|
|
806
|
-
const T = h(() => {
|
|
826
|
+
function D(l) {
|
|
807
827
|
var d;
|
|
828
|
+
return (((d = S.value) == null ? void 0 : d.some(
|
|
829
|
+
(m) => m[t.optionValueKey] === l[t.optionValueKey]
|
|
830
|
+
)) ?? !1) && !V(l[t.optionValueKey]);
|
|
831
|
+
}
|
|
832
|
+
const M = h(() => {
|
|
833
|
+
var c;
|
|
808
834
|
if (t.multiple && t.modelValue && Array.isArray(t.modelValue))
|
|
809
835
|
return t.modelValue.map(
|
|
810
|
-
(
|
|
811
|
-
var
|
|
812
|
-
return (I = (
|
|
836
|
+
(d) => {
|
|
837
|
+
var m, I;
|
|
838
|
+
return (I = (m = b.value) == null ? void 0 : m.find((O) => O[t.optionValueKey] === d)) == null ? void 0 : I[t.optionInputValueKey];
|
|
813
839
|
}
|
|
814
840
|
).join(", ");
|
|
815
|
-
const l = (
|
|
816
|
-
(
|
|
841
|
+
const l = (c = b.value) == null ? void 0 : c.find(
|
|
842
|
+
(d) => d[t.optionValueKey] === t.modelValue
|
|
817
843
|
);
|
|
818
|
-
return
|
|
819
|
-
}),
|
|
844
|
+
return V(t.modelValue) || l == null ? void 0 : l[t.optionInputValueKey];
|
|
845
|
+
}), Q = h(
|
|
820
846
|
() => t.listPosition.includes("bottom") ? "maz-slide" : "maz-slideinvert"
|
|
821
|
-
),
|
|
822
|
-
function
|
|
823
|
-
return
|
|
847
|
+
), x = E(""), s = E("");
|
|
848
|
+
function F(l, c) {
|
|
849
|
+
return c && l && me(l).includes(me(c));
|
|
824
850
|
}
|
|
825
|
-
function
|
|
826
|
-
var
|
|
827
|
-
return l ? (
|
|
828
|
-
const
|
|
829
|
-
return
|
|
830
|
-
}) :
|
|
851
|
+
function _(l) {
|
|
852
|
+
var c;
|
|
853
|
+
return l ? (c = b.value) == null ? void 0 : c.filter((d) => {
|
|
854
|
+
const m = d[t.optionLabelKey], I = d[t.optionValueKey], O = d[t.optionInputValueKey], R = t.searchThreshold;
|
|
855
|
+
return F(m, l) || F(O, l) || F(I, l) || typeof m == "string" && ve(m, l, R).isMatching.value || typeof O == "string" && ve(O, l, R).isMatching.value || typeof I == "string" && ve(I, l, R).isMatching.value;
|
|
856
|
+
}) : b.value;
|
|
831
857
|
}
|
|
832
|
-
const
|
|
833
|
-
async function
|
|
834
|
-
var
|
|
858
|
+
const G = h(() => _(x.value));
|
|
859
|
+
async function ae(l) {
|
|
860
|
+
var d, m;
|
|
835
861
|
if (!w.value)
|
|
836
862
|
return;
|
|
837
|
-
if (l && ("relatedTarget" in l && ((
|
|
863
|
+
if (l && ("relatedTarget" in l && ((d = C.value) != null && d.contains(l.relatedTarget)) || l.type === "keydown"))
|
|
838
864
|
return l.preventDefault();
|
|
839
|
-
const
|
|
840
|
-
if ((
|
|
865
|
+
const c = l && "relatedTarget" in l && l.relatedTarget instanceof HTMLElement && l.relatedTarget.getAttribute("id");
|
|
866
|
+
if ((m = t.excludeSelectors) != null && m.includes(`#${c}`))
|
|
841
867
|
return l == null ? void 0 : l.preventDefault();
|
|
842
|
-
await
|
|
868
|
+
await ue(), L.value = !1, g.value = 0, r("close", l);
|
|
843
869
|
}
|
|
844
|
-
async function
|
|
845
|
-
t.disabled || w.value || (l == null || l.preventDefault(), L.value = !0, await
|
|
870
|
+
async function ie(l) {
|
|
871
|
+
t.disabled || w.value || (l == null || l.preventDefault(), L.value = !0, await pe(), r("focus", l), r("open", L.value));
|
|
846
872
|
}
|
|
847
873
|
function we() {
|
|
848
|
-
var l,
|
|
849
|
-
(
|
|
850
|
-
}
|
|
851
|
-
function De() {
|
|
852
|
-
var l, d;
|
|
853
|
-
(d = ((l = W.value) == null ? void 0 : l.$el).querySelector("input")) == null || d.dispatchEvent(new Event("input"));
|
|
874
|
+
var l, c;
|
|
875
|
+
(c = ((l = W.value) == null ? void 0 : l.$el).querySelector("input")) == null || c.focus();
|
|
854
876
|
}
|
|
855
|
-
function Re(
|
|
856
|
-
|
|
877
|
+
function Re() {
|
|
878
|
+
var l, c;
|
|
879
|
+
(c = ((l = W.value) == null ? void 0 : l.$el).querySelector("input")) == null || c.dispatchEvent(new Event("input"));
|
|
857
880
|
}
|
|
858
881
|
function qe(l) {
|
|
859
|
-
|
|
860
|
-
|
|
882
|
+
L.value ? ae(l) : we();
|
|
883
|
+
}
|
|
884
|
+
function Ye(l) {
|
|
885
|
+
var c, d;
|
|
886
|
+
x.value = l, (d = ((c = X.value) == null ? void 0 : c.$el).querySelector("input")) == null || d.focus();
|
|
861
887
|
}
|
|
862
888
|
function je(l) {
|
|
863
|
-
var
|
|
864
|
-
l === "Backspace" &&
|
|
865
|
-
const
|
|
866
|
-
|
|
867
|
-
(
|
|
868
|
-
), typeof
|
|
869
|
-
|
|
889
|
+
var d;
|
|
890
|
+
l === "Backspace" && s.value.length > 0 ? s.value = s.value.slice(0, -1) : s.value += l;
|
|
891
|
+
const c = _(s.value);
|
|
892
|
+
c != null && c.length && (g.value = (d = G.value) == null ? void 0 : d.findIndex(
|
|
893
|
+
(m) => m[t.optionValueKey] === c[0][t.optionValueKey]
|
|
894
|
+
), typeof g.value == "number" && g.value >= 0 && pe(g.value)), Vo(() => {
|
|
895
|
+
s.value = "";
|
|
870
896
|
}, 1e3);
|
|
871
897
|
}
|
|
872
|
-
function
|
|
873
|
-
const
|
|
874
|
-
/^[\dA-Za-z\u0400-\u04FF]$/.test(
|
|
898
|
+
function We(l) {
|
|
899
|
+
const c = l.key;
|
|
900
|
+
/^[\dA-Za-z\u0400-\u04FF]$/.test(c) ? (l.preventDefault(), ie(l), t.search ? Ye(c) : je(c)) : Se(l);
|
|
875
901
|
}
|
|
876
|
-
function Se(l,
|
|
877
|
-
const
|
|
878
|
-
|
|
902
|
+
function Se(l, c = !0) {
|
|
903
|
+
const d = l.code, m = ["ArrowUp", "ArrowDown"].includes(d), I = (c ? ["Enter", "Space"] : ["Enter"]).includes(d), O = d === "Escape" && w.value;
|
|
904
|
+
m ? Qe(l, g.value) : I ? Ge(l, g.value) : O && ae(l);
|
|
879
905
|
}
|
|
880
|
-
function
|
|
906
|
+
function Qe(l, c) {
|
|
881
907
|
var I;
|
|
882
908
|
l.preventDefault();
|
|
883
|
-
const
|
|
884
|
-
w.value ||
|
|
885
|
-
const
|
|
886
|
-
|
|
909
|
+
const d = l.code;
|
|
910
|
+
w.value || ie(l);
|
|
911
|
+
const m = (I = G.value) == null ? void 0 : I.length;
|
|
912
|
+
m && (typeof c == "number" ? c === m - 1 && d === "ArrowDown" ? g.value = 0 : c === 0 && d === "ArrowUp" ? g.value = m - 1 : g.value = d === "ArrowDown" ? c + 1 : c - 1 : g.value = d === "ArrowDown" ? 0 : m - 1, pe(g.value));
|
|
887
913
|
}
|
|
888
|
-
function
|
|
889
|
-
var
|
|
890
|
-
if (
|
|
891
|
-
return
|
|
892
|
-
|
|
893
|
-
|
|
914
|
+
function Ge(l, c) {
|
|
915
|
+
var m, I, O;
|
|
916
|
+
if (!w.value)
|
|
917
|
+
return;
|
|
918
|
+
l.preventDefault();
|
|
919
|
+
const d = c ? ((m = G.value) == null ? void 0 : m[c]) ?? ((I = G.value) == null ? void 0 : I[0]) : (O = G.value) == null ? void 0 : O[0];
|
|
920
|
+
V(d) || Ve(d);
|
|
894
921
|
}
|
|
895
|
-
async function
|
|
896
|
-
var
|
|
897
|
-
await
|
|
898
|
-
const
|
|
899
|
-
if (typeof
|
|
900
|
-
const I = (
|
|
901
|
-
(
|
|
922
|
+
async function pe(l) {
|
|
923
|
+
var d, m;
|
|
924
|
+
await ue(), typeof l != "number" && fe();
|
|
925
|
+
const c = l ?? g.value;
|
|
926
|
+
if (typeof c == "number" && c >= 0) {
|
|
927
|
+
const I = (d = n.value) == null ? void 0 : d.querySelectorAll(".m-select-list-item");
|
|
928
|
+
(m = I == null ? void 0 : I[c]) == null || m.scrollIntoView({
|
|
902
929
|
behavior: "auto",
|
|
903
930
|
block: "nearest",
|
|
904
931
|
inline: "start"
|
|
905
932
|
});
|
|
906
933
|
}
|
|
907
934
|
}
|
|
908
|
-
function
|
|
909
|
-
var
|
|
910
|
-
const
|
|
911
|
-
var I,
|
|
912
|
-
return t.multiple && Array.isArray(t.modelValue) ? l ? l[t.optionValueKey] ===
|
|
935
|
+
function fe(l) {
|
|
936
|
+
var d;
|
|
937
|
+
const c = (d = G.value) == null ? void 0 : d.findIndex((m) => {
|
|
938
|
+
var I, O;
|
|
939
|
+
return t.multiple && Array.isArray(t.modelValue) ? l ? l[t.optionValueKey] === m[t.optionValueKey] : [...t.modelValue].reverse()[0] === m[t.optionValueKey] : ((O = (I = S.value) == null ? void 0 : I[0]) == null ? void 0 : O[t.optionValueKey]) === m[t.optionValueKey];
|
|
913
940
|
});
|
|
914
|
-
|
|
941
|
+
g.value = c && c >= 0 ? c : 0;
|
|
915
942
|
}
|
|
916
|
-
function Ve(l,
|
|
917
|
-
var
|
|
918
|
-
|
|
919
|
-
const
|
|
943
|
+
function Ve(l, c = !0) {
|
|
944
|
+
var O;
|
|
945
|
+
c && !t.multiple && ue(() => ae()), x.value = "";
|
|
946
|
+
const d = (O = S.value) == null ? void 0 : O.some(
|
|
920
947
|
(R) => R[t.optionValueKey] === l[t.optionValueKey]
|
|
921
948
|
);
|
|
922
|
-
let
|
|
923
|
-
|
|
949
|
+
let m = S.value;
|
|
950
|
+
d && t.multiple ? m = m == null ? void 0 : m.filter(
|
|
924
951
|
(R) => R[t.optionValueKey] !== l[t.optionValueKey]
|
|
925
|
-
) : t.multiple ?
|
|
926
|
-
const I =
|
|
927
|
-
r("update:model-value", t.multiple ? I : I[0]), r("selected-option", l),
|
|
952
|
+
) : t.multiple ? m.push(l) : m = [l];
|
|
953
|
+
const I = m.map((R) => R[t.optionValueKey]);
|
|
954
|
+
r("update:model-value", t.multiple ? I : I[0]), r("selected-option", l), Re(), fe(l), we();
|
|
928
955
|
}
|
|
929
|
-
return (l,
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
"
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
class
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
956
|
+
return (l, c) => ze((y(), P(
|
|
957
|
+
"div",
|
|
958
|
+
{
|
|
959
|
+
ref_key: "mazSelectElement",
|
|
960
|
+
ref: C,
|
|
961
|
+
class: T(["m-select", [
|
|
962
|
+
{ "--is-open": w.value, "--disabled": l.disabled, "--block": l.block },
|
|
963
|
+
t.class,
|
|
964
|
+
`--${l.size}`
|
|
965
|
+
]]),
|
|
966
|
+
style: oe([l.style, { "--keyboard-selected-bg-color": z.value, "--selected-bg-color": f.value, "--selected-text-color": i.value }])
|
|
967
|
+
},
|
|
968
|
+
[
|
|
969
|
+
U(Ce, le({
|
|
970
|
+
id: k(H),
|
|
971
|
+
ref_key: "mazInputComponent",
|
|
972
|
+
ref: W,
|
|
973
|
+
class: "m-select-input"
|
|
974
|
+
}, l.$attrs, {
|
|
975
|
+
required: l.required,
|
|
976
|
+
"border-active": L.value,
|
|
977
|
+
color: l.color,
|
|
978
|
+
"model-value": M.value,
|
|
979
|
+
size: l.size,
|
|
980
|
+
block: "",
|
|
981
|
+
autocomplete: l.autocomplete,
|
|
982
|
+
disabled: l.disabled,
|
|
983
|
+
onFocus: se(ie, ["prevent", "stop"]),
|
|
984
|
+
onBlur: se(ae, ["prevent", "stop"]),
|
|
985
|
+
onClick: se(ie, ["prevent", "stop"]),
|
|
986
|
+
onChange: c[0] || (c[0] = (d) => r("change", d)),
|
|
987
|
+
onInput: c[1] || (c[1] = (d) => r("input", d)),
|
|
988
|
+
onKeydown: We
|
|
989
|
+
}), {
|
|
990
|
+
"right-icon": J(() => [
|
|
991
|
+
Y("button", {
|
|
992
|
+
tabindex: "-1",
|
|
993
|
+
type: "button",
|
|
994
|
+
class: "m-select-input__toggle-button maz-custom",
|
|
995
|
+
"aria-label": `${w.value ? "collapse" : "expand"} list of options`,
|
|
996
|
+
onClick: se(qe, ["stop"])
|
|
997
|
+
}, [
|
|
998
|
+
U(k(p), { class: "m-select-chevron maz-text-xl" })
|
|
999
|
+
], 8, Mo)
|
|
1000
|
+
]),
|
|
1001
|
+
_: 1
|
|
1002
|
+
/* STABLE */
|
|
1003
|
+
}, 16, ["id", "required", "border-active", "color", "model-value", "size", "autocomplete", "disabled"]),
|
|
1004
|
+
U(lo, { name: Q.value }, {
|
|
1005
|
+
default: J(() => [
|
|
1006
|
+
w.value ? (y(), P(
|
|
1007
|
+
"div",
|
|
1008
|
+
{
|
|
1009
|
+
key: 0,
|
|
1010
|
+
ref_key: "optionsListElement",
|
|
1011
|
+
ref: n,
|
|
1012
|
+
class: T(["m-select-list", {
|
|
1013
|
+
"--top": l.listPosition.includes("top"),
|
|
1014
|
+
"--left": l.listPosition.includes("left"),
|
|
1015
|
+
"--right": l.listPosition.includes("right"),
|
|
1016
|
+
"--bottom": l.listPosition.includes("bottom")
|
|
1017
|
+
}]),
|
|
1018
|
+
style: oe({
|
|
1019
|
+
maxHeight: `${l.maxListHeight}px`,
|
|
1020
|
+
maxWidth: `${l.maxListWidth}px`,
|
|
1021
|
+
minHeight: `${l.minListHeight}px`,
|
|
1022
|
+
minWidth: `${l.minListWidth}px`
|
|
1023
|
+
})
|
|
1024
|
+
},
|
|
1025
|
+
[
|
|
1026
|
+
l.search ? (y(), K(Ce, {
|
|
984
1027
|
key: 0,
|
|
985
|
-
ref_key: "
|
|
986
|
-
ref:
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
name: "search",
|
|
1014
|
-
inputmode: "search",
|
|
1015
|
-
autocomplete: "off",
|
|
1016
|
-
tabindex: "-1",
|
|
1017
|
-
class: "m-select-list__search-input maz-flex-none",
|
|
1018
|
-
"left-icon": P(v),
|
|
1019
|
-
onKeydown: d[3] || (d[3] = (c) => Se(c, !1))
|
|
1020
|
-
}, null, 8, ["modelValue", "color", "placeholder", "left-icon"])) : $("v-if", !0),
|
|
1021
|
-
!Q.value || Q.value.length <= 0 ? N(l.$slots, "no-results", { key: 1 }, () => [
|
|
1022
|
-
j("span", Fo, [
|
|
1023
|
-
H(P(O), { class: "maz-h-6 maz-w-6 maz-text-normal" })
|
|
1024
|
-
])
|
|
1025
|
-
], !0) : (b(), E("div", No, [
|
|
1026
|
-
(b(!0), E(
|
|
1028
|
+
ref_key: "searchInputComponent",
|
|
1029
|
+
ref: X,
|
|
1030
|
+
modelValue: x.value,
|
|
1031
|
+
"onUpdate:modelValue": [
|
|
1032
|
+
c[2] || (c[2] = (d) => x.value = d),
|
|
1033
|
+
c[4] || (c[4] = (d) => g.value = 0)
|
|
1034
|
+
],
|
|
1035
|
+
size: "sm",
|
|
1036
|
+
color: l.color,
|
|
1037
|
+
placeholder: l.searchPlaceholder,
|
|
1038
|
+
name: "search",
|
|
1039
|
+
inputmode: "search",
|
|
1040
|
+
block: "",
|
|
1041
|
+
autocomplete: "off",
|
|
1042
|
+
tabindex: "-1",
|
|
1043
|
+
class: "m-select-list__search-input maz-flex-none",
|
|
1044
|
+
"left-icon": k(v),
|
|
1045
|
+
onKeydown: c[3] || (c[3] = (d) => Se(d, !1))
|
|
1046
|
+
}, null, 8, ["modelValue", "color", "placeholder", "left-icon"])) : $("v-if", !0),
|
|
1047
|
+
!G.value || G.value.length <= 0 ? N(l.$slots, "no-results", { key: 1 }, () => [
|
|
1048
|
+
Y("span", To, [
|
|
1049
|
+
U(k(B), { class: "maz-h-6 maz-w-6 maz-text-normal" })
|
|
1050
|
+
])
|
|
1051
|
+
], !0) : (y(), P("div", Fo, [
|
|
1052
|
+
(y(!0), P(
|
|
1053
|
+
be,
|
|
1054
|
+
null,
|
|
1055
|
+
Be(G.value, (d, m) => (y(), P(
|
|
1027
1056
|
be,
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1057
|
+
{ key: m },
|
|
1058
|
+
[
|
|
1059
|
+
d.label && d.isOptGroup ? N(l.$slots, "optgroup", {
|
|
1060
|
+
key: 0,
|
|
1061
|
+
label: d.label
|
|
1062
|
+
}, () => [
|
|
1063
|
+
Y(
|
|
1064
|
+
"span",
|
|
1065
|
+
No,
|
|
1066
|
+
te(d.label),
|
|
1067
|
+
1
|
|
1068
|
+
/* TEXT */
|
|
1069
|
+
)
|
|
1070
|
+
], !0) : (y(), P("button", {
|
|
1071
|
+
key: 1,
|
|
1072
|
+
tabindex: "-1",
|
|
1073
|
+
type: "button",
|
|
1074
|
+
class: T(["m-select-list-item maz-custom maz-flex-none", [
|
|
1075
|
+
{
|
|
1076
|
+
"--is-keyboard-selected": g.value === m,
|
|
1077
|
+
"--is-selected": D(d),
|
|
1078
|
+
"--is-none-value": V(d[l.optionValueKey])
|
|
1079
|
+
}
|
|
1080
|
+
]]),
|
|
1081
|
+
style: oe(l.itemHeight ? { height: `${l.itemHeight}px` } : void 0),
|
|
1082
|
+
onClick: se((I) => Ve(d), ["prevent", "stop"])
|
|
1083
|
+
}, [
|
|
1084
|
+
l.multiple ? (y(), K(k(u), {
|
|
1034
1085
|
key: 0,
|
|
1035
|
-
|
|
1086
|
+
tabindex: "-1",
|
|
1087
|
+
"model-value": D(d),
|
|
1088
|
+
size: "sm",
|
|
1089
|
+
color: l.color
|
|
1090
|
+
}, null, 8, ["model-value", "color"])) : $("v-if", !0),
|
|
1091
|
+
N(l.$slots, "default", {
|
|
1092
|
+
option: d,
|
|
1093
|
+
isSelected: D(d)
|
|
1036
1094
|
}, () => [
|
|
1037
|
-
|
|
1095
|
+
Y(
|
|
1038
1096
|
"span",
|
|
1039
|
-
|
|
1040
|
-
|
|
1097
|
+
null,
|
|
1098
|
+
te(d[l.optionLabelKey]),
|
|
1041
1099
|
1
|
|
1042
1100
|
/* TEXT */
|
|
1043
1101
|
)
|
|
1044
|
-
], !0)
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
null,
|
|
1072
|
-
ue(c[l.optionLabelKey]),
|
|
1073
|
-
1
|
|
1074
|
-
/* TEXT */
|
|
1075
|
-
)
|
|
1076
|
-
], !0)
|
|
1077
|
-
], 14, Uo))
|
|
1078
|
-
],
|
|
1079
|
-
64
|
|
1080
|
-
/* STABLE_FRAGMENT */
|
|
1081
|
-
))),
|
|
1082
|
-
128
|
|
1083
|
-
/* KEYED_FRAGMENT */
|
|
1084
|
-
))
|
|
1085
|
-
]))
|
|
1086
|
-
],
|
|
1087
|
-
6
|
|
1088
|
-
/* CLASS, STYLE */
|
|
1089
|
-
)) : $("v-if", !0)
|
|
1090
|
-
]),
|
|
1091
|
-
_: 3
|
|
1092
|
-
/* FORWARDED */
|
|
1093
|
-
}, 8, ["name"])
|
|
1094
|
-
],
|
|
1095
|
-
6
|
|
1096
|
-
/* CLASS, STYLE */
|
|
1097
|
-
)), [
|
|
1098
|
-
[P(Vo), {
|
|
1099
|
-
exclude: (m = l.excludeSelectors) != null && m.length ? l.excludeSelectors : [],
|
|
1100
|
-
handler: le
|
|
1101
|
-
}]
|
|
1102
|
-
]);
|
|
1103
|
-
};
|
|
1102
|
+
], !0)
|
|
1103
|
+
], 14, Ko))
|
|
1104
|
+
],
|
|
1105
|
+
64
|
|
1106
|
+
/* STABLE_FRAGMENT */
|
|
1107
|
+
))),
|
|
1108
|
+
128
|
|
1109
|
+
/* KEYED_FRAGMENT */
|
|
1110
|
+
))
|
|
1111
|
+
]))
|
|
1112
|
+
],
|
|
1113
|
+
6
|
|
1114
|
+
/* CLASS, STYLE */
|
|
1115
|
+
)) : $("v-if", !0)
|
|
1116
|
+
]),
|
|
1117
|
+
_: 3
|
|
1118
|
+
/* FORWARDED */
|
|
1119
|
+
}, 8, ["name"])
|
|
1120
|
+
],
|
|
1121
|
+
6
|
|
1122
|
+
/* CLASS, STYLE */
|
|
1123
|
+
)), [
|
|
1124
|
+
[k(So), {
|
|
1125
|
+
exclude: l.excludeSelectors,
|
|
1126
|
+
handler: ae
|
|
1127
|
+
}]
|
|
1128
|
+
]);
|
|
1104
1129
|
}
|
|
1105
|
-
}),
|
|
1106
|
-
function
|
|
1130
|
+
}), Ho = /* @__PURE__ */ re(Uo, [["__scopeId", "data-v-07cbef8c"]]);
|
|
1131
|
+
function Ue() {
|
|
1107
1132
|
if (typeof window > "u")
|
|
1108
1133
|
return;
|
|
1109
1134
|
const a = window.navigator.language;
|
|
@@ -1116,30 +1141,30 @@ function Ke() {
|
|
|
1116
1141
|
};
|
|
1117
1142
|
}
|
|
1118
1143
|
let ge, $e;
|
|
1119
|
-
function
|
|
1144
|
+
function Do(a, o, e) {
|
|
1120
1145
|
return e != null && e[o] ? e[o] : (($e !== a || !ge) && ($e = a, ge = new Intl.DisplayNames([a], { type: "region" })), ge.of(o));
|
|
1121
1146
|
}
|
|
1122
|
-
function
|
|
1147
|
+
function Ro(a, o) {
|
|
1123
1148
|
var r;
|
|
1124
|
-
const e = [], t =
|
|
1125
|
-
a = a ?? ((r =
|
|
1149
|
+
const e = [], t = Me();
|
|
1150
|
+
a = a ?? ((r = Ue()) == null ? void 0 : r.browserLocale) ?? "en-US";
|
|
1126
1151
|
for (const u of t) {
|
|
1127
|
-
const v =
|
|
1152
|
+
const v = Do(a, u, o);
|
|
1128
1153
|
if (v)
|
|
1129
1154
|
try {
|
|
1130
|
-
const
|
|
1155
|
+
const p = ce(u);
|
|
1131
1156
|
e.push({
|
|
1132
1157
|
iso2: u,
|
|
1133
|
-
dialCode:
|
|
1158
|
+
dialCode: p,
|
|
1134
1159
|
name: v
|
|
1135
1160
|
});
|
|
1136
|
-
} catch (
|
|
1137
|
-
console.error(`[MazPhoneNumberInput](getCountryCallingCode) ${
|
|
1161
|
+
} catch (p) {
|
|
1162
|
+
console.error(`[MazPhoneNumberInput](getCountryCallingCode) ${p}`);
|
|
1138
1163
|
}
|
|
1139
1164
|
}
|
|
1140
1165
|
return e;
|
|
1141
1166
|
}
|
|
1142
|
-
async function
|
|
1167
|
+
async function qo() {
|
|
1143
1168
|
try {
|
|
1144
1169
|
const a = await fetch("https://ipwho.is"), { country_code: o } = await a.json();
|
|
1145
1170
|
return o;
|
|
@@ -1153,18 +1178,18 @@ function Yo(a) {
|
|
|
1153
1178
|
const o = new RegExp(/[^\d ()+-]/g);
|
|
1154
1179
|
return a.replaceAll(o, "").trim();
|
|
1155
1180
|
}
|
|
1156
|
-
function
|
|
1181
|
+
function He() {
|
|
1157
1182
|
return {
|
|
1158
1183
|
sanitizePhoneNumber: Yo,
|
|
1159
|
-
fetchCountryCode:
|
|
1160
|
-
getBrowserLocale:
|
|
1161
|
-
getCountriesList:
|
|
1184
|
+
fetchCountryCode: qo,
|
|
1185
|
+
getBrowserLocale: Ue,
|
|
1186
|
+
getCountriesList: Ro
|
|
1162
1187
|
};
|
|
1163
1188
|
}
|
|
1164
|
-
const
|
|
1189
|
+
const jo = ["id"], Wo = {
|
|
1165
1190
|
key: 0,
|
|
1166
1191
|
class: "m-country-selector__select__item__flag-container"
|
|
1167
|
-
},
|
|
1192
|
+
}, Qo = /* @__PURE__ */ ne({
|
|
1168
1193
|
__name: "CountrySelector",
|
|
1169
1194
|
props: {
|
|
1170
1195
|
style: { default: void 0 },
|
|
@@ -1193,75 +1218,75 @@ const Wo = ["id"], Qo = {
|
|
|
1193
1218
|
},
|
|
1194
1219
|
emits: ["update:model-value"],
|
|
1195
1220
|
setup(a) {
|
|
1196
|
-
const o = a, { phoneNumber: e } =
|
|
1221
|
+
const o = a, { phoneNumber: e } = Te("data"), t = E(), { getCountriesList: r } = He(), u = h(() => r(o.countryLocale, o.customCountriesList)), v = h(
|
|
1197
1222
|
() => {
|
|
1198
1223
|
var i;
|
|
1199
|
-
return (i = u.value) == null ? void 0 : i.filter((
|
|
1224
|
+
return (i = u.value) == null ? void 0 : i.filter((f) => {
|
|
1200
1225
|
var z;
|
|
1201
|
-
return !((z = o.ignoredCountries) != null && z.includes(
|
|
1226
|
+
return !((z = o.ignoredCountries) != null && z.includes(f.iso2));
|
|
1202
1227
|
});
|
|
1203
1228
|
}
|
|
1204
|
-
),
|
|
1229
|
+
), p = h(() => {
|
|
1205
1230
|
const i = o.onlyCountries || o.preferredCountries;
|
|
1206
1231
|
return i == null ? void 0 : i.map(
|
|
1207
|
-
(
|
|
1232
|
+
(f) => {
|
|
1208
1233
|
var z;
|
|
1209
|
-
return (z = v.value) == null ? void 0 : z.find((w) => w.iso2.includes(
|
|
1234
|
+
return (z = v.value) == null ? void 0 : z.find((w) => w.iso2.includes(f));
|
|
1210
1235
|
}
|
|
1211
1236
|
);
|
|
1212
|
-
}),
|
|
1237
|
+
}), B = h(
|
|
1213
1238
|
() => {
|
|
1214
1239
|
var i;
|
|
1215
|
-
return (i = v.value) == null ? void 0 : i.filter((
|
|
1240
|
+
return (i = v.value) == null ? void 0 : i.filter((f) => {
|
|
1216
1241
|
var z;
|
|
1217
|
-
return !((z = o.preferredCountries) != null && z.includes(
|
|
1242
|
+
return !((z = o.preferredCountries) != null && z.includes(f.iso2));
|
|
1218
1243
|
});
|
|
1219
1244
|
}
|
|
1220
1245
|
), L = h(
|
|
1221
|
-
() => o.preferredCountries ? [...
|
|
1222
|
-
),
|
|
1246
|
+
() => o.preferredCountries ? [...p.value ?? [], ...B.value ?? []] : o.onlyCountries ? p.value : v.value
|
|
1247
|
+
), g = h(
|
|
1223
1248
|
() => {
|
|
1224
1249
|
var i;
|
|
1225
1250
|
return (i = L.value) == null ? void 0 : i.map(
|
|
1226
|
-
(
|
|
1227
|
-
...
|
|
1228
|
-
dialCode: `+${
|
|
1251
|
+
(f) => f ? {
|
|
1252
|
+
...f,
|
|
1253
|
+
dialCode: `+${f.dialCode}`
|
|
1229
1254
|
} : void 0
|
|
1230
|
-
).filter(
|
|
1255
|
+
).filter(co);
|
|
1231
1256
|
}
|
|
1232
1257
|
);
|
|
1233
|
-
|
|
1234
|
-
var i
|
|
1235
|
-
(
|
|
1258
|
+
function A() {
|
|
1259
|
+
var i;
|
|
1260
|
+
(i = t.value) == null || i.openList();
|
|
1236
1261
|
}
|
|
1237
|
-
return (i,
|
|
1262
|
+
return (i, f) => (y(), P(
|
|
1238
1263
|
"div",
|
|
1239
1264
|
{
|
|
1240
|
-
class:
|
|
1241
|
-
style:
|
|
1265
|
+
class: T(["m-country-selector", [o.class, { "--no-flags": i.noFlags }]]),
|
|
1266
|
+
style: oe(i.style)
|
|
1242
1267
|
},
|
|
1243
1268
|
[
|
|
1244
|
-
i.modelValue && !i.noFlags ? (
|
|
1269
|
+
i.modelValue && !i.noFlags ? (y(), P("button", {
|
|
1245
1270
|
key: 0,
|
|
1246
1271
|
id: `country-selector-flag-button-${i.id}`,
|
|
1247
|
-
class:
|
|
1272
|
+
class: T(["m-country-selector__country-flag", {
|
|
1248
1273
|
"--should-have-bottom-flag": i.locales.countrySelector.placeholder.length > 0
|
|
1249
1274
|
}]),
|
|
1250
1275
|
tabindex: "-1",
|
|
1251
1276
|
type: "button",
|
|
1252
|
-
onClick:
|
|
1277
|
+
onClick: A
|
|
1253
1278
|
}, [
|
|
1254
1279
|
N(i.$slots, "selector-flag", { countryCode: i.modelValue }, () => [
|
|
1255
|
-
|
|
1256
|
-
src:
|
|
1280
|
+
U(Ee, {
|
|
1281
|
+
src: k(Le)(i.modelValue, "h20"),
|
|
1257
1282
|
alt: i.modelValue,
|
|
1258
1283
|
width: "20",
|
|
1259
1284
|
height: "20",
|
|
1260
1285
|
"img-class": "maz-w-5 maz-h-4 maz-rounded-sm"
|
|
1261
1286
|
}, null, 8, ["src", "alt"])
|
|
1262
1287
|
], !0)
|
|
1263
|
-
], 10,
|
|
1264
|
-
|
|
1288
|
+
], 10, jo)) : $("v-if", !0),
|
|
1289
|
+
U(Ho, le({
|
|
1265
1290
|
id: `country-selector-${i.id}`,
|
|
1266
1291
|
ref_key: "CountrySelectorRef",
|
|
1267
1292
|
ref: t,
|
|
@@ -1271,6 +1296,7 @@ const Wo = ["id"], Qo = {
|
|
|
1271
1296
|
"option-value-key": "iso2",
|
|
1272
1297
|
"option-label-key": "name",
|
|
1273
1298
|
"option-input-value-key": i.countrySelectorDisplayName ? "name" : "dialCode",
|
|
1299
|
+
name: "country",
|
|
1274
1300
|
"max-list-width": 250,
|
|
1275
1301
|
"min-list-width": 200,
|
|
1276
1302
|
disabled: i.disabled,
|
|
@@ -1283,35 +1309,35 @@ const Wo = ["id"], Qo = {
|
|
|
1283
1309
|
search: !i.noSearch,
|
|
1284
1310
|
"search-placeholder": i.locales.countrySelector.searchPlaceholder,
|
|
1285
1311
|
"search-threshold": i.searchThreshold,
|
|
1286
|
-
options:
|
|
1287
|
-
hint:
|
|
1312
|
+
options: g.value,
|
|
1313
|
+
hint: k(e) && !i.modelValue ? i.locales.countrySelector.error : void 0,
|
|
1288
1314
|
label: i.locales.countrySelector.placeholder,
|
|
1289
1315
|
style: {
|
|
1290
1316
|
width: i.width
|
|
1291
1317
|
},
|
|
1292
1318
|
"exclude-selectors": [`#country-selector-flag-button-${i.id}`, ...i.excludeSelectors ?? []],
|
|
1293
|
-
"onUpdate:modelValue":
|
|
1319
|
+
"onUpdate:modelValue": f[0] || (f[0] = (z) => i.$emit("update:model-value", z))
|
|
1294
1320
|
}), {
|
|
1295
|
-
"no-results":
|
|
1321
|
+
"no-results": J(() => [
|
|
1296
1322
|
N(i.$slots, "no-results", {}, void 0, !0)
|
|
1297
1323
|
]),
|
|
1298
|
-
default:
|
|
1299
|
-
|
|
1324
|
+
default: J(({ option: z, isSelected: w }) => [
|
|
1325
|
+
Y(
|
|
1300
1326
|
"div",
|
|
1301
1327
|
{
|
|
1302
|
-
class:
|
|
1328
|
+
class: T(["m-country-selector__select__item", {
|
|
1303
1329
|
"m-country-selector__select__item--selected": w
|
|
1304
1330
|
}])
|
|
1305
1331
|
},
|
|
1306
1332
|
[
|
|
1307
|
-
!i.noFlags && typeof z.iso2 == "string" ? (
|
|
1333
|
+
!i.noFlags && typeof z.iso2 == "string" ? (y(), P("span", Wo, [
|
|
1308
1334
|
N(i.$slots, "country-list-flag", {
|
|
1309
1335
|
countryCode: z.iso2,
|
|
1310
1336
|
option: z,
|
|
1311
1337
|
isSelected: w
|
|
1312
1338
|
}, () => [
|
|
1313
|
-
|
|
1314
|
-
src:
|
|
1339
|
+
U(Ee, {
|
|
1340
|
+
src: k(Le)(z.iso2, "h20"),
|
|
1315
1341
|
alt: `${z.name} flag`,
|
|
1316
1342
|
width: "20",
|
|
1317
1343
|
height: "20",
|
|
@@ -1319,22 +1345,22 @@ const Wo = ["id"], Qo = {
|
|
|
1319
1345
|
}, null, 8, ["src", "alt"])
|
|
1320
1346
|
], !0)
|
|
1321
1347
|
])) : $("v-if", !0),
|
|
1322
|
-
i.showCodeOnList ? (
|
|
1348
|
+
i.showCodeOnList ? (y(), P(
|
|
1323
1349
|
"span",
|
|
1324
1350
|
{
|
|
1325
1351
|
key: 1,
|
|
1326
|
-
class:
|
|
1352
|
+
class: T(["maz-w-9 maz-flex-none", { "maz-text-muted": !w }])
|
|
1327
1353
|
},
|
|
1328
|
-
|
|
1354
|
+
te(z.dialCode),
|
|
1329
1355
|
3
|
|
1330
1356
|
/* TEXT, CLASS */
|
|
1331
1357
|
)) : $("v-if", !0),
|
|
1332
|
-
|
|
1358
|
+
Y(
|
|
1333
1359
|
"span",
|
|
1334
1360
|
{
|
|
1335
|
-
class:
|
|
1361
|
+
class: T(["maz-flex-1 maz-truncate", { "maz-font-semibold": w }])
|
|
1336
1362
|
},
|
|
1337
|
-
|
|
1363
|
+
te(z.name),
|
|
1338
1364
|
3
|
|
1339
1365
|
/* TEXT, CLASS */
|
|
1340
1366
|
)
|
|
@@ -1351,7 +1377,7 @@ const Wo = ["id"], Qo = {
|
|
|
1351
1377
|
/* CLASS, STYLE */
|
|
1352
1378
|
));
|
|
1353
1379
|
}
|
|
1354
|
-
}),
|
|
1380
|
+
}), Go = /* @__PURE__ */ re(Qo, [["__scopeId", "data-v-e2fee821"]]), Jo = {
|
|
1355
1381
|
countrySelector: {
|
|
1356
1382
|
placeholder: "Country code",
|
|
1357
1383
|
error: "Choose country",
|
|
@@ -1362,15 +1388,15 @@ const Wo = ["id"], Qo = {
|
|
|
1362
1388
|
example: "Example:"
|
|
1363
1389
|
}
|
|
1364
1390
|
};
|
|
1365
|
-
function
|
|
1391
|
+
function Zo(a) {
|
|
1366
1392
|
try {
|
|
1367
|
-
const o =
|
|
1393
|
+
const o = no(a);
|
|
1368
1394
|
return o || (console.error(`[maz-ui](MazPhoneNumberInput) The code country "${a}" is not available`), !1);
|
|
1369
1395
|
} catch (o) {
|
|
1370
1396
|
return console.error(`[maz-ui](MazPhoneNumberInput) ${o}`), !1;
|
|
1371
1397
|
}
|
|
1372
1398
|
}
|
|
1373
|
-
function
|
|
1399
|
+
function Xo({
|
|
1374
1400
|
phoneNumber: a,
|
|
1375
1401
|
countryCode: o
|
|
1376
1402
|
}) {
|
|
@@ -1380,10 +1406,10 @@ function xo({
|
|
|
1380
1406
|
isValid: !1,
|
|
1381
1407
|
countryCode: o
|
|
1382
1408
|
};
|
|
1383
|
-
const e =
|
|
1409
|
+
const e = ro(a, o ?? void 0), t = (e == null ? void 0 : e.isValid()) ?? !1;
|
|
1384
1410
|
return {
|
|
1385
|
-
countryCode:
|
|
1386
|
-
isValid:
|
|
1411
|
+
countryCode: e == null ? void 0 : e.country,
|
|
1412
|
+
isValid: t,
|
|
1387
1413
|
isPossible: e == null ? void 0 : e.isPossible(),
|
|
1388
1414
|
countryCallingCode: e == null ? void 0 : e.countryCallingCode,
|
|
1389
1415
|
nationalNumber: e == null ? void 0 : e.nationalNumber,
|
|
@@ -1393,49 +1419,50 @@ function xo({
|
|
|
1393
1419
|
uri: e == null ? void 0 : e.getURI(),
|
|
1394
1420
|
e164: e == null ? void 0 : e.format("E.164"),
|
|
1395
1421
|
rfc3966: e == null ? void 0 : e.format("RFC3966"),
|
|
1422
|
+
possibleCountries: e == null ? void 0 : e.getPossibleCountries(),
|
|
1396
1423
|
phoneNumber: a
|
|
1397
1424
|
};
|
|
1398
1425
|
} catch (e) {
|
|
1399
1426
|
throw new Error(`[MazPhoneNumberInput](getResultsFromPhoneNumber) ${e}`);
|
|
1400
1427
|
}
|
|
1401
1428
|
}
|
|
1402
|
-
function
|
|
1403
|
-
try {
|
|
1404
|
-
return o ? new uo(a).input(o) : "";
|
|
1405
|
-
} catch (e) {
|
|
1406
|
-
throw new Error(`[MazPhoneNumberInput](getAsYouTypeFormat) ${e}`);
|
|
1407
|
-
}
|
|
1408
|
-
}
|
|
1409
|
-
async function et() {
|
|
1429
|
+
async function xo() {
|
|
1410
1430
|
const { default: a } = await import("./examples.mobile.json-JpNGylGv.mjs");
|
|
1411
1431
|
return a;
|
|
1412
1432
|
}
|
|
1413
|
-
function
|
|
1433
|
+
function _o(a, o) {
|
|
1414
1434
|
var e;
|
|
1415
1435
|
try {
|
|
1416
|
-
return a && o ? (e =
|
|
1436
|
+
return a && o ? (e = io(o, a)) == null ? void 0 : e.formatNational() : void 0;
|
|
1417
1437
|
} catch (t) {
|
|
1418
1438
|
console.error(`[maz-ui](MazPhoneNumberInput) ${t}`);
|
|
1419
1439
|
}
|
|
1420
1440
|
}
|
|
1421
|
-
function
|
|
1441
|
+
function et(a, o) {
|
|
1442
|
+
try {
|
|
1443
|
+
return !o || !a ? void 0 : new uo(a).input(o);
|
|
1444
|
+
} catch (e) {
|
|
1445
|
+
throw new Error(`[MazPhoneNumberInput](getAsYouTypeFormat) ${e}`);
|
|
1446
|
+
}
|
|
1447
|
+
}
|
|
1448
|
+
function De() {
|
|
1422
1449
|
function a(o, e) {
|
|
1423
1450
|
return ce(o) === ce(e);
|
|
1424
1451
|
}
|
|
1425
1452
|
return {
|
|
1426
|
-
getAsYouTypeFormat:
|
|
1427
|
-
getPhoneNumberResults:
|
|
1428
|
-
getPhoneNumberExamplesFile:
|
|
1429
|
-
getPhoneNumberExample:
|
|
1453
|
+
getAsYouTypeFormat: et,
|
|
1454
|
+
getPhoneNumberResults: Xo,
|
|
1455
|
+
getPhoneNumberExamplesFile: xo,
|
|
1456
|
+
getPhoneNumberExample: _o,
|
|
1430
1457
|
isSameCountryCallingCode: a,
|
|
1431
|
-
isCountryAvailable:
|
|
1432
|
-
getCountries:
|
|
1458
|
+
isCountryAvailable: Zo,
|
|
1459
|
+
getCountries: Me,
|
|
1433
1460
|
getCountryCallingCode: ce
|
|
1434
1461
|
};
|
|
1435
1462
|
}
|
|
1436
|
-
const
|
|
1463
|
+
const ot = /* @__PURE__ */ ne({
|
|
1437
1464
|
__name: "PhoneInput",
|
|
1438
|
-
props: /* @__PURE__ */
|
|
1465
|
+
props: /* @__PURE__ */ Pe({
|
|
1439
1466
|
id: {},
|
|
1440
1467
|
color: {},
|
|
1441
1468
|
size: {},
|
|
@@ -1453,71 +1480,71 @@ const tt = /* @__PURE__ */ ne({
|
|
|
1453
1480
|
modelValue: {},
|
|
1454
1481
|
modelModifiers: {}
|
|
1455
1482
|
}),
|
|
1456
|
-
emits: /* @__PURE__ */
|
|
1483
|
+
emits: /* @__PURE__ */ Pe(["update:model-value"], ["update:modelValue"]),
|
|
1457
1484
|
setup(a, { emit: o }) {
|
|
1458
|
-
const e = a, t = o, r =
|
|
1459
|
-
function i(
|
|
1460
|
-
const C = v(
|
|
1485
|
+
const e = a, t = o, r = ao(a, "modelValue"), { getPhoneNumberExamplesFile: u, getPhoneNumberExample: v } = De(), { selectionRange: p, results: B, selectedCountry: L } = Te("data"), g = E(), A = E(!1);
|
|
1486
|
+
function i(b, S) {
|
|
1487
|
+
const C = v(b, S);
|
|
1461
1488
|
return C ? `${e.locales.phoneInput.example} ${C}` : void 0;
|
|
1462
1489
|
}
|
|
1463
|
-
const
|
|
1490
|
+
const f = h(() => {
|
|
1464
1491
|
var S;
|
|
1465
1492
|
if (e.label || e.placeholder)
|
|
1466
1493
|
return e.label || e.placeholder;
|
|
1467
|
-
const
|
|
1468
|
-
if (e.noExample || !
|
|
1469
|
-
return
|
|
1494
|
+
const b = e.locales.phoneInput.placeholder;
|
|
1495
|
+
if (e.noExample || !g.value)
|
|
1496
|
+
return b;
|
|
1470
1497
|
{
|
|
1471
|
-
const C = i(
|
|
1472
|
-
return (S =
|
|
1498
|
+
const C = i(g.value, L.value);
|
|
1499
|
+
return (S = B.value) != null && S.isValid || !C ? b : C;
|
|
1473
1500
|
}
|
|
1474
1501
|
}), z = h(() => e.placeholder ? {
|
|
1475
|
-
placeholder:
|
|
1502
|
+
placeholder: f.value
|
|
1476
1503
|
} : {
|
|
1477
|
-
label:
|
|
1478
|
-
}), w =
|
|
1479
|
-
async function
|
|
1504
|
+
label: f.value
|
|
1505
|
+
}), w = E();
|
|
1506
|
+
async function H() {
|
|
1480
1507
|
try {
|
|
1481
|
-
if (
|
|
1508
|
+
if (g.value)
|
|
1482
1509
|
return;
|
|
1483
|
-
|
|
1484
|
-
} catch (
|
|
1485
|
-
console.error("[maz-ui](MazPhoneNumberInput) while loading phone number examples file",
|
|
1510
|
+
g.value = await u();
|
|
1511
|
+
} catch (b) {
|
|
1512
|
+
console.error("[maz-ui](MazPhoneNumberInput) while loading phone number examples file", b);
|
|
1486
1513
|
}
|
|
1487
1514
|
}
|
|
1488
|
-
async function
|
|
1489
|
-
w.value &&
|
|
1515
|
+
async function j(b) {
|
|
1516
|
+
w.value && b && Z(w.value, b), await ue(), t("update:model-value", b);
|
|
1490
1517
|
}
|
|
1491
|
-
function
|
|
1492
|
-
const C =
|
|
1493
|
-
|
|
1518
|
+
function Z(b, S) {
|
|
1519
|
+
const C = b.$el.querySelector("input");
|
|
1520
|
+
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;
|
|
1494
1521
|
}
|
|
1495
1522
|
return Ie(() => {
|
|
1496
|
-
e.noExample ||
|
|
1497
|
-
}), (
|
|
1498
|
-
id:
|
|
1523
|
+
e.noExample || H();
|
|
1524
|
+
}), (b, S) => (y(), K(Ce, le({
|
|
1525
|
+
id: b.id,
|
|
1499
1526
|
ref_key: "PhoneInputRef",
|
|
1500
1527
|
ref: w,
|
|
1501
1528
|
"model-value": r.value
|
|
1502
|
-
}, { ...
|
|
1503
|
-
disabled:
|
|
1504
|
-
color:
|
|
1505
|
-
error:
|
|
1506
|
-
size:
|
|
1507
|
-
success:
|
|
1529
|
+
}, { ...b.$attrs, ...z.value }, {
|
|
1530
|
+
disabled: b.disabled,
|
|
1531
|
+
color: b.color,
|
|
1532
|
+
error: b.error,
|
|
1533
|
+
size: b.size,
|
|
1534
|
+
success: b.success,
|
|
1508
1535
|
class: ["m-phone-input", [
|
|
1509
1536
|
{
|
|
1510
|
-
"--border-radius":
|
|
1511
|
-
"--error":
|
|
1512
|
-
"--focused":
|
|
1537
|
+
"--border-radius": b.hasRadius,
|
|
1538
|
+
"--error": b.error || !k(B).isValid,
|
|
1539
|
+
"--focused": A.value
|
|
1513
1540
|
}
|
|
1514
1541
|
]],
|
|
1515
|
-
onFocus: S[0] || (S[0] = (C) =>
|
|
1516
|
-
onBlur: S[1] || (S[1] = (C) =>
|
|
1517
|
-
"onUpdate:modelValue": S[2] || (S[2] = (C) =>
|
|
1542
|
+
onFocus: S[0] || (S[0] = (C) => A.value = !0),
|
|
1543
|
+
onBlur: S[1] || (S[1] = (C) => A.value = !1),
|
|
1544
|
+
"onUpdate:modelValue": S[2] || (S[2] = (C) => j(C))
|
|
1518
1545
|
}), null, 16, ["id", "model-value", "disabled", "color", "error", "size", "success", "class"]));
|
|
1519
1546
|
}
|
|
1520
|
-
}),
|
|
1547
|
+
}), tt = /* @__PURE__ */ re(ot, [["__scopeId", "data-v-fcb760a8"]]), lt = /* @__PURE__ */ ne({
|
|
1521
1548
|
name: "MazPhoneNumberInput",
|
|
1522
1549
|
inheritAttrs: !1,
|
|
1523
1550
|
__name: "MazPhoneNumberInput",
|
|
@@ -1572,99 +1599,103 @@ const tt = /* @__PURE__ */ ne({
|
|
|
1572
1599
|
},
|
|
1573
1600
|
emits: ["update:model-value", "country-code", "update:country-code", "update", "data"],
|
|
1574
1601
|
setup(a, { emit: o }) {
|
|
1575
|
-
const e = a, t = o, { fetchCountryCode: r, sanitizePhoneNumber: u, getBrowserLocale: v } =
|
|
1602
|
+
const e = a, t = o, { fetchCountryCode: r, sanitizePhoneNumber: u, getBrowserLocale: v } = He(), { isCountryAvailable: p, getPhoneNumberResults: B, getAsYouTypeFormat: L } = De(), g = Ae({
|
|
1576
1603
|
componentName: "MazPhoneNumberInput",
|
|
1577
1604
|
providedId: e.id
|
|
1578
|
-
}),
|
|
1605
|
+
}), A = E(), i = E(), f = E({
|
|
1579
1606
|
isValid: !1,
|
|
1580
1607
|
countryCode: void 0
|
|
1581
|
-
}), z =
|
|
1608
|
+
}), z = E(), w = E({
|
|
1582
1609
|
start: 0,
|
|
1583
1610
|
end: 0,
|
|
1584
1611
|
cursorAtEnd: !0
|
|
1585
1612
|
});
|
|
1586
|
-
|
|
1613
|
+
so("data", {
|
|
1587
1614
|
selectedCountry: i,
|
|
1588
|
-
phoneNumber:
|
|
1589
|
-
results:
|
|
1615
|
+
phoneNumber: A,
|
|
1616
|
+
results: f,
|
|
1590
1617
|
selectionRange: w
|
|
1591
1618
|
});
|
|
1592
|
-
const
|
|
1593
|
-
...
|
|
1619
|
+
const H = h(() => ({
|
|
1620
|
+
...Jo,
|
|
1594
1621
|
...e.translations
|
|
1595
1622
|
}));
|
|
1596
|
-
|
|
1597
|
-
var s;
|
|
1623
|
+
Oe(async () => {
|
|
1598
1624
|
if (C(e.countryCode ?? e.defaultCountryCode), e.fetchCountry && !i.value) {
|
|
1599
|
-
const
|
|
1600
|
-
C(
|
|
1625
|
+
const n = await r();
|
|
1626
|
+
C(n);
|
|
1601
1627
|
}
|
|
1628
|
+
}), Ie(() => {
|
|
1629
|
+
var n;
|
|
1602
1630
|
if (!e.defaultCountryCode && !e.noUseBrowserLocale && !i.value) {
|
|
1603
|
-
const
|
|
1604
|
-
C(
|
|
1631
|
+
const V = (n = v()) == null ? void 0 : n.locale;
|
|
1632
|
+
C(V);
|
|
1605
1633
|
}
|
|
1606
1634
|
});
|
|
1607
|
-
const
|
|
1608
|
-
function
|
|
1609
|
-
var
|
|
1610
|
-
return (
|
|
1635
|
+
const j = E();
|
|
1636
|
+
function Z() {
|
|
1637
|
+
var n;
|
|
1638
|
+
return (n = j.value) == null ? void 0 : n.$el.querySelector("input");
|
|
1611
1639
|
}
|
|
1612
|
-
async function
|
|
1613
|
-
var
|
|
1614
|
-
await
|
|
1640
|
+
async function b() {
|
|
1641
|
+
var n;
|
|
1642
|
+
await ue(), (n = Z()) == null || n.select();
|
|
1615
1643
|
}
|
|
1616
|
-
function S(
|
|
1617
|
-
|
|
1618
|
-
countryCode:
|
|
1619
|
-
}),
|
|
1644
|
+
function S(n) {
|
|
1645
|
+
X({
|
|
1646
|
+
countryCode: n
|
|
1647
|
+
}), b();
|
|
1620
1648
|
}
|
|
1621
|
-
function C(
|
|
1622
|
-
if (
|
|
1623
|
-
if (!
|
|
1624
|
-
i.value = void 0;
|
|
1649
|
+
function C(n) {
|
|
1650
|
+
if (n) {
|
|
1651
|
+
if (!p(n)) {
|
|
1652
|
+
console.warn(`[MazPhoneNumberInput] Country code not available: "${n}"`), i.value = void 0;
|
|
1625
1653
|
return;
|
|
1626
1654
|
}
|
|
1627
|
-
i.value =
|
|
1655
|
+
i.value = n;
|
|
1628
1656
|
}
|
|
1629
1657
|
}
|
|
1630
1658
|
function W({
|
|
1631
|
-
newPhoneNumber:
|
|
1632
|
-
updateResults:
|
|
1659
|
+
newPhoneNumber: n,
|
|
1660
|
+
updateResults: V = !0,
|
|
1661
|
+
updateCountry: D = !0
|
|
1633
1662
|
}) {
|
|
1634
|
-
const
|
|
1635
|
-
if (
|
|
1636
|
-
phoneNumber:
|
|
1663
|
+
const M = u(n);
|
|
1664
|
+
if (V && (f.value = B({
|
|
1665
|
+
phoneNumber: M,
|
|
1637
1666
|
countryCode: i.value
|
|
1638
1667
|
})), w.value.cursorAtEnd && !e.noFormattingAsYouType && e.autoFormat) {
|
|
1639
|
-
const
|
|
1640
|
-
z.value = L(i.value,
|
|
1641
|
-
}
|
|
1642
|
-
|
|
1643
|
-
|
|
1668
|
+
const Q = f.value.isValid ? f.value.formatNational : M;
|
|
1669
|
+
z.value = L(i.value, Q), A.value = z.value || Q;
|
|
1670
|
+
} else
|
|
1671
|
+
A.value = f.value.isValid ? f.value.formatNational : M;
|
|
1672
|
+
D && f.value.countryCode && f.value.countryCode !== i.value && X({
|
|
1673
|
+
countryCode: f.value.countryCode,
|
|
1644
1674
|
updateResults: !1
|
|
1645
1675
|
});
|
|
1646
1676
|
}
|
|
1647
|
-
function
|
|
1648
|
-
countryCode:
|
|
1649
|
-
updateResults:
|
|
1677
|
+
function X({
|
|
1678
|
+
countryCode: n,
|
|
1679
|
+
updateResults: V = !0
|
|
1650
1680
|
}) {
|
|
1651
|
-
if (!
|
|
1681
|
+
if (!n) {
|
|
1652
1682
|
i.value = void 0;
|
|
1653
1683
|
return;
|
|
1654
1684
|
}
|
|
1655
|
-
|
|
1656
|
-
phoneNumber:
|
|
1657
|
-
countryCode:
|
|
1685
|
+
n !== i.value && C(n), V && (f.value = B({
|
|
1686
|
+
phoneNumber: A.value,
|
|
1687
|
+
countryCode: n
|
|
1658
1688
|
})), W({
|
|
1659
|
-
newPhoneNumber:
|
|
1660
|
-
updateResults: !1
|
|
1689
|
+
newPhoneNumber: A.value,
|
|
1690
|
+
updateResults: !1,
|
|
1691
|
+
updateCountry: !1
|
|
1661
1692
|
});
|
|
1662
1693
|
}
|
|
1663
1694
|
return he(
|
|
1664
1695
|
() => e.modelValue ?? e.defaultPhoneNumber,
|
|
1665
|
-
(
|
|
1666
|
-
|
|
1667
|
-
newPhoneNumber:
|
|
1696
|
+
(n, V) => {
|
|
1697
|
+
n !== V && n !== A.value && W({
|
|
1698
|
+
newPhoneNumber: n
|
|
1668
1699
|
});
|
|
1669
1700
|
},
|
|
1670
1701
|
{
|
|
@@ -1672,95 +1703,95 @@ const tt = /* @__PURE__ */ ne({
|
|
|
1672
1703
|
}
|
|
1673
1704
|
), he(
|
|
1674
1705
|
() => e.countryCode ?? e.defaultCountryCode,
|
|
1675
|
-
(
|
|
1676
|
-
|
|
1677
|
-
countryCode:
|
|
1706
|
+
(n, V) => {
|
|
1707
|
+
n && n !== V && n !== i.value && X({
|
|
1708
|
+
countryCode: n
|
|
1678
1709
|
});
|
|
1679
1710
|
},
|
|
1680
1711
|
{
|
|
1681
1712
|
immediate: !0
|
|
1682
1713
|
}
|
|
1683
1714
|
), he(
|
|
1684
|
-
|
|
1685
|
-
(
|
|
1686
|
-
t("update",
|
|
1715
|
+
f,
|
|
1716
|
+
(n) => {
|
|
1717
|
+
t("update", n), t("data", n), n.e164 && n.isValid ? t("update:model-value", n.e164) : t("update:model-value", A.value), t("country-code", i.value), t("update:country-code", i.value);
|
|
1687
1718
|
},
|
|
1688
1719
|
{
|
|
1689
1720
|
immediate: !0
|
|
1690
1721
|
}
|
|
1691
|
-
), (
|
|
1692
|
-
var
|
|
1693
|
-
return
|
|
1722
|
+
), (n, V) => {
|
|
1723
|
+
var D;
|
|
1724
|
+
return y(), P(
|
|
1694
1725
|
"div",
|
|
1695
1726
|
{
|
|
1696
|
-
class:
|
|
1697
|
-
style:
|
|
1727
|
+
class: T(["m-phone-number-input", [e.class, { "--block": n.block }, n.orientation ? `--${n.orientation}` : void 0]]),
|
|
1728
|
+
style: oe(n.style)
|
|
1698
1729
|
},
|
|
1699
1730
|
[
|
|
1700
|
-
|
|
1731
|
+
n.noCountrySelector ? $("v-if", !0) : (y(), K(Go, le({
|
|
1701
1732
|
key: 0,
|
|
1702
|
-
id:
|
|
1703
|
-
},
|
|
1733
|
+
id: k(g)
|
|
1734
|
+
}, n.countrySelectAttributes, {
|
|
1704
1735
|
"model-value": i.value,
|
|
1705
|
-
color:
|
|
1706
|
-
size:
|
|
1707
|
-
"country-locale":
|
|
1708
|
-
"country-selector-display-name":
|
|
1709
|
-
"custom-countries-list":
|
|
1710
|
-
"ignored-countries":
|
|
1711
|
-
"list-position":
|
|
1712
|
-
"no-flags":
|
|
1713
|
-
"no-search":
|
|
1714
|
-
"exclude-selectors":
|
|
1715
|
-
error:
|
|
1716
|
-
success:
|
|
1717
|
-
locales:
|
|
1718
|
-
disabled:
|
|
1719
|
-
"search-threshold":
|
|
1720
|
-
"show-code-on-list":
|
|
1721
|
-
"only-countries":
|
|
1722
|
-
"preferred-countries":
|
|
1723
|
-
width:
|
|
1736
|
+
color: n.color,
|
|
1737
|
+
size: n.size,
|
|
1738
|
+
"country-locale": n.countryLocale,
|
|
1739
|
+
"country-selector-display-name": n.countrySelectorDisplayName,
|
|
1740
|
+
"custom-countries-list": n.customCountriesList,
|
|
1741
|
+
"ignored-countries": n.ignoredCountries,
|
|
1742
|
+
"list-position": n.listPosition,
|
|
1743
|
+
"no-flags": n.noFlags,
|
|
1744
|
+
"no-search": n.noSearch,
|
|
1745
|
+
"exclude-selectors": n.excludeSelectors,
|
|
1746
|
+
error: n.error || (n.noValidationError ? !1 : !!A.value && !i.value),
|
|
1747
|
+
success: n.success || (n.noValidationSuccess ? !1 : (D = f.value) == null ? void 0 : D.isValid),
|
|
1748
|
+
locales: H.value,
|
|
1749
|
+
disabled: n.disabled,
|
|
1750
|
+
"search-threshold": n.searchThreshold,
|
|
1751
|
+
"show-code-on-list": n.showCodeOnList,
|
|
1752
|
+
"only-countries": n.onlyCountries,
|
|
1753
|
+
"preferred-countries": n.preferredCountries,
|
|
1754
|
+
width: n.countrySelectorWidth,
|
|
1724
1755
|
"onUpdate:modelValue": S
|
|
1725
1756
|
}), {
|
|
1726
|
-
"no-results":
|
|
1727
|
-
N(
|
|
1757
|
+
"no-results": J(() => [
|
|
1758
|
+
N(n.$slots, "no-results", {}, void 0, !0)
|
|
1728
1759
|
]),
|
|
1729
|
-
"selector-flag":
|
|
1730
|
-
N(
|
|
1760
|
+
"selector-flag": J(({ countryCode: M }) => [
|
|
1761
|
+
N(n.$slots, "selector-flag", { countryCode: M }, void 0, !0)
|
|
1731
1762
|
]),
|
|
1732
|
-
"country-list-flag":
|
|
1733
|
-
N(
|
|
1734
|
-
countryCode:
|
|
1735
|
-
option:
|
|
1736
|
-
isSelected:
|
|
1763
|
+
"country-list-flag": J(({ isSelected: M, option: Q }) => [
|
|
1764
|
+
N(n.$slots, "country-list-flag", {
|
|
1765
|
+
countryCode: Q.iso2,
|
|
1766
|
+
option: Q,
|
|
1767
|
+
isSelected: M
|
|
1737
1768
|
}, void 0, !0)
|
|
1738
1769
|
]),
|
|
1739
1770
|
_: 3
|
|
1740
1771
|
/* FORWARDED */
|
|
1741
1772
|
}, 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"])),
|
|
1742
|
-
|
|
1743
|
-
id:
|
|
1773
|
+
U(tt, le({
|
|
1774
|
+
id: k(g),
|
|
1744
1775
|
ref_key: "PhoneInputRef",
|
|
1745
|
-
ref:
|
|
1746
|
-
modelValue:
|
|
1747
|
-
"onUpdate:modelValue":
|
|
1748
|
-
}, { ...
|
|
1749
|
-
color:
|
|
1750
|
-
size:
|
|
1751
|
-
"no-example":
|
|
1776
|
+
ref: j,
|
|
1777
|
+
modelValue: A.value,
|
|
1778
|
+
"onUpdate:modelValue": V[0] || (V[0] = (M) => A.value = M)
|
|
1779
|
+
}, { ...n.$attrs, ...n.phoneInputAttributes }, {
|
|
1780
|
+
color: n.color,
|
|
1781
|
+
size: n.size,
|
|
1782
|
+
"no-example": n.noExample,
|
|
1752
1783
|
block: "",
|
|
1753
|
-
disabled:
|
|
1754
|
-
"has-radius": !
|
|
1755
|
-
success:
|
|
1756
|
-
error:
|
|
1757
|
-
locales:
|
|
1758
|
-
"no-formatting-as-you-type":
|
|
1759
|
-
"auto-format":
|
|
1760
|
-
label:
|
|
1761
|
-
placeholder:
|
|
1762
|
-
"onUpdate:modelValue":
|
|
1763
|
-
newPhoneNumber:
|
|
1784
|
+
disabled: n.disabled,
|
|
1785
|
+
"has-radius": !n.noCountrySelector,
|
|
1786
|
+
success: n.success || (n.noValidationSuccess ? !1 : f.value.isValid),
|
|
1787
|
+
error: n.error || (n.noValidationError ? !1 : !!A.value && !f.value.isValid),
|
|
1788
|
+
locales: H.value,
|
|
1789
|
+
"no-formatting-as-you-type": n.noFormattingAsYouType,
|
|
1790
|
+
"auto-format": n.autoFormat,
|
|
1791
|
+
label: n.label,
|
|
1792
|
+
placeholder: n.placeholder,
|
|
1793
|
+
"onUpdate:modelValue": V[1] || (V[1] = (M) => W({
|
|
1794
|
+
newPhoneNumber: M
|
|
1764
1795
|
}))
|
|
1765
1796
|
}), null, 16, ["id", "modelValue", "color", "size", "no-example", "disabled", "has-radius", "success", "error", "locales", "no-formatting-as-you-type", "auto-format", "label", "placeholder"])
|
|
1766
1797
|
],
|
|
@@ -1769,10 +1800,10 @@ const tt = /* @__PURE__ */ ne({
|
|
|
1769
1800
|
);
|
|
1770
1801
|
};
|
|
1771
1802
|
}
|
|
1772
|
-
}),
|
|
1803
|
+
}), rt = /* @__PURE__ */ re(lt, [["__scopeId", "data-v-71810071"]]);
|
|
1773
1804
|
export {
|
|
1774
|
-
|
|
1805
|
+
rt as M,
|
|
1775
1806
|
re as _,
|
|
1776
|
-
|
|
1807
|
+
Te as i,
|
|
1777
1808
|
Ae as u
|
|
1778
1809
|
};
|