@atlaskit/table-tree 9.7.1 → 9.8.0
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 +6 -0
- package/dist/cjs/components/row.js +1 -1
- package/dist/cjs/components/table-tree.js +5 -1
- package/dist/es2019/components/row.js +1 -1
- package/dist/es2019/components/table-tree.js +5 -1
- package/dist/esm/components/row.js +1 -1
- package/dist/esm/components/table-tree.js +5 -1
- package/extract-react-types/table-tree.tsx +10 -0
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/table-tree
|
|
2
2
|
|
|
3
|
+
## 9.8.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#87326](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/87326) [`a79d6ea51b5a`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/a79d6ea51b5a) - Introducing props `label` and `referencedLabel` to provide/reference accessible name for TableTree.
|
|
8
|
+
|
|
3
9
|
## 9.7.1
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -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.
|
|
31
|
+
var packageVersion = "9.8.0";
|
|
32
32
|
var Row = exports.RowWithoutAnalytics = /*#__PURE__*/function (_Component) {
|
|
33
33
|
(0, _inherits2.default)(Row, _Component);
|
|
34
34
|
var _super = _createSuper(Row);
|
|
@@ -67,6 +67,8 @@ var TableTree = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
67
67
|
value: function render() {
|
|
68
68
|
var _this$props = this.props,
|
|
69
69
|
items = _this$props.items,
|
|
70
|
+
label = _this$props.label,
|
|
71
|
+
referencedLabel = _this$props.referencedLabel,
|
|
70
72
|
shouldExpandOnClick = _this$props.shouldExpandOnClick,
|
|
71
73
|
headers = _this$props.headers,
|
|
72
74
|
columns = _this$props.columns,
|
|
@@ -118,7 +120,9 @@ var TableTree = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
118
120
|
}
|
|
119
121
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
120
122
|
role: "treegrid",
|
|
121
|
-
"aria-readonly": true
|
|
123
|
+
"aria-readonly": true,
|
|
124
|
+
"aria-label": label,
|
|
125
|
+
"aria-labelledby": referencedLabel
|
|
122
126
|
}, heads, rows, this.props.children));
|
|
123
127
|
}
|
|
124
128
|
}]);
|
|
@@ -40,6 +40,8 @@ export default class TableTree extends Component {
|
|
|
40
40
|
render() {
|
|
41
41
|
const {
|
|
42
42
|
items,
|
|
43
|
+
label,
|
|
44
|
+
referencedLabel,
|
|
43
45
|
shouldExpandOnClick,
|
|
44
46
|
headers,
|
|
45
47
|
columns,
|
|
@@ -87,7 +89,9 @@ export default class TableTree extends Component {
|
|
|
87
89
|
}
|
|
88
90
|
}, /*#__PURE__*/React.createElement("div", {
|
|
89
91
|
role: "treegrid",
|
|
90
|
-
"aria-readonly": true
|
|
92
|
+
"aria-readonly": true,
|
|
93
|
+
"aria-label": label,
|
|
94
|
+
"aria-labelledby": referencedLabel
|
|
91
95
|
}, heads, rows, this.props.children));
|
|
92
96
|
}
|
|
93
97
|
}
|
|
@@ -20,7 +20,7 @@ var treeRowClickableStyles = css({
|
|
|
20
20
|
cursor: 'pointer'
|
|
21
21
|
});
|
|
22
22
|
var packageName = "@atlaskit/table-tree";
|
|
23
|
-
var packageVersion = "9.
|
|
23
|
+
var packageVersion = "9.8.0";
|
|
24
24
|
var Row = /*#__PURE__*/function (_Component) {
|
|
25
25
|
_inherits(Row, _Component);
|
|
26
26
|
var _super = _createSuper(Row);
|
|
@@ -58,6 +58,8 @@ var TableTree = /*#__PURE__*/function (_Component) {
|
|
|
58
58
|
value: function render() {
|
|
59
59
|
var _this$props = this.props,
|
|
60
60
|
items = _this$props.items,
|
|
61
|
+
label = _this$props.label,
|
|
62
|
+
referencedLabel = _this$props.referencedLabel,
|
|
61
63
|
shouldExpandOnClick = _this$props.shouldExpandOnClick,
|
|
62
64
|
headers = _this$props.headers,
|
|
63
65
|
columns = _this$props.columns,
|
|
@@ -109,7 +111,9 @@ var TableTree = /*#__PURE__*/function (_Component) {
|
|
|
109
111
|
}
|
|
110
112
|
}, /*#__PURE__*/React.createElement("div", {
|
|
111
113
|
role: "treegrid",
|
|
112
|
-
"aria-readonly": true
|
|
114
|
+
"aria-readonly": true,
|
|
115
|
+
"aria-label": label,
|
|
116
|
+
"aria-labelledby": referencedLabel
|
|
113
117
|
}, heads, rows, this.props.children));
|
|
114
118
|
}
|
|
115
119
|
}]);
|
|
@@ -61,6 +61,16 @@ type TableTreeProps = {
|
|
|
61
61
|
* Should be a number when we pass data via `<Rows />` component as children in `<TableTree />`.
|
|
62
62
|
*/
|
|
63
63
|
mainColumnForExpandCollapseLabel?: string | number;
|
|
64
|
+
/**
|
|
65
|
+
* Refers to an `aria-label` attribute. Use label to describe the table for assistive technologies.
|
|
66
|
+
* Usage of either this, or the `labelId` attribute is strongly recommended.
|
|
67
|
+
*/
|
|
68
|
+
label?: string;
|
|
69
|
+
/**
|
|
70
|
+
* Refers to an `aria-labelledby` attribute. Pass an id of the element which should define an accessible name for the table.
|
|
71
|
+
* Usage of either this, or the `label` attribute is strongly recommended.
|
|
72
|
+
*/
|
|
73
|
+
referencedLabel?: string;
|
|
64
74
|
};
|
|
65
75
|
|
|
66
76
|
export default function (props: TableTreeProps) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/table-tree",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.8.0",
|
|
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/"
|
|
@@ -27,11 +27,11 @@
|
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@atlaskit/analytics-next": "^9.2.0",
|
|
30
|
-
"@atlaskit/button": "^17.
|
|
30
|
+
"@atlaskit/button": "^17.11.0",
|
|
31
31
|
"@atlaskit/icon": "^22.1.0",
|
|
32
32
|
"@atlaskit/spinner": "^16.0.0",
|
|
33
|
-
"@atlaskit/theme": "^12.
|
|
34
|
-
"@atlaskit/tokens": "^1.
|
|
33
|
+
"@atlaskit/theme": "^12.7.0",
|
|
34
|
+
"@atlaskit/tokens": "^1.43.0",
|
|
35
35
|
"@babel/runtime": "^7.0.0",
|
|
36
36
|
"@emotion/react": "^11.7.1",
|
|
37
37
|
"lodash": "^4.17.21"
|