@alfalab/core-components-intl-phone-input 9.2.1 → 9.2.2
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-d11f26be.d.ts → component-7910cc84.d.ts} +0 -0
- package/{component-d11f26be.js → component-7910cc84.js} +12 -5
- package/component.js +10 -4
- package/components/flag-icon/component.js +7 -2
- package/components/flag-icon/index.css +3 -3
- package/components/index.js +1 -1
- package/components/select/component.js +15 -11
- package/components/select/index.css +6 -6
- package/components/select/index.js +1 -1
- package/components/select-field/component.js +1 -1
- package/components/select-field/index.css +9 -9
- package/components/select-field/index.d.ts +1 -1
- package/components/select-field/index.js +1 -1
- package/cssm/{component-555bdbef.d.ts → component-01884de0.d.ts} +0 -0
- package/cssm/{component-555bdbef.js → component-01884de0.js} +14 -6
- package/cssm/component.js +9 -2
- package/cssm/components/flag-icon/component.js +7 -1
- package/cssm/components/index.js +1 -1
- package/cssm/components/select/component.js +15 -10
- package/cssm/components/select/index.js +1 -1
- package/cssm/components/select-field/component.js +1 -1
- package/cssm/components/select-field/index.d.ts +1 -1
- package/cssm/components/select-field/index.js +1 -1
- package/cssm/index.js +1 -1
- package/esm/{component-f7046474.d.ts → component-432b3fc0.d.ts} +0 -0
- package/esm/{component-f7046474.js → component-432b3fc0.js} +1 -1
- package/esm/component.js +3 -3
- package/esm/components/flag-icon/component.js +1 -1
- package/esm/components/flag-icon/index.css +3 -3
- package/esm/components/index.js +1 -1
- package/esm/components/select/component.js +2 -2
- package/esm/components/select/index.css +6 -6
- package/esm/components/select/index.js +1 -1
- package/esm/components/select-field/component.js +1 -1
- package/esm/components/select-field/index.css +9 -9
- package/esm/components/select-field/index.d.ts +1 -1
- package/esm/components/select-field/index.js +1 -1
- package/esm/index.css +5 -5
- package/esm/index.js +1 -1
- package/esm/{libphonenumber-js.min-2001ae08.d.ts → libphonenumber-js.min-90652dfc.d.ts} +0 -0
- package/esm/{libphonenumber-js.min-2001ae08.js → libphonenumber-js.min-90652dfc.js} +0 -0
- package/index.css +5 -5
- package/index.js +1 -1
- package/{libphonenumber-js.min-ebcb18c3.d.ts → libphonenumber-js.min-7545e519.d.ts} +0 -0
- package/{libphonenumber-js.min-ebcb18c3.js → libphonenumber-js.min-7545e519.js} +0 -0
- package/modern/component.js +2 -2
- 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/modern/{libphonenumber-js.min-2001ae08.d.ts → libphonenumber-js.min-90652dfc.d.ts} +0 -0
- package/modern/{libphonenumber-js.min-2001ae08.js → libphonenumber-js.min-90652dfc.js} +0 -0
- package/package.json +4 -4
|
File without changes
|
|
@@ -7,6 +7,13 @@ var hooks = require('@alfalab/hooks');
|
|
|
7
7
|
var WorldMagnifierMIcon = require('@alfalab/icons-glyph/WorldMagnifierMIcon');
|
|
8
8
|
var components_flagIcon_component = require('./components/flag-icon/component.js');
|
|
9
9
|
|
|
10
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
11
|
+
|
|
12
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
13
|
+
var mergeRefs__default = /*#__PURE__*/_interopDefaultCompat(mergeRefs);
|
|
14
|
+
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
15
|
+
var WorldMagnifierMIcon__default = /*#__PURE__*/_interopDefaultCompat(WorldMagnifierMIcon);
|
|
16
|
+
|
|
10
17
|
/******************************************************************************
|
|
11
18
|
Copyright (c) Microsoft Corporation.
|
|
12
19
|
|
|
@@ -46,7 +53,7 @@ function __rest(s, e) {
|
|
|
46
53
|
return t;
|
|
47
54
|
}
|
|
48
55
|
|
|
49
|
-
var styles = {"component":"intl-phone-
|
|
56
|
+
var styles = {"component":"intl-phone-input__component_t4tca","flagIconContainer":"intl-phone-input__flagIconContainer_t4tca","emptyCountryIcon":"intl-phone-input__emptyCountryIcon_t4tca","disabled":"intl-phone-input__disabled_t4tca","inner":"intl-phone-input__inner_t4tca","l":"intl-phone-input__l_t4tca","xl":"intl-phone-input__xl_t4tca","focusVisible":"intl-phone-input__focusVisible_t4tca"};
|
|
50
57
|
require('./components/select-field/index.css')
|
|
51
58
|
|
|
52
59
|
var EMPTY_COUNTRY_SELECT_FIELD = {
|
|
@@ -58,13 +65,13 @@ var SelectField = function (_a) {
|
|
|
58
65
|
var selected = _a.selected, Arrow = _a.Arrow, size = _a.size, disabled = _a.disabled, _c = _a.innerProps, innerProps = _c === void 0 ? {} : _c;
|
|
59
66
|
var wrapperRef = React.useRef(null);
|
|
60
67
|
var focusVisible = hooks.useFocus(wrapperRef, 'keyboard')[0];
|
|
61
|
-
var ref = innerProps.ref ?
|
|
62
|
-
return (
|
|
68
|
+
var ref = innerProps.ref ? mergeRefs__default.default([innerProps.ref, wrapperRef]) : wrapperRef;
|
|
69
|
+
return (React__default.default.createElement("div", { ref: ref, className: cn__default.default(styles.component, size && styles[size], (_b = {},
|
|
63
70
|
_b[styles.focusVisible] = focusVisible,
|
|
64
71
|
_b[styles.disabled] = disabled,
|
|
65
72
|
_b)) },
|
|
66
|
-
|
|
67
|
-
|
|
73
|
+
React__default.default.createElement("div", exports.__assign({}, innerProps, { className: styles.inner }),
|
|
74
|
+
React__default.default.createElement("span", { className: styles.flagIconContainer }, !selected || selected === EMPTY_COUNTRY_SELECT_FIELD ? (React__default.default.createElement(WorldMagnifierMIcon__default.default, { className: styles.emptyCountryIcon })) : (React__default.default.createElement(components_flagIcon_component.FlagIcon, { country: selected.value }))),
|
|
68
75
|
Arrow)));
|
|
69
76
|
};
|
|
70
77
|
|
package/component.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var components_selectField_component = require('./component-
|
|
3
|
+
var components_selectField_component = require('./component-7910cc84.js');
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var cn = require('classnames');
|
|
6
6
|
var coreComponentsInputAutocomplete = require('@alfalab/core-components-input-autocomplete');
|
|
@@ -17,7 +17,13 @@ var useCaretAvoidCountryCode = require('./useCaretAvoidCountryCode.js');
|
|
|
17
17
|
require('./components/flag-icon/flagSprite.js');
|
|
18
18
|
require('@alfalab/core-components-select');
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
21
|
+
|
|
22
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
23
|
+
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
24
|
+
var WorldMagnifierMIcon__default = /*#__PURE__*/_interopDefaultCompat(WorldMagnifierMIcon);
|
|
25
|
+
|
|
26
|
+
var styles = {"addons":"intl-phone-input__addons_oa44m","l":"intl-phone-input__l_oa44m","xl":"intl-phone-input__xl_oa44m","flagIconWrapper":"intl-phone-input__flagIconWrapper_oa44m","emptyCountryIcon":"intl-phone-input__emptyCountryIcon_oa44m"};
|
|
21
27
|
require('./index.css')
|
|
22
28
|
|
|
23
29
|
var countriesHash = utils.getCountriesHash();
|
|
@@ -269,7 +275,7 @@ var IntlPhoneInput = React.forwardRef(function (_a, ref) {
|
|
|
269
275
|
if (phoneLibUtils.current)
|
|
270
276
|
return;
|
|
271
277
|
Promise.resolve().then(function () { return require(
|
|
272
|
-
/* webpackChunkName: "libphonenumber" */ './libphonenumber-js.min-
|
|
278
|
+
/* webpackChunkName: "libphonenumber" */ './libphonenumber-js.min-7545e519.js'); })
|
|
273
279
|
.then(function (utils) {
|
|
274
280
|
phoneLibUtils.current = utils.AsYouType;
|
|
275
281
|
if (canBeEmptyCountry) {
|
|
@@ -300,7 +306,7 @@ var IntlPhoneInput = React.forwardRef(function (_a, ref) {
|
|
|
300
306
|
/* eslint-disable-next-line react-hooks/exhaustive-deps */
|
|
301
307
|
}, [value, canBeEmptyCountry, countryIso2, defaultCountryIso2]);
|
|
302
308
|
useCaretAvoidCountryCode.useCaretAvoidCountryCode({ inputRef: inputRef, countryCodeLength: countryCodeLength, clearableCountryCode: clearableCountryCode });
|
|
303
|
-
return (
|
|
309
|
+
return (React__default.default.createElement(coreComponentsInputAutocomplete.InputAutocomplete, components_selectField_component.__assign({}, restProps, { ref: ref, inputProps: components_selectField_component.__assign(components_selectField_component.__assign({ clear: clear && !isEmptyValue, onClear: handleClear }, inputProps), { 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 })));
|
|
304
310
|
});
|
|
305
311
|
|
|
306
312
|
exports.IntlPhoneInput = IntlPhoneInput;
|
|
@@ -4,7 +4,12 @@ var React = require('react');
|
|
|
4
4
|
var cn = require('classnames');
|
|
5
5
|
var components_flagIcon_flagSprite = require('./flagSprite.js');
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
8
|
+
|
|
9
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
10
|
+
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
11
|
+
|
|
12
|
+
var styles = {"flagIcon":"intl-phone-input__flagIcon_1wuf7","flagPlaceholder":"intl-phone-input__flagPlaceholder_1wuf7"};
|
|
8
13
|
require('./index.css')
|
|
9
14
|
|
|
10
15
|
/**
|
|
@@ -12,7 +17,7 @@ require('./index.css')
|
|
|
12
17
|
*/
|
|
13
18
|
var FlagIcon = function (_a) {
|
|
14
19
|
var _b = _a.country, country = _b === void 0 ? '' : _b, className = _a.className;
|
|
15
|
-
return components_flagIcon_flagSprite.flagSprite[country] ? (
|
|
20
|
+
return components_flagIcon_flagSprite.flagSprite[country] ? (React__default.default.createElement("span", { className: cn__default.default(styles.flagIcon, className), dangerouslySetInnerHTML: { __html: components_flagIcon_flagSprite.flagSprite[country] } })) : (React__default.default.createElement("div", { className: cn__default.default(styles.flagPlaceholder, className) }));
|
|
16
21
|
};
|
|
17
22
|
|
|
18
23
|
exports.FlagIcon = FlagIcon;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 25mjn */
|
|
2
2
|
:root {
|
|
3
3
|
--color-light-specialbg-tertiary-transparent: rgba(11, 31, 53, 0.1);
|
|
4
4
|
}
|
|
@@ -16,11 +16,11 @@
|
|
|
16
16
|
:root {
|
|
17
17
|
--border-radius-xs: 2px;
|
|
18
18
|
}
|
|
19
|
-
.intl-phone-
|
|
19
|
+
.intl-phone-input__flagIcon_1wuf7 {
|
|
20
20
|
max-width: 24px;
|
|
21
21
|
max-height: 24px;
|
|
22
22
|
}
|
|
23
|
-
.intl-phone-
|
|
23
|
+
.intl-phone-input__flagPlaceholder_1wuf7 {
|
|
24
24
|
width: 24px;
|
|
25
25
|
height: 16px;
|
|
26
26
|
max-height: 16px;
|
package/components/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var components_selectField_component = require('../component-
|
|
3
|
+
var components_selectField_component = require('../component-7910cc84.js');
|
|
4
4
|
var components_flagIcon_component = require('./flag-icon/component.js');
|
|
5
5
|
var components_select_component = require('./select/component.js');
|
|
6
6
|
require('react');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var components_selectField_component = require('../../component-
|
|
3
|
+
var components_selectField_component = require('../../component-7910cc84.js');
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var coreComponentsSelect = require('@alfalab/core-components-select');
|
|
6
6
|
var components_flagIcon_component = require('../flag-icon/component.js');
|
|
@@ -10,7 +10,11 @@ require('@alfalab/hooks');
|
|
|
10
10
|
require('@alfalab/icons-glyph/WorldMagnifierMIcon');
|
|
11
11
|
require('../flag-icon/flagSprite.js');
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
14
|
+
|
|
15
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
16
|
+
|
|
17
|
+
var styles = {"component":"intl-phone-input__component_1ef99","option":"intl-phone-input__option_1ef99","flag":"intl-phone-input__flag_1ef99","countryName":"intl-phone-input__countryName_1ef99","dialCode":"intl-phone-input__dialCode_1ef99"};
|
|
14
18
|
require('./index.css')
|
|
15
19
|
|
|
16
20
|
var CountriesSelect = function (_a) {
|
|
@@ -21,20 +25,20 @@ var CountriesSelect = function (_a) {
|
|
|
21
25
|
return ({
|
|
22
26
|
key: iso2,
|
|
23
27
|
value: iso2,
|
|
24
|
-
content: (
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
content: (React__default.default.createElement("span", { className: styles.option },
|
|
29
|
+
React__default.default.createElement(components_flagIcon_component.FlagIcon, { country: iso2, className: styles.flag }),
|
|
30
|
+
React__default.default.createElement("span", { className: styles.optionTextWrap },
|
|
31
|
+
React__default.default.createElement("span", { className: styles.countryName }, name),
|
|
32
|
+
React__default.default.createElement("span", { className: styles.dialCode },
|
|
29
33
|
"+",
|
|
30
34
|
dialCode)))),
|
|
31
35
|
});
|
|
32
36
|
});
|
|
33
37
|
}, [countries]);
|
|
34
|
-
var renderOptionsList = React.useCallback(function (props) { return (
|
|
35
|
-
|
|
36
|
-
return (
|
|
37
|
-
|
|
38
|
+
var renderOptionsList = React.useCallback(function (props) { return (React__default.default.createElement("div", { style: { width: fieldWidth || 0 } },
|
|
39
|
+
React__default.default.createElement(coreComponentsSelect.VirtualOptionsList, components_selectField_component.__assign({}, props)))); }, [fieldWidth]);
|
|
40
|
+
return (React__default.default.createElement("div", { className: styles.component, onClick: function (event) { return event.stopPropagation(); } },
|
|
41
|
+
React__default.default.createElement(coreComponentsSelect.Select, { dataTestId: dataTestId, disabled: disabled, size: size, options: options, selected: selected || components_selectField_component.EMPTY_COUNTRY_SELECT_FIELD, onChange: onChange, Field: components_selectField_component.SelectField, OptionsList: renderOptionsList, preventFlip: preventFlip })));
|
|
38
42
|
};
|
|
39
43
|
|
|
40
44
|
exports.CountriesSelect = CountriesSelect;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1tuv8 */
|
|
2
2
|
:root {
|
|
3
3
|
--color-light-text-secondary: rgba(11, 31, 53, 0.7);
|
|
4
4
|
}
|
|
@@ -16,23 +16,23 @@
|
|
|
16
16
|
:root {
|
|
17
17
|
--text-secondary-color: var(--color-light-text-secondary);
|
|
18
18
|
}
|
|
19
|
-
.intl-phone-
|
|
19
|
+
.intl-phone-input__component_1ef99 {
|
|
20
20
|
position: static;
|
|
21
21
|
display: flex;
|
|
22
22
|
min-width: initial;
|
|
23
23
|
height: 100%;
|
|
24
24
|
}
|
|
25
|
-
.intl-phone-
|
|
25
|
+
.intl-phone-input__option_1ef99 {
|
|
26
26
|
display: flex;
|
|
27
27
|
align-items: flex-start;
|
|
28
28
|
}
|
|
29
|
-
.intl-phone-
|
|
29
|
+
.intl-phone-input__flag_1ef99 {
|
|
30
30
|
flex-shrink: 0;
|
|
31
31
|
margin-right: var(--gap-xs);
|
|
32
32
|
}
|
|
33
|
-
.intl-phone-
|
|
33
|
+
.intl-phone-input__countryName_1ef99 {
|
|
34
34
|
margin-right: var(--gap-xs);
|
|
35
35
|
}
|
|
36
|
-
.intl-phone-
|
|
36
|
+
.intl-phone-input__dialCode_1ef99 {
|
|
37
37
|
color: var(--text-secondary-color);
|
|
38
38
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: jiroi */
|
|
2
2
|
:root {
|
|
3
3
|
--color-light-border-link: #007aff;
|
|
4
4
|
--color-light-graphic-secondary: #6d7986;
|
|
@@ -20,13 +20,13 @@
|
|
|
20
20
|
--focus-color: var(--color-light-border-link);
|
|
21
21
|
--disabled-cursor: not-allowed;
|
|
22
22
|
}
|
|
23
|
-
.intl-phone-
|
|
23
|
+
.intl-phone-input__component_t4tca {
|
|
24
24
|
height: 100%;
|
|
25
25
|
cursor: pointer;
|
|
26
26
|
outline: none;
|
|
27
27
|
position: relative;
|
|
28
28
|
}
|
|
29
|
-
.intl-phone-
|
|
29
|
+
.intl-phone-input__flagIconContainer_t4tca {
|
|
30
30
|
display: flex;
|
|
31
31
|
justify-content: center;
|
|
32
32
|
align-items: center;
|
|
@@ -34,13 +34,13 @@
|
|
|
34
34
|
height: 24px;
|
|
35
35
|
margin-right: var(--gap-2xs);
|
|
36
36
|
}
|
|
37
|
-
.intl-phone-
|
|
37
|
+
.intl-phone-input__emptyCountryIcon_t4tca {
|
|
38
38
|
color: var(--color-light-graphic-secondary);
|
|
39
39
|
}
|
|
40
|
-
.intl-phone-
|
|
40
|
+
.intl-phone-input__disabled_t4tca {
|
|
41
41
|
cursor: var(--disabled-cursor);
|
|
42
42
|
}
|
|
43
|
-
.intl-phone-
|
|
43
|
+
.intl-phone-input__inner_t4tca {
|
|
44
44
|
position: relative;
|
|
45
45
|
display: flex;
|
|
46
46
|
align-items: center;
|
|
@@ -48,11 +48,11 @@
|
|
|
48
48
|
padding-left: var(--gap-s);
|
|
49
49
|
outline: none;
|
|
50
50
|
}
|
|
51
|
-
.intl-phone-
|
|
52
|
-
.intl-phone-
|
|
51
|
+
.intl-phone-input__l_t4tca .intl-phone-input__inner_t4tca,
|
|
52
|
+
.intl-phone-input__xl_t4tca .intl-phone-input__inner_t4tca {
|
|
53
53
|
padding-left: var(--gap-m);
|
|
54
54
|
}
|
|
55
|
-
.intl-phone-
|
|
55
|
+
.intl-phone-input__focusVisible_t4tca {
|
|
56
56
|
outline: 2px solid var(--focus-color);
|
|
57
57
|
outline-offset: 2px;
|
|
58
58
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "../../component-
|
|
1
|
+
export * from "../../component-7910cc84";
|
|
File without changes
|
|
@@ -8,6 +8,14 @@ var WorldMagnifierMIcon = require('@alfalab/icons-glyph/WorldMagnifierMIcon');
|
|
|
8
8
|
var components_flagIcon_component = require('./components/flag-icon/component.js');
|
|
9
9
|
var styles = require('./components/select-field/index.module.css');
|
|
10
10
|
|
|
11
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
12
|
+
|
|
13
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
14
|
+
var mergeRefs__default = /*#__PURE__*/_interopDefaultCompat(mergeRefs);
|
|
15
|
+
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
16
|
+
var WorldMagnifierMIcon__default = /*#__PURE__*/_interopDefaultCompat(WorldMagnifierMIcon);
|
|
17
|
+
var styles__default = /*#__PURE__*/_interopDefaultCompat(styles);
|
|
18
|
+
|
|
11
19
|
/******************************************************************************
|
|
12
20
|
Copyright (c) Microsoft Corporation.
|
|
13
21
|
|
|
@@ -56,13 +64,13 @@ var SelectField = function (_a) {
|
|
|
56
64
|
var selected = _a.selected, Arrow = _a.Arrow, size = _a.size, disabled = _a.disabled, _c = _a.innerProps, innerProps = _c === void 0 ? {} : _c;
|
|
57
65
|
var wrapperRef = React.useRef(null);
|
|
58
66
|
var focusVisible = hooks.useFocus(wrapperRef, 'keyboard')[0];
|
|
59
|
-
var ref = innerProps.ref ?
|
|
60
|
-
return (
|
|
61
|
-
_b[
|
|
62
|
-
_b[
|
|
67
|
+
var ref = innerProps.ref ? mergeRefs__default.default([innerProps.ref, wrapperRef]) : wrapperRef;
|
|
68
|
+
return (React__default.default.createElement("div", { ref: ref, className: cn__default.default(styles__default.default.component, size && styles__default.default[size], (_b = {},
|
|
69
|
+
_b[styles__default.default.focusVisible] = focusVisible,
|
|
70
|
+
_b[styles__default.default.disabled] = disabled,
|
|
63
71
|
_b)) },
|
|
64
|
-
|
|
65
|
-
|
|
72
|
+
React__default.default.createElement("div", exports.__assign({}, innerProps, { className: styles__default.default.inner }),
|
|
73
|
+
React__default.default.createElement("span", { className: styles__default.default.flagIconContainer }, !selected || selected === EMPTY_COUNTRY_SELECT_FIELD ? (React__default.default.createElement(WorldMagnifierMIcon__default.default, { className: styles__default.default.emptyCountryIcon })) : (React__default.default.createElement(components_flagIcon_component.FlagIcon, { country: selected.value }))),
|
|
66
74
|
Arrow)));
|
|
67
75
|
};
|
|
68
76
|
|
package/cssm/component.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var components_selectField_component = require('./component-
|
|
3
|
+
var components_selectField_component = require('./component-01884de0.js');
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var cn = require('classnames');
|
|
6
6
|
var coreComponentsInputAutocomplete = require('@alfalab/core-components-input-autocomplete/cssm');
|
|
@@ -21,6 +21,13 @@ require('./components/flag-icon/index.module.css');
|
|
|
21
21
|
require('@alfalab/core-components-select/cssm');
|
|
22
22
|
require('./components/select/index.module.css');
|
|
23
23
|
|
|
24
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
25
|
+
|
|
26
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
27
|
+
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
28
|
+
var WorldMagnifierMIcon__default = /*#__PURE__*/_interopDefaultCompat(WorldMagnifierMIcon);
|
|
29
|
+
var styles__default = /*#__PURE__*/_interopDefaultCompat(styles);
|
|
30
|
+
|
|
24
31
|
var countriesHash = utils.getCountriesHash();
|
|
25
32
|
var MAX_DIAL_CODE_LENGTH = 4;
|
|
26
33
|
var MASK_SYMBOLS = [' ', '-', '(', ')'];
|
|
@@ -301,7 +308,7 @@ var IntlPhoneInput = React.forwardRef(function (_a, ref) {
|
|
|
301
308
|
/* eslint-disable-next-line react-hooks/exhaustive-deps */
|
|
302
309
|
}, [value, canBeEmptyCountry, countryIso2, defaultCountryIso2]);
|
|
303
310
|
useCaretAvoidCountryCode.useCaretAvoidCountryCode({ inputRef: inputRef, countryCodeLength: countryCodeLength, clearableCountryCode: clearableCountryCode });
|
|
304
|
-
return (
|
|
311
|
+
return (React__default.default.createElement(coreComponentsInputAutocomplete.InputAutocomplete, components_selectField_component.__assign({}, restProps, { ref: ref, inputProps: components_selectField_component.__assign(components_selectField_component.__assign({ clear: clear && !isEmptyValue, onClear: handleClear }, inputProps), { 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 })));
|
|
305
312
|
});
|
|
306
313
|
|
|
307
314
|
exports.IntlPhoneInput = IntlPhoneInput;
|
|
@@ -5,12 +5,18 @@ var cn = require('classnames');
|
|
|
5
5
|
var components_flagIcon_flagSprite = require('./flagSprite.js');
|
|
6
6
|
var styles = require('./index.module.css');
|
|
7
7
|
|
|
8
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
9
|
+
|
|
10
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
11
|
+
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
12
|
+
var styles__default = /*#__PURE__*/_interopDefaultCompat(styles);
|
|
13
|
+
|
|
8
14
|
/**
|
|
9
15
|
* Компонент флага в виде иконки.
|
|
10
16
|
*/
|
|
11
17
|
var FlagIcon = function (_a) {
|
|
12
18
|
var _b = _a.country, country = _b === void 0 ? '' : _b, className = _a.className;
|
|
13
|
-
return components_flagIcon_flagSprite.flagSprite[country] ? (
|
|
19
|
+
return components_flagIcon_flagSprite.flagSprite[country] ? (React__default.default.createElement("span", { className: cn__default.default(styles__default.default.flagIcon, className), dangerouslySetInnerHTML: { __html: components_flagIcon_flagSprite.flagSprite[country] } })) : (React__default.default.createElement("div", { className: cn__default.default(styles__default.default.flagPlaceholder, className) }));
|
|
14
20
|
};
|
|
15
21
|
|
|
16
22
|
exports.FlagIcon = FlagIcon;
|
package/cssm/components/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var components_selectField_component = require('../component-
|
|
3
|
+
var components_selectField_component = require('../component-01884de0.js');
|
|
4
4
|
var components_flagIcon_component = require('./flag-icon/component.js');
|
|
5
5
|
var components_select_component = require('./select/component.js');
|
|
6
6
|
require('react');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var components_selectField_component = require('../../component-
|
|
3
|
+
var components_selectField_component = require('../../component-01884de0.js');
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var coreComponentsSelect = require('@alfalab/core-components-select/cssm');
|
|
6
6
|
var components_flagIcon_component = require('../flag-icon/component.js');
|
|
@@ -13,6 +13,11 @@ require('../select-field/index.module.css');
|
|
|
13
13
|
require('../flag-icon/flagSprite.js');
|
|
14
14
|
require('../flag-icon/index.module.css');
|
|
15
15
|
|
|
16
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
17
|
+
|
|
18
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
19
|
+
var styles__default = /*#__PURE__*/_interopDefaultCompat(styles);
|
|
20
|
+
|
|
16
21
|
var CountriesSelect = function (_a) {
|
|
17
22
|
var disabled = _a.disabled, size = _a.size, selected = _a.selected, countries = _a.countries, fieldWidth = _a.fieldWidth, preventFlip = _a.preventFlip, onChange = _a.onChange, dataTestId = _a.dataTestId;
|
|
18
23
|
var options = React.useMemo(function () {
|
|
@@ -21,20 +26,20 @@ var CountriesSelect = function (_a) {
|
|
|
21
26
|
return ({
|
|
22
27
|
key: iso2,
|
|
23
28
|
value: iso2,
|
|
24
|
-
content: (
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
+
content: (React__default.default.createElement("span", { className: styles__default.default.option },
|
|
30
|
+
React__default.default.createElement(components_flagIcon_component.FlagIcon, { country: iso2, className: styles__default.default.flag }),
|
|
31
|
+
React__default.default.createElement("span", { className: styles__default.default.optionTextWrap },
|
|
32
|
+
React__default.default.createElement("span", { className: styles__default.default.countryName }, name),
|
|
33
|
+
React__default.default.createElement("span", { className: styles__default.default.dialCode },
|
|
29
34
|
"+",
|
|
30
35
|
dialCode)))),
|
|
31
36
|
});
|
|
32
37
|
});
|
|
33
38
|
}, [countries]);
|
|
34
|
-
var renderOptionsList = React.useCallback(function (props) { return (
|
|
35
|
-
|
|
36
|
-
return (
|
|
37
|
-
|
|
39
|
+
var renderOptionsList = React.useCallback(function (props) { return (React__default.default.createElement("div", { style: { width: fieldWidth || 0 } },
|
|
40
|
+
React__default.default.createElement(coreComponentsSelect.VirtualOptionsList, components_selectField_component.__assign({}, props)))); }, [fieldWidth]);
|
|
41
|
+
return (React__default.default.createElement("div", { className: styles__default.default.component, onClick: function (event) { return event.stopPropagation(); } },
|
|
42
|
+
React__default.default.createElement(coreComponentsSelect.Select, { dataTestId: dataTestId, disabled: disabled, size: size, options: options, selected: selected || components_selectField_component.EMPTY_COUNTRY_SELECT_FIELD, onChange: onChange, Field: components_selectField_component.SelectField, OptionsList: renderOptionsList, preventFlip: preventFlip })));
|
|
38
43
|
};
|
|
39
44
|
|
|
40
45
|
exports.CountriesSelect = CountriesSelect;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "../../component-
|
|
1
|
+
export * from "../../component-01884de0";
|
package/cssm/index.js
CHANGED
|
File without changes
|
|
@@ -44,7 +44,7 @@ function __rest(s, e) {
|
|
|
44
44
|
return t;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
var styles = {"component":"intl-phone-
|
|
47
|
+
var styles = {"component":"intl-phone-input__component_t4tca","flagIconContainer":"intl-phone-input__flagIconContainer_t4tca","emptyCountryIcon":"intl-phone-input__emptyCountryIcon_t4tca","disabled":"intl-phone-input__disabled_t4tca","inner":"intl-phone-input__inner_t4tca","l":"intl-phone-input__l_t4tca","xl":"intl-phone-input__xl_t4tca","focusVisible":"intl-phone-input__focusVisible_t4tca"};
|
|
48
48
|
require('./components/select-field/index.css')
|
|
49
49
|
|
|
50
50
|
var EMPTY_COUNTRY_SELECT_FIELD = {
|
package/esm/component.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as __rest, a as __assign } from './component-
|
|
1
|
+
import { _ as __rest, a as __assign } from './component-432b3fc0.js';
|
|
2
2
|
import React, { forwardRef, useState, useRef, useEffect } from 'react';
|
|
3
3
|
import cn from 'classnames';
|
|
4
4
|
import { InputAutocomplete } from '@alfalab/core-components-input-autocomplete/esm';
|
|
@@ -15,7 +15,7 @@ import { useCaretAvoidCountryCode } from './useCaretAvoidCountryCode.js';
|
|
|
15
15
|
import './components/flag-icon/flagSprite.js';
|
|
16
16
|
import '@alfalab/core-components-select/esm';
|
|
17
17
|
|
|
18
|
-
var styles = {"addons":"intl-phone-
|
|
18
|
+
var styles = {"addons":"intl-phone-input__addons_oa44m","l":"intl-phone-input__l_oa44m","xl":"intl-phone-input__xl_oa44m","flagIconWrapper":"intl-phone-input__flagIconWrapper_oa44m","emptyCountryIcon":"intl-phone-input__emptyCountryIcon_oa44m"};
|
|
19
19
|
require('./index.css')
|
|
20
20
|
|
|
21
21
|
var countriesHash = getCountriesHash();
|
|
@@ -267,7 +267,7 @@ var IntlPhoneInput = forwardRef(function (_a, ref) {
|
|
|
267
267
|
if (phoneLibUtils.current)
|
|
268
268
|
return;
|
|
269
269
|
import(
|
|
270
|
-
/* webpackChunkName: "libphonenumber" */ './libphonenumber-js.min-
|
|
270
|
+
/* webpackChunkName: "libphonenumber" */ './libphonenumber-js.min-90652dfc.js')
|
|
271
271
|
.then(function (utils) {
|
|
272
272
|
phoneLibUtils.current = utils.AsYouType;
|
|
273
273
|
if (canBeEmptyCountry) {
|
|
@@ -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_1wuf7","flagPlaceholder":"intl-phone-input__flagPlaceholder_1wuf7"};
|
|
6
6
|
require('./index.css')
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 25mjn */
|
|
2
2
|
:root {
|
|
3
3
|
--color-light-specialbg-tertiary-transparent: rgba(11, 31, 53, 0.1);
|
|
4
4
|
}
|
|
@@ -16,11 +16,11 @@
|
|
|
16
16
|
:root {
|
|
17
17
|
--border-radius-xs: 2px;
|
|
18
18
|
}
|
|
19
|
-
.intl-phone-
|
|
19
|
+
.intl-phone-input__flagIcon_1wuf7 {
|
|
20
20
|
max-width: 24px;
|
|
21
21
|
max-height: 24px;
|
|
22
22
|
}
|
|
23
|
-
.intl-phone-
|
|
23
|
+
.intl-phone-input__flagPlaceholder_1wuf7 {
|
|
24
24
|
width: 24px;
|
|
25
25
|
height: 16px;
|
|
26
26
|
max-height: 16px;
|
package/esm/components/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { E as EMPTY_COUNTRY_SELECT_FIELD, S as SelectField } from '../component-
|
|
1
|
+
export { E as EMPTY_COUNTRY_SELECT_FIELD, S as SelectField } from '../component-432b3fc0.js';
|
|
2
2
|
export { FlagIcon } from './flag-icon/component.js';
|
|
3
3
|
export { CountriesSelect } from './select/component.js';
|
|
4
4
|
import 'react';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as __assign, E as EMPTY_COUNTRY_SELECT_FIELD, S as SelectField } from '../../component-
|
|
1
|
+
import { a as __assign, E as EMPTY_COUNTRY_SELECT_FIELD, S as SelectField } from '../../component-432b3fc0.js';
|
|
2
2
|
import React, { useMemo, useCallback } from 'react';
|
|
3
3
|
import { VirtualOptionsList, Select } from '@alfalab/core-components-select/esm';
|
|
4
4
|
import { FlagIcon } from '../flag-icon/component.js';
|
|
@@ -8,7 +8,7 @@ import '@alfalab/hooks';
|
|
|
8
8
|
import '@alfalab/icons-glyph/WorldMagnifierMIcon';
|
|
9
9
|
import '../flag-icon/flagSprite.js';
|
|
10
10
|
|
|
11
|
-
var styles = {"component":"intl-phone-
|
|
11
|
+
var styles = {"component":"intl-phone-input__component_1ef99","option":"intl-phone-input__option_1ef99","flag":"intl-phone-input__flag_1ef99","countryName":"intl-phone-input__countryName_1ef99","dialCode":"intl-phone-input__dialCode_1ef99"};
|
|
12
12
|
require('./index.css')
|
|
13
13
|
|
|
14
14
|
var CountriesSelect = function (_a) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1tuv8 */
|
|
2
2
|
:root {
|
|
3
3
|
--color-light-text-secondary: rgba(11, 31, 53, 0.7);
|
|
4
4
|
}
|
|
@@ -16,23 +16,23 @@
|
|
|
16
16
|
:root {
|
|
17
17
|
--text-secondary-color: var(--color-light-text-secondary);
|
|
18
18
|
}
|
|
19
|
-
.intl-phone-
|
|
19
|
+
.intl-phone-input__component_1ef99 {
|
|
20
20
|
position: static;
|
|
21
21
|
display: flex;
|
|
22
22
|
min-width: initial;
|
|
23
23
|
height: 100%;
|
|
24
24
|
}
|
|
25
|
-
.intl-phone-
|
|
25
|
+
.intl-phone-input__option_1ef99 {
|
|
26
26
|
display: flex;
|
|
27
27
|
align-items: flex-start;
|
|
28
28
|
}
|
|
29
|
-
.intl-phone-
|
|
29
|
+
.intl-phone-input__flag_1ef99 {
|
|
30
30
|
flex-shrink: 0;
|
|
31
31
|
margin-right: var(--gap-xs);
|
|
32
32
|
}
|
|
33
|
-
.intl-phone-
|
|
33
|
+
.intl-phone-input__countryName_1ef99 {
|
|
34
34
|
margin-right: var(--gap-xs);
|
|
35
35
|
}
|
|
36
|
-
.intl-phone-
|
|
36
|
+
.intl-phone-input__dialCode_1ef99 {
|
|
37
37
|
color: var(--text-secondary-color);
|
|
38
38
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: jiroi */
|
|
2
2
|
:root {
|
|
3
3
|
--color-light-border-link: #007aff;
|
|
4
4
|
--color-light-graphic-secondary: #6d7986;
|
|
@@ -20,13 +20,13 @@
|
|
|
20
20
|
--focus-color: var(--color-light-border-link);
|
|
21
21
|
--disabled-cursor: not-allowed;
|
|
22
22
|
}
|
|
23
|
-
.intl-phone-
|
|
23
|
+
.intl-phone-input__component_t4tca {
|
|
24
24
|
height: 100%;
|
|
25
25
|
cursor: pointer;
|
|
26
26
|
outline: none;
|
|
27
27
|
position: relative;
|
|
28
28
|
}
|
|
29
|
-
.intl-phone-
|
|
29
|
+
.intl-phone-input__flagIconContainer_t4tca {
|
|
30
30
|
display: flex;
|
|
31
31
|
justify-content: center;
|
|
32
32
|
align-items: center;
|
|
@@ -34,13 +34,13 @@
|
|
|
34
34
|
height: 24px;
|
|
35
35
|
margin-right: var(--gap-2xs);
|
|
36
36
|
}
|
|
37
|
-
.intl-phone-
|
|
37
|
+
.intl-phone-input__emptyCountryIcon_t4tca {
|
|
38
38
|
color: var(--color-light-graphic-secondary);
|
|
39
39
|
}
|
|
40
|
-
.intl-phone-
|
|
40
|
+
.intl-phone-input__disabled_t4tca {
|
|
41
41
|
cursor: var(--disabled-cursor);
|
|
42
42
|
}
|
|
43
|
-
.intl-phone-
|
|
43
|
+
.intl-phone-input__inner_t4tca {
|
|
44
44
|
position: relative;
|
|
45
45
|
display: flex;
|
|
46
46
|
align-items: center;
|
|
@@ -48,11 +48,11 @@
|
|
|
48
48
|
padding-left: var(--gap-s);
|
|
49
49
|
outline: none;
|
|
50
50
|
}
|
|
51
|
-
.intl-phone-
|
|
52
|
-
.intl-phone-
|
|
51
|
+
.intl-phone-input__l_t4tca .intl-phone-input__inner_t4tca,
|
|
52
|
+
.intl-phone-input__xl_t4tca .intl-phone-input__inner_t4tca {
|
|
53
53
|
padding-left: var(--gap-m);
|
|
54
54
|
}
|
|
55
|
-
.intl-phone-
|
|
55
|
+
.intl-phone-input__focusVisible_t4tca {
|
|
56
56
|
outline: 2px solid var(--focus-color);
|
|
57
57
|
outline-offset: 2px;
|
|
58
58
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "../../component-
|
|
1
|
+
export * from "../../component-432b3fc0";
|
package/esm/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: inn20 */
|
|
2
2
|
:root {
|
|
3
3
|
--color-light-graphic-secondary: #6d7986;
|
|
4
4
|
}
|
|
@@ -13,13 +13,13 @@
|
|
|
13
13
|
:root {
|
|
14
14
|
--gap-s: 12px;
|
|
15
15
|
}
|
|
16
|
-
.intl-phone-
|
|
16
|
+
.intl-phone-input__addons_oa44m {
|
|
17
17
|
padding-left: 0;
|
|
18
18
|
}
|
|
19
|
-
.intl-phone-
|
|
19
|
+
.intl-phone-input__l_oa44m .intl-phone-input__addons_oa44m, .intl-phone-input__xl_oa44m .intl-phone-input__addons_oa44m {
|
|
20
20
|
padding-left: 0;
|
|
21
21
|
}
|
|
22
|
-
.intl-phone-
|
|
22
|
+
.intl-phone-input__flagIconWrapper_oa44m {
|
|
23
23
|
display: flex;
|
|
24
24
|
justify-content: center;
|
|
25
25
|
align-items: center;
|
|
@@ -27,6 +27,6 @@
|
|
|
27
27
|
height: 24px;
|
|
28
28
|
margin-left: var(--gap-s);
|
|
29
29
|
}
|
|
30
|
-
.intl-phone-
|
|
30
|
+
.intl-phone-input__emptyCountryIcon_oa44m {
|
|
31
31
|
color: var(--color-light-graphic-secondary);
|
|
32
32
|
}
|
package/esm/index.js
CHANGED
|
File without changes
|
|
File without changes
|
package/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: inn20 */
|
|
2
2
|
:root {
|
|
3
3
|
--color-light-graphic-secondary: #6d7986;
|
|
4
4
|
}
|
|
@@ -13,13 +13,13 @@
|
|
|
13
13
|
:root {
|
|
14
14
|
--gap-s: 12px;
|
|
15
15
|
}
|
|
16
|
-
.intl-phone-
|
|
16
|
+
.intl-phone-input__addons_oa44m {
|
|
17
17
|
padding-left: 0;
|
|
18
18
|
}
|
|
19
|
-
.intl-phone-
|
|
19
|
+
.intl-phone-input__l_oa44m .intl-phone-input__addons_oa44m, .intl-phone-input__xl_oa44m .intl-phone-input__addons_oa44m {
|
|
20
20
|
padding-left: 0;
|
|
21
21
|
}
|
|
22
|
-
.intl-phone-
|
|
22
|
+
.intl-phone-input__flagIconWrapper_oa44m {
|
|
23
23
|
display: flex;
|
|
24
24
|
justify-content: center;
|
|
25
25
|
align-items: center;
|
|
@@ -27,6 +27,6 @@
|
|
|
27
27
|
height: 24px;
|
|
28
28
|
margin-left: var(--gap-s);
|
|
29
29
|
}
|
|
30
|
-
.intl-phone-
|
|
30
|
+
.intl-phone-input__emptyCountryIcon_oa44m {
|
|
31
31
|
color: var(--color-light-graphic-secondary);
|
|
32
32
|
}
|
package/index.js
CHANGED
|
File without changes
|
|
File without changes
|
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_oa44m","l":"intl-phone-input__l_oa44m","xl":"intl-phone-input__xl_oa44m","flagIconWrapper":"intl-phone-input__flagIconWrapper_oa44m","emptyCountryIcon":"intl-phone-input__emptyCountryIcon_oa44m"};
|
|
19
19
|
require('./index.css')
|
|
20
20
|
|
|
21
21
|
const countriesHash = getCountriesHash();
|
|
@@ -263,7 +263,7 @@ const IntlPhoneInput = forwardRef(({ disabled = false, readOnly = false, hideCou
|
|
|
263
263
|
if (phoneLibUtils.current)
|
|
264
264
|
return;
|
|
265
265
|
import(
|
|
266
|
-
/* webpackChunkName: "libphonenumber" */ './libphonenumber-js.min-
|
|
266
|
+
/* webpackChunkName: "libphonenumber" */ './libphonenumber-js.min-90652dfc.js')
|
|
267
267
|
.then((utils) => {
|
|
268
268
|
phoneLibUtils.current = utils.AsYouType;
|
|
269
269
|
if (canBeEmptyCountry) {
|
|
@@ -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_1wuf7","flagPlaceholder":"intl-phone-input__flagPlaceholder_1wuf7"};
|
|
6
6
|
require('./index.css')
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 25mjn */
|
|
2
2
|
:root {
|
|
3
3
|
--color-light-specialbg-tertiary-transparent: rgba(11, 31, 53, 0.1);
|
|
4
4
|
}
|
|
@@ -16,11 +16,11 @@
|
|
|
16
16
|
:root {
|
|
17
17
|
--border-radius-xs: 2px;
|
|
18
18
|
}
|
|
19
|
-
.intl-phone-
|
|
19
|
+
.intl-phone-input__flagIcon_1wuf7 {
|
|
20
20
|
max-width: 24px;
|
|
21
21
|
max-height: 24px;
|
|
22
22
|
}
|
|
23
|
-
.intl-phone-
|
|
23
|
+
.intl-phone-input__flagPlaceholder_1wuf7 {
|
|
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_1ef99","option":"intl-phone-input__option_1ef99","flag":"intl-phone-input__flag_1ef99","countryName":"intl-phone-input__countryName_1ef99","dialCode":"intl-phone-input__dialCode_1ef99"};
|
|
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: 1tuv8 */
|
|
2
2
|
:root {
|
|
3
3
|
--color-light-text-secondary: rgba(11, 31, 53, 0.7);
|
|
4
4
|
}
|
|
@@ -16,23 +16,23 @@
|
|
|
16
16
|
:root {
|
|
17
17
|
--text-secondary-color: var(--color-light-text-secondary);
|
|
18
18
|
}
|
|
19
|
-
.intl-phone-
|
|
19
|
+
.intl-phone-input__component_1ef99 {
|
|
20
20
|
position: static;
|
|
21
21
|
display: flex;
|
|
22
22
|
min-width: initial;
|
|
23
23
|
height: 100%;
|
|
24
24
|
}
|
|
25
|
-
.intl-phone-
|
|
25
|
+
.intl-phone-input__option_1ef99 {
|
|
26
26
|
display: flex;
|
|
27
27
|
align-items: flex-start;
|
|
28
28
|
}
|
|
29
|
-
.intl-phone-
|
|
29
|
+
.intl-phone-input__flag_1ef99 {
|
|
30
30
|
flex-shrink: 0;
|
|
31
31
|
margin-right: var(--gap-xs);
|
|
32
32
|
}
|
|
33
|
-
.intl-phone-
|
|
33
|
+
.intl-phone-input__countryName_1ef99 {
|
|
34
34
|
margin-right: var(--gap-xs);
|
|
35
35
|
}
|
|
36
|
-
.intl-phone-
|
|
36
|
+
.intl-phone-input__dialCode_1ef99 {
|
|
37
37
|
color: var(--text-secondary-color);
|
|
38
38
|
}
|
|
@@ -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_t4tca","flagIconContainer":"intl-phone-input__flagIconContainer_t4tca","emptyCountryIcon":"intl-phone-input__emptyCountryIcon_t4tca","disabled":"intl-phone-input__disabled_t4tca","inner":"intl-phone-input__inner_t4tca","l":"intl-phone-input__l_t4tca","xl":"intl-phone-input__xl_t4tca","focusVisible":"intl-phone-input__focusVisible_t4tca"};
|
|
10
10
|
require('./index.css')
|
|
11
11
|
|
|
12
12
|
const EMPTY_COUNTRY_SELECT_FIELD = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: jiroi */
|
|
2
2
|
:root {
|
|
3
3
|
--color-light-border-link: #007aff;
|
|
4
4
|
--color-light-graphic-secondary: #6d7986;
|
|
@@ -20,13 +20,13 @@
|
|
|
20
20
|
--focus-color: var(--color-light-border-link);
|
|
21
21
|
--disabled-cursor: not-allowed;
|
|
22
22
|
}
|
|
23
|
-
.intl-phone-
|
|
23
|
+
.intl-phone-input__component_t4tca {
|
|
24
24
|
height: 100%;
|
|
25
25
|
cursor: pointer;
|
|
26
26
|
outline: none;
|
|
27
27
|
position: relative;
|
|
28
28
|
}
|
|
29
|
-
.intl-phone-
|
|
29
|
+
.intl-phone-input__flagIconContainer_t4tca {
|
|
30
30
|
display: flex;
|
|
31
31
|
justify-content: center;
|
|
32
32
|
align-items: center;
|
|
@@ -34,13 +34,13 @@
|
|
|
34
34
|
height: 24px;
|
|
35
35
|
margin-right: var(--gap-2xs);
|
|
36
36
|
}
|
|
37
|
-
.intl-phone-
|
|
37
|
+
.intl-phone-input__emptyCountryIcon_t4tca {
|
|
38
38
|
color: var(--color-light-graphic-secondary);
|
|
39
39
|
}
|
|
40
|
-
.intl-phone-
|
|
40
|
+
.intl-phone-input__disabled_t4tca {
|
|
41
41
|
cursor: var(--disabled-cursor);
|
|
42
42
|
}
|
|
43
|
-
.intl-phone-
|
|
43
|
+
.intl-phone-input__inner_t4tca {
|
|
44
44
|
position: relative;
|
|
45
45
|
display: flex;
|
|
46
46
|
align-items: center;
|
|
@@ -48,11 +48,11 @@
|
|
|
48
48
|
padding-left: var(--gap-s);
|
|
49
49
|
outline: none;
|
|
50
50
|
}
|
|
51
|
-
.intl-phone-
|
|
52
|
-
.intl-phone-
|
|
51
|
+
.intl-phone-input__l_t4tca .intl-phone-input__inner_t4tca,
|
|
52
|
+
.intl-phone-input__xl_t4tca .intl-phone-input__inner_t4tca {
|
|
53
53
|
padding-left: var(--gap-m);
|
|
54
54
|
}
|
|
55
|
-
.intl-phone-
|
|
55
|
+
.intl-phone-input__focusVisible_t4tca {
|
|
56
56
|
outline: 2px solid var(--focus-color);
|
|
57
57
|
outline-offset: 2px;
|
|
58
58
|
}
|
package/modern/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: inn20 */
|
|
2
2
|
:root {
|
|
3
3
|
--color-light-graphic-secondary: #6d7986;
|
|
4
4
|
}
|
|
@@ -13,13 +13,13 @@
|
|
|
13
13
|
:root {
|
|
14
14
|
--gap-s: 12px;
|
|
15
15
|
}
|
|
16
|
-
.intl-phone-
|
|
16
|
+
.intl-phone-input__addons_oa44m {
|
|
17
17
|
padding-left: 0;
|
|
18
18
|
}
|
|
19
|
-
.intl-phone-
|
|
19
|
+
.intl-phone-input__l_oa44m .intl-phone-input__addons_oa44m, .intl-phone-input__xl_oa44m .intl-phone-input__addons_oa44m {
|
|
20
20
|
padding-left: 0;
|
|
21
21
|
}
|
|
22
|
-
.intl-phone-
|
|
22
|
+
.intl-phone-input__flagIconWrapper_oa44m {
|
|
23
23
|
display: flex;
|
|
24
24
|
justify-content: center;
|
|
25
25
|
align-items: center;
|
|
@@ -27,6 +27,6 @@
|
|
|
27
27
|
height: 24px;
|
|
28
28
|
margin-left: var(--gap-s);
|
|
29
29
|
}
|
|
30
|
-
.intl-phone-
|
|
30
|
+
.intl-phone-input__emptyCountryIcon_oa44m {
|
|
31
31
|
color: var(--color-light-graphic-secondary);
|
|
32
32
|
}
|
|
File without changes
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alfalab/core-components-intl-phone-input",
|
|
3
|
-
"version": "9.2.
|
|
3
|
+
"version": "9.2.2",
|
|
4
4
|
"description": "Phone input for international phones",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"license": "MIT",
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
"react": "^16.9.0 || ^17.0.1 || ^18.0.0"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@alfalab/core-components-input": "^11.1.
|
|
21
|
-
"@alfalab/core-components-input-autocomplete": "9.
|
|
22
|
-
"@alfalab/core-components-select": "^13.2.
|
|
20
|
+
"@alfalab/core-components-input": "^11.1.1",
|
|
21
|
+
"@alfalab/core-components-input-autocomplete": "9.3.0",
|
|
22
|
+
"@alfalab/core-components-select": "^13.2.3",
|
|
23
23
|
"@alfalab/hooks": "^1.4.1",
|
|
24
24
|
"@alfalab/utils": "^1.13.3",
|
|
25
25
|
"classnames": "^2.3.1",
|