@atlaskit/side-navigation 2.0.3 → 2.0.4

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,11 @@
1
1
  # @atlaskit/side-navigation
2
2
 
3
+ ## 2.0.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [`879275819ed`](https://bitbucket.org/atlassian/atlassian-frontend/commits/879275819ed) - Fix for `data-testid` not being applied to Header.
8
+
3
9
  ## 2.0.3
4
10
 
5
11
  ### Patch Changes
@@ -14,7 +14,7 @@ var _colors = require("@atlaskit/theme/colors");
14
14
  var _typography = require("@atlaskit/theme/typography");
15
15
  var _styles = require("../../common/styles");
16
16
  var _Item = require("../Item");
17
- var _excluded = ["children"],
17
+ var _excluded = ["children", "data-testid"],
18
18
  _excluded2 = ["children"];
19
19
  /** @jsx jsx */
20
20
  var containerStyles = (0, _react2.css)({
@@ -29,11 +29,11 @@ var containerStyles = (0, _react2.css)({
29
29
  */
30
30
  var Container = function Container(_ref) {
31
31
  var children = _ref.children,
32
+ testId = _ref['data-testid'],
32
33
  props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
33
34
  // https://stackoverflow.com/a/39333479
34
35
  var safeProps = function (_ref2) {
35
36
  var className = _ref2.className,
36
- testId = _ref2['data-testid'],
37
37
  onClick = _ref2.onClick,
38
38
  onMouseDown = _ref2.onMouseDown,
39
39
  onDragStart = _ref2.onDragStart,
@@ -43,7 +43,6 @@ var Container = function Container(_ref) {
43
43
  disabled = _ref2.disabled;
44
44
  return {
45
45
  className: className,
46
- testId: testId,
47
46
  onClick: onClick,
48
47
  onMouseDown: onMouseDown,
49
48
  onDragStart: onDragStart,
@@ -54,6 +53,7 @@ var Container = function Container(_ref) {
54
53
  };
55
54
  }(props);
56
55
  return (0, _react2.jsx)("div", (0, _extends2.default)({
56
+ "data-testid": testId,
57
57
  css: containerStyles
58
58
  }, safeProps), children);
59
59
  };
@@ -18,12 +18,12 @@ const containerStyles = css({
18
18
  */
19
19
  export const Container = ({
20
20
  children,
21
+ 'data-testid': testId,
21
22
  ...props
22
23
  }) => {
23
24
  // https://stackoverflow.com/a/39333479
24
25
  const safeProps = (({
25
26
  className,
26
- 'data-testid': testId,
27
27
  onClick,
28
28
  onMouseDown,
29
29
  onDragStart,
@@ -33,7 +33,6 @@ export const Container = ({
33
33
  disabled
34
34
  }) => ({
35
35
  className,
36
- testId,
37
36
  onClick,
38
37
  onMouseDown,
39
38
  onDragStart,
@@ -43,6 +42,7 @@ export const Container = ({
43
42
  disabled
44
43
  }))(props);
45
44
  return jsx("div", _extends({
45
+ "data-testid": testId,
46
46
  css: containerStyles
47
47
  }, safeProps), children);
48
48
  };
@@ -1,7 +1,7 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
4
- var _excluded = ["children"],
4
+ var _excluded = ["children", "data-testid"],
5
5
  _excluded2 = ["children"];
6
6
  /** @jsx jsx */
7
7
  import { forwardRef } from 'react';
@@ -22,11 +22,11 @@ var containerStyles = css({
22
22
  */
23
23
  export var Container = function Container(_ref) {
24
24
  var children = _ref.children,
25
+ testId = _ref['data-testid'],
25
26
  props = _objectWithoutProperties(_ref, _excluded);
26
27
  // https://stackoverflow.com/a/39333479
27
28
  var safeProps = function (_ref2) {
28
29
  var className = _ref2.className,
29
- testId = _ref2['data-testid'],
30
30
  onClick = _ref2.onClick,
31
31
  onMouseDown = _ref2.onMouseDown,
32
32
  onDragStart = _ref2.onDragStart,
@@ -36,7 +36,6 @@ export var Container = function Container(_ref) {
36
36
  disabled = _ref2.disabled;
37
37
  return {
38
38
  className: className,
39
- testId: testId,
40
39
  onClick: onClick,
41
40
  onMouseDown: onMouseDown,
42
41
  onDragStart: onDragStart,
@@ -47,6 +46,7 @@ export var Container = function Container(_ref) {
47
46
  };
48
47
  }(props);
49
48
  return jsx("div", _extends({
49
+ "data-testid": testId,
50
50
  css: containerStyles
51
51
  }, safeProps), children);
52
52
  };
@@ -6,7 +6,7 @@ import { CSSFn, CustomItemComponentProps } from '@atlaskit/menu';
6
6
  *
7
7
  * A container for Header and Footer that safely handles props to the child component
8
8
  */
9
- export declare const Container: ({ children, ...props }: CustomItemComponentProps) => jsx.JSX.Element;
9
+ export declare const Container: ({ children, "data-testid": testId, ...props }: CustomItemComponentProps) => jsx.JSX.Element;
10
10
  export type HeaderProps = {
11
11
  /**
12
12
  * A function that can be used to override the styles of the component.
@@ -6,7 +6,7 @@ import { CSSFn, CustomItemComponentProps } from '@atlaskit/menu';
6
6
  *
7
7
  * A container for Header and Footer that safely handles props to the child component
8
8
  */
9
- export declare const Container: ({ children, ...props }: CustomItemComponentProps) => jsx.JSX.Element;
9
+ export declare const Container: ({ children, "data-testid": testId, ...props }: CustomItemComponentProps) => jsx.JSX.Element;
10
10
  export type HeaderProps = {
11
11
  /**
12
12
  * A function that can be used to override the styles of the component.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/side-navigation",
3
- "version": "2.0.3",
3
+ "version": "2.0.4",
4
4
  "description": "A highly composable side navigation component that supports nested views.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -37,9 +37,9 @@
37
37
  "@atlaskit/icon": "^21.12.0",
38
38
  "@atlaskit/menu": "^1.10.0",
39
39
  "@atlaskit/motion": "^1.4.0",
40
- "@atlaskit/primitives": "^1.3.0",
40
+ "@atlaskit/primitives": "^1.4.0",
41
41
  "@atlaskit/theme": "^12.6.0",
42
- "@atlaskit/tokens": "^1.18.0",
42
+ "@atlaskit/tokens": "^1.21.0",
43
43
  "@babel/runtime": "^7.0.0",
44
44
  "@emotion/react": "^11.7.1"
45
45
  },