@atlaskit/table 0.4.13 → 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.
Files changed (44) hide show
  1. package/CHANGELOG.md +30 -17
  2. package/dist/cjs/body.js +5 -6
  3. package/dist/cjs/expandable-cell.js +1 -2
  4. package/dist/cjs/expandable-row-content.js +1 -2
  5. package/dist/cjs/expandable-row.js +1 -2
  6. package/dist/cjs/head-cell.js +1 -2
  7. package/dist/cjs/hooks/selection-provider.js +2 -4
  8. package/dist/cjs/hooks/use-expand-content.js +2 -4
  9. package/dist/cjs/hooks/use-expand.js +2 -4
  10. package/dist/cjs/hooks/use-row-id.js +2 -4
  11. package/dist/cjs/hooks/use-selectable.js +2 -4
  12. package/dist/cjs/hooks/use-sorting.js +2 -3
  13. package/dist/cjs/hooks/use-table-body.js +3 -5
  14. package/dist/cjs/hooks/use-table.js +2 -3
  15. package/dist/cjs/row.js +1 -2
  16. package/dist/cjs/selectable-cell.js +1 -2
  17. package/dist/cjs/sortable-column.js +1 -2
  18. package/dist/cjs/table.js +1 -2
  19. package/dist/cjs/thead.js +1 -2
  20. package/dist/cjs/ui/base-cell.js +3 -6
  21. package/dist/cjs/ui/bulk-action-overlay.js +3 -6
  22. package/dist/cjs/ui/expand-icon.js +2 -3
  23. package/dist/cjs/ui/expandable-cell.js +2 -3
  24. package/dist/cjs/ui/selectable-cell.js +2 -3
  25. package/dist/cjs/ui/sort-icon.js +2 -3
  26. package/dist/cjs/ui/table.js +2 -3
  27. package/dist/cjs/ui/tbody.js +2 -4
  28. package/dist/cjs/ui/td.js +2 -3
  29. package/dist/cjs/ui/th.js +2 -3
  30. package/dist/cjs/ui/thead.js +2 -3
  31. package/dist/cjs/ui/tr.js +2 -3
  32. package/dist/es2019/ui/base-cell.js +1 -3
  33. package/dist/es2019/ui/bulk-action-overlay.js +1 -3
  34. package/dist/esm/body.js +4 -4
  35. package/dist/esm/ui/base-cell.js +1 -3
  36. package/dist/esm/ui/bulk-action-overlay.js +1 -3
  37. package/dist/types/ui/base-cell.d.ts +2 -2
  38. package/dist/types-ts4.5/ui/base-cell.d.ts +2 -2
  39. package/package.json +5 -6
  40. package/report.api.md +1 -1
  41. package/tmp/api-report-tmp.d.ts +122 -0
  42. package/dist/cjs/version.json +0 -5
  43. package/dist/es2019/version.json +0 -5
  44. package/dist/esm/version.json +0 -5
package/CHANGELOG.md CHANGED
@@ -1,16 +1,29 @@
1
1
  # @atlaskit/table
2
2
 
3
+ ## 0.4.15
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 0.4.14
10
+
11
+ ### Patch Changes
12
+
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.
15
+
3
16
  ## 0.4.13
4
17
 
5
18
  ### Patch Changes
6
19
 
7
- - [`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.
8
21
 
9
22
  ## 0.4.12
10
23
 
11
24
  ### Patch Changes
12
25
 
13
- - [`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.
14
27
 
15
28
  ## 0.4.11
16
29
 
@@ -64,25 +77,25 @@
64
77
 
65
78
  ### Patch Changes
66
79
 
67
- - [`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
68
81
 
69
82
  ## 0.4.2
70
83
 
71
84
  ### Patch Changes
72
85
 
73
- - [`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
74
87
 
75
88
  ## 0.4.1
76
89
 
77
90
  ### Patch Changes
78
91
 
79
- - [`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`
80
93
 
81
94
  ## 0.4.0
82
95
 
83
96
  ### Minor Changes
84
97
 
85
- - [`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
86
99
 
87
100
  ### Patch Changes
88
101
 
@@ -92,13 +105,13 @@
92
105
 
93
106
  ### Patch Changes
94
107
 
95
- - [`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.
96
109
 
97
110
  ## 0.3.3
98
111
 
99
112
  ### Patch Changes
100
113
 
101
- - [`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
102
115
 
103
116
  ## 0.3.2
104
117
 
@@ -116,7 +129,7 @@
116
129
 
117
130
  ### Minor Changes
118
131
 
119
- - [`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.
120
133
 
121
134
  - `<ExpandableRow>`
122
135
  - `<ExpandableRowContent>`
@@ -144,19 +157,19 @@
144
157
 
145
158
  ### Patch Changes
146
159
 
147
- - [`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.
148
161
 
149
162
  ## 0.2.4
150
163
 
151
164
  ### Patch Changes
152
165
 
153
- - [`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`.
154
167
 
155
168
  ## 0.2.3
156
169
 
157
170
  ### Patch Changes
158
171
 
159
- - [`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.
160
173
 
161
174
  ## 0.2.2
162
175
 
@@ -168,14 +181,14 @@
168
181
 
169
182
  ### Patch Changes
170
183
 
171
- - [`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.
172
185
  - Updated dependencies
173
186
 
174
187
  ## 0.2.0
175
188
 
176
189
  ### Minor Changes
177
190
 
178
- - [`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.
179
192
 
180
193
  ## 0.1.4
181
194
 
@@ -193,16 +206,16 @@
193
206
 
194
207
  ### Patch Changes
195
208
 
196
- - [`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.
197
210
 
198
211
  ## 0.1.1
199
212
 
200
213
  ### Patch Changes
201
214
 
202
- - [`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
203
216
 
204
217
  ## 0.1.0
205
218
 
206
219
  ### Minor Changes
207
220
 
208
- - [`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,
@@ -66,9 +66,7 @@ var BaseCell = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
66
66
  scope: scope,
67
67
  backgroundColor: backgroundColor,
68
68
  paddingBlock: paddingBlock,
69
- paddingInline: paddingInline
70
- // @ts-expect-error
71
- ,
69
+ paddingInline: paddingInline,
72
70
  as: as,
73
71
  testId: testId,
74
72
  style: width ? {
@@ -77,5 +75,4 @@ var BaseCell = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
77
75
  "aria-sort": sortDirection,
78
76
  colSpan: colSpan
79
77
  }, children);
80
- });
81
- exports.BaseCell = BaseCell;
78
+ });
@@ -19,11 +19,9 @@ 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
- return /*#__PURE__*/_react.default.createElement(_primitives.Box
25
- // @ts-expect-error should box support table elements?
26
- , {
24
+ return /*#__PURE__*/_react.default.createElement(_primitives.Box, {
27
25
  as: "th",
28
26
  paddingInline: "space.100",
29
27
  backgroundColor: "elevation.surface",
@@ -32,5 +30,4 @@ var BulkActionOverlay = function BulkActionOverlay(_ref) {
32
30
  space: "space.300",
33
31
  alignBlock: "center"
34
32
  }, children));
35
- };
36
- 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
+ };
@@ -53,9 +53,7 @@ export const BaseCell = /*#__PURE__*/forwardRef(({
53
53
  scope: scope,
54
54
  backgroundColor: backgroundColor,
55
55
  paddingBlock: paddingBlock,
56
- paddingInline: paddingInline
57
- // @ts-expect-error
58
- ,
56
+ paddingInline: paddingInline,
59
57
  as: as,
60
58
  testId: testId,
61
59
  style: width ? {
@@ -14,9 +14,7 @@ const overlayStyles = xcss({
14
14
  */
15
15
  export const BulkActionOverlay = ({
16
16
  children
17
- }) => /*#__PURE__*/React.createElement(Box
18
- // @ts-expect-error should box support table elements?
19
- , {
17
+ }) => /*#__PURE__*/React.createElement(Box, {
20
18
  as: "th",
21
19
  paddingInline: "space.100",
22
20
  backgroundColor: "elevation.surface",
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) {
@@ -57,9 +57,7 @@ export var BaseCell = /*#__PURE__*/forwardRef(function (_ref, ref) {
57
57
  scope: scope,
58
58
  backgroundColor: backgroundColor,
59
59
  paddingBlock: paddingBlock,
60
- paddingInline: paddingInline
61
- // @ts-expect-error
62
- ,
60
+ paddingInline: paddingInline,
63
61
  as: as,
64
62
  testId: testId,
65
63
  style: width ? {
@@ -14,9 +14,7 @@ var overlayStyles = xcss({
14
14
  */
15
15
  export var BulkActionOverlay = function BulkActionOverlay(_ref) {
16
16
  var children = _ref.children;
17
- return /*#__PURE__*/React.createElement(Box
18
- // @ts-expect-error should box support table elements?
19
- , {
17
+ return /*#__PURE__*/React.createElement(Box, {
20
18
  as: "th",
21
19
  paddingInline: "space.100",
22
20
  backgroundColor: "elevation.surface",
@@ -32,7 +32,7 @@ export type BaseCellProps = {
32
32
  * Number of columns to span.
33
33
  */
34
34
  colSpan?: number;
35
- } & Pick<BoxProps, 'paddingBlock' | 'paddingInline' | 'backgroundColor' | 'xcss'>;
35
+ } & Pick<BoxProps<any>, 'paddingBlock' | 'paddingInline' | 'backgroundColor' | 'xcss'>;
36
36
  /**
37
37
  * https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-sort
38
38
  */
@@ -76,6 +76,6 @@ export declare const BaseCell: React.ForwardRefExoticComponent<{
76
76
  * Number of columns to span.
77
77
  */
78
78
  colSpan?: number | undefined;
79
- } & Pick<BoxProps<"div">, "backgroundColor" | "paddingBlock" | "paddingInline" | "xcss"> & {
79
+ } & Pick<BoxProps<any>, "backgroundColor" | "paddingBlock" | "paddingInline" | "xcss"> & {
80
80
  sortDirection?: SortDirection | undefined;
81
81
  } & React.RefAttributes<HTMLTableCellElement>>;
@@ -32,7 +32,7 @@ export type BaseCellProps = {
32
32
  * Number of columns to span.
33
33
  */
34
34
  colSpan?: number;
35
- } & Pick<BoxProps, 'paddingBlock' | 'paddingInline' | 'backgroundColor' | 'xcss'>;
35
+ } & Pick<BoxProps<any>, 'paddingBlock' | 'paddingInline' | 'backgroundColor' | 'xcss'>;
36
36
  /**
37
37
  * https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-sort
38
38
  */
@@ -76,6 +76,6 @@ export declare const BaseCell: React.ForwardRefExoticComponent<{
76
76
  * Number of columns to span.
77
77
  */
78
78
  colSpan?: number | undefined;
79
- } & Pick<BoxProps<"div">, "backgroundColor" | "paddingBlock" | "paddingInline" | "xcss"> & {
79
+ } & Pick<BoxProps<any>, "backgroundColor" | "paddingBlock" | "paddingInline" | "xcss"> & {
80
80
  sortDirection?: SortDirection | undefined;
81
81
  } & React.RefAttributes<HTMLTableCellElement>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/table",
3
- "version": "0.4.13",
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",
@@ -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.0",
49
- "@atlaskit/tokens": "^1.12.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",
package/report.api.md CHANGED
@@ -35,7 +35,7 @@ type BaseCellProps = {
35
35
  children?: ReactNode;
36
36
  colSpan?: number;
37
37
  } & Pick<
38
- BoxProps,
38
+ BoxProps<any>,
39
39
  'backgroundColor' | 'paddingBlock' | 'paddingInline' | 'xcss'
40
40
  >;
41
41
 
@@ -0,0 +1,122 @@
1
+ ## API Report File for "@atlaskit/table"
2
+
3
+ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4
+
5
+ ```ts
6
+
7
+ /// <reference types="react" />
8
+
9
+ import { BoxProps } from '@atlaskit/primitives';
10
+ import { FC } from 'react';
11
+ import { jsx } from '@emotion/react';
12
+ import { MemoExoticComponent } from 'react';
13
+ import { default as React_2 } from 'react';
14
+ import { ReactElement } from 'react';
15
+ import { ReactNode } from 'react';
16
+
17
+ // @public (undocumented)
18
+ type BaseCellProps = {
19
+ width?: string;
20
+ align?: 'icon' | 'number' | 'text';
21
+ as?: 'td' | 'th';
22
+ scope?: 'col' | 'row';
23
+ testId?: string;
24
+ children?: ReactNode;
25
+ colSpan?: number;
26
+ } & Pick<BoxProps<any>, 'backgroundColor' | 'paddingBlock' | 'paddingInline' | 'xcss'>;
27
+
28
+ // @public (undocumented)
29
+ type BodyProps<Item extends object> = {
30
+ rows: Item[];
31
+ children: (row: Item) => ReactElement;
32
+ } | {
33
+ rows?: never;
34
+ children: ReactElement | ReactElement[];
35
+ };
36
+
37
+ // @public
38
+ export const Cell: FC<Omit<BaseCellProps, 'as'>>;
39
+
40
+ // @public (undocumented)
41
+ interface CellProps {
42
+ // (undocumented)
43
+ children?: ReactNode;
44
+ name: string;
45
+ // (undocumented)
46
+ onClick?: React.MouseEventHandler;
47
+ testId?: string;
48
+ }
49
+
50
+ // @public
51
+ export const ExpandableCell: MemoExoticComponent<() => jsx.JSX.Element>;
52
+
53
+ // @public
54
+ export const ExpandableRow: ({ children, isExpanded, isDefaultExpanded, }: ExpandableRowProps) => JSX.Element;
55
+
56
+ // @public
57
+ export const ExpandableRowContent: ({ children }: ExpandableRowContentProps) => JSX.Element;
58
+
59
+ // @public (undocumented)
60
+ type ExpandableRowContentProps = {
61
+ children?: React_2.ReactNode;
62
+ };
63
+
64
+ // @public (undocumented)
65
+ type ExpandableRowProps = {
66
+ children: React_2.ReactNode;
67
+ isExpanded?: boolean;
68
+ isDefaultExpanded?: boolean;
69
+ };
70
+
71
+ // @public
72
+ export const HeadCell: FC<THProps>;
73
+
74
+ // @public
75
+ export const Row: FC<RowProps>;
76
+
77
+ // @public (undocumented)
78
+ type RowProps = {
79
+ testId?: string;
80
+ children?: ReactNode;
81
+ };
82
+
83
+ // @public
84
+ export const SortableColumn: FC<CellProps>;
85
+
86
+ // @public (undocumented)
87
+ type SortKey<Key extends number | string | symbol> = 'unset' | Key;
88
+
89
+ // @public
90
+ function Table<ItemType extends object = object>({ children, isSelectable, sortKey, testId, }: TableProps<ItemType>): jsx.JSX.Element;
91
+ export default Table;
92
+
93
+ // @public (undocumented)
94
+ type TableProps<ItemType extends object = {}> = {
95
+ testId?: string;
96
+ sortKey?: SortKey<keyof ItemType>;
97
+ children: ReactElement | ReactElement[];
98
+ } & ({
99
+ isSelectable: true;
100
+ defaultSelected?: number;
101
+ } | {
102
+ isSelectable?: false;
103
+ });
104
+
105
+ // @public
106
+ export function TBody<ObjectType extends object>({ rows, children, }: BodyProps<ObjectType>): jsx.JSX.Element;
107
+
108
+ // @public (undocumented)
109
+ export const THead: FC<THeadProps>;
110
+
111
+ // @public (undocumented)
112
+ type THeadProps = {
113
+ actions?: (selected: number[]) => ReactNode;
114
+ children?: ReactNode;
115
+ };
116
+
117
+ // @public (undocumented)
118
+ type THProps = Omit<BaseCellProps, 'as'>;
119
+
120
+ // (No @packageDocumentation comment for this package)
121
+
122
+ ```
@@ -1,5 +0,0 @@
1
- {
2
- "name": "@atlaskit/table",
3
- "version": "0.4.13",
4
- "sideEffects": false
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "name": "@atlaskit/table",
3
- "version": "0.4.13",
4
- "sideEffects": false
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "name": "@atlaskit/table",
3
- "version": "0.4.13",
4
- "sideEffects": false
5
- }