@atlaskit/atlassian-navigation 4.9.1 → 4.9.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/AtlassianNavigation/index.js +13 -4
- package/dist/es2019/components/AtlassianNavigation/index.js +11 -4
- package/dist/esm/components/AtlassianNavigation/index.js +12 -4
- package/dist/types/components/AtlassianNavigation/types.d.ts +4 -0
- package/dist/types-ts4.5/components/AtlassianNavigation/types.d.ts +4 -0
- package/package.json +12 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/atlassian-navigation
|
|
2
2
|
|
|
3
|
+
## 4.9.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
|
+
## 4.9.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
|
## 4.9.1
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -1,11 +1,14 @@
|
|
|
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 = exports.AtlassianNavigation = void 0;
|
|
8
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
7
9
|
var _react = require("@emotion/react");
|
|
8
10
|
var _analyticsNamespacedContext = require("@atlaskit/analytics-namespaced-context");
|
|
11
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
9
12
|
var _colors = require("@atlaskit/theme/colors");
|
|
10
13
|
var _constants = require("../../common/constants");
|
|
11
14
|
var _theme = require("../../theme");
|
|
@@ -85,19 +88,25 @@ var AtlassianNavigation = exports.AtlassianNavigation = function AtlassianNaviga
|
|
|
85
88
|
moreLabel = _props$moreLabel === void 0 ? '…' : _props$moreLabel,
|
|
86
89
|
_props$theme = props.theme,
|
|
87
90
|
theme = _props$theme === void 0 ? _theme.defaultTheme : _props$theme,
|
|
88
|
-
testId = props.testId
|
|
91
|
+
testId = props.testId,
|
|
92
|
+
_props$isServer = props.isServer,
|
|
93
|
+
isServer = _props$isServer === void 0 ? false : _props$isServer;
|
|
89
94
|
return (0, _react.jsx)(_theme.ThemeProvider, {
|
|
90
95
|
value: theme
|
|
91
96
|
}, (0, _react.jsx)(_analyticsNamespacedContext.NavigationAnalyticsContext, {
|
|
92
97
|
data: analyticsData
|
|
93
|
-
}, (0, _react.jsx)("header", {
|
|
98
|
+
}, (0, _react.jsx)("header", (0, _extends2.default)({
|
|
94
99
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
95
100
|
style: theme.mode.navigation,
|
|
96
101
|
css: containerStyles,
|
|
97
102
|
"data-testid": testId && "".concat(testId, "-header"),
|
|
98
103
|
role: "banner",
|
|
99
|
-
"data-vc": "atlassian-navigation"
|
|
100
|
-
}, (0,
|
|
104
|
+
"data-vc": "atlassian-navigation".concat(isServer ? '-ssr' : '')
|
|
105
|
+
}, isServer && (0, _platformFeatureFlags.fg)('add_ssr_placeholder_replacements_to_nin_and_nav') && {
|
|
106
|
+
'data-ssr-placeholder': 'atlassian-navigation-placeholder'
|
|
107
|
+
}, !isServer && (0, _platformFeatureFlags.fg)('add_ssr_placeholder_replacements_to_nin_and_nav') && {
|
|
108
|
+
'data-ssr-placeholder-replace': 'atlassian-navigation-placeholder'
|
|
109
|
+
}), (0, _react.jsx)("nav", {
|
|
101
110
|
css: leftStyles,
|
|
102
111
|
"aria-label": label
|
|
103
112
|
}, AppSwitcher && (0, _react.jsx)(AppSwitcher, null), ProductHome && (0, _react.jsx)(ProductHome, null), (0, _react.jsx)(_PrimaryItemsContainer.PrimaryItemsContainer, {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
1
2
|
/**
|
|
2
3
|
* @jsxRuntime classic
|
|
3
4
|
* @jsx jsx
|
|
@@ -5,6 +6,7 @@
|
|
|
5
6
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
6
7
|
import { css, jsx } from '@emotion/react';
|
|
7
8
|
import { NavigationAnalyticsContext } from '@atlaskit/analytics-namespaced-context';
|
|
9
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
10
|
import { N30 } from '@atlaskit/theme/colors';
|
|
9
11
|
import { HORIZONTAL_GLOBAL_NAV_HEIGHT } from '../../common/constants';
|
|
10
12
|
import { defaultTheme, ThemeProvider } from '../../theme';
|
|
@@ -76,20 +78,25 @@ export const AtlassianNavigation = props => {
|
|
|
76
78
|
renderSettings: Settings,
|
|
77
79
|
moreLabel = '…',
|
|
78
80
|
theme = defaultTheme,
|
|
79
|
-
testId
|
|
81
|
+
testId,
|
|
82
|
+
isServer = false
|
|
80
83
|
} = props;
|
|
81
84
|
return jsx(ThemeProvider, {
|
|
82
85
|
value: theme
|
|
83
86
|
}, jsx(NavigationAnalyticsContext, {
|
|
84
87
|
data: analyticsData
|
|
85
|
-
}, jsx("header", {
|
|
88
|
+
}, jsx("header", _extends({
|
|
86
89
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
87
90
|
style: theme.mode.navigation,
|
|
88
91
|
css: containerStyles,
|
|
89
92
|
"data-testid": testId && `${testId}-header`,
|
|
90
93
|
role: "banner",
|
|
91
|
-
"data-vc":
|
|
92
|
-
},
|
|
94
|
+
"data-vc": `atlassian-navigation${isServer ? '-ssr' : ''}`
|
|
95
|
+
}, isServer && fg('add_ssr_placeholder_replacements_to_nin_and_nav') && {
|
|
96
|
+
'data-ssr-placeholder': 'atlassian-navigation-placeholder'
|
|
97
|
+
}, !isServer && fg('add_ssr_placeholder_replacements_to_nin_and_nav') && {
|
|
98
|
+
'data-ssr-placeholder-replace': 'atlassian-navigation-placeholder'
|
|
99
|
+
}), jsx("nav", {
|
|
93
100
|
css: leftStyles,
|
|
94
101
|
"aria-label": label
|
|
95
102
|
}, AppSwitcher && jsx(AppSwitcher, null), ProductHome && jsx(ProductHome, null), jsx(PrimaryItemsContainer, {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
1
2
|
/**
|
|
2
3
|
* @jsxRuntime classic
|
|
3
4
|
* @jsx jsx
|
|
@@ -5,6 +6,7 @@
|
|
|
5
6
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
6
7
|
import { css, jsx } from '@emotion/react';
|
|
7
8
|
import { NavigationAnalyticsContext } from '@atlaskit/analytics-namespaced-context';
|
|
9
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
10
|
import { N30 } from '@atlaskit/theme/colors';
|
|
9
11
|
import { HORIZONTAL_GLOBAL_NAV_HEIGHT } from '../../common/constants';
|
|
10
12
|
import { defaultTheme, ThemeProvider } from '../../theme';
|
|
@@ -78,19 +80,25 @@ export var AtlassianNavigation = function AtlassianNavigation(props) {
|
|
|
78
80
|
moreLabel = _props$moreLabel === void 0 ? '…' : _props$moreLabel,
|
|
79
81
|
_props$theme = props.theme,
|
|
80
82
|
theme = _props$theme === void 0 ? defaultTheme : _props$theme,
|
|
81
|
-
testId = props.testId
|
|
83
|
+
testId = props.testId,
|
|
84
|
+
_props$isServer = props.isServer,
|
|
85
|
+
isServer = _props$isServer === void 0 ? false : _props$isServer;
|
|
82
86
|
return jsx(ThemeProvider, {
|
|
83
87
|
value: theme
|
|
84
88
|
}, jsx(NavigationAnalyticsContext, {
|
|
85
89
|
data: analyticsData
|
|
86
|
-
}, jsx("header", {
|
|
90
|
+
}, jsx("header", _extends({
|
|
87
91
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
88
92
|
style: theme.mode.navigation,
|
|
89
93
|
css: containerStyles,
|
|
90
94
|
"data-testid": testId && "".concat(testId, "-header"),
|
|
91
95
|
role: "banner",
|
|
92
|
-
"data-vc": "atlassian-navigation"
|
|
93
|
-
},
|
|
96
|
+
"data-vc": "atlassian-navigation".concat(isServer ? '-ssr' : '')
|
|
97
|
+
}, isServer && fg('add_ssr_placeholder_replacements_to_nin_and_nav') && {
|
|
98
|
+
'data-ssr-placeholder': 'atlassian-navigation-placeholder'
|
|
99
|
+
}, !isServer && fg('add_ssr_placeholder_replacements_to_nin_and_nav') && {
|
|
100
|
+
'data-ssr-placeholder-replace': 'atlassian-navigation-placeholder'
|
|
101
|
+
}), jsx("nav", {
|
|
94
102
|
css: leftStyles,
|
|
95
103
|
"aria-label": label
|
|
96
104
|
}, AppSwitcher && jsx(AppSwitcher, null), ProductHome && jsx(ProductHome, null), jsx(PrimaryItemsContainer, {
|
|
@@ -68,6 +68,10 @@ export interface AtlassianNavigationProps {
|
|
|
68
68
|
- Overflow menu button - `{testId}-overflow-menu-trigger`
|
|
69
69
|
*/
|
|
70
70
|
testId?: string;
|
|
71
|
+
/**
|
|
72
|
+
* Whether nav is rendered on the server.
|
|
73
|
+
*/
|
|
74
|
+
isServer?: boolean;
|
|
71
75
|
}
|
|
72
76
|
export interface NavigationSkeletonProps {
|
|
73
77
|
/**
|
|
@@ -68,6 +68,10 @@ export interface AtlassianNavigationProps {
|
|
|
68
68
|
- Overflow menu button - `{testId}-overflow-menu-trigger`
|
|
69
69
|
*/
|
|
70
70
|
testId?: string;
|
|
71
|
+
/**
|
|
72
|
+
* Whether nav is rendered on the server.
|
|
73
|
+
*/
|
|
74
|
+
isServer?: boolean;
|
|
71
75
|
}
|
|
72
76
|
export interface NavigationSkeletonProps {
|
|
73
77
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/atlassian-navigation",
|
|
3
|
-
"version": "4.9.
|
|
3
|
+
"version": "4.9.3",
|
|
4
4
|
"description": "A horizontal navigation component for Atlassian products.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -36,7 +36,11 @@
|
|
|
36
36
|
"team": "Design System Team",
|
|
37
37
|
"website": {
|
|
38
38
|
"name": "Atlassian navigation",
|
|
39
|
-
"category": "
|
|
39
|
+
"category": "Navigation",
|
|
40
|
+
"status": {
|
|
41
|
+
"type": "intent-to-deprecate",
|
|
42
|
+
"description": "We are in the process of building a new top navigation component: [@atlassian/navigation-system](https://staging.atlassian.design/components/navigation-system/top-navigation/examples) (For Atlassian employees only at this stage)"
|
|
43
|
+
}
|
|
40
44
|
},
|
|
41
45
|
"runReact18": true
|
|
42
46
|
},
|
|
@@ -44,13 +48,13 @@
|
|
|
44
48
|
"@atlaskit/analytics-namespaced-context": "^6.12.0",
|
|
45
49
|
"@atlaskit/button": "^20.3.0",
|
|
46
50
|
"@atlaskit/ds-lib": "^3.2.0",
|
|
47
|
-
"@atlaskit/icon": "^22.
|
|
51
|
+
"@atlaskit/icon": "^22.26.0",
|
|
48
52
|
"@atlaskit/logo": "*",
|
|
49
53
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
50
54
|
"@atlaskit/popup": "^1.29.0",
|
|
51
55
|
"@atlaskit/primitives": "^13.2.0",
|
|
52
56
|
"@atlaskit/theme": "^14.0.0",
|
|
53
|
-
"@atlaskit/tokens": "^2.
|
|
57
|
+
"@atlaskit/tokens": "^2.3.0",
|
|
54
58
|
"@atlaskit/tooltip": "^18.9.0",
|
|
55
59
|
"@atlaskit/width-detector": "^4.3.0",
|
|
56
60
|
"@babel/runtime": "^7.0.0",
|
|
@@ -64,7 +68,7 @@
|
|
|
64
68
|
"devDependencies": {
|
|
65
69
|
"@af/accessibility-testing": "*",
|
|
66
70
|
"@af/visual-regression": "*",
|
|
67
|
-
"@atlaskit/dropdown-menu": "^12.
|
|
71
|
+
"@atlaskit/dropdown-menu": "^12.23.0",
|
|
68
72
|
"@atlaskit/notification-indicator": "*",
|
|
69
73
|
"@atlaskit/notification-log-client": "*",
|
|
70
74
|
"@atlaskit/visual-regression": "*",
|
|
@@ -102,6 +106,9 @@
|
|
|
102
106
|
"platform-feature-flags": {
|
|
103
107
|
"platform-component-visual-refresh": {
|
|
104
108
|
"type": "boolean"
|
|
109
|
+
},
|
|
110
|
+
"add_ssr_placeholder_replacements_to_nin_and_nav": {
|
|
111
|
+
"type": "boolean"
|
|
105
112
|
}
|
|
106
113
|
}
|
|
107
114
|
}
|