@atlaskit/progress-tracker 8.11.1 → 9.0.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 +18 -0
- package/dist/cjs/internal/bar.compiled.css +9 -0
- package/dist/cjs/internal/bar.js +19 -32
- package/dist/cjs/internal/link-new.js +4 -4
- package/dist/cjs/internal/link.compiled.css +2 -0
- package/dist/cjs/internal/link.js +14 -15
- package/dist/cjs/internal/marker.compiled.css +13 -0
- package/dist/cjs/internal/marker.js +16 -54
- package/dist/cjs/internal/stage.compiled.css +17 -0
- package/dist/cjs/internal/stage.js +55 -54
- package/dist/cjs/progress-tracker.compiled.css +10 -0
- package/dist/cjs/progress-tracker.js +23 -29
- package/dist/es2019/internal/bar.compiled.css +9 -0
- package/dist/es2019/internal/bar.js +13 -30
- package/dist/es2019/internal/link-new.js +3 -3
- package/dist/es2019/internal/link.compiled.css +2 -0
- package/dist/es2019/internal/link.js +8 -14
- package/dist/es2019/internal/marker.compiled.css +13 -0
- package/dist/es2019/internal/marker.js +7 -49
- package/dist/es2019/internal/stage.compiled.css +17 -0
- package/dist/es2019/internal/stage.js +52 -58
- package/dist/es2019/progress-tracker.compiled.css +10 -0
- package/dist/es2019/progress-tracker.js +18 -31
- package/dist/esm/internal/bar.compiled.css +9 -0
- package/dist/esm/internal/bar.js +16 -31
- package/dist/esm/internal/link-new.js +3 -3
- package/dist/esm/internal/link.compiled.css +2 -0
- package/dist/esm/internal/link.js +11 -14
- package/dist/esm/internal/marker.compiled.css +13 -0
- package/dist/esm/internal/marker.js +12 -52
- package/dist/esm/internal/stage.compiled.css +17 -0
- package/dist/esm/internal/stage.js +48 -54
- package/dist/esm/progress-tracker.compiled.css +10 -0
- package/dist/esm/progress-tracker.js +18 -31
- package/dist/types/internal/bar.d.ts +2 -6
- package/dist/types/internal/stage.d.ts +1 -2
- package/dist/types/progress-tracker.d.ts +2 -2
- package/dist/types/types.d.ts +1 -1
- package/dist/types-ts4.5/internal/bar.d.ts +2 -6
- package/dist/types-ts4.5/internal/stage.d.ts +1 -2
- package/dist/types-ts4.5/progress-tracker.d.ts +2 -2
- package/dist/types-ts4.5/types.d.ts +1 -1
- package/package.json +2 -3
- package/constants/package.json +0 -17
- package/dist/cjs/constants.js +0 -14
- package/dist/cjs/internal/constants.js +0 -21
- package/dist/es2019/constants.js +0 -8
- package/dist/es2019/internal/constants.js +0 -15
- package/dist/esm/constants.js +0 -8
- package/dist/esm/internal/constants.js +0 -15
- package/dist/types/constants.d.ts +0 -9
- package/dist/types/internal/constants.d.ts +0 -12
- package/dist/types-ts4.5/constants.d.ts +0 -9
- package/dist/types-ts4.5/internal/constants.d.ts +0 -12
|
@@ -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
|
-
*
|
|
4
|
-
|
|
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
|
-
var 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(".concat(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 * ".concat(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(".concat(varTransitionSpeed, ") var(").concat(varTransitionEasing, "), background-color var(").concat(varTransitionSpeed, ") var(").concat(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(".concat(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(".concat(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(".concat(varBackgroundColor, ")")
|
|
44
|
-
}
|
|
45
|
-
});
|
|
3
|
+
import "./marker.compiled.css";
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
6
|
+
var progressMarkerStyles = null;
|
|
46
7
|
|
|
47
8
|
/**
|
|
48
9
|
* __Progress marker__
|
|
@@ -51,13 +12,12 @@ var progressMarkerStyles = css({
|
|
|
51
12
|
*/
|
|
52
13
|
var ProgressMarker = function ProgressMarker(_ref) {
|
|
53
14
|
var testId = _ref.testId;
|
|
54
|
-
return (
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
"
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
);
|
|
15
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
16
|
+
"data-testid": testId,
|
|
17
|
+
className: ax(["_1bsbu2gc _4t3iu2gc _kqswstnw _bfhkr3ku _2rkou2gc _1e021ssb _t9ec17h2 _v5645rui _1lww1oqq _1uuw17dr _1ez2kb7n _1190pbrw _1ia8r3ku"]),
|
|
18
|
+
style: {
|
|
19
|
+
"--_nsjg4d": ix("translate(-50%, calc(-1 * ".concat("var(--ds-space-250, 20px)", "))"))
|
|
20
|
+
}
|
|
21
|
+
});
|
|
62
22
|
};
|
|
63
23
|
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,3 +1,4 @@
|
|
|
1
|
+
/* stage.tsx generated by @compiled/babel-plugin v0.32.2 */
|
|
1
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
3
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
3
4
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
@@ -6,50 +7,49 @@ import _inherits from "@babel/runtime/helpers/inherits";
|
|
|
6
7
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
7
8
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
8
9
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
10
|
+
import "./stage.compiled.css";
|
|
11
|
+
import * as React from 'react';
|
|
12
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
9
13
|
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; }
|
|
10
14
|
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) { _defineProperty(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; }
|
|
11
15
|
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
|
|
12
16
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
13
|
-
/* eslint-disable @atlaskit/design-system/no-nested-styles */
|
|
14
|
-
/**
|
|
15
|
-
* @jsxRuntime classic
|
|
16
|
-
* @jsx jsx
|
|
17
|
-
*/
|
|
18
17
|
import { createRef, PureComponent } from 'react';
|
|
19
|
-
|
|
20
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
21
|
-
import { css, jsx } from '@emotion/react';
|
|
22
18
|
import { CSSTransition } from 'react-transition-group';
|
|
23
19
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
24
|
-
import { Box
|
|
20
|
+
import { Box } from '@atlaskit/primitives/compiled';
|
|
21
|
+
import { B300, N70 } from '@atlaskit/theme/colors';
|
|
25
22
|
import ProgressBar from './bar';
|
|
26
|
-
import { LABEL_TOP_SPACING, varBackgroundColor, varMarkerColor, varTransitionDelay, varTransitionEasing, varTransitionSpeed } from './constants';
|
|
27
23
|
import ProgressMarker from './marker';
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
37
|
-
var
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
24
|
+
var styles = {
|
|
25
|
+
listItemContent: "_1bsb1osq _kqswh2mm"
|
|
26
|
+
};
|
|
27
|
+
var textColor = {
|
|
28
|
+
unvisited: "_syaz131l",
|
|
29
|
+
current: "_syaz1e6v",
|
|
30
|
+
visited: "_syaz1fxt",
|
|
31
|
+
disabled: "_syaz1lh4"
|
|
32
|
+
};
|
|
33
|
+
var fontWeight = {
|
|
34
|
+
unvisited: "_k48pi7a9",
|
|
35
|
+
current: "_k48pmoej",
|
|
36
|
+
visited: "_k48pmoej",
|
|
37
|
+
disabled: "_k48pmoej"
|
|
38
|
+
};
|
|
39
|
+
var getMarkerColor = function getMarkerColor(status) {
|
|
40
|
+
switch (status) {
|
|
41
|
+
case 'unvisited':
|
|
42
|
+
return "var(--ds-icon-subtle, ".concat(N70, ")");
|
|
43
|
+
case 'current':
|
|
44
|
+
case 'visited':
|
|
45
|
+
case 'disabled':
|
|
46
|
+
return "var(--ds-icon-brand, ".concat(B300, ")");
|
|
47
|
+
default:
|
|
48
|
+
return;
|
|
51
49
|
}
|
|
52
|
-
}
|
|
50
|
+
};
|
|
51
|
+
var listItemStyles = null;
|
|
52
|
+
var titleStyles = null;
|
|
53
53
|
var ProgressTrackerStage = /*#__PURE__*/function (_PureComponent) {
|
|
54
54
|
_inherits(ProgressTrackerStage, _PureComponent);
|
|
55
55
|
var _super = _createSuper(ProgressTrackerStage);
|
|
@@ -107,17 +107,17 @@ var ProgressTrackerStage = /*#__PURE__*/function (_PureComponent) {
|
|
|
107
107
|
transitionEasing = _this$props.transitionEasing,
|
|
108
108
|
testId = _this$props.testId;
|
|
109
109
|
var ariaCurrent = item.status === 'current' ? 'step' : 'false';
|
|
110
|
-
var listInlineStyles = (_listInlineStyles = {}, _defineProperty(_listInlineStyles,
|
|
111
|
-
return
|
|
110
|
+
var listInlineStyles = (_listInlineStyles = {}, _defineProperty(_listInlineStyles, '--ds--pt--ts', "".concat(transitionSpeed, "ms")), _defineProperty(_listInlineStyles, '--ds--pt--td', "".concat(transitionDelay, "ms")), _defineProperty(_listInlineStyles, '--ds--pt--te', transitionEasing), _defineProperty(_listInlineStyles, '--ds--pt--mc', this.state.oldMarkerColor), _defineProperty(_listInlineStyles, '--ds--pt--bg', getMarkerColor(item.status)), _defineProperty(_listInlineStyles, "listStyleType", 'none'), _listInlineStyles);
|
|
111
|
+
return /*#__PURE__*/React.createElement("li", {
|
|
112
112
|
"data-testid": testId
|
|
113
113
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
114
114
|
,
|
|
115
115
|
style: listInlineStyles,
|
|
116
|
-
|
|
117
|
-
"
|
|
118
|
-
},
|
|
119
|
-
xcss:
|
|
120
|
-
},
|
|
116
|
+
"aria-current": ariaCurrent,
|
|
117
|
+
className: ax(["_18s8ze3t _1i4q1hna"])
|
|
118
|
+
}, /*#__PURE__*/React.createElement(Box, {
|
|
119
|
+
xcss: styles.listItemContent
|
|
120
|
+
}, /*#__PURE__*/React.createElement(CSSTransition, _extends({
|
|
121
121
|
appear: true,
|
|
122
122
|
in: this.state.transitioning,
|
|
123
123
|
onEntered: this.onEntered,
|
|
@@ -125,9 +125,9 @@ var ProgressTrackerStage = /*#__PURE__*/function (_PureComponent) {
|
|
|
125
125
|
classNames: "fade"
|
|
126
126
|
}, fg('platform_design_system_team_transition_group_r18') && {
|
|
127
127
|
nodeRef: this.nodeRefMarker
|
|
128
|
-
}),
|
|
128
|
+
}), /*#__PURE__*/React.createElement(ProgressMarker, {
|
|
129
129
|
testId: testId && "".concat(testId, "-marker")
|
|
130
|
-
})),
|
|
130
|
+
})), /*#__PURE__*/React.createElement(CSSTransition, _extends({
|
|
131
131
|
appear: true,
|
|
132
132
|
in: this.state.transitioning,
|
|
133
133
|
onEntered: this.onEntered,
|
|
@@ -135,10 +135,10 @@ var ProgressTrackerStage = /*#__PURE__*/function (_PureComponent) {
|
|
|
135
135
|
classNames: "fade"
|
|
136
136
|
}, fg('platform_design_system_team_transition_group_r18') && {
|
|
137
137
|
nodeRef: this.nodeRefBar
|
|
138
|
-
}),
|
|
138
|
+
}), /*#__PURE__*/React.createElement(ProgressBar, {
|
|
139
139
|
testId: testId && "".concat(testId, "-bar"),
|
|
140
140
|
percentageComplete: item.percentageComplete
|
|
141
|
-
})),
|
|
141
|
+
})), /*#__PURE__*/React.createElement(CSSTransition, _extends({
|
|
142
142
|
appear: true,
|
|
143
143
|
in: this.state.transitioning,
|
|
144
144
|
onEntered: this.onEntered,
|
|
@@ -146,15 +146,9 @@ var ProgressTrackerStage = /*#__PURE__*/function (_PureComponent) {
|
|
|
146
146
|
classNames: "fade"
|
|
147
147
|
}, fg('platform_design_system_team_transition_group_r18') && {
|
|
148
148
|
nodeRef: this.nodeRefTitle
|
|
149
|
-
}),
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
153
|
-
color: getTextColor(item.status),
|
|
154
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
155
|
-
fontWeight: getFontWeight(item.status)
|
|
156
|
-
},
|
|
157
|
-
"data-testid": testId && "".concat(testId, "-title")
|
|
149
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
150
|
+
"data-testid": testId && "".concat(testId, "-title"),
|
|
151
|
+
className: ax(["_11c81oud _1pfhv47k _y3gn1h6o _v564ph28 _1uuw17dr _1ez2kb7n _1t9yph28", textColor[item.status], fontWeight[item.status]])
|
|
158
152
|
}, this.shouldShowLink() ? render.link({
|
|
159
153
|
item: item
|
|
160
154
|
}) : 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,34 +1,21 @@
|
|
|
1
|
+
/* progress-tracker.tsx generated by @compiled/babel-plugin v0.32.2 */
|
|
1
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
|
+
import "./progress-tracker.compiled.css";
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
2
6
|
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; }
|
|
3
7
|
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) { _defineProperty(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; }
|
|
4
|
-
/* eslint-disable @atlaskit/design-system/no-nested-styles */
|
|
5
|
-
/**
|
|
6
|
-
* @jsxRuntime classic
|
|
7
|
-
* @jsx jsx
|
|
8
|
-
*/
|
|
9
8
|
import { useEffect, useRef } from 'react';
|
|
10
|
-
|
|
11
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
12
|
-
import { css, jsx } from '@emotion/react';
|
|
13
9
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
14
|
-
import { spacing as spacingOptions } from './constants';
|
|
15
|
-
import { ANIMATION_EASE_OUT, LINEAR_TRANSITION_SPEED, TRANSITION_SPEED, varSpacing } from './internal/constants';
|
|
16
10
|
import Link from './internal/link';
|
|
17
11
|
import LinkNew from './internal/link-new';
|
|
18
12
|
import Stage from './internal/stage';
|
|
19
|
-
var containerStyles =
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
gap: "var(".concat(varSpacing, ")"),
|
|
26
|
-
listStyleType: 'none',
|
|
27
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
28
|
-
'&&': {
|
|
29
|
-
marginBlockStart: "var(--ds-space-500, 40px)"
|
|
30
|
-
}
|
|
31
|
-
});
|
|
13
|
+
var containerStyles = null;
|
|
14
|
+
var spacingOptions = {
|
|
15
|
+
comfortable: "var(--ds-space-500, 40px)",
|
|
16
|
+
cosy: "var(--ds-space-200, 16px)",
|
|
17
|
+
compact: "var(--ds-space-050, 4px)"
|
|
18
|
+
};
|
|
32
19
|
/**
|
|
33
20
|
* __Progress tracker__
|
|
34
21
|
*
|
|
@@ -51,7 +38,7 @@ var ProgressTracker = function ProgressTracker(_ref) {
|
|
|
51
38
|
return (
|
|
52
39
|
// Anchor content is coming from another location
|
|
53
40
|
// eslint-disable-next-line jsx-a11y/anchor-has-content
|
|
54
|
-
fg('platform_progress_tracker_link_migration') ?
|
|
41
|
+
fg('platform_progress_tracker_link_migration') ? /*#__PURE__*/React.createElement(LinkNew, item) : /*#__PURE__*/React.createElement(Link, item)
|
|
55
42
|
);
|
|
56
43
|
}
|
|
57
44
|
} : _ref$render,
|
|
@@ -89,9 +76,9 @@ var ProgressTracker = function ProgressTracker(_ref) {
|
|
|
89
76
|
var progressItems = items.map(function (stage, index) {
|
|
90
77
|
var transitionSpeed = 0;
|
|
91
78
|
var transitionDelay = 0;
|
|
92
|
-
var transitionEasing = progressChanges > 1 ? 'linear' :
|
|
79
|
+
var transitionEasing = progressChanges > 1 ? 'linear' : 'cubic-bezier(0.15,1,0.3,1)';
|
|
93
80
|
if (animated) {
|
|
94
|
-
transitionSpeed = progressChanges > 1 ?
|
|
81
|
+
transitionSpeed = progressChanges > 1 ? 50 : 300;
|
|
95
82
|
if (stage.percentageComplete < previousStages[index].percentageComplete) {
|
|
96
83
|
/**
|
|
97
84
|
* Load each transition sequentially in reverse.
|
|
@@ -106,7 +93,7 @@ var ProgressTracker = function ProgressTracker(_ref) {
|
|
|
106
93
|
stepsForward -= 1;
|
|
107
94
|
}
|
|
108
95
|
}
|
|
109
|
-
return
|
|
96
|
+
return /*#__PURE__*/React.createElement(Stage, {
|
|
110
97
|
transitionSpeed: transitionSpeed,
|
|
111
98
|
transitionDelay: transitionDelay,
|
|
112
99
|
transitionEasing: transitionEasing,
|
|
@@ -117,14 +104,14 @@ var ProgressTracker = function ProgressTracker(_ref) {
|
|
|
117
104
|
});
|
|
118
105
|
var listInlineStyles = (_listInlineStyles = {
|
|
119
106
|
gridTemplateColumns: "repeat(".concat(items.length, ", 1fr)")
|
|
120
|
-
}, _defineProperty(_listInlineStyles,
|
|
121
|
-
return
|
|
107
|
+
}, _defineProperty(_listInlineStyles, '--ds--pt--sp', spacingOptions[spacing]), _defineProperty(_listInlineStyles, "maxWidth", 8 * 10 * items.length * 2), _listInlineStyles);
|
|
108
|
+
return /*#__PURE__*/React.createElement("ul", {
|
|
122
109
|
"data-testid": testId
|
|
123
110
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
124
111
|
,
|
|
125
112
|
style: listInlineStyles,
|
|
126
|
-
|
|
127
|
-
"
|
|
113
|
+
"aria-label": label,
|
|
114
|
+
className: ax(["_1e0c11p5 _1bsb1osq _19pkidpf _2hwx1wug _otyridpf _18u01wug _1yt4ze3t _zulp6odm _2mzuglyw _rxvc1jfw"])
|
|
128
115
|
}, progressItems);
|
|
129
116
|
};
|
|
130
117
|
export default ProgressTracker;
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import { jsx } from '@emotion/react';
|
|
1
|
+
/// <reference types="react" />
|
|
6
2
|
interface StageBarProps {
|
|
7
3
|
testId?: string;
|
|
8
4
|
percentageComplete: number;
|
|
@@ -13,5 +9,5 @@ interface StageBarProps {
|
|
|
13
9
|
* A progress bar describes the horizontal tracking bar that traverses each individual step.
|
|
14
10
|
*
|
|
15
11
|
*/
|
|
16
|
-
declare const ProgressBar: ({ percentageComplete, testId }: StageBarProps) =>
|
|
12
|
+
declare const ProgressBar: ({ percentageComplete, testId }: StageBarProps) => JSX.Element;
|
|
17
13
|
export default ProgressBar;
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
5
|
import { PureComponent } from 'react';
|
|
6
|
-
import { jsx } from '@emotion/react';
|
|
7
6
|
import type { ProgressTrackerStageProps } from './types';
|
|
8
7
|
interface State {
|
|
9
8
|
transitioning: boolean;
|
|
@@ -20,5 +19,5 @@ export default class ProgressTrackerStage extends PureComponent<ProgressTrackerS
|
|
|
20
19
|
UNSAFE_componentWillReceiveProps(): void;
|
|
21
20
|
shouldShowLink(): boolean;
|
|
22
21
|
onEntered: () => void;
|
|
23
|
-
render():
|
|
22
|
+
render(): JSX.Element;
|
|
24
23
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import type { ProgressTrackerStageRenderProp, Spacing, Stages } from './types';
|
|
3
3
|
export interface ProgressTrackerProps {
|
|
4
4
|
/**
|
|
@@ -35,5 +35,5 @@ export interface ProgressTrackerProps {
|
|
|
35
35
|
* - [Code](https://atlassian.design/components/progress-tracker/code)
|
|
36
36
|
* - [Usage](https://atlassian.design/components/progress-tracker/usage)
|
|
37
37
|
*/
|
|
38
|
-
declare const ProgressTracker: ({ items, spacing, render, animated, testId, label, }: ProgressTrackerProps) =>
|
|
38
|
+
declare const ProgressTracker: ({ items, spacing, render, animated, testId, label, }: ProgressTrackerProps) => JSX.Element;
|
|
39
39
|
export default ProgressTracker;
|
package/dist/types/types.d.ts
CHANGED
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import { jsx } from '@emotion/react';
|
|
1
|
+
/// <reference types="react" />
|
|
6
2
|
interface StageBarProps {
|
|
7
3
|
testId?: string;
|
|
8
4
|
percentageComplete: number;
|
|
@@ -13,5 +9,5 @@ interface StageBarProps {
|
|
|
13
9
|
* A progress bar describes the horizontal tracking bar that traverses each individual step.
|
|
14
10
|
*
|
|
15
11
|
*/
|
|
16
|
-
declare const ProgressBar: ({ percentageComplete, testId }: StageBarProps) =>
|
|
12
|
+
declare const ProgressBar: ({ percentageComplete, testId }: StageBarProps) => JSX.Element;
|
|
17
13
|
export default ProgressBar;
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
5
|
import { PureComponent } from 'react';
|
|
6
|
-
import { jsx } from '@emotion/react';
|
|
7
6
|
import type { ProgressTrackerStageProps } from './types';
|
|
8
7
|
interface State {
|
|
9
8
|
transitioning: boolean;
|
|
@@ -20,5 +19,5 @@ export default class ProgressTrackerStage extends PureComponent<ProgressTrackerS
|
|
|
20
19
|
UNSAFE_componentWillReceiveProps(): void;
|
|
21
20
|
shouldShowLink(): boolean;
|
|
22
21
|
onEntered: () => void;
|
|
23
|
-
render():
|
|
22
|
+
render(): JSX.Element;
|
|
24
23
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import type { ProgressTrackerStageRenderProp, Spacing, Stages } from './types';
|
|
3
3
|
export interface ProgressTrackerProps {
|
|
4
4
|
/**
|
|
@@ -35,5 +35,5 @@ export interface ProgressTrackerProps {
|
|
|
35
35
|
* - [Code](https://atlassian.design/components/progress-tracker/code)
|
|
36
36
|
* - [Usage](https://atlassian.design/components/progress-tracker/usage)
|
|
37
37
|
*/
|
|
38
|
-
declare const ProgressTracker: ({ items, spacing, render, animated, testId, label, }: ProgressTrackerProps) =>
|
|
38
|
+
declare const ProgressTracker: ({ items, spacing, render, animated, testId, label, }: ProgressTrackerProps) => JSX.Element;
|
|
39
39
|
export default ProgressTracker;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/progress-tracker",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "9.0.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/"
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@atlaskit/theme": "^14.0.0",
|
|
32
32
|
"@atlaskit/tokens": "^2.4.0",
|
|
33
33
|
"@babel/runtime": "^7.0.0",
|
|
34
|
-
"@
|
|
34
|
+
"@compiled/react": "^0.18.1",
|
|
35
35
|
"react-transition-group": "^4.4.1"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
@@ -79,7 +79,6 @@
|
|
|
79
79
|
}
|
|
80
80
|
},
|
|
81
81
|
"af:exports": {
|
|
82
|
-
"./constants": "./src/constants.tsx",
|
|
83
82
|
"./types": "./src/types.tsx",
|
|
84
83
|
".": "./src/index.tsx"
|
|
85
84
|
},
|
package/constants/package.json
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@atlaskit/progress-tracker/constants",
|
|
3
|
-
"main": "../dist/cjs/constants.js",
|
|
4
|
-
"module": "../dist/esm/constants.js",
|
|
5
|
-
"module:es2019": "../dist/es2019/constants.js",
|
|
6
|
-
"sideEffects": [
|
|
7
|
-
"**/*.compiled.css"
|
|
8
|
-
],
|
|
9
|
-
"types": "../dist/types/constants.d.ts",
|
|
10
|
-
"typesVersions": {
|
|
11
|
-
">=4.5 <5.4": {
|
|
12
|
-
"*": [
|
|
13
|
-
"../dist/types-ts4.5/constants.d.ts"
|
|
14
|
-
]
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
}
|
package/dist/cjs/constants.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.spacing = void 0;
|
|
7
|
-
/**
|
|
8
|
-
* Ideally these are exported by @atlaskit/page
|
|
9
|
-
*/
|
|
10
|
-
var spacing = exports.spacing = {
|
|
11
|
-
comfortable: "var(--ds-space-500, 40px)",
|
|
12
|
-
cosy: "var(--ds-space-200, 16px)",
|
|
13
|
-
compact: "var(--ds-space-050, 4px)"
|
|
14
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.varTransitionSpeed = exports.varTransitionEasing = exports.varTransitionDelay = exports.varSpacing = exports.varMarkerColor = exports.varBackgroundColor = exports.TRANSITION_SPEED = exports.PROGRESS_BAR_HEIGHT = exports.LINEAR_TRANSITION_SPEED = exports.LABEL_TOP_SPACING = exports.HALF_GRID_SIZE = exports.ANIMATION_EASE_OUT = void 0;
|
|
7
|
-
var TRANSITION_SPEED = exports.TRANSITION_SPEED = 300;
|
|
8
|
-
var LINEAR_TRANSITION_SPEED = exports.LINEAR_TRANSITION_SPEED = 50;
|
|
9
|
-
var ANIMATION_EASE_OUT = exports.ANIMATION_EASE_OUT = 'cubic-bezier(0.15,1,0.3,1)';
|
|
10
|
-
var varSpacing = exports.varSpacing = '--ds--pt--sp';
|
|
11
|
-
var varTransitionSpeed = exports.varTransitionSpeed = '--ds--pt--ts';
|
|
12
|
-
var varTransitionDelay = exports.varTransitionDelay = '--ds--pt--td';
|
|
13
|
-
var varTransitionEasing = exports.varTransitionEasing = '--ds--pt--te';
|
|
14
|
-
var varMarkerColor = exports.varMarkerColor = '--ds--pt--mc';
|
|
15
|
-
var varBackgroundColor = exports.varBackgroundColor = '--ds--pt--bg';
|
|
16
|
-
var HALF_GRID_SIZE = exports.HALF_GRID_SIZE = "var(--ds-space-050, 4px)";
|
|
17
|
-
var PROGRESS_BAR_HEIGHT = exports.PROGRESS_BAR_HEIGHT = "var(--ds-space-100, 8px)";
|
|
18
|
-
|
|
19
|
-
// Labels sit 16px from bottom of progress bar
|
|
20
|
-
// i.e. 8 (bar height) + 16 - 4 (line height 24->20 in PYX-695) = 20px
|
|
21
|
-
var LABEL_TOP_SPACING = exports.LABEL_TOP_SPACING = "var(--ds-space-250, 20px)";
|
package/dist/es2019/constants.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export const TRANSITION_SPEED = 300;
|
|
2
|
-
export const LINEAR_TRANSITION_SPEED = 50;
|
|
3
|
-
export const ANIMATION_EASE_OUT = 'cubic-bezier(0.15,1,0.3,1)';
|
|
4
|
-
export const varSpacing = '--ds--pt--sp';
|
|
5
|
-
export const varTransitionSpeed = '--ds--pt--ts';
|
|
6
|
-
export const varTransitionDelay = '--ds--pt--td';
|
|
7
|
-
export const varTransitionEasing = '--ds--pt--te';
|
|
8
|
-
export const varMarkerColor = '--ds--pt--mc';
|
|
9
|
-
export const varBackgroundColor = '--ds--pt--bg';
|
|
10
|
-
export const HALF_GRID_SIZE = "var(--ds-space-050, 4px)";
|
|
11
|
-
export const PROGRESS_BAR_HEIGHT = "var(--ds-space-100, 8px)";
|
|
12
|
-
|
|
13
|
-
// Labels sit 16px from bottom of progress bar
|
|
14
|
-
// i.e. 8 (bar height) + 16 - 4 (line height 24->20 in PYX-695) = 20px
|
|
15
|
-
export const LABEL_TOP_SPACING = "var(--ds-space-250, 20px)";
|
package/dist/esm/constants.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export var TRANSITION_SPEED = 300;
|
|
2
|
-
export var LINEAR_TRANSITION_SPEED = 50;
|
|
3
|
-
export var ANIMATION_EASE_OUT = 'cubic-bezier(0.15,1,0.3,1)';
|
|
4
|
-
export var varSpacing = '--ds--pt--sp';
|
|
5
|
-
export var varTransitionSpeed = '--ds--pt--ts';
|
|
6
|
-
export var varTransitionDelay = '--ds--pt--td';
|
|
7
|
-
export var varTransitionEasing = '--ds--pt--te';
|
|
8
|
-
export var varMarkerColor = '--ds--pt--mc';
|
|
9
|
-
export var varBackgroundColor = '--ds--pt--bg';
|
|
10
|
-
export var HALF_GRID_SIZE = "var(--ds-space-050, 4px)";
|
|
11
|
-
export var PROGRESS_BAR_HEIGHT = "var(--ds-space-100, 8px)";
|
|
12
|
-
|
|
13
|
-
// Labels sit 16px from bottom of progress bar
|
|
14
|
-
// i.e. 8 (bar height) + 16 - 4 (line height 24->20 in PYX-695) = 20px
|
|
15
|
-
export var LABEL_TOP_SPACING = "var(--ds-space-250, 20px)";
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Ideally these are exported by @atlaskit/page
|
|
3
|
-
*/
|
|
4
|
-
export declare const spacing: {
|
|
5
|
-
readonly comfortable: "var(--ds-space-500)";
|
|
6
|
-
readonly cosy: "var(--ds-space-200)";
|
|
7
|
-
readonly compact: "var(--ds-space-050)";
|
|
8
|
-
};
|
|
9
|
-
export type Spacing = keyof typeof spacing;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export declare const TRANSITION_SPEED = 300;
|
|
2
|
-
export declare const LINEAR_TRANSITION_SPEED = 50;
|
|
3
|
-
export declare const ANIMATION_EASE_OUT = "cubic-bezier(0.15,1,0.3,1)";
|
|
4
|
-
export declare const varSpacing = "--ds--pt--sp";
|
|
5
|
-
export declare const varTransitionSpeed = "--ds--pt--ts";
|
|
6
|
-
export declare const varTransitionDelay = "--ds--pt--td";
|
|
7
|
-
export declare const varTransitionEasing = "--ds--pt--te";
|
|
8
|
-
export declare const varMarkerColor = "--ds--pt--mc";
|
|
9
|
-
export declare const varBackgroundColor = "--ds--pt--bg";
|
|
10
|
-
export declare const HALF_GRID_SIZE: "var(--ds-space-050)";
|
|
11
|
-
export declare const PROGRESS_BAR_HEIGHT: "var(--ds-space-100)";
|
|
12
|
-
export declare const LABEL_TOP_SPACING: "var(--ds-space-250)";
|