@alfalab/core-components-table 2.2.42 → 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.
Files changed (264) hide show
  1. package/Component-5e1b8383.d.ts +5 -0
  2. package/Component-63dec22f.d.ts +167 -0
  3. package/Component-89a3cf4c.d.ts +6 -0
  4. package/Component-bdb4c6b9.d.ts +12 -0
  5. package/Component-e81c389f.d.ts +5 -0
  6. package/Component-ebda875c.d.ts +12 -0
  7. package/Component.desktop-63dec22f.d.ts +6 -0
  8. package/Component.desktop-785df74d.d.ts +6 -0
  9. package/Component.mobile-d7e9f69d.d.ts +6 -0
  10. package/Component.mobile-ebda875c.d.ts +6 -0
  11. package/Component.responsive-785df74d.d.ts +26 -0
  12. package/Context-bdb4c6b9.d.ts +4 -0
  13. package/ResponsiveContext-baf4875b.d.ts +5 -0
  14. package/component-89a3cf4c.d.ts +44 -0
  15. package/component.js +1 -1
  16. package/components/index.js +1 -1
  17. package/components/pagination/Component.js +3 -3
  18. package/components/pagination/index.css +8 -8
  19. package/components/pagination/index.js +1 -1
  20. package/components/pagination/select-field/index.css +4 -4
  21. package/components/pagination/select-field/index.js +1 -1
  22. package/components/table/Component.js +1 -1
  23. package/components/table/index.css +7 -7
  24. package/components/tbody/Component.js +1 -1
  25. package/components/tbody/index.css +2 -2
  26. package/components/tcell/Component.js +1 -1
  27. package/components/tcell/index.css +6 -6
  28. package/components/texpandable-row/Component.js +1 -1
  29. package/components/texpandable-row/index.css +5 -5
  30. package/components/thead/Component.js +1 -1
  31. package/components/thead/index.css +6 -6
  32. package/components/thead-cell/Component.js +1 -1
  33. package/components/thead-cell/index.css +10 -9
  34. package/components/trow/Component.js +1 -1
  35. package/components/trow/index.css +8 -8
  36. package/components/tsortable-head-cell/Component.js +2 -2
  37. package/components/tsortable-head-cell/index.css +8 -10
  38. package/consts-f777ba1a.d.ts +2 -0
  39. package/cssm/Component-5e1b8383.d.ts +5 -0
  40. package/cssm/Component-63dec22f.d.ts +167 -0
  41. package/cssm/Component-89a3cf4c.d.ts +6 -0
  42. package/cssm/Component-bdb4c6b9.d.ts +12 -0
  43. package/cssm/Component-e81c389f.d.ts +5 -0
  44. package/cssm/Component-ebda875c.d.ts +12 -0
  45. package/cssm/Component.desktop-63dec22f.d.ts +6 -0
  46. package/cssm/Component.desktop-785df74d.d.ts +6 -0
  47. package/cssm/Component.mobile-d7e9f69d.d.ts +6 -0
  48. package/cssm/Component.mobile-ebda875c.d.ts +6 -0
  49. package/cssm/Component.responsive-785df74d.d.ts +26 -0
  50. package/cssm/Context-bdb4c6b9.d.ts +4 -0
  51. package/cssm/ResponsiveContext-baf4875b.d.ts +5 -0
  52. package/cssm/component-89a3cf4c.d.ts +44 -0
  53. package/cssm/component.js +1 -1
  54. package/cssm/components/index.js +1 -1
  55. package/cssm/components/pagination/Component.js +2 -2
  56. package/cssm/components/pagination/index.js +1 -1
  57. package/cssm/components/thead-cell/index.module.css +2 -1
  58. package/cssm/components/tsortable-head-cell/Component.js +1 -1
  59. package/cssm/components/tsortable-head-cell/index.module.css +0 -2
  60. package/cssm/consts-f777ba1a.d.ts +2 -0
  61. package/cssm/desktop-63dec22f.d.ts +6 -0
  62. package/cssm/hook-5e1b8383.d.ts +75 -0
  63. package/cssm/hook-ebda875c.d.ts +48 -0
  64. package/cssm/index-136acbb1.d.ts +28 -0
  65. package/cssm/index-3109f463.d.ts +62 -0
  66. package/cssm/index-425c8522.d.ts +6 -0
  67. package/cssm/index-89a3cf4c.d.ts +3 -0
  68. package/cssm/index-bdb4c6b9.d.ts +2 -0
  69. package/cssm/index-c44170fe.d.ts +21 -0
  70. package/cssm/index-e81c389f.d.ts +3 -0
  71. package/cssm/index-ebda875c.d.ts +81 -0
  72. package/cssm/index-f12ee135.d.ts +3 -0
  73. package/cssm/index.js +1 -1
  74. package/cssm/mobile-96988a65.d.ts +2 -0
  75. package/cssm/types-425c8522.d.ts +259 -0
  76. package/cssm/types-ebda875c.d.ts +113 -0
  77. package/cssm/typings-5e1b8383.d.ts +550 -0
  78. package/cssm/typings-9211a437.d.ts +95 -0
  79. package/cssm/typings-bdb4c6b9.d.ts +52 -0
  80. package/cssm/utils-1574ad8b.d.ts +29 -0
  81. package/cssm/utils-49cc3c24.d.ts +8 -0
  82. package/cssm/utils-5e1b8383.d.ts +38 -0
  83. package/desktop-63dec22f.d.ts +6 -0
  84. package/esm/Component-5e1b8383.d.ts +5 -0
  85. package/esm/Component-63dec22f.d.ts +167 -0
  86. package/esm/Component-89a3cf4c.d.ts +6 -0
  87. package/esm/Component-bdb4c6b9.d.ts +12 -0
  88. package/esm/Component-e81c389f.d.ts +5 -0
  89. package/esm/Component-ebda875c.d.ts +12 -0
  90. package/esm/Component.desktop-63dec22f.d.ts +6 -0
  91. package/esm/Component.desktop-785df74d.d.ts +6 -0
  92. package/esm/Component.mobile-d7e9f69d.d.ts +6 -0
  93. package/esm/Component.mobile-ebda875c.d.ts +6 -0
  94. package/esm/Component.responsive-785df74d.d.ts +26 -0
  95. package/esm/Context-bdb4c6b9.d.ts +4 -0
  96. package/esm/ResponsiveContext-baf4875b.d.ts +5 -0
  97. package/esm/component-89a3cf4c.d.ts +44 -0
  98. package/esm/component.js +1 -1
  99. package/esm/components/index.js +1 -1
  100. package/esm/components/pagination/Component.js +3 -3
  101. package/esm/components/pagination/index.css +8 -8
  102. package/esm/components/pagination/index.js +1 -1
  103. package/esm/components/pagination/select-field/index.css +4 -4
  104. package/esm/components/pagination/select-field/index.js +1 -1
  105. package/esm/components/table/Component.js +1 -1
  106. package/esm/components/table/index.css +7 -7
  107. package/esm/components/tbody/Component.js +1 -1
  108. package/esm/components/tbody/index.css +2 -2
  109. package/esm/components/tcell/Component.js +1 -1
  110. package/esm/components/tcell/index.css +6 -6
  111. package/esm/components/texpandable-row/Component.js +1 -1
  112. package/esm/components/texpandable-row/index.css +5 -5
  113. package/esm/components/thead/Component.js +1 -1
  114. package/esm/components/thead/index.css +6 -6
  115. package/esm/components/thead-cell/Component.js +1 -1
  116. package/esm/components/thead-cell/index.css +10 -9
  117. package/esm/components/trow/Component.js +1 -1
  118. package/esm/components/trow/index.css +8 -8
  119. package/esm/components/tsortable-head-cell/Component.js +2 -2
  120. package/esm/components/tsortable-head-cell/index.css +8 -10
  121. package/esm/consts-f777ba1a.d.ts +2 -0
  122. package/esm/desktop-63dec22f.d.ts +6 -0
  123. package/esm/hook-5e1b8383.d.ts +75 -0
  124. package/esm/hook-ebda875c.d.ts +48 -0
  125. package/esm/index-136acbb1.d.ts +28 -0
  126. package/esm/index-3109f463.d.ts +62 -0
  127. package/esm/index-425c8522.d.ts +6 -0
  128. package/esm/index-89a3cf4c.d.ts +3 -0
  129. package/esm/index-bdb4c6b9.d.ts +2 -0
  130. package/esm/index-c44170fe.d.ts +21 -0
  131. package/esm/index-e81c389f.d.ts +3 -0
  132. package/esm/index-ebda875c.d.ts +81 -0
  133. package/esm/index-f12ee135.d.ts +3 -0
  134. package/esm/index.js +1 -1
  135. package/esm/mobile-96988a65.d.ts +2 -0
  136. package/esm/types-425c8522.d.ts +259 -0
  137. package/esm/types-ebda875c.d.ts +113 -0
  138. package/esm/typings-5e1b8383.d.ts +550 -0
  139. package/esm/typings-9211a437.d.ts +95 -0
  140. package/esm/typings-bdb4c6b9.d.ts +52 -0
  141. package/esm/utils-1574ad8b.d.ts +29 -0
  142. package/esm/utils-49cc3c24.d.ts +8 -0
  143. package/esm/utils-5e1b8383.d.ts +38 -0
  144. package/hook-5e1b8383.d.ts +75 -0
  145. package/hook-ebda875c.d.ts +48 -0
  146. package/index-136acbb1.d.ts +28 -0
  147. package/index-3109f463.d.ts +62 -0
  148. package/index-425c8522.d.ts +6 -0
  149. package/index-89a3cf4c.d.ts +3 -0
  150. package/index-bdb4c6b9.d.ts +2 -0
  151. package/index-c44170fe.d.ts +21 -0
  152. package/index-e81c389f.d.ts +3 -0
  153. package/index-ebda875c.d.ts +81 -0
  154. package/index-f12ee135.d.ts +3 -0
  155. package/index.js +1 -1
  156. package/mobile-96988a65.d.ts +2 -0
  157. package/modern/Component-5e1b8383.d.ts +5 -0
  158. package/modern/Component-63dec22f.d.ts +167 -0
  159. package/modern/Component-89a3cf4c.d.ts +6 -0
  160. package/modern/Component-bdb4c6b9.d.ts +12 -0
  161. package/modern/Component-e81c389f.d.ts +5 -0
  162. package/modern/Component-ebda875c.d.ts +12 -0
  163. package/modern/Component.desktop-63dec22f.d.ts +6 -0
  164. package/modern/Component.desktop-785df74d.d.ts +6 -0
  165. package/modern/Component.mobile-d7e9f69d.d.ts +6 -0
  166. package/modern/Component.mobile-ebda875c.d.ts +6 -0
  167. package/modern/Component.responsive-785df74d.d.ts +26 -0
  168. package/modern/Context-bdb4c6b9.d.ts +4 -0
  169. package/modern/ResponsiveContext-baf4875b.d.ts +5 -0
  170. package/modern/component-89a3cf4c.d.ts +44 -0
  171. package/modern/component.js +1 -1
  172. package/modern/components/index.js +1 -1
  173. package/modern/components/pagination/Component.js +3 -3
  174. package/modern/components/pagination/index.css +8 -8
  175. package/modern/components/pagination/index.js +1 -1
  176. package/modern/components/pagination/select-field/index.css +4 -4
  177. package/modern/components/pagination/select-field/index.js +1 -1
  178. package/modern/components/table/Component.js +1 -1
  179. package/modern/components/table/index.css +7 -7
  180. package/modern/components/tbody/Component.js +1 -1
  181. package/modern/components/tbody/index.css +2 -2
  182. package/modern/components/tcell/Component.js +1 -1
  183. package/modern/components/tcell/index.css +6 -6
  184. package/modern/components/texpandable-row/Component.js +1 -1
  185. package/modern/components/texpandable-row/index.css +5 -5
  186. package/modern/components/thead/Component.js +1 -1
  187. package/modern/components/thead/index.css +6 -6
  188. package/modern/components/thead-cell/Component.js +1 -1
  189. package/modern/components/thead-cell/index.css +10 -9
  190. package/modern/components/trow/Component.js +1 -1
  191. package/modern/components/trow/index.css +8 -8
  192. package/modern/components/tsortable-head-cell/Component.js +2 -2
  193. package/modern/components/tsortable-head-cell/index.css +8 -10
  194. package/modern/consts-f777ba1a.d.ts +2 -0
  195. package/modern/desktop-63dec22f.d.ts +6 -0
  196. package/modern/hook-5e1b8383.d.ts +75 -0
  197. package/modern/hook-ebda875c.d.ts +48 -0
  198. package/modern/index-136acbb1.d.ts +28 -0
  199. package/modern/index-3109f463.d.ts +62 -0
  200. package/modern/index-425c8522.d.ts +6 -0
  201. package/modern/index-89a3cf4c.d.ts +3 -0
  202. package/modern/index-bdb4c6b9.d.ts +2 -0
  203. package/modern/index-c44170fe.d.ts +21 -0
  204. package/modern/index-e81c389f.d.ts +3 -0
  205. package/modern/index-ebda875c.d.ts +81 -0
  206. package/modern/index-f12ee135.d.ts +3 -0
  207. package/modern/index.js +1 -1
  208. package/modern/mobile-96988a65.d.ts +2 -0
  209. package/modern/types-425c8522.d.ts +259 -0
  210. package/modern/types-ebda875c.d.ts +113 -0
  211. package/modern/typings-5e1b8383.d.ts +550 -0
  212. package/modern/typings-9211a437.d.ts +95 -0
  213. package/modern/typings-bdb4c6b9.d.ts +52 -0
  214. package/modern/utils-1574ad8b.d.ts +29 -0
  215. package/modern/utils-49cc3c24.d.ts +8 -0
  216. package/modern/utils-5e1b8383.d.ts +38 -0
  217. package/package.json +4 -4
  218. package/src/component.tsx +22 -0
  219. package/src/components/index.ts +9 -0
  220. package/src/components/pagination/Component.tsx +104 -0
  221. package/src/components/pagination/index.module.css +38 -0
  222. package/src/components/pagination/index.ts +1 -0
  223. package/src/components/pagination/select-field/index.module.css +13 -0
  224. package/src/components/pagination/select-field/index.tsx +25 -0
  225. package/src/components/table/Component.tsx +109 -0
  226. package/src/components/table/index.module.css +35 -0
  227. package/src/components/table/index.ts +1 -0
  228. package/src/components/table/utils.ts +19 -0
  229. package/src/components/table-context/index.tsx +28 -0
  230. package/src/components/tbody/Component.tsx +22 -0
  231. package/src/components/tbody/index.module.css +6 -0
  232. package/src/components/tbody/index.ts +1 -0
  233. package/src/components/tcell/Component.tsx +56 -0
  234. package/src/components/tcell/index.module.css +35 -0
  235. package/src/components/tcell/index.ts +1 -0
  236. package/src/components/texpandable-row/Component.tsx +58 -0
  237. package/src/components/texpandable-row/index.module.css +25 -0
  238. package/src/components/texpandable-row/index.ts +1 -0
  239. package/src/components/thead/Component.tsx +33 -0
  240. package/src/components/thead/index.module.css +32 -0
  241. package/src/components/thead/index.ts +1 -0
  242. package/src/components/thead-cell/Component.tsx +67 -0
  243. package/src/components/thead-cell/index.module.css +47 -0
  244. package/src/components/thead-cell/index.ts +1 -0
  245. package/src/components/trow/Component.tsx +56 -0
  246. package/src/components/trow/index.module.css +35 -0
  247. package/src/components/trow/index.ts +1 -0
  248. package/src/components/tsortable-head-cell/Component.tsx +50 -0
  249. package/src/components/tsortable-head-cell/index.module.css +41 -0
  250. package/src/components/tsortable-head-cell/index.ts +1 -0
  251. package/src/components/tsortable-head-cell/sort-icon-asc.tsx +16 -0
  252. package/src/components/tsortable-head-cell/sort-icon-desc.tsx +16 -0
  253. package/src/components/tsortable-head-cell/sort-icon-unset.tsx +16 -0
  254. package/src/index.ts +1 -0
  255. package/src/typings.ts +8 -0
  256. package/src/utils.ts +6 -0
  257. package/types-425c8522.d.ts +259 -0
  258. package/types-ebda875c.d.ts +113 -0
  259. package/typings-5e1b8383.d.ts +550 -0
  260. package/typings-9211a437.d.ts +95 -0
  261. package/typings-bdb4c6b9.d.ts +52 -0
  262. package/utils-1574ad8b.d.ts +29 -0
  263. package/utils-49cc3c24.d.ts +8 -0
  264. package/utils-5e1b8383.d.ts +38 -0
@@ -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?: string;
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 };
@@ -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 };