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,126 +1,115 @@
1
- import _extends from "@babel/runtime/helpers/extends";
2
- import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
- var _excluded = ["SidebarStyles", "children"],
4
- _excluded2 = ["children", "theme"];
5
1
  import React from "react";
6
2
  import styled, { ThemeProvider } from "styled-components";
7
3
  import { compose, space, layout } from "styled-system";
8
4
  import { css } from "@styled-system/css";
9
5
  import { themeGet } from "@styled-system/theme-get";
10
6
  import PropTypes from "prop-types";
11
- var SidebarStyles = compose(space, layout);
12
- var SidebarWrapper = styled("div").withConfig({
7
+ import { jsx as _jsx } from "react/jsx-runtime";
8
+ const SidebarStyles = compose(space, layout);
9
+ const SidebarWrapper = styled("div").withConfig({
13
10
  displayName: "Sidebar__SidebarWrapper",
14
11
  componentId: "sc-wr9mfw-0"
15
- })(function (props) {
16
- return css({
17
- bg: themeGet("colors.greyDarkest")(props),
18
- color: themeGet("colors.white")(props),
19
- minHeight: "calc(100vh - " + themeGet("appScale.navBarSize")(props) + ")",
20
- height: "100%",
21
- maxWidth: "max-content",
22
- fontFamily: themeGet("fonts.main")(props),
23
- display: "flex",
24
- alignItems: "stretch",
25
- alignContent: "stretch",
26
- "@media screen and (max-width: 900px)": {
27
- width: "100%",
28
- height: "auto",
29
- minWidth: "auto",
30
- maxWidth: "initial",
31
- minHeight: "initial",
32
- maxHeight: themeGet("appScale.sidebarMobileHeight")(props),
33
- position: "fixed",
34
- bottom: "0",
35
- left: "0",
36
- zIndex: "6",
37
- flexDirection: "column-reverse"
38
- }
39
- });
40
- }, SidebarStyles);
41
- export var SidebarTabs = styled("div").withConfig({
12
+ })(props => css({
13
+ bg: themeGet("colors.greyDarkest")(props),
14
+ color: themeGet("colors.white")(props),
15
+ minHeight: "calc(100vh - " + themeGet("appScale.navBarSize")(props) + ")",
16
+ height: "100%",
17
+ maxWidth: "max-content",
18
+ fontFamily: themeGet("fonts.main")(props),
19
+ display: "flex",
20
+ alignItems: "stretch",
21
+ alignContent: "stretch",
22
+ "@media screen and (max-width: 900px)": {
23
+ width: "100%",
24
+ height: "auto",
25
+ minWidth: "auto",
26
+ maxWidth: "initial",
27
+ minHeight: "initial",
28
+ maxHeight: themeGet("appScale.sidebarMobileHeight")(props),
29
+ position: "fixed",
30
+ bottom: "0",
31
+ left: "0",
32
+ zIndex: "6",
33
+ flexDirection: "column-reverse"
34
+ }
35
+ }), SidebarStyles);
36
+ export const SidebarTabs = styled("div").withConfig({
42
37
  displayName: "Sidebar__SidebarTabs",
43
38
  componentId: "sc-wr9mfw-1"
44
- })(function (props) {
45
- return css({
46
- minWidth: themeGet("appScale.navBarSize")(props),
47
- minHeight: "calc(100vh - " + themeGet("appScale.navBarSize")(props) + ")",
48
- height: "100%",
49
- display: "flex",
50
- flexDirection: "column",
51
- alignItems: "center",
52
- justifyContent: "flex-start",
53
- textAlign: "center",
54
- "@media screen and (max-width: 900px)": {
55
- height: themeGet("appScale.navBarSize")(props),
56
- flexDirection: "row",
57
- minHeight: "initial",
58
- minWidth: "initial"
59
- }
60
- });
61
- }, SidebarStyles);
39
+ })(props => css({
40
+ minWidth: themeGet("appScale.navBarSize")(props),
41
+ minHeight: "calc(100vh - " + themeGet("appScale.navBarSize")(props) + ")",
42
+ height: "100%",
43
+ display: "flex",
44
+ flexDirection: "column",
45
+ alignItems: "center",
46
+ justifyContent: "flex-start",
47
+ textAlign: "center",
48
+ "@media screen and (max-width: 900px)": {
49
+ height: themeGet("appScale.navBarSize")(props),
50
+ flexDirection: "row",
51
+ minHeight: "initial",
52
+ minWidth: "initial"
53
+ }
54
+ }), SidebarStyles);
62
55
  SidebarTabs.propTypes = {
63
56
  /** SidebarTabs children, ie `SidebarTab` components, are rendered as node elements */
64
57
  children: PropTypes.node,
65
58
  /** Set the styles for this subcomponent if needed, using the `space` and `layout` styled-system categories */
66
59
  SidebarStyles: PropTypes.object
67
60
  };
68
- export var SidebarTab = styled("button").attrs(function (props) {
69
- return {
70
- className: props.badge ? "Sidebar__Badge" : "",
71
- marginTop: props.bottomAligned ? "auto" : "0",
72
- "aria-label": props.ariaLabel,
73
- "aria-expanded": props.active ? "true" : "false"
74
- };
75
- }).withConfig({
61
+ export const SidebarTab = styled("button").attrs(props => ({
62
+ className: props.badge ? "Sidebar__Badge" : "",
63
+ marginTop: props.bottomAligned ? "auto" : "0",
64
+ "aria-label": props.ariaLabel,
65
+ "aria-expanded": props.active ? "true" : "false"
66
+ })).withConfig({
76
67
  displayName: "Sidebar__SidebarTab",
77
68
  componentId: "sc-wr9mfw-2"
78
- })(function (props) {
79
- return css({
80
- minWidth: themeGet("appScale.navBarSize")(props),
81
- minHeight: themeGet("appScale.navBarSize")(props),
82
- position: "relative",
83
- display: "flex",
84
- alignItems: "center",
85
- justifyContent: "center",
86
- width: "100%",
69
+ })(props => css({
70
+ minWidth: themeGet("appScale.navBarSize")(props),
71
+ minHeight: themeGet("appScale.navBarSize")(props),
72
+ position: "relative",
73
+ display: "flex",
74
+ alignItems: "center",
75
+ justifyContent: "center",
76
+ width: "100%",
77
+ transition: themeGet("transition.transitionDefault")(props),
78
+ color: themeGet("colors.greyLightest")(props),
79
+ bg: props.active ? themeGet("colors.greyDarker")(props) : "transparent",
80
+ cursor: props.active ? "default" : "pointer",
81
+ border: "none",
82
+ padding: 0,
83
+ fontSize: "1em",
84
+ path: {
87
85
  transition: themeGet("transition.transitionDefault")(props),
88
- color: themeGet("colors.greyLightest")(props),
89
- bg: props.active ? themeGet("colors.greyDarker")(props) : "transparent",
90
- cursor: props.active ? "default" : "pointer",
91
- border: "none",
92
- padding: 0,
93
- fontSize: "1em",
86
+ fill: themeGet("colors.greyLightest")(props)
87
+ },
88
+ "&:hover": {
89
+ color: props.active ? themeGet("colors.greyLightest")(props) : themeGet("colors.primary")(props),
94
90
  path: {
95
- transition: themeGet("transition.transitionDefault")(props),
96
- fill: themeGet("colors.greyLightest")(props)
97
- },
98
- "&:hover": {
99
- color: props.active ? themeGet("colors.greyLightest")(props) : themeGet("colors.primary")(props),
100
- path: {
101
- fill: props.active ? themeGet("colors.greyLightest")(props) : themeGet("colors.primary")(props)
102
- }
103
- },
104
- "&.Sidebar__Badge": {
105
- "&::before": {
106
- content: "\"".concat(props.badge, "\""),
107
- position: "absolute",
108
- top: "8px",
109
- right: "calc(50% - 19px)",
110
- display: "flex",
111
- alignItems: "center",
112
- justifyContent: "center",
113
- width: "16px",
114
- height: "16px",
115
- borderRadius: "50%",
116
- fontSize: themeGet("fontSizes.0")(props),
117
- fontWeight: themeGet("fontWeights.2")(props),
118
- color: themeGet("colors.white")(props),
119
- bg: themeGet("colors.danger")(props)
120
- }
91
+ fill: props.active ? themeGet("colors.greyLightest")(props) : themeGet("colors.primary")(props)
121
92
  }
122
- });
123
- }, SidebarStyles);
93
+ },
94
+ "&.Sidebar__Badge": {
95
+ "&::before": {
96
+ content: "\"".concat(props.badge, "\""),
97
+ position: "absolute",
98
+ top: "8px",
99
+ right: "calc(50% - 19px)",
100
+ display: "flex",
101
+ alignItems: "center",
102
+ justifyContent: "center",
103
+ width: "16px",
104
+ height: "16px",
105
+ borderRadius: "50%",
106
+ fontSize: themeGet("fontSizes.0")(props),
107
+ fontWeight: themeGet("fontWeights.2")(props),
108
+ color: themeGet("colors.white")(props),
109
+ bg: themeGet("colors.danger")(props)
110
+ }
111
+ }
112
+ }), SidebarStyles);
124
113
  SidebarTab.propTypes = {
125
114
  /** SidebarTab children are rendered as node elements */
126
115
  children: PropTypes.node,
@@ -133,7 +122,7 @@ SidebarTab.propTypes = {
133
122
  /** Set the ariaLabel */
134
123
  ariaLabel: PropTypes.string
135
124
  };
136
- export var SidebarPanels = styled("div").withConfig({
125
+ export const SidebarPanels = styled("div").withConfig({
137
126
  displayName: "Sidebar__SidebarPanels",
138
127
  componentId: "sc-wr9mfw-3"
139
128
  })(css({
@@ -145,30 +134,34 @@ SidebarPanels.propTypes = {
145
134
  /** Set the styles for this subcomponent if needed, using the `space` and `layout` styled-system categories */
146
135
  SidebarStyles: PropTypes.object
147
136
  };
148
- var SidebarPanelStyle = styled("div").withConfig({
137
+ const SidebarPanelStyle = styled("div").withConfig({
149
138
  displayName: "Sidebar__SidebarPanelStyle",
150
139
  componentId: "sc-wr9mfw-4"
151
- })(function (props) {
152
- return css({
153
- display: props.active ? "block" : "none",
154
- minWidth: props.large ? "calc(" + themeGet("appScale.sidebarMaxWidthLarge")(props) + " - " + themeGet("appScale.navBarSize")(props) + ")" : "calc(" + themeGet("appScale.sidebarMaxWidth")(props) + " - " + themeGet("appScale.navBarSize")(props) + ")",
155
- maxWidth: props.large ? "calc(" + themeGet("appScale.sidebarMaxWidthLarge")(props) + " - " + themeGet("appScale.navBarSize")(props) + ")" : "calc(" + themeGet("appScale.sidebarMaxWidth")(props) + " - " + themeGet("appScale.navBarSize")(props) + ")",
156
- height: "calc(100vh - ( " + themeGet("appScale.navBarSize")(props) + "))",
157
- overflowY: "auto",
158
- bg: themeGet("colors.greyDarker")(props),
159
- "@media screen and (max-width: 900px)": {
160
- width: "100%",
161
- minWidth: "initial",
162
- maxWidth: "initial",
163
- height: "calc(" + themeGet("appScale.sidebarMobileHeight")(props) + " - " + themeGet("appScale.navBarSize")(props) + ")"
164
- }
140
+ })(props => css({
141
+ display: props.active ? "block" : "none",
142
+ minWidth: props.large ? "calc(" + themeGet("appScale.sidebarMaxWidthLarge")(props) + " - " + themeGet("appScale.navBarSize")(props) + ")" : "calc(" + themeGet("appScale.sidebarMaxWidth")(props) + " - " + themeGet("appScale.navBarSize")(props) + ")",
143
+ maxWidth: props.large ? "calc(" + themeGet("appScale.sidebarMaxWidthLarge")(props) + " - " + themeGet("appScale.navBarSize")(props) + ")" : "calc(" + themeGet("appScale.sidebarMaxWidth")(props) + " - " + themeGet("appScale.navBarSize")(props) + ")",
144
+ height: "calc(100vh - ( " + themeGet("appScale.navBarSize")(props) + "))",
145
+ overflowY: "auto",
146
+ bg: themeGet("colors.greyDarker")(props),
147
+ "@media screen and (max-width: 900px)": {
148
+ width: "100%",
149
+ minWidth: "initial",
150
+ maxWidth: "initial",
151
+ height: "calc(" + themeGet("appScale.sidebarMobileHeight")(props) + " - " + themeGet("appScale.navBarSize")(props) + ")"
152
+ }
153
+ }), SidebarStyles);
154
+ export const SidebarPanel = _ref => {
155
+ let {
156
+ SidebarStyles,
157
+ children,
158
+ ...props
159
+ } = _ref;
160
+ return /*#__PURE__*/_jsx(SidebarPanelStyle, {
161
+ ...SidebarStyles,
162
+ ...props,
163
+ children: children
165
164
  });
166
- }, SidebarStyles);
167
- export var SidebarPanel = function SidebarPanel(_ref) {
168
- var SidebarStyles = _ref.SidebarStyles,
169
- children = _ref.children,
170
- props = _objectWithoutProperties(_ref, _excluded);
171
- return /*#__PURE__*/React.createElement(SidebarPanelStyle, _extends({}, SidebarStyles, props), children);
172
165
  };
173
166
  SidebarPanel.propTypes = {
174
167
  /** SidebarPanel children, ie `SidebarPanels` components, are rendered as node elements */
@@ -176,40 +169,44 @@ SidebarPanel.propTypes = {
176
169
  /** Set the styles for this subcomponent if needed, using the `space` and `layout` styled-system categories */
177
170
  SidebarStyles: PropTypes.object
178
171
  };
179
- export var SidebarClose = styled("label").withConfig({
172
+ export const SidebarClose = styled("label").withConfig({
180
173
  displayName: "Sidebar__SidebarClose",
181
174
  componentId: "sc-wr9mfw-5"
182
- })(function (props) {
183
- return css({
184
- position: "absolute",
185
- right: "calc(-1 * 8px)",
186
- top: "14px",
187
- width: "24px",
188
- height: "24px",
189
- textAlign: "center",
190
- paddingTop: 1,
191
- borderRadius: "0 50% 50% 0",
192
- zIndex: 2,
193
- cursor: "w-resize",
194
- bg: themeGet("colors.greyDarker")(props),
195
- "@media screen and (max-width: 900px)": {
196
- top: "-10px",
197
- left: "calc(50% - 12px)",
198
- right: "auto",
199
- borderRadius: "50%",
200
- transform: "rotate(-90deg)",
201
- cursor: "s-resize"
202
- }
175
+ })(props => css({
176
+ position: "absolute",
177
+ right: "calc(-1 * 8px)",
178
+ top: "14px",
179
+ width: "24px",
180
+ height: "24px",
181
+ textAlign: "center",
182
+ paddingTop: 1,
183
+ borderRadius: "0 50% 50% 0",
184
+ zIndex: 2,
185
+ cursor: "w-resize",
186
+ bg: themeGet("colors.greyDarker")(props),
187
+ "@media screen and (max-width: 900px)": {
188
+ top: "-10px",
189
+ left: "calc(50% - 12px)",
190
+ right: "auto",
191
+ borderRadius: "50%",
192
+ transform: "rotate(-90deg)",
193
+ cursor: "s-resize"
194
+ }
195
+ }), SidebarStyles);
196
+ const Sidebar = _ref2 => {
197
+ let {
198
+ children,
199
+ theme,
200
+ ...props
201
+ } = _ref2;
202
+ const component = /*#__PURE__*/_jsx(SidebarWrapper, {
203
+ ...props,
204
+ children: children
203
205
  });
204
- }, SidebarStyles);
205
- var Sidebar = function Sidebar(_ref2) {
206
- var children = _ref2.children,
207
- theme = _ref2.theme,
208
- props = _objectWithoutProperties(_ref2, _excluded2);
209
- var component = /*#__PURE__*/React.createElement(SidebarWrapper, props, children);
210
- return theme ? /*#__PURE__*/React.createElement(ThemeProvider, {
211
- theme: theme
212
- }, component) : component;
206
+ return theme ? /*#__PURE__*/_jsx(ThemeProvider, {
207
+ theme: theme,
208
+ children: component
209
+ }) : component;
213
210
  };
214
211
  Sidebar.propTypes = {
215
212
  /** Sidebar children are rendered as node elements */
@@ -2,73 +2,76 @@ import Spacer from ".";
2
2
  import Avatar from "../Avatar";
3
3
  import StyledLink from "../StyledLink";
4
4
  import React from "react";
5
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
5
6
  export default {
6
7
  title: "Components/Spacer",
7
8
  component: Spacer
8
9
  };
9
- export var marginSpacer = function marginSpacer() {
10
- return /*#__PURE__*/React.createElement(Spacer, {
11
- my: 3
12
- }, /*#__PURE__*/React.createElement(Avatar, {
10
+ export const marginSpacer = () => /*#__PURE__*/_jsxs(Spacer, {
11
+ my: 3,
12
+ children: [/*#__PURE__*/_jsx(Avatar, {
13
13
  title: "Ayden Lundgre",
14
14
  subtitle: "Senior Business Analyst",
15
15
  initials: "AL"
16
- }), /*#__PURE__*/React.createElement(Avatar, {
16
+ }), /*#__PURE__*/_jsx(Avatar, {
17
17
  title: "Ayden Lundgre",
18
18
  subtitle: "Senior Business Analyst",
19
19
  initials: "AL"
20
- }), /*#__PURE__*/React.createElement(Avatar, {
21
- title: /*#__PURE__*/React.createElement(StyledLink, {
22
- href: "#"
23
- }, "Ayden Lundgre"),
20
+ }), /*#__PURE__*/_jsx(Avatar, {
21
+ title: /*#__PURE__*/_jsx(StyledLink, {
22
+ href: "#",
23
+ children: "Ayden Lundgre"
24
+ }),
24
25
  subtitle: "Senior Business Analyst",
25
26
  initials: "AL"
26
- }), /*#__PURE__*/React.createElement(Avatar, {
27
+ }), /*#__PURE__*/_jsx(Avatar, {
27
28
  sizing: "small",
28
29
  title: "Ayden Lundgre",
29
30
  subtitle: "Senior Business Analyst",
30
31
  initials: "AL"
31
- }), /*#__PURE__*/React.createElement(Avatar, {
32
+ }), /*#__PURE__*/_jsx(Avatar, {
32
33
  sizing: "small",
33
- title: /*#__PURE__*/React.createElement(StyledLink, {
34
- href: "#"
35
- }, "Ayden Lundgre"),
34
+ title: /*#__PURE__*/_jsx(StyledLink, {
35
+ href: "#",
36
+ children: "Ayden Lundgre"
37
+ }),
36
38
  subtitle: "Senior Business Analyst",
37
39
  initials: "AL"
38
- }));
39
- };
40
+ })]
41
+ });
40
42
  marginSpacer.storyName = "Margin Spacer";
41
- export var paddingSpacer = function paddingSpacer() {
42
- return /*#__PURE__*/React.createElement(Spacer, {
43
- padding: 3
44
- }, /*#__PURE__*/React.createElement(Avatar, {
43
+ export const paddingSpacer = () => /*#__PURE__*/_jsxs(Spacer, {
44
+ padding: 3,
45
+ children: [/*#__PURE__*/_jsx(Avatar, {
45
46
  title: "Ayden Lundgre",
46
47
  subtitle: "Senior Business Analyst",
47
48
  initials: "AL"
48
- }), /*#__PURE__*/React.createElement(Avatar, {
49
+ }), /*#__PURE__*/_jsx(Avatar, {
49
50
  title: "Ayden Lundgre",
50
51
  subtitle: "Senior Business Analyst",
51
52
  initials: "AL"
52
- }), /*#__PURE__*/React.createElement(Avatar, {
53
- title: /*#__PURE__*/React.createElement(StyledLink, {
54
- href: "#"
55
- }, "Ayden Lundgre"),
53
+ }), /*#__PURE__*/_jsx(Avatar, {
54
+ title: /*#__PURE__*/_jsx(StyledLink, {
55
+ href: "#",
56
+ children: "Ayden Lundgre"
57
+ }),
56
58
  subtitle: "Senior Business Analyst",
57
59
  initials: "AL"
58
- }), /*#__PURE__*/React.createElement(Avatar, {
60
+ }), /*#__PURE__*/_jsx(Avatar, {
59
61
  sizing: "small",
60
62
  title: "Ayden Lundgre",
61
63
  subtitle: "Senior Business Analyst",
62
64
  initials: "AL"
63
- }), /*#__PURE__*/React.createElement(Avatar, {
65
+ }), /*#__PURE__*/_jsx(Avatar, {
64
66
  sizing: "small",
65
- title: /*#__PURE__*/React.createElement(StyledLink, {
66
- href: "#"
67
- }, "Ayden Lundgre"),
67
+ title: /*#__PURE__*/_jsx(StyledLink, {
68
+ href: "#",
69
+ children: "Ayden Lundgre"
70
+ }),
68
71
  subtitle: "Senior Business Analyst",
69
72
  initials: "AL"
70
- }));
71
- };
73
+ })]
74
+ });
72
75
  paddingSpacer.storyName = "Padding Spacer";
73
76
  marginSpacer.__docgenInfo = {
74
77
  "description": "",
@@ -1,31 +1,31 @@
1
- import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
- import _extends from "@babel/runtime/helpers/extends";
3
- import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
4
- var _excluded = ["children", "theme"];
5
- 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; }
6
- 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; }
7
1
  import React from "react";
8
2
  import { space, layout } from "styled-system";
9
3
  import styled, { ThemeProvider } from "styled-components";
10
4
  import propTypes from "@styled-system/prop-types";
11
- var SpacerBox = styled.div.withConfig({
5
+ import { jsx as _jsx } from "react/jsx-runtime";
6
+ const SpacerBox = styled.div.withConfig({
12
7
  displayName: "Spacer__SpacerBox",
13
8
  componentId: "sc-1acikjz-0"
14
9
  })(["", " ", " line-height:0;"], space, layout);
15
- var Spacer = function Spacer(_ref) {
16
- var children = _ref.children,
17
- theme = _ref.theme,
18
- props = _objectWithoutProperties(_ref, _excluded);
19
- var clones = React.Children.toArray(children).map(function (child, index) {
20
- return /*#__PURE__*/React.createElement(SpacerBox, _extends({
21
- key: index
22
- }, props), /*#__PURE__*/React.cloneElement(child));
23
- });
24
- return theme ? /*#__PURE__*/React.createElement(ThemeProvider, {
25
- theme: theme
26
- }, clones) : clones;
10
+ const Spacer = _ref => {
11
+ let {
12
+ children,
13
+ theme,
14
+ ...props
15
+ } = _ref;
16
+ const clones = React.Children.toArray(children).map((child, index) => /*#__PURE__*/_jsx(SpacerBox, {
17
+ ...props,
18
+ children: /*#__PURE__*/React.cloneElement(child)
19
+ }, index));
20
+ return theme ? /*#__PURE__*/_jsx(ThemeProvider, {
21
+ theme: theme,
22
+ children: clones
23
+ }) : clones;
24
+ };
25
+ Spacer.propTypes = {
26
+ ...propTypes.space,
27
+ ...propTypes.layout
27
28
  };
28
- Spacer.propTypes = _objectSpread(_objectSpread({}, propTypes.space), propTypes.layout);
29
29
  Spacer.__docgenInfo = {
30
30
  "description": "",
31
31
  "methods": [],