@intl-tel-input/vue 29.0.2 → 29.0.4

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.
@@ -1729,7 +1729,7 @@ var p = new Set(f.map((e) => e.iso2)), m = (e) => p.has(e), h = f, g = {
1729
1729
  }
1730
1730
  #A() {
1731
1731
  let { matchDropdownWidth: e, countrySelectorMode: t, countrySearch: n, uiTranslations: r, containerClass: i } = this.#e, a = t === F.FULLSCREEN, o = this.#j(), s = e ? "" : "iti--flexible-dropdown-width";
1732
- this.#p = q("div", {
1732
+ if (this.#p = q("div", {
1733
1733
  id: `iti-${this.#t}__country-selector`,
1734
1734
  class: `iti__country-selector ${_.HIDE} ${s}`,
1735
1735
  role: "dialog",
@@ -1739,7 +1739,11 @@ var p = new Set(f.map((e) => e.iso2)), m = (e) => p.has(e), h = f, g = {
1739
1739
  id: `iti-${this.#t}__country-listbox`,
1740
1740
  role: "listbox",
1741
1741
  [L.LABEL]: r.countryListAriaLabel
1742
- }, this.#p), this.#F(), n && this.#V(), a || (this.#s = this.#B(), n && (this.#p.style.height = `${this.#s}px`)), o ? (this.#S = q("div", { class: K({
1742
+ }, this.#p), this.#F(), n && this.#V(), !a) {
1743
+ let { height: t, width: r } = this.#B();
1744
+ this.#s = t, n && (this.#p.style.height = `${t}px`, !e && r > 0 && (this.#p.style.width = `${r}px`));
1745
+ }
1746
+ o ? (this.#S = q("div", { class: K({
1743
1747
  iti: !0,
1744
1748
  "iti--detached-country-selector": !0,
1745
1749
  "iti--fullscreen-popup": a,
@@ -1853,8 +1857,11 @@ var p = new Set(f.map((e) => e.iso2)), m = (e) => p.has(e), h = f, g = {
1853
1857
  this.#p.classList.remove(_.HIDE);
1854
1858
  let n = q("div", { class: "iti iti--inline-country-selector" });
1855
1859
  n.appendChild(this.#p), n.style.visibility = "hidden", t.appendChild(n);
1856
- let r = this.#p.offsetHeight;
1857
- return t.removeChild(n), n.style.visibility = "", this.#p.classList.add(_.HIDE), r > 0 ? r : S.FALLBACK_DROPDOWN_HEIGHT;
1860
+ let r = this.#p.offsetHeight, i = this.#p.offsetWidth;
1861
+ return t.removeChild(n), n.style.visibility = "", this.#p.classList.add(_.HIDE), {
1862
+ height: r > 0 ? r : S.FALLBACK_DROPDOWN_HEIGHT,
1863
+ width: i
1864
+ };
1858
1865
  }
1859
1866
  #V() {
1860
1867
  let { uiTranslations: e } = this.#e, t = this.#_.childElementCount;
@@ -2675,7 +2682,7 @@ var p = new Set(f.map((e) => e.iso2)), m = (e) => p.has(e), h = f, g = {
2675
2682
  },
2676
2683
  startedLoadingUtils: !1,
2677
2684
  startedLoadingAutoCountry: !1,
2678
- version: "29.0.2",
2685
+ version: "29.0.4",
2679
2686
  NUMBER_FORMAT: M,
2680
2687
  NUMBER_TYPE: N,
2681
2688
  VALIDATION_ERROR: P,
@@ -2786,7 +2793,7 @@ var p = new Set(f.map((e) => e.iso2)), m = (e) => p.has(e), h = f, g = {
2786
2793
  m("strictReject", t, n, r);
2787
2794
  };
2788
2795
  return a(() => {
2789
- C.value && (w.value = $(C.value, S.value), _.value = C.value.className, C.value.addEventListener("open:countryselector", P), C.value.addEventListener("close:countryselector", F), C.value.addEventListener("strict:reject", I), p.disabled && w.value.setDisabled(p.disabled), p.readonly && w.value.setReadonly(p.readonly), E.value = w.value.getSelectedCountry()?.iso2 ?? "", w.value.promise.then(() => {
2796
+ C.value && (w.value = $(C.value, S.value), _.value = C.value.className, C.value.addEventListener("input", N), C.value.addEventListener("open:countryselector", P), C.value.addEventListener("close:countryselector", F), C.value.addEventListener("strict:reject", I), p.disabled && w.value.setDisabled(p.disabled), p.readonly && w.value.setReadonly(p.readonly), E.value = w.value.getSelectedCountry()?.iso2 ?? "", w.value.promise.then(() => {
2790
2797
  w.value?.isActive() && (y.value && w.value.setNumber(y.value), k ? (k = !1, N()) : (T.value = w.value.getNumber() ?? "", D.value = A(), O.value = D.value ? null : w.value.getValidationError()));
2791
2798
  }));
2792
2799
  }), u(() => p.disabled, (e) => w.value?.setDisabled(e)), u(() => p.readonly, (e) => w.value?.setReadonly(e)), u(() => y.value, (e) => {
@@ -2796,15 +2803,14 @@ var p = new Set(f.map((e) => e.iso2)), m = (e) => p.has(e), h = f, g = {
2796
2803
  document.activeElement === C.value || n === t || (w.value.setNumber(t), j());
2797
2804
  });
2798
2805
  }, { flush: "post" }), o(() => {
2799
- C.value && (C.value.removeEventListener("open:countryselector", P), C.value.removeEventListener("close:countryselector", F), C.value.removeEventListener("strict:reject", I)), w.value?.destroy();
2806
+ C.value && (C.value.removeEventListener("input", N), C.value.removeEventListener("open:countryselector", P), C.value.removeEventListener("close:countryselector", F), C.value.removeEventListener("strict:reject", I)), w.value?.destroy();
2800
2807
  }), d({
2801
2808
  instance: w,
2802
2809
  input: C
2803
2810
  }), (e, n) => (s(), t("input", i(v.value, {
2804
2811
  ref_key: "input",
2805
2812
  ref: C,
2806
- type: "tel",
2807
- onInput: N
2813
+ type: "tel"
2808
2814
  }), null, 16));
2809
2815
  }
2810
2816
  });
@@ -1,4 +1,4 @@
1
- import { n as e, t } from "./IntlTelInput-D_dYxOMN.js";
1
+ import { n as e, t } from "./IntlTelInput-T5zFPeX_.js";
2
2
  //#region packages/vue/src/index.ts
3
3
  var n = t;
4
4
  //#endregion
@@ -1,4 +1,4 @@
1
- import { n as e, t } from "./IntlTelInput-D_dYxOMN.js";
1
+ import { n as e, t } from "./IntlTelInput-T5zFPeX_.js";
2
2
  //#region packages/core/dist/js/utils.js
3
3
  var n = {};
4
4
  //#endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intl-tel-input/vue",
3
- "version": "29.0.2",
3
+ "version": "29.0.4",
4
4
  "description": "A Vue component for intl-tel-input, for entering, formatting, and validating international telephone numbers",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -24,7 +24,7 @@
24
24
  "README.md"
25
25
  ],
26
26
  "dependencies": {
27
- "intl-tel-input": "^29.0.2"
27
+ "intl-tel-input": "^29.0.4"
28
28
  },
29
29
  "peerDependencies": {
30
30
  "vue": "^3.0.0"