@synerise/ds-table 0.56.5 → 0.56.7

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,25 @@
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
+ ## [0.56.7](https://github.com/synerise/synerise-design/compare/@synerise/ds-table@0.56.6...@synerise/ds-table@0.56.7) (2024-09-11)
7
+
8
+ **Note:** Version bump only for package @synerise/ds-table
9
+
10
+
11
+
12
+
13
+
14
+ ## [0.56.6](https://github.com/synerise/synerise-design/compare/@synerise/ds-table@0.56.5...@synerise/ds-table@0.56.6) (2024-09-05)
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * **table:** tweaks to skeleton ([f84301b](https://github.com/synerise/synerise-design/commit/f84301b1bd733adb733b1ae3690c77c793dfe89e))
20
+
21
+
22
+
23
+
24
+
6
25
  ## [0.56.5](https://github.com/synerise/synerise-design/compare/@synerise/ds-table@0.56.4...@synerise/ds-table@0.56.5) (2024-09-03)
7
26
 
8
27
  **Note:** Version bump only for package @synerise/ds-table
@@ -6,7 +6,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
6
6
 
7
7
  import React, { useMemo } from 'react';
8
8
  import * as S from './TableSkeleton.styles';
9
- import { DEFAULT_ROW_COUNT, TABLE_HEADER, GAP, ROW_HEIGHT } from './constants';
9
+ import { DEFAULT_ROW_COUNT, TABLE_HEADER, GAP, ROW_HEIGHT, PADDING } from './constants';
10
10
  import { TableSkeletonHeader, TableSkeletonSubheader, TableSkeletonBody } from './components';
11
11
  export var TableSkeleton = function TableSkeleton(_ref) {
12
12
  var maxHeight = _ref.maxHeight,
@@ -14,9 +14,11 @@ export var TableSkeleton = function TableSkeleton(_ref) {
14
14
 
15
15
  var rowCount = useMemo(function () {
16
16
  if (!maxHeight) return DEFAULT_ROW_COUNT;
17
- return Math.ceil((maxHeight - TABLE_HEADER - GAP) / (ROW_HEIGHT + GAP));
17
+ return Math.floor(maxHeight - TABLE_HEADER - PADDING + GAP) / (ROW_HEIGHT + GAP);
18
18
  }, [maxHeight]);
19
- return /*#__PURE__*/React.createElement(S.TableSkeletonWrapper, _extends({}, htmlAttributes, {
19
+ return /*#__PURE__*/React.createElement(S.TableSkeletonWrapper, _extends({
20
+ maxHeight: maxHeight
21
+ }, htmlAttributes, {
20
22
  "data-testid": "ds-table-skeleton"
21
23
  }), /*#__PURE__*/React.createElement(TableSkeletonHeader, null), /*#__PURE__*/React.createElement(TableSkeletonSubheader, null), /*#__PURE__*/React.createElement(TableSkeletonBody, {
22
24
  rows: rowCount
@@ -1,5 +1,7 @@
1
1
  /// <reference types="react" />
2
- export declare const TableSkeletonWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
2
+ export declare const TableSkeletonWrapper: import("styled-components").StyledComponent<"div", any, {
3
+ maxHeight?: number | undefined;
4
+ }, never>;
3
5
  export declare const TableSkeletonHeader: import("styled-components").StyledComponent<"div", any, {}, never>;
4
6
  export declare const Skeleton: import("styled-components").StyledComponent<({ size, numberOfSkeletons, width, height, className }: import("@synerise/ds-skeleton").SkeletonProps) => import("react").JSX.Element, any, {}, never>;
5
7
  export declare const SkeletonWrapper: import("styled-components").StyledComponent<"div", any, {
@@ -4,8 +4,10 @@ var rowCss = css(["display:flex;flex-direction:row;justify-content:space-between
4
4
  export var TableSkeletonWrapper = styled.div.withConfig({
5
5
  displayName: "TableSkeletonstyles__TableSkeletonWrapper",
6
6
  componentId: "sc-9yqnm1-0"
7
- })(["background:", ";z-index:10;"], function (props) {
7
+ })(["background:", ";", ";z-index:10;"], function (props) {
8
8
  return props.theme.palette.white;
9
+ }, function (props) {
10
+ return props.maxHeight !== undefined && "height: " + props.maxHeight + "px";
9
11
  });
10
12
  export var TableSkeletonHeader = styled.div.withConfig({
11
13
  displayName: "TableSkeletonstyles__TableSkeletonHeader",
@@ -22,7 +22,7 @@ export var TableSkeletonBody = function TableSkeletonBody(_ref) {
22
22
  }, /*#__PURE__*/React.createElement(S.TableSkeletonLeft, null, /*#__PURE__*/React.createElement(TableSkeletonBar, {
23
23
  width: SKELETON_BAR_TINY
24
24
  }), /*#__PURE__*/React.createElement(SkeletonAvatar, {
25
- shape: "circle",
25
+ shape: "square",
26
26
  size: "M"
27
27
  }), /*#__PURE__*/React.createElement(TableSkeletonBar, {
28
28
  width: SKELETON_BAR_WIDE
@@ -1,6 +1,7 @@
1
1
  export declare const DEFAULT_ROW_COUNT = 10;
2
2
  export declare const ROW_HEIGHT = 40;
3
3
  export declare const GAP = 36;
4
+ export declare const PADDING = 36;
4
5
  export declare const TABLE_HEADER: number;
5
6
  export declare const SKELETON_BAR_TINY = 16;
6
7
  export declare const SKELETON_BAR_STANDARD = 72;
@@ -1,6 +1,7 @@
1
1
  export var DEFAULT_ROW_COUNT = 10;
2
2
  export var ROW_HEIGHT = 40;
3
3
  export var GAP = 36;
4
+ export var PADDING = 36;
4
5
  export var TABLE_HEADER = 76 + 78;
5
6
  export var SKELETON_BAR_TINY = 16;
6
7
  export var SKELETON_BAR_STANDARD = 72;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-table",
3
- "version": "0.56.5",
3
+ "version": "0.56.7",
4
4
  "description": "Table UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "synerise/synerise-design",
@@ -33,31 +33,31 @@
33
33
  ],
34
34
  "types": "dist/index.d.ts",
35
35
  "dependencies": {
36
- "@synerise/ds-alert": "^0.8.26",
37
- "@synerise/ds-badge": "^0.8.7",
38
- "@synerise/ds-button": "^0.21.8",
39
- "@synerise/ds-button-group": "^0.7.12",
40
- "@synerise/ds-checkbox": "^0.12.5",
41
- "@synerise/ds-column-manager": "^0.11.70",
36
+ "@synerise/ds-alert": "^0.8.27",
37
+ "@synerise/ds-badge": "^0.8.8",
38
+ "@synerise/ds-button": "^0.21.9",
39
+ "@synerise/ds-button-group": "^0.7.13",
40
+ "@synerise/ds-checkbox": "^0.12.6",
41
+ "@synerise/ds-column-manager": "^0.11.71",
42
42
  "@synerise/ds-data-format": "^0.5.2",
43
- "@synerise/ds-dropdown": "^0.18.12",
43
+ "@synerise/ds-dropdown": "^0.18.13",
44
44
  "@synerise/ds-flag": "^0.5.1",
45
- "@synerise/ds-icon": "^0.65.3",
46
- "@synerise/ds-input": "^0.24.2",
47
- "@synerise/ds-loader": "^0.3.12",
48
- "@synerise/ds-menu": "^0.19.12",
49
- "@synerise/ds-modal": "^0.17.39",
50
- "@synerise/ds-pagination": "^0.7.60",
51
- "@synerise/ds-result": "^0.7.2",
52
- "@synerise/ds-scrollbar": "^0.11.8",
53
- "@synerise/ds-search": "^0.9.8",
54
- "@synerise/ds-select": "^0.16.14",
55
- "@synerise/ds-skeleton": "^0.6.6",
56
- "@synerise/ds-status": "^0.6.20",
57
- "@synerise/ds-tags": "^0.10.5",
58
- "@synerise/ds-tooltip": "^0.14.38",
45
+ "@synerise/ds-icon": "^0.65.4",
46
+ "@synerise/ds-input": "^0.24.3",
47
+ "@synerise/ds-loader": "^0.3.13",
48
+ "@synerise/ds-menu": "^0.19.13",
49
+ "@synerise/ds-modal": "^0.17.40",
50
+ "@synerise/ds-pagination": "^0.7.61",
51
+ "@synerise/ds-result": "^0.7.3",
52
+ "@synerise/ds-scrollbar": "^0.11.9",
53
+ "@synerise/ds-search": "^0.9.9",
54
+ "@synerise/ds-select": "^0.16.15",
55
+ "@synerise/ds-skeleton": "^0.6.7",
56
+ "@synerise/ds-status": "^0.6.21",
57
+ "@synerise/ds-tags": "^0.10.6",
58
+ "@synerise/ds-tooltip": "^0.14.39",
59
59
  "@synerise/ds-typography": "^0.15.1",
60
- "@synerise/ds-utils": "^0.29.0",
60
+ "@synerise/ds-utils": "^0.29.1",
61
61
  "@types/react-window": "^1.8.5",
62
62
  "classnames": "2.3.2",
63
63
  "copy-to-clipboard": "^3.3.1",
@@ -77,5 +77,5 @@
77
77
  "react-dom": "^16.14.0",
78
78
  "styled-components": "5.0.1"
79
79
  },
80
- "gitHead": "6fe94d574f25c5267c7593dec9399527f441b23a"
80
+ "gitHead": "fcf3fa64e906cf9fefb37a61ee28218c8eed9b73"
81
81
  }