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.
Files changed (96) hide show
  1. package/es/GlobalStyles.js +1 -31
  2. package/es/SystemThemeProvider.js +11 -5
  3. package/es/assets/Colour/Colour.stories.js +211 -0
  4. package/es/assets/Colour/index.js +3 -3
  5. package/es/components/ActionsMenu/ActionsMenu.stories.js +260 -233
  6. package/es/components/ActionsMenu/index.js +144 -229
  7. package/es/components/Avatar/Avatar.stories.js +212 -196
  8. package/es/components/Avatar/index.js +280 -307
  9. package/es/components/Badge/Badge.stories.js +71 -46
  10. package/es/components/Badge/index.js +71 -74
  11. package/es/components/Box/Box.stories.js +51 -35
  12. package/es/components/Box/index.js +33 -34
  13. package/es/components/Button/Button.stories.js +161 -145
  14. package/es/components/Button/ButtonLink.stories.js +152 -139
  15. package/es/components/Button/index.js +79 -99
  16. package/es/components/ButtonGroup/ButtonGroup.stories.js +43 -42
  17. package/es/components/ButtonGroup/ButtonGroupItem.stories.js +11 -13
  18. package/es/components/ButtonGroup/index.js +103 -99
  19. package/es/components/Card/Card.stories.js +94 -62
  20. package/es/components/Card/index.js +50 -71
  21. package/es/components/Checkbox/Checkbox.stories.js +37 -43
  22. package/es/components/Checkbox/index.js +61 -76
  23. package/es/components/DatePicker/DatePicker.stories.js +86 -118
  24. package/es/components/DatePicker/index.js +71 -187
  25. package/es/components/Divider/Divider.stories.js +39 -42
  26. package/es/components/Divider/index.js +21 -27
  27. package/es/components/Expandable/Expandable.stories.js +46 -36
  28. package/es/components/Expandable/index.js +55 -82
  29. package/es/components/Flex/Flex.stories.js +19 -5
  30. package/es/components/Flex/FlexItem.stories.js +10 -9
  31. package/es/components/Flex/index.js +34 -27
  32. package/es/components/Grid/Grid.stories.js +129 -55
  33. package/es/components/Grid/index.js +25 -24
  34. package/es/components/Header/Header.stories.js +101 -92
  35. package/es/components/Header/index.js +433 -436
  36. package/es/components/HeaderSimple/HeaderSimple.stories.js +23 -27
  37. package/es/components/HeaderSimple/index.js +73 -68
  38. package/es/components/Icon/Icon.stories.js +58 -57
  39. package/es/components/Icon/index.js +48 -46
  40. package/es/components/Loading/Loading.stories.js +32 -39
  41. package/es/components/Loading/index.js +44 -51
  42. package/es/components/Modal/Modal.stories.js +172 -153
  43. package/es/components/Modal/index.js +126 -134
  44. package/es/components/Notification/Notification.stories.js +59 -58
  45. package/es/components/Notification/index.js +123 -133
  46. package/es/components/Popover/Popover.stories.js +134 -102
  47. package/es/components/Popover/index.js +65 -111
  48. package/es/components/ProgressBar/ProgressBar.stories.js +36 -39
  49. package/es/components/ProgressBar/index.js +29 -34
  50. package/es/components/RadioButton/RadioButton.stories.js +32 -37
  51. package/es/components/RadioButton/index.js +170 -184
  52. package/es/components/Range/Range.stories.js +19 -19
  53. package/es/components/Range/index.js +35 -45
  54. package/es/components/Select/Select.stories.js +107 -128
  55. package/es/components/Select/index.js +324 -336
  56. package/es/components/SideNav/NavItem.js +112 -122
  57. package/es/components/SideNav/SideNav.stories.js +84 -57
  58. package/es/components/SideNav/index.js +161 -185
  59. package/es/components/Sidebar/Sidebar.stories.js +50 -33
  60. package/es/components/Sidebar/index.js +152 -155
  61. package/es/components/Spacer/Spacer.stories.js +35 -32
  62. package/es/components/Spacer/index.js +20 -20
  63. package/es/components/StatusDot/StatusDot.stories.js +103 -90
  64. package/es/components/StatusDot/index.js +36 -38
  65. package/es/components/StyledLink/StyledLink.stories.js +68 -69
  66. package/es/components/StyledLink/index.js +47 -48
  67. package/es/components/Table/Table.stories.js +118 -112
  68. package/es/components/Table/getExpandColumnConfig.js +67 -62
  69. package/es/components/Table/index.js +24 -27
  70. package/es/components/Table/muiStyleOverrides.js +10 -8
  71. package/es/components/Tabs/Tab.stories.js +55 -38
  72. package/es/components/Tabs/TabsContainer.stories.js +30 -22
  73. package/es/components/Tabs/index.js +95 -92
  74. package/es/components/Tag/Tag.stories.js +250 -220
  75. package/es/components/Tag/index.js +118 -190
  76. package/es/components/TextArea/TextArea.stories.js +76 -89
  77. package/es/components/TextArea/index.js +117 -115
  78. package/es/components/TextInput/TextInput.stories.js +41 -61
  79. package/es/components/TextInput/index.js +127 -171
  80. package/es/components/Toggle/Toggle.stories.js +63 -62
  81. package/es/components/Toggle/index.js +43 -77
  82. package/es/components/TreeNav/TreeNav.stories.js +7 -8
  83. package/es/components/TreeNav/index.js +72 -69
  84. package/es/components/Typography/Typography.stories.js +174 -0
  85. package/es/components/Typography/index.js +252 -308
  86. package/es/components.test.js +1 -1
  87. package/es/hooks/isVisible.js +6 -10
  88. package/es/hooks/keepInView.js +27 -32
  89. package/es/hooks/keypress.js +14 -14
  90. package/es/hooks/useInputFocus.js +5 -5
  91. package/es/hooks/usePrevious.js +3 -3
  92. package/es/systemThemeCollapsed.js +53 -53
  93. package/es/systemtheme.js +53 -53
  94. package/es/utils/selectUtil.js +1 -1
  95. package/es/utils/selectUtil.test.js +6 -6
  96. 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
- var 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"));
13
- var variantActiveStyles = {
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
- "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"))
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
- var getActiveStyles = function getActiveStyles(props) {
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["default"];
19
+ return variantActiveStyles.default;
23
20
  };
24
- var SideNavItemLink = styled.div.withConfig({
21
+ const SideNavItemLink = styled.div.withConfig({
25
22
  displayName: "NavItem__SideNavItemLink",
26
23
  componentId: "sc-hkm2u8-0"
27
24
  })(["& > a{", " ", "}"], sharedNavItemStyles, getActiveStyles);
28
- var SideNavItem = styled("button").withConfig({
25
+ const SideNavItem = styled("button").withConfig({
29
26
  displayName: "NavItem__SideNavItem",
30
27
  componentId: "sc-hkm2u8-1"
31
28
  })(["", " ", ""], sharedNavItemStyles, getActiveStyles);
32
- var BadgeNumber = styled("div").withConfig({
29
+ const BadgeNumber = styled("div").withConfig({
33
30
  displayName: "NavItem__BadgeNumber",
34
31
  componentId: "sc-hkm2u8-2"
35
- })(function (props) {
36
- return css({
37
- position: "absolute",
38
- height: "16px",
39
- width: "16px",
40
- bg: themeGet("colors.danger")(props),
41
- fontSize: "1rem",
42
- fontWeight: themeGet("fontWeights.2")(props),
43
- color: themeGet("colors.white")(props),
44
- borderRadius: "50%",
45
- top: "0",
46
- right: "0",
47
- display: "flex",
48
- alignItems: "center",
49
- justifyContent: "center"
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
- })(function (props) {
56
- return css({
57
- position: "absolute",
58
- height: "8px",
59
- width: "8px",
60
- bg: themeGet("colors.primary")(props),
61
- borderRadius: "50%",
62
- top: "2px",
63
- right: "0"
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
- })(function (props) {
70
- return css({
71
- height: "30px",
72
- marginBottom: props.bottomAligned ? "0" : "s",
73
- marginTop: props.bottomAligned ? "s" : "0",
74
- "@media screen and (min-width: 900px)": {
75
- ":nth-child(1 of .bottom-aligned) ": {
76
- marginTop: props.bottomAligned && "auto"
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: "1",
82
- zIndex: "100",
83
- visibility: "visible",
84
- pointerEvents: "auto",
85
- display: "initial"
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
- var NavItem = function NavItem(_ref) {
115
- var item = _ref.item,
116
- Component = _ref.Component,
117
- isActive = _ref.isActive,
118
- handleItemClick = _ref.handleItemClick,
119
- navItemRefs = _ref.navItemRefs;
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
- var accessibilityProps = _objectSpread(_objectSpread({}, item.actionType === "component" && {
122
- "aria-expanded": isActive ? "true" : "false"
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__*/React.createElement(SideNavItemPopover, {
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
- onClick: function onClick() {
138
- return handleItemClick(item);
139
- },
140
- ref: function ref(el) {
141
- return navItemRefs.current[item.index] = el;
142
- }
143
- }, /*#__PURE__*/React.createElement(Component, {
144
- item: item
145
- }, /*#__PURE__*/React.createElement(Icon, {
146
- icon: ["far", item.iconName]
147
- }))) : /*#__PURE__*/React.createElement(SideNavItem, _extends({
148
- key: item.index,
149
- active: isActive,
150
- onClick: function onClick() {
151
- return handleItemClick(item);
152
- },
153
- bottomAligned: item.bottomAligned
154
- }, accessibilityProps, {
155
- ref: function ref(el) {
156
- return navItemRefs.current[item.index] = el;
157
- }
158
- }), item.badgeNumber && /*#__PURE__*/React.createElement(BadgeNumber, null, item.badgeNumber), item.badgeDot && /*#__PURE__*/React.createElement(BadgeDot, null), /*#__PURE__*/React.createElement(Icon, {
159
- icon: ["far", item.iconName]
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: [function (storyFn) {
16
- return /*#__PURE__*/React.createElement(Box, {
17
- minHeight: "450px"
18
- }, storyFn());
19
- }],
16
+ decorators: [storyFn => /*#__PURE__*/_jsx(Box, {
17
+ minHeight: "450px",
18
+ children: storyFn()
19
+ })],
20
20
  component: SideNav
21
21
  };
22
- var makeLinkComponent = function makeLinkComponent(path) {
23
- return function (_ref) {
24
- var children = _ref.children,
25
- item = _ref.item;
26
- return /*#__PURE__*/React.createElement(Link, {
27
- to: path,
28
- "aria-label": item.name
29
- }, children);
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
- var makePanelComponent = function makePanelComponent(name, children) {
33
- return function () {
34
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(H5, {
33
+ const makePanelComponent = (name, children) => () => {
34
+ return /*#__PURE__*/_jsxs(_Fragment, {
35
+ children: [/*#__PURE__*/_jsx(H5, {
35
36
  fontWeight: "bold",
36
- mb: "r"
37
- }, name), /*#__PURE__*/React.createElement(P, null, name, " content"), children);
38
- };
37
+ mb: "r",
38
+ children: name
39
+ }), /*#__PURE__*/_jsxs(P, {
40
+ children: [name, " content"]
41
+ }), children]
42
+ });
39
43
  };
40
- var Teams = function Teams() {
41
- var params = useParams();
42
- return /*#__PURE__*/React.createElement("div", null, "Team ", params.teamId, " route");
44
+ const Teams = () => {
45
+ const params = useParams();
46
+ return /*#__PURE__*/_jsxs("div", {
47
+ children: ["Team ", params.teamId, " route"]
48
+ });
43
49
  };
44
- var PageCard = function PageCard(_ref2) {
45
- var children = _ref2.children;
46
- return /*#__PURE__*/React.createElement(Spacer, {
47
- px: "r"
48
- }, /*#__PURE__*/React.createElement(Card, null, children));
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
- var SideBarWithConfig = function SideBarWithConfig() {
51
- var location = useLocation();
52
- var items = [{
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__*/React.createElement(Flex, {
118
- flexDirection: "column"
119
- }, ["Team 1", "Team 2", "Team 3"].map(function (team) {
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
- key: team
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: function 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__*/React.createElement(Flex, null, /*#__PURE__*/React.createElement(SideNav, {
164
- items: items,
165
- sideNavHeight: "500px"
166
- }), /*#__PURE__*/React.createElement(Switch, null, /*#__PURE__*/React.createElement(Route, {
167
- exact: true,
168
- path: "/"
169
- }, /*#__PURE__*/React.createElement(PageCard, null, /*#__PURE__*/React.createElement("div", null, "Home"))), /*#__PURE__*/React.createElement(Route, {
170
- path: "/profile"
171
- }, /*#__PURE__*/React.createElement(PageCard, null, /*#__PURE__*/React.createElement("div", null, "Profile route"))), /*#__PURE__*/React.createElement(Route, {
172
- path: "/teams/:teamId"
173
- }, /*#__PURE__*/React.createElement(PageCard, null, /*#__PURE__*/React.createElement(Teams, null))), /*#__PURE__*/React.createElement(Redirect, {
174
- from: "/iframe.html",
175
- to: "/"
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 var SidebarNavigation = function SidebarNavigation() {
179
- return /*#__PURE__*/React.createElement(Router, null, /*#__PURE__*/React.createElement(SideBarWithConfig, null));
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 = {