maz-ui 3.22.0 → 3.22.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 (73) hide show
  1. package/components/MazInput.d.ts +38 -22
  2. package/components/MazInput.mjs +1 -2
  3. package/components/MazInputNumber.mjs +1 -1
  4. package/components/MazInputPrice.mjs +1 -1
  5. package/components/MazInputTags.mjs +1 -1
  6. package/components/MazPhoneNumberInput.d.ts +41 -1
  7. package/components/MazPhoneNumberInput.mjs +1 -1
  8. package/components/MazPicker.mjs +1 -1
  9. package/components/MazSelect.d.ts +33 -1
  10. package/components/MazSelect.mjs +1 -1
  11. package/components/MazTextarea.d.ts +17 -17
  12. package/components/MazTextarea.mjs +7 -8
  13. package/components/assets/MazInput.css +1 -1
  14. package/components/assets/MazInputPrice.css +1 -1
  15. package/components/assets/MazInputTags.css +1 -1
  16. package/components/assets/MazPhoneNumberInput.css +1 -1
  17. package/components/assets/MazSelect.css +1 -1
  18. package/components/assets/MazTextarea.css +1 -1
  19. package/components/chunks/{MazBtn-001d4174.mjs → MazBtn-0e02f0da.mjs} +2 -2
  20. package/components/chunks/{MazBtn-a3a285eb.mjs → MazBtn-2f4fa942.mjs} +2 -2
  21. package/components/chunks/{MazBtn-97d9e521.mjs → MazBtn-30723941.mjs} +2 -2
  22. package/components/chunks/{MazBtn-080c9397.mjs → MazBtn-4e1e116e.mjs} +2 -2
  23. package/components/chunks/{MazBtn-7f413085.mjs → MazBtn-b42e3575.mjs} +2 -2
  24. package/components/chunks/{MazBtn-29a43072.mjs → MazBtn-f48da79c.mjs} +2 -2
  25. package/components/chunks/{MazCheckbox-0595c207.mjs → MazCheckbox-9fa9179a.mjs} +1 -1
  26. package/components/chunks/{MazCheckbox-90f20e7f.mjs → MazCheckbox-e0bbe6ec.mjs} +1 -1
  27. package/components/chunks/MazInput-713b00d0.mjs +326 -0
  28. package/components/chunks/MazInput-b9386887.mjs +341 -0
  29. package/components/chunks/MazInput-c33627dd.mjs +334 -0
  30. package/components/chunks/{MazInputPrice-eb36a7dd.mjs → MazInputPrice-452297f5.mjs} +171 -191
  31. package/components/chunks/{MazInputTags-24164d56.mjs → MazInputTags-7a463b81.mjs} +176 -196
  32. package/components/chunks/{MazPhoneNumberInput-4cec4ade.mjs → MazPhoneNumberInput-31bc05f9.mjs} +241 -226
  33. package/components/chunks/{MazPicker-9f4c724c.mjs → MazPicker-50fc11d1.mjs} +4 -4
  34. package/components/chunks/{MazPickerCalendar-35fe36ab.mjs → MazPickerCalendar-cacb361c.mjs} +5 -5
  35. package/components/chunks/{MazPickerHeader-d8687abf.mjs → MazPickerHeader-63d45179.mjs} +1 -1
  36. package/components/chunks/{MazPickerMonthSwitcher-739ed62a.mjs → MazPickerMonthSwitcher-913c6e2c.mjs} +2 -2
  37. package/components/chunks/{MazPickerShortcuts-68622fe8.mjs → MazPickerShortcuts-c6fabfc6.mjs} +2 -2
  38. package/components/chunks/{MazPickerTime-031062b2.mjs → MazPickerTime-5e4475da.mjs} +2 -2
  39. package/components/chunks/{MazPickerYearSwitcher-2a006a30.mjs → MazPickerYearSwitcher-dd4fa89c.mjs} +3 -3
  40. package/components/chunks/{MazSelect-757bffd7.mjs → MazSelect-2e5cd411.mjs} +199 -206
  41. package/components/chunks/{MazSpinner-d356ad25.mjs → MazSpinner-100c99b8.mjs} +1 -1
  42. package/components/chunks/{MazSpinner-7bd9b831.mjs → MazSpinner-191ad23b.mjs} +1 -1
  43. package/components/chunks/{MazSpinner-89743727.mjs → MazSpinner-339a9006.mjs} +1 -1
  44. package/components/chunks/{MazSpinner-85c86950.mjs → MazSpinner-8859d658.mjs} +1 -1
  45. package/components/chunks/{MazSpinner-d669a3af.mjs → MazSpinner-cb6f99f3.mjs} +1 -1
  46. package/components/chunks/{MazSpinner-ac429216.mjs → MazSpinner-db6fc59d.mjs} +1 -1
  47. package/css/main.css +1 -1
  48. package/nuxt/index.json +1 -1
  49. package/nuxt/runtime/composables/use-theme-handler.mjs +1 -1
  50. package/nuxt/runtime/plugins/aos.d.ts +1 -1
  51. package/nuxt/runtime/plugins/aos.mjs +1 -1
  52. package/nuxt/runtime/plugins/maz-icon-path.d.ts +1 -1
  53. package/nuxt/runtime/plugins/maz-icon-path.mjs +1 -1
  54. package/nuxt/runtime/plugins/toaster.d.ts +1 -1
  55. package/nuxt/runtime/plugins/toaster.mjs +1 -1
  56. package/nuxt/runtime/plugins/v-click-outside.d.ts +1 -1
  57. package/nuxt/runtime/plugins/v-click-outside.mjs +1 -1
  58. package/nuxt/runtime/plugins/v-fullscreen-img.d.ts +1 -1
  59. package/nuxt/runtime/plugins/v-fullscreen-img.mjs +1 -1
  60. package/nuxt/runtime/plugins/v-lazy-img.d.ts +1 -1
  61. package/nuxt/runtime/plugins/v-lazy-img.mjs +1 -1
  62. package/nuxt/runtime/plugins/v-zoom-img.d.ts +1 -1
  63. package/nuxt/runtime/plugins/v-zoom-img.mjs +1 -1
  64. package/nuxt/runtime/plugins/wait.d.ts +1 -1
  65. package/nuxt/runtime/plugins/wait.mjs +1 -1
  66. package/package.json +2 -2
  67. package/types/components/MazInput.vue.d.ts +38 -22
  68. package/types/components/MazPhoneNumberInput.vue.d.ts +41 -1
  69. package/types/components/MazSelect.vue.d.ts +33 -1
  70. package/types/components/MazTextarea.vue.d.ts +17 -17
  71. package/components/chunks/MazInput-12a098d4.mjs +0 -361
  72. package/components/chunks/MazInput-20ea773f.mjs +0 -354
  73. package/components/chunks/MazInput-4313d3cc.mjs +0 -346
@@ -1,5 +1,5 @@
1
1
  import "../assets/MazPhoneNumberInput.css";
2
- import { computed, defineAsyncComponent, defineComponent, ref, getCurrentInstance, onMounted, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, renderSlot, createVNode, createCommentVNode, withDirectives, mergeProps, toHandlers, vModelDynamic, createTextVNode, toDisplayString, createBlock, withModifiers, withCtx, useCssVars, onBeforeMount, watch, unref, Transition, normalizeStyle, Fragment, renderList, nextTick, reactive } from "vue";
2
+ import { computed, defineComponent, defineAsyncComponent, ref, getCurrentInstance, onMounted, useSlots, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, renderSlot, createVNode, unref, createCommentVNode, withDirectives, mergeProps, toHandlers, vModelDynamic, createTextVNode, toDisplayString, createBlock, withModifiers, withCtx, useCssVars, onBeforeMount, watch, Transition, Fragment, renderList, nextTick, reactive } from "vue";
3
3
  import { isSupportedCountry, getCountryCallingCode, getExampleNumber, getCountries, parsePhoneNumberFromString, AsYouType } from "libphonenumber-js";
4
4
  function truthyFilter(value) {
5
5
  return !!value;
@@ -69,8 +69,8 @@ function sanitizePhoneNumber(input) {
69
69
  function getCountriesList(locale, customCountriesNameListByIsoCode) {
70
70
  const countriesList = [];
71
71
  const isoList = getCountries();
72
+ locale = locale ?? browserLocale().browserLocale ?? "en-US";
72
73
  for (const iso2 of isoList) {
73
- locale = locale ?? browserLocale().browserLocale ?? "en-US";
74
74
  const name = getCountryName(locale, iso2, customCountriesNameListByIsoCode);
75
75
  if (name) {
76
76
  try {
@@ -190,21 +190,25 @@ function debounce(fn, delay) {
190
190
  }, delay);
191
191
  };
192
192
  }
193
- const MazBtn = defineAsyncComponent(() => import("./MazBtn-97d9e521.mjs"));
194
- const MazIcon = defineAsyncComponent(() => import("./MazIcon-bda198b4.mjs"));
195
- const EyeOffIcon = defineAsyncComponent(() => import("./eye-slash-342420ff.mjs"));
196
- const EyeIcon = defineAsyncComponent(() => import("./eye-fbb13657.mjs"));
197
- const CheckIcon = defineAsyncComponent(() => import("./check-8da249b1.mjs"));
198
- const _sfc_main$2 = defineComponent({
199
- components: {
200
- MazBtn,
201
- MazIcon,
202
- CheckIcon,
203
- EyeIcon,
204
- EyeOffIcon
193
+ const _hoisted_1$2 = {
194
+ key: 0,
195
+ class: "m-input-wrapper-left"
196
+ };
197
+ const _hoisted_2$2 = { class: "m-input-wrapper-input" };
198
+ const _hoisted_3$1 = ["id", "type", "name", "placeholder", "aria-label", "disabled", "readonly", "required"];
199
+ const _hoisted_4$1 = { key: 0 };
200
+ const _hoisted_5$1 = {
201
+ key: 1,
202
+ class: "m-input-wrapper-right"
203
+ };
204
+ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
205
+ ...{
206
+ inheritAttrs: false
205
207
  },
206
- inheritAttrs: false,
208
+ __name: "MazInput",
207
209
  props: {
210
+ style: { type: [String, Array, Object], default: void 0 },
211
+ class: { type: String, default: void 0 },
208
212
  modelValue: {
209
213
  type: [String, Number, Boolean],
210
214
  default: void 0
@@ -263,7 +267,14 @@ const _sfc_main$2 = defineComponent({
263
267
  rightIcon: { type: String, default: void 0 }
264
268
  },
265
269
  emits: ["focus", "blur", "update:model-value", "click", "change", "update"],
266
- setup(props, { emit, slots }) {
270
+ setup(__props, { emit: __emit }) {
271
+ const MazBtn = defineAsyncComponent(() => import("./MazBtn-30723941.mjs"));
272
+ const MazIcon = defineAsyncComponent(() => import("./MazIcon-bda198b4.mjs"));
273
+ const EyeOffIcon = defineAsyncComponent(() => import("./eye-slash-342420ff.mjs"));
274
+ const EyeIcon = defineAsyncComponent(() => import("./eye-fbb13657.mjs"));
275
+ const CheckIcon = defineAsyncComponent(() => import("./check-8da249b1.mjs"));
276
+ const props = __props;
277
+ const emits = __emit;
267
278
  const hasPasswordVisible = ref(false);
268
279
  const isFocused = ref(false);
269
280
  const input = ref();
@@ -279,6 +290,7 @@ const _sfc_main$2 = defineComponent({
279
290
  (_a = input.value) == null ? void 0 : _a.focus();
280
291
  }
281
292
  });
293
+ const inheritClasses = computed(() => props.class);
282
294
  const isPasswordType = computed(() => props.type === "password");
283
295
  const inputType = computed(() => hasPasswordVisible.value ? "text" : props.type);
284
296
  const borderStyle = computed(() => {
@@ -310,6 +322,7 @@ const _sfc_main$2 = defineComponent({
310
322
  }
311
323
  return "--default-border";
312
324
  });
325
+ const slots = useSlots();
313
326
  const computedPlaceholder = computed(() => {
314
327
  const { required, placeholder } = props;
315
328
  if (!placeholder)
@@ -332,44 +345,162 @@ const _sfc_main$2 = defineComponent({
332
345
  return !!slots["left-icon"] || !!props.leftIcon;
333
346
  };
334
347
  const focus = (event) => {
335
- emit("focus", event);
348
+ emits("focus", event);
336
349
  isFocused.value = true;
337
350
  };
338
351
  const blur = (event) => {
339
- emit("blur", event);
352
+ emits("blur", event);
340
353
  isFocused.value = false;
341
354
  };
342
- const change = (event) => emit("change", event);
355
+ const change = (event) => emits("change", event);
343
356
  const debounceEmitValue = debounce((value) => {
344
- emit("update:model-value", value);
357
+ emits("update:model-value", value);
345
358
  }, props.debounceDelay);
346
359
  const emitValue = (value) => {
347
360
  if (props.debounce)
348
361
  return debounceEmitValue(value);
349
- emit("update:model-value", value);
362
+ emits("update:model-value", value);
350
363
  };
351
- return {
352
- inputValue,
353
- shouldUp,
354
- hasLabel,
355
- computedPlaceholder,
356
- isPasswordType,
357
- inputType,
358
- input,
359
- isFocused,
360
- hasPasswordVisible,
361
- borderStyle,
362
- focus,
363
- blur,
364
- change,
365
- emitValue,
366
- hasRightPart,
367
- hasLeftPart,
368
- instanceId
364
+ return (_ctx, _cache) => {
365
+ return openBlock(), createElementBlock(
366
+ "div",
367
+ {
368
+ class: normalizeClass(["m-input", [
369
+ {
370
+ "--is-focused": isFocused.value || __props.borderActive,
371
+ "--should-up": shouldUp.value,
372
+ "--has-label": hasLabel.value,
373
+ "--is-disabled": __props.disabled,
374
+ "--is-readonly": __props.readonly,
375
+ "--has-z-2": __props.error || __props.warning || __props.success,
376
+ "--has-state": __props.error || __props.warning || __props.success
377
+ },
378
+ inheritClasses.value,
379
+ `--${__props.color}`,
380
+ `--${__props.size}`
381
+ ]]),
382
+ style: normalizeStyle(__props.style)
383
+ },
384
+ [
385
+ createElementVNode(
386
+ "div",
387
+ {
388
+ class: normalizeClass(["m-input-wrapper", [__props.inputClasses, borderStyle.value, { "maz-rounded": !__props.noRadius }]])
389
+ },
390
+ [
391
+ hasLeftPart() ? (openBlock(), createElementBlock("div", _hoisted_1$2, [
392
+ _ctx.$slots["left-icon"] || __props.leftIcon ? renderSlot(_ctx.$slots, "left-icon", { key: 0 }, () => [
393
+ createVNode(unref(MazIcon), {
394
+ name: __props.leftIcon,
395
+ class: "maz-text-xl maz-text-muted"
396
+ }, null, 8, ["name"])
397
+ ], true) : createCommentVNode("v-if", true)
398
+ ])) : createCommentVNode("v-if", true),
399
+ createElementVNode("div", _hoisted_2$2, [
400
+ withDirectives(createElementVNode("input", mergeProps({
401
+ id: unref(instanceId),
402
+ ref_key: "input",
403
+ ref: input,
404
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inputValue.value = $event),
405
+ type: inputType.value,
406
+ name: __props.name
407
+ }, _ctx.$attrs, {
408
+ placeholder: computedPlaceholder.value,
409
+ "aria-label": __props.label || __props.placeholder,
410
+ disabled: __props.disabled,
411
+ readonly: __props.readonly,
412
+ required: __props.required,
413
+ class: "m-input-input"
414
+ }, toHandlers({
415
+ blur,
416
+ focus,
417
+ change
418
+ }, true), {
419
+ onClick: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("click", $event))
420
+ }), null, 16, _hoisted_3$1), [
421
+ [vModelDynamic, inputValue.value]
422
+ ]),
423
+ __props.label || __props.hint ? (openBlock(), createElementBlock(
424
+ "span",
425
+ {
426
+ key: 0,
427
+ ref: "label",
428
+ class: normalizeClass(["m-input-label", [
429
+ {
430
+ "maz-text-danger-600": __props.error,
431
+ "maz-text-success-600": __props.success,
432
+ "maz-text-warning-600": __props.warning
433
+ }
434
+ ]])
435
+ },
436
+ [
437
+ createTextVNode(
438
+ toDisplayString(__props.hint || __props.label) + " ",
439
+ 1
440
+ /* TEXT */
441
+ ),
442
+ __props.required ? (openBlock(), createElementBlock("sup", _hoisted_4$1, "*")) : createCommentVNode("v-if", true)
443
+ ],
444
+ 2
445
+ /* CLASS */
446
+ )) : createCommentVNode("v-if", true)
447
+ ]),
448
+ hasRightPart() ? (openBlock(), createElementBlock("div", _hoisted_5$1, [
449
+ _ctx.$slots["right-icon"] || __props.rightIcon ? renderSlot(_ctx.$slots, "right-icon", { key: 0 }, () => [
450
+ createVNode(unref(MazIcon), {
451
+ name: __props.rightIcon,
452
+ class: "maz-text-xl maz-text-muted"
453
+ }, null, 8, ["name"])
454
+ ], true) : createCommentVNode("v-if", true),
455
+ isPasswordType.value ? (openBlock(), createBlock(unref(MazBtn), {
456
+ key: 1,
457
+ color: "transparent",
458
+ tabindex: "-1",
459
+ size: "mini",
460
+ onClick: _cache[2] || (_cache[2] = withModifiers(($event) => hasPasswordVisible.value = !hasPasswordVisible.value, ["stop"]))
461
+ }, {
462
+ default: withCtx(() => [
463
+ hasPasswordVisible.value ? (openBlock(), createBlock(unref(EyeOffIcon), {
464
+ key: 0,
465
+ class: "maz-text-xl maz-text-muted"
466
+ })) : (openBlock(), createBlock(unref(EyeIcon), {
467
+ key: 1,
468
+ class: "maz-text-xl maz-text-muted"
469
+ }))
470
+ ]),
471
+ _: 1
472
+ /* STABLE */
473
+ })) : createCommentVNode("v-if", true),
474
+ _ctx.$slots["valid-button"] || __props.validButton ? renderSlot(_ctx.$slots, "valid-button", { key: 2 }, () => [
475
+ createVNode(unref(MazBtn), {
476
+ color: "transparent",
477
+ disabled: __props.disabled,
478
+ tabindex: "-1",
479
+ loading: __props.validButtonLoading,
480
+ class: "m-input-valid-button",
481
+ size: "mini",
482
+ type: "submit"
483
+ }, {
484
+ default: withCtx(() => [
485
+ createVNode(unref(CheckIcon), { class: "maz-text-2xl maz-text-normal" })
486
+ ]),
487
+ _: 1
488
+ /* STABLE */
489
+ }, 8, ["disabled", "loading"])
490
+ ], true) : createCommentVNode("v-if", true)
491
+ ])) : createCommentVNode("v-if", true)
492
+ ],
493
+ 2
494
+ /* CLASS */
495
+ )
496
+ ],
497
+ 6
498
+ /* CLASS, STYLE */
499
+ );
369
500
  };
370
501
  }
371
502
  });
372
- const MazInput_vue_vue_type_style_index_0_scoped_18b53f70_lang = "";
503
+ const MazInput_vue_vue_type_style_index_0_scoped_32fa5093_lang = "";
373
504
  const _export_sfc = (sfc, props) => {
374
505
  const target = sfc.__vccOpts || sfc;
375
506
  for (const [key, val] of props) {
@@ -377,158 +508,7 @@ const _export_sfc = (sfc, props) => {
377
508
  }
378
509
  return target;
379
510
  };
380
- const _hoisted_1$2 = {
381
- key: 0,
382
- class: "m-input-wrapper-left"
383
- };
384
- const _hoisted_2$2 = { class: "m-input-wrapper-input" };
385
- const _hoisted_3$1 = ["id", "type", "name", "placeholder", "aria-label", "disabled", "readonly", "required"];
386
- const _hoisted_4$1 = { key: 0 };
387
- const _hoisted_5$1 = {
388
- key: 1,
389
- class: "m-input-wrapper-right"
390
- };
391
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
392
- const _component_MazIcon = resolveComponent("MazIcon");
393
- const _component_EyeOffIcon = resolveComponent("EyeOffIcon");
394
- const _component_EyeIcon = resolveComponent("EyeIcon");
395
- const _component_MazBtn = resolveComponent("MazBtn");
396
- const _component_CheckIcon = resolveComponent("CheckIcon");
397
- return openBlock(), createElementBlock(
398
- "div",
399
- {
400
- class: normalizeClass(["m-input", [
401
- {
402
- "--is-focused": _ctx.isFocused || _ctx.borderActive,
403
- "--should-up": _ctx.shouldUp,
404
- "--has-label": _ctx.hasLabel,
405
- "--is-disabled": _ctx.disabled,
406
- "--is-readonly": _ctx.readonly,
407
- "--has-z-2": _ctx.error || _ctx.warning || _ctx.success,
408
- "--has-state": _ctx.error || _ctx.warning || _ctx.success
409
- },
410
- _ctx.$attrs.class,
411
- `--${_ctx.color}`,
412
- `--${_ctx.size}`
413
- ]])
414
- },
415
- [
416
- createElementVNode(
417
- "div",
418
- {
419
- class: normalizeClass(["m-input-wrapper", [_ctx.inputClasses, _ctx.borderStyle, { "maz-rounded": !_ctx.noRadius }]])
420
- },
421
- [
422
- _ctx.hasLeftPart() ? (openBlock(), createElementBlock("div", _hoisted_1$2, [
423
- _ctx.$slots["left-icon"] || _ctx.leftIcon ? renderSlot(_ctx.$slots, "left-icon", { key: 0 }, () => [
424
- createVNode(_component_MazIcon, {
425
- name: _ctx.leftIcon,
426
- class: "maz-text-xl maz-text-muted"
427
- }, null, 8, ["name"])
428
- ], true) : createCommentVNode("v-if", true)
429
- ])) : createCommentVNode("v-if", true),
430
- createElementVNode("div", _hoisted_2$2, [
431
- withDirectives(createElementVNode("input", mergeProps({
432
- id: _ctx.instanceId,
433
- ref: "input",
434
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.inputValue = $event),
435
- type: _ctx.inputType,
436
- name: _ctx.name
437
- }, _ctx.$attrs, {
438
- placeholder: _ctx.computedPlaceholder,
439
- "aria-label": _ctx.label || _ctx.placeholder,
440
- disabled: _ctx.disabled,
441
- readonly: _ctx.readonly,
442
- required: _ctx.required,
443
- class: "m-input-input"
444
- }, toHandlers({
445
- blur: _ctx.blur,
446
- focus: _ctx.focus,
447
- change: _ctx.change
448
- }, true), {
449
- onClick: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("click", $event))
450
- }), null, 16, _hoisted_3$1), [
451
- [vModelDynamic, _ctx.inputValue]
452
- ]),
453
- _ctx.label || _ctx.hint ? (openBlock(), createElementBlock(
454
- "span",
455
- {
456
- key: 0,
457
- ref: "label",
458
- class: normalizeClass(["m-input-label", [
459
- {
460
- "maz-text-danger-600": _ctx.error,
461
- "maz-text-success-600": _ctx.success,
462
- "maz-text-warning-600": _ctx.warning
463
- }
464
- ]])
465
- },
466
- [
467
- createTextVNode(
468
- toDisplayString(_ctx.hint || _ctx.label) + " ",
469
- 1
470
- /* TEXT */
471
- ),
472
- _ctx.required ? (openBlock(), createElementBlock("sup", _hoisted_4$1, "*")) : createCommentVNode("v-if", true)
473
- ],
474
- 2
475
- /* CLASS */
476
- )) : createCommentVNode("v-if", true)
477
- ]),
478
- _ctx.hasRightPart() ? (openBlock(), createElementBlock("div", _hoisted_5$1, [
479
- _ctx.$slots["right-icon"] || _ctx.rightIcon ? renderSlot(_ctx.$slots, "right-icon", { key: 0 }, () => [
480
- createVNode(_component_MazIcon, {
481
- name: _ctx.rightIcon,
482
- class: "maz-text-xl maz-text-muted"
483
- }, null, 8, ["name"])
484
- ], true) : createCommentVNode("v-if", true),
485
- _ctx.isPasswordType ? (openBlock(), createBlock(_component_MazBtn, {
486
- key: 1,
487
- color: "transparent",
488
- tabindex: "-1",
489
- size: "mini",
490
- onClick: _cache[2] || (_cache[2] = withModifiers(($event) => _ctx.hasPasswordVisible = !_ctx.hasPasswordVisible, ["stop"]))
491
- }, {
492
- default: withCtx(() => [
493
- _ctx.hasPasswordVisible ? (openBlock(), createBlock(_component_EyeOffIcon, {
494
- key: 0,
495
- class: "maz-text-xl maz-text-muted"
496
- })) : (openBlock(), createBlock(_component_EyeIcon, {
497
- key: 1,
498
- class: "maz-text-xl maz-text-muted"
499
- }))
500
- ]),
501
- _: 1
502
- /* STABLE */
503
- })) : createCommentVNode("v-if", true),
504
- _ctx.$slots["valid-button"] || _ctx.validButton ? renderSlot(_ctx.$slots, "valid-button", { key: 2 }, () => [
505
- createVNode(_component_MazBtn, {
506
- color: "transparent",
507
- disabled: _ctx.disabled,
508
- tabindex: "-1",
509
- loading: _ctx.validButtonLoading,
510
- class: "m-input-valid-button",
511
- size: "mini",
512
- type: "submit"
513
- }, {
514
- default: withCtx(() => [
515
- createVNode(_component_CheckIcon, { class: "maz-text-2xl maz-text-normal" })
516
- ]),
517
- _: 1
518
- /* STABLE */
519
- }, 8, ["disabled", "loading"])
520
- ], true) : createCommentVNode("v-if", true)
521
- ])) : createCommentVNode("v-if", true)
522
- ],
523
- 2
524
- /* CLASS */
525
- )
526
- ],
527
- 2
528
- /* CLASS */
529
- );
530
- }
531
- const MazInput = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render], ["__scopeId", "data-v-18b53f70"]]);
511
+ const MazInput = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-32fa5093"]]);
532
512
  ref("system");
533
513
  ref("system");
534
514
  ref();
@@ -554,8 +534,13 @@ const _hoisted_4 = {
554
534
  };
555
535
  const _hoisted_5 = ["onClick"];
556
536
  const _sfc_main$1 = /* @__PURE__ */ defineComponent({
537
+ ...{
538
+ inheritAttrs: false
539
+ },
557
540
  __name: "MazSelect",
558
541
  props: {
542
+ style: { type: [String, Array, Object], default: void 0 },
543
+ class: { type: String, default: void 0 },
559
544
  modelValue: {
560
545
  type: [Number, String, Boolean, Array],
561
546
  default: void 0
@@ -577,13 +562,17 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
577
562
  required: { type: Boolean, default: false },
578
563
  disabled: { type: Boolean, default: false },
579
564
  open: { type: Boolean, default: false },
565
+ /** Choose color of the input */
580
566
  color: {
581
567
  type: String,
582
568
  default: "primary"
583
569
  },
570
+ /** Choose the option list item height */
584
571
  itemHeight: { type: Number, default: 40 },
585
572
  maxListHeight: { type: Number, default: 240 },
573
+ /** Add max-width value to option list */
586
574
  maxListWidth: { type: Number, default: void 0 },
575
+ /** Choose size of the input */
587
576
  size: {
588
577
  type: String,
589
578
  default: "md",
@@ -591,8 +580,11 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
591
580
  return ["mini", "xs", "sm", "md", "lg", "xl"].includes(value);
592
581
  }
593
582
  },
583
+ /** Display search input in option list */
594
584
  search: { type: Boolean, default: false },
585
+ /** Search input placeholder */
595
586
  searchPlaceholder: { type: String, default: "Search in options" },
587
+ /** Enable feature to select multiple values */
596
588
  multiple: { type: Boolean, default: false }
597
589
  },
598
590
  emits: [
@@ -607,11 +599,11 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
607
599
  ],
608
600
  setup(__props, { emit: __emit }) {
609
601
  useCssVars((_ctx) => ({
610
- "6af9d50f": keyboardSelectedBgColor.value,
611
- "c012bde4": selectedTextColor.value,
612
- "46d74214": selectedBgColor.value
602
+ "0804a86d": keyboardSelectedBgColor.value,
603
+ "4502d2ec": selectedTextColor.value,
604
+ "381f7054": selectedBgColor.value
613
605
  }));
614
- const MazCheckbox = defineAsyncComponent(() => import("./MazCheckbox-0595c207.mjs"));
606
+ const MazCheckbox = defineAsyncComponent(() => import("./MazCheckbox-9fa9179a.mjs"));
615
607
  const SearchIcon = defineAsyncComponent(() => import("./magnifying-glass-5dffa35e.mjs"));
616
608
  const ChevronDownIcon = defineAsyncComponent(() => import("./chevron-down-a78b9604.mjs"));
617
609
  const NoSymbolIcon = defineAsyncComponent(() => import("./no-symbol-975ce547.mjs"));
@@ -673,11 +665,11 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
673
665
  return props.modelValue.map(
674
666
  (value) => {
675
667
  var _a2, _b2;
676
- return (_b2 = (_a2 = optionsList.value) == null ? void 0 : _a2.find((option) => option[props.optionValueKey] === value)) == null ? void 0 : _b2[props.optionInputValueKey];
668
+ return (_b2 = (_a2 = props.options) == null ? void 0 : _a2.find((option) => option[props.optionValueKey] === value)) == null ? void 0 : _b2[props.optionInputValueKey];
677
669
  }
678
670
  ).join(", ");
679
671
  }
680
- return (_b = (_a = optionsList.value) == null ? void 0 : _a.find((option) => option[props.optionValueKey] === props.modelValue)) == null ? void 0 : _b[props.optionInputValueKey];
672
+ return (_b = (_a = props.options) == null ? void 0 : _a.find((option) => option[props.optionValueKey] === props.modelValue)) == null ? void 0 : _b[props.optionInputValueKey];
681
673
  });
682
674
  const listTransition = computed(
683
675
  () => props.listPosition.includes("bottom") ? "maz-slide" : "maz-slideinvert"
@@ -727,16 +719,16 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
727
719
  emits("open", listOpened.value);
728
720
  };
729
721
  function focusMainInput() {
730
- var _a;
731
- (_a = mazInputComponent.value) == null ? void 0 : _a.input.focus();
722
+ var _a, _b;
723
+ (_b = ((_a = mazInputComponent.value) == null ? void 0 : _a.$el).querySelector("input")) == null ? void 0 : _b.focus();
732
724
  }
733
725
  function toggleList(event) {
734
726
  listOpened.value ? closeList(event) : focusMainInput();
735
727
  }
736
728
  function focusSearchInputAndSetQuery(q) {
737
- var _a;
729
+ var _a, _b;
738
730
  searchQuery.value = q;
739
- (_a = searchInputComponent.value) == null ? void 0 : _a.input.focus();
731
+ (_b = ((_a = searchInputComponent.value) == null ? void 0 : _a.$el).querySelector("input")) == null ? void 0 : _b.focus();
740
732
  }
741
733
  function searchOptionWithQuery(keyPressed) {
742
734
  var _a;
@@ -877,7 +869,8 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
877
869
  {
878
870
  ref_key: "mazSelectElement",
879
871
  ref: mazSelectElement,
880
- class: normalizeClass(["m-select", { "--is-open": hasListOpened.value, "--disabled": __props.disabled }]),
872
+ class: normalizeClass(["m-select", [{ "--is-open": hasListOpened.value, "--disabled": __props.disabled }, props.class]]),
873
+ style: normalizeStyle(__props.style),
881
874
  onBlurCapture: closeList
882
875
  },
883
876
  [
@@ -1016,22 +1009,27 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
1016
1009
  /* FORWARDED */
1017
1010
  }, 8, ["name"])
1018
1011
  ],
1019
- 34
1020
- /* CLASS, HYDRATE_EVENTS */
1012
+ 38
1013
+ /* CLASS, STYLE, HYDRATE_EVENTS */
1021
1014
  );
1022
1015
  };
1023
1016
  }
1024
1017
  });
1025
- const MazSelect_vue_vue_type_style_index_0_scoped_4ee0f4f3_lang = "";
1026
- const MazSelect = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-4ee0f4f3"]]);
1018
+ const MazSelect_vue_vue_type_style_index_0_scoped_c313b4a6_lang = "";
1019
+ const MazSelect = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-c313b4a6"]]);
1027
1020
  const _hoisted_1 = ["id"];
1028
1021
  const _hoisted_2 = {
1029
1022
  key: 0,
1030
- class: "maz-mr-2 maz-text-lg"
1023
+ class: "maz-text-lg"
1031
1024
  };
1032
1025
  const _sfc_main = /* @__PURE__ */ defineComponent({
1026
+ ...{
1027
+ inheritAttrs: false
1028
+ },
1033
1029
  __name: "MazPhoneNumberInput",
1034
1030
  props: {
1031
+ style: { type: [String, Array, Object], default: void 0 },
1032
+ class: { type: String, default: void 0 },
1035
1033
  /** Country calling code + telephone number in international format */
1036
1034
  modelValue: {
1037
1035
  type: String,
@@ -1119,22 +1117,32 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1119
1117
  /** Add success UI */
1120
1118
  success: { type: Boolean, default: false },
1121
1119
  /** Add error UI */
1122
- error: { type: Boolean, default: false }
1120
+ error: { type: Boolean, default: false },
1121
+ /** Will replace the calling code by the country name in the country selector */
1122
+ countrySelectorDisplayName: { type: Boolean, default: false },
1123
+ /** Choose the width of the country selector */
1124
+ countrySelectorWidth: { type: String, default: "9rem" }
1123
1125
  },
1124
1126
  emits: [
1125
- /** emitted when country or phone number changed
1126
- * @returns data - {Result}
1127
+ /** emitted when country or phone number changes
1128
+ * @property {Result} results - meta info of current phone numnber
1127
1129
  */
1128
1130
  "update",
1129
- /** emitted when country or phone number changed
1130
- * @returns data - {Result}
1131
+ /** emitted when country or phone number changes
1132
+ * @property {Result} results - meta info of current phone numnber
1131
1133
  */
1132
1134
  "data",
1133
- /** emitted when selected country changed */
1135
+ /** emitted when selected country changes
1136
+ * @property {CountryCode} countryCode - Country code
1137
+ */
1134
1138
  "country-code",
1135
- /** Two way binding (v-model:model-value) - emitted when country changed */
1139
+ /** emitted when country or phone number changes
1140
+ * @property {String} phoneNumber - phoneNumber formatted
1141
+ */
1136
1142
  "update:model-value",
1137
- /** Two way binding (v-model:country-code) - emitted when country changed */
1143
+ /** emitted when country changes
1144
+ * @property {CountryCode} countryCode - Country code
1145
+ */
1138
1146
  "update:country-code"
1139
1147
  ],
1140
1148
  setup(__props, { emit: __emit }) {
@@ -1390,9 +1398,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1390
1398
  var _a, _b, _c, _d;
1391
1399
  return openBlock(), createElementBlock("div", {
1392
1400
  id: unref(instanceId),
1393
- class: normalizeClass(["m-phone-number-input", {
1394
- "--no-flags": __props.noFlags
1395
- }])
1401
+ class: normalizeClass(["m-phone-number-input", [
1402
+ props.class,
1403
+ {
1404
+ "--no-flags": __props.noFlags
1405
+ }
1406
+ ]]),
1407
+ style: normalizeStyle(__props.style)
1396
1408
  }, [
1397
1409
  countryCode.value && !__props.noFlags && !__props.noCountrySelector ? (openBlock(), createElementBlock(
1398
1410
  "button",
@@ -1415,7 +1427,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1415
1427
  "model-value": countryCode.value,
1416
1428
  "option-value-key": "iso2",
1417
1429
  "option-label-key": "name",
1418
- "option-input-value-key": "dialCode",
1430
+ "option-input-value-key": __props.countrySelectorDisplayName ? "name" : "dialCode",
1419
1431
  "max-list-width": 250,
1420
1432
  disabled: __props.disabled,
1421
1433
  color: __props.color,
@@ -1428,6 +1440,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1428
1440
  hint: !!inputValue.value && !countryCode.value ? locales.value.countrySelector.error : void 0,
1429
1441
  label: locales.value.countrySelector.placeholder,
1430
1442
  success: __props.success || (!__props.noValidationSuccess ? (_a = results.value) == null ? void 0 : _a.isValid : false),
1443
+ style: normalizeStyle({
1444
+ width: __props.countrySelectorWidth
1445
+ }),
1431
1446
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => onCountryChanged($event)),
1432
1447
  onFocus: _cache[1] || (_cache[1] = ($event) => inputFocused.value = false)
1433
1448
  }, {
@@ -1435,7 +1450,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1435
1450
  createElementVNode(
1436
1451
  "div",
1437
1452
  {
1438
- class: normalizeClass(["m-phone-number-input__select__item maz-flex maz-items-center maz-truncate", {
1453
+ class: normalizeClass(["m-phone-number-input__select__item maz-flex maz-items-center maz-gap-1 maz-truncate", {
1439
1454
  "m-phone-number-input__select__item--selected": isSelected
1440
1455
  }])
1441
1456
  },
@@ -1451,7 +1466,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1451
1466
  "span",
1452
1467
  {
1453
1468
  key: 1,
1454
- class: normalizeClass(["maz-w-10 maz-flex-none", { "maz-text-muted": !isSelected }])
1469
+ class: normalizeClass(["maz-w-9 maz-flex-none", { "maz-text-muted": !isSelected }])
1455
1470
  },
1456
1471
  toDisplayString(option.dialCode),
1457
1472
  3
@@ -1473,7 +1488,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1473
1488
  ]),
1474
1489
  _: 1
1475
1490
  /* STABLE */
1476
- }, 8, ["model-value", "disabled", "color", "size", "list-position", "search", "search-placeholder", "options", "error", "hint", "label", "success"])) : createCommentVNode("v-if", true),
1491
+ }, 8, ["model-value", "option-input-value-key", "disabled", "color", "size", "list-position", "search", "search-placeholder", "options", "error", "hint", "label", "success", "style"])) : createCommentVNode("v-if", true),
1477
1492
  createVNode(MazInput, mergeProps({
1478
1493
  id: __props.id,
1479
1494
  ref_key: "PhoneNumberInput",
@@ -1498,12 +1513,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1498
1513
  onBlur: _cache[3] || (_cache[3] = ($event) => inputFocused.value = false),
1499
1514
  "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => onInputValueChanged($event))
1500
1515
  }), null, 16, ["id", "model-value", "label", "disabled", "color", "error", "size", "success", "class"])
1501
- ], 10, _hoisted_1);
1516
+ ], 14, _hoisted_1);
1502
1517
  };
1503
1518
  }
1504
1519
  });
1505
- const MazPhoneNumberInput_vue_vue_type_style_index_0_scoped_82c0d14d_lang = "";
1506
- const MazPhoneNumberInput = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-82c0d14d"]]);
1520
+ const MazPhoneNumberInput_vue_vue_type_style_index_0_scoped_2417c048_lang = "";
1521
+ const MazPhoneNumberInput = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-2417c048"]]);
1507
1522
  export {
1508
1523
  MazPhoneNumberInput as M,
1509
1524
  _export_sfc as _,