@comicrelief/component-library 8.27.0 → 8.28.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/Atoms/Picture/Picture.js +24 -16
- package/dist/components/Atoms/Picture/Picture.test.js +2 -24
- package/dist/components/Molecules/ArticleTeaser/ArticleTeaser.test.js +0 -28
- package/dist/components/Molecules/Card/__snapshots__/Card.test.js.snap +0 -6
- package/dist/components/Molecules/CardDs/__snapshots__/CardDs.test.js.snap +0 -28
- package/dist/components/Molecules/PartnerLink/PartnerLink.test.js +0 -8
- package/dist/components/Molecules/Promo/__snapshots__/Promo.test.js.snap +0 -28
- package/dist/components/Molecules/SearchResult/__snapshots__/SearchResult.test.js.snap +0 -24
- package/dist/components/Molecules/SingleMessage/__snapshots__/SingleMessage.test.js.snap +0 -78
- package/dist/components/Molecules/SingleMessageDS/__snapshots__/SingleMessageDs.test.js.snap +0 -14
- package/dist/components/Organisms/Membership/Membership.test.js +0 -6
- package/dist/theme/crTheme/colors.js +46 -37
- package/package.json +1 -1
- package/src/components/Atoms/Picture/Picture.js +19 -21
- package/src/components/Atoms/Picture/Picture.test.js +7 -29
- package/src/components/Molecules/ArticleTeaser/ArticleTeaser.test.js +0 -28
- package/src/components/Molecules/Card/__snapshots__/Card.test.js.snap +0 -6
- package/src/components/Molecules/CardDs/__snapshots__/CardDs.test.js.snap +0 -28
- package/src/components/Molecules/PartnerLink/PartnerLink.test.js +0 -8
- package/src/components/Molecules/Promo/__snapshots__/Promo.test.js.snap +0 -28
- package/src/components/Molecules/SearchResult/__snapshots__/SearchResult.test.js.snap +0 -24
- package/src/components/Molecules/SingleMessage/__snapshots__/SingleMessage.test.js.snap +0 -78
- package/src/components/Molecules/SingleMessageDS/__snapshots__/SingleMessageDs.test.js.snap +0 -14
- package/src/components/Organisms/Membership/Membership.test.js +0 -6
- package/src/theme/crTheme/colors.js +61 -37
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
|
-
var _react =
|
|
9
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
10
10
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
11
11
|
var _spacing = _interopRequireDefault(require("../../../theme/shared/spacing"));
|
|
12
12
|
require("lazysizes");
|
|
@@ -18,14 +18,10 @@ const Wrapper = _styledComponents.default.div.withConfig({
|
|
|
18
18
|
componentId: "sc-1x3z81z-0"
|
|
19
19
|
})(["", ";display:block;width:", ";height:", ";position:relative;", ";"], _ref => {
|
|
20
20
|
let {
|
|
21
|
+
objFitState,
|
|
21
22
|
nonObjFitImage
|
|
22
23
|
} = _ref;
|
|
23
|
-
return
|
|
24
|
-
background-image: url(${nonObjFitImage});
|
|
25
|
-
background-size: cover;
|
|
26
|
-
background-position: center;
|
|
27
|
-
}
|
|
28
|
-
`;
|
|
24
|
+
return !objFitState && nonObjFitImage && `background-image: url(${nonObjFitImage}); background-size: cover; background-position: center;`;
|
|
29
25
|
}, props => props.width ? props.width : '100%', props => props.height ? props.height : '100%', _ref2 => {
|
|
30
26
|
let {
|
|
31
27
|
isBackgroundImage
|
|
@@ -35,13 +31,12 @@ const Wrapper = _styledComponents.default.div.withConfig({
|
|
|
35
31
|
const Image = _styledComponents.default.img.withConfig({
|
|
36
32
|
displayName: "Picture__Image",
|
|
37
33
|
componentId: "sc-1x3z81z-1"
|
|
38
|
-
})(["width:", ";height:", ";display:block;object-fit:", ";", "
|
|
34
|
+
})(["width:", ";height:", ";display:block;object-fit:", ";", ";", " ", " ", ""], props => props.width ? props.width : '100%', props => props.height ? props.height : 'auto', props => props.objectFit === 'none' && 'none' || props.objectFit === 'cover' && 'cover' || props.objectFit === 'contain' && 'contain', _ref3 => {
|
|
39
35
|
let {
|
|
40
|
-
objectFit
|
|
36
|
+
objectFit,
|
|
37
|
+
objFitState
|
|
41
38
|
} = _ref3;
|
|
42
|
-
return objectFit !== 'none' &&
|
|
43
|
-
visibility: hidden;
|
|
44
|
-
`;
|
|
39
|
+
return objectFit !== 'none' && !objFitState && 'visibility: hidden;';
|
|
45
40
|
}, _ref4 => {
|
|
46
41
|
let {
|
|
47
42
|
smallBreakpointRowLayout
|
|
@@ -95,7 +90,15 @@ const Picture = _ref11 => {
|
|
|
95
90
|
mediumBreakpointRowLayout = null,
|
|
96
91
|
...rest
|
|
97
92
|
} = _ref11;
|
|
93
|
+
const document = typeof window !== 'undefined' ? window.document : null;
|
|
94
|
+
const [objFitState, setObjFitState] = (0, _react.useState)(true);
|
|
98
95
|
let nonObjFitImage = null;
|
|
96
|
+
(0, _react.useEffect)(() => {
|
|
97
|
+
// Once document is available, determine if this browser supports object-fit
|
|
98
|
+
if ('objectFit' in document.documentElement.style === false) {
|
|
99
|
+
setObjFitState(false);
|
|
100
|
+
}
|
|
101
|
+
}, [document]);
|
|
99
102
|
|
|
100
103
|
// Determine which image will be used for the nonObjectFit fallback
|
|
101
104
|
if (image) {
|
|
@@ -110,14 +113,16 @@ const Picture = _ref11 => {
|
|
|
110
113
|
image: image,
|
|
111
114
|
images: images,
|
|
112
115
|
isBackgroundImage: isBackgroundImage,
|
|
113
|
-
nonObjFitImage: nonObjFitImage
|
|
116
|
+
nonObjFitImage: nonObjFitImage,
|
|
117
|
+
objFitState: objFitState
|
|
114
118
|
}, rest), /*#__PURE__*/_react.default.createElement(Image, {
|
|
115
119
|
alt: alt,
|
|
116
120
|
height: height,
|
|
117
121
|
width: width,
|
|
118
122
|
objectFit: objectFit,
|
|
119
123
|
"data-src": image,
|
|
120
|
-
className: "lazyload"
|
|
124
|
+
className: "lazyload",
|
|
125
|
+
objFitState: objFitState
|
|
121
126
|
}));
|
|
122
127
|
}
|
|
123
128
|
return /*#__PURE__*/_react.default.createElement(Wrapper, Object.assign({
|
|
@@ -125,9 +130,11 @@ const Picture = _ref11 => {
|
|
|
125
130
|
width: width,
|
|
126
131
|
image: image,
|
|
127
132
|
images: images,
|
|
133
|
+
setObjFitState: setObjFitState,
|
|
128
134
|
className: "lazyload",
|
|
129
135
|
isBackgroundImage: isBackgroundImage,
|
|
130
|
-
nonObjFitImage: nonObjFitImage
|
|
136
|
+
nonObjFitImage: nonObjFitImage,
|
|
137
|
+
objFitState: objFitState
|
|
131
138
|
}, rest), /*#__PURE__*/_react.default.createElement(Image, {
|
|
132
139
|
alt: alt,
|
|
133
140
|
height: height,
|
|
@@ -140,6 +147,7 @@ const Picture = _ref11 => {
|
|
|
140
147
|
"data-sizes": "auto",
|
|
141
148
|
"data-lowsrc": imageLow,
|
|
142
149
|
className: "lazyload",
|
|
150
|
+
objFitState: objFitState,
|
|
143
151
|
smallBreakpointRowLayout: smallBreakpointRowLayout,
|
|
144
152
|
mediumBreakpointRowLayout: mediumBreakpointRowLayout
|
|
145
153
|
}));
|
|
@@ -6,7 +6,7 @@ require("jest-styled-components");
|
|
|
6
6
|
var _shallowWithTheme = _interopRequireDefault(require("../../../../tests/hoc/shallowWithTheme"));
|
|
7
7
|
var _Picture = _interopRequireDefault(require("./Picture"));
|
|
8
8
|
var _data = require("../../../styleguide/data/data");
|
|
9
|
-
it(
|
|
9
|
+
it("renders correctly", () => {
|
|
10
10
|
const tree = (0, _shallowWithTheme.default)( /*#__PURE__*/_react.default.createElement(_Picture.default, {
|
|
11
11
|
images: _data.defaultData.images,
|
|
12
12
|
image: _data.defaultData.image,
|
|
@@ -27,14 +27,6 @@ it('renders correctly', () => {
|
|
|
27
27
|
object-fit: none;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
@supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {
|
|
31
|
-
.c0 {
|
|
32
|
-
background-image: url(http://images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg);
|
|
33
|
-
background-size: cover;
|
|
34
|
-
background-position: center;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
30
|
<div
|
|
39
31
|
className="c0 lazyload"
|
|
40
32
|
height="auto"
|
|
@@ -55,7 +47,7 @@ it('renders correctly', () => {
|
|
|
55
47
|
</div>
|
|
56
48
|
`);
|
|
57
49
|
});
|
|
58
|
-
it(
|
|
50
|
+
it("renders correctly with custom props", () => {
|
|
59
51
|
const tree = (0, _shallowWithTheme.default)( /*#__PURE__*/_react.default.createElement(_Picture.default, {
|
|
60
52
|
images: _data.defaultData.images,
|
|
61
53
|
image: _data.defaultData.image,
|
|
@@ -79,20 +71,6 @@ it('renders correctly with custom props', () => {
|
|
|
79
71
|
object-fit: cover;
|
|
80
72
|
}
|
|
81
73
|
|
|
82
|
-
@supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {
|
|
83
|
-
.c0 {
|
|
84
|
-
background-image: url(http://images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg);
|
|
85
|
-
background-size: cover;
|
|
86
|
-
background-position: center;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
@supports not ((object-fit:cover) or (object-fit:contain)) {
|
|
91
|
-
.c1 {
|
|
92
|
-
visibility: hidden;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
|
|
96
74
|
<div
|
|
97
75
|
className="c0 lazyload"
|
|
98
76
|
height="100px"
|
|
@@ -154,20 +154,6 @@ it('renders article teaser correctly', () => {
|
|
|
154
154
|
display: flex;
|
|
155
155
|
}
|
|
156
156
|
|
|
157
|
-
@supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {
|
|
158
|
-
.c4 {
|
|
159
|
-
background-image: url(http://images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg);
|
|
160
|
-
background-size: cover;
|
|
161
|
-
background-position: center;
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
@supports not ((object-fit:cover) or (object-fit:contain)) {
|
|
166
|
-
.c6 {
|
|
167
|
-
visibility: hidden;
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
|
|
171
157
|
@media (min-width:740px) {
|
|
172
158
|
.c2 {
|
|
173
159
|
-webkit-flex-direction: row;
|
|
@@ -421,20 +407,6 @@ it('renders press realese correctly', () => {
|
|
|
421
407
|
display: flex;
|
|
422
408
|
}
|
|
423
409
|
|
|
424
|
-
@supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {
|
|
425
|
-
.c4 {
|
|
426
|
-
background-image: url(mock.asset);
|
|
427
|
-
background-size: cover;
|
|
428
|
-
background-position: center;
|
|
429
|
-
}
|
|
430
|
-
}
|
|
431
|
-
|
|
432
|
-
@supports not ((object-fit:cover) or (object-fit:contain)) {
|
|
433
|
-
.c6 {
|
|
434
|
-
visibility: hidden;
|
|
435
|
-
}
|
|
436
|
-
}
|
|
437
|
-
|
|
438
410
|
@media (min-width:740px) {
|
|
439
411
|
.c2 {
|
|
440
412
|
-webkit-flex-direction: row;
|
|
@@ -189,12 +189,6 @@ exports[`renders correctly with no body 1`] = `
|
|
|
189
189
|
height: auto;
|
|
190
190
|
}
|
|
191
191
|
|
|
192
|
-
@supports not ((object-fit:cover) or (object-fit:contain)) {
|
|
193
|
-
.c3 {
|
|
194
|
-
visibility: hidden;
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
|
|
198
192
|
@media (min-width:0px) {
|
|
199
193
|
.c0 {
|
|
200
194
|
-webkit-flex-direction: column;
|
|
@@ -119,20 +119,6 @@ exports[`renders Column view correctly 1`] = `
|
|
|
119
119
|
z-index: 2;
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
-
@supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {
|
|
123
|
-
.c3 {
|
|
124
|
-
background-image: url(//images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg);
|
|
125
|
-
background-size: cover;
|
|
126
|
-
background-position: center;
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
@supports not ((object-fit:cover) or (object-fit:contain)) {
|
|
131
|
-
.c4 {
|
|
132
|
-
visibility: hidden;
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
|
|
136
122
|
@media (min-width:740px) {
|
|
137
123
|
.c8 {
|
|
138
124
|
width: auto;
|
|
@@ -391,20 +377,6 @@ exports[`renders correctly 1`] = `
|
|
|
391
377
|
z-index: 2;
|
|
392
378
|
}
|
|
393
379
|
|
|
394
|
-
@supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {
|
|
395
|
-
.c3 {
|
|
396
|
-
background-image: url(//images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg);
|
|
397
|
-
background-size: cover;
|
|
398
|
-
background-position: center;
|
|
399
|
-
}
|
|
400
|
-
}
|
|
401
|
-
|
|
402
|
-
@supports not ((object-fit:cover) or (object-fit:contain)) {
|
|
403
|
-
.c4 {
|
|
404
|
-
visibility: hidden;
|
|
405
|
-
}
|
|
406
|
-
}
|
|
407
|
-
|
|
408
380
|
@media (min-width:740px) {
|
|
409
381
|
.c8 {
|
|
410
382
|
width: auto;
|
|
@@ -115,14 +115,6 @@ it('renders correctly', () => {
|
|
|
115
115
|
background-color: #E52630;
|
|
116
116
|
}
|
|
117
117
|
|
|
118
|
-
@supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {
|
|
119
|
-
.c2 {
|
|
120
|
-
background-image: url(//images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg);
|
|
121
|
-
background-size: cover;
|
|
122
|
-
background-position: center;
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
|
|
126
118
|
@media (min-width:740px) {
|
|
127
119
|
.c6 {
|
|
128
120
|
font-size: 1rem;
|
|
@@ -153,20 +153,6 @@ exports[`renders Promo correctly 1`] = `
|
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
155
|
|
|
156
|
-
@supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {
|
|
157
|
-
.c2 {
|
|
158
|
-
background-image: url(../promo.jpg);
|
|
159
|
-
background-size: cover;
|
|
160
|
-
background-position: center;
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
@supports not ((object-fit:cover) or (object-fit:contain)) {
|
|
165
|
-
.c3 {
|
|
166
|
-
visibility: hidden;
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
|
|
170
156
|
@media (min-width:740px) {
|
|
171
157
|
.c9 {
|
|
172
158
|
width: auto;
|
|
@@ -445,20 +431,6 @@ exports[`renders Promo correctly end position 1`] = `
|
|
|
445
431
|
}
|
|
446
432
|
}
|
|
447
433
|
|
|
448
|
-
@supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {
|
|
449
|
-
.c2 {
|
|
450
|
-
background-image: url(../promo.jpg);
|
|
451
|
-
background-size: cover;
|
|
452
|
-
background-position: center;
|
|
453
|
-
}
|
|
454
|
-
}
|
|
455
|
-
|
|
456
|
-
@supports not ((object-fit:cover) or (object-fit:contain)) {
|
|
457
|
-
.c3 {
|
|
458
|
-
visibility: hidden;
|
|
459
|
-
}
|
|
460
|
-
}
|
|
461
|
-
|
|
462
434
|
@media (min-width:740px) {
|
|
463
435
|
.c9 {
|
|
464
436
|
width: auto;
|
|
@@ -97,12 +97,6 @@ exports[`renders correctly in minimalist form 1`] = `
|
|
|
97
97
|
margin: 0;
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
-
@supports not ((object-fit:cover) or (object-fit:contain)) {
|
|
101
|
-
.c5 {
|
|
102
|
-
visibility: hidden;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
|
|
106
100
|
@media (min-width:740px) {
|
|
107
101
|
.c2 {
|
|
108
102
|
-webkit-flex-direction: row;
|
|
@@ -285,12 +279,6 @@ exports[`renders correctly with copy 1`] = `
|
|
|
285
279
|
}
|
|
286
280
|
}
|
|
287
281
|
|
|
288
|
-
@supports not ((object-fit:cover) or (object-fit:contain)) {
|
|
289
|
-
.c5 {
|
|
290
|
-
visibility: hidden;
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
|
|
294
282
|
@media (min-width:740px) {
|
|
295
283
|
.c2 {
|
|
296
284
|
-webkit-flex-direction: row;
|
|
@@ -464,12 +452,6 @@ exports[`renders correctly with date 1`] = `
|
|
|
464
452
|
margin: 0;
|
|
465
453
|
}
|
|
466
454
|
|
|
467
|
-
@supports not ((object-fit:cover) or (object-fit:contain)) {
|
|
468
|
-
.c5 {
|
|
469
|
-
visibility: hidden;
|
|
470
|
-
}
|
|
471
|
-
}
|
|
472
|
-
|
|
473
455
|
@media (min-width:740px) {
|
|
474
456
|
.c2 {
|
|
475
457
|
-webkit-flex-direction: row;
|
|
@@ -637,12 +619,6 @@ exports[`renders correctly with date and type 1`] = `
|
|
|
637
619
|
margin: 0;
|
|
638
620
|
}
|
|
639
621
|
|
|
640
|
-
@supports not ((object-fit:cover) or (object-fit:contain)) {
|
|
641
|
-
.c5 {
|
|
642
|
-
visibility: hidden;
|
|
643
|
-
}
|
|
644
|
-
}
|
|
645
|
-
|
|
646
622
|
@media (min-width:740px) {
|
|
647
623
|
.c2 {
|
|
648
624
|
-webkit-flex-direction: row;
|
|
@@ -65,20 +65,6 @@ exports[`renders Single Message with 100% vertical height image correctly 1`] =
|
|
|
65
65
|
z-index: 1;
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
-
@supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {
|
|
69
|
-
.c3 {
|
|
70
|
-
background-image: url(http://images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg);
|
|
71
|
-
background-size: cover;
|
|
72
|
-
background-position: center;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
@supports not ((object-fit:cover) or (object-fit:contain)) {
|
|
77
|
-
.c4 {
|
|
78
|
-
visibility: hidden;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
|
|
82
68
|
@media (min-width:740px) {
|
|
83
69
|
.c0 {
|
|
84
70
|
-webkit-flex-direction: row;
|
|
@@ -292,20 +278,6 @@ exports[`renders Single Message with Image correctly 1`] = `
|
|
|
292
278
|
z-index: 1;
|
|
293
279
|
}
|
|
294
280
|
|
|
295
|
-
@supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {
|
|
296
|
-
.c3 {
|
|
297
|
-
background-image: url(http://images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg);
|
|
298
|
-
background-size: cover;
|
|
299
|
-
background-position: center;
|
|
300
|
-
}
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
@supports not ((object-fit:cover) or (object-fit:contain)) {
|
|
304
|
-
.c4 {
|
|
305
|
-
visibility: hidden;
|
|
306
|
-
}
|
|
307
|
-
}
|
|
308
|
-
|
|
309
281
|
@media (min-width:740px) {
|
|
310
282
|
.c8 {
|
|
311
283
|
width: auto;
|
|
@@ -510,20 +482,6 @@ exports[`renders Single Message with double image correctly 1`] = `
|
|
|
510
482
|
z-index: 1;
|
|
511
483
|
}
|
|
512
484
|
|
|
513
|
-
@supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {
|
|
514
|
-
.c3 {
|
|
515
|
-
background-image: url(http://images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg);
|
|
516
|
-
background-size: cover;
|
|
517
|
-
background-position: center;
|
|
518
|
-
}
|
|
519
|
-
}
|
|
520
|
-
|
|
521
|
-
@supports not ((object-fit:cover) or (object-fit:contain)) {
|
|
522
|
-
.c4 {
|
|
523
|
-
visibility: hidden;
|
|
524
|
-
}
|
|
525
|
-
}
|
|
526
|
-
|
|
527
485
|
@media (min-width:740px) {
|
|
528
486
|
.c0 {
|
|
529
487
|
-webkit-flex-direction: row;
|
|
@@ -778,20 +736,6 @@ exports[`renders Single Message with full width correctly 1`] = `
|
|
|
778
736
|
z-index: 1;
|
|
779
737
|
}
|
|
780
738
|
|
|
781
|
-
@supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {
|
|
782
|
-
.c3 {
|
|
783
|
-
background-image: url(http://images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg);
|
|
784
|
-
background-size: cover;
|
|
785
|
-
background-position: center;
|
|
786
|
-
}
|
|
787
|
-
}
|
|
788
|
-
|
|
789
|
-
@supports not ((object-fit:cover) or (object-fit:contain)) {
|
|
790
|
-
.c4 {
|
|
791
|
-
visibility: hidden;
|
|
792
|
-
}
|
|
793
|
-
}
|
|
794
|
-
|
|
795
739
|
@media (min-width:740px) {
|
|
796
740
|
.c8 {
|
|
797
741
|
width: auto;
|
|
@@ -996,20 +940,6 @@ exports[`renders Single Message with full width image and no text correctly 1`]
|
|
|
996
940
|
z-index: 1;
|
|
997
941
|
}
|
|
998
942
|
|
|
999
|
-
@supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {
|
|
1000
|
-
.c3 {
|
|
1001
|
-
background-image: url(http://images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg);
|
|
1002
|
-
background-size: cover;
|
|
1003
|
-
background-position: center;
|
|
1004
|
-
}
|
|
1005
|
-
}
|
|
1006
|
-
|
|
1007
|
-
@supports not ((object-fit:cover) or (object-fit:contain)) {
|
|
1008
|
-
.c4 {
|
|
1009
|
-
visibility: hidden;
|
|
1010
|
-
}
|
|
1011
|
-
}
|
|
1012
|
-
|
|
1013
943
|
@media (min-width:740px) {
|
|
1014
944
|
|
|
1015
945
|
}
|
|
@@ -1136,14 +1066,6 @@ exports[`renders Single Message with no Image correctly 1`] = `
|
|
|
1136
1066
|
padding: 1rem;
|
|
1137
1067
|
}
|
|
1138
1068
|
|
|
1139
|
-
@supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {
|
|
1140
|
-
|
|
1141
|
-
}
|
|
1142
|
-
|
|
1143
|
-
@supports not ((object-fit:cover) or (object-fit:contain)) {
|
|
1144
|
-
|
|
1145
|
-
}
|
|
1146
|
-
|
|
1147
1069
|
@media (min-width:740px) {
|
|
1148
1070
|
|
|
1149
1071
|
}
|
package/dist/components/Molecules/SingleMessageDS/__snapshots__/SingleMessageDs.test.js.snap
CHANGED
|
@@ -153,20 +153,6 @@ exports[`renders correctly 1`] = `
|
|
|
153
153
|
right: 1.5rem;
|
|
154
154
|
}
|
|
155
155
|
|
|
156
|
-
@supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {
|
|
157
|
-
.c3 {
|
|
158
|
-
background-image: url(//images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg);
|
|
159
|
-
background-size: cover;
|
|
160
|
-
background-position: center;
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
@supports not ((object-fit:cover) or (object-fit:contain)) {
|
|
165
|
-
.c4 {
|
|
166
|
-
visibility: hidden;
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
|
|
170
156
|
@media (min-width:740px) {
|
|
171
157
|
.c12 {
|
|
172
158
|
width: auto;
|
|
@@ -4,24 +4,31 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
+
/**
|
|
8
|
+
* Adding Colours / Nomenclature
|
|
9
|
+
- campaign colours at the top, followed by greyscale, then general colours
|
|
10
|
+
- campaign colours get overwritten each year.
|
|
11
|
+
- i.e. new rnd26 colours replace last year's old rnd25 colours.
|
|
12
|
+
- general naming convention => "hue_variation"
|
|
13
|
+
- there is a need to filter the "creativity" of funky colours coming from agencies,
|
|
14
|
+
to make them long term usable...
|
|
15
|
+
*/
|
|
16
|
+
|
|
7
17
|
const colors = {
|
|
18
|
+
/* CAMPAIGN COLOURS */
|
|
19
|
+
rnd_25_ruby_red: '#AE001B',
|
|
20
|
+
rnd_25_glitzy_grape: '#A20C51',
|
|
21
|
+
rnd_25_glitzy_blue: '#0F1953',
|
|
22
|
+
rnd_25_glitzy_purple: '#3A1F62',
|
|
23
|
+
rnd_25_glitzy_black: '#2B3737',
|
|
24
|
+
rnd_25_party_pink: '#FF9DEC',
|
|
25
|
+
rnd_25_party_blue: '#004EFF',
|
|
26
|
+
rnd_25_party_lilac: '#B07FEA',
|
|
27
|
+
/* GREYSCALE COLOURS */
|
|
8
28
|
black: '#000000',
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
blue_donate_interact: '#001A85',
|
|
13
|
-
blue_light: '#BECCF9',
|
|
14
|
-
blue_royal: '#6489FC',
|
|
15
|
-
coral: '#F9686D',
|
|
16
|
-
coral_dark: '#961D35',
|
|
17
|
-
coral_light: '#FFCECE',
|
|
18
|
-
deep_violet_dark: '#2C0230',
|
|
19
|
-
deep_violet: '#2C0230' /** Will be removed */,
|
|
20
|
-
deep_violet_light: '#3e1c43',
|
|
21
|
-
error_pink: '#FAE1E2',
|
|
22
|
-
green: '#49D267',
|
|
23
|
-
green_dark: '#1B651D',
|
|
24
|
-
green_light: '#F4F2F4',
|
|
29
|
+
white: '#FFFFFF',
|
|
30
|
+
transparent: 'transparent',
|
|
31
|
+
// grey chaos needs sorting...
|
|
25
32
|
grey_stone: '#CEDCDA',
|
|
26
33
|
grey_extra_light: '#f0f0f0',
|
|
27
34
|
grey_for_forms: '#666',
|
|
@@ -37,6 +44,23 @@ const colors = {
|
|
|
37
44
|
grey_4: '#6E6E6E',
|
|
38
45
|
// grey_5
|
|
39
46
|
grey_dark: '#222222',
|
|
47
|
+
/* GENERAL COLOURS */
|
|
48
|
+
blue: '#0565D1',
|
|
49
|
+
blue_dark: '#274084',
|
|
50
|
+
// blue_donate is a bad naming?
|
|
51
|
+
blue_donate: '#2042AD',
|
|
52
|
+
blue_donate_interact: '#001A85',
|
|
53
|
+
blue_light: '#BECCF9',
|
|
54
|
+
blue_royal: '#6489FC',
|
|
55
|
+
coral: '#F9686D',
|
|
56
|
+
coral_dark: '#961D35',
|
|
57
|
+
coral_light: '#FFCECE',
|
|
58
|
+
deep_violet: '#2C0230' /** Will be removed */,
|
|
59
|
+
deep_violet_dark: '#2C0230',
|
|
60
|
+
deep_violet_light: '#3e1c43',
|
|
61
|
+
green: '#49D267',
|
|
62
|
+
green_dark: '#1B651D',
|
|
63
|
+
green_light: '#F4F2F4',
|
|
40
64
|
magenta: '#FC59CE',
|
|
41
65
|
magenta_dark: '#821C5D',
|
|
42
66
|
magenta_light: '#FEB4DC',
|
|
@@ -44,36 +68,21 @@ const colors = {
|
|
|
44
68
|
orange_dark: '#984316',
|
|
45
69
|
orange_light: '#FEE3CC',
|
|
46
70
|
purple: '#6F3AAB',
|
|
47
|
-
lavender: '#C180F9',
|
|
48
71
|
purple_dark: '#48276E',
|
|
49
72
|
purple_light: '#DFC6F6',
|
|
73
|
+
lavender: '#C180F9',
|
|
74
|
+
// change naming
|
|
75
|
+
error_pink: '#FAE1E2',
|
|
50
76
|
red: '#E52630',
|
|
51
|
-
red_secondary: '#F9723A',
|
|
52
77
|
red_dark: '#890B11',
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
rnd_23_pink: '#EDB4D3',
|
|
56
|
-
rnd_23_black: '#2B3737',
|
|
57
|
-
rnd_24_red_dark: '#A11B22',
|
|
58
|
-
rnd_24_teal_dark: '#2B7C77',
|
|
59
|
-
rnd_24_pink_dark: '#A67E94',
|
|
60
|
-
rnd_24_blue: '#3367AF',
|
|
61
|
-
rnd_25_ruby_red: '#AE001B',
|
|
62
|
-
rnd_25_glitzy_grape: '#A20C51',
|
|
63
|
-
rnd_25_glitzy_blue: '#0F1953',
|
|
64
|
-
rnd_25_glitzy_purple: '#3A1F62',
|
|
65
|
-
rnd_25_glitzy_black: '#2B3737',
|
|
66
|
-
rnd_25_party_pink: '#FF9DEC',
|
|
67
|
-
rnd_25_party_blue: '#004EFF',
|
|
68
|
-
rnd_25_party_lilac: '#B07FEA',
|
|
78
|
+
// change naming
|
|
79
|
+
red_secondary: '#F9723A',
|
|
69
80
|
teal: '#4ECDBE',
|
|
70
81
|
teal_dark: '#13767C',
|
|
71
82
|
teal_light: '#86E4E9',
|
|
72
|
-
white: '#FFFFFF',
|
|
73
83
|
yellow: '#FFE400',
|
|
74
84
|
yellow_dark: '#665700',
|
|
75
|
-
yellow_light: '#FEFD5A'
|
|
76
|
-
transparent: 'transparent'
|
|
85
|
+
yellow_light: '#FEFD5A'
|
|
77
86
|
};
|
|
78
87
|
var _default = colorName => {
|
|
79
88
|
if (colorName) {
|
package/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { useEffect, useState } from 'react';
|
|
2
2
|
import styled, { css, withTheme } from 'styled-components';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import spacing from '../../../theme/shared/spacing';
|
|
@@ -10,39 +10,22 @@ import 'lazysizes/plugins/blur-up/ls.blur-up';
|
|
|
10
10
|
const IMAGE_FALLBACK = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7';
|
|
11
11
|
|
|
12
12
|
const Wrapper = styled.div`
|
|
13
|
-
|
|
14
|
-
${({ nonObjFitImage }) => (nonObjFitImage)
|
|
15
|
-
&& `@supports not ((object-fit: cover) or (object-fit: none) or (object-fit: contain)) {
|
|
16
|
-
background-image: url(${nonObjFitImage});
|
|
17
|
-
background-size: cover;
|
|
18
|
-
background-position: center;
|
|
19
|
-
}
|
|
20
|
-
`};
|
|
21
|
-
|
|
13
|
+
${({ objFitState, nonObjFitImage }) => (!objFitState && nonObjFitImage) && `background-image: url(${nonObjFitImage}); background-size: cover; background-position: center;`};
|
|
22
14
|
display: block;
|
|
23
15
|
width: ${props => (props.width ? props.width : '100%')};
|
|
24
16
|
height: ${props => (props.height ? props.height : '100%')};
|
|
25
17
|
position: relative;
|
|
26
|
-
|
|
27
|
-
${({ isBackgroundImage }) => isBackgroundImage
|
|
28
|
-
&& 'position: absolute; bottom: 0px; left: 0px; right: 0px; height: 100%;'};
|
|
18
|
+
${({ isBackgroundImage }) => isBackgroundImage && 'position: absolute; bottom: 0px; left: 0px; right: 0px; height: 100%;'};
|
|
29
19
|
`;
|
|
30
20
|
|
|
31
21
|
const Image = styled.img`
|
|
32
22
|
width: ${props => (props.width ? props.width : '100%')};
|
|
33
23
|
height: ${props => (props.height ? props.height : 'auto')};
|
|
34
24
|
display: block;
|
|
35
|
-
|
|
36
25
|
object-fit: ${props => (props.objectFit === 'none' && 'none')
|
|
37
26
|
|| (props.objectFit === 'cover' && 'cover')
|
|
38
27
|
|| (props.objectFit === 'contain' && 'contain')};
|
|
39
|
-
|
|
40
|
-
// If this browser doesn't support objectFit:
|
|
41
|
-
${({ objectFit }) => (objectFit !== 'none')
|
|
42
|
-
&& `@supports not ((object-fit: cover) or (object-fit: contain)) {
|
|
43
|
-
visibility: hidden;
|
|
44
|
-
`}
|
|
45
|
-
// Allows image to provide the container height, but make it invisible
|
|
28
|
+
${({ objectFit, objFitState }) => (objectFit !== 'none' && !objFitState) && 'visibility: hidden;'}; // Allows image to provide the container height, but make it invisible
|
|
46
29
|
|
|
47
30
|
/* Check for Cards/smallBreakpointRowLayout prop coming from the CMS and adjust styling for row view */
|
|
48
31
|
${({ smallBreakpointRowLayout }) => (smallBreakpointRowLayout === true) && css`
|
|
@@ -77,6 +60,7 @@ const Image = styled.img`
|
|
|
77
60
|
height: ${props => (props.height ? props.height : 'auto')};
|
|
78
61
|
}
|
|
79
62
|
`}
|
|
63
|
+
|
|
80
64
|
`;
|
|
81
65
|
|
|
82
66
|
/** Responsive Picture */
|
|
@@ -93,8 +77,17 @@ const Picture = ({
|
|
|
93
77
|
mediumBreakpointRowLayout = null,
|
|
94
78
|
...rest
|
|
95
79
|
}) => {
|
|
80
|
+
const document = typeof window !== 'undefined' ? window.document : null;
|
|
81
|
+
const [objFitState, setObjFitState] = useState(true);
|
|
96
82
|
let nonObjFitImage = null;
|
|
97
83
|
|
|
84
|
+
useEffect(() => {
|
|
85
|
+
// Once document is available, determine if this browser supports object-fit
|
|
86
|
+
if ('objectFit' in document.documentElement.style === false) {
|
|
87
|
+
setObjFitState(false);
|
|
88
|
+
}
|
|
89
|
+
}, [document]);
|
|
90
|
+
|
|
98
91
|
// Determine which image will be used for the nonObjectFit fallback
|
|
99
92
|
if (image) {
|
|
100
93
|
nonObjFitImage = image;
|
|
@@ -111,6 +104,7 @@ const Picture = ({
|
|
|
111
104
|
images={images}
|
|
112
105
|
isBackgroundImage={isBackgroundImage}
|
|
113
106
|
nonObjFitImage={nonObjFitImage}
|
|
107
|
+
objFitState={objFitState}
|
|
114
108
|
{...rest}
|
|
115
109
|
>
|
|
116
110
|
<Image
|
|
@@ -120,6 +114,7 @@ const Picture = ({
|
|
|
120
114
|
objectFit={objectFit}
|
|
121
115
|
data-src={image}
|
|
122
116
|
className="lazyload"
|
|
117
|
+
objFitState={objFitState}
|
|
123
118
|
/>
|
|
124
119
|
</Wrapper>
|
|
125
120
|
);
|
|
@@ -131,9 +126,11 @@ const Picture = ({
|
|
|
131
126
|
width={width}
|
|
132
127
|
image={image}
|
|
133
128
|
images={images}
|
|
129
|
+
setObjFitState={setObjFitState}
|
|
134
130
|
className="lazyload"
|
|
135
131
|
isBackgroundImage={isBackgroundImage}
|
|
136
132
|
nonObjFitImage={nonObjFitImage}
|
|
133
|
+
objFitState={objFitState}
|
|
137
134
|
{...rest}
|
|
138
135
|
>
|
|
139
136
|
<Image
|
|
@@ -148,6 +145,7 @@ const Picture = ({
|
|
|
148
145
|
data-sizes="auto"
|
|
149
146
|
data-lowsrc={imageLow}
|
|
150
147
|
className="lazyload"
|
|
148
|
+
objFitState={objFitState}
|
|
151
149
|
smallBreakpointRowLayout={smallBreakpointRowLayout}
|
|
152
150
|
mediumBreakpointRowLayout={mediumBreakpointRowLayout}
|
|
153
151
|
/>
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import
|
|
3
|
-
import renderWithTheme from
|
|
4
|
-
import Picture from
|
|
5
|
-
import { defaultData } from
|
|
6
|
-
it(
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "jest-styled-components";
|
|
3
|
+
import renderWithTheme from "../../../../tests/hoc/shallowWithTheme";
|
|
4
|
+
import Picture from "./Picture";
|
|
5
|
+
import { defaultData } from "../../../styleguide/data/data";
|
|
6
|
+
it("renders correctly", () => {
|
|
7
7
|
const tree = renderWithTheme(
|
|
8
8
|
<Picture
|
|
9
9
|
images={defaultData.images}
|
|
@@ -27,14 +27,6 @@ it('renders correctly', () => {
|
|
|
27
27
|
object-fit: none;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
@supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {
|
|
31
|
-
.c0 {
|
|
32
|
-
background-image: url(http://images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg);
|
|
33
|
-
background-size: cover;
|
|
34
|
-
background-position: center;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
30
|
<div
|
|
39
31
|
className="c0 lazyload"
|
|
40
32
|
height="auto"
|
|
@@ -56,7 +48,7 @@ it('renders correctly', () => {
|
|
|
56
48
|
`);
|
|
57
49
|
});
|
|
58
50
|
|
|
59
|
-
it(
|
|
51
|
+
it("renders correctly with custom props", () => {
|
|
60
52
|
const tree = renderWithTheme(
|
|
61
53
|
<Picture
|
|
62
54
|
images={defaultData.images}
|
|
@@ -83,20 +75,6 @@ it('renders correctly with custom props', () => {
|
|
|
83
75
|
object-fit: cover;
|
|
84
76
|
}
|
|
85
77
|
|
|
86
|
-
@supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {
|
|
87
|
-
.c0 {
|
|
88
|
-
background-image: url(http://images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg);
|
|
89
|
-
background-size: cover;
|
|
90
|
-
background-position: center;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
@supports not ((object-fit:cover) or (object-fit:contain)) {
|
|
95
|
-
.c1 {
|
|
96
|
-
visibility: hidden;
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
|
|
100
78
|
<div
|
|
101
79
|
className="c0 lazyload"
|
|
102
80
|
height="100px"
|
|
@@ -154,20 +154,6 @@ it('renders article teaser correctly', () => {
|
|
|
154
154
|
display: flex;
|
|
155
155
|
}
|
|
156
156
|
|
|
157
|
-
@supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {
|
|
158
|
-
.c4 {
|
|
159
|
-
background-image: url(http://images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg);
|
|
160
|
-
background-size: cover;
|
|
161
|
-
background-position: center;
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
@supports not ((object-fit:cover) or (object-fit:contain)) {
|
|
166
|
-
.c6 {
|
|
167
|
-
visibility: hidden;
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
|
|
171
157
|
@media (min-width:740px) {
|
|
172
158
|
.c2 {
|
|
173
159
|
-webkit-flex-direction: row;
|
|
@@ -425,20 +411,6 @@ it('renders press realese correctly', () => {
|
|
|
425
411
|
display: flex;
|
|
426
412
|
}
|
|
427
413
|
|
|
428
|
-
@supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {
|
|
429
|
-
.c4 {
|
|
430
|
-
background-image: url(mock.asset);
|
|
431
|
-
background-size: cover;
|
|
432
|
-
background-position: center;
|
|
433
|
-
}
|
|
434
|
-
}
|
|
435
|
-
|
|
436
|
-
@supports not ((object-fit:cover) or (object-fit:contain)) {
|
|
437
|
-
.c6 {
|
|
438
|
-
visibility: hidden;
|
|
439
|
-
}
|
|
440
|
-
}
|
|
441
|
-
|
|
442
414
|
@media (min-width:740px) {
|
|
443
415
|
.c2 {
|
|
444
416
|
-webkit-flex-direction: row;
|
|
@@ -189,12 +189,6 @@ exports[`renders correctly with no body 1`] = `
|
|
|
189
189
|
height: auto;
|
|
190
190
|
}
|
|
191
191
|
|
|
192
|
-
@supports not ((object-fit:cover) or (object-fit:contain)) {
|
|
193
|
-
.c3 {
|
|
194
|
-
visibility: hidden;
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
|
|
198
192
|
@media (min-width:0px) {
|
|
199
193
|
.c0 {
|
|
200
194
|
-webkit-flex-direction: column;
|
|
@@ -119,20 +119,6 @@ exports[`renders Column view correctly 1`] = `
|
|
|
119
119
|
z-index: 2;
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
-
@supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {
|
|
123
|
-
.c3 {
|
|
124
|
-
background-image: url(//images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg);
|
|
125
|
-
background-size: cover;
|
|
126
|
-
background-position: center;
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
@supports not ((object-fit:cover) or (object-fit:contain)) {
|
|
131
|
-
.c4 {
|
|
132
|
-
visibility: hidden;
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
|
|
136
122
|
@media (min-width:740px) {
|
|
137
123
|
.c8 {
|
|
138
124
|
width: auto;
|
|
@@ -391,20 +377,6 @@ exports[`renders correctly 1`] = `
|
|
|
391
377
|
z-index: 2;
|
|
392
378
|
}
|
|
393
379
|
|
|
394
|
-
@supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {
|
|
395
|
-
.c3 {
|
|
396
|
-
background-image: url(//images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg);
|
|
397
|
-
background-size: cover;
|
|
398
|
-
background-position: center;
|
|
399
|
-
}
|
|
400
|
-
}
|
|
401
|
-
|
|
402
|
-
@supports not ((object-fit:cover) or (object-fit:contain)) {
|
|
403
|
-
.c4 {
|
|
404
|
-
visibility: hidden;
|
|
405
|
-
}
|
|
406
|
-
}
|
|
407
|
-
|
|
408
380
|
@media (min-width:740px) {
|
|
409
381
|
.c8 {
|
|
410
382
|
width: auto;
|
|
@@ -116,14 +116,6 @@ it('renders correctly', () => {
|
|
|
116
116
|
background-color: #E52630;
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
-
@supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {
|
|
120
|
-
.c2 {
|
|
121
|
-
background-image: url(//images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg);
|
|
122
|
-
background-size: cover;
|
|
123
|
-
background-position: center;
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
|
|
127
119
|
@media (min-width:740px) {
|
|
128
120
|
.c6 {
|
|
129
121
|
font-size: 1rem;
|
|
@@ -153,20 +153,6 @@ exports[`renders Promo correctly 1`] = `
|
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
155
|
|
|
156
|
-
@supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {
|
|
157
|
-
.c2 {
|
|
158
|
-
background-image: url(../promo.jpg);
|
|
159
|
-
background-size: cover;
|
|
160
|
-
background-position: center;
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
@supports not ((object-fit:cover) or (object-fit:contain)) {
|
|
165
|
-
.c3 {
|
|
166
|
-
visibility: hidden;
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
|
|
170
156
|
@media (min-width:740px) {
|
|
171
157
|
.c9 {
|
|
172
158
|
width: auto;
|
|
@@ -445,20 +431,6 @@ exports[`renders Promo correctly end position 1`] = `
|
|
|
445
431
|
}
|
|
446
432
|
}
|
|
447
433
|
|
|
448
|
-
@supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {
|
|
449
|
-
.c2 {
|
|
450
|
-
background-image: url(../promo.jpg);
|
|
451
|
-
background-size: cover;
|
|
452
|
-
background-position: center;
|
|
453
|
-
}
|
|
454
|
-
}
|
|
455
|
-
|
|
456
|
-
@supports not ((object-fit:cover) or (object-fit:contain)) {
|
|
457
|
-
.c3 {
|
|
458
|
-
visibility: hidden;
|
|
459
|
-
}
|
|
460
|
-
}
|
|
461
|
-
|
|
462
434
|
@media (min-width:740px) {
|
|
463
435
|
.c9 {
|
|
464
436
|
width: auto;
|
|
@@ -97,12 +97,6 @@ exports[`renders correctly in minimalist form 1`] = `
|
|
|
97
97
|
margin: 0;
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
-
@supports not ((object-fit:cover) or (object-fit:contain)) {
|
|
101
|
-
.c5 {
|
|
102
|
-
visibility: hidden;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
|
|
106
100
|
@media (min-width:740px) {
|
|
107
101
|
.c2 {
|
|
108
102
|
-webkit-flex-direction: row;
|
|
@@ -285,12 +279,6 @@ exports[`renders correctly with copy 1`] = `
|
|
|
285
279
|
}
|
|
286
280
|
}
|
|
287
281
|
|
|
288
|
-
@supports not ((object-fit:cover) or (object-fit:contain)) {
|
|
289
|
-
.c5 {
|
|
290
|
-
visibility: hidden;
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
|
|
294
282
|
@media (min-width:740px) {
|
|
295
283
|
.c2 {
|
|
296
284
|
-webkit-flex-direction: row;
|
|
@@ -464,12 +452,6 @@ exports[`renders correctly with date 1`] = `
|
|
|
464
452
|
margin: 0;
|
|
465
453
|
}
|
|
466
454
|
|
|
467
|
-
@supports not ((object-fit:cover) or (object-fit:contain)) {
|
|
468
|
-
.c5 {
|
|
469
|
-
visibility: hidden;
|
|
470
|
-
}
|
|
471
|
-
}
|
|
472
|
-
|
|
473
455
|
@media (min-width:740px) {
|
|
474
456
|
.c2 {
|
|
475
457
|
-webkit-flex-direction: row;
|
|
@@ -637,12 +619,6 @@ exports[`renders correctly with date and type 1`] = `
|
|
|
637
619
|
margin: 0;
|
|
638
620
|
}
|
|
639
621
|
|
|
640
|
-
@supports not ((object-fit:cover) or (object-fit:contain)) {
|
|
641
|
-
.c5 {
|
|
642
|
-
visibility: hidden;
|
|
643
|
-
}
|
|
644
|
-
}
|
|
645
|
-
|
|
646
622
|
@media (min-width:740px) {
|
|
647
623
|
.c2 {
|
|
648
624
|
-webkit-flex-direction: row;
|
|
@@ -65,20 +65,6 @@ exports[`renders Single Message with 100% vertical height image correctly 1`] =
|
|
|
65
65
|
z-index: 1;
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
-
@supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {
|
|
69
|
-
.c3 {
|
|
70
|
-
background-image: url(http://images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg);
|
|
71
|
-
background-size: cover;
|
|
72
|
-
background-position: center;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
@supports not ((object-fit:cover) or (object-fit:contain)) {
|
|
77
|
-
.c4 {
|
|
78
|
-
visibility: hidden;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
|
|
82
68
|
@media (min-width:740px) {
|
|
83
69
|
.c0 {
|
|
84
70
|
-webkit-flex-direction: row;
|
|
@@ -292,20 +278,6 @@ exports[`renders Single Message with Image correctly 1`] = `
|
|
|
292
278
|
z-index: 1;
|
|
293
279
|
}
|
|
294
280
|
|
|
295
|
-
@supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {
|
|
296
|
-
.c3 {
|
|
297
|
-
background-image: url(http://images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg);
|
|
298
|
-
background-size: cover;
|
|
299
|
-
background-position: center;
|
|
300
|
-
}
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
@supports not ((object-fit:cover) or (object-fit:contain)) {
|
|
304
|
-
.c4 {
|
|
305
|
-
visibility: hidden;
|
|
306
|
-
}
|
|
307
|
-
}
|
|
308
|
-
|
|
309
281
|
@media (min-width:740px) {
|
|
310
282
|
.c8 {
|
|
311
283
|
width: auto;
|
|
@@ -510,20 +482,6 @@ exports[`renders Single Message with double image correctly 1`] = `
|
|
|
510
482
|
z-index: 1;
|
|
511
483
|
}
|
|
512
484
|
|
|
513
|
-
@supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {
|
|
514
|
-
.c3 {
|
|
515
|
-
background-image: url(http://images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg);
|
|
516
|
-
background-size: cover;
|
|
517
|
-
background-position: center;
|
|
518
|
-
}
|
|
519
|
-
}
|
|
520
|
-
|
|
521
|
-
@supports not ((object-fit:cover) or (object-fit:contain)) {
|
|
522
|
-
.c4 {
|
|
523
|
-
visibility: hidden;
|
|
524
|
-
}
|
|
525
|
-
}
|
|
526
|
-
|
|
527
485
|
@media (min-width:740px) {
|
|
528
486
|
.c0 {
|
|
529
487
|
-webkit-flex-direction: row;
|
|
@@ -778,20 +736,6 @@ exports[`renders Single Message with full width correctly 1`] = `
|
|
|
778
736
|
z-index: 1;
|
|
779
737
|
}
|
|
780
738
|
|
|
781
|
-
@supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {
|
|
782
|
-
.c3 {
|
|
783
|
-
background-image: url(http://images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg);
|
|
784
|
-
background-size: cover;
|
|
785
|
-
background-position: center;
|
|
786
|
-
}
|
|
787
|
-
}
|
|
788
|
-
|
|
789
|
-
@supports not ((object-fit:cover) or (object-fit:contain)) {
|
|
790
|
-
.c4 {
|
|
791
|
-
visibility: hidden;
|
|
792
|
-
}
|
|
793
|
-
}
|
|
794
|
-
|
|
795
739
|
@media (min-width:740px) {
|
|
796
740
|
.c8 {
|
|
797
741
|
width: auto;
|
|
@@ -996,20 +940,6 @@ exports[`renders Single Message with full width image and no text correctly 1`]
|
|
|
996
940
|
z-index: 1;
|
|
997
941
|
}
|
|
998
942
|
|
|
999
|
-
@supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {
|
|
1000
|
-
.c3 {
|
|
1001
|
-
background-image: url(http://images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg);
|
|
1002
|
-
background-size: cover;
|
|
1003
|
-
background-position: center;
|
|
1004
|
-
}
|
|
1005
|
-
}
|
|
1006
|
-
|
|
1007
|
-
@supports not ((object-fit:cover) or (object-fit:contain)) {
|
|
1008
|
-
.c4 {
|
|
1009
|
-
visibility: hidden;
|
|
1010
|
-
}
|
|
1011
|
-
}
|
|
1012
|
-
|
|
1013
943
|
@media (min-width:740px) {
|
|
1014
944
|
|
|
1015
945
|
}
|
|
@@ -1136,14 +1066,6 @@ exports[`renders Single Message with no Image correctly 1`] = `
|
|
|
1136
1066
|
padding: 1rem;
|
|
1137
1067
|
}
|
|
1138
1068
|
|
|
1139
|
-
@supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {
|
|
1140
|
-
|
|
1141
|
-
}
|
|
1142
|
-
|
|
1143
|
-
@supports not ((object-fit:cover) or (object-fit:contain)) {
|
|
1144
|
-
|
|
1145
|
-
}
|
|
1146
|
-
|
|
1147
1069
|
@media (min-width:740px) {
|
|
1148
1070
|
|
|
1149
1071
|
}
|
|
@@ -153,20 +153,6 @@ exports[`renders correctly 1`] = `
|
|
|
153
153
|
right: 1.5rem;
|
|
154
154
|
}
|
|
155
155
|
|
|
156
|
-
@supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {
|
|
157
|
-
.c3 {
|
|
158
|
-
background-image: url(//images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg);
|
|
159
|
-
background-size: cover;
|
|
160
|
-
background-position: center;
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
@supports not ((object-fit:cover) or (object-fit:contain)) {
|
|
165
|
-
.c4 {
|
|
166
|
-
visibility: hidden;
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
|
|
170
156
|
@media (min-width:740px) {
|
|
171
157
|
.c12 {
|
|
172
158
|
width: auto;
|
|
@@ -1,21 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Adding Colours / Nomenclature
|
|
3
|
+
- campaign colours at the top, followed by greyscale, then general colours
|
|
4
|
+
- campaign colours get overwritten each year.
|
|
5
|
+
- i.e. new rnd26 colours replace last year's old rnd25 colours.
|
|
6
|
+
- general naming convention => "hue_variation"
|
|
7
|
+
- there is a need to filter the "creativity" of funky colours coming from agencies,
|
|
8
|
+
to make them long term usable...
|
|
9
|
+
*/
|
|
10
|
+
|
|
1
11
|
const colors = {
|
|
12
|
+
|
|
13
|
+
/* CAMPAIGN COLOURS */
|
|
14
|
+
rnd_25_ruby_red: '#AE001B',
|
|
15
|
+
rnd_25_glitzy_grape: '#A20C51',
|
|
16
|
+
rnd_25_glitzy_blue: '#0F1953',
|
|
17
|
+
rnd_25_glitzy_purple: '#3A1F62',
|
|
18
|
+
rnd_25_glitzy_black: '#2B3737',
|
|
19
|
+
rnd_25_party_pink: '#FF9DEC',
|
|
20
|
+
rnd_25_party_blue: '#004EFF',
|
|
21
|
+
rnd_25_party_lilac: '#B07FEA',
|
|
22
|
+
|
|
23
|
+
/* GREYSCALE COLOURS */
|
|
2
24
|
black: '#000000',
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
blue_light: '#BECCF9',
|
|
8
|
-
blue_royal: '#6489FC',
|
|
9
|
-
coral: '#F9686D',
|
|
10
|
-
coral_dark: '#961D35',
|
|
11
|
-
coral_light: '#FFCECE',
|
|
12
|
-
deep_violet_dark: '#2C0230',
|
|
13
|
-
deep_violet: '#2C0230' /** Will be removed */,
|
|
14
|
-
deep_violet_light: '#3e1c43',
|
|
15
|
-
error_pink: '#FAE1E2',
|
|
16
|
-
green: '#49D267',
|
|
17
|
-
green_dark: '#1B651D',
|
|
18
|
-
green_light: '#F4F2F4',
|
|
25
|
+
white: '#FFFFFF',
|
|
26
|
+
transparent: 'transparent',
|
|
27
|
+
|
|
28
|
+
// grey chaos needs sorting...
|
|
19
29
|
grey_stone: '#CEDCDA',
|
|
20
30
|
grey_extra_light: '#f0f0f0',
|
|
21
31
|
grey_for_forms: '#666',
|
|
@@ -31,43 +41,57 @@ const colors = {
|
|
|
31
41
|
grey_4: '#6E6E6E',
|
|
32
42
|
// grey_5
|
|
33
43
|
grey_dark: '#222222',
|
|
44
|
+
|
|
45
|
+
/* GENERAL COLOURS */
|
|
46
|
+
blue: '#0565D1',
|
|
47
|
+
blue_dark: '#274084',
|
|
48
|
+
// blue_donate is a bad naming?
|
|
49
|
+
blue_donate: '#2042AD',
|
|
50
|
+
blue_donate_interact: '#001A85',
|
|
51
|
+
blue_light: '#BECCF9',
|
|
52
|
+
blue_royal: '#6489FC',
|
|
53
|
+
|
|
54
|
+
coral: '#F9686D',
|
|
55
|
+
coral_dark: '#961D35',
|
|
56
|
+
coral_light: '#FFCECE',
|
|
57
|
+
|
|
58
|
+
deep_violet: '#2C0230' /** Will be removed */,
|
|
59
|
+
deep_violet_dark: '#2C0230',
|
|
60
|
+
deep_violet_light: '#3e1c43',
|
|
61
|
+
|
|
62
|
+
green: '#49D267',
|
|
63
|
+
green_dark: '#1B651D',
|
|
64
|
+
green_light: '#F4F2F4',
|
|
65
|
+
|
|
34
66
|
magenta: '#FC59CE',
|
|
35
67
|
magenta_dark: '#821C5D',
|
|
36
68
|
magenta_light: '#FEB4DC',
|
|
69
|
+
|
|
37
70
|
orange: '#FF9635',
|
|
38
71
|
orange_dark: '#984316',
|
|
39
72
|
orange_light: '#FEE3CC',
|
|
73
|
+
|
|
40
74
|
purple: '#6F3AAB',
|
|
41
|
-
lavender: '#C180F9',
|
|
42
75
|
purple_dark: '#48276E',
|
|
43
76
|
purple_light: '#DFC6F6',
|
|
77
|
+
|
|
78
|
+
lavender: '#C180F9',
|
|
79
|
+
|
|
80
|
+
// change naming
|
|
81
|
+
error_pink: '#FAE1E2',
|
|
82
|
+
|
|
44
83
|
red: '#E52630',
|
|
45
|
-
red_secondary: '#F9723A',
|
|
46
84
|
red_dark: '#890B11',
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
rnd_23_black: '#2B3737',
|
|
51
|
-
rnd_24_red_dark: '#A11B22',
|
|
52
|
-
rnd_24_teal_dark: '#2B7C77',
|
|
53
|
-
rnd_24_pink_dark: '#A67E94',
|
|
54
|
-
rnd_24_blue: '#3367AF',
|
|
55
|
-
rnd_25_ruby_red: '#AE001B',
|
|
56
|
-
rnd_25_glitzy_grape: '#A20C51',
|
|
57
|
-
rnd_25_glitzy_blue: '#0F1953',
|
|
58
|
-
rnd_25_glitzy_purple: '#3A1F62',
|
|
59
|
-
rnd_25_glitzy_black: '#2B3737',
|
|
60
|
-
rnd_25_party_pink: '#FF9DEC',
|
|
61
|
-
rnd_25_party_blue: '#004EFF',
|
|
62
|
-
rnd_25_party_lilac: '#B07FEA',
|
|
85
|
+
// change naming
|
|
86
|
+
red_secondary: '#F9723A',
|
|
87
|
+
|
|
63
88
|
teal: '#4ECDBE',
|
|
64
89
|
teal_dark: '#13767C',
|
|
65
90
|
teal_light: '#86E4E9',
|
|
66
|
-
|
|
91
|
+
|
|
67
92
|
yellow: '#FFE400',
|
|
68
93
|
yellow_dark: '#665700',
|
|
69
|
-
yellow_light: '#FEFD5A'
|
|
70
|
-
transparent: 'transparent'
|
|
94
|
+
yellow_light: '#FEFD5A'
|
|
71
95
|
};
|
|
72
96
|
|
|
73
97
|
export default colorName => {
|