@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.
Files changed (45) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/cjs/constants.js +4 -9
  3. package/dist/cjs/internal/bar.js +10 -8
  4. package/dist/cjs/internal/constants.js +3 -6
  5. package/dist/cjs/internal/link.js +8 -6
  6. package/dist/cjs/internal/marker.js +8 -5
  7. package/dist/cjs/internal/stage.js +52 -51
  8. package/dist/cjs/internal/utils.js +4 -4
  9. package/dist/cjs/progress-tracker.js +14 -13
  10. package/dist/cjs/version.json +1 -1
  11. package/dist/es2019/constants.js +3 -6
  12. package/dist/es2019/internal/bar.js +4 -3
  13. package/dist/es2019/internal/constants.js +3 -4
  14. package/dist/es2019/internal/link.js +2 -1
  15. package/dist/es2019/internal/marker.js +4 -2
  16. package/dist/es2019/internal/stage.js +54 -54
  17. package/dist/es2019/internal/utils.js +5 -5
  18. package/dist/es2019/progress-tracker.js +14 -13
  19. package/dist/es2019/version.json +1 -1
  20. package/dist/esm/constants.js +3 -6
  21. package/dist/esm/internal/bar.js +10 -8
  22. package/dist/esm/internal/constants.js +3 -4
  23. package/dist/esm/internal/link.js +8 -6
  24. package/dist/esm/internal/marker.js +8 -5
  25. package/dist/esm/internal/stage.js +49 -49
  26. package/dist/esm/internal/utils.js +5 -5
  27. package/dist/esm/progress-tracker.js +15 -14
  28. package/dist/esm/version.json +1 -1
  29. package/dist/types/constants.d.ts +3 -4
  30. package/dist/types/internal/bar.d.ts +1 -0
  31. package/dist/types/internal/constants.d.ts +3 -3
  32. package/dist/types/internal/utils.d.ts +2 -1
  33. package/package.json +6 -12
  34. package/report.api.md +48 -41
  35. package/dist/types-ts4.0/constants.d.ts +0 -10
  36. package/dist/types-ts4.0/index.d.ts +0 -3
  37. package/dist/types-ts4.0/internal/bar.d.ts +0 -13
  38. package/dist/types-ts4.0/internal/constants.d.ts +0 -14
  39. package/dist/types-ts4.0/internal/link.d.ts +0 -10
  40. package/dist/types-ts4.0/internal/marker.d.ts +0 -11
  41. package/dist/types-ts4.0/internal/stage.d.ts +0 -18
  42. package/dist/types-ts4.0/internal/types.d.ts +0 -27
  43. package/dist/types-ts4.0/internal/utils.d.ts +0 -4
  44. package/dist/types-ts4.0/progress-tracker.d.ts +0 -58
  45. 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 { defaultGridSize, spacing } from './constants';
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
- return jsx("ul", {
91
- "data-testid": testId,
92
- style: {
93
- gridTemplateColumns: `repeat(${items.length}, 1fr)`,
94
- [varSpacing]: `${spacing[this.props.spacing]}px`,
95
- maxWidth: defaultGridSize * 10 * items.length * 2
96
- },
97
- css: containerStyles,
98
- "aria-label": label
99
- }, items);
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
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/progress-tracker",
3
- "version": "8.3.3",
3
+ "version": "8.4.0",
4
4
  "sideEffects": false
5
5
  }
@@ -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: defaultGridSize * 5,
9
- cosy: defaultGridSize * 2,
10
- compact: defaultGridSize / 2
5
+ comfortable: "var(--ds-scale-500, 40px)",
6
+ cosy: "var(--ds-scale-200, 16px)",
7
+ compact: "var(--ds-scale-050, 4px)"
11
8
  };
@@ -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, "px)"),
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 jsx("div", {
28
- "data-testid": testId,
29
- style: {
30
- width: "calc(".concat(percentageComplete, "% + ").concat(percentageComplete / 100, " * calc(var(").concat(varSpacing, ", ").concat(spacing.cosy, "px) + ").concat(HALF_GRID_SIZE, "px))")
31
- },
32
- css: progressBarStyles
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 = defaultGridSize / 2;
14
- export var PROGRESS_BAR_HEIGHT = defaultGridSize; // Labels sit 20px from bottom of progress bar.
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 = defaultGridSize + 20;
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 jsx("a", {
18
- css: linkStyles,
19
- href: href,
20
- onClick: onClick,
21
- "data-testid": testId
22
- }, label);
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, "px)"),
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 jsx("div", {
38
- "data-testid": testId,
39
- css: progressMarkerStyles
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 { fontSize } from '@atlaskit/theme/constants';
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
- marginRight: 'auto',
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 _ref;
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
- return jsx("li", {
116
- "data-testid": testId,
117
- style: (_ref = {}, _defineProperty(_ref, varTransitionSpeed, "".concat(transitionSpeed, "ms")), _defineProperty(_ref, varTransitionDelay, "".concat(transitionDelay, "ms")), _defineProperty(_ref, varTransitionEasing, transitionEasing), _defineProperty(_ref, varMarkerColor, this.state.oldMarkerColor), _defineProperty(_ref, varBackgroundColor, getMarkerColor(item.status)), _ref),
118
- css: listItemStyles,
119
- "aria-current": ariaCurrent
120
- }, jsx("div", {
121
- css: containerStyles
122
- }, jsx(CSSTransition, {
123
- appear: true,
124
- in: this.state.transitioning,
125
- onEntered: this.onEntered,
126
- timeout: transitionDelay + transitionSpeed,
127
- classNames: "fade"
128
- }, jsx(ProgressMarker, {
129
- testId: testId && "".concat(testId, "-marker")
130
- })), jsx(CSSTransition, {
131
- appear: true,
132
- in: this.state.transitioning,
133
- onEntered: this.onEntered,
134
- timeout: transitionDelay + transitionSpeed,
135
- classNames: "fade"
136
- }, jsx(ProgressBar, {
137
- testId: testId && "".concat(testId, "-bar"),
138
- percentageComplete: item.percentageComplete
139
- })), jsx(CSSTransition, {
140
- appear: true,
141
- in: this.state.transitioning,
142
- onEntered: this.onEntered,
143
- timeout: transitionDelay + transitionSpeed,
144
- classNames: "fade"
145
- }, jsx("div", {
146
- css: titleStyles,
147
- "data-testid": testId && "".concat(testId, "-title"),
148
- style: {
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
- }, this.shouldShowLink() ? render.link({
153
- item: item
154
- }) : item.label))));
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, N300, N70, N800 } from '@atlaskit/theme/colors';
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 "var(--ds-text-subtlest, ".concat(N300, ")");
20
+ return 'subtlest';
21
21
 
22
22
  case 'current':
23
- return "var(--ds-text-brand, ".concat(B300, ")");
23
+ return 'brand';
24
24
 
25
25
  case 'visited':
26
- return "var(--ds-text, ".concat(N800, ")");
26
+ return 'color.text';
27
27
 
28
28
  case 'disabled':
29
- return "var(--ds-text-disabled, ".concat(N70, ")");
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 { defaultGridSize, spacing } from './constants';
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
- _ref;
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
- return jsx("ul", {
138
- "data-testid": testId,
139
- style: (_ref = {
140
- gridTemplateColumns: "repeat(".concat(items.length, ", 1fr)")
141
- }, _defineProperty(_ref, varSpacing, "".concat(spacing[this.props.spacing], "px")), _defineProperty(_ref, "maxWidth", defaultGridSize * 10 * items.length * 2), _ref),
142
- css: containerStyles,
143
- "aria-label": label
144
- }, items);
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(_ref2) {
156
- var item = _ref2.item;
156
+ link: function link(_ref) {
157
+ var item = _ref.item;
157
158
  return jsx(Link, item);
158
159
  }
159
160
  },
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/progress-tracker",
3
- "version": "8.3.3",
3
+ "version": "8.4.0",
4
4
  "sideEffects": false
5
5
  }
@@ -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: number;
7
- readonly cosy: number;
8
- readonly compact: number;
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;
@@ -1,3 +1,4 @@
1
+ /** @jsx jsx */
1
2
  import { jsx } from '@emotion/react';
2
3
  interface StageBarProps {
3
4
  testId?: string;
@@ -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: number;
13
- export declare const PROGRESS_BAR_HEIGHT: number;
14
- export declare const LABEL_TOP_SPACING: number;
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) => "var(--ds-text)" | "var(--ds-text-subtlest)" | "var(--ds-text-brand)" | "var(--ds-text-disabled)" | undefined;
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.3",
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.10.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.3.0",
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. This report is auto-generated by [API Extractor](https://api-extractor.com/).
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
- declare interface LinkComponentProps {
17
+ // @public (undocumented)
18
+ interface LinkComponentProps {
19
+ // (undocumented)
14
20
  item: Stage;
15
21
  }
16
22
 
17
- export declare class ProgressTracker extends PureComponent<
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
- export declare interface ProgressTrackerProps {
46
- /**
47
- * Ordered list of stage data
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
- declare interface ProgressTrackerStageRenderProp {
66
+ // @public (undocumented)
67
+ interface ProgressTrackerStageRenderProp {
68
+ // (undocumented)
73
69
  link: (props: LinkComponentProps) => JSX.Element;
74
70
  }
75
71
 
76
- declare type Spacing = keyof typeof spacing;
72
+ // @public (undocumented)
73
+ type Spacing = keyof typeof spacing;
77
74
 
78
- /**
79
- * Ideally these are exported by @atlaskit/page
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
- export declare interface Stage {
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
- percentageComplete: number;
91
- status: Status;
90
+ // (undocumented)
92
91
  noLink?: boolean;
93
- href?: string;
92
+ // (undocumented)
94
93
  onClick?: () => void;
94
+ // (undocumented)
95
+ percentageComplete: number;
96
+ // (undocumented)
97
+ status: Status;
95
98
  }
96
99
 
97
- export declare type Stages = Stage[];
100
+ // @public (undocumented)
101
+ export type Stages = Stage[];
98
102
 
99
- declare interface State {
103
+ // @public (undocumented)
104
+ interface State {
105
+ // (undocumented)
100
106
  prevStages: Stages;
101
107
  }
102
108
 
103
- declare type Status = 'unvisited' | 'visited' | 'current' | 'disabled';
109
+ // @public (undocumented)
110
+ type Status = 'unvisited' | 'visited' | 'current' | 'disabled';
104
111
 
105
- export {};
112
+ // (No @packageDocumentation comment for this package)
106
113
  ```