@atlaskit/side-navigation 3.6.2 → 3.6.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 CHANGED
@@ -1,5 +1,22 @@
1
1
  # @atlaskit/side-navigation
2
2
 
3
+ ## 3.6.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [#167504](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/167504)
8
+ [`3aef43e98843a`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/3aef43e98843a) -
9
+ Internal change to how styles are applied. There is no expected visual change.
10
+ - Updated dependencies
11
+
12
+ ## 3.6.3
13
+
14
+ ### Patch Changes
15
+
16
+ - [#168160](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/168160)
17
+ [`5c96046203b6f`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/5c96046203b6f) -
18
+ Tag top and side navigation components for SSR placeholder replacement
19
+
3
20
  ## 3.6.2
4
21
 
5
22
  ### Patch Changes
@@ -7,7 +7,6 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.outerContainerCSS = exports.innerContainerCSS = exports.containerCSS = void 0;
8
8
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
9
  var _colors = require("@atlaskit/theme/colors");
10
- var _typography = require("@atlaskit/theme/typography");
11
10
  var _constants = require("../../common/constants");
12
11
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
13
12
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
@@ -16,7 +15,7 @@ var scrollIndicatorZIndex = 1;
16
15
  var scrollIndicatorHeight = 2;
17
16
  var scrollIndicatorBorderRadius = '1px';
18
17
  var containerPadding = 8;
19
- var itemHeadingContentHeight = _typography.headingSizes.h100.lineHeight;
18
+ var itemHeadingContentHeight = 16; // Originally headingSizes.h100.lineHeight from '@atlaskit/theme/typography'
20
19
  var skeletonHeadingHeight = containerPadding;
21
20
  var skeletonHeadingMarginOffset = 3;
22
21
  // Skeleton content is slightly shorter than the real content.
@@ -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,13 +1,12 @@
1
1
  /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
2
2
  import { N10, N30 } from '@atlaskit/theme/colors';
3
- import { headingSizes } from '@atlaskit/theme/typography';
4
3
  import { VAR_SCROLL_INDICATOR_COLOR, VAR_SEPARATOR_COLOR } from '../../common/constants';
5
4
  const scrollIndicatorMaskZIndex = 2;
6
5
  const scrollIndicatorZIndex = 1;
7
6
  const scrollIndicatorHeight = 2;
8
7
  const scrollIndicatorBorderRadius = '1px';
9
8
  const containerPadding = 8;
10
- const itemHeadingContentHeight = headingSizes.h100.lineHeight;
9
+ const itemHeadingContentHeight = 16; // Originally headingSizes.h100.lineHeight from '@atlaskit/theme/typography'
11
10
  const skeletonHeadingHeight = containerPadding;
12
11
  const skeletonHeadingMarginOffset = 3;
13
12
  // Skeleton content is slightly shorter than the real content.
@@ -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
  });
@@ -3,14 +3,13 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
3
3
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
4
  /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
5
5
  import { N10, N30 } from '@atlaskit/theme/colors';
6
- import { headingSizes } from '@atlaskit/theme/typography';
7
6
  import { VAR_SCROLL_INDICATOR_COLOR, VAR_SEPARATOR_COLOR } from '../../common/constants';
8
7
  var scrollIndicatorMaskZIndex = 2;
9
8
  var scrollIndicatorZIndex = 1;
10
9
  var scrollIndicatorHeight = 2;
11
10
  var scrollIndicatorBorderRadius = '1px';
12
11
  var containerPadding = 8;
13
- var itemHeadingContentHeight = headingSizes.h100.lineHeight;
12
+ var itemHeadingContentHeight = 16; // Originally headingSizes.h100.lineHeight from '@atlaskit/theme/typography'
14
13
  var skeletonHeadingHeight = containerPadding;
15
14
  var skeletonHeadingMarginOffset = 3;
16
15
  // Skeleton content is slightly shorter than the real content.
@@ -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/docs/00-intro.tsx CHANGED
@@ -1,13 +1,14 @@
1
1
  import React from 'react';
2
2
 
3
3
  import { md } from '@atlaskit/docs';
4
+ import Link from '@atlaskit/link';
4
5
  import SectionMessage from '@atlaskit/section-message';
5
6
 
6
7
  export default md`
7
8
  ${(
8
9
  <SectionMessage appearance="information">
9
10
  This component is now documented on{' '}
10
- <a href="https://atlassian.design/components/side-navigation">atlassian.design</a>
11
+ <Link href="https://atlassian.design/components/side-navigation">atlassian.design</Link>
11
12
  </SectionMessage>
12
13
  )}
13
14
  `;
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.4",
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)"
@@ -32,14 +32,14 @@
32
32
  "runReact18": true
33
33
  },
34
34
  "dependencies": {
35
- "@atlaskit/ds-lib": "^3.2.0",
36
- "@atlaskit/icon": "^22.25.0",
35
+ "@atlaskit/ds-lib": "^3.3.0",
36
+ "@atlaskit/icon": "^22.28.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
- "@atlaskit/primitives": "^13.2.0",
40
+ "@atlaskit/primitives": "^13.3.0",
41
41
  "@atlaskit/theme": "^14.0.0",
42
- "@atlaskit/tokens": "^2.3.0",
42
+ "@atlaskit/tokens": "^2.4.0",
43
43
  "@babel/runtime": "^7.0.0",
44
44
  "@emotion/react": "^11.7.1"
45
45
  },
@@ -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/"