react-simple-phone-input 5.2.2 → 5.2.7
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/LICENSE +57 -21
- package/README.md +325 -322
- package/dist/index.css +580 -0
- package/dist/{cjs/types/components/PhoneInput/PhoneInput.d.ts → index.d.mts} +7 -5
- package/dist/index.d.ts +3 -2
- package/dist/index.js +4596 -0
- package/dist/index.mjs +4562 -0
- package/package.json +23 -23
- package/dist/cjs/index.css +0 -162
- package/dist/cjs/index.js +0 -2
- package/dist/cjs/index.js.map +0 -1
- package/dist/cjs/types/Data/country-data.d.ts +0 -5
- package/dist/cjs/types/Helpers/country-helper.d.ts +0 -20
- package/dist/cjs/types/Helpers/hook.d.ts +0 -2
- package/dist/cjs/types/components/PhoneInput/index.d.ts +0 -1
- package/dist/cjs/types/components/index.d.ts +0 -1
- package/dist/cjs/types/index.d.ts +0 -1
- package/dist/esm/index.css +0 -162
- package/dist/esm/index.js +0 -2
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/types/Data/country-data.d.ts +0 -5
- package/dist/esm/types/Helpers/country-helper.d.ts +0 -20
- package/dist/esm/types/Helpers/hook.d.ts +0 -2
- package/dist/esm/types/components/PhoneInput/PhoneInput.d.ts +0 -50
- package/dist/esm/types/components/PhoneInput/index.d.ts +0 -1
- package/dist/esm/types/components/index.d.ts +0 -1
- package/dist/esm/types/index.d.ts +0 -1
- package/dist/style.css +0 -162
|
@@ -1,20 +0,0 @@
|
|
|
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
|
-
}[];
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import "./PhoneInput.css";
|
|
3
|
-
export interface PhoneInputResponseType {
|
|
4
|
-
country: string;
|
|
5
|
-
code: string;
|
|
6
|
-
dialCode: string;
|
|
7
|
-
value: string;
|
|
8
|
-
valueWithoutPlus: string;
|
|
9
|
-
}
|
|
10
|
-
interface Props {
|
|
11
|
-
placeholder: string;
|
|
12
|
-
country: string;
|
|
13
|
-
onChange: (e: PhoneInputResponseType) => void;
|
|
14
|
-
value?: string;
|
|
15
|
-
iconComponent?: React.ReactNode;
|
|
16
|
-
inputProps?: React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
|
|
17
|
-
onlyCountries?: string[];
|
|
18
|
-
excludeCountries?: string[];
|
|
19
|
-
preferredCountries?: string[];
|
|
20
|
-
showDropdownIcon?: boolean;
|
|
21
|
-
dialCodeInputField?: boolean;
|
|
22
|
-
disableDropdownOnly?: boolean;
|
|
23
|
-
disableInput?: boolean;
|
|
24
|
-
search?: boolean;
|
|
25
|
-
searchPlaceholder?: string;
|
|
26
|
-
showSearchIcon?: boolean;
|
|
27
|
-
searchIconComponent?: React.ReactNode;
|
|
28
|
-
searchProps?: React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
|
|
29
|
-
searchNotFound?: string;
|
|
30
|
-
containerClass?: string;
|
|
31
|
-
buttonClass?: string;
|
|
32
|
-
dropdownClass?: string;
|
|
33
|
-
dropdownListClass?: string;
|
|
34
|
-
dropdownIconClass?: string;
|
|
35
|
-
searchContainerClass?: string;
|
|
36
|
-
searchInputClass?: string;
|
|
37
|
-
searchIconClass?: string;
|
|
38
|
-
inputClass?: string;
|
|
39
|
-
containerStyle?: React.CSSProperties;
|
|
40
|
-
buttonStyle?: React.CSSProperties;
|
|
41
|
-
dropdownStyle?: React.CSSProperties;
|
|
42
|
-
dropdownListStyle?: React.CSSProperties;
|
|
43
|
-
dropdownIconStyle?: React.CSSProperties;
|
|
44
|
-
searchContainerStyle?: React.CSSProperties;
|
|
45
|
-
searchInputStyle?: React.CSSProperties;
|
|
46
|
-
searchIconStyle?: React.CSSProperties;
|
|
47
|
-
inputStyle?: React.CSSProperties;
|
|
48
|
-
}
|
|
49
|
-
declare const PhoneInput: ({ placeholder, country, onChange, value, iconComponent, inputProps, onlyCountries, excludeCountries, preferredCountries, showDropdownIcon, dialCodeInputField, search, disableDropdownOnly, disableInput, searchPlaceholder, showSearchIcon, searchIconComponent, searchProps, searchNotFound, containerClass, buttonClass, dropdownClass, dropdownListClass, dropdownIconClass, searchContainerClass, searchInputClass, searchIconClass, inputClass, containerStyle, buttonStyle, dropdownStyle, dropdownListStyle, dropdownIconStyle, searchContainerStyle, searchInputStyle, searchIconStyle, inputStyle }: Props) => JSX.Element;
|
|
50
|
-
export default PhoneInput;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default, PhoneInputResponseType } from "./PhoneInput";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as PhoneInput, PhoneInputResponseType } from "./PhoneInput";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./components";
|
package/dist/style.css
DELETED
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
.simple-phone-input-sri198-container {
|
|
2
|
-
position: relative;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.simple-phone-input-sri198-container:focus,
|
|
6
|
-
.simple-phone-input-sri198-container:focus-visible,
|
|
7
|
-
.simple-phone-input-sri198-container:focus-within {
|
|
8
|
-
outline: none;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.simple-phone-input-sri198-main {
|
|
12
|
-
display: flex;
|
|
13
|
-
border: 1px solid rgb(203 203 203);
|
|
14
|
-
user-select: none;
|
|
15
|
-
border-radius: 3px;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.simple-phone-input-sri198-dropdown-container {
|
|
19
|
-
cursor: pointer;
|
|
20
|
-
display: flex;
|
|
21
|
-
align-items: center;
|
|
22
|
-
background: rgb(231 231 231);
|
|
23
|
-
border-right: 1px solid rgb(203 203 203);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.simple-phone-input-sri198-dropdown-container img {
|
|
27
|
-
margin-right: 6px;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.simple-phone-input-sri198-dropdown {
|
|
31
|
-
background: white;
|
|
32
|
-
list-style: none;
|
|
33
|
-
padding: 0;
|
|
34
|
-
margin: 0;
|
|
35
|
-
position: absolute;
|
|
36
|
-
top: 110%;
|
|
37
|
-
left: 0;
|
|
38
|
-
right: 0;
|
|
39
|
-
height: 250px;
|
|
40
|
-
overflow-y: auto;
|
|
41
|
-
box-shadow: 0px 4px 15px rgb(163 163 163);
|
|
42
|
-
border-radius: 3px;
|
|
43
|
-
transition: 0.3s ease;
|
|
44
|
-
transform: translateY(-5px);
|
|
45
|
-
opacity: 0;
|
|
46
|
-
visibility: hidden;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.simple-phone-input-sri198-dropdown.active {
|
|
50
|
-
transform: translateY(0px);
|
|
51
|
-
opacity: 1;
|
|
52
|
-
visibility: visible;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.simple-phone-input-sri198-dropdown li {
|
|
56
|
-
margin: 3px 0;
|
|
57
|
-
padding: 3px 8px;
|
|
58
|
-
display: flex;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.simple-phone-input-sri198-dropdown li.active {
|
|
62
|
-
background: rgba(0, 0, 0, 0.116);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
.simple-phone-input-sri198-dropdown li:hover {
|
|
66
|
-
background: rgba(0, 0, 0, 0.116);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.simple-phone-input-sri198-dropdown li img {
|
|
70
|
-
margin-right: 6px;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
.simple-phone-input-sri198-dropdown-container-button {
|
|
74
|
-
display: flex;
|
|
75
|
-
flex: 1;
|
|
76
|
-
width: 92px;
|
|
77
|
-
padding: 7px 2px 7px 7px;
|
|
78
|
-
align-items: center;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.simple-phone-input-sri198-dropdown-container-button.dial {
|
|
82
|
-
width: unset;
|
|
83
|
-
padding: 8px 3px 8px 8px;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
.simple-phone-input-sri198-dropdown-text {
|
|
87
|
-
font-size: 15px;
|
|
88
|
-
flex: 1;
|
|
89
|
-
margin-top: 3px;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.simple-phone-input-sri198-dropdown-country-code {
|
|
93
|
-
opacity: 0.6;
|
|
94
|
-
margin-top: 3px;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
.simple-phone-input-sri198-dropdown-icon {
|
|
98
|
-
display: flex;
|
|
99
|
-
align-items: center;
|
|
100
|
-
justify-content: center;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
.simple-phone-input-sri198-dropdown-icon svg {
|
|
104
|
-
transition: 0.3s ease;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
.simple-phone-input-sri198-dropdown-icon.active svg {
|
|
108
|
-
transform: rotate(-180deg)
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
.simple-phone-input-sri198-selected-code {
|
|
112
|
-
flex: 1;
|
|
113
|
-
font-size: 14px;
|
|
114
|
-
margin-top: 2px;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
.simple-phone-input-sri198-input {
|
|
118
|
-
width: 100%;
|
|
119
|
-
border: none;
|
|
120
|
-
padding: 0 10px;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
.simple-phone-input-sri198-input:focus {
|
|
124
|
-
outline: none;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
.simple-phone-input-sri198-search-container {
|
|
128
|
-
padding: 5px;
|
|
129
|
-
position: relative;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
.simple-phone-input-sri198-search-container input {
|
|
133
|
-
border: 1px solid rgba(0, 0, 0, 0.116);
|
|
134
|
-
padding: 8px 10px;
|
|
135
|
-
width: 100%;
|
|
136
|
-
font-size: 15px;
|
|
137
|
-
border-radius: 2px;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
.simple-phone-input-sri198-search-icon {
|
|
141
|
-
position: absolute;
|
|
142
|
-
right: 10px;
|
|
143
|
-
top: 50%;
|
|
144
|
-
transform: translateY(-50%);
|
|
145
|
-
display: flex;
|
|
146
|
-
pointer-events: none;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
.simple-phone-input-sri198-search-icon svg {
|
|
150
|
-
font-size: 20px;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
.simple-phone-input-sri198-not-found {
|
|
154
|
-
text-align: center;
|
|
155
|
-
margin-top: 10px;
|
|
156
|
-
font-size: 15px;
|
|
157
|
-
color: #f73131;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
.simple-phone-input-sri198-search-container input:focus {
|
|
161
|
-
outline: none;
|
|
162
|
-
}
|