@helpdice/ui 2.1.5 → 2.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auto-complete/index.js +2158 -17
- package/dist/button/button.d.ts +1 -1
- package/dist/button/index.js +73 -16
- package/dist/button/styles.d.ts +1 -0
- package/dist/carousal/index.js +73 -16
- package/dist/container/box.d.ts +42 -0
- package/dist/container/index.d.ts +2 -0
- package/dist/container/index.js +948 -0
- package/dist/copy-to-clipboard/clipboard.d.ts +14 -0
- package/dist/copy-to-clipboard/copy.d.ts +2 -0
- package/dist/copy-to-clipboard/index.d.ts +2 -0
- package/dist/copy-to-clipboard/index.js +1702 -0
- package/dist/copy-to-clipboard/toggle-selection.d.ts +1 -0
- package/dist/grid/index.d.ts +2 -3
- package/dist/grid/index.js +0 -1
- package/dist/html-renderer/index.js +35 -12
- package/dist/index.d.ts +6 -6
- package/dist/index.js +15776 -15418
- package/dist/input/index.d.ts +4 -0
- package/dist/input/index.js +2162 -18
- package/dist/input/input-props.d.ts +1 -0
- package/dist/input/phone-input/phone.d.ts +13 -0
- package/dist/modal/index.js +73 -16
- package/dist/notetip/index.js +690 -0
- package/{esm/notetip/index.d.ts → dist/notetip/note-tip.d.ts} +2 -2
- package/dist/placeholder/index.js +643 -8
- package/dist/table/index.js +4370 -2163
- package/dist/text/child.d.ts +1 -0
- package/dist/text/index.js +686 -8
- package/dist/text/text.d.ts +1 -0
- package/esm/button/button.d.ts +1 -1
- package/esm/button/button.js +51 -5
- package/esm/button/styles.d.ts +1 -0
- package/esm/button/styles.js +22 -11
- package/esm/container/box.d.ts +42 -0
- package/esm/container/box.js +39 -0
- package/esm/container/index.d.ts +2 -0
- package/esm/container/index.js +2 -0
- package/esm/copy-to-clipboard/clipboard.d.ts +14 -0
- package/esm/copy-to-clipboard/clipboard.js +91 -0
- package/esm/copy-to-clipboard/copy.d.ts +2 -0
- package/esm/copy-to-clipboard/copy.js +105 -0
- package/esm/copy-to-clipboard/index.d.ts +2 -0
- package/esm/copy-to-clipboard/index.js +2 -0
- package/esm/copy-to-clipboard/toggle-selection.d.ts +1 -0
- package/esm/copy-to-clipboard/toggle-selection.js +31 -0
- package/esm/grid/index.d.ts +2 -3
- package/esm/grid/index.js +5 -3
- package/esm/index.d.ts +6 -6
- package/esm/index.js +7 -5
- package/esm/input/index.d.ts +4 -0
- package/esm/input/index.js +4 -0
- package/esm/input/input-field.js +12 -10
- package/esm/input/input-props.d.ts +1 -0
- package/esm/input/phone-input/phone.d.ts +13 -0
- package/esm/input/phone-input/phone.js +166 -0
- package/esm/notetip/index.js +2 -97
- package/{dist/notetip/index.d.ts → esm/notetip/note-tip.d.ts} +2 -2
- package/esm/notetip/note-tip.js +97 -0
- package/esm/table/table-body.js +2 -2
- package/esm/table/table-cell.js +1 -1
- package/esm/table/table-head.js +4 -2
- package/esm/table/table.js +0 -1
- package/esm/text/child.d.ts +1 -0
- package/esm/text/text.d.ts +1 -0
- package/esm/text/text.js +25 -3
- package/package.json +19 -19
- package/dist/currency-input/index.js +0 -862
- package/dist/phone-input/index.js +0 -2033
- package/dist/phone-input/phone.d.ts +0 -11
- package/esm/phone-input/phone.d.ts +0 -11
- package/esm/phone-input/phone.js +0 -161
- /package/dist/{currency-input → input/currency-input}/components/CurrencyInput.d.ts +0 -0
- /package/dist/{currency-input → input/currency-input}/components/CurrencyInputProps.d.ts +0 -0
- /package/dist/{currency-input → input/currency-input}/components/utils/cleanValue.d.ts +0 -0
- /package/dist/{currency-input → input/currency-input}/components/utils/escapeRegExp.d.ts +0 -0
- /package/dist/{currency-input → input/currency-input}/components/utils/fixedDecimalValue.d.ts +0 -0
- /package/dist/{currency-input → input/currency-input}/components/utils/formatValue.d.ts +0 -0
- /package/dist/{currency-input → input/currency-input}/components/utils/getLocaleConfig.d.ts +0 -0
- /package/dist/{currency-input → input/currency-input}/components/utils/getSuffix.d.ts +0 -0
- /package/dist/{currency-input → input/currency-input}/components/utils/index.d.ts +0 -0
- /package/dist/{currency-input → input/currency-input}/components/utils/isNumber.d.ts +0 -0
- /package/dist/{currency-input → input/currency-input}/components/utils/padTrimValue.d.ts +0 -0
- /package/dist/{currency-input → input/currency-input}/components/utils/parseAbbrValue.d.ts +0 -0
- /package/dist/{currency-input → input/currency-input}/components/utils/removeInvalidChars.d.ts +0 -0
- /package/dist/{currency-input → input/currency-input}/components/utils/removeSeparators.d.ts +0 -0
- /package/dist/{currency-input → input/currency-input}/components/utils/repositionCursor.d.ts +0 -0
- /package/dist/{currency-input → input/currency-input}/index.d.ts +0 -0
- /package/dist/{phone-input → input/phone-input}/index.d.ts +0 -0
- /package/esm/{currency-input → input/currency-input}/components/CurrencyInput.d.ts +0 -0
- /package/esm/{currency-input → input/currency-input}/components/CurrencyInput.js +0 -0
- /package/esm/{currency-input → input/currency-input}/components/CurrencyInputProps.d.ts +0 -0
- /package/esm/{currency-input → input/currency-input}/components/CurrencyInputProps.js +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/addSeparators.js +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/cleanValue.d.ts +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/cleanValue.js +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/escapeRegExp.d.ts +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/escapeRegExp.js +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/fixedDecimalValue.d.ts +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/fixedDecimalValue.js +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/formatValue.d.ts +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/formatValue.js +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/getLocaleConfig.d.ts +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/getLocaleConfig.js +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/getSuffix.d.ts +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/getSuffix.js +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/index.d.ts +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/index.js +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/isNumber.d.ts +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/isNumber.js +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/padTrimValue.d.ts +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/padTrimValue.js +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/parseAbbrValue.d.ts +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/parseAbbrValue.js +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/removeInvalidChars.d.ts +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/removeInvalidChars.js +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/removeSeparators.d.ts +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/removeSeparators.js +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/repositionCursor.d.ts +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/repositionCursor.js +0 -0
- /package/esm/{currency-input → input/currency-input}/index.d.ts +0 -0
- /package/esm/{currency-input → input/currency-input}/index.js +0 -0
- /package/esm/{phone-input → input/phone-input}/index.d.ts +0 -0
- /package/esm/{phone-input → input/phone-input}/index.js +0 -0
|
@@ -1,2033 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var React = require('react');
|
|
6
|
-
var theme = require('@helpdice/theme');
|
|
7
|
-
|
|
8
|
-
function _arrayLikeToArray(r, a) {
|
|
9
|
-
(null == a || a > r.length) && (a = r.length);
|
|
10
|
-
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
11
|
-
return n;
|
|
12
|
-
}
|
|
13
|
-
function _arrayWithHoles(r) {
|
|
14
|
-
if (Array.isArray(r)) return r;
|
|
15
|
-
}
|
|
16
|
-
function _iterableToArrayLimit(r, l) {
|
|
17
|
-
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
18
|
-
if (null != t) {
|
|
19
|
-
var e,
|
|
20
|
-
n,
|
|
21
|
-
i,
|
|
22
|
-
u,
|
|
23
|
-
a = [],
|
|
24
|
-
f = true,
|
|
25
|
-
o = false;
|
|
26
|
-
try {
|
|
27
|
-
if (i = (t = t.call(r)).next, 0 === l) ; else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
28
|
-
} catch (r) {
|
|
29
|
-
o = true, n = r;
|
|
30
|
-
} finally {
|
|
31
|
-
try {
|
|
32
|
-
if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
|
|
33
|
-
} finally {
|
|
34
|
-
if (o) throw n;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
return a;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
function _nonIterableRest() {
|
|
41
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
42
|
-
}
|
|
43
|
-
function _slicedToArray(r, e) {
|
|
44
|
-
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
|
|
45
|
-
}
|
|
46
|
-
function _unsupportedIterableToArray(r, a) {
|
|
47
|
-
if (r) {
|
|
48
|
-
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
49
|
-
var t = {}.toString.call(r).slice(8, -1);
|
|
50
|
-
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
function getDefaultExportFromCjs (x) {
|
|
55
|
-
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
var index = {};
|
|
59
|
-
|
|
60
|
-
var hasRequiredIndex;
|
|
61
|
-
|
|
62
|
-
function requireIndex () {
|
|
63
|
-
if (hasRequiredIndex) return index;
|
|
64
|
-
hasRequiredIndex = 1;
|
|
65
|
-
var React$1 = React;
|
|
66
|
-
|
|
67
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
68
|
-
|
|
69
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React$1);
|
|
70
|
-
|
|
71
|
-
/*
|
|
72
|
-
Based on Glamor's sheet
|
|
73
|
-
https://github.com/threepointone/glamor/blob/667b480d31b3721a905021b26e1290ce92ca2879/src/sheet.js
|
|
74
|
-
*/ function _defineProperties(target, props) {
|
|
75
|
-
for(var i = 0; i < props.length; i++){
|
|
76
|
-
var descriptor = props[i];
|
|
77
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
78
|
-
descriptor.configurable = true;
|
|
79
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
80
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
function _createClass(Constructor, protoProps, staticProps) {
|
|
84
|
-
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
85
|
-
return Constructor;
|
|
86
|
-
}
|
|
87
|
-
var isProd = typeof process !== "undefined" && process.env && process.env.NODE_ENV === "production";
|
|
88
|
-
var isString = function(o) {
|
|
89
|
-
return Object.prototype.toString.call(o) === "[object String]";
|
|
90
|
-
};
|
|
91
|
-
var StyleSheet = /*#__PURE__*/ function() {
|
|
92
|
-
function StyleSheet(param) {
|
|
93
|
-
var ref = param === void 0 ? {} : param, _name = ref.name, name = _name === void 0 ? "stylesheet" : _name, _optimizeForSpeed = ref.optimizeForSpeed, optimizeForSpeed = _optimizeForSpeed === void 0 ? isProd : _optimizeForSpeed;
|
|
94
|
-
invariant$1(isString(name), "`name` must be a string");
|
|
95
|
-
this._name = name;
|
|
96
|
-
this._deletedRulePlaceholder = "#" + name + "-deleted-rule____{}";
|
|
97
|
-
invariant$1(typeof optimizeForSpeed === "boolean", "`optimizeForSpeed` must be a boolean");
|
|
98
|
-
this._optimizeForSpeed = optimizeForSpeed;
|
|
99
|
-
this._serverSheet = undefined;
|
|
100
|
-
this._tags = [];
|
|
101
|
-
this._injected = false;
|
|
102
|
-
this._rulesCount = 0;
|
|
103
|
-
var node = typeof window !== "undefined" && document.querySelector('meta[property="csp-nonce"]');
|
|
104
|
-
this._nonce = node ? node.getAttribute("content") : null;
|
|
105
|
-
}
|
|
106
|
-
var _proto = StyleSheet.prototype;
|
|
107
|
-
_proto.setOptimizeForSpeed = function setOptimizeForSpeed(bool) {
|
|
108
|
-
invariant$1(typeof bool === "boolean", "`setOptimizeForSpeed` accepts a boolean");
|
|
109
|
-
invariant$1(this._rulesCount === 0, "optimizeForSpeed cannot be when rules have already been inserted");
|
|
110
|
-
this.flush();
|
|
111
|
-
this._optimizeForSpeed = bool;
|
|
112
|
-
this.inject();
|
|
113
|
-
};
|
|
114
|
-
_proto.isOptimizeForSpeed = function isOptimizeForSpeed() {
|
|
115
|
-
return this._optimizeForSpeed;
|
|
116
|
-
};
|
|
117
|
-
_proto.inject = function inject() {
|
|
118
|
-
var _this = this;
|
|
119
|
-
invariant$1(!this._injected, "sheet already injected");
|
|
120
|
-
this._injected = true;
|
|
121
|
-
if (typeof window !== "undefined" && this._optimizeForSpeed) {
|
|
122
|
-
this._tags[0] = this.makeStyleTag(this._name);
|
|
123
|
-
this._optimizeForSpeed = "insertRule" in this.getSheet();
|
|
124
|
-
if (!this._optimizeForSpeed) {
|
|
125
|
-
if (!isProd) {
|
|
126
|
-
console.warn("StyleSheet: optimizeForSpeed mode not supported falling back to standard mode.");
|
|
127
|
-
}
|
|
128
|
-
this.flush();
|
|
129
|
-
this._injected = true;
|
|
130
|
-
}
|
|
131
|
-
return;
|
|
132
|
-
}
|
|
133
|
-
this._serverSheet = {
|
|
134
|
-
cssRules: [],
|
|
135
|
-
insertRule: function(rule, index) {
|
|
136
|
-
if (typeof index === "number") {
|
|
137
|
-
_this._serverSheet.cssRules[index] = {
|
|
138
|
-
cssText: rule
|
|
139
|
-
};
|
|
140
|
-
} else {
|
|
141
|
-
_this._serverSheet.cssRules.push({
|
|
142
|
-
cssText: rule
|
|
143
|
-
});
|
|
144
|
-
}
|
|
145
|
-
return index;
|
|
146
|
-
},
|
|
147
|
-
deleteRule: function(index) {
|
|
148
|
-
_this._serverSheet.cssRules[index] = null;
|
|
149
|
-
}
|
|
150
|
-
};
|
|
151
|
-
};
|
|
152
|
-
_proto.getSheetForTag = function getSheetForTag(tag) {
|
|
153
|
-
if (tag.sheet) {
|
|
154
|
-
return tag.sheet;
|
|
155
|
-
}
|
|
156
|
-
// this weirdness brought to you by firefox
|
|
157
|
-
for(var i = 0; i < document.styleSheets.length; i++){
|
|
158
|
-
if (document.styleSheets[i].ownerNode === tag) {
|
|
159
|
-
return document.styleSheets[i];
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
};
|
|
163
|
-
_proto.getSheet = function getSheet() {
|
|
164
|
-
return this.getSheetForTag(this._tags[this._tags.length - 1]);
|
|
165
|
-
};
|
|
166
|
-
_proto.insertRule = function insertRule(rule, index) {
|
|
167
|
-
invariant$1(isString(rule), "`insertRule` accepts only strings");
|
|
168
|
-
if (typeof window === "undefined") {
|
|
169
|
-
if (typeof index !== "number") {
|
|
170
|
-
index = this._serverSheet.cssRules.length;
|
|
171
|
-
}
|
|
172
|
-
this._serverSheet.insertRule(rule, index);
|
|
173
|
-
return this._rulesCount++;
|
|
174
|
-
}
|
|
175
|
-
if (this._optimizeForSpeed) {
|
|
176
|
-
var sheet = this.getSheet();
|
|
177
|
-
if (typeof index !== "number") {
|
|
178
|
-
index = sheet.cssRules.length;
|
|
179
|
-
}
|
|
180
|
-
// this weirdness for perf, and chrome's weird bug
|
|
181
|
-
// https://stackoverflow.com/questions/20007992/chrome-suddenly-stopped-accepting-insertrule
|
|
182
|
-
try {
|
|
183
|
-
sheet.insertRule(rule, index);
|
|
184
|
-
} catch (error) {
|
|
185
|
-
if (!isProd) {
|
|
186
|
-
console.warn("StyleSheet: illegal rule: \n\n" + rule + "\n\nSee https://stackoverflow.com/q/20007992 for more info");
|
|
187
|
-
}
|
|
188
|
-
return -1;
|
|
189
|
-
}
|
|
190
|
-
} else {
|
|
191
|
-
var insertionPoint = this._tags[index];
|
|
192
|
-
this._tags.push(this.makeStyleTag(this._name, rule, insertionPoint));
|
|
193
|
-
}
|
|
194
|
-
return this._rulesCount++;
|
|
195
|
-
};
|
|
196
|
-
_proto.replaceRule = function replaceRule(index, rule) {
|
|
197
|
-
if (this._optimizeForSpeed || typeof window === "undefined") {
|
|
198
|
-
var sheet = typeof window !== "undefined" ? this.getSheet() : this._serverSheet;
|
|
199
|
-
if (!rule.trim()) {
|
|
200
|
-
rule = this._deletedRulePlaceholder;
|
|
201
|
-
}
|
|
202
|
-
if (!sheet.cssRules[index]) {
|
|
203
|
-
// @TBD Should we throw an error?
|
|
204
|
-
return index;
|
|
205
|
-
}
|
|
206
|
-
sheet.deleteRule(index);
|
|
207
|
-
try {
|
|
208
|
-
sheet.insertRule(rule, index);
|
|
209
|
-
} catch (error) {
|
|
210
|
-
if (!isProd) {
|
|
211
|
-
console.warn("StyleSheet: illegal rule: \n\n" + rule + "\n\nSee https://stackoverflow.com/q/20007992 for more info");
|
|
212
|
-
}
|
|
213
|
-
// In order to preserve the indices we insert a deleteRulePlaceholder
|
|
214
|
-
sheet.insertRule(this._deletedRulePlaceholder, index);
|
|
215
|
-
}
|
|
216
|
-
} else {
|
|
217
|
-
var tag = this._tags[index];
|
|
218
|
-
invariant$1(tag, "old rule at index `" + index + "` not found");
|
|
219
|
-
tag.textContent = rule;
|
|
220
|
-
}
|
|
221
|
-
return index;
|
|
222
|
-
};
|
|
223
|
-
_proto.deleteRule = function deleteRule(index) {
|
|
224
|
-
if (typeof window === "undefined") {
|
|
225
|
-
this._serverSheet.deleteRule(index);
|
|
226
|
-
return;
|
|
227
|
-
}
|
|
228
|
-
if (this._optimizeForSpeed) {
|
|
229
|
-
this.replaceRule(index, "");
|
|
230
|
-
} else {
|
|
231
|
-
var tag = this._tags[index];
|
|
232
|
-
invariant$1(tag, "rule at index `" + index + "` not found");
|
|
233
|
-
tag.parentNode.removeChild(tag);
|
|
234
|
-
this._tags[index] = null;
|
|
235
|
-
}
|
|
236
|
-
};
|
|
237
|
-
_proto.flush = function flush() {
|
|
238
|
-
this._injected = false;
|
|
239
|
-
this._rulesCount = 0;
|
|
240
|
-
if (typeof window !== "undefined") {
|
|
241
|
-
this._tags.forEach(function(tag) {
|
|
242
|
-
return tag && tag.parentNode.removeChild(tag);
|
|
243
|
-
});
|
|
244
|
-
this._tags = [];
|
|
245
|
-
} else {
|
|
246
|
-
// simpler on server
|
|
247
|
-
this._serverSheet.cssRules = [];
|
|
248
|
-
}
|
|
249
|
-
};
|
|
250
|
-
_proto.cssRules = function cssRules() {
|
|
251
|
-
var _this = this;
|
|
252
|
-
if (typeof window === "undefined") {
|
|
253
|
-
return this._serverSheet.cssRules;
|
|
254
|
-
}
|
|
255
|
-
return this._tags.reduce(function(rules, tag) {
|
|
256
|
-
if (tag) {
|
|
257
|
-
rules = rules.concat(Array.prototype.map.call(_this.getSheetForTag(tag).cssRules, function(rule) {
|
|
258
|
-
return rule.cssText === _this._deletedRulePlaceholder ? null : rule;
|
|
259
|
-
}));
|
|
260
|
-
} else {
|
|
261
|
-
rules.push(null);
|
|
262
|
-
}
|
|
263
|
-
return rules;
|
|
264
|
-
}, []);
|
|
265
|
-
};
|
|
266
|
-
_proto.makeStyleTag = function makeStyleTag(name, cssString, relativeToTag) {
|
|
267
|
-
if (cssString) {
|
|
268
|
-
invariant$1(isString(cssString), "makeStyleTag accepts only strings as second parameter");
|
|
269
|
-
}
|
|
270
|
-
var tag = document.createElement("style");
|
|
271
|
-
if (this._nonce) tag.setAttribute("nonce", this._nonce);
|
|
272
|
-
tag.type = "text/css";
|
|
273
|
-
tag.setAttribute("data-" + name, "");
|
|
274
|
-
if (cssString) {
|
|
275
|
-
tag.appendChild(document.createTextNode(cssString));
|
|
276
|
-
}
|
|
277
|
-
var head = document.head || document.getElementsByTagName("head")[0];
|
|
278
|
-
if (relativeToTag) {
|
|
279
|
-
head.insertBefore(tag, relativeToTag);
|
|
280
|
-
} else {
|
|
281
|
-
head.appendChild(tag);
|
|
282
|
-
}
|
|
283
|
-
return tag;
|
|
284
|
-
};
|
|
285
|
-
_createClass(StyleSheet, [
|
|
286
|
-
{
|
|
287
|
-
key: "length",
|
|
288
|
-
get: function get() {
|
|
289
|
-
return this._rulesCount;
|
|
290
|
-
}
|
|
291
|
-
}
|
|
292
|
-
]);
|
|
293
|
-
return StyleSheet;
|
|
294
|
-
}();
|
|
295
|
-
function invariant$1(condition, message) {
|
|
296
|
-
if (!condition) {
|
|
297
|
-
throw new Error("StyleSheet: " + message + ".");
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
function hash(str) {
|
|
302
|
-
var _$hash = 5381, i = str.length;
|
|
303
|
-
while(i){
|
|
304
|
-
_$hash = _$hash * 33 ^ str.charCodeAt(--i);
|
|
305
|
-
}
|
|
306
|
-
/* JavaScript does bitwise operations (like XOR, above) on 32-bit signed
|
|
307
|
-
* integers. Since we want the results to be always positive, convert the
|
|
308
|
-
* signed int to an unsigned by doing an unsigned bitshift. */ return _$hash >>> 0;
|
|
309
|
-
}
|
|
310
|
-
var stringHash = hash;
|
|
311
|
-
|
|
312
|
-
var sanitize = function(rule) {
|
|
313
|
-
return rule.replace(/\/style/gi, "\\/style");
|
|
314
|
-
};
|
|
315
|
-
var cache = {};
|
|
316
|
-
/**
|
|
317
|
-
* computeId
|
|
318
|
-
*
|
|
319
|
-
* Compute and memoize a jsx id from a basedId and optionally props.
|
|
320
|
-
*/ function computeId(baseId, props) {
|
|
321
|
-
if (!props) {
|
|
322
|
-
return "jsx-" + baseId;
|
|
323
|
-
}
|
|
324
|
-
var propsToString = String(props);
|
|
325
|
-
var key = baseId + propsToString;
|
|
326
|
-
if (!cache[key]) {
|
|
327
|
-
cache[key] = "jsx-" + stringHash(baseId + "-" + propsToString);
|
|
328
|
-
}
|
|
329
|
-
return cache[key];
|
|
330
|
-
}
|
|
331
|
-
/**
|
|
332
|
-
* computeSelector
|
|
333
|
-
*
|
|
334
|
-
* Compute and memoize dynamic selectors.
|
|
335
|
-
*/ function computeSelector(id, css) {
|
|
336
|
-
var selectoPlaceholderRegexp = /__jsx-style-dynamic-selector/g;
|
|
337
|
-
// Sanitize SSR-ed CSS.
|
|
338
|
-
// Client side code doesn't need to be sanitized since we use
|
|
339
|
-
// document.createTextNode (dev) and the CSSOM api sheet.insertRule (prod).
|
|
340
|
-
if (typeof window === "undefined") {
|
|
341
|
-
css = sanitize(css);
|
|
342
|
-
}
|
|
343
|
-
var idcss = id + css;
|
|
344
|
-
if (!cache[idcss]) {
|
|
345
|
-
cache[idcss] = css.replace(selectoPlaceholderRegexp, id);
|
|
346
|
-
}
|
|
347
|
-
return cache[idcss];
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
function mapRulesToStyle(cssRules, options) {
|
|
351
|
-
if (options === void 0) options = {};
|
|
352
|
-
return cssRules.map(function(args) {
|
|
353
|
-
var id = args[0];
|
|
354
|
-
var css = args[1];
|
|
355
|
-
return /*#__PURE__*/ React__default["default"].createElement("style", {
|
|
356
|
-
id: "__" + id,
|
|
357
|
-
// Avoid warnings upon render with a key
|
|
358
|
-
key: "__" + id,
|
|
359
|
-
nonce: options.nonce ? options.nonce : undefined,
|
|
360
|
-
dangerouslySetInnerHTML: {
|
|
361
|
-
__html: css
|
|
362
|
-
}
|
|
363
|
-
});
|
|
364
|
-
});
|
|
365
|
-
}
|
|
366
|
-
var StyleSheetRegistry = /*#__PURE__*/ function() {
|
|
367
|
-
function StyleSheetRegistry(param) {
|
|
368
|
-
var ref = param === void 0 ? {} : param, _styleSheet = ref.styleSheet, styleSheet = _styleSheet === void 0 ? null : _styleSheet, _optimizeForSpeed = ref.optimizeForSpeed, optimizeForSpeed = _optimizeForSpeed === void 0 ? false : _optimizeForSpeed;
|
|
369
|
-
this._sheet = styleSheet || new StyleSheet({
|
|
370
|
-
name: "styled-jsx",
|
|
371
|
-
optimizeForSpeed: optimizeForSpeed
|
|
372
|
-
});
|
|
373
|
-
this._sheet.inject();
|
|
374
|
-
if (styleSheet && typeof optimizeForSpeed === "boolean") {
|
|
375
|
-
this._sheet.setOptimizeForSpeed(optimizeForSpeed);
|
|
376
|
-
this._optimizeForSpeed = this._sheet.isOptimizeForSpeed();
|
|
377
|
-
}
|
|
378
|
-
this._fromServer = undefined;
|
|
379
|
-
this._indices = {};
|
|
380
|
-
this._instancesCounts = {};
|
|
381
|
-
}
|
|
382
|
-
var _proto = StyleSheetRegistry.prototype;
|
|
383
|
-
_proto.add = function add(props) {
|
|
384
|
-
var _this = this;
|
|
385
|
-
if (undefined === this._optimizeForSpeed) {
|
|
386
|
-
this._optimizeForSpeed = Array.isArray(props.children);
|
|
387
|
-
this._sheet.setOptimizeForSpeed(this._optimizeForSpeed);
|
|
388
|
-
this._optimizeForSpeed = this._sheet.isOptimizeForSpeed();
|
|
389
|
-
}
|
|
390
|
-
if (typeof window !== "undefined" && !this._fromServer) {
|
|
391
|
-
this._fromServer = this.selectFromServer();
|
|
392
|
-
this._instancesCounts = Object.keys(this._fromServer).reduce(function(acc, tagName) {
|
|
393
|
-
acc[tagName] = 0;
|
|
394
|
-
return acc;
|
|
395
|
-
}, {});
|
|
396
|
-
}
|
|
397
|
-
var ref = this.getIdAndRules(props), styleId = ref.styleId, rules = ref.rules;
|
|
398
|
-
// Deduping: just increase the instances count.
|
|
399
|
-
if (styleId in this._instancesCounts) {
|
|
400
|
-
this._instancesCounts[styleId] += 1;
|
|
401
|
-
return;
|
|
402
|
-
}
|
|
403
|
-
var indices = rules.map(function(rule) {
|
|
404
|
-
return _this._sheet.insertRule(rule);
|
|
405
|
-
})// Filter out invalid rules
|
|
406
|
-
.filter(function(index) {
|
|
407
|
-
return index !== -1;
|
|
408
|
-
});
|
|
409
|
-
this._indices[styleId] = indices;
|
|
410
|
-
this._instancesCounts[styleId] = 1;
|
|
411
|
-
};
|
|
412
|
-
_proto.remove = function remove(props) {
|
|
413
|
-
var _this = this;
|
|
414
|
-
var styleId = this.getIdAndRules(props).styleId;
|
|
415
|
-
invariant(styleId in this._instancesCounts, "styleId: `" + styleId + "` not found");
|
|
416
|
-
this._instancesCounts[styleId] -= 1;
|
|
417
|
-
if (this._instancesCounts[styleId] < 1) {
|
|
418
|
-
var tagFromServer = this._fromServer && this._fromServer[styleId];
|
|
419
|
-
if (tagFromServer) {
|
|
420
|
-
tagFromServer.parentNode.removeChild(tagFromServer);
|
|
421
|
-
delete this._fromServer[styleId];
|
|
422
|
-
} else {
|
|
423
|
-
this._indices[styleId].forEach(function(index) {
|
|
424
|
-
return _this._sheet.deleteRule(index);
|
|
425
|
-
});
|
|
426
|
-
delete this._indices[styleId];
|
|
427
|
-
}
|
|
428
|
-
delete this._instancesCounts[styleId];
|
|
429
|
-
}
|
|
430
|
-
};
|
|
431
|
-
_proto.update = function update(props, nextProps) {
|
|
432
|
-
this.add(nextProps);
|
|
433
|
-
this.remove(props);
|
|
434
|
-
};
|
|
435
|
-
_proto.flush = function flush() {
|
|
436
|
-
this._sheet.flush();
|
|
437
|
-
this._sheet.inject();
|
|
438
|
-
this._fromServer = undefined;
|
|
439
|
-
this._indices = {};
|
|
440
|
-
this._instancesCounts = {};
|
|
441
|
-
};
|
|
442
|
-
_proto.cssRules = function cssRules() {
|
|
443
|
-
var _this = this;
|
|
444
|
-
var fromServer = this._fromServer ? Object.keys(this._fromServer).map(function(styleId) {
|
|
445
|
-
return [
|
|
446
|
-
styleId,
|
|
447
|
-
_this._fromServer[styleId]
|
|
448
|
-
];
|
|
449
|
-
}) : [];
|
|
450
|
-
var cssRules = this._sheet.cssRules();
|
|
451
|
-
return fromServer.concat(Object.keys(this._indices).map(function(styleId) {
|
|
452
|
-
return [
|
|
453
|
-
styleId,
|
|
454
|
-
_this._indices[styleId].map(function(index) {
|
|
455
|
-
return cssRules[index].cssText;
|
|
456
|
-
}).join(_this._optimizeForSpeed ? "" : "\n")
|
|
457
|
-
];
|
|
458
|
-
})// filter out empty rules
|
|
459
|
-
.filter(function(rule) {
|
|
460
|
-
return Boolean(rule[1]);
|
|
461
|
-
}));
|
|
462
|
-
};
|
|
463
|
-
_proto.styles = function styles(options) {
|
|
464
|
-
return mapRulesToStyle(this.cssRules(), options);
|
|
465
|
-
};
|
|
466
|
-
_proto.getIdAndRules = function getIdAndRules(props) {
|
|
467
|
-
var css = props.children, dynamic = props.dynamic, id = props.id;
|
|
468
|
-
if (dynamic) {
|
|
469
|
-
var styleId = computeId(id, dynamic);
|
|
470
|
-
return {
|
|
471
|
-
styleId: styleId,
|
|
472
|
-
rules: Array.isArray(css) ? css.map(function(rule) {
|
|
473
|
-
return computeSelector(styleId, rule);
|
|
474
|
-
}) : [
|
|
475
|
-
computeSelector(styleId, css)
|
|
476
|
-
]
|
|
477
|
-
};
|
|
478
|
-
}
|
|
479
|
-
return {
|
|
480
|
-
styleId: computeId(id),
|
|
481
|
-
rules: Array.isArray(css) ? css : [
|
|
482
|
-
css
|
|
483
|
-
]
|
|
484
|
-
};
|
|
485
|
-
};
|
|
486
|
-
/**
|
|
487
|
-
* selectFromServer
|
|
488
|
-
*
|
|
489
|
-
* Collects style tags from the document with id __jsx-XXX
|
|
490
|
-
*/ _proto.selectFromServer = function selectFromServer() {
|
|
491
|
-
var elements = Array.prototype.slice.call(document.querySelectorAll('[id^="__jsx-"]'));
|
|
492
|
-
return elements.reduce(function(acc, element) {
|
|
493
|
-
var id = element.id.slice(2);
|
|
494
|
-
acc[id] = element;
|
|
495
|
-
return acc;
|
|
496
|
-
}, {});
|
|
497
|
-
};
|
|
498
|
-
return StyleSheetRegistry;
|
|
499
|
-
}();
|
|
500
|
-
function invariant(condition, message) {
|
|
501
|
-
if (!condition) {
|
|
502
|
-
throw new Error("StyleSheetRegistry: " + message + ".");
|
|
503
|
-
}
|
|
504
|
-
}
|
|
505
|
-
var StyleSheetContext = /*#__PURE__*/ React$1.createContext(null);
|
|
506
|
-
StyleSheetContext.displayName = "StyleSheetContext";
|
|
507
|
-
function createStyleRegistry() {
|
|
508
|
-
return new StyleSheetRegistry();
|
|
509
|
-
}
|
|
510
|
-
function StyleRegistry(param) {
|
|
511
|
-
var configuredRegistry = param.registry, children = param.children;
|
|
512
|
-
var rootRegistry = React$1.useContext(StyleSheetContext);
|
|
513
|
-
var ref = React$1.useState(function() {
|
|
514
|
-
return rootRegistry || configuredRegistry || createStyleRegistry();
|
|
515
|
-
}), registry = ref[0];
|
|
516
|
-
return /*#__PURE__*/ React__default["default"].createElement(StyleSheetContext.Provider, {
|
|
517
|
-
value: registry
|
|
518
|
-
}, children);
|
|
519
|
-
}
|
|
520
|
-
function useStyleRegistry() {
|
|
521
|
-
return React$1.useContext(StyleSheetContext);
|
|
522
|
-
}
|
|
523
|
-
|
|
524
|
-
// Opt-into the new `useInsertionEffect` API in React 18, fallback to `useLayoutEffect`.
|
|
525
|
-
// https://github.com/reactwg/react-18/discussions/110
|
|
526
|
-
var useInsertionEffect = React__default["default"].useInsertionEffect || React$1.useLayoutEffect;
|
|
527
|
-
var defaultRegistry = typeof window !== "undefined" ? createStyleRegistry() : undefined;
|
|
528
|
-
function JSXStyle(props) {
|
|
529
|
-
var registry = defaultRegistry ? defaultRegistry : useStyleRegistry();
|
|
530
|
-
var insertionEffectCalled = React$1.useRef(false);
|
|
531
|
-
// `registry` might not exist while server-side rendering
|
|
532
|
-
if (!registry) {
|
|
533
|
-
return null;
|
|
534
|
-
}
|
|
535
|
-
if (typeof window === "undefined") {
|
|
536
|
-
registry.add(props);
|
|
537
|
-
return null;
|
|
538
|
-
}
|
|
539
|
-
useInsertionEffect(function() {
|
|
540
|
-
// ReactDOM removes all DOM during hydration in certain cases
|
|
541
|
-
if (!document.head) {
|
|
542
|
-
return;
|
|
543
|
-
}
|
|
544
|
-
registry.add(props);
|
|
545
|
-
insertionEffectCalled.current = true;
|
|
546
|
-
return function() {
|
|
547
|
-
insertionEffectCalled.current = false;
|
|
548
|
-
registry.remove(props);
|
|
549
|
-
};
|
|
550
|
-
}, [
|
|
551
|
-
props.id,
|
|
552
|
-
String(props.dynamic)
|
|
553
|
-
]);
|
|
554
|
-
React$1.useLayoutEffect(function() {
|
|
555
|
-
if (!document.head || insertionEffectCalled.current) {
|
|
556
|
-
return;
|
|
557
|
-
}
|
|
558
|
-
registry.add(props);
|
|
559
|
-
return function() {
|
|
560
|
-
registry.remove(props);
|
|
561
|
-
};
|
|
562
|
-
// props.children can be string[], will be striped since id is identical
|
|
563
|
-
}, [
|
|
564
|
-
props.id,
|
|
565
|
-
String(props.dynamic)
|
|
566
|
-
]);
|
|
567
|
-
return null;
|
|
568
|
-
}
|
|
569
|
-
JSXStyle.dynamic = function(info) {
|
|
570
|
-
return info.map(function(tagInfo) {
|
|
571
|
-
var baseId = tagInfo[0];
|
|
572
|
-
var props = tagInfo[1];
|
|
573
|
-
return computeId(baseId, props);
|
|
574
|
-
}).join(" ");
|
|
575
|
-
};
|
|
576
|
-
|
|
577
|
-
index.StyleRegistry = StyleRegistry;
|
|
578
|
-
index.createStyleRegistry = createStyleRegistry;
|
|
579
|
-
index.style = JSXStyle;
|
|
580
|
-
index.useStyleRegistry = useStyleRegistry;
|
|
581
|
-
return index;
|
|
582
|
-
}
|
|
583
|
-
|
|
584
|
-
var style;
|
|
585
|
-
var hasRequiredStyle;
|
|
586
|
-
|
|
587
|
-
function requireStyle () {
|
|
588
|
-
if (hasRequiredStyle) return style;
|
|
589
|
-
hasRequiredStyle = 1;
|
|
590
|
-
style = requireIndex().style;
|
|
591
|
-
return style;
|
|
592
|
-
}
|
|
593
|
-
|
|
594
|
-
var styleExports = requireStyle();
|
|
595
|
-
var _JSXStyle = /*@__PURE__*/getDefaultExportFromCjs(styleExports);
|
|
596
|
-
|
|
597
|
-
var countries = [
|
|
598
|
-
{
|
|
599
|
-
code: "AD",
|
|
600
|
-
label: "Andorra",
|
|
601
|
-
phone: "+376"
|
|
602
|
-
},
|
|
603
|
-
{
|
|
604
|
-
code: "AE",
|
|
605
|
-
label: "United Arab Emirates",
|
|
606
|
-
phone: "+971"
|
|
607
|
-
},
|
|
608
|
-
{
|
|
609
|
-
code: "AF",
|
|
610
|
-
label: "Afghanistan",
|
|
611
|
-
phone: "+93"
|
|
612
|
-
},
|
|
613
|
-
{
|
|
614
|
-
code: "AG",
|
|
615
|
-
label: "Antigua and Barbuda",
|
|
616
|
-
phone: "+1-268"
|
|
617
|
-
},
|
|
618
|
-
{
|
|
619
|
-
code: "AI",
|
|
620
|
-
label: "Anguilla",
|
|
621
|
-
phone: "+1-264"
|
|
622
|
-
},
|
|
623
|
-
{
|
|
624
|
-
code: "AL",
|
|
625
|
-
label: "Albania",
|
|
626
|
-
phone: "+355"
|
|
627
|
-
},
|
|
628
|
-
{
|
|
629
|
-
code: "AM",
|
|
630
|
-
label: "Armenia",
|
|
631
|
-
phone: "+374"
|
|
632
|
-
},
|
|
633
|
-
{
|
|
634
|
-
code: "AO",
|
|
635
|
-
label: "Angola",
|
|
636
|
-
phone: "+244"
|
|
637
|
-
},
|
|
638
|
-
{
|
|
639
|
-
code: "AQ",
|
|
640
|
-
label: "Antarctica",
|
|
641
|
-
phone: "+672"
|
|
642
|
-
},
|
|
643
|
-
{
|
|
644
|
-
code: "AR",
|
|
645
|
-
label: "Argentina",
|
|
646
|
-
phone: "+54"
|
|
647
|
-
},
|
|
648
|
-
{
|
|
649
|
-
code: "AS",
|
|
650
|
-
label: "American Samoa",
|
|
651
|
-
phone: "+1-684"
|
|
652
|
-
},
|
|
653
|
-
{
|
|
654
|
-
code: "AT",
|
|
655
|
-
label: "Austria",
|
|
656
|
-
phone: "+43"
|
|
657
|
-
},
|
|
658
|
-
{
|
|
659
|
-
code: "AU",
|
|
660
|
-
label: "Australia",
|
|
661
|
-
phone: "+61",
|
|
662
|
-
suggested: true
|
|
663
|
-
},
|
|
664
|
-
{
|
|
665
|
-
code: "AW",
|
|
666
|
-
label: "Aruba",
|
|
667
|
-
phone: "+297"
|
|
668
|
-
},
|
|
669
|
-
{
|
|
670
|
-
code: "AX",
|
|
671
|
-
label: "Alland Islands",
|
|
672
|
-
phone: "+358"
|
|
673
|
-
},
|
|
674
|
-
{
|
|
675
|
-
code: "AZ",
|
|
676
|
-
label: "Azerbaijan",
|
|
677
|
-
phone: "+994"
|
|
678
|
-
},
|
|
679
|
-
{
|
|
680
|
-
code: "BA",
|
|
681
|
-
label: "Bosnia and Herzegovina",
|
|
682
|
-
phone: "+387"
|
|
683
|
-
},
|
|
684
|
-
{
|
|
685
|
-
code: "BB",
|
|
686
|
-
label: "Barbados",
|
|
687
|
-
phone: "+1-246"
|
|
688
|
-
},
|
|
689
|
-
{
|
|
690
|
-
code: "BD",
|
|
691
|
-
label: "Bangladesh",
|
|
692
|
-
phone: "+880"
|
|
693
|
-
},
|
|
694
|
-
{
|
|
695
|
-
code: "BE",
|
|
696
|
-
label: "Belgium",
|
|
697
|
-
phone: "+32"
|
|
698
|
-
},
|
|
699
|
-
{
|
|
700
|
-
code: "BF",
|
|
701
|
-
label: "Burkina Faso",
|
|
702
|
-
phone: "+226"
|
|
703
|
-
},
|
|
704
|
-
{
|
|
705
|
-
code: "BG",
|
|
706
|
-
label: "Bulgaria",
|
|
707
|
-
phone: "+359"
|
|
708
|
-
},
|
|
709
|
-
{
|
|
710
|
-
code: "BH",
|
|
711
|
-
label: "Bahrain",
|
|
712
|
-
phone: "+973"
|
|
713
|
-
},
|
|
714
|
-
{
|
|
715
|
-
code: "BI",
|
|
716
|
-
label: "Burundi",
|
|
717
|
-
phone: "+257"
|
|
718
|
-
},
|
|
719
|
-
{
|
|
720
|
-
code: "BJ",
|
|
721
|
-
label: "Benin",
|
|
722
|
-
phone: "+229"
|
|
723
|
-
},
|
|
724
|
-
{
|
|
725
|
-
code: "BL",
|
|
726
|
-
label: "Saint Barthelemy",
|
|
727
|
-
phone: "+590"
|
|
728
|
-
},
|
|
729
|
-
{
|
|
730
|
-
code: "BM",
|
|
731
|
-
label: "Bermuda",
|
|
732
|
-
phone: "+1-441"
|
|
733
|
-
},
|
|
734
|
-
{
|
|
735
|
-
code: "BN",
|
|
736
|
-
label: "Brunei Darussalam",
|
|
737
|
-
phone: "+673"
|
|
738
|
-
},
|
|
739
|
-
{
|
|
740
|
-
code: "BO",
|
|
741
|
-
label: "Bolivia",
|
|
742
|
-
phone: "+591"
|
|
743
|
-
},
|
|
744
|
-
{
|
|
745
|
-
code: "BR",
|
|
746
|
-
label: "Brazil",
|
|
747
|
-
phone: "+55"
|
|
748
|
-
},
|
|
749
|
-
{
|
|
750
|
-
code: "BS",
|
|
751
|
-
label: "Bahamas",
|
|
752
|
-
phone: "+1-242"
|
|
753
|
-
},
|
|
754
|
-
{
|
|
755
|
-
code: "BT",
|
|
756
|
-
label: "Bhutan",
|
|
757
|
-
phone: "+975"
|
|
758
|
-
},
|
|
759
|
-
{
|
|
760
|
-
code: "BV",
|
|
761
|
-
label: "Bouvet Island",
|
|
762
|
-
phone: "+47"
|
|
763
|
-
},
|
|
764
|
-
{
|
|
765
|
-
code: "BW",
|
|
766
|
-
label: "Botswana",
|
|
767
|
-
phone: "+267"
|
|
768
|
-
},
|
|
769
|
-
{
|
|
770
|
-
code: "BY",
|
|
771
|
-
label: "Belarus",
|
|
772
|
-
phone: "+375"
|
|
773
|
-
},
|
|
774
|
-
{
|
|
775
|
-
code: "BZ",
|
|
776
|
-
label: "Belize",
|
|
777
|
-
phone: "+501"
|
|
778
|
-
},
|
|
779
|
-
{
|
|
780
|
-
code: "CA",
|
|
781
|
-
label: "Canada",
|
|
782
|
-
phone: "+1",
|
|
783
|
-
suggested: true
|
|
784
|
-
},
|
|
785
|
-
{
|
|
786
|
-
code: "CC",
|
|
787
|
-
label: "Cocos (Keeling) Islands",
|
|
788
|
-
phone: "+61"
|
|
789
|
-
},
|
|
790
|
-
{
|
|
791
|
-
code: "CD",
|
|
792
|
-
label: "Congo, Democratic Republic of the",
|
|
793
|
-
phone: "+243"
|
|
794
|
-
},
|
|
795
|
-
{
|
|
796
|
-
code: "CF",
|
|
797
|
-
label: "Central African Republic",
|
|
798
|
-
phone: "+236"
|
|
799
|
-
},
|
|
800
|
-
{
|
|
801
|
-
code: "CG",
|
|
802
|
-
label: "Congo, Republic of the",
|
|
803
|
-
phone: "+242"
|
|
804
|
-
},
|
|
805
|
-
{
|
|
806
|
-
code: "CH",
|
|
807
|
-
label: "Switzerland",
|
|
808
|
-
phone: "+41"
|
|
809
|
-
},
|
|
810
|
-
{
|
|
811
|
-
code: "CI",
|
|
812
|
-
label: "Cote d'Ivoire",
|
|
813
|
-
phone: "+225"
|
|
814
|
-
},
|
|
815
|
-
{
|
|
816
|
-
code: "CK",
|
|
817
|
-
label: "Cook Islands",
|
|
818
|
-
phone: "+682"
|
|
819
|
-
},
|
|
820
|
-
{
|
|
821
|
-
code: "CL",
|
|
822
|
-
label: "Chile",
|
|
823
|
-
phone: "+56"
|
|
824
|
-
},
|
|
825
|
-
{
|
|
826
|
-
code: "CM",
|
|
827
|
-
label: "Cameroon",
|
|
828
|
-
phone: "+237"
|
|
829
|
-
},
|
|
830
|
-
{
|
|
831
|
-
code: "CN",
|
|
832
|
-
label: "China",
|
|
833
|
-
phone: "+86"
|
|
834
|
-
},
|
|
835
|
-
{
|
|
836
|
-
code: "CO",
|
|
837
|
-
label: "Colombia",
|
|
838
|
-
phone: "+57"
|
|
839
|
-
},
|
|
840
|
-
{
|
|
841
|
-
code: "CR",
|
|
842
|
-
label: "Costa Rica",
|
|
843
|
-
phone: "+506"
|
|
844
|
-
},
|
|
845
|
-
{
|
|
846
|
-
code: "CU",
|
|
847
|
-
label: "Cuba",
|
|
848
|
-
phone: "+53"
|
|
849
|
-
},
|
|
850
|
-
{
|
|
851
|
-
code: "CV",
|
|
852
|
-
label: "Cape Verde",
|
|
853
|
-
phone: "+238"
|
|
854
|
-
},
|
|
855
|
-
{
|
|
856
|
-
code: "CW",
|
|
857
|
-
label: "Curacao",
|
|
858
|
-
phone: "+599"
|
|
859
|
-
},
|
|
860
|
-
{
|
|
861
|
-
code: "CX",
|
|
862
|
-
label: "Christmas Island",
|
|
863
|
-
phone: "+61"
|
|
864
|
-
},
|
|
865
|
-
{
|
|
866
|
-
code: "CY",
|
|
867
|
-
label: "Cyprus",
|
|
868
|
-
phone: "+357"
|
|
869
|
-
},
|
|
870
|
-
{
|
|
871
|
-
code: "CZ",
|
|
872
|
-
label: "Czech Republic",
|
|
873
|
-
phone: "+420"
|
|
874
|
-
},
|
|
875
|
-
{
|
|
876
|
-
code: "DE",
|
|
877
|
-
label: "Germany",
|
|
878
|
-
phone: "+49",
|
|
879
|
-
suggested: true
|
|
880
|
-
},
|
|
881
|
-
{
|
|
882
|
-
code: "DJ",
|
|
883
|
-
label: "Djibouti",
|
|
884
|
-
phone: "+253"
|
|
885
|
-
},
|
|
886
|
-
{
|
|
887
|
-
code: "DK",
|
|
888
|
-
label: "Denmark",
|
|
889
|
-
phone: "+45"
|
|
890
|
-
},
|
|
891
|
-
{
|
|
892
|
-
code: "DM",
|
|
893
|
-
label: "Dominica",
|
|
894
|
-
phone: "+1-767"
|
|
895
|
-
},
|
|
896
|
-
{
|
|
897
|
-
code: "DO",
|
|
898
|
-
label: "Dominican Republic",
|
|
899
|
-
phone: "+1-809"
|
|
900
|
-
},
|
|
901
|
-
{
|
|
902
|
-
code: "DZ",
|
|
903
|
-
label: "Algeria",
|
|
904
|
-
phone: "+213"
|
|
905
|
-
},
|
|
906
|
-
{
|
|
907
|
-
code: "EC",
|
|
908
|
-
label: "Ecuador",
|
|
909
|
-
phone: "+593"
|
|
910
|
-
},
|
|
911
|
-
{
|
|
912
|
-
code: "EE",
|
|
913
|
-
label: "Estonia",
|
|
914
|
-
phone: "+372"
|
|
915
|
-
},
|
|
916
|
-
{
|
|
917
|
-
code: "EG",
|
|
918
|
-
label: "Egypt",
|
|
919
|
-
phone: "+20"
|
|
920
|
-
},
|
|
921
|
-
{
|
|
922
|
-
code: "EH",
|
|
923
|
-
label: "Western Sahara",
|
|
924
|
-
phone: "+212"
|
|
925
|
-
},
|
|
926
|
-
{
|
|
927
|
-
code: "ER",
|
|
928
|
-
label: "Eritrea",
|
|
929
|
-
phone: "+291"
|
|
930
|
-
},
|
|
931
|
-
{
|
|
932
|
-
code: "ES",
|
|
933
|
-
label: "Spain",
|
|
934
|
-
phone: "+34"
|
|
935
|
-
},
|
|
936
|
-
{
|
|
937
|
-
code: "ET",
|
|
938
|
-
label: "Ethiopia",
|
|
939
|
-
phone: "+251"
|
|
940
|
-
},
|
|
941
|
-
{
|
|
942
|
-
code: "FI",
|
|
943
|
-
label: "Finland",
|
|
944
|
-
phone: "+358"
|
|
945
|
-
},
|
|
946
|
-
{
|
|
947
|
-
code: "FJ",
|
|
948
|
-
label: "Fiji",
|
|
949
|
-
phone: "+679"
|
|
950
|
-
},
|
|
951
|
-
{
|
|
952
|
-
code: "FK",
|
|
953
|
-
label: "Falkland Islands (Malvinas)",
|
|
954
|
-
phone: "+500"
|
|
955
|
-
},
|
|
956
|
-
{
|
|
957
|
-
code: "FM",
|
|
958
|
-
label: "Micronesia, Federated States of",
|
|
959
|
-
phone: "+691"
|
|
960
|
-
},
|
|
961
|
-
{
|
|
962
|
-
code: "FO",
|
|
963
|
-
label: "Faroe Islands",
|
|
964
|
-
phone: "+298"
|
|
965
|
-
},
|
|
966
|
-
{
|
|
967
|
-
code: "FR",
|
|
968
|
-
label: "France",
|
|
969
|
-
phone: "+33",
|
|
970
|
-
suggested: true
|
|
971
|
-
},
|
|
972
|
-
{
|
|
973
|
-
code: "GA",
|
|
974
|
-
label: "Gabon",
|
|
975
|
-
phone: "+241"
|
|
976
|
-
},
|
|
977
|
-
{
|
|
978
|
-
code: "GB",
|
|
979
|
-
label: "United Kingdom",
|
|
980
|
-
phone: "+44"
|
|
981
|
-
},
|
|
982
|
-
{
|
|
983
|
-
code: "GD",
|
|
984
|
-
label: "Grenada",
|
|
985
|
-
phone: "+1-473"
|
|
986
|
-
},
|
|
987
|
-
{
|
|
988
|
-
code: "GE",
|
|
989
|
-
label: "Georgia",
|
|
990
|
-
phone: "+995"
|
|
991
|
-
},
|
|
992
|
-
{
|
|
993
|
-
code: "GF",
|
|
994
|
-
label: "French Guiana",
|
|
995
|
-
phone: "+594"
|
|
996
|
-
},
|
|
997
|
-
{
|
|
998
|
-
code: "GG",
|
|
999
|
-
label: "Guernsey",
|
|
1000
|
-
phone: "+44"
|
|
1001
|
-
},
|
|
1002
|
-
{
|
|
1003
|
-
code: "GH",
|
|
1004
|
-
label: "Ghana",
|
|
1005
|
-
phone: "+233"
|
|
1006
|
-
},
|
|
1007
|
-
{
|
|
1008
|
-
code: "GI",
|
|
1009
|
-
label: "Gibraltar",
|
|
1010
|
-
phone: "+350"
|
|
1011
|
-
},
|
|
1012
|
-
{
|
|
1013
|
-
code: "GL",
|
|
1014
|
-
label: "Greenland",
|
|
1015
|
-
phone: "+299"
|
|
1016
|
-
},
|
|
1017
|
-
{
|
|
1018
|
-
code: "GM",
|
|
1019
|
-
label: "Gambia",
|
|
1020
|
-
phone: "+220"
|
|
1021
|
-
},
|
|
1022
|
-
{
|
|
1023
|
-
code: "GN",
|
|
1024
|
-
label: "Guinea",
|
|
1025
|
-
phone: "+224"
|
|
1026
|
-
},
|
|
1027
|
-
{
|
|
1028
|
-
code: "GP",
|
|
1029
|
-
label: "Guadeloupe",
|
|
1030
|
-
phone: "+590"
|
|
1031
|
-
},
|
|
1032
|
-
{
|
|
1033
|
-
code: "GQ",
|
|
1034
|
-
label: "Equatorial Guinea",
|
|
1035
|
-
phone: "+240"
|
|
1036
|
-
},
|
|
1037
|
-
{
|
|
1038
|
-
code: "GR",
|
|
1039
|
-
label: "Greece",
|
|
1040
|
-
phone: "+30"
|
|
1041
|
-
},
|
|
1042
|
-
{
|
|
1043
|
-
code: "GS",
|
|
1044
|
-
label: "South Georgia and the South Sandwich Islands",
|
|
1045
|
-
phone: "+500"
|
|
1046
|
-
},
|
|
1047
|
-
{
|
|
1048
|
-
code: "GT",
|
|
1049
|
-
label: "Guatemala",
|
|
1050
|
-
phone: "+502"
|
|
1051
|
-
},
|
|
1052
|
-
{
|
|
1053
|
-
code: "GU",
|
|
1054
|
-
label: "Guam",
|
|
1055
|
-
phone: "+1-671"
|
|
1056
|
-
},
|
|
1057
|
-
{
|
|
1058
|
-
code: "GW",
|
|
1059
|
-
label: "Guinea-Bissau",
|
|
1060
|
-
phone: "+245"
|
|
1061
|
-
},
|
|
1062
|
-
{
|
|
1063
|
-
code: "GY",
|
|
1064
|
-
label: "Guyana",
|
|
1065
|
-
phone: "+592"
|
|
1066
|
-
},
|
|
1067
|
-
{
|
|
1068
|
-
code: "HK",
|
|
1069
|
-
label: "Hong Kong",
|
|
1070
|
-
phone: "+852"
|
|
1071
|
-
},
|
|
1072
|
-
{
|
|
1073
|
-
code: "HM",
|
|
1074
|
-
label: "Heard Island and McDonald Islands",
|
|
1075
|
-
phone: "+672"
|
|
1076
|
-
},
|
|
1077
|
-
{
|
|
1078
|
-
code: "HN",
|
|
1079
|
-
label: "Honduras",
|
|
1080
|
-
phone: "+504"
|
|
1081
|
-
},
|
|
1082
|
-
{
|
|
1083
|
-
code: "HR",
|
|
1084
|
-
label: "Croatia",
|
|
1085
|
-
phone: "+385"
|
|
1086
|
-
},
|
|
1087
|
-
{
|
|
1088
|
-
code: "HT",
|
|
1089
|
-
label: "Haiti",
|
|
1090
|
-
phone: "+509"
|
|
1091
|
-
},
|
|
1092
|
-
{
|
|
1093
|
-
code: "HU",
|
|
1094
|
-
label: "Hungary",
|
|
1095
|
-
phone: "+36"
|
|
1096
|
-
},
|
|
1097
|
-
{
|
|
1098
|
-
code: "ID",
|
|
1099
|
-
label: "Indonesia",
|
|
1100
|
-
phone: "+62"
|
|
1101
|
-
},
|
|
1102
|
-
{
|
|
1103
|
-
code: "IE",
|
|
1104
|
-
label: "Ireland",
|
|
1105
|
-
phone: "+353"
|
|
1106
|
-
},
|
|
1107
|
-
{
|
|
1108
|
-
code: "IL",
|
|
1109
|
-
label: "Israel",
|
|
1110
|
-
phone: "+972"
|
|
1111
|
-
},
|
|
1112
|
-
{
|
|
1113
|
-
code: "IM",
|
|
1114
|
-
label: "Isle of Man",
|
|
1115
|
-
phone: "+44"
|
|
1116
|
-
},
|
|
1117
|
-
{
|
|
1118
|
-
code: "IN",
|
|
1119
|
-
label: "India",
|
|
1120
|
-
phone: "+91"
|
|
1121
|
-
},
|
|
1122
|
-
{
|
|
1123
|
-
code: "IO",
|
|
1124
|
-
label: "British Indian Ocean Territory",
|
|
1125
|
-
phone: "+246"
|
|
1126
|
-
},
|
|
1127
|
-
{
|
|
1128
|
-
code: "IQ",
|
|
1129
|
-
label: "Iraq",
|
|
1130
|
-
phone: "+964"
|
|
1131
|
-
},
|
|
1132
|
-
{
|
|
1133
|
-
code: "IR",
|
|
1134
|
-
label: "Iran, Islamic Republic of",
|
|
1135
|
-
phone: "+98"
|
|
1136
|
-
},
|
|
1137
|
-
{
|
|
1138
|
-
code: "IS",
|
|
1139
|
-
label: "Iceland",
|
|
1140
|
-
phone: "+354"
|
|
1141
|
-
},
|
|
1142
|
-
{
|
|
1143
|
-
code: "IT",
|
|
1144
|
-
label: "Italy",
|
|
1145
|
-
phone: "+39"
|
|
1146
|
-
},
|
|
1147
|
-
{
|
|
1148
|
-
code: "JE",
|
|
1149
|
-
label: "Jersey",
|
|
1150
|
-
phone: "+44"
|
|
1151
|
-
},
|
|
1152
|
-
{
|
|
1153
|
-
code: "JM",
|
|
1154
|
-
label: "Jamaica",
|
|
1155
|
-
phone: "+1-876"
|
|
1156
|
-
},
|
|
1157
|
-
{
|
|
1158
|
-
code: "JO",
|
|
1159
|
-
label: "Jordan",
|
|
1160
|
-
phone: "+962"
|
|
1161
|
-
},
|
|
1162
|
-
{
|
|
1163
|
-
code: "JP",
|
|
1164
|
-
label: "Japan",
|
|
1165
|
-
phone: "+81",
|
|
1166
|
-
suggested: true
|
|
1167
|
-
},
|
|
1168
|
-
{
|
|
1169
|
-
code: "KE",
|
|
1170
|
-
label: "Kenya",
|
|
1171
|
-
phone: "+254"
|
|
1172
|
-
},
|
|
1173
|
-
{
|
|
1174
|
-
code: "KG",
|
|
1175
|
-
label: "Kyrgyzstan",
|
|
1176
|
-
phone: "+996"
|
|
1177
|
-
},
|
|
1178
|
-
{
|
|
1179
|
-
code: "KH",
|
|
1180
|
-
label: "Cambodia",
|
|
1181
|
-
phone: "+855"
|
|
1182
|
-
},
|
|
1183
|
-
{
|
|
1184
|
-
code: "KI",
|
|
1185
|
-
label: "Kiribati",
|
|
1186
|
-
phone: "+686"
|
|
1187
|
-
},
|
|
1188
|
-
{
|
|
1189
|
-
code: "KM",
|
|
1190
|
-
label: "Comoros",
|
|
1191
|
-
phone: "+269"
|
|
1192
|
-
},
|
|
1193
|
-
{
|
|
1194
|
-
code: "KN",
|
|
1195
|
-
label: "Saint Kitts and Nevis",
|
|
1196
|
-
phone: "+1-869"
|
|
1197
|
-
},
|
|
1198
|
-
{
|
|
1199
|
-
code: "KP",
|
|
1200
|
-
label: "Korea, Democratic People's Republic of",
|
|
1201
|
-
phone: "+850"
|
|
1202
|
-
},
|
|
1203
|
-
{
|
|
1204
|
-
code: "KR",
|
|
1205
|
-
label: "Korea, Republic of",
|
|
1206
|
-
phone: "+82"
|
|
1207
|
-
},
|
|
1208
|
-
{
|
|
1209
|
-
code: "KW",
|
|
1210
|
-
label: "Kuwait",
|
|
1211
|
-
phone: "+965"
|
|
1212
|
-
},
|
|
1213
|
-
{
|
|
1214
|
-
code: "KY",
|
|
1215
|
-
label: "Cayman Islands",
|
|
1216
|
-
phone: "+1-345"
|
|
1217
|
-
},
|
|
1218
|
-
{
|
|
1219
|
-
code: "KZ",
|
|
1220
|
-
label: "Kazakhstan",
|
|
1221
|
-
phone: "+7"
|
|
1222
|
-
},
|
|
1223
|
-
{
|
|
1224
|
-
code: "LA",
|
|
1225
|
-
label: "Lao People's Democratic Republic",
|
|
1226
|
-
phone: "+856"
|
|
1227
|
-
},
|
|
1228
|
-
{
|
|
1229
|
-
code: "LB",
|
|
1230
|
-
label: "Lebanon",
|
|
1231
|
-
phone: "+961"
|
|
1232
|
-
},
|
|
1233
|
-
{
|
|
1234
|
-
code: "LC",
|
|
1235
|
-
label: "Saint Lucia",
|
|
1236
|
-
phone: "+1-758"
|
|
1237
|
-
},
|
|
1238
|
-
{
|
|
1239
|
-
code: "LI",
|
|
1240
|
-
label: "Liechtenstein",
|
|
1241
|
-
phone: "+423"
|
|
1242
|
-
},
|
|
1243
|
-
{
|
|
1244
|
-
code: "LK",
|
|
1245
|
-
label: "Sri Lanka",
|
|
1246
|
-
phone: "+94"
|
|
1247
|
-
},
|
|
1248
|
-
{
|
|
1249
|
-
code: "LR",
|
|
1250
|
-
label: "Liberia",
|
|
1251
|
-
phone: "+231"
|
|
1252
|
-
},
|
|
1253
|
-
{
|
|
1254
|
-
code: "LS",
|
|
1255
|
-
label: "Lesotho",
|
|
1256
|
-
phone: "+266"
|
|
1257
|
-
},
|
|
1258
|
-
{
|
|
1259
|
-
code: "LT",
|
|
1260
|
-
label: "Lithuania",
|
|
1261
|
-
phone: "+370"
|
|
1262
|
-
},
|
|
1263
|
-
{
|
|
1264
|
-
code: "LU",
|
|
1265
|
-
label: "Luxembourg",
|
|
1266
|
-
phone: "+352"
|
|
1267
|
-
},
|
|
1268
|
-
{
|
|
1269
|
-
code: "LV",
|
|
1270
|
-
label: "Latvia",
|
|
1271
|
-
phone: "+371"
|
|
1272
|
-
},
|
|
1273
|
-
{
|
|
1274
|
-
code: "LY",
|
|
1275
|
-
label: "Libya",
|
|
1276
|
-
phone: "+218"
|
|
1277
|
-
},
|
|
1278
|
-
{
|
|
1279
|
-
code: "MA",
|
|
1280
|
-
label: "Morocco",
|
|
1281
|
-
phone: "+212"
|
|
1282
|
-
},
|
|
1283
|
-
{
|
|
1284
|
-
code: "MC",
|
|
1285
|
-
label: "Monaco",
|
|
1286
|
-
phone: "+377"
|
|
1287
|
-
},
|
|
1288
|
-
{
|
|
1289
|
-
code: "MD",
|
|
1290
|
-
label: "Moldova, Republic of",
|
|
1291
|
-
phone: "+373"
|
|
1292
|
-
},
|
|
1293
|
-
{
|
|
1294
|
-
code: "ME",
|
|
1295
|
-
label: "Montenegro",
|
|
1296
|
-
phone: "+382"
|
|
1297
|
-
},
|
|
1298
|
-
{
|
|
1299
|
-
code: "MF",
|
|
1300
|
-
label: "Saint Martin (French part)",
|
|
1301
|
-
phone: "+590"
|
|
1302
|
-
},
|
|
1303
|
-
{
|
|
1304
|
-
code: "MG",
|
|
1305
|
-
label: "Madagascar",
|
|
1306
|
-
phone: "+261"
|
|
1307
|
-
},
|
|
1308
|
-
{
|
|
1309
|
-
code: "MH",
|
|
1310
|
-
label: "Marshall Islands",
|
|
1311
|
-
phone: "+692"
|
|
1312
|
-
},
|
|
1313
|
-
{
|
|
1314
|
-
code: "MK",
|
|
1315
|
-
label: "Macedonia, the Former Yugoslav Republic of",
|
|
1316
|
-
phone: "+389"
|
|
1317
|
-
},
|
|
1318
|
-
{
|
|
1319
|
-
code: "ML",
|
|
1320
|
-
label: "Mali",
|
|
1321
|
-
phone: "+223"
|
|
1322
|
-
},
|
|
1323
|
-
{
|
|
1324
|
-
code: "MM",
|
|
1325
|
-
label: "Myanmar",
|
|
1326
|
-
phone: "+95"
|
|
1327
|
-
},
|
|
1328
|
-
{
|
|
1329
|
-
code: "MN",
|
|
1330
|
-
label: "Mongolia",
|
|
1331
|
-
phone: "+976"
|
|
1332
|
-
},
|
|
1333
|
-
{
|
|
1334
|
-
code: "MO",
|
|
1335
|
-
label: "Macao",
|
|
1336
|
-
phone: "+853"
|
|
1337
|
-
},
|
|
1338
|
-
{
|
|
1339
|
-
code: "MP",
|
|
1340
|
-
label: "Northern Mariana Islands",
|
|
1341
|
-
phone: "+1-670"
|
|
1342
|
-
},
|
|
1343
|
-
{
|
|
1344
|
-
code: "MQ",
|
|
1345
|
-
label: "Martinique",
|
|
1346
|
-
phone: "+596"
|
|
1347
|
-
},
|
|
1348
|
-
{
|
|
1349
|
-
code: "MR",
|
|
1350
|
-
label: "Mauritania",
|
|
1351
|
-
phone: "+222"
|
|
1352
|
-
},
|
|
1353
|
-
{
|
|
1354
|
-
code: "MS",
|
|
1355
|
-
label: "Montserrat",
|
|
1356
|
-
phone: "+1-664"
|
|
1357
|
-
},
|
|
1358
|
-
{
|
|
1359
|
-
code: "MT",
|
|
1360
|
-
label: "Malta",
|
|
1361
|
-
phone: "+356"
|
|
1362
|
-
},
|
|
1363
|
-
{
|
|
1364
|
-
code: "MU",
|
|
1365
|
-
label: "Mauritius",
|
|
1366
|
-
phone: "+230"
|
|
1367
|
-
},
|
|
1368
|
-
{
|
|
1369
|
-
code: "MV",
|
|
1370
|
-
label: "Maldives",
|
|
1371
|
-
phone: "+960"
|
|
1372
|
-
},
|
|
1373
|
-
{
|
|
1374
|
-
code: "MW",
|
|
1375
|
-
label: "Malawi",
|
|
1376
|
-
phone: "+265"
|
|
1377
|
-
},
|
|
1378
|
-
{
|
|
1379
|
-
code: "MX",
|
|
1380
|
-
label: "Mexico",
|
|
1381
|
-
phone: "+52"
|
|
1382
|
-
},
|
|
1383
|
-
{
|
|
1384
|
-
code: "MY",
|
|
1385
|
-
label: "Malaysia",
|
|
1386
|
-
phone: "+60"
|
|
1387
|
-
},
|
|
1388
|
-
{
|
|
1389
|
-
code: "MZ",
|
|
1390
|
-
label: "Mozambique",
|
|
1391
|
-
phone: "+258"
|
|
1392
|
-
},
|
|
1393
|
-
{
|
|
1394
|
-
code: "NA",
|
|
1395
|
-
label: "Namibia",
|
|
1396
|
-
phone: "+264"
|
|
1397
|
-
},
|
|
1398
|
-
{
|
|
1399
|
-
code: "NC",
|
|
1400
|
-
label: "New Caledonia",
|
|
1401
|
-
phone: "+687"
|
|
1402
|
-
},
|
|
1403
|
-
{
|
|
1404
|
-
code: "NE",
|
|
1405
|
-
label: "Niger",
|
|
1406
|
-
phone: "+227"
|
|
1407
|
-
},
|
|
1408
|
-
{
|
|
1409
|
-
code: "NF",
|
|
1410
|
-
label: "Norfolk Island",
|
|
1411
|
-
phone: "+672"
|
|
1412
|
-
},
|
|
1413
|
-
{
|
|
1414
|
-
code: "NG",
|
|
1415
|
-
label: "Nigeria",
|
|
1416
|
-
phone: "+234"
|
|
1417
|
-
},
|
|
1418
|
-
{
|
|
1419
|
-
code: "NI",
|
|
1420
|
-
label: "Nicaragua",
|
|
1421
|
-
phone: "+505"
|
|
1422
|
-
},
|
|
1423
|
-
{
|
|
1424
|
-
code: "NL",
|
|
1425
|
-
label: "Netherlands",
|
|
1426
|
-
phone: "+31"
|
|
1427
|
-
},
|
|
1428
|
-
{
|
|
1429
|
-
code: "NO",
|
|
1430
|
-
label: "Norway",
|
|
1431
|
-
phone: "+47"
|
|
1432
|
-
},
|
|
1433
|
-
{
|
|
1434
|
-
code: "NP",
|
|
1435
|
-
label: "Nepal",
|
|
1436
|
-
phone: "+977"
|
|
1437
|
-
},
|
|
1438
|
-
{
|
|
1439
|
-
code: "NR",
|
|
1440
|
-
label: "Nauru",
|
|
1441
|
-
phone: "+674"
|
|
1442
|
-
},
|
|
1443
|
-
{
|
|
1444
|
-
code: "NU",
|
|
1445
|
-
label: "Niue",
|
|
1446
|
-
phone: "+683"
|
|
1447
|
-
},
|
|
1448
|
-
{
|
|
1449
|
-
code: "NZ",
|
|
1450
|
-
label: "New Zealand",
|
|
1451
|
-
phone: "+64"
|
|
1452
|
-
},
|
|
1453
|
-
{
|
|
1454
|
-
code: "OM",
|
|
1455
|
-
label: "Oman",
|
|
1456
|
-
phone: "+968"
|
|
1457
|
-
},
|
|
1458
|
-
{
|
|
1459
|
-
code: "PA",
|
|
1460
|
-
label: "Panama",
|
|
1461
|
-
phone: "+507"
|
|
1462
|
-
},
|
|
1463
|
-
{
|
|
1464
|
-
code: "PE",
|
|
1465
|
-
label: "Peru",
|
|
1466
|
-
phone: "+51"
|
|
1467
|
-
},
|
|
1468
|
-
{
|
|
1469
|
-
code: "PF",
|
|
1470
|
-
label: "French Polynesia",
|
|
1471
|
-
phone: "+689"
|
|
1472
|
-
},
|
|
1473
|
-
{
|
|
1474
|
-
code: "PG",
|
|
1475
|
-
label: "Papua New Guinea",
|
|
1476
|
-
phone: "+675"
|
|
1477
|
-
},
|
|
1478
|
-
{
|
|
1479
|
-
code: "PH",
|
|
1480
|
-
label: "Philippines",
|
|
1481
|
-
phone: "+63"
|
|
1482
|
-
},
|
|
1483
|
-
{
|
|
1484
|
-
code: "PK",
|
|
1485
|
-
label: "Pakistan",
|
|
1486
|
-
phone: "+92"
|
|
1487
|
-
},
|
|
1488
|
-
{
|
|
1489
|
-
code: "PL",
|
|
1490
|
-
label: "Poland",
|
|
1491
|
-
phone: "+48"
|
|
1492
|
-
},
|
|
1493
|
-
{
|
|
1494
|
-
code: "PM",
|
|
1495
|
-
label: "Saint Pierre and Miquelon",
|
|
1496
|
-
phone: "+508"
|
|
1497
|
-
},
|
|
1498
|
-
{
|
|
1499
|
-
code: "PN",
|
|
1500
|
-
label: "Pitcairn",
|
|
1501
|
-
phone: "+870"
|
|
1502
|
-
},
|
|
1503
|
-
{
|
|
1504
|
-
code: "PR",
|
|
1505
|
-
label: "Puerto Rico",
|
|
1506
|
-
phone: "+1"
|
|
1507
|
-
},
|
|
1508
|
-
{
|
|
1509
|
-
code: "PS",
|
|
1510
|
-
label: "Palestine, State of",
|
|
1511
|
-
phone: "+970"
|
|
1512
|
-
},
|
|
1513
|
-
{
|
|
1514
|
-
code: "PT",
|
|
1515
|
-
label: "Portugal",
|
|
1516
|
-
phone: "+351"
|
|
1517
|
-
},
|
|
1518
|
-
{
|
|
1519
|
-
code: "PW",
|
|
1520
|
-
label: "Palau",
|
|
1521
|
-
phone: "+680"
|
|
1522
|
-
},
|
|
1523
|
-
{
|
|
1524
|
-
code: "PY",
|
|
1525
|
-
label: "Paraguay",
|
|
1526
|
-
phone: "+595"
|
|
1527
|
-
},
|
|
1528
|
-
{
|
|
1529
|
-
code: "QA",
|
|
1530
|
-
label: "Qatar",
|
|
1531
|
-
phone: "+974"
|
|
1532
|
-
},
|
|
1533
|
-
{
|
|
1534
|
-
code: "RE",
|
|
1535
|
-
label: "Reunion",
|
|
1536
|
-
phone: "+262"
|
|
1537
|
-
},
|
|
1538
|
-
{
|
|
1539
|
-
code: "RO",
|
|
1540
|
-
label: "Romania",
|
|
1541
|
-
phone: "+40"
|
|
1542
|
-
},
|
|
1543
|
-
{
|
|
1544
|
-
code: "RS",
|
|
1545
|
-
label: "Serbia",
|
|
1546
|
-
phone: "+381"
|
|
1547
|
-
},
|
|
1548
|
-
{
|
|
1549
|
-
code: "RU",
|
|
1550
|
-
label: "Russian Federation",
|
|
1551
|
-
phone: "+7"
|
|
1552
|
-
},
|
|
1553
|
-
{
|
|
1554
|
-
code: "RW",
|
|
1555
|
-
label: "Rwanda",
|
|
1556
|
-
phone: "+250"
|
|
1557
|
-
},
|
|
1558
|
-
{
|
|
1559
|
-
code: "SA",
|
|
1560
|
-
label: "Saudi Arabia",
|
|
1561
|
-
phone: "+966"
|
|
1562
|
-
},
|
|
1563
|
-
{
|
|
1564
|
-
code: "SB",
|
|
1565
|
-
label: "Solomon Islands",
|
|
1566
|
-
phone: "+677"
|
|
1567
|
-
},
|
|
1568
|
-
{
|
|
1569
|
-
code: "SC",
|
|
1570
|
-
label: "Seychelles",
|
|
1571
|
-
phone: "+248"
|
|
1572
|
-
},
|
|
1573
|
-
{
|
|
1574
|
-
code: "SD",
|
|
1575
|
-
label: "Sudan",
|
|
1576
|
-
phone: "+249"
|
|
1577
|
-
},
|
|
1578
|
-
{
|
|
1579
|
-
code: "SE",
|
|
1580
|
-
label: "Sweden",
|
|
1581
|
-
phone: "+46"
|
|
1582
|
-
},
|
|
1583
|
-
{
|
|
1584
|
-
code: "SG",
|
|
1585
|
-
label: "Singapore",
|
|
1586
|
-
phone: "+65"
|
|
1587
|
-
},
|
|
1588
|
-
{
|
|
1589
|
-
code: "SH",
|
|
1590
|
-
label: "Saint Helena",
|
|
1591
|
-
phone: "+290"
|
|
1592
|
-
},
|
|
1593
|
-
{
|
|
1594
|
-
code: "SI",
|
|
1595
|
-
label: "Slovenia",
|
|
1596
|
-
phone: "+386"
|
|
1597
|
-
},
|
|
1598
|
-
{
|
|
1599
|
-
code: "SJ",
|
|
1600
|
-
label: "Svalbard and Jan Mayen",
|
|
1601
|
-
phone: "+47"
|
|
1602
|
-
},
|
|
1603
|
-
{
|
|
1604
|
-
code: "SK",
|
|
1605
|
-
label: "Slovakia",
|
|
1606
|
-
phone: "+421"
|
|
1607
|
-
},
|
|
1608
|
-
{
|
|
1609
|
-
code: "SL",
|
|
1610
|
-
label: "Sierra Leone",
|
|
1611
|
-
phone: "+232"
|
|
1612
|
-
},
|
|
1613
|
-
{
|
|
1614
|
-
code: "SM",
|
|
1615
|
-
label: "San Marino",
|
|
1616
|
-
phone: "+378"
|
|
1617
|
-
},
|
|
1618
|
-
{
|
|
1619
|
-
code: "SN",
|
|
1620
|
-
label: "Senegal",
|
|
1621
|
-
phone: "+221"
|
|
1622
|
-
},
|
|
1623
|
-
{
|
|
1624
|
-
code: "SO",
|
|
1625
|
-
label: "Somalia",
|
|
1626
|
-
phone: "+252"
|
|
1627
|
-
},
|
|
1628
|
-
{
|
|
1629
|
-
code: "SR",
|
|
1630
|
-
label: "Suriname",
|
|
1631
|
-
phone: "+597"
|
|
1632
|
-
},
|
|
1633
|
-
{
|
|
1634
|
-
code: "SS",
|
|
1635
|
-
label: "South Sudan",
|
|
1636
|
-
phone: "+211"
|
|
1637
|
-
},
|
|
1638
|
-
{
|
|
1639
|
-
code: "ST",
|
|
1640
|
-
label: "Sao Tome and Principe",
|
|
1641
|
-
phone: "+239"
|
|
1642
|
-
},
|
|
1643
|
-
{
|
|
1644
|
-
code: "SV",
|
|
1645
|
-
label: "El Salvador",
|
|
1646
|
-
phone: "+503"
|
|
1647
|
-
},
|
|
1648
|
-
{
|
|
1649
|
-
code: "SX",
|
|
1650
|
-
label: "Sint Maarten (Dutch part)",
|
|
1651
|
-
phone: "+1-721"
|
|
1652
|
-
},
|
|
1653
|
-
{
|
|
1654
|
-
code: "SY",
|
|
1655
|
-
label: "Syrian Arab Republic",
|
|
1656
|
-
phone: "+963"
|
|
1657
|
-
},
|
|
1658
|
-
{
|
|
1659
|
-
code: "SZ",
|
|
1660
|
-
label: "Swaziland",
|
|
1661
|
-
phone: "+268"
|
|
1662
|
-
},
|
|
1663
|
-
{
|
|
1664
|
-
code: "TC",
|
|
1665
|
-
label: "Turks and Caicos Islands",
|
|
1666
|
-
phone: "+1-649"
|
|
1667
|
-
},
|
|
1668
|
-
{
|
|
1669
|
-
code: "TD",
|
|
1670
|
-
label: "Chad",
|
|
1671
|
-
phone: "+235"
|
|
1672
|
-
},
|
|
1673
|
-
{
|
|
1674
|
-
code: "TF",
|
|
1675
|
-
label: "French Southern Territories",
|
|
1676
|
-
phone: "+262"
|
|
1677
|
-
},
|
|
1678
|
-
{
|
|
1679
|
-
code: "TG",
|
|
1680
|
-
label: "Togo",
|
|
1681
|
-
phone: "+228"
|
|
1682
|
-
},
|
|
1683
|
-
{
|
|
1684
|
-
code: "TH",
|
|
1685
|
-
label: "Thailand",
|
|
1686
|
-
phone: "+66"
|
|
1687
|
-
},
|
|
1688
|
-
{
|
|
1689
|
-
code: "TJ",
|
|
1690
|
-
label: "Tajikistan",
|
|
1691
|
-
phone: "+992"
|
|
1692
|
-
},
|
|
1693
|
-
{
|
|
1694
|
-
code: "TK",
|
|
1695
|
-
label: "Tokelau",
|
|
1696
|
-
phone: "+690"
|
|
1697
|
-
},
|
|
1698
|
-
{
|
|
1699
|
-
code: "TL",
|
|
1700
|
-
label: "Timor-Leste",
|
|
1701
|
-
phone: "+670"
|
|
1702
|
-
},
|
|
1703
|
-
{
|
|
1704
|
-
code: "TM",
|
|
1705
|
-
label: "Turkmenistan",
|
|
1706
|
-
phone: "+993"
|
|
1707
|
-
},
|
|
1708
|
-
{
|
|
1709
|
-
code: "TN",
|
|
1710
|
-
label: "Tunisia",
|
|
1711
|
-
phone: "+216"
|
|
1712
|
-
},
|
|
1713
|
-
{
|
|
1714
|
-
code: "TO",
|
|
1715
|
-
label: "Tonga",
|
|
1716
|
-
phone: "+676"
|
|
1717
|
-
},
|
|
1718
|
-
{
|
|
1719
|
-
code: "TR",
|
|
1720
|
-
label: "Turkey",
|
|
1721
|
-
phone: "+90"
|
|
1722
|
-
},
|
|
1723
|
-
{
|
|
1724
|
-
code: "TT",
|
|
1725
|
-
label: "Trinidad and Tobago",
|
|
1726
|
-
phone: "+1-868"
|
|
1727
|
-
},
|
|
1728
|
-
{
|
|
1729
|
-
code: "TV",
|
|
1730
|
-
label: "Tuvalu",
|
|
1731
|
-
phone: "+688"
|
|
1732
|
-
},
|
|
1733
|
-
{
|
|
1734
|
-
code: "TW",
|
|
1735
|
-
label: "Taiwan, Province of China",
|
|
1736
|
-
phone: "+886"
|
|
1737
|
-
},
|
|
1738
|
-
{
|
|
1739
|
-
code: "TZ",
|
|
1740
|
-
label: "United Republic of Tanzania",
|
|
1741
|
-
phone: "+255"
|
|
1742
|
-
},
|
|
1743
|
-
{
|
|
1744
|
-
code: "UA",
|
|
1745
|
-
label: "Ukraine",
|
|
1746
|
-
phone: "+380"
|
|
1747
|
-
},
|
|
1748
|
-
{
|
|
1749
|
-
code: "UG",
|
|
1750
|
-
label: "Uganda",
|
|
1751
|
-
phone: "+256"
|
|
1752
|
-
},
|
|
1753
|
-
{
|
|
1754
|
-
code: "US",
|
|
1755
|
-
label: "United States",
|
|
1756
|
-
phone: "+1",
|
|
1757
|
-
suggested: true
|
|
1758
|
-
},
|
|
1759
|
-
{
|
|
1760
|
-
code: "UY",
|
|
1761
|
-
label: "Uruguay",
|
|
1762
|
-
phone: "+598"
|
|
1763
|
-
},
|
|
1764
|
-
{
|
|
1765
|
-
code: "UZ",
|
|
1766
|
-
label: "Uzbekistan",
|
|
1767
|
-
phone: "+998"
|
|
1768
|
-
},
|
|
1769
|
-
{
|
|
1770
|
-
code: "VA",
|
|
1771
|
-
label: "Holy See (Vatican City State)",
|
|
1772
|
-
phone: "+379"
|
|
1773
|
-
},
|
|
1774
|
-
{
|
|
1775
|
-
code: "VC",
|
|
1776
|
-
label: "Saint Vincent and the Grenadines",
|
|
1777
|
-
phone: "+1-784"
|
|
1778
|
-
},
|
|
1779
|
-
{
|
|
1780
|
-
code: "VE",
|
|
1781
|
-
label: "Venezuela",
|
|
1782
|
-
phone: "+58"
|
|
1783
|
-
},
|
|
1784
|
-
{
|
|
1785
|
-
code: "VG",
|
|
1786
|
-
label: "British Virgin Islands",
|
|
1787
|
-
phone: "+1-284"
|
|
1788
|
-
},
|
|
1789
|
-
{
|
|
1790
|
-
code: "VI",
|
|
1791
|
-
label: "US Virgin Islands",
|
|
1792
|
-
phone: "+1-340"
|
|
1793
|
-
},
|
|
1794
|
-
{
|
|
1795
|
-
code: "VN",
|
|
1796
|
-
label: "Vietnam",
|
|
1797
|
-
phone: "+84"
|
|
1798
|
-
},
|
|
1799
|
-
{
|
|
1800
|
-
code: "VU",
|
|
1801
|
-
label: "Vanuatu",
|
|
1802
|
-
phone: "+678"
|
|
1803
|
-
},
|
|
1804
|
-
{
|
|
1805
|
-
code: "WF",
|
|
1806
|
-
label: "Wallis and Futuna",
|
|
1807
|
-
phone: "+681"
|
|
1808
|
-
},
|
|
1809
|
-
{
|
|
1810
|
-
code: "WS",
|
|
1811
|
-
label: "Samoa",
|
|
1812
|
-
phone: "+685"
|
|
1813
|
-
},
|
|
1814
|
-
{
|
|
1815
|
-
code: "XK",
|
|
1816
|
-
label: "Kosovo",
|
|
1817
|
-
phone: "+383"
|
|
1818
|
-
},
|
|
1819
|
-
{
|
|
1820
|
-
code: "YE",
|
|
1821
|
-
label: "Yemen",
|
|
1822
|
-
phone: "+967"
|
|
1823
|
-
},
|
|
1824
|
-
{
|
|
1825
|
-
code: "YT",
|
|
1826
|
-
label: "Mayotte",
|
|
1827
|
-
phone: "+262"
|
|
1828
|
-
},
|
|
1829
|
-
{
|
|
1830
|
-
code: "ZA",
|
|
1831
|
-
label: "South Africa",
|
|
1832
|
-
phone: "+27"
|
|
1833
|
-
},
|
|
1834
|
-
{
|
|
1835
|
-
code: "ZM",
|
|
1836
|
-
label: "Zambia",
|
|
1837
|
-
phone: "+260"
|
|
1838
|
-
},
|
|
1839
|
-
{
|
|
1840
|
-
code: "ZW",
|
|
1841
|
-
label: "Zimbabwe",
|
|
1842
|
-
phone: "+263"
|
|
1843
|
-
}
|
|
1844
|
-
];
|
|
1845
|
-
|
|
1846
|
-
var getColors = function getColors(palette, status) {
|
|
1847
|
-
var colors = {
|
|
1848
|
-
"default": {
|
|
1849
|
-
color: palette.foreground,
|
|
1850
|
-
borderColor: palette.border,
|
|
1851
|
-
hoverBorder: palette.accents_5
|
|
1852
|
-
},
|
|
1853
|
-
secondary: {
|
|
1854
|
-
color: palette.foreground,
|
|
1855
|
-
borderColor: palette.secondary,
|
|
1856
|
-
hoverBorder: palette.secondary
|
|
1857
|
-
},
|
|
1858
|
-
success: {
|
|
1859
|
-
color: palette.foreground,
|
|
1860
|
-
borderColor: palette.successLight,
|
|
1861
|
-
hoverBorder: palette.success
|
|
1862
|
-
},
|
|
1863
|
-
warning: {
|
|
1864
|
-
color: palette.foreground,
|
|
1865
|
-
borderColor: palette.warningLight,
|
|
1866
|
-
hoverBorder: palette.warning
|
|
1867
|
-
},
|
|
1868
|
-
error: {
|
|
1869
|
-
color: palette.error,
|
|
1870
|
-
borderColor: palette.error,
|
|
1871
|
-
hoverBorder: palette.errorDark
|
|
1872
|
-
}
|
|
1873
|
-
};
|
|
1874
|
-
if (!status) return colors["default"];
|
|
1875
|
-
return colors[status];
|
|
1876
|
-
};
|
|
1877
|
-
|
|
1878
|
-
var PhoneInput = function PhoneInput(_ref) {
|
|
1879
|
-
var onChange = _ref.onChange,
|
|
1880
|
-
_ref$value = _ref.value,
|
|
1881
|
-
value = _ref$value === void 0 ? '' : _ref$value,
|
|
1882
|
-
country = _ref.country,
|
|
1883
|
-
_ref$placeholder = _ref.placeholder,
|
|
1884
|
-
placeholder = _ref$placeholder === void 0 ? 'Enter phone number' : _ref$placeholder,
|
|
1885
|
-
_ref$color = _ref.color,
|
|
1886
|
-
_color = _ref$color === void 0 ? 'default' : _ref$color;
|
|
1887
|
-
var theme$1 = theme.useTheme();
|
|
1888
|
-
var defaultValue = country ? countries.findIndex(function (cn) {
|
|
1889
|
-
return cn.code == country;
|
|
1890
|
-
}) : 103;
|
|
1891
|
-
var _useState = React.useState(countries[defaultValue]),
|
|
1892
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
1893
|
-
selectedCountry = _useState2[0],
|
|
1894
|
-
setSelectedCountry = _useState2[1];
|
|
1895
|
-
var _useState3 = React.useState(value),
|
|
1896
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
1897
|
-
phoneNumber = _useState4[0],
|
|
1898
|
-
setPhoneNumber = _useState4[1];
|
|
1899
|
-
var _useState5 = React.useState(false),
|
|
1900
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
1901
|
-
isFocused = _useState6[0],
|
|
1902
|
-
setIsFocused = _useState6[1];
|
|
1903
|
-
var _useState7 = React.useState(false),
|
|
1904
|
-
_useState8 = _slicedToArray(_useState7, 2),
|
|
1905
|
-
dropdownOpen = _useState8[0],
|
|
1906
|
-
setDropdownOpen = _useState8[1];
|
|
1907
|
-
var _useState9 = React.useState(''),
|
|
1908
|
-
_useState0 = _slicedToArray(_useState9, 2),
|
|
1909
|
-
searchTerm = _useState0[0],
|
|
1910
|
-
setSearchTerm = _useState0[1];
|
|
1911
|
-
var dropdownRef = React.useRef(null);
|
|
1912
|
-
var _useMemo = React.useMemo(function () {
|
|
1913
|
-
return getColors(theme$1.palette, _color);
|
|
1914
|
-
}, [theme$1.palette]),
|
|
1915
|
-
borderColor = _useMemo.borderColor,
|
|
1916
|
-
hoverBorder = _useMemo.hoverBorder;
|
|
1917
|
-
var handleSelectCountry = function handleSelectCountry(country) {
|
|
1918
|
-
setSelectedCountry(country);
|
|
1919
|
-
setDropdownOpen(false);
|
|
1920
|
-
setSearchTerm('');
|
|
1921
|
-
if (onChange) onChange("".concat(country.code, ":").concat(phoneNumber));
|
|
1922
|
-
};
|
|
1923
|
-
var handlePhoneChange = function handlePhoneChange(e) {
|
|
1924
|
-
var value = e.target.value.replace(/[^\d]/g, '');
|
|
1925
|
-
setPhoneNumber(value);
|
|
1926
|
-
if (onChange) onChange("".concat(selectedCountry.phone, ",").concat(value));
|
|
1927
|
-
};
|
|
1928
|
-
var handleClickOutside = function handleClickOutside(e) {
|
|
1929
|
-
if (dropdownRef.current && !dropdownRef.current.contains(e.target)) {
|
|
1930
|
-
setDropdownOpen(false);
|
|
1931
|
-
setSearchTerm('');
|
|
1932
|
-
}
|
|
1933
|
-
};
|
|
1934
|
-
React.useEffect(function () {
|
|
1935
|
-
document.addEventListener('mousedown', handleClickOutside);
|
|
1936
|
-
return function () {
|
|
1937
|
-
return document.removeEventListener('mousedown', handleClickOutside);
|
|
1938
|
-
};
|
|
1939
|
-
}, []);
|
|
1940
|
-
var filteredCountries = countries.filter(function (c) {
|
|
1941
|
-
return "".concat(c.label, " ").concat(c.code, " ").concat(c.phone).toLowerCase().includes(searchTerm.toLowerCase());
|
|
1942
|
-
});
|
|
1943
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
1944
|
-
ref: dropdownRef,
|
|
1945
|
-
className: _JSXStyle.dynamic([["1313692390", [hoverBorder, borderColor, borderColor, theme$1.type == 'dark' ? 'black' : 'white', borderColor, borderColor, theme$1.type == 'dark' ? '#3a3d3d' : '#efefef']]]) + " " + "phone-input-container ".concat(isFocused ? 'focused' : '')
|
|
1946
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
1947
|
-
className: _JSXStyle.dynamic([["1313692390", [hoverBorder, borderColor, borderColor, theme$1.type == 'dark' ? 'black' : 'white', borderColor, borderColor, theme$1.type == 'dark' ? '#3a3d3d' : '#efefef']]]) + " " + "input-wrapper"
|
|
1948
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
1949
|
-
onClick: function onClick() {
|
|
1950
|
-
return setDropdownOpen(!dropdownOpen);
|
|
1951
|
-
},
|
|
1952
|
-
className: _JSXStyle.dynamic([["1313692390", [hoverBorder, borderColor, borderColor, theme$1.type == 'dark' ? 'black' : 'white', borderColor, borderColor, theme$1.type == 'dark' ? '#3a3d3d' : '#efefef']]]) + " " + "dropdown-toggle"
|
|
1953
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
1954
|
-
style: {
|
|
1955
|
-
display: 'flex',
|
|
1956
|
-
alignItems: 'center',
|
|
1957
|
-
gap: 5
|
|
1958
|
-
},
|
|
1959
|
-
className: _JSXStyle.dynamic([["1313692390", [hoverBorder, borderColor, borderColor, theme$1.type == 'dark' ? 'black' : 'white', borderColor, borderColor, theme$1.type == 'dark' ? '#3a3d3d' : '#efefef']]])
|
|
1960
|
-
}, /*#__PURE__*/React.createElement("img", {
|
|
1961
|
-
loading: "lazy",
|
|
1962
|
-
width: "23",
|
|
1963
|
-
height: "23",
|
|
1964
|
-
src: "https://flagcdn.com/w20/".concat(selectedCountry.code.toLowerCase(), ".png"),
|
|
1965
|
-
srcSet: "https://flagcdn.com/w40/".concat(selectedCountry.code.toLowerCase(), ".png 2x"),
|
|
1966
|
-
alt: "Flag of ".concat(selectedCountry.label),
|
|
1967
|
-
className: _JSXStyle.dynamic([["1313692390", [hoverBorder, borderColor, borderColor, theme$1.type == 'dark' ? 'black' : 'white', borderColor, borderColor, theme$1.type == 'dark' ? '#3a3d3d' : '#efefef']]])
|
|
1968
|
-
}), /*#__PURE__*/React.createElement("span", {
|
|
1969
|
-
className: _JSXStyle.dynamic([["1313692390", [hoverBorder, borderColor, borderColor, theme$1.type == 'dark' ? 'black' : 'white', borderColor, borderColor, theme$1.type == 'dark' ? '#3a3d3d' : '#efefef']]])
|
|
1970
|
-
}, selectedCountry.phone))), /*#__PURE__*/React.createElement("input", {
|
|
1971
|
-
type: "tel",
|
|
1972
|
-
style: {
|
|
1973
|
-
width: '100%'
|
|
1974
|
-
},
|
|
1975
|
-
placeholder: placeholder,
|
|
1976
|
-
value: phoneNumber,
|
|
1977
|
-
onChange: handlePhoneChange,
|
|
1978
|
-
onFocus: function onFocus() {
|
|
1979
|
-
return setIsFocused(true);
|
|
1980
|
-
},
|
|
1981
|
-
onBlur: function onBlur() {
|
|
1982
|
-
return setIsFocused(false);
|
|
1983
|
-
},
|
|
1984
|
-
className: _JSXStyle.dynamic([["1313692390", [hoverBorder, borderColor, borderColor, theme$1.type == 'dark' ? 'black' : 'white', borderColor, borderColor, theme$1.type == 'dark' ? '#3a3d3d' : '#efefef']]]) + " " + "phone-input"
|
|
1985
|
-
})), dropdownOpen && /*#__PURE__*/React.createElement("div", {
|
|
1986
|
-
className: _JSXStyle.dynamic([["1313692390", [hoverBorder, borderColor, borderColor, theme$1.type == 'dark' ? 'black' : 'white', borderColor, borderColor, theme$1.type == 'dark' ? '#3a3d3d' : '#efefef']]]) + " " + "dropdown"
|
|
1987
|
-
}, /*#__PURE__*/React.createElement("input", {
|
|
1988
|
-
type: "text",
|
|
1989
|
-
placeholder: "Search country...",
|
|
1990
|
-
value: searchTerm,
|
|
1991
|
-
onChange: function onChange(e) {
|
|
1992
|
-
return setSearchTerm(e.target.value);
|
|
1993
|
-
},
|
|
1994
|
-
className: _JSXStyle.dynamic([["1313692390", [hoverBorder, borderColor, borderColor, theme$1.type == 'dark' ? 'black' : 'white', borderColor, borderColor, theme$1.type == 'dark' ? '#3a3d3d' : '#efefef']]]) + " " + "search-input"
|
|
1995
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
1996
|
-
className: _JSXStyle.dynamic([["1313692390", [hoverBorder, borderColor, borderColor, theme$1.type == 'dark' ? 'black' : 'white', borderColor, borderColor, theme$1.type == 'dark' ? '#3a3d3d' : '#efefef']]]) + " " + "country-list"
|
|
1997
|
-
}, filteredCountries.length > 0 ? filteredCountries.map(function (c) {
|
|
1998
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
1999
|
-
key: c.code,
|
|
2000
|
-
onClick: function onClick() {
|
|
2001
|
-
return handleSelectCountry(c);
|
|
2002
|
-
},
|
|
2003
|
-
className: _JSXStyle.dynamic([["1313692390", [hoverBorder, borderColor, borderColor, theme$1.type == 'dark' ? 'black' : 'white', borderColor, borderColor, theme$1.type == 'dark' ? '#3a3d3d' : '#efefef']]]) + " " + "dropdown-item"
|
|
2004
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
2005
|
-
style: {
|
|
2006
|
-
display: 'flex',
|
|
2007
|
-
alignItems: 'center',
|
|
2008
|
-
gap: 5
|
|
2009
|
-
},
|
|
2010
|
-
className: _JSXStyle.dynamic([["1313692390", [hoverBorder, borderColor, borderColor, theme$1.type == 'dark' ? 'black' : 'white', borderColor, borderColor, theme$1.type == 'dark' ? '#3a3d3d' : '#efefef']]])
|
|
2011
|
-
}, /*#__PURE__*/React.createElement("img", {
|
|
2012
|
-
loading: "lazy",
|
|
2013
|
-
width: "23",
|
|
2014
|
-
height: "23",
|
|
2015
|
-
src: "https://flagcdn.com/w20/".concat(c.code.toLowerCase(), ".png"),
|
|
2016
|
-
srcSet: "https://flagcdn.com/w40/".concat(c.code.toLowerCase(), ".png 2x"),
|
|
2017
|
-
alt: "Flag of ".concat(c.label),
|
|
2018
|
-
className: _JSXStyle.dynamic([["1313692390", [hoverBorder, borderColor, borderColor, theme$1.type == 'dark' ? 'black' : 'white', borderColor, borderColor, theme$1.type == 'dark' ? '#3a3d3d' : '#efefef']]])
|
|
2019
|
-
}), c.phone, " ", /*#__PURE__*/React.createElement("span", {
|
|
2020
|
-
style: {
|
|
2021
|
-
color: 'grey'
|
|
2022
|
-
},
|
|
2023
|
-
className: _JSXStyle.dynamic([["1313692390", [hoverBorder, borderColor, borderColor, theme$1.type == 'dark' ? 'black' : 'white', borderColor, borderColor, theme$1.type == 'dark' ? '#3a3d3d' : '#efefef']]])
|
|
2024
|
-
}, c.label)));
|
|
2025
|
-
}) : /*#__PURE__*/React.createElement("div", {
|
|
2026
|
-
className: _JSXStyle.dynamic([["1313692390", [hoverBorder, borderColor, borderColor, theme$1.type == 'dark' ? 'black' : 'white', borderColor, borderColor, theme$1.type == 'dark' ? '#3a3d3d' : '#efefef']]]) + " " + "dropdown-item disabled"
|
|
2027
|
-
}, "No results"))), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
2028
|
-
id: "1313692390",
|
|
2029
|
-
dynamic: [hoverBorder, borderColor, borderColor, theme$1.type == 'dark' ? 'black' : 'white', borderColor, borderColor, theme$1.type == 'dark' ? '#3a3d3d' : '#efefef']
|
|
2030
|
-
}, ".phone-input-container.__jsx-style-dynamic-selector{position:relative;min-width:200px;width:auto;}.phone-input-container.focused.__jsx-style-dynamic-selector{outline:1px solid ".concat(hoverBorder, ";border-radius:6px;}.input-wrapper.__jsx-style-dynamic-selector{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;border:1px solid ").concat(borderColor, ";border-radius:6px;overflow:hidden;}.dropdown-toggle.__jsx-style-dynamic-selector{padding:7px 12px;border-radius:6px 0px 0px 6px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-size:14px;border-right:1px solid ").concat(borderColor, ";}.phone-input.__jsx-style-dynamic-selector{-webkit-flex:1;-ms-flex:1;flex:1;padding:5px 10px;height:35px;background-color:transparent;font-size:14px;border:none;}.phone-input.__jsx-style-dynamic-selector:focus{outline:none;}.dropdown.__jsx-style-dynamic-selector{position:absolute;top:100%;left:0;width:100%;background:").concat(theme$1.type == 'dark' ? 'black' : 'white', ";border:1px solid ").concat(borderColor, ";border-radius:6px;margin-top:4px;z-index:999;box-shadow:0 4px 10px rgba(0,0,0,0.1);}.search-input.__jsx-style-dynamic-selector{width:100%;padding:8px 10px;border:none;background-color:transparent;border-bottom:1px solid ").concat(borderColor, ";font-size:14px;}.search-input.__jsx-style-dynamic-selector:focus{outline:none;}.country-list.__jsx-style-dynamic-selector{max-height:200px;overflow-y:auto;}.dropdown-item.__jsx-style-dynamic-selector{padding:10px;cursor:pointer;font-size:14px;}.dropdown-item.__jsx-style-dynamic-selector:hover{background:").concat(theme$1.type == 'dark' ? '#3a3d3d' : '#efefef', ";}.dropdown-item.disabled.__jsx-style-dynamic-selector{color:#888;cursor:default;}")));
|
|
2031
|
-
};
|
|
2032
|
-
|
|
2033
|
-
exports.default = PhoneInput;
|