@atlaskit/progress-tracker 8.6.0 → 8.6.2

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.
@@ -13,8 +13,8 @@ var varTransitionDelay = exports.varTransitionDelay = '--ds--pt--td';
13
13
  var varTransitionEasing = exports.varTransitionEasing = '--ds--pt--te';
14
14
  var varMarkerColor = exports.varMarkerColor = '--ds--pt--mc';
15
15
  var varBackgroundColor = exports.varBackgroundColor = '--ds--pt--bg';
16
- var SEMI_BOLD_FONT_WEIGHT = exports.SEMI_BOLD_FONT_WEIGHT = 'semibold';
17
- var REGULAR_FONT_WEIGHT = exports.REGULAR_FONT_WEIGHT = 'regular';
16
+ var REGULAR_FONT_WEIGHT = exports.REGULAR_FONT_WEIGHT = "var(--ds-font-weight-regular, 400)";
17
+ var SEMI_BOLD_FONT_WEIGHT = exports.SEMI_BOLD_FONT_WEIGHT = "var(--ds-font-weight-semibold, 600)";
18
18
  var HALF_GRID_SIZE = exports.HALF_GRID_SIZE = "var(--ds-space-050, 4px)";
19
19
  var PROGRESS_BAR_HEIGHT = exports.PROGRESS_BAR_HEIGHT = "var(--ds-space-100, 8px)";
20
20
 
@@ -15,7 +15,6 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
15
15
  var _react = require("react");
16
16
  var _react2 = require("@emotion/react");
17
17
  var _reactTransitionGroup = require("react-transition-group");
18
- var _text = _interopRequireDefault(require("@atlaskit/ds-explorations/text"));
19
18
  var _primitives = require("@atlaskit/primitives");
20
19
  var _bar = _interopRequireDefault(require("./bar"));
21
20
  var _constants = require("./constants");
@@ -47,6 +46,10 @@ var titleStyles = (0, _react2.css)({
47
46
  transition: "opacity var(".concat(_constants.varTransitionSpeed, ") cubic-bezier(0.2, 0, 0, 1)")
48
47
  }
49
48
  });
49
+ var textStyles = (0, _react2.css)({
50
+ fontSize: '14px',
51
+ lineHeight: '16px'
52
+ });
50
53
  var ProgressTrackerStage = exports.default = /*#__PURE__*/function (_PureComponent) {
51
54
  (0, _inherits2.default)(ProgressTrackerStage, _PureComponent);
52
55
  var _super = _createSuper(ProgressTrackerStage);
@@ -101,7 +104,9 @@ var ProgressTrackerStage = exports.default = /*#__PURE__*/function (_PureCompone
101
104
  var ariaCurrent = item.status === 'current' ? 'step' : 'false';
102
105
  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);
103
106
  return (0, _react2.jsx)("li", {
104
- "data-testid": testId,
107
+ "data-testid": testId
108
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
109
+ ,
105
110
  style: listInlineStyles,
106
111
  css: listItemStyles,
107
112
  "aria-current": ariaCurrent
@@ -132,12 +137,13 @@ var ProgressTrackerStage = exports.default = /*#__PURE__*/function (_PureCompone
132
137
  classNames: "fade"
133
138
  }, (0, _react2.jsx)("div", {
134
139
  css: titleStyles
135
- }, (0, _react2.jsx)(_text.default, {
136
- fontSize: "size.100",
137
- lineHeight: "lineHeight.100",
138
- testId: testId && "".concat(testId, "-title"),
139
- color: (0, _utils.getTextColor)(item.status),
140
- fontWeight: (0, _utils.getFontWeight)(item.status)
140
+ }, (0, _react2.jsx)("span", {
141
+ css: textStyles,
142
+ style: {
143
+ color: (0, _utils.getTextColor)(item.status),
144
+ fontWeight: (0, _utils.getFontWeight)(item.status)
145
+ },
146
+ "data-testid": testId && "".concat(testId, "-title")
141
147
  }, this.shouldShowLink() ? render.link({
142
148
  item: item
143
149
  }) : item.label)))));
@@ -21,13 +21,13 @@ var getMarkerColor = exports.getMarkerColor = function getMarkerColor(status) {
21
21
  var getTextColor = exports.getTextColor = function getTextColor(status) {
22
22
  switch (status) {
23
23
  case 'unvisited':
24
- return 'subtlest';
24
+ return "var(--ds-text-subtlest, #626F86)";
25
25
  case 'current':
26
- return 'brand';
26
+ return "var(--ds-text-brand, #0C66E4)";
27
27
  case 'visited':
28
- return 'color.text';
28
+ return "var(--ds-text, #172B4D)";
29
29
  case 'disabled':
30
- return 'disabled';
30
+ return "var(--ds-text-disabled, #091E424F)";
31
31
  default:
32
32
  return;
33
33
  }
@@ -120,7 +120,9 @@ var ProgressTracker = exports.default = /*#__PURE__*/function (_PureComponent) {
120
120
  gridTemplateColumns: "repeat(".concat(items.length, ", 1fr)")
121
121
  }, (0, _defineProperty2.default)(_listInlineStyles, _constants2.varSpacing, _constants.spacing[this.props.spacing]), (0, _defineProperty2.default)(_listInlineStyles, "maxWidth", 8 * 10 * items.length * 2), _listInlineStyles);
122
122
  return (0, _react2.jsx)("ul", {
123
- "data-testid": testId,
123
+ "data-testid": testId
124
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
125
+ ,
124
126
  style: listInlineStyles,
125
127
  css: containerStyles,
126
128
  "aria-label": label
@@ -7,8 +7,8 @@ export const varTransitionDelay = '--ds--pt--td';
7
7
  export const varTransitionEasing = '--ds--pt--te';
8
8
  export const varMarkerColor = '--ds--pt--mc';
9
9
  export const varBackgroundColor = '--ds--pt--bg';
10
- export const SEMI_BOLD_FONT_WEIGHT = 'semibold';
11
- export const REGULAR_FONT_WEIGHT = 'regular';
10
+ export const REGULAR_FONT_WEIGHT = "var(--ds-font-weight-regular, 400)";
11
+ export const SEMI_BOLD_FONT_WEIGHT = "var(--ds-font-weight-semibold, 600)";
12
12
  export const HALF_GRID_SIZE = "var(--ds-space-050, 4px)";
13
13
  export const PROGRESS_BAR_HEIGHT = "var(--ds-space-100, 8px)";
14
14
 
@@ -4,7 +4,6 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
4
4
  import { PureComponent } from 'react';
5
5
  import { css, jsx } from '@emotion/react';
6
6
  import { CSSTransition } from 'react-transition-group';
7
- import Text from '@atlaskit/ds-explorations/text';
8
7
  import { Box, xcss } from '@atlaskit/primitives';
9
8
  import ProgressBar from './bar';
10
9
  import { LABEL_TOP_SPACING, varBackgroundColor, varMarkerColor, varTransitionDelay, varTransitionEasing, varTransitionSpeed } from './constants';
@@ -32,6 +31,10 @@ const titleStyles = css({
32
31
  transition: `opacity var(${varTransitionSpeed}) cubic-bezier(0.2, 0, 0, 1)`
33
32
  }
34
33
  });
34
+ const textStyles = css({
35
+ fontSize: '14px',
36
+ lineHeight: '16px'
37
+ });
35
38
  export default class ProgressTrackerStage extends PureComponent {
36
39
  constructor(props) {
37
40
  super(props);
@@ -81,7 +84,9 @@ export default class ProgressTrackerStage extends PureComponent {
81
84
  [varBackgroundColor]: getMarkerColor(item.status)
82
85
  };
83
86
  return jsx("li", {
84
- "data-testid": testId,
87
+ "data-testid": testId
88
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
89
+ ,
85
90
  style: listInlineStyles,
86
91
  css: listItemStyles,
87
92
  "aria-current": ariaCurrent
@@ -112,12 +117,13 @@ export default class ProgressTrackerStage extends PureComponent {
112
117
  classNames: "fade"
113
118
  }, jsx("div", {
114
119
  css: titleStyles
115
- }, jsx(Text, {
116
- fontSize: "size.100",
117
- lineHeight: "lineHeight.100",
118
- testId: testId && `${testId}-title`,
119
- color: getTextColor(item.status),
120
- fontWeight: getFontWeight(item.status)
120
+ }, jsx("span", {
121
+ css: textStyles,
122
+ style: {
123
+ color: getTextColor(item.status),
124
+ fontWeight: getFontWeight(item.status)
125
+ },
126
+ "data-testid": testId && `${testId}-title`
121
127
  }, this.shouldShowLink() ? render.link({
122
128
  item
123
129
  }) : item.label)))));
@@ -15,13 +15,13 @@ export const getMarkerColor = status => {
15
15
  export const getTextColor = status => {
16
16
  switch (status) {
17
17
  case 'unvisited':
18
- return 'subtlest';
18
+ return "var(--ds-text-subtlest, #626F86)";
19
19
  case 'current':
20
- return 'brand';
20
+ return "var(--ds-text-brand, #0C66E4)";
21
21
  case 'visited':
22
- return 'color.text';
22
+ return "var(--ds-text, #172B4D)";
23
23
  case 'disabled':
24
- return 'disabled';
24
+ return "var(--ds-text-disabled, #091E424F)";
25
25
  default:
26
26
  return;
27
27
  }
@@ -84,7 +84,9 @@ export default class ProgressTracker extends PureComponent {
84
84
  maxWidth: 8 * 10 * items.length * 2
85
85
  };
86
86
  return jsx("ul", {
87
- "data-testid": testId,
87
+ "data-testid": testId
88
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
89
+ ,
88
90
  style: listInlineStyles,
89
91
  css: containerStyles,
90
92
  "aria-label": label
@@ -7,8 +7,8 @@ export var varTransitionDelay = '--ds--pt--td';
7
7
  export var varTransitionEasing = '--ds--pt--te';
8
8
  export var varMarkerColor = '--ds--pt--mc';
9
9
  export var varBackgroundColor = '--ds--pt--bg';
10
- export var SEMI_BOLD_FONT_WEIGHT = 'semibold';
11
- export var REGULAR_FONT_WEIGHT = 'regular';
10
+ export var REGULAR_FONT_WEIGHT = "var(--ds-font-weight-regular, 400)";
11
+ export var SEMI_BOLD_FONT_WEIGHT = "var(--ds-font-weight-semibold, 600)";
12
12
  export var HALF_GRID_SIZE = "var(--ds-space-050, 4px)";
13
13
  export var PROGRESS_BAR_HEIGHT = "var(--ds-space-100, 8px)";
14
14
 
@@ -14,7 +14,6 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
14
14
  import { PureComponent } from 'react';
15
15
  import { css, jsx } from '@emotion/react';
16
16
  import { CSSTransition } from 'react-transition-group';
17
- import Text from '@atlaskit/ds-explorations/text';
18
17
  import { Box, xcss } from '@atlaskit/primitives';
19
18
  import ProgressBar from './bar';
20
19
  import { LABEL_TOP_SPACING, varBackgroundColor, varMarkerColor, varTransitionDelay, varTransitionEasing, varTransitionSpeed } from './constants';
@@ -42,6 +41,10 @@ var titleStyles = css({
42
41
  transition: "opacity var(".concat(varTransitionSpeed, ") cubic-bezier(0.2, 0, 0, 1)")
43
42
  }
44
43
  });
44
+ var textStyles = css({
45
+ fontSize: '14px',
46
+ lineHeight: '16px'
47
+ });
45
48
  var ProgressTrackerStage = /*#__PURE__*/function (_PureComponent) {
46
49
  _inherits(ProgressTrackerStage, _PureComponent);
47
50
  var _super = _createSuper(ProgressTrackerStage);
@@ -96,7 +99,9 @@ var ProgressTrackerStage = /*#__PURE__*/function (_PureComponent) {
96
99
  var ariaCurrent = item.status === 'current' ? 'step' : 'false';
97
100
  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);
98
101
  return jsx("li", {
99
- "data-testid": testId,
102
+ "data-testid": testId
103
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
104
+ ,
100
105
  style: listInlineStyles,
101
106
  css: listItemStyles,
102
107
  "aria-current": ariaCurrent
@@ -127,12 +132,13 @@ var ProgressTrackerStage = /*#__PURE__*/function (_PureComponent) {
127
132
  classNames: "fade"
128
133
  }, jsx("div", {
129
134
  css: titleStyles
130
- }, jsx(Text, {
131
- fontSize: "size.100",
132
- lineHeight: "lineHeight.100",
133
- testId: testId && "".concat(testId, "-title"),
134
- color: getTextColor(item.status),
135
- fontWeight: getFontWeight(item.status)
135
+ }, jsx("span", {
136
+ css: textStyles,
137
+ style: {
138
+ color: getTextColor(item.status),
139
+ fontWeight: getFontWeight(item.status)
140
+ },
141
+ "data-testid": testId && "".concat(testId, "-title")
136
142
  }, this.shouldShowLink() ? render.link({
137
143
  item: item
138
144
  }) : item.label)))));
@@ -15,13 +15,13 @@ export var getMarkerColor = function getMarkerColor(status) {
15
15
  export var getTextColor = function getTextColor(status) {
16
16
  switch (status) {
17
17
  case 'unvisited':
18
- return 'subtlest';
18
+ return "var(--ds-text-subtlest, #626F86)";
19
19
  case 'current':
20
- return 'brand';
20
+ return "var(--ds-text-brand, #0C66E4)";
21
21
  case 'visited':
22
- return 'color.text';
22
+ return "var(--ds-text, #172B4D)";
23
23
  case 'disabled':
24
- return 'disabled';
24
+ return "var(--ds-text-disabled, #091E424F)";
25
25
  default:
26
26
  return;
27
27
  }
@@ -115,7 +115,9 @@ var ProgressTracker = /*#__PURE__*/function (_PureComponent) {
115
115
  gridTemplateColumns: "repeat(".concat(items.length, ", 1fr)")
116
116
  }, _defineProperty(_listInlineStyles, varSpacing, spacing[this.props.spacing]), _defineProperty(_listInlineStyles, "maxWidth", 8 * 10 * items.length * 2), _listInlineStyles);
117
117
  return jsx("ul", {
118
- "data-testid": testId,
118
+ "data-testid": testId
119
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
120
+ ,
119
121
  style: listInlineStyles,
120
122
  css: containerStyles,
121
123
  "aria-label": label
@@ -7,8 +7,8 @@ export declare const varTransitionDelay = "--ds--pt--td";
7
7
  export declare const varTransitionEasing = "--ds--pt--te";
8
8
  export declare const varMarkerColor = "--ds--pt--mc";
9
9
  export declare const varBackgroundColor = "--ds--pt--bg";
10
- export declare const SEMI_BOLD_FONT_WEIGHT = "semibold";
11
- export declare const REGULAR_FONT_WEIGHT = "regular";
10
+ export declare const REGULAR_FONT_WEIGHT: "var(--ds-font-weight-regular)";
11
+ export declare const SEMI_BOLD_FONT_WEIGHT: "var(--ds-font-weight-semibold)";
12
12
  export declare const HALF_GRID_SIZE: "var(--ds-space-050)";
13
13
  export declare const PROGRESS_BAR_HEIGHT: "var(--ds-space-100)";
14
14
  export declare const LABEL_TOP_SPACING: "var(--ds-space-300)";
@@ -1,6 +1,6 @@
1
1
  /** @jsx jsx */
2
- import { FC } from 'react';
3
- import { Stage } from '../types';
2
+ import { type FC } from 'react';
3
+ import { type Stage } from '../types';
4
4
  /**
5
5
  * __Progress tracker link__
6
6
  */
@@ -1,5 +1,5 @@
1
1
  /** @jsx jsx */
2
- import { FC } from 'react';
2
+ import { type FC } from 'react';
3
3
  /**
4
4
  * __Progress marker__
5
5
  *
@@ -1,5 +1,4 @@
1
- import { TextColor } from '@atlaskit/ds-explorations/text';
2
1
  import type { Status } from '../types';
3
2
  export declare const getMarkerColor: (status: Status) => "var(--ds-icon-subtle)" | "var(--ds-icon-brand)" | undefined;
4
- export declare const getTextColor: (status: Status) => TextColor | undefined;
5
- export declare const getFontWeight: (status: Status) => "semibold" | "regular" | undefined;
3
+ export declare const getTextColor: (status: Status) => "var(--ds-text)" | "var(--ds-text-subtlest)" | "var(--ds-text-brand)" | "var(--ds-text-disabled)" | undefined;
4
+ export declare const getFontWeight: (status: Status) => "var(--ds-font-weight-regular)" | "var(--ds-font-weight-semibold)" | undefined;
@@ -7,8 +7,8 @@ export declare const varTransitionDelay = "--ds--pt--td";
7
7
  export declare const varTransitionEasing = "--ds--pt--te";
8
8
  export declare const varMarkerColor = "--ds--pt--mc";
9
9
  export declare const varBackgroundColor = "--ds--pt--bg";
10
- export declare const SEMI_BOLD_FONT_WEIGHT = "semibold";
11
- export declare const REGULAR_FONT_WEIGHT = "regular";
10
+ export declare const REGULAR_FONT_WEIGHT: "var(--ds-font-weight-regular)";
11
+ export declare const SEMI_BOLD_FONT_WEIGHT: "var(--ds-font-weight-semibold)";
12
12
  export declare const HALF_GRID_SIZE: "var(--ds-space-050)";
13
13
  export declare const PROGRESS_BAR_HEIGHT: "var(--ds-space-100)";
14
14
  export declare const LABEL_TOP_SPACING: "var(--ds-space-300)";
@@ -1,6 +1,6 @@
1
1
  /** @jsx jsx */
2
- import { FC } from 'react';
3
- import { Stage } from '../types';
2
+ import { type FC } from 'react';
3
+ import { type Stage } from '../types';
4
4
  /**
5
5
  * __Progress tracker link__
6
6
  */
@@ -1,5 +1,5 @@
1
1
  /** @jsx jsx */
2
- import { FC } from 'react';
2
+ import { type FC } from 'react';
3
3
  /**
4
4
  * __Progress marker__
5
5
  *
@@ -1,5 +1,4 @@
1
- import { TextColor } from '@atlaskit/ds-explorations/text';
2
1
  import type { Status } from '../types';
3
2
  export declare const getMarkerColor: (status: Status) => "var(--ds-icon-subtle)" | "var(--ds-icon-brand)" | undefined;
4
- export declare const getTextColor: (status: Status) => TextColor | undefined;
5
- export declare const getFontWeight: (status: Status) => "semibold" | "regular" | undefined;
3
+ export declare const getTextColor: (status: Status) => "var(--ds-text)" | "var(--ds-text-subtlest)" | "var(--ds-text-brand)" | "var(--ds-text-disabled)" | undefined;
4
+ export declare const getFontWeight: (status: Status) => "var(--ds-font-weight-regular)" | "var(--ds-font-weight-semibold)" | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/progress-tracker",
3
- "version": "8.6.0",
3
+ "version": "8.6.2",
4
4
  "description": "A progress tracker displays the steps and progress through a journey.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -27,10 +27,9 @@
27
27
  }
28
28
  },
29
29
  "dependencies": {
30
- "@atlaskit/ds-explorations": "^3.5.0",
31
- "@atlaskit/primitives": "^6.1.0",
32
- "@atlaskit/theme": "^12.8.0",
33
- "@atlaskit/tokens": "^1.48.0",
30
+ "@atlaskit/primitives": "^7.0.0",
31
+ "@atlaskit/theme": "^12.9.0",
32
+ "@atlaskit/tokens": "^1.49.0",
34
33
  "@babel/runtime": "^7.0.0",
35
34
  "@emotion/react": "^11.7.1",
36
35
  "react-transition-group": "^4.4.1"
@@ -44,7 +43,6 @@
44
43
  "@atlaskit/ds-lib": "^2.3.0",
45
44
  "@atlaskit/ssr": "*",
46
45
  "@atlaskit/visual-regression": "*",
47
- "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
48
46
  "@testing-library/react": "^12.1.5",
49
47
  "@testing-library/user-event": "^14.4.3",
50
48
  "@types/react-transition-group": "^2.0.6",
@@ -87,6 +85,5 @@
87
85
  "./types": "./src/types.tsx",
88
86
  ".": "./src/index.tsx"
89
87
  },
90
- "homepage": "https://atlassian.design/components/progress-tracker/",
91
- "prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1"
88
+ "homepage": "https://atlassian.design/components/progress-tracker/"
92
89
  }