carbon-react 104.27.0 → 104.30.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/__internal__/sticky-footer/sticky-footer.style.js +7 -15
- package/lib/components/drawer/drawer.style.js +35 -36
- package/lib/components/form/__internal__/form-summary.style.js +10 -25
- package/lib/components/form/form.style.js +42 -35
- 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 -12
- package/lib/style/themes/base/base-theme.config.js +0 -12
- 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
|
@@ -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
|
-
|
|
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:
|
|
34
|
-
box-shadow:
|
|
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;
|
|
@@ -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:
|
|
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:
|
|
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:
|
|
92
|
+
width: ${defaultExpandedWidth};
|
|
94
93
|
overflow: hidden;
|
|
95
|
-
min-width:
|
|
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:
|
|
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:
|
|
123
|
-
width:
|
|
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
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
}
|
|
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
|
-
|
|
154
|
-
|
|
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
|
-
|
|
177
|
-
|
|
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:
|
|
198
|
+
top: var(--spacing300);
|
|
197
199
|
right: 8px;
|
|
198
|
-
padding:
|
|
199
|
-
width:
|
|
200
|
-
height:
|
|
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:
|
|
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;
|
|
@@ -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
|
var _icon = _interopRequireDefault(require("../../icon/icon.style"));
|
|
15
13
|
|
|
16
14
|
var _button = _interopRequireDefault(require("../../button/button.style"));
|
|
@@ -31,10 +29,9 @@ const StyledFormSummary = _styledComponents.default.div`
|
|
|
31
29
|
white-space: nowrap;
|
|
32
30
|
|
|
33
31
|
${({
|
|
34
|
-
showSummary
|
|
35
|
-
theme
|
|
32
|
+
showSummary
|
|
36
33
|
}) => showSummary && (0, _styledComponents.css)`
|
|
37
|
-
background-color:
|
|
34
|
+
background-color: var(--colorsUtilityMajor025);
|
|
38
35
|
`}
|
|
39
36
|
|
|
40
37
|
${_button.default} {
|
|
@@ -57,46 +54,34 @@ const StyledInternalSummary = _styledComponents.default.div`
|
|
|
57
54
|
margin-right: 16px;
|
|
58
55
|
}
|
|
59
56
|
${({
|
|
60
|
-
type
|
|
61
|
-
theme
|
|
57
|
+
type
|
|
62
58
|
}) => type === "warnings" && (0, _styledComponents.css)`
|
|
63
|
-
color:
|
|
59
|
+
color: var(--colorsSemanticCaution650);
|
|
64
60
|
`}
|
|
65
61
|
${({
|
|
66
|
-
type
|
|
67
|
-
theme
|
|
62
|
+
type
|
|
68
63
|
}) => type === "errors" && (0, _styledComponents.css)`
|
|
69
|
-
color:
|
|
64
|
+
color: var(--colorsSemanticNegative600);
|
|
70
65
|
`}
|
|
71
66
|
|
|
72
67
|
${_icon.default} {
|
|
73
68
|
margin-right: 4px;
|
|
74
69
|
${({
|
|
75
|
-
type
|
|
76
|
-
theme
|
|
70
|
+
type
|
|
77
71
|
}) => type === "warnings" && (0, _styledComponents.css)`
|
|
78
|
-
color:
|
|
72
|
+
color: var(--colorsSemanticCaution650);
|
|
79
73
|
`}
|
|
80
74
|
${({
|
|
81
|
-
type
|
|
82
|
-
theme
|
|
75
|
+
type
|
|
83
76
|
}) => type === "errors" && (0, _styledComponents.css)`
|
|
84
|
-
color:
|
|
77
|
+
color: var(--colorsSemanticNegative600);
|
|
85
78
|
`}
|
|
86
79
|
}
|
|
87
80
|
`;
|
|
88
81
|
exports.StyledInternalSummary = StyledInternalSummary;
|
|
89
82
|
StyledFormSummary.propTypes = {
|
|
90
|
-
theme: _propTypes.default.object,
|
|
91
83
|
showSummary: _propTypes.default.bool
|
|
92
84
|
};
|
|
93
|
-
StyledFormSummary.defaultProps = {
|
|
94
|
-
theme: _base.default
|
|
95
|
-
};
|
|
96
85
|
StyledInternalSummary.propTypes = {
|
|
97
|
-
theme: _propTypes.default.object,
|
|
98
86
|
type: _propTypes.default.oneOf(["errors", "warnings"])
|
|
99
|
-
};
|
|
100
|
-
StyledInternalSummary.defaultProps = {
|
|
101
|
-
theme: _base.default
|
|
102
87
|
};
|
|
@@ -55,15 +55,14 @@ const StyledFormFooter = _styledComponents.default.div`
|
|
|
55
55
|
`}
|
|
56
56
|
|
|
57
57
|
${({
|
|
58
|
-
stickyFooter
|
|
59
|
-
theme
|
|
58
|
+
stickyFooter
|
|
60
59
|
}) => (0, _styledComponents.css)`
|
|
61
60
|
${!stickyFooter && (0, _styledComponents.css)`
|
|
62
61
|
margin-top: 48px;
|
|
63
62
|
`}
|
|
64
63
|
|
|
65
64
|
${stickyFooter && (0, _styledComponents.css)`
|
|
66
|
-
background-color:
|
|
65
|
+
background-color: var(--colorsUtilityYang100);
|
|
67
66
|
box-shadow: 0 -4px 12px 0 rgba(0, 0, 0, 0.05);
|
|
68
67
|
box-sizing: border-box;
|
|
69
68
|
padding: 16px 32px;
|
|
@@ -75,6 +74,17 @@ const StyledFormFooter = _styledComponents.default.div`
|
|
|
75
74
|
`}
|
|
76
75
|
`;
|
|
77
76
|
exports.StyledFormFooter = StyledFormFooter;
|
|
77
|
+
|
|
78
|
+
const formBottomMargins = fieldSpacing => ({
|
|
79
|
+
0: "var(--spacing000)",
|
|
80
|
+
1: "var(--spacing100)",
|
|
81
|
+
2: "var(--spacing200)",
|
|
82
|
+
3: "var(--spacing300)",
|
|
83
|
+
4: "var(--spacing400)",
|
|
84
|
+
5: "var(--spacing500)",
|
|
85
|
+
7: "var(--spacing700)"
|
|
86
|
+
})[fieldSpacing];
|
|
87
|
+
|
|
78
88
|
const StyledForm = _styledComponents.default.form`
|
|
79
89
|
${_styledSystem.space}
|
|
80
90
|
|
|
@@ -84,24 +94,26 @@ const StyledForm = _styledComponents.default.form`
|
|
|
84
94
|
height: ${height};
|
|
85
95
|
`}
|
|
86
96
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
97
|
+
${({
|
|
98
|
+
fieldSpacing
|
|
99
|
+
}) => (0, _styledComponents.css)`
|
|
100
|
+
&
|
|
101
|
+
${_formField.default},
|
|
102
|
+
${_fieldset.StyledFieldset},
|
|
103
|
+
${_fieldset2.FieldsetStyle},
|
|
104
|
+
> ${_button.default} {
|
|
105
|
+
margin-top: 0;
|
|
106
|
+
margin-bottom: ${formBottomMargins(fieldSpacing)};
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
${_inlineInputs.default} {
|
|
110
|
+
${_formField.default} {
|
|
111
|
+
margin-bottom: 0;
|
|
112
|
+
}
|
|
99
113
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
}) => theme.spacing * fieldSpacing}px;
|
|
104
|
-
}
|
|
114
|
+
margin-bottom: ${formBottomMargins(fieldSpacing)};
|
|
115
|
+
}
|
|
116
|
+
`}
|
|
105
117
|
|
|
106
118
|
${_search.default} ${_formField.default} {
|
|
107
119
|
margin-bottom: 0px;
|
|
@@ -109,8 +121,7 @@ const StyledForm = _styledComponents.default.form`
|
|
|
109
121
|
|
|
110
122
|
${({
|
|
111
123
|
stickyFooter,
|
|
112
|
-
isInSidebar
|
|
113
|
-
theme
|
|
124
|
+
isInSidebar
|
|
114
125
|
}) => stickyFooter && (0, _styledComponents.css)`
|
|
115
126
|
display: flex;
|
|
116
127
|
flex-direction: column;
|
|
@@ -119,20 +130,20 @@ const StyledForm = _styledComponents.default.form`
|
|
|
119
130
|
${isInSidebar && (0, _styledComponents.css)`
|
|
120
131
|
min-height: 100%;
|
|
121
132
|
${StyledFormContent}.sticky {
|
|
122
|
-
padding-right:
|
|
123
|
-
padding-left:
|
|
133
|
+
padding-right: var(--spacing400);
|
|
134
|
+
padding-left: var(--spacing400);
|
|
124
135
|
padding-top: 27px;
|
|
125
|
-
margin-right:
|
|
126
|
-
margin-left:
|
|
136
|
+
margin-right: calc(-1 * var(--spacing400));
|
|
137
|
+
margin-left: calc(-1 * var(--spacing400));
|
|
127
138
|
margin-top: -27px;
|
|
128
139
|
}
|
|
129
140
|
|
|
130
141
|
${StyledFormFooter}.sticky {
|
|
131
|
-
margin-left:
|
|
132
|
-
margin-bottom:
|
|
133
|
-
width: calc(100% +
|
|
134
|
-
padding-left:
|
|
135
|
-
padding-right:
|
|
142
|
+
margin-left: calc(-1 * var(--spacing400));
|
|
143
|
+
margin-bottom: calc(-1 * var(--spacing400));
|
|
144
|
+
width: calc(100% + var(--spacing800));
|
|
145
|
+
padding-left: var(--spacing400);
|
|
146
|
+
padding-right: var(--spacing400);
|
|
136
147
|
bottom: -32px;
|
|
137
148
|
}
|
|
138
149
|
`}
|
|
@@ -179,10 +190,6 @@ StyledRightButtons.propTypes = {
|
|
|
179
190
|
buttonAlignment: _propTypes.default.oneOf(_form.FORM_BUTTON_ALIGNMENTS)
|
|
180
191
|
};
|
|
181
192
|
StyledFormFooter.propTypes = {
|
|
182
|
-
theme: _propTypes.default.object,
|
|
183
193
|
buttonAlignment: _propTypes.default.oneOf(_form.FORM_BUTTON_ALIGNMENTS),
|
|
184
194
|
stickyFooter: _propTypes.default.bool
|
|
185
|
-
};
|
|
186
|
-
StyledFormFooter.defaultProps = {
|
|
187
|
-
theme: _base.default
|
|
188
195
|
};
|
|
@@ -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;
|
|
@@ -121,9 +121,6 @@ declare function _default(palette: any): {
|
|
|
121
121
|
searchIconHover: any;
|
|
122
122
|
};
|
|
123
123
|
};
|
|
124
|
-
form: {
|
|
125
|
-
invalid: any;
|
|
126
|
-
};
|
|
127
124
|
card: {
|
|
128
125
|
footerBackground: any;
|
|
129
126
|
footerBorder: any;
|
|
@@ -169,15 +166,6 @@ declare function _default(palette: any): {
|
|
|
169
166
|
color: any;
|
|
170
167
|
hover: any;
|
|
171
168
|
};
|
|
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
169
|
text: {
|
|
182
170
|
color: any;
|
|
183
171
|
placeholder: any;
|
|
@@ -140,9 +140,6 @@ var _default = palette => {
|
|
|
140
140
|
searchIconHover: palette.slateTint(75)
|
|
141
141
|
}
|
|
142
142
|
},
|
|
143
|
-
form: {
|
|
144
|
-
invalid: palette.slateTint(95)
|
|
145
|
-
},
|
|
146
143
|
card: {
|
|
147
144
|
footerBackground: palette.slateTint(95),
|
|
148
145
|
footerBorder: palette.slateTint(80)
|
|
@@ -188,15 +185,6 @@ var _default = palette => {
|
|
|
188
185
|
color: palette.blackOpacity(0.65),
|
|
189
186
|
hover: palette.blackOpacity(0.9)
|
|
190
187
|
},
|
|
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
188
|
text: {
|
|
201
189
|
color: palette.blackOpacity(0.9),
|
|
202
190
|
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.30.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;
|