maz-ui 3.43.4 → 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/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 +8 -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-CX4OgPzp.mjs → MazBtn-C5G78zLg.mjs} +35 -36
- package/components/chunks/MazBtn-CeVwyYR5.mjs +150 -0
- package/components/chunks/{MazBtn-BqgdERYQ.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-CCa7grGF.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-BKuhvwwq.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-HeEEyDu0.mjs → MazPhoneNumberInput-DpWoNQfx.mjs} +707 -695
- 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-BKjRRWtc.mjs → MazSpinner-BGPOws6a.mjs} +6 -7
- package/components/chunks/{MazSpinner-BXxULdoD.mjs → MazSpinner-BWYdqSMP.mjs} +6 -7
- package/components/chunks/{MazSpinner-BRgzRI07.mjs → MazSpinner-BZOjTZBN.mjs} +6 -7
- package/components/chunks/{MazSpinner-B-svzg-R.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-BFXwybUv.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-DtG5ii8R.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/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 +8 -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-BOb7Fg_d.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-2ti3NQjo.mjs +0 -38
- package/components/chunks/MazSpinner-BZUmasIf.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-HeEEyDu0.mjs → MazPhoneNumberInput-DpWoNQfx.mjs}
RENAMED
|
@@ -1,28 +1,172 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { getCurrentInstance as je, computed as y, defineComponent as ae, defineAsyncComponent as q, ref as P, onMounted as ge, useSlots as We, openBlock as V, createElementBlock as M, normalizeClass as N, normalizeStyle as te, createElementVNode as H, createCommentVNode as b, renderSlot as R, createBlock as D, unref as A, 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";
|
|
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";
|
|
3
2
|
import { getCountries as Ae, getCountryCallingCode as ue, isSupportedCountry as to, parsePhoneNumberFromString as lo, AsYouType as no, getExampleNumber as ao } from "libphonenumber-js";
|
|
4
|
-
function
|
|
5
|
-
|
|
6
|
-
return function(...d) {
|
|
7
|
-
clearTimeout(o), o = setTimeout(() => {
|
|
8
|
-
a.apply(this, d);
|
|
9
|
-
}, l);
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
function be({
|
|
13
|
-
componentName: a,
|
|
3
|
+
import '../assets/MazPhoneNumberInput.css';function be({
|
|
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: {
|
|
@@ -59,90 +203,92 @@ const so = {
|
|
|
59
203
|
block: { type: Boolean }
|
|
60
204
|
},
|
|
61
205
|
emits: ["update:model-value", "focus", "blur", "click", "change"],
|
|
62
|
-
setup(
|
|
63
|
-
const
|
|
206
|
+
setup(n, { emit: l }) {
|
|
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 (
|
|
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
|
-
}), O = We(), W =
|
|
100
|
-
const { required: r, placeholder:
|
|
101
|
-
if (
|
|
102
|
-
return r ? `${
|
|
103
|
-
}), Q =
|
|
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 !!O["left-icon"] || !!
|
|
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
271
|
function U(r) {
|
|
126
|
-
|
|
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", [
|
|
135
281
|
{
|
|
136
|
-
"--is-focused":
|
|
282
|
+
"--is-focused": y.value || r.borderActive,
|
|
137
283
|
"--should-up": G.value,
|
|
138
|
-
"--has-label":
|
|
284
|
+
"--has-label": a.value,
|
|
139
285
|
"--is-disabled": r.disabled,
|
|
140
286
|
"--is-readonly": r.readonly,
|
|
141
287
|
"--has-z-2": r.error || r.warning || r.success,
|
|
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
|
]]),
|
|
@@ -159,27 +305,27 @@ const so = {
|
|
|
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" ? (V(), D(
|
|
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
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
|
-
H("div",
|
|
320
|
+
})) : g("v-if", !0)
|
|
321
|
+
], !0) : g("v-if", !0)
|
|
322
|
+
])) : g("v-if", !0),
|
|
323
|
+
H("div", vo, [
|
|
178
324
|
Pe(H("input", re({
|
|
179
|
-
id:
|
|
325
|
+
id: P(s),
|
|
180
326
|
ref_key: "input",
|
|
181
327
|
ref: S,
|
|
182
|
-
"onUpdate:modelValue":
|
|
328
|
+
"onUpdate:modelValue": F[0] || (F[0] = (J) => h.value = J),
|
|
183
329
|
type: w.value,
|
|
184
330
|
name: r.name
|
|
185
331
|
}, r.$attrs, {
|
|
@@ -192,18 +338,17 @@ const so = {
|
|
|
192
338
|
class: "m-input-input"
|
|
193
339
|
}, Qe({
|
|
194
340
|
blur: U,
|
|
195
|
-
focus:
|
|
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 ? (V(),
|
|
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 ? (V(),
|
|
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" ? (V(), D(
|
|
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
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
393
|
default: j(() => [
|
|
249
|
-
|
|
394
|
+
A.value ? (V(), D(P(b), {
|
|
250
395
|
key: 0,
|
|
251
396
|
class: "maz-text-xl maz-text-muted"
|
|
252
|
-
})) : (V(), D(
|
|
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(
|
|
409
|
+
Z(P(d), {
|
|
265
410
|
color: "transparent",
|
|
266
411
|
disabled: r.disabled,
|
|
267
412
|
tabindex: "-1",
|
|
@@ -271,13 +416,13 @@ const so = {
|
|
|
271
416
|
type: "submit"
|
|
272
417
|
}, {
|
|
273
418
|
default: j(() => [
|
|
274
|
-
Z(
|
|
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 = a.__vccOpts || a;
|
|
292
|
-
for (const [d, c] of l)
|
|
293
|
-
o[d] = c;
|
|
294
|
-
return o;
|
|
295
|
-
}, he = /* @__PURE__ */ se(po, [["__scopeId", "data-v-84073434"]]);
|
|
296
|
-
let pe = null;
|
|
297
|
-
function mo(a, l) {
|
|
298
|
-
pe && clearTimeout(pe), pe = setTimeout(a, 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 ie(a, 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 = a.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(a, l) {
|
|
367
|
-
const o = a.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 z = 1; z <= d; z++) {
|
|
374
|
-
const t = a[p - 1] === l[z - 1] ? 0 : 1;
|
|
375
|
-
c[p][z] = Math.min(
|
|
376
|
-
c[p - 1][z] + 1,
|
|
377
|
-
c[p][z - 1] + 1,
|
|
378
|
-
c[p - 1][z - 1] + t
|
|
379
|
-
);
|
|
380
|
-
}
|
|
381
|
-
return c[o][d];
|
|
382
|
-
}
|
|
383
|
-
function Fe(a, l) {
|
|
384
|
-
const o = vo(a, l), d = Math.max(a.length, l.length);
|
|
385
|
-
return 1 - o / d;
|
|
386
|
-
}
|
|
387
|
-
function ho(a, l, o = 0.75) {
|
|
388
|
-
return Fe(a, l) >= o;
|
|
389
|
-
}
|
|
390
|
-
function me(a, l, o = 0.75) {
|
|
391
|
-
const d = y(
|
|
392
|
-
() => ie(typeof a == "string" ? a : a.value)
|
|
393
|
-
), c = y(
|
|
394
|
-
() => ie(typeof l == "string" ? l : l.value)
|
|
395
|
-
), p = y(() => typeof o == "number" ? o : o.value), z = y(() => Fe(d.value, c.value));
|
|
396
|
-
return {
|
|
397
|
-
isMatching: y(
|
|
398
|
-
() => ho(d.value, c.value, p.value)
|
|
399
|
-
),
|
|
400
|
-
score: z
|
|
401
|
-
};
|
|
402
|
-
}
|
|
403
|
-
const Ee = (a, l, o) => {
|
|
404
|
-
var z;
|
|
405
|
-
a.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 && a.target instanceof HTMLElement) {
|
|
411
|
-
const $ = (z = document.querySelector(t)) == null ? void 0 : z.getAttribute("id");
|
|
412
|
-
p = a.target.getAttribute("id") === $;
|
|
413
|
-
}
|
|
414
|
-
}
|
|
415
|
-
!l.contains(a.target) && !p && (d == null || d());
|
|
416
|
-
};
|
|
417
|
-
function Le() {
|
|
418
|
-
return document.ontouchstart === null ? "touchstart" : "click";
|
|
419
|
-
}
|
|
420
|
-
function go(a, l) {
|
|
421
|
-
const o = Le();
|
|
422
|
-
document.removeEventListener(o, (d) => Ee(d, a, l));
|
|
423
|
-
}
|
|
424
|
-
function bo(a, 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, a, 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,219 +464,231 @@ 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(
|
|
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 = q(() => import("./MazCheckbox-
|
|
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 =
|
|
482
|
+
), s = m(
|
|
483
483
|
() => S.value ? "var(--maz-color-black)" : `var(--maz-color-${t.color}-800)`
|
|
484
|
-
),
|
|
484
|
+
), p = m(
|
|
485
485
|
() => S.value ? "var(--maz-color-muted)" : `var(--maz-color-${t.color}-100)`
|
|
486
|
-
), w =
|
|
486
|
+
), w = m(
|
|
487
487
|
() => S.value ? "var(--maz-color-muted)" : `var(--maz-color-${t.color}-200)`
|
|
488
|
-
), I =
|
|
488
|
+
), I = m(() => A.value || t.open), O = be({
|
|
489
489
|
componentName: "MazSelect",
|
|
490
490
|
providedId: t.id
|
|
491
491
|
});
|
|
492
|
-
function W(
|
|
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 Q(
|
|
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
|
-
...
|
|
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
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 U =
|
|
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 Y =
|
|
561
|
-
async function x(
|
|
562
|
-
var
|
|
566
|
+
const Y = m(() => ze(r.value));
|
|
567
|
+
async function x(o) {
|
|
568
|
+
var c, i;
|
|
563
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 || I.value || (
|
|
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 && (
|
|
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
|
|
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 k;
|
|
604
|
-
e.preventDefault();
|
|
605
|
-
const f = e.code;
|
|
606
|
-
I.value || _(e);
|
|
607
|
-
const i = (k = Y.value) == null ? void 0 : k.length;
|
|
608
|
-
i && (typeof u == "number" ? u === i - 1 && f === "ArrowDown" ? v.value = 0 : u === 0 && f === "ArrowUp" ? v.value = i - 1 : v.value = f === "ArrowDown" ? u + 1 : u - 1 : v.value = f === "ArrowDown" ? 0 : i - 1, de(v.value));
|
|
609
|
-
}, He = (e, u) => {
|
|
610
|
-
var i, k, K;
|
|
611
|
-
if (e.preventDefault(), !I.value)
|
|
612
|
-
return _(e);
|
|
613
|
-
const f = u ? ((i = Y.value) == null ? void 0 : i[u]) ?? ((k = Y.value) == null ? void 0 : k[0]) : (K = Y.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 ?? v.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 Pe((V(),
|
|
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": I.value, "--disabled":
|
|
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
674
|
Z(he, re({
|
|
663
|
-
id:
|
|
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:
|
|
679
|
+
}, o.$attrs, {
|
|
680
|
+
required: o.required,
|
|
681
|
+
"border-active": A.value,
|
|
682
|
+
color: o.color,
|
|
671
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
694
|
"right-icon": j(() => [
|
|
@@ -687,7 +699,7 @@ const zo = {
|
|
|
687
699
|
"aria-label": `${I.value ? "collapse" : "expand"} list of options`,
|
|
688
700
|
onClick: oe(De, ["stop"])
|
|
689
701
|
}, [
|
|
690
|
-
Z(
|
|
702
|
+
Z(P(k), { class: "m-select-chevron maz-text-xl" })
|
|
691
703
|
], 8, Co)
|
|
692
704
|
]),
|
|
693
705
|
_: 1
|
|
@@ -695,63 +707,63 @@ const zo = {
|
|
|
695
707
|
}, 16, ["id", "required", "border-active", "color", "model-value", "size", "disabled"]),
|
|
696
708
|
Z(Xe, { name: le.value }, {
|
|
697
709
|
default: j(() => [
|
|
698
|
-
I.value ? (V(),
|
|
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
|
-
ref:
|
|
731
|
+
ref: a,
|
|
720
732
|
modelValue: r.value,
|
|
721
733
|
"onUpdate:modelValue": [
|
|
722
734
|
u[1] || (u[1] = (i) => r.value = i),
|
|
723
|
-
u[2] || (u[2] = (i) =>
|
|
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":
|
|
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
|
-
!Y.value || Y.value.length <= 0 ? R(
|
|
750
|
+
!Y.value || Y.value.length <= 0 ? R(o.$slots, "no-results", { key: 1 }, () => [
|
|
739
751
|
H("span", Vo, [
|
|
740
|
-
Z(
|
|
752
|
+
Z(P(K), { class: "maz-h-6 maz-w-6 maz-text-normal" })
|
|
741
753
|
])
|
|
742
|
-
], !0) : (V(),
|
|
743
|
-
(V(!0),
|
|
754
|
+
], !0) : (V(), L("div", wo, [
|
|
755
|
+
(V(!0), L(
|
|
744
756
|
Ie,
|
|
745
757
|
null,
|
|
746
|
-
xe(Y.value, (i,
|
|
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
|
}, () => [
|
|
@@ -762,40 +774,40 @@ const zo = {
|
|
|
762
774
|
1
|
|
763
775
|
/* TEXT */
|
|
764
776
|
)
|
|
765
|
-
], !0) : (V(),
|
|
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":
|
|
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,87 +833,87 @@ const zo = {
|
|
|
821
833
|
6
|
|
822
834
|
/* CLASS, STYLE */
|
|
823
835
|
)), [
|
|
824
|
-
[
|
|
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__ */ se(ko, [["__scopeId", "data-v-
|
|
832
|
-
function Me(
|
|
833
|
-
return !!
|
|
843
|
+
}), $o = /* @__PURE__ */ se(ko, [["__scopeId", "data-v-fe0403c3"]]);
|
|
844
|
+
function Me(n) {
|
|
845
|
+
return !!n;
|
|
834
846
|
}
|
|
835
|
-
function $e(
|
|
836
|
-
return [...
|
|
837
|
-
const
|
|
838
|
-
return
|
|
847
|
+
function $e(n) {
|
|
848
|
+
return [...n].map((l) => {
|
|
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
|
-
const
|
|
845
|
-
if (!
|
|
862
|
+
const n = window.navigator.language;
|
|
863
|
+
if (!n)
|
|
846
864
|
return;
|
|
847
|
-
let l =
|
|
848
|
-
return l === "" && (l =
|
|
865
|
+
let l = n.slice(3, 7).toUpperCase();
|
|
866
|
+
return l === "" && (l = n.slice(0, 2).toUpperCase()), l === "EN" && (l = "US"), l === "JA" && (l = "JP"), {
|
|
849
867
|
locale: l,
|
|
850
|
-
browserLocale:
|
|
868
|
+
browserLocale: n
|
|
851
869
|
};
|
|
852
870
|
}
|
|
853
871
|
let ye, Be;
|
|
854
|
-
function Bo(
|
|
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 Po(
|
|
858
|
-
var
|
|
859
|
-
const
|
|
860
|
-
|
|
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
895
|
async function Ao() {
|
|
878
896
|
try {
|
|
879
|
-
const
|
|
897
|
+
const n = await fetch("https://ipwho.is"), { country_code: l } = await n.json();
|
|
880
898
|
return l;
|
|
881
|
-
} catch (
|
|
882
|
-
throw new Error(`[MazPhoneNumberInput](fetchCountryCode) ${
|
|
899
|
+
} catch (n) {
|
|
900
|
+
throw new Error(`[MazPhoneNumberInput](fetchCountryCode) ${n}`);
|
|
883
901
|
}
|
|
884
902
|
}
|
|
885
|
-
function Fo(
|
|
886
|
-
if (!
|
|
903
|
+
function Fo(n) {
|
|
904
|
+
if (!n)
|
|
887
905
|
return "";
|
|
888
906
|
const l = new RegExp(/[^\d ()+-]/g);
|
|
889
|
-
return
|
|
907
|
+
return n.replaceAll(l, "").trim();
|
|
890
908
|
}
|
|
891
|
-
function
|
|
909
|
+
function Ne() {
|
|
892
910
|
return {
|
|
893
911
|
sanitizePhoneNumber: Fo,
|
|
894
912
|
fetchCountryCode: Ao,
|
|
895
|
-
getBrowserLocale:
|
|
913
|
+
getBrowserLocale: Ke,
|
|
896
914
|
getCountriesList: Po
|
|
897
915
|
};
|
|
898
916
|
}
|
|
899
|
-
function Ne(a, l) {
|
|
900
|
-
const o = _e(a, l);
|
|
901
|
-
if (!o)
|
|
902
|
-
throw new TypeError(`[maz-ui](injectStrict) Could not resolve ${a}`);
|
|
903
|
-
return o;
|
|
904
|
-
}
|
|
905
917
|
const Eo = ["id"], Lo = {
|
|
906
918
|
key: 0,
|
|
907
919
|
class: "maz-text-lg"
|
|
@@ -932,56 +944,56 @@ const Eo = ["id"], Lo = {
|
|
|
932
944
|
excludeSelectors: { default: void 0 }
|
|
933
945
|
},
|
|
934
946
|
emits: ["update:model-value"],
|
|
935
|
-
setup(
|
|
936
|
-
const l =
|
|
947
|
+
setup(n) {
|
|
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 =
|
|
951
|
+
return (s = f.value) == null ? void 0 : s.filter((p) => {
|
|
940
952
|
var w;
|
|
941
|
-
return !((w = l.ignoredCountries) != null && w.includes(
|
|
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
|
-
(
|
|
959
|
+
(p) => {
|
|
948
960
|
var w;
|
|
949
|
-
return (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 =
|
|
967
|
+
return (s = b.value) == null ? void 0 : s.filter((p) => {
|
|
956
968
|
var w;
|
|
957
|
-
return !((w = l.preferredCountries) != null && w.includes(
|
|
969
|
+
return !((w = l.preferredCountries) != null && w.includes(p.iso2));
|
|
958
970
|
});
|
|
959
971
|
}
|
|
960
|
-
),
|
|
961
|
-
() => l.preferredCountries ? [...
|
|
962
|
-
),
|
|
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
985
|
async function S() {
|
|
974
|
-
var s,
|
|
975
|
-
(
|
|
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 ? (V(),
|
|
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", {
|
|
@@ -991,22 +1003,22 @@ const Eo = ["id"], Lo = {
|
|
|
991
1003
|
type: "button",
|
|
992
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
|
`),
|
|
998
1010
|
R(s.$slots, "selector-flag", { countryCode: s.modelValue }, () => [
|
|
999
1011
|
ve(
|
|
1000
|
-
X(
|
|
1012
|
+
X(P($e)(s.modelValue)),
|
|
1001
1013
|
1
|
|
1002
1014
|
/* TEXT */
|
|
1003
1015
|
)
|
|
1004
1016
|
], !0)
|
|
1005
|
-
], 10, Eo)) :
|
|
1017
|
+
], 10, Eo)) : g("v-if", !0),
|
|
1006
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",
|
|
@@ -1023,14 +1035,14 @@ const Eo = ["id"], Lo = {
|
|
|
1023
1035
|
success: s.success,
|
|
1024
1036
|
search: !s.noSearch,
|
|
1025
1037
|
"search-placeholder": s.locales.countrySelector.searchPlaceholder,
|
|
1026
|
-
options:
|
|
1027
|
-
hint:
|
|
1038
|
+
options: y.value,
|
|
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
1047
|
"no-results": j(() => [
|
|
1036
1048
|
R(s.$slots, "no-results", {}, void 0, !0)
|
|
@@ -1044,8 +1056,8 @@ const Eo = ["id"], Lo = {
|
|
|
1044
1056
|
}])
|
|
1045
1057
|
},
|
|
1046
1058
|
[
|
|
1047
|
-
!s.noFlags && typeof w.iso2 == "string" ? (V(),
|
|
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
|
|
@@ -1057,13 +1069,13 @@ const Eo = ["id"], Lo = {
|
|
|
1057
1069
|
isSelected: I
|
|
1058
1070
|
}, () => [
|
|
1059
1071
|
ve(
|
|
1060
|
-
X(
|
|
1072
|
+
X(P($e)(w.iso2)),
|
|
1061
1073
|
1
|
|
1062
1074
|
/* TEXT */
|
|
1063
1075
|
)
|
|
1064
1076
|
], !0)
|
|
1065
|
-
])) :
|
|
1066
|
-
s.showCodeOnList ? (V(),
|
|
1077
|
+
])) : g("v-if", !0),
|
|
1078
|
+
s.showCodeOnList ? (V(), L(
|
|
1067
1079
|
"span",
|
|
1068
1080
|
{
|
|
1069
1081
|
key: 1,
|
|
@@ -1072,7 +1084,7 @@ const Eo = ["id"], Lo = {
|
|
|
1072
1084
|
X(w.dialCode),
|
|
1073
1085
|
3
|
|
1074
1086
|
/* TEXT, CLASS */
|
|
1075
|
-
)) :
|
|
1087
|
+
)) : g("v-if", !0),
|
|
1076
1088
|
H(
|
|
1077
1089
|
"span",
|
|
1078
1090
|
{
|
|
@@ -1095,73 +1107,73 @@ const Eo = ["id"], Lo = {
|
|
|
1095
1107
|
/* CLASS, STYLE */
|
|
1096
1108
|
));
|
|
1097
1109
|
}
|
|
1098
|
-
}), To = /* @__PURE__ */ se(Mo, [["__scopeId", "data-v-
|
|
1099
|
-
function Ko(
|
|
1110
|
+
}), To = /* @__PURE__ */ se(Mo, [["__scopeId", "data-v-1e2814b9"]]);
|
|
1111
|
+
function Ko(n) {
|
|
1100
1112
|
try {
|
|
1101
|
-
const l = to(
|
|
1102
|
-
return l || (console.error(`[maz-ui](MazPhoneNumberInput) The code country "${
|
|
1113
|
+
const l = to(n);
|
|
1114
|
+
return l || (console.error(`[maz-ui](MazPhoneNumberInput) The code country "${n}" is not available`), !1);
|
|
1103
1115
|
} catch (l) {
|
|
1104
1116
|
return console.error(`[maz-ui](MazPhoneNumberInput) ${l}`), !1;
|
|
1105
1117
|
}
|
|
1106
1118
|
}
|
|
1107
1119
|
function No({
|
|
1108
|
-
phoneNumber:
|
|
1120
|
+
phoneNumber: n,
|
|
1109
1121
|
countryCode: l
|
|
1110
1122
|
}) {
|
|
1111
1123
|
try {
|
|
1112
|
-
if (!
|
|
1124
|
+
if (!n)
|
|
1113
1125
|
return {
|
|
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:
|
|
1130
|
-
phoneNumber:
|
|
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"),
|
|
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
|
-
function Ro(
|
|
1148
|
+
function Ro(n, l) {
|
|
1137
1149
|
try {
|
|
1138
|
-
return l ? new no(
|
|
1139
|
-
} catch (
|
|
1140
|
-
throw new Error(`[MazPhoneNumberInput](getAsYouTypeFormat) ${
|
|
1150
|
+
return l ? new no(n).input(l) : "";
|
|
1151
|
+
} catch (e) {
|
|
1152
|
+
throw new Error(`[MazPhoneNumberInput](getAsYouTypeFormat) ${e}`);
|
|
1141
1153
|
}
|
|
1142
1154
|
}
|
|
1143
1155
|
async function Do() {
|
|
1144
|
-
const { default:
|
|
1145
|
-
return
|
|
1156
|
+
const { default: n } = await import("./examples.mobile.json-JpNGylGv.mjs");
|
|
1157
|
+
return n;
|
|
1146
1158
|
}
|
|
1147
|
-
function Oo(
|
|
1148
|
-
var
|
|
1159
|
+
function Oo(n, l) {
|
|
1160
|
+
var e;
|
|
1149
1161
|
try {
|
|
1150
|
-
return
|
|
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
|
|
1157
|
-
return ue(l) === ue(
|
|
1168
|
+
function n(l, e) {
|
|
1169
|
+
return ue(l) === ue(e);
|
|
1158
1170
|
}
|
|
1159
1171
|
return {
|
|
1160
1172
|
getAsYouTypeFormat: Ro,
|
|
1161
1173
|
getPhoneNumberResults: No,
|
|
1162
1174
|
getPhoneNumberExamplesFile: Do,
|
|
1163
1175
|
getPhoneNumberExample: Oo,
|
|
1164
|
-
isSameCountryCallingCode:
|
|
1176
|
+
isSameCountryCallingCode: n,
|
|
1165
1177
|
isCountryAvailable: Ko,
|
|
1166
1178
|
getCountries: Ae,
|
|
1167
1179
|
getCountryCallingCode: ue
|
|
@@ -1188,72 +1200,72 @@ const Uo = /* @__PURE__ */ ae({
|
|
|
1188
1200
|
modelModifiers: {}
|
|
1189
1201
|
}),
|
|
1190
1202
|
emits: /* @__PURE__ */ ke(["update:model-value"], ["update:modelValue"]),
|
|
1191
|
-
setup(
|
|
1192
|
-
const
|
|
1193
|
-
function s(
|
|
1194
|
-
const
|
|
1195
|
-
return
|
|
1203
|
+
setup(n, { emit: l }) {
|
|
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;
|
|
1196
1208
|
}
|
|
1197
|
-
const
|
|
1198
|
-
var
|
|
1199
|
-
if (
|
|
1200
|
-
return
|
|
1201
|
-
const
|
|
1202
|
-
if (
|
|
1203
|
-
return
|
|
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;
|
|
1204
1216
|
{
|
|
1205
|
-
const
|
|
1206
|
-
return (
|
|
1217
|
+
const h = s(y.value, A.value);
|
|
1218
|
+
return (z = K.value) != null && z.isValid || !h ? v : h;
|
|
1207
1219
|
}
|
|
1208
|
-
}), w =
|
|
1209
|
-
placeholder:
|
|
1220
|
+
}), w = m(() => e.placeholder ? {
|
|
1221
|
+
placeholder: p.value
|
|
1210
1222
|
} : {
|
|
1211
|
-
label:
|
|
1212
|
-
}), I =
|
|
1223
|
+
label: p.value
|
|
1224
|
+
}), I = B();
|
|
1213
1225
|
async function O() {
|
|
1214
1226
|
try {
|
|
1215
|
-
if (
|
|
1227
|
+
if (y.value)
|
|
1216
1228
|
return;
|
|
1217
|
-
|
|
1218
|
-
} catch (
|
|
1219
|
-
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);
|
|
1220
1232
|
}
|
|
1221
1233
|
}
|
|
1222
|
-
async function W(
|
|
1223
|
-
I.value &&
|
|
1234
|
+
async function W(v) {
|
|
1235
|
+
I.value && v && Q(I.value, v), await ne(), t("update:model-value", v);
|
|
1224
1236
|
}
|
|
1225
|
-
function Q(
|
|
1226
|
-
const
|
|
1227
|
-
|
|
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;
|
|
1228
1240
|
}
|
|
1229
1241
|
return ge(() => {
|
|
1230
|
-
|
|
1231
|
-
}), (
|
|
1232
|
-
id:
|
|
1242
|
+
e.noExample || O();
|
|
1243
|
+
}), (v, z) => (V(), D(he, re({
|
|
1244
|
+
id: v.id,
|
|
1233
1245
|
ref_key: "PhoneInputRef",
|
|
1234
1246
|
ref: I,
|
|
1235
|
-
"model-value":
|
|
1236
|
-
}, { ...
|
|
1237
|
-
disabled:
|
|
1238
|
-
color:
|
|
1239
|
-
error:
|
|
1240
|
-
size:
|
|
1241
|
-
success:
|
|
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,
|
|
1242
1254
|
type: "tel",
|
|
1243
1255
|
inputmode: "tel",
|
|
1244
1256
|
class: ["m-phone-input", [
|
|
1245
1257
|
{
|
|
1246
|
-
"--border-radius":
|
|
1247
|
-
"--error":
|
|
1258
|
+
"--border-radius": v.hasRadius,
|
|
1259
|
+
"--error": v.error || !P(K).isValid,
|
|
1248
1260
|
"--focused": S.value
|
|
1249
1261
|
}
|
|
1250
1262
|
]],
|
|
1251
|
-
onFocus:
|
|
1252
|
-
onBlur:
|
|
1253
|
-
"onUpdate:modelValue":
|
|
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))
|
|
1254
1266
|
}), null, 16, ["id", "model-value", "disabled", "color", "error", "size", "success", "class"]));
|
|
1255
1267
|
}
|
|
1256
|
-
}), Yo = /* @__PURE__ */ se(Uo, [["__scopeId", "data-v-
|
|
1268
|
+
}), Yo = /* @__PURE__ */ se(Uo, [["__scopeId", "data-v-f3c379ea"]]), qo = {
|
|
1257
1269
|
countrySelector: {
|
|
1258
1270
|
placeholder: "Country code",
|
|
1259
1271
|
error: "Choose country",
|
|
@@ -1307,14 +1319,14 @@ const Uo = /* @__PURE__ */ ae({
|
|
|
1307
1319
|
orientation: { default: "responsive" }
|
|
1308
1320
|
},
|
|
1309
1321
|
emits: ["update:model-value", "country-code", "update:country-code", "update", "data"],
|
|
1310
|
-
setup(
|
|
1311
|
-
const
|
|
1322
|
+
setup(n, { emit: l }) {
|
|
1323
|
+
const e = n, t = l, { fetchCountryCode: d, sanitizePhoneNumber: f, getBrowserLocale: b } = Ne(), { isCountryAvailable: k, getPhoneNumberResults: K, getAsYouTypeFormat: A } = Re(), y = be({
|
|
1312
1324
|
componentName: "MazPhoneNumberInput",
|
|
1313
|
-
providedId:
|
|
1314
|
-
}), S =
|
|
1325
|
+
providedId: e.id
|
|
1326
|
+
}), S = B(""), s = B(), p = B({
|
|
1315
1327
|
isValid: !1,
|
|
1316
1328
|
countryCode: void 0
|
|
1317
|
-
}), w =
|
|
1329
|
+
}), w = B({
|
|
1318
1330
|
start: 0,
|
|
1319
1331
|
end: 0,
|
|
1320
1332
|
cursorAtEnd: !0
|
|
@@ -1322,210 +1334,210 @@ const Uo = /* @__PURE__ */ ae({
|
|
|
1322
1334
|
oo("data", {
|
|
1323
1335
|
selectedCountry: s,
|
|
1324
1336
|
phoneNumber: S,
|
|
1325
|
-
results:
|
|
1337
|
+
results: p,
|
|
1326
1338
|
selectionRange: w
|
|
1327
1339
|
});
|
|
1328
|
-
const I =
|
|
1340
|
+
const I = m(() => ({
|
|
1329
1341
|
...qo,
|
|
1330
|
-
...
|
|
1342
|
+
...e.translations
|
|
1331
1343
|
}));
|
|
1332
1344
|
ge(async () => {
|
|
1333
|
-
var
|
|
1334
|
-
if (
|
|
1335
|
-
const
|
|
1336
|
-
|
|
1345
|
+
var a;
|
|
1346
|
+
if (z(e.countryCode ?? e.defaultCountryCode), e.fetchCountry && !s.value) {
|
|
1347
|
+
const $ = await d();
|
|
1348
|
+
z($);
|
|
1337
1349
|
}
|
|
1338
|
-
if (!
|
|
1339
|
-
const
|
|
1340
|
-
|
|
1350
|
+
if (!e.defaultCountryCode && !e.noUseBrowserLocale && !s.value) {
|
|
1351
|
+
const $ = (a = b()) == null ? void 0 : a.locale;
|
|
1352
|
+
z($);
|
|
1341
1353
|
}
|
|
1342
1354
|
});
|
|
1343
|
-
const O =
|
|
1355
|
+
const O = B();
|
|
1344
1356
|
function W() {
|
|
1345
|
-
var
|
|
1346
|
-
return (
|
|
1357
|
+
var a;
|
|
1358
|
+
return (a = O.value) == null ? void 0 : a.$el.querySelector("input");
|
|
1347
1359
|
}
|
|
1348
1360
|
async function Q() {
|
|
1349
|
-
var
|
|
1350
|
-
await ne(), (
|
|
1361
|
+
var a;
|
|
1362
|
+
await ne(), (a = W()) == null || a.select();
|
|
1351
1363
|
}
|
|
1352
|
-
function
|
|
1364
|
+
function v(a) {
|
|
1353
1365
|
G({
|
|
1354
|
-
countryCode:
|
|
1355
|
-
autoFormat:
|
|
1356
|
-
noFormattingAsYouType:
|
|
1366
|
+
countryCode: a,
|
|
1367
|
+
autoFormat: e.autoFormat,
|
|
1368
|
+
noFormattingAsYouType: e.noFormattingAsYouType
|
|
1357
1369
|
}), Q();
|
|
1358
1370
|
}
|
|
1359
|
-
function
|
|
1360
|
-
if (
|
|
1361
|
-
if (!
|
|
1371
|
+
function z(a) {
|
|
1372
|
+
if (a) {
|
|
1373
|
+
if (!k(a)) {
|
|
1362
1374
|
s.value = void 0;
|
|
1363
1375
|
return;
|
|
1364
1376
|
}
|
|
1365
|
-
s.value =
|
|
1377
|
+
s.value = a;
|
|
1366
1378
|
}
|
|
1367
1379
|
}
|
|
1368
|
-
function
|
|
1369
|
-
newPhoneNumber:
|
|
1370
|
-
autoFormat:
|
|
1371
|
-
noFormattingAsYouType:
|
|
1372
|
-
updateResults:
|
|
1380
|
+
function h({
|
|
1381
|
+
newPhoneNumber: a,
|
|
1382
|
+
autoFormat: $,
|
|
1383
|
+
noFormattingAsYouType: E,
|
|
1384
|
+
updateResults: M = !0
|
|
1373
1385
|
}) {
|
|
1374
|
-
const U =
|
|
1375
|
-
if (
|
|
1386
|
+
const U = f(a);
|
|
1387
|
+
if (M && (p.value = K({
|
|
1376
1388
|
phoneNumber: U,
|
|
1377
1389
|
countryCode: s.value
|
|
1378
|
-
})),
|
|
1379
|
-
S.value =
|
|
1380
|
-
else if (w.value.cursorAtEnd && !
|
|
1381
|
-
const le =
|
|
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);
|
|
1382
1394
|
S.value = le;
|
|
1383
1395
|
} else
|
|
1384
1396
|
S.value = U;
|
|
1385
|
-
|
|
1386
|
-
countryCode:
|
|
1387
|
-
autoFormat:
|
|
1388
|
-
noFormattingAsYouType:
|
|
1397
|
+
p.value.countryCode && p.value.countryCode !== s.value && G({
|
|
1398
|
+
countryCode: p.value.countryCode,
|
|
1399
|
+
autoFormat: $,
|
|
1400
|
+
noFormattingAsYouType: E,
|
|
1389
1401
|
updateResults: !1
|
|
1390
1402
|
});
|
|
1391
1403
|
}
|
|
1392
1404
|
function G({
|
|
1393
|
-
countryCode:
|
|
1394
|
-
autoFormat:
|
|
1395
|
-
noFormattingAsYouType:
|
|
1396
|
-
updateResults:
|
|
1405
|
+
countryCode: a,
|
|
1406
|
+
autoFormat: $,
|
|
1407
|
+
noFormattingAsYouType: E,
|
|
1408
|
+
updateResults: M = !0
|
|
1397
1409
|
}) {
|
|
1398
|
-
if (!
|
|
1410
|
+
if (!a) {
|
|
1399
1411
|
s.value = void 0;
|
|
1400
1412
|
return;
|
|
1401
1413
|
}
|
|
1402
|
-
|
|
1414
|
+
a !== s.value && z(a), M && (p.value = K({
|
|
1403
1415
|
phoneNumber: S.value,
|
|
1404
|
-
countryCode:
|
|
1405
|
-
})),
|
|
1416
|
+
countryCode: a
|
|
1417
|
+
})), h({
|
|
1406
1418
|
newPhoneNumber: S.value,
|
|
1407
|
-
autoFormat:
|
|
1408
|
-
noFormattingAsYouType:
|
|
1419
|
+
autoFormat: $,
|
|
1420
|
+
noFormattingAsYouType: E,
|
|
1409
1421
|
updateResults: !1
|
|
1410
1422
|
});
|
|
1411
1423
|
}
|
|
1412
1424
|
return fe(
|
|
1413
|
-
() =>
|
|
1414
|
-
(
|
|
1415
|
-
|
|
1416
|
-
newPhoneNumber:
|
|
1417
|
-
autoFormat:
|
|
1418
|
-
noFormattingAsYouType:
|
|
1425
|
+
() => e.modelValue ?? e.defaultPhoneNumber,
|
|
1426
|
+
(a, $) => {
|
|
1427
|
+
a !== $ && a !== S.value && h({
|
|
1428
|
+
newPhoneNumber: a,
|
|
1429
|
+
autoFormat: e.autoFormat,
|
|
1430
|
+
noFormattingAsYouType: e.noFormattingAsYouType
|
|
1419
1431
|
});
|
|
1420
1432
|
},
|
|
1421
1433
|
{
|
|
1422
1434
|
immediate: !0
|
|
1423
1435
|
}
|
|
1424
1436
|
), fe(
|
|
1425
|
-
() =>
|
|
1426
|
-
(
|
|
1427
|
-
|
|
1428
|
-
countryCode:
|
|
1429
|
-
autoFormat:
|
|
1430
|
-
noFormattingAsYouType:
|
|
1437
|
+
() => e.countryCode ?? e.defaultCountryCode,
|
|
1438
|
+
(a, $) => {
|
|
1439
|
+
a && a !== $ && a !== s.value && G({
|
|
1440
|
+
countryCode: a,
|
|
1441
|
+
autoFormat: e.autoFormat,
|
|
1442
|
+
noFormattingAsYouType: e.noFormattingAsYouType
|
|
1431
1443
|
});
|
|
1432
1444
|
},
|
|
1433
1445
|
{
|
|
1434
1446
|
immediate: !0
|
|
1435
1447
|
}
|
|
1436
1448
|
), fe(
|
|
1437
|
-
|
|
1438
|
-
(
|
|
1439
|
-
|
|
1449
|
+
p,
|
|
1450
|
+
(a) => {
|
|
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);
|
|
1440
1452
|
},
|
|
1441
1453
|
{
|
|
1442
1454
|
immediate: !0
|
|
1443
1455
|
}
|
|
1444
|
-
), (
|
|
1445
|
-
var
|
|
1446
|
-
return V(),
|
|
1456
|
+
), (a, $) => {
|
|
1457
|
+
var E;
|
|
1458
|
+
return V(), L(
|
|
1447
1459
|
"div",
|
|
1448
1460
|
{
|
|
1449
|
-
class: N(["m-phone-number-input", [
|
|
1450
|
-
style: te(
|
|
1461
|
+
class: N(["m-phone-number-input", [e.class, { "--block": a.block }, a.orientation ? `--${a.orientation}` : void 0]]),
|
|
1462
|
+
style: te(a.style)
|
|
1451
1463
|
},
|
|
1452
1464
|
[
|
|
1453
|
-
|
|
1465
|
+
a.noCountrySelector ? g("v-if", !0) : (V(), D(To, {
|
|
1454
1466
|
key: 0,
|
|
1455
|
-
id:
|
|
1467
|
+
id: P(y),
|
|
1456
1468
|
"model-value": s.value,
|
|
1457
|
-
color:
|
|
1458
|
-
size:
|
|
1459
|
-
"country-locale":
|
|
1460
|
-
"country-selector-display-name":
|
|
1461
|
-
"custom-countries-list":
|
|
1462
|
-
"ignored-countries":
|
|
1463
|
-
"list-position":
|
|
1464
|
-
"no-flags":
|
|
1465
|
-
"no-search":
|
|
1466
|
-
"exclude-selectors":
|
|
1467
|
-
error:
|
|
1468
|
-
success:
|
|
1469
|
+
color: a.color,
|
|
1470
|
+
size: a.size,
|
|
1471
|
+
"country-locale": a.countryLocale,
|
|
1472
|
+
"country-selector-display-name": a.countrySelectorDisplayName,
|
|
1473
|
+
"custom-countries-list": a.customCountriesList,
|
|
1474
|
+
"ignored-countries": a.ignoredCountries,
|
|
1475
|
+
"list-position": a.listPosition,
|
|
1476
|
+
"no-flags": a.noFlags,
|
|
1477
|
+
"no-search": a.noSearch,
|
|
1478
|
+
"exclude-selectors": a.excludeSelectors,
|
|
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),
|
|
1469
1481
|
locales: I.value,
|
|
1470
|
-
disabled:
|
|
1471
|
-
"show-code-on-list":
|
|
1472
|
-
"only-countries":
|
|
1473
|
-
"preferred-countries":
|
|
1474
|
-
width:
|
|
1475
|
-
"onUpdate:modelValue":
|
|
1482
|
+
disabled: a.disabled,
|
|
1483
|
+
"show-code-on-list": a.showCodeOnList,
|
|
1484
|
+
"only-countries": a.onlyCountries,
|
|
1485
|
+
"preferred-countries": a.preferredCountries,
|
|
1486
|
+
width: a.countrySelectorWidth,
|
|
1487
|
+
"onUpdate:modelValue": v
|
|
1476
1488
|
}, {
|
|
1477
1489
|
"no-results": j(() => [
|
|
1478
|
-
|
|
1490
|
+
g(`
|
|
1479
1491
|
@slot Replace the "no results" icon in the country selector list
|
|
1480
1492
|
`),
|
|
1481
|
-
R(
|
|
1493
|
+
R(a.$slots, "no-results", {}, void 0, !0)
|
|
1482
1494
|
]),
|
|
1483
|
-
"selector-flag": j(({ countryCode:
|
|
1484
|
-
|
|
1495
|
+
"selector-flag": j(({ countryCode: M }) => [
|
|
1496
|
+
g(`
|
|
1485
1497
|
@slot Country selector flag
|
|
1486
1498
|
@binding {String} country-code - current selected country code - Ex: \`"FR"\`
|
|
1487
1499
|
`),
|
|
1488
|
-
R(
|
|
1500
|
+
R(a.$slots, "selector-flag", { countryCode: M }, void 0, !0)
|
|
1489
1501
|
]),
|
|
1490
|
-
"country-list-flag": j(({ isSelected:
|
|
1491
|
-
|
|
1502
|
+
"country-list-flag": j(({ isSelected: M, option: U }) => [
|
|
1503
|
+
g(`
|
|
1492
1504
|
@slot Country list flag
|
|
1493
1505
|
@binding {String} country-code - country code of option - Ex: \`"FR"\`
|
|
1494
1506
|
@binding {{ iso2: string; dialCode: string; name: string; }} option - country data
|
|
1495
1507
|
@binding {Boolean} is-selected - \`true\` if option is selected
|
|
1496
1508
|
`),
|
|
1497
|
-
R(
|
|
1509
|
+
R(a.$slots, "country-list-flag", {
|
|
1498
1510
|
countryCode: U.iso2,
|
|
1499
1511
|
option: U,
|
|
1500
|
-
isSelected:
|
|
1512
|
+
isSelected: M
|
|
1501
1513
|
}, void 0, !0)
|
|
1502
1514
|
]),
|
|
1503
1515
|
_: 3
|
|
1504
1516
|
/* FORWARDED */
|
|
1505
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"])),
|
|
1506
1518
|
Z(Yo, re({
|
|
1507
|
-
id:
|
|
1519
|
+
id: P(y),
|
|
1508
1520
|
ref_key: "PhoneInputRef",
|
|
1509
1521
|
ref: O,
|
|
1510
1522
|
"model-value": S.value,
|
|
1511
|
-
color:
|
|
1512
|
-
size:
|
|
1513
|
-
"no-example":
|
|
1523
|
+
color: a.color,
|
|
1524
|
+
size: a.size,
|
|
1525
|
+
"no-example": a.noExample,
|
|
1514
1526
|
block: "",
|
|
1515
|
-
disabled:
|
|
1516
|
-
},
|
|
1517
|
-
"has-radius": !
|
|
1518
|
-
success:
|
|
1519
|
-
error:
|
|
1527
|
+
disabled: a.disabled
|
|
1528
|
+
}, a.$attrs, {
|
|
1529
|
+
"has-radius": !a.noCountrySelector,
|
|
1530
|
+
success: a.success || (a.noValidationSuccess ? !1 : p.value.isValid),
|
|
1531
|
+
error: a.error || (a.noValidationError ? !1 : !!S.value && !p.value.isValid),
|
|
1520
1532
|
locales: I.value,
|
|
1521
|
-
"no-formatting-as-you-type":
|
|
1522
|
-
"auto-format":
|
|
1523
|
-
label:
|
|
1524
|
-
placeholder:
|
|
1525
|
-
"onUpdate:modelValue":
|
|
1526
|
-
newPhoneNumber:
|
|
1527
|
-
autoFormat:
|
|
1528
|
-
noFormattingAsYouType:
|
|
1533
|
+
"no-formatting-as-you-type": a.noFormattingAsYouType,
|
|
1534
|
+
"auto-format": a.autoFormat,
|
|
1535
|
+
label: a.label,
|
|
1536
|
+
placeholder: a.placeholder,
|
|
1537
|
+
"onUpdate:modelValue": $[0] || ($[0] = (M) => h({
|
|
1538
|
+
newPhoneNumber: M,
|
|
1539
|
+
autoFormat: a.autoFormat,
|
|
1540
|
+
noFormattingAsYouType: a.noFormattingAsYouType
|
|
1529
1541
|
}))
|
|
1530
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"])
|
|
1531
1543
|
],
|
|
@@ -1534,10 +1546,10 @@ const Uo = /* @__PURE__ */ ae({
|
|
|
1534
1546
|
);
|
|
1535
1547
|
};
|
|
1536
1548
|
}
|
|
1537
|
-
}), Qo = /* @__PURE__ */ se(Ho, [["__scopeId", "data-v-
|
|
1549
|
+
}), Qo = /* @__PURE__ */ se(Ho, [["__scopeId", "data-v-4c988e15"]]);
|
|
1538
1550
|
export {
|
|
1539
1551
|
Qo as M,
|
|
1540
1552
|
se as _,
|
|
1541
|
-
|
|
1553
|
+
Te as i,
|
|
1542
1554
|
be as u
|
|
1543
1555
|
};
|