orcs-design-system 3.1.11 → 3.1.13
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/components/Avatar/Avatar.stories.js +26 -17
- package/es/components/Avatar/index.js +2 -2
- package/es/components/Badge/index.js +1 -1
- package/es/components/Button/index.js +1 -1
- package/es/components/Card/index.js +9 -6
- package/es/components/Loading/index.js +1 -1
- package/es/components/Modal/Modal.stories.js +46 -5
- package/es/components/Modal/index.js +95 -8
- package/es/components/Notification/Notification.stories.js +8 -20
- package/es/components/Notification/index.js +22 -25
- package/es/components/Select/index.js +17 -0
- package/es/components/SideNav/index.js +2 -2
- package/es/components/StatusDot/index.js +12 -23
- package/es/components/StyledLink/StyledLink.stories.js +1 -1
- package/es/components/Tabs/index.js +1 -1
- package/es/components/Tag/Tag.stories.js +2 -4
- package/es/components/Tag/index.js +39 -25
- package/es/components/TextInput/index.js +1 -1
- package/es/components/Toggle/index.js +2 -2
- package/es/components/Typography/index.js +1 -1
- package/es/systemThemeCollapsed.js +31 -29
- package/es/systemtheme.js +32 -30
- package/package.json +1 -1
|
@@ -2,7 +2,6 @@ import React from "react";
|
|
|
2
2
|
import Notification from ".";
|
|
3
3
|
import Spacer from "../Spacer";
|
|
4
4
|
import Box from "../Box";
|
|
5
|
-
import { themeGet } from "@styled-system/theme-get";
|
|
6
5
|
export default {
|
|
7
6
|
title: "Components/Notification",
|
|
8
7
|
component: Notification,
|
|
@@ -34,17 +33,6 @@ export var colourNotification = function colourNotification() {
|
|
|
34
33
|
}, "Red error notification e.g. Update failed! Please try again."));
|
|
35
34
|
};
|
|
36
35
|
colourNotification.storyName = "Alternate Colours";
|
|
37
|
-
export var iconNotification = function iconNotification() {
|
|
38
|
-
return /*#__PURE__*/React.createElement(Notification, {
|
|
39
|
-
colour: "warning",
|
|
40
|
-
icon: ["fas", "sync"],
|
|
41
|
-
iconProps: {
|
|
42
|
-
spin: true,
|
|
43
|
-
color: themeGet("colors.primary")
|
|
44
|
-
}
|
|
45
|
-
}, "Notification with icon and iconProps specified");
|
|
46
|
-
};
|
|
47
|
-
iconNotification.storyName = "With Icon";
|
|
48
36
|
export var textOnlyNotification = function textOnlyNotification() {
|
|
49
37
|
return /*#__PURE__*/React.createElement(Notification, null, "Text-only notification");
|
|
50
38
|
};
|
|
@@ -59,12 +47,17 @@ export var loadingNotification = function loadingNotification() {
|
|
|
59
47
|
return /*#__PURE__*/React.createElement(Spacer, {
|
|
60
48
|
m: "r"
|
|
61
49
|
}, /*#__PURE__*/React.createElement(Notification, {
|
|
50
|
+
loading: true
|
|
51
|
+
}, "In progress notification E.g. Importing data..."), /*#__PURE__*/React.createElement(Notification, {
|
|
62
52
|
loading: true,
|
|
63
|
-
|
|
64
|
-
}, "In progress notification
|
|
53
|
+
colour: "success"
|
|
54
|
+
}, "In progress notification E.g. Importing data..."), /*#__PURE__*/React.createElement(Notification, {
|
|
65
55
|
loading: true,
|
|
66
56
|
colour: "warning"
|
|
67
|
-
}, "In progress notification
|
|
57
|
+
}, "In progress notification E.g. Importing data..."), /*#__PURE__*/React.createElement(Notification, {
|
|
58
|
+
loading: true,
|
|
59
|
+
colour: "danger"
|
|
60
|
+
}, "In progress notification E.g. Importing data..."));
|
|
68
61
|
};
|
|
69
62
|
loadingNotification.storyName = "Loading";
|
|
70
63
|
export var floatingNotification = function floatingNotification() {
|
|
@@ -94,11 +87,6 @@ colourNotification.__docgenInfo = {
|
|
|
94
87
|
"methods": [],
|
|
95
88
|
"displayName": "colourNotification"
|
|
96
89
|
};
|
|
97
|
-
iconNotification.__docgenInfo = {
|
|
98
|
-
"description": "",
|
|
99
|
-
"methods": [],
|
|
100
|
-
"displayName": "iconNotification"
|
|
101
|
-
};
|
|
102
90
|
textOnlyNotification.__docgenInfo = {
|
|
103
91
|
"description": "",
|
|
104
92
|
"methods": [],
|
|
@@ -6,6 +6,7 @@ import React, { useState } from "react";
|
|
|
6
6
|
import PropTypes from "prop-types";
|
|
7
7
|
import styled, { ThemeProvider } from "styled-components";
|
|
8
8
|
import Icon from "../Icon";
|
|
9
|
+
import Loading from "../Loading";
|
|
9
10
|
import { css } from "@styled-system/css";
|
|
10
11
|
import shouldForwardProp from "@styled-system/should-forward-prop";
|
|
11
12
|
import { space, layout, position, variant, compose } from "styled-system";
|
|
@@ -54,7 +55,8 @@ var NotificationWrapper = styled("div").withConfig({
|
|
|
54
55
|
bg: themeGet("colors.dangerDark")(props)
|
|
55
56
|
},
|
|
56
57
|
warning: {
|
|
57
|
-
bg: themeGet("colors.
|
|
58
|
+
bg: themeGet("colors.warningLight")(props),
|
|
59
|
+
color: themeGet("colors.black70")(props)
|
|
58
60
|
},
|
|
59
61
|
"default": {}
|
|
60
62
|
}
|
|
@@ -68,7 +70,8 @@ var NotificationWrapper = styled("div").withConfig({
|
|
|
68
70
|
bg: themeGet("colors.dangerDark")
|
|
69
71
|
},
|
|
70
72
|
warning: {
|
|
71
|
-
bg: themeGet("colors.
|
|
73
|
+
bg: themeGet("colors.warningLight"),
|
|
74
|
+
color: themeGet("colors.black70")
|
|
72
75
|
},
|
|
73
76
|
"default": {
|
|
74
77
|
bg: themeGet("colors.primaryDark")
|
|
@@ -84,18 +87,20 @@ var NotificationContent = styled("p").withConfig({
|
|
|
84
87
|
pr: props.closable === false ? "0" : "s"
|
|
85
88
|
});
|
|
86
89
|
});
|
|
87
|
-
var
|
|
88
|
-
displayName: "
|
|
90
|
+
var CloseButton = styled("button").withConfig({
|
|
91
|
+
displayName: "Notification__CloseButton",
|
|
89
92
|
componentId: "sc-1p26rkq-2"
|
|
90
93
|
})(function (props) {
|
|
91
94
|
return css({
|
|
92
95
|
appearance: "none",
|
|
93
96
|
bg: "transparent",
|
|
94
97
|
p: "0",
|
|
98
|
+
paddingLeft: "1",
|
|
99
|
+
paddingRight: "1",
|
|
95
100
|
border: "none",
|
|
96
101
|
ml: "auto",
|
|
97
102
|
cursor: "pointer",
|
|
98
|
-
opacity: "0.
|
|
103
|
+
opacity: "0.7",
|
|
99
104
|
transition: themeGet("transition.transitionDefault")(props),
|
|
100
105
|
color: themeGet("colors.white")(props),
|
|
101
106
|
"&:hover, &:focus": {
|
|
@@ -109,27 +114,11 @@ var NotificationIcon = styled(Icon).withConfig({
|
|
|
109
114
|
componentId: "sc-1p26rkq-3"
|
|
110
115
|
})(function (props) {
|
|
111
116
|
return css({
|
|
112
|
-
color: themeGet("colors.white")(props),
|
|
117
|
+
color: props.colour === "warning" ? themeGet("colors.black70")(props) : themeGet("colors.white")(props),
|
|
113
118
|
fontSize: themeGet("fontSizes.2")(props),
|
|
114
119
|
mr: "s"
|
|
115
120
|
});
|
|
116
121
|
});
|
|
117
|
-
var LoadingIcon = function LoadingIcon() {
|
|
118
|
-
return /*#__PURE__*/React.createElement(Icon, {
|
|
119
|
-
icon: ["fas", "circle-notch"],
|
|
120
|
-
color: "white",
|
|
121
|
-
marginRight: "s",
|
|
122
|
-
fontSize: themeGet("fontSizes.2"),
|
|
123
|
-
spin: true
|
|
124
|
-
});
|
|
125
|
-
};
|
|
126
|
-
var CloseIcon = function CloseIcon() {
|
|
127
|
-
return /*#__PURE__*/React.createElement(Icon, {
|
|
128
|
-
icon: ["fas", "times"],
|
|
129
|
-
size: "lg",
|
|
130
|
-
color: "white"
|
|
131
|
-
});
|
|
132
|
-
};
|
|
133
122
|
export default function Notification(_ref) {
|
|
134
123
|
var icon = _ref.icon,
|
|
135
124
|
colour = _ref.colour,
|
|
@@ -187,14 +176,22 @@ export default function Notification(_ref) {
|
|
|
187
176
|
}, props), icon && /*#__PURE__*/React.createElement(NotificationIcon, _extends({
|
|
188
177
|
colour: colour,
|
|
189
178
|
icon: icon
|
|
190
|
-
}, iconProps)), loading && /*#__PURE__*/React.createElement(
|
|
179
|
+
}, iconProps)), loading && /*#__PURE__*/React.createElement(Loading, {
|
|
180
|
+
small: true,
|
|
181
|
+
inverted: colour != "warning",
|
|
182
|
+
mr: "s"
|
|
183
|
+
}), /*#__PURE__*/React.createElement(NotificationContent, {
|
|
191
184
|
closable: closable
|
|
192
|
-
}, children), closable && /*#__PURE__*/React.createElement(
|
|
185
|
+
}, children), closable && /*#__PURE__*/React.createElement(CloseButton, {
|
|
193
186
|
className: "close-button",
|
|
194
187
|
tabIndex: "0",
|
|
195
188
|
onClick: onToggle,
|
|
196
189
|
"aria-label": "Close Notification"
|
|
197
|
-
}, /*#__PURE__*/React.createElement(
|
|
190
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
191
|
+
icon: ["fas", "times"],
|
|
192
|
+
size: "lg",
|
|
193
|
+
color: colour === "warning" ? "black70" : "white"
|
|
194
|
+
})));
|
|
198
195
|
return theme ? /*#__PURE__*/React.createElement(ThemeProvider, {
|
|
199
196
|
theme: theme
|
|
200
197
|
}, component) : component;
|
|
@@ -128,6 +128,23 @@ var Select = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
128
128
|
theme: theme
|
|
129
129
|
})
|
|
130
130
|
},
|
|
131
|
+
"&:focus-within": {
|
|
132
|
+
outline: "0",
|
|
133
|
+
borderColor: props.invalid ? themeGet("colors.danger")({
|
|
134
|
+
theme: theme
|
|
135
|
+
}) : themeGet("colors.primary")({
|
|
136
|
+
theme: theme
|
|
137
|
+
}),
|
|
138
|
+
boxShadow: props.invalid ? themeGet("shadows.thickOutline")({
|
|
139
|
+
theme: theme
|
|
140
|
+
}) + " " + themeGet("colors.danger30")({
|
|
141
|
+
theme: theme
|
|
142
|
+
}) : themeGet("shadows.thickOutline")({
|
|
143
|
+
theme: theme
|
|
144
|
+
}) + " " + themeGet("colors.primary30")({
|
|
145
|
+
theme: theme
|
|
146
|
+
})
|
|
147
|
+
},
|
|
131
148
|
borderColor: state.isFocused ? themeGet("colors.primary")({
|
|
132
149
|
theme: theme
|
|
133
150
|
}) : props.inverted ? themeGet("colors.white30")({
|
|
@@ -403,7 +403,7 @@ var NavItem = function NavItem(_ref) {
|
|
|
403
403
|
return item.actionType === "link" ? /*#__PURE__*/React.createElement(SideNavItemPopover, {
|
|
404
404
|
text: item.name,
|
|
405
405
|
textAlign: "center",
|
|
406
|
-
width: "
|
|
406
|
+
width: "124px",
|
|
407
407
|
active: item.index === activeItem,
|
|
408
408
|
bottomAligned: item.bottomAligned
|
|
409
409
|
// showItemNames={showItemNames}
|
|
@@ -421,7 +421,7 @@ var NavItem = function NavItem(_ref) {
|
|
|
421
421
|
})))) : /*#__PURE__*/React.createElement(SideNavItemPopover, {
|
|
422
422
|
text: item.name,
|
|
423
423
|
textAlign: "center",
|
|
424
|
-
width: "
|
|
424
|
+
width: "124px",
|
|
425
425
|
active: item.index === activeItem,
|
|
426
426
|
bottomAligned: item.bottomAligned
|
|
427
427
|
// showItemNames={showItemNames}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["
|
|
3
|
+
var _excluded = ["icon", "children"];
|
|
4
4
|
import React from "react";
|
|
5
5
|
import PropTypes from "prop-types";
|
|
6
|
-
import styled
|
|
6
|
+
import styled from "styled-components";
|
|
7
7
|
import { space, layout, color, compose, variant } from "styled-system";
|
|
8
8
|
import { css } from "@styled-system/css";
|
|
9
|
-
import systemtheme from "../../systemtheme";
|
|
10
9
|
import { themeGet } from "@styled-system/theme-get";
|
|
11
10
|
var StatusDotStyles = compose(space, layout, color);
|
|
12
11
|
var StatusDotItem = styled("div").withConfig({
|
|
@@ -41,15 +40,12 @@ var StatusDotItem = styled("div").withConfig({
|
|
|
41
40
|
});
|
|
42
41
|
}, StatusDotStyles);
|
|
43
42
|
export default function StatusDot(_ref) {
|
|
44
|
-
var
|
|
45
|
-
icon = _ref.icon,
|
|
43
|
+
var icon = _ref.icon,
|
|
46
44
|
children = _ref.children,
|
|
47
45
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
48
|
-
return /*#__PURE__*/React.createElement(
|
|
49
|
-
theme: theme
|
|
50
|
-
}, /*#__PURE__*/React.createElement(StatusDotItem, _extends({}, props, {
|
|
46
|
+
return /*#__PURE__*/React.createElement(StatusDotItem, _extends({}, props, {
|
|
51
47
|
icon: icon
|
|
52
|
-
}), children)
|
|
48
|
+
}), children);
|
|
53
49
|
}
|
|
54
50
|
StatusDot.propTypes = {
|
|
55
51
|
/** Specifies StatusDot colour. Colours are taken from the standard design system colours. */
|
|
@@ -61,25 +57,11 @@ StatusDot.propTypes = {
|
|
|
61
57
|
/** Specifies the system design theme. */
|
|
62
58
|
theme: PropTypes.object
|
|
63
59
|
};
|
|
64
|
-
StatusDot.defaultProps = {
|
|
65
|
-
theme: systemtheme
|
|
66
|
-
};
|
|
67
60
|
StatusDot.__docgenInfo = {
|
|
68
61
|
"description": "",
|
|
69
62
|
"methods": [],
|
|
70
63
|
"displayName": "StatusDot",
|
|
71
64
|
"props": {
|
|
72
|
-
"theme": {
|
|
73
|
-
"defaultValue": {
|
|
74
|
-
"value": "systemtheme",
|
|
75
|
-
"computed": true
|
|
76
|
-
},
|
|
77
|
-
"description": "Specifies the system design theme.",
|
|
78
|
-
"type": {
|
|
79
|
-
"name": "object"
|
|
80
|
-
},
|
|
81
|
-
"required": false
|
|
82
|
-
},
|
|
83
65
|
"variant": {
|
|
84
66
|
"description": "Specifies StatusDot colour. Colours are taken from the standard design system colours.",
|
|
85
67
|
"type": {
|
|
@@ -110,6 +92,13 @@ StatusDot.__docgenInfo = {
|
|
|
110
92
|
"name": "node"
|
|
111
93
|
},
|
|
112
94
|
"required": false
|
|
95
|
+
},
|
|
96
|
+
"theme": {
|
|
97
|
+
"description": "Specifies the system design theme.",
|
|
98
|
+
"type": {
|
|
99
|
+
"name": "object"
|
|
100
|
+
},
|
|
101
|
+
"required": false
|
|
113
102
|
}
|
|
114
103
|
}
|
|
115
104
|
};
|
|
@@ -35,7 +35,7 @@ export var boldStyledLink = function boldStyledLink() {
|
|
|
35
35
|
boldStyledLink.storyName = "Bold";
|
|
36
36
|
export var invertedStyledLink = function invertedStyledLink() {
|
|
37
37
|
return /*#__PURE__*/React.createElement(Box, {
|
|
38
|
-
bg: "
|
|
38
|
+
bg: "greyDarkest",
|
|
39
39
|
p: "r"
|
|
40
40
|
}, /*#__PURE__*/React.createElement(Flex, {
|
|
41
41
|
justifyContent: "center"
|
|
@@ -32,7 +32,7 @@ export var TabItem = styled("div").withConfig({
|
|
|
32
32
|
py: 3,
|
|
33
33
|
fontSize: themeGet("fontSizes.1")(props),
|
|
34
34
|
fontWeight: themeGet("fontWeights.2")(props),
|
|
35
|
-
color: themeGet("colors.
|
|
35
|
+
color: themeGet("colors.greyDarker")(props),
|
|
36
36
|
display: "flex",
|
|
37
37
|
alignItems: "center",
|
|
38
38
|
position: "relative",
|
|
@@ -201,13 +201,11 @@ export var smallVariant = function smallVariant() {
|
|
|
201
201
|
}, "Agile Coach");
|
|
202
202
|
};
|
|
203
203
|
export var highlightedVariant = function highlightedVariant() {
|
|
204
|
-
return /*#__PURE__*/React.createElement(
|
|
205
|
-
m: "2px"
|
|
206
|
-
}, /*#__PURE__*/React.createElement(Tag, {
|
|
204
|
+
return /*#__PURE__*/React.createElement(Tag, {
|
|
207
205
|
selected: true,
|
|
208
206
|
highlighted: true,
|
|
209
207
|
tagType: "specialist"
|
|
210
|
-
}, "Agile Coach")
|
|
208
|
+
}, "Agile Coach");
|
|
211
209
|
};
|
|
212
210
|
export var personTag = function personTag() {
|
|
213
211
|
return /*#__PURE__*/React.createElement(Spacer, {
|
|
@@ -13,7 +13,7 @@ var TagWrapper = styled.div.withConfig({
|
|
|
13
13
|
displayName: "Tag__TagWrapper",
|
|
14
14
|
componentId: "sc-1dh2aa8-0"
|
|
15
15
|
})(["", " ", " display:flex;align-items:stretch;height:100%;min-height:", ";justify-content:center;> button{margin:0;}"], space, layout, function (props) {
|
|
16
|
-
return props.small ? "
|
|
16
|
+
return props.small ? themeGet("tagScale.tagHeightSmall") : themeGet("tagScale.tagHeightDefault");
|
|
17
17
|
});
|
|
18
18
|
var TagValue = styled.button.attrs(function (props) {
|
|
19
19
|
return {
|
|
@@ -35,24 +35,24 @@ var TagValue = styled.button.attrs(function (props) {
|
|
|
35
35
|
}, function (props) {
|
|
36
36
|
return props.showEdit || props.showInfo || props.showRemove ? "15px 0 0 15px" : "15px";
|
|
37
37
|
}, function (props) {
|
|
38
|
-
return props.disabled ? themeGet("colors.greyLight")(props) : props.selected && props.highlighted ? themeGet("colors.
|
|
38
|
+
return props.disabled ? themeGet("colors.greyLight")(props) : props.selected && props.highlighted ? themeGet("colors.warningLight")(props) : themeGet("colors.primary")(props);
|
|
39
39
|
}, function (props) {
|
|
40
|
-
return
|
|
40
|
+
return props.small ? themeGet("tagScale.tagPaddingSmall") : themeGet("tagScale.tagPaddingDefault");
|
|
41
41
|
}, function (props) {
|
|
42
|
-
return props.disabled ? themeGet("colors.greyLighter")(props) : props.selected && props.highlighted ? themeGet("colors.
|
|
42
|
+
return props.disabled ? themeGet("colors.greyLighter")(props) : props.selected && props.highlighted ? themeGet("colors.warningLight")(props) : props.selected ? themeGet("colors.primary")(props) : themeGet("colors.white")(props);
|
|
43
43
|
}, function (props) {
|
|
44
|
-
return props.disabled ? themeGet("colors.greyDarker")(props) : props.selected && props.highlighted ? themeGet("colors.
|
|
44
|
+
return props.disabled ? themeGet("colors.greyDarker")(props) : props.selected && props.highlighted ? themeGet("colors.black70")(props) : props.selected ? themeGet("colors.white")(props) : themeGet("colors.primary")(props);
|
|
45
45
|
}, function (props) {
|
|
46
46
|
return props.disabled ? css([""]) : css(["&:hover,&:focus{outline:0;border:", ";color:", ";background-color:", ";div{color:", ";}div[class*=\"TagType\"]{background-color:", ";}}"], function (props) {
|
|
47
|
-
return props.selected && props.highlighted ? "solid 1px ".concat(themeGet("colors.
|
|
47
|
+
return props.selected && props.highlighted ? "solid 1px ".concat(themeGet("colors.warningLighter")(props)) : "solid 1px ".concat(themeGet("colors.primaryDark")(props));
|
|
48
48
|
}, function (props) {
|
|
49
|
-
return props.selected ? themeGet("colors.white")(props) : themeGet("colors.primaryDark")(props);
|
|
49
|
+
return props.selected && props.highlighted ? themeGet("colors.black70")(props) : props.selected ? themeGet("colors.white")(props) : themeGet("colors.primaryDark")(props);
|
|
50
50
|
}, function (props) {
|
|
51
|
-
return props.selected && props.highlighted ? themeGet("colors.
|
|
51
|
+
return props.selected && props.highlighted ? themeGet("colors.warningLighter")(props) : props.selected ? themeGet("colors.primaryDark")(props) : themeGet("colors.primaryLightest")(props);
|
|
52
52
|
}, function (props) {
|
|
53
|
-
return props.selected ? themeGet("colors.white")(props) : themeGet("colors.primaryDark")(props);
|
|
53
|
+
return props.selected && props.highlighted ? themeGet("colors.black70")(props) : props.selected ? themeGet("colors.white")(props) : themeGet("colors.primaryDark")(props);
|
|
54
54
|
}, function (props) {
|
|
55
|
-
return props.selected && props.highlighted ? "rgba(
|
|
55
|
+
return props.selected && props.highlighted ? "rgba(255,255,255,0.3)" : props.selected ? "rgba(0,0,0,0.3)" : themeGet("colors.primary20")(props);
|
|
56
56
|
});
|
|
57
57
|
});
|
|
58
58
|
var TagValueText = styled.div.withConfig({
|
|
@@ -69,7 +69,7 @@ var TagActionIconWrapper = styled(TagValue).withConfig({
|
|
|
69
69
|
})(["border-radius:", ";padding:", ";&:focus{z-index:2;}> span{line-height:0;}", ""], function (props) {
|
|
70
70
|
return props.showRemove ? "0" : "0 15px 15px 0";
|
|
71
71
|
}, function (props) {
|
|
72
|
-
return props.showRemove ? "0 7px 0 7px" : props.showInfo ? "0 12px 0 11px" : "0 8px 0 8px";
|
|
72
|
+
return props.showRemove && props.small ? "0 5px 0 6px" : props.showRemove ? "0 7px 0 7px" : props.showInfo && props.small ? "0 10px 0 9px" : props.showInfo ? "0 12px 0 11px" : props.small ? "0 6px 0 6px" : "0 8px 0 8px";
|
|
73
73
|
}, function (props) {
|
|
74
74
|
return props.selected ? css(["border-left:", ";&:hover{border-left:", ";}"], function (props) {
|
|
75
75
|
return props.selected && props.highlighted ? "solid 1px ".concat(themeGet("colors.warningDarker")(props)) : "solid 1px ".concat(themeGet("colors.primaryDark")(props));
|
|
@@ -80,7 +80,9 @@ var TagActionIconWrapper = styled(TagValue).withConfig({
|
|
|
80
80
|
var TagRemoveIconWrapper = styled(TagValue).withConfig({
|
|
81
81
|
displayName: "Tag__TagRemoveIconWrapper",
|
|
82
82
|
componentId: "sc-1dh2aa8-4"
|
|
83
|
-
})(["border-radius:0 15px 15px 0;padding:
|
|
83
|
+
})(["border-radius:0 15px 15px 0;padding:", ";&:focus{z-index:2;}", ""], function (props) {
|
|
84
|
+
return props.small ? "0 8px 3px 7px" : "0 10px 3px 9px";
|
|
85
|
+
}, function (props) {
|
|
84
86
|
return props.selected ? css(["border-left:", ";&:hover{border-left:", ";}"], function (props) {
|
|
85
87
|
return props.selected && props.highlighted ? "solid 1px ".concat(themeGet("colors.warningDarker")(props)) : "solid 1px ".concat(themeGet("colors.primaryDark")(props));
|
|
86
88
|
}, function (props) {
|
|
@@ -93,31 +95,31 @@ var TagType = styled.div.withConfig({
|
|
|
93
95
|
})(["text-transform:uppercase;margin-left:", ";padding:", ";line-height:1;white-space:normal;text-align:left;flex:1 1 auto;border-radius:", ";font-size:", ";background-color:", ";color:", ";"], function (props) {
|
|
94
96
|
return props.small ? "6px" : "10px";
|
|
95
97
|
}, function (props) {
|
|
96
|
-
return props.small ? themeGet("space.
|
|
98
|
+
return props.small ? themeGet("space.2")(props) : themeGet("space.2")(props);
|
|
97
99
|
}, function (props) {
|
|
98
100
|
return themeGet("radii.1")(props);
|
|
99
101
|
}, function (props) {
|
|
100
102
|
return props.small ? "1rem" : themeGet("fontSizes.0")(props);
|
|
101
103
|
}, function (props) {
|
|
102
|
-
return props.disabled ? themeGet("colors.grey")(props) : props.selected && props.highlighted ? "
|
|
104
|
+
return props.disabled ? themeGet("colors.grey")(props) : props.selected && props.highlighted ? themeGet("colors.warningLighter")(props) : props.selected ? "rgba(0,0,0,0.25)" : themeGet("colors.primaryLightest")(props);
|
|
103
105
|
}, function (props) {
|
|
104
|
-
return props.disabled ? themeGet("colors.white")(props) : props.selected && props.highlighted ? themeGet("colors.
|
|
106
|
+
return props.disabled ? themeGet("colors.white")(props) : props.selected && props.highlighted ? themeGet("colors.warningDarkest")(props) : props.selected ? themeGet("colors.white")(props) : themeGet("colors.primaryDark")(props);
|
|
105
107
|
});
|
|
106
108
|
var TagAvatar = styled(Avatar).withConfig({
|
|
107
109
|
displayName: "Tag__TagAvatar",
|
|
108
110
|
componentId: "sc-1dh2aa8-6"
|
|
109
111
|
})(["img[class*=\"Avatar__Image\"],div[class*=\"Avatar__Shape\"]{width:", ";height:", ";text-transform:uppercase;margin-right:", ";margin-left:", ";font-size:", ";background-color:", ";color:", ";}"], function (props) {
|
|
110
|
-
return props.small ? "
|
|
112
|
+
return props.small ? themeGet("tagScale.tagAvatarSizeSmall") : themeGet("tagScale.tagAvatarSizeDefault");
|
|
111
113
|
}, function (props) {
|
|
112
|
-
return props.small ? "
|
|
114
|
+
return props.small ? themeGet("tagScale.tagAvatarSizeSmall") : themeGet("tagScale.tagAvatarSizeDefault");
|
|
113
115
|
}, themeGet("space.xs"), function (props) {
|
|
114
|
-
return props.small ? "
|
|
116
|
+
return props.small ? themeGet("tagScale.tagAvatarMarginLeftSmall") : themeGet("tagScale.tagAvatarMarginLeftDefault");
|
|
115
117
|
}, function (props) {
|
|
116
|
-
return props.small ? "
|
|
118
|
+
return props.small ? themeGet("tagScale.tagAvatarFontSizeSmall") : themeGet("tagScale.tagAvatarFontSizeDefault");
|
|
117
119
|
}, function (props) {
|
|
118
|
-
return props.disabled ? themeGet("colors.grey")(props) : props.selected && props.highlighted ? "
|
|
120
|
+
return props.disabled ? themeGet("colors.grey")(props) : props.selected && props.highlighted ? themeGet("colors.warningDarkest")(props) : props.selected ? "rgba(0,0,0,0.25)" : themeGet("colors.primaryLightest")(props);
|
|
119
121
|
}, function (props) {
|
|
120
|
-
return props.disabled ? themeGet("colors.white")(props) : props.selected && props.highlighted ? themeGet("colors.white")(props) : props.selected ? themeGet("colors.white")(props) : themeGet("colors.
|
|
122
|
+
return props.disabled ? themeGet("colors.white")(props) : props.selected && props.highlighted ? themeGet("colors.white")(props) : props.selected ? themeGet("colors.white")(props) : themeGet("colors.primaryDark")(props);
|
|
121
123
|
});
|
|
122
124
|
|
|
123
125
|
/**
|
|
@@ -155,12 +157,15 @@ export default function Tag(_ref) {
|
|
|
155
157
|
showInfo: showInfo,
|
|
156
158
|
showRemove: showRemove,
|
|
157
159
|
onClick: onSelect,
|
|
158
|
-
small: small
|
|
160
|
+
small: small,
|
|
161
|
+
"aria-label": "Navigate to tag",
|
|
162
|
+
title: "Navigate to tag"
|
|
159
163
|
}, personEntity && /*#__PURE__*/React.createElement(TagAvatar, {
|
|
160
164
|
selected: selected,
|
|
161
165
|
highlighted: highlighted,
|
|
162
166
|
disabled: disabled,
|
|
163
167
|
small: small,
|
|
168
|
+
imageAlt: "Avatar for ".concat(children),
|
|
164
169
|
image: personEntity.avatarSrc,
|
|
165
170
|
initials: personEntity.initials
|
|
166
171
|
}), /*#__PURE__*/React.createElement(TagValueText, {
|
|
@@ -180,7 +185,10 @@ export default function Tag(_ref) {
|
|
|
180
185
|
highlighted: highlighted,
|
|
181
186
|
disabled: disabled,
|
|
182
187
|
showRemove: showRemove,
|
|
183
|
-
onClick: onEdit
|
|
188
|
+
onClick: onEdit,
|
|
189
|
+
small: small,
|
|
190
|
+
"aria-label": "Edit tag",
|
|
191
|
+
title: "Edit tag"
|
|
184
192
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
185
193
|
icon: ["fas", "pen"],
|
|
186
194
|
size: "xs"
|
|
@@ -189,7 +197,10 @@ export default function Tag(_ref) {
|
|
|
189
197
|
highlighted: highlighted,
|
|
190
198
|
disabled: disabled,
|
|
191
199
|
onClick: onInfo,
|
|
192
|
-
showInfo: showInfo
|
|
200
|
+
showInfo: showInfo,
|
|
201
|
+
small: small,
|
|
202
|
+
"aria-label": "View tag details",
|
|
203
|
+
title: "View tag details"
|
|
193
204
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
194
205
|
icon: ["fas", "info"],
|
|
195
206
|
size: "xs"
|
|
@@ -197,7 +208,10 @@ export default function Tag(_ref) {
|
|
|
197
208
|
selected: selected,
|
|
198
209
|
highlighted: highlighted,
|
|
199
210
|
disabled: disabled,
|
|
200
|
-
onClick: onRemove
|
|
211
|
+
onClick: onRemove,
|
|
212
|
+
small: small,
|
|
213
|
+
"aria-label": "Remove tag",
|
|
214
|
+
title: "Remove tag"
|
|
201
215
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
202
216
|
icon: ["fas", "times"],
|
|
203
217
|
size: "xs"
|
|
@@ -115,7 +115,7 @@ var Label = styled.label.withConfig({
|
|
|
115
115
|
var inputHeight = themeGet("appScale.inputHeightLarge")(props);
|
|
116
116
|
return "calc(".concat(inputHeight, " / 3)");
|
|
117
117
|
}, function (props) {
|
|
118
|
-
return props.invalid ? themeGet("colors.dangerDark")(props) : props.valid ? themeGet("colors.successDark")(props) : themeGet("colors.
|
|
118
|
+
return props.invalid ? themeGet("colors.dangerDark")(props) : props.valid ? themeGet("colors.successDark")(props) : themeGet("colors.greyDark")(props);
|
|
119
119
|
}) : css([""]);
|
|
120
120
|
}, function (props) {
|
|
121
121
|
return props.mandatory ? css(["&:after{content:\" *\";color:", ";}"], themeGet("colors.danger")(props)) : css([""]);
|
|
@@ -10,7 +10,7 @@ var Group = styled.div.withConfig({
|
|
|
10
10
|
displayName: "Toggle__Group",
|
|
11
11
|
componentId: "sc-f6l22k-0"
|
|
12
12
|
})(["", " ", " display:flex;align-items:center;", ";"], space, layout, function (props) {
|
|
13
|
-
return props.inverted ? css(["input{&:focus{+ label{box-shadow:", ";}}}label{&:first-of-type{background:", ";}}"], themeGet("shadows.
|
|
13
|
+
return 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([""]);
|
|
14
14
|
});
|
|
15
15
|
var Input = styled.input.attrs({
|
|
16
16
|
type: "checkbox"
|
|
@@ -20,7 +20,7 @@ var Input = styled.input.attrs({
|
|
|
20
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:", ";}}}"], function (props) {
|
|
21
21
|
return props.srHide ? "hidden" : "visible";
|
|
22
22
|
}, function (props) {
|
|
23
|
-
return themeGet("shadows.
|
|
23
|
+
return themeGet("shadows.thickOutline")(props) + " " + themeGet("colors.black20")(props);
|
|
24
24
|
}, function (props) {
|
|
25
25
|
return themeGet("colors.success")(props);
|
|
26
26
|
}, function (props) {
|
|
@@ -327,7 +327,7 @@ export var Quote = styled("blockquote").withConfig({
|
|
|
327
327
|
display: "block",
|
|
328
328
|
fontStyle: "italic",
|
|
329
329
|
fontSize: themeGet("fontSizes.2")(props),
|
|
330
|
-
color: themeGet("colors.
|
|
330
|
+
color: themeGet("colors.greyDark")(props)
|
|
331
331
|
}
|
|
332
332
|
});
|
|
333
333
|
}, typeStyles);
|
|
@@ -23,7 +23,7 @@ space.l = space[5];
|
|
|
23
23
|
space.xl = space[6];
|
|
24
24
|
space.xxl = space[7];
|
|
25
25
|
space.xxxl = space[8];
|
|
26
|
-
space.between = "
|
|
26
|
+
space.between = "8px";
|
|
27
27
|
|
|
28
28
|
// SIZES (for LAYOUT properties)
|
|
29
29
|
// Half these values - Done
|
|
@@ -37,29 +37,18 @@ sizes.xl = sizes[6];
|
|
|
37
37
|
sizes.xxl = sizes[7];
|
|
38
38
|
sizes.xxxl = sizes[8];
|
|
39
39
|
|
|
40
|
-
//
|
|
41
|
-
// const black = "#000";
|
|
42
|
-
// const white = "#fff";
|
|
43
|
-
// const grey = "#90979A"; // Base grey - Mainly used for UI elements like backgrounds, muted text, icons, dividers or borders
|
|
44
|
-
// const primary = "#30ABD6"; // Potential new colour: #2a5ec1. Base primary brand colour (blue) - Mainly used for buttons, links and selected states
|
|
45
|
-
// const secondary = "#8E41F0"; // Change to #7211ED with new colour palette. Potential new purple colour. Introduce new secondary colour maybe purple when we re-design our colour palette
|
|
46
|
-
// const success = "#ACD036"; // Base brand success colour (green) - Mainly used to indicate success, status=good, valid, add, or save states
|
|
47
|
-
// // const successDesaturated = desaturate(0.1, success); // This is because the lighter versions of success were too saturated and 'minty' coloured.
|
|
48
|
-
// const warning = "#EDC652"; // Base brand warning colour - Mainly used to indicate warnings, slipping or near due states
|
|
49
|
-
// const danger = "#D42A59"; // Base brand danger/error colour - Mainly used to indicate error, status=bad, at risk or over due states
|
|
50
|
-
|
|
51
|
-
// NEW COLOUR PALETTE
|
|
40
|
+
// NEW ACCESSIBLE COLOUR PALETTE
|
|
52
41
|
var black = "#000";
|
|
53
42
|
var white = "#fff";
|
|
54
43
|
var grey = "#90979A"; // Base grey - Mainly used for UI elements like backgrounds, muted text, icons, dividers or borders
|
|
55
|
-
var primary = "#
|
|
56
|
-
var secondary = "#
|
|
44
|
+
var primary = "#007ac4"; // Potential new colour: #2a5ec1. Base primary brand colour (blue) - Mainly used for buttons, links and selected states
|
|
45
|
+
var secondary = "#8714f2"; // Change to #7211ED with new colour palette. Potential new purple colour. Introduce new secondary colour maybe purple when we re-design our colour palette
|
|
57
46
|
//const tertiary = "#FF9E44"; // A tertiary colour for limited use. Not sure if needed.
|
|
58
|
-
var success = "#
|
|
47
|
+
var success = "#00883b"; // Base brand success colour (green) - Mainly used to indicate success, status=good, valid, add, or save states
|
|
59
48
|
var successDesaturated = desaturate(0.1, success); // This is because the lighter versions of success were too saturated and 'minty' coloured.
|
|
60
|
-
var warning = "#
|
|
49
|
+
var warning = "#ffb71c"; // Base brand warning colour - Mainly used to indicate warnings, slipping or near due states
|
|
61
50
|
var warningSaturated = saturate(1, warning); // This is because the darker versions of warning were too under saturated and mustard looking.
|
|
62
|
-
var danger = "#
|
|
51
|
+
var danger = "#d90f27"; // Base brand danger/error colour - Mainly used to indicate error, status=bad, at risk or over due states
|
|
63
52
|
|
|
64
53
|
export var colors = {
|
|
65
54
|
/* Greyscale */
|
|
@@ -94,7 +83,7 @@ export var colors = {
|
|
|
94
83
|
primary: primary,
|
|
95
84
|
primaryLight: lighten(0.2, primary),
|
|
96
85
|
primaryLighter: lighten(0.35, primary),
|
|
97
|
-
primaryLightest: lighten(0.
|
|
86
|
+
primaryLightest: lighten(0.55, primary),
|
|
98
87
|
primaryDark: darken(0.1, primary),
|
|
99
88
|
primaryDarker: darken(0.25, primary),
|
|
100
89
|
primaryDarkest: darken(0.35, primary),
|
|
@@ -110,8 +99,8 @@ export var colors = {
|
|
|
110
99
|
secondary: secondary,
|
|
111
100
|
secondaryLight: lighten(0.1, secondary),
|
|
112
101
|
secondaryLighter: lighten(0.2, secondary),
|
|
113
|
-
secondaryLightest: lighten(0.
|
|
114
|
-
secondaryEvenLighter: lighten(0.
|
|
102
|
+
secondaryLightest: lighten(0.35, secondary),
|
|
103
|
+
secondaryEvenLighter: lighten(0.4, secondary),
|
|
115
104
|
secondaryDark: darken(0.1, secondary),
|
|
116
105
|
secondaryDarker: darken(0.2, secondary),
|
|
117
106
|
secondaryDarkest: darken(0.3, secondary),
|
|
@@ -146,8 +135,8 @@ export var colors = {
|
|
|
146
135
|
// successLightest: lighten(0.35, success),
|
|
147
136
|
successLight: lighten(0.11, successDesaturated),
|
|
148
137
|
successLighter: lighten(0.25, successDesaturated),
|
|
149
|
-
successLightest: lighten(0.
|
|
150
|
-
successEvenLighter: lighten(0.
|
|
138
|
+
successLightest: lighten(0.5, successDesaturated),
|
|
139
|
+
successEvenLighter: lighten(0.55, successDesaturated),
|
|
151
140
|
successDark: darken(0.1, success),
|
|
152
141
|
successDarker: darken(0.2, success),
|
|
153
142
|
successDarkest: darken(0.3, success),
|
|
@@ -163,10 +152,10 @@ export var colors = {
|
|
|
163
152
|
warning: warning,
|
|
164
153
|
warningLight: lighten(0.15, warning),
|
|
165
154
|
warningLighter: lighten(0.25, warning),
|
|
166
|
-
warningLightest: lighten(0.
|
|
167
|
-
warningDark: darken(0.
|
|
168
|
-
warningDarker: darken(0.
|
|
169
|
-
warningDarkest: darken(0.
|
|
155
|
+
warningLightest: lighten(0.4, warning),
|
|
156
|
+
warningDark: darken(0.1, warningSaturated),
|
|
157
|
+
warningDarker: darken(0.2, warningSaturated),
|
|
158
|
+
warningDarkest: darken(0.3, warningSaturated),
|
|
170
159
|
warning10: rgba(warning, 0.1),
|
|
171
160
|
warning20: rgba(warning, 0.2),
|
|
172
161
|
warning30: rgba(warning, 0.3),
|
|
@@ -179,7 +168,7 @@ export var colors = {
|
|
|
179
168
|
danger: danger,
|
|
180
169
|
dangerLight: lighten(0.1, danger),
|
|
181
170
|
dangerLighter: lighten(0.2, danger),
|
|
182
|
-
dangerLightest: lighten(0.
|
|
171
|
+
dangerLightest: lighten(0.35, danger),
|
|
183
172
|
dangerDark: darken(0.1, danger),
|
|
184
173
|
dangerDarker: darken(0.25, danger),
|
|
185
174
|
dangerDarkest: darken(0.35, danger),
|
|
@@ -235,6 +224,18 @@ export var appScale = {
|
|
|
235
224
|
inputHeightDefault: "32px",
|
|
236
225
|
inputHeightLarge: "52px"
|
|
237
226
|
};
|
|
227
|
+
export var tagScale = {
|
|
228
|
+
tagHeightDefault: "22px",
|
|
229
|
+
tagHeightSmall: "18px",
|
|
230
|
+
tagPaddingDefault: "0 8px",
|
|
231
|
+
tagPaddingSmall: "0 6px",
|
|
232
|
+
tagAvatarSizeDefault: "16px",
|
|
233
|
+
tagAvatarSizeSmall: "14px",
|
|
234
|
+
tagAvatarMarginLeftDefault: "-6px",
|
|
235
|
+
tagAvatarMarginLeftSmall: "-5px",
|
|
236
|
+
tagAvatarFontSizeDefault: "0.8rem",
|
|
237
|
+
tagAvatarFontSizeSmall: "0.7rem"
|
|
238
|
+
};
|
|
238
239
|
export default {
|
|
239
240
|
fonts: fonts,
|
|
240
241
|
font: font,
|
|
@@ -251,5 +252,6 @@ export default {
|
|
|
251
252
|
breakpoints: breakpoints,
|
|
252
253
|
transition: transition,
|
|
253
254
|
zIndices: zIndices,
|
|
254
|
-
appScale: appScale
|
|
255
|
+
appScale: appScale,
|
|
256
|
+
tagScale: tagScale
|
|
255
257
|
};
|