@atlaskit/side-navigation 3.6.2 → 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 CHANGED
@@ -1,5 +1,13 @@
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
+
3
11
  ## 3.6.2
4
12
 
5
13
  ### 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
@@ -43,13 +46,17 @@ var SideNavigation = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
43
46
  label = props.label,
44
47
  _props$isServer = props.isServer,
45
48
  isServer = _props$isServer === void 0 ? false : _props$isServer;
46
- return (0, _react2.jsx)("nav", {
49
+ return (0, _react2.jsx)("nav", (0, _extends2.default)({
47
50
  ref: ref,
48
51
  "data-testid": testId,
49
52
  "aria-label": label,
50
53
  css: sideNavStyles,
51
54
  "data-vc": "side-navigation".concat(isServer ? '-ssr' : '')
52
- }, (0, _react2.jsx)(_menu.SELECTION_STYLE_CONTEXT_DO_NOT_USE.Provider, {
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, {
53
60
  value: "notch"
54
61
  }, children));
55
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({
@@ -37,13 +39,17 @@ const SideNavigation = /*#__PURE__*/forwardRef((props, ref) => {
37
39
  label,
38
40
  isServer = false
39
41
  } = props;
40
- return jsx("nav", {
42
+ return jsx("nav", _extends({
41
43
  ref: ref,
42
44
  "data-testid": testId,
43
45
  "aria-label": label,
44
46
  css: sideNavStyles,
45
47
  "data-vc": `side-navigation${isServer ? '-ssr' : ''}`
46
- }, jsx(SELECTION_STYLE_CONTEXT_DO_NOT_USE.Provider, {
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, {
47
53
  value: "notch"
48
54
  }, children));
49
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({
@@ -36,13 +38,17 @@ var SideNavigation = /*#__PURE__*/forwardRef(function (props, ref) {
36
38
  label = props.label,
37
39
  _props$isServer = props.isServer,
38
40
  isServer = _props$isServer === void 0 ? false : _props$isServer;
39
- return jsx("nav", {
41
+ return jsx("nav", _extends({
40
42
  ref: ref,
41
43
  "data-testid": testId,
42
44
  "aria-label": label,
43
45
  css: sideNavStyles,
44
46
  "data-vc": "side-navigation".concat(isServer ? '-ssr' : '')
45
- }, jsx(SELECTION_STYLE_CONTEXT_DO_NOT_USE.Provider, {
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, {
46
52
  value: "notch"
47
53
  }, children));
48
54
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/side-navigation",
3
- "version": "3.6.2",
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,7 +23,7 @@
23
23
  "team": "Design System Team",
24
24
  "website": {
25
25
  "name": "Side navigation",
26
- "category": "Components",
26
+ "category": "Navigation",
27
27
  "status": {
28
28
  "type": "intent-to-deprecate",
29
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)"
@@ -33,7 +33,7 @@
33
33
  },
34
34
  "dependencies": {
35
35
  "@atlaskit/ds-lib": "^3.2.0",
36
- "@atlaskit/icon": "^22.25.0",
36
+ "@atlaskit/icon": "^22.26.0",
37
37
  "@atlaskit/menu": "^2.13.0",
38
38
  "@atlaskit/motion": "^1.9.0",
39
39
  "@atlaskit/platform-feature-flags": "^0.3.0",
@@ -93,6 +93,9 @@
93
93
  "platform-feature-flags": {
94
94
  "platform-side-navigation-keyboard-focus": {
95
95
  "type": "boolean"
96
+ },
97
+ "add_ssr_placeholder_replacements_to_nin_and_nav": {
98
+ "type": "boolean"
96
99
  }
97
100
  },
98
101
  "homepage": "https://atlassian.design/components/side-navigation/"