carbon-react 104.2.0 → 104.3.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.
@@ -37,18 +37,11 @@ const StyledAccordionContainer = _styledComponents.default.div`
37
37
  width: ${({
38
38
  width
39
39
  }) => width || "100%"};
40
- color: ${({
41
- theme
42
- }) => theme.text.color};
40
+ color: var(--colorsUtilityYin090);
43
41
  background-color: ${({
44
- scheme,
45
- theme
46
- }) => scheme === "white" ? theme.colors.white : "transparent"};
47
- ${({
48
- theme
49
- }) => (0, _styledComponents.css)`
50
- border: 1px solid ${theme.accordion.border};
51
- `}
42
+ scheme
43
+ }) => scheme === "white" ? "var(--colorsUtilityYang100)" : "var(--colorsUtilityMajorTransparent)"};
44
+ border: 1px solid var(--colorsUtilityMajor100);
52
45
  ${({
53
46
  borders
54
47
  }) => borders === "default" && (0, _styledComponents.css)`
@@ -63,12 +56,8 @@ const StyledAccordionContainer = _styledComponents.default.div`
63
56
 
64
57
  & + & {
65
58
  margin-top: -1px;
66
- border-top: 1px solid ${({
67
- theme
68
- }) => theme.accordion.border};
69
- border-bottom: 1px solid ${({
70
- theme
71
- }) => theme.accordion.border};
59
+ border-top: 1px solid var(--colorsUtilityMajor100);
60
+ border-bottom: 1px solid var(--colorsUtilityMajor100);
72
61
  }
73
62
  `;
74
63
  exports.StyledAccordionContainer = StyledAccordionContainer;
@@ -91,15 +80,15 @@ exports.StyledAccordionSubTitle = StyledAccordionSubTitle;
91
80
  const StyledAccordionIcon = (0, _styledComponents.default)(_icon.default)`
92
81
  transition: transform 0.3s;
93
82
  margin-right: ${({
94
- iconAlign,
95
- theme
96
- }) => iconAlign === "left" ? theme.spacing * 2 : 0}px;
83
+ iconAlign
84
+ }) => iconAlign === "left" ? "var(--spacing200)" : "var(--spacing000)"};
97
85
  ${({
98
86
  isExpanded,
99
87
  iconAlign
100
88
  }) => {
101
89
  return !isExpanded && (iconAlign === "right" ? "transform: rotate(90deg)" : "transform: rotate(-90deg)");
102
90
  }};
91
+ color: var(--colorsActionMinor500);
103
92
  `;
104
93
  exports.StyledAccordionIcon = StyledAccordionIcon;
105
94
  const StyledAccordionHeadingsContainer = _styledComponents.default.div`
@@ -134,10 +123,9 @@ const StyledAccordionTitleContainer = _styledComponents.default.div`
134
123
  buttonWidth,
135
124
  iconAlign,
136
125
  size,
137
- theme,
138
126
  hasButtonProps
139
127
  }) => (0, _styledComponents.css)`
140
- padding: ${size === "small" ? theme.spacing * 2 : theme.spacing * 3}px;
128
+ padding: ${size === "small" ? "var(--spacing200)" : "var(--spacing300)"};
141
129
  ${_styledSystem.space}
142
130
  display: flex;
143
131
  align-items: center;
@@ -152,12 +140,12 @@ const StyledAccordionTitleContainer = _styledComponents.default.div`
152
140
  z-index: 1;
153
141
 
154
142
  &:focus {
155
- outline: ${buttonHeading ? "3px" : "2px"} solid ${theme.colors.focus};
143
+ outline: var(--borderWidth300) solid var(--colorsSemanticFocus500);
156
144
  }
157
145
 
158
146
  ${!buttonHeading && (0, _styledComponents.css)`
159
147
  &:hover {
160
- background-color: ${theme.accordion.background};
148
+ background-color: var(--colorsUtilityMajor050);
161
149
  }
162
150
  `}
163
151
 
@@ -165,10 +153,10 @@ const StyledAccordionTitleContainer = _styledComponents.default.div`
165
153
  box-sizing: border-box;
166
154
  font-weight: 600;
167
155
  text-decoration: none;
168
- font-size: ${theme.text.size};
169
- min-height: ${theme.spacing * 5}px;
156
+ font-size: var(--fontSizes100);
157
+ min-height: var(--spacing500);
170
158
 
171
- color: ${theme.colors.primary};
159
+ color: var(--colorsActionMajor500);
172
160
 
173
161
  ${!hasButtonProps && (0, _styledComponents.css)`
174
162
  ${StyledAccordionHeadingsContainer} {
@@ -177,7 +165,7 @@ const StyledAccordionTitleContainer = _styledComponents.default.div`
177
165
  `}
178
166
 
179
167
  ${StyledAccordionIcon} {
180
- color: ${theme.colors.primary};
168
+ color: var(--colorsActionMajor500);
181
169
  ${!hasButtonProps && (0, _styledComponents.css)`
182
170
  position: relative;
183
171
  ${iconAlign}: 16px;
@@ -185,9 +173,9 @@ const StyledAccordionTitleContainer = _styledComponents.default.div`
185
173
  }
186
174
 
187
175
  &:hover {
188
- color: ${theme.colors.secondary};
176
+ color: var(--colorsActionMajor600);
189
177
  ${StyledAccordionIcon} {
190
- color: ${theme.colors.secondary};
178
+ color: var(--colorsActionMajor600);
191
179
  }
192
180
  }
193
181
 
@@ -217,9 +205,8 @@ const StyledAccordionContentContainer = _styledComponents.default.div`
217
205
  `;
218
206
  exports.StyledAccordionContentContainer = StyledAccordionContentContainer;
219
207
  const StyledAccordionContent = _styledComponents.default.div`
220
- padding: 0 ${({
221
- theme
222
- }) => theme.spacing * 3}px;
208
+ padding: var(--spacing300);
209
+ padding-top: 0;
223
210
  overflow: hidden;
224
211
 
225
212
  ${({
@@ -237,16 +224,4 @@ StyledAccordionContainer.defaultProps = {
237
224
  };
238
225
  StyledAccordionTitleContainer.defaultProps = {
239
226
  theme: _themes.baseTheme
240
- };
241
- StyledAccordionTitle.defaultProps = {
242
- theme: _themes.baseTheme
243
- };
244
- StyledAccordionIcon.defaultProps = {
245
- theme: _themes.baseTheme
246
- };
247
- StyledAccordionContent.defaultProps = {
248
- theme: _themes.baseTheme
249
- };
250
- StyledAccordionContentContainer.defaultProps = {
251
- theme: _themes.baseTheme
252
227
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "carbon-react",
3
- "version": "104.2.0",
3
+ "version": "104.3.0",
4
4
  "description": "A library of reusable React components for easily building user interfaces.",
5
5
  "engineStrict": true,
6
6
  "engines": {