@atlaskit/table 0.4.21 → 0.4.23

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 CHANGED
@@ -1,5 +1,18 @@
1
1
  # @atlaskit/table
2
2
 
3
+ ## 0.4.23
4
+
5
+ ### Patch Changes
6
+
7
+ - [#77488](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/77488) [`27e6fdab53dc`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/27e6fdab53dc) - Cells now use logical property styles.
8
+ - Updated dependencies
9
+
10
+ ## 0.4.22
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies
15
+
3
16
  ## 0.4.21
4
17
 
5
18
  ### Patch Changes
@@ -19,10 +19,10 @@ var baseResetStyles = (0, _primitives.xcss)({
19
19
  display: 'table-cell',
20
20
  verticalAlign: 'middle',
21
21
  ':first-of-type': {
22
- paddingLeft: "var(--ds-space-100, 8px)"
22
+ paddingInlineStart: 'space.100'
23
23
  },
24
24
  ':last-of-type': {
25
- paddingRight: "var(--ds-space-100, 8px)"
25
+ paddingInlineEnd: 'space.100'
26
26
  }
27
27
  });
28
28
  var alignMapStyles = {
@@ -60,8 +60,12 @@ var BaseCell = exports.BaseCell = /*#__PURE__*/(0, _react.forwardRef)(function (
60
60
  xcss = _ref.xcss,
61
61
  sortDirection = _ref.sortDirection,
62
62
  colSpan = _ref.colSpan;
63
+ // We're type coercing this as Compiled styles in an array isn't supported by the types
64
+ // But the runtime accepts it none-the-wiser. We can remove this entire block and replace
65
+ // it with cx(defaultStyles, focusRingStyles, xcssStyles) when we've moved away from Emotion.
66
+ var styles = Array.isArray(xcss) ? xcss : [xcss];
63
67
  return /*#__PURE__*/_react.default.createElement(_primitives.Box, {
64
- xcss: [baseResetStyles, alignMapStyles[align]].concat((0, _toConsumableArray2.default)(Array.isArray(xcss) ? xcss : [xcss])),
68
+ xcss: [baseResetStyles, alignMapStyles[align]].concat((0, _toConsumableArray2.default)(styles)),
65
69
  ref: ref,
66
70
  scope: scope,
67
71
  backgroundColor: backgroundColor,
@@ -9,10 +9,10 @@ const baseResetStyles = xcss({
9
9
  display: 'table-cell',
10
10
  verticalAlign: 'middle',
11
11
  ':first-of-type': {
12
- paddingLeft: "var(--ds-space-100, 8px)"
12
+ paddingInlineStart: 'space.100'
13
13
  },
14
14
  ':last-of-type': {
15
- paddingRight: "var(--ds-space-100, 8px)"
15
+ paddingInlineEnd: 'space.100'
16
16
  }
17
17
  });
18
18
  const alignMapStyles = {
@@ -47,18 +47,24 @@ export const BaseCell = /*#__PURE__*/forwardRef(({
47
47
  xcss,
48
48
  sortDirection,
49
49
  colSpan
50
- }, ref) => /*#__PURE__*/React.createElement(Box, {
51
- xcss: [baseResetStyles, alignMapStyles[align], ...(Array.isArray(xcss) ? xcss : [xcss])],
52
- ref: ref,
53
- scope: scope,
54
- backgroundColor: backgroundColor,
55
- paddingBlock: paddingBlock,
56
- paddingInline: paddingInline,
57
- as: as,
58
- testId: testId,
59
- style: width ? {
60
- width
61
- } : undefined,
62
- "aria-sort": sortDirection,
63
- colSpan: colSpan
64
- }, children));
50
+ }, ref) => {
51
+ // We're type coercing this as Compiled styles in an array isn't supported by the types
52
+ // But the runtime accepts it none-the-wiser. We can remove this entire block and replace
53
+ // it with cx(defaultStyles, focusRingStyles, xcssStyles) when we've moved away from Emotion.
54
+ const styles = Array.isArray(xcss) ? xcss : [xcss];
55
+ return /*#__PURE__*/React.createElement(Box, {
56
+ xcss: [baseResetStyles, alignMapStyles[align], ...styles],
57
+ ref: ref,
58
+ scope: scope,
59
+ backgroundColor: backgroundColor,
60
+ paddingBlock: paddingBlock,
61
+ paddingInline: paddingInline,
62
+ as: as,
63
+ testId: testId,
64
+ style: width ? {
65
+ width
66
+ } : undefined,
67
+ "aria-sort": sortDirection,
68
+ colSpan: colSpan
69
+ }, children);
70
+ });
@@ -10,10 +10,10 @@ var baseResetStyles = xcss({
10
10
  display: 'table-cell',
11
11
  verticalAlign: 'middle',
12
12
  ':first-of-type': {
13
- paddingLeft: "var(--ds-space-100, 8px)"
13
+ paddingInlineStart: 'space.100'
14
14
  },
15
15
  ':last-of-type': {
16
- paddingRight: "var(--ds-space-100, 8px)"
16
+ paddingInlineEnd: 'space.100'
17
17
  }
18
18
  });
19
19
  var alignMapStyles = {
@@ -51,8 +51,12 @@ export var BaseCell = /*#__PURE__*/forwardRef(function (_ref, ref) {
51
51
  xcss = _ref.xcss,
52
52
  sortDirection = _ref.sortDirection,
53
53
  colSpan = _ref.colSpan;
54
+ // We're type coercing this as Compiled styles in an array isn't supported by the types
55
+ // But the runtime accepts it none-the-wiser. We can remove this entire block and replace
56
+ // it with cx(defaultStyles, focusRingStyles, xcssStyles) when we've moved away from Emotion.
57
+ var styles = Array.isArray(xcss) ? xcss : [xcss];
54
58
  return /*#__PURE__*/React.createElement(Box, {
55
- xcss: [baseResetStyles, alignMapStyles[align]].concat(_toConsumableArray(Array.isArray(xcss) ? xcss : [xcss])),
59
+ xcss: [baseResetStyles, alignMapStyles[align]].concat(_toConsumableArray(styles)),
56
60
  ref: ref,
57
61
  scope: scope,
58
62
  backgroundColor: backgroundColor,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/table",
3
- "version": "0.4.21",
3
+ "version": "0.4.23",
4
4
  "description": "A table is used to display data.",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -40,12 +40,12 @@
40
40
  "./primitives": "./src/ui/index.tsx"
41
41
  },
42
42
  "dependencies": {
43
- "@atlaskit/button": "^17.5.0",
43
+ "@atlaskit/button": "^17.6.0",
44
44
  "@atlaskit/checkbox": "^13.0.0",
45
45
  "@atlaskit/ds-lib": "^2.2.0",
46
46
  "@atlaskit/focus-ring": "^1.3.0",
47
47
  "@atlaskit/icon": "^22.1.0",
48
- "@atlaskit/primitives": "^2.1.0",
48
+ "@atlaskit/primitives": "^3.2.0",
49
49
  "@atlaskit/tokens": "^1.38.0",
50
50
  "@atlaskit/tooltip": "^18.1.0",
51
51
  "@atlaskit/visually-hidden": "^1.2.0",