carbon-react 104.35.0 → 104.38.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,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 FieldHelpStyle = styled.span`
5
4
  display: block;
6
5
  flex: 1;
@@ -16,8 +15,7 @@ const FieldHelpStyle = styled.span`
16
15
  `}
17
16
  `;
18
17
  FieldHelpStyle.defaultProps = {
19
- labelWidth: 30,
20
- theme: BaseTheme
18
+ labelWidth: 30
21
19
  };
22
20
  FieldHelpStyle.propTypes = {
23
21
  labelWidth: PropTypes.number,
@@ -16,48 +16,40 @@ const StyledLegendContent = styled.span`
16
16
  display: flex;
17
17
  align-items: center;
18
18
  line-height: 24px;
19
-
20
19
  ${({
21
- isRequired,
22
- theme
20
+ isRequired
23
21
  }) => isRequired && css`
24
22
  ::after {
25
23
  content: "*";
26
24
  line-height: 24px;
27
- color: ${theme.colors.asterisk};
25
+ color: var(--colorsSemanticNegative500);
28
26
  font-weight: 700;
29
- margin-left: ${theme.spacing}px;
27
+ margin-left: var(--spacing100);
30
28
  }
31
29
  `}
32
30
  `;
33
- StyledLegendContent.defaultProps = {
34
- theme: BaseTheme
35
- };
36
31
  const StyledLegend = styled.legend`
37
32
  display: flex;
38
33
  align-items: center;
39
34
  margin-bottom: 8px;
40
35
  padding: 0;
41
36
  font-weight: 600;
42
-
43
37
  ${({
44
38
  inline,
45
39
  width,
46
40
  align,
47
- rightPadding,
48
- theme
41
+ rightPadding
49
42
  }) => inline && css`
50
43
  float: left;
51
44
  box-sizing: border-box;
52
45
  margin: 0;
53
46
  ${width && `width: ${width}%`};
54
47
  justify-content: ${align === "right" ? "flex-end" : "flex-start"};
55
- padding-right: ${rightPadding * theme.spacing}px;
48
+ padding-right: ${rightPadding === 1 ? "var(--spacing100)" : "var(--spacing200)"};
56
49
  `}
57
50
  `;
58
51
  StyledLegend.defaultProps = {
59
- align: "right",
60
- theme: BaseTheme
52
+ align: "right"
61
53
  };
62
54
  StyledLegend.propTypes = {
63
55
  inline: PropTypes.bool,
@@ -1,7 +1,6 @@
1
1
  import styled, { css } from "styled-components";
2
2
  import PropTypes from "prop-types";
3
3
  import StyledIcon from "../icon/icon.style";
4
- import baseTheme from "../../style/themes/base";
5
4
  import { StyledHeadingTitle } from "../heading/heading.style";
6
5
  export const StyledConfirmButtons = styled.div`
7
6
  margin-top: 48px;
@@ -22,12 +21,12 @@ export const StyledConfirmHeading = styled.div`
22
21
  ${({
23
22
  type
24
23
  }) => type === "warning" && css`
25
- color: ${baseTheme.colors.warning};
24
+ color: var(--colorsSemanticCaution500);
26
25
  `}
27
26
  ${({
28
27
  type
29
28
  }) => type === "error" && css`
30
- color: ${baseTheme.colors.error};
29
+ color: var(--colorsSemanticNegative500);
31
30
  `}
32
31
  }
33
32
  `;
@@ -6,9 +6,7 @@ const StyledHr = styled.hr`
6
6
  width: inherit;
7
7
  border: 0;
8
8
  height: 1px;
9
- background: ${({
10
- theme
11
- }) => theme.hr.background};
9
+ background: var(--colorsUtilityMajor100);
12
10
  `;
13
11
  StyledHr.defaultProps = {
14
12
  theme: baseTheme
@@ -1,17 +1,11 @@
1
1
  import styled from "styled-components";
2
2
  import { StyledAccordionContentContainer, StyledAccordionContent } from "../../../accordion/accordion.style";
3
- import baseTheme from "../../../../style/themes/base";
4
3
  const StyledContentContainer = styled(StyledAccordionContentContainer)`
5
- background-color: ${({
6
- theme
7
- }) => theme.tileSelect.hoverBackground};
4
+ background-color: var(--colorsActionMinor050);
8
5
  `;
9
6
  const StyledContent = styled(StyledAccordionContent)`
10
7
  padding: 24px;
11
8
  position: relative;
12
9
  z-index: 200;
13
10
  `;
14
- StyledContentContainer.defaultProps = {
15
- theme: baseTheme
16
- };
17
11
  export { StyledContentContainer, StyledContent };
@@ -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; }
@@ -32,8 +30,7 @@ const FieldHelpStyle = _styledComponents.default.span`
32
30
  `}
33
31
  `;
34
32
  FieldHelpStyle.defaultProps = {
35
- labelWidth: 30,
36
- theme: _base.default
33
+ labelWidth: 30
37
34
  };
38
35
  FieldHelpStyle.propTypes = {
39
36
  labelWidth: _propTypes.default.number,
@@ -34,50 +34,42 @@ const StyledLegendContent = _styledComponents.default.span`
34
34
  display: flex;
35
35
  align-items: center;
36
36
  line-height: 24px;
37
-
38
37
  ${({
39
- isRequired,
40
- theme
38
+ isRequired
41
39
  }) => isRequired && (0, _styledComponents.css)`
42
40
  ::after {
43
41
  content: "*";
44
42
  line-height: 24px;
45
- color: ${theme.colors.asterisk};
43
+ color: var(--colorsSemanticNegative500);
46
44
  font-weight: 700;
47
- margin-left: ${theme.spacing}px;
45
+ margin-left: var(--spacing100);
48
46
  }
49
47
  `}
50
48
  `;
51
49
  exports.StyledLegendContent = StyledLegendContent;
52
- StyledLegendContent.defaultProps = {
53
- theme: _base.default
54
- };
55
50
  const StyledLegend = _styledComponents.default.legend`
56
51
  display: flex;
57
52
  align-items: center;
58
53
  margin-bottom: 8px;
59
54
  padding: 0;
60
55
  font-weight: 600;
61
-
62
56
  ${({
63
57
  inline,
64
58
  width,
65
59
  align,
66
- rightPadding,
67
- theme
60
+ rightPadding
68
61
  }) => inline && (0, _styledComponents.css)`
69
62
  float: left;
70
63
  box-sizing: border-box;
71
64
  margin: 0;
72
65
  ${width && `width: ${width}%`};
73
66
  justify-content: ${align === "right" ? "flex-end" : "flex-start"};
74
- padding-right: ${rightPadding * theme.spacing}px;
67
+ padding-right: ${rightPadding === 1 ? "var(--spacing100)" : "var(--spacing200)"};
75
68
  `}
76
69
  `;
77
70
  exports.StyledLegend = StyledLegend;
78
71
  StyledLegend.defaultProps = {
79
- align: "right",
80
- theme: _base.default
72
+ align: "right"
81
73
  };
82
74
  StyledLegend.propTypes = {
83
75
  inline: _propTypes.default.bool,
@@ -11,8 +11,6 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
11
11
 
12
12
  var _icon = _interopRequireDefault(require("../icon/icon.style"));
13
13
 
14
- var _base = _interopRequireDefault(require("../../style/themes/base"));
15
-
16
14
  var _heading = require("../heading/heading.style");
17
15
 
18
16
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -41,12 +39,12 @@ const StyledConfirmHeading = _styledComponents.default.div`
41
39
  ${({
42
40
  type
43
41
  }) => type === "warning" && (0, _styledComponents.css)`
44
- color: ${_base.default.colors.warning};
42
+ color: var(--colorsSemanticCaution500);
45
43
  `}
46
44
  ${({
47
45
  type
48
46
  }) => type === "error" && (0, _styledComponents.css)`
49
- color: ${_base.default.colors.error};
47
+ color: var(--colorsSemanticNegative500);
50
48
  `}
51
49
  }
52
50
  `;
@@ -18,9 +18,7 @@ const StyledHr = _styledComponents.default.hr`
18
18
  width: inherit;
19
19
  border: 0;
20
20
  height: 1px;
21
- background: ${({
22
- theme
23
- }) => theme.hr.background};
21
+ background: var(--colorsUtilityMajor100);
24
22
  `;
25
23
  StyledHr.defaultProps = {
26
24
  theme: _base.default
@@ -9,14 +9,10 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
9
9
 
10
10
  var _accordion = require("../../../accordion/accordion.style");
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
  const StyledContentContainer = (0, _styledComponents.default)(_accordion.StyledAccordionContentContainer)`
17
- background-color: ${({
18
- theme
19
- }) => theme.tileSelect.hoverBackground};
15
+ background-color: var(--colorsActionMinor050);
20
16
  `;
21
17
  exports.StyledContentContainer = StyledContentContainer;
22
18
  const StyledContent = (0, _styledComponents.default)(_accordion.StyledAccordionContent)`
@@ -24,7 +20,4 @@ const StyledContent = (0, _styledComponents.default)(_accordion.StyledAccordionC
24
20
  position: relative;
25
21
  z-index: 200;
26
22
  `;
27
- exports.StyledContent = StyledContent;
28
- StyledContentContainer.defaultProps = {
29
- theme: _base.default
30
- };
23
+ exports.StyledContent = StyledContent;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "carbon-react",
3
- "version": "104.35.0",
3
+ "version": "104.38.0",
4
4
  "description": "A library of reusable React components for easily building user interfaces.",
5
5
  "engineStrict": true,
6
6
  "engines": {