@alfalab/core-components-picker-button 11.2.0 → 11.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Component-0816e61d.d.ts +5 -0
- package/Component-72dda473.d.ts +53 -0
- package/Component-c44170fe.d.ts +281 -0
- package/Component.desktop-785df74d.d.ts +1 -1
- package/Component.desktop.d.ts +1 -1
- package/Component.desktop.js +3 -2
- package/Component.mobile-d7e9f69d.d.ts +1 -1
- package/Component.mobile.d.ts +3 -3
- package/Component.responsive.d.ts +5 -7
- package/Component.responsive.js +1 -0
- package/consts-f777ba1a.d.ts +2 -0
- package/cssm/Component-0816e61d.d.ts +5 -0
- package/cssm/Component-72dda473.d.ts +53 -0
- package/cssm/Component-c44170fe.d.ts +281 -0
- package/cssm/Component.desktop-785df74d.d.ts +1 -1
- package/cssm/Component.desktop.d.ts +1 -1
- package/cssm/Component.desktop.js +2 -1
- package/cssm/Component.mobile-d7e9f69d.d.ts +1 -1
- package/cssm/Component.mobile.d.ts +3 -3
- package/cssm/Component.responsive.d.ts +5 -7
- package/cssm/Component.responsive.js +1 -0
- package/cssm/consts-f777ba1a.d.ts +2 -0
- package/cssm/desktop/index.js +1 -0
- package/cssm/field/Component.d.ts +3 -837
- package/cssm/field/index.module.css +2 -2
- package/cssm/{index-5cb54b98.d.ts → index-081223cb.d.ts} +8 -2
- package/cssm/index-785df74d.d.ts +2 -0
- package/{esm/Component.responsive-3109f463.d.ts → cssm/index-c44170fe.d.ts} +2 -10
- package/cssm/index-d7e9f69d.d.ts +2 -0
- package/cssm/index-ebda875c.d.ts +80 -0
- package/cssm/index.js +1 -0
- package/cssm/types-1b036d4b.d.ts +13 -0
- package/cssm/types-1c79e231.d.ts +113 -0
- package/cssm/typings-0816e61d.d.ts +1320 -0
- package/cssm/useSkeleton-1b036d4b.d.ts +40 -0
- package/cssm/utils-d2597f31.d.ts +41 -0
- package/desktop/index.js +1 -0
- package/esm/Component-0816e61d.d.ts +5 -0
- package/esm/Component-72dda473.d.ts +53 -0
- package/esm/Component-c44170fe.d.ts +281 -0
- package/esm/Component.desktop-785df74d.d.ts +1 -1
- package/esm/Component.desktop.d.ts +1 -1
- package/esm/Component.desktop.js +3 -2
- package/esm/Component.mobile-d7e9f69d.d.ts +1 -1
- package/esm/Component.mobile.d.ts +3 -3
- package/esm/Component.responsive.d.ts +5 -7
- package/esm/Component.responsive.js +1 -0
- package/esm/consts-f777ba1a.d.ts +2 -0
- package/esm/desktop/index.js +1 -0
- package/esm/field/Component.d.ts +3 -837
- package/esm/field/Component.js +1 -1
- package/esm/field/index.css +8 -8
- package/esm/{index-5cb54b98.d.ts → index-081223cb.d.ts} +8 -2
- package/esm/index-785df74d.d.ts +2 -0
- package/{Component.responsive-3109f463.d.ts → esm/index-c44170fe.d.ts} +2 -10
- package/esm/index-d7e9f69d.d.ts +2 -0
- package/esm/index-ebda875c.d.ts +80 -0
- package/esm/index.css +5 -5
- package/esm/index.js +1 -0
- package/esm/option/Component.js +1 -1
- package/esm/option/index.css +4 -4
- package/esm/types-1b036d4b.d.ts +13 -0
- package/esm/types-1c79e231.d.ts +113 -0
- package/esm/typings-0816e61d.d.ts +1320 -0
- package/esm/useSkeleton-1b036d4b.d.ts +40 -0
- package/esm/utils-d2597f31.d.ts +41 -0
- package/field/Component.d.ts +3 -837
- package/field/Component.js +1 -1
- package/field/index.css +8 -8
- package/{index-5cb54b98.d.ts → index-081223cb.d.ts} +8 -2
- package/index-785df74d.d.ts +2 -0
- package/{modern/Component.responsive-3109f463.d.ts → index-c44170fe.d.ts} +2 -10
- package/index-d7e9f69d.d.ts +2 -0
- package/index-ebda875c.d.ts +80 -0
- package/index.css +5 -5
- package/index.js +1 -0
- package/modern/Component-0816e61d.d.ts +5 -0
- package/modern/Component-72dda473.d.ts +53 -0
- package/modern/Component-c44170fe.d.ts +281 -0
- package/modern/Component.desktop-785df74d.d.ts +1 -1
- package/modern/Component.desktop.d.ts +1 -1
- package/modern/Component.desktop.js +3 -2
- package/modern/Component.mobile-d7e9f69d.d.ts +1 -1
- package/modern/Component.mobile.d.ts +3 -3
- package/modern/Component.responsive.d.ts +5 -7
- package/modern/Component.responsive.js +1 -0
- package/modern/consts-f777ba1a.d.ts +2 -0
- package/modern/desktop/index.js +1 -0
- package/modern/field/Component.d.ts +3 -837
- package/modern/field/Component.js +1 -1
- package/modern/field/index.css +8 -8
- package/modern/{index-5cb54b98.d.ts → index-081223cb.d.ts} +8 -2
- package/modern/index-785df74d.d.ts +2 -0
- package/{cssm/Component.responsive-3109f463.d.ts → modern/index-c44170fe.d.ts} +2 -10
- package/modern/index-d7e9f69d.d.ts +2 -0
- package/modern/index-ebda875c.d.ts +80 -0
- package/modern/index.css +5 -5
- package/modern/index.js +1 -0
- package/modern/option/Component.js +1 -1
- package/modern/option/index.css +4 -4
- package/modern/types-1b036d4b.d.ts +13 -0
- package/modern/types-1c79e231.d.ts +113 -0
- package/modern/typings-0816e61d.d.ts +1320 -0
- package/modern/useSkeleton-1b036d4b.d.ts +40 -0
- package/modern/utils-d2597f31.d.ts +41 -0
- package/option/Component.js +1 -1
- package/option/index.css +4 -4
- package/package.json +4 -3
- package/src/Component.desktop.tsx +3 -0
- package/src/Component.mobile.tsx +3 -1
- package/src/Component.responsive.tsx +6 -6
- package/src/field/index.module.css +1 -1
- package/types-1b036d4b.d.ts +13 -0
- package/types-1c79e231.d.ts +113 -0
- package/typings-0816e61d.d.ts +1320 -0
- package/useSkeleton-1b036d4b.d.ts +40 -0
- package/utils-d2597f31.d.ts +41 -0
- /package/{Component-5cb54b98.d.ts → Component-081223cb.d.ts} +0 -0
- /package/cssm/{Component-5cb54b98.d.ts → Component-081223cb.d.ts} +0 -0
- /package/esm/{Component-5cb54b98.d.ts → Component-081223cb.d.ts} +0 -0
- /package/modern/{Component-5cb54b98.d.ts → Component-081223cb.d.ts} +0 -0
package/field/Component.js
CHANGED
|
@@ -17,7 +17,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
17
17
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
18
18
|
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
19
19
|
|
|
20
|
-
var styles = {"iconContainer":"picker-
|
|
20
|
+
var styles = {"iconContainer":"picker-button__iconContainer_1c5yv","addonsContainer":"picker-button__addonsContainer_1c5yv","showControlIcon":"picker-button__showControlIcon_1c5yv","open":"picker-button__open_1c5yv","linkOpen":"picker-button__linkOpen_1c5yv"};
|
|
21
21
|
require('./index.css')
|
|
22
22
|
|
|
23
23
|
var Field = function (_a) {
|
package/field/index.css
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1w27n */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
|
-
--color-light-
|
|
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 */
|
|
6
6
|
} :root {
|
|
7
7
|
} :root {
|
|
@@ -17,15 +17,15 @@
|
|
|
17
17
|
} :root {
|
|
18
18
|
} :root {
|
|
19
19
|
--arrow-transform: rotate(180deg);
|
|
20
|
-
} .picker-
|
|
20
|
+
} .picker-button__iconContainer_1c5yv {
|
|
21
21
|
display: flex;
|
|
22
22
|
transition: transform 0.15s ease-in-out;
|
|
23
|
-
} .picker-
|
|
23
|
+
} .picker-button__addonsContainer_1c5yv {
|
|
24
24
|
display: flex
|
|
25
|
-
} .picker-
|
|
25
|
+
} .picker-button__addonsContainer_1c5yv.picker-button__showControlIcon_1c5yv {
|
|
26
26
|
margin-right: var(--gap-2xs);
|
|
27
|
-
} .picker-
|
|
27
|
+
} .picker-button__open_1c5yv {
|
|
28
28
|
transform: var(--arrow-transform);
|
|
29
|
-
} .picker-
|
|
30
|
-
background-color: var(--color-light-
|
|
29
|
+
} .picker-button__linkOpen_1c5yv:not(:hover) {
|
|
30
|
+
background-color: var(--color-light-neutral-translucent-100);
|
|
31
31
|
}
|
|
@@ -4,9 +4,15 @@ import { PaddingType } from "./index-72dda473";
|
|
|
4
4
|
/* eslint-disable no-plusplus, no-param-reassign */
|
|
5
5
|
import { MaskitoPlugin, MaskitoPostprocessor, MaskitoPreprocessor } from "@maskito/core";
|
|
6
6
|
import { useCustomWebkitScrollbar } from "./useCustomWebkitScrollbar-a216f694";
|
|
7
|
-
declare function createPaddingStyle(padding?: PaddingType): undefined | React.CSSProperties;
|
|
8
7
|
declare const isClient: () => boolean;
|
|
8
|
+
declare function isApplePlatform(): boolean;
|
|
9
|
+
declare function isIOS(): boolean;
|
|
10
|
+
declare const os: {
|
|
11
|
+
isIOS: typeof isIOS;
|
|
12
|
+
isApplePlatform: typeof isApplePlatform;
|
|
13
|
+
};
|
|
9
14
|
declare const getDataTestId: (dataTestId?: string, element?: string) => string | undefined;
|
|
15
|
+
declare function createPaddingStyle(padding?: PaddingType): undefined | React.CSSProperties;
|
|
10
16
|
declare function easeInOutQuad(x: number): number;
|
|
11
17
|
declare const easingFns: {
|
|
12
18
|
easeInOutQuad: typeof easeInOutQuad;
|
|
@@ -51,5 +57,5 @@ declare const maskUtils: {
|
|
|
51
57
|
declare const hooks: {
|
|
52
58
|
useCustomWebkitScrollbar: typeof useCustomWebkitScrollbar;
|
|
53
59
|
};
|
|
54
|
-
export {
|
|
60
|
+
export { isClient, os, getDataTestId, createPaddingStyle, easingFns, fnUtils, maskUtils, hooks };
|
|
55
61
|
export * from "./browser-a216f694";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import React from
|
|
3
|
-
type FormControlProps = Omit<BaseFormControlProps,
|
|
2
|
+
import React from "react";
|
|
3
|
+
type FormControlProps = Omit<BaseFormControlProps, "styles" | "colorStyles"> & {
|
|
4
4
|
/**
|
|
5
5
|
* Контрольная точка, с нее начинается desktop версия
|
|
6
6
|
* @default 1024
|
|
@@ -12,15 +12,7 @@ type FormControlProps = Omit<BaseFormControlProps, 'styles' | 'colorStyles'> & {
|
|
|
12
12
|
defaultMatchMediaValue?: boolean | (() => boolean);
|
|
13
13
|
};
|
|
14
14
|
declare const FormControl: React.ForwardRefExoticComponent<Omit<BaseFormControlProps, "styles" | "colorStyles"> & {
|
|
15
|
-
/**
|
|
16
|
-
* Контрольная точка, с нее начинается desktop версия
|
|
17
|
-
* @default 1024
|
|
18
|
-
*/
|
|
19
15
|
breakpoint?: number | undefined;
|
|
20
|
-
/**
|
|
21
|
-
* Значение по-умолчанию для хука useMatchMedia
|
|
22
|
-
*/
|
|
23
16
|
defaultMatchMediaValue?: boolean | (() => boolean) | undefined;
|
|
24
17
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
25
|
-
export * from "./Component-5cb54b98";
|
|
26
18
|
export { FormControlProps, FormControl };
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { ButtonHTMLAttributes, ElementType, FC, AnchorHTMLAttributes, ReactElement } from "react";
|
|
4
|
+
import { ButtonProps } from "@alfalab/core-components-button";
|
|
5
|
+
interface CloserProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
6
|
+
/**
|
|
7
|
+
* Вид компонента
|
|
8
|
+
*/
|
|
9
|
+
view: "desktop" | "mobile";
|
|
10
|
+
/**
|
|
11
|
+
* Дополнительный класс
|
|
12
|
+
*/
|
|
13
|
+
className?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Позиция крестика
|
|
16
|
+
*/
|
|
17
|
+
align?: "left" | "right";
|
|
18
|
+
/**
|
|
19
|
+
* Фиксирует крестик
|
|
20
|
+
*/
|
|
21
|
+
sticky?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Иконка
|
|
24
|
+
*/
|
|
25
|
+
icon?: ElementType;
|
|
26
|
+
/**
|
|
27
|
+
* Идентификатор для систем автоматизированного тестирования
|
|
28
|
+
*/
|
|
29
|
+
dataTestId?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Коллбэк закрытия.
|
|
32
|
+
*/
|
|
33
|
+
onClose?: (event: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>, reason?: "backdropClick" | "escapeKeyDown" | "closerClick") => void;
|
|
34
|
+
}
|
|
35
|
+
declare const Closer: FC<CloserProps>;
|
|
36
|
+
type IconButtonProps = {
|
|
37
|
+
/**
|
|
38
|
+
* Компонент иконки
|
|
39
|
+
*/
|
|
40
|
+
icon: ElementType<{
|
|
41
|
+
className?: string;
|
|
42
|
+
}> | ReactElement;
|
|
43
|
+
/**
|
|
44
|
+
* Тип кнопки
|
|
45
|
+
*/
|
|
46
|
+
view?: "primary" | "secondary" | "transparent" | "tertiary" | "negative";
|
|
47
|
+
/**
|
|
48
|
+
* Размер компонента
|
|
49
|
+
*/
|
|
50
|
+
size?: "xxs" | "xs" | "s";
|
|
51
|
+
/**
|
|
52
|
+
* Дополнительный класс
|
|
53
|
+
*/
|
|
54
|
+
className?: string;
|
|
55
|
+
/**
|
|
56
|
+
* Выравнивание иконки
|
|
57
|
+
* @default 'center'
|
|
58
|
+
*/
|
|
59
|
+
alignIcon?: "left" | "center" | "right";
|
|
60
|
+
/**
|
|
61
|
+
* Идентификатор для систем автоматизированного тестирования
|
|
62
|
+
*/
|
|
63
|
+
dataTestId?: string;
|
|
64
|
+
/**
|
|
65
|
+
* Набор цветов для компонента
|
|
66
|
+
*/
|
|
67
|
+
colors?: "default" | "inverted";
|
|
68
|
+
} & Omit<ButtonHTMLAttributes<HTMLButtonElement>, "size"> & Pick<ButtonProps, "Component" | "href" | "loading" | "breakpoint"> & Pick<AnchorHTMLAttributes<HTMLAnchorElement>, "target" | "download">;
|
|
69
|
+
declare const IconButton: React.ForwardRefExoticComponent<{
|
|
70
|
+
icon: ElementType<{
|
|
71
|
+
className?: string;
|
|
72
|
+
}> | ReactElement;
|
|
73
|
+
view?: "primary" | "secondary" | "tertiary" | "negative" | "transparent" | undefined;
|
|
74
|
+
size?: "s" | "xs" | "xxs" | undefined;
|
|
75
|
+
className?: string | undefined;
|
|
76
|
+
alignIcon?: "center" | "right" | "left" | undefined;
|
|
77
|
+
dataTestId?: string | undefined;
|
|
78
|
+
colors?: "default" | "inverted" | undefined;
|
|
79
|
+
} & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "size"> & Pick<ButtonProps, "href" | "Component" | "loading" | "breakpoint"> & Pick<React.AnchorHTMLAttributes<HTMLAnchorElement>, "download" | "target"> & React.RefAttributes<HTMLButtonElement>>;
|
|
80
|
+
export { CloserProps, Closer, IconButtonProps, IconButton };
|
package/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: nx5b1 */
|
|
2
2
|
:root {
|
|
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 */
|
|
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 */
|
|
@@ -16,13 +16,13 @@
|
|
|
16
16
|
--gap-m: 16px;
|
|
17
17
|
} :root {
|
|
18
18
|
} :root {
|
|
19
|
-
} .picker-
|
|
19
|
+
} .picker-button__container_1074s {
|
|
20
20
|
min-width: auto;
|
|
21
|
-
} .cc-picker-button.picker-
|
|
21
|
+
} .cc-picker-button.picker-button__optionsPopover_1074s.picker-button__sideGap_1074s {
|
|
22
22
|
padding: 0 var(--gap-xs);
|
|
23
|
-
} .cc-picker-button .picker-
|
|
23
|
+
} .cc-picker-button .picker-button__option_1074s {
|
|
24
24
|
padding: 0 var(--gap-m)
|
|
25
|
-
} .cc-picker-button .picker-
|
|
25
|
+
} .cc-picker-button .picker-button__option_1074s:before {
|
|
26
26
|
/* Удаляем разделители у опций выпадающего списка. */
|
|
27
27
|
display: none;
|
|
28
28
|
}
|
package/index.js
CHANGED
|
@@ -8,6 +8,7 @@ require('react');
|
|
|
8
8
|
require('@alfalab/hooks');
|
|
9
9
|
require('./Component.desktop.js');
|
|
10
10
|
require('classnames');
|
|
11
|
+
require('@alfalab/core-components-popover');
|
|
11
12
|
require('@alfalab/core-components-select/shared');
|
|
12
13
|
require('./field/Component.js');
|
|
13
14
|
require('@alfalab/core-components-button');
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { BackgroundColorType, GraphicColorType } from "./index-72dda473";
|
|
4
|
+
type IconColorType = Extract<GraphicColorType, 'positive' | 'attention' | 'link' | 'negative' | 'tertiary' | 'secondary' | 'primary'>;
|
|
5
|
+
type BadgeProps = {
|
|
6
|
+
/**
|
|
7
|
+
* Дополнительный класс
|
|
8
|
+
*/
|
|
9
|
+
className?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Вид компонента
|
|
12
|
+
*/
|
|
13
|
+
view: 'icon' | 'count';
|
|
14
|
+
/**
|
|
15
|
+
* Размер компонента (только для view=icon)
|
|
16
|
+
* //deprecated(используйте height для view=count )
|
|
17
|
+
*/
|
|
18
|
+
size?: 's' | 'm' | 'l' | 'xl';
|
|
19
|
+
/**
|
|
20
|
+
* Видимость белой обводки вокруг иконки
|
|
21
|
+
*/
|
|
22
|
+
visibleIconOutline?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Видимость цветной обводки вокруг иконки (только для view=icon)
|
|
25
|
+
*/
|
|
26
|
+
visibleColorOutline?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Контент компонента
|
|
29
|
+
*/
|
|
30
|
+
content?: React.ReactElement | number;
|
|
31
|
+
/**
|
|
32
|
+
* Высота компонента, min = 16; max = 48 (только для view=count)
|
|
33
|
+
*/
|
|
34
|
+
height?: number;
|
|
35
|
+
/**
|
|
36
|
+
* Цветовое оформление бейджа при view='count'
|
|
37
|
+
*/
|
|
38
|
+
color?: Extract<BackgroundColorType, 'accent' | 'primary' | 'specialbg-secondary-transparent'>;
|
|
39
|
+
/**
|
|
40
|
+
* Цветовое оформление бейджа при view='icon'
|
|
41
|
+
*/
|
|
42
|
+
iconColor?: IconColorType;
|
|
43
|
+
/**
|
|
44
|
+
* Цвет подложки под иконкой
|
|
45
|
+
*/
|
|
46
|
+
iconUnderlayColor?: Extract<GraphicColorType, 'primary' | 'static-light'>;
|
|
47
|
+
/**
|
|
48
|
+
* Идентификатор для систем автоматизированного тестирования
|
|
49
|
+
*/
|
|
50
|
+
dataTestId?: string;
|
|
51
|
+
};
|
|
52
|
+
declare const Badge: ({ className, size, view, visibleIconOutline, visibleColorOutline, content, height, iconColor, color, iconUnderlayColor, dataTestId, }: BadgeProps) => React.JSX.Element;
|
|
53
|
+
export { IconColorType, BadgeProps, Badge };
|
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { ChangeEvent, ElementType, HTMLAttributes, InputHTMLAttributes, MouseEvent, ReactNode, RefAttributes } from "react";
|
|
4
|
+
import { FormControlProps } from "./index-c44170fe";
|
|
5
|
+
type BaseInputProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'type' | 'value' | 'defaultValue' | 'onChange' | 'onClick' | 'onMouseDown' | 'enterKeyHint'> & {
|
|
6
|
+
/**
|
|
7
|
+
* Значение поля ввода
|
|
8
|
+
*/
|
|
9
|
+
value?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Начальное значение поля
|
|
12
|
+
*/
|
|
13
|
+
defaultValue?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Растягивает компонент на ширину контейнера
|
|
16
|
+
*/
|
|
17
|
+
block?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Крестик для очистки поля
|
|
20
|
+
*/
|
|
21
|
+
clear?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Размер компонента
|
|
24
|
+
*/
|
|
25
|
+
size?: 's' | 'm' | 'l' | 'xl';
|
|
26
|
+
/**
|
|
27
|
+
* Набор цветов для компонента
|
|
28
|
+
*/
|
|
29
|
+
colors?: 'default' | 'inverted';
|
|
30
|
+
/**
|
|
31
|
+
* Отображение ошибки
|
|
32
|
+
*/
|
|
33
|
+
error?: ReactNode | boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Отображение иконки успеха
|
|
36
|
+
*/
|
|
37
|
+
success?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Текст подсказки
|
|
40
|
+
*/
|
|
41
|
+
hint?: ReactNode;
|
|
42
|
+
/**
|
|
43
|
+
* Лейбл компонента
|
|
44
|
+
*/
|
|
45
|
+
label?: React.ReactNode;
|
|
46
|
+
/**
|
|
47
|
+
* Вид лейбла внутри / снаружи
|
|
48
|
+
*/
|
|
49
|
+
labelView?: 'inner' | 'outer';
|
|
50
|
+
/**
|
|
51
|
+
* Атрибут type
|
|
52
|
+
*/
|
|
53
|
+
type?: 'number' | 'card' | 'email' | 'money' | 'password' | 'tel' | 'text';
|
|
54
|
+
/**
|
|
55
|
+
* Ref для обертки input
|
|
56
|
+
*/
|
|
57
|
+
wrapperRef?: React.Ref<HTMLDivElement> | null;
|
|
58
|
+
/**
|
|
59
|
+
* Слот слева
|
|
60
|
+
*/
|
|
61
|
+
leftAddons?: React.ReactNode;
|
|
62
|
+
/**
|
|
63
|
+
* Слот справа
|
|
64
|
+
*/
|
|
65
|
+
rightAddons?: React.ReactNode;
|
|
66
|
+
/**
|
|
67
|
+
* Свойства для обертки левых аддонов
|
|
68
|
+
*/
|
|
69
|
+
leftAddonsProps?: HTMLAttributes<HTMLDivElement>;
|
|
70
|
+
/**
|
|
71
|
+
* Свойства для обертки правых аддонов
|
|
72
|
+
*/
|
|
73
|
+
rightAddonsProps?: HTMLAttributes<HTMLDivElement>;
|
|
74
|
+
/**
|
|
75
|
+
* Слот под инпутом
|
|
76
|
+
*/
|
|
77
|
+
bottomAddons?: React.ReactNode;
|
|
78
|
+
/**
|
|
79
|
+
* Дополнительный класс
|
|
80
|
+
*/
|
|
81
|
+
className?: string;
|
|
82
|
+
/**
|
|
83
|
+
* Дополнительный класс для поля
|
|
84
|
+
*/
|
|
85
|
+
fieldClassName?: string;
|
|
86
|
+
/**
|
|
87
|
+
* Дополнительный класс инпута
|
|
88
|
+
*/
|
|
89
|
+
inputClassName?: string;
|
|
90
|
+
/**
|
|
91
|
+
* Дополнительный класс для лейбла
|
|
92
|
+
*/
|
|
93
|
+
labelClassName?: string;
|
|
94
|
+
/**
|
|
95
|
+
* Дополнительный класс для аддонов
|
|
96
|
+
*/
|
|
97
|
+
addonsClassName?: string;
|
|
98
|
+
/**
|
|
99
|
+
* Класс, который будет установлен при фокусе
|
|
100
|
+
*/
|
|
101
|
+
focusedClassName?: string;
|
|
102
|
+
/**
|
|
103
|
+
* Класс, который будет установлен, если в поле есть значение
|
|
104
|
+
*/
|
|
105
|
+
filledClassName?: string;
|
|
106
|
+
/**
|
|
107
|
+
* Обработчик поля ввода
|
|
108
|
+
*/
|
|
109
|
+
onChange?: (event: ChangeEvent<HTMLInputElement>, payload: {
|
|
110
|
+
value: string;
|
|
111
|
+
}) => void;
|
|
112
|
+
/**
|
|
113
|
+
* Обработчик нажатия на кнопку очистки
|
|
114
|
+
*/
|
|
115
|
+
onClear?: (event: MouseEvent<HTMLButtonElement>) => void;
|
|
116
|
+
/**
|
|
117
|
+
* Обработчик клика по полю
|
|
118
|
+
*/
|
|
119
|
+
onClick?: (event: MouseEvent<HTMLDivElement>) => void;
|
|
120
|
+
/**
|
|
121
|
+
* Обработчик MouseDown по полю
|
|
122
|
+
*/
|
|
123
|
+
onMouseDown?: (event: MouseEvent<HTMLDivElement>) => void;
|
|
124
|
+
/**
|
|
125
|
+
* Обработчик MouseUp по полю
|
|
126
|
+
*/
|
|
127
|
+
onMouseUp?: (event: MouseEvent<HTMLDivElement>) => void;
|
|
128
|
+
/**
|
|
129
|
+
* Компонент FormControl
|
|
130
|
+
*/
|
|
131
|
+
FormControlComponent?: ElementType<FormControlProps & RefAttributes<HTMLDivElement>>;
|
|
132
|
+
/**
|
|
133
|
+
* Идентификатор для систем автоматизированного тестирования
|
|
134
|
+
*/
|
|
135
|
+
dataTestId?: string;
|
|
136
|
+
/**
|
|
137
|
+
* Запрещает ввод с клавиатуры
|
|
138
|
+
*/
|
|
139
|
+
disableUserInput?: boolean;
|
|
140
|
+
};
|
|
141
|
+
declare const BaseInput: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "value" | "size" | "type" | "defaultValue" | "onChange" | "onClick" | "onMouseDown" | "enterKeyHint"> & {
|
|
142
|
+
/**
|
|
143
|
+
* Значение поля ввода
|
|
144
|
+
*/
|
|
145
|
+
value?: string | undefined;
|
|
146
|
+
/**
|
|
147
|
+
* Начальное значение поля
|
|
148
|
+
*/
|
|
149
|
+
defaultValue?: string | undefined;
|
|
150
|
+
/**
|
|
151
|
+
* Растягивает компонент на ширину контейнера
|
|
152
|
+
*/
|
|
153
|
+
block?: boolean | undefined;
|
|
154
|
+
/**
|
|
155
|
+
* Крестик для очистки поля
|
|
156
|
+
*/
|
|
157
|
+
clear?: boolean | undefined;
|
|
158
|
+
/**
|
|
159
|
+
* Размер компонента
|
|
160
|
+
*/
|
|
161
|
+
size?: "s" | "m" | "l" | "xl" | undefined;
|
|
162
|
+
/**
|
|
163
|
+
* Набор цветов для компонента
|
|
164
|
+
*/
|
|
165
|
+
colors?: "default" | "inverted" | undefined;
|
|
166
|
+
/**
|
|
167
|
+
* Отображение ошибки
|
|
168
|
+
*/
|
|
169
|
+
error?: ReactNode | boolean;
|
|
170
|
+
/**
|
|
171
|
+
* Отображение иконки успеха
|
|
172
|
+
*/
|
|
173
|
+
success?: boolean | undefined;
|
|
174
|
+
/**
|
|
175
|
+
* Текст подсказки
|
|
176
|
+
*/
|
|
177
|
+
hint?: ReactNode;
|
|
178
|
+
/**
|
|
179
|
+
* Лейбл компонента
|
|
180
|
+
*/
|
|
181
|
+
label?: React.ReactNode;
|
|
182
|
+
/**
|
|
183
|
+
* Вид лейбла внутри / снаружи
|
|
184
|
+
*/
|
|
185
|
+
labelView?: "inner" | "outer" | undefined;
|
|
186
|
+
/**
|
|
187
|
+
* Атрибут type
|
|
188
|
+
*/
|
|
189
|
+
type?: "number" | "text" | "tel" | "email" | "password" | "card" | "money" | undefined;
|
|
190
|
+
/**
|
|
191
|
+
* Ref для обертки input
|
|
192
|
+
*/
|
|
193
|
+
wrapperRef?: React.Ref<HTMLDivElement> | undefined;
|
|
194
|
+
/**
|
|
195
|
+
* Слот слева
|
|
196
|
+
*/
|
|
197
|
+
leftAddons?: React.ReactNode;
|
|
198
|
+
/**
|
|
199
|
+
* Слот справа
|
|
200
|
+
*/
|
|
201
|
+
rightAddons?: React.ReactNode;
|
|
202
|
+
/**
|
|
203
|
+
* Свойства для обертки левых аддонов
|
|
204
|
+
*/
|
|
205
|
+
leftAddonsProps?: React.HTMLAttributes<HTMLDivElement> | undefined;
|
|
206
|
+
/**
|
|
207
|
+
* Свойства для обертки правых аддонов
|
|
208
|
+
*/
|
|
209
|
+
rightAddonsProps?: React.HTMLAttributes<HTMLDivElement> | undefined;
|
|
210
|
+
/**
|
|
211
|
+
* Слот под инпутом
|
|
212
|
+
*/
|
|
213
|
+
bottomAddons?: React.ReactNode;
|
|
214
|
+
/**
|
|
215
|
+
* Дополнительный класс
|
|
216
|
+
*/
|
|
217
|
+
className?: string | undefined;
|
|
218
|
+
/**
|
|
219
|
+
* Дополнительный класс для поля
|
|
220
|
+
*/
|
|
221
|
+
fieldClassName?: string | undefined;
|
|
222
|
+
/**
|
|
223
|
+
* Дополнительный класс инпута
|
|
224
|
+
*/
|
|
225
|
+
inputClassName?: string | undefined;
|
|
226
|
+
/**
|
|
227
|
+
* Дополнительный класс для лейбла
|
|
228
|
+
*/
|
|
229
|
+
labelClassName?: string | undefined;
|
|
230
|
+
/**
|
|
231
|
+
* Дополнительный класс для аддонов
|
|
232
|
+
*/
|
|
233
|
+
addonsClassName?: string | undefined;
|
|
234
|
+
/**
|
|
235
|
+
* Класс, который будет установлен при фокусе
|
|
236
|
+
*/
|
|
237
|
+
focusedClassName?: string | undefined;
|
|
238
|
+
/**
|
|
239
|
+
* Класс, который будет установлен, если в поле есть значение
|
|
240
|
+
*/
|
|
241
|
+
filledClassName?: string | undefined;
|
|
242
|
+
/**
|
|
243
|
+
* Обработчик поля ввода
|
|
244
|
+
*/
|
|
245
|
+
onChange?: ((event: ChangeEvent<HTMLInputElement>, payload: {
|
|
246
|
+
value: string;
|
|
247
|
+
}) => void) | undefined;
|
|
248
|
+
/**
|
|
249
|
+
* Обработчик нажатия на кнопку очистки
|
|
250
|
+
*/
|
|
251
|
+
onClear?: ((event: MouseEvent<HTMLButtonElement>) => void) | undefined;
|
|
252
|
+
/**
|
|
253
|
+
* Обработчик клика по полю
|
|
254
|
+
*/
|
|
255
|
+
onClick?: ((event: MouseEvent<HTMLDivElement>) => void) | undefined;
|
|
256
|
+
/**
|
|
257
|
+
* Обработчик MouseDown по полю
|
|
258
|
+
*/
|
|
259
|
+
onMouseDown?: ((event: MouseEvent<HTMLDivElement>) => void) | undefined;
|
|
260
|
+
/**
|
|
261
|
+
* Обработчик MouseUp по полю
|
|
262
|
+
*/
|
|
263
|
+
onMouseUp?: ((event: MouseEvent<HTMLDivElement>) => void) | undefined;
|
|
264
|
+
/**
|
|
265
|
+
* Компонент FormControl
|
|
266
|
+
*/
|
|
267
|
+
FormControlComponent?: React.ElementType<Omit<import("./index-c44170fe").BaseFormControlProps, "styles" | "colorStyles"> & {
|
|
268
|
+
breakpoint?: number | undefined;
|
|
269
|
+
defaultMatchMediaValue?: boolean | (() => boolean) | undefined;
|
|
270
|
+
} & React.RefAttributes<HTMLDivElement>> | undefined;
|
|
271
|
+
/**
|
|
272
|
+
* Идентификатор для систем автоматизированного тестирования
|
|
273
|
+
*/
|
|
274
|
+
dataTestId?: string | undefined;
|
|
275
|
+
/**
|
|
276
|
+
* Запрещает ввод с клавиатуры
|
|
277
|
+
*/
|
|
278
|
+
disableUserInput?: boolean | undefined;
|
|
279
|
+
} & React.RefAttributes<HTMLInputElement>>;
|
|
280
|
+
export * from "./Component-72dda473";
|
|
281
|
+
export { BaseInputProps, BaseInput };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { BaseFormControlProps } from "./
|
|
3
|
+
import { BaseFormControlProps } from "./index-c44170fe";
|
|
4
4
|
type FormControlDesktopProps = Omit<BaseFormControlProps, 'styles' | 'colorStyles'>;
|
|
5
5
|
declare const FormControlDesktop: React.ForwardRefExoticComponent<FormControlDesktopProps & React.RefAttributes<HTMLDivElement>>;
|
|
6
6
|
export { FormControlDesktopProps, FormControlDesktop };
|
|
@@ -25,7 +25,7 @@ type PickerButtonDesktopProps = Omit<BaseSelectProps, 'placeholder' | 'Arrow' |
|
|
|
25
25
|
*/
|
|
26
26
|
showArrow?: boolean;
|
|
27
27
|
};
|
|
28
|
-
declare const PickerButtonDesktop: React.ForwardRefExoticComponent<Omit<BaseSelectProps, "size" | "placeholder" | "onFocus" | "selected" | "multiple" | "
|
|
28
|
+
declare const PickerButtonDesktop: React.ForwardRefExoticComponent<Omit<BaseSelectProps, "size" | "placeholder" | "onFocus" | "selected" | "multiple" | "options" | "hint" | "showSearch" | "searchProps" | "autocomplete" | "allowUnselect" | "closeOnSelect" | "Arrow" | "Search"> & Pick<ButtonProps, "view" | "leftAddons" | "rightAddons" | "loading"> & {
|
|
29
29
|
options: Array<BaseSelectProps['options'][0] & {
|
|
30
30
|
/**
|
|
31
31
|
* Иконка, отображающаяся слева от текстового представления пункта
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { forwardRef } from 'react';
|
|
2
2
|
import cn from 'classnames';
|
|
3
|
+
import { Popover } from '@alfalab/core-components-popover/modern';
|
|
3
4
|
import { BaseSelect, OptionsList, Optgroup } from '@alfalab/core-components-select/modern/shared';
|
|
4
5
|
import { Field } from './field/Component.js';
|
|
5
6
|
import { Option } from './option/Component.js';
|
|
@@ -10,7 +11,7 @@ import '@alfalab/icons-glyph/ChevronDownMIcon';
|
|
|
10
11
|
import '@alfalab/icons-glyph/MoreMIcon';
|
|
11
12
|
import '@alfalab/icons-glyph/MoreSIcon';
|
|
12
13
|
|
|
13
|
-
const styles = {"container":"picker-
|
|
14
|
+
const styles = {"container":"picker-button__container_1074s","optionsPopover":"picker-button__optionsPopover_1074s","sideGap":"picker-button__sideGap_1074s","option":"picker-button__option_1074s"};
|
|
14
15
|
require('./index.css')
|
|
15
16
|
|
|
16
17
|
const SIDE_POSITIONS = ['right', 'right-start', 'right-end', 'left', 'left-start', 'left-end'];
|
|
@@ -27,7 +28,7 @@ const PickerButtonDesktop = forwardRef(({ OptionsList: OptionsList$1 = OptionsLi
|
|
|
27
28
|
showArrow,
|
|
28
29
|
breakpoint: 1,
|
|
29
30
|
};
|
|
30
|
-
return (React.createElement(BaseSelect, { ...restProps, optionProps: { Checkmark: null }, ref: ref, Option: Option$1, Field: Field$1, size: size === 'm' ? 'm' : 's', fieldProps: {
|
|
31
|
+
return (React.createElement(BaseSelect, { ...restProps, Popover: Popover, view: 'desktop', optionProps: { Checkmark: null }, ref: ref, Option: Option$1, Field: Field$1, size: size === 'm' ? 'm' : 's', fieldProps: {
|
|
31
32
|
...fieldDefaultProps,
|
|
32
33
|
...fieldProps,
|
|
33
34
|
}, Optgroup: Optgroup$1, OptionsList: OptionsList$1, className: cn(styles.container, className), popperClassName: cn('cc-picker-button', styles.optionsPopover, popperClassName, {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { BaseFormControlProps } from "./
|
|
3
|
+
import { BaseFormControlProps } from "./index-c44170fe";
|
|
4
4
|
type FormControlMobileProps = Omit<BaseFormControlProps, 'styles' | 'colorStyles'>;
|
|
5
5
|
declare const FormControlMobile: React.ForwardRefExoticComponent<FormControlMobileProps & React.RefAttributes<HTMLDivElement>>;
|
|
6
6
|
export { FormControlMobileProps, FormControlMobile };
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { AdditionalMobileProps } from "@alfalab/core-components-select/shared";
|
|
3
|
+
import { AdditionalMobileProps, BottomSheetSelectMobileProps } from "@alfalab/core-components-select/shared";
|
|
4
4
|
import { PickerButtonDesktopProps } from "./desktop/index";
|
|
5
|
-
type PickerButtonMobileProps = Omit<PickerButtonDesktopProps, 'OptionsList' | 'Checkmark' | 'onScroll'> & AdditionalMobileProps & {
|
|
5
|
+
type PickerButtonMobileProps = Omit<PickerButtonDesktopProps, 'OptionsList' | 'Checkmark' | 'onScroll'> & AdditionalMobileProps & BottomSheetSelectMobileProps & {
|
|
6
6
|
/**
|
|
7
7
|
* Контрольная точка для кнопки, с нее начинается desktop версия
|
|
8
8
|
* @default 1024
|
|
9
9
|
*/
|
|
10
10
|
breakpoint?: number;
|
|
11
11
|
};
|
|
12
|
-
declare const PickerButtonMobile: React.ForwardRefExoticComponent<Omit<PickerButtonDesktopProps, "onScroll" | "
|
|
12
|
+
declare const PickerButtonMobile: React.ForwardRefExoticComponent<Omit<PickerButtonDesktopProps, "onScroll" | "Checkmark" | "OptionsList"> & AdditionalMobileProps & BottomSheetSelectMobileProps & {
|
|
13
13
|
/**
|
|
14
14
|
* Контрольная точка для кнопки, с нее начинается desktop версия
|
|
15
15
|
* @default 1024
|