maz-ui 3.18.2 → 3.19.1

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 (125) hide show
  1. package/components/MazAvatar.mjs +1 -1
  2. package/components/MazBottomSheet.mjs +1 -1
  3. package/components/MazBtn.mjs +1 -1
  4. package/components/MazCard.mjs +1 -1
  5. package/components/MazCarousel.mjs +1 -1
  6. package/components/MazCheckbox.mjs +1 -1
  7. package/components/MazDialog.mjs +1 -1
  8. package/components/MazDialogPromise.mjs +1 -1
  9. package/components/MazDrawer.mjs +1 -1
  10. package/components/MazGallery.mjs +1 -1
  11. package/components/MazIcon.mjs +3 -2
  12. package/components/MazInput.mjs +1 -1
  13. package/components/MazInputNumber.mjs +5 -4
  14. package/components/MazInputPrice.mjs +1 -1
  15. package/components/MazInputTags.mjs +1 -1
  16. package/components/MazLazyImg.mjs +1 -1
  17. package/components/MazPhoneNumberInput/{constantes/locales.d.ts → default-locales.d.ts} +1 -2
  18. package/components/MazPhoneNumberInput/types.d.ts +40 -2
  19. package/components/MazPhoneNumberInput/use-libphonenumber.d.ts +32 -0
  20. package/components/MazPhoneNumberInput.d.ts +65 -14
  21. package/components/MazPhoneNumberInput.mjs +1 -1
  22. package/components/MazPicker/utils.d.ts +1 -4
  23. package/components/MazPicker.mjs +1 -1
  24. package/components/MazRadioButtons.mjs +2 -1
  25. package/components/MazSelect.d.ts +2 -0
  26. package/components/MazSelect.mjs +1 -1
  27. package/components/MazSlider.mjs +2 -1
  28. package/components/MazStepper.mjs +1 -1
  29. package/components/MazSwitch.mjs +2 -1
  30. package/components/MazTabs.mjs +2 -1
  31. package/components/MazTabsBar.mjs +1 -1
  32. package/components/MazTabsContentItem.mjs +1 -1
  33. package/components/MazTextarea.mjs +2 -1
  34. package/components/assets/MazPhoneNumberInput.css +1 -1
  35. package/components/assets/MazPickerCalendar.css +1 -1
  36. package/components/assets/MazSelect.css +1 -1
  37. package/components/chunks/{MazAvatar-68e2d653.mjs → MazAvatar-abb04cbe.mjs} +2 -2
  38. package/components/chunks/{MazBottomSheet-1fd128d5.mjs → MazBottomSheet-b78adb87.mjs} +3 -2
  39. package/components/chunks/{MazBtn-ebaa1574.mjs → MazBtn-000f9f66.mjs} +3 -3
  40. package/components/chunks/{MazBtn-80a95ca3.mjs → MazBtn-02b39f75.mjs} +4 -4
  41. package/components/chunks/{MazBtn-7963cdc8.mjs → MazBtn-18894690.mjs} +4 -4
  42. package/components/chunks/{MazBtn-83e85ae7.mjs → MazBtn-21743551.mjs} +4 -4
  43. package/components/chunks/{MazBtn-740fa3f9.mjs → MazBtn-2703c9bd.mjs} +2 -2
  44. package/components/chunks/{MazBtn-113db7ce.mjs → MazBtn-54c47489.mjs} +4 -4
  45. package/components/chunks/{MazBtn-8b76a9b9.mjs → MazBtn-57cb16a1.mjs} +4 -4
  46. package/components/chunks/{MazBtn-aed16fa9.mjs → MazBtn-5a37bfef.mjs} +4 -4
  47. package/components/chunks/{MazBtn-9449d9aa.mjs → MazBtn-67e1fe7b.mjs} +4 -4
  48. package/components/chunks/MazBtn-6e16fbca.mjs +184 -0
  49. package/components/chunks/{MazBtn-360120f0.mjs → MazBtn-9333e80f.mjs} +4 -4
  50. package/components/chunks/{MazBtn-cd553cc1.mjs → MazBtn-9d312f09.mjs} +4 -4
  51. package/components/chunks/MazBtn-a776eb42.mjs +184 -0
  52. package/components/chunks/{MazBtn-875045b0.mjs → MazBtn-b645511d.mjs} +4 -4
  53. package/components/chunks/{MazBtn-9e23a622.mjs → MazBtn-bf133cbc.mjs} +4 -4
  54. package/components/chunks/{MazCard-f0b1207f.mjs → MazCard-d9369776.mjs} +4 -4
  55. package/components/chunks/{MazCarousel-e6c83219.mjs → MazCarousel-06ca7c0b.mjs} +2 -2
  56. package/components/chunks/{MazDialog-5c53a6d7.mjs → MazDialog-d5f6a7d8.mjs} +1 -1
  57. package/components/chunks/{MazDialogPromise-e0a178ee.mjs → MazDialogPromise-23cb2e40.mjs} +2 -2
  58. package/components/chunks/{MazDrawer-682859a4.mjs → MazDrawer-7d6428cf.mjs} +1 -1
  59. package/components/chunks/{MazGallery-345cb883.mjs → MazGallery-c80e96f6.mjs} +2 -2
  60. package/{modules/chunks/MazIcon-1567cfaf.mjs → components/chunks/MazIcon-81176bfa.mjs} +4 -3
  61. package/components/chunks/{MazIcon-146f73d3.mjs → MazIcon-bda198b4.mjs} +3 -2
  62. package/components/chunks/{MazInput-c67999b0.mjs → MazInput-129c8695.mjs} +2 -2
  63. package/components/chunks/{MazInput-0424a850.mjs → MazInput-2a43e4a6.mjs} +3 -3
  64. package/components/chunks/{MazInput-3021f55e.mjs → MazInput-4a02a10a.mjs} +3 -3
  65. package/components/chunks/{MazInput-4b908386.mjs → MazInput-8e284503.mjs} +2 -2
  66. package/components/chunks/{MazInputPrice-50e3ea5d.mjs → MazInputPrice-e88dec74.mjs} +4 -3
  67. package/components/chunks/{MazInputTags-801c15dc.mjs → MazInputTags-872a6fae.mjs} +5 -4
  68. package/components/chunks/{MazLazyImg-a206909b.mjs → MazLazyImg-478c8d2b.mjs} +2 -2
  69. package/components/chunks/{MazLazyImg-13052d11.mjs → MazLazyImg-63de45ce.mjs} +1 -1
  70. package/components/chunks/MazPhoneNumberInput-458455bb.mjs +651 -0
  71. package/components/chunks/{MazPicker-25765233.mjs → MazPicker-6fc29a1c.mjs} +22 -26
  72. package/components/chunks/{MazPickerCalendar-1547bd78.mjs → MazPickerCalendar-6271c78d.mjs} +29 -24
  73. package/components/chunks/{MazPickerHeader-04d6a61f.mjs → MazPickerHeader-4f70f191.mjs} +1 -1
  74. package/components/chunks/{MazPickerMonthSwitcher-791ebc99.mjs → MazPickerMonthSwitcher-674ce015.mjs} +4 -3
  75. package/components/chunks/{MazPickerShortcuts-4bdeae6a.mjs → MazPickerShortcuts-2242854f.mjs} +4 -3
  76. package/components/chunks/{MazPickerTime-0ca05476.mjs → MazPickerTime-bb97786b.mjs} +4 -3
  77. package/components/chunks/{MazPickerYearSwitcher-a338777f.mjs → MazPickerYearSwitcher-47e5444b.mjs} +5 -4
  78. package/components/chunks/{MazSelect-d3d81ae8.mjs → MazSelect-2e7271f3.mjs} +55 -19
  79. package/components/chunks/{MazSelect-c03eaaf8.mjs → MazSelect-41a971ea.mjs} +55 -19
  80. package/components/chunks/{MazSpinner-559fb831.mjs → MazSpinner-232086b5.mjs} +1 -1
  81. package/components/chunks/{MazSpinner-c4d67909.mjs → MazSpinner-25ddb933.mjs} +1 -1
  82. package/components/chunks/{MazSpinner-5be09a6a.mjs → MazSpinner-2cbf1c0a.mjs} +1 -1
  83. package/components/chunks/{MazSpinner-450e5795.mjs → MazSpinner-2fac70be.mjs} +1 -1
  84. package/components/chunks/{MazSpinner-07d6be3a.mjs → MazSpinner-467d514f.mjs} +1 -1
  85. package/components/chunks/MazSpinner-47025e56.mjs +46 -0
  86. package/components/chunks/{MazSpinner-a3fe9ccb.mjs → MazSpinner-4b2a2fda.mjs} +1 -1
  87. package/components/chunks/{MazSpinner-24e65651.mjs → MazSpinner-5368411e.mjs} +1 -1
  88. package/components/chunks/MazSpinner-5921e33f.mjs +46 -0
  89. package/components/chunks/MazSpinner-60ca1f4c.mjs +46 -0
  90. package/components/chunks/{MazSpinner-33f756c4.mjs → MazSpinner-6c664898.mjs} +1 -1
  91. package/components/chunks/{MazSpinner-50959d38.mjs → MazSpinner-984d259a.mjs} +1 -1
  92. package/components/chunks/MazSpinner-a74389bd.mjs +46 -0
  93. package/components/chunks/{MazSpinner-ac676f71.mjs → MazSpinner-bed2bced.mjs} +1 -1
  94. package/components/chunks/{MazSpinner-5baeb3f0.mjs → MazSpinner-d6625983.mjs} +1 -1
  95. package/components/chunks/MazSpinner-f04bbd1e.mjs +46 -0
  96. package/components/chunks/{MazStepper-d61114a7.mjs → MazStepper-293b4be5.mjs} +4 -3
  97. package/components/chunks/{MazTabsBar-6f1ed175.mjs → MazTabsBar-6dffbdde.mjs} +2 -2
  98. package/components/chunks/{MazTransitionExpand-e408307c.mjs → MazTransitionExpand-648e21e0.mjs} +1 -1
  99. package/components/chunks/{MazTransitionExpand-bf4cb245.mjs → MazTransitionExpand-f3018af6.mjs} +1 -1
  100. package/modules/assets/index.css +1 -1
  101. package/modules/chunks/{MazBtn-bf5d1483.mjs → MazBtn-6418f038.mjs} +4 -4
  102. package/{components/chunks/MazIcon-00892ac4.mjs → modules/chunks/MazIcon-c43d744d.mjs} +4 -3
  103. package/modules/chunks/{MazSpinner-dda0b697.mjs → MazSpinner-766c5c8d.mjs} +1 -1
  104. package/modules/chunks/{index-a39534c8.mjs → index-71440a8c.mjs} +10 -8
  105. package/modules/index.mjs +1 -1
  106. package/nuxt/index.json +1 -1
  107. package/package.json +6 -6
  108. package/types/components/MazPhoneNumberInput/{constantes/locales.d.ts → default-locales.d.ts} +1 -2
  109. package/types/components/MazPhoneNumberInput/types.d.ts +40 -2
  110. package/types/components/MazPhoneNumberInput/use-libphonenumber.d.ts +32 -0
  111. package/types/components/MazPhoneNumberInput.vue.d.ts +65 -14
  112. package/types/components/MazPicker/utils.d.ts +1 -4
  113. package/types/components/MazSelect.vue.d.ts +2 -0
  114. package/components/MazPhoneNumberInput/utils/countries-name-list-by-iso-code.d.ts +0 -2
  115. package/components/MazPhoneNumberInput/utils/index.d.ts +0 -12
  116. package/components/chunks/MazBtn-a2eeb3f8.mjs +0 -184
  117. package/components/chunks/MazBtn-b191eece.mjs +0 -184
  118. package/components/chunks/MazPhoneNumberInput-59aa8e06.mjs +0 -854
  119. package/components/chunks/MazSpinner-7e5fb76c.mjs +0 -46
  120. package/components/chunks/MazSpinner-87273e1f.mjs +0 -46
  121. package/components/chunks/MazSpinner-d5f2c266.mjs +0 -46
  122. package/components/chunks/MazSpinner-e4d7bbe9.mjs +0 -46
  123. package/components/chunks/MazSpinner-f40ee2c7.mjs +0 -46
  124. package/types/components/MazPhoneNumberInput/utils/countries-name-list-by-iso-code.d.ts +0 -2
  125. package/types/components/MazPhoneNumberInput/utils/index.d.ts +0 -12
@@ -1,6 +1,6 @@
1
1
  import "../assets/MazBtn.css";
2
2
  import { defineComponent, defineAsyncComponent, useAttrs, useSlots, onBeforeMount, computed, openBlock, createBlock, resolveDynamicComponent, mergeProps, withCtx, createElementBlock, normalizeClass, renderSlot, unref, createCommentVNode, createElementVNode } from "vue";
3
- import { _ as _export_sfc } from "./index-a39534c8.mjs";
3
+ import { _ as _export_sfc } from "./index-71440a8c.mjs";
4
4
  const _sfc_main = /* @__PURE__ */ defineComponent({
5
5
  __name: "MazBtn",
6
6
  props: {
@@ -46,11 +46,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
46
46
  noElevation: { type: Boolean, default: false }
47
47
  },
48
48
  setup(__props) {
49
- const props = __props;
50
- const MazSpinner = defineAsyncComponent(() => import("./MazSpinner-dda0b697.mjs"));
51
- const MazIcon = defineAsyncComponent(() => import("./MazIcon-1567cfaf.mjs"));
49
+ const MazSpinner = defineAsyncComponent(() => import("./MazSpinner-766c5c8d.mjs"));
50
+ const MazIcon = defineAsyncComponent(() => import("./MazIcon-c43d744d.mjs"));
52
51
  const { href, to } = useAttrs();
53
52
  const slots = useSlots();
53
+ const props = __props;
54
54
  onBeforeMount(() => {
55
55
  if (props.icon && !props.fab) {
56
56
  console.error('[maz-ui](MazBtn) the prop "icon" must be used only with "fab" props');
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, ref, computed, onMounted, watchEffect, openBlock, createElementBlock, Fragment, createCommentVNode, mergeProps, nextTick } from "vue";
2
- import { i as injectStrict } from "./MazTabsBar-6f1ed175.mjs";
2
+ import { i as injectStrict } from "./index-71440a8c.mjs";
3
3
  const _hoisted_1 = ["innerHTML"];
4
4
  const _sfc_main = /* @__PURE__ */ defineComponent({
5
5
  __name: "MazIcon",
@@ -15,8 +15,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
15
15
  }
16
16
  },
17
17
  emits: ["loaded", "unloaded", "error"],
18
- setup(__props, { emit: emits }) {
19
- const props = __props;
18
+ setup(__props, { emit: __emit }) {
20
19
  const cache = {};
21
20
  const svgElSource = ref();
22
21
  const svgElem = ref();
@@ -27,6 +26,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
27
26
  return void 0;
28
27
  }
29
28
  };
29
+ const props = __props;
30
+ const emits = __emit;
30
31
  const iconPath = computed(() => props.path ?? getMazIconPath());
31
32
  const fullSrc = computed(() => {
32
33
  if (props.src) {
@@ -1,6 +1,6 @@
1
1
  import "../assets/MazSpinner.css";
2
2
  import { defineComponent, openBlock, createElementBlock, normalizeClass, pushScopeId, popScopeId, createElementVNode } from "vue";
3
- import { _ as _export_sfc } from "./index-a39534c8.mjs";
3
+ import { _ as _export_sfc } from "./index-71440a8c.mjs";
4
4
  const _withScopeId = (n) => (pushScopeId("data-v-c67298ec"), n = n(), popScopeId(), n);
5
5
  const _hoisted_1 = ["width", "height"];
6
6
  const _hoisted_2 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode(
@@ -1103,15 +1103,16 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
1103
1103
  scaleAnimation: { type: Boolean }
1104
1104
  },
1105
1105
  emits: ["close", "previous", "next", "before-close"],
1106
- setup(__props, { emit: emits }) {
1107
- const props = __props;
1108
- const MazSpinner = defineAsyncComponent(() => import("./MazSpinner-dda0b697.mjs"));
1106
+ setup(__props, { emit: __emit }) {
1107
+ const emits = __emit;
1108
+ const MazSpinner = defineAsyncComponent(() => import("./MazSpinner-766c5c8d.mjs"));
1109
1109
  const XMark = defineAsyncComponent(() => import("./x-mark-6dd31278.mjs"));
1110
1110
  const ChevronLeft = defineAsyncComponent(() => import("./chevron-left-7ab9664d.mjs"));
1111
1111
  let vueScrollTo;
1112
1112
  onBeforeMount(async () => {
1113
1113
  vueScrollTo = await import("vue-scrollto");
1114
1114
  });
1115
+ const props = __props;
1115
1116
  const showFullscreenImg = ref(false);
1116
1117
  const imageLoaded = ref(false);
1117
1118
  const showLoader = ref(false);
@@ -1677,15 +1678,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1677
1678
  persistent: { type: Boolean, default: false }
1678
1679
  },
1679
1680
  emits: ["close", "click"],
1680
- setup(__props, { emit: emits }) {
1681
- const props = __props;
1681
+ setup(__props, { emit: __emit }) {
1682
1682
  const XIcon = defineAsyncComponent(() => import("./x-mark-6dd31278.mjs"));
1683
1683
  const ExternalLink = defineAsyncComponent(
1684
1684
  () => import("./arrow-top-right-on-square-3878577d.mjs")
1685
1685
  );
1686
1686
  const Link = defineAsyncComponent(() => import("./link-74f1af7a.mjs"));
1687
- const MazBtn = defineAsyncComponent(() => import("./MazBtn-bf5d1483.mjs"));
1687
+ const MazBtn = defineAsyncComponent(() => import("./MazBtn-6418f038.mjs"));
1688
1688
  const Toaster = ref();
1689
+ const props = __props;
1690
+ const emits = __emit;
1689
1691
  const positionY = computed(() => props.position.includes("top") ? "top" : "bottom");
1690
1692
  const positionX = computed(() => {
1691
1693
  if (props.position.includes("left"))
@@ -1883,8 +1885,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1883
1885
  }
1884
1886
  });
1885
1887
  const MazToast_vue_vue_type_style_index_0_lang = "";
1886
- const MazToast_vue_vue_type_style_index_1_scoped_04b2e191_lang = "";
1887
- const MazToast = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-04b2e191"]]);
1888
+ const MazToast_vue_vue_type_style_index_1_scoped_d9bb9493_lang = "";
1889
+ const MazToast = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-d9bb9493"]]);
1888
1890
  const DEFAULT_OPTIONS$2 = {
1889
1891
  position: "bottom-right",
1890
1892
  timeout: 1e4,
package/modules/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { B, I, S, T, U, W, D, q, r, u, d, i, C, b, o, x, z, a, l, m, w, s, E, y, t, H, L, G, N, F, K, M, J, c, p, k, n, h, j, v, e, f, g, A } from "./chunks/index-a39534c8.mjs";
1
+ import { B, I, S, T, U, W, D, q, r, u, d, i, C, b, o, x, z, a, l, m, w, s, E, y, t, H, L, G, N, F, K, M, J, c, p, k, n, h, j, v, e, f, g, A } from "./chunks/index-71440a8c.mjs";
2
2
  export {
3
3
  B as AosHandler,
4
4
  I as IdleTimeout,
package/nuxt/index.json CHANGED
@@ -4,5 +4,5 @@
4
4
  "compatibility": {
5
5
  "nuxt": "^3.0.0"
6
6
  },
7
- "version": "3.18.2"
7
+ "version": "3.19.1"
8
8
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "maz-ui",
3
- "version": "3.18.2",
3
+ "version": "3.19.1",
4
4
  "description": "A standalone components library for Vue.Js 3 & Nuxt.Js 3",
5
5
  "author": "Louis Mazel <me@loicmazuel.com>",
6
6
  "main": "./modules/index.mjs",
@@ -96,13 +96,13 @@
96
96
  "@babel/core": "^7.23.2",
97
97
  "@babel/preset-env": "^7.23.2",
98
98
  "@babel/preset-typescript": "^7.23.2",
99
- "@nuxt/kit": "^3.7.4",
100
- "@nuxt/schema": "^3.7.4",
99
+ "@nuxt/kit": "^3.8.0",
100
+ "@nuxt/schema": "^3.8.0",
101
101
  "@types/dropzone": "^5.7.6",
102
102
  "@types/google.maps": "^3.54.4",
103
103
  "@vitejs/plugin-vue": "^4.4.0",
104
104
  "@vitest/coverage-v8": "^0.34.6",
105
- "@vue/compiler-sfc": "^3.3.4",
105
+ "@vue/compiler-sfc": "^3.3.6",
106
106
  "@vue/eslint-config-prettier": "^8.0.0",
107
107
  "@vue/eslint-config-typescript": "^12.0.0",
108
108
  "@vue/test-utils": "^2.4.1",
@@ -121,7 +121,7 @@
121
121
  "json-templater": "^1.2.0",
122
122
  "libphonenumber-js": "^1.10.48",
123
123
  "minimist": "^1.2.8",
124
- "nuxt": "^3.7.4",
124
+ "nuxt": "^3.8.0",
125
125
  "onchange": "^7.1.0",
126
126
  "path": "^0.12.7",
127
127
  "postcss": "^8.4.31",
@@ -150,7 +150,7 @@
150
150
  "vite-svg-loader": "^4.0.0",
151
151
  "vitest": "^0.34.6",
152
152
  "vitest-canvas-mock": "^0.3.3",
153
- "vue": "^3.3.4",
153
+ "vue": "^3.3.6",
154
154
  "vue-chartjs": "^5.2.0",
155
155
  "vue-loader": "^17.3.0",
156
156
  "vue-router": "^4.2.5",
@@ -1,4 +1,4 @@
1
- declare const _default: {
1
+ export declare const defaultLocales: {
2
2
  countrySelector: {
3
3
  placeholder: string;
4
4
  error: string;
@@ -9,4 +9,3 @@ declare const _default: {
9
9
  example: string;
10
10
  };
11
11
  };
12
- export default _default;
@@ -1,5 +1,5 @@
1
1
  import type { CountryCallingCode, CountryCode, NationalNumber, NumberType } from 'libphonenumber-js';
2
- import type locales from './constantes/locales';
2
+ import { type defaultLocales } from './default-locales';
3
3
  export type Result = {
4
4
  isValid: boolean;
5
5
  isPossible?: boolean;
@@ -13,9 +13,47 @@ export type Result = {
13
13
  e164?: string;
14
14
  rfc3966?: string;
15
15
  };
16
- export type Translations = typeof locales;
16
+ export type Translations = typeof defaultLocales;
17
17
  export type Country = {
18
18
  iso2: CountryCode;
19
19
  dialCode: CountryCallingCode;
20
20
  name: string;
21
21
  };
22
+ export interface IpWhoResponse {
23
+ ip: string;
24
+ success: true;
25
+ type?: string;
26
+ continent?: string;
27
+ continent_code?: string;
28
+ country?: string;
29
+ country_code?: string;
30
+ region?: string;
31
+ region_code?: string;
32
+ city?: string;
33
+ latitude?: number;
34
+ longitude?: number;
35
+ is_eu: true;
36
+ postal?: string;
37
+ calling_code?: string;
38
+ capital?: string;
39
+ borders?: string;
40
+ flag: {
41
+ img?: string;
42
+ emoji?: string;
43
+ emoji_unicode?: string;
44
+ };
45
+ connection: {
46
+ asn?: number;
47
+ org?: string;
48
+ isp?: string;
49
+ domain?: string;
50
+ };
51
+ timezone: {
52
+ id?: string;
53
+ abbr?: string;
54
+ is_dst: false;
55
+ offset?: number;
56
+ utc?: string;
57
+ current_time?: string;
58
+ };
59
+ }
@@ -0,0 +1,32 @@
1
+ import { type CountryCode, type Examples } from 'libphonenumber-js';
2
+ import type { Country, Result } from './types';
3
+ declare function loadPhoneNumberExamplesFile(): Promise<Examples>;
4
+ declare function isSameCountryCallingCode(countryCode: CountryCode, countryCode2: CountryCode): boolean;
5
+ declare function getPhoneNumberExample(countryCode?: CountryCode): string | undefined;
6
+ declare function sanitizePhoneNumber(input?: string): string;
7
+ declare function getCountriesList(locale?: string, customCountriesNameListByIsoCode?: Record<CountryCode, string>): Country[] | undefined;
8
+ declare function browserLocale(): {
9
+ locale?: undefined;
10
+ browserLocale?: undefined;
11
+ } | {
12
+ locale: string;
13
+ browserLocale: string;
14
+ };
15
+ export declare function isCountryAvailable(locale: string): boolean;
16
+ declare function getAsYouTypeFormat(countryCode?: CountryCode, phoneNumber?: string): string | undefined;
17
+ declare function fetchCountryCode(): Promise<string | undefined>;
18
+ export declare function useLibphonenumber(): {
19
+ fetchCountryCode: typeof fetchCountryCode;
20
+ getAsYouTypeFormat: typeof getAsYouTypeFormat;
21
+ getResultsFromPhoneNumber: ({ phoneNumber, countryCode, }: {
22
+ phoneNumber?: string | undefined;
23
+ countryCode?: CountryCode | undefined;
24
+ }) => Result;
25
+ loadPhoneNumberExamplesFile: typeof loadPhoneNumberExamplesFile;
26
+ getPhoneNumberExample: typeof getPhoneNumberExample;
27
+ sanitizePhoneNumber: typeof sanitizePhoneNumber;
28
+ getCountriesList: typeof getCountriesList;
29
+ browserLocale: typeof browserLocale;
30
+ isSameCountryCallingCode: typeof isSameCountryCallingCode;
31
+ };
32
+ export {};
@@ -9,23 +9,30 @@ declare const _default: import("vue").DefineComponent<{
9
9
  validator: (prop: string) => boolean;
10
10
  default: undefined;
11
11
  };
12
- id: {
13
- type: StringConstructor;
14
- default: undefined;
15
- };
16
- placeholder: {
12
+ /** @deprecated */
13
+ defaultPhoneNumber: {
17
14
  type: StringConstructor;
18
15
  default: undefined;
19
16
  };
20
- defaultPhoneNumber: {
21
- type: StringConstructor;
17
+ countryCode: {
18
+ type: PropType<string>;
22
19
  default: undefined;
20
+ validator: (code: string) => boolean;
23
21
  };
22
+ /** @deprecated - use country-code or v-model:country-code */
24
23
  defaultCountryCode: {
25
24
  type: PropType<string>;
26
25
  default: undefined;
27
26
  validator: (code: string) => boolean;
28
27
  };
28
+ id: {
29
+ type: StringConstructor;
30
+ default: undefined;
31
+ };
32
+ placeholder: {
33
+ type: StringConstructor;
34
+ default: undefined;
35
+ };
29
36
  preferredCountries: {
30
37
  type: PropType<CountryCode[]>;
31
38
  default: undefined;
@@ -106,33 +113,57 @@ declare const _default: import("vue").DefineComponent<{
106
113
  type: PropType<Record<CountryCode, string>>;
107
114
  default: undefined;
108
115
  };
116
+ /**
117
+ * Disabled auto-format as you type
118
+ */
119
+ noFormattingAsYouType: {
120
+ type: BooleanConstructor;
121
+ default: boolean;
122
+ };
123
+ /**
124
+ * locale of country list - Ex: "fr-FR"
125
+ * @default browser locale
126
+ */
127
+ countryLocale: {
128
+ type: StringConstructor;
129
+ default: undefined;
130
+ };
109
131
  }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
132
+ data: (...args: any[]) => void;
110
133
  update: (...args: any[]) => void;
111
134
  "update:model-value": (...args: any[]) => void;
112
135
  "country-code": (...args: any[]) => void;
136
+ "update:country-code": (...args: any[]) => void;
113
137
  }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
114
138
  modelValue: {
115
139
  type: StringConstructor;
116
140
  validator: (prop: string) => boolean;
117
141
  default: undefined;
118
142
  };
119
- id: {
120
- type: StringConstructor;
121
- default: undefined;
122
- };
123
- placeholder: {
143
+ /** @deprecated */
144
+ defaultPhoneNumber: {
124
145
  type: StringConstructor;
125
146
  default: undefined;
126
147
  };
127
- defaultPhoneNumber: {
128
- type: StringConstructor;
148
+ countryCode: {
149
+ type: PropType<string>;
129
150
  default: undefined;
151
+ validator: (code: string) => boolean;
130
152
  };
153
+ /** @deprecated - use country-code or v-model:country-code */
131
154
  defaultCountryCode: {
132
155
  type: PropType<string>;
133
156
  default: undefined;
134
157
  validator: (code: string) => boolean;
135
158
  };
159
+ id: {
160
+ type: StringConstructor;
161
+ default: undefined;
162
+ };
163
+ placeholder: {
164
+ type: StringConstructor;
165
+ default: undefined;
166
+ };
136
167
  preferredCountries: {
137
168
  type: PropType<CountryCode[]>;
138
169
  default: undefined;
@@ -213,10 +244,27 @@ declare const _default: import("vue").DefineComponent<{
213
244
  type: PropType<Record<CountryCode, string>>;
214
245
  default: undefined;
215
246
  };
247
+ /**
248
+ * Disabled auto-format as you type
249
+ */
250
+ noFormattingAsYouType: {
251
+ type: BooleanConstructor;
252
+ default: boolean;
253
+ };
254
+ /**
255
+ * locale of country list - Ex: "fr-FR"
256
+ * @default browser locale
257
+ */
258
+ countryLocale: {
259
+ type: StringConstructor;
260
+ default: undefined;
261
+ };
216
262
  }>> & {
217
263
  "onUpdate:model-value"?: ((...args: any[]) => any) | undefined;
218
264
  onUpdate?: ((...args: any[]) => any) | undefined;
265
+ onData?: ((...args: any[]) => any) | undefined;
219
266
  "onCountry-code"?: ((...args: any[]) => any) | undefined;
267
+ "onUpdate:country-code"?: ((...args: any[]) => any) | undefined;
220
268
  }, {
221
269
  size: Size;
222
270
  color: Color;
@@ -225,6 +273,7 @@ declare const _default: import("vue").DefineComponent<{
225
273
  id: string;
226
274
  error: boolean;
227
275
  modelValue: string;
276
+ countryCode: string;
228
277
  listPosition: Position;
229
278
  defaultPhoneNumber: string;
230
279
  defaultCountryCode: string;
@@ -250,5 +299,7 @@ declare const _default: import("vue").DefineComponent<{
250
299
  noCountrySelector: boolean;
251
300
  showCodeOnList: boolean;
252
301
  customCountriesList: Record<CountryCode, string>;
302
+ noFormattingAsYouType: boolean;
303
+ countryLocale: string;
253
304
  }, {}>;
254
305
  export default _default;
@@ -12,10 +12,7 @@ export declare function getRangeFormattedDate({ value, locale, options, }: {
12
12
  options: Intl.DateTimeFormatOptions;
13
13
  }): string | undefined;
14
14
  export declare function getFirstDayOfMonth(value: ConfigType): number;
15
- export declare function getWeekDays(locale: string, offset?: number): {
16
- label: string;
17
- dayNumber: number;
18
- }[];
15
+ export declare function getDaysOfWeek(locale: string, firstDayOfWeek: number): string[];
19
16
  export declare function getDaysInMonth(date: ConfigType): number;
20
17
  export declare function isToday(date: ConfigType): boolean;
21
18
  export declare function isSameDate(date: ConfigType, date2: ConfigType, unit: OpUnitType): boolean;
@@ -80,6 +80,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
80
80
  focus: (...args: any[]) => void;
81
81
  open: (...args: any[]) => void;
82
82
  "update:model-value": (...args: any[]) => void;
83
+ "selected-option": (...args: any[]) => void;
83
84
  }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
84
85
  modelValue: {
85
86
  type: PropType<ModelValueSimple>;
@@ -158,6 +159,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
158
159
  onClose?: ((...args: any[]) => any) | undefined;
159
160
  onOpen?: ((...args: any[]) => any) | undefined;
160
161
  "onUpdate:model-value"?: ((...args: any[]) => any) | undefined;
162
+ "onSelected-option"?: ((...args: any[]) => any) | undefined;
161
163
  }, {
162
164
  size: Size;
163
165
  color: Color;
@@ -1,2 +0,0 @@
1
- import type { CountryCode } from 'libphonenumber-js';
2
- export declare const countriesNameListByIsoCode: Record<CountryCode, string>;
@@ -1,12 +0,0 @@
1
- import { type CountryCode, type Examples } from 'libphonenumber-js';
2
- import type { Country, Result } from '../types';
3
- export declare function getCountryName(code: CountryCode | string, customCountriesNameListByIsoCode?: Record<CountryCode, string>): string | undefined;
4
- export declare function loadPhoneNumberExamplesFile(): Promise<Examples>;
5
- export declare function getExamplePhoneNumber(countryCode: CountryCode): import("libphonenumber-js").PhoneNumber | undefined;
6
- export declare function sanitizePhoneNumber(input?: string): string | undefined;
7
- export declare function getCountriesList(customCountriesNameListByIsoCode?: Record<CountryCode, string>): Country[] | undefined;
8
- export declare function browserLocale(): string | undefined;
9
- export declare function isCountryAvailable(locale: string): boolean;
10
- export declare const getResultsFromPhoneNumber: (countryCode?: CountryCode, phoneNumber?: string) => Result;
11
- export declare function getAsYouTypeFormat(countryCode: CountryCode, phoneNumber?: string): string | undefined;
12
- export declare function fetchCountryCode(): Promise<string | undefined>;
@@ -1,184 +0,0 @@
1
- import "../assets/MazBtn.css";
2
- import { defineComponent, defineAsyncComponent, useAttrs, useSlots, onBeforeMount, computed, openBlock, createBlock, resolveDynamicComponent, mergeProps, withCtx, createElementBlock, normalizeClass, renderSlot, unref, createCommentVNode, createElementVNode } from "vue";
3
- import { _ as _export_sfc } from "./MazTabsBar-6f1ed175.mjs";
4
- const _sfc_main = /* @__PURE__ */ defineComponent({
5
- __name: "MazBtn",
6
- props: {
7
- variant: {
8
- type: String,
9
- default: "button",
10
- validator: (value) => {
11
- return ["button", "link"].includes(value);
12
- }
13
- },
14
- size: {
15
- type: String,
16
- default: "md",
17
- validator: (value) => {
18
- return ["mini", "xs", "sm", "md", "lg", "xl"].includes(value);
19
- }
20
- },
21
- color: {
22
- type: String,
23
- default: "primary"
24
- },
25
- type: {
26
- type: String,
27
- default: "button",
28
- validator: (value) => {
29
- return ["button", "submit", "reset"].includes(value);
30
- }
31
- },
32
- rounded: { type: Boolean, default: false },
33
- noRounded: { type: Boolean, default: false },
34
- outline: { type: Boolean, default: false },
35
- pastel: { type: Boolean, default: false },
36
- block: { type: Boolean, default: false },
37
- noUnderline: { type: Boolean, default: false },
38
- noLeading: { type: Boolean, default: false },
39
- loading: { type: Boolean, default: false },
40
- disabled: { type: Boolean, default: false },
41
- fab: { type: Boolean, default: false },
42
- icon: { type: String, default: void 0 },
43
- leftIcon: { type: String, default: void 0 },
44
- rightIcon: { type: String, default: void 0 },
45
- noPadding: { type: Boolean, default: false },
46
- noElevation: { type: Boolean, default: false }
47
- },
48
- setup(__props) {
49
- const props = __props;
50
- const MazSpinner = defineAsyncComponent(() => import("./MazSpinner-7e5fb76c.mjs"));
51
- const MazIcon = defineAsyncComponent(() => import("./MazIcon-00892ac4.mjs"));
52
- const { href, to } = useAttrs();
53
- const slots = useSlots();
54
- onBeforeMount(() => {
55
- if (props.icon && !props.fab) {
56
- console.error('[maz-ui](MazBtn) the prop "icon" must be used only with "fab" props');
57
- }
58
- });
59
- const component = computed(() => {
60
- if (href)
61
- return "a";
62
- else if (to)
63
- return "router-link";
64
- return "button";
65
- });
66
- const btnColorClass = computed(
67
- () => props.pastel ? `--${props.color}-pastel` : props.outline ? `--${props.color}-outline` : `--${props.color}`
68
- );
69
- const isDisabled = computed(
70
- () => (props.loading || props.disabled) && component.value === "button"
71
- );
72
- const cursorClass = computed(() => isDisabled.value ? "--cursor-default" : "--cursor-pointer");
73
- const variantClass = computed(() => `--is-${props.variant}`);
74
- const hasLoader = computed(() => props.loading && props.variant === "button");
75
- const hasLeftIcon = computed(() => !!slots["left-icon"] || props.leftIcon);
76
- const hasRightIcon = computed(() => !!slots["right-icon"] || props.rightIcon);
77
- const hasIcon = computed(() => hasLeftIcon.value || hasRightIcon.value);
78
- const hasFabIcon = computed(() => props.fab && props.icon);
79
- const btnType = computed(() => component.value === "button" ? props.type : void 0);
80
- return (_ctx, _cache) => {
81
- return openBlock(), createBlock(resolveDynamicComponent(component.value), mergeProps(_ctx.$attrs, {
82
- disabled: isDisabled.value,
83
- class: ["m-btn", [
84
- `--${__props.size}`,
85
- btnColorClass.value,
86
- cursorClass.value,
87
- variantClass.value,
88
- {
89
- "--block": __props.block,
90
- "--no-underline": __props.noUnderline,
91
- "--no-leading": __props.noLeading,
92
- "--fab": __props.fab,
93
- "--loading": __props.loading,
94
- "--disabled": isDisabled.value,
95
- "--icon": hasIcon.value,
96
- "--rounded": __props.rounded,
97
- "--no-rounded": __props.noRounded,
98
- "--no-padding": __props.noPadding,
99
- "--no-elevation": __props.noElevation
100
- }
101
- ]],
102
- type: btnType.value
103
- }), {
104
- default: withCtx(() => [
105
- hasLeftIcon.value ? (openBlock(), createElementBlock(
106
- "div",
107
- {
108
- key: 0,
109
- class: normalizeClass(["m-btn__icon-left maz-flex maz-flex-center", { "maz-invisible": hasLoader.value }])
110
- },
111
- [
112
- renderSlot(_ctx.$slots, "left-icon", {}, () => [
113
- __props.leftIcon ? (openBlock(), createBlock(unref(MazIcon), {
114
- key: 0,
115
- name: __props.leftIcon
116
- }, null, 8, ["name"])) : createCommentVNode("v-if", true)
117
- ], true)
118
- ],
119
- 2
120
- /* CLASS */
121
- )) : createCommentVNode("v-if", true),
122
- hasFabIcon.value ? (openBlock(), createElementBlock(
123
- "div",
124
- {
125
- key: 1,
126
- class: normalizeClass(["m-btn__icon maz-flex maz-flex-center", { "maz-invisible": hasLoader.value }])
127
- },
128
- [
129
- renderSlot(_ctx.$slots, "icon", {}, () => [
130
- __props.icon ? (openBlock(), createBlock(unref(MazIcon), {
131
- key: 0,
132
- name: __props.icon
133
- }, null, 8, ["name"])) : createCommentVNode("v-if", true)
134
- ], true)
135
- ],
136
- 2
137
- /* CLASS */
138
- )) : createCommentVNode("v-if", true),
139
- createElementVNode(
140
- "span",
141
- {
142
- class: normalizeClass(["maz-flex maz-flex-center", { "maz-invisible": hasLoader.value }])
143
- },
144
- [
145
- renderSlot(_ctx.$slots, "default", {}, void 0, true)
146
- ],
147
- 2
148
- /* CLASS */
149
- ),
150
- hasRightIcon.value ? (openBlock(), createElementBlock(
151
- "div",
152
- {
153
- key: 2,
154
- class: normalizeClass(["m-btn__icon-right maz-flex maz-flex-center", { "maz-invisible": hasLoader.value }])
155
- },
156
- [
157
- renderSlot(_ctx.$slots, "right-icon", {}, () => [
158
- __props.rightIcon ? (openBlock(), createBlock(unref(MazIcon), {
159
- key: 0,
160
- name: __props.rightIcon
161
- }, null, 8, ["name"])) : createCommentVNode("v-if", true)
162
- ], true)
163
- ],
164
- 2
165
- /* CLASS */
166
- )) : createCommentVNode("v-if", true),
167
- hasLoader.value ? (openBlock(), createBlock(unref(MazSpinner), {
168
- key: 3,
169
- size: "2em",
170
- color: __props.color,
171
- class: "maz-absolute"
172
- }, null, 8, ["color"])) : createCommentVNode("v-if", true)
173
- ]),
174
- _: 3
175
- /* FORWARDED */
176
- }, 16, ["disabled", "class", "type"]);
177
- };
178
- }
179
- });
180
- const MazBtn_vue_vue_type_style_index_0_scoped_054acd3d_lang = "";
181
- const MazBtn = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-054acd3d"]]);
182
- export {
183
- MazBtn as default
184
- };