@atlaskit/side-navigation 2.0.2 → 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 +13 -0
- package/dist/cjs/components/Header/index.js +3 -3
- package/dist/cjs/components/NavigationFooter/index.js +4 -4
- package/dist/es2019/components/Header/index.js +2 -2
- package/dist/es2019/components/NavigationFooter/index.js +3 -4
- package/dist/esm/components/Header/index.js +3 -3
- package/dist/esm/components/NavigationFooter/index.js +3 -4
- package/dist/types/components/Header/index.d.ts +1 -1
- package/dist/types/components/NavigationFooter/index.d.ts +1 -3
- package/dist/types-ts4.5/components/Header/index.d.ts +1 -1
- package/dist/types-ts4.5/components/NavigationFooter/index.d.ts +1 -3
- package/package.json +4 -4
- package/report.api.md +1 -1
- package/tmp/api-report-tmp.d.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
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
|
+
|
|
9
|
+
## 2.0.3
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`e3b28897c5f`](https://bitbucket.org/atlassian/atlassian-frontend/commits/e3b28897c5f) - Internal code changes. There is no expected change in behaviour.
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
|
|
3
16
|
## 2.0.2
|
|
4
17
|
|
|
5
18
|
### 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
|
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
6
7
|
exports.default = void 0;
|
|
7
|
-
var _react = require("
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
9
|
var _primitives = require("@atlaskit/primitives");
|
|
9
|
-
/** @jsx jsx */
|
|
10
|
-
|
|
11
10
|
var navigationFooterStyles = (0, _primitives.xcss)({
|
|
12
11
|
position: 'relative'
|
|
13
12
|
});
|
|
13
|
+
|
|
14
14
|
/**
|
|
15
15
|
* __Navigation footer__
|
|
16
16
|
*
|
|
@@ -21,7 +21,7 @@ var navigationFooterStyles = (0, _primitives.xcss)({
|
|
|
21
21
|
*/
|
|
22
22
|
var NavigationFooter = function NavigationFooter(_ref) {
|
|
23
23
|
var children = _ref.children;
|
|
24
|
-
return
|
|
24
|
+
return /*#__PURE__*/_react.default.createElement(_primitives.Box, {
|
|
25
25
|
padding: "space.100",
|
|
26
26
|
paddingBlockEnd: "space.200",
|
|
27
27
|
xcss: navigationFooterStyles
|
|
@@ -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,10 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { jsx } from '@emotion/react';
|
|
1
|
+
import React from 'react';
|
|
4
2
|
import { Box, xcss } from '@atlaskit/primitives';
|
|
5
3
|
const navigationFooterStyles = xcss({
|
|
6
4
|
position: 'relative'
|
|
7
5
|
});
|
|
6
|
+
|
|
8
7
|
/**
|
|
9
8
|
* __Navigation footer__
|
|
10
9
|
*
|
|
@@ -16,7 +15,7 @@ const navigationFooterStyles = xcss({
|
|
|
16
15
|
const NavigationFooter = ({
|
|
17
16
|
children
|
|
18
17
|
}) => {
|
|
19
|
-
return
|
|
18
|
+
return /*#__PURE__*/React.createElement(Box, {
|
|
20
19
|
padding: "space.100",
|
|
21
20
|
paddingBlockEnd: "space.200",
|
|
22
21
|
xcss: navigationFooterStyles
|
|
@@ -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
|
};
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { jsx } from '@emotion/react';
|
|
1
|
+
import React from 'react';
|
|
4
2
|
import { Box, xcss } from '@atlaskit/primitives';
|
|
5
3
|
var navigationFooterStyles = xcss({
|
|
6
4
|
position: 'relative'
|
|
7
5
|
});
|
|
6
|
+
|
|
8
7
|
/**
|
|
9
8
|
* __Navigation footer__
|
|
10
9
|
*
|
|
@@ -15,7 +14,7 @@ var navigationFooterStyles = xcss({
|
|
|
15
14
|
*/
|
|
16
15
|
var NavigationFooter = function NavigationFooter(_ref) {
|
|
17
16
|
var children = _ref.children;
|
|
18
|
-
return
|
|
17
|
+
return /*#__PURE__*/React.createElement(Box, {
|
|
19
18
|
padding: "space.100",
|
|
20
19
|
paddingBlockEnd: "space.200",
|
|
21
20
|
xcss: navigationFooterStyles
|
|
@@ -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.
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
/** @jsx jsx */
|
|
2
1
|
import { ReactNode } from 'react';
|
|
3
|
-
import { jsx } from '@emotion/react';
|
|
4
2
|
export interface NavigationFooterProps {
|
|
5
3
|
children: ReactNode;
|
|
6
4
|
}
|
|
@@ -12,5 +10,5 @@ export interface NavigationFooterProps {
|
|
|
12
10
|
* - [Examples](https://atlassian.design/components/side-navigation/examples#header-and-footer)
|
|
13
11
|
* - [Code](https://atlassian.design/components/side-navigation/code)
|
|
14
12
|
*/
|
|
15
|
-
declare const NavigationFooter: ({ children }: NavigationFooterProps) =>
|
|
13
|
+
declare const NavigationFooter: ({ children }: NavigationFooterProps) => JSX.Element;
|
|
16
14
|
export default NavigationFooter;
|
|
@@ -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.
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
/** @jsx jsx */
|
|
2
1
|
import { ReactNode } from 'react';
|
|
3
|
-
import { jsx } from '@emotion/react';
|
|
4
2
|
export interface NavigationFooterProps {
|
|
5
3
|
children: ReactNode;
|
|
6
4
|
}
|
|
@@ -12,5 +10,5 @@ export interface NavigationFooterProps {
|
|
|
12
10
|
* - [Examples](https://atlassian.design/components/side-navigation/examples#header-and-footer)
|
|
13
11
|
* - [Code](https://atlassian.design/components/side-navigation/code)
|
|
14
12
|
*/
|
|
15
|
-
declare const NavigationFooter: ({ children }: NavigationFooterProps) =>
|
|
13
|
+
declare const NavigationFooter: ({ children }: NavigationFooterProps) => JSX.Element;
|
|
16
14
|
export default NavigationFooter;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/side-navigation",
|
|
3
|
-
"version": "2.0.
|
|
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.
|
|
41
|
-
"@atlaskit/theme": "^12.
|
|
42
|
-
"@atlaskit/tokens": "^1.
|
|
40
|
+
"@atlaskit/primitives": "^1.4.0",
|
|
41
|
+
"@atlaskit/theme": "^12.6.0",
|
|
42
|
+
"@atlaskit/tokens": "^1.21.0",
|
|
43
43
|
"@babel/runtime": "^7.0.0",
|
|
44
44
|
"@emotion/react": "^11.7.1"
|
|
45
45
|
},
|
package/report.api.md
CHANGED
|
@@ -152,7 +152,7 @@ export interface NavigationContentProps {
|
|
|
152
152
|
// @public
|
|
153
153
|
export const NavigationFooter: ({
|
|
154
154
|
children,
|
|
155
|
-
}: NavigationFooterProps) =>
|
|
155
|
+
}: NavigationFooterProps) => JSX.Element;
|
|
156
156
|
|
|
157
157
|
// @public (undocumented)
|
|
158
158
|
export interface NavigationFooterProps {
|
package/tmp/api-report-tmp.d.ts
CHANGED
|
@@ -109,7 +109,7 @@ export interface NavigationContentProps {
|
|
|
109
109
|
}
|
|
110
110
|
|
|
111
111
|
// @public
|
|
112
|
-
export const NavigationFooter: ({ children }: NavigationFooterProps) =>
|
|
112
|
+
export const NavigationFooter: ({ children }: NavigationFooterProps) => JSX.Element;
|
|
113
113
|
|
|
114
114
|
// @public (undocumented)
|
|
115
115
|
export interface NavigationFooterProps {
|