intl-tel-input 25.8.4 → 25.8.6

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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- * International Telephone Input v25.8.4
2
+ * International Telephone Input v25.8.6
3
3
  * https://github.com/jackocnr/intl-tel-input.git
4
4
  * Licensed under the MIT license
5
5
  */
@@ -1628,7 +1628,7 @@ var factoryOutput = (() => {
1628
1628
 
1629
1629
  // src/js/intl-tel-input/i18n/en/interface.ts
1630
1630
  var interfaceTranslations = {
1631
- selectedCountryAriaLabel: "Change country, selected ${country}",
1631
+ selectedCountryAriaLabel: "Change country, selected ${countryName} (${dialCode})",
1632
1632
  noCountrySelected: "Select country",
1633
1633
  countryListAriaLabel: "List of countries",
1634
1634
  searchPlaceholder: "Search",
@@ -2772,7 +2772,7 @@ var factoryOutput = (() => {
2772
2772
  //* Note: called from _setInitialState, _updateCountryFromNumber, _selectListItem, setCountry.
2773
2773
  _setCountry(iso2) {
2774
2774
  const { separateDialCode, showFlags, i18n } = this.options;
2775
- const prevCountry = this.selectedCountryData.iso2 ? this.selectedCountryData : {};
2775
+ const prevIso2 = this.selectedCountryData.iso2 || "";
2776
2776
  this.selectedCountryData = iso2 ? this._getCountryData(iso2, false) || {} : {};
2777
2777
  if (this.selectedCountryData.iso2) {
2778
2778
  this.defaultCountry = this.selectedCountryData.iso2;
@@ -2781,8 +2781,9 @@ var factoryOutput = (() => {
2781
2781
  const flagClass = iso2 && showFlags ? `iti__flag iti__${iso2}` : "iti__flag iti__globe";
2782
2782
  let ariaLabel, title;
2783
2783
  if (iso2) {
2784
- title = this.selectedCountryData.name;
2785
- ariaLabel = i18n.selectedCountryAriaLabel.replace("${country}", this.selectedCountryData.name);
2784
+ const { name, dialCode } = this.selectedCountryData;
2785
+ title = name;
2786
+ ariaLabel = i18n.selectedCountryAriaLabel.replace("${countryName}", name).replace("${dialCode}", `+${dialCode}`);
2786
2787
  } else {
2787
2788
  title = i18n.noCountrySelected;
2788
2789
  ariaLabel = i18n.noCountrySelected;
@@ -2798,7 +2799,7 @@ var factoryOutput = (() => {
2798
2799
  }
2799
2800
  this._updatePlaceholder();
2800
2801
  this._updateMaxLength();
2801
- return prevCountry.iso2 !== iso2;
2802
+ return prevIso2 !== iso2;
2802
2803
  }
2803
2804
  //* Update the input padding to make space for the selected country/dial code.
2804
2805
  _updateInputPadding() {
@@ -3271,7 +3272,7 @@ var factoryOutput = (() => {
3271
3272
  attachUtils,
3272
3273
  startedLoadingUtilsScript: false,
3273
3274
  startedLoadingAutoCountry: false,
3274
- version: "25.8.4"
3275
+ version: "25.8.6"
3275
3276
  }
3276
3277
  );
3277
3278
  var intl_tel_input_default = intlTelInput;