@atlaskit/atlassian-navigation 5.1.2 → 5.1.3
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 +6 -0
- package/dist/cjs/components/ProductHome/product-home.js +2 -2
- package/dist/cjs/theme/default-theme.js +11 -2
- package/dist/cjs/theme/theme-generator.js +4 -1
- package/dist/es2019/components/ProductHome/product-home.js +2 -2
- package/dist/es2019/theme/default-theme.js +10 -1
- package/dist/es2019/theme/theme-generator.js +5 -2
- package/dist/esm/components/ProductHome/product-home.js +2 -2
- package/dist/esm/theme/default-theme.js +10 -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 +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -137,9 +137,9 @@ var ProductHome = function ProductHome(_ref) {
|
|
|
137
137
|
var primaryButton = theme.mode.primaryButton;
|
|
138
138
|
var _theme$mode$productHo = theme.mode.productHome,
|
|
139
139
|
_theme$mode$productHo2 = _theme$mode$productHo.iconColor,
|
|
140
|
-
iconColor = _theme$mode$productHo2 === void 0 ? 'inherit' : _theme$mode$productHo2,
|
|
140
|
+
iconColor = _theme$mode$productHo2 === void 0 ? (0, _platformFeatureFlags.fg)('platform-team25-app-icon-tiles') ? undefined : 'inherit' : _theme$mode$productHo2,
|
|
141
141
|
_theme$mode$productHo3 = _theme$mode$productHo.textColor,
|
|
142
|
-
textColor = _theme$mode$productHo3 === void 0 ? theme.mode.productHome.color : _theme$mode$productHo3;
|
|
142
|
+
textColor = _theme$mode$productHo3 === void 0 ? (0, _platformFeatureFlags.fg)('platform-team25-app-icon-tiles') ? undefined : theme.mode.productHome.color : _theme$mode$productHo3;
|
|
143
143
|
var Tag = (0, _utils2.getTag)(onClick, href);
|
|
144
144
|
var preventFocusRing = function preventFocusRing(e) {
|
|
145
145
|
e.preventDefault();
|
|
@@ -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,12 @@ var defaultTheme = {
|
|
|
131
133
|
}
|
|
132
134
|
}
|
|
133
135
|
};
|
|
136
|
+
|
|
137
|
+
// Create deep copy of defaultTheme
|
|
138
|
+
var defaultThemeBrandRefresh = exports.defaultThemeBrandRefresh = JSON.parse(JSON.stringify(defaultTheme));
|
|
139
|
+
|
|
140
|
+
// Update iconColor and textColor in defaultThemeBrandRefresh
|
|
141
|
+
defaultThemeBrandRefresh.mode.productHome.iconColor = undefined;
|
|
142
|
+
defaultThemeBrandRefresh.mode.productHome.textColor = undefined;
|
|
134
143
|
var DEFAULT_THEME_NAME = exports.DEFAULT_THEME_NAME = 'atlassian';
|
|
135
144
|
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
|
},
|
|
@@ -135,8 +135,8 @@ const ProductHome = ({
|
|
|
135
135
|
const theme = useTheme();
|
|
136
136
|
const primaryButton = theme.mode.primaryButton;
|
|
137
137
|
const {
|
|
138
|
-
iconColor = 'inherit',
|
|
139
|
-
textColor = theme.mode.productHome.color
|
|
138
|
+
iconColor = fg('platform-team25-app-icon-tiles') ? undefined : 'inherit',
|
|
139
|
+
textColor = fg('platform-team25-app-icon-tiles') ? undefined : theme.mode.productHome.color
|
|
140
140
|
} = theme.mode.productHome;
|
|
141
141
|
const Tag = getTag(onClick, href);
|
|
142
142
|
const preventFocusRing = e => {
|
|
@@ -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,12 @@ const defaultTheme = {
|
|
|
125
127
|
}
|
|
126
128
|
}
|
|
127
129
|
};
|
|
130
|
+
|
|
131
|
+
// Create deep copy of defaultTheme
|
|
132
|
+
export const defaultThemeBrandRefresh = JSON.parse(JSON.stringify(defaultTheme));
|
|
133
|
+
|
|
134
|
+
// Update iconColor and textColor in defaultThemeBrandRefresh
|
|
135
|
+
defaultThemeBrandRefresh.mode.productHome.iconColor = undefined;
|
|
136
|
+
defaultThemeBrandRefresh.mode.productHome.textColor = undefined;
|
|
128
137
|
export const DEFAULT_THEME_NAME = 'atlassian';
|
|
129
138
|
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
|
},
|
|
@@ -131,9 +131,9 @@ var ProductHome = function ProductHome(_ref) {
|
|
|
131
131
|
var primaryButton = theme.mode.primaryButton;
|
|
132
132
|
var _theme$mode$productHo = theme.mode.productHome,
|
|
133
133
|
_theme$mode$productHo2 = _theme$mode$productHo.iconColor,
|
|
134
|
-
iconColor = _theme$mode$productHo2 === void 0 ? 'inherit' : _theme$mode$productHo2,
|
|
134
|
+
iconColor = _theme$mode$productHo2 === void 0 ? fg('platform-team25-app-icon-tiles') ? undefined : 'inherit' : _theme$mode$productHo2,
|
|
135
135
|
_theme$mode$productHo3 = _theme$mode$productHo.textColor,
|
|
136
|
-
textColor = _theme$mode$productHo3 === void 0 ? theme.mode.productHome.color : _theme$mode$productHo3;
|
|
136
|
+
textColor = _theme$mode$productHo3 === void 0 ? fg('platform-team25-app-icon-tiles') ? undefined : theme.mode.productHome.color : _theme$mode$productHo3;
|
|
137
137
|
var Tag = getTag(onClick, href);
|
|
138
138
|
var preventFocusRing = function preventFocusRing(e) {
|
|
139
139
|
e.preventDefault();
|
|
@@ -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,12 @@ var defaultTheme = {
|
|
|
125
127
|
}
|
|
126
128
|
}
|
|
127
129
|
};
|
|
130
|
+
|
|
131
|
+
// Create deep copy of defaultTheme
|
|
132
|
+
export var defaultThemeBrandRefresh = JSON.parse(JSON.stringify(defaultTheme));
|
|
133
|
+
|
|
134
|
+
// Update iconColor and textColor in defaultThemeBrandRefresh
|
|
135
|
+
defaultThemeBrandRefresh.mode.productHome.iconColor = undefined;
|
|
136
|
+
defaultThemeBrandRefresh.mode.productHome.textColor = undefined;
|
|
128
137
|
export var DEFAULT_THEME_NAME = 'atlassian';
|
|
129
138
|
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.3",
|
|
4
4
|
"description": "A horizontal navigation component for Atlassian products.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -46,9 +46,9 @@
|
|
|
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.4.0",
|
|
52
52
|
"@atlaskit/logo": "^16.0.0",
|
|
53
53
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
54
54
|
"@atlaskit/popup": "^3.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",
|