@atlaskit/progress-tracker 8.5.1 → 8.5.3
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 +14 -0
- package/dist/cjs/internal/bar.js +1 -1
- package/dist/cjs/internal/marker.js +2 -2
- package/dist/cjs/internal/stage.js +10 -9
- package/dist/cjs/progress-tracker.js +3 -3
- package/dist/es2019/internal/bar.js +1 -1
- package/dist/es2019/internal/marker.js +2 -2
- package/dist/es2019/internal/stage.js +9 -8
- package/dist/es2019/progress-tracker.js +3 -3
- package/dist/esm/internal/bar.js +1 -1
- package/dist/esm/internal/marker.js +2 -2
- package/dist/esm/internal/stage.js +9 -8
- package/dist/esm/progress-tracker.js +3 -3
- package/dist/types-ts4.5/constants.d.ts +9 -0
- package/dist/types-ts4.5/index.d.ts +3 -0
- package/dist/types-ts4.5/internal/bar.d.ts +14 -0
- package/dist/types-ts4.5/internal/constants.d.ts +14 -0
- package/dist/types-ts4.5/internal/link.d.ts +10 -0
- package/dist/types-ts4.5/internal/marker.d.ts +11 -0
- package/dist/types-ts4.5/internal/stage.d.ts +18 -0
- package/dist/types-ts4.5/internal/types.d.ts +27 -0
- package/dist/types-ts4.5/internal/utils.d.ts +5 -0
- package/dist/types-ts4.5/progress-tracker.d.ts +58 -0
- package/dist/types-ts4.5/types.d.ts +26 -0
- package/package.json +16 -17
- package/tmp/api-report-tmp.d.ts +106 -0
- package/dist/cjs/version.json +0 -5
- package/dist/es2019/version.json +0 -5
- package/dist/esm/version.json +0 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/progress-tracker
|
|
2
2
|
|
|
3
|
+
## 8.5.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`6ab9799d402`](https://bitbucket.org/atlassian/atlassian-frontend/commits/6ab9799d402) - The internal composition of this component has changed. There is no expected change in behavior.
|
|
8
|
+
- [`fd6bb9c9184`](https://bitbucket.org/atlassian/atlassian-frontend/commits/fd6bb9c9184) - Delete version.json
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 8.5.2
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [`9d00501a414`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9d00501a414) - Ensure legacy types are published for TS 4.5-4.8
|
|
16
|
+
|
|
3
17
|
## 8.5.1
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/dist/cjs/internal/bar.js
CHANGED
|
@@ -13,7 +13,7 @@ var _constants2 = require("./constants");
|
|
|
13
13
|
var progressBarStyles = (0, _react.css)({
|
|
14
14
|
height: _constants2.PROGRESS_BAR_HEIGHT,
|
|
15
15
|
position: 'absolute',
|
|
16
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
16
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
17
17
|
left: '50%',
|
|
18
18
|
backgroundColor: "var(--ds-background-brand-bold, ".concat(_colors.B300, ")"),
|
|
19
19
|
borderBottomRightRadius: _constants2.PROGRESS_BAR_HEIGHT,
|
|
@@ -6,14 +6,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _react = require("@emotion/react");
|
|
8
8
|
var _constants = require("./constants");
|
|
9
|
-
/* eslint-disable @
|
|
9
|
+
/* eslint-disable @atlaskit/design-system/no-nested-styles */
|
|
10
10
|
/** @jsx jsx */
|
|
11
11
|
|
|
12
12
|
var progressMarkerStyles = (0, _react.css)({
|
|
13
13
|
width: _constants.PROGRESS_BAR_HEIGHT,
|
|
14
14
|
height: _constants.PROGRESS_BAR_HEIGHT,
|
|
15
15
|
position: 'absolute',
|
|
16
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
16
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
17
17
|
left: '50%',
|
|
18
18
|
backgroundColor: "var(".concat(_constants.varBackgroundColor, ")"),
|
|
19
19
|
borderRadius: _constants.PROGRESS_BAR_HEIGHT,
|
|
@@ -15,8 +15,8 @@ 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 _box = _interopRequireDefault(require("@atlaskit/ds-explorations/box"));
|
|
19
18
|
var _text = _interopRequireDefault(require("@atlaskit/ds-explorations/text"));
|
|
19
|
+
var _primitives = require("@atlaskit/primitives");
|
|
20
20
|
var _bar = _interopRequireDefault(require("./bar"));
|
|
21
21
|
var _constants = require("./constants");
|
|
22
22
|
var _marker = _interopRequireDefault(require("./marker"));
|
|
@@ -24,15 +24,19 @@ var _utils = require("./utils");
|
|
|
24
24
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
25
25
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
26
26
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
27
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /* eslint-disable @
|
|
27
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /* eslint-disable @atlaskit/design-system/no-nested-styles */ /** @jsx jsx */
|
|
28
|
+
var listItemContentStyles = (0, _primitives.xcss)({
|
|
29
|
+
width: '100%',
|
|
30
|
+
position: 'relative'
|
|
31
|
+
});
|
|
28
32
|
var listItemStyles = (0, _react2.css)({
|
|
29
33
|
margin: "var(--ds-space-0, 0px)",
|
|
30
34
|
overflowWrap: 'break-word'
|
|
31
35
|
});
|
|
32
36
|
var titleStyles = (0, _react2.css)({
|
|
33
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
37
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
34
38
|
marginTop: _constants.LABEL_TOP_SPACING,
|
|
35
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
39
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
36
40
|
lineHeight: '16px',
|
|
37
41
|
textAlign: 'center',
|
|
38
42
|
'&.fade-appear': {
|
|
@@ -101,11 +105,8 @@ var ProgressTrackerStage = /*#__PURE__*/function (_PureComponent) {
|
|
|
101
105
|
style: listInlineStyles,
|
|
102
106
|
css: listItemStyles,
|
|
103
107
|
"aria-current": ariaCurrent
|
|
104
|
-
}, (0, _react2.jsx)(
|
|
105
|
-
|
|
106
|
-
UNSAFE_style: {
|
|
107
|
-
width: '100%'
|
|
108
|
-
}
|
|
108
|
+
}, (0, _react2.jsx)(_primitives.Box, {
|
|
109
|
+
xcss: listItemContentStyles
|
|
109
110
|
}, (0, _react2.jsx)(_reactTransitionGroup.CSSTransition, {
|
|
110
111
|
appear: true,
|
|
111
112
|
in: this.state.transitioning,
|
|
@@ -21,14 +21,14 @@ var _stage = _interopRequireDefault(require("./internal/stage"));
|
|
|
21
21
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
22
22
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
23
23
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
24
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /* eslint-disable @
|
|
24
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /* eslint-disable @atlaskit/design-system/no-nested-styles */ /** @jsx jsx */
|
|
25
25
|
var containerStyles = (0, _react2.css)({
|
|
26
26
|
display: 'grid',
|
|
27
27
|
width: '100%',
|
|
28
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
28
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
29
29
|
margin: '0 auto',
|
|
30
30
|
padding: "var(--ds-space-0, 0px)",
|
|
31
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
31
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
32
32
|
gap: "var(".concat(_constants2.varSpacing, ")"),
|
|
33
33
|
listStyleType: 'none',
|
|
34
34
|
'&&': {
|
|
@@ -6,7 +6,7 @@ import { HALF_GRID_SIZE, LABEL_TOP_SPACING, PROGRESS_BAR_HEIGHT, varSpacing, var
|
|
|
6
6
|
const progressBarStyles = css({
|
|
7
7
|
height: PROGRESS_BAR_HEIGHT,
|
|
8
8
|
position: 'absolute',
|
|
9
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
9
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
10
10
|
left: '50%',
|
|
11
11
|
backgroundColor: `var(--ds-background-brand-bold, ${B300})`,
|
|
12
12
|
borderBottomRightRadius: PROGRESS_BAR_HEIGHT,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* eslint-disable @
|
|
1
|
+
/* eslint-disable @atlaskit/design-system/no-nested-styles */
|
|
2
2
|
/** @jsx jsx */
|
|
3
3
|
|
|
4
4
|
import { css, jsx } from '@emotion/react';
|
|
@@ -7,7 +7,7 @@ const progressMarkerStyles = css({
|
|
|
7
7
|
width: PROGRESS_BAR_HEIGHT,
|
|
8
8
|
height: PROGRESS_BAR_HEIGHT,
|
|
9
9
|
position: 'absolute',
|
|
10
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
10
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
11
11
|
left: '50%',
|
|
12
12
|
backgroundColor: `var(${varBackgroundColor})`,
|
|
13
13
|
borderRadius: PROGRESS_BAR_HEIGHT,
|
|
@@ -1,23 +1,27 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
/* eslint-disable @
|
|
2
|
+
/* eslint-disable @atlaskit/design-system/no-nested-styles */
|
|
3
3
|
/** @jsx jsx */
|
|
4
4
|
import { PureComponent } from 'react';
|
|
5
5
|
import { css, jsx } from '@emotion/react';
|
|
6
6
|
import { CSSTransition } from 'react-transition-group';
|
|
7
|
-
import Box from '@atlaskit/ds-explorations/box';
|
|
8
7
|
import Text from '@atlaskit/ds-explorations/text';
|
|
8
|
+
import { Box, xcss } from '@atlaskit/primitives';
|
|
9
9
|
import ProgressBar from './bar';
|
|
10
10
|
import { LABEL_TOP_SPACING, varBackgroundColor, varMarkerColor, varTransitionDelay, varTransitionEasing, varTransitionSpeed } from './constants';
|
|
11
11
|
import ProgressMarker from './marker';
|
|
12
12
|
import { getFontWeight, getMarkerColor, getTextColor } from './utils';
|
|
13
|
+
const listItemContentStyles = xcss({
|
|
14
|
+
width: '100%',
|
|
15
|
+
position: 'relative'
|
|
16
|
+
});
|
|
13
17
|
const listItemStyles = css({
|
|
14
18
|
margin: "var(--ds-space-0, 0px)",
|
|
15
19
|
overflowWrap: 'break-word'
|
|
16
20
|
});
|
|
17
21
|
const titleStyles = css({
|
|
18
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
22
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
19
23
|
marginTop: LABEL_TOP_SPACING,
|
|
20
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
24
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
21
25
|
lineHeight: '16px',
|
|
22
26
|
textAlign: 'center',
|
|
23
27
|
'&.fade-appear': {
|
|
@@ -82,10 +86,7 @@ export default class ProgressTrackerStage extends PureComponent {
|
|
|
82
86
|
css: listItemStyles,
|
|
83
87
|
"aria-current": ariaCurrent
|
|
84
88
|
}, jsx(Box, {
|
|
85
|
-
|
|
86
|
-
UNSAFE_style: {
|
|
87
|
-
width: '100%'
|
|
88
|
-
}
|
|
89
|
+
xcss: listItemContentStyles
|
|
89
90
|
}, jsx(CSSTransition, {
|
|
90
91
|
appear: true,
|
|
91
92
|
in: this.state.transitioning,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
/* eslint-disable @
|
|
2
|
+
/* eslint-disable @atlaskit/design-system/no-nested-styles */
|
|
3
3
|
/** @jsx jsx */
|
|
4
4
|
import { PureComponent } from 'react';
|
|
5
5
|
import { css, jsx } from '@emotion/react';
|
|
@@ -10,10 +10,10 @@ import Stage from './internal/stage';
|
|
|
10
10
|
const containerStyles = css({
|
|
11
11
|
display: 'grid',
|
|
12
12
|
width: '100%',
|
|
13
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
13
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
14
14
|
margin: '0 auto',
|
|
15
15
|
padding: "var(--ds-space-0, 0px)",
|
|
16
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
16
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
17
17
|
gap: `var(${varSpacing})`,
|
|
18
18
|
listStyleType: 'none',
|
|
19
19
|
'&&': {
|
package/dist/esm/internal/bar.js
CHANGED
|
@@ -6,7 +6,7 @@ import { HALF_GRID_SIZE, LABEL_TOP_SPACING, PROGRESS_BAR_HEIGHT, varSpacing, var
|
|
|
6
6
|
var progressBarStyles = css({
|
|
7
7
|
height: PROGRESS_BAR_HEIGHT,
|
|
8
8
|
position: 'absolute',
|
|
9
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
9
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
10
10
|
left: '50%',
|
|
11
11
|
backgroundColor: "var(--ds-background-brand-bold, ".concat(B300, ")"),
|
|
12
12
|
borderBottomRightRadius: PROGRESS_BAR_HEIGHT,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* eslint-disable @
|
|
1
|
+
/* eslint-disable @atlaskit/design-system/no-nested-styles */
|
|
2
2
|
/** @jsx jsx */
|
|
3
3
|
|
|
4
4
|
import { css, jsx } from '@emotion/react';
|
|
@@ -7,7 +7,7 @@ var progressMarkerStyles = css({
|
|
|
7
7
|
width: PROGRESS_BAR_HEIGHT,
|
|
8
8
|
height: PROGRESS_BAR_HEIGHT,
|
|
9
9
|
position: 'absolute',
|
|
10
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
10
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
11
11
|
left: '50%',
|
|
12
12
|
backgroundColor: "var(".concat(varBackgroundColor, ")"),
|
|
13
13
|
borderRadius: PROGRESS_BAR_HEIGHT,
|
|
@@ -9,25 +9,29 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
9
9
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
10
10
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
11
11
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
12
|
-
/* eslint-disable @
|
|
12
|
+
/* eslint-disable @atlaskit/design-system/no-nested-styles */
|
|
13
13
|
/** @jsx jsx */
|
|
14
14
|
import { PureComponent } from 'react';
|
|
15
15
|
import { css, jsx } from '@emotion/react';
|
|
16
16
|
import { CSSTransition } from 'react-transition-group';
|
|
17
|
-
import Box from '@atlaskit/ds-explorations/box';
|
|
18
17
|
import Text from '@atlaskit/ds-explorations/text';
|
|
18
|
+
import { Box, xcss } from '@atlaskit/primitives';
|
|
19
19
|
import ProgressBar from './bar';
|
|
20
20
|
import { LABEL_TOP_SPACING, varBackgroundColor, varMarkerColor, varTransitionDelay, varTransitionEasing, varTransitionSpeed } from './constants';
|
|
21
21
|
import ProgressMarker from './marker';
|
|
22
22
|
import { getFontWeight, getMarkerColor, getTextColor } from './utils';
|
|
23
|
+
var listItemContentStyles = xcss({
|
|
24
|
+
width: '100%',
|
|
25
|
+
position: 'relative'
|
|
26
|
+
});
|
|
23
27
|
var listItemStyles = css({
|
|
24
28
|
margin: "var(--ds-space-0, 0px)",
|
|
25
29
|
overflowWrap: 'break-word'
|
|
26
30
|
});
|
|
27
31
|
var titleStyles = css({
|
|
28
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
32
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
29
33
|
marginTop: LABEL_TOP_SPACING,
|
|
30
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
34
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
31
35
|
lineHeight: '16px',
|
|
32
36
|
textAlign: 'center',
|
|
33
37
|
'&.fade-appear': {
|
|
@@ -97,10 +101,7 @@ var ProgressTrackerStage = /*#__PURE__*/function (_PureComponent) {
|
|
|
97
101
|
css: listItemStyles,
|
|
98
102
|
"aria-current": ariaCurrent
|
|
99
103
|
}, jsx(Box, {
|
|
100
|
-
|
|
101
|
-
UNSAFE_style: {
|
|
102
|
-
width: '100%'
|
|
103
|
-
}
|
|
104
|
+
xcss: listItemContentStyles
|
|
104
105
|
}, jsx(CSSTransition, {
|
|
105
106
|
appear: true,
|
|
106
107
|
in: this.state.transitioning,
|
|
@@ -9,7 +9,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
9
9
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
10
10
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
11
11
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
12
|
-
/* eslint-disable @
|
|
12
|
+
/* eslint-disable @atlaskit/design-system/no-nested-styles */
|
|
13
13
|
/** @jsx jsx */
|
|
14
14
|
import { PureComponent } from 'react';
|
|
15
15
|
import { css, jsx } from '@emotion/react';
|
|
@@ -20,10 +20,10 @@ import Stage from './internal/stage';
|
|
|
20
20
|
var containerStyles = css({
|
|
21
21
|
display: 'grid',
|
|
22
22
|
width: '100%',
|
|
23
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
23
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
24
24
|
margin: '0 auto',
|
|
25
25
|
padding: "var(--ds-space-0, 0px)",
|
|
26
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
26
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
27
27
|
gap: "var(".concat(varSpacing, ")"),
|
|
28
28
|
listStyleType: 'none',
|
|
29
29
|
'&&': {
|
|
@@ -0,0 +1,9 @@
|
|
|
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;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
3
|
+
interface StageBarProps {
|
|
4
|
+
testId?: string;
|
|
5
|
+
percentageComplete: number;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* __Progress bar__
|
|
9
|
+
*
|
|
10
|
+
* A progress bar describes the horizontal tracking bar that traverses each individual step.
|
|
11
|
+
*
|
|
12
|
+
*/
|
|
13
|
+
declare const ProgressBar: ({ percentageComplete, testId }: StageBarProps) => jsx.JSX.Element;
|
|
14
|
+
export default ProgressBar;
|
|
@@ -0,0 +1,14 @@
|
|
|
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 SEMI_BOLD_FONT_WEIGHT = "semibold";
|
|
11
|
+
export declare const REGULAR_FONT_WEIGHT = "regular";
|
|
12
|
+
export declare const HALF_GRID_SIZE: "var(--ds-space-050)";
|
|
13
|
+
export declare const PROGRESS_BAR_HEIGHT: "var(--ds-space-100)";
|
|
14
|
+
export declare const LABEL_TOP_SPACING: "var(--ds-space-300)";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { PureComponent } from 'react';
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
4
|
+
import type { ProgressTrackerStageProps } from './types';
|
|
5
|
+
interface State {
|
|
6
|
+
transitioning: boolean;
|
|
7
|
+
oldMarkerColor?: string;
|
|
8
|
+
oldPercentageComplete: number;
|
|
9
|
+
}
|
|
10
|
+
export type { ProgressTrackerStageProps };
|
|
11
|
+
export default class ProgressTrackerStage extends PureComponent<ProgressTrackerStageProps, State> {
|
|
12
|
+
constructor(props: ProgressTrackerStageProps);
|
|
13
|
+
UNSAFE_componentWillMount(): void;
|
|
14
|
+
UNSAFE_componentWillReceiveProps(): void;
|
|
15
|
+
shouldShowLink(): boolean;
|
|
16
|
+
onEntered: () => void;
|
|
17
|
+
render(): jsx.JSX.Element;
|
|
18
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { ProgressTrackerStageRenderProp, Stage } from '../types';
|
|
2
|
+
export interface ProgressTrackerStageProps {
|
|
3
|
+
/**
|
|
4
|
+
* stage data passed to each `ProgressTrackerStage` component
|
|
5
|
+
*/
|
|
6
|
+
item: Stage;
|
|
7
|
+
/**
|
|
8
|
+
* render prop to specify how to render components
|
|
9
|
+
*/
|
|
10
|
+
render: ProgressTrackerStageRenderProp;
|
|
11
|
+
/**
|
|
12
|
+
* An internal hook applied to key elements for automated testing
|
|
13
|
+
*/
|
|
14
|
+
testId?: string;
|
|
15
|
+
/**
|
|
16
|
+
* delay before transitioning in ms
|
|
17
|
+
*/
|
|
18
|
+
transitionDelay: number;
|
|
19
|
+
/**
|
|
20
|
+
* speed at which to transition in ms
|
|
21
|
+
*/
|
|
22
|
+
transitionSpeed: number;
|
|
23
|
+
/**
|
|
24
|
+
* interface of easing for transition
|
|
25
|
+
*/
|
|
26
|
+
transitionEasing: string;
|
|
27
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { TextColor } from '@atlaskit/ds-explorations/text';
|
|
2
|
+
import type { Status } from '../types';
|
|
3
|
+
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;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { PureComponent } from 'react';
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
4
|
+
import type { LinkComponentProps, ProgressTrackerStageRenderProp, Spacing, Stages } from './types';
|
|
5
|
+
export interface ProgressTrackerProps {
|
|
6
|
+
/**
|
|
7
|
+
* Ordered list of stage data
|
|
8
|
+
*/
|
|
9
|
+
items: Stages;
|
|
10
|
+
/**
|
|
11
|
+
* Margin spacing type between steps
|
|
12
|
+
*/
|
|
13
|
+
spacing: Spacing;
|
|
14
|
+
/**
|
|
15
|
+
* Render prop to specify custom implementations of components
|
|
16
|
+
*/
|
|
17
|
+
render: ProgressTrackerStageRenderProp;
|
|
18
|
+
/**
|
|
19
|
+
* Turns off transition animations if set to false
|
|
20
|
+
*/
|
|
21
|
+
animated: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* A `testId` prop is provided for specified elements, which is a unique string that appears as a data attribute `data-testid` in the rendered code, serving as a hook for automated tests
|
|
24
|
+
*/
|
|
25
|
+
testId?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Text to be used as an aria-label of progress tracker
|
|
28
|
+
*/
|
|
29
|
+
label?: string;
|
|
30
|
+
}
|
|
31
|
+
interface State {
|
|
32
|
+
prevStages: Stages;
|
|
33
|
+
}
|
|
34
|
+
export default class ProgressTracker extends PureComponent<ProgressTrackerProps, State> {
|
|
35
|
+
static defaultProps: {
|
|
36
|
+
items: never[];
|
|
37
|
+
spacing: string;
|
|
38
|
+
render: {
|
|
39
|
+
link: ({ item }: LinkComponentProps) => jsx.JSX.Element;
|
|
40
|
+
};
|
|
41
|
+
animated: boolean;
|
|
42
|
+
label: string;
|
|
43
|
+
};
|
|
44
|
+
state: {
|
|
45
|
+
prevStages: {
|
|
46
|
+
percentageComplete: number;
|
|
47
|
+
id: string;
|
|
48
|
+
label: string;
|
|
49
|
+
status: import("./types").Status;
|
|
50
|
+
noLink?: boolean | undefined;
|
|
51
|
+
href?: string | undefined;
|
|
52
|
+
onClick?: (() => void) | undefined;
|
|
53
|
+
}[];
|
|
54
|
+
};
|
|
55
|
+
UNSAFE_componentWillReceiveProps(nextProps: ProgressTrackerProps): void;
|
|
56
|
+
render(): jsx.JSX.Element;
|
|
57
|
+
}
|
|
58
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
/**
|
|
3
|
+
* Ideally these are exported by @atlaskit/page
|
|
4
|
+
*/
|
|
5
|
+
export type { Spacing } from './constants';
|
|
6
|
+
export type Status = 'unvisited' | 'visited' | 'current' | 'disabled';
|
|
7
|
+
/**
|
|
8
|
+
* @deprecated
|
|
9
|
+
*/
|
|
10
|
+
export type StatusType = Status;
|
|
11
|
+
export interface Stage {
|
|
12
|
+
id: string;
|
|
13
|
+
label: string;
|
|
14
|
+
percentageComplete: number;
|
|
15
|
+
status: Status;
|
|
16
|
+
noLink?: boolean;
|
|
17
|
+
href?: string;
|
|
18
|
+
onClick?: () => void;
|
|
19
|
+
}
|
|
20
|
+
export type Stages = Stage[];
|
|
21
|
+
export interface LinkComponentProps {
|
|
22
|
+
item: Stage;
|
|
23
|
+
}
|
|
24
|
+
export interface ProgressTrackerStageRenderProp {
|
|
25
|
+
link: (props: LinkComponentProps) => JSX.Element;
|
|
26
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/progress-tracker",
|
|
3
|
-
"version": "8.5.
|
|
3
|
+
"version": "8.5.3",
|
|
4
4
|
"description": "A progress tracker displays the steps and progress through a journey.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -12,28 +12,21 @@
|
|
|
12
12
|
"module": "dist/esm/index.js",
|
|
13
13
|
"module:es2019": "dist/es2019/index.js",
|
|
14
14
|
"types": "dist/types/index.d.ts",
|
|
15
|
-
"typesVersions": {
|
|
16
|
-
">=4.5 <4.9": {
|
|
17
|
-
"*": [
|
|
18
|
-
"dist/types-ts4.5/*",
|
|
19
|
-
"dist/types-ts4.5/index.d.ts"
|
|
20
|
-
]
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
15
|
"sideEffects": false,
|
|
24
16
|
"atlaskit:src": "src/index.tsx",
|
|
25
17
|
"atlassian": {
|
|
26
18
|
"team": "Design System Team",
|
|
27
|
-
"releaseModel": "
|
|
19
|
+
"releaseModel": "continuous",
|
|
28
20
|
"website": {
|
|
29
21
|
"name": "Progress tracker",
|
|
30
22
|
"category": "Components"
|
|
31
23
|
}
|
|
32
24
|
},
|
|
33
25
|
"dependencies": {
|
|
34
|
-
"@atlaskit/ds-explorations": "^2.
|
|
26
|
+
"@atlaskit/ds-explorations": "^2.2.0",
|
|
27
|
+
"@atlaskit/primitives": "^1.2.0",
|
|
35
28
|
"@atlaskit/theme": "^12.5.0",
|
|
36
|
-
"@atlaskit/tokens": "^1.
|
|
29
|
+
"@atlaskit/tokens": "^1.15.0",
|
|
37
30
|
"@babel/runtime": "^7.0.0",
|
|
38
31
|
"@emotion/react": "^11.7.1",
|
|
39
32
|
"react-transition-group": "^4.4.1"
|
|
@@ -42,17 +35,15 @@
|
|
|
42
35
|
"react": "^16.8.0"
|
|
43
36
|
},
|
|
44
37
|
"devDependencies": {
|
|
45
|
-
"@
|
|
46
|
-
"@
|
|
38
|
+
"@af/accessibility-testing": "*",
|
|
39
|
+
"@af/visual-regression": "*",
|
|
47
40
|
"@atlaskit/ds-lib": "^2.2.0",
|
|
48
|
-
"@atlaskit/icon": "^21.12.0",
|
|
49
|
-
"@atlaskit/primitives": "^0.9.0",
|
|
50
|
-
"@atlaskit/section-message": "^6.4.0",
|
|
51
41
|
"@atlaskit/ssr": "*",
|
|
52
42
|
"@atlaskit/visual-regression": "*",
|
|
53
43
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
54
44
|
"@testing-library/react": "^12.1.5",
|
|
55
45
|
"@testing-library/user-event": "^14.4.3",
|
|
46
|
+
"jest-in-case": "^1.0.2",
|
|
56
47
|
"react-dom": "^16.8.0",
|
|
57
48
|
"react-router-dom": "^4.2.2",
|
|
58
49
|
"react-test-renderer": "^16.8.0",
|
|
@@ -78,6 +69,14 @@
|
|
|
78
69
|
"ui-components": "primitives"
|
|
79
70
|
}
|
|
80
71
|
},
|
|
72
|
+
"typesVersions": {
|
|
73
|
+
">=4.5 <4.9": {
|
|
74
|
+
"*": [
|
|
75
|
+
"dist/types-ts4.5/*",
|
|
76
|
+
"dist/types-ts4.5/index.d.ts"
|
|
77
|
+
]
|
|
78
|
+
}
|
|
79
|
+
},
|
|
81
80
|
"af:exports": {
|
|
82
81
|
"./constants": "./src/constants.tsx",
|
|
83
82
|
"./types": "./src/types.tsx",
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
## API Report File for "@atlaskit/progress-tracker"
|
|
2
|
+
|
|
3
|
+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
|
|
7
|
+
/// <reference types="react" />
|
|
8
|
+
|
|
9
|
+
import { jsx } from '@emotion/react';
|
|
10
|
+
import { PureComponent } from 'react';
|
|
11
|
+
|
|
12
|
+
// @public (undocumented)
|
|
13
|
+
interface LinkComponentProps {
|
|
14
|
+
// (undocumented)
|
|
15
|
+
item: Stage;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// @public (undocumented)
|
|
19
|
+
export class ProgressTracker extends PureComponent<ProgressTrackerProps, State> {
|
|
20
|
+
// (undocumented)
|
|
21
|
+
static defaultProps: {
|
|
22
|
+
items: never[];
|
|
23
|
+
spacing: string;
|
|
24
|
+
render: {
|
|
25
|
+
link: ({ item }: LinkComponentProps) => jsx.JSX.Element;
|
|
26
|
+
};
|
|
27
|
+
animated: boolean;
|
|
28
|
+
label: string;
|
|
29
|
+
};
|
|
30
|
+
// (undocumented)
|
|
31
|
+
render(): jsx.JSX.Element;
|
|
32
|
+
// (undocumented)
|
|
33
|
+
state: {
|
|
34
|
+
prevStages: {
|
|
35
|
+
percentageComplete: number;
|
|
36
|
+
id: string;
|
|
37
|
+
label: string;
|
|
38
|
+
status: Status;
|
|
39
|
+
noLink?: boolean | undefined;
|
|
40
|
+
href?: string | undefined;
|
|
41
|
+
onClick?: (() => void) | undefined;
|
|
42
|
+
}[];
|
|
43
|
+
};
|
|
44
|
+
// (undocumented)
|
|
45
|
+
UNSAFE_componentWillReceiveProps(nextProps: ProgressTrackerProps): void;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// @public (undocumented)
|
|
49
|
+
export interface ProgressTrackerProps {
|
|
50
|
+
animated: boolean;
|
|
51
|
+
items: Stages;
|
|
52
|
+
label?: string;
|
|
53
|
+
render: ProgressTrackerStageRenderProp;
|
|
54
|
+
spacing: Spacing;
|
|
55
|
+
testId?: string;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// @public (undocumented)
|
|
59
|
+
interface ProgressTrackerStageRenderProp {
|
|
60
|
+
// (undocumented)
|
|
61
|
+
link: (props: LinkComponentProps) => JSX.Element;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// @public (undocumented)
|
|
65
|
+
type Spacing = keyof typeof spacing;
|
|
66
|
+
|
|
67
|
+
// @public
|
|
68
|
+
const spacing: {
|
|
69
|
+
readonly comfortable: "var(--ds-space-500)";
|
|
70
|
+
readonly cosy: "var(--ds-space-200)";
|
|
71
|
+
readonly compact: "var(--ds-space-050)";
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
// @public (undocumented)
|
|
75
|
+
export interface Stage {
|
|
76
|
+
// (undocumented)
|
|
77
|
+
href?: string;
|
|
78
|
+
// (undocumented)
|
|
79
|
+
id: string;
|
|
80
|
+
// (undocumented)
|
|
81
|
+
label: string;
|
|
82
|
+
// (undocumented)
|
|
83
|
+
noLink?: boolean;
|
|
84
|
+
// (undocumented)
|
|
85
|
+
onClick?: () => void;
|
|
86
|
+
// (undocumented)
|
|
87
|
+
percentageComplete: number;
|
|
88
|
+
// (undocumented)
|
|
89
|
+
status: Status;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// @public (undocumented)
|
|
93
|
+
export type Stages = Stage[];
|
|
94
|
+
|
|
95
|
+
// @public (undocumented)
|
|
96
|
+
interface State {
|
|
97
|
+
// (undocumented)
|
|
98
|
+
prevStages: Stages;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// @public (undocumented)
|
|
102
|
+
type Status = 'current' | 'disabled' | 'unvisited' | 'visited';
|
|
103
|
+
|
|
104
|
+
// (No @packageDocumentation comment for this package)
|
|
105
|
+
|
|
106
|
+
```
|
package/dist/cjs/version.json
DELETED
package/dist/es2019/version.json
DELETED