@atlaskit/onboarding 11.1.2 → 11.2.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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/onboarding
2
2
 
3
+ ## 11.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#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.
8
+
9
+ ## 11.1.3
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
3
15
  ## 11.1.2
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: "h4"
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.2";
30
+ var packageVersion = "11.2.0";
31
31
  var SpotlightDialog = /*#__PURE__*/function (_Component) {
32
32
  (0, _inherits2.default)(SpotlightDialog, _Component);
33
33
  var _super = _createSuper(SpotlightDialog);
@@ -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: "h4"
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.2";
10
+ const packageVersion = "11.2.0";
11
11
  class SpotlightDialog extends Component {
12
12
  constructor(...args) {
13
13
  super(...args);
@@ -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: "h4"
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.2";
20
+ var packageVersion = "11.2.0";
21
21
  var SpotlightDialog = /*#__PURE__*/function (_Component) {
22
22
  _inherits(SpotlightDialog, _Component);
23
23
  var _super = _createSuper(SpotlightDialog);
@@ -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.2",
3
+ "version": "11.2.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/"
@@ -34,14 +34,14 @@
34
34
  },
35
35
  "dependencies": {
36
36
  "@atlaskit/analytics-next": "^9.1.0",
37
- "@atlaskit/button": "^16.17.0",
37
+ "@atlaskit/button": "^17.1.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.29.0",
44
+ "@atlaskit/tokens": "^1.32.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",