@atlaskit/onboarding 10.3.10 → 10.4.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # @atlaskit/onboarding
2
2
 
3
+ ## 10.4.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`e4b612d1c48`](https://bitbucket.org/atlassian/atlassian-frontend/commits/e4b612d1c48) - Internal migration to bind-event-listener for safer DOM Event cleanup
8
+
9
+ ## 10.4.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [`3124aa6ae24`](https://bitbucket.org/atlassian/atlassian-frontend/commits/3124aa6ae24) - The onboarding package now exports a `ModalTransition` component for use with the benefits modal. This resolves an issue that can occur when using `ModalTransition` from a different version of `@atlaskit/modal-dialog` than the one that Onboarding is bringing in.
14
+
15
+ ### Patch Changes
16
+
17
+ - [`e7ad64befa5`](https://bitbucket.org/atlassian/atlassian-frontend/commits/e7ad64befa5) - [ux] Updated input tokens within `@atlaskit/onboarding`.
18
+
19
+ ## 10.3.11
20
+
21
+ ### Patch Changes
22
+
23
+ - [`efa50ac72ba`](https://bitbucket.org/atlassian/atlassian-frontend/commits/efa50ac72ba) - Adjusts jsdoc strings to improve prop documentation
24
+
3
25
  ## 10.3.10
4
26
 
5
27
  ### Patch Changes
@@ -54,7 +54,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
54
54
  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; } }
55
55
 
56
56
  var packageName = "@atlaskit/onboarding";
57
- var packageVersion = "10.3.10";
57
+ var packageVersion = "10.4.1";
58
58
 
59
59
  var SpotlightDialog = /*#__PURE__*/function (_Component) {
60
60
  (0, _inherits2.default)(SpotlightDialog, _Component);
@@ -31,12 +31,12 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
31
31
  var spotlightTheme = {
32
32
  default: {
33
33
  background: {
34
- default: "var(--ds-background-neutral, ".concat(colors.P400, ")"),
35
- hover: "var(--ds-background-neutral-hovered, ".concat(colors.P200, ")"),
36
- active: "var(--ds-background-neutral-pressed, ".concat(colors.P500, ")"),
34
+ default: "var(--ds-background-inverse-subtle, ".concat(colors.P400, ")"),
35
+ hover: "var(--ds-background-inverse-subtle-hovered, ".concat(colors.P200, ")"),
36
+ active: "var(--ds-background-inverse-subtle-pressed, ".concat(colors.P500, ")"),
37
37
  disabled: "var(--ds-background-disabled, ".concat(colors.P400, ")"),
38
- selected: "var(--ds-background-neutral-pressed, ".concat(colors.R500, ")"),
39
- focus: "var(--ds-background-neutral, ".concat(colors.P400, ")")
38
+ selected: "var(--ds-background-inverse-subtle-pressed, ".concat(colors.R500, ")"),
39
+ focus: "var(--ds-background-inverse-subtle, ".concat(colors.P400, ")")
40
40
  },
41
41
  boxShadow: {
42
42
  focus: "0 0 0 2px ".concat("var(--ds-border-discovery, ".concat(colors.P100, ")"))
package/dist/cjs/index.js CHANGED
@@ -1,5 +1,7 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
3
5
  Object.defineProperty(exports, "__esModule", {
4
6
  value: true
5
7
  });
@@ -9,6 +11,12 @@ Object.defineProperty(exports, "Modal", {
9
11
  return _components.Modal;
10
12
  }
11
13
  });
14
+ Object.defineProperty(exports, "ModalTransition", {
15
+ enumerable: true,
16
+ get: function get() {
17
+ return _modalTransition.default;
18
+ }
19
+ });
12
20
  Object.defineProperty(exports, "Spotlight", {
13
21
  enumerable: true,
14
22
  get: function get() {
@@ -64,6 +72,8 @@ Object.defineProperty(exports, "useSpotlight", {
64
72
  }
65
73
  });
66
74
 
75
+ var _modalTransition = _interopRequireDefault(require("@atlaskit/modal-dialog/modal-transition"));
76
+
67
77
  var _components = require("./components");
68
78
 
69
79
  var _target = require("./styled/target");
@@ -33,7 +33,7 @@ var baseShadow = "0 0 0 2px ".concat("var(--ds-border-discovery, ".concat(_color
33
33
  var easing = 'cubic-bezier(0.55, 0.055, 0.675, 0.19)';
34
34
  var pulseKeyframes = (0, _core.keyframes)({
35
35
  '0%, 33%': {
36
- boxShadow: "".concat(baseShadow, ", 0 0 0 ").concat("var(--ds-border-discovery, rgba(101, 84, 192, 1))")
36
+ boxShadow: "".concat(baseShadow, ", 0 0 0 ", "var(--ds-border-discovery, rgba(101, 84, 192, 1))")
37
37
  },
38
38
  '66%, 100%': {
39
39
  boxShadow: "".concat(baseShadow, ", 0 0 0 10px rgba(101, 84, 192, 0.01)")
@@ -11,6 +11,8 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
11
11
 
12
12
  var _react = require("react");
13
13
 
14
+ var _bindEventListener = require("bind-event-listener");
15
+
14
16
  var getElementRect = function getElementRect(element) {
15
17
  var _element$getBoundingC = element.getBoundingClientRect(),
16
18
  height = _element$getBoundingC.height,
@@ -53,10 +55,10 @@ var useElementBox = function useElementBox(element) {
53
55
  });
54
56
  };
55
57
 
56
- window.addEventListener('resize', onResize);
57
- return function () {
58
- window.removeEventListener('resize', onResize);
59
- };
58
+ return (0, _bindEventListener.bind)(window, {
59
+ type: 'resize',
60
+ listener: onResize
61
+ });
60
62
  }, [element]);
61
63
  return box;
62
64
  };
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/onboarding",
3
- "version": "10.3.10",
3
+ "version": "10.4.1",
4
4
  "sideEffects": false
5
5
  }
@@ -7,7 +7,7 @@ import { DialogImage } from '../styled/dialog';
7
7
  import SpotlightCard from './spotlight-card';
8
8
  import ValueChanged from './value-changed';
9
9
  const packageName = "@atlaskit/onboarding";
10
- const packageVersion = "10.3.10";
10
+ const packageVersion = "10.4.1";
11
11
 
12
12
  class SpotlightDialog extends Component {
13
13
  constructor(...args) {
@@ -2,12 +2,12 @@ import * as colors from '@atlaskit/theme/colors';
2
2
  const spotlightTheme = {
3
3
  default: {
4
4
  background: {
5
- default: `var(--ds-background-neutral, ${colors.P400})`,
6
- hover: `var(--ds-background-neutral-hovered, ${colors.P200})`,
7
- active: `var(--ds-background-neutral-pressed, ${colors.P500})`,
5
+ default: `var(--ds-background-inverse-subtle, ${colors.P400})`,
6
+ hover: `var(--ds-background-inverse-subtle-hovered, ${colors.P200})`,
7
+ active: `var(--ds-background-inverse-subtle-pressed, ${colors.P500})`,
8
8
  disabled: `var(--ds-background-disabled, ${colors.P400})`,
9
- selected: `var(--ds-background-neutral-pressed, ${colors.R500})`,
10
- focus: `var(--ds-background-neutral, ${colors.P400})`
9
+ selected: `var(--ds-background-inverse-subtle-pressed, ${colors.R500})`,
10
+ focus: `var(--ds-background-inverse-subtle, ${colors.P400})`
11
11
  },
12
12
  boxShadow: {
13
13
  focus: `0 0 0 2px ${`var(--ds-border-discovery, ${colors.P100})`}`
@@ -1,2 +1,14 @@
1
+ /**
2
+ * We re-export this because products may have multiple versions of
3
+ * `@atlaskit/modal-dialog`.
4
+ *
5
+ * If a consumer uses the onboarding `Modal` with the `ModalTransition` from an
6
+ * incompatible version of `@atlaskit/modal-dialog`, then the modal can get
7
+ * stuck in an open state.
8
+ *
9
+ * See https://product-fabric.atlassian.net/browse/DSP-796 for more details
10
+ * and a reproduction.
11
+ */
12
+ export { default as ModalTransition } from '@atlaskit/modal-dialog/modal-transition';
1
13
  export { Modal, Spotlight, SpotlightCard, SpotlightManager, SpotlightTarget, SpotlightTransition, modalButtonTheme, spotlightButtonTheme, useSpotlight } from './components';
2
14
  export { Pulse as SpotlightPulse } from './styled/target';
@@ -1,4 +1,5 @@
1
1
  import { useEffect, useLayoutEffect, useState } from 'react';
2
+ import { bind } from 'bind-event-listener';
2
3
 
3
4
  const getElementRect = element => {
4
5
  const {
@@ -38,10 +39,10 @@ export const useElementBox = element => {
38
39
  });
39
40
  };
40
41
 
41
- window.addEventListener('resize', onResize);
42
- return () => {
43
- window.removeEventListener('resize', onResize);
44
- };
42
+ return bind(window, {
43
+ type: 'resize',
44
+ listener: onResize
45
+ });
45
46
  }, [element]);
46
47
  return box;
47
48
  };
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/onboarding",
3
- "version": "10.3.10",
3
+ "version": "10.4.1",
4
4
  "sideEffects": false
5
5
  }
@@ -24,7 +24,7 @@ import { DialogImage } from '../styled/dialog';
24
24
  import SpotlightCard from './spotlight-card';
25
25
  import ValueChanged from './value-changed';
26
26
  var packageName = "@atlaskit/onboarding";
27
- var packageVersion = "10.3.10";
27
+ var packageVersion = "10.4.1";
28
28
 
29
29
  var SpotlightDialog = /*#__PURE__*/function (_Component) {
30
30
  _inherits(SpotlightDialog, _Component);
@@ -12,12 +12,12 @@ import * as colors from '@atlaskit/theme/colors';
12
12
  var spotlightTheme = {
13
13
  default: {
14
14
  background: {
15
- default: "var(--ds-background-neutral, ".concat(colors.P400, ")"),
16
- hover: "var(--ds-background-neutral-hovered, ".concat(colors.P200, ")"),
17
- active: "var(--ds-background-neutral-pressed, ".concat(colors.P500, ")"),
15
+ default: "var(--ds-background-inverse-subtle, ".concat(colors.P400, ")"),
16
+ hover: "var(--ds-background-inverse-subtle-hovered, ".concat(colors.P200, ")"),
17
+ active: "var(--ds-background-inverse-subtle-pressed, ".concat(colors.P500, ")"),
18
18
  disabled: "var(--ds-background-disabled, ".concat(colors.P400, ")"),
19
- selected: "var(--ds-background-neutral-pressed, ".concat(colors.R500, ")"),
20
- focus: "var(--ds-background-neutral, ".concat(colors.P400, ")")
19
+ selected: "var(--ds-background-inverse-subtle-pressed, ".concat(colors.R500, ")"),
20
+ focus: "var(--ds-background-inverse-subtle, ".concat(colors.P400, ")")
21
21
  },
22
22
  boxShadow: {
23
23
  focus: "0 0 0 2px ".concat("var(--ds-border-discovery, ".concat(colors.P100, ")"))
package/dist/esm/index.js CHANGED
@@ -1,2 +1,14 @@
1
+ /**
2
+ * We re-export this because products may have multiple versions of
3
+ * `@atlaskit/modal-dialog`.
4
+ *
5
+ * If a consumer uses the onboarding `Modal` with the `ModalTransition` from an
6
+ * incompatible version of `@atlaskit/modal-dialog`, then the modal can get
7
+ * stuck in an open state.
8
+ *
9
+ * See https://product-fabric.atlassian.net/browse/DSP-796 for more details
10
+ * and a reproduction.
11
+ */
12
+ export { default as ModalTransition } from '@atlaskit/modal-dialog/modal-transition';
1
13
  export { Modal, Spotlight, SpotlightCard, SpotlightManager, SpotlightTarget, SpotlightTransition, modalButtonTheme, spotlightButtonTheme, useSpotlight } from './components';
2
14
  export { Pulse as SpotlightPulse } from './styled/target';
@@ -19,7 +19,7 @@ var baseShadow = "0 0 0 2px ".concat("var(--ds-border-discovery, ".concat(P300,
19
19
  var easing = 'cubic-bezier(0.55, 0.055, 0.675, 0.19)';
20
20
  var pulseKeyframes = keyframes({
21
21
  '0%, 33%': {
22
- boxShadow: "".concat(baseShadow, ", 0 0 0 ").concat("var(--ds-border-discovery, rgba(101, 84, 192, 1))")
22
+ boxShadow: "".concat(baseShadow, ", 0 0 0 ", "var(--ds-border-discovery, rgba(101, 84, 192, 1))")
23
23
  },
24
24
  '66%, 100%': {
25
25
  boxShadow: "".concat(baseShadow, ", 0 0 0 10px rgba(101, 84, 192, 0.01)")
@@ -1,5 +1,6 @@
1
1
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
2
  import { useEffect, useLayoutEffect, useState } from 'react';
3
+ import { bind } from 'bind-event-listener';
3
4
 
4
5
  var getElementRect = function getElementRect(element) {
5
6
  var _element$getBoundingC = element.getBoundingClientRect(),
@@ -43,10 +44,10 @@ export var useElementBox = function useElementBox(element) {
43
44
  });
44
45
  };
45
46
 
46
- window.addEventListener('resize', onResize);
47
- return function () {
48
- window.removeEventListener('resize', onResize);
49
- };
47
+ return bind(window, {
48
+ type: 'resize',
49
+ listener: onResize
50
+ });
50
51
  }, [element]);
51
52
  return box;
52
53
  };
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/onboarding",
3
- "version": "10.3.10",
3
+ "version": "10.4.1",
4
4
  "sideEffects": false
5
5
  }
@@ -73,13 +73,13 @@ export interface SpotlightProps {
73
73
  */
74
74
  targetReplacement?: ComponentType<any>;
75
75
  /**
76
- * This prop is a unique string that appears as an attribute `data-testid` in the rendered HTML output serving as a hook for automated tests.
77
- * As this component is composed of multiple components we use this `testId` as a prefix:
78
- *
79
- * - `"${testId}--dialog"` to identify the spotlight dialog
80
- * - `"${testId}--target"` to identify the spotlight target clone
81
- *
82
- * Defaults to `"spotlight"`.
76
+ This prop is a unique string that appears as an attribute `data-testid` in the rendered HTML output serving as a hook for automated tests.
77
+ As this component is composed of multiple components we use this `testId` as a prefix:
78
+
79
+ - `"${testId}--dialog"` to identify the spotlight dialog
80
+ - `"${testId}--target"` to identify the spotlight target clone
81
+
82
+ Defaults to `"spotlight"`.
83
83
  */
84
84
  testId?: string;
85
85
  }
@@ -1,2 +1,14 @@
1
+ /**
2
+ * We re-export this because products may have multiple versions of
3
+ * `@atlaskit/modal-dialog`.
4
+ *
5
+ * If a consumer uses the onboarding `Modal` with the `ModalTransition` from an
6
+ * incompatible version of `@atlaskit/modal-dialog`, then the modal can get
7
+ * stuck in an open state.
8
+ *
9
+ * See https://product-fabric.atlassian.net/browse/DSP-796 for more details
10
+ * and a reproduction.
11
+ */
12
+ export { default as ModalTransition } from '@atlaskit/modal-dialog/modal-transition';
1
13
  export { Modal, Spotlight, SpotlightCard, SpotlightManager, SpotlightTarget, SpotlightTransition, modalButtonTheme, spotlightButtonTheme, useSpotlight, } from './components';
2
14
  export { Pulse as SpotlightPulse } from './styled/target';
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@atlaskit/onboarding",
3
- "version": "10.3.10",
3
+ "version": "10.4.1",
4
4
  "description": "An onboarding spotlight introduces new features to users through focused messages or multi-step tours.",
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",
@@ -20,7 +20,8 @@
20
20
  "deprecatedAutoEntryPoints": true,
21
21
  "releaseModel": "scheduled",
22
22
  "website": {
23
- "name": "Onboarding (spotlight)"
23
+ "name": "Onboarding (spotlight)",
24
+ "category": "Components"
24
25
  }
25
26
  },
26
27
  "dependencies": {
@@ -33,6 +34,7 @@
33
34
  "@atlaskit/tokens": "^0.10.0",
34
35
  "@babel/runtime": "^7.0.0",
35
36
  "@emotion/core": "^10.0.9",
37
+ "bind-event-listener": "^2.1.0",
36
38
  "exenv": "^1.2.2",
37
39
  "memoize-one": "^6.0.0",
38
40
  "react-focus-lock": "^2.5.2",
@@ -46,11 +48,11 @@
46
48
  "react-dom": "^16.8.0"
47
49
  },
48
50
  "devDependencies": {
49
- "@atlaskit/avatar": "^20.5.0",
51
+ "@atlaskit/avatar": "^21.0.0",
50
52
  "@atlaskit/docs": "*",
51
53
  "@atlaskit/icon": "^21.10.0",
52
54
  "@atlaskit/progress-indicator": "^9.2.0",
53
- "@atlaskit/select": "^15.2.2",
55
+ "@atlaskit/select": "^15.3.0",
54
56
  "@atlaskit/ssr": "*",
55
57
  "@atlaskit/visual-regression": "*",
56
58
  "@atlaskit/webdriver-runner": "*",
@@ -67,6 +69,7 @@
67
69
  "import-structure": "atlassian-conventions"
68
70
  },
69
71
  "@repo/internal": {
72
+ "dom-events": "use-bind-event-listener",
70
73
  "analytics": "analytics-next",
71
74
  "theming": "tokens",
72
75
  "styling": [