@atlaskit/table 0.7.2 → 0.8.1

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,19 @@
1
1
  # @atlaskit/table
2
2
 
3
+ ## 0.8.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 0.8.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [#139165](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/139165)
14
+ [`c140497da3215`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/c140497da3215) -
15
+ [ux] Enable new icons behind a feature flag.
16
+
3
17
  ## 0.7.2
4
18
 
5
19
  ### Patch Changes
@@ -9,8 +9,8 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
9
9
  var _react = require("react");
10
10
  var _react2 = require("@emotion/react");
11
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
+ var _chevronDownHipchatChevronDown = _interopRequireDefault(require("@atlaskit/icon/utility/migration/chevron-down--hipchat-chevron-down"));
13
+ var _chevronUpHipchatChevronUp = _interopRequireDefault(require("@atlaskit/icon/utility/migration/chevron-up--hipchat-chevron-up"));
14
14
  var _useExpand2 = _interopRequireDefault(require("./hooks/use-expand"));
15
15
  var _expandableCell = require("./ui/expandable-cell");
16
16
  /**
@@ -33,7 +33,7 @@ var ExpandableCell = /*#__PURE__*/(0, _react.memo)(function () {
33
33
  var handleClick = (0, _react.useCallback)(function () {
34
34
  toggleExpanded();
35
35
  }, [toggleExpanded]);
36
- var Icon = isExpanded ? _chevronUp.default : _chevronDown.default;
36
+ var Icon = isExpanded ? _chevronUpHipchatChevronUp.default : _chevronDownHipchatChevronDown.default;
37
37
  return (0, _react2.jsx)(_expandableCell.ExpandableCell, {
38
38
  as: "td"
39
39
  }, (0, _react2.jsx)(_new.IconButton, {
@@ -41,7 +41,7 @@ var ExpandableCell = /*#__PURE__*/(0, _react.memo)(function () {
41
41
  appearance: "subtle",
42
42
  icon: function icon(iconProps) {
43
43
  return (0, _react2.jsx)(Icon, (0, _extends2.default)({}, iconProps, {
44
- size: "small"
44
+ LEGACY_size: "small"
45
45
  }));
46
46
  },
47
47
  label: "Expand row",
@@ -8,7 +8,7 @@ exports.useSelection = exports.default = void 0;
8
8
  var _react = _interopRequireWildcard(require("react"));
9
9
  var _useSelectable = _interopRequireWildcard(require("./use-selectable"));
10
10
  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); }
11
- 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 && Object.prototype.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; }
11
+ 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; }
12
12
  var SelectionContext = /*#__PURE__*/(0, _react.createContext)([_useSelectable.defaultSelectableState, {}]);
13
13
 
14
14
  /**
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.default = exports.ExpandContentContextProvider = void 0;
8
8
  var _react = _interopRequireWildcard(require("react"));
9
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 && Object.prototype.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; }
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; }
11
11
  var ExpandContentContext = /*#__PURE__*/(0, _react.createContext)({
12
12
  isExpandableContent: false
13
13
  });
@@ -10,7 +10,7 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
10
10
  var _react = _interopRequireWildcard(require("react"));
11
11
  var _noop = _interopRequireDefault(require("@atlaskit/ds-lib/noop"));
12
12
  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); }
13
- 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 && Object.prototype.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; }
13
+ 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; }
14
14
  var ExpandContext = /*#__PURE__*/(0, _react.createContext)({
15
15
  isExpanded: false,
16
16
  toggleExpanded: _noop.default
@@ -42,14 +42,14 @@ function reducer(_ref, action) {
42
42
  case 'toggle_selection':
43
43
  {
44
44
  var _action$value = action.value,
45
- _id = _action$value.id,
46
- _shiftHeld = _action$value.shiftHeld;
45
+ id = _action$value.id,
46
+ shiftHeld = _action$value.shiftHeld;
47
47
  var updated = checked.slice();
48
48
  var newSelectionStart = selectionStart;
49
49
  var newPreviousSelection = previousSelection.slice();
50
- if (_shiftHeld) {
50
+ if (shiftHeld) {
51
51
  if (checked.length > 0) {
52
- var newIds = arrayFromRange(selectionStart, _id); // create an array of the new ids
52
+ var newIds = arrayFromRange(selectionStart, id); // create an array of the new ids
53
53
 
54
54
  // Uncheck ids from the previous selection.
55
55
  // This is done to maintain consistency with Shift-select behaviour elsewhere (e.g. macOS)
@@ -64,21 +64,21 @@ function reducer(_ref, action) {
64
64
  newPreviousSelection = newIds; // Maintain an array of the previous selection to allow for consistent Shift-select behaviour
65
65
  }
66
66
  } else {
67
- var checkedIndex = checked.indexOf(_id); // is index already checked
67
+ var checkedIndex = checked.indexOf(id); // is index already checked
68
68
 
69
69
  if (checkedIndex !== -1) {
70
70
  updated.splice(checkedIndex, 1); // if index is already checked, uncheck
71
71
  } else {
72
- updated.push(_id); // if index is not checked, check
72
+ updated.push(id); // if index is not checked, check
73
73
  }
74
- newSelectionStart = _id; // Reset selection start id to this non-shift-selected id
74
+ newSelectionStart = id; // Reset selection start id to this non-shift-selected id
75
75
  newPreviousSelection = []; // Reset previous selection as it is no longer relevant once a new non-shift-selected id is added
76
76
  }
77
77
  var _anyChecked = updated.length > 0;
78
78
  return {
79
79
  checked: updated,
80
80
  allChecked: updated.length === maxChecked,
81
- anyChecked: _anyChecked || Boolean(updated[_id]),
81
+ anyChecked: _anyChecked || Boolean(updated[id]),
82
82
  maxChecked: maxChecked,
83
83
  selectionStart: newSelectionStart,
84
84
  previousSelection: newPreviousSelection
@@ -95,10 +95,10 @@ function reducer(_ref, action) {
95
95
  };
96
96
  case 'set_max':
97
97
  {
98
- var _max = action.value;
98
+ var max = action.value;
99
99
  return {
100
- maxChecked: _max,
101
- allChecked: checked.length === _max,
100
+ maxChecked: max,
101
+ allChecked: checked.length === max,
102
102
  anyChecked: anyChecked,
103
103
  checked: checked,
104
104
  selectionStart: selectionStart,
@@ -10,7 +10,7 @@ exports.useTable = void 0;
10
10
  var _react = _interopRequireWildcard(require("react"));
11
11
  var _noop = _interopRequireDefault(require("@atlaskit/ds-lib/noop"));
12
12
  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); }
13
- 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 && Object.prototype.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; }
13
+ 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; }
14
14
  function generateContext() {
15
15
  return /*#__PURE__*/(0, _react.createContext)({
16
16
  isSelectable: false,
@@ -10,7 +10,7 @@ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers
10
10
  var _react = _interopRequireWildcard(require("react"));
11
11
  var _primitives = require("@atlaskit/primitives");
12
12
  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); }
13
- 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 && Object.prototype.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; }
13
+ 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; }
14
14
  /**
15
15
  * https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-sort
16
16
  */
@@ -11,7 +11,7 @@ var overlayStyles = (0, _primitives.xcss)({
11
11
  display: 'flex',
12
12
  position: 'absolute',
13
13
  inset: 'space.0',
14
- left: 'space.400'
14
+ insetInlineStart: 'space.400'
15
15
  });
16
16
 
17
17
  /**
@@ -7,8 +7,8 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.ExpandIcon = void 0;
8
8
  var _react = require("react");
9
9
  var _react2 = require("@emotion/react");
10
- var _chevronDown = _interopRequireDefault(require("@atlaskit/icon/glyph/hipchat/chevron-down"));
11
- var _chevronUp = _interopRequireDefault(require("@atlaskit/icon/glyph/hipchat/chevron-up"));
10
+ var _chevronDownHipchatChevronDown = _interopRequireDefault(require("@atlaskit/icon/utility/migration/chevron-down--hipchat-chevron-down"));
11
+ var _chevronUpHipchatChevronUp = _interopRequireDefault(require("@atlaskit/icon/utility/migration/chevron-up--hipchat-chevron-up"));
12
12
  /* eslint-disable no-unused-vars */
13
13
  /**
14
14
  * @jsxRuntime classic
@@ -30,16 +30,18 @@ var ExpandIcon = exports.ExpandIcon = /*#__PURE__*/(0, _react.memo)(function (_r
30
30
  var isExpanded = _ref.isExpanded;
31
31
  switch (isExpanded) {
32
32
  case true:
33
- return (0, _react2.jsx)(_chevronUp.default, {
34
- size: "small",
33
+ return (0, _react2.jsx)(_chevronUpHipchatChevronUp.default, {
34
+ color: "currentColor",
35
+ LEGACY_size: "small",
35
36
  label: "",
36
- primaryColor: "inherit"
37
+ LEGACY_primaryColor: "inherit"
37
38
  });
38
39
  case false:
39
- return (0, _react2.jsx)(_chevronDown.default, {
40
- size: "small",
40
+ return (0, _react2.jsx)(_chevronDownHipchatChevronDown.default, {
41
+ color: "currentColor",
42
+ LEGACY_size: "small",
41
43
  label: "",
42
- primaryColor: "inherit"
44
+ LEGACY_primaryColor: "inherit"
43
45
  });
44
46
  }
45
47
  });
@@ -7,8 +7,8 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.SortIcon = void 0;
8
8
  var _react = require("react");
9
9
  var _react2 = require("@emotion/react");
10
- var _arrowDown = _interopRequireDefault(require("@atlaskit/icon/glyph/arrow-down"));
11
- var _arrowUp = _interopRequireDefault(require("@atlaskit/icon/glyph/arrow-up"));
10
+ var _arrowDown = _interopRequireDefault(require("@atlaskit/icon/utility/migration/arrow-down"));
11
+ var _arrowUp = _interopRequireDefault(require("@atlaskit/icon/utility/migration/arrow-up"));
12
12
  var _useTable2 = require("../hooks/use-table");
13
13
  /* eslint-disable no-unused-vars */
14
14
  /**
@@ -32,15 +32,17 @@ var SortIcon = exports.SortIcon = /*#__PURE__*/(0, _react.memo)(function (_ref)
32
32
  switch (sortDirection) {
33
33
  case 'ascending':
34
34
  return (0, _react2.jsx)(_arrowUp.default, {
35
- size: "small",
35
+ color: "currentColor",
36
+ LEGACY_size: "small",
36
37
  label: "",
37
- primaryColor: "inherit"
38
+ LEGACY_primaryColor: "inherit"
38
39
  });
39
40
  case 'descending':
40
41
  return (0, _react2.jsx)(_arrowDown.default, {
41
- size: "small",
42
+ color: "currentColor",
43
+ LEGACY_size: "small",
42
44
  label: "",
43
- primaryColor: "inherit"
45
+ LEGACY_primaryColor: "inherit"
44
46
  });
45
47
  }
46
48
  }
@@ -8,8 +8,8 @@ import { memo, useCallback } from 'react';
8
8
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
9
9
  import { jsx } from '@emotion/react';
10
10
  import { IconButton } from '@atlaskit/button/new';
11
- import ChevronDownIcon from '@atlaskit/icon/glyph/hipchat/chevron-down';
12
- import ChevronUpIcon from '@atlaskit/icon/glyph/hipchat/chevron-up';
11
+ import ChevronDownIcon from '@atlaskit/icon/utility/migration/chevron-down--hipchat-chevron-down';
12
+ import ChevronUpIcon from '@atlaskit/icon/utility/migration/chevron-up--hipchat-chevron-up';
13
13
  import useExpand from './hooks/use-expand';
14
14
  import { ExpandableCell as ExpandableCellPrimitive } from './ui/expandable-cell';
15
15
 
@@ -34,7 +34,7 @@ const ExpandableCell = /*#__PURE__*/memo(() => {
34
34
  spacing: "compact",
35
35
  appearance: "subtle",
36
36
  icon: iconProps => jsx(Icon, _extends({}, iconProps, {
37
- size: "small"
37
+ LEGACY_size: "small"
38
38
  })),
39
39
  label: "Expand row",
40
40
  onClick: handleClick,
@@ -4,7 +4,7 @@ const overlayStyles = xcss({
4
4
  display: 'flex',
5
5
  position: 'absolute',
6
6
  inset: 'space.0',
7
- left: 'space.400'
7
+ insetInlineStart: 'space.400'
8
8
  });
9
9
 
10
10
  /**
@@ -11,8 +11,8 @@ import { jsx } from '@emotion/react';
11
11
  // TODO: Using HipChat icons as the standard icon set is missing large
12
12
  // versions of `chevron-up` and `chevron-down`, despite already including
13
13
  // `chevron-left-large` and `chevron-right-large`...
14
- import ChevronDownIcon from '@atlaskit/icon/glyph/hipchat/chevron-down';
15
- import ChevronUpIcon from '@atlaskit/icon/glyph/hipchat/chevron-up';
14
+ import ChevronDownIcon from '@atlaskit/icon/utility/migration/chevron-down--hipchat-chevron-down';
15
+ import ChevronUpIcon from '@atlaskit/icon/utility/migration/chevron-up--hipchat-chevron-up';
16
16
 
17
17
  /**
18
18
  * __Expand icon__
@@ -25,15 +25,17 @@ export const ExpandIcon = /*#__PURE__*/memo(({
25
25
  switch (isExpanded) {
26
26
  case true:
27
27
  return jsx(ChevronUpIcon, {
28
- size: "small",
28
+ color: "currentColor",
29
+ LEGACY_size: "small",
29
30
  label: "",
30
- primaryColor: "inherit"
31
+ LEGACY_primaryColor: "inherit"
31
32
  });
32
33
  case false:
33
34
  return jsx(ChevronDownIcon, {
34
- size: "small",
35
+ color: "currentColor",
36
+ LEGACY_size: "small",
35
37
  label: "",
36
- primaryColor: "inherit"
38
+ LEGACY_primaryColor: "inherit"
37
39
  });
38
40
  }
39
41
  });
@@ -7,8 +7,8 @@ import { memo } from 'react';
7
7
 
8
8
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
9
9
  import { jsx } from '@emotion/react';
10
- import ArrowDownIcon from '@atlaskit/icon/glyph/arrow-down';
11
- import ArrowUpIcon from '@atlaskit/icon/glyph/arrow-up';
10
+ import ArrowDownIcon from '@atlaskit/icon/utility/migration/arrow-down';
11
+ import ArrowUpIcon from '@atlaskit/icon/utility/migration/arrow-up';
12
12
  import { useTable } from '../hooks/use-table';
13
13
 
14
14
  /**
@@ -27,15 +27,17 @@ export const SortIcon = /*#__PURE__*/memo(({
27
27
  switch (sortDirection) {
28
28
  case 'ascending':
29
29
  return jsx(ArrowUpIcon, {
30
- size: "small",
30
+ color: "currentColor",
31
+ LEGACY_size: "small",
31
32
  label: "",
32
- primaryColor: "inherit"
33
+ LEGACY_primaryColor: "inherit"
33
34
  });
34
35
  case 'descending':
35
36
  return jsx(ArrowDownIcon, {
36
- size: "small",
37
+ color: "currentColor",
38
+ LEGACY_size: "small",
37
39
  label: "",
38
- primaryColor: "inherit"
40
+ LEGACY_primaryColor: "inherit"
39
41
  });
40
42
  }
41
43
  }
@@ -8,8 +8,8 @@ import { memo, useCallback } from 'react';
8
8
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
9
9
  import { jsx } from '@emotion/react';
10
10
  import { IconButton } from '@atlaskit/button/new';
11
- import ChevronDownIcon from '@atlaskit/icon/glyph/hipchat/chevron-down';
12
- import ChevronUpIcon from '@atlaskit/icon/glyph/hipchat/chevron-up';
11
+ import ChevronDownIcon from '@atlaskit/icon/utility/migration/chevron-down--hipchat-chevron-down';
12
+ import ChevronUpIcon from '@atlaskit/icon/utility/migration/chevron-up--hipchat-chevron-up';
13
13
  import useExpand from './hooks/use-expand';
14
14
  import { ExpandableCell as ExpandableCellPrimitive } from './ui/expandable-cell';
15
15
 
@@ -34,7 +34,7 @@ var ExpandableCell = /*#__PURE__*/memo(function () {
34
34
  appearance: "subtle",
35
35
  icon: function icon(iconProps) {
36
36
  return jsx(Icon, _extends({}, iconProps, {
37
- size: "small"
37
+ LEGACY_size: "small"
38
38
  }));
39
39
  },
40
40
  label: "Expand row",
@@ -35,14 +35,14 @@ function reducer(_ref, action) {
35
35
  case 'toggle_selection':
36
36
  {
37
37
  var _action$value = action.value,
38
- _id = _action$value.id,
39
- _shiftHeld = _action$value.shiftHeld;
38
+ id = _action$value.id,
39
+ shiftHeld = _action$value.shiftHeld;
40
40
  var updated = checked.slice();
41
41
  var newSelectionStart = selectionStart;
42
42
  var newPreviousSelection = previousSelection.slice();
43
- if (_shiftHeld) {
43
+ if (shiftHeld) {
44
44
  if (checked.length > 0) {
45
- var newIds = arrayFromRange(selectionStart, _id); // create an array of the new ids
45
+ var newIds = arrayFromRange(selectionStart, id); // create an array of the new ids
46
46
 
47
47
  // Uncheck ids from the previous selection.
48
48
  // This is done to maintain consistency with Shift-select behaviour elsewhere (e.g. macOS)
@@ -57,21 +57,21 @@ function reducer(_ref, action) {
57
57
  newPreviousSelection = newIds; // Maintain an array of the previous selection to allow for consistent Shift-select behaviour
58
58
  }
59
59
  } else {
60
- var checkedIndex = checked.indexOf(_id); // is index already checked
60
+ var checkedIndex = checked.indexOf(id); // is index already checked
61
61
 
62
62
  if (checkedIndex !== -1) {
63
63
  updated.splice(checkedIndex, 1); // if index is already checked, uncheck
64
64
  } else {
65
- updated.push(_id); // if index is not checked, check
65
+ updated.push(id); // if index is not checked, check
66
66
  }
67
- newSelectionStart = _id; // Reset selection start id to this non-shift-selected id
67
+ newSelectionStart = id; // Reset selection start id to this non-shift-selected id
68
68
  newPreviousSelection = []; // Reset previous selection as it is no longer relevant once a new non-shift-selected id is added
69
69
  }
70
70
  var _anyChecked = updated.length > 0;
71
71
  return {
72
72
  checked: updated,
73
73
  allChecked: updated.length === maxChecked,
74
- anyChecked: _anyChecked || Boolean(updated[_id]),
74
+ anyChecked: _anyChecked || Boolean(updated[id]),
75
75
  maxChecked: maxChecked,
76
76
  selectionStart: newSelectionStart,
77
77
  previousSelection: newPreviousSelection
@@ -88,10 +88,10 @@ function reducer(_ref, action) {
88
88
  };
89
89
  case 'set_max':
90
90
  {
91
- var _max = action.value;
91
+ var max = action.value;
92
92
  return {
93
- maxChecked: _max,
94
- allChecked: checked.length === _max,
93
+ maxChecked: max,
94
+ allChecked: checked.length === max,
95
95
  anyChecked: anyChecked,
96
96
  checked: checked,
97
97
  selectionStart: selectionStart,
@@ -4,7 +4,7 @@ var overlayStyles = xcss({
4
4
  display: 'flex',
5
5
  position: 'absolute',
6
6
  inset: 'space.0',
7
- left: 'space.400'
7
+ insetInlineStart: 'space.400'
8
8
  });
9
9
 
10
10
  /**
@@ -11,8 +11,8 @@ import { jsx } from '@emotion/react';
11
11
  // TODO: Using HipChat icons as the standard icon set is missing large
12
12
  // versions of `chevron-up` and `chevron-down`, despite already including
13
13
  // `chevron-left-large` and `chevron-right-large`...
14
- import ChevronDownIcon from '@atlaskit/icon/glyph/hipchat/chevron-down';
15
- import ChevronUpIcon from '@atlaskit/icon/glyph/hipchat/chevron-up';
14
+ import ChevronDownIcon from '@atlaskit/icon/utility/migration/chevron-down--hipchat-chevron-down';
15
+ import ChevronUpIcon from '@atlaskit/icon/utility/migration/chevron-up--hipchat-chevron-up';
16
16
 
17
17
  /**
18
18
  * __Expand icon__
@@ -24,15 +24,17 @@ export var ExpandIcon = /*#__PURE__*/memo(function (_ref) {
24
24
  switch (isExpanded) {
25
25
  case true:
26
26
  return jsx(ChevronUpIcon, {
27
- size: "small",
27
+ color: "currentColor",
28
+ LEGACY_size: "small",
28
29
  label: "",
29
- primaryColor: "inherit"
30
+ LEGACY_primaryColor: "inherit"
30
31
  });
31
32
  case false:
32
33
  return jsx(ChevronDownIcon, {
33
- size: "small",
34
+ color: "currentColor",
35
+ LEGACY_size: "small",
34
36
  label: "",
35
- primaryColor: "inherit"
37
+ LEGACY_primaryColor: "inherit"
36
38
  });
37
39
  }
38
40
  });
@@ -7,8 +7,8 @@ import { memo } from 'react';
7
7
 
8
8
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
9
9
  import { jsx } from '@emotion/react';
10
- import ArrowDownIcon from '@atlaskit/icon/glyph/arrow-down';
11
- import ArrowUpIcon from '@atlaskit/icon/glyph/arrow-up';
10
+ import ArrowDownIcon from '@atlaskit/icon/utility/migration/arrow-down';
11
+ import ArrowUpIcon from '@atlaskit/icon/utility/migration/arrow-up';
12
12
  import { useTable } from '../hooks/use-table';
13
13
 
14
14
  /**
@@ -25,15 +25,17 @@ export var SortIcon = /*#__PURE__*/memo(function (_ref) {
25
25
  switch (sortDirection) {
26
26
  case 'ascending':
27
27
  return jsx(ArrowUpIcon, {
28
- size: "small",
28
+ color: "currentColor",
29
+ LEGACY_size: "small",
29
30
  label: "",
30
- primaryColor: "inherit"
31
+ LEGACY_primaryColor: "inherit"
31
32
  });
32
33
  case 'descending':
33
34
  return jsx(ArrowDownIcon, {
34
- size: "small",
35
+ color: "currentColor",
36
+ LEGACY_size: "small",
35
37
  label: "",
36
- primaryColor: "inherit"
38
+ LEGACY_primaryColor: "inherit"
37
39
  });
38
40
  }
39
41
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/table",
3
- "version": "0.7.2",
3
+ "version": "0.8.1",
4
4
  "description": "A table is used to display data.",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -39,13 +39,13 @@
39
39
  "./primitives": "./src/ui/index.tsx"
40
40
  },
41
41
  "dependencies": {
42
- "@atlaskit/button": "^20.1.0",
42
+ "@atlaskit/button": "^20.2.0",
43
43
  "@atlaskit/checkbox": "^14.0.0",
44
- "@atlaskit/ds-lib": "^2.5.0",
44
+ "@atlaskit/ds-lib": "^2.6.0",
45
45
  "@atlaskit/focus-ring": "^1.6.0",
46
- "@atlaskit/icon": "^22.15.0",
47
- "@atlaskit/primitives": "^12.1.0",
48
- "@atlaskit/tokens": "^1.59.0",
46
+ "@atlaskit/icon": "^22.18.0",
47
+ "@atlaskit/primitives": "^12.2.0",
48
+ "@atlaskit/tokens": "^2.0.0",
49
49
  "@atlaskit/tooltip": "^18.7.0",
50
50
  "@atlaskit/visually-hidden": "^1.5.0",
51
51
  "@babel/runtime": "^7.0.0",