@atlaskit/onboarding 11.8.1 → 11.9.0
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 +18 -0
- package/dist/cjs/components/spotlight-dialog.js +1 -1
- package/dist/cjs/components/spotlight-inner.js +4 -2
- package/dist/es2019/components/spotlight-dialog.js +1 -1
- package/dist/es2019/components/spotlight-inner.js +4 -2
- package/dist/esm/components/spotlight-dialog.js +1 -1
- package/dist/esm/components/spotlight-inner.js +4 -2
- package/dist/types/components/spotlight-inner.d.ts +5 -0
- package/dist/types/components/spotlight.d.ts +5 -1
- package/dist/types/types.d.ts +1 -1
- package/dist/types-ts4.5/components/spotlight-inner.d.ts +5 -0
- package/dist/types-ts4.5/components/spotlight.d.ts +5 -1
- package/dist/types-ts4.5/types.d.ts +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/onboarding
|
|
2
2
|
|
|
3
|
+
## 11.9.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`393f732d5423f`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/393f732d5423f) -
|
|
8
|
+
[ux] Adding an optional prop to Spotlight, so it can used for scrollIntoView 'block' parameter.
|
|
9
|
+
This is to fix the unnecessary scroll of the non-portalled popup targets.
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
15
|
+
## 11.8.2
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
|
|
3
21
|
## 11.8.1
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
@@ -27,7 +27,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
27
27
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
28
28
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
29
29
|
var packageName = "@atlaskit/onboarding";
|
|
30
|
-
var packageVersion = "11.
|
|
30
|
+
var packageVersion = "11.9.0";
|
|
31
31
|
var SpotlightDialog = /*#__PURE__*/function (_Component) {
|
|
32
32
|
(0, _inherits2.default)(SpotlightDialog, _Component);
|
|
33
33
|
var _super = _createSuper(SpotlightDialog);
|
|
@@ -68,7 +68,8 @@ var SpotlightInner = /*#__PURE__*/function (_React$Component) {
|
|
|
68
68
|
value: function componentDidUpdate(prevProps) {
|
|
69
69
|
if (prevProps.targetNode !== this.props.targetNode) {
|
|
70
70
|
(0, _scrollIntoViewIfNeeded.default)(this.props.targetNode, {
|
|
71
|
-
scrollMode: 'if-needed'
|
|
71
|
+
scrollMode: 'if-needed',
|
|
72
|
+
block: this.props.scrollPositionBlock
|
|
72
73
|
});
|
|
73
74
|
}
|
|
74
75
|
}
|
|
@@ -76,7 +77,8 @@ var SpotlightInner = /*#__PURE__*/function (_React$Component) {
|
|
|
76
77
|
key: "componentDidMount",
|
|
77
78
|
value: function componentDidMount() {
|
|
78
79
|
(0, _scrollIntoViewIfNeeded.default)(this.props.targetNode, {
|
|
79
|
-
scrollMode: 'if-needed'
|
|
80
|
+
scrollMode: 'if-needed',
|
|
81
|
+
block: this.props.scrollPositionBlock
|
|
80
82
|
});
|
|
81
83
|
this.props.onOpened();
|
|
82
84
|
}
|
|
@@ -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.
|
|
10
|
+
const packageVersion = "11.9.0";
|
|
11
11
|
class SpotlightDialog extends Component {
|
|
12
12
|
constructor(...args) {
|
|
13
13
|
super(...args);
|
|
@@ -42,13 +42,15 @@ class SpotlightInner extends React.Component {
|
|
|
42
42
|
componentDidUpdate(prevProps) {
|
|
43
43
|
if (prevProps.targetNode !== this.props.targetNode) {
|
|
44
44
|
scrollIntoView(this.props.targetNode, {
|
|
45
|
-
scrollMode: 'if-needed'
|
|
45
|
+
scrollMode: 'if-needed',
|
|
46
|
+
block: this.props.scrollPositionBlock
|
|
46
47
|
});
|
|
47
48
|
}
|
|
48
49
|
}
|
|
49
50
|
componentDidMount() {
|
|
50
51
|
scrollIntoView(this.props.targetNode, {
|
|
51
|
-
scrollMode: 'if-needed'
|
|
52
|
+
scrollMode: 'if-needed',
|
|
53
|
+
block: this.props.scrollPositionBlock
|
|
52
54
|
});
|
|
53
55
|
this.props.onOpened();
|
|
54
56
|
}
|
|
@@ -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.
|
|
20
|
+
var packageVersion = "11.9.0";
|
|
21
21
|
var SpotlightDialog = /*#__PURE__*/function (_Component) {
|
|
22
22
|
_inherits(SpotlightDialog, _Component);
|
|
23
23
|
var _super = _createSuper(SpotlightDialog);
|
|
@@ -61,7 +61,8 @@ var SpotlightInner = /*#__PURE__*/function (_React$Component) {
|
|
|
61
61
|
value: function componentDidUpdate(prevProps) {
|
|
62
62
|
if (prevProps.targetNode !== this.props.targetNode) {
|
|
63
63
|
scrollIntoView(this.props.targetNode, {
|
|
64
|
-
scrollMode: 'if-needed'
|
|
64
|
+
scrollMode: 'if-needed',
|
|
65
|
+
block: this.props.scrollPositionBlock
|
|
65
66
|
});
|
|
66
67
|
}
|
|
67
68
|
}
|
|
@@ -69,7 +70,8 @@ var SpotlightInner = /*#__PURE__*/function (_React$Component) {
|
|
|
69
70
|
key: "componentDidMount",
|
|
70
71
|
value: function componentDidMount() {
|
|
71
72
|
scrollIntoView(this.props.targetNode, {
|
|
72
|
-
scrollMode: 'if-needed'
|
|
73
|
+
scrollMode: 'if-needed',
|
|
74
|
+
block: this.props.scrollPositionBlock
|
|
73
75
|
});
|
|
74
76
|
this.props.onOpened();
|
|
75
77
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { type ScrollLogicalPosition } from '../types';
|
|
2
3
|
import { type ElementBoundingBox } from '../utils/use-element-box';
|
|
3
4
|
import { type SpotlightProps } from './spotlight';
|
|
4
5
|
export interface SpotlightInnerProps extends SpotlightProps {
|
|
@@ -26,6 +27,10 @@ export interface SpotlightInnerProps extends SpotlightProps {
|
|
|
26
27
|
* Same as `SpotlightProps` but required instead of optional.
|
|
27
28
|
*/
|
|
28
29
|
dialogWidth: number;
|
|
30
|
+
/**
|
|
31
|
+
* passed to scrollIntoView as the block option, which determines the vertical alignment of the target node in the closest scrollable ancestor.
|
|
32
|
+
*/
|
|
33
|
+
scrollPositionBlock?: ScrollLogicalPosition;
|
|
29
34
|
}
|
|
30
35
|
interface State {
|
|
31
36
|
replacementElement: HTMLElement | null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ComponentType, type MouseEvent, type ReactNode } from 'react';
|
|
2
|
-
import { type Actions } from '../types';
|
|
2
|
+
import { type Actions, type ScrollLogicalPosition } from '../types';
|
|
3
3
|
export interface SpotlightProps {
|
|
4
4
|
/**
|
|
5
5
|
* Buttons to render in the footer.
|
|
@@ -82,6 +82,10 @@ export interface SpotlightProps {
|
|
|
82
82
|
Defaults to `"spotlight"`.
|
|
83
83
|
*/
|
|
84
84
|
testId?: string;
|
|
85
|
+
/**
|
|
86
|
+
* Used set the 'block' attribute on scrollIntoView, which determines the vertical alignment of the target node to the nearest scrollable ancestor.
|
|
87
|
+
*/
|
|
88
|
+
scrollPositionBlock?: ScrollLogicalPosition;
|
|
85
89
|
}
|
|
86
90
|
/**
|
|
87
91
|
* __Spotlight__
|
package/dist/types/types.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { type ScrollLogicalPosition } from '../types';
|
|
2
3
|
import { type ElementBoundingBox } from '../utils/use-element-box';
|
|
3
4
|
import { type SpotlightProps } from './spotlight';
|
|
4
5
|
export interface SpotlightInnerProps extends SpotlightProps {
|
|
@@ -26,6 +27,10 @@ export interface SpotlightInnerProps extends SpotlightProps {
|
|
|
26
27
|
* Same as `SpotlightProps` but required instead of optional.
|
|
27
28
|
*/
|
|
28
29
|
dialogWidth: number;
|
|
30
|
+
/**
|
|
31
|
+
* passed to scrollIntoView as the block option, which determines the vertical alignment of the target node in the closest scrollable ancestor.
|
|
32
|
+
*/
|
|
33
|
+
scrollPositionBlock?: ScrollLogicalPosition;
|
|
29
34
|
}
|
|
30
35
|
interface State {
|
|
31
36
|
replacementElement: HTMLElement | null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ComponentType, type MouseEvent, type ReactNode } from 'react';
|
|
2
|
-
import { type Actions } from '../types';
|
|
2
|
+
import { type Actions, type ScrollLogicalPosition } from '../types';
|
|
3
3
|
export interface SpotlightProps {
|
|
4
4
|
/**
|
|
5
5
|
* Buttons to render in the footer.
|
|
@@ -82,6 +82,10 @@ export interface SpotlightProps {
|
|
|
82
82
|
Defaults to `"spotlight"`.
|
|
83
83
|
*/
|
|
84
84
|
testId?: string;
|
|
85
|
+
/**
|
|
86
|
+
* Used set the 'block' attribute on scrollIntoView, which determines the vertical alignment of the target node to the nearest scrollable ancestor.
|
|
87
|
+
*/
|
|
88
|
+
scrollPositionBlock?: ScrollLogicalPosition;
|
|
85
89
|
}
|
|
86
90
|
/**
|
|
87
91
|
* __Spotlight__
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/onboarding",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.9.0",
|
|
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
|
},
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@atlaskit/analytics-next": "^9.3.0",
|
|
44
|
-
"@atlaskit/button": "^18.
|
|
44
|
+
"@atlaskit/button": "^18.1.0",
|
|
45
45
|
"@atlaskit/ds-lib": "^2.3.0",
|
|
46
46
|
"@atlaskit/heading": "^2.4.0",
|
|
47
47
|
"@atlaskit/modal-dialog": "^12.14.0",
|
|
48
48
|
"@atlaskit/motion": "^1.7.0",
|
|
49
|
-
"@atlaskit/platform-feature-flags": "^0.
|
|
49
|
+
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
50
50
|
"@atlaskit/popper": "^6.1.0",
|
|
51
51
|
"@atlaskit/portal": "^4.6.0",
|
|
52
|
-
"@atlaskit/primitives": "^
|
|
52
|
+
"@atlaskit/primitives": "^10.0.0",
|
|
53
53
|
"@atlaskit/theme": "^12.11.0",
|
|
54
54
|
"@atlaskit/tokens": "^1.53.0",
|
|
55
55
|
"@babel/runtime": "^7.0.0",
|