mui-tel-input 3.2.2 → 4.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 +56 -6
- package/dist/mui-tel-input.es.js +279 -279
- package/package.json +25 -37
- package/dist/index.stories.d.ts +0 -6
- package/dist/index.test.d.ts +0 -0
- package/dist/index.types.d.ts +0 -33
- package/dist/shared/constants/continents.d.ts +0 -7
- package/dist/shared/constants/countries.d.ts +0 -4
- package/dist/shared/constants/flags.d.ts +0 -6
- package/dist/shared/constants/lang.d.ts +0 -1
- package/dist/shared/helpers/__tests__/array.test.d.ts +0 -1
- package/dist/shared/helpers/__tests__/country.test.d.ts +0 -1
- package/dist/shared/helpers/__tests__/dom.test.d.ts +0 -0
- package/dist/shared/helpers/__tests__/intl.test.d.ts +0 -0
- package/dist/shared/helpers/__tests__/ref.test.d.ts +0 -0
- package/dist/shared/helpers/__tests__/string.test.d.ts +0 -0
- package/dist/shared/helpers/array.d.ts +0 -2
- package/dist/shared/helpers/country.d.ts +0 -18
- package/dist/shared/helpers/dom.d.ts +0 -1
- package/dist/shared/helpers/intl.d.ts +0 -1
- package/dist/shared/helpers/log.d.ts +0 -1
- package/dist/shared/helpers/object.d.ts +0 -2
- package/dist/shared/helpers/ref.d.ts +0 -2
- package/dist/shared/helpers/string.d.ts +0 -1
- package/dist/shared/hooks/__tests__/useMissmatch.test.d.ts +0 -1
- package/dist/shared/hooks/useMissmatchProps.d.ts +0 -2
- package/dist/shared/hooks/usePhoneDigits.d.ts +0 -33
- package/dist/testUtils/index.d.ts +0 -11
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,56 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { AsYouType } from 'libphonenumber-js';
|
|
2
|
+
import { CountryCode } from 'libphonenumber-js';
|
|
3
|
+
import { getNumberType } from 'libphonenumber-js';
|
|
4
|
+
import { isValidPhoneNumber as matchIsValidTel } from 'libphonenumber-js';
|
|
5
|
+
import type { MenuProps } from '@mui/material/Menu';
|
|
6
|
+
import { NumberType } from 'libphonenumber-js';
|
|
7
|
+
import { default as React_2 } from 'react';
|
|
8
|
+
import type { TextFieldProps } from '@mui/material/TextField';
|
|
9
|
+
|
|
10
|
+
export { AsYouType }
|
|
11
|
+
|
|
12
|
+
declare type BaseTextFieldProps = Omit<TextFieldProps, 'onChange' | 'select' | 'type' | 'multiline' | 'defaultValue'>;
|
|
13
|
+
|
|
14
|
+
declare type FlagSize = `small` | 'medium';
|
|
15
|
+
|
|
16
|
+
export { getNumberType }
|
|
17
|
+
|
|
18
|
+
declare const ISO_CODES: CountryCode[];
|
|
19
|
+
|
|
20
|
+
export { matchIsValidTel }
|
|
21
|
+
|
|
22
|
+
export declare const MuiTelInput: React_2.ForwardRefExoticComponent<Omit<MuiTelInputProps, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
23
|
+
|
|
24
|
+
export declare type MuiTelInputContinent = 'EU' | 'AS' | 'NA' | 'SA' | 'OC' | 'AF';
|
|
25
|
+
|
|
26
|
+
export declare type MuiTelInputCountry = (typeof ISO_CODES)[number];
|
|
27
|
+
|
|
28
|
+
export declare interface MuiTelInputInfo {
|
|
29
|
+
countryCode: MuiTelInputCountry | null;
|
|
30
|
+
countryCallingCode: string | null;
|
|
31
|
+
nationalNumber: string | null;
|
|
32
|
+
numberType: Exclude<NumberType, undefined> | null;
|
|
33
|
+
numberValue: string | null;
|
|
34
|
+
reason: MuiTelInputReason;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export declare interface MuiTelInputProps extends BaseTextFieldProps {
|
|
38
|
+
excludedCountries?: MuiTelInputCountry[];
|
|
39
|
+
onlyCountries?: MuiTelInputCountry[];
|
|
40
|
+
preferredCountries?: MuiTelInputCountry[];
|
|
41
|
+
defaultCountry?: MuiTelInputCountry;
|
|
42
|
+
forceCallingCode?: boolean;
|
|
43
|
+
focusOnSelectCountry?: boolean;
|
|
44
|
+
disableDropdown?: boolean;
|
|
45
|
+
flagSize?: FlagSize;
|
|
46
|
+
langOfCountryName?: string;
|
|
47
|
+
disableFormatting?: boolean;
|
|
48
|
+
continents?: MuiTelInputContinent[];
|
|
49
|
+
onChange?: (value: string, info: MuiTelInputInfo) => void;
|
|
50
|
+
value?: string | undefined;
|
|
51
|
+
MenuProps?: Partial<MenuProps>;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export declare type MuiTelInputReason = 'country' | 'input';
|
|
55
|
+
|
|
56
|
+
export { }
|