maz-ui 3.47.1 → 3.47.2-beta.10

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