@atlaskit/progress-tracker 8.2.5 → 8.3.1
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 +16 -0
- package/constants/package.json +8 -1
- package/dist/cjs/internal/bar.js +3 -3
- package/dist/cjs/internal/link.js +3 -3
- package/dist/cjs/internal/marker.js +3 -3
- package/dist/cjs/internal/stage.js +12 -12
- package/dist/cjs/progress-tracker.js +5 -5
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/internal/bar.js +1 -1
- package/dist/es2019/internal/link.js +1 -1
- package/dist/es2019/internal/marker.js +1 -1
- package/dist/es2019/internal/stage.js +1 -1
- package/dist/es2019/progress-tracker.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/internal/bar.js +1 -1
- package/dist/esm/internal/link.js +1 -1
- package/dist/esm/internal/marker.js +1 -1
- package/dist/esm/internal/stage.js +1 -1
- package/dist/esm/progress-tracker.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/internal/bar.d.ts +2 -2
- package/dist/types/internal/stage.d.ts +2 -1
- package/dist/types/progress-tracker.d.ts +3 -2
- package/dist/types-ts4.0/constants.d.ts +10 -0
- package/dist/types-ts4.0/index.d.ts +3 -0
- package/dist/types-ts4.0/internal/bar.d.ts +13 -0
- package/dist/types-ts4.0/internal/constants.d.ts +14 -0
- package/dist/types-ts4.0/internal/link.d.ts +10 -0
- package/dist/types-ts4.0/internal/marker.d.ts +11 -0
- package/dist/types-ts4.0/internal/stage.d.ts +18 -0
- package/dist/types-ts4.0/internal/types.d.ts +27 -0
- package/dist/types-ts4.0/internal/utils.d.ts +4 -0
- package/dist/types-ts4.0/progress-tracker.d.ts +58 -0
- package/dist/types-ts4.0/types.d.ts +26 -0
- package/package.json +14 -6
- package/types/package.json +8 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/progress-tracker
|
|
2
2
|
|
|
3
|
+
## 8.3.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`8cc2f888c83`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8cc2f888c83) - Upgrade Typescript from `4.3.5` to `4.5.5`
|
|
8
|
+
|
|
9
|
+
## 8.3.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [`099a8b4949e`](https://bitbucket.org/atlassian/atlassian-frontend/commits/099a8b4949e) - Updates `@emotion/core` to `@emotion/react`; v10 to v11. There is no expected behavior change.
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
|
|
3
19
|
## 8.2.5
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
package/constants/package.json
CHANGED
|
@@ -4,5 +4,12 @@
|
|
|
4
4
|
"module": "../dist/esm/constants.js",
|
|
5
5
|
"module:es2019": "../dist/es2019/constants.js",
|
|
6
6
|
"sideEffects": false,
|
|
7
|
-
"types": "../dist/types/constants.d.ts"
|
|
7
|
+
"types": "../dist/types/constants.d.ts",
|
|
8
|
+
"typesVersions": {
|
|
9
|
+
">=4.0 <4.5": {
|
|
10
|
+
"*": [
|
|
11
|
+
"../dist/types-ts4.0/constants.d.ts"
|
|
12
|
+
]
|
|
13
|
+
}
|
|
14
|
+
}
|
|
8
15
|
}
|
package/dist/cjs/internal/bar.js
CHANGED
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _react = require("@emotion/react");
|
|
9
9
|
|
|
10
10
|
var _colors = require("@atlaskit/theme/colors");
|
|
11
11
|
|
|
@@ -14,7 +14,7 @@ var _constants = require("../constants");
|
|
|
14
14
|
var _constants2 = require("./constants");
|
|
15
15
|
|
|
16
16
|
/** @jsx jsx */
|
|
17
|
-
var progressBarStyles = (0,
|
|
17
|
+
var progressBarStyles = (0, _react.css)({
|
|
18
18
|
height: _constants2.PROGRESS_BAR_HEIGHT,
|
|
19
19
|
position: 'absolute',
|
|
20
20
|
left: '50%',
|
|
@@ -35,7 +35,7 @@ var progressBarStyles = (0, _core.css)({
|
|
|
35
35
|
var ProgressBar = function ProgressBar(_ref) {
|
|
36
36
|
var percentageComplete = _ref.percentageComplete,
|
|
37
37
|
testId = _ref.testId;
|
|
38
|
-
return (0,
|
|
38
|
+
return (0, _react.jsx)("div", {
|
|
39
39
|
"data-testid": testId,
|
|
40
40
|
style: {
|
|
41
41
|
width: "calc(".concat(percentageComplete, "% + ").concat(percentageComplete / 100, " * calc(var(").concat(_constants2.varSpacing, ", ").concat(_constants.spacing.cosy, "px) + ").concat(_constants2.HALF_GRID_SIZE, "px))")
|
|
@@ -5,12 +5,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _react = require("@emotion/react");
|
|
9
9
|
|
|
10
10
|
var _colors = require("@atlaskit/theme/colors");
|
|
11
11
|
|
|
12
12
|
/** @jsx jsx */
|
|
13
|
-
var linkStyles = (0,
|
|
13
|
+
var linkStyles = (0, _react.css)({
|
|
14
14
|
color: "var(--ds-text, ".concat(_colors.N800, ")"),
|
|
15
15
|
cursor: 'pointer'
|
|
16
16
|
});
|
|
@@ -23,7 +23,7 @@ var Link = function Link(_ref) {
|
|
|
23
23
|
onClick = _ref.onClick,
|
|
24
24
|
label = _ref.label,
|
|
25
25
|
testId = _ref.testId;
|
|
26
|
-
return (0,
|
|
26
|
+
return (0, _react.jsx)("a", {
|
|
27
27
|
css: linkStyles,
|
|
28
28
|
href: href,
|
|
29
29
|
onClick: onClick,
|
|
@@ -5,14 +5,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _react = require("@emotion/react");
|
|
9
9
|
|
|
10
10
|
var _constants = require("./constants");
|
|
11
11
|
|
|
12
12
|
/* eslint-disable @repo/internal/styles/no-nested-styles */
|
|
13
13
|
|
|
14
14
|
/** @jsx jsx */
|
|
15
|
-
var progressMarkerStyles = (0,
|
|
15
|
+
var progressMarkerStyles = (0, _react.css)({
|
|
16
16
|
width: _constants.PROGRESS_BAR_HEIGHT,
|
|
17
17
|
height: _constants.PROGRESS_BAR_HEIGHT,
|
|
18
18
|
position: 'absolute',
|
|
@@ -43,7 +43,7 @@ var progressMarkerStyles = (0, _core.css)({
|
|
|
43
43
|
|
|
44
44
|
var ProgressMarker = function ProgressMarker(_ref) {
|
|
45
45
|
var testId = _ref.testId;
|
|
46
|
-
return (0,
|
|
46
|
+
return (0, _react.jsx)("div", {
|
|
47
47
|
"data-testid": testId,
|
|
48
48
|
css: progressMarkerStyles
|
|
49
49
|
});
|
|
@@ -23,7 +23,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
23
23
|
|
|
24
24
|
var _react = require("react");
|
|
25
25
|
|
|
26
|
-
var
|
|
26
|
+
var _react2 = require("@emotion/react");
|
|
27
27
|
|
|
28
28
|
var _reactTransitionGroup = require("react-transition-group");
|
|
29
29
|
|
|
@@ -45,15 +45,15 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
45
45
|
|
|
46
46
|
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; } }
|
|
47
47
|
|
|
48
|
-
var containerStyles = (0,
|
|
48
|
+
var containerStyles = (0, _react2.css)({
|
|
49
49
|
width: '100%',
|
|
50
50
|
position: 'relative'
|
|
51
51
|
});
|
|
52
|
-
var listItemStyles = (0,
|
|
52
|
+
var listItemStyles = (0, _react2.css)({
|
|
53
53
|
margin: 0,
|
|
54
54
|
overflowWrap: 'break-word'
|
|
55
55
|
});
|
|
56
|
-
var titleStyles = (0,
|
|
56
|
+
var titleStyles = (0, _react2.css)({
|
|
57
57
|
marginTop: _constants2.LABEL_TOP_SPACING,
|
|
58
58
|
marginRight: 'auto',
|
|
59
59
|
marginLeft: 'auto',
|
|
@@ -126,37 +126,37 @@ var ProgressTrackerStage = /*#__PURE__*/function (_PureComponent) {
|
|
|
126
126
|
transitionEasing = _this$props.transitionEasing,
|
|
127
127
|
testId = _this$props.testId;
|
|
128
128
|
var ariaCurrent = item.status === 'current' ? 'step' : 'false';
|
|
129
|
-
return (0,
|
|
129
|
+
return (0, _react2.jsx)("li", {
|
|
130
130
|
"data-testid": testId,
|
|
131
131
|
style: (_ref = {}, (0, _defineProperty2.default)(_ref, _constants2.varTransitionSpeed, "".concat(transitionSpeed, "ms")), (0, _defineProperty2.default)(_ref, _constants2.varTransitionDelay, "".concat(transitionDelay, "ms")), (0, _defineProperty2.default)(_ref, _constants2.varTransitionEasing, transitionEasing), (0, _defineProperty2.default)(_ref, _constants2.varMarkerColor, this.state.oldMarkerColor), (0, _defineProperty2.default)(_ref, _constants2.varBackgroundColor, (0, _utils.getMarkerColor)(item.status)), _ref),
|
|
132
132
|
css: listItemStyles,
|
|
133
133
|
"aria-current": ariaCurrent
|
|
134
|
-
}, (0,
|
|
134
|
+
}, (0, _react2.jsx)("div", {
|
|
135
135
|
css: containerStyles
|
|
136
|
-
}, (0,
|
|
136
|
+
}, (0, _react2.jsx)(_reactTransitionGroup.CSSTransition, {
|
|
137
137
|
appear: true,
|
|
138
138
|
in: this.state.transitioning,
|
|
139
139
|
onEntered: this.onEntered,
|
|
140
140
|
timeout: transitionDelay + transitionSpeed,
|
|
141
141
|
classNames: "fade"
|
|
142
|
-
}, (0,
|
|
142
|
+
}, (0, _react2.jsx)(_marker.default, {
|
|
143
143
|
testId: testId && "".concat(testId, "-marker")
|
|
144
|
-
})), (0,
|
|
144
|
+
})), (0, _react2.jsx)(_reactTransitionGroup.CSSTransition, {
|
|
145
145
|
appear: true,
|
|
146
146
|
in: this.state.transitioning,
|
|
147
147
|
onEntered: this.onEntered,
|
|
148
148
|
timeout: transitionDelay + transitionSpeed,
|
|
149
149
|
classNames: "fade"
|
|
150
|
-
}, (0,
|
|
150
|
+
}, (0, _react2.jsx)(_bar.default, {
|
|
151
151
|
testId: testId && "".concat(testId, "-bar"),
|
|
152
152
|
percentageComplete: item.percentageComplete
|
|
153
|
-
})), (0,
|
|
153
|
+
})), (0, _react2.jsx)(_reactTransitionGroup.CSSTransition, {
|
|
154
154
|
appear: true,
|
|
155
155
|
in: this.state.transitioning,
|
|
156
156
|
onEntered: this.onEntered,
|
|
157
157
|
timeout: transitionDelay + transitionSpeed,
|
|
158
158
|
classNames: "fade"
|
|
159
|
-
}, (0,
|
|
159
|
+
}, (0, _react2.jsx)("div", {
|
|
160
160
|
css: titleStyles,
|
|
161
161
|
"data-testid": testId && "".concat(testId, "-title"),
|
|
162
162
|
style: {
|
|
@@ -23,7 +23,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
23
23
|
|
|
24
24
|
var _react = require("react");
|
|
25
25
|
|
|
26
|
-
var
|
|
26
|
+
var _react2 = require("@emotion/react");
|
|
27
27
|
|
|
28
28
|
var _constants = require("./constants");
|
|
29
29
|
|
|
@@ -41,7 +41,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
41
41
|
|
|
42
42
|
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; } }
|
|
43
43
|
|
|
44
|
-
var containerStyles = (0,
|
|
44
|
+
var containerStyles = (0, _react2.css)({
|
|
45
45
|
display: 'grid',
|
|
46
46
|
width: '100%',
|
|
47
47
|
margin: '0 auto',
|
|
@@ -137,7 +137,7 @@ var ProgressTracker = /*#__PURE__*/function (_PureComponent) {
|
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
139
|
|
|
140
|
-
return (0,
|
|
140
|
+
return (0, _react2.jsx)(_stage.default, {
|
|
141
141
|
transitionSpeed: transitionSpeed,
|
|
142
142
|
transitionDelay: transitionDelay,
|
|
143
143
|
transitionEasing: transitionEasing,
|
|
@@ -146,7 +146,7 @@ var ProgressTracker = /*#__PURE__*/function (_PureComponent) {
|
|
|
146
146
|
render: _this3.props.render
|
|
147
147
|
});
|
|
148
148
|
});
|
|
149
|
-
return (0,
|
|
149
|
+
return (0, _react2.jsx)("ul", {
|
|
150
150
|
"data-testid": testId,
|
|
151
151
|
style: (_ref = {
|
|
152
152
|
gridTemplateColumns: "repeat(".concat(items.length, ", 1fr)")
|
|
@@ -166,7 +166,7 @@ exports.default = ProgressTracker;
|
|
|
166
166
|
render: {
|
|
167
167
|
link: function link(_ref2) {
|
|
168
168
|
var item = _ref2.item;
|
|
169
|
-
return (0,
|
|
169
|
+
return (0, _react2.jsx)(_link.default, item);
|
|
170
170
|
}
|
|
171
171
|
},
|
|
172
172
|
animated: true,
|
package/dist/cjs/version.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
-
import { css, jsx } from '@emotion/
|
|
2
|
+
import { css, jsx } from '@emotion/react';
|
|
3
3
|
import { B300 } from '@atlaskit/theme/colors';
|
|
4
4
|
import { spacing } from '../constants';
|
|
5
5
|
import { HALF_GRID_SIZE, LABEL_TOP_SPACING, PROGRESS_BAR_HEIGHT, varSpacing, varTransitionDelay, varTransitionEasing, varTransitionSpeed } from './constants';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* eslint-disable @repo/internal/styles/no-nested-styles */
|
|
2
2
|
|
|
3
3
|
/** @jsx jsx */
|
|
4
|
-
import { css, jsx } from '@emotion/
|
|
4
|
+
import { css, jsx } from '@emotion/react';
|
|
5
5
|
import { LABEL_TOP_SPACING, PROGRESS_BAR_HEIGHT, varBackgroundColor, varMarkerColor, varTransitionDelay, varTransitionEasing, varTransitionSpeed } from './constants';
|
|
6
6
|
const progressMarkerStyles = css({
|
|
7
7
|
width: PROGRESS_BAR_HEIGHT,
|
|
@@ -4,7 +4,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
4
4
|
|
|
5
5
|
/** @jsx jsx */
|
|
6
6
|
import { PureComponent } from 'react';
|
|
7
|
-
import { css, jsx } from '@emotion/
|
|
7
|
+
import { css, jsx } from '@emotion/react';
|
|
8
8
|
import { CSSTransition } from 'react-transition-group';
|
|
9
9
|
import { fontSize } from '@atlaskit/theme/constants';
|
|
10
10
|
import ProgressBar from './bar';
|
|
@@ -4,7 +4,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
4
4
|
|
|
5
5
|
/** @jsx jsx */
|
|
6
6
|
import { PureComponent } from 'react';
|
|
7
|
-
import { css, jsx } from '@emotion/
|
|
7
|
+
import { css, jsx } from '@emotion/react';
|
|
8
8
|
import { defaultGridSize, spacing } from './constants';
|
|
9
9
|
import { ANIMATION_EASE_OUT, LINEAR_TRANSITION_SPEED, TRANSITION_SPEED, varSpacing } from './internal/constants';
|
|
10
10
|
import Link from './internal/link';
|
package/dist/es2019/version.json
CHANGED
package/dist/esm/internal/bar.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
-
import { css, jsx } from '@emotion/
|
|
2
|
+
import { css, jsx } from '@emotion/react';
|
|
3
3
|
import { B300 } from '@atlaskit/theme/colors';
|
|
4
4
|
import { spacing } from '../constants';
|
|
5
5
|
import { HALF_GRID_SIZE, LABEL_TOP_SPACING, PROGRESS_BAR_HEIGHT, varSpacing, varTransitionDelay, varTransitionEasing, varTransitionSpeed } from './constants';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* eslint-disable @repo/internal/styles/no-nested-styles */
|
|
2
2
|
|
|
3
3
|
/** @jsx jsx */
|
|
4
|
-
import { css, jsx } from '@emotion/
|
|
4
|
+
import { css, jsx } from '@emotion/react';
|
|
5
5
|
import { LABEL_TOP_SPACING, PROGRESS_BAR_HEIGHT, varBackgroundColor, varMarkerColor, varTransitionDelay, varTransitionEasing, varTransitionSpeed } from './constants';
|
|
6
6
|
var progressMarkerStyles = css({
|
|
7
7
|
width: PROGRESS_BAR_HEIGHT,
|
|
@@ -18,7 +18,7 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
18
18
|
|
|
19
19
|
/** @jsx jsx */
|
|
20
20
|
import { PureComponent } from 'react';
|
|
21
|
-
import { css, jsx } from '@emotion/
|
|
21
|
+
import { css, jsx } from '@emotion/react';
|
|
22
22
|
import { CSSTransition } from 'react-transition-group';
|
|
23
23
|
import { fontSize } from '@atlaskit/theme/constants';
|
|
24
24
|
import ProgressBar from './bar';
|
|
@@ -18,7 +18,7 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
18
18
|
|
|
19
19
|
/** @jsx jsx */
|
|
20
20
|
import { PureComponent } from 'react';
|
|
21
|
-
import { css, jsx } from '@emotion/
|
|
21
|
+
import { css, jsx } from '@emotion/react';
|
|
22
22
|
import { defaultGridSize, spacing } from './constants';
|
|
23
23
|
import { ANIMATION_EASE_OUT, LINEAR_TRANSITION_SPEED, TRANSITION_SPEED, varSpacing } from './internal/constants';
|
|
24
24
|
import Link from './internal/link';
|
package/dist/esm/version.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import { jsx } from '@emotion/react';
|
|
2
2
|
interface StageBarProps {
|
|
3
3
|
testId?: string;
|
|
4
4
|
percentageComplete: number;
|
|
@@ -9,5 +9,5 @@ interface StageBarProps {
|
|
|
9
9
|
* A progress bar describes the horizontal tracking bar that traverses each individual step.
|
|
10
10
|
*
|
|
11
11
|
*/
|
|
12
|
-
declare const ProgressBar: ({ percentageComplete, testId }: StageBarProps) => JSX.Element;
|
|
12
|
+
declare const ProgressBar: ({ percentageComplete, testId }: StageBarProps) => jsx.JSX.Element;
|
|
13
13
|
export default ProgressBar;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { PureComponent } from 'react';
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
3
4
|
import type { ProgressTrackerStageProps } from './types';
|
|
4
5
|
interface State {
|
|
5
6
|
transitioning: boolean;
|
|
@@ -13,5 +14,5 @@ export default class ProgressTrackerStage extends PureComponent<ProgressTrackerS
|
|
|
13
14
|
UNSAFE_componentWillReceiveProps(): void;
|
|
14
15
|
shouldShowLink(): boolean;
|
|
15
16
|
onEntered: () => void;
|
|
16
|
-
render(): JSX.Element;
|
|
17
|
+
render(): jsx.JSX.Element;
|
|
17
18
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { PureComponent } from 'react';
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
3
4
|
import type { LinkComponentProps, ProgressTrackerStageRenderProp, Spacing, Stages } from './types';
|
|
4
5
|
export interface ProgressTrackerProps {
|
|
5
6
|
/**
|
|
@@ -35,7 +36,7 @@ export default class ProgressTracker extends PureComponent<ProgressTrackerProps,
|
|
|
35
36
|
items: never[];
|
|
36
37
|
spacing: string;
|
|
37
38
|
render: {
|
|
38
|
-
link: ({ item }: LinkComponentProps) => JSX.Element;
|
|
39
|
+
link: ({ item }: LinkComponentProps) => jsx.JSX.Element;
|
|
39
40
|
};
|
|
40
41
|
animated: boolean;
|
|
41
42
|
label: string;
|
|
@@ -52,6 +53,6 @@ export default class ProgressTracker extends PureComponent<ProgressTrackerProps,
|
|
|
52
53
|
}[];
|
|
53
54
|
};
|
|
54
55
|
UNSAFE_componentWillReceiveProps(nextProps: ProgressTrackerProps): void;
|
|
55
|
-
render(): JSX.Element;
|
|
56
|
+
render(): jsx.JSX.Element;
|
|
56
57
|
}
|
|
57
58
|
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const defaultGridSize: number;
|
|
2
|
+
/**
|
|
3
|
+
* Ideally these are exported by @atlaskit/page
|
|
4
|
+
*/
|
|
5
|
+
export declare const spacing: {
|
|
6
|
+
readonly comfortable: number;
|
|
7
|
+
readonly cosy: number;
|
|
8
|
+
readonly compact: number;
|
|
9
|
+
};
|
|
10
|
+
export declare type Spacing = keyof typeof spacing;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx } from '@emotion/react';
|
|
2
|
+
interface StageBarProps {
|
|
3
|
+
testId?: string;
|
|
4
|
+
percentageComplete: number;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* __Progress bar__
|
|
8
|
+
*
|
|
9
|
+
* A progress bar describes the horizontal tracking bar that traverses each individual step.
|
|
10
|
+
*
|
|
11
|
+
*/
|
|
12
|
+
declare const ProgressBar: ({ percentageComplete, testId }: StageBarProps) => jsx.JSX.Element;
|
|
13
|
+
export default ProgressBar;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const TRANSITION_SPEED = 300;
|
|
2
|
+
export declare const LINEAR_TRANSITION_SPEED = 50;
|
|
3
|
+
export declare const ANIMATION_EASE_OUT = "cubic-bezier(0.15,1,0.3,1)";
|
|
4
|
+
export declare const varSpacing = "--ds--pt--sp";
|
|
5
|
+
export declare const varTransitionSpeed = "--ds--pt--ts";
|
|
6
|
+
export declare const varTransitionDelay = "--ds--pt--td";
|
|
7
|
+
export declare const varTransitionEasing = "--ds--pt--te";
|
|
8
|
+
export declare const varMarkerColor = "--ds--pt--mc";
|
|
9
|
+
export declare const varBackgroundColor = "--ds--pt--bg";
|
|
10
|
+
export declare const SEMI_BOLD_FONT_WEIGHT = "600";
|
|
11
|
+
export declare const REGULAR_FONT_WEIGHT = "400";
|
|
12
|
+
export declare const HALF_GRID_SIZE: number;
|
|
13
|
+
export declare const PROGRESS_BAR_HEIGHT: number;
|
|
14
|
+
export declare const LABEL_TOP_SPACING: number;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { PureComponent } from 'react';
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
4
|
+
import type { ProgressTrackerStageProps } from './types';
|
|
5
|
+
interface State {
|
|
6
|
+
transitioning: boolean;
|
|
7
|
+
oldMarkerColor?: string;
|
|
8
|
+
oldPercentageComplete: number;
|
|
9
|
+
}
|
|
10
|
+
export type { ProgressTrackerStageProps };
|
|
11
|
+
export default class ProgressTrackerStage extends PureComponent<ProgressTrackerStageProps, State> {
|
|
12
|
+
constructor(props: ProgressTrackerStageProps);
|
|
13
|
+
UNSAFE_componentWillMount(): void;
|
|
14
|
+
UNSAFE_componentWillReceiveProps(): void;
|
|
15
|
+
shouldShowLink(): boolean;
|
|
16
|
+
onEntered: () => void;
|
|
17
|
+
render(): jsx.JSX.Element;
|
|
18
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { ProgressTrackerStageRenderProp, Stage } from '../types';
|
|
2
|
+
export interface ProgressTrackerStageProps {
|
|
3
|
+
/**
|
|
4
|
+
* stage data passed to each `ProgressTrackerStage` component
|
|
5
|
+
*/
|
|
6
|
+
item: Stage;
|
|
7
|
+
/**
|
|
8
|
+
* render prop to specify how to render components
|
|
9
|
+
*/
|
|
10
|
+
render: ProgressTrackerStageRenderProp;
|
|
11
|
+
/**
|
|
12
|
+
* An internal hook applied to key elements for automated testing
|
|
13
|
+
*/
|
|
14
|
+
testId?: string;
|
|
15
|
+
/**
|
|
16
|
+
* delay before transitioning in ms
|
|
17
|
+
*/
|
|
18
|
+
transitionDelay: number;
|
|
19
|
+
/**
|
|
20
|
+
* speed at which to transition in ms
|
|
21
|
+
*/
|
|
22
|
+
transitionSpeed: number;
|
|
23
|
+
/**
|
|
24
|
+
* interface of easing for transition
|
|
25
|
+
*/
|
|
26
|
+
transitionEasing: string;
|
|
27
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { Status } from '../types';
|
|
2
|
+
export declare const getMarkerColor: (status: Status) => "var(--ds-icon-subtle)" | "var(--ds-icon-brand)" | undefined;
|
|
3
|
+
export declare const getTextColor: (status: Status) => "var(--ds-text)" | "var(--ds-text-subtlest)" | "var(--ds-text-brand)" | "var(--ds-text-disabled)" | undefined;
|
|
4
|
+
export declare const getFontWeight: (status: Status) => "600" | "400" | undefined;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { PureComponent } from 'react';
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
4
|
+
import type { LinkComponentProps, ProgressTrackerStageRenderProp, Spacing, Stages } from './types';
|
|
5
|
+
export interface ProgressTrackerProps {
|
|
6
|
+
/**
|
|
7
|
+
* Ordered list of stage data
|
|
8
|
+
*/
|
|
9
|
+
items: Stages;
|
|
10
|
+
/**
|
|
11
|
+
* Margin spacing type between steps
|
|
12
|
+
*/
|
|
13
|
+
spacing: Spacing;
|
|
14
|
+
/**
|
|
15
|
+
* Render prop to specify custom implementations of components
|
|
16
|
+
*/
|
|
17
|
+
render: ProgressTrackerStageRenderProp;
|
|
18
|
+
/**
|
|
19
|
+
* Turns off transition animations if set to false
|
|
20
|
+
*/
|
|
21
|
+
animated: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* A `testId` prop is provided for specified elements, which is a unique string that appears as a data attribute `data-testid` in the rendered code, serving as a hook for automated tests
|
|
24
|
+
*/
|
|
25
|
+
testId?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Text to be used as an aria-label of progress tracker
|
|
28
|
+
*/
|
|
29
|
+
label?: string;
|
|
30
|
+
}
|
|
31
|
+
interface State {
|
|
32
|
+
prevStages: Stages;
|
|
33
|
+
}
|
|
34
|
+
export default class ProgressTracker extends PureComponent<ProgressTrackerProps, State> {
|
|
35
|
+
static defaultProps: {
|
|
36
|
+
items: never[];
|
|
37
|
+
spacing: string;
|
|
38
|
+
render: {
|
|
39
|
+
link: ({ item }: LinkComponentProps) => jsx.JSX.Element;
|
|
40
|
+
};
|
|
41
|
+
animated: boolean;
|
|
42
|
+
label: string;
|
|
43
|
+
};
|
|
44
|
+
state: {
|
|
45
|
+
prevStages: {
|
|
46
|
+
percentageComplete: number;
|
|
47
|
+
id: string;
|
|
48
|
+
label: string;
|
|
49
|
+
status: import("./types").Status;
|
|
50
|
+
noLink?: boolean | undefined;
|
|
51
|
+
href?: string | undefined;
|
|
52
|
+
onClick?: (() => void) | undefined;
|
|
53
|
+
}[];
|
|
54
|
+
};
|
|
55
|
+
UNSAFE_componentWillReceiveProps(nextProps: ProgressTrackerProps): void;
|
|
56
|
+
render(): jsx.JSX.Element;
|
|
57
|
+
}
|
|
58
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
/**
|
|
3
|
+
* Ideally these are exported by @atlaskit/page
|
|
4
|
+
*/
|
|
5
|
+
export type { Spacing } from './constants';
|
|
6
|
+
export declare type Status = 'unvisited' | 'visited' | 'current' | 'disabled';
|
|
7
|
+
/**
|
|
8
|
+
* @deprecated
|
|
9
|
+
*/
|
|
10
|
+
export declare type StatusType = Status;
|
|
11
|
+
export interface Stage {
|
|
12
|
+
id: string;
|
|
13
|
+
label: string;
|
|
14
|
+
percentageComplete: number;
|
|
15
|
+
status: Status;
|
|
16
|
+
noLink?: boolean;
|
|
17
|
+
href?: string;
|
|
18
|
+
onClick?: () => void;
|
|
19
|
+
}
|
|
20
|
+
export declare type Stages = Stage[];
|
|
21
|
+
export interface LinkComponentProps {
|
|
22
|
+
item: Stage;
|
|
23
|
+
}
|
|
24
|
+
export interface ProgressTrackerStageRenderProp {
|
|
25
|
+
link: (props: LinkComponentProps) => JSX.Element;
|
|
26
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/progress-tracker",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.3.1",
|
|
4
4
|
"description": "A progress tracker displays the steps and progress through a journey.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -12,6 +12,13 @@
|
|
|
12
12
|
"module": "dist/esm/index.js",
|
|
13
13
|
"module:es2019": "dist/es2019/index.js",
|
|
14
14
|
"types": "dist/types/index.d.ts",
|
|
15
|
+
"typesVersions": {
|
|
16
|
+
">=4.0 <4.5": {
|
|
17
|
+
"*": [
|
|
18
|
+
"dist/types-ts4.0/*"
|
|
19
|
+
]
|
|
20
|
+
}
|
|
21
|
+
},
|
|
15
22
|
"sideEffects": false,
|
|
16
23
|
"atlaskit:src": "src/index.tsx",
|
|
17
24
|
"atlassian": {
|
|
@@ -23,10 +30,10 @@
|
|
|
23
30
|
}
|
|
24
31
|
},
|
|
25
32
|
"dependencies": {
|
|
26
|
-
"@atlaskit/theme": "^12.
|
|
33
|
+
"@atlaskit/theme": "^12.2.0",
|
|
27
34
|
"@atlaskit/tokens": "^0.10.0",
|
|
28
35
|
"@babel/runtime": "^7.0.0",
|
|
29
|
-
"@emotion/
|
|
36
|
+
"@emotion/react": "^11.7.1",
|
|
30
37
|
"react-transition-group": "^4.4.1"
|
|
31
38
|
},
|
|
32
39
|
"peerDependencies": {
|
|
@@ -35,17 +42,18 @@
|
|
|
35
42
|
"devDependencies": {
|
|
36
43
|
"@atlaskit/button": "^16.3.0",
|
|
37
44
|
"@atlaskit/docs": "*",
|
|
45
|
+
"@atlaskit/ds-lib": "^2.0.1",
|
|
38
46
|
"@atlaskit/icon": "^21.10.0",
|
|
39
|
-
"@atlaskit/section-message": "^6.
|
|
47
|
+
"@atlaskit/section-message": "^6.2.0",
|
|
40
48
|
"@atlaskit/ssr": "*",
|
|
41
49
|
"@atlaskit/visual-regression": "*",
|
|
42
50
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
43
|
-
"@testing-library/react": "^
|
|
51
|
+
"@testing-library/react": "^12.1.5",
|
|
44
52
|
"enzyme": "^3.10.0",
|
|
45
53
|
"react-dom": "^16.8.0",
|
|
46
54
|
"react-router-dom": "^4.2.2",
|
|
47
55
|
"react-test-renderer": "^16.8.0",
|
|
48
|
-
"typescript": "4.
|
|
56
|
+
"typescript": "4.5.5"
|
|
49
57
|
},
|
|
50
58
|
"techstack": {
|
|
51
59
|
"@atlassian/frontend": {
|
package/types/package.json
CHANGED
|
@@ -4,5 +4,12 @@
|
|
|
4
4
|
"module": "../dist/esm/types.js",
|
|
5
5
|
"module:es2019": "../dist/es2019/types.js",
|
|
6
6
|
"sideEffects": false,
|
|
7
|
-
"types": "../dist/types/types.d.ts"
|
|
7
|
+
"types": "../dist/types/types.d.ts",
|
|
8
|
+
"typesVersions": {
|
|
9
|
+
">=4.0 <4.5": {
|
|
10
|
+
"*": [
|
|
11
|
+
"../dist/types-ts4.0/types.d.ts"
|
|
12
|
+
]
|
|
13
|
+
}
|
|
14
|
+
}
|
|
8
15
|
}
|