maz-ui 4.1.7-beta.2 → 4.1.7-beta.3

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 (82) hide show
  1. package/dist/assets/MazSelect.BX67LsNc.css +1 -0
  2. package/dist/chunks/{MazDatePicker.B3DDfxjV.js → MazDatePicker.DI69gr3i.js} +22 -22
  3. package/dist/chunks/{MazDropdown.vue_vue_type_style_index_0_lang.D_CzEKlT.js → MazDropdown.vue_vue_type_style_index_0_lang.FpQyExxD.js} +2 -2
  4. package/dist/chunks/{MazInputNumber.vue_vue_type_style_index_0_lang.B0D4Zzds.js → MazInputNumber.vue_vue_type_style_index_0_lang.B6DYpHfi.js} +2 -2
  5. package/dist/chunks/{MazInputPhoneNumber.CDy6n_Qj.js → MazInputPhoneNumber.CfClhmow.js} +7 -7
  6. package/dist/chunks/{MazInputPrice.vue_vue_type_script_setup_true_lang.3pKYuG8H.js → MazInputPrice.vue_vue_type_script_setup_true_lang.BA6TDX-T.js} +18 -18
  7. package/dist/chunks/{MazPickerCalendar.B5IHMawO.js → MazPickerCalendar.DouWTWHn.js} +1 -1
  8. package/dist/chunks/{MazPickerCalendarMonth.TJfbseNp.js → MazPickerCalendarMonth.DKCt3__u.js} +6 -6
  9. package/dist/chunks/{MazPickerCalendarSwitcher.lOvJV15Q.js → MazPickerCalendarSwitcher.C01uOHRy.js} +8 -8
  10. package/dist/chunks/{MazPickerContainer.DP0fFknc.js → MazPickerContainer.CFRr8ziz.js} +1 -1
  11. package/dist/chunks/{MazPickerHeader.JAJVo08c.js → MazPickerHeader.CcE5eDEe.js} +12 -12
  12. package/dist/chunks/{MazPickerMonthSwitcher.C3OsIZfi.js → MazPickerMonthSwitcher.BlPMSBuX.js} +8 -8
  13. package/dist/chunks/{MazPickerTime.BpMRZUGU.js → MazPickerTime.D7KXPIQ7.js} +1 -1
  14. package/dist/chunks/{MazPickerYearSwitcher.Da4W6W5q.js → MazPickerYearSwitcher.oPES1_VL.js} +2 -2
  15. package/dist/chunks/{MazTabsContent.vue_vue_type_script_setup_true_lang.hIwO-24k.js → MazTabsContent.vue_vue_type_script_setup_true_lang.arGqYTL5.js} +2 -2
  16. package/dist/chunks/{PhoneInput.DukRZp5u.js → PhoneInput.BE6bXfav.js} +1 -1
  17. package/dist/chunks/capitalize.BF6CDS_4.js +6 -0
  18. package/dist/chunks/checkAvailability.aTpZidex.js +16 -0
  19. package/dist/chunks/debounce.Brzkn9pm.js +11 -0
  20. package/dist/chunks/{dom-events.H9KIOv83.js → dom-events.CfOiauCR.js} +41 -41
  21. package/dist/chunks/{fullscreen-img.directive.D9oQ3Gni.js → fullscreen-img.directive.B8ESs0MK.js} +2 -2
  22. package/dist/chunks/{isClient.8V3qjGdO.js → isClient.WI4oSt66.js} +2 -2
  23. package/dist/chunks/{mazUi.CaSMOKic.js → mazUi.raWwR54O.js} +2 -2
  24. package/dist/chunks/{obsidian.C6upWOVF.js → obsidian.Cy0R8RHy.js} +2 -2
  25. package/dist/chunks/{ocean.ehMlC0HV.js → ocean.pHrY5H_S.js} +2 -2
  26. package/dist/chunks/pascalCase.GdDKKQ-O.js +19 -0
  27. package/dist/chunks/{pristine.DMG3eBuN.js → pristine.CxBZzgUG.js} +2 -2
  28. package/dist/chunks/sleep.BLRH1qZG.js +6 -0
  29. package/dist/chunks/truthyFilter.C2WOKUCG.js +6 -0
  30. package/dist/chunks/{useStringMatching.DzSigyZ7.js → useStringMatching.CqudA-tS.js} +25 -25
  31. package/dist/chunks/{vClickOutside.CJBKY5no.js → vClickOutside.DIOiluy0.js} +6 -6
  32. package/dist/components/MazAnimatedCounter.js +3 -3
  33. package/dist/components/MazAnimatedText.js +2 -2
  34. package/dist/components/MazChecklist.js +4 -4
  35. package/dist/components/MazDatePicker.js +1 -1
  36. package/dist/components/MazDropdown.js +1 -1
  37. package/dist/components/MazDropzone.js +3 -3
  38. package/dist/components/MazGallery.js +1 -1
  39. package/dist/components/MazInput.js +2 -2
  40. package/dist/components/MazInputNumber.js +1 -1
  41. package/dist/components/MazInputPhoneNumber.js +1 -1
  42. package/dist/components/MazInputPrice.js +1 -1
  43. package/dist/components/MazInputTags.js +3 -3
  44. package/dist/components/MazPopover.js +9 -9
  45. package/dist/components/MazPullToRefresh.js +6 -6
  46. package/dist/components/MazReadingProgressBar.js +7 -7
  47. package/dist/components/MazSelect.js +67 -57
  48. package/dist/components/MazSelect.vue.d.ts +21 -4
  49. package/dist/components/MazSelectCountry.js +15 -13
  50. package/dist/components/MazSlider.js +34 -34
  51. package/dist/components/MazTabsBar.js +2 -2
  52. package/dist/components/MazTabsContent.js +1 -1
  53. package/dist/components/MazTextarea.js +5 -5
  54. package/dist/components/index.js +6 -6
  55. package/dist/composables/index.js +1 -1
  56. package/dist/composables/useDisplayNames.js +2 -2
  57. package/dist/composables/useDropzone.js +2 -2
  58. package/dist/composables/useFormField.js +2 -2
  59. package/dist/composables/useFormValidator.js +1 -1
  60. package/dist/composables/useIdleTimeout.js +27 -27
  61. package/dist/composables/useMutationObserver.js +4 -4
  62. package/dist/composables/useStringMatching.js +1 -1
  63. package/dist/composables/useSwipe.js +22 -22
  64. package/dist/composables/useUserVisibility.js +8 -8
  65. package/dist/composables/useWindowSize.js +2 -2
  66. package/dist/directives/index.js +2 -2
  67. package/dist/directives/vClickOutside.js +1 -1
  68. package/dist/directives/vFullscreenImg.js +1 -1
  69. package/dist/plugins/aos.js +5 -5
  70. package/dist/plugins/maz-ui.js +208 -208
  71. package/dist/resolvers/MazComponentsResolver.js +4 -4
  72. package/dist/resolvers/MazDirectivesResolver.js +2 -2
  73. package/dist/resolvers/MazModulesResolver.js +3 -3
  74. package/dist/types/components/MazSelect.vue.d.ts +21 -4
  75. package/package.json +8 -8
  76. package/dist/assets/MazSelect.BjrOOGvL.css +0 -1
  77. package/dist/chunks/capitalize.CVQ1jDrh.js +0 -6
  78. package/dist/chunks/checkAvailability.UFZSC8-1.js +0 -16
  79. package/dist/chunks/debounce.DhXdop6X.js +0 -11
  80. package/dist/chunks/pascalCase.BKTE3qqE.js +0 -19
  81. package/dist/chunks/sleep.Ci7GE4BQ.js +0 -6
  82. package/dist/chunks/truthyFilter.DZvXmxeK.js +0 -6
@@ -0,0 +1 @@
1
+ .m-select[data-v-a8c792dd]{vertical-align:top;display:inline-flex;position:relative}.m-select-input[data-v-a8c792dd]{width:100%;height:100%}.m-select-input[data-v-a8c792dd]:not(.--disabled){cursor:pointer}.m-select-input__toggle-button[data-v-a8c792dd]{background-color:#0000;justify-content:center;align-items:center;height:100%;padding-left:0;display:flex}.m-select-input[data-v-a8c792dd] input{caret-color:#0000}.m-select.--mini[data-v-a8c792dd],.m-select.--xs[data-v-a8c792dd]{font-size:.75rem;line-height:1rem}.m-select.--sm[data-v-a8c792dd]{font-size:.875rem;line-height:1.25rem}.m-select.--md[data-v-a8c792dd]{font-size:1rem;line-height:1.5rem}.m-select.--lg[data-v-a8c792dd]{font-size:1.125rem;line-height:1.75rem}.m-select.--xl[data-v-a8c792dd]{font-size:1.25rem;line-height:1.75rem}.m-select[data-v-a8c792dd]:not(.--disabled) .m-input-input{cursor:pointer}.m-select-chevron[data-v-a8c792dd]{--maz-tw-text-opacity:1;color:hsl(var(--maz-muted)/var(--maz-tw-text-opacity,1));font-size:1.2em;transition-property:all;transition-duration:.3s;transition-timing-function:cubic-bezier(0,0,.2,1)}.m-select.--is-open .m-select-chevron[data-v-a8c792dd]{transform:rotate(180deg)}.m-select button.maz-custom[data-v-a8c792dd]{cursor:pointer;appearance:none;border-style:none}.m-select-list[data-v-a8c792dd]{z-index:1050;border-radius:var(--maz-radius);--maz-tw-bg-opacity:1;background-color:hsl(var(--maz-background)/var(--maz-tw-bg-opacity,1));--maz-tw-shadow-color:hsl(var(--maz-shadow)/1);--maz-tw-shadow:var(--maz-tw-shadow-colored);--maz-tw-drop-shadow:drop-shadow(0 4px 3px #00000012)drop-shadow(0 2px 2px #0000000f);filter:var(--maz-tw-blur)var(--maz-tw-brightness)var(--maz-tw-contrast)var(--maz-tw-grayscale)var(--maz-tw-hue-rotate)var(--maz-tw-invert)var(--maz-tw-saturate)var(--maz-tw-sepia)var(--maz-tw-drop-shadow);flex-direction:column;gap:.25rem;display:flex;overflow:hidden}.m-select-list-optgroup[data-v-a8c792dd]{text-align:start;--maz-tw-text-opacity:1;color:hsl(var(--maz-muted)/var(--maz-tw-text-opacity,1));flex:none;padding:.125rem;font-size:.875em}.m-select-list.--mini[data-v-a8c792dd],.m-select-list.--xs[data-v-a8c792dd]{font-size:.75rem;line-height:1rem}.m-select-list.--sm[data-v-a8c792dd]{font-size:.875rem;line-height:1.25rem}.m-select-list.--md[data-v-a8c792dd]{font-size:1rem;line-height:1.5rem}.m-select-list.--lg[data-v-a8c792dd]{font-size:1.125rem;line-height:1.75rem}.m-select-list.--xl[data-v-a8c792dd]{font-size:1.25rem;line-height:1.75rem}.m-select-list[data-v-a8c792dd]{min-width:3.5rem}.m-select-list__scroll-wrapper[data-v-a8c792dd]{flex-direction:column;flex:1;gap:.25rem;padding:.5rem;display:flex;overflow:auto}.m-select-list__scroll-wrapper[data-v-a8c792dd]::-webkit-scrollbar{width:.1875rem}.m-select-list__scroll-wrapper[data-v-a8c792dd]::-webkit-scrollbar-track{background:0 0}.m-select-list__scroll-wrapper[data-v-a8c792dd]::-webkit-scrollbar-thumb{--maz-tw-bg-opacity:1;background-color:hsl(var(--maz-background-600)/var(--maz-tw-bg-opacity,1))}.m-select-list__scroll-wrapper[data-v-a8c792dd]:is([class~=dark] *)::-webkit-scrollbar-thumb{--maz-tw-bg-opacity:1;background-color:hsl(var(--maz-background-400)/var(--maz-tw-bg-opacity,1))}.m-select-list__scroll-wrapper[data-v-a8c792dd]::-webkit-scrollbar-thumb{border-radius:1000px}.m-select-list__scroll-wrapper[data-v-a8c792dd]{scrollbar-width:thin;scrollbar-color:hsl(var(--maz-background-600))transparent}.m-select-list__no-results[data-v-a8c792dd]{justify-content:center;align-items:center;padding:1rem;display:flex}.m-select-list-item[data-v-a8c792dd]{cursor:pointer;text-overflow:ellipsis;white-space:nowrap;border-radius:var(--maz-radius);border-width:var(--maz-border-width);text-align:start;outline-offset:2px;background-color:#0000;border-style:solid;border-color:#0000;outline:2px solid #0000;align-items:center;gap:.75rem;width:100%;padding:.5rem .75rem;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-duration:.3s;transition-timing-function:cubic-bezier(.4,0,.2,1);display:flex;overflow:hidden}.m-select-list-item[data-v-a8c792dd]:focus-within,.m-select-list-item[data-v-a8c792dd]:hover{--maz-tw-bg-opacity:1;background-color:hsl(var(--maz-background-600)/var(--maz-tw-bg-opacity,1))}.m-select-list-item[data-v-a8c792dd]:focus-within:is([class~=dark] *),.m-select-list-item[data-v-a8c792dd]:hover:is([class~=dark] *){--maz-tw-bg-opacity:1;background-color:hsl(var(--maz-background-400)/var(--maz-tw-bg-opacity,1))}.m-select-list-item span[data-v-a8c792dd]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.m-select-list-item.--is-none-value[data-v-a8c792dd]{--maz-tw-text-opacity:1;color:hsl(var(--maz-muted)/var(--maz-tw-text-opacity,1))}.m-select-list-item.--is-selected[data-v-a8c792dd]{color:var(--selected-text-color);background-color:var(--selected-bg-color)}.m-select-list-item.--is-selected[data-v-a8c792dd]:focus{outline-color:var(--selected-text-color);outline-width:var(--maz-border-width)}.m-select-list-item.--is-selected.--transparent[data-v-a8c792dd]{--maz-tw-bg-opacity:1;background-color:hsl(var(--maz-background)/var(--maz-tw-bg-opacity,1))}
@@ -5,25 +5,25 @@ import dayjs from "dayjs";
5
5
  import customParseFormat from "dayjs/plugin/customParseFormat";
6
6
  import isBetween from "dayjs/plugin/isBetween";
7
7
  import { useInstanceUniqId } from "../composables/useInstanceUniqId.js";
8
- import { r } from "./capitalize.CVQ1jDrh.js";
8
+ import { c as capitalize } from "./capitalize.BF6CDS_4.js";
9
9
  import weekday from "dayjs/plugin/weekday";
10
10
  import { _ as _export_sfc } from "./_plugin-vue_export-helper.B--vMWp3.js";
11
- import '../assets/MazDatePicker.BK088IpL.css';const a = {
11
+ import '../assets/MazDatePicker.BK088IpL.css';const DEFAULT_OPTIONS = {
12
12
  month: "short",
13
13
  day: "numeric",
14
14
  year: "numeric"
15
15
  };
16
- function n(t, r2, o) {
17
- if (r2 === void 0)
16
+ function formatDate(date, locale, options) {
17
+ if (locale === void 0)
18
18
  throw new TypeError("[maz-ui](FilterDate) The `locale` attribute is required.");
19
- if (typeof r2 != "string")
19
+ if (typeof locale != "string")
20
20
  throw new TypeError("[maz-ui](FilterDate) The `locale` attribute must be a string.");
21
- const i = o ?? a;
21
+ const opts = options ?? DEFAULT_OPTIONS;
22
22
  try {
23
- const e = t instanceof Date ? t : new Date(t);
24
- return new Intl.DateTimeFormat(r2, i).format(e);
25
- } catch (e) {
26
- throw new Error(`[maz-ui](FilterDate) ${e}`);
23
+ const usedDate = date instanceof Date ? date : new Date(date);
24
+ return new Intl.DateTimeFormat(locale, opts).format(usedDate);
25
+ } catch (error) {
26
+ throw new Error(`[maz-ui](FilterDate) ${error}`);
27
27
  }
28
28
  }
29
29
  dayjs.extend(weekday);
@@ -32,8 +32,8 @@ function getFormattedDate({
32
32
  locale,
33
33
  options
34
34
  }) {
35
- const formattedDate = value ? n(value, locale, options) : void 0;
36
- return formattedDate ? r(formattedDate) : void 0;
35
+ const formattedDate = value ? formatDate(value, locale, options) : void 0;
36
+ return formattedDate ? capitalize(formattedDate) : void 0;
37
37
  }
38
38
  function getRangeFormattedDate({
39
39
  value,
@@ -57,7 +57,7 @@ function getFirstDayOfMonth(value) {
57
57
  function getDaysOfWeek(locale, firstDayOfWeek) {
58
58
  const currentDate = dayjs().locale(locale), days = [];
59
59
  for (let i = 0; i < 7; i++) {
60
- const day = currentDate.day(i + firstDayOfWeek).toDate(), dayName = n(day, locale, { weekday: "short" });
60
+ const day = currentDate.day(i + firstDayOfWeek).toDate(), dayName = formatDate(day, locale, { weekday: "short" });
61
61
  dayName && days.push(dayName);
62
62
  }
63
63
  return days;
@@ -243,7 +243,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
243
243
  setup(__props, { emit: __emit }) {
244
244
  const props = __props, emits = __emit, { t, locale } = useTranslations();
245
245
  dayjs.extend(customParseFormat), dayjs.extend(isBetween);
246
- const MazInput = defineAsyncComponent(() => import("../components/MazInput.js")), MazPopover = defineAsyncComponent(() => import("../components/MazPopover.js")), MazPickerContainer = defineAsyncComponent(() => import("./MazPickerContainer.DP0fFknc.js")), instanceId = useInstanceUniqId({ componentName: "MazDatePicker", providedId: props.id }), currentValue = computed({
246
+ const MazInput = defineAsyncComponent(() => import("../components/MazInput.js")), MazPopover = defineAsyncComponent(() => import("../components/MazPopover.js")), MazPickerContainer = defineAsyncComponent(() => import("./MazPickerContainer.CFRr8ziz.js")), instanceId = useInstanceUniqId({ componentName: "MazDatePicker", providedId: props.id }), currentValue = computed({
247
247
  get: () => typeof props.modelValue == "object" || props.range ? {
248
248
  start: typeof props.modelValue == "object" && props.modelValue.start ? dayjs(props.modelValue.start, props.format).format() : void 0,
249
249
  end: typeof props.modelValue == "object" && props.modelValue.end ? dayjs(props.modelValue.end, props.format).format() : void 0
@@ -291,7 +291,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
291
291
  if (!currentValue.value)
292
292
  return;
293
293
  let formattedDate;
294
- return props.onlyTime && typeof currentValue.value == "string" && currentValue.value ? formattedDate = currentValue.value ? n(dayjs(currentValue.value).format(), localeModel.value, {
294
+ return props.onlyTime && typeof currentValue.value == "string" && currentValue.value ? formattedDate = currentValue.value ? formatDate(dayjs(currentValue.value).format(), localeModel.value, {
295
295
  timeStyle: formatterOptions.value.timeStyle,
296
296
  hour12: formatterOptions.value.hour12
297
297
  }) : void 0 : isRangeMode.value && isRangeValue(currentValue.value) ? formattedDate = getRangeFormattedDate({
@@ -499,14 +499,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
499
499
  }), MazDatePicker = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-e9e40141"]]);
500
500
  export {
501
501
  MazDatePicker as M,
502
- getDaysInMonth as a,
503
- getFirstDayOfMonth as b,
504
- isRangeValue as c,
505
- isValidDate as d,
506
- isSameDay as e,
507
- findNearestNumberInList as f,
502
+ findNearestNumberInList as a,
503
+ getDaysInMonth as b,
504
+ getFirstDayOfMonth as c,
505
+ isRangeValue as d,
506
+ isValidDate as e,
507
+ formatDate as f,
508
508
  getDaysOfWeek as g,
509
+ isSameDay as h,
509
510
  isSameDate as i,
510
- n,
511
511
  scrollToTarget as s
512
512
  };
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, mergeModels, defineAsyncComponent, useModel, computed, watch, createBlock, openBlock, normalizeStyle, normalizeClass, withCtx, createElementVNode, unref, renderSlot, createElementBlock, Fragment, renderList, mergeProps, withModifiers, createTextVNode, toDisplayString, withKeys, createVNode, createSlots, resolveDynamicComponent } from "vue";
2
2
  import { MazChevronDown } from "@maz-ui/icons";
3
3
  import { useTranslations } from "@maz-ui/translations";
4
- import { e } from "./isClient.8V3qjGdO.js";
4
+ import { i as isClient } from "./isClient.WI4oSt66.js";
5
5
  import { useInstanceUniqId } from "../composables/useInstanceUniqId.js";
6
6
  import MazPopover from "../components/MazPopover.js";
7
7
  import '../assets/MazDropdown.D90GEKDB.css';const _hoisted_1 = ["id", "aria-expanded"], _hoisted_2 = ["id"], _hoisted_3 = ["id"], _hoisted_4 = ["onClick", "onKeypress"], _sfc_main = /* @__PURE__ */ defineComponent({
@@ -89,7 +89,7 @@ import '../assets/MazDropdown.D90GEKDB.css';const _hoisted_1 = ["id", "aria-expa
89
89
  return watch(
90
90
  isOpen,
91
91
  (value) => {
92
- e() && (value ? document.addEventListener("keydown", keydownHandler) : document.removeEventListener("keydown", keydownHandler));
92
+ isClient() && (value ? document.addEventListener("keydown", keydownHandler) : document.removeEventListener("keydown", keydownHandler));
93
93
  }
94
94
  ), (_ctx, _cache) => (openBlock(), createBlock(MazPopover, {
95
95
  trigger: _ctx.trigger,
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, defineAsyncComponent, computed, createElementBlock, openBlock, normalizeStyle, normalizeClass, createBlock, createCommentVNode, createVNode, unref, withCtx, mergeProps, withKeys, withModifiers } from "vue";
2
2
  import { MazMinus, MazPlus } from "@maz-ui/icons";
3
- import { i } from "./debounce.DhXdop6X.js";
3
+ import { d as debounce } from "./debounce.Brzkn9pm.js";
4
4
  import MazInput from "../components/MazInput.js";
5
5
  import '../assets/MazInputNumber.C3rw4i2e.css';const _sfc_main = /* @__PURE__ */ defineComponent({
6
6
  inheritAttrs: !1,
@@ -37,7 +37,7 @@ import '../assets/MazInputNumber.C3rw4i2e.css';const _sfc_main = /* @__PURE__ */
37
37
  if (typeof value == "number")
38
38
  return value <= props.min ? props.min : value >= props.max ? props.max : findClosestStep(value);
39
39
  }
40
- const emitDebounced = i((value) => emitValue(value), 300);
40
+ const emitDebounced = debounce((value) => emitValue(value), 300);
41
41
  function emitValue(newValue) {
42
42
  newValue = checkValue(newValue), currentValue.value !== newValue && emits("update:model-value", newValue);
43
43
  }
@@ -88,12 +88,12 @@ function useLibphonenumber() {
88
88
  loadExamples
89
89
  };
90
90
  }
91
- async function c() {
91
+ async function fetchLocaleIp() {
92
92
  try {
93
- const o = await fetch("https://ipwho.is"), { country_code: t } = await o.json();
94
- return t;
95
- } catch (o) {
96
- console.error(`[maz-ui](fetchLocaleIp) ${o}`);
93
+ const reponse = await fetch("https://ipwho.is"), { country_code } = await reponse.json();
94
+ return country_code;
95
+ } catch (error) {
96
+ console.error(`[maz-ui](fetchLocaleIp) ${error}`);
97
97
  return;
98
98
  }
99
99
  }
@@ -134,7 +134,7 @@ function getCountryList(locale, customCountriesNameListByIsoCode) {
134
134
  }
135
135
  async function fetchCountryCode() {
136
136
  try {
137
- const countryCode = await c();
137
+ const countryCode = await fetchLocaleIp();
138
138
  return countryCode ? {
139
139
  data: countryCode,
140
140
  error: void 0
@@ -216,7 +216,7 @@ const _hoisted_1 = ["id"], _hoisted_2 = { class: "m-input-phone-number__country-
216
216
  },
217
217
  emits: ["update:model-value", "country-code", "update:country-code", "data"],
218
218
  setup(__props, { emit: __emit }) {
219
- const props = __props, emits = __emit, MazSelectCountry = defineAsyncComponent(() => import("../components/MazSelectCountry.js")), PhoneInput = defineAsyncComponent(() => import("./PhoneInput.DukRZp5u.js")), { fetchCountryCode: fetchCountryCode2, getBrowserLocale: getBrowserLocale2, getCountryList: getCountryList2 } = useMazInputPhoneNumber(), { isCountryAvailable: isCountryAvailable2, getPhoneNumberResults: getPhoneNumberResults2 } = useLibphonenumber(), instanceId = useInstanceUniqId({
219
+ const props = __props, emits = __emit, MazSelectCountry = defineAsyncComponent(() => import("../components/MazSelectCountry.js")), PhoneInput = defineAsyncComponent(() => import("./PhoneInput.BE6bXfav.js")), { fetchCountryCode: fetchCountryCode2, getBrowserLocale: getBrowserLocale2, getCountryList: getCountryList2 } = useMazInputPhoneNumber(), { isCountryAvailable: isCountryAvailable2, getPhoneNumberResults: getPhoneNumberResults2 } = useLibphonenumber(), instanceId = useInstanceUniqId({
220
220
  componentName: "MazInputPhoneNumber",
221
221
  providedId: props.id
222
222
  }), phoneNumber = ref(), selectedCountry = ref(), { t } = useTranslations(), messages = computed(() => ({
@@ -1,35 +1,35 @@
1
1
  import { defineComponent, ref, watch, computed, onMounted, createBlock, openBlock, withKeys, unref, nextTick } from "vue";
2
2
  import { MazBanknotes } from "@maz-ui/icons";
3
3
  import MazInput from "../components/MazInput.js";
4
- const u = {
4
+ const DEFAULT_OPTIONS = {
5
5
  style: "currency",
6
6
  minimumFractionDigits: 2,
7
7
  round: !1
8
8
  };
9
- function o(t, r, e) {
10
- let i = +t;
11
- return e.round && (i = Math.floor(i), e.minimumFractionDigits = 0), new Intl.NumberFormat(r, e).format(i);
9
+ function getFormattedCurrency(number, locale, options) {
10
+ let numberToFormat = +number;
11
+ return options.round && (numberToFormat = Math.floor(numberToFormat), options.minimumFractionDigits = 0), new Intl.NumberFormat(locale, options).format(numberToFormat);
12
12
  }
13
- function c(t, r, e) {
14
- if (t === void 0)
13
+ function validRequiredAttributes(number, locale, options) {
14
+ if (number === void 0)
15
15
  throw new TypeError("[maz-ui](FilterCurrency) The `number` attribute is required.");
16
- if (r === void 0)
16
+ if (locale === void 0)
17
17
  throw new TypeError("[maz-ui](FilterCurrency) The `locale` attribute is required.");
18
- if (typeof r != "string")
18
+ if (typeof locale != "string")
19
19
  throw new TypeError("[maz-ui](FilterCurrency) The `locale` attribute must be a string.");
20
- if (e.currency === void 0)
20
+ if (options.currency === void 0)
21
21
  throw new TypeError("[maz-ui](FilterCurrency) The `options.currency` attribute is required.");
22
22
  }
23
- function a(t, r, e) {
24
- const i = {
25
- ...u,
26
- ...e
23
+ function formatCurrency(number, locale, options) {
24
+ const options_ = {
25
+ ...DEFAULT_OPTIONS,
26
+ ...options
27
27
  };
28
- c(t, r, i);
28
+ validRequiredAttributes(number, locale, options_);
29
29
  try {
30
- return o(t, r, i);
31
- } catch (n) {
32
- throw new Error(`[maz-ui](FilterCurrency) ${n}`);
30
+ return getFormattedCurrency(number, locale, options_);
31
+ } catch (error) {
32
+ throw new Error(`[maz-ui](FilterCurrency) ${error}`);
33
33
  }
34
34
  }
35
35
  const _sfc_main = /* @__PURE__ */ defineComponent({
@@ -53,7 +53,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
53
53
  const props = __props, emits = __emit, internalValue = ref(getAdjustedPrice(props.modelValue));
54
54
  watch(() => props.modelValue, updateInternalValue);
55
55
  const isActive = ref(!1), valueString = computed(() => props.modelValue?.toString()), valueNumber = computed(() => props.modelValue), priceFormatted = computed(
56
- () => typeof valueNumber.value == "number" ? a(valueNumber.value, props.locale, { ...props.currencyOptions, currency: props.currency }) : void 0
56
+ () => typeof valueNumber.value == "number" ? formatCurrency(valueNumber.value, props.locale, { ...props.currencyOptions, currency: props.currency }) : void 0
57
57
  );
58
58
  function getAdjustedPrice(value) {
59
59
  const isNegative = typeof value == "string" && value.startsWith("-");
@@ -21,7 +21,7 @@ import '../assets/MazPickerCalendar.e-eF8E7m.css';const _hoisted_1 = { class: "m
21
21
  },
22
22
  emits: ["update:model-value", "update:calendar-date"],
23
23
  setup(__props, { emit: __emit }) {
24
- const props = __props, emits = __emit, MazPickerCalendarMonth = defineAsyncComponent(() => import("./MazPickerCalendarMonth.TJfbseNp.js")), MazPickerCalendarSwitcher = defineAsyncComponent(() => import("./MazPickerCalendarSwitcher.lOvJV15Q.js")), MazPickerMonthSwitcher = defineAsyncComponent(() => import("./MazPickerMonthSwitcher.C3OsIZfi.js")), MazPickerShortcuts = defineAsyncComponent(() => import("./MazPickerShortcuts.CMySiKny.js")), MazPickerYearSwitcher = defineAsyncComponent(() => import("./MazPickerYearSwitcher.Da4W6W5q.js")), hoverredDay = ref(), hasShortcuts = computed(
24
+ const props = __props, emits = __emit, MazPickerCalendarMonth = defineAsyncComponent(() => import("./MazPickerCalendarMonth.DKCt3__u.js")), MazPickerCalendarSwitcher = defineAsyncComponent(() => import("./MazPickerCalendarSwitcher.C01uOHRy.js")), MazPickerMonthSwitcher = defineAsyncComponent(() => import("./MazPickerMonthSwitcher.BlPMSBuX.js")), MazPickerShortcuts = defineAsyncComponent(() => import("./MazPickerShortcuts.CMySiKny.js")), MazPickerYearSwitcher = defineAsyncComponent(() => import("./MazPickerYearSwitcher.oPES1_VL.js")), hoverredDay = ref(), hasShortcuts = computed(
25
25
  () => props.shortcuts && props.shortcuts.length > 0 && props.range
26
26
  ), monthSwitcherOpen = ref(!1), yearSwitcherOpen = ref(!1), currentValue = computed({
27
27
  get: () => props.modelValue,
@@ -1,8 +1,8 @@
1
1
  import { defineComponent, computed, createElementBlock, openBlock, Fragment, renderList, toDisplayString, useCssVars, ref, watch, createVNode, TransitionGroup, withCtx, normalizeClass, createBlock, createElementVNode } from "vue";
2
2
  import dayjs from "dayjs";
3
- import { g as getDaysOfWeek, a as getDaysInMonth, b as getFirstDayOfMonth, c as isRangeValue, i as isSameDate, d as isValidDate, e as isSameDay } from "./MazDatePicker.B3DDfxjV.js";
3
+ import { g as getDaysOfWeek, b as getDaysInMonth, c as getFirstDayOfMonth, d as isRangeValue, i as isSameDate, e as isValidDate, h as isSameDay } from "./MazDatePicker.DI69gr3i.js";
4
4
  import { _ as _export_sfc } from "./_plugin-vue_export-helper.B--vMWp3.js";
5
- import { i } from "./debounce.DhXdop6X.js";
5
+ import { d as debounce } from "./debounce.Brzkn9pm.js";
6
6
  import MazBtn from "../components/MazBtn.js";
7
7
  import '../assets/MazPickerCalendarMonth.DpijYq-O.css';const _hoisted_1 = { class: "maz-picker-calendar-days" }, _sfc_main$2 = /* @__PURE__ */ defineComponent({
8
8
  __name: "MazPickerCalendarDays",
@@ -46,7 +46,7 @@ import '../assets/MazPickerCalendarMonth.DpijYq-O.css';const _hoisted_1 = { clas
46
46
  get: () => props.modelValue,
47
47
  set: (value) => emits("update:model-value", value)
48
48
  }), monthDays = computed(
49
- () => Array.from({ length: getDaysInMonth(props.calendarDate) }, (_v, i2) => i2 + 1).map((day) => ({
49
+ () => Array.from({ length: getDaysInMonth(props.calendarDate) }, (_v, i) => i + 1).map((day) => ({
50
50
  label: day,
51
51
  date: dayjs(props.calendarDate).set("date", day)
52
52
  }))
@@ -131,7 +131,7 @@ import '../assets/MazPickerCalendarMonth.DpijYq-O.css';const _hoisted_1 = { clas
131
131
  function isBiggerMaxDate(day) {
132
132
  return props.maxDate ? dayjs(day).isAfter(props.maxDate, "date") : !1;
133
133
  }
134
- const removeContainerHeight = i(() => {
134
+ const removeContainerHeight = debounce(() => {
135
135
  MazDatePickerGrid.value && (MazDatePickerGrid.value.style.minHeight = "");
136
136
  }, 400);
137
137
  function setContainerHeight() {
@@ -154,8 +154,8 @@ import '../assets/MazPickerCalendarMonth.DpijYq-O.css';const _hoisted_1 = { clas
154
154
  class: normalizeClass(["maz-picker-calendar-grid__container", { "--is-range": __props.range }])
155
155
  }, [
156
156
  (openBlock(!0), createElementBlock(Fragment, null, renderList(emptyDaysCount.value, (first) => (openBlock(), createElementBlock("div", { key: first }))), 128)),
157
- (openBlock(!0), createElementBlock(Fragment, null, renderList(monthDays.value, ({ label, date }, i2) => (openBlock(), createBlock(MazBtn, {
158
- key: i2,
157
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(monthDays.value, ({ label, date }, i) => (openBlock(), createBlock(MazBtn, {
158
+ key: i,
159
159
  size: "mini",
160
160
  color: getDayButtonColor(date),
161
161
  type: "button",
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, computed, createElementBlock, openBlock, createVNode, withCtx, unref, createTextVNode, toDisplayString } from "vue";
2
2
  import { MazChevronLeft } from "@maz-ui/icons";
3
- import { r } from "./capitalize.CVQ1jDrh.js";
4
- import { n } from "./MazDatePicker.B3DDfxjV.js";
3
+ import { c as capitalize } from "./capitalize.BF6CDS_4.js";
4
+ import { f as formatDate } from "./MazDatePicker.DI69gr3i.js";
5
5
  import dayjs from "dayjs";
6
6
  import MazBtn from "../components/MazBtn.js";
7
7
  import { _ as _export_sfc } from "./_plugin-vue_export-helper.B--vMWp3.js";
@@ -20,14 +20,14 @@ import '../assets/MazPickerCalendarSwitcher.ByAVjy00.css';const _hoisted_1 = { c
20
20
  "update:calendar-date"
21
21
  ],
22
22
  setup(__props, { emit: __emit }) {
23
- const props = __props, emits = __emit, calendarDate2 = computed(() => dayjs(props.calendarDate)), monthLabel = computed(() => props.double ? `${r(
24
- n(calendarDate2.value.format(), props.locale, { month: "short" }) ?? calendarDate2.value.format()
25
- )} - ${r(
26
- n(calendarDate2.value.add(1, "month").format(), props.locale, {
23
+ const props = __props, emits = __emit, calendarDate2 = computed(() => dayjs(props.calendarDate)), monthLabel = computed(() => props.double ? `${capitalize(
24
+ formatDate(calendarDate2.value.format(), props.locale, { month: "short" }) ?? calendarDate2.value.format()
25
+ )} - ${capitalize(
26
+ formatDate(calendarDate2.value.add(1, "month").format(), props.locale, {
27
27
  month: "short"
28
28
  }) ?? calendarDate2.value.add(1, "month").format()
29
- )}` : r(n(calendarDate2.value.format(), props.locale, { month: "short" }) ?? calendarDate2.value.format())), yearLabel = computed(
30
- () => n(calendarDate2.value.format(), props.locale, { year: "numeric" })
29
+ )}` : capitalize(formatDate(calendarDate2.value.format(), props.locale, { month: "short" }) ?? calendarDate2.value.format())), yearLabel = computed(
30
+ () => formatDate(calendarDate2.value.format(), props.locale, { year: "numeric" })
31
31
  );
32
32
  function previousMonth() {
33
33
  emits("update:calendar-date", dayjs(props.calendarDate).subtract(1, "month").format());
@@ -30,7 +30,7 @@ import '../assets/MazPickerContainer.DmHuaFqE.css';const _hoisted_1 = { class: "
30
30
  },
31
31
  emits: ["update:model-value", "update:calendar-date", "close"],
32
32
  setup(__props, { emit: __emit }) {
33
- const emits = __emit, MazPickerCalendar = defineAsyncComponent(() => import("./MazPickerCalendar.B5IHMawO.js")), MazPickerHeader = defineAsyncComponent(() => import("./MazPickerHeader.JAJVo08c.js")), MazPickerTime = defineAsyncComponent(() => import("./MazPickerTime.BpMRZUGU.js")), lastTimeValue = ref(typeof __props.modelValue == "string" && __props.hasTime ? dayjs(__props.modelValue).format("HH:mm") : "00:00");
33
+ const emits = __emit, MazPickerCalendar = defineAsyncComponent(() => import("./MazPickerCalendar.DouWTWHn.js")), MazPickerHeader = defineAsyncComponent(() => import("./MazPickerHeader.CcE5eDEe.js")), MazPickerTime = defineAsyncComponent(() => import("./MazPickerTime.D7KXPIQ7.js")), lastTimeValue = ref(typeof __props.modelValue == "string" && __props.hasTime ? dayjs(__props.modelValue).format("HH:mm") : "00:00");
34
34
  function saveLastTimeValue(value) {
35
35
  lastTimeValue.value = dayjs(value).format("HH:mm"), emits("update:model-value", value);
36
36
  }
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, computed, ref, watch, createElementBlock, openBlock, normalizeClass, createCommentVNode, createVNode, TransitionGroup, withCtx, Fragment, renderList, toDisplayString } from "vue";
2
- import { r } from "./capitalize.CVQ1jDrh.js";
3
- import { n } from "./MazDatePicker.B3DDfxjV.js";
2
+ import { c as capitalize } from "./capitalize.BF6CDS_4.js";
3
+ import { f as formatDate } from "./MazDatePicker.DI69gr3i.js";
4
4
  import dayjs from "dayjs";
5
5
  import { _ as _export_sfc } from "./_plugin-vue_export-helper.B--vMWp3.js";
6
6
  import '../assets/MazPickerHeader.D7JXgA3q.css';const _hoisted_1 = {
@@ -21,27 +21,27 @@ import '../assets/MazPickerHeader.D7JXgA3q.css';const _hoisted_1 = {
21
21
  setup(__props) {
22
22
  const refDate = computed(
23
23
  () => typeof __props.modelValue == "string" ? __props.modelValue : __props.modelValue?.start
24
- ), transitionName = ref("maz-slidevnext"), year = computed(() => __props.modelValue && typeof __props.modelValue == "object" ? `${__props.modelValue.start ? n(__props.modelValue.start, __props.locale, {
24
+ ), transitionName = ref("maz-slidevnext"), year = computed(() => __props.modelValue && typeof __props.modelValue == "object" ? `${__props.modelValue.start ? formatDate(__props.modelValue.start, __props.locale, {
25
25
  year: "numeric",
26
26
  timeZone: __props.formatterOptions.timeZone
27
- }) : "..."} - ${__props.modelValue.end ? n(__props.modelValue.end, __props.locale, {
27
+ }) : "..."} - ${__props.modelValue.end ? formatDate(__props.modelValue.end, __props.locale, {
28
28
  year: "numeric",
29
29
  timeZone: __props.formatterOptions.timeZone
30
- }) : "..."}` : typeof __props.modelValue == "string" ? n(__props.modelValue, __props.locale, {
30
+ }) : "..."}` : typeof __props.modelValue == "string" ? formatDate(__props.modelValue, __props.locale, {
31
31
  year: "numeric",
32
32
  timeZone: __props.formatterOptions.timeZone
33
33
  }) : "-"), yearArray = computed(() => __props.hasDate ? [year.value] : void 0), dateString = computed(() => {
34
34
  if (__props.modelValue && typeof __props.modelValue == "object" && (__props.modelValue.start || __props.modelValue.end)) {
35
35
  const dateOption = __props.hideShortcuts && !__props.double ? "short" : "long";
36
- return `${__props.modelValue.start ? r(
37
- n(__props.modelValue.start, __props.locale, {
36
+ return `${__props.modelValue.start ? capitalize(
37
+ formatDate(__props.modelValue.start, __props.locale, {
38
38
  weekday: dateOption,
39
39
  month: dateOption,
40
40
  day: "numeric",
41
41
  timeZone: __props.formatterOptions.timeZone
42
42
  }) ?? __props.modelValue.start
43
- ) : "..."} - ${__props.modelValue.end ? r(
44
- n(__props.modelValue.end, __props.locale, {
43
+ ) : "..."} - ${__props.modelValue.end ? capitalize(
44
+ formatDate(__props.modelValue.end, __props.locale, {
45
45
  weekday: dateOption,
46
46
  month: dateOption,
47
47
  day: "numeric",
@@ -49,16 +49,16 @@ import '../assets/MazPickerHeader.D7JXgA3q.css';const _hoisted_1 = {
49
49
  }) ?? __props.modelValue.end
50
50
  ) : "..."}`;
51
51
  } else if (typeof __props.modelValue == "string") {
52
- const formattedDate = n(__props.modelValue, __props.locale, {
52
+ const formattedDate = formatDate(__props.modelValue, __props.locale, {
53
53
  weekday: "long",
54
54
  month: "long",
55
55
  day: "numeric",
56
56
  timeZone: __props.formatterOptions.timeZone
57
57
  });
58
- return formattedDate ? r(formattedDate) : void 0;
58
+ return formattedDate ? capitalize(formattedDate) : void 0;
59
59
  }
60
60
  return "-";
61
- }), dateStringArray = computed(() => __props.hasDate ? [dateString.value] : void 0), timeValue = computed(() => refDate.value ? n(refDate.value, __props.locale, {
61
+ }), dateStringArray = computed(() => __props.hasDate ? [dateString.value] : void 0), timeValue = computed(() => refDate.value ? formatDate(refDate.value, __props.locale, {
62
62
  timeStyle: "short",
63
63
  timeZone: __props.formatterOptions.timeZone,
64
64
  hour12: __props.formatterOptions.hour12
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, computed, createElementBlock, openBlock, createElementVNode, createVNode, withModifiers, withCtx, unref, normalizeClass, Fragment, renderList, createBlock, createTextVNode, toDisplayString } from "vue";
2
2
  import { MazXMark } from "@maz-ui/icons";
3
- import { r } from "./capitalize.CVQ1jDrh.js";
4
- import { n, i as isSameDate } from "./MazDatePicker.B3DDfxjV.js";
3
+ import { c as capitalize } from "./capitalize.BF6CDS_4.js";
4
+ import { f as formatDate, i as isSameDate } from "./MazDatePicker.DI69gr3i.js";
5
5
  import dayjs from "dayjs";
6
6
  import MazBtn from "../components/MazBtn.js";
7
7
  import { _ as _export_sfc } from "./_plugin-vue_export-helper.B--vMWp3.js";
@@ -18,19 +18,19 @@ import '../assets/MazPickerMonthSwitcher.BJGGy53r.css';const _hoisted_1 = { clas
18
18
  const props = __props, emits = __emit, months = computed(() => Array.from({ length: 12 }, (_v, i) => i).map((monthNumber) => {
19
19
  const monthDate = dayjs(props.calendarDate).set("month", monthNumber);
20
20
  return props.double ? {
21
- label: `${r(
22
- n(monthDate.format(), props.locale, {
21
+ label: `${capitalize(
22
+ formatDate(monthDate.format(), props.locale, {
23
23
  month: "short"
24
24
  }) ?? monthDate.add(1, "month").format()
25
- )} - ${r(
26
- n(monthDate.add(1, "month").format(), props.locale, {
25
+ )} - ${capitalize(
26
+ formatDate(monthDate.add(1, "month").format(), props.locale, {
27
27
  month: "short"
28
28
  }) ?? monthDate.add(1, "month").format()
29
29
  )}`,
30
30
  date: monthDate
31
31
  } : {
32
- label: r(
33
- n(monthDate.format(), props.locale, {
32
+ label: capitalize(
33
+ formatDate(monthDate.format(), props.locale, {
34
34
  month: "long"
35
35
  }) ?? monthDate.format()
36
36
  ),
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, computed, ref, onMounted, watch, nextTick, createElementBlock, openBlock, normalizeClass, Fragment, renderList, createElementVNode, normalizeStyle, createBlock, withModifiers, withCtx, createTextVNode, toDisplayString } from "vue";
2
2
  import dayjs from "dayjs";
3
3
  import MazBtn from "../components/MazBtn.js";
4
- import { f as findNearestNumberInList, s as scrollToTarget } from "./MazDatePicker.B3DDfxjV.js";
4
+ import { a as findNearestNumberInList, s as scrollToTarget } from "./MazDatePicker.DI69gr3i.js";
5
5
  import { _ as _export_sfc } from "./_plugin-vue_export-helper.B--vMWp3.js";
6
6
  import '../assets/MazPickerTime.yINUjbDZ.css';const _hoisted_1 = { class: "m-date-picker-time__column__items" }, _sfc_main = /* @__PURE__ */ defineComponent({
7
7
  __name: "MazPickerTime",
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, ref, computed, createElementBlock, openBlock, createElementVNode, createVNode, withModifiers, withCtx, unref, Fragment, renderList, createBlock, normalizeClass, createTextVNode, toDisplayString } from "vue";
2
2
  import { MazChevronLeft, MazXMark } from "@maz-ui/icons";
3
- import { n, i as isSameDate } from "./MazDatePicker.B3DDfxjV.js";
3
+ import { f as formatDate, i as isSameDate } from "./MazDatePicker.DI69gr3i.js";
4
4
  import dayjs from "dayjs";
5
5
  import MazBtn from "../components/MazBtn.js";
6
6
  import { _ as _export_sfc } from "./_plugin-vue_export-helper.B--vMWp3.js";
@@ -16,7 +16,7 @@ import '../assets/MazPickerYearSwitcher.DPD1_dfz.css';const _hoisted_1 = { class
16
16
  const props = __props, emits = __emit, currentDateTmp = ref(props.calendarDate), years = computed(() => Array.from({ length: 15 }, (_v, i) => i - 7).map((yearNumber) => {
17
17
  const currentYear = dayjs(currentDateTmp.value).get("year"), dateYear = dayjs(currentDateTmp.value).set("year", currentYear + yearNumber);
18
18
  return {
19
- label: n(dateYear.format(), props.locale, {
19
+ label: formatDate(dateYear.format(), props.locale, {
20
20
  year: "numeric"
21
21
  }) ?? dateYear.format(),
22
22
  date: dateYear
@@ -1,10 +1,10 @@
1
1
  import { defineComponent, ref, watch, createElementBlock, openBlock, normalizeClass, renderSlot } from "vue";
2
- import { i } from "./debounce.DhXdop6X.js";
2
+ import { d as debounce } from "./debounce.Brzkn9pm.js";
3
3
  import { useInjectStrict } from "../composables/useInjectStrict.js";
4
4
  const _sfc_main = /* @__PURE__ */ defineComponent({
5
5
  __name: "MazTabsContent",
6
6
  setup(__props) {
7
- const hideOverflow = ref(!1), { currentTab } = useInjectStrict("maz-tabs"), allowOverFlow = i(() => {
7
+ const hideOverflow = ref(!1), { currentTab } = useInjectStrict("maz-tabs"), allowOverFlow = debounce(() => {
8
8
  hideOverflow.value = !1;
9
9
  }, 700);
10
10
  function setOverflowHiddenTemp() {
@@ -2,7 +2,7 @@ import { defineComponent, mergeModels, useModel, ref, computed, onMounted, useTe
2
2
  import { useTranslations } from "@maz-ui/translations";
3
3
  import { useInjectStrict } from "../composables/useInjectStrict.js";
4
4
  import MazInput from "../components/MazInput.js";
5
- import { u as useLibphonenumber, a as useMazInputPhoneNumber } from "./MazInputPhoneNumber.CDy6n_Qj.js";
5
+ import { u as useLibphonenumber, a as useMazInputPhoneNumber } from "./MazInputPhoneNumber.CfClhmow.js";
6
6
  import { _ as _export_sfc } from "./_plugin-vue_export-helper.B--vMWp3.js";
7
7
  import '../assets/PhoneInput.DkOXlrI9.css';const _sfc_main = /* @__PURE__ */ defineComponent({
8
8
  __name: "PhoneInput",
@@ -0,0 +1,6 @@
1
+ function capitalize(value) {
2
+ return typeof value != "string" ? "" : value.charAt(0).toUpperCase() + value.slice(1);
3
+ }
4
+ export {
5
+ capitalize as c
6
+ };
@@ -0,0 +1,16 @@
1
+ function checkAvailability(getRef, callback, options) {
2
+ const opts = {
3
+ maxAttempts: 20,
4
+ interval: 100,
5
+ ...options
6
+ };
7
+ let attempts = 0;
8
+ function check() {
9
+ const ref = getRef();
10
+ ref != null ? opts.expectedValue !== void 0 && ref !== opts.expectedValue ? attempts < opts.maxAttempts ? (attempts++, setTimeout(check, opts.interval)) : opts.onError?.(new Error(opts.errorMessage || `[maz-ui](checkAvailability) Nothing found after ${opts.maxAttempts} attempts`)) : callback(ref) : attempts < opts.maxAttempts ? (attempts++, setTimeout(check, opts.interval)) : opts.onError?.(new Error(opts.errorMessage || `[maz-ui](checkAvailability) Nothing found after ${opts.maxAttempts} attempts`));
11
+ }
12
+ check();
13
+ }
14
+ export {
15
+ checkAvailability as c
16
+ };
@@ -0,0 +1,11 @@
1
+ function debounce(fn, delay) {
2
+ let timeout;
3
+ return function(...args) {
4
+ clearTimeout(timeout), timeout = setTimeout(() => {
5
+ fn.apply(this, args);
6
+ }, delay);
7
+ };
8
+ }
9
+ export {
10
+ debounce as d
11
+ };