@atlaskit/progress-tracker 8.10.2 → 8.11.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,23 @@
1
1
  # @atlaskit/progress-tracker
2
2
 
3
+ ## 8.11.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#170799](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/170799)
8
+ [`5c6ea433574d2`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/5c6ea433574d2) -
9
+ We are testing changes behind a feature gate. Progress tracker steps have been updated to use
10
+ automatic router link configuration (from App provider). If this change is successful it will be
11
+ available in a later release.
12
+
13
+ ## 8.10.3
14
+
15
+ ### Patch Changes
16
+
17
+ - [#168892](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/168892)
18
+ [`5eb2a70adb262`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/5eb2a70adb262) -
19
+ Remove react-router-dom from devDependencies as it is incompatible with React 18.
20
+
3
21
  ## 8.10.2
4
22
 
5
23
  ### Patch Changes
@@ -0,0 +1,10 @@
1
+ ._11c81kw7{font:inherit}
2
+ ._1hmsglyw{text-decoration-line:none}
3
+ ._4bfu18uv{text-decoration-color:initial}
4
+ ._ajmmnqa1{text-decoration-style:solid}
5
+ ._syaz1fxt{color:var(--ds-text,#172b4d)}
6
+ ._1bnx8stv:hover{text-decoration-line:underline}
7
+ ._30l314q2:hover{color:var(--ds-link,#0c66e4)}
8
+ ._9oik18uv:hover{text-decoration-color:initial}
9
+ ._jf4cnqa1:hover{text-decoration-style:solid}
10
+ ._9h8h16c2:active{color:var(--ds-link-pressed,#05c)}
@@ -0,0 +1,34 @@
1
+ /* link-new.tsx generated by @compiled/babel-plugin v0.32.2 */
2
+ "use strict";
3
+
4
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.default = void 0;
9
+ require("./link-new.compiled.css");
10
+ var _runtime = require("@compiled/react/runtime");
11
+ var _react = _interopRequireDefault(require("react"));
12
+ var _anchor = _interopRequireDefault(require("@atlaskit/primitives/anchor"));
13
+ var styles = {
14
+ root: "_4bfu18uv _1hmsglyw _ajmmnqa1 _syaz1fxt _11c81kw7 _9oik18uv _1bnx8stv _jf4cnqa1 _30l314q2 _9h8h16c2"
15
+ };
16
+
17
+ /**
18
+ * __Progress tracker link__
19
+ */
20
+ var Link = function Link(_ref) {
21
+ var href = _ref.href,
22
+ onClick = _ref.onClick,
23
+ label = _ref.label,
24
+ testId = _ref.testId;
25
+ return /*#__PURE__*/_react.default.createElement(_anchor.default, {
26
+ xcss: styles.root
27
+ // TODO: We should not be rendering empty hrefs on anchors. This should be plain text or a button/pressable if `onClick` is provided.
28
+ ,
29
+ href: href || '',
30
+ onClick: onClick,
31
+ testId: testId
32
+ }, label);
33
+ };
34
+ var _default = exports.default = Link;
@@ -94,7 +94,9 @@ var ProgressTrackerStage = exports.default = /*#__PURE__*/function (_PureCompone
94
94
  }, {
95
95
  key: "shouldShowLink",
96
96
  value: function shouldShowLink() {
97
- return this.props.item.status === 'visited' && !this.props.item.noLink;
97
+ return this.props.item.status === 'visited' &&
98
+ // TODO: `noLink` is unnecessary as we should just be detecting if the `href` is set...
99
+ !this.props.item.noLink;
98
100
  }
99
101
  }, {
100
102
  key: "render",
@@ -8,9 +8,11 @@ exports.default = void 0;
8
8
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
9
  var _react = require("react");
10
10
  var _react2 = require("@emotion/react");
11
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
11
12
  var _constants = require("./constants");
12
13
  var _constants2 = require("./internal/constants");
13
14
  var _link = _interopRequireDefault(require("./internal/link"));
15
+ var _linkNew = _interopRequireDefault(require("./internal/link-new"));
14
16
  var _stage = _interopRequireDefault(require("./internal/stage"));
15
17
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
16
18
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } /* eslint-disable @atlaskit/design-system/no-nested-styles */ /**
@@ -47,11 +49,13 @@ var ProgressTracker = function ProgressTracker(_ref) {
47
49
  spacing = _ref$spacing === void 0 ? 'cosy' : _ref$spacing,
48
50
  _ref$render = _ref.render,
49
51
  render = _ref$render === void 0 ? {
50
- // Anchor content is coming from another location
51
- // eslint-disable-next-line jsx-a11y/anchor-has-content
52
52
  link: function link(_ref2) {
53
53
  var item = _ref2.item;
54
- return (0, _react2.jsx)(_link.default, item);
54
+ return (
55
+ // Anchor content is coming from another location
56
+ // eslint-disable-next-line jsx-a11y/anchor-has-content
57
+ (0, _platformFeatureFlags.fg)('platform_progress_tracker_link_migration') ? (0, _react2.jsx)(_linkNew.default, item) : (0, _react2.jsx)(_link.default, item)
58
+ );
55
59
  }
56
60
  } : _ref$render,
57
61
  _ref$animated = _ref.animated,
@@ -0,0 +1,10 @@
1
+ ._11c81kw7{font:inherit}
2
+ ._1hmsglyw{text-decoration-line:none}
3
+ ._4bfu18uv{text-decoration-color:initial}
4
+ ._ajmmnqa1{text-decoration-style:solid}
5
+ ._syaz1fxt{color:var(--ds-text,#172b4d)}
6
+ ._1bnx8stv:hover{text-decoration-line:underline}
7
+ ._30l314q2:hover{color:var(--ds-link,#0c66e4)}
8
+ ._9oik18uv:hover{text-decoration-color:initial}
9
+ ._jf4cnqa1:hover{text-decoration-style:solid}
10
+ ._9h8h16c2:active{color:var(--ds-link-pressed,#05c)}
@@ -0,0 +1,28 @@
1
+ /* link-new.tsx generated by @compiled/babel-plugin v0.32.2 */
2
+ import "./link-new.compiled.css";
3
+ import { ax, ix } from "@compiled/react/runtime";
4
+ import React from 'react';
5
+ import Anchor from '@atlaskit/primitives/anchor';
6
+ const styles = {
7
+ root: "_4bfu18uv _1hmsglyw _ajmmnqa1 _syaz1fxt _11c81kw7 _9oik18uv _1bnx8stv _jf4cnqa1 _30l314q2 _9h8h16c2"
8
+ };
9
+
10
+ /**
11
+ * __Progress tracker link__
12
+ */
13
+ const Link = ({
14
+ href,
15
+ onClick,
16
+ label,
17
+ testId
18
+ }) => {
19
+ return /*#__PURE__*/React.createElement(Anchor, {
20
+ xcss: styles.root
21
+ // TODO: We should not be rendering empty hrefs on anchors. This should be plain text or a button/pressable if `onClick` is provided.
22
+ ,
23
+ href: href || '',
24
+ onClick: onClick,
25
+ testId: testId
26
+ }, label);
27
+ };
28
+ export default Link;
@@ -72,7 +72,9 @@ export default class ProgressTrackerStage extends PureComponent {
72
72
  });
73
73
  }
74
74
  shouldShowLink() {
75
- return this.props.item.status === 'visited' && !this.props.item.noLink;
75
+ return this.props.item.status === 'visited' &&
76
+ // TODO: `noLink` is unnecessary as we should just be detecting if the `href` is set...
77
+ !this.props.item.noLink;
76
78
  }
77
79
  render() {
78
80
  const {
@@ -7,9 +7,11 @@ import { useEffect, useRef } from 'react';
7
7
 
8
8
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
9
9
  import { css, jsx } from '@emotion/react';
10
+ import { fg } from '@atlaskit/platform-feature-flags';
10
11
  import { spacing as spacingOptions } from './constants';
11
12
  import { ANIMATION_EASE_OUT, LINEAR_TRANSITION_SPEED, TRANSITION_SPEED, varSpacing } from './internal/constants';
12
13
  import Link from './internal/link';
14
+ import LinkNew from './internal/link-new';
13
15
  import Stage from './internal/stage';
14
16
  const containerStyles = css({
15
17
  display: 'grid',
@@ -37,11 +39,12 @@ const ProgressTracker = ({
37
39
  items = [],
38
40
  spacing = 'cosy',
39
41
  render = {
40
- // Anchor content is coming from another location
41
- // eslint-disable-next-line jsx-a11y/anchor-has-content
42
42
  link: ({
43
43
  item
44
- }) => jsx(Link, item)
44
+ }) =>
45
+ // Anchor content is coming from another location
46
+ // eslint-disable-next-line jsx-a11y/anchor-has-content
47
+ fg('platform_progress_tracker_link_migration') ? jsx(LinkNew, item) : jsx(Link, item)
45
48
  },
46
49
  animated = true,
47
50
  testId,
@@ -0,0 +1,10 @@
1
+ ._11c81kw7{font:inherit}
2
+ ._1hmsglyw{text-decoration-line:none}
3
+ ._4bfu18uv{text-decoration-color:initial}
4
+ ._ajmmnqa1{text-decoration-style:solid}
5
+ ._syaz1fxt{color:var(--ds-text,#172b4d)}
6
+ ._1bnx8stv:hover{text-decoration-line:underline}
7
+ ._30l314q2:hover{color:var(--ds-link,#0c66e4)}
8
+ ._9oik18uv:hover{text-decoration-color:initial}
9
+ ._jf4cnqa1:hover{text-decoration-style:solid}
10
+ ._9h8h16c2:active{color:var(--ds-link-pressed,#05c)}
@@ -0,0 +1,27 @@
1
+ /* link-new.tsx generated by @compiled/babel-plugin v0.32.2 */
2
+ import "./link-new.compiled.css";
3
+ import { ax, ix } from "@compiled/react/runtime";
4
+ import React from 'react';
5
+ import Anchor from '@atlaskit/primitives/anchor';
6
+ var styles = {
7
+ root: "_4bfu18uv _1hmsglyw _ajmmnqa1 _syaz1fxt _11c81kw7 _9oik18uv _1bnx8stv _jf4cnqa1 _30l314q2 _9h8h16c2"
8
+ };
9
+
10
+ /**
11
+ * __Progress tracker link__
12
+ */
13
+ var Link = function Link(_ref) {
14
+ var href = _ref.href,
15
+ onClick = _ref.onClick,
16
+ label = _ref.label,
17
+ testId = _ref.testId;
18
+ return /*#__PURE__*/React.createElement(Anchor, {
19
+ xcss: styles.root
20
+ // TODO: We should not be rendering empty hrefs on anchors. This should be plain text or a button/pressable if `onClick` is provided.
21
+ ,
22
+ href: href || '',
23
+ onClick: onClick,
24
+ testId: testId
25
+ }, label);
26
+ };
27
+ export default Link;
@@ -91,7 +91,9 @@ var ProgressTrackerStage = /*#__PURE__*/function (_PureComponent) {
91
91
  }, {
92
92
  key: "shouldShowLink",
93
93
  value: function shouldShowLink() {
94
- return this.props.item.status === 'visited' && !this.props.item.noLink;
94
+ return this.props.item.status === 'visited' &&
95
+ // TODO: `noLink` is unnecessary as we should just be detecting if the `href` is set...
96
+ !this.props.item.noLink;
95
97
  }
96
98
  }, {
97
99
  key: "render",
@@ -10,9 +10,11 @@ import { useEffect, useRef } from 'react';
10
10
 
11
11
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
12
12
  import { css, jsx } from '@emotion/react';
13
+ import { fg } from '@atlaskit/platform-feature-flags';
13
14
  import { spacing as spacingOptions } from './constants';
14
15
  import { ANIMATION_EASE_OUT, LINEAR_TRANSITION_SPEED, TRANSITION_SPEED, varSpacing } from './internal/constants';
15
16
  import Link from './internal/link';
17
+ import LinkNew from './internal/link-new';
16
18
  import Stage from './internal/stage';
17
19
  var containerStyles = css({
18
20
  display: 'grid',
@@ -44,11 +46,13 @@ var ProgressTracker = function ProgressTracker(_ref) {
44
46
  spacing = _ref$spacing === void 0 ? 'cosy' : _ref$spacing,
45
47
  _ref$render = _ref.render,
46
48
  render = _ref$render === void 0 ? {
47
- // Anchor content is coming from another location
48
- // eslint-disable-next-line jsx-a11y/anchor-has-content
49
49
  link: function link(_ref2) {
50
50
  var item = _ref2.item;
51
- return jsx(Link, item);
51
+ return (
52
+ // Anchor content is coming from another location
53
+ // eslint-disable-next-line jsx-a11y/anchor-has-content
54
+ fg('platform_progress_tracker_link_migration') ? jsx(LinkNew, item) : jsx(Link, item)
55
+ );
52
56
  }
53
57
  } : _ref$render,
54
58
  _ref$animated = _ref.animated,
@@ -0,0 +1,9 @@
1
+ import { type FC } from 'react';
2
+ import { type Stage } from '../types';
3
+ /**
4
+ * __Progress tracker link__
5
+ */
6
+ declare const Link: FC<Stage & {
7
+ testId?: string;
8
+ }>;
9
+ export default Link;
@@ -1,4 +1,4 @@
1
1
  import type { Status } from '../types';
2
- 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;
2
+ export declare const getMarkerColor: (status: Status) => "var(--ds-icon-brand)" | "var(--ds-icon-subtle)" | undefined;
3
+ export declare const getTextColor: (status: Status) => "var(--ds-text)" | "var(--ds-text-disabled)" | "var(--ds-text-brand)" | "var(--ds-text-subtlest)" | undefined;
4
4
  export declare const getFontWeight: (status: Status) => "var(--ds-font-weight-regular)" | "var(--ds-font-weight-bold)" | undefined;
@@ -0,0 +1,9 @@
1
+ import { type FC } from 'react';
2
+ import { type Stage } from '../types';
3
+ /**
4
+ * __Progress tracker link__
5
+ */
6
+ declare const Link: FC<Stage & {
7
+ testId?: string;
8
+ }>;
9
+ export default Link;
@@ -1,4 +1,4 @@
1
1
  import type { Status } from '../types';
2
- 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;
2
+ export declare const getMarkerColor: (status: Status) => "var(--ds-icon-brand)" | "var(--ds-icon-subtle)" | undefined;
3
+ export declare const getTextColor: (status: Status) => "var(--ds-text)" | "var(--ds-text-disabled)" | "var(--ds-text-brand)" | "var(--ds-text-subtlest)" | undefined;
4
4
  export declare const getFontWeight: (status: Status) => "var(--ds-font-weight-regular)" | "var(--ds-font-weight-bold)" | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/progress-tracker",
3
- "version": "8.10.2",
3
+ "version": "8.11.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/"
@@ -21,14 +21,15 @@
21
21
  "runReact18": true,
22
22
  "website": {
23
23
  "name": "Progress tracker",
24
- "category": "Components"
24
+ "category": "Status indicators"
25
25
  }
26
26
  },
27
27
  "dependencies": {
28
+ "@atlaskit/css": "^0.6.2",
28
29
  "@atlaskit/platform-feature-flags": "^0.3.0",
29
- "@atlaskit/primitives": "^13.2.0",
30
+ "@atlaskit/primitives": "^13.3.0",
30
31
  "@atlaskit/theme": "^14.0.0",
31
- "@atlaskit/tokens": "^2.2.0",
32
+ "@atlaskit/tokens": "^2.4.0",
32
33
  "@babel/runtime": "^7.0.0",
33
34
  "@emotion/react": "^11.7.1",
34
35
  "react-transition-group": "^4.4.1"
@@ -39,7 +40,7 @@
39
40
  "devDependencies": {
40
41
  "@af/accessibility-testing": "*",
41
42
  "@af/visual-regression": "*",
42
- "@atlaskit/ds-lib": "^3.2.0",
43
+ "@atlaskit/ds-lib": "^3.3.0",
43
44
  "@atlaskit/ssr": "*",
44
45
  "@atlaskit/visual-regression": "*",
45
46
  "@testing-library/react": "^12.1.5",
@@ -47,7 +48,6 @@
47
48
  "@types/react-transition-group": "^2.0.6",
48
49
  "jest-in-case": "^1.0.2",
49
50
  "react-dom": "^16.8.0",
50
- "react-router-dom": "^4.2.2",
51
51
  "typescript": "~5.4.2"
52
52
  },
53
53
  "techstack": {
@@ -87,6 +87,10 @@
87
87
  "platform-feature-flags": {
88
88
  "platform_design_system_team_transition_group_r18": {
89
89
  "type": "boolean"
90
+ },
91
+ "platform_progress_tracker_link_migration": {
92
+ "type": "boolean",
93
+ "showOnWebsiteForTransitiveDependencies": true
90
94
  }
91
95
  }
92
96
  }