orcs-design-system 3.1.14 → 3.1.16

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.
@@ -66,11 +66,7 @@ var Item = styled("span").withConfig({
66
66
  bg: themeGet("colors.primaryLight")(props)
67
67
  },
68
68
  secondary: {
69
- color: themeGet("colors.secondaryDarker")(props),
70
- bg: themeGet("colors.secondaryLightest")(props)
71
- },
72
- secondaryPending: {
73
- color: themeGet("colors.secondary")(props),
69
+ color: themeGet("colors.secondaryDarkest")(props),
74
70
  bg: themeGet("colors.secondaryEvenLighter")(props)
75
71
  }
76
72
  }
@@ -3,17 +3,15 @@ import Box from "../Box";
3
3
  import { ButtonGroupContainer, ButtonGroupItem } from ".";
4
4
  export default {
5
5
  title: "Components/ButtonGroup",
6
- decorators: [function (storyFn) {
7
- return /*#__PURE__*/React.createElement(Box, {
8
- bg: "greyDark",
9
- p: "r"
10
- }, storyFn());
11
- }],
12
6
  component: ButtonGroupContainer
13
7
  };
14
8
  export var defaultButtonGroup = function defaultButtonGroup() {
15
- return /*#__PURE__*/React.createElement(ButtonGroupContainer, {
16
- controlLabel: "View:"
9
+ return /*#__PURE__*/React.createElement(Box, {
10
+ bg: "white",
11
+ p: "r"
12
+ }, /*#__PURE__*/React.createElement(ButtonGroupContainer, {
13
+ controlLabel: "View:",
14
+ labelDark: true
17
15
  }, /*#__PURE__*/React.createElement(ButtonGroupItem, {
18
16
  name: "viewMode",
19
17
  label: "Chapters",
@@ -27,13 +25,42 @@ export var defaultButtonGroup = function defaultButtonGroup() {
27
25
  name: "viewMode",
28
26
  label: "Constraints",
29
27
  value: "Constraints view"
30
- }));
28
+ })));
31
29
  };
32
30
  defaultButtonGroup.story = {
33
31
  name: "Default button group"
34
32
  };
33
+ export var invertedButtonGroup = function invertedButtonGroup() {
34
+ return /*#__PURE__*/React.createElement(Box, {
35
+ bg: "greyDark",
36
+ p: "r"
37
+ }, /*#__PURE__*/React.createElement(ButtonGroupContainer, {
38
+ controlLabel: "View:"
39
+ }, /*#__PURE__*/React.createElement(ButtonGroupItem, {
40
+ name: "viewMode",
41
+ label: "Chapters",
42
+ value: "Chapters view"
43
+ }), /*#__PURE__*/React.createElement(ButtonGroupItem, {
44
+ name: "viewMode",
45
+ label: "Groups",
46
+ value: "Groups view",
47
+ checked: true
48
+ }), /*#__PURE__*/React.createElement(ButtonGroupItem, {
49
+ name: "viewMode",
50
+ label: "Constraints",
51
+ value: "Constraints view"
52
+ })));
53
+ };
54
+ invertedButtonGroup.story = {
55
+ name: "Inverted button group"
56
+ };
35
57
  defaultButtonGroup.__docgenInfo = {
36
58
  "description": "",
37
59
  "methods": [],
38
60
  "displayName": "defaultButtonGroup"
61
+ };
62
+ invertedButtonGroup.__docgenInfo = {
63
+ "description": "",
64
+ "methods": [],
65
+ "displayName": "invertedButtonGroup"
39
66
  };
@@ -1,6 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
- var _excluded = ["children", "theme", "controlLabel"];
3
+ var _excluded = ["children", "theme", "controlLabel", "labelDark"];
4
4
  import PropTypes from "prop-types";
5
5
  import React from "react";
6
6
  import styled, { ThemeProvider } from "styled-components";
@@ -12,7 +12,7 @@ var ButtonGroupControlLabel = styled("div").withConfig({
12
12
  componentId: "sc-g7627n-0"
13
13
  })(function (props) {
14
14
  return css({
15
- color: themeGet("colors.white")(props),
15
+ color: props.labelDark ? themeGet("colors.greyDark") : themeGet("colors.white")(props),
16
16
  fontSize: themeGet("fontSizes.1")(props),
17
17
  fontWeight: themeGet("fontWeights.1")(props),
18
18
  marginRight: themeGet("space.3")(props)
@@ -27,7 +27,8 @@ var ButtonGroupWrapper = styled("div").withConfig({
27
27
  alignItems: "center",
28
28
  background: themeGet("colors.greyDarker")(props),
29
29
  borderRadius: themeGet("radii.2")(props),
30
- padding: "2px"
30
+ padding: "4px",
31
+ height: themeGet("appScale.inputHeightDefault")(props)
31
32
  });
32
33
  });
33
34
  var ButtonGroupRadio = styled.input.attrs({
@@ -62,10 +63,9 @@ var ButtonGroupLabel = styled("label").withConfig({
62
63
  return css({
63
64
  height: "100%",
64
65
  borderRadius: themeGet("radii.2")(props),
65
- margin: "2px",
66
66
  display: "flex",
67
67
  alignItems: "center",
68
- padding: "".concat(themeGet("space.1")(props), " ").concat(themeGet("space.3")(props)),
68
+ padding: "0 ".concat(themeGet("space.3")(props)),
69
69
  transition: themeGet("transition.transitionDefault")(props),
70
70
  fontSize: themeGet("fontSizes.1")(props),
71
71
  fontWeight: themeGet("fontWeights.2")(props),
@@ -74,6 +74,9 @@ var ButtonGroupLabel = styled("label").withConfig({
74
74
  backgroundColor: props.checked ? themeGet("colors.white")(props) : "#5e686d",
75
75
  "&:hover": {
76
76
  backgroundColor: props.checked ? themeGet("colors.white")(props) : themeGet("colors.primary")(props)
77
+ },
78
+ "&:not(:last-of-type)": {
79
+ marginRight: "4px"
77
80
  }
78
81
  });
79
82
  });
@@ -84,10 +87,13 @@ export var ButtonGroupContainer = function ButtonGroupContainer(_ref) {
84
87
  var children = _ref.children,
85
88
  theme = _ref.theme,
86
89
  controlLabel = _ref.controlLabel,
90
+ labelDark = _ref.labelDark,
87
91
  props = _objectWithoutProperties(_ref, _excluded);
88
92
  var component = /*#__PURE__*/React.createElement(Flex, _extends({
89
93
  alignItems: "center"
90
- }, props), controlLabel && /*#__PURE__*/React.createElement(ButtonGroupControlLabel, null, controlLabel), /*#__PURE__*/React.createElement(ButtonGroupWrapper, null, children));
94
+ }, props), controlLabel && /*#__PURE__*/React.createElement(ButtonGroupControlLabel, {
95
+ labelDark: labelDark
96
+ }, controlLabel), /*#__PURE__*/React.createElement(ButtonGroupWrapper, null, children));
91
97
  return theme ? /*#__PURE__*/React.createElement(ThemeProvider, {
92
98
  theme: theme
93
99
  }, component) : component;
@@ -116,6 +122,7 @@ export var ButtonGroupItem = function ButtonGroupItem(_ref2) {
116
122
  ButtonGroupContainer.propTypes = {
117
123
  children: PropTypes.node,
118
124
  controlLabel: PropTypes.string,
125
+ labelDark: PropTypes.bool,
119
126
  theme: PropTypes.object
120
127
  };
121
128
  ButtonGroupItem.propTypes = {
@@ -145,6 +152,13 @@ ButtonGroupContainer.__docgenInfo = {
145
152
  },
146
153
  "required": false
147
154
  },
155
+ "labelDark": {
156
+ "description": "",
157
+ "type": {
158
+ "name": "bool"
159
+ },
160
+ "required": false
161
+ },
148
162
  "theme": {
149
163
  "description": "",
150
164
  "type": {
@@ -56,7 +56,7 @@ var NotificationWrapper = styled("div").withConfig({
56
56
  },
57
57
  warning: {
58
58
  bg: themeGet("colors.warningLight")(props),
59
- color: themeGet("colors.black70")(props)
59
+ color: themeGet("colors.black80")(props)
60
60
  },
61
61
  "default": {}
62
62
  }
@@ -71,7 +71,7 @@ var NotificationWrapper = styled("div").withConfig({
71
71
  },
72
72
  warning: {
73
73
  bg: themeGet("colors.warningLight"),
74
- color: themeGet("colors.black70")
74
+ color: themeGet("colors.black80")
75
75
  },
76
76
  "default": {
77
77
  bg: themeGet("colors.primaryDark")
@@ -114,7 +114,7 @@ var NotificationIcon = styled(Icon).withConfig({
114
114
  componentId: "sc-1p26rkq-3"
115
115
  })(function (props) {
116
116
  return css({
117
- color: props.colour === "warning" ? themeGet("colors.black70")(props) : themeGet("colors.white")(props),
117
+ color: props.colour === "warning" ? themeGet("colors.black80")(props) : themeGet("colors.white")(props),
118
118
  fontSize: themeGet("fontSizes.2")(props),
119
119
  mr: "s"
120
120
  });
@@ -190,7 +190,7 @@ export default function Notification(_ref) {
190
190
  }, /*#__PURE__*/React.createElement(Icon, {
191
191
  icon: ["fas", "times"],
192
192
  size: "lg",
193
- color: colour === "warning" ? "black70" : "white"
193
+ color: colour === "warning" ? "black80" : "white"
194
194
  })));
195
195
  return theme ? /*#__PURE__*/React.createElement(ThemeProvider, {
196
196
  theme: theme
@@ -41,7 +41,7 @@ var TagValue = styled.button.attrs(function (props) {
41
41
  }, function (props) {
42
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.black70")(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.black80")(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
47
  return props.selected && props.highlighted ? "solid 1px ".concat(themeGet("colors.warningLighter")(props)) : "solid 1px ".concat(themeGet("colors.primaryDark")(props));
@@ -103,7 +103,7 @@ var TagType = styled.div.withConfig({
103
103
  }, function (props) {
104
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.warningDarkest")(props) : props.selected ? themeGet("colors.white")(props) : themeGet("colors.primaryDark")(props);
106
+ return props.disabled ? themeGet("colors.white")(props) : props.selected && props.highlighted ? themeGet("colors.black70")(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,7 +117,7 @@ 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 ? themeGet("colors.warningDarkest")(props) : 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.black70")(props) : props.selected ? "rgba(0,0,0,0.25)" : themeGet("colors.primaryLightest")(props);
121
121
  }, function (props) {
122
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
  });
@@ -45,7 +45,7 @@ var primary = "#007ac4"; // Potential new colour: #2a5ec1. Base primary brand co
45
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
46
46
  //const tertiary = "#FF9E44"; // A tertiary colour for limited use. Not sure if needed.
47
47
  var success = "#00883b"; // Base brand success colour (green) - Mainly used to indicate success, status=good, valid, add, or save states
48
- var successDesaturated = desaturate(0.1, success); // This is because the lighter versions of success were too saturated and 'minty' coloured.
48
+ var successDesaturated = desaturate(0.3, success); // This is because the lighter versions of success were too saturated and 'minty' coloured.
49
49
  var warning = "#ffb71c"; // Base brand warning colour - Mainly used to indicate warnings, slipping or near due states
50
50
  var warningSaturated = saturate(1, warning); // This is because the darker versions of warning were too under saturated and mustard looking.
51
51
  var danger = "#d90f27"; // Base brand danger/error colour - Mainly used to indicate error, status=bad, at risk or over due states
@@ -155,7 +155,7 @@ export var colors = {
155
155
  warningLightest: lighten(0.4, warning),
156
156
  warningDark: darken(0.1, warningSaturated),
157
157
  warningDarker: darken(0.2, warningSaturated),
158
- warningDarkest: darken(0.3, warningSaturated),
158
+ warningDarkest: darken(0.4, warningSaturated),
159
159
  warning10: rgba(warning, 0.1),
160
160
  warning20: rgba(warning, 0.2),
161
161
  warning30: rgba(warning, 0.3),
package/es/systemtheme.js CHANGED
@@ -44,7 +44,7 @@ var primary = "#007BC7"; // Potential new colour: #2a5ec1. Base primary brand co
44
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
45
45
  //const tertiary = "#FF9E44"; // A tertiary colour for limited use. Not sure if needed.
46
46
  var success = "#00883b"; // Base brand success colour (green) - Mainly used to indicate success, status=good, valid, add, or save states
47
- var successDesaturated = desaturate(0.1, success); // This is because the lighter versions of success were too saturated and 'minty' coloured.
47
+ var successDesaturated = desaturate(0.3, success); // This is because the lighter versions of success were too saturated and 'minty' coloured.
48
48
  var warning = "#ffb71c"; // Base brand warning colour - Mainly used to indicate warnings, slipping or near due states
49
49
  var warningSaturated = saturate(1, warning); // This is because the darker versions of warning were too under saturated and mustard looking.
50
50
  var danger = "#d90f27"; // Base brand danger/error colour - Mainly used to indicate error, status=bad, at risk or over due states
@@ -154,7 +154,7 @@ export var colors = {
154
154
  warningLightest: lighten(0.4, warningSaturated),
155
155
  warningDark: darken(0.1, warningSaturated),
156
156
  warningDarker: darken(0.2, warningSaturated),
157
- warningDarkest: darken(0.3, warningSaturated),
157
+ warningDarkest: darken(0.4, warningSaturated),
158
158
  warning10: rgba(warning, 0.1),
159
159
  warning20: rgba(warning, 0.2),
160
160
  warning30: rgba(warning, 0.3),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orcs-design-system",
3
- "version": "3.1.14",
3
+ "version": "3.1.16",
4
4
  "engines": {
5
5
  "node": "18.17.1"
6
6
  },