@atlaskit/atlassian-navigation 1.1.3 → 1.3.0

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 (37) hide show
  1. package/CHANGELOG.md +55 -0
  2. package/dist/cjs/common/constants.js +1 -1
  3. package/dist/cjs/components/AtlassianNavigation/styles.js +25 -17
  4. package/dist/cjs/components/IconButton/styles.js +3 -3
  5. package/dist/cjs/components/PrimaryButton/styles.js +3 -3
  6. package/dist/cjs/components/PrimaryItemsContainer/index.js +6 -11
  7. package/dist/cjs/components/PrimaryItemsContainer/styles.js +1 -12
  8. package/dist/cjs/components/ProductHome/index.js +4 -4
  9. package/dist/cjs/components/ProductHome/styles.js +1 -1
  10. package/dist/cjs/components/Search/styles.js +1 -1
  11. package/dist/cjs/controllers/overflow/index.js +1 -1
  12. package/dist/cjs/index.js +26 -26
  13. package/dist/cjs/theme/defaultTheme.js +52 -48
  14. package/dist/cjs/theme/index.js +8 -8
  15. package/dist/cjs/theme/themeGenerator.js +1 -1
  16. package/dist/cjs/theme/themeHelpers.js +1 -1
  17. package/dist/cjs/theme/themes.js +2 -0
  18. package/dist/cjs/version.json +1 -1
  19. package/dist/es2019/components/AtlassianNavigation/styles.js +20 -12
  20. package/dist/es2019/components/IconButton/styles.js +2 -2
  21. package/dist/es2019/components/PrimaryButton/styles.js +2 -2
  22. package/dist/es2019/components/PrimaryItemsContainer/index.js +6 -11
  23. package/dist/es2019/components/PrimaryItemsContainer/styles.js +0 -10
  24. package/dist/es2019/theme/defaultTheme.js +52 -48
  25. package/dist/es2019/theme/themes.js +2 -0
  26. package/dist/es2019/version.json +1 -1
  27. package/dist/esm/components/AtlassianNavigation/styles.js +23 -14
  28. package/dist/esm/components/IconButton/styles.js +2 -2
  29. package/dist/esm/components/PrimaryButton/styles.js +2 -2
  30. package/dist/esm/components/PrimaryItemsContainer/index.js +6 -11
  31. package/dist/esm/components/PrimaryItemsContainer/styles.js +0 -10
  32. package/dist/esm/theme/defaultTheme.js +52 -48
  33. package/dist/esm/theme/themes.js +2 -0
  34. package/dist/esm/version.json +1 -1
  35. package/dist/types/components/AtlassianNavigation/styles.d.ts +0 -11
  36. package/dist/types/components/IconButton/types.d.ts +21 -0
  37. package/package.json +6 -13
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/atlassian-navigation",
3
- "version": "1.1.3",
3
+ "version": "1.3.0",
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 = {
@@ -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.3",
3
+ "version": "1.3.0",
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
  };
@@ -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.3",
3
+ "version": "1.3.0",
4
4
  "sideEffects": false
5
5
  }