@atlaskit/onboarding 10.4.1 → 10.5.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.
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
package/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
1
1
  # @atlaskit/onboarding
2
2
 
3
+ ## 10.5.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`994508770f7`](https://bitbucket.org/atlassian/atlassian-frontend/commits/994508770f7) - Bumps the `@atlaskit/heading` dependency forward to a higher minimum version.
8
+
9
+ ## 10.5.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [`0c0a8c64d54`](https://bitbucket.org/atlassian/atlassian-frontend/commits/0c0a8c64d54) - Removes internal usage of the deprecated theme prop.
14
+
15
+ ### Patch Changes
16
+
17
+ - [`a3241bd63a3`](https://bitbucket.org/atlassian/atlassian-frontend/commits/a3241bd63a3) - Updates jsdoc for all exported outputs of onboarding.
18
+ - Updated dependencies
19
+
20
+ ## 10.4.2
21
+
22
+ ### Patch Changes
23
+
24
+ - [`8a5bdb3c844`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8a5bdb3c844) - Upgrading internal dependency (bind-event-listener) for improved internal types
25
+
3
26
  ## 10.4.1
4
27
 
5
28
  ### Patch Changes
@@ -50,26 +50,24 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
50
50
 
51
51
  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; } }
52
52
 
53
- function noop() {}
54
53
  /**
55
- * __Onboarding modal__
54
+ * __Benefits modal__
56
55
  *
57
- * If the product change is large enough,
58
- * this component can be used to outline the benefits of the change to the user.
56
+ * A benefits modal explains the benefits of a significant new feature or experience change.
59
57
  *
60
- * - [Examples](https://atlaskit.atlassian.com/packages/design-system/onboarding)
58
+ * - [Examples](https://atlassian.design/components/onboarding/benefits-modal/examples)
59
+ * - [Code](https://atlassian.design/components/onboarding/benefits-modal/code)
60
+ * - [Usage](https://atlassian.design/components/onboarding/benefits-modal/usage)
61
61
  */
62
+ var BenefitsModal = /*#__PURE__*/function (_Component) {
63
+ (0, _inherits2.default)(BenefitsModal, _Component);
62
64
 
65
+ var _super = _createSuper(BenefitsModal);
63
66
 
64
- var OnboardingModal = /*#__PURE__*/function (_Component) {
65
- (0, _inherits2.default)(OnboardingModal, _Component);
66
-
67
- var _super = _createSuper(OnboardingModal);
68
-
69
- function OnboardingModal() {
67
+ function BenefitsModal() {
70
68
  var _this;
71
69
 
72
- (0, _classCallCheck2.default)(this, OnboardingModal);
70
+ (0, _classCallCheck2.default)(this, BenefitsModal);
73
71
 
74
72
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
75
73
  args[_key] = arguments[_key];
@@ -119,7 +117,7 @@ var OnboardingModal = /*#__PURE__*/function (_Component) {
119
117
  return _this;
120
118
  }
121
119
 
122
- (0, _createClass2.default)(OnboardingModal, [{
120
+ (0, _createClass2.default)(BenefitsModal, [{
123
121
  key: "render",
124
122
  value: function render() {
125
123
  var _this$props = this.props,
@@ -131,14 +129,13 @@ var OnboardingModal = /*#__PURE__*/function (_Component) {
131
129
  var Footer = this.footerComponent(this.props);
132
130
  return (0, _core.jsx)(_modalDialog.default, (0, _extends2.default)({
133
131
  autoFocus: true,
134
- onClose: noop,
135
132
  shouldScrollInViewport: true,
136
133
  shouldCloseOnOverlayClick: false,
137
134
  shouldCloseOnEscapePress: false
138
135
  }, props), (0, _core.jsx)(Header, null), (0, _core.jsx)(_modalDialog.ModalBody, null, (0, _core.jsx)(_modal.ModalBody, null, heading && (0, _core.jsx)(_modal.ModalHeading, null, heading), children)), (0, _core.jsx)(Footer, null));
139
136
  }
140
137
  }]);
141
- return OnboardingModal;
138
+ return BenefitsModal;
142
139
  }(_react.Component);
143
140
 
144
- exports.default = OnboardingModal;
141
+ exports.default = BenefitsModal;
@@ -2,126 +2,159 @@
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
4
 
5
+ var _typeof = require("@babel/runtime/helpers/typeof");
6
+
5
7
  Object.defineProperty(exports, "__esModule", {
6
8
  value: true
7
9
  });
8
10
  exports.default = void 0;
9
11
 
10
- var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
11
-
12
12
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
13
13
 
14
- var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
14
+ var _react = _interopRequireWildcard(require("react"));
15
15
 
16
- var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
16
+ var _core = require("@emotion/core");
17
17
 
18
- var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
18
+ var _customThemeButton = _interopRequireWildcard(require("@atlaskit/button/custom-theme-button"));
19
19
 
20
- var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
20
+ var _heading = _interopRequireDefault(require("@atlaskit/heading"));
21
21
 
22
- var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
22
+ var _colors = require("@atlaskit/theme/colors");
23
23
 
24
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
24
+ var _components = require("@atlaskit/theme/components");
25
25
 
26
- var _react = _interopRequireDefault(require("react"));
26
+ var _constants = require("@atlaskit/theme/constants");
27
27
 
28
- var _customThemeButton = require("@atlaskit/button/custom-theme-button");
28
+ var _dialog = require("../styled/dialog");
29
29
 
30
- var _colors = require("@atlaskit/theme/colors");
30
+ var _theme = require("./theme");
31
31
 
32
- var _card = _interopRequireDefault(require("./card"));
33
-
34
- var _theme2 = require("./theme");
35
-
36
- var _excluded = ["container"];
37
-
38
- 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; }
39
-
40
- 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; }
41
-
42
- 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); }; }
43
-
44
- 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; } }
45
-
46
- var SpotlightCard = /*#__PURE__*/function (_React$Component) {
47
- (0, _inherits2.default)(SpotlightCard, _React$Component);
48
-
49
- var _super = _createSuper(SpotlightCard);
50
-
51
- function SpotlightCard() {
52
- (0, _classCallCheck2.default)(this, SpotlightCard);
53
- return _super.apply(this, arguments);
54
- }
55
-
56
- (0, _createClass2.default)(SpotlightCard, [{
57
- key: "render",
58
- value: function render() {
59
- var _this$props = this.props,
60
- actions = _this$props.actions,
61
- actionsBeforeElement = _this$props.actionsBeforeElement,
62
- children = _this$props.children,
63
- components = _this$props.components,
64
- isFlat = _this$props.isFlat,
65
- heading = _this$props.heading,
66
- headingAfterElement = _this$props.headingAfterElement,
67
- image = _this$props.image,
68
- innerRef = _this$props.innerRef,
69
- _theme = _this$props.theme,
70
- width = _this$props.width,
71
- testId = _this$props.testId;
72
- return /*#__PURE__*/_react.default.createElement(_customThemeButton.Theme.Provider, {
73
- value: _theme2.spotlightButtonTheme
74
- }, /*#__PURE__*/_react.default.createElement(_card.default, {
75
- testId: testId,
76
- ref: innerRef,
77
- heading: heading,
78
- headingAfterElement: headingAfterElement,
79
- actions: actions,
80
- actionsBeforeElement: actionsBeforeElement,
81
- components: components,
82
- image: image // eslint-disable-next-line @repo/internal/react/no-unsafe-overrides
83
- ,
84
- theme: function theme(parent) {
85
- var _parent = parent({}),
86
- container = _parent.container,
87
- others = (0, _objectWithoutProperties2.default)(_parent, _excluded);
88
-
89
- return _theme(function () {
90
- return _objectSpread(_objectSpread({}, others), {}, {
91
- container: _objectSpread({
92
- background: "var(--ds-background-discovery-bold, ".concat(_colors.P300, ")"),
93
- color: "var(--ds-text-inverse, ".concat(_colors.N0, ")"),
94
- width: "".concat(Math.min(Math.max(width, 160), 600), "px"),
95
- boxShadow: isFlat ? undefined : "var(--ds-shadow-raised, ".concat("0 4px 8px -2px ".concat(_colors.N50A, ", 0 0 1px ").concat(_colors.N60A), ")")
96
- }, container)
97
- });
98
- }, {});
99
- }
100
- }, children));
101
- }
102
- }]);
103
- return SpotlightCard;
104
- }(_react.default.Component);
105
- /**
106
- * __Spotlight card__
107
- *
108
- * - [Examples](https://atlaskit.atlassian.com/packages/design-system/onboarding)
109
- */
32
+ var _excluded = ["text", "key"];
33
+
34
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
110
35
 
36
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
111
37
 
112
- (0, _defineProperty2.default)(SpotlightCard, "defaultProps", {
113
- width: 400,
114
- isFlat: false,
115
- components: {},
116
- theme: function theme(themeFn) {
117
- return themeFn();
118
- }
38
+ var gridSize = (0, _constants.gridSize)();
39
+ var bodyStyles = (0, _core.css)({
40
+ display: 'flex',
41
+ padding: "".concat(gridSize * 2, "px ").concat(gridSize * 2.5, "px"),
42
+ flexDirection: 'column'
43
+ });
44
+ var defaultHeaderStyles = (0, _core.css)({
45
+ display: 'flex',
46
+ paddingBottom: "".concat(gridSize, "px"),
47
+ alignItems: 'baseline',
48
+ justifyContent: 'space-between'
119
49
  });
120
50
 
121
- var _default = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
122
- return /*#__PURE__*/_react.default.createElement(SpotlightCard, (0, _extends2.default)({}, props, {
123
- innerRef: ref
124
- }));
51
+ var DefaultHeader = function DefaultHeader(_ref) {
52
+ var children = _ref.children;
53
+ return (0, _core.jsx)("div", {
54
+ css: defaultHeaderStyles
55
+ }, children);
56
+ };
57
+
58
+ var defaultFooterStyles = (0, _core.css)({
59
+ display: 'flex',
60
+ paddingTop: "".concat(gridSize, "px"),
61
+ alignItems: 'center',
62
+ justifyContent: 'space-between'
125
63
  });
126
64
 
65
+ var DefaultFooter = function DefaultFooter(_ref2) {
66
+ var children = _ref2.children;
67
+ return (0, _core.jsx)("div", {
68
+ css: defaultFooterStyles
69
+ }, children);
70
+ };
71
+
72
+ var containerStyles = (0, _core.css)({
73
+ height: 'fit-content',
74
+ zIndex: _constants.layers.spotlight() + 1,
75
+ background: "var(--ds-background-discovery-bold, ".concat(_colors.P300, ")"),
76
+ borderRadius: "".concat((0, _constants.borderRadius)(), "px"),
77
+ color: "var(--ds-text-inverse, ".concat(_colors.N0, ")"),
78
+ overflow: 'auto'
79
+ });
80
+ var containerShadowStyles = (0, _core.css)({
81
+ boxShadow: "var(--ds-shadow-raised, ".concat("0 4px 8px -2px ".concat(_colors.N50A, ", 0 0 1px ").concat(_colors.N60A), ")")
82
+ });
83
+ /**
84
+ * @deprecated
85
+ */
86
+
87
+ var Theme = (0, _components.createTheme)(function () {
88
+ return {
89
+ container: {}
90
+ };
91
+ });
92
+ /**
93
+ * @deprecated
94
+ */
95
+
96
+ /**
97
+ * __Spotlight card__
98
+ *
99
+ * A spotlight card is for onboarding messages that need a more flexible layout, or don't require a dialog.
100
+ *
101
+ * - [Examples](https://atlassian.design/components/onboarding/spotlight-card/examples)
102
+ * - [Code](https://atlassian.design/components/onboarding/spotlight-card/code)
103
+ * - [Usage](https://atlassian.design/components/onboarding/spotlight-card/usage)
104
+ */
105
+ var SpotlightCard = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
106
+ var _props$actions = props.actions,
107
+ actions = _props$actions === void 0 ? [] : _props$actions,
108
+ actionsBeforeElement = props.actionsBeforeElement,
109
+ children = props.children,
110
+ _props$components = props.components,
111
+ components = _props$components === void 0 ? {} : _props$components,
112
+ heading = props.heading,
113
+ headingAfterElement = props.headingAfterElement,
114
+ image = props.image,
115
+ innerRef = props.innerRef,
116
+ isFlat = props.isFlat,
117
+ testId = props.testId,
118
+ theme = props.theme,
119
+ _props$width = props.width,
120
+ width = _props$width === void 0 ? 400 : _props$width;
121
+ var _components$Header = components.Header,
122
+ Header = _components$Header === void 0 ? DefaultHeader : _components$Header,
123
+ _components$Footer = components.Footer,
124
+ Footer = _components$Footer === void 0 ? DefaultFooter : _components$Footer;
125
+ return (0, _core.jsx)(_customThemeButton.Theme.Provider, {
126
+ value: _theme.spotlightButtonTheme
127
+ }, (0, _core.jsx)(Theme.Provider, {
128
+ value: theme
129
+ }, (0, _core.jsx)(Theme.Consumer, null, function (_ref3) {
130
+ var container = _ref3.container;
131
+ return (0, _core.jsx)("div", {
132
+ css: [containerStyles, !isFlat && containerShadowStyles, // eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
133
+ container],
134
+ style: {
135
+ width: "".concat(Math.min(Math.max(width, 160), 600), "px")
136
+ },
137
+ ref: ref || innerRef,
138
+ "data-testid": testId
139
+ }, typeof image === 'string' ? (0, _core.jsx)("img", {
140
+ src: image,
141
+ alt: ""
142
+ }) : image, (0, _core.jsx)("div", {
143
+ css: bodyStyles
144
+ }, heading || headingAfterElement ? (0, _core.jsx)(Header, null, (0, _core.jsx)(_heading.default, {
145
+ color: "inverse",
146
+ level: "h600",
147
+ as: "h4"
148
+ }, heading), headingAfterElement) : null, children, actions.length > 0 || actionsBeforeElement ? (0, _core.jsx)(Footer, null, actionsBeforeElement || (0, _core.jsx)("span", null), (0, _core.jsx)(_dialog.DialogActionItemContainer, null, actions.map(function (_ref4, idx) {
149
+ var text = _ref4.text,
150
+ key = _ref4.key,
151
+ rest = (0, _objectWithoutProperties2.default)(_ref4, _excluded);
152
+ return (0, _core.jsx)(_dialog.DialogActionItem, {
153
+ key: key || (typeof text === 'string' ? text : "".concat(idx))
154
+ }, (0, _core.jsx)(_customThemeButton.default, rest, text));
155
+ }))) : null));
156
+ })));
157
+ });
158
+ SpotlightCard.displayName = 'SpotlightCard';
159
+ var _default = SpotlightCard;
127
160
  exports.default = _default;
@@ -9,8 +9,6 @@ Object.defineProperty(exports, "__esModule", {
9
9
  });
10
10
  exports.default = void 0;
11
11
 
12
- var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
13
-
14
12
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
15
13
 
16
14
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
@@ -39,8 +37,6 @@ var _spotlightCard = _interopRequireDefault(require("./spotlight-card"));
39
37
 
40
38
  var _valueChanged = _interopRequireDefault(require("./value-changed"));
41
39
 
42
- var _excluded = ["container"];
43
-
44
40
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
45
41
 
46
42
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
@@ -54,7 +50,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
54
50
  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
51
 
56
52
  var packageName = "@atlaskit/onboarding";
57
- var packageVersion = "10.4.1";
53
+ var packageVersion = "10.5.1";
58
54
 
59
55
  var SpotlightDialog = /*#__PURE__*/function (_Component) {
60
56
  (0, _inherits2.default)(SpotlightDialog, _Component);
@@ -154,19 +150,11 @@ var SpotlightDialog = /*#__PURE__*/function (_Component) {
154
150
  disabled: focusLockDisabled,
155
151
  returnFocus: false,
156
152
  autoFocus: true
157
- }, /*#__PURE__*/_react.default.createElement(_spotlightCard.default, {
153
+ }, /*#__PURE__*/_react.default.createElement("div", {
158
154
  ref: ref,
159
- testId: testId // eslint-disable-next-line @repo/internal/react/no-unsafe-overrides
160
- ,
161
- theme: function theme(parent) {
162
- var _parent = parent({}),
163
- container = _parent.container,
164
- others = (0, _objectWithoutProperties2.default)(_parent, _excluded);
165
-
166
- return _objectSpread(_objectSpread({}, others), {}, {
167
- container: _objectSpread(_objectSpread(_objectSpread({}, container), style), animationStyles)
168
- });
169
- },
155
+ style: _objectSpread(_objectSpread({}, style), animationStyles)
156
+ }, /*#__PURE__*/_react.default.createElement(_spotlightCard.default, {
157
+ testId: testId,
170
158
  width: dialogWidth,
171
159
  actions: actions,
172
160
  actionsBeforeElement: actionsBeforeElement,
@@ -180,7 +168,7 @@ var SpotlightDialog = /*#__PURE__*/function (_Component) {
180
168
  },
181
169
  heading: heading,
182
170
  headingAfterElement: headingAfterElement
183
- }, children)));
171
+ }, children))));
184
172
  });
185
173
  }
186
174
  }]);
@@ -27,6 +27,8 @@ var _react = _interopRequireWildcard(require("react"));
27
27
 
28
28
  var _memoizeOne = _interopRequireDefault(require("memoize-one"));
29
29
 
30
+ var _noop = _interopRequireDefault(require("@atlaskit/ds-lib/noop"));
31
+
30
32
  var _portal = _interopRequireDefault(require("@atlaskit/portal"));
31
33
 
32
34
  var _constants = require("@atlaskit/theme/constants");
@@ -47,16 +49,14 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
47
49
 
48
50
  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; } }
49
51
 
50
- var noop = function noop() {};
51
-
52
52
  var _createContext = /*#__PURE__*/(0, _react.createContext)(undefined),
53
53
  TargetConsumer = _createContext.Consumer,
54
54
  TargetProvider = _createContext.Provider;
55
55
 
56
56
  exports.TargetConsumer = TargetConsumer;
57
57
  var SpotlightContext = /*#__PURE__*/(0, _react.createContext)({
58
- opened: noop,
59
- closed: noop,
58
+ opened: _noop.default,
59
+ closed: _noop.default,
60
60
  targets: {}
61
61
  });
62
62
  exports.SpotlightContext = SpotlightContext;
@@ -72,9 +72,11 @@ var Container = function Container(_ref) {
72
72
  /**
73
73
  * __Spotlight manager__
74
74
  *
75
- * Wraps usage of spotlight and manages progression through multiple spotlights.
75
+ * A spotlight manager manages the visibility of spotlights used to introduce new features to users through focused messages or multi-step tours.
76
76
  *
77
- * - [Examples](https://atlaskit.atlassian.com/packages/design-system/onboarding)
77
+ * - [Examples](https://atlassian.design/components/onboarding/examples)
78
+ * - [Code](https://atlassian.design/components/onboarding/code)
79
+ * - [Usage](https://atlassian.design/components/onboarding/usage)
78
80
  */
79
81
 
80
82
 
@@ -16,9 +16,11 @@ var _spotlightManager = require("./spotlight-manager");
16
16
  /**
17
17
  * __Spotlight target__
18
18
  *
19
- * Wraps an element, allowing it to be targeted by a spotlight.
19
+ * A spotlight target marks a component to be used for introducing new features to users through focused messages or multi-step tours.
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
  var SpotlightTarget = function SpotlightTarget(_ref) {
24
26
  var children = _ref.children,
@@ -25,6 +25,8 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
25
25
 
26
26
  var _react = _interopRequireWildcard(require("react"));
27
27
 
28
+ var _noop = _interopRequireDefault(require("@atlaskit/ds-lib/noop"));
29
+
28
30
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
29
31
 
30
32
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
@@ -35,7 +37,7 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
35
37
 
36
38
  var SpotlightTransitionContext = /*#__PURE__*/(0, _react.createContext)({
37
39
  isOpen: true,
38
- onExited: function onExited() {}
40
+ onExited: _noop.default
39
41
  }); // checks if children exist and are truthy
40
42
 
41
43
  var hasChildren = function hasChildren(children) {
@@ -46,9 +48,11 @@ var hasChildren = function hasChildren(children) {
46
48
  /**
47
49
  * __Spotlight transition__
48
50
  *
49
- * Provides context used for fading animations.
51
+ * A spotlight transition holds onto spotlights so they can fade out when exiting the viewport.
50
52
  *
51
- * - [Examples](https://atlaskit.atlassian.com/packages/design-system/onboarding)
53
+ * - [Examples](https://atlassian.design/components/onboarding/examples)
54
+ * - [Code](https://atlassian.design/components/onboarding/code)
55
+ * - [Usage](https://atlassian.design/components/onboarding/usage)
52
56
  */
53
57
 
54
58
 
@@ -22,11 +22,11 @@ var _excluded = ["dialogWidth", "pulse", "testId", "targetNode", "target"];
22
22
  /**
23
23
  * __Spotlight__
24
24
  *
25
- * A spotlight gives visual focus to an element and is paired with a dialog.
25
+ * An onboarding spotlight introduces new features to users through focused messages or multi-step tours.
26
26
  *
27
- * Spotlights are used for onboarding and can be connected to create a tour.
28
- *
29
- * - [Examples](https://atlaskit.atlassian.com/packages/design-system/onboarding)
27
+ * - [Examples](https://atlassian.design/components/onboarding/examples)
28
+ * - [Code](https://atlassian.design/components/onboarding/code)
29
+ * - [Usage](https://atlassian.design/components/onboarding/usage)
30
30
  */
31
31
  var Spotlight = function Spotlight(_ref) {
32
32
  var _ref$dialogWidth = _ref.dialogWidth,
@@ -165,6 +165,11 @@ function extract(newTheme, _ref) {
165
165
  return acc;
166
166
  }, {});
167
167
  }
168
+ /**
169
+ * @deprecated
170
+ * Custom button themes are deprecated and will be removed in the future.
171
+ */
172
+
168
173
 
169
174
  var spotlightButtonTheme = function spotlightButtonTheme(current, themeProps) {
170
175
  var _current = current(themeProps),
@@ -175,6 +180,11 @@ var spotlightButtonTheme = function spotlightButtonTheme(current, themeProps) {
175
180
  buttonStyles: _objectSpread(_objectSpread({}, buttonStyles), extract(spotlightTheme, themeProps))
176
181
  }, rest);
177
182
  };
183
+ /**
184
+ * @deprecated
185
+ * Custom button themes are deprecated and will be removed in the future.
186
+ */
187
+
178
188
 
179
189
  exports.spotlightButtonTheme = spotlightButtonTheme;
180
190
 
@@ -10,13 +10,7 @@ var _react = require("react");
10
10
  var _spotlightManager = require("./spotlight-manager");
11
11
 
12
12
  /**
13
- * Enables advanced usage of spotlights.
14
- *
15
- * Provides the following methods:
16
- * - `isTargetRendered`
17
- *
18
- * Checks if the given spotlight target is currently
19
- * being rendered.
13
+ * Use spotlight hook returns information about available spotlight targets.
20
14
  */
21
15
  function useSpotlight() {
22
16
  var _useContext = (0, _react.useContext)(_spotlightManager.SpotlightContext),
@@ -114,11 +114,13 @@ var TargetOverlay = function TargetOverlay(props) {
114
114
  }));
115
115
  };
116
116
  /**
117
- * __Pulse__
117
+ * __Spotlight pulse__
118
118
  *
119
- * Allows consumers to apply the spotlight pulse effect in a custom way.
119
+ * A spotlight pulse draws attention to a new feature.
120
120
  *
121
- * - [Examples](https://atlaskit.atlassian.com/packages/design-system/onboarding)
121
+ * - [Examples](https://atlassian.design/components/onboarding/examples)
122
+ * - [Code](https://atlassian.design/components/onboarding/code)
123
+ * - [Usage](https://atlassian.design/components/onboarding/usage)
122
124
  */
123
125
 
124
126
 
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/onboarding",
3
- "version": "10.4.1",
3
+ "version": "10.5.1",
4
4
  "sideEffects": false
5
5
  }
@@ -9,18 +9,16 @@ import Modal, { ModalBody } from '@atlaskit/modal-dialog';
9
9
  import { ModalBody as Body, ModalHeading as Heading, ModalActionContainer, ModalActionItem, ModalImage } from '../styled/modal';
10
10
  import { modalButtonTheme } from './theme'; // TODO: DSP-1250 - use a composable API consistent with normal modal dialog
11
11
 
12
- function noop() {}
13
12
  /**
14
- * __Onboarding modal__
13
+ * __Benefits modal__
15
14
  *
16
- * If the product change is large enough,
17
- * this component can be used to outline the benefits of the change to the user.
15
+ * A benefits modal explains the benefits of a significant new feature or experience change.
18
16
  *
19
- * - [Examples](https://atlaskit.atlassian.com/packages/design-system/onboarding)
17
+ * - [Examples](https://atlassian.design/components/onboarding/benefits-modal/examples)
18
+ * - [Code](https://atlassian.design/components/onboarding/benefits-modal/code)
19
+ * - [Usage](https://atlassian.design/components/onboarding/benefits-modal/usage)
20
20
  */
21
-
22
-
23
- export default class OnboardingModal extends Component {
21
+ export default class BenefitsModal extends Component {
24
22
  constructor(...args) {
25
23
  super(...args);
26
24
 
@@ -78,7 +76,6 @@ export default class OnboardingModal extends Component {
78
76
  const Footer = this.footerComponent(this.props);
79
77
  return jsx(Modal, _extends({
80
78
  autoFocus: true,
81
- onClose: noop,
82
79
  shouldScrollInViewport: true,
83
80
  shouldCloseOnOverlayClick: false,
84
81
  shouldCloseOnEscapePress: false