@atlaskit/progress-tracker 8.3.3 → 8.4.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 +12 -0
- package/dist/cjs/constants.js +4 -9
- package/dist/cjs/internal/bar.js +10 -8
- package/dist/cjs/internal/constants.js +3 -6
- package/dist/cjs/internal/link.js +8 -6
- package/dist/cjs/internal/marker.js +8 -5
- package/dist/cjs/internal/stage.js +52 -51
- package/dist/cjs/internal/utils.js +4 -4
- package/dist/cjs/progress-tracker.js +14 -13
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/constants.js +3 -6
- package/dist/es2019/internal/bar.js +4 -3
- package/dist/es2019/internal/constants.js +3 -4
- package/dist/es2019/internal/link.js +2 -1
- package/dist/es2019/internal/marker.js +4 -2
- package/dist/es2019/internal/stage.js +54 -54
- package/dist/es2019/internal/utils.js +5 -5
- package/dist/es2019/progress-tracker.js +14 -13
- package/dist/es2019/version.json +1 -1
- package/dist/esm/constants.js +3 -6
- package/dist/esm/internal/bar.js +10 -8
- package/dist/esm/internal/constants.js +3 -4
- package/dist/esm/internal/link.js +8 -6
- package/dist/esm/internal/marker.js +8 -5
- package/dist/esm/internal/stage.js +49 -49
- package/dist/esm/internal/utils.js +5 -5
- package/dist/esm/progress-tracker.js +15 -14
- package/dist/esm/version.json +1 -1
- package/dist/types/constants.d.ts +3 -4
- package/dist/types/internal/bar.d.ts +1 -0
- package/dist/types/internal/constants.d.ts +3 -3
- package/dist/types/internal/utils.d.ts +2 -1
- package/package.json +6 -12
- package/report.api.md +48 -41
- package/dist/types-ts4.0/constants.d.ts +0 -10
- package/dist/types-ts4.0/index.d.ts +0 -3
- package/dist/types-ts4.0/internal/bar.d.ts +0 -13
- package/dist/types-ts4.0/internal/constants.d.ts +0 -14
- package/dist/types-ts4.0/internal/link.d.ts +0 -10
- package/dist/types-ts4.0/internal/marker.d.ts +0 -11
- package/dist/types-ts4.0/internal/stage.d.ts +0 -18
- package/dist/types-ts4.0/internal/types.d.ts +0 -27
- package/dist/types-ts4.0/internal/utils.d.ts +0 -4
- package/dist/types-ts4.0/progress-tracker.d.ts +0 -58
- package/dist/types-ts4.0/types.d.ts +0 -26
|
@@ -5,7 +5,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
5
5
|
/** @jsx jsx */
|
|
6
6
|
import { PureComponent } from 'react';
|
|
7
7
|
import { css, jsx } from '@emotion/react';
|
|
8
|
-
import {
|
|
8
|
+
import { 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';
|
|
11
11
|
import Stage from './internal/stage';
|
|
@@ -14,13 +14,11 @@ const containerStyles = css({
|
|
|
14
14
|
width: '100%',
|
|
15
15
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
|
|
16
16
|
margin: '0 auto',
|
|
17
|
-
// TODO Delete this comment after verifying spacing token -> previous value `0`
|
|
18
17
|
padding: "var(--ds-scale-0, 0px)",
|
|
19
18
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
|
|
20
19
|
gap: `var(${varSpacing})`,
|
|
21
20
|
listStyleType: 'none',
|
|
22
21
|
'&&': {
|
|
23
|
-
// TODO Delete this comment after verifying spacing token -> previous value `40`
|
|
24
22
|
marginTop: "var(--ds-scale-500, 40px)"
|
|
25
23
|
}
|
|
26
24
|
});
|
|
@@ -87,16 +85,19 @@ export default class ProgressTracker extends PureComponent {
|
|
|
87
85
|
render: this.props.render
|
|
88
86
|
});
|
|
89
87
|
});
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
88
|
+
const listInlineStyles = {
|
|
89
|
+
gridTemplateColumns: `repeat(${items.length}, 1fr)`,
|
|
90
|
+
[varSpacing]: spacing[this.props.spacing],
|
|
91
|
+
maxWidth: 8 * 10 * items.length * 2
|
|
92
|
+
};
|
|
93
|
+
return (// eslint-disable-next-line @repo/internal/react/use-primitives
|
|
94
|
+
jsx("ul", {
|
|
95
|
+
"data-testid": testId,
|
|
96
|
+
style: listInlineStyles,
|
|
97
|
+
css: containerStyles,
|
|
98
|
+
"aria-label": label
|
|
99
|
+
}, items)
|
|
100
|
+
);
|
|
100
101
|
}
|
|
101
102
|
|
|
102
103
|
}
|
package/dist/es2019/version.json
CHANGED
package/dist/esm/constants.js
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
import { gridSize as getGridSize } from '@atlaskit/theme/constants';
|
|
2
|
-
export var defaultGridSize = getGridSize();
|
|
3
1
|
/**
|
|
4
2
|
* Ideally these are exported by @atlaskit/page
|
|
5
3
|
*/
|
|
6
|
-
|
|
7
4
|
export var spacing = {
|
|
8
|
-
comfortable:
|
|
9
|
-
cosy:
|
|
10
|
-
compact:
|
|
5
|
+
comfortable: "var(--ds-scale-500, 40px)",
|
|
6
|
+
cosy: "var(--ds-scale-200, 16px)",
|
|
7
|
+
compact: "var(--ds-scale-050, 4px)"
|
|
11
8
|
};
|
package/dist/esm/internal/bar.js
CHANGED
|
@@ -10,7 +10,7 @@ var progressBarStyles = css({
|
|
|
10
10
|
backgroundColor: "var(--ds-background-brand-bold, ".concat(B300, ")"),
|
|
11
11
|
borderBottomRightRadius: PROGRESS_BAR_HEIGHT,
|
|
12
12
|
borderTopRightRadius: PROGRESS_BAR_HEIGHT,
|
|
13
|
-
transform: "translate(0, -".concat(LABEL_TOP_SPACING, "
|
|
13
|
+
transform: "translate(0, calc(-1 * ".concat(LABEL_TOP_SPACING, "))"),
|
|
14
14
|
transition: "width var(".concat(varTransitionSpeed, ") var(").concat(varTransitionEasing, ")"),
|
|
15
15
|
transitionDelay: "var(".concat(varTransitionDelay, ")")
|
|
16
16
|
});
|
|
@@ -24,13 +24,15 @@ 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
|
-
|
|
27
|
+
return (// eslint-disable-next-line @repo/internal/react/use-primitives
|
|
28
|
+
jsx("div", {
|
|
29
|
+
"data-testid": testId,
|
|
30
|
+
style: {
|
|
31
|
+
width: "calc(".concat(percentageComplete, "% + ").concat(percentageComplete / 100, " * calc(var(").concat(varSpacing, ", ").concat(spacing.cosy, ") + ").concat(HALF_GRID_SIZE, "))")
|
|
32
|
+
},
|
|
33
|
+
css: progressBarStyles
|
|
34
|
+
})
|
|
35
|
+
);
|
|
34
36
|
};
|
|
35
37
|
|
|
36
38
|
export default ProgressBar;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { defaultGridSize } from '../constants';
|
|
2
1
|
export var TRANSITION_SPEED = 300;
|
|
3
2
|
export var LINEAR_TRANSITION_SPEED = 50;
|
|
4
3
|
export var ANIMATION_EASE_OUT = 'cubic-bezier(0.15,1,0.3,1)';
|
|
@@ -10,7 +9,7 @@ export var varMarkerColor = '--ds--pt--mc';
|
|
|
10
9
|
export var varBackgroundColor = '--ds--pt--bg';
|
|
11
10
|
export var SEMI_BOLD_FONT_WEIGHT = '600';
|
|
12
11
|
export var REGULAR_FONT_WEIGHT = '400';
|
|
13
|
-
export var HALF_GRID_SIZE =
|
|
14
|
-
export var PROGRESS_BAR_HEIGHT =
|
|
12
|
+
export var HALF_GRID_SIZE = "var(--ds-scale-050, 4px)";
|
|
13
|
+
export var PROGRESS_BAR_HEIGHT = "var(--ds-scale-100, 8px)"; // Labels sit 16px from bottom of progress bar i.e. 8 + 16
|
|
15
14
|
|
|
16
|
-
export var LABEL_TOP_SPACING =
|
|
15
|
+
export var LABEL_TOP_SPACING = "var(--ds-scale-300, 24px)";
|
|
@@ -14,12 +14,14 @@ var Link = function Link(_ref) {
|
|
|
14
14
|
onClick = _ref.onClick,
|
|
15
15
|
label = _ref.label,
|
|
16
16
|
testId = _ref.testId;
|
|
17
|
-
return
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
17
|
+
return (// eslint-disable-next-line @repo/internal/react/use-primitives
|
|
18
|
+
jsx("a", {
|
|
19
|
+
css: linkStyles,
|
|
20
|
+
href: href,
|
|
21
|
+
onClick: onClick,
|
|
22
|
+
"data-testid": testId
|
|
23
|
+
}, label)
|
|
24
|
+
);
|
|
23
25
|
};
|
|
24
26
|
|
|
25
27
|
export default Link;
|
|
@@ -10,7 +10,7 @@ var progressMarkerStyles = css({
|
|
|
10
10
|
left: '50%',
|
|
11
11
|
backgroundColor: "var(".concat(varBackgroundColor, ")"),
|
|
12
12
|
borderRadius: PROGRESS_BAR_HEIGHT,
|
|
13
|
-
transform: "translate(-50%, -".concat(LABEL_TOP_SPACING, "
|
|
13
|
+
transform: "translate(-50%, calc(-1 * ".concat(LABEL_TOP_SPACING, "))"),
|
|
14
14
|
transition: "opacity var(".concat(varTransitionSpeed, ") var(").concat(varTransitionEasing, "), background-color var(").concat(varTransitionSpeed, ") var(").concat(varTransitionEasing, ")"),
|
|
15
15
|
transitionDelay: "var(".concat(varTransitionDelay, ")"),
|
|
16
16
|
'&.fade-appear': {
|
|
@@ -34,10 +34,13 @@ var progressMarkerStyles = css({
|
|
|
34
34
|
|
|
35
35
|
var ProgressMarker = function ProgressMarker(_ref) {
|
|
36
36
|
var testId = _ref.testId;
|
|
37
|
-
return
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
37
|
+
return (// too many props that would go in UNSAFE_style + css transition prop having issues
|
|
38
|
+
// eslint-disable-next-line @repo/internal/react/use-primitives
|
|
39
|
+
jsx("div", {
|
|
40
|
+
"data-testid": testId,
|
|
41
|
+
css: progressMarkerStyles
|
|
42
|
+
})
|
|
43
|
+
);
|
|
41
44
|
};
|
|
42
45
|
|
|
43
46
|
export default ProgressMarker;
|
|
@@ -20,27 +20,20 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
20
20
|
import { PureComponent } from 'react';
|
|
21
21
|
import { css, jsx } from '@emotion/react';
|
|
22
22
|
import { CSSTransition } from 'react-transition-group';
|
|
23
|
-
import
|
|
23
|
+
import Box from '@atlaskit/ds-explorations/box';
|
|
24
|
+
import Text from '@atlaskit/ds-explorations/text';
|
|
24
25
|
import ProgressBar from './bar';
|
|
25
26
|
import { LABEL_TOP_SPACING, varBackgroundColor, varMarkerColor, varTransitionDelay, varTransitionEasing, varTransitionSpeed } from './constants';
|
|
26
27
|
import ProgressMarker from './marker';
|
|
27
28
|
import { getFontWeight, getMarkerColor, getTextColor } from './utils';
|
|
28
|
-
var containerStyles = css({
|
|
29
|
-
width: '100%',
|
|
30
|
-
position: 'relative'
|
|
31
|
-
});
|
|
32
29
|
var listItemStyles = css({
|
|
33
|
-
// TODO Delete this comment after verifying spacing token -> previous value `0`
|
|
34
30
|
margin: "var(--ds-scale-0, 0px)",
|
|
35
31
|
overflowWrap: 'break-word'
|
|
36
32
|
});
|
|
37
33
|
var titleStyles = css({
|
|
38
|
-
marginTop: LABEL_TOP_SPACING,
|
|
39
34
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
|
|
40
|
-
|
|
35
|
+
marginTop: LABEL_TOP_SPACING,
|
|
41
36
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
|
|
42
|
-
marginLeft: 'auto',
|
|
43
|
-
fontSize: fontSize(),
|
|
44
37
|
lineHeight: '16px',
|
|
45
38
|
textAlign: 'center',
|
|
46
39
|
'&.fade-appear': {
|
|
@@ -102,7 +95,7 @@ var ProgressTrackerStage = /*#__PURE__*/function (_PureComponent) {
|
|
|
102
95
|
}, {
|
|
103
96
|
key: "render",
|
|
104
97
|
value: function render() {
|
|
105
|
-
var
|
|
98
|
+
var _listInlineStyles;
|
|
106
99
|
|
|
107
100
|
var _this$props = this.props,
|
|
108
101
|
item = _this$props.item,
|
|
@@ -112,46 +105,53 @@ var ProgressTrackerStage = /*#__PURE__*/function (_PureComponent) {
|
|
|
112
105
|
transitionEasing = _this$props.transitionEasing,
|
|
113
106
|
testId = _this$props.testId;
|
|
114
107
|
var ariaCurrent = item.status === 'current' ? 'step' : 'false';
|
|
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
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
108
|
+
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);
|
|
109
|
+
return (// eslint-disable-next-line @repo/internal/react/use-primitives
|
|
110
|
+
jsx("li", {
|
|
111
|
+
"data-testid": testId,
|
|
112
|
+
style: listInlineStyles,
|
|
113
|
+
css: listItemStyles,
|
|
114
|
+
"aria-current": ariaCurrent
|
|
115
|
+
}, jsx(Box, {
|
|
116
|
+
display: "block",
|
|
117
|
+
UNSAFE_style: {
|
|
118
|
+
width: '100%'
|
|
119
|
+
}
|
|
120
|
+
}, jsx(CSSTransition, {
|
|
121
|
+
appear: true,
|
|
122
|
+
in: this.state.transitioning,
|
|
123
|
+
onEntered: this.onEntered,
|
|
124
|
+
timeout: transitionDelay + transitionSpeed,
|
|
125
|
+
classNames: "fade"
|
|
126
|
+
}, jsx(ProgressMarker, {
|
|
127
|
+
testId: testId && "".concat(testId, "-marker")
|
|
128
|
+
})), jsx(CSSTransition, {
|
|
129
|
+
appear: true,
|
|
130
|
+
in: this.state.transitioning,
|
|
131
|
+
onEntered: this.onEntered,
|
|
132
|
+
timeout: transitionDelay + transitionSpeed,
|
|
133
|
+
classNames: "fade"
|
|
134
|
+
}, jsx(ProgressBar, {
|
|
135
|
+
testId: testId && "".concat(testId, "-bar"),
|
|
136
|
+
percentageComplete: item.percentageComplete
|
|
137
|
+
})), jsx(CSSTransition, {
|
|
138
|
+
appear: true,
|
|
139
|
+
in: this.state.transitioning,
|
|
140
|
+
onEntered: this.onEntered,
|
|
141
|
+
timeout: transitionDelay + transitionSpeed,
|
|
142
|
+
classNames: "fade"
|
|
143
|
+
}, jsx("div", {
|
|
144
|
+
css: titleStyles
|
|
145
|
+
}, jsx(Text, {
|
|
146
|
+
fontSize: "14px",
|
|
147
|
+
lineHeight: "16px",
|
|
148
|
+
testId: testId && "".concat(testId, "-title"),
|
|
149
149
|
color: getTextColor(item.status),
|
|
150
150
|
fontWeight: getFontWeight(item.status)
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
151
|
+
}, this.shouldShowLink() ? render.link({
|
|
152
|
+
item: item
|
|
153
|
+
}) : item.label)))))
|
|
154
|
+
);
|
|
155
155
|
}
|
|
156
156
|
}]);
|
|
157
157
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B300,
|
|
1
|
+
import { B300, N70 } from '@atlaskit/theme/colors';
|
|
2
2
|
import { REGULAR_FONT_WEIGHT, SEMI_BOLD_FONT_WEIGHT } from './constants';
|
|
3
3
|
export var getMarkerColor = function getMarkerColor(status) {
|
|
4
4
|
switch (status) {
|
|
@@ -17,16 +17,16 @@ export var getMarkerColor = function getMarkerColor(status) {
|
|
|
17
17
|
export var getTextColor = function getTextColor(status) {
|
|
18
18
|
switch (status) {
|
|
19
19
|
case 'unvisited':
|
|
20
|
-
return
|
|
20
|
+
return 'subtlest';
|
|
21
21
|
|
|
22
22
|
case 'current':
|
|
23
|
-
return
|
|
23
|
+
return 'brand';
|
|
24
24
|
|
|
25
25
|
case 'visited':
|
|
26
|
-
return
|
|
26
|
+
return 'color.text';
|
|
27
27
|
|
|
28
28
|
case 'disabled':
|
|
29
|
-
return
|
|
29
|
+
return 'disabled';
|
|
30
30
|
|
|
31
31
|
default:
|
|
32
32
|
return;
|
|
@@ -19,7 +19,7 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
19
19
|
/** @jsx jsx */
|
|
20
20
|
import { PureComponent } from 'react';
|
|
21
21
|
import { css, jsx } from '@emotion/react';
|
|
22
|
-
import {
|
|
22
|
+
import { 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';
|
|
25
25
|
import Stage from './internal/stage';
|
|
@@ -28,13 +28,11 @@ var containerStyles = css({
|
|
|
28
28
|
width: '100%',
|
|
29
29
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
|
|
30
30
|
margin: '0 auto',
|
|
31
|
-
// TODO Delete this comment after verifying spacing token -> previous value `0`
|
|
32
31
|
padding: "var(--ds-scale-0, 0px)",
|
|
33
32
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
|
|
34
33
|
gap: "var(".concat(varSpacing, ")"),
|
|
35
34
|
listStyleType: 'none',
|
|
36
35
|
'&&': {
|
|
37
|
-
// TODO Delete this comment after verifying spacing token -> previous value `40`
|
|
38
36
|
marginTop: "var(--ds-scale-500, 40px)"
|
|
39
37
|
}
|
|
40
38
|
});
|
|
@@ -86,7 +84,7 @@ var ProgressTracker = /*#__PURE__*/function (_PureComponent) {
|
|
|
86
84
|
key: "render",
|
|
87
85
|
value: function render() {
|
|
88
86
|
var _this3 = this,
|
|
89
|
-
|
|
87
|
+
_listInlineStyles;
|
|
90
88
|
|
|
91
89
|
var _this$props = this.props,
|
|
92
90
|
testId = _this$props.testId,
|
|
@@ -134,14 +132,17 @@ var ProgressTracker = /*#__PURE__*/function (_PureComponent) {
|
|
|
134
132
|
render: _this3.props.render
|
|
135
133
|
});
|
|
136
134
|
});
|
|
137
|
-
|
|
138
|
-
"
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
135
|
+
var listInlineStyles = (_listInlineStyles = {
|
|
136
|
+
gridTemplateColumns: "repeat(".concat(items.length, ", 1fr)")
|
|
137
|
+
}, _defineProperty(_listInlineStyles, varSpacing, spacing[this.props.spacing]), _defineProperty(_listInlineStyles, "maxWidth", 8 * 10 * items.length * 2), _listInlineStyles);
|
|
138
|
+
return (// eslint-disable-next-line @repo/internal/react/use-primitives
|
|
139
|
+
jsx("ul", {
|
|
140
|
+
"data-testid": testId,
|
|
141
|
+
style: listInlineStyles,
|
|
142
|
+
css: containerStyles,
|
|
143
|
+
"aria-label": label
|
|
144
|
+
}, items)
|
|
145
|
+
);
|
|
145
146
|
}
|
|
146
147
|
}]);
|
|
147
148
|
|
|
@@ -152,8 +153,8 @@ _defineProperty(ProgressTracker, "defaultProps", {
|
|
|
152
153
|
items: [],
|
|
153
154
|
spacing: 'cosy',
|
|
154
155
|
render: {
|
|
155
|
-
link: function link(
|
|
156
|
-
var item =
|
|
156
|
+
link: function link(_ref) {
|
|
157
|
+
var item = _ref.item;
|
|
157
158
|
return jsx(Link, item);
|
|
158
159
|
}
|
|
159
160
|
},
|
package/dist/esm/version.json
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
export declare const defaultGridSize: number;
|
|
2
1
|
/**
|
|
3
2
|
* Ideally these are exported by @atlaskit/page
|
|
4
3
|
*/
|
|
5
4
|
export declare const spacing: {
|
|
6
|
-
readonly comfortable:
|
|
7
|
-
readonly cosy:
|
|
8
|
-
readonly compact:
|
|
5
|
+
readonly comfortable: "var(--ds-scale-500)";
|
|
6
|
+
readonly cosy: "var(--ds-scale-200)";
|
|
7
|
+
readonly compact: "var(--ds-scale-050)";
|
|
9
8
|
};
|
|
10
9
|
export declare type Spacing = keyof typeof spacing;
|
|
@@ -9,6 +9,6 @@ export declare const varMarkerColor = "--ds--pt--mc";
|
|
|
9
9
|
export declare const varBackgroundColor = "--ds--pt--bg";
|
|
10
10
|
export declare const SEMI_BOLD_FONT_WEIGHT = "600";
|
|
11
11
|
export declare const REGULAR_FONT_WEIGHT = "400";
|
|
12
|
-
export declare const HALF_GRID_SIZE:
|
|
13
|
-
export declare const PROGRESS_BAR_HEIGHT:
|
|
14
|
-
export declare const LABEL_TOP_SPACING:
|
|
12
|
+
export declare const HALF_GRID_SIZE: "var(--ds-scale-050)";
|
|
13
|
+
export declare const PROGRESS_BAR_HEIGHT: "var(--ds-scale-100)";
|
|
14
|
+
export declare const LABEL_TOP_SPACING: "var(--ds-scale-300)";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import { TextColor } from '@atlaskit/ds-explorations/text';
|
|
1
2
|
import type { Status } from '../types';
|
|
2
3
|
export declare const getMarkerColor: (status: Status) => "var(--ds-icon-subtle)" | "var(--ds-icon-brand)" | undefined;
|
|
3
|
-
export declare const getTextColor: (status: Status) =>
|
|
4
|
+
export declare const getTextColor: (status: Status) => TextColor | undefined;
|
|
4
5
|
export declare const getFontWeight: (status: Status) => "600" | "400" | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/progress-tracker",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.4.0",
|
|
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,14 +12,6 @@
|
|
|
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
|
-
"dist/types-ts4.0/index.d.ts"
|
|
20
|
-
]
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
15
|
"sideEffects": false,
|
|
24
16
|
"atlaskit:src": "src/index.tsx",
|
|
25
17
|
"atlassian": {
|
|
@@ -32,8 +24,9 @@
|
|
|
32
24
|
}
|
|
33
25
|
},
|
|
34
26
|
"dependencies": {
|
|
27
|
+
"@atlaskit/ds-explorations": "^1.2.0",
|
|
35
28
|
"@atlaskit/theme": "^12.2.0",
|
|
36
|
-
"@atlaskit/tokens": "^0.
|
|
29
|
+
"@atlaskit/tokens": "^0.11.0",
|
|
37
30
|
"@babel/runtime": "^7.0.0",
|
|
38
31
|
"@emotion/react": "^11.7.1",
|
|
39
32
|
"react-transition-group": "^4.4.1"
|
|
@@ -42,7 +35,7 @@
|
|
|
42
35
|
"react": "^16.8.0"
|
|
43
36
|
},
|
|
44
37
|
"devDependencies": {
|
|
45
|
-
"@atlaskit/button": "^16.
|
|
38
|
+
"@atlaskit/button": "^16.4.0",
|
|
46
39
|
"@atlaskit/docs": "*",
|
|
47
40
|
"@atlaskit/ds-lib": "^2.0.1",
|
|
48
41
|
"@atlaskit/icon": "^21.11.0",
|
|
@@ -71,7 +64,8 @@
|
|
|
71
64
|
"emotion"
|
|
72
65
|
],
|
|
73
66
|
"analytics": "analytics-next",
|
|
74
|
-
"deprecation": "no-deprecated-imports"
|
|
67
|
+
"deprecation": "no-deprecated-imports",
|
|
68
|
+
"ui-components": "primitives"
|
|
75
69
|
}
|
|
76
70
|
},
|
|
77
71
|
"af:exports": {
|
package/report.api.md
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
## API Report File for "@atlaskit/progress-tracker"
|
|
1
|
+
## API Report File for "@atlaskit/progress-tracker"
|
|
2
2
|
|
|
3
|
-
> Do not edit this file.
|
|
3
|
+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
+
|
|
5
|
+
<!--
|
|
6
|
+
Generated API Report version: 2.0
|
|
7
|
+
-->
|
|
4
8
|
|
|
5
9
|
[Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
|
|
6
10
|
|
|
@@ -10,14 +14,18 @@
|
|
|
10
14
|
import { jsx } from '@emotion/react';
|
|
11
15
|
import { PureComponent } from 'react';
|
|
12
16
|
|
|
13
|
-
|
|
17
|
+
// @public (undocumented)
|
|
18
|
+
interface LinkComponentProps {
|
|
19
|
+
// (undocumented)
|
|
14
20
|
item: Stage;
|
|
15
21
|
}
|
|
16
22
|
|
|
17
|
-
|
|
23
|
+
// @public (undocumented)
|
|
24
|
+
export class ProgressTracker extends PureComponent<
|
|
18
25
|
ProgressTrackerProps,
|
|
19
26
|
State
|
|
20
27
|
> {
|
|
28
|
+
// (undocumented)
|
|
21
29
|
static defaultProps: {
|
|
22
30
|
items: never[];
|
|
23
31
|
spacing: string;
|
|
@@ -27,6 +35,9 @@ export declare class ProgressTracker extends PureComponent<
|
|
|
27
35
|
animated: boolean;
|
|
28
36
|
label: string;
|
|
29
37
|
};
|
|
38
|
+
// (undocumented)
|
|
39
|
+
render(): jsx.JSX.Element;
|
|
40
|
+
// (undocumented)
|
|
30
41
|
state: {
|
|
31
42
|
prevStages: {
|
|
32
43
|
percentageComplete: number;
|
|
@@ -38,69 +49,65 @@ export declare class ProgressTracker extends PureComponent<
|
|
|
38
49
|
onClick?: (() => void) | undefined;
|
|
39
50
|
}[];
|
|
40
51
|
};
|
|
52
|
+
// (undocumented)
|
|
41
53
|
UNSAFE_componentWillReceiveProps(nextProps: ProgressTrackerProps): void;
|
|
42
|
-
render(): jsx.JSX.Element;
|
|
43
54
|
}
|
|
44
55
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
*/
|
|
56
|
+
// @public (undocumented)
|
|
57
|
+
export interface ProgressTrackerProps {
|
|
58
|
+
animated: boolean;
|
|
49
59
|
items: Stages;
|
|
50
|
-
|
|
51
|
-
* Margin spacing type between steps
|
|
52
|
-
*/
|
|
53
|
-
spacing: Spacing;
|
|
54
|
-
/**
|
|
55
|
-
* Render prop to specify custom implementations of components
|
|
56
|
-
*/
|
|
60
|
+
label?: string;
|
|
57
61
|
render: ProgressTrackerStageRenderProp;
|
|
58
|
-
|
|
59
|
-
* Turns off transition animations if set to false
|
|
60
|
-
*/
|
|
61
|
-
animated: boolean;
|
|
62
|
-
/**
|
|
63
|
-
* 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
|
|
64
|
-
*/
|
|
62
|
+
spacing: Spacing;
|
|
65
63
|
testId?: string;
|
|
66
|
-
/**
|
|
67
|
-
* Text to be used as an aria-label of progress tracker
|
|
68
|
-
*/
|
|
69
|
-
label?: string;
|
|
70
64
|
}
|
|
71
65
|
|
|
72
|
-
|
|
66
|
+
// @public (undocumented)
|
|
67
|
+
interface ProgressTrackerStageRenderProp {
|
|
68
|
+
// (undocumented)
|
|
73
69
|
link: (props: LinkComponentProps) => JSX.Element;
|
|
74
70
|
}
|
|
75
71
|
|
|
76
|
-
|
|
72
|
+
// @public (undocumented)
|
|
73
|
+
type Spacing = keyof typeof spacing;
|
|
77
74
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
*/
|
|
81
|
-
declare const spacing: {
|
|
75
|
+
// @public
|
|
76
|
+
const spacing: {
|
|
82
77
|
readonly comfortable: number;
|
|
83
78
|
readonly cosy: number;
|
|
84
79
|
readonly compact: number;
|
|
85
80
|
};
|
|
86
81
|
|
|
87
|
-
|
|
82
|
+
// @public (undocumented)
|
|
83
|
+
export interface Stage {
|
|
84
|
+
// (undocumented)
|
|
85
|
+
href?: string;
|
|
86
|
+
// (undocumented)
|
|
88
87
|
id: string;
|
|
88
|
+
// (undocumented)
|
|
89
89
|
label: string;
|
|
90
|
-
|
|
91
|
-
status: Status;
|
|
90
|
+
// (undocumented)
|
|
92
91
|
noLink?: boolean;
|
|
93
|
-
|
|
92
|
+
// (undocumented)
|
|
94
93
|
onClick?: () => void;
|
|
94
|
+
// (undocumented)
|
|
95
|
+
percentageComplete: number;
|
|
96
|
+
// (undocumented)
|
|
97
|
+
status: Status;
|
|
95
98
|
}
|
|
96
99
|
|
|
97
|
-
|
|
100
|
+
// @public (undocumented)
|
|
101
|
+
export type Stages = Stage[];
|
|
98
102
|
|
|
99
|
-
|
|
103
|
+
// @public (undocumented)
|
|
104
|
+
interface State {
|
|
105
|
+
// (undocumented)
|
|
100
106
|
prevStages: Stages;
|
|
101
107
|
}
|
|
102
108
|
|
|
103
|
-
|
|
109
|
+
// @public (undocumented)
|
|
110
|
+
type Status = 'unvisited' | 'visited' | 'current' | 'disabled';
|
|
104
111
|
|
|
105
|
-
|
|
112
|
+
// (No @packageDocumentation comment for this package)
|
|
106
113
|
```
|