@atlaskit/onboarding 10.6.7 → 10.6.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.
Files changed (61) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/cjs/components/animation.js +2 -13
  3. package/dist/cjs/components/clone.js +10 -16
  4. package/dist/cjs/components/index.js +0 -9
  5. package/dist/cjs/components/modal.js +11 -45
  6. package/dist/cjs/components/spotlight-card.js +26 -46
  7. package/dist/cjs/components/spotlight-dialog.js +19 -52
  8. package/dist/cjs/components/spotlight-inner.js +9 -44
  9. package/dist/cjs/components/spotlight-manager.js +8 -41
  10. package/dist/cjs/components/spotlight-target.js +1 -7
  11. package/dist/cjs/components/spotlight-transition.js +3 -27
  12. package/dist/cjs/components/spotlight.js +10 -19
  13. package/dist/cjs/components/theme.js +9 -32
  14. package/dist/cjs/components/use-spotlight.js +1 -5
  15. package/dist/cjs/components/value-changed.js +0 -14
  16. package/dist/cjs/index.js +0 -4
  17. package/dist/cjs/styled/blanket.js +3 -13
  18. package/dist/cjs/styled/dialog.js +6 -17
  19. package/dist/cjs/styled/modal.js +19 -33
  20. package/dist/cjs/styled/target.js +27 -41
  21. package/dist/cjs/utils/use-element-box.js +14 -26
  22. package/dist/cjs/version.json +1 -1
  23. package/dist/es2019/components/animation.js +2 -2
  24. package/dist/es2019/components/clone.js +3 -6
  25. package/dist/es2019/components/modal.js +3 -10
  26. package/dist/es2019/components/spotlight-card.js +7 -11
  27. package/dist/es2019/components/spotlight-dialog.js +6 -11
  28. package/dist/es2019/components/spotlight-inner.js +2 -12
  29. package/dist/es2019/components/spotlight-manager.js +3 -13
  30. package/dist/es2019/components/spotlight-target.js +0 -2
  31. package/dist/es2019/components/spotlight-transition.js +4 -10
  32. package/dist/es2019/components/spotlight.js +0 -2
  33. package/dist/es2019/components/theme.js +6 -9
  34. package/dist/es2019/components/use-spotlight.js +1 -1
  35. package/dist/es2019/components/value-changed.js +0 -2
  36. package/dist/es2019/styled/blanket.js +5 -5
  37. package/dist/es2019/styled/dialog.js +5 -7
  38. package/dist/es2019/styled/modal.js +15 -14
  39. package/dist/es2019/styled/target.js +16 -15
  40. package/dist/es2019/utils/use-element-box.js +2 -5
  41. package/dist/es2019/version.json +1 -1
  42. package/dist/esm/components/animation.js +2 -8
  43. package/dist/esm/components/clone.js +10 -13
  44. package/dist/esm/components/modal.js +13 -32
  45. package/dist/esm/components/spotlight-card.js +26 -32
  46. package/dist/esm/components/spotlight-dialog.js +19 -35
  47. package/dist/esm/components/spotlight-inner.js +9 -29
  48. package/dist/esm/components/spotlight-manager.js +8 -32
  49. package/dist/esm/components/spotlight-target.js +1 -3
  50. package/dist/esm/components/spotlight-transition.js +3 -18
  51. package/dist/esm/components/spotlight.js +10 -13
  52. package/dist/esm/components/theme.js +9 -20
  53. package/dist/esm/components/use-spotlight.js +2 -3
  54. package/dist/esm/components/value-changed.js +0 -10
  55. package/dist/esm/styled/blanket.js +3 -7
  56. package/dist/esm/styled/dialog.js +6 -9
  57. package/dist/esm/styled/modal.js +18 -19
  58. package/dist/esm/styled/target.js +27 -32
  59. package/dist/esm/utils/use-element-box.js +14 -19
  60. package/dist/esm/version.json +1 -1
  61. package/package.json +1 -1
@@ -1,32 +1,24 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.default = void 0;
9
-
10
8
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
11
-
12
9
  var _react = require("@emotion/react");
13
-
14
10
  var _colors = require("@atlaskit/theme/colors");
15
-
16
11
  var _components = require("@atlaskit/theme/components");
17
-
18
12
  var _constants = require("@atlaskit/theme/constants");
19
-
20
13
  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; }
21
-
22
14
  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
-
24
15
  var backgroundColor = (0, _components.themed)({
25
16
  light: "var(--ds-blanket, ".concat(_colors.N100A, ")"),
26
17
  dark: "var(--ds-blanket, ".concat(_colors.DN90A, ")")
27
- }); // IE11 and Edge: z-index needed because fixed position calculates z-index relative
28
- // to body instead of nearest stacking context (Portal in our case).
18
+ });
29
19
 
20
+ // IE11 and Edge: z-index needed because fixed position calculates z-index relative
21
+ // to body instead of nearest stacking context (Portal in our case).
30
22
  var blanketStyles = (0, _react.css)({
31
23
  position: 'fixed',
32
24
  zIndex: _constants.layers.spotlight(),
@@ -36,7 +28,6 @@ var blanketStyles = (0, _react.css)({
36
28
  left: 0,
37
29
  transition: 'opacity 220ms'
38
30
  });
39
-
40
31
  /**
41
32
  * __Blanket__
42
33
  *
@@ -59,6 +50,5 @@ var Blanket = function Blanket(props) {
59
50
  })
60
51
  });
61
52
  };
62
-
63
53
  var _default = Blanket;
64
54
  exports.default = _default;
@@ -1,18 +1,13 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.DialogImage = exports.DialogActionItemContainer = exports.DialogActionItem = void 0;
9
-
10
8
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
11
-
12
9
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
13
-
14
10
  var _react = require("@emotion/react");
15
-
16
11
  var _excluded = ["alt"];
17
12
  var imageStyles = (0, _react.css)({
18
13
  maxWidth: '100%',
@@ -20,15 +15,15 @@ var imageStyles = (0, _react.css)({
20
15
  });
21
16
  var actionItemContainerStyles = (0, _react.css)({
22
17
  display: 'flex',
23
- margin: "var(--ds-scale-0, 0px)".concat(" -4px"),
24
-
18
+ margin: "var(--ds-space-0, 0px)".concat(" -4px"),
25
19
  /* When there is more than one action, place primary action visually on the
26
20
  right, but keep it's position as the first focusable element in the DOM */
27
21
  flexDirection: 'row-reverse'
28
22
  });
29
23
  var actionItemStyles = (0, _react.css)({
30
- margin: "var(--ds-scale-0, 0px)".concat(" ", "var(--ds-scale-050, 4px)")
24
+ margin: "var(--ds-space-0, 0px)".concat(" ", "var(--ds-space-050, 4px)")
31
25
  });
26
+
32
27
  /**
33
28
  * __Dialog image__
34
29
  *
@@ -36,15 +31,15 @@ var actionItemStyles = (0, _react.css)({
36
31
  *
37
32
  * @internal
38
33
  */
39
-
40
34
  var DialogImage = function DialogImage(_ref) {
41
35
  var alt = _ref.alt,
42
- props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
36
+ props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
43
37
  return (0, _react.jsx)("img", (0, _extends2.default)({
44
38
  css: imageStyles,
45
39
  alt: alt
46
40
  }, props));
47
41
  };
42
+
48
43
  /**
49
44
  * __Dialog action item container__
50
45
  *
@@ -52,16 +47,14 @@ var DialogImage = function DialogImage(_ref) {
52
47
  *
53
48
  * @internal
54
49
  */
55
-
56
-
57
50
  exports.DialogImage = DialogImage;
58
-
59
51
  var DialogActionItemContainer = function DialogActionItemContainer(_ref2) {
60
52
  var children = _ref2.children;
61
53
  return (0, _react.jsx)("div", {
62
54
  css: actionItemContainerStyles
63
55
  }, children);
64
56
  };
57
+
65
58
  /**
66
59
  * __Dialog action item__
67
60
  *
@@ -69,15 +62,11 @@ var DialogActionItemContainer = function DialogActionItemContainer(_ref2) {
69
62
  *
70
63
  * @internal
71
64
  */
72
-
73
-
74
65
  exports.DialogActionItemContainer = DialogActionItemContainer;
75
-
76
66
  var DialogActionItem = function DialogActionItem(_ref3) {
77
67
  var children = _ref3.children;
78
68
  return (0, _react.jsx)("div", {
79
69
  css: actionItemStyles
80
70
  }, children);
81
71
  };
82
-
83
72
  exports.DialogActionItem = DialogActionItem;
@@ -4,37 +4,34 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.ModalImage = exports.ModalHeading = exports.ModalBody = exports.ModalActionItem = exports.ModalActionContainer = void 0;
7
-
8
7
  var _react = require("@emotion/react");
9
-
10
8
  var _components = require("@atlaskit/theme/components");
11
-
12
9
  var _constants = require("@atlaskit/theme/constants");
13
-
14
10
  var _typography = require("@atlaskit/theme/typography");
15
-
16
11
  /** @jsx jsx */
17
- var borderRadius = (0, _constants.borderRadius)(); // eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
18
12
 
13
+ var borderRadius = (0, _constants.borderRadius)();
14
+
15
+ // eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
19
16
  var lightH600Styles = (0, _react.css)((0, _typography.h600)({
20
17
  theme: {
21
18
  mode: 'light'
22
19
  }
23
- })); // eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
24
-
20
+ }));
21
+ // eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
25
22
  var darkH600Styles = (0, _react.css)((0, _typography.h600)({
26
23
  theme: {
27
24
  mode: 'dark'
28
25
  }
29
26
  }));
30
27
  var modalBodyStyles = (0, _react.css)({
31
- padding: "var(--ds-scale-500, 40px)".concat(" ", "var(--ds-scale-250, 20px)"),
28
+ padding: "var(--ds-space-500, 40px)".concat(" ", "var(--ds-space-250, 20px)"),
32
29
  textAlign: 'center'
33
- }); // eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
30
+ });
34
31
 
32
+ // eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
35
33
  var modalHeadingStyles = (0, _react.css)({
36
- // TODO Delete this comment after verifying spacing token -> previous value ``${gridSize}px``
37
- marginBottom: "var(--ds-scale-100, 8px)",
34
+ marginBottom: "var(--ds-space-100, 8px)",
38
35
  color: 'inherit'
39
36
  });
40
37
  var modalImageStyles = (0, _react.css)({
@@ -48,7 +45,7 @@ var modalImageStyles = (0, _react.css)({
48
45
  });
49
46
  var modalActionContainerStyles = (0, _react.css)({
50
47
  display: 'flex',
51
- padding: "var(--ds-scale-0, 0px)".concat(" ", "var(--ds-scale-500, 40px)", " 36px"),
48
+ padding: "var(--ds-space-0, 0px)".concat(" ", "var(--ds-space-500, 40px)", " 36px"),
52
49
  justifyContent: 'center',
53
50
  flexDirection: 'row',
54
51
  flexFlow: 'wrap'
@@ -57,87 +54,76 @@ var modalActionContainerReversedStyles = (0, _react.css)({
57
54
  flexDirection: 'row-reverse'
58
55
  });
59
56
  var modalActionItemStyles = (0, _react.css)({
60
- margin: "var(--ds-scale-0, 0px)".concat(" ", "var(--ds-scale-050, 4px)", " ", "var(--ds-scale-050, 4px)")
57
+ margin: "var(--ds-space-0, 0px)".concat(" ", "var(--ds-space-050, 4px)", " ", "var(--ds-space-050, 4px)")
61
58
  });
59
+
62
60
  /**
63
61
  * __Modal body__
64
62
  *
65
63
  * @internal
66
64
  */
67
-
68
65
  var ModalBody = function ModalBody(_ref) {
69
66
  var children = _ref.children;
70
67
  return (0, _react.jsx)("div", {
71
68
  css: modalBodyStyles
72
69
  }, children);
73
70
  };
71
+
74
72
  /**
75
73
  * __Modal heading__
76
74
  *
77
75
  * @internal
78
76
  */
79
-
80
-
81
77
  exports.ModalBody = ModalBody;
82
-
83
78
  var ModalHeading = function ModalHeading(_ref2) {
84
79
  var children = _ref2.children;
85
-
86
80
  var _useGlobalTheme = (0, _components.useGlobalTheme)(),
87
- mode = _useGlobalTheme.mode;
88
-
81
+ mode = _useGlobalTheme.mode;
89
82
  return (0, _react.jsx)("h4", {
90
83
  css: [mode === 'light' ? lightH600Styles : darkH600Styles, modalHeadingStyles]
91
84
  }, children);
92
85
  };
86
+
93
87
  /**
94
88
  * __Modal image__
95
89
  *
96
90
  * @internal
97
91
  */
98
-
99
-
100
92
  exports.ModalHeading = ModalHeading;
101
-
102
93
  var ModalImage = function ModalImage(_ref3) {
103
94
  var alt = _ref3.alt,
104
- src = _ref3.src;
95
+ src = _ref3.src;
105
96
  return (0, _react.jsx)("img", {
106
97
  css: modalImageStyles,
107
98
  alt: alt,
108
99
  src: src
109
100
  });
110
101
  };
102
+
111
103
  /**
112
104
  * __Modal action container__
113
105
  *
114
106
  * @internal
115
107
  */
116
-
117
-
118
108
  exports.ModalImage = ModalImage;
119
-
120
109
  var ModalActionContainer = function ModalActionContainer(_ref4) {
121
110
  var children = _ref4.children,
122
- shouldReverseButtonOrder = _ref4.shouldReverseButtonOrder;
111
+ shouldReverseButtonOrder = _ref4.shouldReverseButtonOrder;
123
112
  return (0, _react.jsx)("div", {
124
113
  css: [modalActionContainerStyles, shouldReverseButtonOrder && modalActionContainerReversedStyles]
125
114
  }, children);
126
115
  };
116
+
127
117
  /**
128
118
  * __Modal action item__
129
119
  *
130
120
  * @internal
131
121
  */
132
-
133
-
134
122
  exports.ModalActionContainer = ModalActionContainer;
135
-
136
123
  var ModalActionItem = function ModalActionItem(_ref5) {
137
124
  var children = _ref5.children;
138
125
  return (0, _react.jsx)("div", {
139
126
  css: modalActionItemStyles
140
127
  }, children);
141
128
  };
142
-
143
129
  exports.ModalActionItem = ModalActionItem;
@@ -1,32 +1,21 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.pulseKeyframesName = exports.TargetOverlay = exports.TargetInner = exports.Pulse = void 0;
9
-
10
8
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
11
-
12
9
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
13
-
14
10
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
15
-
16
11
  var _react = require("@emotion/react");
17
-
18
12
  var _colors = require("@atlaskit/theme/colors");
19
-
20
13
  var _constants = require("@atlaskit/theme/constants");
21
-
22
14
  var _excluded = ["children", "bgColor", "radius", "style", "testId"],
23
- _excluded2 = ["children", "pulse"],
24
- _excluded3 = ["children", "pulse", "testId"];
25
-
15
+ _excluded2 = ["children", "pulse"],
16
+ _excluded3 = ["children", "pulse", "testId"];
26
17
  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; }
27
-
28
18
  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; }
29
-
30
19
  // NOTE:
31
20
  // Pulse color "rgb(101, 84, 192)" derived from "colors.P300"
32
21
  var baseShadow = "0 0 0 2px ".concat("var(--ds-border-discovery, ".concat(_colors.P300, ")"));
@@ -38,36 +27,37 @@ var pulseKeyframes = (0, _react.keyframes)({
38
27
  '66%, 100%': {
39
28
  boxShadow: "".concat(baseShadow, ", 0 0 0 10px rgba(101, 84, 192, 0.01)")
40
29
  }
41
- }); // This is needed for unit tests
42
-
30
+ });
31
+ // This is needed for unit tests
43
32
  var pulseKeyframesName = pulseKeyframes.name;
44
33
  exports.pulseKeyframesName = pulseKeyframesName;
45
34
  var animationStyles = (0, _react.css)({
46
35
  animation: "".concat(pulseKeyframes, " 3000ms ").concat(easing, " infinite")
47
- }); // IE11 and Edge: z-index needed because fixed position calculates z-index relative
48
- // to body instead of nearest stacking context (Portal in our case).
36
+ });
49
37
 
38
+ // IE11 and Edge: z-index needed because fixed position calculates z-index relative
39
+ // to body instead of nearest stacking context (Portal in our case).
50
40
  var baseStyles = (0, _react.css)({
51
41
  zIndex: _constants.layers.spotlight() + 1
52
42
  });
53
-
54
43
  var Base = function Base(_ref) {
55
44
  var children = _ref.children,
56
- bgColor = _ref.bgColor,
57
- radius = _ref.radius,
58
- style = _ref.style,
59
- testId = _ref.testId,
60
- props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
45
+ bgColor = _ref.bgColor,
46
+ radius = _ref.radius,
47
+ style = _ref.style,
48
+ testId = _ref.testId,
49
+ props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
61
50
  return (0, _react.jsx)("div", (0, _extends2.default)({
62
51
  css: baseStyles,
63
52
  "data-testid": testId,
64
53
  style: _objectSpread(_objectSpread({}, style), {}, {
65
54
  backgroundColor: bgColor,
66
55
  borderRadius: radius ? "".concat(radius, "px") : undefined
67
- }) // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
68
-
56
+ })
57
+ // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
69
58
  }, props), children);
70
59
  };
60
+
71
61
  /**
72
62
  * __Target inner__
73
63
  *
@@ -75,19 +65,17 @@ var Base = function Base(_ref) {
75
65
  *
76
66
  * @internal
77
67
  */
78
-
79
-
80
68
  var TargetInner = function TargetInner(_ref2) {
81
69
  var children = _ref2.children,
82
- pulse = _ref2.pulse,
83
- props = (0, _objectWithoutProperties2.default)(_ref2, _excluded2);
84
- return (// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
70
+ pulse = _ref2.pulse,
71
+ props = (0, _objectWithoutProperties2.default)(_ref2, _excluded2);
72
+ return (
73
+ // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
85
74
  (0, _react.jsx)(Base, (0, _extends2.default)({}, props, {
86
75
  css: [pulse && animationStyles]
87
76
  }), children)
88
77
  );
89
78
  };
90
-
91
79
  exports.TargetInner = TargetInner;
92
80
  var targetOverlayStyles = (0, _react.css)({
93
81
  width: '100%',
@@ -96,6 +84,7 @@ var targetOverlayStyles = (0, _react.css)({
96
84
  top: 0,
97
85
  left: 0
98
86
  });
87
+
99
88
  /**
100
89
  * __Target overlay__
101
90
  *
@@ -104,7 +93,6 @@ var targetOverlayStyles = (0, _react.css)({
104
93
  *
105
94
  * @internal
106
95
  */
107
-
108
96
  var TargetOverlay = function TargetOverlay(props) {
109
97
  return (0, _react.jsx)("div", (0, _extends2.default)({}, props, {
110
98
  css: targetOverlayStyles,
@@ -113,6 +101,7 @@ var TargetOverlay = function TargetOverlay(props) {
113
101
  }
114
102
  }));
115
103
  };
104
+
116
105
  /**
117
106
  * __Spotlight pulse__
118
107
  *
@@ -122,22 +111,19 @@ var TargetOverlay = function TargetOverlay(props) {
122
111
  * - [Code](https://atlassian.design/components/onboarding/code)
123
112
  * - [Usage](https://atlassian.design/components/onboarding/usage)
124
113
  */
125
-
126
-
127
114
  exports.TargetOverlay = TargetOverlay;
128
-
129
115
  var Pulse = function Pulse(_ref3) {
130
116
  var children = _ref3.children,
131
- _ref3$pulse = _ref3.pulse,
132
- pulse = _ref3$pulse === void 0 ? true : _ref3$pulse,
133
- testId = _ref3.testId,
134
- props = (0, _objectWithoutProperties2.default)(_ref3, _excluded3);
135
- return (// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
117
+ _ref3$pulse = _ref3.pulse,
118
+ pulse = _ref3$pulse === void 0 ? true : _ref3$pulse,
119
+ testId = _ref3.testId,
120
+ props = (0, _objectWithoutProperties2.default)(_ref3, _excluded3);
121
+ return (
122
+ // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
136
123
  (0, _react.jsx)(Base, (0, _extends2.default)({}, props, {
137
124
  css: [pulse && animationStyles],
138
125
  testId: testId
139
126
  }), children)
140
127
  );
141
128
  };
142
-
143
129
  exports.Pulse = Pulse;
@@ -1,25 +1,19 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.useElementBox = exports.ElementBox = void 0;
9
-
10
8
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
11
-
12
9
  var _react = require("react");
13
-
14
10
  var _bindEventListener = require("bind-event-listener");
15
-
16
11
  var getElementRect = function getElementRect(element) {
17
12
  var _element$getBoundingC = element.getBoundingClientRect(),
18
- height = _element$getBoundingC.height,
19
- left = _element$getBoundingC.left,
20
- top = _element$getBoundingC.top,
21
- width = _element$getBoundingC.width;
22
-
13
+ height = _element$getBoundingC.height,
14
+ left = _element$getBoundingC.left,
15
+ top = _element$getBoundingC.top,
16
+ width = _element$getBoundingC.width;
23
17
  return {
24
18
  height: height,
25
19
  left: left,
@@ -27,24 +21,22 @@ var getElementRect = function getElementRect(element) {
27
21
  width: width
28
22
  };
29
23
  };
24
+
30
25
  /**
31
26
  * Will listen to the document resizing to see if an element has moved positions.
32
27
  * Not using ResizeObserver because of IE11 support.
33
28
  * @param element HTMLElement to watch when resizing.
34
29
  */
35
-
36
-
37
30
  var useElementBox = function useElementBox(element) {
38
31
  var _useState = (0, _react.useState)({
39
- width: 0,
40
- height: 0,
41
- left: 0,
42
- top: 0
43
- }),
44
- _useState2 = (0, _slicedToArray2.default)(_useState, 2),
45
- box = _useState2[0],
46
- setBox = _useState2[1];
47
-
32
+ width: 0,
33
+ height: 0,
34
+ left: 0,
35
+ top: 0
36
+ }),
37
+ _useState2 = (0, _slicedToArray2.default)(_useState, 2),
38
+ box = _useState2[0],
39
+ setBox = _useState2[1];
48
40
  (0, _react.useLayoutEffect)(function () {
49
41
  setBox(getElementRect(element));
50
42
  }, [element]);
@@ -54,7 +46,6 @@ var useElementBox = function useElementBox(element) {
54
46
  setBox(getElementRect(element));
55
47
  });
56
48
  };
57
-
58
49
  return (0, _bindEventListener.bind)(window, {
59
50
  type: 'resize',
60
51
  listener: onResize
@@ -62,6 +53,7 @@ var useElementBox = function useElementBox(element) {
62
53
  }, [element]);
63
54
  return box;
64
55
  };
56
+
65
57
  /**
66
58
  * __Element box__
67
59
  *
@@ -69,13 +61,9 @@ var useElementBox = function useElementBox(element) {
69
61
  *
70
62
  * @internal
71
63
  */
72
-
73
-
74
64
  exports.useElementBox = useElementBox;
75
-
76
65
  var ElementBox = function ElementBox(props) {
77
66
  var box = useElementBox(props.element);
78
67
  return props.children(box);
79
68
  };
80
-
81
69
  exports.ElementBox = ElementBox;
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/onboarding",
3
- "version": "10.6.7",
3
+ "version": "10.6.8",
4
4
  "sideEffects": false
5
5
  }
@@ -4,7 +4,6 @@ const duration = {
4
4
  enter: 0,
5
5
  exit: 100
6
6
  };
7
-
8
7
  /**
9
8
  * __Fade__
10
9
  *
@@ -35,7 +34,8 @@ export const Fade = ({
35
34
  opacity: 0
36
35
  }
37
36
  };
38
- const style = { ...base,
37
+ const style = {
38
+ ...base,
39
39
  ...anim[status]
40
40
  };
41
41
  return children(style);
@@ -1,16 +1,16 @@
1
1
  import React from 'react';
2
2
  import { TargetInner, TargetOverlay } from '../styled/target';
3
-
4
3
  function cloneAndOverrideStyles(node) {
5
4
  const shouldCloneChildren = true;
6
5
  const clonedNode = node.cloneNode(shouldCloneChildren);
7
6
  clonedNode.style.margin = '0';
8
- clonedNode.style.position = 'static'; // The target may have other transforms applied. Avoid unintended side effects
7
+ clonedNode.style.position = 'static';
8
+ // The target may have other transforms applied. Avoid unintended side effects
9
9
  // by zeroing out "translate" rather than applying a value of "none".
10
-
11
10
  clonedNode.style.transform = 'translate(0, 0) translate3d(0, 0, 0)';
12
11
  return clonedNode;
13
12
  }
13
+
14
14
  /**
15
15
  * __Clone__
16
16
  *
@@ -19,8 +19,6 @@ function cloneAndOverrideStyles(node) {
19
19
  *
20
20
  * @internal
21
21
  */
22
-
23
-
24
22
  const Clone = props => {
25
23
  const {
26
24
  pulse,
@@ -54,5 +52,4 @@ const Clone = props => {
54
52
  }) : undefined
55
53
  }));
56
54
  };
57
-
58
55
  export default Clone;
@@ -1,13 +1,14 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
-
4
3
  /** @jsx jsx */
5
4
  import { Component } from 'react';
6
5
  import { jsx } from '@emotion/react';
7
6
  import Button, { Theme as ButtonTheme } from '@atlaskit/button/custom-theme-button';
8
7
  import Modal, { ModalBody } from '@atlaskit/modal-dialog';
9
8
  import { ModalBody as Body, ModalHeading as Heading, ModalActionContainer, ModalActionItem, ModalImage } from '../styled/modal';
10
- import { modalButtonTheme } from './theme'; // TODO: DSP-1250 - use a composable API consistent with normal modal dialog
9
+ import { modalButtonTheme } from './theme';
10
+
11
+ // TODO: DSP-1250 - use a composable API consistent with normal modal dialog
11
12
 
12
13
  /**
13
14
  * __Benefits modal__
@@ -21,28 +22,23 @@ import { modalButtonTheme } from './theme'; // TODO: DSP-1250 - use a composable
21
22
  export default class BenefitsModal extends Component {
22
23
  constructor(...args) {
23
24
  super(...args);
24
-
25
25
  _defineProperty(this, "headerComponent", props => {
26
26
  const {
27
27
  header: HeaderElement,
28
28
  image: src
29
29
  } = props;
30
-
31
30
  const ImageElement = () => jsx(ModalImage, {
32
31
  src: src,
33
32
  alt: ""
34
33
  });
35
-
36
34
  return HeaderElement || ImageElement;
37
35
  });
38
-
39
36
  _defineProperty(this, "footerComponent", props => {
40
37
  const {
41
38
  footer: FooterElement,
42
39
  actions: actionList,
43
40
  experimental_shouldShowPrimaryButtonOnRight = false
44
41
  } = props;
45
-
46
42
  const ActionsElement = () => actionList ? jsx(ButtonTheme.Provider, {
47
43
  value: modalButtonTheme
48
44
  }, jsx(ModalActionContainer, {
@@ -60,11 +56,9 @@ export default class BenefitsModal extends Component {
60
56
  autoFocus: !idx
61
57
  }, rest), text));
62
58
  }))) : null;
63
-
64
59
  return FooterElement || ActionsElement;
65
60
  });
66
61
  }
67
-
68
62
  render() {
69
63
  const {
70
64
  actions,
@@ -81,5 +75,4 @@ export default class BenefitsModal extends Component {
81
75
  shouldCloseOnEscapePress: false
82
76
  }, props), jsx(Header, null), jsx(ModalBody, null, jsx(Body, null, heading && jsx(Heading, null, heading), children)), jsx(Footer, null));
83
77
  }
84
-
85
78
  }