@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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
:root {
|
|
2
2
|
} /* deprecated */ :root {
|
|
3
|
-
--color-light-
|
|
3
|
+
--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 */
|
|
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 */
|
|
5
5
|
} :root {
|
|
6
6
|
} :root {
|
|
@@ -26,5 +26,5 @@
|
|
|
26
26
|
} .open {
|
|
27
27
|
transform: var(--arrow-transform);
|
|
28
28
|
} .linkOpen:not(:hover) {
|
|
29
|
-
background-color: var(--color-light-
|
|
29
|
+
background-color: var(--color-light-neutral-translucent-100);
|
|
30
30
|
}
|
|
@@ -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/cssm/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/cssm');
|
|
11
12
|
require('@alfalab/core-components-select/cssm/shared');
|
|
12
13
|
require('./field/Component.js');
|
|
13
14
|
require('@alfalab/core-components-button/cssm');
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
type TextElementType = HTMLParagraphElement | HTMLSpanElement | HTMLDivElement;
|
|
2
|
+
type WidthUnit = number | string;
|
|
3
|
+
type TextSkeletonProps = {
|
|
4
|
+
/**
|
|
5
|
+
* Кол-во строк текста
|
|
6
|
+
*/
|
|
7
|
+
rows?: number;
|
|
8
|
+
/**
|
|
9
|
+
* Ширина строки
|
|
10
|
+
*/
|
|
11
|
+
width?: WidthUnit | WidthUnit[];
|
|
12
|
+
};
|
|
13
|
+
export { TextElementType, TextSkeletonProps };
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { ReactNode } from "react";
|
|
4
|
+
import { CloserProps } from "./index-ebda875c";
|
|
5
|
+
type NavigationBarProps = {
|
|
6
|
+
/**
|
|
7
|
+
* Контент шапки
|
|
8
|
+
*/
|
|
9
|
+
children?: ReactNode;
|
|
10
|
+
/**
|
|
11
|
+
* Заголовок шапки
|
|
12
|
+
*/
|
|
13
|
+
title?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Подзаголовок (доступен только в мобильной версии)
|
|
16
|
+
*/
|
|
17
|
+
subtitle?: ReactNode;
|
|
18
|
+
/**
|
|
19
|
+
* Размер заголовка (compact доступен только в мобильной версии)
|
|
20
|
+
*/
|
|
21
|
+
titleSize?: 'default' | 'compact';
|
|
22
|
+
/**
|
|
23
|
+
* Доп. класс для аддонов
|
|
24
|
+
*/
|
|
25
|
+
addonClassName?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Слот слева
|
|
28
|
+
*/
|
|
29
|
+
leftAddons?: ReactNode;
|
|
30
|
+
/**
|
|
31
|
+
* Слот справа
|
|
32
|
+
*/
|
|
33
|
+
rightAddons?: ReactNode;
|
|
34
|
+
/**
|
|
35
|
+
* Дополнительный класс для closer
|
|
36
|
+
*/
|
|
37
|
+
closerClassName?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Слот снизу
|
|
40
|
+
*/
|
|
41
|
+
bottomAddons?: ReactNode;
|
|
42
|
+
/**
|
|
43
|
+
* Наличие компонента крестика
|
|
44
|
+
*/
|
|
45
|
+
hasCloser?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Наличие кнопки "Назад"
|
|
48
|
+
*/
|
|
49
|
+
hasBackButton?: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Дополнительный класс для правого аддона
|
|
52
|
+
*/
|
|
53
|
+
backButtonClassName?: string;
|
|
54
|
+
/**
|
|
55
|
+
* Дополнительный класс
|
|
56
|
+
*/
|
|
57
|
+
className?: string;
|
|
58
|
+
/**
|
|
59
|
+
* Дополнительный класс для контента
|
|
60
|
+
*/
|
|
61
|
+
contentClassName?: string;
|
|
62
|
+
/**
|
|
63
|
+
* Дополнительный класс для нижнего аддона
|
|
64
|
+
*/
|
|
65
|
+
bottomAddonsClassName?: string;
|
|
66
|
+
/**
|
|
67
|
+
* Выравнивание заголовка
|
|
68
|
+
*/
|
|
69
|
+
align?: 'left' | 'center';
|
|
70
|
+
/**
|
|
71
|
+
* Обрезать ли заголовок
|
|
72
|
+
*/
|
|
73
|
+
trim?: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* Фиксирует шапку
|
|
76
|
+
*/
|
|
77
|
+
sticky?: boolean;
|
|
78
|
+
/**
|
|
79
|
+
* Идентификатор для систем автоматизированного тестирования
|
|
80
|
+
*/
|
|
81
|
+
dataTestId?: string;
|
|
82
|
+
/**
|
|
83
|
+
* Фоновое изображение
|
|
84
|
+
*/
|
|
85
|
+
imageUrl?: string;
|
|
86
|
+
/**
|
|
87
|
+
* Иконка closer.
|
|
88
|
+
*/
|
|
89
|
+
closerIcon?: React.ElementType;
|
|
90
|
+
/**
|
|
91
|
+
* Обработчик закрытия
|
|
92
|
+
*/
|
|
93
|
+
onClose?: CloserProps['onClose'];
|
|
94
|
+
/**
|
|
95
|
+
* обработчик клика по кнопке "назад"
|
|
96
|
+
*/
|
|
97
|
+
onBack?: () => void;
|
|
98
|
+
/**
|
|
99
|
+
* Вид шапки - мобильный или десктоп
|
|
100
|
+
*/
|
|
101
|
+
view: 'desktop' | 'mobile';
|
|
102
|
+
/**
|
|
103
|
+
* Ссылка на родительскую ноду overflow: auto
|
|
104
|
+
*/
|
|
105
|
+
scrollableParentRef?: React.RefObject<HTMLDivElement>;
|
|
106
|
+
};
|
|
107
|
+
type ContentParams = {
|
|
108
|
+
extraClassName?: string;
|
|
109
|
+
wrapperRef?: React.RefObject<HTMLDivElement>;
|
|
110
|
+
style?: React.CSSProperties;
|
|
111
|
+
hidden?: boolean;
|
|
112
|
+
};
|
|
113
|
+
export { NavigationBarProps, ContentParams };
|