@atlaskit/progress-indicator 9.2.4 → 9.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # @atlaskit/progress-indicator
2
2
 
3
+ ## 9.2.7
4
+
5
+ ### Patch Changes
6
+
7
+ - [`8a5bdb3c844`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8a5bdb3c844) - Upgrading internal dependency (bind-event-listener) for improved internal types
8
+
9
+ ## 9.2.6
10
+
11
+ ### Patch Changes
12
+
13
+ - [`e4b612d1c48`](https://bitbucket.org/atlassian/atlassian-frontend/commits/e4b612d1c48) - Internal migration to bind-event-listener for safer DOM Event cleanup
14
+ - Updated dependencies
15
+
16
+ ## 9.2.5
17
+
18
+ ### Patch Changes
19
+
20
+ - Updated dependencies
21
+
3
22
  ## 9.2.4
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.4";
38
+ var packageVersion = "9.2.7";
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
- document.addEventListener('keydown', handleKeyDown, false);
112
+ if (!onSelect) {
113
+ return _noop.default;
112
114
  }
113
115
 
114
- return function () {
115
- if (onSelect) {
116
- document.removeEventListener('keydown', handleKeyDown);
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", {
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/progress-indicator",
3
- "version": "9.2.4",
3
+ "version": "9.2.7",
4
4
  "sideEffects": false
5
5
  }
@@ -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.4";
12
+ const packageVersion = "9.2.7";
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
- document.addEventListener('keydown', handleKeyDown, false);
82
+ if (!onSelect) {
83
+ return noop;
83
84
  }
84
85
 
85
- return () => {
86
- if (onSelect) {
87
- document.removeEventListener('keydown', handleKeyDown);
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", {
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/progress-indicator",
3
- "version": "9.2.4",
3
+ "version": "9.2.7",
4
4
  "sideEffects": false
5
5
  }
@@ -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.4";
14
+ var packageVersion = "9.2.7";
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
- document.addEventListener('keydown', handleKeyDown, false);
88
+ if (!onSelect) {
89
+ return noop;
89
90
  }
90
91
 
91
- return function () {
92
- if (onSelect) {
93
- document.removeEventListener('keydown', handleKeyDown);
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", {
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/progress-indicator",
3
- "version": "9.2.4",
3
+ "version": "9.2.7",
4
4
  "sideEffects": false
5
5
  }
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@atlaskit/progress-indicator",
3
- "version": "9.2.4",
3
+ "version": "9.2.7",
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.4.0",
27
+ "@atlaskit/ds-lib": "^2.0.0",
27
28
  "@atlaskit/focus-ring": "^1.0.0",
28
29
  "@atlaskit/theme": "^12.1.0",
29
- "@atlaskit/tokens": "^0.9.0",
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"
@@ -54,6 +56,7 @@
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": [
@@ -3,5 +3,6 @@
3
3
  "main": "../dist/cjs/types.js",
4
4
  "module": "../dist/esm/types.js",
5
5
  "module:es2019": "../dist/es2019/types.js",
6
+ "sideEffects": false,
6
7
  "types": "../dist/types/types.d.ts"
7
8
  }