@alfalab/core-components-international-phone-input 2.7.0 → 2.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Component.responsive.d.ts +4 -4
- package/components/base-international-phone-input/Component.js +12 -2
- package/components/base-international-phone-input/index.css +6 -3
- package/components/country-select/Component.js +1 -1
- package/components/country-select/index.css +11 -8
- package/components/flag-icon/component.js +1 -1
- package/components/flag-icon/index.css +6 -3
- package/components/select-field/component.js +1 -1
- package/components/select-field/index.css +12 -9
- package/cssm/Component.responsive.d.ts +4 -4
- package/cssm/components/base-international-phone-input/Component.js +11 -1
- package/cssm/components/base-international-phone-input/index.module.css +4 -1
- package/cssm/components/country-select/index.module.css +3 -0
- package/cssm/components/flag-icon/index.module.css +3 -0
- package/cssm/components/select-field/index.module.css +3 -0
- package/cssm/index-464d40a4.d.ts +23 -0
- package/cssm/types.d.ts +1 -10
- package/cssm/typings-d515b24c.d.ts +1 -1
- package/cssm/use-skeleton-1328ead9.d.ts +7 -1
- package/cssm/utils/index.d.ts +3 -2
- package/cssm/utils/index.js +11 -5
- package/esm/Component.responsive.d.ts +4 -4
- package/esm/components/base-international-phone-input/Component.js +13 -3
- package/esm/components/base-international-phone-input/index.css +6 -3
- package/esm/components/country-select/Component.js +1 -1
- package/esm/components/country-select/index.css +11 -8
- package/esm/components/flag-icon/component.js +1 -1
- package/esm/components/flag-icon/index.css +6 -3
- package/esm/components/select-field/component.js +1 -1
- package/esm/components/select-field/index.css +12 -9
- package/esm/index-464d40a4.d.ts +23 -0
- package/esm/types.d.ts +1 -10
- package/esm/typings-d515b24c.d.ts +1 -1
- package/esm/use-skeleton-1328ead9.d.ts +7 -1
- package/esm/utils/index.d.ts +3 -2
- package/esm/utils/index.js +11 -5
- package/index-464d40a4.d.ts +23 -0
- package/modern/Component.responsive.d.ts +4 -4
- package/modern/components/base-international-phone-input/Component.js +11 -3
- package/modern/components/base-international-phone-input/index.css +6 -3
- package/modern/components/country-select/Component.js +1 -1
- package/modern/components/country-select/index.css +11 -8
- package/modern/components/flag-icon/component.js +1 -1
- package/modern/components/flag-icon/index.css +6 -3
- package/modern/components/select-field/component.js +1 -1
- package/modern/components/select-field/index.css +12 -9
- package/modern/index-464d40a4.d.ts +23 -0
- package/modern/types.d.ts +1 -10
- package/modern/typings-d515b24c.d.ts +1 -1
- package/modern/use-skeleton-1328ead9.d.ts +7 -1
- package/modern/utils/index.d.ts +3 -2
- package/modern/utils/index.js +9 -5
- package/moderncssm/Component.responsive.d.ts +4 -4
- package/moderncssm/components/base-international-phone-input/Component.js +10 -2
- package/moderncssm/index-464d40a4.d.ts +23 -0
- package/moderncssm/types.d.ts +1 -10
- package/moderncssm/typings-d515b24c.d.ts +1 -1
- package/moderncssm/use-skeleton-1328ead9.d.ts +7 -1
- package/moderncssm/utils/index.d.ts +3 -2
- package/moderncssm/utils/index.js +9 -5
- package/package.json +6 -6
- package/src/components/base-international-phone-input/Component.tsx +17 -1
- package/src/types.ts +3 -10
- package/src/utils/index.ts +16 -6
- package/types.d.ts +1 -10
- package/typings-d515b24c.d.ts +1 -1
- package/use-skeleton-1328ead9.d.ts +7 -1
- package/utils/index.d.ts +3 -2
- package/utils/index.js +11 -5
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from 'react';
|
|
3
3
|
declare const InternationalPhoneInput: React.ForwardRefExoticComponent<(({
|
|
4
|
-
country?: import("./
|
|
4
|
+
country?: import("./index-464d40a4").Country | undefined;
|
|
5
5
|
countries?: string[] | undefined;
|
|
6
6
|
defaultIso2?: string | undefined;
|
|
7
7
|
customCountriesList?: import("./index").CountriesData[] | undefined;
|
|
@@ -9,7 +9,7 @@ declare const InternationalPhoneInput: React.ForwardRefExoticComponent<(({
|
|
|
9
9
|
countrySelectProps?: import("./components/country-select/index").SharedCountrySelectProps | undefined;
|
|
10
10
|
clear?: boolean | undefined;
|
|
11
11
|
filterFn?: ((value: string | undefined, option: import("./typings-d515b24c").OptionShape) => boolean) | undefined;
|
|
12
|
-
onCountryChange?: ((country?: import("./
|
|
12
|
+
onCountryChange?: ((country?: import("./index-464d40a4").Country | undefined) => void) | undefined;
|
|
13
13
|
onChange?: ((phone: string) => void) | undefined;
|
|
14
14
|
onBlur?: ((event: React.FocusEvent<HTMLDivElement | HTMLInputElement, Element>) => void) | undefined;
|
|
15
15
|
onFocus?: ((event: React.FocusEvent<HTMLDivElement | HTMLInputElement, Element>) => void) | undefined;
|
|
@@ -22,7 +22,7 @@ declare const InternationalPhoneInput: React.ForwardRefExoticComponent<(({
|
|
|
22
22
|
client?: "desktop" | "mobile" | undefined;
|
|
23
23
|
defaultMatchMediaValue?: boolean | (() => boolean) | undefined;
|
|
24
24
|
}) | ({
|
|
25
|
-
country?: import("./
|
|
25
|
+
country?: import("./index-464d40a4").Country | undefined;
|
|
26
26
|
countries?: string[] | undefined;
|
|
27
27
|
defaultIso2?: string | undefined;
|
|
28
28
|
customCountriesList?: import("./index").CountriesData[] | undefined;
|
|
@@ -30,7 +30,7 @@ declare const InternationalPhoneInput: React.ForwardRefExoticComponent<(({
|
|
|
30
30
|
countrySelectProps?: import("./components/country-select/index").SharedCountrySelectProps | undefined;
|
|
31
31
|
clear?: boolean | undefined;
|
|
32
32
|
filterFn?: ((value: string | undefined, option: import("./typings-d515b24c").OptionShape) => boolean) | undefined;
|
|
33
|
-
onCountryChange?: ((country?: import("./
|
|
33
|
+
onCountryChange?: ((country?: import("./index-464d40a4").Country | undefined) => void) | undefined;
|
|
34
34
|
onChange?: ((phone: string) => void) | undefined;
|
|
35
35
|
onBlur?: ((event: React.FocusEvent<HTMLDivElement | HTMLInputElement, Element>) => void) | undefined;
|
|
36
36
|
onFocus?: ((event: React.FocusEvent<HTMLDivElement | HTMLInputElement, Element>) => void) | undefined;
|
|
@@ -8,6 +8,7 @@ var mergeRefs = require('react-merge-refs');
|
|
|
8
8
|
var core = require('@maskito/core');
|
|
9
9
|
var react = require('@maskito/react');
|
|
10
10
|
var shared = require('@alfalab/core-components-select/shared');
|
|
11
|
+
var coreComponentsShared = require('@alfalab/core-components-shared');
|
|
11
12
|
var utils_index = require('../../utils/index.js');
|
|
12
13
|
var components_countrySelect_Component = require('../country-select/Component.js');
|
|
13
14
|
|
|
@@ -16,11 +17,12 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
16
17
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
17
18
|
var mergeRefs__default = /*#__PURE__*/_interopDefaultCompat(mergeRefs);
|
|
18
19
|
|
|
19
|
-
var styles = {"component":"international-phone-
|
|
20
|
+
var styles = {"component":"international-phone-input__component_1ym8l","addons":"international-phone-input__addons_1ym8l"};
|
|
20
21
|
require('./index.css')
|
|
21
22
|
|
|
22
23
|
var BaseInternationalPhoneInput = React.forwardRef(function (_a, ref) {
|
|
23
24
|
var _b = _a.clearableCountryCode, clearableCountryCodeFromProps = _b === void 0 ? true : _b, value = _a.value, countryProp = _a.country, filterFn = _a.filterFn, onChange = _a.onChange, onCountryChange = _a.onCountryChange, countrySelectProps = _a.countrySelectProps, countries = _a.countries, defaultIso2 = _a.defaultIso2, disabled = _a.disabled, options = _a.options, _c = _a.size, size = _c === void 0 ? 56 : _c, Input = _a.Input, InputAutocomplete = _a.InputAutocomplete, SelectComponent = _a.SelectComponent, view = _a.view, clearProp = _a.clear, openProps = _a.open, defaultOpen = _a.defaultOpen, customCountriesList = _a.customCountriesList, restProps = tslib.__rest(_a, ["clearableCountryCode", "value", "country", "filterFn", "onChange", "onCountryChange", "countrySelectProps", "countries", "defaultIso2", "disabled", "options", "size", "Input", "InputAutocomplete", "SelectComponent", "view", "clear", "open", "defaultOpen", "customCountriesList"]);
|
|
25
|
+
var lastCountryRef = React.useRef(null);
|
|
24
26
|
var countriesData = React.useMemo(function () { return utils_index.initCountries(countries, customCountriesList); }, [countries, customCountriesList]);
|
|
25
27
|
var inputRef = React.useRef(null);
|
|
26
28
|
var inputWrapperRef = React.useRef(null);
|
|
@@ -38,7 +40,9 @@ var BaseInternationalPhoneInput = React.forwardRef(function (_a, ref) {
|
|
|
38
40
|
};
|
|
39
41
|
var preserveCountryCode = clearableCountryCodeFromProps === 'preserve';
|
|
40
42
|
var clearableCountryCode = preserveCountryCode || clearableCountryCodeFromProps;
|
|
41
|
-
var maskOptions = React.useMemo(function () {
|
|
43
|
+
var maskOptions = React.useMemo(function () {
|
|
44
|
+
return utils_index.createMaskOptions(country, clearableCountryCode, preserveCountryCode, lastCountryRef);
|
|
45
|
+
}, [country, clearableCountryCode, preserveCountryCode]);
|
|
42
46
|
var maskRef = react.useMaskito({ options: maskOptions });
|
|
43
47
|
var changeNumber = function (phone) {
|
|
44
48
|
onChange === null || onChange === void 0 ? void 0 : onChange(phone);
|
|
@@ -120,6 +124,12 @@ var BaseInternationalPhoneInput = React.forwardRef(function (_a, ref) {
|
|
|
120
124
|
return (React__default.default.createElement(components_countrySelect_Component.CountrySelect, tslib.__assign({ dataTestId: restProps === null || restProps === void 0 ? void 0 : restProps.dataTestId }, countrySelectProps, { view: view, SelectComponent: SelectComponent, disabled: disabled || (countrySelectProps === null || countrySelectProps === void 0 ? void 0 : countrySelectProps.disabled), onChange: handleSelectCountry, country: country, countries: compact ? [] : countriesData, fieldWidth: (_a = inputWrapperRef.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect().width, onOpen: handleCountrySelectOpen, open: showCountrySelect })));
|
|
121
125
|
};
|
|
122
126
|
var inputProps = tslib.__assign({ className: styles.component, ref: mergeRefs__default.default([maskRef, ref, inputRef]), wrapperRef: inputWrapperRef, addonsClassName: styles.addons, type: 'tel', clear: utils_index.getClear(clearProp, clearableCountryCode, value, country === null || country === void 0 ? void 0 : country.countryCode) }, restProps.inputProps);
|
|
127
|
+
React.useEffect(function () {
|
|
128
|
+
if (!preserveCountryCode || coreComponentsShared.isNullable(country)) {
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
lastCountryRef.current = country;
|
|
132
|
+
}, [country, preserveCountryCode]);
|
|
123
133
|
return Array.isArray(options) ? (React__default.default.createElement(InputAutocomplete, tslib.__assign({ closeOnSelect: true, Option: shared.BaseOption, size: size }, restProps, { disabled: disabled, options: filteredOptions, value: value, open: showPhoneSelect, onOpen: handlePhoneSelectOpen, onChange: handleOptionSelect, onInput: function (phone) { return updatePhoneData(phone); }, inputProps: tslib.__assign(tslib.__assign({}, inputProps), { onClear: handleClear, onInput: handleInput, leftAddons: renderCountrySelect(view === 'mobile') }), fieldProps: tslib.__assign(tslib.__assign(tslib.__assign({}, restProps.fieldProps), { className: inputProps.className, addonsClassName: inputProps.addonsClassName }), (view === 'mobile' ? { leftAddons: renderCountrySelect() } : null)) }))) : (React__default.default.createElement(Input, tslib.__assign({}, restProps, inputProps, { onClear: inputProps.clear ? handleClear : undefined, leftAddons: renderCountrySelect(), size: size, onInput: handleInput, value: value, disabled: disabled })));
|
|
124
134
|
});
|
|
125
135
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1d659 */
|
|
2
2
|
:root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
3
3
|
} /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
4
4
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* 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,9 +16,12 @@
|
|
|
16
16
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* 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
17
|
|
|
18
18
|
/* новые значения, используйте их */
|
|
19
|
-
|
|
19
|
+
|
|
20
|
+
/* no-unit может приводить к проблемам в calc (#1559) */
|
|
21
|
+
/* stylelint-disable-next-line length-zero-no-unit */
|
|
22
|
+
--gap-0: 0px;
|
|
20
23
|
} :root {
|
|
21
24
|
} :root {
|
|
22
|
-
} /* сбрасывает синюю подсветку при нажатии */ .international-phone-
|
|
25
|
+
} /* сбрасывает синюю подсветку при нажатии */ .international-phone-input__component_1ym8l .international-phone-input__addons_1ym8l {
|
|
23
26
|
padding-left: var(--gap-0);
|
|
24
27
|
}
|
|
@@ -14,7 +14,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
14
14
|
|
|
15
15
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
16
16
|
|
|
17
|
-
var styles = {"component":"international-phone-
|
|
17
|
+
var styles = {"component":"international-phone-input__component_4sw1e","option":"international-phone-input__option_4sw1e","flag":"international-phone-input__flag_4sw1e","countryName":"international-phone-input__countryName_4sw1e","dialCode":"international-phone-input__dialCode_4sw1e","flagIconWrapper":"international-phone-input__flagIconWrapper_4sw1e","emptyCountryIcon":"international-phone-input__emptyCountryIcon_4sw1e"};
|
|
18
18
|
require('./index.css')
|
|
19
19
|
|
|
20
20
|
var CountrySelect = function (_a) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: no31x */
|
|
2
2
|
:root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-neutral-translucent-700: rgba(4, 4, 21, 0.47);
|
|
@@ -20,33 +20,36 @@
|
|
|
20
20
|
--gap-s: 12px; /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
21
21
|
|
|
22
22
|
/* новые значения, используйте их */
|
|
23
|
+
|
|
24
|
+
/* no-unit может приводить к проблемам в calc (#1559) */
|
|
25
|
+
/* stylelint-disable-next-line length-zero-no-unit */
|
|
23
26
|
--gap-8: var(--gap-xs);
|
|
24
27
|
--gap-12: var(--gap-s);
|
|
25
28
|
} :root {
|
|
26
29
|
} :root {
|
|
27
|
-
} /* сбрасывает синюю подсветку при нажатии */ .international-phone-
|
|
30
|
+
} /* сбрасывает синюю подсветку при нажатии */ .international-phone-input__component_4sw1e {
|
|
28
31
|
position: static;
|
|
29
32
|
display: flex;
|
|
30
33
|
min-width: initial;
|
|
31
34
|
height: 100%;
|
|
32
|
-
} .international-phone-
|
|
35
|
+
} .international-phone-input__option_4sw1e {
|
|
33
36
|
display: flex;
|
|
34
37
|
align-items: flex-start;
|
|
35
38
|
padding: var(--gap-12);
|
|
36
|
-
} .international-phone-
|
|
39
|
+
} .international-phone-input__flag_4sw1e {
|
|
37
40
|
flex-shrink: 0;
|
|
38
41
|
margin-right: var(--gap-8);
|
|
39
|
-
} .international-phone-
|
|
42
|
+
} .international-phone-input__countryName_4sw1e {
|
|
40
43
|
margin-right: var(--gap-8);
|
|
41
|
-
} .international-phone-
|
|
44
|
+
} .international-phone-input__dialCode_4sw1e {
|
|
42
45
|
color: var(--color-light-text-secondary);
|
|
43
|
-
} .international-phone-
|
|
46
|
+
} .international-phone-input__flagIconWrapper_4sw1e {
|
|
44
47
|
display: flex;
|
|
45
48
|
justify-content: center;
|
|
46
49
|
align-items: center;
|
|
47
50
|
width: 24px;
|
|
48
51
|
height: 24px;
|
|
49
52
|
margin-left: var(--gap-12);
|
|
50
|
-
} .international-phone-
|
|
53
|
+
} .international-phone-input__emptyCountryIcon_4sw1e {
|
|
51
54
|
color: var(--color-light-neutral-translucent-700);
|
|
52
55
|
}
|
|
@@ -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":"international-phone-
|
|
14
|
+
var styles = {"flagIcon":"international-phone-input__flagIcon_8f693","flagPlaceholder":"international-phone-input__flagPlaceholder_8f693"};
|
|
15
15
|
require('./index.css')
|
|
16
16
|
|
|
17
17
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: ewuu4 */
|
|
2
2
|
:root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-neutral-translucent-100: rgba(38, 55, 88, 0.06); /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -20,13 +20,16 @@
|
|
|
20
20
|
--gap-3xs: 2px; /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
21
21
|
|
|
22
22
|
/* новые значения, используйте их */
|
|
23
|
+
|
|
24
|
+
/* no-unit может приводить к проблемам в calc (#1559) */
|
|
25
|
+
/* stylelint-disable-next-line length-zero-no-unit */
|
|
23
26
|
--gap-2: var(--gap-3xs);
|
|
24
27
|
} :root {
|
|
25
28
|
} :root {
|
|
26
|
-
} /* сбрасывает синюю подсветку при нажатии */ .international-phone-
|
|
29
|
+
} /* сбрасывает синюю подсветку при нажатии */ .international-phone-input__flagIcon_8f693 {
|
|
27
30
|
max-width: 24px;
|
|
28
31
|
max-height: 24px;
|
|
29
|
-
} .international-phone-
|
|
32
|
+
} .international-phone-input__flagPlaceholder_8f693 {
|
|
30
33
|
width: 24px;
|
|
31
34
|
height: 16px;
|
|
32
35
|
max-height: 16px;
|
|
@@ -16,7 +16,7 @@ var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
|
16
16
|
var mergeRefs__default = /*#__PURE__*/_interopDefaultCompat(mergeRefs);
|
|
17
17
|
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
18
18
|
|
|
19
|
-
var styles = {"component":"international-phone-
|
|
19
|
+
var styles = {"component":"international-phone-input__component_66s35","flagIconContainer":"international-phone-input__flagIconContainer_66s35","emptyCountryIcon":"international-phone-input__emptyCountryIcon_66s35","disabled":"international-phone-input__disabled_66s35","inner":"international-phone-input__inner_66s35","size-64":"international-phone-input__size-64_66s35","size-72":"international-phone-input__size-72_66s35","focusVisible":"international-phone-input__focusVisible_66s35"};
|
|
20
20
|
require('./index.css')
|
|
21
21
|
|
|
22
22
|
var EMPTY_COUNTRY_SELECT_FIELD = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: gc6oa */
|
|
2
2
|
:root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-neutral-translucent-700: rgba(4, 4, 21, 0.47);
|
|
@@ -21,6 +21,9 @@
|
|
|
21
21
|
--gap-m: 16px; /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
22
22
|
|
|
23
23
|
/* новые значения, используйте их */
|
|
24
|
+
|
|
25
|
+
/* no-unit может приводить к проблемам в calc (#1559) */
|
|
26
|
+
/* stylelint-disable-next-line length-zero-no-unit */
|
|
24
27
|
--gap-4: var(--gap-2xs);
|
|
25
28
|
--gap-12: var(--gap-s);
|
|
26
29
|
--gap-16: var(--gap-m);
|
|
@@ -28,33 +31,33 @@
|
|
|
28
31
|
} :root {
|
|
29
32
|
--focus-color: var(--color-light-status-info);
|
|
30
33
|
--disabled-cursor: not-allowed;
|
|
31
|
-
} /* сбрасывает синюю подсветку при нажатии */ .international-phone-
|
|
34
|
+
} /* сбрасывает синюю подсветку при нажатии */ .international-phone-input__component_66s35 {
|
|
32
35
|
height: 100%;
|
|
33
36
|
cursor: pointer;
|
|
34
37
|
outline: none;
|
|
35
38
|
position: relative;
|
|
36
|
-
} .international-phone-
|
|
39
|
+
} .international-phone-input__flagIconContainer_66s35 {
|
|
37
40
|
display: flex;
|
|
38
41
|
justify-content: center;
|
|
39
42
|
align-items: center;
|
|
40
43
|
width: 24px;
|
|
41
44
|
height: 24px;
|
|
42
45
|
margin-right: var(--gap-4);
|
|
43
|
-
} .international-phone-
|
|
46
|
+
} .international-phone-input__emptyCountryIcon_66s35 {
|
|
44
47
|
color: var(--color-light-neutral-translucent-700);
|
|
45
|
-
} .international-phone-
|
|
48
|
+
} .international-phone-input__disabled_66s35 {
|
|
46
49
|
cursor: var(--disabled-cursor);
|
|
47
|
-
} .international-phone-
|
|
50
|
+
} .international-phone-input__inner_66s35 {
|
|
48
51
|
position: relative;
|
|
49
52
|
display: flex;
|
|
50
53
|
align-items: center;
|
|
51
54
|
height: 100%;
|
|
52
55
|
padding-left: var(--gap-12);
|
|
53
56
|
outline: none;
|
|
54
|
-
} .international-phone-input__size-
|
|
55
|
-
.international-phone-input__size-
|
|
57
|
+
} .international-phone-input__size-64_66s35 .international-phone-input__inner_66s35,
|
|
58
|
+
.international-phone-input__size-72_66s35 .international-phone-input__inner_66s35 {
|
|
56
59
|
padding-left: var(--gap-16);
|
|
57
|
-
} .international-phone-
|
|
60
|
+
} .international-phone-input__focusVisible_66s35 {
|
|
58
61
|
outline: 2px solid var(--focus-color);
|
|
59
62
|
outline-offset: 2px;
|
|
60
63
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from 'react';
|
|
3
3
|
declare const InternationalPhoneInput: React.ForwardRefExoticComponent<(({
|
|
4
|
-
country?: import("./
|
|
4
|
+
country?: import("./index-464d40a4").Country | undefined;
|
|
5
5
|
countries?: string[] | undefined;
|
|
6
6
|
defaultIso2?: string | undefined;
|
|
7
7
|
customCountriesList?: import("./index").CountriesData[] | undefined;
|
|
@@ -9,7 +9,7 @@ declare const InternationalPhoneInput: React.ForwardRefExoticComponent<(({
|
|
|
9
9
|
countrySelectProps?: import("./components/country-select/index").SharedCountrySelectProps | undefined;
|
|
10
10
|
clear?: boolean | undefined;
|
|
11
11
|
filterFn?: ((value: string | undefined, option: import("./typings-d515b24c").OptionShape) => boolean) | undefined;
|
|
12
|
-
onCountryChange?: ((country?: import("./
|
|
12
|
+
onCountryChange?: ((country?: import("./index-464d40a4").Country | undefined) => void) | undefined;
|
|
13
13
|
onChange?: ((phone: string) => void) | undefined;
|
|
14
14
|
onBlur?: ((event: React.FocusEvent<HTMLDivElement | HTMLInputElement, Element>) => void) | undefined;
|
|
15
15
|
onFocus?: ((event: React.FocusEvent<HTMLDivElement | HTMLInputElement, Element>) => void) | undefined;
|
|
@@ -22,7 +22,7 @@ declare const InternationalPhoneInput: React.ForwardRefExoticComponent<(({
|
|
|
22
22
|
client?: "desktop" | "mobile" | undefined;
|
|
23
23
|
defaultMatchMediaValue?: boolean | (() => boolean) | undefined;
|
|
24
24
|
}) | ({
|
|
25
|
-
country?: import("./
|
|
25
|
+
country?: import("./index-464d40a4").Country | undefined;
|
|
26
26
|
countries?: string[] | undefined;
|
|
27
27
|
defaultIso2?: string | undefined;
|
|
28
28
|
customCountriesList?: import("./index").CountriesData[] | undefined;
|
|
@@ -30,7 +30,7 @@ declare const InternationalPhoneInput: React.ForwardRefExoticComponent<(({
|
|
|
30
30
|
countrySelectProps?: import("./components/country-select/index").SharedCountrySelectProps | undefined;
|
|
31
31
|
clear?: boolean | undefined;
|
|
32
32
|
filterFn?: ((value: string | undefined, option: import("./typings-d515b24c").OptionShape) => boolean) | undefined;
|
|
33
|
-
onCountryChange?: ((country?: import("./
|
|
33
|
+
onCountryChange?: ((country?: import("./index-464d40a4").Country | undefined) => void) | undefined;
|
|
34
34
|
onChange?: ((phone: string) => void) | undefined;
|
|
35
35
|
onBlur?: ((event: React.FocusEvent<HTMLDivElement | HTMLInputElement, Element>) => void) | undefined;
|
|
36
36
|
onFocus?: ((event: React.FocusEvent<HTMLDivElement | HTMLInputElement, Element>) => void) | undefined;
|
|
@@ -8,6 +8,7 @@ var mergeRefs = require('react-merge-refs');
|
|
|
8
8
|
var core = require('@maskito/core');
|
|
9
9
|
var react = require('@maskito/react');
|
|
10
10
|
var shared = require('@alfalab/core-components-select/cssm/shared');
|
|
11
|
+
var coreComponentsShared = require('@alfalab/core-components-shared/cssm');
|
|
11
12
|
var utils_index = require('../../utils/index.js');
|
|
12
13
|
var components_countrySelect_Component = require('../country-select/Component.js');
|
|
13
14
|
var styles = require('./index.module.css');
|
|
@@ -20,6 +21,7 @@ var styles__default = /*#__PURE__*/_interopDefaultCompat(styles);
|
|
|
20
21
|
|
|
21
22
|
var BaseInternationalPhoneInput = React.forwardRef(function (_a, ref) {
|
|
22
23
|
var _b = _a.clearableCountryCode, clearableCountryCodeFromProps = _b === void 0 ? true : _b, value = _a.value, countryProp = _a.country, filterFn = _a.filterFn, onChange = _a.onChange, onCountryChange = _a.onCountryChange, countrySelectProps = _a.countrySelectProps, countries = _a.countries, defaultIso2 = _a.defaultIso2, disabled = _a.disabled, options = _a.options, _c = _a.size, size = _c === void 0 ? 56 : _c, Input = _a.Input, InputAutocomplete = _a.InputAutocomplete, SelectComponent = _a.SelectComponent, view = _a.view, clearProp = _a.clear, openProps = _a.open, defaultOpen = _a.defaultOpen, customCountriesList = _a.customCountriesList, restProps = tslib.__rest(_a, ["clearableCountryCode", "value", "country", "filterFn", "onChange", "onCountryChange", "countrySelectProps", "countries", "defaultIso2", "disabled", "options", "size", "Input", "InputAutocomplete", "SelectComponent", "view", "clear", "open", "defaultOpen", "customCountriesList"]);
|
|
24
|
+
var lastCountryRef = React.useRef(null);
|
|
23
25
|
var countriesData = React.useMemo(function () { return utils_index.initCountries(countries, customCountriesList); }, [countries, customCountriesList]);
|
|
24
26
|
var inputRef = React.useRef(null);
|
|
25
27
|
var inputWrapperRef = React.useRef(null);
|
|
@@ -37,7 +39,9 @@ var BaseInternationalPhoneInput = React.forwardRef(function (_a, ref) {
|
|
|
37
39
|
};
|
|
38
40
|
var preserveCountryCode = clearableCountryCodeFromProps === 'preserve';
|
|
39
41
|
var clearableCountryCode = preserveCountryCode || clearableCountryCodeFromProps;
|
|
40
|
-
var maskOptions = React.useMemo(function () {
|
|
42
|
+
var maskOptions = React.useMemo(function () {
|
|
43
|
+
return utils_index.createMaskOptions(country, clearableCountryCode, preserveCountryCode, lastCountryRef);
|
|
44
|
+
}, [country, clearableCountryCode, preserveCountryCode]);
|
|
41
45
|
var maskRef = react.useMaskito({ options: maskOptions });
|
|
42
46
|
var changeNumber = function (phone) {
|
|
43
47
|
onChange === null || onChange === void 0 ? void 0 : onChange(phone);
|
|
@@ -119,6 +123,12 @@ var BaseInternationalPhoneInput = React.forwardRef(function (_a, ref) {
|
|
|
119
123
|
return (React__default.default.createElement(components_countrySelect_Component.CountrySelect, tslib.__assign({ dataTestId: restProps === null || restProps === void 0 ? void 0 : restProps.dataTestId }, countrySelectProps, { view: view, SelectComponent: SelectComponent, disabled: disabled || (countrySelectProps === null || countrySelectProps === void 0 ? void 0 : countrySelectProps.disabled), onChange: handleSelectCountry, country: country, countries: compact ? [] : countriesData, fieldWidth: (_a = inputWrapperRef.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect().width, onOpen: handleCountrySelectOpen, open: showCountrySelect })));
|
|
120
124
|
};
|
|
121
125
|
var inputProps = tslib.__assign({ className: styles__default.default.component, ref: mergeRefs__default.default([maskRef, ref, inputRef]), wrapperRef: inputWrapperRef, addonsClassName: styles__default.default.addons, type: 'tel', clear: utils_index.getClear(clearProp, clearableCountryCode, value, country === null || country === void 0 ? void 0 : country.countryCode) }, restProps.inputProps);
|
|
126
|
+
React.useEffect(function () {
|
|
127
|
+
if (!preserveCountryCode || coreComponentsShared.isNullable(country)) {
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
lastCountryRef.current = country;
|
|
131
|
+
}, [country, preserveCountryCode]);
|
|
122
132
|
return Array.isArray(options) ? (React__default.default.createElement(InputAutocomplete, tslib.__assign({ closeOnSelect: true, Option: shared.BaseOption, size: size }, restProps, { disabled: disabled, options: filteredOptions, value: value, open: showPhoneSelect, onOpen: handlePhoneSelectOpen, onChange: handleOptionSelect, onInput: function (phone) { return updatePhoneData(phone); }, inputProps: tslib.__assign(tslib.__assign({}, inputProps), { onClear: handleClear, onInput: handleInput, leftAddons: renderCountrySelect(view === 'mobile') }), fieldProps: tslib.__assign(tslib.__assign(tslib.__assign({}, restProps.fieldProps), { className: inputProps.className, addonsClassName: inputProps.addonsClassName }), (view === 'mobile' ? { leftAddons: renderCountrySelect() } : null)) }))) : (React__default.default.createElement(Input, tslib.__assign({}, restProps, inputProps, { onClear: inputProps.clear ? handleClear : undefined, leftAddons: renderCountrySelect(), size: size, onInput: handleInput, value: value, disabled: disabled })));
|
|
123
133
|
});
|
|
124
134
|
|
|
@@ -15,7 +15,10 @@
|
|
|
15
15
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* 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
16
|
|
|
17
17
|
/* новые значения, используйте их */
|
|
18
|
-
|
|
18
|
+
|
|
19
|
+
/* no-unit может приводить к проблемам в calc (#1559) */
|
|
20
|
+
/* stylelint-disable-next-line length-zero-no-unit */
|
|
21
|
+
--gap-0: 0px;
|
|
19
22
|
} :root {
|
|
20
23
|
} :root {
|
|
21
24
|
} /* сбрасывает синюю подсветку при нажатии */ .component .addons {
|
|
@@ -19,6 +19,9 @@
|
|
|
19
19
|
--gap-s: 12px; /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
20
20
|
|
|
21
21
|
/* новые значения, используйте их */
|
|
22
|
+
|
|
23
|
+
/* no-unit может приводить к проблемам в calc (#1559) */
|
|
24
|
+
/* stylelint-disable-next-line length-zero-no-unit */
|
|
22
25
|
--gap-8: var(--gap-xs);
|
|
23
26
|
--gap-12: var(--gap-s);
|
|
24
27
|
} :root {
|
|
@@ -19,6 +19,9 @@
|
|
|
19
19
|
--gap-3xs: 2px; /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
20
20
|
|
|
21
21
|
/* новые значения, используйте их */
|
|
22
|
+
|
|
23
|
+
/* no-unit может приводить к проблемам в calc (#1559) */
|
|
24
|
+
/* stylelint-disable-next-line length-zero-no-unit */
|
|
22
25
|
--gap-2: var(--gap-3xs);
|
|
23
26
|
} :root {
|
|
24
27
|
} :root {
|
|
@@ -20,6 +20,9 @@
|
|
|
20
20
|
--gap-m: 16px; /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
21
21
|
|
|
22
22
|
/* новые значения, используйте их */
|
|
23
|
+
|
|
24
|
+
/* no-unit может приводить к проблемам в calc (#1559) */
|
|
25
|
+
/* stylelint-disable-next-line length-zero-no-unit */
|
|
23
26
|
--gap-4: var(--gap-2xs);
|
|
24
27
|
--gap-12: var(--gap-s);
|
|
25
28
|
--gap-16: var(--gap-m);
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
type BackgroundColorType = 'accent' | 'info' | 'attention-muted' | 'positive-muted' | 'negative-muted' | 'primary' | 'primary-inverted' | 'secondary' | 'secondary-inverted' | 'tertiary' | 'tertiary-inverted' | 'quaternary' | 'quaternary-inverted' | 'specialbg-component' | 'specialbg-component-inverted' | 'specialbg-primary-grouped' | 'specialbg-secondary-grouped' | 'specialbg-tertiary-grouped' | 'specialbg-secondary-transparent' | 'specialbg-secondary-transparent-inverted' | 'specialbg-tertiary-transparent' | 'specialbg-tertiary-transparent-inverted';
|
|
2
|
+
type BorderColorType = 'accent' | 'key' | 'key-inverted' | 'link' | 'primary' | 'primary-inverted' | 'secondary' | 'secondary-inverted' | 'tertiary' | 'tertiary-inverted' | 'underline' | 'underline-inverted' | 'graphic-attention' | 'graphic-link' | 'graphic-negative' | 'graphic-positive' | 'specialbg-secondary-transparent' | 'specialbg-secondary-transparent-inverted' | 'specialbg-tertiary-transparent' | 'specialbg-tertiary-transparent-inverted';
|
|
3
|
+
type GraphicColorType = 'accent' | 'link' | 'attention' | 'positive' | 'negative' | 'primary' | 'primary-inverted' | 'secondary' | 'secondary-inverted' | 'tertiary' | 'tertiary-inverted' | 'quaternary' | 'quaternary-inverted' | 'static-light' | 'static-accent' | 'static-dark';
|
|
4
|
+
type ShadowType = 'shadow-xs' | 'shadow-s' | 'shadow-m' | 'shadow-l' | 'shadow-xl' | 'shadow-xs-hard' | 'shadow-s-hard' | 'shadow-m-hard' | 'shadow-l-hard' | 'shadow-xl-hard' | 'shadow-xs-up' | 'shadow-s-up' | 'shadow-m-up' | 'shadow-l-up' | 'shadow-xl-up' | 'shadow-xs-hard-up' | 'shadow-s-hard-up' | 'shadow-m-hard-up' | 'shadow-l-hard-up' | 'shadow-xl-hard-up';
|
|
5
|
+
type GapType = '3xs' | '2xs' | 'xs' | 's' | 'm' | 'l' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl' | '6xl' | '7xl' | '8xl';
|
|
6
|
+
type PaddingType = number | string | {
|
|
7
|
+
top?: number;
|
|
8
|
+
right?: number;
|
|
9
|
+
bottom?: number;
|
|
10
|
+
left?: number;
|
|
11
|
+
};
|
|
12
|
+
type TypographyType = 'accent-caps' | 'accent-component-primary' | 'accent-component-secondary' | 'accent-primary-large' | 'accent-primary-medium' | 'accent-primary-small' | 'accent-secondary-large' | 'accent-secondary-medium' | 'accent-secondary-small' | 'action-caps' | 'action-component-primary' | 'action-component-secondary' | 'action-primary-large' | 'action-primary-medium' | 'action-primary-small' | 'action-secondary-large' | 'action-secondary-medium' | 'action-secondary-small' | 'headline-mobile-large' | 'headline-mobile-medium' | 'headline-mobile-small' | 'headline-mobile-xlarge' | 'headline-mobile-xsmall' | 'headline-system-mobile-large' | 'headline-system-mobile-medium' | 'headline-system-mobile-small' | 'headline-system-mobile-xlarge' | 'headline-system-mobile-xsmall' | 'headline-system-large' | 'headline-system-medium' | 'headline-system-small' | 'headline-system-xlarge' | 'headline-system-xsmall' | 'headline-large' | 'headline-medium' | 'headline-small' | 'headline-xlarge' | 'headline-xsmall' | 'key-large' | 'key-medium' | 'key-small' | 'key-xlarge' | 'key-xsmall' | 'paragraph-caps' | 'paragraph-component-primary' | 'paragraph-component-secondary' | 'paragraph-primary-large' | 'paragraph-primary-medium' | 'paragraph-primary-small' | 'paragraph-secondary-large' | 'paragraph-secondary-medium' | 'paragraph-secondary-small' | 'promo-mobile-large' | 'promo-mobile-medium' | 'promo-mobile-small' | 'promo-mobile-xlarge' | 'promo-mobile-xsmall' | 'promo-system-mobile-large' | 'promo-system-mobile-medium' | 'promo-system-mobile-small' | 'promo-system-mobile-xlarge' | 'promo-system-mobile-xsmall' | 'promo-system-large' | 'promo-system-medium' | 'promo-system-small' | 'promo-system-xlarge' | 'promo-system-xsmall' | 'promo-large' | 'promo-medium' | 'promo-small' | 'promo-xlarge' | 'promo-xsmall' | 'accent-component' | 'action-component' | 'paragraph-component';
|
|
13
|
+
type Country = {
|
|
14
|
+
name: string;
|
|
15
|
+
regions?: string[];
|
|
16
|
+
iso2: string;
|
|
17
|
+
countryCode: string;
|
|
18
|
+
dialCode: string;
|
|
19
|
+
format?: string;
|
|
20
|
+
priority: number;
|
|
21
|
+
mainCode?: boolean;
|
|
22
|
+
};
|
|
23
|
+
export { BackgroundColorType, BorderColorType, GraphicColorType, ShadowType, GapType, PaddingType, TypographyType, Country };
|
package/cssm/types.d.ts
CHANGED
|
@@ -6,18 +6,9 @@ import { InputAutocompleteProps } from "@alfalab/core-components-input-autocompl
|
|
|
6
6
|
import { InputAutocompleteDesktopProps } from "@alfalab/core-components-input-autocomplete/desktop";
|
|
7
7
|
import { InputAutocompleteMobileProps } from "@alfalab/core-components-input-autocomplete/mobile";
|
|
8
8
|
import { OptionShape } from "./typings-d515b24c";
|
|
9
|
+
import { Country } from "./index-464d40a4";
|
|
9
10
|
import { SharedCountrySelectProps } from "./components/country-select/index";
|
|
10
11
|
import { CountriesData } from "./data/country-data";
|
|
11
|
-
type Country = {
|
|
12
|
-
name: string;
|
|
13
|
-
regions?: string[];
|
|
14
|
-
iso2: string;
|
|
15
|
-
countryCode: string;
|
|
16
|
-
dialCode: string;
|
|
17
|
-
format?: string;
|
|
18
|
-
priority: number;
|
|
19
|
-
mainCode?: boolean;
|
|
20
|
-
};
|
|
21
12
|
type AreaItem = Country & {
|
|
22
13
|
isAreaCode: boolean;
|
|
23
14
|
areaCodeLength: number;
|
|
@@ -5,6 +5,7 @@ import { HTMLAttributes, ReactElement, ReactNode, RefObject, ButtonHTMLAttribute
|
|
|
5
5
|
import { HandledEvents } from "react-swipeable/es/types";
|
|
6
6
|
import { TransitionProps } from "react-transition-group/Transition";
|
|
7
7
|
import { BaseModalProps, BaseModalContext } from "./index-11f20b2e";
|
|
8
|
+
import { BackgroundColorType } from "./index-464d40a4";
|
|
8
9
|
import { BaseFormControlProps, BackdropProps } from "./index-ebda875c";
|
|
9
10
|
import { ContentProps } from "./typings-4b7234ef";
|
|
10
11
|
import { ModalResponsiveProps as ModalProps } from "./typings-4b7234ef";
|
|
@@ -175,7 +176,6 @@ type NavigationBarPrivateProps = {
|
|
|
175
176
|
scrollableParentRef?: React.RefObject<HTMLDivElement>;
|
|
176
177
|
};
|
|
177
178
|
type NavigationBarProps = NavigationBarPrivateProps;
|
|
178
|
-
type BackgroundColorType = "accent" | "info" | "attention-muted" | "positive-muted" | "negative-muted" | "primary" | "primary-inverted" | "secondary" | "secondary-inverted" | "tertiary" | "tertiary-inverted" | "quaternary" | "quaternary-inverted" | "specialbg-component" | "specialbg-component-inverted" | "specialbg-primary-grouped" | "specialbg-secondary-grouped" | "specialbg-tertiary-grouped" | "specialbg-secondary-transparent" | "specialbg-secondary-transparent-inverted" | "specialbg-tertiary-transparent" | "specialbg-tertiary-transparent-inverted";
|
|
179
179
|
type BottomSheetTitleAlign = "center" | "left";
|
|
180
180
|
type BottomSheetProps = {
|
|
181
181
|
/**
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { ReactNode } from "react";
|
|
4
4
|
import { TextSkeletonProps } from "./types-1328ead9";
|
|
5
|
+
type BorderRadiusSize = 0 | 2 | 4 | 6 | 8 | 10 | 12 | 16 | 20 | 24 | 32 | 36 | 64 | "pill";
|
|
5
6
|
type SkeletonProps = {
|
|
6
7
|
/**
|
|
7
8
|
* Флаг, явно задающий состояние, при котором контент закрывается прелоадером
|
|
@@ -36,6 +37,11 @@ type SkeletonProps = {
|
|
|
36
37
|
* @default default
|
|
37
38
|
*/
|
|
38
39
|
colors?: "default" | "inverted";
|
|
40
|
+
/**
|
|
41
|
+
* Скругление углов
|
|
42
|
+
* @default 8
|
|
43
|
+
*/
|
|
44
|
+
borderRadius?: BorderRadiusSize;
|
|
39
45
|
};
|
|
40
46
|
declare const Skeleton: React.FC<SkeletonProps>;
|
|
41
47
|
type SkeletonProps$0 = {
|
|
@@ -46,4 +52,4 @@ declare function useSkeleton(showSkeleton?: boolean, skeletonProps?: TextSkeleto
|
|
|
46
52
|
renderSkeleton: (props: SkeletonProps$0) => React.JSX.Element | null;
|
|
47
53
|
textRef: React.RefObject<HTMLElement>;
|
|
48
54
|
};
|
|
49
|
-
export { SkeletonProps, Skeleton, useSkeleton };
|
|
55
|
+
export { BorderRadiusSize, SkeletonProps, Skeleton, useSkeleton };
|
package/cssm/utils/index.d.ts
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
1
2
|
import { MaskitoOptions } from '@maskito/core';
|
|
2
3
|
import { InputAutocompleteDesktopProps } from "@alfalab/core-components-input-autocomplete/desktop";
|
|
3
4
|
import { GroupShape, OptionShape } from "@alfalab/core-components-select/shared";
|
|
4
5
|
import { CountriesData } from "../data/country-data";
|
|
5
6
|
import { Country } from "../types";
|
|
6
7
|
declare function initCountries(iso2s?: string[], customCountriesList?: CountriesData[]): Country[][];
|
|
7
|
-
declare function findCountry(countries: Country[][], value
|
|
8
|
+
declare function findCountry(countries: Country[][], value: string | undefined, iso2: string | undefined, country?: Country): Country | undefined;
|
|
8
9
|
declare function guessCountry(inputNumber: string, data: Country[][]): Country | undefined;
|
|
9
10
|
declare function clearMask(value: string): string;
|
|
10
11
|
declare function createPhoneMaskExpression(country: Country | undefined, clearableCountryCode: boolean): Array<RegExp | string>;
|
|
11
|
-
declare function createMaskOptions(country: Country | undefined, clearableCountryCode: boolean, preserveCountryCode: boolean): MaskitoOptions;
|
|
12
|
+
declare function createMaskOptions(country: Country | undefined, clearableCountryCode: boolean, preserveCountryCode: boolean, lastCountryRef: RefObject<Country | null>): MaskitoOptions;
|
|
12
13
|
declare function defaultFilterFn(value: string | undefined, option: OptionShape): boolean;
|
|
13
14
|
declare const filterPhones: (value?: string, options?: InputAutocompleteDesktopProps['options'], filterFn?: typeof defaultFilterFn) => (OptionShape | GroupShape)[];
|
|
14
15
|
declare function getPhoneData(phone: string, countries: Country[][], defaultIso2?: string): {
|