@atlaskit/onboarding 11.2.7 → 11.3.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,17 @@
1
1
  # @atlaskit/onboarding
2
2
 
3
+ ## 11.3.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#92007](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/92007) [`85525725cb0d`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/85525725cb0d) - Migrated to the new button component
8
+
9
+ ## 11.3.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [#84838](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/84838) [`e3dc0b4099fe`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/e3dc0b4099fe) - [ux] Now the pulsing animations in both the standard Spotlight and the dedicated Pulse component respect `prefers-reduced-motion` user preferences. If a user sets their system preferences to reduce motion, instead of a pulsing animation we will show a static 'discovery' outline.
14
+
3
15
  ## 11.2.7
4
16
 
5
17
  ### Patch Changes
@@ -27,7 +27,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
27
27
  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); }; }
28
28
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
29
29
  var packageName = "@atlaskit/onboarding";
30
- var packageVersion = "11.2.7";
30
+ var packageVersion = "11.3.1";
31
31
  var SpotlightDialog = /*#__PURE__*/function (_Component) {
32
32
  (0, _inherits2.default)(SpotlightDialog, _Component);
33
33
  var _super = _createSuper(SpotlightDialog);
@@ -9,6 +9,7 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
9
9
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
10
10
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
11
11
  var _react = require("@emotion/react");
12
+ var _motion = require("@atlaskit/motion");
12
13
  var _colors = require("@atlaskit/theme/colors");
13
14
  var _constants = require("@atlaskit/theme/constants");
14
15
  var _excluded = ["children", "bgColor", "radius", "style", "testId"],
@@ -32,7 +33,10 @@ var pulseKeyframes = (0, _react.keyframes)({
32
33
  // This is needed for unit tests
33
34
  var pulseKeyframesName = exports.pulseKeyframesName = pulseKeyframes.name;
34
35
  var animationStyles = (0, _react.css)({
35
- animation: "".concat(pulseKeyframes, " 3000ms ").concat(easing, " infinite")
36
+ animation: "".concat(pulseKeyframes, " 3000ms ").concat(easing, " infinite"),
37
+ // Keep a purple boxshadow on the Pulse component if `prefers-reduced-motion`
38
+ // is applied so we still have a functioning semantic affordance.
39
+ boxShadow: baseShadow
36
40
  });
37
41
 
38
42
  // IE11 and Edge: z-index needed because fixed position calculates z-index relative
@@ -69,21 +73,21 @@ var TargetInner = exports.TargetInner = function TargetInner(_ref2) {
69
73
  var children = _ref2.children,
70
74
  pulse = _ref2.pulse,
71
75
  props = (0, _objectWithoutProperties2.default)(_ref2, _excluded2);
72
- return (
73
- // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
74
- (0, _react.jsx)(Base, (0, _extends2.default)({}, props, {
75
- css: [pulse && animationStyles]
76
- }), children)
77
- );
76
+ return (0, _react.jsx)(Base
77
+ // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
78
+ , (0, _extends2.default)({}, props, {
79
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
80
+ css: [pulse && animationStyles, _motion.reduceMotionAsPerUserPreference]
81
+ }), children);
78
82
  };
79
83
  var targetOverlayStyles = (0, _react.css)({
80
84
  width: '100%',
81
85
  height: '100%',
82
86
  position: 'absolute',
83
87
  // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
84
- top: 0,
88
+ insetBlockStart: 0,
85
89
  // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
86
- left: 0
90
+ insetInlineStart: 0
87
91
  });
88
92
 
89
93
  /**
@@ -118,11 +122,12 @@ var Pulse = exports.Pulse = function Pulse(_ref3) {
118
122
  pulse = _ref3$pulse === void 0 ? true : _ref3$pulse,
119
123
  testId = _ref3.testId,
120
124
  props = (0, _objectWithoutProperties2.default)(_ref3, _excluded3);
121
- return (
122
- // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
123
- (0, _react.jsx)(Base, (0, _extends2.default)({}, props, {
124
- css: [pulse && animationStyles],
125
- testId: testId
126
- }), children)
127
- );
125
+ return (0, _react.jsx)(Base
126
+ // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
127
+ , (0, _extends2.default)({}, props, {
128
+ css: [pulse && animationStyles,
129
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
130
+ _motion.reduceMotionAsPerUserPreference],
131
+ testId: testId
132
+ }), children);
128
133
  };
@@ -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 = "11.2.7";
10
+ const packageVersion = "11.3.1";
11
11
  class SpotlightDialog extends Component {
12
12
  constructor(...args) {
13
13
  super(...args);
@@ -2,6 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
2
2
  /** @jsx jsx */
3
3
 
4
4
  import { css, jsx, keyframes } from '@emotion/react';
5
+ import { reduceMotionAsPerUserPreference } from '@atlaskit/motion';
5
6
  import { P300 } from '@atlaskit/theme/colors';
6
7
  import { layers } from '@atlaskit/theme/constants';
7
8
  // NOTE:
@@ -19,7 +20,10 @@ const pulseKeyframes = keyframes({
19
20
  // This is needed for unit tests
20
21
  export const pulseKeyframesName = pulseKeyframes.name;
21
22
  const animationStyles = css({
22
- animation: `${pulseKeyframes} 3000ms ${easing} infinite`
23
+ animation: `${pulseKeyframes} 3000ms ${easing} infinite`,
24
+ // Keep a purple boxshadow on the Pulse component if `prefers-reduced-motion`
25
+ // is applied so we still have a functioning semantic affordance.
26
+ boxShadow: baseShadow
23
27
  });
24
28
 
25
29
  // IE11 and Edge: z-index needed because fixed position calculates z-index relative
@@ -56,19 +60,20 @@ export const TargetInner = ({
56
60
  children,
57
61
  pulse,
58
62
  ...props
59
- }) =>
63
+ }) => jsx(Base
60
64
  // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
61
- jsx(Base, _extends({}, props, {
62
- css: [pulse && animationStyles]
65
+ , _extends({}, props, {
66
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
67
+ css: [pulse && animationStyles, reduceMotionAsPerUserPreference]
63
68
  }), children);
64
69
  const targetOverlayStyles = css({
65
70
  width: '100%',
66
71
  height: '100%',
67
72
  position: 'absolute',
68
73
  // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
69
- top: 0,
74
+ insetBlockStart: 0,
70
75
  // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
71
- left: 0
76
+ insetInlineStart: 0
72
77
  });
73
78
 
74
79
  /**
@@ -100,9 +105,11 @@ export const Pulse = ({
100
105
  pulse = true,
101
106
  testId,
102
107
  ...props
103
- }) =>
108
+ }) => jsx(Base
104
109
  // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
105
- jsx(Base, _extends({}, props, {
106
- css: [pulse && animationStyles],
110
+ , _extends({}, props, {
111
+ css: [pulse && animationStyles,
112
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
113
+ reduceMotionAsPerUserPreference],
107
114
  testId: testId
108
115
  }), children);
@@ -17,7 +17,7 @@ import { DialogImage } from '../styled/dialog';
17
17
  import SpotlightCard from './spotlight-card';
18
18
  import ValueChanged from './value-changed';
19
19
  var packageName = "@atlaskit/onboarding";
20
- var packageVersion = "11.2.7";
20
+ var packageVersion = "11.3.1";
21
21
  var SpotlightDialog = /*#__PURE__*/function (_Component) {
22
22
  _inherits(SpotlightDialog, _Component);
23
23
  var _super = _createSuper(SpotlightDialog);
@@ -9,6 +9,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
9
9
  /** @jsx jsx */
10
10
 
11
11
  import { css, jsx, keyframes } from '@emotion/react';
12
+ import { reduceMotionAsPerUserPreference } from '@atlaskit/motion';
12
13
  import { P300 } from '@atlaskit/theme/colors';
13
14
  import { layers } from '@atlaskit/theme/constants';
14
15
  // NOTE:
@@ -26,7 +27,10 @@ var pulseKeyframes = keyframes({
26
27
  // This is needed for unit tests
27
28
  export var pulseKeyframesName = pulseKeyframes.name;
28
29
  var animationStyles = css({
29
- animation: "".concat(pulseKeyframes, " 3000ms ").concat(easing, " infinite")
30
+ animation: "".concat(pulseKeyframes, " 3000ms ").concat(easing, " infinite"),
31
+ // Keep a purple boxshadow on the Pulse component if `prefers-reduced-motion`
32
+ // is applied so we still have a functioning semantic affordance.
33
+ boxShadow: baseShadow
30
34
  });
31
35
 
32
36
  // IE11 and Edge: z-index needed because fixed position calculates z-index relative
@@ -63,21 +67,21 @@ export var TargetInner = function TargetInner(_ref2) {
63
67
  var children = _ref2.children,
64
68
  pulse = _ref2.pulse,
65
69
  props = _objectWithoutProperties(_ref2, _excluded2);
66
- return (
67
- // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
68
- jsx(Base, _extends({}, props, {
69
- css: [pulse && animationStyles]
70
- }), children)
71
- );
70
+ return jsx(Base
71
+ // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
72
+ , _extends({}, props, {
73
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
74
+ css: [pulse && animationStyles, reduceMotionAsPerUserPreference]
75
+ }), children);
72
76
  };
73
77
  var targetOverlayStyles = css({
74
78
  width: '100%',
75
79
  height: '100%',
76
80
  position: 'absolute',
77
81
  // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
78
- top: 0,
82
+ insetBlockStart: 0,
79
83
  // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
80
- left: 0
84
+ insetInlineStart: 0
81
85
  });
82
86
 
83
87
  /**
@@ -112,11 +116,12 @@ export var Pulse = function Pulse(_ref3) {
112
116
  pulse = _ref3$pulse === void 0 ? true : _ref3$pulse,
113
117
  testId = _ref3.testId,
114
118
  props = _objectWithoutProperties(_ref3, _excluded3);
115
- return (
116
- // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
117
- jsx(Base, _extends({}, props, {
118
- css: [pulse && animationStyles],
119
- testId: testId
120
- }), children)
121
- );
119
+ return jsx(Base
120
+ // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
121
+ , _extends({}, props, {
122
+ css: [pulse && animationStyles,
123
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
124
+ reduceMotionAsPerUserPreference],
125
+ testId: testId
126
+ }), children);
122
127
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/onboarding",
3
- "version": "11.2.7",
3
+ "version": "11.3.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/"
@@ -39,15 +39,16 @@
39
39
  }
40
40
  },
41
41
  "dependencies": {
42
- "@atlaskit/analytics-next": "^9.2.0",
43
- "@atlaskit/button": "^17.8.0",
44
- "@atlaskit/ds-lib": "^2.2.0",
45
- "@atlaskit/heading": "^2.1.0",
46
- "@atlaskit/modal-dialog": "^12.10.0",
42
+ "@atlaskit/analytics-next": "^9.3.0",
43
+ "@atlaskit/button": "^17.14.0",
44
+ "@atlaskit/ds-lib": "^2.3.0",
45
+ "@atlaskit/heading": "^2.2.0",
46
+ "@atlaskit/modal-dialog": "^12.11.0",
47
+ "@atlaskit/motion": "^1.5.0",
47
48
  "@atlaskit/popper": "^5.5.0",
48
49
  "@atlaskit/portal": "^4.4.0",
49
50
  "@atlaskit/theme": "^12.7.0",
50
- "@atlaskit/tokens": "^1.42.0",
51
+ "@atlaskit/tokens": "^1.43.0",
51
52
  "@babel/runtime": "^7.0.0",
52
53
  "@emotion/react": "^11.7.1",
53
54
  "bind-event-listener": "^2.1.1",