intl-tel-input 23.0.12 → 23.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "intl-tel-input",
3
- "version": "23.0.12",
3
+ "version": "23.1.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
@@ -29,7 +29,7 @@ import "intl-tel-input/styles";
29
29
 
30
30
  See the [Validation demo](https://github.com/jackocnr/intl-tel-input/blob/master/react/demo/ValidationApp.tsx) for a more fleshed out example of how to handle validation.
31
31
 
32
- 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"` instead, 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@23.0.12/build/js/utils.js"`.
32
+ 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"` instead, 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@23.1.0/build/js/utils.js"`.
33
33
 
34
34
  ## Props
35
35
  Here's a list of all of the current props you can pass to the IntlTelInput react component.
@@ -2799,7 +2799,7 @@ var intlTelInput = Object.assign(
2799
2799
  //* A map from instance ID to instance object.
2800
2800
  instances: {},
2801
2801
  loadUtils,
2802
- version: "23.0.12"
2802
+ version: "23.1.0"
2803
2803
  }
2804
2804
  );
2805
2805
  var intl_tel_input_default = intlTelInput;
@@ -976,7 +976,7 @@ declare module "intl-tel-input" {
976
976
  }
977
977
  declare module "intl-tel-input/react" {
978
978
  import intlTelInput from "intl-tel-input";
979
- import { SomeOptions } from "intl-tel-input";
979
+ import { Iti, SomeOptions } from "intl-tel-input";
980
980
  import React from "react";
981
981
  export { intlTelInput };
982
982
  type ItiProps = {
@@ -989,7 +989,11 @@ declare module "intl-tel-input/react" {
989
989
  initOptions?: SomeOptions;
990
990
  inputProps?: object;
991
991
  };
992
- const IntlTelInput: React.ForwardRefExoticComponent<ItiProps & React.RefAttributes<unknown>>;
992
+ export type IntlTelInputRef = {
993
+ getInstance: () => Iti | null;
994
+ getInput: () => HTMLInputElement | null;
995
+ };
996
+ const IntlTelInput: React.ForwardRefExoticComponent<ItiProps & React.RefAttributes<IntlTelInputRef>>;
993
997
  export default IntlTelInput;
994
998
  }
995
999
  declare module "intl-tel-input/utils-compiled" {
@@ -1002,7 +1006,7 @@ declare module "intl-tel-input/intlTelInputWithUtils" {
1002
1006
  }
1003
1007
  declare module "intl-tel-input/reactWithUtils" {
1004
1008
  import intlTelInput from "intl-tel-input/intlTelInputWithUtils";
1005
- import { SomeOptions } from "intl-tel-input";
1009
+ import { Iti, SomeOptions } from "intl-tel-input";
1006
1010
  import React from "react";
1007
1011
  export { intlTelInput };
1008
1012
  type ItiProps = {
@@ -1015,6 +1019,10 @@ declare module "intl-tel-input/reactWithUtils" {
1015
1019
  initOptions?: SomeOptions;
1016
1020
  inputProps?: object;
1017
1021
  };
1018
- const IntlTelInput: React.ForwardRefExoticComponent<ItiProps & React.RefAttributes<unknown>>;
1022
+ export type IntlTelInputRef = {
1023
+ getInstance: () => Iti | null;
1024
+ getInput: () => HTMLInputElement | null;
1025
+ };
1026
+ const IntlTelInput: React.ForwardRefExoticComponent<ItiProps & React.RefAttributes<IntlTelInputRef>>;
1019
1027
  export default IntlTelInput;
1020
1028
  }
@@ -2763,7 +2763,7 @@ var intlTelInput = Object.assign(
2763
2763
  //* A map from instance ID to instance object.
2764
2764
  instances: {},
2765
2765
  loadUtils,
2766
- version: "23.0.12"
2766
+ version: "23.1.0"
2767
2767
  }
2768
2768
  );
2769
2769
  var intl_tel_input_default = intlTelInput;
@@ -2799,7 +2799,7 @@ var intlTelInput = Object.assign(
2799
2799
  //* A map from instance ID to instance object.
2800
2800
  instances: {},
2801
2801
  loadUtils,
2802
- version: "23.0.12"
2802
+ version: "23.1.0"
2803
2803
  }
2804
2804
  );
2805
2805
  var intl_tel_input_default = intlTelInput;
@@ -2763,7 +2763,7 @@ var intlTelInput = Object.assign(
2763
2763
  //* A map from instance ID to instance object.
2764
2764
  instances: {},
2765
2765
  loadUtils,
2766
- version: "23.0.12"
2766
+ version: "23.1.0"
2767
2767
  }
2768
2768
  );
2769
2769
  var intl_tel_input_default = intlTelInput;