@alfalab/core-components-intl-phone-input 9.2.26 → 9.3.0

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.
Files changed (36) hide show
  1. package/component.d.ts +8 -0
  2. package/component.js +7 -7
  3. package/components/flag-icon/component.js +1 -1
  4. package/components/flag-icon/index.css +3 -3
  5. package/components/select/component.js +1 -1
  6. package/components/select/index.css +6 -6
  7. package/components/select-field/component.js +1 -1
  8. package/components/select-field/index.css +9 -9
  9. package/cssm/component.d.ts +8 -0
  10. package/cssm/component.js +5 -5
  11. package/esm/component.d.ts +8 -0
  12. package/esm/component.js +7 -7
  13. package/esm/components/flag-icon/component.js +1 -1
  14. package/esm/components/flag-icon/index.css +3 -3
  15. package/esm/components/select/component.js +1 -1
  16. package/esm/components/select/index.css +6 -6
  17. package/esm/components/select-field/component.js +1 -1
  18. package/esm/components/select-field/index.css +9 -9
  19. package/esm/index.css +5 -5
  20. package/index.css +5 -5
  21. package/modern/component.d.ts +8 -0
  22. package/modern/component.js +4 -4
  23. package/modern/components/flag-icon/component.js +1 -1
  24. package/modern/components/flag-icon/index.css +3 -3
  25. package/modern/components/select/component.js +1 -1
  26. package/modern/components/select/index.css +6 -6
  27. package/modern/components/select-field/component.js +1 -1
  28. package/modern/components/select-field/index.css +9 -9
  29. package/modern/index.css +5 -5
  30. package/package.json +3 -3
  31. /package/esm/{libphonenumber-js.min-540573cb.d.ts → libphonenumber-js.min-4efc1e02.d.ts} +0 -0
  32. /package/esm/{libphonenumber-js.min-540573cb.js → libphonenumber-js.min-4efc1e02.js} +0 -0
  33. /package/{libphonenumber-js.min-d372f406.d.ts → libphonenumber-js.min-1b87843a.d.ts} +0 -0
  34. /package/{libphonenumber-js.min-d372f406.js → libphonenumber-js.min-1b87843a.js} +0 -0
  35. /package/modern/{libphonenumber-js.min-540573cb.d.ts → libphonenumber-js.min-4efc1e02.d.ts} +0 -0
  36. /package/modern/{libphonenumber-js.min-540573cb.js → libphonenumber-js.min-4efc1e02.js} +0 -0
package/component.d.ts CHANGED
@@ -30,6 +30,10 @@ type IntlPhoneInputProps = Partial<Omit<InputAutocompleteProps, 'onChange'>> & P
30
30
  * Список стран
31
31
  */
32
32
  countries?: Country[];
33
+ /**
34
+ * Максимальная длина кода страны
35
+ */
36
+ maxDialCodeLength?: number;
33
37
  /**
34
38
  * Возможность стереть код страны
35
39
  */
@@ -68,6 +72,10 @@ declare const IntlPhoneInput: React.ForwardRefExoticComponent<Partial<Omit<Input
68
72
  * Список стран
69
73
  */
70
74
  countries?: Country[] | undefined;
75
+ /**
76
+ * Максимальная длина кода страны
77
+ */
78
+ maxDialCodeLength?: number | undefined;
71
79
  /**
72
80
  * Возможность стереть код страны
73
81
  */
package/component.js CHANGED
@@ -26,7 +26,7 @@ var React__default = /*#__PURE__*/_interopDefaultCompat(React);
26
26
  var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
27
27
  var WorldMagnifierMIcon__default = /*#__PURE__*/_interopDefaultCompat(WorldMagnifierMIcon);
28
28
 
29
- var styles = {"addons":"intl-phone-input__addons_79nxp","l":"intl-phone-input__l_79nxp","xl":"intl-phone-input__xl_79nxp","flagIconWrapper":"intl-phone-input__flagIconWrapper_79nxp","emptyCountryIcon":"intl-phone-input__emptyCountryIcon_79nxp"};
29
+ var styles = {"addons":"intl-phone-input__addons_1pcxv","l":"intl-phone-input__l_1pcxv","xl":"intl-phone-input__xl_1pcxv","flagIconWrapper":"intl-phone-input__flagIconWrapper_1pcxv","emptyCountryIcon":"intl-phone-input__emptyCountryIcon_1pcxv"};
30
30
  require('./index.css')
31
31
 
32
32
  var countriesHash = utils.getCountriesHash();
@@ -35,11 +35,11 @@ var MASK_SYMBOLS = [' ', '-', '(', ')'];
35
35
  var MAX_PHONE_LEN = 15;
36
36
  var DEFAULT_MAX_PHONE_LEN_BY_COUNTRY = { RU: 11 };
37
37
  var IntlPhoneInput = React.forwardRef(function (_a, ref) {
38
- var _b = _a.disabled, disabled = _b === void 0 ? false : _b, _c = _a.readOnly, readOnly = _c === void 0 ? false : _c, _d = _a.hideCountrySelect, hideCountrySelect = _d === void 0 ? false : _d, _e = _a.canBeEmptyCountry, canBeEmptyCountry = _e === void 0 ? false : _e, _f = _a.ruNumberPriority, ruNumberPriority = _f === void 0 ? false : _f, _g = _a.clear, clear = _g === void 0 ? false : _g, _h = _a.size, size = _h === void 0 ? 'm' : _h, _j = _a.colors, colors = _j === void 0 ? 'default' : _j, _k = _a.options, options = _k === void 0 ? [] : _k, _l = _a.countries, countries = _l === void 0 ? utils.getCountries() : _l, _m = _a.clearableCountryCode, clearableCountryCode = _m === void 0 ? true : _m, className = _a.className, value = _a.value, onChange = _a.onChange, onCountryChange = _a.onCountryChange, _o = _a.defaultCountryIso2, defaultCountryIso2 = _o === void 0 ? 'ru' : _o, preventFlip = _a.preventFlip, inputProps = _a.inputProps, _p = _a.maxPhoneLen, maxPhoneLen = _p === void 0 ? DEFAULT_MAX_PHONE_LEN_BY_COUNTRY : _p, restProps = tslib.__rest(_a, ["disabled", "readOnly", "hideCountrySelect", "canBeEmptyCountry", "ruNumberPriority", "clear", "size", "colors", "options", "countries", "clearableCountryCode", "className", "value", "onChange", "onCountryChange", "defaultCountryIso2", "preventFlip", "inputProps", "maxPhoneLen"]);
39
- var _q = React.useState(defaultCountryIso2.toLowerCase()), countryIso2 = _q[0], setCountryIso2 = _q[1];
38
+ var _b = _a.disabled, disabled = _b === void 0 ? false : _b, _c = _a.readOnly, readOnly = _c === void 0 ? false : _c, _d = _a.hideCountrySelect, hideCountrySelect = _d === void 0 ? false : _d, _e = _a.canBeEmptyCountry, canBeEmptyCountry = _e === void 0 ? false : _e, _f = _a.ruNumberPriority, ruNumberPriority = _f === void 0 ? false : _f, _g = _a.clear, clear = _g === void 0 ? false : _g, _h = _a.size, size = _h === void 0 ? 'm' : _h, _j = _a.colors, colors = _j === void 0 ? 'default' : _j, _k = _a.options, options = _k === void 0 ? [] : _k, _l = _a.countries, countries = _l === void 0 ? utils.getCountries() : _l, _m = _a.clearableCountryCode, clearableCountryCode = _m === void 0 ? true : _m, _o = _a.maxDialCodeLength, maxDialCodeLength = _o === void 0 ? MAX_DIAL_CODE_LENGTH : _o, className = _a.className, value = _a.value, onChange = _a.onChange, onCountryChange = _a.onCountryChange, _p = _a.defaultCountryIso2, defaultCountryIso2 = _p === void 0 ? 'ru' : _p, preventFlip = _a.preventFlip, inputProps = _a.inputProps, _q = _a.maxPhoneLen, maxPhoneLen = _q === void 0 ? DEFAULT_MAX_PHONE_LEN_BY_COUNTRY : _q, restProps = tslib.__rest(_a, ["disabled", "readOnly", "hideCountrySelect", "canBeEmptyCountry", "ruNumberPriority", "clear", "size", "colors", "options", "countries", "clearableCountryCode", "maxDialCodeLength", "className", "value", "onChange", "onCountryChange", "defaultCountryIso2", "preventFlip", "inputProps", "maxPhoneLen"]);
39
+ var _r = React.useState(defaultCountryIso2.toLowerCase()), countryIso2 = _r[0], setCountryIso2 = _r[1];
40
40
  var inputRef = React.useRef(null);
41
- var _r = React.useState(null), inputWrapperRef = _r[0], setInputWrapperRef = _r[1];
42
- var _s = React.useState(), caretPos = _s[0], setCaretPos = _s[1];
41
+ var _s = React.useState(null), inputWrapperRef = _s[0], setInputWrapperRef = _s[1];
42
+ var _t = React.useState(), caretPos = _t[0], setCaretPos = _t[1];
43
43
  var phoneLibUtils = React.useRef();
44
44
  var formatPhone = function (inputValue, iso2) {
45
45
  if (iso2 === void 0) { iso2 = countryIso2; }
@@ -133,7 +133,7 @@ var IntlPhoneInput = React.forwardRef(function (_a, ref) {
133
133
  var setCountryByDialCodeWithLengthCheck = function (inputValue) {
134
134
  if (inputRef.current) {
135
135
  var selectionStart = inputRef.current.selectionStart;
136
- if ((selectionStart || 0) <= MAX_DIAL_CODE_LENGTH) {
136
+ if ((selectionStart || 0) <= maxDialCodeLength) {
137
137
  setCountryByDialCode(inputValue);
138
138
  }
139
139
  }
@@ -294,7 +294,7 @@ var IntlPhoneInput = React.forwardRef(function (_a, ref) {
294
294
  if (phoneLibUtils.current)
295
295
  return;
296
296
  Promise.resolve().then(function () { return require(
297
- /* webpackChunkName: "libphonenumber" */ './libphonenumber-js.min-d372f406.js'); })
297
+ /* webpackChunkName: "libphonenumber" */ './libphonenumber-js.min-1b87843a.js'); })
298
298
  .then(function (utils) {
299
299
  phoneLibUtils.current = utils.AsYouType;
300
300
  if (canBeEmptyCountry) {
@@ -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-input__flagIcon_11ut0","flagPlaceholder":"intl-phone-input__flagPlaceholder_11ut0"};
14
+ var styles = {"flagIcon":"intl-phone-input__flagIcon_1isn4","flagPlaceholder":"intl-phone-input__flagPlaceholder_1isn4"};
15
15
  require('./index.css')
16
16
 
17
17
  /**
@@ -1,4 +1,4 @@
1
- /* hash: dcd95 */
1
+ /* hash: tz8fy */
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-input__flagIcon_11ut0 {
20
+ } .intl-phone-input__flagIcon_1isn4 {
21
21
  max-width: 24px;
22
22
  max-height: 24px;
23
- } .intl-phone-input__flagPlaceholder_11ut0 {
23
+ } .intl-phone-input__flagPlaceholder_1isn4 {
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-input__component_tmsrk","option":"intl-phone-input__option_tmsrk","flag":"intl-phone-input__flag_tmsrk","countryName":"intl-phone-input__countryName_tmsrk","dialCode":"intl-phone-input__dialCode_tmsrk"};
20
+ var styles = {"component":"intl-phone-input__component_mk4yu","option":"intl-phone-input__option_mk4yu","flag":"intl-phone-input__flag_mk4yu","countryName":"intl-phone-input__countryName_mk4yu","dialCode":"intl-phone-input__dialCode_mk4yu"};
21
21
  require('./index.css')
22
22
 
23
23
  var CountriesSelect = function (_a) {
@@ -1,4 +1,4 @@
1
- /* hash: yc6mg */
1
+ /* hash: rkhqs */
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-input__component_tmsrk {
20
+ } .intl-phone-input__component_mk4yu {
21
21
  position: static;
22
22
  display: flex;
23
23
  min-width: initial;
24
24
  height: 100%;
25
- } .intl-phone-input__option_tmsrk {
25
+ } .intl-phone-input__option_mk4yu {
26
26
  display: flex;
27
27
  align-items: flex-start;
28
- } .intl-phone-input__flag_tmsrk {
28
+ } .intl-phone-input__flag_mk4yu {
29
29
  flex-shrink: 0;
30
30
  margin-right: var(--gap-xs);
31
- } .intl-phone-input__countryName_tmsrk {
31
+ } .intl-phone-input__countryName_mk4yu {
32
32
  margin-right: var(--gap-xs);
33
- } .intl-phone-input__dialCode_tmsrk {
33
+ } .intl-phone-input__dialCode_mk4yu {
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-input__component_1qayf","flagIconContainer":"intl-phone-input__flagIconContainer_1qayf","emptyCountryIcon":"intl-phone-input__emptyCountryIcon_1qayf","disabled":"intl-phone-input__disabled_1qayf","inner":"intl-phone-input__inner_1qayf","l":"intl-phone-input__l_1qayf","xl":"intl-phone-input__xl_1qayf","focusVisible":"intl-phone-input__focusVisible_1qayf"};
21
+ var styles = {"component":"intl-phone-input__component_1pqeg","flagIconContainer":"intl-phone-input__flagIconContainer_1pqeg","emptyCountryIcon":"intl-phone-input__emptyCountryIcon_1pqeg","disabled":"intl-phone-input__disabled_1pqeg","inner":"intl-phone-input__inner_1pqeg","l":"intl-phone-input__l_1pqeg","xl":"intl-phone-input__xl_1pqeg","focusVisible":"intl-phone-input__focusVisible_1pqeg"};
22
22
  require('./index.css')
23
23
 
24
24
  var EMPTY_COUNTRY_SELECT_FIELD = {
@@ -1,4 +1,4 @@
1
- /* hash: 1wqo0 */
1
+ /* hash: vut83 */
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-input__component_1qayf {
24
+ } .intl-phone-input__component_1pqeg {
25
25
  height: 100%;
26
26
  cursor: pointer;
27
27
  outline: none;
28
28
  position: relative;
29
- } .intl-phone-input__flagIconContainer_1qayf {
29
+ } .intl-phone-input__flagIconContainer_1pqeg {
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-input__emptyCountryIcon_1qayf {
36
+ } .intl-phone-input__emptyCountryIcon_1pqeg {
37
37
  color: var(--color-light-graphic-secondary);
38
- } .intl-phone-input__disabled_1qayf {
38
+ } .intl-phone-input__disabled_1pqeg {
39
39
  cursor: var(--disabled-cursor);
40
- } .intl-phone-input__inner_1qayf {
40
+ } .intl-phone-input__inner_1pqeg {
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-input__l_1qayf .intl-phone-input__inner_1qayf,
48
- .intl-phone-input__xl_1qayf .intl-phone-input__inner_1qayf {
47
+ } .intl-phone-input__l_1pqeg .intl-phone-input__inner_1pqeg,
48
+ .intl-phone-input__xl_1pqeg .intl-phone-input__inner_1pqeg {
49
49
  padding-left: var(--gap-m);
50
- } .intl-phone-input__focusVisible_1qayf {
50
+ } .intl-phone-input__focusVisible_1pqeg {
51
51
  outline: 2px solid var(--focus-color);
52
52
  outline-offset: 2px;
53
53
  }
@@ -30,6 +30,10 @@ type IntlPhoneInputProps = Partial<Omit<InputAutocompleteProps, 'onChange'>> & P
30
30
  * Список стран
31
31
  */
32
32
  countries?: Country[];
33
+ /**
34
+ * Максимальная длина кода страны
35
+ */
36
+ maxDialCodeLength?: number;
33
37
  /**
34
38
  * Возможность стереть код страны
35
39
  */
@@ -68,6 +72,10 @@ declare const IntlPhoneInput: React.ForwardRefExoticComponent<Partial<Omit<Input
68
72
  * Список стран
69
73
  */
70
74
  countries?: Country[] | undefined;
75
+ /**
76
+ * Максимальная длина кода страны
77
+ */
78
+ maxDialCodeLength?: number | undefined;
71
79
  /**
72
80
  * Возможность стереть код страны
73
81
  */
package/cssm/component.js CHANGED
@@ -37,11 +37,11 @@ var MASK_SYMBOLS = [' ', '-', '(', ')'];
37
37
  var MAX_PHONE_LEN = 15;
38
38
  var DEFAULT_MAX_PHONE_LEN_BY_COUNTRY = { RU: 11 };
39
39
  var IntlPhoneInput = React.forwardRef(function (_a, ref) {
40
- var _b = _a.disabled, disabled = _b === void 0 ? false : _b, _c = _a.readOnly, readOnly = _c === void 0 ? false : _c, _d = _a.hideCountrySelect, hideCountrySelect = _d === void 0 ? false : _d, _e = _a.canBeEmptyCountry, canBeEmptyCountry = _e === void 0 ? false : _e, _f = _a.ruNumberPriority, ruNumberPriority = _f === void 0 ? false : _f, _g = _a.clear, clear = _g === void 0 ? false : _g, _h = _a.size, size = _h === void 0 ? 'm' : _h, _j = _a.colors, colors = _j === void 0 ? 'default' : _j, _k = _a.options, options = _k === void 0 ? [] : _k, _l = _a.countries, countries = _l === void 0 ? utils.getCountries() : _l, _m = _a.clearableCountryCode, clearableCountryCode = _m === void 0 ? true : _m, className = _a.className, value = _a.value, onChange = _a.onChange, onCountryChange = _a.onCountryChange, _o = _a.defaultCountryIso2, defaultCountryIso2 = _o === void 0 ? 'ru' : _o, preventFlip = _a.preventFlip, inputProps = _a.inputProps, _p = _a.maxPhoneLen, maxPhoneLen = _p === void 0 ? DEFAULT_MAX_PHONE_LEN_BY_COUNTRY : _p, restProps = tslib.__rest(_a, ["disabled", "readOnly", "hideCountrySelect", "canBeEmptyCountry", "ruNumberPriority", "clear", "size", "colors", "options", "countries", "clearableCountryCode", "className", "value", "onChange", "onCountryChange", "defaultCountryIso2", "preventFlip", "inputProps", "maxPhoneLen"]);
41
- var _q = React.useState(defaultCountryIso2.toLowerCase()), countryIso2 = _q[0], setCountryIso2 = _q[1];
40
+ var _b = _a.disabled, disabled = _b === void 0 ? false : _b, _c = _a.readOnly, readOnly = _c === void 0 ? false : _c, _d = _a.hideCountrySelect, hideCountrySelect = _d === void 0 ? false : _d, _e = _a.canBeEmptyCountry, canBeEmptyCountry = _e === void 0 ? false : _e, _f = _a.ruNumberPriority, ruNumberPriority = _f === void 0 ? false : _f, _g = _a.clear, clear = _g === void 0 ? false : _g, _h = _a.size, size = _h === void 0 ? 'm' : _h, _j = _a.colors, colors = _j === void 0 ? 'default' : _j, _k = _a.options, options = _k === void 0 ? [] : _k, _l = _a.countries, countries = _l === void 0 ? utils.getCountries() : _l, _m = _a.clearableCountryCode, clearableCountryCode = _m === void 0 ? true : _m, _o = _a.maxDialCodeLength, maxDialCodeLength = _o === void 0 ? MAX_DIAL_CODE_LENGTH : _o, className = _a.className, value = _a.value, onChange = _a.onChange, onCountryChange = _a.onCountryChange, _p = _a.defaultCountryIso2, defaultCountryIso2 = _p === void 0 ? 'ru' : _p, preventFlip = _a.preventFlip, inputProps = _a.inputProps, _q = _a.maxPhoneLen, maxPhoneLen = _q === void 0 ? DEFAULT_MAX_PHONE_LEN_BY_COUNTRY : _q, restProps = tslib.__rest(_a, ["disabled", "readOnly", "hideCountrySelect", "canBeEmptyCountry", "ruNumberPriority", "clear", "size", "colors", "options", "countries", "clearableCountryCode", "maxDialCodeLength", "className", "value", "onChange", "onCountryChange", "defaultCountryIso2", "preventFlip", "inputProps", "maxPhoneLen"]);
41
+ var _r = React.useState(defaultCountryIso2.toLowerCase()), countryIso2 = _r[0], setCountryIso2 = _r[1];
42
42
  var inputRef = React.useRef(null);
43
- var _r = React.useState(null), inputWrapperRef = _r[0], setInputWrapperRef = _r[1];
44
- var _s = React.useState(), caretPos = _s[0], setCaretPos = _s[1];
43
+ var _s = React.useState(null), inputWrapperRef = _s[0], setInputWrapperRef = _s[1];
44
+ var _t = React.useState(), caretPos = _t[0], setCaretPos = _t[1];
45
45
  var phoneLibUtils = React.useRef();
46
46
  var formatPhone = function (inputValue, iso2) {
47
47
  if (iso2 === void 0) { iso2 = countryIso2; }
@@ -135,7 +135,7 @@ var IntlPhoneInput = React.forwardRef(function (_a, ref) {
135
135
  var setCountryByDialCodeWithLengthCheck = function (inputValue) {
136
136
  if (inputRef.current) {
137
137
  var selectionStart = inputRef.current.selectionStart;
138
- if ((selectionStart || 0) <= MAX_DIAL_CODE_LENGTH) {
138
+ if ((selectionStart || 0) <= maxDialCodeLength) {
139
139
  setCountryByDialCode(inputValue);
140
140
  }
141
141
  }
@@ -30,6 +30,10 @@ type IntlPhoneInputProps = Partial<Omit<InputAutocompleteProps, 'onChange'>> & P
30
30
  * Список стран
31
31
  */
32
32
  countries?: Country[];
33
+ /**
34
+ * Максимальная длина кода страны
35
+ */
36
+ maxDialCodeLength?: number;
33
37
  /**
34
38
  * Возможность стереть код страны
35
39
  */
@@ -68,6 +72,10 @@ declare const IntlPhoneInput: React.ForwardRefExoticComponent<Partial<Omit<Input
68
72
  * Список стран
69
73
  */
70
74
  countries?: Country[] | undefined;
75
+ /**
76
+ * Максимальная длина кода страны
77
+ */
78
+ maxDialCodeLength?: number | undefined;
71
79
  /**
72
80
  * Возможность стереть код страны
73
81
  */
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-input__addons_79nxp","l":"intl-phone-input__l_79nxp","xl":"intl-phone-input__xl_79nxp","flagIconWrapper":"intl-phone-input__flagIconWrapper_79nxp","emptyCountryIcon":"intl-phone-input__emptyCountryIcon_79nxp"};
19
+ var styles = {"addons":"intl-phone-input__addons_1pcxv","l":"intl-phone-input__l_1pcxv","xl":"intl-phone-input__xl_1pcxv","flagIconWrapper":"intl-phone-input__flagIconWrapper_1pcxv","emptyCountryIcon":"intl-phone-input__emptyCountryIcon_1pcxv"};
20
20
  require('./index.css')
21
21
 
22
22
  var countriesHash = getCountriesHash();
@@ -25,11 +25,11 @@ var MASK_SYMBOLS = [' ', '-', '(', ')'];
25
25
  var MAX_PHONE_LEN = 15;
26
26
  var DEFAULT_MAX_PHONE_LEN_BY_COUNTRY = { RU: 11 };
27
27
  var IntlPhoneInput = forwardRef(function (_a, ref) {
28
- var _b = _a.disabled, disabled = _b === void 0 ? false : _b, _c = _a.readOnly, readOnly = _c === void 0 ? false : _c, _d = _a.hideCountrySelect, hideCountrySelect = _d === void 0 ? false : _d, _e = _a.canBeEmptyCountry, canBeEmptyCountry = _e === void 0 ? false : _e, _f = _a.ruNumberPriority, ruNumberPriority = _f === void 0 ? false : _f, _g = _a.clear, clear = _g === void 0 ? false : _g, _h = _a.size, size = _h === void 0 ? 'm' : _h, _j = _a.colors, colors = _j === void 0 ? 'default' : _j, _k = _a.options, options = _k === void 0 ? [] : _k, _l = _a.countries, countries = _l === void 0 ? getCountries() : _l, _m = _a.clearableCountryCode, clearableCountryCode = _m === void 0 ? true : _m, className = _a.className, value = _a.value, onChange = _a.onChange, onCountryChange = _a.onCountryChange, _o = _a.defaultCountryIso2, defaultCountryIso2 = _o === void 0 ? 'ru' : _o, preventFlip = _a.preventFlip, inputProps = _a.inputProps, _p = _a.maxPhoneLen, maxPhoneLen = _p === void 0 ? DEFAULT_MAX_PHONE_LEN_BY_COUNTRY : _p, restProps = __rest(_a, ["disabled", "readOnly", "hideCountrySelect", "canBeEmptyCountry", "ruNumberPriority", "clear", "size", "colors", "options", "countries", "clearableCountryCode", "className", "value", "onChange", "onCountryChange", "defaultCountryIso2", "preventFlip", "inputProps", "maxPhoneLen"]);
29
- var _q = useState(defaultCountryIso2.toLowerCase()), countryIso2 = _q[0], setCountryIso2 = _q[1];
28
+ var _b = _a.disabled, disabled = _b === void 0 ? false : _b, _c = _a.readOnly, readOnly = _c === void 0 ? false : _c, _d = _a.hideCountrySelect, hideCountrySelect = _d === void 0 ? false : _d, _e = _a.canBeEmptyCountry, canBeEmptyCountry = _e === void 0 ? false : _e, _f = _a.ruNumberPriority, ruNumberPriority = _f === void 0 ? false : _f, _g = _a.clear, clear = _g === void 0 ? false : _g, _h = _a.size, size = _h === void 0 ? 'm' : _h, _j = _a.colors, colors = _j === void 0 ? 'default' : _j, _k = _a.options, options = _k === void 0 ? [] : _k, _l = _a.countries, countries = _l === void 0 ? getCountries() : _l, _m = _a.clearableCountryCode, clearableCountryCode = _m === void 0 ? true : _m, _o = _a.maxDialCodeLength, maxDialCodeLength = _o === void 0 ? MAX_DIAL_CODE_LENGTH : _o, className = _a.className, value = _a.value, onChange = _a.onChange, onCountryChange = _a.onCountryChange, _p = _a.defaultCountryIso2, defaultCountryIso2 = _p === void 0 ? 'ru' : _p, preventFlip = _a.preventFlip, inputProps = _a.inputProps, _q = _a.maxPhoneLen, maxPhoneLen = _q === void 0 ? DEFAULT_MAX_PHONE_LEN_BY_COUNTRY : _q, restProps = __rest(_a, ["disabled", "readOnly", "hideCountrySelect", "canBeEmptyCountry", "ruNumberPriority", "clear", "size", "colors", "options", "countries", "clearableCountryCode", "maxDialCodeLength", "className", "value", "onChange", "onCountryChange", "defaultCountryIso2", "preventFlip", "inputProps", "maxPhoneLen"]);
29
+ var _r = useState(defaultCountryIso2.toLowerCase()), countryIso2 = _r[0], setCountryIso2 = _r[1];
30
30
  var inputRef = useRef(null);
31
- var _r = useState(null), inputWrapperRef = _r[0], setInputWrapperRef = _r[1];
32
- var _s = useState(), caretPos = _s[0], setCaretPos = _s[1];
31
+ var _s = useState(null), inputWrapperRef = _s[0], setInputWrapperRef = _s[1];
32
+ var _t = useState(), caretPos = _t[0], setCaretPos = _t[1];
33
33
  var phoneLibUtils = useRef();
34
34
  var formatPhone = function (inputValue, iso2) {
35
35
  if (iso2 === void 0) { iso2 = countryIso2; }
@@ -123,7 +123,7 @@ var IntlPhoneInput = forwardRef(function (_a, ref) {
123
123
  var setCountryByDialCodeWithLengthCheck = function (inputValue) {
124
124
  if (inputRef.current) {
125
125
  var selectionStart = inputRef.current.selectionStart;
126
- if ((selectionStart || 0) <= MAX_DIAL_CODE_LENGTH) {
126
+ if ((selectionStart || 0) <= maxDialCodeLength) {
127
127
  setCountryByDialCode(inputValue);
128
128
  }
129
129
  }
@@ -284,7 +284,7 @@ var IntlPhoneInput = forwardRef(function (_a, ref) {
284
284
  if (phoneLibUtils.current)
285
285
  return;
286
286
  import(
287
- /* webpackChunkName: "libphonenumber" */ './libphonenumber-js.min-540573cb.js')
287
+ /* webpackChunkName: "libphonenumber" */ './libphonenumber-js.min-4efc1e02.js')
288
288
  .then(function (utils) {
289
289
  phoneLibUtils.current = utils.AsYouType;
290
290
  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-input__flagIcon_11ut0","flagPlaceholder":"intl-phone-input__flagPlaceholder_11ut0"};
5
+ var styles = {"flagIcon":"intl-phone-input__flagIcon_1isn4","flagPlaceholder":"intl-phone-input__flagPlaceholder_1isn4"};
6
6
  require('./index.css')
7
7
 
8
8
  /**
@@ -1,4 +1,4 @@
1
- /* hash: dcd95 */
1
+ /* hash: tz8fy */
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-input__flagIcon_11ut0 {
20
+ } .intl-phone-input__flagIcon_1isn4 {
21
21
  max-width: 24px;
22
22
  max-height: 24px;
23
- } .intl-phone-input__flagPlaceholder_11ut0 {
23
+ } .intl-phone-input__flagPlaceholder_1isn4 {
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-input__component_tmsrk","option":"intl-phone-input__option_tmsrk","flag":"intl-phone-input__flag_tmsrk","countryName":"intl-phone-input__countryName_tmsrk","dialCode":"intl-phone-input__dialCode_tmsrk"};
12
+ var styles = {"component":"intl-phone-input__component_mk4yu","option":"intl-phone-input__option_mk4yu","flag":"intl-phone-input__flag_mk4yu","countryName":"intl-phone-input__countryName_mk4yu","dialCode":"intl-phone-input__dialCode_mk4yu"};
13
13
  require('./index.css')
14
14
 
15
15
  var CountriesSelect = function (_a) {
@@ -1,4 +1,4 @@
1
- /* hash: yc6mg */
1
+ /* hash: rkhqs */
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-input__component_tmsrk {
20
+ } .intl-phone-input__component_mk4yu {
21
21
  position: static;
22
22
  display: flex;
23
23
  min-width: initial;
24
24
  height: 100%;
25
- } .intl-phone-input__option_tmsrk {
25
+ } .intl-phone-input__option_mk4yu {
26
26
  display: flex;
27
27
  align-items: flex-start;
28
- } .intl-phone-input__flag_tmsrk {
28
+ } .intl-phone-input__flag_mk4yu {
29
29
  flex-shrink: 0;
30
30
  margin-right: var(--gap-xs);
31
- } .intl-phone-input__countryName_tmsrk {
31
+ } .intl-phone-input__countryName_mk4yu {
32
32
  margin-right: var(--gap-xs);
33
- } .intl-phone-input__dialCode_tmsrk {
33
+ } .intl-phone-input__dialCode_mk4yu {
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-input__component_1qayf","flagIconContainer":"intl-phone-input__flagIconContainer_1qayf","emptyCountryIcon":"intl-phone-input__emptyCountryIcon_1qayf","disabled":"intl-phone-input__disabled_1qayf","inner":"intl-phone-input__inner_1qayf","l":"intl-phone-input__l_1qayf","xl":"intl-phone-input__xl_1qayf","focusVisible":"intl-phone-input__focusVisible_1qayf"};
10
+ var styles = {"component":"intl-phone-input__component_1pqeg","flagIconContainer":"intl-phone-input__flagIconContainer_1pqeg","emptyCountryIcon":"intl-phone-input__emptyCountryIcon_1pqeg","disabled":"intl-phone-input__disabled_1pqeg","inner":"intl-phone-input__inner_1pqeg","l":"intl-phone-input__l_1pqeg","xl":"intl-phone-input__xl_1pqeg","focusVisible":"intl-phone-input__focusVisible_1pqeg"};
11
11
  require('./index.css')
12
12
 
13
13
  var EMPTY_COUNTRY_SELECT_FIELD = {
@@ -1,4 +1,4 @@
1
- /* hash: 1wqo0 */
1
+ /* hash: vut83 */
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-input__component_1qayf {
24
+ } .intl-phone-input__component_1pqeg {
25
25
  height: 100%;
26
26
  cursor: pointer;
27
27
  outline: none;
28
28
  position: relative;
29
- } .intl-phone-input__flagIconContainer_1qayf {
29
+ } .intl-phone-input__flagIconContainer_1pqeg {
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-input__emptyCountryIcon_1qayf {
36
+ } .intl-phone-input__emptyCountryIcon_1pqeg {
37
37
  color: var(--color-light-graphic-secondary);
38
- } .intl-phone-input__disabled_1qayf {
38
+ } .intl-phone-input__disabled_1pqeg {
39
39
  cursor: var(--disabled-cursor);
40
- } .intl-phone-input__inner_1qayf {
40
+ } .intl-phone-input__inner_1pqeg {
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-input__l_1qayf .intl-phone-input__inner_1qayf,
48
- .intl-phone-input__xl_1qayf .intl-phone-input__inner_1qayf {
47
+ } .intl-phone-input__l_1pqeg .intl-phone-input__inner_1pqeg,
48
+ .intl-phone-input__xl_1pqeg .intl-phone-input__inner_1pqeg {
49
49
  padding-left: var(--gap-m);
50
- } .intl-phone-input__focusVisible_1qayf {
50
+ } .intl-phone-input__focusVisible_1pqeg {
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: 13e2j */
1
+ /* hash: mr7cm */
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-input__addons_79nxp {
19
+ } .intl-phone-input__addons_1pcxv {
20
20
  padding-left: 0;
21
- } .intl-phone-input__l_79nxp .intl-phone-input__addons_79nxp, .intl-phone-input__xl_79nxp .intl-phone-input__addons_79nxp {
21
+ } .intl-phone-input__l_1pcxv .intl-phone-input__addons_1pcxv, .intl-phone-input__xl_1pcxv .intl-phone-input__addons_1pcxv {
22
22
  padding-left: 0;
23
- } .intl-phone-input__flagIconWrapper_79nxp {
23
+ } .intl-phone-input__flagIconWrapper_1pcxv {
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-input__emptyCountryIcon_79nxp {
30
+ } .intl-phone-input__emptyCountryIcon_1pcxv {
31
31
  color: var(--color-light-graphic-secondary);
32
32
  }
package/index.css CHANGED
@@ -1,4 +1,4 @@
1
- /* hash: 13e2j */
1
+ /* hash: mr7cm */
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-input__addons_79nxp {
19
+ } .intl-phone-input__addons_1pcxv {
20
20
  padding-left: 0;
21
- } .intl-phone-input__l_79nxp .intl-phone-input__addons_79nxp, .intl-phone-input__xl_79nxp .intl-phone-input__addons_79nxp {
21
+ } .intl-phone-input__l_1pcxv .intl-phone-input__addons_1pcxv, .intl-phone-input__xl_1pcxv .intl-phone-input__addons_1pcxv {
22
22
  padding-left: 0;
23
- } .intl-phone-input__flagIconWrapper_79nxp {
23
+ } .intl-phone-input__flagIconWrapper_1pcxv {
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-input__emptyCountryIcon_79nxp {
30
+ } .intl-phone-input__emptyCountryIcon_1pcxv {
31
31
  color: var(--color-light-graphic-secondary);
32
32
  }
@@ -30,6 +30,10 @@ type IntlPhoneInputProps = Partial<Omit<InputAutocompleteProps, 'onChange'>> & P
30
30
  * Список стран
31
31
  */
32
32
  countries?: Country[];
33
+ /**
34
+ * Максимальная длина кода страны
35
+ */
36
+ maxDialCodeLength?: number;
33
37
  /**
34
38
  * Возможность стереть код страны
35
39
  */
@@ -68,6 +72,10 @@ declare const IntlPhoneInput: React.ForwardRefExoticComponent<Partial<Omit<Input
68
72
  * Список стран
69
73
  */
70
74
  countries?: Country[] | undefined;
75
+ /**
76
+ * Максимальная длина кода страны
77
+ */
78
+ maxDialCodeLength?: number | undefined;
71
79
  /**
72
80
  * Возможность стереть код страны
73
81
  */
@@ -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-input__addons_79nxp","l":"intl-phone-input__l_79nxp","xl":"intl-phone-input__xl_79nxp","flagIconWrapper":"intl-phone-input__flagIconWrapper_79nxp","emptyCountryIcon":"intl-phone-input__emptyCountryIcon_79nxp"};
18
+ const styles = {"addons":"intl-phone-input__addons_1pcxv","l":"intl-phone-input__l_1pcxv","xl":"intl-phone-input__xl_1pcxv","flagIconWrapper":"intl-phone-input__flagIconWrapper_1pcxv","emptyCountryIcon":"intl-phone-input__emptyCountryIcon_1pcxv"};
19
19
  require('./index.css')
20
20
 
21
21
  const countriesHash = getCountriesHash();
@@ -23,7 +23,7 @@ const MAX_DIAL_CODE_LENGTH = 4;
23
23
  const MASK_SYMBOLS = [' ', '-', '(', ')'];
24
24
  const MAX_PHONE_LEN = 15;
25
25
  const DEFAULT_MAX_PHONE_LEN_BY_COUNTRY = { RU: 11 };
26
- const IntlPhoneInput = forwardRef(({ disabled = false, readOnly = false, hideCountrySelect = false, canBeEmptyCountry = false, ruNumberPriority = false, clear = false, size = 'm', colors = 'default', options = [], countries = getCountries(), clearableCountryCode = true, className, value, onChange, onCountryChange, defaultCountryIso2 = 'ru', preventFlip, inputProps, maxPhoneLen = DEFAULT_MAX_PHONE_LEN_BY_COUNTRY, ...restProps }, ref) => {
26
+ const IntlPhoneInput = forwardRef(({ disabled = false, readOnly = false, hideCountrySelect = false, canBeEmptyCountry = false, ruNumberPriority = false, clear = false, size = 'm', colors = 'default', options = [], countries = getCountries(), clearableCountryCode = true, maxDialCodeLength = MAX_DIAL_CODE_LENGTH, className, value, onChange, onCountryChange, defaultCountryIso2 = 'ru', preventFlip, inputProps, maxPhoneLen = DEFAULT_MAX_PHONE_LEN_BY_COUNTRY, ...restProps }, ref) => {
27
27
  const [countryIso2, setCountryIso2] = useState(defaultCountryIso2.toLowerCase());
28
28
  const inputRef = useRef(null);
29
29
  const [inputWrapperRef, setInputWrapperRef] = useState(null);
@@ -120,7 +120,7 @@ const IntlPhoneInput = forwardRef(({ disabled = false, readOnly = false, hideCou
120
120
  const setCountryByDialCodeWithLengthCheck = (inputValue) => {
121
121
  if (inputRef.current) {
122
122
  const { selectionStart } = inputRef.current;
123
- if ((selectionStart || 0) <= MAX_DIAL_CODE_LENGTH) {
123
+ if ((selectionStart || 0) <= maxDialCodeLength) {
124
124
  setCountryByDialCode(inputValue);
125
125
  }
126
126
  }
@@ -279,7 +279,7 @@ const IntlPhoneInput = forwardRef(({ disabled = false, readOnly = false, hideCou
279
279
  if (phoneLibUtils.current)
280
280
  return;
281
281
  import(
282
- /* webpackChunkName: "libphonenumber" */ './libphonenumber-js.min-540573cb.js')
282
+ /* webpackChunkName: "libphonenumber" */ './libphonenumber-js.min-4efc1e02.js')
283
283
  .then((utils) => {
284
284
  phoneLibUtils.current = utils.AsYouType;
285
285
  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-input__flagIcon_11ut0","flagPlaceholder":"intl-phone-input__flagPlaceholder_11ut0"};
5
+ const styles = {"flagIcon":"intl-phone-input__flagIcon_1isn4","flagPlaceholder":"intl-phone-input__flagPlaceholder_1isn4"};
6
6
  require('./index.css')
7
7
 
8
8
  /**
@@ -1,4 +1,4 @@
1
- /* hash: dcd95 */
1
+ /* hash: tz8fy */
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-input__flagIcon_11ut0 {
20
+ } .intl-phone-input__flagIcon_1isn4 {
21
21
  max-width: 24px;
22
22
  max-height: 24px;
23
- } .intl-phone-input__flagPlaceholder_11ut0 {
23
+ } .intl-phone-input__flagPlaceholder_1isn4 {
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-input__component_tmsrk","option":"intl-phone-input__option_tmsrk","flag":"intl-phone-input__flag_tmsrk","countryName":"intl-phone-input__countryName_tmsrk","dialCode":"intl-phone-input__dialCode_tmsrk"};
11
+ const styles = {"component":"intl-phone-input__component_mk4yu","option":"intl-phone-input__option_mk4yu","flag":"intl-phone-input__flag_mk4yu","countryName":"intl-phone-input__countryName_mk4yu","dialCode":"intl-phone-input__dialCode_mk4yu"};
12
12
  require('./index.css')
13
13
 
14
14
  /* eslint-disable jsx-a11y/no-static-element-interactions */
@@ -1,4 +1,4 @@
1
- /* hash: yc6mg */
1
+ /* hash: rkhqs */
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-input__component_tmsrk {
20
+ } .intl-phone-input__component_mk4yu {
21
21
  position: static;
22
22
  display: flex;
23
23
  min-width: initial;
24
24
  height: 100%;
25
- } .intl-phone-input__option_tmsrk {
25
+ } .intl-phone-input__option_mk4yu {
26
26
  display: flex;
27
27
  align-items: flex-start;
28
- } .intl-phone-input__flag_tmsrk {
28
+ } .intl-phone-input__flag_mk4yu {
29
29
  flex-shrink: 0;
30
30
  margin-right: var(--gap-xs);
31
- } .intl-phone-input__countryName_tmsrk {
31
+ } .intl-phone-input__countryName_mk4yu {
32
32
  margin-right: var(--gap-xs);
33
- } .intl-phone-input__dialCode_tmsrk {
33
+ } .intl-phone-input__dialCode_mk4yu {
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-input__component_1qayf","flagIconContainer":"intl-phone-input__flagIconContainer_1qayf","emptyCountryIcon":"intl-phone-input__emptyCountryIcon_1qayf","disabled":"intl-phone-input__disabled_1qayf","inner":"intl-phone-input__inner_1qayf","l":"intl-phone-input__l_1qayf","xl":"intl-phone-input__xl_1qayf","focusVisible":"intl-phone-input__focusVisible_1qayf"};
9
+ const styles = {"component":"intl-phone-input__component_1pqeg","flagIconContainer":"intl-phone-input__flagIconContainer_1pqeg","emptyCountryIcon":"intl-phone-input__emptyCountryIcon_1pqeg","disabled":"intl-phone-input__disabled_1pqeg","inner":"intl-phone-input__inner_1pqeg","l":"intl-phone-input__l_1pqeg","xl":"intl-phone-input__xl_1pqeg","focusVisible":"intl-phone-input__focusVisible_1pqeg"};
10
10
  require('./index.css')
11
11
 
12
12
  const EMPTY_COUNTRY_SELECT_FIELD = {
@@ -1,4 +1,4 @@
1
- /* hash: 1wqo0 */
1
+ /* hash: vut83 */
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-input__component_1qayf {
24
+ } .intl-phone-input__component_1pqeg {
25
25
  height: 100%;
26
26
  cursor: pointer;
27
27
  outline: none;
28
28
  position: relative;
29
- } .intl-phone-input__flagIconContainer_1qayf {
29
+ } .intl-phone-input__flagIconContainer_1pqeg {
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-input__emptyCountryIcon_1qayf {
36
+ } .intl-phone-input__emptyCountryIcon_1pqeg {
37
37
  color: var(--color-light-graphic-secondary);
38
- } .intl-phone-input__disabled_1qayf {
38
+ } .intl-phone-input__disabled_1pqeg {
39
39
  cursor: var(--disabled-cursor);
40
- } .intl-phone-input__inner_1qayf {
40
+ } .intl-phone-input__inner_1pqeg {
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-input__l_1qayf .intl-phone-input__inner_1qayf,
48
- .intl-phone-input__xl_1qayf .intl-phone-input__inner_1qayf {
47
+ } .intl-phone-input__l_1pqeg .intl-phone-input__inner_1pqeg,
48
+ .intl-phone-input__xl_1pqeg .intl-phone-input__inner_1pqeg {
49
49
  padding-left: var(--gap-m);
50
- } .intl-phone-input__focusVisible_1qayf {
50
+ } .intl-phone-input__focusVisible_1pqeg {
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: 13e2j */
1
+ /* hash: mr7cm */
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-input__addons_79nxp {
19
+ } .intl-phone-input__addons_1pcxv {
20
20
  padding-left: 0;
21
- } .intl-phone-input__l_79nxp .intl-phone-input__addons_79nxp, .intl-phone-input__xl_79nxp .intl-phone-input__addons_79nxp {
21
+ } .intl-phone-input__l_1pcxv .intl-phone-input__addons_1pcxv, .intl-phone-input__xl_1pcxv .intl-phone-input__addons_1pcxv {
22
22
  padding-left: 0;
23
- } .intl-phone-input__flagIconWrapper_79nxp {
23
+ } .intl-phone-input__flagIconWrapper_1pcxv {
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-input__emptyCountryIcon_79nxp {
30
+ } .intl-phone-input__emptyCountryIcon_1pcxv {
31
31
  color: var(--color-light-graphic-secondary);
32
32
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alfalab/core-components-intl-phone-input",
3
- "version": "9.2.26",
3
+ "version": "9.3.0",
4
4
  "description": "Phone input for international phones",
5
5
  "keywords": [],
6
6
  "license": "MIT",
@@ -17,8 +17,8 @@
17
17
  "react": "^16.9.0 || ^17.0.1 || ^18.0.0"
18
18
  },
19
19
  "dependencies": {
20
- "@alfalab/core-components-input-autocomplete": "9.3.24",
21
- "@alfalab/core-components-select": "^14.1.0",
20
+ "@alfalab/core-components-input-autocomplete": "9.3.25",
21
+ "@alfalab/core-components-select": "^14.1.1",
22
22
  "@alfalab/hooks": "^1.4.1",
23
23
  "@alfalab/icons-glyph": "^2.89.0",
24
24
  "@alfalab/utils": "^1.13.3",