@atlaskit/atlassian-navigation 2.0.1 → 2.1.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.
- package/CHANGELOG.md +25 -0
- package/dist/cjs/common/styles.js +2 -2
- package/dist/cjs/components/AppSwitcher/index.js +3 -1
- package/dist/cjs/components/AtlassianNavigation/styles.js +2 -2
- package/dist/cjs/components/Create/index.js +3 -0
- package/dist/cjs/components/Create/styles.js +2 -2
- package/dist/cjs/components/Help/index.js +3 -1
- package/dist/cjs/components/IconButton/index.js +3 -1
- package/dist/cjs/components/IconButton/styles.js +2 -2
- package/dist/cjs/components/Notifications/index.js +3 -1
- package/dist/cjs/components/PrimaryButton/index.js +2 -2
- package/dist/cjs/components/PrimaryButton/styles.js +2 -2
- package/dist/cjs/components/ProductHome/custom-product-home.js +3 -2
- package/dist/cjs/components/ProductHome/product-home.js +3 -2
- package/dist/cjs/components/ProductHome/styles.js +2 -2
- package/dist/cjs/components/Search/index.js +3 -2
- package/dist/cjs/components/Search/styles.js +2 -2
- package/dist/cjs/components/Settings/index.js +3 -1
- package/dist/cjs/components/SignIn/index.js +3 -1
- package/dist/cjs/components/SkeletonCreateButton/styles.js +2 -2
- package/dist/cjs/components/SkeletonIconButton/styles.js +2 -2
- package/dist/cjs/components/SkeletonPrimaryButton/styles.js +2 -2
- package/dist/cjs/theme/defaultTheme.js +40 -40
- package/dist/cjs/theme/themeGenerator.js +2 -2
- package/dist/cjs/theme/themeHelpers.js +2 -2
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/components/Create/index.js +3 -0
- package/dist/es2019/theme/defaultTheme.js +40 -40
- package/dist/es2019/version.json +1 -1
- package/dist/esm/common/styles.js +2 -2
- package/dist/esm/components/AppSwitcher/index.js +2 -1
- package/dist/esm/components/AtlassianNavigation/styles.js +2 -2
- package/dist/esm/components/Create/index.js +3 -0
- package/dist/esm/components/Create/styles.js +2 -2
- package/dist/esm/components/Help/index.js +2 -1
- package/dist/esm/components/IconButton/index.js +2 -1
- package/dist/esm/components/IconButton/styles.js +2 -2
- package/dist/esm/components/Notifications/index.js +2 -1
- package/dist/esm/components/PrimaryButton/index.js +2 -1
- package/dist/esm/components/PrimaryButton/styles.js +2 -2
- package/dist/esm/components/ProductHome/custom-product-home.js +2 -1
- package/dist/esm/components/ProductHome/product-home.js +2 -1
- package/dist/esm/components/ProductHome/styles.js +2 -2
- package/dist/esm/components/Search/index.js +2 -1
- package/dist/esm/components/Search/styles.js +2 -2
- package/dist/esm/components/Settings/index.js +2 -1
- package/dist/esm/components/SignIn/index.js +2 -1
- package/dist/esm/components/SkeletonCreateButton/styles.js +2 -2
- package/dist/esm/components/SkeletonIconButton/styles.js +2 -2
- package/dist/esm/components/SkeletonPrimaryButton/styles.js +2 -2
- package/dist/esm/theme/defaultTheme.js +40 -40
- package/dist/esm/theme/themeGenerator.js +2 -2
- package/dist/esm/theme/themeHelpers.js +2 -2
- package/dist/esm/version.json +1 -1
- package/dist/types/components/Create/index.d.ts +1 -1
- package/dist/types/components/Create/types.d.ts +5 -1
- package/docs/05-create.tsx +8 -0
- package/package.json +6 -6
|
@@ -4,23 +4,23 @@ var defaultTheme = {
|
|
|
4
4
|
mode: {
|
|
5
5
|
create: {
|
|
6
6
|
active: {
|
|
7
|
-
color: "var(--ds-text-
|
|
8
|
-
backgroundColor: "var(--ds-background-
|
|
7
|
+
color: "var(--ds-text-inverse, ".concat(N0, ")"),
|
|
8
|
+
backgroundColor: "var(--ds-background-brand-bold-pressed, ".concat(hexToRGBA(B400, 0.8), ")"),
|
|
9
9
|
boxShadow: ''
|
|
10
10
|
},
|
|
11
11
|
default: {
|
|
12
|
-
color: "var(--ds-text-
|
|
13
|
-
backgroundColor: "var(--ds-background-
|
|
12
|
+
color: "var(--ds-text-inverse, ".concat(N0, ")"),
|
|
13
|
+
backgroundColor: "var(--ds-background-brand-bold, ".concat(B400, ")"),
|
|
14
14
|
boxShadow: ''
|
|
15
15
|
},
|
|
16
16
|
focus: {
|
|
17
|
-
color: "var(--ds-text-
|
|
18
|
-
backgroundColor: "var(--ds-background-
|
|
19
|
-
boxShadow: "0 0 0 2px ".concat("var(--ds-border-
|
|
17
|
+
color: "var(--ds-text-inverse, ".concat(N0, ")"),
|
|
18
|
+
backgroundColor: "var(--ds-background-brand-bold, ".concat(B400, ")"),
|
|
19
|
+
boxShadow: "0 0 0 2px ".concat("var(--ds-border-focused, rgb(128,169,230))")
|
|
20
20
|
},
|
|
21
21
|
hover: {
|
|
22
|
-
color: "var(--ds-text-
|
|
23
|
-
backgroundColor: "var(--ds-background-
|
|
22
|
+
color: "var(--ds-text-inverse, ".concat(N0, ")"),
|
|
23
|
+
backgroundColor: "var(--ds-background-brand-bold-hovered, ".concat(hexToRGBA(B400, 0.9), ")"),
|
|
24
24
|
boxShadow: ''
|
|
25
25
|
},
|
|
26
26
|
selected: {
|
|
@@ -31,39 +31,39 @@ var defaultTheme = {
|
|
|
31
31
|
},
|
|
32
32
|
iconButton: {
|
|
33
33
|
active: {
|
|
34
|
-
color: "var(--ds-text-
|
|
35
|
-
backgroundColor: "var(--ds-background-
|
|
34
|
+
color: "var(--ds-text-subtle, ".concat(B400, ")"),
|
|
35
|
+
backgroundColor: "var(--ds-background-neutral-pressed, ".concat(hexToRGBA(B50, 0.6), ")"),
|
|
36
36
|
boxShadow: ''
|
|
37
37
|
},
|
|
38
38
|
default: {
|
|
39
|
-
color: "var(--ds-text-
|
|
39
|
+
color: "var(--ds-text-subtle, ".concat(N600, ")"),
|
|
40
40
|
backgroundColor: 'transparent',
|
|
41
41
|
boxShadow: ''
|
|
42
42
|
},
|
|
43
43
|
focus: {
|
|
44
|
-
color: "var(--ds-text-
|
|
45
|
-
backgroundColor: "var(--ds-background-
|
|
46
|
-
boxShadow: "0 0 0 2px ".concat("var(--ds-border-
|
|
44
|
+
color: "var(--ds-text-subtle, ".concat(N600, ")"),
|
|
45
|
+
backgroundColor: "var(--ds-background-brand-hovered, ".concat(hexToRGBA(B50, 0.5), ")"),
|
|
46
|
+
boxShadow: "0 0 0 2px ".concat("var(--ds-border-focused, ".concat(B200, ")"))
|
|
47
47
|
},
|
|
48
48
|
hover: {
|
|
49
|
-
color: "var(--ds-text-
|
|
50
|
-
backgroundColor: "var(--ds-background-
|
|
49
|
+
color: "var(--ds-text-subtle, ".concat(B400, ")"),
|
|
50
|
+
backgroundColor: "var(--ds-background-neutral-hovered, ".concat(hexToRGBA(B50, 0.9), ")"),
|
|
51
51
|
boxShadow: ''
|
|
52
52
|
},
|
|
53
53
|
selected: {
|
|
54
|
-
color: "var(--ds-text-
|
|
55
|
-
backgroundColor: "var(--ds-background-
|
|
54
|
+
color: "var(--ds-text-brand)",
|
|
55
|
+
backgroundColor: "var(--ds-background-brand)",
|
|
56
56
|
boxShadow: ''
|
|
57
57
|
}
|
|
58
58
|
},
|
|
59
59
|
navigation: {
|
|
60
|
-
backgroundColor: "var(--ds-
|
|
61
|
-
color: "var(--ds-text-
|
|
60
|
+
backgroundColor: "var(--ds-surface, ".concat(N0, ")"),
|
|
61
|
+
color: "var(--ds-text-subtlest, ".concat(N200, ")")
|
|
62
62
|
},
|
|
63
63
|
productHome: {
|
|
64
64
|
backgroundColor: "var(--ds-text-brand, ".concat(B400, ")"),
|
|
65
|
-
color: "var(--ds-text
|
|
66
|
-
borderRight: "1px solid ".concat("var(--ds-border
|
|
65
|
+
color: "var(--ds-text, ".concat(N700, ")"),
|
|
66
|
+
borderRight: "1px solid ".concat("var(--ds-border, ".concat(hexToRGBA(N200, 0.3), ")")),
|
|
67
67
|
// TODO: (DSP-1256) These colors should be moved into the Logo package
|
|
68
68
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
69
69
|
iconGradientStart: B400,
|
|
@@ -74,49 +74,49 @@ var defaultTheme = {
|
|
|
74
74
|
},
|
|
75
75
|
primaryButton: {
|
|
76
76
|
active: {
|
|
77
|
-
color: "var(--ds-text-
|
|
78
|
-
backgroundColor: "var(--ds-background-
|
|
77
|
+
color: "var(--ds-text-subtle, ".concat(B400, ")"),
|
|
78
|
+
backgroundColor: "var(--ds-background-neutral-pressed, ".concat(hexToRGBA(B50, 0.7), ")"),
|
|
79
79
|
boxShadow: ''
|
|
80
80
|
},
|
|
81
81
|
default: {
|
|
82
|
-
color: "var(--ds-text-
|
|
82
|
+
color: "var(--ds-text-subtle, ".concat(N600, ")"),
|
|
83
83
|
backgroundColor: 'transparent',
|
|
84
84
|
boxShadow: ''
|
|
85
85
|
},
|
|
86
86
|
focus: {
|
|
87
|
-
color: "var(--ds-text-
|
|
87
|
+
color: "var(--ds-text-subtle, ".concat(N600, ")"),
|
|
88
88
|
backgroundColor: '',
|
|
89
|
-
boxShadow: "0 0 0 2px ".concat("var(--ds-border-
|
|
89
|
+
boxShadow: "0 0 0 2px ".concat("var(--ds-border-focused, ".concat(B200, ")"))
|
|
90
90
|
},
|
|
91
91
|
hover: {
|
|
92
|
-
color: "var(--ds-text-
|
|
93
|
-
backgroundColor: "var(--ds-background-
|
|
92
|
+
color: "var(--ds-text-subtle, ".concat(B400, ")"),
|
|
93
|
+
backgroundColor: "var(--ds-background-neutral-hovered, ".concat(hexToRGBA(B50, 0.9), ")"),
|
|
94
94
|
boxShadow: ''
|
|
95
95
|
},
|
|
96
96
|
selected: {
|
|
97
|
-
color: "var(--ds-text-
|
|
98
|
-
backgroundColor: "var(--ds-background-
|
|
97
|
+
color: "var(--ds-text-subtle, ".concat(B400, ")"),
|
|
98
|
+
backgroundColor: "var(--ds-background-brand)",
|
|
99
99
|
boxShadow: '',
|
|
100
|
-
borderColor: "var(--ds-
|
|
101
|
-
bordorBottom: "4px solid ".concat("var(--ds-
|
|
100
|
+
borderColor: "var(--ds-border-brand, ".concat(B400, ")"),
|
|
101
|
+
bordorBottom: "4px solid ".concat("var(--ds-border-brand, ".concat(B400, ")"))
|
|
102
102
|
}
|
|
103
103
|
},
|
|
104
104
|
search: {
|
|
105
105
|
default: {
|
|
106
|
-
backgroundColor: "var(--ds-
|
|
107
|
-
color: "var(--ds-text-
|
|
108
|
-
borderColor: "var(--ds-border
|
|
106
|
+
backgroundColor: "var(--ds-surface, ".concat(N0, ")"),
|
|
107
|
+
color: "var(--ds-text-subtlest, ".concat(N200, ")"),
|
|
108
|
+
borderColor: "var(--ds-border, ".concat(N40, ")")
|
|
109
109
|
},
|
|
110
110
|
focus: {
|
|
111
|
-
borderColor: "var(--ds-border-
|
|
111
|
+
borderColor: "var(--ds-border-focused, ".concat(B200, ")")
|
|
112
112
|
},
|
|
113
113
|
hover: {
|
|
114
114
|
color: "var(--ds-text-brand, ".concat(B400, ")"),
|
|
115
|
-
backgroundColor: "var(--ds-
|
|
115
|
+
backgroundColor: "var(--ds-surface, ".concat(hexToRGBA(B50, 0.9), ")")
|
|
116
116
|
}
|
|
117
117
|
},
|
|
118
118
|
skeleton: {
|
|
119
|
-
backgroundColor: "var(--ds-background-
|
|
119
|
+
backgroundColor: "var(--ds-background-neutral, ".concat(N20, ")"),
|
|
120
120
|
opacity: 1
|
|
121
121
|
}
|
|
122
122
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
|
|
3
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
3
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4
4
|
|
|
5
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
5
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
6
6
|
|
|
7
7
|
import defaultTheme, { DEFAULT_THEME_NAME } from './defaultTheme';
|
|
8
8
|
import { generateTextColor, getBoxShadow, getContrastColor, hexToRGBA } from './themeHelpers';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
3
|
|
|
4
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
4
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5
5
|
|
|
6
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
6
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
7
7
|
|
|
8
8
|
import chromatism from 'chromatism';
|
|
9
9
|
export var hexToRGBA = function hexToRGBA(hex) {
|
package/dist/esm/version.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { CreateProps } from './types';
|
|
3
|
-
export declare const Create: ({ onClick, text, buttonTooltip, iconButtonTooltip, testId, }: CreateProps) => JSX.Element;
|
|
3
|
+
export declare const Create: ({ onClick, href, text, buttonTooltip, iconButtonTooltip, testId, }: CreateProps) => JSX.Element;
|
|
4
4
|
export default Create;
|
|
@@ -16,7 +16,11 @@ export interface CreateProps {
|
|
|
16
16
|
* Click handler.
|
|
17
17
|
* See @atlaskit/analytics-next for analyticsEvent type information
|
|
18
18
|
*/
|
|
19
|
-
onClick
|
|
19
|
+
onClick?: (e: React.MouseEvent<HTMLElement>, analyticsEvent: any) => void;
|
|
20
|
+
/**
|
|
21
|
+
* Causes the Create action to be rendered as a link. This is suitable for when the Create action is handled as a full page rather than in a modal-dialog.
|
|
22
|
+
*/
|
|
23
|
+
href?: string;
|
|
20
24
|
/**
|
|
21
25
|
* A `testId` prop is provided for specified elements,
|
|
22
26
|
* which is a unique string that appears as a data attribute `data-testid` in the rendered code,
|
package/docs/05-create.tsx
CHANGED
|
@@ -20,6 +20,14 @@ import { Create } from '@atlaskit/atlassian-navigation';
|
|
|
20
20
|
/>
|
|
21
21
|
)}
|
|
22
22
|
|
|
23
|
+
${(
|
|
24
|
+
<Example
|
|
25
|
+
title="Create as a link"
|
|
26
|
+
Component={require('../examples/create-with-link.tsx').default}
|
|
27
|
+
source={require('!!raw-loader!../examples/create-with-link.tsx')}
|
|
28
|
+
/>
|
|
29
|
+
)}
|
|
30
|
+
|
|
23
31
|
${(
|
|
24
32
|
<Props
|
|
25
33
|
heading="Props"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/atlassian-navigation",
|
|
3
|
-
"version": "2.0
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"description": "A horizontal navigation component for Atlassian products.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -23,13 +23,13 @@
|
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@atlaskit/analytics-namespaced-context": "^6.
|
|
26
|
+
"@atlaskit/analytics-namespaced-context": "^6.4.0",
|
|
27
27
|
"@atlaskit/button": "^16.0.0",
|
|
28
|
-
"@atlaskit/icon": "^21.
|
|
28
|
+
"@atlaskit/icon": "^21.10.0",
|
|
29
29
|
"@atlaskit/logo": "*",
|
|
30
|
-
"@atlaskit/popup": "^1.
|
|
31
|
-
"@atlaskit/theme": "^12.
|
|
32
|
-
"@atlaskit/tokens": "^0.
|
|
30
|
+
"@atlaskit/popup": "^1.3.0",
|
|
31
|
+
"@atlaskit/theme": "^12.1.0",
|
|
32
|
+
"@atlaskit/tokens": "^0.6.0",
|
|
33
33
|
"@atlaskit/tooltip": "^17.5.0",
|
|
34
34
|
"@atlaskit/width-detector": "^3.0.0",
|
|
35
35
|
"@babel/runtime": "^7.0.0",
|