@atlaskit/onboarding 11.9.0 → 11.10.1
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 +14 -0
- package/dist/cjs/components/spotlight-dialog.js +1 -1
- package/dist/cjs/components/spotlight-manager.js +6 -3
- package/dist/cjs/styled/blanket.js +4 -1
- package/dist/cjs/styled/target.js +1 -1
- package/dist/es2019/components/spotlight-dialog.js +1 -1
- package/dist/es2019/components/spotlight-manager.js +6 -3
- package/dist/es2019/styled/blanket.js +6 -1
- package/dist/es2019/styled/target.js +1 -1
- package/dist/esm/components/spotlight-dialog.js +1 -1
- package/dist/esm/components/spotlight-manager.js +6 -3
- package/dist/esm/styled/blanket.js +4 -1
- package/dist/esm/styled/target.js +1 -1
- package/dist/types/components/spotlight-manager.d.ts +4 -0
- package/dist/types/styled/blanket.d.ts +1 -0
- package/dist/types-ts4.5/components/spotlight-manager.d.ts +4 -0
- package/dist/types-ts4.5/styled/blanket.d.ts +1 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/onboarding
|
|
2
2
|
|
|
3
|
+
## 11.10.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 11.10.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [#117762](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/117762)
|
|
14
|
+
[`e7423e403d743`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/e7423e403d743) -
|
|
15
|
+
[ux] Add `onBlanketClicked` prop to `SpotlightManager`.
|
|
16
|
+
|
|
3
17
|
## 11.9.0
|
|
4
18
|
|
|
5
19
|
### Minor 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.10.1";
|
|
31
31
|
var SpotlightDialog = /*#__PURE__*/function (_Component) {
|
|
32
32
|
(0, _inherits2.default)(SpotlightDialog, _Component);
|
|
33
33
|
var _super = _createSuper(SpotlightDialog);
|
|
@@ -113,7 +113,8 @@ var SpotlightManager = exports.default = /*#__PURE__*/function (_PureComponent)
|
|
|
113
113
|
var _this$props = this.props,
|
|
114
114
|
blanketIsTinted = _this$props.blanketIsTinted,
|
|
115
115
|
children = _this$props.children,
|
|
116
|
-
Tag = _this$props.component
|
|
116
|
+
Tag = _this$props.component,
|
|
117
|
+
onBlanketClicked = _this$props.onBlanketClicked;
|
|
117
118
|
return /*#__PURE__*/_react.default.createElement(SpotlightStateProvider, {
|
|
118
119
|
value: this.getStateProviderValue(this.state.targets)
|
|
119
120
|
}, /*#__PURE__*/_react.default.createElement(TargetProvider, {
|
|
@@ -125,9 +126,11 @@ var SpotlightManager = exports.default = /*#__PURE__*/function (_PureComponent)
|
|
|
125
126
|
}, function (animationStyles) {
|
|
126
127
|
return /*#__PURE__*/_react.default.createElement(_portal.default, {
|
|
127
128
|
zIndex: _constants.layers.spotlight()
|
|
128
|
-
}, /*#__PURE__*/_react.default.createElement(_blanket.default
|
|
129
|
+
}, /*#__PURE__*/_react.default.createElement(_blanket.default
|
|
130
|
+
/* eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766 */, {
|
|
129
131
|
style: animationStyles,
|
|
130
|
-
isTinted: blanketIsTinted
|
|
132
|
+
isTinted: blanketIsTinted,
|
|
133
|
+
onBlanketClicked: onBlanketClicked
|
|
131
134
|
}));
|
|
132
135
|
}), children)));
|
|
133
136
|
}
|
|
@@ -33,13 +33,16 @@ var blanketStyles = (0, _react.css)({
|
|
|
33
33
|
* @internal
|
|
34
34
|
*/
|
|
35
35
|
var Blanket = function Blanket(props) {
|
|
36
|
+
var onBlanketClicked = props.onBlanketClicked;
|
|
36
37
|
return (0, _react.jsx)("div", {
|
|
38
|
+
role: "presentation",
|
|
37
39
|
css: blanketStyles
|
|
38
40
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
39
41
|
,
|
|
40
42
|
style: _objectSpread(_objectSpread({}, props.style), {}, {
|
|
41
43
|
backgroundColor: props.isTinted ? "var(--ds-blanket, ".concat(_colors.N100A, ")") : 'transparent'
|
|
42
|
-
})
|
|
44
|
+
}),
|
|
45
|
+
onClick: onBlanketClicked
|
|
43
46
|
});
|
|
44
47
|
};
|
|
45
48
|
var _default = exports.default = Blanket;
|
|
@@ -34,7 +34,7 @@ var pulseKeyframes = (0, _react.keyframes)({
|
|
|
34
34
|
}
|
|
35
35
|
});
|
|
36
36
|
// This is needed for unit tests
|
|
37
|
-
// eslint-disable-next-line @atlaskit/
|
|
37
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
38
38
|
var pulseKeyframesName = exports.pulseKeyframesName = pulseKeyframes.name;
|
|
39
39
|
var animationStyles = (0, _react.css)({
|
|
40
40
|
animation: "".concat(pulseKeyframes, " 3000ms ").concat(easing, " infinite"),
|
|
@@ -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.10.1";
|
|
11
11
|
class SpotlightDialog extends Component {
|
|
12
12
|
constructor(...args) {
|
|
13
13
|
super(...args);
|
|
@@ -78,7 +78,8 @@ export default class SpotlightManager extends PureComponent {
|
|
|
78
78
|
const {
|
|
79
79
|
blanketIsTinted,
|
|
80
80
|
children,
|
|
81
|
-
component: Tag
|
|
81
|
+
component: Tag,
|
|
82
|
+
onBlanketClicked
|
|
82
83
|
} = this.props;
|
|
83
84
|
return /*#__PURE__*/React.createElement(SpotlightStateProvider, {
|
|
84
85
|
value: this.getStateProviderValue(this.state.targets)
|
|
@@ -90,9 +91,11 @@ export default class SpotlightManager extends PureComponent {
|
|
|
90
91
|
hasEntered: this.state.spotlightCount > 0
|
|
91
92
|
}, animationStyles => /*#__PURE__*/React.createElement(Portal, {
|
|
92
93
|
zIndex: layers.spotlight()
|
|
93
|
-
}, /*#__PURE__*/React.createElement(Blanket
|
|
94
|
+
}, /*#__PURE__*/React.createElement(Blanket
|
|
95
|
+
/* eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766 */, {
|
|
94
96
|
style: animationStyles,
|
|
95
|
-
isTinted: blanketIsTinted
|
|
97
|
+
isTinted: blanketIsTinted,
|
|
98
|
+
onBlanketClicked: onBlanketClicked
|
|
96
99
|
}))), children)));
|
|
97
100
|
}
|
|
98
101
|
}
|
|
@@ -26,14 +26,19 @@ const blanketStyles = css({
|
|
|
26
26
|
* @internal
|
|
27
27
|
*/
|
|
28
28
|
const Blanket = props => {
|
|
29
|
+
const {
|
|
30
|
+
onBlanketClicked
|
|
31
|
+
} = props;
|
|
29
32
|
return jsx("div", {
|
|
33
|
+
role: "presentation",
|
|
30
34
|
css: blanketStyles
|
|
31
35
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
32
36
|
,
|
|
33
37
|
style: {
|
|
34
38
|
...props.style,
|
|
35
39
|
backgroundColor: props.isTinted ? `var(--ds-blanket, ${N100A})` : 'transparent'
|
|
36
|
-
}
|
|
40
|
+
},
|
|
41
|
+
onClick: onBlanketClicked
|
|
37
42
|
});
|
|
38
43
|
};
|
|
39
44
|
export default Blanket;
|
|
@@ -21,7 +21,7 @@ const pulseKeyframes = keyframes({
|
|
|
21
21
|
}
|
|
22
22
|
});
|
|
23
23
|
// This is needed for unit tests
|
|
24
|
-
// eslint-disable-next-line @atlaskit/
|
|
24
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
25
25
|
export const pulseKeyframesName = pulseKeyframes.name;
|
|
26
26
|
const animationStyles = css({
|
|
27
27
|
animation: `${pulseKeyframes} 3000ms ${easing} infinite`,
|
|
@@ -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.10.1";
|
|
21
21
|
var SpotlightDialog = /*#__PURE__*/function (_Component) {
|
|
22
22
|
_inherits(SpotlightDialog, _Component);
|
|
23
23
|
var _super = _createSuper(SpotlightDialog);
|
|
@@ -105,7 +105,8 @@ var SpotlightManager = /*#__PURE__*/function (_PureComponent) {
|
|
|
105
105
|
var _this$props = this.props,
|
|
106
106
|
blanketIsTinted = _this$props.blanketIsTinted,
|
|
107
107
|
children = _this$props.children,
|
|
108
|
-
Tag = _this$props.component
|
|
108
|
+
Tag = _this$props.component,
|
|
109
|
+
onBlanketClicked = _this$props.onBlanketClicked;
|
|
109
110
|
return /*#__PURE__*/React.createElement(SpotlightStateProvider, {
|
|
110
111
|
value: this.getStateProviderValue(this.state.targets)
|
|
111
112
|
}, /*#__PURE__*/React.createElement(TargetProvider, {
|
|
@@ -117,9 +118,11 @@ var SpotlightManager = /*#__PURE__*/function (_PureComponent) {
|
|
|
117
118
|
}, function (animationStyles) {
|
|
118
119
|
return /*#__PURE__*/React.createElement(Portal, {
|
|
119
120
|
zIndex: layers.spotlight()
|
|
120
|
-
}, /*#__PURE__*/React.createElement(Blanket
|
|
121
|
+
}, /*#__PURE__*/React.createElement(Blanket
|
|
122
|
+
/* eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766 */, {
|
|
121
123
|
style: animationStyles,
|
|
122
|
-
isTinted: blanketIsTinted
|
|
124
|
+
isTinted: blanketIsTinted,
|
|
125
|
+
onBlanketClicked: onBlanketClicked
|
|
123
126
|
}));
|
|
124
127
|
}), children)));
|
|
125
128
|
}
|
|
@@ -29,13 +29,16 @@ var blanketStyles = css({
|
|
|
29
29
|
* @internal
|
|
30
30
|
*/
|
|
31
31
|
var Blanket = function Blanket(props) {
|
|
32
|
+
var onBlanketClicked = props.onBlanketClicked;
|
|
32
33
|
return jsx("div", {
|
|
34
|
+
role: "presentation",
|
|
33
35
|
css: blanketStyles
|
|
34
36
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
35
37
|
,
|
|
36
38
|
style: _objectSpread(_objectSpread({}, props.style), {}, {
|
|
37
39
|
backgroundColor: props.isTinted ? "var(--ds-blanket, ".concat(N100A, ")") : 'transparent'
|
|
38
|
-
})
|
|
40
|
+
}),
|
|
41
|
+
onClick: onBlanketClicked
|
|
39
42
|
});
|
|
40
43
|
};
|
|
41
44
|
export default Blanket;
|
|
@@ -28,7 +28,7 @@ var pulseKeyframes = keyframes({
|
|
|
28
28
|
}
|
|
29
29
|
});
|
|
30
30
|
// This is needed for unit tests
|
|
31
|
-
// eslint-disable-next-line @atlaskit/
|
|
31
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
32
32
|
export var pulseKeyframesName = pulseKeyframes.name;
|
|
33
33
|
var animationStyles = css({
|
|
34
34
|
animation: "".concat(pulseKeyframes, " 3000ms ").concat(easing, " infinite"),
|
|
@@ -30,6 +30,10 @@ interface SpotlightManagerProps {
|
|
|
30
30
|
* Component is deprecated and will be removed in the future.
|
|
31
31
|
*/
|
|
32
32
|
component?: ElementType;
|
|
33
|
+
/**
|
|
34
|
+
* Handler function to be called when the blanket is clicked.
|
|
35
|
+
*/
|
|
36
|
+
onBlanketClicked?: () => void;
|
|
33
37
|
}
|
|
34
38
|
/**
|
|
35
39
|
* __Spotlight manager__
|
|
@@ -30,6 +30,10 @@ interface SpotlightManagerProps {
|
|
|
30
30
|
* Component is deprecated and will be removed in the future.
|
|
31
31
|
*/
|
|
32
32
|
component?: ElementType;
|
|
33
|
+
/**
|
|
34
|
+
* Handler function to be called when the blanket is clicked.
|
|
35
|
+
*/
|
|
36
|
+
onBlanketClicked?: () => void;
|
|
33
37
|
}
|
|
34
38
|
/**
|
|
35
39
|
* __Spotlight manager__
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/onboarding",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.10.1",
|
|
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,7 +41,7 @@
|
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@atlaskit/analytics-next": "^9.3.0",
|
|
44
|
-
"@atlaskit/button": "^18.
|
|
44
|
+
"@atlaskit/button": "^18.3.0",
|
|
45
45
|
"@atlaskit/ds-lib": "^2.3.0",
|
|
46
46
|
"@atlaskit/heading": "^2.4.0",
|
|
47
47
|
"@atlaskit/modal-dialog": "^12.14.0",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
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": "^11.0.0",
|
|
53
53
|
"@atlaskit/theme": "^12.11.0",
|
|
54
54
|
"@atlaskit/tokens": "^1.53.0",
|
|
55
55
|
"@babel/runtime": "^7.0.0",
|