@atlaskit/atlassian-navigation 1.1.2 → 1.2.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.
Files changed (31) hide show
  1. package/CHANGELOG.md +56 -0
  2. package/dist/cjs/components/AtlassianNavigation/styles.js +25 -17
  3. package/dist/cjs/components/IconButton/styles.js +2 -2
  4. package/dist/cjs/components/PrimaryButton/styles.js +2 -2
  5. package/dist/cjs/components/PrimaryItemsContainer/index.js +6 -11
  6. package/dist/cjs/components/PrimaryItemsContainer/styles.js +0 -11
  7. package/dist/cjs/components/ProductHome/styles.js +2 -2
  8. package/dist/cjs/theme/defaultTheme.js +52 -48
  9. package/dist/cjs/theme/themes.js +2 -0
  10. package/dist/cjs/version.json +1 -1
  11. package/dist/es2019/components/AtlassianNavigation/styles.js +20 -12
  12. package/dist/es2019/components/IconButton/styles.js +2 -2
  13. package/dist/es2019/components/PrimaryButton/styles.js +2 -2
  14. package/dist/es2019/components/PrimaryItemsContainer/index.js +6 -11
  15. package/dist/es2019/components/PrimaryItemsContainer/styles.js +0 -10
  16. package/dist/es2019/components/ProductHome/styles.js +2 -2
  17. package/dist/es2019/theme/defaultTheme.js +52 -48
  18. package/dist/es2019/theme/themes.js +2 -0
  19. package/dist/es2019/version.json +1 -1
  20. package/dist/esm/components/AtlassianNavigation/styles.js +23 -14
  21. package/dist/esm/components/IconButton/styles.js +2 -2
  22. package/dist/esm/components/PrimaryButton/styles.js +2 -2
  23. package/dist/esm/components/PrimaryItemsContainer/index.js +6 -11
  24. package/dist/esm/components/PrimaryItemsContainer/styles.js +0 -10
  25. package/dist/esm/components/ProductHome/styles.js +2 -2
  26. package/dist/esm/theme/defaultTheme.js +52 -48
  27. package/dist/esm/theme/themes.js +2 -0
  28. package/dist/esm/version.json +1 -1
  29. package/dist/types/components/AtlassianNavigation/styles.d.ts +0 -11
  30. package/dist/types/components/IconButton/types.d.ts +21 -0
  31. package/package.json +9 -16
package/CHANGELOG.md CHANGED
@@ -1,5 +1,61 @@
1
1
  # @atlaskit/atlassian-navigation
2
2
 
3
+ ## 1.2.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`a2f953f3814`](https://bitbucket.org/atlassian/atlassian-frontend/commits/a2f953f3814) - Previously the `ensure-design-token-usage` eslint rule contained all checks relating to token use. This has now been split up into two separate rules:
8
+
9
+ `ensure-design-token-usage` now covers:
10
+
11
+ - `legacyElevation` — warns about old usages of the elevation mixins or styles, which instead should use the `card` or `overlay` tokens.
12
+ - `hardCodedColor` — warns about use of hard-coded colors such as `color: colors.B100`, which instead should be wrapped in a `token()` call. This covers the majority of cases in existing codebases when first adopting tokens.
13
+
14
+ `no-unsafe-design-token-usage` (new) covers the remaining rules:
15
+
16
+ - `directTokenUsage` — warns against using the CSS Custom Property name that is output in the browser by the `token()` call.
17
+ Eg. directly using `var(--ds-accent-subtleBlue)` is bad.
18
+ - `staticToken` — warns when tokens aren't used inline. Inlining the token usages helps with static analysis, which unlocks future improvements.
19
+ Eg. pulling the token out into a const like `css={ color: token(primaryButtonText) }` is bad.
20
+ - `invalidToken` — warns when using a token that doesn't exist (not one that's been renamed, see the next point).
21
+ - `tokenRenamed` — warns when using a token that's been renamed in a subsequent release.
22
+ - `tokenFallbackEnforced` — warns if a fallback for the token call is not provided.
23
+ Eg. call with the fallback like this `token('color.background.disabled', N10)` instead of `token('color.background.disabled')`.
24
+ - `tokenFallbackRestricted` — the opposite of `tokenFallbackEnforced`.
25
+ Eg. do not pass in a fallback like this `token('color.background.disabled', N10)` and instead only include the token `token('color.background.disabled')`.
26
+
27
+ Upgrading — some instances of `\\eslint-disable` may need to be changed to the new rule. If you have failing lint rules after only bumping this package then switch those ignores to use `no-unsafe-design-token-usage` instead.
28
+
29
+ - [`22fb31312eb`](https://bitbucket.org/atlassian/atlassian-frontend/commits/22fb31312eb) - Fixes unmounted component state update warnings for AtlassianNavigation
30
+ - [`f460cc7c411`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f460cc7c411) - Builds for this package now pass through a tokens babel plugin, removing runtime invocations of the tokens() function and improving bundle size.
31
+ - Updated dependencies
32
+
33
+ ## 1.2.1
34
+
35
+ ### Patch Changes
36
+
37
+ - [`bb54a699e54`](https://bitbucket.org/atlassian/atlassian-frontend/commits/bb54a699e54) - [ux] Fixes a bug where a previously removed gradient positioned ::after primary actions was still rendered. Also fixes a bug where this gradient rendered incorrectly on Safari.
38
+
39
+ ## 1.2.0
40
+
41
+ ### Minor Changes
42
+
43
+ - [`c9986657899`](https://bitbucket.org/atlassian/atlassian-frontend/commits/c9986657899) - Instrumented atlassian-navigation with the new theming package, @atlaskit/tokens.
44
+
45
+ New tokens will be visible only in applications configured to use the new Tokens API (currently in alpha). These changes are intended to be interoperable with the legacy theme implementation. Legacy dark mode users should expect no visual or breaking changes.
46
+
47
+ ### Patch Changes
48
+
49
+ - [`f791fab1bfa`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f791fab1bfa) - Added missing `components` and `onBlur` props to the props type used by secondary actions. These were already available but were not documented.
50
+ - Updated dependencies
51
+
52
+ ## 1.1.3
53
+
54
+ ### Patch Changes
55
+
56
+ - [`4f9dd11a8eb`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4f9dd11a8eb) - Fixes a visual bug which made the logo appear twice under very rare circumstances
57
+ - Updated dependencies
58
+
3
59
  ## 1.1.2
4
60
 
5
61
  ### Patch Changes
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.bottomShadow = exports.rightCSS = exports.leftCSS = exports.containerCSS = void 0;
8
+ exports.rightCSS = exports.leftCSS = exports.containerCSS = void 0;
9
9
 
10
10
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
11
11
 
@@ -25,7 +25,7 @@ var gridSize = (0, _constants.gridSize)();
25
25
 
26
26
  var containerCSS = function containerCSS(_ref) {
27
27
  var navigation = _ref.mode.navigation;
28
- return _objectSpread(_objectSpread({
28
+ return _objectSpread({
29
29
  alignItems: 'center',
30
30
  boxSizing: 'border-box',
31
31
  display: 'flex',
@@ -34,8 +34,28 @@ var containerCSS = function containerCSS(_ref) {
34
34
  paddingLeft: gridSize * 1.5,
35
35
  paddingRight: gridSize * 1.5,
36
36
  height: _constants2.HORIZONTAL_GLOBAL_NAV_HEIGHT,
37
- position: 'relative'
38
- }, bottomShadow), navigation);
37
+ position: 'relative',
38
+ '[data-theme="light"] &, [data-theme="dark"] &': {
39
+ // eslint-disable-next-line @atlaskit/design-system/no-unsafe-design-token-usage
40
+ borderBottom: "1px solid ".concat("var(--ds-border-neutral, #091E4224)"),
41
+ // TODO: (DSP-2087) Remove the below once tokens have launched
42
+ '&::after': {
43
+ content: 'none'
44
+ }
45
+ },
46
+ // TODO: (DSP-2087) Remove the below once tokens have launched
47
+ '&::after': {
48
+ content: '""',
49
+ position: 'absolute',
50
+ left: 0,
51
+ right: 0,
52
+ top: '100%',
53
+ height: gridSize / 2,
54
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
55
+ background: "linear-gradient(180deg, ".concat(_colors.N40A, " 0, ").concat(_colors.N40A, " 1px, ").concat(_colors.N30A, " 1px, ").concat((0, _theme.hexToRGBA)( // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
56
+ _colors.N900, 0), " 4px)")
57
+ }
58
+ }, navigation);
39
59
  };
40
60
 
41
61
  exports.containerCSS = containerCSS;
@@ -59,16 +79,4 @@ var rightCSS = {
59
79
  marginRight: gridSize / 2
60
80
  }
61
81
  };
62
- exports.rightCSS = rightCSS;
63
- var bottomShadow = {
64
- '&::after': {
65
- content: '""',
66
- position: 'absolute',
67
- left: 0,
68
- right: 0,
69
- top: '100%',
70
- height: gridSize / 2,
71
- background: "linear-gradient(180deg, ".concat(_colors.N40A, " 0, ").concat(_colors.N40A, " 1px, ").concat(_colors.N30A, " 1px, ").concat((0, _theme.hexToRGBA)(_colors.N900, 0), " 4px)")
72
- }
73
- };
74
- exports.bottomShadow = bottomShadow;
82
+ exports.rightCSS = rightCSS;
@@ -45,13 +45,13 @@ var getIconButtonTheme = function getIconButtonTheme(_ref) {
45
45
  }, iconButton.default), {}, {
46
46
  ':hover': iconButton.hover,
47
47
  ':focus': iconButton.focus,
48
- // :active doesn't work in FF, becasue we do a
48
+ // :active doesn't work in FF, because we do a
49
49
  // e.preventDefault() on mouse down in Button.
50
50
  // '&&' is required to add more CSS specificity
51
51
  // && it not a valid CSSObject property
52
52
  // @ts-ignore
53
53
  '&&': _objectSpread({}, props.state === 'active' && iconButton.active)
54
- }, props.state === 'selected' && iconButton.active), {}, {
54
+ }, props.state === 'selected' && iconButton.selected), {}, {
55
55
  '> span': {
56
56
  margin: 0
57
57
  }
@@ -37,14 +37,14 @@ var getPrimaryButtonTheme = function getPrimaryButtonTheme(_ref) {
37
37
  spinnerStyles = _current.spinnerStyles;
38
38
 
39
39
  return {
40
- buttonStyles: _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, buttonStyles), primaryButton.default), props.isSelected && primaryButton.active), {}, {
40
+ buttonStyles: _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, buttonStyles), primaryButton.default), props.isSelected && primaryButton.selected), {}, {
41
41
  fontWeight: 500,
42
42
  padding: '0 4px',
43
43
  marginLeft: 0,
44
44
  marginRight: 0,
45
45
  ':hover': primaryButton.hover,
46
46
  ':focus': primaryButton.focus,
47
- // :active doesn't work in FF, becasue we do a
47
+ // :active doesn't work in FF, because we do a
48
48
  // e.preventDefault() on mouse down in Button.
49
49
  // '&&' is required to add more CSS specificity
50
50
  // && it not a valid CSSObject property
@@ -59,16 +59,6 @@ var PrimaryItemsContainer = function PrimaryItemsContainer(_ref) {
59
59
  testId: testId ? "".concat(testId, "-overflow-menu-trigger") : 'overflow-menu-trigger'
60
60
  }, triggerProps), moreLabel);
61
61
  }, [moreLabel, onMoreClick, isMoreOpen, testId]);
62
-
63
- var WidthObserverRelativeWrapper = function WidthObserverRelativeWrapper() {
64
- return (0, _core.jsx)("div", {
65
- style: _styles.widthObserverContainerStyle
66
- }, (0, _core.jsx)(_widthDetector.WidthObserver, {
67
- offscreen: true,
68
- setWidth: updateWidth
69
- }));
70
- };
71
-
72
62
  var content = (0, _react.useCallback)(function () {
73
63
  return (0, _core.jsx)(_overflow.OverflowProvider, {
74
64
  isVisible: false,
@@ -93,7 +83,12 @@ var PrimaryItemsContainer = function PrimaryItemsContainer(_ref) {
93
83
  onClose: onMoreClose,
94
84
  trigger: trigger,
95
85
  testId: testId ? "".concat(testId, "-overflow-menu-popup") : 'overflow-menu-popup'
96
- }), Create && (0, _core.jsx)(Create, null), (0, _core.jsx)(WidthObserverRelativeWrapper, null));
86
+ }), Create && (0, _core.jsx)(Create, null), (0, _core.jsx)("div", {
87
+ style: _styles.widthObserverContainerStyle
88
+ }, (0, _core.jsx)(_widthDetector.WidthObserver, {
89
+ offscreen: true,
90
+ setWidth: updateWidth
91
+ })));
97
92
  };
98
93
 
99
94
  exports.PrimaryItemsContainer = PrimaryItemsContainer;
@@ -7,8 +7,6 @@ exports.primaryButtonSkeletonCSS = exports.widthObserverContainerStyle = exports
7
7
 
8
8
  var _constants = require("@atlaskit/theme/constants");
9
9
 
10
- var _theme = require("../../theme");
11
-
12
10
  var margin = "0 ".concat((0, _constants.gridSize)() / 2, "px");
13
11
 
14
12
  var containerCSS = function containerCSS(_ref) {
@@ -24,15 +22,6 @@ var containerCSS = function containerCSS(_ref) {
24
22
  '& > *': {
25
23
  flexShrink: 0,
26
24
  margin: margin
27
- },
28
- '&::after': {
29
- content: '""',
30
- position: 'absolute',
31
- top: 0,
32
- right: 0,
33
- height: '100%',
34
- width: "".concat((0, _constants.gridSize)() * 3, "px"),
35
- background: "linear-gradient(90deg, ".concat((0, _theme.hexToRGBA)(navigation.backgroundColor, 0), " 0%, ").concat((0, _theme.hexToRGBA)(navigation.backgroundColor, 0.7), " 50%, ").concat((0, _theme.hexToRGBA)(navigation.backgroundColor, 1), " 100%)")
36
25
  }
37
26
  };
38
27
  };
@@ -48,7 +48,7 @@ var productHomeButtonCSS = function productHomeButtonCSS(_ref) {
48
48
  'div&': {
49
49
  pointerEvents: 'none'
50
50
  }
51
- }, (0, _defineProperty2.default)(_ref2, "@media (max-width: ".concat(_constants2.PRODUCT_HOME_BREAKPOINT - 1, "px)"), {
51
+ }, (0, _defineProperty2.default)(_ref2, "@media (max-width: ".concat(_constants2.PRODUCT_HOME_BREAKPOINT - 0.1, "px)"), {
52
52
  margin: "0 ".concat(gridSize, "px")
53
53
  }), (0, _defineProperty2.default)(_ref2, "@media (min-width: ".concat(_constants2.PRODUCT_HOME_BREAKPOINT, "px)"), {
54
54
  margin: "0 ".concat(gridSize * 2, "px")
@@ -97,7 +97,7 @@ var productLogoCSS = function productLogoCSS(logoMaxWidth) {
97
97
  '& > *': {
98
98
  maxHeight: 24
99
99
  }
100
- }, "@media (max-width: ".concat(_constants2.PRODUCT_HOME_BREAKPOINT - 1, "px)"), {
100
+ }, "@media (max-width: ".concat(_constants2.PRODUCT_HOME_BREAKPOINT - 0.1, "px)"), {
101
101
  display: 'none'
102
102
  });
103
103
  };
@@ -13,24 +13,24 @@ var defaultTheme = {
13
13
  mode: {
14
14
  create: {
15
15
  active: {
16
- color: _colors.N0,
17
- backgroundColor: (0, _themeHelpers.hexToRGBA)(_colors.B400, 0.8),
18
- boxShadow: '0 0 0 2px transparent'
16
+ color: "var(--ds-text-onBold, ".concat(_colors.N0, ")"),
17
+ backgroundColor: "var(--ds-background-boldBrand-pressed, ".concat((0, _themeHelpers.hexToRGBA)(_colors.B400, 0.8), ")"),
18
+ boxShadow: ''
19
19
  },
20
20
  default: {
21
- color: _colors.N0,
22
- backgroundColor: _colors.B400,
23
- boxShadow: '0 0 0 2px transparent'
21
+ color: "var(--ds-text-onBold, ".concat(_colors.N0, ")"),
22
+ backgroundColor: "var(--ds-background-boldBrand-resting, ".concat(_colors.B400, ")"),
23
+ boxShadow: ''
24
24
  },
25
25
  focus: {
26
- color: _colors.N0,
27
- backgroundColor: _colors.B400,
28
- boxShadow: '0 0 0 2px rgb(128,169,230)'
26
+ color: "var(--ds-text-onBold, ".concat(_colors.N0, ")"),
27
+ backgroundColor: "var(--ds-background-boldBrand-resting, ".concat(_colors.B400, ")"),
28
+ boxShadow: "0 0 0 2px ".concat("var(--ds-border-focus, rgb(128,169,230))")
29
29
  },
30
30
  hover: {
31
- color: _colors.N0,
32
- backgroundColor: (0, _themeHelpers.hexToRGBA)(_colors.B400, 0.9),
33
- boxShadow: '0 0 0 2px transparent'
31
+ color: "var(--ds-text-onBold, ".concat(_colors.N0, ")"),
32
+ backgroundColor: "var(--ds-background-boldBrand-hover, ".concat((0, _themeHelpers.hexToRGBA)(_colors.B400, 0.9), ")"),
33
+ boxShadow: ''
34
34
  },
35
35
  selected: {
36
36
  color: '',
@@ -40,88 +40,92 @@ var defaultTheme = {
40
40
  },
41
41
  iconButton: {
42
42
  active: {
43
- color: _colors.B400,
44
- backgroundColor: (0, _themeHelpers.hexToRGBA)(_colors.B50, 0.6),
43
+ color: "var(--ds-text-mediumEmphasis, ".concat(_colors.B400, ")"),
44
+ backgroundColor: "var(--ds-background-subtleNeutral-pressed, ".concat((0, _themeHelpers.hexToRGBA)(_colors.B50, 0.6), ")"),
45
45
  boxShadow: ''
46
46
  },
47
47
  default: {
48
- color: _colors.N600,
48
+ color: "var(--ds-text-mediumEmphasis, ".concat(_colors.N600, ")"),
49
49
  backgroundColor: 'transparent',
50
50
  boxShadow: ''
51
51
  },
52
52
  focus: {
53
- color: _colors.N600,
54
- backgroundColor: (0, _themeHelpers.hexToRGBA)(_colors.B50, 0.5),
55
- boxShadow: "0 0 0 2px ".concat(_colors.B200)
53
+ color: "var(--ds-text-mediumEmphasis, ".concat(_colors.N600, ")"),
54
+ backgroundColor: "var(--ds-background-subtleBrand-hover, ".concat((0, _themeHelpers.hexToRGBA)(_colors.B50, 0.5), ")"),
55
+ boxShadow: "0 0 0 2px ".concat("var(--ds-border-focus, ".concat(_colors.B200, ")"))
56
56
  },
57
57
  hover: {
58
- color: _colors.B400,
59
- backgroundColor: (0, _themeHelpers.hexToRGBA)(_colors.B50, 0.9),
58
+ color: "var(--ds-text-mediumEmphasis, ".concat(_colors.B400, ")"),
59
+ backgroundColor: "var(--ds-background-subtleNeutral-hover, ".concat((0, _themeHelpers.hexToRGBA)(_colors.B50, 0.9), ")"),
60
60
  boxShadow: ''
61
61
  },
62
62
  selected: {
63
- color: '',
64
- backgroundColor: '',
63
+ color: "var(--ds-text-selected)",
64
+ backgroundColor: "var(--ds-background-selected-resting)",
65
65
  boxShadow: ''
66
66
  }
67
67
  },
68
68
  navigation: {
69
- backgroundColor: _colors.N0,
70
- color: _colors.N200
69
+ backgroundColor: "var(--ds-background-default, ".concat(_colors.N0, ")"),
70
+ color: "var(--ds-text-lowEmphasis, ".concat(_colors.N200, ")")
71
71
  },
72
72
  productHome: {
73
- backgroundColor: _colors.B400,
74
- color: _colors.N700,
75
- borderRight: "1px solid ".concat((0, _themeHelpers.hexToRGBA)(_colors.N200, 0.3)),
73
+ backgroundColor: "var(--ds-text-brand, ".concat(_colors.B400, ")"),
74
+ color: "var(--ds-text-highEmphasis, ".concat(_colors.N700, ")"),
75
+ borderRight: "1px solid ".concat("var(--ds-border-neutral, ".concat((0, _themeHelpers.hexToRGBA)(_colors.N200, 0.3), ")")),
76
+ // TODO: (DSP-1256) These colors should be moved into the Logo package
77
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
76
78
  iconGradientStart: _colors.B400,
79
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
77
80
  iconGradientStop: _colors.B200,
81
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
78
82
  iconColor: _colors.B200
79
83
  },
80
84
  primaryButton: {
81
85
  active: {
82
- color: _colors.B400,
83
- backgroundColor: (0, _themeHelpers.hexToRGBA)(_colors.B50, 0.7),
84
- boxShadow: '0 0 0 2px transparent'
86
+ color: "var(--ds-text-mediumEmphasis, ".concat(_colors.B400, ")"),
87
+ backgroundColor: "var(--ds-background-subtleNeutral-pressed, ".concat((0, _themeHelpers.hexToRGBA)(_colors.B50, 0.7), ")"),
88
+ boxShadow: ''
85
89
  },
86
90
  default: {
87
- color: _colors.N600,
91
+ color: "var(--ds-text-mediumEmphasis, ".concat(_colors.N600, ")"),
88
92
  backgroundColor: 'transparent',
89
- boxShadow: '0 0 0 2px transparent'
93
+ boxShadow: ''
90
94
  },
91
95
  focus: {
92
- color: _colors.N600,
96
+ color: "var(--ds-text-mediumEmphasis, ".concat(_colors.N600, ")"),
93
97
  backgroundColor: '',
94
- boxShadow: "0 0 0 2px ".concat(_colors.B200)
98
+ boxShadow: "0 0 0 2px ".concat("var(--ds-border-focus, ".concat(_colors.B200, ")"))
95
99
  },
96
100
  hover: {
97
- color: _colors.B400,
98
- backgroundColor: (0, _themeHelpers.hexToRGBA)(_colors.B50, 0.9),
99
- boxShadow: '0 0 0 2px transparent'
101
+ color: "var(--ds-text-mediumEmphasis, ".concat(_colors.B400, ")"),
102
+ backgroundColor: "var(--ds-background-subtleNeutral-hover, ".concat((0, _themeHelpers.hexToRGBA)(_colors.B50, 0.9), ")"),
103
+ boxShadow: ''
100
104
  },
101
105
  selected: {
102
- color: _colors.B400,
103
- backgroundColor: '',
106
+ color: "var(--ds-text-mediumEmphasis, ".concat(_colors.B400, ")"),
107
+ backgroundColor: "var(--ds-background-selected-resting)",
104
108
  boxShadow: '',
105
- borderColor: _colors.B400,
106
- bordorBottom: "4px solid ".concat(_colors.B400)
109
+ borderColor: "var(--ds-iconBorder-brand, ".concat(_colors.B400, ")"),
110
+ bordorBottom: "4px solid ".concat("var(--ds-iconBorder-brand, ".concat(_colors.B400, ")"))
107
111
  }
108
112
  },
109
113
  search: {
110
114
  default: {
111
- backgroundColor: _colors.N0,
112
- color: _colors.N200,
113
- borderColor: _colors.N40
115
+ backgroundColor: "var(--ds-background-default, ".concat(_colors.N0, ")"),
116
+ color: "var(--ds-text-lowEmphasis, ".concat(_colors.N200, ")"),
117
+ borderColor: "var(--ds-border-neutral, ".concat(_colors.N40, ")")
114
118
  },
115
119
  focus: {
116
- borderColor: _colors.B200
120
+ borderColor: "var(--ds-border-focus, ".concat(_colors.B200, ")")
117
121
  },
118
122
  hover: {
119
- color: _colors.B400,
120
- backgroundColor: (0, _themeHelpers.hexToRGBA)(_colors.B50, 0.9)
123
+ color: "var(--ds-text-brand, ".concat(_colors.B400, ")"),
124
+ backgroundColor: "var(--ds-background-default, ".concat((0, _themeHelpers.hexToRGBA)(_colors.B50, 0.9), ")")
121
125
  }
122
126
  },
123
127
  skeleton: {
124
- backgroundColor: _colors.N20,
128
+ backgroundColor: "var(--ds-background-subtleNeutral-resting, ".concat(_colors.N20, ")"),
125
129
  opacity: 1
126
130
  }
127
131
  }
@@ -13,7 +13,9 @@ var _themeGenerator = require("./themeGenerator");
13
13
 
14
14
  var atlassianTheme = (0, _themeGenerator.generateTheme)({
15
15
  name: _defaultTheme.DEFAULT_THEME_NAME,
16
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
16
17
  backgroundColor: _colors.N0,
18
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
17
19
  highlightColor: _colors.B400
18
20
  });
19
21
  exports.atlassianTheme = atlassianTheme;
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/atlassian-navigation",
3
- "version": "1.1.2",
3
+ "version": "1.2.2",
4
4
  "sideEffects": false
5
5
  }
@@ -17,7 +17,26 @@ export const containerCSS = ({
17
17
  paddingRight: gridSize * 1.5,
18
18
  height: HORIZONTAL_GLOBAL_NAV_HEIGHT,
19
19
  position: 'relative',
20
- ...bottomShadow,
20
+ '[data-theme="light"] &, [data-theme="dark"] &': {
21
+ // eslint-disable-next-line @atlaskit/design-system/no-unsafe-design-token-usage
22
+ borderBottom: `1px solid ${"var(--ds-border-neutral, #091E4224)"}`,
23
+ // TODO: (DSP-2087) Remove the below once tokens have launched
24
+ '&::after': {
25
+ content: 'none'
26
+ }
27
+ },
28
+ // TODO: (DSP-2087) Remove the below once tokens have launched
29
+ '&::after': {
30
+ content: '""',
31
+ position: 'absolute',
32
+ left: 0,
33
+ right: 0,
34
+ top: '100%',
35
+ height: gridSize / 2,
36
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
37
+ background: `linear-gradient(180deg, ${N40A} 0, ${N40A} 1px, ${N30A} 1px, ${hexToRGBA( // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
38
+ N900, 0)} 4px)`
39
+ },
21
40
  ...navigation
22
41
  });
23
42
  export const leftCSS = {
@@ -38,15 +57,4 @@ export const rightCSS = {
38
57
  flexShrink: 0,
39
58
  marginRight: gridSize / 2
40
59
  }
41
- };
42
- export const bottomShadow = {
43
- '&::after': {
44
- content: '""',
45
- position: 'absolute',
46
- left: 0,
47
- right: 0,
48
- top: '100%',
49
- height: gridSize / 2,
50
- background: `linear-gradient(180deg, ${N40A} 0, ${N40A} 1px, ${N30A} 1px, ${hexToRGBA(N900, 0)} 4px)`
51
- }
52
60
  };
@@ -27,14 +27,14 @@ export const getIconButtonTheme = ({
27
27
  ...iconButton.default,
28
28
  ':hover': iconButton.hover,
29
29
  ':focus': iconButton.focus,
30
- // :active doesn't work in FF, becasue we do a
30
+ // :active doesn't work in FF, because we do a
31
31
  // e.preventDefault() on mouse down in Button.
32
32
  // '&&' is required to add more CSS specificity
33
33
  // && it not a valid CSSObject property
34
34
  // @ts-ignore
35
35
  '&&': { ...(props.state === 'active' && iconButton.active)
36
36
  },
37
- ...(props.state === 'selected' && iconButton.active),
37
+ ...(props.state === 'selected' && iconButton.selected),
38
38
  '> span': {
39
39
  margin: 0
40
40
  }
@@ -20,14 +20,14 @@ export const getPrimaryButtonTheme = ({
20
20
  return {
21
21
  buttonStyles: { ...buttonStyles,
22
22
  ...primaryButton.default,
23
- ...(props.isSelected && primaryButton.active),
23
+ ...(props.isSelected && primaryButton.selected),
24
24
  fontWeight: 500,
25
25
  padding: '0 4px',
26
26
  marginLeft: 0,
27
27
  marginRight: 0,
28
28
  ':hover': primaryButton.hover,
29
29
  ':focus': primaryButton.focus,
30
- // :active doesn't work in FF, becasue we do a
30
+ // :active doesn't work in FF, because we do a
31
31
  // e.preventDefault() on mouse down in Button.
32
32
  // '&&' is required to add more CSS specificity
33
33
  // && it not a valid CSSObject property
@@ -35,16 +35,6 @@ export const PrimaryItemsContainer = ({
35
35
  isSelected: isMoreOpen,
36
36
  testId: testId ? `${testId}-overflow-menu-trigger` : 'overflow-menu-trigger'
37
37
  }, triggerProps), moreLabel), [moreLabel, onMoreClick, isMoreOpen, testId]);
38
-
39
- const WidthObserverRelativeWrapper = () => {
40
- return jsx("div", {
41
- style: widthObserverContainerStyle
42
- }, jsx(WidthObserver, {
43
- offscreen: true,
44
- setWidth: updateWidth
45
- }));
46
- };
47
-
48
38
  const content = useCallback(() => jsx(OverflowProvider, {
49
39
  isVisible: false,
50
40
  openOverflowMenu: openOverflowMenu,
@@ -67,5 +57,10 @@ export const PrimaryItemsContainer = ({
67
57
  onClose: onMoreClose,
68
58
  trigger: trigger,
69
59
  testId: testId ? `${testId}-overflow-menu-popup` : 'overflow-menu-popup'
70
- }), Create && jsx(Create, null), jsx(WidthObserverRelativeWrapper, null));
60
+ }), Create && jsx(Create, null), jsx("div", {
61
+ style: widthObserverContainerStyle
62
+ }, jsx(WidthObserver, {
63
+ offscreen: true,
64
+ setWidth: updateWidth
65
+ })));
71
66
  };
@@ -1,5 +1,4 @@
1
1
  import { gridSize } from '@atlaskit/theme/constants';
2
- import { hexToRGBA } from '../../theme';
3
2
  const margin = `0 ${gridSize() / 2}px`;
4
3
  export const containerCSS = ({
5
4
  mode: {
@@ -16,15 +15,6 @@ export const containerCSS = ({
16
15
  '& > *': {
17
16
  flexShrink: 0,
18
17
  margin
19
- },
20
- '&::after': {
21
- content: '""',
22
- position: 'absolute',
23
- top: 0,
24
- right: 0,
25
- height: '100%',
26
- width: `${gridSize() * 3}px`,
27
- background: `linear-gradient(90deg, ${hexToRGBA(navigation.backgroundColor, 0)} 0%, ${hexToRGBA(navigation.backgroundColor, 0.7)} 50%, ${hexToRGBA(navigation.backgroundColor, 1)} 100%)`
28
18
  }
29
19
  });
30
20
  export const widthObserverContainerStyle = {
@@ -30,7 +30,7 @@ export const productHomeButtonCSS = ({
30
30
  'div&': {
31
31
  pointerEvents: 'none'
32
32
  },
33
- [`@media (max-width: ${PRODUCT_HOME_BREAKPOINT - 1}px)`]: {
33
+ [`@media (max-width: ${PRODUCT_HOME_BREAKPOINT - 0.1}px)`]: {
34
34
  margin: `0 ${gridSize}px`
35
35
  },
36
36
  [`@media (min-width: ${PRODUCT_HOME_BREAKPOINT}px)`]: {
@@ -72,7 +72,7 @@ export const productLogoCSS = logoMaxWidth => ({
72
72
  '& > *': {
73
73
  maxHeight: 24
74
74
  },
75
- [`@media (max-width: ${PRODUCT_HOME_BREAKPOINT - 1}px)`]: {
75
+ [`@media (max-width: ${PRODUCT_HOME_BREAKPOINT - 0.1}px)`]: {
76
76
  display: 'none'
77
77
  }
78
78
  });
@@ -4,24 +4,24 @@ const defaultTheme = {
4
4
  mode: {
5
5
  create: {
6
6
  active: {
7
- color: N0,
8
- backgroundColor: hexToRGBA(B400, 0.8),
9
- boxShadow: '0 0 0 2px transparent'
7
+ color: `var(--ds-text-onBold, ${N0})`,
8
+ backgroundColor: `var(--ds-background-boldBrand-pressed, ${hexToRGBA(B400, 0.8)})`,
9
+ boxShadow: ''
10
10
  },
11
11
  default: {
12
- color: N0,
13
- backgroundColor: B400,
14
- boxShadow: '0 0 0 2px transparent'
12
+ color: `var(--ds-text-onBold, ${N0})`,
13
+ backgroundColor: `var(--ds-background-boldBrand-resting, ${B400})`,
14
+ boxShadow: ''
15
15
  },
16
16
  focus: {
17
- color: N0,
18
- backgroundColor: B400,
19
- boxShadow: '0 0 0 2px rgb(128,169,230)'
17
+ color: `var(--ds-text-onBold, ${N0})`,
18
+ backgroundColor: `var(--ds-background-boldBrand-resting, ${B400})`,
19
+ boxShadow: `0 0 0 2px ${"var(--ds-border-focus, rgb(128,169,230))"}`
20
20
  },
21
21
  hover: {
22
- color: N0,
23
- backgroundColor: hexToRGBA(B400, 0.9),
24
- boxShadow: '0 0 0 2px transparent'
22
+ color: `var(--ds-text-onBold, ${N0})`,
23
+ backgroundColor: `var(--ds-background-boldBrand-hover, ${hexToRGBA(B400, 0.9)})`,
24
+ boxShadow: ''
25
25
  },
26
26
  selected: {
27
27
  color: '',
@@ -31,88 +31,92 @@ const defaultTheme = {
31
31
  },
32
32
  iconButton: {
33
33
  active: {
34
- color: B400,
35
- backgroundColor: hexToRGBA(B50, 0.6),
34
+ color: `var(--ds-text-mediumEmphasis, ${B400})`,
35
+ backgroundColor: `var(--ds-background-subtleNeutral-pressed, ${hexToRGBA(B50, 0.6)})`,
36
36
  boxShadow: ''
37
37
  },
38
38
  default: {
39
- color: N600,
39
+ color: `var(--ds-text-mediumEmphasis, ${N600})`,
40
40
  backgroundColor: 'transparent',
41
41
  boxShadow: ''
42
42
  },
43
43
  focus: {
44
- color: N600,
45
- backgroundColor: hexToRGBA(B50, 0.5),
46
- boxShadow: `0 0 0 2px ${B200}`
44
+ color: `var(--ds-text-mediumEmphasis, ${N600})`,
45
+ backgroundColor: `var(--ds-background-subtleBrand-hover, ${hexToRGBA(B50, 0.5)})`,
46
+ boxShadow: `0 0 0 2px ${`var(--ds-border-focus, ${B200})`}`
47
47
  },
48
48
  hover: {
49
- color: B400,
50
- backgroundColor: hexToRGBA(B50, 0.9),
49
+ color: `var(--ds-text-mediumEmphasis, ${B400})`,
50
+ backgroundColor: `var(--ds-background-subtleNeutral-hover, ${hexToRGBA(B50, 0.9)})`,
51
51
  boxShadow: ''
52
52
  },
53
53
  selected: {
54
- color: '',
55
- backgroundColor: '',
54
+ color: "var(--ds-text-selected)",
55
+ backgroundColor: "var(--ds-background-selected-resting)",
56
56
  boxShadow: ''
57
57
  }
58
58
  },
59
59
  navigation: {
60
- backgroundColor: N0,
61
- color: N200
60
+ backgroundColor: `var(--ds-background-default, ${N0})`,
61
+ color: `var(--ds-text-lowEmphasis, ${N200})`
62
62
  },
63
63
  productHome: {
64
- backgroundColor: B400,
65
- color: N700,
66
- borderRight: `1px solid ${hexToRGBA(N200, 0.3)}`,
64
+ backgroundColor: `var(--ds-text-brand, ${B400})`,
65
+ color: `var(--ds-text-highEmphasis, ${N700})`,
66
+ borderRight: `1px solid ${`var(--ds-border-neutral, ${hexToRGBA(N200, 0.3)})`}`,
67
+ // TODO: (DSP-1256) These colors should be moved into the Logo package
68
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
67
69
  iconGradientStart: B400,
70
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
68
71
  iconGradientStop: B200,
72
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
69
73
  iconColor: B200
70
74
  },
71
75
  primaryButton: {
72
76
  active: {
73
- color: B400,
74
- backgroundColor: hexToRGBA(B50, 0.7),
75
- boxShadow: '0 0 0 2px transparent'
77
+ color: `var(--ds-text-mediumEmphasis, ${B400})`,
78
+ backgroundColor: `var(--ds-background-subtleNeutral-pressed, ${hexToRGBA(B50, 0.7)})`,
79
+ boxShadow: ''
76
80
  },
77
81
  default: {
78
- color: N600,
82
+ color: `var(--ds-text-mediumEmphasis, ${N600})`,
79
83
  backgroundColor: 'transparent',
80
- boxShadow: '0 0 0 2px transparent'
84
+ boxShadow: ''
81
85
  },
82
86
  focus: {
83
- color: N600,
87
+ color: `var(--ds-text-mediumEmphasis, ${N600})`,
84
88
  backgroundColor: '',
85
- boxShadow: `0 0 0 2px ${B200}`
89
+ boxShadow: `0 0 0 2px ${`var(--ds-border-focus, ${B200})`}`
86
90
  },
87
91
  hover: {
88
- color: B400,
89
- backgroundColor: hexToRGBA(B50, 0.9),
90
- boxShadow: '0 0 0 2px transparent'
92
+ color: `var(--ds-text-mediumEmphasis, ${B400})`,
93
+ backgroundColor: `var(--ds-background-subtleNeutral-hover, ${hexToRGBA(B50, 0.9)})`,
94
+ boxShadow: ''
91
95
  },
92
96
  selected: {
93
- color: B400,
94
- backgroundColor: '',
97
+ color: `var(--ds-text-mediumEmphasis, ${B400})`,
98
+ backgroundColor: "var(--ds-background-selected-resting)",
95
99
  boxShadow: '',
96
- borderColor: B400,
97
- bordorBottom: `4px solid ${B400}`
100
+ borderColor: `var(--ds-iconBorder-brand, ${B400})`,
101
+ bordorBottom: `4px solid ${`var(--ds-iconBorder-brand, ${B400})`}`
98
102
  }
99
103
  },
100
104
  search: {
101
105
  default: {
102
- backgroundColor: N0,
103
- color: N200,
104
- borderColor: N40
106
+ backgroundColor: `var(--ds-background-default, ${N0})`,
107
+ color: `var(--ds-text-lowEmphasis, ${N200})`,
108
+ borderColor: `var(--ds-border-neutral, ${N40})`
105
109
  },
106
110
  focus: {
107
- borderColor: B200
111
+ borderColor: `var(--ds-border-focus, ${B200})`
108
112
  },
109
113
  hover: {
110
- color: B400,
111
- backgroundColor: hexToRGBA(B50, 0.9)
114
+ color: `var(--ds-text-brand, ${B400})`,
115
+ backgroundColor: `var(--ds-background-default, ${hexToRGBA(B50, 0.9)})`
112
116
  }
113
117
  },
114
118
  skeleton: {
115
- backgroundColor: N20,
119
+ backgroundColor: `var(--ds-background-subtleNeutral-resting, ${N20})`,
116
120
  opacity: 1
117
121
  }
118
122
  }
@@ -3,7 +3,9 @@ import { DEFAULT_THEME_NAME } from './defaultTheme';
3
3
  import { generateTheme } from './themeGenerator';
4
4
  export const atlassianTheme = generateTheme({
5
5
  name: DEFAULT_THEME_NAME,
6
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
6
7
  backgroundColor: N0,
8
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
7
9
  highlightColor: B400
8
10
  });
9
11
  export const defaultTheme = atlassianTheme;
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/atlassian-navigation",
3
- "version": "1.1.2",
3
+ "version": "1.2.2",
4
4
  "sideEffects": false
5
5
  }
@@ -11,7 +11,7 @@ import { hexToRGBA } from '../../theme';
11
11
  var gridSize = gridSizeFn();
12
12
  export var containerCSS = function containerCSS(_ref) {
13
13
  var navigation = _ref.mode.navigation;
14
- return _objectSpread(_objectSpread({
14
+ return _objectSpread({
15
15
  alignItems: 'center',
16
16
  boxSizing: 'border-box',
17
17
  display: 'flex',
@@ -20,8 +20,28 @@ export var containerCSS = function containerCSS(_ref) {
20
20
  paddingLeft: gridSize * 1.5,
21
21
  paddingRight: gridSize * 1.5,
22
22
  height: HORIZONTAL_GLOBAL_NAV_HEIGHT,
23
- position: 'relative'
24
- }, bottomShadow), navigation);
23
+ position: 'relative',
24
+ '[data-theme="light"] &, [data-theme="dark"] &': {
25
+ // eslint-disable-next-line @atlaskit/design-system/no-unsafe-design-token-usage
26
+ borderBottom: "1px solid ".concat("var(--ds-border-neutral, #091E4224)"),
27
+ // TODO: (DSP-2087) Remove the below once tokens have launched
28
+ '&::after': {
29
+ content: 'none'
30
+ }
31
+ },
32
+ // TODO: (DSP-2087) Remove the below once tokens have launched
33
+ '&::after': {
34
+ content: '""',
35
+ position: 'absolute',
36
+ left: 0,
37
+ right: 0,
38
+ top: '100%',
39
+ height: gridSize / 2,
40
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
41
+ background: "linear-gradient(180deg, ".concat(N40A, " 0, ").concat(N40A, " 1px, ").concat(N30A, " 1px, ").concat(hexToRGBA( // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
42
+ N900, 0), " 4px)")
43
+ }
44
+ }, navigation);
25
45
  };
26
46
  export var leftCSS = {
27
47
  alignItems: 'center',
@@ -41,15 +61,4 @@ export var rightCSS = {
41
61
  flexShrink: 0,
42
62
  marginRight: gridSize / 2
43
63
  }
44
- };
45
- export var bottomShadow = {
46
- '&::after': {
47
- content: '""',
48
- position: 'absolute',
49
- left: 0,
50
- right: 0,
51
- top: '100%',
52
- height: gridSize / 2,
53
- background: "linear-gradient(180deg, ".concat(N40A, " 0, ").concat(N40A, " 1px, ").concat(N30A, " 1px, ").concat(hexToRGBA(N900, 0), " 4px)")
54
- }
55
64
  };
@@ -31,13 +31,13 @@ export var getIconButtonTheme = function getIconButtonTheme(_ref) {
31
31
  }, iconButton.default), {}, {
32
32
  ':hover': iconButton.hover,
33
33
  ':focus': iconButton.focus,
34
- // :active doesn't work in FF, becasue we do a
34
+ // :active doesn't work in FF, because we do a
35
35
  // e.preventDefault() on mouse down in Button.
36
36
  // '&&' is required to add more CSS specificity
37
37
  // && it not a valid CSSObject property
38
38
  // @ts-ignore
39
39
  '&&': _objectSpread({}, props.state === 'active' && iconButton.active)
40
- }, props.state === 'selected' && iconButton.active), {}, {
40
+ }, props.state === 'selected' && iconButton.selected), {}, {
41
41
  '> span': {
42
42
  margin: 0
43
43
  }
@@ -22,14 +22,14 @@ export var getPrimaryButtonTheme = function getPrimaryButtonTheme(_ref) {
22
22
  spinnerStyles = _current.spinnerStyles;
23
23
 
24
24
  return {
25
- buttonStyles: _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, buttonStyles), primaryButton.default), props.isSelected && primaryButton.active), {}, {
25
+ buttonStyles: _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, buttonStyles), primaryButton.default), props.isSelected && primaryButton.selected), {}, {
26
26
  fontWeight: 500,
27
27
  padding: '0 4px',
28
28
  marginLeft: 0,
29
29
  marginRight: 0,
30
30
  ':hover': primaryButton.hover,
31
31
  ':focus': primaryButton.focus,
32
- // :active doesn't work in FF, becasue we do a
32
+ // :active doesn't work in FF, because we do a
33
33
  // e.preventDefault() on mouse down in Button.
34
34
  // '&&' is required to add more CSS specificity
35
35
  // && it not a valid CSSObject property
@@ -42,16 +42,6 @@ export var PrimaryItemsContainer = function PrimaryItemsContainer(_ref) {
42
42
  testId: testId ? "".concat(testId, "-overflow-menu-trigger") : 'overflow-menu-trigger'
43
43
  }, triggerProps), moreLabel);
44
44
  }, [moreLabel, onMoreClick, isMoreOpen, testId]);
45
-
46
- var WidthObserverRelativeWrapper = function WidthObserverRelativeWrapper() {
47
- return jsx("div", {
48
- style: widthObserverContainerStyle
49
- }, jsx(WidthObserver, {
50
- offscreen: true,
51
- setWidth: updateWidth
52
- }));
53
- };
54
-
55
45
  var content = useCallback(function () {
56
46
  return jsx(OverflowProvider, {
57
47
  isVisible: false,
@@ -76,5 +66,10 @@ export var PrimaryItemsContainer = function PrimaryItemsContainer(_ref) {
76
66
  onClose: onMoreClose,
77
67
  trigger: trigger,
78
68
  testId: testId ? "".concat(testId, "-overflow-menu-popup") : 'overflow-menu-popup'
79
- }), Create && jsx(Create, null), jsx(WidthObserverRelativeWrapper, null));
69
+ }), Create && jsx(Create, null), jsx("div", {
70
+ style: widthObserverContainerStyle
71
+ }, jsx(WidthObserver, {
72
+ offscreen: true,
73
+ setWidth: updateWidth
74
+ })));
80
75
  };
@@ -1,5 +1,4 @@
1
1
  import { gridSize } from '@atlaskit/theme/constants';
2
- import { hexToRGBA } from '../../theme';
3
2
  var margin = "0 ".concat(gridSize() / 2, "px");
4
3
  export var containerCSS = function containerCSS(_ref) {
5
4
  var navigation = _ref.mode.navigation;
@@ -14,15 +13,6 @@ export var containerCSS = function containerCSS(_ref) {
14
13
  '& > *': {
15
14
  flexShrink: 0,
16
15
  margin: margin
17
- },
18
- '&::after': {
19
- content: '""',
20
- position: 'absolute',
21
- top: 0,
22
- right: 0,
23
- height: '100%',
24
- width: "".concat(gridSize() * 3, "px"),
25
- background: "linear-gradient(90deg, ".concat(hexToRGBA(navigation.backgroundColor, 0), " 0%, ").concat(hexToRGBA(navigation.backgroundColor, 0.7), " 50%, ").concat(hexToRGBA(navigation.backgroundColor, 1), " 100%)")
26
16
  }
27
17
  };
28
18
  };
@@ -35,7 +35,7 @@ export var productHomeButtonCSS = function productHomeButtonCSS(_ref) {
35
35
  'div&': {
36
36
  pointerEvents: 'none'
37
37
  }
38
- }, _defineProperty(_ref2, "@media (max-width: ".concat(PRODUCT_HOME_BREAKPOINT - 1, "px)"), {
38
+ }, _defineProperty(_ref2, "@media (max-width: ".concat(PRODUCT_HOME_BREAKPOINT - 0.1, "px)"), {
39
39
  margin: "0 ".concat(gridSize, "px")
40
40
  }), _defineProperty(_ref2, "@media (min-width: ".concat(PRODUCT_HOME_BREAKPOINT, "px)"), {
41
41
  margin: "0 ".concat(gridSize * 2, "px")
@@ -73,7 +73,7 @@ export var productLogoCSS = function productLogoCSS(logoMaxWidth) {
73
73
  '& > *': {
74
74
  maxHeight: 24
75
75
  }
76
- }, "@media (max-width: ".concat(PRODUCT_HOME_BREAKPOINT - 1, "px)"), {
76
+ }, "@media (max-width: ".concat(PRODUCT_HOME_BREAKPOINT - 0.1, "px)"), {
77
77
  display: 'none'
78
78
  });
79
79
  };
@@ -4,24 +4,24 @@ var defaultTheme = {
4
4
  mode: {
5
5
  create: {
6
6
  active: {
7
- color: N0,
8
- backgroundColor: hexToRGBA(B400, 0.8),
9
- boxShadow: '0 0 0 2px transparent'
7
+ color: "var(--ds-text-onBold, ".concat(N0, ")"),
8
+ backgroundColor: "var(--ds-background-boldBrand-pressed, ".concat(hexToRGBA(B400, 0.8), ")"),
9
+ boxShadow: ''
10
10
  },
11
11
  default: {
12
- color: N0,
13
- backgroundColor: B400,
14
- boxShadow: '0 0 0 2px transparent'
12
+ color: "var(--ds-text-onBold, ".concat(N0, ")"),
13
+ backgroundColor: "var(--ds-background-boldBrand-resting, ".concat(B400, ")"),
14
+ boxShadow: ''
15
15
  },
16
16
  focus: {
17
- color: N0,
18
- backgroundColor: B400,
19
- boxShadow: '0 0 0 2px rgb(128,169,230)'
17
+ color: "var(--ds-text-onBold, ".concat(N0, ")"),
18
+ backgroundColor: "var(--ds-background-boldBrand-resting, ".concat(B400, ")"),
19
+ boxShadow: "0 0 0 2px ".concat("var(--ds-border-focus, rgb(128,169,230))")
20
20
  },
21
21
  hover: {
22
- color: N0,
23
- backgroundColor: hexToRGBA(B400, 0.9),
24
- boxShadow: '0 0 0 2px transparent'
22
+ color: "var(--ds-text-onBold, ".concat(N0, ")"),
23
+ backgroundColor: "var(--ds-background-boldBrand-hover, ".concat(hexToRGBA(B400, 0.9), ")"),
24
+ boxShadow: ''
25
25
  },
26
26
  selected: {
27
27
  color: '',
@@ -31,88 +31,92 @@ var defaultTheme = {
31
31
  },
32
32
  iconButton: {
33
33
  active: {
34
- color: B400,
35
- backgroundColor: hexToRGBA(B50, 0.6),
34
+ color: "var(--ds-text-mediumEmphasis, ".concat(B400, ")"),
35
+ backgroundColor: "var(--ds-background-subtleNeutral-pressed, ".concat(hexToRGBA(B50, 0.6), ")"),
36
36
  boxShadow: ''
37
37
  },
38
38
  default: {
39
- color: N600,
39
+ color: "var(--ds-text-mediumEmphasis, ".concat(N600, ")"),
40
40
  backgroundColor: 'transparent',
41
41
  boxShadow: ''
42
42
  },
43
43
  focus: {
44
- color: N600,
45
- backgroundColor: hexToRGBA(B50, 0.5),
46
- boxShadow: "0 0 0 2px ".concat(B200)
44
+ color: "var(--ds-text-mediumEmphasis, ".concat(N600, ")"),
45
+ backgroundColor: "var(--ds-background-subtleBrand-hover, ".concat(hexToRGBA(B50, 0.5), ")"),
46
+ boxShadow: "0 0 0 2px ".concat("var(--ds-border-focus, ".concat(B200, ")"))
47
47
  },
48
48
  hover: {
49
- color: B400,
50
- backgroundColor: hexToRGBA(B50, 0.9),
49
+ color: "var(--ds-text-mediumEmphasis, ".concat(B400, ")"),
50
+ backgroundColor: "var(--ds-background-subtleNeutral-hover, ".concat(hexToRGBA(B50, 0.9), ")"),
51
51
  boxShadow: ''
52
52
  },
53
53
  selected: {
54
- color: '',
55
- backgroundColor: '',
54
+ color: "var(--ds-text-selected)",
55
+ backgroundColor: "var(--ds-background-selected-resting)",
56
56
  boxShadow: ''
57
57
  }
58
58
  },
59
59
  navigation: {
60
- backgroundColor: N0,
61
- color: N200
60
+ backgroundColor: "var(--ds-background-default, ".concat(N0, ")"),
61
+ color: "var(--ds-text-lowEmphasis, ".concat(N200, ")")
62
62
  },
63
63
  productHome: {
64
- backgroundColor: B400,
65
- color: N700,
66
- borderRight: "1px solid ".concat(hexToRGBA(N200, 0.3)),
64
+ backgroundColor: "var(--ds-text-brand, ".concat(B400, ")"),
65
+ color: "var(--ds-text-highEmphasis, ".concat(N700, ")"),
66
+ borderRight: "1px solid ".concat("var(--ds-border-neutral, ".concat(hexToRGBA(N200, 0.3), ")")),
67
+ // TODO: (DSP-1256) These colors should be moved into the Logo package
68
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
67
69
  iconGradientStart: B400,
70
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
68
71
  iconGradientStop: B200,
72
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
69
73
  iconColor: B200
70
74
  },
71
75
  primaryButton: {
72
76
  active: {
73
- color: B400,
74
- backgroundColor: hexToRGBA(B50, 0.7),
75
- boxShadow: '0 0 0 2px transparent'
77
+ color: "var(--ds-text-mediumEmphasis, ".concat(B400, ")"),
78
+ backgroundColor: "var(--ds-background-subtleNeutral-pressed, ".concat(hexToRGBA(B50, 0.7), ")"),
79
+ boxShadow: ''
76
80
  },
77
81
  default: {
78
- color: N600,
82
+ color: "var(--ds-text-mediumEmphasis, ".concat(N600, ")"),
79
83
  backgroundColor: 'transparent',
80
- boxShadow: '0 0 0 2px transparent'
84
+ boxShadow: ''
81
85
  },
82
86
  focus: {
83
- color: N600,
87
+ color: "var(--ds-text-mediumEmphasis, ".concat(N600, ")"),
84
88
  backgroundColor: '',
85
- boxShadow: "0 0 0 2px ".concat(B200)
89
+ boxShadow: "0 0 0 2px ".concat("var(--ds-border-focus, ".concat(B200, ")"))
86
90
  },
87
91
  hover: {
88
- color: B400,
89
- backgroundColor: hexToRGBA(B50, 0.9),
90
- boxShadow: '0 0 0 2px transparent'
92
+ color: "var(--ds-text-mediumEmphasis, ".concat(B400, ")"),
93
+ backgroundColor: "var(--ds-background-subtleNeutral-hover, ".concat(hexToRGBA(B50, 0.9), ")"),
94
+ boxShadow: ''
91
95
  },
92
96
  selected: {
93
- color: B400,
94
- backgroundColor: '',
97
+ color: "var(--ds-text-mediumEmphasis, ".concat(B400, ")"),
98
+ backgroundColor: "var(--ds-background-selected-resting)",
95
99
  boxShadow: '',
96
- borderColor: B400,
97
- bordorBottom: "4px solid ".concat(B400)
100
+ borderColor: "var(--ds-iconBorder-brand, ".concat(B400, ")"),
101
+ bordorBottom: "4px solid ".concat("var(--ds-iconBorder-brand, ".concat(B400, ")"))
98
102
  }
99
103
  },
100
104
  search: {
101
105
  default: {
102
- backgroundColor: N0,
103
- color: N200,
104
- borderColor: N40
106
+ backgroundColor: "var(--ds-background-default, ".concat(N0, ")"),
107
+ color: "var(--ds-text-lowEmphasis, ".concat(N200, ")"),
108
+ borderColor: "var(--ds-border-neutral, ".concat(N40, ")")
105
109
  },
106
110
  focus: {
107
- borderColor: B200
111
+ borderColor: "var(--ds-border-focus, ".concat(B200, ")")
108
112
  },
109
113
  hover: {
110
- color: B400,
111
- backgroundColor: hexToRGBA(B50, 0.9)
114
+ color: "var(--ds-text-brand, ".concat(B400, ")"),
115
+ backgroundColor: "var(--ds-background-default, ".concat(hexToRGBA(B50, 0.9), ")")
112
116
  }
113
117
  },
114
118
  skeleton: {
115
- backgroundColor: N20,
119
+ backgroundColor: "var(--ds-background-subtleNeutral-resting, ".concat(N20, ")"),
116
120
  opacity: 1
117
121
  }
118
122
  }
@@ -3,7 +3,9 @@ import { DEFAULT_THEME_NAME } from './defaultTheme';
3
3
  import { generateTheme } from './themeGenerator';
4
4
  export var atlassianTheme = generateTheme({
5
5
  name: DEFAULT_THEME_NAME,
6
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
6
7
  backgroundColor: N0,
8
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
7
9
  highlightColor: B400
8
10
  });
9
11
  export var defaultTheme = atlassianTheme;
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/atlassian-navigation",
3
- "version": "1.1.2",
3
+ "version": "1.2.2",
4
4
  "sideEffects": false
5
5
  }
@@ -20,14 +20,3 @@ export declare const rightCSS: {
20
20
  marginRight: number;
21
21
  };
22
22
  };
23
- export declare const bottomShadow: {
24
- '&::after': {
25
- content: string;
26
- position: string;
27
- left: number;
28
- right: number;
29
- top: string;
30
- height: number;
31
- background: string;
32
- };
33
- };
@@ -58,6 +58,23 @@ export interface BaseIconButtonProps {
58
58
  * If defining `href` you may want to define `target` as well.
59
59
  */
60
60
  target?: string;
61
+ /**
62
+ * Allows for overriding the component used to render the button.
63
+ *
64
+ * This is primarily intended for compatibility with custom
65
+ * routing libraries when using the `href` prop.
66
+ *
67
+ * For further usage information, refer to the [documentation for button](https://atlassian.design/components/button/code).
68
+ *
69
+ * @example
70
+ * ```tsx
71
+ * <Settings
72
+ * component={CustomRouterLink}
73
+ * href="/path/to/url"
74
+ * />
75
+ * ```
76
+ */
77
+ component?: CustomThemeButtonProps['component'];
61
78
  /**
62
79
  * Handler for the mouse up event.
63
80
  */
@@ -66,6 +83,10 @@ export interface BaseIconButtonProps {
66
83
  * Handler called when the button gains focus.
67
84
  */
68
85
  onFocus?: React.FocusEventHandler<HTMLElement>;
86
+ /**
87
+ * Handler called when the button loses focus.
88
+ */
89
+ onBlur?: React.FocusEventHandler<HTMLElement>;
69
90
  /**
70
91
  * Makes the element appear selected.
71
92
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/atlassian-navigation",
3
- "version": "1.1.2",
3
+ "version": "1.2.2",
4
4
  "description": "A horizontal navigation component for Atlassian products.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -25,11 +25,12 @@
25
25
  "dependencies": {
26
26
  "@atlaskit/analytics-namespaced-context": "^6.3.0",
27
27
  "@atlaskit/button": "^16.0.0",
28
- "@atlaskit/icon": "^21.4.0",
28
+ "@atlaskit/icon": "^21.9.0",
29
29
  "@atlaskit/logo": "*",
30
30
  "@atlaskit/popup": "^1.1.0",
31
- "@atlaskit/theme": "^11.4.0",
32
- "@atlaskit/tooltip": "^17.0.0",
31
+ "@atlaskit/theme": "^12.0.0",
32
+ "@atlaskit/tokens": "^0.4.0",
33
+ "@atlaskit/tooltip": "^17.5.0",
33
34
  "@atlaskit/width-detector": "^3.0.0",
34
35
  "@babel/runtime": "^7.0.0",
35
36
  "@emotion/core": "^10.0.9",
@@ -65,18 +66,10 @@
65
66
  "import-structure": "atlassian-conventions"
66
67
  },
67
68
  "@repo/internal": {
68
- "ui-components": [
69
- "lite-mode"
70
- ],
71
- "analytics": [
72
- "analytics-next"
73
- ],
74
- "theming": [
75
- "new-theming-api"
76
- ],
77
- "deprecation": [
78
- "no-deprecated-imports"
79
- ]
69
+ "ui-components": "lite-mode",
70
+ "analytics": "analytics-next",
71
+ "theming": "tokens",
72
+ "deprecation": "no-deprecated-imports"
80
73
  }
81
74
  },
82
75
  "prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1"