@synerise/ds-table-new 1.1.3 → 1.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 CHANGED
@@ -3,6 +3,16 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [1.2.0](https://github.com/Synerise/synerise-design/compare/@synerise/ds-table-new@1.1.4...@synerise/ds-table-new@1.2.0) (2026-05-13)
7
+
8
+ ### Features
9
+
10
+ - **table-new:** add classes to table dom ([5464544](https://github.com/Synerise/synerise-design/commit/5464544507462afa30d2d02c7f736873fa389782))
11
+
12
+ ## [1.1.4](https://github.com/Synerise/synerise-design/compare/@synerise/ds-table-new@1.1.3...@synerise/ds-table-new@1.1.4) (2026-05-11)
13
+
14
+ **Note:** Version bump only for package @synerise/ds-table-new
15
+
6
16
  ## [1.1.3](https://github.com/Synerise/synerise-design/compare/@synerise/ds-table-new@1.1.2...@synerise/ds-table-new@1.1.3) (2026-05-06)
7
17
 
8
18
  **Note:** Version bump only for package @synerise/ds-table-new
@@ -96,14 +96,14 @@ const BaseTable = ({
96
96
  const tableBodyContent = /* @__PURE__ */ jsx(TableHorizontalScroll, { stickyRight: table.getRightTotalSize(), stickyLeft: table.getLeftTotalSize(), ref: (element) => {
97
97
  tableBodyWrapperRef.current = element;
98
98
  addNode(element);
99
- }, children: /* @__PURE__ */ jsxs(StyledTable, { role: "table", children: [
99
+ }, children: /* @__PURE__ */ jsxs(StyledTable, { role: "table", className: "ds-table", children: [
100
100
  isLoading ? /* @__PURE__ */ jsx(TableBodySkeleton, { wrapperRef: tableBodyWrapperRef, cellHeight }, "table-body-skeleton") : /* @__PURE__ */ jsx(TableBody, { cellHeight, infiniteScroll, emptyDataComponent, texts, onRowClick, getRowProps, getRowTooltipProps }, "table-body"),
101
101
  !isLoading && summary && /* @__PURE__ */ jsx(Tfoot, { children: summary })
102
102
  ] }) });
103
103
  const unifiedTableContent = /* @__PURE__ */ jsx(TableHorizontalScroll, { stickyRight: table.getRightTotalSize(), stickyLeft: table.getLeftTotalSize(), ref: (element) => {
104
104
  tableBodyWrapperRef.current = element;
105
105
  addNode(element);
106
- }, children: /* @__PURE__ */ jsxs(StyledTable, { role: "table", children: [
106
+ }, children: /* @__PURE__ */ jsxs(StyledTable, { role: "table", className: "ds-table", children: [
107
107
  !hideColumnNames && (!isEmpty || isLoading) && /* @__PURE__ */ jsx(TableColumns, { texts, disableColumnNamesLineBreak }),
108
108
  isLoading ? /* @__PURE__ */ jsx(TableBodySkeleton, { wrapperRef: tableBodyWrapperRef, cellHeight }, "table-body-skeleton") : /* @__PURE__ */ jsx(TableBody, { cellHeight, infiniteScroll, emptyDataComponent, texts, onRowClick, getRowProps, getRowTooltipProps }, "table-body"),
109
109
  !isLoading && summary && /* @__PURE__ */ jsx(Tfoot, { children: summary })
@@ -112,7 +112,7 @@ const BaseTable = ({
112
112
  /* @__PURE__ */ jsxs(TableContainer, { ref: tableOuterRef, className, withBorderTop: headerWithBorderTop, cardStyles, withScroll, $maxHeight: maxHeight, "data-testid": "ds-table-container", children: [
113
113
  !hideTitleBar && /* @__PURE__ */ jsx(TableHeader, { itemsMenu, texts, childrenColumnName: expandable?.childrenColumnName, isCounterLoading, isLoading, rowKey, title, hideTitlePart, renderCustomCounter, renderSelectionTitle, searchComponent, filterComponent, headerButton, dataSourceTotalCount, searchQuery, setSearchQuery, handleSearchClear, hasBuiltInSearch, searchProps }),
114
114
  useUnifiedScroll ? withBodyScroll ? /* @__PURE__ */ jsx(TableBodyScrollWrapper, { ref: tableBodyScrollRef, $maxHeight: maxHeight, children: unifiedTableContent }) : unifiedTableContent : /* @__PURE__ */ jsxs(Fragment, { children: [
115
- !hideColumnNames && (!isEmpty || isLoading) && /* @__PURE__ */ jsx(TableColumnsHorizontalScroll, { stickyRight: table.getRightTotalSize(), stickyLeft: table.getLeftTotalSize(), stickyData: stickyContext?.stickyData, isScrolled: rowVirtualizer?.scrollOffset, ref: handleRef, children: /* @__PURE__ */ jsx(StyledTable, { role: "table", children: /* @__PURE__ */ jsx(TableColumns, { texts, disableColumnNamesLineBreak }) }) }),
115
+ !hideColumnNames && (!isEmpty || isLoading) && /* @__PURE__ */ jsx(TableColumnsHorizontalScroll, { stickyRight: table.getRightTotalSize(), stickyLeft: table.getLeftTotalSize(), stickyData: stickyContext?.stickyData, isScrolled: rowVirtualizer?.scrollOffset, ref: handleRef, children: /* @__PURE__ */ jsx(StyledTable, { role: "table", className: "ds-table", children: /* @__PURE__ */ jsx(TableColumns, { texts, disableColumnNamesLineBreak }) }) }),
116
116
  withBodyScroll ? /* @__PURE__ */ jsx(TableBodyScrollWrapper, { ref: tableBodyScrollRef, $maxHeight: maxHeight, children: tableBodyContent }) : tableBodyContent
117
117
  ] }),
118
118
  hasPagination && /* @__PURE__ */ jsx(TablePagination, { ...paginationProps })
@@ -36,7 +36,7 @@ const TableBody = ({
36
36
  return true;
37
37
  }) : flatRows;
38
38
  const allRows = rowVirtualizer ? flatRows : nonVirtualRows;
39
- return allRows.length ? /* @__PURE__ */ jsx(TBody, { "data-testid": "ds-table-body", role: "rowgroup", "data-popup-container": true, style: rowVirtualizer && virtualItems.length ? {
39
+ return allRows.length ? /* @__PURE__ */ jsx(TBody, { className: "ds-table-body", "data-testid": "ds-table-body", role: "rowgroup", "data-popup-container": true, style: rowVirtualizer && virtualItems.length ? {
40
40
  height: `${rowVirtualizer.getTotalSize()}px`,
41
41
  position: "relative"
42
42
  } : void 0, children: rowVirtualizer && virtualItems.length ? (
@@ -31,11 +31,11 @@ const TableBodySkeleton = ({
31
31
  const skeletonRows = useMemo(() => {
32
32
  return Array.from({
33
33
  length: rowCount
34
- }, (_, rowIndex) => headerGroups.map((headerGroup) => /* @__PURE__ */ jsx(Tr, { role: "row", children: headerGroup.headers.map((header, columnIndex) => {
34
+ }, (_, rowIndex) => headerGroups.map((headerGroup) => /* @__PURE__ */ jsx(Tr, { role: "row", className: "ds-table-row", children: headerGroup.headers.map((header, columnIndex) => {
35
35
  return /* @__PURE__ */ jsx(TableCell, { isSorted: !!header.column.getIsSorted(), headerIndex: columnIndex, width: header.column.getSize(), height: cellHeight, isPinned: header.column.getIsPinned(), rightOffset: header.column.getAfter("right"), leftOffset: header.column.getStart("left"), children: header.column.columnDef.meta?.skeletonCell ? header.column.columnDef.meta?.skeletonCell() : /* @__PURE__ */ jsx(TableSkeletonCell, { children: /* @__PURE__ */ jsx(Skeleton, { numberOfSkeletons: 1, size: "M" }) }) }, header.id);
36
36
  }) }, `${headerGroup.id}-${rowIndex}`)));
37
37
  }, [cellHeight, headerGroups, rowCount]);
38
- return /* @__PURE__ */ jsx(TBody, { role: "rowgroup", children: skeletonRows });
38
+ return /* @__PURE__ */ jsx(TBody, { role: "rowgroup", className: "ds-table-body", children: skeletonRows });
39
39
  };
40
40
  export {
41
41
  TableBodySkeleton
@@ -14,7 +14,7 @@ const TableCell = memo(({
14
14
  cellKey,
15
15
  align,
16
16
  ...rest
17
- }) => /* @__PURE__ */ jsx(Td, { $height: height, $width: width, $align: align, isSorted, role: "cell", colSpan, isPinned, rightOffset, leftOffset, headerIndex, ...rest, children: /* @__PURE__ */ jsx(CellWrapper, { children }) }, cellKey));
17
+ }) => /* @__PURE__ */ jsx(Td, { $height: height, $width: width, $align: align, isSorted, role: "cell", colSpan, isPinned, rightOffset, leftOffset, headerIndex, ...rest, className: rest.className ? `ds-table-cell ${rest.className}` : "ds-table-cell", children: /* @__PURE__ */ jsx(CellWrapper, { children }) }, cellKey));
18
18
  export {
19
19
  TableCell
20
20
  };
@@ -11,7 +11,7 @@ const TableEmptyBody = ({
11
11
  table
12
12
  } = useTableContext();
13
13
  const colSpan = table.getAllLeafColumns().length;
14
- return /* @__PURE__ */ jsx(TBody, { children: /* @__PURE__ */ jsx(Tr, { children: /* @__PURE__ */ jsx(Td, { colSpan, children: /* @__PURE__ */ jsx(TableEmptyBodyWrapper, { children: emptyDataComponent !== void 0 ? emptyDataComponent : /* @__PURE__ */ jsx(Result, { description: texts.emptyText || /* @__PURE__ */ jsx(FormattedMessage, { id: "DS.TABLE.EMPTY_TEXT" }), type: "no-results", noSearchResults: true }) }) }) }) });
14
+ return /* @__PURE__ */ jsx(TBody, { className: "ds-table-body", children: /* @__PURE__ */ jsx(Tr, { className: "ds-table-row", children: /* @__PURE__ */ jsx(Td, { colSpan, className: "ds-table-cell", children: /* @__PURE__ */ jsx(TableEmptyBodyWrapper, { children: emptyDataComponent !== void 0 ? emptyDataComponent : /* @__PURE__ */ jsx(Result, { description: texts.emptyText || /* @__PURE__ */ jsx(FormattedMessage, { id: "DS.TABLE.EMPTY_TEXT" }), type: "no-results", noSearchResults: true }) }) }) }) });
15
15
  };
16
16
  export {
17
17
  TableEmptyBody
@@ -34,7 +34,7 @@ const InfiniteLoaderRow = ({
34
34
  }, [loadMore, autoLoadMore, hasError, hasMore, rowVirtualizer, isLoading]);
35
35
  return /* @__PURE__ */ jsxs(Tr, { style, role: "row", children: [
36
36
  /* @__PURE__ */ jsxs(TableCell, { style: {
37
- zIndex: 11
37
+ zIndex: 12
38
38
  }, isPinned: "left", leftOffset: 0, width: 400, children: [
39
39
  isLoading && /* @__PURE__ */ jsx(LoadingItem, { texts }),
40
40
  !isLoading && !hasMore && /* @__PURE__ */ jsx(NoMoreItem, { texts }),
@@ -22,7 +22,7 @@ const TableRow = ({
22
22
  onRowClick(row.original, event);
23
23
  }
24
24
  } : void 0;
25
- const rowContent = /* @__PURE__ */ jsx(Tr, { "data-key": row.id, "data-row-depth": row.depth, "data-row-index": row.index, "data-index": row.index, role: "row", ...restCustomRowProps, onClick: mergedOnClick, children: row.getVisibleCells().map((cell, columnIndex) => {
25
+ const rowContent = /* @__PURE__ */ jsx(Tr, { "data-key": row.id, "data-row-depth": row.depth, "data-row-index": row.index, "data-index": row.index, role: "row", ...restCustomRowProps, className: restCustomRowProps.className ? `ds-table-row ${restCustomRowProps.className}` : "ds-table-row", onClick: mergedOnClick, children: row.getVisibleCells().map((cell, columnIndex) => {
26
26
  const cellId = `cell-${cell.column.id}-${cell.row.id}`;
27
27
  const isColumnSorted = isSorted(cell.column);
28
28
  const cellContent = flexRender(cell.column.columnDef.cell, cell.getContext());
@@ -81,7 +81,7 @@ const TableRowVirtualInner = ({
81
81
  } : void 0;
82
82
  const virtualRowContent = /* @__PURE__ */ jsx(VirtualRow, { "data-key": row.id, "data-row-depth": row.depth, "data-row-ischild": isChild, "data-row-index": virtual.index, "data-index": virtual.index, ...isChild ? {
83
83
  "data-row-expanded": isChildExpanded
84
- } : {}, ...restCustomRowProps, ref: rowVirtualizer?.measureElement, style: {
84
+ } : {}, ...restCustomRowProps, className: restCustomRowProps.className ? `ds-table-row ${restCustomRowProps.className}` : "ds-table-row", ref: rowVirtualizer?.measureElement, style: {
85
85
  ...customStyle,
86
86
  position: "absolute",
87
87
  top: `${top}px`,
@@ -1,19 +1,12 @@
1
- export declare const ToggleButton: import('styled-components').StyledComponent<import('react').ForwardRefExoticComponent<Omit<Partial<{
2
- href: string;
3
- target?: string;
4
- onClick?: React.MouseEventHandler<HTMLElement>;
5
- } & import('antd/lib/button/button').BaseButtonProps & Omit<import('react').AnchorHTMLAttributes<any>, "type" | "onClick"> & {
6
- htmlType?: import('antd/lib/button/button').ButtonHTMLType;
7
- onClick?: React.MouseEventHandler<HTMLElement>;
8
- } & Omit<import('react').ButtonHTMLAttributes<any>, "type" | "onClick">>, "type" | "ghost"> & {
9
- type?: import('@synerise/ds-utils').LiteralStringUnion<import('@synerise/ds-button/dist/Button.types').ButtonType>;
10
- mode?: import('@synerise/ds-utils').LiteralStringUnion<"single-icon" | "split" | "two-icons" | "label-icon" | "icon-label">;
1
+ export declare const ToggleButton: import('styled-components').StyledComponent<import('react').ForwardRefExoticComponent<Omit<import('@synerise/ds-button/dist/BaseButton.types').BaseButtonProps, "type"> & {
2
+ type?: import('@synerise/ds-button').ButtonType;
3
+ mode?: import('@synerise/ds-utils').LiteralStringUnion<import('@synerise/ds-button/dist/Button.types').ButtonMode>;
11
4
  color?: import('@synerise/ds-utils').LiteralStringUnion<"blue" | "grey" | "red" | "green" | "yellow" | "pink" | "mars" | "orange" | "fern" | "cyan" | "purple" | "violet">;
12
5
  groupVariant?: import('@synerise/ds-utils').LiteralStringUnion<"left-rounded" | "squared" | "right-rounded">;
13
- justifyContent?: string;
14
6
  loading?: boolean | {
15
7
  delay?: number;
16
8
  };
9
+ icon?: import('react').ReactNode;
17
10
  onClick?: (event: import('react').MouseEvent<HTMLElement>) => void;
18
11
  iconColor?: import('@synerise/ds-utils').LiteralStringUnion<"blue" | "grey" | "red" | "green" | "yellow" | "pink" | "mars" | "orange" | "fern" | "cyan" | "purple" | "violet">;
19
12
  error?: boolean;
@@ -12,13 +12,13 @@ const TableColumns = ({
12
12
  table
13
13
  } = useTableContext();
14
14
  const headerGroups = table.getHeaderGroups();
15
- return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(THead, { role: "rowgroup", "data-testid": "ds-table-columns", children: headerGroups.map((headerGroup) => /* @__PURE__ */ jsx(Tr, { role: "row", children: headerGroup.headers.map((header, columnIndex) => {
15
+ return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(THead, { className: "ds-table-head", role: "rowgroup", "data-testid": "ds-table-columns", children: headerGroups.map((headerGroup) => /* @__PURE__ */ jsx(Tr, { role: "row", className: "ds-table-row", children: headerGroup.headers.map((header, columnIndex) => {
16
16
  const id = header.id;
17
17
  const isSticky = header.column.getIsPinned();
18
18
  const hasSorter = header.column.getCanSort();
19
19
  const isColumnSorted = isSorted(header.column);
20
20
  const align = header.column.columnDef.meta?.align;
21
- return /* @__PURE__ */ jsx(Th, { headerIndex: columnIndex, colSpan: header.colSpan, style: header.column.columnDef.meta?.style, isPinned: header.column.getIsPinned(), leftOffset: header.column.getStart("left"), rightOffset: header.column.getAfter("right"), isSorted: isColumnSorted, hasSorter, $align: align, "data-sticky": isSticky ? "true" : void 0, role: "columnheader", children: /* @__PURE__ */ jsxs(HeaderWrapper, { $align: align, children: [
21
+ return /* @__PURE__ */ jsx(Th, { className: "ds-table-header-cell", headerIndex: columnIndex, colSpan: header.colSpan, style: header.column.columnDef.meta?.style, isPinned: header.column.getIsPinned(), leftOffset: header.column.getStart("left"), rightOffset: header.column.getAfter("right"), isSorted: isColumnSorted, hasSorter, $align: align, "data-sticky": isSticky ? "true" : void 0, role: "columnheader", children: /* @__PURE__ */ jsxs(HeaderWrapper, { $align: align, children: [
22
22
  /* @__PURE__ */ jsx(Label, { disableColumnNamesLineBreak, children: header.isPlaceholder ? null : flexRender(header.column.columnDef.header, header.getContext()) }),
23
23
  hasSorter && (header.column.columnDef.meta?.renderCustomSortButton?.(header.getContext()) || /* @__PURE__ */ jsx(TableColumnSorter, { texts, column: header.column }))
24
24
  ] }) }, id);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-table-new",
3
- "version": "1.1.3",
3
+ "version": "1.2.0",
4
4
  "description": "TableNew UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "Synerise/synerise-design",
@@ -43,27 +43,27 @@
43
43
  "types": "dist/index.d.ts",
44
44
  "dependencies": {
45
45
  "@floating-ui/react": "^0.27.16",
46
- "@synerise/ds-badge": "^1.0.52",
47
- "@synerise/ds-button": "^1.5.26",
48
- "@synerise/ds-checkbox": "^1.2.29",
49
- "@synerise/ds-copy-icon": "^1.2.10",
50
- "@synerise/ds-dropdown": "^1.3.11",
46
+ "@synerise/ds-badge": "^1.0.53",
47
+ "@synerise/ds-button": "^1.5.28",
48
+ "@synerise/ds-checkbox": "^1.2.30",
49
+ "@synerise/ds-copy-icon": "^1.2.11",
50
+ "@synerise/ds-dropdown": "^1.3.12",
51
51
  "@synerise/ds-flag": "^1.0.11",
52
- "@synerise/ds-icon": "^1.17.3",
53
- "@synerise/ds-inline-alert": "^1.1.22",
54
- "@synerise/ds-input": "^1.7.6",
55
- "@synerise/ds-input-number": "^1.2.43",
52
+ "@synerise/ds-icon": "^1.18.0",
53
+ "@synerise/ds-inline-alert": "^1.1.23",
54
+ "@synerise/ds-input": "^1.7.7",
55
+ "@synerise/ds-input-number": "^1.2.44",
56
56
  "@synerise/ds-loader": "^1.0.16",
57
- "@synerise/ds-modal": "^1.4.11",
58
- "@synerise/ds-pagination": "^1.0.61",
59
- "@synerise/ds-result": "^1.0.57",
60
- "@synerise/ds-scrollbar": "^1.3.4",
61
- "@synerise/ds-search": "^1.5.21",
62
- "@synerise/ds-skeleton": "^1.0.53",
63
- "@synerise/ds-tag": "^1.4.26",
64
- "@synerise/ds-tags": "^1.5.38",
65
- "@synerise/ds-tooltip": "^1.4.18",
66
- "@synerise/ds-typography": "^1.1.21",
57
+ "@synerise/ds-modal": "^1.4.13",
58
+ "@synerise/ds-pagination": "^1.0.63",
59
+ "@synerise/ds-result": "^1.0.59",
60
+ "@synerise/ds-scrollbar": "^1.3.5",
61
+ "@synerise/ds-search": "^1.5.23",
62
+ "@synerise/ds-skeleton": "^1.0.54",
63
+ "@synerise/ds-tag": "^1.4.27",
64
+ "@synerise/ds-tags": "^1.5.40",
65
+ "@synerise/ds-tooltip": "^1.4.19",
66
+ "@synerise/ds-typography": "^1.1.22",
67
67
  "@synerise/ds-utils": "^1.8.1",
68
68
  "@tanstack/react-table": "^8.21.3",
69
69
  "@tanstack/react-virtual": "^3.13.12",
@@ -80,5 +80,5 @@
80
80
  "react-intl": ">= 3.12.0 <= 6.8",
81
81
  "styled-components": "^5.3.3"
82
82
  },
83
- "gitHead": "2e8759a5466a0631229e764b0a1f73de963fc83b"
83
+ "gitHead": "1132c21afce924c3e3b8e75e2ebd5e7b5db69bd2"
84
84
  }