intl-tel-input 24.3.7 → 24.4.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "intl-tel-input",
3
- "version": "24.3.7",
3
+ "version": "24.4.0",
4
4
  "description": "A JavaScript plugin for entering and validating international telephone numbers",
5
5
  "keywords": [
6
6
  "international",
package/react/README.md CHANGED
@@ -28,7 +28,7 @@ import "intl-tel-input/styles";
28
28
 
29
29
  See the [Validation demo](https://github.com/jackocnr/intl-tel-input/blob/master/react/demo/validation/ValidationApp.tsx) for a more fleshed-out example of how to handle validation.
30
30
 
31
- 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"`, 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@24.3.7/build/js/utils.js"`.
31
+ 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"`, 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@24.4.0/build/js/utils.js"`.
32
32
 
33
33
  ## Props
34
34
  Here's a list of all of the current props you can pass to the IntlTelInput React component.
@@ -3102,7 +3102,7 @@ var intlTelInput = Object.assign(
3102
3102
  //* A map from instance ID to instance object.
3103
3103
  instances: {},
3104
3104
  loadUtils,
3105
- version: "24.3.7"
3105
+ version: "24.4.0"
3106
3106
  }
3107
3107
  );
3108
3108
  var intl_tel_input_default = intlTelInput;
@@ -3066,7 +3066,7 @@ var intlTelInput = Object.assign(
3066
3066
  //* A map from instance ID to instance object.
3067
3067
  instances: {},
3068
3068
  loadUtils,
3069
- version: "24.3.7"
3069
+ version: "24.4.0"
3070
3070
  }
3071
3071
  );
3072
3072
  var intl_tel_input_default = intlTelInput;
@@ -3102,7 +3102,7 @@ var intlTelInput = Object.assign(
3102
3102
  //* A map from instance ID to instance object.
3103
3103
  instances: {},
3104
3104
  loadUtils,
3105
- version: "24.3.7"
3105
+ version: "24.4.0"
3106
3106
  }
3107
3107
  );
3108
3108
  var intl_tel_input_default = intlTelInput;
@@ -3066,7 +3066,7 @@ var intlTelInput = Object.assign(
3066
3066
  //* A map from instance ID to instance object.
3067
3067
  instances: {},
3068
3068
  loadUtils,
3069
- version: "24.3.7"
3069
+ version: "24.4.0"
3070
3070
  }
3071
3071
  );
3072
3072
  var intl_tel_input_default = intlTelInput;
package/vue/README.md CHANGED
@@ -5,9 +5,12 @@ A Vue component wrapper for the [intl-tel-input](https://github.com/jackocnr/int
5
5
  - [Demo](#demo)
6
6
  - [Getting Started](#getting-started)
7
7
  - [Props](#props)
8
+ - [Events](#events)
9
+ - [Accessing Instance Methods](#accessing-instance-methods)
10
+ - [Accessing Static Methods](#accessing-static-methods)
8
11
 
9
12
  ## Demo
10
- Try it for yourself by downloading the project and running `npm install` and then `npm run vue:demo` and then copy the given URL into your browser. NOTE: the component is rendering the plugin correctly, but we still need help hooking up the [validation functionality](https://github.com/jackocnr/intl-tel-input/blob/master/vue/demo/validation/App.vue)!
13
+ Try it for yourself by downloading the project and running `npm install` and then `npm run vue:demo` and then copy the given URL into your browser.
11
14
 
12
15
  ## Getting Started
13
16
  ```vue
@@ -25,15 +28,56 @@ Try it for yourself by downloading the project and running `npm install` and the
25
28
  </template>
26
29
  ```
27
30
 
28
- See the [Validation demo](https://github.com/jackocnr/intl-tel-input/blob/master/vue/demo/validation/App.vue) for a more fleshed-out example of how to handle validation [COMING SOON].
31
+ See the [Validation demo](https://github.com/jackocnr/intl-tel-input/blob/master/vue/demo/validation/App.vue) for a more fleshed-out example of how to handle validation. Make sure to change the path in the `package.json` script to the correct demo if you're running it locally e.g.:
29
32
 
30
- 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/vueWithUtils"`, to include the utils script. Alternatively, if you use the main `"intl-tel-input/vue"` 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@24.3.7/build/js/utils.js"`.
33
+ ```
34
+ "vue:demo": "vite --config vue/demo/[demo variant]/vite.config.js"
35
+ ```
36
+
37
+ 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/vueWithUtils"`, to include the utils script. Alternatively, if you use the main `"intl-tel-input/vue"` 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@24.4.0/build/js/utils.js"`.
31
38
 
32
39
  ## Props
33
40
  Here's a list of all of the current props you can pass to the IntlTelInput Vue component.
34
41
 
35
- **options**
36
- Type: `Object`
42
+ **disabled**
43
+ Type: `Boolean`, Default: `false`
44
+ Sets the disabled attribute of both the telephone input and selected country button. *Note: we recommend using this instead of `inputProps.disabled`.*
45
+
46
+ **inputProps**
47
+ Type: `Object`
48
+ The props to pass to the input element e.g. `id`, `class`, `placeholder`, `required`, `onBlur` etc. *Note: we recommend using the separate `disabled` prop instead of `inputProps.disabled`.*
49
+
50
+ **options**
51
+ Type: `Object`
37
52
  An object containing the [initialisation options](https://github.com/jackocnr/intl-tel-input?tab=readme-ov-file#initialisation-options) to pass to the plugin. You can use these exactly the same way as with the main JavaScript plugin.
38
53
 
39
- [MORE COMING SOON]
54
+ **value**
55
+ Type: `String`
56
+ The initial value to put in the input. This will get auto-formatted on init (according to `formatOnDisplay` initialisation option). IntlTelInput is an uncontrolled input, and so will ignore any changes to this value.
57
+
58
+ ## Events
59
+ Here's a list of all of the current events you can listen to on the IntlTelInput Vue component.
60
+
61
+ **changeCountry**
62
+ Type: `Function`
63
+ A handler to be called when the selected country changes. It will be passed the new country iso2 code e.g. "gb" for UK.
64
+
65
+ **changeErrorCode**
66
+ Type: `Function`
67
+ A handler to be called when the number validation error changes. It will be passed the new error code (or `null`).
68
+
69
+ **changeNumber**
70
+ Type: `Function`
71
+ A handler to be called when the number changes. It will be passed the new number.
72
+
73
+ **changeValidity**
74
+ Type: `Function`
75
+ A handler to be called when the number validity changes e.g. to true/false. It will be passed the new isValid boolean.
76
+
77
+ ## Accessing Instance Methods
78
+
79
+ You can access all of the plugin's [instance methods](https://github.com/jackocnr/intl-tel-input/blob/master/README.md#instance-methods) (`setNumber`, `setCountry`, `setPlaceholderNumberType` etc) by passing a ref into the IntlTelInput component (using the `ref` prop), and then calling `ref.intlTelInput.instance` e.g. `ref.intlTelInput.instance.setNumber(...);`. See the [Set Number demo](https://github.com/jackocnr/intl-tel-input/blob/master/vue/demo/set-number/App.vue) for a full example. You can also access the input DOM element in a similar way: `ref.intlTelInput.input`.
80
+
81
+ ## Accessing Static Methods
82
+
83
+ You can access all of the plugin's [static methods](https://github.com/jackocnr/intl-tel-input/blob/master/README.md#static-methods) by importing `intlTelInput` from the same file as the Vue component e.g. `import { intlTelInput } from "intl-tel-input/vue"` (note the lower case "i" in "intlTelInput"). You can then use this as you would with the main plugin e.g. `intlTelInput.getCountryData()` or `intlTelInput.utils.numberType` etc.
@@ -1,4 +1,4 @@
1
- import { mergeModels as L, useModel as P, ref as v, onMounted as x, watch as E, onUnmounted as M, withDirectives as B, openBlock as O, createElementBlock as V, vModelText as F } from "vue";
1
+ import { mergeModels as L, useModel as P, ref as v, onMounted as x, watch as E, onUnmounted as M, withDirectives as B, openBlock as O, createElementBlock as V, mergeProps as F, vModelText as z } from "vue";
2
2
  const D = [
3
3
  [
4
4
  "af",
@@ -1318,7 +1318,7 @@ for (let u = 0; u < D.length; u++) {
1318
1318
  nodeById: {}
1319
1319
  };
1320
1320
  }
1321
- const z = {
1321
+ const R = {
1322
1322
  ad: "Andorra",
1323
1323
  ae: "United Arab Emirates",
1324
1324
  af: "Afghanistan",
@@ -1561,7 +1561,7 @@ const z = {
1561
1561
  za: "South Africa",
1562
1562
  zm: "Zambia",
1563
1563
  zw: "Zimbabwe"
1564
- }, R = {
1564
+ }, $ = {
1565
1565
  selectedCountryAriaLabel: "Selected country",
1566
1566
  noCountrySelected: "No country selected",
1567
1567
  countryListAriaLabel: "List of countries",
@@ -1572,10 +1572,10 @@ const z = {
1572
1572
  // additional countries (not supported by country-list library)
1573
1573
  ac: "Ascension Island",
1574
1574
  xk: "Kosovo"
1575
- }, S = { ...z, ...R };
1575
+ }, S = { ...R, ...$ };
1576
1576
  for (let u = 0; u < b.length; u++)
1577
1577
  b[u].name = S[b[u].iso2];
1578
- let $ = 0;
1578
+ let j = 0;
1579
1579
  const k = {
1580
1580
  //* Whether or not to allow the dropdown.
1581
1581
  allowDropdown: !0,
@@ -1631,7 +1631,7 @@ const k = {
1631
1631
  utilsScript: "",
1632
1632
  //* The number type to enforce during validation.
1633
1633
  validationNumberType: "MOBILE"
1634
- }, j = [
1634
+ }, K = [
1635
1635
  "800",
1636
1636
  "822",
1637
1637
  "833",
@@ -1653,10 +1653,10 @@ const k = {
1653
1653
  const t = I(u);
1654
1654
  if (t.charAt(0) === "1") {
1655
1655
  const e = t.substr(1, 3);
1656
- return j.indexOf(e) !== -1;
1656
+ return K.indexOf(e) !== -1;
1657
1657
  }
1658
1658
  return !1;
1659
- }, K = (u, t, e, i) => {
1659
+ }, U = (u, t, e, i) => {
1660
1660
  if (e === 0 && !i)
1661
1661
  return 0;
1662
1662
  let s = 0;
@@ -1674,9 +1674,9 @@ const k = {
1674
1674
  const { instances: t } = l;
1675
1675
  Object.values(t).forEach((e) => e[u]());
1676
1676
  };
1677
- class U {
1677
+ class H {
1678
1678
  constructor(t, e = {}) {
1679
- this.id = $++, this.telInput = t, this.highlightedItem = null, this.options = Object.assign({}, k, e), this.hadInitialPlaceholder = !!t.getAttribute("placeholder");
1679
+ this.id = j++, this.telInput = t, this.highlightedItem = null, this.options = Object.assign({}, k, e), this.hadInitialPlaceholder = !!t.getAttribute("placeholder");
1680
1680
  }
1681
1681
  //* Can't be private as it's called from intlTelInput convenience wrapper.
1682
1682
  _init() {
@@ -1971,7 +1971,7 @@ class U {
1971
1971
  p || d && !t ? a = !0 : /[^+0-9]/.test(this.telInput.value) || (a = !1);
1972
1972
  const C = (r == null ? void 0 : r.detail) && r.detail.isSetNumber && !s;
1973
1973
  if (e && !a && !C) {
1974
- const c = this.telInput.selectionStart || 0, m = this.telInput.value.substring(0, c).replace(/[^+0-9]/g, "").length, f = (r == null ? void 0 : r.inputType) === "deleteContentForward", g = this._formatNumberAsYouType(), w = K(m, g, c, f);
1974
+ const c = this.telInput.selectionStart || 0, m = this.telInput.value.substring(0, c).replace(/[^+0-9]/g, "").length, f = (r == null ? void 0 : r.inputType) === "deleteContentForward", g = this._formatNumberAsYouType(), w = U(m, g, c, f);
1975
1975
  this.telInput.value = g, this.telInput.setSelectionRange(w, w);
1976
1976
  }
1977
1977
  }, this.telInput.addEventListener("input", this._handleInputEvent), (t || i) && (this._handleKeydownEvent = (r) => {
@@ -2439,7 +2439,7 @@ class U {
2439
2439
  this.telInput.disabled = t, t ? this.selectedCountry.setAttribute("disabled", "true") : this.selectedCountry.removeAttribute("disabled");
2440
2440
  }
2441
2441
  }
2442
- const H = (u) => !l.utils && !l.startedLoadingUtilsScript ? (l.startedLoadingUtilsScript = !0, new Promise((t, e) => {
2442
+ const G = (u) => !l.utils && !l.startedLoadingUtilsScript ? (l.startedLoadingUtilsScript = !0, new Promise((t, e) => {
2443
2443
  import(
2444
2444
  /* webpackIgnore: true */
2445
2445
  /* @vite-ignore */
@@ -2451,7 +2451,7 @@ const H = (u) => !l.utils && !l.startedLoadingUtilsScript ? (l.startedLoadingUti
2451
2451
  });
2452
2452
  })) : null, l = Object.assign(
2453
2453
  (u, t) => {
2454
- const e = new U(u, t);
2454
+ const e = new H(u, t);
2455
2455
  return e._init(), u.setAttribute("data-intl-tel-input-id", e.id.toString()), l.instances[e.id] = e, e;
2456
2456
  },
2457
2457
  {
@@ -2467,12 +2467,20 @@ const H = (u) => !l.utils && !l.startedLoadingUtilsScript ? (l.startedLoadingUti
2467
2467
  },
2468
2468
  //* A map from instance ID to instance object.
2469
2469
  instances: {},
2470
- loadUtils: H,
2471
- version: "24.3.7"
2470
+ loadUtils: G,
2471
+ version: "24.4.0"
2472
2472
  }
2473
- ), W = {
2473
+ ), q = {
2474
2474
  __name: "IntlTelInput",
2475
2475
  props: /* @__PURE__ */ L({
2476
+ disabled: {
2477
+ type: Boolean,
2478
+ default: !1
2479
+ },
2480
+ inputProps: {
2481
+ type: Object,
2482
+ default: () => ({})
2483
+ },
2476
2484
  options: {
2477
2485
  type: Object,
2478
2486
  default: () => ({})
@@ -2480,9 +2488,6 @@ const H = (u) => !l.utils && !l.startedLoadingUtilsScript ? (l.startedLoadingUti
2480
2488
  value: {
2481
2489
  type: String,
2482
2490
  default: ""
2483
- },
2484
- disabled: {
2485
- type: Boolean
2486
2491
  }
2487
2492
  }, {
2488
2493
  modelValue: {
@@ -2491,11 +2496,19 @@ const H = (u) => !l.utils && !l.startedLoadingUtilsScript ? (l.startedLoadingUti
2491
2496
  },
2492
2497
  modelModifiers: {}
2493
2498
  }),
2494
- emits: /* @__PURE__ */ L(["changeNumber", "changeCountry", "changeValidity", "changeErrorCode"], ["update:modelValue"]),
2499
+ emits: /* @__PURE__ */ L([
2500
+ "changeNumber",
2501
+ "changeCountry",
2502
+ "changeValidity",
2503
+ "changeErrorCode"
2504
+ ], ["update:modelValue"]),
2495
2505
  setup(u, { expose: t, emit: e }) {
2496
2506
  const i = P(u, "modelValue"), s = u, n = e, o = v(), a = v(), r = v(!1), p = () => a.value ? s.options.strictMode ? a.value.isValidNumberPrecise() : a.value.isValidNumber() : null, d = () => {
2497
2507
  let h = p();
2498
- r.value !== h && (r.value = h, n("changeValidity", !!h), n("changeErrorCode", h ? null : a.value.getValidationError()));
2508
+ r.value !== h && (r.value = h, n("changeValidity", !!h), n(
2509
+ "changeErrorCode",
2510
+ h ? null : a.value.getValidationError()
2511
+ ));
2499
2512
  }, C = () => {
2500
2513
  var h;
2501
2514
  n("changeNumber", ((h = a.value) == null ? void 0 : h.getNumber()) ?? ""), d();
@@ -2514,18 +2527,18 @@ const H = (u) => !l.utils && !l.startedLoadingUtilsScript ? (l.startedLoadingUti
2514
2527
  ), M(() => {
2515
2528
  var h;
2516
2529
  return (h = a.value) == null ? void 0 : h.destroy();
2517
- }), t({ instance: a, input: o }), (h, m) => B((O(), V("input", {
2530
+ }), t({ instance: a, input: o }), (h, m) => B((O(), V("input", F({
2518
2531
  ref_key: "input",
2519
2532
  ref: o,
2520
2533
  "onUpdate:modelValue": m[0] || (m[0] = (f) => i.value = f),
2521
2534
  type: "tel",
2522
2535
  onCountrychange: c,
2523
2536
  onInput: C
2524
- }, null, 544)), [
2525
- [F, i.value]
2537
+ }, u.inputProps), null, 16)), [
2538
+ [z, i.value]
2526
2539
  ]);
2527
2540
  }
2528
2541
  };
2529
2542
  export {
2530
- W as default
2543
+ q as default
2531
2544
  };
@@ -1,4 +1,4 @@
1
- import { mergeModels as e2, useModel as T2, ref as _1, onMounted as L2, watch as N2, onUnmounted as E2, withDirectives as D2, openBlock as M2, createElementBlock as x2, vModelText as P2 } from "vue";
1
+ import { mergeModels as e2, useModel as T2, ref as _1, onMounted as L2, watch as N2, onUnmounted as E2, withDirectives as D2, openBlock as M2, createElementBlock as P2, mergeProps as x2, vModelText as R2 } from "vue";
2
2
  const $2 = [
3
3
  [
4
4
  "af",
@@ -1318,7 +1318,7 @@ for (let y = 0; y < $2.length; y++) {
1318
1318
  nodeById: {}
1319
1319
  };
1320
1320
  }
1321
- const R2 = {
1321
+ const B2 = {
1322
1322
  ad: "Andorra",
1323
1323
  ae: "United Arab Emirates",
1324
1324
  af: "Afghanistan",
@@ -1561,7 +1561,7 @@ const R2 = {
1561
1561
  za: "South Africa",
1562
1562
  zm: "Zambia",
1563
1563
  zw: "Zimbabwe"
1564
- }, B2 = {
1564
+ }, k2 = {
1565
1565
  selectedCountryAriaLabel: "Selected country",
1566
1566
  noCountrySelected: "No country selected",
1567
1567
  countryListAriaLabel: "List of countries",
@@ -1572,10 +1572,10 @@ const R2 = {
1572
1572
  // additional countries (not supported by country-list library)
1573
1573
  ac: "Ascension Island",
1574
1574
  xk: "Kosovo"
1575
- }, s2 = { ...R2, ...B2 };
1575
+ }, s2 = { ...B2, ...k2 };
1576
1576
  for (let y = 0; y < H.length; y++)
1577
1577
  H[y].name = s2[H[y].iso2];
1578
- let k2 = 0;
1578
+ let O2 = 0;
1579
1579
  const r2 = {
1580
1580
  //* Whether or not to allow the dropdown.
1581
1581
  allowDropdown: !0,
@@ -1631,7 +1631,7 @@ const r2 = {
1631
1631
  utilsScript: "",
1632
1632
  //* The number type to enforce during validation.
1633
1633
  validationNumberType: "MOBILE"
1634
- }, O2 = [
1634
+ }, G2 = [
1635
1635
  "800",
1636
1636
  "822",
1637
1637
  "833",
@@ -1653,10 +1653,10 @@ const r2 = {
1653
1653
  const e = c1(y);
1654
1654
  if (e.charAt(0) === "1") {
1655
1655
  const i = e.substr(1, 3);
1656
- return O2.indexOf(i) !== -1;
1656
+ return G2.indexOf(i) !== -1;
1657
1657
  }
1658
1658
  return !1;
1659
- }, G2 = (y, e, i, s) => {
1659
+ }, U2 = (y, e, i, s) => {
1660
1660
  if (i === 0 && !s)
1661
1661
  return 0;
1662
1662
  let u = 0;
@@ -1674,9 +1674,9 @@ const r2 = {
1674
1674
  const { instances: e } = C;
1675
1675
  Object.values(e).forEach((i) => i[y]());
1676
1676
  };
1677
- class U2 {
1677
+ class F2 {
1678
1678
  constructor(e, i = {}) {
1679
- this.id = k2++, this.telInput = e, this.highlightedItem = null, this.options = Object.assign({}, r2, i), this.hadInitialPlaceholder = !!e.getAttribute("placeholder");
1679
+ this.id = O2++, this.telInput = e, this.highlightedItem = null, this.options = Object.assign({}, r2, i), this.hadInitialPlaceholder = !!e.getAttribute("placeholder");
1680
1680
  }
1681
1681
  //* Can't be private as it's called from intlTelInput convenience wrapper.
1682
1682
  _init() {
@@ -1822,10 +1822,10 @@ class U2 {
1822
1822
  { class: "iti__selected-dial-code" },
1823
1823
  this.selectedCountry
1824
1824
  )), e) {
1825
- const x = p ? "" : "iti--flexible-dropdown-width";
1825
+ const P = p ? "" : "iti--flexible-dropdown-width";
1826
1826
  if (this.dropdownContent = N("div", {
1827
1827
  id: `iti-${this.id}__dropdown-content`,
1828
- class: `iti__dropdown-content iti__hide ${x}`
1828
+ class: `iti__dropdown-content iti__hide ${P}`
1829
1829
  }), b && (this.searchInput = N(
1830
1830
  "input",
1831
1831
  {
@@ -1861,13 +1861,13 @@ class U2 {
1861
1861
  }
1862
1862
  }
1863
1863
  if (S.appendChild(this.telInput), this._updateInputPadding(), a) {
1864
- const T = this.telInput.getAttribute("name") || "", x = a(T);
1865
- x.phone && (this.hiddenInput = N("input", {
1864
+ const T = this.telInput.getAttribute("name") || "", P = a(T);
1865
+ P.phone && (this.hiddenInput = N("input", {
1866
1866
  type: "hidden",
1867
- name: x.phone
1868
- }), S.appendChild(this.hiddenInput)), x.country && (this.hiddenInputCountry = N("input", {
1867
+ name: P.phone
1868
+ }), S.appendChild(this.hiddenInput)), P.country && (this.hiddenInputCountry = N("input", {
1869
1869
  type: "hidden",
1870
- name: x.country
1870
+ name: P.country
1871
1871
  }), S.appendChild(this.hiddenInputCountry));
1872
1872
  }
1873
1873
  }
@@ -1971,7 +1971,7 @@ class U2 {
1971
1971
  b || _ && !e ? p = !0 : /[^+0-9]/.test(this.telInput.value) || (p = !1);
1972
1972
  const A = (g == null ? void 0 : g.detail) && g.detail.isSetNumber && !u;
1973
1973
  if (i && !p && !A) {
1974
- const S = this.telInput.selectionStart || 0, T = this.telInput.value.substring(0, S).replace(/[^+0-9]/g, "").length, x = (g == null ? void 0 : g.inputType) === "deleteContentForward", O = this._formatNumberAsYouType(), J = G2(T, O, S, x);
1974
+ const S = this.telInput.selectionStart || 0, T = this.telInput.value.substring(0, S).replace(/[^+0-9]/g, "").length, P = (g == null ? void 0 : g.inputType) === "deleteContentForward", O = this._formatNumberAsYouType(), J = U2(T, O, S, P);
1975
1975
  this.telInput.value = O, this.telInput.setSelectionRange(J, J);
1976
1976
  }
1977
1977
  }, this.telInput.addEventListener("input", this._handleInputEvent), (e || s) && (this._handleKeydownEvent = (g) => {
@@ -1981,7 +1981,7 @@ class U2 {
1981
1981
  return;
1982
1982
  }
1983
1983
  if (e) {
1984
- const b = this.telInput.selectionStart === 0 && g.key === "+", _ = /^[0-9]$/.test(g.key), A = s ? _ : b || _, S = this._getFullNumber(), I = C.utils.getCoreNumber(S, this.selectedCountryData.iso2), T = this.maxCoreNumberLength && I.length >= this.maxCoreNumberLength, x = this.telInput.value.substring(this.telInput.selectionStart, this.telInput.selectionEnd), O = /\d/.test(x), f1 = (this.telInput.selectionStart || 0) === this.telInput.value.length;
1984
+ const b = this.telInput.selectionStart === 0 && g.key === "+", _ = /^[0-9]$/.test(g.key), A = s ? _ : b || _, S = this._getFullNumber(), I = C.utils.getCoreNumber(S, this.selectedCountryData.iso2), T = this.maxCoreNumberLength && I.length >= this.maxCoreNumberLength, P = this.telInput.value.substring(this.telInput.selectionStart, this.telInput.selectionEnd), O = /\d/.test(P), f1 = (this.telInput.selectionStart || 0) === this.telInput.value.length;
1985
1985
  (!A || T && !O && f1) && g.preventDefault();
1986
1986
  }
1987
1987
  }
@@ -2439,7 +2439,7 @@ class U2 {
2439
2439
  this.telInput.disabled = e, e ? this.selectedCountry.setAttribute("disabled", "true") : this.selectedCountry.removeAttribute("disabled");
2440
2440
  }
2441
2441
  }
2442
- const F2 = (y) => !C.utils && !C.startedLoadingUtilsScript ? (C.startedLoadingUtilsScript = !0, new Promise((e, i) => {
2442
+ const V2 = (y) => !C.utils && !C.startedLoadingUtilsScript ? (C.startedLoadingUtilsScript = !0, new Promise((e, i) => {
2443
2443
  import_INTENTIONALLY_BROKEN(
2444
2444
  /* webpackIgnore: true */
2445
2445
  /* @vite-ignore */
@@ -2451,7 +2451,7 @@ const F2 = (y) => !C.utils && !C.startedLoadingUtilsScript ? (C.startedLoadingUt
2451
2451
  });
2452
2452
  })) : null, C = Object.assign(
2453
2453
  (y, e) => {
2454
- const i = new U2(y, e);
2454
+ const i = new F2(y, e);
2455
2455
  return i._init(), y.setAttribute("data-intl-tel-input-id", i.id.toString()), C.instances[i.id] = i, i;
2456
2456
  },
2457
2457
  {
@@ -2467,8 +2467,8 @@ const F2 = (y) => !C.utils && !C.startedLoadingUtilsScript ? (C.startedLoadingUt
2467
2467
  },
2468
2468
  //* A map from instance ID to instance object.
2469
2469
  instances: {},
2470
- loadUtils: F2,
2471
- version: "24.3.7"
2470
+ loadUtils: V2,
2471
+ version: "24.4.0"
2472
2472
  }
2473
2473
  );
2474
2474
  (function() {
@@ -2537,7 +2537,7 @@ const F2 = (y) => !C.utils && !C.startedLoadingUtilsScript ? (C.startedLoadingUt
2537
2537
  new A();
2538
2538
  function S(d, t) {
2539
2539
  switch (this.g = d, this.l = !!t.aa, this.h = t.i, this.s = t.type, this.o = !1, this.h) {
2540
- case x:
2540
+ case P:
2541
2541
  case O:
2542
2542
  case J:
2543
2543
  case f1:
@@ -2548,7 +2548,7 @@ const F2 = (y) => !C.utils && !C.startedLoadingUtilsScript ? (C.startedLoadingUt
2548
2548
  }
2549
2549
  this.j = t.defaultValue;
2550
2550
  }
2551
- var I = 1, T = 2, x = 3, O = 4, J = 6, f1 = 16, o2 = 18;
2551
+ var I = 1, T = 2, P = 3, O = 4, J = 6, f1 = 16, o2 = 18;
2552
2552
  function u2(d, t) {
2553
2553
  for (this.h = d, this.g = {}, d = 0; d < t.length; d++) {
2554
2554
  var $ = t[d];
@@ -2560,16 +2560,16 @@ const F2 = (y) => !C.utils && !C.startedLoadingUtilsScript ? (C.startedLoadingUt
2560
2560
  return t.g - $.g;
2561
2561
  }), d;
2562
2562
  }
2563
- function P() {
2563
+ function x() {
2564
2564
  this.h = {}, this.j = this.m().g, this.g = this.l = null;
2565
2565
  }
2566
- P.prototype.has = function(d) {
2566
+ x.prototype.has = function(d) {
2567
2567
  return R(this, d.g);
2568
- }, P.prototype.get = function(d, t) {
2568
+ }, x.prototype.get = function(d, t) {
2569
2569
  return f(this, d.g, t);
2570
- }, P.prototype.set = function(d, t) {
2570
+ }, x.prototype.set = function(d, t) {
2571
2571
  E(this, d.g, t);
2572
- }, P.prototype.add = function(d, t) {
2572
+ }, x.prototype.add = function(d, t) {
2573
2573
  v1(this, d.g, t);
2574
2574
  };
2575
2575
  function I1(d, t) {
@@ -2585,7 +2585,7 @@ const F2 = (y) => !C.utils && !C.startedLoadingUtilsScript ? (C.startedLoadingUt
2585
2585
  }
2586
2586
  }
2587
2587
  }
2588
- P.prototype.clone = function() {
2588
+ x.prototype.clone = function() {
2589
2589
  var d = new this.constructor();
2590
2590
  return d != this && (d.h = {}, d.g && (d.g = {}), I1(d, this)), d;
2591
2591
  };
@@ -2648,7 +2648,7 @@ const F2 = (y) => !C.utils && !C.startedLoadingUtilsScript ? (C.startedLoadingUt
2648
2648
  s1.prototype.g = function(d) {
2649
2649
  throw new d.h(), Error("Unimplemented");
2650
2650
  }, s1.prototype.h = function(d, t) {
2651
- if (d.h == 11 || d.h == 10) return t instanceof P ? t : this.g(d.s.prototype.m(), t);
2651
+ if (d.h == 11 || d.h == 10) return t instanceof x ? t : this.g(d.s.prototype.m(), t);
2652
2652
  if (d.h == 14) return typeof t == "string" && S1.test(t) && (d = Number(t), 0 < d) ? d : t;
2653
2653
  if (!d.o) return t;
2654
2654
  if (d = d.s, d === String) {
@@ -2685,19 +2685,19 @@ const F2 = (y) => !C.utils && !C.startedLoadingUtilsScript ? (C.startedLoadingUt
2685
2685
  return this.h;
2686
2686
  };
2687
2687
  function j() {
2688
- P.call(this);
2688
+ x.call(this);
2689
2689
  }
2690
- i(j, P);
2690
+ i(j, x);
2691
2691
  var w1 = null;
2692
2692
  function w() {
2693
- P.call(this);
2693
+ x.call(this);
2694
2694
  }
2695
- i(w, P);
2695
+ i(w, x);
2696
2696
  var b1 = null;
2697
2697
  function W() {
2698
- P.call(this);
2698
+ x.call(this);
2699
2699
  }
2700
- i(W, P);
2700
+ i(W, x);
2701
2701
  var A1 = null;
2702
2702
  j.prototype.m = function() {
2703
2703
  var d = w1;
@@ -2746,9 +2746,9 @@ const F2 = (y) => !C.utils && !C.startedLoadingUtilsScript ? (C.startedLoadingUt
2746
2746
  })), d;
2747
2747
  }, W.m = W.prototype.m;
2748
2748
  function V() {
2749
- P.call(this);
2749
+ x.call(this);
2750
2750
  }
2751
- i(V, P);
2751
+ i(V, x);
2752
2752
  var T1 = null, a2 = { ra: 0, qa: 1, pa: 5, oa: 10, na: 20 };
2753
2753
  V.prototype.m = function() {
2754
2754
  var d = T1;
@@ -8060,11 +8060,11 @@ const F2 = (y) => !C.utils && !C.startedLoadingUtilsScript ? (C.startedLoadingUt
8060
8060
  function M1(d) {
8061
8061
  return 2 > d.length ? !1 : G(I2, d);
8062
8062
  }
8063
- function x1(d) {
8063
+ function P1(d) {
8064
8064
  return G(m2, d) ? r1(d, c2) : r1(d, g1);
8065
8065
  }
8066
- function P1(d) {
8067
- var t = x1(d.toString());
8066
+ function x1(d) {
8067
+ var t = P1(d.toString());
8068
8068
  B(d), d.g(t);
8069
8069
  }
8070
8070
  function R1(d) {
@@ -8225,9 +8225,9 @@ const F2 = (y) => !C.utils && !C.startedLoadingUtilsScript ? (C.startedLoadingUt
8225
8225
  $ != null && (l = f($, 11)), l == null && (l = "NonMatch");
8226
8226
  var h = t.toString();
8227
8227
  if (h.length == 0) l = 20;
8228
- else if (Q.test(h)) h = h.replace(Q, ""), B(t), t.g(x1(h)), l = 1;
8228
+ else if (Q.test(h)) h = h.replace(Q, ""), B(t), t.g(P1(h)), l = 1;
8229
8229
  else {
8230
- if (h = new RegExp(l), P1(t), l = t.toString(), l.search(h) == 0) {
8230
+ if (h = new RegExp(l), x1(t), l = t.toString(), l.search(h) == 0) {
8231
8231
  h = l.match(h)[0].length;
8232
8232
  var m = l.substring(h).match(N1);
8233
8233
  m && m[1] != null && 0 < m[1].length && r1(m[1], g1) == "0" ? l = !1 : (B(t), t.g(l.substring(h)), l = !0);
@@ -8288,7 +8288,7 @@ const F2 = (y) => !C.utils && !C.startedLoadingUtilsScript ? (C.startedLoadingUt
8288
8288
  if (m = m.replace(Q, ""), h = F1(d, m, l, t, n, o), h == 0) throw y1;
8289
8289
  } else throw y1;
8290
8290
  }
8291
- if (h != 0 ? (r = e1(h), r != $ && (l = d1(d, h, r))) : (P1(r), t.g(r.toString()), $ != null ? (h = v(l, 10), E(
8291
+ if (h != 0 ? (r = e1(h), r != $ && (l = d1(d, h, r))) : (x1(r), t.g(r.toString()), $ != null ? (h = v(l, 10), E(
8292
8292
  o,
8293
8293
  1,
8294
8294
  h
@@ -8516,12 +8516,20 @@ const F2 = (y) => !C.utils && !C.startedLoadingUtilsScript ? (C.startedLoadingUt
8516
8516
  }
8517
8517
  }), e("intlTelInputUtilsTemp.numberFormat", { E164: 0, INTERNATIONAL: 1, NATIONAL: 2, RFC3966: 3 }), e("intlTelInputUtilsTemp.numberType", h1), e("intlTelInputUtilsTemp.validationError", { IS_POSSIBLE: 0, INVALID_COUNTRY_CODE: 1, TOO_SHORT: 2, TOO_LONG: 3, IS_POSSIBLE_LOCAL_ONLY: 4, INVALID_LENGTH: 5 });
8518
8518
  })();
8519
- const V2 = window.intlTelInputUtilsTemp;
8519
+ const K2 = window.intlTelInputUtilsTemp;
8520
8520
  delete window.intlTelInputUtilsTemp;
8521
- C.utils = V2;
8522
- const H2 = {
8521
+ C.utils = K2;
8522
+ const j2 = {
8523
8523
  __name: "IntlTelInputWithUtils",
8524
8524
  props: /* @__PURE__ */ e2({
8525
+ disabled: {
8526
+ type: Boolean,
8527
+ default: !1
8528
+ },
8529
+ inputProps: {
8530
+ type: Object,
8531
+ default: () => ({})
8532
+ },
8525
8533
  options: {
8526
8534
  type: Object,
8527
8535
  default: () => ({})
@@ -8529,9 +8537,6 @@ const H2 = {
8529
8537
  value: {
8530
8538
  type: String,
8531
8539
  default: ""
8532
- },
8533
- disabled: {
8534
- type: Boolean
8535
8540
  }
8536
8541
  }, {
8537
8542
  modelValue: {
@@ -8540,11 +8545,19 @@ const H2 = {
8540
8545
  },
8541
8546
  modelModifiers: {}
8542
8547
  }),
8543
- emits: /* @__PURE__ */ e2(["changeNumber", "changeCountry", "changeValidity", "changeErrorCode"], ["update:modelValue"]),
8548
+ emits: /* @__PURE__ */ e2([
8549
+ "changeNumber",
8550
+ "changeCountry",
8551
+ "changeValidity",
8552
+ "changeErrorCode"
8553
+ ], ["update:modelValue"]),
8544
8554
  setup(y, { expose: e, emit: i }) {
8545
8555
  const s = T2(y, "modelValue"), u = y, a = i, c = _1(), p = _1(), g = _1(!1), b = () => p.value ? u.options.strictMode ? p.value.isValidNumberPrecise() : p.value.isValidNumber() : null, _ = () => {
8546
8556
  let I = b();
8547
- g.value !== I && (g.value = I, a("changeValidity", !!I), a("changeErrorCode", I ? null : p.value.getValidationError()));
8557
+ g.value !== I && (g.value = I, a("changeValidity", !!I), a(
8558
+ "changeErrorCode",
8559
+ I ? null : p.value.getValidationError()
8560
+ ));
8548
8561
  }, A = () => {
8549
8562
  var I;
8550
8563
  a("changeNumber", ((I = p.value) == null ? void 0 : I.getNumber()) ?? ""), _();
@@ -8563,18 +8576,18 @@ const H2 = {
8563
8576
  ), E2(() => {
8564
8577
  var I;
8565
8578
  return (I = p.value) == null ? void 0 : I.destroy();
8566
- }), e({ instance: p, input: c }), (I, T) => D2((M2(), x2("input", {
8579
+ }), e({ instance: p, input: c }), (I, T) => D2((M2(), P2("input", x2({
8567
8580
  ref_key: "input",
8568
8581
  ref: c,
8569
- "onUpdate:modelValue": T[0] || (T[0] = (x) => s.value = x),
8582
+ "onUpdate:modelValue": T[0] || (T[0] = (P) => s.value = P),
8570
8583
  type: "tel",
8571
8584
  onCountrychange: S,
8572
8585
  onInput: A
8573
- }, null, 544)), [
8574
- [P2, s.value]
8586
+ }, y.inputProps), null, 16)), [
8587
+ [R2, s.value]
8575
8588
  ]);
8576
8589
  }
8577
8590
  };
8578
8591
  export {
8579
- H2 as default
8592
+ j2 as default
8580
8593
  };