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,67 +1,27 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["inverted", "id", "small", "theme", "label", "checked", "disabled", "srHide"];
|
|
4
1
|
import React from "react";
|
|
5
2
|
import PropTypes from "prop-types";
|
|
6
3
|
import styled, { css, ThemeProvider } from "styled-components";
|
|
7
4
|
import { space, layout } from "styled-system";
|
|
8
5
|
import { themeGet } from "@styled-system/theme-get";
|
|
9
|
-
|
|
6
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
|
+
const Group = styled.div.withConfig({
|
|
10
8
|
displayName: "Toggle__Group",
|
|
11
9
|
componentId: "sc-f6l22k-0"
|
|
12
|
-
})(["", " ", " display:flex;align-items:center;", ";"], space, layout,
|
|
13
|
-
|
|
14
|
-
});
|
|
15
|
-
var Input = styled.input.attrs({
|
|
10
|
+
})(["", " ", " display:flex;align-items:center;", ";"], space, layout, props => props.inverted ? css(["input{&:focus{+ label{box-shadow:", ";}}}label{&:first-of-type{background:", ";}}"], themeGet("shadows.thickOutline")(props) + " " + themeGet("colors.black")(props), themeGet("colors.greyDark")(props)) : css([""]));
|
|
11
|
+
const Input = styled.input.attrs({
|
|
16
12
|
type: "checkbox"
|
|
17
13
|
}).withConfig({
|
|
18
14
|
displayName: "Toggle__Input",
|
|
19
15
|
componentId: "sc-f6l22k-1"
|
|
20
|
-
})(["opacity:0;position:absolute;visibility:", ";margin:0;z-index:-1;width:0;height:0;pointer-events:none;&:focus{+ label{box-shadow:", ";}}:checked{+ label{background:", ";&:after{left:calc(100% - 3px);transform:translateX(-100%);}}&:focus{+ label{box-shadow:", ";}}}"],
|
|
21
|
-
|
|
22
|
-
}, function (props) {
|
|
23
|
-
return themeGet("shadows.thickOutline")(props) + " " + themeGet("colors.black20")(props);
|
|
24
|
-
}, function (props) {
|
|
25
|
-
return themeGet("colors.success")(props);
|
|
26
|
-
}, function (props) {
|
|
27
|
-
return themeGet("shadows.thinOutline")(props) + " " + themeGet("colors.success30")(props);
|
|
28
|
-
});
|
|
29
|
-
var Item = styled.label.withConfig({
|
|
16
|
+
})(["opacity:0;position:absolute;visibility:", ";margin:0;z-index:-1;width:0;height:0;pointer-events:none;&:focus{+ label{box-shadow:", ";}}:checked{+ label{background:", ";&:after{left:calc(100% - 3px);transform:translateX(-100%);}}&:focus{+ label{box-shadow:", ";}}}"], props => props.srHide ? "hidden" : "visible", props => themeGet("shadows.thickOutline")(props) + " " + themeGet("colors.black20")(props), props => themeGet("colors.success")(props), props => themeGet("shadows.thinOutline")(props) + " " + themeGet("colors.success30")(props));
|
|
17
|
+
const Item = styled.label.withConfig({
|
|
30
18
|
displayName: "Toggle__Item",
|
|
31
19
|
componentId: "sc-f6l22k-2"
|
|
32
|
-
})(["cursor:pointer;flex:0 0 auto;margin:0;display:block;position:relative;transition:", ";background:", ";width:", ";height:", ";border-radius:", ";&:after{content:\"\";position:absolute;top:3px;left:3px;background:", ";transition:", ";width:", ";height:", ";border-radius:", ";}:active{&:after{width:", ";}}", ";"],
|
|
33
|
-
|
|
34
|
-
}, function (props) {
|
|
35
|
-
return themeGet("colors.greyDarker")(props);
|
|
36
|
-
}, function (props) {
|
|
37
|
-
return props.small ? "36px" : "44px";
|
|
38
|
-
}, function (props) {
|
|
39
|
-
return props.small ? "20px" : "24px";
|
|
40
|
-
}, function (props) {
|
|
41
|
-
return props.small ? "10px" : "12px";
|
|
42
|
-
}, function (props) {
|
|
43
|
-
return themeGet("colors.white")(props);
|
|
44
|
-
}, function (props) {
|
|
45
|
-
return themeGet("transition.transitionDefault")(props);
|
|
46
|
-
}, function (props) {
|
|
47
|
-
return props.small ? "14px" : "18px";
|
|
48
|
-
}, function (props) {
|
|
49
|
-
return props.small ? "14px" : "18px";
|
|
50
|
-
}, function (props) {
|
|
51
|
-
return props.small ? "7px" : "9px";
|
|
52
|
-
}, function (props) {
|
|
53
|
-
return props.small ? "20px" : "24px";
|
|
54
|
-
}, function (props) {
|
|
55
|
-
return props.disabled ? css(["opacity:0.5;"]) : css([""]);
|
|
56
|
-
});
|
|
57
|
-
var Label = styled.label.withConfig({
|
|
20
|
+
})(["cursor:pointer;flex:0 0 auto;margin:0;display:block;position:relative;transition:", ";background:", ";width:", ";height:", ";border-radius:", ";&:after{content:\"\";position:absolute;top:3px;left:3px;background:", ";transition:", ";width:", ";height:", ";border-radius:", ";}:active{&:after{width:", ";}}", ";"], props => themeGet("transition.transitionDefault")(props), props => themeGet("colors.greyDarker")(props), props => props.small ? "36px" : "44px", props => props.small ? "20px" : "24px", props => props.small ? "10px" : "12px", props => themeGet("colors.white")(props), props => themeGet("transition.transitionDefault")(props), props => props.small ? "14px" : "18px", props => props.small ? "14px" : "18px", props => props.small ? "7px" : "9px", props => props.small ? "20px" : "24px", props => props.disabled ? css(["opacity:0.5;"]) : css([""]));
|
|
21
|
+
const Label = styled.label.withConfig({
|
|
58
22
|
displayName: "Toggle__Label",
|
|
59
23
|
componentId: "sc-f6l22k-3"
|
|
60
|
-
})(["margin:0;padding-left:8px;cursor:pointer;font-size:", ";color:", ";"],
|
|
61
|
-
return props.small ? themeGet("fontSizes.1")(props) : themeGet("fontSizes.2")(props);
|
|
62
|
-
}, function (props) {
|
|
63
|
-
return props.disabled ? themeGet("colors.grey")(props) : props.inverted ? themeGet("colors.white")(props) : themeGet("colors.greyDarkest")(props);
|
|
64
|
-
});
|
|
24
|
+
})(["margin:0;padding-left:8px;cursor:pointer;font-size:", ";color:", ";"], props => props.small ? themeGet("fontSizes.1")(props) : themeGet("fontSizes.2")(props), props => props.disabled ? themeGet("colors.grey")(props) : props.inverted ? themeGet("colors.white")(props) : themeGet("colors.greyDarkest")(props));
|
|
65
25
|
|
|
66
26
|
/**
|
|
67
27
|
* `Toggle` should be used for when functionality is required to turn something off/on, hide/show or disable/enable. Default is off (left/grey), this works like a checkbox, so clicking or applying a checked attribute with javascript will turn it on (right/green).
|
|
@@ -70,35 +30,41 @@ var Label = styled.label.withConfig({
|
|
|
70
30
|
*/
|
|
71
31
|
|
|
72
32
|
export default function Toggle(_ref) {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
id: id,
|
|
86
|
-
checked: checked,
|
|
87
|
-
disabled: disabled,
|
|
88
|
-
srHide: srHide
|
|
89
|
-
}, props)), /*#__PURE__*/React.createElement(Item, {
|
|
90
|
-
htmlFor: id,
|
|
91
|
-
small: small,
|
|
92
|
-
disabled: disabled
|
|
93
|
-
}), /*#__PURE__*/React.createElement(Label, {
|
|
33
|
+
let {
|
|
34
|
+
inverted,
|
|
35
|
+
id,
|
|
36
|
+
small,
|
|
37
|
+
theme,
|
|
38
|
+
label,
|
|
39
|
+
checked,
|
|
40
|
+
disabled,
|
|
41
|
+
srHide,
|
|
42
|
+
...props
|
|
43
|
+
} = _ref;
|
|
44
|
+
const component = /*#__PURE__*/_jsxs(Group, {
|
|
94
45
|
inverted: inverted,
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
46
|
+
children: [/*#__PURE__*/_jsx(Input, {
|
|
47
|
+
id: id,
|
|
48
|
+
checked: checked,
|
|
49
|
+
disabled: disabled,
|
|
50
|
+
srHide: srHide,
|
|
51
|
+
...props
|
|
52
|
+
}), /*#__PURE__*/_jsx(Item, {
|
|
53
|
+
htmlFor: id,
|
|
54
|
+
small: small,
|
|
55
|
+
disabled: disabled
|
|
56
|
+
}), /*#__PURE__*/_jsx(Label, {
|
|
57
|
+
inverted: inverted,
|
|
58
|
+
disabled: disabled,
|
|
59
|
+
htmlFor: id,
|
|
60
|
+
small: small,
|
|
61
|
+
children: label
|
|
62
|
+
})]
|
|
63
|
+
});
|
|
64
|
+
return theme ? /*#__PURE__*/_jsx(ThemeProvider, {
|
|
65
|
+
theme: theme,
|
|
66
|
+
children: component
|
|
67
|
+
}) : component;
|
|
102
68
|
}
|
|
103
69
|
Toggle.propTypes = {
|
|
104
70
|
/** Must be used to specify a unique ID. */
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import TreeNav from ".";
|
|
3
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
4
|
export default {
|
|
4
5
|
title: "Components/TreeNav",
|
|
5
6
|
component: TreeNav
|
|
6
7
|
};
|
|
7
|
-
|
|
8
|
+
const data = [{
|
|
8
9
|
id: "1",
|
|
9
10
|
name: "Domains",
|
|
10
11
|
badgeText: "Domains",
|
|
@@ -345,13 +346,11 @@ var data = [{
|
|
|
345
346
|
badgeText: "Contractor",
|
|
346
347
|
badgeColour: "primary"
|
|
347
348
|
}];
|
|
348
|
-
export
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
});
|
|
354
|
-
};
|
|
349
|
+
export const defaultTreeNav = () => /*#__PURE__*/_jsx(TreeNav, {
|
|
350
|
+
data: data,
|
|
351
|
+
openByDefault: false,
|
|
352
|
+
width: 400
|
|
353
|
+
});
|
|
355
354
|
defaultTreeNav.storyName = "Default tree navigation";
|
|
356
355
|
defaultTreeNav.__docgenInfo = {
|
|
357
356
|
"description": "",
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["data"];
|
|
4
1
|
/* eslint-disable */
|
|
5
2
|
import React from "react";
|
|
6
3
|
import styled from "styled-components";
|
|
@@ -12,84 +9,90 @@ import Badge from "../Badge";
|
|
|
12
9
|
import Checkbox from "../Checkbox";
|
|
13
10
|
import { Small } from "../Typography";
|
|
14
11
|
import { Tree } from "react-arborist";
|
|
15
|
-
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
const TreeItemWrapper = styled("button").withConfig({
|
|
16
14
|
displayName: "TreeNav__TreeItemWrapper",
|
|
17
15
|
componentId: "sc-13iwmeo-0"
|
|
18
|
-
})(
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
"
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
16
|
+
})(props => css({
|
|
17
|
+
appearance: "none",
|
|
18
|
+
border: "none",
|
|
19
|
+
fontFamily: "inherit",
|
|
20
|
+
background: "none",
|
|
21
|
+
padding: "5px",
|
|
22
|
+
width: "100%",
|
|
23
|
+
display: "flex",
|
|
24
|
+
justifyContent: "space-between",
|
|
25
|
+
alignItems: "center",
|
|
26
|
+
marginRight: "5px",
|
|
27
|
+
cursor: "pointer",
|
|
28
|
+
borderRadius: themeGet("radii.2")(props),
|
|
29
|
+
transition: themeGet("transition.transitionDefault")(props),
|
|
30
|
+
"&:hover, &:focus": {
|
|
31
|
+
outline: "none",
|
|
32
|
+
backgroundColor: themeGet("colors.primary10")(props)
|
|
33
|
+
}
|
|
34
|
+
}));
|
|
35
|
+
const Node = _ref => {
|
|
36
|
+
let {
|
|
37
|
+
node,
|
|
38
|
+
style
|
|
39
|
+
} = _ref;
|
|
42
40
|
/* This node instance can do many things. See the API reference. */
|
|
43
|
-
return /*#__PURE__*/
|
|
41
|
+
return /*#__PURE__*/_jsxs(TreeItemWrapper, {
|
|
44
42
|
style: style,
|
|
45
43
|
className: "treeitem-wrapper",
|
|
46
|
-
onClick:
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
44
|
+
onClick: () => node.toggle(),
|
|
45
|
+
children: [node.isLeaf ? /*#__PURE__*/_jsx(Icon, {
|
|
46
|
+
icon: ["fas", "chevron-down"],
|
|
47
|
+
title: "Select item",
|
|
48
|
+
mr: "xs",
|
|
49
|
+
ml: "s",
|
|
50
|
+
size: "sm",
|
|
51
|
+
rotation: 270,
|
|
52
|
+
color: "transparent"
|
|
53
|
+
}) : node.isOpen ? /*#__PURE__*/_jsx(Icon, {
|
|
54
|
+
icon: ["fas", "chevron-down"],
|
|
55
|
+
title: "Collapse item",
|
|
56
|
+
transform: "up-1",
|
|
57
|
+
mr: "xs",
|
|
58
|
+
ml: "s",
|
|
59
|
+
size: "sm"
|
|
60
|
+
}) : /*#__PURE__*/_jsx(Icon, {
|
|
61
|
+
icon: ["fas", "chevron-down"],
|
|
62
|
+
title: "Expand item",
|
|
63
|
+
transform: "up-1",
|
|
64
|
+
mr: "xs",
|
|
65
|
+
ml: "s",
|
|
66
|
+
size: "sm",
|
|
67
|
+
rotation: 270
|
|
68
|
+
}), node.data.checkbox && /*#__PURE__*/_jsx(Checkbox, {
|
|
69
|
+
onChange: node.data.checkboxOnChange
|
|
70
|
+
}), /*#__PURE__*/_jsx(Small, {
|
|
71
|
+
children: node.data.name
|
|
72
|
+
}), node.data.badgeText && /*#__PURE__*/_jsx(Badge, {
|
|
73
|
+
variant: node.data.badgeColour,
|
|
74
|
+
ml: "auto",
|
|
75
|
+
children: node.data.badgeText
|
|
76
|
+
})]
|
|
77
|
+
});
|
|
78
78
|
};
|
|
79
79
|
Node.propTypes = {
|
|
80
80
|
isLeaf: PropTypes.bool,
|
|
81
81
|
data: PropTypes.array
|
|
82
82
|
};
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
83
|
+
const TreeNav = _ref2 => {
|
|
84
|
+
let {
|
|
85
|
+
data,
|
|
86
|
+
...props
|
|
87
|
+
} = _ref2;
|
|
88
|
+
return /*#__PURE__*/_jsx(Tree, {
|
|
89
|
+
initialData: data,
|
|
90
|
+
...props,
|
|
89
91
|
overscanCount: 5,
|
|
90
92
|
rowHeight: 32,
|
|
91
|
-
indent: 14
|
|
92
|
-
|
|
93
|
+
indent: 14,
|
|
94
|
+
children: Node
|
|
95
|
+
});
|
|
93
96
|
};
|
|
94
97
|
TreeNav.propTypes = {
|
|
95
98
|
data: PropTypes.array
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { H1, H2, H3, H4, H5, H6, P, Text, Quote, Small, Code } from ".";
|
|
3
|
+
import Box from "../Box";
|
|
4
|
+
import Spacer from "../Spacer";
|
|
5
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
|
+
export default {
|
|
7
|
+
title: "System/Typography"
|
|
8
|
+
};
|
|
9
|
+
export const HeadingsH1ToH6 = {
|
|
10
|
+
render: () => /*#__PURE__*/_jsxs(Spacer, {
|
|
11
|
+
my: 4,
|
|
12
|
+
children: [/*#__PURE__*/_jsxs(Box, {
|
|
13
|
+
children: [/*#__PURE__*/_jsx(H1, {
|
|
14
|
+
children: "Standard H1"
|
|
15
|
+
}), /*#__PURE__*/_jsx(H1, {
|
|
16
|
+
weight: "light",
|
|
17
|
+
children: "Light version"
|
|
18
|
+
}), /*#__PURE__*/_jsx(H1, {
|
|
19
|
+
weight: "bold",
|
|
20
|
+
children: "Bold version"
|
|
21
|
+
})]
|
|
22
|
+
}), /*#__PURE__*/_jsxs(Box, {
|
|
23
|
+
children: [/*#__PURE__*/_jsx(H2, {
|
|
24
|
+
children: "Standard H2"
|
|
25
|
+
}), /*#__PURE__*/_jsx(H2, {
|
|
26
|
+
weight: "light",
|
|
27
|
+
children: "Light version"
|
|
28
|
+
}), /*#__PURE__*/_jsx(H2, {
|
|
29
|
+
weight: "bold",
|
|
30
|
+
children: "Bold version"
|
|
31
|
+
})]
|
|
32
|
+
}), /*#__PURE__*/_jsxs(Box, {
|
|
33
|
+
children: [/*#__PURE__*/_jsx(H3, {
|
|
34
|
+
children: "Standard H3"
|
|
35
|
+
}), /*#__PURE__*/_jsx(H3, {
|
|
36
|
+
weight: "light",
|
|
37
|
+
children: "Light version"
|
|
38
|
+
}), /*#__PURE__*/_jsx(H3, {
|
|
39
|
+
weight: "bold",
|
|
40
|
+
children: "Bold version"
|
|
41
|
+
})]
|
|
42
|
+
}), /*#__PURE__*/_jsxs(Box, {
|
|
43
|
+
children: [/*#__PURE__*/_jsx(H4, {
|
|
44
|
+
children: "Standard H4"
|
|
45
|
+
}), /*#__PURE__*/_jsx(H4, {
|
|
46
|
+
weight: "light",
|
|
47
|
+
children: "Light version"
|
|
48
|
+
}), /*#__PURE__*/_jsx(H4, {
|
|
49
|
+
weight: "bold",
|
|
50
|
+
children: "Bold version"
|
|
51
|
+
})]
|
|
52
|
+
}), /*#__PURE__*/_jsxs(Box, {
|
|
53
|
+
children: [/*#__PURE__*/_jsx(H5, {
|
|
54
|
+
children: "Standard H5"
|
|
55
|
+
}), /*#__PURE__*/_jsx(H5, {
|
|
56
|
+
weight: "light",
|
|
57
|
+
children: "Light version"
|
|
58
|
+
}), /*#__PURE__*/_jsx(H5, {
|
|
59
|
+
weight: "bold",
|
|
60
|
+
children: "Bold version"
|
|
61
|
+
})]
|
|
62
|
+
}), /*#__PURE__*/_jsxs(Box, {
|
|
63
|
+
children: [/*#__PURE__*/_jsx(H6, {
|
|
64
|
+
children: "Standard H6"
|
|
65
|
+
}), /*#__PURE__*/_jsx(H6, {
|
|
66
|
+
weight: "light",
|
|
67
|
+
children: "Light version"
|
|
68
|
+
}), /*#__PURE__*/_jsx(H6, {
|
|
69
|
+
weight: "bold",
|
|
70
|
+
children: "Bold version"
|
|
71
|
+
})]
|
|
72
|
+
})]
|
|
73
|
+
}),
|
|
74
|
+
name: "Headings/H1 to H6"
|
|
75
|
+
};
|
|
76
|
+
export const BodyTextParagraph = {
|
|
77
|
+
render: () => /*#__PURE__*/_jsxs(Spacer, {
|
|
78
|
+
my: 3,
|
|
79
|
+
children: [/*#__PURE__*/_jsx(P, {
|
|
80
|
+
children: "Regular paragraph text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed aliquet at elit sit amet iaculis. Cras eget sapien et ligula mollis placerat non venenatis dolor. Fusce id mi risus. Ut sit amet diam in dui maximus sagittis a at dolor. Cras volutpat est nec arcu interdum pulvinar in vitae erat."
|
|
81
|
+
}), /*#__PURE__*/_jsx(P, {
|
|
82
|
+
textAlign: "center",
|
|
83
|
+
children: "Centered paragraph text."
|
|
84
|
+
}), /*#__PURE__*/_jsx(P, {
|
|
85
|
+
textAlign: "right",
|
|
86
|
+
children: "Right-aligned paragraph text."
|
|
87
|
+
}), /*#__PURE__*/_jsx(P, {
|
|
88
|
+
weight: "light",
|
|
89
|
+
children: "Light paragraph text"
|
|
90
|
+
}), /*#__PURE__*/_jsx(P, {
|
|
91
|
+
sizing: "small",
|
|
92
|
+
children: "Small paragraph text"
|
|
93
|
+
})]
|
|
94
|
+
}),
|
|
95
|
+
name: "Body text/Paragraph"
|
|
96
|
+
};
|
|
97
|
+
export const BodyTextText = {
|
|
98
|
+
render: () => /*#__PURE__*/_jsx(Text, {
|
|
99
|
+
children: "Hello world"
|
|
100
|
+
}),
|
|
101
|
+
name: "Body text/Text"
|
|
102
|
+
};
|
|
103
|
+
export const StylingSizing = {
|
|
104
|
+
render: () => /*#__PURE__*/_jsxs(Spacer, {
|
|
105
|
+
my: 3,
|
|
106
|
+
children: [/*#__PURE__*/_jsx(H5, {
|
|
107
|
+
sizing: "small",
|
|
108
|
+
children: "Small variant of H5"
|
|
109
|
+
}), /*#__PURE__*/_jsx(H5, {
|
|
110
|
+
sizing: "large",
|
|
111
|
+
children: "Large variant of H5"
|
|
112
|
+
}), /*#__PURE__*/_jsx(H5, {
|
|
113
|
+
fontSize: 2,
|
|
114
|
+
children: "Even smaller H5, scaled down two steps in the fontSize array"
|
|
115
|
+
}), /*#__PURE__*/_jsx(P, {
|
|
116
|
+
fontSize: "10px",
|
|
117
|
+
children: "Very small text using a specific fontSize value"
|
|
118
|
+
}), /*#__PURE__*/_jsx(Small, {
|
|
119
|
+
children: "Small text using the Small component"
|
|
120
|
+
})]
|
|
121
|
+
}),
|
|
122
|
+
name: "Styling/Sizing"
|
|
123
|
+
};
|
|
124
|
+
export const StylingEmphasis = {
|
|
125
|
+
render: () => /*#__PURE__*/_jsxs(Spacer, {
|
|
126
|
+
my: 3,
|
|
127
|
+
children: [/*#__PURE__*/_jsx(P, {
|
|
128
|
+
weight: "bold",
|
|
129
|
+
children: "Bold paragraph text lorem ipsum dolor sit amet"
|
|
130
|
+
}), /*#__PURE__*/_jsxs(P, {
|
|
131
|
+
children: ["Only ", /*#__PURE__*/_jsx("strong", {
|
|
132
|
+
children: "partially bolded"
|
|
133
|
+
}), " paragraph"]
|
|
134
|
+
})]
|
|
135
|
+
}),
|
|
136
|
+
name: "Styling/Emphasis"
|
|
137
|
+
};
|
|
138
|
+
export const StylingColours = {
|
|
139
|
+
render: () => /*#__PURE__*/_jsxs(Spacer, {
|
|
140
|
+
my: 2,
|
|
141
|
+
children: [/*#__PURE__*/_jsx(P, {
|
|
142
|
+
color: "greyDark",
|
|
143
|
+
children: "Grey-coloured text"
|
|
144
|
+
}), /*#__PURE__*/_jsx(P, {
|
|
145
|
+
color: "success",
|
|
146
|
+
children: "Success-coloured text"
|
|
147
|
+
}), /*#__PURE__*/_jsx(P, {
|
|
148
|
+
color: "danger",
|
|
149
|
+
children: "Danger-coloured text"
|
|
150
|
+
}), /*#__PURE__*/_jsx(Box, {
|
|
151
|
+
bg: "greyDarker",
|
|
152
|
+
p: "r",
|
|
153
|
+
children: /*#__PURE__*/_jsx(P, {
|
|
154
|
+
color: "white",
|
|
155
|
+
children: "White text for dark backgrounds"
|
|
156
|
+
})
|
|
157
|
+
})]
|
|
158
|
+
}),
|
|
159
|
+
name: "Styling/Colours"
|
|
160
|
+
};
|
|
161
|
+
export const MiscellaneousBlockquote = {
|
|
162
|
+
render: () => /*#__PURE__*/_jsxs(Quote, {
|
|
163
|
+
children: ["\"Used to display block quotes lorem ipsum dolor sit amet\"", /*#__PURE__*/_jsx("em", {
|
|
164
|
+
children: " - Adam, 2018"
|
|
165
|
+
})]
|
|
166
|
+
}),
|
|
167
|
+
name: "Miscellaneous/Blockquote"
|
|
168
|
+
};
|
|
169
|
+
export const MiscellaneousCode = {
|
|
170
|
+
render: () => /*#__PURE__*/_jsx(Code, {
|
|
171
|
+
children: "<html> <head> <body> Hello I am a code block </body> </head> </html>"
|
|
172
|
+
}),
|
|
173
|
+
name: "Miscellaneous/Code"
|
|
174
|
+
};
|