kui-basic 0.0.1
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/README.md +32 -0
- package/dist/index.css +2 -0
- package/dist/index.css.map +1 -0
- package/dist/index.d.ts +660 -0
- package/dist/index.es.css +2 -0
- package/dist/index.es.css.map +1 -0
- package/dist/index.es.js +3495 -0
- package/dist/index.es.js.map +1 -0
- package/dist/index.js +3536 -0
- package/dist/index.js.map +1 -0
- package/package.json +47 -0
package/dist/index.es.js
ADDED
|
@@ -0,0 +1,3495 @@
|
|
|
1
|
+
import React, { forwardRef, useRef, useState, useEffect, useMemo } from 'react';
|
|
2
|
+
import classNames from 'classnames';
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
4
|
+
import InputMask from 'react-input-mask';
|
|
5
|
+
import { scroller, Events, Link } from 'react-scroll';
|
|
6
|
+
|
|
7
|
+
var colors = {
|
|
8
|
+
primary: {
|
|
9
|
+
main: "#ED713C",
|
|
10
|
+
pressed: "#D24C13",
|
|
11
|
+
hover: "#EA5A1D",
|
|
12
|
+
light: "#FCEAE2",
|
|
13
|
+
light2: "#FEF7F3"
|
|
14
|
+
},
|
|
15
|
+
secondary: {
|
|
16
|
+
main: "#18191F",
|
|
17
|
+
gray60: "#474A57",
|
|
18
|
+
gray50: "#7F8285",
|
|
19
|
+
gray40: "#949494",
|
|
20
|
+
gray30: "#BFBFBF",
|
|
21
|
+
gray15: "#EAECEF",
|
|
22
|
+
white: "#FFFFFF",
|
|
23
|
+
light: "#C4C4C4",
|
|
24
|
+
disabled: "#A6AEBC"
|
|
25
|
+
},
|
|
26
|
+
background: {
|
|
27
|
+
main: "#FBFBFD",
|
|
28
|
+
light2: "#F7F8F9",
|
|
29
|
+
light3: "#F2F3F5"
|
|
30
|
+
},
|
|
31
|
+
success: {
|
|
32
|
+
green70: "#259E58",
|
|
33
|
+
green60: "#23A65A",
|
|
34
|
+
main: "#27AE60",
|
|
35
|
+
green10: "#EAFCF7",
|
|
36
|
+
green5: "#F0FDF9"
|
|
37
|
+
},
|
|
38
|
+
error: {
|
|
39
|
+
red70: "#D03C1A",
|
|
40
|
+
red60: "#DA421F",
|
|
41
|
+
main: "#EB4620",
|
|
42
|
+
red10: "#FCE3DE",
|
|
43
|
+
red5: "#FDF0ED"
|
|
44
|
+
},
|
|
45
|
+
info: {
|
|
46
|
+
blue70: "#0098B6",
|
|
47
|
+
blue60: "#009CBB",
|
|
48
|
+
main: "#00ABCD",
|
|
49
|
+
blue10: "#D9F2F8",
|
|
50
|
+
blue5: "#E5F7FA"
|
|
51
|
+
},
|
|
52
|
+
purple: {
|
|
53
|
+
purple70: "#914BD2",
|
|
54
|
+
purple60: "#974EDB",
|
|
55
|
+
main: "#9B51E0",
|
|
56
|
+
purple10: "#F0E5FA",
|
|
57
|
+
purple5: "#F7F1FD"
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
var shadows = {
|
|
62
|
+
shadow1: "0px 5px 16px rgba(0, 0, 0, 0.1)",
|
|
63
|
+
shadow2: "0px 12px 16px rgba(0, 0, 0, 0.08)",
|
|
64
|
+
shadow3: "0px 26px 34px rgba(0, 0, 0, 0.1)",
|
|
65
|
+
shadow4: "0px 10px 20px rgba(0, 0, 0, 0.1)"
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
var breakpoints = {
|
|
69
|
+
xxs: 375,
|
|
70
|
+
xs: 600,
|
|
71
|
+
sm: 900,
|
|
72
|
+
md: 1200,
|
|
73
|
+
lg: 1440,
|
|
74
|
+
xl: 1536
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
var theme = {
|
|
78
|
+
palette: colors,
|
|
79
|
+
breakpoints: breakpoints,
|
|
80
|
+
shadows: shadows
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
function _extends() {
|
|
84
|
+
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
85
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
86
|
+
var source = arguments[i];
|
|
87
|
+
|
|
88
|
+
for (var key in source) {
|
|
89
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
90
|
+
target[key] = source[key];
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
return target;
|
|
96
|
+
};
|
|
97
|
+
return _extends.apply(this, arguments);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
101
|
+
if (source == null) return {};
|
|
102
|
+
var target = {};
|
|
103
|
+
var sourceKeys = Object.keys(source);
|
|
104
|
+
var key, i;
|
|
105
|
+
|
|
106
|
+
for (i = 0; i < sourceKeys.length; i++) {
|
|
107
|
+
key = sourceKeys[i];
|
|
108
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
109
|
+
target[key] = source[key];
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
return target;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
function _objectWithoutProperties(source, excluded) {
|
|
116
|
+
if (source == null) return {};
|
|
117
|
+
|
|
118
|
+
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
119
|
+
|
|
120
|
+
var key, i;
|
|
121
|
+
|
|
122
|
+
if (Object.getOwnPropertySymbols) {
|
|
123
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
124
|
+
|
|
125
|
+
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
126
|
+
key = sourceSymbolKeys[i];
|
|
127
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
128
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
129
|
+
target[key] = source[key];
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
return target;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
function _slicedToArray(arr, i) {
|
|
137
|
+
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
function _toArray(arr) {
|
|
141
|
+
return _arrayWithHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableRest();
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
function _arrayWithHoles(arr) {
|
|
145
|
+
if (Array.isArray(arr)) return arr;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
function _iterableToArray(iter) {
|
|
149
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
function _iterableToArrayLimit(arr, i) {
|
|
153
|
+
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
154
|
+
|
|
155
|
+
if (_i == null) return;
|
|
156
|
+
var _arr = [];
|
|
157
|
+
var _n = true;
|
|
158
|
+
var _d = false;
|
|
159
|
+
|
|
160
|
+
var _s, _e;
|
|
161
|
+
|
|
162
|
+
try {
|
|
163
|
+
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
|
|
164
|
+
_arr.push(_s.value);
|
|
165
|
+
|
|
166
|
+
if (i && _arr.length === i) break;
|
|
167
|
+
}
|
|
168
|
+
} catch (err) {
|
|
169
|
+
_d = true;
|
|
170
|
+
_e = err;
|
|
171
|
+
} finally {
|
|
172
|
+
try {
|
|
173
|
+
if (!_n && _i["return"] != null) _i["return"]();
|
|
174
|
+
} finally {
|
|
175
|
+
if (_d) throw _e;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
return _arr;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
function _unsupportedIterableToArray(o, minLen) {
|
|
183
|
+
if (!o) return;
|
|
184
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
185
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
186
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
187
|
+
if (n === "Map" || n === "Set") return Array.from(o);
|
|
188
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
function _arrayLikeToArray(arr, len) {
|
|
192
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
193
|
+
|
|
194
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
195
|
+
|
|
196
|
+
return arr2;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
function _nonIterableRest() {
|
|
200
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
var _excluded$r = ["size", "children", "color", "uppercase", "disableUserSelect", "className", "align"];
|
|
204
|
+
var HeadingSizes = {
|
|
205
|
+
hero: "h1",
|
|
206
|
+
h1: "h1",
|
|
207
|
+
h2: "h2",
|
|
208
|
+
h3: "h3",
|
|
209
|
+
h4: "h4"
|
|
210
|
+
};
|
|
211
|
+
|
|
212
|
+
function Heading(props) {
|
|
213
|
+
var size = props.size,
|
|
214
|
+
children = props.children,
|
|
215
|
+
color = props.color,
|
|
216
|
+
uppercase = props.uppercase,
|
|
217
|
+
disableUserSelect = props.disableUserSelect,
|
|
218
|
+
className = props.className,
|
|
219
|
+
align = props.align,
|
|
220
|
+
otherProps = _objectWithoutProperties(props, _excluded$r);
|
|
221
|
+
|
|
222
|
+
var Tag = "".concat(HeadingSizes[size]);
|
|
223
|
+
return /*#__PURE__*/React.createElement(Tag, _extends({
|
|
224
|
+
className: classNames("KUI-Heading", "KUI-Heading_".concat(size), "KUI-Heading_align-".concat(align), "KUI-color_".concat(color), uppercase && "KUI-text_uppercase", disableUserSelect && "KUI-text_disableUserSelect", className)
|
|
225
|
+
}, otherProps), children);
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
Heading.defaultProps = {
|
|
229
|
+
size: "h1",
|
|
230
|
+
color: "main",
|
|
231
|
+
uppercase: false,
|
|
232
|
+
disableUserSelect: false
|
|
233
|
+
};
|
|
234
|
+
Heading.propTypes = {
|
|
235
|
+
size: PropTypes.oneOf(["hero", "h1", "h2", "h3", "h4"]),
|
|
236
|
+
uppercase: PropTypes.bool,
|
|
237
|
+
disableUserSelect: PropTypes.bool,
|
|
238
|
+
color: PropTypes.oneOf(["main", "gray60", "gray50", "gray40", "white", "brand"])
|
|
239
|
+
};
|
|
240
|
+
|
|
241
|
+
var _excluded$q = ["children", "color", "size", "weight", "uppercase", "disableUserSelect", "className", "align"];
|
|
242
|
+
|
|
243
|
+
function Caption(props) {
|
|
244
|
+
var children = props.children,
|
|
245
|
+
color = props.color,
|
|
246
|
+
size = props.size,
|
|
247
|
+
weight = props.weight,
|
|
248
|
+
uppercase = props.uppercase,
|
|
249
|
+
disableUserSelect = props.disableUserSelect,
|
|
250
|
+
className = props.className,
|
|
251
|
+
align = props.align,
|
|
252
|
+
otherProps = _objectWithoutProperties(props, _excluded$q);
|
|
253
|
+
|
|
254
|
+
return /*#__PURE__*/React.createElement("p", _extends({
|
|
255
|
+
className: classNames("KUI-Caption", "KUI-Caption_".concat(size), "KUI-color_".concat(color), "KUI-weight_".concat(weight), "KUI-Caption_align-".concat(align), uppercase && "KUI-text_uppercase", disableUserSelect && "KUI-text_disableUserSelect", className)
|
|
256
|
+
}, otherProps), children);
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
Caption.defaultProps = {
|
|
260
|
+
size: "m",
|
|
261
|
+
weight: 400,
|
|
262
|
+
uppercase: false,
|
|
263
|
+
color: "main",
|
|
264
|
+
disableUserSelect: false
|
|
265
|
+
};
|
|
266
|
+
Caption.displayName = "Caption";
|
|
267
|
+
Caption.propTypes = {
|
|
268
|
+
size: PropTypes.oneOf(["xs", "sm", "s", "m", "l"]),
|
|
269
|
+
weight: PropTypes.oneOf([400, 500, 600]),
|
|
270
|
+
color: PropTypes.oneOf(["main", "gray60", "gray50", "gray40", "white", "brand"]),
|
|
271
|
+
uppercase: PropTypes.bool,
|
|
272
|
+
disableUserSelect: PropTypes.bool
|
|
273
|
+
};
|
|
274
|
+
|
|
275
|
+
var _excluded$p = ["children", "size", "color", "uppercase", "disableUserSelect", "weight", "className"];
|
|
276
|
+
|
|
277
|
+
function Text(props) {
|
|
278
|
+
var children = props.children,
|
|
279
|
+
size = props.size,
|
|
280
|
+
color = props.color,
|
|
281
|
+
uppercase = props.uppercase,
|
|
282
|
+
disableUserSelect = props.disableUserSelect,
|
|
283
|
+
weight = props.weight,
|
|
284
|
+
className = props.className,
|
|
285
|
+
otherProps = _objectWithoutProperties(props, _excluded$p);
|
|
286
|
+
|
|
287
|
+
return /*#__PURE__*/React.createElement("p", _extends({
|
|
288
|
+
className: classNames("KUI-Text", "KUI-Text_".concat(size), "KUI-color_".concat(color), "KUI-weight_".concat(weight), uppercase && "KUI-text_uppercase", disableUserSelect && "KUI-text_disableUserSelect", className)
|
|
289
|
+
}, otherProps), children);
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
Text.defaultProps = {
|
|
293
|
+
size: "s",
|
|
294
|
+
color: "main",
|
|
295
|
+
uppercase: false,
|
|
296
|
+
disableUserSelect: false,
|
|
297
|
+
weight: 400
|
|
298
|
+
};
|
|
299
|
+
Text.propTypes = {
|
|
300
|
+
size: PropTypes.oneOf(["xs", "s", "m"]),
|
|
301
|
+
weight: PropTypes.oneOf([400, 500, 600]),
|
|
302
|
+
color: PropTypes.oneOf(["main", "gray60", "gray50", "gray40", "white", "brand"]),
|
|
303
|
+
uppercase: PropTypes.bool,
|
|
304
|
+
disableUserSelect: PropTypes.bool
|
|
305
|
+
};
|
|
306
|
+
|
|
307
|
+
var _excluded$o = ["children", "variant", "size", "className", "fullWidth", "isCircle", "captionSize", "disabledStyle", "border", "startIcon", "endIcon"];
|
|
308
|
+
var Button = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
309
|
+
var children = props.children,
|
|
310
|
+
variant = props.variant,
|
|
311
|
+
size = props.size,
|
|
312
|
+
className = props.className,
|
|
313
|
+
fullWidth = props.fullWidth,
|
|
314
|
+
isCircle = props.isCircle,
|
|
315
|
+
captionSize = props.captionSize,
|
|
316
|
+
disabledStyle = props.disabledStyle,
|
|
317
|
+
border = props.border,
|
|
318
|
+
startIcon = props.startIcon,
|
|
319
|
+
endIcon = props.endIcon,
|
|
320
|
+
buttonProps = _objectWithoutProperties(props, _excluded$o);
|
|
321
|
+
|
|
322
|
+
return /*#__PURE__*/React.createElement("button", _extends({
|
|
323
|
+
ref: ref,
|
|
324
|
+
className: classNames("KUI-Button", "KUI-Button-".concat(size), "KUI-Button-".concat(variant), fullWidth && "KUI-Button_full-width", isCircle && "KUI-Button_is-circle", border && "KUI-Button_border-".concat(border), buttonProps.disabled && disabledStyle, className)
|
|
325
|
+
}, buttonProps), isCircle ? /*#__PURE__*/React.createElement("div", {
|
|
326
|
+
className: "KUI-Button_is-circle_container"
|
|
327
|
+
}, children) : /*#__PURE__*/React.createElement("div", {
|
|
328
|
+
className: classNames((startIcon || endIcon) && "KUI-Button_icon-container")
|
|
329
|
+
}, startIcon && /*#__PURE__*/React.createElement("span", {
|
|
330
|
+
className: "KUI-Button_start-icon"
|
|
331
|
+
}, startIcon), /*#__PURE__*/React.createElement(Caption, {
|
|
332
|
+
size: captionSize,
|
|
333
|
+
weight: 600,
|
|
334
|
+
className: "KUI-Button-text"
|
|
335
|
+
}, children), endIcon && /*#__PURE__*/React.createElement("span", {
|
|
336
|
+
className: "KUI-Button_end-icon"
|
|
337
|
+
}, endIcon)));
|
|
338
|
+
});
|
|
339
|
+
Button.defaultProps = {
|
|
340
|
+
variant: "primary",
|
|
341
|
+
size: "m",
|
|
342
|
+
fullWidth: false,
|
|
343
|
+
endIcon: null,
|
|
344
|
+
startIcon: null,
|
|
345
|
+
disabled: false,
|
|
346
|
+
isCircle: false,
|
|
347
|
+
captionSize: "s",
|
|
348
|
+
border: null
|
|
349
|
+
};
|
|
350
|
+
Button.propTypes = {
|
|
351
|
+
variant: PropTypes.oneOf(["primary", "orange", "white", "whiteWithOrangeHover", "whiteWithBrand", "blur", "whiteWithGray", "grayLightWithBorder", "grayLight", "green", "red", "transparent"]),
|
|
352
|
+
size: PropTypes.oneOf(["xs", "s", "m", "l"]),
|
|
353
|
+
fullWidth: PropTypes.bool,
|
|
354
|
+
endIcon: PropTypes.element,
|
|
355
|
+
startIcon: PropTypes.element,
|
|
356
|
+
disabled: PropTypes.bool,
|
|
357
|
+
isCircle: PropTypes.bool,
|
|
358
|
+
captionSize: PropTypes.oneOf(["xs", "sm", "s", "m", "l"]),
|
|
359
|
+
border: PropTypes.oneOf(["brand", "lightGray", "lightOrange"])
|
|
360
|
+
};
|
|
361
|
+
Button.displayName = "Button";
|
|
362
|
+
|
|
363
|
+
var ErrorIcon = function ErrorIcon(_ref) {
|
|
364
|
+
var width = _ref.width,
|
|
365
|
+
height = _ref.height;
|
|
366
|
+
return /*#__PURE__*/React.createElement("svg", {
|
|
367
|
+
width: width,
|
|
368
|
+
height: height,
|
|
369
|
+
viewBox: "0 0 ".concat(width, " ").concat(height),
|
|
370
|
+
fill: "none",
|
|
371
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
372
|
+
"aria-label": "error"
|
|
373
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
374
|
+
fillRule: "evenodd",
|
|
375
|
+
clipRule: "evenodd",
|
|
376
|
+
d: "M7.99935 15.3334C12.0494 15.3334 15.3327 12.0502 15.3327 8.00008C15.3327 3.94999 12.0494 0.666748 7.99935 0.666748C3.94926 0.666748 0.666016 3.94999 0.666016 8.00008C0.666016 12.0502 3.94926 15.3334 7.99935 15.3334ZM7.99935 13.3334C10.9449 13.3334 13.3327 10.9456 13.3327 8.00008C13.3327 5.05456 10.9449 2.66675 7.99935 2.66675C5.05383 2.66675 2.66602 5.05456 2.66602 8.00008C2.66602 10.9456 5.05383 13.3334 7.99935 13.3334ZM9.52795 5.52868C9.78829 5.26833 10.2104 5.26833 10.4708 5.52868C10.7311 5.78903 10.7311 6.21114 10.4708 6.47149L8.94216 8.00008L10.4708 9.52868C10.7311 9.78903 10.7311 10.2111 10.4708 10.4715C10.2104 10.7318 9.78829 10.7318 9.52795 10.4715L7.99935 8.94289L6.47075 10.4715C6.2104 10.7318 5.78829 10.7318 5.52794 10.4715C5.2676 10.2111 5.2676 9.78903 5.52794 9.52868L7.05654 8.00008L5.52794 6.47149C5.2676 6.21114 5.2676 5.78903 5.52794 5.52868C5.78829 5.26833 6.2104 5.26833 6.47075 5.52868L7.99935 7.05727L9.52795 5.52868Z",
|
|
377
|
+
fill: "#EB5757"
|
|
378
|
+
}));
|
|
379
|
+
};
|
|
380
|
+
|
|
381
|
+
ErrorIcon.defaultProps = {
|
|
382
|
+
width: 16,
|
|
383
|
+
height: 16
|
|
384
|
+
};
|
|
385
|
+
ErrorIcon.propTypes = {
|
|
386
|
+
width: PropTypes.number,
|
|
387
|
+
height: PropTypes.number
|
|
388
|
+
};
|
|
389
|
+
|
|
390
|
+
var WarningIcon = function WarningIcon(_ref) {
|
|
391
|
+
var width = _ref.width,
|
|
392
|
+
height = _ref.height;
|
|
393
|
+
return /*#__PURE__*/React.createElement("svg", {
|
|
394
|
+
width: width,
|
|
395
|
+
height: height,
|
|
396
|
+
viewBox: "0 0 ".concat(width, " ").concat(height),
|
|
397
|
+
fill: "none",
|
|
398
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
399
|
+
"aria-label": "warning"
|
|
400
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
401
|
+
d: "M6.99999 0.142883C10.7871 0.142883 13.8571 3.21293 13.8571 7.00002C13.8571 10.7871 10.7871 13.8572 6.99999 13.8572C3.2129 13.8572 0.142853 10.7871 0.142853 7.00002C0.142853 3.21293 3.2129 0.142883 6.99999 0.142883ZM6.99999 1.28574C3.84408 1.28574 1.28571 3.84411 1.28571 7.00002C1.28571 10.1559 3.84408 12.7143 6.99999 12.7143C10.1559 12.7143 12.7143 10.1559 12.7143 7.00002C12.7143 3.84411 10.1559 1.28574 6.99999 1.28574ZM6.99999 9.05717C7.44182 9.05717 7.79999 9.41534 7.79999 9.85717C7.79999 10.299 7.44182 10.6572 6.99999 10.6572C6.55817 10.6572 6.2 10.299 6.2 9.85717C6.2 9.41534 6.55817 9.05717 6.99999 9.05717ZM7.04206 3.57145C7.17783 3.57145 7.26306 3.59267 7.33756 3.63251C7.41206 3.67235 7.47052 3.73082 7.51036 3.80532C7.55021 3.87982 7.57142 3.96504 7.57142 4.10081V7.61352C7.57142 7.74929 7.55021 7.83452 7.51036 7.90902C7.47052 7.98352 7.41206 8.04198 7.33756 8.08182C7.26306 8.12166 7.17783 8.14288 7.04206 8.14288H6.95793C6.82215 8.14288 6.73693 8.12166 6.66243 8.08182C6.58793 8.04198 6.52947 7.98352 6.48962 7.90902C6.44978 7.83452 6.42857 7.74929 6.42857 7.61352V4.10081C6.42857 3.96504 6.44978 3.87982 6.48962 3.80532C6.52947 3.73082 6.58793 3.67235 6.66243 3.63251C6.73693 3.59267 6.82215 3.57145 6.95793 3.57145H7.04206Z",
|
|
402
|
+
fill: "#ED713C"
|
|
403
|
+
}));
|
|
404
|
+
};
|
|
405
|
+
|
|
406
|
+
WarningIcon.defaultProps = {
|
|
407
|
+
width: 16,
|
|
408
|
+
height: 16
|
|
409
|
+
};
|
|
410
|
+
WarningIcon.propTypes = {
|
|
411
|
+
width: PropTypes.number,
|
|
412
|
+
height: PropTypes.number
|
|
413
|
+
};
|
|
414
|
+
|
|
415
|
+
var SuccessIcon = function SuccessIcon(_ref) {
|
|
416
|
+
var width = _ref.width,
|
|
417
|
+
height = _ref.height;
|
|
418
|
+
return /*#__PURE__*/React.createElement("svg", {
|
|
419
|
+
width: width,
|
|
420
|
+
height: height,
|
|
421
|
+
viewBox: "0 0 ".concat(width, " ").concat(height),
|
|
422
|
+
fill: "none",
|
|
423
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
424
|
+
"aria-label": "success"
|
|
425
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
426
|
+
d: "M6.99999 0.142883C10.7871 0.142883 13.8571 3.21293 13.8571 7.00002C13.8571 10.7871 10.7871 13.8572 6.99999 13.8572C3.2129 13.8572 0.142853 10.7871 0.142853 7.00002C0.142853 3.21293 3.2129 0.142883 6.99999 0.142883ZM6.99999 1.28574C3.84408 1.28574 1.28571 3.84411 1.28571 7.00002C1.28571 10.1559 3.84408 12.7143 6.99999 12.7143C10.1559 12.7143 12.7143 10.1559 12.7143 7.00002C12.7143 3.84411 10.1559 1.28574 6.99999 1.28574ZM9.45142 4.88003C9.67458 4.65687 10.0397 4.65687 10.2629 4.88003C10.486 5.10318 10.486 5.4683 10.2629 5.69145L6.2612 9.6898C6.03804 9.91296 5.67623 9.91296 5.45308 9.6898L3.45308 7.6898C3.22992 7.46664 3.22992 7.10484 3.45308 6.88168C3.67623 6.65852 4.03804 6.65852 4.2612 6.88168L5.85714 8.47762L9.45142 4.88003Z",
|
|
427
|
+
fill: "#27AE60"
|
|
428
|
+
}));
|
|
429
|
+
};
|
|
430
|
+
|
|
431
|
+
SuccessIcon.defaultProps = {
|
|
432
|
+
width: 16,
|
|
433
|
+
height: 16
|
|
434
|
+
};
|
|
435
|
+
SuccessIcon.propTypes = {
|
|
436
|
+
width: PropTypes.number,
|
|
437
|
+
height: PropTypes.number
|
|
438
|
+
};
|
|
439
|
+
|
|
440
|
+
var _excluded$n = ["msg", "variant", "className"];
|
|
441
|
+
|
|
442
|
+
function InputMessage(props) {
|
|
443
|
+
var _messageRef$current2;
|
|
444
|
+
|
|
445
|
+
var msg = props.msg,
|
|
446
|
+
variant = props.variant,
|
|
447
|
+
className = props.className,
|
|
448
|
+
otherProps = _objectWithoutProperties(props, _excluded$n);
|
|
449
|
+
|
|
450
|
+
var messageRef = useRef(null);
|
|
451
|
+
|
|
452
|
+
var _useState = useState(32),
|
|
453
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
454
|
+
messageRefHeight = _useState2[0],
|
|
455
|
+
setMessageRefHeight = _useState2[1];
|
|
456
|
+
|
|
457
|
+
useEffect(function () {
|
|
458
|
+
var _messageRef$current;
|
|
459
|
+
|
|
460
|
+
setMessageRefHeight(messageRef === null || messageRef === void 0 ? void 0 : (_messageRef$current = messageRef.current) === null || _messageRef$current === void 0 ? void 0 : _messageRef$current.clientHeight);
|
|
461
|
+
}, [messageRef === null || messageRef === void 0 ? void 0 : (_messageRef$current2 = messageRef.current) === null || _messageRef$current2 === void 0 ? void 0 : _messageRef$current2.clientHeight]);
|
|
462
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
463
|
+
ref: messageRef,
|
|
464
|
+
className: classNames("KUI-InputMessage", "KUI-InputMessage_".concat(variant), className),
|
|
465
|
+
style: {
|
|
466
|
+
bottom: "-".concat(messageRefHeight, "px")
|
|
467
|
+
}
|
|
468
|
+
}, otherProps), /*#__PURE__*/React.createElement("div", {
|
|
469
|
+
className: "KUI-InputMessage_icon"
|
|
470
|
+
}, variant === "error" ? /*#__PURE__*/React.createElement(ErrorIcon, null) : variant === "warning" ? /*#__PURE__*/React.createElement(WarningIcon, null) : /*#__PURE__*/React.createElement(SuccessIcon, null)), /*#__PURE__*/React.createElement(Caption, {
|
|
471
|
+
className: "KUI-InputMessage_title",
|
|
472
|
+
size: "xs",
|
|
473
|
+
weight: 600
|
|
474
|
+
}, msg));
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
InputMessage.defaultProps = {
|
|
478
|
+
msg: "",
|
|
479
|
+
className: "",
|
|
480
|
+
variant: "error"
|
|
481
|
+
};
|
|
482
|
+
InputMessage.propTypes = {
|
|
483
|
+
msg: PropTypes.string,
|
|
484
|
+
className: PropTypes.string,
|
|
485
|
+
variant: PropTypes.oneOf(["error", "warning", "success"])
|
|
486
|
+
};
|
|
487
|
+
|
|
488
|
+
var TextareaGrabIcon = function TextareaGrabIcon(props) {
|
|
489
|
+
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
490
|
+
width: "9",
|
|
491
|
+
height: "8",
|
|
492
|
+
viewBox: "0 0 9 8",
|
|
493
|
+
fill: "none",
|
|
494
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
495
|
+
}, props), /*#__PURE__*/React.createElement("path", {
|
|
496
|
+
fillRule: "evenodd",
|
|
497
|
+
clipRule: "evenodd",
|
|
498
|
+
d: "M0.21967 7.80474C0.512563 8.06509 0.987437 8.06509 1.28033 7.80474L8.78033 1.13807C9.07322 0.877722 9.07322 0.455612 8.78033 0.195262C8.48744 -0.0650874 8.01256 -0.0650874 7.71967 0.195262L0.21967 6.86193C-0.0732233 7.12228 -0.0732233 7.54439 0.21967 7.80474ZM3.96957 7.80441C4.26246 8.06476 4.73734 8.06476 5.03023 7.80441L8.78021 4.47108C9.0731 4.21073 9.0731 3.78862 8.78021 3.52827C8.48732 3.26792 8.01245 3.26792 7.71956 3.52827L3.96957 6.8616C3.67668 7.12195 3.67668 7.54406 3.96957 7.80441Z",
|
|
499
|
+
fill: "#EAECEF"
|
|
500
|
+
}));
|
|
501
|
+
};
|
|
502
|
+
|
|
503
|
+
var _excluded$m = ["isTextArea", "inputRef", "className", "inputStyles", "labelStyles", "label", "startIcon", "endIcon", "messageClassName", "labelInlineStyles", "errorMessage", "inputValue", "type", "rows"];
|
|
504
|
+
|
|
505
|
+
function Input(props) {
|
|
506
|
+
var isTextArea = props.isTextArea,
|
|
507
|
+
inputRefProp = props.inputRef,
|
|
508
|
+
className = props.className,
|
|
509
|
+
inputStyles = props.inputStyles,
|
|
510
|
+
labelStyles = props.labelStyles,
|
|
511
|
+
label = props.label,
|
|
512
|
+
startIcon = props.startIcon,
|
|
513
|
+
endIcon = props.endIcon,
|
|
514
|
+
messageClassName = props.messageClassName,
|
|
515
|
+
labelInlineStyles = props.labelInlineStyles,
|
|
516
|
+
errorMessage = props.errorMessage,
|
|
517
|
+
inputValue = props.inputValue,
|
|
518
|
+
type = props.type,
|
|
519
|
+
rows = props.rows,
|
|
520
|
+
inputProps = _objectWithoutProperties(props, _excluded$m);
|
|
521
|
+
|
|
522
|
+
var _useState = useState(false),
|
|
523
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
524
|
+
isFilled = _useState2[0],
|
|
525
|
+
setIsFilled = _useState2[1];
|
|
526
|
+
|
|
527
|
+
var inputRef = useRef(null);
|
|
528
|
+
|
|
529
|
+
var forwardRef = function forwardRef(elem) {
|
|
530
|
+
if (inputRefProp) {
|
|
531
|
+
inputRefProp.current = elem;
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
inputRef.current = elem;
|
|
535
|
+
};
|
|
536
|
+
|
|
537
|
+
useEffect(function () {
|
|
538
|
+
var _inputRef$current;
|
|
539
|
+
|
|
540
|
+
if ((_inputRef$current = inputRef.current) !== null && _inputRef$current !== void 0 && _inputRef$current.value || inputValue) {
|
|
541
|
+
setIsFilled(true);
|
|
542
|
+
} else {
|
|
543
|
+
setIsFilled(false);
|
|
544
|
+
}
|
|
545
|
+
}, [inputRef]);
|
|
546
|
+
|
|
547
|
+
var handleChange = function handleChange(e) {
|
|
548
|
+
if (e.target.value) {
|
|
549
|
+
setIsFilled(true);
|
|
550
|
+
} else {
|
|
551
|
+
setIsFilled(false);
|
|
552
|
+
}
|
|
553
|
+
};
|
|
554
|
+
|
|
555
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
556
|
+
className: classNames("KUI-Input_container", !isTextArea && "KUI-Input_InputContainer", className)
|
|
557
|
+
}, startIcon && startIcon, isTextArea ? /*#__PURE__*/React.createElement("textarea", _extends({
|
|
558
|
+
ref: forwardRef,
|
|
559
|
+
value: inputValue,
|
|
560
|
+
rows: rows,
|
|
561
|
+
onInput: handleChange,
|
|
562
|
+
className: classNames("KUI-Input", "KUI-Textarea", inputStyles, !!errorMessage && "KUI-Input_invalid")
|
|
563
|
+
}, inputProps)) : /*#__PURE__*/React.createElement("input", _extends({
|
|
564
|
+
ref: forwardRef,
|
|
565
|
+
value: inputValue,
|
|
566
|
+
type: type,
|
|
567
|
+
onInput: handleChange,
|
|
568
|
+
className: classNames("KUI-Input", inputStyles, !!errorMessage && "KUI-Input_invalid")
|
|
569
|
+
}, inputProps)), /*#__PURE__*/React.createElement(Caption, {
|
|
570
|
+
size: "s",
|
|
571
|
+
color: "gray50",
|
|
572
|
+
className: classNames("KUI-Input_label", isFilled && "KUI-Input_label-active", labelStyles),
|
|
573
|
+
style: labelInlineStyles
|
|
574
|
+
}, label), isTextArea && /*#__PURE__*/React.createElement(TextareaGrabIcon, {
|
|
575
|
+
className: "KUI-Textarea_icon"
|
|
576
|
+
}), endIcon && endIcon, !!errorMessage && /*#__PURE__*/React.createElement(InputMessage, {
|
|
577
|
+
msg: errorMessage,
|
|
578
|
+
className: messageClassName
|
|
579
|
+
}));
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
Input.defaultProps = {
|
|
583
|
+
disabled: false,
|
|
584
|
+
isTextArea: false,
|
|
585
|
+
label: "",
|
|
586
|
+
errorMessage: "",
|
|
587
|
+
rows: 4,
|
|
588
|
+
type: "text"
|
|
589
|
+
};
|
|
590
|
+
Input.propTypes = {
|
|
591
|
+
disabled: PropTypes.bool,
|
|
592
|
+
isTextArea: PropTypes.bool,
|
|
593
|
+
label: PropTypes.string,
|
|
594
|
+
errorMessage: PropTypes.string,
|
|
595
|
+
rows: PropTypes.number,
|
|
596
|
+
type: PropTypes.oneOf(["text", "number", "password", "phone", "email", "phone"])
|
|
597
|
+
};
|
|
598
|
+
Input.displayName = "Input";
|
|
599
|
+
|
|
600
|
+
var _excluded$l = ["cornerLabel", "startIcon", "endIcon"];
|
|
601
|
+
var InputWithAdornments = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
602
|
+
var _startIconRef$current2, _endIconRef$current2;
|
|
603
|
+
|
|
604
|
+
var cornerLabel = props.cornerLabel,
|
|
605
|
+
startIcon = props.startIcon,
|
|
606
|
+
endIcon = props.endIcon,
|
|
607
|
+
inputProps = _objectWithoutProperties(props, _excluded$l);
|
|
608
|
+
|
|
609
|
+
var startIconRef = useRef(null);
|
|
610
|
+
var endIconRef = useRef(null);
|
|
611
|
+
|
|
612
|
+
var _useState = useState(0),
|
|
613
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
614
|
+
startIconWidth = _useState2[0],
|
|
615
|
+
setStartIconWidth = _useState2[1];
|
|
616
|
+
|
|
617
|
+
var _useState3 = useState(0),
|
|
618
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
619
|
+
endIconWidth = _useState4[0],
|
|
620
|
+
setEndIconWidth = _useState4[1];
|
|
621
|
+
|
|
622
|
+
var inputStyle = {
|
|
623
|
+
paddingLeft: startIconWidth > 0 ? (startIconWidth + 20) * (16 / 14) : 16,
|
|
624
|
+
paddingRight: endIconWidth > 0 ? endIconWidth + 24 : 8
|
|
625
|
+
};
|
|
626
|
+
var labelStyle = {
|
|
627
|
+
left: startIconWidth > 0 ? startIconWidth + 22 : 16
|
|
628
|
+
};
|
|
629
|
+
useEffect(function () {
|
|
630
|
+
var _startIconRef$current;
|
|
631
|
+
|
|
632
|
+
setStartIconWidth(startIconRef === null || startIconRef === void 0 ? void 0 : (_startIconRef$current = startIconRef.current) === null || _startIconRef$current === void 0 ? void 0 : _startIconRef$current.clientWidth);
|
|
633
|
+
}, [startIconRef === null || startIconRef === void 0 ? void 0 : (_startIconRef$current2 = startIconRef.current) === null || _startIconRef$current2 === void 0 ? void 0 : _startIconRef$current2.clientWidth]);
|
|
634
|
+
useEffect(function () {
|
|
635
|
+
var _endIconRef$current;
|
|
636
|
+
|
|
637
|
+
setEndIconWidth(endIconRef === null || endIconRef === void 0 ? void 0 : (_endIconRef$current = endIconRef.current) === null || _endIconRef$current === void 0 ? void 0 : _endIconRef$current.clientWidth);
|
|
638
|
+
}, [endIconRef === null || endIconRef === void 0 ? void 0 : (_endIconRef$current2 = endIconRef.current) === null || _endIconRef$current2 === void 0 ? void 0 : _endIconRef$current2.clientWidth]);
|
|
639
|
+
return /*#__PURE__*/React.createElement(Input, _extends({
|
|
640
|
+
ref: ref,
|
|
641
|
+
startIcon: startIcon && /*#__PURE__*/React.createElement("div", {
|
|
642
|
+
ref: startIconRef,
|
|
643
|
+
className: "KUI-InputAdornment_start-icon"
|
|
644
|
+
}, startIcon),
|
|
645
|
+
endIcon: (endIcon || cornerLabel) && /*#__PURE__*/React.createElement("div", {
|
|
646
|
+
ref: endIconRef,
|
|
647
|
+
className: classNames("KUI-InputAdornment_end-icon", cornerLabel && "KUI-InputAdornment_corner-label")
|
|
648
|
+
}, cornerLabel ? /*#__PURE__*/React.createElement(Caption, {
|
|
649
|
+
size: "s",
|
|
650
|
+
weight: 500,
|
|
651
|
+
color: "gray50"
|
|
652
|
+
}, cornerLabel) : endIcon),
|
|
653
|
+
style: inputStyle,
|
|
654
|
+
labelInlineStyles: labelStyle
|
|
655
|
+
}, inputProps));
|
|
656
|
+
});
|
|
657
|
+
InputWithAdornments.defaultProps = {
|
|
658
|
+
cornerLabel: null,
|
|
659
|
+
startIcon: null,
|
|
660
|
+
endIcon: null
|
|
661
|
+
};
|
|
662
|
+
InputWithAdornments.propTypes = {
|
|
663
|
+
label: PropTypes.string,
|
|
664
|
+
errorMessage: PropTypes.string,
|
|
665
|
+
cornerLabel: PropTypes.string,
|
|
666
|
+
disabled: PropTypes.bool,
|
|
667
|
+
startIcon: PropTypes.element,
|
|
668
|
+
endIcon: PropTypes.element,
|
|
669
|
+
type: PropTypes.oneOf(["text", "number", "password"])
|
|
670
|
+
};
|
|
671
|
+
InputWithAdornments.displayName = "InputWithAdornments";
|
|
672
|
+
|
|
673
|
+
var _excluded$k = ["mask", "defaultValue", "onChange", "onBlur", "disabled"];
|
|
674
|
+
var InputWithMask = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
675
|
+
var mask = _ref.mask,
|
|
676
|
+
defaultValue = _ref.defaultValue,
|
|
677
|
+
onChange = _ref.onChange,
|
|
678
|
+
onBlur = _ref.onBlur,
|
|
679
|
+
disabled = _ref.disabled,
|
|
680
|
+
otherProps = _objectWithoutProperties(_ref, _excluded$k);
|
|
681
|
+
|
|
682
|
+
var _useState = useState(defaultValue),
|
|
683
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
684
|
+
value = _useState2[0],
|
|
685
|
+
setValue = _useState2[1];
|
|
686
|
+
|
|
687
|
+
var handleChange = function handleChange(e) {
|
|
688
|
+
setValue(e.target.value);
|
|
689
|
+
|
|
690
|
+
if (onChange) {
|
|
691
|
+
onChange(e);
|
|
692
|
+
}
|
|
693
|
+
};
|
|
694
|
+
|
|
695
|
+
useEffect(function () {
|
|
696
|
+
setValue(defaultValue);
|
|
697
|
+
}, [defaultValue]);
|
|
698
|
+
return /*#__PURE__*/React.createElement(InputMask, {
|
|
699
|
+
maskPlaceholder: null,
|
|
700
|
+
mask: mask,
|
|
701
|
+
alwaysShowMask: false,
|
|
702
|
+
disabled: disabled,
|
|
703
|
+
onChange: handleChange,
|
|
704
|
+
onBlur: onBlur
|
|
705
|
+
}, function () {
|
|
706
|
+
return /*#__PURE__*/React.createElement(InputWithAdornments, _extends({
|
|
707
|
+
disabled: disabled,
|
|
708
|
+
inputValue: value,
|
|
709
|
+
ref: ref
|
|
710
|
+
}, otherProps));
|
|
711
|
+
});
|
|
712
|
+
});
|
|
713
|
+
InputWithMask.displayName = "InputWithMask";
|
|
714
|
+
InputWithMask.propTypes = {
|
|
715
|
+
label: PropTypes.string,
|
|
716
|
+
errorMessage: PropTypes.string,
|
|
717
|
+
cornerLabel: PropTypes.string,
|
|
718
|
+
disabled: PropTypes.bool,
|
|
719
|
+
startIcon: PropTypes.element,
|
|
720
|
+
endIcon: PropTypes.element,
|
|
721
|
+
mask: PropTypes.string
|
|
722
|
+
};
|
|
723
|
+
|
|
724
|
+
var countries = [
|
|
725
|
+
{
|
|
726
|
+
name: "Afghanistan (افغانستان)",
|
|
727
|
+
nameCode: "af",
|
|
728
|
+
nameRus: "Афганистан",
|
|
729
|
+
phoneCode: "93",
|
|
730
|
+
mask: "-99-999-9999"
|
|
731
|
+
},
|
|
732
|
+
{
|
|
733
|
+
name: "Albania (Shqipëri)",
|
|
734
|
+
nameCode: "al",
|
|
735
|
+
nameRus: "Албания",
|
|
736
|
+
phoneCode: "355",
|
|
737
|
+
mask: "(999)999-999"
|
|
738
|
+
},
|
|
739
|
+
{
|
|
740
|
+
name: "Algeria (الجزائر)",
|
|
741
|
+
nameCode: "dz",
|
|
742
|
+
nameRus: "Алжир",
|
|
743
|
+
phoneCode: "213",
|
|
744
|
+
mask: "-99-999-9999"
|
|
745
|
+
},
|
|
746
|
+
{
|
|
747
|
+
name: "American Samoa",
|
|
748
|
+
nameCode: "as",
|
|
749
|
+
nameRus: "Американское Самоа",
|
|
750
|
+
phoneCode: "1684",
|
|
751
|
+
mask: "9)999-9999"
|
|
752
|
+
},
|
|
753
|
+
{
|
|
754
|
+
name: "Andorra",
|
|
755
|
+
nameCode: "ad",
|
|
756
|
+
nameRus: "Андорра",
|
|
757
|
+
phoneCode: "376",
|
|
758
|
+
mask: "-999-999"
|
|
759
|
+
},
|
|
760
|
+
{
|
|
761
|
+
name: "Angola",
|
|
762
|
+
nameCode: "ao",
|
|
763
|
+
nameRus: "Ангола",
|
|
764
|
+
phoneCode: "244",
|
|
765
|
+
mask: "(999)999-999"
|
|
766
|
+
},
|
|
767
|
+
{
|
|
768
|
+
name: "Anguilla",
|
|
769
|
+
nameCode: "ai",
|
|
770
|
+
nameRus: "Ангилья",
|
|
771
|
+
phoneCode: "1264",
|
|
772
|
+
mask: "9)999-9999"
|
|
773
|
+
},
|
|
774
|
+
{
|
|
775
|
+
name: "Antigua and Barbuda",
|
|
776
|
+
nameCode: "ag",
|
|
777
|
+
nameRus: "Антигуа и Барбуда",
|
|
778
|
+
phoneCode: "1268",
|
|
779
|
+
mask: "9)999-9999"
|
|
780
|
+
},
|
|
781
|
+
{
|
|
782
|
+
name: "Argentina",
|
|
783
|
+
nameCode: "ar",
|
|
784
|
+
nameRus: "Аргентина",
|
|
785
|
+
phoneCode: "54",
|
|
786
|
+
mask: "(999)999-9999"
|
|
787
|
+
},
|
|
788
|
+
{
|
|
789
|
+
name: "Armenia (Հայաստան)",
|
|
790
|
+
nameCode: "am",
|
|
791
|
+
nameRus: "Армения",
|
|
792
|
+
phoneCode: "374",
|
|
793
|
+
mask: "-99-999-999"
|
|
794
|
+
},
|
|
795
|
+
{
|
|
796
|
+
name: "Aruba",
|
|
797
|
+
nameCode: "aw",
|
|
798
|
+
nameRus: "Аруба",
|
|
799
|
+
phoneCode: "297",
|
|
800
|
+
mask: "-999-9999"
|
|
801
|
+
},
|
|
802
|
+
{
|
|
803
|
+
name: "Australia",
|
|
804
|
+
nameCode: "au",
|
|
805
|
+
nameRus: "Австралия",
|
|
806
|
+
phoneCode: "61",
|
|
807
|
+
mask: "999999999"
|
|
808
|
+
},
|
|
809
|
+
{
|
|
810
|
+
name: "Austria (Österreich)",
|
|
811
|
+
nameCode: "at",
|
|
812
|
+
nameRus: "Австрия",
|
|
813
|
+
phoneCode: "43",
|
|
814
|
+
mask: "(999)999-9999"
|
|
815
|
+
},
|
|
816
|
+
{
|
|
817
|
+
name: "Azerbaijan (Azərbaycan)",
|
|
818
|
+
nameCode: "az",
|
|
819
|
+
nameRus: "Азербайджан",
|
|
820
|
+
phoneCode: "994",
|
|
821
|
+
mask: "-99-999-99-99"
|
|
822
|
+
},
|
|
823
|
+
{
|
|
824
|
+
name: "Bahamas",
|
|
825
|
+
nameCode: "bs",
|
|
826
|
+
nameRus: "Багамы",
|
|
827
|
+
phoneCode: "1242",
|
|
828
|
+
mask: "9)999-9999"
|
|
829
|
+
},
|
|
830
|
+
{
|
|
831
|
+
name: "Bahrain (البحرين)",
|
|
832
|
+
nameCode: "bh",
|
|
833
|
+
nameRus: "Бахрейн",
|
|
834
|
+
phoneCode: "973",
|
|
835
|
+
mask: "-9999-9999"
|
|
836
|
+
},
|
|
837
|
+
{
|
|
838
|
+
name: "Bangladesh (বাংলাদেশ)",
|
|
839
|
+
nameCode: "bd",
|
|
840
|
+
nameRus: "Бангладеш",
|
|
841
|
+
phoneCode: "880",
|
|
842
|
+
mask: "-99-999-999"
|
|
843
|
+
},
|
|
844
|
+
{
|
|
845
|
+
name: "Barbados",
|
|
846
|
+
nameCode: "bb",
|
|
847
|
+
nameRus: "Барбадос",
|
|
848
|
+
phoneCode: "1246",
|
|
849
|
+
mask: "9)999-9999"
|
|
850
|
+
},
|
|
851
|
+
{
|
|
852
|
+
name: "Belarus (Беларусь)",
|
|
853
|
+
nameCode: "by",
|
|
854
|
+
nameRus: "Беларусь",
|
|
855
|
+
phoneCode: "375",
|
|
856
|
+
mask: "(99)999-99-99"
|
|
857
|
+
},
|
|
858
|
+
{
|
|
859
|
+
name: "Belgium (België)",
|
|
860
|
+
nameCode: "be",
|
|
861
|
+
nameRus: "Бельгия",
|
|
862
|
+
phoneCode: "32",
|
|
863
|
+
mask: "999999999"
|
|
864
|
+
},
|
|
865
|
+
{
|
|
866
|
+
name: "Belize",
|
|
867
|
+
nameCode: "bz",
|
|
868
|
+
nameRus: "Белиз",
|
|
869
|
+
phoneCode: "501",
|
|
870
|
+
mask: "-999-9999"
|
|
871
|
+
},
|
|
872
|
+
{
|
|
873
|
+
name: "Benin (Bénin)",
|
|
874
|
+
nameCode: "bj",
|
|
875
|
+
nameRus: "Бенин",
|
|
876
|
+
phoneCode: "229",
|
|
877
|
+
mask: "-99-99-9999"
|
|
878
|
+
},
|
|
879
|
+
{
|
|
880
|
+
name: "Bermuda",
|
|
881
|
+
nameCode: "bm",
|
|
882
|
+
nameRus: "Бермудские о-ва",
|
|
883
|
+
phoneCode: "1441",
|
|
884
|
+
mask: "9)999-9999"
|
|
885
|
+
},
|
|
886
|
+
{
|
|
887
|
+
name: "Bhutan (འབྲུག)",
|
|
888
|
+
nameCode: "bt",
|
|
889
|
+
nameRus: "Бутан",
|
|
890
|
+
phoneCode: "975",
|
|
891
|
+
mask: "-9-999-999"
|
|
892
|
+
},
|
|
893
|
+
{
|
|
894
|
+
name: "Bolivia",
|
|
895
|
+
nameCode: "bo",
|
|
896
|
+
nameRus: "Боливия",
|
|
897
|
+
phoneCode: "591",
|
|
898
|
+
mask: "-9-999-9999"
|
|
899
|
+
},
|
|
900
|
+
{
|
|
901
|
+
name: "Bosnia and Herzegovina (Босна и Херцеговина)",
|
|
902
|
+
nameCode: "ba",
|
|
903
|
+
nameRus: "Босния и Герцеговина",
|
|
904
|
+
phoneCode: "387",
|
|
905
|
+
mask: "-99-9999"
|
|
906
|
+
},
|
|
907
|
+
{
|
|
908
|
+
name: "Botswana",
|
|
909
|
+
nameCode: "bw",
|
|
910
|
+
nameRus: "Ботсвана",
|
|
911
|
+
phoneCode: "267",
|
|
912
|
+
mask: "-99-999-999"
|
|
913
|
+
},
|
|
914
|
+
{
|
|
915
|
+
name: "Brazil (Brasil)",
|
|
916
|
+
nameCode: "br",
|
|
917
|
+
nameRus: "Бразилия",
|
|
918
|
+
phoneCode: "55",
|
|
919
|
+
mask: "-99-9999-9999"
|
|
920
|
+
},
|
|
921
|
+
{
|
|
922
|
+
name: "British Indian Ocean Territory",
|
|
923
|
+
nameCode: "io",
|
|
924
|
+
nameRus: "Британская территория в Индийском океане",
|
|
925
|
+
phoneCode: "246",
|
|
926
|
+
mask: "-999-9999"
|
|
927
|
+
},
|
|
928
|
+
{
|
|
929
|
+
name: "British Virgin Islands",
|
|
930
|
+
nameCode: "vg",
|
|
931
|
+
nameRus: "Виргинские о-ва (Великобритания)",
|
|
932
|
+
phoneCode: "1284",
|
|
933
|
+
mask: "9)999-9999"
|
|
934
|
+
},
|
|
935
|
+
{
|
|
936
|
+
name: "Brunei",
|
|
937
|
+
nameCode: "bn",
|
|
938
|
+
nameRus: "Бруней-Даруссалам",
|
|
939
|
+
phoneCode: "673",
|
|
940
|
+
mask: "-999-9999"
|
|
941
|
+
},
|
|
942
|
+
{
|
|
943
|
+
name: "Bulgaria (България)",
|
|
944
|
+
nameCode: "bg",
|
|
945
|
+
nameRus: "Болгария",
|
|
946
|
+
phoneCode: "359",
|
|
947
|
+
mask: "(999)999-999"
|
|
948
|
+
},
|
|
949
|
+
{
|
|
950
|
+
name: "Burkina Faso",
|
|
951
|
+
nameCode: "bf",
|
|
952
|
+
nameRus: "Буркина-Фасо",
|
|
953
|
+
phoneCode: "226",
|
|
954
|
+
mask: "-99-99-9999"
|
|
955
|
+
},
|
|
956
|
+
{
|
|
957
|
+
name: "Burundi (Uburundi)",
|
|
958
|
+
nameCode: "bi",
|
|
959
|
+
nameRus: "Бурунди",
|
|
960
|
+
phoneCode: "257",
|
|
961
|
+
mask: "-99-99-9999"
|
|
962
|
+
},
|
|
963
|
+
{
|
|
964
|
+
name: "Cambodia (កម្ពុជា)",
|
|
965
|
+
nameCode: "kh",
|
|
966
|
+
nameRus: "Камбоджа",
|
|
967
|
+
phoneCode: "855",
|
|
968
|
+
mask: "-99-999-999"
|
|
969
|
+
},
|
|
970
|
+
{
|
|
971
|
+
name: "Cameroon (Cameroun)",
|
|
972
|
+
nameCode: "cm",
|
|
973
|
+
nameRus: "Камерун",
|
|
974
|
+
phoneCode: "237",
|
|
975
|
+
mask: "-9999-9999"
|
|
976
|
+
},
|
|
977
|
+
{
|
|
978
|
+
name: "Canada",
|
|
979
|
+
nameCode: "ca",
|
|
980
|
+
nameRus: "Канада",
|
|
981
|
+
phoneCode: "1",
|
|
982
|
+
mask: "(999)999-9999"
|
|
983
|
+
},
|
|
984
|
+
{
|
|
985
|
+
name: "Cape Verde (Kabu Verdi)",
|
|
986
|
+
nameCode: "cv",
|
|
987
|
+
nameRus: "Кабо-Верде",
|
|
988
|
+
phoneCode: "238",
|
|
989
|
+
mask: "(999)99-99"
|
|
990
|
+
},
|
|
991
|
+
{
|
|
992
|
+
name: "Caribbean Netherlands",
|
|
993
|
+
nameCode: "bq",
|
|
994
|
+
nameRus: "Бонэйр, Синт-Эстатиус и Саба",
|
|
995
|
+
phoneCode: "599",
|
|
996
|
+
mask: "-999-9999"
|
|
997
|
+
},
|
|
998
|
+
{
|
|
999
|
+
name: "Cayman Islands",
|
|
1000
|
+
nameCode: "ky",
|
|
1001
|
+
nameRus: "Острова Кайман",
|
|
1002
|
+
phoneCode: "1345",
|
|
1003
|
+
mask: "9)999-9999"
|
|
1004
|
+
},
|
|
1005
|
+
{
|
|
1006
|
+
name: "Central African Republic (République centrafricaine)",
|
|
1007
|
+
nameCode: "cf",
|
|
1008
|
+
nameRus: "Центрально-Африканская Республика",
|
|
1009
|
+
phoneCode: "236",
|
|
1010
|
+
mask: "-99-99-9999"
|
|
1011
|
+
},
|
|
1012
|
+
{
|
|
1013
|
+
name: "Chad (Tchad)",
|
|
1014
|
+
nameCode: "td",
|
|
1015
|
+
nameRus: "Чад",
|
|
1016
|
+
phoneCode: "235",
|
|
1017
|
+
mask: "-99-99-99-99"
|
|
1018
|
+
},
|
|
1019
|
+
{
|
|
1020
|
+
name: "Chile",
|
|
1021
|
+
nameCode: "cl",
|
|
1022
|
+
nameRus: "Чили",
|
|
1023
|
+
phoneCode: "56",
|
|
1024
|
+
mask: "-9-9999-9999"
|
|
1025
|
+
},
|
|
1026
|
+
{
|
|
1027
|
+
name: "China (中国)",
|
|
1028
|
+
nameCode: "cn",
|
|
1029
|
+
nameRus: "Китай",
|
|
1030
|
+
phoneCode: "86",
|
|
1031
|
+
mask: "99-99999999"
|
|
1032
|
+
},
|
|
1033
|
+
{
|
|
1034
|
+
name: "Colombia",
|
|
1035
|
+
nameCode: "co",
|
|
1036
|
+
nameRus: "Колумбия",
|
|
1037
|
+
phoneCode: "57",
|
|
1038
|
+
mask: "(999)999-9999"
|
|
1039
|
+
},
|
|
1040
|
+
{
|
|
1041
|
+
name: "Comoros (جزر القمر)",
|
|
1042
|
+
nameCode: "km",
|
|
1043
|
+
nameRus: "Коморы",
|
|
1044
|
+
phoneCode: "269",
|
|
1045
|
+
mask: "-99-99999"
|
|
1046
|
+
},
|
|
1047
|
+
{
|
|
1048
|
+
name: "Congo (DRC) (Jamhuri ya Kidemokrasia ya Kongo)",
|
|
1049
|
+
nameCode: "cd",
|
|
1050
|
+
nameRus: "Конго - Киншаса",
|
|
1051
|
+
phoneCode: "243",
|
|
1052
|
+
mask: "(999)999-999"
|
|
1053
|
+
},
|
|
1054
|
+
{
|
|
1055
|
+
name: "Congo (Republic) (Congo-Brazzaville)",
|
|
1056
|
+
nameCode: "cg",
|
|
1057
|
+
nameRus: "Конго - Браззавиль",
|
|
1058
|
+
phoneCode: "242",
|
|
1059
|
+
mask: "-99-999-9999"
|
|
1060
|
+
},
|
|
1061
|
+
{
|
|
1062
|
+
name: "Cook Islands",
|
|
1063
|
+
nameCode: "ck",
|
|
1064
|
+
nameRus: "Острова Кука",
|
|
1065
|
+
phoneCode: "682",
|
|
1066
|
+
mask: "-99-999"
|
|
1067
|
+
},
|
|
1068
|
+
{
|
|
1069
|
+
name: "Costa Rica",
|
|
1070
|
+
nameCode: "cr",
|
|
1071
|
+
nameRus: "Коста-Рика",
|
|
1072
|
+
phoneCode: "506",
|
|
1073
|
+
mask: "9999-9999"
|
|
1074
|
+
},
|
|
1075
|
+
{
|
|
1076
|
+
name: "Côte d’Ivoire",
|
|
1077
|
+
nameCode: "ci",
|
|
1078
|
+
nameRus: "Кот-д’Ивуар",
|
|
1079
|
+
phoneCode: "225",
|
|
1080
|
+
mask: "-99-999-999"
|
|
1081
|
+
},
|
|
1082
|
+
{
|
|
1083
|
+
name: "Croatia (Hrvatska)",
|
|
1084
|
+
nameCode: "hr",
|
|
1085
|
+
nameRus: "Хорватия",
|
|
1086
|
+
phoneCode: "385",
|
|
1087
|
+
mask: "-99-999-999"
|
|
1088
|
+
},
|
|
1089
|
+
{
|
|
1090
|
+
name: "Cuba",
|
|
1091
|
+
nameCode: "cu",
|
|
1092
|
+
nameRus: "Куба",
|
|
1093
|
+
phoneCode: "53",
|
|
1094
|
+
mask: "-9-999-9999"
|
|
1095
|
+
},
|
|
1096
|
+
{
|
|
1097
|
+
name: "Curaçao",
|
|
1098
|
+
nameCode: "cw",
|
|
1099
|
+
nameRus: "Кюрасао",
|
|
1100
|
+
phoneCode: "599",
|
|
1101
|
+
mask: "-999-9999"
|
|
1102
|
+
},
|
|
1103
|
+
{
|
|
1104
|
+
name: "Cyprus (Κύπρος)",
|
|
1105
|
+
nameCode: "cy",
|
|
1106
|
+
nameRus: "Кипр",
|
|
1107
|
+
phoneCode: "357",
|
|
1108
|
+
mask: "-99-999-999"
|
|
1109
|
+
},
|
|
1110
|
+
{
|
|
1111
|
+
name: "Czech Republic (Česká republika)",
|
|
1112
|
+
nameCode: "cz",
|
|
1113
|
+
nameRus: "Чехия",
|
|
1114
|
+
phoneCode: "420",
|
|
1115
|
+
mask: "(999)999-999"
|
|
1116
|
+
},
|
|
1117
|
+
{
|
|
1118
|
+
name: "Denmark (Danmark)",
|
|
1119
|
+
nameCode: "dk",
|
|
1120
|
+
nameRus: "Дания",
|
|
1121
|
+
phoneCode: "45",
|
|
1122
|
+
mask: "99999999"
|
|
1123
|
+
},
|
|
1124
|
+
{
|
|
1125
|
+
name: "Djibouti",
|
|
1126
|
+
nameCode: "dj",
|
|
1127
|
+
nameRus: "Джибути",
|
|
1128
|
+
phoneCode: "253",
|
|
1129
|
+
mask: "-99-99-99-99"
|
|
1130
|
+
},
|
|
1131
|
+
{
|
|
1132
|
+
name: "Dominica",
|
|
1133
|
+
nameCode: "dm",
|
|
1134
|
+
nameRus: "Доминика",
|
|
1135
|
+
phoneCode: "1767",
|
|
1136
|
+
mask: "9)999-9999"
|
|
1137
|
+
},
|
|
1138
|
+
{
|
|
1139
|
+
name: "Dominican Republic (República Dominicana)",
|
|
1140
|
+
nameCode: "do",
|
|
1141
|
+
nameRus: "Доминиканская Республика",
|
|
1142
|
+
phoneCode: "1",
|
|
1143
|
+
mask: "(999)999-9999"
|
|
1144
|
+
},
|
|
1145
|
+
{
|
|
1146
|
+
name: "Ecuador",
|
|
1147
|
+
nameCode: "ec",
|
|
1148
|
+
nameRus: "Эквадор",
|
|
1149
|
+
phoneCode: "593",
|
|
1150
|
+
mask: "-9-999-9999"
|
|
1151
|
+
},
|
|
1152
|
+
{
|
|
1153
|
+
name: "Egypt (مصر)",
|
|
1154
|
+
nameCode: "eg",
|
|
1155
|
+
nameRus: "Египет",
|
|
1156
|
+
phoneCode: "20",
|
|
1157
|
+
mask: "(999)999-9999"
|
|
1158
|
+
},
|
|
1159
|
+
{
|
|
1160
|
+
name: "El Salvador",
|
|
1161
|
+
nameCode: "sv",
|
|
1162
|
+
nameRus: "Сальвадор",
|
|
1163
|
+
phoneCode: "503",
|
|
1164
|
+
mask: "9999-9999"
|
|
1165
|
+
},
|
|
1166
|
+
{
|
|
1167
|
+
name: "Equatorial Guinea (Guinea Ecuatorial)",
|
|
1168
|
+
nameCode: "gq",
|
|
1169
|
+
nameRus: "Экваториальная Гвинея",
|
|
1170
|
+
phoneCode: "240",
|
|
1171
|
+
mask: "-99-999-9999"
|
|
1172
|
+
},
|
|
1173
|
+
{
|
|
1174
|
+
name: "Eritrea",
|
|
1175
|
+
nameCode: "er",
|
|
1176
|
+
nameRus: "Эритрея",
|
|
1177
|
+
phoneCode: "291",
|
|
1178
|
+
mask: "-9-999-999"
|
|
1179
|
+
},
|
|
1180
|
+
{
|
|
1181
|
+
name: "Estonia (Eesti)",
|
|
1182
|
+
nameCode: "ee",
|
|
1183
|
+
nameRus: "Эстония",
|
|
1184
|
+
phoneCode: "372",
|
|
1185
|
+
mask: "-999-9999"
|
|
1186
|
+
},
|
|
1187
|
+
{
|
|
1188
|
+
name: "Ethiopia",
|
|
1189
|
+
nameCode: "et",
|
|
1190
|
+
nameRus: "Эфиопия",
|
|
1191
|
+
phoneCode: "251",
|
|
1192
|
+
mask: "-99-999-9999"
|
|
1193
|
+
},
|
|
1194
|
+
{
|
|
1195
|
+
name: "Falkland Islands (Islas Malvinas)",
|
|
1196
|
+
nameCode: "fk",
|
|
1197
|
+
nameRus: "Фолклендские о-ва",
|
|
1198
|
+
phoneCode: "500",
|
|
1199
|
+
mask: "-99999"
|
|
1200
|
+
},
|
|
1201
|
+
{
|
|
1202
|
+
name: "Faroe Islands (Føroyar)",
|
|
1203
|
+
nameCode: "fo",
|
|
1204
|
+
nameRus: "Фарерские о-ва",
|
|
1205
|
+
phoneCode: "298",
|
|
1206
|
+
mask: "-999-999"
|
|
1207
|
+
},
|
|
1208
|
+
{
|
|
1209
|
+
name: "Fiji",
|
|
1210
|
+
nameCode: "fj",
|
|
1211
|
+
nameRus: "Фиджи",
|
|
1212
|
+
phoneCode: "679",
|
|
1213
|
+
mask: "-99-99999"
|
|
1214
|
+
},
|
|
1215
|
+
{
|
|
1216
|
+
name: "Finland (Suomi)",
|
|
1217
|
+
nameCode: "fi",
|
|
1218
|
+
nameRus: "Финляндия",
|
|
1219
|
+
phoneCode: "358",
|
|
1220
|
+
mask: "9999999999"
|
|
1221
|
+
},
|
|
1222
|
+
{
|
|
1223
|
+
name: "France",
|
|
1224
|
+
nameCode: "fr",
|
|
1225
|
+
nameRus: "Франция",
|
|
1226
|
+
phoneCode: "33",
|
|
1227
|
+
mask: "999999999"
|
|
1228
|
+
},
|
|
1229
|
+
{
|
|
1230
|
+
name: "French Guiana (Guyane française)",
|
|
1231
|
+
nameCode: "gf",
|
|
1232
|
+
nameRus: "Французская Гвиана",
|
|
1233
|
+
phoneCode: "594",
|
|
1234
|
+
mask: "-99999-9999"
|
|
1235
|
+
},
|
|
1236
|
+
{
|
|
1237
|
+
name: "French Polynesia (Polynésie française)",
|
|
1238
|
+
nameCode: "pf",
|
|
1239
|
+
nameRus: "Французская Полинезия",
|
|
1240
|
+
phoneCode: "689",
|
|
1241
|
+
mask: "-99-99-99"
|
|
1242
|
+
},
|
|
1243
|
+
{
|
|
1244
|
+
name: "Gabon",
|
|
1245
|
+
nameCode: "ga",
|
|
1246
|
+
nameRus: "Габон",
|
|
1247
|
+
phoneCode: "241",
|
|
1248
|
+
mask: "-9-99-99-99"
|
|
1249
|
+
},
|
|
1250
|
+
{
|
|
1251
|
+
name: "Gambia",
|
|
1252
|
+
nameCode: "gm",
|
|
1253
|
+
nameRus: "Гамбия",
|
|
1254
|
+
phoneCode: "220",
|
|
1255
|
+
mask: "(999)99-99"
|
|
1256
|
+
},
|
|
1257
|
+
{
|
|
1258
|
+
name: "Georgia (საქართველო)",
|
|
1259
|
+
nameCode: "ge",
|
|
1260
|
+
nameRus: "Грузия",
|
|
1261
|
+
phoneCode: "995",
|
|
1262
|
+
mask: "(999)999-999"
|
|
1263
|
+
},
|
|
1264
|
+
{
|
|
1265
|
+
name: "Germany (Deutschland)",
|
|
1266
|
+
nameCode: "de",
|
|
1267
|
+
nameRus: "Германия",
|
|
1268
|
+
phoneCode: "49",
|
|
1269
|
+
mask: "9999999999"
|
|
1270
|
+
},
|
|
1271
|
+
{
|
|
1272
|
+
name: "Ghana (Gaana)",
|
|
1273
|
+
nameCode: "gh",
|
|
1274
|
+
nameRus: "Гана",
|
|
1275
|
+
phoneCode: "233",
|
|
1276
|
+
mask: "(999)999-999"
|
|
1277
|
+
},
|
|
1278
|
+
{
|
|
1279
|
+
name: "Gibraltar",
|
|
1280
|
+
nameCode: "gi",
|
|
1281
|
+
nameRus: "Гибралтар",
|
|
1282
|
+
phoneCode: "350",
|
|
1283
|
+
mask: "-999-99999"
|
|
1284
|
+
},
|
|
1285
|
+
{
|
|
1286
|
+
name: "Greece (Ελλάδα)",
|
|
1287
|
+
nameCode: "gr",
|
|
1288
|
+
nameRus: "Греция",
|
|
1289
|
+
phoneCode: "30",
|
|
1290
|
+
mask: "(999)999-9999"
|
|
1291
|
+
},
|
|
1292
|
+
{
|
|
1293
|
+
name: "Greenland (Kalaallit Nunaat)",
|
|
1294
|
+
nameCode: "gl",
|
|
1295
|
+
nameRus: "Гренландия",
|
|
1296
|
+
phoneCode: "299",
|
|
1297
|
+
mask: "-99-99-99"
|
|
1298
|
+
},
|
|
1299
|
+
{
|
|
1300
|
+
name: "Grenada",
|
|
1301
|
+
nameCode: "gd",
|
|
1302
|
+
nameRus: "Гренада",
|
|
1303
|
+
phoneCode: "1473",
|
|
1304
|
+
mask: "9)999-9999"
|
|
1305
|
+
},
|
|
1306
|
+
{
|
|
1307
|
+
name: "Guam",
|
|
1308
|
+
nameCode: "gu",
|
|
1309
|
+
nameRus: "Гуам",
|
|
1310
|
+
phoneCode: "1671",
|
|
1311
|
+
mask: "9)999-9999"
|
|
1312
|
+
},
|
|
1313
|
+
{
|
|
1314
|
+
name: "Guatemala",
|
|
1315
|
+
nameCode: "gt",
|
|
1316
|
+
nameRus: "Гватемала",
|
|
1317
|
+
phoneCode: "502",
|
|
1318
|
+
mask: "9999-9999"
|
|
1319
|
+
},
|
|
1320
|
+
{
|
|
1321
|
+
name: "Guinea (Guinée)",
|
|
1322
|
+
nameCode: "gn",
|
|
1323
|
+
nameRus: "Гвинея",
|
|
1324
|
+
phoneCode: "224",
|
|
1325
|
+
mask: "-99-999-999"
|
|
1326
|
+
},
|
|
1327
|
+
{
|
|
1328
|
+
name: "Guinea-Bissau (Guiné Bissau)",
|
|
1329
|
+
nameCode: "gw",
|
|
1330
|
+
nameRus: "Гвинея-Бисау",
|
|
1331
|
+
phoneCode: "245",
|
|
1332
|
+
mask: "-9-999999"
|
|
1333
|
+
},
|
|
1334
|
+
{
|
|
1335
|
+
name: "Guyana",
|
|
1336
|
+
nameCode: "gy",
|
|
1337
|
+
nameRus: "Гайана",
|
|
1338
|
+
phoneCode: "592",
|
|
1339
|
+
mask: "-999-9999"
|
|
1340
|
+
},
|
|
1341
|
+
{
|
|
1342
|
+
name: "Haiti",
|
|
1343
|
+
nameCode: "ht",
|
|
1344
|
+
nameRus: "Гаити",
|
|
1345
|
+
phoneCode: "509",
|
|
1346
|
+
mask: "9999-9999"
|
|
1347
|
+
},
|
|
1348
|
+
{
|
|
1349
|
+
name: "Honduras",
|
|
1350
|
+
nameCode: "hn",
|
|
1351
|
+
nameRus: "Гондурас",
|
|
1352
|
+
phoneCode: "504",
|
|
1353
|
+
mask: "-9999-9999"
|
|
1354
|
+
},
|
|
1355
|
+
{
|
|
1356
|
+
name: "Hong Kong (香港)",
|
|
1357
|
+
nameCode: "hk",
|
|
1358
|
+
nameRus: "Гонконг (САР)",
|
|
1359
|
+
phoneCode: "852",
|
|
1360
|
+
mask: "99999999"
|
|
1361
|
+
},
|
|
1362
|
+
{
|
|
1363
|
+
name: "Hungary (Magyarország)",
|
|
1364
|
+
nameCode: "hu",
|
|
1365
|
+
nameRus: "Венгрия",
|
|
1366
|
+
phoneCode: "36",
|
|
1367
|
+
mask: "(999)999-999"
|
|
1368
|
+
},
|
|
1369
|
+
{
|
|
1370
|
+
name: "Iceland (Ísland)",
|
|
1371
|
+
nameCode: "is",
|
|
1372
|
+
nameRus: "Исландия",
|
|
1373
|
+
phoneCode: "354",
|
|
1374
|
+
mask: "9999999"
|
|
1375
|
+
},
|
|
1376
|
+
{
|
|
1377
|
+
name: "India (भारत)",
|
|
1378
|
+
nameCode: "in",
|
|
1379
|
+
nameRus: "Индия",
|
|
1380
|
+
phoneCode: "91",
|
|
1381
|
+
mask: "99999-99999"
|
|
1382
|
+
},
|
|
1383
|
+
{
|
|
1384
|
+
name: "Indonesia",
|
|
1385
|
+
nameCode: "id",
|
|
1386
|
+
nameRus: "Индонезия",
|
|
1387
|
+
phoneCode: "62",
|
|
1388
|
+
mask: "-99-999-99"
|
|
1389
|
+
},
|
|
1390
|
+
{
|
|
1391
|
+
name: "Iran (ایران)",
|
|
1392
|
+
nameCode: "ir",
|
|
1393
|
+
nameRus: "Иран",
|
|
1394
|
+
phoneCode: "98",
|
|
1395
|
+
mask: "(999)999-9999"
|
|
1396
|
+
},
|
|
1397
|
+
{
|
|
1398
|
+
name: "Iraq (العراق)",
|
|
1399
|
+
nameCode: "iq",
|
|
1400
|
+
nameRus: "Ирак",
|
|
1401
|
+
phoneCode: "964",
|
|
1402
|
+
mask: "(999)999-9999"
|
|
1403
|
+
},
|
|
1404
|
+
{
|
|
1405
|
+
name: "Ireland",
|
|
1406
|
+
nameCode: "ie",
|
|
1407
|
+
nameRus: "Ирландия",
|
|
1408
|
+
phoneCode: "353",
|
|
1409
|
+
mask: "999999999"
|
|
1410
|
+
},
|
|
1411
|
+
{
|
|
1412
|
+
name: "Israel (ישראל)",
|
|
1413
|
+
nameCode: "il",
|
|
1414
|
+
nameRus: "Израиль",
|
|
1415
|
+
phoneCode: "972",
|
|
1416
|
+
mask: "-9-999-9999"
|
|
1417
|
+
},
|
|
1418
|
+
{
|
|
1419
|
+
name: "Italy (Italia)",
|
|
1420
|
+
nameCode: "it",
|
|
1421
|
+
nameRus: "Италия",
|
|
1422
|
+
phoneCode: "39",
|
|
1423
|
+
mask: "999999999"
|
|
1424
|
+
},
|
|
1425
|
+
{
|
|
1426
|
+
name: "Jamaica",
|
|
1427
|
+
nameCode: "jm",
|
|
1428
|
+
nameRus: "Ямайка",
|
|
1429
|
+
phoneCode: "1876",
|
|
1430
|
+
mask: "9)999-9999"
|
|
1431
|
+
},
|
|
1432
|
+
{
|
|
1433
|
+
name: "Japan (日本)",
|
|
1434
|
+
nameCode: "jp",
|
|
1435
|
+
nameRus: "Япония",
|
|
1436
|
+
phoneCode: "81",
|
|
1437
|
+
mask: "999999999"
|
|
1438
|
+
},
|
|
1439
|
+
{
|
|
1440
|
+
name: "Jordan (الأردن)",
|
|
1441
|
+
nameCode: "jo",
|
|
1442
|
+
nameRus: "Иордания",
|
|
1443
|
+
phoneCode: "962",
|
|
1444
|
+
mask: "-9-9999-9999"
|
|
1445
|
+
},
|
|
1446
|
+
{
|
|
1447
|
+
name: "Kazakhstan (Казахстан)",
|
|
1448
|
+
nameCode: "kz",
|
|
1449
|
+
nameRus: "Казахстан",
|
|
1450
|
+
phoneCode: "7",
|
|
1451
|
+
mask: "999999-99-99"
|
|
1452
|
+
},
|
|
1453
|
+
{
|
|
1454
|
+
name: "Kenya",
|
|
1455
|
+
nameCode: "ke",
|
|
1456
|
+
nameRus: "Кения",
|
|
1457
|
+
phoneCode: "254",
|
|
1458
|
+
mask: "-999-999999"
|
|
1459
|
+
},
|
|
1460
|
+
{
|
|
1461
|
+
name: "Kiribati",
|
|
1462
|
+
nameCode: "ki",
|
|
1463
|
+
nameRus: "Кирибати",
|
|
1464
|
+
phoneCode: "686",
|
|
1465
|
+
mask: "-99-999"
|
|
1466
|
+
},
|
|
1467
|
+
{
|
|
1468
|
+
name: "Kuwait (الكويت)",
|
|
1469
|
+
nameCode: "kw",
|
|
1470
|
+
nameRus: "Кувейт",
|
|
1471
|
+
phoneCode: "965",
|
|
1472
|
+
mask: "-9999-9999"
|
|
1473
|
+
},
|
|
1474
|
+
{
|
|
1475
|
+
name: "Kyrgyzstan (Кыргызстан)",
|
|
1476
|
+
nameCode: "kg",
|
|
1477
|
+
nameRus: "Киргизия",
|
|
1478
|
+
phoneCode: "996",
|
|
1479
|
+
mask: "(999)999-999"
|
|
1480
|
+
},
|
|
1481
|
+
{
|
|
1482
|
+
name: "Laos (ລາວ)",
|
|
1483
|
+
nameCode: "la",
|
|
1484
|
+
nameRus: "Лаос",
|
|
1485
|
+
phoneCode: "856",
|
|
1486
|
+
mask: "-99-999-999"
|
|
1487
|
+
},
|
|
1488
|
+
{
|
|
1489
|
+
name: "Latvia (Latvija)",
|
|
1490
|
+
nameCode: "lv",
|
|
1491
|
+
nameRus: "Латвия",
|
|
1492
|
+
phoneCode: "371",
|
|
1493
|
+
mask: "-99-999-999"
|
|
1494
|
+
},
|
|
1495
|
+
{
|
|
1496
|
+
name: "Lebanon (لبنان)",
|
|
1497
|
+
nameCode: "lb",
|
|
1498
|
+
nameRus: "Ливан",
|
|
1499
|
+
phoneCode: "961",
|
|
1500
|
+
mask: "-9-999-999"
|
|
1501
|
+
},
|
|
1502
|
+
{
|
|
1503
|
+
name: "Lesotho",
|
|
1504
|
+
nameCode: "ls",
|
|
1505
|
+
nameRus: "Лесото",
|
|
1506
|
+
phoneCode: "266",
|
|
1507
|
+
mask: "-9-999-9999"
|
|
1508
|
+
},
|
|
1509
|
+
{
|
|
1510
|
+
name: "Liberia",
|
|
1511
|
+
nameCode: "lr",
|
|
1512
|
+
nameRus: "Либерия",
|
|
1513
|
+
phoneCode: "231",
|
|
1514
|
+
mask: "-99-999-999"
|
|
1515
|
+
},
|
|
1516
|
+
{
|
|
1517
|
+
name: "Libya (ليبيا)",
|
|
1518
|
+
nameCode: "ly",
|
|
1519
|
+
nameRus: "Ливия",
|
|
1520
|
+
phoneCode: "218",
|
|
1521
|
+
mask: "-99-999-999"
|
|
1522
|
+
},
|
|
1523
|
+
{
|
|
1524
|
+
name: "Liechtenstein",
|
|
1525
|
+
nameCode: "li",
|
|
1526
|
+
nameRus: "Лихтенштейн",
|
|
1527
|
+
phoneCode: "423",
|
|
1528
|
+
mask: "(999)999-9999"
|
|
1529
|
+
},
|
|
1530
|
+
{
|
|
1531
|
+
name: "Lithuania (Lietuva)",
|
|
1532
|
+
nameCode: "lt",
|
|
1533
|
+
nameRus: "Литва",
|
|
1534
|
+
phoneCode: "370",
|
|
1535
|
+
mask: "(999)99-999"
|
|
1536
|
+
},
|
|
1537
|
+
{
|
|
1538
|
+
name: "Luxembourg",
|
|
1539
|
+
nameCode: "lu",
|
|
1540
|
+
nameRus: "Люксембург",
|
|
1541
|
+
phoneCode: "352",
|
|
1542
|
+
mask: "(999)999-999"
|
|
1543
|
+
},
|
|
1544
|
+
{
|
|
1545
|
+
name: "Macau (澳門)",
|
|
1546
|
+
nameCode: "mo",
|
|
1547
|
+
nameRus: "Макао (САР)",
|
|
1548
|
+
phoneCode: "853",
|
|
1549
|
+
mask: "-9999-9999"
|
|
1550
|
+
},
|
|
1551
|
+
{
|
|
1552
|
+
name: "Macedonia (FYROM) (Македонија)",
|
|
1553
|
+
nameCode: "mk",
|
|
1554
|
+
nameRus: "Северная Македония",
|
|
1555
|
+
phoneCode: "389",
|
|
1556
|
+
mask: "-99-999-999"
|
|
1557
|
+
},
|
|
1558
|
+
{
|
|
1559
|
+
name: "Madagascar (Madagasikara)",
|
|
1560
|
+
nameCode: "mg",
|
|
1561
|
+
nameRus: "Мадагаскар",
|
|
1562
|
+
phoneCode: "261",
|
|
1563
|
+
mask: "-99-99-99999"
|
|
1564
|
+
},
|
|
1565
|
+
{
|
|
1566
|
+
name: "Malawi",
|
|
1567
|
+
nameCode: "mw",
|
|
1568
|
+
nameRus: "Малави",
|
|
1569
|
+
phoneCode: "265",
|
|
1570
|
+
mask: "-9-9999-9999"
|
|
1571
|
+
},
|
|
1572
|
+
{
|
|
1573
|
+
name: "Malaysia",
|
|
1574
|
+
nameCode: "my",
|
|
1575
|
+
nameRus: "Малайзия",
|
|
1576
|
+
phoneCode: "60",
|
|
1577
|
+
mask: "99-9999-9999"
|
|
1578
|
+
},
|
|
1579
|
+
{
|
|
1580
|
+
name: "Maldives",
|
|
1581
|
+
nameCode: "mv",
|
|
1582
|
+
nameRus: "Мальдивы",
|
|
1583
|
+
phoneCode: "960",
|
|
1584
|
+
mask: "-999-9999"
|
|
1585
|
+
},
|
|
1586
|
+
{
|
|
1587
|
+
name: "Mali",
|
|
1588
|
+
nameCode: "ml",
|
|
1589
|
+
nameRus: "Мали",
|
|
1590
|
+
phoneCode: "223",
|
|
1591
|
+
mask: "-99-99-9999"
|
|
1592
|
+
},
|
|
1593
|
+
{
|
|
1594
|
+
name: "Malta",
|
|
1595
|
+
nameCode: "mt",
|
|
1596
|
+
nameRus: "Мальта",
|
|
1597
|
+
phoneCode: "356",
|
|
1598
|
+
mask: "-9999-9999"
|
|
1599
|
+
},
|
|
1600
|
+
{
|
|
1601
|
+
name: "Marshall Islands",
|
|
1602
|
+
nameCode: "mh",
|
|
1603
|
+
nameRus: "Маршалловы Острова",
|
|
1604
|
+
phoneCode: "692",
|
|
1605
|
+
mask: "-999-9999"
|
|
1606
|
+
},
|
|
1607
|
+
{
|
|
1608
|
+
name: "Martinique",
|
|
1609
|
+
nameCode: "mq",
|
|
1610
|
+
nameRus: "Мартиника",
|
|
1611
|
+
phoneCode: "596",
|
|
1612
|
+
mask: "(999)99-99-99"
|
|
1613
|
+
},
|
|
1614
|
+
{
|
|
1615
|
+
name: "Mauritania (موريتانيا)",
|
|
1616
|
+
nameCode: "mr",
|
|
1617
|
+
nameRus: "Мавритания",
|
|
1618
|
+
phoneCode: "222",
|
|
1619
|
+
mask: "-99-99-9999"
|
|
1620
|
+
},
|
|
1621
|
+
{
|
|
1622
|
+
name: "Mauritius (Moris)",
|
|
1623
|
+
nameCode: "mu",
|
|
1624
|
+
nameRus: "Маврикий",
|
|
1625
|
+
phoneCode: "230",
|
|
1626
|
+
mask: "-999-9999"
|
|
1627
|
+
},
|
|
1628
|
+
{
|
|
1629
|
+
name: "Mexico (México)",
|
|
1630
|
+
nameCode: "mx",
|
|
1631
|
+
nameRus: "Мексика",
|
|
1632
|
+
phoneCode: "52",
|
|
1633
|
+
mask: "-99-99-9999"
|
|
1634
|
+
},
|
|
1635
|
+
{
|
|
1636
|
+
name: "Micronesia",
|
|
1637
|
+
nameCode: "fm",
|
|
1638
|
+
nameRus: "Федеративные Штаты Микронезии",
|
|
1639
|
+
phoneCode: "691",
|
|
1640
|
+
mask: "-999-9999"
|
|
1641
|
+
},
|
|
1642
|
+
{
|
|
1643
|
+
name: "Moldova (Republica Moldova)",
|
|
1644
|
+
nameCode: "md",
|
|
1645
|
+
nameRus: "Молдова",
|
|
1646
|
+
phoneCode: "373",
|
|
1647
|
+
mask: "-9999-9999"
|
|
1648
|
+
},
|
|
1649
|
+
{
|
|
1650
|
+
name: "Monaco",
|
|
1651
|
+
nameCode: "mc",
|
|
1652
|
+
nameRus: "Монако",
|
|
1653
|
+
phoneCode: "377",
|
|
1654
|
+
mask: "-99-999-999"
|
|
1655
|
+
},
|
|
1656
|
+
{
|
|
1657
|
+
name: "Mongolia (Монгол)",
|
|
1658
|
+
nameCode: "mn",
|
|
1659
|
+
nameRus: "Монголия",
|
|
1660
|
+
phoneCode: "976",
|
|
1661
|
+
mask: "-99-99-9999"
|
|
1662
|
+
},
|
|
1663
|
+
{
|
|
1664
|
+
name: "Montenegro (Crna Gora)",
|
|
1665
|
+
nameCode: "me",
|
|
1666
|
+
nameRus: "Черногория",
|
|
1667
|
+
phoneCode: "382",
|
|
1668
|
+
mask: "-99-999-999"
|
|
1669
|
+
},
|
|
1670
|
+
{
|
|
1671
|
+
name: "Montserrat",
|
|
1672
|
+
nameCode: "ms",
|
|
1673
|
+
nameRus: "Монтсеррат",
|
|
1674
|
+
phoneCode: "1664",
|
|
1675
|
+
mask: "9)999-9999"
|
|
1676
|
+
},
|
|
1677
|
+
{
|
|
1678
|
+
name: "Morocco (المغرب)",
|
|
1679
|
+
nameCode: "ma",
|
|
1680
|
+
nameRus: "Марокко",
|
|
1681
|
+
phoneCode: "212",
|
|
1682
|
+
mask: "-99-9999-999"
|
|
1683
|
+
},
|
|
1684
|
+
{
|
|
1685
|
+
name: "Mozambique (Moçambique)",
|
|
1686
|
+
nameCode: "mz",
|
|
1687
|
+
nameRus: "Мозамбик",
|
|
1688
|
+
phoneCode: "258",
|
|
1689
|
+
mask: "-99-999-999"
|
|
1690
|
+
},
|
|
1691
|
+
{
|
|
1692
|
+
name: "Myanmar (Burma) (မြန်မာ)",
|
|
1693
|
+
nameCode: "mm",
|
|
1694
|
+
nameRus: "Мьянма (Бирма)",
|
|
1695
|
+
phoneCode: "95",
|
|
1696
|
+
mask: "-999-999"
|
|
1697
|
+
},
|
|
1698
|
+
{
|
|
1699
|
+
name: "Namibia (Namibië)",
|
|
1700
|
+
nameCode: "na",
|
|
1701
|
+
nameRus: "Намибия",
|
|
1702
|
+
phoneCode: "264",
|
|
1703
|
+
mask: "-99-999-9999"
|
|
1704
|
+
},
|
|
1705
|
+
{
|
|
1706
|
+
name: "Nauru",
|
|
1707
|
+
nameCode: "nr",
|
|
1708
|
+
nameRus: "Науру",
|
|
1709
|
+
phoneCode: "674",
|
|
1710
|
+
mask: "-999-9999"
|
|
1711
|
+
},
|
|
1712
|
+
{
|
|
1713
|
+
name: "Nepal (नेपाल)",
|
|
1714
|
+
nameCode: "np",
|
|
1715
|
+
nameRus: "Непал",
|
|
1716
|
+
phoneCode: "977",
|
|
1717
|
+
mask: "-99-999-999"
|
|
1718
|
+
},
|
|
1719
|
+
{
|
|
1720
|
+
name: "Netherlands (Nederland)",
|
|
1721
|
+
nameCode: "nl",
|
|
1722
|
+
nameRus: "Нидерланды",
|
|
1723
|
+
phoneCode: "31",
|
|
1724
|
+
mask: "9999999999"
|
|
1725
|
+
},
|
|
1726
|
+
{
|
|
1727
|
+
name: "New Caledonia (Nouvelle-Calédonie)",
|
|
1728
|
+
nameCode: "nc",
|
|
1729
|
+
nameRus: "Новая Каледония",
|
|
1730
|
+
phoneCode: "687",
|
|
1731
|
+
mask: "-99-9999"
|
|
1732
|
+
},
|
|
1733
|
+
{
|
|
1734
|
+
name: "New Zealand",
|
|
1735
|
+
nameCode: "nz",
|
|
1736
|
+
nameRus: "Новая Зеландия",
|
|
1737
|
+
phoneCode: "64",
|
|
1738
|
+
mask: "999-999-9999"
|
|
1739
|
+
},
|
|
1740
|
+
{
|
|
1741
|
+
name: "Nicaragua",
|
|
1742
|
+
nameCode: "ni",
|
|
1743
|
+
nameRus: "Никарагуа",
|
|
1744
|
+
phoneCode: "505",
|
|
1745
|
+
mask: "-9999-9999"
|
|
1746
|
+
},
|
|
1747
|
+
{
|
|
1748
|
+
name: "Niger (Nijar)",
|
|
1749
|
+
nameCode: "ne",
|
|
1750
|
+
nameRus: "Нигер",
|
|
1751
|
+
phoneCode: "227",
|
|
1752
|
+
mask: "-99-99-9999"
|
|
1753
|
+
},
|
|
1754
|
+
{
|
|
1755
|
+
name: "Nigeria",
|
|
1756
|
+
nameCode: "ng",
|
|
1757
|
+
nameRus: "Нигерия",
|
|
1758
|
+
phoneCode: "234",
|
|
1759
|
+
mask: "-99-999-99"
|
|
1760
|
+
},
|
|
1761
|
+
{
|
|
1762
|
+
name: "Niue",
|
|
1763
|
+
nameCode: "nu",
|
|
1764
|
+
nameRus: "Ниуэ",
|
|
1765
|
+
phoneCode: "683",
|
|
1766
|
+
mask: "-9999"
|
|
1767
|
+
},
|
|
1768
|
+
{
|
|
1769
|
+
name: "Norfolk Island",
|
|
1770
|
+
nameCode: "nf",
|
|
1771
|
+
nameRus: "о-в Норфолк",
|
|
1772
|
+
phoneCode: "672",
|
|
1773
|
+
mask: "-999-999"
|
|
1774
|
+
},
|
|
1775
|
+
{
|
|
1776
|
+
name: "North Korea (조선 민주주의 인민 공화국)",
|
|
1777
|
+
nameCode: "kp",
|
|
1778
|
+
nameRus: "КНДР",
|
|
1779
|
+
phoneCode: "850",
|
|
1780
|
+
mask: "-999-999"
|
|
1781
|
+
},
|
|
1782
|
+
{
|
|
1783
|
+
name: "Northern Mariana Islands",
|
|
1784
|
+
nameCode: "mp",
|
|
1785
|
+
nameRus: "Северные Марианские о-ва",
|
|
1786
|
+
phoneCode: "1670",
|
|
1787
|
+
mask: "9)999-9999"
|
|
1788
|
+
},
|
|
1789
|
+
{
|
|
1790
|
+
name: "Norway (Norge)",
|
|
1791
|
+
nameCode: "no",
|
|
1792
|
+
nameRus: "Норвегия",
|
|
1793
|
+
phoneCode: "47",
|
|
1794
|
+
mask: "99999999"
|
|
1795
|
+
},
|
|
1796
|
+
{
|
|
1797
|
+
name: "Oman (عُمان)",
|
|
1798
|
+
nameCode: "om",
|
|
1799
|
+
nameRus: "Оман",
|
|
1800
|
+
phoneCode: "968",
|
|
1801
|
+
mask: "-99-999-999"
|
|
1802
|
+
},
|
|
1803
|
+
{
|
|
1804
|
+
name: "Pakistan (پاکستان)",
|
|
1805
|
+
nameCode: "pk",
|
|
1806
|
+
nameRus: "Пакистан",
|
|
1807
|
+
phoneCode: "92",
|
|
1808
|
+
mask: "999-9999999"
|
|
1809
|
+
},
|
|
1810
|
+
{
|
|
1811
|
+
name: "Palau",
|
|
1812
|
+
nameCode: "pw",
|
|
1813
|
+
nameRus: "Палау",
|
|
1814
|
+
phoneCode: "680",
|
|
1815
|
+
mask: "-999-9999"
|
|
1816
|
+
},
|
|
1817
|
+
{
|
|
1818
|
+
name: "Palestine (فلسطين)",
|
|
1819
|
+
nameCode: "ps",
|
|
1820
|
+
nameRus: "Палестинские территории",
|
|
1821
|
+
phoneCode: "970",
|
|
1822
|
+
mask: "-99-999-9999"
|
|
1823
|
+
},
|
|
1824
|
+
{
|
|
1825
|
+
name: "Panama (Panamá)",
|
|
1826
|
+
nameCode: "pa",
|
|
1827
|
+
nameRus: "Панама",
|
|
1828
|
+
phoneCode: "507",
|
|
1829
|
+
mask: "-999-9999"
|
|
1830
|
+
},
|
|
1831
|
+
{
|
|
1832
|
+
name: "Papua New Guinea",
|
|
1833
|
+
nameCode: "pg",
|
|
1834
|
+
nameRus: "Папуа — Новая Гвинея",
|
|
1835
|
+
phoneCode: "675",
|
|
1836
|
+
mask: "(999)99-999"
|
|
1837
|
+
},
|
|
1838
|
+
{
|
|
1839
|
+
name: "Paraguay",
|
|
1840
|
+
nameCode: "py",
|
|
1841
|
+
nameRus: "Парагвай",
|
|
1842
|
+
phoneCode: "595",
|
|
1843
|
+
mask: "(999)999-999"
|
|
1844
|
+
},
|
|
1845
|
+
{
|
|
1846
|
+
name: "Peru (Perú)",
|
|
1847
|
+
nameCode: "pe",
|
|
1848
|
+
nameRus: "Перу",
|
|
1849
|
+
phoneCode: "51",
|
|
1850
|
+
mask: "(999)999-999"
|
|
1851
|
+
},
|
|
1852
|
+
{
|
|
1853
|
+
name: "Philippines",
|
|
1854
|
+
nameCode: "ph",
|
|
1855
|
+
nameRus: "Филиппины",
|
|
1856
|
+
phoneCode: "63",
|
|
1857
|
+
mask: "9999999"
|
|
1858
|
+
},
|
|
1859
|
+
{
|
|
1860
|
+
name: "Poland (Polska)",
|
|
1861
|
+
nameCode: "pl",
|
|
1862
|
+
nameRus: "Польша",
|
|
1863
|
+
phoneCode: "48",
|
|
1864
|
+
mask: "999-999-999"
|
|
1865
|
+
},
|
|
1866
|
+
{
|
|
1867
|
+
name: "Portugal",
|
|
1868
|
+
nameCode: "pt",
|
|
1869
|
+
nameRus: "Португалия",
|
|
1870
|
+
phoneCode: "351",
|
|
1871
|
+
mask: "-99-999-9999"
|
|
1872
|
+
},
|
|
1873
|
+
{
|
|
1874
|
+
name: "Puerto Rico",
|
|
1875
|
+
nameCode: "pr",
|
|
1876
|
+
nameRus: "Пуэрто-Рико",
|
|
1877
|
+
phoneCode: "1",
|
|
1878
|
+
mask: "(999)999-9999"
|
|
1879
|
+
},
|
|
1880
|
+
{
|
|
1881
|
+
name: "Qatar (قطر)",
|
|
1882
|
+
nameCode: "qa",
|
|
1883
|
+
nameRus: "Катар",
|
|
1884
|
+
phoneCode: "974",
|
|
1885
|
+
mask: "-9999-9999"
|
|
1886
|
+
},
|
|
1887
|
+
{
|
|
1888
|
+
name: "Réunion (La Réunion)",
|
|
1889
|
+
nameCode: "re",
|
|
1890
|
+
nameRus: "Реюньон",
|
|
1891
|
+
phoneCode: "262",
|
|
1892
|
+
mask: "-99999-9999"
|
|
1893
|
+
},
|
|
1894
|
+
{
|
|
1895
|
+
name: "Romania (România)",
|
|
1896
|
+
nameCode: "ro",
|
|
1897
|
+
nameRus: "Румыния",
|
|
1898
|
+
phoneCode: "40",
|
|
1899
|
+
mask: "-99-999-9999"
|
|
1900
|
+
},
|
|
1901
|
+
{
|
|
1902
|
+
name: "Russia (Россия)",
|
|
1903
|
+
nameCode: "ru",
|
|
1904
|
+
nameRus: "Россия",
|
|
1905
|
+
phoneCode: "7",
|
|
1906
|
+
mask: "(999) 999-99-99"
|
|
1907
|
+
},
|
|
1908
|
+
{
|
|
1909
|
+
name: "Rwanda",
|
|
1910
|
+
nameCode: "rw",
|
|
1911
|
+
nameRus: "Руанда",
|
|
1912
|
+
phoneCode: "250",
|
|
1913
|
+
mask: "(999)999-999"
|
|
1914
|
+
},
|
|
1915
|
+
{
|
|
1916
|
+
name: "Saint Helena",
|
|
1917
|
+
nameCode: "sh",
|
|
1918
|
+
nameRus: "о-в Св. Елены",
|
|
1919
|
+
phoneCode: "290",
|
|
1920
|
+
mask: false
|
|
1921
|
+
},
|
|
1922
|
+
{
|
|
1923
|
+
name: "Saint Kitts and Nevis",
|
|
1924
|
+
nameCode: "kn",
|
|
1925
|
+
nameRus: "Сент-Китс и Невис",
|
|
1926
|
+
phoneCode: "1869",
|
|
1927
|
+
mask: "9)999-9999"
|
|
1928
|
+
},
|
|
1929
|
+
{
|
|
1930
|
+
name: "Saint Lucia",
|
|
1931
|
+
nameCode: "lc",
|
|
1932
|
+
nameRus: "Сент-Люсия",
|
|
1933
|
+
phoneCode: "1758",
|
|
1934
|
+
mask: "9)999-9999"
|
|
1935
|
+
},
|
|
1936
|
+
{
|
|
1937
|
+
name: "Saint Pierre and Miquelon (Saint-Pierre-et-Miquelon)",
|
|
1938
|
+
nameCode: "pm",
|
|
1939
|
+
nameRus: "Сен-Пьер и Микелон",
|
|
1940
|
+
phoneCode: "508",
|
|
1941
|
+
mask: false
|
|
1942
|
+
},
|
|
1943
|
+
{
|
|
1944
|
+
name: "Saint Vincent and the Grenadines",
|
|
1945
|
+
nameCode: "vc",
|
|
1946
|
+
nameRus: "Сент-Винсент и Гренадины",
|
|
1947
|
+
phoneCode: "1784",
|
|
1948
|
+
mask: "9)999-9999"
|
|
1949
|
+
},
|
|
1950
|
+
{
|
|
1951
|
+
name: "Samoa",
|
|
1952
|
+
nameCode: "ws",
|
|
1953
|
+
nameRus: "Самоа",
|
|
1954
|
+
phoneCode: "685",
|
|
1955
|
+
mask: "-99-9999"
|
|
1956
|
+
},
|
|
1957
|
+
{
|
|
1958
|
+
name: "San Marino",
|
|
1959
|
+
nameCode: "sm",
|
|
1960
|
+
nameRus: "Сан-Марино",
|
|
1961
|
+
phoneCode: "378",
|
|
1962
|
+
mask: "-9999-999999"
|
|
1963
|
+
},
|
|
1964
|
+
{
|
|
1965
|
+
name: "São Tomé and Príncipe (São Tomé e Príncipe)",
|
|
1966
|
+
nameCode: "st",
|
|
1967
|
+
nameRus: "Сан-Томе и Принсипи",
|
|
1968
|
+
phoneCode: "239",
|
|
1969
|
+
mask: "-99-99999"
|
|
1970
|
+
},
|
|
1971
|
+
{
|
|
1972
|
+
name: "Saudi Arabia (المملكة العربية السعودية)",
|
|
1973
|
+
nameCode: "sa",
|
|
1974
|
+
nameRus: "Саудовская Аравия",
|
|
1975
|
+
phoneCode: "966",
|
|
1976
|
+
mask: "-9-999-9999"
|
|
1977
|
+
},
|
|
1978
|
+
{
|
|
1979
|
+
name: "Senegal (Sénégal)",
|
|
1980
|
+
nameCode: "sn",
|
|
1981
|
+
nameRus: "Сенегал",
|
|
1982
|
+
phoneCode: "221",
|
|
1983
|
+
mask: "-99-999-9999"
|
|
1984
|
+
},
|
|
1985
|
+
{
|
|
1986
|
+
name: "Serbia (Србија)",
|
|
1987
|
+
nameCode: "rs",
|
|
1988
|
+
nameRus: "Сербия",
|
|
1989
|
+
phoneCode: "381",
|
|
1990
|
+
mask: "-99-999-9999"
|
|
1991
|
+
},
|
|
1992
|
+
{
|
|
1993
|
+
name: "Seychelles",
|
|
1994
|
+
nameCode: "sc",
|
|
1995
|
+
nameRus: "Сейшельские Острова",
|
|
1996
|
+
phoneCode: "248",
|
|
1997
|
+
mask: "-9-999-999"
|
|
1998
|
+
},
|
|
1999
|
+
{
|
|
2000
|
+
name: "Sierra Leone",
|
|
2001
|
+
nameCode: "sl",
|
|
2002
|
+
nameRus: "Сьерра-Леоне",
|
|
2003
|
+
phoneCode: "232",
|
|
2004
|
+
mask: "-99-999999"
|
|
2005
|
+
},
|
|
2006
|
+
{
|
|
2007
|
+
name: "Singapore",
|
|
2008
|
+
nameCode: "sg",
|
|
2009
|
+
nameRus: "Сингапур",
|
|
2010
|
+
phoneCode: "65",
|
|
2011
|
+
mask: "9999-9999"
|
|
2012
|
+
},
|
|
2013
|
+
{
|
|
2014
|
+
name: "Sint Maarten",
|
|
2015
|
+
nameCode: "sx",
|
|
2016
|
+
nameRus: "Синт-Мартен",
|
|
2017
|
+
phoneCode: "1721",
|
|
2018
|
+
mask: "9)999-9999"
|
|
2019
|
+
},
|
|
2020
|
+
{
|
|
2021
|
+
name: "Slovakia (Slovensko)",
|
|
2022
|
+
nameCode: "sk",
|
|
2023
|
+
nameRus: "Словакия",
|
|
2024
|
+
phoneCode: "421",
|
|
2025
|
+
mask: "(999)999-999"
|
|
2026
|
+
},
|
|
2027
|
+
{
|
|
2028
|
+
name: "Slovenia (Slovenija)",
|
|
2029
|
+
nameCode: "si",
|
|
2030
|
+
nameRus: "Словения",
|
|
2031
|
+
phoneCode: "386",
|
|
2032
|
+
mask: "-99-999-999"
|
|
2033
|
+
},
|
|
2034
|
+
{
|
|
2035
|
+
name: "Solomon Islands",
|
|
2036
|
+
nameCode: "sb",
|
|
2037
|
+
nameRus: "Соломоновы Острова",
|
|
2038
|
+
phoneCode: "677",
|
|
2039
|
+
mask: "-99999"
|
|
2040
|
+
},
|
|
2041
|
+
{
|
|
2042
|
+
name: "Somalia (Soomaaliya)",
|
|
2043
|
+
nameCode: "so",
|
|
2044
|
+
nameRus: "Сомали",
|
|
2045
|
+
phoneCode: "252",
|
|
2046
|
+
mask: "-9-999-999"
|
|
2047
|
+
},
|
|
2048
|
+
{
|
|
2049
|
+
name: "South Africa",
|
|
2050
|
+
nameCode: "za",
|
|
2051
|
+
nameRus: "Южно-Африканская Республика",
|
|
2052
|
+
phoneCode: "27",
|
|
2053
|
+
mask: "-99-999-9999"
|
|
2054
|
+
},
|
|
2055
|
+
{
|
|
2056
|
+
name: "South Korea (대한민국)",
|
|
2057
|
+
nameCode: "kr",
|
|
2058
|
+
nameRus: "Республика Корея",
|
|
2059
|
+
phoneCode: "82",
|
|
2060
|
+
mask: "-99-999-9999"
|
|
2061
|
+
},
|
|
2062
|
+
{
|
|
2063
|
+
name: "South Sudan (جنوب السودان)",
|
|
2064
|
+
nameCode: "ss",
|
|
2065
|
+
nameRus: "Южный Судан",
|
|
2066
|
+
phoneCode: "211",
|
|
2067
|
+
mask: "-99-999-9999"
|
|
2068
|
+
},
|
|
2069
|
+
{
|
|
2070
|
+
name: "Spain (España)",
|
|
2071
|
+
nameCode: "es",
|
|
2072
|
+
nameRus: "Испания",
|
|
2073
|
+
phoneCode: "34",
|
|
2074
|
+
mask: "999999999"
|
|
2075
|
+
},
|
|
2076
|
+
{
|
|
2077
|
+
name: "Sri Lanka (ශ්රී ලංකාව)",
|
|
2078
|
+
nameCode: "lk",
|
|
2079
|
+
nameRus: "Шри-Ланка",
|
|
2080
|
+
phoneCode: "94",
|
|
2081
|
+
mask: "-99-999-9999"
|
|
2082
|
+
},
|
|
2083
|
+
{
|
|
2084
|
+
name: "Sudan (السودان)",
|
|
2085
|
+
nameCode: "sd",
|
|
2086
|
+
nameRus: "Судан",
|
|
2087
|
+
phoneCode: "249",
|
|
2088
|
+
mask: "-99-999-9999"
|
|
2089
|
+
},
|
|
2090
|
+
{
|
|
2091
|
+
name: "Suriname",
|
|
2092
|
+
nameCode: "sr",
|
|
2093
|
+
nameRus: "Суринам",
|
|
2094
|
+
phoneCode: "597",
|
|
2095
|
+
mask: "-999-999"
|
|
2096
|
+
},
|
|
2097
|
+
{
|
|
2098
|
+
name: "Swaziland",
|
|
2099
|
+
nameCode: "sz",
|
|
2100
|
+
nameRus: "Эсватини",
|
|
2101
|
+
phoneCode: "268",
|
|
2102
|
+
mask: "-99-99-9999"
|
|
2103
|
+
},
|
|
2104
|
+
{
|
|
2105
|
+
name: "Sweden (Sverige)",
|
|
2106
|
+
nameCode: "se",
|
|
2107
|
+
nameRus: "Швеция",
|
|
2108
|
+
phoneCode: "46",
|
|
2109
|
+
mask: "999999999"
|
|
2110
|
+
},
|
|
2111
|
+
{
|
|
2112
|
+
name: "Switzerland (Schweiz)",
|
|
2113
|
+
nameCode: "ch",
|
|
2114
|
+
nameRus: "Швейцария",
|
|
2115
|
+
phoneCode: "41",
|
|
2116
|
+
mask: "999999999"
|
|
2117
|
+
},
|
|
2118
|
+
{
|
|
2119
|
+
name: "Syria (سوريا)",
|
|
2120
|
+
nameCode: "sy",
|
|
2121
|
+
nameRus: "Сирия",
|
|
2122
|
+
phoneCode: "963",
|
|
2123
|
+
mask: "-99-9999-999"
|
|
2124
|
+
},
|
|
2125
|
+
{
|
|
2126
|
+
name: "Taiwan (台灣)",
|
|
2127
|
+
nameCode: "tw",
|
|
2128
|
+
nameRus: "Тайвань",
|
|
2129
|
+
phoneCode: "886",
|
|
2130
|
+
mask: "-9999-9999"
|
|
2131
|
+
},
|
|
2132
|
+
{
|
|
2133
|
+
name: "Tajikistan",
|
|
2134
|
+
nameCode: "tj",
|
|
2135
|
+
nameRus: "Таджикистан",
|
|
2136
|
+
phoneCode: "992",
|
|
2137
|
+
mask: "-99-999-9999"
|
|
2138
|
+
},
|
|
2139
|
+
{
|
|
2140
|
+
name: "Tanzania",
|
|
2141
|
+
nameCode: "tz",
|
|
2142
|
+
nameRus: "Танзания",
|
|
2143
|
+
phoneCode: "255",
|
|
2144
|
+
mask: "-99-999-9999"
|
|
2145
|
+
},
|
|
2146
|
+
{
|
|
2147
|
+
name: "Thailand (ไทย)",
|
|
2148
|
+
nameCode: "th",
|
|
2149
|
+
nameRus: "Таиланд",
|
|
2150
|
+
phoneCode: "66",
|
|
2151
|
+
mask: "-99-999-999"
|
|
2152
|
+
},
|
|
2153
|
+
{
|
|
2154
|
+
name: "Timor-Leste",
|
|
2155
|
+
nameCode: "tl",
|
|
2156
|
+
nameRus: "Восточный Тимор",
|
|
2157
|
+
phoneCode: "670",
|
|
2158
|
+
mask: "-999-9999"
|
|
2159
|
+
},
|
|
2160
|
+
{
|
|
2161
|
+
name: "Togo",
|
|
2162
|
+
nameCode: "tg",
|
|
2163
|
+
nameRus: "Того",
|
|
2164
|
+
phoneCode: "228",
|
|
2165
|
+
mask: "-99-999-999"
|
|
2166
|
+
},
|
|
2167
|
+
{
|
|
2168
|
+
name: "Tokelau",
|
|
2169
|
+
nameCode: "tk",
|
|
2170
|
+
nameRus: "Токелау",
|
|
2171
|
+
phoneCode: "690",
|
|
2172
|
+
mask: "-9999"
|
|
2173
|
+
},
|
|
2174
|
+
{
|
|
2175
|
+
name: "Tonga",
|
|
2176
|
+
nameCode: "to",
|
|
2177
|
+
nameRus: "Тонга",
|
|
2178
|
+
phoneCode: "676",
|
|
2179
|
+
mask: "-99999"
|
|
2180
|
+
},
|
|
2181
|
+
{
|
|
2182
|
+
name: "Trinidad and Tobago",
|
|
2183
|
+
nameCode: "tt",
|
|
2184
|
+
nameRus: "Тринидад и Тобаго",
|
|
2185
|
+
phoneCode: "1868",
|
|
2186
|
+
mask: "9)999-9999"
|
|
2187
|
+
},
|
|
2188
|
+
{
|
|
2189
|
+
name: "Tunisia (تونس)",
|
|
2190
|
+
nameCode: "tn",
|
|
2191
|
+
nameRus: "Тунис",
|
|
2192
|
+
phoneCode: "216",
|
|
2193
|
+
mask: "-99-999-999"
|
|
2194
|
+
},
|
|
2195
|
+
{
|
|
2196
|
+
name: "Turkey (Türkiye)",
|
|
2197
|
+
nameCode: "tr",
|
|
2198
|
+
nameRus: "Турция",
|
|
2199
|
+
phoneCode: "90",
|
|
2200
|
+
mask: "9999999999"
|
|
2201
|
+
},
|
|
2202
|
+
{
|
|
2203
|
+
name: "Turkmenistan",
|
|
2204
|
+
nameCode: "tm",
|
|
2205
|
+
nameRus: "Туркменистан",
|
|
2206
|
+
phoneCode: "993",
|
|
2207
|
+
mask: "-9-999-9999"
|
|
2208
|
+
},
|
|
2209
|
+
{
|
|
2210
|
+
name: "Turks and Caicos Islands",
|
|
2211
|
+
nameCode: "tc",
|
|
2212
|
+
nameRus: "о-ва Тёркс и Кайкос",
|
|
2213
|
+
phoneCode: "1649",
|
|
2214
|
+
mask: "9)999-9999"
|
|
2215
|
+
},
|
|
2216
|
+
{
|
|
2217
|
+
name: "Tuvalu",
|
|
2218
|
+
nameCode: "tv",
|
|
2219
|
+
nameRus: "Тувалу",
|
|
2220
|
+
phoneCode: "688",
|
|
2221
|
+
mask: "-99999"
|
|
2222
|
+
},
|
|
2223
|
+
{
|
|
2224
|
+
name: "U.S. Virgin Islands",
|
|
2225
|
+
nameCode: "vi",
|
|
2226
|
+
nameRus: "Виргинские о-ва (США)",
|
|
2227
|
+
phoneCode: "1340",
|
|
2228
|
+
mask: "9)999-9999"
|
|
2229
|
+
},
|
|
2230
|
+
{
|
|
2231
|
+
name: "Uganda",
|
|
2232
|
+
nameCode: "ug",
|
|
2233
|
+
nameRus: "Уганда",
|
|
2234
|
+
phoneCode: "256",
|
|
2235
|
+
mask: "(999)999-999"
|
|
2236
|
+
},
|
|
2237
|
+
{
|
|
2238
|
+
name: "Ukraine (Україна)",
|
|
2239
|
+
nameCode: "ua",
|
|
2240
|
+
nameRus: "Украина",
|
|
2241
|
+
phoneCode: "380",
|
|
2242
|
+
mask: "(99)999-99-99"
|
|
2243
|
+
},
|
|
2244
|
+
{
|
|
2245
|
+
name: "United Arab Emirates (الإمارات العربية المتحدة)",
|
|
2246
|
+
nameCode: "ae",
|
|
2247
|
+
nameRus: "ОАЭ",
|
|
2248
|
+
phoneCode: "971",
|
|
2249
|
+
mask: "-9-999-9999"
|
|
2250
|
+
},
|
|
2251
|
+
{
|
|
2252
|
+
name: "United Kingdom",
|
|
2253
|
+
nameCode: "gb",
|
|
2254
|
+
nameRus: "Великобритания",
|
|
2255
|
+
phoneCode: "44",
|
|
2256
|
+
mask: "9999999999"
|
|
2257
|
+
},
|
|
2258
|
+
{
|
|
2259
|
+
name: "United States",
|
|
2260
|
+
nameCode: "us",
|
|
2261
|
+
nameRus: "Соединенные Штаты",
|
|
2262
|
+
phoneCode: "1",
|
|
2263
|
+
mask: "(999)999-9999"
|
|
2264
|
+
},
|
|
2265
|
+
{
|
|
2266
|
+
name: "Uruguay",
|
|
2267
|
+
nameCode: "uy",
|
|
2268
|
+
nameRus: "Уругвай",
|
|
2269
|
+
phoneCode: "598",
|
|
2270
|
+
mask: "-9-999-99-99"
|
|
2271
|
+
},
|
|
2272
|
+
{
|
|
2273
|
+
name: "Uzbekistan (Oʻzbekiston)",
|
|
2274
|
+
nameCode: "uz",
|
|
2275
|
+
nameRus: "Узбекистан",
|
|
2276
|
+
phoneCode: "998",
|
|
2277
|
+
mask: "-99-999-9999"
|
|
2278
|
+
},
|
|
2279
|
+
{
|
|
2280
|
+
name: "Vanuatu",
|
|
2281
|
+
nameCode: "vu",
|
|
2282
|
+
nameRus: "Вануату",
|
|
2283
|
+
phoneCode: "678",
|
|
2284
|
+
mask: "-99999"
|
|
2285
|
+
},
|
|
2286
|
+
{
|
|
2287
|
+
name: "Vatican City (Città del Vaticano)",
|
|
2288
|
+
nameCode: "va",
|
|
2289
|
+
nameRus: "Ватикан",
|
|
2290
|
+
phoneCode: "39",
|
|
2291
|
+
mask: "9999999999"
|
|
2292
|
+
},
|
|
2293
|
+
{
|
|
2294
|
+
name: "Venezuela",
|
|
2295
|
+
nameCode: "ve",
|
|
2296
|
+
nameRus: "Венесуэла",
|
|
2297
|
+
phoneCode: "58",
|
|
2298
|
+
mask: "(999)999-9999"
|
|
2299
|
+
},
|
|
2300
|
+
{
|
|
2301
|
+
name: "Vietnam (Việt Nam)",
|
|
2302
|
+
nameCode: "vn",
|
|
2303
|
+
nameRus: "Вьетнам",
|
|
2304
|
+
phoneCode: "84",
|
|
2305
|
+
mask: "-99-9999-999"
|
|
2306
|
+
},
|
|
2307
|
+
{
|
|
2308
|
+
name: "Wallis and Futuna",
|
|
2309
|
+
nameCode: "wf",
|
|
2310
|
+
nameRus: "Уоллис и Футуна",
|
|
2311
|
+
phoneCode: "681",
|
|
2312
|
+
mask: "-99-9999"
|
|
2313
|
+
},
|
|
2314
|
+
{
|
|
2315
|
+
name: "Western Sahara",
|
|
2316
|
+
nameCode: "eh",
|
|
2317
|
+
nameRus: "Западная Сахара",
|
|
2318
|
+
phoneCode: "212",
|
|
2319
|
+
mask: "-99-9999"
|
|
2320
|
+
},
|
|
2321
|
+
{
|
|
2322
|
+
name: "Yemen (اليمن)",
|
|
2323
|
+
nameCode: "ye",
|
|
2324
|
+
nameRus: "Йемен",
|
|
2325
|
+
phoneCode: "967",
|
|
2326
|
+
mask: "-9-999-999"
|
|
2327
|
+
},
|
|
2328
|
+
{
|
|
2329
|
+
name: "Zambia",
|
|
2330
|
+
nameCode: "zm",
|
|
2331
|
+
nameRus: "Замбия",
|
|
2332
|
+
phoneCode: "260",
|
|
2333
|
+
mask: "-99-999-9999"
|
|
2334
|
+
},
|
|
2335
|
+
{
|
|
2336
|
+
name: "Zimbabwe",
|
|
2337
|
+
nameCode: "zw",
|
|
2338
|
+
nameRus: "Зимбабве",
|
|
2339
|
+
phoneCode: "263",
|
|
2340
|
+
mask: "-9-999999"
|
|
2341
|
+
}
|
|
2342
|
+
];
|
|
2343
|
+
|
|
2344
|
+
function CountryItem(_ref) {
|
|
2345
|
+
var item = _ref.item,
|
|
2346
|
+
selectCountryIndex = _ref.selectCountryIndex;
|
|
2347
|
+
var countryIcon = useMemo(function () {
|
|
2348
|
+
return item.nameCode.toUpperCase().replace(/./g, function (_char) {
|
|
2349
|
+
return String.fromCodePoint(_char.charCodeAt(0) + 127397);
|
|
2350
|
+
});
|
|
2351
|
+
}, [item.nameCode]);
|
|
2352
|
+
|
|
2353
|
+
var handleClick = function handleClick() {
|
|
2354
|
+
selectCountryIndex(item);
|
|
2355
|
+
};
|
|
2356
|
+
|
|
2357
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
2358
|
+
className: "KUI-Country",
|
|
2359
|
+
onClick: handleClick
|
|
2360
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
2361
|
+
className: "KUI-Country_title"
|
|
2362
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
2363
|
+
className: "KUI-Country_icon"
|
|
2364
|
+
}, countryIcon), /*#__PURE__*/React.createElement("p", {
|
|
2365
|
+
className: classNames("KUI-Country_paragraph", "KUI-Country_name")
|
|
2366
|
+
}, item.nameRus)), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("p", {
|
|
2367
|
+
className: classNames("KUI-Country_paragraph", "KUI-Country_phone")
|
|
2368
|
+
}, "+", item.phoneCode)));
|
|
2369
|
+
}
|
|
2370
|
+
|
|
2371
|
+
var SearchIcon = function SearchIcon(_ref) {
|
|
2372
|
+
var width = _ref.width,
|
|
2373
|
+
height = _ref.height;
|
|
2374
|
+
return /*#__PURE__*/React.createElement("svg", {
|
|
2375
|
+
width: width,
|
|
2376
|
+
height: height,
|
|
2377
|
+
viewBox: "0 0 ".concat(width, " ").concat(height),
|
|
2378
|
+
fill: "none",
|
|
2379
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
2380
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
2381
|
+
d: "M5.15016 0.333008C7.81034 0.333008 9.96683 2.4895 9.96683 5.14967C9.96683 6.27563 9.58049 7.31135 8.93313 8.13151L11.5009 10.699C11.7222 10.9203 11.7222 11.2791 11.5009 11.5004C11.2796 11.7217 10.9208 11.7217 10.6995 11.5004L8.132 8.93264C7.31184 9.58 6.27612 9.96634 5.15016 9.96634C2.48999 9.96634 0.333496 7.80985 0.333496 5.14967C0.333496 2.4895 2.48999 0.333008 5.15016 0.333008ZM5.15016 1.46634C3.11591 1.46634 1.46683 3.11543 1.46683 5.14967C1.46683 7.18392 3.11591 8.83301 5.15016 8.83301C7.18441 8.83301 8.8335 7.18392 8.8335 5.14967C8.8335 3.11543 7.18441 1.46634 5.15016 1.46634Z",
|
|
2382
|
+
fill: "#7F8285"
|
|
2383
|
+
}));
|
|
2384
|
+
};
|
|
2385
|
+
|
|
2386
|
+
SearchIcon.defaultProps = {
|
|
2387
|
+
width: 12,
|
|
2388
|
+
height: 12
|
|
2389
|
+
};
|
|
2390
|
+
SearchIcon.propTypes = {
|
|
2391
|
+
width: PropTypes.number,
|
|
2392
|
+
height: PropTypes.number
|
|
2393
|
+
};
|
|
2394
|
+
|
|
2395
|
+
function Dropdown(_ref) {
|
|
2396
|
+
var isOpen = _ref.isOpen,
|
|
2397
|
+
selectCountryIndex = _ref.selectCountryIndex,
|
|
2398
|
+
setIsOpenDropDown = _ref.setIsOpenDropDown,
|
|
2399
|
+
buttonRef = _ref.buttonRef;
|
|
2400
|
+
|
|
2401
|
+
var _useState = useState(countries),
|
|
2402
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
2403
|
+
filteredCountries = _useState2[0],
|
|
2404
|
+
setFilteredCountries = _useState2[1];
|
|
2405
|
+
|
|
2406
|
+
var dropdownRef = useRef();
|
|
2407
|
+
|
|
2408
|
+
var closePopUp = function closePopUp(e) {
|
|
2409
|
+
if (dropdownRef.current && buttonRef.current) {
|
|
2410
|
+
if (!dropdownRef.current.contains(e.target) && !buttonRef.current.contains(e.target)) {
|
|
2411
|
+
setIsOpenDropDown(false);
|
|
2412
|
+
}
|
|
2413
|
+
}
|
|
2414
|
+
};
|
|
2415
|
+
|
|
2416
|
+
useEffect(function () {
|
|
2417
|
+
document.addEventListener("click", closePopUp);
|
|
2418
|
+
return function () {
|
|
2419
|
+
document.removeEventListener("click", closePopUp);
|
|
2420
|
+
};
|
|
2421
|
+
}, []);
|
|
2422
|
+
|
|
2423
|
+
if (!isOpen) {
|
|
2424
|
+
return null;
|
|
2425
|
+
}
|
|
2426
|
+
|
|
2427
|
+
var filterCountries = function filterCountries(e) {
|
|
2428
|
+
var query = e.target.value;
|
|
2429
|
+
|
|
2430
|
+
if (query.length > 0) {
|
|
2431
|
+
setFilteredCountries(countries.filter(function (item) {
|
|
2432
|
+
return item.nameRus.toLowerCase().indexOf(query.toLowerCase()) !== -1;
|
|
2433
|
+
}));
|
|
2434
|
+
} else {
|
|
2435
|
+
setFilteredCountries(countries);
|
|
2436
|
+
}
|
|
2437
|
+
};
|
|
2438
|
+
|
|
2439
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
2440
|
+
className: classNames("KUI-DropdownContainer", isOpen && "KUI-Dropdown_open"),
|
|
2441
|
+
ref: dropdownRef
|
|
2442
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
2443
|
+
className: "KUI-SearchWrapper"
|
|
2444
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
2445
|
+
className: "KUI-Search"
|
|
2446
|
+
}, /*#__PURE__*/React.createElement("input", {
|
|
2447
|
+
type: "text",
|
|
2448
|
+
placeholder: "\u041F\u043E\u0438\u0441\u043A...",
|
|
2449
|
+
onChange: filterCountries,
|
|
2450
|
+
className: "KUI-SearchInput"
|
|
2451
|
+
}), /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(SearchIcon, null)))), /*#__PURE__*/React.createElement("div", {
|
|
2452
|
+
className: "KUI-Dropdown"
|
|
2453
|
+
}, filteredCountries.map(function (item, key) {
|
|
2454
|
+
return /*#__PURE__*/React.createElement(CountryItem, {
|
|
2455
|
+
key: key,
|
|
2456
|
+
item: item,
|
|
2457
|
+
selectCountryIndex: selectCountryIndex
|
|
2458
|
+
});
|
|
2459
|
+
})));
|
|
2460
|
+
}
|
|
2461
|
+
|
|
2462
|
+
var HalfArrowIcon = function HalfArrowIcon(_ref) {
|
|
2463
|
+
var width = _ref.width,
|
|
2464
|
+
height = _ref.height;
|
|
2465
|
+
return /*#__PURE__*/React.createElement("svg", {
|
|
2466
|
+
width: width,
|
|
2467
|
+
height: height,
|
|
2468
|
+
viewBox: "0 0 ".concat(width, " ").concat(height),
|
|
2469
|
+
fill: "none",
|
|
2470
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
2471
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
2472
|
+
fillRule: "evenodd",
|
|
2473
|
+
clipRule: "evenodd",
|
|
2474
|
+
d: "M6.86193 0.195262L4 3.05719L1.13807 0.195262C0.877722 -0.0650874 0.455612 -0.0650874 0.195262 0.195262C-0.0650874 0.455612 -0.0650874 0.877722 0.195262 1.13807L3.5286 4.4714C3.78895 4.73175 4.21105 4.73175 4.4714 4.4714L7.80474 1.13807C8.06509 0.877722 8.06509 0.455612 7.80474 0.195262C7.54439 -0.0650874 7.12228 -0.0650874 6.86193 0.195262Z",
|
|
2475
|
+
fill: "#8A94A6"
|
|
2476
|
+
}));
|
|
2477
|
+
};
|
|
2478
|
+
|
|
2479
|
+
HalfArrowIcon.defaultProps = {
|
|
2480
|
+
width: 8,
|
|
2481
|
+
height: 5
|
|
2482
|
+
};
|
|
2483
|
+
HalfArrowIcon.propTypes = {
|
|
2484
|
+
width: PropTypes.number,
|
|
2485
|
+
height: PropTypes.number
|
|
2486
|
+
};
|
|
2487
|
+
|
|
2488
|
+
var _excluded$j = ["onSelectCountry", "hiddenInputProps"];
|
|
2489
|
+
var InputWithCountryDropdown = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
2490
|
+
var onSelectCountry = _ref.onSelectCountry,
|
|
2491
|
+
hiddenInputProps = _ref.hiddenInputProps,
|
|
2492
|
+
inputProps = _objectWithoutProperties(_ref, _excluded$j);
|
|
2493
|
+
|
|
2494
|
+
var _useState = useState(168),
|
|
2495
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
2496
|
+
selectedCountry = _useState2[0],
|
|
2497
|
+
setSelectedCountry = _useState2[1];
|
|
2498
|
+
|
|
2499
|
+
var _useState3 = useState(false),
|
|
2500
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
2501
|
+
isOpenDropdown = _useState4[0],
|
|
2502
|
+
setIsOpenDropDown = _useState4[1];
|
|
2503
|
+
|
|
2504
|
+
var buttonRef = useRef();
|
|
2505
|
+
|
|
2506
|
+
var selectCountryIndex = function selectCountryIndex(item) {
|
|
2507
|
+
setSelectedCountry(countries.reduce(function (acc, country, index) {
|
|
2508
|
+
return country.name === item.name ? index : acc;
|
|
2509
|
+
}, 0));
|
|
2510
|
+
setIsOpenDropDown(false);
|
|
2511
|
+
|
|
2512
|
+
if (onSelectCountry) {
|
|
2513
|
+
onSelectCountry(item);
|
|
2514
|
+
}
|
|
2515
|
+
};
|
|
2516
|
+
|
|
2517
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
2518
|
+
className: "KUI-InputDropdown_wrapper"
|
|
2519
|
+
}, /*#__PURE__*/React.createElement(InputWithMask, _extends({
|
|
2520
|
+
ref: ref,
|
|
2521
|
+
label: "\u041D\u043E\u043C\u0435\u0440 \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u0430",
|
|
2522
|
+
mask: countries[selectedCountry].mask,
|
|
2523
|
+
type: "phone",
|
|
2524
|
+
startIcon: /*#__PURE__*/React.createElement("div", {
|
|
2525
|
+
className: "KUI-InputDropdown_button-phone-code",
|
|
2526
|
+
onClick: function onClick() {
|
|
2527
|
+
return setIsOpenDropDown(!isOpenDropdown);
|
|
2528
|
+
},
|
|
2529
|
+
ref: buttonRef
|
|
2530
|
+
}, /*#__PURE__*/React.createElement(Caption, {
|
|
2531
|
+
size: "s",
|
|
2532
|
+
weight: 500
|
|
2533
|
+
}, "+", countries[selectedCountry].phoneCode), /*#__PURE__*/React.createElement("span", {
|
|
2534
|
+
className: classNames("KUI-InputDropdown_button-phone-code_icon", isOpenDropdown && "KUI-InputDropdown_button-phone-code_reverse-icon")
|
|
2535
|
+
}, /*#__PURE__*/React.createElement(HalfArrowIcon, null)))
|
|
2536
|
+
}, inputProps)), /*#__PURE__*/React.createElement(Dropdown, {
|
|
2537
|
+
isOpen: isOpenDropdown,
|
|
2538
|
+
selectCountryIndex: selectCountryIndex,
|
|
2539
|
+
setIsOpenDropDown: setIsOpenDropDown,
|
|
2540
|
+
buttonRef: buttonRef
|
|
2541
|
+
}), /*#__PURE__*/React.createElement("input", _extends({
|
|
2542
|
+
style: {
|
|
2543
|
+
display: "none"
|
|
2544
|
+
},
|
|
2545
|
+
readOnly: true,
|
|
2546
|
+
value: countries[selectedCountry].phoneCode,
|
|
2547
|
+
"aria-label": "phone_code"
|
|
2548
|
+
}, hiddenInputProps)));
|
|
2549
|
+
});
|
|
2550
|
+
InputWithCountryDropdown.displayName = "InputWithCountryDropdown";
|
|
2551
|
+
InputWithCountryDropdown.propTypes = {
|
|
2552
|
+
label: PropTypes.string,
|
|
2553
|
+
errorMessage: PropTypes.string,
|
|
2554
|
+
disabled: PropTypes.bool
|
|
2555
|
+
};
|
|
2556
|
+
|
|
2557
|
+
var _excluded$i = ["className", "label", "error", "inputRef"];
|
|
2558
|
+
var Checkbox = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
2559
|
+
props.className;
|
|
2560
|
+
var label = props.label,
|
|
2561
|
+
error = props.error,
|
|
2562
|
+
inputRef = props.inputRef,
|
|
2563
|
+
checkboxProps = _objectWithoutProperties(props, _excluded$i);
|
|
2564
|
+
|
|
2565
|
+
return /*#__PURE__*/React.createElement("label", {
|
|
2566
|
+
htmlFor: "KUI-checkbox_".concat(checkboxProps.name),
|
|
2567
|
+
className: "KUI-Checkbox_label"
|
|
2568
|
+
}, /*#__PURE__*/React.createElement("input", _extends({
|
|
2569
|
+
id: "KUI-checkbox_".concat(checkboxProps.name),
|
|
2570
|
+
ref: inputRef,
|
|
2571
|
+
type: "checkbox",
|
|
2572
|
+
className: "KUI-Checkbox"
|
|
2573
|
+
}, checkboxProps)), /*#__PURE__*/React.createElement("span", {
|
|
2574
|
+
className: classNames("KUI-Checkbox_custom", !!error && "KUI-Checkbox_error")
|
|
2575
|
+
}), !!label && /*#__PURE__*/React.createElement("span", {
|
|
2576
|
+
className: "KUI-Label_checkbox"
|
|
2577
|
+
}, label));
|
|
2578
|
+
});
|
|
2579
|
+
Checkbox.defaultProps = {
|
|
2580
|
+
label: ""
|
|
2581
|
+
};
|
|
2582
|
+
Checkbox.propTypes = {
|
|
2583
|
+
label: PropTypes.any,
|
|
2584
|
+
error: PropTypes.bool,
|
|
2585
|
+
disabled: PropTypes.bool
|
|
2586
|
+
};
|
|
2587
|
+
Checkbox.displayName = "Checkbox";
|
|
2588
|
+
|
|
2589
|
+
var CloseIcon = function CloseIcon(_ref) {
|
|
2590
|
+
var width = _ref.width,
|
|
2591
|
+
height = _ref.height;
|
|
2592
|
+
return /*#__PURE__*/React.createElement("svg", {
|
|
2593
|
+
width: width,
|
|
2594
|
+
height: height,
|
|
2595
|
+
viewBox: "0 0 ".concat(width, " ").concat(height),
|
|
2596
|
+
fill: "none",
|
|
2597
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
2598
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
2599
|
+
d: "M6.93909 6.93909C7.27382 6.60435 7.81654 6.60435 8.15127 6.93909L13 11.7878L17.8487 6.93909C18.1835 6.60435 18.7262 6.60435 19.0609 6.93909C19.3957 7.27382 19.3957 7.81653 19.0609 8.15127L14.2122 13L19.0609 17.8487C19.3957 18.1835 19.3957 18.7262 19.0609 19.0609C18.7262 19.3956 18.1835 19.3956 17.8487 19.0609L13 14.2122L8.15127 19.0609C7.81654 19.3956 7.27382 19.3956 6.93909 19.0609C6.60435 18.7262 6.60435 18.1835 6.93909 17.8487L11.7878 13L6.93909 8.15127C6.60435 7.81653 6.60435 7.27382 6.93909 6.93909Z",
|
|
2600
|
+
fill: "#7F8285"
|
|
2601
|
+
}));
|
|
2602
|
+
};
|
|
2603
|
+
|
|
2604
|
+
CloseIcon.defaultProps = {
|
|
2605
|
+
width: 26,
|
|
2606
|
+
height: 26
|
|
2607
|
+
};
|
|
2608
|
+
CloseIcon.propTypes = {
|
|
2609
|
+
width: PropTypes.number,
|
|
2610
|
+
height: PropTypes.number
|
|
2611
|
+
};
|
|
2612
|
+
|
|
2613
|
+
var _excluded$h = ["isOpen", "handleClose", "title", "children", "isHasHeader", "className", "headerStyles", "classNameContent", "classNameClose", "size"];
|
|
2614
|
+
|
|
2615
|
+
function Modal(props) {
|
|
2616
|
+
var isOpen = props.isOpen,
|
|
2617
|
+
handleClose = props.handleClose,
|
|
2618
|
+
title = props.title,
|
|
2619
|
+
children = props.children,
|
|
2620
|
+
isHasHeader = props.isHasHeader,
|
|
2621
|
+
className = props.className,
|
|
2622
|
+
headerStyles = props.headerStyles,
|
|
2623
|
+
classNameContent = props.classNameContent,
|
|
2624
|
+
classNameClose = props.classNameClose,
|
|
2625
|
+
size = props.size,
|
|
2626
|
+
otherProps = _objectWithoutProperties(props, _excluded$h);
|
|
2627
|
+
|
|
2628
|
+
var modalRef = useRef(null);
|
|
2629
|
+
useEffect(function () {
|
|
2630
|
+
if (isOpen) {
|
|
2631
|
+
window.document.body.classList.add("body");
|
|
2632
|
+
} else {
|
|
2633
|
+
window.document.body.classList.remove("body");
|
|
2634
|
+
}
|
|
2635
|
+
}, [isOpen]);
|
|
2636
|
+
useEffect(function () {
|
|
2637
|
+
return function () {
|
|
2638
|
+
window.document.body.classList.remove("body");
|
|
2639
|
+
};
|
|
2640
|
+
}, []);
|
|
2641
|
+
|
|
2642
|
+
var closeModal = function closeModal(e) {
|
|
2643
|
+
if (modalRef.current && !modalRef.current.contains(e.target)) {
|
|
2644
|
+
handleClose();
|
|
2645
|
+
}
|
|
2646
|
+
};
|
|
2647
|
+
|
|
2648
|
+
if (!isOpen) {
|
|
2649
|
+
return null;
|
|
2650
|
+
}
|
|
2651
|
+
|
|
2652
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
2653
|
+
className: "KUI-Modal_container",
|
|
2654
|
+
onClick: closeModal
|
|
2655
|
+
}, otherProps), /*#__PURE__*/React.createElement("div", {
|
|
2656
|
+
ref: modalRef,
|
|
2657
|
+
className: classNames("KUI-Modal", isOpen ? "KUI-Modal_open" : "KUI-Modal_close", "KUI-Modal_".concat(size), className)
|
|
2658
|
+
}, /*#__PURE__*/React.createElement("div", null, isHasHeader ? /*#__PURE__*/React.createElement("div", {
|
|
2659
|
+
role: "header",
|
|
2660
|
+
className: classNames("KUI-Modal_header", headerStyles)
|
|
2661
|
+
}, /*#__PURE__*/React.createElement(Heading, {
|
|
2662
|
+
className: "KUI-Modal_title"
|
|
2663
|
+
}, title), /*#__PURE__*/React.createElement("div", {
|
|
2664
|
+
role: "close",
|
|
2665
|
+
className: classNames("KUI-Modal_close-button", classNameClose),
|
|
2666
|
+
onClick: handleClose
|
|
2667
|
+
}, /*#__PURE__*/React.createElement(CloseIcon, null))) : /*#__PURE__*/React.createElement("div", {
|
|
2668
|
+
role: "close",
|
|
2669
|
+
className: classNames("KUI-Modal_close-button", classNameClose),
|
|
2670
|
+
onClick: handleClose
|
|
2671
|
+
}, /*#__PURE__*/React.createElement(CloseIcon, null)), /*#__PURE__*/React.createElement("div", {
|
|
2672
|
+
className: classNames("KUI-Modal_content", classNameContent)
|
|
2673
|
+
}, children))));
|
|
2674
|
+
}
|
|
2675
|
+
|
|
2676
|
+
Modal.defaultProps = {
|
|
2677
|
+
isOpen: false,
|
|
2678
|
+
handleClose: null,
|
|
2679
|
+
title: "",
|
|
2680
|
+
isHasHeader: true,
|
|
2681
|
+
size: "small"
|
|
2682
|
+
};
|
|
2683
|
+
Modal.propTypes = {
|
|
2684
|
+
isOpen: PropTypes.bool,
|
|
2685
|
+
handleClose: PropTypes.func,
|
|
2686
|
+
title: PropTypes.string,
|
|
2687
|
+
isHasHeader: PropTypes.bool,
|
|
2688
|
+
size: PropTypes.oneOf(["small", "large"])
|
|
2689
|
+
};
|
|
2690
|
+
|
|
2691
|
+
var _excluded$g = ["size", "className", "label", "error", "inputRef"];
|
|
2692
|
+
var Switch = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
2693
|
+
var size = props.size;
|
|
2694
|
+
props.className;
|
|
2695
|
+
var label = props.label,
|
|
2696
|
+
error = props.error,
|
|
2697
|
+
inputRef = props.inputRef,
|
|
2698
|
+
switchProps = _objectWithoutProperties(props, _excluded$g);
|
|
2699
|
+
|
|
2700
|
+
return /*#__PURE__*/React.createElement("label", {
|
|
2701
|
+
className: "KUI-Switch_label"
|
|
2702
|
+
}, /*#__PURE__*/React.createElement("input", _extends({
|
|
2703
|
+
ref: inputRef,
|
|
2704
|
+
type: "checkbox",
|
|
2705
|
+
className: "KUI-Switch"
|
|
2706
|
+
}, switchProps)), /*#__PURE__*/React.createElement("span", {
|
|
2707
|
+
className: classNames("KUI-Switch_custom", "KUI-Switch_".concat(size), !!error && "KUI-Switch_error")
|
|
2708
|
+
}), !!label && /*#__PURE__*/React.createElement("span", {
|
|
2709
|
+
className: "KUI-Label_switch"
|
|
2710
|
+
}, label));
|
|
2711
|
+
});
|
|
2712
|
+
Switch.defaultProps = {
|
|
2713
|
+
label: "",
|
|
2714
|
+
className: "",
|
|
2715
|
+
name: "check",
|
|
2716
|
+
size: "s"
|
|
2717
|
+
};
|
|
2718
|
+
Switch.propTypes = {
|
|
2719
|
+
label: PropTypes.string,
|
|
2720
|
+
size: PropTypes.oneOf(["s", "m", "l"]),
|
|
2721
|
+
disabled: PropTypes.bool,
|
|
2722
|
+
error: PropTypes.bool
|
|
2723
|
+
};
|
|
2724
|
+
Switch.displayName = "Switch";
|
|
2725
|
+
|
|
2726
|
+
var _excluded$f = ["label", "value", "inputRef"];
|
|
2727
|
+
var Radio = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
2728
|
+
var label = props.label,
|
|
2729
|
+
value = props.value,
|
|
2730
|
+
inputRef = props.inputRef,
|
|
2731
|
+
radioProps = _objectWithoutProperties(props, _excluded$f);
|
|
2732
|
+
|
|
2733
|
+
return /*#__PURE__*/React.createElement("label", {
|
|
2734
|
+
className: "KUI-Radio_label"
|
|
2735
|
+
}, /*#__PURE__*/React.createElement("input", _extends({
|
|
2736
|
+
ref: inputRef,
|
|
2737
|
+
value: value,
|
|
2738
|
+
type: "radio",
|
|
2739
|
+
className: "KUI-Radio"
|
|
2740
|
+
}, radioProps)), /*#__PURE__*/React.createElement("span", {
|
|
2741
|
+
className: "KUI-Radio_custom"
|
|
2742
|
+
}), !!label && /*#__PURE__*/React.createElement("span", {
|
|
2743
|
+
className: "KUI-Label_radio"
|
|
2744
|
+
}, label));
|
|
2745
|
+
});
|
|
2746
|
+
Radio.defaultProps = {
|
|
2747
|
+
label: "",
|
|
2748
|
+
value: "",
|
|
2749
|
+
name: "radio"
|
|
2750
|
+
};
|
|
2751
|
+
Radio.propTypes = {
|
|
2752
|
+
label: PropTypes.string,
|
|
2753
|
+
disabled: PropTypes.bool
|
|
2754
|
+
};
|
|
2755
|
+
Radio.displayName = "Radio";
|
|
2756
|
+
|
|
2757
|
+
var FileIcon = function FileIcon(_ref) {
|
|
2758
|
+
var width = _ref.width,
|
|
2759
|
+
height = _ref.height;
|
|
2760
|
+
return /*#__PURE__*/React.createElement("svg", {
|
|
2761
|
+
width: width,
|
|
2762
|
+
height: height,
|
|
2763
|
+
viewBox: "0 0 ".concat(width, " ").concat(height),
|
|
2764
|
+
fill: "none",
|
|
2765
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
2766
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
2767
|
+
d: "M6.10782 5.22682C6.33097 5.00366 6.69278 5.00366 6.91594 5.22682C7.13909 5.44998 7.13909 5.81179 6.91594 6.03494L4.53198 8.4189C4.20799 8.74289 4.18918 9.28829 4.53198 9.63109C4.87477 9.97388 5.42017 9.95507 5.74416 9.63109L10.1888 5.18642C11.104 4.2712 11.054 2.81907 10.1888 1.95393C9.32369 1.08879 7.87156 1.03871 6.95634 1.95393L2.51167 6.3986C1.05411 7.85616 1.08129 10.221 2.51167 11.6514C3.94205 13.0818 6.3069 13.109 7.76447 11.6514L10.1484 9.26743C10.3716 9.04427 10.7334 9.04427 10.9565 9.26743C11.1797 9.49059 11.1797 9.8524 10.9565 10.0756L8.57259 12.4595C6.6645 14.3676 3.57614 14.3321 1.70355 12.4595C-0.169037 10.5869 -0.204535 7.49856 1.70355 5.59048L6.14822 1.14581C7.52269 -0.228658 9.69748 -0.153665 10.997 1.14581C12.2964 2.44528 12.3714 4.62007 10.997 5.99454L6.55228 10.4392C5.79396 11.1975 4.5259 11.2413 3.72386 10.4392C2.92181 9.63716 2.96554 8.3691 3.72386 7.61078L6.10782 5.22682Z",
|
|
2768
|
+
fill: "#7F8285"
|
|
2769
|
+
}));
|
|
2770
|
+
};
|
|
2771
|
+
|
|
2772
|
+
FileIcon.defaultProps = {
|
|
2773
|
+
width: 12,
|
|
2774
|
+
height: 14
|
|
2775
|
+
};
|
|
2776
|
+
FileIcon.propTypes = {
|
|
2777
|
+
width: PropTypes.number,
|
|
2778
|
+
height: PropTypes.number
|
|
2779
|
+
};
|
|
2780
|
+
|
|
2781
|
+
var _excluded$e = ["className", "label", "name"];
|
|
2782
|
+
var InputFile = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
2783
|
+
var className = props.className,
|
|
2784
|
+
label = props.label,
|
|
2785
|
+
name = props.name,
|
|
2786
|
+
inputProps = _objectWithoutProperties(props, _excluded$e);
|
|
2787
|
+
|
|
2788
|
+
var _useState = useState(label),
|
|
2789
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
2790
|
+
value = _useState2[0],
|
|
2791
|
+
setValue = _useState2[1];
|
|
2792
|
+
|
|
2793
|
+
var inputId = inputProps.id ? inputProps.id : name;
|
|
2794
|
+
|
|
2795
|
+
var setFileName = function setFileName(e) {
|
|
2796
|
+
if (e.target.files[0]) {
|
|
2797
|
+
setValue("".concat(e.target.files[0].name.length > 29 ? "".concat(e.target.files[0].name.slice(0, 26), "...") : e.target.files[0].name));
|
|
2798
|
+
} else {
|
|
2799
|
+
setValue(label);
|
|
2800
|
+
}
|
|
2801
|
+
};
|
|
2802
|
+
|
|
2803
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
2804
|
+
className: classNames("KUI-InputFile_wrapper", className)
|
|
2805
|
+
}, /*#__PURE__*/React.createElement("input", _extends({
|
|
2806
|
+
type: "file",
|
|
2807
|
+
id: inputId,
|
|
2808
|
+
className: "KUI-InputFile",
|
|
2809
|
+
onInput: setFileName
|
|
2810
|
+
}, inputProps)), /*#__PURE__*/React.createElement("label", {
|
|
2811
|
+
htmlFor: inputId,
|
|
2812
|
+
className: "KUI-InputFile_label"
|
|
2813
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
2814
|
+
size: "s",
|
|
2815
|
+
className: classNames("KUI-InputFile_title", value !== label && "KUI-InputFile_value")
|
|
2816
|
+
}, value), /*#__PURE__*/React.createElement(FileIcon, null)));
|
|
2817
|
+
});
|
|
2818
|
+
InputFile.displayName = "InputFile";
|
|
2819
|
+
InputFile.propTypes = {
|
|
2820
|
+
label: PropTypes.string
|
|
2821
|
+
};
|
|
2822
|
+
|
|
2823
|
+
function Divider(_ref) {
|
|
2824
|
+
var className = _ref.className;
|
|
2825
|
+
return /*#__PURE__*/React.createElement("hr", {
|
|
2826
|
+
className: classNames("KUI-Divider", className)
|
|
2827
|
+
});
|
|
2828
|
+
}
|
|
2829
|
+
|
|
2830
|
+
Divider.defaultProps = {
|
|
2831
|
+
className: ""
|
|
2832
|
+
};
|
|
2833
|
+
Divider.propTypes = {
|
|
2834
|
+
className: PropTypes.string
|
|
2835
|
+
};
|
|
2836
|
+
|
|
2837
|
+
var _excluded$d = ["className"];
|
|
2838
|
+
var Container = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
2839
|
+
var className = _ref.className,
|
|
2840
|
+
props = _objectWithoutProperties(_ref, _excluded$d);
|
|
2841
|
+
|
|
2842
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
2843
|
+
ref: ref,
|
|
2844
|
+
className: classNames("KUI-Container", className)
|
|
2845
|
+
}, props));
|
|
2846
|
+
});
|
|
2847
|
+
Container.displayName = "Container";
|
|
2848
|
+
|
|
2849
|
+
var _excluded$c = ["spacing", "item", "container", "justify", "alignItems", "alignContent", "xs", "sm", "md", "lg", "xl", "className", "direction"];
|
|
2850
|
+
var Grid = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
2851
|
+
var spacing = _ref.spacing,
|
|
2852
|
+
item = _ref.item,
|
|
2853
|
+
container = _ref.container,
|
|
2854
|
+
justify = _ref.justify,
|
|
2855
|
+
alignItems = _ref.alignItems,
|
|
2856
|
+
alignContent = _ref.alignContent,
|
|
2857
|
+
xs = _ref.xs,
|
|
2858
|
+
sm = _ref.sm,
|
|
2859
|
+
md = _ref.md,
|
|
2860
|
+
lg = _ref.lg,
|
|
2861
|
+
xl = _ref.xl,
|
|
2862
|
+
className = _ref.className,
|
|
2863
|
+
direction = _ref.direction,
|
|
2864
|
+
otherProps = _objectWithoutProperties(_ref, _excluded$c);
|
|
2865
|
+
|
|
2866
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
2867
|
+
ref: ref,
|
|
2868
|
+
className: classNames(item && "KUI-Grid_Item", container && "KUI-Grid_Container", item && xs && "KUI-Grid_xs_".concat(xs), item && sm && "KUI-Grid_sm_".concat(sm), item && md && "KUI-Grid_md_".concat(md), item && lg && "KUI-Grid_lg_".concat(lg), item && xl && "KUI-Grid_xl_".concat(xl), container && justify && "KUI-Grid_justify_".concat(justify), container && alignItems && "KUI-Grid_alignItems_".concat(alignItems), container && alignContent && "KUI-Grid_alignContent_".concat(alignContent), container && spacing && "KUI-Grid_spacing_".concat(spacing), container && direction && "KUI-Grid_direction_".concat(direction), className)
|
|
2869
|
+
}, otherProps));
|
|
2870
|
+
});
|
|
2871
|
+
Grid.displayName = "Grid";
|
|
2872
|
+
Grid.propTypes = {
|
|
2873
|
+
spacing: PropTypes.number,
|
|
2874
|
+
justify: PropTypes.oneOf(["center", "flex-start", "flex-end", "space-between"]),
|
|
2875
|
+
alignItems: PropTypes.oneOf(["center", "flex-start", "flex-end"]),
|
|
2876
|
+
alignContent: PropTypes.oneOf(["center", "flex-start", "flex-end"]),
|
|
2877
|
+
direction: PropTypes.oneOf(["column", "row"])
|
|
2878
|
+
};
|
|
2879
|
+
|
|
2880
|
+
var _excluded$b = ["mt", "mr", "ml", "mb", "pt", "pr", "pl", "pb", "className"];
|
|
2881
|
+
var Box = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
2882
|
+
var mt = _ref.mt,
|
|
2883
|
+
mr = _ref.mr,
|
|
2884
|
+
ml = _ref.ml,
|
|
2885
|
+
mb = _ref.mb,
|
|
2886
|
+
pt = _ref.pt,
|
|
2887
|
+
pr = _ref.pr,
|
|
2888
|
+
pl = _ref.pl,
|
|
2889
|
+
pb = _ref.pb,
|
|
2890
|
+
className = _ref.className,
|
|
2891
|
+
otherProps = _objectWithoutProperties(_ref, _excluded$b);
|
|
2892
|
+
|
|
2893
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
2894
|
+
ref: ref,
|
|
2895
|
+
className: classNames(mt && "KUI-Box_mt_".concat(mt), mr && "KUI-Box_mr_".concat(mr), ml && "KUI-Box_ml_".concat(ml), mb && "KUI-Box_mb_".concat(mb), pt && "KUI-Box_pt_".concat(pt), pr && "KUI-Box_pr_".concat(pr), pl && "KUI-Box_pl_".concat(pl), pb && "KUI-Box_pb_".concat(pb), className)
|
|
2896
|
+
}, otherProps));
|
|
2897
|
+
});
|
|
2898
|
+
Box.propTypes = {
|
|
2899
|
+
pt: PropTypes.number,
|
|
2900
|
+
pb: PropTypes.number,
|
|
2901
|
+
pr: PropTypes.number,
|
|
2902
|
+
pl: PropTypes.number,
|
|
2903
|
+
mt: PropTypes.number,
|
|
2904
|
+
mb: PropTypes.number,
|
|
2905
|
+
mr: PropTypes.number,
|
|
2906
|
+
ml: PropTypes.number
|
|
2907
|
+
};
|
|
2908
|
+
Box.displayName = "Box";
|
|
2909
|
+
|
|
2910
|
+
var _excluded$a = ["children", "handleChange", "className"];
|
|
2911
|
+
|
|
2912
|
+
function Accordion(_ref) {
|
|
2913
|
+
var children = _ref.children;
|
|
2914
|
+
_ref.handleChange;
|
|
2915
|
+
var className = _ref.className,
|
|
2916
|
+
otherProps = _objectWithoutProperties(_ref, _excluded$a);
|
|
2917
|
+
|
|
2918
|
+
var detailsBlock = useRef(null);
|
|
2919
|
+
|
|
2920
|
+
var _React$Children$toArr = React.Children.toArray(children),
|
|
2921
|
+
_React$Children$toArr2 = _toArray(_React$Children$toArr),
|
|
2922
|
+
summary = _React$Children$toArr2[0],
|
|
2923
|
+
otherChildren = _React$Children$toArr2.slice(1);
|
|
2924
|
+
|
|
2925
|
+
var handleTransitionEnd = function handleTransitionEnd() {
|
|
2926
|
+
if (detailsBlock.current.style.height !== "0px") {
|
|
2927
|
+
detailsBlock.current.style.height = "auto";
|
|
2928
|
+
}
|
|
2929
|
+
};
|
|
2930
|
+
|
|
2931
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
2932
|
+
className: classNames("KUI-Accordion", className)
|
|
2933
|
+
}, otherProps), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.cloneElement(summary, {
|
|
2934
|
+
detailsBlock: detailsBlock
|
|
2935
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
2936
|
+
onTransitionEnd: handleTransitionEnd,
|
|
2937
|
+
ref: detailsBlock,
|
|
2938
|
+
className: "KUI-Collapse"
|
|
2939
|
+
}, otherChildren));
|
|
2940
|
+
}
|
|
2941
|
+
|
|
2942
|
+
var _excluded$9 = ["detailsBlock", "className", "children", "expandIcon", "contentStyles", "expandedStyles", "iconStyles"];
|
|
2943
|
+
|
|
2944
|
+
function AccordionSummary(_ref) {
|
|
2945
|
+
var detailsBlock = _ref.detailsBlock,
|
|
2946
|
+
className = _ref.className,
|
|
2947
|
+
children = _ref.children,
|
|
2948
|
+
expandIcon = _ref.expandIcon,
|
|
2949
|
+
contentStyles = _ref.contentStyles,
|
|
2950
|
+
expandedStyles = _ref.expandedStyles,
|
|
2951
|
+
iconStyles = _ref.iconStyles,
|
|
2952
|
+
otherProps = _objectWithoutProperties(_ref, _excluded$9);
|
|
2953
|
+
|
|
2954
|
+
var _useState = useState(false),
|
|
2955
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
2956
|
+
expanded = _useState2[0],
|
|
2957
|
+
setExpanded = _useState2[1];
|
|
2958
|
+
|
|
2959
|
+
var handleClick = function handleClick() {
|
|
2960
|
+
setExpanded(function (prev) {
|
|
2961
|
+
return !prev;
|
|
2962
|
+
});
|
|
2963
|
+
|
|
2964
|
+
if (detailsBlock) {
|
|
2965
|
+
if (!expanded) {
|
|
2966
|
+
var _detailsBlock$current;
|
|
2967
|
+
|
|
2968
|
+
detailsBlock.current.style.height = "".concat((_detailsBlock$current = detailsBlock.current) === null || _detailsBlock$current === void 0 ? void 0 : _detailsBlock$current.scrollHeight, "px");
|
|
2969
|
+
} else {
|
|
2970
|
+
var _detailsBlock$current2;
|
|
2971
|
+
|
|
2972
|
+
detailsBlock.current.style.height = "".concat((_detailsBlock$current2 = detailsBlock.current) === null || _detailsBlock$current2 === void 0 ? void 0 : _detailsBlock$current2.scrollHeight, "px");
|
|
2973
|
+
window.getComputedStyle(detailsBlock.current, null).getPropertyValue("height");
|
|
2974
|
+
detailsBlock.current.style.height = "0";
|
|
2975
|
+
}
|
|
2976
|
+
}
|
|
2977
|
+
};
|
|
2978
|
+
|
|
2979
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
2980
|
+
onClick: handleClick,
|
|
2981
|
+
className: classNames("KUI-Accordion_Summary", className)
|
|
2982
|
+
}, otherProps), /*#__PURE__*/React.createElement("div", {
|
|
2983
|
+
className: classNames("KUI-Accordion_Summary-Content", expanded && "KUI-Accordion_expanded", expanded && expandedStyles, contentStyles)
|
|
2984
|
+
}, children), /*#__PURE__*/React.createElement("div", {
|
|
2985
|
+
className: classNames("KUI-Accordion_Summary-Icon", expanded && "KUI-Accordion_expanded", expanded && expandedStyles, iconStyles)
|
|
2986
|
+
}, expandIcon));
|
|
2987
|
+
}
|
|
2988
|
+
|
|
2989
|
+
AccordionSummary.propTypes = {
|
|
2990
|
+
expandIcon: PropTypes.element,
|
|
2991
|
+
children: PropTypes.oneOfType([PropTypes.element, PropTypes.string])
|
|
2992
|
+
};
|
|
2993
|
+
|
|
2994
|
+
function AccordionDetails(props) {
|
|
2995
|
+
return /*#__PURE__*/React.createElement("div", props);
|
|
2996
|
+
}
|
|
2997
|
+
|
|
2998
|
+
var _excluded$8 = ["className"];
|
|
2999
|
+
|
|
3000
|
+
function Skeleton(_ref) {
|
|
3001
|
+
var className = _ref.className,
|
|
3002
|
+
otherProps = _objectWithoutProperties(_ref, _excluded$8);
|
|
3003
|
+
|
|
3004
|
+
return /*#__PURE__*/React.createElement("span", _extends({
|
|
3005
|
+
className: classNames("KUI-Skeleton", className)
|
|
3006
|
+
}, otherProps));
|
|
3007
|
+
}
|
|
3008
|
+
|
|
3009
|
+
var _excluded$7 = ["className", "isFixed"];
|
|
3010
|
+
|
|
3011
|
+
function AppBar(_ref) {
|
|
3012
|
+
var className = _ref.className,
|
|
3013
|
+
isFixed = _ref.isFixed,
|
|
3014
|
+
otherProps = _objectWithoutProperties(_ref, _excluded$7);
|
|
3015
|
+
|
|
3016
|
+
return /*#__PURE__*/React.createElement("header", _extends({
|
|
3017
|
+
className: classNames("KUI-AppBar", isFixed && "KUI-AppBar_fixed", className)
|
|
3018
|
+
}, otherProps));
|
|
3019
|
+
}
|
|
3020
|
+
|
|
3021
|
+
AppBar.propTypes = {
|
|
3022
|
+
isFixed: PropTypes.bool
|
|
3023
|
+
};
|
|
3024
|
+
AppBar.defaultProps = {
|
|
3025
|
+
isFixed: true
|
|
3026
|
+
};
|
|
3027
|
+
|
|
3028
|
+
var _excluded$6 = ["className"];
|
|
3029
|
+
|
|
3030
|
+
function ToolBar(_ref) {
|
|
3031
|
+
var className = _ref.className,
|
|
3032
|
+
otherProps = _objectWithoutProperties(_ref, _excluded$6);
|
|
3033
|
+
|
|
3034
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
3035
|
+
className: classNames("KUI-ToolBar", className)
|
|
3036
|
+
}, otherProps));
|
|
3037
|
+
}
|
|
3038
|
+
|
|
3039
|
+
var _excluded$5 = ["className", "svgStyles", "circleStyles"];
|
|
3040
|
+
|
|
3041
|
+
function CircularProgress(_ref) {
|
|
3042
|
+
var className = _ref.className,
|
|
3043
|
+
svgStyles = _ref.svgStyles,
|
|
3044
|
+
circleStyles = _ref.circleStyles,
|
|
3045
|
+
otherProps = _objectWithoutProperties(_ref, _excluded$5);
|
|
3046
|
+
|
|
3047
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
3048
|
+
className: classNames("KUI-CircularProgress", className)
|
|
3049
|
+
}, otherProps), /*#__PURE__*/React.createElement("svg", {
|
|
3050
|
+
className: classNames("KUI-CircularProgress_svg", svgStyles),
|
|
3051
|
+
viewBox: "22 22 44 44"
|
|
3052
|
+
}, /*#__PURE__*/React.createElement("circle", {
|
|
3053
|
+
className: classNames("KUI-CircularProgress_circle", circleStyles),
|
|
3054
|
+
cx: "44",
|
|
3055
|
+
cy: "44",
|
|
3056
|
+
r: "20.2",
|
|
3057
|
+
fill: "none",
|
|
3058
|
+
strokeWidth: "3.6"
|
|
3059
|
+
})));
|
|
3060
|
+
}
|
|
3061
|
+
|
|
3062
|
+
var _excluded$4 = ["className", "progressBarStyles", "value"];
|
|
3063
|
+
|
|
3064
|
+
function LinearProgress(_ref) {
|
|
3065
|
+
var className = _ref.className,
|
|
3066
|
+
progressBarStyles = _ref.progressBarStyles,
|
|
3067
|
+
value = _ref.value,
|
|
3068
|
+
otherProps = _objectWithoutProperties(_ref, _excluded$4);
|
|
3069
|
+
|
|
3070
|
+
var newValue = value;
|
|
3071
|
+
|
|
3072
|
+
if (value > 100) {
|
|
3073
|
+
newValue = 100;
|
|
3074
|
+
}
|
|
3075
|
+
|
|
3076
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
3077
|
+
className: classNames("KUI-LinearProgress", className)
|
|
3078
|
+
}, otherProps), /*#__PURE__*/React.createElement("div", {
|
|
3079
|
+
className: classNames("KUI-LinearProgress_bar", progressBarStyles),
|
|
3080
|
+
style: {
|
|
3081
|
+
transform: "translateX(".concat(newValue - 100, "%)")
|
|
3082
|
+
}
|
|
3083
|
+
}));
|
|
3084
|
+
}
|
|
3085
|
+
|
|
3086
|
+
LinearProgress.defaultProps = {
|
|
3087
|
+
value: 0
|
|
3088
|
+
};
|
|
3089
|
+
|
|
3090
|
+
var _excluded$3 = ["value", "onChange", "className", "indicatorPos", "indicatorHidden", "children"];
|
|
3091
|
+
|
|
3092
|
+
var nextItem = function nextItem(list, item) {
|
|
3093
|
+
if (list === item) {
|
|
3094
|
+
return list.firstChild;
|
|
3095
|
+
}
|
|
3096
|
+
|
|
3097
|
+
if (item && item.nextElementSibling) {
|
|
3098
|
+
return item.nextElementSibling;
|
|
3099
|
+
}
|
|
3100
|
+
|
|
3101
|
+
return list.firstChild;
|
|
3102
|
+
};
|
|
3103
|
+
|
|
3104
|
+
var previousItem = function previousItem(list, item) {
|
|
3105
|
+
if (list === item) {
|
|
3106
|
+
return list.lastChild;
|
|
3107
|
+
}
|
|
3108
|
+
|
|
3109
|
+
if (item && item.previousElementSibling) {
|
|
3110
|
+
return item.previousElementSibling;
|
|
3111
|
+
}
|
|
3112
|
+
|
|
3113
|
+
return list.lastChild;
|
|
3114
|
+
};
|
|
3115
|
+
|
|
3116
|
+
var moveFocus = function moveFocus(list, currentFocus, traversalFunction) {
|
|
3117
|
+
var nextFocus = traversalFunction(list, currentFocus);
|
|
3118
|
+
nextFocus.focus();
|
|
3119
|
+
};
|
|
3120
|
+
|
|
3121
|
+
var Tabs = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
3122
|
+
var value = props.value,
|
|
3123
|
+
onChange = props.onChange,
|
|
3124
|
+
className = props.className,
|
|
3125
|
+
indicatorPos = props.indicatorPos,
|
|
3126
|
+
indicatorHidden = props.indicatorHidden,
|
|
3127
|
+
childrenProp = props.children,
|
|
3128
|
+
otherProps = _objectWithoutProperties(props, _excluded$3);
|
|
3129
|
+
|
|
3130
|
+
var tabListRef = useRef(null);
|
|
3131
|
+
|
|
3132
|
+
var _useState = useState({}),
|
|
3133
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
3134
|
+
indicatorStyles = _useState2[0],
|
|
3135
|
+
setIndicatorStyles = _useState2[1];
|
|
3136
|
+
|
|
3137
|
+
var handleKeyDown = function handleKeyDown(e) {
|
|
3138
|
+
var list = tabListRef.current;
|
|
3139
|
+
var currFocus = list.ownerDocument.activeElement;
|
|
3140
|
+
|
|
3141
|
+
switch (e.key) {
|
|
3142
|
+
case "ArrowLeft":
|
|
3143
|
+
e.preventDefault();
|
|
3144
|
+
moveFocus(list, currFocus, previousItem);
|
|
3145
|
+
break;
|
|
3146
|
+
|
|
3147
|
+
case "ArrowRight":
|
|
3148
|
+
e.preventDefault();
|
|
3149
|
+
moveFocus(list, currFocus, nextItem);
|
|
3150
|
+
break;
|
|
3151
|
+
|
|
3152
|
+
case "Home":
|
|
3153
|
+
e.preventDefault();
|
|
3154
|
+
moveFocus(list, currFocus, nextItem);
|
|
3155
|
+
break;
|
|
3156
|
+
|
|
3157
|
+
case "End":
|
|
3158
|
+
e.preventDefault();
|
|
3159
|
+
moveFocus(list, currFocus, previousItem);
|
|
3160
|
+
break;
|
|
3161
|
+
}
|
|
3162
|
+
};
|
|
3163
|
+
|
|
3164
|
+
var children = React.Children.map(childrenProp, function (child, childIndex) {
|
|
3165
|
+
if (! /*#__PURE__*/React.isValidElement(child)) {
|
|
3166
|
+
return null;
|
|
3167
|
+
}
|
|
3168
|
+
|
|
3169
|
+
var childValue = child.props.value === undefined ? childIndex : child.props.value;
|
|
3170
|
+
var selected = childValue === value;
|
|
3171
|
+
return /*#__PURE__*/React.cloneElement(child, {
|
|
3172
|
+
selected: selected,
|
|
3173
|
+
onChange: onChange,
|
|
3174
|
+
value: childValue
|
|
3175
|
+
});
|
|
3176
|
+
});
|
|
3177
|
+
useEffect(function () {
|
|
3178
|
+
var _tabListRef$current;
|
|
3179
|
+
|
|
3180
|
+
var selectedTab = (_tabListRef$current = tabListRef.current) === null || _tabListRef$current === void 0 ? void 0 : _tabListRef$current.children[value];
|
|
3181
|
+
setIndicatorStyles({
|
|
3182
|
+
width: selectedTab === null || selectedTab === void 0 ? void 0 : selectedTab.clientWidth,
|
|
3183
|
+
// transform: `translateX(${selectedTab?.offsetLeft})`,
|
|
3184
|
+
left: selectedTab === null || selectedTab === void 0 ? void 0 : selectedTab.offsetLeft
|
|
3185
|
+
});
|
|
3186
|
+
}, [value]);
|
|
3187
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
3188
|
+
ref: ref,
|
|
3189
|
+
className: "KUI-Tabs"
|
|
3190
|
+
}, otherProps), /*#__PURE__*/React.createElement("div", {
|
|
3191
|
+
tabIndex: 0,
|
|
3192
|
+
role: "tablist",
|
|
3193
|
+
className: classNames("KUI-TabList", className),
|
|
3194
|
+
ref: tabListRef,
|
|
3195
|
+
onKeyDown: handleKeyDown
|
|
3196
|
+
}, children), /*#__PURE__*/React.createElement("span", {
|
|
3197
|
+
className: classNames("KUI-Tabs_indicator", indicatorHidden && "KUI-Tabs_hidden", indicatorPos),
|
|
3198
|
+
style: indicatorStyles
|
|
3199
|
+
}));
|
|
3200
|
+
});
|
|
3201
|
+
Tabs.propTypes = {
|
|
3202
|
+
indicatorPos: PropTypes.oneOf(["bottom", "top"])
|
|
3203
|
+
};
|
|
3204
|
+
Tabs.defaultProps = {
|
|
3205
|
+
indicatorPos: "bottom"
|
|
3206
|
+
};
|
|
3207
|
+
|
|
3208
|
+
var _excluded$2 = ["selected", "value", "className", "onChange", "onClick"];
|
|
3209
|
+
var Tab = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
3210
|
+
var selected = props.selected,
|
|
3211
|
+
value = props.value,
|
|
3212
|
+
className = props.className,
|
|
3213
|
+
onChange = props.onChange,
|
|
3214
|
+
onClick = props.onClick,
|
|
3215
|
+
other = _objectWithoutProperties(props, _excluded$2);
|
|
3216
|
+
|
|
3217
|
+
var handleClick = function handleClick(e) {
|
|
3218
|
+
if (!selected && onChange) {
|
|
3219
|
+
onChange(e, value);
|
|
3220
|
+
}
|
|
3221
|
+
|
|
3222
|
+
if (onClick) {
|
|
3223
|
+
onClick(e);
|
|
3224
|
+
}
|
|
3225
|
+
};
|
|
3226
|
+
|
|
3227
|
+
return /*#__PURE__*/React.createElement("button", _extends({
|
|
3228
|
+
className: classNames("KUI-Tab", className),
|
|
3229
|
+
type: "button",
|
|
3230
|
+
role: "tab",
|
|
3231
|
+
"aria-selected": selected,
|
|
3232
|
+
tabIndex: selected ? 0 : -1,
|
|
3233
|
+
"aria-controls": "tabpanel-".concat(value),
|
|
3234
|
+
id: "tab-".concat(value),
|
|
3235
|
+
ref: ref,
|
|
3236
|
+
onClick: handleClick
|
|
3237
|
+
}, other), /*#__PURE__*/React.createElement(Caption, {
|
|
3238
|
+
weight: 600,
|
|
3239
|
+
size: "sm",
|
|
3240
|
+
color: "white"
|
|
3241
|
+
}, other.label));
|
|
3242
|
+
});
|
|
3243
|
+
Tab.propTypes = {
|
|
3244
|
+
label: PropTypes.string
|
|
3245
|
+
};
|
|
3246
|
+
|
|
3247
|
+
var TabsPanel = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
3248
|
+
var tabs = props.tabs,
|
|
3249
|
+
tabPanels = props.tabPanels,
|
|
3250
|
+
paths = props.paths,
|
|
3251
|
+
activeTab = props.activeTab,
|
|
3252
|
+
onChange = props.onChange,
|
|
3253
|
+
indicatorPos = props.indicatorPos;
|
|
3254
|
+
|
|
3255
|
+
var _React$useState = React.useState(Number(activeTab)),
|
|
3256
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
3257
|
+
value = _React$useState2[0],
|
|
3258
|
+
setValue = _React$useState2[1];
|
|
3259
|
+
|
|
3260
|
+
var handleChange = function handleChange(event, newValue) {
|
|
3261
|
+
setValue(newValue);
|
|
3262
|
+
|
|
3263
|
+
if (paths && paths.length > 0) {
|
|
3264
|
+
window.history.pushState({
|
|
3265
|
+
route: paths[newValue]
|
|
3266
|
+
}, "", paths[newValue]);
|
|
3267
|
+
}
|
|
3268
|
+
|
|
3269
|
+
if (onChange) {
|
|
3270
|
+
onChange(event, newValue);
|
|
3271
|
+
}
|
|
3272
|
+
};
|
|
3273
|
+
|
|
3274
|
+
useEffect(function () {
|
|
3275
|
+
setValue(Number(activeTab));
|
|
3276
|
+
}, [activeTab]);
|
|
3277
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
3278
|
+
ref: ref
|
|
3279
|
+
}, /*#__PURE__*/React.createElement(Tabs, {
|
|
3280
|
+
value: value,
|
|
3281
|
+
onChange: handleChange,
|
|
3282
|
+
indicatorPos: indicatorPos
|
|
3283
|
+
}, tabs.map(function (item) {
|
|
3284
|
+
return /*#__PURE__*/React.createElement(Tab, {
|
|
3285
|
+
label: item,
|
|
3286
|
+
key: item
|
|
3287
|
+
});
|
|
3288
|
+
})), tabPanels.map(function (item, index) {
|
|
3289
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
3290
|
+
key: index,
|
|
3291
|
+
role: "tabpanel",
|
|
3292
|
+
hidden: value !== index,
|
|
3293
|
+
id: "tabpanel-".concat(index),
|
|
3294
|
+
"aria-labelledby": "tab-".concat(index)
|
|
3295
|
+
}, value === index && item);
|
|
3296
|
+
}));
|
|
3297
|
+
});
|
|
3298
|
+
TabsPanel.propTypes = {
|
|
3299
|
+
indicatorPos: PropTypes.oneOf(["bottom", "top"])
|
|
3300
|
+
};
|
|
3301
|
+
|
|
3302
|
+
var ScrollTab = function ScrollTab(_ref) {
|
|
3303
|
+
var selected = _ref.selected,
|
|
3304
|
+
value = _ref.value,
|
|
3305
|
+
label = _ref.label,
|
|
3306
|
+
name = _ref.name,
|
|
3307
|
+
onChange = _ref.onChange,
|
|
3308
|
+
offset = _ref.offset,
|
|
3309
|
+
isScrolling = _ref.isScrolling,
|
|
3310
|
+
setIsScrolling = _ref.setIsScrolling,
|
|
3311
|
+
setIsIndicatorHidden = _ref.setIsIndicatorHidden,
|
|
3312
|
+
isActive = _ref.isActive,
|
|
3313
|
+
setIsActive = _ref.setIsActive;
|
|
3314
|
+
var activeRef = useRef(true);
|
|
3315
|
+
var scrollingRef = useRef(isScrolling);
|
|
3316
|
+
|
|
3317
|
+
var handleSelect = function handleSelect(e) {
|
|
3318
|
+
setTimeout(function () {
|
|
3319
|
+
setIsIndicatorHidden(false);
|
|
3320
|
+
setIsActive(true);
|
|
3321
|
+
});
|
|
3322
|
+
|
|
3323
|
+
if (!isScrolling && onChange) {
|
|
3324
|
+
onChange(e, value);
|
|
3325
|
+
}
|
|
3326
|
+
};
|
|
3327
|
+
|
|
3328
|
+
var handleInactive = function handleInactive() {
|
|
3329
|
+
setIsActive(false);
|
|
3330
|
+
setTimeout(function () {
|
|
3331
|
+
if (!activeRef.current && !scrollingRef.current) {
|
|
3332
|
+
setIsIndicatorHidden(true);
|
|
3333
|
+
}
|
|
3334
|
+
}, 10);
|
|
3335
|
+
};
|
|
3336
|
+
|
|
3337
|
+
useEffect(function () {
|
|
3338
|
+
activeRef.current = isActive;
|
|
3339
|
+
}, [isActive]);
|
|
3340
|
+
useEffect(function () {
|
|
3341
|
+
scrollingRef.current = isScrolling;
|
|
3342
|
+
}, [isScrolling]);
|
|
3343
|
+
|
|
3344
|
+
var handleKeyDown = function handleKeyDown(e) {
|
|
3345
|
+
switch (e.key) {
|
|
3346
|
+
case "Enter":
|
|
3347
|
+
handleSelect(e);
|
|
3348
|
+
scroller.scrollTo(name, {
|
|
3349
|
+
offset: offset
|
|
3350
|
+
});
|
|
3351
|
+
break;
|
|
3352
|
+
|
|
3353
|
+
case "Space":
|
|
3354
|
+
handleSelect(e);
|
|
3355
|
+
scroller.scrollTo(name, {
|
|
3356
|
+
offset: offset
|
|
3357
|
+
});
|
|
3358
|
+
break;
|
|
3359
|
+
}
|
|
3360
|
+
};
|
|
3361
|
+
|
|
3362
|
+
var startScrolling = function startScrolling() {
|
|
3363
|
+
setIsScrolling(true);
|
|
3364
|
+
};
|
|
3365
|
+
|
|
3366
|
+
var endScrolling = function endScrolling() {
|
|
3367
|
+
setIsScrolling(false);
|
|
3368
|
+
};
|
|
3369
|
+
|
|
3370
|
+
useEffect(function () {
|
|
3371
|
+
if (selected) {
|
|
3372
|
+
scroller.scrollTo(name, {
|
|
3373
|
+
offset: offset
|
|
3374
|
+
});
|
|
3375
|
+
}
|
|
3376
|
+
|
|
3377
|
+
Events.scrollEvent.register("begin", function (to, element) {
|
|
3378
|
+
startScrolling();
|
|
3379
|
+
});
|
|
3380
|
+
Events.scrollEvent.register("end", function (to, element) {
|
|
3381
|
+
setTimeout(endScrolling);
|
|
3382
|
+
});
|
|
3383
|
+
return function () {
|
|
3384
|
+
Events.scrollEvent.remove("begin");
|
|
3385
|
+
Events.scrollEvent.remove("end");
|
|
3386
|
+
};
|
|
3387
|
+
}, []);
|
|
3388
|
+
|
|
3389
|
+
var handleClick = function handleClick(e) {
|
|
3390
|
+
if (!selected && onChange) {
|
|
3391
|
+
onChange(e, value);
|
|
3392
|
+
}
|
|
3393
|
+
};
|
|
3394
|
+
|
|
3395
|
+
return /*#__PURE__*/React.createElement(Link, {
|
|
3396
|
+
to: name,
|
|
3397
|
+
spy: true,
|
|
3398
|
+
smooth: true,
|
|
3399
|
+
duration: 600,
|
|
3400
|
+
offset: offset,
|
|
3401
|
+
onSetActive: handleSelect,
|
|
3402
|
+
onSetInactive: handleInactive,
|
|
3403
|
+
className: "KUI-ScrollTab",
|
|
3404
|
+
role: "tab",
|
|
3405
|
+
"aria-selected": selected,
|
|
3406
|
+
tabIndex: selected ? 0 : -1,
|
|
3407
|
+
"aria-controls": "tabpanel-".concat(value),
|
|
3408
|
+
id: "tab-".concat(value),
|
|
3409
|
+
onKeyDown: handleKeyDown,
|
|
3410
|
+
onClick: handleClick
|
|
3411
|
+
}, /*#__PURE__*/React.createElement(Caption, {
|
|
3412
|
+
weight: 600,
|
|
3413
|
+
size: "sm",
|
|
3414
|
+
color: "white"
|
|
3415
|
+
}, label));
|
|
3416
|
+
};
|
|
3417
|
+
|
|
3418
|
+
var _excluded$1 = ["tabs", "tabsId", "activeTab", "onChange", "indicatorPos", "offset"];
|
|
3419
|
+
var MenuPanel = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
3420
|
+
var tabs = props.tabs,
|
|
3421
|
+
tabsId = props.tabsId,
|
|
3422
|
+
activeTab = props.activeTab,
|
|
3423
|
+
onChange = props.onChange,
|
|
3424
|
+
indicatorPos = props.indicatorPos,
|
|
3425
|
+
offset = props.offset,
|
|
3426
|
+
other = _objectWithoutProperties(props, _excluded$1);
|
|
3427
|
+
|
|
3428
|
+
var _React$useState = React.useState(Number(activeTab)),
|
|
3429
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
3430
|
+
value = _React$useState2[0],
|
|
3431
|
+
setValue = _React$useState2[1];
|
|
3432
|
+
|
|
3433
|
+
var _useState = useState(false),
|
|
3434
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
3435
|
+
isIndicatorHidden = _useState2[0],
|
|
3436
|
+
setIsIndicatorHidden = _useState2[1];
|
|
3437
|
+
|
|
3438
|
+
var _useState3 = useState(false),
|
|
3439
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
3440
|
+
isScrolling = _useState4[0],
|
|
3441
|
+
setIsScrolling = _useState4[1];
|
|
3442
|
+
|
|
3443
|
+
var _useState5 = useState(true),
|
|
3444
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
3445
|
+
isActive = _useState6[0],
|
|
3446
|
+
setIsActive = _useState6[1];
|
|
3447
|
+
|
|
3448
|
+
var handleChange = function handleChange(event, newValue) {
|
|
3449
|
+
setValue(newValue);
|
|
3450
|
+
|
|
3451
|
+
if (onChange) {
|
|
3452
|
+
onChange(event, newValue);
|
|
3453
|
+
}
|
|
3454
|
+
};
|
|
3455
|
+
|
|
3456
|
+
useEffect(function () {
|
|
3457
|
+
setValue(Number(activeTab));
|
|
3458
|
+
}, [activeTab]);
|
|
3459
|
+
return /*#__PURE__*/React.createElement(Tabs, _extends({
|
|
3460
|
+
ref: ref,
|
|
3461
|
+
value: value,
|
|
3462
|
+
onChange: handleChange,
|
|
3463
|
+
indicatorPos: indicatorPos,
|
|
3464
|
+
indicatorHidden: isIndicatorHidden
|
|
3465
|
+
}, other), tabs.map(function (item, index) {
|
|
3466
|
+
return /*#__PURE__*/React.createElement(ScrollTab, {
|
|
3467
|
+
isScrolling: isScrolling,
|
|
3468
|
+
setIsScrolling: setIsScrolling,
|
|
3469
|
+
offset: offset,
|
|
3470
|
+
label: item,
|
|
3471
|
+
name: tabsId && tabsId[index] || item,
|
|
3472
|
+
key: item,
|
|
3473
|
+
setIsIndicatorHidden: setIsIndicatorHidden,
|
|
3474
|
+
isActive: isActive,
|
|
3475
|
+
setIsActive: setIsActive
|
|
3476
|
+
});
|
|
3477
|
+
}));
|
|
3478
|
+
});
|
|
3479
|
+
MenuPanel.propTypes = {
|
|
3480
|
+
indicatorPos: PropTypes.oneOf(["bottom", "top"])
|
|
3481
|
+
};
|
|
3482
|
+
|
|
3483
|
+
var _excluded = ["className"];
|
|
3484
|
+
var IconButton = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
3485
|
+
var className = _ref.className,
|
|
3486
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
3487
|
+
|
|
3488
|
+
return /*#__PURE__*/React.createElement("button", _extends({
|
|
3489
|
+
className: classNames("KUI-IconButton", className),
|
|
3490
|
+
ref: ref
|
|
3491
|
+
}, props));
|
|
3492
|
+
});
|
|
3493
|
+
|
|
3494
|
+
export { Accordion, AccordionDetails, AccordionSummary, AppBar, Box, Button, Caption, Checkbox, CircularProgress, Container, Divider, Grid, Heading, IconButton, Input, InputFile, InputWithAdornments, InputWithCountryDropdown, InputWithMask, LinearProgress, MenuPanel, Modal, Radio, Skeleton, Switch, Tab, Tabs, TabsPanel, Text, ToolBar, theme };
|
|
3495
|
+
//# sourceMappingURL=index.es.js.map
|