orcs-design-system 3.2.4 → 3.2.6
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/GlobalStyles.js +1 -31
- package/es/SystemThemeProvider.js +11 -5
- package/es/assets/Colour/Colour.stories.js +211 -0
- package/es/assets/Colour/index.js +3 -3
- package/es/components/ActionsMenu/ActionsMenu.stories.js +260 -233
- package/es/components/ActionsMenu/index.js +144 -229
- package/es/components/Avatar/Avatar.stories.js +212 -196
- package/es/components/Avatar/index.js +280 -307
- package/es/components/Badge/Badge.stories.js +71 -46
- package/es/components/Badge/index.js +71 -74
- package/es/components/Box/Box.stories.js +51 -35
- package/es/components/Box/index.js +33 -34
- package/es/components/Button/Button.stories.js +161 -145
- package/es/components/Button/ButtonLink.stories.js +152 -139
- package/es/components/Button/index.js +79 -99
- package/es/components/ButtonGroup/ButtonGroup.stories.js +43 -42
- package/es/components/ButtonGroup/ButtonGroupItem.stories.js +11 -13
- package/es/components/ButtonGroup/index.js +103 -99
- package/es/components/Card/Card.stories.js +94 -62
- package/es/components/Card/index.js +50 -71
- package/es/components/Checkbox/Checkbox.stories.js +37 -43
- package/es/components/Checkbox/index.js +61 -76
- package/es/components/DatePicker/DatePicker.stories.js +86 -118
- package/es/components/DatePicker/index.js +71 -187
- package/es/components/Divider/Divider.stories.js +39 -42
- package/es/components/Divider/index.js +21 -27
- package/es/components/Expandable/Expandable.stories.js +46 -36
- package/es/components/Expandable/index.js +55 -82
- package/es/components/Flex/Flex.stories.js +19 -5
- package/es/components/Flex/FlexItem.stories.js +10 -9
- package/es/components/Flex/index.js +34 -27
- package/es/components/Grid/Grid.stories.js +129 -55
- package/es/components/Grid/index.js +25 -24
- package/es/components/Header/Header.stories.js +101 -92
- package/es/components/Header/index.js +433 -436
- package/es/components/HeaderSimple/HeaderSimple.stories.js +23 -27
- package/es/components/HeaderSimple/index.js +73 -68
- package/es/components/Icon/Icon.stories.js +58 -57
- package/es/components/Icon/index.js +48 -46
- package/es/components/Loading/Loading.stories.js +32 -39
- package/es/components/Loading/index.js +44 -51
- package/es/components/Modal/Modal.stories.js +172 -153
- package/es/components/Modal/index.js +126 -134
- package/es/components/Notification/Notification.stories.js +59 -58
- package/es/components/Notification/index.js +123 -133
- package/es/components/Popover/Popover.stories.js +134 -102
- package/es/components/Popover/index.js +65 -111
- package/es/components/ProgressBar/ProgressBar.stories.js +36 -39
- package/es/components/ProgressBar/index.js +29 -34
- package/es/components/RadioButton/RadioButton.stories.js +32 -37
- package/es/components/RadioButton/index.js +170 -184
- package/es/components/Range/Range.stories.js +19 -19
- package/es/components/Range/index.js +35 -45
- package/es/components/Select/Select.stories.js +107 -128
- package/es/components/Select/index.js +324 -336
- package/es/components/SideNav/NavItem.js +112 -122
- package/es/components/SideNav/SideNav.stories.js +84 -57
- package/es/components/SideNav/index.js +161 -185
- package/es/components/Sidebar/Sidebar.stories.js +50 -33
- package/es/components/Sidebar/index.js +152 -155
- package/es/components/Spacer/Spacer.stories.js +35 -32
- package/es/components/Spacer/index.js +20 -20
- package/es/components/StatusDot/StatusDot.stories.js +103 -90
- package/es/components/StatusDot/index.js +36 -38
- package/es/components/StyledLink/StyledLink.stories.js +68 -69
- package/es/components/StyledLink/index.js +47 -48
- package/es/components/Table/Table.stories.js +118 -112
- package/es/components/Table/getExpandColumnConfig.js +67 -62
- package/es/components/Table/index.js +24 -27
- package/es/components/Table/muiStyleOverrides.js +10 -8
- package/es/components/Tabs/Tab.stories.js +55 -38
- package/es/components/Tabs/TabsContainer.stories.js +30 -22
- package/es/components/Tabs/index.js +95 -92
- package/es/components/Tag/Tag.stories.js +250 -220
- package/es/components/Tag/index.js +118 -190
- package/es/components/TextArea/TextArea.stories.js +76 -89
- package/es/components/TextArea/index.js +117 -115
- package/es/components/TextInput/TextInput.stories.js +41 -61
- package/es/components/TextInput/index.js +127 -171
- package/es/components/Toggle/Toggle.stories.js +63 -62
- package/es/components/Toggle/index.js +43 -77
- package/es/components/TreeNav/TreeNav.stories.js +7 -8
- package/es/components/TreeNav/index.js +72 -69
- package/es/components/Typography/Typography.stories.js +174 -0
- package/es/components/Typography/index.js +252 -308
- package/es/components.test.js +1 -1
- package/es/hooks/isVisible.js +6 -10
- package/es/hooks/keepInView.js +27 -32
- package/es/hooks/keypress.js +14 -14
- package/es/hooks/useInputFocus.js +5 -5
- package/es/hooks/usePrevious.js +3 -3
- package/es/systemThemeCollapsed.js +53 -53
- package/es/systemtheme.js +53 -53
- package/es/utils/selectUtil.js +1 -1
- package/es/utils/selectUtil.test.js +6 -6
- package/package.json +29 -38
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
1
|
import React from "react";
|
|
6
2
|
import styled, { css as styledCss } from "styled-components";
|
|
7
3
|
import { css } from "@styled-system/css";
|
|
@@ -9,155 +5,149 @@ import { themeGet } from "@styled-system/theme-get";
|
|
|
9
5
|
import PropTypes from "prop-types";
|
|
10
6
|
import Icon from "../Icon";
|
|
11
7
|
import Popover from "../Popover";
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
|
+
const sharedNavItemStyles = styledCss(["cursor:pointer;padding:", ";text-decoration:none;border-radius:", ";width:100%;position:relative;border:none;path{transition:", ";fill:", ";}font-family:", ";display:flex;align-items:center;justify-content:center;transition:", ";background-color:transparent;font-size:1.4rem;font-weight:", ";&:hover,&:focus{color:", ";path{fill:", ";}}@media screen and (max-width:900px){width:auto;max-height:30px;height:30px;}&:focus{outline:0;color:", ";path{fill:", ";}}"], themeGet("space.s"), themeGet("radii.2"), themeGet("transition.transitionDefault"), themeGet("colors.greyDarker"), themeGet("fonts.main"), themeGet("transition.transitionDefault"), themeGet("fontWeights.1"), themeGet("colors.primary"), themeGet("colors.primary"), themeGet("colors.primary"), themeGet("colors.primary"));
|
|
10
|
+
const variantActiveStyles = {
|
|
14
11
|
expandableItem: styledCss(["color:", ";path{fill:", ";}:after{height:100%;position:absolute;right:calc(-", " - 2px);content:\"\";border-right:3px solid ", ";z-index:5;}@media screen and (max-width:900px){:after{border-top:3px solid ", ";border-right:none;top:-", ";right:0;width:100%;}}"], themeGet("colors.primary"), themeGet("colors.primary"), themeGet("space.r"), themeGet("colors.primary"), themeGet("colors.primary"), themeGet("space.r")),
|
|
15
|
-
|
|
12
|
+
default: styledCss(["background-color:", ";path{fill:", ";}&:hover,&:focus{path{fill:", ";}}&:focus{path{fill:", ";}}"], themeGet("colors.primary"), themeGet("colors.white"), themeGet("colors.white"), themeGet("colors.white"))
|
|
16
13
|
};
|
|
17
|
-
|
|
14
|
+
const getActiveStyles = props => {
|
|
18
15
|
if (!props.active) return "";
|
|
19
16
|
if (props["aria-expanded"]) {
|
|
20
17
|
return variantActiveStyles.expandableItem;
|
|
21
18
|
}
|
|
22
|
-
return variantActiveStyles
|
|
19
|
+
return variantActiveStyles.default;
|
|
23
20
|
};
|
|
24
|
-
|
|
21
|
+
const SideNavItemLink = styled.div.withConfig({
|
|
25
22
|
displayName: "NavItem__SideNavItemLink",
|
|
26
23
|
componentId: "sc-hkm2u8-0"
|
|
27
24
|
})(["& > a{", " ", "}"], sharedNavItemStyles, getActiveStyles);
|
|
28
|
-
|
|
25
|
+
const SideNavItem = styled("button").withConfig({
|
|
29
26
|
displayName: "NavItem__SideNavItem",
|
|
30
27
|
componentId: "sc-hkm2u8-1"
|
|
31
28
|
})(["", " ", ""], sharedNavItemStyles, getActiveStyles);
|
|
32
|
-
|
|
29
|
+
const BadgeNumber = styled("div").withConfig({
|
|
33
30
|
displayName: "NavItem__BadgeNumber",
|
|
34
31
|
componentId: "sc-hkm2u8-2"
|
|
35
|
-
})(
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
});
|
|
52
|
-
var BadgeDot = styled("div").withConfig({
|
|
32
|
+
})(props => css({
|
|
33
|
+
position: "absolute",
|
|
34
|
+
height: "16px",
|
|
35
|
+
width: "16px",
|
|
36
|
+
bg: themeGet("colors.danger")(props),
|
|
37
|
+
fontSize: "1rem",
|
|
38
|
+
fontWeight: themeGet("fontWeights.2")(props),
|
|
39
|
+
color: themeGet("colors.white")(props),
|
|
40
|
+
borderRadius: "50%",
|
|
41
|
+
top: "0",
|
|
42
|
+
right: "0",
|
|
43
|
+
display: "flex",
|
|
44
|
+
alignItems: "center",
|
|
45
|
+
justifyContent: "center"
|
|
46
|
+
}));
|
|
47
|
+
const BadgeDot = styled("div").withConfig({
|
|
53
48
|
displayName: "NavItem__BadgeDot",
|
|
54
49
|
componentId: "sc-hkm2u8-3"
|
|
55
|
-
})(
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
});
|
|
66
|
-
var SideNavItemPopover = styled(Popover).withConfig({
|
|
50
|
+
})(props => css({
|
|
51
|
+
position: "absolute",
|
|
52
|
+
height: "8px",
|
|
53
|
+
width: "8px",
|
|
54
|
+
bg: themeGet("colors.primary")(props),
|
|
55
|
+
borderRadius: "50%",
|
|
56
|
+
top: "2px",
|
|
57
|
+
right: "0"
|
|
58
|
+
}));
|
|
59
|
+
const SideNavItemPopover = styled(Popover).withConfig({
|
|
67
60
|
displayName: "NavItem__SideNavItemPopover",
|
|
68
61
|
componentId: "sc-hkm2u8-4"
|
|
69
|
-
})(
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
"
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
62
|
+
})(props => css({
|
|
63
|
+
height: "30px",
|
|
64
|
+
marginBottom: props.bottomAligned ? "0" : "s",
|
|
65
|
+
marginTop: props.bottomAligned ? "s" : "0",
|
|
66
|
+
"@media screen and (min-width: 900px)": {
|
|
67
|
+
":nth-child(1 of .bottom-aligned) ": {
|
|
68
|
+
marginTop: props.bottomAligned && "auto"
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
"&:hover,&:focus-within": {
|
|
72
|
+
"& .popoverText": {
|
|
73
|
+
opacity: "1",
|
|
74
|
+
zIndex: "100",
|
|
75
|
+
visibility: "visible",
|
|
76
|
+
pointerEvents: "auto",
|
|
77
|
+
display: "initial"
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"&:focus-within": {
|
|
81
|
+
"& .popoverText": {
|
|
82
|
+
opacity: props.active ? "0" : "1",
|
|
83
|
+
zIndex: props.active ? "-100" : "100",
|
|
84
|
+
visibility: props.active ? "hidden" : "visible",
|
|
85
|
+
pointerEvents: props.active ? "none" : "auto",
|
|
86
|
+
display: props.active ? "none" : "initial"
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
"@media screen and (max-width: 900px)": {
|
|
90
|
+
width: "auto",
|
|
91
|
+
marginBottom: "0",
|
|
92
|
+
marginTop: "0",
|
|
79
93
|
"&:hover,&:focus-within": {
|
|
80
94
|
"& .popoverText": {
|
|
81
|
-
opacity: "
|
|
82
|
-
zIndex: "100",
|
|
83
|
-
visibility: "
|
|
84
|
-
pointerEvents: "
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
},
|
|
88
|
-
"&:focus-within": {
|
|
89
|
-
"& .popoverText": {
|
|
90
|
-
opacity: props.active ? "0" : "1",
|
|
91
|
-
zIndex: props.active ? "-100" : "100",
|
|
92
|
-
visibility: props.active ? "hidden" : "visible",
|
|
93
|
-
pointerEvents: props.active ? "none" : "auto",
|
|
94
|
-
display: props.active ? "none" : "initial"
|
|
95
|
-
}
|
|
96
|
-
},
|
|
97
|
-
"@media screen and (max-width: 900px)": {
|
|
98
|
-
width: "auto",
|
|
99
|
-
marginBottom: "0",
|
|
100
|
-
marginTop: "0",
|
|
101
|
-
"&:hover,&:focus-within": {
|
|
102
|
-
"& .popoverText": {
|
|
103
|
-
opacity: "0",
|
|
104
|
-
zIndex: "-100",
|
|
105
|
-
visibility: "hidden",
|
|
106
|
-
pointerEvents: "none",
|
|
107
|
-
justifyContent: "space-around",
|
|
108
|
-
display: "none"
|
|
109
|
-
}
|
|
95
|
+
opacity: "0",
|
|
96
|
+
zIndex: "-100",
|
|
97
|
+
visibility: "hidden",
|
|
98
|
+
pointerEvents: "none",
|
|
99
|
+
justifyContent: "space-around",
|
|
100
|
+
display: "none"
|
|
110
101
|
}
|
|
111
102
|
}
|
|
112
|
-
}
|
|
113
|
-
});
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
103
|
+
}
|
|
104
|
+
}));
|
|
105
|
+
const NavItem = _ref => {
|
|
106
|
+
let {
|
|
107
|
+
item,
|
|
108
|
+
Component,
|
|
109
|
+
isActive,
|
|
110
|
+
handleItemClick,
|
|
111
|
+
navItemRefs
|
|
112
|
+
} = _ref;
|
|
120
113
|
// Use the ternary operator to render the appropriate component based on actionType
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
114
|
+
const accessibilityProps = {
|
|
115
|
+
...(item.actionType === "component" && {
|
|
116
|
+
"aria-expanded": isActive ? "true" : "false"
|
|
117
|
+
}),
|
|
124
118
|
"aria-label": item.name
|
|
125
|
-
}
|
|
126
|
-
return /*#__PURE__*/
|
|
119
|
+
};
|
|
120
|
+
return /*#__PURE__*/_jsx(SideNavItemPopover, {
|
|
127
121
|
className: item.bottomAligned && "bottom-aligned",
|
|
128
122
|
text: item.name,
|
|
129
123
|
textAlign: "center",
|
|
130
124
|
width: "124px",
|
|
131
125
|
active: isActive,
|
|
132
|
-
bottomAligned: item.bottomAligned
|
|
133
|
-
}, item.actionType === "link" ? /*#__PURE__*/React.createElement(SideNavItemLink, {
|
|
134
|
-
key: item.index,
|
|
135
|
-
active: isActive,
|
|
136
126
|
bottomAligned: item.bottomAligned,
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
})
|
|
127
|
+
children: item.actionType === "link" ? /*#__PURE__*/_jsx(SideNavItemLink, {
|
|
128
|
+
active: isActive,
|
|
129
|
+
bottomAligned: item.bottomAligned,
|
|
130
|
+
onClick: () => handleItemClick(item),
|
|
131
|
+
ref: el => navItemRefs.current[item.index] = el,
|
|
132
|
+
children: /*#__PURE__*/_jsx(Component, {
|
|
133
|
+
item: item,
|
|
134
|
+
children: /*#__PURE__*/_jsx(Icon, {
|
|
135
|
+
icon: ["far", item.iconName]
|
|
136
|
+
})
|
|
137
|
+
})
|
|
138
|
+
}, item.index) : /*#__PURE__*/_jsxs(SideNavItem, {
|
|
139
|
+
active: isActive,
|
|
140
|
+
onClick: () => handleItemClick(item),
|
|
141
|
+
bottomAligned: item.bottomAligned,
|
|
142
|
+
...accessibilityProps,
|
|
143
|
+
ref: el => navItemRefs.current[item.index] = el,
|
|
144
|
+
children: [item.badgeNumber && /*#__PURE__*/_jsx(BadgeNumber, {
|
|
145
|
+
children: item.badgeNumber
|
|
146
|
+
}), item.badgeDot && /*#__PURE__*/_jsx(BadgeDot, {}), /*#__PURE__*/_jsx(Icon, {
|
|
147
|
+
icon: ["far", item.iconName]
|
|
148
|
+
})]
|
|
149
|
+
}, item.index)
|
|
150
|
+
});
|
|
161
151
|
};
|
|
162
152
|
NavItem.propTypes = {
|
|
163
153
|
item: PropTypes.object,
|
|
@@ -9,47 +9,58 @@ import { library } from "@fortawesome/fontawesome-svg-core";
|
|
|
9
9
|
import Flex from "../Flex";
|
|
10
10
|
import Spacer from "../Spacer/index";
|
|
11
11
|
import Card from "../Card/index";
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
12
13
|
library.add(far);
|
|
13
14
|
export default {
|
|
14
15
|
title: "Components/SideNav",
|
|
15
|
-
decorators: [
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}],
|
|
16
|
+
decorators: [storyFn => /*#__PURE__*/_jsx(Box, {
|
|
17
|
+
minHeight: "450px",
|
|
18
|
+
children: storyFn()
|
|
19
|
+
})],
|
|
20
20
|
component: SideNav
|
|
21
21
|
};
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
22
|
+
const makeLinkComponent = path => _ref => {
|
|
23
|
+
let {
|
|
24
|
+
children,
|
|
25
|
+
item
|
|
26
|
+
} = _ref;
|
|
27
|
+
return /*#__PURE__*/_jsx(Link, {
|
|
28
|
+
to: path,
|
|
29
|
+
"aria-label": item.name,
|
|
30
|
+
children: children
|
|
31
|
+
});
|
|
31
32
|
};
|
|
32
|
-
|
|
33
|
-
return
|
|
34
|
-
|
|
33
|
+
const makePanelComponent = (name, children) => () => {
|
|
34
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
35
|
+
children: [/*#__PURE__*/_jsx(H5, {
|
|
35
36
|
fontWeight: "bold",
|
|
36
|
-
mb: "r"
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
mb: "r",
|
|
38
|
+
children: name
|
|
39
|
+
}), /*#__PURE__*/_jsxs(P, {
|
|
40
|
+
children: [name, " content"]
|
|
41
|
+
}), children]
|
|
42
|
+
});
|
|
39
43
|
};
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
return /*#__PURE__*/
|
|
44
|
+
const Teams = () => {
|
|
45
|
+
const params = useParams();
|
|
46
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
47
|
+
children: ["Team ", params.teamId, " route"]
|
|
48
|
+
});
|
|
43
49
|
};
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
50
|
+
const PageCard = _ref2 => {
|
|
51
|
+
let {
|
|
52
|
+
children
|
|
53
|
+
} = _ref2;
|
|
54
|
+
return /*#__PURE__*/_jsx(Spacer, {
|
|
55
|
+
px: "r",
|
|
56
|
+
children: /*#__PURE__*/_jsx(Card, {
|
|
57
|
+
children: children
|
|
58
|
+
})
|
|
59
|
+
});
|
|
49
60
|
};
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
61
|
+
const SideBarWithConfig = () => {
|
|
62
|
+
const location = useLocation();
|
|
63
|
+
const items = [{
|
|
53
64
|
iconName: "building",
|
|
54
65
|
name: "Home",
|
|
55
66
|
component: makeLinkComponent("/"),
|
|
@@ -114,14 +125,13 @@ var SideBarWithConfig = function SideBarWithConfig() {
|
|
|
114
125
|
name: "Browse teams",
|
|
115
126
|
large: true,
|
|
116
127
|
// Specify large if you want the expanded sidebar to be wider
|
|
117
|
-
component: makePanelComponent("BrowseTeams", /*#__PURE__*/
|
|
118
|
-
flexDirection: "column"
|
|
119
|
-
|
|
120
|
-
return /*#__PURE__*/React.createElement(Link, {
|
|
128
|
+
component: makePanelComponent("BrowseTeams", /*#__PURE__*/_jsx(Flex, {
|
|
129
|
+
flexDirection: "column",
|
|
130
|
+
children: ["Team 1", "Team 2", "Team 3"].map(team => /*#__PURE__*/_jsx(Link, {
|
|
121
131
|
to: "/teams/".concat(team),
|
|
122
|
-
|
|
123
|
-
}, team)
|
|
124
|
-
}))
|
|
132
|
+
children: team
|
|
133
|
+
}, team))
|
|
134
|
+
})),
|
|
125
135
|
actionType: "component" // Use 'component' for a component
|
|
126
136
|
}, {
|
|
127
137
|
iconName: "cog",
|
|
@@ -152,31 +162,48 @@ var SideBarWithConfig = function SideBarWithConfig() {
|
|
|
152
162
|
name: "Logout",
|
|
153
163
|
bottomAligned: true,
|
|
154
164
|
// Specify bottomAligned if this item should appear at bottom of SideNav
|
|
155
|
-
onClick:
|
|
156
|
-
return alert("Logout function");
|
|
157
|
-
},
|
|
165
|
+
onClick: () => alert("Logout function"),
|
|
158
166
|
// Specify the onClick function for the button
|
|
159
167
|
actionType: "button" // Use 'button' for a button with onClick event
|
|
160
168
|
}
|
|
161
169
|
// Add more items as needed...
|
|
162
170
|
];
|
|
163
|
-
return /*#__PURE__*/
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
171
|
+
return /*#__PURE__*/_jsxs(Flex, {
|
|
172
|
+
children: [/*#__PURE__*/_jsx(SideNav, {
|
|
173
|
+
items: items,
|
|
174
|
+
sideNavHeight: "500px"
|
|
175
|
+
}), /*#__PURE__*/_jsxs(Switch, {
|
|
176
|
+
children: [/*#__PURE__*/_jsx(Route, {
|
|
177
|
+
exact: true,
|
|
178
|
+
path: "/",
|
|
179
|
+
children: /*#__PURE__*/_jsx(PageCard, {
|
|
180
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
181
|
+
children: "Home"
|
|
182
|
+
})
|
|
183
|
+
})
|
|
184
|
+
}), /*#__PURE__*/_jsx(Route, {
|
|
185
|
+
path: "/profile",
|
|
186
|
+
children: /*#__PURE__*/_jsx(PageCard, {
|
|
187
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
188
|
+
children: "Profile route"
|
|
189
|
+
})
|
|
190
|
+
})
|
|
191
|
+
}), /*#__PURE__*/_jsx(Route, {
|
|
192
|
+
path: "/teams/:teamId",
|
|
193
|
+
children: /*#__PURE__*/_jsx(PageCard, {
|
|
194
|
+
children: /*#__PURE__*/_jsx(Teams, {})
|
|
195
|
+
})
|
|
196
|
+
}), /*#__PURE__*/_jsx(Redirect, {
|
|
197
|
+
from: "/iframe.html",
|
|
198
|
+
to: "/"
|
|
199
|
+
})]
|
|
200
|
+
})]
|
|
201
|
+
});
|
|
177
202
|
};
|
|
178
|
-
export
|
|
179
|
-
return /*#__PURE__*/
|
|
203
|
+
export const SidebarNavigation = () => {
|
|
204
|
+
return /*#__PURE__*/_jsx(Router, {
|
|
205
|
+
children: /*#__PURE__*/_jsx(SideBarWithConfig, {})
|
|
206
|
+
});
|
|
180
207
|
};
|
|
181
208
|
SidebarNavigation.storyName = "Sidebar Navigation";
|
|
182
209
|
SidebarNavigation.__docgenInfo = {
|