intl-tel-input 25.14.0 → 25.15.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 (47) hide show
  1. package/README.md +5 -5
  2. package/angular/README.md +1 -1
  3. package/angular/build/IntlTelInput.js +1 -1
  4. package/angular/build/IntlTelInputWithUtils.js +1 -1
  5. package/build/css/intlTelInput-no-assets.css +1259 -0
  6. package/build/css/intlTelInput-no-assets.min.css +1 -0
  7. package/build/css/intlTelInput.css +6 -4
  8. package/build/css/intlTelInput.min.css +1 -1
  9. package/build/js/data.js +1 -1
  10. package/build/js/data.min.js +1 -1
  11. package/build/js/intlTelInput.js +2 -2
  12. package/build/js/intlTelInput.min.js +2 -2
  13. package/build/js/intlTelInputWithUtils.js +2 -2
  14. package/build/js/intlTelInputWithUtils.min.js +2 -2
  15. package/package.json +1 -1
  16. package/react/README.md +1 -1
  17. package/react/build/IntlTelInput.cjs +1 -1
  18. package/react/build/IntlTelInput.js +1 -1
  19. package/react/build/IntlTelInputWithUtils.cjs +1 -1
  20. package/react/build/IntlTelInputWithUtils.js +1 -1
  21. package/svelte/README.md +1 -1
  22. package/svelte/build/IntlTelInput.mjs +1 -1
  23. package/svelte/build/IntlTelInputWithUtils.mjs +1 -1
  24. package/vue/README.md +1 -1
  25. package/vue/build/IntlTelInput.mjs +1 -1
  26. package/vue/build/IntlTelInput.vue.d.ts +34 -0
  27. package/vue/build/IntlTelInputWithUtils.mjs +1 -1
  28. package/vue/build/IntlTelInputWithUtils.vue.d.ts +34 -0
  29. package/vue/build/exports/IntlTelInput.d.ts +3 -0
  30. package/vue/build/exports/IntlTelInput.mjs +66 -0
  31. package/vue/build/exports/IntlTelInputWithUtils.d.ts +3 -0
  32. package/vue/build/exports/IntlTelInputWithUtils.mjs +6207 -0
  33. package/vue/build/intl-tel-input-Db39yQmC.mjs +3083 -0
  34. package/vue/build/intl-tel-input.d.ts +97 -0
  35. package/vue/build/modules/constants.d.ts +85 -0
  36. package/vue/build/modules/core/countrySearch.d.ts +17 -0
  37. package/vue/build/modules/core/icons.d.ts +9 -0
  38. package/vue/build/modules/core/options.d.ts +3 -0
  39. package/vue/build/modules/core/ui.d.ts +46 -0
  40. package/vue/build/modules/data/country-data.d.ts +12 -0
  41. package/vue/build/modules/data/nanp-regionless.d.ts +2 -0
  42. package/vue/build/modules/format/caret.d.ts +1 -0
  43. package/vue/build/modules/format/formatting.d.ts +3 -0
  44. package/vue/build/modules/types/events.d.ts +9 -0
  45. package/vue/build/modules/types/public-api.d.ts +78 -0
  46. package/vue/build/modules/utils/dom.d.ts +6 -0
  47. package/vue/build/modules/utils/string.d.ts +2 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "intl-tel-input",
3
- "version": "25.14.0",
3
+ "version": "25.15.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
@@ -30,7 +30,7 @@ import "intl-tel-input/styles";
30
30
  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.
31
31
 
32
32
  ## Utils Script
33
- 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 `loadUtils` 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 `loadUtils` option to that URL, or just point it to a CDN hosted version e.g. `"https://cdn.jsdelivr.net/npm/intl-tel-input@25.14.0/build/js/utils.js"`.
33
+ 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 `loadUtils` 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 `loadUtils` option to that URL, or just point it to a CDN hosted version e.g. `"https://cdn.jsdelivr.net/npm/intl-tel-input@25.15.0/build/js/utils.js"`.
34
34
 
35
35
  ## Props
36
36
  Here's a list of all of the current props you can pass to the IntlTelInput React component.
@@ -4106,7 +4106,7 @@ var intlTelInput = Object.assign(
4106
4106
  attachUtils,
4107
4107
  startedLoadingUtilsScript: false,
4108
4108
  startedLoadingAutoCountry: false,
4109
- version: "25.14.0"
4109
+ version: "25.15.0"
4110
4110
  }
4111
4111
  );
4112
4112
  var intl_tel_input_default = intlTelInput;
@@ -4070,7 +4070,7 @@ var intlTelInput = Object.assign(
4070
4070
  attachUtils,
4071
4071
  startedLoadingUtilsScript: false,
4072
4072
  startedLoadingAutoCountry: false,
4073
- version: "25.14.0"
4073
+ version: "25.15.0"
4074
4074
  }
4075
4075
  );
4076
4076
  var intl_tel_input_default = intlTelInput;
@@ -4106,7 +4106,7 @@ var intlTelInput = Object.assign(
4106
4106
  attachUtils,
4107
4107
  startedLoadingUtilsScript: false,
4108
4108
  startedLoadingAutoCountry: false,
4109
- version: "25.14.0"
4109
+ version: "25.15.0"
4110
4110
  }
4111
4111
  );
4112
4112
  var intl_tel_input_default = intlTelInput;
@@ -4070,7 +4070,7 @@ var intlTelInput = Object.assign(
4070
4070
  attachUtils,
4071
4071
  startedLoadingUtilsScript: false,
4072
4072
  startedLoadingAutoCountry: false,
4073
- version: "25.14.0"
4073
+ version: "25.15.0"
4074
4074
  }
4075
4075
  );
4076
4076
  var intl_tel_input_default = intlTelInput;
package/svelte/README.md CHANGED
@@ -30,7 +30,7 @@ See the [Validation demo](https://github.com/jackocnr/intl-tel-input/blob/master
30
30
  "svelte:demo": "vite --config svelte/demo/[demo variant]/vite.config.mjs"
31
31
  ```
32
32
 
33
- 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/svelteWithUtils"`, to include the utils script. Alternatively, if you use the main `"intl-tel-input/svelte"` import, then you should couple this with the `loadUtils` 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 `loadUtils` option to that URL, or alternatively just point it to a CDN hosted version e.g. `"https://cdn.jsdelivr.net/npm/intl-tel-input@25.14.0/build/js/utils.js"`.
33
+ 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/svelteWithUtils"`, to include the utils script. Alternatively, if you use the main `"intl-tel-input/svelte"` import, then you should couple this with the `loadUtils` 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 `loadUtils` option to that URL, or alternatively just point it to a CDN hosted version e.g. `"https://cdn.jsdelivr.net/npm/intl-tel-input@25.15.0/build/js/utils.js"`.
34
34
 
35
35
  ## Props
36
36
  Here's a list of all of the current props you can pass to the IntlTelInput Svelte component.
@@ -5145,7 +5145,7 @@ const Gs = (e) => {
5145
5145
  attachUtils: Gs,
5146
5146
  startedLoadingUtilsScript: !1,
5147
5147
  startedLoadingAutoCountry: !1,
5148
- version: "25.14.0"
5148
+ version: "25.15.0"
5149
5149
  }
5150
5150
  );
5151
5151
  var zs = /* @__PURE__ */ es("<input/>");
@@ -5145,7 +5145,7 @@ const B9 = (t) => {
5145
5145
  attachUtils: B9,
5146
5146
  startedLoadingUtilsScript: !1,
5147
5147
  startedLoadingAutoCountry: !1,
5148
- version: "25.14.0"
5148
+ version: "25.15.0"
5149
5149
  }
5150
5150
  );
5151
5151
  (function() {
package/vue/README.md CHANGED
@@ -34,7 +34,7 @@ See the [Validation demo](https://github.com/jackocnr/intl-tel-input/blob/master
34
34
  "vue:demo": "vite --config vue/demo/[demo variant]/vite.config.js"
35
35
  ```
36
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 `loadUtils` 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 `loadUtils` option to that URL, or alternatively just point it to a CDN hosted version e.g. `"https://cdn.jsdelivr.net/npm/intl-tel-input@25.14.0/build/js/utils.js"`.
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 `loadUtils` 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 `loadUtils` option to that URL, or alternatively just point it to a CDN hosted version e.g. `"https://cdn.jsdelivr.net/npm/intl-tel-input@25.15.0/build/js/utils.js"`.
38
38
 
39
39
  ## Props
40
40
  Here's a list of all of the current props you can pass to the IntlTelInput Vue component.
@@ -3317,7 +3317,7 @@ const Tt = (l) => {
3317
3317
  attachUtils: Tt,
3318
3318
  startedLoadingUtilsScript: !1,
3319
3319
  startedLoadingAutoCountry: !1,
3320
- version: "25.14.0"
3320
+ version: "25.15.0"
3321
3321
  }
3322
3322
  ), Ot = {
3323
3323
  __name: "IntlTelInput",
@@ -0,0 +1,34 @@
1
+ import { SomeOptions } from './modules/types/public-api';
2
+ import { InputHTMLAttributes } from 'vue';
3
+ interface Props {
4
+ options?: SomeOptions;
5
+ disabled?: boolean;
6
+ inputProps?: InputHTMLAttributes;
7
+ }
8
+ type __VLS_Props = Props;
9
+ type __VLS_PublicProps = {
10
+ modelValue?: string;
11
+ } & __VLS_Props;
12
+ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {
13
+ instance: import('vue').Ref<any, any>;
14
+ input: import('vue').Ref<any, any>;
15
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
16
+ changeNumber: (...args: any[]) => void;
17
+ changeCountry: (...args: any[]) => void;
18
+ changeValidity: (...args: any[]) => void;
19
+ changeErrorCode: (...args: any[]) => void;
20
+ "update:modelValue": (value: string) => void;
21
+ }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
22
+ onChangeNumber?: (...args: any[]) => any;
23
+ onChangeCountry?: (...args: any[]) => any;
24
+ onChangeValidity?: (...args: any[]) => any;
25
+ onChangeErrorCode?: (...args: any[]) => any;
26
+ "onUpdate:modelValue"?: (value: string) => any;
27
+ }>, {
28
+ disabled: boolean;
29
+ options: SomeOptions;
30
+ inputProps: InputHTMLAttributes;
31
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
32
+ input: HTMLInputElement;
33
+ }, any>;
34
+ export default _default;
@@ -3317,7 +3317,7 @@ const L2 = (h) => {
3317
3317
  attachUtils: L2,
3318
3318
  startedLoadingUtilsScript: !1,
3319
3319
  startedLoadingAutoCountry: !1,
3320
- version: "25.14.0"
3320
+ version: "25.15.0"
3321
3321
  }
3322
3322
  );
3323
3323
  (function() {
@@ -0,0 +1,34 @@
1
+ import { SomeOptions } from './modules/types/public-api';
2
+ import { InputHTMLAttributes } from 'vue';
3
+ interface Props {
4
+ options?: SomeOptions;
5
+ disabled?: boolean;
6
+ inputProps?: InputHTMLAttributes;
7
+ }
8
+ type __VLS_Props = Props;
9
+ type __VLS_PublicProps = {
10
+ modelValue?: string;
11
+ } & __VLS_Props;
12
+ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {
13
+ instance: import('vue').Ref<any, any>;
14
+ input: import('vue').Ref<any, any>;
15
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
16
+ changeNumber: (...args: any[]) => void;
17
+ changeCountry: (...args: any[]) => void;
18
+ changeValidity: (...args: any[]) => void;
19
+ changeErrorCode: (...args: any[]) => void;
20
+ "update:modelValue": (value: string) => void;
21
+ }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
22
+ onChangeNumber?: (...args: any[]) => any;
23
+ onChangeCountry?: (...args: any[]) => any;
24
+ onChangeValidity?: (...args: any[]) => any;
25
+ onChangeErrorCode?: (...args: any[]) => any;
26
+ "onUpdate:modelValue"?: (value: string) => any;
27
+ }>, {
28
+ disabled: boolean;
29
+ options: SomeOptions;
30
+ inputProps: InputHTMLAttributes;
31
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
32
+ input: HTMLInputElement;
33
+ }, any>;
34
+ export default _default;
@@ -0,0 +1,3 @@
1
+ import { default as IntlTelInput } from '../IntlTelInput.vue';
2
+ export type { SomeOptions } from '../modules/types/public-api';
3
+ export default IntlTelInput;
@@ -0,0 +1,66 @@
1
+ import { defineComponent as g, mergeModels as m, useModel as b, ref as r, onMounted as h, watch as C, onUnmounted as M, withDirectives as N, createElementBlock as P, openBlock as D, mergeProps as E, vModelText as I } from "vue";
2
+ import { i as k } from "../intl-tel-input-Db39yQmC.mjs";
3
+ const B = /* @__PURE__ */ g({
4
+ inheritAttrs: !1,
5
+ __name: "IntlTelInput",
6
+ props: /* @__PURE__ */ m({
7
+ options: { default: () => ({}) },
8
+ disabled: { type: Boolean, default: !1 },
9
+ inputProps: { default: () => ({}) }
10
+ }, {
11
+ modelValue: {
12
+ default: ""
13
+ },
14
+ modelModifiers: {}
15
+ }),
16
+ emits: /* @__PURE__ */ m([
17
+ "changeNumber",
18
+ "changeCountry",
19
+ "changeValidity",
20
+ "changeErrorCode"
21
+ ], ["update:modelValue"]),
22
+ setup(s, { expose: v, emit: f }) {
23
+ const u = b(s, "modelValue"), l = s, o = f, n = r(), t = r(), i = r(!1), d = () => t.value ? l.options.strictMode ? t.value.isValidNumberPrecise() : t.value.isValidNumber() : null, p = () => {
24
+ let e = d();
25
+ i.value !== e && (i.value = e, o("changeValidity", !!e), o(
26
+ "changeErrorCode",
27
+ e ? null : t.value.getValidationError()
28
+ ));
29
+ }, c = () => {
30
+ var e;
31
+ o("changeNumber", ((e = t.value) == null ? void 0 : e.getNumber()) ?? ""), p();
32
+ }, y = () => {
33
+ var e;
34
+ o("changeCountry", ((e = t.value) == null ? void 0 : e.getSelectedCountryData().iso2) ?? ""), c(), p();
35
+ };
36
+ return h(() => {
37
+ n.value && (t.value = k(n.value, l.options), u.value && t.value.setNumber(u.value), l.disabled && t.value.setDisabled(l.disabled), i.value = d());
38
+ }), C(
39
+ () => l.disabled,
40
+ (e) => {
41
+ var a;
42
+ return (a = t.value) == null ? void 0 : a.setDisabled(e);
43
+ }
44
+ ), M(() => {
45
+ var e;
46
+ return (e = t.value) == null ? void 0 : e.destroy();
47
+ }), v({ instance: t, input: n }), (e, a) => N((D(), P("input", E({
48
+ ref_key: "input",
49
+ ref: n,
50
+ "onUpdate:modelValue": a[0] || (a[0] = (V) => u.value = V),
51
+ type: "tel",
52
+ onCountrychange: y,
53
+ onInput: c
54
+ }, e.inputProps), null, 16)), [
55
+ [
56
+ I,
57
+ u.value,
58
+ void 0,
59
+ { lazy: !0 }
60
+ ]
61
+ ]);
62
+ }
63
+ });
64
+ export {
65
+ B as default
66
+ };
@@ -0,0 +1,3 @@
1
+ import { default as IntlTelInputWithUtils } from '../IntlTelInputWithUtils.vue';
2
+ export type { SomeOptions } from '../modules/types/public-api';
3
+ export default IntlTelInputWithUtils;