@atlaskit/dynamic-table 14.17.0 → 14.17.1

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 (90) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/cjs/components/rankable/table-cell.js +3 -1
  3. package/dist/cjs/components/rankable/table-row.js +3 -1
  4. package/dist/cjs/components/stateless.js +1 -1
  5. package/dist/cjs/components/table-head-cell.js +3 -1
  6. package/dist/cjs/styled/dynamic-table.js +12 -11
  7. package/dist/cjs/styled/empty-body.js +1 -4
  8. package/dist/cjs/styled/loading-container-advanced.js +3 -3
  9. package/dist/cjs/styled/loading-container.js +1 -0
  10. package/dist/cjs/styled/table-cell.js +1 -0
  11. package/dist/cjs/styled/table-head.js +15 -7
  12. package/dist/cjs/styled/table-row.js +1 -0
  13. package/dist/cjs/types.js +3 -1
  14. package/dist/es2019/components/rankable/table-cell.js +3 -1
  15. package/dist/es2019/components/rankable/table-row.js +3 -1
  16. package/dist/es2019/components/stateless.js +1 -1
  17. package/dist/es2019/components/table-head-cell.js +3 -1
  18. package/dist/es2019/styled/dynamic-table.js +12 -12
  19. package/dist/es2019/styled/empty-body.js +1 -4
  20. package/dist/es2019/styled/loading-container-advanced.js +3 -3
  21. package/dist/es2019/styled/loading-container.js +1 -0
  22. package/dist/es2019/styled/table-cell.js +1 -0
  23. package/dist/es2019/styled/table-head.js +15 -7
  24. package/dist/es2019/styled/table-row.js +1 -0
  25. package/dist/es2019/types.js +1 -14
  26. package/dist/esm/components/rankable/table-cell.js +3 -1
  27. package/dist/esm/components/rankable/table-row.js +3 -1
  28. package/dist/esm/components/stateless.js +1 -1
  29. package/dist/esm/components/table-head-cell.js +3 -1
  30. package/dist/esm/styled/dynamic-table.js +12 -12
  31. package/dist/esm/styled/empty-body.js +1 -4
  32. package/dist/esm/styled/loading-container-advanced.js +3 -3
  33. package/dist/esm/styled/loading-container.js +1 -0
  34. package/dist/esm/styled/table-cell.js +1 -0
  35. package/dist/esm/styled/table-head.js +15 -7
  36. package/dist/esm/styled/table-row.js +1 -0
  37. package/dist/esm/types.js +1 -14
  38. package/dist/types/components/body.d.ts +2 -2
  39. package/dist/types/components/error-boundary.d.ts +1 -1
  40. package/dist/types/components/managed-pagination.d.ts +1 -1
  41. package/dist/types/components/rankable/body.d.ts +3 -3
  42. package/dist/types/components/rankable/table-cell.d.ts +2 -2
  43. package/dist/types/components/rankable/table-head-cell.d.ts +2 -2
  44. package/dist/types/components/rankable/table-row.d.ts +2 -2
  45. package/dist/types/components/stateful.d.ts +2 -2
  46. package/dist/types/components/stateless.d.ts +2 -2
  47. package/dist/types/components/table-head-cell.d.ts +2 -2
  48. package/dist/types/components/table-head.d.ts +1 -1
  49. package/dist/types/components/table-row.d.ts +1 -1
  50. package/dist/types/hoc/with-dimensions.d.ts +1 -1
  51. package/dist/types/hoc/with-sorted-page-rows.d.ts +1 -1
  52. package/dist/types/internal/helpers.d.ts +1 -1
  53. package/dist/types/styled/constants.d.ts +1 -1
  54. package/dist/types/styled/dynamic-table.d.ts +1 -1
  55. package/dist/types/styled/empty-body.d.ts +1 -1
  56. package/dist/types/styled/loading-container-advanced.d.ts +1 -1
  57. package/dist/types/styled/loading-container.d.ts +1 -1
  58. package/dist/types/styled/rankable/table-cell.d.ts +2 -2
  59. package/dist/types/styled/rankable/table-row.d.ts +2 -2
  60. package/dist/types/styled/table-cell.d.ts +2 -2
  61. package/dist/types/styled/table-head.d.ts +3 -3
  62. package/dist/types/styled/table-row.d.ts +1 -1
  63. package/dist/types/types.d.ts +2 -2
  64. package/dist/types-ts4.5/components/body.d.ts +2 -2
  65. package/dist/types-ts4.5/components/error-boundary.d.ts +1 -1
  66. package/dist/types-ts4.5/components/managed-pagination.d.ts +1 -1
  67. package/dist/types-ts4.5/components/rankable/body.d.ts +3 -3
  68. package/dist/types-ts4.5/components/rankable/table-cell.d.ts +2 -2
  69. package/dist/types-ts4.5/components/rankable/table-head-cell.d.ts +2 -2
  70. package/dist/types-ts4.5/components/rankable/table-row.d.ts +2 -2
  71. package/dist/types-ts4.5/components/stateful.d.ts +2 -2
  72. package/dist/types-ts4.5/components/stateless.d.ts +2 -2
  73. package/dist/types-ts4.5/components/table-head-cell.d.ts +2 -2
  74. package/dist/types-ts4.5/components/table-head.d.ts +1 -1
  75. package/dist/types-ts4.5/components/table-row.d.ts +1 -1
  76. package/dist/types-ts4.5/hoc/with-dimensions.d.ts +1 -1
  77. package/dist/types-ts4.5/hoc/with-sorted-page-rows.d.ts +1 -1
  78. package/dist/types-ts4.5/internal/helpers.d.ts +1 -1
  79. package/dist/types-ts4.5/styled/constants.d.ts +1 -1
  80. package/dist/types-ts4.5/styled/dynamic-table.d.ts +1 -1
  81. package/dist/types-ts4.5/styled/empty-body.d.ts +1 -1
  82. package/dist/types-ts4.5/styled/loading-container-advanced.d.ts +1 -1
  83. package/dist/types-ts4.5/styled/loading-container.d.ts +1 -1
  84. package/dist/types-ts4.5/styled/rankable/table-cell.d.ts +2 -2
  85. package/dist/types-ts4.5/styled/rankable/table-row.d.ts +2 -2
  86. package/dist/types-ts4.5/styled/table-cell.d.ts +2 -2
  87. package/dist/types-ts4.5/styled/table-head.d.ts +3 -3
  88. package/dist/types-ts4.5/styled/table-row.d.ts +1 -1
  89. package/dist/types-ts4.5/types.d.ts +2 -2
  90. package/package.json +9 -3
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @atlaskit/dynamic-table
2
2
 
3
+ ## 14.17.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#101939](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/101939)
8
+ [`07080a7364c9`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/07080a7364c9) -
9
+ Update dimension and font size values to be in rem. Internal change to use typography tokens.
10
+
3
11
  ## 14.17.0
4
12
 
5
13
  ### Minor Changes
@@ -48,7 +48,9 @@ var RankableTableCell = exports.RankableTableCell = /*#__PURE__*/function (_Reac
48
48
  isFixedSize: isFixedSize,
49
49
  shouldTruncate: shouldTruncate,
50
50
  width: width,
51
- isRanking: isRanking,
51
+ isRanking: isRanking
52
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
53
+ ,
52
54
  style: inlineStyles,
53
55
  onKeyDown: function onKeyDown(e) {
54
56
  return e.stopPropagation();
@@ -79,7 +79,9 @@ var RankableTableRow = exports.RankableTableRow = /*#__PURE__*/function (_React$
79
79
  // It is necessary to prevent the passing of aria-labelledby
80
80
  "aria-labelledby": undefined,
81
81
  "aria-describedby": (_provided$dragHandleP = provided.dragHandleProps) === null || _provided$dragHandleP === void 0 ? void 0 : _provided$dragHandleP['aria-labelledby'],
82
- ref: _this2.innerRef(provided.innerRef),
82
+ ref: _this2.innerRef(provided.innerRef)
83
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
84
+ ,
83
85
  style: _objectSpread(_objectSpread({}, provided.draggableProps.style), inlineStyles),
84
86
  isHighlighted: isHighlighted || isRowHighlighted,
85
87
  isRanking: isRanking,
@@ -35,7 +35,7 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
35
35
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
36
36
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
37
37
  var packageName = "@atlaskit/dynamic-table";
38
- var packageVersion = "14.17.0";
38
+ var packageVersion = "14.17.1";
39
39
  function toggleSortOrder(currentSortOrder) {
40
40
  switch (currentSortOrder) {
41
41
  case _constants.DESC:
@@ -19,7 +19,9 @@ var TableHeadCell = function TableHeadCell(_ref) {
19
19
  isSortable = _ref.isSortable,
20
20
  onClick = _ref.onClick,
21
21
  rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
22
- return /*#__PURE__*/_react.default.createElement(_tableHead.HeadCell, (0, _extends2.default)({
22
+ return /*#__PURE__*/_react.default.createElement(_tableHead.HeadCell
23
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
24
+ , (0, _extends2.default)({
23
25
  style: inlineStyles,
24
26
  testId: testId && "".concat(testId, "--head--cell"),
25
27
  ref: typeof innerRef !== 'string' ? innerRef : null // string refs must be discarded as LegacyRefs are not compatible with FC forwardRefs
@@ -10,13 +10,11 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
10
10
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
11
11
  var _react = require("react");
12
12
  var _react2 = require("@emotion/react");
13
- var _constants = require("@atlaskit/theme/constants");
13
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
14
14
  var _theme = require("../theme");
15
15
  var _excluded = ["isFixedSize", "hasDataRow", "children", "testId", "isLoading"];
16
16
  /* eslint-disable @repo/internal/react/require-jsdoc */
17
17
  /** @jsx jsx */
18
- // eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
19
- var gridSize = (0, _constants.gridSize)();
20
18
  // CSS vars for table row
21
19
  // these are declared here to avoid being re-declared in each table row
22
20
  var tableRowCSSVars = exports.tableRowCSSVars = {
@@ -46,6 +44,7 @@ var Table = exports.Table = /*#__PURE__*/(0, _react.forwardRef)(function (_ref,
46
44
  rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
47
45
  return (0, _react2.jsx)("table", (0, _extends2.default)({
48
46
  inert: isLoading ? '' : undefined,
47
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
49
48
  style: (_ref2 = {}, (0, _defineProperty2.default)(_ref2, tableRowCSSVars.CSS_VAR_HOVER_BACKGROUND, _theme.row.hoverBackground), (0, _defineProperty2.default)(_ref2, tableRowCSSVars.CSS_VAR_HIGHLIGHTED_BACKGROUND, _theme.row.highlightedBackground), (0, _defineProperty2.default)(_ref2, tableRowCSSVars.CSS_VAR_HOVER_HIGHLIGHTED_BACKGROUND, _theme.row.hoverHighlightedBackground), (0, _defineProperty2.default)(_ref2, tableRowCSSVars.CSS_VAR_ROW_FOCUS_OUTLINE, _theme.row.focusOutline), _ref2),
50
49
  css: [tableStyles, isFixedSize && fixedSizeTableStyles, hasDataRow && bodyBorder],
51
50
  ref: ref
@@ -54,20 +53,22 @@ var Table = exports.Table = /*#__PURE__*/(0, _react.forwardRef)(function (_ref,
54
53
  }), children);
55
54
  });
56
55
  var captionStyles = (0, _react2.css)({
57
- fontSize: '1.42857143em',
58
- fontStyle: 'inherit',
59
- fontWeight: 'var(--ds-font-weight-medium)',
60
- letterSpacing: '-0.008em',
61
- lineHeight: 1.2,
56
+ font: "var(--ds-font-heading-medium, normal 500 20px/24px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
62
57
  marginBlockEnd: "var(--ds-space-100, 8px)",
63
- marginBlockStart: "".concat(gridSize * 3.5, "px"),
64
- textAlign: 'left',
65
58
  willChange: 'transform'
66
59
  });
60
+ var oldCaptionStyles = (0, _react2.css)({
61
+ fontWeight: "var(--ds-font-weight-regular, 400)",
62
+ // eslint-disable-next-line @atlaskit/design-system/use-tokens-space
63
+ marginBlockStart: 28
64
+ });
65
+ var newCaptionStyles = (0, _react2.css)({
66
+ marginBlockStart: "var(--ds-space-300, 24px)"
67
+ });
67
68
  var Caption = exports.Caption = function Caption(_ref3) {
68
69
  var children = _ref3.children;
69
70
  return (0, _react2.jsx)("caption", {
70
- css: captionStyles
71
+ css: [captionStyles, (0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.dynamic-table-typography_7zio6') ? newCaptionStyles : oldCaptionStyles]
71
72
  }, children);
72
73
  };
73
74
  var paginationWrapperStyles = (0, _react2.css)({
@@ -5,14 +5,11 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.EmptyViewWithFixedHeight = exports.EmptyViewContainer = void 0;
7
7
  var _react = require("@emotion/react");
8
- var _constants = require("@atlaskit/theme/constants");
9
8
  /* eslint-disable @repo/internal/react/require-jsdoc */
10
9
  /** @jsx jsx */
11
10
 
12
- // eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
13
-
14
11
  var fixedHeightStyles = (0, _react.css)({
15
- height: "".concat((0, _constants.gridSize)() * 18, "px")
12
+ height: '9rem'
16
13
  });
17
14
  var EmptyViewWithFixedHeight = exports.EmptyViewWithFixedHeight = function EmptyViewWithFixedHeight(_ref) {
18
15
  var children = _ref.children,
@@ -13,8 +13,8 @@ var _excluded = ["children", "testId"];
13
13
  /* eslint-disable @repo/internal/react/require-jsdoc */
14
14
  /** @jsx jsx */
15
15
  var containerStyles = (0, _react2.css)({
16
- marginBottom: "var(--ds-space-300, 24px)",
17
- position: 'relative'
16
+ position: 'relative',
17
+ marginBlockEnd: "var(--ds-space-300, 24px)"
18
18
  });
19
19
  var Container = exports.Container = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
20
20
  var children = props.children,
@@ -49,7 +49,7 @@ var SpinnerBackdrop = exports.SpinnerBackdrop = function SpinnerBackdrop(_ref) {
49
49
  var spinnerContainerStyles = (0, _react2.css)({
50
50
  position: 'relative',
51
51
  // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
52
- top: 0
52
+ insetBlockStart: 0
53
53
  });
54
54
  var SpinnerContainer = exports.SpinnerContainer = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, ref) {
55
55
  var children = _ref2.children;
@@ -31,6 +31,7 @@ var ContentsContainer = exports.ContentsContainer = function ContentsContainer(_
31
31
  contentsOpacity = _ref2.contentsOpacity,
32
32
  testId = _ref2.testId;
33
33
  return (0, _react.jsx)("div", {
34
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
34
35
  style: (0, _defineProperty2.default)({}, CSS_VAR_CONTENTS_OPACITY, contentsOpacity),
35
36
  css: [contentsContainerStyles],
36
37
  "data-testid": testId && "".concat(testId, "--contents--container")
@@ -19,6 +19,7 @@ var TableBodyCell = exports.TableBodyCell = function TableBodyCell(_ref) {
19
19
  innerRef = _ref.innerRef,
20
20
  props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
21
21
  return (0, _react.jsx)("td", (0, _extends2.default)({
22
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
22
23
  style: (0, _constants.getTruncationStyleVars)({
23
24
  width: width
24
25
  }),
@@ -10,6 +10,7 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
10
10
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
11
11
  var _react = require("react");
12
12
  var _react2 = require("@emotion/react");
13
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
13
14
  var _colors = require("@atlaskit/theme/colors");
14
15
  var _constants = require("../internal/constants");
15
16
  var _theme = require("../theme");
@@ -37,20 +38,25 @@ var Head = exports.Head = function Head(_ref) {
37
38
  // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
38
39
  }, props));
39
40
  };
40
- var headCellStyles = (0, _react2.css)([_constants2.cellStyles, {
41
+ var headCellBaseStyles = (0, _react2.css)({
41
42
  boxSizing: 'border-box',
42
43
  position: 'relative',
43
44
  border: 'none',
44
- borderBottom: "2px solid ".concat(_theme.tableBorder.borderColor),
45
+ borderBlockEnd: "2px solid ".concat(_theme.tableBorder.borderColor),
45
46
  color: "var(--ds-text-subtlest, ".concat("var(".concat(CSS_VAR_TEXT_COLOR, ")"), ")"),
46
- fontSize: '12px',
47
- fontWeight: 600,
48
47
  textAlign: 'left',
49
48
  verticalAlign: 'top',
50
49
  '&:focus-visible': {
51
50
  outline: "solid 2px ".concat("var(--ds-border-focused, ".concat(_colors.B100, ")"))
52
51
  }
53
- }]);
52
+ });
53
+ var headCellOldStyles = (0, _react2.css)({
54
+ fontSize: '0.75rem',
55
+ fontWeight: "var(--ds-font-weight-semibold, 600)"
56
+ });
57
+ var headCellNewStyles = (0, _react2.css)({
58
+ font: "var(--ds-font-heading-xxsmall, normal 600 12px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)"
59
+ });
54
60
  var onClickStyles = (0, _react2.css)({
55
61
  '&:hover': {
56
62
  backgroundColor: "var(--ds-background-neutral-hovered, ".concat(_colors.N30A, ")"),
@@ -156,9 +162,11 @@ var HeadCell = exports.HeadCell = /*#__PURE__*/(0, _react.forwardRef)(function (
156
162
  // https://dequeuniversity.com/rules/axe/4.7/empty-table-header
157
163
  var Component = children ? 'th' : 'td';
158
164
  return (0, _react2.jsx)(Component, (0, _extends2.default)({
159
- "aria-sort": getFormattedSortOrder(),
165
+ "aria-sort": getFormattedSortOrder()
166
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
167
+ ,
160
168
  style: mergedStyles,
161
- css: [headCellStyles, onClick && onClickStyles, _constants2.truncationWidthStyles, isFixedSize && shouldTruncate && _constants2.fixedSizeTruncateStyles, isFixedSize && _constants2.overflowTruncateStyles, isSortable && baseStyles, isASC && ascendingStyles, isDESC && descendingStyles],
169
+ css: [_constants2.cellStyles, headCellBaseStyles, (0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.dynamic-table-typography_7zio6') ? headCellNewStyles : headCellOldStyles, onClick && onClickStyles, _constants2.truncationWidthStyles, isFixedSize && shouldTruncate && _constants2.fixedSizeTruncateStyles, isFixedSize && _constants2.overflowTruncateStyles, isSortable && baseStyles, isASC && ascendingStyles, isDESC && descendingStyles],
162
170
  onClick: onClick,
163
171
  ref: ref,
164
172
  "data-testid": testId
@@ -39,6 +39,7 @@ var TableBodyRow = exports.TableBodyRow = /*#__PURE__*/(0, _react.forwardRef)(fu
39
39
  testId = _ref.testId,
40
40
  rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
41
41
  return (0, _react2.jsx)("tr", (0, _extends2.default)({
42
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
42
43
  style: style,
43
44
  css: [rowStyles, isHighlighted ? rowHighlightedBackgroundStyles : rowBackgroundStyles]
44
45
  }, rest, {
package/dist/cjs/types.js CHANGED
@@ -1,3 +1,5 @@
1
1
  "use strict";
2
2
 
3
- var _analyticsNext = require("@atlaskit/analytics-next");
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -28,7 +28,9 @@ export class RankableTableCell extends React.Component {
28
28
  isFixedSize: isFixedSize,
29
29
  shouldTruncate: shouldTruncate,
30
30
  width: width,
31
- isRanking: isRanking,
31
+ isRanking: isRanking
32
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
33
+ ,
32
34
  style: inlineStyles,
33
35
  onKeyDown: e => e.stopPropagation(),
34
36
  innerRef: innerRef,
@@ -53,7 +53,9 @@ export class RankableTableRow extends React.Component {
53
53
  // It is necessary to prevent the passing of aria-labelledby
54
54
  "aria-labelledby": undefined,
55
55
  "aria-describedby": (_provided$dragHandleP = provided.dragHandleProps) === null || _provided$dragHandleP === void 0 ? void 0 : _provided$dragHandleP['aria-labelledby'],
56
- ref: this.innerRef(provided.innerRef),
56
+ ref: this.innerRef(provided.innerRef)
57
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
58
+ ,
57
59
  style: {
58
60
  ...provided.draggableProps.style,
59
61
  ...inlineStyles
@@ -14,7 +14,7 @@ import LoadingContainerAdvanced from './loading-container-advanced';
14
14
  import ManagedPagination from './managed-pagination';
15
15
  import TableHead from './table-head';
16
16
  const packageName = "@atlaskit/dynamic-table";
17
- const packageVersion = "14.17.0";
17
+ const packageVersion = "14.17.1";
18
18
  function toggleSortOrder(currentSortOrder) {
19
19
  switch (currentSortOrder) {
20
20
  case DESC:
@@ -11,7 +11,9 @@ const TableHeadCell = ({
11
11
  onClick,
12
12
  ...rest
13
13
  }) => {
14
- return /*#__PURE__*/React.createElement(HeadCell, _extends({
14
+ return /*#__PURE__*/React.createElement(HeadCell
15
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
16
+ , _extends({
15
17
  style: inlineStyles,
16
18
  testId: testId && `${testId}--head--cell`,
17
19
  ref: typeof innerRef !== 'string' ? innerRef : null // string refs must be discarded as LegacyRefs are not compatible with FC forwardRefs
@@ -3,11 +3,8 @@ import _extends from "@babel/runtime/helpers/extends";
3
3
  /** @jsx jsx */
4
4
  import { forwardRef } from 'react';
5
5
  import { css, jsx } from '@emotion/react';
6
-
7
- // eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
8
- import { gridSize as getGridSize } from '@atlaskit/theme/constants';
6
+ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
9
7
  import { row, tableBorder } from '../theme';
10
- const gridSize = getGridSize();
11
8
  // CSS vars for table row
12
9
  // these are declared here to avoid being re-declared in each table row
13
10
  export const tableRowCSSVars = {
@@ -37,6 +34,7 @@ export const Table = /*#__PURE__*/forwardRef(({
37
34
  }, ref) => {
38
35
  return jsx("table", _extends({
39
36
  inert: isLoading ? '' : undefined,
37
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
40
38
  style: {
41
39
  [tableRowCSSVars.CSS_VAR_HOVER_BACKGROUND]: row.hoverBackground,
42
40
  [tableRowCSSVars.CSS_VAR_HIGHLIGHTED_BACKGROUND]: row.highlightedBackground,
@@ -50,20 +48,22 @@ export const Table = /*#__PURE__*/forwardRef(({
50
48
  }), children);
51
49
  });
52
50
  const captionStyles = css({
53
- fontSize: '1.42857143em',
54
- fontStyle: 'inherit',
55
- fontWeight: 'var(--ds-font-weight-medium)',
56
- letterSpacing: '-0.008em',
57
- lineHeight: 1.2,
51
+ font: "var(--ds-font-heading-medium, normal 500 20px/24px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
58
52
  marginBlockEnd: "var(--ds-space-100, 8px)",
59
- marginBlockStart: `${gridSize * 3.5}px`,
60
- textAlign: 'left',
61
53
  willChange: 'transform'
62
54
  });
55
+ const oldCaptionStyles = css({
56
+ fontWeight: "var(--ds-font-weight-regular, 400)",
57
+ // eslint-disable-next-line @atlaskit/design-system/use-tokens-space
58
+ marginBlockStart: 28
59
+ });
60
+ const newCaptionStyles = css({
61
+ marginBlockStart: "var(--ds-space-300, 24px)"
62
+ });
63
63
  export const Caption = ({
64
64
  children
65
65
  }) => jsx("caption", {
66
- css: captionStyles
66
+ css: [captionStyles, getBooleanFF('platform.design-system-team.dynamic-table-typography_7zio6') ? newCaptionStyles : oldCaptionStyles]
67
67
  }, children);
68
68
  const paginationWrapperStyles = css({
69
69
  display: 'flex',
@@ -2,11 +2,8 @@
2
2
  /** @jsx jsx */
3
3
 
4
4
  import { css, jsx } from '@emotion/react';
5
-
6
- // eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
7
- import { gridSize } from '@atlaskit/theme/constants';
8
5
  const fixedHeightStyles = css({
9
- height: `${gridSize() * 18}px`
6
+ height: '9rem'
10
7
  });
11
8
  export const EmptyViewWithFixedHeight = ({
12
9
  children,
@@ -4,8 +4,8 @@ import _extends from "@babel/runtime/helpers/extends";
4
4
  import { forwardRef } from 'react';
5
5
  import { css, jsx } from '@emotion/react';
6
6
  const containerStyles = css({
7
- marginBottom: "var(--ds-space-300, 24px)",
8
- position: 'relative'
7
+ position: 'relative',
8
+ marginBlockEnd: "var(--ds-space-300, 24px)"
9
9
  });
10
10
  export const Container = /*#__PURE__*/forwardRef((props, ref) => {
11
11
  const {
@@ -41,7 +41,7 @@ export const SpinnerBackdrop = ({
41
41
  const spinnerContainerStyles = css({
42
42
  position: 'relative',
43
43
  // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
44
- top: 0
44
+ insetBlockStart: 0
45
45
  });
46
46
  export const SpinnerContainer = /*#__PURE__*/forwardRef(({
47
47
  children
@@ -22,6 +22,7 @@ export const ContentsContainer = ({
22
22
  contentsOpacity,
23
23
  testId
24
24
  }) => jsx("div", {
25
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
25
26
  style: {
26
27
  [CSS_VAR_CONTENTS_OPACITY]: contentsOpacity
27
28
  },
@@ -12,6 +12,7 @@ export const TableBodyCell = ({
12
12
  innerRef,
13
13
  ...props
14
14
  }) => jsx("td", _extends({
15
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
15
16
  style: getTruncationStyleVars({
16
17
  width
17
18
  }),
@@ -3,6 +3,7 @@ import _extends from "@babel/runtime/helpers/extends";
3
3
  /** @jsx jsx */
4
4
  import { forwardRef } from 'react';
5
5
  import { css, jsx } from '@emotion/react';
6
+ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
6
7
  import { B100, N30A } from '@atlaskit/theme/colors';
7
8
  import { ASC, DESC } from '../internal/constants';
8
9
  import { arrow, head, MSThemeColors, tableBorder } from '../theme';
@@ -25,20 +26,25 @@ export const Head = ({
25
26
  // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
26
27
  }, props));
27
28
  };
28
- const headCellStyles = css([cellStyles, {
29
+ const headCellBaseStyles = css({
29
30
  boxSizing: 'border-box',
30
31
  position: 'relative',
31
32
  border: 'none',
32
- borderBottom: `2px solid ${tableBorder.borderColor}`,
33
+ borderBlockEnd: `2px solid ${tableBorder.borderColor}`,
33
34
  color: `var(--ds-text-subtlest, ${`var(${CSS_VAR_TEXT_COLOR})`})`,
34
- fontSize: '12px',
35
- fontWeight: 600,
36
35
  textAlign: 'left',
37
36
  verticalAlign: 'top',
38
37
  '&:focus-visible': {
39
38
  outline: `solid 2px ${`var(--ds-border-focused, ${B100})`}`
40
39
  }
41
- }]);
40
+ });
41
+ const headCellOldStyles = css({
42
+ fontSize: '0.75rem',
43
+ fontWeight: "var(--ds-font-weight-semibold, 600)"
44
+ });
45
+ const headCellNewStyles = css({
46
+ font: "var(--ds-font-heading-xxsmall, normal 600 12px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)"
47
+ });
42
48
  const onClickStyles = css({
43
49
  '&:hover': {
44
50
  backgroundColor: `var(--ds-background-neutral-hovered, ${N30A})`,
@@ -149,9 +155,11 @@ export const HeadCell = /*#__PURE__*/forwardRef(({
149
155
  // https://dequeuniversity.com/rules/axe/4.7/empty-table-header
150
156
  const Component = children ? 'th' : 'td';
151
157
  return jsx(Component, _extends({
152
- "aria-sort": getFormattedSortOrder(),
158
+ "aria-sort": getFormattedSortOrder()
159
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
160
+ ,
153
161
  style: mergedStyles,
154
- css: [headCellStyles, onClick && onClickStyles, truncationWidthStyles, isFixedSize && shouldTruncate && fixedSizeTruncateStyles, isFixedSize && overflowTruncateStyles, isSortable && baseStyles, isASC && ascendingStyles, isDESC && descendingStyles],
162
+ css: [cellStyles, headCellBaseStyles, getBooleanFF('platform.design-system-team.dynamic-table-typography_7zio6') ? headCellNewStyles : headCellOldStyles, onClick && onClickStyles, truncationWidthStyles, isFixedSize && shouldTruncate && fixedSizeTruncateStyles, isFixedSize && overflowTruncateStyles, isSortable && baseStyles, isASC && ascendingStyles, isDESC && descendingStyles],
155
163
  onClick: onClick,
156
164
  ref: ref,
157
165
  "data-testid": testId
@@ -31,6 +31,7 @@ export const TableBodyRow = /*#__PURE__*/forwardRef(({
31
31
  ...rest
32
32
  }, ref) => {
33
33
  return jsx("tr", _extends({
34
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
34
35
  style: style,
35
36
  css: [rowStyles, isHighlighted ? rowHighlightedBackgroundStyles : rowBackgroundStyles]
36
37
  }, rest, {
@@ -1,14 +1 @@
1
- /* eslint-disable @repo/internal/react/consistent-types-definitions */
2
-
3
- import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
4
-
5
- /**
6
- * Enum style type to determine whether sort results are ascending or descending.
7
- */
8
-
9
- /**
10
- * Determines the size of the table loading spinner.
11
- * This matches the underlying `Size` type in `@atlaskit/spinner`
12
- */
13
-
14
- // TODO should this be removed?
1
+ export {};
@@ -41,7 +41,9 @@ export var RankableTableCell = /*#__PURE__*/function (_React$Component) {
41
41
  isFixedSize: isFixedSize,
42
42
  shouldTruncate: shouldTruncate,
43
43
  width: width,
44
- isRanking: isRanking,
44
+ isRanking: isRanking
45
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
46
+ ,
45
47
  style: inlineStyles,
46
48
  onKeyDown: function onKeyDown(e) {
47
49
  return e.stopPropagation();
@@ -74,7 +74,9 @@ export var RankableTableRow = /*#__PURE__*/function (_React$Component) {
74
74
  // It is necessary to prevent the passing of aria-labelledby
75
75
  "aria-labelledby": undefined,
76
76
  "aria-describedby": (_provided$dragHandleP = provided.dragHandleProps) === null || _provided$dragHandleP === void 0 ? void 0 : _provided$dragHandleP['aria-labelledby'],
77
- ref: _this2.innerRef(provided.innerRef),
77
+ ref: _this2.innerRef(provided.innerRef)
78
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
79
+ ,
78
80
  style: _objectSpread(_objectSpread({}, provided.draggableProps.style), inlineStyles),
79
81
  isHighlighted: isHighlighted || isRowHighlighted,
80
82
  isRanking: isRanking,
@@ -25,7 +25,7 @@ import LoadingContainerAdvanced from './loading-container-advanced';
25
25
  import ManagedPagination from './managed-pagination';
26
26
  import TableHead from './table-head';
27
27
  var packageName = "@atlaskit/dynamic-table";
28
- var packageVersion = "14.17.0";
28
+ var packageVersion = "14.17.1";
29
29
  function toggleSortOrder(currentSortOrder) {
30
30
  switch (currentSortOrder) {
31
31
  case DESC:
@@ -12,7 +12,9 @@ var TableHeadCell = function TableHeadCell(_ref) {
12
12
  isSortable = _ref.isSortable,
13
13
  onClick = _ref.onClick,
14
14
  rest = _objectWithoutProperties(_ref, _excluded);
15
- return /*#__PURE__*/React.createElement(HeadCell, _extends({
15
+ return /*#__PURE__*/React.createElement(HeadCell
16
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
17
+ , _extends({
16
18
  style: inlineStyles,
17
19
  testId: testId && "".concat(testId, "--head--cell"),
18
20
  ref: typeof innerRef !== 'string' ? innerRef : null // string refs must be discarded as LegacyRefs are not compatible with FC forwardRefs
@@ -6,11 +6,8 @@ var _excluded = ["isFixedSize", "hasDataRow", "children", "testId", "isLoading"]
6
6
  /** @jsx jsx */
7
7
  import { forwardRef } from 'react';
8
8
  import { css, jsx } from '@emotion/react';
9
-
10
- // eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
11
- import { gridSize as getGridSize } from '@atlaskit/theme/constants';
9
+ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
12
10
  import { row, tableBorder } from '../theme';
13
- var gridSize = getGridSize();
14
11
  // CSS vars for table row
15
12
  // these are declared here to avoid being re-declared in each table row
16
13
  export var tableRowCSSVars = {
@@ -40,6 +37,7 @@ export var Table = /*#__PURE__*/forwardRef(function (_ref, ref) {
40
37
  rest = _objectWithoutProperties(_ref, _excluded);
41
38
  return jsx("table", _extends({
42
39
  inert: isLoading ? '' : undefined,
40
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
43
41
  style: (_ref2 = {}, _defineProperty(_ref2, tableRowCSSVars.CSS_VAR_HOVER_BACKGROUND, row.hoverBackground), _defineProperty(_ref2, tableRowCSSVars.CSS_VAR_HIGHLIGHTED_BACKGROUND, row.highlightedBackground), _defineProperty(_ref2, tableRowCSSVars.CSS_VAR_HOVER_HIGHLIGHTED_BACKGROUND, row.hoverHighlightedBackground), _defineProperty(_ref2, tableRowCSSVars.CSS_VAR_ROW_FOCUS_OUTLINE, row.focusOutline), _ref2),
44
42
  css: [tableStyles, isFixedSize && fixedSizeTableStyles, hasDataRow && bodyBorder],
45
43
  ref: ref
@@ -48,20 +46,22 @@ export var Table = /*#__PURE__*/forwardRef(function (_ref, ref) {
48
46
  }), children);
49
47
  });
50
48
  var captionStyles = css({
51
- fontSize: '1.42857143em',
52
- fontStyle: 'inherit',
53
- fontWeight: 'var(--ds-font-weight-medium)',
54
- letterSpacing: '-0.008em',
55
- lineHeight: 1.2,
49
+ font: "var(--ds-font-heading-medium, normal 500 20px/24px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
56
50
  marginBlockEnd: "var(--ds-space-100, 8px)",
57
- marginBlockStart: "".concat(gridSize * 3.5, "px"),
58
- textAlign: 'left',
59
51
  willChange: 'transform'
60
52
  });
53
+ var oldCaptionStyles = css({
54
+ fontWeight: "var(--ds-font-weight-regular, 400)",
55
+ // eslint-disable-next-line @atlaskit/design-system/use-tokens-space
56
+ marginBlockStart: 28
57
+ });
58
+ var newCaptionStyles = css({
59
+ marginBlockStart: "var(--ds-space-300, 24px)"
60
+ });
61
61
  export var Caption = function Caption(_ref3) {
62
62
  var children = _ref3.children;
63
63
  return jsx("caption", {
64
- css: captionStyles
64
+ css: [captionStyles, getBooleanFF('platform.design-system-team.dynamic-table-typography_7zio6') ? newCaptionStyles : oldCaptionStyles]
65
65
  }, children);
66
66
  };
67
67
  var paginationWrapperStyles = css({
@@ -2,11 +2,8 @@
2
2
  /** @jsx jsx */
3
3
 
4
4
  import { css, jsx } from '@emotion/react';
5
-
6
- // eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
7
- import { gridSize } from '@atlaskit/theme/constants';
8
5
  var fixedHeightStyles = css({
9
- height: "".concat(gridSize() * 18, "px")
6
+ height: '9rem'
10
7
  });
11
8
  export var EmptyViewWithFixedHeight = function EmptyViewWithFixedHeight(_ref) {
12
9
  var children = _ref.children,
@@ -6,8 +6,8 @@ var _excluded = ["children", "testId"];
6
6
  import { forwardRef } from 'react';
7
7
  import { css, jsx } from '@emotion/react';
8
8
  var containerStyles = css({
9
- marginBottom: "var(--ds-space-300, 24px)",
10
- position: 'relative'
9
+ position: 'relative',
10
+ marginBlockEnd: "var(--ds-space-300, 24px)"
11
11
  });
12
12
  export var Container = /*#__PURE__*/forwardRef(function (props, ref) {
13
13
  var children = props.children,
@@ -42,7 +42,7 @@ export var SpinnerBackdrop = function SpinnerBackdrop(_ref) {
42
42
  var spinnerContainerStyles = css({
43
43
  position: 'relative',
44
44
  // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
45
- top: 0
45
+ insetBlockStart: 0
46
46
  });
47
47
  export var SpinnerContainer = /*#__PURE__*/forwardRef(function (_ref2, ref) {
48
48
  var children = _ref2.children;
@@ -24,6 +24,7 @@ export var ContentsContainer = function ContentsContainer(_ref2) {
24
24
  contentsOpacity = _ref2.contentsOpacity,
25
25
  testId = _ref2.testId;
26
26
  return jsx("div", {
27
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
27
28
  style: _defineProperty({}, CSS_VAR_CONTENTS_OPACITY, contentsOpacity),
28
29
  css: [contentsContainerStyles],
29
30
  "data-testid": testId && "".concat(testId, "--contents--container")
@@ -14,6 +14,7 @@ export var TableBodyCell = function TableBodyCell(_ref) {
14
14
  innerRef = _ref.innerRef,
15
15
  props = _objectWithoutProperties(_ref, _excluded);
16
16
  return jsx("td", _extends({
17
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
17
18
  style: getTruncationStyleVars({
18
19
  width: width
19
20
  }),