maz-ui 3.43.3 → 3.44.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/MazAccordion.d.ts +2 -2
- package/components/MazAccordion.mjs +84 -84
- package/components/MazAnimatedCounter.mjs +9 -10
- package/components/MazAvatar.d.ts +3 -3
- package/components/MazAvatar.mjs +1 -1
- package/components/MazBackdrop.d.ts +2 -2
- package/components/MazBackdrop.mjs +12 -10
- package/components/MazBadge.d.ts +2 -2
- package/components/MazBadge.mjs +3 -4
- package/components/MazBottomSheet.mjs +1 -1
- package/components/MazBtn.d.ts +7 -5
- package/components/MazBtn.mjs +1 -1
- package/components/MazCard.d.ts +3 -3
- package/components/MazCard.mjs +1 -1
- package/components/MazCardSpotlight.d.ts +2 -2
- package/components/MazCardSpotlight.mjs +4 -5
- package/components/MazCarousel.d.ts +2 -2
- package/components/MazCarousel.mjs +1 -1
- package/components/MazChart.d.ts +1 -1
- package/components/MazCheckbox.d.ts +2 -2
- package/components/MazCheckbox.mjs +10 -11
- package/components/MazCircularProgressBar.d.ts +1 -1
- package/components/MazCircularProgressBar.mjs +21 -23
- package/components/MazDialog.d.ts +2 -2
- package/components/MazDialog.mjs +1 -1
- package/components/MazDialogPromise/use-maz-dialog-promise.d.ts +17 -14
- package/components/MazDialogPromise.mjs +1 -1
- package/components/MazDrawer.d.ts +2 -2
- package/components/MazDrawer.mjs +71 -69
- package/components/MazDropdown.d.ts +7 -6
- package/components/MazDropdown.mjs +130 -128
- package/components/MazDropzone.d.ts +1 -1
- package/components/MazDropzone.mjs +1 -1
- package/components/MazExpandAnimation.d.ts +2 -2
- package/components/MazExpandAnimation.mjs +26 -26
- package/components/MazFullscreenLoader.d.ts +2 -2
- package/components/MazFullscreenLoader.mjs +11 -10
- package/components/MazGallery.d.ts +2 -2
- package/components/MazGallery.mjs +1 -1
- package/components/MazIcon.mjs +45 -34
- package/components/MazInput.d.ts +4 -4
- package/components/MazInput.mjs +1 -1
- package/components/MazInputCode.d.ts +2 -2
- package/components/MazInputCode.mjs +4 -5
- package/components/MazInputNumber.d.ts +2 -2
- package/components/MazInputNumber.mjs +1 -1
- package/components/MazInputPrice.d.ts +2 -2
- package/components/MazInputPrice.mjs +1 -1
- package/components/MazInputTags.d.ts +7 -2
- package/components/MazInputTags.mjs +1 -1
- package/components/MazLazyImg.d.ts +2 -2
- package/components/MazLazyImg.mjs +1 -1
- package/components/MazLink.d.ts +6 -6
- package/components/MazLink.mjs +3 -4
- package/components/MazLoadingBar.d.ts +2 -2
- package/components/MazLoadingBar.mjs +17 -18
- package/components/MazPagination.d.ts +3 -3
- package/components/MazPagination.mjs +1 -1
- package/components/MazPhoneNumberInput/CountrySelector.vue.d.ts +1 -1
- package/components/MazPhoneNumberInput/PhoneInput.vue.d.ts +4 -0
- package/components/MazPhoneNumberInput/types.d.ts +5 -5
- package/components/MazPhoneNumberInput/use-libphonenumber.d.ts +1 -1
- package/components/MazPhoneNumberInput/use-maz-phone-number-input.d.ts +1 -1
- package/components/MazPhoneNumberInput.d.ts +13 -8
- package/components/MazPhoneNumberInput.mjs +1 -1
- package/components/MazPicker/MazPickerCalendarMonth/MazPickerCalendarGrid.vue.d.ts +1 -1
- package/components/MazPicker/MazPickerCalendarMonth/MazPickerCalendarMonth.vue.d.ts +2 -2
- package/components/MazPicker/MazPickerFooter.vue.d.ts +1 -1
- package/components/MazPicker/MazPickerTime.vue.d.ts +1 -1
- package/components/MazPicker/types.d.ts +4 -4
- package/components/MazPicker/utils.d.ts +4 -4
- package/components/MazPicker.d.ts +3 -3
- package/components/MazPicker.mjs +1 -1
- package/components/MazPullToRefresh.d.ts +2 -2
- package/components/MazPullToRefresh.mjs +1 -1
- package/components/MazRadio.mjs +8 -9
- package/components/MazRadioButtons.d.ts +2 -2
- package/components/MazRadioButtons.mjs +44 -42
- package/components/MazReadingProgressBar.d.ts +2 -2
- package/components/MazReadingProgressBar.mjs +12 -13
- package/components/MazSelect.d.ts +4 -4
- package/components/MazSelect.mjs +1 -1
- package/components/MazSlider/utils.d.ts +4 -4
- package/components/MazSlider.mjs +100 -87
- package/components/MazSpinner.mjs +6 -7
- package/components/MazStepper.d.ts +3 -3
- package/components/MazStepper.mjs +1 -1
- package/components/MazSwitch.d.ts +2 -2
- package/components/MazSwitch.mjs +6 -6
- package/components/MazTable.d.ts +13 -10
- package/components/MazTable.mjs +1 -1
- package/components/MazTableCell.mjs +4 -5
- package/components/MazTableRow.d.ts +2 -2
- package/components/MazTableRow.mjs +4 -5
- package/components/MazTableTitle.mjs +2 -3
- package/components/MazTabs.d.ts +4 -4
- package/components/MazTabsBar.d.ts +7 -5
- package/components/MazTabsBar.mjs +1 -1
- package/components/MazTabsContent.mjs +5 -4
- package/components/MazTabsContentItem.mjs +16 -17
- package/components/MazTextarea.d.ts +2 -2
- package/components/MazTextarea.mjs +19 -17
- package/components/MazTransitionExpand.d.ts +2 -2
- package/components/MazTransitionExpand.mjs +19 -18
- package/components/assets/MazAccordion.css +1 -1
- package/components/assets/MazAnimatedCounter.css +1 -1
- package/components/assets/MazAvatar.css +1 -1
- package/components/assets/MazBadge.css +1 -1
- package/components/assets/MazBottomSheet.css +1 -1
- package/components/assets/MazBtn.css +1 -1
- package/components/assets/MazCard.css +1 -1
- package/components/assets/MazCardSpotlight.css +1 -1
- package/components/assets/MazCarousel.css +1 -1
- package/components/assets/MazCheckbox.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/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/MazLazyImg.css +1 -1
- package/components/assets/MazLink.css +1 -1
- package/components/assets/MazLoadingBar.css +1 -1
- package/components/assets/MazPagination.css +1 -1
- package/components/assets/MazPhoneNumberInput.css +1 -1
- package/components/assets/MazPicker.css +1 -1
- package/components/assets/MazPickerMonthSwitcher.css +1 -1
- package/components/assets/MazPickerShortcuts.css +1 -1
- package/components/assets/MazPickerYearSwitcher.css +1 -1
- package/components/assets/MazPullToRefresh.css +1 -1
- package/components/assets/MazRadio.css +1 -1
- package/components/assets/MazRadioButtons.css +1 -1
- package/components/assets/MazReadingProgressBar.css +1 -1
- package/components/assets/MazSelect.css +1 -1
- package/components/assets/MazSlider.css +1 -1
- package/components/assets/MazSpinner.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-DsJvzyS9.mjs → MazAvatar-BU1nJFcV.mjs} +8 -9
- package/components/chunks/{MazBadge-CYJlqITD.mjs → MazBadge-CwA0md19.mjs} +4 -5
- package/components/chunks/{MazBottomSheet-CIlIdn-2.mjs → MazBottomSheet-DUOIusEi.mjs} +54 -52
- package/components/chunks/{MazBtn-CCNGs6oo.mjs → MazBtn-5BSKOcqG.mjs} +35 -36
- package/components/chunks/{MazBtn-Ccvl1ZWv.mjs → MazBtn-B1-sTc7F.mjs} +31 -32
- package/components/chunks/{MazBtn-BC5OegPu.mjs → MazBtn-BY8WCtM7.mjs} +35 -36
- package/components/chunks/{MazBtn-BqgdERYQ.mjs → MazBtn-C5G78zLg.mjs} +35 -36
- package/components/chunks/MazBtn-CeVwyYR5.mjs +150 -0
- package/components/chunks/{MazBtn-CX4OgPzp.mjs → MazBtn-ColLVUca.mjs} +35 -36
- package/components/chunks/{MazBtn-beTASOLt.mjs → MazBtn-DJhQqzja.mjs} +35 -36
- package/components/chunks/MazBtn-DuY28-0U.mjs +150 -0
- package/components/chunks/{MazBtn-BydIwD1J.mjs → MazBtn-f1mBXJeU.mjs} +31 -32
- package/components/chunks/MazBtn-h3WmmaEO.mjs +150 -0
- package/components/chunks/MazBtn-zyRLUViT.mjs +150 -0
- package/components/chunks/{MazCard-bmiVPg8p.mjs → MazCard-BWxV_Z-i.mjs} +25 -26
- package/components/chunks/{MazCarousel-CL0bMygd.mjs → MazCarousel-D5EmW7Sa.mjs} +43 -35
- package/components/chunks/{MazCheckbox-DsFbvpp4.mjs → MazCheckbox-BWiMbecz.mjs} +11 -12
- package/components/chunks/{MazCheckbox-BmPd9Bqa.mjs → MazCheckbox-D3PXkt75.mjs} +11 -12
- package/components/chunks/{MazDialog-BckFta4N.mjs → MazDialog-CLWKCphI.mjs} +56 -54
- package/components/chunks/{MazDialogPromise-Bb6h4hFz.mjs → MazDialogPromise-DVOJwdVp.mjs} +139 -126
- package/components/chunks/{MazDropzone-C_8mRUbK.mjs → MazDropzone-Dm2IirHm.mjs} +33 -54
- package/components/chunks/MazExpandAnimation-ChSSdQAq.mjs +58 -0
- package/components/chunks/{MazGallery-CcpeM_zk.mjs → MazGallery-BlfPe8WG.mjs} +103 -101
- package/components/chunks/{MazGallery-6UK5sH9P.mjs → MazGallery-Bn9p1gNb.mjs} +102 -100
- package/{modules/chunks/MazIcon-CiNswMKM.mjs → components/chunks/MazIcon-B8A0hQAH.mjs} +45 -34
- package/components/chunks/{MazIcon-Cxrv3_OK.mjs → MazIcon-BDGxCy9M.mjs} +45 -34
- package/components/chunks/{MazIcon-DtG5ii8R.mjs → MazIcon-D3umgnku.mjs} +45 -34
- package/components/chunks/{MazInput-DNwBL54e.mjs → MazInput-BpsE-mdg.mjs} +69 -69
- package/components/chunks/{MazInputNumber-BSdVF8-q.mjs → MazInputNumber-DGBYbDSX.mjs} +186 -182
- package/components/chunks/{MazInputPrice-osrAz4xd.mjs → MazInputPrice-j2BNMeFp.mjs} +134 -129
- package/components/chunks/{MazInputTags-XUWwx6p8.mjs → MazInputTags-CJofVaj5.mjs} +234 -252
- package/components/chunks/{MazLazyImg-6qrfqWKr.mjs → MazLazyImg-BFG6FIJZ.mjs} +6 -7
- package/components/chunks/{MazLazyImg-BelScAEF.mjs → MazLazyImg-Dboc6Xfz.mjs} +5 -6
- package/components/chunks/{MazPagination-DUiHgLAp.mjs → MazPagination-C6ZehQSZ.mjs} +118 -119
- package/components/chunks/{MazPhoneNumberInput-1tGT28Sa.mjs → MazPhoneNumberInput-DpWoNQfx.mjs} +705 -680
- package/components/chunks/MazPicker-ia2BEmm5.mjs +2531 -0
- package/components/chunks/{MazPickerMonthSwitcher-CoV-84J1.mjs → MazPickerMonthSwitcher-CKtfZ_m-.mjs} +19 -19
- package/components/chunks/{MazPickerShortcuts-5IfUIwpz.mjs → MazPickerShortcuts-Cc9VoqBw.mjs} +10 -10
- package/components/chunks/{MazPickerYearSwitcher-MeptqtZk.mjs → MazPickerYearSwitcher-0b5Wrem9.mjs} +10 -8
- package/components/chunks/{MazPullToRefresh-DWbmwlzV.mjs → MazPullToRefresh-CUazP4y2.mjs} +21 -22
- package/components/chunks/MazSelect-COJoKXbV.mjs +847 -0
- package/components/chunks/MazSpinner-9Jue6cel.mjs +37 -0
- package/components/chunks/{MazSpinner-BRgzRI07.mjs → MazSpinner-BGPOws6a.mjs} +6 -7
- package/components/chunks/{MazSpinner-BXxULdoD.mjs → MazSpinner-BWYdqSMP.mjs} +6 -7
- package/components/chunks/{MazSpinner-BKjRRWtc.mjs → MazSpinner-BZOjTZBN.mjs} +6 -7
- package/components/chunks/{MazSpinner-BFXwybUv.mjs → MazSpinner-BaAMq7LI.mjs} +6 -7
- package/components/chunks/MazSpinner-Bad2n-0k.mjs +37 -0
- package/components/chunks/MazSpinner-BxnVFqUu.mjs +37 -0
- package/components/chunks/{MazSpinner-Mvsi6uCt.mjs → MazSpinner-C41VyUup.mjs} +6 -7
- package/components/chunks/MazSpinner-C6StE-Mb.mjs +37 -0
- package/components/chunks/{MazSpinner-B-svzg-R.mjs → MazSpinner-CNIlbDfg.mjs} +6 -7
- package/components/chunks/MazSpinner-Cz2DHV6g.mjs +37 -0
- package/components/chunks/MazSpinner-D4CdHpP2.mjs +37 -0
- package/{modules/chunks/MazSpinner--jWWogVn.mjs → components/chunks/MazSpinner-DHQH6Bhz.mjs} +6 -7
- package/components/chunks/MazSpinner-DRj2VpGA.mjs +37 -0
- package/components/chunks/{MazSpinner-C1lg-Klx.mjs → MazSpinner-DkXequnp.mjs} +6 -7
- package/components/chunks/MazSpinner-EA5ejB8F.mjs +37 -0
- package/components/chunks/{MazSpinner-BtpIL60X.mjs → MazSpinner-RvDGcBng.mjs} +6 -7
- package/components/chunks/{MazSpinner-B_WP-2kr.mjs → MazSpinner-V-bFi71W.mjs} +6 -7
- package/components/chunks/MazSpinner-aPFlrc5E.mjs +37 -0
- package/components/chunks/{MazSpinner-CfA_KEZT.mjs → MazSpinner-nH44Htog.mjs} +6 -7
- package/components/chunks/MazSpinner-nOD-7_sU.mjs +37 -0
- package/components/chunks/MazSpinner-yZGK-AQe.mjs +37 -0
- package/components/chunks/{MazStepper-DDofJsdg.mjs → MazStepper-DxrzKz06.mjs} +94 -83
- package/components/chunks/MazTable-DRUj_PZp.mjs +1960 -0
- package/components/chunks/{MazTabsBar-BXDEQkZM.mjs → MazTabsBar-xcIIXHx5.mjs} +67 -68
- package/components/chunks/{MazTransitionExpand-BwuAIzII.mjs → MazTransitionExpand-B08cSrmL.mjs} +20 -19
- package/components/chunks/{examples.mobile.json-um0ibyv5.mjs → examples.mobile.json-JpNGylGv.mjs} +1 -1
- package/css/main.css +1 -1
- package/modules/assets/MazBtn.css +1 -1
- package/modules/assets/MazSpinner.css +1 -1
- package/modules/assets/index.css +1 -1
- package/modules/chunks/{MazBtn-Czcbhr3Z.cjs → MazBtn-BbCGGxkK.cjs} +2 -2
- package/modules/chunks/{MazBtn-CXcW31TK.mjs → MazBtn-UBHTKqaN.mjs} +35 -36
- package/modules/chunks/MazIcon-BDSXZYZ8.cjs +1 -0
- package/{components/chunks/MazIcon-DL8XAldH.mjs → modules/chunks/MazIcon-C2ch3jUS.mjs} +45 -34
- package/modules/chunks/{MazSpinner-Cw1KnqLM.cjs → MazSpinner-BiyFRA4w.cjs} +1 -1
- package/modules/chunks/MazSpinner-C9_xSbZZ.mjs +37 -0
- package/modules/chunks/{index-CThtJOu5.mjs → index-Cwbjspv3.mjs} +621 -588
- package/modules/chunks/index-tnjajVkX.cjs +124 -0
- package/modules/index.cjs +1 -1
- package/modules/index.mjs +34 -35
- package/nuxt/index.json +2 -2
- package/nuxt/index.mjs +3 -4
- package/nuxt/types.d.mts +24 -0
- package/nuxt/types.d.ts +24 -0
- package/package.json +77 -83
- package/resolvers/unplugin-directives-resolver.d.ts +1 -1
- package/resolvers/unplugin-vue-components-resolver.d.ts +1 -1
- package/tailwindcss/tailwind.config.ts +9 -2
- package/tailwindcss/utils/colors.ts +3 -3
- package/tailwindcss/variables/colors.ts +12 -12
- package/tailwindcss/variables/utilities.ts +2 -2
- package/tailwindcss/variables/z-indexes.ts +12 -11
- package/types/components/MazAccordion.vue.d.ts +2 -2
- package/types/components/MazAvatar.vue.d.ts +3 -3
- package/types/components/MazBackdrop.vue.d.ts +2 -2
- package/types/components/MazBadge.vue.d.ts +2 -2
- package/types/components/MazBtn.vue.d.ts +7 -5
- package/types/components/MazCard.vue.d.ts +3 -3
- package/types/components/MazCardSpotlight.vue.d.ts +2 -2
- package/types/components/MazCarousel.vue.d.ts +2 -2
- package/types/components/MazChart.vue.d.ts +1 -1
- package/types/components/MazCheckbox.vue.d.ts +2 -2
- package/types/components/MazCircularProgressBar.vue.d.ts +1 -1
- package/types/components/MazDialog.vue.d.ts +2 -2
- package/types/components/MazDialogPromise/use-maz-dialog-promise.d.ts +17 -14
- package/types/components/MazDrawer.vue.d.ts +2 -2
- package/types/components/MazDropdown.vue.d.ts +7 -6
- package/types/components/MazDropzone.vue.d.ts +1 -1
- package/types/components/MazExpandAnimation.vue.d.ts +2 -2
- package/types/components/MazFullscreenLoader.vue.d.ts +2 -2
- package/types/components/MazGallery.vue.d.ts +2 -2
- package/types/components/MazInput.vue.d.ts +4 -4
- package/types/components/MazInputCode.vue.d.ts +2 -2
- package/types/components/MazInputNumber.vue.d.ts +2 -2
- package/types/components/MazInputPrice.vue.d.ts +2 -2
- package/types/components/MazInputTags.vue.d.ts +7 -2
- package/types/components/MazLazyImg.vue.d.ts +2 -2
- package/types/components/MazLink.vue.d.ts +6 -6
- package/types/components/MazLoadingBar.vue.d.ts +2 -2
- package/types/components/MazPagination.vue.d.ts +3 -3
- package/types/components/MazPhoneNumberInput/CountrySelector.vue.d.ts +1 -1
- package/types/components/MazPhoneNumberInput/PhoneInput.vue.d.ts +4 -0
- package/types/components/MazPhoneNumberInput/types.d.ts +5 -5
- package/types/components/MazPhoneNumberInput/use-libphonenumber.d.ts +1 -1
- package/types/components/MazPhoneNumberInput/use-maz-phone-number-input.d.ts +1 -1
- package/types/components/MazPhoneNumberInput.vue.d.ts +13 -8
- package/types/components/MazPicker/MazPickerCalendarMonth/MazPickerCalendarGrid.vue.d.ts +1 -1
- package/types/components/MazPicker/MazPickerCalendarMonth/MazPickerCalendarMonth.vue.d.ts +2 -2
- package/types/components/MazPicker/MazPickerFooter.vue.d.ts +1 -1
- package/types/components/MazPicker/MazPickerTime.vue.d.ts +1 -1
- package/types/components/MazPicker/types.d.ts +4 -4
- package/types/components/MazPicker/utils.d.ts +4 -4
- package/types/components/MazPicker.vue.d.ts +3 -3
- package/types/components/MazPullToRefresh.vue.d.ts +2 -2
- package/types/components/MazRadioButtons.vue.d.ts +2 -2
- package/types/components/MazReadingProgressBar.vue.d.ts +2 -2
- package/types/components/MazSelect.vue.d.ts +4 -4
- package/types/components/MazSlider/utils.d.ts +4 -4
- package/types/components/MazStepper.vue.d.ts +3 -3
- package/types/components/MazSwitch.vue.d.ts +2 -2
- package/types/components/MazTable.vue.d.ts +13 -10
- package/types/components/MazTableRow.vue.d.ts +2 -2
- package/types/components/MazTabs.vue.d.ts +4 -4
- package/types/components/MazTabsBar.vue.d.ts +7 -5
- package/types/components/MazTextarea.vue.d.ts +2 -2
- package/types/components/MazTransitionExpand.vue.d.ts +2 -2
- package/types/modules/composables/use-reading-time.d.ts +5 -5
- package/types/modules/composables/use-theme-handler.d.ts +2 -2
- package/types/modules/directives/closable.d.ts +2 -2
- package/types/modules/directives/tooltip/index.d.ts +4 -4
- package/types/modules/directives/v-fullscreen-img/MazFullscreenImg.vue.d.ts +2 -2
- package/types/modules/directives/v-lazy-img/index.d.ts +1 -1
- package/types/modules/filters/capitalize.d.ts +1 -1
- package/types/modules/filters/currency.d.ts +1 -1
- package/types/modules/filters/date.d.ts +1 -1
- package/types/modules/filters/index.d.ts +8 -4
- package/types/modules/filters/number.d.ts +1 -1
- package/types/modules/filters/telephone.d.ts +1 -1
- package/types/modules/helpers/idle-timeout/idle-timeout-handler.d.ts +1 -1
- package/types/modules/helpers/mount-component.d.ts +2 -2
- package/types/modules/helpers/normalize-string.d.ts +2 -2
- package/types/modules/helpers/swipe-handler.d.ts +2 -2
- package/types/modules/helpers/user-visibility/types.d.ts +2 -2
- package/types/modules/plugins/aos/index.d.ts +3 -3
- package/types/modules/plugins/index.d.ts +2 -2
- package/types/modules/plugins/toaster/MazToast.vue.d.ts +3 -3
- package/types/modules/plugins/toaster/index.d.ts +1 -2
- package/types/modules/plugins/toaster/types.d.ts +6 -6
- package/types/modules/plugins/wait/utils.d.ts +4 -4
- package/types/resolvers/unplugin-directives-resolver.d.ts +1 -1
- package/types/resolvers/unplugin-vue-components-resolver.d.ts +1 -1
- package/types/tailwindcss/tailwind.config.d.ts +71 -9
- package/types/tailwindcss/variables/z-indexes.d.ts +11 -11
- package/components/chunks/MazBtn-CFwe--oV.mjs +0 -151
- package/components/chunks/MazBtn-DpkJQ_3W.mjs +0 -151
- package/components/chunks/MazBtn-Dw_CR_0X.mjs +0 -151
- package/components/chunks/MazBtn-_NGDIlQK.mjs +0 -151
- package/components/chunks/MazExpandAnimation-Cin7sZ3I.mjs +0 -58
- package/components/chunks/MazPicker-CltoTa2Z.mjs +0 -2477
- package/components/chunks/MazSelect-DDKbowf3.mjs +0 -835
- package/components/chunks/MazSpinner-BZUmasIf.mjs +0 -38
- package/components/chunks/MazSpinner-BjIFFTYY.mjs +0 -38
- package/components/chunks/MazSpinner-C-lFmcUR.mjs +0 -38
- package/components/chunks/MazSpinner-C75WMoEA.mjs +0 -38
- package/components/chunks/MazSpinner-CA38Ikqe.mjs +0 -38
- package/components/chunks/MazSpinner-CAHOYqvB.mjs +0 -38
- package/components/chunks/MazSpinner-COOp2WX8.mjs +0 -38
- package/components/chunks/MazSpinner-D-ONjGGv.mjs +0 -38
- package/components/chunks/MazSpinner-DJkziC4O.mjs +0 -38
- package/components/chunks/MazSpinner-Di0F6oZz.mjs +0 -38
- package/components/chunks/MazSpinner-EcA0uOQv.mjs +0 -38
- package/components/chunks/MazSpinner-s_0BLDqW.mjs +0 -38
- package/components/chunks/MazTable-B9JiJ2B2.mjs +0 -1950
- package/modules/chunks/MazIcon-DdFYd3W8.cjs +0 -1
- package/modules/chunks/index-RvIMpzcQ.cjs +0 -124
- package/nuxt/runtime/composables/{use-aos.mjs → use-aos.js} +0 -0
- package/nuxt/runtime/composables/{use-theme-handler.mjs → use-theme-handler.js} +1 -1
- package/nuxt/runtime/composables/{use-toast.mjs → use-toast.js} +0 -0
- package/nuxt/runtime/composables/{use-wait.mjs → use-wait.js} +0 -0
- package/nuxt/runtime/plugins/{aos.mjs → aos.js} +1 -1
- package/nuxt/runtime/plugins/{maz-icon-path.mjs → maz-icon-path.js} +0 -0
- package/nuxt/runtime/plugins/{toaster.mjs → toaster.js} +1 -1
- package/nuxt/runtime/plugins/{v-click-outside.mjs → v-click-outside.js} +1 -1
- package/nuxt/runtime/plugins/{v-fullscreen-img.mjs → v-fullscreen-img.js} +1 -1
- package/nuxt/runtime/plugins/{v-lazy-img.mjs → v-lazy-img.js} +1 -1
- package/nuxt/runtime/plugins/{v-tooltip.mjs → v-tooltip.js} +1 -1
- package/nuxt/runtime/plugins/{v-zoom-img.mjs → v-zoom-img.js} +1 -1
- package/nuxt/runtime/plugins/{wait.mjs → wait.js} +1 -1
package/components/chunks/{MazPhoneNumberInput-1tGT28Sa.mjs → MazPhoneNumberInput-DpWoNQfx.mjs}
RENAMED
|
@@ -1,28 +1,172 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
function ro(n, l) {
|
|
5
|
-
let o;
|
|
6
|
-
return function(...d) {
|
|
7
|
-
clearTimeout(o), o = setTimeout(() => {
|
|
8
|
-
n.apply(this, d);
|
|
9
|
-
}, l);
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
function be({
|
|
1
|
+
import { getCurrentInstance as je, computed as m, defineComponent as ae, defineAsyncComponent as q, ref as B, onMounted as ge, useSlots as We, openBlock as V, createElementBlock as L, normalizeClass as N, normalizeStyle as te, createElementVNode as H, createCommentVNode as g, renderSlot as R, createBlock as D, unref as P, resolveDynamicComponent as Se, withDirectives as Pe, mergeProps as re, toHandlers as Qe, vModelDynamic as Ge, createTextVNode as ve, toDisplayString as X, withModifiers as oe, withCtx as j, createVNode as Z, useCssVars as Je, onBeforeMount as Ze, nextTick as ne, Transition as Xe, Fragment as Ie, renderList as xe, inject as _e, mergeModels as ke, useModel as eo, provide as oo, watch as fe } from "vue";
|
|
2
|
+
import { getCountries as Ae, getCountryCallingCode as ue, isSupportedCountry as to, parsePhoneNumberFromString as lo, AsYouType as no, getExampleNumber as ao } from "libphonenumber-js";
|
|
3
|
+
import '../assets/MazPhoneNumberInput.css';function be({
|
|
13
4
|
componentName: n,
|
|
14
5
|
providedId: l
|
|
15
6
|
}) {
|
|
16
|
-
const
|
|
17
|
-
return
|
|
7
|
+
const e = je();
|
|
8
|
+
return m(() => l ?? `${n}-${e == null ? void 0 : e.uid}`);
|
|
9
|
+
}
|
|
10
|
+
let pe = null;
|
|
11
|
+
function ro(n, l) {
|
|
12
|
+
pe && clearTimeout(pe), pe = setTimeout(n, l);
|
|
18
13
|
}
|
|
19
14
|
const so = {
|
|
15
|
+
removeAccents: !0,
|
|
16
|
+
caseSensitive: !1,
|
|
17
|
+
replaceSpaces: !0,
|
|
18
|
+
removeSpecialCharacters: !1,
|
|
19
|
+
trim: !0,
|
|
20
|
+
normalizeSpaces: !0,
|
|
21
|
+
removeNumbers: !1,
|
|
22
|
+
customNormalizationForms: ["NFC", "NFKD"]
|
|
23
|
+
};
|
|
24
|
+
function ie(n, l) {
|
|
25
|
+
const e = { ...so, ...l }, t = {
|
|
26
|
+
À: "A",
|
|
27
|
+
Á: "A",
|
|
28
|
+
Â: "A",
|
|
29
|
+
Ã: "A",
|
|
30
|
+
Ä: "A",
|
|
31
|
+
Å: "A",
|
|
32
|
+
à: "a",
|
|
33
|
+
á: "a",
|
|
34
|
+
â: "a",
|
|
35
|
+
ã: "a",
|
|
36
|
+
ä: "a",
|
|
37
|
+
å: "a",
|
|
38
|
+
È: "E",
|
|
39
|
+
É: "E",
|
|
40
|
+
Ê: "E",
|
|
41
|
+
Ë: "E",
|
|
42
|
+
è: "e",
|
|
43
|
+
é: "e",
|
|
44
|
+
ê: "e",
|
|
45
|
+
ë: "e",
|
|
46
|
+
Î: "I",
|
|
47
|
+
Ï: "I",
|
|
48
|
+
í: "I",
|
|
49
|
+
î: "i",
|
|
50
|
+
ï: "i",
|
|
51
|
+
Ô: "O",
|
|
52
|
+
Õ: "O",
|
|
53
|
+
Ö: "O",
|
|
54
|
+
Ø: "O",
|
|
55
|
+
ô: "o",
|
|
56
|
+
õ: "o",
|
|
57
|
+
ö: "o",
|
|
58
|
+
ø: "o",
|
|
59
|
+
Ù: "U",
|
|
60
|
+
Ú: "U",
|
|
61
|
+
Û: "U",
|
|
62
|
+
Ü: "U",
|
|
63
|
+
ù: "u",
|
|
64
|
+
ú: "u",
|
|
65
|
+
û: "u",
|
|
66
|
+
ü: "u",
|
|
67
|
+
Ç: "C",
|
|
68
|
+
ç: "c",
|
|
69
|
+
ÿ: "y",
|
|
70
|
+
Ñ: "N",
|
|
71
|
+
ñ: "n",
|
|
72
|
+
ó: "o"
|
|
73
|
+
};
|
|
74
|
+
let d = n.toString();
|
|
75
|
+
if (e.trim && (d = d.trim()), e.normalizeSpaces && (d = d.replaceAll(/\s+/g, " ")), e.replaceSpaces && (d = d.replaceAll(" ", "-")), e.removeNumbers && (d = d.replaceAll(/\d/g, "")), e.removeAccents && (d = d.replaceAll(/[ÀÁÂÃÄÅÇÈÉÊËÎÏÑÔÕÖØÙÚÛÜàáâãäåçèéêëíîïñóôõöøùúûüÿ]/g, (f) => t[f] || f), d = d.replaceAll(/[\u0300-\u036F]/g, "")), e.caseSensitive === !1 && (d = d.toLowerCase()), e.removeSpecialCharacters && (d = d.replaceAll(/[^\dA-Z-]/gi, "")), e.trim && (d = d.trim()), e.customNormalizationForms)
|
|
76
|
+
for (const f of e.customNormalizationForms)
|
|
77
|
+
d = d.normalize(f);
|
|
78
|
+
return d;
|
|
79
|
+
}
|
|
80
|
+
function uo(n, l) {
|
|
81
|
+
const e = n.length, t = l.length, d = [];
|
|
82
|
+
for (let f = 0; f <= e; f++)
|
|
83
|
+
d[f] = [f];
|
|
84
|
+
for (let f = 0; f <= t; f++)
|
|
85
|
+
d[0][f] = f;
|
|
86
|
+
for (let f = 1; f <= e; f++)
|
|
87
|
+
for (let b = 1; b <= t; b++) {
|
|
88
|
+
const k = n[f - 1] === l[b - 1] ? 0 : 1;
|
|
89
|
+
d[f][b] = Math.min(
|
|
90
|
+
d[f - 1][b] + 1,
|
|
91
|
+
d[f][b - 1] + 1,
|
|
92
|
+
d[f - 1][b - 1] + k
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
return d[e][t];
|
|
96
|
+
}
|
|
97
|
+
function Fe(n, l) {
|
|
98
|
+
const e = uo(n, l), t = Math.max(n.length, l.length);
|
|
99
|
+
return 1 - e / t;
|
|
100
|
+
}
|
|
101
|
+
function io(n, l, e = 0.75) {
|
|
102
|
+
return Fe(n, l) >= e;
|
|
103
|
+
}
|
|
104
|
+
function me(n, l, e = 0.75) {
|
|
105
|
+
const t = m(
|
|
106
|
+
() => ie(typeof n == "string" ? n : n.value)
|
|
107
|
+
), d = m(
|
|
108
|
+
() => ie(typeof l == "string" ? l : l.value)
|
|
109
|
+
), f = m(() => typeof e == "number" ? e : e.value), b = m(() => Fe(t.value, d.value));
|
|
110
|
+
return {
|
|
111
|
+
isMatching: m(
|
|
112
|
+
() => io(t.value, d.value, f.value)
|
|
113
|
+
),
|
|
114
|
+
score: b
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
function Ee(n, l, e) {
|
|
118
|
+
var b;
|
|
119
|
+
n.stopPropagation();
|
|
120
|
+
const t = typeof e.value == "function" ? e.value : e.value.handler, d = typeof e.value == "object" ? e.value.exclude : void 0;
|
|
121
|
+
let f = !1;
|
|
122
|
+
if (d && d.length > 0) {
|
|
123
|
+
for (const k of d)
|
|
124
|
+
if (!f && n.target instanceof HTMLElement) {
|
|
125
|
+
const K = (b = document.querySelector(k)) == null ? void 0 : b.getAttribute("id");
|
|
126
|
+
f = n.target.getAttribute("id") === K;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
!l.contains(n.target) && !f && (t == null || t());
|
|
130
|
+
}
|
|
131
|
+
function Le() {
|
|
132
|
+
return document.ontouchstart === null ? "touchstart" : "click";
|
|
133
|
+
}
|
|
134
|
+
function co(n, l) {
|
|
135
|
+
const e = Le();
|
|
136
|
+
document.removeEventListener(e, (t) => Ee(t, n, l));
|
|
137
|
+
}
|
|
138
|
+
function fo(n, l) {
|
|
139
|
+
if (typeof l.value != "function" && typeof l.value == "object" && typeof l.value.handler != "function") {
|
|
140
|
+
console.error("[maz-ui](vClosable) v-closable directive requires a handler function");
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
const e = Le();
|
|
144
|
+
document.addEventListener(e, (t) => Ee(t, n, l));
|
|
145
|
+
}
|
|
146
|
+
const po = {
|
|
147
|
+
mounted: fo,
|
|
148
|
+
unmounted: co
|
|
149
|
+
}, se = (n, l) => {
|
|
150
|
+
const e = n.__vccOpts || n;
|
|
151
|
+
for (const [t, d] of l)
|
|
152
|
+
e[t] = d;
|
|
153
|
+
return e;
|
|
154
|
+
};
|
|
155
|
+
function mo(n, l) {
|
|
156
|
+
let e;
|
|
157
|
+
return function(...t) {
|
|
158
|
+
clearTimeout(e), e = setTimeout(() => {
|
|
159
|
+
n.apply(this, t);
|
|
160
|
+
}, l);
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
const yo = {
|
|
20
164
|
key: 0,
|
|
21
165
|
class: "m-input-wrapper-left"
|
|
22
|
-
},
|
|
166
|
+
}, vo = { class: "m-input-wrapper-input" }, ho = ["id", "type", "name", "inputmode", "placeholder", "aria-label", "disabled", "readonly", "required"], go = { key: 0 }, bo = {
|
|
23
167
|
key: 1,
|
|
24
168
|
class: "m-input-wrapper-right"
|
|
25
|
-
},
|
|
169
|
+
}, zo = /* @__PURE__ */ ae({
|
|
26
170
|
inheritAttrs: !1,
|
|
27
171
|
__name: "MazInput",
|
|
28
172
|
props: {
|
|
@@ -60,75 +204,77 @@ const so = {
|
|
|
60
204
|
},
|
|
61
205
|
emits: ["update:model-value", "focus", "blur", "click", "change"],
|
|
62
206
|
setup(n, { emit: l }) {
|
|
63
|
-
const
|
|
207
|
+
const e = n, t = l, d = q(() => import("./MazBtn-zyRLUViT.mjs")), f = q(() => import("./MazIcon-B8A0hQAH.mjs")), b = q(() => import("./eye-slash-tjfxO0LK.mjs")), k = q(() => import("./eye-DqO_Jx56.mjs")), K = q(() => import("./check-7UA4j2f2.mjs")), A = B(!1), y = B(!1), S = B(), s = be({
|
|
64
208
|
componentName: "MazInput",
|
|
65
|
-
providedId:
|
|
209
|
+
providedId: e.id
|
|
66
210
|
});
|
|
67
211
|
ge(() => {
|
|
68
212
|
var r;
|
|
69
|
-
|
|
213
|
+
e.autoFocus && ((r = S.value) == null || r.focus());
|
|
70
214
|
});
|
|
71
|
-
const
|
|
72
|
-
if (!
|
|
73
|
-
if (
|
|
215
|
+
const p = m(() => e.type === "password"), w = m(() => A.value ? "text" : e.type), I = m(() => {
|
|
216
|
+
if (!e.noBorder) {
|
|
217
|
+
if (e.error)
|
|
74
218
|
return "maz-border-danger";
|
|
75
|
-
if (
|
|
219
|
+
if (e.success)
|
|
76
220
|
return "maz-border-success";
|
|
77
|
-
if (
|
|
221
|
+
if (e.warning)
|
|
78
222
|
return "maz-border-warning";
|
|
79
|
-
if (y.value ||
|
|
80
|
-
if (
|
|
223
|
+
if (y.value || e.borderActive) {
|
|
224
|
+
if (e.color === "black")
|
|
81
225
|
return "maz-border-black";
|
|
82
|
-
if (
|
|
226
|
+
if (e.color === "danger")
|
|
83
227
|
return "maz-border-danger";
|
|
84
|
-
if (
|
|
228
|
+
if (e.color === "info")
|
|
85
229
|
return "maz-border-info";
|
|
86
|
-
if (
|
|
230
|
+
if (e.color === "primary")
|
|
87
231
|
return "maz-border-primary";
|
|
88
|
-
if (
|
|
232
|
+
if (e.color === "secondary")
|
|
89
233
|
return "maz-border-secondary";
|
|
90
|
-
if (
|
|
234
|
+
if (e.color === "success")
|
|
91
235
|
return "maz-border-success";
|
|
92
|
-
if (
|
|
236
|
+
if (e.color === "warning")
|
|
93
237
|
return "maz-border-warning";
|
|
94
|
-
if (
|
|
238
|
+
if (e.color === "white")
|
|
95
239
|
return "maz-border-white";
|
|
96
240
|
}
|
|
97
241
|
return "--default-border";
|
|
98
242
|
}
|
|
99
|
-
}),
|
|
100
|
-
const { required: r, placeholder:
|
|
101
|
-
if (
|
|
102
|
-
return r ? `${
|
|
103
|
-
}),
|
|
243
|
+
}), O = We(), W = m(() => {
|
|
244
|
+
const { required: r, placeholder: F } = e;
|
|
245
|
+
if (F)
|
|
246
|
+
return r ? `${F} *` : F;
|
|
247
|
+
}), Q = m(() => h.value !== void 0 && h.value !== ""), v = mo(
|
|
104
248
|
(r) => {
|
|
105
|
-
|
|
249
|
+
t("update:model-value", r);
|
|
106
250
|
},
|
|
107
|
-
typeof
|
|
108
|
-
)
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
251
|
+
typeof e.debounce == "number" ? e.debounce : e.debounceDelay ?? 500
|
|
252
|
+
);
|
|
253
|
+
function z(r) {
|
|
254
|
+
if (e.debounce)
|
|
255
|
+
return v(r);
|
|
256
|
+
t("update:model-value", r);
|
|
257
|
+
}
|
|
258
|
+
const h = m({
|
|
259
|
+
get: () => e.modelValue,
|
|
260
|
+
set: (r) => z(r)
|
|
261
|
+
}), G = m(() => (!!e.label || !!e.hint) && (y.value || !!Q.value || !!e.placeholder || ["date", "month", "week"].includes(e.type))), a = m(() => !!e.label || !!e.hint);
|
|
262
|
+
function $() {
|
|
263
|
+
return !!O["right-icon"] || p.value || !!O["valid-button"] || e.validButton || !!e.rightIcon;
|
|
118
264
|
}
|
|
119
|
-
function
|
|
120
|
-
return !!
|
|
265
|
+
function E() {
|
|
266
|
+
return !!O["left-icon"] || !!e.leftIcon;
|
|
121
267
|
}
|
|
122
|
-
function
|
|
123
|
-
|
|
268
|
+
function M(r) {
|
|
269
|
+
t("focus", r), y.value = !0;
|
|
124
270
|
}
|
|
125
|
-
function
|
|
126
|
-
|
|
271
|
+
function U(r) {
|
|
272
|
+
t("blur", r), y.value = !1;
|
|
127
273
|
}
|
|
128
274
|
function le(r) {
|
|
129
|
-
return
|
|
275
|
+
return t("change", r);
|
|
130
276
|
}
|
|
131
|
-
return (r,
|
|
277
|
+
return (r, F) => (V(), L(
|
|
132
278
|
"div",
|
|
133
279
|
{
|
|
134
280
|
class: N(["m-input", [
|
|
@@ -142,68 +288,67 @@ const so = {
|
|
|
142
288
|
"--has-state": r.error || r.warning || r.success,
|
|
143
289
|
"--block": r.block
|
|
144
290
|
},
|
|
145
|
-
|
|
291
|
+
e.class,
|
|
146
292
|
`--${r.color}`,
|
|
147
293
|
`--${r.size}`
|
|
148
294
|
]]),
|
|
149
295
|
style: te(r.style)
|
|
150
296
|
},
|
|
151
297
|
[
|
|
152
|
-
|
|
298
|
+
H(
|
|
153
299
|
"div",
|
|
154
300
|
{
|
|
155
301
|
class: N(["m-input-wrapper", [
|
|
156
302
|
r.inputClasses,
|
|
157
|
-
|
|
303
|
+
I.value,
|
|
158
304
|
r.roundedSize ? `--rounded-${r.roundedSize}` : { "maz-rounded": !r.noRadius }
|
|
159
305
|
]])
|
|
160
306
|
},
|
|
161
307
|
[
|
|
162
|
-
|
|
163
|
-
|
|
308
|
+
E() ? (V(), L("div", yo, [
|
|
309
|
+
g(`
|
|
164
310
|
@slot left-icon - The icon to display on the left of the input
|
|
165
311
|
`),
|
|
166
312
|
r.$slots["left-icon"] || r.leftIcon ? R(r.$slots, "left-icon", { key: 0 }, () => [
|
|
167
|
-
typeof r.leftIcon == "string" ? (
|
|
313
|
+
typeof r.leftIcon == "string" ? (V(), D(P(f), {
|
|
168
314
|
key: 0,
|
|
169
315
|
name: r.leftIcon,
|
|
170
316
|
class: "maz-text-xl maz-text-muted"
|
|
171
|
-
}, null, 8, ["name"])) : r.leftIcon ? (
|
|
317
|
+
}, null, 8, ["name"])) : r.leftIcon ? (V(), D(Se(r.leftIcon), {
|
|
172
318
|
key: 1,
|
|
173
319
|
class: "maz-text-xl maz-text-muted"
|
|
174
|
-
})) :
|
|
175
|
-
], !0) :
|
|
176
|
-
])) :
|
|
177
|
-
|
|
178
|
-
|
|
320
|
+
})) : g("v-if", !0)
|
|
321
|
+
], !0) : g("v-if", !0)
|
|
322
|
+
])) : g("v-if", !0),
|
|
323
|
+
H("div", vo, [
|
|
324
|
+
Pe(H("input", re({
|
|
179
325
|
id: P(s),
|
|
180
326
|
ref_key: "input",
|
|
181
|
-
ref:
|
|
182
|
-
"onUpdate:modelValue":
|
|
183
|
-
type:
|
|
327
|
+
ref: S,
|
|
328
|
+
"onUpdate:modelValue": F[0] || (F[0] = (J) => h.value = J),
|
|
329
|
+
type: w.value,
|
|
184
330
|
name: r.name
|
|
185
331
|
}, r.$attrs, {
|
|
186
332
|
inputmode: r.inputmode,
|
|
187
|
-
placeholder:
|
|
333
|
+
placeholder: W.value,
|
|
188
334
|
"aria-label": r.label || r.placeholder,
|
|
189
335
|
disabled: r.disabled,
|
|
190
336
|
readonly: r.readonly,
|
|
191
337
|
required: r.required,
|
|
192
338
|
class: "m-input-input"
|
|
193
339
|
}, Qe({
|
|
194
|
-
blur:
|
|
195
|
-
focus:
|
|
340
|
+
blur: U,
|
|
341
|
+
focus: M,
|
|
196
342
|
change: le
|
|
197
343
|
}, !0), {
|
|
198
|
-
onClick:
|
|
199
|
-
}), null, 16,
|
|
200
|
-
[Ge,
|
|
344
|
+
onClick: F[1] || (F[1] = (J) => r.$emit("click", J))
|
|
345
|
+
}), null, 16, ho), [
|
|
346
|
+
[Ge, h.value]
|
|
201
347
|
]),
|
|
202
|
-
r.label || r.hint ? (
|
|
348
|
+
r.label || r.hint ? (V(), L(
|
|
203
349
|
"span",
|
|
204
350
|
{
|
|
205
351
|
key: 0,
|
|
206
|
-
ref: "label",
|
|
207
352
|
class: N(["m-input-label", [
|
|
208
353
|
{
|
|
209
354
|
"maz-text-danger-600": r.error,
|
|
@@ -218,50 +363,50 @@ const so = {
|
|
|
218
363
|
1
|
|
219
364
|
/* TEXT */
|
|
220
365
|
),
|
|
221
|
-
r.required ? (
|
|
366
|
+
r.required ? (V(), L("sup", go, "*")) : g("v-if", !0)
|
|
222
367
|
],
|
|
223
368
|
2
|
|
224
369
|
/* CLASS */
|
|
225
|
-
)) :
|
|
370
|
+
)) : g("v-if", !0)
|
|
226
371
|
]),
|
|
227
|
-
|
|
228
|
-
|
|
372
|
+
$() ? (V(), L("div", bo, [
|
|
373
|
+
g(`
|
|
229
374
|
@slot right-icon - The icon to display on the right of the input
|
|
230
375
|
`),
|
|
231
376
|
r.$slots["right-icon"] || r.rightIcon ? R(r.$slots, "right-icon", { key: 0 }, () => [
|
|
232
|
-
typeof r.rightIcon == "string" ? (
|
|
377
|
+
typeof r.rightIcon == "string" ? (V(), D(P(f), {
|
|
233
378
|
key: 0,
|
|
234
379
|
name: r.rightIcon,
|
|
235
380
|
class: "maz-text-xl maz-text-muted"
|
|
236
|
-
}, null, 8, ["name"])) : r.rightIcon ? (
|
|
381
|
+
}, null, 8, ["name"])) : r.rightIcon ? (V(), D(Se(r.rightIcon), {
|
|
237
382
|
key: 1,
|
|
238
383
|
class: "maz-text-xl maz-text-muted"
|
|
239
|
-
})) :
|
|
240
|
-
], !0) :
|
|
241
|
-
|
|
384
|
+
})) : g("v-if", !0)
|
|
385
|
+
], !0) : g("v-if", !0),
|
|
386
|
+
p.value ? (V(), D(P(d), {
|
|
242
387
|
key: 1,
|
|
243
388
|
color: "transparent",
|
|
244
389
|
tabindex: "-1",
|
|
245
390
|
size: "mini",
|
|
246
|
-
onClick:
|
|
391
|
+
onClick: F[2] || (F[2] = oe((J) => A.value = !A.value, ["stop"]))
|
|
247
392
|
}, {
|
|
248
|
-
default:
|
|
249
|
-
|
|
393
|
+
default: j(() => [
|
|
394
|
+
A.value ? (V(), D(P(b), {
|
|
250
395
|
key: 0,
|
|
251
396
|
class: "maz-text-xl maz-text-muted"
|
|
252
|
-
})) : (
|
|
397
|
+
})) : (V(), D(P(k), {
|
|
253
398
|
key: 1,
|
|
254
399
|
class: "maz-text-xl maz-text-muted"
|
|
255
400
|
}))
|
|
256
401
|
]),
|
|
257
402
|
_: 1
|
|
258
403
|
/* STABLE */
|
|
259
|
-
})) :
|
|
260
|
-
|
|
404
|
+
})) : g("v-if", !0),
|
|
405
|
+
g(`
|
|
261
406
|
@slot valid-button - Replace the valid button by your own
|
|
262
407
|
`),
|
|
263
408
|
r.$slots["valid-button"] || r.validButton ? R(r.$slots, "valid-button", { key: 2 }, () => [
|
|
264
|
-
Z(P(
|
|
409
|
+
Z(P(d), {
|
|
265
410
|
color: "transparent",
|
|
266
411
|
disabled: r.disabled,
|
|
267
412
|
tabindex: "-1",
|
|
@@ -270,14 +415,14 @@ const so = {
|
|
|
270
415
|
size: "mini",
|
|
271
416
|
type: "submit"
|
|
272
417
|
}, {
|
|
273
|
-
default:
|
|
274
|
-
Z(P(
|
|
418
|
+
default: j(() => [
|
|
419
|
+
Z(P(K), { class: "maz-text-2xl maz-text-normal" })
|
|
275
420
|
]),
|
|
276
421
|
_: 1
|
|
277
422
|
/* STABLE */
|
|
278
423
|
}, 8, ["disabled", "loading"])
|
|
279
|
-
], !0) :
|
|
280
|
-
])) :
|
|
424
|
+
], !0) : g("v-if", !0)
|
|
425
|
+
])) : g("v-if", !0)
|
|
281
426
|
],
|
|
282
427
|
2
|
|
283
428
|
/* CLASS */
|
|
@@ -287,152 +432,7 @@ const so = {
|
|
|
287
432
|
/* CLASS, STYLE */
|
|
288
433
|
));
|
|
289
434
|
}
|
|
290
|
-
}),
|
|
291
|
-
const o = n.__vccOpts || n;
|
|
292
|
-
for (const [d, c] of l)
|
|
293
|
-
o[d] = c;
|
|
294
|
-
return o;
|
|
295
|
-
}, he = /* @__PURE__ */ re(po, [["__scopeId", "data-v-84073434"]]);
|
|
296
|
-
let pe = null;
|
|
297
|
-
function mo(n, l) {
|
|
298
|
-
pe && clearTimeout(pe), pe = setTimeout(n, l);
|
|
299
|
-
}
|
|
300
|
-
const yo = {
|
|
301
|
-
removeAccents: !0,
|
|
302
|
-
caseSensitive: !1,
|
|
303
|
-
replaceSpaces: !0,
|
|
304
|
-
removeSpecialCharacters: !1,
|
|
305
|
-
trim: !0,
|
|
306
|
-
normalizeSpaces: !0,
|
|
307
|
-
removeNumbers: !1,
|
|
308
|
-
customNormalizationForms: ["NFC", "NFKD"]
|
|
309
|
-
};
|
|
310
|
-
function ue(n, l) {
|
|
311
|
-
const o = { ...yo, ...l }, d = {
|
|
312
|
-
À: "A",
|
|
313
|
-
Á: "A",
|
|
314
|
-
Â: "A",
|
|
315
|
-
Ã: "A",
|
|
316
|
-
Ä: "A",
|
|
317
|
-
Å: "A",
|
|
318
|
-
à: "a",
|
|
319
|
-
á: "a",
|
|
320
|
-
â: "a",
|
|
321
|
-
ã: "a",
|
|
322
|
-
ä: "a",
|
|
323
|
-
å: "a",
|
|
324
|
-
È: "E",
|
|
325
|
-
É: "E",
|
|
326
|
-
Ê: "E",
|
|
327
|
-
Ë: "E",
|
|
328
|
-
è: "e",
|
|
329
|
-
é: "e",
|
|
330
|
-
ê: "e",
|
|
331
|
-
ë: "e",
|
|
332
|
-
Î: "I",
|
|
333
|
-
Ï: "I",
|
|
334
|
-
í: "I",
|
|
335
|
-
î: "i",
|
|
336
|
-
ï: "i",
|
|
337
|
-
Ô: "O",
|
|
338
|
-
Õ: "O",
|
|
339
|
-
Ö: "O",
|
|
340
|
-
Ø: "O",
|
|
341
|
-
ô: "o",
|
|
342
|
-
õ: "o",
|
|
343
|
-
ö: "o",
|
|
344
|
-
ø: "o",
|
|
345
|
-
Ù: "U",
|
|
346
|
-
Ú: "U",
|
|
347
|
-
Û: "U",
|
|
348
|
-
Ü: "U",
|
|
349
|
-
ù: "u",
|
|
350
|
-
ú: "u",
|
|
351
|
-
û: "u",
|
|
352
|
-
ü: "u",
|
|
353
|
-
Ç: "C",
|
|
354
|
-
ç: "c",
|
|
355
|
-
ÿ: "y",
|
|
356
|
-
Ñ: "N",
|
|
357
|
-
ñ: "n",
|
|
358
|
-
ó: "o"
|
|
359
|
-
};
|
|
360
|
-
let c = n.toString();
|
|
361
|
-
if (o.trim && (c = c.trim()), o.normalizeSpaces && (c = c.replaceAll(/\s+/g, " ")), o.replaceSpaces && (c = c.replaceAll(" ", "-")), o.removeNumbers && (c = c.replaceAll(/\d/g, "")), o.removeAccents && (c = c.replaceAll(/[ÀÁÂÃÄÅÇÈÉÊËÎÏÑÔÕÖØÙÚÛÜàáâãäåçèéêëíîïñóôõöøùúûüÿ]/g, (p) => d[p] || p), c = c.replaceAll(/[\u0300-\u036F]/g, "")), o.caseSensitive === !1 && (c = c.toLowerCase()), o.removeSpecialCharacters && (c = c.replaceAll(/[^\dA-Za-z-]/g, "")), o.trim && (c = c.trim()), o.customNormalizationForms)
|
|
362
|
-
for (const p of o.customNormalizationForms)
|
|
363
|
-
c = c.normalize(p);
|
|
364
|
-
return c;
|
|
365
|
-
}
|
|
366
|
-
function vo(n, l) {
|
|
367
|
-
const o = n.length, d = l.length, c = [];
|
|
368
|
-
for (let p = 0; p <= o; p++)
|
|
369
|
-
c[p] = [p];
|
|
370
|
-
for (let p = 0; p <= d; p++)
|
|
371
|
-
c[0][p] = p;
|
|
372
|
-
for (let p = 1; p <= o; p++)
|
|
373
|
-
for (let g = 1; g <= d; g++) {
|
|
374
|
-
const t = n[p - 1] === l[g - 1] ? 0 : 1;
|
|
375
|
-
c[p][g] = Math.min(
|
|
376
|
-
c[p - 1][g] + 1,
|
|
377
|
-
c[p][g - 1] + 1,
|
|
378
|
-
c[p - 1][g - 1] + t
|
|
379
|
-
);
|
|
380
|
-
}
|
|
381
|
-
return c[o][d];
|
|
382
|
-
}
|
|
383
|
-
function Fe(n, l) {
|
|
384
|
-
const o = vo(n, l), d = Math.max(n.length, l.length);
|
|
385
|
-
return 1 - o / d;
|
|
386
|
-
}
|
|
387
|
-
function ho(n, l, o = 0.75) {
|
|
388
|
-
return Fe(n, l) >= o;
|
|
389
|
-
}
|
|
390
|
-
function me(n, l, o = 0.75) {
|
|
391
|
-
const d = v(
|
|
392
|
-
() => ue(typeof n == "string" ? n : n.value)
|
|
393
|
-
), c = v(
|
|
394
|
-
() => ue(typeof l == "string" ? l : l.value)
|
|
395
|
-
), p = v(() => typeof o == "number" ? o : o.value), g = v(() => Fe(d.value, c.value));
|
|
396
|
-
return {
|
|
397
|
-
isMatching: v(
|
|
398
|
-
() => ho(d.value, c.value, p.value)
|
|
399
|
-
),
|
|
400
|
-
score: g
|
|
401
|
-
};
|
|
402
|
-
}
|
|
403
|
-
const Ee = (n, l, o) => {
|
|
404
|
-
var g;
|
|
405
|
-
n.stopPropagation();
|
|
406
|
-
const d = typeof o.value == "function" ? o.value : o.value.handler, c = typeof o.value == "object" ? o.value.exclude : void 0;
|
|
407
|
-
let p = !1;
|
|
408
|
-
if (c && c.length > 0) {
|
|
409
|
-
for (const t of c)
|
|
410
|
-
if (!p && n.target instanceof HTMLElement) {
|
|
411
|
-
const I = (g = document.querySelector(t)) == null ? void 0 : g.getAttribute("id");
|
|
412
|
-
p = n.target.getAttribute("id") === I;
|
|
413
|
-
}
|
|
414
|
-
}
|
|
415
|
-
!l.contains(n.target) && !p && (d == null || d());
|
|
416
|
-
};
|
|
417
|
-
function Le() {
|
|
418
|
-
return document.ontouchstart === null ? "touchstart" : "click";
|
|
419
|
-
}
|
|
420
|
-
function go(n, l) {
|
|
421
|
-
const o = Le();
|
|
422
|
-
document.removeEventListener(o, (d) => Ee(d, n, l));
|
|
423
|
-
}
|
|
424
|
-
function bo(n, l) {
|
|
425
|
-
if (typeof l.value != "function" && typeof l.value == "object" && typeof l.value.handler != "function") {
|
|
426
|
-
console.error("[maz-ui](vClosable) v-closable directive requires a handler function");
|
|
427
|
-
return;
|
|
428
|
-
}
|
|
429
|
-
const o = Le();
|
|
430
|
-
document.addEventListener(o, (d) => Ee(d, n, l));
|
|
431
|
-
}
|
|
432
|
-
const zo = {
|
|
433
|
-
mounted: bo,
|
|
434
|
-
unmounted: go
|
|
435
|
-
}, Co = ["aria-label"], Vo = { class: "m-select-list__no-results" }, wo = {
|
|
435
|
+
}), he = /* @__PURE__ */ se(zo, [["__scopeId", "data-v-e9affc48"]]), Co = ["aria-label"], Vo = { class: "m-select-list__no-results" }, wo = {
|
|
436
436
|
key: 2,
|
|
437
437
|
class: "m-select-list__scroll-wrapper",
|
|
438
438
|
tabindex: "-1"
|
|
@@ -464,256 +464,268 @@ const zo = {
|
|
|
464
464
|
excludeSelectors: { default: void 0 }
|
|
465
465
|
},
|
|
466
466
|
emits: ["close", "open", "blur", "focus", "change", "update:model-value", "selected-option"],
|
|
467
|
-
setup(n, { expose: l, emit:
|
|
468
|
-
Je((
|
|
469
|
-
"
|
|
470
|
-
"
|
|
471
|
-
"
|
|
467
|
+
setup(n, { expose: l, emit: e }) {
|
|
468
|
+
Je((o) => ({
|
|
469
|
+
"10a6fdb0": w.value,
|
|
470
|
+
"3653166f": s.value,
|
|
471
|
+
"44a0b897": p.value
|
|
472
472
|
}));
|
|
473
|
-
const d =
|
|
473
|
+
const t = n, d = e, f = q(() => import("./MazCheckbox-D3PXkt75.mjs")), b = q(() => import("./magnifying-glass-DZGg7953.mjs")), k = q(() => import("./chevron-down-CzMH-gFW.mjs")), K = q(() => import("./no-symbol-QAqP9IlR.mjs"));
|
|
474
474
|
l({
|
|
475
475
|
/** Method to open the option list */
|
|
476
476
|
openList: _,
|
|
477
477
|
/** Method to close the option list */
|
|
478
478
|
closeList: x
|
|
479
479
|
});
|
|
480
|
-
const
|
|
480
|
+
const A = B(!1), y = B(), S = m(
|
|
481
481
|
() => ["black", "transparent", "white"].includes(t.color)
|
|
482
|
-
), s =
|
|
483
|
-
() =>
|
|
484
|
-
),
|
|
485
|
-
() =>
|
|
486
|
-
),
|
|
487
|
-
() =>
|
|
488
|
-
),
|
|
482
|
+
), s = m(
|
|
483
|
+
() => S.value ? "var(--maz-color-black)" : `var(--maz-color-${t.color}-800)`
|
|
484
|
+
), p = m(
|
|
485
|
+
() => S.value ? "var(--maz-color-muted)" : `var(--maz-color-${t.color}-100)`
|
|
486
|
+
), w = m(
|
|
487
|
+
() => S.value ? "var(--maz-color-muted)" : `var(--maz-color-${t.color}-200)`
|
|
488
|
+
), I = m(() => A.value || t.open), O = be({
|
|
489
489
|
componentName: "MazSelect",
|
|
490
490
|
providedId: t.id
|
|
491
491
|
});
|
|
492
|
-
function
|
|
492
|
+
function W(o) {
|
|
493
493
|
return {
|
|
494
|
-
[t.optionValueKey]:
|
|
495
|
-
[t.optionLabelKey]:
|
|
496
|
-
[t.optionInputValueKey]:
|
|
494
|
+
[t.optionValueKey]: o,
|
|
495
|
+
[t.optionLabelKey]: o,
|
|
496
|
+
[t.optionInputValueKey]: o
|
|
497
497
|
};
|
|
498
498
|
}
|
|
499
|
-
function
|
|
499
|
+
function Q(o) {
|
|
500
500
|
return {
|
|
501
|
-
...
|
|
502
|
-
[t.optionValueKey]:
|
|
503
|
-
[t.optionLabelKey]:
|
|
504
|
-
[t.optionInputValueKey]:
|
|
501
|
+
...o,
|
|
502
|
+
[t.optionValueKey]: o[t.optionValueKey],
|
|
503
|
+
[t.optionLabelKey]: o[t.optionLabelKey],
|
|
504
|
+
[t.optionInputValueKey]: o[t.optionInputValueKey]
|
|
505
505
|
};
|
|
506
506
|
}
|
|
507
|
-
const
|
|
507
|
+
const v = m(() => {
|
|
508
508
|
var u;
|
|
509
|
-
const
|
|
509
|
+
const o = [];
|
|
510
510
|
if (!((u = t.options) != null && u.length))
|
|
511
511
|
return [];
|
|
512
|
-
for (const
|
|
513
|
-
typeof
|
|
514
|
-
{ label:
|
|
515
|
-
...
|
|
516
|
-
(i) => typeof i == "string" || typeof i == "number" || typeof i == "boolean" ?
|
|
512
|
+
for (const c of t.options)
|
|
513
|
+
typeof c == "string" || typeof c == "number" || typeof c == "boolean" ? o.push(W(c)) : typeof c == "object" && "options" in c && Array.isArray(c.options) ? o.push(
|
|
514
|
+
{ label: c.label, isOptGroup: !0 },
|
|
515
|
+
...c.options.map(
|
|
516
|
+
(i) => typeof i == "string" || typeof i == "number" || typeof i == "boolean" ? W(i) : Q(i)
|
|
517
517
|
)
|
|
518
|
-
) :
|
|
519
|
-
return
|
|
520
|
-
}),
|
|
518
|
+
) : o.push(Q(c));
|
|
519
|
+
return o;
|
|
520
|
+
}), z = m(
|
|
521
521
|
() => {
|
|
522
|
-
var
|
|
523
|
-
return ((
|
|
522
|
+
var o;
|
|
523
|
+
return ((o = v.value) == null ? void 0 : o.filter((u) => t.multiple ? Array.isArray(t.modelValue) ? t.modelValue.includes(u[t.optionValueKey]) && !E(u[t.optionValueKey]) : !1 : t.modelValue === u[t.optionValueKey] && !E(u[t.optionValueKey]))) ?? [];
|
|
524
524
|
}
|
|
525
525
|
);
|
|
526
526
|
Ze(() => {
|
|
527
|
-
var
|
|
528
|
-
(
|
|
527
|
+
var o;
|
|
528
|
+
(o = t.options) != null && o.length || console.warn("[maz-ui](MazSelect) you must provide options"), ce();
|
|
529
529
|
});
|
|
530
|
-
const
|
|
531
|
-
function
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
530
|
+
const h = B(), G = B(), a = B(), $ = B();
|
|
531
|
+
function E(o) {
|
|
532
|
+
return o == null;
|
|
533
|
+
}
|
|
534
|
+
function M(o) {
|
|
535
|
+
var c;
|
|
536
|
+
return (((c = z.value) == null ? void 0 : c.some(
|
|
537
|
+
(i) => i[t.optionValueKey] === o[t.optionValueKey]
|
|
538
|
+
)) ?? !1) && !E(o[t.optionValueKey]);
|
|
536
539
|
}
|
|
537
|
-
const
|
|
540
|
+
const U = m(() => {
|
|
538
541
|
var u;
|
|
539
542
|
if (t.multiple && t.modelValue && Array.isArray(t.modelValue))
|
|
540
543
|
return t.modelValue.map(
|
|
541
|
-
(
|
|
542
|
-
var i,
|
|
543
|
-
return (
|
|
544
|
+
(c) => {
|
|
545
|
+
var i, C;
|
|
546
|
+
return (C = (i = v.value) == null ? void 0 : i.find((T) => T[t.optionValueKey] === c)) == null ? void 0 : C[t.optionInputValueKey];
|
|
544
547
|
}
|
|
545
548
|
).join(", ");
|
|
546
|
-
const
|
|
547
|
-
(
|
|
549
|
+
const o = (u = v.value) == null ? void 0 : u.find(
|
|
550
|
+
(c) => c[t.optionValueKey] === t.modelValue
|
|
548
551
|
);
|
|
549
|
-
return
|
|
550
|
-
}), le =
|
|
552
|
+
return E(t.modelValue) || o == null ? void 0 : o[t.optionInputValueKey];
|
|
553
|
+
}), le = m(
|
|
551
554
|
() => t.listPosition.includes("bottom") ? "maz-slide" : "maz-slideinvert"
|
|
552
|
-
), r =
|
|
553
|
-
function
|
|
555
|
+
), r = B(""), F = B("");
|
|
556
|
+
function J(o, u) {
|
|
557
|
+
return u && o && ie(o).includes(ie(u));
|
|
558
|
+
}
|
|
559
|
+
function ze(o) {
|
|
554
560
|
var u;
|
|
555
|
-
return
|
|
556
|
-
const i =
|
|
557
|
-
return J(i,
|
|
558
|
-
}) :
|
|
561
|
+
return o ? (u = v.value) == null ? void 0 : u.filter((c) => {
|
|
562
|
+
const i = c[t.optionLabelKey], C = c[t.optionValueKey], T = c[t.optionInputValueKey];
|
|
563
|
+
return J(i, o) || J(T, o) || J(C, o) || typeof i == "string" && me(i, o, 0.5).isMatching.value || typeof T == "string" && me(T, o, 0.5).isMatching.value || typeof C == "string" && me(C, o, 0.5).isMatching.value;
|
|
564
|
+
}) : v.value;
|
|
559
565
|
}
|
|
560
|
-
const
|
|
561
|
-
async function x(
|
|
562
|
-
var
|
|
563
|
-
if (!
|
|
566
|
+
const Y = m(() => ze(r.value));
|
|
567
|
+
async function x(o) {
|
|
568
|
+
var c, i;
|
|
569
|
+
if (!I.value)
|
|
564
570
|
return;
|
|
565
|
-
if (
|
|
566
|
-
return
|
|
567
|
-
const u =
|
|
571
|
+
if (o && ("relatedTarget" in o && ((c = h.value) != null && c.contains(o.relatedTarget)) || o.type === "keydown"))
|
|
572
|
+
return o.preventDefault();
|
|
573
|
+
const u = o && "relatedTarget" in o && o.relatedTarget instanceof HTMLElement && o.relatedTarget.getAttribute("id");
|
|
568
574
|
if ((i = t.excludeSelectors) != null && i.includes(`#${u}`))
|
|
569
|
-
return
|
|
570
|
-
await ne(),
|
|
575
|
+
return o == null ? void 0 : o.preventDefault();
|
|
576
|
+
await ne(), A.value = !1, y.value = 0, d("close", o);
|
|
571
577
|
}
|
|
572
|
-
async function _(
|
|
573
|
-
t.disabled ||
|
|
578
|
+
async function _(o) {
|
|
579
|
+
t.disabled || I.value || (o == null || o.preventDefault(), A.value = !0, await de(), d("focus", o), d("open", A.value));
|
|
574
580
|
}
|
|
575
581
|
function Ce() {
|
|
576
|
-
var
|
|
577
|
-
(u = ((
|
|
582
|
+
var o, u;
|
|
583
|
+
(u = ((o = G.value) == null ? void 0 : o.$el).querySelector("input")) == null || u.focus();
|
|
578
584
|
}
|
|
579
|
-
function De(
|
|
580
|
-
|
|
585
|
+
function De(o) {
|
|
586
|
+
A.value ? x(o) : Ce();
|
|
581
587
|
}
|
|
582
|
-
function Oe(
|
|
583
|
-
var u,
|
|
584
|
-
r.value =
|
|
588
|
+
function Oe(o) {
|
|
589
|
+
var u, c;
|
|
590
|
+
r.value = o, (c = ((u = a.value) == null ? void 0 : u.$el).querySelector("input")) == null || c.focus();
|
|
585
591
|
}
|
|
586
|
-
function Ue(
|
|
587
|
-
var
|
|
588
|
-
|
|
589
|
-
const u = ze(
|
|
590
|
-
u != null && u.length && (y.value = (
|
|
592
|
+
function Ue(o) {
|
|
593
|
+
var c;
|
|
594
|
+
o === "Backspace" && F.value.length > 0 ? F.value = F.value.slice(0, -1) : F.value += o;
|
|
595
|
+
const u = ze(F.value);
|
|
596
|
+
u != null && u.length && (y.value = (c = Y.value) == null ? void 0 : c.findIndex(
|
|
591
597
|
(i) => i[t.optionValueKey] === u[0][t.optionValueKey]
|
|
592
|
-
), typeof y.value == "number" && y.value >= 0 && de(y.value)),
|
|
593
|
-
|
|
598
|
+
), typeof y.value == "number" && y.value >= 0 && de(y.value)), ro(() => {
|
|
599
|
+
F.value = "";
|
|
594
600
|
}, 1e3);
|
|
595
601
|
}
|
|
596
|
-
|
|
597
|
-
const u =
|
|
598
|
-
/^[\dA-Za-z\u0400-\u04FF]$/.test(u) ? (
|
|
599
|
-
}
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
var S;
|
|
604
|
-
e.preventDefault();
|
|
605
|
-
const f = e.code;
|
|
606
|
-
k.value || _(e);
|
|
607
|
-
const i = (S = H.value) == null ? void 0 : S.length;
|
|
608
|
-
i && (typeof u == "number" ? u === i - 1 && f === "ArrowDown" ? y.value = 0 : u === 0 && f === "ArrowUp" ? y.value = i - 1 : y.value = f === "ArrowDown" ? u + 1 : u - 1 : y.value = f === "ArrowDown" ? 0 : i - 1, de(y.value));
|
|
609
|
-
}, He = (e, u) => {
|
|
610
|
-
var i, S, K;
|
|
611
|
-
if (e.preventDefault(), !k.value)
|
|
612
|
-
return _(e);
|
|
613
|
-
const f = u ? ((i = H.value) == null ? void 0 : i[u]) ?? ((S = H.value) == null ? void 0 : S[0]) : (K = H.value) == null ? void 0 : K[0];
|
|
614
|
-
L(f) || we(f);
|
|
615
|
-
};
|
|
616
|
-
async function de(e) {
|
|
617
|
-
var f, i;
|
|
618
|
-
await ne(), typeof e != "number" && ce();
|
|
619
|
-
const u = e ?? y.value;
|
|
620
|
-
typeof u == "number" && u >= 0 && ((i = (f = B.value) == null ? void 0 : f.querySelectorAll(".m-select-list-item")[u]) == null || i.scrollIntoView({
|
|
621
|
-
behavior: "auto",
|
|
622
|
-
block: "nearest",
|
|
623
|
-
inline: "start"
|
|
624
|
-
}));
|
|
602
|
+
function Ye(o) {
|
|
603
|
+
const u = o.key;
|
|
604
|
+
/^[\dA-Za-z\u0400-\u04FF]$/.test(u) ? (o.preventDefault(), _(o), t.search ? Oe(u) : Ue(u)) : Ve(o);
|
|
605
|
+
}
|
|
606
|
+
function Ve(o) {
|
|
607
|
+
const u = o.code, c = ["ArrowUp", "ArrowDown"].includes(u), i = ["Enter", "Space"].includes(u), C = u === "Escape" && I.value;
|
|
608
|
+
c ? qe(o, y.value) : i ? He(o, y.value) : C && x(o);
|
|
625
609
|
}
|
|
626
|
-
function
|
|
627
|
-
var
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
610
|
+
function qe(o, u) {
|
|
611
|
+
var C;
|
|
612
|
+
o.preventDefault();
|
|
613
|
+
const c = o.code;
|
|
614
|
+
I.value || _(o);
|
|
615
|
+
const i = (C = Y.value) == null ? void 0 : C.length;
|
|
616
|
+
i && (typeof u == "number" ? u === i - 1 && c === "ArrowDown" ? y.value = 0 : u === 0 && c === "ArrowUp" ? y.value = i - 1 : y.value = c === "ArrowDown" ? u + 1 : u - 1 : y.value = c === "ArrowDown" ? 0 : i - 1, de(y.value));
|
|
617
|
+
}
|
|
618
|
+
function He(o, u) {
|
|
619
|
+
var i, C, T;
|
|
620
|
+
if (o.preventDefault(), !I.value)
|
|
621
|
+
return _(o);
|
|
622
|
+
const c = u ? ((i = Y.value) == null ? void 0 : i[u]) ?? ((C = Y.value) == null ? void 0 : C[0]) : (T = Y.value) == null ? void 0 : T[0];
|
|
623
|
+
E(c) || we(c);
|
|
624
|
+
}
|
|
625
|
+
async function de(o) {
|
|
626
|
+
var c, i;
|
|
627
|
+
await ne(), typeof o != "number" && ce();
|
|
628
|
+
const u = o ?? y.value;
|
|
629
|
+
if (typeof u == "number" && u >= 0) {
|
|
630
|
+
const C = (c = $.value) == null ? void 0 : c.querySelectorAll(".m-select-list-item");
|
|
631
|
+
(i = C == null ? void 0 : C[u]) == null || i.scrollIntoView({
|
|
632
|
+
behavior: "auto",
|
|
633
|
+
block: "nearest",
|
|
634
|
+
inline: "start"
|
|
635
|
+
});
|
|
636
|
+
}
|
|
637
|
+
}
|
|
638
|
+
function ce(o) {
|
|
639
|
+
var c;
|
|
640
|
+
const u = (c = Y.value) == null ? void 0 : c.findIndex((i) => {
|
|
641
|
+
var C, T;
|
|
642
|
+
return t.multiple && Array.isArray(t.modelValue) ? o ? o[t.optionValueKey] === i[t.optionValueKey] : [...t.modelValue].reverse()[0] === i[t.optionValueKey] : ((T = (C = z.value) == null ? void 0 : C[0]) == null ? void 0 : T[t.optionValueKey]) === i[t.optionValueKey];
|
|
631
643
|
});
|
|
632
644
|
y.value = u && u >= 0 ? u : 0;
|
|
633
645
|
}
|
|
634
|
-
function we(
|
|
635
|
-
var
|
|
646
|
+
function we(o, u = !0) {
|
|
647
|
+
var T;
|
|
636
648
|
u && !t.multiple && ne(() => x()), r.value = "";
|
|
637
|
-
const
|
|
638
|
-
(ee) => ee[t.optionValueKey] ===
|
|
649
|
+
const c = (T = z.value) == null ? void 0 : T.some(
|
|
650
|
+
(ee) => ee[t.optionValueKey] === o[t.optionValueKey]
|
|
639
651
|
);
|
|
640
|
-
let i =
|
|
641
|
-
|
|
642
|
-
(ee) => ee[t.optionValueKey] !==
|
|
643
|
-
) : t.multiple ? i.push(
|
|
644
|
-
const
|
|
645
|
-
|
|
652
|
+
let i = z.value;
|
|
653
|
+
c && t.multiple ? i = i == null ? void 0 : i.filter(
|
|
654
|
+
(ee) => ee[t.optionValueKey] !== o[t.optionValueKey]
|
|
655
|
+
) : t.multiple ? i.push(o) : i = [o];
|
|
656
|
+
const C = i.map((ee) => ee[t.optionValueKey]);
|
|
657
|
+
d("update:model-value", t.multiple ? C : C[0]), d("selected-option", o), ce(o), Ce();
|
|
646
658
|
}
|
|
647
|
-
return (
|
|
648
|
-
var
|
|
649
|
-
return
|
|
659
|
+
return (o, u) => {
|
|
660
|
+
var c;
|
|
661
|
+
return Pe((V(), L(
|
|
650
662
|
"div",
|
|
651
663
|
{
|
|
652
664
|
ref_key: "mazSelectElement",
|
|
653
|
-
ref:
|
|
665
|
+
ref: h,
|
|
654
666
|
class: N(["m-select", [
|
|
655
|
-
{ "--is-open":
|
|
667
|
+
{ "--is-open": I.value, "--disabled": o.disabled, "--block": o.block },
|
|
656
668
|
t.class,
|
|
657
|
-
`--${
|
|
669
|
+
`--${o.size}`
|
|
658
670
|
]]),
|
|
659
|
-
style: te(
|
|
671
|
+
style: te(o.style)
|
|
660
672
|
},
|
|
661
673
|
[
|
|
662
|
-
Z(he,
|
|
663
|
-
id: P(
|
|
674
|
+
Z(he, re({
|
|
675
|
+
id: P(O),
|
|
664
676
|
ref_key: "mazInputComponent",
|
|
665
677
|
ref: G,
|
|
666
678
|
class: "m-select-input"
|
|
667
|
-
},
|
|
668
|
-
required:
|
|
669
|
-
"border-active":
|
|
670
|
-
color:
|
|
671
|
-
"model-value":
|
|
679
|
+
}, o.$attrs, {
|
|
680
|
+
required: o.required,
|
|
681
|
+
"border-active": A.value,
|
|
682
|
+
color: o.color,
|
|
683
|
+
"model-value": U.value,
|
|
672
684
|
autocomplete: "off",
|
|
673
|
-
size:
|
|
685
|
+
size: o.size,
|
|
674
686
|
block: "",
|
|
675
|
-
disabled:
|
|
687
|
+
disabled: o.disabled,
|
|
676
688
|
onFocus: oe(_, ["prevent", "stop"]),
|
|
677
689
|
onBlur: oe(x, ["prevent", "stop"]),
|
|
678
690
|
onClick: oe(_, ["prevent", "stop"]),
|
|
679
|
-
onChange: u[0] || (u[0] = (i) =>
|
|
691
|
+
onChange: u[0] || (u[0] = (i) => d("change", i)),
|
|
680
692
|
onKeydown: Ye
|
|
681
693
|
}), {
|
|
682
|
-
"right-icon":
|
|
683
|
-
|
|
694
|
+
"right-icon": j(() => [
|
|
695
|
+
H("button", {
|
|
684
696
|
tabindex: "-1",
|
|
685
697
|
type: "button",
|
|
686
698
|
class: "m-select-input__toggle-button maz-custom",
|
|
687
|
-
"aria-label": `${
|
|
699
|
+
"aria-label": `${I.value ? "collapse" : "expand"} list of options`,
|
|
688
700
|
onClick: oe(De, ["stop"])
|
|
689
701
|
}, [
|
|
690
|
-
Z(P(
|
|
702
|
+
Z(P(k), { class: "m-select-chevron maz-text-xl" })
|
|
691
703
|
], 8, Co)
|
|
692
704
|
]),
|
|
693
705
|
_: 1
|
|
694
706
|
/* STABLE */
|
|
695
707
|
}, 16, ["id", "required", "border-active", "color", "model-value", "size", "disabled"]),
|
|
696
708
|
Z(Xe, { name: le.value }, {
|
|
697
|
-
default:
|
|
698
|
-
|
|
709
|
+
default: j(() => [
|
|
710
|
+
I.value ? (V(), L(
|
|
699
711
|
"div",
|
|
700
712
|
{
|
|
701
713
|
key: 0,
|
|
702
714
|
ref_key: "optionsListElement",
|
|
703
|
-
ref:
|
|
715
|
+
ref: $,
|
|
704
716
|
class: N(["m-select-list", {
|
|
705
|
-
"--top":
|
|
706
|
-
"--left":
|
|
707
|
-
"--right":
|
|
708
|
-
"--bottom":
|
|
717
|
+
"--top": o.listPosition.includes("top"),
|
|
718
|
+
"--left": o.listPosition.includes("left"),
|
|
719
|
+
"--right": o.listPosition.includes("right"),
|
|
720
|
+
"--bottom": o.listPosition.includes("bottom")
|
|
709
721
|
}]),
|
|
710
722
|
style: te({
|
|
711
|
-
maxHeight: `${
|
|
712
|
-
maxWidth: `${
|
|
723
|
+
maxHeight: `${o.maxListHeight}px`,
|
|
724
|
+
maxWidth: `${o.maxListWidth}px`
|
|
713
725
|
})
|
|
714
726
|
},
|
|
715
727
|
[
|
|
716
|
-
|
|
728
|
+
o.search ? (V(), D(he, {
|
|
717
729
|
key: 0,
|
|
718
730
|
ref_key: "searchInputComponent",
|
|
719
731
|
ref: a,
|
|
@@ -723,79 +735,79 @@ const zo = {
|
|
|
723
735
|
u[2] || (u[2] = (i) => y.value = 0)
|
|
724
736
|
],
|
|
725
737
|
size: "sm",
|
|
726
|
-
color:
|
|
727
|
-
placeholder:
|
|
738
|
+
color: o.color,
|
|
739
|
+
placeholder: o.searchPlaceholder,
|
|
728
740
|
name: "search",
|
|
729
741
|
autocomplete: "off",
|
|
730
742
|
tabindex: "-1",
|
|
731
743
|
class: "m-select-list__search-input maz-flex-none",
|
|
732
|
-
"left-icon": P(
|
|
744
|
+
"left-icon": P(b),
|
|
733
745
|
onKeydown: Ve
|
|
734
|
-
}, null, 8, ["modelValue", "color", "placeholder", "left-icon"])) :
|
|
735
|
-
|
|
746
|
+
}, null, 8, ["modelValue", "color", "placeholder", "left-icon"])) : g("v-if", !0),
|
|
747
|
+
g(`
|
|
736
748
|
@slot No results slot - Displayed when no results corresponding with search query
|
|
737
749
|
`),
|
|
738
|
-
!
|
|
739
|
-
|
|
740
|
-
Z(P(
|
|
750
|
+
!Y.value || Y.value.length <= 0 ? R(o.$slots, "no-results", { key: 1 }, () => [
|
|
751
|
+
H("span", Vo, [
|
|
752
|
+
Z(P(K), { class: "maz-h-6 maz-w-6 maz-text-normal" })
|
|
741
753
|
])
|
|
742
|
-
], !0) : (
|
|
743
|
-
(
|
|
754
|
+
], !0) : (V(), L("div", wo, [
|
|
755
|
+
(V(!0), L(
|
|
744
756
|
Ie,
|
|
745
757
|
null,
|
|
746
|
-
xe(
|
|
758
|
+
xe(Y.value, (i, C) => (V(), L(
|
|
747
759
|
Ie,
|
|
748
|
-
{ key:
|
|
760
|
+
{ key: C },
|
|
749
761
|
[
|
|
750
|
-
|
|
762
|
+
g(`
|
|
751
763
|
@slot Custom optgroup label
|
|
752
764
|
@binding {String} label - the label of the optgroup
|
|
753
765
|
`),
|
|
754
|
-
i.label && i.isOptGroup ? R(
|
|
766
|
+
i.label && i.isOptGroup ? R(o.$slots, "optgroup", {
|
|
755
767
|
key: 0,
|
|
756
768
|
label: i.label
|
|
757
769
|
}, () => [
|
|
758
|
-
|
|
770
|
+
H(
|
|
759
771
|
"span",
|
|
760
772
|
So,
|
|
761
773
|
X(i.label),
|
|
762
774
|
1
|
|
763
775
|
/* TEXT */
|
|
764
776
|
)
|
|
765
|
-
], !0) : (
|
|
777
|
+
], !0) : (V(), L("button", {
|
|
766
778
|
key: 1,
|
|
767
779
|
tabindex: "-1",
|
|
768
780
|
type: "button",
|
|
769
781
|
class: N(["m-select-list-item maz-custom maz-flex-none", [
|
|
770
782
|
{
|
|
771
|
-
"--is-keyboard-selected": y.value ===
|
|
772
|
-
"--is-selected":
|
|
773
|
-
"--is-none-value":
|
|
783
|
+
"--is-keyboard-selected": y.value === C,
|
|
784
|
+
"--is-selected": M(i),
|
|
785
|
+
"--is-none-value": E(i[o.optionValueKey])
|
|
774
786
|
}
|
|
775
787
|
]]),
|
|
776
|
-
style: te(
|
|
777
|
-
onClick: oe((
|
|
788
|
+
style: te(o.itemHeight ? { height: `${o.itemHeight}px` } : void 0),
|
|
789
|
+
onClick: oe((T) => we(i), ["prevent", "stop"])
|
|
778
790
|
}, [
|
|
779
|
-
|
|
791
|
+
o.multiple ? (V(), D(P(f), {
|
|
780
792
|
key: 0,
|
|
781
793
|
tabindex: "-1",
|
|
782
|
-
"model-value":
|
|
794
|
+
"model-value": M(i),
|
|
783
795
|
size: "sm",
|
|
784
|
-
color:
|
|
785
|
-
}, null, 8, ["model-value", "color"])) :
|
|
786
|
-
|
|
796
|
+
color: o.color
|
|
797
|
+
}, null, 8, ["model-value", "color"])) : g("v-if", !0),
|
|
798
|
+
g(`
|
|
787
799
|
@slot Custom option
|
|
788
800
|
@binding {Object} option - the option object
|
|
789
801
|
@binding {Boolean} is-selected - if the option is selected
|
|
790
802
|
`),
|
|
791
|
-
R(
|
|
803
|
+
R(o.$slots, "default", {
|
|
792
804
|
option: i,
|
|
793
|
-
isSelected:
|
|
805
|
+
isSelected: M(i)
|
|
794
806
|
}, () => [
|
|
795
|
-
|
|
807
|
+
H(
|
|
796
808
|
"span",
|
|
797
809
|
null,
|
|
798
|
-
X(i[
|
|
810
|
+
X(i[o.optionLabelKey]),
|
|
799
811
|
1
|
|
800
812
|
/* TEXT */
|
|
801
813
|
)
|
|
@@ -812,7 +824,7 @@ const zo = {
|
|
|
812
824
|
],
|
|
813
825
|
6
|
|
814
826
|
/* CLASS, STYLE */
|
|
815
|
-
)) :
|
|
827
|
+
)) : g("v-if", !0)
|
|
816
828
|
]),
|
|
817
829
|
_: 3
|
|
818
830
|
/* FORWARDED */
|
|
@@ -821,24 +833,30 @@ const zo = {
|
|
|
821
833
|
6
|
|
822
834
|
/* CLASS, STYLE */
|
|
823
835
|
)), [
|
|
824
|
-
[P(
|
|
825
|
-
exclude: (
|
|
836
|
+
[P(po), {
|
|
837
|
+
exclude: (c = o.excludeSelectors) != null && c.length ? o.excludeSelectors : [],
|
|
826
838
|
handler: x
|
|
827
839
|
}]
|
|
828
840
|
]);
|
|
829
841
|
};
|
|
830
842
|
}
|
|
831
|
-
}), $o = /* @__PURE__ */
|
|
843
|
+
}), $o = /* @__PURE__ */ se(ko, [["__scopeId", "data-v-fe0403c3"]]);
|
|
832
844
|
function Me(n) {
|
|
833
845
|
return !!n;
|
|
834
846
|
}
|
|
835
847
|
function $e(n) {
|
|
836
848
|
return [...n].map((l) => {
|
|
837
|
-
const
|
|
838
|
-
return
|
|
849
|
+
const e = l.codePointAt(0);
|
|
850
|
+
return e ? e % 32 + 127461 : void 0;
|
|
839
851
|
}).filter(Me).map((l) => String.fromCodePoint(l)).join("");
|
|
840
852
|
}
|
|
841
|
-
function Te() {
|
|
853
|
+
function Te(n, l) {
|
|
854
|
+
const e = _e(n, l);
|
|
855
|
+
if (!e)
|
|
856
|
+
throw new TypeError(`[maz-ui](injectStrict) Could not resolve ${n}`);
|
|
857
|
+
return e;
|
|
858
|
+
}
|
|
859
|
+
function Ke() {
|
|
842
860
|
if (typeof window > "u")
|
|
843
861
|
return;
|
|
844
862
|
const n = window.navigator.language;
|
|
@@ -851,30 +869,30 @@ function Te() {
|
|
|
851
869
|
};
|
|
852
870
|
}
|
|
853
871
|
let ye, Be;
|
|
854
|
-
function Bo(n, l,
|
|
855
|
-
return
|
|
872
|
+
function Bo(n, l, e) {
|
|
873
|
+
return e != null && e[l] ? e[l] : ((Be !== n || !ye) && (Be = n, ye = new Intl.DisplayNames([n], { type: "region" })), ye.of(l));
|
|
856
874
|
}
|
|
857
|
-
function
|
|
858
|
-
var
|
|
859
|
-
const
|
|
860
|
-
n = n ?? ((
|
|
861
|
-
for (const
|
|
862
|
-
const
|
|
863
|
-
if (
|
|
875
|
+
function Po(n, l) {
|
|
876
|
+
var d;
|
|
877
|
+
const e = [], t = Ae();
|
|
878
|
+
n = n ?? ((d = Ke()) == null ? void 0 : d.browserLocale) ?? "en-US";
|
|
879
|
+
for (const f of t) {
|
|
880
|
+
const b = Bo(n, f, l);
|
|
881
|
+
if (b)
|
|
864
882
|
try {
|
|
865
|
-
const
|
|
866
|
-
|
|
867
|
-
iso2:
|
|
868
|
-
dialCode:
|
|
869
|
-
name:
|
|
883
|
+
const k = ue(f);
|
|
884
|
+
e.push({
|
|
885
|
+
iso2: f,
|
|
886
|
+
dialCode: k,
|
|
887
|
+
name: b
|
|
870
888
|
});
|
|
871
|
-
} catch (
|
|
872
|
-
console.error(`[MazPhoneNumberInput](getCountryCallingCode) ${
|
|
889
|
+
} catch (k) {
|
|
890
|
+
console.error(`[MazPhoneNumberInput](getCountryCallingCode) ${k}`);
|
|
873
891
|
}
|
|
874
892
|
}
|
|
875
|
-
return
|
|
893
|
+
return e;
|
|
876
894
|
}
|
|
877
|
-
async function
|
|
895
|
+
async function Ao() {
|
|
878
896
|
try {
|
|
879
897
|
const n = await fetch("https://ipwho.is"), { country_code: l } = await n.json();
|
|
880
898
|
return l;
|
|
@@ -888,20 +906,14 @@ function Fo(n) {
|
|
|
888
906
|
const l = new RegExp(/[^\d ()+-]/g);
|
|
889
907
|
return n.replaceAll(l, "").trim();
|
|
890
908
|
}
|
|
891
|
-
function
|
|
909
|
+
function Ne() {
|
|
892
910
|
return {
|
|
893
911
|
sanitizePhoneNumber: Fo,
|
|
894
|
-
fetchCountryCode:
|
|
895
|
-
getBrowserLocale:
|
|
896
|
-
getCountriesList:
|
|
912
|
+
fetchCountryCode: Ao,
|
|
913
|
+
getBrowserLocale: Ke,
|
|
914
|
+
getCountriesList: Po
|
|
897
915
|
};
|
|
898
916
|
}
|
|
899
|
-
function Ne(n, l) {
|
|
900
|
-
const o = _e(n, l);
|
|
901
|
-
if (!o)
|
|
902
|
-
throw new TypeError(`[maz-ui](injectStrict) Could not resolve ${n}`);
|
|
903
|
-
return o;
|
|
904
|
-
}
|
|
905
917
|
const Eo = ["id"], Lo = {
|
|
906
918
|
key: 0,
|
|
907
919
|
class: "maz-text-lg"
|
|
@@ -933,55 +945,55 @@ const Eo = ["id"], Lo = {
|
|
|
933
945
|
},
|
|
934
946
|
emits: ["update:model-value"],
|
|
935
947
|
setup(n) {
|
|
936
|
-
const l = n, { phoneNumber:
|
|
948
|
+
const l = n, { phoneNumber: e } = Te("data"), t = B(), { getCountriesList: d } = Ne(), f = m(() => d(l.countryLocale, l.customCountriesList)), b = m(
|
|
937
949
|
() => {
|
|
938
950
|
var s;
|
|
939
|
-
return (s =
|
|
940
|
-
var
|
|
941
|
-
return !((
|
|
951
|
+
return (s = f.value) == null ? void 0 : s.filter((p) => {
|
|
952
|
+
var w;
|
|
953
|
+
return !((w = l.ignoredCountries) != null && w.includes(p.iso2));
|
|
942
954
|
});
|
|
943
955
|
}
|
|
944
|
-
),
|
|
956
|
+
), k = m(() => {
|
|
945
957
|
const s = l.onlyCountries || l.preferredCountries;
|
|
946
958
|
return s == null ? void 0 : s.map(
|
|
947
|
-
(
|
|
948
|
-
var
|
|
949
|
-
return (
|
|
959
|
+
(p) => {
|
|
960
|
+
var w;
|
|
961
|
+
return (w = b.value) == null ? void 0 : w.find((I) => I.iso2.includes(p));
|
|
950
962
|
}
|
|
951
963
|
);
|
|
952
|
-
}),
|
|
964
|
+
}), K = m(
|
|
953
965
|
() => {
|
|
954
966
|
var s;
|
|
955
|
-
return (s =
|
|
956
|
-
var
|
|
957
|
-
return !((
|
|
967
|
+
return (s = b.value) == null ? void 0 : s.filter((p) => {
|
|
968
|
+
var w;
|
|
969
|
+
return !((w = l.preferredCountries) != null && w.includes(p.iso2));
|
|
958
970
|
});
|
|
959
971
|
}
|
|
960
|
-
),
|
|
961
|
-
() => l.preferredCountries ? [...
|
|
962
|
-
), y =
|
|
972
|
+
), A = m(
|
|
973
|
+
() => l.preferredCountries ? [...k.value ?? [], ...K.value ?? []] : l.onlyCountries ? k.value : b.value
|
|
974
|
+
), y = m(
|
|
963
975
|
() => {
|
|
964
976
|
var s;
|
|
965
|
-
return (s =
|
|
966
|
-
(
|
|
967
|
-
...
|
|
968
|
-
dialCode: `+${
|
|
977
|
+
return (s = A.value) == null ? void 0 : s.map(
|
|
978
|
+
(p) => p ? {
|
|
979
|
+
...p,
|
|
980
|
+
dialCode: `+${p.dialCode}`
|
|
969
981
|
} : void 0
|
|
970
982
|
).filter(Me);
|
|
971
983
|
}
|
|
972
984
|
);
|
|
973
|
-
async function
|
|
974
|
-
var s,
|
|
975
|
-
(
|
|
985
|
+
async function S() {
|
|
986
|
+
var s, p;
|
|
987
|
+
(p = (s = t.value) == null ? void 0 : s.$el.querySelector("input")) == null || p.focus();
|
|
976
988
|
}
|
|
977
|
-
return (s,
|
|
989
|
+
return (s, p) => (V(), L(
|
|
978
990
|
"div",
|
|
979
991
|
{
|
|
980
992
|
class: N(["m-country-selector", [l.class, { "--no-flags": s.noFlags }]]),
|
|
981
993
|
style: te(s.style)
|
|
982
994
|
},
|
|
983
995
|
[
|
|
984
|
-
s.modelValue && !s.noFlags ? (
|
|
996
|
+
s.modelValue && !s.noFlags ? (V(), L("button", {
|
|
985
997
|
key: 0,
|
|
986
998
|
id: `country-selector-flag-button-${s.id}`,
|
|
987
999
|
class: N(["m-country-selector__country-flag maz-text-xl", {
|
|
@@ -989,9 +1001,9 @@ const Eo = ["id"], Lo = {
|
|
|
989
1001
|
}]),
|
|
990
1002
|
tabindex: "-1",
|
|
991
1003
|
type: "button",
|
|
992
|
-
onClick:
|
|
1004
|
+
onClick: S
|
|
993
1005
|
}, [
|
|
994
|
-
|
|
1006
|
+
g(`
|
|
995
1007
|
@slot Country selector flag
|
|
996
1008
|
@binding {String} country-code - current selected country code - Ex: \`"FR"\`
|
|
997
1009
|
`),
|
|
@@ -1002,11 +1014,11 @@ const Eo = ["id"], Lo = {
|
|
|
1002
1014
|
/* TEXT */
|
|
1003
1015
|
)
|
|
1004
1016
|
], !0)
|
|
1005
|
-
], 10, Eo)) :
|
|
1006
|
-
Z($o,
|
|
1017
|
+
], 10, Eo)) : g("v-if", !0),
|
|
1018
|
+
Z($o, re({
|
|
1007
1019
|
id: `country-selector-${s.id}`,
|
|
1008
1020
|
ref_key: "CountrySelectorRef",
|
|
1009
|
-
ref:
|
|
1021
|
+
ref: t,
|
|
1010
1022
|
"model-value": s.modelValue
|
|
1011
1023
|
}, s.$attrs, {
|
|
1012
1024
|
class: "m-country-selector__select",
|
|
@@ -1024,61 +1036,61 @@ const Eo = ["id"], Lo = {
|
|
|
1024
1036
|
search: !s.noSearch,
|
|
1025
1037
|
"search-placeholder": s.locales.countrySelector.searchPlaceholder,
|
|
1026
1038
|
options: y.value,
|
|
1027
|
-
hint: P(
|
|
1039
|
+
hint: P(e) && !s.modelValue ? s.locales.countrySelector.error : void 0,
|
|
1028
1040
|
label: s.locales.countrySelector.placeholder,
|
|
1029
1041
|
style: {
|
|
1030
1042
|
width: s.width
|
|
1031
1043
|
},
|
|
1032
1044
|
"exclude-selectors": [`#country-selector-flag-button-${s.id}`, ...s.excludeSelectors ?? []],
|
|
1033
|
-
"onUpdate:modelValue":
|
|
1045
|
+
"onUpdate:modelValue": p[0] || (p[0] = (w) => s.$emit("update:model-value", w))
|
|
1034
1046
|
}), {
|
|
1035
|
-
"no-results":
|
|
1047
|
+
"no-results": j(() => [
|
|
1036
1048
|
R(s.$slots, "no-results", {}, void 0, !0)
|
|
1037
1049
|
]),
|
|
1038
|
-
default:
|
|
1039
|
-
|
|
1050
|
+
default: j(({ option: w, isSelected: I }) => [
|
|
1051
|
+
H(
|
|
1040
1052
|
"div",
|
|
1041
1053
|
{
|
|
1042
1054
|
class: N(["m-country-selector__select__item maz-flex maz-items-center maz-gap-1 maz-truncate", {
|
|
1043
|
-
"m-country-selector__select__item--selected":
|
|
1055
|
+
"m-country-selector__select__item--selected": I
|
|
1044
1056
|
}])
|
|
1045
1057
|
},
|
|
1046
1058
|
[
|
|
1047
|
-
!s.noFlags && typeof
|
|
1048
|
-
|
|
1059
|
+
!s.noFlags && typeof w.iso2 == "string" ? (V(), L("span", Lo, [
|
|
1060
|
+
g(`
|
|
1049
1061
|
@slot Country list flag
|
|
1050
1062
|
@binding {String} country-code - country code of option - Ex: \`"FR"\`
|
|
1051
1063
|
@binding {{ iso2: string; dialCode: string; name: string; }} option - country data
|
|
1052
1064
|
@binding {Boolean} is-selected - \`true\` if option is selected
|
|
1053
1065
|
`),
|
|
1054
1066
|
R(s.$slots, "country-list-flag", {
|
|
1055
|
-
countryCode:
|
|
1056
|
-
option:
|
|
1057
|
-
isSelected:
|
|
1067
|
+
countryCode: w.iso2,
|
|
1068
|
+
option: w,
|
|
1069
|
+
isSelected: I
|
|
1058
1070
|
}, () => [
|
|
1059
1071
|
ve(
|
|
1060
|
-
X(P($e)(
|
|
1072
|
+
X(P($e)(w.iso2)),
|
|
1061
1073
|
1
|
|
1062
1074
|
/* TEXT */
|
|
1063
1075
|
)
|
|
1064
1076
|
], !0)
|
|
1065
|
-
])) :
|
|
1066
|
-
s.showCodeOnList ? (
|
|
1077
|
+
])) : g("v-if", !0),
|
|
1078
|
+
s.showCodeOnList ? (V(), L(
|
|
1067
1079
|
"span",
|
|
1068
1080
|
{
|
|
1069
1081
|
key: 1,
|
|
1070
|
-
class: N(["maz-w-9 maz-flex-none", { "maz-text-muted": !
|
|
1082
|
+
class: N(["maz-w-9 maz-flex-none", { "maz-text-muted": !I }])
|
|
1071
1083
|
},
|
|
1072
|
-
X(
|
|
1084
|
+
X(w.dialCode),
|
|
1073
1085
|
3
|
|
1074
1086
|
/* TEXT, CLASS */
|
|
1075
|
-
)) :
|
|
1076
|
-
|
|
1087
|
+
)) : g("v-if", !0),
|
|
1088
|
+
H(
|
|
1077
1089
|
"span",
|
|
1078
1090
|
{
|
|
1079
|
-
class: N(["maz-flex-1 maz-truncate", { "maz-font-semibold":
|
|
1091
|
+
class: N(["maz-flex-1 maz-truncate", { "maz-font-semibold": I }])
|
|
1080
1092
|
},
|
|
1081
|
-
X(
|
|
1093
|
+
X(w.name),
|
|
1082
1094
|
3
|
|
1083
1095
|
/* TEXT, CLASS */
|
|
1084
1096
|
)
|
|
@@ -1095,7 +1107,7 @@ const Eo = ["id"], Lo = {
|
|
|
1095
1107
|
/* CLASS, STYLE */
|
|
1096
1108
|
));
|
|
1097
1109
|
}
|
|
1098
|
-
}), To = /* @__PURE__ */
|
|
1110
|
+
}), To = /* @__PURE__ */ se(Mo, [["__scopeId", "data-v-1e2814b9"]]);
|
|
1099
1111
|
function Ko(n) {
|
|
1100
1112
|
try {
|
|
1101
1113
|
const l = to(n);
|
|
@@ -1114,47 +1126,47 @@ function No({
|
|
|
1114
1126
|
isValid: !1,
|
|
1115
1127
|
countryCode: l
|
|
1116
1128
|
};
|
|
1117
|
-
const
|
|
1129
|
+
const e = lo(n, l);
|
|
1118
1130
|
return {
|
|
1119
|
-
countryCode: (
|
|
1120
|
-
isValid: (
|
|
1121
|
-
isPossible:
|
|
1122
|
-
countryCallingCode:
|
|
1123
|
-
nationalNumber:
|
|
1124
|
-
type:
|
|
1125
|
-
formatInternational:
|
|
1126
|
-
formatNational:
|
|
1127
|
-
uri:
|
|
1128
|
-
e164:
|
|
1129
|
-
rfc3966:
|
|
1131
|
+
countryCode: (e == null ? void 0 : e.country) ?? l,
|
|
1132
|
+
isValid: (e == null ? void 0 : e.isValid()) ?? !1,
|
|
1133
|
+
isPossible: e == null ? void 0 : e.isPossible(),
|
|
1134
|
+
countryCallingCode: e == null ? void 0 : e.countryCallingCode,
|
|
1135
|
+
nationalNumber: e == null ? void 0 : e.nationalNumber,
|
|
1136
|
+
type: e == null ? void 0 : e.getType(),
|
|
1137
|
+
formatInternational: e == null ? void 0 : e.formatInternational(),
|
|
1138
|
+
formatNational: e == null ? void 0 : e.formatNational(),
|
|
1139
|
+
uri: e == null ? void 0 : e.getURI(),
|
|
1140
|
+
e164: e == null ? void 0 : e.format("E.164"),
|
|
1141
|
+
rfc3966: e == null ? void 0 : e.format("RFC3966"),
|
|
1130
1142
|
phoneNumber: n
|
|
1131
1143
|
};
|
|
1132
|
-
} catch (
|
|
1133
|
-
throw new Error(`[MazPhoneNumberInput](getResultsFromPhoneNumber) ${
|
|
1144
|
+
} catch (e) {
|
|
1145
|
+
throw new Error(`[MazPhoneNumberInput](getResultsFromPhoneNumber) ${e}`);
|
|
1134
1146
|
}
|
|
1135
1147
|
}
|
|
1136
1148
|
function Ro(n, l) {
|
|
1137
1149
|
try {
|
|
1138
1150
|
return l ? new no(n).input(l) : "";
|
|
1139
|
-
} catch (
|
|
1140
|
-
throw new Error(`[MazPhoneNumberInput](getAsYouTypeFormat) ${
|
|
1151
|
+
} catch (e) {
|
|
1152
|
+
throw new Error(`[MazPhoneNumberInput](getAsYouTypeFormat) ${e}`);
|
|
1141
1153
|
}
|
|
1142
1154
|
}
|
|
1143
1155
|
async function Do() {
|
|
1144
|
-
const { default: n } = await import("./examples.mobile.json-
|
|
1156
|
+
const { default: n } = await import("./examples.mobile.json-JpNGylGv.mjs");
|
|
1145
1157
|
return n;
|
|
1146
1158
|
}
|
|
1147
1159
|
function Oo(n, l) {
|
|
1148
|
-
var
|
|
1160
|
+
var e;
|
|
1149
1161
|
try {
|
|
1150
|
-
return n && l ? (
|
|
1151
|
-
} catch (
|
|
1152
|
-
console.error(`[maz-ui](MazPhoneNumberInput) ${
|
|
1162
|
+
return n && l ? (e = ao(l, n)) == null ? void 0 : e.formatNational() : void 0;
|
|
1163
|
+
} catch (t) {
|
|
1164
|
+
console.error(`[maz-ui](MazPhoneNumberInput) ${t}`);
|
|
1153
1165
|
}
|
|
1154
1166
|
}
|
|
1155
1167
|
function Re() {
|
|
1156
|
-
function n(l,
|
|
1157
|
-
return
|
|
1168
|
+
function n(l, e) {
|
|
1169
|
+
return ue(l) === ue(e);
|
|
1158
1170
|
}
|
|
1159
1171
|
return {
|
|
1160
1172
|
getAsYouTypeFormat: Ro,
|
|
@@ -1163,8 +1175,8 @@ function Re() {
|
|
|
1163
1175
|
getPhoneNumberExample: Oo,
|
|
1164
1176
|
isSameCountryCallingCode: n,
|
|
1165
1177
|
isCountryAvailable: Ko,
|
|
1166
|
-
getCountries:
|
|
1167
|
-
getCountryCallingCode:
|
|
1178
|
+
getCountries: Ae,
|
|
1179
|
+
getCountryCallingCode: ue
|
|
1168
1180
|
};
|
|
1169
1181
|
}
|
|
1170
1182
|
const Uo = /* @__PURE__ */ ae({
|
|
@@ -1175,6 +1187,7 @@ const Uo = /* @__PURE__ */ ae({
|
|
|
1175
1187
|
size: {},
|
|
1176
1188
|
locales: {},
|
|
1177
1189
|
label: { default: void 0 },
|
|
1190
|
+
placeholder: { default: void 0 },
|
|
1178
1191
|
noExample: { type: Boolean },
|
|
1179
1192
|
disabled: { type: Boolean },
|
|
1180
1193
|
hasRadius: { type: Boolean },
|
|
@@ -1188,63 +1201,71 @@ const Uo = /* @__PURE__ */ ae({
|
|
|
1188
1201
|
}),
|
|
1189
1202
|
emits: /* @__PURE__ */ ke(["update:model-value"], ["update:modelValue"]),
|
|
1190
1203
|
setup(n, { emit: l }) {
|
|
1191
|
-
const
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1204
|
+
const e = n, t = l, d = eo(n, "modelValue"), { getPhoneNumberExamplesFile: f, getPhoneNumberExample: b } = Re(), { selectionRange: k, results: K, selectedCountry: A } = Te("data"), y = B(), S = B(!1);
|
|
1205
|
+
function s(v, z) {
|
|
1206
|
+
const h = b(v, z);
|
|
1207
|
+
return h ? `${e.locales.phoneInput.example} ${h}` : void 0;
|
|
1208
|
+
}
|
|
1209
|
+
const p = m(() => {
|
|
1210
|
+
var z;
|
|
1211
|
+
if (e.label || e.placeholder)
|
|
1212
|
+
return e.label || e.placeholder;
|
|
1213
|
+
const v = e.locales.phoneInput.placeholder;
|
|
1214
|
+
if (e.noExample || !y.value)
|
|
1215
|
+
return v;
|
|
1198
1216
|
{
|
|
1199
|
-
const
|
|
1200
|
-
return (
|
|
1217
|
+
const h = s(y.value, A.value);
|
|
1218
|
+
return (z = K.value) != null && z.isValid || !h ? v : h;
|
|
1201
1219
|
}
|
|
1202
|
-
}),
|
|
1203
|
-
|
|
1220
|
+
}), w = m(() => e.placeholder ? {
|
|
1221
|
+
placeholder: p.value
|
|
1222
|
+
} : {
|
|
1223
|
+
label: p.value
|
|
1224
|
+
}), I = B();
|
|
1225
|
+
async function O() {
|
|
1204
1226
|
try {
|
|
1205
1227
|
if (y.value)
|
|
1206
1228
|
return;
|
|
1207
|
-
y.value = await
|
|
1208
|
-
} catch (
|
|
1209
|
-
console.error("[maz-ui](MazPhoneNumberInput) while loading phone number examples file",
|
|
1229
|
+
y.value = await f();
|
|
1230
|
+
} catch (v) {
|
|
1231
|
+
console.error("[maz-ui](MazPhoneNumberInput) while loading phone number examples file", v);
|
|
1210
1232
|
}
|
|
1211
1233
|
}
|
|
1212
|
-
async function
|
|
1213
|
-
|
|
1234
|
+
async function W(v) {
|
|
1235
|
+
I.value && v && Q(I.value, v), await ne(), t("update:model-value", v);
|
|
1214
1236
|
}
|
|
1215
|
-
function
|
|
1216
|
-
const
|
|
1217
|
-
|
|
1237
|
+
function Q(v, z) {
|
|
1238
|
+
const h = v.$el.querySelector("input");
|
|
1239
|
+
k.value.start = h == null ? void 0 : h.selectionStart, k.value.end = h == null ? void 0 : h.selectionEnd, k.value.cursorAtEnd = z && typeof k.value.start == "number" && z.length > 0 ? k.value.start >= z.length : !0;
|
|
1218
1240
|
}
|
|
1219
1241
|
return ge(() => {
|
|
1220
|
-
|
|
1221
|
-
}), (
|
|
1222
|
-
id:
|
|
1242
|
+
e.noExample || O();
|
|
1243
|
+
}), (v, z) => (V(), D(he, re({
|
|
1244
|
+
id: v.id,
|
|
1223
1245
|
ref_key: "PhoneInputRef",
|
|
1224
|
-
ref:
|
|
1225
|
-
"model-value":
|
|
1226
|
-
},
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
success: b.success,
|
|
1246
|
+
ref: I,
|
|
1247
|
+
"model-value": d.value
|
|
1248
|
+
}, { ...v.$attrs, ...w.value }, {
|
|
1249
|
+
disabled: v.disabled,
|
|
1250
|
+
color: v.color,
|
|
1251
|
+
error: v.error,
|
|
1252
|
+
size: v.size,
|
|
1253
|
+
success: v.success,
|
|
1233
1254
|
type: "tel",
|
|
1234
1255
|
inputmode: "tel",
|
|
1235
1256
|
class: ["m-phone-input", [
|
|
1236
1257
|
{
|
|
1237
|
-
"--border-radius":
|
|
1238
|
-
"--error":
|
|
1239
|
-
"--focused":
|
|
1258
|
+
"--border-radius": v.hasRadius,
|
|
1259
|
+
"--error": v.error || !P(K).isValid,
|
|
1260
|
+
"--focused": S.value
|
|
1240
1261
|
}
|
|
1241
1262
|
]],
|
|
1242
|
-
onFocus:
|
|
1243
|
-
onBlur:
|
|
1244
|
-
"onUpdate:modelValue":
|
|
1245
|
-
}), null, 16, ["id", "model-value", "
|
|
1263
|
+
onFocus: z[0] || (z[0] = (h) => S.value = !0),
|
|
1264
|
+
onBlur: z[1] || (z[1] = (h) => S.value = !1),
|
|
1265
|
+
"onUpdate:modelValue": z[2] || (z[2] = (h) => W(h))
|
|
1266
|
+
}), null, 16, ["id", "model-value", "disabled", "color", "error", "size", "success", "class"]));
|
|
1246
1267
|
}
|
|
1247
|
-
}), Yo = /* @__PURE__ */
|
|
1268
|
+
}), Yo = /* @__PURE__ */ se(Uo, [["__scopeId", "data-v-f3c379ea"]]), qo = {
|
|
1248
1269
|
countrySelector: {
|
|
1249
1270
|
placeholder: "Country code",
|
|
1250
1271
|
error: "Choose country",
|
|
@@ -1255,6 +1276,7 @@ const Uo = /* @__PURE__ */ ae({
|
|
|
1255
1276
|
example: "Example:"
|
|
1256
1277
|
}
|
|
1257
1278
|
}, Ho = /* @__PURE__ */ ae({
|
|
1279
|
+
name: "MazPhoneNumberInput",
|
|
1258
1280
|
inheritAttrs: !1,
|
|
1259
1281
|
__name: "MazPhoneNumberInput",
|
|
1260
1282
|
props: {
|
|
@@ -1266,6 +1288,7 @@ const Uo = /* @__PURE__ */ ae({
|
|
|
1266
1288
|
defaultCountryCode: { default: void 0 },
|
|
1267
1289
|
id: { default: void 0 },
|
|
1268
1290
|
placeholder: { default: void 0 },
|
|
1291
|
+
label: { default: void 0 },
|
|
1269
1292
|
preferredCountries: { default: void 0 },
|
|
1270
1293
|
ignoredCountries: { default: void 0 },
|
|
1271
1294
|
onlyCountries: { default: void 0 },
|
|
@@ -1297,149 +1320,149 @@ const Uo = /* @__PURE__ */ ae({
|
|
|
1297
1320
|
},
|
|
1298
1321
|
emits: ["update:model-value", "country-code", "update:country-code", "update", "data"],
|
|
1299
1322
|
setup(n, { emit: l }) {
|
|
1300
|
-
const
|
|
1323
|
+
const e = n, t = l, { fetchCountryCode: d, sanitizePhoneNumber: f, getBrowserLocale: b } = Ne(), { isCountryAvailable: k, getPhoneNumberResults: K, getAsYouTypeFormat: A } = Re(), y = be({
|
|
1301
1324
|
componentName: "MazPhoneNumberInput",
|
|
1302
|
-
providedId:
|
|
1303
|
-
}),
|
|
1325
|
+
providedId: e.id
|
|
1326
|
+
}), S = B(""), s = B(), p = B({
|
|
1304
1327
|
isValid: !1,
|
|
1305
1328
|
countryCode: void 0
|
|
1306
|
-
}),
|
|
1329
|
+
}), w = B({
|
|
1307
1330
|
start: 0,
|
|
1308
1331
|
end: 0,
|
|
1309
1332
|
cursorAtEnd: !0
|
|
1310
1333
|
});
|
|
1311
1334
|
oo("data", {
|
|
1312
1335
|
selectedCountry: s,
|
|
1313
|
-
phoneNumber:
|
|
1314
|
-
results:
|
|
1315
|
-
selectionRange:
|
|
1336
|
+
phoneNumber: S,
|
|
1337
|
+
results: p,
|
|
1338
|
+
selectionRange: w
|
|
1316
1339
|
});
|
|
1317
|
-
const
|
|
1340
|
+
const I = m(() => ({
|
|
1318
1341
|
...qo,
|
|
1319
|
-
...
|
|
1342
|
+
...e.translations
|
|
1320
1343
|
}));
|
|
1321
1344
|
ge(async () => {
|
|
1322
1345
|
var a;
|
|
1323
|
-
if (
|
|
1324
|
-
const
|
|
1325
|
-
|
|
1346
|
+
if (z(e.countryCode ?? e.defaultCountryCode), e.fetchCountry && !s.value) {
|
|
1347
|
+
const $ = await d();
|
|
1348
|
+
z($);
|
|
1326
1349
|
}
|
|
1327
|
-
if (!
|
|
1328
|
-
const
|
|
1329
|
-
|
|
1350
|
+
if (!e.defaultCountryCode && !e.noUseBrowserLocale && !s.value) {
|
|
1351
|
+
const $ = (a = b()) == null ? void 0 : a.locale;
|
|
1352
|
+
z($);
|
|
1330
1353
|
}
|
|
1331
1354
|
});
|
|
1332
|
-
const
|
|
1333
|
-
function
|
|
1355
|
+
const O = B();
|
|
1356
|
+
function W() {
|
|
1334
1357
|
var a;
|
|
1335
|
-
return (a =
|
|
1358
|
+
return (a = O.value) == null ? void 0 : a.$el.querySelector("input");
|
|
1336
1359
|
}
|
|
1337
|
-
async function
|
|
1360
|
+
async function Q() {
|
|
1338
1361
|
var a;
|
|
1339
|
-
await ne(), (a =
|
|
1362
|
+
await ne(), (a = W()) == null || a.select();
|
|
1340
1363
|
}
|
|
1341
|
-
function
|
|
1364
|
+
function v(a) {
|
|
1342
1365
|
G({
|
|
1343
1366
|
countryCode: a,
|
|
1344
|
-
autoFormat:
|
|
1345
|
-
noFormattingAsYouType:
|
|
1346
|
-
}),
|
|
1367
|
+
autoFormat: e.autoFormat,
|
|
1368
|
+
noFormattingAsYouType: e.noFormattingAsYouType
|
|
1369
|
+
}), Q();
|
|
1347
1370
|
}
|
|
1348
|
-
function
|
|
1371
|
+
function z(a) {
|
|
1349
1372
|
if (a) {
|
|
1350
|
-
if (!
|
|
1373
|
+
if (!k(a)) {
|
|
1351
1374
|
s.value = void 0;
|
|
1352
1375
|
return;
|
|
1353
1376
|
}
|
|
1354
1377
|
s.value = a;
|
|
1355
1378
|
}
|
|
1356
1379
|
}
|
|
1357
|
-
function
|
|
1380
|
+
function h({
|
|
1358
1381
|
newPhoneNumber: a,
|
|
1359
|
-
autoFormat:
|
|
1360
|
-
noFormattingAsYouType:
|
|
1361
|
-
updateResults:
|
|
1382
|
+
autoFormat: $,
|
|
1383
|
+
noFormattingAsYouType: E,
|
|
1384
|
+
updateResults: M = !0
|
|
1362
1385
|
}) {
|
|
1363
|
-
const
|
|
1364
|
-
if (
|
|
1365
|
-
phoneNumber:
|
|
1386
|
+
const U = f(a);
|
|
1387
|
+
if (M && (p.value = K({
|
|
1388
|
+
phoneNumber: U,
|
|
1366
1389
|
countryCode: s.value
|
|
1367
|
-
})),
|
|
1368
|
-
|
|
1369
|
-
else if (
|
|
1370
|
-
const le =
|
|
1371
|
-
|
|
1390
|
+
})), p.value.isValid && p.value.formatNational && $)
|
|
1391
|
+
S.value = p.value.formatNational;
|
|
1392
|
+
else if (w.value.cursorAtEnd && !E) {
|
|
1393
|
+
const le = A(s.value, U);
|
|
1394
|
+
S.value = le;
|
|
1372
1395
|
} else
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
countryCode:
|
|
1376
|
-
autoFormat:
|
|
1377
|
-
noFormattingAsYouType:
|
|
1396
|
+
S.value = U;
|
|
1397
|
+
p.value.countryCode && p.value.countryCode !== s.value && G({
|
|
1398
|
+
countryCode: p.value.countryCode,
|
|
1399
|
+
autoFormat: $,
|
|
1400
|
+
noFormattingAsYouType: E,
|
|
1378
1401
|
updateResults: !1
|
|
1379
1402
|
});
|
|
1380
1403
|
}
|
|
1381
1404
|
function G({
|
|
1382
1405
|
countryCode: a,
|
|
1383
|
-
autoFormat:
|
|
1384
|
-
noFormattingAsYouType:
|
|
1385
|
-
updateResults:
|
|
1406
|
+
autoFormat: $,
|
|
1407
|
+
noFormattingAsYouType: E,
|
|
1408
|
+
updateResults: M = !0
|
|
1386
1409
|
}) {
|
|
1387
1410
|
if (!a) {
|
|
1388
1411
|
s.value = void 0;
|
|
1389
1412
|
return;
|
|
1390
1413
|
}
|
|
1391
|
-
a !== s.value &&
|
|
1392
|
-
phoneNumber:
|
|
1414
|
+
a !== s.value && z(a), M && (p.value = K({
|
|
1415
|
+
phoneNumber: S.value,
|
|
1393
1416
|
countryCode: a
|
|
1394
|
-
})),
|
|
1395
|
-
newPhoneNumber:
|
|
1396
|
-
autoFormat:
|
|
1397
|
-
noFormattingAsYouType:
|
|
1417
|
+
})), h({
|
|
1418
|
+
newPhoneNumber: S.value,
|
|
1419
|
+
autoFormat: $,
|
|
1420
|
+
noFormattingAsYouType: E,
|
|
1398
1421
|
updateResults: !1
|
|
1399
1422
|
});
|
|
1400
1423
|
}
|
|
1401
1424
|
return fe(
|
|
1402
|
-
() =>
|
|
1403
|
-
(a,
|
|
1404
|
-
a
|
|
1425
|
+
() => e.modelValue ?? e.defaultPhoneNumber,
|
|
1426
|
+
(a, $) => {
|
|
1427
|
+
a !== $ && a !== S.value && h({
|
|
1405
1428
|
newPhoneNumber: a,
|
|
1406
|
-
autoFormat:
|
|
1407
|
-
noFormattingAsYouType:
|
|
1429
|
+
autoFormat: e.autoFormat,
|
|
1430
|
+
noFormattingAsYouType: e.noFormattingAsYouType
|
|
1408
1431
|
});
|
|
1409
1432
|
},
|
|
1410
1433
|
{
|
|
1411
1434
|
immediate: !0
|
|
1412
1435
|
}
|
|
1413
1436
|
), fe(
|
|
1414
|
-
() =>
|
|
1415
|
-
(a,
|
|
1416
|
-
a && a !==
|
|
1437
|
+
() => e.countryCode ?? e.defaultCountryCode,
|
|
1438
|
+
(a, $) => {
|
|
1439
|
+
a && a !== $ && a !== s.value && G({
|
|
1417
1440
|
countryCode: a,
|
|
1418
|
-
autoFormat:
|
|
1419
|
-
noFormattingAsYouType:
|
|
1441
|
+
autoFormat: e.autoFormat,
|
|
1442
|
+
noFormattingAsYouType: e.noFormattingAsYouType
|
|
1420
1443
|
});
|
|
1421
1444
|
},
|
|
1422
1445
|
{
|
|
1423
1446
|
immediate: !0
|
|
1424
1447
|
}
|
|
1425
1448
|
), fe(
|
|
1426
|
-
|
|
1449
|
+
p,
|
|
1427
1450
|
(a) => {
|
|
1428
|
-
|
|
1451
|
+
t("update", a), t("data", a), a.e164 && a.isValid ? t("update:model-value", a.e164) : t("update:model-value", S.value), t("country-code", s.value), t("update:country-code", s.value);
|
|
1429
1452
|
},
|
|
1430
1453
|
{
|
|
1431
1454
|
immediate: !0
|
|
1432
1455
|
}
|
|
1433
|
-
), (a,
|
|
1434
|
-
var
|
|
1435
|
-
return
|
|
1456
|
+
), (a, $) => {
|
|
1457
|
+
var E;
|
|
1458
|
+
return V(), L(
|
|
1436
1459
|
"div",
|
|
1437
1460
|
{
|
|
1438
|
-
class: N(["m-phone-number-input", [
|
|
1461
|
+
class: N(["m-phone-number-input", [e.class, { "--block": a.block }, a.orientation ? `--${a.orientation}` : void 0]]),
|
|
1439
1462
|
style: te(a.style)
|
|
1440
1463
|
},
|
|
1441
1464
|
[
|
|
1442
|
-
a.noCountrySelector ?
|
|
1465
|
+
a.noCountrySelector ? g("v-if", !0) : (V(), D(To, {
|
|
1443
1466
|
key: 0,
|
|
1444
1467
|
id: P(y),
|
|
1445
1468
|
"model-value": s.value,
|
|
@@ -1453,78 +1476,80 @@ const Uo = /* @__PURE__ */ ae({
|
|
|
1453
1476
|
"no-flags": a.noFlags,
|
|
1454
1477
|
"no-search": a.noSearch,
|
|
1455
1478
|
"exclude-selectors": a.excludeSelectors,
|
|
1456
|
-
error: a.error || (a.noValidationError ? !1 : !!
|
|
1457
|
-
success: a.success || (a.noValidationSuccess ? !1 : (
|
|
1458
|
-
locales:
|
|
1479
|
+
error: a.error || (a.noValidationError ? !1 : !!S.value && !s.value),
|
|
1480
|
+
success: a.success || (a.noValidationSuccess ? !1 : (E = p.value) == null ? void 0 : E.isValid),
|
|
1481
|
+
locales: I.value,
|
|
1459
1482
|
disabled: a.disabled,
|
|
1460
1483
|
"show-code-on-list": a.showCodeOnList,
|
|
1461
1484
|
"only-countries": a.onlyCountries,
|
|
1462
1485
|
"preferred-countries": a.preferredCountries,
|
|
1463
1486
|
width: a.countrySelectorWidth,
|
|
1464
|
-
"onUpdate:modelValue":
|
|
1487
|
+
"onUpdate:modelValue": v
|
|
1465
1488
|
}, {
|
|
1466
|
-
"no-results":
|
|
1467
|
-
|
|
1489
|
+
"no-results": j(() => [
|
|
1490
|
+
g(`
|
|
1468
1491
|
@slot Replace the "no results" icon in the country selector list
|
|
1469
1492
|
`),
|
|
1470
1493
|
R(a.$slots, "no-results", {}, void 0, !0)
|
|
1471
1494
|
]),
|
|
1472
|
-
"selector-flag":
|
|
1473
|
-
|
|
1495
|
+
"selector-flag": j(({ countryCode: M }) => [
|
|
1496
|
+
g(`
|
|
1474
1497
|
@slot Country selector flag
|
|
1475
1498
|
@binding {String} country-code - current selected country code - Ex: \`"FR"\`
|
|
1476
1499
|
`),
|
|
1477
|
-
R(a.$slots, "selector-flag", { countryCode:
|
|
1500
|
+
R(a.$slots, "selector-flag", { countryCode: M }, void 0, !0)
|
|
1478
1501
|
]),
|
|
1479
|
-
"country-list-flag":
|
|
1480
|
-
|
|
1502
|
+
"country-list-flag": j(({ isSelected: M, option: U }) => [
|
|
1503
|
+
g(`
|
|
1481
1504
|
@slot Country list flag
|
|
1482
1505
|
@binding {String} country-code - country code of option - Ex: \`"FR"\`
|
|
1483
1506
|
@binding {{ iso2: string; dialCode: string; name: string; }} option - country data
|
|
1484
1507
|
@binding {Boolean} is-selected - \`true\` if option is selected
|
|
1485
1508
|
`),
|
|
1486
1509
|
R(a.$slots, "country-list-flag", {
|
|
1487
|
-
countryCode:
|
|
1488
|
-
option:
|
|
1489
|
-
isSelected:
|
|
1510
|
+
countryCode: U.iso2,
|
|
1511
|
+
option: U,
|
|
1512
|
+
isSelected: M
|
|
1490
1513
|
}, void 0, !0)
|
|
1491
1514
|
]),
|
|
1492
1515
|
_: 3
|
|
1493
1516
|
/* FORWARDED */
|
|
1494
1517
|
}, 8, ["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", "show-code-on-list", "only-countries", "preferred-countries", "width"])),
|
|
1495
|
-
Z(Yo, {
|
|
1518
|
+
Z(Yo, re({
|
|
1496
1519
|
id: P(y),
|
|
1497
1520
|
ref_key: "PhoneInputRef",
|
|
1498
|
-
ref:
|
|
1499
|
-
"model-value":
|
|
1521
|
+
ref: O,
|
|
1522
|
+
"model-value": S.value,
|
|
1500
1523
|
color: a.color,
|
|
1501
1524
|
size: a.size,
|
|
1502
1525
|
"no-example": a.noExample,
|
|
1503
1526
|
block: "",
|
|
1504
|
-
disabled: a.disabled
|
|
1527
|
+
disabled: a.disabled
|
|
1528
|
+
}, a.$attrs, {
|
|
1505
1529
|
"has-radius": !a.noCountrySelector,
|
|
1506
|
-
success: a.success || (a.noValidationSuccess ? !1 :
|
|
1507
|
-
error: a.error || (a.noValidationError ? !1 : !!
|
|
1508
|
-
locales:
|
|
1530
|
+
success: a.success || (a.noValidationSuccess ? !1 : p.value.isValid),
|
|
1531
|
+
error: a.error || (a.noValidationError ? !1 : !!S.value && !p.value.isValid),
|
|
1532
|
+
locales: I.value,
|
|
1509
1533
|
"no-formatting-as-you-type": a.noFormattingAsYouType,
|
|
1510
1534
|
"auto-format": a.autoFormat,
|
|
1511
|
-
label: a.
|
|
1512
|
-
|
|
1513
|
-
|
|
1535
|
+
label: a.label,
|
|
1536
|
+
placeholder: a.placeholder,
|
|
1537
|
+
"onUpdate:modelValue": $[0] || ($[0] = (M) => h({
|
|
1538
|
+
newPhoneNumber: M,
|
|
1514
1539
|
autoFormat: a.autoFormat,
|
|
1515
1540
|
noFormattingAsYouType: a.noFormattingAsYouType
|
|
1516
1541
|
}))
|
|
1517
|
-
}, null,
|
|
1542
|
+
}), null, 16, ["id", "model-value", "color", "size", "no-example", "disabled", "has-radius", "success", "error", "locales", "no-formatting-as-you-type", "auto-format", "label", "placeholder"])
|
|
1518
1543
|
],
|
|
1519
1544
|
6
|
|
1520
1545
|
/* CLASS, STYLE */
|
|
1521
1546
|
);
|
|
1522
1547
|
};
|
|
1523
1548
|
}
|
|
1524
|
-
}), Qo = /* @__PURE__ */
|
|
1549
|
+
}), Qo = /* @__PURE__ */ se(Ho, [["__scopeId", "data-v-4c988e15"]]);
|
|
1525
1550
|
export {
|
|
1526
1551
|
Qo as M,
|
|
1527
|
-
|
|
1528
|
-
|
|
1552
|
+
se as _,
|
|
1553
|
+
Te as i,
|
|
1529
1554
|
be as u
|
|
1530
1555
|
};
|