@atlaskit/side-navigation 1.1.2 → 1.2.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 +55 -0
- package/dist/cjs/common/constants.js +1 -1
- package/dist/cjs/common/styles.js +15 -17
- package/dist/cjs/components/Footer/index.js +28 -30
- package/dist/cjs/components/Header/index.js +5 -5
- package/dist/cjs/components/Item/button-item.js +3 -1
- package/dist/cjs/components/Item/custom-item.js +3 -1
- package/dist/cjs/components/Item/go-back-item.js +4 -4
- package/dist/cjs/components/Item/link-item.js +3 -1
- package/dist/cjs/components/NavigationContent/styles.js +7 -9
- package/dist/cjs/components/NestableNavigationContent/nesting-motion.js +2 -2
- package/dist/cjs/components/NestingItem/index.js +6 -6
- package/dist/cjs/components/NestingItem/styles.js +2 -2
- package/dist/cjs/components/SideNavigation/index.js +2 -4
- package/dist/cjs/components/index.js +34 -34
- package/dist/cjs/index.js +38 -38
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/common/styles.js +12 -13
- package/dist/es2019/components/Footer/index.js +9 -12
- package/dist/es2019/components/Header/index.js +2 -3
- package/dist/es2019/components/Item/go-back-item.js +1 -2
- package/dist/es2019/components/NavigationContent/styles.js +4 -5
- package/dist/es2019/components/NestingItem/index.js +1 -2
- package/dist/es2019/components/SideNavigation/index.js +2 -3
- package/dist/es2019/version.json +1 -1
- package/dist/esm/common/styles.js +14 -15
- package/dist/esm/components/Footer/index.js +28 -28
- package/dist/esm/components/Header/index.js +4 -4
- package/dist/esm/components/Item/button-item.js +2 -1
- package/dist/esm/components/Item/custom-item.js +2 -1
- package/dist/esm/components/Item/go-back-item.js +3 -3
- package/dist/esm/components/Item/link-item.js +2 -1
- package/dist/esm/components/NavigationContent/styles.js +6 -7
- package/dist/esm/components/NestableNavigationContent/nesting-motion.js +2 -2
- package/dist/esm/components/NestingItem/index.js +5 -5
- package/dist/esm/components/NestingItem/styles.js +2 -2
- package/dist/esm/components/SideNavigation/index.js +2 -3
- package/dist/esm/version.json +1 -1
- package/dist/types/components/Footer/index.d.ts +1 -0
- package/dist/types/components/Item/custom-item.d.ts +1 -0
- package/dist/types/components/Item/skeleton-item.d.ts +1 -0
- package/dist/types/components/NavigationHeader/index.d.ts +1 -0
- package/dist/types/components/Section/heading-item.d.ts +1 -0
- package/dist/types/components/Section/skeleton-heading-item.d.ts +1 -0
- package/package.json +7 -7
|
@@ -5,106 +5,106 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
Object.defineProperty(exports, "
|
|
8
|
+
Object.defineProperty(exports, "ButtonItem", {
|
|
9
9
|
enumerable: true,
|
|
10
10
|
get: function get() {
|
|
11
|
-
return
|
|
11
|
+
return _Item.ButtonItem;
|
|
12
12
|
}
|
|
13
13
|
});
|
|
14
|
-
Object.defineProperty(exports, "
|
|
14
|
+
Object.defineProperty(exports, "CustomItem", {
|
|
15
15
|
enumerable: true,
|
|
16
16
|
get: function get() {
|
|
17
|
-
return
|
|
17
|
+
return _Item.CustomItem;
|
|
18
18
|
}
|
|
19
19
|
});
|
|
20
|
-
Object.defineProperty(exports, "
|
|
20
|
+
Object.defineProperty(exports, "Footer", {
|
|
21
21
|
enumerable: true,
|
|
22
22
|
get: function get() {
|
|
23
|
-
return
|
|
23
|
+
return _Footer.default;
|
|
24
24
|
}
|
|
25
25
|
});
|
|
26
|
-
Object.defineProperty(exports, "
|
|
26
|
+
Object.defineProperty(exports, "GoBackItem", {
|
|
27
27
|
enumerable: true,
|
|
28
28
|
get: function get() {
|
|
29
|
-
return
|
|
29
|
+
return _Item.GoBackItem;
|
|
30
30
|
}
|
|
31
31
|
});
|
|
32
|
-
Object.defineProperty(exports, "
|
|
32
|
+
Object.defineProperty(exports, "Header", {
|
|
33
33
|
enumerable: true,
|
|
34
34
|
get: function get() {
|
|
35
|
-
return
|
|
35
|
+
return _Header.default;
|
|
36
36
|
}
|
|
37
37
|
});
|
|
38
|
-
Object.defineProperty(exports, "
|
|
38
|
+
Object.defineProperty(exports, "HeadingItem", {
|
|
39
39
|
enumerable: true,
|
|
40
40
|
get: function get() {
|
|
41
|
-
return
|
|
41
|
+
return _Section.HeadingItem;
|
|
42
42
|
}
|
|
43
43
|
});
|
|
44
|
-
Object.defineProperty(exports, "
|
|
44
|
+
Object.defineProperty(exports, "LinkItem", {
|
|
45
45
|
enumerable: true,
|
|
46
46
|
get: function get() {
|
|
47
|
-
return _Item.
|
|
47
|
+
return _Item.LinkItem;
|
|
48
48
|
}
|
|
49
49
|
});
|
|
50
|
-
Object.defineProperty(exports, "
|
|
50
|
+
Object.defineProperty(exports, "LoadingItems", {
|
|
51
51
|
enumerable: true,
|
|
52
52
|
get: function get() {
|
|
53
|
-
return
|
|
53
|
+
return _LoadingItems.default;
|
|
54
54
|
}
|
|
55
55
|
});
|
|
56
|
-
Object.defineProperty(exports, "
|
|
56
|
+
Object.defineProperty(exports, "NavigationContent", {
|
|
57
57
|
enumerable: true,
|
|
58
58
|
get: function get() {
|
|
59
|
-
return
|
|
59
|
+
return _NavigationContent.default;
|
|
60
60
|
}
|
|
61
61
|
});
|
|
62
|
-
Object.defineProperty(exports, "
|
|
62
|
+
Object.defineProperty(exports, "NavigationFooter", {
|
|
63
63
|
enumerable: true,
|
|
64
64
|
get: function get() {
|
|
65
|
-
return
|
|
65
|
+
return _NavigationFooter.default;
|
|
66
66
|
}
|
|
67
67
|
});
|
|
68
|
-
Object.defineProperty(exports, "
|
|
68
|
+
Object.defineProperty(exports, "NavigationHeader", {
|
|
69
69
|
enumerable: true,
|
|
70
70
|
get: function get() {
|
|
71
|
-
return
|
|
71
|
+
return _NavigationHeader.default;
|
|
72
72
|
}
|
|
73
73
|
});
|
|
74
|
-
Object.defineProperty(exports, "
|
|
74
|
+
Object.defineProperty(exports, "NestableNavigationContent", {
|
|
75
75
|
enumerable: true,
|
|
76
76
|
get: function get() {
|
|
77
|
-
return
|
|
77
|
+
return _NestableNavigationContent.default;
|
|
78
78
|
}
|
|
79
79
|
});
|
|
80
|
-
Object.defineProperty(exports, "
|
|
80
|
+
Object.defineProperty(exports, "NestingItem", {
|
|
81
81
|
enumerable: true,
|
|
82
82
|
get: function get() {
|
|
83
|
-
return
|
|
83
|
+
return _NestingItem.default;
|
|
84
84
|
}
|
|
85
85
|
});
|
|
86
|
-
Object.defineProperty(exports, "
|
|
86
|
+
Object.defineProperty(exports, "Section", {
|
|
87
87
|
enumerable: true,
|
|
88
88
|
get: function get() {
|
|
89
|
-
return
|
|
89
|
+
return _Section.Section;
|
|
90
90
|
}
|
|
91
91
|
});
|
|
92
|
-
Object.defineProperty(exports, "
|
|
92
|
+
Object.defineProperty(exports, "SideNavigation", {
|
|
93
93
|
enumerable: true,
|
|
94
94
|
get: function get() {
|
|
95
|
-
return
|
|
95
|
+
return _SideNavigation.default;
|
|
96
96
|
}
|
|
97
97
|
});
|
|
98
|
-
Object.defineProperty(exports, "
|
|
98
|
+
Object.defineProperty(exports, "SkeletonHeadingItem", {
|
|
99
99
|
enumerable: true,
|
|
100
100
|
get: function get() {
|
|
101
|
-
return
|
|
101
|
+
return _Section.SkeletonHeadingItem;
|
|
102
102
|
}
|
|
103
103
|
});
|
|
104
|
-
Object.defineProperty(exports, "
|
|
104
|
+
Object.defineProperty(exports, "SkeletonItem", {
|
|
105
105
|
enumerable: true,
|
|
106
106
|
get: function get() {
|
|
107
|
-
return
|
|
107
|
+
return _Item.SkeletonItem;
|
|
108
108
|
}
|
|
109
109
|
});
|
|
110
110
|
|
package/dist/cjs/index.js
CHANGED
|
@@ -3,34 +3,34 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
Object.defineProperty(exports, "
|
|
6
|
+
Object.defineProperty(exports, "ButtonItem", {
|
|
7
7
|
enumerable: true,
|
|
8
8
|
get: function get() {
|
|
9
|
-
return _components.
|
|
9
|
+
return _components.ButtonItem;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
-
Object.defineProperty(exports, "
|
|
12
|
+
Object.defineProperty(exports, "CustomItem", {
|
|
13
13
|
enumerable: true,
|
|
14
14
|
get: function get() {
|
|
15
|
-
return _components.
|
|
15
|
+
return _components.CustomItem;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
|
-
Object.defineProperty(exports, "
|
|
18
|
+
Object.defineProperty(exports, "Footer", {
|
|
19
19
|
enumerable: true,
|
|
20
20
|
get: function get() {
|
|
21
|
-
return _components.
|
|
21
|
+
return _components.Footer;
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
|
-
Object.defineProperty(exports, "
|
|
24
|
+
Object.defineProperty(exports, "GoBackItem", {
|
|
25
25
|
enumerable: true,
|
|
26
26
|
get: function get() {
|
|
27
|
-
return _components.
|
|
27
|
+
return _components.GoBackItem;
|
|
28
28
|
}
|
|
29
29
|
});
|
|
30
|
-
Object.defineProperty(exports, "
|
|
30
|
+
Object.defineProperty(exports, "Header", {
|
|
31
31
|
enumerable: true,
|
|
32
32
|
get: function get() {
|
|
33
|
-
return _components.
|
|
33
|
+
return _components.Header;
|
|
34
34
|
}
|
|
35
35
|
});
|
|
36
36
|
Object.defineProperty(exports, "HeadingItem", {
|
|
@@ -39,76 +39,70 @@ Object.defineProperty(exports, "HeadingItem", {
|
|
|
39
39
|
return _components.HeadingItem;
|
|
40
40
|
}
|
|
41
41
|
});
|
|
42
|
-
Object.defineProperty(exports, "
|
|
43
|
-
enumerable: true,
|
|
44
|
-
get: function get() {
|
|
45
|
-
return _components.SkeletonHeadingItem;
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
Object.defineProperty(exports, "NestableNavigationContent", {
|
|
42
|
+
Object.defineProperty(exports, "LinkItem", {
|
|
49
43
|
enumerable: true,
|
|
50
44
|
get: function get() {
|
|
51
|
-
return _components.
|
|
45
|
+
return _components.LinkItem;
|
|
52
46
|
}
|
|
53
47
|
});
|
|
54
|
-
Object.defineProperty(exports, "
|
|
48
|
+
Object.defineProperty(exports, "LoadingItems", {
|
|
55
49
|
enumerable: true,
|
|
56
50
|
get: function get() {
|
|
57
|
-
return _components.
|
|
51
|
+
return _components.LoadingItems;
|
|
58
52
|
}
|
|
59
53
|
});
|
|
60
|
-
Object.defineProperty(exports, "
|
|
54
|
+
Object.defineProperty(exports, "NavigationContent", {
|
|
61
55
|
enumerable: true,
|
|
62
56
|
get: function get() {
|
|
63
|
-
return _components.
|
|
57
|
+
return _components.NavigationContent;
|
|
64
58
|
}
|
|
65
59
|
});
|
|
66
|
-
Object.defineProperty(exports, "
|
|
60
|
+
Object.defineProperty(exports, "NavigationFooter", {
|
|
67
61
|
enumerable: true,
|
|
68
62
|
get: function get() {
|
|
69
|
-
return _components.
|
|
63
|
+
return _components.NavigationFooter;
|
|
70
64
|
}
|
|
71
65
|
});
|
|
72
|
-
Object.defineProperty(exports, "
|
|
66
|
+
Object.defineProperty(exports, "NavigationHeader", {
|
|
73
67
|
enumerable: true,
|
|
74
68
|
get: function get() {
|
|
75
|
-
return _components.
|
|
69
|
+
return _components.NavigationHeader;
|
|
76
70
|
}
|
|
77
71
|
});
|
|
78
|
-
Object.defineProperty(exports, "
|
|
72
|
+
Object.defineProperty(exports, "NestableNavigationContent", {
|
|
79
73
|
enumerable: true,
|
|
80
74
|
get: function get() {
|
|
81
|
-
return _components.
|
|
75
|
+
return _components.NestableNavigationContent;
|
|
82
76
|
}
|
|
83
77
|
});
|
|
84
|
-
Object.defineProperty(exports, "
|
|
78
|
+
Object.defineProperty(exports, "NestingItem", {
|
|
85
79
|
enumerable: true,
|
|
86
80
|
get: function get() {
|
|
87
|
-
return _components.
|
|
81
|
+
return _components.NestingItem;
|
|
88
82
|
}
|
|
89
83
|
});
|
|
90
|
-
Object.defineProperty(exports, "
|
|
84
|
+
Object.defineProperty(exports, "Section", {
|
|
91
85
|
enumerable: true,
|
|
92
86
|
get: function get() {
|
|
93
|
-
return _components.
|
|
87
|
+
return _components.Section;
|
|
94
88
|
}
|
|
95
89
|
});
|
|
96
|
-
Object.defineProperty(exports, "
|
|
90
|
+
Object.defineProperty(exports, "SideNavigation", {
|
|
97
91
|
enumerable: true,
|
|
98
92
|
get: function get() {
|
|
99
|
-
return _components.
|
|
93
|
+
return _components.SideNavigation;
|
|
100
94
|
}
|
|
101
95
|
});
|
|
102
|
-
Object.defineProperty(exports, "
|
|
96
|
+
Object.defineProperty(exports, "SkeletonHeadingItem", {
|
|
103
97
|
enumerable: true,
|
|
104
98
|
get: function get() {
|
|
105
|
-
return _components.
|
|
99
|
+
return _components.SkeletonHeadingItem;
|
|
106
100
|
}
|
|
107
101
|
});
|
|
108
|
-
Object.defineProperty(exports, "
|
|
102
|
+
Object.defineProperty(exports, "SkeletonItem", {
|
|
109
103
|
enumerable: true,
|
|
110
104
|
get: function get() {
|
|
111
|
-
return
|
|
105
|
+
return _components.SkeletonItem;
|
|
112
106
|
}
|
|
113
107
|
});
|
|
114
108
|
Object.defineProperty(exports, "VAR_SCROLL_INDICATOR_COLOR", {
|
|
@@ -123,6 +117,12 @@ Object.defineProperty(exports, "VAR_SEPARATOR_COLOR", {
|
|
|
123
117
|
return _constants.VAR_SEPARATOR_COLOR;
|
|
124
118
|
}
|
|
125
119
|
});
|
|
120
|
+
Object.defineProperty(exports, "useShouldNestedElementRender", {
|
|
121
|
+
enumerable: true,
|
|
122
|
+
get: function get() {
|
|
123
|
+
return _context.useShouldNestedElementRender;
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
126
|
|
|
127
127
|
var _components = require("./components");
|
|
128
128
|
|
package/dist/cjs/version.json
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { B400, B50, N10, N30, N500 } from '@atlaskit/theme/colors';
|
|
2
2
|
import { borderRadius as borderRadiusFn, gridSize as gridSizeFn } from '@atlaskit/theme/constants';
|
|
3
|
-
import { token } from '@atlaskit/tokens';
|
|
4
3
|
const gridSize = gridSizeFn();
|
|
5
4
|
const borderRadius = borderRadiusFn();
|
|
6
5
|
const itemIconSize = gridSize * 3;
|
|
@@ -19,27 +18,27 @@ export const overrideStyleFunction = (baseStyle, newStyle = () => ({})) => {
|
|
|
19
18
|
};
|
|
20
19
|
const defaultStyles = {
|
|
21
20
|
'&:hover': {
|
|
22
|
-
color:
|
|
23
|
-
backgroundColor:
|
|
21
|
+
color: `var(--ds-text-subtle, ${N500})`,
|
|
22
|
+
backgroundColor: `var(--ds-background-neutral-subtle-hovered, ${N30})`
|
|
24
23
|
},
|
|
25
24
|
'&:active': {
|
|
26
|
-
color:
|
|
27
|
-
backgroundColor:
|
|
25
|
+
color: `var(--ds-text-subtle, ${B400})`,
|
|
26
|
+
backgroundColor: `var(--ds-background-neutral-subtle-pressed, ${B50})`
|
|
28
27
|
}
|
|
29
28
|
};
|
|
30
29
|
const selectedStyles = {
|
|
31
|
-
backgroundColor:
|
|
32
|
-
color:
|
|
30
|
+
backgroundColor: `var(--ds-background-brand, ${N30})`,
|
|
31
|
+
color: `var(--ds-text-brand, ${B400})`,
|
|
33
32
|
':visited': {
|
|
34
|
-
color:
|
|
33
|
+
color: `var(--ds-text-brand, ${B400})`
|
|
35
34
|
},
|
|
36
35
|
'&:hover': {
|
|
37
|
-
backgroundColor:
|
|
38
|
-
color:
|
|
36
|
+
backgroundColor: `var(--ds-background-brand-hovered, ${N30})`,
|
|
37
|
+
color: `var(--ds-text-brand, ${N500})`
|
|
39
38
|
},
|
|
40
39
|
'&:active': {
|
|
41
|
-
backgroundColor:
|
|
42
|
-
color:
|
|
40
|
+
backgroundColor: `var(--ds-background-brand-pressed, ${B50})`,
|
|
41
|
+
color: `var(--ds-text-brand, ${B400})`
|
|
43
42
|
}
|
|
44
43
|
};
|
|
45
44
|
export const baseSideNavItemStyle = ({
|
|
@@ -54,7 +53,7 @@ export const baseSideNavItemStyle = ({
|
|
|
54
53
|
// -- TODO: DELETE THESE COLOR OVERRIDES WHEN CLEANING UP FALLBACK THEMING --
|
|
55
54
|
// Menu and side navigation are now color aligned so they do not need this!
|
|
56
55
|
// See: https://product-fabric.atlassian.net/browse/DSP-1684
|
|
57
|
-
backgroundColor:
|
|
56
|
+
backgroundColor: `var(--ds-surface, ${N10})`,
|
|
58
57
|
...(!isDisabled && !isSelected && defaultStyles),
|
|
59
58
|
...(!isDisabled && isSelected && selectedStyles),
|
|
60
59
|
// -- END TODO --------------------------------------------------------------
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { N500 } from '@atlaskit/theme/colors';
|
|
4
|
-
import { token } from '@atlaskit/tokens';
|
|
5
4
|
import { overrideStyleFunction } from '../../common/styles';
|
|
6
5
|
import { CustomItem } from '../Item';
|
|
7
6
|
|
|
@@ -12,23 +11,21 @@ const Container = props => {
|
|
|
12
11
|
const Footer = props => {
|
|
13
12
|
const cssFn = overrideStyleFunction(() => ({
|
|
14
13
|
userSelect: 'auto',
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
},
|
|
22
|
-
['[data-item-elem-before]']: {
|
|
14
|
+
display: 'block',
|
|
15
|
+
textAlign: 'center',
|
|
16
|
+
minHeight: '24px',
|
|
17
|
+
alignItems: 'center',
|
|
18
|
+
width: '100%',
|
|
19
|
+
'[data-item-elem-before]': {
|
|
23
20
|
marginRight: 0,
|
|
24
21
|
marginBottom: '8px',
|
|
25
22
|
display: 'inline-block'
|
|
26
23
|
},
|
|
27
|
-
|
|
24
|
+
'[data-item-title]': {
|
|
28
25
|
textAlign: 'center',
|
|
29
26
|
fontSize: 12
|
|
30
27
|
},
|
|
31
|
-
|
|
28
|
+
'[data-item-description]': {
|
|
32
29
|
textAlign: 'center',
|
|
33
30
|
display: 'inline-block',
|
|
34
31
|
margin: '6px'
|
|
@@ -40,7 +37,7 @@ const Footer = props => {
|
|
|
40
37
|
},
|
|
41
38
|
'div&:active': {
|
|
42
39
|
backgroundColor: 'transparent',
|
|
43
|
-
color:
|
|
40
|
+
color: `var(--ds-text-subtle, ${N500})`
|
|
44
41
|
}
|
|
45
42
|
}), props.cssFn);
|
|
46
43
|
return /*#__PURE__*/React.createElement(CustomItem, _extends({}, props, {
|
|
@@ -2,7 +2,6 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import React, { forwardRef } from 'react';
|
|
3
3
|
import { N500 } from '@atlaskit/theme/colors';
|
|
4
4
|
import { headingSizes } from '@atlaskit/theme/typography';
|
|
5
|
-
import { token } from '@atlaskit/tokens';
|
|
6
5
|
import { overrideStyleFunction } from '../../common/styles';
|
|
7
6
|
import { CustomItem } from '../Item';
|
|
8
7
|
|
|
@@ -17,7 +16,7 @@ const Header = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
17
16
|
fontSize: headingSizes.h400.size,
|
|
18
17
|
letterSpacing: '-0.003em',
|
|
19
18
|
fontWeight: 600,
|
|
20
|
-
color:
|
|
19
|
+
color: `var(--ds-text, ${N500})`
|
|
21
20
|
},
|
|
22
21
|
// Will look interactive if the `component` is anything other than a div.
|
|
23
22
|
'div&:hover': {
|
|
@@ -26,7 +25,7 @@ const Header = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
26
25
|
},
|
|
27
26
|
'div&:active': {
|
|
28
27
|
backgroundColor: 'transparent',
|
|
29
|
-
color:
|
|
28
|
+
color: `var(--ds-text, ${N500})`
|
|
30
29
|
}
|
|
31
30
|
}), props.cssFn);
|
|
32
31
|
return /*#__PURE__*/React.createElement(CustomItem, _extends({}, props, {
|
|
@@ -2,12 +2,11 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import React, { forwardRef, useCallback, useState } from 'react';
|
|
3
3
|
import LeftArrow from '@atlaskit/icon/glyph/arrow-left-circle';
|
|
4
4
|
import { N10 } from '@atlaskit/theme/colors';
|
|
5
|
-
import { token } from '@atlaskit/tokens';
|
|
6
5
|
import ButtonItem from './button-item';
|
|
7
6
|
const GoBackItem = /*#__PURE__*/forwardRef(({
|
|
8
7
|
cssFn,
|
|
9
8
|
iconBefore = /*#__PURE__*/React.createElement(LeftArrow, {
|
|
10
|
-
secondaryColor:
|
|
9
|
+
secondaryColor: `var(--ds-surface, ${N10})`,
|
|
11
10
|
label: ""
|
|
12
11
|
}),
|
|
13
12
|
onClick,
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { N10, N30 } from '@atlaskit/theme/colors';
|
|
2
2
|
import { gridSize } from '@atlaskit/theme/constants';
|
|
3
3
|
import { headingSizes } from '@atlaskit/theme/typography';
|
|
4
|
-
import { token } from '@atlaskit/tokens';
|
|
5
4
|
import { VAR_SCROLL_INDICATOR_COLOR, VAR_SEPARATOR_COLOR } from '../../common/constants';
|
|
6
5
|
const scrollIndicatorMaskZIndex = 2;
|
|
7
6
|
const scrollIndicatorZIndex = 1;
|
|
@@ -39,7 +38,7 @@ export const outerContainerCSS = opts => ({
|
|
|
39
38
|
right: containerPadding + opts.scrollbarWidth,
|
|
40
39
|
height: scrollIndicatorHeight,
|
|
41
40
|
borderRadius: scrollIndicatorBorderRadius,
|
|
42
|
-
backgroundColor: `var(${VAR_SEPARATOR_COLOR}, ${
|
|
41
|
+
backgroundColor: `var(${VAR_SEPARATOR_COLOR}, ${`var(--ds-border, ${N30})`})`,
|
|
43
42
|
position: 'absolute',
|
|
44
43
|
zIndex: scrollIndicatorZIndex
|
|
45
44
|
},
|
|
@@ -54,7 +53,7 @@ export const outerContainerCSS = opts => ({
|
|
|
54
53
|
right: containerPadding + opts.scrollbarWidth,
|
|
55
54
|
bottom: 0,
|
|
56
55
|
zIndex: scrollIndicatorZIndex,
|
|
57
|
-
backgroundColor: `var(${VAR_SEPARATOR_COLOR}, ${
|
|
56
|
+
backgroundColor: `var(${VAR_SEPARATOR_COLOR}, ${`var(--ds-border, ${N30})`})`
|
|
58
57
|
}
|
|
59
58
|
});
|
|
60
59
|
/**
|
|
@@ -79,7 +78,7 @@ export const innerContainerCSS = opts => ({
|
|
|
79
78
|
left: 0,
|
|
80
79
|
right: 0,
|
|
81
80
|
height: scrollIndicatorHeight,
|
|
82
|
-
backgroundColor: `var(${VAR_SCROLL_INDICATOR_COLOR}, ${
|
|
81
|
+
backgroundColor: `var(${VAR_SCROLL_INDICATOR_COLOR}, ${`var(--ds-surface, ${N10})`})`,
|
|
83
82
|
position: 'absolute',
|
|
84
83
|
display: 'block',
|
|
85
84
|
zIndex: scrollIndicatorMaskZIndex
|
|
@@ -97,7 +96,7 @@ export const innerContainerCSS = opts => ({
|
|
|
97
96
|
marginTop: 'auto',
|
|
98
97
|
position: 'relative',
|
|
99
98
|
zIndex: scrollIndicatorMaskZIndex,
|
|
100
|
-
backgroundColor: `var(${VAR_SCROLL_INDICATOR_COLOR}, ${
|
|
99
|
+
backgroundColor: `var(${VAR_SCROLL_INDICATOR_COLOR}, ${`var(--ds-surface, ${N10})`})`
|
|
101
100
|
}
|
|
102
101
|
});
|
|
103
102
|
export const containerCSS = opts => ({
|
|
@@ -6,7 +6,6 @@ import { jsx } from '@emotion/core';
|
|
|
6
6
|
import RightArrow from '@atlaskit/icon/glyph/arrow-right-circle';
|
|
7
7
|
import { N10 } from '@atlaskit/theme/colors';
|
|
8
8
|
import { gridSize } from '@atlaskit/theme/constants';
|
|
9
|
-
import { token } from '@atlaskit/tokens';
|
|
10
9
|
import { overrideStyleFunction } from '../../common/styles';
|
|
11
10
|
import { ButtonItem, CustomItem, NavigationContent } from '../index';
|
|
12
11
|
import { ROOT_ID } from '../NestableNavigationContent';
|
|
@@ -104,7 +103,7 @@ const NestingItem = props => {
|
|
|
104
103
|
"data-right-arrow": true
|
|
105
104
|
}, jsx(RightArrow, {
|
|
106
105
|
testId: testId && `${testId}--item--right-arrow`,
|
|
107
|
-
secondaryColor:
|
|
106
|
+
secondaryColor: `var(--ds-surface, ${N10})`,
|
|
108
107
|
label: ""
|
|
109
108
|
}))),
|
|
110
109
|
onClick: onClickHandler,
|
|
@@ -3,7 +3,6 @@ import { forwardRef } from 'react';
|
|
|
3
3
|
import { jsx } from '@emotion/core';
|
|
4
4
|
import { N10, N500 } from '@atlaskit/theme/colors';
|
|
5
5
|
import { gridSize } from '@atlaskit/theme/constants';
|
|
6
|
-
import { token } from '@atlaskit/tokens';
|
|
7
6
|
const SideNavigation = /*#__PURE__*/forwardRef((props, ref) => {
|
|
8
7
|
const {
|
|
9
8
|
children,
|
|
@@ -17,9 +16,9 @@ const SideNavigation = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
17
16
|
css: {
|
|
18
17
|
width: '100%',
|
|
19
18
|
height: '100%',
|
|
20
|
-
color:
|
|
19
|
+
color: `var(--ds-text-subtle, ${N500})`,
|
|
21
20
|
minWidth: gridSize() * 30,
|
|
22
|
-
backgroundColor:
|
|
21
|
+
backgroundColor: `var(--ds-surface, ${N10})`,
|
|
23
22
|
position: 'relative',
|
|
24
23
|
display: 'flex',
|
|
25
24
|
flexDirection: 'column',
|
package/dist/es2019/version.json
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
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 { B400, B50, N10, N30, N500 } from '@atlaskit/theme/colors';
|
|
8
8
|
import { borderRadius as borderRadiusFn, gridSize as gridSizeFn } from '@atlaskit/theme/constants';
|
|
9
|
-
import { token } from '@atlaskit/tokens';
|
|
10
9
|
var gridSize = gridSizeFn();
|
|
11
10
|
var borderRadius = borderRadiusFn();
|
|
12
11
|
var itemIconSize = gridSize * 3;
|
|
@@ -28,27 +27,27 @@ export var overrideStyleFunction = function overrideStyleFunction(baseStyle) {
|
|
|
28
27
|
};
|
|
29
28
|
var defaultStyles = {
|
|
30
29
|
'&:hover': {
|
|
31
|
-
color:
|
|
32
|
-
backgroundColor:
|
|
30
|
+
color: "var(--ds-text-subtle, ".concat(N500, ")"),
|
|
31
|
+
backgroundColor: "var(--ds-background-neutral-subtle-hovered, ".concat(N30, ")")
|
|
33
32
|
},
|
|
34
33
|
'&:active': {
|
|
35
|
-
color:
|
|
36
|
-
backgroundColor:
|
|
34
|
+
color: "var(--ds-text-subtle, ".concat(B400, ")"),
|
|
35
|
+
backgroundColor: "var(--ds-background-neutral-subtle-pressed, ".concat(B50, ")")
|
|
37
36
|
}
|
|
38
37
|
};
|
|
39
38
|
var selectedStyles = {
|
|
40
|
-
backgroundColor:
|
|
41
|
-
color:
|
|
39
|
+
backgroundColor: "var(--ds-background-brand, ".concat(N30, ")"),
|
|
40
|
+
color: "var(--ds-text-brand, ".concat(B400, ")"),
|
|
42
41
|
':visited': {
|
|
43
|
-
color:
|
|
42
|
+
color: "var(--ds-text-brand, ".concat(B400, ")")
|
|
44
43
|
},
|
|
45
44
|
'&:hover': {
|
|
46
|
-
backgroundColor:
|
|
47
|
-
color:
|
|
45
|
+
backgroundColor: "var(--ds-background-brand-hovered, ".concat(N30, ")"),
|
|
46
|
+
color: "var(--ds-text-brand, ".concat(N500, ")")
|
|
48
47
|
},
|
|
49
48
|
'&:active': {
|
|
50
|
-
backgroundColor:
|
|
51
|
-
color:
|
|
49
|
+
backgroundColor: "var(--ds-background-brand-pressed, ".concat(B50, ")"),
|
|
50
|
+
color: "var(--ds-text-brand, ".concat(B400, ")")
|
|
52
51
|
}
|
|
53
52
|
};
|
|
54
53
|
export var baseSideNavItemStyle = function baseSideNavItemStyle(_ref) {
|
|
@@ -62,7 +61,7 @@ export var baseSideNavItemStyle = function baseSideNavItemStyle(_ref) {
|
|
|
62
61
|
// -- TODO: DELETE THESE COLOR OVERRIDES WHEN CLEANING UP FALLBACK THEMING --
|
|
63
62
|
// Menu and side navigation are now color aligned so they do not need this!
|
|
64
63
|
// See: https://product-fabric.atlassian.net/browse/DSP-1684
|
|
65
|
-
backgroundColor:
|
|
64
|
+
backgroundColor: "var(--ds-surface, ".concat(N10, ")")
|
|
66
65
|
}, !isDisabled && !isSelected && defaultStyles), !isDisabled && isSelected && selectedStyles), {}, _defineProperty({}, '& [data-item-elem-before]', {
|
|
67
66
|
// TODO: Can this be moved into menu?
|
|
68
67
|
// center align icons with app-switcher regardless of size
|