react-simple-phone-input 1.0.6-beta → 1.0.7-beta
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/cjs/index.js +1323 -3
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/Data/country-data.d.ts +5 -0
- package/dist/cjs/types/Helpers/country-helper.d.ts +20 -0
- package/dist/cjs/types/Helpers/hook.d.ts +1 -0
- package/dist/cjs/types/components/PhoneInput/PhoneInput.d.ts +21 -2
- package/dist/esm/index.js +1323 -3
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/Data/country-data.d.ts +5 -0
- package/dist/esm/types/Helpers/country-helper.d.ts +20 -0
- package/dist/esm/types/Helpers/hook.d.ts +1 -0
- package/dist/esm/types/components/PhoneInput/PhoneInput.d.ts +21 -2
- package/dist/index.d.ts +22 -2
- package/package.json +1 -1
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface CountryDataTypes {
|
|
2
|
+
country: string;
|
|
3
|
+
countryCode: string;
|
|
4
|
+
callingCode: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const getDefaultCountry: (code: string) => {
|
|
7
|
+
country: string;
|
|
8
|
+
countryCode: string;
|
|
9
|
+
callingCode: string;
|
|
10
|
+
} | undefined;
|
|
11
|
+
export declare const getBySearch: (search: string, onlyCountry?: string[], excludeCountry?: string[]) => {
|
|
12
|
+
country: string;
|
|
13
|
+
countryCode: string;
|
|
14
|
+
callingCode: string;
|
|
15
|
+
}[];
|
|
16
|
+
export declare const getCountryByFilter: (onlyCountry: string[], excludeCountry: string[], preferredCountry: string[]) => {
|
|
17
|
+
country: string;
|
|
18
|
+
countryCode: string;
|
|
19
|
+
callingCode: string;
|
|
20
|
+
}[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useOnClickOutside(ref: any, handler: any): void;
|
|
@@ -1,3 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import React, { ReactNode } from "react";
|
|
2
|
+
interface Props {
|
|
3
|
+
placeholder: string;
|
|
4
|
+
country: string;
|
|
5
|
+
onChange: (e: string) => void;
|
|
6
|
+
value?: string;
|
|
7
|
+
iconComponent?: ReactNode;
|
|
8
|
+
inputProps?: React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
|
|
9
|
+
onlyCountries?: string[];
|
|
10
|
+
excludeCountries?: string[];
|
|
11
|
+
preferredCountries?: string[];
|
|
12
|
+
showDropdownIcon?: boolean;
|
|
13
|
+
dialCodeInputField?: boolean;
|
|
14
|
+
search?: boolean;
|
|
15
|
+
searchPlaceholder?: string;
|
|
16
|
+
showSearchIcon?: boolean;
|
|
17
|
+
searchIconComponent?: ReactNode;
|
|
18
|
+
searchProps?: React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
|
|
19
|
+
searchNotFound?: string;
|
|
20
|
+
}
|
|
21
|
+
declare const PhoneInput: ({ placeholder, country, onChange, value, iconComponent, inputProps, onlyCountries, excludeCountries, preferredCountries, showDropdownIcon, dialCodeInputField, search, searchPlaceholder, showSearchIcon, searchIconComponent, searchProps, searchNotFound }: Props) => JSX.Element;
|
|
3
22
|
export default PhoneInput;
|