carbon-react 102.17.0 → 102.18.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.
@@ -5,9 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
 
8
- var _styledComponents = _interopRequireWildcard(require("styled-components"));
9
-
10
- var _themes = require("../../../style/themes");
8
+ var _styledComponents = _interopRequireDefault(require("styled-components"));
11
9
 
12
10
  var _button = _interopRequireDefault(require("../../button/button.style"));
13
11
 
@@ -15,44 +13,32 @@ var _icon = _interopRequireDefault(require("../../icon/icon.style"));
15
13
 
16
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
15
 
18
- function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
19
-
20
- 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
-
22
16
  const StyledListActionButtonWrapper = _styledComponents.default.div`
23
- ${({
24
- theme
25
- }) => (0, _styledComponents.css)`
26
- padding-top: ${theme.space[1]}px;
27
- padding-bottom: ${theme.space[1]}px;
28
- border-top: 1px solid ${theme.disabled.border};
29
- box-shadow: 0 0px 0 0 rgba(0, 0, 0, 0), 0 -8px 8px 0 rgba(0, 0, 0, 0.03);
30
-
31
- ${_icon.default} {
32
- color: ${theme.text.color};
33
- }
34
-
35
- ${_button.default} {
36
- background: transparent;
37
- border: none;
38
- color: ${theme.text.color};
39
- justify-content: left;
40
- padding-left: ${theme.space[2]}px;
41
- padding-right: ${theme.space[2]}px;
42
- width: 100%;
43
-
44
- :hover {
45
- background-color: ${theme.select.selected};
46
-
47
- ${_icon.default} {
48
- color: ${theme.text.color};
49
- }
17
+ padding-top: var(--spacing100);
18
+ padding-bottom: var(--spacing100);
19
+ border-top: 1px solid var(--colorsUtilityDisabled600);
20
+ box-shadow: 0 0px 0 0 rgba(0, 0, 0, 0), 0 -8px 8px 0 rgba(0, 0, 0, 0.03);
21
+
22
+ ${_icon.default} {
23
+ color: var(--colorsUtilityYin090);
24
+ }
25
+
26
+ ${_button.default} {
27
+ background: transparent;
28
+ border: none;
29
+ color: var(--colorsUtilityYin090);
30
+ justify-content: left;
31
+ padding-left: var(--spacing200);
32
+ padding-right: var(--spacing200);
33
+ width: 100%;
34
+
35
+ :hover {
36
+ background-color: var(--colorsUtilityMajor025);
37
+ ${_icon.default} {
38
+ color: var(--colorsUtilityYin090);
50
39
  }
51
40
  }
52
- `}
41
+ }
53
42
  `;
54
- StyledListActionButtonWrapper.defaultProps = {
55
- theme: _themes.baseTheme
56
- };
57
43
  var _default = StyledListActionButtonWrapper;
58
44
  exports.default = _default;
@@ -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; }
@@ -26,10 +24,9 @@ const StyledOption = _styledComponents.default.li`
26
24
  user-select: none;
27
25
 
28
26
  ${({
29
- isHighlighted,
30
- theme
27
+ isHighlighted
31
28
  }) => isHighlighted && (0, _styledComponents.css)`
32
- background-color: ${theme.select.selected};
29
+ background-color: var(--colorsUtilityMajor200);
33
30
  `}
34
31
 
35
32
  ${({
@@ -37,20 +34,12 @@ const StyledOption = _styledComponents.default.li`
37
34
  }) => hidden && "display: none;"}
38
35
 
39
36
  :hover {
40
- ${({
41
- theme
42
- }) => (0, _styledComponents.css)`
43
- background-color: ${theme.select.selected};
44
- `}
37
+ background-color: var(--colorsUtilityMajor200);
45
38
  }
46
39
  `;
47
40
  StyledOption.propTypes = {
48
41
  id: _propTypes.default.any,
49
- isHighlighted: _propTypes.default.bool,
50
- theme: _propTypes.default.object
51
- };
52
- StyledOption.defaultProps = {
53
- theme: _base.default
42
+ isHighlighted: _propTypes.default.bool
54
43
  };
55
44
  var _default = StyledOption;
56
45
  exports.default = _default;
@@ -7,12 +7,8 @@ exports.default = void 0;
7
7
 
8
8
  var _styledComponents = _interopRequireDefault(require("styled-components"));
9
9
 
10
- var _propTypes = _interopRequireDefault(require("prop-types"));
11
-
12
10
  var _icon = _interopRequireDefault(require("../../icon/icon.style"));
13
11
 
14
- var _base = _interopRequireDefault(require("../../../style/themes/base"));
15
-
16
12
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
13
 
18
14
  const StyledOptionGroupHeader = _styledComponents.default.div`
@@ -30,30 +26,18 @@ const StyledOptionGroupHeader = _styledComponents.default.div`
30
26
  line-height: 18px;
31
27
  text-align: left;
32
28
  margin: 0;
33
- color: ${({
34
- theme
35
- }) => theme.select.optionHeader};
29
+ color: var(--colorsYin055);
36
30
  }
37
31
 
38
32
  ${_icon.default} {
39
33
  margin-right: 4px;
40
34
  margin-left: -5px;
41
- color: ${({
42
- theme
43
- }) => theme.select.optionHeader};
35
+ color: var(--colorsYin055);
44
36
 
45
37
  &:hover {
46
- color: ${({
47
- theme
48
- }) => theme.select.optionHeader};
38
+ color: var(--colorsYin055);
49
39
  }
50
40
  }
51
41
  `;
52
- StyledOptionGroupHeader.propTypes = {
53
- theme: _propTypes.default.object
54
- };
55
- StyledOptionGroupHeader.defaultProps = {
56
- theme: _base.default
57
- };
58
42
  var _default = StyledOptionGroupHeader;
59
43
  exports.default = _default;
@@ -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; }
@@ -23,16 +19,13 @@ const StyledOptionRow = _styledComponents.default.tr`
23
19
  }) => hidden && "display: none;"}
24
20
 
25
21
  ${({
26
- isHighlighted,
27
- theme
22
+ isHighlighted
28
23
  }) => isHighlighted && (0, _styledComponents.css)`
29
- background-color: ${theme.select.selected};
24
+ background-color: var(--colorsUtilityMajor200);
30
25
  `}
31
26
 
32
27
  :hover {
33
- background-color: ${({
34
- theme
35
- }) => theme.select.selected};
28
+ background-color: var(--colorsUtilityMajor200);
36
29
  }
37
30
 
38
31
  td {
@@ -44,8 +37,5 @@ const StyledOptionRow = _styledComponents.default.tr`
44
37
  }
45
38
  }
46
39
  `;
47
- StyledOptionRow.defaultProps = {
48
- theme: _base.default
49
- };
50
40
  var _default = StyledOptionRow;
51
41
  exports.default = _default;
@@ -13,7 +13,8 @@ function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return
13
13
 
14
14
  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; }
15
15
 
16
- const overhang = 4;
16
+ const overhang = 4; // TODO (design-tokens): no elovation/zindex tokens yet
17
+
17
18
  const StyledPopoverContainer = _styledComponents.default.div`
18
19
  position: absolute;
19
20
  z-index: ${({
@@ -72,9 +73,7 @@ const StyledSelectLoaderContainer = _styledComponents.default.li`
72
73
  `;
73
74
  exports.StyledSelectLoaderContainer = StyledSelectLoaderContainer;
74
75
  const StyledSelectListTable = _styledComponents.default.table`
75
- background-color: ${({
76
- theme
77
- }) => theme.colors.white};
76
+ background-color: var(--colorsUtilityYang100);
78
77
  border-collapse: collapse;
79
78
  border-radius: 0px;
80
79
  border-spacing: 0;
@@ -88,29 +87,21 @@ const StyledSelectListTable = _styledComponents.default.table`
88
87
  width: 100%;
89
88
  table-layout: fixed;
90
89
  }
91
- `;
90
+ `; // TODO (design-tokens): to match current style for border bottom colorsUtilityMajor100
91
+
92
92
  exports.StyledSelectListTable = StyledSelectListTable;
93
- StyledSelectListTable.defaultProps = {
94
- theme: _themes.baseTheme
95
- };
96
93
  const StyledSelectListTableHeader = _styledComponents.default.thead`
97
94
  th {
98
95
  position: sticky;
99
96
  top: 0;
100
- padding: ${({
101
- theme
102
- }) => 2 * theme.spacing}px;
103
- border-bottom: 1px solid ${({
104
- theme
105
- }) => theme.select.tableHeaderBorder};
97
+ padding: var(--spacing200);
98
+ border-bottom: 1px solid var(--colorsUtilityMajor050);
106
99
  background-color: white;
107
100
  text-align: left;
108
101
  font-weight: 900;
109
102
  font-size: 12px;
110
103
  text-transform: uppercase;
111
- color: ${({
112
- theme
113
- }) => theme.tileSelect.descriptionColor};
104
+ color: var(--colorsYin055);
114
105
  :after {
115
106
  content: "";
116
107
  display: block;
@@ -118,12 +109,8 @@ const StyledSelectListTableHeader = _styledComponents.default.thead`
118
109
  bottom: -8px;
119
110
  left: 0px;
120
111
  background-image: linear-gradient(
121
- ${({
122
- theme
123
- }) => theme.colors.black},
124
- ${({
125
- theme
126
- }) => theme.colors.white}
112
+ var(--colorsComponentsNavigationYin100),
113
+ var(--colorsYang100)
127
114
  );
128
115
  opacity: 0.03;
129
116
  height: 8px;
@@ -139,7 +126,4 @@ const StyledSelectListTableBody = _styledComponents.default.tbody`
139
126
  table-layout: fixed;
140
127
  max-height: 132px;
141
128
  `;
142
- exports.StyledSelectListTableBody = StyledSelectListTableBody;
143
- StyledSelectListTableHeader.defaultProps = {
144
- theme: _themes.baseTheme
145
- };
129
+ exports.StyledSelectListTableBody = StyledSelectListTableBody;
@@ -27,7 +27,6 @@ const StyledSelect = _styledComponents.default.div`
27
27
  ${({
28
28
  hasTextCursor,
29
29
  disabled,
30
- theme,
31
30
  readOnly,
32
31
  transparent
33
32
  }) => (0, _styledComponents.css)`
@@ -40,13 +39,13 @@ const StyledSelect = _styledComponents.default.div`
40
39
 
41
40
  ${disabled && (0, _styledComponents.css)`
42
41
  cursor: not-allowed;
43
- color: ${theme.disabled.disabled};
42
+ color: var(--colorsUtilityYin030);
44
43
  text-shadow: none;
45
44
  `}
46
45
 
47
46
  ${readOnly && (0, _styledComponents.css)`
48
47
  cursor: ${hasTextCursor ? "text" : "default"};
49
- color: ${theme.readOnly.textboxText};
48
+ color: var(--colorsYin065);
50
49
  text-shadow: none;
51
50
  `}
52
51
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "carbon-react",
3
- "version": "102.17.0",
3
+ "version": "102.18.0",
4
4
  "description": "A library of reusable React components for easily building user interfaces.",
5
5
  "engineStrict": true,
6
6
  "engines": {