maz-ui 3.48.4-beta.0 → 3.48.4-beta.2

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 (140) hide show
  1. package/components/MazAnimatedCounter.d.ts +6 -0
  2. package/components/MazAnimatedCounter.mjs +12 -11
  3. package/components/MazAnimatedElement.d.ts +37 -0
  4. package/components/MazAnimatedElement.mjs +44 -0
  5. package/components/MazAnimatedText.d.ts +50 -0
  6. package/components/MazAnimatedText.mjs +165 -0
  7. package/components/MazBottomSheet.mjs +1 -1
  8. package/components/MazBtn.mjs +1 -1
  9. package/components/MazCard.mjs +1 -1
  10. package/components/MazCarousel.mjs +1 -1
  11. package/components/MazChecklist.d.ts +9 -4
  12. package/components/MazChecklist.mjs +1 -1
  13. package/components/MazCircularProgressBar.mjs +19 -18
  14. package/components/MazDialog.mjs +1 -1
  15. package/components/MazDialogPromise.mjs +1 -1
  16. package/components/MazDrawer.mjs +1 -1
  17. package/components/MazDropdown.mjs +1 -1
  18. package/components/MazInput.mjs +1 -1
  19. package/components/MazInputNumber.mjs +1 -1
  20. package/components/MazInputPrice.mjs +1 -1
  21. package/components/MazInputTags.mjs +1 -1
  22. package/components/MazPagination.mjs +1 -1
  23. package/components/MazPhoneNumberInput.mjs +1 -1
  24. package/components/MazPicker.mjs +1 -1
  25. package/components/MazSelect.d.ts +7 -2
  26. package/components/MazSelect.mjs +1 -1
  27. package/components/MazTable.mjs +1 -1
  28. package/components/assets/MazAnimatedCounter.css +1 -1
  29. package/components/assets/MazAnimatedElement.css +1 -0
  30. package/components/assets/MazAnimatedText.css +1 -0
  31. package/components/assets/MazBtn.css +1 -1
  32. package/components/assets/MazChecklist.css +1 -1
  33. package/components/assets/MazCircularProgressBar.css +1 -1
  34. package/components/assets/MazInputNumber.css +1 -1
  35. package/components/assets/MazInputTags.css +1 -1
  36. package/components/assets/MazPagination.css +1 -1
  37. package/components/assets/MazPhoneNumberInput.css +1 -1
  38. package/components/assets/MazPicker.css +1 -1
  39. package/components/assets/MazSelect.css +1 -1
  40. package/components/chunks/{MazBottomSheet-CMqzf-dT.mjs → MazBottomSheet-CNFupuJS.mjs} +1 -1
  41. package/components/chunks/{MazBtn-S7EnZYtZ.mjs → MazBtn-BJNzz7YT.mjs} +3 -3
  42. package/components/chunks/{MazBtn-DCyFSkZo.mjs → MazBtn-BO1U1gVG.mjs} +3 -3
  43. package/components/chunks/MazBtn-BugQGoO-.mjs +103 -0
  44. package/components/chunks/{MazBtn-DsGaq_eB.mjs → MazBtn-CKDJOBcC.mjs} +2 -2
  45. package/components/chunks/{MazBtn-B16x1gSu.mjs → MazBtn-CP-m-KDm.mjs} +3 -3
  46. package/components/chunks/{MazBtn-CvB-Sf2r.mjs → MazBtn-CUoFOAML.mjs} +3 -3
  47. package/components/chunks/{MazBtn-Cf-LPT5p.mjs → MazBtn-Cyn7ObTB.mjs} +3 -3
  48. package/components/chunks/{MazBtn-BcrrOaO_.mjs → MazBtn-D53RC3KP.mjs} +3 -3
  49. package/components/chunks/{MazBtn-DETtZdlj.mjs → MazBtn-DYURBZtp.mjs} +2 -2
  50. package/components/chunks/{MazBtn-B7cg2yO2.mjs → MazBtn-DiYly5sp.mjs} +3 -3
  51. package/components/chunks/{MazBtn-CPwCJ1l-.mjs → MazBtn-Dlx6nLm2.mjs} +3 -3
  52. package/components/chunks/{MazBtn-BvIoLKMM.mjs → MazBtn-MJYP-poo.mjs} +3 -3
  53. package/components/chunks/{MazBtn-DnJzOPh9.mjs → MazBtn-MvFibIXn.mjs} +3 -3
  54. package/components/chunks/{MazBtn-C5sb0470.mjs → MazBtn-tS9ACNLi.mjs} +3 -3
  55. package/components/chunks/{MazCard-l54W3CUU.mjs → MazCard-D-q6vhWd.mjs} +1 -1
  56. package/components/chunks/{MazCarousel-C16E1i1T.mjs → MazCarousel-Z4XypOn_.mjs} +1 -1
  57. package/components/chunks/{MazCheckbox-DKM-G0Pw.mjs → MazCheckbox-BImOZ1aM.mjs} +1 -1
  58. package/components/chunks/{MazCheckbox-CEsAHbdi.mjs → MazCheckbox-DJi0g4uK.mjs} +1 -1
  59. package/components/chunks/{MazCheckbox-D-7-TdgO.mjs → MazCheckbox-DafMJoEw.mjs} +1 -1
  60. package/components/chunks/{MazChecklist-y4axtsRX.mjs → MazChecklist-DaEf6wix.mjs} +50 -49
  61. package/components/chunks/{MazDialog-DQXX2APp.mjs → MazDialog-PVsds2Mw.mjs} +1 -1
  62. package/components/chunks/{MazDialogPromise-CD1d5ig-.mjs → MazDialogPromise-BdtiOZGU.mjs} +2 -2
  63. package/components/chunks/{MazDrawer-BqNLfW4e.mjs → MazDrawer-CMHe_JEh.mjs} +1 -1
  64. package/components/chunks/{MazDropdown-DNXKdC_3.mjs → MazDropdown-DpGSAqe0.mjs} +1 -1
  65. package/components/chunks/{MazGallery-CzlKPQFX.mjs → MazGallery-BtuCo-H0.mjs} +2 -2
  66. package/components/chunks/{MazIcon-BIoDsehI.mjs → MazIcon-Bnebkvf6.mjs} +1 -1
  67. package/components/chunks/MazIcon-C7ZMosGw.mjs +4 -0
  68. package/components/chunks/{MazInput-yBii2AFS.mjs → MazInput-C3QweR84.mjs} +1 -1
  69. package/components/chunks/{MazInput-BWtGbtW0.mjs → MazInput-DjvBbUZl.mjs} +2 -2
  70. package/components/chunks/{MazInput-DB4HtpCQ.mjs → MazInput-DvaaM9Iq.mjs} +2 -2
  71. package/components/chunks/{MazInputNumber-DqnLi9-C.mjs → MazInputNumber-D904Pg1R.mjs} +2 -2
  72. package/components/chunks/{MazInputPrice-Ca8mL53M.mjs → MazInputPrice-CQiJFPWB.mjs} +1 -1
  73. package/components/chunks/{MazInputTags-Bto9dVQq.mjs → MazInputTags-BPSG1X1a.mjs} +2 -2
  74. package/components/chunks/{MazLink-DlUG7E5K.mjs → MazLink-DnnBkVEE.mjs} +1 -1
  75. package/components/chunks/{MazLoadingBar-DBt1Ltm5.mjs → MazLoadingBar-Dm14PSs6.mjs} +1 -1
  76. package/components/chunks/{MazPagination-sxkvTajI.mjs → MazPagination-CuCKS1Qr.mjs} +2 -2
  77. package/components/chunks/{MazPhoneNumberInput-ovuoYxd9.mjs → MazPhoneNumberInput-CKpP3yWz.mjs} +379 -378
  78. package/components/chunks/{MazPicker-B_IP-4P3.mjs → MazPicker-g10_1sY_.mjs} +3 -3
  79. package/components/chunks/{MazPickerMonthSwitcher-BmHHmSvo.mjs → MazPickerMonthSwitcher-BDxk_Msi.mjs} +1 -1
  80. package/components/chunks/{MazPickerShortcuts-BSgRCAAD.mjs → MazPickerShortcuts-DtHvsdEW.mjs} +1 -1
  81. package/components/chunks/{MazPickerYearSwitcher-Cy-WbilD.mjs → MazPickerYearSwitcher-DXkaTXFw.mjs} +1 -1
  82. package/components/chunks/{MazSelect-CBaOs6va.mjs → MazSelect-VAPsGKXy.mjs} +193 -192
  83. package/components/chunks/{MazSelect-BwahUlbE.mjs → MazSelect-cthYMQqx.mjs} +277 -276
  84. package/components/chunks/MazSpinner-94rvbsAk.mjs +34 -0
  85. package/components/chunks/{MazSpinner-D6PdYOcD.mjs → MazSpinner-B5j5EaKc.mjs} +1 -1
  86. package/components/chunks/MazSpinner-BLh6PkZJ.mjs +34 -0
  87. package/components/chunks/MazSpinner-Ba5WXlbx.mjs +34 -0
  88. package/components/chunks/MazSpinner-C2mutMJX.mjs +34 -0
  89. package/components/chunks/{MazSpinner-Bb1BgWPD.mjs → MazSpinner-C7TbmneX.mjs} +1 -1
  90. package/components/chunks/MazSpinner-CcshuKK9.mjs +34 -0
  91. package/components/chunks/{MazSpinner-CizL97Q2.mjs → MazSpinner-D2J_jdkK.mjs} +1 -1
  92. package/components/chunks/{MazSpinner-Bs089W1b.mjs → MazSpinner-DIzWfhcT.mjs} +1 -1
  93. package/components/chunks/{MazSpinner-Bpkl7q5u.mjs → MazSpinner-DLR4lVAu.mjs} +1 -1
  94. package/components/chunks/MazSpinner-DP019rLG.mjs +34 -0
  95. package/components/chunks/{MazSpinner-Bc-lfBcQ.mjs → MazSpinner-DXCofnqs.mjs} +1 -1
  96. package/components/chunks/MazSpinner-DmeOhZXm.mjs +34 -0
  97. package/components/chunks/{MazSpinner-Cmy2WyWY.mjs → MazSpinner-DtFpBxRT.mjs} +1 -1
  98. package/components/chunks/{MazSpinner-CCThMV5o.mjs → MazSpinner-SnOek826.mjs} +1 -1
  99. package/components/chunks/MazSpinner-ZDRUpUqo.mjs +34 -0
  100. package/components/chunks/{MazSpinner-BVQYjLWp.mjs → MazSpinner-qRqfN8k4.mjs} +1 -1
  101. package/components/chunks/{MazTable-Soe-MrTW.mjs → MazTable-BuFlCw1p.mjs} +1 -1
  102. package/components/chunks/{MazTableCell-DtoO9MOe.mjs → MazTableCell-C6oDOvNH.mjs} +1 -1
  103. package/components/chunks/{MazTableRow-ChFMulaU.mjs → MazTableRow-BBS8sW7w.mjs} +1 -1
  104. package/components/chunks/{MazTableTitle-D8El-v5p.mjs → MazTableTitle-D7J-0k_j.mjs} +1 -1
  105. package/components/chunks/{MazTransitionExpand-CRArAQZu.mjs → MazTransitionExpand-BlcqxvGq.mjs} +1 -1
  106. package/components/index.d.ts +2 -0
  107. package/components/index.mjs +2 -0
  108. package/css/main.css +1 -1
  109. package/modules/assets/MazBtn.css +1 -1
  110. package/modules/chunks/{MazBtn-DoDAW5pU.mjs → MazBtn-BjiQC2PC.mjs} +3 -3
  111. package/modules/chunks/{MazBtn-BXg6oosO.cjs → MazBtn-BnQrui8R.cjs} +1 -1
  112. package/modules/chunks/{MazIcon-DPvxTNIQ.cjs → MazIcon-D4oz63T8.cjs} +1 -1
  113. package/modules/chunks/{MazIcon-0i0FnfM4.mjs → MazIcon-DwFVj44O.mjs} +1 -1
  114. package/modules/chunks/{MazSpinner-Bkl2lVff.mjs → MazSpinner-7nqeVBxW.mjs} +1 -1
  115. package/modules/chunks/{MazSpinner-n0cEv2AX.cjs → MazSpinner-B18bQ49b.cjs} +1 -1
  116. package/modules/chunks/{index-Dx2ZhWwj.mjs → index-D8S1X6Fy.mjs} +4 -4
  117. package/modules/chunks/{index-pV6oqfJc.cjs → index-IBifh-oY.cjs} +2 -2
  118. package/modules/index.cjs +1 -1
  119. package/modules/index.mjs +1 -1
  120. package/nuxt/index.d.mts +1 -1
  121. package/nuxt/index.d.ts +1 -1
  122. package/nuxt/index.json +1 -1
  123. package/nuxt/index.mjs +1 -1
  124. package/package.json +1 -1
  125. package/types/components/MazAnimatedCounter.vue.d.ts +6 -0
  126. package/types/components/MazAnimatedElement.vue.d.ts +37 -0
  127. package/types/components/MazAnimatedText.vue.d.ts +50 -0
  128. package/types/components/MazChecklist.vue.d.ts +9 -4
  129. package/types/components/MazSelect.vue.d.ts +7 -2
  130. package/types/components/index.d.ts +2 -0
  131. package/components/chunks/MazBtn-CuIeT4TK.mjs +0 -103
  132. package/components/chunks/MazIcon-Gv6n6i4M.mjs +0 -4
  133. package/components/chunks/MazSpinner-BqgAfyh1.mjs +0 -34
  134. package/components/chunks/MazSpinner-C1Rr3w9l.mjs +0 -34
  135. package/components/chunks/MazSpinner-CBHbVSef.mjs +0 -34
  136. package/components/chunks/MazSpinner-Da-bE-KC.mjs +0 -34
  137. package/components/chunks/MazSpinner-DoFpeVcl.mjs +0 -34
  138. package/components/chunks/MazSpinner-Dx-3_EFZ.mjs +0 -34
  139. package/components/chunks/MazSpinner-PXSS3XT3.mjs +0 -34
  140. package/components/chunks/MazSpinner-vDZ0VOEK.mjs +0 -34
@@ -1,11 +1,11 @@
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({
1
+ import { computed as p, useId as Te, defineComponent as be, defineAsyncComponent as L, ref as V, onMounted as Ee, useSlots as Oe, openBlock as m, createElementBlock as k, normalizeClass as M, normalizeStyle as ee, unref as g, toDisplayString as Q, createCommentVNode as b, createElementVNode as E, renderSlot as H, createBlock as $, resolveDynamicComponent as ve, withDirectives as ge, mergeProps as ze, toHandlers as Ne, vModelDynamic as De, createTextVNode as Fe, withModifiers as F, withCtx as te, createVNode as P, onBeforeMount as Pe, nextTick as ue, Transition as He, Fragment as ye, renderList as qe } from "vue";
2
+ import '../assets/MazSelect.css';function ke({
3
3
  componentName: u,
4
4
  providedId: r
5
5
  }) {
6
- return p(() => r ?? `${u}-${Me().replace(/:/g, "")}`);
6
+ return p(() => r ?? `${u}-${Te().replace(/:/g, "")}`);
7
7
  }
8
- const qe = {
8
+ const Ue = {
9
9
  removeAccents: !0,
10
10
  caseSensitive: !1,
11
11
  replaceSpaces: !0,
@@ -16,7 +16,7 @@ const qe = {
16
16
  customNormalizationForms: ["NFC", "NFKD"]
17
17
  };
18
18
  function oe(u, r) {
19
- const l = { ...qe, ...r }, t = {
19
+ const l = { ...Ue, ...r }, t = {
20
20
  À: "A",
21
21
  Á: "A",
22
22
  Â: "A",
@@ -66,86 +66,86 @@ function oe(u, r) {
66
66
  ó: "o"
67
67
  };
68
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);
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, (c) => t[c] || c), 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 c of l.customNormalizationForms)
71
+ s = s.normalize(c);
72
72
  return s;
73
73
  }
74
- function Ue(u, r) {
74
+ function We(u, r) {
75
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
76
+ for (let c = 0; c <= l; c++)
77
+ s[c] = [c];
78
+ for (let c = 0; c <= t; c++)
79
+ s[0][c] = c;
80
+ for (let c = 1; c <= l; c++)
81
+ for (let y = 1; y <= t; y++) {
82
+ const S = u[c - 1] === r[y - 1] ? 0 : 1;
83
+ s[c][y] = Math.min(
84
+ s[c - 1][y] + 1,
85
+ s[c][y - 1] + 1,
86
+ s[c - 1][y - 1] + S
87
87
  );
88
88
  }
89
89
  return s[l][t];
90
90
  }
91
- function ke(u, r) {
92
- const l = Ue(u, r), t = Math.max(u.length, r.length);
91
+ function Ve(u, r) {
92
+ const l = We(u, r), t = Math.max(u.length, r.length);
93
93
  return 1 - l / t;
94
94
  }
95
- function We(u, r, l = 0.75) {
96
- return ke(u, r) >= l;
95
+ function je(u, r, l = 0.75) {
96
+ return Ve(u, r) >= l;
97
97
  }
98
98
  function re(u, r, l = 0.75) {
99
99
  const t = p(
100
100
  () => oe(typeof u == "string" ? u : u.value)
101
101
  ), s = p(
102
102
  () => oe(typeof r == "string" ? r : r.value)
103
- ), d = p(() => typeof l == "number" ? l : l.value), v = p(() => ke(t.value, s.value));
103
+ ), c = p(() => typeof l == "number" ? l : l.value), y = p(() => Ve(t.value, s.value));
104
104
  return {
105
105
  isMatching: p(
106
- () => We(t.value, s.value, d.value)
106
+ () => je(t.value, s.value, c.value)
107
107
  ),
108
- score: v
108
+ score: y
109
109
  };
110
110
  }
111
- function Ve(u, r, l) {
112
- var v, S;
111
+ function Ie(u, r, l) {
112
+ var y, S;
113
113
  u.stopPropagation();
114
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;
115
+ let c = !1;
116
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;
117
+ for (const O of s)
118
+ if (!c && u.target instanceof HTMLElement) {
119
+ const z = (y = document.querySelector(O)) == null ? void 0 : y.getAttribute("id");
120
+ c = (u.target.getAttribute("id") === z || ((S = document.querySelector(O)) == null ? void 0 : S.contains(u.target))) ?? !1;
121
121
  }
122
122
  }
123
- !r.contains(u.target) && !d && (t == null || t(u));
123
+ !r.contains(u.target) && !c && (t == null || t(u));
124
124
  }
125
- function Ie() {
125
+ function we() {
126
126
  return document.ontouchstart === null ? "touchstart" : "click";
127
127
  }
128
- function je(u, r) {
129
- const l = Ie();
130
- document.removeEventListener(l, (t) => Ve(t, u, r));
131
- }
132
128
  function Qe(u, r) {
129
+ const l = we();
130
+ document.removeEventListener(l, (t) => Ie(t, u, r));
131
+ }
132
+ function Re(u, r) {
133
133
  if (typeof r.value != "function" && typeof r.value == "object" && typeof r.value.handler != "function") {
134
134
  console.error("[maz-ui](vClosable) v-closable directive requires a handler function");
135
135
  return;
136
136
  }
137
- const l = Ie();
138
- document.addEventListener(l, (t) => Ve(t, u, r));
137
+ const l = we();
138
+ document.addEventListener(l, (t) => Ie(t, u, r));
139
139
  }
140
- const Re = {
141
- mounted: Qe,
142
- unmounted: je
140
+ const Ge = {
141
+ mounted: Re,
142
+ unmounted: Qe
143
143
  };
144
- let de = null;
145
- function Ge(u, r) {
146
- de && clearTimeout(de), de = setTimeout(u, r);
147
- }
144
+ let ce = null;
148
145
  function Ze(u, r) {
146
+ ce && clearTimeout(ce), ce = setTimeout(u, r);
147
+ }
148
+ function Je(u, r) {
149
149
  let l;
150
150
  return function(...t) {
151
151
  clearTimeout(l), l = setTimeout(() => {
@@ -153,13 +153,13 @@ function Ze(u, r) {
153
153
  }, r);
154
154
  };
155
155
  }
156
- const Je = ["for"], Xe = {
156
+ const Xe = ["for"], Ye = {
157
157
  key: 0,
158
158
  class: "m-input-wrapper-left"
159
- }, Ye = ["id", "name", "placeholder", "aria-label", "type", "inputmode", "disabled", "readonly", "autocomplete", "required"], xe = { key: 0 }, _e = {
159
+ }, xe = ["id", "name", "placeholder", "aria-label", "type", "inputmode", "disabled", "readonly", "autocomplete", "required"], _e = { key: 0 }, et = {
160
160
  key: 1,
161
161
  class: "m-input-wrapper-right"
162
- }, et = /* @__PURE__ */ be({
162
+ }, tt = /* @__PURE__ */ be({
163
163
  inheritAttrs: !1,
164
164
  __name: "MazInput",
165
165
  props: {
@@ -200,15 +200,15 @@ const Je = ["for"], Xe = {
200
200
  },
201
201
  emits: ["update:model-value", "focus", "blur", "click", "change", "input"],
202
202
  setup(u, { emit: r }) {
203
- const l = u, t = r, s = $(() => import("./MazBtn-DCyFSkZo.mjs")), d = $(() => import("./MazIcon-Cq1v4J3r.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
+ const l = u, t = r, s = L(() => import("./MazBtn-D53RC3KP.mjs")), c = L(() => import("./MazIcon-Cq1v4J3r.mjs")), y = L(() => import("./eye-slash-BoO00xzs.mjs")), S = L(() => import("./eye-f8zAUc30.mjs")), O = L(() => import("./check-C9Q_W85g.mjs")), z = V(!1), f = V(!1), N = V(), R = ke({
204
204
  componentName: "MazInput",
205
205
  providedId: l.id
206
206
  });
207
- Te(() => {
207
+ Ee(() => {
208
208
  var o;
209
209
  l.autoFocus && ((o = N.value) == null || o.focus());
210
210
  });
211
- const J = p(() => l.type === "password"), le = p(() => z.value ? "text" : l.type), I = p(() => {
211
+ const G = p(() => l.type === "password"), le = p(() => z.value ? "text" : l.type), I = p(() => {
212
212
  if (!l.noBorder) {
213
213
  if (l.error)
214
214
  return "maz-border-danger";
@@ -236,51 +236,51 @@ const Je = ["for"], Xe = {
236
236
  }
237
237
  return "--default-border";
238
238
  }
239
- }), W = Ee(), X = p(() => {
240
- const { required: o, placeholder: g } = l;
241
- if (g)
242
- return o ? `${g} *` : g;
243
- }), Y = p(() => M.value !== void 0 && M.value !== ""), C = Ze(
239
+ }), q = Oe(), Z = p(() => {
240
+ const { required: o, placeholder: v } = l;
241
+ if (v)
242
+ return o ? `${v} *` : v;
243
+ }), J = p(() => K.value !== void 0 && K.value !== ""), X = Je(
244
244
  (o) => {
245
245
  t("update:model-value", o);
246
246
  },
247
247
  typeof l.debounce == "number" ? l.debounce : l.debounceDelay ?? 500
248
248
  );
249
- function P(o) {
249
+ function T(o) {
250
250
  if (l.debounce)
251
- return C(o);
251
+ return X(o);
252
252
  t("update:model-value", o);
253
253
  }
254
- const M = p({
254
+ const K = p({
255
255
  get: () => l.modelValue,
256
- set: (o) => P(o)
257
- }), j = p(() => (!!l.label || !!l.hint) && (f.value || !!Y.value || !!l.placeholder || ["date", "month", "week"].includes(l.type))), x = p(() => !!l.label || !!l.hint);
258
- function _() {
259
- return !!W["right-icon"] || J.value || !!W["valid-button"] || l.validButton || !!l.rightIcon;
256
+ set: (o) => T(o)
257
+ }), Y = p(() => (!!l.label || !!l.hint) && (f.value || !!J.value || !!l.placeholder || ["date", "month", "week"].includes(l.type))), U = p(() => !!l.label || !!l.hint);
258
+ function x() {
259
+ return !!q["right-icon"] || G.value || !!q["valid-button"] || l.validButton || !!l.rightIcon;
260
260
  }
261
- function L() {
262
- return !!W["left-icon"] || !!l.leftIcon;
261
+ function _() {
262
+ return !!q["left-icon"] || !!l.leftIcon;
263
263
  }
264
- function Q(o) {
264
+ function B(o) {
265
265
  t("focus", o), f.value = !0;
266
266
  }
267
- function ae(o) {
267
+ function W(o) {
268
268
  t("blur", o), f.value = !1;
269
269
  }
270
- function ne(o) {
270
+ function ae(o) {
271
271
  return t("change", o);
272
272
  }
273
- function T(o) {
273
+ function ne(o) {
274
274
  return t("input", o);
275
275
  }
276
- return (o, g) => (m(), k(
276
+ return (o, v) => (m(), k(
277
277
  "div",
278
278
  {
279
- class: B(["m-input", [
279
+ class: M(["m-input", [
280
280
  {
281
281
  "--is-focused": f.value || o.borderActive,
282
- "--should-up": j.value,
283
- "--has-label": x.value,
282
+ "--should-up": Y.value,
283
+ "--has-label": U.value,
284
284
  "--is-disabled": o.disabled,
285
285
  "--is-readonly": o.readonly,
286
286
  "--has-z-2": o.error || o.warning || o.success,
@@ -295,13 +295,13 @@ const Je = ["for"], Xe = {
295
295
  [
296
296
  o.topLabel ? (m(), k("label", {
297
297
  key: 0,
298
- for: h(Z),
298
+ for: g(R),
299
299
  class: "m-input-top-label"
300
- }, G(o.topLabel), 9, Je)) : b("v-if", !0),
301
- O(
300
+ }, Q(o.topLabel), 9, Xe)) : b("v-if", !0),
301
+ E(
302
302
  "div",
303
303
  {
304
- class: B(["m-input-wrapper m-reset-css", [
304
+ class: M(["m-input-wrapper m-reset-css", [
305
305
  o.inputClasses,
306
306
  I.value,
307
307
  o.roundedSize ? `--rounded-${o.roundedSize}` : { "maz-rounded": !o.noRadius },
@@ -309,30 +309,30 @@ const Je = ["for"], Xe = {
309
309
  ]])
310
310
  },
311
311
  [
312
- L() ? (m(), k("div", Xe, [
313
- o.$slots["left-icon"] || o.leftIcon ? U(o.$slots, "left-icon", { key: 0 }, () => [
314
- typeof o.leftIcon == "string" ? (m(), A(h(d), {
312
+ _() ? (m(), k("div", Ye, [
313
+ o.$slots["left-icon"] || o.leftIcon ? H(o.$slots, "left-icon", { key: 0 }, () => [
314
+ typeof o.leftIcon == "string" ? (m(), $(g(c), {
315
315
  key: 0,
316
316
  name: o.leftIcon,
317
317
  class: "maz-text-xl maz-text-muted"
318
- }, null, 8, ["name"])) : o.leftIcon ? (m(), A(me(o.leftIcon), {
318
+ }, null, 8, ["name"])) : o.leftIcon ? (m(), $(ve(o.leftIcon), {
319
319
  key: 1,
320
320
  class: "maz-text-xl maz-text-muted"
321
321
  })) : b("v-if", !0)
322
322
  ], !0) : b("v-if", !0)
323
323
  ])) : b("v-if", !0),
324
- O(
324
+ E(
325
325
  "div",
326
326
  {
327
- class: B(["m-input-wrapper-input", [`--${o.size}`, { "--top-label": !!o.topLabel }]])
327
+ class: M(["m-input-wrapper-input", [`--${o.size}`, { "--top-label": !!o.topLabel }]])
328
328
  },
329
329
  [
330
- he(O("input", ge({ id: h(Z) }, o.$attrs, {
330
+ ge(E("input", ze({ id: g(R) }, o.$attrs, {
331
331
  ref_key: "input",
332
332
  ref: N,
333
- "onUpdate:modelValue": g[0] || (g[0] = (E) => M.value = E),
333
+ "onUpdate:modelValue": v[0] || (v[0] = (C) => K.value = C),
334
334
  name: o.name,
335
- placeholder: X.value,
335
+ placeholder: Z.value,
336
336
  "aria-label": o.label || o.placeholder,
337
337
  type: le.value,
338
338
  inputmode: o.inputmode,
@@ -341,21 +341,21 @@ const Je = ["for"], Xe = {
341
341
  autocomplete: o.autocomplete,
342
342
  required: o.required,
343
343
  class: "m-input-input"
344
- }, Oe({
345
- blur: ae,
346
- focus: Q,
347
- change: ne,
348
- input: T
344
+ }, Ne({
345
+ blur: W,
346
+ focus: B,
347
+ change: ae,
348
+ input: ne
349
349
  }, !0), {
350
- onClick: g[1] || (g[1] = (E) => o.$emit("click", E))
351
- }), null, 16, Ye), [
352
- [De, M.value]
350
+ onClick: v[1] || (v[1] = (C) => o.$emit("click", C))
351
+ }), null, 16, xe), [
352
+ [De, K.value]
353
353
  ]),
354
354
  o.label || o.hint ? (m(), k(
355
355
  "span",
356
356
  {
357
357
  key: 0,
358
- class: B(["m-input-label", [
358
+ class: M(["m-input-label", [
359
359
  {
360
360
  "maz-text-danger-600": o.error,
361
361
  "maz-text-success-600": o.success,
@@ -364,12 +364,12 @@ const Je = ["for"], Xe = {
364
364
  ]])
365
365
  },
366
366
  [
367
- Ne(
368
- G(o.hint || o.label) + " ",
367
+ Fe(
368
+ Q(o.hint || o.label) + " ",
369
369
  1
370
370
  /* TEXT */
371
371
  ),
372
- o.required ? (m(), k("sup", xe, "*")) : b("v-if", !0)
372
+ o.required ? (m(), k("sup", _e, "*")) : b("v-if", !0)
373
373
  ],
374
374
  2
375
375
  /* CLASS */
@@ -378,29 +378,29 @@ const Je = ["for"], Xe = {
378
378
  2
379
379
  /* CLASS */
380
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), {
381
+ x() ? (m(), k("div", et, [
382
+ o.$slots["right-icon"] || o.rightIcon ? H(o.$slots, "right-icon", { key: 0 }, () => [
383
+ typeof o.rightIcon == "string" ? (m(), $(g(c), {
384
384
  key: 0,
385
385
  name: o.rightIcon,
386
386
  class: "maz-text-xl maz-text-muted"
387
- }, null, 8, ["name"])) : o.rightIcon ? (m(), A(me(o.rightIcon), {
387
+ }, null, 8, ["name"])) : o.rightIcon ? (m(), $(ve(o.rightIcon), {
388
388
  key: 1,
389
389
  class: "maz-text-xl maz-text-muted"
390
390
  })) : b("v-if", !0)
391
391
  ], !0) : b("v-if", !0),
392
- J.value ? (m(), A(h(s), {
392
+ G.value ? (m(), $(g(s), {
393
393
  key: 1,
394
394
  color: "transparent",
395
395
  tabindex: "-1",
396
396
  size: "mini",
397
- onClick: g[2] || (g[2] = H((E) => z.value = !z.value, ["stop"]))
397
+ onClick: v[2] || (v[2] = F((C) => z.value = !z.value, ["stop"]))
398
398
  }, {
399
399
  default: te(() => [
400
- z.value ? (m(), A(h(v), {
400
+ z.value ? (m(), $(g(y), {
401
401
  key: 0,
402
402
  class: "maz-text-xl maz-text-muted"
403
- })) : (m(), A(h(S), {
403
+ })) : (m(), $(g(S), {
404
404
  key: 1,
405
405
  class: "maz-text-xl maz-text-muted"
406
406
  }))
@@ -408,8 +408,8 @@ const Je = ["for"], Xe = {
408
408
  _: 1
409
409
  /* STABLE */
410
410
  })) : b("v-if", !0),
411
- o.$slots["valid-button"] || o.validButton ? U(o.$slots, "valid-button", { key: 2 }, () => [
412
- q(h(s), {
411
+ o.$slots["valid-button"] || o.validButton ? H(o.$slots, "valid-button", { key: 2 }, () => [
412
+ P(g(s), {
413
413
  color: "transparent",
414
414
  disabled: o.disabled,
415
415
  tabindex: "-1",
@@ -419,7 +419,7 @@ const Je = ["for"], Xe = {
419
419
  type: "submit"
420
420
  }, {
421
421
  default: te(() => [
422
- q(h(D), { class: "maz-text-2xl maz-text-normal" })
422
+ P(g(O), { class: "maz-text-2xl maz-text-normal" })
423
423
  ]),
424
424
  _: 1
425
425
  /* STABLE */
@@ -434,7 +434,7 @@ const Je = ["for"], Xe = {
434
434
  "div",
435
435
  {
436
436
  key: 1,
437
- class: B(["m-input-bottom-text", [
437
+ class: M(["m-input-bottom-text", [
438
438
  {
439
439
  "maz-text-danger-600": o.error,
440
440
  "maz-text-success-600": o.success,
@@ -443,7 +443,7 @@ const Je = ["for"], Xe = {
443
443
  }
444
444
  ]])
445
445
  },
446
- G(o.assistiveText),
446
+ Q(o.assistiveText),
447
447
  3
448
448
  /* TEXT, CLASS */
449
449
  )) : b("v-if", !0)
@@ -452,16 +452,16 @@ const Je = ["for"], Xe = {
452
452
  /* CLASS, STYLE */
453
453
  ));
454
454
  }
455
- }), we = (u, r) => {
455
+ }), Se = (u, r) => {
456
456
  const l = u.__vccOpts || u;
457
457
  for (const [t, s] of r)
458
458
  l[t] = s;
459
459
  return l;
460
- }, ye = /* @__PURE__ */ we(et, [["__scopeId", "data-v-04e832e5"]]), tt = ["aria-label"], ot = { class: "m-select-list__no-results" }, lt = {
460
+ }, he = /* @__PURE__ */ Se(tt, [["__scopeId", "data-v-04e832e5"]]), ot = ["aria-label"], lt = { class: "m-select-list__no-results" }, at = {
461
461
  key: 2,
462
462
  class: "m-select-list__scroll-wrapper",
463
463
  tabindex: "-1"
464
- }, at = { class: "m-select-list-optgroup" }, nt = ["onClick"], st = /* @__PURE__ */ be({
464
+ }, nt = { class: "m-select-list-optgroup" }, st = ["onClick"], it = /* @__PURE__ */ be({
465
465
  inheritAttrs: !1,
466
466
  __name: "MazSelect",
467
467
  props: {
@@ -483,6 +483,7 @@ const Je = ["for"], Xe = {
483
483
  color: { default: "primary" },
484
484
  search: { type: Boolean },
485
485
  searchPlaceholder: { default: "Search in options" },
486
+ searchFunction: {},
486
487
  searchThreshold: { default: 0.75 },
487
488
  open: { type: Boolean },
488
489
  multiple: { type: Boolean, default: void 0 },
@@ -494,33 +495,33 @@ const Je = ["for"], Xe = {
494
495
  },
495
496
  emits: ["close", "open", "blur", "focus", "change", "input", "update:model-value", "selected-option"],
496
497
  setup(u, { expose: r, emit: l }) {
497
- const t = u, s = l, d = $(() => import("./MazCheckbox-CEsAHbdi.mjs")), v = $(() => import("./magnifying-glass--nBiyXot.mjs")), S = $(() => import("./chevron-down-BkvtON3b.mjs")), D = $(() => import("./no-symbol-CIgKzsrB.mjs"));
498
+ const t = u, s = l, c = L(() => import("./MazCheckbox-DJi0g4uK.mjs")), y = L(() => import("./magnifying-glass--nBiyXot.mjs")), S = L(() => import("./chevron-down-BkvtON3b.mjs")), O = L(() => import("./no-symbol-CIgKzsrB.mjs"));
498
499
  r({
499
500
  /** Method to open the option list */
500
- openList: R,
501
+ openList: j,
501
502
  /** Method to close the option list */
502
- closeList: F
503
+ closeList: D
503
504
  });
504
505
  const z = V(!1), f = V(), N = p(
505
506
  () => ["black", "transparent", "white"].includes(t.color)
506
- ), Z = p(
507
+ ), R = p(
507
508
  () => N.value ? "var(--maz-color-black)" : `var(--maz-color-${t.color}-800)`
508
- ), J = p(
509
+ ), G = p(
509
510
  () => N.value ? "var(--maz-color-muted)" : `var(--maz-color-${t.color}-100)`
510
511
  ), le = p(
511
512
  () => N.value ? "var(--maz-color-muted)" : `var(--maz-color-${t.color}-200)`
512
- ), I = p(() => z.value || t.open), W = ze({
513
+ ), I = p(() => z.value || t.open), q = ke({
513
514
  componentName: "MazSelect",
514
515
  providedId: t.id
515
516
  });
516
- function X(e) {
517
+ function Z(e) {
517
518
  return {
518
519
  [t.optionValueKey]: e,
519
520
  [t.optionLabelKey]: e,
520
521
  [t.optionInputValueKey]: e
521
522
  };
522
523
  }
523
- function Y(e) {
524
+ function J(e) {
524
525
  return {
525
526
  ...e,
526
527
  [t.optionValueKey]: e[t.optionValueKey],
@@ -528,136 +529,136 @@ const Je = ["for"], Xe = {
528
529
  [t.optionInputValueKey]: e[t.optionInputValueKey]
529
530
  };
530
531
  }
531
- const C = p(() => {
532
- var n;
533
- const e = [];
534
- if (!((n = t.options) != null && n.length))
532
+ function X(e) {
533
+ const a = [];
534
+ if (!(e != null && e.length))
535
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)
536
+ for (const n of e)
537
+ typeof n == "string" || typeof n == "number" || typeof n == "boolean" ? a.push(Z(n)) : typeof n == "object" && "options" in n && Array.isArray(n.options) ? a.push(
538
+ { label: n.label, isOptGroup: !0 },
539
+ ...n.options.map(
540
+ (i) => typeof i == "string" || typeof i == "number" || typeof i == "boolean" ? Z(i) : J(i)
541
541
  )
542
- ) : e.push(Y(a));
543
- return e;
544
- }), P = p(
542
+ ) : a.push(J(n));
543
+ return a;
544
+ }
545
+ const T = p(() => X(t.options ?? [])), K = p(
545
546
  () => {
546
547
  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
+ return ((e = T.value) == null ? void 0 : e.filter((a) => t.multiple ? Array.isArray(t.modelValue) ? t.modelValue.includes(a[t.optionValueKey]) && !B(a[t.optionValueKey]) : !1 : t.modelValue === a[t.optionValueKey] && !B(a[t.optionValueKey]))) ?? [];
548
549
  }
549
550
  );
550
551
  Pe(() => {
551
552
  var e;
552
553
  (e = t.options) != null && e.length || console.warn("[maz-ui](MazSelect) you must provide options"), ie();
553
554
  });
554
- const M = V(), j = V(), x = V(), _ = V();
555
- function L(e) {
555
+ const Y = V(), U = V(), x = V(), _ = V();
556
+ function B(e) {
556
557
  return e == null;
557
558
  }
558
- function Q(e) {
559
- var a;
560
- return (((a = P.value) == null ? void 0 : a.some(
559
+ function W(e) {
560
+ var n;
561
+ return (((n = K.value) == null ? void 0 : n.some(
561
562
  (i) => i[t.optionValueKey] === e[t.optionValueKey]
562
- )) ?? !1) && !L(e[t.optionValueKey]);
563
+ )) ?? !1) && !B(e[t.optionValueKey]);
563
564
  }
564
565
  const ae = p(() => {
565
- var n;
566
+ var a;
566
567
  if (t.multiple && t.modelValue && Array.isArray(t.modelValue))
567
568
  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];
569
+ (n) => {
570
+ var i, d;
571
+ return (d = (i = T.value) == null ? void 0 : i.find((h) => h[t.optionValueKey] === n)) == null ? void 0 : d[t.optionInputValueKey];
571
572
  }
572
573
  ).join(", ");
573
- const e = (n = C.value) == null ? void 0 : n.find(
574
- (a) => a[t.optionValueKey] === t.modelValue
574
+ const e = (a = T.value) == null ? void 0 : a.find(
575
+ (n) => n[t.optionValueKey] === t.modelValue
575
576
  );
576
- return L(t.modelValue) || e == null ? void 0 : e[t.optionInputValueKey];
577
+ return B(t.modelValue) || e == null ? void 0 : e[t.optionInputValueKey];
577
578
  }), ne = p(
578
579
  () => 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));
580
+ ), o = V(""), v = V("");
581
+ function C(e, a) {
582
+ return a && e && oe(e).includes(oe(a));
582
583
  }
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;
584
+ function de(e) {
585
+ var a;
586
+ return e ? (a = T.value) == null ? void 0 : a.filter((n) => {
587
+ const i = n[t.optionLabelKey], d = n[t.optionValueKey], h = n[t.optionInputValueKey], w = t.searchThreshold;
588
+ return C(i, e) || C(h, e) || C(d, e) || typeof i == "string" && re(i, e, w).isMatching.value || typeof h == "string" && re(h, e, w).isMatching.value || typeof d == "string" && re(d, e, w).isMatching.value;
589
+ }) : T.value;
589
590
  }
590
- const K = p(() => E(T.value));
591
- async function F(e) {
592
- var a, i;
591
+ const A = p(() => t.searchFunction && t.search && o.value ? X(t.searchFunction(o.value, t.options ?? []) ?? []) : de(o.value));
592
+ async function D(e) {
593
+ var n, i;
593
594
  if (!I.value)
594
595
  return;
595
- if (e && ("relatedTarget" in e && ((a = M.value) != null && a.contains(e.relatedTarget)) || e.type === "keydown"))
596
+ if (e && ("relatedTarget" in e && ((n = Y.value) != null && n.contains(e.relatedTarget)) || e.type === "keydown"))
596
597
  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}`))
598
+ const a = e && "relatedTarget" in e && e.relatedTarget instanceof HTMLElement && e.relatedTarget.getAttribute("id");
599
+ if ((i = t.excludeSelectors) != null && i.includes(`#${a}`))
599
600
  return e == null ? void 0 : e.preventDefault();
600
601
  await ue(), z.value = !1, f.value = 0, s("close", e);
601
602
  }
602
- async function R(e) {
603
+ async function j(e) {
603
604
  t.disabled || I.value || (e == null || e.preventDefault(), z.value = !0, await se(), s("focus", e), s("open", z.value));
604
605
  }
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"));
606
+ function pe() {
607
+ var e, a;
608
+ (a = ((e = U.value) == null ? void 0 : e.$el).querySelector("input")) == null || a.focus();
612
609
  }
613
- function Ke(e) {
614
- z.value ? F(e) : ce();
610
+ function Ke() {
611
+ var e, a;
612
+ (a = ((e = U.value) == null ? void 0 : e.$el).querySelector("input")) == null || a.dispatchEvent(new Event("input"));
615
613
  }
616
614
  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();
615
+ z.value ? D(e) : pe();
619
616
  }
620
617
  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);
618
+ var a, n;
619
+ o.value = e, (n = ((a = x.value) == null ? void 0 : a.$el).querySelector("input")) == null || n.focus();
629
620
  }
630
621
  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);
622
+ var n;
623
+ e === "Backspace" && v.value.length > 0 ? v.value = v.value.slice(0, -1) : v.value += e;
624
+ const a = de(v.value);
625
+ a != null && a.length && (f.value = (n = A.value) == null ? void 0 : n.findIndex(
626
+ (i) => i[t.optionValueKey] === a[0][t.optionValueKey]
627
+ ), typeof f.value == "number" && f.value >= 0 && se(f.value)), Ze(() => {
628
+ v.value = "";
629
+ }, 1e3);
633
630
  }
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);
631
+ function Be(e) {
632
+ const a = e.key;
633
+ /^[\dA-Za-z\u0400-\u04FF]$/.test(a) ? (e.preventDefault(), j(e), t.search ? $e(a) : Le(a)) : fe(e);
637
634
  }
638
- function Be(e, n) {
639
- var c;
635
+ function fe(e, a = !0) {
636
+ const n = e.code, i = ["ArrowUp", "ArrowDown"].includes(n), d = (a ? ["Enter", "Space"] : ["Enter"]).includes(n), h = n === "Escape" && I.value;
637
+ i ? Ce(e, f.value) : d ? Me(e, f.value) : h && D(e);
638
+ }
639
+ function Ce(e, a) {
640
+ var d;
640
641
  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));
642
+ const n = e.code;
643
+ I.value || j(e);
644
+ const i = (d = A.value) == null ? void 0 : d.length;
645
+ i && (typeof a == "number" ? a === i - 1 && n === "ArrowDown" ? f.value = 0 : a === 0 && n === "ArrowUp" ? f.value = i - 1 : f.value = n === "ArrowDown" ? a + 1 : a - 1 : f.value = n === "ArrowDown" ? 0 : i - 1, se(f.value));
645
646
  }
646
- function Ce(e, n) {
647
- var i, c, y;
647
+ function Me(e, a) {
648
+ var i, d, h;
648
649
  if (!I.value)
649
650
  return;
650
651
  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);
652
+ const n = a ? ((i = A.value) == null ? void 0 : i[a]) ?? ((d = A.value) == null ? void 0 : d[0]) : (h = A.value) == null ? void 0 : h[0];
653
+ B(n) || me(n);
653
654
  }
654
655
  async function se(e) {
655
- var a, i;
656
+ var n, i;
656
657
  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({
658
+ const a = e ?? f.value;
659
+ if (typeof a == "number" && a >= 0) {
660
+ const d = (n = _.value) == null ? void 0 : n.querySelectorAll(".m-select-list-item");
661
+ (i = d == null ? void 0 : d[a]) == null || i.scrollIntoView({
661
662
  behavior: "auto",
662
663
  block: "nearest",
663
664
  inline: "start"
@@ -665,43 +666,43 @@ const Je = ["for"], Xe = {
665
666
  }
666
667
  }
667
668
  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];
669
+ var n;
670
+ const a = (n = A.value) == null ? void 0 : n.findIndex((i) => {
671
+ var d, h;
672
+ return t.multiple && Array.isArray(t.modelValue) ? e ? e[t.optionValueKey] === i[t.optionValueKey] : [...t.modelValue].reverse()[0] === i[t.optionValueKey] : ((h = (d = K.value) == null ? void 0 : d[0]) == null ? void 0 : h[t.optionValueKey]) === i[t.optionValueKey];
672
673
  });
673
- f.value = n && n >= 0 ? n : 0;
674
+ f.value = a && a >= 0 ? a : 0;
674
675
  }
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(
676
+ function me(e, a = !0) {
677
+ var h;
678
+ a && !t.multiple && ue(() => D()), o.value = "";
679
+ const n = (h = K.value) == null ? void 0 : h.some(
679
680
  (w) => w[t.optionValueKey] === e[t.optionValueKey]
680
681
  );
681
- let i = P.value;
682
- a && t.multiple ? i = i == null ? void 0 : i.filter(
682
+ let i = K.value;
683
+ n && t.multiple ? i = i == null ? void 0 : i.filter(
683
684
  (w) => w[t.optionValueKey] !== e[t.optionValueKey]
684
685
  ) : 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();
686
+ const d = i.map((w) => w[t.optionValueKey]);
687
+ s("update:model-value", t.multiple ? d : d[0]), s("selected-option", e), Ke(), ie(e), pe();
687
688
  }
688
- return (e, n) => he((m(), k(
689
+ return (e, a) => ge((m(), k(
689
690
  "div",
690
691
  {
691
692
  ref_key: "mazSelectElement",
692
- ref: M,
693
- class: B(["m-select m-reset-css", [
693
+ ref: Y,
694
+ class: M(["m-select m-reset-css", [
694
695
  { "--is-open": I.value, "--disabled": e.disabled, "--block": e.block },
695
696
  t.class,
696
697
  `--${e.size}`
697
698
  ]]),
698
- style: ee([e.style, { "--keyboard-selected-bg-color": le.value, "--selected-bg-color": J.value, "--selected-text-color": Z.value }])
699
+ style: ee([e.style, { "--keyboard-selected-bg-color": le.value, "--selected-bg-color": G.value, "--selected-text-color": R.value }])
699
700
  },
700
701
  [
701
- q(ye, ge({
702
- id: h(W),
702
+ P(he, ze({
703
+ id: g(q),
703
704
  ref_key: "mazInputComponent",
704
- ref: j,
705
+ ref: U,
705
706
  class: "m-select-input"
706
707
  }, e.$attrs, {
707
708
  required: e.required,
@@ -712,36 +713,36 @@ const Je = ["for"], Xe = {
712
713
  block: "",
713
714
  autocomplete: e.autocomplete,
714
715
  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
716
+ onFocus: F(j, ["prevent", "stop"]),
717
+ onBlur: F(D, ["prevent", "stop"]),
718
+ onClick: F(j, ["prevent", "stop"]),
719
+ onChange: a[0] || (a[0] = (n) => s("change", n)),
720
+ onInput: a[1] || (a[1] = (n) => s("input", n)),
721
+ onKeydown: Be
721
722
  }), {
722
723
  "right-icon": te(() => [
723
- O("button", {
724
+ E("button", {
724
725
  tabindex: "-1",
725
726
  type: "button",
726
727
  class: "m-select-input__toggle-button maz-custom",
727
728
  "aria-label": `${I.value ? "collapse" : "expand"} list of options`,
728
- onClick: H(Ke, ["stop"])
729
+ onClick: F(Ae, ["stop"])
729
730
  }, [
730
- q(h(S), { class: "m-select-chevron maz-text-xl" })
731
- ], 8, tt)
731
+ P(g(S), { class: "m-select-chevron maz-text-xl" })
732
+ ], 8, ot)
732
733
  ]),
733
734
  _: 1
734
735
  /* STABLE */
735
736
  }, 16, ["id", "required", "border-active", "color", "model-value", "size", "autocomplete", "disabled"]),
736
- q(Fe, { name: ne.value }, {
737
+ P(He, { name: ne.value }, {
737
738
  default: te(() => [
738
739
  I.value ? (m(), k(
739
740
  "div",
740
741
  {
741
742
  key: 0,
742
- ref_key: "optionsListElement",
743
+ ref_key: "optionListElement",
743
744
  ref: _,
744
- class: B(["m-select-list", {
745
+ class: M(["m-select-list", {
745
746
  "--top": e.listPosition.includes("top"),
746
747
  "--left": e.listPosition.includes("left"),
747
748
  "--right": e.listPosition.includes("right"),
@@ -755,14 +756,14 @@ const Je = ["for"], Xe = {
755
756
  })
756
757
  },
757
758
  [
758
- e.search ? (m(), A(ye, {
759
+ e.search ? (m(), $(he, {
759
760
  key: 0,
760
761
  ref_key: "searchInputComponent",
761
762
  ref: x,
762
- modelValue: T.value,
763
+ modelValue: o.value,
763
764
  "onUpdate:modelValue": [
764
- n[2] || (n[2] = (a) => T.value = a),
765
- n[4] || (n[4] = (a) => f.value = 0)
765
+ a[2] || (a[2] = (n) => o.value = n),
766
+ a[4] || (a[4] = (n) => f.value = 0)
766
767
  ],
767
768
  size: "sm",
768
769
  color: e.color,
@@ -773,29 +774,29 @@ const Je = ["for"], Xe = {
773
774
  autocomplete: "off",
774
775
  tabindex: "-1",
775
776
  class: "m-select-list__search-input maz-flex-none",
776
- "left-icon": h(v),
777
- onKeydown: n[3] || (n[3] = (a) => pe(a, !1))
777
+ "left-icon": g(y),
778
+ onKeydown: a[3] || (a[3] = (n) => fe(n, !1))
778
779
  }, 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" })
780
+ !A.value || A.value.length <= 0 ? H(e.$slots, "no-results", { key: 1 }, () => [
781
+ E("span", lt, [
782
+ P(g(O), { class: "maz-h-6 maz-w-6 maz-text-normal" })
782
783
  ])
783
- ], !0) : (m(), k("div", lt, [
784
+ ], !0) : (m(), k("div", at, [
784
785
  (m(!0), k(
785
- ve,
786
+ ye,
786
787
  null,
787
- He(K.value, (a, i) => (m(), k(
788
- ve,
788
+ qe(A.value, (n, i) => (m(), k(
789
+ ye,
789
790
  { key: i },
790
791
  [
791
- a.label && a.isOptGroup ? U(e.$slots, "optgroup", {
792
+ n.label && n.isOptGroup ? H(e.$slots, "optgroup", {
792
793
  key: 0,
793
- label: a.label
794
+ label: n.label
794
795
  }, () => [
795
- O(
796
+ E(
796
797
  "span",
797
- at,
798
- G(a.label),
798
+ nt,
799
+ Q(n.label),
799
800
  1
800
801
  /* TEXT */
801
802
  )
@@ -803,36 +804,36 @@ const Je = ["for"], Xe = {
803
804
  key: 1,
804
805
  tabindex: "-1",
805
806
  type: "button",
806
- class: B(["m-select-list-item maz-custom maz-flex-none", [
807
+ class: M(["m-select-list-item maz-custom maz-flex-none", [
807
808
  {
808
809
  "--is-keyboard-selected": f.value === i,
809
- "--is-selected": Q(a),
810
- "--is-none-value": L(a[e.optionValueKey])
810
+ "--is-selected": W(n),
811
+ "--is-none-value": B(n[e.optionValueKey])
811
812
  }
812
813
  ]]),
813
814
  style: ee(e.itemHeight ? { height: `${e.itemHeight}px` } : void 0),
814
- onClick: H((c) => fe(a), ["prevent", "stop"])
815
+ onClick: F((d) => me(n), ["prevent", "stop"])
815
816
  }, [
816
- e.multiple ? (m(), A(h(d), {
817
+ e.multiple ? (m(), $(g(c), {
817
818
  key: 0,
818
819
  tabindex: "-1",
819
- "model-value": Q(a),
820
+ "model-value": W(n),
820
821
  size: "sm",
821
822
  color: e.color
822
823
  }, null, 8, ["model-value", "color"])) : b("v-if", !0),
823
- U(e.$slots, "default", {
824
- option: a,
825
- isSelected: Q(a)
824
+ H(e.$slots, "default", {
825
+ option: n,
826
+ isSelected: W(n)
826
827
  }, () => [
827
- O(
828
+ E(
828
829
  "span",
829
830
  null,
830
- G(a[e.optionLabelKey]),
831
+ Q(n[e.optionLabelKey]),
831
832
  1
832
833
  /* TEXT */
833
834
  )
834
835
  ], !0)
835
- ], 14, nt))
836
+ ], 14, st))
836
837
  ],
837
838
  64
838
839
  /* STABLE_FRAGMENT */
@@ -853,15 +854,15 @@ const Je = ["for"], Xe = {
853
854
  6
854
855
  /* CLASS, STYLE */
855
856
  )), [
856
- [h(Re), {
857
+ [g(Ge), {
857
858
  exclude: e.excludeSelectors,
858
- handler: F
859
+ handler: D
859
860
  }]
860
861
  ]);
861
862
  }
862
- }), ut = /* @__PURE__ */ we(st, [["__scopeId", "data-v-0050f306"]]);
863
+ }), rt = /* @__PURE__ */ Se(it, [["__scopeId", "data-v-98157b75"]]);
863
864
  export {
864
- ut as M,
865
- we as _,
866
- ze as u
865
+ rt as M,
866
+ Se as _,
867
+ ke as u
867
868
  };