@atlaskit/atlassian-navigation 2.3.3 → 2.3.5

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.
Files changed (140) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/cjs/common/constants.js +12 -4
  3. package/dist/cjs/common/styles.js +0 -4
  4. package/dist/cjs/components/AppSwitcher/index.js +4 -16
  5. package/dist/cjs/components/AtlassianNavigation/index.js +23 -28
  6. package/dist/cjs/components/AtlassianNavigation/skeleton.js +15 -24
  7. package/dist/cjs/components/BadgeContainer/index.js +6 -7
  8. package/dist/cjs/components/Create/index.js +12 -24
  9. package/dist/cjs/components/Create/skeleton.js +4 -11
  10. package/dist/cjs/components/Create/styles.js +2 -9
  11. package/dist/cjs/components/Help/index.js +4 -20
  12. package/dist/cjs/components/IconButton/index.js +5 -20
  13. package/dist/cjs/components/IconButton/skeleton.js +6 -16
  14. package/dist/cjs/components/IconButton/styles.js +2 -9
  15. package/dist/cjs/components/Notifications/index.js +3 -15
  16. package/dist/cjs/components/PrimaryButton/index.js +8 -22
  17. package/dist/cjs/components/PrimaryButton/skeleton.js +4 -7
  18. package/dist/cjs/components/PrimaryButton/styles.js +2 -9
  19. package/dist/cjs/components/PrimaryDropdownButton/index.js +2 -8
  20. package/dist/cjs/components/PrimaryItemsContainer/index.js +16 -28
  21. package/dist/cjs/components/PrimaryItemsContainer/skeleton.js +4 -8
  22. package/dist/cjs/components/ProductHome/custom-product-home.js +14 -30
  23. package/dist/cjs/components/ProductHome/index.js +0 -3
  24. package/dist/cjs/components/ProductHome/product-home.js +20 -36
  25. package/dist/cjs/components/ProductHome/skeleton.js +3 -12
  26. package/dist/cjs/components/ProductHome/utils.js +0 -4
  27. package/dist/cjs/components/Profile/index.js +3 -6
  28. package/dist/cjs/components/Profile/skeleton.js +0 -6
  29. package/dist/cjs/components/Search/index.js +23 -37
  30. package/dist/cjs/components/Search/skeleton.js +4 -11
  31. package/dist/cjs/components/Settings/index.js +1 -12
  32. package/dist/cjs/components/SignIn/index.js +3 -12
  33. package/dist/cjs/components/SignIn/skeleton.js +0 -6
  34. package/dist/cjs/components/SkeletonCreateButton/index.js +3 -6
  35. package/dist/cjs/components/SkeletonIconButton/index.js +3 -6
  36. package/dist/cjs/components/SkeletonPrimaryButton/index.js +7 -18
  37. package/dist/cjs/controllers/overflow/index.js +27 -56
  38. package/dist/cjs/index.js +0 -16
  39. package/dist/cjs/skeleton-help-button.js +2 -11
  40. package/dist/cjs/skeleton-notification-button.js +1 -7
  41. package/dist/cjs/skeleton-settings-button.js +1 -7
  42. package/dist/cjs/skeleton-switcher-button.js +1 -7
  43. package/dist/cjs/skeleton.js +0 -4
  44. package/dist/cjs/theme/default-theme.js +4 -8
  45. package/dist/cjs/theme/index.js +0 -5
  46. package/dist/cjs/theme/theme-generator.js +7 -21
  47. package/dist/cjs/theme/theme-helpers.js +2 -27
  48. package/dist/cjs/theme/theme-provider.js +1 -4
  49. package/dist/cjs/theme/themes.js +0 -4
  50. package/dist/cjs/theme/use-theme.js +0 -4
  51. package/dist/cjs/version.json +1 -1
  52. package/dist/es2019/common/constants.js +6 -1
  53. package/dist/es2019/components/AppSwitcher/index.js +3 -3
  54. package/dist/es2019/components/AtlassianNavigation/index.js +6 -4
  55. package/dist/es2019/components/AtlassianNavigation/skeleton.js +4 -3
  56. package/dist/es2019/components/BadgeContainer/index.js +3 -2
  57. package/dist/es2019/components/Create/index.js +5 -5
  58. package/dist/es2019/components/Create/skeleton.js +3 -2
  59. package/dist/es2019/components/Create/styles.js +4 -2
  60. package/dist/es2019/components/Help/index.js +1 -1
  61. package/dist/es2019/components/IconButton/index.js +2 -4
  62. package/dist/es2019/components/IconButton/skeleton.js +3 -2
  63. package/dist/es2019/components/IconButton/styles.js +4 -2
  64. package/dist/es2019/components/Notifications/index.js +1 -1
  65. package/dist/es2019/components/PrimaryButton/index.js +3 -5
  66. package/dist/es2019/components/PrimaryButton/skeleton.js +4 -2
  67. package/dist/es2019/components/PrimaryButton/styles.js +4 -2
  68. package/dist/es2019/components/PrimaryDropdownButton/index.js +1 -2
  69. package/dist/es2019/components/PrimaryItemsContainer/index.js +5 -4
  70. package/dist/es2019/components/PrimaryItemsContainer/skeleton.js +3 -2
  71. package/dist/es2019/components/ProductHome/custom-product-home.js +3 -7
  72. package/dist/es2019/components/ProductHome/product-home.js +3 -7
  73. package/dist/es2019/components/ProductHome/skeleton.js +4 -2
  74. package/dist/es2019/components/ProductHome/utils.js +0 -2
  75. package/dist/es2019/components/Profile/index.js +3 -3
  76. package/dist/es2019/components/Profile/skeleton.js +3 -2
  77. package/dist/es2019/components/Search/index.js +21 -13
  78. package/dist/es2019/components/Search/skeleton.js +3 -2
  79. package/dist/es2019/components/Settings/index.js +0 -1
  80. package/dist/es2019/components/SignIn/index.js +2 -3
  81. package/dist/es2019/components/SignIn/skeleton.js +3 -2
  82. package/dist/es2019/components/SkeletonCreateButton/index.js +1 -1
  83. package/dist/es2019/components/SkeletonIconButton/index.js +1 -1
  84. package/dist/es2019/components/SkeletonPrimaryButton/index.js +3 -2
  85. package/dist/es2019/controllers/overflow/index.js +15 -24
  86. package/dist/es2019/skeleton-help-button.js +0 -1
  87. package/dist/es2019/skeleton-notification-button.js +0 -1
  88. package/dist/es2019/skeleton-settings-button.js +0 -1
  89. package/dist/es2019/skeleton-switcher-button.js +0 -1
  90. package/dist/es2019/theme/default-theme.js +4 -5
  91. package/dist/es2019/theme/theme-generator.js +6 -8
  92. package/dist/es2019/theme/theme-helpers.js +4 -11
  93. package/dist/es2019/theme/theme-provider.js +4 -3
  94. package/dist/es2019/version.json +1 -1
  95. package/dist/esm/common/constants.js +6 -1
  96. package/dist/esm/components/AppSwitcher/index.js +4 -5
  97. package/dist/esm/components/AtlassianNavigation/index.js +22 -20
  98. package/dist/esm/components/AtlassianNavigation/skeleton.js +14 -13
  99. package/dist/esm/components/BadgeContainer/index.js +5 -4
  100. package/dist/esm/components/Create/index.js +11 -12
  101. package/dist/esm/components/Create/skeleton.js +3 -3
  102. package/dist/esm/components/Create/styles.js +2 -6
  103. package/dist/esm/components/Help/index.js +4 -6
  104. package/dist/esm/components/IconButton/index.js +5 -8
  105. package/dist/esm/components/IconButton/skeleton.js +6 -10
  106. package/dist/esm/components/IconButton/styles.js +2 -6
  107. package/dist/esm/components/Notifications/index.js +3 -4
  108. package/dist/esm/components/PrimaryButton/index.js +8 -12
  109. package/dist/esm/components/PrimaryButton/skeleton.js +4 -2
  110. package/dist/esm/components/PrimaryButton/styles.js +2 -6
  111. package/dist/esm/components/PrimaryDropdownButton/index.js +1 -2
  112. package/dist/esm/components/PrimaryItemsContainer/index.js +15 -17
  113. package/dist/esm/components/PrimaryItemsContainer/skeleton.js +3 -2
  114. package/dist/esm/components/ProductHome/custom-product-home.js +14 -21
  115. package/dist/esm/components/ProductHome/product-home.js +20 -27
  116. package/dist/esm/components/ProductHome/skeleton.js +4 -7
  117. package/dist/esm/components/ProductHome/utils.js +0 -2
  118. package/dist/esm/components/Profile/index.js +3 -3
  119. package/dist/esm/components/Profile/skeleton.js +3 -2
  120. package/dist/esm/components/Search/index.js +24 -27
  121. package/dist/esm/components/Search/skeleton.js +3 -3
  122. package/dist/esm/components/Settings/index.js +1 -3
  123. package/dist/esm/components/SignIn/index.js +3 -5
  124. package/dist/esm/components/SignIn/skeleton.js +3 -2
  125. package/dist/esm/components/SkeletonCreateButton/index.js +2 -2
  126. package/dist/esm/components/SkeletonIconButton/index.js +2 -2
  127. package/dist/esm/components/SkeletonPrimaryButton/index.js +7 -13
  128. package/dist/esm/controllers/overflow/index.js +27 -40
  129. package/dist/esm/skeleton-help-button.js +2 -5
  130. package/dist/esm/skeleton-notification-button.js +1 -2
  131. package/dist/esm/skeleton-settings-button.js +1 -2
  132. package/dist/esm/skeleton-switcher-button.js +1 -2
  133. package/dist/esm/theme/default-theme.js +4 -5
  134. package/dist/esm/theme/theme-generator.js +7 -14
  135. package/dist/esm/theme/theme-helpers.js +2 -15
  136. package/dist/esm/theme/theme-provider.js +4 -3
  137. package/dist/esm/version.json +1 -1
  138. package/dist/types/common/constants.d.ts +5 -0
  139. package/package.json +3 -3
  140. package/report.api.md +14 -1
@@ -1,98 +1,73 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.hexToRGBA = exports.getContrastColor = exports.getBoxShadow = exports.generateTextColor = exports.convertHexShorthand = void 0;
9
-
10
8
  var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
11
-
12
9
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
13
-
14
10
  var _chromatism = _interopRequireDefault(require("chromatism"));
15
-
16
11
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
17
-
18
12
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
19
-
20
13
  var hexToRGBA = function hexToRGBA(hex) {
21
14
  var opacity = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
22
-
23
15
  var rgba = _objectSpread(_objectSpread({}, _chromatism.default.convert(hex).rgb), {
24
16
  a: opacity
25
17
  });
26
-
27
18
  return "rgba(".concat(Object.values(rgba).join(', '), ")");
28
19
  };
29
-
30
20
  exports.hexToRGBA = hexToRGBA;
31
-
32
21
  var getBoxShadow = function getBoxShadow(color) {
33
22
  return "0 0 0 2px ".concat(color);
34
23
  };
35
-
36
24
  exports.getBoxShadow = getBoxShadow;
37
25
  var hex = '[a-z0-9]';
38
26
  var shortHandHexColorPattern = new RegExp("#(".concat(hex, ")(").concat(hex, ")(").concat(hex, ")"), 'i');
39
-
40
27
  var repeat = function repeat(str, times) {
41
28
  return (0, _toConsumableArray2.default)(Array(times)).map(function () {
42
29
  return str;
43
30
  }).join('');
44
31
  };
45
-
46
32
  var isShortHexColor = function isShortHexColor(color) {
47
33
  return color && color.length === 4;
48
34
  };
49
-
50
35
  var completeHexColor = function completeHexColor(colors) {
51
36
  var hex = colors.map(function (color) {
52
37
  return repeat(color, 2);
53
38
  }).join('');
54
39
  return "#".concat(hex);
55
40
  };
56
-
57
41
  var completeTriplet = function completeTriplet(colors) {
58
42
  return "#".concat(repeat(colors[1], 6));
59
43
  };
60
-
61
44
  var isTriplet = function isTriplet(colors) {
62
45
  return colors[0] === colors[1] && colors[1] === colors[2];
63
46
  };
64
-
65
47
  var convertHexShorthand = function convertHexShorthand(color) {
66
48
  if (isShortHexColor(color)) {
67
49
  // when color = '#ccc', matches is structured as ['#ccc', 'c', 'c', 'c', ...]
68
50
  var matches = color.match(shortHandHexColorPattern);
69
-
70
51
  if (matches) {
71
52
  var colors = matches.slice(1, 4);
72
-
73
53
  if (isTriplet(colors)) {
74
54
  return completeTriplet(colors);
75
55
  } else {
76
56
  return completeHexColor(colors);
77
57
  }
78
58
  }
79
- } // return the color as is when it's not hex color shorthand
80
-
59
+ }
81
60
 
61
+ // return the color as is when it's not hex color shorthand
82
62
  return color;
83
63
  };
84
-
85
64
  exports.convertHexShorthand = convertHexShorthand;
86
-
87
65
  var generateTextColor = function generateTextColor(color) {
88
66
  var converted = convertHexShorthand(color);
89
67
  return _chromatism.default.contrastRatio(converted).hex;
90
68
  };
91
-
92
69
  exports.generateTextColor = generateTextColor;
93
-
94
70
  var getContrastColor = function getContrastColor(contrastValue, opacityValue, color) {
95
71
  return hexToRGBA(_chromatism.default.contrast(contrastValue, color).hex, opacityValue);
96
72
  };
97
-
98
73
  exports.getContrastColor = getContrastColor;
@@ -4,20 +4,17 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.ThemeProvider = exports.ThemeContext = void 0;
7
-
8
7
  var _react = require("react");
9
-
10
8
  var _themes = require("./themes");
11
-
12
9
  // Internal only
13
10
  // eslint-disable-next-line @repo/internal/react/require-jsdoc
14
11
  var ThemeContext = /*#__PURE__*/(0, _react.createContext)(_themes.defaultTheme);
12
+
15
13
  /**
16
14
  * __Theme provider__
17
15
  *
18
16
  * A provider for the theme context used by all navigation components.
19
17
  */
20
-
21
18
  exports.ThemeContext = ThemeContext;
22
19
  var ThemeProvider = ThemeContext.Provider;
23
20
  exports.ThemeProvider = ThemeProvider;
@@ -4,13 +4,9 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.defaultTheme = exports.atlassianTheme = void 0;
7
-
8
7
  var _colors = require("@atlaskit/theme/colors");
9
-
10
8
  var _defaultTheme = require("./default-theme");
11
-
12
9
  var _themeGenerator = require("./theme-generator");
13
-
14
10
  var atlassianTheme = (0, _themeGenerator.generateTheme)({
15
11
  name: _defaultTheme.DEFAULT_THEME_NAME,
16
12
  // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
@@ -4,13 +4,9 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.useTheme = void 0;
7
-
8
7
  var _react = require("react");
9
-
10
8
  var _themeProvider = require("./theme-provider");
11
-
12
9
  var useTheme = function useTheme() {
13
10
  return (0, _react.useContext)(_themeProvider.ThemeContext);
14
11
  };
15
-
16
12
  exports.useTheme = useTheme;
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/atlassian-navigation",
3
- "version": "2.3.3",
3
+ "version": "2.3.5",
4
4
  "sideEffects": false
5
5
  }
@@ -4,4 +4,9 @@ export const buttonHeight = gridSize * 4;
4
4
  export const fontSize = getFontSize();
5
5
  export const HORIZONTAL_GLOBAL_NAV_HEIGHT = 56;
6
6
  export const PRODUCT_HOME_BREAKPOINT = 1280;
7
- export const CREATE_BREAKPOINT = 1130;
7
+ export const CREATE_BREAKPOINT = 1130;
8
+ export const varSearchFocusBorderColor = '--ds--ans--fbc';
9
+ export const varSearchHoverBackgroundColor = '--ds--ans--hbgc';
10
+ export const varSearchBackgroundColor = '--ds--ans--bgc';
11
+ export const varSearchColor = '--ds--ans--c';
12
+ export const varSearchBorderColor = '--ds--ans--bc';
@@ -2,7 +2,6 @@ import _extends from "@babel/runtime/helpers/extends";
2
2
  import React, { forwardRef } from 'react';
3
3
  import AppSwitcherIcon from '@atlaskit/icon/glyph/app-switcher';
4
4
  import { IconButton } from '../IconButton';
5
-
6
5
  /**
7
6
  * _App switcher__
8
7
  *
@@ -24,7 +23,8 @@ export const AppSwitcher = /*#__PURE__*/forwardRef((props, ref) => {
24
23
  tooltip: tooltip,
25
24
  ref: ref
26
25
  }, iconButtonProps));
27
- }); // exists only to extract props
28
- // eslint-disable-next-line @repo/internal/react/use-noop
26
+ });
29
27
 
28
+ // exists only to extract props
29
+ // eslint-disable-next-line @repo/internal/react/use-noop
30
30
  export default (props => {});
@@ -16,7 +16,7 @@ const containerStyles = css({
16
16
  justifyContent: 'space-between',
17
17
  flexShrink: 0,
18
18
  // eslint-disable-next-line @repo/internal/styles/no-nested-styles
19
- '[data-theme="light"] &, [data-theme="dark"] &': {
19
+ '[data-color-mode="light"] &, [data-color-mode="dark"] &': {
20
20
  // eslint-disable-next-line @atlaskit/design-system/no-unsafe-design-token-usage
21
21
  borderBottom: `1px solid ${"var(--ds-border, #091E4224)"}`,
22
22
  // TODO: (DSP-2087) Remove the below once tokens have launched
@@ -32,7 +32,8 @@ const containerStyles = css({
32
32
  right: 0,
33
33
  left: 0,
34
34
  // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
35
- background: `linear-gradient(180deg, ${N40A} 0, ${N40A} 1px, ${N30A} 1px, ${hexToRGBA( // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
35
+ background: `linear-gradient(180deg, ${N40A} 0, ${N40A} 1px, ${N30A} 1px, ${hexToRGBA(
36
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
36
37
  N900, 0)} 4px)`,
37
38
  content: '""'
38
39
  }
@@ -64,6 +65,7 @@ const analyticsData = {
64
65
  },
65
66
  componentName: 'atlassianNavigation'
66
67
  };
68
+
67
69
  /**
68
70
  * __Atlassian navigation__
69
71
  *
@@ -72,7 +74,6 @@ const analyticsData = {
72
74
  * - [Examples](https://atlassian.design/components/atlassian-navigation/examples)
73
75
  * - [Code](https://atlassian.design/components/atlassian-navigation/examples)
74
76
  */
75
-
76
77
  export const AtlassianNavigation = props => {
77
78
  const {
78
79
  label: label,
@@ -106,7 +107,8 @@ export const AtlassianNavigation = props => {
106
107
  testId: testId,
107
108
  moreLabel: moreLabel,
108
109
  items: primaryItems,
109
- create: create // eslint-disable-next-line @repo/internal/react/no-unsafe-overrides
110
+ create: create
111
+ // eslint-disable-next-line @repo/internal/react/no-unsafe-overrides
110
112
  ,
111
113
  theme: theme
112
114
  })), jsx("div", {
@@ -19,7 +19,7 @@ const containerStyles = css({
19
19
  justifyContent: 'space-between',
20
20
  flexShrink: 0,
21
21
  // eslint-disable-next-line @repo/internal/styles/no-nested-styles
22
- '[data-theme="light"] &, [data-theme="dark"] &': {
22
+ '[data-color-mode="light"] &, [data-color-mode="dark"] &': {
23
23
  // eslint-disable-next-line @atlaskit/design-system/no-unsafe-design-token-usage
24
24
  borderBottom: `1px solid ${"var(--ds-border, #091E4224)"}`,
25
25
  // TODO: (DSP-2087) Remove the below once tokens have launched
@@ -35,7 +35,8 @@ const containerStyles = css({
35
35
  right: 0,
36
36
  left: 0,
37
37
  // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
38
- background: `linear-gradient(180deg, ${N40A} 0, ${N40A} 1px, ${N30A} 1px, ${hexToRGBA( // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
38
+ background: `linear-gradient(180deg, ${N40A} 0, ${N40A} 1px, ${N30A} 1px, ${hexToRGBA(
39
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
39
40
  N900, 0)} 4px)`,
40
41
  content: '""'
41
42
  }
@@ -61,6 +62,7 @@ const rightStyles = css({
61
62
  flexShrink: 0
62
63
  }
63
64
  });
65
+
64
66
  /**
65
67
  * __Navigation skeleton__
66
68
  *
@@ -74,7 +76,6 @@ const rightStyles = css({
74
76
  * - [Examples](https://atlassian.design/components/atlassian-navigation/examples#skeleton-loader)
75
77
  * - [Code](https://atlassian.design/components/{packageName}/code)
76
78
  */
77
-
78
79
  export const NavigationSkeleton = ({
79
80
  primaryItemsCount = 4,
80
81
  secondaryItemsCount = 4,
@@ -8,9 +8,10 @@ const badgeContainerStyles = css({
8
8
  });
9
9
  const containerStyles = css({
10
10
  position: 'relative'
11
- }); // Not exported to consumers
12
- // eslint-disable-next-line @repo/internal/react/require-jsdoc
11
+ });
13
12
 
13
+ // Not exported to consumers
14
+ // eslint-disable-next-line @repo/internal/react/require-jsdoc
14
15
  export const BadgeContainer = props => {
15
16
  const {
16
17
  id: badgeId,
@@ -30,7 +30,6 @@ const wrapperStyles = css({
30
30
  marginLeft: gridSize * 1.5
31
31
  }
32
32
  });
33
-
34
33
  const TooltipSwitch = ({
35
34
  buttonTooltip,
36
35
  children
@@ -38,6 +37,7 @@ const TooltipSwitch = ({
38
37
  content: buttonTooltip,
39
38
  hideTooltipOnClick: true
40
39
  }, children) : jsx(Fragment, null, children);
40
+
41
41
  /**
42
42
  * _Create__
43
43
  *
@@ -47,8 +47,6 @@ const TooltipSwitch = ({
47
47
  * - [Examples](https://atlassian.design/components/atlassian-navigation/examples#create)
48
48
  * - [Code](https://atlassian.design/components/atlassian-navigation/code)
49
49
  */
50
-
51
-
52
50
  export const Create = ({
53
51
  onClick,
54
52
  href,
@@ -66,7 +64,8 @@ export const Create = ({
66
64
  }, jsx(Button, {
67
65
  id: "createGlobalItem",
68
66
  onClick: onClick,
69
- href: href // eslint-disable-next-line @repo/internal/react/no-unsafe-overrides
67
+ href: href
68
+ // eslint-disable-next-line @repo/internal/react/no-unsafe-overrides
70
69
  ,
71
70
  theme: getCreateButtonTheme(theme),
72
71
  testId: testId && `${testId}-button`,
@@ -79,7 +78,8 @@ export const Create = ({
79
78
  }),
80
79
  onClick: onClick,
81
80
  href: href,
82
- tooltip: iconButtonTooltip // eslint-disable-next-line @repo/internal/react/no-unsafe-overrides
81
+ tooltip: iconButtonTooltip
82
+ // eslint-disable-next-line @repo/internal/react/no-unsafe-overrides
83
83
  ,
84
84
  theme: getCreateButtonTheme(theme),
85
85
  "aria-label": text,
@@ -17,9 +17,10 @@ const mobileStyles = css({
17
17
  [`@media (max-width: ${CREATE_BREAKPOINT - 1}px)`]: {
18
18
  display: 'none !important'
19
19
  }
20
- }); // Not exported to consumers, only used in NavigationSkeleton
21
- // eslint-disable-next-line @repo/internal/react/require-jsdoc
20
+ });
22
21
 
22
+ // Not exported to consumers, only used in NavigationSkeleton
23
+ // eslint-disable-next-line @repo/internal/react/require-jsdoc
23
24
  export const CreateSkeleton = () => {
24
25
  const theme = useTheme();
25
26
  return jsx(Fragment, null, jsx("div", {
@@ -8,7 +8,8 @@ export const getCreateButtonTheme = ({
8
8
  spinnerStyles
9
9
  } = current(props);
10
10
  return {
11
- buttonStyles: { ...buttonStyles,
11
+ buttonStyles: {
12
+ ...buttonStyles,
12
13
  ...create.default,
13
14
  margin: 0,
14
15
  fontWeight: 500,
@@ -19,7 +20,8 @@ export const getCreateButtonTheme = ({
19
20
  // '&&' is required to add more CSS specificity
20
21
  // && it not a valid CSSObject property
21
22
  // @ts-ignore
22
- '&&': { ...(props.state === 'active' && create.active)
23
+ '&&': {
24
+ ...(props.state === 'active' && create.active)
23
25
  }
24
26
  },
25
27
  spinnerStyles
@@ -5,6 +5,7 @@ import { useTheme } from '../../theme';
5
5
  import { BadgeContainer } from '../BadgeContainer';
6
6
  import { IconButton } from '../IconButton';
7
7
  const HELP_NOTIFICATION_BADGE_ID = 'atlassian-navigation-help-notification-count';
8
+
8
9
  /**
9
10
  * __Help__
10
11
  *
@@ -13,7 +14,6 @@ const HELP_NOTIFICATION_BADGE_ID = 'atlassian-navigation-help-notification-count
13
14
  * - [Examples](https://atlassian.design/components/atlassian-navigation/examples#help)
14
15
  * - [Code](https://atlassian.design/components/atlassian-navigation/code)
15
16
  */
16
-
17
17
  export const Help = /*#__PURE__*/forwardRef((props, ref) => {
18
18
  const {
19
19
  badge,
@@ -4,7 +4,6 @@ import Button from '@atlaskit/button/custom-theme-button';
4
4
  import Tooltip from '@atlaskit/tooltip';
5
5
  import { useTheme } from '../../theme';
6
6
  import { getIconButtonTheme } from './styles';
7
-
8
7
  /**
9
8
  * __Icon button__
10
9
  *
@@ -26,17 +25,16 @@ export const IconButton = /*#__PURE__*/forwardRef((props, ref) => {
26
25
  appearance: "primary",
27
26
  testId: testId,
28
27
  iconBefore: icon,
29
- ref: ref // eslint-disable-next-line @repo/internal/react/no-unsafe-overrides
28
+ ref: ref
29
+ // eslint-disable-next-line @repo/internal/react/no-unsafe-overrides
30
30
  ,
31
31
  theme: getIconButtonTheme(theme)
32
32
  }, buttonProps));
33
-
34
33
  if (tooltip) {
35
34
  return /*#__PURE__*/React.createElement(Tooltip, {
36
35
  content: tooltip,
37
36
  hideTooltipOnClick: true
38
37
  }, button);
39
38
  }
40
-
41
39
  return button;
42
40
  });
@@ -6,9 +6,10 @@ const buttonHeight = gridSize * 4;
6
6
  const skeletonStyles = css({
7
7
  borderRadius: '50%',
8
8
  opacity: 0.15
9
- }); // Not exported to consumers, only used in NavigationSkeleton
10
- // eslint-disable-next-line @repo/internal/react/require-jsdoc
9
+ });
11
10
 
11
+ // Not exported to consumers, only used in NavigationSkeleton
12
+ // eslint-disable-next-line @repo/internal/react/require-jsdoc
12
13
  export const IconButtonSkeleton = ({
13
14
  className,
14
15
  marginLeft,
@@ -8,7 +8,8 @@ export const getIconButtonTheme = ({
8
8
  spinnerStyles
9
9
  } = current(props);
10
10
  return {
11
- buttonStyles: { ...buttonStyles,
11
+ buttonStyles: {
12
+ ...buttonStyles,
12
13
  borderRadius: '100%',
13
14
  display: 'flex',
14
15
  margin: '0 2px',
@@ -23,7 +24,8 @@ export const getIconButtonTheme = ({
23
24
  // '&&' is required to add more CSS specificity
24
25
  // && it not a valid CSSObject property
25
26
  // @ts-ignore
26
- '&&': { ...(props.state === 'active' && iconButton.active)
27
+ '&&': {
28
+ ...(props.state === 'active' && iconButton.active)
27
29
  },
28
30
  ...(props.state === 'selected' && iconButton.selected),
29
31
  '> span': {
@@ -4,6 +4,7 @@ import NotificationIcon from '@atlaskit/icon/glyph/notification';
4
4
  import { BadgeContainer } from '../BadgeContainer';
5
5
  import { IconButton } from '../IconButton';
6
6
  const NOTIFICATIONS_BADGE_ID = 'atlassian-navigation-notification-count';
7
+
7
8
  /**
8
9
  * __Notifications__
9
10
  *
@@ -13,7 +14,6 @@ const NOTIFICATIONS_BADGE_ID = 'atlassian-navigation-notification-count';
13
14
  * - [Examples](https://atlassian.design/components/atlassian-navigation/examples#notifications)
14
15
  * - [Code](https://atlassian.design/components/atlassian-navigation/code)
15
16
  */
16
-
17
17
  export const Notifications = /*#__PURE__*/forwardRef((props, ref) => {
18
18
  const {
19
19
  badge,
@@ -1,5 +1,4 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
-
3
2
  /** @jsx jsx */
4
3
  import { forwardRef } from 'react';
5
4
  import { css, jsx } from '@emotion/react';
@@ -35,6 +34,7 @@ const buttonHighlightedStyles = css({
35
34
  content: '""'
36
35
  }
37
36
  });
37
+
38
38
  /**
39
39
  * __Primary button__
40
40
  *
@@ -44,7 +44,6 @@ const buttonHighlightedStyles = css({
44
44
  * - [Examples](https://atlassian.design/components/atlassian-navigation/examples#dropdown-menu)
45
45
  * - [Code](https://atlassian.design/components/atlassian-navigation/code)
46
46
  */
47
-
48
47
  export const PrimaryButton = /*#__PURE__*/forwardRef((props, ref) => {
49
48
  const {
50
49
  children,
@@ -65,18 +64,17 @@ export const PrimaryButton = /*#__PURE__*/forwardRef((props, ref) => {
65
64
  appearance: "primary",
66
65
  testId: testId,
67
66
  ref: ref,
68
- isSelected: isSelected // eslint-disable-next-line @repo/internal/react/no-unsafe-overrides
67
+ isSelected: isSelected
68
+ // eslint-disable-next-line @repo/internal/react/no-unsafe-overrides
69
69
  ,
70
70
  theme: getPrimaryButtonTheme(theme)
71
71
  }, buttonProps), children));
72
-
73
72
  if (tooltip) {
74
73
  return jsx(Tooltip, {
75
74
  content: tooltip,
76
75
  hideTooltipOnClick: true
77
76
  }, button);
78
77
  }
79
-
80
78
  return button;
81
79
  });
82
80
  export default PrimaryButton;
@@ -1,4 +1,5 @@
1
1
  /** @jsx jsx */
2
+
2
3
  import { css, jsx } from '@emotion/react';
3
4
  import { buttonHeight, gridSize } from '../../common/constants';
4
5
  import { useTheme } from '../../theme';
@@ -9,9 +10,10 @@ const skeletonStyles = css({
9
10
  height: `${buttonHeight - paddingAll * 2.5}px`,
10
11
  borderRadius: `${gridSize / 2}px`,
11
12
  opacity: 0.15
12
- }); // Not exported to consumers, only used in NavigationSkeleton
13
- // eslint-disable-next-line @repo/internal/react/require-jsdoc
13
+ });
14
14
 
15
+ // Not exported to consumers, only used in NavigationSkeleton
16
+ // eslint-disable-next-line @repo/internal/react/require-jsdoc
15
17
  export const PrimaryButtonSkeleton = props => {
16
18
  const theme = useTheme();
17
19
  return jsx("div", {
@@ -8,7 +8,8 @@ export const getPrimaryButtonTheme = ({
8
8
  spinnerStyles
9
9
  } = current(props);
10
10
  return {
11
- buttonStyles: { ...buttonStyles,
11
+ buttonStyles: {
12
+ ...buttonStyles,
12
13
  ...primaryButton.default,
13
14
  ...(props.isSelected && primaryButton.selected),
14
15
  fontWeight: 500,
@@ -22,7 +23,8 @@ export const getPrimaryButtonTheme = ({
22
23
  // '&&' is required to add more CSS specificity
23
24
  // && it not a valid CSSObject property
24
25
  // @ts-ignore
25
- '&&': { ...(props.state === 'active' && primaryButton.active)
26
+ '&&': {
27
+ ...(props.state === 'active' && primaryButton.active)
26
28
  }
27
29
  },
28
30
  spinnerStyles
@@ -1,5 +1,4 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
-
3
2
  /** @jsx jsx */
4
3
  import { forwardRef } from 'react';
5
4
  import { css, jsx } from '@emotion/react';
@@ -10,6 +9,7 @@ const chevronIconStyles = css({
10
9
  marginLeft: '-8px',
11
10
  opacity: 0.51
12
11
  });
12
+
13
13
  /**
14
14
  * __Primary dropdown button__
15
15
  *
@@ -19,7 +19,6 @@ const chevronIconStyles = css({
19
19
  * - [Examples](https://atlassian.design/components/atlassian-navigation/examples#button)
20
20
  * - [Code](https://atlassian.design/components/atlassian-navigation/code)
21
21
  */
22
-
23
22
  export const PrimaryDropdownButton = /*#__PURE__*/forwardRef((props, ref) => {
24
23
  return jsx(PrimaryButton, _extends({
25
24
  iconAfter: jsx("span", {
@@ -1,5 +1,4 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
-
3
2
  /** @jsx jsx */
4
3
  import { useCallback, useState } from 'react';
5
4
  import { css, jsx } from '@emotion/react';
@@ -28,9 +27,10 @@ const widthObserverContainerStyles = css({
28
27
  margin: '0px',
29
28
  position: 'relative',
30
29
  flexShrink: 1
31
- }); // Internal only
32
- // eslint-disable-next-line @repo/internal/react/require-jsdoc
30
+ });
33
31
 
32
+ // Internal only
33
+ // eslint-disable-next-line @repo/internal/react/require-jsdoc
34
34
  export const PrimaryItemsContainer = ({
35
35
  moreLabel,
36
36
  items,
@@ -62,7 +62,8 @@ export const PrimaryItemsContainer = ({
62
62
  isVisible: false,
63
63
  openOverflowMenu: openOverflowMenu,
64
64
  closeOverflowMenu: onMoreClose
65
- }, overflowItems), // Overflow items has an unstable reference - so we will only recalculate
65
+ }, overflowItems),
66
+ // Overflow items has an unstable reference - so we will only recalculate
66
67
  // content if `overflowItems` length changes.
67
68
  // eslint-disable-next-line react-hooks/exhaustive-deps
68
69
  [overflowItems.length, openOverflowMenu, onMoreClose]);
@@ -6,9 +6,10 @@ import { PrimaryButtonSkeleton } from '../PrimaryButton/skeleton';
6
6
  const primaryButtonSkeletonStyles = css({
7
7
  marginRight: gridSize * 1.5,
8
8
  marginLeft: gridSize * 1.5
9
- }); // Internal only
10
- // eslint-disable-next-line @repo/internal/react/require-jsdoc
9
+ });
11
10
 
11
+ // Internal only
12
+ // eslint-disable-next-line @repo/internal/react/require-jsdoc
12
13
  export const PrimaryItemsContainerSkeleton = ({
13
14
  count
14
15
  }) => jsx(Fragment, null, Array.from({
@@ -1,5 +1,4 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
-
3
2
  /** @jsx jsx */
4
3
  import { Fragment } from 'react';
5
4
  import { css, jsx } from '@emotion/react';
@@ -87,6 +86,7 @@ const siteTitleStyles = css({
87
86
  paddingRight: gridSize * 2,
88
87
  alignItems: 'center'
89
88
  });
89
+
90
90
  /**
91
91
  * __Custom product home__
92
92
  *
@@ -95,7 +95,6 @@ const siteTitleStyles = css({
95
95
  * - [Examples](https://atlassian.design/components/atlassian-navigation/examples#custom-product-home)
96
96
  * - [Code](https://atlassian.design/components/atlassian-navigation/code)
97
97
  */
98
-
99
98
  const CustomProductHome = props => {
100
99
  const {
101
100
  iconAlt,
@@ -113,12 +112,10 @@ const CustomProductHome = props => {
113
112
  const theme = useTheme();
114
113
  const primaryButton = theme.mode.primaryButton;
115
114
  const Tag = getTag(onClick, href);
116
-
117
115
  const preventFocusRing = event => {
118
116
  event.preventDefault();
119
117
  onMouseDown && onMouseDown(event);
120
118
  };
121
-
122
119
  const productHomeButtonDynamicStyles = {
123
120
  [VAR_PRODUCT_HOME_COLOR_ACTIVE]: primaryButton.active.color,
124
121
  [VAR_PRODUCT_HOME_BACKGROUND_COLOR_ACTIVE]: primaryButton.active.backgroundColor,
@@ -136,8 +133,8 @@ const CustomProductHome = props => {
136
133
  css: productHomeButtonStyles,
137
134
  onClick: onClick,
138
135
  onMouseDown: preventFocusRing,
139
- "data-testid": testId && `${testId}-container` // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
140
-
136
+ "data-testid": testId && `${testId}-container`
137
+ // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
141
138
  }, rest), logoUrl && jsx("img", {
142
139
  style: {
143
140
  maxWidth: logoMaxWidth
@@ -162,5 +159,4 @@ const CustomProductHome = props => {
162
159
  "data-testid": testId && `${testId}-site-title`
163
160
  }, siteTitle));
164
161
  };
165
-
166
162
  export default CustomProductHome;