@atlaskit/onboarding 11.1.1 → 11.1.3
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 +9 -8
- package/dist/cjs/components/spotlight-card.js +11 -10
- package/dist/cjs/components/spotlight-dialog.js +1 -1
- package/dist/cjs/styled/blanket.js +2 -2
- package/dist/cjs/styled/dialog.js +4 -4
- package/dist/cjs/styled/modal.js +6 -5
- package/dist/cjs/styled/target.js +5 -6
- package/dist/es2019/components/modal.js +9 -7
- package/dist/es2019/components/spotlight-card.js +12 -11
- package/dist/es2019/components/spotlight-dialog.js +1 -1
- package/dist/es2019/styled/blanket.js +3 -2
- package/dist/es2019/styled/dialog.js +6 -5
- package/dist/es2019/styled/modal.js +7 -6
- package/dist/es2019/styled/target.js +7 -7
- package/dist/esm/components/modal.js +9 -7
- package/dist/esm/components/spotlight-card.js +12 -11
- package/dist/esm/components/spotlight-dialog.js +1 -1
- package/dist/esm/styled/blanket.js +3 -2
- package/dist/esm/styled/dialog.js +6 -5
- package/dist/esm/styled/modal.js +7 -6
- package/dist/esm/styled/target.js +7 -7
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/onboarding
|
|
2
2
|
|
|
3
|
+
## 11.1.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 11.1.2
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#59147](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/59147) [`f12e489f23b0`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/f12e489f23b0) - Re-build and deploy packages to NPM to resolve React/Compiled not found error (HOT-106483).
|
|
14
|
+
|
|
3
15
|
## 11.1.1
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -16,6 +16,7 @@ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime
|
|
|
16
16
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
17
17
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
18
18
|
var _react = require("react");
|
|
19
|
+
var _react2 = require("@emotion/react");
|
|
19
20
|
var _customThemeButton = _interopRequireWildcard(require("@atlaskit/button/custom-theme-button"));
|
|
20
21
|
var _modalDialog = _interopRequireWildcard(require("@atlaskit/modal-dialog"));
|
|
21
22
|
var _modal = require("../styled/modal");
|
|
@@ -25,7 +26,7 @@ var _excluded = ["text", "key"],
|
|
|
25
26
|
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); }
|
|
26
27
|
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; }
|
|
27
28
|
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
|
-
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; } }
|
|
29
|
+
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; } } /** @jsx jsx */
|
|
29
30
|
// TODO: DSP-1250 - use a composable API consistent with normal modal dialog
|
|
30
31
|
/**
|
|
31
32
|
* __Benefits modal__
|
|
@@ -50,7 +51,7 @@ var BenefitsModal = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
50
51
|
var HeaderElement = props.header,
|
|
51
52
|
src = props.image;
|
|
52
53
|
var ImageElement = function ImageElement() {
|
|
53
|
-
return
|
|
54
|
+
return (0, _react2.jsx)(_modal.ModalImage, {
|
|
54
55
|
src: src,
|
|
55
56
|
alt: ""
|
|
56
57
|
});
|
|
@@ -63,18 +64,18 @@ var BenefitsModal = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
63
64
|
_props$experimental_s = props.experimental_shouldShowPrimaryButtonOnRight,
|
|
64
65
|
experimental_shouldShowPrimaryButtonOnRight = _props$experimental_s === void 0 ? false : _props$experimental_s;
|
|
65
66
|
var ActionsElement = function ActionsElement() {
|
|
66
|
-
return actionList ?
|
|
67
|
+
return actionList ? (0, _react2.jsx)(_customThemeButton.Theme.Provider, {
|
|
67
68
|
value: _theme.modalButtonTheme
|
|
68
|
-
},
|
|
69
|
+
}, (0, _react2.jsx)(_modal.ModalActionContainer, {
|
|
69
70
|
shouldReverseButtonOrder: experimental_shouldShowPrimaryButtonOnRight
|
|
70
71
|
}, actionList.map(function (_ref, idx) {
|
|
71
72
|
var text = _ref.text,
|
|
72
73
|
key = _ref.key,
|
|
73
74
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
74
75
|
var variant = idx ? 'subtle-link' : 'primary';
|
|
75
|
-
return
|
|
76
|
+
return (0, _react2.jsx)(_modal.ModalActionItem, {
|
|
76
77
|
key: key || (typeof text === 'string' ? text : "".concat(idx))
|
|
77
|
-
},
|
|
78
|
+
}, (0, _react2.jsx)(_customThemeButton.default, (0, _extends2.default)({
|
|
78
79
|
appearance: variant,
|
|
79
80
|
autoFocus: !idx
|
|
80
81
|
}, rest), text));
|
|
@@ -94,12 +95,12 @@ var BenefitsModal = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
94
95
|
props = (0, _objectWithoutProperties2.default)(_this$props, _excluded2);
|
|
95
96
|
var Header = this.headerComponent(this.props);
|
|
96
97
|
var Footer = this.footerComponent(this.props);
|
|
97
|
-
return
|
|
98
|
+
return (0, _react2.jsx)(_modalDialog.default, (0, _extends2.default)({
|
|
98
99
|
autoFocus: true,
|
|
99
100
|
shouldScrollInViewport: true,
|
|
100
101
|
shouldCloseOnOverlayClick: false,
|
|
101
102
|
shouldCloseOnEscapePress: false
|
|
102
|
-
}, props),
|
|
103
|
+
}, props), (0, _react2.jsx)(Header, null), (0, _react2.jsx)(_modalDialog.ModalBody, null, (0, _react2.jsx)(_modal.ModalBody, null, heading && (0, _react2.jsx)(_modal.ModalHeading, null, heading), children)), (0, _react2.jsx)(Footer, null));
|
|
103
104
|
}
|
|
104
105
|
}]);
|
|
105
106
|
return BenefitsModal;
|
|
@@ -16,6 +16,7 @@ var _constants = require("@atlaskit/theme/constants");
|
|
|
16
16
|
var _dialog = require("../styled/dialog");
|
|
17
17
|
var _theme = require("./theme");
|
|
18
18
|
var _excluded = ["text", "key"];
|
|
19
|
+
/** @jsx jsx */
|
|
19
20
|
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); }
|
|
20
21
|
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; }
|
|
21
22
|
var bodyStyles = (0, _react2.css)({
|
|
@@ -34,7 +35,7 @@ var defaultHeaderStyles = (0, _react2.css)({
|
|
|
34
35
|
});
|
|
35
36
|
var DefaultHeader = function DefaultHeader(_ref) {
|
|
36
37
|
var children = _ref.children;
|
|
37
|
-
return
|
|
38
|
+
return (0, _react2.jsx)("div", {
|
|
38
39
|
css: defaultHeaderStyles
|
|
39
40
|
}, children);
|
|
40
41
|
};
|
|
@@ -46,7 +47,7 @@ var defaultFooterStyles = (0, _react2.css)({
|
|
|
46
47
|
});
|
|
47
48
|
var DefaultFooter = function DefaultFooter(_ref2) {
|
|
48
49
|
var children = _ref2.children;
|
|
49
|
-
return
|
|
50
|
+
return (0, _react2.jsx)("div", {
|
|
50
51
|
css: defaultFooterStyles
|
|
51
52
|
}, children);
|
|
52
53
|
};
|
|
@@ -90,9 +91,9 @@ var SpotlightCard = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
90
91
|
Header = _components$Header === void 0 ? DefaultHeader : _components$Header,
|
|
91
92
|
_components$Footer = components.Footer,
|
|
92
93
|
Footer = _components$Footer === void 0 ? DefaultFooter : _components$Footer;
|
|
93
|
-
return
|
|
94
|
+
return (0, _react2.jsx)(_customThemeButton.Theme.Provider, {
|
|
94
95
|
value: _theme.spotlightButtonTheme
|
|
95
|
-
},
|
|
96
|
+
}, (0, _react2.jsx)("div", {
|
|
96
97
|
css: [containerStyles, !isFlat && containerShadowStyles],
|
|
97
98
|
style: {
|
|
98
99
|
minWidth: '160px',
|
|
@@ -101,24 +102,24 @@ var SpotlightCard = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
101
102
|
},
|
|
102
103
|
ref: ref || innerRef,
|
|
103
104
|
"data-testid": testId
|
|
104
|
-
}, typeof image === 'string' ?
|
|
105
|
+
}, typeof image === 'string' ? (0, _react2.jsx)("img", {
|
|
105
106
|
css: imageStyles,
|
|
106
107
|
src: image,
|
|
107
108
|
alt: ""
|
|
108
|
-
}) : image,
|
|
109
|
+
}) : image, (0, _react2.jsx)("div", {
|
|
109
110
|
css: bodyStyles
|
|
110
|
-
}, heading || headingAfterElement ?
|
|
111
|
+
}, heading || headingAfterElement ? (0, _react2.jsx)(Header, null, (0, _react2.jsx)(_heading.default, {
|
|
111
112
|
id: headingId,
|
|
112
113
|
color: "inverse",
|
|
113
114
|
level: "h600",
|
|
114
115
|
as: "h4"
|
|
115
|
-
}, heading), headingAfterElement) : null, children, actions.length > 0 || actionsBeforeElement ?
|
|
116
|
+
}, heading), headingAfterElement) : null, children, actions.length > 0 || actionsBeforeElement ? (0, _react2.jsx)(Footer, null, actionsBeforeElement || (0, _react2.jsx)("span", null), (0, _react2.jsx)(_dialog.DialogActionItemContainer, null, actions.map(function (_ref3, idx) {
|
|
116
117
|
var text = _ref3.text,
|
|
117
118
|
key = _ref3.key,
|
|
118
119
|
rest = (0, _objectWithoutProperties2.default)(_ref3, _excluded);
|
|
119
|
-
return
|
|
120
|
+
return (0, _react2.jsx)(_dialog.DialogActionItem, {
|
|
120
121
|
key: key || (typeof text === 'string' ? text : "".concat(idx))
|
|
121
|
-
},
|
|
122
|
+
}, (0, _react2.jsx)(_customThemeButton.default, rest, text));
|
|
122
123
|
}))) : null)));
|
|
123
124
|
});
|
|
124
125
|
SpotlightCard.displayName = 'SpotlightCard';
|
|
@@ -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() { 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; } }
|
|
29
29
|
var packageName = "@atlaskit/onboarding";
|
|
30
|
-
var packageVersion = "11.1.
|
|
30
|
+
var packageVersion = "11.1.3";
|
|
31
31
|
var SpotlightDialog = /*#__PURE__*/function (_Component) {
|
|
32
32
|
(0, _inherits2.default)(SpotlightDialog, _Component);
|
|
33
33
|
var _super = _createSuper(SpotlightDialog);
|
|
@@ -10,7 +10,7 @@ var _react = require("@emotion/react");
|
|
|
10
10
|
var _colors = require("@atlaskit/theme/colors");
|
|
11
11
|
var _constants = require("@atlaskit/theme/constants");
|
|
12
12
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
13
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
13
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } /** @jsx jsx */
|
|
14
14
|
// IE11 and Edge: z-index needed because fixed position calculates z-index relative
|
|
15
15
|
// to body instead of nearest stacking context (Portal in our case).
|
|
16
16
|
var blanketStyles = (0, _react.css)({
|
|
@@ -31,7 +31,7 @@ var blanketStyles = (0, _react.css)({
|
|
|
31
31
|
* @internal
|
|
32
32
|
*/
|
|
33
33
|
var Blanket = function Blanket(props) {
|
|
34
|
-
return
|
|
34
|
+
return (0, _react.jsx)("div", {
|
|
35
35
|
css: blanketStyles,
|
|
36
36
|
style: _objectSpread(_objectSpread({}, props.style), {}, {
|
|
37
37
|
backgroundColor: props.isTinted ? "var(--ds-blanket, ".concat(_colors.N100A, ")") : 'transparent'
|
|
@@ -9,6 +9,7 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
9
9
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
10
10
|
var _react = require("@emotion/react");
|
|
11
11
|
var _excluded = ["alt"];
|
|
12
|
+
/** @jsx jsx */
|
|
12
13
|
var imageStyles = (0, _react.css)({
|
|
13
14
|
maxWidth: '100%',
|
|
14
15
|
height: 'auto'
|
|
@@ -34,9 +35,8 @@ var DialogImage = exports.DialogImage = function DialogImage(_ref) {
|
|
|
34
35
|
var alt = _ref.alt,
|
|
35
36
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
36
37
|
return (
|
|
37
|
-
/*#__PURE__*/
|
|
38
38
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
39
|
-
|
|
39
|
+
(0, _react.jsx)("img", (0, _extends2.default)({
|
|
40
40
|
css: imageStyles,
|
|
41
41
|
alt: alt
|
|
42
42
|
}, props))
|
|
@@ -52,7 +52,7 @@ var DialogImage = exports.DialogImage = function DialogImage(_ref) {
|
|
|
52
52
|
*/
|
|
53
53
|
var DialogActionItemContainer = exports.DialogActionItemContainer = function DialogActionItemContainer(_ref2) {
|
|
54
54
|
var children = _ref2.children;
|
|
55
|
-
return
|
|
55
|
+
return (0, _react.jsx)("div", {
|
|
56
56
|
css: actionItemContainerStyles
|
|
57
57
|
}, children);
|
|
58
58
|
};
|
|
@@ -66,7 +66,7 @@ var DialogActionItemContainer = exports.DialogActionItemContainer = function Dia
|
|
|
66
66
|
*/
|
|
67
67
|
var DialogActionItem = exports.DialogActionItem = function DialogActionItem(_ref3) {
|
|
68
68
|
var children = _ref3.children;
|
|
69
|
-
return
|
|
69
|
+
return (0, _react.jsx)("div", {
|
|
70
70
|
css: actionItemStyles
|
|
71
71
|
}, children);
|
|
72
72
|
};
|
package/dist/cjs/styled/modal.js
CHANGED
|
@@ -7,6 +7,7 @@ exports.ModalImage = exports.ModalHeading = exports.ModalBody = exports.ModalAct
|
|
|
7
7
|
var _react = require("@emotion/react");
|
|
8
8
|
var _typography = require("@atlaskit/theme/typography");
|
|
9
9
|
/* eslint-disable @atlaskit/design-system/no-nested-styles */
|
|
10
|
+
/** @jsx jsx */
|
|
10
11
|
|
|
11
12
|
var modalBodyStyles = (0, _react.css)({
|
|
12
13
|
padding: "var(--ds-space-500, 40px)".concat(" ", "var(--ds-space-200, 16px)"),
|
|
@@ -52,7 +53,7 @@ var modalActionItemStyles = (0, _react.css)({
|
|
|
52
53
|
*/
|
|
53
54
|
var ModalBody = exports.ModalBody = function ModalBody(_ref) {
|
|
54
55
|
var children = _ref.children;
|
|
55
|
-
return
|
|
56
|
+
return (0, _react.jsx)("div", {
|
|
56
57
|
css: modalBodyStyles
|
|
57
58
|
}, children);
|
|
58
59
|
};
|
|
@@ -64,7 +65,7 @@ var ModalBody = exports.ModalBody = function ModalBody(_ref) {
|
|
|
64
65
|
*/
|
|
65
66
|
var ModalHeading = exports.ModalHeading = function ModalHeading(_ref2) {
|
|
66
67
|
var children = _ref2.children;
|
|
67
|
-
return
|
|
68
|
+
return (0, _react.jsx)("h4", {
|
|
68
69
|
css: modalHeadingStyles
|
|
69
70
|
}, children);
|
|
70
71
|
};
|
|
@@ -77,7 +78,7 @@ var ModalHeading = exports.ModalHeading = function ModalHeading(_ref2) {
|
|
|
77
78
|
var ModalImage = exports.ModalImage = function ModalImage(_ref3) {
|
|
78
79
|
var alt = _ref3.alt,
|
|
79
80
|
src = _ref3.src;
|
|
80
|
-
return
|
|
81
|
+
return (0, _react.jsx)("img", {
|
|
81
82
|
css: modalImageStyles,
|
|
82
83
|
alt: alt,
|
|
83
84
|
src: src
|
|
@@ -92,7 +93,7 @@ var ModalImage = exports.ModalImage = function ModalImage(_ref3) {
|
|
|
92
93
|
var ModalActionContainer = exports.ModalActionContainer = function ModalActionContainer(_ref4) {
|
|
93
94
|
var children = _ref4.children,
|
|
94
95
|
shouldReverseButtonOrder = _ref4.shouldReverseButtonOrder;
|
|
95
|
-
return
|
|
96
|
+
return (0, _react.jsx)("div", {
|
|
96
97
|
css: [modalActionContainerStyles, shouldReverseButtonOrder && modalActionContainerReversedStyles]
|
|
97
98
|
}, children);
|
|
98
99
|
};
|
|
@@ -104,7 +105,7 @@ var ModalActionContainer = exports.ModalActionContainer = function ModalActionCo
|
|
|
104
105
|
*/
|
|
105
106
|
var ModalActionItem = exports.ModalActionItem = function ModalActionItem(_ref5) {
|
|
106
107
|
var children = _ref5.children;
|
|
107
|
-
return
|
|
108
|
+
return (0, _react.jsx)("div", {
|
|
108
109
|
css: modalActionItemStyles
|
|
109
110
|
}, children);
|
|
110
111
|
};
|
|
@@ -14,6 +14,7 @@ var _constants = require("@atlaskit/theme/constants");
|
|
|
14
14
|
var _excluded = ["children", "bgColor", "radius", "style", "testId"],
|
|
15
15
|
_excluded2 = ["children", "pulse"],
|
|
16
16
|
_excluded3 = ["children", "pulse", "testId"];
|
|
17
|
+
/** @jsx jsx */
|
|
17
18
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
18
19
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
19
20
|
// NOTE:
|
|
@@ -46,7 +47,7 @@ var Base = function Base(_ref) {
|
|
|
46
47
|
style = _ref.style,
|
|
47
48
|
testId = _ref.testId,
|
|
48
49
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
49
|
-
return
|
|
50
|
+
return (0, _react.jsx)("div", (0, _extends2.default)({
|
|
50
51
|
css: baseStyles,
|
|
51
52
|
"data-testid": testId,
|
|
52
53
|
style: _objectSpread(_objectSpread({}, style), {}, {
|
|
@@ -69,9 +70,8 @@ var TargetInner = exports.TargetInner = function TargetInner(_ref2) {
|
|
|
69
70
|
pulse = _ref2.pulse,
|
|
70
71
|
props = (0, _objectWithoutProperties2.default)(_ref2, _excluded2);
|
|
71
72
|
return (
|
|
72
|
-
/*#__PURE__*/
|
|
73
73
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
74
|
-
|
|
74
|
+
(0, _react.jsx)(Base, (0, _extends2.default)({}, props, {
|
|
75
75
|
css: [pulse && animationStyles]
|
|
76
76
|
}), children)
|
|
77
77
|
);
|
|
@@ -95,7 +95,7 @@ var targetOverlayStyles = (0, _react.css)({
|
|
|
95
95
|
* @internal
|
|
96
96
|
*/
|
|
97
97
|
var TargetOverlay = exports.TargetOverlay = function TargetOverlay(props) {
|
|
98
|
-
return
|
|
98
|
+
return (0, _react.jsx)("div", (0, _extends2.default)({}, props, {
|
|
99
99
|
css: targetOverlayStyles,
|
|
100
100
|
style: {
|
|
101
101
|
cursor: props.onClick ? 'pointer' : 'auto'
|
|
@@ -119,9 +119,8 @@ var Pulse = exports.Pulse = function Pulse(_ref3) {
|
|
|
119
119
|
testId = _ref3.testId,
|
|
120
120
|
props = (0, _objectWithoutProperties2.default)(_ref3, _excluded3);
|
|
121
121
|
return (
|
|
122
|
-
/*#__PURE__*/
|
|
123
122
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
124
|
-
|
|
123
|
+
(0, _react.jsx)(Base, (0, _extends2.default)({}, props, {
|
|
125
124
|
css: [pulse && animationStyles],
|
|
126
125
|
testId: testId
|
|
127
126
|
}), children)
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
|
+
/** @jsx jsx */
|
|
3
4
|
import { Component } from 'react';
|
|
5
|
+
import { jsx } from '@emotion/react';
|
|
4
6
|
import Button, { Theme as ButtonTheme } from '@atlaskit/button/custom-theme-button';
|
|
5
7
|
import Modal, { ModalBody } from '@atlaskit/modal-dialog';
|
|
6
8
|
import { ModalBody as Body, ModalHeading as Heading, ModalActionContainer, ModalActionItem, ModalImage } from '../styled/modal';
|
|
@@ -25,7 +27,7 @@ export default class BenefitsModal extends Component {
|
|
|
25
27
|
header: HeaderElement,
|
|
26
28
|
image: src
|
|
27
29
|
} = props;
|
|
28
|
-
const ImageElement = () =>
|
|
30
|
+
const ImageElement = () => jsx(ModalImage, {
|
|
29
31
|
src: src,
|
|
30
32
|
alt: ""
|
|
31
33
|
});
|
|
@@ -37,9 +39,9 @@ export default class BenefitsModal extends Component {
|
|
|
37
39
|
actions: actionList,
|
|
38
40
|
experimental_shouldShowPrimaryButtonOnRight = false
|
|
39
41
|
} = props;
|
|
40
|
-
const ActionsElement = () => actionList ?
|
|
42
|
+
const ActionsElement = () => actionList ? jsx(ButtonTheme.Provider, {
|
|
41
43
|
value: modalButtonTheme
|
|
42
|
-
},
|
|
44
|
+
}, jsx(ModalActionContainer, {
|
|
43
45
|
shouldReverseButtonOrder: experimental_shouldShowPrimaryButtonOnRight
|
|
44
46
|
}, actionList.map(({
|
|
45
47
|
text,
|
|
@@ -47,9 +49,9 @@ export default class BenefitsModal extends Component {
|
|
|
47
49
|
...rest
|
|
48
50
|
}, idx) => {
|
|
49
51
|
const variant = idx ? 'subtle-link' : 'primary';
|
|
50
|
-
return
|
|
52
|
+
return jsx(ModalActionItem, {
|
|
51
53
|
key: key || (typeof text === 'string' ? text : `${idx}`)
|
|
52
|
-
},
|
|
54
|
+
}, jsx(Button, _extends({
|
|
53
55
|
appearance: variant,
|
|
54
56
|
autoFocus: !idx
|
|
55
57
|
}, rest), text));
|
|
@@ -66,11 +68,11 @@ export default class BenefitsModal extends Component {
|
|
|
66
68
|
} = this.props;
|
|
67
69
|
const Header = this.headerComponent(this.props);
|
|
68
70
|
const Footer = this.footerComponent(this.props);
|
|
69
|
-
return
|
|
71
|
+
return jsx(Modal, _extends({
|
|
70
72
|
autoFocus: true,
|
|
71
73
|
shouldScrollInViewport: true,
|
|
72
74
|
shouldCloseOnOverlayClick: false,
|
|
73
75
|
shouldCloseOnEscapePress: false
|
|
74
|
-
}, props),
|
|
76
|
+
}, props), jsx(Header, null), jsx(ModalBody, null, jsx(Body, null, heading && jsx(Heading, null, heading), children)), jsx(Footer, null));
|
|
75
77
|
}
|
|
76
78
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
1
2
|
import { forwardRef } from 'react';
|
|
2
|
-
import { css } from '@emotion/react';
|
|
3
|
+
import { css, jsx } from '@emotion/react';
|
|
3
4
|
import Button, { Theme as ButtonTheme } from '@atlaskit/button/custom-theme-button';
|
|
4
5
|
import Heading from '@atlaskit/heading';
|
|
5
6
|
import { N0, N50A, N60A, P300 } from '@atlaskit/theme/colors';
|
|
@@ -22,7 +23,7 @@ const defaultHeaderStyles = css({
|
|
|
22
23
|
});
|
|
23
24
|
const DefaultHeader = ({
|
|
24
25
|
children
|
|
25
|
-
}) =>
|
|
26
|
+
}) => jsx("div", {
|
|
26
27
|
css: defaultHeaderStyles
|
|
27
28
|
}, children);
|
|
28
29
|
const defaultFooterStyles = css({
|
|
@@ -33,7 +34,7 @@ const defaultFooterStyles = css({
|
|
|
33
34
|
});
|
|
34
35
|
const DefaultFooter = ({
|
|
35
36
|
children
|
|
36
|
-
}) =>
|
|
37
|
+
}) => jsx("div", {
|
|
37
38
|
css: defaultFooterStyles
|
|
38
39
|
}, children);
|
|
39
40
|
const containerStyles = css({
|
|
@@ -75,9 +76,9 @@ const SpotlightCard = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
75
76
|
Header = DefaultHeader,
|
|
76
77
|
Footer = DefaultFooter
|
|
77
78
|
} = components;
|
|
78
|
-
return
|
|
79
|
+
return jsx(ButtonTheme.Provider, {
|
|
79
80
|
value: spotlightButtonTheme
|
|
80
|
-
},
|
|
81
|
+
}, jsx("div", {
|
|
81
82
|
css: [containerStyles, !isFlat && containerShadowStyles],
|
|
82
83
|
style: {
|
|
83
84
|
minWidth: '160px',
|
|
@@ -86,25 +87,25 @@ const SpotlightCard = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
86
87
|
},
|
|
87
88
|
ref: ref || innerRef,
|
|
88
89
|
"data-testid": testId
|
|
89
|
-
}, typeof image === 'string' ?
|
|
90
|
+
}, typeof image === 'string' ? jsx("img", {
|
|
90
91
|
css: imageStyles,
|
|
91
92
|
src: image,
|
|
92
93
|
alt: ""
|
|
93
|
-
}) : image,
|
|
94
|
+
}) : image, jsx("div", {
|
|
94
95
|
css: bodyStyles
|
|
95
|
-
}, heading || headingAfterElement ?
|
|
96
|
+
}, heading || headingAfterElement ? jsx(Header, null, jsx(Heading, {
|
|
96
97
|
id: headingId,
|
|
97
98
|
color: "inverse",
|
|
98
99
|
level: "h600",
|
|
99
100
|
as: "h4"
|
|
100
|
-
}, heading), headingAfterElement) : null, children, actions.length > 0 || actionsBeforeElement ?
|
|
101
|
+
}, heading), headingAfterElement) : null, children, actions.length > 0 || actionsBeforeElement ? jsx(Footer, null, actionsBeforeElement || jsx("span", null), jsx(DialogActionItemContainer, null, actions.map(({
|
|
101
102
|
text,
|
|
102
103
|
key,
|
|
103
104
|
...rest
|
|
104
105
|
}, idx) => {
|
|
105
|
-
return
|
|
106
|
+
return jsx(DialogActionItem, {
|
|
106
107
|
key: key || (typeof text === 'string' ? text : `${idx}`)
|
|
107
|
-
},
|
|
108
|
+
}, jsx(Button, rest, text));
|
|
108
109
|
}))) : null)));
|
|
109
110
|
});
|
|
110
111
|
SpotlightCard.displayName = 'SpotlightCard';
|
|
@@ -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.1.
|
|
10
|
+
const packageVersion = "11.1.3";
|
|
11
11
|
class SpotlightDialog extends Component {
|
|
12
12
|
constructor(...args) {
|
|
13
13
|
super(...args);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { css, jsx } from '@emotion/react';
|
|
2
3
|
import { N100A } from '@atlaskit/theme/colors';
|
|
3
4
|
import { layers } from '@atlaskit/theme/constants';
|
|
4
5
|
// IE11 and Edge: z-index needed because fixed position calculates z-index relative
|
|
@@ -21,7 +22,7 @@ const blanketStyles = css({
|
|
|
21
22
|
* @internal
|
|
22
23
|
*/
|
|
23
24
|
const Blanket = props => {
|
|
24
|
-
return
|
|
25
|
+
return jsx("div", {
|
|
25
26
|
css: blanketStyles,
|
|
26
27
|
style: {
|
|
27
28
|
...props.style,
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
|
|
2
|
+
/** @jsx jsx */
|
|
3
|
+
|
|
4
|
+
import { css, jsx } from '@emotion/react';
|
|
3
5
|
const imageStyles = css({
|
|
4
6
|
maxWidth: '100%',
|
|
5
7
|
height: 'auto'
|
|
@@ -25,9 +27,8 @@ export const DialogImage = ({
|
|
|
25
27
|
alt,
|
|
26
28
|
...props
|
|
27
29
|
}) =>
|
|
28
|
-
/*#__PURE__*/
|
|
29
30
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
30
|
-
|
|
31
|
+
jsx("img", _extends({
|
|
31
32
|
css: imageStyles,
|
|
32
33
|
alt: alt
|
|
33
34
|
}, props));
|
|
@@ -41,7 +42,7 @@ React.createElement("img", _extends({
|
|
|
41
42
|
*/
|
|
42
43
|
export const DialogActionItemContainer = ({
|
|
43
44
|
children
|
|
44
|
-
}) =>
|
|
45
|
+
}) => jsx("div", {
|
|
45
46
|
css: actionItemContainerStyles
|
|
46
47
|
}, children);
|
|
47
48
|
|
|
@@ -54,6 +55,6 @@ export const DialogActionItemContainer = ({
|
|
|
54
55
|
*/
|
|
55
56
|
export const DialogActionItem = ({
|
|
56
57
|
children
|
|
57
|
-
}) =>
|
|
58
|
+
}) => jsx("div", {
|
|
58
59
|
css: actionItemStyles
|
|
59
60
|
}, children);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/* eslint-disable @atlaskit/design-system/no-nested-styles */
|
|
2
|
+
/** @jsx jsx */
|
|
2
3
|
|
|
3
|
-
import { css } from '@emotion/react';
|
|
4
|
+
import { css, jsx } from '@emotion/react';
|
|
4
5
|
import { h600 } from '@atlaskit/theme/typography';
|
|
5
6
|
const modalBodyStyles = css({
|
|
6
7
|
padding: `${"var(--ds-space-500, 40px)"} ${"var(--ds-space-200, 16px)"}`,
|
|
@@ -46,7 +47,7 @@ const modalActionItemStyles = css({
|
|
|
46
47
|
*/
|
|
47
48
|
export const ModalBody = ({
|
|
48
49
|
children
|
|
49
|
-
}) =>
|
|
50
|
+
}) => jsx("div", {
|
|
50
51
|
css: modalBodyStyles
|
|
51
52
|
}, children);
|
|
52
53
|
|
|
@@ -58,7 +59,7 @@ export const ModalBody = ({
|
|
|
58
59
|
export const ModalHeading = ({
|
|
59
60
|
children
|
|
60
61
|
}) => {
|
|
61
|
-
return
|
|
62
|
+
return jsx("h4", {
|
|
62
63
|
css: modalHeadingStyles
|
|
63
64
|
}, children);
|
|
64
65
|
};
|
|
@@ -71,7 +72,7 @@ export const ModalHeading = ({
|
|
|
71
72
|
export const ModalImage = ({
|
|
72
73
|
alt,
|
|
73
74
|
src
|
|
74
|
-
}) =>
|
|
75
|
+
}) => jsx("img", {
|
|
75
76
|
css: modalImageStyles,
|
|
76
77
|
alt: alt,
|
|
77
78
|
src: src
|
|
@@ -85,7 +86,7 @@ export const ModalImage = ({
|
|
|
85
86
|
export const ModalActionContainer = ({
|
|
86
87
|
children,
|
|
87
88
|
shouldReverseButtonOrder
|
|
88
|
-
}) =>
|
|
89
|
+
}) => jsx("div", {
|
|
89
90
|
css: [modalActionContainerStyles, shouldReverseButtonOrder && modalActionContainerReversedStyles]
|
|
90
91
|
}, children);
|
|
91
92
|
|
|
@@ -96,6 +97,6 @@ export const ModalActionContainer = ({
|
|
|
96
97
|
*/
|
|
97
98
|
export const ModalActionItem = ({
|
|
98
99
|
children
|
|
99
|
-
}) =>
|
|
100
|
+
}) => jsx("div", {
|
|
100
101
|
css: modalActionItemStyles
|
|
101
102
|
}, children);
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
|
|
2
|
+
/** @jsx jsx */
|
|
3
|
+
|
|
4
|
+
import { css, jsx, keyframes } from '@emotion/react';
|
|
3
5
|
import { P300 } from '@atlaskit/theme/colors';
|
|
4
6
|
import { layers } from '@atlaskit/theme/constants';
|
|
5
7
|
// NOTE:
|
|
@@ -32,7 +34,7 @@ const Base = ({
|
|
|
32
34
|
style,
|
|
33
35
|
testId,
|
|
34
36
|
...props
|
|
35
|
-
}) =>
|
|
37
|
+
}) => jsx("div", _extends({
|
|
36
38
|
css: baseStyles,
|
|
37
39
|
"data-testid": testId,
|
|
38
40
|
style: {
|
|
@@ -55,9 +57,8 @@ export const TargetInner = ({
|
|
|
55
57
|
pulse,
|
|
56
58
|
...props
|
|
57
59
|
}) =>
|
|
58
|
-
/*#__PURE__*/
|
|
59
60
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
60
|
-
|
|
61
|
+
jsx(Base, _extends({}, props, {
|
|
61
62
|
css: [pulse && animationStyles]
|
|
62
63
|
}), children);
|
|
63
64
|
const targetOverlayStyles = css({
|
|
@@ -78,7 +79,7 @@ const targetOverlayStyles = css({
|
|
|
78
79
|
*
|
|
79
80
|
* @internal
|
|
80
81
|
*/
|
|
81
|
-
export const TargetOverlay = props =>
|
|
82
|
+
export const TargetOverlay = props => jsx("div", _extends({}, props, {
|
|
82
83
|
css: targetOverlayStyles,
|
|
83
84
|
style: {
|
|
84
85
|
cursor: props.onClick ? 'pointer' : 'auto'
|
|
@@ -100,9 +101,8 @@ export const Pulse = ({
|
|
|
100
101
|
testId,
|
|
101
102
|
...props
|
|
102
103
|
}) =>
|
|
103
|
-
/*#__PURE__*/
|
|
104
104
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
105
|
-
|
|
105
|
+
jsx(Base, _extends({}, props, {
|
|
106
106
|
css: [pulse && animationStyles],
|
|
107
107
|
testId: testId
|
|
108
108
|
}), children);
|
|
@@ -11,7 +11,9 @@ var _excluded = ["text", "key"],
|
|
|
11
11
|
_excluded2 = ["actions", "children", "heading"];
|
|
12
12
|
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); }; }
|
|
13
13
|
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; } }
|
|
14
|
+
/** @jsx jsx */
|
|
14
15
|
import { Component } from 'react';
|
|
16
|
+
import { jsx } from '@emotion/react';
|
|
15
17
|
import Button, { Theme as ButtonTheme } from '@atlaskit/button/custom-theme-button';
|
|
16
18
|
import Modal, { ModalBody } from '@atlaskit/modal-dialog';
|
|
17
19
|
import { ModalBody as Body, ModalHeading as Heading, ModalActionContainer, ModalActionItem, ModalImage } from '../styled/modal';
|
|
@@ -41,7 +43,7 @@ var BenefitsModal = /*#__PURE__*/function (_Component) {
|
|
|
41
43
|
var HeaderElement = props.header,
|
|
42
44
|
src = props.image;
|
|
43
45
|
var ImageElement = function ImageElement() {
|
|
44
|
-
return
|
|
46
|
+
return jsx(ModalImage, {
|
|
45
47
|
src: src,
|
|
46
48
|
alt: ""
|
|
47
49
|
});
|
|
@@ -54,18 +56,18 @@ var BenefitsModal = /*#__PURE__*/function (_Component) {
|
|
|
54
56
|
_props$experimental_s = props.experimental_shouldShowPrimaryButtonOnRight,
|
|
55
57
|
experimental_shouldShowPrimaryButtonOnRight = _props$experimental_s === void 0 ? false : _props$experimental_s;
|
|
56
58
|
var ActionsElement = function ActionsElement() {
|
|
57
|
-
return actionList ?
|
|
59
|
+
return actionList ? jsx(ButtonTheme.Provider, {
|
|
58
60
|
value: modalButtonTheme
|
|
59
|
-
},
|
|
61
|
+
}, jsx(ModalActionContainer, {
|
|
60
62
|
shouldReverseButtonOrder: experimental_shouldShowPrimaryButtonOnRight
|
|
61
63
|
}, actionList.map(function (_ref, idx) {
|
|
62
64
|
var text = _ref.text,
|
|
63
65
|
key = _ref.key,
|
|
64
66
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
65
67
|
var variant = idx ? 'subtle-link' : 'primary';
|
|
66
|
-
return
|
|
68
|
+
return jsx(ModalActionItem, {
|
|
67
69
|
key: key || (typeof text === 'string' ? text : "".concat(idx))
|
|
68
|
-
},
|
|
70
|
+
}, jsx(Button, _extends({
|
|
69
71
|
appearance: variant,
|
|
70
72
|
autoFocus: !idx
|
|
71
73
|
}, rest), text));
|
|
@@ -85,12 +87,12 @@ var BenefitsModal = /*#__PURE__*/function (_Component) {
|
|
|
85
87
|
props = _objectWithoutProperties(_this$props, _excluded2);
|
|
86
88
|
var Header = this.headerComponent(this.props);
|
|
87
89
|
var Footer = this.footerComponent(this.props);
|
|
88
|
-
return
|
|
90
|
+
return jsx(Modal, _extends({
|
|
89
91
|
autoFocus: true,
|
|
90
92
|
shouldScrollInViewport: true,
|
|
91
93
|
shouldCloseOnOverlayClick: false,
|
|
92
94
|
shouldCloseOnEscapePress: false
|
|
93
|
-
}, props),
|
|
95
|
+
}, props), jsx(Header, null), jsx(ModalBody, null, jsx(Body, null, heading && jsx(Heading, null, heading), children)), jsx(Footer, null));
|
|
94
96
|
}
|
|
95
97
|
}]);
|
|
96
98
|
return BenefitsModal;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
2
2
|
var _excluded = ["text", "key"];
|
|
3
|
+
/** @jsx jsx */
|
|
3
4
|
import { forwardRef } from 'react';
|
|
4
|
-
import { css } from '@emotion/react';
|
|
5
|
+
import { css, jsx } from '@emotion/react';
|
|
5
6
|
import Button, { Theme as ButtonTheme } from '@atlaskit/button/custom-theme-button';
|
|
6
7
|
import Heading from '@atlaskit/heading';
|
|
7
8
|
import { N0, N50A, N60A, P300 } from '@atlaskit/theme/colors';
|
|
@@ -24,7 +25,7 @@ var defaultHeaderStyles = css({
|
|
|
24
25
|
});
|
|
25
26
|
var DefaultHeader = function DefaultHeader(_ref) {
|
|
26
27
|
var children = _ref.children;
|
|
27
|
-
return
|
|
28
|
+
return jsx("div", {
|
|
28
29
|
css: defaultHeaderStyles
|
|
29
30
|
}, children);
|
|
30
31
|
};
|
|
@@ -36,7 +37,7 @@ var defaultFooterStyles = css({
|
|
|
36
37
|
});
|
|
37
38
|
var DefaultFooter = function DefaultFooter(_ref2) {
|
|
38
39
|
var children = _ref2.children;
|
|
39
|
-
return
|
|
40
|
+
return jsx("div", {
|
|
40
41
|
css: defaultFooterStyles
|
|
41
42
|
}, children);
|
|
42
43
|
};
|
|
@@ -80,9 +81,9 @@ var SpotlightCard = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
80
81
|
Header = _components$Header === void 0 ? DefaultHeader : _components$Header,
|
|
81
82
|
_components$Footer = components.Footer,
|
|
82
83
|
Footer = _components$Footer === void 0 ? DefaultFooter : _components$Footer;
|
|
83
|
-
return
|
|
84
|
+
return jsx(ButtonTheme.Provider, {
|
|
84
85
|
value: spotlightButtonTheme
|
|
85
|
-
},
|
|
86
|
+
}, jsx("div", {
|
|
86
87
|
css: [containerStyles, !isFlat && containerShadowStyles],
|
|
87
88
|
style: {
|
|
88
89
|
minWidth: '160px',
|
|
@@ -91,24 +92,24 @@ var SpotlightCard = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
91
92
|
},
|
|
92
93
|
ref: ref || innerRef,
|
|
93
94
|
"data-testid": testId
|
|
94
|
-
}, typeof image === 'string' ?
|
|
95
|
+
}, typeof image === 'string' ? jsx("img", {
|
|
95
96
|
css: imageStyles,
|
|
96
97
|
src: image,
|
|
97
98
|
alt: ""
|
|
98
|
-
}) : image,
|
|
99
|
+
}) : image, jsx("div", {
|
|
99
100
|
css: bodyStyles
|
|
100
|
-
}, heading || headingAfterElement ?
|
|
101
|
+
}, heading || headingAfterElement ? jsx(Header, null, jsx(Heading, {
|
|
101
102
|
id: headingId,
|
|
102
103
|
color: "inverse",
|
|
103
104
|
level: "h600",
|
|
104
105
|
as: "h4"
|
|
105
|
-
}, heading), headingAfterElement) : null, children, actions.length > 0 || actionsBeforeElement ?
|
|
106
|
+
}, heading), headingAfterElement) : null, children, actions.length > 0 || actionsBeforeElement ? jsx(Footer, null, actionsBeforeElement || jsx("span", null), jsx(DialogActionItemContainer, null, actions.map(function (_ref3, idx) {
|
|
106
107
|
var text = _ref3.text,
|
|
107
108
|
key = _ref3.key,
|
|
108
109
|
rest = _objectWithoutProperties(_ref3, _excluded);
|
|
109
|
-
return
|
|
110
|
+
return jsx(DialogActionItem, {
|
|
110
111
|
key: key || (typeof text === 'string' ? text : "".concat(idx))
|
|
111
|
-
},
|
|
112
|
+
}, jsx(Button, rest, text));
|
|
112
113
|
}))) : null)));
|
|
113
114
|
});
|
|
114
115
|
SpotlightCard.displayName = 'SpotlightCard';
|
|
@@ -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.1.
|
|
20
|
+
var packageVersion = "11.1.3";
|
|
21
21
|
var SpotlightDialog = /*#__PURE__*/function (_Component) {
|
|
22
22
|
_inherits(SpotlightDialog, _Component);
|
|
23
23
|
var _super = _createSuper(SpotlightDialog);
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
-
|
|
4
|
+
/** @jsx jsx */
|
|
5
|
+
import { css, jsx } from '@emotion/react';
|
|
5
6
|
import { N100A } from '@atlaskit/theme/colors';
|
|
6
7
|
import { layers } from '@atlaskit/theme/constants';
|
|
7
8
|
// IE11 and Edge: z-index needed because fixed position calculates z-index relative
|
|
@@ -24,7 +25,7 @@ var blanketStyles = css({
|
|
|
24
25
|
* @internal
|
|
25
26
|
*/
|
|
26
27
|
var Blanket = function Blanket(props) {
|
|
27
|
-
return
|
|
28
|
+
return jsx("div", {
|
|
28
29
|
css: blanketStyles,
|
|
29
30
|
style: _objectSpread(_objectSpread({}, props.style), {}, {
|
|
30
31
|
backgroundColor: props.isTinted ? "var(--ds-blanket, ".concat(N100A, ")") : 'transparent'
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
3
|
var _excluded = ["alt"];
|
|
4
|
-
|
|
4
|
+
/** @jsx jsx */
|
|
5
|
+
|
|
6
|
+
import { css, jsx } from '@emotion/react';
|
|
5
7
|
var imageStyles = css({
|
|
6
8
|
maxWidth: '100%',
|
|
7
9
|
height: 'auto'
|
|
@@ -27,9 +29,8 @@ export var DialogImage = function DialogImage(_ref) {
|
|
|
27
29
|
var alt = _ref.alt,
|
|
28
30
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
29
31
|
return (
|
|
30
|
-
/*#__PURE__*/
|
|
31
32
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
32
|
-
|
|
33
|
+
jsx("img", _extends({
|
|
33
34
|
css: imageStyles,
|
|
34
35
|
alt: alt
|
|
35
36
|
}, props))
|
|
@@ -45,7 +46,7 @@ export var DialogImage = function DialogImage(_ref) {
|
|
|
45
46
|
*/
|
|
46
47
|
export var DialogActionItemContainer = function DialogActionItemContainer(_ref2) {
|
|
47
48
|
var children = _ref2.children;
|
|
48
|
-
return
|
|
49
|
+
return jsx("div", {
|
|
49
50
|
css: actionItemContainerStyles
|
|
50
51
|
}, children);
|
|
51
52
|
};
|
|
@@ -59,7 +60,7 @@ export var DialogActionItemContainer = function DialogActionItemContainer(_ref2)
|
|
|
59
60
|
*/
|
|
60
61
|
export var DialogActionItem = function DialogActionItem(_ref3) {
|
|
61
62
|
var children = _ref3.children;
|
|
62
|
-
return
|
|
63
|
+
return jsx("div", {
|
|
63
64
|
css: actionItemStyles
|
|
64
65
|
}, children);
|
|
65
66
|
};
|
package/dist/esm/styled/modal.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/* eslint-disable @atlaskit/design-system/no-nested-styles */
|
|
2
|
+
/** @jsx jsx */
|
|
2
3
|
|
|
3
|
-
import { css } from '@emotion/react';
|
|
4
|
+
import { css, jsx } from '@emotion/react';
|
|
4
5
|
import { h600 } from '@atlaskit/theme/typography';
|
|
5
6
|
var modalBodyStyles = css({
|
|
6
7
|
padding: "var(--ds-space-500, 40px)".concat(" ", "var(--ds-space-200, 16px)"),
|
|
@@ -46,7 +47,7 @@ var modalActionItemStyles = css({
|
|
|
46
47
|
*/
|
|
47
48
|
export var ModalBody = function ModalBody(_ref) {
|
|
48
49
|
var children = _ref.children;
|
|
49
|
-
return
|
|
50
|
+
return jsx("div", {
|
|
50
51
|
css: modalBodyStyles
|
|
51
52
|
}, children);
|
|
52
53
|
};
|
|
@@ -58,7 +59,7 @@ export var ModalBody = function ModalBody(_ref) {
|
|
|
58
59
|
*/
|
|
59
60
|
export var ModalHeading = function ModalHeading(_ref2) {
|
|
60
61
|
var children = _ref2.children;
|
|
61
|
-
return
|
|
62
|
+
return jsx("h4", {
|
|
62
63
|
css: modalHeadingStyles
|
|
63
64
|
}, children);
|
|
64
65
|
};
|
|
@@ -71,7 +72,7 @@ export var ModalHeading = function ModalHeading(_ref2) {
|
|
|
71
72
|
export var ModalImage = function ModalImage(_ref3) {
|
|
72
73
|
var alt = _ref3.alt,
|
|
73
74
|
src = _ref3.src;
|
|
74
|
-
return
|
|
75
|
+
return jsx("img", {
|
|
75
76
|
css: modalImageStyles,
|
|
76
77
|
alt: alt,
|
|
77
78
|
src: src
|
|
@@ -86,7 +87,7 @@ export var ModalImage = function ModalImage(_ref3) {
|
|
|
86
87
|
export var ModalActionContainer = function ModalActionContainer(_ref4) {
|
|
87
88
|
var children = _ref4.children,
|
|
88
89
|
shouldReverseButtonOrder = _ref4.shouldReverseButtonOrder;
|
|
89
|
-
return
|
|
90
|
+
return jsx("div", {
|
|
90
91
|
css: [modalActionContainerStyles, shouldReverseButtonOrder && modalActionContainerReversedStyles]
|
|
91
92
|
}, children);
|
|
92
93
|
};
|
|
@@ -98,7 +99,7 @@ export var ModalActionContainer = function ModalActionContainer(_ref4) {
|
|
|
98
99
|
*/
|
|
99
100
|
export var ModalActionItem = function ModalActionItem(_ref5) {
|
|
100
101
|
var children = _ref5.children;
|
|
101
|
-
return
|
|
102
|
+
return jsx("div", {
|
|
102
103
|
css: modalActionItemStyles
|
|
103
104
|
}, children);
|
|
104
105
|
};
|
|
@@ -6,7 +6,9 @@ var _excluded = ["children", "bgColor", "radius", "style", "testId"],
|
|
|
6
6
|
_excluded3 = ["children", "pulse", "testId"];
|
|
7
7
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
8
8
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
9
|
-
|
|
9
|
+
/** @jsx jsx */
|
|
10
|
+
|
|
11
|
+
import { css, jsx, keyframes } from '@emotion/react';
|
|
10
12
|
import { P300 } from '@atlaskit/theme/colors';
|
|
11
13
|
import { layers } from '@atlaskit/theme/constants';
|
|
12
14
|
// NOTE:
|
|
@@ -39,7 +41,7 @@ var Base = function Base(_ref) {
|
|
|
39
41
|
style = _ref.style,
|
|
40
42
|
testId = _ref.testId,
|
|
41
43
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
42
|
-
return
|
|
44
|
+
return jsx("div", _extends({
|
|
43
45
|
css: baseStyles,
|
|
44
46
|
"data-testid": testId,
|
|
45
47
|
style: _objectSpread(_objectSpread({}, style), {}, {
|
|
@@ -62,9 +64,8 @@ export var TargetInner = function TargetInner(_ref2) {
|
|
|
62
64
|
pulse = _ref2.pulse,
|
|
63
65
|
props = _objectWithoutProperties(_ref2, _excluded2);
|
|
64
66
|
return (
|
|
65
|
-
/*#__PURE__*/
|
|
66
67
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
67
|
-
|
|
68
|
+
jsx(Base, _extends({}, props, {
|
|
68
69
|
css: [pulse && animationStyles]
|
|
69
70
|
}), children)
|
|
70
71
|
);
|
|
@@ -88,7 +89,7 @@ var targetOverlayStyles = css({
|
|
|
88
89
|
* @internal
|
|
89
90
|
*/
|
|
90
91
|
export var TargetOverlay = function TargetOverlay(props) {
|
|
91
|
-
return
|
|
92
|
+
return jsx("div", _extends({}, props, {
|
|
92
93
|
css: targetOverlayStyles,
|
|
93
94
|
style: {
|
|
94
95
|
cursor: props.onClick ? 'pointer' : 'auto'
|
|
@@ -112,9 +113,8 @@ export var Pulse = function Pulse(_ref3) {
|
|
|
112
113
|
testId = _ref3.testId,
|
|
113
114
|
props = _objectWithoutProperties(_ref3, _excluded3);
|
|
114
115
|
return (
|
|
115
|
-
/*#__PURE__*/
|
|
116
116
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
117
|
-
|
|
117
|
+
jsx(Base, _extends({}, props, {
|
|
118
118
|
css: [pulse && animationStyles],
|
|
119
119
|
testId: testId
|
|
120
120
|
}), children)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/onboarding",
|
|
3
|
-
"version": "11.1.
|
|
3
|
+
"version": "11.1.3",
|
|
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/"
|
|
@@ -34,14 +34,14 @@
|
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@atlaskit/analytics-next": "^9.1.0",
|
|
37
|
-
"@atlaskit/button": "^
|
|
37
|
+
"@atlaskit/button": "^17.0.0",
|
|
38
38
|
"@atlaskit/ds-lib": "^2.2.0",
|
|
39
39
|
"@atlaskit/heading": "^1.4.0",
|
|
40
40
|
"@atlaskit/modal-dialog": "^12.10.0",
|
|
41
41
|
"@atlaskit/popper": "^5.5.0",
|
|
42
42
|
"@atlaskit/portal": "^4.4.0",
|
|
43
43
|
"@atlaskit/theme": "^12.6.0",
|
|
44
|
-
"@atlaskit/tokens": "^1.
|
|
44
|
+
"@atlaskit/tokens": "^1.30.0",
|
|
45
45
|
"@babel/runtime": "^7.0.0",
|
|
46
46
|
"@emotion/react": "^11.7.1",
|
|
47
47
|
"bind-event-listener": "^2.1.1",
|