@atlaskit/progress-tracker 8.3.4 → 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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @atlaskit/progress-tracker
2
2
 
3
+ ## 8.4.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`eb709e1fde3`](https://bitbucket.org/atlassian/atlassian-frontend/commits/eb709e1fde3) - [ux] Apply spacing tokens and primitive components. Reduce padding between stage labels and progress bar by 4px - overall height of component is therefore also 4px shorter.
8
+
3
9
  ## 8.3.4
4
10
 
5
11
  ### Patch Changes
@@ -3,19 +3,14 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.spacing = exports.defaultGridSize = void 0;
6
+ exports.spacing = void 0;
7
7
 
8
- var _constants = require("@atlaskit/theme/constants");
9
-
10
- var defaultGridSize = (0, _constants.gridSize)();
11
8
  /**
12
9
  * Ideally these are exported by @atlaskit/page
13
10
  */
14
-
15
- exports.defaultGridSize = defaultGridSize;
16
11
  var spacing = {
17
- comfortable: defaultGridSize * 5,
18
- cosy: defaultGridSize * 2,
19
- compact: defaultGridSize / 2
12
+ comfortable: "var(--ds-scale-500, 40px)",
13
+ cosy: "var(--ds-scale-200, 16px)",
14
+ compact: "var(--ds-scale-050, 4px)"
20
15
  };
21
16
  exports.spacing = spacing;
@@ -21,7 +21,7 @@ var progressBarStyles = (0, _react.css)({
21
21
  backgroundColor: "var(--ds-background-brand-bold, ".concat(_colors.B300, ")"),
22
22
  borderBottomRightRadius: _constants2.PROGRESS_BAR_HEIGHT,
23
23
  borderTopRightRadius: _constants2.PROGRESS_BAR_HEIGHT,
24
- transform: "translate(0, -".concat(_constants2.LABEL_TOP_SPACING, "px)"),
24
+ transform: "translate(0, calc(-1 * ".concat(_constants2.LABEL_TOP_SPACING, "))"),
25
25
  transition: "width var(".concat(_constants2.varTransitionSpeed, ") var(").concat(_constants2.varTransitionEasing, ")"),
26
26
  transitionDelay: "var(".concat(_constants2.varTransitionDelay, ")")
27
27
  });
@@ -35,13 +35,15 @@ var progressBarStyles = (0, _react.css)({
35
35
  var ProgressBar = function ProgressBar(_ref) {
36
36
  var percentageComplete = _ref.percentageComplete,
37
37
  testId = _ref.testId;
38
- return (0, _react.jsx)("div", {
39
- "data-testid": testId,
40
- style: {
41
- width: "calc(".concat(percentageComplete, "% + ").concat(percentageComplete / 100, " * calc(var(").concat(_constants2.varSpacing, ", ").concat(_constants.spacing.cosy, "px) + ").concat(_constants2.HALF_GRID_SIZE, "px))")
42
- },
43
- css: progressBarStyles
44
- });
38
+ return (// eslint-disable-next-line @repo/internal/react/use-primitives
39
+ (0, _react.jsx)("div", {
40
+ "data-testid": testId,
41
+ style: {
42
+ width: "calc(".concat(percentageComplete, "% + ").concat(percentageComplete / 100, " * calc(var(").concat(_constants2.varSpacing, ", ").concat(_constants.spacing.cosy, ") + ").concat(_constants2.HALF_GRID_SIZE, "))")
43
+ },
44
+ css: progressBarStyles
45
+ })
46
+ );
45
47
  };
46
48
 
47
49
  var _default = ProgressBar;
@@ -4,9 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.varTransitionSpeed = exports.varTransitionEasing = exports.varTransitionDelay = exports.varSpacing = exports.varMarkerColor = exports.varBackgroundColor = exports.TRANSITION_SPEED = exports.SEMI_BOLD_FONT_WEIGHT = exports.REGULAR_FONT_WEIGHT = exports.PROGRESS_BAR_HEIGHT = exports.LINEAR_TRANSITION_SPEED = exports.LABEL_TOP_SPACING = exports.HALF_GRID_SIZE = exports.ANIMATION_EASE_OUT = void 0;
7
-
8
- var _constants = require("../constants");
9
-
10
7
  var TRANSITION_SPEED = 300;
11
8
  exports.TRANSITION_SPEED = TRANSITION_SPEED;
12
9
  var LINEAR_TRANSITION_SPEED = 50;
@@ -29,10 +26,10 @@ var SEMI_BOLD_FONT_WEIGHT = '600';
29
26
  exports.SEMI_BOLD_FONT_WEIGHT = SEMI_BOLD_FONT_WEIGHT;
30
27
  var REGULAR_FONT_WEIGHT = '400';
31
28
  exports.REGULAR_FONT_WEIGHT = REGULAR_FONT_WEIGHT;
32
- var HALF_GRID_SIZE = _constants.defaultGridSize / 2;
29
+ var HALF_GRID_SIZE = "var(--ds-scale-050, 4px)";
33
30
  exports.HALF_GRID_SIZE = HALF_GRID_SIZE;
34
- var PROGRESS_BAR_HEIGHT = _constants.defaultGridSize; // Labels sit 20px from bottom of progress bar.
31
+ var PROGRESS_BAR_HEIGHT = "var(--ds-scale-100, 8px)"; // Labels sit 16px from bottom of progress bar i.e. 8 + 16
35
32
 
36
33
  exports.PROGRESS_BAR_HEIGHT = PROGRESS_BAR_HEIGHT;
37
- var LABEL_TOP_SPACING = _constants.defaultGridSize + 20;
34
+ var LABEL_TOP_SPACING = "var(--ds-scale-300, 24px)";
38
35
  exports.LABEL_TOP_SPACING = LABEL_TOP_SPACING;
@@ -23,12 +23,14 @@ var Link = function Link(_ref) {
23
23
  onClick = _ref.onClick,
24
24
  label = _ref.label,
25
25
  testId = _ref.testId;
26
- return (0, _react.jsx)("a", {
27
- css: linkStyles,
28
- href: href,
29
- onClick: onClick,
30
- "data-testid": testId
31
- }, label);
26
+ return (// eslint-disable-next-line @repo/internal/react/use-primitives
27
+ (0, _react.jsx)("a", {
28
+ css: linkStyles,
29
+ href: href,
30
+ onClick: onClick,
31
+ "data-testid": testId
32
+ }, label)
33
+ );
32
34
  };
33
35
 
34
36
  var _default = Link;
@@ -19,7 +19,7 @@ var progressMarkerStyles = (0, _react.css)({
19
19
  left: '50%',
20
20
  backgroundColor: "var(".concat(_constants.varBackgroundColor, ")"),
21
21
  borderRadius: _constants.PROGRESS_BAR_HEIGHT,
22
- transform: "translate(-50%, -".concat(_constants.LABEL_TOP_SPACING, "px)"),
22
+ transform: "translate(-50%, calc(-1 * ".concat(_constants.LABEL_TOP_SPACING, "))"),
23
23
  transition: "opacity var(".concat(_constants.varTransitionSpeed, ") var(").concat(_constants.varTransitionEasing, "), background-color var(").concat(_constants.varTransitionSpeed, ") var(").concat(_constants.varTransitionEasing, ")"),
24
24
  transitionDelay: "var(".concat(_constants.varTransitionDelay, ")"),
25
25
  '&.fade-appear': {
@@ -43,10 +43,13 @@ var progressMarkerStyles = (0, _react.css)({
43
43
 
44
44
  var ProgressMarker = function ProgressMarker(_ref) {
45
45
  var testId = _ref.testId;
46
- return (0, _react.jsx)("div", {
47
- "data-testid": testId,
48
- css: progressMarkerStyles
49
- });
46
+ return (// too many props that would go in UNSAFE_style + css transition prop having issues
47
+ // eslint-disable-next-line @repo/internal/react/use-primitives
48
+ (0, _react.jsx)("div", {
49
+ "data-testid": testId,
50
+ css: progressMarkerStyles
51
+ })
52
+ );
50
53
  };
51
54
 
52
55
  var _default = ProgressMarker;
@@ -27,11 +27,13 @@ var _react2 = require("@emotion/react");
27
27
 
28
28
  var _reactTransitionGroup = require("react-transition-group");
29
29
 
30
- var _constants = require("@atlaskit/theme/constants");
30
+ var _box = _interopRequireDefault(require("@atlaskit/ds-explorations/box"));
31
+
32
+ var _text = _interopRequireDefault(require("@atlaskit/ds-explorations/text"));
31
33
 
32
34
  var _bar = _interopRequireDefault(require("./bar"));
33
35
 
34
- var _constants2 = require("./constants");
36
+ var _constants = require("./constants");
35
37
 
36
38
  var _marker = _interopRequireDefault(require("./marker"));
37
39
 
@@ -45,22 +47,14 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
45
47
 
46
48
  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
49
 
48
- var containerStyles = (0, _react2.css)({
49
- width: '100%',
50
- position: 'relative'
51
- });
52
50
  var listItemStyles = (0, _react2.css)({
53
- // TODO Delete this comment after verifying spacing token -> previous value `0`
54
51
  margin: "var(--ds-scale-0, 0px)",
55
52
  overflowWrap: 'break-word'
56
53
  });
57
54
  var titleStyles = (0, _react2.css)({
58
- marginTop: _constants2.LABEL_TOP_SPACING,
59
55
  // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
60
- marginRight: 'auto',
56
+ marginTop: _constants.LABEL_TOP_SPACING,
61
57
  // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
62
- marginLeft: 'auto',
63
- fontSize: (0, _constants.fontSize)(),
64
58
  lineHeight: '16px',
65
59
  textAlign: 'center',
66
60
  '&.fade-appear': {
@@ -68,7 +62,7 @@ var titleStyles = (0, _react2.css)({
68
62
  },
69
63
  '&.fade-appear.fade-appear-active': {
70
64
  opacity: 1,
71
- transition: "opacity var(".concat(_constants2.varTransitionSpeed, ") cubic-bezier(0.2, 0, 0, 1)")
65
+ transition: "opacity var(".concat(_constants.varTransitionSpeed, ") cubic-bezier(0.2, 0, 0, 1)")
72
66
  }
73
67
  });
74
68
 
@@ -119,7 +113,7 @@ var ProgressTrackerStage = /*#__PURE__*/function (_PureComponent) {
119
113
  }, {
120
114
  key: "render",
121
115
  value: function render() {
122
- var _ref;
116
+ var _listInlineStyles;
123
117
 
124
118
  var _this$props = this.props,
125
119
  item = _this$props.item,
@@ -129,46 +123,53 @@ var ProgressTrackerStage = /*#__PURE__*/function (_PureComponent) {
129
123
  transitionEasing = _this$props.transitionEasing,
130
124
  testId = _this$props.testId;
131
125
  var ariaCurrent = item.status === 'current' ? 'step' : 'false';
132
- return (0, _react2.jsx)("li", {
133
- "data-testid": testId,
134
- 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),
135
- css: listItemStyles,
136
- "aria-current": ariaCurrent
137
- }, (0, _react2.jsx)("div", {
138
- css: containerStyles
139
- }, (0, _react2.jsx)(_reactTransitionGroup.CSSTransition, {
140
- appear: true,
141
- in: this.state.transitioning,
142
- onEntered: this.onEntered,
143
- timeout: transitionDelay + transitionSpeed,
144
- classNames: "fade"
145
- }, (0, _react2.jsx)(_marker.default, {
146
- testId: testId && "".concat(testId, "-marker")
147
- })), (0, _react2.jsx)(_reactTransitionGroup.CSSTransition, {
148
- appear: true,
149
- in: this.state.transitioning,
150
- onEntered: this.onEntered,
151
- timeout: transitionDelay + transitionSpeed,
152
- classNames: "fade"
153
- }, (0, _react2.jsx)(_bar.default, {
154
- testId: testId && "".concat(testId, "-bar"),
155
- percentageComplete: item.percentageComplete
156
- })), (0, _react2.jsx)(_reactTransitionGroup.CSSTransition, {
157
- appear: true,
158
- in: this.state.transitioning,
159
- onEntered: this.onEntered,
160
- timeout: transitionDelay + transitionSpeed,
161
- classNames: "fade"
162
- }, (0, _react2.jsx)("div", {
163
- css: titleStyles,
164
- "data-testid": testId && "".concat(testId, "-title"),
165
- style: {
126
+ var listInlineStyles = (_listInlineStyles = {}, (0, _defineProperty2.default)(_listInlineStyles, _constants.varTransitionSpeed, "".concat(transitionSpeed, "ms")), (0, _defineProperty2.default)(_listInlineStyles, _constants.varTransitionDelay, "".concat(transitionDelay, "ms")), (0, _defineProperty2.default)(_listInlineStyles, _constants.varTransitionEasing, transitionEasing), (0, _defineProperty2.default)(_listInlineStyles, _constants.varMarkerColor, this.state.oldMarkerColor), (0, _defineProperty2.default)(_listInlineStyles, _constants.varBackgroundColor, (0, _utils.getMarkerColor)(item.status)), _listInlineStyles);
127
+ return (// eslint-disable-next-line @repo/internal/react/use-primitives
128
+ (0, _react2.jsx)("li", {
129
+ "data-testid": testId,
130
+ style: listInlineStyles,
131
+ css: listItemStyles,
132
+ "aria-current": ariaCurrent
133
+ }, (0, _react2.jsx)(_box.default, {
134
+ display: "block",
135
+ UNSAFE_style: {
136
+ width: '100%'
137
+ }
138
+ }, (0, _react2.jsx)(_reactTransitionGroup.CSSTransition, {
139
+ appear: true,
140
+ in: this.state.transitioning,
141
+ onEntered: this.onEntered,
142
+ timeout: transitionDelay + transitionSpeed,
143
+ classNames: "fade"
144
+ }, (0, _react2.jsx)(_marker.default, {
145
+ testId: testId && "".concat(testId, "-marker")
146
+ })), (0, _react2.jsx)(_reactTransitionGroup.CSSTransition, {
147
+ appear: true,
148
+ in: this.state.transitioning,
149
+ onEntered: this.onEntered,
150
+ timeout: transitionDelay + transitionSpeed,
151
+ classNames: "fade"
152
+ }, (0, _react2.jsx)(_bar.default, {
153
+ testId: testId && "".concat(testId, "-bar"),
154
+ percentageComplete: item.percentageComplete
155
+ })), (0, _react2.jsx)(_reactTransitionGroup.CSSTransition, {
156
+ appear: true,
157
+ in: this.state.transitioning,
158
+ onEntered: this.onEntered,
159
+ timeout: transitionDelay + transitionSpeed,
160
+ classNames: "fade"
161
+ }, (0, _react2.jsx)("div", {
162
+ css: titleStyles
163
+ }, (0, _react2.jsx)(_text.default, {
164
+ fontSize: "14px",
165
+ lineHeight: "16px",
166
+ testId: testId && "".concat(testId, "-title"),
166
167
  color: (0, _utils.getTextColor)(item.status),
167
168
  fontWeight: (0, _utils.getFontWeight)(item.status)
168
- }
169
- }, this.shouldShowLink() ? render.link({
170
- item: item
171
- }) : item.label))));
169
+ }, this.shouldShowLink() ? render.link({
170
+ item: item
171
+ }) : item.label)))))
172
+ );
172
173
  }
173
174
  }]);
174
175
  return ProgressTrackerStage;
@@ -29,16 +29,16 @@ exports.getMarkerColor = getMarkerColor;
29
29
  var getTextColor = function getTextColor(status) {
30
30
  switch (status) {
31
31
  case 'unvisited':
32
- return "var(--ds-text-subtlest, ".concat(_colors.N300, ")");
32
+ return 'subtlest';
33
33
 
34
34
  case 'current':
35
- return "var(--ds-text-brand, ".concat(_colors.B300, ")");
35
+ return 'brand';
36
36
 
37
37
  case 'visited':
38
- return "var(--ds-text, ".concat(_colors.N800, ")");
38
+ return 'color.text';
39
39
 
40
40
  case 'disabled':
41
- return "var(--ds-text-disabled, ".concat(_colors.N70, ")");
41
+ return 'disabled';
42
42
 
43
43
  default:
44
44
  return;
@@ -46,13 +46,11 @@ var containerStyles = (0, _react2.css)({
46
46
  width: '100%',
47
47
  // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
48
48
  margin: '0 auto',
49
- // TODO Delete this comment after verifying spacing token -> previous value `0`
50
49
  padding: "var(--ds-scale-0, 0px)",
51
50
  // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
52
51
  gap: "var(".concat(_constants2.varSpacing, ")"),
53
52
  listStyleType: 'none',
54
53
  '&&': {
55
- // TODO Delete this comment after verifying spacing token -> previous value `40`
56
54
  marginTop: "var(--ds-scale-500, 40px)"
57
55
  }
58
56
  });
@@ -102,7 +100,7 @@ var ProgressTracker = /*#__PURE__*/function (_PureComponent) {
102
100
  key: "render",
103
101
  value: function render() {
104
102
  var _this3 = this,
105
- _ref;
103
+ _listInlineStyles;
106
104
 
107
105
  var _this$props = this.props,
108
106
  testId = _this$props.testId,
@@ -150,14 +148,17 @@ var ProgressTracker = /*#__PURE__*/function (_PureComponent) {
150
148
  render: _this3.props.render
151
149
  });
152
150
  });
153
- return (0, _react2.jsx)("ul", {
154
- "data-testid": testId,
155
- style: (_ref = {
156
- gridTemplateColumns: "repeat(".concat(items.length, ", 1fr)")
157
- }, (0, _defineProperty2.default)(_ref, _constants2.varSpacing, "".concat(_constants.spacing[this.props.spacing], "px")), (0, _defineProperty2.default)(_ref, "maxWidth", _constants.defaultGridSize * 10 * items.length * 2), _ref),
158
- css: containerStyles,
159
- "aria-label": label
160
- }, items);
151
+ var listInlineStyles = (_listInlineStyles = {
152
+ gridTemplateColumns: "repeat(".concat(items.length, ", 1fr)")
153
+ }, (0, _defineProperty2.default)(_listInlineStyles, _constants2.varSpacing, _constants.spacing[this.props.spacing]), (0, _defineProperty2.default)(_listInlineStyles, "maxWidth", 8 * 10 * items.length * 2), _listInlineStyles);
154
+ return (// eslint-disable-next-line @repo/internal/react/use-primitives
155
+ (0, _react2.jsx)("ul", {
156
+ "data-testid": testId,
157
+ style: listInlineStyles,
158
+ css: containerStyles,
159
+ "aria-label": label
160
+ }, items)
161
+ );
161
162
  }
162
163
  }]);
163
164
  return ProgressTracker;
@@ -168,8 +169,8 @@ exports.default = ProgressTracker;
168
169
  items: [],
169
170
  spacing: 'cosy',
170
171
  render: {
171
- link: function link(_ref2) {
172
- var item = _ref2.item;
172
+ link: function link(_ref) {
173
+ var item = _ref.item;
173
174
  return (0, _react2.jsx)(_link.default, item);
174
175
  }
175
176
  },
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/progress-tracker",
3
- "version": "8.3.4",
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 const defaultGridSize = getGridSize();
3
1
  /**
4
2
  * Ideally these are exported by @atlaskit/page
5
3
  */
6
-
7
4
  export const 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 @@ const progressBarStyles = css({
10
10
  backgroundColor: `var(--ds-background-brand-bold, ${B300})`,
11
11
  borderBottomRightRadius: PROGRESS_BAR_HEIGHT,
12
12
  borderTopRightRadius: PROGRESS_BAR_HEIGHT,
13
- transform: `translate(0, -${LABEL_TOP_SPACING}px)`,
13
+ transform: `translate(0, calc(-1 * ${LABEL_TOP_SPACING}))`,
14
14
  transition: `width var(${varTransitionSpeed}) var(${varTransitionEasing})`,
15
15
  transitionDelay: `var(${varTransitionDelay})`
16
16
  });
@@ -24,10 +24,11 @@ const progressBarStyles = css({
24
24
  const ProgressBar = ({
25
25
  percentageComplete,
26
26
  testId
27
- }) => jsx("div", {
27
+ }) => // eslint-disable-next-line @repo/internal/react/use-primitives
28
+ jsx("div", {
28
29
  "data-testid": testId,
29
30
  style: {
30
- width: `calc(${percentageComplete}% + ${percentageComplete / 100} * calc(var(${varSpacing}, ${spacing.cosy}px) + ${HALF_GRID_SIZE}px))`
31
+ width: `calc(${percentageComplete}% + ${percentageComplete / 100} * calc(var(${varSpacing}, ${spacing.cosy}) + ${HALF_GRID_SIZE}))`
31
32
  },
32
33
  css: progressBarStyles
33
34
  });
@@ -1,4 +1,3 @@
1
- import { defaultGridSize } from '../constants';
2
1
  export const TRANSITION_SPEED = 300;
3
2
  export const LINEAR_TRANSITION_SPEED = 50;
4
3
  export const ANIMATION_EASE_OUT = 'cubic-bezier(0.15,1,0.3,1)';
@@ -10,7 +9,7 @@ export const varMarkerColor = '--ds--pt--mc';
10
9
  export const varBackgroundColor = '--ds--pt--bg';
11
10
  export const SEMI_BOLD_FONT_WEIGHT = '600';
12
11
  export const REGULAR_FONT_WEIGHT = '400';
13
- export const HALF_GRID_SIZE = defaultGridSize / 2;
14
- export const PROGRESS_BAR_HEIGHT = defaultGridSize; // Labels sit 20px from bottom of progress bar.
12
+ export const HALF_GRID_SIZE = "var(--ds-scale-050, 4px)";
13
+ export const PROGRESS_BAR_HEIGHT = "var(--ds-scale-100, 8px)"; // Labels sit 16px from bottom of progress bar i.e. 8 + 16
15
14
 
16
- export const LABEL_TOP_SPACING = defaultGridSize + 20;
15
+ export const LABEL_TOP_SPACING = "var(--ds-scale-300, 24px)";
@@ -14,7 +14,8 @@ const Link = ({
14
14
  onClick,
15
15
  label,
16
16
  testId
17
- }) => jsx("a", {
17
+ }) => // eslint-disable-next-line @repo/internal/react/use-primitives
18
+ jsx("a", {
18
19
  css: linkStyles,
19
20
  href: href,
20
21
  onClick: onClick,
@@ -10,7 +10,7 @@ const progressMarkerStyles = css({
10
10
  left: '50%',
11
11
  backgroundColor: `var(${varBackgroundColor})`,
12
12
  borderRadius: PROGRESS_BAR_HEIGHT,
13
- transform: `translate(-50%, -${LABEL_TOP_SPACING}px)`,
13
+ transform: `translate(-50%, calc(-1 * ${LABEL_TOP_SPACING}))`,
14
14
  transition: `opacity var(${varTransitionSpeed}) var(${varTransitionEasing}), background-color var(${varTransitionSpeed}) var(${varTransitionEasing})`,
15
15
  transitionDelay: `var(${varTransitionDelay})`,
16
16
  '&.fade-appear': {
@@ -34,7 +34,9 @@ const progressMarkerStyles = css({
34
34
 
35
35
  const ProgressMarker = ({
36
36
  testId
37
- }) => jsx("div", {
37
+ }) => // 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", {
38
40
  "data-testid": testId,
39
41
  css: progressMarkerStyles
40
42
  });
@@ -6,27 +6,20 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
6
6
  import { PureComponent } from 'react';
7
7
  import { css, jsx } from '@emotion/react';
8
8
  import { CSSTransition } from 'react-transition-group';
9
- import { fontSize } from '@atlaskit/theme/constants';
9
+ import Box from '@atlaskit/ds-explorations/box';
10
+ import Text from '@atlaskit/ds-explorations/text';
10
11
  import ProgressBar from './bar';
11
12
  import { LABEL_TOP_SPACING, varBackgroundColor, varMarkerColor, varTransitionDelay, varTransitionEasing, varTransitionSpeed } from './constants';
12
13
  import ProgressMarker from './marker';
13
14
  import { getFontWeight, getMarkerColor, getTextColor } from './utils';
14
- const containerStyles = css({
15
- width: '100%',
16
- position: 'relative'
17
- });
18
15
  const listItemStyles = css({
19
- // TODO Delete this comment after verifying spacing token -> previous value `0`
20
16
  margin: "var(--ds-scale-0, 0px)",
21
17
  overflowWrap: 'break-word'
22
18
  });
23
19
  const titleStyles = css({
24
- marginTop: LABEL_TOP_SPACING,
25
20
  // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
26
- marginRight: 'auto',
21
+ marginTop: LABEL_TOP_SPACING,
27
22
  // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
28
- marginLeft: 'auto',
29
- fontSize: fontSize(),
30
23
  lineHeight: '16px',
31
24
  textAlign: 'center',
32
25
  '&.fade-appear': {
@@ -82,52 +75,59 @@ export default class ProgressTrackerStage extends PureComponent {
82
75
  testId
83
76
  } = this.props;
84
77
  const ariaCurrent = item.status === 'current' ? 'step' : 'false';
85
- return jsx("li", {
86
- "data-testid": testId,
87
- style: {
88
- [varTransitionSpeed]: `${transitionSpeed}ms`,
89
- [varTransitionDelay]: `${transitionDelay}ms`,
90
- [varTransitionEasing]: transitionEasing,
91
- [varMarkerColor]: this.state.oldMarkerColor,
92
- [varBackgroundColor]: getMarkerColor(item.status)
93
- },
94
- css: listItemStyles,
95
- "aria-current": ariaCurrent
96
- }, jsx("div", {
97
- css: containerStyles
98
- }, jsx(CSSTransition, {
99
- appear: true,
100
- in: this.state.transitioning,
101
- onEntered: this.onEntered,
102
- timeout: transitionDelay + transitionSpeed,
103
- classNames: "fade"
104
- }, jsx(ProgressMarker, {
105
- testId: testId && `${testId}-marker`
106
- })), jsx(CSSTransition, {
107
- appear: true,
108
- in: this.state.transitioning,
109
- onEntered: this.onEntered,
110
- timeout: transitionDelay + transitionSpeed,
111
- classNames: "fade"
112
- }, jsx(ProgressBar, {
113
- testId: testId && `${testId}-bar`,
114
- percentageComplete: item.percentageComplete
115
- })), jsx(CSSTransition, {
116
- appear: true,
117
- in: this.state.transitioning,
118
- onEntered: this.onEntered,
119
- timeout: transitionDelay + transitionSpeed,
120
- classNames: "fade"
121
- }, jsx("div", {
122
- css: titleStyles,
123
- "data-testid": testId && `${testId}-title`,
124
- style: {
78
+ const listInlineStyles = {
79
+ [varTransitionSpeed]: `${transitionSpeed}ms`,
80
+ [varTransitionDelay]: `${transitionDelay}ms`,
81
+ [varTransitionEasing]: transitionEasing,
82
+ [varMarkerColor]: this.state.oldMarkerColor,
83
+ [varBackgroundColor]: getMarkerColor(item.status)
84
+ };
85
+ return (// eslint-disable-next-line @repo/internal/react/use-primitives
86
+ jsx("li", {
87
+ "data-testid": testId,
88
+ style: listInlineStyles,
89
+ css: listItemStyles,
90
+ "aria-current": ariaCurrent
91
+ }, jsx(Box, {
92
+ display: "block",
93
+ UNSAFE_style: {
94
+ width: '100%'
95
+ }
96
+ }, jsx(CSSTransition, {
97
+ appear: true,
98
+ in: this.state.transitioning,
99
+ onEntered: this.onEntered,
100
+ timeout: transitionDelay + transitionSpeed,
101
+ classNames: "fade"
102
+ }, jsx(ProgressMarker, {
103
+ testId: testId && `${testId}-marker`
104
+ })), jsx(CSSTransition, {
105
+ appear: true,
106
+ in: this.state.transitioning,
107
+ onEntered: this.onEntered,
108
+ timeout: transitionDelay + transitionSpeed,
109
+ classNames: "fade"
110
+ }, jsx(ProgressBar, {
111
+ testId: testId && `${testId}-bar`,
112
+ percentageComplete: item.percentageComplete
113
+ })), jsx(CSSTransition, {
114
+ appear: true,
115
+ in: this.state.transitioning,
116
+ onEntered: this.onEntered,
117
+ timeout: transitionDelay + transitionSpeed,
118
+ classNames: "fade"
119
+ }, jsx("div", {
120
+ css: titleStyles
121
+ }, jsx(Text, {
122
+ fontSize: "14px",
123
+ lineHeight: "16px",
124
+ testId: testId && `${testId}-title`,
125
125
  color: getTextColor(item.status),
126
126
  fontWeight: getFontWeight(item.status)
127
- }
128
- }, this.shouldShowLink() ? render.link({
129
- item
130
- }) : item.label))));
127
+ }, this.shouldShowLink() ? render.link({
128
+ item
129
+ }) : item.label)))))
130
+ );
131
131
  }
132
132
 
133
133
  }
@@ -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 const getMarkerColor = status => {
4
4
  switch (status) {
@@ -17,16 +17,16 @@ export const getMarkerColor = status => {
17
17
  export const getTextColor = status => {
18
18
  switch (status) {
19
19
  case 'unvisited':
20
- return `var(--ds-text-subtlest, ${N300})`;
20
+ return 'subtlest';
21
21
 
22
22
  case 'current':
23
- return `var(--ds-text-brand, ${B300})`;
23
+ return 'brand';
24
24
 
25
25
  case 'visited':
26
- return `var(--ds-text, ${N800})`;
26
+ return 'color.text';
27
27
 
28
28
  case 'disabled':
29
- return `var(--ds-text-disabled, ${N70})`;
29
+ return 'disabled';
30
30
 
31
31
  default:
32
32
  return;
@@ -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.4",
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.4",
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.4",
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/"
@@ -24,6 +24,7 @@
24
24
  }
25
25
  },
26
26
  "dependencies": {
27
+ "@atlaskit/ds-explorations": "^1.2.0",
27
28
  "@atlaskit/theme": "^12.2.0",
28
29
  "@atlaskit/tokens": "^0.11.0",
29
30
  "@babel/runtime": "^7.0.0",
@@ -63,7 +64,8 @@
63
64
  "emotion"
64
65
  ],
65
66
  "analytics": "analytics-next",
66
- "deprecation": "no-deprecated-imports"
67
+ "deprecation": "no-deprecated-imports",
68
+ "ui-components": "primitives"
67
69
  }
68
70
  },
69
71
  "af:exports": {