@atlaskit/onboarding 14.0.1 → 14.0.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 +19 -0
- package/dist/cjs/components/clone.js +0 -1
- package/dist/cjs/components/modal.js +19 -14
- package/dist/cjs/components/spotlight-manager.js +18 -1
- package/dist/cjs/styled/modal.js +0 -2
- package/dist/cjs/styled/target.compiled.css +6 -2
- package/dist/cjs/styled/target.js +6 -5
- package/dist/cjs/utils/use-element-observer.js +0 -3
- package/dist/es2019/components/clone.js +0 -1
- package/dist/es2019/components/modal.js +19 -14
- package/dist/es2019/components/spotlight-manager.js +18 -2
- package/dist/es2019/styled/modal.js +0 -2
- package/dist/es2019/styled/target.compiled.css +5 -2
- package/dist/es2019/styled/target.js +2 -3
- package/dist/es2019/utils/use-element-observer.js +0 -3
- package/dist/esm/components/clone.js +0 -1
- package/dist/esm/components/modal.js +19 -14
- package/dist/esm/components/spotlight-manager.js +19 -2
- package/dist/esm/styled/modal.js +0 -2
- package/dist/esm/styled/target.compiled.css +6 -2
- package/dist/esm/styled/target.js +6 -5
- package/dist/esm/utils/use-element-observer.js +0 -3
- package/package.json +11 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @atlaskit/onboarding
|
|
2
2
|
|
|
3
|
+
## 14.0.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#148201](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/148201)
|
|
8
|
+
[`8e811f1840de7`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8e811f1840de7) -
|
|
9
|
+
Either actively or pre-emptively fixes a bug with keyframe animations in CJS and ESM distribution
|
|
10
|
+
targets for packages using Compiled CSS-in-JS. This may not affect this package, but the change
|
|
11
|
+
was made so a future migration does not accidentally break it.
|
|
12
|
+
|
|
13
|
+
## 14.0.2
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- [#139445](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/139445)
|
|
18
|
+
[`0f13df85731d6`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0f13df85731d6) -
|
|
19
|
+
the component state update causes React Streming to have Suspense boundary received update before
|
|
20
|
+
hydrating finished error. Wrapping the state update in startTransition
|
|
21
|
+
|
|
3
22
|
## 14.0.1
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
|
@@ -104,20 +104,25 @@ var BenefitsModal = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
104
104
|
id: titleId
|
|
105
105
|
}, heading);
|
|
106
106
|
};
|
|
107
|
-
return
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
107
|
+
return (
|
|
108
|
+
/*#__PURE__*/
|
|
109
|
+
// TODO: This is a problem that needs solving: https://product-fabric.atlassian.net/browse/DSP-22238
|
|
110
|
+
// eslint-disable-next-line @atlaskit/design-system/use-modal-dialog-close-button
|
|
111
|
+
_react.default.createElement(_modalDialog.default, (0, _extends2.default)({
|
|
112
|
+
autoFocus: true,
|
|
113
|
+
shouldCloseOnEscapePress: false,
|
|
114
|
+
shouldCloseOnOverlayClick: false,
|
|
115
|
+
shouldScrollInViewport: true
|
|
116
|
+
// @ts-ignore All of the following props were in the rest props, so I'm
|
|
117
|
+
// making them explicit here even though the Modal doesn't accept them.
|
|
118
|
+
,
|
|
119
|
+
experimental_shouldShowPrimaryButtonOnRight: experimental_shouldShowPrimaryButtonOnRight,
|
|
120
|
+
footer: footer,
|
|
121
|
+
header: header,
|
|
122
|
+
heading: heading,
|
|
123
|
+
image: image
|
|
124
|
+
}, rest), /*#__PURE__*/_react.default.createElement(Header, null), /*#__PURE__*/_react.default.createElement(_modalDialog.ModalBody, null, /*#__PURE__*/_react.default.createElement(_modal.ModalBody, null, heading && /*#__PURE__*/_react.default.createElement(CustomHeader, null), children)), /*#__PURE__*/_react.default.createElement(Footer, null))
|
|
125
|
+
);
|
|
121
126
|
}
|
|
122
127
|
}]);
|
|
123
128
|
}(_react.Component);
|
|
@@ -15,6 +15,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
15
15
|
var _react = _interopRequireWildcard(require("react"));
|
|
16
16
|
var _memoizeOne = _interopRequireDefault(require("memoize-one"));
|
|
17
17
|
var _noop = _interopRequireDefault(require("@atlaskit/ds-lib/noop"));
|
|
18
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
18
19
|
var _portal = _interopRequireDefault(require("@atlaskit/portal"));
|
|
19
20
|
var _blanket = _interopRequireDefault(require("../styled/blanket"));
|
|
20
21
|
var _animation = require("./animation");
|
|
@@ -62,7 +63,23 @@ var SpotlightManager = exports.default = /*#__PURE__*/function (_PureComponent)
|
|
|
62
63
|
spotlightCount: 0,
|
|
63
64
|
targets: {}
|
|
64
65
|
});
|
|
65
|
-
|
|
66
|
+
/*
|
|
67
|
+
* When enabling React Streaming in Confluence, a
|
|
68
|
+
* "This Suspense boundary received an update before it finished hydrating. This caused the boundary to switch to client rendering"
|
|
69
|
+
* error happens.
|
|
70
|
+
* This is to fix this error by wrapping the state update in startTransition as suggested by React: https://react.dev/errors/421?invariant=421
|
|
71
|
+
*/
|
|
72
|
+
(0, _defineProperty2.default)(_this, "getTargetRef", (0, _platformFeatureFlags.fg)('platform_fix_component_state_update_for_suspense') ? function (name) {
|
|
73
|
+
return function (element) {
|
|
74
|
+
(0, _react.startTransition)(function () {
|
|
75
|
+
_this.setState(function (state) {
|
|
76
|
+
return {
|
|
77
|
+
targets: _objectSpread(_objectSpread({}, state.targets), {}, (0, _defineProperty2.default)({}, name, element || undefined))
|
|
78
|
+
};
|
|
79
|
+
});
|
|
80
|
+
});
|
|
81
|
+
};
|
|
82
|
+
} : function (name) {
|
|
66
83
|
return function (element) {
|
|
67
84
|
_this.setState(function (state) {
|
|
68
85
|
return {
|
package/dist/cjs/styled/modal.js
CHANGED
|
@@ -13,8 +13,6 @@ var _compiled = require("@atlaskit/primitives/compiled");
|
|
|
13
13
|
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); }
|
|
14
14
|
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; }
|
|
15
15
|
var modalBodyStyles = null;
|
|
16
|
-
|
|
17
|
-
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-array-arguments -- Ignored via go/DSP-18766
|
|
18
16
|
var modalHeadingStyles = null;
|
|
19
17
|
var modalImageStyles = null;
|
|
20
18
|
var modalActionContainerStyles = null;
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
._y44v1rys{animation:var(--_mb5lf8)}._152tze3t{inset-block-start:var(--ds-space-0,0)}
|
|
1
|
+
._152tze3t{inset-block-start:var(--ds-space-0,0)}
|
|
3
2
|
._16qs1wx8{box-shadow:0 0 0 2px var(--ds-border-discovery,#8270db)}
|
|
4
3
|
._1bsb1osq{width:100%}
|
|
5
4
|
._1e02ze3t{inset-inline-start:var(--ds-space-0,0)}
|
|
5
|
+
._1pglmcjr{animation-timing-function:cubic-bezier(.55,.055,.675,.19)}
|
|
6
6
|
._4t3i1osq{height:100%}
|
|
7
|
+
._5sagi11n{animation-duration:3s}
|
|
8
|
+
._j7hq1ect{animation-name:kyep8rx}
|
|
7
9
|
._kqswstnw{position:absolute}
|
|
10
|
+
._tip812c5{animation-iteration-count:infinite}
|
|
11
|
+
@keyframes kyep8rx{0%,33%{box-shadow:var(--_1jzibln)}66%,to{box-shadow:var(--_1v4eexu)}}
|
|
8
12
|
@media (prefers-reduced-motion:reduce){._1bumglyw{animation:none}._sedtglyw{transition:none}}
|
|
@@ -67,13 +67,14 @@ var TargetInner = exports.TargetInner = function TargetInner(_ref2) {
|
|
|
67
67
|
bgColor: bgColor
|
|
68
68
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
69
69
|
,
|
|
70
|
-
className: (0, _runtime.ax)([pulse && "
|
|
70
|
+
className: (0, _runtime.ax)([pulse && "", pulse && "_5sagi11n _tip812c5 _j7hq1ect _1pglmcjr _16qs1wx8", "_1bumglyw _sedtglyw", className]),
|
|
71
71
|
radius: radius,
|
|
72
72
|
testId: testId
|
|
73
73
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
74
74
|
}, props, {
|
|
75
75
|
style: _objectSpread(_objectSpread({}, props.style), {}, {
|
|
76
|
-
"--
|
|
76
|
+
"--_1jzibln": (0, _runtime.ix)("".concat(baseShadow, ", 0 0 0 ", "var(--ds-border-discovery, #8270DB)")),
|
|
77
|
+
"--_1v4eexu": (0, _runtime.ix)("".concat(baseShadow, ", 0 0 0 10px rgba(101, 84, 192, 0.01)"))
|
|
77
78
|
})
|
|
78
79
|
}), children);
|
|
79
80
|
};
|
|
@@ -94,7 +95,6 @@ var TargetOverlay = exports.TargetOverlay = function TargetOverlay(_ref3) {
|
|
|
94
95
|
onClick: onClick
|
|
95
96
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
96
97
|
}, props, {
|
|
97
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
98
98
|
style: {
|
|
99
99
|
cursor: onClick ? 'pointer' : 'auto'
|
|
100
100
|
},
|
|
@@ -124,13 +124,14 @@ var Pulse = exports.Pulse = function Pulse(_ref4) {
|
|
|
124
124
|
bgColor: bgColor
|
|
125
125
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
126
126
|
,
|
|
127
|
-
className: (0, _runtime.ax)([pulse && "
|
|
127
|
+
className: (0, _runtime.ax)([pulse && "", pulse && "_5sagi11n _tip812c5 _j7hq1ect _1pglmcjr _16qs1wx8", "_1bumglyw _sedtglyw", className]),
|
|
128
128
|
radius: radius,
|
|
129
129
|
testId: testId
|
|
130
130
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
131
131
|
}, props, {
|
|
132
132
|
style: _objectSpread(_objectSpread({}, props.style), {}, {
|
|
133
|
-
"--
|
|
133
|
+
"--_1jzibln": (0, _runtime.ix)("".concat(baseShadow, ", 0 0 0 ", "var(--ds-border-discovery, #8270DB)")),
|
|
134
|
+
"--_1v4eexu": (0, _runtime.ix)("".concat(baseShadow, ", 0 0 0 10px rgba(101, 84, 192, 0.01)"))
|
|
134
135
|
})
|
|
135
136
|
}), children);
|
|
136
137
|
};
|
|
@@ -84,10 +84,7 @@ function callWhenIdle(callback) {
|
|
|
84
84
|
var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
85
85
|
var _opts$timeout = opts.timeout,
|
|
86
86
|
timeout = _opts$timeout === void 0 ? 100 : _opts$timeout;
|
|
87
|
-
|
|
88
|
-
// eslint-disable-next-line compat/compat
|
|
89
87
|
if (typeof window.requestIdleCallback === 'function') {
|
|
90
|
-
// eslint-disable-next-line compat/compat
|
|
91
88
|
var idleHandle = window.requestIdleCallback(callback, {
|
|
92
89
|
timeout: timeout
|
|
93
90
|
});
|
|
@@ -81,19 +81,24 @@ export default class BenefitsModal extends Component {
|
|
|
81
81
|
id: titleId
|
|
82
82
|
}, heading);
|
|
83
83
|
};
|
|
84
|
-
return
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
84
|
+
return (
|
|
85
|
+
/*#__PURE__*/
|
|
86
|
+
// TODO: This is a problem that needs solving: https://product-fabric.atlassian.net/browse/DSP-22238
|
|
87
|
+
// eslint-disable-next-line @atlaskit/design-system/use-modal-dialog-close-button
|
|
88
|
+
React.createElement(Modal, _extends({
|
|
89
|
+
autoFocus: true,
|
|
90
|
+
shouldCloseOnEscapePress: false,
|
|
91
|
+
shouldCloseOnOverlayClick: false,
|
|
92
|
+
shouldScrollInViewport: true
|
|
93
|
+
// @ts-ignore All of the following props were in the rest props, so I'm
|
|
94
|
+
// making them explicit here even though the Modal doesn't accept them.
|
|
95
|
+
,
|
|
96
|
+
experimental_shouldShowPrimaryButtonOnRight: experimental_shouldShowPrimaryButtonOnRight,
|
|
97
|
+
footer: footer,
|
|
98
|
+
header: header,
|
|
99
|
+
heading: heading,
|
|
100
|
+
image: image
|
|
101
|
+
}, rest), /*#__PURE__*/React.createElement(Header, null), /*#__PURE__*/React.createElement(ModalBody, null, /*#__PURE__*/React.createElement(Body, null, heading && /*#__PURE__*/React.createElement(CustomHeader, null), children)), /*#__PURE__*/React.createElement(Footer, null))
|
|
102
|
+
);
|
|
98
103
|
}
|
|
99
104
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
import React, { createContext, PureComponent } from 'react';
|
|
2
|
+
import React, { createContext, PureComponent, startTransition } from 'react';
|
|
3
3
|
import memoizeOne from 'memoize-one';
|
|
4
4
|
import noop from '@atlaskit/ds-lib/noop';
|
|
5
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
6
|
import Portal from '@atlaskit/portal';
|
|
6
7
|
import Blanket from '../styled/blanket';
|
|
7
8
|
import { Fade } from './animation';
|
|
@@ -42,7 +43,22 @@ export default class SpotlightManager extends PureComponent {
|
|
|
42
43
|
spotlightCount: 0,
|
|
43
44
|
targets: {}
|
|
44
45
|
});
|
|
45
|
-
|
|
46
|
+
/*
|
|
47
|
+
* When enabling React Streaming in Confluence, a
|
|
48
|
+
* "This Suspense boundary received an update before it finished hydrating. This caused the boundary to switch to client rendering"
|
|
49
|
+
* error happens.
|
|
50
|
+
* This is to fix this error by wrapping the state update in startTransition as suggested by React: https://react.dev/errors/421?invariant=421
|
|
51
|
+
*/
|
|
52
|
+
_defineProperty(this, "getTargetRef", fg('platform_fix_component_state_update_for_suspense') ? name => element => {
|
|
53
|
+
startTransition(() => {
|
|
54
|
+
this.setState(state => ({
|
|
55
|
+
targets: {
|
|
56
|
+
...state.targets,
|
|
57
|
+
[name]: element || undefined
|
|
58
|
+
}
|
|
59
|
+
}));
|
|
60
|
+
});
|
|
61
|
+
} : name => element => {
|
|
46
62
|
this.setState(state => ({
|
|
47
63
|
targets: {
|
|
48
64
|
...state.targets,
|
|
@@ -4,8 +4,6 @@ import * as React from 'react';
|
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
6
6
|
const modalBodyStyles = null;
|
|
7
|
-
|
|
8
|
-
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-array-arguments -- Ignored via go/DSP-18766
|
|
9
7
|
const modalHeadingStyles = null;
|
|
10
8
|
const modalImageStyles = null;
|
|
11
9
|
const modalActionContainerStyles = null;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
._y44v1si8{animation:khs8z5x 3s cubic-bezier(.55,.055,.675,.19) infinite}._152tze3t{inset-block-start:var(--ds-space-0,0)}
|
|
1
|
+
._152tze3t{inset-block-start:var(--ds-space-0,0)}
|
|
3
2
|
._16qs1wx8{box-shadow:0 0 0 2px var(--ds-border-discovery,#8270db)}
|
|
4
3
|
._1bsb1osq{width:100%}
|
|
5
4
|
._1e02ze3t{inset-inline-start:var(--ds-space-0,0)}
|
|
5
|
+
._1pglmcjr{animation-timing-function:cubic-bezier(.55,.055,.675,.19)}
|
|
6
6
|
._4t3i1osq{height:100%}
|
|
7
|
+
._5sagi11n{animation-duration:3s}
|
|
8
|
+
._j7hq1ukm{animation-name:khs8z5x}
|
|
7
9
|
._kqswstnw{position:absolute}
|
|
10
|
+
._tip812c5{animation-iteration-count:infinite}
|
|
8
11
|
@keyframes khs8z5x{0%,33%{box-shadow:0 0 0 2px var(--ds-border-discovery,#8270db),0 0 0 var(--ds-border-discovery,#8270db)}66%,to{box-shadow:0 0 0 2px var(--ds-border-discovery,#8270db),0 0 0 10px rgba(101,84,192,.01)}}
|
|
9
12
|
@media (prefers-reduced-motion:reduce){._1bumglyw{animation:none}._sedtglyw{transition:none}}
|
|
@@ -52,7 +52,7 @@ export const TargetInner = ({
|
|
|
52
52
|
bgColor: bgColor
|
|
53
53
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
54
54
|
,
|
|
55
|
-
className: ax([pulse && "", pulse && "
|
|
55
|
+
className: ax([pulse && "", pulse && "_5sagi11n _tip812c5 _j7hq1ukm _1pglmcjr _16qs1wx8", "_1bumglyw _sedtglyw", className]),
|
|
56
56
|
radius: radius,
|
|
57
57
|
testId: testId
|
|
58
58
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
@@ -77,7 +77,6 @@ export const TargetOverlay = ({
|
|
|
77
77
|
onClick: onClick
|
|
78
78
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
79
79
|
}, props, {
|
|
80
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
81
80
|
style: {
|
|
82
81
|
cursor: onClick ? 'pointer' : 'auto'
|
|
83
82
|
},
|
|
@@ -105,7 +104,7 @@ export const Pulse = ({
|
|
|
105
104
|
bgColor: bgColor
|
|
106
105
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
107
106
|
,
|
|
108
|
-
className: ax([pulse && "", pulse && "
|
|
107
|
+
className: ax([pulse && "", pulse && "_5sagi11n _tip812c5 _j7hq1ukm _1pglmcjr _16qs1wx8", "_1bumglyw _sedtglyw", className]),
|
|
109
108
|
radius: radius,
|
|
110
109
|
testId: testId
|
|
111
110
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
@@ -71,10 +71,7 @@ function callWhenIdle(callback, opts = {}) {
|
|
|
71
71
|
const {
|
|
72
72
|
timeout = 100
|
|
73
73
|
} = opts;
|
|
74
|
-
|
|
75
|
-
// eslint-disable-next-line compat/compat
|
|
76
74
|
if (typeof window.requestIdleCallback === 'function') {
|
|
77
|
-
// eslint-disable-next-line compat/compat
|
|
78
75
|
const idleHandle = window.requestIdleCallback(callback, {
|
|
79
76
|
timeout
|
|
80
77
|
});
|
|
@@ -95,20 +95,25 @@ var BenefitsModal = /*#__PURE__*/function (_Component) {
|
|
|
95
95
|
id: titleId
|
|
96
96
|
}, heading);
|
|
97
97
|
};
|
|
98
|
-
return
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
98
|
+
return (
|
|
99
|
+
/*#__PURE__*/
|
|
100
|
+
// TODO: This is a problem that needs solving: https://product-fabric.atlassian.net/browse/DSP-22238
|
|
101
|
+
// eslint-disable-next-line @atlaskit/design-system/use-modal-dialog-close-button
|
|
102
|
+
React.createElement(Modal, _extends({
|
|
103
|
+
autoFocus: true,
|
|
104
|
+
shouldCloseOnEscapePress: false,
|
|
105
|
+
shouldCloseOnOverlayClick: false,
|
|
106
|
+
shouldScrollInViewport: true
|
|
107
|
+
// @ts-ignore All of the following props were in the rest props, so I'm
|
|
108
|
+
// making them explicit here even though the Modal doesn't accept them.
|
|
109
|
+
,
|
|
110
|
+
experimental_shouldShowPrimaryButtonOnRight: experimental_shouldShowPrimaryButtonOnRight,
|
|
111
|
+
footer: footer,
|
|
112
|
+
header: header,
|
|
113
|
+
heading: heading,
|
|
114
|
+
image: image
|
|
115
|
+
}, rest), /*#__PURE__*/React.createElement(Header, null), /*#__PURE__*/React.createElement(ModalBody, null, /*#__PURE__*/React.createElement(Body, null, heading && /*#__PURE__*/React.createElement(CustomHeader, null), children)), /*#__PURE__*/React.createElement(Footer, null))
|
|
116
|
+
);
|
|
112
117
|
}
|
|
113
118
|
}]);
|
|
114
119
|
}(Component);
|
|
@@ -8,9 +8,10 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
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
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
10
10
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
11
|
-
import React, { createContext, PureComponent } from 'react';
|
|
11
|
+
import React, { createContext, PureComponent, startTransition } from 'react';
|
|
12
12
|
import memoizeOne from 'memoize-one';
|
|
13
13
|
import noop from '@atlaskit/ds-lib/noop';
|
|
14
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
14
15
|
import Portal from '@atlaskit/portal';
|
|
15
16
|
import Blanket from '../styled/blanket';
|
|
16
17
|
import { Fade } from './animation';
|
|
@@ -54,7 +55,23 @@ var SpotlightManager = /*#__PURE__*/function (_PureComponent) {
|
|
|
54
55
|
spotlightCount: 0,
|
|
55
56
|
targets: {}
|
|
56
57
|
});
|
|
57
|
-
|
|
58
|
+
/*
|
|
59
|
+
* When enabling React Streaming in Confluence, a
|
|
60
|
+
* "This Suspense boundary received an update before it finished hydrating. This caused the boundary to switch to client rendering"
|
|
61
|
+
* error happens.
|
|
62
|
+
* This is to fix this error by wrapping the state update in startTransition as suggested by React: https://react.dev/errors/421?invariant=421
|
|
63
|
+
*/
|
|
64
|
+
_defineProperty(_this, "getTargetRef", fg('platform_fix_component_state_update_for_suspense') ? function (name) {
|
|
65
|
+
return function (element) {
|
|
66
|
+
startTransition(function () {
|
|
67
|
+
_this.setState(function (state) {
|
|
68
|
+
return {
|
|
69
|
+
targets: _objectSpread(_objectSpread({}, state.targets), {}, _defineProperty({}, name, element || undefined))
|
|
70
|
+
};
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
};
|
|
74
|
+
} : function (name) {
|
|
58
75
|
return function (element) {
|
|
59
76
|
_this.setState(function (state) {
|
|
60
77
|
return {
|
package/dist/esm/styled/modal.js
CHANGED
|
@@ -4,8 +4,6 @@ import * as React from 'react';
|
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
6
6
|
var modalBodyStyles = null;
|
|
7
|
-
|
|
8
|
-
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-array-arguments -- Ignored via go/DSP-18766
|
|
9
7
|
var modalHeadingStyles = null;
|
|
10
8
|
var modalImageStyles = null;
|
|
11
9
|
var modalActionContainerStyles = null;
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
._y44v1rys{animation:var(--_mb5lf8)}._152tze3t{inset-block-start:var(--ds-space-0,0)}
|
|
1
|
+
._152tze3t{inset-block-start:var(--ds-space-0,0)}
|
|
3
2
|
._16qs1wx8{box-shadow:0 0 0 2px var(--ds-border-discovery,#8270db)}
|
|
4
3
|
._1bsb1osq{width:100%}
|
|
5
4
|
._1e02ze3t{inset-inline-start:var(--ds-space-0,0)}
|
|
5
|
+
._1pglmcjr{animation-timing-function:cubic-bezier(.55,.055,.675,.19)}
|
|
6
6
|
._4t3i1osq{height:100%}
|
|
7
|
+
._5sagi11n{animation-duration:3s}
|
|
8
|
+
._j7hq1ect{animation-name:kyep8rx}
|
|
7
9
|
._kqswstnw{position:absolute}
|
|
10
|
+
._tip812c5{animation-iteration-count:infinite}
|
|
11
|
+
@keyframes kyep8rx{0%,33%{box-shadow:var(--_1jzibln)}66%,to{box-shadow:var(--_1v4eexu)}}
|
|
8
12
|
@media (prefers-reduced-motion:reduce){._1bumglyw{animation:none}._sedtglyw{transition:none}}
|
|
@@ -57,13 +57,14 @@ export var TargetInner = function TargetInner(_ref2) {
|
|
|
57
57
|
bgColor: bgColor
|
|
58
58
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
59
59
|
,
|
|
60
|
-
className: ax([pulse && "
|
|
60
|
+
className: ax([pulse && "", pulse && "_5sagi11n _tip812c5 _j7hq1ect _1pglmcjr _16qs1wx8", "_1bumglyw _sedtglyw", className]),
|
|
61
61
|
radius: radius,
|
|
62
62
|
testId: testId
|
|
63
63
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
64
64
|
}, props, {
|
|
65
65
|
style: _objectSpread(_objectSpread({}, props.style), {}, {
|
|
66
|
-
"--
|
|
66
|
+
"--_1jzibln": ix("".concat(baseShadow, ", 0 0 0 ", "var(--ds-border-discovery, #8270DB)")),
|
|
67
|
+
"--_1v4eexu": ix("".concat(baseShadow, ", 0 0 0 10px rgba(101, 84, 192, 0.01)"))
|
|
67
68
|
})
|
|
68
69
|
}), children);
|
|
69
70
|
};
|
|
@@ -84,7 +85,6 @@ export var TargetOverlay = function TargetOverlay(_ref3) {
|
|
|
84
85
|
onClick: onClick
|
|
85
86
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
86
87
|
}, props, {
|
|
87
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
88
88
|
style: {
|
|
89
89
|
cursor: onClick ? 'pointer' : 'auto'
|
|
90
90
|
},
|
|
@@ -114,13 +114,14 @@ export var Pulse = function Pulse(_ref4) {
|
|
|
114
114
|
bgColor: bgColor
|
|
115
115
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
116
116
|
,
|
|
117
|
-
className: ax([pulse && "
|
|
117
|
+
className: ax([pulse && "", pulse && "_5sagi11n _tip812c5 _j7hq1ect _1pglmcjr _16qs1wx8", "_1bumglyw _sedtglyw", className]),
|
|
118
118
|
radius: radius,
|
|
119
119
|
testId: testId
|
|
120
120
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
121
121
|
}, props, {
|
|
122
122
|
style: _objectSpread(_objectSpread({}, props.style), {}, {
|
|
123
|
-
"--
|
|
123
|
+
"--_1jzibln": ix("".concat(baseShadow, ", 0 0 0 ", "var(--ds-border-discovery, #8270DB)")),
|
|
124
|
+
"--_1v4eexu": ix("".concat(baseShadow, ", 0 0 0 10px rgba(101, 84, 192, 0.01)"))
|
|
124
125
|
})
|
|
125
126
|
}), children);
|
|
126
127
|
};
|
|
@@ -77,10 +77,7 @@ function callWhenIdle(callback) {
|
|
|
77
77
|
var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
78
78
|
var _opts$timeout = opts.timeout,
|
|
79
79
|
timeout = _opts$timeout === void 0 ? 100 : _opts$timeout;
|
|
80
|
-
|
|
81
|
-
// eslint-disable-next-line compat/compat
|
|
82
80
|
if (typeof window.requestIdleCallback === 'function') {
|
|
83
|
-
// eslint-disable-next-line compat/compat
|
|
84
81
|
var idleHandle = window.requestIdleCallback(callback, {
|
|
85
82
|
timeout: timeout
|
|
86
83
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/onboarding",
|
|
3
|
-
"version": "14.0.
|
|
3
|
+
"version": "14.0.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/"
|
|
@@ -41,15 +41,15 @@
|
|
|
41
41
|
"@atlaskit/button": "^23.0.0",
|
|
42
42
|
"@atlaskit/css": "^0.10.0",
|
|
43
43
|
"@atlaskit/ds-lib": "^4.0.0",
|
|
44
|
-
"@atlaskit/heading": "^5.
|
|
44
|
+
"@atlaskit/heading": "^5.2.0",
|
|
45
45
|
"@atlaskit/layering": "^2.1.0",
|
|
46
46
|
"@atlaskit/modal-dialog": "^14.1.0",
|
|
47
47
|
"@atlaskit/motion": "^5.1.0",
|
|
48
48
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
49
49
|
"@atlaskit/popper": "^7.0.0",
|
|
50
50
|
"@atlaskit/portal": "^5.1.0",
|
|
51
|
-
"@atlaskit/primitives": "^14.
|
|
52
|
-
"@atlaskit/tokens": "^4.
|
|
51
|
+
"@atlaskit/primitives": "^14.4.0",
|
|
52
|
+
"@atlaskit/tokens": "^4.8.0",
|
|
53
53
|
"@babel/runtime": "^7.0.0",
|
|
54
54
|
"@compiled/react": "^0.18.3",
|
|
55
55
|
"bind-event-listener": "^3.0.0",
|
|
@@ -66,11 +66,11 @@
|
|
|
66
66
|
"react-dom": "^18.2.0"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
|
-
"@af/accessibility-testing": "
|
|
70
|
-
"@af/integration-testing": "
|
|
71
|
-
"@af/visual-regression": "
|
|
69
|
+
"@af/accessibility-testing": "workspace:^",
|
|
70
|
+
"@af/integration-testing": "workspace:^",
|
|
71
|
+
"@af/visual-regression": "workspace:^",
|
|
72
72
|
"@atlaskit/theme": "^18.0.0",
|
|
73
|
-
"@atlaskit/visual-regression": "
|
|
73
|
+
"@atlaskit/visual-regression": "workspace:^",
|
|
74
74
|
"@atlassian/ssr-tests": "^0.2.0",
|
|
75
75
|
"@testing-library/react": "^13.4.0",
|
|
76
76
|
"@testing-library/react-hooks": "^8.0.1",
|
|
@@ -101,6 +101,9 @@
|
|
|
101
101
|
"platform_design_system_team_transition_group_r18": {
|
|
102
102
|
"type": "boolean",
|
|
103
103
|
"referenceOnly": true
|
|
104
|
+
},
|
|
105
|
+
"platform_fix_component_state_update_for_suspense": {
|
|
106
|
+
"type": "boolean"
|
|
104
107
|
}
|
|
105
108
|
},
|
|
106
109
|
"techstack": {
|