skillgrid 0.0.25-dev-40846-input.1178444 → 0.0.25-dev-38682-image.1191040
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/dist/components/Image/Image.type.d.ts +10 -1
- package/dist/components/InputBase/Input.type.d.ts +2 -2
- package/dist/components/InputBase/InputBase.type.d.ts +1 -1
- package/dist/components/List/List.d.ts +3 -2
- package/dist/components/Loader/Loader.type.d.ts +1 -1
- package/dist/components/Palette/Palette.d.ts +1 -0
- package/dist/components/TextArea/TextArea.type.d.ts +1 -1
- package/dist/components/TextArea/lib/constants.d.ts +17 -17
- package/dist/components/TextArea/lib/getters.d.ts +1 -1
- package/dist/components/TextInput/TextInput.type.d.ts +1 -1
- package/dist/components/TextInput/lib/constants.d.ts +3 -4
- package/dist/components/TextInput/lib/getters.d.ts +6 -10
- package/dist/index.cjs.js +11 -11
- package/dist/index.css +1 -1
- package/dist/index.es.js +1232 -1280
- package/package.json +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { HTMLAttributes, ImgHTMLAttributes } from 'react';
|
|
1
2
|
export type ImageStatus = 'loading' | 'loaded' | 'error';
|
|
2
3
|
export type ImageRenderMap = Record<'loader' | 'error' | 'image', React.ReactElement>;
|
|
3
|
-
export interface ImageProps extends Omit<
|
|
4
|
+
export interface ImageProps extends Omit<ImgHTMLAttributes<HTMLImageElement>, 'loading' | 'alt' | 'onLoad' | 'onError' | 'width' | 'height' | 'style'> {
|
|
4
5
|
/**
|
|
5
6
|
* Тип подгрузки картинки
|
|
6
7
|
* @default 'lazy'
|
|
@@ -20,6 +21,14 @@ export interface ImageProps extends Omit<React.ImgHTMLAttributes<HTMLImageElemen
|
|
|
20
21
|
* Дополнительный CSS класс
|
|
21
22
|
*/
|
|
22
23
|
className?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Пропсы для контейнера
|
|
26
|
+
*/
|
|
27
|
+
containerProps?: HTMLAttributes<HTMLDivElement>;
|
|
28
|
+
/**
|
|
29
|
+
* Инлайн‑стили, применяемые к контейнеру изображения
|
|
30
|
+
*/
|
|
31
|
+
style?: ImgHTMLAttributes<HTMLImageElement>['style'];
|
|
23
32
|
/**
|
|
24
33
|
* Test ID для тестирования
|
|
25
34
|
* @default 'image'
|
|
@@ -6,11 +6,11 @@ export type InputComponent = 'input' | 'textarea';
|
|
|
6
6
|
/**
|
|
7
7
|
* Размер компонента Input
|
|
8
8
|
*/
|
|
9
|
-
export type InputSize = '
|
|
9
|
+
export type InputSize = 'small' | 'medium' | 'large';
|
|
10
10
|
/**
|
|
11
11
|
* Размер компонента InputWrapper
|
|
12
12
|
*/
|
|
13
|
-
export type InputWrapperSize = '
|
|
13
|
+
export type InputWrapperSize = 'small' | 'medium' | 'large';
|
|
14
14
|
/**
|
|
15
15
|
* Пропсы для компонента Input
|
|
16
16
|
*/
|
|
@@ -2,7 +2,7 @@ import { ReactNode, InputHTMLAttributes, TextareaHTMLAttributes, HTMLAttributes,
|
|
|
2
2
|
/**
|
|
3
3
|
* Размеры для компонента InputBase
|
|
4
4
|
*/
|
|
5
|
-
export type InputBaseSize = '
|
|
5
|
+
export type InputBaseSize = 'small' | 'medium' | 'large';
|
|
6
6
|
/**
|
|
7
7
|
* Типы компонентов для InputBase
|
|
8
8
|
*/
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
1
2
|
import { ListProps } from './List.type';
|
|
2
|
-
export declare const List:
|
|
3
|
-
Item:
|
|
3
|
+
export declare const List: React.ForwardRefExoticComponent<ListProps & React.RefAttributes<HTMLOListElement | HTMLUListElement>> & {
|
|
4
|
+
Item: React.FC<import('./ListItem/ListItem').ListItemProps>;
|
|
4
5
|
};
|
|
@@ -9,7 +9,7 @@ export interface BaseLoaderProps {
|
|
|
9
9
|
* Вариант цвета лоадера
|
|
10
10
|
* @default 'accent'
|
|
11
11
|
*/
|
|
12
|
-
variant?: 'accent' | 'neutral' | 'positive' | 'negative' | 'contrast' | 'gray' | 'special';
|
|
12
|
+
variant?: 'accent' | 'neutral' | 'positive' | 'negative' | 'contrast' | 'gray' | 'special' | 'custom';
|
|
13
13
|
/**
|
|
14
14
|
* Дополнительный CSS класс
|
|
15
15
|
*/
|
|
@@ -2,22 +2,22 @@
|
|
|
2
2
|
* Константы для размеров TextArea
|
|
3
3
|
*/
|
|
4
4
|
export declare const SIZES: {
|
|
5
|
-
readonly
|
|
6
|
-
readonly
|
|
5
|
+
readonly SMALL: "small";
|
|
6
|
+
readonly MEDIUM: "medium";
|
|
7
7
|
};
|
|
8
8
|
/**
|
|
9
9
|
* Константы для позиций
|
|
10
10
|
*/
|
|
11
11
|
export declare const POSITIONS: {
|
|
12
|
-
readonly
|
|
13
|
-
readonly
|
|
12
|
+
readonly SMALL: "12px";
|
|
13
|
+
readonly MEDIUM: "16px";
|
|
14
14
|
};
|
|
15
15
|
/**
|
|
16
16
|
* Константы для размеров иконок
|
|
17
17
|
*/
|
|
18
18
|
export declare const ICON_SIZES: {
|
|
19
|
-
readonly
|
|
20
|
-
readonly
|
|
19
|
+
readonly SMALL: "xs";
|
|
20
|
+
readonly MEDIUM: "sm";
|
|
21
21
|
};
|
|
22
22
|
/**
|
|
23
23
|
* Константы для resize режимов
|
|
@@ -32,32 +32,32 @@ export declare const RESIZE_MODES: {
|
|
|
32
32
|
* Константы для высот wrapper
|
|
33
33
|
*/
|
|
34
34
|
export declare const WRAPPER_HEIGHTS: {
|
|
35
|
-
readonly
|
|
36
|
-
readonly
|
|
35
|
+
readonly SMALL: "112px";
|
|
36
|
+
readonly MEDIUM: "56px";
|
|
37
37
|
};
|
|
38
38
|
/**
|
|
39
39
|
* Константы для высот textarea
|
|
40
40
|
*/
|
|
41
41
|
export declare const TEXTAREA_HEIGHTS: {
|
|
42
|
-
readonly
|
|
43
|
-
readonly
|
|
42
|
+
readonly SMALL: "48px";
|
|
43
|
+
readonly MEDIUM: "22px";
|
|
44
44
|
};
|
|
45
45
|
/**
|
|
46
46
|
* Константы для padding
|
|
47
47
|
*/
|
|
48
48
|
export declare const PADDING: {
|
|
49
|
-
readonly
|
|
50
|
-
readonly
|
|
51
|
-
readonly
|
|
52
|
-
readonly
|
|
49
|
+
readonly SMALL: "12px 12px 12px 12px";
|
|
50
|
+
readonly MEDIUM: "16px 16px 16px 16px";
|
|
51
|
+
readonly MEDIUM_WITH_PREFIX: "12px 16px 12px 16px";
|
|
52
|
+
readonly MEDIUM_FLOATING_LABEL: "8px 16px 8px 16px";
|
|
53
53
|
};
|
|
54
54
|
/**
|
|
55
55
|
* Константы для minHeight значений
|
|
56
56
|
*/
|
|
57
57
|
export declare const MIN_HEIGHTS: {
|
|
58
|
-
readonly
|
|
59
|
-
readonly
|
|
60
|
-
readonly
|
|
58
|
+
readonly SMALL: 48;
|
|
59
|
+
readonly MEDIUM: 56;
|
|
60
|
+
readonly LARGE: 112;
|
|
61
61
|
};
|
|
62
62
|
export type TextAreaSize = (typeof SIZES)[keyof typeof SIZES];
|
|
63
63
|
export type TextAreaPosition = (typeof POSITIONS)[keyof typeof POSITIONS];
|
|
@@ -23,7 +23,7 @@ export declare const getPadding: (size: TextAreaSize, minHeight?: number, should
|
|
|
23
23
|
/**
|
|
24
24
|
* Получает размер для InputBase в зависимости от размера TextArea и minHeight
|
|
25
25
|
*/
|
|
26
|
-
export declare const getInputBaseSize: (size: TextAreaSize, minHeight?: number) => "
|
|
26
|
+
export declare const getInputBaseSize: (size: TextAreaSize, minHeight?: number) => "small" | "medium";
|
|
27
27
|
/**
|
|
28
28
|
* Получает размер иконки в зависимости от размера TextArea
|
|
29
29
|
*/
|
|
@@ -2,7 +2,7 @@ import { InputHTMLAttributes, ReactNode, ChangeEvent } from 'react';
|
|
|
2
2
|
/**
|
|
3
3
|
* Размеры для компонента TextInput
|
|
4
4
|
*/
|
|
5
|
-
export type TextInputSize = '
|
|
5
|
+
export type TextInputSize = 'small' | 'medium' | 'large';
|
|
6
6
|
/**
|
|
7
7
|
* Пропсы для компонента TextInput
|
|
8
8
|
*/
|
|
@@ -2,9 +2,8 @@
|
|
|
2
2
|
* Константы для размеров TextInput
|
|
3
3
|
*/
|
|
4
4
|
export declare const SIZES: {
|
|
5
|
-
readonly
|
|
6
|
-
readonly
|
|
7
|
-
readonly
|
|
8
|
-
readonly XL: "XL";
|
|
5
|
+
readonly SMALL: "small";
|
|
6
|
+
readonly MEDIUM: "medium";
|
|
7
|
+
readonly LARGE: "large";
|
|
9
8
|
};
|
|
10
9
|
export type TextInputSize = (typeof SIZES)[keyof typeof SIZES];
|
|
@@ -21,21 +21,17 @@ export declare const getHeight: (size: TextInputSize) => string;
|
|
|
21
21
|
*/
|
|
22
22
|
export declare const getPrefixSuffixSpacing: (size: TextInputSize) => number;
|
|
23
23
|
/**
|
|
24
|
-
* Получает стили для
|
|
24
|
+
* Получает стили для большого размера
|
|
25
25
|
*/
|
|
26
|
-
export declare const
|
|
26
|
+
export declare const getLargeSizeStyles: (height: string, padding: string, spacing: number) => SizeStyles;
|
|
27
27
|
/**
|
|
28
|
-
* Получает стили для
|
|
28
|
+
* Получает стили для среднего размера
|
|
29
29
|
*/
|
|
30
|
-
export declare const
|
|
30
|
+
export declare const getMediumSizeStyles: (height: string, padding: string, spacing: number) => SizeStyles;
|
|
31
31
|
/**
|
|
32
|
-
* Получает стили для
|
|
32
|
+
* Получает стили для малого размера
|
|
33
33
|
*/
|
|
34
|
-
export declare const
|
|
35
|
-
/**
|
|
36
|
-
* Получает стили для M размера
|
|
37
|
-
*/
|
|
38
|
-
export declare const getMSizeStyles: (height: string, padding: string, spacing: number) => SizeStyles;
|
|
34
|
+
export declare const getSmallSizeStyles: (height: string, padding: string, spacing: number) => SizeStyles;
|
|
39
35
|
/**
|
|
40
36
|
* Основная функция для получения стилей размеров
|
|
41
37
|
*/
|