@atlaskit/dynamic-table 14.17.1 → 14.18.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 +990 -984
- package/README.md +2 -1
- package/dist/cjs/components/stateless.js +1 -1
- package/dist/cjs/styled/constants.js +13 -2
- package/dist/cjs/styled/dynamic-table.js +8 -1
- package/dist/cjs/styled/empty-body.js +5 -0
- package/dist/cjs/styled/loading-container-advanced.js +4 -0
- package/dist/cjs/styled/loading-container.js +5 -0
- package/dist/cjs/styled/rankable/table-cell.js +4 -0
- package/dist/cjs/styled/rankable/table-row.js +4 -0
- package/dist/cjs/styled/table-cell.js +14 -2
- package/dist/cjs/styled/table-head.js +31 -1
- package/dist/cjs/styled/table-row.js +12 -4
- package/dist/es2019/components/stateless.js +1 -1
- package/dist/es2019/styled/constants.js +12 -2
- package/dist/es2019/styled/dynamic-table.js +13 -1
- package/dist/es2019/styled/empty-body.js +4 -0
- package/dist/es2019/styled/loading-container-advanced.js +5 -0
- package/dist/es2019/styled/loading-container.js +4 -0
- package/dist/es2019/styled/rankable/table-cell.js +4 -0
- package/dist/es2019/styled/rankable/table-row.js +5 -0
- package/dist/es2019/styled/table-cell.js +14 -2
- package/dist/es2019/styled/table-head.js +32 -1
- package/dist/es2019/styled/table-row.js +17 -4
- package/dist/esm/components/stateless.js +1 -1
- package/dist/esm/styled/constants.js +12 -2
- package/dist/esm/styled/dynamic-table.js +9 -1
- package/dist/esm/styled/empty-body.js +4 -0
- package/dist/esm/styled/loading-container-advanced.js +5 -0
- package/dist/esm/styled/loading-container.js +4 -0
- package/dist/esm/styled/rankable/table-cell.js +4 -0
- package/dist/esm/styled/rankable/table-row.js +5 -0
- package/dist/esm/styled/table-cell.js +14 -2
- package/dist/esm/styled/table-head.js +32 -1
- package/dist/esm/styled/table-row.js +13 -4
- package/dist/types/styled/dynamic-table.d.ts +3 -0
- package/dist/types/styled/empty-body.d.ts +3 -0
- package/dist/types/styled/loading-container-advanced.d.ts +3 -0
- package/dist/types/styled/loading-container.d.ts +3 -0
- package/dist/types/styled/rankable/table-cell.d.ts +3 -0
- package/dist/types/styled/rankable/table-row.d.ts +3 -0
- package/dist/types/styled/table-cell.d.ts +3 -0
- package/dist/types/styled/table-head.d.ts +3 -0
- package/dist/types/styled/table-row.d.ts +3 -0
- package/dist/types-ts4.5/styled/dynamic-table.d.ts +3 -0
- package/dist/types-ts4.5/styled/empty-body.d.ts +3 -0
- package/dist/types-ts4.5/styled/loading-container-advanced.d.ts +3 -0
- package/dist/types-ts4.5/styled/loading-container.d.ts +3 -0
- package/dist/types-ts4.5/styled/rankable/table-cell.d.ts +3 -0
- package/dist/types-ts4.5/styled/rankable/table-row.d.ts +3 -0
- package/dist/types-ts4.5/styled/table-cell.d.ts +3 -0
- package/dist/types-ts4.5/styled/table-head.d.ts +3 -0
- package/dist/types-ts4.5/styled/table-row.d.ts +3 -0
- package/package.json +93 -95
- package/report.api.md +212 -214
package/README.md
CHANGED
|
@@ -10,4 +10,5 @@ yarn add @atlaskit/dynamic-table
|
|
|
10
10
|
|
|
11
11
|
## Usage
|
|
12
12
|
|
|
13
|
-
Detailed docs and example usage can be found
|
|
13
|
+
Detailed docs and example usage can be found
|
|
14
|
+
[here](https://atlassian.design/components/dynamic-table/usage).
|
|
@@ -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.
|
|
38
|
+
var packageVersion = "14.18.0";
|
|
39
39
|
function toggleSortOrder(currentSortOrder) {
|
|
40
40
|
switch (currentSortOrder) {
|
|
41
41
|
case _constants.DESC:
|
|
@@ -7,14 +7,21 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.truncationWidthStyles = exports.overflowTruncateStyles = exports.getTruncationStyleVars = exports.fixedSizeTruncateStyles = exports.cellStyles = void 0;
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
9
|
var _react = require("@emotion/react");
|
|
10
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
11
|
+
|
|
10
12
|
var CSS_VAR_WIDTH = '--local-dynamic-table-width';
|
|
13
|
+
// eslint-disable-next-line @atlaskit/design-system/no-exported-css, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
11
14
|
var truncationWidthStyles = exports.truncationWidthStyles = (0, _react.css)({
|
|
12
15
|
width: "var(".concat(CSS_VAR_WIDTH, ")")
|
|
13
16
|
});
|
|
17
|
+
|
|
18
|
+
// eslint-disable-next-line @atlaskit/design-system/no-exported-css, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
14
19
|
var fixedSizeTruncateStyles = exports.fixedSizeTruncateStyles = (0, _react.css)({
|
|
15
20
|
textOverflow: 'ellipsis',
|
|
16
21
|
whiteSpace: 'nowrap'
|
|
17
22
|
});
|
|
23
|
+
|
|
24
|
+
// eslint-disable-next-line @atlaskit/design-system/no-exported-css, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
18
25
|
var overflowTruncateStyles = exports.overflowTruncateStyles = (0, _react.css)({
|
|
19
26
|
overflow: 'hidden'
|
|
20
27
|
});
|
|
@@ -22,14 +29,18 @@ var getTruncationStyleVars = exports.getTruncationStyleVars = function getTrunca
|
|
|
22
29
|
var width = _ref.width;
|
|
23
30
|
return typeof width !== 'undefined' ? (0, _defineProperty2.default)({}, CSS_VAR_WIDTH, "".concat(width, "%")) : undefined;
|
|
24
31
|
};
|
|
32
|
+
|
|
33
|
+
// eslint-disable-next-line @atlaskit/design-system/no-exported-css, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
25
34
|
var cellStyles = exports.cellStyles = (0, _react.css)({
|
|
26
35
|
padding: "var(--ds-space-050, 4px)".concat(" ", "var(--ds-space-100, 8px)"),
|
|
27
36
|
border: 'none',
|
|
28
37
|
textAlign: 'left',
|
|
38
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
29
39
|
'&:first-of-type': {
|
|
30
|
-
|
|
40
|
+
paddingInlineStart: "var(--ds-space-0, 0px)"
|
|
31
41
|
},
|
|
42
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
32
43
|
'&:last-child': {
|
|
33
|
-
|
|
44
|
+
paddingInlineEnd: "var(--ds-space-0, 0px)"
|
|
34
45
|
}
|
|
35
46
|
});
|
|
@@ -14,7 +14,11 @@ 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
|
+
/**
|
|
18
|
+
* @jsxRuntime classic
|
|
19
|
+
*/
|
|
17
20
|
/** @jsx jsx */
|
|
21
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
18
22
|
// CSS vars for table row
|
|
19
23
|
// these are declared here to avoid being re-declared in each table row
|
|
20
24
|
var tableRowCSSVars = exports.tableRowCSSVars = {
|
|
@@ -32,6 +36,7 @@ var tableStyles = (0, _react2.css)({
|
|
|
32
36
|
borderSpacing: '0px'
|
|
33
37
|
});
|
|
34
38
|
var bodyBorder = (0, _react2.css)({
|
|
39
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
35
40
|
borderBlockEnd: "2px solid ".concat(_theme.tableBorder.borderColor)
|
|
36
41
|
});
|
|
37
42
|
var Table = exports.Table = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
@@ -68,7 +73,9 @@ var newCaptionStyles = (0, _react2.css)({
|
|
|
68
73
|
var Caption = exports.Caption = function Caption(_ref3) {
|
|
69
74
|
var children = _ref3.children;
|
|
70
75
|
return (0, _react2.jsx)("caption", {
|
|
71
|
-
css: [captionStyles,
|
|
76
|
+
css: [captionStyles,
|
|
77
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
78
|
+
(0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.dynamic-table-typography_7zio6') ? newCaptionStyles : oldCaptionStyles]
|
|
72
79
|
}, children);
|
|
73
80
|
};
|
|
74
81
|
var paginationWrapperStyles = (0, _react2.css)({
|
|
@@ -6,8 +6,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.EmptyViewWithFixedHeight = exports.EmptyViewContainer = void 0;
|
|
7
7
|
var _react = require("@emotion/react");
|
|
8
8
|
/* eslint-disable @repo/internal/react/require-jsdoc */
|
|
9
|
+
/**
|
|
10
|
+
* @jsxRuntime classic
|
|
11
|
+
*/
|
|
9
12
|
/** @jsx jsx */
|
|
10
13
|
|
|
14
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
15
|
+
|
|
11
16
|
var fixedHeightStyles = (0, _react.css)({
|
|
12
17
|
height: '9rem'
|
|
13
18
|
});
|
|
@@ -11,7 +11,11 @@ var _react = require("react");
|
|
|
11
11
|
var _react2 = require("@emotion/react");
|
|
12
12
|
var _excluded = ["children", "testId"];
|
|
13
13
|
/* eslint-disable @repo/internal/react/require-jsdoc */
|
|
14
|
+
/**
|
|
15
|
+
* @jsxRuntime classic
|
|
16
|
+
*/
|
|
14
17
|
/** @jsx jsx */
|
|
18
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
15
19
|
var containerStyles = (0, _react2.css)({
|
|
16
20
|
position: 'relative',
|
|
17
21
|
marginBlockEnd: "var(--ds-space-300, 24px)"
|
|
@@ -8,8 +8,13 @@ exports.SpinnerContainer = exports.ContentsContainer = exports.Container = expor
|
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
9
|
var _react = require("@emotion/react");
|
|
10
10
|
/* eslint-disable @repo/internal/react/require-jsdoc */
|
|
11
|
+
/**
|
|
12
|
+
* @jsxRuntime classic
|
|
13
|
+
*/
|
|
11
14
|
/** @jsx jsx */
|
|
12
15
|
|
|
16
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
17
|
+
|
|
13
18
|
var CSS_VAR_CONTENTS_OPACITY = exports.CSS_VAR_CONTENTS_OPACITY = '--contents-opacity';
|
|
14
19
|
var containerStyles = (0, _react.css)({
|
|
15
20
|
position: 'relative'
|
|
@@ -10,7 +10,11 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
|
|
|
10
10
|
var _react = require("@emotion/react");
|
|
11
11
|
var _tableCell = require("../table-cell");
|
|
12
12
|
var _excluded = ["isRanking", "innerRef"];
|
|
13
|
+
/**
|
|
14
|
+
* @jsxRuntime classic
|
|
15
|
+
*/
|
|
13
16
|
/** @jsx jsx */
|
|
17
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
14
18
|
var rankingStyles = (0, _react.css)({
|
|
15
19
|
boxSizing: 'border-box'
|
|
16
20
|
});
|
|
@@ -12,7 +12,11 @@ var _react2 = require("@emotion/react");
|
|
|
12
12
|
var _colors = require("@atlaskit/theme/colors");
|
|
13
13
|
var _tableRow = require("../table-row");
|
|
14
14
|
var _excluded = ["isRanking", "isRankingItem", "testId"];
|
|
15
|
+
/**
|
|
16
|
+
* @jsxRuntime classic
|
|
17
|
+
*/
|
|
15
18
|
/** @jsx jsx */
|
|
19
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
16
20
|
var rankingStyles = (0, _react2.css)({
|
|
17
21
|
display: 'block'
|
|
18
22
|
});
|
|
@@ -10,7 +10,11 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
|
|
|
10
10
|
var _react = require("@emotion/react");
|
|
11
11
|
var _constants = require("./constants");
|
|
12
12
|
var _excluded = ["width", "isFixedSize", "shouldTruncate", "innerRef"];
|
|
13
|
+
/**
|
|
14
|
+
* @jsxRuntime classic
|
|
15
|
+
*/
|
|
13
16
|
/** @jsx jsx */
|
|
17
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
14
18
|
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
15
19
|
var TableBodyCell = exports.TableBodyCell = function TableBodyCell(_ref) {
|
|
16
20
|
var width = _ref.width,
|
|
@@ -19,11 +23,19 @@ var TableBodyCell = exports.TableBodyCell = function TableBodyCell(_ref) {
|
|
|
19
23
|
innerRef = _ref.innerRef,
|
|
20
24
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
21
25
|
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
|
|
26
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
23
27
|
style: (0, _constants.getTruncationStyleVars)({
|
|
24
28
|
width: width
|
|
25
29
|
}),
|
|
26
|
-
css: [
|
|
30
|
+
css: [
|
|
31
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
32
|
+
_constants.truncationWidthStyles,
|
|
33
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
34
|
+
isFixedSize && shouldTruncate && _constants.fixedSizeTruncateStyles,
|
|
35
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
36
|
+
isFixedSize && _constants.overflowTruncateStyles,
|
|
37
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
38
|
+
_constants.cellStyles]
|
|
27
39
|
// HOC withDimensions complains about the types but it is working fine
|
|
28
40
|
// @ts-ignore
|
|
29
41
|
,
|
|
@@ -18,7 +18,11 @@ var _constants2 = require("./constants");
|
|
|
18
18
|
var _excluded = ["isRanking", "testId"],
|
|
19
19
|
_excluded2 = ["width", "children", "isSortable", "sortOrder", "isFixedSize", "shouldTruncate", "onClick", "style", "testId"];
|
|
20
20
|
/* eslint-disable @repo/internal/react/require-jsdoc */
|
|
21
|
+
/**
|
|
22
|
+
* @jsxRuntime classic
|
|
23
|
+
*/
|
|
21
24
|
/** @jsx jsx */
|
|
25
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
22
26
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
23
27
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
24
28
|
var CSS_VAR_TEXT_COLOR = '--local-dynamic-table-text-color';
|
|
@@ -42,6 +46,7 @@ var headCellBaseStyles = (0, _react2.css)({
|
|
|
42
46
|
boxSizing: 'border-box',
|
|
43
47
|
position: 'relative',
|
|
44
48
|
border: 'none',
|
|
49
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
45
50
|
borderBlockEnd: "2px solid ".concat(_theme.tableBorder.borderColor),
|
|
46
51
|
color: "var(--ds-text-subtlest, ".concat("var(".concat(CSS_VAR_TEXT_COLOR, ")"), ")"),
|
|
47
52
|
textAlign: 'left',
|
|
@@ -64,6 +69,7 @@ var onClickStyles = (0, _react2.css)({
|
|
|
64
69
|
}
|
|
65
70
|
});
|
|
66
71
|
var baseStyles = (0, _react2.css)({
|
|
72
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
67
73
|
'& > button': {
|
|
68
74
|
padding: "var(--ds-space-0, 0)",
|
|
69
75
|
position: 'relative',
|
|
@@ -84,51 +90,65 @@ var baseStyles = (0, _react2.css)({
|
|
|
84
90
|
insetInlineEnd: "var(--ds-space-negative-100, -8px)"
|
|
85
91
|
},
|
|
86
92
|
'&::before': {
|
|
93
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
87
94
|
borderBlockEnd: "3px solid ".concat(_theme.arrow.defaultColor),
|
|
88
95
|
insetBlockEnd: "var(--ds-space-100, 8px)"
|
|
89
96
|
},
|
|
90
97
|
'&::after': {
|
|
98
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
91
99
|
borderBlockStart: "3px solid ".concat(_theme.arrow.defaultColor),
|
|
92
100
|
insetBlockEnd: 0
|
|
93
101
|
}
|
|
94
102
|
},
|
|
95
103
|
'@media (forced-colors: active)': {
|
|
104
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
96
105
|
'& > button': {
|
|
97
106
|
'&::before, &::after': {
|
|
107
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
98
108
|
border: "3px solid ".concat(_theme.MSThemeColors.Background)
|
|
99
109
|
},
|
|
100
110
|
'&::before': {
|
|
111
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
101
112
|
borderBlockEnd: "3px solid ".concat(_theme.MSThemeColors.Text)
|
|
102
113
|
},
|
|
103
114
|
'&::after': {
|
|
115
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
104
116
|
borderBlockStart: "3px solid ".concat(_theme.MSThemeColors.Text)
|
|
105
117
|
}
|
|
106
118
|
}
|
|
107
119
|
}
|
|
108
120
|
});
|
|
109
121
|
var ascendingStyles = (0, _react2.css)({
|
|
122
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
110
123
|
'& > button': {
|
|
111
124
|
'&::before': {
|
|
125
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
112
126
|
borderBlockEnd: "3px solid ".concat(_theme.arrow.selectedColor)
|
|
113
127
|
}
|
|
114
128
|
},
|
|
115
129
|
'@media (forced-colors: active)': {
|
|
130
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
116
131
|
'& > button': {
|
|
117
132
|
'&::before': {
|
|
133
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
118
134
|
borderBlockEnd: "3px solid ".concat(_theme.MSThemeColors.SelectedBackground)
|
|
119
135
|
}
|
|
120
136
|
}
|
|
121
137
|
}
|
|
122
138
|
});
|
|
123
139
|
var descendingStyles = (0, _react2.css)({
|
|
140
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
124
141
|
'& > button': {
|
|
125
142
|
'&::after': {
|
|
143
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
126
144
|
borderBlockStart: "3px solid ".concat(_theme.arrow.selectedColor)
|
|
127
145
|
}
|
|
128
146
|
},
|
|
129
147
|
'@media (forced-colors: active)': {
|
|
148
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
130
149
|
'& > button': {
|
|
131
150
|
'&::after': {
|
|
151
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
132
152
|
borderBlockStart: "3px solid ".concat(_theme.MSThemeColors.SelectedBackground)
|
|
133
153
|
}
|
|
134
154
|
}
|
|
@@ -166,7 +186,17 @@ var HeadCell = exports.HeadCell = /*#__PURE__*/(0, _react.forwardRef)(function (
|
|
|
166
186
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
167
187
|
,
|
|
168
188
|
style: mergedStyles,
|
|
169
|
-
css: [
|
|
189
|
+
css: [
|
|
190
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
191
|
+
_constants2.cellStyles, headCellBaseStyles,
|
|
192
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
193
|
+
(0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.dynamic-table-typography_7zio6') ? headCellNewStyles : headCellOldStyles, onClick && onClickStyles,
|
|
194
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
195
|
+
_constants2.truncationWidthStyles,
|
|
196
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
197
|
+
isFixedSize && shouldTruncate && _constants2.fixedSizeTruncateStyles,
|
|
198
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
199
|
+
isFixedSize && _constants2.overflowTruncateStyles, isSortable && baseStyles, isASC && ascendingStyles, isDESC && descendingStyles],
|
|
170
200
|
onClick: onClick,
|
|
171
201
|
ref: ref,
|
|
172
202
|
"data-testid": testId
|
|
@@ -11,23 +11,31 @@ var _react = require("react");
|
|
|
11
11
|
var _react2 = require("@emotion/react");
|
|
12
12
|
var _dynamicTable = require("./dynamic-table");
|
|
13
13
|
var _excluded = ["isHighlighted", "children", "style", "testId"];
|
|
14
|
+
/**
|
|
15
|
+
* @jsxRuntime classic
|
|
16
|
+
*/
|
|
14
17
|
/** @jsx jsx */
|
|
18
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
15
19
|
var rowStyles = (0, _react2.css)({
|
|
16
20
|
backgroundColor: "var(--ds-background-neutral-subtle, transparent)",
|
|
17
21
|
'&:focus-visible': {
|
|
18
|
-
outline: "2px solid ".concat("var(--ds-border-focused, ".concat(
|
|
22
|
+
outline: "2px solid ".concat("var(--ds-border-focused, ".concat( // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
23
|
+
"var(".concat(_dynamicTable.tableRowCSSVars.CSS_VAR_HOVER_BACKGROUND, ")"), ")")),
|
|
19
24
|
outlineOffset: "-2px"
|
|
20
25
|
}
|
|
21
26
|
});
|
|
22
27
|
var rowBackgroundStyles = (0, _react2.css)({
|
|
23
28
|
'&:hover': {
|
|
24
|
-
backgroundColor: "var(--ds-background-neutral-subtle-hovered, ".concat(
|
|
29
|
+
backgroundColor: "var(--ds-background-neutral-subtle-hovered, ".concat( // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
30
|
+
"var(".concat(_dynamicTable.tableRowCSSVars.CSS_VAR_HOVER_BACKGROUND, ")"), ")")
|
|
25
31
|
}
|
|
26
32
|
});
|
|
27
33
|
var rowHighlightedBackgroundStyles = (0, _react2.css)({
|
|
28
|
-
backgroundColor: "var(--ds-background-selected, ".concat(
|
|
34
|
+
backgroundColor: "var(--ds-background-selected, ".concat( // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
35
|
+
"var(".concat(_dynamicTable.tableRowCSSVars.CSS_VAR_HIGHLIGHTED_BACKGROUND, ")"), ")"),
|
|
29
36
|
'&:hover': {
|
|
30
|
-
backgroundColor: "var(--ds-background-selected-hovered, ".concat(
|
|
37
|
+
backgroundColor: "var(--ds-background-selected-hovered, ".concat( // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
38
|
+
"var(".concat(_dynamicTable.tableRowCSSVars.CSS_VAR_HOVER_HIGHLIGHTED_BACKGROUND, ")"), ")")
|
|
31
39
|
}
|
|
32
40
|
});
|
|
33
41
|
|
|
@@ -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
|
+
const packageVersion = "14.18.0";
|
|
18
18
|
function toggleSortOrder(currentSortOrder) {
|
|
19
19
|
switch (currentSortOrder) {
|
|
20
20
|
case DESC:
|
|
@@ -1,12 +1,18 @@
|
|
|
1
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
1
2
|
import { css } from '@emotion/react';
|
|
2
3
|
const CSS_VAR_WIDTH = '--local-dynamic-table-width';
|
|
4
|
+
// eslint-disable-next-line @atlaskit/design-system/no-exported-css, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
3
5
|
export const truncationWidthStyles = css({
|
|
4
6
|
width: `var(${CSS_VAR_WIDTH})`
|
|
5
7
|
});
|
|
8
|
+
|
|
9
|
+
// eslint-disable-next-line @atlaskit/design-system/no-exported-css, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
6
10
|
export const fixedSizeTruncateStyles = css({
|
|
7
11
|
textOverflow: 'ellipsis',
|
|
8
12
|
whiteSpace: 'nowrap'
|
|
9
13
|
});
|
|
14
|
+
|
|
15
|
+
// eslint-disable-next-line @atlaskit/design-system/no-exported-css, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
10
16
|
export const overflowTruncateStyles = css({
|
|
11
17
|
overflow: 'hidden'
|
|
12
18
|
});
|
|
@@ -15,14 +21,18 @@ export const getTruncationStyleVars = ({
|
|
|
15
21
|
}) => typeof width !== 'undefined' ? {
|
|
16
22
|
[CSS_VAR_WIDTH]: `${width}%`
|
|
17
23
|
} : undefined;
|
|
24
|
+
|
|
25
|
+
// eslint-disable-next-line @atlaskit/design-system/no-exported-css, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
18
26
|
export const cellStyles = css({
|
|
19
27
|
padding: `${"var(--ds-space-050, 4px)"} ${"var(--ds-space-100, 8px)"}`,
|
|
20
28
|
border: 'none',
|
|
21
29
|
textAlign: 'left',
|
|
30
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
22
31
|
'&:first-of-type': {
|
|
23
|
-
|
|
32
|
+
paddingInlineStart: "var(--ds-space-0, 0px)"
|
|
24
33
|
},
|
|
34
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
25
35
|
'&:last-child': {
|
|
26
|
-
|
|
36
|
+
paddingInlineEnd: "var(--ds-space-0, 0px)"
|
|
27
37
|
}
|
|
28
38
|
});
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
/* eslint-disable @repo/internal/react/require-jsdoc */
|
|
3
|
+
/**
|
|
4
|
+
* @jsxRuntime classic
|
|
5
|
+
*/
|
|
3
6
|
/** @jsx jsx */
|
|
4
7
|
import { forwardRef } from 'react';
|
|
8
|
+
|
|
9
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
5
10
|
import { css, jsx } from '@emotion/react';
|
|
6
11
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
7
12
|
import { row, tableBorder } from '../theme';
|
|
@@ -22,6 +27,7 @@ const tableStyles = css({
|
|
|
22
27
|
borderSpacing: '0px'
|
|
23
28
|
});
|
|
24
29
|
const bodyBorder = css({
|
|
30
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
25
31
|
borderBlockEnd: `2px solid ${tableBorder.borderColor}`
|
|
26
32
|
});
|
|
27
33
|
export const Table = /*#__PURE__*/forwardRef(({
|
|
@@ -36,9 +42,13 @@ export const Table = /*#__PURE__*/forwardRef(({
|
|
|
36
42
|
inert: isLoading ? '' : undefined,
|
|
37
43
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
38
44
|
style: {
|
|
45
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
39
46
|
[tableRowCSSVars.CSS_VAR_HOVER_BACKGROUND]: row.hoverBackground,
|
|
47
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
40
48
|
[tableRowCSSVars.CSS_VAR_HIGHLIGHTED_BACKGROUND]: row.highlightedBackground,
|
|
49
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
41
50
|
[tableRowCSSVars.CSS_VAR_HOVER_HIGHLIGHTED_BACKGROUND]: row.hoverHighlightedBackground,
|
|
51
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
42
52
|
[tableRowCSSVars.CSS_VAR_ROW_FOCUS_OUTLINE]: row.focusOutline
|
|
43
53
|
},
|
|
44
54
|
css: [tableStyles, isFixedSize && fixedSizeTableStyles, hasDataRow && bodyBorder],
|
|
@@ -63,7 +73,9 @@ const newCaptionStyles = css({
|
|
|
63
73
|
export const Caption = ({
|
|
64
74
|
children
|
|
65
75
|
}) => jsx("caption", {
|
|
66
|
-
css: [captionStyles,
|
|
76
|
+
css: [captionStyles,
|
|
77
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
78
|
+
getBooleanFF('platform.design-system-team.dynamic-table-typography_7zio6') ? newCaptionStyles : oldCaptionStyles]
|
|
67
79
|
}, children);
|
|
68
80
|
const paginationWrapperStyles = css({
|
|
69
81
|
display: 'flex',
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
/* eslint-disable @repo/internal/react/require-jsdoc */
|
|
2
|
+
/**
|
|
3
|
+
* @jsxRuntime classic
|
|
4
|
+
*/
|
|
2
5
|
/** @jsx jsx */
|
|
3
6
|
|
|
7
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
4
8
|
import { css, jsx } from '@emotion/react';
|
|
5
9
|
const fixedHeightStyles = css({
|
|
6
10
|
height: '9rem'
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
/* eslint-disable @repo/internal/react/require-jsdoc */
|
|
3
|
+
/**
|
|
4
|
+
* @jsxRuntime classic
|
|
5
|
+
*/
|
|
3
6
|
/** @jsx jsx */
|
|
4
7
|
import { forwardRef } from 'react';
|
|
8
|
+
|
|
9
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
5
10
|
import { css, jsx } from '@emotion/react';
|
|
6
11
|
const containerStyles = css({
|
|
7
12
|
position: 'relative',
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
/* eslint-disable @repo/internal/react/require-jsdoc */
|
|
2
|
+
/**
|
|
3
|
+
* @jsxRuntime classic
|
|
4
|
+
*/
|
|
2
5
|
/** @jsx jsx */
|
|
3
6
|
|
|
7
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
4
8
|
import { css, jsx } from '@emotion/react';
|
|
5
9
|
export const CSS_VAR_CONTENTS_OPACITY = '--contents-opacity';
|
|
6
10
|
const containerStyles = css({
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
/**
|
|
3
|
+
* @jsxRuntime classic
|
|
4
|
+
*/
|
|
2
5
|
/** @jsx jsx */
|
|
3
6
|
|
|
7
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
4
8
|
import { css, jsx } from '@emotion/react';
|
|
5
9
|
import { TableBodyCell } from '../table-cell';
|
|
6
10
|
const rankingStyles = css({
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
/**
|
|
3
|
+
* @jsxRuntime classic
|
|
4
|
+
*/
|
|
2
5
|
/** @jsx jsx */
|
|
3
6
|
import { forwardRef } from 'react';
|
|
7
|
+
|
|
8
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
4
9
|
import { css, jsx } from '@emotion/react';
|
|
5
10
|
import { B100, N20, N50A, N60A } from '@atlaskit/theme/colors';
|
|
6
11
|
import { TableBodyRow } from '../table-row';
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
/**
|
|
3
|
+
* @jsxRuntime classic
|
|
4
|
+
*/
|
|
2
5
|
/** @jsx jsx */
|
|
3
6
|
|
|
7
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
4
8
|
import { jsx } from '@emotion/react';
|
|
5
9
|
import { cellStyles, fixedSizeTruncateStyles, getTruncationStyleVars, overflowTruncateStyles, truncationWidthStyles } from './constants';
|
|
6
10
|
|
|
@@ -12,11 +16,19 @@ export const TableBodyCell = ({
|
|
|
12
16
|
innerRef,
|
|
13
17
|
...props
|
|
14
18
|
}) => jsx("td", _extends({
|
|
15
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
19
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
16
20
|
style: getTruncationStyleVars({
|
|
17
21
|
width
|
|
18
22
|
}),
|
|
19
|
-
css: [
|
|
23
|
+
css: [
|
|
24
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
25
|
+
truncationWidthStyles,
|
|
26
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
27
|
+
isFixedSize && shouldTruncate && fixedSizeTruncateStyles,
|
|
28
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
29
|
+
isFixedSize && overflowTruncateStyles,
|
|
30
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
31
|
+
cellStyles]
|
|
20
32
|
// HOC withDimensions complains about the types but it is working fine
|
|
21
33
|
// @ts-ignore
|
|
22
34
|
,
|