@alfalab/core-components-international-phone-input 1.3.3 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{Component-c241b310.d.ts → Component-61e2321e.d.ts} +12 -3
- package/{cssm/Component-c29389e5.d.ts → Component-70284312.d.ts} +1 -1
- package/Component-bdb4c6b9.d.ts +2 -2
- package/Component.responsive-8566963f.d.ts +2 -2
- package/Component.responsive.d.ts +6 -10
- package/{esm/ResponsiveContext-8a2a8ad1.d.ts → ResponsiveContext-88b743b5.d.ts} +1 -1
- package/components/base-international-phone-input/Component.d.ts +2 -4
- package/components/base-international-phone-input/Component.js +16 -21
- package/components/base-international-phone-input/index.css +2 -2
- package/components/country-select/Component.js +1 -1
- package/components/country-select/index.css +9 -9
- package/components/flag-icon/component.js +1 -1
- package/components/flag-icon/index.css +4 -4
- package/components/select-field/component.d.ts +4 -1
- package/components/select-field/component.js +12 -2
- package/components/select-field/index.css +10 -10
- package/consts-6c9aad46.d.ts +12 -0
- package/consts-ef43bf1b.d.ts +12 -0
- package/cssm/{Component-c241b310.d.ts → Component-61e2321e.d.ts} +12 -3
- package/{Component-c29389e5.d.ts → cssm/Component-70284312.d.ts} +1 -1
- package/cssm/Component-bdb4c6b9.d.ts +2 -2
- package/cssm/Component.responsive-8566963f.d.ts +2 -2
- package/cssm/Component.responsive.d.ts +6 -10
- package/{modern/ResponsiveContext-8a2a8ad1.d.ts → cssm/ResponsiveContext-88b743b5.d.ts} +1 -1
- package/cssm/components/base-international-phone-input/Component.d.ts +2 -4
- package/cssm/components/base-international-phone-input/Component.js +15 -20
- package/cssm/components/country-select/index.module.css +1 -1
- package/cssm/components/flag-icon/index.module.css +1 -1
- package/cssm/components/select-field/component.d.ts +4 -1
- package/cssm/components/select-field/component.js +11 -1
- package/cssm/components/select-field/index.module.css +3 -3
- package/cssm/consts-6c9aad46.d.ts +12 -0
- package/cssm/consts-ef43bf1b.d.ts +12 -0
- package/cssm/{index-c241b310.d.ts → index-61e2321e.d.ts} +1 -1
- package/cssm/index-8566963f.d.ts +2 -2
- package/cssm/index-ebda875c.d.ts +3 -2
- package/cssm/types.d.ts +3 -5
- package/{modern/typings-c241b310.d.ts → cssm/typings-61e2321e.d.ts} +3 -2
- package/cssm/{typings-c29389e5.d.ts → typings-70284312.d.ts} +19 -14
- package/{esm/typings-8a2a8ad1.d.ts → cssm/typings-88b743b5.d.ts} +3 -2
- package/cssm/utils-89376c31.d.ts +1 -1
- package/{modern/Component-c241b310.d.ts → esm/Component-61e2321e.d.ts} +12 -3
- package/esm/{Component-c29389e5.d.ts → Component-70284312.d.ts} +1 -1
- package/esm/Component-bdb4c6b9.d.ts +2 -2
- package/esm/Component.responsive-8566963f.d.ts +2 -2
- package/esm/Component.responsive.d.ts +6 -10
- package/{ResponsiveContext-8a2a8ad1.d.ts → esm/ResponsiveContext-88b743b5.d.ts} +1 -1
- package/esm/components/base-international-phone-input/Component.d.ts +2 -4
- package/esm/components/base-international-phone-input/Component.js +16 -21
- package/esm/components/base-international-phone-input/index.css +2 -2
- package/esm/components/country-select/Component.js +1 -1
- package/esm/components/country-select/index.css +9 -9
- package/esm/components/flag-icon/component.js +1 -1
- package/esm/components/flag-icon/index.css +4 -4
- package/esm/components/select-field/component.d.ts +4 -1
- package/esm/components/select-field/component.js +12 -2
- package/esm/components/select-field/index.css +10 -10
- package/esm/consts-6c9aad46.d.ts +12 -0
- package/esm/consts-ef43bf1b.d.ts +12 -0
- package/esm/{index-c241b310.d.ts → index-61e2321e.d.ts} +1 -1
- package/esm/index-8566963f.d.ts +2 -2
- package/esm/index-ebda875c.d.ts +3 -2
- package/esm/types.d.ts +3 -5
- package/{cssm/typings-c241b310.d.ts → esm/typings-61e2321e.d.ts} +3 -2
- package/esm/{typings-c29389e5.d.ts → typings-70284312.d.ts} +19 -14
- package/{modern/typings-8a2a8ad1.d.ts → esm/typings-88b743b5.d.ts} +3 -2
- package/esm/utils-89376c31.d.ts +1 -1
- package/{index-c241b310.d.ts → index-61e2321e.d.ts} +1 -1
- package/index-8566963f.d.ts +2 -2
- package/index-ebda875c.d.ts +3 -2
- package/{esm/Component-c241b310.d.ts → modern/Component-61e2321e.d.ts} +12 -3
- package/modern/{Component-c29389e5.d.ts → Component-70284312.d.ts} +1 -1
- package/modern/Component-bdb4c6b9.d.ts +2 -2
- package/modern/Component.responsive-8566963f.d.ts +2 -2
- package/modern/Component.responsive.d.ts +6 -10
- package/{cssm/ResponsiveContext-8a2a8ad1.d.ts → modern/ResponsiveContext-88b743b5.d.ts} +1 -1
- package/modern/components/base-international-phone-input/Component.d.ts +2 -4
- package/modern/components/base-international-phone-input/Component.js +15 -18
- package/modern/components/base-international-phone-input/index.css +2 -2
- package/modern/components/country-select/Component.js +1 -1
- package/modern/components/country-select/index.css +9 -9
- package/modern/components/flag-icon/component.js +1 -1
- package/modern/components/flag-icon/index.css +4 -4
- package/modern/components/select-field/component.d.ts +4 -1
- package/modern/components/select-field/component.js +12 -2
- package/modern/components/select-field/index.css +10 -10
- package/modern/consts-6c9aad46.d.ts +12 -0
- package/modern/consts-ef43bf1b.d.ts +12 -0
- package/modern/{index-c241b310.d.ts → index-61e2321e.d.ts} +1 -1
- package/modern/index-8566963f.d.ts +2 -2
- package/modern/index-ebda875c.d.ts +3 -2
- package/modern/types.d.ts +3 -5
- package/{typings-c241b310.d.ts → modern/typings-61e2321e.d.ts} +3 -2
- package/modern/{typings-c29389e5.d.ts → typings-70284312.d.ts} +19 -14
- package/{cssm/typings-8a2a8ad1.d.ts → modern/typings-88b743b5.d.ts} +3 -2
- package/modern/utils-89376c31.d.ts +1 -1
- package/package.json +4 -4
- package/src/components/base-international-phone-input/Component.tsx +24 -17
- package/src/components/select-field/component.tsx +17 -2
- package/src/components/select-field/index.module.css +2 -2
- package/src/types.ts +2 -2
- package/types.d.ts +3 -5
- package/{esm/typings-c241b310.d.ts → typings-61e2321e.d.ts} +3 -2
- package/{typings-c29389e5.d.ts → typings-70284312.d.ts} +19 -14
- package/{typings-8a2a8ad1.d.ts → typings-88b743b5.d.ts} +3 -2
- package/utils-89376c31.d.ts +1 -1
- package/consts-f777ba1a.d.ts +0 -2
- package/cssm/consts-f777ba1a.d.ts +0 -2
- package/esm/consts-f777ba1a.d.ts +0 -2
- package/modern/consts-f777ba1a.d.ts +0 -2
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { View } from "./typings-
|
|
3
|
+
import { View } from "./typings-88b743b5";
|
|
4
4
|
declare const Modal: React.ForwardRefExoticComponent<import("./index-bdb4c6b9").BaseModalProps & {
|
|
5
|
-
size?: "s" | "m" | "l" | "xl" | "fullscreen" | undefined;
|
|
5
|
+
size?: "s" | "m" | "l" | "xl" | 500 | "fullscreen" | 600 | 800 | 1140 | undefined;
|
|
6
6
|
fullscreen?: boolean | undefined;
|
|
7
7
|
fixedPosition?: boolean | undefined;
|
|
8
8
|
hasCloser?: boolean | undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from "react";
|
|
3
|
-
import { CommonButtonProps, ButtonProps } from "./typings-
|
|
3
|
+
import { CommonButtonProps, ButtonProps } from "./typings-61e2321e";
|
|
4
4
|
declare const ButtonMobile: React.ForwardRefExoticComponent<CommonButtonProps & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
5
5
|
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
6
6
|
export { ButtonMobile, Button };
|
|
7
|
-
export type { CommonButtonProps as ButtonMobileProps } from "./typings-
|
|
7
|
+
export type { CommonButtonProps as ButtonMobileProps } from "./typings-61e2321e";
|
|
@@ -7,11 +7,9 @@ declare const InternationalPhoneInput: React.ForwardRefExoticComponent<(({
|
|
|
7
7
|
clearableCountryCode?: boolean | undefined;
|
|
8
8
|
countrySelectProps?: import("./components/country-select/index").SharedCountrySelectProps | undefined;
|
|
9
9
|
clear?: boolean | undefined;
|
|
10
|
-
filterFn?: ((value: string | undefined, option: import("./typings-
|
|
10
|
+
filterFn?: ((value: string | undefined, option: import("./typings-70284312").OptionShape) => boolean) | undefined;
|
|
11
11
|
onCountryChange?: ((country?: import("./types").Country | undefined) => void) | undefined;
|
|
12
|
-
onChange?: ((
|
|
13
|
-
value: string;
|
|
14
|
-
}) => void) | undefined;
|
|
12
|
+
onChange?: ((phone: string) => void) | undefined;
|
|
15
13
|
onBlur?: ((event: React.FocusEvent<HTMLDivElement | HTMLInputElement, Element>) => void) | undefined;
|
|
16
14
|
onFocus?: ((event: React.FocusEvent<HTMLDivElement | HTMLInputElement, Element>) => void) | undefined;
|
|
17
15
|
} & {
|
|
@@ -28,17 +26,15 @@ declare const InternationalPhoneInput: React.ForwardRefExoticComponent<(({
|
|
|
28
26
|
clearableCountryCode?: boolean | undefined;
|
|
29
27
|
countrySelectProps?: import("./components/country-select/index").SharedCountrySelectProps | undefined;
|
|
30
28
|
clear?: boolean | undefined;
|
|
31
|
-
filterFn?: ((value: string | undefined, option: import("./typings-
|
|
29
|
+
filterFn?: ((value: string | undefined, option: import("./typings-70284312").OptionShape) => boolean) | undefined;
|
|
32
30
|
onCountryChange?: ((country?: import("./types").Country | undefined) => void) | undefined;
|
|
33
|
-
onChange?: ((
|
|
34
|
-
value: string;
|
|
35
|
-
}) => void) | undefined;
|
|
31
|
+
onChange?: ((phone: string) => void) | undefined;
|
|
36
32
|
onBlur?: ((event: React.FocusEvent<HTMLDivElement | HTMLInputElement, Element>) => void) | undefined;
|
|
37
33
|
onFocus?: ((event: React.FocusEvent<HTMLDivElement | HTMLInputElement, Element>) => void) | undefined;
|
|
38
34
|
} & {
|
|
39
|
-
options: (import("./typings-
|
|
35
|
+
options: (import("./typings-70284312").OptionShape | import("./typings-70284312").GroupShape)[];
|
|
40
36
|
} & Omit<import("@alfalab/core-components-input-autocomplete/types").InputAutocompleteCommonProps, "onChange" | "onInput"> & {
|
|
41
|
-
options: (import("./typings-
|
|
37
|
+
options: (import("./typings-70284312").OptionShape | import("./typings-70284312").GroupShape)[];
|
|
42
38
|
} & Omit<import("@alfalab/core-components-input-autocomplete/types").InputAutocompleteMobileProps, "onChange" | "onInput"> & {
|
|
43
39
|
breakpoint?: number | undefined;
|
|
44
40
|
defaultMatchMediaValue?: boolean | (() => boolean) | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { TResponsiveModalContext } from "./typings-
|
|
3
|
+
import { TResponsiveModalContext } from "./typings-88b743b5";
|
|
4
4
|
declare const ResponsiveContext: React.Context<TResponsiveModalContext>;
|
|
5
5
|
export { ResponsiveContext };
|
|
@@ -9,11 +9,9 @@ declare const BaseInternationalPhoneInput: React.ForwardRefExoticComponent<{
|
|
|
9
9
|
clearableCountryCode?: boolean | undefined;
|
|
10
10
|
countrySelectProps?: import("../country-select/index").SharedCountrySelectProps | undefined;
|
|
11
11
|
clear?: boolean | undefined;
|
|
12
|
-
filterFn?: ((value: string | undefined, option: import("../../typings-
|
|
12
|
+
filterFn?: ((value: string | undefined, option: import("../../typings-70284312").OptionShape) => boolean) | undefined;
|
|
13
13
|
onCountryChange?: ((country?: Country | undefined) => void) | undefined;
|
|
14
|
-
onChange?: ((
|
|
15
|
-
value: string;
|
|
16
|
-
}) => void) | undefined;
|
|
14
|
+
onChange?: ((phone: string) => void) | undefined;
|
|
17
15
|
onBlur?: ((event: React.FocusEvent<HTMLDivElement | HTMLInputElement, Element>) => void) | undefined;
|
|
18
16
|
onFocus?: ((event: React.FocusEvent<HTMLDivElement | HTMLInputElement, Element>) => void) | undefined;
|
|
19
17
|
} & {
|
|
@@ -6,10 +6,10 @@ import { BaseOption } from '@alfalab/core-components-select/modern/shared';
|
|
|
6
6
|
import { initCountries, findCountry, filterPhones, createMaskOptions, getClear, getPhoneData } from '../../utils/index.js';
|
|
7
7
|
import { CountrySelect } from '../country-select/Component.js';
|
|
8
8
|
|
|
9
|
-
const styles = {"component":"international-phone-
|
|
9
|
+
const styles = {"component":"international-phone-input__component_1gdiu","addons":"international-phone-input__addons_1gdiu"};
|
|
10
10
|
require('./index.css')
|
|
11
11
|
|
|
12
|
-
const BaseInternationalPhoneInput = forwardRef(({ clearableCountryCode, value, country: countryProp, filterFn, onChange, onCountryChange, countrySelectProps, countries, defaultIso2, disabled, options, size =
|
|
12
|
+
const BaseInternationalPhoneInput = forwardRef(({ clearableCountryCode, value, country: countryProp, filterFn, onChange, onCountryChange, countrySelectProps, countries, defaultIso2, disabled, options, size = 56, Input, InputAutocomplete, SelectComponent, view, clear: clearProp, ...restProps }, ref) => {
|
|
13
13
|
const countriesData = useMemo(() => initCountries(countries), [countries]);
|
|
14
14
|
const inputRef = useRef(null);
|
|
15
15
|
const inputWrapperRef = useRef(null);
|
|
@@ -23,43 +23,40 @@ const BaseInternationalPhoneInput = forwardRef(({ clearableCountryCode, value, c
|
|
|
23
23
|
};
|
|
24
24
|
const maskOptions = useMemo(() => createMaskOptions(country, clearableCountryCode), [country, clearableCountryCode]);
|
|
25
25
|
const maskRef = useMaskito({ options: maskOptions });
|
|
26
|
-
const changeNumber = (
|
|
27
|
-
onChange?.(
|
|
26
|
+
const changeNumber = (phone) => {
|
|
27
|
+
onChange?.(phone);
|
|
28
28
|
};
|
|
29
|
-
const updatePhoneData = (phone
|
|
29
|
+
const updatePhoneData = (phone) => {
|
|
30
30
|
const { nextCountry, nextPhone } = getPhoneData(phone, countriesData, defaultIso2);
|
|
31
31
|
if (nextCountry !== country) {
|
|
32
32
|
handleCountryChange?.(nextCountry);
|
|
33
33
|
}
|
|
34
|
-
changeNumber(
|
|
34
|
+
changeNumber(nextPhone);
|
|
35
35
|
};
|
|
36
36
|
const handleSelectCountry = ({ selected }) => {
|
|
37
37
|
const nextCountry = selected?.value;
|
|
38
38
|
handleCountryChange?.(nextCountry);
|
|
39
39
|
if (nextCountry) {
|
|
40
|
-
changeNumber(
|
|
40
|
+
changeNumber(`+${nextCountry.dialCode}`);
|
|
41
41
|
}
|
|
42
42
|
requestAnimationFrame(() => inputRef.current?.focus());
|
|
43
43
|
};
|
|
44
44
|
const handleOptionSelect = (payload) => {
|
|
45
|
-
updatePhoneData(maskitoTransform(typeof payload === 'string' ? payload : payload.selected?.key || '', maskOptions)
|
|
45
|
+
updatePhoneData(maskitoTransform(typeof payload === 'string' ? payload : payload.selected?.key || '', maskOptions));
|
|
46
46
|
};
|
|
47
47
|
const handleInput = (e) => {
|
|
48
|
-
updatePhoneData(e.target.value
|
|
48
|
+
updatePhoneData(e.target.value);
|
|
49
49
|
};
|
|
50
|
-
const handleClear = () => {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}
|
|
54
|
-
else {
|
|
55
|
-
changeNumber(null, `+${country?.countryCode}` || '');
|
|
56
|
-
}
|
|
50
|
+
const handleClear = (event) => {
|
|
51
|
+
restProps.inputProps?.onClear?.(event);
|
|
52
|
+
const countryCode = country?.countryCode || '';
|
|
53
|
+
changeNumber(clearableCountryCode ? '' : `+${countryCode}`);
|
|
57
54
|
};
|
|
58
55
|
useEffect(() => {
|
|
59
56
|
if (value) {
|
|
60
57
|
const newValue = maskitoTransform(value, maskOptions);
|
|
61
58
|
if (value !== newValue) {
|
|
62
|
-
updatePhoneData(newValue
|
|
59
|
+
updatePhoneData(newValue);
|
|
63
60
|
}
|
|
64
61
|
}
|
|
65
62
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
@@ -74,7 +71,7 @@ const BaseInternationalPhoneInput = forwardRef(({ clearableCountryCode, value, c
|
|
|
74
71
|
clear: getClear(clearProp, clearableCountryCode, value, country?.countryCode),
|
|
75
72
|
...restProps.inputProps,
|
|
76
73
|
};
|
|
77
|
-
return Array.isArray(options) ? (React.createElement(InputAutocomplete, { closeOnSelect: true, Option: BaseOption, size: size, ...restProps, disabled: disabled, options: filteredOptions, value: value, onChange: handleOptionSelect, onInput: (
|
|
74
|
+
return Array.isArray(options) ? (React.createElement(InputAutocomplete, { closeOnSelect: true, Option: BaseOption, size: size, ...restProps, disabled: disabled, options: filteredOptions, value: value, onChange: handleOptionSelect, onInput: (phone) => updatePhoneData(phone), inputProps: {
|
|
78
75
|
...inputProps,
|
|
79
76
|
onClear: handleClear,
|
|
80
77
|
onInput: handleInput,
|
|
@@ -5,7 +5,7 @@ import { WorldMagnifierMIcon } from '@alfalab/icons-glyph/WorldMagnifierMIcon';
|
|
|
5
5
|
import { FlagIcon } from '../flag-icon/component.js';
|
|
6
6
|
import { EMPTY_COUNTRY_SELECT_FIELD, SelectField } from '../select-field/component.js';
|
|
7
7
|
|
|
8
|
-
const styles = {"component":"international-phone-
|
|
8
|
+
const styles = {"component":"international-phone-input__component_1opig","option":"international-phone-input__option_1opig","flag":"international-phone-input__flag_1opig","countryName":"international-phone-input__countryName_1opig","dialCode":"international-phone-input__dialCode_1opig","flagIconWrapper":"international-phone-input__flagIconWrapper_1opig","emptyCountryIcon":"international-phone-input__emptyCountryIcon_1opig"};
|
|
9
9
|
require('./index.css')
|
|
10
10
|
|
|
11
11
|
const CountrySelect = ({ hideCountrySelect, countries, country, dataTestId, fieldWidth, onChange, view = 'desktop', SelectComponent, ...restProps }) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/* hash:
|
|
2
|
-
:root {
|
|
1
|
+
/* hash: 1r5mu */
|
|
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);
|
|
5
5
|
--color-light-text-secondary: rgba(4, 4, 19, 0.55); /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -18,29 +18,29 @@
|
|
|
18
18
|
--gap-s: 12px;
|
|
19
19
|
} :root {
|
|
20
20
|
} :root {
|
|
21
|
-
} .international-phone-
|
|
21
|
+
} .international-phone-input__component_1opig {
|
|
22
22
|
position: static;
|
|
23
23
|
display: flex;
|
|
24
24
|
min-width: initial;
|
|
25
25
|
height: 100%;
|
|
26
|
-
} .international-phone-
|
|
26
|
+
} .international-phone-input__option_1opig {
|
|
27
27
|
display: flex;
|
|
28
28
|
align-items: flex-start;
|
|
29
29
|
padding: var(--gap-s);
|
|
30
|
-
} .international-phone-
|
|
30
|
+
} .international-phone-input__flag_1opig {
|
|
31
31
|
flex-shrink: 0;
|
|
32
32
|
margin-right: var(--gap-xs);
|
|
33
|
-
} .international-phone-
|
|
33
|
+
} .international-phone-input__countryName_1opig {
|
|
34
34
|
margin-right: var(--gap-xs);
|
|
35
|
-
} .international-phone-
|
|
35
|
+
} .international-phone-input__dialCode_1opig {
|
|
36
36
|
color: var(--color-light-text-secondary);
|
|
37
|
-
} .international-phone-
|
|
37
|
+
} .international-phone-input__flagIconWrapper_1opig {
|
|
38
38
|
display: flex;
|
|
39
39
|
justify-content: center;
|
|
40
40
|
align-items: center;
|
|
41
41
|
width: 24px;
|
|
42
42
|
height: 24px;
|
|
43
43
|
margin-left: var(--gap-s);
|
|
44
|
-
} .international-phone-
|
|
44
|
+
} .international-phone-input__emptyCountryIcon_1opig {
|
|
45
45
|
color: var(--color-light-neutral-translucent-700);
|
|
46
46
|
}
|
|
@@ -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":"international-phone-
|
|
5
|
+
const styles = {"flagIcon":"international-phone-input__flagIcon_1305a","flagPlaceholder":"international-phone-input__flagPlaceholder_1305a"};
|
|
6
6
|
require('./index.css')
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/* hash:
|
|
2
|
-
:root {
|
|
1
|
+
/* hash: 1agf3 */
|
|
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 */
|
|
5
5
|
} :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,10 +17,10 @@
|
|
|
17
17
|
--gap-3xs: 2px;
|
|
18
18
|
} :root {
|
|
19
19
|
} :root {
|
|
20
|
-
} .international-phone-
|
|
20
|
+
} .international-phone-input__flagIcon_1305a {
|
|
21
21
|
max-width: 24px;
|
|
22
22
|
max-height: 24px;
|
|
23
|
-
} .international-phone-
|
|
23
|
+
} .international-phone-input__flagPlaceholder_1305a {
|
|
24
24
|
width: 24px;
|
|
25
25
|
height: 16px;
|
|
26
26
|
max-height: 16px;
|
|
@@ -4,5 +4,8 @@ declare const EMPTY_COUNTRY_SELECT_FIELD: {
|
|
|
4
4
|
value: string;
|
|
5
5
|
key: string;
|
|
6
6
|
};
|
|
7
|
-
|
|
7
|
+
type SelectFieldProps = FieldProps & {
|
|
8
|
+
size?: 's' | 'm' | 'l' | 'xl' | 48 | 56 | 64 | 72;
|
|
9
|
+
};
|
|
10
|
+
declare const SelectField: FC<SelectFieldProps>;
|
|
8
11
|
export { EMPTY_COUNTRY_SELECT_FIELD, SelectField };
|
|
@@ -5,18 +5,28 @@ import { useFocus } from '@alfalab/hooks';
|
|
|
5
5
|
import { WorldMagnifierMIcon } from '@alfalab/icons-glyph/WorldMagnifierMIcon';
|
|
6
6
|
import { FlagIcon } from '../flag-icon/component.js';
|
|
7
7
|
|
|
8
|
-
const styles = {"component":"international-phone-
|
|
8
|
+
const styles = {"component":"international-phone-input__component_1vizw","flagIconContainer":"international-phone-input__flagIconContainer_1vizw","emptyCountryIcon":"international-phone-input__emptyCountryIcon_1vizw","disabled":"international-phone-input__disabled_1vizw","inner":"international-phone-input__inner_1vizw","size-64":"international-phone-input__size-64_1vizw","size-72":"international-phone-input__size-72_1vizw","focusVisible":"international-phone-input__focusVisible_1vizw"};
|
|
9
9
|
require('./index.css')
|
|
10
10
|
|
|
11
11
|
const EMPTY_COUNTRY_SELECT_FIELD = {
|
|
12
12
|
value: 'EMPTY_COUNTRY_SELECT_VALUE',
|
|
13
13
|
key: 'EMPTY_COUNTRY_SELECT_KEY',
|
|
14
14
|
};
|
|
15
|
+
const SIZE_TO_CLASSNAME_MAP = {
|
|
16
|
+
s: 'size-48',
|
|
17
|
+
m: 'size-56',
|
|
18
|
+
l: 'size-64',
|
|
19
|
+
xl: 'size-72',
|
|
20
|
+
48: 'size-48',
|
|
21
|
+
56: 'size-56',
|
|
22
|
+
64: 'size-64',
|
|
23
|
+
72: 'size-72',
|
|
24
|
+
};
|
|
15
25
|
const SelectField = ({ selected, Arrow, size, disabled, innerProps = {}, }) => {
|
|
16
26
|
const wrapperRef = useRef(null);
|
|
17
27
|
const [focusVisible] = useFocus(wrapperRef, 'keyboard');
|
|
18
28
|
const ref = innerProps.ref ? mergeRefs([innerProps.ref, wrapperRef]) : wrapperRef;
|
|
19
|
-
return (React.createElement("div", { ref: ref, className: cn(styles.component, size && styles[size], {
|
|
29
|
+
return (React.createElement("div", { ref: ref, className: cn(styles.component, size && styles[SIZE_TO_CLASSNAME_MAP[size]], {
|
|
20
30
|
[styles.focusVisible]: focusVisible,
|
|
21
31
|
[styles.disabled]: disabled,
|
|
22
32
|
}) },
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/* hash:
|
|
2
|
-
:root {
|
|
1
|
+
/* hash: 1h39k */
|
|
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-border-link: #2288fa;
|
|
5
5
|
--color-light-neutral-translucent-700: rgba(4, 4, 21, 0.47); /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* 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,33 +21,33 @@
|
|
|
21
21
|
} :root {
|
|
22
22
|
--focus-color: var(--color-light-border-link);
|
|
23
23
|
--disabled-cursor: not-allowed;
|
|
24
|
-
} .international-phone-
|
|
24
|
+
} .international-phone-input__component_1vizw {
|
|
25
25
|
height: 100%;
|
|
26
26
|
cursor: pointer;
|
|
27
27
|
outline: none;
|
|
28
28
|
position: relative;
|
|
29
|
-
} .international-phone-
|
|
29
|
+
} .international-phone-input__flagIconContainer_1vizw {
|
|
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
|
-
} .international-phone-
|
|
36
|
+
} .international-phone-input__emptyCountryIcon_1vizw {
|
|
37
37
|
color: var(--color-light-neutral-translucent-700);
|
|
38
|
-
} .international-phone-
|
|
38
|
+
} .international-phone-input__disabled_1vizw {
|
|
39
39
|
cursor: var(--disabled-cursor);
|
|
40
|
-
} .international-phone-
|
|
40
|
+
} .international-phone-input__inner_1vizw {
|
|
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
|
-
} .international-phone-
|
|
48
|
-
.international-phone-
|
|
47
|
+
} .international-phone-input__size-64_1vizw .international-phone-input__inner_1vizw,
|
|
48
|
+
.international-phone-input__size-72_1vizw .international-phone-input__inner_1vizw {
|
|
49
49
|
padding-left: var(--gap-m);
|
|
50
|
-
} .international-phone-
|
|
50
|
+
} .international-phone-input__focusVisible_1vizw {
|
|
51
51
|
outline: 2px solid var(--focus-color);
|
|
52
52
|
outline-offset: 2px;
|
|
53
53
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
declare const DEFAULT_VISIBLE_OPTIONS = 5;
|
|
2
|
+
declare const SIZE_TO_CLASSNAME_MAP: {
|
|
3
|
+
s: string;
|
|
4
|
+
m: string;
|
|
5
|
+
l: string;
|
|
6
|
+
xl: string;
|
|
7
|
+
48: string;
|
|
8
|
+
56: string;
|
|
9
|
+
64: string;
|
|
10
|
+
72: string;
|
|
11
|
+
};
|
|
12
|
+
export { DEFAULT_VISIBLE_OPTIONS, SIZE_TO_CLASSNAME_MAP };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { Button } from "./Component.responsive-8566963f";
|
|
2
|
-
export type { ButtonProps } from "./typings-
|
|
2
|
+
export type { ButtonProps } from "./typings-61e2321e";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from "react";
|
|
3
|
-
import { CommonButtonProps } from "./typings-
|
|
3
|
+
import { CommonButtonProps } from "./typings-61e2321e";
|
|
4
4
|
declare const ButtonDesktop: React.ForwardRefExoticComponent<CommonButtonProps & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
5
5
|
export { ButtonDesktop };
|
|
6
|
-
export type { CommonButtonProps as ButtonDesktopProps } from "./typings-
|
|
6
|
+
export type { CommonButtonProps as ButtonDesktopProps } from "./typings-61e2321e";
|
|
@@ -17,8 +17,9 @@ type BaseFormControlProps = HTMLAttributes<HTMLDivElement> & {
|
|
|
17
17
|
block?: boolean;
|
|
18
18
|
/**
|
|
19
19
|
* Размер компонента
|
|
20
|
+
* @description s, m, l, xl deprecated, используйте вместо них 48, 56, 64, 72 соответственно
|
|
20
21
|
*/
|
|
21
|
-
size?: "s" | "m" | "l" | "xl";
|
|
22
|
+
size?: "s" | "m" | "l" | "xl" | 48 | 56 | 64 | 72;
|
|
22
23
|
/**
|
|
23
24
|
* Набор цветов для компонента
|
|
24
25
|
*/
|
|
@@ -118,7 +119,7 @@ type BaseFormControlProps = HTMLAttributes<HTMLDivElement> & {
|
|
|
118
119
|
};
|
|
119
120
|
declare const BaseFormControl: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
|
|
120
121
|
block?: boolean | undefined;
|
|
121
|
-
size?: "s" | "m" | "l" | "xl" | undefined;
|
|
122
|
+
size?: "s" | "m" | "l" | "xl" | 48 | 56 | 64 | 72 | undefined;
|
|
122
123
|
colors?: "default" | "inverted" | undefined;
|
|
123
124
|
disabled?: boolean | undefined;
|
|
124
125
|
readOnly?: boolean | undefined;
|
package/modern/types.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ElementType, FC, FocusEvent } from 'react';
|
|
2
2
|
import { InputProps } from "@alfalab/core-components-input";
|
|
3
3
|
import { InputDesktopProps } from "@alfalab/core-components-input/desktop";
|
|
4
4
|
import { InputMobileProps } from "@alfalab/core-components-input/mobile";
|
|
5
5
|
import { InputAutocompleteProps } from "@alfalab/core-components-input-autocomplete";
|
|
6
6
|
import { InputAutocompleteDesktopProps } from "@alfalab/core-components-input-autocomplete/desktop";
|
|
7
7
|
import { InputAutocompleteMobileProps } from "@alfalab/core-components-input-autocomplete/mobile";
|
|
8
|
-
import { OptionShape } from "./typings-
|
|
8
|
+
import { OptionShape } from "./typings-70284312";
|
|
9
9
|
import { SharedCountrySelectProps } from "./components/country-select/index";
|
|
10
10
|
type Country = {
|
|
11
11
|
name: string;
|
|
@@ -57,9 +57,7 @@ type CommonPhoneInputProps = {
|
|
|
57
57
|
/**
|
|
58
58
|
* Обработчик изменения номера
|
|
59
59
|
*/
|
|
60
|
-
onChange?: (
|
|
61
|
-
value: string;
|
|
62
|
-
}) => void;
|
|
60
|
+
onChange?: (phone: string) => void;
|
|
63
61
|
/**
|
|
64
62
|
* Обработчик блюра поля
|
|
65
63
|
*/
|
|
@@ -37,9 +37,10 @@ type ComponentProps = {
|
|
|
37
37
|
rightAddons?: ReactNode;
|
|
38
38
|
/**
|
|
39
39
|
* Размер компонента
|
|
40
|
-
* @default
|
|
40
|
+
* @default 56
|
|
41
|
+
* @description xxs, xs, s, m, l, xl deprecated, используйте вместо них 32, 40, 48, 56, 64, 72 соответственно
|
|
41
42
|
*/
|
|
42
|
-
size?: 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl';
|
|
43
|
+
size?: 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 32 | 40 | 48 | 56 | 64 | 72;
|
|
43
44
|
/**
|
|
44
45
|
* Растягивает компонент на ширину контейнера
|
|
45
46
|
* @default false
|
|
@@ -10,15 +10,15 @@ import { CSSTransitionProps } from "react-transition-group/CSSTransition";
|
|
|
10
10
|
import { BasePlacement, VariationPlacement } from "@popperjs/core";
|
|
11
11
|
import { SwipeableHandlers } from "react-swipeable";
|
|
12
12
|
import { TextElementType, TextSkeletonProps } from "./types-1328ead9";
|
|
13
|
-
import { ButtonProps } from "./index-
|
|
14
|
-
import { ContentProps } from "./typings-
|
|
15
|
-
import { ModalResponsiveProps as ModalProps } from "./typings-
|
|
13
|
+
import { ButtonProps } from "./index-61e2321e";
|
|
14
|
+
import { ContentProps } from "./typings-88b743b5";
|
|
15
|
+
import { ModalResponsiveProps as ModalProps } from "./typings-88b743b5";
|
|
16
16
|
import { InputProps } from "@alfalab/core-components-input";
|
|
17
17
|
interface BackArrowAddonProps extends React.HTMLAttributes<HTMLButtonElement> {
|
|
18
18
|
/**
|
|
19
19
|
* Текст после иконки
|
|
20
20
|
*/
|
|
21
|
-
text?: string;
|
|
21
|
+
text?: string | null;
|
|
22
22
|
/**
|
|
23
23
|
* Дополнительный класс
|
|
24
24
|
*/
|
|
@@ -512,7 +512,7 @@ interface ControlsProps {
|
|
|
512
512
|
gap?: 16 | 24 | 32;
|
|
513
513
|
}
|
|
514
514
|
declare const ModalResponsive: React.ForwardRefExoticComponent<import("./index-bdb4c6b9").BaseModalProps & {
|
|
515
|
-
size?: "s" | "m" | "l" | "xl" | "fullscreen" | undefined;
|
|
515
|
+
size?: "s" | "m" | "l" | "xl" | 500 | "fullscreen" | 600 | 800 | 1140 | undefined;
|
|
516
516
|
fullscreen?: boolean | undefined;
|
|
517
517
|
fixedPosition?: boolean | undefined;
|
|
518
518
|
hasCloser?: boolean | undefined;
|
|
@@ -521,7 +521,7 @@ declare const ModalResponsive: React.ForwardRefExoticComponent<import("./index-b
|
|
|
521
521
|
defaultMatchMediaValue?: boolean | (() => boolean) | undefined;
|
|
522
522
|
} & React.RefAttributes<HTMLDivElement>> & {
|
|
523
523
|
Header: React.FC<HeaderProps>;
|
|
524
|
-
Content: React.FC<import("./typings-
|
|
524
|
+
Content: React.FC<import("./typings-88b743b5").ContentProps>;
|
|
525
525
|
Footer: React.FC<FooterProps>;
|
|
526
526
|
Controls: React.FC<ControlsProps>;
|
|
527
527
|
};
|
|
@@ -879,7 +879,7 @@ declare const IconButton: React.ForwardRefExoticComponent<{
|
|
|
879
879
|
className?: string;
|
|
880
880
|
}> | ReactElement;
|
|
881
881
|
view?: "primary" | "secondary" | "tertiary" | "negative" | "transparent" | undefined;
|
|
882
|
-
size?: "s" | "xs" | 24 | 32 | 40 |
|
|
882
|
+
size?: "s" | "xs" | 48 | 56 | 24 | 32 | 40 | "xxs" | undefined;
|
|
883
883
|
className?: string | undefined;
|
|
884
884
|
alignIcon?: "center" | "right" | "left" | undefined;
|
|
885
885
|
dataTestId?: string | undefined;
|
|
@@ -1029,12 +1029,14 @@ type BaseSelectProps = {
|
|
|
1029
1029
|
multiple?: boolean;
|
|
1030
1030
|
/**
|
|
1031
1031
|
* Размер компонента
|
|
1032
|
+
* @description s, m, l, xl deprecated, используйте вместо них 48, 56, 64, 72 соответственно
|
|
1032
1033
|
*/
|
|
1033
|
-
size?: 's' | 'm' | 'l' | 'xl';
|
|
1034
|
+
size?: 's' | 'm' | 'l' | 'xl' | 48 | 56 | 64 | 72;
|
|
1034
1035
|
/**
|
|
1035
1036
|
* Размер пунктов меню
|
|
1037
|
+
* @description s, m, l, xl deprecated, используйте вместо них 48, 56, 64, 72 соответственно
|
|
1036
1038
|
*/
|
|
1037
|
-
optionsSize?: 's' | 'm' | 'l' | 'xl';
|
|
1039
|
+
optionsSize?: 's' | 'm' | 'l' | 'xl' | 48 | 56 | 64 | 72;
|
|
1038
1040
|
/**
|
|
1039
1041
|
* Растягивает компонент на ширину контейнера
|
|
1040
1042
|
*/
|
|
@@ -1299,8 +1301,9 @@ type OptionsListProps = {
|
|
|
1299
1301
|
scrollbarClassName?: string;
|
|
1300
1302
|
/**
|
|
1301
1303
|
* Размер компонента
|
|
1304
|
+
* @description s, m, l, xl deprecated, используйте вместо них 48, 56, 64, 72 соответственно
|
|
1302
1305
|
*/
|
|
1303
|
-
size?: 's' | 'm' | 'l' | 'xl';
|
|
1306
|
+
size?: 's' | 'm' | 'l' | 'xl' | 48 | 56 | 64 | 72;
|
|
1304
1307
|
/**
|
|
1305
1308
|
* Компонент пункта меню
|
|
1306
1309
|
*/
|
|
@@ -1402,8 +1405,9 @@ type OptgroupProps = {
|
|
|
1402
1405
|
className?: string;
|
|
1403
1406
|
/**
|
|
1404
1407
|
* Размер компонента
|
|
1408
|
+
* @description s, m, l, xl deprecated, используйте вместо них 48, 56, 64, 72 соответственно
|
|
1405
1409
|
*/
|
|
1406
|
-
size?: 's' | 'm' | 'l' | 'xl';
|
|
1410
|
+
size?: 's' | 'm' | 'l' | 'xl' | 48 | 56 | 64 | 72;
|
|
1407
1411
|
/**
|
|
1408
1412
|
* Заголовок группы
|
|
1409
1413
|
*/
|
|
@@ -1420,8 +1424,9 @@ type OptionProps = {
|
|
|
1420
1424
|
className?: string;
|
|
1421
1425
|
/**
|
|
1422
1426
|
* Размер компонента
|
|
1427
|
+
* @description s, m, l, xl deprecated, используйте вместо них 48, 56, 64, 72 соответственно
|
|
1423
1428
|
*/
|
|
1424
|
-
size?: 's' | 'm' | 'l' | 'xl';
|
|
1429
|
+
size?: 's' | 'm' | 'l' | 'xl' | 48 | 56 | 64 | 72;
|
|
1425
1430
|
/**
|
|
1426
1431
|
* Контент пункта меню
|
|
1427
1432
|
*/
|
|
@@ -1579,8 +1584,8 @@ type SelectProps = BaseSelectProps & AdditionalMobileProps & ConditionalMobilePr
|
|
|
1579
1584
|
};
|
|
1580
1585
|
export { BottomSheet, CLOSE_OFFSET, HEADER_OFFSET, FormControlProps, FormControl, ModalResponsive as Modal, ModalContext, getModalTestIds, Position, PopoverProps, Popover, FooterProps$0 as FooterProps, Footer$0 as Footer, HeaderProps$0 as HeaderProps, Header$0 as Header, SwipeableBackdropProps, SwipeableBackdrop, Typography, typographyPresets, TitleResponsive, getDefaultWeight, IconButtonProps, IconButton, Content, AnyObject, OptionShape, GroupShape, BaseSelectChangePayload, BaseSelectProps, FieldProps, ArrowProps, OptionsListProps, OptgroupProps, OptionProps, CheckmarkProps, SearchProps, SelectFieldProps, AdditionalMobileProps, BottomSheetSelectMobileProps, ModalSelectMobileProps, SelectModalMobileProps, SelectMobileProps, SelectDesktopProps, SelectProps };
|
|
1581
1586
|
export type { BottomSheetProps, BottomSheetTitleAlign, HeaderProps as ModalHeaderProps, FooterProps as ModalFooterProps, TitleProps, TextProps, Color };
|
|
1582
|
-
export { ModalResponsiveProps as ModalProps } from "./typings-
|
|
1583
|
-
export type { ContentProps as ModalContentProps } from "./typings-
|
|
1587
|
+
export { ModalResponsiveProps as ModalProps } from "./typings-88b743b5";
|
|
1588
|
+
export type { ContentProps as ModalContentProps } from "./typings-88b743b5";
|
|
1584
1589
|
export * from "./use-skeleton-1328ead9";
|
|
1585
1590
|
export * from "./Component.desktop-ebda875c";
|
|
1586
1591
|
export * from "./Component.mobile-ebda875c";
|
|
@@ -3,9 +3,10 @@ import { BaseModalProps } from "./index-bdb4c6b9";
|
|
|
3
3
|
type ModalDesktopProps = BaseModalProps & {
|
|
4
4
|
/**
|
|
5
5
|
* Ширина модального окна
|
|
6
|
-
* @default
|
|
6
|
+
* @default 600
|
|
7
|
+
* @description s, m, l, xl deprecated, используйте вместо них 500, 600, 800, 1140 соответственно
|
|
7
8
|
*/
|
|
8
|
-
size?: 's' | 'm' | 'l' | 'xl' | 'fullscreen';
|
|
9
|
+
size?: 's' | 'm' | 'l' | 'xl' | 'fullscreen' | 500 | 600 | 800 | 1140;
|
|
9
10
|
/**
|
|
10
11
|
* Растягивает модальное окно на весь экран
|
|
11
12
|
* @deprecated Используйте размер fullscreen
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactNode, RefObject } from 'react';
|
|
2
|
-
import { BaseSelectProps, GroupShape, OptionShape } from "./typings-
|
|
2
|
+
import { BaseSelectProps, GroupShape, OptionShape } from "./typings-70284312";
|
|
3
3
|
declare const isGroup: (item: OptionShape | GroupShape) => item is GroupShape;
|
|
4
4
|
declare const isOptionShape: (item: OptionShape | string | null) => item is OptionShape;
|
|
5
5
|
declare const joinOptions: ({ selected, selectedMultiple, }: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alfalab/core-components-international-phone-input",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"license": "MIT",
|
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
"react": "^16.9.0 || ^17.0.1 || ^18.0.0"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@alfalab/core-components-input-autocomplete": "
|
|
18
|
-
"@alfalab/core-components-input": "^14.
|
|
19
|
-
"@alfalab/core-components-select": "^17.
|
|
17
|
+
"@alfalab/core-components-input-autocomplete": "12.0.0",
|
|
18
|
+
"@alfalab/core-components-input": "^14.3.0",
|
|
19
|
+
"@alfalab/core-components-select": "^17.3.0",
|
|
20
20
|
"@alfalab/core-components-shared": "^0.9.1",
|
|
21
21
|
"@alfalab/core-components-mq": "^4.2.0",
|
|
22
22
|
"@alfalab/hooks": "^1.13.0",
|