@atlaskit/atlassian-navigation 1.2.1 → 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.
- package/CHANGELOG.md +30 -0
- package/dist/cjs/components/AtlassianNavigation/styles.js +2 -4
- package/dist/cjs/components/PrimaryItemsContainer/index.js +6 -11
- package/dist/cjs/theme/defaultTheme.js +42 -44
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/components/AtlassianNavigation/styles.js +2 -3
- package/dist/es2019/components/PrimaryItemsContainer/index.js +6 -11
- package/dist/es2019/theme/defaultTheme.js +42 -43
- package/dist/es2019/version.json +1 -1
- package/dist/esm/components/AtlassianNavigation/styles.js +2 -3
- package/dist/esm/components/PrimaryItemsContainer/index.js +6 -11
- package/dist/esm/theme/defaultTheme.js +42 -43
- package/dist/esm/version.json +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,35 @@
|
|
|
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
|
+
|
|
3
33
|
## 1.2.1
|
|
4
34
|
|
|
5
35
|
### Patch Changes
|
|
@@ -13,8 +13,6 @@ var _colors = require("@atlaskit/theme/colors");
|
|
|
13
13
|
|
|
14
14
|
var _constants = require("@atlaskit/theme/constants");
|
|
15
15
|
|
|
16
|
-
var _tokens = require("@atlaskit/tokens");
|
|
17
|
-
|
|
18
16
|
var _constants2 = require("../../common/constants");
|
|
19
17
|
|
|
20
18
|
var _theme = require("../../theme");
|
|
@@ -38,8 +36,8 @@ var containerCSS = function containerCSS(_ref) {
|
|
|
38
36
|
height: _constants2.HORIZONTAL_GLOBAL_NAV_HEIGHT,
|
|
39
37
|
position: 'relative',
|
|
40
38
|
'[data-theme="light"] &, [data-theme="dark"] &': {
|
|
41
|
-
// eslint-disable-next-line @atlaskit/design-system/
|
|
42
|
-
borderBottom: "1px solid ".concat((
|
|
39
|
+
// eslint-disable-next-line @atlaskit/design-system/no-unsafe-design-token-usage
|
|
40
|
+
borderBottom: "1px solid ".concat("var(--ds-border-neutral, #091E4224)"),
|
|
43
41
|
// TODO: (DSP-2087) Remove the below once tokens have launched
|
|
44
42
|
'&::after': {
|
|
45
43
|
content: 'none'
|
|
@@ -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)(
|
|
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,31 +7,29 @@ exports.default = exports.DEFAULT_THEME_NAME = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _colors = require("@atlaskit/theme/colors");
|
|
9
9
|
|
|
10
|
-
var _tokens = require("@atlaskit/tokens");
|
|
11
|
-
|
|
12
10
|
var _themeHelpers = require("./themeHelpers");
|
|
13
11
|
|
|
14
12
|
var defaultTheme = {
|
|
15
13
|
mode: {
|
|
16
14
|
create: {
|
|
17
15
|
active: {
|
|
18
|
-
color: (
|
|
19
|
-
backgroundColor: (
|
|
16
|
+
color: "var(--ds-text-onBold, ".concat(_colors.N0, ")"),
|
|
17
|
+
backgroundColor: "var(--ds-background-boldBrand-pressed, ".concat((0, _themeHelpers.hexToRGBA)(_colors.B400, 0.8), ")"),
|
|
20
18
|
boxShadow: ''
|
|
21
19
|
},
|
|
22
20
|
default: {
|
|
23
|
-
color: (
|
|
24
|
-
backgroundColor: (
|
|
21
|
+
color: "var(--ds-text-onBold, ".concat(_colors.N0, ")"),
|
|
22
|
+
backgroundColor: "var(--ds-background-boldBrand-resting, ".concat(_colors.B400, ")"),
|
|
25
23
|
boxShadow: ''
|
|
26
24
|
},
|
|
27
25
|
focus: {
|
|
28
|
-
color: (
|
|
29
|
-
backgroundColor: (
|
|
30
|
-
boxShadow: "0 0 0 2px ".concat((
|
|
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))")
|
|
31
29
|
},
|
|
32
30
|
hover: {
|
|
33
|
-
color: (
|
|
34
|
-
backgroundColor: (
|
|
31
|
+
color: "var(--ds-text-onBold, ".concat(_colors.N0, ")"),
|
|
32
|
+
backgroundColor: "var(--ds-background-boldBrand-hover, ".concat((0, _themeHelpers.hexToRGBA)(_colors.B400, 0.9), ")"),
|
|
35
33
|
boxShadow: ''
|
|
36
34
|
},
|
|
37
35
|
selected: {
|
|
@@ -42,39 +40,39 @@ var defaultTheme = {
|
|
|
42
40
|
},
|
|
43
41
|
iconButton: {
|
|
44
42
|
active: {
|
|
45
|
-
color: (
|
|
46
|
-
backgroundColor: (
|
|
43
|
+
color: "var(--ds-text-mediumEmphasis, ".concat(_colors.B400, ")"),
|
|
44
|
+
backgroundColor: "var(--ds-background-subtleNeutral-pressed, ".concat((0, _themeHelpers.hexToRGBA)(_colors.B50, 0.6), ")"),
|
|
47
45
|
boxShadow: ''
|
|
48
46
|
},
|
|
49
47
|
default: {
|
|
50
|
-
color: (
|
|
48
|
+
color: "var(--ds-text-mediumEmphasis, ".concat(_colors.N600, ")"),
|
|
51
49
|
backgroundColor: 'transparent',
|
|
52
50
|
boxShadow: ''
|
|
53
51
|
},
|
|
54
52
|
focus: {
|
|
55
|
-
color: (
|
|
56
|
-
backgroundColor: (
|
|
57
|
-
boxShadow: "0 0 0 2px ".concat((
|
|
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, ")"))
|
|
58
56
|
},
|
|
59
57
|
hover: {
|
|
60
|
-
color: (
|
|
61
|
-
backgroundColor: (
|
|
58
|
+
color: "var(--ds-text-mediumEmphasis, ".concat(_colors.B400, ")"),
|
|
59
|
+
backgroundColor: "var(--ds-background-subtleNeutral-hover, ".concat((0, _themeHelpers.hexToRGBA)(_colors.B50, 0.9), ")"),
|
|
62
60
|
boxShadow: ''
|
|
63
61
|
},
|
|
64
62
|
selected: {
|
|
65
|
-
color: (
|
|
66
|
-
backgroundColor: (
|
|
63
|
+
color: "var(--ds-text-selected)",
|
|
64
|
+
backgroundColor: "var(--ds-background-selected-resting)",
|
|
67
65
|
boxShadow: ''
|
|
68
66
|
}
|
|
69
67
|
},
|
|
70
68
|
navigation: {
|
|
71
|
-
backgroundColor: (
|
|
72
|
-
color: (
|
|
69
|
+
backgroundColor: "var(--ds-background-default, ".concat(_colors.N0, ")"),
|
|
70
|
+
color: "var(--ds-text-lowEmphasis, ".concat(_colors.N200, ")")
|
|
73
71
|
},
|
|
74
72
|
productHome: {
|
|
75
|
-
backgroundColor: (
|
|
76
|
-
color: (
|
|
77
|
-
borderRight: "1px solid ".concat((
|
|
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), ")")),
|
|
78
76
|
// TODO: (DSP-1256) These colors should be moved into the Logo package
|
|
79
77
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
80
78
|
iconGradientStart: _colors.B400,
|
|
@@ -85,49 +83,49 @@ var defaultTheme = {
|
|
|
85
83
|
},
|
|
86
84
|
primaryButton: {
|
|
87
85
|
active: {
|
|
88
|
-
color: (
|
|
89
|
-
backgroundColor: (
|
|
86
|
+
color: "var(--ds-text-mediumEmphasis, ".concat(_colors.B400, ")"),
|
|
87
|
+
backgroundColor: "var(--ds-background-subtleNeutral-pressed, ".concat((0, _themeHelpers.hexToRGBA)(_colors.B50, 0.7), ")"),
|
|
90
88
|
boxShadow: ''
|
|
91
89
|
},
|
|
92
90
|
default: {
|
|
93
|
-
color: (
|
|
91
|
+
color: "var(--ds-text-mediumEmphasis, ".concat(_colors.N600, ")"),
|
|
94
92
|
backgroundColor: 'transparent',
|
|
95
93
|
boxShadow: ''
|
|
96
94
|
},
|
|
97
95
|
focus: {
|
|
98
|
-
color: (
|
|
96
|
+
color: "var(--ds-text-mediumEmphasis, ".concat(_colors.N600, ")"),
|
|
99
97
|
backgroundColor: '',
|
|
100
|
-
boxShadow: "0 0 0 2px ".concat((
|
|
98
|
+
boxShadow: "0 0 0 2px ".concat("var(--ds-border-focus, ".concat(_colors.B200, ")"))
|
|
101
99
|
},
|
|
102
100
|
hover: {
|
|
103
|
-
color: (
|
|
104
|
-
backgroundColor: (
|
|
101
|
+
color: "var(--ds-text-mediumEmphasis, ".concat(_colors.B400, ")"),
|
|
102
|
+
backgroundColor: "var(--ds-background-subtleNeutral-hover, ".concat((0, _themeHelpers.hexToRGBA)(_colors.B50, 0.9), ")"),
|
|
105
103
|
boxShadow: ''
|
|
106
104
|
},
|
|
107
105
|
selected: {
|
|
108
|
-
color: (
|
|
109
|
-
backgroundColor: (
|
|
106
|
+
color: "var(--ds-text-mediumEmphasis, ".concat(_colors.B400, ")"),
|
|
107
|
+
backgroundColor: "var(--ds-background-selected-resting)",
|
|
110
108
|
boxShadow: '',
|
|
111
|
-
borderColor: (
|
|
112
|
-
bordorBottom: "4px solid ".concat((
|
|
109
|
+
borderColor: "var(--ds-iconBorder-brand, ".concat(_colors.B400, ")"),
|
|
110
|
+
bordorBottom: "4px solid ".concat("var(--ds-iconBorder-brand, ".concat(_colors.B400, ")"))
|
|
113
111
|
}
|
|
114
112
|
},
|
|
115
113
|
search: {
|
|
116
114
|
default: {
|
|
117
|
-
backgroundColor: (
|
|
118
|
-
color: (
|
|
119
|
-
borderColor: (
|
|
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, ")")
|
|
120
118
|
},
|
|
121
119
|
focus: {
|
|
122
|
-
borderColor: (
|
|
120
|
+
borderColor: "var(--ds-border-focus, ".concat(_colors.B200, ")")
|
|
123
121
|
},
|
|
124
122
|
hover: {
|
|
125
|
-
color: (
|
|
126
|
-
backgroundColor: (
|
|
123
|
+
color: "var(--ds-text-brand, ".concat(_colors.B400, ")"),
|
|
124
|
+
backgroundColor: "var(--ds-background-default, ".concat((0, _themeHelpers.hexToRGBA)(_colors.B50, 0.9), ")")
|
|
127
125
|
}
|
|
128
126
|
},
|
|
129
127
|
skeleton: {
|
|
130
|
-
backgroundColor: (
|
|
128
|
+
backgroundColor: "var(--ds-background-subtleNeutral-resting, ".concat(_colors.N20, ")"),
|
|
131
129
|
opacity: 1
|
|
132
130
|
}
|
|
133
131
|
}
|
package/dist/cjs/version.json
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { N30A, N40A, N900 } from '@atlaskit/theme/colors';
|
|
2
2
|
import { gridSize as gridSizeFn } from '@atlaskit/theme/constants';
|
|
3
|
-
import { token } from '@atlaskit/tokens';
|
|
4
3
|
import { HORIZONTAL_GLOBAL_NAV_HEIGHT } from '../../common/constants';
|
|
5
4
|
import { hexToRGBA } from '../../theme';
|
|
6
5
|
const gridSize = gridSizeFn();
|
|
@@ -19,8 +18,8 @@ export const containerCSS = ({
|
|
|
19
18
|
height: HORIZONTAL_GLOBAL_NAV_HEIGHT,
|
|
20
19
|
position: 'relative',
|
|
21
20
|
'[data-theme="light"] &, [data-theme="dark"] &': {
|
|
22
|
-
// eslint-disable-next-line @atlaskit/design-system/
|
|
23
|
-
borderBottom: `1px solid ${
|
|
21
|
+
// eslint-disable-next-line @atlaskit/design-system/no-unsafe-design-token-usage
|
|
22
|
+
borderBottom: `1px solid ${"var(--ds-border-neutral, #091E4224)"}`,
|
|
24
23
|
// TODO: (DSP-2087) Remove the below once tokens have launched
|
|
25
24
|
'&::after': {
|
|
26
25
|
content: 'none'
|
|
@@ -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(
|
|
60
|
+
}), Create && jsx(Create, null), jsx("div", {
|
|
61
|
+
style: widthObserverContainerStyle
|
|
62
|
+
}, jsx(WidthObserver, {
|
|
63
|
+
offscreen: true,
|
|
64
|
+
setWidth: updateWidth
|
|
65
|
+
})));
|
|
71
66
|
};
|
|
@@ -1,27 +1,26 @@
|
|
|
1
1
|
import { B200, B400, B50, N0, N20, N200, N40, N600, N700 } from '@atlaskit/theme/colors';
|
|
2
|
-
import { token } from '@atlaskit/tokens';
|
|
3
2
|
import { hexToRGBA } from './themeHelpers';
|
|
4
3
|
const defaultTheme = {
|
|
5
4
|
mode: {
|
|
6
5
|
create: {
|
|
7
6
|
active: {
|
|
8
|
-
color:
|
|
9
|
-
backgroundColor:
|
|
7
|
+
color: `var(--ds-text-onBold, ${N0})`,
|
|
8
|
+
backgroundColor: `var(--ds-background-boldBrand-pressed, ${hexToRGBA(B400, 0.8)})`,
|
|
10
9
|
boxShadow: ''
|
|
11
10
|
},
|
|
12
11
|
default: {
|
|
13
|
-
color:
|
|
14
|
-
backgroundColor:
|
|
12
|
+
color: `var(--ds-text-onBold, ${N0})`,
|
|
13
|
+
backgroundColor: `var(--ds-background-boldBrand-resting, ${B400})`,
|
|
15
14
|
boxShadow: ''
|
|
16
15
|
},
|
|
17
16
|
focus: {
|
|
18
|
-
color:
|
|
19
|
-
backgroundColor:
|
|
20
|
-
boxShadow: `0 0 0 2px ${
|
|
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))"}`
|
|
21
20
|
},
|
|
22
21
|
hover: {
|
|
23
|
-
color:
|
|
24
|
-
backgroundColor:
|
|
22
|
+
color: `var(--ds-text-onBold, ${N0})`,
|
|
23
|
+
backgroundColor: `var(--ds-background-boldBrand-hover, ${hexToRGBA(B400, 0.9)})`,
|
|
25
24
|
boxShadow: ''
|
|
26
25
|
},
|
|
27
26
|
selected: {
|
|
@@ -32,39 +31,39 @@ const defaultTheme = {
|
|
|
32
31
|
},
|
|
33
32
|
iconButton: {
|
|
34
33
|
active: {
|
|
35
|
-
color:
|
|
36
|
-
backgroundColor:
|
|
34
|
+
color: `var(--ds-text-mediumEmphasis, ${B400})`,
|
|
35
|
+
backgroundColor: `var(--ds-background-subtleNeutral-pressed, ${hexToRGBA(B50, 0.6)})`,
|
|
37
36
|
boxShadow: ''
|
|
38
37
|
},
|
|
39
38
|
default: {
|
|
40
|
-
color:
|
|
39
|
+
color: `var(--ds-text-mediumEmphasis, ${N600})`,
|
|
41
40
|
backgroundColor: 'transparent',
|
|
42
41
|
boxShadow: ''
|
|
43
42
|
},
|
|
44
43
|
focus: {
|
|
45
|
-
color:
|
|
46
|
-
backgroundColor:
|
|
47
|
-
boxShadow: `0 0 0 2px ${
|
|
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})`}`
|
|
48
47
|
},
|
|
49
48
|
hover: {
|
|
50
|
-
color:
|
|
51
|
-
backgroundColor:
|
|
49
|
+
color: `var(--ds-text-mediumEmphasis, ${B400})`,
|
|
50
|
+
backgroundColor: `var(--ds-background-subtleNeutral-hover, ${hexToRGBA(B50, 0.9)})`,
|
|
52
51
|
boxShadow: ''
|
|
53
52
|
},
|
|
54
53
|
selected: {
|
|
55
|
-
color:
|
|
56
|
-
backgroundColor:
|
|
54
|
+
color: "var(--ds-text-selected)",
|
|
55
|
+
backgroundColor: "var(--ds-background-selected-resting)",
|
|
57
56
|
boxShadow: ''
|
|
58
57
|
}
|
|
59
58
|
},
|
|
60
59
|
navigation: {
|
|
61
|
-
backgroundColor:
|
|
62
|
-
color:
|
|
60
|
+
backgroundColor: `var(--ds-background-default, ${N0})`,
|
|
61
|
+
color: `var(--ds-text-lowEmphasis, ${N200})`
|
|
63
62
|
},
|
|
64
63
|
productHome: {
|
|
65
|
-
backgroundColor:
|
|
66
|
-
color:
|
|
67
|
-
borderRight: `1px solid ${
|
|
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)})`}`,
|
|
68
67
|
// TODO: (DSP-1256) These colors should be moved into the Logo package
|
|
69
68
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
70
69
|
iconGradientStart: B400,
|
|
@@ -75,49 +74,49 @@ const defaultTheme = {
|
|
|
75
74
|
},
|
|
76
75
|
primaryButton: {
|
|
77
76
|
active: {
|
|
78
|
-
color:
|
|
79
|
-
backgroundColor:
|
|
77
|
+
color: `var(--ds-text-mediumEmphasis, ${B400})`,
|
|
78
|
+
backgroundColor: `var(--ds-background-subtleNeutral-pressed, ${hexToRGBA(B50, 0.7)})`,
|
|
80
79
|
boxShadow: ''
|
|
81
80
|
},
|
|
82
81
|
default: {
|
|
83
|
-
color:
|
|
82
|
+
color: `var(--ds-text-mediumEmphasis, ${N600})`,
|
|
84
83
|
backgroundColor: 'transparent',
|
|
85
84
|
boxShadow: ''
|
|
86
85
|
},
|
|
87
86
|
focus: {
|
|
88
|
-
color:
|
|
87
|
+
color: `var(--ds-text-mediumEmphasis, ${N600})`,
|
|
89
88
|
backgroundColor: '',
|
|
90
|
-
boxShadow: `0 0 0 2px ${
|
|
89
|
+
boxShadow: `0 0 0 2px ${`var(--ds-border-focus, ${B200})`}`
|
|
91
90
|
},
|
|
92
91
|
hover: {
|
|
93
|
-
color:
|
|
94
|
-
backgroundColor:
|
|
92
|
+
color: `var(--ds-text-mediumEmphasis, ${B400})`,
|
|
93
|
+
backgroundColor: `var(--ds-background-subtleNeutral-hover, ${hexToRGBA(B50, 0.9)})`,
|
|
95
94
|
boxShadow: ''
|
|
96
95
|
},
|
|
97
96
|
selected: {
|
|
98
|
-
color:
|
|
99
|
-
backgroundColor:
|
|
97
|
+
color: `var(--ds-text-mediumEmphasis, ${B400})`,
|
|
98
|
+
backgroundColor: "var(--ds-background-selected-resting)",
|
|
100
99
|
boxShadow: '',
|
|
101
|
-
borderColor:
|
|
102
|
-
bordorBottom: `4px solid ${
|
|
100
|
+
borderColor: `var(--ds-iconBorder-brand, ${B400})`,
|
|
101
|
+
bordorBottom: `4px solid ${`var(--ds-iconBorder-brand, ${B400})`}`
|
|
103
102
|
}
|
|
104
103
|
},
|
|
105
104
|
search: {
|
|
106
105
|
default: {
|
|
107
|
-
backgroundColor:
|
|
108
|
-
color:
|
|
109
|
-
borderColor:
|
|
106
|
+
backgroundColor: `var(--ds-background-default, ${N0})`,
|
|
107
|
+
color: `var(--ds-text-lowEmphasis, ${N200})`,
|
|
108
|
+
borderColor: `var(--ds-border-neutral, ${N40})`
|
|
110
109
|
},
|
|
111
110
|
focus: {
|
|
112
|
-
borderColor:
|
|
111
|
+
borderColor: `var(--ds-border-focus, ${B200})`
|
|
113
112
|
},
|
|
114
113
|
hover: {
|
|
115
|
-
color:
|
|
116
|
-
backgroundColor:
|
|
114
|
+
color: `var(--ds-text-brand, ${B400})`,
|
|
115
|
+
backgroundColor: `var(--ds-background-default, ${hexToRGBA(B50, 0.9)})`
|
|
117
116
|
}
|
|
118
117
|
},
|
|
119
118
|
skeleton: {
|
|
120
|
-
backgroundColor:
|
|
119
|
+
backgroundColor: `var(--ds-background-subtleNeutral-resting, ${N20})`,
|
|
121
120
|
opacity: 1
|
|
122
121
|
}
|
|
123
122
|
}
|
package/dist/es2019/version.json
CHANGED
|
@@ -6,7 +6,6 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
6
6
|
|
|
7
7
|
import { N30A, N40A, N900 } from '@atlaskit/theme/colors';
|
|
8
8
|
import { gridSize as gridSizeFn } from '@atlaskit/theme/constants';
|
|
9
|
-
import { token } from '@atlaskit/tokens';
|
|
10
9
|
import { HORIZONTAL_GLOBAL_NAV_HEIGHT } from '../../common/constants';
|
|
11
10
|
import { hexToRGBA } from '../../theme';
|
|
12
11
|
var gridSize = gridSizeFn();
|
|
@@ -23,8 +22,8 @@ export var containerCSS = function containerCSS(_ref) {
|
|
|
23
22
|
height: HORIZONTAL_GLOBAL_NAV_HEIGHT,
|
|
24
23
|
position: 'relative',
|
|
25
24
|
'[data-theme="light"] &, [data-theme="dark"] &': {
|
|
26
|
-
// eslint-disable-next-line @atlaskit/design-system/
|
|
27
|
-
borderBottom: "1px solid ".concat(
|
|
25
|
+
// eslint-disable-next-line @atlaskit/design-system/no-unsafe-design-token-usage
|
|
26
|
+
borderBottom: "1px solid ".concat("var(--ds-border-neutral, #091E4224)"),
|
|
28
27
|
// TODO: (DSP-2087) Remove the below once tokens have launched
|
|
29
28
|
'&::after': {
|
|
30
29
|
content: 'none'
|
|
@@ -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(
|
|
69
|
+
}), Create && jsx(Create, null), jsx("div", {
|
|
70
|
+
style: widthObserverContainerStyle
|
|
71
|
+
}, jsx(WidthObserver, {
|
|
72
|
+
offscreen: true,
|
|
73
|
+
setWidth: updateWidth
|
|
74
|
+
})));
|
|
80
75
|
};
|
|
@@ -1,27 +1,26 @@
|
|
|
1
1
|
import { B200, B400, B50, N0, N20, N200, N40, N600, N700 } from '@atlaskit/theme/colors';
|
|
2
|
-
import { token } from '@atlaskit/tokens';
|
|
3
2
|
import { hexToRGBA } from './themeHelpers';
|
|
4
3
|
var defaultTheme = {
|
|
5
4
|
mode: {
|
|
6
5
|
create: {
|
|
7
6
|
active: {
|
|
8
|
-
color:
|
|
9
|
-
backgroundColor:
|
|
7
|
+
color: "var(--ds-text-onBold, ".concat(N0, ")"),
|
|
8
|
+
backgroundColor: "var(--ds-background-boldBrand-pressed, ".concat(hexToRGBA(B400, 0.8), ")"),
|
|
10
9
|
boxShadow: ''
|
|
11
10
|
},
|
|
12
11
|
default: {
|
|
13
|
-
color:
|
|
14
|
-
backgroundColor:
|
|
12
|
+
color: "var(--ds-text-onBold, ".concat(N0, ")"),
|
|
13
|
+
backgroundColor: "var(--ds-background-boldBrand-resting, ".concat(B400, ")"),
|
|
15
14
|
boxShadow: ''
|
|
16
15
|
},
|
|
17
16
|
focus: {
|
|
18
|
-
color:
|
|
19
|
-
backgroundColor:
|
|
20
|
-
boxShadow: "0 0 0 2px ".concat(
|
|
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))")
|
|
21
20
|
},
|
|
22
21
|
hover: {
|
|
23
|
-
color:
|
|
24
|
-
backgroundColor:
|
|
22
|
+
color: "var(--ds-text-onBold, ".concat(N0, ")"),
|
|
23
|
+
backgroundColor: "var(--ds-background-boldBrand-hover, ".concat(hexToRGBA(B400, 0.9), ")"),
|
|
25
24
|
boxShadow: ''
|
|
26
25
|
},
|
|
27
26
|
selected: {
|
|
@@ -32,39 +31,39 @@ var defaultTheme = {
|
|
|
32
31
|
},
|
|
33
32
|
iconButton: {
|
|
34
33
|
active: {
|
|
35
|
-
color:
|
|
36
|
-
backgroundColor:
|
|
34
|
+
color: "var(--ds-text-mediumEmphasis, ".concat(B400, ")"),
|
|
35
|
+
backgroundColor: "var(--ds-background-subtleNeutral-pressed, ".concat(hexToRGBA(B50, 0.6), ")"),
|
|
37
36
|
boxShadow: ''
|
|
38
37
|
},
|
|
39
38
|
default: {
|
|
40
|
-
color:
|
|
39
|
+
color: "var(--ds-text-mediumEmphasis, ".concat(N600, ")"),
|
|
41
40
|
backgroundColor: 'transparent',
|
|
42
41
|
boxShadow: ''
|
|
43
42
|
},
|
|
44
43
|
focus: {
|
|
45
|
-
color:
|
|
46
|
-
backgroundColor:
|
|
47
|
-
boxShadow: "0 0 0 2px ".concat(
|
|
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, ")"))
|
|
48
47
|
},
|
|
49
48
|
hover: {
|
|
50
|
-
color:
|
|
51
|
-
backgroundColor:
|
|
49
|
+
color: "var(--ds-text-mediumEmphasis, ".concat(B400, ")"),
|
|
50
|
+
backgroundColor: "var(--ds-background-subtleNeutral-hover, ".concat(hexToRGBA(B50, 0.9), ")"),
|
|
52
51
|
boxShadow: ''
|
|
53
52
|
},
|
|
54
53
|
selected: {
|
|
55
|
-
color:
|
|
56
|
-
backgroundColor:
|
|
54
|
+
color: "var(--ds-text-selected)",
|
|
55
|
+
backgroundColor: "var(--ds-background-selected-resting)",
|
|
57
56
|
boxShadow: ''
|
|
58
57
|
}
|
|
59
58
|
},
|
|
60
59
|
navigation: {
|
|
61
|
-
backgroundColor:
|
|
62
|
-
color:
|
|
60
|
+
backgroundColor: "var(--ds-background-default, ".concat(N0, ")"),
|
|
61
|
+
color: "var(--ds-text-lowEmphasis, ".concat(N200, ")")
|
|
63
62
|
},
|
|
64
63
|
productHome: {
|
|
65
|
-
backgroundColor:
|
|
66
|
-
color:
|
|
67
|
-
borderRight: "1px solid ".concat(
|
|
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), ")")),
|
|
68
67
|
// TODO: (DSP-1256) These colors should be moved into the Logo package
|
|
69
68
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
70
69
|
iconGradientStart: B400,
|
|
@@ -75,49 +74,49 @@ var defaultTheme = {
|
|
|
75
74
|
},
|
|
76
75
|
primaryButton: {
|
|
77
76
|
active: {
|
|
78
|
-
color:
|
|
79
|
-
backgroundColor:
|
|
77
|
+
color: "var(--ds-text-mediumEmphasis, ".concat(B400, ")"),
|
|
78
|
+
backgroundColor: "var(--ds-background-subtleNeutral-pressed, ".concat(hexToRGBA(B50, 0.7), ")"),
|
|
80
79
|
boxShadow: ''
|
|
81
80
|
},
|
|
82
81
|
default: {
|
|
83
|
-
color:
|
|
82
|
+
color: "var(--ds-text-mediumEmphasis, ".concat(N600, ")"),
|
|
84
83
|
backgroundColor: 'transparent',
|
|
85
84
|
boxShadow: ''
|
|
86
85
|
},
|
|
87
86
|
focus: {
|
|
88
|
-
color:
|
|
87
|
+
color: "var(--ds-text-mediumEmphasis, ".concat(N600, ")"),
|
|
89
88
|
backgroundColor: '',
|
|
90
|
-
boxShadow: "0 0 0 2px ".concat(
|
|
89
|
+
boxShadow: "0 0 0 2px ".concat("var(--ds-border-focus, ".concat(B200, ")"))
|
|
91
90
|
},
|
|
92
91
|
hover: {
|
|
93
|
-
color:
|
|
94
|
-
backgroundColor:
|
|
92
|
+
color: "var(--ds-text-mediumEmphasis, ".concat(B400, ")"),
|
|
93
|
+
backgroundColor: "var(--ds-background-subtleNeutral-hover, ".concat(hexToRGBA(B50, 0.9), ")"),
|
|
95
94
|
boxShadow: ''
|
|
96
95
|
},
|
|
97
96
|
selected: {
|
|
98
|
-
color:
|
|
99
|
-
backgroundColor:
|
|
97
|
+
color: "var(--ds-text-mediumEmphasis, ".concat(B400, ")"),
|
|
98
|
+
backgroundColor: "var(--ds-background-selected-resting)",
|
|
100
99
|
boxShadow: '',
|
|
101
|
-
borderColor:
|
|
102
|
-
bordorBottom: "4px solid ".concat(
|
|
100
|
+
borderColor: "var(--ds-iconBorder-brand, ".concat(B400, ")"),
|
|
101
|
+
bordorBottom: "4px solid ".concat("var(--ds-iconBorder-brand, ".concat(B400, ")"))
|
|
103
102
|
}
|
|
104
103
|
},
|
|
105
104
|
search: {
|
|
106
105
|
default: {
|
|
107
|
-
backgroundColor:
|
|
108
|
-
color:
|
|
109
|
-
borderColor:
|
|
106
|
+
backgroundColor: "var(--ds-background-default, ".concat(N0, ")"),
|
|
107
|
+
color: "var(--ds-text-lowEmphasis, ".concat(N200, ")"),
|
|
108
|
+
borderColor: "var(--ds-border-neutral, ".concat(N40, ")")
|
|
110
109
|
},
|
|
111
110
|
focus: {
|
|
112
|
-
borderColor:
|
|
111
|
+
borderColor: "var(--ds-border-focus, ".concat(B200, ")")
|
|
113
112
|
},
|
|
114
113
|
hover: {
|
|
115
|
-
color:
|
|
116
|
-
backgroundColor:
|
|
114
|
+
color: "var(--ds-text-brand, ".concat(B400, ")"),
|
|
115
|
+
backgroundColor: "var(--ds-background-default, ".concat(hexToRGBA(B50, 0.9), ")")
|
|
117
116
|
}
|
|
118
117
|
},
|
|
119
118
|
skeleton: {
|
|
120
|
-
backgroundColor:
|
|
119
|
+
backgroundColor: "var(--ds-background-subtleNeutral-resting, ".concat(N20, ")"),
|
|
121
120
|
opacity: 1
|
|
122
121
|
}
|
|
123
122
|
}
|
package/dist/esm/version.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/atlassian-navigation",
|
|
3
|
-
"version": "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/"
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"@atlaskit/logo": "*",
|
|
30
30
|
"@atlaskit/popup": "^1.1.0",
|
|
31
31
|
"@atlaskit/theme": "^12.0.0",
|
|
32
|
-
"@atlaskit/tokens": "^0.
|
|
32
|
+
"@atlaskit/tokens": "^0.4.0",
|
|
33
33
|
"@atlaskit/tooltip": "^17.5.0",
|
|
34
34
|
"@atlaskit/width-detector": "^3.0.0",
|
|
35
35
|
"@babel/runtime": "^7.0.0",
|