@atlaskit/table-tree 9.6.11 → 9.6.13
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 +13 -0
- package/dist/cjs/components/internal/chevron.js +7 -14
- package/dist/cjs/components/internal/styled.js +1 -20
- package/dist/cjs/components/row.js +1 -1
- package/dist/es2019/components/internal/chevron.js +8 -15
- package/dist/es2019/components/internal/styled.js +1 -18
- package/dist/es2019/components/row.js +1 -1
- package/dist/esm/components/internal/chevron.js +8 -15
- package/dist/esm/components/internal/styled.js +1 -20
- package/dist/esm/components/row.js +1 -1
- package/dist/types/components/internal/styled.d.ts +0 -7
- package/dist/types-ts4.5/components/internal/styled.d.ts +0 -7
- package/extract-react-types/table-tree-row.tsx +10 -7
- package/extract-react-types/table-tree-rows.tsx +2 -1
- package/extract-react-types/table-tree.tsx +2 -2
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @atlaskit/table-tree
|
|
2
2
|
|
|
3
|
+
## 9.6.13
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#72130](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/72130) [`b037e5451037`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/b037e5451037) - Update new button text color fallback for default theme (non-token) to match that of old button current text color
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
|
|
10
|
+
## 9.6.12
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- [#65882](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/65882) [`9629b57b6108`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/9629b57b6108) - [ux] Updated buttons in table-tree to consume new icon buttons.
|
|
15
|
+
|
|
3
16
|
## 9.6.11
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
9
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
11
10
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
12
11
|
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
@@ -15,7 +14,7 @@ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime
|
|
|
15
14
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
16
15
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
17
16
|
var _react = _interopRequireWildcard(require("react"));
|
|
18
|
-
var
|
|
17
|
+
var _new = require("@atlaskit/button/new");
|
|
19
18
|
var _chevronDown = _interopRequireDefault(require("@atlaskit/icon/glyph/chevron-down"));
|
|
20
19
|
var _chevronRight = _interopRequireDefault(require("@atlaskit/icon/glyph/chevron-right"));
|
|
21
20
|
var _styled = require("./styled");
|
|
@@ -50,23 +49,17 @@ var Chevron = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
50
49
|
expandLabel = _this$props.expandLabel,
|
|
51
50
|
rowId = _this$props.rowId,
|
|
52
51
|
extendedLabel = _this$props.extendedLabel;
|
|
53
|
-
var iconProps = {
|
|
54
|
-
size: 'medium',
|
|
55
|
-
primaryColor: _styled.iconColor
|
|
56
|
-
};
|
|
57
52
|
var getLabel = function getLabel(defaultLabel) {
|
|
58
53
|
return extendedLabel ? "".concat(defaultLabel, " ").concat(extendedLabel, " row") : "".concat(defaultLabel, " row ").concat(rowId);
|
|
59
54
|
};
|
|
60
|
-
return /*#__PURE__*/_react.default.createElement(_styled.ChevronContainer, null, /*#__PURE__*/_react.default.createElement(
|
|
61
|
-
spacing: "none",
|
|
55
|
+
return /*#__PURE__*/_react.default.createElement(_styled.ChevronContainer, null, /*#__PURE__*/_react.default.createElement(_new.IconButton, {
|
|
62
56
|
appearance: "subtle",
|
|
57
|
+
onClick: this.handleClick,
|
|
58
|
+
spacing: "none",
|
|
59
|
+
icon: isExpanded ? _chevronDown.default : _chevronRight.default,
|
|
63
60
|
"aria-controls": ariaControls,
|
|
64
|
-
|
|
65
|
-
}
|
|
66
|
-
label: getLabel(collapseLabel)
|
|
67
|
-
}, iconProps)) : /*#__PURE__*/_react.default.createElement(_chevronRight.default, (0, _extends2.default)({
|
|
68
|
-
label: getLabel(expandLabel)
|
|
69
|
-
}, iconProps)))));
|
|
61
|
+
label: isExpanded ? getLabel(collapseLabel) : getLabel(expandLabel)
|
|
62
|
+
}));
|
|
70
63
|
}
|
|
71
64
|
}]);
|
|
72
65
|
return Chevron;
|
|
@@ -4,14 +4,13 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.indentBase = exports.
|
|
7
|
+
exports.indentBase = exports.TreeRowContainer = exports.LoaderItemContainer = exports.ChevronContainer = void 0;
|
|
8
8
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
9
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
10
|
var _react = require("@emotion/react");
|
|
11
11
|
var _colors = require("@atlaskit/theme/colors");
|
|
12
12
|
var _excluded = ["isRoot"];
|
|
13
13
|
/** @jsx jsx */
|
|
14
|
-
var iconColor = exports.iconColor = "var(--ds-text, ".concat(_colors.N800, ")");
|
|
15
14
|
var indentBase = exports.indentBase = "var(--ds-space-300, 25px)";
|
|
16
15
|
var treeRowContainerStyles = (0, _react.css)({
|
|
17
16
|
display: 'flex',
|
|
@@ -49,24 +48,6 @@ var ChevronContainer = exports.ChevronContainer = function ChevronContainer(prop
|
|
|
49
48
|
css: commonChevronContainerStyles
|
|
50
49
|
}));
|
|
51
50
|
};
|
|
52
|
-
var chevronIconContainerStyles = (0, _react.css)({
|
|
53
|
-
position: 'relative',
|
|
54
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
55
|
-
insetBlockStart: 1
|
|
56
|
-
});
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* __Chevron icon container__
|
|
60
|
-
*
|
|
61
|
-
* A chevron icon container.
|
|
62
|
-
*/
|
|
63
|
-
var ChevronIconContainer = exports.ChevronIconContainer = function ChevronIconContainer(props
|
|
64
|
-
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
65
|
-
) {
|
|
66
|
-
return (0, _react.jsx)("span", (0, _extends2.default)({}, props, {
|
|
67
|
-
css: chevronIconContainerStyles
|
|
68
|
-
}));
|
|
69
|
-
};
|
|
70
51
|
var loadingItemContainerStyles = (0, _react.css)({
|
|
71
52
|
width: '100%',
|
|
72
53
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
@@ -28,7 +28,7 @@ var treeRowClickableStyles = (0, _react2.css)({
|
|
|
28
28
|
cursor: 'pointer'
|
|
29
29
|
});
|
|
30
30
|
var packageName = "@atlaskit/table-tree";
|
|
31
|
-
var packageVersion = "9.6.
|
|
31
|
+
var packageVersion = "9.6.13";
|
|
32
32
|
var Row = exports.RowWithoutAnalytics = /*#__PURE__*/function (_Component) {
|
|
33
33
|
(0, _inherits2.default)(Row, _Component);
|
|
34
34
|
var _super = _createSuper(Row);
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
2
|
/* eslint-disable @repo/internal/react/consistent-props-definitions */
|
|
4
3
|
/* eslint-disable react/prop-types */
|
|
5
4
|
import React, { Component } from 'react';
|
|
6
|
-
import
|
|
5
|
+
import { IconButton } from '@atlaskit/button/new';
|
|
7
6
|
import ChevronDownIcon from '@atlaskit/icon/glyph/chevron-down';
|
|
8
7
|
import ChevronRightIcon from '@atlaskit/icon/glyph/chevron-right';
|
|
9
|
-
import { ChevronContainer
|
|
8
|
+
import { ChevronContainer } from './styled';
|
|
10
9
|
export default class Chevron extends Component {
|
|
11
10
|
constructor(...args) {
|
|
12
11
|
super(...args);
|
|
@@ -25,21 +24,15 @@ export default class Chevron extends Component {
|
|
|
25
24
|
rowId,
|
|
26
25
|
extendedLabel
|
|
27
26
|
} = this.props;
|
|
28
|
-
const iconProps = {
|
|
29
|
-
size: 'medium',
|
|
30
|
-
primaryColor: iconColor
|
|
31
|
-
};
|
|
32
27
|
const getLabel = defaultLabel => extendedLabel ? `${defaultLabel} ${extendedLabel} row` : `${defaultLabel} row ${rowId}`;
|
|
33
|
-
return /*#__PURE__*/React.createElement(ChevronContainer, null, /*#__PURE__*/React.createElement(
|
|
34
|
-
spacing: "none",
|
|
28
|
+
return /*#__PURE__*/React.createElement(ChevronContainer, null, /*#__PURE__*/React.createElement(IconButton, {
|
|
35
29
|
appearance: "subtle",
|
|
30
|
+
onClick: this.handleClick,
|
|
31
|
+
spacing: "none",
|
|
32
|
+
icon: isExpanded ? ChevronDownIcon : ChevronRightIcon,
|
|
36
33
|
"aria-controls": ariaControls,
|
|
37
|
-
|
|
38
|
-
}
|
|
39
|
-
label: getLabel(collapseLabel)
|
|
40
|
-
}, iconProps)) : /*#__PURE__*/React.createElement(ChevronRightIcon, _extends({
|
|
41
|
-
label: getLabel(expandLabel)
|
|
42
|
-
}, iconProps)))));
|
|
34
|
+
label: isExpanded ? getLabel(collapseLabel) : getLabel(expandLabel)
|
|
35
|
+
}));
|
|
43
36
|
}
|
|
44
37
|
}
|
|
45
38
|
_defineProperty(Chevron, "defaultProps", {
|
|
@@ -2,8 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
/** @jsx jsx */
|
|
3
3
|
|
|
4
4
|
import { css, jsx } from '@emotion/react';
|
|
5
|
-
import { N30
|
|
6
|
-
export const iconColor = `var(--ds-text, ${N800})`;
|
|
5
|
+
import { N30 } from '@atlaskit/theme/colors';
|
|
7
6
|
export const indentBase = "var(--ds-space-300, 25px)";
|
|
8
7
|
const treeRowContainerStyles = css({
|
|
9
8
|
display: 'flex',
|
|
@@ -36,22 +35,6 @@ export const ChevronContainer = (props
|
|
|
36
35
|
) => jsx("span", _extends({}, props, {
|
|
37
36
|
css: commonChevronContainerStyles
|
|
38
37
|
}));
|
|
39
|
-
const chevronIconContainerStyles = css({
|
|
40
|
-
position: 'relative',
|
|
41
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
42
|
-
insetBlockStart: 1
|
|
43
|
-
});
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* __Chevron icon container__
|
|
47
|
-
*
|
|
48
|
-
* A chevron icon container.
|
|
49
|
-
*/
|
|
50
|
-
export const ChevronIconContainer = (props
|
|
51
|
-
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
52
|
-
) => jsx("span", _extends({}, props, {
|
|
53
|
-
css: chevronIconContainerStyles
|
|
54
|
-
}));
|
|
55
38
|
const loadingItemContainerStyles = css({
|
|
56
39
|
width: '100%',
|
|
57
40
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
@@ -12,7 +12,7 @@ const treeRowClickableStyles = css({
|
|
|
12
12
|
cursor: 'pointer'
|
|
13
13
|
});
|
|
14
14
|
const packageName = "@atlaskit/table-tree";
|
|
15
|
-
const packageVersion = "9.6.
|
|
15
|
+
const packageVersion = "9.6.13";
|
|
16
16
|
class Row extends Component {
|
|
17
17
|
constructor(...args) {
|
|
18
18
|
super(...args);
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
1
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
3
2
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
4
3
|
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
@@ -11,10 +10,10 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
11
10
|
/* eslint-disable @repo/internal/react/consistent-props-definitions */
|
|
12
11
|
/* eslint-disable react/prop-types */
|
|
13
12
|
import React, { Component } from 'react';
|
|
14
|
-
import
|
|
13
|
+
import { IconButton } from '@atlaskit/button/new';
|
|
15
14
|
import ChevronDownIcon from '@atlaskit/icon/glyph/chevron-down';
|
|
16
15
|
import ChevronRightIcon from '@atlaskit/icon/glyph/chevron-right';
|
|
17
|
-
import { ChevronContainer
|
|
16
|
+
import { ChevronContainer } from './styled';
|
|
18
17
|
var Chevron = /*#__PURE__*/function (_Component) {
|
|
19
18
|
_inherits(Chevron, _Component);
|
|
20
19
|
var _super = _createSuper(Chevron);
|
|
@@ -42,23 +41,17 @@ var Chevron = /*#__PURE__*/function (_Component) {
|
|
|
42
41
|
expandLabel = _this$props.expandLabel,
|
|
43
42
|
rowId = _this$props.rowId,
|
|
44
43
|
extendedLabel = _this$props.extendedLabel;
|
|
45
|
-
var iconProps = {
|
|
46
|
-
size: 'medium',
|
|
47
|
-
primaryColor: iconColor
|
|
48
|
-
};
|
|
49
44
|
var getLabel = function getLabel(defaultLabel) {
|
|
50
45
|
return extendedLabel ? "".concat(defaultLabel, " ").concat(extendedLabel, " row") : "".concat(defaultLabel, " row ").concat(rowId);
|
|
51
46
|
};
|
|
52
|
-
return /*#__PURE__*/React.createElement(ChevronContainer, null, /*#__PURE__*/React.createElement(
|
|
53
|
-
spacing: "none",
|
|
47
|
+
return /*#__PURE__*/React.createElement(ChevronContainer, null, /*#__PURE__*/React.createElement(IconButton, {
|
|
54
48
|
appearance: "subtle",
|
|
49
|
+
onClick: this.handleClick,
|
|
50
|
+
spacing: "none",
|
|
51
|
+
icon: isExpanded ? ChevronDownIcon : ChevronRightIcon,
|
|
55
52
|
"aria-controls": ariaControls,
|
|
56
|
-
|
|
57
|
-
}
|
|
58
|
-
label: getLabel(collapseLabel)
|
|
59
|
-
}, iconProps)) : /*#__PURE__*/React.createElement(ChevronRightIcon, _extends({
|
|
60
|
-
label: getLabel(expandLabel)
|
|
61
|
-
}, iconProps)))));
|
|
53
|
+
label: isExpanded ? getLabel(collapseLabel) : getLabel(expandLabel)
|
|
54
|
+
}));
|
|
62
55
|
}
|
|
63
56
|
}]);
|
|
64
57
|
return Chevron;
|
|
@@ -4,8 +4,7 @@ var _excluded = ["isRoot"];
|
|
|
4
4
|
/** @jsx jsx */
|
|
5
5
|
|
|
6
6
|
import { css, jsx } from '@emotion/react';
|
|
7
|
-
import { N30
|
|
8
|
-
export var iconColor = "var(--ds-text, ".concat(N800, ")");
|
|
7
|
+
import { N30 } from '@atlaskit/theme/colors';
|
|
9
8
|
export var indentBase = "var(--ds-space-300, 25px)";
|
|
10
9
|
var treeRowContainerStyles = css({
|
|
11
10
|
display: 'flex',
|
|
@@ -43,24 +42,6 @@ export var ChevronContainer = function ChevronContainer(props
|
|
|
43
42
|
css: commonChevronContainerStyles
|
|
44
43
|
}));
|
|
45
44
|
};
|
|
46
|
-
var chevronIconContainerStyles = css({
|
|
47
|
-
position: 'relative',
|
|
48
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
49
|
-
insetBlockStart: 1
|
|
50
|
-
});
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* __Chevron icon container__
|
|
54
|
-
*
|
|
55
|
-
* A chevron icon container.
|
|
56
|
-
*/
|
|
57
|
-
export var ChevronIconContainer = function ChevronIconContainer(props
|
|
58
|
-
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
59
|
-
) {
|
|
60
|
-
return jsx("span", _extends({}, props, {
|
|
61
|
-
css: chevronIconContainerStyles
|
|
62
|
-
}));
|
|
63
|
-
};
|
|
64
45
|
var loadingItemContainerStyles = css({
|
|
65
46
|
width: '100%',
|
|
66
47
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
@@ -20,7 +20,7 @@ var treeRowClickableStyles = css({
|
|
|
20
20
|
cursor: 'pointer'
|
|
21
21
|
});
|
|
22
22
|
var packageName = "@atlaskit/table-tree";
|
|
23
|
-
var packageVersion = "9.6.
|
|
23
|
+
var packageVersion = "9.6.13";
|
|
24
24
|
var Row = /*#__PURE__*/function (_Component) {
|
|
25
25
|
_inherits(Row, _Component);
|
|
26
26
|
var _super = _createSuper(Row);
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import type { FC, HTMLAttributes, ReactNode } from 'react';
|
|
3
|
-
export declare const iconColor: "var(--ds-text)";
|
|
4
3
|
export declare const indentBase: "var(--ds-space-300)";
|
|
5
4
|
/**
|
|
6
5
|
* __Tree row container__
|
|
@@ -17,12 +16,6 @@ type ChevronContainerProps = HTMLAttributes<HTMLSpanElement> & {
|
|
|
17
16
|
* A wrapper container around the expand table tree button.
|
|
18
17
|
*/
|
|
19
18
|
export declare const ChevronContainer: FC<ChevronContainerProps>;
|
|
20
|
-
/**
|
|
21
|
-
* __Chevron icon container__
|
|
22
|
-
*
|
|
23
|
-
* A chevron icon container.
|
|
24
|
-
*/
|
|
25
|
-
export declare const ChevronIconContainer: FC<ChevronContainerProps>;
|
|
26
19
|
type LoaderItemContainerProps = {
|
|
27
20
|
isRoot?: boolean;
|
|
28
21
|
children: ReactNode;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import type { FC, HTMLAttributes, ReactNode } from 'react';
|
|
3
|
-
export declare const iconColor: "var(--ds-text)";
|
|
4
3
|
export declare const indentBase: "var(--ds-space-300)";
|
|
5
4
|
/**
|
|
6
5
|
* __Tree row container__
|
|
@@ -17,12 +16,6 @@ type ChevronContainerProps = HTMLAttributes<HTMLSpanElement> & {
|
|
|
17
16
|
* A wrapper container around the expand table tree button.
|
|
18
17
|
*/
|
|
19
18
|
export declare const ChevronContainer: FC<ChevronContainerProps>;
|
|
20
|
-
/**
|
|
21
|
-
* __Chevron icon container__
|
|
22
|
-
*
|
|
23
|
-
* A chevron icon container.
|
|
24
|
-
*/
|
|
25
|
-
export declare const ChevronIconContainer: FC<ChevronContainerProps>;
|
|
26
19
|
type LoaderItemContainerProps = {
|
|
27
20
|
isRoot?: boolean;
|
|
28
21
|
children: ReactNode;
|
|
@@ -12,7 +12,7 @@ import { Item } from './table-tree';
|
|
|
12
12
|
*/
|
|
13
13
|
type RowProps = {
|
|
14
14
|
/**
|
|
15
|
-
* Whether the row has children
|
|
15
|
+
* Whether the row has children.
|
|
16
16
|
*/
|
|
17
17
|
hasChildren?: boolean;
|
|
18
18
|
/**
|
|
@@ -20,10 +20,10 @@ type RowProps = {
|
|
|
20
20
|
*/
|
|
21
21
|
children?: React.ReactNode;
|
|
22
22
|
/**
|
|
23
|
-
* ID for the row item
|
|
23
|
+
* ID for the row item.
|
|
24
24
|
*/
|
|
25
25
|
itemId?: string;
|
|
26
|
-
|
|
26
|
+
/* eslint-disable jsdoc/require-asterisk-prefix, jsdoc/check-alignment */
|
|
27
27
|
/**
|
|
28
28
|
The data used to render the row and descendants. Pass down from `children` render prop.
|
|
29
29
|
|
|
@@ -32,6 +32,7 @@ type RowProps = {
|
|
|
32
32
|
*/
|
|
33
33
|
// eslint-disable-next-line @repo/internal/react/consistent-props-definitions
|
|
34
34
|
items?: Item[] | null;
|
|
35
|
+
/* eslint-enable jsdoc/require-asterisk-prefix, jsdoc/check-alignment */
|
|
35
36
|
/**
|
|
36
37
|
* Controls the expanded state of the row.
|
|
37
38
|
*/
|
|
@@ -41,11 +42,11 @@ type RowProps = {
|
|
|
41
42
|
*/
|
|
42
43
|
isDefaultExpanded?: ReactNode;
|
|
43
44
|
/**
|
|
44
|
-
* `aria-label` attached to the expand chevron button
|
|
45
|
+
* `aria-label` attached to the expand chevron button.
|
|
45
46
|
*/
|
|
46
47
|
expandLabel?: string;
|
|
47
48
|
/**
|
|
48
|
-
* `aria-label` attached to the collapse chevron button
|
|
49
|
+
* `aria-label` attached to the collapse chevron button.
|
|
49
50
|
*/
|
|
50
51
|
collapseLabel?: string;
|
|
51
52
|
/**
|
|
@@ -61,13 +62,14 @@ type RowProps = {
|
|
|
61
62
|
* Normally set by parent Item component and does not need to be configured.
|
|
62
63
|
*/
|
|
63
64
|
renderChildren?: () => React.ReactNode;
|
|
64
|
-
|
|
65
|
+
/* eslint-disable jsdoc/require-asterisk-prefix, jsdoc/check-alignment */
|
|
65
66
|
/**
|
|
66
67
|
Whether a row with children should expand when clicked anywhere within the row. If false or unset, a row with children will only expand when the chevron is clicked.
|
|
67
68
|
|
|
68
69
|
If your cells contain interactive elements, this can cause unexpected expanding or collapsing.
|
|
69
70
|
*/
|
|
70
71
|
shouldExpandOnClick?: boolean;
|
|
72
|
+
/* eslint-enable jsdoc/require-asterisk-prefix, jsdoc/check-alignment */
|
|
71
73
|
/**
|
|
72
74
|
* Data to render. Passed down by Item and passed into onExpand and onCollapse callbacks.
|
|
73
75
|
* Normally set by parent Item component and does not need to be configured.
|
|
@@ -79,7 +81,7 @@ type RowProps = {
|
|
|
79
81
|
* Normally set by parent Item component and does not need to be configured.
|
|
80
82
|
*/
|
|
81
83
|
depth?: number;
|
|
82
|
-
|
|
84
|
+
/* eslint-disable jsdoc/require-asterisk-prefix, jsdoc/check-alignment */
|
|
83
85
|
/**
|
|
84
86
|
Adds detail to the expand and collapse row button's aria label by appending the value from the given column. If you don't set this prop, the aria label will read out "Expand `itemId` row".
|
|
85
87
|
|
|
@@ -88,6 +90,7 @@ type RowProps = {
|
|
|
88
90
|
Should be a number when we pass data via `<Rows />` component as children in `<TableTree />`.
|
|
89
91
|
*/
|
|
90
92
|
mainColumnForExpandCollapseLabel?: string | number;
|
|
93
|
+
/* eslint-enable jsdoc/require-asterisk-prefix, jsdoc/check-alignment */
|
|
91
94
|
};
|
|
92
95
|
|
|
93
96
|
const TableRow = function (props: RowProps) {
|
|
@@ -9,7 +9,7 @@ import { Item } from './table-tree';
|
|
|
9
9
|
* Defining it here for now lets us provide *something* without much headache.
|
|
10
10
|
*/
|
|
11
11
|
type RowsProps = {
|
|
12
|
-
|
|
12
|
+
/* eslint-disable jsdoc/require-asterisk-prefix, jsdoc/check-alignment */
|
|
13
13
|
/**
|
|
14
14
|
The data used to render the set of rows. Will be passed down via the `children` render prop.
|
|
15
15
|
|
|
@@ -18,6 +18,7 @@ type RowsProps = {
|
|
|
18
18
|
*/
|
|
19
19
|
// eslint-disable-next-line @repo/internal/react/consistent-props-definitions
|
|
20
20
|
items?: Item[] | null;
|
|
21
|
+
/* eslint-enable jsdoc/require-asterisk-prefix, jsdoc/check-alignment */
|
|
21
22
|
/**
|
|
22
23
|
* Accessible name for loading states spinner. Can be used for internationalization.
|
|
23
24
|
* Default is "Loading".
|
|
@@ -36,7 +36,7 @@ type TableTreeProps = {
|
|
|
36
36
|
* The header text of the respective columns of the table.
|
|
37
37
|
*/
|
|
38
38
|
headers?: string[];
|
|
39
|
-
|
|
39
|
+
/* eslint-disable jsdoc/require-asterisk-prefix, jsdoc/check-alignment */
|
|
40
40
|
/**
|
|
41
41
|
Whether a row with children should expand when clicked anywhere within the row. If false or unset, a row with children will only expand when the chevron is clicked.
|
|
42
42
|
|
|
@@ -45,7 +45,6 @@ type TableTreeProps = {
|
|
|
45
45
|
If not using the `items` prop, `shouldExpandOnClick` should be used on the row component instead.
|
|
46
46
|
*/
|
|
47
47
|
shouldExpandOnClick?: boolean;
|
|
48
|
-
// eslint-disable-next-line jsdoc/require-asterisk-prefix, jsdoc/check-alignment
|
|
49
48
|
/**
|
|
50
49
|
The data used to render the table.
|
|
51
50
|
|
|
@@ -54,6 +53,7 @@ type TableTreeProps = {
|
|
|
54
53
|
*/
|
|
55
54
|
// eslint-disable-next-line @repo/internal/react/consistent-props-definitions
|
|
56
55
|
items?: Item[] | null;
|
|
56
|
+
/* eslint-enable jsdoc/require-asterisk-prefix, jsdoc/check-alignment */
|
|
57
57
|
/**
|
|
58
58
|
* The value used to extend the expand or collapse button label in cases where `Row` has child rows.
|
|
59
59
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/table-tree",
|
|
3
|
-
"version": "9.6.
|
|
3
|
+
"version": "9.6.13",
|
|
4
4
|
"description": "A table tree is an expandable table for showing nested hierarchies of information.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -26,12 +26,12 @@
|
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@atlaskit/analytics-next": "^9.
|
|
30
|
-
"@atlaskit/button": "^17.
|
|
29
|
+
"@atlaskit/analytics-next": "^9.2.0",
|
|
30
|
+
"@atlaskit/button": "^17.4.0",
|
|
31
31
|
"@atlaskit/icon": "^22.0.0",
|
|
32
32
|
"@atlaskit/spinner": "^16.0.0",
|
|
33
33
|
"@atlaskit/theme": "^12.6.0",
|
|
34
|
-
"@atlaskit/tokens": "^1.
|
|
34
|
+
"@atlaskit/tokens": "^1.37.0",
|
|
35
35
|
"@babel/runtime": "^7.0.0",
|
|
36
36
|
"@emotion/react": "^11.7.1",
|
|
37
37
|
"lodash": "^4.17.21"
|