orcs-design-system 2.1.27 → 2.1.29
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/es/components/Popover/Popover.stories.js +1 -1
- package/es/components/Popover/index.js +11 -5
- package/es/components/SideNav/SideNav.stories.js +15 -0
- package/es/components/SideNav/index.js +127 -62
- package/es/systemThemeCollapsed.js +1 -1
- package/es/systemtheme.js +1 -1
- package/package.json +1 -1
|
@@ -26,7 +26,7 @@ var TooltipControl = styled.div.withConfig({
|
|
|
26
26
|
var Text = styled.div.withConfig({
|
|
27
27
|
displayName: "Popover__Text",
|
|
28
28
|
componentId: "sc-1bwoak-2"
|
|
29
|
-
})(["position:absolute;font-size:", ";line-height:", ";font-weight:", ";text-align:", ";word-break:break-word;left:100%;top:50%;color:", ";outline:0;padding:", " ", ";border-radius:", ";transform:translateX(10px) translateY(-50%);width:", ";background:", ";transition:all 300ms ease-in-out;opacity:0;z-index:-100;visibility:hidden;pointer-events:none;user-select:", ";&:before{content:\"\";z-index:2;height:0;width:0;border-style:solid;border-width:6px 6px 6px 0;border-color:transparent;border-right-color:", ";left:-6px;top:50%;margin-top:-6px;position:absolute;}&:after{content:\"\";
|
|
29
|
+
})(["position:absolute;font-size:", ";line-height:", ";font-weight:", ";text-align:", ";word-break:break-word;left:100%;top:50%;color:", ";outline:0;padding:", " ", ";border-radius:", ";transform:translateX(10px) translateY(-50%);width:", ";background:", ";border:1px solid ", ";box-shadow:", ";transition:all 300ms ease-in-out;transition-delay:300ms;opacity:0;z-index:-100;visibility:hidden;pointer-events:none;user-select:", ";&:before{content:\"\";z-index:2;height:0;width:0;border-style:solid;border-width:6px 6px 6px 0;border-color:transparent;border-right-color:", ";left:-6px;top:50%;margin-top:-6px;position:absolute;}&:after{content:\"\";z-index:1;position:absolute;border-color:transparent;border-right-color:", ";height:0;width:0;border-style:solid;border-width:6px 6px 6px 0;left:-7px;top:50%;margin-top:-6px;}", ";"], function (props) {
|
|
30
30
|
return themeGet("fontSizes.0")(props);
|
|
31
31
|
}, function (props) {
|
|
32
32
|
return themeGet("fontSizes.1")(props);
|
|
@@ -35,7 +35,7 @@ var Text = styled.div.withConfig({
|
|
|
35
35
|
}, function (props) {
|
|
36
36
|
return props.textAlign ? props.textAlign : "left";
|
|
37
37
|
}, function (props) {
|
|
38
|
-
return themeGet("colors.
|
|
38
|
+
return themeGet("colors.greyDarkest")(props);
|
|
39
39
|
}, function (props) {
|
|
40
40
|
return themeGet("space.3")(props);
|
|
41
41
|
}, function (props) {
|
|
@@ -45,14 +45,20 @@ var Text = styled.div.withConfig({
|
|
|
45
45
|
}, function (props) {
|
|
46
46
|
return props.width ? props.width : "200px";
|
|
47
47
|
}, function (props) {
|
|
48
|
-
return themeGet("colors.
|
|
48
|
+
return themeGet("colors.white")(props);
|
|
49
|
+
}, function (props) {
|
|
50
|
+
return themeGet("colors.greyLight")(props);
|
|
51
|
+
}, function (props) {
|
|
52
|
+
return themeGet("shadows.boxDefault")(props);
|
|
49
53
|
}, function (props) {
|
|
50
54
|
return props.enableSelectAll ? "all" : "auto";
|
|
51
55
|
}, function (props) {
|
|
52
|
-
return themeGet("colors.
|
|
56
|
+
return themeGet("colors.white")(props);
|
|
57
|
+
}, function (props) {
|
|
58
|
+
return themeGet("colors.grey")(props);
|
|
53
59
|
}, function (_ref) {
|
|
54
60
|
var direction = _ref.direction;
|
|
55
|
-
return direction === "top" ? css(["left:50%;top:auto;bottom:100%;transform:translateX(-50%) translateY(-10px);&:before{left:50%;top:auto;margin-top:0;bottom:-9px;margin-left:-3px;transform:rotate(-90deg);}&:after{left:
|
|
61
|
+
return direction === "top" ? css(["left:50%;top:auto;bottom:100%;transform:translateX(-50%) translateY(-10px);&:before{left:50%;top:auto;margin-top:0;bottom:-9px;margin-left:-3px;transform:rotate(-90deg);}&:after{left:50%;top:auto;margin-top:0;bottom:-10px;margin-left:-3px;transform:rotate(-90deg);}"]) : direction === "topRight" ? css(["left:100%;top:auto;bottom:100%;transform:translateX(5px) translateY(-5px);&:before{left:0;top:auto;margin-top:0;bottom:-5px;margin-left:-5px;transform:rotate(-45deg);border-width:5px 10px 5px 0;}&:after{left:0;top:auto;margin-top:0;bottom:-6px;margin-left:-6px;transform:rotate(-45deg);border-width:5px 10px 5px 0;}"]) : direction === "right" ? css([""]) : direction === "bottomRight" ? css(["left:100%;top:100%;bottom:auto;transform:translateX(5px) translateY(5px);&:before{left:0;bottom:auto;margin-top:0;top:-5px;margin-left:-5px;transform:rotate(45deg);border-width:5px 10px 5px 0;}&:after{left:0;bottom:auto;margin-top:0;top:-6px;margin-left:-6px;transform:rotate(45deg);border-width:5px 10px 5px 0;}"]) : direction === "bottom" ? css(["left:50%;top:100%;transform:translateX(-50%) translateY(10px);&:before{left:50%;top:-9px;margin-top:0;margin-left:-3px;transform:rotate(90deg);}&:after{left:50%;top:-10px;margin-top:0;margin-left:-3px;transform:rotate(90deg);}"]) : direction === "bottomLeft" ? css(["right:100%;left:auto;top:100%;bottom:auto;transform:translateX(-5px) translateY(5px);&:before{right:0;left:auto;bottom:auto;margin-top:0;top:-5px;margin-right:-5px;transform:rotate(135deg);border-width:5px 10px 5px 0;}&:after{right:0;left:auto;bottom:auto;margin-top:0;top:-6px;margin-right:-6px;transform:rotate(135deg);border-width:5px 10px 5px 0;}"]) : direction === "left" ? css(["left:auto;right:100%;transform:translateX(-10px) translateY(-50%);&:before{left:auto;right:-6px;transform:rotate(180deg);}&:after{left:auto;right:-7px;transform:rotate(180deg);top:50%;margin-top:-6px;}"]) : direction === "topLeft" ? css(["right:100%;left:auto;top:auto;bottom:100%;transform:translateX(-5px) translateY(-5px);&:before{right:0;left:auto;top:auto;margin-top:0;bottom:-5px;margin-right:-5px;transform:rotate(225deg);border-width:5px 10px 5px 0;}&:after{right:0;left:auto;top:auto;margin-top:0;bottom:-6px;margin-right:-6px;transform:rotate(225deg);border-width:5px 10px 5px 0;}"]) : css([""]);
|
|
56
62
|
});
|
|
57
63
|
/**
|
|
58
64
|
* This popover component is intended to be used to supplement buttons (or other elements) that require some helper text. It supports customisation of direction and width. This is so that you can ensure that the popover doesn't run off the screen, and that the width suits the amount of text in the popover.
|
|
@@ -42,6 +42,13 @@ var BrowseTeams = function BrowseTeams() {
|
|
|
42
42
|
}, "Browse teams"), /*#__PURE__*/React.createElement(P, null, "Browse teams content"));
|
|
43
43
|
};
|
|
44
44
|
|
|
45
|
+
var Calendar = function Calendar() {
|
|
46
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(H5, {
|
|
47
|
+
fontWeight: "bold",
|
|
48
|
+
mb: "r"
|
|
49
|
+
}, "Calendar"), /*#__PURE__*/React.createElement(P, null, "Calendar content"));
|
|
50
|
+
};
|
|
51
|
+
|
|
45
52
|
var items = [{
|
|
46
53
|
iconName: "user",
|
|
47
54
|
name: "My profile",
|
|
@@ -64,6 +71,14 @@ var items = [{
|
|
|
64
71
|
component: BrowseTeams,
|
|
65
72
|
actionType: "component" // Use 'component' for a component
|
|
66
73
|
|
|
74
|
+
}, {
|
|
75
|
+
iconName: "calendar-alt",
|
|
76
|
+
name: "Calendar",
|
|
77
|
+
pageSpecific: true,
|
|
78
|
+
// Specify pageSpecific if you want this item to appear below a divider line separating common nav items from page/route specific items
|
|
79
|
+
component: Calendar,
|
|
80
|
+
actionType: "component" // Use 'component' for a component
|
|
81
|
+
|
|
67
82
|
}, {
|
|
68
83
|
iconName: "times-circle",
|
|
69
84
|
name: "Logout",
|
|
@@ -13,8 +13,7 @@ import { themeGet } from "@styled-system/theme-get";
|
|
|
13
13
|
import PropTypes from "prop-types";
|
|
14
14
|
import Icon from "../Icon";
|
|
15
15
|
import Popover from "../Popover";
|
|
16
|
-
import
|
|
17
|
-
import { H5 } from "../Typography";
|
|
16
|
+
import Divider from "../Divider";
|
|
18
17
|
var SideNavWrapper = styled("div").withConfig({
|
|
19
18
|
displayName: "SideNav__SideNavWrapper",
|
|
20
19
|
componentId: "sc-1heo0i9-0"
|
|
@@ -67,12 +66,7 @@ var SideNavItems = styled("div").withConfig({
|
|
|
67
66
|
flexDirection: "row",
|
|
68
67
|
minHeight: "initial",
|
|
69
68
|
minWidth: "initial",
|
|
70
|
-
justifyContent: "space-around"
|
|
71
|
-
"&:hover, &:focus": {
|
|
72
|
-
"& .sideNavItemName": {
|
|
73
|
-
display: "none"
|
|
74
|
-
}
|
|
75
|
-
}
|
|
69
|
+
justifyContent: "space-around"
|
|
76
70
|
}
|
|
77
71
|
});
|
|
78
72
|
});
|
|
@@ -83,10 +77,21 @@ var PanelControlTooltip = styled(Popover).withConfig({
|
|
|
83
77
|
return css({
|
|
84
78
|
alignSelf: props.showItemNames ? "flex-end" : "center",
|
|
85
79
|
position: props.hideExpandedControl ? "absolute" : "relative",
|
|
86
|
-
right: props.hideExpandedControl ? "
|
|
87
|
-
display: props.hideExpandedControl ? "block" : "
|
|
80
|
+
right: props.hideExpandedControl ? "r" : "initial",
|
|
81
|
+
display: props.hideExpandedControl ? "block" : "none !important",
|
|
82
|
+
borderTop: props.hideExpandedControl ? "none" : "solid 1px",
|
|
83
|
+
borderTopColor: themeGet("colors.greyLighter")(props),
|
|
84
|
+
paddingTop: props.hideExpandedControl ? "0" : "r",
|
|
85
|
+
width: props.hideExpandedControl ? "auto" : "100%",
|
|
86
|
+
justifyContent: props.showItemNames ? "flex-end" : "center",
|
|
88
87
|
"&:focus": {
|
|
89
88
|
outline: "0"
|
|
89
|
+
},
|
|
90
|
+
"@media screen and (max-width: 900px)": {
|
|
91
|
+
border: "none"
|
|
92
|
+
},
|
|
93
|
+
"& .popoverText": {
|
|
94
|
+
marginTop: props.hideExpandedControl ? "0" : "s"
|
|
90
95
|
}
|
|
91
96
|
});
|
|
92
97
|
});
|
|
@@ -101,20 +106,62 @@ var PanelControl = styled("button").withConfig({
|
|
|
101
106
|
background: themeGet("colors.greyLighter")(props),
|
|
102
107
|
color: themeGet("colors.greyDarker")(props),
|
|
103
108
|
fontSize: "1.2rem",
|
|
109
|
+
display: "flex",
|
|
104
110
|
alignItems: "center",
|
|
105
111
|
justifyContent: "center",
|
|
106
112
|
cursor: "pointer",
|
|
107
113
|
border: "none"
|
|
108
114
|
});
|
|
109
115
|
});
|
|
116
|
+
var SideNavItemPopover = styled(Popover).withConfig({
|
|
117
|
+
displayName: "SideNav__SideNavItemPopover",
|
|
118
|
+
componentId: "sc-1heo0i9-4"
|
|
119
|
+
})(function (props) {
|
|
120
|
+
return css({
|
|
121
|
+
width: "100%",
|
|
122
|
+
marginBottom: props.bottomAligned ? "0" : "s",
|
|
123
|
+
marginTop: props.bottomAligned ? "s" : "0",
|
|
124
|
+
"&:hover,&:focus-within": {
|
|
125
|
+
"& .popoverText": {
|
|
126
|
+
opacity: props.showItemNames ? "0" : "1",
|
|
127
|
+
zIndex: props.showItemNames ? "-100" : "100",
|
|
128
|
+
visibility: props.showItemNames ? "hidden" : "visible",
|
|
129
|
+
pointerEvents: props.showItemNames ? "none" : "auto",
|
|
130
|
+
display: props.showItemNames ? "none" : "initial"
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
"&:focus-within": {
|
|
134
|
+
"& .popoverText": {
|
|
135
|
+
opacity: props.active ? "0" : "1",
|
|
136
|
+
zIndex: props.active ? "-100" : "100",
|
|
137
|
+
visibility: props.active ? "hidden" : "visible",
|
|
138
|
+
pointerEvents: props.active ? "none" : "auto",
|
|
139
|
+
display: props.active ? "none" : "initial"
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
"@media screen and (max-width: 900px)": {
|
|
143
|
+
width: "auto",
|
|
144
|
+
marginBottom: "0",
|
|
145
|
+
marginTop: "0",
|
|
146
|
+
"&:hover,&:focus-within": {
|
|
147
|
+
"& .popoverText": {
|
|
148
|
+
opacity: "0",
|
|
149
|
+
zIndex: "-100",
|
|
150
|
+
visibility: "hidden",
|
|
151
|
+
pointerEvents: "none",
|
|
152
|
+
display: "none"
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
});
|
|
157
|
+
});
|
|
110
158
|
var SideNavItem = styled("button").attrs(function (props) {
|
|
111
159
|
return {
|
|
112
|
-
className: props.badge ? "Sidebar__Badge" : ""
|
|
113
|
-
marginTop: props.bottomAligned ? "auto" : "0"
|
|
160
|
+
className: props.badge ? "Sidebar__Badge" : ""
|
|
114
161
|
};
|
|
115
162
|
}).withConfig({
|
|
116
163
|
displayName: "SideNav__SideNavItem",
|
|
117
|
-
componentId: "sc-1heo0i9-
|
|
164
|
+
componentId: "sc-1heo0i9-5"
|
|
118
165
|
})(function (props) {
|
|
119
166
|
return css({
|
|
120
167
|
fontFamily: themeGet("fonts.main")(props),
|
|
@@ -129,8 +176,6 @@ var SideNavItem = styled("button").attrs(function (props) {
|
|
|
129
176
|
cursor: "pointer",
|
|
130
177
|
border: "none",
|
|
131
178
|
padding: "s",
|
|
132
|
-
marginBottom: props.bottomAligned ? "0" : "s",
|
|
133
|
-
marginTop: props.bottomAligned ? "s" : "0",
|
|
134
179
|
fontSize: "1.4rem",
|
|
135
180
|
fontWeight: themeGet("fontWeights.1")(props),
|
|
136
181
|
color: themeGet("colors.greyDarker")(props),
|
|
@@ -149,9 +194,7 @@ var SideNavItem = styled("button").attrs(function (props) {
|
|
|
149
194
|
}
|
|
150
195
|
},
|
|
151
196
|
"@media screen and (max-width: 900px)": {
|
|
152
|
-
width: "auto"
|
|
153
|
-
marginBottom: "0",
|
|
154
|
-
marginTop: "0"
|
|
197
|
+
width: "auto"
|
|
155
198
|
}
|
|
156
199
|
});
|
|
157
200
|
}, function (props) {
|
|
@@ -175,19 +218,16 @@ var SideNavItem = styled("button").attrs(function (props) {
|
|
|
175
218
|
});
|
|
176
219
|
var SideNavItemLink = styled("div").attrs(function (props) {
|
|
177
220
|
return {
|
|
178
|
-
className: props.badge ? "Sidebar__Badge" : ""
|
|
179
|
-
marginTop: props.bottomAligned ? "auto" : "0"
|
|
221
|
+
className: props.badge ? "Sidebar__Badge" : ""
|
|
180
222
|
};
|
|
181
223
|
}).withConfig({
|
|
182
224
|
displayName: "SideNav__SideNavItemLink",
|
|
183
|
-
componentId: "sc-1heo0i9-
|
|
225
|
+
componentId: "sc-1heo0i9-6"
|
|
184
226
|
})(function (props) {
|
|
185
227
|
return css({
|
|
186
228
|
cursor: "pointer",
|
|
187
229
|
padding: "s",
|
|
188
230
|
textDecoration: "none",
|
|
189
|
-
marginBottom: props.bottomAligned ? "0" : "s",
|
|
190
|
-
marginTop: props.bottomAligned ? "s" : "0",
|
|
191
231
|
borderRadius: themeGet("radii.2")(props),
|
|
192
232
|
width: "100%",
|
|
193
233
|
path: {
|
|
@@ -203,9 +243,7 @@ var SideNavItemLink = styled("div").attrs(function (props) {
|
|
|
203
243
|
}
|
|
204
244
|
},
|
|
205
245
|
"@media screen and (max-width: 900px)": {
|
|
206
|
-
width: "auto"
|
|
207
|
-
marginBottom: "0",
|
|
208
|
-
marginTop: "0"
|
|
246
|
+
width: "auto"
|
|
209
247
|
},
|
|
210
248
|
"& > a": {
|
|
211
249
|
fontFamily: themeGet("fonts.main")(props),
|
|
@@ -252,7 +290,7 @@ var SideNavItemLink = styled("div").attrs(function (props) {
|
|
|
252
290
|
});
|
|
253
291
|
var BottomAlignedNavItems = styled("div").withConfig({
|
|
254
292
|
displayName: "SideNav__BottomAlignedNavItems",
|
|
255
|
-
componentId: "sc-1heo0i9-
|
|
293
|
+
componentId: "sc-1heo0i9-7"
|
|
256
294
|
})(function () {
|
|
257
295
|
return css({
|
|
258
296
|
marginTop: "auto",
|
|
@@ -268,7 +306,7 @@ var BottomAlignedNavItems = styled("div").withConfig({
|
|
|
268
306
|
});
|
|
269
307
|
var BadgeNumber = styled("div").withConfig({
|
|
270
308
|
displayName: "SideNav__BadgeNumber",
|
|
271
|
-
componentId: "sc-1heo0i9-
|
|
309
|
+
componentId: "sc-1heo0i9-8"
|
|
272
310
|
})(function (props) {
|
|
273
311
|
return css({
|
|
274
312
|
position: "absolute",
|
|
@@ -288,7 +326,7 @@ var BadgeNumber = styled("div").withConfig({
|
|
|
288
326
|
});
|
|
289
327
|
var SideNavItemName = styled("div").withConfig({
|
|
290
328
|
displayName: "SideNav__SideNavItemName",
|
|
291
|
-
componentId: "sc-1heo0i9-
|
|
329
|
+
componentId: "sc-1heo0i9-9"
|
|
292
330
|
})(function (props) {
|
|
293
331
|
return css({
|
|
294
332
|
lineHeight: "0",
|
|
@@ -304,7 +342,7 @@ var SideNavItemName = styled("div").withConfig({
|
|
|
304
342
|
});
|
|
305
343
|
var SideNavExpanded = styled("div").withConfig({
|
|
306
344
|
displayName: "SideNav__SideNavExpanded",
|
|
307
|
-
componentId: "sc-1heo0i9-
|
|
345
|
+
componentId: "sc-1heo0i9-10"
|
|
308
346
|
})(function (props) {
|
|
309
347
|
return css({
|
|
310
348
|
position: "relative",
|
|
@@ -340,7 +378,14 @@ var NavItem = function NavItem(_ref) {
|
|
|
340
378
|
"aria-label": item.name
|
|
341
379
|
});
|
|
342
380
|
|
|
343
|
-
return item.actionType === "link" ? /*#__PURE__*/React.createElement(
|
|
381
|
+
return item.actionType === "link" ? /*#__PURE__*/React.createElement(SideNavItemPopover, {
|
|
382
|
+
text: item.name,
|
|
383
|
+
textAlign: "center",
|
|
384
|
+
width: "100px",
|
|
385
|
+
active: item.index === activeItem,
|
|
386
|
+
bottomAligned: item.bottomAligned,
|
|
387
|
+
showItemNames: showItemNames
|
|
388
|
+
}, /*#__PURE__*/React.createElement(SideNavItemLink, {
|
|
344
389
|
key: item.index,
|
|
345
390
|
active: item.index === activeItem,
|
|
346
391
|
bottomAligned: item.bottomAligned
|
|
@@ -350,7 +395,14 @@ var NavItem = function NavItem(_ref) {
|
|
|
350
395
|
icon: ["far", item.iconName]
|
|
351
396
|
}), showItemNames && /*#__PURE__*/React.createElement(SideNavItemName, {
|
|
352
397
|
className: "sideNavItemName"
|
|
353
|
-
}, item.name))) : /*#__PURE__*/React.createElement(
|
|
398
|
+
}, item.name)))) : /*#__PURE__*/React.createElement(SideNavItemPopover, {
|
|
399
|
+
text: item.name,
|
|
400
|
+
textAlign: "center",
|
|
401
|
+
width: "100px",
|
|
402
|
+
active: item.index === activeItem,
|
|
403
|
+
bottomAligned: item.bottomAligned,
|
|
404
|
+
showItemNames: showItemNames
|
|
405
|
+
}, /*#__PURE__*/React.createElement(SideNavItem, _extends({
|
|
354
406
|
key: item.index,
|
|
355
407
|
active: item.index === activeItem,
|
|
356
408
|
onClick: function onClick() {
|
|
@@ -361,7 +413,7 @@ var NavItem = function NavItem(_ref) {
|
|
|
361
413
|
icon: ["far", item.iconName]
|
|
362
414
|
}), showItemNames && /*#__PURE__*/React.createElement(SideNavItemName, {
|
|
363
415
|
className: "sideNavItemName"
|
|
364
|
-
}, item.name));
|
|
416
|
+
}, item.name)));
|
|
365
417
|
};
|
|
366
418
|
|
|
367
419
|
var SideNav = function SideNav(_ref2) {
|
|
@@ -395,7 +447,10 @@ var SideNav = function SideNav(_ref2) {
|
|
|
395
447
|
});
|
|
396
448
|
});
|
|
397
449
|
var topAlignedItems = allItems.filter(function (item) {
|
|
398
|
-
return !item.bottomAligned;
|
|
450
|
+
return !item.bottomAligned && !item.pageSpecific;
|
|
451
|
+
});
|
|
452
|
+
var pageSpecificItems = allItems.filter(function (item) {
|
|
453
|
+
return !item.bottomAligned && item.pageSpecific;
|
|
399
454
|
});
|
|
400
455
|
var bottomAlignedItems = allItems.filter(function (item) {
|
|
401
456
|
return item.bottomAligned;
|
|
@@ -438,28 +493,7 @@ var SideNav = function SideNav(_ref2) {
|
|
|
438
493
|
});
|
|
439
494
|
};
|
|
440
495
|
|
|
441
|
-
return /*#__PURE__*/React.createElement(SideNavWrapper, null, /*#__PURE__*/React.createElement(SideNavItems, null,
|
|
442
|
-
width: "100%",
|
|
443
|
-
alignItems: "center",
|
|
444
|
-
mb: "s",
|
|
445
|
-
justifyContent: showItemNames === true ? "space-between" : "center"
|
|
446
|
-
}, showItemNames === true && /*#__PURE__*/React.createElement(H5, {
|
|
447
|
-
fontWeight: "bold",
|
|
448
|
-
fontSize: "1.4rem",
|
|
449
|
-
color: "greyDarker"
|
|
450
|
-
}, "Navigation"), /*#__PURE__*/React.createElement(PanelControlTooltip, {
|
|
451
|
-
width: "178px",
|
|
452
|
-
textAlign: "center",
|
|
453
|
-
showItemNames: showItemNames,
|
|
454
|
-
text: showItemNames === true ? "Hide navigation item names" : "Show navigation item names"
|
|
455
|
-
}, /*#__PURE__*/React.createElement(PanelControl, {
|
|
456
|
-
onClick: toggleItemNames,
|
|
457
|
-
"aria-label": "toggle navigation item names"
|
|
458
|
-
}, showItemNames === true ? /*#__PURE__*/React.createElement(Icon, {
|
|
459
|
-
icon: ["fas", "chevron-left"]
|
|
460
|
-
}) : /*#__PURE__*/React.createElement(Icon, {
|
|
461
|
-
icon: ["fas", "chevron-right"]
|
|
462
|
-
})))), topAlignedItems.map(function (item) {
|
|
496
|
+
return /*#__PURE__*/React.createElement(SideNavWrapper, null, /*#__PURE__*/React.createElement(SideNavItems, null, topAlignedItems.map(function (item) {
|
|
463
497
|
var Component = item.component;
|
|
464
498
|
return /*#__PURE__*/React.createElement(NavItem, {
|
|
465
499
|
key: item.index,
|
|
@@ -469,8 +503,14 @@ var SideNav = function SideNav(_ref2) {
|
|
|
469
503
|
activeItem: activeItem,
|
|
470
504
|
handleItemClick: handleItemClick
|
|
471
505
|
});
|
|
472
|
-
}),
|
|
473
|
-
|
|
506
|
+
}), pageSpecificItems.length > 0 &&
|
|
507
|
+
/*#__PURE__*/
|
|
508
|
+
// Render the special-container only if there are bottom-aligned items
|
|
509
|
+
React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Divider, {
|
|
510
|
+
light: true,
|
|
511
|
+
mt: "s",
|
|
512
|
+
mb: "r"
|
|
513
|
+
}), pageSpecificItems.map(function (item) {
|
|
474
514
|
var Component = item.component;
|
|
475
515
|
return /*#__PURE__*/React.createElement(NavItem, {
|
|
476
516
|
key: item.index,
|
|
@@ -480,7 +520,31 @@ var SideNav = function SideNav(_ref2) {
|
|
|
480
520
|
activeItem: activeItem,
|
|
481
521
|
handleItemClick: handleItemClick
|
|
482
522
|
});
|
|
483
|
-
}))
|
|
523
|
+
})), bottomAlignedItems.length > 0 && ( // Render the special-container only if there are bottom-aligned items
|
|
524
|
+
isGreaterThan900 ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(BottomAlignedNavItems, null, bottomAlignedItems.map(function (item) {
|
|
525
|
+
var Component = item.component;
|
|
526
|
+
return /*#__PURE__*/React.createElement(NavItem, {
|
|
527
|
+
key: item.index,
|
|
528
|
+
item: item,
|
|
529
|
+
Component: Component,
|
|
530
|
+
showItemNames: showItemNames,
|
|
531
|
+
activeItem: activeItem,
|
|
532
|
+
handleItemClick: handleItemClick
|
|
533
|
+
});
|
|
534
|
+
})), /*#__PURE__*/React.createElement(PanelControlTooltip, {
|
|
535
|
+
width: "180px",
|
|
536
|
+
textAlign: "center",
|
|
537
|
+
mt: "r",
|
|
538
|
+
showItemNames: showItemNames,
|
|
539
|
+
text: showItemNames === true ? "Hide navigation item names" : "Show navigation item names"
|
|
540
|
+
}, /*#__PURE__*/React.createElement(PanelControl, {
|
|
541
|
+
onClick: toggleItemNames,
|
|
542
|
+
"aria-label": "toggle navigation item names"
|
|
543
|
+
}, showItemNames === true ? /*#__PURE__*/React.createElement(Icon, {
|
|
544
|
+
icon: ["fas", "chevron-left"]
|
|
545
|
+
}) : /*#__PURE__*/React.createElement(Icon, {
|
|
546
|
+
icon: ["fas", "chevron-right"]
|
|
547
|
+
})))) : bottomAlignedItems.map(function (item) {
|
|
484
548
|
var Component = item.component;
|
|
485
549
|
return /*#__PURE__*/React.createElement(NavItem, {
|
|
486
550
|
key: item.index,
|
|
@@ -494,10 +558,9 @@ var SideNav = function SideNav(_ref2) {
|
|
|
494
558
|
active: expandedItem === activeItem,
|
|
495
559
|
large: allItems[expandedItem] && allItems[expandedItem].large
|
|
496
560
|
}, /*#__PURE__*/React.createElement(PanelControlTooltip, {
|
|
497
|
-
width: "
|
|
561
|
+
width: "80px",
|
|
498
562
|
textAlign: "center",
|
|
499
563
|
hideExpandedControl: true,
|
|
500
|
-
mr: "r",
|
|
501
564
|
direction: "left",
|
|
502
565
|
text: "Hide panel"
|
|
503
566
|
}, /*#__PURE__*/React.createElement(PanelControl, {
|
|
@@ -505,8 +568,10 @@ var SideNav = function SideNav(_ref2) {
|
|
|
505
568
|
return handleItemClick(allItems[expandedItem].index, allItems[expandedItem].actionType, allItems[expandedItem].onClick);
|
|
506
569
|
},
|
|
507
570
|
"aria-label": "toggle panel"
|
|
508
|
-
}, /*#__PURE__*/React.createElement(Icon, {
|
|
571
|
+
}, isGreaterThan900 === true ? /*#__PURE__*/React.createElement(Icon, {
|
|
509
572
|
icon: ["fas", "chevron-left"]
|
|
573
|
+
}) : /*#__PURE__*/React.createElement(Icon, {
|
|
574
|
+
icon: ["fas", "chevron-down"]
|
|
510
575
|
}))), allItems[expandedItem].component()) : null);
|
|
511
576
|
};
|
|
512
577
|
|
|
@@ -196,7 +196,7 @@ export var colors = {
|
|
|
196
196
|
danger90: rgba(danger, 0.9)
|
|
197
197
|
}; // BORDERS
|
|
198
198
|
|
|
199
|
-
export var radii = [0, "
|
|
199
|
+
export var radii = [0, "3px", "6px"];
|
|
200
200
|
export var borderWidths = [0, "1px", "2px", "3px"]; // SHADOWS
|
|
201
201
|
|
|
202
202
|
export var shadows = {
|
package/es/systemtheme.js
CHANGED
|
@@ -195,7 +195,7 @@ export var colors = {
|
|
|
195
195
|
danger90: rgba(danger, 0.9)
|
|
196
196
|
}; // BORDERS
|
|
197
197
|
|
|
198
|
-
export var radii = [0, "
|
|
198
|
+
export var radii = [0, "3px", "6px"];
|
|
199
199
|
export var borderWidths = [0, "1px", "2px", "3px"]; // SHADOWS
|
|
200
200
|
|
|
201
201
|
export var shadows = {
|