carbon-react 104.48.0 → 104.50.0

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.
@@ -1,14 +1,12 @@
1
1
  import styled, { css } from "styled-components";
2
- import baseTheme from "../../style/themes/base";
3
2
  const StyledCharacterCount = styled.div`
4
3
  text-align: right;
5
4
  font-size: 12px;
6
5
  margin-top: 4px;
7
6
  margin-bottom: 4px;
8
7
  color: ${({
9
- theme,
10
8
  isOverLimit
11
- }) => isOverLimit ? theme.colors.error : theme.disabled.disabled};
9
+ }) => isOverLimit ? "var(--colorsSemanticNegative500)" : "var(--colorsUtilityYin055)"};
12
10
 
13
11
  ${({
14
12
  isOverLimit
@@ -16,7 +14,4 @@ const StyledCharacterCount = styled.div`
16
14
  font-weight: 700;
17
15
  `}
18
16
  `;
19
- StyledCharacterCount.defaultProps = {
20
- theme: baseTheme
21
- };
22
17
  export default StyledCharacterCount;
@@ -5,7 +5,6 @@ import { FieldLineStyle } from "../form-field/form-field.style";
5
5
  import HiddenCheckableInputStyle from "./hidden-checkable-input.style";
6
6
  import LabelStyle, { StyledLabelContainer } from "../label/label.style";
7
7
  import StyledHelp from "../../components/help/help.style";
8
- import baseTheme from "../../style/themes/base";
9
8
  import StyledValidationIcon from "../validations/validation-icon.style";
10
9
  const StyledCheckableInput = styled.div`
11
10
  display: inline-block;
@@ -18,8 +17,7 @@ const StyledCheckableInputWrapper = styled.div`
18
17
  inputWidth,
19
18
  labelWidth,
20
19
  labelInline,
21
- reverse,
22
- theme
20
+ reverse
23
21
  }) => css`
24
22
  ${FieldLineStyle} {
25
23
  display: flex;
@@ -33,12 +31,12 @@ const StyledCheckableInputWrapper = styled.div`
33
31
  width: auto;
34
32
 
35
33
  & ${StyledHelp}, & ${StyledValidationIcon} {
36
- color: ${theme.help.color};
34
+ color: var(--colorsUtilityYin065);
37
35
  vertical-align: middle;
38
36
 
39
37
  &:hover,
40
38
  &:focus {
41
- color: ${theme.text.color};
39
+ color: var(--colorsUtilityYin090);
42
40
  }
43
41
  }
44
42
  }
@@ -103,10 +101,6 @@ StyledCheckableInputWrapper.propTypes = {
103
101
  disabled: PropTypes.bool,
104
102
  fieldHelpInline: PropTypes.bool,
105
103
  inputWidth: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
106
- labelWidth: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
107
- theme: PropTypes.object
108
- };
109
- StyledCheckableInputWrapper.defaultProps = {
110
- theme: baseTheme
104
+ labelWidth: PropTypes.oneOfType([PropTypes.number, PropTypes.string])
111
105
  };
112
106
  export { StyledCheckableInput, StyledCheckableInputWrapper };
@@ -10,7 +10,7 @@ export const StyledInputPresentationContainer = styled.div`
10
10
  `;
11
11
  const InputPresentationStyle = styled.div`
12
12
  align-items: stretch;
13
- background: #fff;
13
+ background: var(--colorsUtilityYang100);
14
14
  border: 1px solid var(--colorsUtilityMajor300);
15
15
  box-sizing: border-box;
16
16
  cursor: text;
@@ -1,5 +1,4 @@
1
1
  export default InputIconToggleStyle;
2
2
  declare const InputIconToggleStyle: import("styled-components").StyledComponent<"span", any, {
3
3
  onKeyDown: (e: import("react").KeyboardEvent<HTMLSpanElement>) => any;
4
- theme: import("../../style/themes/base").ThemeObject;
5
- }, "theme" | "onKeyDown">;
4
+ }, "onKeyDown">;
@@ -1,6 +1,5 @@
1
1
  import styled, { css } from "styled-components";
2
2
  import PropTypes from "prop-types";
3
- import BaseTheme from "../../style/themes/base";
4
3
  import sizes from "../input/input-sizes.style";
5
4
  const InputIconToggleStyle = styled.span.attrs(({
6
5
  onClick
@@ -11,8 +10,7 @@ const InputIconToggleStyle = styled.span.attrs(({
11
10
  e.preventDefault();
12
11
  return onClick(e);
13
12
  }
14
- },
15
- theme: BaseTheme
13
+ }
16
14
  }))`
17
15
  align-items: center;
18
16
  cursor: pointer;
@@ -28,15 +26,12 @@ const InputIconToggleStyle = styled.span.attrs(({
28
26
  `}
29
27
 
30
28
  &:focus {
31
- outline: solid 3px ${({
32
- theme
33
- }) => theme.colors.focus};
29
+ outline: solid 3px var(--colorsSemanticFocus500);
34
30
  }
35
31
  `;
36
32
  InputIconToggleStyle.safeProps = ["size", "error", "warning", "info"];
37
33
  InputIconToggleStyle.defaultProps = {
38
- size: "medium",
39
- theme: BaseTheme
34
+ size: "medium"
40
35
  };
41
36
  InputIconToggleStyle.propTypes = {
42
37
  size: PropTypes.oneOf(["small", "medium", "large"]),
@@ -69,7 +69,7 @@ const StyledIcon = styled.span`
69
69
  finalColor = renderedColor;
70
70
  finalHoverColor = shade(0.2, renderedColor);
71
71
  } else {
72
- finalColor = "var(--colorsYin065)";
72
+ finalColor = "var(--colorsYin090)";
73
73
  finalHoverColor = "var(--colorsYin090)";
74
74
  }
75
75
 
@@ -82,9 +82,6 @@ const StyledIcon = styled.span`
82
82
  });
83
83
  bgColor = backgroundColor;
84
84
  bgHoverColor = shade(0.2, backgroundColor);
85
- } else if (disabled) {
86
- bgColor = "var(--colorsYin030)";
87
- bgHoverColor = "var(--colorsYin030)";
88
85
  } else {
89
86
  bgColor = "transparent";
90
87
  bgHoverColor = "transparent";
@@ -1,6 +1,5 @@
1
1
  import styled, { css } from "styled-components";
2
2
  import propTypes from "prop-types";
3
- import baseTheme from "../../style/themes/base";
4
3
  const ScrollableListItem = styled.li`
5
4
  ${({
6
5
  isSelectable
@@ -8,10 +7,9 @@ const ScrollableListItem = styled.li`
8
7
  cursor: pointer;
9
8
  `}
10
9
  ${({
11
- isSelected,
12
- theme
10
+ isSelected
13
11
  }) => isSelected && css`
14
- background-color: ${theme.select.selected};
12
+ background-color: var(--colorsUtilityMajor025);
15
13
  `}
16
14
  box-sizing: content-box;
17
15
  padding: 5px 6px;
@@ -19,12 +17,10 @@ const ScrollableListItem = styled.li`
19
17
  `;
20
18
  ScrollableListItem.propTypes = {
21
19
  id: propTypes.any,
22
- isSelected: propTypes.bool,
23
- theme: propTypes.object
20
+ isSelected: propTypes.bool
24
21
  };
25
22
  ScrollableListItem.defaultProps = {
26
- isSelectable: true,
27
- // defaulted to true so it integrates with ScrollableList by default,
28
- theme: baseTheme
23
+ isSelectable: true // defaulted to true so it integrates with ScrollableList by default,
24
+
29
25
  };
30
26
  export default ScrollableListItem;
@@ -7,10 +7,6 @@ exports.default = void 0;
7
7
 
8
8
  var _styledComponents = _interopRequireWildcard(require("styled-components"));
9
9
 
10
- var _base = _interopRequireDefault(require("../../style/themes/base"));
11
-
12
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
-
14
10
  function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
15
11
 
16
12
  function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
@@ -21,9 +17,8 @@ const StyledCharacterCount = _styledComponents.default.div`
21
17
  margin-top: 4px;
22
18
  margin-bottom: 4px;
23
19
  color: ${({
24
- theme,
25
20
  isOverLimit
26
- }) => isOverLimit ? theme.colors.error : theme.disabled.disabled};
21
+ }) => isOverLimit ? "var(--colorsSemanticNegative500)" : "var(--colorsUtilityYin055)"};
27
22
 
28
23
  ${({
29
24
  isOverLimit
@@ -31,8 +26,5 @@ const StyledCharacterCount = _styledComponents.default.div`
31
26
  font-weight: 700;
32
27
  `}
33
28
  `;
34
- StyledCharacterCount.defaultProps = {
35
- theme: _base.default
36
- };
37
29
  var _default = StyledCharacterCount;
38
30
  exports.default = _default;
@@ -19,8 +19,6 @@ var _label = _interopRequireWildcard(require("../label/label.style"));
19
19
 
20
20
  var _help = _interopRequireDefault(require("../../components/help/help.style"));
21
21
 
22
- var _base = _interopRequireDefault(require("../../style/themes/base"));
23
-
24
22
  var _validationIcon = _interopRequireDefault(require("../validations/validation-icon.style"));
25
23
 
26
24
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -41,8 +39,7 @@ const StyledCheckableInputWrapper = _styledComponents.default.div`
41
39
  inputWidth,
42
40
  labelWidth,
43
41
  labelInline,
44
- reverse,
45
- theme
42
+ reverse
46
43
  }) => (0, _styledComponents.css)`
47
44
  ${_formField.FieldLineStyle} {
48
45
  display: flex;
@@ -56,12 +53,12 @@ const StyledCheckableInputWrapper = _styledComponents.default.div`
56
53
  width: auto;
57
54
 
58
55
  & ${_help.default}, & ${_validationIcon.default} {
59
- color: ${theme.help.color};
56
+ color: var(--colorsUtilityYin065);
60
57
  vertical-align: middle;
61
58
 
62
59
  &:hover,
63
60
  &:focus {
64
- color: ${theme.text.color};
61
+ color: var(--colorsUtilityYin090);
65
62
  }
66
63
  }
67
64
  }
@@ -127,9 +124,5 @@ StyledCheckableInputWrapper.propTypes = {
127
124
  disabled: _propTypes.default.bool,
128
125
  fieldHelpInline: _propTypes.default.bool,
129
126
  inputWidth: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
130
- labelWidth: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
131
- theme: _propTypes.default.object
132
- };
133
- StyledCheckableInputWrapper.defaultProps = {
134
- theme: _base.default
127
+ labelWidth: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string])
135
128
  };
@@ -27,7 +27,7 @@ const StyledInputPresentationContainer = _styledComponents.default.div`
27
27
  exports.StyledInputPresentationContainer = StyledInputPresentationContainer;
28
28
  const InputPresentationStyle = _styledComponents.default.div`
29
29
  align-items: stretch;
30
- background: #fff;
30
+ background: var(--colorsUtilityYang100);
31
31
  border: 1px solid var(--colorsUtilityMajor300);
32
32
  box-sizing: border-box;
33
33
  cursor: text;
@@ -1,5 +1,4 @@
1
1
  export default InputIconToggleStyle;
2
2
  declare const InputIconToggleStyle: import("styled-components").StyledComponent<"span", any, {
3
3
  onKeyDown: (e: import("react").KeyboardEvent<HTMLSpanElement>) => any;
4
- theme: import("../../style/themes/base").ThemeObject;
5
- }, "theme" | "onKeyDown">;
4
+ }, "onKeyDown">;
@@ -9,8 +9,6 @@ var _styledComponents = _interopRequireWildcard(require("styled-components"));
9
9
 
10
10
  var _propTypes = _interopRequireDefault(require("prop-types"));
11
11
 
12
- var _base = _interopRequireDefault(require("../../style/themes/base"));
13
-
14
12
  var _inputSizes = _interopRequireDefault(require("../input/input-sizes.style"));
15
13
 
16
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -28,8 +26,7 @@ const InputIconToggleStyle = _styledComponents.default.span.attrs(({
28
26
  e.preventDefault();
29
27
  return onClick(e);
30
28
  }
31
- },
32
- theme: _base.default
29
+ }
33
30
  }))`
34
31
  align-items: center;
35
32
  cursor: pointer;
@@ -45,15 +42,12 @@ const InputIconToggleStyle = _styledComponents.default.span.attrs(({
45
42
  `}
46
43
 
47
44
  &:focus {
48
- outline: solid 3px ${({
49
- theme
50
- }) => theme.colors.focus};
45
+ outline: solid 3px var(--colorsSemanticFocus500);
51
46
  }
52
47
  `;
53
48
  InputIconToggleStyle.safeProps = ["size", "error", "warning", "info"];
54
49
  InputIconToggleStyle.defaultProps = {
55
- size: "medium",
56
- theme: _base.default
50
+ size: "medium"
57
51
  };
58
52
  InputIconToggleStyle.propTypes = {
59
53
  size: _propTypes.default.oneOf(["small", "medium", "large"]),
@@ -90,7 +90,7 @@ const StyledIcon = _styledComponents.default.span`
90
90
  finalColor = renderedColor;
91
91
  finalHoverColor = (0, _polished.shade)(0.2, renderedColor);
92
92
  } else {
93
- finalColor = "var(--colorsYin065)";
93
+ finalColor = "var(--colorsYin090)";
94
94
  finalHoverColor = "var(--colorsYin090)";
95
95
  }
96
96
 
@@ -103,9 +103,6 @@ const StyledIcon = _styledComponents.default.span`
103
103
  });
104
104
  bgColor = backgroundColor;
105
105
  bgHoverColor = (0, _polished.shade)(0.2, backgroundColor);
106
- } else if (disabled) {
107
- bgColor = "var(--colorsYin030)";
108
- bgHoverColor = "var(--colorsYin030)";
109
106
  } else {
110
107
  bgColor = "transparent";
111
108
  bgHoverColor = "transparent";
@@ -9,8 +9,6 @@ var _styledComponents = _interopRequireWildcard(require("styled-components"));
9
9
 
10
10
  var _propTypes = _interopRequireDefault(require("prop-types"));
11
11
 
12
- var _base = _interopRequireDefault(require("../../style/themes/base"));
13
-
14
12
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
13
 
16
14
  function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
@@ -24,10 +22,9 @@ const ScrollableListItem = _styledComponents.default.li`
24
22
  cursor: pointer;
25
23
  `}
26
24
  ${({
27
- isSelected,
28
- theme
25
+ isSelected
29
26
  }) => isSelected && (0, _styledComponents.css)`
30
- background-color: ${theme.select.selected};
27
+ background-color: var(--colorsUtilityMajor025);
31
28
  `}
32
29
  box-sizing: content-box;
33
30
  padding: 5px 6px;
@@ -35,13 +32,11 @@ const ScrollableListItem = _styledComponents.default.li`
35
32
  `;
36
33
  ScrollableListItem.propTypes = {
37
34
  id: _propTypes.default.any,
38
- isSelected: _propTypes.default.bool,
39
- theme: _propTypes.default.object
35
+ isSelected: _propTypes.default.bool
40
36
  };
41
37
  ScrollableListItem.defaultProps = {
42
- isSelectable: true,
43
- // defaulted to true so it integrates with ScrollableList by default,
44
- theme: _base.default
38
+ isSelectable: true // defaulted to true so it integrates with ScrollableList by default,
39
+
45
40
  };
46
41
  var _default = ScrollableListItem;
47
42
  exports.default = _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "carbon-react",
3
- "version": "104.48.0",
3
+ "version": "104.50.0",
4
4
  "description": "A library of reusable React components for easily building user interfaces.",
5
5
  "engineStrict": true,
6
6
  "engines": {