@atlaskit/atlassian-navigation 4.10.0 → 4.10.2

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,23 @@
1
1
  # @atlaskit/atlassian-navigation
2
2
 
3
+ ## 4.10.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#98559](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/98559)
8
+ [`863b3f6a0adba`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/863b3f6a0adba) - -
9
+ Remove `Appearance` from app switcher prop
10
+ - Update a few example usages
11
+ - Updated dependencies
12
+
13
+ ## 4.10.1
14
+
15
+ ### Patch Changes
16
+
17
+ - [#181731](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/181731)
18
+ [`910a3ef2381d3`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/910a3ef2381d3) -
19
+ Add isSSRPlaceholderEnabled prop for side and top nav v3
20
+
3
21
  ## 4.10.0
4
22
 
5
23
  ### Minor Changes
@@ -8,7 +8,6 @@ exports.default = exports.AtlassianNavigation = void 0;
8
8
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
9
  var _react = require("@emotion/react");
10
10
  var _analyticsNamespacedContext = require("@atlaskit/analytics-namespaced-context");
11
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
12
11
  var _colors = require("@atlaskit/theme/colors");
13
12
  var _constants = require("../../common/constants");
14
13
  var _theme = require("../../theme");
@@ -90,7 +89,9 @@ var AtlassianNavigation = exports.AtlassianNavigation = function AtlassianNaviga
90
89
  theme = _props$theme === void 0 ? _theme.defaultTheme : _props$theme,
91
90
  testId = props.testId,
92
91
  _props$isServer = props.isServer,
93
- isServer = _props$isServer === void 0 ? false : _props$isServer;
92
+ isServer = _props$isServer === void 0 ? false : _props$isServer,
93
+ _props$isSSRPlacehold = props.isSSRPlaceholderEnabled,
94
+ isSSRPlaceholderEnabled = _props$isSSRPlacehold === void 0 ? false : _props$isSSRPlacehold;
94
95
  return (0, _react.jsx)(_theme.ThemeProvider, {
95
96
  value: theme
96
97
  }, (0, _react.jsx)(_analyticsNamespacedContext.NavigationAnalyticsContext, {
@@ -102,9 +103,9 @@ var AtlassianNavigation = exports.AtlassianNavigation = function AtlassianNaviga
102
103
  "data-testid": testId && "".concat(testId, "-header"),
103
104
  role: "banner",
104
105
  "data-vc": "atlassian-navigation".concat(isServer ? '-ssr' : '')
105
- }, isServer && (0, _platformFeatureFlags.fg)('add_ssr_placeholder_replacements_to_nin_and_nav') && {
106
+ }, isServer && isSSRPlaceholderEnabled && {
106
107
  'data-ssr-placeholder': 'atlassian-navigation-placeholder'
107
- }, !isServer && (0, _platformFeatureFlags.fg)('add_ssr_placeholder_replacements_to_nin_and_nav') && {
108
+ }, !isServer && isSSRPlaceholderEnabled && {
108
109
  'data-ssr-placeholder-replace': 'atlassian-navigation-placeholder'
109
110
  }), (0, _react.jsx)("nav", {
110
111
  css: leftStyles,
@@ -26,6 +26,7 @@ var skeletonIconButtonStyles = (0, _react.css)({
26
26
  },
27
27
  // eslint-disable-next-line @atlaskit/design-system/no-nested-styles, @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
28
28
  '& > span': {
29
+ // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
29
30
  lineHeight: 'normal'
30
31
  },
31
32
  // eslint-disable-next-line @atlaskit/design-system/no-nested-styles, @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
@@ -37,6 +37,7 @@ var skeletonSwitcherButtonStyles = (0, _react.css)({
37
37
  },
38
38
  // eslint-disable-next-line @atlaskit/design-system/no-nested-styles, @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
39
39
  '& > span': {
40
+ // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
40
41
  lineHeight: 'normal'
41
42
  },
42
43
  // eslint-disable-next-line @atlaskit/design-system/no-nested-styles, @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
@@ -6,7 +6,6 @@ import _extends from "@babel/runtime/helpers/extends";
6
6
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
7
7
  import { css, jsx } from '@emotion/react';
8
8
  import { NavigationAnalyticsContext } from '@atlaskit/analytics-namespaced-context';
9
- import { fg } from '@atlaskit/platform-feature-flags';
10
9
  import { N30 } from '@atlaskit/theme/colors';
11
10
  import { HORIZONTAL_GLOBAL_NAV_HEIGHT } from '../../common/constants';
12
11
  import { defaultTheme, ThemeProvider } from '../../theme';
@@ -79,7 +78,8 @@ export const AtlassianNavigation = props => {
79
78
  moreLabel = '…',
80
79
  theme = defaultTheme,
81
80
  testId,
82
- isServer = false
81
+ isServer = false,
82
+ isSSRPlaceholderEnabled = false
83
83
  } = props;
84
84
  return jsx(ThemeProvider, {
85
85
  value: theme
@@ -92,9 +92,9 @@ export const AtlassianNavigation = props => {
92
92
  "data-testid": testId && `${testId}-header`,
93
93
  role: "banner",
94
94
  "data-vc": `atlassian-navigation${isServer ? '-ssr' : ''}`
95
- }, isServer && fg('add_ssr_placeholder_replacements_to_nin_and_nav') && {
95
+ }, isServer && isSSRPlaceholderEnabled && {
96
96
  'data-ssr-placeholder': 'atlassian-navigation-placeholder'
97
- }, !isServer && fg('add_ssr_placeholder_replacements_to_nin_and_nav') && {
97
+ }, !isServer && isSSRPlaceholderEnabled && {
98
98
  'data-ssr-placeholder-replace': 'atlassian-navigation-placeholder'
99
99
  }), jsx("nav", {
100
100
  css: leftStyles,
@@ -19,6 +19,7 @@ const skeletonIconButtonStyles = css({
19
19
  },
20
20
  // eslint-disable-next-line @atlaskit/design-system/no-nested-styles, @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
21
21
  '& > span': {
22
+ // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
22
23
  lineHeight: 'normal'
23
24
  },
24
25
  // eslint-disable-next-line @atlaskit/design-system/no-nested-styles, @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
@@ -29,6 +29,7 @@ const skeletonSwitcherButtonStyles = css({
29
29
  },
30
30
  // eslint-disable-next-line @atlaskit/design-system/no-nested-styles, @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
31
31
  '& > span': {
32
+ // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
32
33
  lineHeight: 'normal'
33
34
  },
34
35
  // eslint-disable-next-line @atlaskit/design-system/no-nested-styles, @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
@@ -6,7 +6,6 @@ import _extends from "@babel/runtime/helpers/extends";
6
6
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
7
7
  import { css, jsx } from '@emotion/react';
8
8
  import { NavigationAnalyticsContext } from '@atlaskit/analytics-namespaced-context';
9
- import { fg } from '@atlaskit/platform-feature-flags';
10
9
  import { N30 } from '@atlaskit/theme/colors';
11
10
  import { HORIZONTAL_GLOBAL_NAV_HEIGHT } from '../../common/constants';
12
11
  import { defaultTheme, ThemeProvider } from '../../theme';
@@ -82,7 +81,9 @@ export var AtlassianNavigation = function AtlassianNavigation(props) {
82
81
  theme = _props$theme === void 0 ? defaultTheme : _props$theme,
83
82
  testId = props.testId,
84
83
  _props$isServer = props.isServer,
85
- isServer = _props$isServer === void 0 ? false : _props$isServer;
84
+ isServer = _props$isServer === void 0 ? false : _props$isServer,
85
+ _props$isSSRPlacehold = props.isSSRPlaceholderEnabled,
86
+ isSSRPlaceholderEnabled = _props$isSSRPlacehold === void 0 ? false : _props$isSSRPlacehold;
86
87
  return jsx(ThemeProvider, {
87
88
  value: theme
88
89
  }, jsx(NavigationAnalyticsContext, {
@@ -94,9 +95,9 @@ export var AtlassianNavigation = function AtlassianNavigation(props) {
94
95
  "data-testid": testId && "".concat(testId, "-header"),
95
96
  role: "banner",
96
97
  "data-vc": "atlassian-navigation".concat(isServer ? '-ssr' : '')
97
- }, isServer && fg('add_ssr_placeholder_replacements_to_nin_and_nav') && {
98
+ }, isServer && isSSRPlaceholderEnabled && {
98
99
  'data-ssr-placeholder': 'atlassian-navigation-placeholder'
99
- }, !isServer && fg('add_ssr_placeholder_replacements_to_nin_and_nav') && {
100
+ }, !isServer && isSSRPlaceholderEnabled && {
100
101
  'data-ssr-placeholder-replace': 'atlassian-navigation-placeholder'
101
102
  }), jsx("nav", {
102
103
  css: leftStyles,
@@ -19,6 +19,7 @@ var skeletonIconButtonStyles = css({
19
19
  },
20
20
  // eslint-disable-next-line @atlaskit/design-system/no-nested-styles, @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
21
21
  '& > span': {
22
+ // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
22
23
  lineHeight: 'normal'
23
24
  },
24
25
  // eslint-disable-next-line @atlaskit/design-system/no-nested-styles, @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
@@ -29,6 +29,7 @@ var skeletonSwitcherButtonStyles = css({
29
29
  },
30
30
  // eslint-disable-next-line @atlaskit/design-system/no-nested-styles, @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
31
31
  '& > span': {
32
+ // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
32
33
  lineHeight: 'normal'
33
34
  },
34
35
  // eslint-disable-next-line @atlaskit/design-system/no-nested-styles, @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
@@ -72,6 +72,10 @@ export interface AtlassianNavigationProps {
72
72
  * Whether nav is rendered on the server.
73
73
  */
74
74
  isServer?: boolean;
75
+ /**
76
+ * Whether to enable SSR placeholder replacement.
77
+ */
78
+ isSSRPlaceholderEnabled?: boolean;
75
79
  }
76
80
  export interface NavigationSkeletonProps {
77
81
  /**
@@ -72,6 +72,10 @@ export interface AtlassianNavigationProps {
72
72
  * Whether nav is rendered on the server.
73
73
  */
74
74
  isServer?: boolean;
75
+ /**
76
+ * Whether to enable SSR placeholder replacement.
77
+ */
78
+ isSSRPlaceholderEnabled?: boolean;
75
79
  }
76
80
  export interface NavigationSkeletonProps {
77
81
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/atlassian-navigation",
3
- "version": "4.10.0",
3
+ "version": "4.10.2",
4
4
  "description": "A horizontal navigation component for Atlassian products.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -48,13 +48,13 @@
48
48
  "@atlaskit/analytics-namespaced-context": "^6.12.0",
49
49
  "@atlaskit/button": "^20.3.0",
50
50
  "@atlaskit/ds-lib": "^3.3.0",
51
- "@atlaskit/icon": "^23.1.0",
51
+ "@atlaskit/icon": "^23.2.0",
52
52
  "@atlaskit/logo": "*",
53
53
  "@atlaskit/platform-feature-flags": "^0.3.0",
54
54
  "@atlaskit/popup": "^1.30.0",
55
55
  "@atlaskit/primitives": "^13.3.0",
56
56
  "@atlaskit/theme": "^14.0.0",
57
- "@atlaskit/tokens": "^2.4.0",
57
+ "@atlaskit/tokens": "^2.5.0",
58
58
  "@atlaskit/tooltip": "^19.0.0",
59
59
  "@atlaskit/width-detector": "^4.3.0",
60
60
  "@babel/runtime": "^7.0.0",
@@ -107,9 +107,6 @@
107
107
  "platform-feature-flags": {
108
108
  "platform-component-visual-refresh": {
109
109
  "type": "boolean"
110
- },
111
- "add_ssr_placeholder_replacements_to_nin_and_nav": {
112
- "type": "boolean"
113
110
  }
114
111
  }
115
112
  }
package/tsconfig.json CHANGED
@@ -10,6 +10,5 @@
10
10
  "node_modules"
11
11
  ],
12
12
  "compilerOptions": {
13
- "baseUrl": "./"
14
13
  }
15
14
  }