@atlaskit/onboarding 11.3.2 → 11.5.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 +975 -626
- package/dist/cjs/components/spotlight-card.js +17 -18
- package/dist/cjs/components/spotlight-dialog.js +1 -1
- package/dist/cjs/components/theme.js +2 -2
- package/dist/es2019/components/spotlight-card.js +17 -18
- package/dist/es2019/components/spotlight-dialog.js +1 -1
- package/dist/es2019/components/theme.js +2 -2
- package/dist/esm/components/spotlight-card.js +17 -18
- package/dist/esm/components/spotlight-dialog.js +1 -1
- package/dist/esm/components/theme.js +2 -2
- package/package.json +7 -5
|
@@ -11,8 +11,7 @@ var _react = require("react");
|
|
|
11
11
|
var _react2 = require("@emotion/react");
|
|
12
12
|
var _customThemeButton = _interopRequireWildcard(require("@atlaskit/button/custom-theme-button"));
|
|
13
13
|
var _heading = _interopRequireDefault(require("@atlaskit/heading"));
|
|
14
|
-
var
|
|
15
|
-
var _constants = require("@atlaskit/theme/constants");
|
|
14
|
+
var _primitives = require("@atlaskit/primitives");
|
|
16
15
|
var _dialog = require("../styled/dialog");
|
|
17
16
|
var _theme = require("./theme");
|
|
18
17
|
var _excluded = ["text", "key"];
|
|
@@ -51,16 +50,17 @@ var DefaultFooter = function DefaultFooter(_ref2) {
|
|
|
51
50
|
css: defaultFooterStyles
|
|
52
51
|
}, children);
|
|
53
52
|
};
|
|
54
|
-
var containerStyles = (0,
|
|
53
|
+
var containerStyles = (0, _primitives.xcss)({
|
|
55
54
|
height: 'fit-content',
|
|
56
|
-
zIndex:
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
55
|
+
zIndex: 'spotlight',
|
|
56
|
+
borderRadius: 'border.radius',
|
|
57
|
+
color: 'color.text.inverse',
|
|
58
|
+
overflow: 'auto',
|
|
59
|
+
minWidth: '160px',
|
|
60
|
+
maxWidth: '600px'
|
|
61
61
|
});
|
|
62
|
-
var containerShadowStyles = (0,
|
|
63
|
-
boxShadow:
|
|
62
|
+
var containerShadowStyles = (0, _primitives.xcss)({
|
|
63
|
+
boxShadow: 'elevation.shadow.raised'
|
|
64
64
|
});
|
|
65
65
|
/**
|
|
66
66
|
* __Spotlight card__
|
|
@@ -95,15 +95,14 @@ var SpotlightCard = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
95
95
|
Footer = _components$Footer === void 0 ? DefaultFooter : _components$Footer;
|
|
96
96
|
return (0, _react2.jsx)(_customThemeButton.Theme.Provider, {
|
|
97
97
|
value: _theme.spotlightButtonTheme
|
|
98
|
-
}, (0, _react2.jsx)(
|
|
99
|
-
|
|
98
|
+
}, (0, _react2.jsx)(_primitives.Box, {
|
|
99
|
+
backgroundColor: "color.background.discovery.bold",
|
|
100
|
+
xcss: [containerStyles, !isFlat && containerShadowStyles],
|
|
100
101
|
style: {
|
|
101
|
-
|
|
102
|
-
maxWidth: '600px',
|
|
103
|
-
width: typeof width === 'string' ? width : "".concat(width, "px")
|
|
102
|
+
width: width
|
|
104
103
|
},
|
|
105
104
|
ref: ref || innerRef,
|
|
106
|
-
|
|
105
|
+
testId: testId
|
|
107
106
|
}, typeof image === 'string' ? (0, _react2.jsx)("img", {
|
|
108
107
|
css: imageStyles,
|
|
109
108
|
src: image,
|
|
@@ -113,9 +112,9 @@ var SpotlightCard = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
113
112
|
}, heading || headingAfterElement ? (0, _react2.jsx)(Header, null, (0, _react2.jsx)(_heading.default, {
|
|
114
113
|
id: headingId,
|
|
115
114
|
color: "inverse",
|
|
116
|
-
|
|
115
|
+
size: "medium",
|
|
117
116
|
as: "h".concat(headingLevel)
|
|
118
|
-
}, heading), headingAfterElement) : null, children, actions.length > 0 || actionsBeforeElement ? (0, _react2.jsx)(Footer, null, actionsBeforeElement || (0, _react2.jsx)("span", null), (0, _react2.jsx)(_dialog.DialogActionItemContainer, null, actions.map(function (_ref3, idx) {
|
|
117
|
+
}, heading), headingAfterElement) : null, (0, _react2.jsx)(_primitives.Text, null, children), actions.length > 0 || actionsBeforeElement ? (0, _react2.jsx)(Footer, null, actionsBeforeElement || (0, _react2.jsx)("span", null), (0, _react2.jsx)(_dialog.DialogActionItemContainer, null, actions.map(function (_ref3, idx) {
|
|
119
118
|
var text = _ref3.text,
|
|
120
119
|
key = _ref3.key,
|
|
121
120
|
rest = (0, _objectWithoutProperties2.default)(_ref3, _excluded);
|
|
@@ -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.5.0";
|
|
31
31
|
var SpotlightDialog = /*#__PURE__*/function (_Component) {
|
|
32
32
|
(0, _inherits2.default)(SpotlightDialog, _Component);
|
|
33
33
|
var _super = _createSuper(SpotlightDialog);
|
|
@@ -19,12 +19,12 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
19
19
|
var spotlightTheme = {
|
|
20
20
|
default: {
|
|
21
21
|
background: {
|
|
22
|
-
default: "var(--ds-background-inverse-subtle, ".concat(colors.
|
|
22
|
+
default: "var(--ds-background-inverse-subtle, ".concat(colors.P500, ")"),
|
|
23
23
|
hover: "var(--ds-background-inverse-subtle-hovered, ".concat(colors.P200, ")"),
|
|
24
24
|
active: "var(--ds-background-inverse-subtle-pressed, ".concat(colors.P500, ")"),
|
|
25
25
|
disabled: "var(--ds-background-disabled, ".concat(colors.P400, ")"),
|
|
26
26
|
selected: "var(--ds-background-inverse-subtle-pressed, ".concat(colors.R500, ")"),
|
|
27
|
-
focus: "var(--ds-background-inverse-subtle, ".concat(colors.
|
|
27
|
+
focus: "var(--ds-background-inverse-subtle, ".concat(colors.P500, ")")
|
|
28
28
|
},
|
|
29
29
|
color: {
|
|
30
30
|
default: "var(--ds-text-inverse, ".concat(colors.N0, ")"),
|
|
@@ -3,8 +3,7 @@ import { forwardRef } from 'react';
|
|
|
3
3
|
import { css, jsx } from '@emotion/react';
|
|
4
4
|
import Button, { Theme as ButtonTheme } from '@atlaskit/button/custom-theme-button';
|
|
5
5
|
import Heading from '@atlaskit/heading';
|
|
6
|
-
import {
|
|
7
|
-
import { layers } from '@atlaskit/theme/constants';
|
|
6
|
+
import { Box, Text, xcss } from '@atlaskit/primitives';
|
|
8
7
|
import { DialogActionItem, DialogActionItemContainer } from '../styled/dialog';
|
|
9
8
|
import { spotlightButtonTheme } from './theme';
|
|
10
9
|
const bodyStyles = css({
|
|
@@ -37,16 +36,17 @@ const DefaultFooter = ({
|
|
|
37
36
|
}) => jsx("div", {
|
|
38
37
|
css: defaultFooterStyles
|
|
39
38
|
}, children);
|
|
40
|
-
const containerStyles =
|
|
39
|
+
const containerStyles = xcss({
|
|
41
40
|
height: 'fit-content',
|
|
42
|
-
zIndex:
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
41
|
+
zIndex: 'spotlight',
|
|
42
|
+
borderRadius: 'border.radius',
|
|
43
|
+
color: 'color.text.inverse',
|
|
44
|
+
overflow: 'auto',
|
|
45
|
+
minWidth: '160px',
|
|
46
|
+
maxWidth: '600px'
|
|
47
47
|
});
|
|
48
|
-
const containerShadowStyles =
|
|
49
|
-
boxShadow:
|
|
48
|
+
const containerShadowStyles = xcss({
|
|
49
|
+
boxShadow: 'elevation.shadow.raised'
|
|
50
50
|
});
|
|
51
51
|
/**
|
|
52
52
|
* __Spotlight card__
|
|
@@ -79,15 +79,14 @@ const SpotlightCard = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
79
79
|
} = components;
|
|
80
80
|
return jsx(ButtonTheme.Provider, {
|
|
81
81
|
value: spotlightButtonTheme
|
|
82
|
-
}, jsx(
|
|
83
|
-
|
|
82
|
+
}, jsx(Box, {
|
|
83
|
+
backgroundColor: "color.background.discovery.bold",
|
|
84
|
+
xcss: [containerStyles, !isFlat && containerShadowStyles],
|
|
84
85
|
style: {
|
|
85
|
-
|
|
86
|
-
maxWidth: '600px',
|
|
87
|
-
width: typeof width === 'string' ? width : `${width}px`
|
|
86
|
+
width
|
|
88
87
|
},
|
|
89
88
|
ref: ref || innerRef,
|
|
90
|
-
|
|
89
|
+
testId: testId
|
|
91
90
|
}, typeof image === 'string' ? jsx("img", {
|
|
92
91
|
css: imageStyles,
|
|
93
92
|
src: image,
|
|
@@ -97,9 +96,9 @@ const SpotlightCard = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
97
96
|
}, heading || headingAfterElement ? jsx(Header, null, jsx(Heading, {
|
|
98
97
|
id: headingId,
|
|
99
98
|
color: "inverse",
|
|
100
|
-
|
|
99
|
+
size: "medium",
|
|
101
100
|
as: `h${headingLevel}`
|
|
102
|
-
}, heading), headingAfterElement) : null, children, actions.length > 0 || actionsBeforeElement ? jsx(Footer, null, actionsBeforeElement || jsx("span", null), jsx(DialogActionItemContainer, null, actions.map(({
|
|
101
|
+
}, heading), headingAfterElement) : null, jsx(Text, null, children), actions.length > 0 || actionsBeforeElement ? jsx(Footer, null, actionsBeforeElement || jsx("span", null), jsx(DialogActionItemContainer, null, actions.map(({
|
|
103
102
|
text,
|
|
104
103
|
key,
|
|
105
104
|
...rest
|
|
@@ -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.5.0";
|
|
11
11
|
class SpotlightDialog extends Component {
|
|
12
12
|
constructor(...args) {
|
|
13
13
|
super(...args);
|
|
@@ -2,12 +2,12 @@ import * as colors from '@atlaskit/theme/colors';
|
|
|
2
2
|
const spotlightTheme = {
|
|
3
3
|
default: {
|
|
4
4
|
background: {
|
|
5
|
-
default: `var(--ds-background-inverse-subtle, ${colors.
|
|
5
|
+
default: `var(--ds-background-inverse-subtle, ${colors.P500})`,
|
|
6
6
|
hover: `var(--ds-background-inverse-subtle-hovered, ${colors.P200})`,
|
|
7
7
|
active: `var(--ds-background-inverse-subtle-pressed, ${colors.P500})`,
|
|
8
8
|
disabled: `var(--ds-background-disabled, ${colors.P400})`,
|
|
9
9
|
selected: `var(--ds-background-inverse-subtle-pressed, ${colors.R500})`,
|
|
10
|
-
focus: `var(--ds-background-inverse-subtle, ${colors.
|
|
10
|
+
focus: `var(--ds-background-inverse-subtle, ${colors.P500})`
|
|
11
11
|
},
|
|
12
12
|
color: {
|
|
13
13
|
default: `var(--ds-text-inverse, ${colors.N0})`,
|
|
@@ -5,8 +5,7 @@ import { forwardRef } from 'react';
|
|
|
5
5
|
import { css, jsx } from '@emotion/react';
|
|
6
6
|
import Button, { Theme as ButtonTheme } from '@atlaskit/button/custom-theme-button';
|
|
7
7
|
import Heading from '@atlaskit/heading';
|
|
8
|
-
import {
|
|
9
|
-
import { layers } from '@atlaskit/theme/constants';
|
|
8
|
+
import { Box, Text, xcss } from '@atlaskit/primitives';
|
|
10
9
|
import { DialogActionItem, DialogActionItemContainer } from '../styled/dialog';
|
|
11
10
|
import { spotlightButtonTheme } from './theme';
|
|
12
11
|
var bodyStyles = css({
|
|
@@ -41,16 +40,17 @@ var DefaultFooter = function DefaultFooter(_ref2) {
|
|
|
41
40
|
css: defaultFooterStyles
|
|
42
41
|
}, children);
|
|
43
42
|
};
|
|
44
|
-
var containerStyles =
|
|
43
|
+
var containerStyles = xcss({
|
|
45
44
|
height: 'fit-content',
|
|
46
|
-
zIndex:
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
45
|
+
zIndex: 'spotlight',
|
|
46
|
+
borderRadius: 'border.radius',
|
|
47
|
+
color: 'color.text.inverse',
|
|
48
|
+
overflow: 'auto',
|
|
49
|
+
minWidth: '160px',
|
|
50
|
+
maxWidth: '600px'
|
|
51
51
|
});
|
|
52
|
-
var containerShadowStyles =
|
|
53
|
-
boxShadow:
|
|
52
|
+
var containerShadowStyles = xcss({
|
|
53
|
+
boxShadow: 'elevation.shadow.raised'
|
|
54
54
|
});
|
|
55
55
|
/**
|
|
56
56
|
* __Spotlight card__
|
|
@@ -85,15 +85,14 @@ var SpotlightCard = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
85
85
|
Footer = _components$Footer === void 0 ? DefaultFooter : _components$Footer;
|
|
86
86
|
return jsx(ButtonTheme.Provider, {
|
|
87
87
|
value: spotlightButtonTheme
|
|
88
|
-
}, jsx(
|
|
89
|
-
|
|
88
|
+
}, jsx(Box, {
|
|
89
|
+
backgroundColor: "color.background.discovery.bold",
|
|
90
|
+
xcss: [containerStyles, !isFlat && containerShadowStyles],
|
|
90
91
|
style: {
|
|
91
|
-
|
|
92
|
-
maxWidth: '600px',
|
|
93
|
-
width: typeof width === 'string' ? width : "".concat(width, "px")
|
|
92
|
+
width: width
|
|
94
93
|
},
|
|
95
94
|
ref: ref || innerRef,
|
|
96
|
-
|
|
95
|
+
testId: testId
|
|
97
96
|
}, typeof image === 'string' ? jsx("img", {
|
|
98
97
|
css: imageStyles,
|
|
99
98
|
src: image,
|
|
@@ -103,9 +102,9 @@ var SpotlightCard = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
103
102
|
}, heading || headingAfterElement ? jsx(Header, null, jsx(Heading, {
|
|
104
103
|
id: headingId,
|
|
105
104
|
color: "inverse",
|
|
106
|
-
|
|
105
|
+
size: "medium",
|
|
107
106
|
as: "h".concat(headingLevel)
|
|
108
|
-
}, heading), headingAfterElement) : null, children, actions.length > 0 || actionsBeforeElement ? jsx(Footer, null, actionsBeforeElement || jsx("span", null), jsx(DialogActionItemContainer, null, actions.map(function (_ref3, idx) {
|
|
107
|
+
}, heading), headingAfterElement) : null, jsx(Text, null, children), actions.length > 0 || actionsBeforeElement ? jsx(Footer, null, actionsBeforeElement || jsx("span", null), jsx(DialogActionItemContainer, null, actions.map(function (_ref3, idx) {
|
|
109
108
|
var text = _ref3.text,
|
|
110
109
|
key = _ref3.key,
|
|
111
110
|
rest = _objectWithoutProperties(_ref3, _excluded);
|
|
@@ -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.5.0";
|
|
21
21
|
var SpotlightDialog = /*#__PURE__*/function (_Component) {
|
|
22
22
|
_inherits(SpotlightDialog, _Component);
|
|
23
23
|
var _super = _createSuper(SpotlightDialog);
|
|
@@ -9,12 +9,12 @@ import * as colors from '@atlaskit/theme/colors';
|
|
|
9
9
|
var spotlightTheme = {
|
|
10
10
|
default: {
|
|
11
11
|
background: {
|
|
12
|
-
default: "var(--ds-background-inverse-subtle, ".concat(colors.
|
|
12
|
+
default: "var(--ds-background-inverse-subtle, ".concat(colors.P500, ")"),
|
|
13
13
|
hover: "var(--ds-background-inverse-subtle-hovered, ".concat(colors.P200, ")"),
|
|
14
14
|
active: "var(--ds-background-inverse-subtle-pressed, ".concat(colors.P500, ")"),
|
|
15
15
|
disabled: "var(--ds-background-disabled, ".concat(colors.P400, ")"),
|
|
16
16
|
selected: "var(--ds-background-inverse-subtle-pressed, ".concat(colors.R500, ")"),
|
|
17
|
-
focus: "var(--ds-background-inverse-subtle, ".concat(colors.
|
|
17
|
+
focus: "var(--ds-background-inverse-subtle, ".concat(colors.P500, ")")
|
|
18
18
|
},
|
|
19
19
|
color: {
|
|
20
20
|
default: "var(--ds-text-inverse, ".concat(colors.N0, ")"),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/onboarding",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.5.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/"
|
|
@@ -36,19 +36,21 @@
|
|
|
36
36
|
"website": {
|
|
37
37
|
"name": "Onboarding (spotlight)",
|
|
38
38
|
"category": "Components"
|
|
39
|
-
}
|
|
39
|
+
},
|
|
40
|
+
"runReact18": true
|
|
40
41
|
},
|
|
41
42
|
"dependencies": {
|
|
42
43
|
"@atlaskit/analytics-next": "^9.3.0",
|
|
43
44
|
"@atlaskit/button": "^17.14.0",
|
|
44
45
|
"@atlaskit/ds-lib": "^2.3.0",
|
|
45
46
|
"@atlaskit/heading": "^2.2.0",
|
|
46
|
-
"@atlaskit/modal-dialog": "^12.
|
|
47
|
+
"@atlaskit/modal-dialog": "^12.13.0",
|
|
47
48
|
"@atlaskit/motion": "^1.5.0",
|
|
48
49
|
"@atlaskit/popper": "^5.5.0",
|
|
49
50
|
"@atlaskit/portal": "^4.4.0",
|
|
51
|
+
"@atlaskit/primitives": "^5.7.0",
|
|
50
52
|
"@atlaskit/theme": "^12.7.0",
|
|
51
|
-
"@atlaskit/tokens": "^1.
|
|
53
|
+
"@atlaskit/tokens": "^1.44.0",
|
|
52
54
|
"@babel/runtime": "^7.0.0",
|
|
53
55
|
"@emotion/react": "^11.7.1",
|
|
54
56
|
"bind-event-listener": "^3.0.0",
|
|
@@ -61,7 +63,7 @@
|
|
|
61
63
|
"scroll-into-view-if-needed": "^2.2.20"
|
|
62
64
|
},
|
|
63
65
|
"peerDependencies": {
|
|
64
|
-
"react": "^16.8.0",
|
|
66
|
+
"react": "^16.8.0 || ^17.0.0 || ~18.2.0",
|
|
65
67
|
"react-dom": "^16.8.0"
|
|
66
68
|
},
|
|
67
69
|
"devDependencies": {
|