@atlaskit/dynamic-table 14.2.3 → 14.4.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 (105) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/dist/cjs/components/Body.js +2 -2
  3. package/dist/cjs/components/LoadingContainer.js +1 -1
  4. package/dist/cjs/components/LoadingContainerAdvanced.js +4 -4
  5. package/dist/cjs/components/Stateful.js +5 -3
  6. package/dist/cjs/components/Stateless.js +6 -4
  7. package/dist/cjs/components/TableHead.js +1 -1
  8. package/dist/cjs/components/TableHeadCell.js +18 -48
  9. package/dist/cjs/components/TableRow.js +4 -1
  10. package/dist/cjs/components/managedPagination.js +1 -1
  11. package/dist/cjs/components/rankable/Body.js +2 -2
  12. package/dist/cjs/components/rankable/TableCell.js +5 -5
  13. package/dist/cjs/components/rankable/TableHeadCell.js +3 -5
  14. package/dist/cjs/components/rankable/TableRow.js +5 -5
  15. package/dist/cjs/hoc/withDimensions.js +3 -5
  16. package/dist/cjs/hoc/withSortedPageRows.js +4 -6
  17. package/dist/cjs/styled/DynamicTable.js +80 -50
  18. package/dist/cjs/styled/EmptyBody.js +23 -28
  19. package/dist/cjs/styled/LoadingContainer.js +41 -36
  20. package/dist/cjs/styled/LoadingContainerAdvanced.js +42 -36
  21. package/dist/cjs/styled/TableCell.js +21 -15
  22. package/dist/cjs/styled/TableHead.js +157 -45
  23. package/dist/cjs/styled/TableRow.js +36 -42
  24. package/dist/cjs/styled/constants.js +33 -118
  25. package/dist/cjs/styled/rankable/RowPlaceholder.js +11 -12
  26. package/dist/cjs/styled/rankable/TableCell.js +18 -27
  27. package/dist/cjs/styled/rankable/TableRow.js +32 -54
  28. package/dist/cjs/theme.js +33 -20
  29. package/dist/cjs/version.json +1 -1
  30. package/dist/es2019/components/Body.js +1 -1
  31. package/dist/es2019/components/LoadingContainerAdvanced.js +2 -4
  32. package/dist/es2019/components/Stateful.js +4 -2
  33. package/dist/es2019/components/Stateless.js +5 -3
  34. package/dist/es2019/components/TableHeadCell.js +18 -22
  35. package/dist/es2019/components/TableRow.js +4 -1
  36. package/dist/es2019/components/rankable/Body.js +1 -1
  37. package/dist/es2019/components/rankable/TableCell.js +4 -4
  38. package/dist/es2019/components/rankable/TableHeadCell.js +1 -3
  39. package/dist/es2019/components/rankable/TableRow.js +3 -3
  40. package/dist/es2019/hoc/withDimensions.js +2 -4
  41. package/dist/es2019/hoc/withSortedPageRows.js +2 -4
  42. package/dist/es2019/styled/DynamicTable.js +75 -27
  43. package/dist/es2019/styled/EmptyBody.js +21 -11
  44. package/dist/es2019/styled/LoadingContainer.js +39 -18
  45. package/dist/es2019/styled/LoadingContainerAdvanced.js +38 -20
  46. package/dist/es2019/styled/TableCell.js +20 -5
  47. package/dist/es2019/styled/TableHead.js +160 -33
  48. package/dist/es2019/styled/TableRow.js +34 -20
  49. package/dist/es2019/styled/constants.js +30 -88
  50. package/dist/es2019/styled/rankable/RowPlaceholder.js +10 -4
  51. package/dist/es2019/styled/rankable/TableCell.js +16 -9
  52. package/dist/es2019/styled/rankable/TableRow.js +32 -24
  53. package/dist/es2019/theme.js +25 -18
  54. package/dist/es2019/version.json +1 -1
  55. package/dist/esm/components/Body.js +2 -2
  56. package/dist/esm/components/LoadingContainer.js +1 -1
  57. package/dist/esm/components/LoadingContainerAdvanced.js +4 -4
  58. package/dist/esm/components/Stateful.js +5 -3
  59. package/dist/esm/components/Stateless.js +6 -4
  60. package/dist/esm/components/TableHead.js +1 -1
  61. package/dist/esm/components/TableHeadCell.js +19 -47
  62. package/dist/esm/components/TableRow.js +4 -1
  63. package/dist/esm/components/managedPagination.js +1 -1
  64. package/dist/esm/components/rankable/Body.js +2 -2
  65. package/dist/esm/components/rankable/TableCell.js +5 -5
  66. package/dist/esm/components/rankable/TableHeadCell.js +3 -5
  67. package/dist/esm/components/rankable/TableRow.js +5 -5
  68. package/dist/esm/hoc/withDimensions.js +3 -5
  69. package/dist/esm/hoc/withSortedPageRows.js +4 -6
  70. package/dist/esm/styled/DynamicTable.js +75 -46
  71. package/dist/esm/styled/EmptyBody.js +23 -26
  72. package/dist/esm/styled/LoadingContainer.js +40 -36
  73. package/dist/esm/styled/LoadingContainerAdvanced.js +41 -35
  74. package/dist/esm/styled/TableCell.js +21 -15
  75. package/dist/esm/styled/TableHead.js +152 -41
  76. package/dist/esm/styled/TableRow.js +38 -42
  77. package/dist/esm/styled/constants.js +28 -108
  78. package/dist/esm/styled/rankable/RowPlaceholder.js +12 -14
  79. package/dist/esm/styled/rankable/TableCell.js +18 -27
  80. package/dist/esm/styled/rankable/TableRow.js +33 -54
  81. package/dist/esm/theme.js +25 -18
  82. package/dist/esm/version.json +1 -1
  83. package/dist/types/components/Body.d.ts +22 -22
  84. package/dist/types/components/LoadingContainerAdvanced.d.ts +2 -2
  85. package/dist/types/components/Stateless.d.ts +3 -3
  86. package/dist/types/components/TableHeadCell.d.ts +4 -9
  87. package/dist/types/components/rankable/Body.d.ts +22 -22
  88. package/dist/types/components/rankable/TableHeadCell.d.ts +1 -1
  89. package/dist/types/components/rankable/TableRow.d.ts +3 -3
  90. package/dist/types/hoc/withDimensions.d.ts +2 -2
  91. package/dist/types/hoc/withSortedPageRows.d.ts +20 -20
  92. package/dist/types/styled/DynamicTable.d.ts +13 -6
  93. package/dist/types/styled/EmptyBody.d.ts +4 -3
  94. package/dist/types/styled/LoadingContainer.d.ts +8 -7
  95. package/dist/types/styled/LoadingContainerAdvanced.d.ts +5 -4
  96. package/dist/types/styled/TableCell.d.ts +3 -2
  97. package/dist/types/styled/TableHead.d.ts +8 -5
  98. package/dist/types/styled/TableRow.d.ts +7 -4
  99. package/dist/types/styled/constants.d.ts +13 -10
  100. package/dist/types/styled/rankable/RowPlaceholder.d.ts +3 -2
  101. package/dist/types/styled/rankable/TableCell.d.ts +8 -6
  102. package/dist/types/styled/rankable/TableRow.d.ts +9 -6
  103. package/dist/types/theme.d.ts +15 -9
  104. package/dist/types/types.d.ts +18 -6
  105. package/package.json +15 -9
@@ -8,13 +8,13 @@ import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstruct
8
8
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
9
9
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
10
10
 
11
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
11
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
12
12
 
13
13
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
14
14
 
15
15
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
16
16
 
17
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
17
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
18
18
 
19
19
  import React from 'react';
20
20
  import { Draggable } from 'react-beautiful-dnd';
@@ -42,7 +42,7 @@ export var RankableTableRow = /*#__PURE__*/function (_React$Component) {
42
42
  return function (ref) {
43
43
  innerRefFn(ref);
44
44
 
45
- if (_this.props.innerRef) {
45
+ if (typeof _this.props.innerRef === 'function') {
46
46
  _this.props.innerRef(ref);
47
47
  }
48
48
  };
@@ -78,12 +78,12 @@ export var RankableTableRow = /*#__PURE__*/function (_React$Component) {
78
78
  }
79
79
 
80
80
  return /*#__PURE__*/React.createElement(Draggable, {
81
- draggableId: key || "".concat(rowIndex),
81
+ draggableId: key || rowIndex.toString(),
82
82
  index: rowIndex,
83
83
  isDragDisabled: isRankingDisabled
84
84
  }, function (provided, snapshot) {
85
85
  return /*#__PURE__*/React.createElement(RankableTableBodyRow, _extends({}, restRowProps, provided.dragHandleProps, provided.draggableProps, {
86
- innerRef: _this2.innerRef(provided.innerRef),
86
+ ref: _this2.innerRef(provided.innerRef),
87
87
  style: _objectSpread(_objectSpread({}, provided.draggableProps.style), inlineStyles),
88
88
  isHighlighted: isHighlighted,
89
89
  isRanking: isRanking,
@@ -9,14 +9,12 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
9
9
 
10
10
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
11
11
 
12
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
12
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
13
13
 
14
14
  import React from 'react';
15
15
  // Compute height and width of wrapped component before ranking
16
16
  export default function withDimensions(WrappedComponent) {
17
- var _temp;
18
-
19
- return _temp = /*#__PURE__*/function (_React$Component) {
17
+ return /*#__PURE__*/function (_React$Component) {
20
18
  _inherits(WithDimensions, _React$Component);
21
19
 
22
20
  var _super = _createSuper(WithDimensions);
@@ -91,5 +89,5 @@ export default function withDimensions(WrappedComponent) {
91
89
  }]);
92
90
 
93
91
  return WithDimensions;
94
- }(React.Component), _temp;
92
+ }(React.Component);
95
93
  }
@@ -9,13 +9,13 @@ import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
9
9
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
10
10
  import _typeof from "@babel/runtime/helpers/typeof";
11
11
 
12
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
12
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
13
13
 
14
14
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
15
15
 
16
16
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
17
17
 
18
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
18
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
19
19
 
20
20
  import React from 'react';
21
21
  import { ASC } from '../internal/constants';
@@ -102,9 +102,7 @@ var getSortedRows = function getSortedRows(head, rows, sortKey, sortOrder) {
102
102
 
103
103
  // get one page of data in table, sorting all rows previously
104
104
  export default function withSortedPageRows(WrappedComponent) {
105
- var _temp;
106
-
107
- return _temp = /*#__PURE__*/function (_React$Component) {
105
+ return /*#__PURE__*/function (_React$Component) {
108
106
  _inherits(WithSortedPageRows, _React$Component);
109
107
 
110
108
  var _super = _createSuper(WithSortedPageRows);
@@ -186,5 +184,5 @@ export default function withSortedPageRows(WrappedComponent) {
186
184
  }]);
187
185
 
188
186
  return WithSortedPageRows;
189
- }(React.Component), _temp;
187
+ }(React.Component);
190
188
  }
@@ -1,51 +1,80 @@
1
- import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
+ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
2
4
 
3
- function _templateObject4() {
4
- var data = _taggedTemplateLiteral(["\n display: flex;\n justify-content: center;\n"]);
5
-
6
- _templateObject4 = function _templateObject4() {
7
- return data;
8
- };
9
-
10
- return data;
11
- }
12
-
13
- function _templateObject3() {
14
- var data = _taggedTemplateLiteral(["\n font-size: 1.42857143em;\n /* there is a bug in Safari: if element which creates a new stacking context\n is a child of a table, table caption re-renders in bad wrong position\n https://stackoverflow.com/questions/44009186/safari-bug-translating-table-row-group-using-gsap-make-caption-jump-to-bottom\n */\n will-change: transform;\n font-style: inherit;\n font-weight: 500;\n letter-spacing: -0.008em;\n line-height: 1.2;\n margin-bottom: ", "px;\n margin-top: ", "px;\n text-align: left;\n"]);
15
-
16
- _templateObject3 = function _templateObject3() {
17
- return data;
18
- };
19
-
20
- return data;
21
- }
22
-
23
- function _templateObject2() {
24
- var data = _taggedTemplateLiteral(["\n table-layout: fixed;\n "]);
25
-
26
- _templateObject2 = function _templateObject2() {
27
- return data;
28
- };
29
-
30
- return data;
31
- }
32
-
33
- function _templateObject() {
34
- var data = _taggedTemplateLiteral(["\n ", ";\n border-collapse: collapse;\n width: 100%;\n"]);
5
+ /** @jsx jsx */
6
+ import { forwardRef } from 'react';
7
+ import { css, jsx } from '@emotion/core';
8
+ import { useGlobalTheme } from '@atlaskit/theme/components';
9
+ import { gridSize as getGridSize } from '@atlaskit/theme/constants';
10
+ import { row } from '../theme';
11
+ var gridSize = getGridSize();
12
+ // CSS vars for table row
13
+ // these are declared here to avoid being re-declared in each table row
14
+ export var tableRowCSSVars = {
15
+ CSS_VAR_HOVER_BACKGROUND: '--local-dynamic-table-hover-bg',
16
+ CSS_VAR_HIGHLIGHTED_BACKGROUND: '--local-dynamic-table-highlighted-bg',
17
+ CSS_VAR_HOVER_HIGHLIGHTED_BACKGROUND: '--local-dynamic-table-hover-highlighted-bg',
18
+ CSS_VAR_ROW_FOCUS_OUTLINE: '--local-dynamic-table-row-focus-outline'
19
+ };
20
+ var fixedSizeTableStyles = css({
21
+ tableLayout: 'fixed'
22
+ });
23
+ var tableStyles = css({
24
+ borderCollapse: 'collapse',
25
+ width: '100%'
26
+ });
27
+ export var Table = /*#__PURE__*/forwardRef(function (_ref, ref) {
28
+ var _ref2;
35
29
 
36
- _templateObject = function _templateObject() {
37
- return data;
38
- };
30
+ var isFixedSize = _ref.isFixedSize,
31
+ children = _ref.children,
32
+ rest = _objectWithoutProperties(_ref, ["isFixedSize", "children"]);
39
33
 
40
- return data;
41
- }
34
+ var theme = useGlobalTheme();
35
+ return jsx("table", _extends({
36
+ style: (_ref2 = {}, _defineProperty(_ref2, tableRowCSSVars.CSS_VAR_HOVER_BACKGROUND, row.hoverBackground({
37
+ theme: theme
38
+ })), _defineProperty(_ref2, tableRowCSSVars.CSS_VAR_HIGHLIGHTED_BACKGROUND, row.highlightedBackground({
39
+ theme: theme
40
+ })), _defineProperty(_ref2, tableRowCSSVars.CSS_VAR_HOVER_HIGHLIGHTED_BACKGROUND, row.hoverHighlightedBackground({
41
+ theme: theme
42
+ })), _defineProperty(_ref2, tableRowCSSVars.CSS_VAR_ROW_FOCUS_OUTLINE, row.focusOutline({
43
+ theme: theme
44
+ })), _ref2),
45
+ css: [tableStyles, isFixedSize && fixedSizeTableStyles],
46
+ ref: ref
47
+ }, rest), children);
48
+ });
49
+ var captionStyles = css({
50
+ fontSize: '1.42857143em',
42
51
 
43
- import styled, { css } from 'styled-components';
44
- import { gridSize } from '@atlaskit/theme/constants';
45
- import { multiply } from '@atlaskit/theme/math';
46
- export var Table = styled.table(_templateObject(), function (_ref) {
47
- var isFixedSize = _ref.isFixedSize;
48
- return isFixedSize && css(_templateObject2());
52
+ /* there is a bug in Safari: if element which creates a new stacking context
53
+ is a child of a table, table caption re-renders in bad wrong position
54
+ https://stackoverflow.com/questions/44009186/safari-bug-translating-table-row-group-using-gsap-make-caption-jump-to-bottom
55
+ */
56
+ willChange: 'transform',
57
+ fontStyle: 'inherit',
58
+ fontWeight: 500,
59
+ letterSpacing: '-0.008em',
60
+ lineHeight: 1.2,
61
+ marginBottom: "".concat(gridSize, "px"),
62
+ marginTop: "".concat(gridSize * 3.5, "px"),
63
+ textAlign: 'left'
64
+ });
65
+ export var Caption = function Caption(_ref3) {
66
+ var children = _ref3.children;
67
+ return jsx("caption", {
68
+ css: captionStyles
69
+ }, children);
70
+ };
71
+ var paginationWrapperStyles = css({
72
+ display: 'flex',
73
+ justifyContent: 'center'
49
74
  });
50
- export var Caption = styled.caption(_templateObject3(), gridSize, multiply(gridSize, 3.5));
51
- export var PaginationWrapper = styled.div(_templateObject4());
75
+ export var PaginationWrapper = function PaginationWrapper(_ref4) {
76
+ var children = _ref4.children;
77
+ return jsx("div", {
78
+ css: paginationWrapperStyles
79
+ }, children);
80
+ };
@@ -1,27 +1,24 @@
1
- import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
-
3
- function _templateObject2() {
4
- var data = _taggedTemplateLiteral(["\n margin: auto;\n padding: 10px;\n text-align: center;\n width: 50%;\n"]);
5
-
6
- _templateObject2 = function _templateObject2() {
7
- return data;
8
- };
9
-
10
- return data;
11
- }
12
-
13
- function _templateObject() {
14
- var data = _taggedTemplateLiteral(["\n height: ", "px;\n"]);
15
-
16
- _templateObject = function _templateObject() {
17
- return data;
18
- };
19
-
20
- return data;
21
- }
22
-
23
- import styled from 'styled-components';
1
+ /** @jsx jsx */
2
+ import { css, jsx } from '@emotion/core';
24
3
  import { gridSize } from '@atlaskit/theme/constants';
25
- import { multiply } from '@atlaskit/theme/math';
26
- export var EmptyViewWithFixedHeight = styled.div(_templateObject(), multiply(gridSize, 18));
27
- export var EmptyViewContainer = styled.div(_templateObject2());
4
+ var fixedHeightStyles = css({
5
+ height: "".concat(gridSize() * 18, "px")
6
+ });
7
+ export var EmptyViewWithFixedHeight = function EmptyViewWithFixedHeight(_ref) {
8
+ var children = _ref.children;
9
+ return jsx("div", {
10
+ css: fixedHeightStyles
11
+ }, children);
12
+ };
13
+ var emptyViewContainerStyles = css({
14
+ margin: 'auto',
15
+ padding: '10px',
16
+ textAlign: 'center',
17
+ width: '50%'
18
+ });
19
+ export var EmptyViewContainer = function EmptyViewContainer(_ref2) {
20
+ var children = _ref2.children;
21
+ return jsx("div", {
22
+ css: emptyViewContainerStyles
23
+ }, children);
24
+ };
@@ -1,38 +1,42 @@
1
- import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
1
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
 
3
- function _templateObject3() {
4
- var data = _taggedTemplateLiteral(["\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n"]);
5
-
6
- _templateObject3 = function _templateObject3() {
7
- return data;
8
- };
9
-
10
- return data;
11
- }
12
-
13
- function _templateObject2() {
14
- var data = _taggedTemplateLiteral(["\n pointer-events: none;\n opacity: ", ";\n"]);
15
-
16
- _templateObject2 = function _templateObject2() {
17
- return data;
18
- };
19
-
20
- return data;
21
- }
22
-
23
- function _templateObject() {
24
- var data = _taggedTemplateLiteral(["\n position: relative;\n"]);
25
-
26
- _templateObject = function _templateObject() {
27
- return data;
28
- };
29
-
30
- return data;
31
- }
32
-
33
- import styled from 'styled-components';
34
- export var Container = styled.div(_templateObject());
35
- export var ContentsContainer = styled.div(_templateObject2(), function (p) {
36
- return p.contentsOpacity;
3
+ /** @jsx jsx */
4
+ import { css, jsx } from '@emotion/core';
5
+ var CSS_VAR_CONTENTS_OPACITY = '--contents-opacity';
6
+ var containerStyles = css({
7
+ position: 'relative'
8
+ });
9
+ export var Container = function Container(_ref) {
10
+ var children = _ref.children;
11
+ return jsx("div", {
12
+ css: containerStyles
13
+ }, children);
14
+ };
15
+ var contentsContainerStyles = css({
16
+ pointerEvents: 'none',
17
+ opacity: "var(".concat(CSS_VAR_CONTENTS_OPACITY, ")")
18
+ });
19
+ export var ContentsContainer = function ContentsContainer(_ref2) {
20
+ var contentsOpacity = _ref2.contentsOpacity,
21
+ children = _ref2.children;
22
+ return jsx("div", {
23
+ style: _defineProperty({}, CSS_VAR_CONTENTS_OPACITY, contentsOpacity),
24
+ css: [contentsContainerStyles]
25
+ }, children);
26
+ };
27
+ var spinnerContainerStyles = css({
28
+ position: 'absolute',
29
+ top: 0,
30
+ right: 0,
31
+ bottom: 0,
32
+ left: 0,
33
+ display: 'flex',
34
+ alignItems: 'center',
35
+ justifyContent: 'center'
37
36
  });
38
- export var SpinnerContainer = styled.div(_templateObject3());
37
+ export var SpinnerContainer = function SpinnerContainer(_ref4) {
38
+ var children = _ref4.children;
39
+ return jsx("div", {
40
+ css: spinnerContainerStyles
41
+ }, children);
42
+ };
@@ -1,37 +1,43 @@
1
- import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
1
+ import _extends from "@babel/runtime/helpers/extends";
2
2
 
3
- function _templateObject3() {
4
- var data = _taggedTemplateLiteral(["\n position: relative;\n top: 0;\n"]);
5
-
6
- _templateObject3 = function _templateObject3() {
7
- return data;
8
- };
9
-
10
- return data;
11
- }
12
-
13
- function _templateObject2() {
14
- var data = _taggedTemplateLiteral(["\n pointer-events: none;\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n"]);
15
-
16
- _templateObject2 = function _templateObject2() {
17
- return data;
18
- };
19
-
20
- return data;
21
- }
22
-
23
- function _templateObject() {
24
- var data = _taggedTemplateLiteral(["\n margin-bottom: ", "px;\n position: relative;\n"]);
25
-
26
- _templateObject = function _templateObject() {
27
- return data;
28
- };
29
-
30
- return data;
31
- }
32
-
33
- import styled from 'styled-components';
3
+ /** @jsx jsx */
4
+ import { forwardRef } from 'react';
5
+ import { css, jsx } from '@emotion/core';
34
6
  import { gridSize } from '@atlaskit/theme/constants';
35
- export var Container = styled.div(_templateObject(), gridSize() * 3);
36
- export var SpinnerBackdrop = styled.div(_templateObject2());
37
- export var SpinnerContainer = styled.div(_templateObject3());
7
+ var containerStyles = css({
8
+ marginBottom: "".concat(gridSize() * 3, "px"),
9
+ position: 'relative'
10
+ });
11
+ export var Container = function Container(props) {
12
+ return jsx("div", _extends({
13
+ css: containerStyles
14
+ }, props));
15
+ };
16
+ var spinnerBackdropStyles = css({
17
+ pointerEvents: 'none',
18
+ position: 'absolute',
19
+ top: 0,
20
+ right: 0,
21
+ bottom: 0,
22
+ left: 0,
23
+ display: 'flex',
24
+ alignItems: 'center',
25
+ justifyContent: 'center'
26
+ });
27
+ export var SpinnerBackdrop = function SpinnerBackdrop(_ref) {
28
+ var children = _ref.children;
29
+ return jsx("div", {
30
+ css: spinnerBackdropStyles
31
+ }, children);
32
+ };
33
+ var spinnerContainerStyles = css({
34
+ position: 'relative',
35
+ top: 0
36
+ });
37
+ export var SpinnerContainer = /*#__PURE__*/forwardRef(function (_ref2, ref) {
38
+ var children = _ref2.children;
39
+ return jsx("div", {
40
+ css: spinnerContainerStyles,
41
+ ref: ref
42
+ }, children);
43
+ });
@@ -1,17 +1,23 @@
1
- import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
2
3
 
3
- function _templateObject() {
4
- var data = _taggedTemplateLiteral(["\n ", " ", ";\n"]);
4
+ /** @jsx jsx */
5
+ import { jsx } from '@emotion/core';
6
+ import { cellStyles, fixedSizeTruncateStyles, getTruncationStyleVars, overflowTruncateStyles, truncationWidthStyles } from './constants';
7
+ export var TableBodyCell = function TableBodyCell(_ref) {
8
+ var width = _ref.width,
9
+ isFixedSize = _ref.isFixedSize,
10
+ shouldTruncate = _ref.shouldTruncate,
11
+ innerRef = _ref.innerRef,
12
+ props = _objectWithoutProperties(_ref, ["width", "isFixedSize", "shouldTruncate", "innerRef"]);
5
13
 
6
- _templateObject = function _templateObject() {
7
- return data;
8
- };
9
-
10
- return data;
11
- }
12
-
13
- import styled from 'styled-components';
14
- import { cellStyle, truncateStyle } from './constants';
15
- export var TableBodyCell = styled.td(_templateObject(), function (props) {
16
- return truncateStyle(props);
17
- }, cellStyle);
14
+ return jsx("td", _extends({
15
+ style: getTruncationStyleVars({
16
+ width: width
17
+ }),
18
+ css: [truncationWidthStyles, isFixedSize && shouldTruncate && fixedSizeTruncateStyles, isFixedSize && overflowTruncateStyles, cellStyles] // HOC withDimensions complains about the types but it is working fine
19
+ // @ts-ignore
20
+ ,
21
+ ref: innerRef
22
+ }, props));
23
+ };