@atlaskit/onboarding 12.2.0 → 12.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/dist/cjs/components/modal.js +7 -10
- package/dist/cjs/components/spotlight-dialog.js +6 -9
- package/dist/cjs/components/spotlight-inner.js +7 -10
- package/dist/cjs/components/spotlight-manager.js +10 -13
- package/dist/cjs/components/spotlight-transition.js +7 -10
- package/dist/cjs/components/value-changed.js +5 -7
- package/dist/cjs/styled/modal.js +5 -11
- package/dist/es2019/styled/modal.js +5 -11
- package/dist/esm/components/modal.js +7 -10
- package/dist/esm/components/spotlight-dialog.js +6 -9
- package/dist/esm/components/spotlight-inner.js +7 -10
- package/dist/esm/components/spotlight-manager.js +10 -13
- package/dist/esm/components/spotlight-transition.js +7 -10
- package/dist/esm/components/value-changed.js +5 -7
- package/dist/esm/styled/modal.js +5 -11
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/onboarding
|
|
2
2
|
|
|
3
|
+
## 12.2.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#180301](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/180301)
|
|
8
|
+
[`16990dd2ac6e5`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/16990dd2ac6e5) -
|
|
9
|
+
Internal changes to typography styles. There may be some minor visual changes to align with
|
|
10
|
+
modernized typography styles.
|
|
11
|
+
|
|
12
|
+
## 12.2.1
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
3
18
|
## 12.2.0
|
|
4
19
|
|
|
5
20
|
### Minor Changes
|
|
@@ -10,10 +10,9 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
10
10
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
11
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
12
12
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
13
|
-
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
14
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
15
13
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
16
14
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
15
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
17
16
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
18
17
|
var _react = require("react");
|
|
19
18
|
var _react2 = require("@emotion/react");
|
|
@@ -25,7 +24,7 @@ var _excluded = ["text", "key"],
|
|
|
25
24
|
_excluded2 = ["actions", "children", "heading", "experimental_shouldShowPrimaryButtonOnRight", "footer", "header", "image"];
|
|
26
25
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
27
26
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
28
|
-
function
|
|
27
|
+
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
29
28
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /**
|
|
30
29
|
* @jsxRuntime classic
|
|
31
30
|
* @jsx jsx
|
|
@@ -42,16 +41,14 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
42
41
|
*/
|
|
43
42
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
44
43
|
var BenefitsModal = exports.default = /*#__PURE__*/function (_Component) {
|
|
45
|
-
(0, _inherits2.default)(BenefitsModal, _Component);
|
|
46
|
-
var _super = _createSuper(BenefitsModal);
|
|
47
44
|
function BenefitsModal() {
|
|
48
45
|
var _this;
|
|
49
46
|
(0, _classCallCheck2.default)(this, BenefitsModal);
|
|
50
47
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
51
48
|
args[_key] = arguments[_key];
|
|
52
49
|
}
|
|
53
|
-
_this =
|
|
54
|
-
(0, _defineProperty2.default)(
|
|
50
|
+
_this = _callSuper(this, BenefitsModal, [].concat(args));
|
|
51
|
+
(0, _defineProperty2.default)(_this, "headerComponent", function (props) {
|
|
55
52
|
var HeaderElement = props.header,
|
|
56
53
|
src = props.image;
|
|
57
54
|
var ImageElement = function ImageElement() {
|
|
@@ -62,7 +59,7 @@ var BenefitsModal = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
62
59
|
};
|
|
63
60
|
return HeaderElement || ImageElement;
|
|
64
61
|
});
|
|
65
|
-
(0, _defineProperty2.default)(
|
|
62
|
+
(0, _defineProperty2.default)(_this, "footerComponent", function (props) {
|
|
66
63
|
var FooterElement = props.footer,
|
|
67
64
|
actionList = props.actions,
|
|
68
65
|
_props$experimental_s = props.experimental_shouldShowPrimaryButtonOnRight,
|
|
@@ -89,7 +86,8 @@ var BenefitsModal = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
89
86
|
});
|
|
90
87
|
return _this;
|
|
91
88
|
}
|
|
92
|
-
(0,
|
|
89
|
+
(0, _inherits2.default)(BenefitsModal, _Component);
|
|
90
|
+
return (0, _createClass2.default)(BenefitsModal, [{
|
|
93
91
|
key: "render",
|
|
94
92
|
value: function render() {
|
|
95
93
|
var _this$props = this.props,
|
|
@@ -126,5 +124,4 @@ var BenefitsModal = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
126
124
|
}, rest), (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));
|
|
127
125
|
}
|
|
128
126
|
}]);
|
|
129
|
-
return BenefitsModal;
|
|
130
127
|
}(_react.Component);
|
|
@@ -8,10 +8,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
10
10
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
11
|
-
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
12
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
13
11
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
14
12
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
13
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
15
14
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
16
15
|
var _react = _interopRequireWildcard(require("react"));
|
|
17
16
|
var _reactFocusLock = _interopRequireDefault(require("react-focus-lock"));
|
|
@@ -24,7 +23,7 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
|
|
|
24
23
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
25
24
|
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; }
|
|
26
25
|
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; }
|
|
27
|
-
function
|
|
26
|
+
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
28
27
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
29
28
|
/**
|
|
30
29
|
* __Spotlight dialog__
|
|
@@ -37,21 +36,20 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
37
36
|
*/
|
|
38
37
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
39
38
|
var SpotlightDialogComponent = /*#__PURE__*/function (_Component) {
|
|
40
|
-
(0, _inherits2.default)(SpotlightDialogComponent, _Component);
|
|
41
|
-
var _super = _createSuper(SpotlightDialogComponent);
|
|
42
39
|
function SpotlightDialogComponent() {
|
|
43
40
|
var _this;
|
|
44
41
|
(0, _classCallCheck2.default)(this, SpotlightDialogComponent);
|
|
45
42
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
46
43
|
args[_key] = arguments[_key];
|
|
47
44
|
}
|
|
48
|
-
_this =
|
|
49
|
-
(0, _defineProperty2.default)(
|
|
45
|
+
_this = _callSuper(this, SpotlightDialogComponent, [].concat(args));
|
|
46
|
+
(0, _defineProperty2.default)(_this, "state", {
|
|
50
47
|
focusLockDisabled: true
|
|
51
48
|
});
|
|
52
49
|
return _this;
|
|
53
50
|
}
|
|
54
|
-
(0,
|
|
51
|
+
(0, _inherits2.default)(SpotlightDialogComponent, _Component);
|
|
52
|
+
return (0, _createClass2.default)(SpotlightDialogComponent, [{
|
|
55
53
|
key: "componentDidMount",
|
|
56
54
|
value: function componentDidMount() {
|
|
57
55
|
var _this2 = this;
|
|
@@ -167,6 +165,5 @@ var SpotlightDialogComponent = /*#__PURE__*/function (_Component) {
|
|
|
167
165
|
});
|
|
168
166
|
}
|
|
169
167
|
}]);
|
|
170
|
-
return SpotlightDialogComponent;
|
|
171
168
|
}(_react.Component); // eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
172
169
|
var _default = exports.default = SpotlightDialogComponent;
|
|
@@ -9,10 +9,9 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
9
9
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
10
10
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
11
11
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
12
|
-
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
13
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
14
12
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
15
13
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
14
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
16
15
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
17
16
|
var _react = _interopRequireDefault(require("react"));
|
|
18
17
|
var _exenv = require("exenv");
|
|
@@ -31,7 +30,7 @@ var _spotlightTransition = require("./spotlight-transition");
|
|
|
31
30
|
var _excluded = ["height", "left", "top", "width"];
|
|
32
31
|
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; }
|
|
33
32
|
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; }
|
|
34
|
-
function
|
|
33
|
+
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
35
34
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
36
35
|
/**
|
|
37
36
|
* __Spotlight inner__
|
|
@@ -41,23 +40,21 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
41
40
|
* @internal
|
|
42
41
|
*/
|
|
43
42
|
var SpotlightInner = /*#__PURE__*/function (_React$Component) {
|
|
44
|
-
(0, _inherits2.default)(SpotlightInner, _React$Component);
|
|
45
|
-
var _super = _createSuper(SpotlightInner);
|
|
46
43
|
function SpotlightInner() {
|
|
47
44
|
var _this;
|
|
48
45
|
(0, _classCallCheck2.default)(this, SpotlightInner);
|
|
49
46
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
50
47
|
args[_key] = arguments[_key];
|
|
51
48
|
}
|
|
52
|
-
_this =
|
|
53
|
-
(0, _defineProperty2.default)(
|
|
49
|
+
_this = _callSuper(this, SpotlightInner, [].concat(args));
|
|
50
|
+
(0, _defineProperty2.default)(_this, "state", {
|
|
54
51
|
// This is only used when targetReplacement is specified.
|
|
55
52
|
// In this case, we have to render the targetReplacement component,
|
|
56
53
|
// get a dom reference from that component, then render again passing
|
|
57
54
|
// that reference into SpotlightDialog (Popper).
|
|
58
55
|
replacementElement: null
|
|
59
56
|
});
|
|
60
|
-
(0, _defineProperty2.default)(
|
|
57
|
+
(0, _defineProperty2.default)(_this, "getTargetNodeStyle", function (box) {
|
|
61
58
|
if (!_exenv.canUseDOM) {
|
|
62
59
|
return {};
|
|
63
60
|
}
|
|
@@ -76,7 +73,8 @@ var SpotlightInner = /*#__PURE__*/function (_React$Component) {
|
|
|
76
73
|
});
|
|
77
74
|
return _this;
|
|
78
75
|
}
|
|
79
|
-
(0,
|
|
76
|
+
(0, _inherits2.default)(SpotlightInner, _React$Component);
|
|
77
|
+
return (0, _createClass2.default)(SpotlightInner, [{
|
|
80
78
|
key: "componentDidUpdate",
|
|
81
79
|
value: function componentDidUpdate(prevProps) {
|
|
82
80
|
if (prevProps.targetNode !== this.props.targetNode) {
|
|
@@ -178,7 +176,6 @@ var SpotlightInner = /*#__PURE__*/function (_React$Component) {
|
|
|
178
176
|
});
|
|
179
177
|
}
|
|
180
178
|
}]);
|
|
181
|
-
return SpotlightInner;
|
|
182
179
|
}(_react.default.Component);
|
|
183
180
|
(0, _defineProperty2.default)(SpotlightInner, "defaultProps", {
|
|
184
181
|
dialogWidth: 400,
|
|
@@ -8,10 +8,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.default = exports.TargetConsumer = exports.SpotlightContext = exports.SpotlightConsumer = void 0;
|
|
9
9
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
10
10
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
11
|
-
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
12
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
13
11
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
14
12
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
13
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
15
14
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
16
15
|
var _react = _interopRequireWildcard(require("react"));
|
|
17
16
|
var _memoizeOne = _interopRequireDefault(require("memoize-one"));
|
|
@@ -24,7 +23,7 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
|
|
|
24
23
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
25
24
|
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; }
|
|
26
25
|
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; }
|
|
27
|
-
function
|
|
26
|
+
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
28
27
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
29
28
|
var _createContext = /*#__PURE__*/(0, _react.createContext)(undefined),
|
|
30
29
|
TargetConsumer = exports.TargetConsumer = _createContext.Consumer,
|
|
@@ -53,20 +52,18 @@ var Container = function Container(_ref) {
|
|
|
53
52
|
*/
|
|
54
53
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
55
54
|
var SpotlightManager = exports.default = /*#__PURE__*/function (_PureComponent) {
|
|
56
|
-
(0, _inherits2.default)(SpotlightManager, _PureComponent);
|
|
57
|
-
var _super = _createSuper(SpotlightManager);
|
|
58
55
|
function SpotlightManager() {
|
|
59
56
|
var _this;
|
|
60
57
|
(0, _classCallCheck2.default)(this, SpotlightManager);
|
|
61
58
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
62
59
|
args[_key] = arguments[_key];
|
|
63
60
|
}
|
|
64
|
-
_this =
|
|
65
|
-
(0, _defineProperty2.default)(
|
|
61
|
+
_this = _callSuper(this, SpotlightManager, [].concat(args));
|
|
62
|
+
(0, _defineProperty2.default)(_this, "state", {
|
|
66
63
|
spotlightCount: 0,
|
|
67
64
|
targets: {}
|
|
68
65
|
});
|
|
69
|
-
(0, _defineProperty2.default)(
|
|
66
|
+
(0, _defineProperty2.default)(_this, "getTargetRef", function (name) {
|
|
70
67
|
return function (element) {
|
|
71
68
|
_this.setState(function (state) {
|
|
72
69
|
return {
|
|
@@ -75,21 +72,21 @@ var SpotlightManager = exports.default = /*#__PURE__*/function (_PureComponent)
|
|
|
75
72
|
});
|
|
76
73
|
};
|
|
77
74
|
});
|
|
78
|
-
(0, _defineProperty2.default)(
|
|
75
|
+
(0, _defineProperty2.default)(_this, "spotlightOpen", function () {
|
|
79
76
|
_this.setState(function (state) {
|
|
80
77
|
return {
|
|
81
78
|
spotlightCount: state.spotlightCount + 1
|
|
82
79
|
};
|
|
83
80
|
});
|
|
84
81
|
});
|
|
85
|
-
(0, _defineProperty2.default)(
|
|
82
|
+
(0, _defineProperty2.default)(_this, "spotlightClose", function () {
|
|
86
83
|
_this.setState(function (state) {
|
|
87
84
|
return {
|
|
88
85
|
spotlightCount: state.spotlightCount - 1
|
|
89
86
|
};
|
|
90
87
|
});
|
|
91
88
|
});
|
|
92
|
-
(0, _defineProperty2.default)(
|
|
89
|
+
(0, _defineProperty2.default)(_this, "getStateProviderValue", (0, _memoizeOne.default)(function (targets) {
|
|
93
90
|
return {
|
|
94
91
|
opened: _this.spotlightOpen,
|
|
95
92
|
closed: _this.spotlightClose,
|
|
@@ -98,7 +95,8 @@ var SpotlightManager = exports.default = /*#__PURE__*/function (_PureComponent)
|
|
|
98
95
|
}));
|
|
99
96
|
return _this;
|
|
100
97
|
}
|
|
101
|
-
(0,
|
|
98
|
+
(0, _inherits2.default)(SpotlightManager, _PureComponent);
|
|
99
|
+
return (0, _createClass2.default)(SpotlightManager, [{
|
|
102
100
|
key: "componentDidMount",
|
|
103
101
|
value: function componentDidMount() {
|
|
104
102
|
if (typeof process !== 'undefined' && process.env.NODE_ENV !== 'production' && !process.env.CI) {
|
|
@@ -136,7 +134,6 @@ var SpotlightManager = exports.default = /*#__PURE__*/function (_PureComponent)
|
|
|
136
134
|
}), children)));
|
|
137
135
|
}
|
|
138
136
|
}]);
|
|
139
|
-
return SpotlightManager;
|
|
140
137
|
}(_react.PureComponent);
|
|
141
138
|
(0, _defineProperty2.default)(SpotlightManager, "defaultProps", {
|
|
142
139
|
blanketIsTinted: true
|
|
@@ -8,16 +8,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.default = exports.SpotlightTransitionConsumer = void 0;
|
|
9
9
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
10
10
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
11
|
-
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
12
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
13
11
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
14
12
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
13
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
15
14
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
16
15
|
var _react = _interopRequireWildcard(require("react"));
|
|
17
16
|
var _noop = _interopRequireDefault(require("@atlaskit/ds-lib/noop"));
|
|
18
17
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
19
18
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
20
|
-
function
|
|
19
|
+
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
21
20
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
22
21
|
var SpotlightTransitionContext = /*#__PURE__*/(0, _react.createContext)({
|
|
23
22
|
isOpen: true,
|
|
@@ -42,26 +41,25 @@ var hasChildren = function hasChildren(children) {
|
|
|
42
41
|
* - [Usage](https://atlassian.design/components/onboarding/usage)
|
|
43
42
|
*/
|
|
44
43
|
var SpotlightTransition = /*#__PURE__*/function (_React$Component) {
|
|
45
|
-
(0, _inherits2.default)(SpotlightTransition, _React$Component);
|
|
46
|
-
var _super = _createSuper(SpotlightTransition);
|
|
47
44
|
function SpotlightTransition() {
|
|
48
45
|
var _this;
|
|
49
46
|
(0, _classCallCheck2.default)(this, SpotlightTransition);
|
|
50
47
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
51
48
|
args[_key] = arguments[_key];
|
|
52
49
|
}
|
|
53
|
-
_this =
|
|
54
|
-
(0, _defineProperty2.default)(
|
|
50
|
+
_this = _callSuper(this, SpotlightTransition, [].concat(args));
|
|
51
|
+
(0, _defineProperty2.default)(_this, "state", {
|
|
55
52
|
currentChildren: undefined
|
|
56
53
|
});
|
|
57
|
-
(0, _defineProperty2.default)(
|
|
54
|
+
(0, _defineProperty2.default)(_this, "onExited", function () {
|
|
58
55
|
_this.setState({
|
|
59
56
|
currentChildren: _this.props.children
|
|
60
57
|
});
|
|
61
58
|
});
|
|
62
59
|
return _this;
|
|
63
60
|
}
|
|
64
|
-
(0,
|
|
61
|
+
(0, _inherits2.default)(SpotlightTransition, _React$Component);
|
|
62
|
+
return (0, _createClass2.default)(SpotlightTransition, [{
|
|
65
63
|
key: "render",
|
|
66
64
|
value: function render() {
|
|
67
65
|
return /*#__PURE__*/_react.default.createElement(SpotlightTransitionContext.Provider, {
|
|
@@ -81,7 +79,6 @@ var SpotlightTransition = /*#__PURE__*/function (_React$Component) {
|
|
|
81
79
|
};
|
|
82
80
|
}
|
|
83
81
|
}]);
|
|
84
|
-
return SpotlightTransition;
|
|
85
82
|
}(_react.default.Component);
|
|
86
83
|
/**
|
|
87
84
|
* __Spotlight transition consumer__
|
|
@@ -7,24 +7,23 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
9
9
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
10
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
11
10
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
12
11
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
12
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
13
13
|
var _react = _interopRequireDefault(require("react"));
|
|
14
|
-
function
|
|
14
|
+
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
15
15
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
16
16
|
// This component was born from the pain of using render props in lifecycle methods.
|
|
17
17
|
// On update, it checks whether the current value prop is equal to the previous value prop.
|
|
18
18
|
// If they are different, it calls the onChange function.
|
|
19
19
|
// We use this for updating Popper when the SpotlightDialog width changes.
|
|
20
20
|
var ValueChanged = exports.default = /*#__PURE__*/function (_React$Component) {
|
|
21
|
-
(0, _inherits2.default)(ValueChanged, _React$Component);
|
|
22
|
-
var _super = _createSuper(ValueChanged);
|
|
23
21
|
function ValueChanged() {
|
|
24
22
|
(0, _classCallCheck2.default)(this, ValueChanged);
|
|
25
|
-
return
|
|
23
|
+
return _callSuper(this, ValueChanged, arguments);
|
|
26
24
|
}
|
|
27
|
-
(0,
|
|
25
|
+
(0, _inherits2.default)(ValueChanged, _React$Component);
|
|
26
|
+
return (0, _createClass2.default)(ValueChanged, [{
|
|
28
27
|
key: "componentDidUpdate",
|
|
29
28
|
value: function componentDidUpdate(prevProps) {
|
|
30
29
|
if (prevProps.value !== this.props.value) {
|
|
@@ -37,5 +36,4 @@ var ValueChanged = exports.default = /*#__PURE__*/function (_React$Component) {
|
|
|
37
36
|
return this.props.children;
|
|
38
37
|
}
|
|
39
38
|
}]);
|
|
40
|
-
return ValueChanged;
|
|
41
39
|
}(_react.default.Component);
|
package/dist/cjs/styled/modal.js
CHANGED
|
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.ModalImage = exports.ModalHeading = exports.ModalBody = exports.ModalActionItem = exports.ModalActionContainer = void 0;
|
|
7
7
|
var _react = require("@emotion/react");
|
|
8
|
-
var _typography = require("@atlaskit/theme/typography");
|
|
9
8
|
/**
|
|
10
9
|
* @jsxRuntime classic
|
|
11
10
|
* @jsx jsx
|
|
@@ -17,16 +16,11 @@ var modalBodyStyles = (0, _react.css)({
|
|
|
17
16
|
});
|
|
18
17
|
|
|
19
18
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-array-arguments -- Ignored via go/DSP-18766
|
|
20
|
-
var modalHeadingStyles = (0, _react.css)(
|
|
21
|
-
|
|
22
|
-
(
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
})), {
|
|
27
|
-
marginBottom: "var(--ds-space-100, 8px)",
|
|
28
|
-
color: 'inherit'
|
|
29
|
-
}]);
|
|
19
|
+
var modalHeadingStyles = (0, _react.css)({
|
|
20
|
+
color: 'inherit',
|
|
21
|
+
font: "var(--ds-font-heading-medium, normal 500 20px/24px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
|
|
22
|
+
marginBlockEnd: "var(--ds-space-100, 8px)"
|
|
23
|
+
});
|
|
30
24
|
var modalImageStyles = (0, _react.css)({
|
|
31
25
|
width: '100%',
|
|
32
26
|
height: 'auto',
|
|
@@ -4,23 +4,17 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { css, jsx } from '@emotion/react';
|
|
7
|
-
import { h600 } from '@atlaskit/theme/typography';
|
|
8
7
|
const modalBodyStyles = css({
|
|
9
8
|
padding: `${"var(--ds-space-500, 40px)"} ${"var(--ds-space-200, 16px)"}`,
|
|
10
9
|
textAlign: 'center'
|
|
11
10
|
});
|
|
12
11
|
|
|
13
12
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-array-arguments -- Ignored via go/DSP-18766
|
|
14
|
-
const modalHeadingStyles = css(
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
})), {
|
|
21
|
-
marginBottom: "var(--ds-space-100, 8px)",
|
|
22
|
-
color: 'inherit'
|
|
23
|
-
}]);
|
|
13
|
+
const modalHeadingStyles = css({
|
|
14
|
+
color: 'inherit',
|
|
15
|
+
font: "var(--ds-font-heading-medium, normal 500 20px/24px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
|
|
16
|
+
marginBlockEnd: "var(--ds-space-100, 8px)"
|
|
17
|
+
});
|
|
24
18
|
const modalImageStyles = css({
|
|
25
19
|
width: '100%',
|
|
26
20
|
height: 'auto',
|
|
@@ -2,14 +2,13 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
3
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
4
4
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
5
|
-
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
6
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
7
5
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
8
6
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
7
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
9
8
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
10
9
|
var _excluded = ["text", "key"],
|
|
11
10
|
_excluded2 = ["actions", "children", "heading", "experimental_shouldShowPrimaryButtonOnRight", "footer", "header", "image"];
|
|
12
|
-
function
|
|
11
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
13
12
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
14
13
|
/**
|
|
15
14
|
* @jsxRuntime classic
|
|
@@ -34,16 +33,14 @@ import { modalButtonTheme } from './theme';
|
|
|
34
33
|
*/
|
|
35
34
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
36
35
|
var BenefitsModal = /*#__PURE__*/function (_Component) {
|
|
37
|
-
_inherits(BenefitsModal, _Component);
|
|
38
|
-
var _super = _createSuper(BenefitsModal);
|
|
39
36
|
function BenefitsModal() {
|
|
40
37
|
var _this;
|
|
41
38
|
_classCallCheck(this, BenefitsModal);
|
|
42
39
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
43
40
|
args[_key] = arguments[_key];
|
|
44
41
|
}
|
|
45
|
-
_this =
|
|
46
|
-
_defineProperty(
|
|
42
|
+
_this = _callSuper(this, BenefitsModal, [].concat(args));
|
|
43
|
+
_defineProperty(_this, "headerComponent", function (props) {
|
|
47
44
|
var HeaderElement = props.header,
|
|
48
45
|
src = props.image;
|
|
49
46
|
var ImageElement = function ImageElement() {
|
|
@@ -54,7 +51,7 @@ var BenefitsModal = /*#__PURE__*/function (_Component) {
|
|
|
54
51
|
};
|
|
55
52
|
return HeaderElement || ImageElement;
|
|
56
53
|
});
|
|
57
|
-
_defineProperty(
|
|
54
|
+
_defineProperty(_this, "footerComponent", function (props) {
|
|
58
55
|
var FooterElement = props.footer,
|
|
59
56
|
actionList = props.actions,
|
|
60
57
|
_props$experimental_s = props.experimental_shouldShowPrimaryButtonOnRight,
|
|
@@ -81,7 +78,8 @@ var BenefitsModal = /*#__PURE__*/function (_Component) {
|
|
|
81
78
|
});
|
|
82
79
|
return _this;
|
|
83
80
|
}
|
|
84
|
-
|
|
81
|
+
_inherits(BenefitsModal, _Component);
|
|
82
|
+
return _createClass(BenefitsModal, [{
|
|
85
83
|
key: "render",
|
|
86
84
|
value: function render() {
|
|
87
85
|
var _this$props = this.props,
|
|
@@ -118,6 +116,5 @@ var BenefitsModal = /*#__PURE__*/function (_Component) {
|
|
|
118
116
|
}, rest), jsx(Header, null), jsx(ModalBody, null, jsx(Body, null, heading && jsx(CustomHeader, null), children)), jsx(Footer, null));
|
|
119
117
|
}
|
|
120
118
|
}]);
|
|
121
|
-
return BenefitsModal;
|
|
122
119
|
}(Component);
|
|
123
120
|
export { BenefitsModal as default };
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
-
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
4
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
5
3
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
6
4
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
5
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
7
6
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
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; }
|
|
9
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; }
|
|
10
|
-
function
|
|
9
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
11
10
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
12
11
|
import React, { Component } from 'react';
|
|
13
12
|
import FocusLock from 'react-focus-lock';
|
|
@@ -27,21 +26,20 @@ import ValueChanged from './value-changed';
|
|
|
27
26
|
*/
|
|
28
27
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
29
28
|
var SpotlightDialogComponent = /*#__PURE__*/function (_Component) {
|
|
30
|
-
_inherits(SpotlightDialogComponent, _Component);
|
|
31
|
-
var _super = _createSuper(SpotlightDialogComponent);
|
|
32
29
|
function SpotlightDialogComponent() {
|
|
33
30
|
var _this;
|
|
34
31
|
_classCallCheck(this, SpotlightDialogComponent);
|
|
35
32
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
36
33
|
args[_key] = arguments[_key];
|
|
37
34
|
}
|
|
38
|
-
_this =
|
|
39
|
-
_defineProperty(
|
|
35
|
+
_this = _callSuper(this, SpotlightDialogComponent, [].concat(args));
|
|
36
|
+
_defineProperty(_this, "state", {
|
|
40
37
|
focusLockDisabled: true
|
|
41
38
|
});
|
|
42
39
|
return _this;
|
|
43
40
|
}
|
|
44
|
-
|
|
41
|
+
_inherits(SpotlightDialogComponent, _Component);
|
|
42
|
+
return _createClass(SpotlightDialogComponent, [{
|
|
45
43
|
key: "componentDidMount",
|
|
46
44
|
value: function componentDidMount() {
|
|
47
45
|
var _this2 = this;
|
|
@@ -157,6 +155,5 @@ var SpotlightDialogComponent = /*#__PURE__*/function (_Component) {
|
|
|
157
155
|
});
|
|
158
156
|
}
|
|
159
157
|
}]);
|
|
160
|
-
return SpotlightDialogComponent;
|
|
161
158
|
}(Component); // eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
162
159
|
export default SpotlightDialogComponent;
|
|
@@ -2,15 +2,14 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
3
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
4
4
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
5
|
-
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
6
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
7
5
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
8
6
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
7
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
9
8
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
10
9
|
var _excluded = ["height", "left", "top", "width"];
|
|
11
10
|
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; }
|
|
12
11
|
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; }
|
|
13
|
-
function
|
|
12
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
14
13
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
15
14
|
import React from 'react';
|
|
16
15
|
import { canUseDOM } from 'exenv';
|
|
@@ -34,23 +33,21 @@ import { SpotlightTransitionConsumer } from './spotlight-transition';
|
|
|
34
33
|
* @internal
|
|
35
34
|
*/
|
|
36
35
|
var SpotlightInner = /*#__PURE__*/function (_React$Component) {
|
|
37
|
-
_inherits(SpotlightInner, _React$Component);
|
|
38
|
-
var _super = _createSuper(SpotlightInner);
|
|
39
36
|
function SpotlightInner() {
|
|
40
37
|
var _this;
|
|
41
38
|
_classCallCheck(this, SpotlightInner);
|
|
42
39
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
43
40
|
args[_key] = arguments[_key];
|
|
44
41
|
}
|
|
45
|
-
_this =
|
|
46
|
-
_defineProperty(
|
|
42
|
+
_this = _callSuper(this, SpotlightInner, [].concat(args));
|
|
43
|
+
_defineProperty(_this, "state", {
|
|
47
44
|
// This is only used when targetReplacement is specified.
|
|
48
45
|
// In this case, we have to render the targetReplacement component,
|
|
49
46
|
// get a dom reference from that component, then render again passing
|
|
50
47
|
// that reference into SpotlightDialog (Popper).
|
|
51
48
|
replacementElement: null
|
|
52
49
|
});
|
|
53
|
-
_defineProperty(
|
|
50
|
+
_defineProperty(_this, "getTargetNodeStyle", function (box) {
|
|
54
51
|
if (!canUseDOM) {
|
|
55
52
|
return {};
|
|
56
53
|
}
|
|
@@ -69,7 +66,8 @@ var SpotlightInner = /*#__PURE__*/function (_React$Component) {
|
|
|
69
66
|
});
|
|
70
67
|
return _this;
|
|
71
68
|
}
|
|
72
|
-
|
|
69
|
+
_inherits(SpotlightInner, _React$Component);
|
|
70
|
+
return _createClass(SpotlightInner, [{
|
|
73
71
|
key: "componentDidUpdate",
|
|
74
72
|
value: function componentDidUpdate(prevProps) {
|
|
75
73
|
if (prevProps.targetNode !== this.props.targetNode) {
|
|
@@ -171,7 +169,6 @@ var SpotlightInner = /*#__PURE__*/function (_React$Component) {
|
|
|
171
169
|
});
|
|
172
170
|
}
|
|
173
171
|
}]);
|
|
174
|
-
return SpotlightInner;
|
|
175
172
|
}(React.Component);
|
|
176
173
|
_defineProperty(SpotlightInner, "defaultProps", {
|
|
177
174
|
dialogWidth: 400,
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
-
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
4
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
5
3
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
6
4
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
5
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
7
6
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
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; }
|
|
9
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; }
|
|
10
|
-
function
|
|
9
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
11
10
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
12
11
|
import React, { createContext, PureComponent } from 'react';
|
|
13
12
|
import memoizeOne from 'memoize-one';
|
|
@@ -45,20 +44,18 @@ var Container = function Container(_ref) {
|
|
|
45
44
|
*/
|
|
46
45
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
47
46
|
var SpotlightManager = /*#__PURE__*/function (_PureComponent) {
|
|
48
|
-
_inherits(SpotlightManager, _PureComponent);
|
|
49
|
-
var _super = _createSuper(SpotlightManager);
|
|
50
47
|
function SpotlightManager() {
|
|
51
48
|
var _this;
|
|
52
49
|
_classCallCheck(this, SpotlightManager);
|
|
53
50
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
54
51
|
args[_key] = arguments[_key];
|
|
55
52
|
}
|
|
56
|
-
_this =
|
|
57
|
-
_defineProperty(
|
|
53
|
+
_this = _callSuper(this, SpotlightManager, [].concat(args));
|
|
54
|
+
_defineProperty(_this, "state", {
|
|
58
55
|
spotlightCount: 0,
|
|
59
56
|
targets: {}
|
|
60
57
|
});
|
|
61
|
-
_defineProperty(
|
|
58
|
+
_defineProperty(_this, "getTargetRef", function (name) {
|
|
62
59
|
return function (element) {
|
|
63
60
|
_this.setState(function (state) {
|
|
64
61
|
return {
|
|
@@ -67,21 +64,21 @@ var SpotlightManager = /*#__PURE__*/function (_PureComponent) {
|
|
|
67
64
|
});
|
|
68
65
|
};
|
|
69
66
|
});
|
|
70
|
-
_defineProperty(
|
|
67
|
+
_defineProperty(_this, "spotlightOpen", function () {
|
|
71
68
|
_this.setState(function (state) {
|
|
72
69
|
return {
|
|
73
70
|
spotlightCount: state.spotlightCount + 1
|
|
74
71
|
};
|
|
75
72
|
});
|
|
76
73
|
});
|
|
77
|
-
_defineProperty(
|
|
74
|
+
_defineProperty(_this, "spotlightClose", function () {
|
|
78
75
|
_this.setState(function (state) {
|
|
79
76
|
return {
|
|
80
77
|
spotlightCount: state.spotlightCount - 1
|
|
81
78
|
};
|
|
82
79
|
});
|
|
83
80
|
});
|
|
84
|
-
_defineProperty(
|
|
81
|
+
_defineProperty(_this, "getStateProviderValue", memoizeOne(function (targets) {
|
|
85
82
|
return {
|
|
86
83
|
opened: _this.spotlightOpen,
|
|
87
84
|
closed: _this.spotlightClose,
|
|
@@ -90,7 +87,8 @@ var SpotlightManager = /*#__PURE__*/function (_PureComponent) {
|
|
|
90
87
|
}));
|
|
91
88
|
return _this;
|
|
92
89
|
}
|
|
93
|
-
|
|
90
|
+
_inherits(SpotlightManager, _PureComponent);
|
|
91
|
+
return _createClass(SpotlightManager, [{
|
|
94
92
|
key: "componentDidMount",
|
|
95
93
|
value: function componentDidMount() {
|
|
96
94
|
if (typeof process !== 'undefined' && process.env.NODE_ENV !== 'production' && !process.env.CI) {
|
|
@@ -128,7 +126,6 @@ var SpotlightManager = /*#__PURE__*/function (_PureComponent) {
|
|
|
128
126
|
}), children)));
|
|
129
127
|
}
|
|
130
128
|
}]);
|
|
131
|
-
return SpotlightManager;
|
|
132
129
|
}(PureComponent);
|
|
133
130
|
_defineProperty(SpotlightManager, "defaultProps", {
|
|
134
131
|
blanketIsTinted: true
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
-
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
4
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
5
3
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
6
4
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
5
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
7
6
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
|
-
function
|
|
7
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
9
8
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
10
9
|
import React, { createContext } from 'react';
|
|
11
10
|
import noop from '@atlaskit/ds-lib/noop';
|
|
@@ -32,26 +31,25 @@ var hasChildren = function hasChildren(children) {
|
|
|
32
31
|
* - [Usage](https://atlassian.design/components/onboarding/usage)
|
|
33
32
|
*/
|
|
34
33
|
var SpotlightTransition = /*#__PURE__*/function (_React$Component) {
|
|
35
|
-
_inherits(SpotlightTransition, _React$Component);
|
|
36
|
-
var _super = _createSuper(SpotlightTransition);
|
|
37
34
|
function SpotlightTransition() {
|
|
38
35
|
var _this;
|
|
39
36
|
_classCallCheck(this, SpotlightTransition);
|
|
40
37
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
41
38
|
args[_key] = arguments[_key];
|
|
42
39
|
}
|
|
43
|
-
_this =
|
|
44
|
-
_defineProperty(
|
|
40
|
+
_this = _callSuper(this, SpotlightTransition, [].concat(args));
|
|
41
|
+
_defineProperty(_this, "state", {
|
|
45
42
|
currentChildren: undefined
|
|
46
43
|
});
|
|
47
|
-
_defineProperty(
|
|
44
|
+
_defineProperty(_this, "onExited", function () {
|
|
48
45
|
_this.setState({
|
|
49
46
|
currentChildren: _this.props.children
|
|
50
47
|
});
|
|
51
48
|
});
|
|
52
49
|
return _this;
|
|
53
50
|
}
|
|
54
|
-
|
|
51
|
+
_inherits(SpotlightTransition, _React$Component);
|
|
52
|
+
return _createClass(SpotlightTransition, [{
|
|
55
53
|
key: "render",
|
|
56
54
|
value: function render() {
|
|
57
55
|
return /*#__PURE__*/React.createElement(SpotlightTransitionContext.Provider, {
|
|
@@ -71,7 +69,6 @@ var SpotlightTransition = /*#__PURE__*/function (_React$Component) {
|
|
|
71
69
|
};
|
|
72
70
|
}
|
|
73
71
|
}]);
|
|
74
|
-
return SpotlightTransition;
|
|
75
72
|
}(React.Component);
|
|
76
73
|
/**
|
|
77
74
|
* __Spotlight transition consumer__
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
4
3
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
5
4
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
|
-
|
|
5
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
6
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
7
7
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
8
8
|
import React from 'react';
|
|
9
9
|
// This component was born from the pain of using render props in lifecycle methods.
|
|
@@ -11,13 +11,12 @@ import React from 'react';
|
|
|
11
11
|
// If they are different, it calls the onChange function.
|
|
12
12
|
// We use this for updating Popper when the SpotlightDialog width changes.
|
|
13
13
|
var ValueChanged = /*#__PURE__*/function (_React$Component) {
|
|
14
|
-
_inherits(ValueChanged, _React$Component);
|
|
15
|
-
var _super = _createSuper(ValueChanged);
|
|
16
14
|
function ValueChanged() {
|
|
17
15
|
_classCallCheck(this, ValueChanged);
|
|
18
|
-
return
|
|
16
|
+
return _callSuper(this, ValueChanged, arguments);
|
|
19
17
|
}
|
|
20
|
-
|
|
18
|
+
_inherits(ValueChanged, _React$Component);
|
|
19
|
+
return _createClass(ValueChanged, [{
|
|
21
20
|
key: "componentDidUpdate",
|
|
22
21
|
value: function componentDidUpdate(prevProps) {
|
|
23
22
|
if (prevProps.value !== this.props.value) {
|
|
@@ -30,6 +29,5 @@ var ValueChanged = /*#__PURE__*/function (_React$Component) {
|
|
|
30
29
|
return this.props.children;
|
|
31
30
|
}
|
|
32
31
|
}]);
|
|
33
|
-
return ValueChanged;
|
|
34
32
|
}(React.Component);
|
|
35
33
|
export { ValueChanged as default };
|
package/dist/esm/styled/modal.js
CHANGED
|
@@ -4,23 +4,17 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { css, jsx } from '@emotion/react';
|
|
7
|
-
import { h600 } from '@atlaskit/theme/typography';
|
|
8
7
|
var modalBodyStyles = css({
|
|
9
8
|
padding: "var(--ds-space-500, 40px)".concat(" ", "var(--ds-space-200, 16px)"),
|
|
10
9
|
textAlign: 'center'
|
|
11
10
|
});
|
|
12
11
|
|
|
13
12
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-array-arguments -- Ignored via go/DSP-18766
|
|
14
|
-
var modalHeadingStyles = css(
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
})), {
|
|
21
|
-
marginBottom: "var(--ds-space-100, 8px)",
|
|
22
|
-
color: 'inherit'
|
|
23
|
-
}]);
|
|
13
|
+
var modalHeadingStyles = css({
|
|
14
|
+
color: 'inherit',
|
|
15
|
+
font: "var(--ds-font-heading-medium, normal 500 20px/24px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
|
|
16
|
+
marginBlockEnd: "var(--ds-space-100, 8px)"
|
|
17
|
+
});
|
|
24
18
|
var modalImageStyles = css({
|
|
25
19
|
width: '100%',
|
|
26
20
|
height: 'auto',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/onboarding",
|
|
3
|
-
"version": "12.2.
|
|
3
|
+
"version": "12.2.2",
|
|
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/"
|
|
@@ -41,15 +41,15 @@
|
|
|
41
41
|
"@atlaskit/button": "^20.3.0",
|
|
42
42
|
"@atlaskit/ds-lib": "^3.3.0",
|
|
43
43
|
"@atlaskit/heading": "^4.0.0",
|
|
44
|
-
"@atlaskit/layering": "^0.
|
|
44
|
+
"@atlaskit/layering": "^1.0.0",
|
|
45
45
|
"@atlaskit/modal-dialog": "^12.18.0",
|
|
46
46
|
"@atlaskit/motion": "^1.9.0",
|
|
47
47
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
48
48
|
"@atlaskit/popper": "^6.3.0",
|
|
49
|
-
"@atlaskit/portal": "^4.
|
|
49
|
+
"@atlaskit/portal": "^4.10.0",
|
|
50
50
|
"@atlaskit/primitives": "^13.3.0",
|
|
51
51
|
"@atlaskit/theme": "^14.0.0",
|
|
52
|
-
"@atlaskit/tokens": "^2.
|
|
52
|
+
"@atlaskit/tokens": "^2.5.0",
|
|
53
53
|
"@babel/runtime": "^7.0.0",
|
|
54
54
|
"@emotion/react": "^11.7.1",
|
|
55
55
|
"bind-event-listener": "^3.0.0",
|