intl-tel-input 23.3.0 → 23.3.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.
- package/README.md +5 -5
- package/build/js/data.js +1 -1
- package/build/js/data.min.js +1 -1
- package/build/js/intlTelInput.js +23 -17
- package/build/js/intlTelInput.min.js +2 -2
- package/build/js/intlTelInputWithUtils.js +23 -17
- package/build/js/intlTelInputWithUtils.min.js +2 -2
- package/package.json +1 -1
- package/react/README.md +1 -1
- package/react/build/IntlTelInput.cjs +22 -16
- package/react/build/IntlTelInput.js +22 -16
- package/react/build/IntlTelInputWithUtils.cjs +22 -16
- package/react/build/IntlTelInputWithUtils.js +22 -16
package/package.json
CHANGED
package/react/README.md
CHANGED
|
@@ -29,7 +29,7 @@ import "intl-tel-input/styles";
|
|
|
29
29
|
|
|
30
30
|
See the [Validation demo](https://github.com/jackocnr/intl-tel-input/blob/master/react/demo/ValidationApp.tsx) for a more fleshed out example of how to handle validation.
|
|
31
31
|
|
|
32
|
-
A note on the utils script (~260KB): if you're lazy loading the IntlTelInput chunk (and so less worried about filesize) then you can just import IntlTelInput from `"intl-tel-input/reactWithUtils"` instead, to include the utils script. Alternatively, if you use the main `"intl-tel-input/react"` import, then you should couple this with the `utilsScript` initialisation option - you will need to host the [utils.js](https://github.com/jackocnr/intl-tel-input/blob/master/build/js/utils.js) file, and then set the `utilsScript` option to that URL, or alternatively just point it to a CDN hosted version e.g. `"https://cdn.jsdelivr.net/npm/intl-tel-input@23.3.
|
|
32
|
+
A note on the utils script (~260KB): if you're lazy loading the IntlTelInput chunk (and so less worried about filesize) then you can just import IntlTelInput from `"intl-tel-input/reactWithUtils"` instead, to include the utils script. Alternatively, if you use the main `"intl-tel-input/react"` import, then you should couple this with the `utilsScript` initialisation option - you will need to host the [utils.js](https://github.com/jackocnr/intl-tel-input/blob/master/build/js/utils.js) file, and then set the `utilsScript` option to that URL, or alternatively just point it to a CDN hosted version e.g. `"https://cdn.jsdelivr.net/npm/intl-tel-input@23.3.1/build/js/utils.js"`.
|
|
33
33
|
|
|
34
34
|
## Props
|
|
35
35
|
Here's a list of all of the current props you can pass to the IntlTelInput react component.
|
|
@@ -1694,21 +1694,32 @@ var Iti = class {
|
|
|
1694
1694
|
{ class: "iti__country-container" },
|
|
1695
1695
|
wrapper
|
|
1696
1696
|
);
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1697
|
+
if (allowDropdown) {
|
|
1698
|
+
this.selectedCountry = createEl(
|
|
1699
|
+
"button",
|
|
1700
|
+
{
|
|
1701
|
+
type: "button",
|
|
1702
|
+
class: "iti__selected-country",
|
|
1703
1703
|
"aria-expanded": "false",
|
|
1704
1704
|
"aria-label": this.options.i18n.selectedCountryAriaLabel,
|
|
1705
1705
|
"aria-haspopup": "true",
|
|
1706
1706
|
"aria-controls": `iti-${this.id}__dropdown-content`,
|
|
1707
1707
|
"role": "combobox"
|
|
1708
|
-
}
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1708
|
+
},
|
|
1709
|
+
this.countryContainer
|
|
1710
|
+
);
|
|
1711
|
+
if (this.telInput.disabled) {
|
|
1712
|
+
this.selectedCountry.setAttribute("aria-disabled", "true");
|
|
1713
|
+
} else {
|
|
1714
|
+
this.selectedCountry.setAttribute("tabindex", "0");
|
|
1715
|
+
}
|
|
1716
|
+
} else {
|
|
1717
|
+
this.selectedCountry = createEl(
|
|
1718
|
+
"div",
|
|
1719
|
+
{ class: "iti__selected-country" },
|
|
1720
|
+
this.countryContainer
|
|
1721
|
+
);
|
|
1722
|
+
}
|
|
1712
1723
|
const selectedCountryPrimary = createEl("div", { class: "iti__selected-country-primary" }, this.selectedCountry);
|
|
1713
1724
|
this.selectedCountryInner = createEl("div", null, selectedCountryPrimary);
|
|
1714
1725
|
this.selectedCountryA11yText = createEl(
|
|
@@ -1716,11 +1727,6 @@ var Iti = class {
|
|
|
1716
1727
|
{ class: "iti__a11y-text" },
|
|
1717
1728
|
this.selectedCountryInner
|
|
1718
1729
|
);
|
|
1719
|
-
if (this.telInput.disabled) {
|
|
1720
|
-
this.selectedCountry.setAttribute("aria-disabled", "true");
|
|
1721
|
-
} else {
|
|
1722
|
-
this.selectedCountry.setAttribute("tabindex", "0");
|
|
1723
|
-
}
|
|
1724
1730
|
if (allowDropdown) {
|
|
1725
1731
|
this.dropdownArrow = createEl(
|
|
1726
1732
|
"div",
|
|
@@ -2752,7 +2758,7 @@ var intlTelInput = Object.assign(
|
|
|
2752
2758
|
//* A map from instance ID to instance object.
|
|
2753
2759
|
instances: {},
|
|
2754
2760
|
loadUtils,
|
|
2755
|
-
version: "23.3.
|
|
2761
|
+
version: "23.3.1"
|
|
2756
2762
|
}
|
|
2757
2763
|
);
|
|
2758
2764
|
var intl_tel_input_default = intlTelInput;
|
|
@@ -1658,21 +1658,32 @@ var Iti = class {
|
|
|
1658
1658
|
{ class: "iti__country-container" },
|
|
1659
1659
|
wrapper
|
|
1660
1660
|
);
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1661
|
+
if (allowDropdown) {
|
|
1662
|
+
this.selectedCountry = createEl(
|
|
1663
|
+
"button",
|
|
1664
|
+
{
|
|
1665
|
+
type: "button",
|
|
1666
|
+
class: "iti__selected-country",
|
|
1667
1667
|
"aria-expanded": "false",
|
|
1668
1668
|
"aria-label": this.options.i18n.selectedCountryAriaLabel,
|
|
1669
1669
|
"aria-haspopup": "true",
|
|
1670
1670
|
"aria-controls": `iti-${this.id}__dropdown-content`,
|
|
1671
1671
|
"role": "combobox"
|
|
1672
|
-
}
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1672
|
+
},
|
|
1673
|
+
this.countryContainer
|
|
1674
|
+
);
|
|
1675
|
+
if (this.telInput.disabled) {
|
|
1676
|
+
this.selectedCountry.setAttribute("aria-disabled", "true");
|
|
1677
|
+
} else {
|
|
1678
|
+
this.selectedCountry.setAttribute("tabindex", "0");
|
|
1679
|
+
}
|
|
1680
|
+
} else {
|
|
1681
|
+
this.selectedCountry = createEl(
|
|
1682
|
+
"div",
|
|
1683
|
+
{ class: "iti__selected-country" },
|
|
1684
|
+
this.countryContainer
|
|
1685
|
+
);
|
|
1686
|
+
}
|
|
1676
1687
|
const selectedCountryPrimary = createEl("div", { class: "iti__selected-country-primary" }, this.selectedCountry);
|
|
1677
1688
|
this.selectedCountryInner = createEl("div", null, selectedCountryPrimary);
|
|
1678
1689
|
this.selectedCountryA11yText = createEl(
|
|
@@ -1680,11 +1691,6 @@ var Iti = class {
|
|
|
1680
1691
|
{ class: "iti__a11y-text" },
|
|
1681
1692
|
this.selectedCountryInner
|
|
1682
1693
|
);
|
|
1683
|
-
if (this.telInput.disabled) {
|
|
1684
|
-
this.selectedCountry.setAttribute("aria-disabled", "true");
|
|
1685
|
-
} else {
|
|
1686
|
-
this.selectedCountry.setAttribute("tabindex", "0");
|
|
1687
|
-
}
|
|
1688
1694
|
if (allowDropdown) {
|
|
1689
1695
|
this.dropdownArrow = createEl(
|
|
1690
1696
|
"div",
|
|
@@ -2716,7 +2722,7 @@ var intlTelInput = Object.assign(
|
|
|
2716
2722
|
//* A map from instance ID to instance object.
|
|
2717
2723
|
instances: {},
|
|
2718
2724
|
loadUtils,
|
|
2719
|
-
version: "23.3.
|
|
2725
|
+
version: "23.3.1"
|
|
2720
2726
|
}
|
|
2721
2727
|
);
|
|
2722
2728
|
var intl_tel_input_default = intlTelInput;
|
|
@@ -1694,21 +1694,32 @@ var Iti = class {
|
|
|
1694
1694
|
{ class: "iti__country-container" },
|
|
1695
1695
|
wrapper
|
|
1696
1696
|
);
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1697
|
+
if (allowDropdown) {
|
|
1698
|
+
this.selectedCountry = createEl(
|
|
1699
|
+
"button",
|
|
1700
|
+
{
|
|
1701
|
+
type: "button",
|
|
1702
|
+
class: "iti__selected-country",
|
|
1703
1703
|
"aria-expanded": "false",
|
|
1704
1704
|
"aria-label": this.options.i18n.selectedCountryAriaLabel,
|
|
1705
1705
|
"aria-haspopup": "true",
|
|
1706
1706
|
"aria-controls": `iti-${this.id}__dropdown-content`,
|
|
1707
1707
|
"role": "combobox"
|
|
1708
|
-
}
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1708
|
+
},
|
|
1709
|
+
this.countryContainer
|
|
1710
|
+
);
|
|
1711
|
+
if (this.telInput.disabled) {
|
|
1712
|
+
this.selectedCountry.setAttribute("aria-disabled", "true");
|
|
1713
|
+
} else {
|
|
1714
|
+
this.selectedCountry.setAttribute("tabindex", "0");
|
|
1715
|
+
}
|
|
1716
|
+
} else {
|
|
1717
|
+
this.selectedCountry = createEl(
|
|
1718
|
+
"div",
|
|
1719
|
+
{ class: "iti__selected-country" },
|
|
1720
|
+
this.countryContainer
|
|
1721
|
+
);
|
|
1722
|
+
}
|
|
1712
1723
|
const selectedCountryPrimary = createEl("div", { class: "iti__selected-country-primary" }, this.selectedCountry);
|
|
1713
1724
|
this.selectedCountryInner = createEl("div", null, selectedCountryPrimary);
|
|
1714
1725
|
this.selectedCountryA11yText = createEl(
|
|
@@ -1716,11 +1727,6 @@ var Iti = class {
|
|
|
1716
1727
|
{ class: "iti__a11y-text" },
|
|
1717
1728
|
this.selectedCountryInner
|
|
1718
1729
|
);
|
|
1719
|
-
if (this.telInput.disabled) {
|
|
1720
|
-
this.selectedCountry.setAttribute("aria-disabled", "true");
|
|
1721
|
-
} else {
|
|
1722
|
-
this.selectedCountry.setAttribute("tabindex", "0");
|
|
1723
|
-
}
|
|
1724
1730
|
if (allowDropdown) {
|
|
1725
1731
|
this.dropdownArrow = createEl(
|
|
1726
1732
|
"div",
|
|
@@ -2752,7 +2758,7 @@ var intlTelInput = Object.assign(
|
|
|
2752
2758
|
//* A map from instance ID to instance object.
|
|
2753
2759
|
instances: {},
|
|
2754
2760
|
loadUtils,
|
|
2755
|
-
version: "23.3.
|
|
2761
|
+
version: "23.3.1"
|
|
2756
2762
|
}
|
|
2757
2763
|
);
|
|
2758
2764
|
var intl_tel_input_default = intlTelInput;
|
|
@@ -1658,21 +1658,32 @@ var Iti = class {
|
|
|
1658
1658
|
{ class: "iti__country-container" },
|
|
1659
1659
|
wrapper
|
|
1660
1660
|
);
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1661
|
+
if (allowDropdown) {
|
|
1662
|
+
this.selectedCountry = createEl(
|
|
1663
|
+
"button",
|
|
1664
|
+
{
|
|
1665
|
+
type: "button",
|
|
1666
|
+
class: "iti__selected-country",
|
|
1667
1667
|
"aria-expanded": "false",
|
|
1668
1668
|
"aria-label": this.options.i18n.selectedCountryAriaLabel,
|
|
1669
1669
|
"aria-haspopup": "true",
|
|
1670
1670
|
"aria-controls": `iti-${this.id}__dropdown-content`,
|
|
1671
1671
|
"role": "combobox"
|
|
1672
|
-
}
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1672
|
+
},
|
|
1673
|
+
this.countryContainer
|
|
1674
|
+
);
|
|
1675
|
+
if (this.telInput.disabled) {
|
|
1676
|
+
this.selectedCountry.setAttribute("aria-disabled", "true");
|
|
1677
|
+
} else {
|
|
1678
|
+
this.selectedCountry.setAttribute("tabindex", "0");
|
|
1679
|
+
}
|
|
1680
|
+
} else {
|
|
1681
|
+
this.selectedCountry = createEl(
|
|
1682
|
+
"div",
|
|
1683
|
+
{ class: "iti__selected-country" },
|
|
1684
|
+
this.countryContainer
|
|
1685
|
+
);
|
|
1686
|
+
}
|
|
1676
1687
|
const selectedCountryPrimary = createEl("div", { class: "iti__selected-country-primary" }, this.selectedCountry);
|
|
1677
1688
|
this.selectedCountryInner = createEl("div", null, selectedCountryPrimary);
|
|
1678
1689
|
this.selectedCountryA11yText = createEl(
|
|
@@ -1680,11 +1691,6 @@ var Iti = class {
|
|
|
1680
1691
|
{ class: "iti__a11y-text" },
|
|
1681
1692
|
this.selectedCountryInner
|
|
1682
1693
|
);
|
|
1683
|
-
if (this.telInput.disabled) {
|
|
1684
|
-
this.selectedCountry.setAttribute("aria-disabled", "true");
|
|
1685
|
-
} else {
|
|
1686
|
-
this.selectedCountry.setAttribute("tabindex", "0");
|
|
1687
|
-
}
|
|
1688
1694
|
if (allowDropdown) {
|
|
1689
1695
|
this.dropdownArrow = createEl(
|
|
1690
1696
|
"div",
|
|
@@ -2716,7 +2722,7 @@ var intlTelInput = Object.assign(
|
|
|
2716
2722
|
//* A map from instance ID to instance object.
|
|
2717
2723
|
instances: {},
|
|
2718
2724
|
loadUtils,
|
|
2719
|
-
version: "23.3.
|
|
2725
|
+
version: "23.3.1"
|
|
2720
2726
|
}
|
|
2721
2727
|
);
|
|
2722
2728
|
var intl_tel_input_default = intlTelInput;
|