intl-tel-input 29.0.3 → 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.
- package/dist/js/data.js +1 -1
- package/dist/js/data.min.js +1 -1
- package/dist/js/intlTelInput.js +15 -7
- package/dist/js/intlTelInput.min.js +2 -2
- package/dist/js/intlTelInput.mjs +14 -6
- package/dist/js/intlTelInputWithUtils.js +15 -7
- package/dist/js/intlTelInputWithUtils.min.js +2 -2
- package/dist/js/intlTelInputWithUtils.mjs +14 -6
- package/package.json +1 -1
|
@@ -2658,9 +2658,13 @@ var UI = class _UI {
|
|
|
2658
2658
|
this.#updateSearchResultsA11yText();
|
|
2659
2659
|
}
|
|
2660
2660
|
if (!isFullscreen) {
|
|
2661
|
-
|
|
2661
|
+
const { height, width } = this.#getHiddenInlineDropdownSize();
|
|
2662
|
+
this.#inlineDropdownHeight = height;
|
|
2662
2663
|
if (countrySearch) {
|
|
2663
|
-
this.#countrySelectorEl.style.height = `${
|
|
2664
|
+
this.#countrySelectorEl.style.height = `${height}px`;
|
|
2665
|
+
if (!matchDropdownWidth && width > 0) {
|
|
2666
|
+
this.#countrySelectorEl.style.width = `${width}px`;
|
|
2667
|
+
}
|
|
2664
2668
|
}
|
|
2665
2669
|
}
|
|
2666
2670
|
if (detachedParent) {
|
|
@@ -2881,8 +2885,8 @@ var UI = class _UI {
|
|
|
2881
2885
|
body.removeChild(containerClone);
|
|
2882
2886
|
return width;
|
|
2883
2887
|
}
|
|
2884
|
-
// Get the dropdown
|
|
2885
|
-
#
|
|
2888
|
+
// Get the dropdown size (before it is added to the DOM)
|
|
2889
|
+
#getHiddenInlineDropdownSize() {
|
|
2886
2890
|
const body = _UI.#getBody();
|
|
2887
2891
|
this.#countrySelectorEl.classList.remove(CLASSES.HIDE);
|
|
2888
2892
|
const tempContainer = createEl("div", {
|
|
@@ -2892,10 +2896,14 @@ var UI = class _UI {
|
|
|
2892
2896
|
tempContainer.style.visibility = "hidden";
|
|
2893
2897
|
body.appendChild(tempContainer);
|
|
2894
2898
|
const height = this.#countrySelectorEl.offsetHeight;
|
|
2899
|
+
const width = this.#countrySelectorEl.offsetWidth;
|
|
2895
2900
|
body.removeChild(tempContainer);
|
|
2896
2901
|
tempContainer.style.visibility = "";
|
|
2897
2902
|
this.#countrySelectorEl.classList.add(CLASSES.HIDE);
|
|
2898
|
-
return
|
|
2903
|
+
return {
|
|
2904
|
+
height: height > 0 ? height : LAYOUT.FALLBACK_DROPDOWN_HEIGHT,
|
|
2905
|
+
width
|
|
2906
|
+
};
|
|
2899
2907
|
}
|
|
2900
2908
|
//* Update search results text (for a11y).
|
|
2901
2909
|
#updateSearchResultsA11yText() {
|
|
@@ -4820,7 +4828,7 @@ var intlTelInput = Object.assign(
|
|
|
4820
4828
|
attachUtils,
|
|
4821
4829
|
startedLoadingUtils: false,
|
|
4822
4830
|
startedLoadingAutoCountry: false,
|
|
4823
|
-
version: "29.0.
|
|
4831
|
+
version: "29.0.4",
|
|
4824
4832
|
NUMBER_FORMAT,
|
|
4825
4833
|
NUMBER_TYPE,
|
|
4826
4834
|
VALIDATION_ERROR,
|