intl-tel-input 28.0.8 → 28.1.0

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 (64) hide show
  1. package/dist/js/data.js +1 -1
  2. package/dist/js/data.min.js +1 -1
  3. package/dist/js/i18n/ar.js +3 -3
  4. package/dist/js/i18n/bg.js +2 -2
  5. package/dist/js/i18n/bn.js +2 -2
  6. package/dist/js/i18n/bs.js +2 -2
  7. package/dist/js/i18n/ca.js +2 -2
  8. package/dist/js/i18n/cs.js +2 -2
  9. package/dist/js/i18n/da.js +2 -2
  10. package/dist/js/i18n/de.js +2 -2
  11. package/dist/js/i18n/el.js +2 -2
  12. package/dist/js/i18n/es.js +2 -2
  13. package/dist/js/i18n/et.js +2 -2
  14. package/dist/js/i18n/fa.js +2 -5
  15. package/dist/js/i18n/fi.js +2 -2
  16. package/dist/js/i18n/fil.js +16 -0
  17. package/dist/js/i18n/fr.js +2 -2
  18. package/dist/js/i18n/he.js +19 -0
  19. package/dist/js/i18n/hi.js +2 -2
  20. package/dist/js/i18n/hr.js +2 -2
  21. package/dist/js/i18n/hu.js +2 -5
  22. package/dist/js/i18n/hy.js +19 -0
  23. package/dist/js/i18n/id.js +2 -5
  24. package/dist/js/i18n/index.js +9 -0
  25. package/dist/js/i18n/is.js +21 -0
  26. package/dist/js/i18n/it.js +2 -2
  27. package/dist/js/i18n/ja.js +2 -5
  28. package/dist/js/i18n/kn.js +2 -2
  29. package/dist/js/i18n/ko.js +2 -5
  30. package/dist/js/i18n/lt.js +2 -2
  31. package/dist/js/i18n/lv.js +24 -0
  32. package/dist/js/i18n/mk.js +21 -0
  33. package/dist/js/i18n/mr.js +2 -2
  34. package/dist/js/i18n/ms.js +16 -0
  35. package/dist/js/i18n/nl.js +2 -2
  36. package/dist/js/i18n/no.js +2 -2
  37. package/dist/js/i18n/pl.js +2 -2
  38. package/dist/js/i18n/pt.js +2 -2
  39. package/dist/js/i18n/ro.js +4 -4
  40. package/dist/js/i18n/ru.js +2 -2
  41. package/dist/js/i18n/sk.js +5 -8
  42. package/dist/js/i18n/sl.js +2 -2
  43. package/dist/js/i18n/sq.js +2 -2
  44. package/dist/js/i18n/sr.js +2 -2
  45. package/dist/js/i18n/sv.js +2 -5
  46. package/dist/js/i18n/sw.js +19 -0
  47. package/dist/js/i18n/ta.js +19 -0
  48. package/dist/js/i18n/te.js +2 -2
  49. package/dist/js/i18n/th.js +2 -5
  50. package/dist/js/i18n/tr.js +2 -5
  51. package/dist/js/i18n/uk.js +2 -2
  52. package/dist/js/i18n/ur.js +2 -2
  53. package/dist/js/i18n/uz.js +2 -5
  54. package/dist/js/i18n/vi.js +2 -5
  55. package/dist/js/i18n/zh-hk.js +2 -5
  56. package/dist/js/i18n/zh.js +2 -5
  57. package/dist/js/i18n.d.ts +49 -31
  58. package/dist/js/intlTelInput.js +90 -47
  59. package/dist/js/intlTelInput.min.js +2 -2
  60. package/dist/js/intlTelInput.mjs +89 -46
  61. package/dist/js/intlTelInputWithUtils.js +90 -47
  62. package/dist/js/intlTelInputWithUtils.min.js +2 -2
  63. package/dist/js/intlTelInputWithUtils.mjs +89 -46
  64. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  const interfaceTranslations = {
3
- selectedCountryAriaLabel: "Spremeni državo, izbrano ${countryName} (${dialCode})",
4
- noCountrySelected: "Izberi državo",
3
+ selectedCountryAriaLabel: "Spremeni državo za telefonsko številko, izbrano ${countryName} (${dialCode})",
4
+ noCountrySelected: "Izberi državo za telefonsko številko",
5
5
  countryListAriaLabel: "Seznam držav",
6
6
  searchPlaceholder: "Išči",
7
7
  clearSearchAriaLabel: "Počisti iskanje",
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  const interfaceTranslations = {
3
- selectedCountryAriaLabel: "Ndrysho vendin, i zgjedhur ${countryName} (${dialCode})",
4
- noCountrySelected: "Zgjidh vendin",
3
+ selectedCountryAriaLabel: "Ndrysho vendin për numrin e telefonit, i zgjedhur ${countryName} (${dialCode})",
4
+ noCountrySelected: "Zgjidh vendin për numrin e telefonit",
5
5
  countryListAriaLabel: "Lista e vendeve",
6
6
  searchPlaceholder: "Kërko",
7
7
  clearSearchAriaLabel: "Pastro kërkimin",
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  const interfaceTranslations = {
3
- selectedCountryAriaLabel: "Промени земљу, изабрано ${countryName} (${dialCode})",
4
- noCountrySelected: "Изабери земљу",
3
+ selectedCountryAriaLabel: "Промени земљу за телефонски број, изабрано ${countryName} (${dialCode})",
4
+ noCountrySelected: "Изабери земљу за телефонски број",
5
5
  countryListAriaLabel: "Листа земаља",
6
6
  searchPlaceholder: "Претрага",
7
7
  clearSearchAriaLabel: "Обриши претрагу",
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  const interfaceTranslations = {
3
- selectedCountryAriaLabel: "Valt land",
4
- noCountrySelected: "Inget land valt",
3
+ selectedCountryAriaLabel: "Byt land för telefonnummer, valt ${countryName} (${dialCode})",
4
+ noCountrySelected: "Välj land för telefonnummer",
5
5
  countryListAriaLabel: "Lista över länder",
6
6
  searchPlaceholder: "Sök",
7
7
  clearSearchAriaLabel: "Rensa sökning",
@@ -10,9 +10,6 @@ const interfaceTranslations = {
10
10
  if (count === 0) {
11
11
  return "Inga resultat hittades";
12
12
  }
13
- if (count === 1) {
14
- return "1 resultat hittades";
15
- }
16
13
  return `${count} resultat hittades`;
17
14
  }
18
15
  };
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ const interfaceTranslations = {
3
+ selectedCountryAriaLabel: "Badilisha nchi kwa nambari ya simu, imechaguliwa ${countryName} (${dialCode})",
4
+ noCountrySelected: "Chagua nchi kwa nambari ya simu",
5
+ countryListAriaLabel: "Orodha ya nchi",
6
+ searchPlaceholder: "Tafuta",
7
+ clearSearchAriaLabel: "Futa utafutaji",
8
+ searchEmptyState: "Hakuna matokeo yaliyopatikana",
9
+ searchSummaryAria(count) {
10
+ if (count === 0) {
11
+ return "Hakuna matokeo yaliyopatikana";
12
+ }
13
+ if (count === 1) {
14
+ return "Tokeo 1 limepatikana";
15
+ }
16
+ return `Matokeo ${count} yamepatikana`;
17
+ }
18
+ };
19
+ export default interfaceTranslations;
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ const interfaceTranslations = {
3
+ selectedCountryAriaLabel: "தொலைபேசி எண்ணுக்கு நாட்டை மாற்று, தேர்ந்தெடுக்கப்பட்டது ${countryName} (${dialCode})",
4
+ noCountrySelected: "தொலைபேசி எண்ணுக்கு நாட்டைத் தேர்ந்தெடுக்கவும்",
5
+ countryListAriaLabel: "நாடுகளின் பட்டியல்",
6
+ searchPlaceholder: "தேடு",
7
+ clearSearchAriaLabel: "தேடலை அழி",
8
+ searchEmptyState: "முடிவுகள் எதுவும் கிடைக்கவில்லை",
9
+ searchSummaryAria(count) {
10
+ if (count === 0) {
11
+ return "முடிவுகள் எதுவும் கிடைக்கவில்லை";
12
+ }
13
+ if (count === 1) {
14
+ return "1 முடிவு கிடைத்தது";
15
+ }
16
+ return `${count} முடிவுகள் கிடைத்தன`;
17
+ }
18
+ };
19
+ export default interfaceTranslations;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  const interfaceTranslations = {
3
- selectedCountryAriaLabel: "ఎంచుకున్న దేశం",
4
- noCountrySelected: " దేశం ఎంచుకోబడలేదు",
3
+ selectedCountryAriaLabel: "ఫోన్ నంబర్ కోసం దేశాన్ని మార్చండి, ఎంచుకున్నది ${countryName} (${dialCode})",
4
+ noCountrySelected: "ఫోన్ నంబర్ కోసం దేశాన్ని ఎంచుకోండి",
5
5
  countryListAriaLabel: "దేశాల జాబితా",
6
6
  searchPlaceholder: "వెతకండి",
7
7
  clearSearchAriaLabel: "శోధనను క్లియర్ చేయండి",
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  const interfaceTranslations = {
3
- selectedCountryAriaLabel: "ประเทศที่เลือก",
4
- noCountrySelected: "ไม่ได้เลือกประเทศ",
3
+ selectedCountryAriaLabel: "เปลี่ยนประเทศสำหรับหมายเลขโทรศัพท์, เลือก ${countryName} (${dialCode})",
4
+ noCountrySelected: "เลือกประเทศสำหรับหมายเลขโทรศัพท์",
5
5
  countryListAriaLabel: "รายชื่อประเทศ",
6
6
  searchPlaceholder: "ค้นหา",
7
7
  clearSearchAriaLabel: "ล้างการค้นหา",
@@ -10,9 +10,6 @@ const interfaceTranslations = {
10
10
  if (count === 0) {
11
11
  return "ไม่พบผลลัพธ์";
12
12
  }
13
- if (count === 1) {
14
- return "พบผลลัพธ์ 1 รายการ";
15
- }
16
13
  return `พบผลลัพธ์ ${count} รายการ`;
17
14
  }
18
15
  };
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  const interfaceTranslations = {
3
- selectedCountryAriaLabel: "Seçilen ülke",
4
- noCountrySelected: "Hiçbir ülke seçilmedi",
3
+ selectedCountryAriaLabel: "Telefon numarası için ülke değiştir, seçili ${countryName} (${dialCode})",
4
+ noCountrySelected: "Telefon numarası için ülke seç",
5
5
  countryListAriaLabel: "Ülke listesi",
6
6
  searchPlaceholder: "Ara",
7
7
  clearSearchAriaLabel: "Aramayı temizle",
@@ -10,9 +10,6 @@ const interfaceTranslations = {
10
10
  if (count === 0) {
11
11
  return "Sonuç bulunamadı";
12
12
  }
13
- if (count === 1) {
14
- return "1 sonuç bulundu";
15
- }
16
13
  return `${count} sonuç bulundu`;
17
14
  }
18
15
  };
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  const interfaceTranslations = {
3
- selectedCountryAriaLabel: "Обрана країна",
4
- noCountrySelected: "Країну не обрано",
3
+ selectedCountryAriaLabel: "Змінити країну для номера телефону, обрана ${countryName} (${dialCode})",
4
+ noCountrySelected: "Виберіть країну для номера телефону",
5
5
  countryListAriaLabel: "Список країн",
6
6
  searchPlaceholder: "Шукати",
7
7
  clearSearchAriaLabel: "Очистити пошук",
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  const interfaceTranslations = {
3
- selectedCountryAriaLabel: "منتخب ملک",
4
- noCountrySelected: "کوئی ملک منتخب نہیں کیا گیا۔",
3
+ selectedCountryAriaLabel: "فون نمبر کے لیے ملک تبدیل کریں، منتخب ${countryName} (${dialCode})",
4
+ noCountrySelected: "فون نمبر کے لیے ملک منتخب کریں",
5
5
  countryListAriaLabel: "ممالک کی فہرست",
6
6
  searchPlaceholder: "تلاش کریں۔",
7
7
  clearSearchAriaLabel: "تلاش صاف کریں",
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  const interfaceTranslations = {
3
- selectedCountryAriaLabel: "Tanlangan davlat",
4
- noCountrySelected: "Davlat tanlanmagan",
3
+ selectedCountryAriaLabel: "Telefon raqami uchun davlatni o'zgartirish, tanlangan ${countryName} (${dialCode})",
4
+ noCountrySelected: "Telefon raqami uchun davlatni tanlang",
5
5
  countryListAriaLabel: "Davlatlar roʻyxati",
6
6
  searchPlaceholder: "Davlatni qidiring",
7
7
  clearSearchAriaLabel: "Qidiruvni tozalang",
@@ -10,9 +10,6 @@ const interfaceTranslations = {
10
10
  if (count === 0) {
11
11
  return "Natija topilmadi";
12
12
  }
13
- if (count === 1) {
14
- return "1-ta natija topildi";
15
- }
16
13
  return `${count}-ta natija topildi`;
17
14
  }
18
15
  };
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  const interfaceTranslations = {
3
- selectedCountryAriaLabel: "Quốc gia đã chọn",
4
- noCountrySelected: "Không quốc gia nào được chọn",
3
+ selectedCountryAriaLabel: "Thay đổi quốc gia cho số điện thoại, đã chọn ${countryName} (${dialCode})",
4
+ noCountrySelected: "Chọn quốc gia cho số điện thoại",
5
5
  countryListAriaLabel: "Danh sách các quốc gia",
6
6
  searchPlaceholder: "Khám xét",
7
7
  clearSearchAriaLabel: "Xóa tìm kiếm",
@@ -10,9 +10,6 @@ const interfaceTranslations = {
10
10
  if (count === 0) {
11
11
  return "Không tìm thấy kết quả nào";
12
12
  }
13
- if (count === 1) {
14
- return "Đã tìm thấy 1 kết quả";
15
- }
16
13
  return `Đã tìm thấy ${count} kết quả`;
17
14
  }
18
15
  };
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  const interfaceTranslations = {
3
- selectedCountryAriaLabel: "更改國家,選擇「${countryName}」(${dialCode})",
4
- noCountrySelected: "選擇國家",
3
+ selectedCountryAriaLabel: "更改電話號碼的國家,選擇「${countryName}」(${dialCode})",
4
+ noCountrySelected: "選擇電話號碼的國家",
5
5
  countryListAriaLabel: "國家清單",
6
6
  searchPlaceholder: "搜尋",
7
7
  clearSearchAriaLabel: "清除搜尋",
@@ -10,9 +10,6 @@ const interfaceTranslations = {
10
10
  if (count === 0) {
11
11
  return "未找到相關項目";
12
12
  }
13
- if (count === 1) {
14
- return "找到 1 個相關項目";
15
- }
16
13
  return `找到 ${count} 個相關項目`;
17
14
  }
18
15
  };
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  const interfaceTranslations = {
3
- selectedCountryAriaLabel: "所选国家",
4
- noCountrySelected: "未选择国家/地区",
3
+ selectedCountryAriaLabel: "更改电话号码的国家,已选择 ${countryName}(${dialCode})",
4
+ noCountrySelected: "选择电话号码的国家",
5
5
  countryListAriaLabel: "国家名单",
6
6
  searchPlaceholder: "搜索",
7
7
  clearSearchAriaLabel: "清除搜索",
@@ -10,9 +10,6 @@ const interfaceTranslations = {
10
10
  if (count === 0) {
11
11
  return "未找到结果";
12
12
  }
13
- if (count === 1) {
14
- return "找到 1 个结果";
15
- }
16
13
  return `找到 ${count} 个结果`;
17
14
  }
18
15
  };
package/dist/js/i18n.d.ts CHANGED
@@ -54,6 +54,15 @@ declare const interfaceTranslations$41: I18n;
54
54
  declare const interfaceTranslations$42: I18n;
55
55
  declare const interfaceTranslations$43: I18n;
56
56
  declare const interfaceTranslations$44: I18n;
57
+ declare const interfaceTranslations$45: I18n;
58
+ declare const interfaceTranslations$46: I18n;
59
+ declare const interfaceTranslations$47: I18n;
60
+ declare const interfaceTranslations$48: I18n;
61
+ declare const interfaceTranslations$49: I18n;
62
+ declare const interfaceTranslations$50: I18n;
63
+ declare const interfaceTranslations$51: I18n;
64
+ declare const interfaceTranslations$52: I18n;
65
+ declare const interfaceTranslations$53: I18n;
57
66
 
58
67
  export {
59
68
  interfaceTranslations as ar,
@@ -62,41 +71,50 @@ export {
62
71
  interfaceTranslations$11 as et,
63
72
  interfaceTranslations$12 as fa,
64
73
  interfaceTranslations$13 as fi,
65
- interfaceTranslations$14 as fr,
66
- interfaceTranslations$15 as hi,
67
- interfaceTranslations$16 as hr,
68
- interfaceTranslations$17 as hu,
69
- interfaceTranslations$18 as id,
70
- interfaceTranslations$19 as it,
74
+ interfaceTranslations$14 as fil,
75
+ interfaceTranslations$15 as fr,
76
+ interfaceTranslations$16 as he,
77
+ interfaceTranslations$17 as hi,
78
+ interfaceTranslations$18 as hr,
79
+ interfaceTranslations$19 as hu,
71
80
  interfaceTranslations$2 as bn,
72
- interfaceTranslations$20 as ja,
73
- interfaceTranslations$21 as kn,
74
- interfaceTranslations$22 as ko,
75
- interfaceTranslations$23 as lt,
76
- interfaceTranslations$24 as mr,
77
- interfaceTranslations$25 as nl,
78
- interfaceTranslations$26 as no,
79
- interfaceTranslations$27 as pl,
80
- interfaceTranslations$28 as pt,
81
- interfaceTranslations$29 as ro,
81
+ interfaceTranslations$20 as hy,
82
+ interfaceTranslations$21 as id,
83
+ interfaceTranslations$22 as is,
84
+ interfaceTranslations$23 as it,
85
+ interfaceTranslations$24 as ja,
86
+ interfaceTranslations$25 as kn,
87
+ interfaceTranslations$26 as ko,
88
+ interfaceTranslations$27 as lt,
89
+ interfaceTranslations$28 as lv,
90
+ interfaceTranslations$29 as mk,
82
91
  interfaceTranslations$3 as bs,
83
- interfaceTranslations$30 as ru,
84
- interfaceTranslations$31 as sk,
85
- interfaceTranslations$32 as sl,
86
- interfaceTranslations$33 as sq,
87
- interfaceTranslations$34 as sr,
88
- interfaceTranslations$35 as sv,
89
- interfaceTranslations$36 as te,
90
- interfaceTranslations$37 as th,
91
- interfaceTranslations$38 as tr,
92
- interfaceTranslations$39 as uk,
92
+ interfaceTranslations$30 as mr,
93
+ interfaceTranslations$31 as ms,
94
+ interfaceTranslations$32 as nl,
95
+ interfaceTranslations$33 as no,
96
+ interfaceTranslations$34 as pl,
97
+ interfaceTranslations$35 as pt,
98
+ interfaceTranslations$36 as ro,
99
+ interfaceTranslations$37 as ru,
100
+ interfaceTranslations$38 as sk,
101
+ interfaceTranslations$39 as sl,
93
102
  interfaceTranslations$4 as ca,
94
- interfaceTranslations$40 as ur,
95
- interfaceTranslations$41 as uz,
96
- interfaceTranslations$42 as vi,
97
- interfaceTranslations$43 as zh,
98
- interfaceTranslations$44 as zhHk,
103
+ interfaceTranslations$40 as sq,
104
+ interfaceTranslations$41 as sr,
105
+ interfaceTranslations$42 as sv,
106
+ interfaceTranslations$43 as sw,
107
+ interfaceTranslations$44 as ta,
108
+ interfaceTranslations$45 as te,
109
+ interfaceTranslations$46 as th,
110
+ interfaceTranslations$47 as tr,
111
+ interfaceTranslations$48 as uk,
112
+ interfaceTranslations$49 as ur,
99
113
  interfaceTranslations$5 as cs,
114
+ interfaceTranslations$50 as uz,
115
+ interfaceTranslations$51 as vi,
116
+ interfaceTranslations$52 as zh,
117
+ interfaceTranslations$53 as zhHk,
100
118
  interfaceTranslations$6 as da,
101
119
  interfaceTranslations$7 as de,
102
120
  interfaceTranslations$8 as el,
@@ -1,5 +1,5 @@
1
1
  /*
2
- * International Telephone Input v28.0.8
2
+ * International Telephone Input v28.1.0
3
3
  * git+https://github.com/jackocnr/intl-tel-input.git
4
4
  * Licensed under the MIT license
5
5
  */
@@ -1802,7 +1802,8 @@ var _factory = (() => {
1802
1802
  FLAG: "iti__flag",
1803
1803
  LOADING: "iti__loading",
1804
1804
  COUNTRY_ITEM: "iti__country",
1805
- HIGHLIGHT: "iti__highlight"
1805
+ HIGHLIGHT: "iti__highlight",
1806
+ STRICT_REJECT_ANIMATION: "iti__strict-reject-animation"
1806
1807
  };
1807
1808
  var KEYS = {
1808
1809
  ARROW_UP: "ArrowUp",
@@ -3158,7 +3159,6 @@ var _factory = (() => {
3158
3159
  }
3159
3160
  //* Keyboard navigation while the dropdown is open: arrow keys navigate, hidden-search keys filter,
3160
3161
  //* and enter/escape invoke the caller's callbacks (which handle country selection / dropdown close).
3161
- //* Listens on document because key events go there when no input has focus.
3162
3162
  //* Uses keydown rather than keypress so non-char keys (arrow, esc) fire and so holding a key repeats.
3163
3163
  #bindDropdownKeydownListener(signal, onEnter, onEscape) {
3164
3164
  let query = "";
@@ -3182,7 +3182,7 @@ var _factory = (() => {
3182
3182
  this.#selectedCountryEl.focus();
3183
3183
  }
3184
3184
  }
3185
- if (!this.#options.countrySearch && e.target !== this.telInputEl && REGEX.HIDDEN_SEARCH_CHAR.test(e.key)) {
3185
+ if (!this.#options.countrySearch && REGEX.HIDDEN_SEARCH_CHAR.test(e.key)) {
3186
3186
  e.stopPropagation();
3187
3187
  if (queryTimer) {
3188
3188
  clearTimeout(queryTimer);
@@ -3194,7 +3194,8 @@ var _factory = (() => {
3194
3194
  }, TIMINGS.HIDDEN_SEARCH_RESET_MS);
3195
3195
  }
3196
3196
  };
3197
- document.addEventListener("keydown", handleKeydown, { signal });
3197
+ this.#selectedCountryEl?.addEventListener("keydown", handleKeydown, { signal });
3198
+ this.#dropdownContentEl?.addEventListener("keydown", handleKeydown, { signal });
3198
3199
  }
3199
3200
  //* Wire up country search input listener: typing filters the list, the clear button resets it.
3200
3201
  #bindSearchInputListener(signal) {
@@ -3359,6 +3360,26 @@ var _factory = (() => {
3359
3360
  setLoading(isLoading) {
3360
3361
  this.#selectedFlagEl.classList.toggle(CLASSES.LOADING, isLoading);
3361
3362
  }
3363
+ //* Play the strict-reject animation (shake, or background-colour flash under prefers-reduced-motion) on the wrapper.
3364
+ //* Called when strictMode rejects the whole input (keystroke, or whole paste).
3365
+ //* Uses the wrapper (not the input) so any separateDialCode / country button move together with the input.
3366
+ playStrictRejectAnimation() {
3367
+ if (!this.#options.strictRejectAnimation) {
3368
+ return;
3369
+ }
3370
+ const wrapperEl = this.telInputEl.parentElement;
3371
+ if (!wrapperEl) {
3372
+ return;
3373
+ }
3374
+ wrapperEl.classList.remove(CLASSES.STRICT_REJECT_ANIMATION);
3375
+ void wrapperEl.offsetWidth;
3376
+ wrapperEl.classList.add(CLASSES.STRICT_REJECT_ANIMATION);
3377
+ wrapperEl.addEventListener(
3378
+ "animationend",
3379
+ () => wrapperEl.classList.remove(CLASSES.STRICT_REJECT_ANIMATION),
3380
+ { once: true }
3381
+ );
3382
+ }
3362
3383
  isLoading() {
3363
3384
  return this.#selectedFlagEl.classList.contains(CLASSES.LOADING);
3364
3385
  }
@@ -3664,6 +3685,7 @@ var _factory = (() => {
3664
3685
  #numerals;
3665
3686
  //* Tracks whether the user has typed/pasted their own formatting chars, so AYT-formatting should back off.
3666
3687
  #userOverrideFormatting = false;
3688
+ #strictPasteSnapshot = null;
3667
3689
  #autoCountryDeferred;
3668
3690
  #utilsDeferred;
3669
3691
  constructor(input, customOptions = {}) {
@@ -3874,7 +3896,7 @@ var _factory = (() => {
3874
3896
  #handleAndroidStrictReject(inputValue, rejectedInput) {
3875
3897
  const newCaretPos = this.#removeJustTypedChar(inputValue);
3876
3898
  this.#ui.telInputEl.setSelectionRange(newCaretPos, newCaretPos);
3877
- this.#playStrictRejectAnimation();
3899
+ this.#ui.playStrictRejectAnimation();
3878
3900
  this.#dispatchEvent(EVENTS.STRICT_REJECT, {
3879
3901
  source: "key",
3880
3902
  rejectedInput,
@@ -3945,21 +3967,30 @@ var _factory = (() => {
3945
3967
  if (detail?.["isCountryChange"]) {
3946
3968
  return;
3947
3969
  }
3948
- const inputValue = this.#getTelInputValue();
3949
- if (this.#isAndroid && e?.data === "+" && separateDialCode && allowDropdown && countrySearch) {
3970
+ let inputValue = this.#getTelInputValue();
3971
+ const isPaste = e?.inputType === INPUT_TYPES.PASTE;
3972
+ const isStrictPaste = strictMode && isPaste;
3973
+ if (this.#isAndroid && !isPaste && e?.data === "+" && separateDialCode && allowDropdown && countrySearch) {
3950
3974
  this.#handleAndroidPlusKey(inputValue);
3951
3975
  return;
3952
3976
  }
3953
- if (this.#isAndroid && strictMode && (e?.data === " " || e?.data === "-" || e?.data === ".")) {
3977
+ if (this.#isAndroid && !isPaste && strictMode && (e?.data === " " || e?.data === "-" || e?.data === ".")) {
3954
3978
  this.#handleAndroidStrictReject(inputValue, e.data);
3955
3979
  return;
3956
3980
  }
3981
+ if (isStrictPaste) {
3982
+ const didRejectPaste = this.#handleStrictPasteInputEvent();
3983
+ if (didRejectPaste) {
3984
+ return;
3985
+ }
3986
+ inputValue = this.#getTelInputValue();
3987
+ }
3957
3988
  if (this.#updateCountryFromNumber(inputValue)) {
3958
3989
  this.#dispatchCountryChangeEvent();
3959
3990
  }
3960
- const isFormattingChar = e?.data && REGEX.NON_PLUS_NUMERIC.test(e.data);
3961
- const isPaste = e?.inputType === INPUT_TYPES.PASTE && inputValue;
3962
- if (isFormattingChar || isPaste && !strictMode) {
3991
+ const isFormattingChar = !isStrictPaste && e?.data && REGEX.NON_PLUS_NUMERIC.test(e.data);
3992
+ const isNonStrictPaste = isPaste && inputValue && !strictMode;
3993
+ if (isFormattingChar || isNonStrictPaste) {
3963
3994
  this.#userOverrideFormatting = true;
3964
3995
  } else if (!REGEX.NON_PLUS_NUMERIC.test(inputValue)) {
3965
3996
  this.#userOverrideFormatting = false;
@@ -4022,7 +4053,7 @@ var _factory = (() => {
4022
4053
  const newCountry = this.#resolveCountryChangeFromNumber(newFullNumber);
4023
4054
  const isChangingDialCode = newCountry !== null;
4024
4055
  if (!isAllowedChar || hasExceededMaxLength && !isChangingDialCode && !isInitialPlus) {
4025
- this.#playStrictRejectAnimation();
4056
+ this.#ui.playStrictRejectAnimation();
4026
4057
  this.#dispatchEvent(EVENTS.STRICT_REJECT, {
4027
4058
  source: "key",
4028
4059
  rejectedInput: e.key,
@@ -4039,20 +4070,37 @@ var _factory = (() => {
4039
4070
  signal: this.#abortController.signal
4040
4071
  });
4041
4072
  }
4042
- // Handle paste events when strictMode is enabled by sanitising the pasted content before it's inserted into the input, and rejecting it entirely if it would result in an invalid number
4073
+ // In strict mode, remember paste details before the browser inserts the pasted text.
4074
+ // The actual sanitisation runs on the following input event so native paste stays enabled.
4043
4075
  #handleStrictPasteEvent = (e) => {
4044
- e.preventDefault();
4045
4076
  const input = this.#ui.telInputEl;
4046
- const selStart = input.selectionStart;
4047
- const selEnd = input.selectionEnd;
4048
4077
  const inputValue = this.#getTelInputValue();
4049
- const before = inputValue.slice(0, selStart ?? void 0);
4050
- const after = inputValue.slice(selEnd ?? void 0);
4078
+ this.#strictPasteSnapshot = {
4079
+ pastedRaw: e.clipboardData?.getData("text") ?? "",
4080
+ value: inputValue,
4081
+ selectionStart: input.selectionStart ?? inputValue.length,
4082
+ selectionEnd: input.selectionEnd ?? inputValue.length
4083
+ };
4084
+ };
4085
+ // Handle paste input events when strictMode is enabled by sanitising the pasted content after
4086
+ // the browser inserts it, and rejecting it entirely if it would result in an invalid number.
4087
+ #handleStrictPasteInputEvent() {
4088
+ const input = this.#ui.telInputEl;
4089
+ const pasteSnapshot = this.#strictPasteSnapshot;
4090
+ this.#strictPasteSnapshot = null;
4091
+ if (!pasteSnapshot) {
4092
+ return false;
4093
+ }
4094
+ const pastedRaw = pasteSnapshot.pastedRaw;
4095
+ const originalValue = pasteSnapshot.value;
4096
+ const selStart = pasteSnapshot.selectionStart;
4097
+ const selEnd = pasteSnapshot.selectionEnd;
4098
+ const before = originalValue.slice(0, selStart);
4099
+ const after = originalValue.slice(selEnd);
4051
4100
  const iso2 = this.#selectedCountry?.iso2;
4052
- const pastedRaw = e.clipboardData.getData("text");
4053
4101
  const pasted = this.#numerals.normalise(pastedRaw);
4054
4102
  const initialCharSelected = selStart === 0 && selEnd > 0;
4055
- const allowLeadingPlus = !inputValue.startsWith("+") || initialCharSelected;
4103
+ const allowLeadingPlus = !originalValue.startsWith("+") || initialCharSelected;
4056
4104
  const allowedChars = pasted.replace(REGEX.NON_PLUS_NUMERIC_GLOBAL, "");
4057
4105
  const hasLeadingPlus = allowedChars.startsWith("+");
4058
4106
  const numerics = allowedChars.replace(/\+/g, "");
@@ -4060,13 +4108,14 @@ var _factory = (() => {
4060
4108
  let newValue = before + sanitised + after;
4061
4109
  let rejectReason = sanitised !== pasted ? "invalid" : null;
4062
4110
  if (newValue.length > 30) {
4063
- this.#playStrictRejectAnimation();
4111
+ this.#ui.playStrictRejectAnimation();
4064
4112
  this.#dispatchEvent(EVENTS.STRICT_REJECT, {
4065
4113
  source: "paste",
4066
4114
  rejectedInput: pastedRaw,
4067
4115
  reason: "max-length"
4068
4116
  });
4069
- return;
4117
+ this.#restoreValueBeforeStrictPaste(pasteSnapshot);
4118
+ return true;
4070
4119
  }
4071
4120
  if (newValue.length > 5 && intlTelInput.utils) {
4072
4121
  let coreNumber = intlTelInput.utils.getCoreNumber(newValue, iso2);
@@ -4075,37 +4124,38 @@ var _factory = (() => {
4075
4124
  coreNumber = intlTelInput.utils.getCoreNumber(newValue, iso2);
4076
4125
  }
4077
4126
  if (!coreNumber) {
4078
- this.#playStrictRejectAnimation();
4127
+ this.#ui.playStrictRejectAnimation();
4079
4128
  this.#dispatchEvent(EVENTS.STRICT_REJECT, {
4080
4129
  source: "paste",
4081
4130
  rejectedInput: pastedRaw,
4082
4131
  reason: "max-length"
4083
4132
  });
4084
- return;
4133
+ this.#restoreValueBeforeStrictPaste(pasteSnapshot);
4134
+ return true;
4085
4135
  }
4086
4136
  if (this.#maxCoreNumberLength && coreNumber.length > this.#maxCoreNumberLength) {
4087
- if (input.selectionEnd === inputValue.length) {
4137
+ if (selEnd === originalValue.length) {
4088
4138
  const trimLength = coreNumber.length - this.#maxCoreNumberLength;
4089
4139
  newValue = newValue.slice(0, newValue.length - trimLength);
4090
4140
  rejectReason = "max-length";
4091
4141
  } else {
4092
- this.#playStrictRejectAnimation();
4142
+ this.#ui.playStrictRejectAnimation();
4093
4143
  this.#dispatchEvent(EVENTS.STRICT_REJECT, {
4094
4144
  source: "paste",
4095
4145
  rejectedInput: pastedRaw,
4096
4146
  reason: "max-length"
4097
4147
  });
4098
- return;
4148
+ this.#restoreValueBeforeStrictPaste(pasteSnapshot);
4149
+ return true;
4099
4150
  }
4100
4151
  }
4101
4152
  }
4102
4153
  this.#setTelInputValue(newValue);
4103
4154
  const caretPos = selStart + sanitised.length;
4104
4155
  input.setSelectionRange(caretPos, caretPos);
4105
- input.dispatchEvent(new InputEvent("input", { bubbles: true }));
4106
4156
  if (rejectReason) {
4107
4157
  if (pasted.length > 0 && sanitised.length === 0) {
4108
- this.#playStrictRejectAnimation();
4158
+ this.#ui.playStrictRejectAnimation();
4109
4159
  }
4110
4160
  this.#dispatchEvent(EVENTS.STRICT_REJECT, {
4111
4161
  source: "paste",
@@ -4113,27 +4163,20 @@ var _factory = (() => {
4113
4163
  reason: rejectReason
4114
4164
  });
4115
4165
  }
4116
- };
4166
+ return false;
4167
+ }
4168
+ #restoreValueBeforeStrictPaste(pasteSnapshot) {
4169
+ this.#setTelInputValue(pasteSnapshot.value);
4170
+ this.#ui.telInputEl.setSelectionRange(
4171
+ pasteSnapshot.selectionStart,
4172
+ pasteSnapshot.selectionEnd
4173
+ );
4174
+ }
4117
4175
  //* Adhere to the input's maxlength attr.
4118
4176
  #truncateToMaxLength(number) {
4119
4177
  const max = Number(this.#ui.telInputEl.getAttribute("maxlength"));
4120
4178
  return max && number.length > max ? number.substring(0, max) : number;
4121
4179
  }
4122
- //* Play the strict-reject animation (shake, or background-colour flash under prefers-reduced-motion) on the wrapper.
4123
- //* Called when strictMode rejects the whole input (keystroke, or whole paste).
4124
- //* Uses the wrapper (not the input) so any separateDialCode / country button move together with the input.
4125
- #playStrictRejectAnimation() {
4126
- if (!this.#options.strictRejectAnimation) {
4127
- return;
4128
- }
4129
- const wrapperEl = this.#ui.telInputEl.parentElement;
4130
- if (!wrapperEl) {
4131
- return;
4132
- }
4133
- wrapperEl.classList.remove("iti__strict-reject-animation");
4134
- void wrapperEl.offsetWidth;
4135
- wrapperEl.classList.add("iti__strict-reject-animation");
4136
- }
4137
4180
  //* Trigger a custom event on the input (typed via ItiEventMap).
4138
4181
  #dispatchEvent(name, detailProps = {}) {
4139
4182
  const e = new CustomEvent(name, {
@@ -4753,7 +4796,7 @@ var _factory = (() => {
4753
4796
  attachUtils,
4754
4797
  startedLoadingUtils: false,
4755
4798
  startedLoadingAutoCountry: false,
4756
- version: "28.0.8",
4799
+ version: "28.1.0",
4757
4800
  NUMBER_FORMAT,
4758
4801
  NUMBER_TYPE,
4759
4802
  VALIDATION_ERROR