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