@atlaskit/side-navigation 3.6.6 → 3.6.8

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,19 @@
1
1
  # @atlaskit/side-navigation
2
2
 
3
+ ## 3.6.8
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 3.6.7
10
+
11
+ ### Patch Changes
12
+
13
+ - [#181731](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/181731)
14
+ [`910a3ef2381d3`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/910a3ef2381d3) -
15
+ Add isSSRPlaceholderEnabled prop for side and top nav v3
16
+
3
17
  ## 3.6.6
4
18
 
5
19
  ### Patch Changes
@@ -91,6 +91,7 @@ var Header = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
91
91
  ,
92
92
  overrides: {
93
93
  Title: {
94
+ // eslint-disable-next-line @atlaskit/design-system/use-heading
94
95
  render: function render(_, _ref4) {
95
96
  var children = _ref4.children,
96
97
  props = (0, _objectWithoutProperties2.default)(_ref4, _excluded2);
@@ -9,7 +9,6 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
9
9
  var _react = require("react");
10
10
  var _react2 = require("@emotion/react");
11
11
  var _menu = require("@atlaskit/menu");
12
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
13
12
  var _colors = require("@atlaskit/theme/colors");
14
13
  /**
15
14
  * @jsxRuntime classic
@@ -45,16 +44,18 @@ var SideNavigation = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
45
44
  testId = props.testId,
46
45
  label = props.label,
47
46
  _props$isServer = props.isServer,
48
- isServer = _props$isServer === void 0 ? false : _props$isServer;
47
+ isServer = _props$isServer === void 0 ? false : _props$isServer,
48
+ _props$isSSRPlacehold = props.isSSRPlaceholderEnabled,
49
+ isSSRPlaceholderEnabled = _props$isSSRPlacehold === void 0 ? false : _props$isSSRPlacehold;
49
50
  return (0, _react2.jsx)("nav", (0, _extends2.default)({
50
51
  ref: ref,
51
52
  "data-testid": testId,
52
53
  "aria-label": label,
53
54
  css: sideNavStyles,
54
55
  "data-vc": "side-navigation".concat(isServer ? '-ssr' : '')
55
- }, isServer && (0, _platformFeatureFlags.fg)('add_ssr_placeholder_replacements_to_nin_and_nav') && {
56
+ }, isServer && isSSRPlaceholderEnabled && {
56
57
  'data-ssr-placeholder': 'side-navigation-placeholder'
57
- }, !isServer && (0, _platformFeatureFlags.fg)('add_ssr_placeholder_replacements_to_nin_and_nav') && {
58
+ }, !isServer && isSSRPlaceholderEnabled && {
58
59
  'data-ssr-placeholder-replace': 'side-navigation-placeholder'
59
60
  }), (0, _react2.jsx)(_menu.SELECTION_STYLE_CONTEXT_DO_NOT_USE.Provider, {
60
61
  value: "notch"
@@ -83,6 +83,7 @@ const Header = /*#__PURE__*/forwardRef((props, ref) => {
83
83
  ,
84
84
  overrides: {
85
85
  Title: {
86
+ // eslint-disable-next-line @atlaskit/design-system/use-heading
86
87
  render: (_, {
87
88
  children,
88
89
  ...props
@@ -8,7 +8,6 @@ import { forwardRef } from 'react';
8
8
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
9
9
  import { css, jsx } from '@emotion/react';
10
10
  import { SELECTION_STYLE_CONTEXT_DO_NOT_USE } from '@atlaskit/menu';
11
- import { fg } from '@atlaskit/platform-feature-flags';
12
11
  import { N10, N500 } from '@atlaskit/theme/colors';
13
12
  const sidebarMinWidth = '240px';
14
13
  const sideNavStyles = css({
@@ -37,7 +36,8 @@ const SideNavigation = /*#__PURE__*/forwardRef((props, ref) => {
37
36
  children,
38
37
  testId,
39
38
  label,
40
- isServer = false
39
+ isServer = false,
40
+ isSSRPlaceholderEnabled = false
41
41
  } = props;
42
42
  return jsx("nav", _extends({
43
43
  ref: ref,
@@ -45,9 +45,9 @@ const SideNavigation = /*#__PURE__*/forwardRef((props, ref) => {
45
45
  "aria-label": label,
46
46
  css: sideNavStyles,
47
47
  "data-vc": `side-navigation${isServer ? '-ssr' : ''}`
48
- }, isServer && fg('add_ssr_placeholder_replacements_to_nin_and_nav') && {
48
+ }, isServer && isSSRPlaceholderEnabled && {
49
49
  'data-ssr-placeholder': 'side-navigation-placeholder'
50
- }, !isServer && fg('add_ssr_placeholder_replacements_to_nin_and_nav') && {
50
+ }, !isServer && isSSRPlaceholderEnabled && {
51
51
  'data-ssr-placeholder-replace': 'side-navigation-placeholder'
52
52
  }), jsx(SELECTION_STYLE_CONTEXT_DO_NOT_USE.Provider, {
53
53
  value: "notch"
@@ -85,6 +85,7 @@ var Header = /*#__PURE__*/forwardRef(function (props, ref) {
85
85
  ,
86
86
  overrides: {
87
87
  Title: {
88
+ // eslint-disable-next-line @atlaskit/design-system/use-heading
88
89
  render: function render(_, _ref4) {
89
90
  var children = _ref4.children,
90
91
  props = _objectWithoutProperties(_ref4, _excluded2);
@@ -8,7 +8,6 @@ import { forwardRef } from 'react';
8
8
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
9
9
  import { css, jsx } from '@emotion/react';
10
10
  import { SELECTION_STYLE_CONTEXT_DO_NOT_USE } from '@atlaskit/menu';
11
- import { fg } from '@atlaskit/platform-feature-flags';
12
11
  import { N10, N500 } from '@atlaskit/theme/colors';
13
12
  var sidebarMinWidth = '240px';
14
13
  var sideNavStyles = css({
@@ -37,16 +36,18 @@ var SideNavigation = /*#__PURE__*/forwardRef(function (props, ref) {
37
36
  testId = props.testId,
38
37
  label = props.label,
39
38
  _props$isServer = props.isServer,
40
- isServer = _props$isServer === void 0 ? false : _props$isServer;
39
+ isServer = _props$isServer === void 0 ? false : _props$isServer,
40
+ _props$isSSRPlacehold = props.isSSRPlaceholderEnabled,
41
+ isSSRPlaceholderEnabled = _props$isSSRPlacehold === void 0 ? false : _props$isSSRPlacehold;
41
42
  return jsx("nav", _extends({
42
43
  ref: ref,
43
44
  "data-testid": testId,
44
45
  "aria-label": label,
45
46
  css: sideNavStyles,
46
47
  "data-vc": "side-navigation".concat(isServer ? '-ssr' : '')
47
- }, isServer && fg('add_ssr_placeholder_replacements_to_nin_and_nav') && {
48
+ }, isServer && isSSRPlaceholderEnabled && {
48
49
  'data-ssr-placeholder': 'side-navigation-placeholder'
49
- }, !isServer && fg('add_ssr_placeholder_replacements_to_nin_and_nav') && {
50
+ }, !isServer && isSSRPlaceholderEnabled && {
50
51
  'data-ssr-placeholder-replace': 'side-navigation-placeholder'
51
52
  }), jsx(SELECTION_STYLE_CONTEXT_DO_NOT_USE.Provider, {
52
53
  value: "notch"
@@ -22,6 +22,10 @@ export interface SideNavigationProps {
22
22
  * Whether nav is rendered on the server.
23
23
  */
24
24
  isServer?: boolean;
25
+ /**
26
+ * Whether to enable SSR placeholder replacement.
27
+ */
28
+ isSSRPlaceholderEnabled?: boolean;
25
29
  }
26
30
  /**
27
31
  * __Side navigation__
@@ -22,6 +22,10 @@ export interface SideNavigationProps {
22
22
  * Whether nav is rendered on the server.
23
23
  */
24
24
  isServer?: boolean;
25
+ /**
26
+ * Whether to enable SSR placeholder replacement.
27
+ */
28
+ isSSRPlaceholderEnabled?: boolean;
25
29
  }
26
30
  /**
27
31
  * __Side navigation__
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/side-navigation",
3
- "version": "3.6.6",
3
+ "version": "3.6.8",
4
4
  "description": "A highly composable side navigation component that supports nested views.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -33,13 +33,13 @@
33
33
  },
34
34
  "dependencies": {
35
35
  "@atlaskit/ds-lib": "^3.3.0",
36
- "@atlaskit/icon": "^23.1.0",
36
+ "@atlaskit/icon": "^23.3.0",
37
37
  "@atlaskit/menu": "^2.13.0",
38
38
  "@atlaskit/motion": "^1.9.0",
39
39
  "@atlaskit/platform-feature-flags": "^0.3.0",
40
40
  "@atlaskit/primitives": "^13.3.0",
41
41
  "@atlaskit/theme": "^14.0.0",
42
- "@atlaskit/tokens": "^2.4.0",
42
+ "@atlaskit/tokens": "^3.0.0",
43
43
  "@babel/runtime": "^7.0.0",
44
44
  "@emotion/react": "^11.7.1"
45
45
  },
@@ -93,9 +93,6 @@
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"
99
96
  }
100
97
  },
101
98
  "homepage": "https://atlassian.design/components/side-navigation/"
package/tsconfig.json CHANGED
@@ -10,6 +10,5 @@
10
10
  "node_modules"
11
11
  ],
12
12
  "compilerOptions": {
13
- "baseUrl": "./"
14
13
  }
15
14
  }