@atlaskit/onboarding 11.1.3 → 11.2.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 +12 -0
- package/dist/cjs/components/spotlight-card.js +3 -1
- package/dist/cjs/components/spotlight-dialog.js +5 -1
- package/dist/es2019/components/spotlight-card.js +2 -1
- package/dist/es2019/components/spotlight-dialog.js +5 -1
- package/dist/esm/components/spotlight-card.js +3 -1
- package/dist/esm/components/spotlight-dialog.js +5 -1
- package/dist/types/components/spotlight-card.d.ts +5 -0
- package/dist/types-ts4.5/components/spotlight-card.d.ts +5 -0
- package/package.json +3 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/onboarding
|
|
2
2
|
|
|
3
|
+
## 11.2.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#67032](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/67032) [`038e62a39d23`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/038e62a39d23) - [ux] Ensure spotlight dialog always uses heading level 2. This will eventually become heading level 1 once the dialog becomes a true modal.
|
|
8
|
+
|
|
9
|
+
## 11.2.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [#64059](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/64059) [`d69cb4f14309`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/d69cb4f14309) - [ux] Adds `headingLevel` to the SpotlightCard component. This will allow the usage of the correct heading level depending on context.
|
|
14
|
+
|
|
3
15
|
## 11.1.3
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -79,6 +79,8 @@ var SpotlightCard = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
79
79
|
_props$components = props.components,
|
|
80
80
|
components = _props$components === void 0 ? {} : _props$components,
|
|
81
81
|
heading = props.heading,
|
|
82
|
+
_props$headingLevel = props.headingLevel,
|
|
83
|
+
headingLevel = _props$headingLevel === void 0 ? 4 : _props$headingLevel,
|
|
82
84
|
headingAfterElement = props.headingAfterElement,
|
|
83
85
|
image = props.image,
|
|
84
86
|
innerRef = props.innerRef,
|
|
@@ -112,7 +114,7 @@ var SpotlightCard = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
112
114
|
id: headingId,
|
|
113
115
|
color: "inverse",
|
|
114
116
|
level: "h600",
|
|
115
|
-
as: "
|
|
117
|
+
as: "h".concat(headingLevel)
|
|
116
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
119
|
var text = _ref3.text,
|
|
118
120
|
key = _ref3.key,
|
|
@@ -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() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
29
29
|
var packageName = "@atlaskit/onboarding";
|
|
30
|
-
var packageVersion = "11.1
|
|
30
|
+
var packageVersion = "11.2.1";
|
|
31
31
|
var SpotlightDialog = /*#__PURE__*/function (_Component) {
|
|
32
32
|
(0, _inherits2.default)(SpotlightDialog, _Component);
|
|
33
33
|
var _super = _createSuper(SpotlightDialog);
|
|
@@ -138,6 +138,10 @@ var SpotlightDialog = /*#__PURE__*/function (_Component) {
|
|
|
138
138
|
},
|
|
139
139
|
heading: heading,
|
|
140
140
|
headingAfterElement: headingAfterElement
|
|
141
|
+
// This should be heading level 1 since this is technically a modal, including a focus lock on the modal window.
|
|
142
|
+
// But because it is not a _true_ modal, we are setting it to `2` until that is fixed.
|
|
143
|
+
,
|
|
144
|
+
headingLevel: 2
|
|
141
145
|
}, children))));
|
|
142
146
|
});
|
|
143
147
|
}
|
|
@@ -64,6 +64,7 @@ const SpotlightCard = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
64
64
|
children,
|
|
65
65
|
components = {},
|
|
66
66
|
heading,
|
|
67
|
+
headingLevel = 4,
|
|
67
68
|
headingAfterElement,
|
|
68
69
|
image,
|
|
69
70
|
innerRef,
|
|
@@ -97,7 +98,7 @@ const SpotlightCard = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
97
98
|
id: headingId,
|
|
98
99
|
color: "inverse",
|
|
99
100
|
level: "h600",
|
|
100
|
-
as:
|
|
101
|
+
as: `h${headingLevel}`
|
|
101
102
|
}, heading), headingAfterElement) : null, children, actions.length > 0 || actionsBeforeElement ? jsx(Footer, null, actionsBeforeElement || jsx("span", null), jsx(DialogActionItemContainer, null, actions.map(({
|
|
102
103
|
text,
|
|
103
104
|
key,
|
|
@@ -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.1
|
|
10
|
+
const packageVersion = "11.2.1";
|
|
11
11
|
class SpotlightDialog extends Component {
|
|
12
12
|
constructor(...args) {
|
|
13
13
|
super(...args);
|
|
@@ -109,6 +109,10 @@ class SpotlightDialog extends Component {
|
|
|
109
109
|
},
|
|
110
110
|
heading: heading,
|
|
111
111
|
headingAfterElement: headingAfterElement
|
|
112
|
+
// This should be heading level 1 since this is technically a modal, including a focus lock on the modal window.
|
|
113
|
+
// But because it is not a _true_ modal, we are setting it to `2` until that is fixed.
|
|
114
|
+
,
|
|
115
|
+
headingLevel: 2
|
|
112
116
|
}, children)))));
|
|
113
117
|
}
|
|
114
118
|
}
|
|
@@ -69,6 +69,8 @@ var SpotlightCard = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
69
69
|
_props$components = props.components,
|
|
70
70
|
components = _props$components === void 0 ? {} : _props$components,
|
|
71
71
|
heading = props.heading,
|
|
72
|
+
_props$headingLevel = props.headingLevel,
|
|
73
|
+
headingLevel = _props$headingLevel === void 0 ? 4 : _props$headingLevel,
|
|
72
74
|
headingAfterElement = props.headingAfterElement,
|
|
73
75
|
image = props.image,
|
|
74
76
|
innerRef = props.innerRef,
|
|
@@ -102,7 +104,7 @@ var SpotlightCard = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
102
104
|
id: headingId,
|
|
103
105
|
color: "inverse",
|
|
104
106
|
level: "h600",
|
|
105
|
-
as: "
|
|
107
|
+
as: "h".concat(headingLevel)
|
|
106
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
109
|
var text = _ref3.text,
|
|
108
110
|
key = _ref3.key,
|
|
@@ -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.1
|
|
20
|
+
var packageVersion = "11.2.1";
|
|
21
21
|
var SpotlightDialog = /*#__PURE__*/function (_Component) {
|
|
22
22
|
_inherits(SpotlightDialog, _Component);
|
|
23
23
|
var _super = _createSuper(SpotlightDialog);
|
|
@@ -128,6 +128,10 @@ var SpotlightDialog = /*#__PURE__*/function (_Component) {
|
|
|
128
128
|
},
|
|
129
129
|
heading: heading,
|
|
130
130
|
headingAfterElement: headingAfterElement
|
|
131
|
+
// This should be heading level 1 since this is technically a modal, including a focus lock on the modal window.
|
|
132
|
+
// But because it is not a _true_ modal, we are setting it to `2` until that is fixed.
|
|
133
|
+
,
|
|
134
|
+
headingLevel: 2
|
|
131
135
|
}, children))));
|
|
132
136
|
});
|
|
133
137
|
}
|
|
@@ -25,6 +25,11 @@ interface SpotlightCardProps {
|
|
|
25
25
|
* The heading to be rendered above the body
|
|
26
26
|
*/
|
|
27
27
|
heading?: ReactNode;
|
|
28
|
+
/**
|
|
29
|
+
* Specifies the heading level in the document structure.
|
|
30
|
+
* If not specified, level 4 will be applied by default.
|
|
31
|
+
*/
|
|
32
|
+
headingLevel?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
28
33
|
/**
|
|
29
34
|
* An optional element rendered to the right of the heading
|
|
30
35
|
*/
|
|
@@ -25,6 +25,11 @@ interface SpotlightCardProps {
|
|
|
25
25
|
* The heading to be rendered above the body
|
|
26
26
|
*/
|
|
27
27
|
heading?: ReactNode;
|
|
28
|
+
/**
|
|
29
|
+
* Specifies the heading level in the document structure.
|
|
30
|
+
* If not specified, level 4 will be applied by default.
|
|
31
|
+
*/
|
|
32
|
+
headingLevel?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
28
33
|
/**
|
|
29
34
|
* An optional element rendered to the right of the heading
|
|
30
35
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/onboarding",
|
|
3
|
-
"version": "11.1
|
|
3
|
+
"version": "11.2.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/"
|
|
@@ -34,14 +34,14 @@
|
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@atlaskit/analytics-next": "^9.1.0",
|
|
37
|
-
"@atlaskit/button": "^17.
|
|
37
|
+
"@atlaskit/button": "^17.2.0",
|
|
38
38
|
"@atlaskit/ds-lib": "^2.2.0",
|
|
39
39
|
"@atlaskit/heading": "^1.4.0",
|
|
40
40
|
"@atlaskit/modal-dialog": "^12.10.0",
|
|
41
41
|
"@atlaskit/popper": "^5.5.0",
|
|
42
42
|
"@atlaskit/portal": "^4.4.0",
|
|
43
43
|
"@atlaskit/theme": "^12.6.0",
|
|
44
|
-
"@atlaskit/tokens": "^1.
|
|
44
|
+
"@atlaskit/tokens": "^1.33.0",
|
|
45
45
|
"@babel/runtime": "^7.0.0",
|
|
46
46
|
"@emotion/react": "^11.7.1",
|
|
47
47
|
"bind-event-listener": "^2.1.1",
|
|
@@ -63,7 +63,6 @@
|
|
|
63
63
|
"@af/visual-regression": "*",
|
|
64
64
|
"@atlaskit/ssr": "*",
|
|
65
65
|
"@atlaskit/visual-regression": "*",
|
|
66
|
-
"@atlaskit/webdriver-runner": "*",
|
|
67
66
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
68
67
|
"@testing-library/react": "^12.1.5",
|
|
69
68
|
"@testing-library/react-hooks": "^8.0.1",
|