intl-tel-input 28.0.2 → 28.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.
@@ -1965,7 +1965,7 @@ var defaults = {
1965
1965
  //* A function to load the utils script.
1966
1966
  loadUtils: null,
1967
1967
  //* National vs international formatting for numbers e.g. placeholders and displaying existing numbers.
1968
- nationalMode: true,
1968
+ nationalMode: false,
1969
1969
  //* Display only these countries.
1970
1970
  onlyCountries: null,
1971
1971
  //* Number type to use for placeholders.
@@ -2250,31 +2250,50 @@ var createEl = (tagName, attrs, container) => {
2250
2250
  };
2251
2251
 
2252
2252
  // packages/core/src/js/core/icons.ts
2253
- var buildSearchIcon = () => `
2254
- <svg class="iti__search-icon-svg" width="14" height="14" viewBox="0 0 24 24" focusable="false" ${ARIA.HIDDEN}="true">
2255
- <circle cx="11" cy="11" r="7" />
2256
- <line x1="21" y1="21" x2="16.65" y2="16.65" />
2257
- </svg>`;
2253
+ var SVG_NS = "http://www.w3.org/2000/svg";
2254
+ var buildSvg = ([tag, attrs, children]) => {
2255
+ const el = document.createElementNS(SVG_NS, tag);
2256
+ if (attrs) {
2257
+ for (const k in attrs) {
2258
+ el.setAttribute(k, String(attrs[k]));
2259
+ }
2260
+ }
2261
+ if (children) {
2262
+ for (const c of children) {
2263
+ el.appendChild(buildSvg(c));
2264
+ }
2265
+ }
2266
+ return el;
2267
+ };
2268
+ var buildSearchIcon = () => buildSvg(
2269
+ ["svg", { class: "iti__search-icon-svg", width: 14, height: 14, viewBox: "0 0 24 24", focusable: "false", [ARIA.HIDDEN]: "true" }, [
2270
+ ["circle", { cx: 11, cy: 11, r: 7 }],
2271
+ ["line", { x1: 21, y1: 21, x2: 16.65, y2: 16.65 }]
2272
+ ]]
2273
+ );
2258
2274
  var buildClearIcon = (id) => {
2259
2275
  const maskId = `iti-${id}-clear-mask`;
2260
- return `
2261
- <svg class="iti__search-clear-svg" width="12" height="12" viewBox="0 0 16 16" ${ARIA.HIDDEN}="true" focusable="false">
2262
- <mask id="${maskId}" maskUnits="userSpaceOnUse">
2263
- <rect width="16" height="16" fill="white" />
2264
- <path d="M5.2 5.2 L10.8 10.8 M10.8 5.2 L5.2 10.8" stroke="black" stroke-linecap="round" class="iti__search-clear-x" />
2265
- </mask>
2266
- <circle cx="8" cy="8" r="8" class="iti__search-clear-bg" mask="url(#${maskId})" />
2267
- </svg>`;
2276
+ return buildSvg(
2277
+ ["svg", { class: "iti__search-clear-svg", width: 12, height: 12, viewBox: "0 0 16 16", [ARIA.HIDDEN]: "true", focusable: "false" }, [
2278
+ ["mask", { id: maskId, maskUnits: "userSpaceOnUse" }, [
2279
+ ["rect", { width: 16, height: 16, fill: "white" }],
2280
+ ["path", { d: "M5.2 5.2 L10.8 10.8 M10.8 5.2 L5.2 10.8", stroke: "black", "stroke-linecap": "round", class: "iti__search-clear-x" }]
2281
+ ]],
2282
+ ["circle", { cx: 8, cy: 8, r: 8, class: "iti__search-clear-bg", mask: `url(#${maskId})` }]
2283
+ ]]
2284
+ );
2268
2285
  };
2269
- var buildCheckIcon = () => `
2270
- <svg class="iti__country-check-svg" width="14" height="14" viewBox="0 0 16 16" fill="currentColor" focusable="false" ${ARIA.HIDDEN}="true">
2271
- <path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0m-3.97-3.03a.75.75 0 0 0-1.08.022L7.477 9.417 5.384 7.323a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-.01-1.05z"/>
2272
- </svg>`;
2273
- var buildGlobeIcon = () => `
2274
- <svg width="256" height="256" viewBox="0 0 512 512" class="iti__globe-svg">
2275
- <path d="M508 213a240 240 0 0 0-449-87l-2 5-2 5c-8 14-13 30-17 46a65 65 0 0 1 56 4c16-10 35-19 56-27l9-3c-6 23-10 48-10 74h-16l4 6c3 4 5 8 6 13h6c0 22 3 44 8 65l2 10-25-10-4 5 12 18 9 3 6 2 8 3 9 26 1 2 16-7h1l-5-13-1-2c24 6 49 9 75 10v26l11 10 7 7v-30l1-13c22 0 44-3 65-8l10-2-21 48-1 1a317 317 0 0 1-14 23l-21 5h-2c6 16 7 33 1 50a240 240 0 0 0 211-265m-401-56-11 6c19-44 54-79 98-98-11 20-21 44-29 69-21 6-40 15-58 23m154 182v4c-29-1-57-6-81-13-7-25-12-52-13-81h94zm0-109h-94c1-29 6-56 13-81 24-7 52-12 81-13zm0-112c-22 1-44 4-65 8l-10 2 12-30 9-17 1-2a332 332 0 0 1 13-23c13-4 26-6 40-7zm187 69 6 4c4 12 6 25 6 38v1h-68c-1-26-4-51-10-74l48 20 1 1 14 8zm-14-44 10 20c-20-11-43-21-68-29-8-25-18-49-29-69 37 16 67 44 87 78M279 49h1c13 1 27 3 39 7l14 23 1 2a343 343 0 0 1 12 26l2 5 6 16c-23-6-48-9-74-10h-1zm0 87h1c29 1 56 6 81 13 7 24 12 51 12 80v1h-94zm2 207h-2v-94h95c-1 29-6 56-13 81-24 7-51 12-80 13m86 60-20 10c11-20 21-43 29-68 25-8 48-18 68-29-16 37-43 67-77 87m87-115-7 5-16 9-2 1a337 337 0 0 1-47 21c6-24 9-49 10-75h68c0 13-2 27-6 39"/>
2276
- <path d="m261 428-2-2-22-21a40 40 0 0 0-32-11h-1a37 37 0 0 0-18 8l-1 1-4 2-2 2-5 4c-9-3-36-31-47-44s-32-45-34-55l3-2a151 151 0 0 0 11-9v-1a39 39 0 0 0 5-48l-3-3-11-19-3-4-5-7h-1l-3-3-4-3-5-2a35 35 0 0 0-16-3h-5c-4 1-14 5-24 11l-4 2-4 3-4 2c-9 8-17 17-18 27a380 380 0 0 0 212 259h3c12 0 25-10 36-21l10-12 6-11a39 39 0 0 0-8-40"/>
2277
- </svg>`;
2286
+ var buildCheckIcon = () => buildSvg(
2287
+ ["svg", { class: "iti__country-check-svg", width: 14, height: 14, viewBox: "0 0 16 16", fill: "currentColor", focusable: "false", [ARIA.HIDDEN]: "true" }, [
2288
+ ["path", { d: "M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0m-3.97-3.03a.75.75 0 0 0-1.08.022L7.477 9.417 5.384 7.323a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-.01-1.05z" }]
2289
+ ]]
2290
+ );
2291
+ var buildGlobeIcon = () => buildSvg(
2292
+ ["svg", { width: 256, height: 256, viewBox: "0 0 512 512", class: "iti__globe-svg" }, [
2293
+ ["path", { d: "M508 213a240 240 0 0 0-449-87l-2 5-2 5c-8 14-13 30-17 46a65 65 0 0 1 56 4c16-10 35-19 56-27l9-3c-6 23-10 48-10 74h-16l4 6c3 4 5 8 6 13h6c0 22 3 44 8 65l2 10-25-10-4 5 12 18 9 3 6 2 8 3 9 26 1 2 16-7h1l-5-13-1-2c24 6 49 9 75 10v26l11 10 7 7v-30l1-13c22 0 44-3 65-8l10-2-21 48-1 1a317 317 0 0 1-14 23l-21 5h-2c6 16 7 33 1 50a240 240 0 0 0 211-265m-401-56-11 6c19-44 54-79 98-98-11 20-21 44-29 69-21 6-40 15-58 23m154 182v4c-29-1-57-6-81-13-7-25-12-52-13-81h94zm0-109h-94c1-29 6-56 13-81 24-7 52-12 81-13zm0-112c-22 1-44 4-65 8l-10 2 12-30 9-17 1-2a332 332 0 0 1 13-23c13-4 26-6 40-7zm187 69 6 4c4 12 6 25 6 38v1h-68c-1-26-4-51-10-74l48 20 1 1 14 8zm-14-44 10 20c-20-11-43-21-68-29-8-25-18-49-29-69 37 16 67 44 87 78M279 49h1c13 1 27 3 39 7l14 23 1 2a343 343 0 0 1 12 26l2 5 6 16c-23-6-48-9-74-10h-1zm0 87h1c29 1 56 6 81 13 7 24 12 51 12 80v1h-94zm2 207h-2v-94h95c-1 29-6 56-13 81-24 7-51 12-80 13m86 60-20 10c11-20 21-43 29-68 25-8 48-18 68-29-16 37-43 67-77 87m87-115-7 5-16 9-2 1a337 337 0 0 1-47 21c6-24 9-49 10-75h68c0 13-2 27-6 39" }],
2294
+ ["path", { d: "m261 428-2-2-22-21a40 40 0 0 0-32-11h-1a37 37 0 0 0-18 8l-1 1-4 2-2 2-5 4c-9-3-36-31-47-44s-32-45-34-55l3-2a151 151 0 0 0 11-9v-1a39 39 0 0 0 5-48l-3-3-11-19-3-4-5-7h-1l-3-3-4-3-5-2a35 35 0 0 0-16-3h-5c-4 1-14 5-24 11l-4 2-4 3-4 2c-9 8-17 17-18 27a380 380 0 0 0 212 259h3c12 0 25-10 36-21l10-12 6-11a39 39 0 0 0-8-40" }]
2295
+ ]]
2296
+ );
2278
2297
 
2279
2298
  // packages/core/src/js/core/countrySearch.ts
2280
2299
  var buildSearchTokens = (countries) => {
@@ -2627,7 +2646,7 @@ var UI = class _UI {
2627
2646
  },
2628
2647
  searchWrapper
2629
2648
  );
2630
- this.#searchIconEl.innerHTML = buildSearchIcon();
2649
+ this.#searchIconEl.appendChild(buildSearchIcon());
2631
2650
  this.#searchInputEl = createEl(
2632
2651
  "input",
2633
2652
  {
@@ -2656,7 +2675,7 @@ var UI = class _UI {
2656
2675
  },
2657
2676
  searchWrapper
2658
2677
  );
2659
- this.#searchClearButtonEl.innerHTML = buildClearIcon(this.#id);
2678
+ this.#searchClearButtonEl.appendChild(buildClearIcon(this.#id));
2660
2679
  this.#searchResultsLiveRegionEl = createEl(
2661
2680
  "span",
2662
2681
  { class: "iti__a11y-text" },
@@ -3156,7 +3175,7 @@ var UI = class _UI {
3156
3175
  { class: "iti__country-check", [ARIA.HIDDEN]: "true" },
3157
3176
  newListItem
3158
3177
  );
3159
- checkIcon.innerHTML = buildCheckIcon();
3178
+ checkIcon.appendChild(buildCheckIcon());
3160
3179
  this.#selectedListItemEl = newListItem;
3161
3180
  if (this.#options.dropdownAlwaysOpen) {
3162
3181
  this.#highlightListItem(newListItem);
@@ -3301,20 +3320,27 @@ var UI = class _UI {
3301
3320
  }
3302
3321
  if (this.#selectedCountryEl) {
3303
3322
  const flagClass = iso2 && showFlags ? `${CLASSES.FLAG} iti__${iso2}` : `${CLASSES.FLAG} ${CLASSES.GLOBE}`;
3304
- let ariaLabel, title, flagInnerHtml;
3323
+ let ariaLabel, title;
3324
+ let flagContent = null;
3305
3325
  if (iso2) {
3306
3326
  title = name;
3307
3327
  ariaLabel = i18n.selectedCountryAriaLabel.replace("${countryName}", name).replace("${dialCode}", `+${dialCode}`);
3308
- flagInnerHtml = showFlags ? "" : buildGlobeIcon();
3328
+ if (!showFlags) {
3329
+ flagContent = buildGlobeIcon();
3330
+ }
3309
3331
  } else {
3310
3332
  title = i18n.noCountrySelected;
3311
3333
  ariaLabel = i18n.noCountrySelected;
3312
- flagInnerHtml = buildGlobeIcon();
3334
+ flagContent = buildGlobeIcon();
3313
3335
  }
3314
3336
  this.#selectedFlagEl.className = flagClass;
3315
3337
  this.#selectedCountryEl.setAttribute("title", title);
3316
3338
  this.#selectedCountryEl.setAttribute(ARIA.LABEL, ariaLabel);
3317
- this.#selectedFlagEl.innerHTML = flagInnerHtml;
3339
+ if (flagContent) {
3340
+ this.#selectedFlagEl.replaceChildren(flagContent);
3341
+ } else {
3342
+ this.#selectedFlagEl.replaceChildren();
3343
+ }
3318
3344
  }
3319
3345
  if (separateDialCode) {
3320
3346
  const fullDialCode = dialCode ? `+${dialCode}` : "";
@@ -4633,7 +4659,7 @@ var intlTelInput = Object.assign(
4633
4659
  attachUtils,
4634
4660
  startedLoadingUtils: false,
4635
4661
  startedLoadingAutoCountry: false,
4636
- version: "28.0.2",
4662
+ version: "28.0.4",
4637
4663
  NUMBER_FORMAT,
4638
4664
  NUMBER_TYPE,
4639
4665
  VALIDATION_ERROR
@@ -1,5 +1,5 @@
1
1
  /*
2
- * International Telephone Input v28.0.2
2
+ * International Telephone Input v28.0.4
3
3
  * git+https://github.com/jackocnr/intl-tel-input.git
4
4
  * Licensed under the MIT license
5
5
  */
@@ -1996,7 +1996,7 @@ var _factory = (() => {
1996
1996
  //* A function to load the utils script.
1997
1997
  loadUtils: null,
1998
1998
  //* National vs international formatting for numbers e.g. placeholders and displaying existing numbers.
1999
- nationalMode: true,
1999
+ nationalMode: false,
2000
2000
  //* Display only these countries.
2001
2001
  onlyCountries: null,
2002
2002
  //* Number type to use for placeholders.
@@ -2281,31 +2281,50 @@ var _factory = (() => {
2281
2281
  };
2282
2282
 
2283
2283
  // packages/core/src/js/core/icons.ts
2284
- var buildSearchIcon = () => `
2285
- <svg class="iti__search-icon-svg" width="14" height="14" viewBox="0 0 24 24" focusable="false" ${ARIA.HIDDEN}="true">
2286
- <circle cx="11" cy="11" r="7" />
2287
- <line x1="21" y1="21" x2="16.65" y2="16.65" />
2288
- </svg>`;
2284
+ var SVG_NS = "http://www.w3.org/2000/svg";
2285
+ var buildSvg = ([tag, attrs, children]) => {
2286
+ const el = document.createElementNS(SVG_NS, tag);
2287
+ if (attrs) {
2288
+ for (const k in attrs) {
2289
+ el.setAttribute(k, String(attrs[k]));
2290
+ }
2291
+ }
2292
+ if (children) {
2293
+ for (const c of children) {
2294
+ el.appendChild(buildSvg(c));
2295
+ }
2296
+ }
2297
+ return el;
2298
+ };
2299
+ var buildSearchIcon = () => buildSvg(
2300
+ ["svg", { class: "iti__search-icon-svg", width: 14, height: 14, viewBox: "0 0 24 24", focusable: "false", [ARIA.HIDDEN]: "true" }, [
2301
+ ["circle", { cx: 11, cy: 11, r: 7 }],
2302
+ ["line", { x1: 21, y1: 21, x2: 16.65, y2: 16.65 }]
2303
+ ]]
2304
+ );
2289
2305
  var buildClearIcon = (id) => {
2290
2306
  const maskId = `iti-${id}-clear-mask`;
2291
- return `
2292
- <svg class="iti__search-clear-svg" width="12" height="12" viewBox="0 0 16 16" ${ARIA.HIDDEN}="true" focusable="false">
2293
- <mask id="${maskId}" maskUnits="userSpaceOnUse">
2294
- <rect width="16" height="16" fill="white" />
2295
- <path d="M5.2 5.2 L10.8 10.8 M10.8 5.2 L5.2 10.8" stroke="black" stroke-linecap="round" class="iti__search-clear-x" />
2296
- </mask>
2297
- <circle cx="8" cy="8" r="8" class="iti__search-clear-bg" mask="url(#${maskId})" />
2298
- </svg>`;
2307
+ return buildSvg(
2308
+ ["svg", { class: "iti__search-clear-svg", width: 12, height: 12, viewBox: "0 0 16 16", [ARIA.HIDDEN]: "true", focusable: "false" }, [
2309
+ ["mask", { id: maskId, maskUnits: "userSpaceOnUse" }, [
2310
+ ["rect", { width: 16, height: 16, fill: "white" }],
2311
+ ["path", { d: "M5.2 5.2 L10.8 10.8 M10.8 5.2 L5.2 10.8", stroke: "black", "stroke-linecap": "round", class: "iti__search-clear-x" }]
2312
+ ]],
2313
+ ["circle", { cx: 8, cy: 8, r: 8, class: "iti__search-clear-bg", mask: `url(#${maskId})` }]
2314
+ ]]
2315
+ );
2299
2316
  };
2300
- var buildCheckIcon = () => `
2301
- <svg class="iti__country-check-svg" width="14" height="14" viewBox="0 0 16 16" fill="currentColor" focusable="false" ${ARIA.HIDDEN}="true">
2302
- <path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0m-3.97-3.03a.75.75 0 0 0-1.08.022L7.477 9.417 5.384 7.323a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-.01-1.05z"/>
2303
- </svg>`;
2304
- var buildGlobeIcon = () => `
2305
- <svg width="256" height="256" viewBox="0 0 512 512" class="iti__globe-svg">
2306
- <path d="M508 213a240 240 0 0 0-449-87l-2 5-2 5c-8 14-13 30-17 46a65 65 0 0 1 56 4c16-10 35-19 56-27l9-3c-6 23-10 48-10 74h-16l4 6c3 4 5 8 6 13h6c0 22 3 44 8 65l2 10-25-10-4 5 12 18 9 3 6 2 8 3 9 26 1 2 16-7h1l-5-13-1-2c24 6 49 9 75 10v26l11 10 7 7v-30l1-13c22 0 44-3 65-8l10-2-21 48-1 1a317 317 0 0 1-14 23l-21 5h-2c6 16 7 33 1 50a240 240 0 0 0 211-265m-401-56-11 6c19-44 54-79 98-98-11 20-21 44-29 69-21 6-40 15-58 23m154 182v4c-29-1-57-6-81-13-7-25-12-52-13-81h94zm0-109h-94c1-29 6-56 13-81 24-7 52-12 81-13zm0-112c-22 1-44 4-65 8l-10 2 12-30 9-17 1-2a332 332 0 0 1 13-23c13-4 26-6 40-7zm187 69 6 4c4 12 6 25 6 38v1h-68c-1-26-4-51-10-74l48 20 1 1 14 8zm-14-44 10 20c-20-11-43-21-68-29-8-25-18-49-29-69 37 16 67 44 87 78M279 49h1c13 1 27 3 39 7l14 23 1 2a343 343 0 0 1 12 26l2 5 6 16c-23-6-48-9-74-10h-1zm0 87h1c29 1 56 6 81 13 7 24 12 51 12 80v1h-94zm2 207h-2v-94h95c-1 29-6 56-13 81-24 7-51 12-80 13m86 60-20 10c11-20 21-43 29-68 25-8 48-18 68-29-16 37-43 67-77 87m87-115-7 5-16 9-2 1a337 337 0 0 1-47 21c6-24 9-49 10-75h68c0 13-2 27-6 39"/>
2307
- <path d="m261 428-2-2-22-21a40 40 0 0 0-32-11h-1a37 37 0 0 0-18 8l-1 1-4 2-2 2-5 4c-9-3-36-31-47-44s-32-45-34-55l3-2a151 151 0 0 0 11-9v-1a39 39 0 0 0 5-48l-3-3-11-19-3-4-5-7h-1l-3-3-4-3-5-2a35 35 0 0 0-16-3h-5c-4 1-14 5-24 11l-4 2-4 3-4 2c-9 8-17 17-18 27a380 380 0 0 0 212 259h3c12 0 25-10 36-21l10-12 6-11a39 39 0 0 0-8-40"/>
2308
- </svg>`;
2317
+ var buildCheckIcon = () => buildSvg(
2318
+ ["svg", { class: "iti__country-check-svg", width: 14, height: 14, viewBox: "0 0 16 16", fill: "currentColor", focusable: "false", [ARIA.HIDDEN]: "true" }, [
2319
+ ["path", { d: "M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0m-3.97-3.03a.75.75 0 0 0-1.08.022L7.477 9.417 5.384 7.323a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-.01-1.05z" }]
2320
+ ]]
2321
+ );
2322
+ var buildGlobeIcon = () => buildSvg(
2323
+ ["svg", { width: 256, height: 256, viewBox: "0 0 512 512", class: "iti__globe-svg" }, [
2324
+ ["path", { d: "M508 213a240 240 0 0 0-449-87l-2 5-2 5c-8 14-13 30-17 46a65 65 0 0 1 56 4c16-10 35-19 56-27l9-3c-6 23-10 48-10 74h-16l4 6c3 4 5 8 6 13h6c0 22 3 44 8 65l2 10-25-10-4 5 12 18 9 3 6 2 8 3 9 26 1 2 16-7h1l-5-13-1-2c24 6 49 9 75 10v26l11 10 7 7v-30l1-13c22 0 44-3 65-8l10-2-21 48-1 1a317 317 0 0 1-14 23l-21 5h-2c6 16 7 33 1 50a240 240 0 0 0 211-265m-401-56-11 6c19-44 54-79 98-98-11 20-21 44-29 69-21 6-40 15-58 23m154 182v4c-29-1-57-6-81-13-7-25-12-52-13-81h94zm0-109h-94c1-29 6-56 13-81 24-7 52-12 81-13zm0-112c-22 1-44 4-65 8l-10 2 12-30 9-17 1-2a332 332 0 0 1 13-23c13-4 26-6 40-7zm187 69 6 4c4 12 6 25 6 38v1h-68c-1-26-4-51-10-74l48 20 1 1 14 8zm-14-44 10 20c-20-11-43-21-68-29-8-25-18-49-29-69 37 16 67 44 87 78M279 49h1c13 1 27 3 39 7l14 23 1 2a343 343 0 0 1 12 26l2 5 6 16c-23-6-48-9-74-10h-1zm0 87h1c29 1 56 6 81 13 7 24 12 51 12 80v1h-94zm2 207h-2v-94h95c-1 29-6 56-13 81-24 7-51 12-80 13m86 60-20 10c11-20 21-43 29-68 25-8 48-18 68-29-16 37-43 67-77 87m87-115-7 5-16 9-2 1a337 337 0 0 1-47 21c6-24 9-49 10-75h68c0 13-2 27-6 39" }],
2325
+ ["path", { d: "m261 428-2-2-22-21a40 40 0 0 0-32-11h-1a37 37 0 0 0-18 8l-1 1-4 2-2 2-5 4c-9-3-36-31-47-44s-32-45-34-55l3-2a151 151 0 0 0 11-9v-1a39 39 0 0 0 5-48l-3-3-11-19-3-4-5-7h-1l-3-3-4-3-5-2a35 35 0 0 0-16-3h-5c-4 1-14 5-24 11l-4 2-4 3-4 2c-9 8-17 17-18 27a380 380 0 0 0 212 259h3c12 0 25-10 36-21l10-12 6-11a39 39 0 0 0-8-40" }]
2326
+ ]]
2327
+ );
2309
2328
 
2310
2329
  // packages/core/src/js/core/countrySearch.ts
2311
2330
  var buildSearchTokens = (countries) => {
@@ -2658,7 +2677,7 @@ var _factory = (() => {
2658
2677
  },
2659
2678
  searchWrapper
2660
2679
  );
2661
- this.#searchIconEl.innerHTML = buildSearchIcon();
2680
+ this.#searchIconEl.appendChild(buildSearchIcon());
2662
2681
  this.#searchInputEl = createEl(
2663
2682
  "input",
2664
2683
  {
@@ -2687,7 +2706,7 @@ var _factory = (() => {
2687
2706
  },
2688
2707
  searchWrapper
2689
2708
  );
2690
- this.#searchClearButtonEl.innerHTML = buildClearIcon(this.#id);
2709
+ this.#searchClearButtonEl.appendChild(buildClearIcon(this.#id));
2691
2710
  this.#searchResultsLiveRegionEl = createEl(
2692
2711
  "span",
2693
2712
  { class: "iti__a11y-text" },
@@ -3187,7 +3206,7 @@ var _factory = (() => {
3187
3206
  { class: "iti__country-check", [ARIA.HIDDEN]: "true" },
3188
3207
  newListItem
3189
3208
  );
3190
- checkIcon.innerHTML = buildCheckIcon();
3209
+ checkIcon.appendChild(buildCheckIcon());
3191
3210
  this.#selectedListItemEl = newListItem;
3192
3211
  if (this.#options.dropdownAlwaysOpen) {
3193
3212
  this.#highlightListItem(newListItem);
@@ -3332,20 +3351,27 @@ var _factory = (() => {
3332
3351
  }
3333
3352
  if (this.#selectedCountryEl) {
3334
3353
  const flagClass = iso2 && showFlags ? `${CLASSES.FLAG} iti__${iso2}` : `${CLASSES.FLAG} ${CLASSES.GLOBE}`;
3335
- let ariaLabel, title, flagInnerHtml;
3354
+ let ariaLabel, title;
3355
+ let flagContent = null;
3336
3356
  if (iso2) {
3337
3357
  title = name;
3338
3358
  ariaLabel = i18n.selectedCountryAriaLabel.replace("${countryName}", name).replace("${dialCode}", `+${dialCode}`);
3339
- flagInnerHtml = showFlags ? "" : buildGlobeIcon();
3359
+ if (!showFlags) {
3360
+ flagContent = buildGlobeIcon();
3361
+ }
3340
3362
  } else {
3341
3363
  title = i18n.noCountrySelected;
3342
3364
  ariaLabel = i18n.noCountrySelected;
3343
- flagInnerHtml = buildGlobeIcon();
3365
+ flagContent = buildGlobeIcon();
3344
3366
  }
3345
3367
  this.#selectedFlagEl.className = flagClass;
3346
3368
  this.#selectedCountryEl.setAttribute("title", title);
3347
3369
  this.#selectedCountryEl.setAttribute(ARIA.LABEL, ariaLabel);
3348
- this.#selectedFlagEl.innerHTML = flagInnerHtml;
3370
+ if (flagContent) {
3371
+ this.#selectedFlagEl.replaceChildren(flagContent);
3372
+ } else {
3373
+ this.#selectedFlagEl.replaceChildren();
3374
+ }
3349
3375
  }
3350
3376
  if (separateDialCode) {
3351
3377
  const fullDialCode = dialCode ? `+${dialCode}` : "";
@@ -4664,7 +4690,7 @@ var _factory = (() => {
4664
4690
  attachUtils,
4665
4691
  startedLoadingUtils: false,
4666
4692
  startedLoadingAutoCountry: false,
4667
- version: "28.0.2",
4693
+ version: "28.0.4",
4668
4694
  NUMBER_FORMAT,
4669
4695
  NUMBER_TYPE,
4670
4696
  VALIDATION_ERROR