@atlaskit/table 0.6.6 → 0.6.7

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,13 @@
1
1
  # @atlaskit/table
2
2
 
3
+ ## 0.6.7
4
+
5
+ ### Patch Changes
6
+
7
+ - [#119140](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/119140)
8
+ [`dbda45aec4c30`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/dbda45aec4c30) -
9
+ Migrated usages of deprecated button `UNSAFE` icon size props to new render prop.
10
+
3
11
  ## 0.6.6
4
12
 
5
13
  ### Patch Changes
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.default = void 0;
8
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
8
9
  var _react = require("react");
9
10
  var _react2 = require("@emotion/react");
10
11
  var _new = require("@atlaskit/button/new");
@@ -32,14 +33,18 @@ var ExpandableCell = /*#__PURE__*/(0, _react.memo)(function () {
32
33
  var handleClick = (0, _react.useCallback)(function () {
33
34
  toggleExpanded();
34
35
  }, [toggleExpanded]);
36
+ var Icon = isExpanded ? _chevronUp.default : _chevronDown.default;
35
37
  return (0, _react2.jsx)(_expandableCell.ExpandableCell, {
36
38
  as: "td"
37
39
  }, (0, _react2.jsx)(_new.IconButton, {
38
40
  spacing: "compact",
39
41
  appearance: "subtle",
40
- icon: isExpanded ? _chevronUp.default : _chevronDown.default,
42
+ icon: function icon(iconProps) {
43
+ return (0, _react2.jsx)(Icon, (0, _extends2.default)({}, iconProps, {
44
+ size: "small"
45
+ }));
46
+ },
41
47
  label: "Expand row",
42
- UNSAFE_size: "small",
43
48
  onClick: handleClick,
44
49
  "aria-pressed": isExpanded
45
50
  }));
@@ -1,3 +1,4 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
1
2
  /**
2
3
  * @jsxRuntime classic
3
4
  */
@@ -26,14 +27,16 @@ const ExpandableCell = /*#__PURE__*/memo(() => {
26
27
  const handleClick = useCallback(() => {
27
28
  toggleExpanded();
28
29
  }, [toggleExpanded]);
30
+ const Icon = isExpanded ? ChevronUpIcon : ChevronDownIcon;
29
31
  return jsx(ExpandableCellPrimitive, {
30
32
  as: "td"
31
33
  }, jsx(IconButton, {
32
34
  spacing: "compact",
33
35
  appearance: "subtle",
34
- icon: isExpanded ? ChevronUpIcon : ChevronDownIcon,
36
+ icon: iconProps => jsx(Icon, _extends({}, iconProps, {
37
+ size: "small"
38
+ })),
35
39
  label: "Expand row",
36
- UNSAFE_size: "small",
37
40
  onClick: handleClick,
38
41
  "aria-pressed": isExpanded
39
42
  }));
@@ -1,3 +1,4 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
1
2
  /**
2
3
  * @jsxRuntime classic
3
4
  */
@@ -25,14 +26,18 @@ var ExpandableCell = /*#__PURE__*/memo(function () {
25
26
  var handleClick = useCallback(function () {
26
27
  toggleExpanded();
27
28
  }, [toggleExpanded]);
29
+ var Icon = isExpanded ? ChevronUpIcon : ChevronDownIcon;
28
30
  return jsx(ExpandableCellPrimitive, {
29
31
  as: "td"
30
32
  }, jsx(IconButton, {
31
33
  spacing: "compact",
32
34
  appearance: "subtle",
33
- icon: isExpanded ? ChevronUpIcon : ChevronDownIcon,
35
+ icon: function icon(iconProps) {
36
+ return jsx(Icon, _extends({}, iconProps, {
37
+ size: "small"
38
+ }));
39
+ },
34
40
  label: "Expand row",
35
- UNSAFE_size: "small",
36
41
  onClick: handleClick,
37
42
  "aria-pressed": isExpanded
38
43
  }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/table",
3
- "version": "0.6.6",
3
+ "version": "0.6.7",
4
4
  "description": "A table is used to display data.",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",