maz-ui 3.47.2-beta.2 → 3.47.2-beta.20

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