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
@@ -0,0 +1,867 @@
1
+ import { computed as p, useId as Me, defineComponent as be, defineAsyncComponent as $, ref as V, onMounted as Te, useSlots as Ee, openBlock as m, createElementBlock as k, normalizeClass as B, normalizeStyle as ee, unref as h, toDisplayString as G, createCommentVNode as b, createElementVNode as O, renderSlot as U, createBlock as A, resolveDynamicComponent as me, withDirectives as he, mergeProps as ge, toHandlers as Oe, vModelDynamic as De, createTextVNode as Ne, withModifiers as H, withCtx as te, createVNode as q, onBeforeMount as Pe, nextTick as ue, Transition as Fe, Fragment as ve, renderList as He } from "vue";
2
+ import '../assets/MazSelect.css';function ze({
3
+ componentName: u,
4
+ providedId: r
5
+ }) {
6
+ return p(() => r ?? `${u}-${Me().replace(/:/g, "")}`);
7
+ }
8
+ const qe = {
9
+ removeAccents: !0,
10
+ caseSensitive: !1,
11
+ replaceSpaces: !0,
12
+ removeSpecialCharacters: !1,
13
+ trim: !0,
14
+ normalizeSpaces: !0,
15
+ removeNumbers: !1,
16
+ customNormalizationForms: ["NFC", "NFKD"]
17
+ };
18
+ function oe(u, r) {
19
+ const l = { ...qe, ...r }, t = {
20
+ À: "A",
21
+ Á: "A",
22
+ Â: "A",
23
+ Ã: "A",
24
+ Ä: "A",
25
+ Å: "A",
26
+ à: "a",
27
+ á: "a",
28
+ â: "a",
29
+ ã: "a",
30
+ ä: "a",
31
+ å: "a",
32
+ È: "E",
33
+ É: "E",
34
+ Ê: "E",
35
+ Ë: "E",
36
+ è: "e",
37
+ é: "e",
38
+ ê: "e",
39
+ ë: "e",
40
+ Î: "I",
41
+ Ï: "I",
42
+ í: "I",
43
+ î: "i",
44
+ ï: "i",
45
+ Ô: "O",
46
+ Õ: "O",
47
+ Ö: "O",
48
+ Ø: "O",
49
+ ô: "o",
50
+ õ: "o",
51
+ ö: "o",
52
+ ø: "o",
53
+ Ù: "U",
54
+ Ú: "U",
55
+ Û: "U",
56
+ Ü: "U",
57
+ ù: "u",
58
+ ú: "u",
59
+ û: "u",
60
+ ü: "u",
61
+ Ç: "C",
62
+ ç: "c",
63
+ ÿ: "y",
64
+ Ñ: "N",
65
+ ñ: "n",
66
+ ó: "o"
67
+ };
68
+ let s = u.toString();
69
+ if (l.trim && (s = s.trim()), l.normalizeSpaces && (s = s.replaceAll(/\s+/g, " ")), l.replaceSpaces && (s = s.replaceAll(" ", "-")), l.removeNumbers && (s = s.replaceAll(/\d/g, "")), l.removeAccents && (s = s.replaceAll(/[ÀÁÂÃÄÅÇÈÉÊËÎÏÑÔÕÖØÙÚÛÜàáâãäåçèéêëíîïñóôõöøùúûüÿ]/g, (d) => t[d] || d), s = s.replaceAll(/[\u0300-\u036F]/g, "")), l.caseSensitive === !1 && (s = s.toLowerCase()), l.removeSpecialCharacters && (s = s.replaceAll(/[^\dA-Z-]/gi, "")), l.trim && (s = s.trim()), l.customNormalizationForms)
70
+ for (const d of l.customNormalizationForms)
71
+ s = s.normalize(d);
72
+ return s;
73
+ }
74
+ function Ue(u, r) {
75
+ const l = u.length, t = r.length, s = [];
76
+ for (let d = 0; d <= l; d++)
77
+ s[d] = [d];
78
+ for (let d = 0; d <= t; d++)
79
+ s[0][d] = d;
80
+ for (let d = 1; d <= l; d++)
81
+ for (let v = 1; v <= t; v++) {
82
+ const S = u[d - 1] === r[v - 1] ? 0 : 1;
83
+ s[d][v] = Math.min(
84
+ s[d - 1][v] + 1,
85
+ s[d][v - 1] + 1,
86
+ s[d - 1][v - 1] + S
87
+ );
88
+ }
89
+ return s[l][t];
90
+ }
91
+ function ke(u, r) {
92
+ const l = Ue(u, r), t = Math.max(u.length, r.length);
93
+ return 1 - l / t;
94
+ }
95
+ function We(u, r, l = 0.75) {
96
+ return ke(u, r) >= l;
97
+ }
98
+ function re(u, r, l = 0.75) {
99
+ const t = p(
100
+ () => oe(typeof u == "string" ? u : u.value)
101
+ ), s = p(
102
+ () => oe(typeof r == "string" ? r : r.value)
103
+ ), d = p(() => typeof l == "number" ? l : l.value), v = p(() => ke(t.value, s.value));
104
+ return {
105
+ isMatching: p(
106
+ () => We(t.value, s.value, d.value)
107
+ ),
108
+ score: v
109
+ };
110
+ }
111
+ function Ve(u, r, l) {
112
+ var v, S;
113
+ u.stopPropagation();
114
+ const t = typeof l.value == "function" ? l.value : l.value.handler, s = typeof l.value == "object" ? l.value.exclude : void 0;
115
+ let d = !1;
116
+ if (s && s.length > 0) {
117
+ for (const D of s)
118
+ if (!d && u.target instanceof HTMLElement) {
119
+ const z = (v = document.querySelector(D)) == null ? void 0 : v.getAttribute("id");
120
+ d = (u.target.getAttribute("id") === z || ((S = document.querySelector(D)) == null ? void 0 : S.contains(u.target))) ?? !1;
121
+ }
122
+ }
123
+ !r.contains(u.target) && !d && (t == null || t(u));
124
+ }
125
+ function Ie() {
126
+ return document.ontouchstart === null ? "touchstart" : "click";
127
+ }
128
+ function je(u, r) {
129
+ const l = Ie();
130
+ document.removeEventListener(l, (t) => Ve(t, u, r));
131
+ }
132
+ function Qe(u, r) {
133
+ if (typeof r.value != "function" && typeof r.value == "object" && typeof r.value.handler != "function") {
134
+ console.error("[maz-ui](vClosable) v-closable directive requires a handler function");
135
+ return;
136
+ }
137
+ const l = Ie();
138
+ document.addEventListener(l, (t) => Ve(t, u, r));
139
+ }
140
+ const Re = {
141
+ mounted: Qe,
142
+ unmounted: je
143
+ };
144
+ let de = null;
145
+ function Ge(u, r) {
146
+ de && clearTimeout(de), de = setTimeout(u, r);
147
+ }
148
+ function Ze(u, r) {
149
+ let l;
150
+ return function(...t) {
151
+ clearTimeout(l), l = setTimeout(() => {
152
+ u.apply(this, t);
153
+ }, r);
154
+ };
155
+ }
156
+ const Je = ["for"], Xe = {
157
+ key: 0,
158
+ class: "m-input-wrapper-left"
159
+ }, Ye = ["id", "type", "name", "inputmode", "placeholder", "aria-label", "disabled", "readonly", "required"], xe = { key: 0 }, _e = {
160
+ key: 1,
161
+ class: "m-input-wrapper-right"
162
+ }, et = /* @__PURE__ */ be({
163
+ inheritAttrs: !1,
164
+ __name: "MazInput",
165
+ props: {
166
+ style: { default: void 0 },
167
+ class: { default: void 0 },
168
+ modelValue: { default: void 0 },
169
+ placeholder: { default: void 0 },
170
+ label: { default: void 0 },
171
+ topLabel: {},
172
+ assistiveText: {},
173
+ name: { default: void 0 },
174
+ color: { default: "primary" },
175
+ type: { default: "text" },
176
+ required: { type: Boolean, default: !1 },
177
+ disabled: { type: Boolean, default: !1 },
178
+ readonly: { type: Boolean, default: !1 },
179
+ id: { default: void 0 },
180
+ error: { type: Boolean, default: !1 },
181
+ success: { type: Boolean, default: !1 },
182
+ warning: { type: Boolean, default: !1 },
183
+ hint: { default: void 0 },
184
+ inputClasses: { default: void 0 },
185
+ noBorder: { type: Boolean, default: !1 },
186
+ noRadius: { type: Boolean, default: !1 },
187
+ inputmode: { default: "text" },
188
+ size: { default: "md" },
189
+ debounce: { type: [Boolean, Number], default: !1 },
190
+ debounceDelay: { default: 500 },
191
+ validButton: { type: Boolean, default: !1 },
192
+ validButtonLoading: { type: Boolean, default: !1 },
193
+ autoFocus: { type: Boolean, default: !1 },
194
+ borderActive: { type: Boolean, default: !1 },
195
+ leftIcon: { type: [String, Function, Object], default: void 0 },
196
+ rightIcon: { type: [String, Function, Object], default: void 0 },
197
+ roundedSize: { default: void 0 },
198
+ block: { type: Boolean }
199
+ },
200
+ emits: ["update:model-value", "focus", "blur", "click", "change", "input"],
201
+ setup(u, { emit: r }) {
202
+ const l = u, t = r, s = $(() => import("./MazBtn-B5ioqwkK.mjs")), d = $(() => import("./MazIcon-_hN-Kivn.mjs")), v = $(() => import("./eye-slash-BoO00xzs.mjs")), S = $(() => import("./eye-f8zAUc30.mjs")), D = $(() => import("./check-C9Q_W85g.mjs")), z = V(!1), f = V(!1), N = V(), Z = ze({
203
+ componentName: "MazInput",
204
+ providedId: l.id
205
+ });
206
+ Te(() => {
207
+ var o;
208
+ l.autoFocus && ((o = N.value) == null || o.focus());
209
+ });
210
+ const J = p(() => l.type === "password"), le = p(() => z.value ? "text" : l.type), I = p(() => {
211
+ if (!l.noBorder) {
212
+ if (l.error)
213
+ return "maz-border-danger";
214
+ if (l.success)
215
+ return "maz-border-success";
216
+ if (l.warning)
217
+ return "maz-border-warning";
218
+ if (f.value || l.borderActive) {
219
+ if (l.color === "black")
220
+ return "maz-border-black";
221
+ if (l.color === "danger")
222
+ return "maz-border-danger";
223
+ if (l.color === "info")
224
+ return "maz-border-info";
225
+ if (l.color === "primary")
226
+ return "maz-border-primary";
227
+ if (l.color === "secondary")
228
+ return "maz-border-secondary";
229
+ if (l.color === "success")
230
+ return "maz-border-success";
231
+ if (l.color === "warning")
232
+ return "maz-border-warning";
233
+ if (l.color === "white")
234
+ return "maz-border-white";
235
+ }
236
+ return "--default-border";
237
+ }
238
+ }), W = Ee(), X = p(() => {
239
+ const { required: o, placeholder: g } = l;
240
+ if (g)
241
+ return o ? `${g} *` : g;
242
+ }), Y = p(() => M.value !== void 0 && M.value !== ""), C = Ze(
243
+ (o) => {
244
+ t("update:model-value", o);
245
+ },
246
+ typeof l.debounce == "number" ? l.debounce : l.debounceDelay ?? 500
247
+ );
248
+ function P(o) {
249
+ if (l.debounce)
250
+ return C(o);
251
+ t("update:model-value", o);
252
+ }
253
+ const M = p({
254
+ get: () => l.modelValue,
255
+ set: (o) => P(o)
256
+ }), j = p(() => (!!l.label || !!l.hint) && (f.value || !!Y.value || !!l.placeholder || ["date", "month", "week"].includes(l.type))), x = p(() => !!l.label || !!l.hint);
257
+ function _() {
258
+ return !!W["right-icon"] || J.value || !!W["valid-button"] || l.validButton || !!l.rightIcon;
259
+ }
260
+ function L() {
261
+ return !!W["left-icon"] || !!l.leftIcon;
262
+ }
263
+ function Q(o) {
264
+ t("focus", o), f.value = !0;
265
+ }
266
+ function ae(o) {
267
+ t("blur", o), f.value = !1;
268
+ }
269
+ function ne(o) {
270
+ return t("change", o);
271
+ }
272
+ function T(o) {
273
+ return t("input", o);
274
+ }
275
+ return (o, g) => (m(), k(
276
+ "div",
277
+ {
278
+ class: B(["m-input", [
279
+ {
280
+ "--is-focused": f.value || o.borderActive,
281
+ "--should-up": j.value,
282
+ "--has-label": x.value,
283
+ "--is-disabled": o.disabled,
284
+ "--is-readonly": o.readonly,
285
+ "--has-z-2": o.error || o.warning || o.success,
286
+ "--has-state": o.error || o.warning || o.success,
287
+ "--block": o.block
288
+ },
289
+ l.class,
290
+ `--${o.color}`
291
+ ]]),
292
+ style: ee(o.style)
293
+ },
294
+ [
295
+ o.topLabel ? (m(), k("label", {
296
+ key: 0,
297
+ for: h(Z),
298
+ class: "m-input-top-label"
299
+ }, G(o.topLabel), 9, Je)) : b("v-if", !0),
300
+ O(
301
+ "div",
302
+ {
303
+ class: B(["m-input-wrapper", [
304
+ o.inputClasses,
305
+ I.value,
306
+ o.roundedSize ? `--rounded-${o.roundedSize}` : { "maz-rounded": !o.noRadius },
307
+ { "--block": o.block }
308
+ ]])
309
+ },
310
+ [
311
+ L() ? (m(), k("div", Xe, [
312
+ o.$slots["left-icon"] || o.leftIcon ? U(o.$slots, "left-icon", { key: 0 }, () => [
313
+ typeof o.leftIcon == "string" ? (m(), A(h(d), {
314
+ key: 0,
315
+ name: o.leftIcon,
316
+ class: "maz-text-xl maz-text-muted"
317
+ }, null, 8, ["name"])) : o.leftIcon ? (m(), A(me(o.leftIcon), {
318
+ key: 1,
319
+ class: "maz-text-xl maz-text-muted"
320
+ })) : b("v-if", !0)
321
+ ], !0) : b("v-if", !0)
322
+ ])) : b("v-if", !0),
323
+ O(
324
+ "div",
325
+ {
326
+ class: B(["m-input-wrapper-input", [`--${o.size}`, { "--top-label": !!o.topLabel }]])
327
+ },
328
+ [
329
+ he(O("input", ge({
330
+ id: h(Z),
331
+ ref_key: "input",
332
+ ref: N,
333
+ "onUpdate:modelValue": g[0] || (g[0] = (E) => M.value = E),
334
+ type: le.value,
335
+ name: o.name
336
+ }, o.$attrs, {
337
+ inputmode: o.inputmode,
338
+ placeholder: X.value,
339
+ "aria-label": o.label || o.placeholder,
340
+ disabled: o.disabled,
341
+ readonly: o.readonly,
342
+ required: o.required,
343
+ class: "m-input-input"
344
+ }, Oe({
345
+ blur: ae,
346
+ focus: Q,
347
+ change: ne,
348
+ input: T
349
+ }, !0), {
350
+ onClick: g[1] || (g[1] = (E) => o.$emit("click", E))
351
+ }), null, 16, Ye), [
352
+ [De, M.value]
353
+ ]),
354
+ o.label || o.hint ? (m(), k(
355
+ "span",
356
+ {
357
+ key: 0,
358
+ class: B(["m-input-label", [
359
+ {
360
+ "maz-text-danger-600": o.error,
361
+ "maz-text-success-600": o.success,
362
+ "maz-text-warning-600": o.warning
363
+ }
364
+ ]])
365
+ },
366
+ [
367
+ Ne(
368
+ G(o.hint || o.label) + " ",
369
+ 1
370
+ /* TEXT */
371
+ ),
372
+ o.required ? (m(), k("sup", xe, "*")) : b("v-if", !0)
373
+ ],
374
+ 2
375
+ /* CLASS */
376
+ )) : b("v-if", !0)
377
+ ],
378
+ 2
379
+ /* CLASS */
380
+ ),
381
+ _() ? (m(), k("div", _e, [
382
+ o.$slots["right-icon"] || o.rightIcon ? U(o.$slots, "right-icon", { key: 0 }, () => [
383
+ typeof o.rightIcon == "string" ? (m(), A(h(d), {
384
+ key: 0,
385
+ name: o.rightIcon,
386
+ class: "maz-text-xl maz-text-muted"
387
+ }, null, 8, ["name"])) : o.rightIcon ? (m(), A(me(o.rightIcon), {
388
+ key: 1,
389
+ class: "maz-text-xl maz-text-muted"
390
+ })) : b("v-if", !0)
391
+ ], !0) : b("v-if", !0),
392
+ J.value ? (m(), A(h(s), {
393
+ key: 1,
394
+ color: "transparent",
395
+ tabindex: "-1",
396
+ size: "mini",
397
+ onClick: g[2] || (g[2] = H((E) => z.value = !z.value, ["stop"]))
398
+ }, {
399
+ default: te(() => [
400
+ z.value ? (m(), A(h(v), {
401
+ key: 0,
402
+ class: "maz-text-xl maz-text-muted"
403
+ })) : (m(), A(h(S), {
404
+ key: 1,
405
+ class: "maz-text-xl maz-text-muted"
406
+ }))
407
+ ]),
408
+ _: 1
409
+ /* STABLE */
410
+ })) : b("v-if", !0),
411
+ o.$slots["valid-button"] || o.validButton ? U(o.$slots, "valid-button", { key: 2 }, () => [
412
+ q(h(s), {
413
+ color: "transparent",
414
+ disabled: o.disabled,
415
+ tabindex: "-1",
416
+ loading: o.validButtonLoading,
417
+ class: "m-input-valid-button",
418
+ size: "mini",
419
+ type: "submit"
420
+ }, {
421
+ default: te(() => [
422
+ q(h(D), { class: "maz-text-2xl maz-text-normal" })
423
+ ]),
424
+ _: 1
425
+ /* STABLE */
426
+ }, 8, ["disabled", "loading"])
427
+ ], !0) : b("v-if", !0)
428
+ ])) : b("v-if", !0)
429
+ ],
430
+ 2
431
+ /* CLASS */
432
+ ),
433
+ o.assistiveText ? (m(), k(
434
+ "div",
435
+ {
436
+ key: 1,
437
+ class: B(["m-input-bottom-text", [
438
+ {
439
+ "maz-text-danger-600": o.error,
440
+ "maz-text-success-600": o.success,
441
+ "maz-text-warning-600": o.warning,
442
+ "maz-text-muted": !o.error && !o.success && !o.warning
443
+ }
444
+ ]])
445
+ },
446
+ G(o.assistiveText),
447
+ 3
448
+ /* TEXT, CLASS */
449
+ )) : b("v-if", !0)
450
+ ],
451
+ 6
452
+ /* CLASS, STYLE */
453
+ ));
454
+ }
455
+ }), we = (u, r) => {
456
+ const l = u.__vccOpts || u;
457
+ for (const [t, s] of r)
458
+ l[t] = s;
459
+ return l;
460
+ }, ye = /* @__PURE__ */ we(et, [["__scopeId", "data-v-2cfe0ca2"]]), tt = ["aria-label"], ot = { class: "m-select-list__no-results" }, lt = {
461
+ key: 2,
462
+ class: "m-select-list__scroll-wrapper",
463
+ tabindex: "-1"
464
+ }, at = { class: "m-select-list-optgroup" }, nt = ["onClick"], st = /* @__PURE__ */ be({
465
+ inheritAttrs: !1,
466
+ __name: "MazSelect",
467
+ props: {
468
+ style: { default: void 0 },
469
+ class: { default: void 0 },
470
+ id: { default: void 0 },
471
+ modelValue: { default: void 0 },
472
+ options: { default: void 0 },
473
+ optionValueKey: { default: "value" },
474
+ optionLabelKey: { default: "label" },
475
+ optionInputValueKey: { default: "label" },
476
+ listPosition: { default: "bottom left" },
477
+ itemHeight: { default: void 0 },
478
+ maxListHeight: { default: 240 },
479
+ maxListWidth: { default: void 0 },
480
+ minListHeight: { default: void 0 },
481
+ minListWidth: { default: void 0 },
482
+ size: { default: "md" },
483
+ color: { default: "primary" },
484
+ search: { type: Boolean },
485
+ searchPlaceholder: { default: "Search in options" },
486
+ searchThreshold: { default: 0.75 },
487
+ open: { type: Boolean },
488
+ multiple: { type: Boolean, default: void 0 },
489
+ required: { type: Boolean },
490
+ disabled: { type: Boolean },
491
+ block: { type: Boolean },
492
+ excludeSelectors: { default: void 0 },
493
+ autocomplete: { default: "off" }
494
+ },
495
+ emits: ["close", "open", "blur", "focus", "change", "input", "update:model-value", "selected-option"],
496
+ setup(u, { expose: r, emit: l }) {
497
+ const t = u, s = l, d = $(() => import("./MazCheckbox-BDPgDiU3.mjs")), v = $(() => import("./magnifying-glass--nBiyXot.mjs")), S = $(() => import("./chevron-down-BkvtON3b.mjs")), D = $(() => import("./no-symbol-CIgKzsrB.mjs"));
498
+ r({
499
+ /** Method to open the option list */
500
+ openList: R,
501
+ /** Method to close the option list */
502
+ closeList: F
503
+ });
504
+ const z = V(!1), f = V(), N = p(
505
+ () => ["black", "transparent", "white"].includes(t.color)
506
+ ), Z = p(
507
+ () => N.value ? "var(--maz-color-black)" : `var(--maz-color-${t.color}-800)`
508
+ ), J = p(
509
+ () => N.value ? "var(--maz-color-muted)" : `var(--maz-color-${t.color}-100)`
510
+ ), le = p(
511
+ () => N.value ? "var(--maz-color-muted)" : `var(--maz-color-${t.color}-200)`
512
+ ), I = p(() => z.value || t.open), W = ze({
513
+ componentName: "MazSelect",
514
+ providedId: t.id
515
+ });
516
+ function X(e) {
517
+ return {
518
+ [t.optionValueKey]: e,
519
+ [t.optionLabelKey]: e,
520
+ [t.optionInputValueKey]: e
521
+ };
522
+ }
523
+ function Y(e) {
524
+ return {
525
+ ...e,
526
+ [t.optionValueKey]: e[t.optionValueKey],
527
+ [t.optionLabelKey]: e[t.optionLabelKey],
528
+ [t.optionInputValueKey]: e[t.optionInputValueKey]
529
+ };
530
+ }
531
+ const C = p(() => {
532
+ var n;
533
+ const e = [];
534
+ if (!((n = t.options) != null && n.length))
535
+ return [];
536
+ for (const a of t.options)
537
+ typeof a == "string" || typeof a == "number" || typeof a == "boolean" ? e.push(X(a)) : typeof a == "object" && "options" in a && Array.isArray(a.options) ? e.push(
538
+ { label: a.label, isOptGroup: !0 },
539
+ ...a.options.map(
540
+ (i) => typeof i == "string" || typeof i == "number" || typeof i == "boolean" ? X(i) : Y(i)
541
+ )
542
+ ) : e.push(Y(a));
543
+ return e;
544
+ }), P = p(
545
+ () => {
546
+ var e;
547
+ return ((e = C.value) == null ? void 0 : e.filter((n) => t.multiple ? Array.isArray(t.modelValue) ? t.modelValue.includes(n[t.optionValueKey]) && !L(n[t.optionValueKey]) : !1 : t.modelValue === n[t.optionValueKey] && !L(n[t.optionValueKey]))) ?? [];
548
+ }
549
+ );
550
+ Pe(() => {
551
+ var e;
552
+ (e = t.options) != null && e.length || console.warn("[maz-ui](MazSelect) you must provide options"), ie();
553
+ });
554
+ const M = V(), j = V(), x = V(), _ = V();
555
+ function L(e) {
556
+ return e == null;
557
+ }
558
+ function Q(e) {
559
+ var a;
560
+ return (((a = P.value) == null ? void 0 : a.some(
561
+ (i) => i[t.optionValueKey] === e[t.optionValueKey]
562
+ )) ?? !1) && !L(e[t.optionValueKey]);
563
+ }
564
+ const ae = p(() => {
565
+ var n;
566
+ if (t.multiple && t.modelValue && Array.isArray(t.modelValue))
567
+ return t.modelValue.map(
568
+ (a) => {
569
+ var i, c;
570
+ return (c = (i = C.value) == null ? void 0 : i.find((y) => y[t.optionValueKey] === a)) == null ? void 0 : c[t.optionInputValueKey];
571
+ }
572
+ ).join(", ");
573
+ const e = (n = C.value) == null ? void 0 : n.find(
574
+ (a) => a[t.optionValueKey] === t.modelValue
575
+ );
576
+ return L(t.modelValue) || e == null ? void 0 : e[t.optionInputValueKey];
577
+ }), ne = p(
578
+ () => t.listPosition.includes("bottom") ? "maz-slide" : "maz-slideinvert"
579
+ ), T = V(""), o = V("");
580
+ function g(e, n) {
581
+ return n && e && oe(e).includes(oe(n));
582
+ }
583
+ function E(e) {
584
+ var n;
585
+ return e ? (n = C.value) == null ? void 0 : n.filter((a) => {
586
+ const i = a[t.optionLabelKey], c = a[t.optionValueKey], y = a[t.optionInputValueKey], w = t.searchThreshold;
587
+ return g(i, e) || g(y, e) || g(c, e) || typeof i == "string" && re(i, e, w).isMatching.value || typeof y == "string" && re(y, e, w).isMatching.value || typeof c == "string" && re(c, e, w).isMatching.value;
588
+ }) : C.value;
589
+ }
590
+ const K = p(() => E(T.value));
591
+ async function F(e) {
592
+ var a, i;
593
+ if (!I.value)
594
+ return;
595
+ if (e && ("relatedTarget" in e && ((a = M.value) != null && a.contains(e.relatedTarget)) || e.type === "keydown"))
596
+ return e.preventDefault();
597
+ const n = e && "relatedTarget" in e && e.relatedTarget instanceof HTMLElement && e.relatedTarget.getAttribute("id");
598
+ if ((i = t.excludeSelectors) != null && i.includes(`#${n}`))
599
+ return e == null ? void 0 : e.preventDefault();
600
+ await ue(), z.value = !1, f.value = 0, s("close", e);
601
+ }
602
+ async function R(e) {
603
+ t.disabled || I.value || (e == null || e.preventDefault(), z.value = !0, await se(), s("focus", e), s("open", z.value));
604
+ }
605
+ function ce() {
606
+ var e, n;
607
+ (n = ((e = j.value) == null ? void 0 : e.$el).querySelector("input")) == null || n.focus();
608
+ }
609
+ function Se() {
610
+ var e, n;
611
+ (n = ((e = j.value) == null ? void 0 : e.$el).querySelector("input")) == null || n.dispatchEvent(new Event("input"));
612
+ }
613
+ function Ke(e) {
614
+ z.value ? F(e) : ce();
615
+ }
616
+ function Ae(e) {
617
+ var n, a;
618
+ T.value = e, (a = ((n = x.value) == null ? void 0 : n.$el).querySelector("input")) == null || a.focus();
619
+ }
620
+ function $e(e) {
621
+ var a;
622
+ e === "Backspace" && o.value.length > 0 ? o.value = o.value.slice(0, -1) : o.value += e;
623
+ const n = E(o.value);
624
+ n != null && n.length && (f.value = (a = K.value) == null ? void 0 : a.findIndex(
625
+ (i) => i[t.optionValueKey] === n[0][t.optionValueKey]
626
+ ), typeof f.value == "number" && f.value >= 0 && se(f.value)), Ge(() => {
627
+ o.value = "";
628
+ }, 1e3);
629
+ }
630
+ function Le(e) {
631
+ const n = e.key;
632
+ /^[\dA-Za-z\u0400-\u04FF]$/.test(n) ? (e.preventDefault(), R(e), t.search ? Ae(n) : $e(n)) : pe(e);
633
+ }
634
+ function pe(e, n = !0) {
635
+ const a = e.code, i = ["ArrowUp", "ArrowDown"].includes(a), c = (n ? ["Enter", "Space"] : ["Enter"]).includes(a), y = a === "Escape" && I.value;
636
+ i ? Be(e, f.value) : c ? Ce(e, f.value) : y && F(e);
637
+ }
638
+ function Be(e, n) {
639
+ var c;
640
+ e.preventDefault();
641
+ const a = e.code;
642
+ I.value || R(e);
643
+ const i = (c = K.value) == null ? void 0 : c.length;
644
+ i && (typeof n == "number" ? n === i - 1 && a === "ArrowDown" ? f.value = 0 : n === 0 && a === "ArrowUp" ? f.value = i - 1 : f.value = a === "ArrowDown" ? n + 1 : n - 1 : f.value = a === "ArrowDown" ? 0 : i - 1, se(f.value));
645
+ }
646
+ function Ce(e, n) {
647
+ var i, c, y;
648
+ if (!I.value)
649
+ return;
650
+ e.preventDefault();
651
+ const a = n ? ((i = K.value) == null ? void 0 : i[n]) ?? ((c = K.value) == null ? void 0 : c[0]) : (y = K.value) == null ? void 0 : y[0];
652
+ L(a) || fe(a);
653
+ }
654
+ async function se(e) {
655
+ var a, i;
656
+ await ue(), typeof e != "number" && ie();
657
+ const n = e ?? f.value;
658
+ if (typeof n == "number" && n >= 0) {
659
+ const c = (a = _.value) == null ? void 0 : a.querySelectorAll(".m-select-list-item");
660
+ (i = c == null ? void 0 : c[n]) == null || i.scrollIntoView({
661
+ behavior: "auto",
662
+ block: "nearest",
663
+ inline: "start"
664
+ });
665
+ }
666
+ }
667
+ function ie(e) {
668
+ var a;
669
+ const n = (a = K.value) == null ? void 0 : a.findIndex((i) => {
670
+ var c, y;
671
+ return t.multiple && Array.isArray(t.modelValue) ? e ? e[t.optionValueKey] === i[t.optionValueKey] : [...t.modelValue].reverse()[0] === i[t.optionValueKey] : ((y = (c = P.value) == null ? void 0 : c[0]) == null ? void 0 : y[t.optionValueKey]) === i[t.optionValueKey];
672
+ });
673
+ f.value = n && n >= 0 ? n : 0;
674
+ }
675
+ function fe(e, n = !0) {
676
+ var y;
677
+ n && !t.multiple && ue(() => F()), T.value = "";
678
+ const a = (y = P.value) == null ? void 0 : y.some(
679
+ (w) => w[t.optionValueKey] === e[t.optionValueKey]
680
+ );
681
+ let i = P.value;
682
+ a && t.multiple ? i = i == null ? void 0 : i.filter(
683
+ (w) => w[t.optionValueKey] !== e[t.optionValueKey]
684
+ ) : t.multiple ? i.push(e) : i = [e];
685
+ const c = i.map((w) => w[t.optionValueKey]);
686
+ s("update:model-value", t.multiple ? c : c[0]), s("selected-option", e), Se(), ie(e), ce();
687
+ }
688
+ return (e, n) => he((m(), k(
689
+ "div",
690
+ {
691
+ ref_key: "mazSelectElement",
692
+ ref: M,
693
+ class: B(["m-select", [
694
+ { "--is-open": I.value, "--disabled": e.disabled, "--block": e.block },
695
+ t.class,
696
+ `--${e.size}`
697
+ ]]),
698
+ style: ee([e.style, { "--keyboard-selected-bg-color": le.value, "--selected-bg-color": J.value, "--selected-text-color": Z.value }])
699
+ },
700
+ [
701
+ q(ye, ge({
702
+ id: h(W),
703
+ ref_key: "mazInputComponent",
704
+ ref: j,
705
+ class: "m-select-input"
706
+ }, e.$attrs, {
707
+ required: e.required,
708
+ "border-active": z.value,
709
+ color: e.color,
710
+ "model-value": ae.value,
711
+ size: e.size,
712
+ block: "",
713
+ autocomplete: e.autocomplete,
714
+ disabled: e.disabled,
715
+ onFocus: H(R, ["prevent", "stop"]),
716
+ onBlur: H(F, ["prevent", "stop"]),
717
+ onClick: H(R, ["prevent", "stop"]),
718
+ onChange: n[0] || (n[0] = (a) => s("change", a)),
719
+ onInput: n[1] || (n[1] = (a) => s("input", a)),
720
+ onKeydown: Le
721
+ }), {
722
+ "right-icon": te(() => [
723
+ O("button", {
724
+ tabindex: "-1",
725
+ type: "button",
726
+ class: "m-select-input__toggle-button maz-custom",
727
+ "aria-label": `${I.value ? "collapse" : "expand"} list of options`,
728
+ onClick: H(Ke, ["stop"])
729
+ }, [
730
+ q(h(S), { class: "m-select-chevron maz-text-xl" })
731
+ ], 8, tt)
732
+ ]),
733
+ _: 1
734
+ /* STABLE */
735
+ }, 16, ["id", "required", "border-active", "color", "model-value", "size", "autocomplete", "disabled"]),
736
+ q(Fe, { name: ne.value }, {
737
+ default: te(() => [
738
+ I.value ? (m(), k(
739
+ "div",
740
+ {
741
+ key: 0,
742
+ ref_key: "optionsListElement",
743
+ ref: _,
744
+ class: B(["m-select-list", {
745
+ "--top": e.listPosition.includes("top"),
746
+ "--left": e.listPosition.includes("left"),
747
+ "--right": e.listPosition.includes("right"),
748
+ "--bottom": e.listPosition.includes("bottom")
749
+ }]),
750
+ style: ee({
751
+ maxHeight: `${e.maxListHeight}px`,
752
+ maxWidth: `${e.maxListWidth}px`,
753
+ minHeight: `${e.minListHeight}px`,
754
+ minWidth: `${e.minListWidth}px`
755
+ })
756
+ },
757
+ [
758
+ e.search ? (m(), A(ye, {
759
+ key: 0,
760
+ ref_key: "searchInputComponent",
761
+ ref: x,
762
+ modelValue: T.value,
763
+ "onUpdate:modelValue": [
764
+ n[2] || (n[2] = (a) => T.value = a),
765
+ n[4] || (n[4] = (a) => f.value = 0)
766
+ ],
767
+ size: "sm",
768
+ color: e.color,
769
+ placeholder: e.searchPlaceholder,
770
+ name: "search",
771
+ inputmode: "search",
772
+ block: "",
773
+ autocomplete: "off",
774
+ tabindex: "-1",
775
+ class: "m-select-list__search-input maz-flex-none",
776
+ "left-icon": h(v),
777
+ onKeydown: n[3] || (n[3] = (a) => pe(a, !1))
778
+ }, null, 8, ["modelValue", "color", "placeholder", "left-icon"])) : b("v-if", !0),
779
+ !K.value || K.value.length <= 0 ? U(e.$slots, "no-results", { key: 1 }, () => [
780
+ O("span", ot, [
781
+ q(h(D), { class: "maz-h-6 maz-w-6 maz-text-normal" })
782
+ ])
783
+ ], !0) : (m(), k("div", lt, [
784
+ (m(!0), k(
785
+ ve,
786
+ null,
787
+ He(K.value, (a, i) => (m(), k(
788
+ ve,
789
+ { key: i },
790
+ [
791
+ a.label && a.isOptGroup ? U(e.$slots, "optgroup", {
792
+ key: 0,
793
+ label: a.label
794
+ }, () => [
795
+ O(
796
+ "span",
797
+ at,
798
+ G(a.label),
799
+ 1
800
+ /* TEXT */
801
+ )
802
+ ], !0) : (m(), k("button", {
803
+ key: 1,
804
+ tabindex: "-1",
805
+ type: "button",
806
+ class: B(["m-select-list-item maz-custom maz-flex-none", [
807
+ {
808
+ "--is-keyboard-selected": f.value === i,
809
+ "--is-selected": Q(a),
810
+ "--is-none-value": L(a[e.optionValueKey])
811
+ }
812
+ ]]),
813
+ style: ee(e.itemHeight ? { height: `${e.itemHeight}px` } : void 0),
814
+ onClick: H((c) => fe(a), ["prevent", "stop"])
815
+ }, [
816
+ e.multiple ? (m(), A(h(d), {
817
+ key: 0,
818
+ tabindex: "-1",
819
+ "model-value": Q(a),
820
+ size: "sm",
821
+ color: e.color
822
+ }, null, 8, ["model-value", "color"])) : b("v-if", !0),
823
+ U(e.$slots, "default", {
824
+ option: a,
825
+ isSelected: Q(a)
826
+ }, () => [
827
+ O(
828
+ "span",
829
+ null,
830
+ G(a[e.optionLabelKey]),
831
+ 1
832
+ /* TEXT */
833
+ )
834
+ ], !0)
835
+ ], 14, nt))
836
+ ],
837
+ 64
838
+ /* STABLE_FRAGMENT */
839
+ ))),
840
+ 128
841
+ /* KEYED_FRAGMENT */
842
+ ))
843
+ ]))
844
+ ],
845
+ 6
846
+ /* CLASS, STYLE */
847
+ )) : b("v-if", !0)
848
+ ]),
849
+ _: 3
850
+ /* FORWARDED */
851
+ }, 8, ["name"])
852
+ ],
853
+ 6
854
+ /* CLASS, STYLE */
855
+ )), [
856
+ [h(Re), {
857
+ exclude: e.excludeSelectors,
858
+ handler: F
859
+ }]
860
+ ]);
861
+ }
862
+ }), ut = /* @__PURE__ */ we(st, [["__scopeId", "data-v-07cbef8c"]]);
863
+ export {
864
+ ut as M,
865
+ we as _,
866
+ ze as u
867
+ };