@comicrelief/component-library 8.77.4 → 8.77.6

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@comicrelief/component-library",
3
3
  "author": "Comic Relief Engineering Team",
4
- "version": "8.77.4",
4
+ "version": "8.77.6",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.es.js",
7
7
  "files": [
@@ -7,118 +7,118 @@ it('renders correctly', () => {
7
7
  const tree = renderWithTheme(<LogoNav2026 rotate />).toJSON();
8
8
 
9
9
  expect(tree).toMatchInlineSnapshot(`
10
- .c0 img {
11
- animation: k0 0.4s ease-in-out forwards;
12
- animation-name: k1;
13
- }
14
-
15
- .c0:hover img,
16
- .c0:focus img {
17
- animation: k0 0.4s ease-in-out forwards;
18
- }
19
-
20
- .c1 {
21
- display: block;
22
- width: auto;
23
- height: 100%;
24
- max-width: 100%;
25
- }
26
-
27
- .c2 {
28
- z-index: 3;
29
- width: 49px;
30
- height: 32px;
31
- display: block;
32
- }
33
-
34
- .c3 {
35
- z-index: 3;
36
- display: none;
37
- }
38
-
39
- @media (min-width: 320px) {
40
- .c2 {
41
- display: none;
42
- }
43
- }
44
-
45
- @media (min-width: 320px) {
46
- .c3 {
47
- display: block;
48
- width: 132px;
49
- height: 20px;
50
- }
51
- }
52
-
53
- @media (min-width: 740px) {
54
- .c3 {
55
- width: 162px;
56
- height: 25px;
57
- }
58
- }
59
-
60
- @media (min-width: 1024px) {
61
- .c3 {
62
- width: 162px;
63
- min-width: 162px;
64
- height: 46px;
65
- }
66
- }
67
-
68
- @keyframes k0 {
69
- from {
70
- transform: scale3d(1,1,1);
71
- }
72
-
73
- 30% {
74
- transform: scale3d(1.04,1.04,1.04);
75
- }
76
-
77
- 60% {
78
- transform: scale3d(1.03,1.03,1.03);
79
- }
80
-
81
- to {
82
- transform: scale3d(1.04,1.04,1.04);
83
- }
84
- }
85
-
86
- @keyframes k1 {
87
- from {
88
- transform: scale3d(1.03,1.03,1.03);
89
- }
90
-
91
- 30% {
92
- transform: scale3d(0.99,0.99,0.99);
93
- }
94
-
95
- 60% {
96
- transform: scale3d(1.01,1.01,1.01);
97
- }
98
-
99
- to {
100
- transform: scale3d(1,1,1);
101
- }
102
- }
103
-
104
- <a
105
- className="c0"
106
- data-testid="LogoLink"
107
- href="/"
108
- title="Go to Comic Relief homepage"
109
- >
110
- <img
111
- alt="Comic Relief logo"
112
- className="c1 c2"
113
- data-testid="MobileImage"
114
- src="mock.asset"
115
- />
116
- <img
117
- alt="Comic Relief logo"
118
- className="c1 c3"
119
- data-testid="DesktopImage"
120
- src="mock.asset"
121
- />
122
- </a>
123
- `);
10
+ .c0 img {
11
+ animation: k0 0.35s ease-in-out forwards;
12
+ animation-name: k1;
13
+ }
14
+
15
+ .c0:hover img,
16
+ .c0:focus img {
17
+ animation: k0 0.35s ease-in-out forwards;
18
+ }
19
+
20
+ .c1 {
21
+ display: block;
22
+ width: auto;
23
+ height: 100%;
24
+ max-width: 100%;
25
+ }
26
+
27
+ .c2 {
28
+ z-index: 3;
29
+ width: 49px;
30
+ height: 32px;
31
+ display: block;
32
+ }
33
+
34
+ .c3 {
35
+ z-index: 3;
36
+ display: none;
37
+ }
38
+
39
+ @media (min-width: 320px) {
40
+ .c2 {
41
+ display: none;
42
+ }
43
+ }
44
+
45
+ @media (min-width: 320px) {
46
+ .c3 {
47
+ display: block;
48
+ width: 132px;
49
+ height: 20px;
50
+ }
51
+ }
52
+
53
+ @media (min-width: 740px) {
54
+ .c3 {
55
+ width: 162px;
56
+ height: 25px;
57
+ }
58
+ }
59
+
60
+ @media (min-width: 1024px) {
61
+ .c3 {
62
+ width: 162px;
63
+ min-width: 162px;
64
+ height: 46px;
65
+ }
66
+ }
67
+
68
+ @keyframes k0 {
69
+ from {
70
+ transform: scale3d(1,1,1);
71
+ }
72
+
73
+ 30% {
74
+ transform: scale3d(1.04,1.04,1.04);
75
+ }
76
+
77
+ 60% {
78
+ transform: scale3d(1.03,1.03,1.03);
79
+ }
80
+
81
+ to {
82
+ transform: scale3d(1.04,1.04,1.04);
83
+ }
84
+ }
85
+
86
+ @keyframes k1 {
87
+ from {
88
+ transform: scale3d(1.03,1.03,1.03);
89
+ }
90
+
91
+ 30% {
92
+ transform: scale3d(0.99,0.99,0.99);
93
+ }
94
+
95
+ 60% {
96
+ transform: scale3d(1.01,1.01,1.01);
97
+ }
98
+
99
+ to {
100
+ transform: scale3d(1,1,1);
101
+ }
102
+ }
103
+
104
+ <a
105
+ className="c0"
106
+ data-testid="LogoLink"
107
+ href="/"
108
+ title="Go to Comic Relief homepage"
109
+ >
110
+ <img
111
+ alt="Comic Relief logo"
112
+ className="c1 c2"
113
+ data-testid="MobileImage"
114
+ src="mock.asset"
115
+ />
116
+ <img
117
+ alt="Comic Relief logo"
118
+ className="c1 c3"
119
+ data-testid="DesktopImage"
120
+ src="mock.asset"
121
+ />
122
+ </a>
123
+ `);
124
124
  });
@@ -84,7 +84,7 @@ const ArticleTeaser = ({
84
84
  />
85
85
  </CtaText>
86
86
  <CtaIconWrapper>
87
- <ArrowIconWrapper $preventHoverColourChange>
87
+ <ArrowIconWrapper>
88
88
  <ArrowIconInner>
89
89
  <ArrowIcon />
90
90
  </ArrowIconInner>
@@ -5,7 +5,7 @@ import Text from '../../Atoms/Text/Text';
5
5
  import Picture from '../../Atoms/Picture/Picture';
6
6
  import link from '../../Atoms/Link/Link';
7
7
  import { bounceUpAnimation, imageZoom } from '../../../theme/shared/animations';
8
- import { CtaTextUnderline, CtaIconWrapper } from '../shared/ctaText/ctaText.style';
8
+ import { CtaTextUnderline, CtaIconWrapper, CtaText } from '../shared/ctaText/ctaText.style';
9
9
  import { ArrowIconWrapper } from '../shared/ctaArrow/CtaArrowCircle.style';
10
10
  import { breakpointValues } from '../../../theme/shared/allBreakpoints';
11
11
 
@@ -47,7 +47,7 @@ const CtaWrapper = styled.div`
47
47
  top: auto;
48
48
  }
49
49
 
50
- span {
50
+ ${CtaText} {
51
51
  font-weight: bold;
52
52
  font-size: 1rem;
53
53
  transition: color 0.15s 0.1s;
@@ -120,7 +120,7 @@ const Link = styled(link)`
120
120
  }
121
121
 
122
122
  ${CtaWrapper} {
123
- span {
123
+ ${CtaText} {
124
124
  color: ${({ theme }) => theme.color('red')};
125
125
  }
126
126
  }
@@ -94,7 +94,7 @@ it('renders article teaser correctly', () => {
94
94
  object-fit: cover;
95
95
  }
96
96
 
97
- .c20 {
97
+ .c21 {
98
98
  height: 4px;
99
99
  width: 100%;
100
100
  position: absolute;
@@ -102,9 +102,10 @@ it('renders article teaser correctly', () => {
102
102
  bottom: -5px;
103
103
  transition: opacity 0.15s 0.1s;
104
104
  opacity: 0;
105
+ pointer-events: none;
105
106
  }
106
107
 
107
- .c22 {
108
+ .c23 {
108
109
  height: 2rem;
109
110
  position: absolute;
110
111
  top: 50%;
@@ -113,20 +114,20 @@ it('renders article teaser correctly', () => {
113
114
  content: "";
114
115
  }
115
116
 
116
- .c18 {
117
+ .c19 {
117
118
  position: relative;
118
119
  }
119
120
 
120
- .c25 {
121
+ .c26 {
121
122
  display: inline-flex;
122
123
  align-items: center;
123
124
  justify-content: center;
124
- transition: transform 0.3s cubic-bezier(0.65,-0.19,0.37,1.16);
125
+ transition: transform 0.35s cubic-bezier(0.65,-0.19,0.37,1.16);
125
126
  transform: scale(1);
126
127
  transform-origin: center;
127
128
  }
128
129
 
129
- .c24 {
130
+ .c25 {
130
131
  width: 32px;
131
132
  height: 32px;
132
133
  border-radius: 50%;
@@ -164,12 +165,12 @@ it('renders article teaser correctly', () => {
164
165
  flex-direction: row;
165
166
  }
166
167
 
167
- .c16 .c21 {
168
+ .c16 .c22 {
168
169
  transform: none;
169
170
  top: auto;
170
171
  }
171
172
 
172
- .c16 span {
173
+ .c16 .c18 {
173
174
  font-weight: bold;
174
175
  font-size: 1rem;
175
176
  transition: color 0.15s 0.1s;
@@ -185,7 +186,7 @@ it('renders article teaser correctly', () => {
185
186
  width: 100%;
186
187
  }
187
188
 
188
- .c2 .c23 {
189
+ .c2 .c24 {
189
190
  background-color: #E52630;
190
191
  }
191
192
 
@@ -227,7 +228,7 @@ it('renders article teaser correctly', () => {
227
228
  margin-bottom: 1rem;
228
229
  }
229
230
 
230
- .c26 {
231
+ .c27 {
231
232
  display: inline-block;
232
233
  color: #FFFFFF;
233
234
  fill: currentColor;
@@ -275,6 +276,12 @@ it('renders article teaser correctly', () => {
275
276
  }
276
277
  }
277
278
 
279
+ @media (min-width: 1024px) {
280
+ .c25 {
281
+ background: #222222;
282
+ }
283
+ }
284
+
278
285
  @media (min-width: 740px) {
279
286
  .c4 {
280
287
  flex-direction: row;
@@ -288,13 +295,13 @@ it('renders article teaser correctly', () => {
288
295
  }
289
296
 
290
297
  @media (min-width: 1024px) {
291
- .c16 span {
298
+ .c16 .c18 {
292
299
  color: #000000;
293
300
  }
294
301
  }
295
302
 
296
303
  @media (min-width: 1024px) {
297
- .c2 .c23 {
304
+ .c2 .c24 {
298
305
  transition: background-color 0.15s 0.1s;
299
306
  background-color: #000000;
300
307
  }
@@ -319,22 +326,22 @@ it('renders article teaser correctly', () => {
319
326
 
320
327
  .c2 .c7 img {
321
328
  transform: scale(1.02);
322
- transition: transform 0.3s cubic-bezier(0.65,-0.19,0.37,1.16);
329
+ transition: transform 0.35s cubic-bezier(0.65,-0.19,0.37,1.16),box-shadow 0.35s;
323
330
  }
324
331
 
325
332
  .c2:hover .c7 img {
326
333
  transform: scale(1.04);
327
334
  }
328
335
 
329
- .c2:hover .c23 {
336
+ .c2:hover .c24 {
330
337
  background-color: #E52630;
331
338
  }
332
339
 
333
- .c2:hover .c19 {
340
+ .c2:hover .c20 {
334
341
  opacity: 1;
335
342
  }
336
343
 
337
- .c2:hover .c15 span {
344
+ .c2:hover .c15 .c18 {
338
345
  color: #E52630;
339
346
  }
340
347
  }
@@ -413,26 +420,26 @@ it('renders article teaser correctly', () => {
413
420
  className="c15 c16"
414
421
  >
415
422
  <span
416
- className="c17 c18"
423
+ className="c17 c18 c19"
417
424
  >
418
425
  Read more
419
426
  <img
420
427
  alt="Read more"
421
- className="c19 c20"
428
+ className="c20 c21"
422
429
  src="mock.asset"
423
430
  />
424
431
  </span>
425
432
  <div
426
- className="c21 c22"
433
+ className="c22 c23"
427
434
  >
428
435
  <div
429
- className="c23 c24"
436
+ className="c24 c25"
430
437
  >
431
438
  <span
432
- className="c25"
439
+ className="c26"
433
440
  >
434
441
  <svg
435
- className="c26"
442
+ className="c27"
436
443
  fill="none"
437
444
  height="15"
438
445
  viewBox="0 0 15 15"
@@ -543,7 +550,7 @@ it('renders press realese correctly', () => {
543
550
  object-fit: cover;
544
551
  }
545
552
 
546
- .c20 {
553
+ .c21 {
547
554
  height: 4px;
548
555
  width: 100%;
549
556
  position: absolute;
@@ -551,9 +558,10 @@ it('renders press realese correctly', () => {
551
558
  bottom: -5px;
552
559
  transition: opacity 0.15s 0.1s;
553
560
  opacity: 0;
561
+ pointer-events: none;
554
562
  }
555
563
 
556
- .c22 {
564
+ .c23 {
557
565
  height: 2rem;
558
566
  position: absolute;
559
567
  top: 50%;
@@ -562,20 +570,20 @@ it('renders press realese correctly', () => {
562
570
  content: "";
563
571
  }
564
572
 
565
- .c18 {
573
+ .c19 {
566
574
  position: relative;
567
575
  }
568
576
 
569
- .c25 {
577
+ .c26 {
570
578
  display: inline-flex;
571
579
  align-items: center;
572
580
  justify-content: center;
573
- transition: transform 0.3s cubic-bezier(0.65,-0.19,0.37,1.16);
581
+ transition: transform 0.35s cubic-bezier(0.65,-0.19,0.37,1.16);
574
582
  transform: scale(1);
575
583
  transform-origin: center;
576
584
  }
577
585
 
578
- .c24 {
586
+ .c25 {
579
587
  width: 32px;
580
588
  height: 32px;
581
589
  border-radius: 50%;
@@ -613,12 +621,12 @@ it('renders press realese correctly', () => {
613
621
  flex-direction: row;
614
622
  }
615
623
 
616
- .c16 .c21 {
624
+ .c16 .c22 {
617
625
  transform: none;
618
626
  top: auto;
619
627
  }
620
628
 
621
- .c16 span {
629
+ .c16 .c18 {
622
630
  font-weight: bold;
623
631
  font-size: 1rem;
624
632
  transition: color 0.15s 0.1s;
@@ -635,7 +643,7 @@ it('renders press realese correctly', () => {
635
643
  width: 100%;
636
644
  }
637
645
 
638
- .c2 .c23 {
646
+ .c2 .c24 {
639
647
  background-color: #E52630;
640
648
  }
641
649
 
@@ -678,7 +686,7 @@ it('renders press realese correctly', () => {
678
686
  margin-bottom: 1rem;
679
687
  }
680
688
 
681
- .c26 {
689
+ .c27 {
682
690
  display: inline-block;
683
691
  color: #FFFFFF;
684
692
  fill: currentColor;
@@ -726,6 +734,12 @@ it('renders press realese correctly', () => {
726
734
  }
727
735
  }
728
736
 
737
+ @media (min-width: 1024px) {
738
+ .c25 {
739
+ background: #222222;
740
+ }
741
+ }
742
+
729
743
  @media (min-width: 740px) {
730
744
  .c4 {
731
745
  flex-direction: row;
@@ -733,13 +747,13 @@ it('renders press realese correctly', () => {
733
747
  }
734
748
 
735
749
  @media (min-width: 1024px) {
736
- .c16 span {
750
+ .c16 .c18 {
737
751
  color: #000000;
738
752
  }
739
753
  }
740
754
 
741
755
  @media (min-width: 1024px) {
742
- .c2 .c23 {
756
+ .c2 .c24 {
743
757
  transition: background-color 0.15s 0.1s;
744
758
  background-color: #000000;
745
759
  }
@@ -764,22 +778,22 @@ it('renders press realese correctly', () => {
764
778
 
765
779
  .c2 .c7 img {
766
780
  transform: scale(0.9);
767
- transition: transform 0.3s cubic-bezier(0.65,-0.19,0.37,1.16);
781
+ transition: transform 0.35s cubic-bezier(0.65,-0.19,0.37,1.16),box-shadow 0.35s;
768
782
  }
769
783
 
770
784
  .c2:hover .c7 img {
771
785
  transform: scale(1);
772
786
  }
773
787
 
774
- .c2:hover .c23 {
788
+ .c2:hover .c24 {
775
789
  background-color: #E52630;
776
790
  }
777
791
 
778
- .c2:hover .c19 {
792
+ .c2:hover .c20 {
779
793
  opacity: 1;
780
794
  }
781
795
 
782
- .c2:hover .c15 span {
796
+ .c2:hover .c15 .c18 {
783
797
  color: #E52630;
784
798
  }
785
799
  }
@@ -834,26 +848,26 @@ it('renders press realese correctly', () => {
834
848
  className="c15 c16"
835
849
  >
836
850
  <span
837
- className="c17 c18"
851
+ className="c17 c18 c19"
838
852
  >
839
853
  Read more
840
854
  <img
841
855
  alt="Read more"
842
- className="c19 c20"
856
+ className="c20 c21"
843
857
  src="mock.asset"
844
858
  />
845
859
  </span>
846
860
  <div
847
- className="c21 c22"
861
+ className="c22 c23"
848
862
  >
849
863
  <div
850
- className="c23 c24"
864
+ className="c24 c25"
851
865
  >
852
866
  <span
853
- className="c25"
867
+ className="c26"
854
868
  >
855
869
  <svg
856
- className="c26"
870
+ className="c27"
857
871
  fill="none"
858
872
  height="15"
859
873
  viewBox="0 0 15 15"