maz-ui 3.47.2-beta.2 → 3.47.2-beta.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/MazAccordion.d.ts +3 -2
- package/components/MazAccordion.mjs +90 -98
- package/components/MazAnimatedCounter.d.ts +16 -32
- package/components/MazAnimatedCounter.mjs +26 -26
- package/components/MazAvatar.d.ts +2 -1
- package/components/MazAvatar.mjs +1 -1
- package/components/MazBackdrop.d.ts +23 -14
- package/components/MazBackdrop.mjs +107 -82
- package/components/MazBadge.d.ts +7 -2
- package/components/MazBadge.mjs +1 -1
- package/components/MazBottomSheet.d.ts +13 -25
- package/components/MazBottomSheet.mjs +1 -1
- package/components/MazBtn.d.ts +4 -3
- package/components/MazBtn.mjs +1 -1
- package/components/MazCard.d.ts +5 -4
- package/components/MazCard.mjs +1 -1
- package/components/MazCardSpotlight.d.ts +3 -2
- package/components/MazCardSpotlight.mjs +18 -22
- package/components/MazCarousel.d.ts +3 -2
- package/components/MazCarousel.mjs +1 -1
- package/components/MazCheckbox.d.ts +4 -3
- package/components/MazCheckbox.mjs +86 -83
- package/components/MazChecklist.d.ts +2 -5
- package/components/MazChecklist.mjs +1 -1
- package/components/MazCircularProgressBar.d.ts +31 -60
- package/components/MazCircularProgressBar.mjs +76 -74
- package/components/MazDialog.d.ts +24 -33
- package/components/MazDialog.mjs +1 -1
- package/components/MazDialogPromise.d.ts +3 -3
- package/components/MazDialogPromise.mjs +1 -1
- package/components/MazDrawer.d.ts +9 -5
- package/components/MazDrawer.mjs +2 -194
- package/components/MazDropdown.d.ts +25 -3
- package/components/MazDropdown.mjs +2 -325
- package/components/MazDropzone.d.ts +1 -1
- package/components/MazExpandAnimation.d.ts +6 -5
- package/components/MazExpandAnimation.mjs +22 -25
- package/components/MazFullscreenLoader.d.ts +2 -1
- package/components/MazFullscreenLoader.mjs +7 -7
- package/components/MazGallery.d.ts +1 -1
- package/components/MazGallery.mjs +1 -1
- package/components/MazIcon.mjs +14 -13
- package/components/MazInput.d.ts +18 -3
- package/components/MazInput.mjs +1 -1
- package/components/MazInputCode.d.ts +1 -1
- package/components/MazInputCode.mjs +36 -39
- package/components/MazInputNumber.d.ts +2 -2
- package/components/MazInputNumber.mjs +1 -1
- package/components/MazInputPrice.d.ts +4 -3
- package/components/MazInputPrice.mjs +1 -1
- package/components/MazInputTags.mjs +1 -1
- package/components/MazLazyImg.d.ts +2 -1
- package/components/MazLink.d.ts +2 -1
- package/components/MazLink.mjs +1 -1
- package/components/MazLoadingBar.d.ts +1 -1
- package/components/MazLoadingBar.mjs +31 -27
- package/components/MazPagination.d.ts +3 -2
- package/components/MazPagination.mjs +1 -1
- package/components/MazPhoneNumberInput/CountrySelector.vue.d.ts +31 -55
- package/components/MazPhoneNumberInput/PhoneInput.vue.d.ts +13 -24
- package/components/MazPhoneNumberInput/types.d.ts +4 -2
- package/{types/components/MazPhoneNumberInput/use-libphonenumber.d.ts → components/MazPhoneNumberInput/useLibphonenumber.d.ts} +11 -6
- package/components/MazPhoneNumberInput/{use-maz-phone-number-input.d.ts → useMazPhoneNumberInput.d.ts} +1 -1
- package/components/MazPhoneNumberInput.mjs +1 -1
- package/components/MazPicker/MazPickerCalendar.vue.d.ts +1 -1
- package/components/MazPicker/MazPickerCalendarMonth/MazPickerCalendarDays.vue.d.ts +1 -1
- package/components/MazPicker/MazPickerCalendarMonth/MazPickerCalendarGrid.vue.d.ts +1 -1
- package/components/MazPicker/MazPickerCalendarMonth/MazPickerCalendarMonth.vue.d.ts +1 -1
- package/components/MazPicker/MazPickerCalendarSwitcher.vue.d.ts +1 -1
- package/components/MazPicker/MazPickerContainer.vue.d.ts +1 -1
- package/components/MazPicker/MazPickerFooter.vue.d.ts +1 -1
- package/components/MazPicker/MazPickerHeader.vue.d.ts +1 -1
- package/components/MazPicker/MazPickerMonthSwitcher.vue.d.ts +1 -1
- package/components/MazPicker/MazPickerShortcuts.vue.d.ts +1 -1
- package/components/MazPicker/MazPickerTime.vue.d.ts +1 -1
- package/components/MazPicker/MazPickerYearSwitcher.vue.d.ts +1 -1
- package/components/MazPicker.d.ts +3 -1
- package/components/MazPicker.mjs +1 -1
- package/components/MazPullToRefresh.d.ts +4 -3
- package/components/MazRadio.d.ts +1 -1
- package/components/MazRadio.mjs +31 -37
- package/components/MazRadioButtons.d.ts +1 -1
- package/components/MazReadingProgressBar.d.ts +1 -1
- package/components/MazSelect.d.ts +2 -2
- package/components/MazSelect.mjs +1 -1
- package/components/MazSlider.d.ts +1 -1
- package/components/MazSpinner.d.ts +1 -1
- package/components/MazStepper.d.ts +3 -2
- package/components/MazStepper.mjs +1 -1
- package/components/MazSwitch.d.ts +2 -1
- package/components/MazSwitch.mjs +29 -33
- package/components/MazTable.d.ts +8 -2
- package/components/MazTable.mjs +3 -2
- package/components/MazTableCell.d.ts +3 -2
- package/components/MazTableCell.mjs +12 -12
- package/components/MazTableRow.d.ts +3 -2
- package/components/MazTableRow.mjs +16 -16
- package/components/MazTableTitle.d.ts +3 -2
- package/components/MazTableTitle.mjs +18 -18
- package/components/MazTabs.d.ts +3 -2
- package/components/MazTabsBar.d.ts +3 -2
- package/components/MazTabsBar.mjs +1 -1
- package/components/MazTabsContent.d.ts +3 -2
- package/components/MazTabsContent.mjs +4 -4
- package/components/MazTabsContentItem.d.ts +2 -1
- package/components/MazTabsContentItem.mjs +11 -11
- package/components/MazTextarea.d.ts +58 -32
- package/components/MazTextarea.mjs +128 -109
- package/components/MazTransitionExpand.d.ts +2 -1
- package/components/MazTransitionExpand.mjs +9 -9
- package/components/assets/MazAccordion.css +1 -1
- package/components/assets/MazAnimatedCounter.css +1 -1
- package/components/assets/MazAvatar.css +1 -1
- package/components/assets/MazBackdrop.css +1 -1
- package/components/assets/MazBadge.css +1 -1
- package/components/assets/MazBottomSheet.css +1 -1
- package/components/assets/MazBtn.css +1 -1
- package/components/assets/MazCardSpotlight.css +1 -1
- package/components/assets/MazCheckbox.css +1 -1
- package/components/assets/MazChecklist.css +1 -1
- package/components/assets/MazCircularProgressBar.css +1 -1
- package/components/assets/MazDialog.css +1 -1
- package/components/assets/MazDialogPromise.css +1 -1
- package/components/assets/MazDrawer.css +1 -1
- package/components/assets/MazDropdown.css +1 -1
- package/components/assets/MazExpandAnimation.css +1 -1
- package/components/assets/MazGallery.css +1 -1
- package/components/assets/MazInput.css +1 -1
- package/components/assets/MazInputCode.css +1 -1
- package/components/assets/MazInputNumber.css +1 -1
- package/components/assets/MazInputPrice.css +1 -1
- package/components/assets/MazInputTags.css +1 -1
- package/components/assets/MazLoadingBar.css +1 -1
- package/components/assets/MazPagination.css +1 -1
- package/components/assets/MazPhoneNumberInput.css +1 -1
- package/components/assets/MazPicker.css +1 -1
- package/components/assets/MazRadio.css +1 -1
- package/components/assets/MazSelect.css +1 -1
- package/components/assets/MazStepper.css +1 -1
- package/components/assets/MazSwitch.css +1 -1
- package/components/assets/MazTable.css +1 -1
- package/components/assets/MazTableCell.css +1 -1
- package/components/assets/MazTableRow.css +1 -1
- package/components/assets/MazTableTitle.css +1 -1
- package/components/assets/MazTabsBar.css +1 -1
- package/components/assets/MazTabsContentItem.css +1 -1
- package/components/assets/MazTextarea.css +1 -1
- package/components/assets/MazTransitionExpand.css +1 -1
- package/components/chunks/{MazAvatar-DFoZvWmg.mjs → MazAvatar-CZzOIbzh.mjs} +54 -54
- package/components/chunks/{MazBadge-CqppWg2j.mjs → MazBadge-DCzaExPj.mjs} +2 -2
- package/components/chunks/MazBottomSheet-DGsGO0zo.mjs +224 -0
- package/components/chunks/MazBtn-4-B-zs6Y.mjs +103 -0
- package/components/chunks/MazBtn-BS2kvd1Z.mjs +103 -0
- package/components/chunks/MazBtn-BVWOyFm-.mjs +103 -0
- package/components/chunks/MazBtn-C60T0UDa.mjs +103 -0
- package/components/chunks/MazBtn-C6zsmGnw.mjs +103 -0
- package/components/chunks/MazBtn-C7yEnuOD.mjs +103 -0
- package/components/chunks/MazBtn-CM-xSnA5.mjs +108 -0
- package/components/chunks/MazBtn-CsLtHm4K.mjs +103 -0
- package/components/chunks/MazBtn-D1jMqwE1.mjs +103 -0
- package/components/chunks/MazBtn-DAXwt847.mjs +103 -0
- package/components/chunks/MazBtn-DOWVQgpN.mjs +103 -0
- package/components/chunks/MazBtn-DZaVjTvW.mjs +103 -0
- package/components/chunks/MazBtn-ZAcYNusG.mjs +103 -0
- package/components/chunks/MazBtn-oZhhJy09.mjs +103 -0
- package/components/chunks/{MazCard-BYB8y1_u.mjs → MazCard-98OuVlyK.mjs} +1 -1
- package/components/chunks/{MazCarousel-DccWVW8H.mjs → MazCarousel-COTaKhKF.mjs} +1 -1
- package/components/chunks/{MazCheckbox-DMogZVHl.mjs → MazCheckbox-BNvSeNBP.mjs} +63 -59
- package/components/chunks/{MazCheckbox-B22OcHt8.mjs → MazCheckbox-CCma_qyQ.mjs} +63 -59
- package/components/chunks/{MazCheckbox-Db6sPUbV.mjs → MazCheckbox-eOEEACaM.mjs} +64 -60
- package/components/chunks/{MazChecklist-C95Y4Hb-.mjs → MazChecklist-Bb_70sf5.mjs} +110 -111
- package/components/chunks/MazDialog-Ca3jJ12T.mjs +297 -0
- package/components/chunks/MazDialogPromise-DOnmLhui.mjs +551 -0
- package/components/chunks/MazDrawer-Bas9dy0D.mjs +226 -0
- package/components/chunks/MazDropdown-0r445NfW.mjs +426 -0
- package/components/chunks/MazExpandAnimation-Bdf0-L85.mjs +54 -0
- package/components/chunks/{MazGallery-VTZUhBKC.mjs → MazGallery-r8SBTCgJ.mjs} +42 -45
- package/components/chunks/{MazGallery-CXQiXWFr.mjs → MazGallery-xPp1apvO.mjs} +94 -97
- package/components/chunks/MazIcon-BoTByt7n.mjs +4 -0
- package/components/chunks/{MazIcon-DjMuw8Bz.mjs → MazIcon-C-aPrqx2.mjs} +4 -3
- package/components/chunks/{MazIcon-BbvBov5G.mjs → MazIcon-_hN-Kivn.mjs} +14 -13
- package/components/chunks/{MazIcon-BF5TFzse.mjs → MazIcon-kLACGOa2.mjs} +4 -3
- package/components/chunks/MazInput-BM4n-byz.mjs +313 -0
- package/components/chunks/MazInput-BcutbP8N.mjs +314 -0
- package/components/chunks/MazInput-C9Qh4Gt3.mjs +324 -0
- package/components/chunks/MazInputNumber-DgjOMiOt.mjs +600 -0
- package/components/chunks/{MazInputPrice-DoTnDDIN.mjs → MazInputPrice-D6fJN9yv.mjs} +200 -169
- package/components/chunks/{MazInputTags-Dj3sW-e5.mjs → MazInputTags-DthGSyHQ.mjs} +251 -223
- package/components/chunks/{MazLazyImg-C03sUOXs.mjs → MazLazyImg-DQLwaKKz.mjs} +2 -2
- package/components/chunks/{MazLink-C_3Wya94.mjs → MazLink-tud3eDgU.mjs} +1 -1
- package/components/chunks/MazLoadingBar-C2qPjfEQ.mjs +36 -0
- package/components/chunks/MazPagination-BSu0Ifkp.mjs +327 -0
- package/components/chunks/MazPhoneNumberInput-BQjByOtQ.mjs +1813 -0
- package/components/chunks/MazPicker-BljfUneI.mjs +2486 -0
- package/components/chunks/{MazPickerMonthSwitcher-CmFFQoPA.mjs → MazPickerMonthSwitcher-CEVb4BXw.mjs} +1 -1
- package/components/chunks/{MazPickerShortcuts-DaELz7aq.mjs → MazPickerShortcuts-DayGMC9m.mjs} +1 -1
- package/components/chunks/{MazPickerYearSwitcher-m1_KXnpA.mjs → MazPickerYearSwitcher-DC1lFIbp.mjs} +1 -1
- package/components/chunks/MazSelect-CH3JdigO.mjs +867 -0
- package/components/chunks/MazSelect-D3KXcHJS.mjs +550 -0
- package/components/chunks/MazSpinner-B5JChIrj.mjs +34 -0
- package/components/chunks/{MazSpinner-DoRGA1RI.mjs → MazSpinner-BBZoDxwq.mjs} +1 -1
- package/components/chunks/{MazSpinner-BpkPcfCt.mjs → MazSpinner-BIPm54-3.mjs} +1 -1
- package/components/chunks/{MazSpinner-edxn0ncQ.mjs → MazSpinner-BlbTztM3.mjs} +1 -1
- package/components/chunks/MazSpinner-C-ln9ldX.mjs +34 -0
- package/components/chunks/MazSpinner-C11EOZZd.mjs +34 -0
- package/components/chunks/{MazSpinner-BsYJDmi9.mjs → MazSpinner-C6h03sqc.mjs} +1 -1
- package/components/chunks/{MazSpinner-Bb3f2t6w.mjs → MazSpinner-CCc9ajpj.mjs} +1 -1
- package/components/chunks/{MazSpinner-BcB0szZB.mjs → MazSpinner-CgKOIkQQ.mjs} +1 -1
- package/components/chunks/{MazSpinner-DmiLBQgR.mjs → MazSpinner-Cp_nPioh.mjs} +1 -1
- package/components/chunks/{MazSpinner-CfiIXW8y.mjs → MazSpinner-CwdlrYSt.mjs} +1 -1
- package/components/chunks/MazSpinner-D5Sbo759.mjs +34 -0
- package/components/chunks/MazSpinner-DPur0-r-.mjs +34 -0
- package/components/chunks/MazSpinner-DjUU4G1h.mjs +34 -0
- package/components/chunks/MazSpinner-DoPIk0St.mjs +34 -0
- package/components/chunks/{MazSpinner-C-64WJje.mjs → MazSpinner-DqD51Fb6.mjs} +1 -1
- package/components/chunks/MazSpinner-QfPXLpa_.mjs +34 -0
- package/components/chunks/MazSpinner-ZFhNCy24.mjs +34 -0
- package/components/chunks/MazSpinner-b90e3OQK.mjs +34 -0
- package/components/chunks/MazStepper-B3fuhbye.mjs +218 -0
- package/components/chunks/{MazTable-BJDPdIJB.mjs → MazTable-BU3Hluiu.mjs} +85 -81
- package/components/chunks/MazTableCell-DKMZAanm.mjs +23 -0
- package/components/chunks/MazTableRow-CDHpmXfw.mjs +30 -0
- package/components/chunks/{MazTableTitle-Ch-nyY1E.mjs → MazTableTitle-BSFZ84Ob.mjs} +4 -4
- package/components/chunks/{MazTabsBar-CM-w7V97.mjs → MazTabsBar--Xq_cpuz.mjs} +62 -78
- package/components/chunks/{MazTransitionExpand-PmUDa51_.mjs → MazTransitionExpand-Cedz9Ree.mjs} +8 -8
- package/components/chunks/examples.mobile.json-tW3aL0qI.mjs +4 -0
- package/components/chunks/{inject-strict-BmiaNiwC.mjs → inject-strict-DEDSuzCz.mjs} +3 -3
- package/components/chunks/useInstanceUniqId-BkOfxhk8.mjs +10 -0
- package/css/main.css +1 -1
- package/modules/assets/MazBtn.css +1 -1
- package/modules/assets/index.css +1 -1
- package/modules/chunks/MazBtn-CFge_w1W.cjs +1 -0
- package/modules/chunks/MazBtn-yNCoLFA6.mjs +103 -0
- package/modules/chunks/{MazIcon-DEgoQbMj.mjs → MazIcon-C3__MBEL.mjs} +4 -3
- package/modules/chunks/{MazIcon-CkuzyufF.cjs → MazIcon-CqhvM2xp.cjs} +1 -1
- package/modules/chunks/{MazSpinner-BurN-1pb.mjs → MazSpinner-C4XtaFJk.mjs} +1 -1
- package/modules/chunks/{MazSpinner-jP4QsCNE.cjs → MazSpinner-DkJAN36F.cjs} +1 -1
- package/modules/chunks/index-Bawg2UGE.cjs +124 -0
- package/modules/chunks/{index-CxFUggmu.mjs → index-CXu9R01-.mjs} +1207 -962
- package/modules/index.cjs +1 -1
- package/modules/index.mjs +47 -46
- package/nuxt/index.json +1 -1
- package/package.json +23 -22
- package/tailwindcss/variables/colors.ts +2 -0
- package/types/components/MazAccordion.vue.d.ts +3 -2
- package/types/components/MazAnimatedCounter.vue.d.ts +16 -32
- package/types/components/MazAvatar.vue.d.ts +2 -1
- package/types/components/MazBackdrop.vue.d.ts +23 -14
- package/types/components/MazBadge.vue.d.ts +7 -2
- package/types/components/MazBottomSheet.vue.d.ts +13 -25
- package/types/components/MazBtn.vue.d.ts +4 -3
- package/types/components/MazCard.vue.d.ts +5 -4
- package/types/components/MazCardSpotlight.vue.d.ts +3 -2
- package/types/components/MazCarousel.vue.d.ts +3 -2
- package/types/components/MazCheckbox.vue.d.ts +4 -3
- package/types/components/MazChecklist.vue.d.ts +2 -5
- package/types/components/MazCircularProgressBar.vue.d.ts +31 -60
- package/types/components/MazDialog.vue.d.ts +24 -33
- package/types/components/MazDialogPromise.vue.d.ts +3 -3
- package/types/components/MazDrawer.vue.d.ts +9 -5
- package/types/components/MazDropdown.vue.d.ts +25 -3
- package/types/components/MazDropzone.vue.d.ts +1 -1
- package/types/components/MazExpandAnimation.vue.d.ts +6 -5
- package/types/components/MazFullscreenLoader.vue.d.ts +2 -1
- package/types/components/MazGallery.vue.d.ts +1 -1
- package/types/components/MazInput.vue.d.ts +18 -3
- package/types/components/MazInputCode.vue.d.ts +1 -1
- package/types/components/MazInputNumber.vue.d.ts +2 -2
- package/types/components/MazInputPrice.vue.d.ts +4 -3
- package/types/components/MazLazyImg.vue.d.ts +2 -1
- package/types/components/MazLink.vue.d.ts +2 -1
- package/types/components/MazLoadingBar.vue.d.ts +1 -1
- package/types/components/MazPagination.vue.d.ts +3 -2
- package/types/components/MazPhoneNumberInput/CountrySelector.vue.d.ts +31 -55
- package/types/components/MazPhoneNumberInput/PhoneInput.vue.d.ts +13 -24
- package/types/components/MazPhoneNumberInput/types.d.ts +4 -2
- package/{components/MazPhoneNumberInput/use-libphonenumber.d.ts → types/components/MazPhoneNumberInput/useLibphonenumber.d.ts} +11 -6
- package/types/components/MazPhoneNumberInput/{use-maz-phone-number-input.d.ts → useMazPhoneNumberInput.d.ts} +1 -1
- package/types/components/MazPicker/MazPickerCalendar.vue.d.ts +1 -1
- package/types/components/MazPicker/MazPickerCalendarMonth/MazPickerCalendarDays.vue.d.ts +1 -1
- package/types/components/MazPicker/MazPickerCalendarMonth/MazPickerCalendarGrid.vue.d.ts +1 -1
- package/types/components/MazPicker/MazPickerCalendarMonth/MazPickerCalendarMonth.vue.d.ts +1 -1
- package/types/components/MazPicker/MazPickerCalendarSwitcher.vue.d.ts +1 -1
- package/types/components/MazPicker/MazPickerContainer.vue.d.ts +1 -1
- package/types/components/MazPicker/MazPickerFooter.vue.d.ts +1 -1
- package/types/components/MazPicker/MazPickerHeader.vue.d.ts +1 -1
- package/types/components/MazPicker/MazPickerMonthSwitcher.vue.d.ts +1 -1
- package/types/components/MazPicker/MazPickerShortcuts.vue.d.ts +1 -1
- package/types/components/MazPicker/MazPickerTime.vue.d.ts +1 -1
- package/types/components/MazPicker/MazPickerYearSwitcher.vue.d.ts +1 -1
- package/types/components/MazPicker.vue.d.ts +3 -1
- package/types/components/MazPullToRefresh.vue.d.ts +4 -3
- package/types/components/MazRadio.vue.d.ts +1 -1
- package/types/components/MazRadioButtons.vue.d.ts +1 -1
- package/types/components/MazReadingProgressBar.vue.d.ts +1 -1
- package/types/components/MazSelect.vue.d.ts +2 -2
- package/types/components/MazSlider.vue.d.ts +1 -1
- package/types/components/MazSpinner.vue.d.ts +1 -1
- package/types/components/MazStepper.vue.d.ts +3 -2
- package/types/components/MazSwitch.vue.d.ts +2 -1
- package/types/components/MazTable.vue.d.ts +8 -2
- package/types/components/MazTableCell.vue.d.ts +3 -2
- package/types/components/MazTableRow.vue.d.ts +3 -2
- package/types/components/MazTableTitle.vue.d.ts +3 -2
- package/types/components/MazTabs.vue.d.ts +3 -2
- package/types/components/MazTabsBar.vue.d.ts +3 -2
- package/types/components/MazTabsContent.vue.d.ts +3 -2
- package/types/components/MazTabsContentItem.vue.d.ts +2 -1
- package/types/components/MazTextarea.vue.d.ts +58 -32
- package/types/components/MazTransitionExpand.vue.d.ts +2 -1
- package/types/modules/composables/useFormValidator/types.d.ts +8 -8
- package/types/modules/composables/useFormValidator/useFormField.d.ts +2 -2
- package/types/modules/composables/useFormValidator/useFormValidator.d.ts +3 -3
- package/types/modules/composables/useFormValidator/utils.d.ts +5 -5
- package/types/modules/composables/useLanguageDisplayNames.d.ts +13 -12
- package/types/modules/directives/closable.d.ts +1 -1
- package/types/modules/directives/tooltip/index.d.ts +21 -0
- package/types/modules/directives/v-fullscreen-img/MazFullscreenImg.vue.d.ts +2 -2
- package/types/modules/helpers/inject-strict.d.ts +2 -1
- package/types/tailwindcss/variables/colors.d.ts +2 -0
- package/components/MazPhoneNumberInput.d.ts +0 -239
- package/components/chunks/MazBottomSheet-CGRvZmGd.mjs +0 -208
- package/components/chunks/MazBtn-2VKM1wZu.mjs +0 -106
- package/components/chunks/MazBtn-40lm8-AL.mjs +0 -106
- package/components/chunks/MazBtn-BB1FyYWv.mjs +0 -114
- package/components/chunks/MazBtn-BMYXMZuX.mjs +0 -106
- package/components/chunks/MazBtn-BijEMn4r.mjs +0 -106
- package/components/chunks/MazBtn-BmrcK2af.mjs +0 -106
- package/components/chunks/MazBtn-C72_1uvu.mjs +0 -106
- package/components/chunks/MazBtn-CWloP6MI.mjs +0 -111
- package/components/chunks/MazBtn-CcyV4DCc.mjs +0 -106
- package/components/chunks/MazBtn-DENEMy-c.mjs +0 -106
- package/components/chunks/MazBtn-DfqRZvbB.mjs +0 -106
- package/components/chunks/MazBtn-UnZQuu6P.mjs +0 -106
- package/components/chunks/MazBtn-cDJlUVVY.mjs +0 -106
- package/components/chunks/MazBtn-hUslV7wO.mjs +0 -106
- package/components/chunks/MazDialog-khofH-7I.mjs +0 -237
- package/components/chunks/MazDialogPromise-ZRA2ZrO4.mjs +0 -488
- package/components/chunks/MazExpandAnimation-MDimlZGj.mjs +0 -57
- package/components/chunks/MazInput-DC3S-CVu.mjs +0 -282
- package/components/chunks/MazInput-DzWkS-g8.mjs +0 -293
- package/components/chunks/MazInput-NE6H-10w.mjs +0 -281
- package/components/chunks/MazInputNumber-DRXQXHRv.mjs +0 -572
- package/components/chunks/MazLoadingBar-DdjHRC7g.mjs +0 -32
- package/components/chunks/MazPagination-BkT4_LLW.mjs +0 -330
- package/components/chunks/MazPhoneNumberInput-BbssOUzo.mjs +0 -1778
- package/components/chunks/MazPicker-DwWiIYAR.mjs +0 -2456
- package/components/chunks/MazSelect-BJ07NVXQ.mjs +0 -843
- package/components/chunks/MazSelect-CDV9Fx6m.mjs +0 -556
- package/components/chunks/MazSpinner-BymqEMBk.mjs +0 -34
- package/components/chunks/MazSpinner-CEFbkZkM.mjs +0 -34
- package/components/chunks/MazSpinner-CsEQ9EXb.mjs +0 -34
- package/components/chunks/MazSpinner-CykRbNHD.mjs +0 -34
- package/components/chunks/MazSpinner-D3-pqOh3.mjs +0 -34
- package/components/chunks/MazSpinner-DS58mtzm.mjs +0 -34
- package/components/chunks/MazSpinner-Dmkr_r9u.mjs +0 -34
- package/components/chunks/MazSpinner-eC03bFP5.mjs +0 -34
- package/components/chunks/MazSpinner-f2Mc2eRO.mjs +0 -34
- package/components/chunks/MazSpinner-n4Dp5ZsH.mjs +0 -34
- package/components/chunks/MazStepper-BREfkpUb.mjs +0 -213
- package/components/chunks/MazTableCell-DILuUCTe.mjs +0 -23
- package/components/chunks/MazTableRow-D6H6-c8J.mjs +0 -30
- package/components/chunks/examples.mobile.json-JpNGylGv.mjs +0 -4
- package/components/chunks/useInstanceUniqId-DW9jO1Sz.mjs +0 -11
- package/modules/chunks/MazBtn-B_Xlvgbg.cjs +0 -1
- package/modules/chunks/MazBtn-Dsr06Zgg.mjs +0 -106
- package/modules/chunks/index-CUNN0eIB.cjs +0 -124
- package/types/components/MazPhoneNumberInput.vue.d.ts +0 -239
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
import { defineComponent as L, ref as F, onMounted as I, watch as K, nextTick as M, openBlock as p, createBlock as T, Teleport as U, createVNode as $, Transition as X, withCtx as E, createElementBlock as N, mergeProps as G, createElementVNode as i, normalizeClass as h, withModifiers as H, renderSlot as B, createCommentVNode as P, defineAsyncComponent as D, computed as g, useSlots as J, normalizeStyle as Q, createTextVNode as R, toDisplayString as W, unref as V } from "vue";
|
|
2
|
+
import '../assets/MazDrawer.css';const Y = {
|
|
3
|
+
role: "dialog",
|
|
4
|
+
class: "m-backdrop-container",
|
|
5
|
+
"aria-modal": "true"
|
|
6
|
+
}, Z = { class: "m-backdrop-wrapper" }, j = "--backdrop-present", x = /* @__PURE__ */ L({
|
|
7
|
+
inheritAttrs: !1,
|
|
8
|
+
__name: "MazBackdrop",
|
|
9
|
+
props: {
|
|
10
|
+
modelValue: { type: Boolean, default: !1 },
|
|
11
|
+
teleportSelector: { default: "body" },
|
|
12
|
+
beforeClose: { type: Function, default: void 0 },
|
|
13
|
+
persistent: { type: Boolean, default: !1 },
|
|
14
|
+
noCloseOnEscKey: { type: Boolean, default: !1 },
|
|
15
|
+
transitionName: { default: "backdrop-anim" },
|
|
16
|
+
backdropClass: { default: () => {
|
|
17
|
+
} },
|
|
18
|
+
backdropContentClass: { default: () => {
|
|
19
|
+
} },
|
|
20
|
+
contentPadding: { type: Boolean, default: !1 },
|
|
21
|
+
justify: { default: "none" },
|
|
22
|
+
align: { default: "none" },
|
|
23
|
+
variant: {}
|
|
24
|
+
},
|
|
25
|
+
emits: ["open", "close", "update:model-value", "before-close"],
|
|
26
|
+
setup(n, { expose: r, emit: d }) {
|
|
27
|
+
const l = d;
|
|
28
|
+
function f() {
|
|
29
|
+
document.documentElement.classList.add(j);
|
|
30
|
+
}
|
|
31
|
+
function v() {
|
|
32
|
+
document.querySelector(".m-backdrop.--present") || document.documentElement.classList.remove(j);
|
|
33
|
+
}
|
|
34
|
+
const c = F(n.modelValue);
|
|
35
|
+
function u() {
|
|
36
|
+
t(!1);
|
|
37
|
+
}
|
|
38
|
+
async function t(e) {
|
|
39
|
+
var s;
|
|
40
|
+
e || (l("before-close"), await ((s = n.beforeClose) == null ? void 0 : s.call(n))), c.value = e;
|
|
41
|
+
}
|
|
42
|
+
function o() {
|
|
43
|
+
l("open");
|
|
44
|
+
}
|
|
45
|
+
function a() {
|
|
46
|
+
l("update:model-value", !1), l("close"), b();
|
|
47
|
+
}
|
|
48
|
+
function y() {
|
|
49
|
+
n.persistent || u();
|
|
50
|
+
}
|
|
51
|
+
function k(e) {
|
|
52
|
+
!n.noCloseOnEscKey && e.key === "Escape" && !n.persistent && u();
|
|
53
|
+
}
|
|
54
|
+
function z() {
|
|
55
|
+
f(), document.addEventListener("keyup", k, !1);
|
|
56
|
+
}
|
|
57
|
+
function b() {
|
|
58
|
+
document.removeEventListener("keyup", k), v();
|
|
59
|
+
}
|
|
60
|
+
I(() => {
|
|
61
|
+
n.modelValue ? z() : b();
|
|
62
|
+
});
|
|
63
|
+
let m = null;
|
|
64
|
+
function q(e) {
|
|
65
|
+
const s = document.querySelector(e), C = s && Array.from(s.querySelectorAll('a[href], button, textarea, input[type="text"], input[type="radio"], input[type="checkbox"], select')), w = C == null ? void 0 : C.filter((S) => {
|
|
66
|
+
const A = window.getComputedStyle(S);
|
|
67
|
+
return A.display !== "none" && A.visibility !== "hidden" && !S.disabled;
|
|
68
|
+
});
|
|
69
|
+
return w && w.length > 0 ? w[0] : null;
|
|
70
|
+
}
|
|
71
|
+
return K(
|
|
72
|
+
() => n.modelValue,
|
|
73
|
+
async (e) => {
|
|
74
|
+
if (c.value = e, e) {
|
|
75
|
+
z(), m = document.activeElement, await M();
|
|
76
|
+
const s = q(".m-backdrop-content");
|
|
77
|
+
s == null || s.focus();
|
|
78
|
+
} else
|
|
79
|
+
b(), await M(), m == null || m.focus();
|
|
80
|
+
}
|
|
81
|
+
), r({
|
|
82
|
+
onBackdropAnimationEnter: o,
|
|
83
|
+
onBackdropAnimationLeave: a,
|
|
84
|
+
onBackdropClicked: y,
|
|
85
|
+
close: u,
|
|
86
|
+
present: c,
|
|
87
|
+
toggleModal: t,
|
|
88
|
+
onKeyPress: k
|
|
89
|
+
}), (e, s) => (p(), T(U, { to: e.teleportSelector }, [
|
|
90
|
+
$(X, {
|
|
91
|
+
appear: "",
|
|
92
|
+
name: e.transitionName,
|
|
93
|
+
onAfterEnter: o,
|
|
94
|
+
onAfterLeave: a
|
|
95
|
+
}, {
|
|
96
|
+
default: E(() => [
|
|
97
|
+
c.value ? (p(), N(
|
|
98
|
+
"div",
|
|
99
|
+
G({
|
|
100
|
+
key: 0,
|
|
101
|
+
class: "m-backdrop --present"
|
|
102
|
+
}, e.$attrs, {
|
|
103
|
+
class: [e.backdropClass, e.variant && `--variant-${e.variant}`, { "--persistent": e.persistent }]
|
|
104
|
+
}),
|
|
105
|
+
[
|
|
106
|
+
i("div", Y, [
|
|
107
|
+
i("div", Z, [
|
|
108
|
+
i(
|
|
109
|
+
"div",
|
|
110
|
+
{
|
|
111
|
+
class: h(["m-backdrop-content", [e.backdropContentClass, `--justify-${e.justify}`, `--align-${e.align}`, { "--padding": e.contentPadding }]]),
|
|
112
|
+
role: "button",
|
|
113
|
+
tabindex: "-1",
|
|
114
|
+
onClick: H(y, ["self"])
|
|
115
|
+
},
|
|
116
|
+
[
|
|
117
|
+
B(e.$slots, "default", {
|
|
118
|
+
close: u,
|
|
119
|
+
onBackdropClicked: y
|
|
120
|
+
}, void 0, !0)
|
|
121
|
+
],
|
|
122
|
+
2
|
|
123
|
+
/* CLASS */
|
|
124
|
+
)
|
|
125
|
+
])
|
|
126
|
+
])
|
|
127
|
+
],
|
|
128
|
+
16
|
|
129
|
+
/* FULL_PROPS */
|
|
130
|
+
)) : P("v-if", !0)
|
|
131
|
+
]),
|
|
132
|
+
_: 3
|
|
133
|
+
/* FORWARDED */
|
|
134
|
+
}, 8, ["name"])
|
|
135
|
+
], 8, ["to"]));
|
|
136
|
+
}
|
|
137
|
+
}), O = (n, r) => {
|
|
138
|
+
const d = n.__vccOpts || n;
|
|
139
|
+
for (const [l, f] of r)
|
|
140
|
+
d[l] = f;
|
|
141
|
+
return d;
|
|
142
|
+
}, _ = /* @__PURE__ */ O(x, [["__scopeId", "data-v-7aa1682e"]]), ee = { class: "m-drawer-header__title" }, te = {
|
|
143
|
+
key: 0,
|
|
144
|
+
class: "m-drawer-header__close"
|
|
145
|
+
}, ne = { class: "m-drawer-body" }, oe = /* @__PURE__ */ L({
|
|
146
|
+
__name: "MazDrawer",
|
|
147
|
+
props: {
|
|
148
|
+
title: { default: void 0 },
|
|
149
|
+
variant: { default: "right" },
|
|
150
|
+
size: { default: "30rem" },
|
|
151
|
+
backdropClass: { default: void 0 },
|
|
152
|
+
noClose: { type: Boolean, default: !1 }
|
|
153
|
+
},
|
|
154
|
+
emits: ["before-close", "open", "close", "update:model-value"],
|
|
155
|
+
setup(n) {
|
|
156
|
+
const r = n, d = D(() => import("./MazBtn-BS2kvd1Z.mjs")), l = D(() => import("./x-mark-CnZwVvA7.mjs")), f = g(() => r.variant === "left" ? "start" : r.variant === "right" ? "end" : "none"), v = g(() => r.variant === "top" ? "start" : r.variant === "bottom" ? "end" : "none"), c = J(), u = g(() => !!(r.title || c.title));
|
|
157
|
+
return (t, o) => (p(), T(_, {
|
|
158
|
+
"backdrop-class": ["m-drawer", t.backdropClass],
|
|
159
|
+
justify: f.value,
|
|
160
|
+
align: v.value,
|
|
161
|
+
variant: "drawer",
|
|
162
|
+
"transition-name": `drawer-anim-${t.variant}`,
|
|
163
|
+
onClose: o[0] || (o[0] = (a) => t.$emit("close")),
|
|
164
|
+
onOpen: o[1] || (o[1] = (a) => t.$emit("open")),
|
|
165
|
+
onBeforeClose: o[2] || (o[2] = (a) => t.$emit("before-close")),
|
|
166
|
+
"onUpdate:modelValue": o[3] || (o[3] = (a) => t.$emit("update:model-value", a))
|
|
167
|
+
}, {
|
|
168
|
+
default: E(({ close: a }) => [
|
|
169
|
+
i(
|
|
170
|
+
"div",
|
|
171
|
+
{
|
|
172
|
+
class: h(["m-drawer-content-wrap", [`--${t.variant}`]]),
|
|
173
|
+
style: Q({
|
|
174
|
+
"--maz-drawer-size": t.size
|
|
175
|
+
})
|
|
176
|
+
},
|
|
177
|
+
[
|
|
178
|
+
i(
|
|
179
|
+
"header",
|
|
180
|
+
{
|
|
181
|
+
class: h(["m-drawer-header", [u.value ? "--justify-between" : "--justify-end"]])
|
|
182
|
+
},
|
|
183
|
+
[
|
|
184
|
+
i("h4", ee, [
|
|
185
|
+
B(t.$slots, "title", { close: a }, () => [
|
|
186
|
+
R(
|
|
187
|
+
W(t.title),
|
|
188
|
+
1
|
|
189
|
+
/* TEXT */
|
|
190
|
+
)
|
|
191
|
+
], !0)
|
|
192
|
+
]),
|
|
193
|
+
t.noClose ? P("v-if", !0) : (p(), N("div", te, [
|
|
194
|
+
$(V(d), {
|
|
195
|
+
size: "sm",
|
|
196
|
+
color: "transparent",
|
|
197
|
+
onClick: a
|
|
198
|
+
}, {
|
|
199
|
+
default: E(() => [
|
|
200
|
+
$(V(l), { class: "icon maz-text-lg" })
|
|
201
|
+
]),
|
|
202
|
+
_: 2
|
|
203
|
+
/* DYNAMIC */
|
|
204
|
+
}, 1032, ["onClick"])
|
|
205
|
+
]))
|
|
206
|
+
],
|
|
207
|
+
2
|
|
208
|
+
/* CLASS */
|
|
209
|
+
),
|
|
210
|
+
i("div", ne, [
|
|
211
|
+
B(t.$slots, "default", { close: a }, void 0, !0)
|
|
212
|
+
])
|
|
213
|
+
],
|
|
214
|
+
6
|
|
215
|
+
/* CLASS, STYLE */
|
|
216
|
+
)
|
|
217
|
+
]),
|
|
218
|
+
_: 3
|
|
219
|
+
/* FORWARDED */
|
|
220
|
+
}, 8, ["backdrop-class", "justify", "align", "transition-name"]));
|
|
221
|
+
}
|
|
222
|
+
}), re = /* @__PURE__ */ O(oe, [["__scopeId", "data-v-f0b7ef9f"]]);
|
|
223
|
+
export {
|
|
224
|
+
re as M,
|
|
225
|
+
O as _
|
|
226
|
+
};
|
|
@@ -0,0 +1,426 @@
|
|
|
1
|
+
import { computed as M, useId as re, nextTick as Y, inject as le, defineComponent as Z, ref as A, onMounted as se, watchEffect as ie, openBlock as w, createElementBlock as E, mergeProps as I, createCommentVNode as R, defineAsyncComponent as F, watch as K, withDirectives as Q, unref as m, normalizeClass as S, normalizeStyle as X, createElementVNode as J, withModifiers as H, renderSlot as g, createTextVNode as V, toDisplayString as q, createVNode as W, createSlots as ae, withCtx as $, createBlock as D, resolveDynamicComponent as ue, Transition as de, Fragment as ce, renderList as fe, vShow as pe } from "vue";
|
|
2
|
+
import '../assets/MazDropdown.css';function me({
|
|
3
|
+
componentName: l,
|
|
4
|
+
providedId: s
|
|
5
|
+
}) {
|
|
6
|
+
return M(() => s ?? `${l}-${re().replace(/:/g, "")}`);
|
|
7
|
+
}
|
|
8
|
+
const O = "__maz-click-outside__";
|
|
9
|
+
function _() {
|
|
10
|
+
return document.ontouchstart === null ? "touchstart" : "click";
|
|
11
|
+
}
|
|
12
|
+
async function x(l, s) {
|
|
13
|
+
try {
|
|
14
|
+
ee(l);
|
|
15
|
+
const n = s.instance, f = s.value, p = typeof f == "function";
|
|
16
|
+
if (!p)
|
|
17
|
+
throw new Error("[maz-ui](vClickOutside) the callback should be a function");
|
|
18
|
+
await Y(), l[O] = (h) => {
|
|
19
|
+
if ((!l || h.target && !l.contains(h.target)) && f && p)
|
|
20
|
+
return f.call(n, h);
|
|
21
|
+
};
|
|
22
|
+
const v = _();
|
|
23
|
+
document.addEventListener(v, l[O], { passive: !0 });
|
|
24
|
+
} catch (n) {
|
|
25
|
+
console.error("[maz-ui](vClickOutside)", n);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
function ee(l) {
|
|
29
|
+
try {
|
|
30
|
+
const s = _();
|
|
31
|
+
document.removeEventListener(s, l[O], !1), delete l[O];
|
|
32
|
+
} catch (s) {
|
|
33
|
+
console.error("[maz-ui](vClickOutside)", s);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
function ve(l, s) {
|
|
37
|
+
try {
|
|
38
|
+
if (s.value === s.oldValue)
|
|
39
|
+
return;
|
|
40
|
+
x(l, s);
|
|
41
|
+
} catch (n) {
|
|
42
|
+
console.error("[maz-ui](vClickOutside)", n);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
const ye = {
|
|
46
|
+
mounted: x,
|
|
47
|
+
updated: ve,
|
|
48
|
+
unmounted: ee
|
|
49
|
+
};
|
|
50
|
+
function we(l, s) {
|
|
51
|
+
let n;
|
|
52
|
+
return function(...f) {
|
|
53
|
+
clearTimeout(n), n = setTimeout(() => {
|
|
54
|
+
l.apply(this, f);
|
|
55
|
+
}, s);
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
function he(l, s) {
|
|
59
|
+
const n = le(l, s);
|
|
60
|
+
if (!n)
|
|
61
|
+
throw new TypeError(`[maz-ui](injectStrict) Could not resolve ${l.toString()}`);
|
|
62
|
+
return n;
|
|
63
|
+
}
|
|
64
|
+
const ge = ["innerHTML"], be = /* @__PURE__ */ Z({
|
|
65
|
+
__name: "MazIcon",
|
|
66
|
+
props: {
|
|
67
|
+
/** The source path of the SVG file - e.g: `/icons/home.svg` */
|
|
68
|
+
src: { type: String, default: void 0 },
|
|
69
|
+
/** The path of the folder where the SVG files are stored - e.g: `/icons` */
|
|
70
|
+
path: { type: String, default: void 0 },
|
|
71
|
+
/** The name of the SVG file - e.g: `home` */
|
|
72
|
+
name: { type: String, default: void 0 },
|
|
73
|
+
/** The size of the SVG file - e.g: `1em` */
|
|
74
|
+
size: { type: String, default: void 0 },
|
|
75
|
+
/** The title of the SVG file - e.g: `Home` */
|
|
76
|
+
title: { type: String, default: void 0 },
|
|
77
|
+
/** The function to transform the source of the SVG file - e.g: `(svg) => svg` */
|
|
78
|
+
transformSource: {
|
|
79
|
+
type: Function,
|
|
80
|
+
default: (l) => l
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
emits: ["loaded", "unloaded", "error"],
|
|
84
|
+
setup(l, { emit: s }) {
|
|
85
|
+
const n = l, f = s, p = {}, v = A(), h = A();
|
|
86
|
+
function T() {
|
|
87
|
+
try {
|
|
88
|
+
return he("mazIconPath");
|
|
89
|
+
} catch {
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
const u = M(() => n.path ?? T()), d = M(() => n.src ? n.src : u.value ? `${u.value}/${n.name}.svg` : `/${n.name}.svg`);
|
|
94
|
+
se(() => {
|
|
95
|
+
!n.name && !n.src && console.error('[maz-ui](MazIcon) you should provide "name" or "src" as prop');
|
|
96
|
+
});
|
|
97
|
+
function C(t, a) {
|
|
98
|
+
const i = t.querySelectorAll("title");
|
|
99
|
+
if (i.length > 0)
|
|
100
|
+
i[0].textContent = a;
|
|
101
|
+
else {
|
|
102
|
+
const r = document.createElementNS("http://www.w3.org/2000/svg", "title");
|
|
103
|
+
r.textContent = a, t.append(r);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
function y(t) {
|
|
107
|
+
return Object.keys(t).reduce((a, i) => (t[i] !== !1 && t[i] !== null && t[i] !== void 0 && (a[i] = t[i]), a), {});
|
|
108
|
+
}
|
|
109
|
+
function L(t) {
|
|
110
|
+
const a = {}, i = t.attributes;
|
|
111
|
+
if (!i)
|
|
112
|
+
return a;
|
|
113
|
+
for (let r = i.length - 1; r >= 0; r--)
|
|
114
|
+
a[i[r].name] = i[r].value;
|
|
115
|
+
return a;
|
|
116
|
+
}
|
|
117
|
+
function B(t) {
|
|
118
|
+
t.cloneNode(!0);
|
|
119
|
+
const a = n.transformSource(t);
|
|
120
|
+
return n.title && C(a, n.title), t.innerHTML;
|
|
121
|
+
}
|
|
122
|
+
async function P(t) {
|
|
123
|
+
p[t] || (p[t] = N(t));
|
|
124
|
+
try {
|
|
125
|
+
v.value = await p[t], await Y(), f("loaded", h.value);
|
|
126
|
+
} catch (a) {
|
|
127
|
+
v.value && (v.value = void 0, f("unloaded")), delete p[t], f("error", a);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
function N(t) {
|
|
131
|
+
return new Promise((a, i) => {
|
|
132
|
+
const r = new XMLHttpRequest();
|
|
133
|
+
r.open("GET", t, !0), r.addEventListener("load", () => {
|
|
134
|
+
if (r.status >= 200 && r.status < 400)
|
|
135
|
+
try {
|
|
136
|
+
let k = new DOMParser().parseFromString(r.responseText, "text/xml").querySelectorAll("svg")[0];
|
|
137
|
+
k ? (k = n.transformSource(k), a(k)) : i(new Error('Loaded file is not valid SVG"'));
|
|
138
|
+
} catch (b) {
|
|
139
|
+
i(b);
|
|
140
|
+
}
|
|
141
|
+
else
|
|
142
|
+
i(new Error("Error loading SVG"));
|
|
143
|
+
}), r.addEventListener("error", (b) => i(b)), r.send();
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
return ie(() => P(d.value)), (t, a) => v.value ? (w(), E("svg", I({
|
|
147
|
+
key: 0,
|
|
148
|
+
ref_key: "svgElem",
|
|
149
|
+
ref: h,
|
|
150
|
+
width: "1em",
|
|
151
|
+
height: "1em"
|
|
152
|
+
}, {
|
|
153
|
+
...L(v.value),
|
|
154
|
+
...y(t.$attrs)
|
|
155
|
+
}, {
|
|
156
|
+
style: `font-size: ${l.size}`,
|
|
157
|
+
innerHTML: B(v.value)
|
|
158
|
+
}), null, 16, ge)) : R("v-if", !0);
|
|
159
|
+
}
|
|
160
|
+
}), ke = ["id"], ze = ["aria-expanded"], Ce = ["id"], Se = ["onClick"], $e = /* @__PURE__ */ Z({
|
|
161
|
+
inheritAttrs: !1,
|
|
162
|
+
__name: "MazDropdown",
|
|
163
|
+
props: {
|
|
164
|
+
style: { default: void 0 },
|
|
165
|
+
class: { default: void 0 },
|
|
166
|
+
items: { default: () => [] },
|
|
167
|
+
open: { type: Boolean },
|
|
168
|
+
id: { default: void 0 },
|
|
169
|
+
trigger: { default: "both" },
|
|
170
|
+
color: { default: "transparent" },
|
|
171
|
+
position: { default: "bottom left" },
|
|
172
|
+
noCloseOnClick: { type: Boolean },
|
|
173
|
+
disabled: { type: Boolean },
|
|
174
|
+
noChevron: { type: Boolean },
|
|
175
|
+
screenReaderDescription: { default: "Open menu dropdown" },
|
|
176
|
+
menuPanelClass: {},
|
|
177
|
+
menuPanelStyle: {},
|
|
178
|
+
block: { type: Boolean },
|
|
179
|
+
dropdownIcon: {},
|
|
180
|
+
dropdownIconAnimation: { type: Boolean, default: !0 },
|
|
181
|
+
size: { default: "md" }
|
|
182
|
+
},
|
|
183
|
+
emits: ["menuitem-clicked", "update:open"],
|
|
184
|
+
setup(l, { emit: s }) {
|
|
185
|
+
const n = l, f = s, p = me({
|
|
186
|
+
componentName: "MazDropdown",
|
|
187
|
+
providedId: n.id
|
|
188
|
+
}), v = F(() => import("./MazBtn-oZhhJy09.mjs")), h = F(() => import("./MazLink-tud3eDgU.mjs")), T = F(() => import("./chevron-down-BkvtON3b.mjs")), u = A(n.open), d = A(), C = M(() => n.size === "xl" ? "maz-text-lg" : n.size === "lg" || n.size === "md" || n.size === "sm" ? "maz-text-base" : n.size === "xs" || n.size === "mini" ? "maz-text-sm" : "maz-text-lg"), y = we((e) => {
|
|
189
|
+
r(e);
|
|
190
|
+
}, 200);
|
|
191
|
+
function L() {
|
|
192
|
+
u.value && r(!1);
|
|
193
|
+
}
|
|
194
|
+
function B() {
|
|
195
|
+
r(!u.value);
|
|
196
|
+
}
|
|
197
|
+
function P() {
|
|
198
|
+
["click"].includes(n.trigger) && B();
|
|
199
|
+
}
|
|
200
|
+
function N() {
|
|
201
|
+
["hover", "both"].includes(n.trigger) && r(!0);
|
|
202
|
+
}
|
|
203
|
+
function t() {
|
|
204
|
+
["hover", "both"].includes(n.trigger) && (u.value === !1 ? r(!0) : y(!0));
|
|
205
|
+
}
|
|
206
|
+
function a() {
|
|
207
|
+
["hover", "both"].includes(n.trigger) && y(!1);
|
|
208
|
+
}
|
|
209
|
+
function i() {
|
|
210
|
+
y(!1);
|
|
211
|
+
}
|
|
212
|
+
function r(e) {
|
|
213
|
+
n.disabled || (u.value = e, f("update:open", e));
|
|
214
|
+
}
|
|
215
|
+
function b(e) {
|
|
216
|
+
return "action" in e;
|
|
217
|
+
}
|
|
218
|
+
function G(e) {
|
|
219
|
+
return "href" in e || "to" in e;
|
|
220
|
+
}
|
|
221
|
+
async function k(e, c) {
|
|
222
|
+
var o;
|
|
223
|
+
f("menuitem-clicked", c), await ((o = e.action) == null ? void 0 : o.call(e)), n.noCloseOnClick || U();
|
|
224
|
+
}
|
|
225
|
+
function U() {
|
|
226
|
+
n.noCloseOnClick === !1 && r(!1);
|
|
227
|
+
}
|
|
228
|
+
function j(e) {
|
|
229
|
+
e.key === "Escape" ? (e.preventDefault(), r(!1)) : ["ArrowDown", "ArrowUp"].includes(e.key) ? oe(e) : e.key === "Enter" && typeof d.value == "number" && (e.preventDefault(), document.querySelectorAll(`#${p.value} .menuitem`)[d.value].click(), U());
|
|
230
|
+
}
|
|
231
|
+
function ne(e) {
|
|
232
|
+
["ArrowDown", "ArrowUp", "Enter"].includes(e.key) && u.value === !1 && (e.preventDefault(), r(!0));
|
|
233
|
+
}
|
|
234
|
+
function oe(e) {
|
|
235
|
+
var z;
|
|
236
|
+
e.preventDefault();
|
|
237
|
+
const c = e.key;
|
|
238
|
+
u.value || r(!0);
|
|
239
|
+
const o = (z = n.items) == null ? void 0 : z.length;
|
|
240
|
+
o && (typeof d.value == "number" ? d.value === o - 1 && c === "ArrowDown" ? d.value = 0 : d.value === 0 && c === "ArrowUp" ? d.value = o - 1 : d.value = c === "ArrowDown" ? d.value + 1 : d.value - 1 : d.value = c === "ArrowDown" ? 0 : o - 1);
|
|
241
|
+
}
|
|
242
|
+
return K(
|
|
243
|
+
() => u.value,
|
|
244
|
+
(e) => {
|
|
245
|
+
e ? document.addEventListener("keydown", j) : document.removeEventListener("keydown", j), d.value = void 0;
|
|
246
|
+
}
|
|
247
|
+
), K(
|
|
248
|
+
() => n.open,
|
|
249
|
+
(e) => r(e)
|
|
250
|
+
), (e, c) => Q((w(), E("div", {
|
|
251
|
+
id: m(p),
|
|
252
|
+
class: S(["m-dropdown", [n.class, { "--block": e.block }]]),
|
|
253
|
+
style: X(e.style)
|
|
254
|
+
}, [
|
|
255
|
+
J("div", {
|
|
256
|
+
role: "button",
|
|
257
|
+
tabindex: "0",
|
|
258
|
+
class: "m-dropdown__wrapper",
|
|
259
|
+
"aria-expanded": u.value,
|
|
260
|
+
"aria-haspopup": "menu",
|
|
261
|
+
onClick: H(P, ["stop"]),
|
|
262
|
+
onFocus: N,
|
|
263
|
+
onBlur: i,
|
|
264
|
+
onKeydown: ne,
|
|
265
|
+
onMouseenter: t,
|
|
266
|
+
onMouseleave: a
|
|
267
|
+
}, [
|
|
268
|
+
e.screenReaderDescription || e.$slots["screen-reader-description"] ? (w(), E("span", {
|
|
269
|
+
key: 0,
|
|
270
|
+
id: `${m(p)}-labelspan`,
|
|
271
|
+
class: "maz-sr-only"
|
|
272
|
+
}, [
|
|
273
|
+
g(e.$slots, "screen-reader-description", {}, () => [
|
|
274
|
+
V(
|
|
275
|
+
q(e.screenReaderDescription),
|
|
276
|
+
1
|
|
277
|
+
/* TEXT */
|
|
278
|
+
)
|
|
279
|
+
])
|
|
280
|
+
], 8, Ce)) : R("v-if", !0),
|
|
281
|
+
g(e.$slots, "element", { isOpen: u.value }, () => [
|
|
282
|
+
W(m(v), I({
|
|
283
|
+
"aria-labelledby": `${m(p)}-labelspan`,
|
|
284
|
+
color: e.color,
|
|
285
|
+
disabled: e.disabled
|
|
286
|
+
}, e.$attrs, {
|
|
287
|
+
tabindex: "-1",
|
|
288
|
+
block: e.block,
|
|
289
|
+
size: e.size
|
|
290
|
+
}), ae({
|
|
291
|
+
default: $(() => [
|
|
292
|
+
g(e.$slots, "default")
|
|
293
|
+
]),
|
|
294
|
+
_: 2
|
|
295
|
+
/* DYNAMIC */
|
|
296
|
+
}, [
|
|
297
|
+
e.noChevron ? void 0 : {
|
|
298
|
+
name: "right-icon",
|
|
299
|
+
fn: $(() => [
|
|
300
|
+
g(e.$slots, "dropdown-icon", { isOpen: u.value }, () => [
|
|
301
|
+
typeof e.dropdownIcon == "string" ? (w(), D(be, {
|
|
302
|
+
key: 0,
|
|
303
|
+
name: e.dropdownIcon,
|
|
304
|
+
class: S([{ "--open": u.value && e.dropdownIconAnimation }, C.value])
|
|
305
|
+
}, null, 8, ["name", "class"])) : e.dropdownIcon ? (w(), D(ue(e.dropdownIcon), {
|
|
306
|
+
key: 1,
|
|
307
|
+
class: S([[{ "--open": u.value && e.dropdownIconAnimation }, C.value], "m-dropdown__icon"])
|
|
308
|
+
}, null, 8, ["class"])) : (w(), D(m(T), {
|
|
309
|
+
key: 2,
|
|
310
|
+
class: S([[{ "--open": u.value && e.dropdownIconAnimation }, C.value], "m-dropdown__icon"])
|
|
311
|
+
}, null, 8, ["class"]))
|
|
312
|
+
])
|
|
313
|
+
]),
|
|
314
|
+
key: "0"
|
|
315
|
+
}
|
|
316
|
+
]), 1040, ["aria-labelledby", "color", "disabled", "block", "size"])
|
|
317
|
+
])
|
|
318
|
+
], 40, ze),
|
|
319
|
+
W(de, {
|
|
320
|
+
name: "maz-scale-fade",
|
|
321
|
+
persisted: ""
|
|
322
|
+
}, {
|
|
323
|
+
default: $(() => [
|
|
324
|
+
Q(J(
|
|
325
|
+
"div",
|
|
326
|
+
{
|
|
327
|
+
role: "menu",
|
|
328
|
+
"aria-label": "Menu",
|
|
329
|
+
class: S(["menu", [{
|
|
330
|
+
"--top": e.position.includes("top"),
|
|
331
|
+
"--left": e.position.includes("left"),
|
|
332
|
+
"--right": e.position.includes("right"),
|
|
333
|
+
"--bottom": e.position.includes("bottom")
|
|
334
|
+
}, e.menuPanelClass]]),
|
|
335
|
+
tabindex: "-1",
|
|
336
|
+
style: X(e.menuPanelStyle),
|
|
337
|
+
onFocus: c[0] || (c[0] = (o) => m(y)(!0)),
|
|
338
|
+
onBlur: c[1] || (c[1] = (o) => m(y)(!1)),
|
|
339
|
+
onMouseenter: c[2] || (c[2] = (o) => ["hover", "both"].includes(e.trigger) ? m(y)(!0) : void 0),
|
|
340
|
+
onMouseleave: c[3] || (c[3] = (o) => ["hover", "both"].includes(e.trigger) ? m(y)(!1) : void 0)
|
|
341
|
+
},
|
|
342
|
+
[
|
|
343
|
+
g(e.$slots, "dropdown", { items: e.items }, () => [
|
|
344
|
+
(w(!0), E(
|
|
345
|
+
ce,
|
|
346
|
+
null,
|
|
347
|
+
fe(e.items, (o, z) => g(e.$slots, "menuitem", {
|
|
348
|
+
key: z,
|
|
349
|
+
item: o
|
|
350
|
+
}, () => [
|
|
351
|
+
G(o) ? (w(), D(m(h), I({
|
|
352
|
+
key: 0,
|
|
353
|
+
target: o.href ? o.target ?? "_self" : void 0,
|
|
354
|
+
to: o.to,
|
|
355
|
+
href: o.href,
|
|
356
|
+
color: o.color ?? "theme",
|
|
357
|
+
ref_for: !0
|
|
358
|
+
}, o, {
|
|
359
|
+
"underline-only-hover": o.underlineOnlyHover ?? !1,
|
|
360
|
+
class: ["menuitem", [
|
|
361
|
+
{
|
|
362
|
+
"--is-keyboard-selected": d.value === z
|
|
363
|
+
},
|
|
364
|
+
o.class
|
|
365
|
+
]],
|
|
366
|
+
tabindex: "-1",
|
|
367
|
+
onClick: H(U, ["stop"])
|
|
368
|
+
}), {
|
|
369
|
+
default: $(() => [
|
|
370
|
+
g(e.$slots, "menuitem-label", { item: o }, () => [
|
|
371
|
+
V(
|
|
372
|
+
q(o.label),
|
|
373
|
+
1
|
|
374
|
+
/* TEXT */
|
|
375
|
+
)
|
|
376
|
+
])
|
|
377
|
+
]),
|
|
378
|
+
_: 2
|
|
379
|
+
/* DYNAMIC */
|
|
380
|
+
}, 1040, ["target", "to", "href", "color", "underline-only-hover", "class"])) : b(o) ? (w(), E("button", I({
|
|
381
|
+
key: 1,
|
|
382
|
+
tabindex: "-1",
|
|
383
|
+
type: "button",
|
|
384
|
+
ref_for: !0
|
|
385
|
+
}, o, {
|
|
386
|
+
class: ["menuitem menuitem__button", [
|
|
387
|
+
{
|
|
388
|
+
"--is-keyboard-selected": d.value === z
|
|
389
|
+
},
|
|
390
|
+
o.class,
|
|
391
|
+
`--${o.color ?? "theme"}`
|
|
392
|
+
]],
|
|
393
|
+
onClick: H((te) => k(o, te), ["stop"])
|
|
394
|
+
}), [
|
|
395
|
+
g(e.$slots, "menuitem-label", { item: o }, () => [
|
|
396
|
+
V(
|
|
397
|
+
q(o.label),
|
|
398
|
+
1
|
|
399
|
+
/* TEXT */
|
|
400
|
+
)
|
|
401
|
+
])
|
|
402
|
+
], 16, Se)) : R("v-if", !0)
|
|
403
|
+
])),
|
|
404
|
+
128
|
|
405
|
+
/* KEYED_FRAGMENT */
|
|
406
|
+
))
|
|
407
|
+
])
|
|
408
|
+
],
|
|
409
|
+
38
|
|
410
|
+
/* CLASS, STYLE, NEED_HYDRATION */
|
|
411
|
+
), [
|
|
412
|
+
[pe, u.value]
|
|
413
|
+
])
|
|
414
|
+
]),
|
|
415
|
+
_: 3
|
|
416
|
+
/* FORWARDED */
|
|
417
|
+
})
|
|
418
|
+
], 14, ke)), [
|
|
419
|
+
[m(ye), L]
|
|
420
|
+
]);
|
|
421
|
+
}
|
|
422
|
+
});
|
|
423
|
+
export {
|
|
424
|
+
be as _,
|
|
425
|
+
$e as a
|
|
426
|
+
};
|