@atlaskit/table 0.4.14 → 0.4.15

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,23 +1,29 @@
1
1
  # @atlaskit/table
2
2
 
3
+ ## 0.4.15
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
3
9
  ## 0.4.14
4
10
 
5
11
  ### Patch Changes
6
12
 
7
- - [`1ed303de3e8`](https://bitbucket.org/atlassian/atlassian-frontend/commits/1ed303de3e8) - Updated dependencies
8
- - [`95401cac781`](https://bitbucket.org/atlassian/atlassian-frontend/commits/95401cac781) - Internal change to component composition. There is no expected change.
13
+ - [#37533](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/37533) [`1ed303de3e8`](https://bitbucket.org/atlassian/atlassian-frontend/commits/1ed303de3e8) - Updated dependencies
14
+ - [#37419](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/37419) [`95401cac781`](https://bitbucket.org/atlassian/atlassian-frontend/commits/95401cac781) - Internal change to component composition. There is no expected change.
9
15
 
10
16
  ## 0.4.13
11
17
 
12
18
  ### Patch Changes
13
19
 
14
- - [`a981691b65e`](https://bitbucket.org/atlassian/atlassian-frontend/commits/a981691b65e) - Updated internal dependencies.
20
+ - [#36900](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/36900) [`a981691b65e`](https://bitbucket.org/atlassian/atlassian-frontend/commits/a981691b65e) - Updated internal dependencies.
15
21
 
16
22
  ## 0.4.12
17
23
 
18
24
  ### Patch Changes
19
25
 
20
- - [`4ae083a7e66`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4ae083a7e66) - Use `@af/accessibility-testing` for default jest-axe config and jest-axe import in accessibility testing.
26
+ - [#36754](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/36754) [`4ae083a7e66`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4ae083a7e66) - Use `@af/accessibility-testing` for default jest-axe config and jest-axe import in accessibility testing.
21
27
 
22
28
  ## 0.4.11
23
29
 
@@ -71,25 +77,25 @@
71
77
 
72
78
  ### Patch Changes
73
79
 
74
- - [`61cb5313358`](https://bitbucket.org/atlassian/atlassian-frontend/commits/61cb5313358) - Removing unused dependencies and dev dependencies
80
+ - [#34443](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/34443) [`61cb5313358`](https://bitbucket.org/atlassian/atlassian-frontend/commits/61cb5313358) - Removing unused dependencies and dev dependencies
75
81
 
76
82
  ## 0.4.2
77
83
 
78
84
  ### Patch Changes
79
85
 
80
- - [`9d00501a414`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9d00501a414) - Ensure legacy types are published for TS 4.5-4.8
86
+ - [#33793](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33793) [`9d00501a414`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9d00501a414) - Ensure legacy types are published for TS 4.5-4.8
81
87
 
82
88
  ## 0.4.1
83
89
 
84
90
  ### Patch Changes
85
91
 
86
- - [`41fae2c6f68`](https://bitbucket.org/atlassian/atlassian-frontend/commits/41fae2c6f68) - Upgrade Typescript from `4.5.5` to `4.9.5`
92
+ - [#33649](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33649) [`41fae2c6f68`](https://bitbucket.org/atlassian/atlassian-frontend/commits/41fae2c6f68) - Upgrade Typescript from `4.5.5` to `4.9.5`
87
93
 
88
94
  ## 0.4.0
89
95
 
90
96
  ### Minor Changes
91
97
 
92
- - [`56507598609`](https://bitbucket.org/atlassian/atlassian-frontend/commits/56507598609) - Skip minor dependency bump
98
+ - [#33258](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33258) [`56507598609`](https://bitbucket.org/atlassian/atlassian-frontend/commits/56507598609) - Skip minor dependency bump
93
99
 
94
100
  ### Patch Changes
95
101
 
@@ -99,13 +105,13 @@
99
105
 
100
106
  ### Patch Changes
101
107
 
102
- - [`4ba10567310`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4ba10567310) - Internal changes.
108
+ - [#32211](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/32211) [`4ba10567310`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4ba10567310) - Internal changes.
103
109
 
104
110
  ## 0.3.3
105
111
 
106
112
  ### Patch Changes
107
113
 
108
- - [`2e01c9c74b5`](https://bitbucket.org/atlassian/atlassian-frontend/commits/2e01c9c74b5) - DUMMY remove before merging to master; dupe adf-schema via adf-utils
114
+ - [#32424](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/32424) [`2e01c9c74b5`](https://bitbucket.org/atlassian/atlassian-frontend/commits/2e01c9c74b5) - DUMMY remove before merging to master; dupe adf-schema via adf-utils
109
115
 
110
116
  ## 0.3.2
111
117
 
@@ -123,7 +129,7 @@
123
129
 
124
130
  ### Minor Changes
125
131
 
126
- - [`bc489da7472`](https://bitbucket.org/atlassian/atlassian-frontend/commits/bc489da7472) - [ux] - Adds new primitives to support expandable row functionality. This will supersede the `@atlaskit/table-tree` package.
132
+ - [#31531](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/31531) [`bc489da7472`](https://bitbucket.org/atlassian/atlassian-frontend/commits/bc489da7472) - [ux] - Adds new primitives to support expandable row functionality. This will supersede the `@atlaskit/table-tree` package.
127
133
 
128
134
  - `<ExpandableRow>`
129
135
  - `<ExpandableRowContent>`
@@ -151,19 +157,19 @@
151
157
 
152
158
  ### Patch Changes
153
159
 
154
- - [`261420360ec`](https://bitbucket.org/atlassian/atlassian-frontend/commits/261420360ec) - Upgrades component types to support React 18.
160
+ - [#31206](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/31206) [`261420360ec`](https://bitbucket.org/atlassian/atlassian-frontend/commits/261420360ec) - Upgrades component types to support React 18.
155
161
 
156
162
  ## 0.2.4
157
163
 
158
164
  ### Patch Changes
159
165
 
160
- - [`cfe48bb7ece`](https://bitbucket.org/atlassian/atlassian-frontend/commits/cfe48bb7ece) - Internal change only. Replace usages of Inline/Stack with stable version from `@atlaskit/primitives`.
166
+ - [#31242](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/31242) [`cfe48bb7ece`](https://bitbucket.org/atlassian/atlassian-frontend/commits/cfe48bb7ece) - Internal change only. Replace usages of Inline/Stack with stable version from `@atlaskit/primitives`.
161
167
 
162
168
  ## 0.2.3
163
169
 
164
170
  ### Patch Changes
165
171
 
166
- - [`8fb961ffa76`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8fb961ffa76) - [ux] Fixed some accessibility bugs. Now checkboxes in selectable cells are labelled for assistive technology users, sortable columns have their sorting state programmatically associated through the `aria-sort` attribute, and the sort button has an `aria-roledescription` to ensure that assistive technology users are informed that the column headers are sortable in nature.
172
+ - [#31055](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/31055) [`8fb961ffa76`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8fb961ffa76) - [ux] Fixed some accessibility bugs. Now checkboxes in selectable cells are labelled for assistive technology users, sortable columns have their sorting state programmatically associated through the `aria-sort` attribute, and the sort button has an `aria-roledescription` to ensure that assistive technology users are informed that the column headers are sortable in nature.
167
173
 
168
174
  ## 0.2.2
169
175
 
@@ -175,14 +181,14 @@
175
181
 
176
182
  ### Patch Changes
177
183
 
178
- - [`eadbf13d8c0`](https://bitbucket.org/atlassian/atlassian-frontend/commits/eadbf13d8c0) - Updated usages of `Text`, `Box`, `Stack`, and `Inline` primitives to reflect their updated APIs. There are no visual or behaviour changes.
184
+ - [#27891](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/27891) [`eadbf13d8c0`](https://bitbucket.org/atlassian/atlassian-frontend/commits/eadbf13d8c0) - Updated usages of `Text`, `Box`, `Stack`, and `Inline` primitives to reflect their updated APIs. There are no visual or behaviour changes.
179
185
  - Updated dependencies
180
186
 
181
187
  ## 0.2.0
182
188
 
183
189
  ### Minor Changes
184
190
 
185
- - [`0fc5e276eb4`](https://bitbucket.org/atlassian/atlassian-frontend/commits/0fc5e276eb4) - [ux] Fix borders not showing in Safari. Table is shifted down slightly as a result.
191
+ - [#28885](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/28885) [`0fc5e276eb4`](https://bitbucket.org/atlassian/atlassian-frontend/commits/0fc5e276eb4) - [ux] Fix borders not showing in Safari. Table is shifted down slightly as a result.
186
192
 
187
193
  ## 0.1.4
188
194
 
@@ -200,16 +206,16 @@
200
206
 
201
207
  ### Patch Changes
202
208
 
203
- - [`d2c17ae6f14`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d2c17ae6f14) - Adds the `width` prop to '@atlaskit/table' header elements.
209
+ - [#28013](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/28013) [`d2c17ae6f14`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d2c17ae6f14) - Adds the `width` prop to '@atlaskit/table' header elements.
204
210
 
205
211
  ## 0.1.1
206
212
 
207
213
  ### Patch Changes
208
214
 
209
- - [`7d3f2c3c117`](https://bitbucket.org/atlassian/atlassian-frontend/commits/7d3f2c3c117) - Iterate on typings and component performance
215
+ - [#27929](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/27929) [`7d3f2c3c117`](https://bitbucket.org/atlassian/atlassian-frontend/commits/7d3f2c3c117) - Iterate on typings and component performance
210
216
 
211
217
  ## 0.1.0
212
218
 
213
219
  ### Minor Changes
214
220
 
215
- - [`e2e5705f5d8`](https://bitbucket.org/atlassian/atlassian-frontend/commits/e2e5705f5d8) - Create initial component from Figma spec. Dev release, not intended for consumption.
221
+ - [#27738](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/27738) [`e2e5705f5d8`](https://bitbucket.org/atlassian/atlassian-frontend/commits/e2e5705f5d8) - Create initial component from Figma spec. Dev release, not intended for consumption.
package/dist/cjs/body.js CHANGED
@@ -19,8 +19,8 @@ var Primitives = _interopRequireWildcard(require("./ui"));
19
19
  var _excluded = ["idx"];
20
20
  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); }
21
21
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
22
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
23
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } /* eslint-disable @repo/internal/react/no-clone-element */ /** @jsx jsx */
22
+ 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; }
23
+ 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; } /* eslint-disable @repo/internal/react/no-clone-element */ /** @jsx jsx */
24
24
  /**
25
25
  * __Table body__
26
26
  */
@@ -37,7 +37,7 @@ function TBody(_ref) {
37
37
  setMax = _useSelection2$.setMax;
38
38
  // TODO: this seems like something the user should control or opt into.
39
39
  (0, _react.useEffect)(function () {
40
- removeAll === null || removeAll === void 0 ? void 0 : removeAll();
40
+ removeAll === null || removeAll === void 0 || removeAll();
41
41
  // eslint-disable-next-line react-hooks/exhaustive-deps -- When the rows change, we [currently] want to call removeAll.
42
42
  }, [rows]);
43
43
  var childrenCount = _react.Children.count(children);
@@ -46,7 +46,7 @@ function TBody(_ref) {
46
46
  // Set data length (via setMax) whenever data changes
47
47
  (0, _react.useEffect)(function () {
48
48
  var numRows = rowsLength !== null && rowsLength !== void 0 ? rowsLength : childrenCount;
49
- setMax === null || setMax === void 0 ? void 0 : setMax(numRows);
49
+ setMax === null || setMax === void 0 || setMax(numRows);
50
50
  }, [rowsLength, childrenCount, setMax]);
51
51
  var sortedRows = (0, _react.useMemo)(function () {
52
52
  return rows === null || rows === void 0 ? void 0 : rows.map(function (row, idx) {
@@ -73,5 +73,4 @@ function TBody(_ref) {
73
73
  }, row);
74
74
  })));
75
75
  }
76
- var _default = TBody;
77
- exports.default = _default;
76
+ var _default = exports.default = TBody;
@@ -41,5 +41,4 @@ var ExpandableCell = /*#__PURE__*/(0, _react.memo)(function () {
41
41
  "aria-label": "Expand row"
42
42
  }));
43
43
  });
44
- var _default = ExpandableCell;
45
- exports.default = _default;
44
+ var _default = exports.default = ExpandableCell;
@@ -17,5 +17,4 @@ var ExpandableRowContent = function ExpandableRowContent(_ref) {
17
17
  var children = _ref.children;
18
18
  return /*#__PURE__*/_react.default.createElement(_useExpandContent.ExpandContentContextProvider, null, children);
19
19
  };
20
- var _default = ExpandableRowContent;
21
- exports.default = _default;
20
+ var _default = exports.default = ExpandableRowContent;
@@ -21,5 +21,4 @@ var ExpandableRow = function ExpandableRow(_ref) {
21
21
  isDefaultExpanded: isDefaultExpanded
22
22
  }, children);
23
23
  };
24
- var _default = ExpandableRow;
25
- exports.default = _default;
24
+ var _default = exports.default = ExpandableRow;
@@ -36,5 +36,4 @@ var HeadCell = function HeadCell(_ref) {
36
36
  }
37
37
  }, children));
38
38
  };
39
- var _default = HeadCell;
40
- exports.default = _default;
39
+ var _default = exports.default = HeadCell;
@@ -23,9 +23,7 @@ var SelectionProvider = function SelectionProvider(_ref) {
23
23
  value: reducer
24
24
  }, children);
25
25
  };
26
- var useSelection = function useSelection() {
26
+ var useSelection = exports.useSelection = function useSelection() {
27
27
  return (0, _react.useContext)(SelectionContext);
28
28
  };
29
- exports.useSelection = useSelection;
30
- var _default = SelectionProvider;
31
- exports.default = _default;
29
+ var _default = exports.default = SelectionProvider;
@@ -17,7 +17,7 @@ var ExpandContentContext = /*#__PURE__*/(0, _react.createContext)({
17
17
  *
18
18
  * An expand content provider allows `<Row>` to determine if it is a subitem.
19
19
  */
20
- var ExpandContentContextProvider = function ExpandContentContextProvider(_ref) {
20
+ var ExpandContentContextProvider = exports.ExpandContentContextProvider = function ExpandContentContextProvider(_ref) {
21
21
  var children = _ref.children;
22
22
  return /*#__PURE__*/_react.default.createElement(ExpandContentContext.Provider, {
23
23
  value: {
@@ -25,9 +25,7 @@ var ExpandContentContextProvider = function ExpandContentContextProvider(_ref) {
25
25
  }
26
26
  }, children);
27
27
  };
28
- exports.ExpandContentContextProvider = ExpandContentContextProvider;
29
28
  var useExpandContent = function useExpandContent() {
30
29
  return (0, _react.useContext)(ExpandContentContext);
31
30
  };
32
- var _default = useExpandContent;
33
- exports.default = _default;
31
+ var _default = exports.default = useExpandContent;
@@ -21,7 +21,7 @@ var ExpandContext = /*#__PURE__*/(0, _react.createContext)({
21
21
  *
22
22
  * An expand context provider.
23
23
  */
24
- var ExpandContextProvider = function ExpandContextProvider(_ref) {
24
+ var ExpandContextProvider = exports.ExpandContextProvider = function ExpandContextProvider(_ref) {
25
25
  var children = _ref.children,
26
26
  isExpandedProp = _ref.isExpanded,
27
27
  _ref$isDefaultExpande = _ref.isDefaultExpanded,
@@ -42,9 +42,7 @@ var ExpandContextProvider = function ExpandContextProvider(_ref) {
42
42
  }
43
43
  }, children);
44
44
  };
45
- exports.ExpandContextProvider = ExpandContextProvider;
46
45
  var useExpand = function useExpand() {
47
46
  return (0, _react.useContext)(ExpandContext);
48
47
  };
49
- var _default = useExpand;
50
- exports.default = _default;
48
+ var _default = exports.default = useExpand;
@@ -10,7 +10,7 @@ var RowContext = /*#__PURE__*/(0, _react.createContext)(undefined);
10
10
  /**
11
11
  * @internal
12
12
  */
13
- var useRowId = function useRowId() {
13
+ var useRowId = exports.useRowId = function useRowId() {
14
14
  return (0, _react.useContext)(RowContext);
15
15
  };
16
16
 
@@ -18,6 +18,4 @@ var useRowId = function useRowId() {
18
18
  * __Row provider__
19
19
  * @internal
20
20
  */
21
- exports.useRowId = useRowId;
22
- var RowProvider = RowContext.Provider;
23
- exports.RowProvider = RowProvider;
21
+ var RowProvider = exports.RowProvider = RowContext.Provider;
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.defaultSelectableState = exports.default = void 0;
8
8
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
9
9
  var _react = require("react");
10
- var defaultSelectableState = {
10
+ var defaultSelectableState = exports.defaultSelectableState = {
11
11
  checked: [],
12
12
  allChecked: false,
13
13
  anyChecked: false,
@@ -15,7 +15,6 @@ var defaultSelectableState = {
15
15
  selectionStart: -1,
16
16
  previousSelection: []
17
17
  };
18
- exports.defaultSelectableState = defaultSelectableState;
19
18
  var arrayFromRange = function arrayFromRange(from, to) {
20
19
  var startIdx = from;
21
20
  var stopIdx = to;
@@ -152,5 +151,4 @@ function useSelectable() {
152
151
  setMax: setMax
153
152
  }];
154
153
  }
155
- var _default = useSelectable;
156
- exports.default = _default;
154
+ var _default = exports.default = useSelectable;
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.useSorting = void 0;
8
8
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
9
9
  var _react = require("react");
10
- var useSorting = function useSorting(sortKey) {
10
+ var useSorting = exports.useSorting = function useSorting(sortKey) {
11
11
  var _useState = (0, _react.useState)(sortKey),
12
12
  _useState2 = (0, _slicedToArray2.default)(_useState, 2),
13
13
  localSortKey = _useState2[0],
@@ -53,5 +53,4 @@ var useSorting = function useSorting(sortKey) {
53
53
  setSortState: setSortState,
54
54
  sortFn: sortFn
55
55
  };
56
- };
57
- exports.useSorting = useSorting;
56
+ };
@@ -13,10 +13,8 @@ var TableBodyContext = /*#__PURE__*/(0, _react.createContext)(false);
13
13
  * __Table body provider__
14
14
  * Ensures correct nesting of table elements.
15
15
  */
16
- var TableBodyProvider = TableBodyContext.Provider;
17
- exports.TableBodyProvider = TableBodyProvider;
18
- var useTableBody = function useTableBody() {
16
+ var TableBodyProvider = exports.TableBodyProvider = TableBodyContext.Provider;
17
+ var useTableBody = exports.useTableBody = function useTableBody() {
19
18
  var hasTableBody = (0, _react.useContext)(TableBodyContext);
20
19
  (0, _tinyInvariant.default)(hasTableBody, '<Row /> must be nested inside a <TableBody>');
21
- };
22
- exports.useTableBody = useTableBody;
20
+ };
@@ -41,10 +41,9 @@ function TableProvider(_ref) {
41
41
  }, children)
42
42
  );
43
43
  }
44
- var useTable = function useTable() {
44
+ var useTable = exports.useTable = function useTable() {
45
45
  return (
46
46
  // @ts-expect-error
47
47
  (0, _react.useContext)(TableContext)
48
48
  );
49
- };
50
- exports.useTable = useTable;
49
+ };
package/dist/cjs/row.js CHANGED
@@ -67,5 +67,4 @@ var Row = /*#__PURE__*/(0, _react.memo)(function (_ref) {
67
67
  isSubitem: isExpandableContent
68
68
  }, selectableCell, children);
69
69
  });
70
- var _default = Row;
71
- exports.default = _default;
70
+ var _default = exports.default = Row;
@@ -40,5 +40,4 @@ var SelectableCell = function SelectableCell() {
40
40
  label: (0, _react2.jsx)(_visuallyHidden.default, null, "Select row ", idx + 1)
41
41
  }));
42
42
  };
43
- var _default = /*#__PURE__*/(0, _react.memo)(SelectableCell);
44
- exports.default = _default;
43
+ var _default = exports.default = /*#__PURE__*/(0, _react.memo)(SelectableCell);
@@ -92,5 +92,4 @@ var SortableColumn = function SortableColumn(_ref) {
92
92
  }), children);
93
93
  }));
94
94
  };
95
- var _default = SortableColumn;
96
- exports.default = _default;
95
+ var _default = exports.default = SortableColumn;
package/dist/cjs/table.js CHANGED
@@ -49,5 +49,4 @@ function Table(_ref) {
49
49
  testId: testId
50
50
  }, isSelectable ? (0, _react2.jsx)(_selectionProvider.default, null, children) : children));
51
51
  }
52
- var _default = Table;
53
- exports.default = _default;
52
+ var _default = exports.default = Table;
package/dist/cjs/thead.js CHANGED
@@ -52,5 +52,4 @@ var THead = function THead(_ref) {
52
52
  space: "space.100"
53
53
  }, actions(state.checked)))));
54
54
  };
55
- var _default = THead;
56
- exports.default = _default;
55
+ var _default = exports.default = THead;
@@ -44,7 +44,7 @@ var alignMapStyles = {
44
44
  *
45
45
  * Basic cell element.
46
46
  */
47
- var BaseCell = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
47
+ var BaseCell = exports.BaseCell = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
48
48
  var testId = _ref.testId,
49
49
  as = _ref.as,
50
50
  children = _ref.children,
@@ -75,5 +75,4 @@ var BaseCell = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
75
75
  "aria-sort": sortDirection,
76
76
  colSpan: colSpan
77
77
  }, children);
78
- });
79
- exports.BaseCell = BaseCell;
78
+ });
@@ -19,7 +19,7 @@ var overlayStyles = (0, _primitives.xcss)({
19
19
  *
20
20
  * A bulk action overlay is used to conditionally render when a user makes a row selection
21
21
  */
22
- var BulkActionOverlay = function BulkActionOverlay(_ref) {
22
+ var BulkActionOverlay = exports.BulkActionOverlay = function BulkActionOverlay(_ref) {
23
23
  var children = _ref.children;
24
24
  return /*#__PURE__*/_react.default.createElement(_primitives.Box, {
25
25
  as: "th",
@@ -30,5 +30,4 @@ var BulkActionOverlay = function BulkActionOverlay(_ref) {
30
30
  space: "space.300",
31
31
  alignBlock: "center"
32
32
  }, children));
33
- };
34
- exports.BulkActionOverlay = BulkActionOverlay;
33
+ };
@@ -21,7 +21,7 @@ var _chevronUp = _interopRequireDefault(require("@atlaskit/icon/glyph/hipchat/ch
21
21
  *
22
22
  * An icon used to display the expanded state in an `<ExpandableCell>`.
23
23
  */
24
- var ExpandIcon = /*#__PURE__*/(0, _react.memo)(function (_ref) {
24
+ var ExpandIcon = exports.ExpandIcon = /*#__PURE__*/(0, _react.memo)(function (_ref) {
25
25
  var isExpanded = _ref.isExpanded;
26
26
  switch (isExpanded) {
27
27
  case true:
@@ -37,5 +37,4 @@ var ExpandIcon = /*#__PURE__*/(0, _react.memo)(function (_ref) {
37
37
  primaryColor: "inherit"
38
38
  });
39
39
  }
40
- });
41
- exports.ExpandIcon = ExpandIcon;
40
+ });
@@ -17,12 +17,11 @@ var spacingStyles = (0, _primitives.xcss)({
17
17
  *
18
18
  * An expandable cell primitive designed to be used for light weight composition.
19
19
  */
20
- var ExpandableCell = function ExpandableCell(_ref) {
20
+ var ExpandableCell = exports.ExpandableCell = function ExpandableCell(_ref) {
21
21
  var children = _ref.children,
22
22
  as = _ref.as;
23
23
  return /*#__PURE__*/_react.default.createElement(_baseCell.BaseCell, {
24
24
  as: as,
25
25
  xcss: spacingStyles
26
26
  }, children);
27
- };
28
- exports.ExpandableCell = ExpandableCell;
27
+ };
@@ -17,12 +17,11 @@ var spacingStyles = (0, _primitives.xcss)({
17
17
  *
18
18
  * A selectable cell primitive designed to be used for light weight composition.
19
19
  */
20
- var SelectableCell = function SelectableCell(_ref) {
20
+ var SelectableCell = exports.SelectableCell = function SelectableCell(_ref) {
21
21
  var children = _ref.children,
22
22
  as = _ref.as;
23
23
  return /*#__PURE__*/_react.default.createElement(_baseCell.BaseCell, {
24
24
  as: as,
25
25
  xcss: spacingStyles
26
26
  }, children);
27
- };
28
- exports.SelectableCell = SelectableCell;
27
+ };
@@ -18,7 +18,7 @@ var _useTable2 = require("../hooks/use-table");
18
18
  *
19
19
  * SortIcon is used to display the sort state in our SortableColumn.
20
20
  */
21
- var SortIcon = /*#__PURE__*/(0, _react.memo)(function (_ref) {
21
+ var SortIcon = exports.SortIcon = /*#__PURE__*/(0, _react.memo)(function (_ref) {
22
22
  var name = _ref.name;
23
23
  var _useTable = (0, _useTable2.useTable)(),
24
24
  sortKey = _useTable.sortKey,
@@ -40,5 +40,4 @@ var SortIcon = /*#__PURE__*/(0, _react.memo)(function (_ref) {
40
40
  }
41
41
  }
42
42
  return null;
43
- });
44
- exports.SortIcon = SortIcon;
43
+ });
@@ -17,12 +17,11 @@ var _react = require("@emotion/react");
17
17
  * @primitive
18
18
  * @see https://hello.atlassian.net/wiki/spaces/DST/pages/1947062524/Dynamic+table+2.0+implementation+spec
19
19
  */
20
- var Table = function Table(_ref) {
20
+ var Table = exports.Table = function Table(_ref) {
21
21
  var children = _ref.children,
22
22
  testId = _ref.testId,
23
23
  summary = _ref.summary;
24
24
  return (0, _react.jsx)("table", {
25
25
  "data-testid": testId
26
26
  }, summary && (0, _react.jsx)("caption", null, summary), children);
27
- };
28
- exports.Table = Table;
27
+ };
@@ -24,12 +24,10 @@ var bodyStyles = (0, _react.css)({
24
24
  * __TBody__
25
25
  * @primitive
26
26
  */
27
- var TBody = function TBody(_ref) {
27
+ var TBody = exports.TBody = function TBody(_ref) {
28
28
  var children = _ref.children;
29
29
  return (0, _react.jsx)("tbody", {
30
30
  css: bodyStyles
31
31
  }, children);
32
32
  };
33
- exports.TBody = TBody;
34
- var _default = TBody;
35
- exports.default = _default;
33
+ var _default = exports.default = TBody;
package/dist/cjs/ui/td.js CHANGED
@@ -18,7 +18,7 @@ var _excluded = ["testId"];
18
18
  *
19
19
  * @primitive
20
20
  */
21
- var TD = function TD(_ref) {
21
+ var TD = exports.TD = function TD(_ref) {
22
22
  var testId = _ref.testId,
23
23
  props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
24
24
  return (
@@ -28,5 +28,4 @@ var TD = function TD(_ref) {
28
28
  testId: testId
29
29
  }, props))
30
30
  );
31
- };
32
- exports.TD = TD;
31
+ };
package/dist/cjs/ui/th.js CHANGED
@@ -14,7 +14,7 @@ var _baseCell = require("./base-cell");
14
14
  *
15
15
  * @primitive
16
16
  */
17
- var TH = function TH(_ref) {
17
+ var TH = exports.TH = function TH(_ref) {
18
18
  var children = _ref.children,
19
19
  testId = _ref.testId,
20
20
  align = _ref.align,
@@ -31,5 +31,4 @@ var TH = function TH(_ref) {
31
31
  backgroundColor: backgroundColor,
32
32
  sortDirection: sortDirection
33
33
  }, children);
34
- };
35
- exports.TH = TH;
34
+ };
@@ -24,10 +24,9 @@ var baseStyles = (0, _react.css)({
24
24
  *
25
25
  * @primitive
26
26
  */
27
- var THead = function THead(_ref) {
27
+ var THead = exports.THead = function THead(_ref) {
28
28
  var children = _ref.children;
29
29
  return (0, _react.jsx)("thead", {
30
30
  css: baseStyles
31
31
  }, children);
32
- };
33
- exports.THead = THead;
32
+ };
package/dist/cjs/ui/tr.js CHANGED
@@ -42,7 +42,7 @@ var bodyRowStyles = (0, _react.css)({
42
42
  *
43
43
  * - [Examples](https://atlassian.design/components/table/examples)
44
44
  */
45
- var TR = function TR(_ref) {
45
+ var TR = exports.TR = function TR(_ref) {
46
46
  var children = _ref.children,
47
47
  testId = _ref.testId,
48
48
  isSelected = _ref.isSelected,
@@ -57,5 +57,4 @@ var TR = function TR(_ref) {
57
57
  "data-testid": testId,
58
58
  css: [baseStyles, isBodyRow && bodyRowStyles, isSelected && selectedStyles, isSubitem && subitemStyles]
59
59
  }, children));
60
- };
61
- exports.TR = TR;
60
+ };
package/dist/esm/body.js CHANGED
@@ -2,8 +2,8 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
2
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
4
4
  var _excluded = ["idx"];
5
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
6
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
5
+ 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; }
6
+ 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) { _defineProperty(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; }
7
7
  /* eslint-disable @repo/internal/react/no-clone-element */
8
8
  /** @jsx jsx */
9
9
  import { Children, useEffect, useMemo } from 'react';
@@ -29,7 +29,7 @@ function TBody(_ref) {
29
29
  setMax = _useSelection2$.setMax;
30
30
  // TODO: this seems like something the user should control or opt into.
31
31
  useEffect(function () {
32
- removeAll === null || removeAll === void 0 ? void 0 : removeAll();
32
+ removeAll === null || removeAll === void 0 || removeAll();
33
33
  // eslint-disable-next-line react-hooks/exhaustive-deps -- When the rows change, we [currently] want to call removeAll.
34
34
  }, [rows]);
35
35
  var childrenCount = Children.count(children);
@@ -38,7 +38,7 @@ function TBody(_ref) {
38
38
  // Set data length (via setMax) whenever data changes
39
39
  useEffect(function () {
40
40
  var numRows = rowsLength !== null && rowsLength !== void 0 ? rowsLength : childrenCount;
41
- setMax === null || setMax === void 0 ? void 0 : setMax(numRows);
41
+ setMax === null || setMax === void 0 || setMax(numRows);
42
42
  }, [rowsLength, childrenCount, setMax]);
43
43
  var sortedRows = useMemo(function () {
44
44
  return rows === null || rows === void 0 ? void 0 : rows.map(function (row, idx) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/table",
3
- "version": "0.4.14",
3
+ "version": "0.4.15",
4
4
  "description": "A table is used to display data.",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -9,7 +9,7 @@
9
9
  },
10
10
  "homepage": "https://atlassian.design/components/table",
11
11
  "atlassian": {
12
- "team": "Design System Maker Experience",
12
+ "team": "Design System Team",
13
13
  "inPublicMirror": false,
14
14
  "releaseModel": "continuous",
15
15
  "website": {
@@ -40,13 +40,13 @@
40
40
  "./primitives": "./src/ui/index.tsx"
41
41
  },
42
42
  "dependencies": {
43
- "@atlaskit/button": "^16.8.0",
44
- "@atlaskit/checkbox": "^12.6.0",
43
+ "@atlaskit/button": "^16.13.0",
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": "^21.12.0",
48
- "@atlaskit/primitives": "^1.0.6",
49
- "@atlaskit/tokens": "^1.13.0",
48
+ "@atlaskit/primitives": "^1.9.0",
49
+ "@atlaskit/tokens": "^1.28.0",
50
50
  "@atlaskit/tooltip": "^17.8.0",
51
51
  "@atlaskit/visually-hidden": "^1.2.0",
52
52
  "@babel/runtime": "^7.0.0",
@@ -58,7 +58,6 @@
58
58
  },
59
59
  "devDependencies": {
60
60
  "@af/accessibility-testing": "*",
61
- "@atlaskit/ds-lib": "*",
62
61
  "@atlaskit/ssr": "*",
63
62
  "@atlaskit/visual-regression": "*",
64
63
  "@atlassian/atlassian-frontend-prettier-config-1.0.0": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.0",
@@ -1,5 +0,0 @@
1
- {
2
- "name": "@atlaskit/table",
3
- "version": "0.4.14",
4
- "sideEffects": false
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "name": "@atlaskit/table",
3
- "version": "0.4.14",
4
- "sideEffects": false
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "name": "@atlaskit/table",
3
- "version": "0.4.14",
4
- "sideEffects": false
5
- }