mui-tel-input 2.0.4 → 3.0.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/dist/index.d.ts +1 -1
- package/dist/index.types.d.ts +2 -0
- package/dist/mui-tel-input.es.js +1748 -1851
- package/dist/mui-tel-input.umd.js +22 -17
- package/dist/shared/constants/flags.d.ts +2 -2
- package/dist/shared/helpers/country.d.ts +1 -0
- package/dist/shared/helpers/string.d.ts +1 -0
- package/dist/shared/hooks/usePhoneDigits.d.ts +2 -1
- package/package.json +3 -2
|
@@ -7,6 +7,7 @@ declare type FilterCountriesOptions = {
|
|
|
7
7
|
continents?: readonly MuiTelInputContinent[];
|
|
8
8
|
};
|
|
9
9
|
export declare function getCallingCodeOfCountry(isoCode: MuiTelInputCountry): string;
|
|
10
|
+
export declare function getValidCountry(country?: MuiTelInputCountry): MuiTelInputCountry;
|
|
10
11
|
export declare function sortedPreferredCountries(countries: readonly MuiTelInputCountry[], preferredCountries: readonly MuiTelInputCountry[]): readonly MuiTelInputCountry[];
|
|
11
12
|
export declare function getCountriesOfContinents(continents: readonly MuiTelInputContinent[]): readonly MuiTelInputCountry[];
|
|
12
13
|
export declare function getOnlyCountries(countries: readonly MuiTelInputCountry[], onlyCountries: readonly MuiTelInputCountry[]): readonly MuiTelInputCountry[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function removeOccurrence(text: string, part: string | RegExp): string;
|
|
@@ -19,10 +19,11 @@ declare type State = {
|
|
|
19
19
|
declare type GetInitialStateParams = {
|
|
20
20
|
defaultCountry?: MuiTelInputCountry;
|
|
21
21
|
initialValue: string;
|
|
22
|
+
forceCallingCode?: boolean;
|
|
22
23
|
disableFormatting?: boolean;
|
|
23
24
|
};
|
|
24
25
|
export declare function getInitialState(params: GetInitialStateParams): State;
|
|
25
|
-
export default function usePhoneDigits({ value, onChange, defaultCountry,
|
|
26
|
+
export default function usePhoneDigits({ value, onChange, defaultCountry, onlyCountries, excludedCountries, continents, disableFormatting, forceCallingCode }: UsePhoneDigitsParams): {
|
|
26
27
|
inputValue: string;
|
|
27
28
|
isoCode: import("libphonenumber-js").CountryCode | null;
|
|
28
29
|
onInputChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"url": "https://github.com/viclafouch/mui-tel-input/issues"
|
|
8
8
|
},
|
|
9
9
|
"homepage": "https://viclafouch.github.io/mui-tel-input",
|
|
10
|
-
"version": "
|
|
10
|
+
"version": "3.0.0",
|
|
11
11
|
"files": [
|
|
12
12
|
"dist"
|
|
13
13
|
],
|
|
@@ -56,6 +56,7 @@
|
|
|
56
56
|
"changelog": true
|
|
57
57
|
}
|
|
58
58
|
},
|
|
59
|
+
"sideEffects": false,
|
|
59
60
|
"peerDependencies": {
|
|
60
61
|
"@emotion/react": "^11.5.0",
|
|
61
62
|
"@emotion/styled": "^11.3.0",
|
|
@@ -70,7 +71,7 @@
|
|
|
70
71
|
}
|
|
71
72
|
},
|
|
72
73
|
"dependencies": {
|
|
73
|
-
"libphonenumber-js": "^1.10.
|
|
74
|
+
"libphonenumber-js": "^1.10.15"
|
|
74
75
|
},
|
|
75
76
|
"devDependencies": {
|
|
76
77
|
"@babel/core": "^7.19.3",
|