@semcore/data-table 1.5.4 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/lib/cjs/Body.js +279 -78
- package/lib/cjs/Body.js.map +1 -1
- package/lib/cjs/DataTable.js +195 -160
- package/lib/cjs/DataTable.js.map +1 -1
- package/lib/cjs/Head.js +16 -9
- package/lib/cjs/Head.js.map +1 -1
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/style/data-table.shadow.css +12 -1
- package/lib/cjs/types.js +4 -0
- package/lib/cjs/types.js.map +1 -0
- package/lib/cjs/utils.js +26 -26
- package/lib/cjs/utils.js.map +1 -1
- package/lib/es6/Body.js +279 -78
- package/lib/es6/Body.js.map +1 -1
- package/lib/es6/DataTable.js +197 -158
- package/lib/es6/DataTable.js.map +1 -1
- package/lib/es6/Head.js +17 -9
- package/lib/es6/Head.js.map +1 -1
- package/lib/es6/index.js.map +1 -1
- package/lib/es6/style/data-table.shadow.css +12 -1
- package/lib/es6/types.js +2 -0
- package/lib/es6/types.js.map +1 -0
- package/lib/es6/utils.js +20 -24
- package/lib/es6/utils.js.map +1 -1
- package/package.json +20 -3
- package/src/Body.tsx +257 -0
- package/src/DataTable.tsx +443 -0
- package/src/{Head.jsx → Head.tsx} +29 -11
- package/src/{index.js → index.ts} +0 -0
- package/src/style/data-table.shadow.css +12 -1
- package/src/types.ts +53 -0
- package/src/utils.ts +55 -0
- package/lib/types/index.d.ts +0 -99
- package/src/Body.jsx +0 -118
- package/src/DataTable.jsx +0 -283
- package/src/index.d.ts +0 -99
- package/src/utils.js +0 -54
|
@@ -6,46 +6,64 @@ import SortDesc from '@semcore/icon/SortDesc/m';
|
|
|
6
6
|
import SortAsc from '@semcore/icon/SortAsc/m';
|
|
7
7
|
import { callAllEventHandlers } from '@semcore/utils/lib/assignProps';
|
|
8
8
|
import { flattenColumns, getFixedStyle, getScrollOffsetValue } from './utils';
|
|
9
|
+
import type { Column } from './types';
|
|
9
10
|
import logger from '@semcore/utils/lib/logger';
|
|
11
|
+
import type ResizeObserverCallback from 'resize-observer-polyfill';
|
|
10
12
|
|
|
11
13
|
import scrollStyles from './style/scroll-area.shadow.css';
|
|
12
14
|
|
|
13
15
|
const SORTING_ICON = {
|
|
14
16
|
desc: SortDesc,
|
|
15
17
|
asc: SortAsc,
|
|
18
|
+
} as const;
|
|
19
|
+
|
|
20
|
+
type AsProps = {
|
|
21
|
+
$onSortClick: (name: string, event: React.MouseEvent | React.KeyboardEvent) => void;
|
|
22
|
+
$scrollRef: (instance: unknown) => void;
|
|
23
|
+
use: 'primary' | 'secondary';
|
|
24
|
+
columnsChildren: Column[];
|
|
25
|
+
onResize: ResizeObserverCallback;
|
|
26
|
+
sticky: boolean;
|
|
27
|
+
['data-ui-name']: string;
|
|
16
28
|
};
|
|
17
29
|
|
|
18
|
-
class Head extends Component {
|
|
19
|
-
columns = [];
|
|
30
|
+
class Head extends Component<AsProps> {
|
|
31
|
+
columns: Column[] = [];
|
|
32
|
+
|
|
33
|
+
static displayName: string;
|
|
20
34
|
|
|
21
|
-
bindHandlerSortClick = (name) => (
|
|
22
|
-
this.asProps.$onSortClick(name,
|
|
35
|
+
bindHandlerSortClick = (name: string) => (event: React.MouseEvent) => {
|
|
36
|
+
this.asProps.$onSortClick(name, event);
|
|
23
37
|
};
|
|
24
38
|
|
|
25
|
-
bindHandlerKeyDown = (name) => (
|
|
26
|
-
if (
|
|
27
|
-
this.asProps.$onSortClick(name,
|
|
39
|
+
bindHandlerKeyDown = (name: string) => (event: React.KeyboardEvent) => {
|
|
40
|
+
if (event.code === 'Enter') {
|
|
41
|
+
this.asProps.$onSortClick(name, event);
|
|
28
42
|
}
|
|
29
43
|
};
|
|
30
44
|
|
|
31
|
-
renderColumns(columns, width) {
|
|
45
|
+
renderColumns(columns: Column[], width: number) {
|
|
32
46
|
return columns.map((column) => this.renderColumn(column, width));
|
|
33
47
|
}
|
|
34
48
|
|
|
35
|
-
renderColumn(column, width) {
|
|
49
|
+
renderColumn(column: Column, width: number) {
|
|
36
50
|
const { styles, use, hidden } = this.asProps;
|
|
37
51
|
const SColumn = Flex;
|
|
38
52
|
const SHead = Box;
|
|
39
53
|
const SSortIcon = SORTING_ICON[column.sortDirection];
|
|
40
|
-
const isGroup =
|
|
54
|
+
const isGroup = column.columns?.length > 0;
|
|
41
55
|
const cSize = isGroup ? flattenColumns(column.columns).length : 1;
|
|
42
56
|
const [name, value] = getFixedStyle(column, this.columns);
|
|
57
|
+
|
|
43
58
|
const style = {
|
|
44
|
-
[name]: value,
|
|
45
59
|
flexBasis: column.props.flex === undefined && `${width * cSize}%`,
|
|
46
60
|
...column.props.style,
|
|
47
61
|
};
|
|
48
62
|
|
|
63
|
+
if (name !== undefined && value !== undefined) {
|
|
64
|
+
style[name] = value;
|
|
65
|
+
}
|
|
66
|
+
|
|
49
67
|
return sstyled(styles)(
|
|
50
68
|
<SColumn
|
|
51
69
|
key={column.name}
|
|
File without changes
|
|
@@ -209,9 +209,13 @@ SRow[theme='danger']:hover SCell:not([theme]) {
|
|
|
209
209
|
background-color: color-mod(var(--red) blend(#fff 85%));
|
|
210
210
|
}
|
|
211
211
|
|
|
212
|
+
SRow[positioned] {
|
|
213
|
+
position: absolute;
|
|
214
|
+
}
|
|
215
|
+
|
|
212
216
|
SCell {
|
|
213
217
|
display: flex;
|
|
214
|
-
flex:
|
|
218
|
+
flex: 1;
|
|
215
219
|
font-size: 14px;
|
|
216
220
|
color: var(--gray20);
|
|
217
221
|
line-height: 20px;
|
|
@@ -275,3 +279,10 @@ SScrollAreaBar[orientation='horizontal'] {
|
|
|
275
279
|
margin-right: calc(var(--right) + 4px);
|
|
276
280
|
width: calc(100% - var(--offsetSum) - 8px);
|
|
277
281
|
}
|
|
282
|
+
|
|
283
|
+
SHeightHold {
|
|
284
|
+
position: absolute;
|
|
285
|
+
top: 0;
|
|
286
|
+
width: 100px;
|
|
287
|
+
/* pointer-events: none; */
|
|
288
|
+
}
|
package/src/types.ts
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ROW_GROUP } from './DataTable';
|
|
3
|
+
|
|
4
|
+
export type PseudoChildPropsGetter = (
|
|
5
|
+
props: { [propName: string]: unknown },
|
|
6
|
+
rowData: { [columnName: string]: unknown },
|
|
7
|
+
index: number,
|
|
8
|
+
) => { [propName: string]: unknown };
|
|
9
|
+
export type PropsLayer = {
|
|
10
|
+
childrenPropsGetter?: PseudoChildPropsGetter;
|
|
11
|
+
[propName: string]: unknown;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export type SortDirection = 'asc' | 'desc';
|
|
15
|
+
export type Column<
|
|
16
|
+
Props extends { [propName: string]: unknown } = { [propName: string]: unknown },
|
|
17
|
+
> = {
|
|
18
|
+
name: string;
|
|
19
|
+
active: boolean;
|
|
20
|
+
width: number;
|
|
21
|
+
fixed?: 'left' | 'right';
|
|
22
|
+
resizable?: boolean;
|
|
23
|
+
sortable?: boolean | SortDirection;
|
|
24
|
+
sortDirection: SortDirection;
|
|
25
|
+
cssVar: string | string[];
|
|
26
|
+
data?: unknown;
|
|
27
|
+
props: {
|
|
28
|
+
name: string;
|
|
29
|
+
} & Partial<{
|
|
30
|
+
onClick: (event: React.MouseEvent) => void;
|
|
31
|
+
onKeyDown: (event: React.KeyboardEvent) => void;
|
|
32
|
+
ref: React.RefObject<HTMLElement>;
|
|
33
|
+
style: React.CSSProperties;
|
|
34
|
+
fixed: 'left' | 'right';
|
|
35
|
+
children: React.ReactNode[];
|
|
36
|
+
resizable: boolean;
|
|
37
|
+
sortable: boolean | SortDirection;
|
|
38
|
+
sortDirection: SortDirection;
|
|
39
|
+
}> &
|
|
40
|
+
Props;
|
|
41
|
+
columns: Column[];
|
|
42
|
+
};
|
|
43
|
+
export type Cell = Pick<Column, 'name' | 'cssVar' | 'fixed' | 'data'> & {
|
|
44
|
+
cellPropsLayers: PropsLayer[];
|
|
45
|
+
};
|
|
46
|
+
export type RowData<
|
|
47
|
+
Data extends { [columnName: string]: unknown } = { [columnName: string]: unknown },
|
|
48
|
+
> = Data &
|
|
49
|
+
Partial<{
|
|
50
|
+
name: string;
|
|
51
|
+
[ROW_GROUP]: RowData[];
|
|
52
|
+
}>;
|
|
53
|
+
export type NestedCells = (Cell | NestedCells)[] & { flatRowData?: RowData };
|
package/src/utils.ts
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { Column } from './types';
|
|
2
|
+
|
|
3
|
+
export const getScrollOffsetValue = (columns: Column[]) =>
|
|
4
|
+
columns.reduce(
|
|
5
|
+
(acc, column) => {
|
|
6
|
+
if (column.fixed === 'left') {
|
|
7
|
+
acc[0] += column.width;
|
|
8
|
+
}
|
|
9
|
+
if (column.fixed === 'right') {
|
|
10
|
+
acc[1] += column.width;
|
|
11
|
+
}
|
|
12
|
+
return acc;
|
|
13
|
+
},
|
|
14
|
+
[0, 0] as [leftOffset: number, rightOffset: number],
|
|
15
|
+
);
|
|
16
|
+
|
|
17
|
+
export const flattenColumns = (columns: Column[]) =>
|
|
18
|
+
columns.reduce((acc, column) => {
|
|
19
|
+
const hasNestedColumns = 'columns' in column && column.columns.length > 0;
|
|
20
|
+
const columns: Column[] = hasNestedColumns ? flattenColumns(column.columns) : [column];
|
|
21
|
+
acc = acc.concat(columns);
|
|
22
|
+
return acc;
|
|
23
|
+
}, [] as Column[]);
|
|
24
|
+
|
|
25
|
+
export const getFixedStyle = (
|
|
26
|
+
cell: Pick<Column, 'name' | 'fixed'>,
|
|
27
|
+
columns: Column[],
|
|
28
|
+
): [side: 'left' | 'right', style: string | number] | [side: undefined, style: undefined] => {
|
|
29
|
+
const side = cell.fixed;
|
|
30
|
+
if (!side) return [undefined, undefined];
|
|
31
|
+
const names = cell.name.split('/');
|
|
32
|
+
const nameSideMap = {
|
|
33
|
+
left: names[0],
|
|
34
|
+
right: names[names.length - 1],
|
|
35
|
+
};
|
|
36
|
+
const name = nameSideMap[side];
|
|
37
|
+
const index = columns.findIndex((column) => column.name === name);
|
|
38
|
+
|
|
39
|
+
if (index === -1) return [undefined, undefined];
|
|
40
|
+
|
|
41
|
+
const startIndexSideMap = {
|
|
42
|
+
left: 0,
|
|
43
|
+
right: index,
|
|
44
|
+
};
|
|
45
|
+
const endIndexSideMap = {
|
|
46
|
+
left: index,
|
|
47
|
+
right: columns.length - 1,
|
|
48
|
+
};
|
|
49
|
+
const columnsFixed = columns.slice(startIndexSideMap[side], endIndexSideMap[side]);
|
|
50
|
+
|
|
51
|
+
if (columnsFixed.length < 1) return [side, 0];
|
|
52
|
+
|
|
53
|
+
const vars = columnsFixed.map((column) => `var(--${column.name}_width)`);
|
|
54
|
+
return [side, vars.length === 1 ? vars[0] : `calc(${vars.join(' + ')})`];
|
|
55
|
+
};
|
package/lib/types/index.d.ts
DELETED
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { PropGetterFn } from '@semcore/core';
|
|
3
|
-
import { IBoxProps, IFlexProps } from '@semcore/flex-box';
|
|
4
|
-
|
|
5
|
-
/* utils type */
|
|
6
|
-
type CProps<Props, Ctx = {}, UCProps = {}> = Props & {
|
|
7
|
-
children?: ((props: Props & Ctx, handlers: UCProps) => React.ReactNode) | React.ReactNode;
|
|
8
|
-
};
|
|
9
|
-
type ReturnEl = React.ReactElement | null;
|
|
10
|
-
/* utils type */
|
|
11
|
-
|
|
12
|
-
type ChildRenderFn<Props> = Props & {
|
|
13
|
-
children?: (props: Props, column: DataTableData, index: number) => { [key: string]: unknown };
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export type DataTableData = { [key: string]: unknown };
|
|
17
|
-
export type DataTableSort = [string, 'desc' | 'asc'];
|
|
18
|
-
export type DataTableTheme = 'muted' | 'info' | 'success' | 'warning' | 'danger';
|
|
19
|
-
export type DataTableUse = 'primary' | 'secondary';
|
|
20
|
-
export type DataTableRow = DataTableCell[];
|
|
21
|
-
export type DataTableCell = {
|
|
22
|
-
/** Name of column */
|
|
23
|
-
name: string;
|
|
24
|
-
/** Data of column */
|
|
25
|
-
data: React.ReactNode;
|
|
26
|
-
[key: string]: unknown;
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
export interface IDataTableProps extends IBoxProps {
|
|
30
|
-
/** Theme for table
|
|
31
|
-
* @default primary
|
|
32
|
-
* */
|
|
33
|
-
use?: DataTableUse;
|
|
34
|
-
/** Data for table */
|
|
35
|
-
data?: DataTableData[];
|
|
36
|
-
/** Active sort object */
|
|
37
|
-
sort?: DataTableSort;
|
|
38
|
-
/** Handler call when will request change sort */
|
|
39
|
-
onSortChange?: (sort: DataTableSort, e?: React.SyntheticEvent) => void;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export interface IDataTableHeadProps extends IBoxProps {
|
|
43
|
-
/** Sticky header table
|
|
44
|
-
* @deprecated
|
|
45
|
-
* */
|
|
46
|
-
sticky?: boolean;
|
|
47
|
-
|
|
48
|
-
/** Hidden header */
|
|
49
|
-
hidden?: boolean;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export interface IDataTableColumnProps extends IFlexProps {
|
|
53
|
-
/** Unique name column */
|
|
54
|
-
name?: string;
|
|
55
|
-
/** Enable sort for column also if you pass string you can set default sort */
|
|
56
|
-
sortable?: boolean | 'desc' | 'asc';
|
|
57
|
-
/** Enable resize for column
|
|
58
|
-
* @ignore */
|
|
59
|
-
resizable?: boolean;
|
|
60
|
-
/** Fixed column on the left/right */
|
|
61
|
-
fixed?: 'left' | 'right';
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
export interface IDataTableBodyProps extends IBoxProps {
|
|
65
|
-
/** Rows table */
|
|
66
|
-
rows?: DataTableRow[];
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
export interface IDataTableRowProps extends IBoxProps {
|
|
70
|
-
/** Theme for row */
|
|
71
|
-
theme?: DataTableTheme;
|
|
72
|
-
/** Displays row as active/hover */
|
|
73
|
-
active?: boolean;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
export interface IDataTableCellProps extends IFlexProps {
|
|
77
|
-
/** Unique name column or columns separated by / */
|
|
78
|
-
name: string;
|
|
79
|
-
/** Theme for cell */
|
|
80
|
-
theme?: DataTableTheme;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
interface IDataTableCtx {
|
|
84
|
-
getHeadProps: PropGetterFn;
|
|
85
|
-
getBodyProps: PropGetterFn;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
declare const ROW_GROUP: unique symbol;
|
|
89
|
-
|
|
90
|
-
declare const DataTable: (<T>(props: CProps<IDataTableProps & T, IDataTableCtx>) => ReturnEl) & {
|
|
91
|
-
Head: <T>(props: IDataTableHeadProps & T) => ReturnEl;
|
|
92
|
-
Body: <T>(props: IDataTableBodyProps & T) => ReturnEl;
|
|
93
|
-
Column: <T>(props: IDataTableColumnProps & T) => ReturnEl;
|
|
94
|
-
Cell: <T>(props: ChildRenderFn<IDataTableCellProps & T>) => ReturnEl;
|
|
95
|
-
Row: <T>(props: ChildRenderFn<IDataTableRowProps & T>) => ReturnEl;
|
|
96
|
-
};
|
|
97
|
-
|
|
98
|
-
export { ROW_GROUP };
|
|
99
|
-
export default DataTable;
|
package/src/Body.jsx
DELETED
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Component, sstyled, Root } from '@semcore/core';
|
|
3
|
-
import { Box, Flex } from '@semcore/flex-box';
|
|
4
|
-
import ScrollArea from '@semcore/scroll-area';
|
|
5
|
-
import { getFixedStyle, getScrollOffsetValue } from './utils';
|
|
6
|
-
import assignProps from '@semcore/utils/lib/assignProps';
|
|
7
|
-
|
|
8
|
-
import scrollStyles from './style/scroll-area.shadow.css';
|
|
9
|
-
|
|
10
|
-
function getCellsByColumn(row) {
|
|
11
|
-
return row.reduce((acc, cell) => {
|
|
12
|
-
acc[cell.name] = acc[cell.name]
|
|
13
|
-
? Array.isArray(acc[cell.name])
|
|
14
|
-
? acc[cell.name].concat(cell.data)
|
|
15
|
-
: [acc[cell.name], cell.data]
|
|
16
|
-
: cell.data;
|
|
17
|
-
return acc;
|
|
18
|
-
}, {});
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
class Body extends Component {
|
|
22
|
-
renderRows(rows) {
|
|
23
|
-
const SRow = Box;
|
|
24
|
-
const { styles, $propsRow } = this.asProps;
|
|
25
|
-
|
|
26
|
-
return rows.map((row, index) => {
|
|
27
|
-
const cellsByColumn = row._row || getCellsByColumn(row);
|
|
28
|
-
const props = $propsRow.reduce(
|
|
29
|
-
(acc, { getRowProps = (p) => p, ...other }) => {
|
|
30
|
-
const propsRow = assignProps(other, acc);
|
|
31
|
-
return assignProps(getRowProps(propsRow, cellsByColumn, index), propsRow);
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
children: this.renderCells(row, cellsByColumn, index),
|
|
35
|
-
},
|
|
36
|
-
);
|
|
37
|
-
return sstyled(styles)(
|
|
38
|
-
<SRow key={index} theme={props.theme} active={props.active} {...props} />,
|
|
39
|
-
);
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
renderCells(row, cellsByColumn, index) {
|
|
44
|
-
const SCell = Flex;
|
|
45
|
-
const { styles, columns, use } = this.asProps;
|
|
46
|
-
return row.reduce((acc, cell) => {
|
|
47
|
-
if (Array.isArray(cell)) {
|
|
48
|
-
acc = acc.concat(<div>{this.renderRows(cell)}</div>);
|
|
49
|
-
} else {
|
|
50
|
-
const column = columns.find((c) => c.name === cell.name);
|
|
51
|
-
const [name, value] = getFixedStyle(cell, columns);
|
|
52
|
-
const vars = (Array.isArray(cell.cssVar) ? cell.cssVar : [cell.cssVar]).map(
|
|
53
|
-
(n) => `var(${n})`,
|
|
54
|
-
);
|
|
55
|
-
const props = (cell.rendersCell || []).reduce(
|
|
56
|
-
(acc, { getCellProps = (p) => p, ...other }) => {
|
|
57
|
-
const propsCell = assignProps(other, acc);
|
|
58
|
-
return assignProps(getCellProps(propsCell, cellsByColumn, index), propsCell);
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
name: cell.name,
|
|
62
|
-
children: cell.data,
|
|
63
|
-
justifyContent: column?.props?.justifyContent,
|
|
64
|
-
style: {
|
|
65
|
-
[name]: value,
|
|
66
|
-
width: vars.length === 1 ? vars[0] : `calc(${vars.join(' + ')})`,
|
|
67
|
-
},
|
|
68
|
-
},
|
|
69
|
-
);
|
|
70
|
-
|
|
71
|
-
acc.push(
|
|
72
|
-
sstyled(styles)(
|
|
73
|
-
<SCell key={cell.name} {...props} fixed={cell.fixed} theme={props.theme} use={use} />,
|
|
74
|
-
),
|
|
75
|
-
);
|
|
76
|
-
}
|
|
77
|
-
return acc;
|
|
78
|
-
}, []);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
render() {
|
|
82
|
-
const SBody = Root;
|
|
83
|
-
const SBodyWrapper = Box;
|
|
84
|
-
const SScrollAreaBar = ScrollArea.Bar;
|
|
85
|
-
const { Children, styles, rows, columns, $scrollRef, onResize } = this.asProps;
|
|
86
|
-
|
|
87
|
-
const initializeColumns = !!columns.reduce((acc, c) => acc + c.width, 0);
|
|
88
|
-
|
|
89
|
-
const [offsetLeftSum, offsetRightSum] = getScrollOffsetValue(columns);
|
|
90
|
-
const offsetSum = offsetLeftSum + offsetRightSum;
|
|
91
|
-
|
|
92
|
-
return sstyled(styles)(
|
|
93
|
-
<SBodyWrapper>
|
|
94
|
-
<ScrollArea
|
|
95
|
-
shadow
|
|
96
|
-
styles={scrollStyles}
|
|
97
|
-
use:left={`${offsetLeftSum}px`}
|
|
98
|
-
use:right={`${offsetRightSum}px`}
|
|
99
|
-
onResize={onResize}
|
|
100
|
-
>
|
|
101
|
-
<ScrollArea.Container ref={$scrollRef}>
|
|
102
|
-
<SBody render={Box}>{initializeColumns ? this.renderRows(rows) : null}</SBody>
|
|
103
|
-
</ScrollArea.Container>
|
|
104
|
-
<SScrollAreaBar
|
|
105
|
-
orientation="horizontal"
|
|
106
|
-
left={`${offsetLeftSum}px`}
|
|
107
|
-
right={`${offsetRightSum}px`}
|
|
108
|
-
offsetSum={`${offsetSum}px`}
|
|
109
|
-
/>
|
|
110
|
-
<SScrollAreaBar orientation="vertical" />
|
|
111
|
-
</ScrollArea>
|
|
112
|
-
{Children.origin}
|
|
113
|
-
</SBodyWrapper>,
|
|
114
|
-
);
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
export default Body;
|