orcs-design-system 3.1.12 → 3.1.14

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.
@@ -83,6 +83,7 @@ export var small = function small() {
83
83
  href: "#"
84
84
  }, "Ayden Lundgre"),
85
85
  subtitle: "Senior Business Analyst",
86
+ imageAlt: "Avatar for Ayden Lundgre",
86
87
  initials: "AL",
87
88
  image: "https://uploads-ssl.webflow.com/5f4852427e784b4cada3e0d0/65389e85f6932722401c73ad_ethan.png"
88
89
  }));
@@ -93,7 +94,7 @@ export var large = function large() {
93
94
  my: 4
94
95
  }, /*#__PURE__*/React.createElement(Avatar, {
95
96
  sizing: "large",
96
- title: "Ayden Lundgre TESTER",
97
+ title: "Ayden Lundgre",
97
98
  titleLevel: "H1",
98
99
  subtitle: "Senior Business Analyst",
99
100
  initials: "AL"
@@ -109,6 +110,7 @@ export var large = function large() {
109
110
  href: "#"
110
111
  }, "Ayden Lundgre"),
111
112
  subtitle: "Senior Business Analyst",
113
+ imageAlt: "Avatar for Ayden Lundgre",
112
114
  initials: "AL",
113
115
  image: "https://uploads-ssl.webflow.com/5f4852427e784b4cada3e0d0/65389e85f6932722401c73ad_ethan.png"
114
116
  }));
@@ -134,6 +136,7 @@ export var subtitleContent = function subtitleContent() {
134
136
  title: /*#__PURE__*/React.createElement(StyledLink, {
135
137
  href: "#"
136
138
  }, "Ayden Lundgre"),
139
+ imageAlt: "Avatar for Ayden Lundgre",
137
140
  initials: "AL",
138
141
  image: "https://uploads-ssl.webflow.com/5f4852427e784b4cada3e0d0/65389e85f6932722401c73ad_ethan.png",
139
142
  subtitleContent: /*#__PURE__*/React.createElement(Badge, {
@@ -146,7 +149,7 @@ export var subtitleContent = function subtitleContent() {
146
149
  }, "Ayden Lundgre"),
147
150
  initials: "AL",
148
151
  image: "https://uploads-ssl.webflow.com/5f4852427e784b4cada3e0d0/65389e85f6932722401c73ad_ethan.png",
149
- imageAlt: "Ayden Lundgre",
152
+ imageAlt: "Avatar for Ayden Lundgre",
150
153
  subtitleContent: /*#__PURE__*/React.createElement(Flex, {
151
154
  flexWrap: "wrap"
152
155
  }, /*#__PURE__*/React.createElement(Spacer, {
@@ -168,7 +171,7 @@ export var localTime = function localTime() {
168
171
  }, "Ayden Lundgre"),
169
172
  initials: "AL",
170
173
  image: "https://uploads-ssl.webflow.com/5f4852427e784b4cada3e0d0/65389e85f6932722401c73ad_ethan.png",
171
- imageAlt: "Ayden Lundgre",
174
+ imageAlt: "Avatar for Ayden Lundgre",
172
175
  subtitleContent: /*#__PURE__*/React.createElement(Badge, {
173
176
  mt: "xs"
174
177
  }, "Senior Business Analyst"),
@@ -196,7 +199,7 @@ export var inverted = function inverted() {
196
199
  subtitle: "Senior Business Analyst",
197
200
  initials: "AL",
198
201
  image: "https://uploads-ssl.webflow.com/5f4852427e784b4cada3e0d0/65389e85f6932722401c73ad_ethan.png",
199
- imageAlt: "Ayden Lundgre"
202
+ imageAlt: "Avatar for Ayden Lundgre"
200
203
  }), /*#__PURE__*/React.createElement(Avatar, {
201
204
  type: "inverted",
202
205
  sizing: "small",
@@ -214,7 +217,7 @@ export var inverted = function inverted() {
214
217
  subtitle: "Senior Business Analyst",
215
218
  initials: "AL",
216
219
  image: "https://uploads-ssl.webflow.com/5f4852427e784b4cada3e0d0/65389e85f6932722401c73ad_ethan.png",
217
- imageAlt: "Ayden Lundgre"
220
+ imageAlt: "Avatar for Ayden Lundgre"
218
221
  })));
219
222
  };
220
223
  inverted.storyName = "Inverted";
@@ -228,7 +231,7 @@ export var alternateShapes = function alternateShapes() {
228
231
  }, "Innovation Lab"),
229
232
  subtitle: "15 team members",
230
233
  image: "https://images.unsplash.com/photo-1582213782179-e0d53f98f2ca?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=2370&q=80",
231
- imageAlt: "Team Photo",
234
+ imageAlt: "Avatar for Innovation Lab",
232
235
  sizing: "large"
233
236
  }), /*#__PURE__*/React.createElement(Avatar, {
234
237
  shape: "square",
@@ -237,7 +240,7 @@ export var alternateShapes = function alternateShapes() {
237
240
  }, "Innovation Lab"),
238
241
  subtitle: "15 team members",
239
242
  image: "https://images.unsplash.com/photo-1582213782179-e0d53f98f2ca?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=2370&q=80",
240
- imageAlt: "Team Photo"
243
+ imageAlt: "Avatar for Innovation Lab"
241
244
  }), /*#__PURE__*/React.createElement(Avatar, {
242
245
  shape: "square",
243
246
  sizing: "small",
@@ -245,14 +248,16 @@ export var alternateShapes = function alternateShapes() {
245
248
  href: "#"
246
249
  }, "Innovation Lab"),
247
250
  subtitle: "15 team members",
248
- initials: "IL"
251
+ initials: "IL",
252
+ imageAlt: "Avatar for Innovation Lab"
249
253
  }), /*#__PURE__*/React.createElement(Avatar, {
250
254
  shape: "square",
251
255
  sizing: "small",
252
256
  title: /*#__PURE__*/React.createElement(StyledLink, {
253
257
  href: "#"
254
258
  }, "Innovation Lab"),
255
- subtitle: "15 team members"
259
+ subtitle: "15 team members",
260
+ imageAlt: "Avatar for Innovation Lab"
256
261
  }), /*#__PURE__*/React.createElement(Avatar, {
257
262
  shape: "hexagon",
258
263
  title: /*#__PURE__*/React.createElement(StyledLink, {
@@ -260,7 +265,7 @@ export var alternateShapes = function alternateShapes() {
260
265
  }, "Innovation Lab"),
261
266
  subtitle: "15 team members",
262
267
  image: "https://images.unsplash.com/photo-1582213782179-e0d53f98f2ca?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=2370&q=80",
263
- imageAlt: "Team Photo",
268
+ imageAlt: "Avatar for Innovation Lab",
264
269
  sizing: "large"
265
270
  }), /*#__PURE__*/React.createElement(Avatar, {
266
271
  shape: "hexagon",
@@ -269,7 +274,7 @@ export var alternateShapes = function alternateShapes() {
269
274
  }, "Innovation Lab"),
270
275
  subtitle: "15 team members",
271
276
  image: "https://images.unsplash.com/photo-1582213782179-e0d53f98f2ca?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=2370&q=80",
272
- imageAlt: "Team Photo"
277
+ imageAlt: "Avatar for Innovation Lab"
273
278
  }), /*#__PURE__*/React.createElement(Avatar, {
274
279
  shape: "hexagon",
275
280
  sizing: "small",
@@ -277,14 +282,16 @@ export var alternateShapes = function alternateShapes() {
277
282
  href: "#"
278
283
  }, "Innovation Lab"),
279
284
  subtitle: "15 team members",
280
- initials: "IL"
285
+ initials: "IL",
286
+ imageAlt: "Avatar for Innovation Lab"
281
287
  }), /*#__PURE__*/React.createElement(Avatar, {
282
288
  shape: "hexagon",
283
289
  sizing: "small",
284
290
  title: /*#__PURE__*/React.createElement(StyledLink, {
285
291
  href: "#"
286
292
  }, "Innovation Lab"),
287
- subtitle: "15 team members"
293
+ subtitle: "15 team members",
294
+ imageAlt: "Avatar for Innovation Lab"
288
295
  }), /*#__PURE__*/React.createElement(Avatar, {
289
296
  shape: "tag",
290
297
  title: /*#__PURE__*/React.createElement(StyledLink, {
@@ -292,7 +299,7 @@ export var alternateShapes = function alternateShapes() {
292
299
  }, "Javascript"),
293
300
  subtitle: "Tagged 123 times",
294
301
  image: "https://images.unsplash.com/photo-1627398242454-45a1465c2479?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=2148&q=80",
295
- imageAlt: "Screen Photo",
302
+ imageAlt: "Avatar for Javascript",
296
303
  sizing: "large"
297
304
  }), /*#__PURE__*/React.createElement(Avatar, {
298
305
  shape: "tag",
@@ -301,7 +308,7 @@ export var alternateShapes = function alternateShapes() {
301
308
  }, "Javascript"),
302
309
  subtitle: "Tagged 123 times",
303
310
  image: "https://images.unsplash.com/photo-1627398242454-45a1465c2479?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=2148&q=80",
304
- imageAlt: "Screen Photo"
311
+ imageAlt: "Avatar for Javascript"
305
312
  }), /*#__PURE__*/React.createElement(Avatar, {
306
313
  shape: "tag",
307
314
  sizing: "small",
@@ -309,14 +316,16 @@ export var alternateShapes = function alternateShapes() {
309
316
  href: "#"
310
317
  }, "Javascript"),
311
318
  subtitle: "Tagged 123 times",
312
- initials: "JS"
319
+ initials: "JS",
320
+ imageAlt: "Avatar for Javascript"
313
321
  }), /*#__PURE__*/React.createElement(Avatar, {
314
322
  shape: "tag",
315
323
  sizing: "small",
316
324
  title: /*#__PURE__*/React.createElement(StyledLink, {
317
325
  href: "#"
318
326
  }, "Javascript"),
319
- subtitle: "Tagged 123 times"
327
+ subtitle: "Tagged 123 times",
328
+ imageAlt: "Avatar for Javascript"
320
329
  }));
321
330
  };
322
331
  alternateShapes.storyName = "Alternate Shapes";
@@ -197,13 +197,16 @@ var Title = styled(function (_ref) {
197
197
  return css({
198
198
  fontSize: themeGet("fontSizes.2")(props),
199
199
  "> a": {
200
- fontSize: themeGet("fontSizes.2")(props)
200
+ fontSize: themeGet("fontSizes.2")(props),
201
+ color: props.type == "inverted" ? themeGet("colors.primaryLight")(props) : themeGet("colors.primary")(props)
201
202
  },
202
203
  "> div > a": {
203
- fontSize: themeGet("fontSizes.2")(props)
204
+ fontSize: themeGet("fontSizes.2")(props),
205
+ color: props.type == "inverted" ? themeGet("colors.primaryLight")(props) : themeGet("colors.primary")(props)
204
206
  },
205
207
  "> div > div > a": {
206
- fontSize: themeGet("fontSizes.2")(props)
208
+ fontSize: themeGet("fontSizes.2")(props),
209
+ color: props.type == "inverted" ? themeGet("colors.primaryLight")(props) : themeGet("colors.primary")(props)
207
210
  }
208
211
  });
209
212
  }, function (props) {
@@ -251,7 +254,7 @@ var Subtitle = styled(Text).withConfig({
251
254
  componentId: "sc-1wtet2j-5"
252
255
  })(function (props) {
253
256
  return css({
254
- color: themeGet("colors.grey")(props),
257
+ color: themeGet("colors.greyDark")(props),
255
258
  fontSize: themeGet("fontSizes.1")(props)
256
259
  });
257
260
  }, function (props) {
@@ -308,7 +311,7 @@ var Avatar = function Avatar(_ref2) {
308
311
  if (imageAlt) {
309
312
  return imageAlt;
310
313
  } else if (typeof title === "string") {
311
- return title;
314
+ return "Avatar for ".concat(title);
312
315
  }
313
316
  }, [imageAlt, title]);
314
317
  var component = /*#__PURE__*/React.createElement(AvatarWrapper, _extends({}, props, {
@@ -47,7 +47,7 @@ var Item = styled("span").withConfig({
47
47
  },
48
48
  warning: {
49
49
  color: themeGet("colors.warningDarkest")(props),
50
- bg: themeGet("colors.warningLightest")(props)
50
+ bg: themeGet("colors.warningLighter")(props)
51
51
  },
52
52
  danger: {
53
53
  color: themeGet("colors.dangerDarkest")(props),
@@ -126,12 +126,12 @@ var StyledButton = styled("button").withConfig({
126
126
  },
127
127
  ghost: {
128
128
  bg: themeGet("colors.primaryLightest")(props),
129
- color: themeGet("colors.primary")(props),
129
+ color: themeGet("colors.primaryDark")(props),
130
130
  borderColor: themeGet("colors.primaryLightest")(props),
131
131
  "&:hover": {
132
132
  bg: themeGet("colors.primaryLighter")(props),
133
133
  borderColor: themeGet("colors.primaryLighter")(props),
134
- color: themeGet("colors.primaryDark")(props)
134
+ color: themeGet("colors.primaryDarker")(props)
135
135
  },
136
136
  "&:focus": {
137
137
  outline: "0",
@@ -6,7 +6,7 @@ import styled, { css, ThemeProvider } from "styled-components";
6
6
  import PropTypes from "prop-types";
7
7
  import Icon from "../Icon/";
8
8
  import Box from "../Box/";
9
- import { H3, H6 } from "../Typography";
9
+ import { H3, H4 } from "../Typography";
10
10
  import { space, layout } from "styled-system";
11
11
  import { themeGet } from "@styled-system/theme-get";
12
12
  var Item = styled.div.withConfig({
@@ -29,13 +29,13 @@ var Item = styled.div.withConfig({
29
29
  }, function (props) {
30
30
  return props.center ? css([",> *,> div > *{display:flex;flex-direction:column;align-items:center;}"]) : css([""]);
31
31
  }, function (props) {
32
- return props.alternate ? css(["> div:first-of-type{display:flex;justify-content:flex-start;align-items:center;}h6{margin-left:auto;float:right;}"]) : css([""]);
32
+ return props.alternate ? css(["> div:first-of-type{display:flex;justify-content:flex-start;align-items:center;}h4{margin-left:auto;float:right;}"]) : css([""]);
33
33
  });
34
34
  var ChangeIcon = styled.div.withConfig({
35
35
  displayName: "Card__ChangeIcon",
36
36
  componentId: "sc-yfq75p-1"
37
37
  })(["display:inline-block;width:14px;height:2px;background-size:14px 14px;background-color:", ";margin:0 0 0 ", ";", ""], function (props) {
38
- return themeGet("colors.grey")(props);
38
+ return themeGet("colors.greyDark")(props);
39
39
  }, function (props) {
40
40
  return themeGet("space.3")(props);
41
41
  }, function (props) {
@@ -45,11 +45,11 @@ var ChangeValue = styled.small.withConfig({
45
45
  displayName: "Card__ChangeValue",
46
46
  componentId: "sc-yfq75p-2"
47
47
  })(["display:flex;align-items:center;font-size:", ";font-weight:", ";color:", ";margin:0 0 0 ", ";"], function (props) {
48
- return themeGet("fontSizes.3")(props);
48
+ return themeGet("fontSizes.2")(props);
49
49
  }, function (props) {
50
50
  return themeGet("fontWeights.0")(props);
51
51
  }, function (props) {
52
- return themeGet("colors.grey")(props);
52
+ return themeGet("colors.greyDark")(props);
53
53
  }, function (props) {
54
54
  return themeGet("space.3")(props);
55
55
  });
@@ -88,7 +88,10 @@ export default function Card(_ref) {
88
88
  mr: "s"
89
89
  }) : null, title ? /*#__PURE__*/React.createElement(H3, null, title) : null, changeIcon ? /*#__PURE__*/React.createElement(ChangeIcon, {
90
90
  changeIcon: changeIcon
91
- }) : null, changeValue ? /*#__PURE__*/React.createElement(ChangeValue, null, changeValue) : null, subtitle ? /*#__PURE__*/React.createElement(H6, null, subtitle) : null), /*#__PURE__*/React.createElement(Box, null, children));
91
+ }) : null, changeValue ? /*#__PURE__*/React.createElement(ChangeValue, null, changeValue) : null, subtitle ? /*#__PURE__*/React.createElement(H4, {
92
+ fontSize: "1",
93
+ color: "greyDark"
94
+ }, subtitle) : null), /*#__PURE__*/React.createElement(Box, null, children));
92
95
  return theme ? /*#__PURE__*/React.createElement(ThemeProvider, {
93
96
  theme: theme
94
97
  }, component) : component;
@@ -45,7 +45,7 @@ export default function Loading(_ref) {
45
45
  var component = /*#__PURE__*/React.createElement(LoadingWrapper, _extends({}, props, {
46
46
  centered: centered
47
47
  }), /*#__PURE__*/React.createElement(LoadingIcon, {
48
- role: "image",
48
+ role: "img",
49
49
  "aria-label": ariaLabel,
50
50
  large: large,
51
51
  inverted: inverted,
@@ -1,5 +1,5 @@
1
1
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
- import React, { useState } from "react";
2
+ import React, { useRef, useState } from "react";
3
3
  import Button from "../Button";
4
4
  import Modal from ".";
5
5
  import { H3, P } from "../Typography";
@@ -17,6 +17,7 @@ var Basic = function Basic() {
17
17
  _useState2 = _slicedToArray(_useState, 2),
18
18
  visible = _useState2[0],
19
19
  setVisible = _useState2[1];
20
+ var button = useRef();
20
21
  var handleOnButtonClick = function handleOnButtonClick() {
21
22
  setVisible(true);
22
23
  };
@@ -29,11 +30,14 @@ var Basic = function Basic() {
29
30
  };
30
31
  };
31
32
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Button, {
33
+ ref: button,
32
34
  onClick: handleOnButtonClick
33
35
  }, "Open basic modal"), /*#__PURE__*/React.createElement(Modal, {
36
+ ariaLabel: "Modal Name",
34
37
  visible: visible,
35
38
  handleOnConfirm: handleOnConfirm,
36
- onClose: onToggleModal(false)
39
+ onClose: onToggleModal(false),
40
+ triggerRef: button
37
41
  }, /*#__PURE__*/React.createElement(Spacer, {
38
42
  mb: "r"
39
43
  }, /*#__PURE__*/React.createElement(H3, null, "Modal Title"), /*#__PURE__*/React.createElement(P, null, "Content of the modal. Modal accepts any child components or content."))));
@@ -41,11 +45,19 @@ var Basic = function Basic() {
41
45
  export var basicModal = function basicModal() {
42
46
  return /*#__PURE__*/React.createElement(Basic, null);
43
47
  };
48
+ basicModal.parameters = {
49
+ docs: {
50
+ source: {
51
+ code: "\nconst Basic = () => {\n const [visible, setVisible] = useState(false);\n const button = useRef();\n\n const handleOnButtonClick = () => {\n setVisible(true);\n };\n\n const handleOnConfirm = () => {\n setVisible(false);\n };\n\n const onToggleModal = (visible) => () => {\n setVisible(visible);\n };\n\n return (\n <>\n <Button ref={button} onClick={handleOnButtonClick}>\n Open basic modal\n </Button>\n <Modal\n ariaLabel=\"Modal Title\"\n visible={visible}\n handleOnConfirm={handleOnConfirm}\n onClose={onToggleModal(false)}\n triggerRef={button}\n >\n <Spacer mb=\"r\">\n <H3>Modal Title</H3>\n <P>\n Content of the modal. Modal accepts any child components or content.\n </P>\n </Spacer>\n </Modal>\n </>\n );\n};"
52
+ }
53
+ }
54
+ };
44
55
  var Advanced = function Advanced() {
45
56
  var _useState3 = useState(false),
46
57
  _useState4 = _slicedToArray(_useState3, 2),
47
58
  visible = _useState4[0],
48
59
  setVisible = _useState4[1];
60
+ var button = useRef();
49
61
  var handleOnButtonClick = function handleOnButtonClick() {
50
62
  setVisible(true);
51
63
  };
@@ -62,6 +74,7 @@ var Advanced = function Advanced() {
62
74
  onClick: handleOnConfirm
63
75
  }, "Go to full article");
64
76
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Button, {
77
+ ref: button,
65
78
  onClick: handleOnButtonClick
66
79
  }, "Open advanced modal"), /*#__PURE__*/React.createElement(Modal, {
67
80
  maxWidth: "500px",
@@ -72,7 +85,8 @@ var Advanced = function Advanced() {
72
85
  handleOnConfirm: handleOnConfirm,
73
86
  onClose: onToggleModal(false),
74
87
  headerContent: modalHeader,
75
- footerContent: modalFooter
88
+ footerContent: modalFooter,
89
+ triggerRef: button
76
90
  }, /*#__PURE__*/React.createElement(Spacer, {
77
91
  my: "r"
78
92
  }, /*#__PURE__*/React.createElement(P, null, "Content of the modal. Modal accepts any child components or content. This content will be scrollable if it exeeds the height of the modal."), /*#__PURE__*/React.createElement(P, null, "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. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."), /*#__PURE__*/React.createElement(P, null, "Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?"))));
@@ -80,11 +94,19 @@ var Advanced = function Advanced() {
80
94
  export var advancedModal = function advancedModal() {
81
95
  return /*#__PURE__*/React.createElement(Advanced, null);
82
96
  };
97
+ advancedModal.parameters = {
98
+ docs: {
99
+ source: {
100
+ code: "\nconst Advanced = () => {\n const [visible, setVisible] = useState(false);\n const button = useRef();\n\n const handleOnButtonClick = () => {\n setVisible(true);\n };\n\n const handleOnConfirm = () => {\n setVisible(false);\n };\n\n const onToggleModal = (visible) => () => {\n setVisible(visible);\n };\n\n const modalHeader = <H3>Modal Title</H3>;\n\n const modalFooter = (\n <Button onClick={handleOnConfirm}>Go to full article</Button>\n );\n\n return (\n <>\n <Button ref={button} onClick={handleOnButtonClick}>\n Open advanced modal\n </Button>\n <Modal\n maxWidth=\"500px\"\n maxHeight=\"400px\"\n height=\"90vh\"\n width=\"90vw\"\n visible={visible}\n handleOnConfirm={handleOnConfirm}\n onClose={onToggleModal(false)}\n headerContent={modalHeader}\n footerContent={modalFooter}\n triggerRef={button}\n >\n <Spacer my=\"r\">\n <P>\n Content of the modal. Modal accepts any child components or content.\n This content will be scrollable if it exeeds the height of the\n modal.\n </P>\n <P>\n Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do\n eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim\n ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut\n aliquip ex ea commodo consequat. Duis aute irure dolor in\n reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla\n pariatur. Excepteur sint occaecat cupidatat non proident, sunt in\n culpa qui officia deserunt mollit anim id est laborum.\n </P>\n <P>\n Sed ut perspiciatis unde omnis iste natus error sit voluptatem\n accusantium doloremque laudantium, totam rem aperiam, eaque ipsa\n quae ab illo inventore veritatis et quasi architecto beatae vitae\n dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit\n aspernatur aut odit aut fugit, sed quia consequuntur magni dolores\n eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est,\n qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit,\n sed quia non numquam eius modi tempora incidunt ut labore et dolore\n magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis\n nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut\n aliquid ex ea commodi consequatur? Quis autem vel eum iure\n reprehenderit qui in ea voluptate velit esse quam nihil molestiae\n consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla\n pariatur?\n </P>\n </Spacer>\n </Modal>\n </>\n );\n};"
101
+ }
102
+ }
103
+ };
83
104
  var BasicDialogue = function BasicDialogue() {
84
105
  var _useState5 = useState(false),
85
106
  _useState6 = _slicedToArray(_useState5, 2),
86
107
  visible = _useState6[0],
87
108
  setVisible = _useState6[1];
109
+ var button = useRef();
88
110
  var handleOnButtonClick = function handleOnButtonClick() {
89
111
  setVisible(true);
90
112
  };
@@ -106,6 +128,7 @@ var BasicDialogue = function BasicDialogue() {
106
128
  onClick: onToggleModal(false)
107
129
  }, "Cancel")));
108
130
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Button, {
131
+ ref: button,
109
132
  onClick: handleOnButtonClick,
110
133
  variant: "danger",
111
134
  iconLeft: true
@@ -115,7 +138,8 @@ var BasicDialogue = function BasicDialogue() {
115
138
  visible: visible,
116
139
  handleOnConfirm: handleOnConfirm,
117
140
  onClose: onToggleModal(false),
118
- footerContent: modalFooter
141
+ footerContent: modalFooter,
142
+ triggerRef: button
119
143
  }, /*#__PURE__*/React.createElement(Spacer, {
120
144
  mb: "r"
121
145
  }, /*#__PURE__*/React.createElement(P, {
@@ -126,11 +150,19 @@ var BasicDialogue = function BasicDialogue() {
126
150
  export var basicDialogueModal = function basicDialogueModal() {
127
151
  return /*#__PURE__*/React.createElement(BasicDialogue, null);
128
152
  };
153
+ basicDialogueModal.parameters = {
154
+ docs: {
155
+ source: {
156
+ code: "\nconst BasicDialogue = () => {\n const [visible, setVisible] = useState(false);\n const button = useRef();\n\n const handleOnButtonClick = () => {\n setVisible(true);\n };\n\n const handleOnConfirm = () => {\n setVisible(false);\n };\n\n const onToggleModal = (visible) => () => {\n setVisible(visible);\n };\n\n const modalFooter = (\n <Flex>\n <Spacer mr=\"s\">\n <Button onClick={handleOnConfirm} px=\"l\">\n OK\n </Button>\n <Button variant=\"ghost\" onClick={onToggleModal(false)}>\n Cancel\n </Button>\n </Spacer>\n </Flex>\n );\n\n return (\n <>\n <Button\n ref={button}\n onClick={handleOnButtonClick}\n variant=\"danger\"\n iconLeft\n >\n <Icon icon={[\"fas\", \"trash\"]} />\n Delete data\n </Button>\n <Modal\n visible={visible}\n handleOnConfirm={handleOnConfirm}\n onClose={onToggleModal(false)}\n footerContent={modalFooter}\n triggerRef={button}\n >\n <Spacer mb=\"r\">\n <P weight=\"bold\" marginBottom=\"sm\">\n This will remove all data from the application.\n </P>\n <P>Do you wish to continue?</P>\n </Spacer>\n </Modal>\n </>\n );\n};"
157
+ }
158
+ }
159
+ };
129
160
  var EditDialogue = function EditDialogue() {
130
161
  var _useState7 = useState(false),
131
162
  _useState8 = _slicedToArray(_useState7, 2),
132
163
  visible = _useState8[0],
133
164
  setVisible = _useState8[1];
165
+ var button = useRef();
134
166
  var handleOnButtonClick = function handleOnButtonClick() {
135
167
  setVisible(true);
136
168
  };
@@ -159,6 +191,7 @@ var EditDialogue = function EditDialogue() {
159
191
  icon: ["fas", "times"]
160
192
  }), "Cancel")));
161
193
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Button, {
194
+ ref: button,
162
195
  onClick: handleOnButtonClick,
163
196
  iconLeft: true
164
197
  }, /*#__PURE__*/React.createElement(Icon, {
@@ -168,7 +201,8 @@ var EditDialogue = function EditDialogue() {
168
201
  handleOnConfirm: handleOnConfirm,
169
202
  onClose: onToggleModal(false),
170
203
  headerContent: modalHeader,
171
- footerContent: modalFooter
204
+ footerContent: modalFooter,
205
+ triggerRef: button
172
206
  }, /*#__PURE__*/React.createElement(Spacer, {
173
207
  my: "r"
174
208
  }, /*#__PURE__*/React.createElement(TextInput, {
@@ -187,6 +221,13 @@ var EditDialogue = function EditDialogue() {
187
221
  export var editDialogueModal = function editDialogueModal() {
188
222
  return /*#__PURE__*/React.createElement(EditDialogue, null);
189
223
  };
224
+ editDialogueModal.parameters = {
225
+ docs: {
226
+ source: {
227
+ code: "\nconst EditDialogue = () => {\n const [visible, setVisible] = useState(false);\n const button = useRef();\n\n const handleOnButtonClick = () => {\n setVisible(true);\n };\n\n const handleOnConfirm = () => {\n setVisible(false);\n };\n\n const onToggleModal = (visible) => () => {\n setVisible(visible);\n };\n\n const modalHeader = <H3>Modify Details</H3>;\n\n const modalFooter = (\n <Flex>\n <Spacer mr=\"s\">\n <Button onClick={handleOnConfirm} variant=\"success\" iconLeft>\n <Icon icon={[\"fas\", \"save\"]} />\n Save\n </Button>\n <Button variant=\"ghost\" onClick={onToggleModal(false)} iconLeft>\n <Icon icon={[\"fas\", \"times\"]} />\n Cancel\n </Button>\n </Spacer>\n </Flex>\n );\n return (\n <>\n <Button ref={button} onClick={handleOnButtonClick} iconLeft>\n <Icon icon={[\"fas\", \"edit\"]} />\n Modify Details\n </Button>\n <Modal\n visible={visible}\n handleOnConfirm={handleOnConfirm}\n onClose={onToggleModal(false)}\n headerContent={modalHeader}\n footerContent={modalFooter}\n triggerRef={button}\n >\n <Spacer my=\"r\">\n <TextInput\n id=\"textInput1\"\n key=\"textInput1\"\n type=\"text\"\n fullWidth\n label=\"Name\"\n placeholder=\"E.g. Awesome Project\"\n />\n <TextArea id=\"TextArea01\" label=\"Description\" fullWidth />\n </Spacer>\n </Modal>\n </>\n );\n};"
228
+ }
229
+ }
230
+ };
190
231
  basicModal.__docgenInfo = {
191
232
  "description": "",
192
233
  "methods": [],
@@ -1,7 +1,8 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
+ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
3
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
- var _excluded = ["children", "width", "height", "maxWidth", "maxHeight", "minWidth", "minHeight", "overflow", "onClose", "theme", "visible", "overlayID", "modalID", "headerContent", "footerContent"];
4
- import React from "react";
4
+ var _excluded = ["children", "width", "height", "maxWidth", "maxHeight", "minWidth", "minHeight", "overflow", "onClose", "triggerRef", "theme", "visible", "overlayID", "modalID", "headerContent", "footerContent"];
5
+ import React, { useEffect, useMemo, useRef, useState } from "react";
5
6
  import ReactDOM from "react-dom";
6
7
  import useOnclickOutside from "react-cool-onclickoutside";
7
8
  import PropTypes from "prop-types";
@@ -80,6 +81,7 @@ var Modal = function Modal(_ref) {
80
81
  minHeight = _ref.minHeight,
81
82
  overflow = _ref.overflow,
82
83
  onClose = _ref.onClose,
84
+ triggerRef = _ref.triggerRef,
83
85
  theme = _ref.theme,
84
86
  visible = _ref.visible,
85
87
  overlayID = _ref.overlayID,
@@ -93,14 +95,56 @@ var Modal = function Modal(_ref) {
93
95
  var modalRef = useOnclickOutside(function () {
94
96
  onClose();
95
97
  }, options);
98
+ var ariaLabel = useMemo(function () {
99
+ if (restProps.ariaLabel) {
100
+ return restProps.ariaLabel;
101
+ } else if (typeof headerContent === "string") {
102
+ return headerContent;
103
+ }
104
+ }, [restProps.ariaLabel, headerContent]);
96
105
  useKeyPress(commonKeys.ESCAPE, onClose, options);
97
106
  useKeyPress(commonKeys.ESC, onClose, options);
107
+
108
+ // Initial focus point for keyboard navigation
109
+ var top = useRef();
110
+
111
+ // If bottom becomes focused then re-focus the close button
112
+ var bottom = useRef();
113
+
114
+ // Ref to close button
115
+ var button = useRef();
116
+
117
+ // Keep trak on whether its been visible
118
+ var _useState = useState(visible),
119
+ _useState2 = _slicedToArray(_useState, 2),
120
+ hasOpened = _useState2[0],
121
+ setHasOpened = _useState2[1];
122
+
123
+ // On becoming visible focus the top
124
+ useEffect(function () {
125
+ if (visible) {
126
+ top.current.focus();
127
+ setHasOpened(true);
128
+ } else if (hasOpened) {
129
+ triggerRef && triggerRef.current.focus();
130
+ }
131
+ }, [visible, hasOpened, top, triggerRef]);
98
132
  var component = /*#__PURE__*/React.createElement(Overlay, _extends({
99
133
  alignItems: "center",
100
134
  justifyContent: "center",
101
135
  id: overlayID
102
- }, restProps), /*#__PURE__*/React.createElement("div", {
103
- ref: modalRef
136
+ }, restProps), /*#__PURE__*/React.createElement("span", {
137
+ tabIndex: "0",
138
+ ref: top,
139
+ onFocus: function onFocus() {
140
+ return bottom.current.focus();
141
+ }
142
+ }), /*#__PURE__*/React.createElement("div", {
143
+ ref: modalRef,
144
+ role: "dialog",
145
+ "aria-modal": "true",
146
+ "aria-label": ariaLabel,
147
+ tabIndex: "-1"
104
148
  }, /*#__PURE__*/React.createElement(Container, {
105
149
  width: width,
106
150
  height: height,
@@ -117,19 +161,23 @@ var Modal = function Modal(_ref) {
117
161
  mr: "xl",
118
162
  width: "100%"
119
163
  }, headerContent), /*#__PURE__*/React.createElement(CloseButton, {
164
+ ref: button,
120
165
  onClick: onClose,
121
166
  className: "modal-close",
122
167
  small: true,
123
- px: "6px"
168
+ px: "6px",
169
+ "aria-label": "Close dialog"
124
170
  }, /*#__PURE__*/React.createElement(Icon, {
125
171
  icon: ["fas", "times"],
126
172
  color: "greyDark",
127
173
  size: "lg"
128
174
  }))) : /*#__PURE__*/React.createElement(CloseButton, {
175
+ ref: button,
129
176
  onClick: onClose,
130
177
  className: "modal-close",
131
178
  small: true,
132
- px: "6px"
179
+ px: "6px",
180
+ "aria-label": "Close dialog"
133
181
  }, /*#__PURE__*/React.createElement(Icon, {
134
182
  icon: ["fas", "times"],
135
183
  color: "greyDark",
@@ -137,7 +185,15 @@ var Modal = function Modal(_ref) {
137
185
  })), /*#__PURE__*/React.createElement(ScrollableContent, {
138
186
  headerContent: headerContent,
139
187
  overflow: overflow
140
- }, children), footerContent && /*#__PURE__*/React.createElement(FooterContent, null, footerContent))));
188
+ }, children), footerContent && /*#__PURE__*/React.createElement(FooterContent, null, footerContent))), /*#__PURE__*/React.createElement("span", {
189
+ ref: bottom,
190
+ tabIndex: "-1"
191
+ }), /*#__PURE__*/React.createElement("span", {
192
+ tabIndex: "0",
193
+ onFocus: function onFocus() {
194
+ return button.current.focus();
195
+ }
196
+ }));
141
197
  var wrapper = visible && /*#__PURE__*/ReactDOM.createPortal(theme ? /*#__PURE__*/React.createElement(ThemeProvider, {
142
198
  theme: theme
143
199
  }, component) : component, document.body);
@@ -168,6 +224,10 @@ Modal.propTypes = {
168
224
  visible: PropTypes.bool,
169
225
  /** Specifies the function to run on clicking X icon. Ensure that this function will close Modal through the `visible` prop */
170
226
  onClose: PropTypes.func,
227
+ /** Required to re-focus keyboard navigation after closing a modal, generally a ref to the button */
228
+ triggerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
229
+ current: PropTypes.any
230
+ })]),
171
231
  /** Specifies whether the Modal overflow is visible or not, default is `hidden`. If height is not enough, vertical scrollbar will be displayed (`overflow-y: auto`) */
172
232
  overflow: PropTypes.string,
173
233
  /** Specifies the id of the overlay element for targeting */
@@ -175,7 +235,9 @@ Modal.propTypes = {
175
235
  /** Specifies the id of the modal element for targeting */
176
236
  modalID: PropTypes.string,
177
237
  /** Sets the theme for the Modal */
178
- theme: PropTypes.object
238
+ theme: PropTypes.object,
239
+ /** Specifies the aria-label for the modal. Set this if headerContent is not defined as a string. */
240
+ ariaLabel: PropTypes.string
179
241
  };
180
242
  Modal.defaultProps = {
181
243
  width: "350px",
@@ -322,6 +384,24 @@ Modal.__docgenInfo = {
322
384
  },
323
385
  "required": false
324
386
  },
387
+ "triggerRef": {
388
+ "description": "Required to re-focus keyboard navigation after closing a modal, generally a ref to the button",
389
+ "type": {
390
+ "name": "union",
391
+ "value": [{
392
+ "name": "func"
393
+ }, {
394
+ "name": "shape",
395
+ "value": {
396
+ "current": {
397
+ "name": "any",
398
+ "required": false
399
+ }
400
+ }
401
+ }]
402
+ },
403
+ "required": false
404
+ },
325
405
  "overflow": {
326
406
  "description": "Specifies whether the Modal overflow is visible or not, default is `hidden`. If height is not enough, vertical scrollbar will be displayed (`overflow-y: auto`)",
327
407
  "type": {
@@ -335,6 +415,13 @@ Modal.__docgenInfo = {
335
415
  "name": "object"
336
416
  },
337
417
  "required": false
418
+ },
419
+ "ariaLabel": {
420
+ "description": "Specifies the aria-label for the modal. Set this if headerContent is not defined as a string.",
421
+ "type": {
422
+ "name": "string"
423
+ },
424
+ "required": false
338
425
  }
339
426
  }
340
427
  };
@@ -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
- closable: false
64
- }, "In progress notification with disabled close. E.g. Importing data..."), /*#__PURE__*/React.createElement(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 with enabled close and specified colour."));
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.warningDark")(props)
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.warningDark")
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 Close = styled("button").withConfig({
88
- displayName: "Notification__Close",
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.6",
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(LoadingIcon, null), /*#__PURE__*/React.createElement(NotificationContent, {
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(Close, {
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(CloseIcon, null)));
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: "110px",
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: "110px",
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 = ["theme", "icon", "children"];
3
+ var _excluded = ["icon", "children"];
4
4
  import React from "react";
5
5
  import PropTypes from "prop-types";
6
- import styled, { ThemeProvider } from "styled-components";
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 theme = _ref.theme,
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(ThemeProvider, {
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: "greyDarker",
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.greyDark")(props),
35
+ color: themeGet("colors.greyDarker")(props),
36
36
  display: "flex",
37
37
  alignItems: "center",
38
38
  position: "relative",
@@ -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.warningDark")(props) : themeGet("colors.primary")(props);
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
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.warningDark")(props) : props.selected ? themeGet("colors.primary")(props) : themeGet("colors.white")(props);
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.white")(props) : props.selected ? themeGet("colors.white")(props) : themeGet("colors.primary")(props);
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.warningDarker")(props)) : "solid 1px ".concat(themeGet("colors.primaryDark")(props));
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.warningDarker")(props) : props.selected ? themeGet("colors.primaryDark")(props) : themeGet("colors.primaryLightest")(props);
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(0,0,0,0.2)" : props.selected ? "rgba(0,0,0,0.3)" : themeGet("colors.primaryLighter")(props);
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({
@@ -101,9 +101,9 @@ var TagType = styled.div.withConfig({
101
101
  }, function (props) {
102
102
  return props.small ? "1rem" : themeGet("fontSizes.0")(props);
103
103
  }, function (props) {
104
- return props.disabled ? themeGet("colors.grey")(props) : props.selected && props.highlighted ? "rgba(0,0,0,0.2)" : props.selected ? "rgba(0,0,0,0.25)" : themeGet("colors.primaryLightest")(props);
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);
105
105
  }, function (props) {
106
- return props.disabled ? themeGet("colors.white")(props) : props.selected && props.highlighted ? themeGet("colors.white")(props) : props.selected ? themeGet("colors.white")(props) : themeGet("colors.primary")(props);
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);
107
107
  });
108
108
  var TagAvatar = styled(Avatar).withConfig({
109
109
  displayName: "Tag__TagAvatar",
@@ -117,9 +117,9 @@ var TagAvatar = styled(Avatar).withConfig({
117
117
  }, function (props) {
118
118
  return props.small ? themeGet("tagScale.tagAvatarFontSizeSmall") : themeGet("tagScale.tagAvatarFontSizeDefault");
119
119
  }, function (props) {
120
- return props.disabled ? themeGet("colors.grey")(props) : props.selected && props.highlighted ? "rgba(0,0,0,0.2)" : props.selected ? "rgba(0,0,0,0.25)" : themeGet("colors.primaryLightest")(props);
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);
121
121
  }, function (props) {
122
- return props.disabled ? themeGet("colors.white")(props) : props.selected && props.highlighted ? themeGet("colors.white")(props) : props.selected ? themeGet("colors.white")(props) : themeGet("colors.primary")(props);
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);
123
123
  });
124
124
 
125
125
  /**
@@ -165,6 +165,7 @@ export default function Tag(_ref) {
165
165
  highlighted: highlighted,
166
166
  disabled: disabled,
167
167
  small: small,
168
+ imageAlt: "Avatar for ".concat(children),
168
169
  image: personEntity.avatarSrc,
169
170
  initials: personEntity.initials
170
171
  }), /*#__PURE__*/React.createElement(TagValueText, {
@@ -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.grey")(props);
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.thinOutline")(props) + " " + themeGet("colors.black30")(props), themeGet("colors.greyDark")(props)) : css([""]);
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.thinOutline")(props) + " " + themeGet("colors.black30")(props);
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.grey")(props)
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 = "10px";
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
- // OLD COLOUR PALETTE
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 = "#0091EA"; // Potential new colour: #2a5ec1. Base primary brand colour (blue) - Mainly used for buttons, links and selected states
56
- var secondary = "#9B51E0"; // Change to #7211ED with new colour palette. Potential new purple colour. Introduce new secondary colour maybe purple when we re-design our colour palette
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 = "#1BC363"; // Base brand success colour (green) - Mainly used to indicate success, status=good, valid, add, or save states
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 = "#ffbc00"; // Base brand warning colour - Mainly used to indicate warnings, slipping or near due states
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 = "#EC465A"; // Base brand danger/error colour - Mainly used to indicate error, status=bad, at risk or over due states
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.45, primary),
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.3, secondary),
114
- secondaryEvenLighter: lighten(0.35, secondary),
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.3, successDesaturated),
150
- successEvenLighter: lighten(0.45, successDesaturated),
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.3, warning),
167
- warningDark: darken(0.03, warningSaturated),
168
- warningDarker: darken(0.08, warningSaturated),
169
- warningDarkest: darken(0.25, warningSaturated),
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.25, danger),
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),
package/es/systemtheme.js CHANGED
@@ -36,29 +36,18 @@ sizes.xl = sizes[6];
36
36
  sizes.xxl = sizes[7];
37
37
  sizes.xxxl = sizes[8];
38
38
 
39
- // OLD COLOUR PALETTE
40
- // const black = "#000";
41
- // const white = "#fff";
42
- // const grey = "#90979A"; // Base grey - Mainly used for UI elements like backgrounds, muted text, icons, dividers or borders
43
- // const primary = "#30ABD6"; // Potential new colour: #2a5ec1. Base primary brand colour (blue) - Mainly used for buttons, links and selected states
44
- // 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
45
- // const success = "#ACD036"; // Base brand success colour (green) - Mainly used to indicate success, status=good, valid, add, or save states
46
- // // const successDesaturated = desaturate(0.1, success); // This is because the lighter versions of success were too saturated and 'minty' coloured.
47
- // const warning = "#EDC652"; // Base brand warning colour - Mainly used to indicate warnings, slipping or near due states
48
- // const danger = "#D42A59"; // Base brand danger/error colour - Mainly used to indicate error, status=bad, at risk or over due states
49
-
50
- // NEW COLOUR PALETTE
39
+ // NEW ACCESSIBLE COLOUR PALETTE
51
40
  var black = "#000";
52
41
  var white = "#fff";
53
42
  var grey = "#90979A"; // Base grey - Mainly used for UI elements like backgrounds, muted text, icons, dividers or borders
54
- var primary = "#0091EA"; // Potential new colour: #2a5ec1. Base primary brand colour (blue) - Mainly used for buttons, links and selected states
55
- var secondary = "#9B51E0"; // Change to #7211ED with new colour palette. Potential new purple colour. Introduce new secondary colour maybe purple when we re-design our colour palette
43
+ var primary = "#007BC7"; // Potential new colour: #2a5ec1. Base primary brand colour (blue) - Mainly used for buttons, links and selected states
44
+ 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
56
45
  //const tertiary = "#FF9E44"; // A tertiary colour for limited use. Not sure if needed.
57
- var success = "#1BC363"; // Base brand success colour (green) - Mainly used to indicate success, status=good, valid, add, or save states
46
+ var success = "#00883b"; // Base brand success colour (green) - Mainly used to indicate success, status=good, valid, add, or save states
58
47
  var successDesaturated = desaturate(0.1, success); // This is because the lighter versions of success were too saturated and 'minty' coloured.
59
- var warning = "#ffbc00"; // Base brand warning colour - Mainly used to indicate warnings, slipping or near due states
48
+ var warning = "#ffb71c"; // Base brand warning colour - Mainly used to indicate warnings, slipping or near due states
60
49
  var warningSaturated = saturate(1, warning); // This is because the darker versions of warning were too under saturated and mustard looking.
61
- var danger = "#EC465A"; // Base brand danger/error colour - Mainly used to indicate error, status=bad, at risk or over due states
50
+ var danger = "#d90f27"; // Base brand danger/error colour - Mainly used to indicate error, status=bad, at risk or over due states
62
51
 
63
52
  export var colors = {
64
53
  /* Greyscale */
@@ -92,8 +81,8 @@ export var colors = {
92
81
  /* Colours */
93
82
  primary: primary,
94
83
  primaryLight: lighten(0.2, primary),
95
- primaryLighter: lighten(0.35, primary),
96
- primaryLightest: lighten(0.45, primary),
84
+ primaryLighter: lighten(0.45, primary),
85
+ primaryLightest: lighten(0.55, primary),
97
86
  primaryDark: darken(0.1, primary),
98
87
  primaryDarker: darken(0.25, primary),
99
88
  primaryDarkest: darken(0.35, primary),
@@ -109,8 +98,8 @@ export var colors = {
109
98
  secondary: secondary,
110
99
  secondaryLight: lighten(0.1, secondary),
111
100
  secondaryLighter: lighten(0.2, secondary),
112
- secondaryLightest: lighten(0.3, secondary),
113
- secondaryEvenLighter: lighten(0.35, secondary),
101
+ secondaryLightest: lighten(0.35, secondary),
102
+ secondaryEvenLighter: lighten(0.4, secondary),
114
103
  secondaryDark: darken(0.1, secondary),
115
104
  secondaryDarker: darken(0.2, secondary),
116
105
  secondaryDarkest: darken(0.3, secondary),
@@ -145,8 +134,8 @@ export var colors = {
145
134
  // successLightest: lighten(0.35, success),
146
135
  successLight: lighten(0.11, successDesaturated),
147
136
  successLighter: lighten(0.25, successDesaturated),
148
- successLightest: lighten(0.3, successDesaturated),
149
- successEvenLighter: lighten(0.45, successDesaturated),
137
+ successLightest: lighten(0.5, successDesaturated),
138
+ successEvenLighter: lighten(0.55, successDesaturated),
150
139
  successDark: darken(0.1, success),
151
140
  successDarker: darken(0.2, success),
152
141
  successDarkest: darken(0.3, success),
@@ -160,12 +149,12 @@ export var colors = {
160
149
  success80: rgba(success, 0.8),
161
150
  success90: rgba(success, 0.9),
162
151
  warning: warning,
163
- warningLight: lighten(0.15, warning),
164
- warningLighter: lighten(0.25, warning),
165
- warningLightest: lighten(0.3, warning),
166
- warningDark: darken(0.03, warningSaturated),
167
- warningDarker: darken(0.08, warningSaturated),
168
- warningDarkest: darken(0.25, warningSaturated),
152
+ warningLight: lighten(0.15, warningSaturated),
153
+ warningLighter: lighten(0.25, warningSaturated),
154
+ warningLightest: lighten(0.4, warningSaturated),
155
+ warningDark: darken(0.1, warningSaturated),
156
+ warningDarker: darken(0.2, warningSaturated),
157
+ warningDarkest: darken(0.3, warningSaturated),
169
158
  warning10: rgba(warning, 0.1),
170
159
  warning20: rgba(warning, 0.2),
171
160
  warning30: rgba(warning, 0.3),
@@ -178,7 +167,7 @@ export var colors = {
178
167
  danger: danger,
179
168
  dangerLight: lighten(0.1, danger),
180
169
  dangerLighter: lighten(0.2, danger),
181
- dangerLightest: lighten(0.25, danger),
170
+ dangerLightest: lighten(0.35, danger),
182
171
  dangerDark: darken(0.1, danger),
183
172
  dangerDarker: darken(0.25, danger),
184
173
  dangerDarkest: darken(0.35, danger),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orcs-design-system",
3
- "version": "3.1.12",
3
+ "version": "3.1.14",
4
4
  "engines": {
5
5
  "node": "18.17.1"
6
6
  },