@comicrelief/component-library 8.77.6 → 8.78.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.
Files changed (34) hide show
  1. package/dist/index.cjs.js +656 -596
  2. package/dist/index.es.js +10182 -10086
  3. package/package.json +1 -1
  4. package/src/components/Atoms/Button/Button.js +48 -6
  5. package/src/components/Atoms/Button/Button.style.js +46 -3
  6. package/src/components/Atoms/Button/Button.test.js +5 -2
  7. package/src/components/Atoms/Button/ButtonExample.jsx +263 -0
  8. package/src/components/Atoms/Icons/Cross.js +10 -3
  9. package/src/components/Atoms/Link/Link.style.js +2 -1
  10. package/src/components/Atoms/Link/Link.test.js +3 -1
  11. package/src/components/Molecules/ArticleTeaser/ArticleTeaser.test.js +28 -28
  12. package/src/components/Molecules/CTA/CTAMultiCard/__snapshots__/CTAMultiCard.test.js.snap +56 -56
  13. package/src/components/Molecules/CTA/CTASingleCard/__snapshots__/CTASingleCard.test.js.snap +14 -14
  14. package/src/components/Molecules/CardDs/__snapshots__/CardDs.test.js.snap +34 -30
  15. package/src/components/Molecules/EmailSignUp/EmailSignUp.style.js +2 -0
  16. package/src/components/Molecules/HeroBanner/__snapshots__/HeroBanner.test.js.snap +56 -56
  17. package/src/components/Molecules/PartnerLink/PartnerLink.test.js +14 -14
  18. package/src/components/Molecules/Promo/__snapshots__/Promo.test.js.snap +34 -30
  19. package/src/components/Molecules/QuoteSlice/__snapshots__/QuoteSlice.test.js.snap +3 -1
  20. package/src/components/Molecules/SearchResult/__snapshots__/SearchResult.test.js.snap +56 -56
  21. package/src/components/Molecules/SingleMessage/__snapshots__/SingleMessage.test.js.snap +62 -58
  22. package/src/components/Molecules/SingleMessageDS/__snapshots__/SingleMessageDs.test.js.snap +17 -15
  23. package/src/components/Organisms/CookieBanner/CookieBanner.test.js +3 -1
  24. package/src/components/Organisms/DonateBanner/DonateBanner.style.js +4 -1
  25. package/src/components/Organisms/DonateBanner/__snapshots__/DonateBanner.test.js.snap +12 -4
  26. package/src/components/Organisms/DynamicGallery/__snapshots__/DynamicGallery.test.js.snap +12 -4
  27. package/src/components/Organisms/EmailBanner/EmailBanner.style.js +0 -7
  28. package/src/components/Organisms/EmailBanner/__snapshots__/EmailBanner.test.js.snap +20 -36
  29. package/src/components/Organisms/EmailSignUp/__snapshots__/EmailSignUp.test.js.snap +5 -2
  30. package/src/components/Organisms/FooterNew/__snapshots__/FooterNew.test.js.snap +12 -4
  31. package/src/components/Organisms/MarketingPreferencesDS/_DefaultCopy.js +4 -4
  32. package/src/components/Organisms/Membership/Membership.test.js +14 -14
  33. package/src/data/data.js +6 -1
  34. package/src/theme/crTheme/buttonColors.js +21 -4
@@ -1,6 +1,20 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
3
  exports[`handles data structure correctly 1`] = `
4
+ .c11 {
5
+ display: block;
6
+ width: 100%;
7
+ height: 100%;
8
+ position: relative;
9
+ }
10
+
11
+ .c12 {
12
+ width: 100%;
13
+ height: 100%;
14
+ display: block;
15
+ object-fit: cover;
16
+ }
17
+
4
18
  .c15 {
5
19
  font-family: 'Montserrat',Helvetica,Arial,sans-serif;
6
20
  font-weight: 400;
@@ -28,20 +42,6 @@ exports[`handles data structure correctly 1`] = `
28
42
  text-decoration: none;
29
43
  }
30
44
 
31
- .c11 {
32
- display: block;
33
- width: 100%;
34
- height: 100%;
35
- position: relative;
36
- }
37
-
38
- .c12 {
39
- width: 100%;
40
- height: 100%;
41
- display: block;
42
- object-fit: cover;
43
- }
44
-
45
45
  .c20 {
46
46
  height: 4px;
47
47
  width: 100%;
@@ -703,6 +703,20 @@ exports[`handles data structure correctly 1`] = `
703
703
  `;
704
704
 
705
705
  exports[`renders 2 columns layout correctly 1`] = `
706
+ .c11 {
707
+ display: block;
708
+ width: 100%;
709
+ height: 100%;
710
+ position: relative;
711
+ }
712
+
713
+ .c12 {
714
+ width: 100%;
715
+ height: 100%;
716
+ display: block;
717
+ object-fit: cover;
718
+ }
719
+
706
720
  .c15 {
707
721
  font-family: 'Montserrat',Helvetica,Arial,sans-serif;
708
722
  font-weight: 400;
@@ -730,20 +744,6 @@ exports[`renders 2 columns layout correctly 1`] = `
730
744
  text-decoration: none;
731
745
  }
732
746
 
733
- .c11 {
734
- display: block;
735
- width: 100%;
736
- height: 100%;
737
- position: relative;
738
- }
739
-
740
- .c12 {
741
- width: 100%;
742
- height: 100%;
743
- display: block;
744
- object-fit: cover;
745
- }
746
-
747
747
  .c20 {
748
748
  height: 4px;
749
749
  width: 100%;
@@ -1438,6 +1438,20 @@ exports[`renders 2 columns layout correctly 1`] = `
1438
1438
  `;
1439
1439
 
1440
1440
  exports[`renders carousel mode correctly 1`] = `
1441
+ .c11 {
1442
+ display: block;
1443
+ width: 100%;
1444
+ height: 100%;
1445
+ position: relative;
1446
+ }
1447
+
1448
+ .c12 {
1449
+ width: 100%;
1450
+ height: 100%;
1451
+ display: block;
1452
+ object-fit: cover;
1453
+ }
1454
+
1441
1455
  .c15 {
1442
1456
  font-family: 'Montserrat',Helvetica,Arial,sans-serif;
1443
1457
  font-weight: 400;
@@ -1465,20 +1479,6 @@ exports[`renders carousel mode correctly 1`] = `
1465
1479
  text-decoration: none;
1466
1480
  }
1467
1481
 
1468
- .c11 {
1469
- display: block;
1470
- width: 100%;
1471
- height: 100%;
1472
- position: relative;
1473
- }
1474
-
1475
- .c12 {
1476
- width: 100%;
1477
- height: 100%;
1478
- display: block;
1479
- object-fit: cover;
1480
- }
1481
-
1482
1482
  .c20 {
1483
1483
  height: 4px;
1484
1484
  width: 100%;
@@ -2153,6 +2153,20 @@ exports[`renders carousel mode correctly 1`] = `
2153
2153
  `;
2154
2154
 
2155
2155
  exports[`renders correctly with data prop 1`] = `
2156
+ .c11 {
2157
+ display: block;
2158
+ width: 100%;
2159
+ height: 100%;
2160
+ position: relative;
2161
+ }
2162
+
2163
+ .c12 {
2164
+ width: 100%;
2165
+ height: 100%;
2166
+ display: block;
2167
+ object-fit: cover;
2168
+ }
2169
+
2156
2170
  .c15 {
2157
2171
  font-family: 'Montserrat',Helvetica,Arial,sans-serif;
2158
2172
  font-weight: 400;
@@ -2180,20 +2194,6 @@ exports[`renders correctly with data prop 1`] = `
2180
2194
  text-decoration: none;
2181
2195
  }
2182
2196
 
2183
- .c11 {
2184
- display: block;
2185
- width: 100%;
2186
- height: 100%;
2187
- position: relative;
2188
- }
2189
-
2190
- .c12 {
2191
- width: 100%;
2192
- height: 100%;
2193
- display: block;
2194
- object-fit: cover;
2195
- }
2196
-
2197
2197
  .c20 {
2198
2198
  height: 4px;
2199
2199
  width: 100%;
@@ -1,6 +1,20 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
3
  exports[`renders correctly with data prop 1`] = `
4
+ .c9 {
5
+ display: block;
6
+ width: 100%;
7
+ height: 100%;
8
+ position: relative;
9
+ }
10
+
11
+ .c10 {
12
+ width: 100%;
13
+ height: 100%;
14
+ display: block;
15
+ object-fit: cover;
16
+ }
17
+
4
18
  .c14 {
5
19
  font-family: 'Montserrat',Helvetica,Arial,sans-serif;
6
20
  font-weight: 400;
@@ -28,20 +42,6 @@ exports[`renders correctly with data prop 1`] = `
28
42
  text-decoration: none;
29
43
  }
30
44
 
31
- .c9 {
32
- display: block;
33
- width: 100%;
34
- height: 100%;
35
- position: relative;
36
- }
37
-
38
- .c10 {
39
- width: 100%;
40
- height: 100%;
41
- display: block;
42
- object-fit: cover;
43
- }
44
-
45
45
  .c19 {
46
46
  height: 4px;
47
47
  width: 100%;
@@ -1,6 +1,20 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
3
  exports[`renders Column view correctly 1`] = `
4
+ .c3 {
5
+ display: block;
6
+ width: 100%;
7
+ height: auto;
8
+ position: relative;
9
+ }
10
+
11
+ .c4 {
12
+ width: 100%;
13
+ height: auto;
14
+ display: block;
15
+ object-fit: cover;
16
+ }
17
+
4
18
  .c9 {
5
19
  fill: #FFFFFF;
6
20
  }
@@ -17,7 +31,8 @@ exports[`renders Column view correctly 1`] = `
17
31
  position: relative;
18
32
  text-decoration: none;
19
33
  transition: all 0.2s;
20
- height: 2.5rem;
34
+ height: auto;
35
+ min-height: 3rem;
21
36
  width: 100%;
22
37
  justify-content: center;
23
38
  align-items: center;
@@ -40,6 +55,7 @@ exports[`renders Column view correctly 1`] = `
40
55
  .c7:focus-within,
41
56
  .c7:focus-visible {
42
57
  background-color: #890B11;
58
+ color: #FFFFFF;
43
59
  outline-offset: 3px;
44
60
  }
45
61
 
@@ -48,20 +64,6 @@ exports[`renders Column view correctly 1`] = `
48
64
  opacity: 0.5;
49
65
  }
50
66
 
51
- .c3 {
52
- display: block;
53
- width: 100%;
54
- height: auto;
55
- position: relative;
56
- }
57
-
58
- .c4 {
59
- width: 100%;
60
- height: auto;
61
- display: block;
62
- object-fit: cover;
63
- }
64
-
65
67
  .c0 {
66
68
  display: flex;
67
69
  position: relative;
@@ -251,6 +253,20 @@ exports[`renders Column view correctly 1`] = `
251
253
  `;
252
254
 
253
255
  exports[`renders correctly 1`] = `
256
+ .c3 {
257
+ display: block;
258
+ width: 100%;
259
+ height: auto;
260
+ position: relative;
261
+ }
262
+
263
+ .c4 {
264
+ width: 100%;
265
+ height: auto;
266
+ display: block;
267
+ object-fit: cover;
268
+ }
269
+
254
270
  .c9 {
255
271
  fill: #FFFFFF;
256
272
  }
@@ -267,7 +283,8 @@ exports[`renders correctly 1`] = `
267
283
  position: relative;
268
284
  text-decoration: none;
269
285
  transition: all 0.2s;
270
- height: 2.5rem;
286
+ height: auto;
287
+ min-height: 3rem;
271
288
  width: 100%;
272
289
  justify-content: center;
273
290
  align-items: center;
@@ -290,6 +307,7 @@ exports[`renders correctly 1`] = `
290
307
  .c7:focus-within,
291
308
  .c7:focus-visible {
292
309
  background-color: #890B11;
310
+ color: #FFFFFF;
293
311
  outline-offset: 3px;
294
312
  }
295
313
 
@@ -298,20 +316,6 @@ exports[`renders correctly 1`] = `
298
316
  opacity: 0.5;
299
317
  }
300
318
 
301
- .c3 {
302
- display: block;
303
- width: 100%;
304
- height: auto;
305
- position: relative;
306
- }
307
-
308
- .c4 {
309
- width: 100%;
310
- height: auto;
311
- display: block;
312
- object-fit: cover;
313
- }
314
-
315
319
  .c0 {
316
320
  display: flex;
317
321
  position: relative;
@@ -105,6 +105,8 @@ export const StyledEmailSignUpButton = styled(Button)`
105
105
  border-radius: 0.5rem;
106
106
  overflow: hidden;
107
107
  min-width: max-content;
108
+ // Customised for this context
109
+ min-height: 2.25rem;
108
110
  width: 100%;
109
111
 
110
112
  @media ${({ theme }) => theme.breakpoints2026('M')} {
@@ -1,6 +1,20 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
3
  exports[`renders "Full Height Media" Hero Banner correctly 1`] = `
4
+ .c3 {
5
+ display: block;
6
+ width: 100%;
7
+ height: 100%;
8
+ position: relative;
9
+ }
10
+
11
+ .c4 {
12
+ width: 100%;
13
+ height: 100%;
14
+ display: block;
15
+ object-fit: cover;
16
+ }
17
+
4
18
  .c8 {
5
19
  font-family: 'Anton',Impact,sans-serif;
6
20
  font-weight: 400;
@@ -37,20 +51,6 @@ exports[`renders "Full Height Media" Hero Banner correctly 1`] = `
37
51
  line-height: inherit;
38
52
  }
39
53
 
40
- .c3 {
41
- display: block;
42
- width: 100%;
43
- height: 100%;
44
- position: relative;
45
- }
46
-
47
- .c4 {
48
- width: 100%;
49
- height: 100%;
50
- display: block;
51
- object-fit: cover;
52
- }
53
-
54
54
  .c0 {
55
55
  width: 100%;
56
56
  height: auto;
@@ -276,6 +276,20 @@ exports[`renders "Full Height Media" Hero Banner correctly 1`] = `
276
276
  `;
277
277
 
278
278
  exports[`renders "Half Height Media" Hero Banner correctly 1`] = `
279
+ .c3 {
280
+ display: block;
281
+ width: 100%;
282
+ height: 100%;
283
+ position: relative;
284
+ }
285
+
286
+ .c4 {
287
+ width: 100%;
288
+ height: 100%;
289
+ display: block;
290
+ object-fit: cover;
291
+ }
292
+
279
293
  .c8 {
280
294
  font-family: 'Anton',Impact,sans-serif;
281
295
  font-weight: 400;
@@ -312,20 +326,6 @@ exports[`renders "Half Height Media" Hero Banner correctly 1`] = `
312
326
  line-height: inherit;
313
327
  }
314
328
 
315
- .c3 {
316
- display: block;
317
- width: 100%;
318
- height: 100%;
319
- position: relative;
320
- }
321
-
322
- .c4 {
323
- width: 100%;
324
- height: 100%;
325
- display: block;
326
- object-fit: cover;
327
- }
328
-
329
329
  .c0 {
330
330
  width: 100%;
331
331
  height: auto;
@@ -769,34 +769,6 @@ exports[`renders "Text Banner" Hero Banner correctly 1`] = `
769
769
  `;
770
770
 
771
771
  exports[`renders "Text Banner" Hero Banner correctly 2`] = `
772
- .c8 {
773
- font-family: 'Anton',Impact,sans-serif;
774
- font-weight: 400;
775
- text-transform: uppercase;
776
- letter-spacing: 0;
777
- font-size: 2rem;
778
- line-height: 2rem;
779
- }
780
-
781
- .c8 span {
782
- font-size: inherit;
783
- line-height: inherit;
784
- }
785
-
786
- .c9 {
787
- font-family: 'Montserrat',Helvetica,Arial,sans-serif;
788
- font-weight: 400;
789
- text-transform: inherit;
790
- letter-spacing: 0;
791
- font-size: 1rem;
792
- line-height: 1.25rem;
793
- }
794
-
795
- .c9 span {
796
- font-size: inherit;
797
- line-height: inherit;
798
- }
799
-
800
772
  .c3 {
801
773
  display: block;
802
774
  width: 100%;
@@ -825,6 +797,34 @@ exports[`renders "Text Banner" Hero Banner correctly 2`] = `
825
797
  object-fit: contain;
826
798
  }
827
799
 
800
+ .c8 {
801
+ font-family: 'Anton',Impact,sans-serif;
802
+ font-weight: 400;
803
+ text-transform: uppercase;
804
+ letter-spacing: 0;
805
+ font-size: 2rem;
806
+ line-height: 2rem;
807
+ }
808
+
809
+ .c8 span {
810
+ font-size: inherit;
811
+ line-height: inherit;
812
+ }
813
+
814
+ .c9 {
815
+ font-family: 'Montserrat',Helvetica,Arial,sans-serif;
816
+ font-weight: 400;
817
+ text-transform: inherit;
818
+ letter-spacing: 0;
819
+ font-size: 1rem;
820
+ line-height: 1.25rem;
821
+ }
822
+
823
+ .c9 span {
824
+ font-size: inherit;
825
+ line-height: inherit;
826
+ }
827
+
828
828
  .c0 {
829
829
  width: 100%;
830
830
  height: auto;
@@ -17,6 +17,20 @@ it('renders correctly', () => {
17
17
  ).toJSON();
18
18
 
19
19
  expect(tree).toMatchInlineSnapshot(`
20
+ .c2 {
21
+ display: block;
22
+ width: 100%;
23
+ height: auto;
24
+ position: relative;
25
+ }
26
+
27
+ .c3 {
28
+ width: 100%;
29
+ height: auto;
30
+ display: block;
31
+ object-fit: none;
32
+ }
33
+
20
34
  .c4 {
21
35
  font-family: 'Montserrat',Helvetica,Arial,sans-serif;
22
36
  font-weight: 400;
@@ -50,20 +64,6 @@ it('renders correctly', () => {
50
64
  text-decoration: none;
51
65
  }
52
66
 
53
- .c2 {
54
- display: block;
55
- width: 100%;
56
- height: auto;
57
- position: relative;
58
- }
59
-
60
- .c3 {
61
- width: 100%;
62
- height: auto;
63
- display: block;
64
- object-fit: none;
65
- }
66
-
67
67
  .c6 {
68
68
  border: 0;
69
69
  clip: rect(0 0 0 0);
@@ -1,6 +1,20 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
3
  exports[`renders Promo correctly 1`] = `
4
+ .c2 {
5
+ display: block;
6
+ width: 100%;
7
+ height: 100%;
8
+ position: relative;
9
+ }
10
+
11
+ .c3 {
12
+ width: 100%;
13
+ height: 100%;
14
+ display: block;
15
+ object-fit: cover;
16
+ }
17
+
4
18
  .c7 {
5
19
  font-family: 'Anton',Impact,sans-serif;
6
20
  font-weight: 400;
@@ -51,7 +65,8 @@ exports[`renders Promo correctly 1`] = `
51
65
  position: relative;
52
66
  text-decoration: none;
53
67
  transition: all 0.2s;
54
- height: 2.5rem;
68
+ height: auto;
69
+ min-height: 3rem;
55
70
  width: 100%;
56
71
  justify-content: center;
57
72
  align-items: center;
@@ -74,6 +89,7 @@ exports[`renders Promo correctly 1`] = `
74
89
  .c9:focus-within,
75
90
  .c9:focus-visible {
76
91
  background-color: #E1E2E3;
92
+ color: #000000;
77
93
  outline-offset: 3px;
78
94
  }
79
95
 
@@ -82,20 +98,6 @@ exports[`renders Promo correctly 1`] = `
82
98
  opacity: 0.5;
83
99
  }
84
100
 
85
- .c2 {
86
- display: block;
87
- width: 100%;
88
- height: 100%;
89
- position: relative;
90
- }
91
-
92
- .c3 {
93
- width: 100%;
94
- height: 100%;
95
- display: block;
96
- object-fit: cover;
97
- }
98
-
99
101
  .c0 {
100
102
  width: 100%;
101
103
  display: flex;
@@ -306,6 +308,20 @@ exports[`renders Promo correctly 1`] = `
306
308
  `;
307
309
 
308
310
  exports[`renders Promo correctly end position 1`] = `
311
+ .c2 {
312
+ display: block;
313
+ width: 100%;
314
+ height: 100%;
315
+ position: relative;
316
+ }
317
+
318
+ .c3 {
319
+ width: 100%;
320
+ height: 100%;
321
+ display: block;
322
+ object-fit: cover;
323
+ }
324
+
309
325
  .c7 {
310
326
  font-family: 'Anton',Impact,sans-serif;
311
327
  font-weight: 400;
@@ -356,7 +372,8 @@ exports[`renders Promo correctly end position 1`] = `
356
372
  position: relative;
357
373
  text-decoration: none;
358
374
  transition: all 0.2s;
359
- height: 2.5rem;
375
+ height: auto;
376
+ min-height: 3rem;
360
377
  width: 100%;
361
378
  justify-content: center;
362
379
  align-items: center;
@@ -379,6 +396,7 @@ exports[`renders Promo correctly end position 1`] = `
379
396
  .c9:focus-within,
380
397
  .c9:focus-visible {
381
398
  background-color: #E1E2E3;
399
+ color: #000000;
382
400
  outline-offset: 3px;
383
401
  }
384
402
 
@@ -387,20 +405,6 @@ exports[`renders Promo correctly end position 1`] = `
387
405
  opacity: 0.5;
388
406
  }
389
407
 
390
- .c2 {
391
- display: block;
392
- width: 100%;
393
- height: 100%;
394
- position: relative;
395
- }
396
-
397
- .c3 {
398
- width: 100%;
399
- height: 100%;
400
- display: block;
401
- object-fit: cover;
402
- }
403
-
404
408
  .c0 {
405
409
  width: 100%;
406
410
  display: flex;
@@ -38,7 +38,8 @@ exports[`renders a Quote Slice with basic props 1`] = `
38
38
  position: relative;
39
39
  text-decoration: none;
40
40
  transition: all 0.2s;
41
- height: 2.5rem;
41
+ height: auto;
42
+ min-height: 3rem;
42
43
  width: 100%;
43
44
  justify-content: center;
44
45
  align-items: center;
@@ -61,6 +62,7 @@ exports[`renders a Quote Slice with basic props 1`] = `
61
62
  .c8:focus-within,
62
63
  .c8:focus-visible {
63
64
  background-color: #E1E2E3;
65
+ color: #000000;
64
66
  outline-offset: 3px;
65
67
  }
66
68