carbon-react 104.49.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"]),
@@ -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"]),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "carbon-react",
3
- "version": "104.49.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": {