@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,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 };
@@ -0,0 +1,29 @@
1
+ type SavedStyle = {
2
+ value: string;
3
+ key: string;
4
+ el: HTMLElement;
5
+ };
6
+ type RestoreStyle = {
7
+ container: HTMLElement;
8
+ modals: number;
9
+ styles: SavedStyle[];
10
+ };
11
+ declare class ModalStore {
12
+ private readonly restoreStyles;
13
+ constructor();
14
+ getRestoreStyles: () => RestoreStyle[];
15
+ }
16
+ declare const getModalStore: () => ModalStore;
17
+ declare class GlobalStore {
18
+ private readonly modalStore;
19
+ constructor();
20
+ getModalStore: () => ModalStore;
21
+ }
22
+ declare function isScrolledToTop(target: HTMLElement): boolean;
23
+ declare function isScrolledToBottom(target: HTMLElement): boolean;
24
+ declare function hasScrollbar(target: HTMLElement): boolean;
25
+ declare const getScrollbarSize: () => number;
26
+ declare const restoreContainerStyles: (container: HTMLElement) => void;
27
+ declare const handleContainer: (container?: HTMLElement) => void;
28
+ export type { SavedStyle };
29
+ export { getModalStore, GlobalStore, isScrolledToTop, isScrolledToBottom, hasScrollbar, getScrollbarSize, restoreContainerStyles, handleContainer };
@@ -0,0 +1,8 @@
1
+ declare const TIMEOUT = 500;
2
+ declare const SWIPE_VELOCITY = 0.4;
3
+ declare const MARKER_HEIGHT = 24;
4
+ declare const CLOSE_OFFSET = 0.2;
5
+ declare const SCROLL_OFFSET = 1;
6
+ declare const HEADER_OFFSET = 24;
7
+ declare const convertPercentToNumber: (value: string | number, fullHeight: number, headerOffset?: number) => number;
8
+ export { TIMEOUT, SWIPE_VELOCITY, MARKER_HEIGHT, CLOSE_OFFSET, SCROLL_OFFSET, HEADER_OFFSET, convertPercentToNumber };
@@ -0,0 +1,38 @@
1
+ import { ReactNode, RefObject } from 'react';
2
+ import { BaseSelectProps, GroupShape, OptionShape } from "./typings-5e1b8383";
3
+ declare const isGroup: (item: OptionShape | GroupShape) => item is GroupShape;
4
+ declare const isOptionShape: (item: OptionShape | string | null) => item is OptionShape;
5
+ declare const joinOptions: ({ selected, selectedMultiple, }: {
6
+ selected?: OptionShape | undefined;
7
+ selectedMultiple?: OptionShape[] | undefined;
8
+ }) => ReactNode[] | null;
9
+ declare function processOptions(options: BaseSelectProps['options'], selected?: BaseSelectProps['selected']): {
10
+ flatOptions: OptionShape[];
11
+ selectedOptions: OptionShape[];
12
+ };
13
+ type useVisibleOptionsArgs = {
14
+ /**
15
+ * Количество видимых пунктов
16
+ */
17
+ visibleOptions: number;
18
+ /**
19
+ * Реф на контейнер с пунтами меню
20
+ */
21
+ listRef: RefObject<HTMLElement>;
22
+ /**
23
+ * Реф на контейнер, которому нужно установить высоту
24
+ */
25
+ styleTargetRef?: RefObject<HTMLElement>;
26
+ /**
27
+ * Флаг открытия меню
28
+ */
29
+ open?: boolean;
30
+ /**
31
+ * Позволяет вызвать пересчет высоты
32
+ */
33
+ invalidate?: unknown;
34
+ };
35
+ declare function useVisibleOptions({ visibleOptions, listRef, styleTargetRef, open, invalidate, }: useVisibleOptionsArgs): void;
36
+ declare function usePrevious<T>(value: T): T | undefined;
37
+ declare const lastIndexOf: <T>(array: T[], predicate: (item: T) => boolean) => number;
38
+ export { isGroup, isOptionShape, joinOptions, processOptions, useVisibleOptions, usePrevious, lastIndexOf };
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import React from "react";
3
+ import { AnchorButtonProps, NativeButtonProps } from "./typings-9211a437";
4
+ type ButtonDesktopProps = Partial<AnchorButtonProps | NativeButtonProps>;
5
+ declare const ButtonDesktop: React.ForwardRefExoticComponent<ButtonDesktopProps & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
6
+ export { ButtonDesktopProps, ButtonDesktop };
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ import React from 'react';
3
+ import { CheckmarkProps } from "./typings-5e1b8383";
4
+ declare const BaseCheckmark: ({ selected, disabled, className, multiple, }: CheckmarkProps) => React.JSX.Element;
5
+ export { BaseCheckmark };
@@ -0,0 +1,167 @@
1
+ /// <reference types="react" />
2
+ import React from "react";
3
+ import { FC, ForwardRefExoticComponent, RefAttributes, HTMLAttributes } from "react";
4
+ declare const colors: readonly [
5
+ "tertiary",
6
+ "disabled",
7
+ "accent",
8
+ "primary",
9
+ "attention",
10
+ "positive",
11
+ "secondary",
12
+ "tertiary-inverted",
13
+ "primary-inverted",
14
+ "secondary-inverted",
15
+ "link",
16
+ "negative",
17
+ "static-primary-light",
18
+ "static-secondary-light",
19
+ "static-tertiary-light",
20
+ "static-primary-dark",
21
+ "static-secondary-dark",
22
+ "static-tertiary-dark",
23
+ "static-accent"
24
+ ];
25
+ type Color = (typeof colors)[number];
26
+ type TextElementType = HTMLParagraphElement | HTMLSpanElement | HTMLDivElement;
27
+ type NativeProps = HTMLAttributes<HTMLSpanElement>;
28
+ type TextBaseProps = {
29
+ /**
30
+ * [Вариант начертания](https://core-ds.github.io/core-components/master/?path=/docs/tokens-assets-типографика--docs)
31
+ */
32
+ view?: "primary-large" | "primary-medium" | "primary-small" | "secondary-large" | "secondary-medium" | "secondary-small" | "component" | "caps";
33
+ /**
34
+ * Цвет текста
35
+ */
36
+ color?: Color;
37
+ /**
38
+ * Толщина шрифта
39
+ */
40
+ weight?: "regular" | "medium" | "bold";
41
+ /**
42
+ * Делает цифры моноширинными
43
+ */
44
+ monospaceNumbers?: boolean;
45
+ /**
46
+ * HTML тег
47
+ */
48
+ tag?: "span" | "div";
49
+ /**
50
+ * Css-класс для стилизации (native prop)
51
+ */
52
+ className?: string;
53
+ /**
54
+ * Id компонента для тестов
55
+ */
56
+ dataTestId?: string;
57
+ /**
58
+ * Контент (native prop)
59
+ */
60
+ children?: React.ReactNode;
61
+ /**
62
+ * Добавляет отступы к тэгу 'p'
63
+ */
64
+ defaultMargins?: never;
65
+ /**
66
+ * Количество строк (не поддерживает IE)
67
+ */
68
+ rowLimit?: 1 | 2 | 3;
69
+ };
70
+ type TextPTagProps = Omit<TextBaseProps, "tag" | "defaultMargins"> & {
71
+ tag?: "p";
72
+ defaultMargins?: boolean;
73
+ };
74
+ type TextProps = Omit<NativeProps, "color"> & (TextBaseProps | TextPTagProps);
75
+ type NativeProps$0 = HTMLAttributes<HTMLHeadingElement>;
76
+ type TitleProps = Omit<NativeProps$0, "color"> & {
77
+ /**
78
+ * HTML тег
79
+ */
80
+ tag: "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "div";
81
+ /**
82
+ * [Вариант начертания](https://core-ds.github.io/core-components/master/?path=/docs/guidelines-typography--page)
83
+ */
84
+ view?: "xlarge" | "large" | "medium" | "small" | "xsmall";
85
+ /**
86
+ * Цвет текста
87
+ */
88
+ color?: Color;
89
+ /**
90
+ * Толщина шрифта
91
+ */
92
+ weight?: "regular" | "medium" | "bold";
93
+ /**
94
+ * Шрифт текста
95
+ */
96
+ font?: "styrene" | "system";
97
+ /**
98
+ * Добавляет отступы
99
+ */
100
+ defaultMargins?: boolean;
101
+ /**
102
+ * Css-класс для стилизации (native prop)
103
+ */
104
+ className?: string;
105
+ /**
106
+ * Id компонента для тестов
107
+ */
108
+ dataTestId?: string;
109
+ /**
110
+ * Контент (native prop)
111
+ */
112
+ children?: React.ReactNode;
113
+ /**
114
+ * Количество строк (не поддерживает IE)
115
+ */
116
+ rowLimit?: 1 | 2 | 3;
117
+ };
118
+ type TitleMobileProps = Omit<TitleProps, "defaultMargins">;
119
+ declare const Typography: {
120
+ Title: FC<TitleProps>;
121
+ Text: ForwardRefExoticComponent<TextProps & RefAttributes<TextElementType>>;
122
+ TitleResponsive: FC<TitleProps>;
123
+ TitleMobile: FC<TitleMobileProps>;
124
+ };
125
+ declare const typographyPresets: {
126
+ mobile: {
127
+ list: {
128
+ text: {
129
+ primary: {
130
+ tag: string;
131
+ view: string;
132
+ };
133
+ secondary: {
134
+ tag: string;
135
+ color: string;
136
+ view: string;
137
+ };
138
+ };
139
+ };
140
+ };
141
+ };
142
+ declare const TitleResponsive: FC<TitleProps>;
143
+ interface BackArrowAddonProps extends React.HTMLAttributes<HTMLButtonElement> {
144
+ /**
145
+ * Текст после иконки
146
+ */
147
+ text?: string;
148
+ /**
149
+ * Дополнительный класс
150
+ */
151
+ className?: string;
152
+ /**
153
+ * Вид компонента
154
+ */
155
+ view: 'mobile' | 'desktop';
156
+ /**
157
+ * Прозрачность текста
158
+ */
159
+ textOpacity?: number;
160
+ /**
161
+ * Обработчик клика
162
+ */
163
+ onClick?: () => void;
164
+ }
165
+ declare const BackArrowAddon: React.FC<BackArrowAddonProps>;
166
+ export { Typography, typographyPresets, TitleResponsive, BackArrowAddonProps, BackArrowAddon };
167
+ export type { TitleProps, TextProps, Color };
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import React from 'react';
3
+ import { NavigationBarProps } from "./types-ebda875c";
4
+ declare const NavigationBar: React.ForwardRefExoticComponent<NavigationBarProps & React.RefAttributes<HTMLDivElement>>;
5
+ export * from "./Component-63dec22f";
6
+ export { NavigationBar };
@@ -0,0 +1,12 @@
1
+ /// <reference types="react" />
2
+ import React from 'react';
3
+ import { View } from "./typings-bdb4c6b9";
4
+ declare const Modal: React.ForwardRefExoticComponent<import("./index-bdb4c6b9").BaseModalProps & {
5
+ size?: "s" | "m" | "l" | "xl" | "fullscreen" | undefined;
6
+ fullscreen?: boolean | undefined;
7
+ fixedPosition?: boolean | undefined;
8
+ hasCloser?: boolean | undefined;
9
+ } & {
10
+ view: View;
11
+ } & React.RefAttributes<HTMLDivElement>>;
12
+ export { Modal };
@@ -0,0 +1,5 @@
1
+ import { FC } from 'react';
2
+ import { NavigationBarProps } from "./index-e81c389f";
3
+ type HeaderProps = Omit<NavigationBarProps, 'size' | 'view' | 'parentRef'>;
4
+ declare const Header: FC<HeaderProps>;
5
+ export { HeaderProps, Header };
@@ -0,0 +1,12 @@
1
+ /// <reference types="react" />
2
+ /// <reference types="react-transition-group" />
3
+ import React from 'react';
4
+ import { CheckboxProps } from "./index-ebda875c";
5
+ type HeaderProps = {
6
+ checked?: boolean;
7
+ indeterminate?: boolean;
8
+ onChange?: CheckboxProps['onChange'];
9
+ mobile?: boolean;
10
+ };
11
+ declare const Header: React.FC<HeaderProps>;
12
+ export { HeaderProps, Header };
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import React from 'react';
3
+ import { BaseInputProps } from "./index-ebda875c";
4
+ type InputDesktopProps = Omit<BaseInputProps, 'FormControlComponent' | 'colorStyles'>;
5
+ declare const InputDesktop: React.ForwardRefExoticComponent<InputDesktopProps & React.RefAttributes<HTMLInputElement>>;
6
+ export { InputDesktopProps, InputDesktop };
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import React from 'react';
3
+ import { BaseFormControlProps } from "./index-ebda875c";
4
+ type FormControlDesktopProps = Omit<BaseFormControlProps, 'styles' | 'colorStyles'>;
5
+ declare const FormControlDesktop: React.ForwardRefExoticComponent<FormControlDesktopProps & React.RefAttributes<HTMLDivElement>>;
6
+ export { FormControlDesktopProps, FormControlDesktop };
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import React from 'react';
3
+ import { BaseFormControlProps } from "./index-ebda875c";
4
+ type FormControlMobileProps = Omit<BaseFormControlProps, 'styles' | 'colorStyles'>;
5
+ declare const FormControlMobile: React.ForwardRefExoticComponent<FormControlMobileProps & React.RefAttributes<HTMLDivElement>>;
6
+ export { FormControlMobileProps, FormControlMobile };
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import React from 'react';
3
+ import { AnchorButtonProps, NativeButtonProps } from "./typings-9211a437";
4
+ type ButtonMobileProps = Partial<AnchorButtonProps | NativeButtonProps>;
5
+ declare const ButtonMobile: React.ForwardRefExoticComponent<ButtonMobileProps & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
6
+ export { ButtonMobileProps, ButtonMobile };
@@ -0,0 +1,26 @@
1
+ /// <reference types="react" />
2
+ import React from 'react';
3
+ import { BaseFormControlProps } from "./index-ebda875c";
4
+ type FormControlProps = Omit<BaseFormControlProps, 'styles' | 'colorStyles'> & {
5
+ /**
6
+ * Контрольная точка, с нее начинается desktop версия
7
+ * @default 1024
8
+ */
9
+ breakpoint?: number;
10
+ /**
11
+ * Значение по-умолчанию для хука useMatchMedia
12
+ */
13
+ defaultMatchMediaValue?: boolean | (() => boolean);
14
+ };
15
+ declare const FormControl: React.ForwardRefExoticComponent<Omit<BaseFormControlProps, "styles" | "colorStyles"> & {
16
+ /**
17
+ * Контрольная точка, с нее начинается desktop версия
18
+ * @default 1024
19
+ */
20
+ breakpoint?: number | undefined;
21
+ /**
22
+ * Значение по-умолчанию для хука useMatchMedia
23
+ */
24
+ defaultMatchMediaValue?: boolean | (() => boolean) | undefined;
25
+ } & React.RefAttributes<HTMLDivElement>>;
26
+ export { FormControlProps, FormControl };
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { BaseModalContext } from "./index-bdb4c6b9";
3
+ declare const ModalContext: import("react").Context<BaseModalContext>;
4
+ export { ModalContext };
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ import React from 'react';
3
+ import { TResponsiveModalContext } from "./typings-bdb4c6b9";
4
+ declare const ResponsiveContext: React.Context<TResponsiveModalContext>;
5
+ export { ResponsiveContext };
@@ -0,0 +1,44 @@
1
+ /// <reference types="react" />
2
+ import React from "react";
3
+ import { FC, ReactNode, RefObject } from "react";
4
+ import { NavigationBarProps } from "./index-e81c389f";
5
+ import { SwipeableHandlers } from "react-swipeable";
6
+ import { BackdropProps } from "./index-ebda875c";
7
+ import { BottomSheetProps } from "./types-425c8522";
8
+ type FooterProps = {
9
+ /**
10
+ * Контент футера
11
+ */
12
+ children?: ReactNode;
13
+ /**
14
+ * Фиксирует футер
15
+ */
16
+ sticky?: boolean;
17
+ /**
18
+ * Дополнительный класс
19
+ */
20
+ className?: string;
21
+ };
22
+ declare const Footer: FC<FooterProps>;
23
+ type HeaderProps = Omit<NavigationBarProps, "view" | "size"> & {
24
+ headerRef: RefObject<HTMLDivElement>;
25
+ headerOffset: number;
26
+ };
27
+ declare const Header: FC<HeaderProps>;
28
+ type SwipeableBackdropProps = BackdropProps & {
29
+ /**
30
+ * Прозрачность бэкдропа
31
+ */
32
+ opacity?: number;
33
+ /**
34
+ * Обработчики свайпа
35
+ */
36
+ handlers?: SwipeableHandlers;
37
+ /**
38
+ * Время анимации opacity
39
+ */
40
+ opacityTimeout?: number;
41
+ };
42
+ declare const SwipeableBackdrop: FC<SwipeableBackdropProps>;
43
+ declare const BottomSheet: React.ForwardRefExoticComponent<BottomSheetProps & React.RefAttributes<HTMLDivElement>>;
44
+ export { FooterProps, Footer, HeaderProps, Header, SwipeableBackdropProps, SwipeableBackdrop, BottomSheet };
package/esm/component.js CHANGED
@@ -14,7 +14,7 @@ import './components/table-context/index.js';
14
14
  import './components/table/utils.js';
15
15
  import './utils.js';
16
16
  import '@alfalab/core-components-pagination/esm';
17
- import '@alfalab/core-components-select/esm';
17
+ import '@alfalab/core-components-select/esm/desktop';
18
18
  import './components/pagination/select-field/index.js';
19
19
  import '@alfalab/core-components-button/esm';
20
20
  import './components/tsortable-head-cell/sort-icon-asc.js';
@@ -14,7 +14,7 @@ import './table-context/index.js';
14
14
  import './table/utils.js';
15
15
  import '../utils.js';
16
16
  import '@alfalab/core-components-pagination/esm';
17
- import '@alfalab/core-components-select/esm';
17
+ import '@alfalab/core-components-select/esm/desktop';
18
18
  import './pagination/select-field/index.js';
19
19
  import '@alfalab/core-components-button/esm';
20
20
  import './tsortable-head-cell/sort-icon-asc.js';
@@ -2,12 +2,12 @@ import { __rest, __assign } from 'tslib';
2
2
  import React, { useContext, useMemo, useCallback } from 'react';
3
3
  import cn from 'classnames';
4
4
  import { Pagination as Pagination$1 } from '@alfalab/core-components-pagination/esm';
5
- import { Select } from '@alfalab/core-components-select/esm';
5
+ import { SelectDesktop } from '@alfalab/core-components-select/esm/desktop';
6
6
  import { TableContext } from '../table-context/index.js';
7
7
  import { CustomSelectField } from './select-field/index.js';
8
8
  import '@alfalab/core-components-button/esm';
9
9
 
10
- var styles = {"component":"table__component_3ozv6","pagesWrapper":"table__pagesWrapper_3ozv6","tag":"table__tag_3ozv6","tagActive":"table__tagActive_3ozv6","menu":"table__menu_3ozv6","option":"table__option_3ozv6"};
10
+ var styles = {"component":"table__component_16gby","pagesWrapper":"table__pagesWrapper_16gby","tag":"table__tag_16gby","tagActive":"table__tagActive_16gby","menu":"table__menu_16gby","option":"table__option_16gby"};
11
11
  require('./index.css')
12
12
 
13
13
  var Pagination = function (_a) {
@@ -34,7 +34,7 @@ var Pagination = function (_a) {
34
34
  }, 0);
35
35
  }, [onPageChange, wrapperRef]);
36
36
  return (React.createElement("div", { className: cn(styles.component, className), "data-test-id": dataTestId },
37
- React.createElement(Select, { options: options, selected: perPage.toString(), onChange: handlePerPageChange, preventFlip: false, size: 's', className: styles.select, optionsListClassName: styles.menu, optionClassName: styles.option, Field: CustomSelectField }),
37
+ React.createElement(SelectDesktop, { options: options, selected: perPage.toString(), onChange: handlePerPageChange, preventFlip: false, size: 's', className: styles.select, optionsListClassName: styles.menu, optionClassName: styles.option, Field: CustomSelectField }),
38
38
  pagesCount > 1 && (React.createElement(Pagination$1, __assign({ pagesCount: pagesCount, onPageChange: handlePageChange }, restPaginationProps)))));
39
39
  };
40
40
 
@@ -1,4 +1,4 @@
1
- /* hash: kqfo6 */
1
+ /* hash: 1mktp */
2
2
  :root {
3
3
  } /* deprecated */ :root {
4
4
  --color-light-border-primary: #dcdcdd; /* 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 */
@@ -20,7 +20,7 @@
20
20
  --gap-2xl: 32px;
21
21
  } :root {
22
22
  } :root {
23
- } .table__component_3ozv6 {
23
+ } .table__component_16gby {
24
24
  display: flex;
25
25
  justify-content: space-between;
26
26
  align-items: flex-start;
@@ -28,19 +28,19 @@
28
28
  padding: var(--gap-xl) var(--gap-m) var(--gap-2xl);
29
29
  border-top: 1px solid var(--color-light-border-primary);
30
30
  box-sizing: border-box;
31
- } .table__pagesWrapper_3ozv6 {
31
+ } .table__pagesWrapper_16gby {
32
32
  display: flex;
33
- } .table__tag_3ozv6.table__tag_3ozv6 {
33
+ } .table__tag_16gby.table__tag_16gby {
34
34
  flex-shrink: 0;
35
35
  margin-right: var(--gap-xs);
36
36
  padding: 0 var(--gap-xs);
37
37
  min-width: 32px
38
- } .table__tag_3ozv6.table__tag_3ozv6:last-child {
38
+ } .table__tag_16gby.table__tag_16gby:last-child {
39
39
  margin-right: 0;
40
- } .table__tag_3ozv6.table__tag_3ozv6.table__tagActive_3ozv6 {
40
+ } .table__tag_16gby.table__tag_16gby.table__tagActive_16gby {
41
41
  cursor: default;
42
- } .table__menu_3ozv6 {
42
+ } .table__menu_16gby {
43
43
  margin: var(--gap-2xs) 0;
44
- } .table__option_3ozv6 {
44
+ } .table__option_16gby {
45
45
  min-width: 208px;
46
46
  }