@atlaskit/progress-tracker 8.4.7 → 8.4.9
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 +12 -0
- package/dist/cjs/internal/bar.js +7 -10
- package/dist/cjs/internal/link.js +6 -9
- package/dist/cjs/internal/marker.js +1 -1
- package/dist/cjs/internal/stage.js +45 -48
- package/dist/cjs/progress-tracker.js +7 -10
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/internal/bar.js +1 -3
- package/dist/es2019/internal/link.js +1 -3
- package/dist/es2019/internal/marker.js +1 -1
- package/dist/es2019/internal/stage.js +44 -47
- package/dist/es2019/progress-tracker.js +6 -9
- package/dist/es2019/version.json +1 -1
- package/dist/esm/internal/bar.js +7 -10
- package/dist/esm/internal/link.js +6 -9
- package/dist/esm/internal/marker.js +1 -1
- package/dist/esm/internal/stage.js +44 -47
- package/dist/esm/progress-tracker.js +6 -9
- package/dist/esm/version.json +1 -1
- package/package.json +5 -5
- package/report.api.md +16 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/progress-tracker
|
|
2
2
|
|
|
3
|
+
## 8.4.9
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`2e01c9c74b5`](https://bitbucket.org/atlassian/atlassian-frontend/commits/2e01c9c74b5) - DUMMY remove before merging to master; dupe adf-schema via adf-utils
|
|
8
|
+
|
|
9
|
+
## 8.4.8
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`173f6371859`](https://bitbucket.org/atlassian/atlassian-frontend/commits/173f6371859) - Migrates unit tests from enzyme to RTL.
|
|
14
|
+
|
|
3
15
|
## 8.4.7
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/cjs/internal/bar.js
CHANGED
|
@@ -31,16 +31,13 @@ var progressBarStyles = (0, _react.css)({
|
|
|
31
31
|
var ProgressBar = function ProgressBar(_ref) {
|
|
32
32
|
var percentageComplete = _ref.percentageComplete,
|
|
33
33
|
testId = _ref.testId;
|
|
34
|
-
return (
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
"
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
css: progressBarStyles
|
|
42
|
-
})
|
|
43
|
-
);
|
|
34
|
+
return (0, _react.jsx)("div", {
|
|
35
|
+
"data-testid": testId,
|
|
36
|
+
style: {
|
|
37
|
+
width: "calc(".concat(percentageComplete, "% + ").concat(percentageComplete / 100, " * calc(var(").concat(_constants2.varSpacing, ", ").concat(_constants.spacing.cosy, ") + ").concat(_constants2.HALF_GRID_SIZE, "))")
|
|
38
|
+
},
|
|
39
|
+
css: progressBarStyles
|
|
40
|
+
});
|
|
44
41
|
};
|
|
45
42
|
var _default = ProgressBar;
|
|
46
43
|
exports.default = _default;
|
|
@@ -21,15 +21,12 @@ var Link = function Link(_ref) {
|
|
|
21
21
|
onClick = _ref.onClick,
|
|
22
22
|
label = _ref.label,
|
|
23
23
|
testId = _ref.testId;
|
|
24
|
-
return (
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
"data-testid": testId
|
|
31
|
-
}, label)
|
|
32
|
-
);
|
|
24
|
+
return (0, _react.jsx)("a", {
|
|
25
|
+
css: linkStyles,
|
|
26
|
+
href: href,
|
|
27
|
+
onClick: onClick,
|
|
28
|
+
"data-testid": testId
|
|
29
|
+
}, label);
|
|
33
30
|
};
|
|
34
31
|
var _default = Link;
|
|
35
32
|
exports.default = _default;
|
|
@@ -42,7 +42,7 @@ var ProgressMarker = function ProgressMarker(_ref) {
|
|
|
42
42
|
var testId = _ref.testId;
|
|
43
43
|
return (
|
|
44
44
|
// too many props that would go in UNSAFE_style + css transition prop having issues
|
|
45
|
-
|
|
45
|
+
|
|
46
46
|
(0, _react.jsx)("div", {
|
|
47
47
|
"data-testid": testId,
|
|
48
48
|
css: progressMarkerStyles
|
|
@@ -24,7 +24,7 @@ var _utils = require("./utils");
|
|
|
24
24
|
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; }
|
|
25
25
|
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; }
|
|
26
26
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
27
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
27
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /* eslint-disable @repo/internal/styles/no-nested-styles */ /** @jsx jsx */
|
|
28
28
|
var listItemStyles = (0, _react2.css)({
|
|
29
29
|
margin: "var(--ds-space-0, 0px)",
|
|
30
30
|
overflowWrap: 'break-word'
|
|
@@ -96,53 +96,50 @@ var ProgressTrackerStage = /*#__PURE__*/function (_PureComponent) {
|
|
|
96
96
|
testId = _this$props.testId;
|
|
97
97
|
var ariaCurrent = item.status === 'current' ? 'step' : 'false';
|
|
98
98
|
var listInlineStyles = (_listInlineStyles = {}, (0, _defineProperty2.default)(_listInlineStyles, _constants.varTransitionSpeed, "".concat(transitionSpeed, "ms")), (0, _defineProperty2.default)(_listInlineStyles, _constants.varTransitionDelay, "".concat(transitionDelay, "ms")), (0, _defineProperty2.default)(_listInlineStyles, _constants.varTransitionEasing, transitionEasing), (0, _defineProperty2.default)(_listInlineStyles, _constants.varMarkerColor, this.state.oldMarkerColor), (0, _defineProperty2.default)(_listInlineStyles, _constants.varBackgroundColor, (0, _utils.getMarkerColor)(item.status)), _listInlineStyles);
|
|
99
|
-
return (
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
item: item
|
|
144
|
-
}) : item.label)))))
|
|
145
|
-
);
|
|
99
|
+
return (0, _react2.jsx)("li", {
|
|
100
|
+
"data-testid": testId,
|
|
101
|
+
style: listInlineStyles,
|
|
102
|
+
css: listItemStyles,
|
|
103
|
+
"aria-current": ariaCurrent
|
|
104
|
+
}, (0, _react2.jsx)(_box.default, {
|
|
105
|
+
display: "block",
|
|
106
|
+
UNSAFE_style: {
|
|
107
|
+
width: '100%'
|
|
108
|
+
}
|
|
109
|
+
}, (0, _react2.jsx)(_reactTransitionGroup.CSSTransition, {
|
|
110
|
+
appear: true,
|
|
111
|
+
in: this.state.transitioning,
|
|
112
|
+
onEntered: this.onEntered,
|
|
113
|
+
timeout: transitionDelay + transitionSpeed,
|
|
114
|
+
classNames: "fade"
|
|
115
|
+
}, (0, _react2.jsx)(_marker.default, {
|
|
116
|
+
testId: testId && "".concat(testId, "-marker")
|
|
117
|
+
})), (0, _react2.jsx)(_reactTransitionGroup.CSSTransition, {
|
|
118
|
+
appear: true,
|
|
119
|
+
in: this.state.transitioning,
|
|
120
|
+
onEntered: this.onEntered,
|
|
121
|
+
timeout: transitionDelay + transitionSpeed,
|
|
122
|
+
classNames: "fade"
|
|
123
|
+
}, (0, _react2.jsx)(_bar.default, {
|
|
124
|
+
testId: testId && "".concat(testId, "-bar"),
|
|
125
|
+
percentageComplete: item.percentageComplete
|
|
126
|
+
})), (0, _react2.jsx)(_reactTransitionGroup.CSSTransition, {
|
|
127
|
+
appear: true,
|
|
128
|
+
in: this.state.transitioning,
|
|
129
|
+
onEntered: this.onEntered,
|
|
130
|
+
timeout: transitionDelay + transitionSpeed,
|
|
131
|
+
classNames: "fade"
|
|
132
|
+
}, (0, _react2.jsx)("div", {
|
|
133
|
+
css: titleStyles
|
|
134
|
+
}, (0, _react2.jsx)(_text.default, {
|
|
135
|
+
fontSize: "size.100",
|
|
136
|
+
lineHeight: "lineHeight.100",
|
|
137
|
+
testId: testId && "".concat(testId, "-title"),
|
|
138
|
+
color: (0, _utils.getTextColor)(item.status),
|
|
139
|
+
fontWeight: (0, _utils.getFontWeight)(item.status)
|
|
140
|
+
}, this.shouldShowLink() ? render.link({
|
|
141
|
+
item: item
|
|
142
|
+
}) : item.label)))));
|
|
146
143
|
}
|
|
147
144
|
}]);
|
|
148
145
|
return ProgressTrackerStage;
|
|
@@ -21,7 +21,7 @@ var _stage = _interopRequireDefault(require("./internal/stage"));
|
|
|
21
21
|
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; }
|
|
22
22
|
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; }
|
|
23
23
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
24
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
24
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /* eslint-disable @repo/internal/styles/no-nested-styles */ /** @jsx jsx */
|
|
25
25
|
var containerStyles = (0, _react2.css)({
|
|
26
26
|
display: 'grid',
|
|
27
27
|
width: '100%',
|
|
@@ -119,15 +119,12 @@ var ProgressTracker = /*#__PURE__*/function (_PureComponent) {
|
|
|
119
119
|
var listInlineStyles = (_listInlineStyles = {
|
|
120
120
|
gridTemplateColumns: "repeat(".concat(items.length, ", 1fr)")
|
|
121
121
|
}, (0, _defineProperty2.default)(_listInlineStyles, _constants2.varSpacing, _constants.spacing[this.props.spacing]), (0, _defineProperty2.default)(_listInlineStyles, "maxWidth", 8 * 10 * items.length * 2), _listInlineStyles);
|
|
122
|
-
return (
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
"aria-label": label
|
|
129
|
-
}, items)
|
|
130
|
-
);
|
|
122
|
+
return (0, _react2.jsx)("ul", {
|
|
123
|
+
"data-testid": testId,
|
|
124
|
+
style: listInlineStyles,
|
|
125
|
+
css: containerStyles,
|
|
126
|
+
"aria-label": label
|
|
127
|
+
}, items);
|
|
131
128
|
}
|
|
132
129
|
}]);
|
|
133
130
|
return ProgressTracker;
|
package/dist/cjs/version.json
CHANGED
|
@@ -24,9 +24,7 @@ const progressBarStyles = css({
|
|
|
24
24
|
const ProgressBar = ({
|
|
25
25
|
percentageComplete,
|
|
26
26
|
testId
|
|
27
|
-
}) =>
|
|
28
|
-
// eslint-disable-next-line @repo/internal/react/use-primitives
|
|
29
|
-
jsx("div", {
|
|
27
|
+
}) => jsx("div", {
|
|
30
28
|
"data-testid": testId,
|
|
31
29
|
style: {
|
|
32
30
|
width: `calc(${percentageComplete}% + ${percentageComplete / 100} * calc(var(${varSpacing}, ${spacing.cosy}) + ${HALF_GRID_SIZE}))`
|
|
@@ -36,7 +36,7 @@ const ProgressMarker = ({
|
|
|
36
36
|
testId
|
|
37
37
|
}) =>
|
|
38
38
|
// too many props that would go in UNSAFE_style + css transition prop having issues
|
|
39
|
-
|
|
39
|
+
|
|
40
40
|
jsx("div", {
|
|
41
41
|
"data-testid": testId,
|
|
42
42
|
css: progressMarkerStyles
|
|
@@ -76,52 +76,49 @@ export default class ProgressTrackerStage extends PureComponent {
|
|
|
76
76
|
[varMarkerColor]: this.state.oldMarkerColor,
|
|
77
77
|
[varBackgroundColor]: getMarkerColor(item.status)
|
|
78
78
|
};
|
|
79
|
-
return (
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
item
|
|
124
|
-
}) : item.label)))))
|
|
125
|
-
);
|
|
79
|
+
return jsx("li", {
|
|
80
|
+
"data-testid": testId,
|
|
81
|
+
style: listInlineStyles,
|
|
82
|
+
css: listItemStyles,
|
|
83
|
+
"aria-current": ariaCurrent
|
|
84
|
+
}, jsx(Box, {
|
|
85
|
+
display: "block",
|
|
86
|
+
UNSAFE_style: {
|
|
87
|
+
width: '100%'
|
|
88
|
+
}
|
|
89
|
+
}, jsx(CSSTransition, {
|
|
90
|
+
appear: true,
|
|
91
|
+
in: this.state.transitioning,
|
|
92
|
+
onEntered: this.onEntered,
|
|
93
|
+
timeout: transitionDelay + transitionSpeed,
|
|
94
|
+
classNames: "fade"
|
|
95
|
+
}, jsx(ProgressMarker, {
|
|
96
|
+
testId: testId && `${testId}-marker`
|
|
97
|
+
})), jsx(CSSTransition, {
|
|
98
|
+
appear: true,
|
|
99
|
+
in: this.state.transitioning,
|
|
100
|
+
onEntered: this.onEntered,
|
|
101
|
+
timeout: transitionDelay + transitionSpeed,
|
|
102
|
+
classNames: "fade"
|
|
103
|
+
}, jsx(ProgressBar, {
|
|
104
|
+
testId: testId && `${testId}-bar`,
|
|
105
|
+
percentageComplete: item.percentageComplete
|
|
106
|
+
})), jsx(CSSTransition, {
|
|
107
|
+
appear: true,
|
|
108
|
+
in: this.state.transitioning,
|
|
109
|
+
onEntered: this.onEntered,
|
|
110
|
+
timeout: transitionDelay + transitionSpeed,
|
|
111
|
+
classNames: "fade"
|
|
112
|
+
}, jsx("div", {
|
|
113
|
+
css: titleStyles
|
|
114
|
+
}, jsx(Text, {
|
|
115
|
+
fontSize: "size.100",
|
|
116
|
+
lineHeight: "lineHeight.100",
|
|
117
|
+
testId: testId && `${testId}-title`,
|
|
118
|
+
color: getTextColor(item.status),
|
|
119
|
+
fontWeight: getFontWeight(item.status)
|
|
120
|
+
}, this.shouldShowLink() ? render.link({
|
|
121
|
+
item
|
|
122
|
+
}) : item.label)))));
|
|
126
123
|
}
|
|
127
124
|
}
|
|
@@ -83,15 +83,12 @@ export default class ProgressTracker extends PureComponent {
|
|
|
83
83
|
[varSpacing]: spacing[this.props.spacing],
|
|
84
84
|
maxWidth: 8 * 10 * items.length * 2
|
|
85
85
|
};
|
|
86
|
-
return (
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
"aria-label": label
|
|
93
|
-
}, items)
|
|
94
|
-
);
|
|
86
|
+
return jsx("ul", {
|
|
87
|
+
"data-testid": testId,
|
|
88
|
+
style: listInlineStyles,
|
|
89
|
+
css: containerStyles,
|
|
90
|
+
"aria-label": label
|
|
91
|
+
}, items);
|
|
95
92
|
}
|
|
96
93
|
}
|
|
97
94
|
_defineProperty(ProgressTracker, "defaultProps", {
|
package/dist/es2019/version.json
CHANGED
package/dist/esm/internal/bar.js
CHANGED
|
@@ -24,15 +24,12 @@ var progressBarStyles = css({
|
|
|
24
24
|
var ProgressBar = function ProgressBar(_ref) {
|
|
25
25
|
var percentageComplete = _ref.percentageComplete,
|
|
26
26
|
testId = _ref.testId;
|
|
27
|
-
return (
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
"
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
css: progressBarStyles
|
|
35
|
-
})
|
|
36
|
-
);
|
|
27
|
+
return jsx("div", {
|
|
28
|
+
"data-testid": testId,
|
|
29
|
+
style: {
|
|
30
|
+
width: "calc(".concat(percentageComplete, "% + ").concat(percentageComplete / 100, " * calc(var(").concat(varSpacing, ", ").concat(spacing.cosy, ") + ").concat(HALF_GRID_SIZE, "))")
|
|
31
|
+
},
|
|
32
|
+
css: progressBarStyles
|
|
33
|
+
});
|
|
37
34
|
};
|
|
38
35
|
export default ProgressBar;
|
|
@@ -15,14 +15,11 @@ var Link = function Link(_ref) {
|
|
|
15
15
|
onClick = _ref.onClick,
|
|
16
16
|
label = _ref.label,
|
|
17
17
|
testId = _ref.testId;
|
|
18
|
-
return (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
"data-testid": testId
|
|
25
|
-
}, label)
|
|
26
|
-
);
|
|
18
|
+
return jsx("a", {
|
|
19
|
+
css: linkStyles,
|
|
20
|
+
href: href,
|
|
21
|
+
onClick: onClick,
|
|
22
|
+
"data-testid": testId
|
|
23
|
+
}, label);
|
|
27
24
|
};
|
|
28
25
|
export default Link;
|
|
@@ -36,7 +36,7 @@ var ProgressMarker = function ProgressMarker(_ref) {
|
|
|
36
36
|
var testId = _ref.testId;
|
|
37
37
|
return (
|
|
38
38
|
// too many props that would go in UNSAFE_style + css transition prop having issues
|
|
39
|
-
|
|
39
|
+
|
|
40
40
|
jsx("div", {
|
|
41
41
|
"data-testid": testId,
|
|
42
42
|
css: progressMarkerStyles
|
|
@@ -91,53 +91,50 @@ var ProgressTrackerStage = /*#__PURE__*/function (_PureComponent) {
|
|
|
91
91
|
testId = _this$props.testId;
|
|
92
92
|
var ariaCurrent = item.status === 'current' ? 'step' : 'false';
|
|
93
93
|
var listInlineStyles = (_listInlineStyles = {}, _defineProperty(_listInlineStyles, varTransitionSpeed, "".concat(transitionSpeed, "ms")), _defineProperty(_listInlineStyles, varTransitionDelay, "".concat(transitionDelay, "ms")), _defineProperty(_listInlineStyles, varTransitionEasing, transitionEasing), _defineProperty(_listInlineStyles, varMarkerColor, this.state.oldMarkerColor), _defineProperty(_listInlineStyles, varBackgroundColor, getMarkerColor(item.status)), _listInlineStyles);
|
|
94
|
-
return (
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
item: item
|
|
139
|
-
}) : item.label)))))
|
|
140
|
-
);
|
|
94
|
+
return jsx("li", {
|
|
95
|
+
"data-testid": testId,
|
|
96
|
+
style: listInlineStyles,
|
|
97
|
+
css: listItemStyles,
|
|
98
|
+
"aria-current": ariaCurrent
|
|
99
|
+
}, jsx(Box, {
|
|
100
|
+
display: "block",
|
|
101
|
+
UNSAFE_style: {
|
|
102
|
+
width: '100%'
|
|
103
|
+
}
|
|
104
|
+
}, jsx(CSSTransition, {
|
|
105
|
+
appear: true,
|
|
106
|
+
in: this.state.transitioning,
|
|
107
|
+
onEntered: this.onEntered,
|
|
108
|
+
timeout: transitionDelay + transitionSpeed,
|
|
109
|
+
classNames: "fade"
|
|
110
|
+
}, jsx(ProgressMarker, {
|
|
111
|
+
testId: testId && "".concat(testId, "-marker")
|
|
112
|
+
})), jsx(CSSTransition, {
|
|
113
|
+
appear: true,
|
|
114
|
+
in: this.state.transitioning,
|
|
115
|
+
onEntered: this.onEntered,
|
|
116
|
+
timeout: transitionDelay + transitionSpeed,
|
|
117
|
+
classNames: "fade"
|
|
118
|
+
}, jsx(ProgressBar, {
|
|
119
|
+
testId: testId && "".concat(testId, "-bar"),
|
|
120
|
+
percentageComplete: item.percentageComplete
|
|
121
|
+
})), jsx(CSSTransition, {
|
|
122
|
+
appear: true,
|
|
123
|
+
in: this.state.transitioning,
|
|
124
|
+
onEntered: this.onEntered,
|
|
125
|
+
timeout: transitionDelay + transitionSpeed,
|
|
126
|
+
classNames: "fade"
|
|
127
|
+
}, jsx("div", {
|
|
128
|
+
css: titleStyles
|
|
129
|
+
}, jsx(Text, {
|
|
130
|
+
fontSize: "size.100",
|
|
131
|
+
lineHeight: "lineHeight.100",
|
|
132
|
+
testId: testId && "".concat(testId, "-title"),
|
|
133
|
+
color: getTextColor(item.status),
|
|
134
|
+
fontWeight: getFontWeight(item.status)
|
|
135
|
+
}, this.shouldShowLink() ? render.link({
|
|
136
|
+
item: item
|
|
137
|
+
}) : item.label)))));
|
|
141
138
|
}
|
|
142
139
|
}]);
|
|
143
140
|
return ProgressTrackerStage;
|
|
@@ -114,15 +114,12 @@ var ProgressTracker = /*#__PURE__*/function (_PureComponent) {
|
|
|
114
114
|
var listInlineStyles = (_listInlineStyles = {
|
|
115
115
|
gridTemplateColumns: "repeat(".concat(items.length, ", 1fr)")
|
|
116
116
|
}, _defineProperty(_listInlineStyles, varSpacing, spacing[this.props.spacing]), _defineProperty(_listInlineStyles, "maxWidth", 8 * 10 * items.length * 2), _listInlineStyles);
|
|
117
|
-
return (
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
"aria-label": label
|
|
124
|
-
}, items)
|
|
125
|
-
);
|
|
117
|
+
return jsx("ul", {
|
|
118
|
+
"data-testid": testId,
|
|
119
|
+
style: listInlineStyles,
|
|
120
|
+
css: containerStyles,
|
|
121
|
+
"aria-label": label
|
|
122
|
+
}, items);
|
|
126
123
|
}
|
|
127
124
|
}]);
|
|
128
125
|
return ProgressTracker;
|
package/dist/esm/version.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/progress-tracker",
|
|
3
|
-
"version": "8.4.
|
|
3
|
+
"version": "8.4.9",
|
|
4
4
|
"description": "A progress tracker displays the steps and progress through a journey.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@atlaskit/ds-explorations": "^2.0.0",
|
|
27
|
-
"@atlaskit/theme": "^12.
|
|
27
|
+
"@atlaskit/theme": "^12.4.0",
|
|
28
28
|
"@atlaskit/tokens": "^1.2.0",
|
|
29
29
|
"@babel/runtime": "^7.0.0",
|
|
30
30
|
"@emotion/react": "^11.7.1",
|
|
@@ -34,17 +34,17 @@
|
|
|
34
34
|
"react": "^16.8.0"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@atlaskit/button": "^16.
|
|
37
|
+
"@atlaskit/button": "^16.6.0",
|
|
38
38
|
"@atlaskit/docs": "*",
|
|
39
39
|
"@atlaskit/ds-lib": "^2.0.1",
|
|
40
40
|
"@atlaskit/icon": "^21.11.0",
|
|
41
|
-
"@atlaskit/primitives": "^0.
|
|
41
|
+
"@atlaskit/primitives": "^0.8.0",
|
|
42
42
|
"@atlaskit/section-message": "^6.3.0",
|
|
43
43
|
"@atlaskit/ssr": "*",
|
|
44
44
|
"@atlaskit/visual-regression": "*",
|
|
45
45
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
46
46
|
"@testing-library/react": "^12.1.5",
|
|
47
|
-
"
|
|
47
|
+
"@testing-library/user-event": "^14.4.3",
|
|
48
48
|
"react-dom": "^16.8.0",
|
|
49
49
|
"react-router-dom": "^4.2.2",
|
|
50
50
|
"react-test-renderer": "^16.8.0",
|
package/report.api.md
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
### Table of contents
|
|
9
9
|
|
|
10
10
|
- [Main Entry Types](#main-entry-types)
|
|
11
|
+
- [Peer Dependencies](#peer-dependencies)
|
|
11
12
|
|
|
12
13
|
### Main Entry Types
|
|
13
14
|
|
|
@@ -79,9 +80,9 @@ type Spacing = keyof typeof spacing;
|
|
|
79
80
|
|
|
80
81
|
// @public
|
|
81
82
|
const spacing: {
|
|
82
|
-
readonly comfortable:
|
|
83
|
-
readonly cosy:
|
|
84
|
-
readonly compact:
|
|
83
|
+
readonly comfortable: 'var(--ds-space-500)';
|
|
84
|
+
readonly cosy: 'var(--ds-space-200)';
|
|
85
|
+
readonly compact: 'var(--ds-space-050)';
|
|
85
86
|
};
|
|
86
87
|
|
|
87
88
|
// @public (undocumented)
|
|
@@ -118,3 +119,15 @@ type Status = 'current' | 'disabled' | 'unvisited' | 'visited';
|
|
|
118
119
|
```
|
|
119
120
|
|
|
120
121
|
<!--SECTION END: Main Entry Types-->
|
|
122
|
+
|
|
123
|
+
### Peer Dependencies
|
|
124
|
+
|
|
125
|
+
<!--SECTION START: Peer Dependencies-->
|
|
126
|
+
|
|
127
|
+
```json
|
|
128
|
+
{
|
|
129
|
+
"react": "^16.8.0"
|
|
130
|
+
}
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
<!--SECTION END: Peer Dependencies-->
|