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,38 +1,34 @@
1
1
  import React from "react";
2
2
  import HeaderSimple from ".";
3
3
  import TextInput from "../TextInput";
4
+ import { jsx as _jsx } from "react/jsx-runtime";
4
5
  export default {
5
6
  title: "Components/HeaderSimple",
6
7
  component: HeaderSimple
7
8
  };
8
- export var defaultHeader = function defaultHeader() {
9
- return /*#__PURE__*/React.createElement(HeaderSimple, {
10
- appName: "App Name",
11
- userName: "Michael",
12
- avatarSource: "https://api.dicebear.com/7.x/personas/svg?seed=mike",
13
- avatarAlt: "Avatar for Michael",
14
- currentWorskapce: "Org Design Workspace"
15
- });
16
- };
9
+ export const defaultHeader = () => /*#__PURE__*/_jsx(HeaderSimple, {
10
+ appName: "App Name",
11
+ userName: "Michael",
12
+ avatarSource: "https://api.dicebear.com/7.x/personas/svg?seed=mike",
13
+ avatarAlt: "Avatar for Michael",
14
+ currentWorskapce: "Org Design Workspace"
15
+ });
17
16
  defaultHeader.storyName = "Default Header";
18
- export var headerWithSearch = function headerWithSearch() {
19
- return /*#__PURE__*/React.createElement(HeaderSimple, {
20
- variant: "search",
21
- appName: "App Name",
22
- userName: "Michael",
23
- avatarSource: "https://api.dicebear.com/7.x/personas/svg?seed=mike",
24
- avatarAlt: "Avatar for Michael",
25
- currentWorskapce: "Org Design Workspace",
26
- searchComponent: /*#__PURE__*/React.createElement(TextInput, {
27
- fullWidth: true,
28
- id: "search",
29
- key: "search",
30
- type: "text",
31
- placeholder: "Search for...",
32
- iconRight: ["fas", "search"]
33
- })
34
- });
35
- };
17
+ export const headerWithSearch = () => /*#__PURE__*/_jsx(HeaderSimple, {
18
+ variant: "search",
19
+ appName: "App Name",
20
+ userName: "Michael",
21
+ avatarSource: "https://api.dicebear.com/7.x/personas/svg?seed=mike",
22
+ avatarAlt: "Avatar for Michael",
23
+ currentWorskapce: "Org Design Workspace",
24
+ searchComponent: /*#__PURE__*/_jsx(TextInput, {
25
+ fullWidth: true,
26
+ id: "search",
27
+ type: "text",
28
+ placeholder: "Search for...",
29
+ iconRight: ["fas", "search"]
30
+ }, "search")
31
+ });
36
32
  headerWithSearch.storyName = "Header with search";
37
33
  defaultHeader.__docgenInfo = {
38
34
  "description": "",
@@ -7,32 +7,27 @@ import Flex, { FlexItem } from "../Flex";
7
7
  import { Small } from "../Typography";
8
8
  import { css } from "@styled-system/css";
9
9
  import { themeGet } from "@styled-system/theme-get";
10
- var Bar = styled("header").attrs(function (props) {
11
- return {
12
- "data-testid": props.dataTestId
13
- };
14
- }).withConfig({
10
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
+ const Bar = styled("header").attrs(props => ({
12
+ "data-testid": props.dataTestId
13
+ })).withConfig({
15
14
  displayName: "HeaderSimple__Bar",
16
15
  componentId: "sc-1mo6hwx-0"
17
- })(function (props) {
18
- return {
19
- height: themeGet("appScale.navBarSize")(props)
20
- };
21
- }, function (props) {
22
- return css({
23
- width: "100%",
24
- zIndex: 12,
25
- position: "sticky",
26
- top: "0",
27
- display: "flex",
28
- alignItems: "center",
29
- py: 0,
30
- px: 4,
31
- bg: themeGet("colors.black")(props)
32
- });
33
- }, variant({
16
+ })(props => ({
17
+ height: themeGet("appScale.navBarSize")(props)
18
+ }), props => css({
19
+ width: "100%",
20
+ zIndex: 12,
21
+ position: "sticky",
22
+ top: "0",
23
+ display: "flex",
24
+ alignItems: "center",
25
+ py: 0,
26
+ px: 4,
27
+ bg: themeGet("colors.black")(props)
28
+ }), variant({
34
29
  variants: {
35
- "default": {
30
+ default: {
36
31
  width: "5px",
37
32
  height: "5px",
38
33
  backgroundColor: "#fff",
@@ -45,19 +40,17 @@ var Bar = styled("header").attrs(function (props) {
45
40
  }
46
41
  }
47
42
  }), space);
48
- var AppName = styled("div").withConfig({
43
+ const AppName = styled("div").withConfig({
49
44
  displayName: "HeaderSimple__AppName",
50
45
  componentId: "sc-1mo6hwx-1"
51
- })(function (props) {
52
- return css({
53
- display: "flex",
54
- alignItems: "center",
55
- fontSize: themeGet("fontSizes.3")(props),
56
- color: themeGet("colors.white")(props)
57
- });
58
- }, variant({
46
+ })(props => css({
47
+ display: "flex",
48
+ alignItems: "center",
49
+ fontSize: themeGet("fontSizes.3")(props),
50
+ color: themeGet("colors.white")(props)
51
+ }), variant({
59
52
  variants: {
60
- "default": {
53
+ default: {
61
54
  width: "5px",
62
55
  height: "5px",
63
56
  backgroundColor: "#fff",
@@ -70,7 +63,7 @@ var AppName = styled("div").withConfig({
70
63
  }
71
64
  }
72
65
  }), space);
73
- var SearchContainer = styled("div").withConfig({
66
+ const SearchContainer = styled("div").withConfig({
74
67
  displayName: "HeaderSimple__SearchContainer",
75
68
  componentId: "sc-1mo6hwx-2"
76
69
  })(css({
@@ -84,41 +77,53 @@ var SearchContainer = styled("div").withConfig({
84
77
  /**
85
78
  * Header component for top of app.
86
79
  **/
87
- var HeaderSimple = function HeaderSimple(_ref) {
88
- var appName = _ref.appName,
89
- userName = _ref.userName,
90
- avatarSource = _ref.avatarSource,
91
- avatarAlt = _ref.avatarAlt,
92
- searchComponent = _ref.searchComponent,
93
- dataTestId = _ref.dataTestId,
94
- variant = _ref.variant,
95
- currentWorkspace = _ref.currentWorkspace,
96
- logo = _ref.logo;
97
- return /*#__PURE__*/React.createElement(Bar, {
80
+ const HeaderSimple = _ref => {
81
+ let {
82
+ appName,
83
+ userName,
84
+ avatarSource,
85
+ avatarAlt,
86
+ searchComponent,
87
+ dataTestId,
88
+ variant,
89
+ currentWorkspace,
90
+ logo
91
+ } = _ref;
92
+ return /*#__PURE__*/_jsxs(Bar, {
98
93
  dataTestId: dataTestId,
99
- variant: variant
100
- }, /*#__PURE__*/React.createElement(Flex, {
101
- alignItems: "center"
102
- }, logo && /*#__PURE__*/React.createElement(FlexItem, null, logo), /*#__PURE__*/React.createElement(Flex, {
103
- flexDirection: "column",
104
- justifyContent: "center"
105
- }, /*#__PURE__*/React.createElement(AppName, {
106
- variant: variant
107
- }, appName), currentWorkspace && /*#__PURE__*/React.createElement(Small, {
108
- color: "white",
109
- fontSize: "0",
110
- display: ["none", "none", "none", "block"]
111
- }, currentWorkspace))), searchComponent && /*#__PURE__*/React.createElement(SearchContainer, null, searchComponent), /*#__PURE__*/React.createElement(Flex, {
112
- alignItems: "center",
113
- ml: "auto",
114
- display: searchComponent ? ["none", "none", "none", "flex"] : "flex"
115
- }, /*#__PURE__*/React.createElement(Avatar, {
116
- type: "inverted",
117
- sizing: "small",
118
- title: userName,
119
- image: avatarSource,
120
- imageAlt: avatarAlt
121
- })));
94
+ variant: variant,
95
+ children: [/*#__PURE__*/_jsxs(Flex, {
96
+ alignItems: "center",
97
+ children: [logo && /*#__PURE__*/_jsx(FlexItem, {
98
+ children: logo
99
+ }), /*#__PURE__*/_jsxs(Flex, {
100
+ flexDirection: "column",
101
+ justifyContent: "center",
102
+ children: [/*#__PURE__*/_jsx(AppName, {
103
+ variant: variant,
104
+ children: appName
105
+ }), currentWorkspace && /*#__PURE__*/_jsx(Small, {
106
+ color: "white",
107
+ fontSize: "0",
108
+ display: ["none", "none", "none", "block"],
109
+ children: currentWorkspace
110
+ })]
111
+ })]
112
+ }), searchComponent && /*#__PURE__*/_jsx(SearchContainer, {
113
+ children: searchComponent
114
+ }), /*#__PURE__*/_jsx(Flex, {
115
+ alignItems: "center",
116
+ ml: "auto",
117
+ display: searchComponent ? ["none", "none", "none", "flex"] : "flex",
118
+ children: /*#__PURE__*/_jsx(Avatar, {
119
+ type: "inverted",
120
+ sizing: "small",
121
+ title: userName,
122
+ image: avatarSource,
123
+ imageAlt: avatarAlt
124
+ })
125
+ })]
126
+ });
122
127
  };
123
128
  HeaderSimple.propTypes = {
124
129
  /** Logo for app. Preferably an svg logo */
@@ -5,112 +5,113 @@ import { far } from "@fortawesome/free-regular-svg-icons";
5
5
  import { fas } from "@fortawesome/free-solid-svg-icons";
6
6
  import Box from "../Box";
7
7
  import Flex from "../Flex";
8
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
8
9
  library.add(far, fas);
9
10
  export default {
10
11
  title: "Components/Icon",
11
- decorators: [function (storyFn) {
12
- return /*#__PURE__*/React.createElement(Box, {
13
- p: "3"
14
- }, /*#__PURE__*/React.createElement(Flex, {
12
+ decorators: [storyFn => /*#__PURE__*/_jsx(Box, {
13
+ p: "3",
14
+ children: /*#__PURE__*/_jsx(Flex, {
15
15
  alignItems: "center",
16
- justifyContent: "space-around"
17
- }, storyFn()));
18
- }],
16
+ justifyContent: "space-around",
17
+ children: storyFn()
18
+ })
19
+ })],
19
20
  component: Icon
20
21
  };
21
- export var defaultIcon = function defaultIcon() {
22
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Icon, {
22
+ export const defaultIcon = () => /*#__PURE__*/_jsxs(_Fragment, {
23
+ children: [/*#__PURE__*/_jsx(Icon, {
23
24
  icon: ["fas", "angle-down"],
24
25
  title: "Down"
25
- }), /*#__PURE__*/React.createElement(Icon, {
26
+ }), /*#__PURE__*/_jsx(Icon, {
26
27
  icon: ["fas", "plus"],
27
28
  title: "Plus"
28
- }), /*#__PURE__*/React.createElement(Icon, {
29
+ }), /*#__PURE__*/_jsx(Icon, {
29
30
  icon: ["far", "user"],
30
31
  title: "User"
31
- }));
32
- };
33
- export var colouredIcon = function colouredIcon() {
34
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Icon, {
32
+ })]
33
+ });
34
+ export const colouredIcon = () => /*#__PURE__*/_jsxs(_Fragment, {
35
+ children: [/*#__PURE__*/_jsx(Icon, {
35
36
  icon: ["fas", "angle-down"],
36
37
  color: "primaryDark",
37
38
  title: "Down"
38
- }), /*#__PURE__*/React.createElement(Icon, {
39
+ }), /*#__PURE__*/_jsx(Icon, {
39
40
  icon: ["fas", "plus"],
40
41
  color: "successDark",
41
42
  title: "Plus"
42
- }), /*#__PURE__*/React.createElement(Icon, {
43
+ }), /*#__PURE__*/_jsx(Icon, {
43
44
  icon: ["far", "user"],
44
45
  color: "dangerDark",
45
46
  title: "User"
46
- }));
47
- };
48
- export var iconSize = function iconSize() {
49
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Icon, {
47
+ })]
48
+ });
49
+ export const iconSize = () => /*#__PURE__*/_jsxs(_Fragment, {
50
+ children: [/*#__PURE__*/_jsx(Icon, {
50
51
  icon: ["fas", "plus"],
51
52
  size: "sm",
52
53
  title: "Plus"
53
- }), /*#__PURE__*/React.createElement(Icon, {
54
+ }), /*#__PURE__*/_jsx(Icon, {
54
55
  icon: ["fas", "plus"],
55
56
  size: "rg",
56
57
  title: "Plus"
57
- }), /*#__PURE__*/React.createElement(Icon, {
58
+ }), /*#__PURE__*/_jsx(Icon, {
58
59
  icon: ["fas", "plus"],
59
60
  size: "lg",
60
61
  title: "Plus"
61
- }), /*#__PURE__*/React.createElement(Icon, {
62
+ }), /*#__PURE__*/_jsx(Icon, {
62
63
  icon: ["fas", "plus"],
63
64
  size: "2x",
64
65
  title: "Plus"
65
- }));
66
- };
67
- export var invertedIcons = function invertedIcons() {
68
- return /*#__PURE__*/React.createElement(Box, {
69
- bg: "greyDarker",
70
- width: "100%"
71
- }, /*#__PURE__*/React.createElement(Flex, {
66
+ })]
67
+ });
68
+ export const invertedIcons = () => /*#__PURE__*/_jsx(Box, {
69
+ bg: "greyDarker",
70
+ width: "100%",
71
+ children: /*#__PURE__*/_jsxs(Flex, {
72
72
  alignItems: "center",
73
- justifyContent: "space-around"
74
- }, /*#__PURE__*/React.createElement(Icon, {
75
- icon: ["fas", "angle-down"],
76
- inverse: true,
77
- title: "Down"
78
- }), /*#__PURE__*/React.createElement(Icon, {
79
- icon: ["fas", "plus"],
80
- inverse: true,
81
- title: "Plus"
82
- }), /*#__PURE__*/React.createElement(Icon, {
83
- icon: ["far", "user"],
84
- inverse: true,
85
- title: "User"
86
- })));
87
- };
88
- export var animatedIcons = function animatedIcons() {
89
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Icon, {
73
+ justifyContent: "space-around",
74
+ children: [/*#__PURE__*/_jsx(Icon, {
75
+ icon: ["fas", "angle-down"],
76
+ inverse: true,
77
+ title: "Down"
78
+ }), /*#__PURE__*/_jsx(Icon, {
79
+ icon: ["fas", "plus"],
80
+ inverse: true,
81
+ title: "Plus"
82
+ }), /*#__PURE__*/_jsx(Icon, {
83
+ icon: ["far", "user"],
84
+ inverse: true,
85
+ title: "User"
86
+ })]
87
+ })
88
+ });
89
+ export const animatedIcons = () => /*#__PURE__*/_jsxs(_Fragment, {
90
+ children: [/*#__PURE__*/_jsx(Icon, {
90
91
  icon: ["fas", "angle-down"],
91
92
  spin: true,
92
93
  title: "Spinning arrow"
93
- }), /*#__PURE__*/React.createElement(Icon, {
94
+ }), /*#__PURE__*/_jsx(Icon, {
94
95
  icon: ["fas", "plus"],
95
96
  pulse: true,
96
97
  title: "Spinning plus"
97
- }));
98
- };
99
- export var transformsAndRotations = function transformsAndRotations() {
100
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Icon, {
98
+ })]
99
+ });
100
+ export const transformsAndRotations = () => /*#__PURE__*/_jsxs(_Fragment, {
101
+ children: [/*#__PURE__*/_jsx(Icon, {
101
102
  icon: ["fas", "coffee"],
102
103
  rotation: "270",
103
104
  title: "Coffee"
104
- }), /*#__PURE__*/React.createElement(Icon, {
105
+ }), /*#__PURE__*/_jsx(Icon, {
105
106
  icon: ["fas", "user"],
106
107
  flip: "vertical",
107
108
  title: "User"
108
- }), /*#__PURE__*/React.createElement(Icon, {
109
+ }), /*#__PURE__*/_jsx(Icon, {
109
110
  icon: ["fas", "certificate"],
110
111
  transform: "grow-8 up-10",
111
112
  title: "Certificate"
112
- }));
113
- };
113
+ })]
114
+ });
114
115
  defaultIcon.__docgenInfo = {
115
116
  "description": "",
116
117
  "methods": [],
@@ -1,6 +1,3 @@
1
- import _extends from "@babel/runtime/helpers/extends";
2
- import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
- var _excluded = ["border", "mask", "fixedWidth", "inverse", "flip", "icon", "listitem", "pull", "pulse", "rotation", "size", "spin", "symbol", "transform", "color", "theme", "title"];
4
1
  import React from "react";
5
2
  import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
6
3
  import PropTypes from "prop-types";
@@ -19,9 +16,9 @@ import { space, color, typography, compose } from "styled-system";
19
16
  *
20
17
  * To get started you can import the icons into Font Awesome library. Alternatively if you want to use their full icon set you need to purchase a PRO plan from Font awesome, and can install the full pro icon packages in your app. See the readme here for more details on how to use and install PRO: <https://github.com/orchestrated-io/orcs-design-system>
21
18
  */
22
-
23
- var IconStyles = compose(space, color, typography);
24
- var IconWrapper = styled("span").withConfig({
19
+ import { jsx as _jsx } from "react/jsx-runtime";
20
+ const IconStyles = compose(space, color, typography);
21
+ const IconWrapper = styled("span").withConfig({
25
22
  displayName: "Icon__IconWrapper",
26
23
  componentId: "sc-xeqnbo-0"
27
24
  })(css({
@@ -29,46 +26,51 @@ var IconWrapper = styled("span").withConfig({
29
26
  display: "inline-block"
30
27
  }), IconStyles);
31
28
  export default function Icon(_ref) {
32
- var border = _ref.border,
33
- mask = _ref.mask,
34
- fixedWidth = _ref.fixedWidth,
35
- inverse = _ref.inverse,
36
- flip = _ref.flip,
37
- icon = _ref.icon,
38
- listitem = _ref.listitem,
39
- pull = _ref.pull,
40
- pulse = _ref.pulse,
41
- rotation = _ref.rotation,
42
- size = _ref.size,
43
- spin = _ref.spin,
44
- symbol = _ref.symbol,
45
- transform = _ref.transform,
46
- color = _ref.color,
47
- theme = _ref.theme,
48
- title = _ref.title,
49
- props = _objectWithoutProperties(_ref, _excluded);
50
- var component = /*#__PURE__*/React.createElement(IconWrapper, _extends({
51
- color: color
52
- }, props), /*#__PURE__*/React.createElement(FontAwesomeIcon, {
53
- border: border,
54
- mask: mask,
55
- fixedWidth: fixedWidth,
56
- inverse: inverse,
57
- flip: flip,
58
- listitem: listitem,
59
- pull: pull,
60
- rotation: rotation,
61
- icon: icon,
62
- pulse: pulse,
63
- size: size,
64
- spin: spin,
65
- symbol: symbol,
66
- transform: transform,
67
- title: title && "Icon-".concat(title)
68
- }));
69
- return theme ? /*#__PURE__*/React.createElement(ThemeProvider, {
70
- theme: theme
71
- }, component) : component;
29
+ let {
30
+ border,
31
+ mask,
32
+ fixedWidth,
33
+ inverse,
34
+ flip,
35
+ icon,
36
+ listitem,
37
+ pull,
38
+ pulse,
39
+ rotation,
40
+ size,
41
+ spin,
42
+ symbol,
43
+ transform,
44
+ color,
45
+ theme,
46
+ title,
47
+ ...props
48
+ } = _ref;
49
+ const component = /*#__PURE__*/_jsx(IconWrapper, {
50
+ color: color,
51
+ ...props,
52
+ children: /*#__PURE__*/_jsx(FontAwesomeIcon, {
53
+ border: border,
54
+ mask: mask,
55
+ fixedWidth: fixedWidth,
56
+ inverse: inverse,
57
+ flip: flip,
58
+ listitem: listitem,
59
+ pull: pull,
60
+ rotation: rotation,
61
+ icon: icon,
62
+ pulse: pulse,
63
+ size: size,
64
+ spin: spin,
65
+ symbol: symbol,
66
+ transform: transform,
67
+ title: title && "Icon-".concat(title)
68
+ })
69
+ });
70
+ return theme ? /*#__PURE__*/_jsx(ThemeProvider, {
71
+ theme: theme,
72
+ children: component
73
+ }) : component;
72
74
  }
73
75
  Icon.propTypes = {
74
76
  /** Colours the icon using colours from the system colour palette */
@@ -2,56 +2,49 @@ import React from "react";
2
2
  import Loading from ".";
3
3
  import Spacer from "../Spacer";
4
4
  import Box from "../Box";
5
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
5
6
  export default {
6
7
  title: "Components/Loading",
7
- decorators: [function (storyFn) {
8
- return /*#__PURE__*/React.createElement(Box, {
9
- p: "r"
10
- }, storyFn());
11
- }],
8
+ decorators: [storyFn => /*#__PURE__*/_jsx(Box, {
9
+ p: "r",
10
+ children: storyFn()
11
+ })],
12
12
  component: Loading
13
13
  };
14
- export var defaultLoading = function defaultLoading() {
15
- return /*#__PURE__*/React.createElement(Loading, null);
16
- };
14
+ export const defaultLoading = () => /*#__PURE__*/_jsx(Loading, {});
17
15
  defaultLoading.storyName = "Default";
18
- export var largeLoading = function largeLoading() {
19
- return /*#__PURE__*/React.createElement(Loading, {
20
- large: true
21
- });
22
- };
16
+ export const largeLoading = () => /*#__PURE__*/_jsx(Loading, {
17
+ large: true
18
+ });
23
19
  largeLoading.storyName = "Large";
24
- export var centeredLoading = function centeredLoading() {
25
- return /*#__PURE__*/React.createElement(Spacer, {
26
- p: "r"
27
- }, /*#__PURE__*/React.createElement(Loading, {
20
+ export const centeredLoading = () => /*#__PURE__*/_jsxs(Spacer, {
21
+ p: "r",
22
+ children: [/*#__PURE__*/_jsx(Loading, {
28
23
  centered: true
29
- }), /*#__PURE__*/React.createElement(Loading, {
24
+ }), /*#__PURE__*/_jsx(Loading, {
30
25
  large: true,
31
26
  centered: true
32
- }));
33
- };
27
+ })]
28
+ });
34
29
  centeredLoading.storyName = "Centered";
35
- export var colouredLoading = function colouredLoading() {
36
- return /*#__PURE__*/React.createElement(Loading, {
37
- large: true,
38
- primary: true
39
- });
40
- };
30
+ export const colouredLoading = () => /*#__PURE__*/_jsx(Loading, {
31
+ large: true,
32
+ primary: true
33
+ });
41
34
  colouredLoading.storyName = "Coloured";
42
- export var invertedLoading = function invertedLoading() {
43
- return /*#__PURE__*/React.createElement(Box, {
44
- bg: "greyDarkest",
45
- p: "r"
46
- }, /*#__PURE__*/React.createElement(Spacer, {
47
- p: "r"
48
- }, /*#__PURE__*/React.createElement(Loading, {
49
- inverted: true
50
- }), /*#__PURE__*/React.createElement(Loading, {
51
- large: true,
52
- inverted: true
53
- })));
54
- };
35
+ export const invertedLoading = () => /*#__PURE__*/_jsx(Box, {
36
+ bg: "greyDarkest",
37
+ p: "r",
38
+ children: /*#__PURE__*/_jsxs(Spacer, {
39
+ p: "r",
40
+ children: [/*#__PURE__*/_jsx(Loading, {
41
+ inverted: true
42
+ }), /*#__PURE__*/_jsx(Loading, {
43
+ large: true,
44
+ inverted: true
45
+ })]
46
+ })
47
+ });
55
48
  invertedLoading.storyName = "Inverted";
56
49
  defaultLoading.__docgenInfo = {
57
50
  "description": "",