@atlaskit/table-tree 9.6.11 → 9.6.12
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/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/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/table-tree
|
|
2
2
|
|
|
3
|
+
## 9.6.12
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#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.
|
|
8
|
+
|
|
3
9
|
## 9.6.11
|
|
4
10
|
|
|
5
11
|
### 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.12";
|
|
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.12";
|
|
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.12";
|
|
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;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/table-tree",
|
|
3
|
-
"version": "9.6.
|
|
3
|
+
"version": "9.6.12",
|
|
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/"
|
|
@@ -31,7 +31,7 @@
|
|
|
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.34.0",
|
|
35
35
|
"@babel/runtime": "^7.0.0",
|
|
36
36
|
"@emotion/react": "^11.7.1",
|
|
37
37
|
"lodash": "^4.17.21"
|