@atlaskit/atlassian-navigation 5.1.2 → 5.1.4
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 +14 -0
- package/dist/cjs/components/ProductHome/product-home.js +19 -2
- package/dist/cjs/theme/default-theme.js +12 -2
- package/dist/cjs/theme/theme-generator.js +4 -1
- package/dist/es2019/components/ProductHome/product-home.js +20 -3
- package/dist/es2019/theme/default-theme.js +11 -1
- package/dist/es2019/theme/theme-generator.js +5 -2
- package/dist/esm/components/ProductHome/product-home.js +19 -2
- package/dist/esm/theme/default-theme.js +11 -1
- package/dist/esm/theme/theme-generator.js +5 -2
- package/dist/types/theme/default-theme.d.ts +1 -0
- package/dist/types-ts4.5/theme/default-theme.d.ts +1 -0
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/atlassian-navigation
|
|
2
2
|
|
|
3
|
+
## 5.1.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#133393](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/133393)
|
|
8
|
+
[`379be130e4891`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/379be130e4891) -
|
|
9
|
+
Fixes bug with internal feature flagging logic
|
|
10
|
+
|
|
11
|
+
## 5.1.3
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 5.1.2
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -11,6 +11,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
11
11
|
var _react = require("react");
|
|
12
12
|
var _react2 = require("@emotion/react");
|
|
13
13
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
14
|
+
var _colors = require("@atlaskit/theme/colors");
|
|
14
15
|
var _constants = require("../../common/constants");
|
|
15
16
|
var _theme = require("../../theme");
|
|
16
17
|
var _utils = require("../../utils");
|
|
@@ -135,11 +136,21 @@ var ProductHome = function ProductHome(_ref) {
|
|
|
135
136
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
136
137
|
var theme = (0, _theme.useTheme)();
|
|
137
138
|
var primaryButton = theme.mode.primaryButton;
|
|
139
|
+
// After the brand refresh, iconColor and textColor should be set to 'undefined' to allow the original
|
|
140
|
+
// multi-color logo tile colors to be visible, rather than a hardcoded blue.
|
|
138
141
|
var _theme$mode$productHo = theme.mode.productHome,
|
|
139
142
|
_theme$mode$productHo2 = _theme$mode$productHo.iconColor,
|
|
140
|
-
iconColor = _theme$mode$productHo2 === void 0 ? 'inherit' : _theme$mode$productHo2,
|
|
143
|
+
iconColor = _theme$mode$productHo2 === void 0 ? (0, _platformFeatureFlags.fg)('platform-team25-app-icon-tiles') ? undefined : 'inherit' : _theme$mode$productHo2,
|
|
141
144
|
_theme$mode$productHo3 = _theme$mode$productHo.textColor,
|
|
142
|
-
textColor = _theme$mode$productHo3 === void 0 ? theme.mode.productHome.color : _theme$mode$productHo3;
|
|
145
|
+
textColor = _theme$mode$productHo3 === void 0 ? (0, _platformFeatureFlags.fg)('platform-team25-app-icon-tiles') ? undefined : theme.mode.productHome.color : _theme$mode$productHo3;
|
|
146
|
+
|
|
147
|
+
// The default theme is set at module scope and immediately used in context.
|
|
148
|
+
// To allow the feature flag to switch the logo color at runtime, we also detect the original hardcoded
|
|
149
|
+
// values and override them to undefined.
|
|
150
|
+
if (iconColor === '#357DE8' && textColor === "var(--ds-text, ".concat(_colors.N700, ")") && (0, _platformFeatureFlags.fg)('platform-team25-app-icon-tiles')) {
|
|
151
|
+
iconColor = undefined;
|
|
152
|
+
textColor = undefined;
|
|
153
|
+
}
|
|
143
154
|
var Tag = (0, _utils2.getTag)(onClick, href);
|
|
144
155
|
var preventFocusRing = function preventFocusRing(e) {
|
|
145
156
|
e.preventDefault();
|
|
@@ -164,12 +175,18 @@ var ProductHome = function ProductHome(_ref) {
|
|
|
164
175
|
}, (0, _react2.jsx)(Logo, {
|
|
165
176
|
iconColor: iconColor,
|
|
166
177
|
textColor: textColor
|
|
178
|
+
// @ts-ignore - The new icons don't have an appearance prop at the moment
|
|
179
|
+
,
|
|
180
|
+
appearance: (0, _platformFeatureFlags.fg)('platform-team25-app-icon-tiles') ? 'brand' : undefined
|
|
167
181
|
})), (0, _react2.jsx)("div", {
|
|
168
182
|
css: [customMaxHeightStyles, productIconStyles],
|
|
169
183
|
"data-testid": testId && "".concat(testId, "-icon")
|
|
170
184
|
}, (0, _react2.jsx)(Icon, {
|
|
171
185
|
iconColor: iconColor,
|
|
172
186
|
size: (0, _platformFeatureFlags.fg)('platform-team25-app-icon-tiles') ? 'small' : undefined
|
|
187
|
+
// @ts-ignore - The new icons don't have an appearance prop at the moment
|
|
188
|
+
,
|
|
189
|
+
appearance: (0, _platformFeatureFlags.fg)('platform-team25-app-icon-tiles') ? 'brand' : undefined
|
|
173
190
|
}))), siteTitle && (0, _react2.jsx)("div", {
|
|
174
191
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
175
192
|
style: {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.default = exports.DEFAULT_THEME_NAME = void 0;
|
|
6
|
+
exports.defaultThemeBrandRefresh = exports.default = exports.DEFAULT_THEME_NAME = void 0;
|
|
7
7
|
var _colors = require("@atlaskit/theme/colors");
|
|
8
8
|
var _themeHelpers = require("./theme-helpers");
|
|
9
9
|
var defaultTheme = {
|
|
@@ -75,8 +75,10 @@ var defaultTheme = {
|
|
|
75
75
|
backgroundColor: "var(--ds-text-brand, ".concat(_colors.B400, ")"),
|
|
76
76
|
color: "var(--ds-text, ".concat(_colors.N700, ")"),
|
|
77
77
|
borderRight: "1px solid ".concat("var(--ds-border, ".concat((0, _themeHelpers.hexToRGBA)(_colors.N200, 0.3), ")")),
|
|
78
|
+
// TODO: replace with token after brand refresh
|
|
78
79
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
79
|
-
iconColor: '#357DE8'
|
|
80
|
+
iconColor: '#357DE8',
|
|
81
|
+
textColor: "var(--ds-text, ".concat(_colors.N700, ")")
|
|
80
82
|
},
|
|
81
83
|
primaryButton: {
|
|
82
84
|
active: {
|
|
@@ -131,5 +133,13 @@ var defaultTheme = {
|
|
|
131
133
|
}
|
|
132
134
|
}
|
|
133
135
|
};
|
|
136
|
+
|
|
137
|
+
// Create deep copy of defaultTheme
|
|
138
|
+
var defaultThemeCopy = JSON.parse(JSON.stringify(defaultTheme));
|
|
139
|
+
|
|
140
|
+
// Update iconColor and textColor in defaultThemeBrandRefresh
|
|
141
|
+
defaultThemeCopy.mode.productHome.iconColor = undefined;
|
|
142
|
+
defaultThemeCopy.mode.productHome.textColor = undefined;
|
|
143
|
+
var defaultThemeBrandRefresh = exports.defaultThemeBrandRefresh = defaultThemeCopy;
|
|
134
144
|
var DEFAULT_THEME_NAME = exports.DEFAULT_THEME_NAME = 'atlassian';
|
|
135
145
|
var _default = exports.default = defaultTheme;
|
|
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.generateTheme = void 0;
|
|
9
9
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
10
11
|
var _defaultTheme = _interopRequireWildcard(require("./default-theme"));
|
|
11
12
|
var _themeHelpers = require("./theme-helpers");
|
|
12
13
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
@@ -78,7 +79,7 @@ var generateTheme = exports.generateTheme = function generateTheme(themeColors)
|
|
|
78
79
|
color: color
|
|
79
80
|
});
|
|
80
81
|
if (name === _defaultTheme.DEFAULT_THEME_NAME) {
|
|
81
|
-
return _defaultTheme.default;
|
|
82
|
+
return (0, _platformFeatureFlags.fg)('platform-team25-app-icon-tiles') ? _defaultTheme.defaultThemeBrandRefresh : _defaultTheme.default;
|
|
82
83
|
}
|
|
83
84
|
return {
|
|
84
85
|
mode: {
|
|
@@ -91,6 +92,8 @@ var generateTheme = exports.generateTheme = function generateTheme(themeColors)
|
|
|
91
92
|
},
|
|
92
93
|
productHome: {
|
|
93
94
|
color: color,
|
|
95
|
+
iconColor: (0, _platformFeatureFlags.fg)('platform-team25-app-icon-tiles') ? color : undefined,
|
|
96
|
+
textColor: (0, _platformFeatureFlags.fg)('platform-team25-app-icon-tiles') ? color : undefined,
|
|
94
97
|
backgroundColor: highlightColor,
|
|
95
98
|
borderRight: "1px solid ".concat((0, _themeHelpers.hexToRGBA)(color, 0.5))
|
|
96
99
|
},
|
|
@@ -8,6 +8,7 @@ import { Fragment } from 'react';
|
|
|
8
8
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
9
9
|
import { css, jsx } from '@emotion/react';
|
|
10
10
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
11
|
+
import { N700 } from '@atlaskit/theme/colors';
|
|
11
12
|
import { PRODUCT_HOME_BREAKPOINT } from '../../common/constants';
|
|
12
13
|
import { useTheme } from '../../theme';
|
|
13
14
|
import { stripEmptyProperties } from '../../utils';
|
|
@@ -134,10 +135,20 @@ const ProductHome = ({
|
|
|
134
135
|
}) => {
|
|
135
136
|
const theme = useTheme();
|
|
136
137
|
const primaryButton = theme.mode.primaryButton;
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
138
|
+
// After the brand refresh, iconColor and textColor should be set to 'undefined' to allow the original
|
|
139
|
+
// multi-color logo tile colors to be visible, rather than a hardcoded blue.
|
|
140
|
+
let {
|
|
141
|
+
iconColor = fg('platform-team25-app-icon-tiles') ? undefined : 'inherit',
|
|
142
|
+
textColor = fg('platform-team25-app-icon-tiles') ? undefined : theme.mode.productHome.color
|
|
140
143
|
} = theme.mode.productHome;
|
|
144
|
+
|
|
145
|
+
// The default theme is set at module scope and immediately used in context.
|
|
146
|
+
// To allow the feature flag to switch the logo color at runtime, we also detect the original hardcoded
|
|
147
|
+
// values and override them to undefined.
|
|
148
|
+
if (iconColor === '#357DE8' && textColor === `var(--ds-text, ${N700})` && fg('platform-team25-app-icon-tiles')) {
|
|
149
|
+
iconColor = undefined;
|
|
150
|
+
textColor = undefined;
|
|
151
|
+
}
|
|
141
152
|
const Tag = getTag(onClick, href);
|
|
142
153
|
const preventFocusRing = e => {
|
|
143
154
|
e.preventDefault();
|
|
@@ -173,12 +184,18 @@ const ProductHome = ({
|
|
|
173
184
|
}, jsx(Logo, {
|
|
174
185
|
iconColor: iconColor,
|
|
175
186
|
textColor: textColor
|
|
187
|
+
// @ts-ignore - The new icons don't have an appearance prop at the moment
|
|
188
|
+
,
|
|
189
|
+
appearance: fg('platform-team25-app-icon-tiles') ? 'brand' : undefined
|
|
176
190
|
})), jsx("div", {
|
|
177
191
|
css: [customMaxHeightStyles, productIconStyles],
|
|
178
192
|
"data-testid": testId && `${testId}-icon`
|
|
179
193
|
}, jsx(Icon, {
|
|
180
194
|
iconColor: iconColor,
|
|
181
195
|
size: fg('platform-team25-app-icon-tiles') ? 'small' : undefined
|
|
196
|
+
// @ts-ignore - The new icons don't have an appearance prop at the moment
|
|
197
|
+
,
|
|
198
|
+
appearance: fg('platform-team25-app-icon-tiles') ? 'brand' : undefined
|
|
182
199
|
}))), siteTitle && jsx("div", {
|
|
183
200
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
184
201
|
style: {
|
|
@@ -69,8 +69,10 @@ const defaultTheme = {
|
|
|
69
69
|
backgroundColor: `var(--ds-text-brand, ${B400})`,
|
|
70
70
|
color: `var(--ds-text, ${N700})`,
|
|
71
71
|
borderRight: `1px solid ${`var(--ds-border, ${hexToRGBA(N200, 0.3)})`}`,
|
|
72
|
+
// TODO: replace with token after brand refresh
|
|
72
73
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
73
|
-
iconColor: '#357DE8'
|
|
74
|
+
iconColor: '#357DE8',
|
|
75
|
+
textColor: `var(--ds-text, ${N700})`
|
|
74
76
|
},
|
|
75
77
|
primaryButton: {
|
|
76
78
|
active: {
|
|
@@ -125,5 +127,13 @@ const defaultTheme = {
|
|
|
125
127
|
}
|
|
126
128
|
}
|
|
127
129
|
};
|
|
130
|
+
|
|
131
|
+
// Create deep copy of defaultTheme
|
|
132
|
+
const defaultThemeCopy = JSON.parse(JSON.stringify(defaultTheme));
|
|
133
|
+
|
|
134
|
+
// Update iconColor and textColor in defaultThemeBrandRefresh
|
|
135
|
+
defaultThemeCopy.mode.productHome.iconColor = undefined;
|
|
136
|
+
defaultThemeCopy.mode.productHome.textColor = undefined;
|
|
137
|
+
export const defaultThemeBrandRefresh = defaultThemeCopy;
|
|
128
138
|
export const DEFAULT_THEME_NAME = 'atlassian';
|
|
129
139
|
export default defaultTheme;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
2
|
+
import defaultTheme, { DEFAULT_THEME_NAME, defaultThemeBrandRefresh } from './default-theme';
|
|
2
3
|
import { generateTextColor, getBoxShadow, getContrastColor, hexToRGBA } from './theme-helpers';
|
|
3
4
|
const generateOpacityValue = color => color === '#000000' ? 0.3 : 0.6;
|
|
4
5
|
|
|
@@ -66,7 +67,7 @@ export const generateTheme = themeColors => {
|
|
|
66
67
|
color
|
|
67
68
|
};
|
|
68
69
|
if (name === DEFAULT_THEME_NAME) {
|
|
69
|
-
return defaultTheme;
|
|
70
|
+
return fg('platform-team25-app-icon-tiles') ? defaultThemeBrandRefresh : defaultTheme;
|
|
70
71
|
}
|
|
71
72
|
return {
|
|
72
73
|
mode: {
|
|
@@ -79,6 +80,8 @@ export const generateTheme = themeColors => {
|
|
|
79
80
|
},
|
|
80
81
|
productHome: {
|
|
81
82
|
color,
|
|
83
|
+
iconColor: fg('platform-team25-app-icon-tiles') ? color : undefined,
|
|
84
|
+
textColor: fg('platform-team25-app-icon-tiles') ? color : undefined,
|
|
82
85
|
backgroundColor: highlightColor,
|
|
83
86
|
borderRight: `1px solid ${hexToRGBA(color, 0.5)}`
|
|
84
87
|
},
|
|
@@ -11,6 +11,7 @@ import { Fragment } from 'react';
|
|
|
11
11
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
12
12
|
import { css, jsx } from '@emotion/react';
|
|
13
13
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
14
|
+
import { N700 } from '@atlaskit/theme/colors';
|
|
14
15
|
import { PRODUCT_HOME_BREAKPOINT } from '../../common/constants';
|
|
15
16
|
import { useTheme } from '../../theme';
|
|
16
17
|
import { stripEmptyProperties } from '../../utils';
|
|
@@ -129,11 +130,21 @@ var ProductHome = function ProductHome(_ref) {
|
|
|
129
130
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
130
131
|
var theme = useTheme();
|
|
131
132
|
var primaryButton = theme.mode.primaryButton;
|
|
133
|
+
// After the brand refresh, iconColor and textColor should be set to 'undefined' to allow the original
|
|
134
|
+
// multi-color logo tile colors to be visible, rather than a hardcoded blue.
|
|
132
135
|
var _theme$mode$productHo = theme.mode.productHome,
|
|
133
136
|
_theme$mode$productHo2 = _theme$mode$productHo.iconColor,
|
|
134
|
-
iconColor = _theme$mode$productHo2 === void 0 ? 'inherit' : _theme$mode$productHo2,
|
|
137
|
+
iconColor = _theme$mode$productHo2 === void 0 ? fg('platform-team25-app-icon-tiles') ? undefined : 'inherit' : _theme$mode$productHo2,
|
|
135
138
|
_theme$mode$productHo3 = _theme$mode$productHo.textColor,
|
|
136
|
-
textColor = _theme$mode$productHo3 === void 0 ? theme.mode.productHome.color : _theme$mode$productHo3;
|
|
139
|
+
textColor = _theme$mode$productHo3 === void 0 ? fg('platform-team25-app-icon-tiles') ? undefined : theme.mode.productHome.color : _theme$mode$productHo3;
|
|
140
|
+
|
|
141
|
+
// The default theme is set at module scope and immediately used in context.
|
|
142
|
+
// To allow the feature flag to switch the logo color at runtime, we also detect the original hardcoded
|
|
143
|
+
// values and override them to undefined.
|
|
144
|
+
if (iconColor === '#357DE8' && textColor === "var(--ds-text, ".concat(N700, ")") && fg('platform-team25-app-icon-tiles')) {
|
|
145
|
+
iconColor = undefined;
|
|
146
|
+
textColor = undefined;
|
|
147
|
+
}
|
|
137
148
|
var Tag = getTag(onClick, href);
|
|
138
149
|
var preventFocusRing = function preventFocusRing(e) {
|
|
139
150
|
e.preventDefault();
|
|
@@ -158,12 +169,18 @@ var ProductHome = function ProductHome(_ref) {
|
|
|
158
169
|
}, jsx(Logo, {
|
|
159
170
|
iconColor: iconColor,
|
|
160
171
|
textColor: textColor
|
|
172
|
+
// @ts-ignore - The new icons don't have an appearance prop at the moment
|
|
173
|
+
,
|
|
174
|
+
appearance: fg('platform-team25-app-icon-tiles') ? 'brand' : undefined
|
|
161
175
|
})), jsx("div", {
|
|
162
176
|
css: [customMaxHeightStyles, productIconStyles],
|
|
163
177
|
"data-testid": testId && "".concat(testId, "-icon")
|
|
164
178
|
}, jsx(Icon, {
|
|
165
179
|
iconColor: iconColor,
|
|
166
180
|
size: fg('platform-team25-app-icon-tiles') ? 'small' : undefined
|
|
181
|
+
// @ts-ignore - The new icons don't have an appearance prop at the moment
|
|
182
|
+
,
|
|
183
|
+
appearance: fg('platform-team25-app-icon-tiles') ? 'brand' : undefined
|
|
167
184
|
}))), siteTitle && jsx("div", {
|
|
168
185
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
169
186
|
style: {
|
|
@@ -69,8 +69,10 @@ var defaultTheme = {
|
|
|
69
69
|
backgroundColor: "var(--ds-text-brand, ".concat(B400, ")"),
|
|
70
70
|
color: "var(--ds-text, ".concat(N700, ")"),
|
|
71
71
|
borderRight: "1px solid ".concat("var(--ds-border, ".concat(hexToRGBA(N200, 0.3), ")")),
|
|
72
|
+
// TODO: replace with token after brand refresh
|
|
72
73
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
73
|
-
iconColor: '#357DE8'
|
|
74
|
+
iconColor: '#357DE8',
|
|
75
|
+
textColor: "var(--ds-text, ".concat(N700, ")")
|
|
74
76
|
},
|
|
75
77
|
primaryButton: {
|
|
76
78
|
active: {
|
|
@@ -125,5 +127,13 @@ var defaultTheme = {
|
|
|
125
127
|
}
|
|
126
128
|
}
|
|
127
129
|
};
|
|
130
|
+
|
|
131
|
+
// Create deep copy of defaultTheme
|
|
132
|
+
var defaultThemeCopy = JSON.parse(JSON.stringify(defaultTheme));
|
|
133
|
+
|
|
134
|
+
// Update iconColor and textColor in defaultThemeBrandRefresh
|
|
135
|
+
defaultThemeCopy.mode.productHome.iconColor = undefined;
|
|
136
|
+
defaultThemeCopy.mode.productHome.textColor = undefined;
|
|
137
|
+
export var defaultThemeBrandRefresh = defaultThemeCopy;
|
|
128
138
|
export var DEFAULT_THEME_NAME = 'atlassian';
|
|
129
139
|
export default defaultTheme;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
-
import
|
|
4
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
|
+
import defaultTheme, { DEFAULT_THEME_NAME, defaultThemeBrandRefresh } from './default-theme';
|
|
5
6
|
import { generateTextColor, getBoxShadow, getContrastColor, hexToRGBA } from './theme-helpers';
|
|
6
7
|
var generateOpacityValue = function generateOpacityValue(color) {
|
|
7
8
|
return color === '#000000' ? 0.3 : 0.6;
|
|
@@ -68,7 +69,7 @@ export var generateTheme = function generateTheme(themeColors) {
|
|
|
68
69
|
color: color
|
|
69
70
|
});
|
|
70
71
|
if (name === DEFAULT_THEME_NAME) {
|
|
71
|
-
return defaultTheme;
|
|
72
|
+
return fg('platform-team25-app-icon-tiles') ? defaultThemeBrandRefresh : defaultTheme;
|
|
72
73
|
}
|
|
73
74
|
return {
|
|
74
75
|
mode: {
|
|
@@ -81,6 +82,8 @@ export var generateTheme = function generateTheme(themeColors) {
|
|
|
81
82
|
},
|
|
82
83
|
productHome: {
|
|
83
84
|
color: color,
|
|
85
|
+
iconColor: fg('platform-team25-app-icon-tiles') ? color : undefined,
|
|
86
|
+
textColor: fg('platform-team25-app-icon-tiles') ? color : undefined,
|
|
84
87
|
backgroundColor: highlightColor,
|
|
85
88
|
borderRight: "1px solid ".concat(hexToRGBA(color, 0.5))
|
|
86
89
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/atlassian-navigation",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.4",
|
|
4
4
|
"description": "A horizontal navigation component for Atlassian products.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -46,15 +46,15 @@
|
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@atlaskit/analytics-namespaced-context": "^7.0.0",
|
|
49
|
-
"@atlaskit/button": "^
|
|
49
|
+
"@atlaskit/button": "^23.0.0",
|
|
50
50
|
"@atlaskit/ds-lib": "^4.0.0",
|
|
51
|
-
"@atlaskit/icon": "^25.
|
|
51
|
+
"@atlaskit/icon": "^25.5.0",
|
|
52
52
|
"@atlaskit/logo": "^16.0.0",
|
|
53
53
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
54
54
|
"@atlaskit/popup": "^3.0.0",
|
|
55
|
-
"@atlaskit/primitives": "^14.
|
|
55
|
+
"@atlaskit/primitives": "^14.3.0",
|
|
56
56
|
"@atlaskit/theme": "^18.0.0",
|
|
57
|
-
"@atlaskit/tokens": "^4.
|
|
57
|
+
"@atlaskit/tokens": "^4.6.0",
|
|
58
58
|
"@atlaskit/tooltip": "^20.0.0",
|
|
59
59
|
"@atlaskit/width-detector": "^5.0.0",
|
|
60
60
|
"@babel/runtime": "^7.0.0",
|
|
@@ -75,17 +75,17 @@
|
|
|
75
75
|
"@atlaskit/badge": "^18.1.0",
|
|
76
76
|
"@atlaskit/docs": "^10.0.0",
|
|
77
77
|
"@atlaskit/drawer": "^10.0.0",
|
|
78
|
-
"@atlaskit/dropdown-menu": "^
|
|
78
|
+
"@atlaskit/dropdown-menu": "^14.0.0",
|
|
79
79
|
"@atlaskit/form": "^12.0.0",
|
|
80
|
-
"@atlaskit/menu": "^3.
|
|
80
|
+
"@atlaskit/menu": "^3.2.0",
|
|
81
81
|
"@atlaskit/notification-indicator": "^10.0.0",
|
|
82
82
|
"@atlaskit/notification-log-client": "^6.2.0",
|
|
83
83
|
"@atlaskit/section-message": "^8.2.0",
|
|
84
84
|
"@atlaskit/spinner": "^18.0.0",
|
|
85
|
-
"@atlaskit/temp-nav-app-icons": "^0.
|
|
85
|
+
"@atlaskit/temp-nav-app-icons": "^0.7.0",
|
|
86
86
|
"@atlaskit/textfield": "^8.0.0",
|
|
87
87
|
"@atlaskit/visual-regression": "^0.10.0",
|
|
88
|
-
"@atlassian/switcher": "^35.
|
|
88
|
+
"@atlassian/switcher": "^35.19.0",
|
|
89
89
|
"@atlassian/switcher-test-utils": "^4.1.0",
|
|
90
90
|
"@testing-library/react": "^13.4.0",
|
|
91
91
|
"@testing-library/react-hooks": "^8.0.1",
|