@alfalab/core-components-intl-phone-input 9.5.14 → 9.5.16
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.d.ts +5 -1
- package/component.js +5 -1
- package/components/flag-icon/component.js +1 -1
- package/components/flag-icon/index.css +3 -3
- package/components/select/component.d.ts +1 -1
- package/components/select/component.js +1 -1
- package/components/select/index.css +6 -6
- package/components/select-field/component.d.ts +1 -1
- package/components/select-field/component.js +1 -1
- package/components/select-field/index.css +9 -9
- package/cssm/component.d.ts +5 -1
- package/cssm/component.js +4 -0
- package/cssm/components/select/component.d.ts +1 -1
- package/cssm/components/select-field/component.d.ts +1 -1
- package/esm/component.d.ts +5 -1
- package/esm/component.js +5 -1
- package/esm/components/flag-icon/component.js +1 -1
- package/esm/components/flag-icon/index.css +3 -3
- package/esm/components/select/component.d.ts +1 -1
- package/esm/components/select/component.js +1 -1
- package/esm/components/select/index.css +6 -6
- package/esm/components/select-field/component.d.ts +1 -1
- package/esm/components/select-field/component.js +1 -1
- package/esm/components/select-field/index.css +9 -9
- package/esm/index.css +5 -5
- package/index.css +5 -5
- package/modern/component.d.ts +5 -1
- package/modern/component.js +5 -1
- package/modern/components/flag-icon/component.js +1 -1
- package/modern/components/flag-icon/index.css +3 -3
- package/modern/components/select/component.d.ts +1 -1
- package/modern/components/select/component.js +1 -1
- package/modern/components/select/index.css +6 -6
- package/modern/components/select-field/component.d.ts +1 -1
- package/modern/components/select-field/component.js +1 -1
- package/modern/components/select-field/index.css +9 -9
- package/modern/index.css +5 -5
- package/package.json +3 -3
- package/src/component.tsx +4 -0
- package/Component-0f4b9bed.d.ts +0 -22
- package/Component-10db897e.d.ts +0 -100
- package/Component-4cd3936b.d.ts +0 -8
- package/Component-69921c40.d.ts +0 -184
- package/Component-8b2c2707.d.ts +0 -71
- package/Component-bdb4c6b9.d.ts +0 -12
- package/Component-c44170fe.d.ts +0 -13
- package/Component-c76d6398.d.ts +0 -5
- package/Component-ebda875c.d.ts +0 -12
- package/Component.desktop-0aa4e915.d.ts +0 -5
- package/Component.desktop-63dec22f.d.ts +0 -18
- package/Component.desktop-785df74d.d.ts +0 -6
- package/Component.desktop-9cded6b9.d.ts +0 -73
- package/Component.desktop-d873d97d.d.ts +0 -6
- package/Component.mobile-16b1285a.d.ts +0 -5
- package/Component.mobile-d7e9f69d.d.ts +0 -6
- package/Component.responsive-3109f463.d.ts +0 -26
- package/Context-bdb4c6b9.d.ts +0 -4
- package/ResponsiveContext-baf4875b.d.ts +0 -5
- package/component-10db897e.d.ts +0 -44
- package/consts-f777ba1a.d.ts +0 -2
- package/cssm/Component-0f4b9bed.d.ts +0 -22
- package/cssm/Component-10db897e.d.ts +0 -100
- package/cssm/Component-4cd3936b.d.ts +0 -8
- package/cssm/Component-69921c40.d.ts +0 -184
- package/cssm/Component-8b2c2707.d.ts +0 -71
- package/cssm/Component-bdb4c6b9.d.ts +0 -12
- package/cssm/Component-c44170fe.d.ts +0 -13
- package/cssm/Component-c76d6398.d.ts +0 -5
- package/cssm/Component-ebda875c.d.ts +0 -12
- package/cssm/Component.desktop-0aa4e915.d.ts +0 -5
- package/cssm/Component.desktop-63dec22f.d.ts +0 -18
- package/cssm/Component.desktop-785df74d.d.ts +0 -6
- package/cssm/Component.desktop-9cded6b9.d.ts +0 -73
- package/cssm/Component.desktop-d873d97d.d.ts +0 -6
- package/cssm/Component.mobile-16b1285a.d.ts +0 -5
- package/cssm/Component.mobile-d7e9f69d.d.ts +0 -6
- package/cssm/Component.responsive-3109f463.d.ts +0 -26
- package/cssm/Context-bdb4c6b9.d.ts +0 -4
- package/cssm/ResponsiveContext-baf4875b.d.ts +0 -5
- package/cssm/component-10db897e.d.ts +0 -44
- package/cssm/consts-f777ba1a.d.ts +0 -2
- package/cssm/desktop-63dec22f.d.ts +0 -2
- package/cssm/desktop-89f0cb07.d.ts +0 -2
- package/cssm/hook-8abfea97.d.ts +0 -90
- package/cssm/hook-c44170fe.d.ts +0 -48
- package/cssm/index-10db897e.d.ts +0 -50
- package/cssm/index-136acbb1.d.ts +0 -28
- package/cssm/index-3109f463.d.ts +0 -62
- package/cssm/index-72dda473.d.ts +0 -12
- package/cssm/index-8b2c2707.d.ts +0 -2
- package/cssm/index-bdb4c6b9.d.ts +0 -2
- package/cssm/index-c44170fe.d.ts +0 -3
- package/cssm/index-c76d6398.d.ts +0 -2
- package/cssm/index-ebda875c.d.ts +0 -37
- package/cssm/index-f12ee135.d.ts +0 -3
- package/cssm/mobile-89f0cb07.d.ts +0 -2
- package/cssm/mobile-96988a65.d.ts +0 -2
- package/cssm/shared-4cd3936b.d.ts +0 -64
- package/cssm/types-1b036d4b.d.ts +0 -13
- package/cssm/types-1c79e231.d.ts +0 -113
- package/cssm/types-67a2d8af.d.ts +0 -276
- package/cssm/typings-0f4b9bed.d.ts +0 -576
- package/cssm/typings-89f0cb07.d.ts +0 -93
- package/cssm/typings-bdb4c6b9.d.ts +0 -52
- package/cssm/useSkeleton-ebda875c.d.ts +0 -12
- package/cssm/utils-0f4b9bed.d.ts +0 -41
- package/cssm/utils-1574ad8b.d.ts +0 -29
- package/cssm/utils-49cc3c24.d.ts +0 -8
- package/desktop-63dec22f.d.ts +0 -2
- package/desktop-89f0cb07.d.ts +0 -2
- package/esm/Component-0f4b9bed.d.ts +0 -22
- package/esm/Component-10db897e.d.ts +0 -100
- package/esm/Component-4cd3936b.d.ts +0 -8
- package/esm/Component-69921c40.d.ts +0 -184
- package/esm/Component-8b2c2707.d.ts +0 -71
- package/esm/Component-bdb4c6b9.d.ts +0 -12
- package/esm/Component-c44170fe.d.ts +0 -13
- package/esm/Component-c76d6398.d.ts +0 -5
- package/esm/Component-ebda875c.d.ts +0 -12
- package/esm/Component.desktop-0aa4e915.d.ts +0 -5
- package/esm/Component.desktop-63dec22f.d.ts +0 -18
- package/esm/Component.desktop-785df74d.d.ts +0 -6
- package/esm/Component.desktop-9cded6b9.d.ts +0 -73
- package/esm/Component.desktop-d873d97d.d.ts +0 -6
- package/esm/Component.mobile-16b1285a.d.ts +0 -5
- package/esm/Component.mobile-d7e9f69d.d.ts +0 -6
- package/esm/Component.responsive-3109f463.d.ts +0 -26
- package/esm/Context-bdb4c6b9.d.ts +0 -4
- package/esm/ResponsiveContext-baf4875b.d.ts +0 -5
- package/esm/component-10db897e.d.ts +0 -44
- package/esm/consts-f777ba1a.d.ts +0 -2
- package/esm/desktop-63dec22f.d.ts +0 -2
- package/esm/desktop-89f0cb07.d.ts +0 -2
- package/esm/hook-8abfea97.d.ts +0 -90
- package/esm/hook-c44170fe.d.ts +0 -48
- package/esm/index-10db897e.d.ts +0 -50
- package/esm/index-136acbb1.d.ts +0 -28
- package/esm/index-3109f463.d.ts +0 -62
- package/esm/index-72dda473.d.ts +0 -12
- package/esm/index-8b2c2707.d.ts +0 -2
- package/esm/index-bdb4c6b9.d.ts +0 -2
- package/esm/index-c44170fe.d.ts +0 -3
- package/esm/index-c76d6398.d.ts +0 -2
- package/esm/index-ebda875c.d.ts +0 -37
- package/esm/index-f12ee135.d.ts +0 -3
- package/esm/mobile-89f0cb07.d.ts +0 -2
- package/esm/mobile-96988a65.d.ts +0 -2
- package/esm/shared-4cd3936b.d.ts +0 -64
- package/esm/types-1b036d4b.d.ts +0 -13
- package/esm/types-1c79e231.d.ts +0 -113
- package/esm/types-67a2d8af.d.ts +0 -276
- package/esm/typings-0f4b9bed.d.ts +0 -576
- package/esm/typings-89f0cb07.d.ts +0 -93
- package/esm/typings-bdb4c6b9.d.ts +0 -52
- package/esm/useSkeleton-ebda875c.d.ts +0 -12
- package/esm/utils-0f4b9bed.d.ts +0 -41
- package/esm/utils-1574ad8b.d.ts +0 -29
- package/esm/utils-49cc3c24.d.ts +0 -8
- package/hook-8abfea97.d.ts +0 -90
- package/hook-c44170fe.d.ts +0 -48
- package/index-10db897e.d.ts +0 -50
- package/index-136acbb1.d.ts +0 -28
- package/index-3109f463.d.ts +0 -62
- package/index-72dda473.d.ts +0 -12
- package/index-8b2c2707.d.ts +0 -2
- package/index-bdb4c6b9.d.ts +0 -2
- package/index-c44170fe.d.ts +0 -3
- package/index-c76d6398.d.ts +0 -2
- package/index-ebda875c.d.ts +0 -37
- package/index-f12ee135.d.ts +0 -3
- package/mobile-89f0cb07.d.ts +0 -2
- package/mobile-96988a65.d.ts +0 -2
- package/modern/Component-0f4b9bed.d.ts +0 -22
- package/modern/Component-10db897e.d.ts +0 -100
- package/modern/Component-4cd3936b.d.ts +0 -8
- package/modern/Component-69921c40.d.ts +0 -184
- package/modern/Component-8b2c2707.d.ts +0 -71
- package/modern/Component-bdb4c6b9.d.ts +0 -12
- package/modern/Component-c44170fe.d.ts +0 -13
- package/modern/Component-c76d6398.d.ts +0 -5
- package/modern/Component-ebda875c.d.ts +0 -12
- package/modern/Component.desktop-0aa4e915.d.ts +0 -5
- package/modern/Component.desktop-63dec22f.d.ts +0 -18
- package/modern/Component.desktop-785df74d.d.ts +0 -6
- package/modern/Component.desktop-9cded6b9.d.ts +0 -73
- package/modern/Component.desktop-d873d97d.d.ts +0 -6
- package/modern/Component.mobile-16b1285a.d.ts +0 -5
- package/modern/Component.mobile-d7e9f69d.d.ts +0 -6
- package/modern/Component.responsive-3109f463.d.ts +0 -26
- package/modern/Context-bdb4c6b9.d.ts +0 -4
- package/modern/ResponsiveContext-baf4875b.d.ts +0 -5
- package/modern/component-10db897e.d.ts +0 -44
- package/modern/consts-f777ba1a.d.ts +0 -2
- package/modern/desktop-63dec22f.d.ts +0 -2
- package/modern/desktop-89f0cb07.d.ts +0 -2
- package/modern/hook-8abfea97.d.ts +0 -90
- package/modern/hook-c44170fe.d.ts +0 -48
- package/modern/index-10db897e.d.ts +0 -50
- package/modern/index-136acbb1.d.ts +0 -28
- package/modern/index-3109f463.d.ts +0 -62
- package/modern/index-72dda473.d.ts +0 -12
- package/modern/index-8b2c2707.d.ts +0 -2
- package/modern/index-bdb4c6b9.d.ts +0 -2
- package/modern/index-c44170fe.d.ts +0 -3
- package/modern/index-c76d6398.d.ts +0 -2
- package/modern/index-ebda875c.d.ts +0 -37
- package/modern/index-f12ee135.d.ts +0 -3
- package/modern/mobile-89f0cb07.d.ts +0 -2
- package/modern/mobile-96988a65.d.ts +0 -2
- package/modern/shared-4cd3936b.d.ts +0 -64
- package/modern/types-1b036d4b.d.ts +0 -13
- package/modern/types-1c79e231.d.ts +0 -113
- package/modern/types-67a2d8af.d.ts +0 -276
- package/modern/typings-0f4b9bed.d.ts +0 -576
- package/modern/typings-89f0cb07.d.ts +0 -93
- package/modern/typings-bdb4c6b9.d.ts +0 -52
- package/modern/useSkeleton-ebda875c.d.ts +0 -12
- package/modern/utils-0f4b9bed.d.ts +0 -41
- package/modern/utils-1574ad8b.d.ts +0 -29
- package/modern/utils-49cc3c24.d.ts +0 -8
- package/shared-4cd3936b.d.ts +0 -64
- package/types-1b036d4b.d.ts +0 -13
- package/types-1c79e231.d.ts +0 -113
- package/types-67a2d8af.d.ts +0 -276
- package/typings-0f4b9bed.d.ts +0 -576
- package/typings-89f0cb07.d.ts +0 -93
- package/typings-bdb4c6b9.d.ts +0 -52
- package/useSkeleton-ebda875c.d.ts +0 -12
- package/utils-0f4b9bed.d.ts +0 -41
- package/utils-1574ad8b.d.ts +0 -29
- package/utils-49cc3c24.d.ts +0 -8
package/component.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { CountryCode } from 'libphonenumber-js';
|
|
4
|
-
import { InputAutocompleteDesktopProps } from "
|
|
4
|
+
import { InputAutocompleteDesktopProps } from "@alfalab/core-components-input-autocomplete/desktop";
|
|
5
5
|
import { SelectProps } from "@alfalab/core-components-select";
|
|
6
6
|
import { Country } from '@alfalab/utils';
|
|
7
7
|
type MaxPhoneLenByCountry = Record<string, number>;
|
|
@@ -47,6 +47,10 @@ type IntlPhoneInputProps = Partial<Omit<InputAutocompleteDesktopProps, 'onChange
|
|
|
47
47
|
ruNumberPriority?: boolean;
|
|
48
48
|
clear?: boolean;
|
|
49
49
|
};
|
|
50
|
+
/**
|
|
51
|
+
* @deprecated
|
|
52
|
+
* use InternationalPhoneInput instead
|
|
53
|
+
*/
|
|
50
54
|
declare const IntlPhoneInput: React.ForwardRefExoticComponent<Partial<Omit<InputAutocompleteDesktopProps, "onChange">> & Pick<SelectProps, "preventFlip"> & {
|
|
51
55
|
/**
|
|
52
56
|
* Значение
|
package/component.js
CHANGED
|
@@ -45,7 +45,7 @@ var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
|
45
45
|
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
46
46
|
var WorldMagnifierMIcon__default = /*#__PURE__*/_interopDefaultCompat(WorldMagnifierMIcon);
|
|
47
47
|
|
|
48
|
-
var styles = {"addons":"intl-phone-
|
|
48
|
+
var styles = {"addons":"intl-phone-input__addons_e7tum","l":"intl-phone-input__l_e7tum","xl":"intl-phone-input__xl_e7tum","flagIconWrapper":"intl-phone-input__flagIconWrapper_e7tum","emptyCountryIcon":"intl-phone-input__emptyCountryIcon_e7tum"};
|
|
49
49
|
require('./index.css')
|
|
50
50
|
|
|
51
51
|
var countriesHash = utils.getCountriesHash();
|
|
@@ -53,6 +53,10 @@ var MAX_DIAL_CODE_LENGTH = 4;
|
|
|
53
53
|
var MASK_SYMBOLS = [' ', '-', '(', ')'];
|
|
54
54
|
var MAX_PHONE_LEN = 15;
|
|
55
55
|
var DEFAULT_MAX_PHONE_LEN_BY_COUNTRY = { RU: 11 };
|
|
56
|
+
/**
|
|
57
|
+
* @deprecated
|
|
58
|
+
* use InternationalPhoneInput instead
|
|
59
|
+
*/
|
|
56
60
|
var IntlPhoneInput = React.forwardRef(function (_a, ref) {
|
|
57
61
|
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"]);
|
|
58
62
|
var _r = React.useState(defaultCountryIso2.toLowerCase()), countryIso2 = _r[0], setCountryIso2 = _r[1];
|
|
@@ -11,7 +11,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
11
11
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
12
12
|
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
13
13
|
|
|
14
|
-
var styles = {"flagIcon":"intl-phone-
|
|
14
|
+
var styles = {"flagIcon":"intl-phone-input__flagIcon_2xcez","flagPlaceholder":"intl-phone-input__flagPlaceholder_2xcez"};
|
|
15
15
|
require('./index.css')
|
|
16
16
|
|
|
17
17
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1ihbn */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-specialbg-tertiary-transparent: rgba(11, 31, 53, 0.1); /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -17,10 +17,10 @@
|
|
|
17
17
|
--gap-3xs: 2px;
|
|
18
18
|
} :root {
|
|
19
19
|
} :root {
|
|
20
|
-
} .intl-phone-
|
|
20
|
+
} .intl-phone-input__flagIcon_2xcez {
|
|
21
21
|
max-width: 24px;
|
|
22
22
|
max-height: 24px;
|
|
23
|
-
} .intl-phone-
|
|
23
|
+
} .intl-phone-input__flagPlaceholder_2xcez {
|
|
24
24
|
width: 24px;
|
|
25
25
|
height: 16px;
|
|
26
26
|
max-height: 16px;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
import { SelectDesktopProps } from "
|
|
2
|
+
import { SelectDesktopProps } from "@alfalab/core-components-select/desktop";
|
|
3
3
|
import { Country } from '@alfalab/utils';
|
|
4
4
|
type CountriesSelectProps = Pick<SelectDesktopProps, 'size' | 'dataTestId' | 'disabled' | 'onChange' | 'preventFlip'> & {
|
|
5
5
|
selected?: string;
|
|
@@ -18,7 +18,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
18
18
|
|
|
19
19
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
20
20
|
|
|
21
|
-
var styles = {"component":"intl-phone-
|
|
21
|
+
var styles = {"component":"intl-phone-input__component_hzs0z","option":"intl-phone-input__option_hzs0z","flag":"intl-phone-input__flag_hzs0z","countryName":"intl-phone-input__countryName_hzs0z","dialCode":"intl-phone-input__dialCode_hzs0z"};
|
|
22
22
|
require('./index.css')
|
|
23
23
|
|
|
24
24
|
var CountriesSelect = function (_a) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1qlnd */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-text-secondary: rgba(60, 60, 67, 0.66); /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -17,19 +17,19 @@
|
|
|
17
17
|
} :root {
|
|
18
18
|
} :root {
|
|
19
19
|
--text-secondary-color: var(--color-light-text-secondary);
|
|
20
|
-
} .intl-phone-
|
|
20
|
+
} .intl-phone-input__component_hzs0z {
|
|
21
21
|
position: static;
|
|
22
22
|
display: flex;
|
|
23
23
|
min-width: initial;
|
|
24
24
|
height: 100%;
|
|
25
|
-
} .intl-phone-
|
|
25
|
+
} .intl-phone-input__option_hzs0z {
|
|
26
26
|
display: flex;
|
|
27
27
|
align-items: flex-start;
|
|
28
|
-
} .intl-phone-
|
|
28
|
+
} .intl-phone-input__flag_hzs0z {
|
|
29
29
|
flex-shrink: 0;
|
|
30
30
|
margin-right: var(--gap-xs);
|
|
31
|
-
} .intl-phone-
|
|
31
|
+
} .intl-phone-input__countryName_hzs0z {
|
|
32
32
|
margin-right: var(--gap-xs);
|
|
33
|
-
} .intl-phone-
|
|
33
|
+
} .intl-phone-input__dialCode_hzs0z {
|
|
34
34
|
color: var(--text-secondary-color);
|
|
35
35
|
}
|
|
@@ -18,7 +18,7 @@ var mergeRefs__default = /*#__PURE__*/_interopDefaultCompat(mergeRefs);
|
|
|
18
18
|
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
19
19
|
var WorldMagnifierMIcon__default = /*#__PURE__*/_interopDefaultCompat(WorldMagnifierMIcon);
|
|
20
20
|
|
|
21
|
-
var styles = {"component":"intl-phone-
|
|
21
|
+
var styles = {"component":"intl-phone-input__component_1tcco","flagIconContainer":"intl-phone-input__flagIconContainer_1tcco","emptyCountryIcon":"intl-phone-input__emptyCountryIcon_1tcco","disabled":"intl-phone-input__disabled_1tcco","inner":"intl-phone-input__inner_1tcco","l":"intl-phone-input__l_1tcco","xl":"intl-phone-input__xl_1tcco","focusVisible":"intl-phone-input__focusVisible_1tcco"};
|
|
22
22
|
require('./index.css')
|
|
23
23
|
|
|
24
24
|
var EMPTY_COUNTRY_SELECT_FIELD = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 15soz */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-border-link: #0072ef;
|
|
@@ -21,33 +21,33 @@
|
|
|
21
21
|
} :root {
|
|
22
22
|
--focus-color: var(--color-light-border-link);
|
|
23
23
|
--disabled-cursor: not-allowed;
|
|
24
|
-
} .intl-phone-
|
|
24
|
+
} .intl-phone-input__component_1tcco {
|
|
25
25
|
height: 100%;
|
|
26
26
|
cursor: pointer;
|
|
27
27
|
outline: none;
|
|
28
28
|
position: relative;
|
|
29
|
-
} .intl-phone-
|
|
29
|
+
} .intl-phone-input__flagIconContainer_1tcco {
|
|
30
30
|
display: flex;
|
|
31
31
|
justify-content: center;
|
|
32
32
|
align-items: center;
|
|
33
33
|
width: 24px;
|
|
34
34
|
height: 24px;
|
|
35
35
|
margin-right: var(--gap-2xs);
|
|
36
|
-
} .intl-phone-
|
|
36
|
+
} .intl-phone-input__emptyCountryIcon_1tcco {
|
|
37
37
|
color: var(--color-light-graphic-secondary);
|
|
38
|
-
} .intl-phone-
|
|
38
|
+
} .intl-phone-input__disabled_1tcco {
|
|
39
39
|
cursor: var(--disabled-cursor);
|
|
40
|
-
} .intl-phone-
|
|
40
|
+
} .intl-phone-input__inner_1tcco {
|
|
41
41
|
position: relative;
|
|
42
42
|
display: flex;
|
|
43
43
|
align-items: center;
|
|
44
44
|
height: 100%;
|
|
45
45
|
padding-left: var(--gap-s);
|
|
46
46
|
outline: none;
|
|
47
|
-
} .intl-phone-
|
|
48
|
-
.intl-phone-
|
|
47
|
+
} .intl-phone-input__l_1tcco .intl-phone-input__inner_1tcco,
|
|
48
|
+
.intl-phone-input__xl_1tcco .intl-phone-input__inner_1tcco {
|
|
49
49
|
padding-left: var(--gap-m);
|
|
50
|
-
} .intl-phone-
|
|
50
|
+
} .intl-phone-input__focusVisible_1tcco {
|
|
51
51
|
outline: 2px solid var(--focus-color);
|
|
52
52
|
outline-offset: 2px;
|
|
53
53
|
}
|
package/cssm/component.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { CountryCode } from 'libphonenumber-js';
|
|
4
|
-
import { InputAutocompleteDesktopProps } from "
|
|
4
|
+
import { InputAutocompleteDesktopProps } from "@alfalab/core-components-input-autocomplete/desktop";
|
|
5
5
|
import { SelectProps } from "@alfalab/core-components-select";
|
|
6
6
|
import { Country } from '@alfalab/utils';
|
|
7
7
|
type MaxPhoneLenByCountry = Record<string, number>;
|
|
@@ -47,6 +47,10 @@ type IntlPhoneInputProps = Partial<Omit<InputAutocompleteDesktopProps, 'onChange
|
|
|
47
47
|
ruNumberPriority?: boolean;
|
|
48
48
|
clear?: boolean;
|
|
49
49
|
};
|
|
50
|
+
/**
|
|
51
|
+
* @deprecated
|
|
52
|
+
* use InternationalPhoneInput instead
|
|
53
|
+
*/
|
|
50
54
|
declare const IntlPhoneInput: React.ForwardRefExoticComponent<Partial<Omit<InputAutocompleteDesktopProps, "onChange">> & Pick<SelectProps, "preventFlip"> & {
|
|
51
55
|
/**
|
|
52
56
|
* Значение
|
package/cssm/component.js
CHANGED
|
@@ -55,6 +55,10 @@ var MAX_DIAL_CODE_LENGTH = 4;
|
|
|
55
55
|
var MASK_SYMBOLS = [' ', '-', '(', ')'];
|
|
56
56
|
var MAX_PHONE_LEN = 15;
|
|
57
57
|
var DEFAULT_MAX_PHONE_LEN_BY_COUNTRY = { RU: 11 };
|
|
58
|
+
/**
|
|
59
|
+
* @deprecated
|
|
60
|
+
* use InternationalPhoneInput instead
|
|
61
|
+
*/
|
|
58
62
|
var IntlPhoneInput = React.forwardRef(function (_a, ref) {
|
|
59
63
|
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"]);
|
|
60
64
|
var _r = React.useState(defaultCountryIso2.toLowerCase()), countryIso2 = _r[0], setCountryIso2 = _r[1];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
import { SelectDesktopProps } from "
|
|
2
|
+
import { SelectDesktopProps } from "@alfalab/core-components-select/desktop";
|
|
3
3
|
import { Country } from '@alfalab/utils';
|
|
4
4
|
type CountriesSelectProps = Pick<SelectDesktopProps, 'size' | 'dataTestId' | 'disabled' | 'onChange' | 'preventFlip'> & {
|
|
5
5
|
selected?: string;
|
package/esm/component.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { CountryCode } from 'libphonenumber-js';
|
|
4
|
-
import { InputAutocompleteDesktopProps } from "
|
|
4
|
+
import { InputAutocompleteDesktopProps } from "@alfalab/core-components-input-autocomplete/desktop";
|
|
5
5
|
import { SelectProps } from "@alfalab/core-components-select";
|
|
6
6
|
import { Country } from '@alfalab/utils';
|
|
7
7
|
type MaxPhoneLenByCountry = Record<string, number>;
|
|
@@ -47,6 +47,10 @@ type IntlPhoneInputProps = Partial<Omit<InputAutocompleteDesktopProps, 'onChange
|
|
|
47
47
|
ruNumberPriority?: boolean;
|
|
48
48
|
clear?: boolean;
|
|
49
49
|
};
|
|
50
|
+
/**
|
|
51
|
+
* @deprecated
|
|
52
|
+
* use InternationalPhoneInput instead
|
|
53
|
+
*/
|
|
50
54
|
declare const IntlPhoneInput: React.ForwardRefExoticComponent<Partial<Omit<InputAutocompleteDesktopProps, "onChange">> & Pick<SelectProps, "preventFlip"> & {
|
|
51
55
|
/**
|
|
52
56
|
* Значение
|
package/esm/component.js
CHANGED
|
@@ -17,7 +17,7 @@ import '@alfalab/core-components-select/esm/desktop';
|
|
|
17
17
|
import '@alfalab/core-components-select/esm/shared';
|
|
18
18
|
import './components/select-field/component.js';
|
|
19
19
|
|
|
20
|
-
var styles = {"addons":"intl-phone-
|
|
20
|
+
var styles = {"addons":"intl-phone-input__addons_e7tum","l":"intl-phone-input__l_e7tum","xl":"intl-phone-input__xl_e7tum","flagIconWrapper":"intl-phone-input__flagIconWrapper_e7tum","emptyCountryIcon":"intl-phone-input__emptyCountryIcon_e7tum"};
|
|
21
21
|
require('./index.css')
|
|
22
22
|
|
|
23
23
|
var countriesHash = getCountriesHash();
|
|
@@ -25,6 +25,10 @@ var MAX_DIAL_CODE_LENGTH = 4;
|
|
|
25
25
|
var MASK_SYMBOLS = [' ', '-', '(', ')'];
|
|
26
26
|
var MAX_PHONE_LEN = 15;
|
|
27
27
|
var DEFAULT_MAX_PHONE_LEN_BY_COUNTRY = { RU: 11 };
|
|
28
|
+
/**
|
|
29
|
+
* @deprecated
|
|
30
|
+
* use InternationalPhoneInput instead
|
|
31
|
+
*/
|
|
28
32
|
var IntlPhoneInput = forwardRef(function (_a, ref) {
|
|
29
33
|
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"]);
|
|
30
34
|
var _r = useState(defaultCountryIso2.toLowerCase()), countryIso2 = _r[0], setCountryIso2 = _r[1];
|
|
@@ -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_2xcez","flagPlaceholder":"intl-phone-input__flagPlaceholder_2xcez"};
|
|
6
6
|
require('./index.css')
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1ihbn */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-specialbg-tertiary-transparent: rgba(11, 31, 53, 0.1); /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -17,10 +17,10 @@
|
|
|
17
17
|
--gap-3xs: 2px;
|
|
18
18
|
} :root {
|
|
19
19
|
} :root {
|
|
20
|
-
} .intl-phone-
|
|
20
|
+
} .intl-phone-input__flagIcon_2xcez {
|
|
21
21
|
max-width: 24px;
|
|
22
22
|
max-height: 24px;
|
|
23
|
-
} .intl-phone-
|
|
23
|
+
} .intl-phone-input__flagPlaceholder_2xcez {
|
|
24
24
|
width: 24px;
|
|
25
25
|
height: 16px;
|
|
26
26
|
max-height: 16px;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
import { SelectDesktopProps } from "
|
|
2
|
+
import { SelectDesktopProps } from "@alfalab/core-components-select/desktop";
|
|
3
3
|
import { Country } from '@alfalab/utils';
|
|
4
4
|
type CountriesSelectProps = Pick<SelectDesktopProps, 'size' | 'dataTestId' | 'disabled' | 'onChange' | 'preventFlip'> & {
|
|
5
5
|
selected?: string;
|
|
@@ -10,7 +10,7 @@ import 'react-merge-refs';
|
|
|
10
10
|
import '@alfalab/hooks';
|
|
11
11
|
import '@alfalab/icons-glyph/WorldMagnifierMIcon';
|
|
12
12
|
|
|
13
|
-
var styles = {"component":"intl-phone-
|
|
13
|
+
var styles = {"component":"intl-phone-input__component_hzs0z","option":"intl-phone-input__option_hzs0z","flag":"intl-phone-input__flag_hzs0z","countryName":"intl-phone-input__countryName_hzs0z","dialCode":"intl-phone-input__dialCode_hzs0z"};
|
|
14
14
|
require('./index.css')
|
|
15
15
|
|
|
16
16
|
var CountriesSelect = function (_a) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1qlnd */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-text-secondary: rgba(60, 60, 67, 0.66); /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -17,19 +17,19 @@
|
|
|
17
17
|
} :root {
|
|
18
18
|
} :root {
|
|
19
19
|
--text-secondary-color: var(--color-light-text-secondary);
|
|
20
|
-
} .intl-phone-
|
|
20
|
+
} .intl-phone-input__component_hzs0z {
|
|
21
21
|
position: static;
|
|
22
22
|
display: flex;
|
|
23
23
|
min-width: initial;
|
|
24
24
|
height: 100%;
|
|
25
|
-
} .intl-phone-
|
|
25
|
+
} .intl-phone-input__option_hzs0z {
|
|
26
26
|
display: flex;
|
|
27
27
|
align-items: flex-start;
|
|
28
|
-
} .intl-phone-
|
|
28
|
+
} .intl-phone-input__flag_hzs0z {
|
|
29
29
|
flex-shrink: 0;
|
|
30
30
|
margin-right: var(--gap-xs);
|
|
31
|
-
} .intl-phone-
|
|
31
|
+
} .intl-phone-input__countryName_hzs0z {
|
|
32
32
|
margin-right: var(--gap-xs);
|
|
33
|
-
} .intl-phone-
|
|
33
|
+
} .intl-phone-input__dialCode_hzs0z {
|
|
34
34
|
color: var(--text-secondary-color);
|
|
35
35
|
}
|
|
@@ -7,7 +7,7 @@ import WorldMagnifierMIcon from '@alfalab/icons-glyph/WorldMagnifierMIcon';
|
|
|
7
7
|
import { FlagIcon } from '../flag-icon/component.js';
|
|
8
8
|
import '../flag-icon/flagSprite.js';
|
|
9
9
|
|
|
10
|
-
var styles = {"component":"intl-phone-
|
|
10
|
+
var styles = {"component":"intl-phone-input__component_1tcco","flagIconContainer":"intl-phone-input__flagIconContainer_1tcco","emptyCountryIcon":"intl-phone-input__emptyCountryIcon_1tcco","disabled":"intl-phone-input__disabled_1tcco","inner":"intl-phone-input__inner_1tcco","l":"intl-phone-input__l_1tcco","xl":"intl-phone-input__xl_1tcco","focusVisible":"intl-phone-input__focusVisible_1tcco"};
|
|
11
11
|
require('./index.css')
|
|
12
12
|
|
|
13
13
|
var EMPTY_COUNTRY_SELECT_FIELD = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 15soz */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-border-link: #0072ef;
|
|
@@ -21,33 +21,33 @@
|
|
|
21
21
|
} :root {
|
|
22
22
|
--focus-color: var(--color-light-border-link);
|
|
23
23
|
--disabled-cursor: not-allowed;
|
|
24
|
-
} .intl-phone-
|
|
24
|
+
} .intl-phone-input__component_1tcco {
|
|
25
25
|
height: 100%;
|
|
26
26
|
cursor: pointer;
|
|
27
27
|
outline: none;
|
|
28
28
|
position: relative;
|
|
29
|
-
} .intl-phone-
|
|
29
|
+
} .intl-phone-input__flagIconContainer_1tcco {
|
|
30
30
|
display: flex;
|
|
31
31
|
justify-content: center;
|
|
32
32
|
align-items: center;
|
|
33
33
|
width: 24px;
|
|
34
34
|
height: 24px;
|
|
35
35
|
margin-right: var(--gap-2xs);
|
|
36
|
-
} .intl-phone-
|
|
36
|
+
} .intl-phone-input__emptyCountryIcon_1tcco {
|
|
37
37
|
color: var(--color-light-graphic-secondary);
|
|
38
|
-
} .intl-phone-
|
|
38
|
+
} .intl-phone-input__disabled_1tcco {
|
|
39
39
|
cursor: var(--disabled-cursor);
|
|
40
|
-
} .intl-phone-
|
|
40
|
+
} .intl-phone-input__inner_1tcco {
|
|
41
41
|
position: relative;
|
|
42
42
|
display: flex;
|
|
43
43
|
align-items: center;
|
|
44
44
|
height: 100%;
|
|
45
45
|
padding-left: var(--gap-s);
|
|
46
46
|
outline: none;
|
|
47
|
-
} .intl-phone-
|
|
48
|
-
.intl-phone-
|
|
47
|
+
} .intl-phone-input__l_1tcco .intl-phone-input__inner_1tcco,
|
|
48
|
+
.intl-phone-input__xl_1tcco .intl-phone-input__inner_1tcco {
|
|
49
49
|
padding-left: var(--gap-m);
|
|
50
|
-
} .intl-phone-
|
|
50
|
+
} .intl-phone-input__focusVisible_1tcco {
|
|
51
51
|
outline: 2px solid var(--focus-color);
|
|
52
52
|
outline-offset: 2px;
|
|
53
53
|
}
|
package/esm/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 2pmd0 */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-graphic-secondary: #86868a; /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -16,17 +16,17 @@
|
|
|
16
16
|
--gap-s: 12px;
|
|
17
17
|
} :root {
|
|
18
18
|
} :root {
|
|
19
|
-
} .intl-phone-
|
|
19
|
+
} .intl-phone-input__addons_e7tum {
|
|
20
20
|
padding-left: 0;
|
|
21
|
-
} .intl-phone-
|
|
21
|
+
} .intl-phone-input__l_e7tum .intl-phone-input__addons_e7tum, .intl-phone-input__xl_e7tum .intl-phone-input__addons_e7tum {
|
|
22
22
|
padding-left: 0;
|
|
23
|
-
} .intl-phone-
|
|
23
|
+
} .intl-phone-input__flagIconWrapper_e7tum {
|
|
24
24
|
display: flex;
|
|
25
25
|
justify-content: center;
|
|
26
26
|
align-items: center;
|
|
27
27
|
width: 24px;
|
|
28
28
|
height: 24px;
|
|
29
29
|
margin-left: var(--gap-s);
|
|
30
|
-
} .intl-phone-
|
|
30
|
+
} .intl-phone-input__emptyCountryIcon_e7tum {
|
|
31
31
|
color: var(--color-light-graphic-secondary);
|
|
32
32
|
}
|
package/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 2pmd0 */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-graphic-secondary: #86868a; /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -16,17 +16,17 @@
|
|
|
16
16
|
--gap-s: 12px;
|
|
17
17
|
} :root {
|
|
18
18
|
} :root {
|
|
19
|
-
} .intl-phone-
|
|
19
|
+
} .intl-phone-input__addons_e7tum {
|
|
20
20
|
padding-left: 0;
|
|
21
|
-
} .intl-phone-
|
|
21
|
+
} .intl-phone-input__l_e7tum .intl-phone-input__addons_e7tum, .intl-phone-input__xl_e7tum .intl-phone-input__addons_e7tum {
|
|
22
22
|
padding-left: 0;
|
|
23
|
-
} .intl-phone-
|
|
23
|
+
} .intl-phone-input__flagIconWrapper_e7tum {
|
|
24
24
|
display: flex;
|
|
25
25
|
justify-content: center;
|
|
26
26
|
align-items: center;
|
|
27
27
|
width: 24px;
|
|
28
28
|
height: 24px;
|
|
29
29
|
margin-left: var(--gap-s);
|
|
30
|
-
} .intl-phone-
|
|
30
|
+
} .intl-phone-input__emptyCountryIcon_e7tum {
|
|
31
31
|
color: var(--color-light-graphic-secondary);
|
|
32
32
|
}
|
package/modern/component.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { CountryCode } from 'libphonenumber-js';
|
|
4
|
-
import { InputAutocompleteDesktopProps } from "
|
|
4
|
+
import { InputAutocompleteDesktopProps } from "@alfalab/core-components-input-autocomplete/desktop";
|
|
5
5
|
import { SelectProps } from "@alfalab/core-components-select";
|
|
6
6
|
import { Country } from '@alfalab/utils';
|
|
7
7
|
type MaxPhoneLenByCountry = Record<string, number>;
|
|
@@ -47,6 +47,10 @@ type IntlPhoneInputProps = Partial<Omit<InputAutocompleteDesktopProps, 'onChange
|
|
|
47
47
|
ruNumberPriority?: boolean;
|
|
48
48
|
clear?: boolean;
|
|
49
49
|
};
|
|
50
|
+
/**
|
|
51
|
+
* @deprecated
|
|
52
|
+
* use InternationalPhoneInput instead
|
|
53
|
+
*/
|
|
50
54
|
declare const IntlPhoneInput: React.ForwardRefExoticComponent<Partial<Omit<InputAutocompleteDesktopProps, "onChange">> & Pick<SelectProps, "preventFlip"> & {
|
|
51
55
|
/**
|
|
52
56
|
* Значение
|
package/modern/component.js
CHANGED
|
@@ -16,7 +16,7 @@ import '@alfalab/core-components-select/modern/desktop';
|
|
|
16
16
|
import '@alfalab/core-components-select/modern/shared';
|
|
17
17
|
import './components/select-field/component.js';
|
|
18
18
|
|
|
19
|
-
const styles = {"addons":"intl-phone-
|
|
19
|
+
const styles = {"addons":"intl-phone-input__addons_e7tum","l":"intl-phone-input__l_e7tum","xl":"intl-phone-input__xl_e7tum","flagIconWrapper":"intl-phone-input__flagIconWrapper_e7tum","emptyCountryIcon":"intl-phone-input__emptyCountryIcon_e7tum"};
|
|
20
20
|
require('./index.css')
|
|
21
21
|
|
|
22
22
|
const countriesHash = getCountriesHash();
|
|
@@ -24,6 +24,10 @@ const MAX_DIAL_CODE_LENGTH = 4;
|
|
|
24
24
|
const MASK_SYMBOLS = [' ', '-', '(', ')'];
|
|
25
25
|
const MAX_PHONE_LEN = 15;
|
|
26
26
|
const DEFAULT_MAX_PHONE_LEN_BY_COUNTRY = { RU: 11 };
|
|
27
|
+
/**
|
|
28
|
+
* @deprecated
|
|
29
|
+
* use InternationalPhoneInput instead
|
|
30
|
+
*/
|
|
27
31
|
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) => {
|
|
28
32
|
const [countryIso2, setCountryIso2] = useState(defaultCountryIso2.toLowerCase());
|
|
29
33
|
const inputRef = useRef(null);
|
|
@@ -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_2xcez","flagPlaceholder":"intl-phone-input__flagPlaceholder_2xcez"};
|
|
6
6
|
require('./index.css')
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1ihbn */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-specialbg-tertiary-transparent: rgba(11, 31, 53, 0.1); /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -17,10 +17,10 @@
|
|
|
17
17
|
--gap-3xs: 2px;
|
|
18
18
|
} :root {
|
|
19
19
|
} :root {
|
|
20
|
-
} .intl-phone-
|
|
20
|
+
} .intl-phone-input__flagIcon_2xcez {
|
|
21
21
|
max-width: 24px;
|
|
22
22
|
max-height: 24px;
|
|
23
|
-
} .intl-phone-
|
|
23
|
+
} .intl-phone-input__flagPlaceholder_2xcez {
|
|
24
24
|
width: 24px;
|
|
25
25
|
height: 16px;
|
|
26
26
|
max-height: 16px;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
import { SelectDesktopProps } from "
|
|
2
|
+
import { SelectDesktopProps } from "@alfalab/core-components-select/desktop";
|
|
3
3
|
import { Country } from '@alfalab/utils';
|
|
4
4
|
type CountriesSelectProps = Pick<SelectDesktopProps, 'size' | 'dataTestId' | 'disabled' | 'onChange' | 'preventFlip'> & {
|
|
5
5
|
selected?: string;
|
|
@@ -9,7 +9,7 @@ import 'react-merge-refs';
|
|
|
9
9
|
import '@alfalab/hooks';
|
|
10
10
|
import '@alfalab/icons-glyph/WorldMagnifierMIcon';
|
|
11
11
|
|
|
12
|
-
const styles = {"component":"intl-phone-
|
|
12
|
+
const styles = {"component":"intl-phone-input__component_hzs0z","option":"intl-phone-input__option_hzs0z","flag":"intl-phone-input__flag_hzs0z","countryName":"intl-phone-input__countryName_hzs0z","dialCode":"intl-phone-input__dialCode_hzs0z"};
|
|
13
13
|
require('./index.css')
|
|
14
14
|
|
|
15
15
|
/* eslint-disable jsx-a11y/no-static-element-interactions */
|