@atlaskit/progress-indicator 9.2.5 → 9.2.8
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 +19 -0
- package/dist/cjs/components/progress-dots.js +11 -7
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/components/progress-dots.js +10 -7
- package/dist/es2019/version.json +1 -1
- package/dist/esm/components/progress-dots.js +10 -7
- package/dist/esm/version.json +1 -1
- package/package.json +9 -6
- package/report.api.md +70 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @atlaskit/progress-indicator
|
|
2
2
|
|
|
3
|
+
## 9.2.8
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`8d4228767b0`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8d4228767b0) - Upgrade Typescript from `4.2.4` to `4.3.5`.
|
|
8
|
+
|
|
9
|
+
## 9.2.7
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`8a5bdb3c844`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8a5bdb3c844) - Upgrading internal dependency (bind-event-listener) for improved internal types
|
|
14
|
+
|
|
15
|
+
## 9.2.6
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- [`e4b612d1c48`](https://bitbucket.org/atlassian/atlassian-frontend/commits/e4b612d1c48) - Internal migration to bind-event-listener for safer DOM Event cleanup
|
|
20
|
+
- Updated dependencies
|
|
21
|
+
|
|
3
22
|
## 9.2.5
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
|
@@ -15,6 +15,8 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
15
15
|
|
|
16
16
|
var _core = require("@emotion/core");
|
|
17
17
|
|
|
18
|
+
var _bindEventListener = require("bind-event-listener");
|
|
19
|
+
|
|
18
20
|
var _analyticsNext = require("@atlaskit/analytics-next");
|
|
19
21
|
|
|
20
22
|
var _noop = _interopRequireDefault(require("@atlaskit/ds-lib/noop"));
|
|
@@ -33,7 +35,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
33
35
|
|
|
34
36
|
/** @jsx jsx */
|
|
35
37
|
var packageName = "@atlaskit/progress-indicator";
|
|
36
|
-
var packageVersion = "9.2.
|
|
38
|
+
var packageVersion = "9.2.8";
|
|
37
39
|
var containerStyles = (0, _core.css)({
|
|
38
40
|
display: 'flex',
|
|
39
41
|
justifyContent: 'center',
|
|
@@ -107,15 +109,17 @@ var ProgressDots = function ProgressDots(_ref) {
|
|
|
107
109
|
}
|
|
108
110
|
}, [onSelectWithAnalytics, selectedIndex, values, onSelect]);
|
|
109
111
|
(0, _react.useEffect)(function () {
|
|
110
|
-
if (onSelect) {
|
|
111
|
-
|
|
112
|
+
if (!onSelect) {
|
|
113
|
+
return _noop.default;
|
|
112
114
|
}
|
|
113
115
|
|
|
114
|
-
return
|
|
115
|
-
|
|
116
|
-
|
|
116
|
+
return (0, _bindEventListener.bind)(document, {
|
|
117
|
+
type: 'keydown',
|
|
118
|
+
listener: handleKeyDown,
|
|
119
|
+
options: {
|
|
120
|
+
capture: false
|
|
117
121
|
}
|
|
118
|
-
};
|
|
122
|
+
});
|
|
119
123
|
}, [onSelect, handleKeyDown]);
|
|
120
124
|
var theme = (0, _components.useGlobalTheme)();
|
|
121
125
|
return (0, _core.jsx)("div", {
|
package/dist/cjs/version.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import React, { useCallback, useEffect, useRef } from 'react';
|
|
3
3
|
import { css, jsx } from '@emotion/core';
|
|
4
|
+
import { bind } from 'bind-event-listener';
|
|
4
5
|
import { usePlatformLeafEventHandler } from '@atlaskit/analytics-next';
|
|
5
6
|
import noop from '@atlaskit/ds-lib/noop';
|
|
6
7
|
import { useGlobalTheme } from '@atlaskit/theme/components';
|
|
@@ -8,7 +9,7 @@ import { getBgColor } from './appearances';
|
|
|
8
9
|
import { sizes, spacingDivision, varDotsMargin, varDotsSize } from './constants';
|
|
9
10
|
import { ButtonIndicator, PresentationalIndicator } from './indicator';
|
|
10
11
|
const packageName = "@atlaskit/progress-indicator";
|
|
11
|
-
const packageVersion = "9.2.
|
|
12
|
+
const packageVersion = "9.2.8";
|
|
12
13
|
const containerStyles = css({
|
|
13
14
|
display: 'flex',
|
|
14
15
|
justifyContent: 'center',
|
|
@@ -78,15 +79,17 @@ const ProgressDots = ({
|
|
|
78
79
|
}
|
|
79
80
|
}, [onSelectWithAnalytics, selectedIndex, values, onSelect]);
|
|
80
81
|
useEffect(() => {
|
|
81
|
-
if (onSelect) {
|
|
82
|
-
|
|
82
|
+
if (!onSelect) {
|
|
83
|
+
return noop;
|
|
83
84
|
}
|
|
84
85
|
|
|
85
|
-
return (
|
|
86
|
-
|
|
87
|
-
|
|
86
|
+
return bind(document, {
|
|
87
|
+
type: 'keydown',
|
|
88
|
+
listener: handleKeyDown,
|
|
89
|
+
options: {
|
|
90
|
+
capture: false
|
|
88
91
|
}
|
|
89
|
-
};
|
|
92
|
+
});
|
|
90
93
|
}, [onSelect, handleKeyDown]);
|
|
91
94
|
const theme = useGlobalTheme();
|
|
92
95
|
return jsx("div", {
|
package/dist/es2019/version.json
CHANGED
|
@@ -3,6 +3,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
3
3
|
/** @jsx jsx */
|
|
4
4
|
import React, { useCallback, useEffect, useRef } from 'react';
|
|
5
5
|
import { css, jsx } from '@emotion/core';
|
|
6
|
+
import { bind } from 'bind-event-listener';
|
|
6
7
|
import { usePlatformLeafEventHandler } from '@atlaskit/analytics-next';
|
|
7
8
|
import noop from '@atlaskit/ds-lib/noop';
|
|
8
9
|
import { useGlobalTheme } from '@atlaskit/theme/components';
|
|
@@ -10,7 +11,7 @@ import { getBgColor } from './appearances';
|
|
|
10
11
|
import { sizes, spacingDivision, varDotsMargin, varDotsSize } from './constants';
|
|
11
12
|
import { ButtonIndicator, PresentationalIndicator } from './indicator';
|
|
12
13
|
var packageName = "@atlaskit/progress-indicator";
|
|
13
|
-
var packageVersion = "9.2.
|
|
14
|
+
var packageVersion = "9.2.8";
|
|
14
15
|
var containerStyles = css({
|
|
15
16
|
display: 'flex',
|
|
16
17
|
justifyContent: 'center',
|
|
@@ -84,15 +85,17 @@ var ProgressDots = function ProgressDots(_ref) {
|
|
|
84
85
|
}
|
|
85
86
|
}, [onSelectWithAnalytics, selectedIndex, values, onSelect]);
|
|
86
87
|
useEffect(function () {
|
|
87
|
-
if (onSelect) {
|
|
88
|
-
|
|
88
|
+
if (!onSelect) {
|
|
89
|
+
return noop;
|
|
89
90
|
}
|
|
90
91
|
|
|
91
|
-
return
|
|
92
|
-
|
|
93
|
-
|
|
92
|
+
return bind(document, {
|
|
93
|
+
type: 'keydown',
|
|
94
|
+
listener: handleKeyDown,
|
|
95
|
+
options: {
|
|
96
|
+
capture: false
|
|
94
97
|
}
|
|
95
|
-
};
|
|
98
|
+
});
|
|
96
99
|
}, [onSelect, handleKeyDown]);
|
|
97
100
|
var theme = useGlobalTheme();
|
|
98
101
|
return jsx("div", {
|
package/dist/esm/version.json
CHANGED
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/progress-indicator",
|
|
3
|
-
"version": "9.2.
|
|
3
|
+
"version": "9.2.8",
|
|
4
4
|
"description": "A progress indicator shows the user where they are along the steps of a journey.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
7
7
|
},
|
|
8
|
-
"repository": "https://bitbucket.org/atlassian/atlassian-frontend",
|
|
8
|
+
"repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
|
|
9
9
|
"author": "Atlassian Pty Ltd",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"main": "dist/cjs/index.js",
|
|
@@ -18,17 +18,19 @@
|
|
|
18
18
|
"team": "Design System Team",
|
|
19
19
|
"releaseModel": "scheduled",
|
|
20
20
|
"website": {
|
|
21
|
-
"name": "Progress indicator"
|
|
21
|
+
"name": "Progress indicator",
|
|
22
|
+
"category": "Components"
|
|
22
23
|
}
|
|
23
24
|
},
|
|
24
25
|
"dependencies": {
|
|
25
26
|
"@atlaskit/analytics-next": "^8.0.0",
|
|
26
|
-
"@atlaskit/ds-lib": "^1.
|
|
27
|
+
"@atlaskit/ds-lib": "^2.1.0",
|
|
27
28
|
"@atlaskit/focus-ring": "^1.0.0",
|
|
28
29
|
"@atlaskit/theme": "^12.1.0",
|
|
29
30
|
"@atlaskit/tokens": "^0.10.0",
|
|
30
31
|
"@babel/runtime": "^7.0.0",
|
|
31
|
-
"@emotion/core": "^10.0.9"
|
|
32
|
+
"@emotion/core": "^10.0.9",
|
|
33
|
+
"bind-event-listener": "^2.1.1"
|
|
32
34
|
},
|
|
33
35
|
"peerDependencies": {
|
|
34
36
|
"react": "^16.8.0"
|
|
@@ -47,13 +49,14 @@
|
|
|
47
49
|
"react-dom": "^16.8.0",
|
|
48
50
|
"react-lorem-component": "^0.13.0",
|
|
49
51
|
"styled-components": "^3.2.6",
|
|
50
|
-
"typescript": "4.
|
|
52
|
+
"typescript": "4.3.5"
|
|
51
53
|
},
|
|
52
54
|
"techstack": {
|
|
53
55
|
"@atlassian/frontend": {
|
|
54
56
|
"import-structure": "atlassian-conventions"
|
|
55
57
|
},
|
|
56
58
|
"@repo/internal": {
|
|
59
|
+
"dom-events": "use-bind-event-listener",
|
|
57
60
|
"ui-components": "lite-mode",
|
|
58
61
|
"design-system": "v1",
|
|
59
62
|
"styling": [
|
package/report.api.md
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
## API Report File for "@atlaskit/progress-indicator"
|
|
2
|
+
|
|
3
|
+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
/// <reference types="react" />
|
|
7
|
+
|
|
8
|
+
import { FC } from 'react';
|
|
9
|
+
import type { UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
10
|
+
|
|
11
|
+
declare type DotsAppearance = 'default' | 'help' | 'inverted' | 'primary';
|
|
12
|
+
|
|
13
|
+
export declare interface ProgressDotsProps {
|
|
14
|
+
/**
|
|
15
|
+
* The color of the indicators
|
|
16
|
+
*/
|
|
17
|
+
appearance?: DotsAppearance;
|
|
18
|
+
/**
|
|
19
|
+
* The aria-controls text applied to each indicator, appended by the index
|
|
20
|
+
*/
|
|
21
|
+
ariaControls?: string;
|
|
22
|
+
/**
|
|
23
|
+
* The aria-label text applied to each indicator, appended by the index
|
|
24
|
+
*/
|
|
25
|
+
ariaLabel?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Function called when an indicator is selected
|
|
28
|
+
*/
|
|
29
|
+
onSelect?: (
|
|
30
|
+
eventData: {
|
|
31
|
+
event: React.MouseEvent<HTMLButtonElement>;
|
|
32
|
+
index: number;
|
|
33
|
+
},
|
|
34
|
+
analyticsEvent: UIAnalyticsEvent,
|
|
35
|
+
) => void;
|
|
36
|
+
/**
|
|
37
|
+
* Which indicator is currently selected
|
|
38
|
+
*/
|
|
39
|
+
selectedIndex: number;
|
|
40
|
+
/**
|
|
41
|
+
* Corresponds to the width & height of each indicator
|
|
42
|
+
*/
|
|
43
|
+
size?: Size;
|
|
44
|
+
/**
|
|
45
|
+
* How much of a gutter is desired between indicators
|
|
46
|
+
*/
|
|
47
|
+
spacing?: Spacing;
|
|
48
|
+
/**
|
|
49
|
+
* A hook for automated tests.
|
|
50
|
+
*/
|
|
51
|
+
testId?: string;
|
|
52
|
+
/**
|
|
53
|
+
* An array of values mapped over to create the indicators
|
|
54
|
+
*/
|
|
55
|
+
values: any[];
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* __ProgressDots__
|
|
60
|
+
*
|
|
61
|
+
* A progress indicator shows the user where they are along the steps of a journey.
|
|
62
|
+
*/
|
|
63
|
+
export declare const ProgressIndicator: FC<ProgressDotsProps>;
|
|
64
|
+
|
|
65
|
+
declare type Size = 'small' | 'default' | 'large';
|
|
66
|
+
|
|
67
|
+
declare type Spacing = 'comfortable' | 'cozy' | 'compact';
|
|
68
|
+
|
|
69
|
+
export {};
|
|
70
|
+
```
|