@comicrelief/component-library 8.4.0 → 8.5.1
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/dist/components/Molecules/CardDs/__snapshots__/CardDs.test.js.snap +20 -20
- package/dist/components/Organisms/MarketingPreferencesDS/_MarketingPreferencesDS.js +4 -3
- package/dist/index.js +14 -0
- package/package.json +1 -1
- package/src/components/Molecules/CardDs/__snapshots__/CardDs.test.js.snap +20 -20
- package/src/components/Organisms/MarketingPreferencesDS/_MarketingPreferencesDS.js +3 -2
- package/src/index.js +2 -0
|
@@ -61,6 +61,10 @@ exports[`renders Column view correctly 1`] = `
|
|
|
61
61
|
color: #FFFFFF;
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
+
.c9 {
|
|
65
|
+
fill: #FFFFFF;
|
|
66
|
+
}
|
|
67
|
+
|
|
64
68
|
.c0 {
|
|
65
69
|
display: -webkit-box;
|
|
66
70
|
display: -webkit-flex;
|
|
@@ -115,10 +119,6 @@ exports[`renders Column view correctly 1`] = `
|
|
|
115
119
|
z-index: 2;
|
|
116
120
|
}
|
|
117
121
|
|
|
118
|
-
.c9 {
|
|
119
|
-
fill: #FFFFFF;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
122
|
@media (min-width:740px) {
|
|
123
123
|
.c8 {
|
|
124
124
|
width: auto;
|
|
@@ -145,6 +145,12 @@ exports[`renders Column view correctly 1`] = `
|
|
|
145
145
|
}
|
|
146
146
|
}
|
|
147
147
|
|
|
148
|
+
@media (min-width:1024px) {
|
|
149
|
+
.c9 {
|
|
150
|
+
fill: #FFFFFF;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
148
154
|
@media (min-width:1440px) {
|
|
149
155
|
.c0 {
|
|
150
156
|
-webkit-flex-direction: column;
|
|
@@ -172,12 +178,6 @@ exports[`renders Column view correctly 1`] = `
|
|
|
172
178
|
}
|
|
173
179
|
}
|
|
174
180
|
|
|
175
|
-
@media (min-width:1024px) {
|
|
176
|
-
.c9 {
|
|
177
|
-
fill: #FFFFFF;
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
|
|
181
181
|
<div
|
|
182
182
|
className="c0"
|
|
183
183
|
>
|
|
@@ -313,6 +313,10 @@ exports[`renders correctly 1`] = `
|
|
|
313
313
|
color: #FFFFFF;
|
|
314
314
|
}
|
|
315
315
|
|
|
316
|
+
.c9 {
|
|
317
|
+
fill: #FFFFFF;
|
|
318
|
+
}
|
|
319
|
+
|
|
316
320
|
.c0 {
|
|
317
321
|
display: -webkit-box;
|
|
318
322
|
display: -webkit-flex;
|
|
@@ -367,10 +371,6 @@ exports[`renders correctly 1`] = `
|
|
|
367
371
|
z-index: 2;
|
|
368
372
|
}
|
|
369
373
|
|
|
370
|
-
.c9 {
|
|
371
|
-
fill: #FFFFFF;
|
|
372
|
-
}
|
|
373
|
-
|
|
374
374
|
@media (min-width:740px) {
|
|
375
375
|
.c8 {
|
|
376
376
|
width: auto;
|
|
@@ -397,6 +397,12 @@ exports[`renders correctly 1`] = `
|
|
|
397
397
|
}
|
|
398
398
|
}
|
|
399
399
|
|
|
400
|
+
@media (min-width:1024px) {
|
|
401
|
+
.c9 {
|
|
402
|
+
fill: #FFFFFF;
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
|
|
400
406
|
@media (min-width:740px) {
|
|
401
407
|
.c0 {
|
|
402
408
|
-webkit-flex-direction: row;
|
|
@@ -457,12 +463,6 @@ exports[`renders correctly 1`] = `
|
|
|
457
463
|
}
|
|
458
464
|
}
|
|
459
465
|
|
|
460
|
-
@media (min-width:1024px) {
|
|
461
|
-
.c9 {
|
|
462
|
-
fill: #FFFFFF;
|
|
463
|
-
}
|
|
464
|
-
}
|
|
465
|
-
|
|
466
466
|
<div
|
|
467
467
|
className="c0"
|
|
468
468
|
>
|
|
@@ -31,7 +31,8 @@ const MarketingPreferencesDS = _ref => {
|
|
|
31
31
|
copyBottom = _DefaultCopy.defaultCopyBottom,
|
|
32
32
|
mpValidationOptions,
|
|
33
33
|
id = null,
|
|
34
|
-
formContext = null
|
|
34
|
+
formContext = null,
|
|
35
|
+
...rest
|
|
35
36
|
} = _ref;
|
|
36
37
|
const {
|
|
37
38
|
formState: {
|
|
@@ -89,9 +90,9 @@ const MarketingPreferencesDS = _ref => {
|
|
|
89
90
|
const showPhoneField = !mp_permissionPhone.hideInput && (phoneChoice || errors.mp_phone);
|
|
90
91
|
const showPostFields = !mp_permissionPost.hideInput && (postChoice || isAddressErroring());
|
|
91
92
|
const customId = id ? "marketing-preferences--".concat(id) : 'marketing-preferences';
|
|
92
|
-
return /*#__PURE__*/_react.default.createElement(_MarketingPreferencesDS.OuterWrapper, {
|
|
93
|
+
return /*#__PURE__*/_react.default.createElement(_MarketingPreferencesDS.OuterWrapper, Object.assign({
|
|
93
94
|
id: customId
|
|
94
|
-
}, copyTop && /*#__PURE__*/_react.default.createElement(_MarketingPreferencesDS.TopCopyWrapper, null, copyTop), !mp_permissionEmail.disableOption && /*#__PURE__*/_react.default.createElement(_MarketingPreferencesDS.FormField, {
|
|
95
|
+
}, rest), copyTop && /*#__PURE__*/_react.default.createElement(_MarketingPreferencesDS.TopCopyWrapper, null, copyTop), !mp_permissionEmail.disableOption && /*#__PURE__*/_react.default.createElement(_MarketingPreferencesDS.FormField, {
|
|
95
96
|
className: "field-email"
|
|
96
97
|
}, /*#__PURE__*/_react.default.createElement(_MarketingPreferencesDS.Head, null, /*#__PURE__*/_react.default.createElement(_CheckAnswer.default, {
|
|
97
98
|
mpValidationOptions: mpValidationOptions,
|
package/dist/index.js
CHANGED
|
@@ -118,6 +118,12 @@ Object.defineProperty(exports, "ErrorText", {
|
|
|
118
118
|
return _ErrorText.default;
|
|
119
119
|
}
|
|
120
120
|
});
|
|
121
|
+
Object.defineProperty(exports, "External", {
|
|
122
|
+
enumerable: true,
|
|
123
|
+
get: function () {
|
|
124
|
+
return _External.default;
|
|
125
|
+
}
|
|
126
|
+
});
|
|
121
127
|
Object.defineProperty(exports, "Footer", {
|
|
122
128
|
enumerable: true,
|
|
123
129
|
get: function () {
|
|
@@ -160,6 +166,12 @@ Object.defineProperty(exports, "Input", {
|
|
|
160
166
|
return _Input.default;
|
|
161
167
|
}
|
|
162
168
|
});
|
|
169
|
+
Object.defineProperty(exports, "Internal", {
|
|
170
|
+
enumerable: true,
|
|
171
|
+
get: function () {
|
|
172
|
+
return _Internal.default;
|
|
173
|
+
}
|
|
174
|
+
});
|
|
163
175
|
Object.defineProperty(exports, "Label", {
|
|
164
176
|
enumerable: true,
|
|
165
177
|
get: function () {
|
|
@@ -427,6 +439,8 @@ var _ErrorText = _interopRequireDefault(require("./components/Atoms/ErrorText/Er
|
|
|
427
439
|
var _Label = _interopRequireDefault(require("./components/Atoms/Label/Label"));
|
|
428
440
|
var _ButtonWithStates = _interopRequireDefault(require("./components/Atoms/ButtonWithStates/ButtonWithStates"));
|
|
429
441
|
var _Confetti = _interopRequireDefault(require("./components/Atoms/Confetti/Confetti"));
|
|
442
|
+
var _External = _interopRequireDefault(require("./components/Atoms/Icons/External"));
|
|
443
|
+
var _Internal = _interopRequireDefault(require("./components/Atoms/Icons/Internal"));
|
|
430
444
|
var _HeroBanner = _interopRequireDefault(require("./components/Molecules/HeroBanner/HeroBanner"));
|
|
431
445
|
var _InfoBanner = _interopRequireDefault(require("./components/Molecules/InfoBanner/InfoBanner"));
|
|
432
446
|
var _SingleMessage = _interopRequireDefault(require("./components/Molecules/SingleMessage/SingleMessage"));
|
package/package.json
CHANGED
|
@@ -61,6 +61,10 @@ exports[`renders Column view correctly 1`] = `
|
|
|
61
61
|
color: #FFFFFF;
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
+
.c9 {
|
|
65
|
+
fill: #FFFFFF;
|
|
66
|
+
}
|
|
67
|
+
|
|
64
68
|
.c0 {
|
|
65
69
|
display: -webkit-box;
|
|
66
70
|
display: -webkit-flex;
|
|
@@ -115,10 +119,6 @@ exports[`renders Column view correctly 1`] = `
|
|
|
115
119
|
z-index: 2;
|
|
116
120
|
}
|
|
117
121
|
|
|
118
|
-
.c9 {
|
|
119
|
-
fill: #FFFFFF;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
122
|
@media (min-width:740px) {
|
|
123
123
|
.c8 {
|
|
124
124
|
width: auto;
|
|
@@ -145,6 +145,12 @@ exports[`renders Column view correctly 1`] = `
|
|
|
145
145
|
}
|
|
146
146
|
}
|
|
147
147
|
|
|
148
|
+
@media (min-width:1024px) {
|
|
149
|
+
.c9 {
|
|
150
|
+
fill: #FFFFFF;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
148
154
|
@media (min-width:1440px) {
|
|
149
155
|
.c0 {
|
|
150
156
|
-webkit-flex-direction: column;
|
|
@@ -172,12 +178,6 @@ exports[`renders Column view correctly 1`] = `
|
|
|
172
178
|
}
|
|
173
179
|
}
|
|
174
180
|
|
|
175
|
-
@media (min-width:1024px) {
|
|
176
|
-
.c9 {
|
|
177
|
-
fill: #FFFFFF;
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
|
|
181
181
|
<div
|
|
182
182
|
className="c0"
|
|
183
183
|
>
|
|
@@ -313,6 +313,10 @@ exports[`renders correctly 1`] = `
|
|
|
313
313
|
color: #FFFFFF;
|
|
314
314
|
}
|
|
315
315
|
|
|
316
|
+
.c9 {
|
|
317
|
+
fill: #FFFFFF;
|
|
318
|
+
}
|
|
319
|
+
|
|
316
320
|
.c0 {
|
|
317
321
|
display: -webkit-box;
|
|
318
322
|
display: -webkit-flex;
|
|
@@ -367,10 +371,6 @@ exports[`renders correctly 1`] = `
|
|
|
367
371
|
z-index: 2;
|
|
368
372
|
}
|
|
369
373
|
|
|
370
|
-
.c9 {
|
|
371
|
-
fill: #FFFFFF;
|
|
372
|
-
}
|
|
373
|
-
|
|
374
374
|
@media (min-width:740px) {
|
|
375
375
|
.c8 {
|
|
376
376
|
width: auto;
|
|
@@ -397,6 +397,12 @@ exports[`renders correctly 1`] = `
|
|
|
397
397
|
}
|
|
398
398
|
}
|
|
399
399
|
|
|
400
|
+
@media (min-width:1024px) {
|
|
401
|
+
.c9 {
|
|
402
|
+
fill: #FFFFFF;
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
|
|
400
406
|
@media (min-width:740px) {
|
|
401
407
|
.c0 {
|
|
402
408
|
-webkit-flex-direction: row;
|
|
@@ -457,12 +463,6 @@ exports[`renders correctly 1`] = `
|
|
|
457
463
|
}
|
|
458
464
|
}
|
|
459
465
|
|
|
460
|
-
@media (min-width:1024px) {
|
|
461
|
-
.c9 {
|
|
462
|
-
fill: #FFFFFF;
|
|
463
|
-
}
|
|
464
|
-
}
|
|
465
|
-
|
|
466
466
|
<div
|
|
467
467
|
className="c0"
|
|
468
468
|
>
|
|
@@ -19,7 +19,8 @@ const MarketingPreferencesDS = ({
|
|
|
19
19
|
copyBottom = defaultCopyBottom,
|
|
20
20
|
mpValidationOptions,
|
|
21
21
|
id = null,
|
|
22
|
-
formContext = null
|
|
22
|
+
formContext = null,
|
|
23
|
+
...rest
|
|
23
24
|
}) => {
|
|
24
25
|
const { formState: { errors }, control } = formContext;
|
|
25
26
|
|
|
@@ -61,7 +62,7 @@ const MarketingPreferencesDS = ({
|
|
|
61
62
|
const customId = id ? `marketing-preferences--${id}` : 'marketing-preferences';
|
|
62
63
|
|
|
63
64
|
return (
|
|
64
|
-
<OuterWrapper id={customId}>
|
|
65
|
+
<OuterWrapper id={customId} {...rest}>
|
|
65
66
|
{copyTop && <TopCopyWrapper>{copyTop}</TopCopyWrapper>}
|
|
66
67
|
|
|
67
68
|
{/* Render Email checkboxes and input if not removed in config */}
|
package/src/index.js
CHANGED
|
@@ -30,6 +30,8 @@ export { default as ErrorText } from './components/Atoms/ErrorText/ErrorText';
|
|
|
30
30
|
export { default as Label } from './components/Atoms/Label/Label';
|
|
31
31
|
export { default as ButtonWithStates } from './components/Atoms/ButtonWithStates/ButtonWithStates';
|
|
32
32
|
export { default as Confetti } from './components/Atoms/Confetti/Confetti';
|
|
33
|
+
export { default as External } from './components/Atoms/Icons/External';
|
|
34
|
+
export { default as Internal } from './components/Atoms/Icons/Internal';
|
|
33
35
|
|
|
34
36
|
/* Molecules */
|
|
35
37
|
export { default as HeroBanner } from './components/Molecules/HeroBanner/HeroBanner';
|