@atlaskit/progress-tracker 8.11.1 → 9.0.1

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 (54) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/dist/cjs/internal/bar.compiled.css +9 -0
  3. package/dist/cjs/internal/bar.js +19 -32
  4. package/dist/cjs/internal/link-new.js +4 -4
  5. package/dist/cjs/internal/link.compiled.css +2 -0
  6. package/dist/cjs/internal/link.js +14 -15
  7. package/dist/cjs/internal/marker.compiled.css +13 -0
  8. package/dist/cjs/internal/marker.js +16 -54
  9. package/dist/cjs/internal/stage.compiled.css +17 -0
  10. package/dist/cjs/internal/stage.js +67 -75
  11. package/dist/cjs/progress-tracker.compiled.css +10 -0
  12. package/dist/cjs/progress-tracker.js +24 -31
  13. package/dist/es2019/internal/bar.compiled.css +9 -0
  14. package/dist/es2019/internal/bar.js +13 -30
  15. package/dist/es2019/internal/link-new.js +3 -3
  16. package/dist/es2019/internal/link.compiled.css +2 -0
  17. package/dist/es2019/internal/link.js +8 -14
  18. package/dist/es2019/internal/marker.compiled.css +13 -0
  19. package/dist/es2019/internal/marker.js +7 -49
  20. package/dist/es2019/internal/stage.compiled.css +17 -0
  21. package/dist/es2019/internal/stage.js +55 -66
  22. package/dist/es2019/progress-tracker.compiled.css +10 -0
  23. package/dist/es2019/progress-tracker.js +18 -31
  24. package/dist/esm/internal/bar.compiled.css +9 -0
  25. package/dist/esm/internal/bar.js +16 -31
  26. package/dist/esm/internal/link-new.js +3 -3
  27. package/dist/esm/internal/link.compiled.css +2 -0
  28. package/dist/esm/internal/link.js +11 -14
  29. package/dist/esm/internal/marker.compiled.css +13 -0
  30. package/dist/esm/internal/marker.js +12 -52
  31. package/dist/esm/internal/stage.compiled.css +17 -0
  32. package/dist/esm/internal/stage.js +60 -75
  33. package/dist/esm/progress-tracker.compiled.css +10 -0
  34. package/dist/esm/progress-tracker.js +19 -33
  35. package/dist/types/internal/bar.d.ts +2 -6
  36. package/dist/types/internal/stage.d.ts +1 -2
  37. package/dist/types/progress-tracker.d.ts +2 -2
  38. package/dist/types/types.d.ts +1 -1
  39. package/dist/types-ts4.5/internal/bar.d.ts +2 -6
  40. package/dist/types-ts4.5/internal/stage.d.ts +1 -2
  41. package/dist/types-ts4.5/progress-tracker.d.ts +2 -2
  42. package/dist/types-ts4.5/types.d.ts +1 -1
  43. package/package.json +3 -7
  44. package/constants/package.json +0 -17
  45. package/dist/cjs/constants.js +0 -14
  46. package/dist/cjs/internal/constants.js +0 -21
  47. package/dist/es2019/constants.js +0 -8
  48. package/dist/es2019/internal/constants.js +0 -15
  49. package/dist/esm/constants.js +0 -8
  50. package/dist/esm/internal/constants.js +0 -15
  51. package/dist/types/constants.d.ts +0 -9
  52. package/dist/types/internal/constants.d.ts +0 -12
  53. package/dist/types-ts4.5/constants.d.ts +0 -9
  54. package/dist/types-ts4.5/internal/constants.d.ts +0 -12
@@ -1,37 +1,31 @@
1
+ /* progress-tracker.tsx generated by @compiled/babel-plugin v0.32.2 */
1
2
  "use strict";
2
3
 
3
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
5
+ var _typeof = require("@babel/runtime/helpers/typeof");
4
6
  Object.defineProperty(exports, "__esModule", {
5
7
  value: true
6
8
  });
7
9
  exports.default = void 0;
10
+ require("./progress-tracker.compiled.css");
11
+ var _react = _interopRequireWildcard(require("react"));
12
+ var React = _react;
13
+ var _runtime = require("@compiled/react/runtime");
8
14
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
- var _react = require("react");
10
- var _react2 = require("@emotion/react");
11
15
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
12
- var _constants = require("./constants");
13
- var _constants2 = require("./internal/constants");
14
16
  var _link = _interopRequireDefault(require("./internal/link"));
15
17
  var _linkNew = _interopRequireDefault(require("./internal/link-new"));
16
18
  var _stage = _interopRequireDefault(require("./internal/stage"));
19
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
20
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
17
21
  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; }
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 */ /**
19
- * @jsxRuntime classic
20
- * @jsx jsx
21
- */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
22
- var containerStyles = (0, _react2.css)({
23
- display: 'grid',
24
- width: '100%',
25
- margin: '0 auto',
26
- padding: "var(--ds-space-0, 0px)",
27
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage, @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
28
- gap: "var(".concat(_constants2.varSpacing, ")"),
29
- listStyleType: 'none',
30
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
31
- '&&': {
32
- marginBlockStart: "var(--ds-space-500, 40px)"
33
- }
34
- });
22
+ 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; }
23
+ var containerStyles = null;
24
+ var spacingOptions = {
25
+ comfortable: "var(--ds-space-500, 40px)",
26
+ cosy: "var(--ds-space-200, 16px)",
27
+ compact: "var(--ds-space-050, 4px)"
28
+ };
35
29
  /**
36
30
  * __Progress tracker__
37
31
  *
@@ -42,7 +36,6 @@ var containerStyles = (0, _react2.css)({
42
36
  * - [Usage](https://atlassian.design/components/progress-tracker/usage)
43
37
  */
44
38
  var ProgressTracker = function ProgressTracker(_ref) {
45
- var _listInlineStyles;
46
39
  var _ref$items = _ref.items,
47
40
  items = _ref$items === void 0 ? [] : _ref$items,
48
41
  _ref$spacing = _ref.spacing,
@@ -54,7 +47,7 @@ var ProgressTracker = function ProgressTracker(_ref) {
54
47
  return (
55
48
  // Anchor content is coming from another location
56
49
  // 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)
50
+ (0, _platformFeatureFlags.fg)('platform_progress_tracker_link_migration') ? /*#__PURE__*/React.createElement(_linkNew.default, item) : /*#__PURE__*/React.createElement(_link.default, item)
58
51
  );
59
52
  }
60
53
  } : _ref$render,
@@ -92,9 +85,9 @@ var ProgressTracker = function ProgressTracker(_ref) {
92
85
  var progressItems = items.map(function (stage, index) {
93
86
  var transitionSpeed = 0;
94
87
  var transitionDelay = 0;
95
- var transitionEasing = progressChanges > 1 ? 'linear' : _constants2.ANIMATION_EASE_OUT;
88
+ var transitionEasing = progressChanges > 1 ? 'linear' : 'cubic-bezier(0.15,1,0.3,1)';
96
89
  if (animated) {
97
- transitionSpeed = progressChanges > 1 ? _constants2.LINEAR_TRANSITION_SPEED : _constants2.TRANSITION_SPEED;
90
+ transitionSpeed = progressChanges > 1 ? 50 : 300;
98
91
  if (stage.percentageComplete < previousStages[index].percentageComplete) {
99
92
  /**
100
93
  * Load each transition sequentially in reverse.
@@ -109,7 +102,7 @@ var ProgressTracker = function ProgressTracker(_ref) {
109
102
  stepsForward -= 1;
110
103
  }
111
104
  }
112
- return (0, _react2.jsx)(_stage.default, {
105
+ return /*#__PURE__*/React.createElement(_stage.default, {
113
106
  transitionSpeed: transitionSpeed,
114
107
  transitionDelay: transitionDelay,
115
108
  transitionEasing: transitionEasing,
@@ -118,16 +111,16 @@ var ProgressTracker = function ProgressTracker(_ref) {
118
111
  render: render
119
112
  });
120
113
  });
121
- var listInlineStyles = (_listInlineStyles = {
114
+ var listInlineStyles = (0, _defineProperty2.default)((0, _defineProperty2.default)({
122
115
  gridTemplateColumns: "repeat(".concat(items.length, ", 1fr)")
123
- }, (0, _defineProperty2.default)(_listInlineStyles, _constants2.varSpacing, _constants.spacing[spacing]), (0, _defineProperty2.default)(_listInlineStyles, "maxWidth", 8 * 10 * items.length * 2), _listInlineStyles);
124
- return (0, _react2.jsx)("ul", {
116
+ }, '--ds--pt--sp', spacingOptions[spacing]), "maxWidth", 8 * 10 * items.length * 2);
117
+ return /*#__PURE__*/React.createElement("ul", {
125
118
  "data-testid": testId
126
119
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
127
120
  ,
128
121
  style: listInlineStyles,
129
- css: containerStyles,
130
- "aria-label": label
122
+ "aria-label": label,
123
+ className: (0, _runtime.ax)(["_1e0c11p5 _1bsb1osq _19pkidpf _2hwx1wug _otyridpf _18u01wug _1yt4ze3t _zulp6odm _2mzuglyw _rxvc1jfw"])
131
124
  }, progressItems);
132
125
  };
133
126
  var _default = exports.default = ProgressTracker;
@@ -0,0 +1,9 @@
1
+
2
+ ._v564d86a{transition:width var(--ds--pt--ts) var(--ds--pt--te)}._1e021ssb{inset-inline-start:50%}
3
+ ._1einu2gc{border-end-end-radius:var(--ds-space-100,8px)}
4
+ ._1lww1oqq{transition-delay:var(--ds--pt--td)}
5
+ ._4t3iu2gc{height:var(--ds-space-100,8px)}
6
+ ._5fbcu2gc{border-start-end-radius:var(--ds-space-100,8px)}
7
+ ._bfhkq17z{background-color:var(--ds-background-brand-bold,#0065ff)}
8
+ ._kqswstnw{position:absolute}
9
+ ._t9ecymk3{transform:translate(0,calc(var(--ds-space-250, 20px)*-1))}
@@ -1,29 +1,14 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
6
- import { css, jsx } from '@emotion/react';
1
+ /* bar.tsx generated by @compiled/babel-plugin v0.32.2 */
2
+ import "./bar.compiled.css";
3
+ import * as React from 'react';
4
+ import { ax, ix } from "@compiled/react/runtime";
7
5
  import { B300 } from '@atlaskit/theme/colors';
8
- import { spacing } from '../constants';
9
- import { HALF_GRID_SIZE, LABEL_TOP_SPACING, PROGRESS_BAR_HEIGHT, varSpacing, varTransitionDelay, varTransitionEasing, varTransitionSpeed } from './constants';
10
- const progressBarStyles = css({
11
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
12
- height: PROGRESS_BAR_HEIGHT,
13
- position: 'absolute',
14
- backgroundColor: `var(--ds-background-brand-bold, ${B300})`,
15
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
16
- borderEndEndRadius: PROGRESS_BAR_HEIGHT,
17
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
18
- borderStartEndRadius: PROGRESS_BAR_HEIGHT,
19
- insetInlineStart: '50%',
20
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
21
- transform: `translate(0, calc(-1 * ${LABEL_TOP_SPACING}))`,
22
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
23
- transition: `width var(${varTransitionSpeed}) var(${varTransitionEasing})`,
24
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
25
- transitionDelay: `var(${varTransitionDelay})`
26
- });
6
+ const spacing = {
7
+ comfortable: "var(--ds-space-500, 40px)",
8
+ cosy: "var(--ds-space-200, 16px)",
9
+ compact: "var(--ds-space-050, 4px)"
10
+ };
11
+ const progressBarStyles = null;
27
12
 
28
13
  /**
29
14
  * __Progress bar__
@@ -34,13 +19,11 @@ const progressBarStyles = css({
34
19
  const ProgressBar = ({
35
20
  percentageComplete,
36
21
  testId
37
- }) => jsx("div", {
22
+ }) => /*#__PURE__*/React.createElement("div", {
38
23
  "data-testid": testId,
39
24
  style: {
40
- width: `calc(${percentageComplete}% + ${percentageComplete / 100
41
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
42
- } * calc(var(${varSpacing}, ${spacing.cosy}) + ${HALF_GRID_SIZE}))`
25
+ width: `calc(${percentageComplete}% + ${percentageComplete / 100} * calc(var(--ds--pt--sp, ${spacing.cosy}) + ${"var(--ds-space-050, 4px)"}))`
43
26
  },
44
- css: progressBarStyles
27
+ className: ax(["_4t3iu2gc _kqswstnw _bfhkq17z _1einu2gc _5fbcu2gc _1e021ssb _t9ecymk3 _v564d86a _1lww1oqq"])
45
28
  });
46
29
  export default ProgressBar;
@@ -2,9 +2,9 @@
2
2
  import "./link-new.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React from 'react';
5
- import Anchor from '@atlaskit/primitives/anchor';
5
+ import { Anchor } from '@atlaskit/primitives/compiled';
6
6
  const styles = {
7
- root: "_4bfu18uv _1hmsglyw _ajmmnqa1 _syaz1fxt _11c81kw7 _9oik18uv _1bnx8stv _jf4cnqa1 _30l314q2 _9h8h16c2"
7
+ anchor: "_4bfu18uv _1hmsglyw _ajmmnqa1 _syaz1fxt _11c81kw7 _9oik18uv _1bnx8stv _jf4cnqa1 _30l314q2 _9h8h16c2"
8
8
  };
9
9
 
10
10
  /**
@@ -17,7 +17,7 @@ const Link = ({
17
17
  testId
18
18
  }) => {
19
19
  return /*#__PURE__*/React.createElement(Anchor, {
20
- xcss: styles.root
20
+ xcss: styles.anchor
21
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
22
  ,
23
23
  href: href || '',
@@ -0,0 +1,2 @@
1
+ ._80omtlke{cursor:pointer}
2
+ ._syaz1fxt{color:var(--ds-text,#172b4d)}
@@ -1,15 +1,9 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
-
6
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
7
- import { css, jsx } from '@emotion/react';
1
+ /* link.tsx generated by @compiled/babel-plugin v0.32.2 */
2
+ import "./link.compiled.css";
3
+ import * as React from 'react';
4
+ import { ax, ix } from "@compiled/react/runtime";
8
5
  import { N800 } from '@atlaskit/theme/colors';
9
- const linkStyles = css({
10
- color: `var(--ds-text, ${N800})`,
11
- cursor: 'pointer'
12
- });
6
+ const linkStyles = null;
13
7
 
14
8
  /**
15
9
  * __Progress tracker link__
@@ -19,10 +13,10 @@ const Link = ({
19
13
  onClick,
20
14
  label,
21
15
  testId
22
- }) => jsx("a", {
23
- css: linkStyles,
16
+ }) => /*#__PURE__*/React.createElement("a", {
24
17
  href: href,
25
18
  onClick: onClick,
26
- "data-testid": testId
19
+ "data-testid": testId,
20
+ className: ax(["_syaz1fxt _80omtlke"])
27
21
  }, label);
28
22
  export default Link;
@@ -0,0 +1,13 @@
1
+
2
+ ._2rkou2gc{border-radius:var(--ds-space-100,8px)}
3
+ ._v5645rui{transition:opacity var(--ds--pt--ts) var(--ds--pt--te),background-color var(--ds--pt--ts) var(--ds--pt--te)}._1190pbrw.fade-enter{background-color:var(--ds--pt--mc)}
4
+ ._1bsbu2gc{width:var(--ds-space-100,8px)}
5
+ ._1e021ssb{inset-inline-start:50%}
6
+ ._1ez2kb7n.fade-appear.fade-appear-active{opacity:1}
7
+ ._1ia8r3ku.fade-enter.fade-enter-active{background-color:var(--ds--pt--bg)}
8
+ ._1lww1oqq{transition-delay:var(--ds--pt--td)}
9
+ ._1uuw17dr.fade-appear{opacity:.01}
10
+ ._4t3iu2gc{height:var(--ds-space-100,8px)}
11
+ ._bfhkr3ku{background-color:var(--ds--pt--bg)}
12
+ ._kqswstnw{position:absolute}
13
+ ._t9ec157a{transform:translate(-50%,calc(var(--ds-space-250, 20px)*-1))}
@@ -1,48 +1,9 @@
1
+ /* marker.tsx generated by @compiled/babel-plugin v0.32.2 */
1
2
  /* eslint-disable @atlaskit/design-system/no-nested-styles */
2
- /**
3
- * @jsxRuntime classic
4
- * @jsx jsx
5
- */
6
-
7
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
8
- import { css, jsx } from '@emotion/react';
9
- import { LABEL_TOP_SPACING, PROGRESS_BAR_HEIGHT, varBackgroundColor, varMarkerColor, varTransitionDelay, varTransitionEasing, varTransitionSpeed } from './constants';
10
- const progressMarkerStyles = css({
11
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
12
- width: PROGRESS_BAR_HEIGHT,
13
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
14
- height: PROGRESS_BAR_HEIGHT,
15
- position: 'absolute',
16
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
17
- backgroundColor: `var(${varBackgroundColor})`,
18
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
19
- borderRadius: PROGRESS_BAR_HEIGHT,
20
- insetInlineStart: '50%',
21
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
22
- transform: `translate(-50%, calc(-1 * ${LABEL_TOP_SPACING}))`,
23
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
24
- transition: `opacity var(${varTransitionSpeed}) var(${varTransitionEasing}), background-color var(${varTransitionSpeed}) var(${varTransitionEasing})`,
25
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
26
- transitionDelay: `var(${varTransitionDelay})`,
27
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
28
- '&.fade-appear': {
29
- opacity: 0.01
30
- },
31
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
32
- '&.fade-appear.fade-appear-active': {
33
- opacity: 1
34
- },
35
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
36
- '&.fade-enter': {
37
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
38
- backgroundColor: `var(${varMarkerColor})`
39
- },
40
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
41
- '&.fade-enter.fade-enter-active': {
42
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
43
- backgroundColor: `var(${varBackgroundColor})`
44
- }
45
- });
3
+ import "./marker.compiled.css";
4
+ import * as React from 'react';
5
+ import { ax, ix } from "@compiled/react/runtime";
6
+ const progressMarkerStyles = null;
46
7
 
47
8
  /**
48
9
  * __Progress marker__
@@ -51,11 +12,8 @@ const progressMarkerStyles = css({
51
12
  */
52
13
  const ProgressMarker = ({
53
14
  testId
54
- }) =>
55
- // too many props that would go in UNSAFE_style + css transition prop having issues
56
-
57
- jsx("div", {
15
+ }) => /*#__PURE__*/React.createElement("div", {
58
16
  "data-testid": testId,
59
- css: progressMarkerStyles
17
+ className: ax(["_1bsbu2gc _4t3iu2gc _kqswstnw _bfhkr3ku _2rkou2gc _1e021ssb _t9ec157a _v5645rui _1lww1oqq _1uuw17dr _1ez2kb7n _1190pbrw _1ia8r3ku"])
60
18
  });
61
19
  export default ProgressMarker;
@@ -0,0 +1,17 @@
1
+ ._11c81oud{font:var(--ds-font-body,normal 400 14px/20px ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,system-ui,"Helvetica Neue",sans-serif)}
2
+ ._18s8ze3t{margin:var(--ds-space-0,0)}
3
+ ._1t9yph28.fade-appear.fade-appear-active{transition:opacity var(--ds--pt--ts) cubic-bezier(.2,0,0,1)}
4
+ ._v564ph28{transition:opacity var(--ds--pt--ts) cubic-bezier(.2,0,0,1)}
5
+ ._1bsb1osq{width:100%}
6
+ ._1ez2kb7n.fade-appear.fade-appear-active{opacity:1}
7
+ ._1i4q1hna{overflow-wrap:break-word}
8
+ ._1pfhv47k{margin-block-start:var(--ds-space-250,20px)}
9
+ ._1uuw17dr.fade-appear{opacity:.01}
10
+ ._k48pi7a9{font-weight:var(--ds-font-weight-regular,400)}
11
+ ._k48pmoej{font-weight:var(--ds-font-weight-bold,700)}
12
+ ._kqswh2mm{position:relative}
13
+ ._syaz131l{color:var(--ds-text-subtlest,#626f86)}
14
+ ._syaz1e6v{color:var(--ds-text-brand,#0c66e4)}
15
+ ._syaz1fxt{color:var(--ds-text,#172b4d)}
16
+ ._syaz1lh4{color:var(--ds-text-disabled,#091e424f)}
17
+ ._y3gn1h6o{text-align:center}
@@ -1,45 +1,43 @@
1
- import _extends from "@babel/runtime/helpers/extends";
1
+ /* stage.tsx generated by @compiled/babel-plugin v0.32.2 */
2
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
- /* eslint-disable @atlaskit/design-system/no-nested-styles */
4
- /**
5
- * @jsxRuntime classic
6
- * @jsx jsx
7
- */
3
+ import "./stage.compiled.css";
4
+ import * as React from 'react';
5
+ import { ax, ix } from "@compiled/react/runtime";
8
6
  import { createRef, PureComponent } from 'react';
9
-
10
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
11
- import { css, jsx } from '@emotion/react';
12
7
  import { CSSTransition } from 'react-transition-group';
13
- import { fg } from '@atlaskit/platform-feature-flags';
14
- import { Box, xcss } from '@atlaskit/primitives';
8
+ import { Box } from '@atlaskit/primitives/compiled';
9
+ import { B300, N70 } from '@atlaskit/theme/colors';
15
10
  import ProgressBar from './bar';
16
- import { LABEL_TOP_SPACING, varBackgroundColor, varMarkerColor, varTransitionDelay, varTransitionEasing, varTransitionSpeed } from './constants';
17
11
  import ProgressMarker from './marker';
18
- import { getFontWeight, getMarkerColor, getTextColor } from './utils';
19
- const listItemContentStyles = xcss({
20
- width: '100%',
21
- position: 'relative'
22
- });
23
- const listItemStyles = css({
24
- margin: "var(--ds-space-0, 0px)",
25
- overflowWrap: 'break-word'
26
- });
27
- const titleStyles = css({
28
- font: "var(--ds-font-body, normal 400 14px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
29
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
30
- marginBlockStart: LABEL_TOP_SPACING,
31
- textAlign: 'center',
32
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
33
- '&.fade-appear': {
34
- opacity: 0.01
35
- },
36
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
37
- '&.fade-appear.fade-appear-active': {
38
- opacity: 1,
39
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
40
- transition: `opacity var(${varTransitionSpeed}) cubic-bezier(0.2, 0, 0, 1)`
12
+ const styles = {
13
+ listItemContent: "_1bsb1osq _kqswh2mm"
14
+ };
15
+ const textColor = {
16
+ unvisited: "_syaz131l",
17
+ current: "_syaz1e6v",
18
+ visited: "_syaz1fxt",
19
+ disabled: "_syaz1lh4"
20
+ };
21
+ const fontWeight = {
22
+ unvisited: "_k48pi7a9",
23
+ current: "_k48pmoej",
24
+ visited: "_k48pmoej",
25
+ disabled: "_k48pmoej"
26
+ };
27
+ const getMarkerColor = status => {
28
+ switch (status) {
29
+ case 'unvisited':
30
+ return `var(--ds-icon-subtle, ${N70})`;
31
+ case 'current':
32
+ case 'visited':
33
+ case 'disabled':
34
+ return `var(--ds-icon-brand, ${B300})`;
35
+ default:
36
+ return;
41
37
  }
42
- });
38
+ };
39
+ const listItemStyles = null;
40
+ const titleStyles = null;
43
41
  export default class ProgressTrackerStage extends PureComponent {
44
42
  constructor(props) {
45
43
  super(props);
@@ -87,60 +85,51 @@ export default class ProgressTrackerStage extends PureComponent {
87
85
  } = this.props;
88
86
  const ariaCurrent = item.status === 'current' ? 'step' : 'false';
89
87
  const listInlineStyles = {
90
- [varTransitionSpeed]: `${transitionSpeed}ms`,
91
- [varTransitionDelay]: `${transitionDelay}ms`,
92
- [varTransitionEasing]: transitionEasing,
93
- [varMarkerColor]: this.state.oldMarkerColor,
94
- [varBackgroundColor]: getMarkerColor(item.status),
88
+ ['--ds--pt--ts']: `${transitionSpeed}ms`,
89
+ ['--ds--pt--td']: `${transitionDelay}ms`,
90
+ ['--ds--pt--te']: transitionEasing,
91
+ ['--ds--pt--mc']: this.state.oldMarkerColor,
92
+ ['--ds--pt--bg']: getMarkerColor(item.status),
95
93
  listStyleType: 'none'
96
94
  };
97
- return jsx("li", {
95
+ return /*#__PURE__*/React.createElement("li", {
98
96
  "data-testid": testId
99
97
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
100
98
  ,
101
99
  style: listInlineStyles,
102
- css: listItemStyles,
103
- "aria-current": ariaCurrent
104
- }, jsx(Box, {
105
- xcss: listItemContentStyles
106
- }, jsx(CSSTransition, _extends({
100
+ "aria-current": ariaCurrent,
101
+ className: ax(["_18s8ze3t _1i4q1hna"])
102
+ }, /*#__PURE__*/React.createElement(Box, {
103
+ xcss: styles.listItemContent
104
+ }, /*#__PURE__*/React.createElement(CSSTransition, {
107
105
  appear: true,
108
106
  in: this.state.transitioning,
109
107
  onEntered: this.onEntered,
110
108
  timeout: transitionDelay + transitionSpeed,
111
- classNames: "fade"
112
- }, fg('platform_design_system_team_transition_group_r18') && {
109
+ classNames: "fade",
113
110
  nodeRef: this.nodeRefMarker
114
- }), jsx(ProgressMarker, {
111
+ }, /*#__PURE__*/React.createElement(ProgressMarker, {
115
112
  testId: testId && `${testId}-marker`
116
- })), jsx(CSSTransition, _extends({
113
+ })), /*#__PURE__*/React.createElement(CSSTransition, {
117
114
  appear: true,
118
115
  in: this.state.transitioning,
119
116
  onEntered: this.onEntered,
120
117
  timeout: transitionDelay + transitionSpeed,
121
- classNames: "fade"
122
- }, fg('platform_design_system_team_transition_group_r18') && {
118
+ classNames: "fade",
123
119
  nodeRef: this.nodeRefBar
124
- }), jsx(ProgressBar, {
120
+ }, /*#__PURE__*/React.createElement(ProgressBar, {
125
121
  testId: testId && `${testId}-bar`,
126
122
  percentageComplete: item.percentageComplete
127
- })), jsx(CSSTransition, _extends({
123
+ })), /*#__PURE__*/React.createElement(CSSTransition, {
128
124
  appear: true,
129
125
  in: this.state.transitioning,
130
126
  onEntered: this.onEntered,
131
127
  timeout: transitionDelay + transitionSpeed,
132
- classNames: "fade"
133
- }, fg('platform_design_system_team_transition_group_r18') && {
128
+ classNames: "fade",
134
129
  nodeRef: this.nodeRefTitle
135
- }), jsx("div", {
136
- css: titleStyles,
137
- style: {
138
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
139
- color: getTextColor(item.status),
140
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
141
- fontWeight: getFontWeight(item.status)
142
- },
143
- "data-testid": testId && `${testId}-title`
130
+ }, /*#__PURE__*/React.createElement("div", {
131
+ "data-testid": testId && `${testId}-title`,
132
+ className: ax(["_11c81oud _1pfhv47k _y3gn1h6o _v564ph28 _1uuw17dr _1ez2kb7n _1t9yph28", textColor[item.status], fontWeight[item.status]])
144
133
  }, this.shouldShowLink() ? render.link({
145
134
  item
146
135
  }) : item.label))));
@@ -0,0 +1,10 @@
1
+
2
+ ._1yt4ze3t{padding:var(--ds-space-0,0)}
3
+ ._zulp6odm{gap:var(--ds--pt--sp)}._18u01wug{margin-left:auto}
4
+ ._19pkidpf{margin-top:0}
5
+ ._1bsb1osq{width:100%}
6
+ ._1e0c11p5{display:grid}
7
+ ._2hwx1wug{margin-right:auto}
8
+ ._2mzuglyw{list-style-type:none}
9
+ ._otyridpf{margin-bottom:0}
10
+ ._rxvc1jfw._rxvc1jfw{margin-block-start:var(--ds-space-500,40px)}
@@ -1,31 +1,18 @@
1
- /* eslint-disable @atlaskit/design-system/no-nested-styles */
2
- /**
3
- * @jsxRuntime classic
4
- * @jsx jsx
5
- */
1
+ /* progress-tracker.tsx generated by @compiled/babel-plugin v0.32.2 */
2
+ import "./progress-tracker.compiled.css";
3
+ import * as React from 'react';
4
+ import { ax, ix } from "@compiled/react/runtime";
6
5
  import { useEffect, useRef } from 'react';
7
-
8
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
9
- import { css, jsx } from '@emotion/react';
10
6
  import { fg } from '@atlaskit/platform-feature-flags';
11
- import { spacing as spacingOptions } from './constants';
12
- import { ANIMATION_EASE_OUT, LINEAR_TRANSITION_SPEED, TRANSITION_SPEED, varSpacing } from './internal/constants';
13
7
  import Link from './internal/link';
14
8
  import LinkNew from './internal/link-new';
15
9
  import Stage from './internal/stage';
16
- const containerStyles = css({
17
- display: 'grid',
18
- width: '100%',
19
- margin: '0 auto',
20
- padding: "var(--ds-space-0, 0px)",
21
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage, @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
22
- gap: `var(${varSpacing})`,
23
- listStyleType: 'none',
24
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
25
- '&&': {
26
- marginBlockStart: "var(--ds-space-500, 40px)"
27
- }
28
- });
10
+ const containerStyles = null;
11
+ const spacingOptions = {
12
+ comfortable: "var(--ds-space-500, 40px)",
13
+ cosy: "var(--ds-space-200, 16px)",
14
+ compact: "var(--ds-space-050, 4px)"
15
+ };
29
16
  /**
30
17
  * __Progress tracker__
31
18
  *
@@ -44,7 +31,7 @@ const ProgressTracker = ({
44
31
  }) =>
45
32
  // Anchor content is coming from another location
46
33
  // eslint-disable-next-line jsx-a11y/anchor-has-content
47
- fg('platform_progress_tracker_link_migration') ? jsx(LinkNew, item) : jsx(Link, item)
34
+ fg('platform_progress_tracker_link_migration') ? /*#__PURE__*/React.createElement(LinkNew, item) : /*#__PURE__*/React.createElement(Link, item)
48
35
  },
49
36
  animated = true,
50
37
  testId,
@@ -70,9 +57,9 @@ const ProgressTracker = ({
70
57
  const progressItems = items.map((stage, index) => {
71
58
  let transitionSpeed = 0;
72
59
  let transitionDelay = 0;
73
- const transitionEasing = progressChanges > 1 ? 'linear' : ANIMATION_EASE_OUT;
60
+ const transitionEasing = progressChanges > 1 ? 'linear' : 'cubic-bezier(0.15,1,0.3,1)';
74
61
  if (animated) {
75
- transitionSpeed = progressChanges > 1 ? LINEAR_TRANSITION_SPEED : TRANSITION_SPEED;
62
+ transitionSpeed = progressChanges > 1 ? 50 : 300;
76
63
  if (stage.percentageComplete < previousStages[index].percentageComplete) {
77
64
  /**
78
65
  * Load each transition sequentially in reverse.
@@ -87,7 +74,7 @@ const ProgressTracker = ({
87
74
  stepsForward -= 1;
88
75
  }
89
76
  }
90
- return jsx(Stage, {
77
+ return /*#__PURE__*/React.createElement(Stage, {
91
78
  transitionSpeed: transitionSpeed,
92
79
  transitionDelay: transitionDelay,
93
80
  transitionEasing: transitionEasing,
@@ -98,16 +85,16 @@ const ProgressTracker = ({
98
85
  });
99
86
  const listInlineStyles = {
100
87
  gridTemplateColumns: `repeat(${items.length}, 1fr)`,
101
- [varSpacing]: spacingOptions[spacing],
88
+ ['--ds--pt--sp']: spacingOptions[spacing],
102
89
  maxWidth: 8 * 10 * items.length * 2
103
90
  };
104
- return jsx("ul", {
91
+ return /*#__PURE__*/React.createElement("ul", {
105
92
  "data-testid": testId
106
93
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
107
94
  ,
108
95
  style: listInlineStyles,
109
- css: containerStyles,
110
- "aria-label": label
96
+ "aria-label": label,
97
+ className: ax(["_1e0c11p5 _1bsb1osq _19pkidpf _2hwx1wug _otyridpf _18u01wug _1yt4ze3t _zulp6odm _2mzuglyw _rxvc1jfw"])
111
98
  }, progressItems);
112
99
  };
113
100
  export default ProgressTracker;
@@ -0,0 +1,9 @@
1
+
2
+ ._v564d86a{transition:width var(--ds--pt--ts) var(--ds--pt--te)}._1e021ssb{inset-inline-start:50%}
3
+ ._1einu2gc{border-end-end-radius:var(--ds-space-100,8px)}
4
+ ._1lww1oqq{transition-delay:var(--ds--pt--td)}
5
+ ._4t3iu2gc{height:var(--ds-space-100,8px)}
6
+ ._5fbcu2gc{border-start-end-radius:var(--ds-space-100,8px)}
7
+ ._bfhk1j1x{background-color:var(--_vcj3ew)}
8
+ ._kqswstnw{position:absolute}
9
+ ._t9ec5ihf{transform:var(--_22xnfg)}