maz-ui 3.31.0 → 3.31.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 (37) hide show
  1. package/README.md +6 -6
  2. package/components/MazAccordion.d.ts +2 -2
  3. package/components/MazAccordion.mjs +1 -1
  4. package/components/MazDropdown.d.ts +2 -2
  5. package/components/MazDropdown.mjs +16 -16
  6. package/components/MazPhoneNumberInput.mjs +1 -1
  7. package/components/MazSelect.d.ts +2 -2
  8. package/components/MazSelect.mjs +1 -1
  9. package/components/MazTable.d.ts +8 -0
  10. package/components/MazTable.mjs +1 -1
  11. package/components/assets/MazAccordion.css +1 -1
  12. package/components/assets/MazPhoneNumberInput.css +1 -1
  13. package/components/assets/MazSelect.css +1 -1
  14. package/components/assets/MazTable.css +1 -1
  15. package/components/chunks/{MazAccordion-wRHTLK7X.mjs → MazAccordion-3KSb_aBw.mjs} +37 -37
  16. package/components/chunks/{MazBtn-bL_VYiL1.mjs → MazBtn-M7Pnxit5.mjs} +2 -2
  17. package/components/chunks/{MazBtn-A_B9pbiE.mjs → MazBtn-WsXG0JB8.mjs} +2 -2
  18. package/components/chunks/{MazCheckbox-eI5DclIt.mjs → MazCheckbox-4gr5TnSK.mjs} +1 -1
  19. package/components/chunks/{MazCheckbox-GE-RvDQj.mjs → MazCheckbox-EadIf3L9.mjs} +1 -1
  20. package/components/chunks/{MazIcon-icjrWrvA.mjs → MazIcon-002AxbwZ.mjs} +1 -1
  21. package/components/chunks/{MazPhoneNumberInput-BiFGrTa7.mjs → MazPhoneNumberInput-TdklZIjq.mjs} +155 -159
  22. package/components/chunks/{MazSelect-nwyPkcJ-.mjs → MazSelect-ABbMoI-M.mjs} +173 -177
  23. package/components/chunks/{MazSpinner-Q96BIyG0.mjs → MazSpinner-1Sy8XBOO.mjs} +1 -1
  24. package/components/chunks/{MazSpinner-OKizZUdU.mjs → MazSpinner-B2tSR6e8.mjs} +1 -1
  25. package/components/chunks/{MazSpinner-LpsGR4tG.mjs → MazSpinner-eGQPU8Yp.mjs} +1 -1
  26. package/components/chunks/{MazSpinner-kv0RbQpi.mjs → MazSpinner-liomP-Gb.mjs} +1 -1
  27. package/components/chunks/{MazTable-rnu9lv5r.mjs → MazTable-4_j2qksi.mjs} +611 -610
  28. package/nuxt/index.json +1 -1
  29. package/nuxt/index.mjs +2 -2
  30. package/nuxt/types.d.mts +2 -2
  31. package/package.json +4 -4
  32. package/resolvers/unplugin-vue-components-resolver.d.ts +1 -1
  33. package/types/components/MazAccordion.vue.d.ts +2 -2
  34. package/types/components/MazDropdown.vue.d.ts +2 -2
  35. package/types/components/MazSelect.vue.d.ts +2 -2
  36. package/types/components/MazTable.vue.d.ts +8 -0
  37. package/types/resolvers/unplugin-vue-components-resolver.d.ts +1 -1
@@ -1,10 +1,10 @@
1
1
  import "../assets/MazSelect.css";
2
- import { computed as i, defineComponent as pe, defineAsyncComponent as w, ref as f, getCurrentInstance as me, onMounted as Ie, useSlots as Ke, openBlock as u, createElementBlock as V, normalizeClass as T, normalizeStyle as G, createElementVNode as P, createCommentVNode as d, renderSlot as O, createBlock as C, unref as v, resolveDynamicComponent as de, withDirectives as Be, mergeProps as fe, toHandlers as Ce, vModelDynamic as $e, createTextVNode as Se, toDisplayString as ve, withModifiers as H, withCtx as J, createVNode as L, useCssVars as Le, onBeforeMount as Ae, Transition as De, Fragment as Me, renderList as Te, nextTick as ne } from "vue";
2
+ import { computed as i, defineComponent as pe, defineAsyncComponent as I, ref as f, getCurrentInstance as me, onMounted as Ie, useSlots as Ke, openBlock as u, createElementBlock as V, normalizeClass as T, normalizeStyle as G, createElementVNode as P, createCommentVNode as d, renderSlot as O, createBlock as w, unref as v, resolveDynamicComponent as de, withDirectives as Be, mergeProps as fe, toHandlers as Ce, vModelDynamic as $e, createTextVNode as Se, toDisplayString as ve, withModifiers as E, withCtx as J, createVNode as M, useCssVars as Le, onBeforeMount as Ae, Transition as De, Fragment as Me, renderList as Te, nextTick as ne } from "vue";
3
3
  function Pe(y, p) {
4
4
  let b;
5
- return function(...I) {
5
+ return function(...K) {
6
6
  clearTimeout(b), b = setTimeout(() => {
7
- y.apply(this, I);
7
+ y.apply(this, K);
8
8
  }, p);
9
9
  };
10
10
  }
@@ -15,7 +15,7 @@ const ye = ({
15
15
  }) => i(() => b ?? `${y}-${p == null ? void 0 : p.uid}`), Ne = {
16
16
  key: 0,
17
17
  class: "m-input-wrapper-left"
18
- }, qe = { class: "m-input-wrapper-input" }, Fe = ["id", "type", "name", "inputmode", "placeholder", "aria-label", "disabled", "readonly", "required"], Ee = { key: 0 }, He = {
18
+ }, qe = { class: "m-input-wrapper-input" }, Fe = ["id", "type", "name", "inputmode", "placeholder", "aria-label", "disabled", "readonly", "required"], He = { key: 0 }, Ee = {
19
19
  key: 1,
20
20
  class: "m-input-wrapper-right"
21
21
  }, Oe = /* @__PURE__ */ pe({
@@ -54,16 +54,16 @@ const ye = ({
54
54
  },
55
55
  emits: ["focus", "blur", "update:model-value", "click", "change"],
56
56
  setup(y, { emit: p }) {
57
- const b = w(() => import("./MazBtn-A_B9pbiE.mjs")), I = w(() => import("./MazIcon-C329_2BT.mjs")), N = w(() => import("./eye-slash-rdPLIzFI.mjs")), X = w(() => import("./eye-3jm1b22X.mjs")), Y = w(() => import("./check-_5Up9njX.mjs")), t = y, h = p, z = f(!1), s = f(!1), A = f(), x = me(), _ = ye({
57
+ const b = I(() => import("./MazBtn-WsXG0JB8.mjs")), K = I(() => import("./MazIcon-C329_2BT.mjs")), N = I(() => import("./eye-slash-rdPLIzFI.mjs")), X = I(() => import("./eye-3jm1b22X.mjs")), Y = I(() => import("./check-_5Up9njX.mjs")), t = y, h = p, z = f(!1), s = f(!1), L = f(), x = me(), _ = ye({
58
58
  componentName: "MazInput",
59
59
  instance: x,
60
60
  providedId: t.id
61
61
  });
62
62
  Ie(() => {
63
- var o;
64
- t.autoFocus && ((o = A.value) == null || o.focus());
63
+ var l;
64
+ t.autoFocus && ((l = L.value) == null || l.focus());
65
65
  });
66
- const U = i(() => t.type === "password"), K = i(() => z.value ? "text" : t.type), ee = i(() => {
66
+ const U = i(() => t.type === "password"), B = i(() => z.value ? "text" : t.type), ee = i(() => {
67
67
  if (!t.noBorder) {
68
68
  if (t.error)
69
69
  return "maz-border-danger";
@@ -91,60 +91,60 @@ const ye = ({
91
91
  }
92
92
  return "--default-border";
93
93
  }
94
- }), k = Ke(), D = i(() => {
95
- const { required: o, placeholder: m } = t;
94
+ }), k = Ke(), A = i(() => {
95
+ const { required: l, placeholder: m } = t;
96
96
  if (m)
97
- return o ? `${m} *` : m;
97
+ return l ? `${m} *` : m;
98
98
  }), W = i(() => t.modelValue !== void 0 && t.modelValue !== ""), q = i({
99
99
  get: () => t.modelValue,
100
- set: (o) => j(o)
101
- }), Q = i(() => (!!t.label || !!t.hint) && (s.value || !!W.value || !!t.placeholder || ["date", "month", "week"].includes(t.type))), R = i(() => !!t.label || !!t.hint), $ = () => !!k["right-icon"] || U.value || !!k["valid-button"] || t.validButton || !!t.rightIcon, F = () => !!k["left-icon"] || !!t.leftIcon, te = (o) => {
102
- h("focus", o), s.value = !0;
103
- }, oe = (o) => {
104
- h("blur", o), s.value = !1;
105
- }, S = (o) => h("change", o), B = Pe((o) => {
106
- h("update:model-value", o);
107
- }, t.debounceDelay), j = (o) => {
100
+ set: (l) => j(l)
101
+ }), Q = i(() => (!!t.label || !!t.hint) && (s.value || !!W.value || !!t.placeholder || ["date", "month", "week"].includes(t.type))), R = i(() => !!t.label || !!t.hint), $ = () => !!k["right-icon"] || U.value || !!k["valid-button"] || t.validButton || !!t.rightIcon, F = () => !!k["left-icon"] || !!t.leftIcon, te = (l) => {
102
+ h("focus", l), s.value = !0;
103
+ }, oe = (l) => {
104
+ h("blur", l), s.value = !1;
105
+ }, S = (l) => h("change", l), C = Pe((l) => {
106
+ h("update:model-value", l);
107
+ }, t.debounceDelay), j = (l) => {
108
108
  if (t.debounce)
109
- return B(o);
110
- h("update:model-value", o);
109
+ return C(l);
110
+ h("update:model-value", l);
111
111
  };
112
- return (o, m) => (u(), V(
112
+ return (l, m) => (u(), V(
113
113
  "div",
114
114
  {
115
115
  class: T(["m-input", [
116
116
  {
117
- "--is-focused": s.value || o.borderActive,
117
+ "--is-focused": s.value || l.borderActive,
118
118
  "--should-up": Q.value,
119
119
  "--has-label": R.value,
120
- "--is-disabled": o.disabled,
121
- "--is-readonly": o.readonly,
122
- "--has-z-2": o.error || o.warning || o.success,
123
- "--has-state": o.error || o.warning || o.success
120
+ "--is-disabled": l.disabled,
121
+ "--is-readonly": l.readonly,
122
+ "--has-z-2": l.error || l.warning || l.success,
123
+ "--has-state": l.error || l.warning || l.success
124
124
  },
125
125
  t.class,
126
- `--${o.color}`,
127
- `--${o.size}`
126
+ `--${l.color}`,
127
+ `--${l.size}`
128
128
  ]]),
129
- style: G(o.style)
129
+ style: G(l.style)
130
130
  },
131
131
  [
132
132
  P(
133
133
  "div",
134
134
  {
135
- class: T(["m-input-wrapper", [o.inputClasses, ee.value, { "maz-rounded": !o.noRadius }]])
135
+ class: T(["m-input-wrapper", [l.inputClasses, ee.value, { "maz-rounded": !l.noRadius }]])
136
136
  },
137
137
  [
138
138
  F() ? (u(), V("div", Ne, [
139
139
  d(`
140
140
  @slot left-icon - The icon to display on the left of the input
141
141
  `),
142
- o.$slots["left-icon"] || o.leftIcon ? O(o.$slots, "left-icon", { key: 0 }, () => [
143
- typeof o.leftIcon == "string" ? (u(), C(v(I), {
142
+ l.$slots["left-icon"] || l.leftIcon ? O(l.$slots, "left-icon", { key: 0 }, () => [
143
+ typeof l.leftIcon == "string" ? (u(), w(v(K), {
144
144
  key: 0,
145
- name: o.leftIcon,
145
+ name: l.leftIcon,
146
146
  class: "maz-text-xl maz-text-muted"
147
- }, null, 8, ["name"])) : o.leftIcon ? (u(), C(de(o.leftIcon), {
147
+ }, null, 8, ["name"])) : l.leftIcon ? (u(), w(de(l.leftIcon), {
148
148
  key: 1,
149
149
  class: "maz-text-xl maz-text-muted"
150
150
  })) : d("v-if", !0)
@@ -154,78 +154,78 @@ const ye = ({
154
154
  Be(P("input", fe({
155
155
  id: v(_),
156
156
  ref_key: "input",
157
- ref: A,
157
+ ref: L,
158
158
  "onUpdate:modelValue": m[0] || (m[0] = (c) => q.value = c),
159
- type: K.value,
160
- name: o.name
161
- }, o.$attrs, {
162
- inputmode: o.inputmode,
163
- placeholder: D.value,
164
- "aria-label": o.label || o.placeholder,
165
- disabled: o.disabled,
166
- readonly: o.readonly,
167
- required: o.required,
159
+ type: B.value,
160
+ name: l.name
161
+ }, l.$attrs, {
162
+ inputmode: l.inputmode,
163
+ placeholder: A.value,
164
+ "aria-label": l.label || l.placeholder,
165
+ disabled: l.disabled,
166
+ readonly: l.readonly,
167
+ required: l.required,
168
168
  class: "m-input-input"
169
169
  }, Ce({
170
170
  blur: oe,
171
171
  focus: te,
172
172
  change: S
173
173
  }, !0), {
174
- onClick: m[1] || (m[1] = (c) => o.$emit("click", c))
174
+ onClick: m[1] || (m[1] = (c) => l.$emit("click", c))
175
175
  }), null, 16, Fe), [
176
176
  [$e, q.value]
177
177
  ]),
178
- o.label || o.hint ? (u(), V(
178
+ l.label || l.hint ? (u(), V(
179
179
  "span",
180
180
  {
181
181
  key: 0,
182
182
  ref: "label",
183
183
  class: T(["m-input-label", [
184
184
  {
185
- "maz-text-danger-600": o.error,
186
- "maz-text-success-600": o.success,
187
- "maz-text-warning-600": o.warning
185
+ "maz-text-danger-600": l.error,
186
+ "maz-text-success-600": l.success,
187
+ "maz-text-warning-600": l.warning
188
188
  }
189
189
  ]])
190
190
  },
191
191
  [
192
192
  Se(
193
- ve(o.hint || o.label) + " ",
193
+ ve(l.hint || l.label) + " ",
194
194
  1
195
195
  /* TEXT */
196
196
  ),
197
- o.required ? (u(), V("sup", Ee, "*")) : d("v-if", !0)
197
+ l.required ? (u(), V("sup", He, "*")) : d("v-if", !0)
198
198
  ],
199
199
  2
200
200
  /* CLASS */
201
201
  )) : d("v-if", !0)
202
202
  ]),
203
- $() ? (u(), V("div", He, [
203
+ $() ? (u(), V("div", Ee, [
204
204
  d(`
205
205
  @slot right-icon - The icon to display on the right of the input
206
206
  `),
207
- o.$slots["right-icon"] || o.rightIcon ? O(o.$slots, "right-icon", { key: 0 }, () => [
208
- typeof o.rightIcon == "string" ? (u(), C(v(I), {
207
+ l.$slots["right-icon"] || l.rightIcon ? O(l.$slots, "right-icon", { key: 0 }, () => [
208
+ typeof l.rightIcon == "string" ? (u(), w(v(K), {
209
209
  key: 0,
210
- name: o.rightIcon,
210
+ name: l.rightIcon,
211
211
  class: "maz-text-xl maz-text-muted"
212
- }, null, 8, ["name"])) : o.rightIcon ? (u(), C(de(o.rightIcon), {
212
+ }, null, 8, ["name"])) : l.rightIcon ? (u(), w(de(l.rightIcon), {
213
213
  key: 1,
214
214
  class: "maz-text-xl maz-text-muted"
215
215
  })) : d("v-if", !0)
216
216
  ], !0) : d("v-if", !0),
217
- U.value ? (u(), C(v(b), {
217
+ U.value ? (u(), w(v(b), {
218
218
  key: 1,
219
219
  color: "transparent",
220
220
  tabindex: "-1",
221
221
  size: "mini",
222
- onClick: m[2] || (m[2] = H((c) => z.value = !z.value, ["stop"]))
222
+ onClick: m[2] || (m[2] = E((c) => z.value = !z.value, ["stop"]))
223
223
  }, {
224
224
  default: J(() => [
225
- z.value ? (u(), C(v(N), {
225
+ z.value ? (u(), w(v(N), {
226
226
  key: 0,
227
227
  class: "maz-text-xl maz-text-muted"
228
- })) : (u(), C(v(X), {
228
+ })) : (u(), w(v(X), {
229
229
  key: 1,
230
230
  class: "maz-text-xl maz-text-muted"
231
231
  }))
@@ -236,18 +236,18 @@ const ye = ({
236
236
  d(`
237
237
  @slot valid-button - Replace the valid button by your own
238
238
  `),
239
- o.$slots["valid-button"] || o.validButton ? O(o.$slots, "valid-button", { key: 2 }, () => [
240
- L(v(b), {
239
+ l.$slots["valid-button"] || l.validButton ? O(l.$slots, "valid-button", { key: 2 }, () => [
240
+ M(v(b), {
241
241
  color: "transparent",
242
- disabled: o.disabled,
242
+ disabled: l.disabled,
243
243
  tabindex: "-1",
244
- loading: o.validButtonLoading,
244
+ loading: l.validButtonLoading,
245
245
  class: "m-input-valid-button",
246
246
  size: "mini",
247
247
  type: "submit"
248
248
  }, {
249
249
  default: J(() => [
250
- L(v(Y), { class: "maz-text-2xl maz-text-normal" })
250
+ M(v(Y), { class: "maz-text-2xl maz-text-normal" })
251
251
  ]),
252
252
  _: 1
253
253
  /* STABLE */
@@ -265,8 +265,8 @@ const ye = ({
265
265
  }
266
266
  }), be = (y, p) => {
267
267
  const b = y.__vccOpts || y;
268
- for (const [I, N] of p)
269
- b[I] = N;
268
+ for (const [K, N] of p)
269
+ b[K] = N;
270
270
  return b;
271
271
  }, ce = /* @__PURE__ */ be(Oe, [["__scopeId", "data-v-e9e7fe2d"]]);
272
272
  f("system");
@@ -275,15 +275,11 @@ let se = null;
275
275
  function Ue(y, p) {
276
276
  se && clearTimeout(se), se = setTimeout(y, p);
277
277
  }
278
- const We = {
279
- key: 0,
280
- tabindex: "-1",
281
- class: "m-select-list__search-wrapper"
282
- }, Qe = { class: "m-select-list__no-results" }, Re = {
278
+ const We = { class: "m-select-list__no-results" }, Qe = {
283
279
  key: 2,
284
280
  class: "m-select-list__scroll-wrapper",
285
281
  tabindex: "-1"
286
- }, je = ["onClick"], Ze = /* @__PURE__ */ pe({
282
+ }, Re = ["onClick"], je = /* @__PURE__ */ pe({
287
283
  inheritAttrs: !1,
288
284
  __name: "MazSelect",
289
285
  props: {
@@ -296,7 +292,7 @@ const We = {
296
292
  optionLabelKey: { default: "label" },
297
293
  optionInputValueKey: { default: "label" },
298
294
  listPosition: { default: "bottom left" },
299
- itemHeight: { default: 42 },
295
+ itemHeight: { default: void 0 },
300
296
  maxListHeight: { default: 240 },
301
297
  maxListWidth: { default: void 0 },
302
298
  size: { default: "md" },
@@ -311,39 +307,40 @@ const We = {
311
307
  emits: ["close", "open", "blur", "focus", "change", "update:model-value", "selected-option"],
312
308
  setup(y, { emit: p }) {
313
309
  Le((e) => ({
314
- c5a22ee8: U.value,
315
- "166b564b": x.value,
316
- "123f3f73": _.value
310
+ "5e7d1dfe": U.value,
311
+ b3b9ed86: x.value,
312
+ "55cb06e5": _.value
317
313
  }));
318
- const b = w(() => import("./MazCheckbox-GE-RvDQj.mjs")), I = w(() => import("./magnifying-glass-ebhrla2J.mjs")), N = w(() => import("./chevron-down-bC0s_0yH.mjs")), X = w(() => import("./no-symbol-JnXtUaU-.mjs")), Y = me(), t = y, h = p, z = f(!1), s = f(), A = i(
314
+ const b = I(() => import("./MazCheckbox-EadIf3L9.mjs")), K = I(() => import("./magnifying-glass-ebhrla2J.mjs")), N = I(() => import("./chevron-down-bC0s_0yH.mjs")), X = I(() => import("./no-symbol-JnXtUaU-.mjs")), Y = me(), t = y, h = p, z = f(!1), s = f(), L = i(
319
315
  () => ["black", "transparent", "white"].includes(t.color)
320
316
  ), x = i(
321
- () => A.value ? "var(--maz-color-black)" : `var(--maz-color-${t.color}-800)`
317
+ () => L.value ? "var(--maz-color-black)" : `var(--maz-color-${t.color}-800)`
322
318
  ), _ = i(
323
- () => A.value ? "var(--maz-color-muted)" : `var(--maz-color-${t.color}-100)`
319
+ () => L.value ? "var(--maz-color-muted)" : `var(--maz-color-${t.color}-100)`
324
320
  ), U = i(
325
- () => A.value ? "var(--maz-color-muted)" : `var(--maz-color-${t.color}-200)`
326
- ), K = i(() => z.value || t.open), ee = ye({
321
+ () => L.value ? "var(--maz-color-muted)" : `var(--maz-color-${t.color}-200)`
322
+ ), B = i(() => z.value || t.open), ee = ye({
327
323
  componentName: "MazSelect",
328
324
  instance: Y,
329
325
  providedId: t.id
330
326
  }), k = i(
331
327
  () => {
332
328
  var e;
333
- return (e = t.options) == null ? void 0 : e.map((l) => typeof l == "string" || typeof l == "number" || typeof l == "boolean" ? {
334
- [t.optionValueKey]: l,
335
- [t.optionLabelKey]: l,
336
- [t.optionInputValueKey]: l
329
+ return (e = t.options) == null ? void 0 : e.map((o) => typeof o == "string" || typeof o == "number" || typeof o == "boolean" ? {
330
+ [t.optionValueKey]: o,
331
+ [t.optionLabelKey]: o,
332
+ [t.optionInputValueKey]: o
337
333
  } : {
338
- [t.optionValueKey]: l[t.optionValueKey],
339
- [t.optionLabelKey]: l[t.optionLabelKey],
340
- [t.optionInputValueKey]: l[t.optionInputValueKey]
334
+ ...o,
335
+ [t.optionValueKey]: o[t.optionValueKey],
336
+ [t.optionLabelKey]: o[t.optionLabelKey],
337
+ [t.optionInputValueKey]: o[t.optionInputValueKey]
341
338
  });
342
339
  }
343
- ), D = i(
340
+ ), A = i(
344
341
  () => {
345
342
  var e;
346
- return ((e = k.value) == null ? void 0 : e.filter((l) => t.multiple ? Array.isArray(t.modelValue) ? t.modelValue.includes(l[t.optionValueKey]) && !$(l[t.optionValueKey]) : !1 : t.modelValue === l[t.optionValueKey] && !$(l[t.optionValueKey]))) ?? [];
343
+ return ((e = k.value) == null ? void 0 : e.filter((o) => t.multiple ? Array.isArray(t.modelValue) ? t.modelValue.includes(o[t.optionValueKey]) && !$(o[t.optionValueKey]) : !1 : t.modelValue === o[t.optionValueKey] && !$(o[t.optionValueKey]))) ?? [];
347
344
  }
348
345
  );
349
346
  Ae(() => {
@@ -353,90 +350,90 @@ const We = {
353
350
  const W = f(), q = f(), Q = f(), R = f(), $ = (e) => e == null;
354
351
  function F(e) {
355
352
  var a;
356
- return (((a = D.value) == null ? void 0 : a.some(
353
+ return (((a = A.value) == null ? void 0 : a.some(
357
354
  (n) => n[t.optionValueKey] === e[t.optionValueKey]
358
355
  )) ?? !1) && !$(e[t.optionValueKey]);
359
356
  }
360
357
  const te = i(() => {
361
- var e, l;
358
+ var e, o;
362
359
  return t.multiple && t.modelValue && Array.isArray(t.modelValue) ? t.modelValue.map(
363
360
  (a) => {
364
361
  var n, r;
365
362
  return (r = (n = k.value) == null ? void 0 : n.find((g) => g[t.optionValueKey] === a)) == null ? void 0 : r[t.optionInputValueKey];
366
363
  }
367
- ).join(", ") : (l = (e = k.value) == null ? void 0 : e.find(
364
+ ).join(", ") : (o = (e = k.value) == null ? void 0 : e.find(
368
365
  (a) => a[t.optionValueKey] === t.modelValue
369
- )) == null ? void 0 : l[t.optionInputValueKey];
366
+ )) == null ? void 0 : o[t.optionInputValueKey];
370
367
  }), oe = i(
371
368
  () => t.listPosition.includes("bottom") ? "maz-slide" : "maz-slideinvert"
372
- ), S = f(""), B = f("");
369
+ ), S = f(""), C = f("");
373
370
  function j(e) {
374
371
  return e.normalize("NFD").replaceAll(/[\u0300-\u036F]/g, "").replaceAll(/[^\dA-Za-z\u0400-\u04FF]/g, "");
375
372
  }
376
- const o = (e, l) => l && e && j(e.toString().toLocaleLowerCase().trim()).includes(
377
- j(l.toLocaleLowerCase().trim())
373
+ const l = (e, o) => o && e && j(e.toString().toLocaleLowerCase().trim()).includes(
374
+ j(o.toLocaleLowerCase().trim())
378
375
  );
379
376
  function m(e) {
380
- var l;
381
- return e ? (l = k.value) == null ? void 0 : l.filter((a) => {
377
+ var o;
378
+ return e ? (o = k.value) == null ? void 0 : o.filter((a) => {
382
379
  const n = a[t.optionLabelKey], r = a[t.optionValueKey], g = a[t.optionInputValueKey];
383
- return o(n, e) || o(r, e) || o(g, e);
380
+ return l(n, e) || l(r, e) || l(g, e);
384
381
  }) : k.value;
385
382
  }
386
383
  const c = i(() => m(S.value)), Z = async (e) => {
387
- var l;
388
- if (e && ("relatedTarget" in e && ((l = W.value) != null && l.contains(e.relatedTarget)) || e.type === "keydown"))
384
+ var o;
385
+ if (e && ("relatedTarget" in e && ((o = W.value) != null && o.contains(e.relatedTarget)) || e.type === "keydown"))
389
386
  return e.preventDefault();
390
387
  await ne(), z.value = !1, s.value = 0, h("close", e);
391
- }, E = async (e) => {
392
- t.disabled || K.value || (e == null || e.preventDefault(), z.value = !0, await le(), h("focus", e), h("open", z.value));
388
+ }, H = async (e) => {
389
+ t.disabled || B.value || (e == null || e.preventDefault(), z.value = !0, await le(), h("focus", e), h("open", z.value));
393
390
  };
394
391
  function re() {
395
- var e, l;
396
- (l = ((e = q.value) == null ? void 0 : e.$el).querySelector("input")) == null || l.focus();
392
+ var e, o;
393
+ (o = ((e = q.value) == null ? void 0 : e.$el).querySelector("input")) == null || o.focus();
397
394
  }
398
395
  function he(e) {
399
396
  z.value ? Z(e) : re();
400
397
  }
401
398
  function ge(e) {
402
- var l, a;
403
- S.value = e, (a = ((l = Q.value) == null ? void 0 : l.$el).querySelector("input")) == null || a.focus();
399
+ var o, a;
400
+ S.value = e, (a = ((o = Q.value) == null ? void 0 : o.$el).querySelector("input")) == null || a.focus();
404
401
  }
405
402
  function ze(e) {
406
403
  var a;
407
- e === "Backspace" && B.value.length > 0 ? B.value = B.value.slice(0, -1) : B.value += e;
408
- const l = m(B.value);
409
- l != null && l.length && (s.value = (a = c.value) == null ? void 0 : a.findIndex(
410
- (n) => n[t.optionValueKey] === l[0][t.optionValueKey]
404
+ e === "Backspace" && C.value.length > 0 ? C.value = C.value.slice(0, -1) : C.value += e;
405
+ const o = m(C.value);
406
+ o != null && o.length && (s.value = (a = c.value) == null ? void 0 : a.findIndex(
407
+ (n) => n[t.optionValueKey] === o[0][t.optionValueKey]
411
408
  ), typeof s.value == "number" && s.value >= 0 && le(s.value)), Ue(() => {
412
- B.value = "";
409
+ C.value = "";
413
410
  }, 1e3);
414
411
  }
415
412
  const Ve = (e) => {
416
- const l = e.key;
417
- /^[\dA-Za-z\u0400-\u04FF]$/.test(l) ? (e.preventDefault(), E(e), t.search ? ge(l) : ze(l)) : ue(e);
413
+ const o = e.key;
414
+ /^[\dA-Za-z\u0400-\u04FF]$/.test(o) ? (e.preventDefault(), H(e), t.search ? ge(o) : ze(o)) : ue(e);
418
415
  }, ue = (e) => {
419
- const l = e.code, a = ["ArrowUp", "ArrowDown"].includes(l), n = ["Enter", "Space"].includes(l), r = l === "Escape" && K.value;
416
+ const o = e.code, a = ["ArrowUp", "ArrowDown"].includes(o), n = ["Enter", "Space"].includes(o), r = o === "Escape" && B.value;
420
417
  a ? ke(e, s.value) : n ? we(e, s.value) : r && Z();
421
- }, ke = (e, l) => {
418
+ }, ke = (e, o) => {
422
419
  var r;
423
420
  e.preventDefault();
424
421
  const a = e.code;
425
- K.value || E(e);
422
+ B.value || H(e);
426
423
  const n = (r = c.value) == null ? void 0 : r.length;
427
- n && (typeof l == "number" ? l === n - 1 && a === "ArrowDown" ? s.value = 0 : l === 0 && a === "ArrowUp" ? s.value = n - 1 : s.value = a === "ArrowDown" ? l + 1 : l - 1 : s.value = a === "ArrowDown" ? 0 : n - 1, le(s.value));
428
- }, we = (e, l) => {
424
+ n && (typeof o == "number" ? o === n - 1 && a === "ArrowDown" ? s.value = 0 : o === 0 && a === "ArrowUp" ? s.value = n - 1 : s.value = a === "ArrowDown" ? o + 1 : o - 1 : s.value = a === "ArrowDown" ? 0 : n - 1, le(s.value));
425
+ }, we = (e, o) => {
429
426
  var n, r, g;
430
- if (e.preventDefault(), !K.value)
431
- return E(e);
432
- const a = l ? ((n = c.value) == null ? void 0 : n[l]) ?? ((r = c.value) == null ? void 0 : r[0]) : (g = c.value) == null ? void 0 : g[0];
427
+ if (e.preventDefault(), !B.value)
428
+ return H(e);
429
+ const a = o ? ((n = c.value) == null ? void 0 : n[o]) ?? ((r = c.value) == null ? void 0 : r[0]) : (g = c.value) == null ? void 0 : g[0];
433
430
  $(a) || ie(a);
434
431
  };
435
432
  async function le(e) {
436
433
  var a, n;
437
434
  await ne(), typeof e != "number" && ae();
438
- const l = e ?? s.value;
439
- typeof l == "number" && l >= 0 && ((n = (a = R.value) == null ? void 0 : a.querySelectorAll(".m-select-list-item")[l]) == null || n.scrollIntoView({
435
+ const o = e ?? s.value;
436
+ typeof o == "number" && o >= 0 && ((n = (a = R.value) == null ? void 0 : a.querySelectorAll(".m-select-list-item")[o]) == null || n.scrollIntoView({
440
437
  behavior: "auto",
441
438
  block: "nearest",
442
439
  inline: "start"
@@ -444,36 +441,36 @@ const We = {
444
441
  }
445
442
  function ae(e) {
446
443
  var a;
447
- const l = (a = c.value) == null ? void 0 : a.findIndex((n) => {
444
+ const o = (a = c.value) == null ? void 0 : a.findIndex((n) => {
448
445
  var r, g;
449
- return t.multiple && Array.isArray(t.modelValue) ? e ? e[t.optionValueKey] === n[t.optionValueKey] : [...t.modelValue].reverse()[0] === n[t.optionValueKey] : ((g = (r = D.value) == null ? void 0 : r[0]) == null ? void 0 : g[t.optionValueKey]) === n[t.optionValueKey];
446
+ return t.multiple && Array.isArray(t.modelValue) ? e ? e[t.optionValueKey] === n[t.optionValueKey] : [...t.modelValue].reverse()[0] === n[t.optionValueKey] : ((g = (r = A.value) == null ? void 0 : r[0]) == null ? void 0 : g[t.optionValueKey]) === n[t.optionValueKey];
450
447
  });
451
- s.value = l && l >= 0 ? l : 0;
448
+ s.value = o && o >= 0 ? o : 0;
452
449
  }
453
- const ie = (e, l = !0) => {
450
+ const ie = (e, o = !0) => {
454
451
  var g;
455
- l && !t.multiple && ne(() => Z()), S.value = "";
456
- const a = (g = D.value) == null ? void 0 : g.some(
457
- (M) => M[t.optionValueKey] === e[t.optionValueKey]
452
+ o && !t.multiple && ne(() => Z()), S.value = "";
453
+ const a = (g = A.value) == null ? void 0 : g.some(
454
+ (D) => D[t.optionValueKey] === e[t.optionValueKey]
458
455
  );
459
- let n = D.value;
456
+ let n = A.value;
460
457
  a && t.multiple ? n = n == null ? void 0 : n.filter(
461
- (M) => M[t.optionValueKey] !== e[t.optionValueKey]
458
+ (D) => D[t.optionValueKey] !== e[t.optionValueKey]
462
459
  ) : t.multiple ? n.push(e) : n = [e];
463
- const r = n.map((M) => M[t.optionValueKey]);
460
+ const r = n.map((D) => D[t.optionValueKey]);
464
461
  h("update:model-value", t.multiple ? r : r[0]), h("selected-option", e), ae(e), re();
465
462
  };
466
- return (e, l) => (u(), V(
463
+ return (e, o) => (u(), V(
467
464
  "div",
468
465
  {
469
466
  ref_key: "mazSelectElement",
470
467
  ref: W,
471
- class: T(["m-select", [{ "--is-open": K.value, "--disabled": e.disabled }, t.class]]),
468
+ class: T(["m-select", [{ "--is-open": B.value, "--disabled": e.disabled }, t.class, `--${e.size}`]]),
472
469
  style: G(e.style),
473
470
  onBlurCapture: Z
474
471
  },
475
472
  [
476
- L(ce, fe({
473
+ M(ce, fe({
477
474
  id: v(ee),
478
475
  ref_key: "mazInputComponent",
479
476
  ref: q,
@@ -486,9 +483,9 @@ const We = {
486
483
  autocomplete: "off",
487
484
  size: e.size,
488
485
  disabled: e.disabled,
489
- onFocus: H(E, ["prevent", "stop"]),
490
- onClick: H(E, ["prevent", "stop"]),
491
- onChange: l[0] || (l[0] = (a) => h("change", a)),
486
+ onFocus: E(H, ["prevent", "stop"]),
487
+ onClick: E(H, ["prevent", "stop"]),
488
+ onChange: o[0] || (o[0] = (a) => h("change", a)),
492
489
  onKeydown: Ve
493
490
  }), {
494
491
  "right-icon": J(() => [
@@ -496,17 +493,17 @@ const We = {
496
493
  tabindex: "-1",
497
494
  type: "button",
498
495
  class: "m-select-input__toggle-button maz-custom",
499
- onClick: H(he, ["stop"])
496
+ onClick: E(he, ["stop"])
500
497
  }, [
501
- L(v(N), { class: "m-select-chevron maz-text-xl" })
498
+ M(v(N), { class: "m-select-chevron maz-text-xl" })
502
499
  ])
503
500
  ]),
504
501
  _: 1
505
502
  /* STABLE */
506
503
  }, 16, ["id", "required", "border-active", "color", "model-value", "size", "disabled"]),
507
- L(De, { name: oe.value }, {
504
+ M(De, { name: oe.value }, {
508
505
  default: J(() => [
509
- K.value ? (u(), V(
506
+ B.value ? (u(), V(
510
507
  "div",
511
508
  {
512
509
  key: 0,
@@ -524,34 +521,33 @@ const We = {
524
521
  })
525
522
  },
526
523
  [
527
- e.search ? (u(), V("div", We, [
528
- L(ce, {
529
- ref_key: "searchInputComponent",
530
- ref: Q,
531
- modelValue: S.value,
532
- "onUpdate:modelValue": [
533
- l[1] || (l[1] = (a) => S.value = a),
534
- l[2] || (l[2] = (a) => s.value = 0)
535
- ],
536
- size: "sm",
537
- color: e.color,
538
- placeholder: e.searchPlaceholder,
539
- name: "search",
540
- autocomplete: "off",
541
- tabindex: "-1",
542
- class: "m-select-list__search-input",
543
- "left-icon": v(I),
544
- onKeydown: ue
545
- }, null, 8, ["modelValue", "color", "placeholder", "left-icon"])
546
- ])) : d("v-if", !0),
524
+ e.search ? (u(), w(ce, {
525
+ key: 0,
526
+ ref_key: "searchInputComponent",
527
+ ref: Q,
528
+ modelValue: S.value,
529
+ "onUpdate:modelValue": [
530
+ o[1] || (o[1] = (a) => S.value = a),
531
+ o[2] || (o[2] = (a) => s.value = 0)
532
+ ],
533
+ size: "sm",
534
+ color: e.color,
535
+ placeholder: e.searchPlaceholder,
536
+ name: "search",
537
+ autocomplete: "off",
538
+ tabindex: "-1",
539
+ class: "m-select-list__search-input maz-flex-none",
540
+ "left-icon": v(K),
541
+ onKeydown: ue
542
+ }, null, 8, ["modelValue", "color", "placeholder", "left-icon"])) : d("v-if", !0),
547
543
  d(`
548
544
  @slot No results slot - Displayed when no results corresponding with search query
549
545
  `),
550
546
  !c.value || c.value.length <= 0 ? O(e.$slots, "no-results", { key: 1 }, () => [
551
- P("span", Qe, [
552
- L(v(X), { class: "maz-h-6 maz-w-6 maz-text-normal" })
547
+ P("span", We, [
548
+ M(v(X), { class: "maz-h-6 maz-w-6 maz-text-normal" })
553
549
  ])
554
- ], !0) : (u(), V("div", Re, [
550
+ ], !0) : (u(), V("div", Qe, [
555
551
  (u(!0), V(
556
552
  Me,
557
553
  null,
@@ -559,17 +555,17 @@ const We = {
559
555
  key: n,
560
556
  tabindex: "-1",
561
557
  type: "button",
562
- class: T(["m-select-list-item maz-custom", [
558
+ class: T(["m-select-list-item maz-custom maz-flex-none", [
563
559
  {
564
560
  "--is-keyboard-selected": s.value === n,
565
561
  "--is-selected": F(a),
566
562
  "--is-none-value": $(a[e.optionValueKey])
567
563
  }
568
564
  ]]),
569
- style: G({ minHeight: `${e.itemHeight}px` }),
570
- onClick: H((r) => ie(a), ["prevent", "stop"])
565
+ style: G(e.itemHeight ? { minHeight: `${e.itemHeight}px` } : void 0),
566
+ onClick: E((r) => ie(a), ["prevent", "stop"])
571
567
  }, [
572
- e.multiple ? (u(), C(v(b), {
568
+ e.multiple ? (u(), w(v(b), {
573
569
  key: 0,
574
570
  tabindex: "-1",
575
571
  "model-value": F(a),
@@ -593,7 +589,7 @@ const We = {
593
589
  /* TEXT */
594
590
  )
595
591
  ], !0)
596
- ], 14, je))),
592
+ ], 14, Re))),
597
593
  128
598
594
  /* KEYED_FRAGMENT */
599
595
  ))
@@ -611,9 +607,9 @@ const We = {
611
607
  /* CLASS, STYLE, NEED_HYDRATION */
612
608
  ));
613
609
  }
614
- }), Xe = /* @__PURE__ */ be(Ze, [["__scopeId", "data-v-824c551b"]]);
610
+ }), Je = /* @__PURE__ */ be(je, [["__scopeId", "data-v-8272b643"]]);
615
611
  export {
616
- Xe as M,
612
+ Je as M,
617
613
  be as _,
618
614
  ye as u
619
615
  };