@atlaskit/atlassian-navigation 2.3.4 → 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 (135) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/cjs/common/constants.js +0 -2
  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 +12 -29
  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 +0 -3
  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/components/AppSwitcher/index.js +3 -3
  53. package/dist/es2019/components/AtlassianNavigation/index.js +6 -4
  54. package/dist/es2019/components/AtlassianNavigation/skeleton.js +4 -3
  55. package/dist/es2019/components/BadgeContainer/index.js +3 -2
  56. package/dist/es2019/components/Create/index.js +5 -5
  57. package/dist/es2019/components/Create/skeleton.js +3 -2
  58. package/dist/es2019/components/Create/styles.js +4 -2
  59. package/dist/es2019/components/Help/index.js +1 -1
  60. package/dist/es2019/components/IconButton/index.js +2 -4
  61. package/dist/es2019/components/IconButton/skeleton.js +3 -2
  62. package/dist/es2019/components/IconButton/styles.js +4 -2
  63. package/dist/es2019/components/Notifications/index.js +1 -1
  64. package/dist/es2019/components/PrimaryButton/index.js +3 -5
  65. package/dist/es2019/components/PrimaryButton/skeleton.js +4 -2
  66. package/dist/es2019/components/PrimaryButton/styles.js +4 -2
  67. package/dist/es2019/components/PrimaryDropdownButton/index.js +1 -2
  68. package/dist/es2019/components/PrimaryItemsContainer/index.js +5 -4
  69. package/dist/es2019/components/PrimaryItemsContainer/skeleton.js +3 -2
  70. package/dist/es2019/components/ProductHome/custom-product-home.js +3 -7
  71. package/dist/es2019/components/ProductHome/product-home.js +3 -7
  72. package/dist/es2019/components/ProductHome/skeleton.js +4 -2
  73. package/dist/es2019/components/ProductHome/utils.js +0 -2
  74. package/dist/es2019/components/Profile/index.js +3 -3
  75. package/dist/es2019/components/Profile/skeleton.js +3 -2
  76. package/dist/es2019/components/Search/index.js +5 -10
  77. package/dist/es2019/components/Search/skeleton.js +3 -2
  78. package/dist/es2019/components/Settings/index.js +0 -1
  79. package/dist/es2019/components/SignIn/index.js +2 -3
  80. package/dist/es2019/components/SignIn/skeleton.js +3 -2
  81. package/dist/es2019/components/SkeletonCreateButton/index.js +1 -1
  82. package/dist/es2019/components/SkeletonIconButton/index.js +1 -1
  83. package/dist/es2019/components/SkeletonPrimaryButton/index.js +3 -2
  84. package/dist/es2019/controllers/overflow/index.js +15 -24
  85. package/dist/es2019/skeleton-help-button.js +0 -1
  86. package/dist/es2019/skeleton-notification-button.js +0 -1
  87. package/dist/es2019/skeleton-settings-button.js +0 -1
  88. package/dist/es2019/skeleton-switcher-button.js +0 -1
  89. package/dist/es2019/theme/theme-generator.js +6 -8
  90. package/dist/es2019/theme/theme-helpers.js +4 -11
  91. package/dist/es2019/theme/theme-provider.js +4 -3
  92. package/dist/es2019/version.json +1 -1
  93. package/dist/esm/components/AppSwitcher/index.js +4 -5
  94. package/dist/esm/components/AtlassianNavigation/index.js +22 -20
  95. package/dist/esm/components/AtlassianNavigation/skeleton.js +14 -13
  96. package/dist/esm/components/BadgeContainer/index.js +5 -4
  97. package/dist/esm/components/Create/index.js +11 -12
  98. package/dist/esm/components/Create/skeleton.js +3 -3
  99. package/dist/esm/components/Create/styles.js +2 -6
  100. package/dist/esm/components/Help/index.js +4 -6
  101. package/dist/esm/components/IconButton/index.js +5 -8
  102. package/dist/esm/components/IconButton/skeleton.js +6 -10
  103. package/dist/esm/components/IconButton/styles.js +2 -6
  104. package/dist/esm/components/Notifications/index.js +3 -4
  105. package/dist/esm/components/PrimaryButton/index.js +8 -12
  106. package/dist/esm/components/PrimaryButton/skeleton.js +4 -2
  107. package/dist/esm/components/PrimaryButton/styles.js +2 -6
  108. package/dist/esm/components/PrimaryDropdownButton/index.js +1 -2
  109. package/dist/esm/components/PrimaryItemsContainer/index.js +15 -17
  110. package/dist/esm/components/PrimaryItemsContainer/skeleton.js +3 -2
  111. package/dist/esm/components/ProductHome/custom-product-home.js +14 -21
  112. package/dist/esm/components/ProductHome/product-home.js +20 -27
  113. package/dist/esm/components/ProductHome/skeleton.js +4 -7
  114. package/dist/esm/components/ProductHome/utils.js +0 -2
  115. package/dist/esm/components/Profile/index.js +3 -3
  116. package/dist/esm/components/Profile/skeleton.js +3 -2
  117. package/dist/esm/components/Search/index.js +12 -19
  118. package/dist/esm/components/Search/skeleton.js +3 -3
  119. package/dist/esm/components/Settings/index.js +1 -3
  120. package/dist/esm/components/SignIn/index.js +3 -5
  121. package/dist/esm/components/SignIn/skeleton.js +3 -2
  122. package/dist/esm/components/SkeletonCreateButton/index.js +2 -2
  123. package/dist/esm/components/SkeletonIconButton/index.js +2 -2
  124. package/dist/esm/components/SkeletonPrimaryButton/index.js +7 -13
  125. package/dist/esm/controllers/overflow/index.js +27 -40
  126. package/dist/esm/skeleton-help-button.js +2 -5
  127. package/dist/esm/skeleton-notification-button.js +1 -2
  128. package/dist/esm/skeleton-settings-button.js +1 -2
  129. package/dist/esm/skeleton-switcher-button.js +1 -2
  130. package/dist/esm/theme/theme-generator.js +7 -14
  131. package/dist/esm/theme/theme-helpers.js +2 -15
  132. package/dist/esm/theme/theme-provider.js +4 -3
  133. package/dist/esm/version.json +1 -1
  134. package/package.json +3 -3
  135. package/report.api.md +13 -0
@@ -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;
@@ -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';
@@ -101,6 +100,7 @@ const siteTitleStyles = css({
101
100
  paddingRight: gridSize * 2,
102
101
  alignItems: 'center'
103
102
  });
103
+
104
104
  /**
105
105
  * __Product home__
106
106
  *
@@ -112,7 +112,6 @@ const siteTitleStyles = css({
112
112
  * - [Examples](https://atlassian.design/components/atlassian-navigation/examples#product-home)
113
113
  * - [Code](https://atlassian.design/components/atlassian-navigation/code)
114
114
  */
115
-
116
115
  const ProductHome = ({
117
116
  icon: Icon,
118
117
  logo: Logo,
@@ -133,12 +132,10 @@ const ProductHome = ({
133
132
  textColor = theme.mode.productHome.color
134
133
  } = theme.mode.productHome;
135
134
  const Tag = getTag(onClick, href);
136
-
137
135
  const preventFocusRing = e => {
138
136
  e.preventDefault();
139
137
  onMouseDown && onMouseDown(e);
140
138
  };
141
-
142
139
  const productHomeButtonDynamicStyles = {
143
140
  [VAR_PRODUCT_HOME_COLOR_ACTIVE]: primaryButton.active.color,
144
141
  [VAR_PRODUCT_HOME_BACKGROUND_COLOR_ACTIVE]: primaryButton.active.backgroundColor,
@@ -157,8 +154,8 @@ const ProductHome = ({
157
154
  href: href,
158
155
  onClick: onClick,
159
156
  onMouseDown: preventFocusRing,
160
- "data-testid": testId && `${testId}-container` // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
161
-
157
+ "data-testid": testId && `${testId}-container`
158
+ // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
162
159
  }, rest), jsx("div", {
163
160
  css: [customMaxHeightStyles, productLogoStyles],
164
161
  "data-testid": testId && `${testId}-logo`
@@ -182,5 +179,4 @@ const ProductHome = ({
182
179
  "data-testid": testId && `${testId}-site-title`
183
180
  }, siteTitle));
184
181
  };
185
-
186
182
  export default ProductHome;
@@ -1,4 +1,5 @@
1
1
  /** @jsx jsx */
2
+
2
3
  import { Fragment } from 'react';
3
4
  import { css, jsx } from '@emotion/react';
4
5
  import { gridSize, PRODUCT_HOME_BREAKPOINT } from '../../common/constants';
@@ -103,9 +104,10 @@ const siteTitleStyles = css({
103
104
  borderRadius: 4,
104
105
  content: '""'
105
106
  }
106
- }); // Not exported to consumers, only used in NavigationSkeleton
107
- // eslint-disable-next-line @repo/internal/react/require-jsdoc
107
+ });
108
108
 
109
+ // Not exported to consumers, only used in NavigationSkeleton
110
+ // eslint-disable-next-line @repo/internal/react/require-jsdoc
109
111
  export const ProductHomeSkeleton = ({
110
112
  showSiteName
111
113
  }) => {
@@ -2,10 +2,8 @@ export const getTag = (onClick, href) => {
2
2
  if (href) {
3
3
  return 'a';
4
4
  }
5
-
6
5
  if (onClick) {
7
6
  return 'button';
8
7
  }
9
-
10
8
  return 'div';
11
9
  };
@@ -1,5 +1,4 @@
1
1
  import { IconButton } from '../IconButton';
2
-
3
2
  /**
4
3
  * __Profile__
5
4
  *
@@ -9,7 +8,8 @@ import { IconButton } from '../IconButton';
9
8
  * - [Examples](https://atlassian.design/components/atlassian-navigation/examples#profile)
10
9
  * - [Code](https://atlassian.design/components/atlassian-navigation/code)
11
10
  */
12
- export const Profile = IconButton; // This exists only to extract props.
13
- // eslint-disable-next-line @repo/internal/react/use-noop
11
+ export const Profile = IconButton;
14
12
 
13
+ // This exists only to extract props.
14
+ // eslint-disable-next-line @repo/internal/react/use-noop
15
15
  export default (props => {});
@@ -1,8 +1,9 @@
1
1
  import React from 'react';
2
2
  import { gridSize } from '@atlaskit/theme/constants';
3
- import { IconButtonSkeleton } from '../IconButton/skeleton'; // Not exported to consumers, only used in NavigationSkeleton
4
- // eslint-disable-next-line @repo/internal/react/require-jsdoc
3
+ import { IconButtonSkeleton } from '../IconButton/skeleton';
5
4
 
5
+ // Not exported to consumers, only used in NavigationSkeleton
6
+ // eslint-disable-next-line @repo/internal/react/require-jsdoc
6
7
  export const ProfileSkeleton = () => /*#__PURE__*/React.createElement(IconButtonSkeleton, {
7
8
  marginLeft: 6,
8
9
  marginRight: 6,
@@ -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';
@@ -52,7 +51,6 @@ const searchIconStyles = css({
52
51
  display: 'none !important'
53
52
  }
54
53
  });
55
-
56
54
  const SearchComponent = props => {
57
55
  const {
58
56
  onClick,
@@ -62,17 +60,14 @@ const SearchComponent = props => {
62
60
  } = props;
63
61
  const theme = useTheme();
64
62
  const search = theme.mode.search;
65
-
66
63
  const onChange = (...args) => {
67
64
  // @ts-ignore
68
65
  onClick && onClick(...args);
69
66
  };
70
-
71
67
  const onInputClick = (...args) => {
72
68
  // @ts-ignore
73
69
  onClick && onClick(...args);
74
70
  };
75
-
76
71
  const searchInputDynamicStyles = {
77
72
  [varSearchBackgroundColor]: search.default.backgroundColor,
78
73
  [varSearchColor]: search.default.color,
@@ -97,6 +92,7 @@ const SearchComponent = props => {
97
92
  value: value
98
93
  }));
99
94
  };
95
+
100
96
  /**
101
97
  * __Search__
102
98
  *
@@ -105,8 +101,6 @@ const SearchComponent = props => {
105
101
  * - [Examples](https://atlassian.design/components/atlassian-navigation/examples#search)
106
102
  * - [Code](https://atlassian.design/components/atlassian-navigation/code)
107
103
  */
108
-
109
-
110
104
  export const Search = props => {
111
105
  const {
112
106
  placeholder,
@@ -120,14 +114,15 @@ export const Search = props => {
120
114
  placeholder: placeholder,
121
115
  label: label,
122
116
  value: value || ''
123
- }), jsx(IconButton // @ts-ignore Overriding styles is not supported.
117
+ }), jsx(IconButton
118
+ // @ts-ignore Overriding styles is not supported.
124
119
  , _extends({
125
120
  css: searchIconStyles,
126
121
  icon: jsx(SearchIcon, {
127
122
  label: label
128
123
  }),
129
- tooltip: tooltip // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
130
-
124
+ tooltip: tooltip
125
+ // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
131
126
  }, iconButtonProps)));
132
127
  };
133
128
  export default Search;
@@ -26,9 +26,10 @@ const searchIconStyles = css({
26
26
  [`@media (min-width: ${CREATE_BREAKPOINT}px)`]: {
27
27
  display: 'none !important'
28
28
  }
29
- }); // Not exported to consumers, only used in NavigationSkeleton
30
- // eslint-disable-next-line @repo/internal/react/require-jsdoc
29
+ });
31
30
 
31
+ // Not exported to consumers, only used in NavigationSkeleton
32
+ // eslint-disable-next-line @repo/internal/react/require-jsdoc
32
33
  export const SearchSkeleton = () => {
33
34
  const theme = useTheme();
34
35
  return jsx(Fragment, null, jsx("div", {
@@ -2,7 +2,6 @@ import _extends from "@babel/runtime/helpers/extends";
2
2
  import React, { forwardRef } from 'react';
3
3
  import SettingsIcon from '@atlaskit/icon/glyph/settings';
4
4
  import { IconButton } from '../IconButton';
5
-
6
5
  /**
7
6
  * __Settings__
8
7
  *