carbon-react 104.27.0 → 104.28.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.
- package/lib/components/heading/heading.component.d.ts +2 -2
- package/lib/components/multi-step-wizard/step/step.d.ts +2 -2
- package/lib/components/pod/pod.style.js +37 -70
- package/lib/components/show-edit-pod/show-edit-pod.component.js +2 -3
- package/lib/components/show-edit-pod/show-edit-pod.style.js +0 -19
- package/lib/style/themes/base/base-theme.config.d.ts +0 -9
- package/lib/style/themes/base/base-theme.config.js +0 -9
- package/package.json +8 -8
- package/lib/components/show-edit-pod/delete-button.style.d.ts +0 -3
- package/lib/components/show-edit-pod/delete-button.style.js +0 -20
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export default Heading;
|
|
2
2
|
declare class Heading extends React.Component<any, any, any> {
|
|
3
|
-
constructor(props:
|
|
4
|
-
constructor(props: any, context
|
|
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:
|
|
14
|
-
constructor(props: any, context
|
|
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 =
|
|
50
|
-
primary:
|
|
51
|
-
secondary:
|
|
52
|
-
tertiary:
|
|
53
|
-
transparent: "
|
|
54
|
-
tile:
|
|
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
|
|
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
|
|
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:
|
|
85
|
+
background-color: var(--colorsUtilityMajor075);
|
|
87
86
|
|
|
88
|
-
${internalEditButton && variant === "tile" && "background-color:
|
|
87
|
+
${internalEditButton && variant === "tile" && "background-color: var(--colorsUtilityMajorTransparent);"}
|
|
89
88
|
|
|
90
89
|
${contentTriggersEdit && (0, _styledComponents.css)`
|
|
91
|
-
background-color:
|
|
90
|
+
background-color: var(--colorsActionMajor600);
|
|
92
91
|
* {
|
|
93
|
-
color:
|
|
92
|
+
color: var(--colorsUtilityYang100);
|
|
94
93
|
}
|
|
95
94
|
`}
|
|
96
95
|
`}
|
|
97
96
|
|
|
98
97
|
${isFocused && (!internalEditButton || contentTriggersEdit) && (0, _styledComponents.css)`
|
|
99
|
-
outline: 3px solid
|
|
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:
|
|
110
|
-
background-color:
|
|
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:
|
|
142
|
+
background-color: var(--colorsUtilityMajor025);
|
|
145
143
|
box-shadow: inset 0px 1px 1px 0 rgba(0, 0, 0, 0.1);
|
|
146
|
-
color:
|
|
144
|
+
color: var(--colorsUtilityYin090);
|
|
147
145
|
padding: ${footerPaddings[size]};
|
|
148
146
|
|
|
149
147
|
${softDelete && (0, _styledComponents.css)`
|
|
150
|
-
color:
|
|
148
|
+
color: var(--colorsUtilityYin030);
|
|
151
149
|
`}
|
|
152
150
|
|
|
153
151
|
${variant === "tile" && (0, _styledComponents.css)`
|
|
154
|
-
border-top: 1px solid
|
|
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 =
|
|
182
|
-
primary:
|
|
183
|
-
secondary:
|
|
184
|
-
tertiary:
|
|
185
|
-
transparent: "
|
|
186
|
-
tile:
|
|
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
|
|
202
|
-
border: 1px solid
|
|
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:
|
|
218
|
+
background: var(--colorsActionMajorTransparent);
|
|
222
219
|
`}
|
|
223
220
|
|
|
224
221
|
${(isHovered || isFocused) && !internalEditButton && (0, _styledComponents.css)`
|
|
225
222
|
background-color: ${hoverBackgroundColor};
|
|
226
|
-
color:
|
|
223
|
+
color: var(--colorsActionMajorYang100);
|
|
227
224
|
|
|
228
225
|
${_icon.default} {
|
|
229
|
-
color:
|
|
226
|
+
color: var(--colorsActionMajorYang100);
|
|
230
227
|
}
|
|
231
228
|
`}
|
|
232
229
|
|
|
233
230
|
${isFocused && (0, _styledComponents.css)`
|
|
234
|
-
outline: 3px solid
|
|
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:
|
|
251
|
-
hoverBackgroundColor:
|
|
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:
|
|
268
|
-
hoverBackgroundColor:
|
|
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:
|
|
282
|
-
hoverBackgroundColor:
|
|
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(
|
|
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;
|
|
@@ -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.
|
|
3
|
+
"version": "104.28.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.
|
|
55
|
-
"react-dom": "^16.
|
|
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.
|
|
91
|
-
"@types/react-dom": "16.
|
|
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.
|
|
143
|
-
"react-dom": "^16.
|
|
144
|
-
"react-test-renderer": "^16.
|
|
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,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;
|