@atlaskit/side-navigation 3.6.1 → 3.6.3
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 +16 -0
- package/dist/cjs/components/SideNavigation/index.js +14 -4
- package/dist/es2019/components/SideNavigation/index.js +12 -4
- package/dist/esm/components/SideNavigation/index.js +13 -4
- package/dist/types/components/SideNavigation/index.d.ts +4 -0
- package/dist/types-ts4.5/components/SideNavigation/index.d.ts +4 -0
- package/package.json +11 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/side-navigation
|
|
2
2
|
|
|
3
|
+
## 3.6.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#168160](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/168160)
|
|
8
|
+
[`5c96046203b6f`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/5c96046203b6f) -
|
|
9
|
+
Tag top and side navigation components for SSR placeholder replacement
|
|
10
|
+
|
|
11
|
+
## 3.6.2
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [#167483](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/167483)
|
|
16
|
+
[`2dd22b00bedaa`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/2dd22b00bedaa) -
|
|
17
|
+
Add props for handling server rendered components and data-vc
|
|
18
|
+
|
|
3
19
|
## 3.6.1
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -1,12 +1,15 @@
|
|
|
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;
|
|
8
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
7
9
|
var _react = require("react");
|
|
8
10
|
var _react2 = require("@emotion/react");
|
|
9
11
|
var _menu = require("@atlaskit/menu");
|
|
12
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
10
13
|
var _colors = require("@atlaskit/theme/colors");
|
|
11
14
|
/**
|
|
12
15
|
* @jsxRuntime classic
|
|
@@ -40,13 +43,20 @@ var sideNavStyles = (0, _react2.css)({
|
|
|
40
43
|
var SideNavigation = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
41
44
|
var children = props.children,
|
|
42
45
|
testId = props.testId,
|
|
43
|
-
label = props.label
|
|
44
|
-
|
|
46
|
+
label = props.label,
|
|
47
|
+
_props$isServer = props.isServer,
|
|
48
|
+
isServer = _props$isServer === void 0 ? false : _props$isServer;
|
|
49
|
+
return (0, _react2.jsx)("nav", (0, _extends2.default)({
|
|
45
50
|
ref: ref,
|
|
46
51
|
"data-testid": testId,
|
|
47
52
|
"aria-label": label,
|
|
48
|
-
css: sideNavStyles
|
|
49
|
-
|
|
53
|
+
css: sideNavStyles,
|
|
54
|
+
"data-vc": "side-navigation".concat(isServer ? '-ssr' : '')
|
|
55
|
+
}, isServer && (0, _platformFeatureFlags.fg)('add_ssr_placeholder_replacements_to_nin_and_nav') && {
|
|
56
|
+
'data-ssr-placeholder': 'side-navigation-placeholder'
|
|
57
|
+
}, !isServer && (0, _platformFeatureFlags.fg)('add_ssr_placeholder_replacements_to_nin_and_nav') && {
|
|
58
|
+
'data-ssr-placeholder-replace': 'side-navigation-placeholder'
|
|
59
|
+
}), (0, _react2.jsx)(_menu.SELECTION_STYLE_CONTEXT_DO_NOT_USE.Provider, {
|
|
50
60
|
value: "notch"
|
|
51
61
|
}, children));
|
|
52
62
|
});
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
1
2
|
/**
|
|
2
3
|
* @jsxRuntime classic
|
|
3
4
|
* @jsx jsx
|
|
@@ -7,6 +8,7 @@ import { forwardRef } from 'react';
|
|
|
7
8
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
8
9
|
import { css, jsx } from '@emotion/react';
|
|
9
10
|
import { SELECTION_STYLE_CONTEXT_DO_NOT_USE } from '@atlaskit/menu';
|
|
11
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
12
|
import { N10, N500 } from '@atlaskit/theme/colors';
|
|
11
13
|
const sidebarMinWidth = '240px';
|
|
12
14
|
const sideNavStyles = css({
|
|
@@ -34,14 +36,20 @@ const SideNavigation = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
34
36
|
const {
|
|
35
37
|
children,
|
|
36
38
|
testId,
|
|
37
|
-
label
|
|
39
|
+
label,
|
|
40
|
+
isServer = false
|
|
38
41
|
} = props;
|
|
39
|
-
return jsx("nav", {
|
|
42
|
+
return jsx("nav", _extends({
|
|
40
43
|
ref: ref,
|
|
41
44
|
"data-testid": testId,
|
|
42
45
|
"aria-label": label,
|
|
43
|
-
css: sideNavStyles
|
|
44
|
-
|
|
46
|
+
css: sideNavStyles,
|
|
47
|
+
"data-vc": `side-navigation${isServer ? '-ssr' : ''}`
|
|
48
|
+
}, isServer && fg('add_ssr_placeholder_replacements_to_nin_and_nav') && {
|
|
49
|
+
'data-ssr-placeholder': 'side-navigation-placeholder'
|
|
50
|
+
}, !isServer && fg('add_ssr_placeholder_replacements_to_nin_and_nav') && {
|
|
51
|
+
'data-ssr-placeholder-replace': 'side-navigation-placeholder'
|
|
52
|
+
}), jsx(SELECTION_STYLE_CONTEXT_DO_NOT_USE.Provider, {
|
|
45
53
|
value: "notch"
|
|
46
54
|
}, children));
|
|
47
55
|
});
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
1
2
|
/**
|
|
2
3
|
* @jsxRuntime classic
|
|
3
4
|
* @jsx jsx
|
|
@@ -7,6 +8,7 @@ import { forwardRef } from 'react';
|
|
|
7
8
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
8
9
|
import { css, jsx } from '@emotion/react';
|
|
9
10
|
import { SELECTION_STYLE_CONTEXT_DO_NOT_USE } from '@atlaskit/menu';
|
|
11
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
12
|
import { N10, N500 } from '@atlaskit/theme/colors';
|
|
11
13
|
var sidebarMinWidth = '240px';
|
|
12
14
|
var sideNavStyles = css({
|
|
@@ -33,13 +35,20 @@ var sideNavStyles = css({
|
|
|
33
35
|
var SideNavigation = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
34
36
|
var children = props.children,
|
|
35
37
|
testId = props.testId,
|
|
36
|
-
label = props.label
|
|
37
|
-
|
|
38
|
+
label = props.label,
|
|
39
|
+
_props$isServer = props.isServer,
|
|
40
|
+
isServer = _props$isServer === void 0 ? false : _props$isServer;
|
|
41
|
+
return jsx("nav", _extends({
|
|
38
42
|
ref: ref,
|
|
39
43
|
"data-testid": testId,
|
|
40
44
|
"aria-label": label,
|
|
41
|
-
css: sideNavStyles
|
|
42
|
-
|
|
45
|
+
css: sideNavStyles,
|
|
46
|
+
"data-vc": "side-navigation".concat(isServer ? '-ssr' : '')
|
|
47
|
+
}, isServer && fg('add_ssr_placeholder_replacements_to_nin_and_nav') && {
|
|
48
|
+
'data-ssr-placeholder': 'side-navigation-placeholder'
|
|
49
|
+
}, !isServer && fg('add_ssr_placeholder_replacements_to_nin_and_nav') && {
|
|
50
|
+
'data-ssr-placeholder-replace': 'side-navigation-placeholder'
|
|
51
|
+
}), jsx(SELECTION_STYLE_CONTEXT_DO_NOT_USE.Provider, {
|
|
43
52
|
value: "notch"
|
|
44
53
|
}, children));
|
|
45
54
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/side-navigation",
|
|
3
|
-
"version": "3.6.
|
|
3
|
+
"version": "3.6.3",
|
|
4
4
|
"description": "A highly composable side navigation component that supports nested views.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -23,19 +23,23 @@
|
|
|
23
23
|
"team": "Design System Team",
|
|
24
24
|
"website": {
|
|
25
25
|
"name": "Side navigation",
|
|
26
|
-
"category": "
|
|
26
|
+
"category": "Navigation",
|
|
27
|
+
"status": {
|
|
28
|
+
"type": "intent-to-deprecate",
|
|
29
|
+
"description": "We are in the process of building a new side navigation component: [@atlassian/navigation-system](https://staging.atlassian.design/components/navigation-system/side-navigation/examples) (For Atlassian employees only at this stage)"
|
|
30
|
+
}
|
|
27
31
|
},
|
|
28
32
|
"runReact18": true
|
|
29
33
|
},
|
|
30
34
|
"dependencies": {
|
|
31
35
|
"@atlaskit/ds-lib": "^3.2.0",
|
|
32
|
-
"@atlaskit/icon": "^22.
|
|
36
|
+
"@atlaskit/icon": "^22.26.0",
|
|
33
37
|
"@atlaskit/menu": "^2.13.0",
|
|
34
38
|
"@atlaskit/motion": "^1.9.0",
|
|
35
39
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
36
40
|
"@atlaskit/primitives": "^13.2.0",
|
|
37
41
|
"@atlaskit/theme": "^14.0.0",
|
|
38
|
-
"@atlaskit/tokens": "^2.
|
|
42
|
+
"@atlaskit/tokens": "^2.3.0",
|
|
39
43
|
"@babel/runtime": "^7.0.0",
|
|
40
44
|
"@emotion/react": "^11.7.1"
|
|
41
45
|
},
|
|
@@ -89,6 +93,9 @@
|
|
|
89
93
|
"platform-feature-flags": {
|
|
90
94
|
"platform-side-navigation-keyboard-focus": {
|
|
91
95
|
"type": "boolean"
|
|
96
|
+
},
|
|
97
|
+
"add_ssr_placeholder_replacements_to_nin_and_nav": {
|
|
98
|
+
"type": "boolean"
|
|
92
99
|
}
|
|
93
100
|
},
|
|
94
101
|
"homepage": "https://atlassian.design/components/side-navigation/"
|