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,56 +1,57 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import Box from "../Box";
|
|
3
3
|
import { ButtonGroupContainer, ButtonGroupItem } from ".";
|
|
4
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
4
5
|
export default {
|
|
5
6
|
title: "Components/ButtonGroup",
|
|
6
7
|
component: ButtonGroupContainer
|
|
7
8
|
};
|
|
8
|
-
export
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}, /*#__PURE__*/React.createElement(ButtonGroupContainer, {
|
|
9
|
+
export const defaultButtonGroup = () => /*#__PURE__*/_jsx(Box, {
|
|
10
|
+
bg: "white",
|
|
11
|
+
p: "r",
|
|
12
|
+
children: /*#__PURE__*/_jsxs(ButtonGroupContainer, {
|
|
13
13
|
controlLabel: "View:",
|
|
14
|
-
labelDark: true
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}
|
|
14
|
+
labelDark: true,
|
|
15
|
+
children: [/*#__PURE__*/_jsx(ButtonGroupItem, {
|
|
16
|
+
name: "viewMode",
|
|
17
|
+
label: "Chapters",
|
|
18
|
+
value: "Chapters view"
|
|
19
|
+
}), /*#__PURE__*/_jsx(ButtonGroupItem, {
|
|
20
|
+
name: "viewMode",
|
|
21
|
+
label: "Groups",
|
|
22
|
+
value: "Groups view",
|
|
23
|
+
checked: true
|
|
24
|
+
}), /*#__PURE__*/_jsx(ButtonGroupItem, {
|
|
25
|
+
name: "viewMode",
|
|
26
|
+
label: "Constraints",
|
|
27
|
+
value: "Constraints view"
|
|
28
|
+
})]
|
|
29
|
+
})
|
|
30
|
+
});
|
|
30
31
|
defaultButtonGroup.story = {
|
|
31
32
|
name: "Default button group"
|
|
32
33
|
};
|
|
33
|
-
export
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
})
|
|
53
|
-
};
|
|
34
|
+
export const invertedButtonGroup = () => /*#__PURE__*/_jsx(Box, {
|
|
35
|
+
bg: "greyDark",
|
|
36
|
+
p: "r",
|
|
37
|
+
children: /*#__PURE__*/_jsxs(ButtonGroupContainer, {
|
|
38
|
+
controlLabel: "View:",
|
|
39
|
+
children: [/*#__PURE__*/_jsx(ButtonGroupItem, {
|
|
40
|
+
name: "viewMode",
|
|
41
|
+
label: "Chapters",
|
|
42
|
+
value: "Chapters view"
|
|
43
|
+
}), /*#__PURE__*/_jsx(ButtonGroupItem, {
|
|
44
|
+
name: "viewMode",
|
|
45
|
+
label: "Groups",
|
|
46
|
+
value: "Groups view",
|
|
47
|
+
checked: true
|
|
48
|
+
}), /*#__PURE__*/_jsx(ButtonGroupItem, {
|
|
49
|
+
name: "viewMode",
|
|
50
|
+
label: "Constraints",
|
|
51
|
+
value: "Constraints view"
|
|
52
|
+
})]
|
|
53
|
+
})
|
|
54
|
+
});
|
|
54
55
|
invertedButtonGroup.story = {
|
|
55
56
|
name: "Inverted button group"
|
|
56
57
|
};
|
|
@@ -1,23 +1,21 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import Box from "../Box";
|
|
3
3
|
import { ButtonGroupItem } from ".";
|
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
5
|
export default {
|
|
5
6
|
title: "Components/ButtonGroupItem",
|
|
6
|
-
decorators: [
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}],
|
|
7
|
+
decorators: [storyFn => /*#__PURE__*/_jsx(Box, {
|
|
8
|
+
bg: "greyDark",
|
|
9
|
+
p: "r",
|
|
10
|
+
children: storyFn()
|
|
11
|
+
})],
|
|
12
12
|
component: ButtonGroupItem
|
|
13
13
|
};
|
|
14
|
-
export
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
});
|
|
20
|
-
};
|
|
14
|
+
export const defaultButtonGroupItem = () => /*#__PURE__*/_jsx(ButtonGroupItem, {
|
|
15
|
+
name: "viewMode",
|
|
16
|
+
label: "Chapters",
|
|
17
|
+
value: "Chapters view"
|
|
18
|
+
});
|
|
21
19
|
defaultButtonGroupItem.story = {
|
|
22
20
|
name: "Default button group item"
|
|
23
21
|
};
|
|
@@ -1,123 +1,127 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["children", "theme", "controlLabel", "labelDark"];
|
|
4
1
|
import PropTypes from "prop-types";
|
|
5
2
|
import React from "react";
|
|
6
3
|
import styled, { ThemeProvider } from "styled-components";
|
|
7
4
|
import { themeGet } from "@styled-system/theme-get";
|
|
8
5
|
import Flex from "../Flex/";
|
|
9
6
|
import { css } from "@styled-system/css";
|
|
10
|
-
|
|
7
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
8
|
+
const ButtonGroupControlLabel = styled("div").withConfig({
|
|
11
9
|
displayName: "ButtonGroup__ButtonGroupControlLabel",
|
|
12
10
|
componentId: "sc-g7627n-0"
|
|
13
|
-
})(
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
});
|
|
21
|
-
var ButtonGroupWrapper = styled("div").withConfig({
|
|
11
|
+
})(props => css({
|
|
12
|
+
color: props.labelDark ? themeGet("colors.greyDark") : themeGet("colors.white")(props),
|
|
13
|
+
fontSize: themeGet("fontSizes.1")(props),
|
|
14
|
+
fontWeight: themeGet("fontWeights.1")(props),
|
|
15
|
+
marginRight: themeGet("space.3")(props)
|
|
16
|
+
}));
|
|
17
|
+
const ButtonGroupWrapper = styled("div").withConfig({
|
|
22
18
|
displayName: "ButtonGroup__ButtonGroupWrapper",
|
|
23
19
|
componentId: "sc-g7627n-1"
|
|
24
|
-
})(
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
});
|
|
34
|
-
var ButtonGroupRadio = styled.input.attrs({
|
|
20
|
+
})(props => css({
|
|
21
|
+
display: "flex",
|
|
22
|
+
alignItems: "center",
|
|
23
|
+
background: themeGet("colors.greyDarker")(props),
|
|
24
|
+
borderRadius: themeGet("radii.2")(props),
|
|
25
|
+
padding: "4px",
|
|
26
|
+
height: themeGet("appScale.inputHeightDefault")(props)
|
|
27
|
+
}));
|
|
28
|
+
const ButtonGroupRadio = styled.input.attrs({
|
|
35
29
|
type: "radio"
|
|
36
30
|
}).withConfig({
|
|
37
31
|
displayName: "ButtonGroup__ButtonGroupRadio",
|
|
38
32
|
componentId: "sc-g7627n-2"
|
|
39
|
-
})(
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
"
|
|
54
|
-
backgroundColor: themeGet("colors.white")(props)
|
|
55
|
-
}
|
|
33
|
+
})(props => css({
|
|
34
|
+
opacity: "0",
|
|
35
|
+
position: "absolute",
|
|
36
|
+
margin: "0",
|
|
37
|
+
zIndex: "-1",
|
|
38
|
+
width: "0",
|
|
39
|
+
height: "0",
|
|
40
|
+
overflow: "hidden",
|
|
41
|
+
pointerEvents: "none",
|
|
42
|
+
"&:checked + label": {
|
|
43
|
+
cursor: "default",
|
|
44
|
+
color: themeGet("colors.greyDarker")(props),
|
|
45
|
+
backgroundColor: themeGet("colors.white")(props),
|
|
46
|
+
"&:hover": {
|
|
47
|
+
backgroundColor: themeGet("colors.white")(props)
|
|
56
48
|
}
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
|
-
|
|
49
|
+
}
|
|
50
|
+
}));
|
|
51
|
+
const ButtonGroupLabel = styled("label").withConfig({
|
|
60
52
|
displayName: "ButtonGroup__ButtonGroupLabel",
|
|
61
53
|
componentId: "sc-g7627n-3"
|
|
62
|
-
})(
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
"
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
});
|
|
82
|
-
});
|
|
54
|
+
})(props => css({
|
|
55
|
+
height: "100%",
|
|
56
|
+
borderRadius: themeGet("radii.2")(props),
|
|
57
|
+
display: "flex",
|
|
58
|
+
alignItems: "center",
|
|
59
|
+
padding: "0 ".concat(themeGet("space.3")(props)),
|
|
60
|
+
transition: themeGet("transition.transitionDefault")(props),
|
|
61
|
+
fontSize: themeGet("fontSizes.1")(props),
|
|
62
|
+
fontWeight: themeGet("fontWeights.2")(props),
|
|
63
|
+
cursor: props.checked ? "default" : "pointer",
|
|
64
|
+
color: props.checked ? themeGet("colors.greyDarker")(props) : themeGet("colors.white")(props),
|
|
65
|
+
backgroundColor: props.checked ? themeGet("colors.white")(props) : "#5e686d",
|
|
66
|
+
"&:hover": {
|
|
67
|
+
backgroundColor: props.checked ? themeGet("colors.white")(props) : themeGet("colors.primary")(props)
|
|
68
|
+
},
|
|
69
|
+
"&:not(:last-of-type)": {
|
|
70
|
+
marginRight: "4px"
|
|
71
|
+
}
|
|
72
|
+
}));
|
|
83
73
|
|
|
84
74
|
/** To do: look at renaming this to ButtonGroup, add a container component that can accept space and layout props */
|
|
85
75
|
|
|
86
|
-
export
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
76
|
+
export const ButtonGroupContainer = _ref => {
|
|
77
|
+
let {
|
|
78
|
+
children,
|
|
79
|
+
theme,
|
|
80
|
+
controlLabel,
|
|
81
|
+
labelDark,
|
|
82
|
+
...props
|
|
83
|
+
} = _ref;
|
|
84
|
+
const component = /*#__PURE__*/_jsxs(Flex, {
|
|
85
|
+
alignItems: "center",
|
|
86
|
+
...props,
|
|
87
|
+
children: [controlLabel && /*#__PURE__*/_jsx(ButtonGroupControlLabel, {
|
|
88
|
+
labelDark: labelDark,
|
|
89
|
+
children: controlLabel
|
|
90
|
+
}), /*#__PURE__*/_jsx(ButtonGroupWrapper, {
|
|
91
|
+
children: children
|
|
92
|
+
})]
|
|
93
|
+
});
|
|
94
|
+
return theme ? /*#__PURE__*/_jsx(ThemeProvider, {
|
|
95
|
+
theme: theme,
|
|
96
|
+
children: component
|
|
97
|
+
}) : component;
|
|
100
98
|
};
|
|
101
|
-
export
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
99
|
+
export const ButtonGroupItem = _ref2 => {
|
|
100
|
+
let {
|
|
101
|
+
label,
|
|
102
|
+
name,
|
|
103
|
+
value,
|
|
104
|
+
checked,
|
|
105
|
+
onChange,
|
|
106
|
+
theme
|
|
107
|
+
} = _ref2;
|
|
108
|
+
const component = /*#__PURE__*/_jsxs(_Fragment, {
|
|
109
|
+
children: [/*#__PURE__*/_jsx(ButtonGroupRadio, {
|
|
110
|
+
id: label,
|
|
111
|
+
name: name,
|
|
112
|
+
value: value,
|
|
113
|
+
checked: checked,
|
|
114
|
+
onChange: onChange
|
|
115
|
+
}), /*#__PURE__*/_jsx(ButtonGroupLabel, {
|
|
116
|
+
checked: checked,
|
|
117
|
+
htmlFor: label,
|
|
118
|
+
children: label
|
|
119
|
+
})]
|
|
120
|
+
});
|
|
121
|
+
return theme ? /*#__PURE__*/_jsx(ThemeProvider, {
|
|
122
|
+
theme: theme,
|
|
123
|
+
children: component
|
|
124
|
+
}) : component;
|
|
121
125
|
};
|
|
122
126
|
ButtonGroupContainer.propTypes = {
|
|
123
127
|
children: PropTypes.node,
|
|
@@ -7,105 +7,137 @@ import Icon from "../Icon";
|
|
|
7
7
|
import Flex from "../Flex";
|
|
8
8
|
import Button from "../Button";
|
|
9
9
|
import Card from ".";
|
|
10
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
11
|
export default {
|
|
11
12
|
title: "Components/Card",
|
|
12
|
-
decorators: [
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}],
|
|
13
|
+
decorators: [storyFn => /*#__PURE__*/_jsx(Box, {
|
|
14
|
+
bg: "greyLightest",
|
|
15
|
+
p: "r",
|
|
16
|
+
children: storyFn()
|
|
17
|
+
})],
|
|
18
18
|
component: Card
|
|
19
19
|
};
|
|
20
|
-
export
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
20
|
+
export const basicCard = () => /*#__PURE__*/_jsxs(Card, {
|
|
21
|
+
title: "Card title",
|
|
22
|
+
subtitle: "Subtitle",
|
|
23
|
+
children: [/*#__PURE__*/_jsx(P, {
|
|
24
|
+
marginBottom: 4,
|
|
25
|
+
children: "Card content lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat."
|
|
26
|
+
}), /*#__PURE__*/_jsx(StyledLink, {
|
|
27
27
|
"aria-label": "Card title - Learn More",
|
|
28
28
|
href: "#",
|
|
29
|
-
bold: true
|
|
30
|
-
|
|
31
|
-
}
|
|
29
|
+
bold: true,
|
|
30
|
+
children: "Learn more"
|
|
31
|
+
})]
|
|
32
|
+
});
|
|
32
33
|
basicCard.story = {
|
|
33
34
|
name: "Basic card"
|
|
34
35
|
};
|
|
35
|
-
export
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
36
|
+
export const alternateCard = () => /*#__PURE__*/_jsx(Card, {
|
|
37
|
+
alternate: true,
|
|
38
|
+
icon: ["fas", "building"],
|
|
39
|
+
title: "Works for",
|
|
40
|
+
subtitle: "18",
|
|
41
|
+
children: /*#__PURE__*/_jsx(P, {
|
|
42
|
+
children: "This is an alternate style card that supports an icon and moves the subtitle to the right of the title, rather than underneath it."
|
|
43
|
+
})
|
|
44
|
+
});
|
|
43
45
|
alternateCard.story = {
|
|
44
46
|
name: "Alternate card"
|
|
45
47
|
};
|
|
46
|
-
export
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}, /*#__PURE__*/React.createElement(Card, {
|
|
48
|
+
export const colouredCards = () => /*#__PURE__*/_jsxs(Spacer, {
|
|
49
|
+
my: 4,
|
|
50
|
+
children: [/*#__PURE__*/_jsx(Card, {
|
|
50
51
|
alternate: true,
|
|
51
52
|
icon: ["fas", "map-marker-alt"],
|
|
52
53
|
title: "Locations",
|
|
53
54
|
subtitle: "57",
|
|
54
|
-
colour: "primary"
|
|
55
|
-
|
|
55
|
+
colour: "primary",
|
|
56
|
+
children: /*#__PURE__*/_jsx(P, {
|
|
57
|
+
children: "This is an alternate style card that supports a coloured border, an icon and moves the subtitle to the right of the title, rather than underneath it."
|
|
58
|
+
})
|
|
59
|
+
}), /*#__PURE__*/_jsx(Card, {
|
|
56
60
|
alternate: true,
|
|
57
61
|
icon: ["fas", "address-card"],
|
|
58
62
|
title: "Roles",
|
|
59
63
|
subtitle: "Here is a subtitle",
|
|
60
|
-
colour: "success"
|
|
61
|
-
|
|
64
|
+
colour: "success",
|
|
65
|
+
children: /*#__PURE__*/_jsx(P, {
|
|
66
|
+
children: "This is an alternate style card that supports a coloured border, an icon and moves the subtitle to the right of the title, rather than underneath it."
|
|
67
|
+
})
|
|
68
|
+
}), /*#__PURE__*/_jsx(Card, {
|
|
62
69
|
alternate: true,
|
|
63
70
|
icon: ["fas", "user"],
|
|
64
71
|
title: "4,539 People",
|
|
65
72
|
changeValue: "No change",
|
|
66
|
-
colour: "warning"
|
|
67
|
-
|
|
73
|
+
colour: "warning",
|
|
74
|
+
children: /*#__PURE__*/_jsx(P, {
|
|
75
|
+
children: "This is an alternate style card that supports a coloured border, an icon and shows a delta change."
|
|
76
|
+
})
|
|
77
|
+
}), /*#__PURE__*/_jsx(Card, {
|
|
68
78
|
alternate: true,
|
|
69
79
|
icon: ["fas", "chart-pie"],
|
|
70
80
|
title: "12 Divisions",
|
|
71
81
|
changeValue: "2 (-1%)",
|
|
72
82
|
changeIcon: "arrowDown",
|
|
73
|
-
colour: "danger"
|
|
74
|
-
|
|
83
|
+
colour: "danger",
|
|
84
|
+
children: /*#__PURE__*/_jsx(P, {
|
|
85
|
+
children: "This is an alternate style card that supports a coloured border, an icon and shows a delta change."
|
|
86
|
+
})
|
|
87
|
+
}), /*#__PURE__*/_jsx(Card, {
|
|
75
88
|
alternate: true,
|
|
76
89
|
icon: ["fas", "users"],
|
|
77
90
|
title: "289 Teams",
|
|
78
91
|
changeValue: "9 (+2%)",
|
|
79
92
|
changeIcon: "arrowUp",
|
|
80
|
-
colour: "greyDark"
|
|
81
|
-
|
|
82
|
-
|
|
93
|
+
colour: "greyDark",
|
|
94
|
+
children: /*#__PURE__*/_jsx(P, {
|
|
95
|
+
children: "This is an alternate style card that supports a coloured border, an icon and shows a delta change."
|
|
96
|
+
})
|
|
97
|
+
})]
|
|
98
|
+
});
|
|
83
99
|
colouredCards.story = {
|
|
84
100
|
name: "Coloured cards"
|
|
85
101
|
};
|
|
86
|
-
export
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
102
|
+
export const complexCard = () => /*#__PURE__*/_jsx(Flex, {
|
|
103
|
+
justifyContent: "center",
|
|
104
|
+
children: /*#__PURE__*/_jsxs(Spacer, {
|
|
105
|
+
mx: "r",
|
|
106
|
+
children: [/*#__PURE__*/_jsx(Card, {
|
|
107
|
+
center: true,
|
|
108
|
+
children: /*#__PURE__*/_jsxs(Spacer, {
|
|
109
|
+
my: "s",
|
|
110
|
+
children: [/*#__PURE__*/_jsx(Icon, {
|
|
111
|
+
icon: ["fas", "file"],
|
|
112
|
+
size: "3x",
|
|
113
|
+
color: "greyLight"
|
|
114
|
+
}), /*#__PURE__*/_jsx(H3, {
|
|
115
|
+
children: "Create new"
|
|
116
|
+
}), /*#__PURE__*/_jsx(P, {
|
|
117
|
+
children: "Start with a blank slate and add your own data"
|
|
118
|
+
}), /*#__PURE__*/_jsx(Button, {
|
|
119
|
+
children: "Start fresh"
|
|
120
|
+
})]
|
|
121
|
+
})
|
|
122
|
+
}), /*#__PURE__*/_jsx(Card, {
|
|
123
|
+
center: true,
|
|
124
|
+
children: /*#__PURE__*/_jsxs(Spacer, {
|
|
125
|
+
my: "s",
|
|
126
|
+
children: [/*#__PURE__*/_jsx(Icon, {
|
|
127
|
+
icon: ["fas", "eye"],
|
|
128
|
+
size: "3x",
|
|
129
|
+
color: "greyLight"
|
|
130
|
+
}), /*#__PURE__*/_jsx(H3, {
|
|
131
|
+
children: "Explore app"
|
|
132
|
+
}), /*#__PURE__*/_jsx(P, {
|
|
133
|
+
children: "Look at pre-populated data to see app in action"
|
|
134
|
+
}), /*#__PURE__*/_jsx(Button, {
|
|
135
|
+
children: "View example"
|
|
136
|
+
})]
|
|
137
|
+
})
|
|
138
|
+
})]
|
|
139
|
+
})
|
|
140
|
+
});
|
|
109
141
|
complexCard.story = {
|
|
110
142
|
name: "Complex card"
|
|
111
143
|
};
|