@synerise/ds-table 0.57.6 → 0.58.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 (40) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/Cell/index.js +1 -2
  3. package/dist/Table.d.ts +5 -5
  4. package/dist/Table.js +29 -25
  5. package/dist/Table.styles.d.ts +12 -1
  6. package/dist/Table.styles.js +16 -3
  7. package/dist/Table.types.d.ts +6 -3
  8. package/dist/TableHeader/TableHeader.d.ts +1 -2
  9. package/dist/TableHeader/TableHeader.js +24 -35
  10. package/dist/TableHeader/TableHeader.types.d.ts +1 -0
  11. package/dist/TableHeader/TableLimit/TableLimit.d.ts +3 -3
  12. package/dist/TableHeader/TableLimit/TableLimit.js +4 -5
  13. package/dist/TableHeader/TableLimit/TableLimit.types.d.ts +6 -6
  14. package/dist/VirtualTable/VirtualTable.d.ts +6 -2
  15. package/dist/constants/TableSkeleton.constants.d.ts +20 -0
  16. package/dist/constants/TableSkeleton.constants.js +101 -0
  17. package/dist/style/index.css +1 -1
  18. package/dist/utils/getSkeletonProps.d.ts +7 -0
  19. package/dist/utils/getSkeletonProps.js +58 -0
  20. package/package.json +15 -15
  21. package/dist/TableSkeleton/TableSkeleton.d.ts +0 -3
  22. package/dist/TableSkeleton/TableSkeleton.js +0 -34
  23. package/dist/TableSkeleton/TableSkeleton.styles.d.ts +0 -20
  24. package/dist/TableSkeleton/TableSkeleton.styles.js +0 -58
  25. package/dist/TableSkeleton/TableSkeleton.types.d.ts +0 -7
  26. package/dist/TableSkeleton/TableSkeleton.types.js +0 -1
  27. package/dist/TableSkeleton/components/TableSkeletonBar.d.ts +0 -6
  28. package/dist/TableSkeleton/components/TableSkeletonBar.js +0 -19
  29. package/dist/TableSkeleton/components/TableSkeletonBody.d.ts +0 -7
  30. package/dist/TableSkeleton/components/TableSkeletonBody.js +0 -33
  31. package/dist/TableSkeleton/components/TableSkeletonHeader.d.ts +0 -4
  32. package/dist/TableSkeleton/components/TableSkeletonHeader.js +0 -15
  33. package/dist/TableSkeleton/components/TableSkeletonRowRight.d.ts +0 -2
  34. package/dist/TableSkeleton/components/TableSkeletonRowRight.js +0 -13
  35. package/dist/TableSkeleton/components/TableSkeletonSubheader.d.ts +0 -4
  36. package/dist/TableSkeleton/components/TableSkeletonSubheader.js +0 -10
  37. package/dist/TableSkeleton/components/index.d.ts +0 -5
  38. package/dist/TableSkeleton/components/index.js +0 -5
  39. package/dist/TableSkeleton/constants.d.ts +0 -9
  40. package/dist/TableSkeleton/constants.js +0 -9
@@ -1,58 +0,0 @@
1
- import styled, { css } from 'styled-components';
2
- import DSSkeleton from '@synerise/ds-skeleton';
3
- var HEADER_HEIGHT = 73;
4
- var SUBHEADER_HEIGHT = 64;
5
- var ROW_HEIGHT = 73;
6
- var rowCss = css(["display:flex;flex-direction:row;justify-content:space-between;"]);
7
- export var TableSkeletonWrapper = styled.div.withConfig({
8
- displayName: "TableSkeletonstyles__TableSkeletonWrapper",
9
- componentId: "sc-9yqnm1-0"
10
- })(["background:", ";", ";z-index:10;"], function (props) {
11
- return props.theme.palette.white;
12
- }, function (props) {
13
- return props.maxHeight !== undefined && "height: " + props.maxHeight + "px";
14
- });
15
- export var TableSkeletonHeader = styled.div.withConfig({
16
- displayName: "TableSkeletonstyles__TableSkeletonHeader",
17
- componentId: "sc-9yqnm1-1"
18
- })(["", " padding:0 18px;height:", "px;"], rowCss, function (props) {
19
- return props.headerHeight || HEADER_HEIGHT;
20
- });
21
- export var Skeleton = styled(DSSkeleton).withConfig({
22
- displayName: "TableSkeletonstyles__Skeleton",
23
- componentId: "sc-9yqnm1-2"
24
- })(["padding:12px 0;"]);
25
- export var SkeletonWrapper = styled.div.withConfig({
26
- displayName: "TableSkeletonstyles__SkeletonWrapper",
27
- componentId: "sc-9yqnm1-3"
28
- })(["width:", "px;"], function (props) {
29
- return props.width;
30
- });
31
- export var TableSkeletonSubHeader = styled.div.withConfig({
32
- displayName: "TableSkeletonstyles__TableSkeletonSubHeader",
33
- componentId: "sc-9yqnm1-4"
34
- })(["", " border-top:solid 1px ", ";border-bottom:solid 1px ", ";padding:0 18px 0 84px;height:", "px;"], rowCss, function (props) {
35
- return props.theme.palette['grey-200'];
36
- }, function (props) {
37
- return props.theme.palette['grey-200'];
38
- }, function (props) {
39
- return props.subheaderHeight || SUBHEADER_HEIGHT;
40
- });
41
- export var TableSkeletonLeft = styled.div.withConfig({
42
- displayName: "TableSkeletonstyles__TableSkeletonLeft",
43
- componentId: "sc-9yqnm1-5"
44
- })(["display:flex;flex-direction:row;gap:50px;align-items:center;"]);
45
- export var TableSkeletonRight = styled.div.withConfig({
46
- displayName: "TableSkeletonstyles__TableSkeletonRight",
47
- componentId: "sc-9yqnm1-6"
48
- })(["display:flex;flex-direction:row;gap:50px;align-items:center;"]);
49
- export var TableSkeletonBody = styled.div.withConfig({
50
- displayName: "TableSkeletonstyles__TableSkeletonBody",
51
- componentId: "sc-9yqnm1-7"
52
- })(["display:flex;flex-direction:column;padding:0 18px;"]);
53
- export var TableSkeletonRow = styled.div.withConfig({
54
- displayName: "TableSkeletonstyles__TableSkeletonRow",
55
- componentId: "sc-9yqnm1-8"
56
- })(["", " height:", "px;"], rowCss, function (props) {
57
- return props.rowHeight || ROW_HEIGHT;
58
- });
@@ -1,7 +0,0 @@
1
- import { HTMLAttributes } from 'react';
2
- export type TableSkeletonProps = HTMLAttributes<HTMLDivElement> & {
3
- maxHeight?: number;
4
- headerHeight?: number;
5
- subheaderHeight?: number;
6
- rowHeight?: number;
7
- };
@@ -1 +0,0 @@
1
- export {};
@@ -1,6 +0,0 @@
1
- import React, { HTMLAttributes } from 'react';
2
- type TableSkeletonBarProps = HTMLAttributes<HTMLDivElement> & {
3
- width: number;
4
- };
5
- export declare const TableSkeletonBar: ({ width, ...htmlAttributes }: TableSkeletonBarProps) => React.JSX.Element;
6
- export {};
@@ -1,19 +0,0 @@
1
- var _excluded = ["width"];
2
-
3
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
4
-
5
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
6
-
7
- import React from 'react';
8
- import * as S from '../TableSkeleton.styles';
9
- export var TableSkeletonBar = function TableSkeletonBar(_ref) {
10
- var width = _ref.width,
11
- htmlAttributes = _objectWithoutPropertiesLoose(_ref, _excluded);
12
-
13
- return /*#__PURE__*/React.createElement(S.SkeletonWrapper, _extends({}, htmlAttributes, {
14
- width: width
15
- }), /*#__PURE__*/React.createElement(S.Skeleton, {
16
- size: "M",
17
- numberOfSkeletons: 1
18
- }));
19
- };
@@ -1,7 +0,0 @@
1
- import React, { HTMLAttributes } from 'react';
2
- type TableSkeletonBodyProps = HTMLAttributes<HTMLDivElement> & {
3
- rows: number;
4
- rowHeight?: number;
5
- };
6
- export declare const TableSkeletonBody: ({ rows, rowHeight, ...htmlAttributes }: TableSkeletonBodyProps) => React.JSX.Element;
7
- export {};
@@ -1,33 +0,0 @@
1
- var _excluded = ["rows", "rowHeight"];
2
-
3
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
4
-
5
- import React from 'react';
6
- import { SkeletonAvatar } from '@synerise/ds-skeleton';
7
- import * as S from '../TableSkeleton.styles';
8
- import { TableSkeletonBar } from './TableSkeletonBar';
9
- import { TableSkeletonRowRight } from './TableSkeletonRowRight';
10
- import { SKELETON_BAR_TINY, SKELETON_BAR_WIDE } from '../constants';
11
- export var TableSkeletonBody = function TableSkeletonBody(_ref) {
12
- var _ref$rows = _ref.rows,
13
- rows = _ref$rows === void 0 ? 10 : _ref$rows,
14
- rowHeight = _ref.rowHeight,
15
- htmlAttributes = _objectWithoutPropertiesLoose(_ref, _excluded);
16
-
17
- return /*#__PURE__*/React.createElement(S.TableSkeletonBody, htmlAttributes, Array.from({
18
- length: rows
19
- }, function (_, index) {
20
- return /*#__PURE__*/React.createElement(S.TableSkeletonRow, {
21
- rowHeight: rowHeight,
22
- "data-testid": "ds-table-skeleton-row",
23
- key: "ds-skeleton-row-" + index
24
- }, /*#__PURE__*/React.createElement(S.TableSkeletonLeft, null, /*#__PURE__*/React.createElement(TableSkeletonBar, {
25
- width: SKELETON_BAR_TINY
26
- }), /*#__PURE__*/React.createElement(SkeletonAvatar, {
27
- shape: "square",
28
- size: "M"
29
- }), /*#__PURE__*/React.createElement(TableSkeletonBar, {
30
- width: SKELETON_BAR_WIDE
31
- })), /*#__PURE__*/React.createElement(S.TableSkeletonRight, null, /*#__PURE__*/React.createElement(TableSkeletonRowRight, null)));
32
- }));
33
- };
@@ -1,4 +0,0 @@
1
- import React, { HTMLAttributes } from 'react';
2
- export declare const TableSkeletonHeader: (props: HTMLAttributes<HTMLDivElement> & {
3
- headerHeight?: number;
4
- }) => React.JSX.Element;
@@ -1,15 +0,0 @@
1
- import React from 'react';
2
- import { SKELETON_BAR_STANDARD } from '../constants';
3
- import * as S from '../TableSkeleton.styles';
4
- import { TableSkeletonBar } from './TableSkeletonBar';
5
- export var TableSkeletonHeader = function TableSkeletonHeader(props) {
6
- return /*#__PURE__*/React.createElement(S.TableSkeletonHeader, props, /*#__PURE__*/React.createElement(S.TableSkeletonLeft, null, /*#__PURE__*/React.createElement(TableSkeletonBar, {
7
- width: SKELETON_BAR_STANDARD
8
- })), /*#__PURE__*/React.createElement(S.TableSkeletonRight, null, /*#__PURE__*/React.createElement(TableSkeletonBar, {
9
- width: SKELETON_BAR_STANDARD
10
- }), /*#__PURE__*/React.createElement(TableSkeletonBar, {
11
- width: SKELETON_BAR_STANDARD
12
- }), /*#__PURE__*/React.createElement(TableSkeletonBar, {
13
- width: SKELETON_BAR_STANDARD
14
- })));
15
- };
@@ -1,2 +0,0 @@
1
- import React, { HTMLAttributes } from 'react';
2
- export declare const TableSkeletonRowRight: (props: HTMLAttributes<HTMLDivElement>) => React.JSX.Element;
@@ -1,13 +0,0 @@
1
- import React from 'react';
2
- import * as S from '../TableSkeleton.styles';
3
- import { TableSkeletonBar } from './TableSkeletonBar';
4
- import { SKELETON_BAR_STANDARD, SKELETON_BAR_EXTRA_WIDE } from '../constants';
5
- export var TableSkeletonRowRight = function TableSkeletonRowRight(props) {
6
- return /*#__PURE__*/React.createElement(S.TableSkeletonRight, props, /*#__PURE__*/React.createElement(TableSkeletonBar, {
7
- width: SKELETON_BAR_STANDARD
8
- }), /*#__PURE__*/React.createElement(TableSkeletonBar, {
9
- width: SKELETON_BAR_EXTRA_WIDE
10
- }), /*#__PURE__*/React.createElement(TableSkeletonBar, {
11
- width: SKELETON_BAR_STANDARD
12
- }));
13
- };
@@ -1,4 +0,0 @@
1
- import React, { HTMLAttributes } from 'react';
2
- export declare const TableSkeletonSubheader: (props: HTMLAttributes<HTMLDivElement> & {
3
- subheaderHeight?: number;
4
- }) => React.JSX.Element;
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- import * as S from '../TableSkeleton.styles';
3
- import { TableSkeletonBar } from './TableSkeletonBar';
4
- import { TableSkeletonRowRight } from './TableSkeletonRowRight';
5
- import { SKELETON_BAR_WIDE } from '../constants';
6
- export var TableSkeletonSubheader = function TableSkeletonSubheader(props) {
7
- return /*#__PURE__*/React.createElement(S.TableSkeletonSubHeader, props, /*#__PURE__*/React.createElement(S.TableSkeletonLeft, null, /*#__PURE__*/React.createElement(TableSkeletonBar, {
8
- width: SKELETON_BAR_WIDE
9
- })), /*#__PURE__*/React.createElement(S.TableSkeletonRight, null, /*#__PURE__*/React.createElement(TableSkeletonRowRight, null)));
10
- };
@@ -1,5 +0,0 @@
1
- export * from './TableSkeletonBar';
2
- export * from './TableSkeletonBody';
3
- export * from './TableSkeletonHeader';
4
- export * from './TableSkeletonRowRight';
5
- export * from './TableSkeletonSubheader';
@@ -1,5 +0,0 @@
1
- export * from './TableSkeletonBar';
2
- export * from './TableSkeletonBody';
3
- export * from './TableSkeletonHeader';
4
- export * from './TableSkeletonRowRight';
5
- export * from './TableSkeletonSubheader';
@@ -1,9 +0,0 @@
1
- export declare const DEFAULT_ROW_COUNT = 10;
2
- export declare const ROW_HEIGHT = 40;
3
- export declare const GAP = 36;
4
- export declare const PADDING = 36;
5
- export declare const TABLE_HEADER: number;
6
- export declare const SKELETON_BAR_TINY = 16;
7
- export declare const SKELETON_BAR_STANDARD = 72;
8
- export declare const SKELETON_BAR_WIDE = 100;
9
- export declare const SKELETON_BAR_EXTRA_WIDE = 164;
@@ -1,9 +0,0 @@
1
- export var DEFAULT_ROW_COUNT = 10;
2
- export var ROW_HEIGHT = 40;
3
- export var GAP = 36;
4
- export var PADDING = 36;
5
- export var TABLE_HEADER = 76 + 78;
6
- export var SKELETON_BAR_TINY = 16;
7
- export var SKELETON_BAR_STANDARD = 72;
8
- export var SKELETON_BAR_WIDE = 100;
9
- export var SKELETON_BAR_EXTRA_WIDE = 164;