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,5 +1,5 @@
1
1
  import "../assets/MazPhoneNumberInput.css";
2
- import { computed as d, defineComponent as Ie, defineAsyncComponent as R, ref as h, getCurrentInstance as ke, onMounted as Le, useSlots as Ee, openBlock as y, createElementBlock as w, normalizeClass as F, normalizeStyle as oe, createElementVNode as O, createCommentVNode as m, renderSlot as Z, createBlock as U, unref as C, resolveDynamicComponent as Be, withDirectives as Ne, mergeProps as Se, toHandlers as Te, vModelDynamic as Me, createTextVNode as ze, toDisplayString as ee, withModifiers as re, withCtx as ue, createVNode as H, useCssVars as De, onBeforeMount as Ue, Transition as Re, Fragment as qe, renderList as He, nextTick as X, reactive as Oe, watch as me } from "vue";
2
+ import { computed as d, defineComponent as Ie, defineAsyncComponent as R, ref as h, getCurrentInstance as ke, onMounted as Le, useSlots as Ee, openBlock as y, createElementBlock as k, normalizeClass as F, normalizeStyle as oe, createElementVNode as q, createCommentVNode as m, renderSlot as Z, createBlock as T, unref as C, resolveDynamicComponent as Be, withDirectives as Ne, mergeProps as Se, toHandlers as Te, vModelDynamic as Me, createTextVNode as ze, toDisplayString as ee, withModifiers as re, withCtx as ue, createVNode as J, useCssVars as De, onBeforeMount as Ue, Transition as Re, Fragment as He, renderList as qe, nextTick as X, reactive as Oe, watch as me } from "vue";
3
3
  import { isSupportedCountry as We, getCountryCallingCode as Ce, getExampleNumber as Ye, getCountries as je, parsePhoneNumberFromString as Qe, AsYouType as Ge } from "libphonenumber-js";
4
4
  function Ke(r) {
5
5
  return !!r;
@@ -56,17 +56,17 @@ function lo(r, u) {
56
56
  const a = [], B = je();
57
57
  r = r ?? Fe().browserLocale ?? "en-US";
58
58
  for (const S of B) {
59
- const q = Xe(r, S, u);
60
- if (q)
59
+ const H = Xe(r, S, u);
60
+ if (H)
61
61
  try {
62
- const T = Ce(S);
62
+ const M = Ce(S);
63
63
  a.push({
64
64
  iso2: S,
65
- dialCode: T,
66
- name: q
65
+ dialCode: M,
66
+ name: H
67
67
  });
68
- } catch (T) {
69
- console.error(`[MazPhoneNumberInput](getCountryCallingCode) ${T}`);
68
+ } catch (M) {
69
+ console.error(`[MazPhoneNumberInput](getCountryCallingCode) ${M}`);
70
70
  }
71
71
  }
72
72
  return a;
@@ -194,7 +194,7 @@ const co = {
194
194
  },
195
195
  emits: ["focus", "blur", "update:model-value", "click", "change"],
196
196
  setup(r, { emit: u }) {
197
- const a = R(() => import("./MazBtn-bL_VYiL1.mjs")), B = R(() => import("./MazIcon-C329_2BT.mjs")), S = R(() => import("./eye-slash-rdPLIzFI.mjs")), q = R(() => import("./eye-3jm1b22X.mjs")), T = R(() => import("./check-_5Up9njX.mjs")), t = r, I = u, P = h(!1), c = h(!1), i = h(), te = ke(), le = Pe({
197
+ const a = R(() => import("./MazBtn-M7Pnxit5.mjs")), B = R(() => import("./MazIcon-C329_2BT.mjs")), S = R(() => import("./eye-slash-rdPLIzFI.mjs")), H = R(() => import("./eye-3jm1b22X.mjs")), M = R(() => import("./check-_5Up9njX.mjs")), t = r, w = u, P = h(!1), c = h(!1), i = h(), te = ke(), le = Pe({
198
198
  componentName: "MazInput",
199
199
  instance: te,
200
200
  providedId: t.id
@@ -203,7 +203,7 @@ const co = {
203
203
  var l;
204
204
  t.autoFocus && ((l = i.value) == null || l.focus());
205
205
  });
206
- const W = d(() => t.type === "password"), A = d(() => P.value ? "text" : t.type), k = d(() => {
206
+ const O = d(() => t.type === "password"), A = d(() => P.value ? "text" : t.type), I = d(() => {
207
207
  if (!t.noBorder) {
208
208
  if (t.error)
209
209
  return "maz-border-danger";
@@ -235,27 +235,27 @@ const co = {
235
235
  const { required: l, placeholder: g } = t;
236
236
  if (g)
237
237
  return l ? `${g} *` : g;
238
- }), x = d(() => t.modelValue !== void 0 && t.modelValue !== ""), M = d({
238
+ }), x = d(() => t.modelValue !== void 0 && t.modelValue !== ""), D = d({
239
239
  get: () => t.modelValue,
240
240
  set: (l) => N(l)
241
- }), Y = d(() => (!!t.label || !!t.hint) && (c.value || !!x.value || !!t.placeholder || ["date", "month", "week"].includes(t.type))), _ = d(() => !!t.label || !!t.hint), D = () => !!$["right-icon"] || W.value || !!$["valid-button"] || t.validButton || !!t.rightIcon, j = () => !!$["left-icon"] || !!t.leftIcon, E = (l) => {
242
- I("focus", l), c.value = !0;
241
+ }), W = d(() => (!!t.label || !!t.hint) && (c.value || !!x.value || !!t.placeholder || ["date", "month", "week"].includes(t.type))), _ = d(() => !!t.label || !!t.hint), U = () => !!$["right-icon"] || O.value || !!$["valid-button"] || t.validButton || !!t.rightIcon, Y = () => !!$["left-icon"] || !!t.leftIcon, E = (l) => {
242
+ w("focus", l), c.value = !0;
243
243
  }, ne = (l) => {
244
- I("blur", l), c.value = !1;
245
- }, K = (l) => I("change", l), p = io((l) => {
246
- I("update:model-value", l);
244
+ w("blur", l), c.value = !1;
245
+ }, K = (l) => w("change", l), p = io((l) => {
246
+ w("update:model-value", l);
247
247
  }, t.debounceDelay), N = (l) => {
248
248
  if (t.debounce)
249
249
  return p(l);
250
- I("update:model-value", l);
250
+ w("update:model-value", l);
251
251
  };
252
- return (l, g) => (y(), w(
252
+ return (l, g) => (y(), k(
253
253
  "div",
254
254
  {
255
255
  class: F(["m-input", [
256
256
  {
257
257
  "--is-focused": c.value || l.borderActive,
258
- "--should-up": Y.value,
258
+ "--should-up": W.value,
259
259
  "--has-label": _.value,
260
260
  "--is-disabled": l.disabled,
261
261
  "--is-readonly": l.readonly,
@@ -269,33 +269,33 @@ const co = {
269
269
  style: oe(l.style)
270
270
  },
271
271
  [
272
- O(
272
+ q(
273
273
  "div",
274
274
  {
275
- class: F(["m-input-wrapper", [l.inputClasses, k.value, { "maz-rounded": !l.noRadius }]])
275
+ class: F(["m-input-wrapper", [l.inputClasses, I.value, { "maz-rounded": !l.noRadius }]])
276
276
  },
277
277
  [
278
- j() ? (y(), w("div", co, [
278
+ Y() ? (y(), k("div", co, [
279
279
  m(`
280
280
  @slot left-icon - The icon to display on the left of the input
281
281
  `),
282
282
  l.$slots["left-icon"] || l.leftIcon ? Z(l.$slots, "left-icon", { key: 0 }, () => [
283
- typeof l.leftIcon == "string" ? (y(), U(C(B), {
283
+ typeof l.leftIcon == "string" ? (y(), T(C(B), {
284
284
  key: 0,
285
285
  name: l.leftIcon,
286
286
  class: "maz-text-xl maz-text-muted"
287
- }, null, 8, ["name"])) : l.leftIcon ? (y(), U(Be(l.leftIcon), {
287
+ }, null, 8, ["name"])) : l.leftIcon ? (y(), T(Be(l.leftIcon), {
288
288
  key: 1,
289
289
  class: "maz-text-xl maz-text-muted"
290
290
  })) : m("v-if", !0)
291
291
  ], !0) : m("v-if", !0)
292
292
  ])) : m("v-if", !0),
293
- O("div", po, [
294
- Ne(O("input", Se({
293
+ q("div", po, [
294
+ Ne(q("input", Se({
295
295
  id: C(le),
296
296
  ref_key: "input",
297
297
  ref: i,
298
- "onUpdate:modelValue": g[0] || (g[0] = (v) => M.value = v),
298
+ "onUpdate:modelValue": g[0] || (g[0] = (v) => D.value = v),
299
299
  type: A.value,
300
300
  name: l.name
301
301
  }, l.$attrs, {
@@ -313,9 +313,9 @@ const co = {
313
313
  }, !0), {
314
314
  onClick: g[1] || (g[1] = (v) => l.$emit("click", v))
315
315
  }), null, 16, fo), [
316
- [Me, M.value]
316
+ [Me, D.value]
317
317
  ]),
318
- l.label || l.hint ? (y(), w(
318
+ l.label || l.hint ? (y(), k(
319
319
  "span",
320
320
  {
321
321
  key: 0,
@@ -334,27 +334,27 @@ const co = {
334
334
  1
335
335
  /* TEXT */
336
336
  ),
337
- l.required ? (y(), w("sup", mo, "*")) : m("v-if", !0)
337
+ l.required ? (y(), k("sup", mo, "*")) : m("v-if", !0)
338
338
  ],
339
339
  2
340
340
  /* CLASS */
341
341
  )) : m("v-if", !0)
342
342
  ]),
343
- D() ? (y(), w("div", yo, [
343
+ U() ? (y(), k("div", yo, [
344
344
  m(`
345
345
  @slot right-icon - The icon to display on the right of the input
346
346
  `),
347
347
  l.$slots["right-icon"] || l.rightIcon ? Z(l.$slots, "right-icon", { key: 0 }, () => [
348
- typeof l.rightIcon == "string" ? (y(), U(C(B), {
348
+ typeof l.rightIcon == "string" ? (y(), T(C(B), {
349
349
  key: 0,
350
350
  name: l.rightIcon,
351
351
  class: "maz-text-xl maz-text-muted"
352
- }, null, 8, ["name"])) : l.rightIcon ? (y(), U(Be(l.rightIcon), {
352
+ }, null, 8, ["name"])) : l.rightIcon ? (y(), T(Be(l.rightIcon), {
353
353
  key: 1,
354
354
  class: "maz-text-xl maz-text-muted"
355
355
  })) : m("v-if", !0)
356
356
  ], !0) : m("v-if", !0),
357
- W.value ? (y(), U(C(a), {
357
+ O.value ? (y(), T(C(a), {
358
358
  key: 1,
359
359
  color: "transparent",
360
360
  tabindex: "-1",
@@ -362,10 +362,10 @@ const co = {
362
362
  onClick: g[2] || (g[2] = re((v) => P.value = !P.value, ["stop"]))
363
363
  }, {
364
364
  default: ue(() => [
365
- P.value ? (y(), U(C(S), {
365
+ P.value ? (y(), T(C(S), {
366
366
  key: 0,
367
367
  class: "maz-text-xl maz-text-muted"
368
- })) : (y(), U(C(q), {
368
+ })) : (y(), T(C(H), {
369
369
  key: 1,
370
370
  class: "maz-text-xl maz-text-muted"
371
371
  }))
@@ -377,7 +377,7 @@ const co = {
377
377
  @slot valid-button - Replace the valid button by your own
378
378
  `),
379
379
  l.$slots["valid-button"] || l.validButton ? Z(l.$slots, "valid-button", { key: 2 }, () => [
380
- H(C(a), {
380
+ J(C(a), {
381
381
  color: "transparent",
382
382
  disabled: l.disabled,
383
383
  tabindex: "-1",
@@ -387,7 +387,7 @@ const co = {
387
387
  type: "submit"
388
388
  }, {
389
389
  default: ue(() => [
390
- H(C(T), { class: "maz-text-2xl maz-text-normal" })
390
+ J(C(M), { class: "maz-text-2xl maz-text-normal" })
391
391
  ]),
392
392
  _: 1
393
393
  /* STABLE */
@@ -415,15 +415,11 @@ let ge = null;
415
415
  function ho(r, u) {
416
416
  ge && clearTimeout(ge), ge = setTimeout(r, u);
417
417
  }
418
- const bo = {
419
- key: 0,
420
- tabindex: "-1",
421
- class: "m-select-list__search-wrapper"
422
- }, go = { class: "m-select-list__no-results" }, zo = {
418
+ const bo = { class: "m-select-list__no-results" }, go = {
423
419
  key: 2,
424
420
  class: "m-select-list__scroll-wrapper",
425
421
  tabindex: "-1"
426
- }, Co = ["onClick"], Vo = /* @__PURE__ */ Ie({
422
+ }, zo = ["onClick"], Co = /* @__PURE__ */ Ie({
427
423
  inheritAttrs: !1,
428
424
  __name: "MazSelect",
429
425
  props: {
@@ -436,7 +432,7 @@ const bo = {
436
432
  optionLabelKey: { default: "label" },
437
433
  optionInputValueKey: { default: "label" },
438
434
  listPosition: { default: "bottom left" },
439
- itemHeight: { default: 42 },
435
+ itemHeight: { default: void 0 },
440
436
  maxListHeight: { default: 240 },
441
437
  maxListWidth: { default: void 0 },
442
438
  size: { default: "md" },
@@ -451,21 +447,21 @@ const bo = {
451
447
  emits: ["close", "open", "blur", "focus", "change", "update:model-value", "selected-option"],
452
448
  setup(r, { emit: u }) {
453
449
  De((e) => ({
454
- c5a22ee8: W.value,
455
- "166b564b": te.value,
456
- "123f3f73": le.value
450
+ "5e7d1dfe": O.value,
451
+ b3b9ed86: te.value,
452
+ "55cb06e5": le.value
457
453
  }));
458
- const a = R(() => import("./MazCheckbox-eI5DclIt.mjs")), B = R(() => import("./magnifying-glass-ebhrla2J.mjs")), S = R(() => import("./chevron-down-bC0s_0yH.mjs")), q = R(() => import("./no-symbol-JnXtUaU-.mjs")), T = ke(), t = r, I = u, P = h(!1), c = h(), i = d(
454
+ const a = R(() => import("./MazCheckbox-4gr5TnSK.mjs")), B = R(() => import("./magnifying-glass-ebhrla2J.mjs")), S = R(() => import("./chevron-down-bC0s_0yH.mjs")), H = R(() => import("./no-symbol-JnXtUaU-.mjs")), M = ke(), t = r, w = u, P = h(!1), c = h(), i = d(
459
455
  () => ["black", "transparent", "white"].includes(t.color)
460
456
  ), te = d(
461
457
  () => i.value ? "var(--maz-color-black)" : `var(--maz-color-${t.color}-800)`
462
458
  ), le = d(
463
459
  () => i.value ? "var(--maz-color-muted)" : `var(--maz-color-${t.color}-100)`
464
- ), W = d(
460
+ ), O = d(
465
461
  () => i.value ? "var(--maz-color-muted)" : `var(--maz-color-${t.color}-200)`
466
- ), A = d(() => P.value || t.open), k = Pe({
462
+ ), A = d(() => P.value || t.open), I = Pe({
467
463
  componentName: "MazSelect",
468
- instance: T,
464
+ instance: M,
469
465
  providedId: t.id
470
466
  }), $ = d(
471
467
  () => {
@@ -475,6 +471,7 @@ const bo = {
475
471
  [t.optionLabelKey]: o,
476
472
  [t.optionInputValueKey]: o
477
473
  } : {
474
+ ...o,
478
475
  [t.optionValueKey]: o[t.optionValueKey],
479
476
  [t.optionLabelKey]: o[t.optionLabelKey],
480
477
  [t.optionInputValueKey]: o[t.optionInputValueKey]
@@ -483,19 +480,19 @@ const bo = {
483
480
  ), L = d(
484
481
  () => {
485
482
  var e;
486
- return ((e = $.value) == null ? void 0 : e.filter((o) => t.multiple ? Array.isArray(t.modelValue) ? t.modelValue.includes(o[t.optionValueKey]) && !D(o[t.optionValueKey]) : !1 : t.modelValue === o[t.optionValueKey] && !D(o[t.optionValueKey]))) ?? [];
483
+ return ((e = $.value) == null ? void 0 : e.filter((o) => t.multiple ? Array.isArray(t.modelValue) ? t.modelValue.includes(o[t.optionValueKey]) && !U(o[t.optionValueKey]) : !1 : t.modelValue === o[t.optionValueKey] && !U(o[t.optionValueKey]))) ?? [];
487
484
  }
488
485
  );
489
486
  Ue(() => {
490
487
  var e;
491
488
  (e = t.options) != null && e.length || console.warn("[maz-ui](MazSelect) you must provide options"), ae();
492
489
  });
493
- const x = h(), M = h(), Y = h(), _ = h(), D = (e) => e == null;
494
- function j(e) {
490
+ const x = h(), D = h(), W = h(), _ = h(), U = (e) => e == null;
491
+ function Y(e) {
495
492
  var n;
496
493
  return (((n = L.value) == null ? void 0 : n.some(
497
494
  (s) => s[t.optionValueKey] === e[t.optionValueKey]
498
- )) ?? !1) && !D(e[t.optionValueKey]);
495
+ )) ?? !1) && !U(e[t.optionValueKey]);
499
496
  }
500
497
  const E = d(() => {
501
498
  var e, o;
@@ -527,20 +524,20 @@ const bo = {
527
524
  var o;
528
525
  if (e && ("relatedTarget" in e && ((o = x.value) != null && o.contains(e.relatedTarget)) || e.type === "keydown"))
529
526
  return e.preventDefault();
530
- await X(), P.value = !1, c.value = 0, I("close", e);
531
- }, Q = async (e) => {
532
- t.disabled || A.value || (e == null || e.preventDefault(), P.value = !0, await J(), I("focus", e), I("open", P.value));
527
+ await X(), P.value = !1, c.value = 0, w("close", e);
528
+ }, j = async (e) => {
529
+ t.disabled || A.value || (e == null || e.preventDefault(), P.value = !0, await G(), w("focus", e), w("open", P.value));
533
530
  };
534
531
  function se() {
535
532
  var e, o;
536
- (o = ((e = M.value) == null ? void 0 : e.$el).querySelector("input")) == null || o.focus();
533
+ (o = ((e = D.value) == null ? void 0 : e.$el).querySelector("input")) == null || o.focus();
537
534
  }
538
535
  function ye(e) {
539
536
  P.value ? z(e) : se();
540
537
  }
541
538
  function ie(e) {
542
539
  var o, n;
543
- K.value = e, (n = ((o = Y.value) == null ? void 0 : o.$el).querySelector("input")) == null || n.focus();
540
+ K.value = e, (n = ((o = W.value) == null ? void 0 : o.$el).querySelector("input")) == null || n.focus();
544
541
  }
545
542
  function de(e) {
546
543
  var n;
@@ -548,31 +545,31 @@ const bo = {
548
545
  const o = g(p.value);
549
546
  o != null && o.length && (c.value = (n = v.value) == null ? void 0 : n.findIndex(
550
547
  (s) => s[t.optionValueKey] === o[0][t.optionValueKey]
551
- ), typeof c.value == "number" && c.value >= 0 && J(c.value)), ho(() => {
548
+ ), typeof c.value == "number" && c.value >= 0 && G(c.value)), ho(() => {
552
549
  p.value = "";
553
550
  }, 1e3);
554
551
  }
555
552
  const ve = (e) => {
556
553
  const o = e.key;
557
- /^[\dA-Za-z\u0400-\u04FF]$/.test(o) ? (e.preventDefault(), Q(e), t.search ? ie(o) : de(o)) : G(e);
558
- }, G = (e) => {
554
+ /^[\dA-Za-z\u0400-\u04FF]$/.test(o) ? (e.preventDefault(), j(e), t.search ? ie(o) : de(o)) : Q(e);
555
+ }, Q = (e) => {
559
556
  const o = e.code, n = ["ArrowUp", "ArrowDown"].includes(o), s = ["Enter", "Space"].includes(o), f = o === "Escape" && A.value;
560
557
  n ? ce(e, c.value) : s ? he(e, c.value) : f && z();
561
558
  }, ce = (e, o) => {
562
559
  var f;
563
560
  e.preventDefault();
564
561
  const n = e.code;
565
- A.value || Q(e);
562
+ A.value || j(e);
566
563
  const s = (f = v.value) == null ? void 0 : f.length;
567
- s && (typeof o == "number" ? o === s - 1 && n === "ArrowDown" ? c.value = 0 : o === 0 && n === "ArrowUp" ? c.value = s - 1 : c.value = n === "ArrowDown" ? o + 1 : o - 1 : c.value = n === "ArrowDown" ? 0 : s - 1, J(c.value));
564
+ s && (typeof o == "number" ? o === s - 1 && n === "ArrowDown" ? c.value = 0 : o === 0 && n === "ArrowUp" ? c.value = s - 1 : c.value = n === "ArrowDown" ? o + 1 : o - 1 : c.value = n === "ArrowDown" ? 0 : s - 1, G(c.value));
568
565
  }, he = (e, o) => {
569
566
  var s, f, V;
570
567
  if (e.preventDefault(), !A.value)
571
- return Q(e);
568
+ return j(e);
572
569
  const n = o ? ((s = v.value) == null ? void 0 : s[o]) ?? ((f = v.value) == null ? void 0 : f[0]) : (V = v.value) == null ? void 0 : V[0];
573
- D(n) || pe(n);
570
+ U(n) || pe(n);
574
571
  };
575
- async function J(e) {
572
+ async function G(e) {
576
573
  var n, s;
577
574
  await X(), typeof e != "number" && ae();
578
575
  const o = e ?? c.value;
@@ -601,22 +598,22 @@ const bo = {
601
598
  (b) => b[t.optionValueKey] !== e[t.optionValueKey]
602
599
  ) : t.multiple ? s.push(e) : s = [e];
603
600
  const f = s.map((b) => b[t.optionValueKey]);
604
- I("update:model-value", t.multiple ? f : f[0]), I("selected-option", e), ae(e), se();
601
+ w("update:model-value", t.multiple ? f : f[0]), w("selected-option", e), ae(e), se();
605
602
  };
606
- return (e, o) => (y(), w(
603
+ return (e, o) => (y(), k(
607
604
  "div",
608
605
  {
609
606
  ref_key: "mazSelectElement",
610
607
  ref: x,
611
- class: F(["m-select", [{ "--is-open": A.value, "--disabled": e.disabled }, t.class]]),
608
+ class: F(["m-select", [{ "--is-open": A.value, "--disabled": e.disabled }, t.class, `--${e.size}`]]),
612
609
  style: oe(e.style),
613
610
  onBlurCapture: z
614
611
  },
615
612
  [
616
- H(we, Se({
617
- id: C(k),
613
+ J(we, Se({
614
+ id: C(I),
618
615
  ref_key: "mazInputComponent",
619
- ref: M,
616
+ ref: D,
620
617
  class: "m-select-input"
621
618
  }, e.$attrs, {
622
619
  required: e.required,
@@ -626,27 +623,27 @@ const bo = {
626
623
  autocomplete: "off",
627
624
  size: e.size,
628
625
  disabled: e.disabled,
629
- onFocus: re(Q, ["prevent", "stop"]),
630
- onClick: re(Q, ["prevent", "stop"]),
631
- onChange: o[0] || (o[0] = (n) => I("change", n)),
626
+ onFocus: re(j, ["prevent", "stop"]),
627
+ onClick: re(j, ["prevent", "stop"]),
628
+ onChange: o[0] || (o[0] = (n) => w("change", n)),
632
629
  onKeydown: ve
633
630
  }), {
634
631
  "right-icon": ue(() => [
635
- O("button", {
632
+ q("button", {
636
633
  tabindex: "-1",
637
634
  type: "button",
638
635
  class: "m-select-input__toggle-button maz-custom",
639
636
  onClick: re(ye, ["stop"])
640
637
  }, [
641
- H(C(S), { class: "m-select-chevron maz-text-xl" })
638
+ J(C(S), { class: "m-select-chevron maz-text-xl" })
642
639
  ])
643
640
  ]),
644
641
  _: 1
645
642
  /* STABLE */
646
643
  }, 16, ["id", "required", "border-active", "color", "model-value", "size", "disabled"]),
647
- H(Re, { name: ne.value }, {
644
+ J(Re, { name: ne.value }, {
648
645
  default: ue(() => [
649
- A.value ? (y(), w(
646
+ A.value ? (y(), k(
650
647
  "div",
651
648
  {
652
649
  key: 0,
@@ -664,55 +661,54 @@ const bo = {
664
661
  })
665
662
  },
666
663
  [
667
- e.search ? (y(), w("div", bo, [
668
- H(we, {
669
- ref_key: "searchInputComponent",
670
- ref: Y,
671
- modelValue: K.value,
672
- "onUpdate:modelValue": [
673
- o[1] || (o[1] = (n) => K.value = n),
674
- o[2] || (o[2] = (n) => c.value = 0)
675
- ],
676
- size: "sm",
677
- color: e.color,
678
- placeholder: e.searchPlaceholder,
679
- name: "search",
680
- autocomplete: "off",
681
- tabindex: "-1",
682
- class: "m-select-list__search-input",
683
- "left-icon": C(B),
684
- onKeydown: G
685
- }, null, 8, ["modelValue", "color", "placeholder", "left-icon"])
686
- ])) : m("v-if", !0),
664
+ e.search ? (y(), T(we, {
665
+ key: 0,
666
+ ref_key: "searchInputComponent",
667
+ ref: W,
668
+ modelValue: K.value,
669
+ "onUpdate:modelValue": [
670
+ o[1] || (o[1] = (n) => K.value = n),
671
+ o[2] || (o[2] = (n) => c.value = 0)
672
+ ],
673
+ size: "sm",
674
+ color: e.color,
675
+ placeholder: e.searchPlaceholder,
676
+ name: "search",
677
+ autocomplete: "off",
678
+ tabindex: "-1",
679
+ class: "m-select-list__search-input maz-flex-none",
680
+ "left-icon": C(B),
681
+ onKeydown: Q
682
+ }, null, 8, ["modelValue", "color", "placeholder", "left-icon"])) : m("v-if", !0),
687
683
  m(`
688
684
  @slot No results slot - Displayed when no results corresponding with search query
689
685
  `),
690
686
  !v.value || v.value.length <= 0 ? Z(e.$slots, "no-results", { key: 1 }, () => [
691
- O("span", go, [
692
- H(C(q), { class: "maz-h-6 maz-w-6 maz-text-normal" })
687
+ q("span", bo, [
688
+ J(C(H), { class: "maz-h-6 maz-w-6 maz-text-normal" })
693
689
  ])
694
- ], !0) : (y(), w("div", zo, [
695
- (y(!0), w(
696
- qe,
690
+ ], !0) : (y(), k("div", go, [
691
+ (y(!0), k(
692
+ He,
697
693
  null,
698
- He(v.value, (n, s) => (y(), w("button", {
694
+ qe(v.value, (n, s) => (y(), k("button", {
699
695
  key: s,
700
696
  tabindex: "-1",
701
697
  type: "button",
702
- class: F(["m-select-list-item maz-custom", [
698
+ class: F(["m-select-list-item maz-custom maz-flex-none", [
703
699
  {
704
700
  "--is-keyboard-selected": c.value === s,
705
- "--is-selected": j(n),
706
- "--is-none-value": D(n[e.optionValueKey])
701
+ "--is-selected": Y(n),
702
+ "--is-none-value": U(n[e.optionValueKey])
707
703
  }
708
704
  ]]),
709
- style: oe({ minHeight: `${e.itemHeight}px` }),
705
+ style: oe(e.itemHeight ? { minHeight: `${e.itemHeight}px` } : void 0),
710
706
  onClick: re((f) => pe(n), ["prevent", "stop"])
711
707
  }, [
712
- e.multiple ? (y(), U(C(a), {
708
+ e.multiple ? (y(), T(C(a), {
713
709
  key: 0,
714
710
  tabindex: "-1",
715
- "model-value": j(n),
711
+ "model-value": Y(n),
716
712
  size: "sm",
717
713
  color: e.color
718
714
  }, null, 8, ["model-value", "color"])) : m("v-if", !0),
@@ -723,9 +719,9 @@ const bo = {
723
719
  `),
724
720
  Z(e.$slots, "default", {
725
721
  option: n,
726
- isSelected: j(n)
722
+ isSelected: Y(n)
727
723
  }, () => [
728
- O(
724
+ q(
729
725
  "span",
730
726
  null,
731
727
  ee(n[e.optionLabelKey]),
@@ -733,7 +729,7 @@ const bo = {
733
729
  /* TEXT */
734
730
  )
735
731
  ], !0)
736
- ], 14, Co))),
732
+ ], 14, zo))),
737
733
  128
738
734
  /* KEYED_FRAGMENT */
739
735
  ))
@@ -751,10 +747,10 @@ const bo = {
751
747
  /* CLASS, STYLE, NEED_HYDRATION */
752
748
  ));
753
749
  }
754
- }), wo = /* @__PURE__ */ $e(Vo, [["__scopeId", "data-v-824c551b"]]), Io = ["id"], ko = {
750
+ }), Vo = /* @__PURE__ */ $e(Co, [["__scopeId", "data-v-8272b643"]]), wo = ["id"], Io = {
755
751
  key: 0,
756
752
  class: "maz-text-lg"
757
- }, So = /* @__PURE__ */ Ie({
753
+ }, ko = /* @__PURE__ */ Ie({
758
754
  inheritAttrs: !1,
759
755
  __name: "MazPhoneNumberInput",
760
756
  props: {
@@ -797,42 +793,42 @@ const bo = {
797
793
  fetchCountryCode: a,
798
794
  browserLocale: B,
799
795
  getResultsFromPhoneNumber: S,
800
- getAsYouTypeFormat: q,
801
- getCountriesList: T,
796
+ getAsYouTypeFormat: H,
797
+ getCountriesList: M,
802
798
  getPhoneNumberExample: t,
803
- sanitizePhoneNumber: I,
799
+ sanitizePhoneNumber: w,
804
800
  loadPhoneNumberExamplesFile: P
805
801
  } = so(), c = u, i = r, te = ke(), le = Pe({
806
802
  componentName: "MazPhoneNumberInput",
807
803
  instance: te,
808
804
  providedId: i.id
809
- }), W = h(), A = h(), k = Oe({
805
+ }), O = h(), A = h(), I = Oe({
810
806
  start: 0,
811
807
  end: 0,
812
808
  cursorAtEnd: !0
813
- }), $ = h(!1), L = h(!1), x = d(() => T(i.countryLocale, i.customCountriesList)), M = d(() => {
809
+ }), $ = h(!1), L = h(!1), x = d(() => M(i.countryLocale, i.customCountriesList)), D = d(() => {
814
810
  var e;
815
811
  return (e = x.value) == null ? void 0 : e.filter((o) => {
816
812
  var n;
817
813
  return !((n = i.ignoredCountries) != null && n.includes(o.iso2));
818
814
  });
819
- }), Y = d(() => {
815
+ }), W = d(() => {
820
816
  const e = i.onlyCountries || i.preferredCountries;
821
817
  return e == null ? void 0 : e.map(
822
818
  (o) => {
823
819
  var n;
824
- return (n = M.value) == null ? void 0 : n.find((s) => s.iso2.includes(o));
820
+ return (n = D.value) == null ? void 0 : n.find((s) => s.iso2.includes(o));
825
821
  }
826
822
  );
827
823
  }), _ = d(() => {
828
824
  var e;
829
- return (e = M.value) == null ? void 0 : e.filter((o) => {
825
+ return (e = D.value) == null ? void 0 : e.filter((o) => {
830
826
  var n;
831
827
  return !((n = i.preferredCountries) != null && n.includes(o.iso2));
832
828
  });
833
- }), D = d(() => i.preferredCountries ? [...Y.value ?? [], ..._.value ?? []] : i.onlyCountries ? Y.value : M.value), j = d(() => {
829
+ }), U = d(() => i.preferredCountries ? [...W.value ?? [], ..._.value ?? []] : i.onlyCountries ? W.value : D.value), Y = d(() => {
834
830
  var e;
835
- return (e = D.value) == null ? void 0 : e.map((o) => o ? {
831
+ return (e = U.value) == null ? void 0 : e.map((o) => o ? {
836
832
  ...o,
837
833
  dialCode: `+${o.dialCode}`
838
834
  } : void 0).filter(Ke);
@@ -872,9 +868,9 @@ const bo = {
872
868
  countryCode: p.value
873
869
  })
874
870
  );
875
- async function Q() {
871
+ async function j() {
876
872
  const e = await a();
877
- e && G(e);
873
+ e && Q(e);
878
874
  }
879
875
  async function se() {
880
876
  try {
@@ -884,7 +880,7 @@ const bo = {
884
880
  }
885
881
  }
886
882
  Le(async () => {
887
- await ce(N.value), await X(), i.fetchCountry && !p.value && await Q(), !i.defaultCountryCode && !i.noUseBrowserLocale && !p.value && ye(), await se();
883
+ await ce(N.value), await X(), i.fetchCountry && !p.value && await j(), !i.defaultCountryCode && !i.noUseBrowserLocale && !p.value && ye(), await se();
888
884
  }), me(
889
885
  () => z.value,
890
886
  (e) => {
@@ -900,9 +896,9 @@ const bo = {
900
896
  () => v.value,
901
897
  async (e, o) => {
902
898
  if (!i.noFormattingAsYouType && e && e !== o) {
903
- const n = J();
904
- if (n && !z.value.isValid && typeof k.start == "number" && !k.cursorAtEnd) {
905
- const s = k.start, f = k.end;
899
+ const n = G();
900
+ if (n && !z.value.isValid && typeof I.start == "number" && !I.cursorAtEnd) {
901
+ const s = I.start, f = I.end;
906
902
  setTimeout(() => {
907
903
  n.setSelectionRange(s, f ?? s);
908
904
  }, 0);
@@ -912,7 +908,7 @@ const bo = {
912
908
  );
913
909
  function ye() {
914
910
  const { locale: e } = B();
915
- e && G(e);
911
+ e && Q(e);
916
912
  }
917
913
  function ie(e, o) {
918
914
  z.value = S({
@@ -921,9 +917,9 @@ const bo = {
921
917
  });
922
918
  }
923
919
  async function de(e) {
924
- const o = J();
925
- k.start = o == null ? void 0 : o.selectionStart, k.end = o == null ? void 0 : o.selectionEnd, k.cursorAtEnd = k.start ? k.start >= e.length : !0;
926
- const n = I(e);
920
+ const o = G();
921
+ I.start = o == null ? void 0 : o.selectionStart, I.end = o == null ? void 0 : o.selectionEnd, I.cursorAtEnd = I.start ? I.start >= e.length : !0;
922
+ const n = w(e);
927
923
  l.value = n;
928
924
  const s = S({
929
925
  phoneNumber: n,
@@ -932,9 +928,9 @@ const bo = {
932
928
  N.value = s.e164;
933
929
  }
934
930
  function ve(e) {
935
- G(e, !0), ie(v.value, e);
931
+ Q(e, !0), ie(v.value, e);
936
932
  }
937
- function G(e, o = !1) {
933
+ function Q(e, o = !1) {
938
934
  try {
939
935
  no(e) && (K.value = e, o && pe());
940
936
  } catch (n) {
@@ -942,17 +938,17 @@ const bo = {
942
938
  }
943
939
  }
944
940
  async function ce(e) {
945
- ie(e, p.value), await X(), i.noFormattingAsYouType ? l.value = v.value : e ? g.value = k.cursorAtEnd || z.value.isValid ? l.value = q(
941
+ ie(e, p.value), await X(), i.noFormattingAsYouType ? l.value = v.value : e ? g.value = I.cursorAtEnd || z.value.isValid ? l.value = H(
946
942
  z.value.countryCode ?? p.value,
947
943
  z.value.formatNational ?? l.value
948
944
  ) : l.value : g.value = void 0, await X(), he(z.value);
949
945
  }
950
946
  function he(e) {
951
- e.countryCode && p.value !== e.countryCode && G(e.countryCode);
947
+ e.countryCode && p.value !== e.countryCode && Q(e.countryCode);
952
948
  }
953
- function J() {
949
+ function G() {
954
950
  var e;
955
- return (e = W.value) == null ? void 0 : e.$el.querySelector("input");
951
+ return (e = O.value) == null ? void 0 : e.$el.querySelector("input");
956
952
  }
957
953
  function ae() {
958
954
  var e, o;
@@ -960,11 +956,11 @@ const bo = {
960
956
  }
961
957
  async function pe() {
962
958
  var e;
963
- await X(), (e = J()) == null || e.focus();
959
+ await X(), (e = G()) == null || e.focus();
964
960
  }
965
961
  return (e, o) => {
966
962
  var n, s, f, V;
967
- return y(), w("div", {
963
+ return y(), k("div", {
968
964
  id: C(le),
969
965
  class: F(["m-phone-number-input", [
970
966
  i.class,
@@ -974,7 +970,7 @@ const bo = {
974
970
  ]]),
975
971
  style: oe(e.style)
976
972
  }, [
977
- p.value && !e.noFlags && !e.noCountrySelector ? (y(), w(
973
+ p.value && !e.noFlags && !e.noCountrySelector ? (y(), k(
978
974
  "button",
979
975
  {
980
976
  key: 0,
@@ -1001,7 +997,7 @@ const bo = {
1001
997
  2
1002
998
  /* CLASS */
1003
999
  )) : m("v-if", !0),
1004
- e.noCountrySelector ? m("v-if", !0) : (y(), U(wo, {
1000
+ e.noCountrySelector ? m("v-if", !0) : (y(), T(Vo, {
1005
1001
  key: 1,
1006
1002
  ref_key: "CountrySelector",
1007
1003
  ref: A,
@@ -1018,7 +1014,7 @@ const bo = {
1018
1014
  "list-position": e.listPosition,
1019
1015
  search: !e.noSearch,
1020
1016
  "search-placeholder": E.value.countrySelector.searchPlaceholder,
1021
- options: j.value,
1017
+ options: Y.value,
1022
1018
  error: e.error || (e.noValidationError ? !1 : !!v.value && !p.value),
1023
1019
  hint: v.value && !p.value ? E.value.countrySelector.error : void 0,
1024
1020
  success: e.success || (e.noValidationSuccess ? !1 : (n = z.value) == null ? void 0 : n.isValid),
@@ -1029,7 +1025,7 @@ const bo = {
1029
1025
  onFocus: o[1] || (o[1] = (b) => L.value = !1)
1030
1026
  }, {
1031
1027
  default: ue(({ option: b, isSelected: fe }) => [
1032
- O(
1028
+ q(
1033
1029
  "div",
1034
1030
  {
1035
1031
  class: F(["m-phone-number-input__select__item maz-flex maz-items-center maz-gap-1 maz-truncate", {
@@ -1037,7 +1033,7 @@ const bo = {
1037
1033
  }])
1038
1034
  },
1039
1035
  [
1040
- !e.noFlags && typeof b.iso2 == "string" ? (y(), w("span", ko, [
1036
+ !e.noFlags && typeof b.iso2 == "string" ? (y(), k("span", Io, [
1041
1037
  m(`
1042
1038
  @slot Country list flag
1043
1039
  @binding {String} country-code - country code of option - Ex: \`"FR"\`
@@ -1056,7 +1052,7 @@ const bo = {
1056
1052
  )
1057
1053
  ], !0)
1058
1054
  ])) : m("v-if", !0),
1059
- e.showCodeOnList ? (y(), w(
1055
+ e.showCodeOnList ? (y(), k(
1060
1056
  "span",
1061
1057
  {
1062
1058
  key: 1,
@@ -1066,7 +1062,7 @@ const bo = {
1066
1062
  3
1067
1063
  /* TEXT, CLASS */
1068
1064
  )) : m("v-if", !0),
1069
- O(
1065
+ q(
1070
1066
  "span",
1071
1067
  {
1072
1068
  class: F(["maz-flex-1 maz-truncate", { "maz-font-semibold": fe }])
@@ -1083,10 +1079,10 @@ const bo = {
1083
1079
  _: 3
1084
1080
  /* FORWARDED */
1085
1081
  }, 8, ["modelValue", "option-input-value-key", "disabled", "color", "size", "list-position", "search", "search-placeholder", "options", "error", "hint", "success", "label", "style"])),
1086
- H(we, Se({
1082
+ J(we, Se({
1087
1083
  id: e.id,
1088
1084
  ref_key: "PhoneNumberInput",
1089
- ref: W,
1085
+ ref: O,
1090
1086
  "model-value": v.value,
1091
1087
  label: ne.value,
1092
1088
  disabled: e.disabled,
@@ -1108,12 +1104,12 @@ const bo = {
1108
1104
  onBlur: o[3] || (o[3] = (b) => L.value = !1),
1109
1105
  "onUpdate:modelValue": o[4] || (o[4] = (b) => de(b))
1110
1106
  }), null, 16, ["id", "model-value", "label", "disabled", "color", "error", "size", "success", "class"])
1111
- ], 14, Io);
1107
+ ], 14, wo);
1112
1108
  };
1113
1109
  }
1114
- }), Ao = /* @__PURE__ */ $e(So, [["__scopeId", "data-v-cd414873"]]);
1110
+ }), Bo = /* @__PURE__ */ $e(ko, [["__scopeId", "data-v-cd414873"]]);
1115
1111
  export {
1116
- Ao as M,
1112
+ Bo as M,
1117
1113
  $e as _,
1118
1114
  Pe as u
1119
1115
  };