@astral/ui 4.44.0 → 4.46.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 (189) hide show
  1. package/components/DataGrid/Body/Body.d.ts +1 -98
  2. package/components/DataGrid/Body/Body.js +3 -15
  3. package/components/DataGrid/Body/index.d.ts +1 -0
  4. package/components/DataGrid/Body/index.js +1 -0
  5. package/components/DataGrid/Body/types.d.ts +110 -0
  6. package/components/DataGrid/Body/types.js +1 -0
  7. package/components/DataGrid/DataGrid.js +30 -5
  8. package/components/DataGrid/Head/Head.d.ts +4 -0
  9. package/components/DataGrid/Head/Head.js +3 -2
  10. package/components/DataGrid/Loader/Loader.js +2 -2
  11. package/components/DataGrid/Loader/styles.js +4 -2
  12. package/components/DataGrid/PinnedSections/PinnedSections.d.ts +35 -0
  13. package/components/DataGrid/PinnedSections/PinnedSections.js +11 -0
  14. package/components/DataGrid/PinnedSections/Section/Section.d.ts +3 -0
  15. package/components/DataGrid/PinnedSections/Section/Section.js +17 -0
  16. package/components/DataGrid/PinnedSections/Section/index.d.ts +1 -0
  17. package/components/DataGrid/PinnedSections/Section/index.js +1 -0
  18. package/components/DataGrid/PinnedSections/Section/styles.d.ts +5 -0
  19. package/components/DataGrid/PinnedSections/Section/styles.js +100 -0
  20. package/components/DataGrid/PinnedSections/Section/types.d.ts +26 -0
  21. package/components/DataGrid/PinnedSections/Section/types.js +1 -0
  22. package/components/DataGrid/PinnedSections/Section/useLogic/useLogic.d.ts +9 -0
  23. package/components/DataGrid/PinnedSections/Section/useLogic/useLogic.js +16 -0
  24. package/components/DataGrid/PinnedSections/index.d.ts +1 -0
  25. package/components/DataGrid/PinnedSections/index.js +1 -0
  26. package/components/DataGrid/PinnedSections/styles.d.ts +7 -0
  27. package/components/DataGrid/PinnedSections/styles.js +18 -0
  28. package/components/DataGrid/PinnedSections/types.d.ts +5 -0
  29. package/components/DataGrid/PinnedSections/types.js +1 -0
  30. package/components/DataGrid/PinnedSections/useLogic/index.js +1 -0
  31. package/components/DataGrid/PinnedSections/useLogic/useLogic.d.ts +9 -0
  32. package/components/DataGrid/PinnedSections/useLogic/useLogic.js +19 -0
  33. package/components/DataGrid/Row/NestedChildren/NestedChildren.js +2 -2
  34. package/components/DataGrid/Row/Row.d.ts +1 -94
  35. package/components/DataGrid/Row/Row.js +23 -8
  36. package/components/DataGrid/Row/constants.d.ts +3 -1
  37. package/components/DataGrid/Row/constants.js +3 -1
  38. package/components/DataGrid/Row/styles.js +9 -8
  39. package/components/DataGrid/Row/types.d.ts +118 -0
  40. package/components/DataGrid/Row/types.js +1 -0
  41. package/components/DataGrid/Row/useLogic/useLogic.d.ts +3 -2
  42. package/components/DataGrid/Row/useLogic/useLogic.js +14 -2
  43. package/components/DataGrid/constants.d.ts +7 -0
  44. package/components/DataGrid/constants.js +7 -0
  45. package/components/DataGrid/hooks/index.d.ts +1 -0
  46. package/components/DataGrid/hooks/index.js +1 -0
  47. package/components/DataGrid/hooks/useRowHover/index.d.ts +1 -0
  48. package/components/DataGrid/hooks/useRowHover/index.js +1 -0
  49. package/components/DataGrid/hooks/useRowHover/useRowHover.d.ts +15 -0
  50. package/components/DataGrid/hooks/useRowHover/useRowHover.js +93 -0
  51. package/components/DataGrid/styles.js +17 -0
  52. package/components/DataGrid/types.d.ts +4 -0
  53. package/components/DataGrid/useLogic/hooks/index.d.ts +2 -0
  54. package/components/DataGrid/useLogic/hooks/index.js +2 -0
  55. package/components/DataGrid/useLogic/hooks/useClassnames/index.d.ts +1 -0
  56. package/components/DataGrid/useLogic/hooks/useClassnames/index.js +1 -0
  57. package/components/DataGrid/useLogic/hooks/useClassnames/useClassnames.d.ts +12 -0
  58. package/components/DataGrid/useLogic/hooks/useClassnames/useClassnames.js +14 -0
  59. package/components/DataGrid/useLogic/hooks/usePinnedColumns/index.d.ts +1 -0
  60. package/components/DataGrid/useLogic/hooks/usePinnedColumns/index.js +1 -0
  61. package/components/DataGrid/useLogic/hooks/usePinnedColumns/usePinnedColumns.d.ts +18 -0
  62. package/components/DataGrid/useLogic/hooks/usePinnedColumns/usePinnedColumns.js +43 -0
  63. package/components/DataGrid/useLogic/useLogic.d.ts +30 -4
  64. package/components/DataGrid/useLogic/useLogic.js +55 -16
  65. package/components/DataGrid/useLogic/utils/getColumnSections/getColumnSections.d.ts +17 -0
  66. package/components/DataGrid/useLogic/utils/getColumnSections/getColumnSections.js +45 -0
  67. package/components/DataGrid/useLogic/utils/getColumnSections/index.d.ts +1 -0
  68. package/components/DataGrid/useLogic/utils/getColumnSections/index.js +1 -0
  69. package/components/DataGrid/useLogic/utils/index.d.ts +2 -1
  70. package/components/DataGrid/useLogic/utils/index.js +2 -1
  71. package/components/DataGrid/useLogic/utils/syncRowsHeight/index.d.ts +1 -0
  72. package/components/DataGrid/useLogic/utils/syncRowsHeight/index.js +1 -0
  73. package/components/DataGrid/useLogic/utils/syncRowsHeight/syncRowsHeight.d.ts +5 -0
  74. package/components/DataGrid/useLogic/utils/syncRowsHeight/syncRowsHeight.js +21 -0
  75. package/components/DataGrid/utils/index.d.ts +1 -0
  76. package/components/DataGrid/utils/index.js +1 -0
  77. package/components/DataGridInfinite/useLogic/useLogic.js +1 -1
  78. package/components/PageContent/constants.d.ts +1 -0
  79. package/components/PageContent/constants.js +1 -0
  80. package/components/PageContent/styles.js +13 -0
  81. package/components/PdfViewer/List/styles.js +4 -0
  82. package/components/PdfViewer/PdfDocument/styles.js +5 -0
  83. package/components/PdfViewer/PdfPage/styles.js +10 -0
  84. package/components/PdfViewer/styles.js +4 -0
  85. package/components/PdfViewer/useLogic/useLogic.js +15 -1
  86. package/node/components/DataGrid/Body/Body.d.ts +1 -98
  87. package/node/components/DataGrid/Body/Body.js +3 -15
  88. package/node/components/DataGrid/Body/index.d.ts +1 -0
  89. package/node/components/DataGrid/Body/index.js +1 -0
  90. package/node/components/DataGrid/Body/types.d.ts +110 -0
  91. package/node/components/DataGrid/Body/types.js +2 -0
  92. package/node/components/DataGrid/DataGrid.js +29 -4
  93. package/node/components/DataGrid/Head/Head.d.ts +4 -0
  94. package/node/components/DataGrid/Head/Head.js +3 -2
  95. package/node/components/DataGrid/Loader/Loader.js +1 -1
  96. package/node/components/DataGrid/Loader/styles.js +4 -2
  97. package/node/components/DataGrid/PinnedSections/PinnedSections.d.ts +35 -0
  98. package/node/components/DataGrid/PinnedSections/PinnedSections.js +15 -0
  99. package/node/components/DataGrid/PinnedSections/Section/Section.d.ts +3 -0
  100. package/node/components/DataGrid/PinnedSections/Section/Section.js +21 -0
  101. package/node/components/DataGrid/PinnedSections/Section/index.d.ts +1 -0
  102. package/node/components/DataGrid/PinnedSections/Section/index.js +17 -0
  103. package/node/components/DataGrid/PinnedSections/Section/styles.d.ts +5 -0
  104. package/node/components/DataGrid/PinnedSections/Section/styles.js +103 -0
  105. package/node/components/DataGrid/PinnedSections/Section/types.d.ts +26 -0
  106. package/node/components/DataGrid/PinnedSections/Section/types.js +2 -0
  107. package/node/components/DataGrid/PinnedSections/Section/useLogic/index.d.ts +1 -0
  108. package/node/components/DataGrid/PinnedSections/Section/useLogic/useLogic.d.ts +9 -0
  109. package/node/components/DataGrid/PinnedSections/Section/useLogic/useLogic.js +20 -0
  110. package/node/components/DataGrid/PinnedSections/index.d.ts +1 -0
  111. package/node/components/DataGrid/PinnedSections/index.js +17 -0
  112. package/node/components/DataGrid/PinnedSections/styles.d.ts +7 -0
  113. package/node/components/DataGrid/PinnedSections/styles.js +21 -0
  114. package/node/components/DataGrid/PinnedSections/types.d.ts +5 -0
  115. package/node/components/DataGrid/PinnedSections/types.js +2 -0
  116. package/node/components/DataGrid/PinnedSections/useLogic/index.d.ts +1 -0
  117. package/node/components/DataGrid/PinnedSections/useLogic/index.js +17 -0
  118. package/node/components/DataGrid/PinnedSections/useLogic/useLogic.d.ts +9 -0
  119. package/node/components/DataGrid/PinnedSections/useLogic/useLogic.js +23 -0
  120. package/node/components/DataGrid/Row/NestedChildren/NestedChildren.js +1 -1
  121. package/node/components/DataGrid/Row/Row.d.ts +1 -94
  122. package/node/components/DataGrid/Row/Row.js +23 -8
  123. package/node/components/DataGrid/Row/constants.d.ts +3 -1
  124. package/node/components/DataGrid/Row/constants.js +4 -2
  125. package/node/components/DataGrid/Row/styles.js +8 -7
  126. package/node/components/DataGrid/Row/types.d.ts +118 -0
  127. package/node/components/DataGrid/Row/types.js +2 -0
  128. package/node/components/DataGrid/Row/useLogic/useLogic.d.ts +3 -2
  129. package/node/components/DataGrid/Row/useLogic/useLogic.js +13 -1
  130. package/node/components/DataGrid/constants.d.ts +7 -0
  131. package/node/components/DataGrid/constants.js +7 -0
  132. package/node/components/DataGrid/hooks/index.d.ts +1 -0
  133. package/node/components/DataGrid/hooks/index.js +17 -0
  134. package/node/components/DataGrid/hooks/useRowHover/index.d.ts +1 -0
  135. package/node/components/DataGrid/hooks/useRowHover/index.js +17 -0
  136. package/node/components/DataGrid/hooks/useRowHover/useRowHover.d.ts +15 -0
  137. package/node/components/DataGrid/hooks/useRowHover/useRowHover.js +97 -0
  138. package/node/components/DataGrid/styles.js +17 -0
  139. package/node/components/DataGrid/types.d.ts +4 -0
  140. package/node/components/DataGrid/useLogic/hooks/index.d.ts +2 -0
  141. package/node/components/DataGrid/useLogic/hooks/index.js +18 -0
  142. package/node/components/DataGrid/useLogic/hooks/useClassnames/index.d.ts +1 -0
  143. package/node/components/DataGrid/useLogic/hooks/useClassnames/index.js +17 -0
  144. package/node/components/DataGrid/useLogic/hooks/useClassnames/useClassnames.d.ts +12 -0
  145. package/node/components/DataGrid/useLogic/hooks/useClassnames/useClassnames.js +18 -0
  146. package/node/components/DataGrid/useLogic/hooks/usePinnedColumns/index.d.ts +1 -0
  147. package/node/components/DataGrid/useLogic/hooks/usePinnedColumns/index.js +17 -0
  148. package/node/components/DataGrid/useLogic/hooks/usePinnedColumns/usePinnedColumns.d.ts +18 -0
  149. package/node/components/DataGrid/useLogic/hooks/usePinnedColumns/usePinnedColumns.js +47 -0
  150. package/node/components/DataGrid/useLogic/useLogic.d.ts +30 -4
  151. package/node/components/DataGrid/useLogic/useLogic.js +53 -14
  152. package/node/components/DataGrid/useLogic/utils/getColumnSections/getColumnSections.d.ts +17 -0
  153. package/node/components/DataGrid/useLogic/utils/getColumnSections/getColumnSections.js +50 -0
  154. package/node/components/DataGrid/useLogic/utils/getColumnSections/index.d.ts +1 -0
  155. package/node/components/DataGrid/useLogic/utils/getColumnSections/index.js +17 -0
  156. package/node/components/DataGrid/useLogic/utils/index.d.ts +2 -1
  157. package/node/components/DataGrid/useLogic/utils/index.js +5 -3
  158. package/node/components/DataGrid/useLogic/utils/syncRowsHeight/index.d.ts +1 -0
  159. package/node/components/DataGrid/useLogic/utils/syncRowsHeight/index.js +17 -0
  160. package/node/components/DataGrid/useLogic/utils/syncRowsHeight/syncRowsHeight.d.ts +5 -0
  161. package/node/components/DataGrid/useLogic/utils/syncRowsHeight/syncRowsHeight.js +25 -0
  162. package/node/components/DataGrid/utils/index.d.ts +1 -0
  163. package/node/components/DataGrid/utils/index.js +3 -1
  164. package/node/components/DataGridInfinite/useLogic/useLogic.js +1 -1
  165. package/node/components/PageContent/constants.d.ts +1 -0
  166. package/node/components/PageContent/constants.js +1 -0
  167. package/node/components/PageContent/styles.js +13 -0
  168. package/node/components/PdfViewer/List/styles.js +4 -0
  169. package/node/components/PdfViewer/PdfDocument/styles.js +5 -0
  170. package/node/components/PdfViewer/PdfPage/styles.js +10 -0
  171. package/node/components/PdfViewer/styles.js +4 -0
  172. package/node/components/PdfViewer/useLogic/useLogic.js +15 -1
  173. package/package.json +1 -1
  174. package/components/DataGrid/Body/useLogic/useLogic.d.ts +0 -12
  175. package/components/DataGrid/Body/useLogic/useLogic.js +0 -11
  176. package/node/components/DataGrid/Body/useLogic/useLogic.d.ts +0 -12
  177. package/node/components/DataGrid/Body/useLogic/useLogic.js +0 -15
  178. /package/components/DataGrid/{Body → PinnedSections/Section}/useLogic/index.d.ts +0 -0
  179. /package/components/DataGrid/{Body → PinnedSections/Section}/useLogic/index.js +0 -0
  180. /package/{node/components/DataGrid/Body → components/DataGrid/PinnedSections}/useLogic/index.d.ts +0 -0
  181. /package/components/DataGrid/{useLogic/utils → utils}/getGridTemplateColumns/getGridTemplateColumns.d.ts +0 -0
  182. /package/components/DataGrid/{useLogic/utils → utils}/getGridTemplateColumns/getGridTemplateColumns.js +0 -0
  183. /package/components/DataGrid/{useLogic/utils → utils}/getGridTemplateColumns/index.d.ts +0 -0
  184. /package/components/DataGrid/{useLogic/utils → utils}/getGridTemplateColumns/index.js +0 -0
  185. /package/node/components/DataGrid/{Body → PinnedSections/Section}/useLogic/index.js +0 -0
  186. /package/node/components/DataGrid/{useLogic/utils → utils}/getGridTemplateColumns/getGridTemplateColumns.d.ts +0 -0
  187. /package/node/components/DataGrid/{useLogic/utils → utils}/getGridTemplateColumns/getGridTemplateColumns.js +0 -0
  188. /package/node/components/DataGrid/{useLogic/utils → utils}/getGridTemplateColumns/index.d.ts +0 -0
  189. /package/node/components/DataGrid/{useLogic/utils → utils}/getGridTemplateColumns/index.js +0 -0
@@ -232,6 +232,10 @@ export type DataGridColumns<TData extends Record<string, CellValue>> = {
232
232
  * Принимает компонент DataGridColumnHintIcon - подсказка в шапке колонки
233
233
  */
234
234
  columnHint?: ReactNode;
235
+ /**
236
+ * Закрепление колонки в таблице
237
+ */
238
+ pinned?: 'left' | 'right';
235
239
  };
236
240
  export type DataGridRowOptionColumns<TData extends Record<string, CellValue>> = {
237
241
  /**
@@ -0,0 +1,2 @@
1
+ export * from './usePinnedColumns';
2
+ export * from './useClassnames';
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./usePinnedColumns"), exports);
18
+ __exportStar(require("./useClassnames"), exports);
@@ -0,0 +1 @@
1
+ export * from './useClassnames';
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./useClassnames"), exports);
@@ -0,0 +1,12 @@
1
+ type UseClassnamesParams = {
2
+ isDataGridDisabled?: boolean;
3
+ dataGridClassName?: string;
4
+ hasPinnedColumns?: boolean;
5
+ isNoData?: boolean;
6
+ };
7
+ export declare const useClassnames: ({ isDataGridDisabled, dataGridClassName, hasPinnedColumns, isNoData, }: UseClassnamesParams) => {
8
+ pinnedSectionsClassname: string;
9
+ dataGridClassname: string;
10
+ bodyClassName: string;
11
+ };
12
+ export {};
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useClassnames = void 0;
4
+ const classNames_1 = require("../../../../utils/classNames");
5
+ const constants_1 = require("../../../constants");
6
+ const useClassnames = ({ isDataGridDisabled, dataGridClassName, hasPinnedColumns, isNoData, }) => {
7
+ const pinnedSectionsClassname = (0, classNames_1.classNames)(constants_1.dataGridClassnames.pinnedSections, {
8
+ [constants_1.dataGridClassnames.disabled]: isDataGridDisabled,
9
+ });
10
+ const dataGridClassname = (0, classNames_1.classNames)(constants_1.dataGridClassnames.root, dataGridClassName, {
11
+ [constants_1.dataGridClassnames.dataGridHasPinnedSections]: hasPinnedColumns,
12
+ });
13
+ const bodyClassName = (0, classNames_1.classNames)(constants_1.dataGridClassnames.body, {
14
+ [constants_1.dataGridClassnames.bodyEmpty]: isNoData,
15
+ });
16
+ return { pinnedSectionsClassname, dataGridClassname, bodyClassName };
17
+ };
18
+ exports.useClassnames = useClassnames;
@@ -0,0 +1 @@
1
+ export * from './usePinnedColumns';
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./usePinnedColumns"), exports);
@@ -0,0 +1,18 @@
1
+ /// <reference types="react" />
2
+ import { type CellValue, type DataGridColumns, type DataGridRow } from '../../../types';
3
+ type UsePinnedColumnsParams<TData extends Record<string, CellValue> = DataGridRow> = {
4
+ isLoading?: boolean;
5
+ columns: DataGridColumns<TData>[];
6
+ };
7
+ export declare const usePinnedColumns: <TData extends Record<string, unknown> = DataGridRow>({ isLoading, columns, }: UsePinnedColumnsParams<TData>) => {
8
+ containerRef: import("react").RefObject<HTMLDivElement | null>;
9
+ rowHoverProps: {
10
+ registerRowElement: (rowId: string, el: HTMLElement) => void;
11
+ unregisterRowElement: (rowId: string, el: HTMLElement) => void;
12
+ onRowEnter: (rowId: string) => void;
13
+ onRowLeave: (rowId: string, e: PointerEvent) => void;
14
+ };
15
+ sections: import("../../../PinnedSections/types").PinnedSection<TData>[];
16
+ hasPinnedColumns: boolean;
17
+ };
18
+ export {};
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.usePinnedColumns = void 0;
4
+ const react_1 = require("react");
5
+ const constants_1 = require("../../../constants");
6
+ const useRowHover_1 = require("../../../hooks/useRowHover");
7
+ const getColumnSections_1 = require("../../utils/getColumnSections");
8
+ const syncRowsHeight_1 = require("../../utils/syncRowsHeight");
9
+ const usePinnedColumns = ({ isLoading, columns, }) => {
10
+ const containerRef = (0, react_1.useRef)(null);
11
+ const hasPinnedColumns = (0, react_1.useMemo)(() => columns.some((column) => column.pinned), [columns]);
12
+ const { rowsMapRef, ...rowHoverProps } = (0, useRowHover_1.useRowHover)({ hasPinnedColumns });
13
+ const isScrollStateSupported = CSS.supports('container-type', 'scroll-state');
14
+ const checkOverflow = (0, react_1.useCallback)((element) => {
15
+ if (element) {
16
+ return element.scrollWidth > element.clientWidth;
17
+ }
18
+ return false;
19
+ }, []);
20
+ const { sections } = (0, react_1.useMemo)(() => (0, getColumnSections_1.getColumnSections)(columns), [columns]);
21
+ (0, react_1.useLayoutEffect)(() => {
22
+ if (isLoading || !hasPinnedColumns || typeof window === 'undefined') {
23
+ return;
24
+ }
25
+ const resizeObserver = new ResizeObserver(() => {
26
+ (0, syncRowsHeight_1.syncRowsHeight)(rowsMapRef.current);
27
+ if (isScrollStateSupported) {
28
+ return;
29
+ }
30
+ if (checkOverflow(containerRef.current)) {
31
+ containerRef.current?.classList.add(constants_1.dataGridClassnames.overflowed);
32
+ }
33
+ else {
34
+ containerRef.current?.classList.remove(constants_1.dataGridClassnames.overflowed);
35
+ }
36
+ });
37
+ if (!containerRef.current) {
38
+ return;
39
+ }
40
+ resizeObserver.observe(containerRef.current);
41
+ return () => {
42
+ resizeObserver.disconnect();
43
+ };
44
+ }, [hasPinnedColumns, isLoading]);
45
+ return { containerRef, rowHoverProps, sections, hasPinnedColumns };
46
+ };
47
+ exports.usePinnedColumns = usePinnedColumns;
@@ -1,7 +1,9 @@
1
1
  import { type ChangeEvent } from 'react';
2
2
  import type { CellValue, DataGridProps, DataGridRow } from '../types';
3
3
  type UseLogicParams<TData extends Record<string, CellValue> = DataGridRow, TSortField extends keyof TData = keyof TData> = DataGridProps<TData, TSortField>;
4
- export declare const useLogic: <TData extends Record<string, unknown> = DataGridRow, TSortField extends keyof TData = keyof TData>({ keyId, columns, rows, variant, tree, subrows, selectedRows, isLoading, isDisabled, onSelectRow, isHideSelectAll, isHideHeaderIfNoData, }: UseLogicParams<TData, TSortField>) => {
4
+ export declare const useLogic: <TData extends Record<string, unknown> = DataGridRow, TSortField extends keyof TData = keyof TData>({ keyId, columns, rows, variant, tree, subrows, selectedRows, isLoading, isDisabled, onSelectRow, isError, onRetry, errorMsg, isHideSelectAll, isHideHeaderIfNoData, sorting, className, onSort, }: UseLogicParams<TData, TSortField>) => {
5
+ pinnedSectionsClassname: string;
6
+ dataGridClassname: string;
5
7
  isDataGridDisabled: boolean | undefined;
6
8
  treeRenderConfig: {
7
9
  isInitialExpanded?: boolean | undefined;
@@ -11,20 +13,44 @@ export declare const useLogic: <TData extends Record<string, unknown> = DataGrid
11
13
  renderRows: TData[];
12
14
  isAllowHorizontalScroll: boolean;
13
15
  isHideHead: boolean;
16
+ hasPinnedColumns: boolean;
17
+ contentStateProps: {
18
+ isLoading: boolean | undefined;
19
+ isError: boolean | undefined;
20
+ loadingTitle: string;
21
+ errorState: {
22
+ imgAlt: string;
23
+ errorList: string[];
24
+ imgSrc: string;
25
+ onRetry: () => void;
26
+ };
27
+ isSmoothLoading: boolean;
28
+ };
29
+ rowHoverProps: {
30
+ registerRowElement: (rowId: string, el: HTMLElement) => void;
31
+ unregisterRowElement: (rowId: string, el: HTMLElement) => void;
32
+ onRowEnter: (rowId: string) => void;
33
+ onRowLeave: (rowId: string, e: PointerEvent) => void;
34
+ };
35
+ containerRef: import("react").RefObject<HTMLDivElement | null>;
36
+ gridColumns: string;
37
+ isNoData: boolean;
38
+ headColumns: import("../types").DataGridColumns<TData>[];
14
39
  headProps: {
15
40
  rowsCount: number;
16
41
  uncheckedRowsCount: number;
17
- gridColumns: string;
18
42
  isSelectable: boolean;
19
- columns: import("../types").DataGridColumns<TData>[];
20
43
  onSelectAllRows: (event: ChangeEvent<HTMLInputElement>) => void;
21
44
  isHideSelectAll: boolean | undefined;
45
+ sorting: import("../types").DataGridSort<TSortField> | undefined;
46
+ onSort: ((sorting: import("../types").DataGridSort<TSortField> | undefined) => void) | undefined;
22
47
  };
23
48
  bodyProps: {
24
- gridColumns: string;
25
49
  isSelectable: boolean;
26
50
  onSelectRow: (row: TData) => (event: ChangeEvent<HTMLInputElement>) => void;
27
51
  };
52
+ bodyClassName: string;
53
+ sections: import("../PinnedSections/types").PinnedSection<TData>[];
28
54
  loaderProps: {
29
55
  isLoading: boolean | undefined;
30
56
  isVisibleDivider: boolean;
@@ -2,35 +2,30 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.useLogic = void 0;
4
4
  const react_1 = require("react");
5
+ const ConfigProvider_1 = require("../../ConfigProvider");
5
6
  const useFirstMountState_1 = require("../../useFirstMountState");
6
7
  const prop_1 = require("../../utils/prop");
7
8
  const uniqueBy_1 = require("../../utils/uniqueBy");
8
9
  const enums_1 = require("../enums");
10
+ const getGridTemplateColumns_1 = require("../utils/getGridTemplateColumns");
11
+ const hooks_1 = require("./hooks");
9
12
  const utils_1 = require("./utils");
10
- const useLogic = ({ keyId, columns, rows = [], variant, tree, subrows, selectedRows = [], isLoading, isDisabled, onSelectRow, isHideSelectAll, isHideHeaderIfNoData = false, }) => {
13
+ const useLogic = ({ keyId, columns, rows = [], variant, tree, subrows, selectedRows = [], isLoading, isDisabled, onSelectRow, isError, onRetry, errorMsg, isHideSelectAll, isHideHeaderIfNoData = false, sorting, className, onSort, }) => {
11
14
  const isFirstRender = (0, useFirstMountState_1.useFirstMountState)();
12
15
  const isSelectable = Boolean(onSelectRow);
13
16
  const isDataGridDisabled = isLoading || isDisabled;
17
+ const { imagesMap } = (0, react_1.useContext)(ConfigProvider_1.ConfigContext);
14
18
  // Реф добавлен для избежания замыкания selectedRows в handleSelectRow (иначе в handleSelectRow приходят некорректные значения selectedRows).
15
19
  const selectedRowsRef = (0, react_1.useRef)(selectedRows);
16
20
  (0, react_1.useEffect)(() => {
17
21
  selectedRowsRef.current = selectedRows;
18
22
  }, [selectedRows]);
19
- const treeRenderConfig = Object.is(variant, enums_1.Variant.Subrows)
20
- ? { ...subrows, isInitialExpanded: true }
21
- : tree;
22
- const availableRows = rows.filter((row) => !(row.options?.isDisabled || row.options?.isNotSelectable));
23
23
  const prevRowsRef = (0, react_1.useRef)([]);
24
24
  (0, react_1.useEffect)(() => {
25
25
  if (!isLoading) {
26
26
  prevRowsRef.current = rows;
27
27
  }
28
28
  }, [rows, isLoading]);
29
- const gridColumns = (0, utils_1.getGridTemplateColumns)(columns);
30
- const isAllowHorizontalScroll = (0, utils_1.getIsAllowHorizontalScroll)(columns);
31
- const uncheckedRowsCount = (0, react_1.useMemo)(() => {
32
- return availableRows.filter((row) => !selectedRows.find((selectedRow) => selectedRow[keyId] === row[keyId])).length;
33
- }, [availableRows, selectedRows, keyId]);
34
29
  const processedColumns = (0, react_1.useCallback)(() => {
35
30
  if (rows.length <= 1) {
36
31
  return columns.map((column) => ({ ...column, sortable: false }));
@@ -38,6 +33,26 @@ const useLogic = ({ keyId, columns, rows = [], variant, tree, subrows, selectedR
38
33
  return columns;
39
34
  }, [columns, rows]);
40
35
  const renderRows = isLoading ? prevRowsRef.current : rows;
36
+ const isNoData = !renderRows.length;
37
+ const { containerRef, rowHoverProps, sections, hasPinnedColumns } = (0, hooks_1.usePinnedColumns)({
38
+ isLoading,
39
+ columns: processedColumns(),
40
+ });
41
+ const { pinnedSectionsClassname, dataGridClassname, bodyClassName } = (0, hooks_1.useClassnames)({
42
+ isDataGridDisabled,
43
+ dataGridClassName: className,
44
+ hasPinnedColumns,
45
+ isNoData,
46
+ });
47
+ const treeRenderConfig = Object.is(variant, enums_1.Variant.Subrows)
48
+ ? { ...subrows, isInitialExpanded: true }
49
+ : tree;
50
+ const availableRows = rows.filter((row) => !(row.options?.isDisabled || row.options?.isNotSelectable));
51
+ const gridColumns = (0, getGridTemplateColumns_1.getGridTemplateColumns)(columns);
52
+ const isAllowHorizontalScroll = (0, utils_1.getIsAllowHorizontalScroll)(columns);
53
+ const uncheckedRowsCount = (0, react_1.useMemo)(() => {
54
+ return availableRows.filter((row) => !selectedRows.find((selectedRow) => selectedRow[keyId] === row[keyId])).length;
55
+ }, [availableRows, selectedRows, keyId]);
41
56
  const handleSelectAllRows = (event) => {
42
57
  if (!onSelectRow) {
43
58
  return;
@@ -58,27 +73,51 @@ const useLogic = ({ keyId, columns, rows = [], variant, tree, subrows, selectedR
58
73
  }
59
74
  onSelectRow(selectedRowsRef.current.filter((selectedRow) => selectedRow[keyId] !== row[keyId]));
60
75
  };
61
- const isHideHead = isHideHeaderIfNoData && rows.length === 0;
76
+ const isHideHead = isHideHeaderIfNoData && isNoData;
77
+ const contentStateProps = (0, react_1.useMemo)(() => {
78
+ return {
79
+ isLoading: isLoading && isNoData,
80
+ isError: isError && isNoData,
81
+ loadingTitle: 'Загрузка данных',
82
+ errorState: {
83
+ imgAlt: 'Что-то пошло не так',
84
+ errorList: [errorMsg || ''],
85
+ imgSrc: imagesMap.defaultErrorImgSrc,
86
+ onRetry,
87
+ },
88
+ isSmoothLoading: false,
89
+ };
90
+ }, [isLoading, isError, isNoData, errorMsg, onRetry, imagesMap]);
62
91
  return {
92
+ pinnedSectionsClassname,
93
+ dataGridClassname,
63
94
  isDataGridDisabled,
64
95
  treeRenderConfig,
65
96
  renderRows,
66
97
  isAllowHorizontalScroll,
67
98
  isHideHead,
99
+ hasPinnedColumns,
100
+ contentStateProps,
101
+ rowHoverProps,
102
+ containerRef,
103
+ gridColumns,
104
+ isNoData,
105
+ headColumns: processedColumns(),
68
106
  headProps: {
69
107
  rowsCount: availableRows.length,
70
108
  uncheckedRowsCount,
71
- gridColumns,
72
109
  isSelectable,
73
- columns: processedColumns(),
74
110
  onSelectAllRows: handleSelectAllRows,
75
111
  isHideSelectAll,
112
+ sorting,
113
+ onSort,
76
114
  },
77
115
  bodyProps: {
78
- gridColumns,
79
116
  isSelectable,
80
117
  onSelectRow: handleSelectRow,
81
118
  },
119
+ bodyClassName,
120
+ sections,
82
121
  loaderProps: {
83
122
  isLoading: !isFirstRender && isLoading,
84
123
  isVisibleDivider: Boolean(rows.length),
@@ -0,0 +1,17 @@
1
+ import type { PinnedSection } from '../../../PinnedSections/types';
2
+ import type { DataGridColumns, DataGridRow } from '../../../types';
3
+ /**
4
+ * Валидирует корректность комбинаций закрепления колонок.
5
+ * Выбрасывает ошибку, если колонки с pinned="right" не идут непрерывным блоком в конце
6
+ * или колонки с pinned="left" не идут непрерывным блоком в начале.
7
+ */
8
+ export declare const validatePinnedColumns: (positions: ('left' | 'right' | 'center')[]) => void;
9
+ /**
10
+ * Группирует колонки DataGrid по закреплённым позициям (pinned):
11
+ * - left (закреплены слева)
12
+ * - center (обычные, не закреплённые)
13
+ * - right (закреплены справа)
14
+ */
15
+ export declare const getColumnSections: <TData extends Record<string, unknown> = DataGridRow>(columns: DataGridColumns<TData>[]) => {
16
+ sections: PinnedSection<TData>[];
17
+ };
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getColumnSections = exports.validatePinnedColumns = void 0;
4
+ /**
5
+ * Валидирует корректность комбинаций закрепления колонок.
6
+ * Выбрасывает ошибку, если колонки с pinned="right" не идут непрерывным блоком в конце
7
+ * или колонки с pinned="left" не идут непрерывным блоком в начале.
8
+ */
9
+ const validatePinnedColumns = (positions) => {
10
+ const firstRight = positions.indexOf('right');
11
+ if (firstRight !== -1 &&
12
+ positions.slice(firstRight).some((p) => p !== 'right')) {
13
+ // biome-ignore lint/suspicious/noConsole: Сообщение для интеграторов
14
+ console.error('DataGrid: Колонки с pinned="right" должны идти непрерывным блоком в конце');
15
+ }
16
+ // left: должны быть в начале
17
+ const lastLeft = positions.lastIndexOf('left');
18
+ if (lastLeft !== -1 &&
19
+ positions.slice(0, lastLeft + 1).some((p) => p !== 'left')) {
20
+ // biome-ignore lint/suspicious/noConsole: Сообщение для интеграторов
21
+ console.error('DataGrid: Колонки с pinned="left" должны идти непрерывным блоком в начале');
22
+ }
23
+ };
24
+ exports.validatePinnedColumns = validatePinnedColumns;
25
+ /**
26
+ * Группирует колонки DataGrid по закреплённым позициям (pinned):
27
+ * - left (закреплены слева)
28
+ * - center (обычные, не закреплённые)
29
+ * - right (закреплены справа)
30
+ */
31
+ const getColumnSections = (columns) => {
32
+ const groups = columns.reduce((acc, col) => {
33
+ const position = col.pinned ?? 'center';
34
+ if (!acc[position]) {
35
+ acc[position] = [];
36
+ }
37
+ acc[position].push(col);
38
+ return acc;
39
+ }, {});
40
+ const positions = columns.map((c) => c.pinned ?? 'center');
41
+ (0, exports.validatePinnedColumns)(positions);
42
+ return {
43
+ sections: [
44
+ { position: 'left', columns: groups.left },
45
+ { position: 'center', columns: groups.center },
46
+ { position: 'right', columns: groups.right },
47
+ ],
48
+ };
49
+ };
50
+ exports.getColumnSections = getColumnSections;
@@ -0,0 +1 @@
1
+ export * from './getColumnSections';
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./getColumnSections"), exports);
@@ -1,2 +1,3 @@
1
- export { getGridTemplateColumns } from './getGridTemplateColumns';
2
1
  export { getIsAllowHorizontalScroll } from './getIsAllowHorizontalScroll';
2
+ export { syncRowsHeight } from './syncRowsHeight';
3
+ export { getColumnSections } from './getColumnSections';
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getIsAllowHorizontalScroll = exports.getGridTemplateColumns = void 0;
4
- var getGridTemplateColumns_1 = require("./getGridTemplateColumns");
5
- Object.defineProperty(exports, "getGridTemplateColumns", { enumerable: true, get: function () { return getGridTemplateColumns_1.getGridTemplateColumns; } });
3
+ exports.getColumnSections = exports.syncRowsHeight = exports.getIsAllowHorizontalScroll = void 0;
6
4
  var getIsAllowHorizontalScroll_1 = require("./getIsAllowHorizontalScroll");
7
5
  Object.defineProperty(exports, "getIsAllowHorizontalScroll", { enumerable: true, get: function () { return getIsAllowHorizontalScroll_1.getIsAllowHorizontalScroll; } });
6
+ var syncRowsHeight_1 = require("./syncRowsHeight");
7
+ Object.defineProperty(exports, "syncRowsHeight", { enumerable: true, get: function () { return syncRowsHeight_1.syncRowsHeight; } });
8
+ var getColumnSections_1 = require("./getColumnSections");
9
+ Object.defineProperty(exports, "getColumnSections", { enumerable: true, get: function () { return getColumnSections_1.getColumnSections; } });
@@ -0,0 +1 @@
1
+ export * from './syncRowsHeight';
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./syncRowsHeight"), exports);
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Синхронизирует высоту строк DataGrid на основе высоты их содержимого.
3
+ * Каждая строка устанавливает высоту равной максимальной высоте всех своих ячеек.
4
+ */
5
+ export declare const syncRowsHeight: (rowsMap: Map<string, Set<HTMLElement>>) => void;
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.syncRowsHeight = void 0;
4
+ /**
5
+ * Синхронизирует высоту строк DataGrid на основе высоты их содержимого.
6
+ * Каждая строка устанавливает высоту равной максимальной высоте всех своих ячеек.
7
+ */
8
+ const syncRowsHeight = (rowsMap) => {
9
+ rowsMap.forEach((elements) => {
10
+ let maxHeight = 0;
11
+ elements.forEach((el) => {
12
+ el.style.height = '';
13
+ });
14
+ elements.forEach((el) => {
15
+ const height = el.offsetHeight;
16
+ if (height > maxHeight) {
17
+ maxHeight = height;
18
+ }
19
+ });
20
+ elements.forEach((el) => {
21
+ el.style.height = `${maxHeight}px`;
22
+ });
23
+ });
24
+ };
25
+ exports.syncRowsHeight = syncRowsHeight;
@@ -1 +1,2 @@
1
1
  export { alignToJustifyContent } from './alignToJustifyContent';
2
+ export { getGridTemplateColumns } from './getGridTemplateColumns';
@@ -1,5 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.alignToJustifyContent = void 0;
3
+ exports.getGridTemplateColumns = exports.alignToJustifyContent = void 0;
4
4
  var alignToJustifyContent_1 = require("./alignToJustifyContent");
5
5
  Object.defineProperty(exports, "alignToJustifyContent", { enumerable: true, get: function () { return alignToJustifyContent_1.alignToJustifyContent; } });
6
+ var getGridTemplateColumns_1 = require("./getGridTemplateColumns");
7
+ Object.defineProperty(exports, "getGridTemplateColumns", { enumerable: true, get: function () { return getGridTemplateColumns_1.getGridTemplateColumns; } });
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.useLogic = void 0;
4
4
  const react_1 = require("react");
5
5
  const enums_1 = require("../../DataGrid/enums");
6
- const utils_1 = require("../../DataGrid/useLogic/utils");
6
+ const utils_1 = require("../../DataGrid/utils");
7
7
  const useToggle_1 = require("../../useToggle");
8
8
  const prop_1 = require("../../utils/prop");
9
9
  const uniqueBy_1 = require("../../utils/uniqueBy");
@@ -3,5 +3,6 @@ export declare const pageContentClassnames: {
3
3
  content: string;
4
4
  contentHasHeader: string;
5
5
  animation: string;
6
+ withPdfViewer: string;
6
7
  };
7
8
  export declare const PAGE_CONTENT_ANIMATION = "white-flash";
@@ -7,5 +7,6 @@ exports.pageContentClassnames = {
7
7
  content: (0, createUIKitClassname_1.createUIKitClassname)('page-content__content'),
8
8
  contentHasHeader: (0, createUIKitClassname_1.createUIKitClassname)('page-content__content_has-header'),
9
9
  animation: (0, createUIKitClassname_1.createUIKitClassname)('page-content_animation'),
10
+ withPdfViewer: (0, createUIKitClassname_1.createUIKitClassname)('page-content_with-pdf-viewer'),
10
11
  };
11
12
  exports.PAGE_CONTENT_ANIMATION = 'white-flash';
@@ -109,4 +109,17 @@ exports.Content = styled_1.styled.div `
109
109
  padding: ${({ theme }) => theme.spacing(4, 4, 3)};
110
110
  }
111
111
  }
112
+
113
+ ${({ theme }) => theme.breakpoints.down('sm')} {
114
+ &&.${constants_2.pageContentClassnames.withPdfViewer} {
115
+ margin: 0;
116
+ padding-top: 0;
117
+ padding-right: 0;
118
+ padding-left: 0;
119
+
120
+ background-color: ${({ theme }) => theme.palette.background.body};
121
+ border: unset;
122
+ border-radius: 0;
123
+ }
124
+ }
112
125
  `;
@@ -6,4 +6,8 @@ exports.Wrapper = styled_1.styled.div `
6
6
  display: flex;
7
7
  flex-direction: column;
8
8
  gap: ${({ theme }) => theme.spacing(4)};
9
+
10
+ ${({ theme }) => theme.breakpoints.down('sm')} {
11
+ gap: 0;
12
+ }
9
13
  `;
@@ -50,4 +50,9 @@ exports.StyledDocument = (0, styled_1.styled)(react_pdf_1.Document, {
50
50
  opacity: 1;
51
51
  }
52
52
  }
53
+
54
+ ${({ theme }) => theme.breakpoints.down('sm')} {
55
+ margin: 0;
56
+ padding: 0;
57
+ }
53
58
  `;
@@ -24,6 +24,16 @@ exports.Wrapper = styled_1.styled.div `
24
24
  height: ${({ $height }) => $height}px;
25
25
  padding-top: 0;
26
26
  }
27
+
28
+ ${({ theme }) => theme.breakpoints.down('sm')} {
29
+ border-top: ${({ $isViewerLite, theme }) => ($isViewerLite ? 'unset' : `1px solid ${theme.palette.grey[300]}`)};
30
+ border-radius: ${({ $isViewerLite }) => !$isViewerLite && 0};
31
+ box-shadow: ${({ $isViewerLite }) => !$isViewerLite && 'none'};
32
+
33
+ &:last-child {
34
+ border-bottom: ${({ $isViewerLite, theme }) => ($isViewerLite ? 'unset' : `1px solid ${theme.palette.grey[300]}`)};
35
+ }
36
+ }
27
37
  `;
28
38
  exports.StyledTag = (0, styled_1.styled)(ControlBar_1.StyledTag) `
29
39
  top: ${({ theme }) => theme.spacing(3)};
@@ -22,4 +22,8 @@ exports.ScrollContainer = styled_1.styled.div `
22
22
  overflow: ${({ $isViewerLite, $enabledZoom }) => $isViewerLite || !$enabledZoom ? 'unset' : 'auto'};
23
23
 
24
24
  height: 100%;
25
+
26
+ ${({ theme }) => theme.breakpoints.down('sm')} {
27
+ scrollbar-gutter: unset;
28
+ }
25
29
  `;