carbon-react 104.26.1 → 104.29.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.
@@ -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; }
@@ -20,24 +16,20 @@ const FormButtonAnimation = (0, _styledComponents.keyframes)`
20
16
  100% { transform: translateY(0px); }
21
17
  `;
22
18
  const StyledStickyFooter = _styledComponents.default.div`
19
+ padding: var(--spacing200) var(--spacing400);
20
+ box-sizing: border-box;
21
+ width: 100%;
23
22
  ${({
24
- sticky,
25
- theme
26
- }) => (0, _styledComponents.css)`
27
- ${sticky && (0, _styledComponents.css)`
23
+ sticky
24
+ }) => sticky && (0, _styledComponents.css)`
28
25
  animation: ${FormButtonAnimation} 0.25s ease;
29
26
  position: sticky;
30
- width: 100%;
31
27
  bottom: 0;
32
28
  left: 0;
33
- background-color: ${theme.colors.white};
34
- box-shadow: 0 -4px 12px rgba(153, 173, 182, 0.05);
29
+ background-color: var(--colorsComponentsNavigationYang100);
30
+ box-shadow: var(--boxShadow150);
35
31
  z-index: 1000;
36
32
  `}
37
- `}
38
33
  `;
39
- StyledStickyFooter.defaultProps = {
40
- theme: _base.default
41
- };
42
34
  var _default = StyledStickyFooter;
43
35
  exports.default = _default;
@@ -18,7 +18,7 @@ const StyledAdvancedColorPickerCell = _styledComponents.default.button.attrs({
18
18
  display: block;
19
19
  width: 25px;
20
20
  height: 25px;
21
- border: 1px solid #516562;
21
+ border: 1px solid var(--colorsUtilityYin090);
22
22
  ${({
23
23
  color
24
24
  }) => color && (0, _styledComponents.css)`
@@ -37,7 +37,7 @@ const StyledAdvancedColorPickerCell = _styledComponents.default.button.attrs({
37
37
  }
38
38
 
39
39
  &:focus {
40
- outline: solid 3px #ffb500;
40
+ outline: solid 3px var(--colorsSemanticFocus500);
41
41
  }
42
42
 
43
43
  &::-moz-focus-inner {
@@ -49,7 +49,7 @@ const StyledAdvancedColorPickerPreview = _styledComponents.default.div`
49
49
  width: 25px;
50
50
  height: 25px;
51
51
  margin-bottom: 15px;
52
- border: 1px solid #516562;
52
+ border: 1px solid var(--colorsUtilityYin090);
53
53
 
54
54
  ${({
55
55
  color
@@ -82,7 +82,7 @@ const DialogStyle = (0, _styledComponents.default)(_dialog2.default)`
82
82
  ${_simpleColorPicker.StyledColorOptions} {
83
83
  max-width: 285px;
84
84
  ${_simpleColor.default} {
85
- border: 1px solid #3c514e;
85
+ border: 1px solid var(--colorsUtilityYin090);
86
86
  margin-right: -1px;
87
87
  margin-bottom: -1px;
88
88
  transition: all 0.2s ease;
@@ -101,5 +101,9 @@ const DialogStyle = (0, _styledComponents.default)(_dialog2.default)`
101
101
  top: 20px;
102
102
  right: 13px;
103
103
  }
104
+
105
+ [data-component="icon"] {
106
+ color: var(--colorsActionMinorYin065);
107
+ }
104
108
  `;
105
109
  exports.DialogStyle = DialogStyle;
@@ -7,8 +7,6 @@ exports.StyledButton = exports.StyledSidebarTitle = exports.StyledDrawerSidebar
7
7
 
8
8
  var _styledComponents = _interopRequireWildcard(require("styled-components"));
9
9
 
10
- var _base = _interopRequireDefault(require("../../style/themes/base"));
11
-
12
10
  var _tabs = _interopRequireDefault(require("../tabs/tabs.style"));
13
11
 
14
12
  var _box = _interopRequireDefault(require("../box"));
@@ -21,6 +19,7 @@ function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return
21
19
 
22
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; }
23
21
 
22
+ const defaultExpandedWidth = "var(--sizing500)";
24
23
  const StyledSidebarHeader = _styledComponents.default.div`
25
24
  ${({
26
25
  isExpanded
@@ -29,14 +28,14 @@ const StyledSidebarHeader = _styledComponents.default.div`
29
28
  top: 0;
30
29
 
31
30
  ${isExpanded && (0, _styledComponents.css)`
32
- border-bottom: 1px solid #ccd6db;
31
+ border-bottom: var(--sizing010) solid #ccd6db;
33
32
  `}
34
33
  `}
35
34
  `;
36
35
  exports.StyledSidebarHeader = StyledSidebarHeader;
37
36
  const StyledSidebarTitle = _styledComponents.default.div`
38
37
  white-space: nowrap;
39
- padding: 24px 36px 24px 40px;
38
+ padding: var(--spacing300) var(--spacing500);
40
39
  `;
41
40
  exports.StyledSidebarTitle = StyledSidebarTitle;
42
41
  const StyledDrawerChildren = _styledComponents.default.div`
@@ -90,9 +89,9 @@ const sidebarHidden = () => (0, _styledComponents.keyframes)`
90
89
 
91
90
  const drawerOpen = expandedWidth => (0, _styledComponents.keyframes)`
92
91
  0% {
93
- width: 40px;
92
+ width: ${defaultExpandedWidth};
94
93
  overflow: hidden;
95
- min-width: 40px;
94
+ min-width: ${defaultExpandedWidth};
96
95
  }
97
96
  100% {
98
97
  width: ${expandedWidth};
@@ -102,7 +101,7 @@ const drawerOpen = expandedWidth => (0, _styledComponents.keyframes)`
102
101
 
103
102
  const drawerClose = expandedWidth => (0, _styledComponents.keyframes)`
104
103
  0% {width: ${expandedWidth};}
105
- 100% {width: 40px;}
104
+ 100% {width: ${defaultExpandedWidth};}
106
105
  `;
107
106
 
108
107
  const buttonOpen = () => (0, _styledComponents.keyframes)`
@@ -119,19 +118,19 @@ const buttonClose = () => (0, _styledComponents.keyframes)`
119
118
  const StyledDrawerContent = _styledComponents.default.div`
120
119
  display: flex;
121
120
  flex-direction: column;
122
- min-width: 40px;
123
- width: 40px;
121
+ min-width: ${defaultExpandedWidth};
122
+ width: ${defaultExpandedWidth};
124
123
  min-height: 40px;
125
124
  height: auto;
126
125
  position: relative;
127
126
  overflow: auto;
128
- border-right: 1px solid ${({
129
- theme
130
- }) => theme.drawer.divider};
131
- background-color: ${({
132
- backgroundColor,
133
- theme
134
- }) => backgroundColor || theme.drawer.background}};
127
+
128
+ ${({
129
+ backgroundColor
130
+ }) => (0, _styledComponents.css)`
131
+ background-color: ${backgroundColor || "var(--colorsUtilityMajor040)"};
132
+ border-right: 1px solid ${backgroundColor || "var(--colorsUtilityMajor075)"};
133
+ `};
135
134
 
136
135
  &.open {
137
136
  min-width: 52px;
@@ -150,11 +149,13 @@ const StyledDrawerContent = _styledComponents.default.div`
150
149
  animationDuration,
151
150
  expandedWidth
152
151
  }) => (0, _styledComponents.css)`
153
- ${drawerOpen(expandedWidth)} ${animationDuration}
154
- `} ease-in-out;
152
+ ${drawerOpen(expandedWidth)} ${animationDuration}
153
+ `}
154
+ ease-in-out;
155
155
 
156
156
  ${StyledDrawerSidebar}, ${StyledSidebarTitle} {
157
- animation: ${sidebarVisible} ${({
157
+ animation: ${sidebarVisible}
158
+ ${({
158
159
  animationDuration
159
160
  }) => animationDuration} ease-in-out;
160
161
  }
@@ -173,11 +174,13 @@ const StyledDrawerContent = _styledComponents.default.div`
173
174
  animationDuration,
174
175
  expandedWidth
175
176
  }) => (0, _styledComponents.css)`
176
- ${drawerClose(expandedWidth)} ${animationDuration}
177
- `} ease-in-out;
177
+ ${drawerClose(expandedWidth)} ${animationDuration}
178
+ `}
179
+ ease-in-out;
178
180
 
179
181
  ${StyledDrawerSidebar}, ${StyledSidebarTitle}, ${_stickyFooter.default} {
180
- animation: ${sidebarHidden} ${({
182
+ animation: ${sidebarHidden}
183
+ ${({
181
184
  animationDuration
182
185
  }) => animationDuration} ease-in-out;
183
186
  }
@@ -189,15 +192,17 @@ const StyledButton = _styledComponents.default.button.attrs({
189
192
  })`
190
193
  ${({
191
194
  animationDuration,
192
- isExpanded,
193
- theme
195
+ isExpanded
194
196
  }) => (0, _styledComponents.css)`
195
197
  position: absolute;
196
- top: 24px;
198
+ top: var(--spacing300);
197
199
  right: 8px;
198
- padding: 0;
199
- width: 24px;
200
- height: 24px;
200
+ padding: var(--spacing100);
201
+ width: var(--spacing300);
202
+ height: var(--spacing300);
203
+ display: flex;
204
+ justify-content: center;
205
+ align-items: center;
201
206
  transition: margin-right ${animationDuration} ease-in-out;
202
207
  background-color: transparent;
203
208
  border: none;
@@ -205,7 +210,7 @@ const StyledButton = _styledComponents.default.button.attrs({
205
210
  animation: ${buttonClose} ${animationDuration} ease-in-out;
206
211
 
207
212
  &:focus {
208
- outline: 3px solid ${theme.colors.focus};
213
+ outline: var(--borderWidth300) solid var(--colorsSemanticFocus500);
209
214
  }
210
215
 
211
216
  &:hover {
@@ -225,10 +230,4 @@ const StyledDrawerWrapper = _styledComponents.default.div`
225
230
  height
226
231
  }) => height};
227
232
  `;
228
- exports.StyledDrawerWrapper = StyledDrawerWrapper;
229
- StyledDrawerContent.defaultProps = {
230
- theme: _base.default
231
- };
232
- StyledButton.defaultProps = {
233
- theme: _base.default
234
- };
233
+ exports.StyledDrawerWrapper = StyledDrawerWrapper;
@@ -1,7 +1,7 @@
1
1
  export default Heading;
2
2
  declare class Heading extends React.Component<any, any, any> {
3
- constructor(props: Readonly<any>);
4
- constructor(props: any, context?: any);
3
+ constructor(props: any);
4
+ constructor(props: any, context: any);
5
5
  /**
6
6
  * Returns the help component.
7
7
  *
@@ -10,8 +10,8 @@ export default Step;
10
10
  * @constructor
11
11
  */
12
12
  declare class Step extends React.Component<any, any, any> {
13
- constructor(props: Readonly<any>);
14
- constructor(props: any, context?: any);
13
+ constructor(props: any);
14
+ constructor(props: any, context: any);
15
15
  /**
16
16
  * Completes the step's wizard and triggers the custom submit event handler of the step's wizard
17
17
  *
@@ -46,17 +46,16 @@ const StyledPod = _styledComponents.default.div`
46
46
  `;
47
47
  exports.StyledPod = StyledPod;
48
48
 
49
- const blockBackgrounds = (variant, theme) => ({
50
- primary: theme.colors.white,
51
- secondary: theme.pod.secondaryBackground,
52
- tertiary: theme.pod.tertiaryBackground,
53
- transparent: "transparent",
54
- tile: theme.colors.white
49
+ const blockBackgrounds = variant => ({
50
+ primary: "var(--colorsUtilityYang100)",
51
+ secondary: "var(--colorsUtilityMajor025)",
52
+ tertiary: "var(--colorsUtilityMajor050)",
53
+ transparent: "var(--colorsUtilityMajorTransparent)",
54
+ tile: "var(--colorsUtilityYang100)"
55
55
  })[variant];
56
56
 
57
57
  const StyledBlock = _styledComponents.default.div`
58
58
  ${({
59
- theme,
60
59
  variant,
61
60
  softDelete,
62
61
  noBorder,
@@ -70,33 +69,33 @@ const StyledBlock = _styledComponents.default.div`
70
69
  box-sizing: border-box;
71
70
  display: flex;
72
71
  flex-direction: column;
73
- background-color: ${blockBackgrounds(variant, theme)};
72
+ background-color: ${blockBackgrounds(variant)};
74
73
  width: 100%;
75
74
  height: 100%;
76
75
 
77
76
  ${variant === "tile" && "box-shadow: 0 2px 3px 0 rgba(2, 18, 36, 0.2)"};
78
77
 
79
- ${noBorder ? "border: none" : `border: 1px solid ${theme.pod.border}`};
78
+ ${noBorder ? "border: none" : `border: 1px solid var(--colorsUtilityMajor100)`};
80
79
 
81
80
  ${hasButtons && !(fullWidth || internalEditButton) && "width: auto;"};
82
81
 
83
82
  ${contentTriggersEdit && "cursor: pointer"};
84
83
 
85
84
  ${(isHovered || isFocused) && (0, _styledComponents.css)`
86
- background-color: ${theme.pod.hoverBackground};
85
+ background-color: var(--colorsUtilityMajor075);
87
86
 
88
- ${internalEditButton && variant === "tile" && "background-color: transparent;"}
87
+ ${internalEditButton && variant === "tile" && "background-color: var(--colorsUtilityMajorTransparent);"}
89
88
 
90
89
  ${contentTriggersEdit && (0, _styledComponents.css)`
91
- background-color: ${theme.colors.secondary};
90
+ background-color: var(--colorsActionMajor600);
92
91
  * {
93
- color: ${theme.colors.white};
92
+ color: var(--colorsUtilityYang100);
94
93
  }
95
94
  `}
96
95
  `}
97
96
 
98
97
  ${isFocused && (!internalEditButton || contentTriggersEdit) && (0, _styledComponents.css)`
99
- outline: 3px solid ${theme.colors.focus};
98
+ outline: 3px solid var(--colorsSemanticFocus500);
100
99
  border: none;
101
100
  ${noBorder ? "" : "padding: 1px"};
102
101
  `};
@@ -106,8 +105,8 @@ const StyledBlock = _styledComponents.default.div`
106
105
  `};
107
106
 
108
107
  ${softDelete && (0, _styledComponents.css)`
109
- color: ${theme.pod.softDeleteText};
110
- background-color: ${theme.pod.tertiaryBackground};
108
+ color: var(--colorsUtilityYin030);
109
+ background-color: var(--colorsUtilityMajor050);
111
110
  `};
112
111
  `}
113
112
  `;
@@ -136,22 +135,21 @@ const footerPaddings = {
136
135
  };
137
136
  const StyledFooter = _styledComponents.default.div`
138
137
  ${({
139
- theme,
140
138
  variant,
141
139
  size,
142
140
  softDelete
143
141
  }) => (0, _styledComponents.css)`
144
- background-color: ${theme.pod.footerBackground};
142
+ background-color: var(--colorsUtilityMajor025);
145
143
  box-shadow: inset 0px 1px 1px 0 rgba(0, 0, 0, 0.1);
146
- color: ${theme.text.color};
144
+ color: var(--colorsUtilityYin090);
147
145
  padding: ${footerPaddings[size]};
148
146
 
149
147
  ${softDelete && (0, _styledComponents.css)`
150
- color: ${theme.pod.softDeleteText};
148
+ color: var(--colorsUtilityYin030);
151
149
  `}
152
150
 
153
151
  ${variant === "tile" && (0, _styledComponents.css)`
154
- border-top: 1px solid ${theme.pod.border};
152
+ border-top: 1px solid var(--colorsUtilityMajor100);
155
153
  `};
156
154
  `}
157
155
  `;
@@ -178,16 +176,15 @@ const actionButtonPaddings = {
178
176
  "extra-large": 16
179
177
  };
180
178
 
181
- const actionButtonBackgrounds = (variant, theme) => ({
182
- primary: theme.colors.white,
183
- secondary: theme.pod.secondaryBackground,
184
- tertiary: theme.pod.tertiaryBackground,
185
- transparent: "transparent",
186
- tile: theme.colors.white
179
+ const actionButtonBackgrounds = variant => ({
180
+ primary: "var(--colorsActionMajorYang100)",
181
+ secondary: "var(--colorsActionMinor050)",
182
+ tertiary: "var(--colorsActionMinor100)",
183
+ transparent: "var(--colorsActionMajorTransparent)",
184
+ tile: "var(--colorsActionMajorYang100)"
187
185
  })[variant];
188
186
 
189
187
  const getButtonStyles = ({
190
- theme,
191
188
  size,
192
189
  variant,
193
190
  noBorder,
@@ -198,8 +195,8 @@ const getButtonStyles = ({
198
195
  hoverBackgroundColor
199
196
  }) => (0, _styledComponents.css)`
200
197
  cursor: pointer;
201
- background-color: ${actionButtonBackgrounds(variant, theme)};
202
- border: 1px solid ${theme.pod.border};
198
+ background-color: ${actionButtonBackgrounds(variant)};
199
+ border: 1px solid var(--colorsActionMinor200);
203
200
  margin-left: 8px;
204
201
  margin-bottom: 8px;
205
202
  box-sizing: content-box;
@@ -218,20 +215,20 @@ const getButtonStyles = ({
218
215
 
219
216
  ${internalEditButton && (0, _styledComponents.css)`
220
217
  border: none;
221
- background: transparent;
218
+ background: var(--colorsActionMajorTransparent);
222
219
  `}
223
220
 
224
221
  ${(isHovered || isFocused) && !internalEditButton && (0, _styledComponents.css)`
225
222
  background-color: ${hoverBackgroundColor};
226
- color: ${theme.colors.white};
223
+ color: var(--colorsActionMajorYang100);
227
224
 
228
225
  ${_icon.default} {
229
- color: ${theme.colors.white};
226
+ color: var(--colorsActionMajorYang100);
230
227
  }
231
228
  `}
232
229
 
233
230
  ${isFocused && (0, _styledComponents.css)`
234
- outline: 3px solid ${theme.colors.focus};
231
+ outline: 3px solid var(--colorsSemanticFocus500);
235
232
  border: none;
236
233
  padding: ${actionButtonPaddings[size] + (noBorder || internalEditButton ? 0 : 1)}px;
237
234
  `};
@@ -247,8 +244,8 @@ const StyledEditAction = (0, _styledComponents.default)(_link.default)`
247
244
  }) => displayOnlyOnHover && !(isHovered || isFocused) && "display: none;"}
248
245
 
249
246
  ${props => getButtonStyles({ ...props,
250
- iconColor: props.theme.colors.primary,
251
- hoverBackgroundColor: props.theme.colors.secondary
247
+ iconColor: "var(--colorsActionMajor500)",
248
+ hoverBackgroundColor: "var(--colorsActionMajor600)"
252
249
  })}
253
250
  }
254
251
 
@@ -264,8 +261,8 @@ const StyledDeleteButton = (0, _styledComponents.default)(_iconButton.default)`
264
261
  displayOnlyOnHover
265
262
  }) => displayOnlyOnHover && "display: none;"}
266
263
  ${props => getButtonStyles({ ...props,
267
- iconColor: props.theme.colors.error,
268
- hoverBackgroundColor: props.theme.colors.destructive.hover
264
+ iconColor: "var(--colorsSemanticNegative500)",
265
+ hoverBackgroundColor: "var(--colorsSemanticNegative600)"
269
266
  })}
270
267
  }
271
268
  `;
@@ -278,8 +275,8 @@ const StyledUndoButton = (0, _styledComponents.default)(_iconButton.default)`
278
275
  isFocused
279
276
  }) => displayOnlyOnHover && !(isHovered || isFocused) && "display: none;"}
280
277
  ${props => getButtonStyles({ ...props,
281
- iconColor: props.theme.colors.primary,
282
- hoverBackgroundColor: props.theme.colors.secondary
278
+ iconColor: "var(--colorsActionMajor500)",
279
+ hoverBackgroundColor: "var(--colorsActionMajor600)"
283
280
  })}
284
281
  }
285
282
  `;
@@ -318,36 +315,6 @@ const StyledTitle = _styledComponents.default.h4`
318
315
  font-weight: 600;
319
316
  `;
320
317
  exports.StyledTitle = StyledTitle;
321
- StyledBlock.defaultProps = {
322
- theme: _themes.baseTheme
323
- };
324
- StyledContent.defaultProps = {
325
- theme: _themes.baseTheme
326
- };
327
- StyledEditAction.defaultProps = {
328
- theme: _themes.baseTheme
329
- };
330
- StyledDeleteButton.defaultProps = {
331
- theme: _themes.baseTheme
332
- };
333
- StyledUndoButton.defaultProps = {
334
- theme: _themes.baseTheme
335
- };
336
- StyledActionsContainer.defaultProps = {
337
- theme: _themes.baseTheme
338
- };
339
- StyledFooter.defaultProps = {
340
- theme: _themes.baseTheme
341
- };
342
318
  StyledPod.defaultProps = {
343
319
  theme: _themes.baseTheme
344
- };
345
- StyledHeader.defaultProps = {
346
- theme: _themes.baseTheme
347
- };
348
- StyledSubtitle.defaultProps = {
349
- theme: _themes.baseTheme
350
- };
351
- StyledTitle.defaultProps = {
352
- theme: _themes.baseTheme
353
320
  };
@@ -19,8 +19,6 @@ var _form = _interopRequireDefault(require("../form"));
19
19
 
20
20
  var _button = _interopRequireDefault(require("../button"));
21
21
 
22
- var _deleteButton = _interopRequireDefault(require("./delete-button.style"));
23
-
24
22
  var _events = _interopRequireDefault(require("../../__internal__/utils/helpers/events"));
25
23
 
26
24
  var _tags = _interopRequireDefault(require("../../__internal__/utils/helpers/tags/tags"));
@@ -111,8 +109,9 @@ const ShowEditPod = ({
111
109
 
112
110
  const deleteButton = () => {
113
111
  const label = deleteText || locale.actions.delete();
114
- return /*#__PURE__*/_react.default.createElement(_deleteButton.default, {
112
+ return /*#__PURE__*/_react.default.createElement(_button.default, {
115
113
  buttonType: "tertiary",
114
+ destructive: true,
116
115
  "data-element": "delete-button",
117
116
  size: "small",
118
117
  onClick: onDelete
@@ -13,10 +13,6 @@ var _podStyle = require("../pod/pod.style.js");
13
13
 
14
14
  var _pod = _interopRequireDefault(require("../pod"));
15
15
 
16
- var _deleteButtonStyle = _interopRequireDefault(require("./delete-button.style.js"));
17
-
18
- var _themes = require("../../style/themes");
19
-
20
16
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
17
 
22
18
  const StyledPod = (0, _styledComponents.default)(_pod.default)`
@@ -28,18 +24,6 @@ const StyledPod = (0, _styledComponents.default)(_pod.default)`
28
24
  padding: 16px;
29
25
  }
30
26
 
31
- ${_deleteButtonStyle.default} {
32
- color: ${({
33
- theme
34
- }) => theme.colors.error};
35
-
36
- &:hover {
37
- color: ${({
38
- theme
39
- }) => theme.colors.destructive.hover};
40
- }
41
- }
42
-
43
27
  .common-input__prefix {
44
28
  z-index: 5;
45
29
  }
@@ -58,8 +42,5 @@ const StyledPod = (0, _styledComponents.default)(_pod.default)`
58
42
  position: absolute;
59
43
  }
60
44
  `;
61
- StyledPod.defaultProps = {
62
- theme: _themes.baseTheme
63
- };
64
45
  var _default = StyledPod;
65
46
  exports.default = _default;
@@ -10,8 +10,8 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
10
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
11
 
12
12
  const StyledSimpleColor = _styledComponents.default.div`
13
- width: 56px;
14
- height: 56px;
13
+ width: var(--sizing700);
14
+ height: var(--sizing700);
15
15
  margin-right: 2px;
16
16
  margin-bottom: 2px;
17
17
 
@@ -7,8 +7,6 @@ exports.default = void 0;
7
7
 
8
8
  var _styledComponents = _interopRequireDefault(require("styled-components"));
9
9
 
10
- var _base = _interopRequireDefault(require("../../../style/themes/base"));
11
-
12
10
  var _input = require("../../../__internal__/input");
13
11
 
14
12
  var _colorSampleBox = _interopRequireDefault(require("../color-sample-box/color-sample-box.style"));
@@ -18,8 +16,8 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
18
16
  const StyledSimpleColorInput = (0, _styledComponents.default)(_input.Input)`
19
17
  position: absolute;
20
18
  opacity: 0;
21
- height: 56px;
22
- width: 56px;
19
+ height: var(--sizing700);
20
+ width: var(--sizing700);
23
21
  margin: 0;
24
22
 
25
23
  &:hover {
@@ -31,16 +29,10 @@ const StyledSimpleColorInput = (0, _styledComponents.default)(_input.Input)`
31
29
  }
32
30
 
33
31
  &:focus + ${_colorSampleBox.default} {
34
- box-shadow: inset 0px 0px 0px 3px ${({
35
- theme
36
- }) => theme.colors.white};
37
- border: 2px solid ${({
38
- theme
39
- }) => theme.colors.focus};
32
+ box-shadow: inset 0px 0px 0px var(--borderWidth200)
33
+ var(--colorsActionMajorYang100);
34
+ border: 2px solid var(--colorsSemanticFocus500);
40
35
  }
41
36
  `;
42
- StyledSimpleColorInput.defaultProps = {
43
- theme: _base.default
44
- };
45
37
  var _default = StyledSimpleColorInput;
46
38
  exports.default = _default;
@@ -9,8 +9,6 @@ var _styledComponents = _interopRequireWildcard(require("styled-components"));
9
9
 
10
10
  var _validationIcon = _interopRequireDefault(require("../../__internal__/validations/validation-icon.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
  function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
@@ -43,24 +41,20 @@ const StyledColorOptions = _styledComponents.default.div`
43
41
  border-top: ${BORDER_WIDTH}px solid transparent;
44
42
 
45
43
  ${({
46
- theme,
47
44
  error,
48
45
  info,
49
46
  warning
50
47
  }) => {
51
48
  if (error) return (0, _styledComponents.css)`
52
- outline: 2px solid ${theme.colors.error};
49
+ outline: var(--borderWidth200) solid var(--colorsSemanticNegative500);
53
50
  `;
54
51
  if (warning) return (0, _styledComponents.css)`
55
- outline: 1px solid ${theme.colors.warning};
52
+ outline: var(--borderWidth200) solid var(--colorsSemanticCaution500);
56
53
  `;
57
54
  if (info) return (0, _styledComponents.css)`
58
- outline: 1px solid ${theme.colors.info};
55
+ outline: var(--borderWidth200) solid var(--colorsSemanticInfo500);
59
56
  `;
60
57
  return "";
61
58
  }}
62
59
  `;
63
- exports.StyledColorOptions = StyledColorOptions;
64
- StyledColorOptions.defaultProps = {
65
- theme: _base.default
66
- };
60
+ exports.StyledColorOptions = StyledColorOptions;
@@ -11,15 +11,13 @@ var _icon = _interopRequireDefault(require("../../icon"));
11
11
 
12
12
  var _getRgbValues = _interopRequireDefault(require("../../../style/utils/get-rgb-values"));
13
13
 
14
- var _base = _interopRequireDefault(require("../../../style/themes/base"));
15
-
16
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
15
 
18
16
  function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
19
17
 
20
18
  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
19
 
22
- const getIconColor = (color, theme) => {
20
+ const getIconColor = color => {
23
21
  const rgbValues = (0, _getRgbValues.default)(color);
24
22
  const [r, g, b] = rgbValues; // color contrast calculating formula as per W3 suggestions
25
23
 
@@ -27,8 +25,8 @@ const getIconColor = (color, theme) => {
27
25
  greenMultiplier = 587,
28
26
  blueMultiplier = 114;
29
27
  const contrast = (Math.round(r * redMultiplier) + Math.round(g * greenMultiplier) + Math.round(b * blueMultiplier)) / 1000;
30
- if (contrast < 128) return theme.colors.white;
31
- return theme.text.color;
28
+ if (contrast < 128) return "var(--colorsActionMajorYang100)";
29
+ return "var(--colorsActionMajorYin090)";
32
30
  };
33
31
 
34
32
  const StyledTickIcon = (0, _styledComponents.default)(_icon.default)`
@@ -40,9 +38,8 @@ const StyledTickIcon = (0, _styledComponents.default)(_icon.default)`
40
38
  &::before {
41
39
  font-size: 22px;
42
40
  color: ${({
43
- color,
44
- theme
45
- }) => getIconColor(color, theme)};
41
+ color
42
+ }) => getIconColor(color)};
46
43
  }
47
44
 
48
45
  ${({
@@ -53,8 +50,5 @@ const StyledTickIcon = (0, _styledComponents.default)(_icon.default)`
53
50
  }
54
51
  `}
55
52
  `;
56
- StyledTickIcon.defaultProps = {
57
- theme: _base.default
58
- };
59
53
  var _default = StyledTickIcon;
60
54
  exports.default = _default;
@@ -169,15 +169,6 @@ declare function _default(palette: any): {
169
169
  color: any;
170
170
  hover: any;
171
171
  };
172
- pod: {
173
- border: any;
174
- secondaryBackground: any;
175
- tertiaryBackground: any;
176
- softDeleteText: any;
177
- tileBackground: string;
178
- footerBackground: any;
179
- hoverBackground: any;
180
- };
181
172
  text: {
182
173
  color: any;
183
174
  placeholder: any;
@@ -188,15 +188,6 @@ var _default = palette => {
188
188
  color: palette.blackOpacity(0.65),
189
189
  hover: palette.blackOpacity(0.9)
190
190
  },
191
- pod: {
192
- border: palette.slateTint(80),
193
- secondaryBackground: palette.slateTint(95),
194
- tertiaryBackground: palette.slateTint(90),
195
- softDeleteText: palette.blackOpacity(0.3),
196
- tileBackground: "#FFFFFF",
197
- footerBackground: palette.slateTint(95),
198
- hoverBackground: palette.slateTint(85)
199
- },
200
191
  text: {
201
192
  color: palette.blackOpacity(0.9),
202
193
  placeholder: palette.blackOpacity(0.55),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "carbon-react",
3
- "version": "104.26.1",
3
+ "version": "104.29.0",
4
4
  "description": "A library of reusable React components for easily building user interfaces.",
5
5
  "engineStrict": true,
6
6
  "engines": {
@@ -51,8 +51,8 @@
51
51
  "homepage": "https://carbon.sage.com",
52
52
  "peerDependencies": {
53
53
  "draft-js": "^0.11.5",
54
- "react": "^16.12.0",
55
- "react-dom": "^16.12.0",
54
+ "react": "^16.14.0",
55
+ "react-dom": "^16.14.0",
56
56
  "styled-components": "^4.4.1"
57
57
  },
58
58
  "devDependencies": {
@@ -87,8 +87,8 @@
87
87
  "@types/enzyme-adapter-react-16": "^1.0.5",
88
88
  "@types/jest": "^26.0.19",
89
89
  "@types/node": "10.12.18",
90
- "@types/react": "16.9.31",
91
- "@types/react-dom": "16.0.11",
90
+ "@types/react": "16.9.56",
91
+ "@types/react-dom": "16.9.8",
92
92
  "@types/styled-components": "^5.1.9",
93
93
  "@types/uuid": "^8.3.3",
94
94
  "@typescript-eslint/eslint-plugin": "^5.4.0",
@@ -139,9 +139,9 @@
139
139
  "mockdate": "^2.0.2",
140
140
  "prettier": "^2.1.2",
141
141
  "raf": "^3.4.0",
142
- "react": "^16.12.0",
143
- "react-dom": "^16.12.0",
144
- "react-test-renderer": "^16.12.0",
142
+ "react": "^16.14.0",
143
+ "react-dom": "^16.14.0",
144
+ "react-test-renderer": "^16.14.0",
145
145
  "rimraf": "^3.0.2",
146
146
  "semantic-release": "^19.0.2",
147
147
  "semver": "^7.3.5",
@@ -1,3 +0,0 @@
1
- export default StyledDeleteButton;
2
- declare const StyledDeleteButton: import("styled-components").StyledComponent<typeof Button, any, {}, never>;
3
- import Button from "../button";
@@ -1,20 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
-
8
- var _styledComponents = _interopRequireDefault(require("styled-components"));
9
-
10
- var _button = _interopRequireDefault(require("../button"));
11
-
12
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
-
14
- const StyledDeleteButton = (0, _styledComponents.default)(_button.default)`
15
- padding-right: 0px;
16
- padding-left: 0px;
17
- margin-right: 0px;
18
- `;
19
- var _default = StyledDeleteButton;
20
- exports.default = _default;