@alfalab/core-components-table 2.2.41 → 2.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-5e1b8383.d.ts +5 -0
- package/Component-63dec22f.d.ts +167 -0
- package/Component-89a3cf4c.d.ts +6 -0
- package/Component-bdb4c6b9.d.ts +12 -0
- package/Component-e81c389f.d.ts +5 -0
- package/Component-ebda875c.d.ts +12 -0
- package/Component.desktop-63dec22f.d.ts +6 -0
- package/Component.desktop-785df74d.d.ts +6 -0
- package/Component.mobile-d7e9f69d.d.ts +6 -0
- package/Component.mobile-ebda875c.d.ts +6 -0
- package/Component.responsive-785df74d.d.ts +26 -0
- package/Context-bdb4c6b9.d.ts +4 -0
- package/ResponsiveContext-baf4875b.d.ts +5 -0
- package/component-89a3cf4c.d.ts +44 -0
- package/component.d.ts +5 -5
- package/component.js +1 -1
- package/components/index.js +1 -1
- package/components/pagination/Component.js +3 -3
- package/components/pagination/index.css +8 -8
- package/components/pagination/index.js +1 -1
- package/components/pagination/select-field/index.css +4 -4
- package/components/pagination/select-field/index.js +1 -1
- package/components/table/Component.js +1 -1
- package/components/table/index.css +7 -7
- package/components/tbody/Component.js +1 -1
- package/components/tbody/index.css +2 -2
- package/components/tcell/Component.d.ts +3 -2
- package/components/tcell/Component.js +1 -1
- package/components/tcell/index.css +6 -6
- package/components/texpandable-row/Component.d.ts +3 -2
- package/components/texpandable-row/Component.js +1 -1
- package/components/texpandable-row/index.css +5 -5
- package/components/thead/Component.js +1 -1
- package/components/thead/index.css +6 -6
- package/components/thead-cell/Component.d.ts +3 -2
- package/components/thead-cell/Component.js +1 -1
- package/components/thead-cell/index.css +10 -9
- package/components/trow/Component.d.ts +1 -1
- package/components/trow/Component.js +1 -1
- package/components/trow/index.css +8 -8
- package/components/tsortable-head-cell/Component.d.ts +2 -1
- package/components/tsortable-head-cell/Component.js +2 -2
- package/components/tsortable-head-cell/index.css +8 -10
- package/consts-f777ba1a.d.ts +2 -0
- package/cssm/Component-5e1b8383.d.ts +5 -0
- package/cssm/Component-63dec22f.d.ts +167 -0
- package/cssm/Component-89a3cf4c.d.ts +6 -0
- package/cssm/Component-bdb4c6b9.d.ts +12 -0
- package/cssm/Component-e81c389f.d.ts +5 -0
- package/cssm/Component-ebda875c.d.ts +12 -0
- package/cssm/Component.desktop-63dec22f.d.ts +6 -0
- package/cssm/Component.desktop-785df74d.d.ts +6 -0
- package/cssm/Component.mobile-d7e9f69d.d.ts +6 -0
- package/cssm/Component.mobile-ebda875c.d.ts +6 -0
- package/cssm/Component.responsive-785df74d.d.ts +26 -0
- package/cssm/Context-bdb4c6b9.d.ts +4 -0
- package/cssm/ResponsiveContext-baf4875b.d.ts +5 -0
- package/cssm/component-89a3cf4c.d.ts +44 -0
- package/cssm/component.d.ts +5 -5
- package/cssm/component.js +1 -1
- package/cssm/components/index.js +1 -1
- package/cssm/components/pagination/Component.js +2 -2
- package/cssm/components/pagination/index.js +1 -1
- package/cssm/components/tcell/Component.d.ts +3 -2
- package/cssm/components/texpandable-row/Component.d.ts +3 -2
- package/cssm/components/thead-cell/Component.d.ts +3 -2
- package/cssm/components/thead-cell/index.module.css +2 -1
- package/cssm/components/trow/Component.d.ts +1 -1
- package/cssm/components/tsortable-head-cell/Component.d.ts +2 -1
- package/cssm/components/tsortable-head-cell/Component.js +1 -1
- package/cssm/components/tsortable-head-cell/index.module.css +0 -2
- package/cssm/consts-f777ba1a.d.ts +2 -0
- package/cssm/desktop-63dec22f.d.ts +6 -0
- package/cssm/hook-5e1b8383.d.ts +75 -0
- package/cssm/hook-ebda875c.d.ts +48 -0
- package/cssm/index-136acbb1.d.ts +28 -0
- package/cssm/index-3109f463.d.ts +62 -0
- package/cssm/index-425c8522.d.ts +6 -0
- package/cssm/index-89a3cf4c.d.ts +3 -0
- package/cssm/index-bdb4c6b9.d.ts +2 -0
- package/cssm/index-c44170fe.d.ts +21 -0
- package/cssm/index-e81c389f.d.ts +3 -0
- package/cssm/index-ebda875c.d.ts +81 -0
- package/cssm/index-f12ee135.d.ts +3 -0
- package/cssm/index.js +1 -1
- package/cssm/mobile-96988a65.d.ts +2 -0
- package/cssm/types-425c8522.d.ts +259 -0
- package/cssm/types-ebda875c.d.ts +113 -0
- package/cssm/typings-5e1b8383.d.ts +550 -0
- package/cssm/typings-9211a437.d.ts +95 -0
- package/cssm/typings-bdb4c6b9.d.ts +52 -0
- package/cssm/utils-1574ad8b.d.ts +29 -0
- package/cssm/utils-49cc3c24.d.ts +8 -0
- package/cssm/utils-5e1b8383.d.ts +38 -0
- package/desktop-63dec22f.d.ts +6 -0
- package/esm/Component-5e1b8383.d.ts +5 -0
- package/esm/Component-63dec22f.d.ts +167 -0
- package/esm/Component-89a3cf4c.d.ts +6 -0
- package/esm/Component-bdb4c6b9.d.ts +12 -0
- package/esm/Component-e81c389f.d.ts +5 -0
- package/esm/Component-ebda875c.d.ts +12 -0
- package/esm/Component.desktop-63dec22f.d.ts +6 -0
- package/esm/Component.desktop-785df74d.d.ts +6 -0
- package/esm/Component.mobile-d7e9f69d.d.ts +6 -0
- package/esm/Component.mobile-ebda875c.d.ts +6 -0
- package/esm/Component.responsive-785df74d.d.ts +26 -0
- package/esm/Context-bdb4c6b9.d.ts +4 -0
- package/esm/ResponsiveContext-baf4875b.d.ts +5 -0
- package/esm/component-89a3cf4c.d.ts +44 -0
- package/esm/component.d.ts +5 -5
- package/esm/component.js +1 -1
- package/esm/components/index.js +1 -1
- package/esm/components/pagination/Component.js +3 -3
- package/esm/components/pagination/index.css +8 -8
- package/esm/components/pagination/index.js +1 -1
- package/esm/components/pagination/select-field/index.css +4 -4
- package/esm/components/pagination/select-field/index.js +1 -1
- package/esm/components/table/Component.js +1 -1
- package/esm/components/table/index.css +7 -7
- package/esm/components/tbody/Component.js +1 -1
- package/esm/components/tbody/index.css +2 -2
- package/esm/components/tcell/Component.d.ts +3 -2
- package/esm/components/tcell/Component.js +1 -1
- package/esm/components/tcell/index.css +6 -6
- package/esm/components/texpandable-row/Component.d.ts +3 -2
- package/esm/components/texpandable-row/Component.js +1 -1
- package/esm/components/texpandable-row/index.css +5 -5
- package/esm/components/thead/Component.js +1 -1
- package/esm/components/thead/index.css +6 -6
- package/esm/components/thead-cell/Component.d.ts +3 -2
- package/esm/components/thead-cell/Component.js +1 -1
- package/esm/components/thead-cell/index.css +10 -9
- package/esm/components/trow/Component.d.ts +1 -1
- package/esm/components/trow/Component.js +1 -1
- package/esm/components/trow/index.css +8 -8
- package/esm/components/tsortable-head-cell/Component.d.ts +2 -1
- package/esm/components/tsortable-head-cell/Component.js +2 -2
- package/esm/components/tsortable-head-cell/index.css +8 -10
- package/esm/consts-f777ba1a.d.ts +2 -0
- package/esm/desktop-63dec22f.d.ts +6 -0
- package/esm/hook-5e1b8383.d.ts +75 -0
- package/esm/hook-ebda875c.d.ts +48 -0
- package/esm/index-136acbb1.d.ts +28 -0
- package/esm/index-3109f463.d.ts +62 -0
- package/esm/index-425c8522.d.ts +6 -0
- package/esm/index-89a3cf4c.d.ts +3 -0
- package/esm/index-bdb4c6b9.d.ts +2 -0
- package/esm/index-c44170fe.d.ts +21 -0
- package/esm/index-e81c389f.d.ts +3 -0
- package/esm/index-ebda875c.d.ts +81 -0
- package/esm/index-f12ee135.d.ts +3 -0
- package/esm/index.js +1 -1
- package/esm/mobile-96988a65.d.ts +2 -0
- package/esm/types-425c8522.d.ts +259 -0
- package/esm/types-ebda875c.d.ts +113 -0
- package/esm/typings-5e1b8383.d.ts +550 -0
- package/esm/typings-9211a437.d.ts +95 -0
- package/esm/typings-bdb4c6b9.d.ts +52 -0
- package/esm/utils-1574ad8b.d.ts +29 -0
- package/esm/utils-49cc3c24.d.ts +8 -0
- package/esm/utils-5e1b8383.d.ts +38 -0
- package/hook-5e1b8383.d.ts +75 -0
- package/hook-ebda875c.d.ts +48 -0
- package/index-136acbb1.d.ts +28 -0
- package/index-3109f463.d.ts +62 -0
- package/index-425c8522.d.ts +6 -0
- package/index-89a3cf4c.d.ts +3 -0
- package/index-bdb4c6b9.d.ts +2 -0
- package/index-c44170fe.d.ts +21 -0
- package/index-e81c389f.d.ts +3 -0
- package/index-ebda875c.d.ts +81 -0
- package/index-f12ee135.d.ts +3 -0
- package/index.js +1 -1
- package/mobile-96988a65.d.ts +2 -0
- package/modern/Component-5e1b8383.d.ts +5 -0
- package/modern/Component-63dec22f.d.ts +167 -0
- package/modern/Component-89a3cf4c.d.ts +6 -0
- package/modern/Component-bdb4c6b9.d.ts +12 -0
- package/modern/Component-e81c389f.d.ts +5 -0
- package/modern/Component-ebda875c.d.ts +12 -0
- package/modern/Component.desktop-63dec22f.d.ts +6 -0
- package/modern/Component.desktop-785df74d.d.ts +6 -0
- package/modern/Component.mobile-d7e9f69d.d.ts +6 -0
- package/modern/Component.mobile-ebda875c.d.ts +6 -0
- package/modern/Component.responsive-785df74d.d.ts +26 -0
- package/modern/Context-bdb4c6b9.d.ts +4 -0
- package/modern/ResponsiveContext-baf4875b.d.ts +5 -0
- package/modern/component-89a3cf4c.d.ts +44 -0
- package/modern/component.d.ts +5 -5
- package/modern/component.js +1 -1
- package/modern/components/index.js +1 -1
- package/modern/components/pagination/Component.js +3 -3
- package/modern/components/pagination/index.css +8 -8
- package/modern/components/pagination/index.js +1 -1
- package/modern/components/pagination/select-field/index.css +4 -4
- package/modern/components/pagination/select-field/index.js +1 -1
- package/modern/components/table/Component.js +1 -1
- package/modern/components/table/index.css +7 -7
- package/modern/components/tbody/Component.js +1 -1
- package/modern/components/tbody/index.css +2 -2
- package/modern/components/tcell/Component.d.ts +3 -2
- package/modern/components/tcell/Component.js +1 -1
- package/modern/components/tcell/index.css +6 -6
- package/modern/components/texpandable-row/Component.d.ts +3 -2
- package/modern/components/texpandable-row/Component.js +1 -1
- package/modern/components/texpandable-row/index.css +5 -5
- package/modern/components/thead/Component.js +1 -1
- package/modern/components/thead/index.css +6 -6
- package/modern/components/thead-cell/Component.d.ts +3 -2
- package/modern/components/thead-cell/Component.js +1 -1
- package/modern/components/thead-cell/index.css +10 -9
- package/modern/components/trow/Component.d.ts +1 -1
- package/modern/components/trow/Component.js +1 -1
- package/modern/components/trow/index.css +8 -8
- package/modern/components/tsortable-head-cell/Component.d.ts +2 -1
- package/modern/components/tsortable-head-cell/Component.js +2 -2
- package/modern/components/tsortable-head-cell/index.css +8 -10
- package/modern/consts-f777ba1a.d.ts +2 -0
- package/modern/desktop-63dec22f.d.ts +6 -0
- package/modern/hook-5e1b8383.d.ts +75 -0
- package/modern/hook-ebda875c.d.ts +48 -0
- package/modern/index-136acbb1.d.ts +28 -0
- package/modern/index-3109f463.d.ts +62 -0
- package/modern/index-425c8522.d.ts +6 -0
- package/modern/index-89a3cf4c.d.ts +3 -0
- package/modern/index-bdb4c6b9.d.ts +2 -0
- package/modern/index-c44170fe.d.ts +21 -0
- package/modern/index-e81c389f.d.ts +3 -0
- package/modern/index-ebda875c.d.ts +81 -0
- package/modern/index-f12ee135.d.ts +3 -0
- package/modern/index.js +1 -1
- package/modern/mobile-96988a65.d.ts +2 -0
- package/modern/types-425c8522.d.ts +259 -0
- package/modern/types-ebda875c.d.ts +113 -0
- package/modern/typings-5e1b8383.d.ts +550 -0
- package/modern/typings-9211a437.d.ts +95 -0
- package/modern/typings-bdb4c6b9.d.ts +52 -0
- package/modern/utils-1574ad8b.d.ts +29 -0
- package/modern/utils-49cc3c24.d.ts +8 -0
- package/modern/utils-5e1b8383.d.ts +38 -0
- package/package.json +4 -4
- package/src/component.tsx +22 -0
- package/src/components/index.ts +9 -0
- package/src/components/pagination/Component.tsx +104 -0
- package/src/components/pagination/index.module.css +38 -0
- package/src/components/pagination/index.ts +1 -0
- package/src/components/pagination/select-field/index.module.css +13 -0
- package/src/components/pagination/select-field/index.tsx +25 -0
- package/src/components/table/Component.tsx +109 -0
- package/src/components/table/index.module.css +35 -0
- package/src/components/table/index.ts +1 -0
- package/src/components/table/utils.ts +19 -0
- package/src/components/table-context/index.tsx +28 -0
- package/src/components/tbody/Component.tsx +22 -0
- package/src/components/tbody/index.module.css +6 -0
- package/src/components/tbody/index.ts +1 -0
- package/src/components/tcell/Component.tsx +56 -0
- package/src/components/tcell/index.module.css +35 -0
- package/src/components/tcell/index.ts +1 -0
- package/src/components/texpandable-row/Component.tsx +58 -0
- package/src/components/texpandable-row/index.module.css +25 -0
- package/src/components/texpandable-row/index.ts +1 -0
- package/src/components/thead/Component.tsx +33 -0
- package/src/components/thead/index.module.css +32 -0
- package/src/components/thead/index.ts +1 -0
- package/src/components/thead-cell/Component.tsx +67 -0
- package/src/components/thead-cell/index.module.css +47 -0
- package/src/components/thead-cell/index.ts +1 -0
- package/src/components/trow/Component.tsx +56 -0
- package/src/components/trow/index.module.css +35 -0
- package/src/components/trow/index.ts +1 -0
- package/src/components/tsortable-head-cell/Component.tsx +50 -0
- package/src/components/tsortable-head-cell/index.module.css +41 -0
- package/src/components/tsortable-head-cell/index.ts +1 -0
- package/src/components/tsortable-head-cell/sort-icon-asc.tsx +16 -0
- package/src/components/tsortable-head-cell/sort-icon-desc.tsx +16 -0
- package/src/components/tsortable-head-cell/sort-icon-unset.tsx +16 -0
- package/src/index.ts +1 -0
- package/src/typings.ts +8 -0
- package/src/utils.ts +6 -0
- package/types-425c8522.d.ts +259 -0
- package/types-ebda875c.d.ts +113 -0
- package/typings-5e1b8383.d.ts +550 -0
- package/typings-9211a437.d.ts +95 -0
- package/typings-bdb4c6b9.d.ts +52 -0
- package/utils-1574ad8b.d.ts +29 -0
- package/utils-49cc3c24.d.ts +8 -0
- package/utils-5e1b8383.d.ts +38 -0
|
@@ -0,0 +1,550 @@
|
|
|
1
|
+
import { AriaAttributes, FC, FocusEvent, MouseEvent, ReactElement, ReactNode, RefAttributes, SVGProps } from 'react';
|
|
2
|
+
import { InputProps } from "./index-c44170fe";
|
|
3
|
+
import { PopoverProps } from "./index-ebda875c";
|
|
4
|
+
type AnyObject = Record<string, any>;
|
|
5
|
+
type OptionShape = {
|
|
6
|
+
/**
|
|
7
|
+
* Текстовое представление пункта
|
|
8
|
+
*/
|
|
9
|
+
key: string;
|
|
10
|
+
/**
|
|
11
|
+
* Контент, который будет отрисован в выпадающем списке и в поле при выборе
|
|
12
|
+
*/
|
|
13
|
+
content?: ReactNode;
|
|
14
|
+
/**
|
|
15
|
+
* Блокирует данный пункт для выбора
|
|
16
|
+
*/
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Разрешает показ компонента Checkmark, иногда нужно его убирать для показа контента ошибки или пустого состояния
|
|
20
|
+
*/
|
|
21
|
+
showCheckMark?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Дополнительные данные
|
|
24
|
+
*/
|
|
25
|
+
value?: any;
|
|
26
|
+
};
|
|
27
|
+
type GroupShape = {
|
|
28
|
+
/**
|
|
29
|
+
* Заголовок группы
|
|
30
|
+
*/
|
|
31
|
+
label?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Дочерние элементы
|
|
34
|
+
*/
|
|
35
|
+
options: OptionShape[];
|
|
36
|
+
};
|
|
37
|
+
type BaseSelectChangePayload = {
|
|
38
|
+
selected: OptionShape | null;
|
|
39
|
+
selectedMultiple: OptionShape[];
|
|
40
|
+
initiator: OptionShape | null;
|
|
41
|
+
name?: string;
|
|
42
|
+
};
|
|
43
|
+
type BaseSelectProps = {
|
|
44
|
+
/**
|
|
45
|
+
* Идентификатор для систем автоматизированного тестирования
|
|
46
|
+
*/
|
|
47
|
+
dataTestId?: string;
|
|
48
|
+
/**
|
|
49
|
+
* Дополнительный класс
|
|
50
|
+
*/
|
|
51
|
+
className?: string;
|
|
52
|
+
/**
|
|
53
|
+
* Дополнительный класс для поля
|
|
54
|
+
*/
|
|
55
|
+
fieldClassName?: string;
|
|
56
|
+
/**
|
|
57
|
+
* Дополнительный класс выпадающего меню
|
|
58
|
+
*/
|
|
59
|
+
optionsListClassName?: string;
|
|
60
|
+
/**
|
|
61
|
+
* Дополнительный класс для пункта меню
|
|
62
|
+
*/
|
|
63
|
+
optionClassName?: string;
|
|
64
|
+
/**
|
|
65
|
+
* Дополнительный класс для компонента группы пунктов
|
|
66
|
+
*/
|
|
67
|
+
optionGroupClassName?: string;
|
|
68
|
+
/**
|
|
69
|
+
* Дополнительный класс для поповера
|
|
70
|
+
*/
|
|
71
|
+
popperClassName?: string;
|
|
72
|
+
/**
|
|
73
|
+
* Список вариантов выбора
|
|
74
|
+
*/
|
|
75
|
+
options: Array<OptionShape | GroupShape>;
|
|
76
|
+
/**
|
|
77
|
+
* Атрибут id
|
|
78
|
+
*/
|
|
79
|
+
id?: string;
|
|
80
|
+
/**
|
|
81
|
+
* Атрибут name
|
|
82
|
+
*/
|
|
83
|
+
name?: string;
|
|
84
|
+
/**
|
|
85
|
+
* Управление возможностью выбора значения
|
|
86
|
+
*/
|
|
87
|
+
disabled?: boolean;
|
|
88
|
+
/**
|
|
89
|
+
* Начальное состояние селекта
|
|
90
|
+
*/
|
|
91
|
+
defaultOpen?: boolean;
|
|
92
|
+
/**
|
|
93
|
+
* Управление открытием
|
|
94
|
+
*/
|
|
95
|
+
open?: boolean;
|
|
96
|
+
/**
|
|
97
|
+
* Возможность выбрать несколько значений
|
|
98
|
+
*/
|
|
99
|
+
multiple?: boolean;
|
|
100
|
+
/**
|
|
101
|
+
* Размер компонента
|
|
102
|
+
*/
|
|
103
|
+
size?: 's' | 'm' | 'l' | 'xl';
|
|
104
|
+
/**
|
|
105
|
+
* Размер пунктов меню
|
|
106
|
+
*/
|
|
107
|
+
optionsSize?: 's' | 'm' | 'l' | 'xl';
|
|
108
|
+
/**
|
|
109
|
+
* Растягивает компонент на ширину контейнера
|
|
110
|
+
*/
|
|
111
|
+
block?: boolean;
|
|
112
|
+
/**
|
|
113
|
+
* Управляет шириной выпадающего меню.
|
|
114
|
+
* Ширину определяет контент, либо ширина равна ширине поля
|
|
115
|
+
*/
|
|
116
|
+
optionsListWidth?: 'content' | 'field';
|
|
117
|
+
/**
|
|
118
|
+
* Лейбл поля
|
|
119
|
+
*/
|
|
120
|
+
label?: ReactNode;
|
|
121
|
+
/**
|
|
122
|
+
* Вид лейбла внутри / снаружи
|
|
123
|
+
*/
|
|
124
|
+
labelView?: 'inner' | 'outer';
|
|
125
|
+
/**
|
|
126
|
+
* Плейсхолдер поля
|
|
127
|
+
*/
|
|
128
|
+
placeholder?: string;
|
|
129
|
+
/**
|
|
130
|
+
* Отображение ошибки
|
|
131
|
+
*/
|
|
132
|
+
error?: ReactNode | boolean;
|
|
133
|
+
/**
|
|
134
|
+
* Подсказка под полем
|
|
135
|
+
*/
|
|
136
|
+
hint?: ReactNode;
|
|
137
|
+
/**
|
|
138
|
+
* Возможность использовать селект как input-autocomplete
|
|
139
|
+
*/
|
|
140
|
+
autocomplete?: boolean;
|
|
141
|
+
/**
|
|
142
|
+
* Позволяет снять выбранное значение
|
|
143
|
+
*/
|
|
144
|
+
allowUnselect?: boolean;
|
|
145
|
+
/**
|
|
146
|
+
* Закрывать меню после выбора?
|
|
147
|
+
*/
|
|
148
|
+
closeOnSelect?: boolean;
|
|
149
|
+
/**
|
|
150
|
+
* При навигации с клавиатуры переходить от последнего пункта меню к первому и наоборот.
|
|
151
|
+
*/
|
|
152
|
+
circularNavigation?: boolean;
|
|
153
|
+
/**
|
|
154
|
+
* Запрещает поповеру менять свою позицию.
|
|
155
|
+
* Например, если места снизу недостаточно,то он все равно будет показан снизу
|
|
156
|
+
*/
|
|
157
|
+
preventFlip?: boolean;
|
|
158
|
+
/**
|
|
159
|
+
* Список value выбранных пунктов (controlled-селект)
|
|
160
|
+
*/
|
|
161
|
+
selected?: Array<string | OptionShape> | string | OptionShape | null;
|
|
162
|
+
/**
|
|
163
|
+
* Рендерит нативный селект вместо выпадающего меню. (на десктопе использовать только с multiple=false)
|
|
164
|
+
*/
|
|
165
|
+
nativeSelect?: boolean;
|
|
166
|
+
/**
|
|
167
|
+
* Позиционирование выпадающего списка
|
|
168
|
+
*/
|
|
169
|
+
popoverPosition?: PopoverProps['position'];
|
|
170
|
+
/**
|
|
171
|
+
* Количество видимых пунктов меню (5 = 5.5)
|
|
172
|
+
*/
|
|
173
|
+
visibleOptions?: number;
|
|
174
|
+
/**
|
|
175
|
+
* Кастомный рендер выбранного пункта
|
|
176
|
+
*/
|
|
177
|
+
valueRenderer?: ({ selected, selectedMultiple, }: {
|
|
178
|
+
selected?: OptionShape;
|
|
179
|
+
selectedMultiple: OptionShape[];
|
|
180
|
+
}) => ReactNode;
|
|
181
|
+
/**
|
|
182
|
+
* Компонент стрелки
|
|
183
|
+
*/
|
|
184
|
+
Arrow?: FC<ArrowProps> | null | false;
|
|
185
|
+
/**
|
|
186
|
+
* Компонент поля
|
|
187
|
+
*/
|
|
188
|
+
Field?: FC<FieldProps>;
|
|
189
|
+
/**
|
|
190
|
+
* Пропсы, которые будут прокинуты в компонент поля
|
|
191
|
+
*/
|
|
192
|
+
fieldProps?: unknown;
|
|
193
|
+
/**
|
|
194
|
+
* Пропсы, которые будут прокинуты в компонент списка
|
|
195
|
+
*/
|
|
196
|
+
optionsListProps?: unknown;
|
|
197
|
+
/**
|
|
198
|
+
* Пропсы, которые будут прокинуты в компонент пункта меню
|
|
199
|
+
*/
|
|
200
|
+
optionProps?: unknown;
|
|
201
|
+
/**
|
|
202
|
+
* Компонент выпадающего меню
|
|
203
|
+
*/
|
|
204
|
+
OptionsList?: FC<OptionsListProps & RefAttributes<HTMLDivElement>>;
|
|
205
|
+
/**
|
|
206
|
+
* Компонент группы
|
|
207
|
+
*/
|
|
208
|
+
Optgroup?: FC<OptgroupProps>;
|
|
209
|
+
/**
|
|
210
|
+
* Компонент пункта меню
|
|
211
|
+
*/
|
|
212
|
+
Option?: FC<OptionProps>;
|
|
213
|
+
/**
|
|
214
|
+
* Обработчик выбора
|
|
215
|
+
*/
|
|
216
|
+
onChange?: (payload: BaseSelectChangePayload) => void;
|
|
217
|
+
/**
|
|
218
|
+
* Обработчик открытия\закрытия селекта
|
|
219
|
+
*/
|
|
220
|
+
onOpen?: (payload: {
|
|
221
|
+
open?: boolean;
|
|
222
|
+
name?: string;
|
|
223
|
+
}) => void;
|
|
224
|
+
/**
|
|
225
|
+
* Обработчик фокуса поля
|
|
226
|
+
*/
|
|
227
|
+
onBlur?: (event: FocusEvent<HTMLDivElement | HTMLInputElement>) => void;
|
|
228
|
+
/**
|
|
229
|
+
* Обработчик блюра поля
|
|
230
|
+
*/
|
|
231
|
+
onFocus?: (event: FocusEvent<HTMLDivElement | HTMLInputElement>) => void;
|
|
232
|
+
/**
|
|
233
|
+
* Обработчик скрола
|
|
234
|
+
*/
|
|
235
|
+
onScroll?: (event: MouseEvent<HTMLDivElement>) => void;
|
|
236
|
+
/**
|
|
237
|
+
* Хранит функцию, с помощью которой можно обновить положение поповера
|
|
238
|
+
*/
|
|
239
|
+
updatePopover?: PopoverProps['update'];
|
|
240
|
+
/**
|
|
241
|
+
* z-index поповера
|
|
242
|
+
*/
|
|
243
|
+
zIndexPopover?: PopoverProps['zIndex'];
|
|
244
|
+
/**
|
|
245
|
+
* Показывать OptionsList, если он пустой
|
|
246
|
+
*/
|
|
247
|
+
showEmptyOptionsList?: boolean;
|
|
248
|
+
};
|
|
249
|
+
type FieldProps = {
|
|
250
|
+
/**
|
|
251
|
+
* Дополнительный класс
|
|
252
|
+
*/
|
|
253
|
+
className?: string;
|
|
254
|
+
/**
|
|
255
|
+
* Выбранный пункт
|
|
256
|
+
*/
|
|
257
|
+
selected?: OptionShape;
|
|
258
|
+
/**
|
|
259
|
+
* Список выбранных пунктов
|
|
260
|
+
*/
|
|
261
|
+
selectedMultiple?: OptionShape[];
|
|
262
|
+
/**
|
|
263
|
+
* Метод для ручной установки выбранных пунктов
|
|
264
|
+
*/
|
|
265
|
+
setSelectedItems: (selected: OptionShape[]) => void;
|
|
266
|
+
/**
|
|
267
|
+
* Метод переключающий видимость выпадающего списка
|
|
268
|
+
*/
|
|
269
|
+
toggleMenu: () => void;
|
|
270
|
+
/**
|
|
271
|
+
* Флаг, можно ли выбрать несколько значений
|
|
272
|
+
*/
|
|
273
|
+
multiple?: boolean;
|
|
274
|
+
/**
|
|
275
|
+
* Флаг, открыто ли меню
|
|
276
|
+
*/
|
|
277
|
+
open?: boolean;
|
|
278
|
+
/**
|
|
279
|
+
* Флаг, поле заблокировано
|
|
280
|
+
*/
|
|
281
|
+
disabled?: boolean;
|
|
282
|
+
/**
|
|
283
|
+
* Лейбл поля
|
|
284
|
+
*/
|
|
285
|
+
label?: ReactNode;
|
|
286
|
+
/**
|
|
287
|
+
* Вид лейбла внутри / снаружи
|
|
288
|
+
*/
|
|
289
|
+
labelView?: 'inner' | 'outer';
|
|
290
|
+
/**
|
|
291
|
+
* Плейсхолдер поля
|
|
292
|
+
*/
|
|
293
|
+
placeholder?: string;
|
|
294
|
+
/**
|
|
295
|
+
* Отображение ошибки
|
|
296
|
+
*/
|
|
297
|
+
error?: ReactNode | boolean;
|
|
298
|
+
/**
|
|
299
|
+
* Отображение иконки успеха
|
|
300
|
+
*/
|
|
301
|
+
success?: boolean;
|
|
302
|
+
/**
|
|
303
|
+
* Подсказка под полем
|
|
304
|
+
*/
|
|
305
|
+
hint?: ReactNode;
|
|
306
|
+
/**
|
|
307
|
+
* Компонент стрелки
|
|
308
|
+
*/
|
|
309
|
+
Arrow?: ReactElement | false | null;
|
|
310
|
+
/**
|
|
311
|
+
* Кастомный рендер выбранного пункта
|
|
312
|
+
*/
|
|
313
|
+
valueRenderer?: BaseSelectProps['valueRenderer'];
|
|
314
|
+
/**
|
|
315
|
+
* Внутренние свойства, которые должны быть установлены компоненту.
|
|
316
|
+
*/
|
|
317
|
+
innerProps: {
|
|
318
|
+
onBlur?: (event: FocusEvent<HTMLDivElement | HTMLInputElement>) => void;
|
|
319
|
+
onFocus?: (event: FocusEvent<HTMLDivElement | HTMLInputElement>) => void;
|
|
320
|
+
onClick?: (event: MouseEvent<HTMLDivElement | HTMLInputElement>) => void;
|
|
321
|
+
tabIndex?: number;
|
|
322
|
+
id: string;
|
|
323
|
+
} & RefAttributes<HTMLDivElement | HTMLInputElement> & AriaAttributes;
|
|
324
|
+
/**
|
|
325
|
+
* Идентификатор для систем автоматизированного тестирования
|
|
326
|
+
*/
|
|
327
|
+
dataTestId?: string;
|
|
328
|
+
} & AnyObject;
|
|
329
|
+
type ArrowProps = {
|
|
330
|
+
/**
|
|
331
|
+
* Дополнительный класс
|
|
332
|
+
*/
|
|
333
|
+
className?: string;
|
|
334
|
+
/**
|
|
335
|
+
* Флаг, открыто ли меню
|
|
336
|
+
*/
|
|
337
|
+
open?: boolean;
|
|
338
|
+
};
|
|
339
|
+
type OptionsListProps = {
|
|
340
|
+
/**
|
|
341
|
+
* Дополнительный класс
|
|
342
|
+
*/
|
|
343
|
+
className?: string;
|
|
344
|
+
/**
|
|
345
|
+
* Дополнительный класс для компонента группы пунктов
|
|
346
|
+
*/
|
|
347
|
+
optionGroupClassName?: string;
|
|
348
|
+
/**
|
|
349
|
+
* Размер компонента
|
|
350
|
+
*/
|
|
351
|
+
size?: 's' | 'm' | 'l' | 'xl';
|
|
352
|
+
/**
|
|
353
|
+
* Компонент пункта меню
|
|
354
|
+
*/
|
|
355
|
+
Option: FC<OptionProps>;
|
|
356
|
+
/**
|
|
357
|
+
* Функция для получения пропсов для ячейки
|
|
358
|
+
*/
|
|
359
|
+
getOptionProps: (option: OptionShape, index: number) => OptionProps;
|
|
360
|
+
/**
|
|
361
|
+
* Список выбранных пунктов
|
|
362
|
+
*/
|
|
363
|
+
selectedItems?: OptionShape[];
|
|
364
|
+
/**
|
|
365
|
+
* Метод для ручной установки выбранных пунктов
|
|
366
|
+
*/
|
|
367
|
+
setSelectedItems: (selected: OptionShape[]) => void;
|
|
368
|
+
/**
|
|
369
|
+
* Метод переключающий видимость выпадающего списка
|
|
370
|
+
*/
|
|
371
|
+
toggleMenu: () => void;
|
|
372
|
+
/**
|
|
373
|
+
* Контент шапки
|
|
374
|
+
*/
|
|
375
|
+
header?: ReactNode;
|
|
376
|
+
/**
|
|
377
|
+
* Контент футера
|
|
378
|
+
*/
|
|
379
|
+
footer?: ReactNode;
|
|
380
|
+
/**
|
|
381
|
+
* Список вариантов выбора
|
|
382
|
+
*/
|
|
383
|
+
options?: Array<OptionShape | GroupShape>;
|
|
384
|
+
/**
|
|
385
|
+
* Плоский список пунктов меню (например, нужно для виртуализации)
|
|
386
|
+
*/
|
|
387
|
+
flatOptions?: OptionShape[];
|
|
388
|
+
/**
|
|
389
|
+
* Индекс выделенного пункта
|
|
390
|
+
*/
|
|
391
|
+
highlightedIndex?: number;
|
|
392
|
+
/**
|
|
393
|
+
* Флаг, открыто ли меню
|
|
394
|
+
*/
|
|
395
|
+
open?: boolean;
|
|
396
|
+
/**
|
|
397
|
+
* Компонент группы
|
|
398
|
+
*/
|
|
399
|
+
Optgroup?: BaseSelectProps['Optgroup'];
|
|
400
|
+
/**
|
|
401
|
+
* Будет отображаться, если компонент пустой
|
|
402
|
+
*/
|
|
403
|
+
emptyPlaceholder?: ReactNode;
|
|
404
|
+
/**
|
|
405
|
+
* Количество видимых пунктов меню (5 = 5.5)
|
|
406
|
+
*/
|
|
407
|
+
visibleOptions?: number;
|
|
408
|
+
/**
|
|
409
|
+
* Обработчик скрола
|
|
410
|
+
*/
|
|
411
|
+
onScroll?: (event: MouseEvent<HTMLDivElement>) => void;
|
|
412
|
+
/**
|
|
413
|
+
* Идентификатор для систем автоматизированного тестирования
|
|
414
|
+
*/
|
|
415
|
+
dataTestId?: string;
|
|
416
|
+
/**
|
|
417
|
+
* Дополнительные пропсы для Input'a, находящегося внутри кастомного OptionsList
|
|
418
|
+
*/
|
|
419
|
+
inputProps?: InputProps;
|
|
420
|
+
/**
|
|
421
|
+
* Нужно ли показывать футер
|
|
422
|
+
*/
|
|
423
|
+
showFooter?: boolean;
|
|
424
|
+
/**
|
|
425
|
+
* Нужно ли использовать нативный скроллбар
|
|
426
|
+
*/
|
|
427
|
+
nativeScrollbar?: boolean;
|
|
428
|
+
/**
|
|
429
|
+
* Управляет шириной выпадающего меню.
|
|
430
|
+
* Ширину определяет контент, либо ширина равна ширине поля
|
|
431
|
+
*/
|
|
432
|
+
optionsListWidth?: BaseSelectProps['optionsListWidth'];
|
|
433
|
+
/**
|
|
434
|
+
* Обработчик подтверждения изменений
|
|
435
|
+
*/
|
|
436
|
+
onApply?: () => void;
|
|
437
|
+
/**
|
|
438
|
+
* Обработчик отмены изменений
|
|
439
|
+
*/
|
|
440
|
+
onClear?: () => void;
|
|
441
|
+
};
|
|
442
|
+
type OptgroupProps = {
|
|
443
|
+
/**
|
|
444
|
+
* Дополнительный класс для компонента группы пунктов
|
|
445
|
+
*/
|
|
446
|
+
className?: string;
|
|
447
|
+
/**
|
|
448
|
+
* Размер компонента
|
|
449
|
+
*/
|
|
450
|
+
size?: 's' | 'm' | 'l' | 'xl';
|
|
451
|
+
/**
|
|
452
|
+
* Заголовок группы
|
|
453
|
+
*/
|
|
454
|
+
label?: string;
|
|
455
|
+
/**
|
|
456
|
+
* Дочерние элементы
|
|
457
|
+
*/
|
|
458
|
+
children?: ReactNode;
|
|
459
|
+
};
|
|
460
|
+
type OptionProps = {
|
|
461
|
+
/**
|
|
462
|
+
* Дополнительный класс
|
|
463
|
+
*/
|
|
464
|
+
className?: string;
|
|
465
|
+
/**
|
|
466
|
+
* Размер компонента
|
|
467
|
+
*/
|
|
468
|
+
size?: 's' | 'm' | 'l' | 'xl';
|
|
469
|
+
/**
|
|
470
|
+
* Контент пункта меню
|
|
471
|
+
*/
|
|
472
|
+
children?: ReactNode;
|
|
473
|
+
/**
|
|
474
|
+
* Данные пункта меню
|
|
475
|
+
*/
|
|
476
|
+
option: OptionShape;
|
|
477
|
+
/**
|
|
478
|
+
* Индекс пункта
|
|
479
|
+
*/
|
|
480
|
+
index: number;
|
|
481
|
+
/**
|
|
482
|
+
* Флаг, выбран ли данный пункт
|
|
483
|
+
*/
|
|
484
|
+
selected?: boolean;
|
|
485
|
+
/**
|
|
486
|
+
* Флаг, подсвечен ли данный пункт
|
|
487
|
+
*/
|
|
488
|
+
highlighted?: boolean;
|
|
489
|
+
/**
|
|
490
|
+
* Флаг, заблокирован ли данный пункт
|
|
491
|
+
*/
|
|
492
|
+
disabled?: boolean;
|
|
493
|
+
/**
|
|
494
|
+
* Флаг множественного выбора
|
|
495
|
+
*/
|
|
496
|
+
multiple?: boolean;
|
|
497
|
+
/**
|
|
498
|
+
* Компонент пункта меню
|
|
499
|
+
*/
|
|
500
|
+
Checkmark?: FC<CheckmarkProps> | null;
|
|
501
|
+
/**
|
|
502
|
+
* Внутренние свойства, которые должны быть установлены компоненту.
|
|
503
|
+
*/
|
|
504
|
+
innerProps: {
|
|
505
|
+
id: string;
|
|
506
|
+
onClick: (event: MouseEvent<HTMLDivElement>) => void;
|
|
507
|
+
onMouseDown: (event: MouseEvent<HTMLDivElement>) => void;
|
|
508
|
+
onMouseMove: (event: MouseEvent<HTMLDivElement>) => void;
|
|
509
|
+
role: string;
|
|
510
|
+
} & RefAttributes<HTMLDivElement> & AriaAttributes;
|
|
511
|
+
/**
|
|
512
|
+
* Идентификатор для систем автоматизированного тестирования
|
|
513
|
+
*/
|
|
514
|
+
dataTestId?: string;
|
|
515
|
+
/**
|
|
516
|
+
* Позиция иконки "галочки"
|
|
517
|
+
*/
|
|
518
|
+
checkmarkPosition?: 'before' | 'after';
|
|
519
|
+
/**
|
|
520
|
+
* Мобильная верcия option.
|
|
521
|
+
*/
|
|
522
|
+
mobile?: boolean;
|
|
523
|
+
};
|
|
524
|
+
type CheckmarkProps = {
|
|
525
|
+
/**
|
|
526
|
+
* Флаг, данный пункт выбран
|
|
527
|
+
*/
|
|
528
|
+
selected?: boolean;
|
|
529
|
+
/**
|
|
530
|
+
* Флаг, данный пункт задизейблен
|
|
531
|
+
*/
|
|
532
|
+
disabled?: boolean;
|
|
533
|
+
/**
|
|
534
|
+
* Дополнительный класс
|
|
535
|
+
*/
|
|
536
|
+
className?: string;
|
|
537
|
+
/**
|
|
538
|
+
* Флаг множественного выбора
|
|
539
|
+
*/
|
|
540
|
+
multiple?: boolean;
|
|
541
|
+
/**
|
|
542
|
+
* Расположение отметки
|
|
543
|
+
*/
|
|
544
|
+
position?: 'before' | 'after';
|
|
545
|
+
/**
|
|
546
|
+
* Иконка выбранного пункта
|
|
547
|
+
*/
|
|
548
|
+
icon?: FC<SVGProps<SVGSVGElement>>;
|
|
549
|
+
};
|
|
550
|
+
export { AnyObject, OptionShape, GroupShape, BaseSelectChangePayload, BaseSelectProps, FieldProps, ArrowProps, OptionsListProps, OptgroupProps, OptionProps, CheckmarkProps };
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { AnchorHTMLAttributes, ButtonHTMLAttributes, ElementType, ReactNode } from 'react';
|
|
2
|
+
type StyleColors = {
|
|
3
|
+
default: {
|
|
4
|
+
[key: string]: string;
|
|
5
|
+
};
|
|
6
|
+
inverted: {
|
|
7
|
+
[key: string]: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
type ComponentProps = {
|
|
11
|
+
/**
|
|
12
|
+
* Тип кнопки
|
|
13
|
+
* @default secondary
|
|
14
|
+
*/
|
|
15
|
+
view?: 'accent' | 'primary' | 'secondary' | 'tertiary' | 'outlined' | 'filled' | 'transparent' | 'link' | 'ghost';
|
|
16
|
+
/**
|
|
17
|
+
* Слот слева
|
|
18
|
+
*/
|
|
19
|
+
leftAddons?: ReactNode;
|
|
20
|
+
/**
|
|
21
|
+
* Слот справа
|
|
22
|
+
*/
|
|
23
|
+
rightAddons?: ReactNode;
|
|
24
|
+
/**
|
|
25
|
+
* Размер компонента
|
|
26
|
+
* @default m
|
|
27
|
+
*/
|
|
28
|
+
size?: 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl';
|
|
29
|
+
/**
|
|
30
|
+
* Растягивает компонент на ширину контейнера
|
|
31
|
+
* @default false
|
|
32
|
+
*/
|
|
33
|
+
block?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Дополнительный класс
|
|
36
|
+
*/
|
|
37
|
+
className?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Дополнительный класс для спиннера
|
|
40
|
+
*/
|
|
41
|
+
spinnerClassName?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Выводит ссылку в виде кнопки
|
|
44
|
+
*/
|
|
45
|
+
href?: string;
|
|
46
|
+
/**
|
|
47
|
+
* Позволяет использовать кастомный компонент для кнопки (например Link из роутера)
|
|
48
|
+
*/
|
|
49
|
+
Component?: ElementType;
|
|
50
|
+
/**
|
|
51
|
+
* Идентификатор для систем автоматизированного тестирования
|
|
52
|
+
*/
|
|
53
|
+
dataTestId?: string;
|
|
54
|
+
/**
|
|
55
|
+
* Показать лоадер
|
|
56
|
+
* @default false
|
|
57
|
+
*/
|
|
58
|
+
loading?: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Не переносить текст кнопки на новую строку
|
|
61
|
+
* @default false
|
|
62
|
+
*/
|
|
63
|
+
nowrap?: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* Набор цветов для компонента
|
|
66
|
+
*/
|
|
67
|
+
colors?: 'default' | 'inverted';
|
|
68
|
+
/**
|
|
69
|
+
* Дочерние элементы.
|
|
70
|
+
*/
|
|
71
|
+
children?: ReactNode;
|
|
72
|
+
/**
|
|
73
|
+
* Основные стили компонента.
|
|
74
|
+
*/
|
|
75
|
+
styles: {
|
|
76
|
+
[key: string]: string;
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* Стили компонента для default и inverted режима.
|
|
80
|
+
*/
|
|
81
|
+
colorStylesMap: StyleColors;
|
|
82
|
+
};
|
|
83
|
+
type AnchorBaseButtonProps = ComponentProps & AnchorHTMLAttributes<HTMLAnchorElement>;
|
|
84
|
+
type NativeBaseButtonProps = ComponentProps & ButtonHTMLAttributes<HTMLButtonElement>;
|
|
85
|
+
type BaseButtonProps = Partial<AnchorBaseButtonProps | NativeBaseButtonProps>;
|
|
86
|
+
type AnchorButtonProps = Omit<BaseButtonProps, 'styles' | 'colorStylesMap'> & AnchorHTMLAttributes<HTMLAnchorElement>;
|
|
87
|
+
type NativeButtonProps = Omit<BaseButtonProps, 'styles' | 'colorStylesMap'> & ButtonHTMLAttributes<HTMLButtonElement>;
|
|
88
|
+
type ButtonProps = Partial<AnchorButtonProps | NativeButtonProps> & {
|
|
89
|
+
/**
|
|
90
|
+
* Контрольная точка, с нее начинается desktop версия
|
|
91
|
+
* @default 1024
|
|
92
|
+
*/
|
|
93
|
+
breakpoint?: number;
|
|
94
|
+
};
|
|
95
|
+
export { StyleColors, ComponentProps, AnchorBaseButtonProps, NativeBaseButtonProps, BaseButtonProps, AnchorButtonProps, NativeButtonProps, ButtonProps };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { BaseModalProps } from "./index-bdb4c6b9";
|
|
3
|
+
type ModalDesktopProps = BaseModalProps & {
|
|
4
|
+
/**
|
|
5
|
+
* Ширина модального окна
|
|
6
|
+
* @default "m"
|
|
7
|
+
*/
|
|
8
|
+
size?: 's' | 'm' | 'l' | 'xl' | 'fullscreen';
|
|
9
|
+
/**
|
|
10
|
+
* Растягивает модальное окно на весь экран
|
|
11
|
+
* @deprecated Используйте размер fullscreen
|
|
12
|
+
*/
|
|
13
|
+
fullscreen?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Фиксирует позицию модального окна после открытия,
|
|
16
|
+
* предотвращая скачки, если контент внутри будет меняться
|
|
17
|
+
*/
|
|
18
|
+
fixedPosition?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Управление наличием закрывающего крестика
|
|
21
|
+
* @default false
|
|
22
|
+
*/
|
|
23
|
+
hasCloser?: boolean;
|
|
24
|
+
};
|
|
25
|
+
type ModalMobileProps = Omit<ModalDesktopProps, 'size' | 'fixedPosition' | 'fullscreen'>;
|
|
26
|
+
type ModalResponsiveProps = ModalDesktopProps & {
|
|
27
|
+
/**
|
|
28
|
+
* Контрольная точка, с нее начинается desktop версия
|
|
29
|
+
* @default 1024
|
|
30
|
+
*/
|
|
31
|
+
breakpoint?: number;
|
|
32
|
+
};
|
|
33
|
+
type View = 'desktop' | 'mobile';
|
|
34
|
+
type TResponsiveModalContext = {
|
|
35
|
+
view: View;
|
|
36
|
+
size: NonNullable<ModalDesktopProps['size']>;
|
|
37
|
+
};
|
|
38
|
+
type ContentProps = {
|
|
39
|
+
/**
|
|
40
|
+
* Контент
|
|
41
|
+
*/
|
|
42
|
+
children?: ReactNode;
|
|
43
|
+
/**
|
|
44
|
+
* Дополнительный класс
|
|
45
|
+
*/
|
|
46
|
+
className?: string;
|
|
47
|
+
/**
|
|
48
|
+
* Растягивает контент на всю высоту
|
|
49
|
+
*/
|
|
50
|
+
flex?: boolean;
|
|
51
|
+
};
|
|
52
|
+
export { ModalDesktopProps, ModalMobileProps, ModalResponsiveProps, View, TResponsiveModalContext, ContentProps };
|