@atlaskit/progress-tracker 8.5.5 → 8.5.6
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/progress-tracker.js +3 -3
- package/dist/es2019/progress-tracker.js +3 -3
- package/dist/esm/progress-tracker.js +3 -3
- package/dist/types/progress-tracker.d.ts +6 -6
- package/dist/types-ts4.5/progress-tracker.d.ts +6 -6
- package/package.json +5 -4
- package/tmp/api-report-tmp.d.ts +0 -106
package/CHANGELOG.md
CHANGED
|
@@ -32,7 +32,7 @@ var containerStyles = (0, _react2.css)({
|
|
|
32
32
|
gap: "var(".concat(_constants2.varSpacing, ")"),
|
|
33
33
|
listStyleType: 'none',
|
|
34
34
|
'&&': {
|
|
35
|
-
|
|
35
|
+
marginBlockStart: "var(--ds-space-500, 40px)"
|
|
36
36
|
}
|
|
37
37
|
});
|
|
38
38
|
var ProgressTracker = exports.default = /*#__PURE__*/function (_PureComponent) {
|
|
@@ -95,13 +95,13 @@ var ProgressTracker = exports.default = /*#__PURE__*/function (_PureComponent) {
|
|
|
95
95
|
transitionSpeed = progressChanges > 1 ? _constants2.LINEAR_TRANSITION_SPEED : _constants2.TRANSITION_SPEED;
|
|
96
96
|
if (stage.percentageComplete < _this3.state.prevStages[index].percentageComplete) {
|
|
97
97
|
/**
|
|
98
|
-
*
|
|
98
|
+
* Load each transition sequentially in reverse.
|
|
99
99
|
*/
|
|
100
100
|
transitionDelay = (stepsBack - 1) * transitionSpeed;
|
|
101
101
|
stepsBack -= 1;
|
|
102
102
|
} else if (stage.percentageComplete > _this3.state.prevStages[index].percentageComplete) {
|
|
103
103
|
/**
|
|
104
|
-
*
|
|
104
|
+
* Load each transition sequentially.
|
|
105
105
|
*/
|
|
106
106
|
transitionDelay = (totalStepsForward - stepsForward) * transitionSpeed;
|
|
107
107
|
stepsForward -= 1;
|
|
@@ -17,7 +17,7 @@ const containerStyles = css({
|
|
|
17
17
|
gap: `var(${varSpacing})`,
|
|
18
18
|
listStyleType: 'none',
|
|
19
19
|
'&&': {
|
|
20
|
-
|
|
20
|
+
marginBlockStart: "var(--ds-space-500, 40px)"
|
|
21
21
|
}
|
|
22
22
|
});
|
|
23
23
|
export default class ProgressTracker extends PureComponent {
|
|
@@ -57,13 +57,13 @@ export default class ProgressTracker extends PureComponent {
|
|
|
57
57
|
transitionSpeed = progressChanges > 1 ? LINEAR_TRANSITION_SPEED : TRANSITION_SPEED;
|
|
58
58
|
if (stage.percentageComplete < this.state.prevStages[index].percentageComplete) {
|
|
59
59
|
/**
|
|
60
|
-
*
|
|
60
|
+
* Load each transition sequentially in reverse.
|
|
61
61
|
*/
|
|
62
62
|
transitionDelay = (stepsBack - 1) * transitionSpeed;
|
|
63
63
|
stepsBack -= 1;
|
|
64
64
|
} else if (stage.percentageComplete > this.state.prevStages[index].percentageComplete) {
|
|
65
65
|
/**
|
|
66
|
-
*
|
|
66
|
+
* Load each transition sequentially.
|
|
67
67
|
*/
|
|
68
68
|
transitionDelay = (totalStepsForward - stepsForward) * transitionSpeed;
|
|
69
69
|
stepsForward -= 1;
|
|
@@ -27,7 +27,7 @@ var containerStyles = css({
|
|
|
27
27
|
gap: "var(".concat(varSpacing, ")"),
|
|
28
28
|
listStyleType: 'none',
|
|
29
29
|
'&&': {
|
|
30
|
-
|
|
30
|
+
marginBlockStart: "var(--ds-space-500, 40px)"
|
|
31
31
|
}
|
|
32
32
|
});
|
|
33
33
|
var ProgressTracker = /*#__PURE__*/function (_PureComponent) {
|
|
@@ -90,13 +90,13 @@ var ProgressTracker = /*#__PURE__*/function (_PureComponent) {
|
|
|
90
90
|
transitionSpeed = progressChanges > 1 ? LINEAR_TRANSITION_SPEED : TRANSITION_SPEED;
|
|
91
91
|
if (stage.percentageComplete < _this3.state.prevStages[index].percentageComplete) {
|
|
92
92
|
/**
|
|
93
|
-
*
|
|
93
|
+
* Load each transition sequentially in reverse.
|
|
94
94
|
*/
|
|
95
95
|
transitionDelay = (stepsBack - 1) * transitionSpeed;
|
|
96
96
|
stepsBack -= 1;
|
|
97
97
|
} else if (stage.percentageComplete > _this3.state.prevStages[index].percentageComplete) {
|
|
98
98
|
/**
|
|
99
|
-
*
|
|
99
|
+
* Load each transition sequentially.
|
|
100
100
|
*/
|
|
101
101
|
transitionDelay = (totalStepsForward - stepsForward) * transitionSpeed;
|
|
102
102
|
stepsForward -= 1;
|
|
@@ -4,27 +4,27 @@ import { jsx } from '@emotion/react';
|
|
|
4
4
|
import type { LinkComponentProps, ProgressTrackerStageRenderProp, Spacing, Stages } from './types';
|
|
5
5
|
export interface ProgressTrackerProps {
|
|
6
6
|
/**
|
|
7
|
-
* Ordered list of stage data
|
|
7
|
+
* Ordered list of stage data.
|
|
8
8
|
*/
|
|
9
9
|
items: Stages;
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
11
|
+
* Sets the amount of spacing between the steps.
|
|
12
12
|
*/
|
|
13
13
|
spacing: Spacing;
|
|
14
14
|
/**
|
|
15
|
-
* Render prop to specify custom implementations of components
|
|
15
|
+
* Render prop to specify custom implementations of components.
|
|
16
16
|
*/
|
|
17
17
|
render: ProgressTrackerStageRenderProp;
|
|
18
18
|
/**
|
|
19
|
-
* Turns off transition animations if set to false
|
|
19
|
+
* Turns off transition animations if set to false.
|
|
20
20
|
*/
|
|
21
21
|
animated: boolean;
|
|
22
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
|
|
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
24
|
*/
|
|
25
25
|
testId?: string;
|
|
26
26
|
/**
|
|
27
|
-
* Text to be used as
|
|
27
|
+
* Text to be used as both the visual label and aria-label of a step in the progress tracker.
|
|
28
28
|
*/
|
|
29
29
|
label?: string;
|
|
30
30
|
}
|
|
@@ -4,27 +4,27 @@ import { jsx } from '@emotion/react';
|
|
|
4
4
|
import type { LinkComponentProps, ProgressTrackerStageRenderProp, Spacing, Stages } from './types';
|
|
5
5
|
export interface ProgressTrackerProps {
|
|
6
6
|
/**
|
|
7
|
-
* Ordered list of stage data
|
|
7
|
+
* Ordered list of stage data.
|
|
8
8
|
*/
|
|
9
9
|
items: Stages;
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
11
|
+
* Sets the amount of spacing between the steps.
|
|
12
12
|
*/
|
|
13
13
|
spacing: Spacing;
|
|
14
14
|
/**
|
|
15
|
-
* Render prop to specify custom implementations of components
|
|
15
|
+
* Render prop to specify custom implementations of components.
|
|
16
16
|
*/
|
|
17
17
|
render: ProgressTrackerStageRenderProp;
|
|
18
18
|
/**
|
|
19
|
-
* Turns off transition animations if set to false
|
|
19
|
+
* Turns off transition animations if set to false.
|
|
20
20
|
*/
|
|
21
21
|
animated: boolean;
|
|
22
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
|
|
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
24
|
*/
|
|
25
25
|
testId?: string;
|
|
26
26
|
/**
|
|
27
|
-
* Text to be used as
|
|
27
|
+
* Text to be used as both the visual label and aria-label of a step in the progress tracker.
|
|
28
28
|
*/
|
|
29
29
|
label?: string;
|
|
30
30
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/progress-tracker",
|
|
3
|
-
"version": "8.5.
|
|
3
|
+
"version": "8.5.6",
|
|
4
4
|
"description": "A progress tracker displays the steps and progress through a journey.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@atlaskit/ds-explorations": "^3.
|
|
30
|
-
"@atlaskit/primitives": "^
|
|
29
|
+
"@atlaskit/ds-explorations": "^3.2.0",
|
|
30
|
+
"@atlaskit/primitives": "^2.0.0",
|
|
31
31
|
"@atlaskit/theme": "^12.6.0",
|
|
32
|
-
"@atlaskit/tokens": "^1.
|
|
32
|
+
"@atlaskit/tokens": "^1.35.0",
|
|
33
33
|
"@babel/runtime": "^7.0.0",
|
|
34
34
|
"@emotion/react": "^11.7.1",
|
|
35
35
|
"react-transition-group": "^4.4.1"
|
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
47
47
|
"@testing-library/react": "^12.1.5",
|
|
48
48
|
"@testing-library/user-event": "^14.4.3",
|
|
49
|
+
"@types/react-transition-group": "^2.0.6",
|
|
49
50
|
"jest-in-case": "^1.0.2",
|
|
50
51
|
"react-dom": "^16.8.0",
|
|
51
52
|
"react-router-dom": "^4.2.2",
|
package/tmp/api-report-tmp.d.ts
DELETED
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
## API Report File for "@atlaskit/progress-tracker"
|
|
2
|
-
|
|
3
|
-
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
-
|
|
5
|
-
```ts
|
|
6
|
-
|
|
7
|
-
/// <reference types="react" />
|
|
8
|
-
|
|
9
|
-
import { jsx } from '@emotion/react';
|
|
10
|
-
import { PureComponent } from 'react';
|
|
11
|
-
|
|
12
|
-
// @public (undocumented)
|
|
13
|
-
interface LinkComponentProps {
|
|
14
|
-
// (undocumented)
|
|
15
|
-
item: Stage;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
// @public (undocumented)
|
|
19
|
-
export class ProgressTracker extends PureComponent<ProgressTrackerProps, State> {
|
|
20
|
-
// (undocumented)
|
|
21
|
-
static defaultProps: {
|
|
22
|
-
items: never[];
|
|
23
|
-
spacing: string;
|
|
24
|
-
render: {
|
|
25
|
-
link: ({ item }: LinkComponentProps) => jsx.JSX.Element;
|
|
26
|
-
};
|
|
27
|
-
animated: boolean;
|
|
28
|
-
label: string;
|
|
29
|
-
};
|
|
30
|
-
// (undocumented)
|
|
31
|
-
render(): jsx.JSX.Element;
|
|
32
|
-
// (undocumented)
|
|
33
|
-
state: {
|
|
34
|
-
prevStages: {
|
|
35
|
-
percentageComplete: number;
|
|
36
|
-
id: string;
|
|
37
|
-
label: string;
|
|
38
|
-
status: Status;
|
|
39
|
-
noLink?: boolean | undefined;
|
|
40
|
-
href?: string | undefined;
|
|
41
|
-
onClick?: (() => void) | undefined;
|
|
42
|
-
}[];
|
|
43
|
-
};
|
|
44
|
-
// (undocumented)
|
|
45
|
-
UNSAFE_componentWillReceiveProps(nextProps: ProgressTrackerProps): void;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
// @public (undocumented)
|
|
49
|
-
export interface ProgressTrackerProps {
|
|
50
|
-
animated: boolean;
|
|
51
|
-
items: Stages;
|
|
52
|
-
label?: string;
|
|
53
|
-
render: ProgressTrackerStageRenderProp;
|
|
54
|
-
spacing: Spacing;
|
|
55
|
-
testId?: string;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
// @public (undocumented)
|
|
59
|
-
interface ProgressTrackerStageRenderProp {
|
|
60
|
-
// (undocumented)
|
|
61
|
-
link: (props: LinkComponentProps) => JSX.Element;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
// @public (undocumented)
|
|
65
|
-
type Spacing = keyof typeof spacing;
|
|
66
|
-
|
|
67
|
-
// @public
|
|
68
|
-
const spacing: {
|
|
69
|
-
readonly comfortable: "var(--ds-space-500)";
|
|
70
|
-
readonly cosy: "var(--ds-space-200)";
|
|
71
|
-
readonly compact: "var(--ds-space-050)";
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
// @public (undocumented)
|
|
75
|
-
export interface Stage {
|
|
76
|
-
// (undocumented)
|
|
77
|
-
href?: string;
|
|
78
|
-
// (undocumented)
|
|
79
|
-
id: string;
|
|
80
|
-
// (undocumented)
|
|
81
|
-
label: string;
|
|
82
|
-
// (undocumented)
|
|
83
|
-
noLink?: boolean;
|
|
84
|
-
// (undocumented)
|
|
85
|
-
onClick?: () => void;
|
|
86
|
-
// (undocumented)
|
|
87
|
-
percentageComplete: number;
|
|
88
|
-
// (undocumented)
|
|
89
|
-
status: Status;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
// @public (undocumented)
|
|
93
|
-
export type Stages = Stage[];
|
|
94
|
-
|
|
95
|
-
// @public (undocumented)
|
|
96
|
-
interface State {
|
|
97
|
-
// (undocumented)
|
|
98
|
-
prevStages: Stages;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
// @public (undocumented)
|
|
102
|
-
type Status = 'current' | 'disabled' | 'unvisited' | 'visited';
|
|
103
|
-
|
|
104
|
-
// (No @packageDocumentation comment for this package)
|
|
105
|
-
|
|
106
|
-
```
|