@atlaskit/onboarding 10.4.2 → 10.5.2

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 (49) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/dist/cjs/components/modal.js +13 -16
  3. package/dist/cjs/components/spotlight-card.js +133 -100
  4. package/dist/cjs/components/spotlight-dialog.js +6 -18
  5. package/dist/cjs/components/spotlight-manager.js +8 -6
  6. package/dist/cjs/components/spotlight-target.js +4 -2
  7. package/dist/cjs/components/spotlight-transition.js +7 -3
  8. package/dist/cjs/components/spotlight.js +4 -4
  9. package/dist/cjs/components/theme.js +10 -0
  10. package/dist/cjs/components/use-spotlight.js +1 -7
  11. package/dist/cjs/styled/target.js +5 -3
  12. package/dist/cjs/version.json +1 -1
  13. package/dist/es2019/components/modal.js +6 -9
  14. package/dist/es2019/components/spotlight-card.js +120 -63
  15. package/dist/es2019/components/spotlight-dialog.js +8 -17
  16. package/dist/es2019/components/spotlight-manager.js +5 -5
  17. package/dist/es2019/components/spotlight-target.js +4 -2
  18. package/dist/es2019/components/spotlight-transition.js +6 -3
  19. package/dist/es2019/components/spotlight.js +4 -4
  20. package/dist/es2019/components/theme.js +10 -0
  21. package/dist/es2019/components/use-spotlight.js +1 -7
  22. package/dist/es2019/styled/target.js +5 -3
  23. package/dist/es2019/version.json +1 -1
  24. package/dist/esm/components/modal.js +13 -16
  25. package/dist/esm/components/spotlight-card.js +120 -90
  26. package/dist/esm/components/spotlight-dialog.js +6 -16
  27. package/dist/esm/components/spotlight-manager.js +5 -4
  28. package/dist/esm/components/spotlight-target.js +4 -2
  29. package/dist/esm/components/spotlight-transition.js +6 -3
  30. package/dist/esm/components/spotlight.js +4 -4
  31. package/dist/esm/components/theme.js +10 -0
  32. package/dist/esm/components/use-spotlight.js +1 -7
  33. package/dist/esm/styled/target.js +5 -3
  34. package/dist/esm/version.json +1 -1
  35. package/dist/types/components/modal.d.ts +6 -5
  36. package/dist/types/components/spotlight-card.d.ts +25 -7
  37. package/dist/types/components/spotlight-manager.d.ts +5 -3
  38. package/dist/types/components/spotlight-target.d.ts +4 -2
  39. package/dist/types/components/spotlight-transition.d.ts +4 -2
  40. package/dist/types/components/spotlight.d.ts +4 -4
  41. package/dist/types/components/theme.d.ts +8 -0
  42. package/dist/types/components/use-spotlight.d.ts +1 -7
  43. package/dist/types/styled/target.d.ts +5 -3
  44. package/package.json +5 -3
  45. package/report.api.md +406 -0
  46. package/dist/cjs/components/card.js +0 -160
  47. package/dist/es2019/components/card.js +0 -131
  48. package/dist/esm/components/card.js +0 -142
  49. package/dist/types/components/card.d.ts +0 -59
@@ -1,106 +1,136 @@
1
- import _extends from "@babel/runtime/helpers/extends";
2
1
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
- import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
4
- import _createClass from "@babel/runtime/helpers/createClass";
5
- import _inherits from "@babel/runtime/helpers/inherits";
6
- import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
7
- import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
8
- import _defineProperty from "@babel/runtime/helpers/defineProperty";
9
- var _excluded = ["container"];
2
+ var _excluded = ["text", "key"];
10
3
 
11
- 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; }
12
-
13
- 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) { _defineProperty(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; }
14
-
15
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
16
-
17
- 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; } }
18
-
19
- import React from 'react';
20
- import { Theme as ButtonTheme } from '@atlaskit/button/custom-theme-button';
4
+ /** @jsx jsx */
5
+ import React, { forwardRef } from 'react';
6
+ import { css, jsx } from '@emotion/core';
7
+ import Button, { Theme as ButtonTheme } from '@atlaskit/button/custom-theme-button';
8
+ import Heading from '@atlaskit/heading';
21
9
  import { N0, N50A, N60A, P300 } from '@atlaskit/theme/colors';
22
- import Card from './card';
10
+ import { createTheme } from '@atlaskit/theme/components';
11
+ import { borderRadius, gridSize as getGridSize, layers } from '@atlaskit/theme/constants';
12
+ import { DialogActionItem, DialogActionItemContainer } from '../styled/dialog';
23
13
  import { spotlightButtonTheme } from './theme';
14
+ var gridSize = getGridSize();
15
+ var bodyStyles = css({
16
+ display: 'flex',
17
+ padding: "".concat(gridSize * 2, "px ").concat(gridSize * 2.5, "px"),
18
+ flexDirection: 'column'
19
+ });
20
+ var defaultHeaderStyles = css({
21
+ display: 'flex',
22
+ paddingBottom: "".concat(gridSize, "px"),
23
+ alignItems: 'baseline',
24
+ justifyContent: 'space-between'
25
+ });
24
26
 
25
- var SpotlightCard = /*#__PURE__*/function (_React$Component) {
26
- _inherits(SpotlightCard, _React$Component);
27
-
28
- var _super = _createSuper(SpotlightCard);
27
+ var DefaultHeader = function DefaultHeader(_ref) {
28
+ var children = _ref.children;
29
+ return jsx("div", {
30
+ css: defaultHeaderStyles
31
+ }, children);
32
+ };
29
33
 
30
- function SpotlightCard() {
31
- _classCallCheck(this, SpotlightCard);
34
+ var defaultFooterStyles = css({
35
+ display: 'flex',
36
+ paddingTop: "".concat(gridSize, "px"),
37
+ alignItems: 'center',
38
+ justifyContent: 'space-between'
39
+ });
32
40
 
33
- return _super.apply(this, arguments);
34
- }
41
+ var DefaultFooter = function DefaultFooter(_ref2) {
42
+ var children = _ref2.children;
43
+ return jsx("div", {
44
+ css: defaultFooterStyles
45
+ }, children);
46
+ };
35
47
 
36
- _createClass(SpotlightCard, [{
37
- key: "render",
38
- value: function render() {
39
- var _this$props = this.props,
40
- actions = _this$props.actions,
41
- actionsBeforeElement = _this$props.actionsBeforeElement,
42
- children = _this$props.children,
43
- components = _this$props.components,
44
- isFlat = _this$props.isFlat,
45
- heading = _this$props.heading,
46
- headingAfterElement = _this$props.headingAfterElement,
47
- image = _this$props.image,
48
- innerRef = _this$props.innerRef,
49
- _theme = _this$props.theme,
50
- width = _this$props.width,
51
- testId = _this$props.testId;
52
- return /*#__PURE__*/React.createElement(ButtonTheme.Provider, {
53
- value: spotlightButtonTheme
54
- }, /*#__PURE__*/React.createElement(Card, {
55
- testId: testId,
56
- ref: innerRef,
57
- heading: heading,
58
- headingAfterElement: headingAfterElement,
59
- actions: actions,
60
- actionsBeforeElement: actionsBeforeElement,
61
- components: components,
62
- image: image // eslint-disable-next-line @repo/internal/react/no-unsafe-overrides
63
- ,
64
- theme: function theme(parent) {
65
- var _parent = parent({}),
66
- container = _parent.container,
67
- others = _objectWithoutProperties(_parent, _excluded);
48
+ var containerStyles = css({
49
+ height: 'fit-content',
50
+ zIndex: layers.spotlight() + 1,
51
+ background: "var(--ds-background-discovery-bold, ".concat(P300, ")"),
52
+ borderRadius: "".concat(borderRadius(), "px"),
53
+ color: "var(--ds-text-inverse, ".concat(N0, ")"),
54
+ overflow: 'auto'
55
+ });
56
+ var containerShadowStyles = css({
57
+ boxShadow: "var(--ds-shadow-raised, ".concat("0 4px 8px -2px ".concat(N50A, ", 0 0 1px ").concat(N60A), ")")
58
+ });
59
+ /**
60
+ * @deprecated
61
+ */
68
62
 
69
- return _theme(function () {
70
- return _objectSpread(_objectSpread({}, others), {}, {
71
- container: _objectSpread({
72
- background: "var(--ds-background-discovery-bold, ".concat(P300, ")"),
73
- color: "var(--ds-text-inverse, ".concat(N0, ")"),
74
- width: "".concat(Math.min(Math.max(width, 160), 600), "px"),
75
- boxShadow: isFlat ? undefined : "var(--ds-shadow-raised, ".concat("0 4px 8px -2px ".concat(N50A, ", 0 0 1px ").concat(N60A), ")")
76
- }, container)
77
- });
78
- }, {});
79
- }
80
- }, children));
81
- }
82
- }]);
63
+ var Theme = createTheme(function () {
64
+ return {
65
+ container: {}
66
+ };
67
+ });
68
+ /**
69
+ * @deprecated
70
+ */
83
71
 
84
- return SpotlightCard;
85
- }(React.Component);
86
72
  /**
87
73
  * __Spotlight card__
88
74
  *
89
- * - [Examples](https://atlaskit.atlassian.com/packages/design-system/onboarding)
75
+ * A spotlight card is for onboarding messages that need a more flexible layout, or don't require a dialog.
76
+ *
77
+ * - [Examples](https://atlassian.design/components/onboarding/spotlight-card/examples)
78
+ * - [Code](https://atlassian.design/components/onboarding/spotlight-card/code)
79
+ * - [Usage](https://atlassian.design/components/onboarding/spotlight-card/usage)
90
80
  */
81
+ var SpotlightCard = /*#__PURE__*/forwardRef(function (props, ref) {
82
+ var _props$actions = props.actions,
83
+ actions = _props$actions === void 0 ? [] : _props$actions,
84
+ actionsBeforeElement = props.actionsBeforeElement,
85
+ children = props.children,
86
+ _props$components = props.components,
87
+ components = _props$components === void 0 ? {} : _props$components,
88
+ heading = props.heading,
89
+ headingAfterElement = props.headingAfterElement,
90
+ image = props.image,
91
+ innerRef = props.innerRef,
92
+ isFlat = props.isFlat,
93
+ testId = props.testId,
94
+ theme = props.theme,
95
+ _props$width = props.width,
96
+ width = _props$width === void 0 ? 400 : _props$width;
97
+ var _components$Header = components.Header,
98
+ Header = _components$Header === void 0 ? DefaultHeader : _components$Header,
99
+ _components$Footer = components.Footer,
100
+ Footer = _components$Footer === void 0 ? DefaultFooter : _components$Footer;
101
+ return jsx(ButtonTheme.Provider, {
102
+ value: spotlightButtonTheme
103
+ }, jsx(Theme.Provider, {
104
+ value: theme
105
+ }, jsx(Theme.Consumer, null, function (_ref3) {
106
+ var container = _ref3.container;
107
+ return jsx("div", {
108
+ css: [containerStyles, !isFlat && containerShadowStyles, // eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
109
+ container],
110
+ style: {
111
+ width: "".concat(Math.min(Math.max(width, 160), 600), "px")
112
+ },
113
+ ref: ref || innerRef,
114
+ "data-testid": testId
115
+ }, typeof image === 'string' ? jsx("img", {
116
+ src: image,
117
+ alt: ""
118
+ }) : image, jsx("div", {
119
+ css: bodyStyles
120
+ }, heading || headingAfterElement ? jsx(Header, null, jsx(Heading, {
121
+ color: "inverse",
122
+ level: "h600",
123
+ as: "h4"
124
+ }, heading), headingAfterElement) : null, children, actions.length > 0 || actionsBeforeElement ? jsx(Footer, null, actionsBeforeElement || jsx("span", null), jsx(DialogActionItemContainer, null, actions.map(function (_ref4, idx) {
125
+ var text = _ref4.text,
126
+ key = _ref4.key,
127
+ rest = _objectWithoutProperties(_ref4, _excluded);
91
128
 
92
-
93
- _defineProperty(SpotlightCard, "defaultProps", {
94
- width: 400,
95
- isFlat: false,
96
- components: {},
97
- theme: function theme(themeFn) {
98
- return themeFn();
99
- }
129
+ return jsx(DialogActionItem, {
130
+ key: key || (typeof text === 'string' ? text : "".concat(idx))
131
+ }, jsx(Button, rest, text));
132
+ }))) : null));
133
+ })));
100
134
  });
101
-
102
- export default /*#__PURE__*/React.forwardRef(function (props, ref) {
103
- return /*#__PURE__*/React.createElement(SpotlightCard, _extends({}, props, {
104
- innerRef: ref
105
- }));
106
- });
135
+ SpotlightCard.displayName = 'SpotlightCard';
136
+ export default SpotlightCard;
@@ -1,4 +1,3 @@
1
- import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
2
1
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
3
2
  import _createClass from "@babel/runtime/helpers/createClass";
4
3
  import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
@@ -6,7 +5,6 @@ import _inherits from "@babel/runtime/helpers/inherits";
6
5
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
7
6
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
8
7
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
9
- var _excluded = ["container"];
10
8
 
11
9
  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; }
12
10
 
@@ -24,7 +22,7 @@ import { DialogImage } from '../styled/dialog';
24
22
  import SpotlightCard from './spotlight-card';
25
23
  import ValueChanged from './value-changed';
26
24
  var packageName = "@atlaskit/onboarding";
27
- var packageVersion = "10.4.2";
25
+ var packageVersion = "10.5.2";
28
26
 
29
27
  var SpotlightDialog = /*#__PURE__*/function (_Component) {
30
28
  _inherits(SpotlightDialog, _Component);
@@ -126,19 +124,11 @@ var SpotlightDialog = /*#__PURE__*/function (_Component) {
126
124
  disabled: focusLockDisabled,
127
125
  returnFocus: false,
128
126
  autoFocus: true
129
- }, /*#__PURE__*/React.createElement(SpotlightCard, {
127
+ }, /*#__PURE__*/React.createElement("div", {
130
128
  ref: ref,
131
- testId: testId // eslint-disable-next-line @repo/internal/react/no-unsafe-overrides
132
- ,
133
- theme: function theme(parent) {
134
- var _parent = parent({}),
135
- container = _parent.container,
136
- others = _objectWithoutProperties(_parent, _excluded);
137
-
138
- return _objectSpread(_objectSpread({}, others), {}, {
139
- container: _objectSpread(_objectSpread(_objectSpread({}, container), style), animationStyles)
140
- });
141
- },
129
+ style: _objectSpread(_objectSpread({}, style), animationStyles)
130
+ }, /*#__PURE__*/React.createElement(SpotlightCard, {
131
+ testId: testId,
142
132
  width: dialogWidth,
143
133
  actions: actions,
144
134
  actionsBeforeElement: actionsBeforeElement,
@@ -152,7 +142,7 @@ var SpotlightDialog = /*#__PURE__*/function (_Component) {
152
142
  },
153
143
  heading: heading,
154
144
  headingAfterElement: headingAfterElement
155
- }, children)));
145
+ }, children))));
156
146
  });
157
147
  }
158
148
  }]);
@@ -16,13 +16,12 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
16
16
 
17
17
  import React, { createContext, PureComponent } from 'react';
18
18
  import memoizeOne from 'memoize-one';
19
+ import noop from '@atlaskit/ds-lib/noop';
19
20
  import Portal from '@atlaskit/portal';
20
21
  import { layers } from '@atlaskit/theme/constants';
21
22
  import Blanket from '../styled/blanket';
22
23
  import { Fade } from './animation';
23
24
 
24
- var noop = function noop() {};
25
-
26
25
  var _createContext = /*#__PURE__*/createContext(undefined),
27
26
  TargetConsumer = _createContext.Consumer,
28
27
  TargetProvider = _createContext.Provider;
@@ -45,9 +44,11 @@ var Container = function Container(_ref) {
45
44
  /**
46
45
  * __Spotlight manager__
47
46
  *
48
- * Wraps usage of spotlight and manages progression through multiple spotlights.
47
+ * A spotlight manager manages the visibility of spotlights used to introduce new features to users through focused messages or multi-step tours.
49
48
  *
50
- * - [Examples](https://atlaskit.atlassian.com/packages/design-system/onboarding)
49
+ * - [Examples](https://atlassian.design/components/onboarding/examples)
50
+ * - [Code](https://atlassian.design/components/onboarding/code)
51
+ * - [Usage](https://atlassian.design/components/onboarding/usage)
51
52
  */
52
53
 
53
54
 
@@ -5,9 +5,11 @@ import { TargetConsumer } from './spotlight-manager';
5
5
  /**
6
6
  * __Spotlight target__
7
7
  *
8
- * Wraps an element, allowing it to be targeted by a spotlight.
8
+ * A spotlight target marks a component to be used for introducing new features to users through focused messages or multi-step tours.
9
9
  *
10
- * - [Examples](https://atlaskit.atlassian.com/packages/design-system/onboarding)
10
+ * - [Examples](https://atlassian.design/components/onboarding/examples)
11
+ * - [Code](https://atlassian.design/components/onboarding/code)
12
+ * - [Usage](https://atlassian.design/components/onboarding/usage)
11
13
  */
12
14
  var SpotlightTarget = function SpotlightTarget(_ref) {
13
15
  var children = _ref.children,
@@ -11,9 +11,10 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
11
11
  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; } }
12
12
 
13
13
  import React, { createContext } from 'react';
14
+ import noop from '@atlaskit/ds-lib/noop';
14
15
  var SpotlightTransitionContext = /*#__PURE__*/createContext({
15
16
  isOpen: true,
16
- onExited: function onExited() {}
17
+ onExited: noop
17
18
  }); // checks if children exist and are truthy
18
19
 
19
20
  var hasChildren = function hasChildren(children) {
@@ -24,9 +25,11 @@ var hasChildren = function hasChildren(children) {
24
25
  /**
25
26
  * __Spotlight transition__
26
27
  *
27
- * Provides context used for fading animations.
28
+ * A spotlight transition holds onto spotlights so they can fade out when exiting the viewport.
28
29
  *
29
- * - [Examples](https://atlaskit.atlassian.com/packages/design-system/onboarding)
30
+ * - [Examples](https://atlassian.design/components/onboarding/examples)
31
+ * - [Code](https://atlassian.design/components/onboarding/code)
32
+ * - [Usage](https://atlassian.design/components/onboarding/usage)
30
33
  */
31
34
 
32
35
 
@@ -8,11 +8,11 @@ import { SpotlightConsumer } from './spotlight-manager';
8
8
  /**
9
9
  * __Spotlight__
10
10
  *
11
- * A spotlight gives visual focus to an element and is paired with a dialog.
11
+ * An onboarding spotlight introduces new features to users through focused messages or multi-step tours.
12
12
  *
13
- * Spotlights are used for onboarding and can be connected to create a tour.
14
- *
15
- * - [Examples](https://atlaskit.atlassian.com/packages/design-system/onboarding)
13
+ * - [Examples](https://atlassian.design/components/onboarding/examples)
14
+ * - [Code](https://atlassian.design/components/onboarding/code)
15
+ * - [Usage](https://atlassian.design/components/onboarding/usage)
16
16
  */
17
17
  var Spotlight = function Spotlight(_ref) {
18
18
  var _ref$dialogWidth = _ref.dialogWidth,
@@ -146,6 +146,11 @@ function extract(newTheme, _ref) {
146
146
  return acc;
147
147
  }, {});
148
148
  }
149
+ /**
150
+ * @deprecated
151
+ * Custom button themes are deprecated and will be removed in the future.
152
+ */
153
+
149
154
 
150
155
  export var spotlightButtonTheme = function spotlightButtonTheme(current, themeProps) {
151
156
  var _current = current(themeProps),
@@ -156,6 +161,11 @@ export var spotlightButtonTheme = function spotlightButtonTheme(current, themePr
156
161
  buttonStyles: _objectSpread(_objectSpread({}, buttonStyles), extract(spotlightTheme, themeProps))
157
162
  }, rest);
158
163
  };
164
+ /**
165
+ * @deprecated
166
+ * Custom button themes are deprecated and will be removed in the future.
167
+ */
168
+
159
169
  export var modalButtonTheme = function modalButtonTheme(current, themeProps) {
160
170
  var _current2 = current(themeProps),
161
171
  buttonStyles = _current2.buttonStyles,
@@ -1,13 +1,7 @@
1
1
  import { useCallback, useContext, useEffect, useMemo, useRef } from 'react';
2
2
  import { SpotlightContext } from './spotlight-manager';
3
3
  /**
4
- * Enables advanced usage of spotlights.
5
- *
6
- * Provides the following methods:
7
- * - `isTargetRendered`
8
- *
9
- * Checks if the given spotlight target is currently
10
- * being rendered.
4
+ * Use spotlight hook returns information about available spotlight targets.
11
5
  */
12
6
 
13
7
  export default function useSpotlight() {
@@ -99,11 +99,13 @@ export var TargetOverlay = function TargetOverlay(props) {
99
99
  }));
100
100
  };
101
101
  /**
102
- * __Pulse__
102
+ * __Spotlight pulse__
103
103
  *
104
- * Allows consumers to apply the spotlight pulse effect in a custom way.
104
+ * A spotlight pulse draws attention to a new feature.
105
105
  *
106
- * - [Examples](https://atlaskit.atlassian.com/packages/design-system/onboarding)
106
+ * - [Examples](https://atlassian.design/components/onboarding/examples)
107
+ * - [Code](https://atlassian.design/components/onboarding/code)
108
+ * - [Usage](https://atlassian.design/components/onboarding/usage)
107
109
  */
108
110
 
109
111
  export var Pulse = function Pulse(_ref3) {
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/onboarding",
3
- "version": "10.4.2",
3
+ "version": "10.5.2",
4
4
  "sideEffects": false
5
5
  }
@@ -33,14 +33,15 @@ declare type ModalProps = {
33
33
  experimental_shouldShowPrimaryButtonOnRight?: boolean;
34
34
  };
35
35
  /**
36
- * __Onboarding modal__
36
+ * __Benefits modal__
37
37
  *
38
- * If the product change is large enough,
39
- * this component can be used to outline the benefits of the change to the user.
38
+ * A benefits modal explains the benefits of a significant new feature or experience change.
40
39
  *
41
- * - [Examples](https://atlaskit.atlassian.com/packages/design-system/onboarding)
40
+ * - [Examples](https://atlassian.design/components/onboarding/benefits-modal/examples)
41
+ * - [Code](https://atlassian.design/components/onboarding/benefits-modal/code)
42
+ * - [Usage](https://atlassian.design/components/onboarding/benefits-modal/usage)
42
43
  */
43
- export default class OnboardingModal extends Component<ModalProps> {
44
+ export default class BenefitsModal extends Component<ModalProps> {
44
45
  headerComponent: (props: ModalProps) => ElementType<HeaderComponentProps> | (() => JSX.Element);
45
46
  footerComponent: (props: ModalProps) => ElementType<FooterComponentProps> | (() => JSX.Element | null);
46
47
  render(): JSX.Element;
@@ -1,7 +1,16 @@
1
+ /** @jsx jsx */
1
2
  import React, { ComponentType, ReactNode, Ref } from 'react';
2
3
  import { ThemeProp } from '@atlaskit/theme/components';
3
4
  import { Actions } from '../types';
4
- import { CardTokens } from './card';
5
+ /**
6
+ * @deprecated
7
+ */
8
+ interface CardTokens {
9
+ /**
10
+ * @deprecated
11
+ */
12
+ container: Record<string, string | undefined>;
13
+ }
5
14
  interface SpotlightCardProps {
6
15
  /**
7
16
  * Buttons to render in the footer
@@ -39,14 +48,19 @@ interface SpotlightCardProps {
39
48
  */
40
49
  isFlat?: boolean;
41
50
  /**
42
- * The theme of the card
51
+ * @deprecated
52
+ * Theme prop is deprecated and will be removed in the future.
43
53
  */
44
54
  theme?: ThemeProp<CardTokens, {}>;
45
55
  /**
46
- * Width of the card in pixels
56
+ * Width of the card in pixels.
47
57
  */
48
58
  width?: number;
49
- innerRef?: Ref<HTMLElement> | null;
59
+ /**
60
+ * @deprecated
61
+ * Use `ref` instead.
62
+ */
63
+ innerRef?: Ref<HTMLDivElement> | null;
50
64
  /**
51
65
  * A `testId` prop is provided for specified elements,
52
66
  * which is a unique string that appears as a data attribute `data-testid` in the rendered code,
@@ -54,10 +68,14 @@ interface SpotlightCardProps {
54
68
  */
55
69
  testId?: string;
56
70
  }
57
- declare const _default: React.ForwardRefExoticComponent<SpotlightCardProps & React.RefAttributes<HTMLElement>>;
58
71
  /**
59
72
  * __Spotlight card__
60
73
  *
61
- * - [Examples](https://atlaskit.atlassian.com/packages/design-system/onboarding)
74
+ * A spotlight card is for onboarding messages that need a more flexible layout, or don't require a dialog.
75
+ *
76
+ * - [Examples](https://atlassian.design/components/onboarding/spotlight-card/examples)
77
+ * - [Code](https://atlassian.design/components/onboarding/spotlight-card/code)
78
+ * - [Usage](https://atlassian.design/components/onboarding/spotlight-card/usage)
62
79
  */
63
- export default _default;
80
+ declare const SpotlightCard: React.ForwardRefExoticComponent<SpotlightCardProps & React.RefAttributes<HTMLDivElement>>;
81
+ export default SpotlightCard;
@@ -27,16 +27,18 @@ interface SpotlightManagerProps {
27
27
  children: ReactNode;
28
28
  /**
29
29
  * @deprecated
30
- * Replaces the wrapping fragment with component
30
+ * Component is deprecated and will be removed in the future.
31
31
  */
32
32
  component?: ElementType;
33
33
  }
34
34
  /**
35
35
  * __Spotlight manager__
36
36
  *
37
- * Wraps usage of spotlight and manages progression through multiple spotlights.
37
+ * A spotlight manager manages the visibility of spotlights used to introduce new features to users through focused messages or multi-step tours.
38
38
  *
39
- * - [Examples](https://atlaskit.atlassian.com/packages/design-system/onboarding)
39
+ * - [Examples](https://atlassian.design/components/onboarding/examples)
40
+ * - [Code](https://atlassian.design/components/onboarding/code)
41
+ * - [Usage](https://atlassian.design/components/onboarding/usage)
40
42
  */
41
43
  export default class SpotlightManager extends PureComponent<SpotlightManagerProps, {
42
44
  spotlightCount: number;
@@ -12,9 +12,11 @@ interface SpotlightTargetProps {
12
12
  /**
13
13
  * __Spotlight target__
14
14
  *
15
- * Wraps an element, allowing it to be targeted by a spotlight.
15
+ * A spotlight target marks a component to be used for introducing new features to users through focused messages or multi-step tours.
16
16
  *
17
- * - [Examples](https://atlaskit.atlassian.com/packages/design-system/onboarding)
17
+ * - [Examples](https://atlassian.design/components/onboarding/examples)
18
+ * - [Code](https://atlassian.design/components/onboarding/code)
19
+ * - [Usage](https://atlassian.design/components/onboarding/usage)
18
20
  */
19
21
  declare const SpotlightTarget: React.FC<SpotlightTargetProps>;
20
22
  export default SpotlightTarget;
@@ -16,9 +16,11 @@ interface SpotlightTransitionContextModel {
16
16
  /**
17
17
  * __Spotlight transition__
18
18
  *
19
- * Provides context used for fading animations.
19
+ * A spotlight transition holds onto spotlights so they can fade out when exiting the viewport.
20
20
  *
21
- * - [Examples](https://atlaskit.atlassian.com/packages/design-system/onboarding)
21
+ * - [Examples](https://atlassian.design/components/onboarding/examples)
22
+ * - [Code](https://atlassian.design/components/onboarding/code)
23
+ * - [Usage](https://atlassian.design/components/onboarding/usage)
22
24
  */
23
25
  declare class SpotlightTransition extends React.Component<SpotlightTransitionProps, State> {
24
26
  static getDerivedStateFromProps(props: SpotlightTransitionProps, state: State): {
@@ -86,11 +86,11 @@ export interface SpotlightProps {
86
86
  /**
87
87
  * __Spotlight__
88
88
  *
89
- * A spotlight gives visual focus to an element and is paired with a dialog.
89
+ * An onboarding spotlight introduces new features to users through focused messages or multi-step tours.
90
90
  *
91
- * Spotlights are used for onboarding and can be connected to create a tour.
92
- *
93
- * - [Examples](https://atlaskit.atlassian.com/packages/design-system/onboarding)
91
+ * - [Examples](https://atlassian.design/components/onboarding/examples)
92
+ * - [Code](https://atlassian.design/components/onboarding/code)
93
+ * - [Usage](https://atlassian.design/components/onboarding/usage)
94
94
  */
95
95
  declare const Spotlight: React.FC<SpotlightProps>;
96
96
  export default Spotlight;
@@ -1,2 +1,10 @@
1
+ /**
2
+ * @deprecated
3
+ * Custom button themes are deprecated and will be removed in the future.
4
+ */
1
5
  export declare const spotlightButtonTheme: (current: any, themeProps: Record<string, any>) => any;
6
+ /**
7
+ * @deprecated
8
+ * Custom button themes are deprecated and will be removed in the future.
9
+ */
2
10
  export declare const modalButtonTheme: (current: any, themeProps: Record<string, any>) => any;
@@ -1,11 +1,5 @@
1
1
  /**
2
- * Enables advanced usage of spotlights.
3
- *
4
- * Provides the following methods:
5
- * - `isTargetRendered`
6
- *
7
- * Checks if the given spotlight target is currently
8
- * being rendered.
2
+ * Use spotlight hook returns information about available spotlight targets.
9
3
  */
10
4
  export default function useSpotlight(): {
11
5
  isTargetRendered: (target: string) => boolean;
@@ -28,11 +28,13 @@ export declare const TargetInner: React.FC<TargetProps>;
28
28
  */
29
29
  export declare const TargetOverlay: React.FC<React.HTMLAttributes<HTMLDivElement>>;
30
30
  /**
31
- * __Pulse__
31
+ * __Spotlight pulse__
32
32
  *
33
- * Allows consumers to apply the spotlight pulse effect in a custom way.
33
+ * A spotlight pulse draws attention to a new feature.
34
34
  *
35
- * - [Examples](https://atlaskit.atlassian.com/packages/design-system/onboarding)
35
+ * - [Examples](https://atlassian.design/components/onboarding/examples)
36
+ * - [Code](https://atlassian.design/components/onboarding/code)
37
+ * - [Usage](https://atlassian.design/components/onboarding/usage)
36
38
  */
37
39
  export declare const Pulse: React.FC<TargetProps>;
38
40
  export {};