@alfalab/core-components-intl-phone-input 9.4.4 → 9.4.5
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/component.js +9 -6
- package/components/flag-icon/component.js +1 -1
- package/components/flag-icon/index.css +3 -3
- package/components/select/component.js +1 -1
- package/components/select/index.css +6 -6
- package/components/select-field/component.js +1 -1
- package/components/select-field/index.css +9 -9
- package/cssm/component.js +8 -5
- package/esm/component.js +9 -6
- package/esm/components/flag-icon/component.js +1 -1
- package/esm/components/flag-icon/index.css +3 -3
- package/esm/components/select/component.js +1 -1
- package/esm/components/select/index.css +6 -6
- package/esm/components/select-field/component.js +1 -1
- package/esm/components/select-field/index.css +9 -9
- package/esm/index.css +5 -5
- package/index.css +5 -5
- package/modern/component.js +5 -3
- package/modern/components/flag-icon/component.js +1 -1
- package/modern/components/flag-icon/index.css +3 -3
- package/modern/components/select/component.js +1 -1
- package/modern/components/select/index.css +6 -6
- package/modern/components/select-field/component.js +1 -1
- package/modern/components/select-field/index.css +9 -9
- package/modern/index.css +5 -5
- package/package.json +3 -6
- package/send-stats.js +0 -82
package/component.js
CHANGED
|
@@ -44,7 +44,7 @@ var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
|
44
44
|
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
45
45
|
var WorldMagnifierMIcon__default = /*#__PURE__*/_interopDefaultCompat(WorldMagnifierMIcon);
|
|
46
46
|
|
|
47
|
-
var styles = {"addons":"intl-phone-
|
|
47
|
+
var styles = {"addons":"intl-phone-input__addons_1aj0o","l":"intl-phone-input__l_1aj0o","xl":"intl-phone-input__xl_1aj0o","flagIconWrapper":"intl-phone-input__flagIconWrapper_1aj0o","emptyCountryIcon":"intl-phone-input__emptyCountryIcon_1aj0o"};
|
|
48
48
|
require('./index.css')
|
|
49
49
|
|
|
50
50
|
var countriesHash = utils.getCountriesHash();
|
|
@@ -273,7 +273,9 @@ var IntlPhoneInput = React.forwardRef(function (_a, ref) {
|
|
|
273
273
|
handleInputNewChar(event, caretPosition);
|
|
274
274
|
}
|
|
275
275
|
};
|
|
276
|
-
var handleClear = function () {
|
|
276
|
+
var handleClear = function (event) {
|
|
277
|
+
var _a;
|
|
278
|
+
(_a = inputProps === null || inputProps === void 0 ? void 0 : inputProps.onClear) === null || _a === void 0 ? void 0 : _a.call(inputProps, event);
|
|
277
279
|
if (clearableCountryCode) {
|
|
278
280
|
onChange('+');
|
|
279
281
|
if (canBeEmptyCountry) {
|
|
@@ -286,13 +288,14 @@ var IntlPhoneInput = React.forwardRef(function (_a, ref) {
|
|
|
286
288
|
}
|
|
287
289
|
};
|
|
288
290
|
var handlePaste = function (event) {
|
|
289
|
-
var _a;
|
|
291
|
+
var _a, _b;
|
|
292
|
+
(_a = inputProps === null || inputProps === void 0 ? void 0 : inputProps.onPaste) === null || _a === void 0 ? void 0 : _a.call(inputProps, event);
|
|
290
293
|
event.preventDefault();
|
|
291
|
-
var text = (
|
|
294
|
+
var text = (_b = event.clipboardData) === null || _b === void 0 ? void 0 : _b.getData('Text');
|
|
292
295
|
if (!text || !inputRef.current) {
|
|
293
296
|
return;
|
|
294
297
|
}
|
|
295
|
-
var
|
|
298
|
+
var _c = inputRef.current, selectionStart = _c.selectionStart, selectionEnd = _c.selectionEnd;
|
|
296
299
|
var preparedNumber = utils_preparePasteData.preparePasteData(value, text, selectionStart || 0, selectionEnd || 0, ruNumberPriority && countryIso2 === 'ru');
|
|
297
300
|
var targetCountry = getCountryByNumber(preparedNumber);
|
|
298
301
|
var maxPhoneLength = (targetCountry && (maxPhoneLen === null || maxPhoneLen === void 0 ? void 0 : maxPhoneLen[targetCountry.iso2.toUpperCase()])) || MAX_PHONE_LEN;
|
|
@@ -342,7 +345,7 @@ var IntlPhoneInput = React.forwardRef(function (_a, ref) {
|
|
|
342
345
|
/* eslint-disable-next-line react-hooks/exhaustive-deps */
|
|
343
346
|
}, [value, canBeEmptyCountry, countryIso2, defaultCountryIso2]);
|
|
344
347
|
useCaretAvoidCountryCode.useCaretAvoidCountryCode({ inputRef: inputRef, countryCodeLength: countryCodeLength, clearableCountryCode: clearableCountryCode });
|
|
345
|
-
return (React__default.default.createElement(coreComponentsInputAutocomplete.InputAutocomplete, tslib.__assign({}, restProps, { ref: ref, inputProps: tslib.__assign(tslib.__assign({ clear: clear && !isEmptyValue
|
|
348
|
+
return (React__default.default.createElement(coreComponentsInputAutocomplete.InputAutocomplete, tslib.__assign({}, restProps, { ref: ref, inputProps: tslib.__assign(tslib.__assign({ clear: clear && !isEmptyValue }, inputProps), { onClear: handleClear, ref: inputRef, wrapperRef: setInputWrapperRef, type: 'tel', colors: colors, className: cn__default.default(className, styles[size]), addonsClassName: styles.addons, onKeyDown: handleKeyDown, onPaste: handlePaste, leftAddons: hideCountrySelect ? (React__default.default.createElement("span", { className: styles.flagIconWrapper }, countryIso2 ? (React__default.default.createElement(components_flagIcon_component.FlagIcon, { country: countryIso2 })) : (React__default.default.createElement(WorldMagnifierMIcon__default.default, { className: styles.emptyCountryIcon })))) : (countries.length > 1 && (React__default.default.createElement(components_select_component.CountriesSelect, { dataTestId: 'countries-select', disabled: disabled || readOnly, size: size, selected: countryIso2, countries: countries, onChange: handleSelectChange, fieldWidth: inputWrapperRef && inputWrapperRef.getBoundingClientRect().width, preventFlip: preventFlip }))) }), optionsListWidth: 'field', closeOnSelect: true, onInput: handleInputChange, onChange: handleChange, options: options, disabled: disabled, readOnly: readOnly, size: size, className: className, value: value })));
|
|
346
349
|
});
|
|
347
350
|
|
|
348
351
|
exports.IntlPhoneInput = IntlPhoneInput;
|
|
@@ -11,7 +11,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
11
11
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
12
12
|
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
13
13
|
|
|
14
|
-
var styles = {"flagIcon":"intl-phone-
|
|
14
|
+
var styles = {"flagIcon":"intl-phone-input__flagIcon_ahdi9","flagPlaceholder":"intl-phone-input__flagPlaceholder_ahdi9"};
|
|
15
15
|
require('./index.css')
|
|
16
16
|
|
|
17
17
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1wucx */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-specialbg-tertiary-transparent: rgba(11, 31, 53, 0.1); /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -17,10 +17,10 @@
|
|
|
17
17
|
--gap-3xs: 2px;
|
|
18
18
|
} :root {
|
|
19
19
|
} :root {
|
|
20
|
-
} .intl-phone-
|
|
20
|
+
} .intl-phone-input__flagIcon_ahdi9 {
|
|
21
21
|
max-width: 24px;
|
|
22
22
|
max-height: 24px;
|
|
23
|
-
} .intl-phone-
|
|
23
|
+
} .intl-phone-input__flagPlaceholder_ahdi9 {
|
|
24
24
|
width: 24px;
|
|
25
25
|
height: 16px;
|
|
26
26
|
max-height: 16px;
|
|
@@ -17,7 +17,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
17
17
|
|
|
18
18
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
19
19
|
|
|
20
|
-
var styles = {"component":"intl-phone-
|
|
20
|
+
var styles = {"component":"intl-phone-input__component_1teey","option":"intl-phone-input__option_1teey","flag":"intl-phone-input__flag_1teey","countryName":"intl-phone-input__countryName_1teey","dialCode":"intl-phone-input__dialCode_1teey"};
|
|
21
21
|
require('./index.css')
|
|
22
22
|
|
|
23
23
|
var CountriesSelect = function (_a) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: nt45c */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-text-secondary: rgba(60, 60, 67, 0.66); /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -17,19 +17,19 @@
|
|
|
17
17
|
} :root {
|
|
18
18
|
} :root {
|
|
19
19
|
--text-secondary-color: var(--color-light-text-secondary);
|
|
20
|
-
} .intl-phone-
|
|
20
|
+
} .intl-phone-input__component_1teey {
|
|
21
21
|
position: static;
|
|
22
22
|
display: flex;
|
|
23
23
|
min-width: initial;
|
|
24
24
|
height: 100%;
|
|
25
|
-
} .intl-phone-
|
|
25
|
+
} .intl-phone-input__option_1teey {
|
|
26
26
|
display: flex;
|
|
27
27
|
align-items: flex-start;
|
|
28
|
-
} .intl-phone-
|
|
28
|
+
} .intl-phone-input__flag_1teey {
|
|
29
29
|
flex-shrink: 0;
|
|
30
30
|
margin-right: var(--gap-xs);
|
|
31
|
-
} .intl-phone-
|
|
31
|
+
} .intl-phone-input__countryName_1teey {
|
|
32
32
|
margin-right: var(--gap-xs);
|
|
33
|
-
} .intl-phone-
|
|
33
|
+
} .intl-phone-input__dialCode_1teey {
|
|
34
34
|
color: var(--text-secondary-color);
|
|
35
35
|
}
|
|
@@ -18,7 +18,7 @@ var mergeRefs__default = /*#__PURE__*/_interopDefaultCompat(mergeRefs);
|
|
|
18
18
|
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
19
19
|
var WorldMagnifierMIcon__default = /*#__PURE__*/_interopDefaultCompat(WorldMagnifierMIcon);
|
|
20
20
|
|
|
21
|
-
var styles = {"component":"intl-phone-
|
|
21
|
+
var styles = {"component":"intl-phone-input__component_nngqd","flagIconContainer":"intl-phone-input__flagIconContainer_nngqd","emptyCountryIcon":"intl-phone-input__emptyCountryIcon_nngqd","disabled":"intl-phone-input__disabled_nngqd","inner":"intl-phone-input__inner_nngqd","l":"intl-phone-input__l_nngqd","xl":"intl-phone-input__xl_nngqd","focusVisible":"intl-phone-input__focusVisible_nngqd"};
|
|
22
22
|
require('./index.css')
|
|
23
23
|
|
|
24
24
|
var EMPTY_COUNTRY_SELECT_FIELD = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1824o */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-border-link: #0072ef;
|
|
@@ -21,33 +21,33 @@
|
|
|
21
21
|
} :root {
|
|
22
22
|
--focus-color: var(--color-light-border-link);
|
|
23
23
|
--disabled-cursor: not-allowed;
|
|
24
|
-
} .intl-phone-
|
|
24
|
+
} .intl-phone-input__component_nngqd {
|
|
25
25
|
height: 100%;
|
|
26
26
|
cursor: pointer;
|
|
27
27
|
outline: none;
|
|
28
28
|
position: relative;
|
|
29
|
-
} .intl-phone-
|
|
29
|
+
} .intl-phone-input__flagIconContainer_nngqd {
|
|
30
30
|
display: flex;
|
|
31
31
|
justify-content: center;
|
|
32
32
|
align-items: center;
|
|
33
33
|
width: 24px;
|
|
34
34
|
height: 24px;
|
|
35
35
|
margin-right: var(--gap-2xs);
|
|
36
|
-
} .intl-phone-
|
|
36
|
+
} .intl-phone-input__emptyCountryIcon_nngqd {
|
|
37
37
|
color: var(--color-light-graphic-secondary);
|
|
38
|
-
} .intl-phone-
|
|
38
|
+
} .intl-phone-input__disabled_nngqd {
|
|
39
39
|
cursor: var(--disabled-cursor);
|
|
40
|
-
} .intl-phone-
|
|
40
|
+
} .intl-phone-input__inner_nngqd {
|
|
41
41
|
position: relative;
|
|
42
42
|
display: flex;
|
|
43
43
|
align-items: center;
|
|
44
44
|
height: 100%;
|
|
45
45
|
padding-left: var(--gap-s);
|
|
46
46
|
outline: none;
|
|
47
|
-
} .intl-phone-
|
|
48
|
-
.intl-phone-
|
|
47
|
+
} .intl-phone-input__l_nngqd .intl-phone-input__inner_nngqd,
|
|
48
|
+
.intl-phone-input__xl_nngqd .intl-phone-input__inner_nngqd {
|
|
49
49
|
padding-left: var(--gap-m);
|
|
50
|
-
} .intl-phone-
|
|
50
|
+
} .intl-phone-input__focusVisible_nngqd {
|
|
51
51
|
outline: 2px solid var(--focus-color);
|
|
52
52
|
outline-offset: 2px;
|
|
53
53
|
}
|
package/cssm/component.js
CHANGED
|
@@ -275,7 +275,9 @@ var IntlPhoneInput = React.forwardRef(function (_a, ref) {
|
|
|
275
275
|
handleInputNewChar(event, caretPosition);
|
|
276
276
|
}
|
|
277
277
|
};
|
|
278
|
-
var handleClear = function () {
|
|
278
|
+
var handleClear = function (event) {
|
|
279
|
+
var _a;
|
|
280
|
+
(_a = inputProps === null || inputProps === void 0 ? void 0 : inputProps.onClear) === null || _a === void 0 ? void 0 : _a.call(inputProps, event);
|
|
279
281
|
if (clearableCountryCode) {
|
|
280
282
|
onChange('+');
|
|
281
283
|
if (canBeEmptyCountry) {
|
|
@@ -288,13 +290,14 @@ var IntlPhoneInput = React.forwardRef(function (_a, ref) {
|
|
|
288
290
|
}
|
|
289
291
|
};
|
|
290
292
|
var handlePaste = function (event) {
|
|
291
|
-
var _a;
|
|
293
|
+
var _a, _b;
|
|
294
|
+
(_a = inputProps === null || inputProps === void 0 ? void 0 : inputProps.onPaste) === null || _a === void 0 ? void 0 : _a.call(inputProps, event);
|
|
292
295
|
event.preventDefault();
|
|
293
|
-
var text = (
|
|
296
|
+
var text = (_b = event.clipboardData) === null || _b === void 0 ? void 0 : _b.getData('Text');
|
|
294
297
|
if (!text || !inputRef.current) {
|
|
295
298
|
return;
|
|
296
299
|
}
|
|
297
|
-
var
|
|
300
|
+
var _c = inputRef.current, selectionStart = _c.selectionStart, selectionEnd = _c.selectionEnd;
|
|
298
301
|
var preparedNumber = utils_preparePasteData.preparePasteData(value, text, selectionStart || 0, selectionEnd || 0, ruNumberPriority && countryIso2 === 'ru');
|
|
299
302
|
var targetCountry = getCountryByNumber(preparedNumber);
|
|
300
303
|
var maxPhoneLength = (targetCountry && (maxPhoneLen === null || maxPhoneLen === void 0 ? void 0 : maxPhoneLen[targetCountry.iso2.toUpperCase()])) || MAX_PHONE_LEN;
|
|
@@ -344,7 +347,7 @@ var IntlPhoneInput = React.forwardRef(function (_a, ref) {
|
|
|
344
347
|
/* eslint-disable-next-line react-hooks/exhaustive-deps */
|
|
345
348
|
}, [value, canBeEmptyCountry, countryIso2, defaultCountryIso2]);
|
|
346
349
|
useCaretAvoidCountryCode.useCaretAvoidCountryCode({ inputRef: inputRef, countryCodeLength: countryCodeLength, clearableCountryCode: clearableCountryCode });
|
|
347
|
-
return (React__default.default.createElement(coreComponentsInputAutocomplete.InputAutocomplete, tslib.__assign({}, restProps, { ref: ref, inputProps: tslib.__assign(tslib.__assign({ clear: clear && !isEmptyValue
|
|
350
|
+
return (React__default.default.createElement(coreComponentsInputAutocomplete.InputAutocomplete, tslib.__assign({}, restProps, { ref: ref, inputProps: tslib.__assign(tslib.__assign({ clear: clear && !isEmptyValue }, inputProps), { onClear: handleClear, ref: inputRef, wrapperRef: setInputWrapperRef, type: 'tel', colors: colors, className: cn__default.default(className, styles__default.default[size]), addonsClassName: styles__default.default.addons, onKeyDown: handleKeyDown, onPaste: handlePaste, leftAddons: hideCountrySelect ? (React__default.default.createElement("span", { className: styles__default.default.flagIconWrapper }, countryIso2 ? (React__default.default.createElement(components_flagIcon_component.FlagIcon, { country: countryIso2 })) : (React__default.default.createElement(WorldMagnifierMIcon__default.default, { className: styles__default.default.emptyCountryIcon })))) : (countries.length > 1 && (React__default.default.createElement(components_select_component.CountriesSelect, { dataTestId: 'countries-select', disabled: disabled || readOnly, size: size, selected: countryIso2, countries: countries, onChange: handleSelectChange, fieldWidth: inputWrapperRef && inputWrapperRef.getBoundingClientRect().width, preventFlip: preventFlip }))) }), optionsListWidth: 'field', closeOnSelect: true, onInput: handleInputChange, onChange: handleChange, options: options, disabled: disabled, readOnly: readOnly, size: size, className: className, value: value })));
|
|
348
351
|
});
|
|
349
352
|
|
|
350
353
|
exports.IntlPhoneInput = IntlPhoneInput;
|
package/esm/component.js
CHANGED
|
@@ -16,7 +16,7 @@ import './components/flag-icon/flagSprite.js';
|
|
|
16
16
|
import '@alfalab/core-components-select/esm';
|
|
17
17
|
import './components/select-field/component.js';
|
|
18
18
|
|
|
19
|
-
var styles = {"addons":"intl-phone-
|
|
19
|
+
var styles = {"addons":"intl-phone-input__addons_1aj0o","l":"intl-phone-input__l_1aj0o","xl":"intl-phone-input__xl_1aj0o","flagIconWrapper":"intl-phone-input__flagIconWrapper_1aj0o","emptyCountryIcon":"intl-phone-input__emptyCountryIcon_1aj0o"};
|
|
20
20
|
require('./index.css')
|
|
21
21
|
|
|
22
22
|
var countriesHash = getCountriesHash();
|
|
@@ -245,7 +245,9 @@ var IntlPhoneInput = forwardRef(function (_a, ref) {
|
|
|
245
245
|
handleInputNewChar(event, caretPosition);
|
|
246
246
|
}
|
|
247
247
|
};
|
|
248
|
-
var handleClear = function () {
|
|
248
|
+
var handleClear = function (event) {
|
|
249
|
+
var _a;
|
|
250
|
+
(_a = inputProps === null || inputProps === void 0 ? void 0 : inputProps.onClear) === null || _a === void 0 ? void 0 : _a.call(inputProps, event);
|
|
249
251
|
if (clearableCountryCode) {
|
|
250
252
|
onChange('+');
|
|
251
253
|
if (canBeEmptyCountry) {
|
|
@@ -258,13 +260,14 @@ var IntlPhoneInput = forwardRef(function (_a, ref) {
|
|
|
258
260
|
}
|
|
259
261
|
};
|
|
260
262
|
var handlePaste = function (event) {
|
|
261
|
-
var _a;
|
|
263
|
+
var _a, _b;
|
|
264
|
+
(_a = inputProps === null || inputProps === void 0 ? void 0 : inputProps.onPaste) === null || _a === void 0 ? void 0 : _a.call(inputProps, event);
|
|
262
265
|
event.preventDefault();
|
|
263
|
-
var text = (
|
|
266
|
+
var text = (_b = event.clipboardData) === null || _b === void 0 ? void 0 : _b.getData('Text');
|
|
264
267
|
if (!text || !inputRef.current) {
|
|
265
268
|
return;
|
|
266
269
|
}
|
|
267
|
-
var
|
|
270
|
+
var _c = inputRef.current, selectionStart = _c.selectionStart, selectionEnd = _c.selectionEnd;
|
|
268
271
|
var preparedNumber = preparePasteData(value, text, selectionStart || 0, selectionEnd || 0, ruNumberPriority && countryIso2 === 'ru');
|
|
269
272
|
var targetCountry = getCountryByNumber(preparedNumber);
|
|
270
273
|
var maxPhoneLength = (targetCountry && (maxPhoneLen === null || maxPhoneLen === void 0 ? void 0 : maxPhoneLen[targetCountry.iso2.toUpperCase()])) || MAX_PHONE_LEN;
|
|
@@ -314,7 +317,7 @@ var IntlPhoneInput = forwardRef(function (_a, ref) {
|
|
|
314
317
|
/* eslint-disable-next-line react-hooks/exhaustive-deps */
|
|
315
318
|
}, [value, canBeEmptyCountry, countryIso2, defaultCountryIso2]);
|
|
316
319
|
useCaretAvoidCountryCode({ inputRef: inputRef, countryCodeLength: countryCodeLength, clearableCountryCode: clearableCountryCode });
|
|
317
|
-
return (React.createElement(InputAutocomplete, __assign({}, restProps, { ref: ref, inputProps: __assign(__assign({ clear: clear && !isEmptyValue
|
|
320
|
+
return (React.createElement(InputAutocomplete, __assign({}, restProps, { ref: ref, inputProps: __assign(__assign({ clear: clear && !isEmptyValue }, inputProps), { onClear: handleClear, ref: inputRef, wrapperRef: setInputWrapperRef, type: 'tel', colors: colors, className: cn(className, styles[size]), addonsClassName: styles.addons, onKeyDown: handleKeyDown, onPaste: handlePaste, leftAddons: hideCountrySelect ? (React.createElement("span", { className: styles.flagIconWrapper }, countryIso2 ? (React.createElement(FlagIcon, { country: countryIso2 })) : (React.createElement(WorldMagnifierMIcon, { className: styles.emptyCountryIcon })))) : (countries.length > 1 && (React.createElement(CountriesSelect, { dataTestId: 'countries-select', disabled: disabled || readOnly, size: size, selected: countryIso2, countries: countries, onChange: handleSelectChange, fieldWidth: inputWrapperRef && inputWrapperRef.getBoundingClientRect().width, preventFlip: preventFlip }))) }), optionsListWidth: 'field', closeOnSelect: true, onInput: handleInputChange, onChange: handleChange, options: options, disabled: disabled, readOnly: readOnly, size: size, className: className, value: value })));
|
|
318
321
|
});
|
|
319
322
|
|
|
320
323
|
export { IntlPhoneInput };
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import cn from 'classnames';
|
|
3
3
|
import { flagSprite } from './flagSprite.js';
|
|
4
4
|
|
|
5
|
-
var styles = {"flagIcon":"intl-phone-
|
|
5
|
+
var styles = {"flagIcon":"intl-phone-input__flagIcon_ahdi9","flagPlaceholder":"intl-phone-input__flagPlaceholder_ahdi9"};
|
|
6
6
|
require('./index.css')
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1wucx */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-specialbg-tertiary-transparent: rgba(11, 31, 53, 0.1); /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -17,10 +17,10 @@
|
|
|
17
17
|
--gap-3xs: 2px;
|
|
18
18
|
} :root {
|
|
19
19
|
} :root {
|
|
20
|
-
} .intl-phone-
|
|
20
|
+
} .intl-phone-input__flagIcon_ahdi9 {
|
|
21
21
|
max-width: 24px;
|
|
22
22
|
max-height: 24px;
|
|
23
|
-
} .intl-phone-
|
|
23
|
+
} .intl-phone-input__flagPlaceholder_ahdi9 {
|
|
24
24
|
width: 24px;
|
|
25
25
|
height: 16px;
|
|
26
26
|
max-height: 16px;
|
|
@@ -9,7 +9,7 @@ import 'react-merge-refs';
|
|
|
9
9
|
import '@alfalab/hooks';
|
|
10
10
|
import '@alfalab/icons-glyph/WorldMagnifierMIcon';
|
|
11
11
|
|
|
12
|
-
var styles = {"component":"intl-phone-
|
|
12
|
+
var styles = {"component":"intl-phone-input__component_1teey","option":"intl-phone-input__option_1teey","flag":"intl-phone-input__flag_1teey","countryName":"intl-phone-input__countryName_1teey","dialCode":"intl-phone-input__dialCode_1teey"};
|
|
13
13
|
require('./index.css')
|
|
14
14
|
|
|
15
15
|
var CountriesSelect = function (_a) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: nt45c */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-text-secondary: rgba(60, 60, 67, 0.66); /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -17,19 +17,19 @@
|
|
|
17
17
|
} :root {
|
|
18
18
|
} :root {
|
|
19
19
|
--text-secondary-color: var(--color-light-text-secondary);
|
|
20
|
-
} .intl-phone-
|
|
20
|
+
} .intl-phone-input__component_1teey {
|
|
21
21
|
position: static;
|
|
22
22
|
display: flex;
|
|
23
23
|
min-width: initial;
|
|
24
24
|
height: 100%;
|
|
25
|
-
} .intl-phone-
|
|
25
|
+
} .intl-phone-input__option_1teey {
|
|
26
26
|
display: flex;
|
|
27
27
|
align-items: flex-start;
|
|
28
|
-
} .intl-phone-
|
|
28
|
+
} .intl-phone-input__flag_1teey {
|
|
29
29
|
flex-shrink: 0;
|
|
30
30
|
margin-right: var(--gap-xs);
|
|
31
|
-
} .intl-phone-
|
|
31
|
+
} .intl-phone-input__countryName_1teey {
|
|
32
32
|
margin-right: var(--gap-xs);
|
|
33
|
-
} .intl-phone-
|
|
33
|
+
} .intl-phone-input__dialCode_1teey {
|
|
34
34
|
color: var(--text-secondary-color);
|
|
35
35
|
}
|
|
@@ -7,7 +7,7 @@ import WorldMagnifierMIcon from '@alfalab/icons-glyph/WorldMagnifierMIcon';
|
|
|
7
7
|
import { FlagIcon } from '../flag-icon/component.js';
|
|
8
8
|
import '../flag-icon/flagSprite.js';
|
|
9
9
|
|
|
10
|
-
var styles = {"component":"intl-phone-
|
|
10
|
+
var styles = {"component":"intl-phone-input__component_nngqd","flagIconContainer":"intl-phone-input__flagIconContainer_nngqd","emptyCountryIcon":"intl-phone-input__emptyCountryIcon_nngqd","disabled":"intl-phone-input__disabled_nngqd","inner":"intl-phone-input__inner_nngqd","l":"intl-phone-input__l_nngqd","xl":"intl-phone-input__xl_nngqd","focusVisible":"intl-phone-input__focusVisible_nngqd"};
|
|
11
11
|
require('./index.css')
|
|
12
12
|
|
|
13
13
|
var EMPTY_COUNTRY_SELECT_FIELD = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1824o */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-border-link: #0072ef;
|
|
@@ -21,33 +21,33 @@
|
|
|
21
21
|
} :root {
|
|
22
22
|
--focus-color: var(--color-light-border-link);
|
|
23
23
|
--disabled-cursor: not-allowed;
|
|
24
|
-
} .intl-phone-
|
|
24
|
+
} .intl-phone-input__component_nngqd {
|
|
25
25
|
height: 100%;
|
|
26
26
|
cursor: pointer;
|
|
27
27
|
outline: none;
|
|
28
28
|
position: relative;
|
|
29
|
-
} .intl-phone-
|
|
29
|
+
} .intl-phone-input__flagIconContainer_nngqd {
|
|
30
30
|
display: flex;
|
|
31
31
|
justify-content: center;
|
|
32
32
|
align-items: center;
|
|
33
33
|
width: 24px;
|
|
34
34
|
height: 24px;
|
|
35
35
|
margin-right: var(--gap-2xs);
|
|
36
|
-
} .intl-phone-
|
|
36
|
+
} .intl-phone-input__emptyCountryIcon_nngqd {
|
|
37
37
|
color: var(--color-light-graphic-secondary);
|
|
38
|
-
} .intl-phone-
|
|
38
|
+
} .intl-phone-input__disabled_nngqd {
|
|
39
39
|
cursor: var(--disabled-cursor);
|
|
40
|
-
} .intl-phone-
|
|
40
|
+
} .intl-phone-input__inner_nngqd {
|
|
41
41
|
position: relative;
|
|
42
42
|
display: flex;
|
|
43
43
|
align-items: center;
|
|
44
44
|
height: 100%;
|
|
45
45
|
padding-left: var(--gap-s);
|
|
46
46
|
outline: none;
|
|
47
|
-
} .intl-phone-
|
|
48
|
-
.intl-phone-
|
|
47
|
+
} .intl-phone-input__l_nngqd .intl-phone-input__inner_nngqd,
|
|
48
|
+
.intl-phone-input__xl_nngqd .intl-phone-input__inner_nngqd {
|
|
49
49
|
padding-left: var(--gap-m);
|
|
50
|
-
} .intl-phone-
|
|
50
|
+
} .intl-phone-input__focusVisible_nngqd {
|
|
51
51
|
outline: 2px solid var(--focus-color);
|
|
52
52
|
outline-offset: 2px;
|
|
53
53
|
}
|
package/esm/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1lohd */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-graphic-secondary: #86868a; /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -16,17 +16,17 @@
|
|
|
16
16
|
--gap-s: 12px;
|
|
17
17
|
} :root {
|
|
18
18
|
} :root {
|
|
19
|
-
} .intl-phone-
|
|
19
|
+
} .intl-phone-input__addons_1aj0o {
|
|
20
20
|
padding-left: 0;
|
|
21
|
-
} .intl-phone-
|
|
21
|
+
} .intl-phone-input__l_1aj0o .intl-phone-input__addons_1aj0o, .intl-phone-input__xl_1aj0o .intl-phone-input__addons_1aj0o {
|
|
22
22
|
padding-left: 0;
|
|
23
|
-
} .intl-phone-
|
|
23
|
+
} .intl-phone-input__flagIconWrapper_1aj0o {
|
|
24
24
|
display: flex;
|
|
25
25
|
justify-content: center;
|
|
26
26
|
align-items: center;
|
|
27
27
|
width: 24px;
|
|
28
28
|
height: 24px;
|
|
29
29
|
margin-left: var(--gap-s);
|
|
30
|
-
} .intl-phone-
|
|
30
|
+
} .intl-phone-input__emptyCountryIcon_1aj0o {
|
|
31
31
|
color: var(--color-light-graphic-secondary);
|
|
32
32
|
}
|
package/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1lohd */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-graphic-secondary: #86868a; /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -16,17 +16,17 @@
|
|
|
16
16
|
--gap-s: 12px;
|
|
17
17
|
} :root {
|
|
18
18
|
} :root {
|
|
19
|
-
} .intl-phone-
|
|
19
|
+
} .intl-phone-input__addons_1aj0o {
|
|
20
20
|
padding-left: 0;
|
|
21
|
-
} .intl-phone-
|
|
21
|
+
} .intl-phone-input__l_1aj0o .intl-phone-input__addons_1aj0o, .intl-phone-input__xl_1aj0o .intl-phone-input__addons_1aj0o {
|
|
22
22
|
padding-left: 0;
|
|
23
|
-
} .intl-phone-
|
|
23
|
+
} .intl-phone-input__flagIconWrapper_1aj0o {
|
|
24
24
|
display: flex;
|
|
25
25
|
justify-content: center;
|
|
26
26
|
align-items: center;
|
|
27
27
|
width: 24px;
|
|
28
28
|
height: 24px;
|
|
29
29
|
margin-left: var(--gap-s);
|
|
30
|
-
} .intl-phone-
|
|
30
|
+
} .intl-phone-input__emptyCountryIcon_1aj0o {
|
|
31
31
|
color: var(--color-light-graphic-secondary);
|
|
32
32
|
}
|
package/modern/component.js
CHANGED
|
@@ -15,7 +15,7 @@ import './components/flag-icon/flagSprite.js';
|
|
|
15
15
|
import '@alfalab/core-components-select/modern';
|
|
16
16
|
import './components/select-field/component.js';
|
|
17
17
|
|
|
18
|
-
const styles = {"addons":"intl-phone-
|
|
18
|
+
const styles = {"addons":"intl-phone-input__addons_1aj0o","l":"intl-phone-input__l_1aj0o","xl":"intl-phone-input__xl_1aj0o","flagIconWrapper":"intl-phone-input__flagIconWrapper_1aj0o","emptyCountryIcon":"intl-phone-input__emptyCountryIcon_1aj0o"};
|
|
19
19
|
require('./index.css')
|
|
20
20
|
|
|
21
21
|
const countriesHash = getCountriesHash();
|
|
@@ -241,7 +241,8 @@ const IntlPhoneInput = forwardRef(({ disabled = false, readOnly = false, hideCou
|
|
|
241
241
|
handleInputNewChar(event, caretPosition);
|
|
242
242
|
}
|
|
243
243
|
};
|
|
244
|
-
const handleClear = () => {
|
|
244
|
+
const handleClear = (event) => {
|
|
245
|
+
inputProps?.onClear?.(event);
|
|
245
246
|
if (clearableCountryCode) {
|
|
246
247
|
onChange('+');
|
|
247
248
|
if (canBeEmptyCountry) {
|
|
@@ -254,6 +255,7 @@ const IntlPhoneInput = forwardRef(({ disabled = false, readOnly = false, hideCou
|
|
|
254
255
|
}
|
|
255
256
|
};
|
|
256
257
|
const handlePaste = (event) => {
|
|
258
|
+
inputProps?.onPaste?.(event);
|
|
257
259
|
event.preventDefault();
|
|
258
260
|
const text = event.clipboardData?.getData('Text');
|
|
259
261
|
if (!text || !inputRef.current) {
|
|
@@ -311,8 +313,8 @@ const IntlPhoneInput = forwardRef(({ disabled = false, readOnly = false, hideCou
|
|
|
311
313
|
useCaretAvoidCountryCode({ inputRef, countryCodeLength, clearableCountryCode });
|
|
312
314
|
return (React.createElement(InputAutocomplete, { ...restProps, ref: ref, inputProps: {
|
|
313
315
|
clear: clear && !isEmptyValue,
|
|
314
|
-
onClear: handleClear,
|
|
315
316
|
...inputProps,
|
|
317
|
+
onClear: handleClear,
|
|
316
318
|
ref: inputRef,
|
|
317
319
|
wrapperRef: setInputWrapperRef,
|
|
318
320
|
type: 'tel',
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import cn from 'classnames';
|
|
3
3
|
import { flagSprite } from './flagSprite.js';
|
|
4
4
|
|
|
5
|
-
const styles = {"flagIcon":"intl-phone-
|
|
5
|
+
const styles = {"flagIcon":"intl-phone-input__flagIcon_ahdi9","flagPlaceholder":"intl-phone-input__flagPlaceholder_ahdi9"};
|
|
6
6
|
require('./index.css')
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1wucx */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-specialbg-tertiary-transparent: rgba(11, 31, 53, 0.1); /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -17,10 +17,10 @@
|
|
|
17
17
|
--gap-3xs: 2px;
|
|
18
18
|
} :root {
|
|
19
19
|
} :root {
|
|
20
|
-
} .intl-phone-
|
|
20
|
+
} .intl-phone-input__flagIcon_ahdi9 {
|
|
21
21
|
max-width: 24px;
|
|
22
22
|
max-height: 24px;
|
|
23
|
-
} .intl-phone-
|
|
23
|
+
} .intl-phone-input__flagPlaceholder_ahdi9 {
|
|
24
24
|
width: 24px;
|
|
25
25
|
height: 16px;
|
|
26
26
|
max-height: 16px;
|
|
@@ -8,7 +8,7 @@ import 'react-merge-refs';
|
|
|
8
8
|
import '@alfalab/hooks';
|
|
9
9
|
import '@alfalab/icons-glyph/WorldMagnifierMIcon';
|
|
10
10
|
|
|
11
|
-
const styles = {"component":"intl-phone-
|
|
11
|
+
const styles = {"component":"intl-phone-input__component_1teey","option":"intl-phone-input__option_1teey","flag":"intl-phone-input__flag_1teey","countryName":"intl-phone-input__countryName_1teey","dialCode":"intl-phone-input__dialCode_1teey"};
|
|
12
12
|
require('./index.css')
|
|
13
13
|
|
|
14
14
|
/* eslint-disable jsx-a11y/no-static-element-interactions */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: nt45c */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-text-secondary: rgba(60, 60, 67, 0.66); /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -17,19 +17,19 @@
|
|
|
17
17
|
} :root {
|
|
18
18
|
} :root {
|
|
19
19
|
--text-secondary-color: var(--color-light-text-secondary);
|
|
20
|
-
} .intl-phone-
|
|
20
|
+
} .intl-phone-input__component_1teey {
|
|
21
21
|
position: static;
|
|
22
22
|
display: flex;
|
|
23
23
|
min-width: initial;
|
|
24
24
|
height: 100%;
|
|
25
|
-
} .intl-phone-
|
|
25
|
+
} .intl-phone-input__option_1teey {
|
|
26
26
|
display: flex;
|
|
27
27
|
align-items: flex-start;
|
|
28
|
-
} .intl-phone-
|
|
28
|
+
} .intl-phone-input__flag_1teey {
|
|
29
29
|
flex-shrink: 0;
|
|
30
30
|
margin-right: var(--gap-xs);
|
|
31
|
-
} .intl-phone-
|
|
31
|
+
} .intl-phone-input__countryName_1teey {
|
|
32
32
|
margin-right: var(--gap-xs);
|
|
33
|
-
} .intl-phone-
|
|
33
|
+
} .intl-phone-input__dialCode_1teey {
|
|
34
34
|
color: var(--text-secondary-color);
|
|
35
35
|
}
|
|
@@ -6,7 +6,7 @@ import WorldMagnifierMIcon from '@alfalab/icons-glyph/WorldMagnifierMIcon';
|
|
|
6
6
|
import { FlagIcon } from '../flag-icon/component.js';
|
|
7
7
|
import '../flag-icon/flagSprite.js';
|
|
8
8
|
|
|
9
|
-
const styles = {"component":"intl-phone-
|
|
9
|
+
const styles = {"component":"intl-phone-input__component_nngqd","flagIconContainer":"intl-phone-input__flagIconContainer_nngqd","emptyCountryIcon":"intl-phone-input__emptyCountryIcon_nngqd","disabled":"intl-phone-input__disabled_nngqd","inner":"intl-phone-input__inner_nngqd","l":"intl-phone-input__l_nngqd","xl":"intl-phone-input__xl_nngqd","focusVisible":"intl-phone-input__focusVisible_nngqd"};
|
|
10
10
|
require('./index.css')
|
|
11
11
|
|
|
12
12
|
const EMPTY_COUNTRY_SELECT_FIELD = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1824o */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-border-link: #0072ef;
|
|
@@ -21,33 +21,33 @@
|
|
|
21
21
|
} :root {
|
|
22
22
|
--focus-color: var(--color-light-border-link);
|
|
23
23
|
--disabled-cursor: not-allowed;
|
|
24
|
-
} .intl-phone-
|
|
24
|
+
} .intl-phone-input__component_nngqd {
|
|
25
25
|
height: 100%;
|
|
26
26
|
cursor: pointer;
|
|
27
27
|
outline: none;
|
|
28
28
|
position: relative;
|
|
29
|
-
} .intl-phone-
|
|
29
|
+
} .intl-phone-input__flagIconContainer_nngqd {
|
|
30
30
|
display: flex;
|
|
31
31
|
justify-content: center;
|
|
32
32
|
align-items: center;
|
|
33
33
|
width: 24px;
|
|
34
34
|
height: 24px;
|
|
35
35
|
margin-right: var(--gap-2xs);
|
|
36
|
-
} .intl-phone-
|
|
36
|
+
} .intl-phone-input__emptyCountryIcon_nngqd {
|
|
37
37
|
color: var(--color-light-graphic-secondary);
|
|
38
|
-
} .intl-phone-
|
|
38
|
+
} .intl-phone-input__disabled_nngqd {
|
|
39
39
|
cursor: var(--disabled-cursor);
|
|
40
|
-
} .intl-phone-
|
|
40
|
+
} .intl-phone-input__inner_nngqd {
|
|
41
41
|
position: relative;
|
|
42
42
|
display: flex;
|
|
43
43
|
align-items: center;
|
|
44
44
|
height: 100%;
|
|
45
45
|
padding-left: var(--gap-s);
|
|
46
46
|
outline: none;
|
|
47
|
-
} .intl-phone-
|
|
48
|
-
.intl-phone-
|
|
47
|
+
} .intl-phone-input__l_nngqd .intl-phone-input__inner_nngqd,
|
|
48
|
+
.intl-phone-input__xl_nngqd .intl-phone-input__inner_nngqd {
|
|
49
49
|
padding-left: var(--gap-m);
|
|
50
|
-
} .intl-phone-
|
|
50
|
+
} .intl-phone-input__focusVisible_nngqd {
|
|
51
51
|
outline: 2px solid var(--focus-color);
|
|
52
52
|
outline-offset: 2px;
|
|
53
53
|
}
|
package/modern/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1lohd */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-graphic-secondary: #86868a; /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -16,17 +16,17 @@
|
|
|
16
16
|
--gap-s: 12px;
|
|
17
17
|
} :root {
|
|
18
18
|
} :root {
|
|
19
|
-
} .intl-phone-
|
|
19
|
+
} .intl-phone-input__addons_1aj0o {
|
|
20
20
|
padding-left: 0;
|
|
21
|
-
} .intl-phone-
|
|
21
|
+
} .intl-phone-input__l_1aj0o .intl-phone-input__addons_1aj0o, .intl-phone-input__xl_1aj0o .intl-phone-input__addons_1aj0o {
|
|
22
22
|
padding-left: 0;
|
|
23
|
-
} .intl-phone-
|
|
23
|
+
} .intl-phone-input__flagIconWrapper_1aj0o {
|
|
24
24
|
display: flex;
|
|
25
25
|
justify-content: center;
|
|
26
26
|
align-items: center;
|
|
27
27
|
width: 24px;
|
|
28
28
|
height: 24px;
|
|
29
29
|
margin-left: var(--gap-s);
|
|
30
|
-
} .intl-phone-
|
|
30
|
+
} .intl-phone-input__emptyCountryIcon_1aj0o {
|
|
31
31
|
color: var(--color-light-graphic-secondary);
|
|
32
32
|
}
|
package/package.json
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alfalab/core-components-intl-phone-input",
|
|
3
|
-
"version": "9.4.
|
|
3
|
+
"version": "9.4.5",
|
|
4
4
|
"description": "Phone input for international phones",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"main": "index.js",
|
|
8
8
|
"module": "./esm/index.js",
|
|
9
|
-
"scripts": {
|
|
10
|
-
"postinstall": "node -e \"if (require('fs').existsSync('./send-stats.js')){require('./send-stats.js')} \""
|
|
11
|
-
},
|
|
12
9
|
"publishConfig": {
|
|
13
10
|
"access": "public",
|
|
14
11
|
"directory": "dist"
|
|
@@ -17,8 +14,8 @@
|
|
|
17
14
|
"react": "^16.9.0 || ^17.0.1 || ^18.0.0"
|
|
18
15
|
},
|
|
19
16
|
"dependencies": {
|
|
20
|
-
"@alfalab/core-components-input-autocomplete": "9.4.
|
|
21
|
-
"@alfalab/core-components-select": "^14.3.
|
|
17
|
+
"@alfalab/core-components-input-autocomplete": "9.4.6",
|
|
18
|
+
"@alfalab/core-components-select": "^14.3.4",
|
|
22
19
|
"@alfalab/hooks": "^1.13.0",
|
|
23
20
|
"@alfalab/icons-glyph": "^2.108.0",
|
|
24
21
|
"@alfalab/utils": "^1.14.4",
|
package/send-stats.js
DELETED
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
const http = require('http');
|
|
2
|
-
const fs = require('fs');
|
|
3
|
-
const { promisify } = require('util');
|
|
4
|
-
const path = require('path');
|
|
5
|
-
|
|
6
|
-
const readFile = promisify(fs.readFile);
|
|
7
|
-
|
|
8
|
-
async function main() {
|
|
9
|
-
const remoteHost = process.env.NIS_HOST || 'digital';
|
|
10
|
-
const remotePort = process.env.NIS_PORT || 80;
|
|
11
|
-
const remotePath = process.env.NIS_PATH || '/npm-install-stats/api/install-stats';
|
|
12
|
-
|
|
13
|
-
try {
|
|
14
|
-
const [_, node, os, arch] =
|
|
15
|
-
/node\/v(\d+\.\d+\.\d+) (\w+) (\w+)/.exec(process.env.npm_config_user_agent) || [];
|
|
16
|
-
const [__, npm] = /npm\/(\d+\.\d+\.\d+)/.exec(process.env.npm_config_user_agent) || [];
|
|
17
|
-
const [___, yarn] = /yarn\/(\d+\.\d+\.\d+)/.exec(process.env.npm_config_user_agent) || [];
|
|
18
|
-
|
|
19
|
-
let ownPackageJson, packageJson;
|
|
20
|
-
|
|
21
|
-
try {
|
|
22
|
-
const result = await Promise.all([
|
|
23
|
-
readFile(path.join(process.cwd(), 'package.json'), 'utf-8'),
|
|
24
|
-
readFile(path.join(process.cwd(), '../../../package.json'), 'utf-8'),
|
|
25
|
-
]);
|
|
26
|
-
|
|
27
|
-
ownPackageJson = JSON.parse(result[0]);
|
|
28
|
-
packageJson = JSON.parse(result[1]);
|
|
29
|
-
} catch (err) {
|
|
30
|
-
ownPackageJson = '';
|
|
31
|
-
packageJson = '';
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
const data = {
|
|
35
|
-
node,
|
|
36
|
-
npm,
|
|
37
|
-
yarn,
|
|
38
|
-
os,
|
|
39
|
-
arch,
|
|
40
|
-
ownPackageJson: JSON.stringify(ownPackageJson),
|
|
41
|
-
packageJson: JSON.stringify(packageJson),
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
const body = JSON.stringify(data);
|
|
45
|
-
|
|
46
|
-
const options = {
|
|
47
|
-
host: remoteHost,
|
|
48
|
-
port: remotePort,
|
|
49
|
-
path: remotePath,
|
|
50
|
-
method: 'POST',
|
|
51
|
-
headers: {
|
|
52
|
-
'Content-Type': 'application/json',
|
|
53
|
-
'Content-Length': body.length,
|
|
54
|
-
},
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
return new Promise((resolve, reject) => {
|
|
58
|
-
const req = http.request(options, (res) => {
|
|
59
|
-
res.on('end', () => {
|
|
60
|
-
resolve();
|
|
61
|
-
});
|
|
62
|
-
});
|
|
63
|
-
|
|
64
|
-
req.on('error', () => {
|
|
65
|
-
reject();
|
|
66
|
-
});
|
|
67
|
-
|
|
68
|
-
req.write(body);
|
|
69
|
-
req.end();
|
|
70
|
-
});
|
|
71
|
-
} catch (error) {
|
|
72
|
-
throw error;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
main()
|
|
77
|
-
.then(() => {
|
|
78
|
-
process.exit(0);
|
|
79
|
-
})
|
|
80
|
-
.catch(() => {
|
|
81
|
-
process.exit(0);
|
|
82
|
-
});
|