@atlaskit/onboarding 11.2.5 → 11.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/cjs/components/modal.js +8 -1
- package/dist/cjs/components/spotlight-dialog.js +1 -1
- package/dist/cjs/components/spotlight-transition.js +3 -2
- package/dist/cjs/styled/modal.js +5 -3
- package/dist/es2019/components/modal.js +10 -2
- package/dist/es2019/components/spotlight-dialog.js +1 -1
- package/dist/es2019/components/spotlight-transition.js +4 -1
- package/dist/es2019/styled/modal.js +5 -3
- package/dist/esm/components/modal.js +9 -2
- package/dist/esm/components/spotlight-dialog.js +1 -1
- package/dist/esm/components/spotlight-transition.js +3 -2
- package/dist/esm/styled/modal.js +5 -3
- package/dist/types/styled/modal.d.ts +2 -1
- package/dist/types-ts4.5/styled/modal.d.ts +2 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/onboarding
|
|
2
2
|
|
|
3
|
+
## 11.2.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#85076](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/85076) [`3032fb024382`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/3032fb024382) - Associates the heading prop with the accessible label for the benefits modal.
|
|
8
|
+
|
|
9
|
+
## 11.2.6
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#83188](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/83188) [`cd5d06cd3329`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/cd5d06cd3329) - Minor adjustments to improve compatibility with React 18
|
|
14
|
+
|
|
3
15
|
## 11.2.5
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -95,12 +95,19 @@ var BenefitsModal = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
95
95
|
props = (0, _objectWithoutProperties2.default)(_this$props, _excluded2);
|
|
96
96
|
var Header = this.headerComponent(this.props);
|
|
97
97
|
var Footer = this.footerComponent(this.props);
|
|
98
|
+
var CustomHeader = function CustomHeader() {
|
|
99
|
+
var _useModal = (0, _modalDialog.useModal)(),
|
|
100
|
+
titleId = _useModal.titleId;
|
|
101
|
+
return (0, _react2.jsx)(_modal.ModalHeading, {
|
|
102
|
+
id: titleId
|
|
103
|
+
}, heading);
|
|
104
|
+
};
|
|
98
105
|
return (0, _react2.jsx)(_modalDialog.default, (0, _extends2.default)({
|
|
99
106
|
autoFocus: true,
|
|
100
107
|
shouldScrollInViewport: true,
|
|
101
108
|
shouldCloseOnOverlayClick: false,
|
|
102
109
|
shouldCloseOnEscapePress: false
|
|
103
|
-
}, props), (0, _react2.jsx)(Header, null), (0, _react2.jsx)(_modalDialog.ModalBody, null, (0, _react2.jsx)(_modal.ModalBody, null, heading && (0, _react2.jsx)(
|
|
110
|
+
}, props), (0, _react2.jsx)(Header, null), (0, _react2.jsx)(_modalDialog.ModalBody, null, (0, _react2.jsx)(_modal.ModalBody, null, heading && (0, _react2.jsx)(CustomHeader, null), children)), (0, _react2.jsx)(Footer, null));
|
|
104
111
|
}
|
|
105
112
|
}]);
|
|
106
113
|
return BenefitsModal;
|
|
@@ -27,7 +27,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
27
27
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
28
28
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
29
29
|
var packageName = "@atlaskit/onboarding";
|
|
30
|
-
var packageVersion = "11.2.
|
|
30
|
+
var packageVersion = "11.2.7";
|
|
31
31
|
var SpotlightDialog = /*#__PURE__*/function (_Component) {
|
|
32
32
|
(0, _inherits2.default)(SpotlightDialog, _Component);
|
|
33
33
|
var _super = _createSuper(SpotlightDialog);
|
|
@@ -26,9 +26,10 @@ var SpotlightTransitionContext = /*#__PURE__*/(0, _react.createContext)({
|
|
|
26
26
|
|
|
27
27
|
// checks if children exist and are truthy
|
|
28
28
|
var hasChildren = function hasChildren(children) {
|
|
29
|
-
|
|
29
|
+
var _React$Children$map;
|
|
30
|
+
return _react.default.Children.count(children) > 0 && (((_React$Children$map = _react.default.Children.map(children || false, function (child) {
|
|
30
31
|
return !!child;
|
|
31
|
-
}).filter(Boolean).length > 0;
|
|
32
|
+
})) === null || _React$Children$map === void 0 || (_React$Children$map = _React$Children$map.filter(Boolean)) === null || _React$Children$map === void 0 ? void 0 : _React$Children$map.length) || 0) > 0;
|
|
32
33
|
};
|
|
33
34
|
|
|
34
35
|
/**
|
package/dist/cjs/styled/modal.js
CHANGED
|
@@ -64,9 +64,11 @@ var ModalBody = exports.ModalBody = function ModalBody(_ref) {
|
|
|
64
64
|
* @internal
|
|
65
65
|
*/
|
|
66
66
|
var ModalHeading = exports.ModalHeading = function ModalHeading(_ref2) {
|
|
67
|
-
var children = _ref2.children
|
|
68
|
-
|
|
69
|
-
|
|
67
|
+
var children = _ref2.children,
|
|
68
|
+
id = _ref2.id;
|
|
69
|
+
return (0, _react.jsx)("h1", {
|
|
70
|
+
css: modalHeadingStyles,
|
|
71
|
+
id: id
|
|
70
72
|
}, children);
|
|
71
73
|
};
|
|
72
74
|
|
|
@@ -4,7 +4,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
4
4
|
import { Component } from 'react';
|
|
5
5
|
import { jsx } from '@emotion/react';
|
|
6
6
|
import Button, { Theme as ButtonTheme } from '@atlaskit/button/custom-theme-button';
|
|
7
|
-
import Modal, { ModalBody } from '@atlaskit/modal-dialog';
|
|
7
|
+
import Modal, { ModalBody, useModal } from '@atlaskit/modal-dialog';
|
|
8
8
|
import { ModalBody as Body, ModalHeading as Heading, ModalActionContainer, ModalActionItem, ModalImage } from '../styled/modal';
|
|
9
9
|
import { modalButtonTheme } from './theme';
|
|
10
10
|
|
|
@@ -68,11 +68,19 @@ export default class BenefitsModal extends Component {
|
|
|
68
68
|
} = this.props;
|
|
69
69
|
const Header = this.headerComponent(this.props);
|
|
70
70
|
const Footer = this.footerComponent(this.props);
|
|
71
|
+
const CustomHeader = () => {
|
|
72
|
+
const {
|
|
73
|
+
titleId
|
|
74
|
+
} = useModal();
|
|
75
|
+
return jsx(Heading, {
|
|
76
|
+
id: titleId
|
|
77
|
+
}, heading);
|
|
78
|
+
};
|
|
71
79
|
return jsx(Modal, _extends({
|
|
72
80
|
autoFocus: true,
|
|
73
81
|
shouldScrollInViewport: true,
|
|
74
82
|
shouldCloseOnOverlayClick: false,
|
|
75
83
|
shouldCloseOnEscapePress: false
|
|
76
|
-
}, props), jsx(Header, null), jsx(ModalBody, null, jsx(Body, null, heading && jsx(
|
|
84
|
+
}, props), jsx(Header, null), jsx(ModalBody, null, jsx(Body, null, heading && jsx(CustomHeader, null), children)), jsx(Footer, null));
|
|
77
85
|
}
|
|
78
86
|
}
|
|
@@ -7,7 +7,7 @@ import { DialogImage } from '../styled/dialog';
|
|
|
7
7
|
import SpotlightCard from './spotlight-card';
|
|
8
8
|
import ValueChanged from './value-changed';
|
|
9
9
|
const packageName = "@atlaskit/onboarding";
|
|
10
|
-
const packageVersion = "11.2.
|
|
10
|
+
const packageVersion = "11.2.7";
|
|
11
11
|
class SpotlightDialog extends Component {
|
|
12
12
|
constructor(...args) {
|
|
13
13
|
super(...args);
|
|
@@ -7,7 +7,10 @@ const SpotlightTransitionContext = /*#__PURE__*/createContext({
|
|
|
7
7
|
});
|
|
8
8
|
|
|
9
9
|
// checks if children exist and are truthy
|
|
10
|
-
const hasChildren = children =>
|
|
10
|
+
const hasChildren = children => {
|
|
11
|
+
var _React$Children$map, _React$Children$map$f;
|
|
12
|
+
return React.Children.count(children) > 0 && (((_React$Children$map = React.Children.map(children || false, child => !!child)) === null || _React$Children$map === void 0 ? void 0 : (_React$Children$map$f = _React$Children$map.filter(Boolean)) === null || _React$Children$map$f === void 0 ? void 0 : _React$Children$map$f.length) || 0) > 0;
|
|
13
|
+
};
|
|
11
14
|
|
|
12
15
|
/**
|
|
13
16
|
* __Spotlight transition__
|
|
@@ -57,10 +57,12 @@ export const ModalBody = ({
|
|
|
57
57
|
* @internal
|
|
58
58
|
*/
|
|
59
59
|
export const ModalHeading = ({
|
|
60
|
-
children
|
|
60
|
+
children,
|
|
61
|
+
id
|
|
61
62
|
}) => {
|
|
62
|
-
return jsx("
|
|
63
|
-
css: modalHeadingStyles
|
|
63
|
+
return jsx("h1", {
|
|
64
|
+
css: modalHeadingStyles,
|
|
65
|
+
id: id
|
|
64
66
|
}, children);
|
|
65
67
|
};
|
|
66
68
|
|
|
@@ -15,7 +15,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
15
15
|
import { Component } from 'react';
|
|
16
16
|
import { jsx } from '@emotion/react';
|
|
17
17
|
import Button, { Theme as ButtonTheme } from '@atlaskit/button/custom-theme-button';
|
|
18
|
-
import Modal, { ModalBody } from '@atlaskit/modal-dialog';
|
|
18
|
+
import Modal, { ModalBody, useModal } from '@atlaskit/modal-dialog';
|
|
19
19
|
import { ModalBody as Body, ModalHeading as Heading, ModalActionContainer, ModalActionItem, ModalImage } from '../styled/modal';
|
|
20
20
|
import { modalButtonTheme } from './theme';
|
|
21
21
|
|
|
@@ -87,12 +87,19 @@ var BenefitsModal = /*#__PURE__*/function (_Component) {
|
|
|
87
87
|
props = _objectWithoutProperties(_this$props, _excluded2);
|
|
88
88
|
var Header = this.headerComponent(this.props);
|
|
89
89
|
var Footer = this.footerComponent(this.props);
|
|
90
|
+
var CustomHeader = function CustomHeader() {
|
|
91
|
+
var _useModal = useModal(),
|
|
92
|
+
titleId = _useModal.titleId;
|
|
93
|
+
return jsx(Heading, {
|
|
94
|
+
id: titleId
|
|
95
|
+
}, heading);
|
|
96
|
+
};
|
|
90
97
|
return jsx(Modal, _extends({
|
|
91
98
|
autoFocus: true,
|
|
92
99
|
shouldScrollInViewport: true,
|
|
93
100
|
shouldCloseOnOverlayClick: false,
|
|
94
101
|
shouldCloseOnEscapePress: false
|
|
95
|
-
}, props), jsx(Header, null), jsx(ModalBody, null, jsx(Body, null, heading && jsx(
|
|
102
|
+
}, props), jsx(Header, null), jsx(ModalBody, null, jsx(Body, null, heading && jsx(CustomHeader, null), children)), jsx(Footer, null));
|
|
96
103
|
}
|
|
97
104
|
}]);
|
|
98
105
|
return BenefitsModal;
|
|
@@ -17,7 +17,7 @@ import { DialogImage } from '../styled/dialog';
|
|
|
17
17
|
import SpotlightCard from './spotlight-card';
|
|
18
18
|
import ValueChanged from './value-changed';
|
|
19
19
|
var packageName = "@atlaskit/onboarding";
|
|
20
|
-
var packageVersion = "11.2.
|
|
20
|
+
var packageVersion = "11.2.7";
|
|
21
21
|
var SpotlightDialog = /*#__PURE__*/function (_Component) {
|
|
22
22
|
_inherits(SpotlightDialog, _Component);
|
|
23
23
|
var _super = _createSuper(SpotlightDialog);
|
|
@@ -16,9 +16,10 @@ var SpotlightTransitionContext = /*#__PURE__*/createContext({
|
|
|
16
16
|
|
|
17
17
|
// checks if children exist and are truthy
|
|
18
18
|
var hasChildren = function hasChildren(children) {
|
|
19
|
-
|
|
19
|
+
var _React$Children$map;
|
|
20
|
+
return React.Children.count(children) > 0 && (((_React$Children$map = React.Children.map(children || false, function (child) {
|
|
20
21
|
return !!child;
|
|
21
|
-
}).filter(Boolean).length > 0;
|
|
22
|
+
})) === null || _React$Children$map === void 0 || (_React$Children$map = _React$Children$map.filter(Boolean)) === null || _React$Children$map === void 0 ? void 0 : _React$Children$map.length) || 0) > 0;
|
|
22
23
|
};
|
|
23
24
|
|
|
24
25
|
/**
|
package/dist/esm/styled/modal.js
CHANGED
|
@@ -58,9 +58,11 @@ export var ModalBody = function ModalBody(_ref) {
|
|
|
58
58
|
* @internal
|
|
59
59
|
*/
|
|
60
60
|
export var ModalHeading = function ModalHeading(_ref2) {
|
|
61
|
-
var children = _ref2.children
|
|
62
|
-
|
|
63
|
-
|
|
61
|
+
var children = _ref2.children,
|
|
62
|
+
id = _ref2.id;
|
|
63
|
+
return jsx("h1", {
|
|
64
|
+
css: modalHeadingStyles,
|
|
65
|
+
id: id
|
|
64
66
|
}, children);
|
|
65
67
|
};
|
|
66
68
|
|
|
@@ -22,8 +22,9 @@ export declare const ModalBody: ({ children }: {
|
|
|
22
22
|
*
|
|
23
23
|
* @internal
|
|
24
24
|
*/
|
|
25
|
-
export declare const ModalHeading: ({ children }: {
|
|
25
|
+
export declare const ModalHeading: ({ children, id, }: {
|
|
26
26
|
children: ReactNode;
|
|
27
|
+
id: string;
|
|
27
28
|
}) => jsx.JSX.Element;
|
|
28
29
|
/**
|
|
29
30
|
* __Modal image__
|
|
@@ -22,8 +22,9 @@ export declare const ModalBody: ({ children }: {
|
|
|
22
22
|
*
|
|
23
23
|
* @internal
|
|
24
24
|
*/
|
|
25
|
-
export declare const ModalHeading: ({ children }: {
|
|
25
|
+
export declare const ModalHeading: ({ children, id, }: {
|
|
26
26
|
children: ReactNode;
|
|
27
|
+
id: string;
|
|
27
28
|
}) => jsx.JSX.Element;
|
|
28
29
|
/**
|
|
29
30
|
* __Modal image__
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/onboarding",
|
|
3
|
-
"version": "11.2.
|
|
3
|
+
"version": "11.2.7",
|
|
4
4
|
"description": "An onboarding spotlight introduces new features to users through focused messages or multi-step tours.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -40,13 +40,13 @@
|
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@atlaskit/analytics-next": "^9.2.0",
|
|
43
|
-
"@atlaskit/button": "^17.
|
|
43
|
+
"@atlaskit/button": "^17.8.0",
|
|
44
44
|
"@atlaskit/ds-lib": "^2.2.0",
|
|
45
45
|
"@atlaskit/heading": "^2.1.0",
|
|
46
46
|
"@atlaskit/modal-dialog": "^12.10.0",
|
|
47
47
|
"@atlaskit/popper": "^5.5.0",
|
|
48
48
|
"@atlaskit/portal": "^4.4.0",
|
|
49
|
-
"@atlaskit/theme": "^12.
|
|
49
|
+
"@atlaskit/theme": "^12.7.0",
|
|
50
50
|
"@atlaskit/tokens": "^1.42.0",
|
|
51
51
|
"@babel/runtime": "^7.0.0",
|
|
52
52
|
"@emotion/react": "^11.7.1",
|