@atlaskit/dynamic-table 18.0.1 → 18.0.2

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 (71) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/cjs/components/stateless.js +2 -2
  3. package/dist/cjs/styled/constants.js +2 -35
  4. package/dist/cjs/styled/dynamic-table.compiled.css +11 -0
  5. package/dist/cjs/styled/dynamic-table.js +42 -52
  6. package/dist/cjs/styled/empty-body.compiled.css +11 -0
  7. package/dist/cjs/styled/empty-body.js +17 -25
  8. package/dist/cjs/styled/loading-container-advanced.compiled.css +9 -0
  9. package/dist/cjs/styled/loading-container-advanced.js +23 -38
  10. package/dist/cjs/styled/loading-container.compiled.css +8 -0
  11. package/dist/cjs/styled/loading-container.js +27 -33
  12. package/dist/cjs/styled/rankable/table-cell.compiled.css +1 -0
  13. package/dist/cjs/styled/rankable/table-cell.js +12 -15
  14. package/dist/cjs/styled/rankable/table-row.compiled.css +7 -0
  15. package/dist/cjs/styled/rankable/table-row.js +21 -26
  16. package/dist/cjs/styled/table-cell.compiled.css +13 -0
  17. package/dist/cjs/styled/table-cell.js +16 -17
  18. package/dist/cjs/styled/table-head.compiled.css +58 -0
  19. package/dist/cjs/styled/table-head.js +38 -153
  20. package/dist/cjs/styled/table-row.compiled.css +6 -0
  21. package/dist/cjs/styled/table-row.js +20 -36
  22. package/dist/cjs/theme.js +1 -21
  23. package/dist/es2019/components/stateless.js +2 -2
  24. package/dist/es2019/styled/constants.js +1 -33
  25. package/dist/es2019/styled/dynamic-table.compiled.css +11 -0
  26. package/dist/es2019/styled/dynamic-table.js +28 -52
  27. package/dist/es2019/styled/empty-body.compiled.css +11 -0
  28. package/dist/es2019/styled/empty-body.js +12 -22
  29. package/dist/es2019/styled/loading-container-advanced.compiled.css +9 -0
  30. package/dist/es2019/styled/loading-container-advanced.js +20 -37
  31. package/dist/es2019/styled/loading-container.compiled.css +8 -0
  32. package/dist/es2019/styled/loading-container.js +16 -29
  33. package/dist/es2019/styled/rankable/table-cell.compiled.css +1 -0
  34. package/dist/es2019/styled/rankable/table-cell.js +9 -14
  35. package/dist/es2019/styled/rankable/table-row.compiled.css +7 -0
  36. package/dist/es2019/styled/rankable/table-row.js +12 -23
  37. package/dist/es2019/styled/table-cell.compiled.css +13 -0
  38. package/dist/es2019/styled/table-cell.js +13 -19
  39. package/dist/es2019/styled/table-head.compiled.css +58 -0
  40. package/dist/es2019/styled/table-head.js +29 -153
  41. package/dist/es2019/styled/table-row.compiled.css +6 -0
  42. package/dist/es2019/styled/table-row.js +11 -38
  43. package/dist/es2019/theme.js +0 -17
  44. package/dist/esm/components/stateless.js +2 -2
  45. package/dist/esm/styled/constants.js +1 -33
  46. package/dist/esm/styled/dynamic-table.compiled.css +11 -0
  47. package/dist/esm/styled/dynamic-table.js +39 -50
  48. package/dist/esm/styled/empty-body.compiled.css +11 -0
  49. package/dist/esm/styled/empty-body.js +12 -22
  50. package/dist/esm/styled/loading-container-advanced.compiled.css +9 -0
  51. package/dist/esm/styled/loading-container-advanced.js +20 -37
  52. package/dist/esm/styled/loading-container.compiled.css +8 -0
  53. package/dist/esm/styled/loading-container.js +25 -33
  54. package/dist/esm/styled/rankable/table-cell.compiled.css +1 -0
  55. package/dist/esm/styled/rankable/table-cell.js +9 -14
  56. package/dist/esm/styled/rankable/table-row.compiled.css +7 -0
  57. package/dist/esm/styled/rankable/table-row.js +17 -23
  58. package/dist/esm/styled/table-cell.compiled.css +13 -0
  59. package/dist/esm/styled/table-cell.js +13 -19
  60. package/dist/esm/styled/table-head.compiled.css +58 -0
  61. package/dist/esm/styled/table-head.js +38 -154
  62. package/dist/esm/styled/table-row.compiled.css +6 -0
  63. package/dist/esm/styled/table-row.js +16 -36
  64. package/dist/esm/theme.js +0 -17
  65. package/dist/types/styled/constants.d.ts +0 -4
  66. package/dist/types/styled/dynamic-table.d.ts +0 -6
  67. package/dist/types/theme.d.ts +0 -16
  68. package/dist/types-ts4.5/styled/constants.d.ts +0 -4
  69. package/dist/types-ts4.5/styled/dynamic-table.d.ts +0 -6
  70. package/dist/types-ts4.5/theme.d.ts +0 -16
  71. package/package.json +16 -15
@@ -1,20 +1,26 @@
1
+ /* table-cell.tsx generated by @compiled/babel-plugin v0.36.1 */
1
2
  "use strict";
2
3
 
3
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
5
+ var _typeof = require("@babel/runtime/helpers/typeof");
4
6
  Object.defineProperty(exports, "__esModule", {
5
7
  value: true
6
8
  });
7
9
  exports.TableBodyCell = void 0;
10
+ require("./table-cell.compiled.css");
11
+ var React = _interopRequireWildcard(require("react"));
12
+ var _runtime = require("@compiled/react/runtime");
8
13
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
14
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
10
- var _react = require("@emotion/react");
11
15
  var _constants = require("./constants");
12
16
  var _excluded = ["width", "isFixedSize", "shouldTruncate", "innerRef"];
13
- /**
14
- * @jsxRuntime classic
15
- * @jsx jsx
16
- */
17
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
17
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
18
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
19
+ var fixedSizeTruncateStyles = null;
20
+ var overflowTruncateStyles = null;
21
+ var truncationWidthStyles = null;
22
+ var cellStyles = null;
23
+
18
24
  // eslint-disable-next-line @repo/internal/react/require-jsdoc
19
25
  var TableBodyCell = exports.TableBodyCell = function TableBodyCell(_ref) {
20
26
  var width = _ref.width,
@@ -22,24 +28,17 @@ var TableBodyCell = exports.TableBodyCell = function TableBodyCell(_ref) {
22
28
  shouldTruncate = _ref.shouldTruncate,
23
29
  innerRef = _ref.innerRef,
24
30
  props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
25
- return (0, _react.jsx)("td", (0, _extends2.default)({
31
+ return /*#__PURE__*/React.createElement("td", (0, _extends2.default)({
26
32
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
27
33
  style: (0, _constants.getTruncationStyleVars)({
28
34
  width: width
29
35
  }),
30
- css: [
31
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
32
- _constants.truncationWidthStyles,
33
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
34
- isFixedSize && shouldTruncate && _constants.fixedSizeTruncateStyles,
35
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
36
- isFixedSize && _constants.overflowTruncateStyles,
37
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
38
- _constants.cellStyles]
39
36
  // HOC withDimensions complains about the types but it is working fine
40
37
  // @ts-ignore
41
- ,
42
38
  ref: innerRef
39
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
40
+ ,
41
+ className: (0, _runtime.ax)(["_1bsb8a2a", isFixedSize && shouldTruncate && "_1bto1l2s _o5721q9c", isFixedSize && "_1reo15vq _18m915vq", "_19itglyw _85i51b66 _1q511b66 _y4tiu2gc _bozgu2gc _y3gn1e5h _1s37ze3t _uupyze3t", props.className])
43
42
  // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
44
43
  }, props));
45
44
  };
@@ -0,0 +1,58 @@
1
+
2
+ ._11c8dcr7{font:var(--ds-font-body-UNSAFE_small,normal 400 9pt/1pc ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
3
+ ._173zglyw>button{background:none}
4
+ ._pw6dglyw>button{border:none}
5
+ ._1xgk1j28>button:after, ._1wfn1j28>button:before{border-color:transparent}
6
+ ._sklb1l7b>button:after, ._1j091l7b>button:before{border-width:3px}
7
+ ._y9yonqa1>button:after, ._997wnqa1>button:before{border-style:solid}
8
+ ._h7alglyw{border-inline:none}
9
+ ._izbqglyw{border-block:none}
10
+ ._179rglyw{border-block-end:none}
11
+ ._179rralu{border-block-end:var(--_k02y3n)}
12
+ ._191wglyw{border-inline-start:none}
13
+ ._c77k1f6e>button:before{border-block-end:var(--_1rdacuj)}
14
+ ._c77k2wk4>button:before{border-block-end:var(--_1qca9zt)}
15
+ ._f4731f6e>button:after{border-block-start:var(--_1rdacuj)}
16
+ ._f4732wk4>button:after{border-block-start:var(--_1qca9zt)}
17
+ ._mqm2glyw{border-block-start:none}
18
+ ._t51zglyw{border-inline-end:none}._10pp1kw7>button{font-weight:inherit}
19
+ ._14gsx0bf>button:after, ._cigmx0bf>button:before{inset-inline-end:var(--ds-space-negative-100,-8px)}
20
+ ._18m915vq{overflow-y:hidden}
21
+ ._19w61ule>button:after, ._1w611ule>button:before{display:block}
22
+ ._1ay31kw7>button{cursor:inherit}
23
+ ._1bsb8a2a{width:var(--local-dynamic-table-width)}
24
+ ._1bto1l2s{text-overflow:ellipsis}
25
+ ._1e0c1ule{display:block}
26
+ ._1fpyidpf>button:after{inset-block-end:0}
27
+ ._1hvvidpf>button:after, ._n56nidpf>button:before{width:0}
28
+ ._1q511b66{padding-block-start:var(--ds-space-050,4px)}
29
+ ._1reo15vq{overflow-x:hidden}
30
+ ._1s37ze3t:first-of-type{padding-inline-start:var(--ds-space-0,0)}
31
+ ._1yw3ze3t>button{padding-block-end:var(--ds-space-0,0)}
32
+ ._4b5mb3bt>button:after, ._hn3bb3bt>button:before{content:""}
33
+ ._58ej1kw7>button{color:inherit}
34
+ ._85i51b66{padding-block-end:var(--ds-space-050,4px)}
35
+ ._8607ze3t>button{padding-inline-end:var(--ds-space-0,0)}
36
+ ._a04fh2mm>button{position:relative}
37
+ ._bozgu2gc{padding-inline-start:var(--ds-space-100,8px)}
38
+ ._k48pmoej{font-weight:var(--ds-font-weight-bold,700)}
39
+ ._kqswh2mm{position:relative}
40
+ ._mdbq1kw7>button{font-size:inherit}
41
+ ._n2fdze3t>button{padding-block-start:var(--ds-space-0,0)}
42
+ ._no7mstnw>button:after, ._qh32stnw>button:before{position:absolute}
43
+ ._o5721q9c{white-space:nowrap}
44
+ ._qzvtu2gc>button:before{inset-block-end:var(--ds-space-100,8px)}
45
+ ._s7n4jp4b{vertical-align:top}
46
+ ._s7n4nkob{vertical-align:middle}
47
+ ._syaz12fi{color:var(--_17ckjys)}
48
+ ._szhwze3t>button{padding-inline-start:var(--ds-space-0,0)}
49
+ ._uupyze3t:last-child{padding-inline-end:var(--ds-space-0,0)}
50
+ ._vchhusvi{box-sizing:border-box}
51
+ ._wyc4idpf>button:after, ._1d4oidpf>button:before{height:0}
52
+ ._xv14glyw>button{-webkit-appearance:none;appearance:none}
53
+ ._y3gn1e5h{text-align:left}
54
+ ._y4tiu2gc{padding-inline-end:var(--ds-space-100,8px)}
55
+ ._1ygbuwsq:focus-visible{outline:var(--_jz8ahf)}
56
+ ._d0altlke:hover{cursor:pointer}
57
+ ._irr3bfnf:hover{background-color:var(--_6j4ewu)}
58
+ @media (forced-colors:active){._142s94yt>button:before{border-block-end:3px solid Highlight}._17x894yt>button:after{border-block-start:3px solid Highlight}._1g2wwc43>button:after, ._ze9fwc43>button:before{border-color:Canvas}._1lcgnqa1>button:after, ._at5qnqa1>button:before{border-style:solid}._o4d71l7b>button:after, ._npl51l7b>button:before{border-width:3px}._1rp11onz>button:before{border-block-end-color:CanvasText}._1iornqa1>button:before{border-block-end-style:solid}._oi051l7b>button:before{border-block-end-width:3px}._1ehx1onz>button:after{border-block-start-color:CanvasText}._19t8nqa1>button:after{border-block-start-style:solid}._1bog1l7b>button:after{border-block-start-width:3px}}
@@ -1,171 +1,55 @@
1
+ /* table-head.tsx generated by @compiled/babel-plugin v0.36.1 */
1
2
  "use strict";
2
3
 
3
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
5
+ var _typeof = require("@babel/runtime/helpers/typeof");
4
6
  Object.defineProperty(exports, "__esModule", {
5
7
  value: true
6
8
  });
7
9
  exports.HeadCell = exports.Head = void 0;
10
+ require("./table-head.compiled.css");
11
+ var _react = _interopRequireWildcard(require("react"));
12
+ var React = _react;
13
+ var _runtime = require("@compiled/react/runtime");
8
14
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
15
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
16
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
11
- var _react = require("react");
12
- var _react2 = require("@emotion/react");
13
17
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
14
18
  var _colors = require("@atlaskit/theme/colors");
15
19
  var _constants = require("../internal/constants");
16
- var _theme = require("../theme");
17
20
  var _constants2 = require("./constants");
18
21
  var _excluded = ["isRanking", "testId"],
19
22
  _excluded2 = ["width", "children", "isSortable", "sortOrder", "isFixedSize", "shouldTruncate", "onClick", "style", "testId"];
20
23
  /* eslint-disable @repo/internal/react/require-jsdoc */
21
- /**
22
- * @jsxRuntime classic
23
- * @jsx jsx
24
- */
25
24
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
25
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
26
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
26
27
  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; }
27
28
  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; }
28
29
  var CSS_VAR_TEXT_COLOR = '--local-dynamic-table-text-color';
29
- var rankingStyles = (0, _react2.css)({
30
- display: 'block'
31
- });
32
- var headStyles = (0, _react2.css)({
33
- borderBlockEnd: "none"
34
- });
30
+ var rankingStyles = null;
31
+ var headStyles = null;
32
+ var overflowTruncateStyles = null;
33
+ var truncationWidthStyles = null;
34
+ var fixedSizeTruncateStyles = null;
35
+ var cellStyles = null;
35
36
  var Head = exports.Head = function Head(_ref) {
36
37
  var isRanking = _ref.isRanking,
37
38
  testId = _ref.testId,
38
39
  props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
39
- return (0, _react2.jsx)("thead", (0, _extends2.default)({
40
- css: [headStyles, isRanking && rankingStyles],
40
+ return /*#__PURE__*/React.createElement("thead", (0, _extends2.default)({
41
41
  "data-testid": testId
42
42
  // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
43
- }, props));
43
+ }, props, {
44
+ className: (0, _runtime.ax)(["_179rglyw", isRanking && "_1e0c1ule"])
45
+ }));
44
46
  };
45
- var headCellBaseStyles = (0, _react2.css)({
46
- boxSizing: 'border-box',
47
- position: 'relative',
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
50
- borderBlockEnd: "2px solid ".concat(_theme.tableBorder.borderColor),
51
- color: "var(--ds-text-subtle, ".concat("var(".concat(CSS_VAR_TEXT_COLOR, ")"), ")"),
52
- font: "var(--ds-font-body-UNSAFE_small, normal 400 12px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)",
53
- fontWeight: "var(--ds-font-weight-bold, 700)",
54
- textAlign: 'left',
55
- verticalAlign: 'middle',
56
- '&:focus-visible': {
57
- outline: "solid 2px ".concat("var(--ds-border-focused, ".concat(_colors.B100, ")"))
58
- }
59
- });
60
- var headCellBaseStylesOld = (0, _react2.css)({
61
- boxSizing: 'border-box',
62
- position: 'relative',
63
- border: 'none',
64
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
65
- borderBlockEnd: "2px solid ".concat(_theme.tableBorder.borderColor),
66
- color: "var(--ds-text-subtle, ".concat("var(".concat(CSS_VAR_TEXT_COLOR, ")"), ")"),
67
- font: "var(--ds-font-body-UNSAFE_small, normal 400 12px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)",
68
- fontWeight: "var(--ds-font-weight-bold, 700)",
69
- textAlign: 'left',
70
- verticalAlign: 'top',
71
- '&:focus-visible': {
72
- outline: "solid 2px ".concat("var(--ds-border-focused, ".concat(_colors.B100, ")"))
73
- }
74
- });
75
- var onClickStyles = (0, _react2.css)({
76
- '&:hover': {
77
- backgroundColor: "var(--ds-background-neutral-hovered, ".concat(_colors.N30A, ")"),
78
- cursor: 'pointer'
79
- }
80
- });
81
- var baseStyles = (0, _react2.css)({
82
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
83
- '& > button': {
84
- padding: "var(--ds-space-0, 0)",
85
- position: 'relative',
86
- appearance: 'none',
87
- background: 'none',
88
- border: 'none',
89
- color: 'inherit',
90
- cursor: 'inherit',
91
- // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
92
- fontSize: 'inherit',
93
- // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
94
- fontWeight: 'inherit',
95
- '&::before, &::after': {
96
- display: 'block',
97
- width: 0,
98
- height: 0,
99
- position: 'absolute',
100
- border: '3px solid transparent',
101
- content: '""',
102
- insetInlineEnd: "var(--ds-space-negative-100, -8px)"
103
- },
104
- '&::before': {
105
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
106
- borderBlockEnd: "3px solid ".concat(_theme.arrow.defaultColor),
107
- insetBlockEnd: "var(--ds-space-100, 8px)"
108
- },
109
- '&::after': {
110
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
111
- borderBlockStart: "3px solid ".concat(_theme.arrow.defaultColor),
112
- insetBlockEnd: 0
113
- }
114
- },
115
- '@media (forced-colors: active)': {
116
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
117
- '& > button': {
118
- '&::before, &::after': {
119
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
120
- border: "3px solid ".concat(_theme.MSThemeColors.Background)
121
- },
122
- '&::before': {
123
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
124
- borderBlockEnd: "3px solid ".concat(_theme.MSThemeColors.Text)
125
- },
126
- '&::after': {
127
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
128
- borderBlockStart: "3px solid ".concat(_theme.MSThemeColors.Text)
129
- }
130
- }
131
- }
132
- });
133
- var ascendingStyles = (0, _react2.css)({
134
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
135
- '& > button': {
136
- '&::before': {
137
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
138
- borderBlockEnd: "3px solid ".concat(_theme.arrow.selectedColor)
139
- }
140
- },
141
- '@media (forced-colors: active)': {
142
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
143
- '& > button': {
144
- '&::before': {
145
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
146
- borderBlockEnd: "3px solid ".concat(_theme.MSThemeColors.SelectedBackground)
147
- }
148
- }
149
- }
150
- });
151
- var descendingStyles = (0, _react2.css)({
152
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
153
- '& > button': {
154
- '&::after': {
155
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
156
- borderBlockStart: "3px solid ".concat(_theme.arrow.selectedColor)
157
- }
158
- },
159
- '@media (forced-colors: active)': {
160
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
161
- '& > button': {
162
- '&::after': {
163
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
164
- borderBlockStart: "3px solid ".concat(_theme.MSThemeColors.SelectedBackground)
165
- }
166
- }
167
- }
168
- });
47
+ var headCellBaseStyles = null;
48
+ var headCellBaseStylesOld = null;
49
+ var onClickStyles = null;
50
+ var baseStyles = null;
51
+ var ascendingStyles = null;
52
+ var descendingStyles = null;
169
53
  var HeadCell = exports.HeadCell = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, ref) {
170
54
  var width = _ref2.width,
171
55
  children = _ref2.children,
@@ -179,7 +63,7 @@ var HeadCell = exports.HeadCell = /*#__PURE__*/(0, _react.forwardRef)(function (
179
63
  rest = (0, _objectWithoutProperties2.default)(_ref2, _excluded2);
180
64
  var mergedStyles = _objectSpread(_objectSpread(_objectSpread({}, style), width && (0, _constants2.getTruncationStyleVars)({
181
65
  width: width
182
- })), {}, (0, _defineProperty2.default)({}, CSS_VAR_TEXT_COLOR, _theme.head.textColor));
66
+ })), {}, (0, _defineProperty2.default)({}, CSS_VAR_TEXT_COLOR, "var(--ds-text-subtlest, ".concat(_colors.N300, ")")));
183
67
  var isASC = sortOrder === _constants.ASC;
184
68
  var isDESC = sortOrder === _constants.DESC;
185
69
  var getFormattedSortOrder = function getFormattedSortOrder() {
@@ -194,22 +78,23 @@ var HeadCell = exports.HeadCell = /*#__PURE__*/(0, _react.forwardRef)(function (
194
78
  // https://dequeuniversity.com/rules/axe/4.7/empty-table-header
195
79
  var Component = children ? 'th' : 'td';
196
80
  var isVisuallyRefreshed = (0, _platformFeatureFlags.fg)('platform-component-visual-refresh');
197
- return (0, _react2.jsx)(Component, (0, _extends2.default)({
81
+ return /*#__PURE__*/React.createElement(Component, (0, _extends2.default)({
198
82
  "aria-sort": getFormattedSortOrder()
199
83
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
200
84
  ,
201
- style: mergedStyles,
202
- css: [
203
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
204
- _constants2.cellStyles, isVisuallyRefreshed ? headCellBaseStyles : headCellBaseStylesOld, !isVisuallyRefreshed && onClick && onClickStyles,
205
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
206
- _constants2.truncationWidthStyles,
207
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
208
- isFixedSize && shouldTruncate && _constants2.fixedSizeTruncateStyles,
209
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
210
- isFixedSize && _constants2.overflowTruncateStyles, !isVisuallyRefreshed && isSortable && baseStyles, !isVisuallyRefreshed && isASC && ascendingStyles, !isVisuallyRefreshed && isDESC && descendingStyles],
85
+
211
86
  onClick: !isVisuallyRefreshed ? onClick : undefined,
212
87
  ref: ref,
213
88
  "data-testid": testId
214
- }, rest), children);
89
+ }, rest, {
90
+ className: (0, _runtime.ax)(["_izbqglyw _h7alglyw _85i51b66 _1q511b66 _y4tiu2gc _bozgu2gc _y3gn1e5h _1s37ze3t _uupyze3t", isVisuallyRefreshed ? "_11c8dcr7 _179rralu _mqm2glyw _vchhusvi _kqswh2mm _syaz12fi _k48pmoej _y3gn1e5h _s7n4nkob _1ygbuwsq" : "_11c8dcr7 _179rralu _mqm2glyw _t51zglyw _191wglyw _vchhusvi _kqswh2mm _syaz12fi _k48pmoej _y3gn1e5h _s7n4jp4b _1ygbuwsq", !isVisuallyRefreshed && onClick && "_irr3bfnf _d0altlke", "_1bsb8a2a", isFixedSize && shouldTruncate && "_1bto1l2s _o5721q9c", isFixedSize && "_1reo15vq _18m915vq", !isVisuallyRefreshed && isSortable && "_173zglyw _pw6dglyw _1xgk1j28 _1wfn1j28 _y9yonqa1 _997wnqa1 _sklb1l7b _1j091l7b _19w61ule _1w611ule _1hvvidpf _n56nidpf _wyc4idpf _1d4oidpf _no7mstnw _qh32stnw _4b5mb3bt _hn3bb3bt _14gsx0bf _cigmx0bf _c77k1f6e _qzvtu2gc _f4731f6e _1fpyidpf _a04fh2mm _xv14glyw _58ej1kw7 _1ay31kw7 _mdbq1kw7 _10pp1kw7 _1yw3ze3t _n2fdze3t _8607ze3t _szhwze3t _1g2wwc43 _ze9fwc43 _1lcgnqa1 _at5qnqa1 _o4d71l7b _npl51l7b _1rp11onz _1iornqa1 _oi051l7b _1ehx1onz _19t8nqa1 _1bog1l7b", !isVisuallyRefreshed && isASC && "_c77k2wk4 _142s94yt", !isVisuallyRefreshed && isDESC && "_f4732wk4 _17x894yt"]),
91
+ style: _objectSpread(_objectSpread({}, mergedStyles), {}, {
92
+ "--_k02y3n": (0, _runtime.ix)("2px solid ".concat("var(--ds-border, ".concat(_colors.N40, ")"))),
93
+ "--_17ckjys": (0, _runtime.ix)("var(--ds-text-subtle, ".concat("var(".concat(CSS_VAR_TEXT_COLOR, ")"), ")")),
94
+ "--_jz8ahf": (0, _runtime.ix)("solid 2px ".concat("var(--ds-border-focused, ".concat(_colors.B100, ")"))),
95
+ "--_6j4ewu": (0, _runtime.ix)("var(--ds-background-neutral-hovered, ".concat(_colors.N30A, ")")),
96
+ "--_1rdacuj": (0, _runtime.ix)("3px solid ".concat("var(--ds-icon-disabled, ".concat(_colors.N40, ")"))),
97
+ "--_1qca9zt": (0, _runtime.ix)("3px solid ".concat("var(--ds-icon-subtle, ".concat(_colors.N300, ")")))
98
+ })
99
+ }), children);
215
100
  });
@@ -0,0 +1,6 @@
1
+
2
+ ._bfhkqtfy{background-color:var(--ds-background-neutral-subtle,transparent)}
3
+ ._bfhktkjs{background-color:var(--ds-background-selected,var(--local-dynamic-table-highlighted-bg))}
4
+ ._1ygb1852:focus-visible{outline:var(--_akp1ox)}._1ah312gs:focus-visible{outline-offset:-2px}
5
+ ._irr31ae3:hover{background-color:var(--ds-background-selected-hovered,var(--local-dynamic-table-hover-highlighted-bg))}
6
+ ._irr3s8ts:hover{background-color:var(--ds-background-neutral-subtle-hovered,var(--local-dynamic-table-hover-bg))}
@@ -1,43 +1,27 @@
1
+ /* table-row.tsx generated by @compiled/babel-plugin v0.36.1 */
1
2
  "use strict";
2
3
 
3
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
5
+ var _typeof = require("@babel/runtime/helpers/typeof");
4
6
  Object.defineProperty(exports, "__esModule", {
5
7
  value: true
6
8
  });
7
9
  exports.TableBodyRow = void 0;
10
+ require("./table-row.compiled.css");
11
+ var _react = _interopRequireWildcard(require("react"));
12
+ var React = _react;
13
+ var _runtime = require("@compiled/react/runtime");
8
14
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
15
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
16
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
10
- var _react = require("react");
11
- var _react2 = require("@emotion/react");
12
- var _dynamicTable = require("./dynamic-table");
13
17
  var _excluded = ["isHighlighted", "children", "style", "testId"];
14
- /**
15
- * @jsxRuntime classic
16
- * @jsx jsx
17
- */
18
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
19
- var rowStyles = (0, _react2.css)({
20
- backgroundColor: "var(--ds-background-neutral-subtle, transparent)",
21
- '&:focus-visible': {
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, ")"), ")")),
24
- outlineOffset: "-2px"
25
- }
26
- });
27
- var rowBackgroundStyles = (0, _react2.css)({
28
- '&:hover': {
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, ")"), ")")
31
- }
32
- });
33
- var rowHighlightedBackgroundStyles = (0, _react2.css)({
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, ")"), ")"),
36
- '&:hover': {
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, ")"), ")")
39
- }
40
- });
18
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
19
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
20
+ 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; }
21
+ 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; }
22
+ var rowStyles = null;
23
+ var rowBackgroundStyles = null;
24
+ var rowHighlightedBackgroundStyles = null;
41
25
 
42
26
  // eslint-disable-next-line @repo/internal/react/require-jsdoc
43
27
  var TableBodyRow = exports.TableBodyRow = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
@@ -46,12 +30,12 @@ var TableBodyRow = exports.TableBodyRow = /*#__PURE__*/(0, _react.forwardRef)(fu
46
30
  style = _ref.style,
47
31
  testId = _ref.testId,
48
32
  rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
49
- return (0, _react2.jsx)("tr", (0, _extends2.default)({
50
- // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
51
- style: style,
52
- css: [rowStyles, isHighlighted ? rowHighlightedBackgroundStyles : rowBackgroundStyles]
53
- }, rest, {
33
+ return /*#__PURE__*/React.createElement("tr", (0, _extends2.default)({}, rest, {
54
34
  ref: ref,
55
- "data-testid": testId
35
+ "data-testid": testId,
36
+ className: (0, _runtime.ax)(["_bfhkqtfy _1ygb1852 _1ah312gs", isHighlighted ? "_bfhktkjs _irr31ae3" : "_irr3s8ts"]),
37
+ style: _objectSpread(_objectSpread({}, style), {}, {
38
+ "--_akp1ox": (0, _runtime.ix)("2px solid ".concat("var(--ds-border-focused, var(--local-dynamic-table-hover-bg))"))
39
+ })
56
40
  }), children);
57
41
  });
package/dist/cjs/theme.js CHANGED
@@ -1,32 +1,12 @@
1
1
  "use strict";
2
2
 
3
- var _typeof = require("@babel/runtime/helpers/typeof");
4
3
  Object.defineProperty(exports, "__esModule", {
5
4
  value: true
6
5
  });
7
- exports.tableBorder = exports.row = exports.head = exports.arrow = exports.MSThemeColors = void 0;
8
- var colors = _interopRequireWildcard(require("@atlaskit/theme/colors"));
9
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
10
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
6
+ exports.MSThemeColors = void 0;
11
7
  var MSThemeColors = exports.MSThemeColors = {
12
8
  Background: 'Canvas',
13
9
  Text: 'CanvasText',
14
10
  SelectedBackground: 'Highlight',
15
11
  SelectedText: 'HighlightText'
16
- };
17
- var arrow = exports.arrow = {
18
- defaultColor: "var(--ds-icon-disabled, ".concat(colors.N40, ")"),
19
- selectedColor: "var(--ds-icon-subtle, ".concat(colors.N300, ")")
20
- };
21
- var row = exports.row = {
22
- focusOutline: "var(--ds-border-focused, ".concat(colors.B100, ")"),
23
- highlightedBackground: "var(--ds-background-selected, ".concat(colors.B50, ")"),
24
- hoverBackground: "var(--ds-background-neutral-subtle-hovered, ".concat(colors.N10, ")"),
25
- hoverHighlightedBackground: "var(--ds-background-selected-hovered, ".concat(colors.B75, ")")
26
- };
27
- var head = exports.head = {
28
- textColor: "var(--ds-text-subtlest, ".concat(colors.N300, ")")
29
- };
30
- var tableBorder = exports.tableBorder = {
31
- borderColor: "var(--ds-border, ".concat(colors.N40, ")")
32
12
  };
@@ -61,14 +61,14 @@ const DynamicTable = ({
61
61
  action: 'sorted',
62
62
  componentName: 'dynamicTable',
63
63
  packageName: "@atlaskit/dynamic-table",
64
- packageVersion: "18.0.1"
64
+ packageVersion: "18.0.2"
65
65
  });
66
66
  const onRankEnd = usePlatformLeafEventHandler({
67
67
  fn: providedOnRankEnd,
68
68
  action: 'ranked',
69
69
  componentName: 'dynamicTable',
70
70
  packageName: "@atlaskit/dynamic-table",
71
- packageVersion: "18.0.1"
71
+ packageVersion: "18.0.2"
72
72
  });
73
73
  useEffect(() => {
74
74
  validateSortKey(sortKey, head);
@@ -1,38 +1,6 @@
1
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
2
- import { css } from '@emotion/react';
3
1
  const CSS_VAR_WIDTH = '--local-dynamic-table-width';
4
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
5
- export const truncationWidthStyles = css({
6
- width: `var(${CSS_VAR_WIDTH})`
7
- });
8
-
9
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
10
- export const fixedSizeTruncateStyles = css({
11
- textOverflow: 'ellipsis',
12
- whiteSpace: 'nowrap'
13
- });
14
-
15
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
16
- export const overflowTruncateStyles = css({
17
- overflow: 'hidden'
18
- });
19
2
  export const getTruncationStyleVars = ({
20
3
  width
21
4
  }) => typeof width !== 'undefined' ? {
22
5
  [CSS_VAR_WIDTH]: `${width}%`
23
- } : undefined;
24
-
25
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
26
- export const cellStyles = css({
27
- padding: `${"var(--ds-space-050, 4px)"} ${"var(--ds-space-100, 8px)"}`,
28
- border: 'none',
29
- textAlign: 'left',
30
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
31
- '&:first-of-type': {
32
- paddingInlineStart: "var(--ds-space-0, 0px)"
33
- },
34
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
35
- '&:last-child': {
36
- paddingInlineEnd: "var(--ds-space-0, 0px)"
37
- }
38
- });
6
+ } : undefined;
@@ -0,0 +1,11 @@
1
+ ._11c8lodh{font:var(--ds-font-heading-medium,normal 500 20px/24px ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
2
+ ._179r1on0{border-block-end:2px solid var(--ds-border,#dfe1e6)}
3
+ ._1bah1h6o{justify-content:center}
4
+ ._1bsb1osq{width:100%}
5
+ ._1e0c1txw{display:flex}
6
+ ._1kqm1n9t{table-layout:fixed}
7
+ ._1pfh1ejb{margin-block-start:var(--ds-space-300,24px)}
8
+ ._6rthu2gc{margin-block-end:var(--ds-space-100,8px)}
9
+ ._btyzidpf{border-spacing:0}
10
+ ._m6k41e03{will-change:transform}
11
+ ._yq5hus1c{border-collapse:separate}