@pingux/astro 2.170.0-alpha.0 → 2.170.1-alpha.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/lib/cjs/components/NavBar/stories/NavBarNextGenComponent.js +8 -1
- package/lib/cjs/components/NavBarSection/NavBarItem.js +2 -2
- package/lib/cjs/components/NavBarSection/NavBarItemHeader.js +3 -3
- package/lib/cjs/components/NavBarSection/NavBarItemHeader.test.js +1 -1
- package/lib/cjs/components/NavSideBar/NavSideBarItem.js +12 -4
- package/lib/cjs/components/NavSideBar/NavSideBarSectionHeader.js +4 -3
- package/lib/cjs/hooks/useGetTheme/useGetTheme.d.ts +2 -0
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/customProperties/index.d.ts +1 -0
- package/lib/cjs/styles/themeOverrides/onyxSideNav.d.ts +15 -0
- package/lib/cjs/styles/themeOverrides/onyxSideNav.js +23 -8
- package/lib/cjs/styles/themes/astro/customProperties/index.d.ts +1 -0
- package/lib/cjs/styles/themes/astro/customProperties/index.js +2 -0
- package/lib/cjs/styles/themes/next-gen/customProperties/index.d.ts +1 -0
- package/lib/cjs/styles/themes/next-gen/customProperties/index.js +2 -0
- package/lib/components/NavBar/stories/NavBarNextGenComponent.js +8 -1
- package/lib/components/NavBarSection/NavBarItem.js +2 -2
- package/lib/components/NavBarSection/NavBarItemHeader.js +3 -3
- package/lib/components/NavBarSection/NavBarItemHeader.test.js +1 -1
- package/lib/components/NavSideBar/NavSideBarItem.js +13 -5
- package/lib/components/NavSideBar/NavSideBarSectionHeader.js +4 -3
- package/lib/styles/themeOverrides/onyxSideNav.js +23 -8
- package/lib/styles/themes/astro/customProperties/index.js +2 -0
- package/lib/styles/themes/next-gen/customProperties/index.js +2 -0
- package/lib/tsconfig.lib.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -57,11 +57,18 @@ var NavBarNextGenComponent = exports.NavBarNextGenComponent = function NavBarNex
|
|
|
57
57
|
'data-id': 'Authentication-data-id',
|
|
58
58
|
heading: 'Authentication',
|
|
59
59
|
icon: icons.authenticationIcon,
|
|
60
|
+
title: 'Policies',
|
|
60
61
|
key: 'Authentication',
|
|
61
62
|
children: [(0, _react2.jsx)(_.NavBarItemButton, {
|
|
62
63
|
key: "Authentication-Policies",
|
|
63
64
|
id: "Authentication-Policies"
|
|
64
|
-
}, "Authentication Policies"),
|
|
65
|
+
}, "Authentication Policies"), {
|
|
66
|
+
hasSeparator: false,
|
|
67
|
+
subTitle: 'Applications'
|
|
68
|
+
}, (0, _react2.jsx)(_.Separator, {
|
|
69
|
+
key: "separator",
|
|
70
|
+
variant: "separator.navBarSubtitleSeparator"
|
|
71
|
+
}), (0, _react2.jsx)(_.NavBarItemButton, {
|
|
65
72
|
key: "Password-Policies",
|
|
66
73
|
id: "Password-Policies"
|
|
67
74
|
}, "Password Policies")]
|
|
@@ -67,7 +67,7 @@ var NavBarItem = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
67
67
|
classNames = _useStatusClasses.classNames;
|
|
68
68
|
var color = isSelected ? 'white' : 'neutral.95';
|
|
69
69
|
var _useGetTheme = (0, _hooks.useGetTheme)(),
|
|
70
|
-
|
|
70
|
+
navBarIconSize = _useGetTheme.navBarIconSize;
|
|
71
71
|
return (0, _react2.jsx)(_index.Box, (0, _extends2["default"])({
|
|
72
72
|
id: key,
|
|
73
73
|
variant: state.navStyles.navBarItem,
|
|
@@ -89,7 +89,7 @@ var NavBarItem = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
89
89
|
title: {
|
|
90
90
|
name: text
|
|
91
91
|
},
|
|
92
|
-
size:
|
|
92
|
+
size: navBarIconSize || 18,
|
|
93
93
|
sx: {
|
|
94
94
|
mr: 'sm',
|
|
95
95
|
color: color,
|
|
@@ -38,8 +38,8 @@ var NavBarSectionItemHeader = function NavBarSectionItemHeader(_ref2) {
|
|
|
38
38
|
heading = item.heading;
|
|
39
39
|
var navBarState = (0, _NavBarContext.useNavBarContext)();
|
|
40
40
|
var _useGetTheme = (0, _useGetTheme3["default"])(),
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
icons = _useGetTheme.icons,
|
|
42
|
+
navBarIconSize = _useGetTheme.navBarIconSize;
|
|
43
43
|
var MenuDown = icons.MenuDown,
|
|
44
44
|
MenuUp = icons.MenuUp;
|
|
45
45
|
var selectedKey = navBarState.selectedKey,
|
|
@@ -74,7 +74,7 @@ var NavBarSectionItemHeader = function NavBarSectionItemHeader(_ref2) {
|
|
|
74
74
|
"data-testid": heading
|
|
75
75
|
}, icon && (0, _react2.jsx)(_index.Icon, {
|
|
76
76
|
icon: icon,
|
|
77
|
-
size:
|
|
77
|
+
size: navBarIconSize || 18,
|
|
78
78
|
sx: {
|
|
79
79
|
mr: 'sm',
|
|
80
80
|
color: getIconColor(),
|
|
@@ -81,6 +81,6 @@ describe('NavItemHeader', function () {
|
|
|
81
81
|
getComponent();
|
|
82
82
|
var icon = _testWrapper.screen.getByTestId('Dashboard').querySelector('svg');
|
|
83
83
|
expect(icon).toBeInTheDocument();
|
|
84
|
-
expect(icon).toHaveAttribute('width', '
|
|
84
|
+
expect(icon).toHaveAttribute('width', '18');
|
|
85
85
|
});
|
|
86
86
|
});
|
|
@@ -9,8 +9,8 @@ _Object$defineProperty(exports, "__esModule", {
|
|
|
9
9
|
value: true
|
|
10
10
|
});
|
|
11
11
|
exports["default"] = void 0;
|
|
12
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/extends"));
|
|
13
12
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/objectWithoutProperties"));
|
|
13
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/extends"));
|
|
14
14
|
var _react = _interopRequireWildcard(require("react"));
|
|
15
15
|
var _reactAria = require("react-aria");
|
|
16
16
|
var _interactions = require("@react-aria/interactions");
|
|
@@ -23,8 +23,13 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof _WeakMap) var
|
|
|
23
23
|
var NavSideBarItem = function NavSideBarItem(props) {
|
|
24
24
|
var children = props.children,
|
|
25
25
|
linkProps = props.linkProps;
|
|
26
|
+
console.log(props);
|
|
26
27
|
if (linkProps && linkProps !== null && linkProps !== void 0 && linkProps.href) {
|
|
27
|
-
return (0, _react2.jsx)(_index.Link,
|
|
28
|
+
return (0, _react2.jsx)(_index.Link, (0, _extends2["default"])({}, linkProps, {
|
|
29
|
+
sx: {
|
|
30
|
+
textDecoration: 'none !important'
|
|
31
|
+
}
|
|
32
|
+
}), (0, _react2.jsx)(ChildWrapper, props, children));
|
|
28
33
|
}
|
|
29
34
|
return (0, _react2.jsx)(_index.Button, {
|
|
30
35
|
variant: "link",
|
|
@@ -68,6 +73,8 @@ var ChildWrapper = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
68
73
|
}),
|
|
69
74
|
pressProps = _usePress.pressProps,
|
|
70
75
|
isPressed = _usePress.isPressed;
|
|
76
|
+
var _useGetTheme = (0, _hooks.useGetTheme)(),
|
|
77
|
+
navBarIconSize = _useGetTheme.navBarIconSize;
|
|
71
78
|
var mergedProps = (0, _reactAria.mergeProps)(pressProps, hoverProps, focusWithinProps, focusProps, others);
|
|
72
79
|
var _useStatusClasses = (0, _hooks.useStatusClasses)(className, {
|
|
73
80
|
isPressed: isPressed,
|
|
@@ -76,6 +83,7 @@ var ChildWrapper = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
76
83
|
isFocused: isFocusVisible
|
|
77
84
|
}),
|
|
78
85
|
classNames = _useStatusClasses.classNames;
|
|
86
|
+
console.log(state.navStyles.navBarItem);
|
|
79
87
|
return (0, _react2.jsx)(_index.Box, (0, _extends2["default"])({
|
|
80
88
|
id: key,
|
|
81
89
|
variant: state.navStyles.navBarItem,
|
|
@@ -93,13 +101,13 @@ var ChildWrapper = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
93
101
|
title: {
|
|
94
102
|
name: children
|
|
95
103
|
},
|
|
96
|
-
size:
|
|
104
|
+
size: navBarIconSize,
|
|
97
105
|
variant: isSelected ? state.navStyles.navBarItemIconSelected : state.navStyles.navBarItemIcon
|
|
98
106
|
}, iconProps)), (0, _react2.jsx)(_index.Text, {
|
|
99
107
|
variant: state.navStyles.navBarItemText
|
|
100
108
|
}, children), customIcon && (0, _react2.jsx)(_index.Icon, (0, _extends2["default"])({
|
|
101
109
|
icon: customIcon,
|
|
102
|
-
size:
|
|
110
|
+
size: navBarIconSize,
|
|
103
111
|
variant: isSelected ? state.navStyles.navBarItemCustomIconSelected : state.navStyles.navBarItemCustomIcon
|
|
104
112
|
}, customIconProps, {
|
|
105
113
|
title: {
|
|
@@ -33,7 +33,8 @@ var NavSideBarSectionHeader = function NavSideBarSectionHeader(props) {
|
|
|
33
33
|
onExpandedChange = props.onExpandedChange,
|
|
34
34
|
others = (0, _objectWithoutProperties2["default"])(props, _excluded);
|
|
35
35
|
var _useGetTheme = (0, _useGetTheme2["default"])(),
|
|
36
|
-
icons = _useGetTheme.icons
|
|
36
|
+
icons = _useGetTheme.icons,
|
|
37
|
+
navBarIconSize = _useGetTheme.navBarIconSize;
|
|
37
38
|
var MenuUp = icons.MenuUp,
|
|
38
39
|
MenuDown = icons.MenuDown;
|
|
39
40
|
var navBarState = (0, _NavBarContext.useNavBarContext)();
|
|
@@ -74,7 +75,7 @@ var NavSideBarSectionHeader = function NavSideBarSectionHeader(props) {
|
|
|
74
75
|
isRow: true
|
|
75
76
|
}, icon && (0, _react2.jsx)(_index.Icon, {
|
|
76
77
|
icon: icon,
|
|
77
|
-
size:
|
|
78
|
+
size: navBarIconSize,
|
|
78
79
|
variant: variant,
|
|
79
80
|
"aria-hidden": "true"
|
|
80
81
|
}), (0, _react2.jsx)(_index.Text, {
|
|
@@ -87,7 +88,7 @@ var NavSideBarSectionHeader = function NavSideBarSectionHeader(props) {
|
|
|
87
88
|
}
|
|
88
89
|
}, (0, _react2.jsx)(_index.Icon, {
|
|
89
90
|
icon: isExpanded ? MenuUp : MenuDown,
|
|
90
|
-
size:
|
|
91
|
+
size: navBarIconSize,
|
|
91
92
|
variant: variant,
|
|
92
93
|
mr: "0",
|
|
93
94
|
title: {
|
|
@@ -7,6 +7,7 @@ export declare const baseState: {
|
|
|
7
7
|
declare const useGetTheme: () => {
|
|
8
8
|
name: string;
|
|
9
9
|
accordionItemDefaultLabelTag: string;
|
|
10
|
+
navBarIconSize: import("../..").IconSize;
|
|
10
11
|
activeColor: string;
|
|
11
12
|
backgroundBaseColor: string;
|
|
12
13
|
icons: {
|
|
@@ -157,6 +158,7 @@ declare const useGetTheme: () => {
|
|
|
157
158
|
pageHeaderAddIconSize: string;
|
|
158
159
|
defaultLoaderSize: number;
|
|
159
160
|
activeColor: string;
|
|
161
|
+
navBarIconSize: import("../..").IconSize;
|
|
160
162
|
styles: {
|
|
161
163
|
navButtonEstHeight: number;
|
|
162
164
|
};
|
|
@@ -16,6 +16,7 @@ declare const _default: {
|
|
|
16
16
|
p: string;
|
|
17
17
|
backgroundColor: string;
|
|
18
18
|
boxShadow: string;
|
|
19
|
+
zIndex: number;
|
|
19
20
|
};
|
|
20
21
|
logoParent: {
|
|
21
22
|
p: string;
|
|
@@ -127,6 +128,7 @@ declare const _default: {
|
|
|
127
128
|
textTransform: string;
|
|
128
129
|
fontSize: string;
|
|
129
130
|
letterSpacing: string;
|
|
131
|
+
lineHeight: string;
|
|
130
132
|
};
|
|
131
133
|
headerText: {
|
|
132
134
|
color: string;
|
|
@@ -156,6 +158,7 @@ declare const _default: {
|
|
|
156
158
|
py: string;
|
|
157
159
|
color: string;
|
|
158
160
|
borderRadius: string;
|
|
161
|
+
textDecoration: string;
|
|
159
162
|
mb: string;
|
|
160
163
|
'&.is-hovered': {
|
|
161
164
|
backgroundColor: string;
|
|
@@ -163,6 +166,9 @@ declare const _default: {
|
|
|
163
166
|
'> div > svg': {
|
|
164
167
|
fill: string;
|
|
165
168
|
};
|
|
169
|
+
'> svg': {
|
|
170
|
+
fill: string;
|
|
171
|
+
};
|
|
166
172
|
'&.is-pressed': {
|
|
167
173
|
backgroundColor: string;
|
|
168
174
|
};
|
|
@@ -170,6 +176,9 @@ declare const _default: {
|
|
|
170
176
|
'> div > svg': {
|
|
171
177
|
fill: string;
|
|
172
178
|
};
|
|
179
|
+
'> svg': {
|
|
180
|
+
fill: string;
|
|
181
|
+
};
|
|
173
182
|
backgroundColor: string;
|
|
174
183
|
boxShadow: string;
|
|
175
184
|
};
|
|
@@ -217,6 +226,11 @@ declare const _default: {
|
|
|
217
226
|
maxWidth: string;
|
|
218
227
|
backgroundColor: string;
|
|
219
228
|
};
|
|
229
|
+
navBarSubtitleSeparator: {
|
|
230
|
+
backgroundColor: string;
|
|
231
|
+
mx: string;
|
|
232
|
+
my: string;
|
|
233
|
+
};
|
|
220
234
|
};
|
|
221
235
|
};
|
|
222
236
|
icons: {
|
|
@@ -269,5 +283,6 @@ declare const _default: {
|
|
|
269
283
|
md: number;
|
|
270
284
|
xsm: number;
|
|
271
285
|
};
|
|
286
|
+
navBarIconSize: string;
|
|
272
287
|
};
|
|
273
288
|
export default _default;
|
|
@@ -35,7 +35,8 @@ var navBar = {
|
|
|
35
35
|
width: '230px',
|
|
36
36
|
p: '8px',
|
|
37
37
|
backgroundColor: 'white',
|
|
38
|
-
boxShadow: '0
|
|
38
|
+
boxShadow: '0 2px 11px rgba(0, 0, 0, .13)',
|
|
39
|
+
zIndex: 2
|
|
39
40
|
},
|
|
40
41
|
logoParent: {
|
|
41
42
|
p: '8px'
|
|
@@ -51,7 +52,7 @@ var navBar = {
|
|
|
51
52
|
backgroundColor: '#f6f8fa'
|
|
52
53
|
},
|
|
53
54
|
'&.is-pressed': {
|
|
54
|
-
backgroundColor: '#
|
|
55
|
+
backgroundColor: '#EDEFF1'
|
|
55
56
|
},
|
|
56
57
|
'&.is-focused': _objectSpread({}, navBarFocus),
|
|
57
58
|
':focus': {
|
|
@@ -65,7 +66,7 @@ var navBar = {
|
|
|
65
66
|
backgroundColor: '#f6f8fa'
|
|
66
67
|
},
|
|
67
68
|
'&.is-pressed': {
|
|
68
|
-
backgroundColor: '#
|
|
69
|
+
backgroundColor: '#EDEFF1'
|
|
69
70
|
},
|
|
70
71
|
'&.is-focused': _objectSpread({}, navBarFocus),
|
|
71
72
|
backgroundColor: '#f6f8fa'
|
|
@@ -99,7 +100,7 @@ var navBar = {
|
|
|
99
100
|
border: 'none'
|
|
100
101
|
},
|
|
101
102
|
'&.is-pressed': {
|
|
102
|
-
backgroundColor: '#
|
|
103
|
+
backgroundColor: '#EDEFF1',
|
|
103
104
|
color: '#455469'
|
|
104
105
|
},
|
|
105
106
|
'&.is-selected': {
|
|
@@ -116,7 +117,7 @@ var navBar = {
|
|
|
116
117
|
border: 'none'
|
|
117
118
|
},
|
|
118
119
|
'&.is-pressed': {
|
|
119
|
-
backgroundColor: '#
|
|
120
|
+
backgroundColor: '#EDEFF1',
|
|
120
121
|
color: '#455469'
|
|
121
122
|
},
|
|
122
123
|
'&.is-selected': {
|
|
@@ -130,7 +131,8 @@ var navBar = {
|
|
|
130
131
|
marginLeft: '50px !important',
|
|
131
132
|
textTransform: 'uppercase',
|
|
132
133
|
fontSize: '12px',
|
|
133
|
-
letterSpacing: '1px'
|
|
134
|
+
letterSpacing: '1px',
|
|
135
|
+
lineHeight: '140%'
|
|
134
136
|
},
|
|
135
137
|
headerText: {
|
|
136
138
|
color: '#455469',
|
|
@@ -160,6 +162,7 @@ var navBar = {
|
|
|
160
162
|
py: '.75rem',
|
|
161
163
|
color: '#455469',
|
|
162
164
|
borderRadius: '4px',
|
|
165
|
+
textDecoration: 'none',
|
|
163
166
|
mb: '2px',
|
|
164
167
|
'&.is-hovered': {
|
|
165
168
|
backgroundColor: '#f6f8fa'
|
|
@@ -167,12 +170,18 @@ var navBar = {
|
|
|
167
170
|
'> div > svg': {
|
|
168
171
|
fill: '#455469'
|
|
169
172
|
},
|
|
173
|
+
'> svg': {
|
|
174
|
+
fill: '#455469'
|
|
175
|
+
},
|
|
170
176
|
'&.is-pressed': {
|
|
171
|
-
backgroundColor: '#
|
|
177
|
+
backgroundColor: '#EDEFF1'
|
|
172
178
|
},
|
|
173
179
|
'&.is-selected': _objectSpread(_objectSpread({}, navBarSelected), {}, {
|
|
174
180
|
'> div > svg': {
|
|
175
181
|
fill: 'accent.40'
|
|
182
|
+
},
|
|
183
|
+
'> svg': {
|
|
184
|
+
fill: 'accent.40'
|
|
176
185
|
}
|
|
177
186
|
}),
|
|
178
187
|
'&.is-focused': {
|
|
@@ -216,6 +225,11 @@ var separator = {
|
|
|
216
225
|
mx: '0px',
|
|
217
226
|
maxWidth: '236px',
|
|
218
227
|
backgroundColor: '#e7eef4'
|
|
228
|
+
},
|
|
229
|
+
navBarSubtitleSeparator: {
|
|
230
|
+
backgroundColor: '#e7eef4',
|
|
231
|
+
mx: '0px',
|
|
232
|
+
my: '10px'
|
|
219
233
|
}
|
|
220
234
|
};
|
|
221
235
|
var _default = exports["default"] = {
|
|
@@ -235,5 +249,6 @@ var _default = exports["default"] = {
|
|
|
235
249
|
sm: 20,
|
|
236
250
|
md: 25,
|
|
237
251
|
'xsm': 16
|
|
238
|
-
}
|
|
252
|
+
},
|
|
253
|
+
navBarIconSize: '20px'
|
|
239
254
|
};
|
|
@@ -32,8 +32,10 @@ var defaultIconColor = 'currentColor';
|
|
|
32
32
|
var defaultIconSize = 'sm';
|
|
33
33
|
var linkSelectFieldWidth = '10em';
|
|
34
34
|
var calendarIconSize = 25;
|
|
35
|
+
var navBarIconSize = 18;
|
|
35
36
|
var astroThemeValues = exports.astroThemeValues = {
|
|
36
37
|
accordionItemDefaultLabelTag: accordionItemDefaultLabelTag,
|
|
38
|
+
navBarIconSize: navBarIconSize,
|
|
37
39
|
activeColor: activeColor,
|
|
38
40
|
backgroundBaseColor: backgroundBaseColor,
|
|
39
41
|
icons: _icons["default"],
|
|
@@ -39,8 +39,10 @@ var badgeStyles = {
|
|
|
39
39
|
};
|
|
40
40
|
var linkSelectFieldWidth = '12em';
|
|
41
41
|
var calendarIconSize = 'sm';
|
|
42
|
+
var navBarIconSize = '20px';
|
|
42
43
|
var nextGenThemeValues = exports.nextGenThemeValues = _objectSpread({
|
|
43
44
|
activeColor: activeColor,
|
|
45
|
+
navBarIconSize: navBarIconSize,
|
|
44
46
|
backgroundBaseColor: backgroundBaseColor,
|
|
45
47
|
styles: _styles["default"],
|
|
46
48
|
icons: _icons["default"],
|
|
@@ -49,11 +49,18 @@ export var NavBarNextGenComponent = function NavBarNextGenComponent() {
|
|
|
49
49
|
'data-id': 'Authentication-data-id',
|
|
50
50
|
heading: 'Authentication',
|
|
51
51
|
icon: icons.authenticationIcon,
|
|
52
|
+
title: 'Policies',
|
|
52
53
|
key: 'Authentication',
|
|
53
54
|
children: [___EmotionJSX(NavBarItemButton, {
|
|
54
55
|
key: "Authentication-Policies",
|
|
55
56
|
id: "Authentication-Policies"
|
|
56
|
-
}, "Authentication Policies"),
|
|
57
|
+
}, "Authentication Policies"), {
|
|
58
|
+
hasSeparator: false,
|
|
59
|
+
subTitle: 'Applications'
|
|
60
|
+
}, ___EmotionJSX(Separator, {
|
|
61
|
+
key: "separator",
|
|
62
|
+
variant: "separator.navBarSubtitleSeparator"
|
|
63
|
+
}), ___EmotionJSX(NavBarItemButton, {
|
|
57
64
|
key: "Password-Policies",
|
|
58
65
|
id: "Password-Policies"
|
|
59
66
|
}, "Password Policies")]
|
|
@@ -55,7 +55,7 @@ var NavBarItem = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
55
55
|
classNames = _useStatusClasses.classNames;
|
|
56
56
|
var color = isSelected ? 'white' : 'neutral.95';
|
|
57
57
|
var _useGetTheme = useGetTheme(),
|
|
58
|
-
|
|
58
|
+
navBarIconSize = _useGetTheme.navBarIconSize;
|
|
59
59
|
return ___EmotionJSX(Box, _extends({
|
|
60
60
|
id: key,
|
|
61
61
|
variant: state.navStyles.navBarItem,
|
|
@@ -77,7 +77,7 @@ var NavBarItem = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
77
77
|
title: {
|
|
78
78
|
name: text
|
|
79
79
|
},
|
|
80
|
-
size:
|
|
80
|
+
size: navBarIconSize || 18,
|
|
81
81
|
sx: {
|
|
82
82
|
mr: 'sm',
|
|
83
83
|
color: color,
|
|
@@ -26,8 +26,8 @@ var NavBarSectionItemHeader = function NavBarSectionItemHeader(_ref2) {
|
|
|
26
26
|
heading = item.heading;
|
|
27
27
|
var navBarState = useNavBarContext();
|
|
28
28
|
var _useGetTheme = useGetTheme(),
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
icons = _useGetTheme.icons,
|
|
30
|
+
navBarIconSize = _useGetTheme.navBarIconSize;
|
|
31
31
|
var MenuDown = icons.MenuDown,
|
|
32
32
|
MenuUp = icons.MenuUp;
|
|
33
33
|
var selectedKey = navBarState.selectedKey,
|
|
@@ -62,7 +62,7 @@ var NavBarSectionItemHeader = function NavBarSectionItemHeader(_ref2) {
|
|
|
62
62
|
"data-testid": heading
|
|
63
63
|
}, icon && ___EmotionJSX(Icon, {
|
|
64
64
|
icon: icon,
|
|
65
|
-
size:
|
|
65
|
+
size: navBarIconSize || 18,
|
|
66
66
|
sx: {
|
|
67
67
|
mr: 'sm',
|
|
68
68
|
color: getIconColor(),
|
|
@@ -78,6 +78,6 @@ describe('NavItemHeader', function () {
|
|
|
78
78
|
getComponent();
|
|
79
79
|
var icon = screen.getByTestId('Dashboard').querySelector('svg');
|
|
80
80
|
expect(icon).toBeInTheDocument();
|
|
81
|
-
expect(icon).toHaveAttribute('width', '
|
|
81
|
+
expect(icon).toHaveAttribute('width', '18');
|
|
82
82
|
});
|
|
83
83
|
});
|
|
@@ -1,18 +1,23 @@
|
|
|
1
|
-
import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
|
|
2
1
|
import _objectWithoutProperties from "@babel/runtime-corejs3/helpers/esm/objectWithoutProperties";
|
|
2
|
+
import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
|
|
3
3
|
var _excluded = ["children", "icon", "className", "id", "onPress", "customIcon", "iconProps", "customIconProps"];
|
|
4
4
|
import React, { forwardRef } from 'react';
|
|
5
5
|
import { mergeProps, useFocusRing } from 'react-aria';
|
|
6
6
|
import { useHover, usePress } from '@react-aria/interactions';
|
|
7
7
|
import { useNavBarContext } from '../../context/NavBarContext';
|
|
8
|
-
import { useLocalOrForwardRef, useNavBarPress, useStatusClasses } from '../../hooks';
|
|
8
|
+
import { useGetTheme, useLocalOrForwardRef, useNavBarPress, useStatusClasses } from '../../hooks';
|
|
9
9
|
import { Box, Button, Icon, Link, Text } from '../../index';
|
|
10
10
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
11
11
|
var NavSideBarItem = function NavSideBarItem(props) {
|
|
12
12
|
var children = props.children,
|
|
13
13
|
linkProps = props.linkProps;
|
|
14
|
+
console.log(props);
|
|
14
15
|
if (linkProps && linkProps !== null && linkProps !== void 0 && linkProps.href) {
|
|
15
|
-
return ___EmotionJSX(Link,
|
|
16
|
+
return ___EmotionJSX(Link, _extends({}, linkProps, {
|
|
17
|
+
sx: {
|
|
18
|
+
textDecoration: 'none !important'
|
|
19
|
+
}
|
|
20
|
+
}), ___EmotionJSX(ChildWrapper, props, children));
|
|
16
21
|
}
|
|
17
22
|
return ___EmotionJSX(Button, {
|
|
18
23
|
variant: "link",
|
|
@@ -56,6 +61,8 @@ var ChildWrapper = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
56
61
|
}),
|
|
57
62
|
pressProps = _usePress.pressProps,
|
|
58
63
|
isPressed = _usePress.isPressed;
|
|
64
|
+
var _useGetTheme = useGetTheme(),
|
|
65
|
+
navBarIconSize = _useGetTheme.navBarIconSize;
|
|
59
66
|
var mergedProps = mergeProps(pressProps, hoverProps, focusWithinProps, focusProps, others);
|
|
60
67
|
var _useStatusClasses = useStatusClasses(className, {
|
|
61
68
|
isPressed: isPressed,
|
|
@@ -64,6 +71,7 @@ var ChildWrapper = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
64
71
|
isFocused: isFocusVisible
|
|
65
72
|
}),
|
|
66
73
|
classNames = _useStatusClasses.classNames;
|
|
74
|
+
console.log(state.navStyles.navBarItem);
|
|
67
75
|
return ___EmotionJSX(Box, _extends({
|
|
68
76
|
id: key,
|
|
69
77
|
variant: state.navStyles.navBarItem,
|
|
@@ -81,13 +89,13 @@ var ChildWrapper = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
81
89
|
title: {
|
|
82
90
|
name: children
|
|
83
91
|
},
|
|
84
|
-
size:
|
|
92
|
+
size: navBarIconSize,
|
|
85
93
|
variant: isSelected ? state.navStyles.navBarItemIconSelected : state.navStyles.navBarItemIcon
|
|
86
94
|
}, iconProps)), ___EmotionJSX(Text, {
|
|
87
95
|
variant: state.navStyles.navBarItemText
|
|
88
96
|
}, children), customIcon && ___EmotionJSX(Icon, _extends({
|
|
89
97
|
icon: customIcon,
|
|
90
|
-
size:
|
|
98
|
+
size: navBarIconSize,
|
|
91
99
|
variant: isSelected ? state.navStyles.navBarItemCustomIconSelected : state.navStyles.navBarItemCustomIcon
|
|
92
100
|
}, customIconProps, {
|
|
93
101
|
title: {
|
|
@@ -21,7 +21,8 @@ var NavSideBarSectionHeader = function NavSideBarSectionHeader(props) {
|
|
|
21
21
|
onExpandedChange = props.onExpandedChange,
|
|
22
22
|
others = _objectWithoutProperties(props, _excluded);
|
|
23
23
|
var _useGetTheme = useGetTheme(),
|
|
24
|
-
icons = _useGetTheme.icons
|
|
24
|
+
icons = _useGetTheme.icons,
|
|
25
|
+
navBarIconSize = _useGetTheme.navBarIconSize;
|
|
25
26
|
var MenuUp = icons.MenuUp,
|
|
26
27
|
MenuDown = icons.MenuDown;
|
|
27
28
|
var navBarState = useNavBarContext();
|
|
@@ -62,7 +63,7 @@ var NavSideBarSectionHeader = function NavSideBarSectionHeader(props) {
|
|
|
62
63
|
isRow: true
|
|
63
64
|
}, icon && ___EmotionJSX(Icon, {
|
|
64
65
|
icon: icon,
|
|
65
|
-
size:
|
|
66
|
+
size: navBarIconSize,
|
|
66
67
|
variant: variant,
|
|
67
68
|
"aria-hidden": "true"
|
|
68
69
|
}), ___EmotionJSX(Text, {
|
|
@@ -75,7 +76,7 @@ var NavSideBarSectionHeader = function NavSideBarSectionHeader(props) {
|
|
|
75
76
|
}
|
|
76
77
|
}, ___EmotionJSX(Icon, {
|
|
77
78
|
icon: isExpanded ? MenuUp : MenuDown,
|
|
78
|
-
size:
|
|
79
|
+
size: navBarIconSize,
|
|
79
80
|
variant: variant,
|
|
80
81
|
mr: "0",
|
|
81
82
|
title: {
|
|
@@ -28,7 +28,8 @@ var navBar = {
|
|
|
28
28
|
width: '230px',
|
|
29
29
|
p: '8px',
|
|
30
30
|
backgroundColor: 'white',
|
|
31
|
-
boxShadow: '0
|
|
31
|
+
boxShadow: '0 2px 11px rgba(0, 0, 0, .13)',
|
|
32
|
+
zIndex: 2
|
|
32
33
|
},
|
|
33
34
|
logoParent: {
|
|
34
35
|
p: '8px'
|
|
@@ -44,7 +45,7 @@ var navBar = {
|
|
|
44
45
|
backgroundColor: '#f6f8fa'
|
|
45
46
|
},
|
|
46
47
|
'&.is-pressed': {
|
|
47
|
-
backgroundColor: '#
|
|
48
|
+
backgroundColor: '#EDEFF1'
|
|
48
49
|
},
|
|
49
50
|
'&.is-focused': _objectSpread({}, navBarFocus),
|
|
50
51
|
':focus': {
|
|
@@ -58,7 +59,7 @@ var navBar = {
|
|
|
58
59
|
backgroundColor: '#f6f8fa'
|
|
59
60
|
},
|
|
60
61
|
'&.is-pressed': {
|
|
61
|
-
backgroundColor: '#
|
|
62
|
+
backgroundColor: '#EDEFF1'
|
|
62
63
|
},
|
|
63
64
|
'&.is-focused': _objectSpread({}, navBarFocus),
|
|
64
65
|
backgroundColor: '#f6f8fa'
|
|
@@ -92,7 +93,7 @@ var navBar = {
|
|
|
92
93
|
border: 'none'
|
|
93
94
|
},
|
|
94
95
|
'&.is-pressed': {
|
|
95
|
-
backgroundColor: '#
|
|
96
|
+
backgroundColor: '#EDEFF1',
|
|
96
97
|
color: '#455469'
|
|
97
98
|
},
|
|
98
99
|
'&.is-selected': {
|
|
@@ -109,7 +110,7 @@ var navBar = {
|
|
|
109
110
|
border: 'none'
|
|
110
111
|
},
|
|
111
112
|
'&.is-pressed': {
|
|
112
|
-
backgroundColor: '#
|
|
113
|
+
backgroundColor: '#EDEFF1',
|
|
113
114
|
color: '#455469'
|
|
114
115
|
},
|
|
115
116
|
'&.is-selected': {
|
|
@@ -123,7 +124,8 @@ var navBar = {
|
|
|
123
124
|
marginLeft: '50px !important',
|
|
124
125
|
textTransform: 'uppercase',
|
|
125
126
|
fontSize: '12px',
|
|
126
|
-
letterSpacing: '1px'
|
|
127
|
+
letterSpacing: '1px',
|
|
128
|
+
lineHeight: '140%'
|
|
127
129
|
},
|
|
128
130
|
headerText: {
|
|
129
131
|
color: '#455469',
|
|
@@ -153,6 +155,7 @@ var navBar = {
|
|
|
153
155
|
py: '.75rem',
|
|
154
156
|
color: '#455469',
|
|
155
157
|
borderRadius: '4px',
|
|
158
|
+
textDecoration: 'none',
|
|
156
159
|
mb: '2px',
|
|
157
160
|
'&.is-hovered': {
|
|
158
161
|
backgroundColor: '#f6f8fa'
|
|
@@ -160,12 +163,18 @@ var navBar = {
|
|
|
160
163
|
'> div > svg': {
|
|
161
164
|
fill: '#455469'
|
|
162
165
|
},
|
|
166
|
+
'> svg': {
|
|
167
|
+
fill: '#455469'
|
|
168
|
+
},
|
|
163
169
|
'&.is-pressed': {
|
|
164
|
-
backgroundColor: '#
|
|
170
|
+
backgroundColor: '#EDEFF1'
|
|
165
171
|
},
|
|
166
172
|
'&.is-selected': _objectSpread(_objectSpread({}, navBarSelected), {}, {
|
|
167
173
|
'> div > svg': {
|
|
168
174
|
fill: 'accent.40'
|
|
175
|
+
},
|
|
176
|
+
'> svg': {
|
|
177
|
+
fill: 'accent.40'
|
|
169
178
|
}
|
|
170
179
|
}),
|
|
171
180
|
'&.is-focused': {
|
|
@@ -209,6 +218,11 @@ var separator = {
|
|
|
209
218
|
mx: '0px',
|
|
210
219
|
maxWidth: '236px',
|
|
211
220
|
backgroundColor: '#e7eef4'
|
|
221
|
+
},
|
|
222
|
+
navBarSubtitleSeparator: {
|
|
223
|
+
backgroundColor: '#e7eef4',
|
|
224
|
+
mx: '0px',
|
|
225
|
+
my: '10px'
|
|
212
226
|
}
|
|
213
227
|
};
|
|
214
228
|
export default {
|
|
@@ -228,5 +242,6 @@ export default {
|
|
|
228
242
|
sm: 20,
|
|
229
243
|
md: 25,
|
|
230
244
|
'xsm': 16
|
|
231
|
-
}
|
|
245
|
+
},
|
|
246
|
+
navBarIconSize: '20px'
|
|
232
247
|
};
|
|
@@ -20,8 +20,10 @@ var defaultIconColor = 'currentColor';
|
|
|
20
20
|
var defaultIconSize = 'sm';
|
|
21
21
|
var linkSelectFieldWidth = '10em';
|
|
22
22
|
var calendarIconSize = 25;
|
|
23
|
+
var navBarIconSize = 18;
|
|
23
24
|
export var astroThemeValues = {
|
|
24
25
|
accordionItemDefaultLabelTag: accordionItemDefaultLabelTag,
|
|
26
|
+
navBarIconSize: navBarIconSize,
|
|
25
27
|
activeColor: activeColor,
|
|
26
28
|
backgroundBaseColor: backgroundBaseColor,
|
|
27
29
|
icons: icons,
|
|
@@ -29,8 +29,10 @@ var badgeStyles = {
|
|
|
29
29
|
};
|
|
30
30
|
var linkSelectFieldWidth = '12em';
|
|
31
31
|
var calendarIconSize = 'sm';
|
|
32
|
+
var navBarIconSize = '20px';
|
|
32
33
|
export var nextGenThemeValues = _objectSpread({
|
|
33
34
|
activeColor: activeColor,
|
|
35
|
+
navBarIconSize: navBarIconSize,
|
|
34
36
|
backgroundBaseColor: backgroundBaseColor,
|
|
35
37
|
styles: styles,
|
|
36
38
|
icons: icons,
|