@atlaskit/table 0.4.18 → 0.4.20

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,17 @@
1
1
  # @atlaskit/table
2
2
 
3
+ ## 0.4.20
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 0.4.19
10
+
11
+ ### Patch Changes
12
+
13
+ - [#65875](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/65875) [`98e49fd3f04d`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/98e49fd3f04d) - [ux] Updated buttons in table to consume new buttons.
14
+
3
15
  ## 0.4.18
4
16
 
5
17
  ### Patch Changes
@@ -8,7 +8,9 @@ Object.defineProperty(exports, "__esModule", {
8
8
  exports.default = void 0;
9
9
  var _react = require("react");
10
10
  var _react2 = require("@emotion/react");
11
- var _button = _interopRequireDefault(require("@atlaskit/button"));
11
+ var _new = require("@atlaskit/button/new");
12
+ var _chevronDown = _interopRequireDefault(require("@atlaskit/icon/glyph/hipchat/chevron-down"));
13
+ var _chevronUp = _interopRequireDefault(require("@atlaskit/icon/glyph/hipchat/chevron-up"));
12
14
  var _useExpand2 = _interopRequireDefault(require("./hooks/use-expand"));
13
15
  var Primitives = _interopRequireWildcard(require("./ui"));
14
16
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
@@ -30,15 +32,15 @@ var ExpandableCell = /*#__PURE__*/(0, _react.memo)(function () {
30
32
  }, [toggleExpanded]);
31
33
  return (0, _react2.jsx)(Primitives.ExpandableCell, {
32
34
  as: "td"
33
- }, (0, _react2.jsx)(_button.default, {
35
+ }, (0, _react2.jsx)(_new.IconButton, {
34
36
  spacing: "compact",
35
37
  appearance: "subtle",
36
- iconAfter: (0, _react2.jsx)(Primitives.ExpandIcon, {
37
- isExpanded: isExpanded
38
- }),
38
+ icon: isExpanded ? _chevronUp.default : _chevronDown.default,
39
+ label: "Expand row",
40
+ "aria-label": "Expand row",
41
+ UNSAFE_size: "small",
39
42
  onClick: handleClick,
40
- "aria-pressed": isExpanded,
41
- "aria-label": "Expand row"
43
+ "aria-pressed": isExpanded
42
44
  }));
43
45
  });
44
46
  var _default = exports.default = ExpandableCell;
@@ -84,7 +84,9 @@ var SortableColumn = function SortableColumn(_ref) {
84
84
  name: name
85
85
  })
86
86
  }, tooltipProps, {
87
- onClick: updateSortState,
87
+ onClick: updateSortState
88
+ // TODO: (from codemod) Buttons with "css" or "style" prop can't be migrated for now. Please wait for the support of xcss prop.
89
+ ,
88
90
  css: overrideStyles
89
91
  // TODO: i18n support for this attr
90
92
  ,
@@ -1,7 +1,9 @@
1
1
  /** @jsx jsx */
2
2
  import { memo, useCallback } from 'react';
3
3
  import { jsx } from '@emotion/react';
4
- import Button from '@atlaskit/button';
4
+ import { IconButton } from '@atlaskit/button/new';
5
+ import ChevronDownIcon from '@atlaskit/icon/glyph/hipchat/chevron-down';
6
+ import ChevronUpIcon from '@atlaskit/icon/glyph/hipchat/chevron-up';
5
7
  import useExpand from './hooks/use-expand';
6
8
  import * as Primitives from './ui';
7
9
 
@@ -21,15 +23,15 @@ const ExpandableCell = /*#__PURE__*/memo(() => {
21
23
  }, [toggleExpanded]);
22
24
  return jsx(Primitives.ExpandableCell, {
23
25
  as: "td"
24
- }, jsx(Button, {
26
+ }, jsx(IconButton, {
25
27
  spacing: "compact",
26
28
  appearance: "subtle",
27
- iconAfter: jsx(Primitives.ExpandIcon, {
28
- isExpanded: isExpanded
29
- }),
29
+ icon: isExpanded ? ChevronUpIcon : ChevronDownIcon,
30
+ label: "Expand row",
31
+ "aria-label": "Expand row",
32
+ UNSAFE_size: "small",
30
33
  onClick: handleClick,
31
- "aria-pressed": isExpanded,
32
- "aria-label": "Expand row"
34
+ "aria-pressed": isExpanded
33
35
  }));
34
36
  });
35
37
  export default ExpandableCell;
@@ -74,7 +74,9 @@ const SortableColumn = ({
74
74
  name: name
75
75
  })
76
76
  }, tooltipProps, {
77
- onClick: updateSortState,
77
+ onClick: updateSortState
78
+ // TODO: (from codemod) Buttons with "css" or "style" prop can't be migrated for now. Please wait for the support of xcss prop.
79
+ ,
78
80
  css: overrideStyles
79
81
  // TODO: i18n support for this attr
80
82
  ,
@@ -1,7 +1,9 @@
1
1
  /** @jsx jsx */
2
2
  import { memo, useCallback } from 'react';
3
3
  import { jsx } from '@emotion/react';
4
- import Button from '@atlaskit/button';
4
+ import { IconButton } from '@atlaskit/button/new';
5
+ import ChevronDownIcon from '@atlaskit/icon/glyph/hipchat/chevron-down';
6
+ import ChevronUpIcon from '@atlaskit/icon/glyph/hipchat/chevron-up';
5
7
  import useExpand from './hooks/use-expand';
6
8
  import * as Primitives from './ui';
7
9
 
@@ -20,15 +22,15 @@ var ExpandableCell = /*#__PURE__*/memo(function () {
20
22
  }, [toggleExpanded]);
21
23
  return jsx(Primitives.ExpandableCell, {
22
24
  as: "td"
23
- }, jsx(Button, {
25
+ }, jsx(IconButton, {
24
26
  spacing: "compact",
25
27
  appearance: "subtle",
26
- iconAfter: jsx(Primitives.ExpandIcon, {
27
- isExpanded: isExpanded
28
- }),
28
+ icon: isExpanded ? ChevronUpIcon : ChevronDownIcon,
29
+ label: "Expand row",
30
+ "aria-label": "Expand row",
31
+ UNSAFE_size: "small",
29
32
  onClick: handleClick,
30
- "aria-pressed": isExpanded,
31
- "aria-label": "Expand row"
33
+ "aria-pressed": isExpanded
32
34
  }));
33
35
  });
34
36
  export default ExpandableCell;
@@ -77,7 +77,9 @@ var SortableColumn = function SortableColumn(_ref) {
77
77
  name: name
78
78
  })
79
79
  }, tooltipProps, {
80
- onClick: updateSortState,
80
+ onClick: updateSortState
81
+ // TODO: (from codemod) Buttons with "css" or "style" prop can't be migrated for now. Please wait for the support of xcss prop.
82
+ ,
81
83
  css: overrideStyles
82
84
  // TODO: i18n support for this attr
83
85
  ,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/table",
3
- "version": "0.4.18",
3
+ "version": "0.4.20",
4
4
  "description": "A table is used to display data.",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -40,14 +40,14 @@
40
40
  "./primitives": "./src/ui/index.tsx"
41
41
  },
42
42
  "dependencies": {
43
- "@atlaskit/button": "^17.0.0",
43
+ "@atlaskit/button": "^17.2.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.0.0",
48
- "@atlaskit/primitives": "^1.15.0",
49
- "@atlaskit/tokens": "^1.30.0",
50
- "@atlaskit/tooltip": "^18.0.0",
48
+ "@atlaskit/primitives": "^2.0.0",
49
+ "@atlaskit/tokens": "^1.35.0",
50
+ "@atlaskit/tooltip": "^18.1.0",
51
51
  "@atlaskit/visually-hidden": "^1.2.0",
52
52
  "@babel/runtime": "^7.0.0",
53
53
  "@emotion/react": "^11.7.1",