@comicrelief/component-library 8.77.4 → 8.77.5
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/index.cjs.js +739 -703
- package/dist/index.es.js +6222 -6187
- package/package.json +1 -1
- package/src/components/Atoms/LogoNav2026/LogoNav2026.test.js +114 -114
- package/src/components/Molecules/ArticleTeaser/ArticleTeaser.js +1 -1
- package/src/components/Molecules/ArticleTeaser/ArticleTeaser.style.js +3 -3
- package/src/components/Molecules/ArticleTeaser/ArticleTeaser.test.js +58 -44
- package/src/components/Molecules/CTA/CTAMultiCard/__snapshots__/CTAMultiCard.test.js.snap +240 -100
- package/src/components/Molecules/CTA/CTASingleCard/__snapshots__/CTASingleCard.test.js.snap +101 -49
- package/src/components/Molecules/CTA/shared/CTACard.js +4 -3
- package/src/components/Molecules/CTA/shared/CTACard.style.js +48 -33
- package/src/components/Molecules/HeroBanner/HeroBanner.js +2 -3
- package/src/components/Molecules/HeroBanner/HeroBanner.style.js +35 -16
- package/src/components/Molecules/HeroBanner/__snapshots__/HeroBanner.test.js.snap +9 -6
- package/src/components/Molecules/shared/ctaArrow/CtaArrowCircle.style.js +5 -8
- package/src/components/Molecules/shared/ctaText/ctaText.style.js +1 -0
- package/src/components/Organisms/DonateBanner/Form/PopUpComponent.js +1 -1
- package/src/theme/shared/animations.js +4 -2
|
@@ -42,11 +42,22 @@ exports[`renders correctly with data prop 1`] = `
|
|
|
42
42
|
object-fit: cover;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
+
.c17 {
|
|
46
|
+
height: 4px;
|
|
47
|
+
width: 100%;
|
|
48
|
+
position: absolute;
|
|
49
|
+
left: 0;
|
|
50
|
+
bottom: -5px;
|
|
51
|
+
transition: opacity 0.15s 0.1s;
|
|
52
|
+
opacity: 0;
|
|
53
|
+
pointer-events: none;
|
|
54
|
+
}
|
|
55
|
+
|
|
45
56
|
.c22 {
|
|
46
57
|
display: inline-flex;
|
|
47
58
|
align-items: center;
|
|
48
59
|
justify-content: center;
|
|
49
|
-
transition: transform 0.
|
|
60
|
+
transition: transform 0.35s cubic-bezier(0.65,-0.19,0.37,1.16);
|
|
50
61
|
transform: scale(1);
|
|
51
62
|
transform-origin: center;
|
|
52
63
|
}
|
|
@@ -103,17 +114,7 @@ exports[`renders correctly with data prop 1`] = `
|
|
|
103
114
|
text-decoration: none;
|
|
104
115
|
position: relative;
|
|
105
116
|
display: inline-block;
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
.c17 {
|
|
109
|
-
height: 4px;
|
|
110
|
-
width: 100%;
|
|
111
|
-
position: absolute;
|
|
112
|
-
left: 0;
|
|
113
|
-
bottom: -5px;
|
|
114
|
-
transition: opacity 0.15s 0.1s;
|
|
115
|
-
opacity: 0;
|
|
116
|
-
pointer-events: none;
|
|
117
|
+
transition: color 0.35s;
|
|
117
118
|
}
|
|
118
119
|
|
|
119
120
|
.c4 {
|
|
@@ -124,6 +125,7 @@ exports[`renders correctly with data prop 1`] = `
|
|
|
124
125
|
flex: 1 1 auto;
|
|
125
126
|
background: transparent;
|
|
126
127
|
border-radius: 1rem;
|
|
128
|
+
transition: box-shadow 0.35s;
|
|
127
129
|
box-shadow: rgba(0,0,0,0.15) 0px 0px 1rem;
|
|
128
130
|
text-decoration: none;
|
|
129
131
|
overflow: hidden;
|
|
@@ -131,9 +133,14 @@ exports[`renders correctly with data prop 1`] = `
|
|
|
131
133
|
box-sizing: border-box;
|
|
132
134
|
}
|
|
133
135
|
|
|
134
|
-
.c4
|
|
136
|
+
.c4:hover,
|
|
137
|
+
.c4:focus {
|
|
138
|
+
box-shadow: rgba(0,0,0,0.25) 0px 0px 1rem;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.c4 .c5 img {
|
|
135
142
|
transform: scale(1);
|
|
136
|
-
transition: transform 0.
|
|
143
|
+
transition: transform 0.35s cubic-bezier(0.65,-0.19,0.37,1.16),box-shadow 0.35s;
|
|
137
144
|
}
|
|
138
145
|
|
|
139
146
|
.c2 {
|
|
@@ -211,7 +218,7 @@ exports[`renders correctly with data prop 1`] = `
|
|
|
211
218
|
}
|
|
212
219
|
}
|
|
213
220
|
|
|
214
|
-
@media (min-width:1024px) {
|
|
221
|
+
@media (min-width: 1024px) {
|
|
215
222
|
.c20 {
|
|
216
223
|
background: #222222;
|
|
217
224
|
}
|
|
@@ -285,10 +292,27 @@ exports[`renders correctly with data prop 1`] = `
|
|
|
285
292
|
}
|
|
286
293
|
|
|
287
294
|
@media (min-width: 740px) {
|
|
295
|
+
.c4:hover .c14,
|
|
296
|
+
.c4:focus .c14 {
|
|
297
|
+
color: #E52630;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
.c4:hover .c16,
|
|
301
|
+
.c4:focus .c16 {
|
|
302
|
+
opacity: 1;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
.c4:hover .c19 .c21,
|
|
306
|
+
.c4:focus .c19 .c21 {
|
|
307
|
+
transform: scale(1.2);
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
@media (min-width: 1024px) {
|
|
288
312
|
.c4 {
|
|
289
313
|
transition: transform 0.30000000000000004s cubic-bezier(0.68,-0.8500000000000001,0.265,1.9500000000000002);
|
|
290
314
|
transform-origin: center;
|
|
291
|
-
transition: transform 0.
|
|
315
|
+
transition: transform 0.35s cubic-bezier(0.68,-1.15,0.265,2.35),box-shadow 0.35s;
|
|
292
316
|
}
|
|
293
317
|
|
|
294
318
|
.c4:hover,
|
|
@@ -296,23 +320,28 @@ exports[`renders correctly with data prop 1`] = `
|
|
|
296
320
|
transform: translateY(-10px);
|
|
297
321
|
}
|
|
298
322
|
|
|
299
|
-
.c4:hover
|
|
300
|
-
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
.c4:hover .c5 img {
|
|
323
|
+
.c4:hover .c5 img,
|
|
324
|
+
.c4:focus .c5 img {
|
|
304
325
|
transform: scale(1.06);
|
|
305
326
|
}
|
|
306
327
|
|
|
307
|
-
.c4:hover .c14
|
|
308
|
-
|
|
328
|
+
.c4:hover .c14,
|
|
329
|
+
.c4:focus .c14 {
|
|
330
|
+
color: #E52630;
|
|
309
331
|
}
|
|
310
332
|
|
|
311
|
-
.c4:hover .c16
|
|
333
|
+
.c4:hover .c16,
|
|
334
|
+
.c4:focus .c16 {
|
|
312
335
|
opacity: 1;
|
|
313
336
|
}
|
|
314
337
|
|
|
315
|
-
.c4:hover .c19
|
|
338
|
+
.c4:hover .c19,
|
|
339
|
+
.c4:focus .c19 {
|
|
340
|
+
background: #E52630;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
.c4:hover .c19 .c21,
|
|
344
|
+
.c4:focus .c19 .c21 {
|
|
316
345
|
transform: scale(1.2);
|
|
317
346
|
}
|
|
318
347
|
}
|
|
@@ -501,11 +530,22 @@ exports[`renders correctly without image 1`] = `
|
|
|
501
530
|
text-decoration: none;
|
|
502
531
|
}
|
|
503
532
|
|
|
533
|
+
.c13 {
|
|
534
|
+
height: 4px;
|
|
535
|
+
width: 100%;
|
|
536
|
+
position: absolute;
|
|
537
|
+
left: 0;
|
|
538
|
+
bottom: -5px;
|
|
539
|
+
transition: opacity 0.15s 0.1s;
|
|
540
|
+
opacity: 0;
|
|
541
|
+
pointer-events: none;
|
|
542
|
+
}
|
|
543
|
+
|
|
504
544
|
.c18 {
|
|
505
545
|
display: inline-flex;
|
|
506
546
|
align-items: center;
|
|
507
547
|
justify-content: center;
|
|
508
|
-
transition: transform 0.
|
|
548
|
+
transition: transform 0.35s cubic-bezier(0.65,-0.19,0.37,1.16);
|
|
509
549
|
transform: scale(1);
|
|
510
550
|
transform-origin: center;
|
|
511
551
|
}
|
|
@@ -547,17 +587,7 @@ exports[`renders correctly without image 1`] = `
|
|
|
547
587
|
text-decoration: none;
|
|
548
588
|
position: relative;
|
|
549
589
|
display: inline-block;
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
.c13 {
|
|
553
|
-
height: 4px;
|
|
554
|
-
width: 100%;
|
|
555
|
-
position: absolute;
|
|
556
|
-
left: 0;
|
|
557
|
-
bottom: -5px;
|
|
558
|
-
transition: opacity 0.15s 0.1s;
|
|
559
|
-
opacity: 0;
|
|
560
|
-
pointer-events: none;
|
|
590
|
+
transition: color 0.35s;
|
|
561
591
|
}
|
|
562
592
|
|
|
563
593
|
.c4 {
|
|
@@ -568,6 +598,7 @@ exports[`renders correctly without image 1`] = `
|
|
|
568
598
|
flex: 1 1 auto;
|
|
569
599
|
background: transparent;
|
|
570
600
|
border-radius: 1rem;
|
|
601
|
+
transition: box-shadow 0.35s;
|
|
571
602
|
box-shadow: rgba(0,0,0,0.15) 0px 0px 1rem;
|
|
572
603
|
text-decoration: none;
|
|
573
604
|
overflow: hidden;
|
|
@@ -575,9 +606,9 @@ exports[`renders correctly without image 1`] = `
|
|
|
575
606
|
box-sizing: border-box;
|
|
576
607
|
}
|
|
577
608
|
|
|
578
|
-
.c4
|
|
579
|
-
|
|
580
|
-
|
|
609
|
+
.c4:hover,
|
|
610
|
+
.c4:focus {
|
|
611
|
+
box-shadow: rgba(0,0,0,0.25) 0px 0px 1rem;
|
|
581
612
|
}
|
|
582
613
|
|
|
583
614
|
.c2 {
|
|
@@ -655,7 +686,7 @@ exports[`renders correctly without image 1`] = `
|
|
|
655
686
|
}
|
|
656
687
|
}
|
|
657
688
|
|
|
658
|
-
@media (min-width:1024px) {
|
|
689
|
+
@media (min-width: 1024px) {
|
|
659
690
|
.c16 {
|
|
660
691
|
background: #222222;
|
|
661
692
|
}
|
|
@@ -696,10 +727,27 @@ exports[`renders correctly without image 1`] = `
|
|
|
696
727
|
}
|
|
697
728
|
|
|
698
729
|
@media (min-width: 740px) {
|
|
730
|
+
.c4:hover .c10,
|
|
731
|
+
.c4:focus .c10 {
|
|
732
|
+
color: #E52630;
|
|
733
|
+
}
|
|
734
|
+
|
|
735
|
+
.c4:hover .c12,
|
|
736
|
+
.c4:focus .c12 {
|
|
737
|
+
opacity: 1;
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
.c4:hover .c15 .c17,
|
|
741
|
+
.c4:focus .c15 .c17 {
|
|
742
|
+
transform: scale(1.2);
|
|
743
|
+
}
|
|
744
|
+
}
|
|
745
|
+
|
|
746
|
+
@media (min-width: 1024px) {
|
|
699
747
|
.c4 {
|
|
700
748
|
transition: transform 0.30000000000000004s cubic-bezier(0.68,-0.8500000000000001,0.265,1.9500000000000002);
|
|
701
749
|
transform-origin: center;
|
|
702
|
-
transition: transform 0.
|
|
750
|
+
transition: transform 0.35s cubic-bezier(0.68,-1.15,0.265,2.35),box-shadow 0.35s;
|
|
703
751
|
}
|
|
704
752
|
|
|
705
753
|
.c4:hover,
|
|
@@ -707,19 +755,23 @@ exports[`renders correctly without image 1`] = `
|
|
|
707
755
|
transform: translateY(-10px);
|
|
708
756
|
}
|
|
709
757
|
|
|
710
|
-
.c4:hover
|
|
711
|
-
|
|
758
|
+
.c4:hover .c10,
|
|
759
|
+
.c4:focus .c10 {
|
|
760
|
+
color: #E52630;
|
|
712
761
|
}
|
|
713
762
|
|
|
714
|
-
.c4:hover .
|
|
715
|
-
|
|
763
|
+
.c4:hover .c12,
|
|
764
|
+
.c4:focus .c12 {
|
|
765
|
+
opacity: 1;
|
|
716
766
|
}
|
|
717
767
|
|
|
718
|
-
.c4:hover .
|
|
719
|
-
|
|
768
|
+
.c4:hover .c15,
|
|
769
|
+
.c4:focus .c15 {
|
|
770
|
+
background: #E52630;
|
|
720
771
|
}
|
|
721
772
|
|
|
722
|
-
.c4:hover .c15 .c17
|
|
773
|
+
.c4:hover .c15 .c17,
|
|
774
|
+
.c4:focus .c15 .c17 {
|
|
723
775
|
transform: scale(1.2);
|
|
724
776
|
}
|
|
725
777
|
}
|
|
@@ -4,6 +4,8 @@ import Picture from '../../../Atoms/Picture/Picture';
|
|
|
4
4
|
import Link from '../../../Atoms/Link/Link';
|
|
5
5
|
import ArrowIcon from '../../shared/ctaArrow/ArrowIcon';
|
|
6
6
|
import altCtaUnderline from '../../../../theme/shared/assets/alt_cta_underline.svg';
|
|
7
|
+
import { CtaTextUnderline } from '../../shared/ctaText/ctaText.style';
|
|
8
|
+
|
|
7
9
|
import {
|
|
8
10
|
CardLink,
|
|
9
11
|
ImageWrapper,
|
|
@@ -12,7 +14,6 @@ import {
|
|
|
12
14
|
CardLabel,
|
|
13
15
|
CTA,
|
|
14
16
|
CTAText,
|
|
15
|
-
CTATextUnderline,
|
|
16
17
|
ArrowIconOuter,
|
|
17
18
|
ArrowIconInner,
|
|
18
19
|
ArrowIconWrapper,
|
|
@@ -58,7 +59,7 @@ const CTACard = ({
|
|
|
58
59
|
{...(hasLink ? { href: link, target, rel: external } : {})}
|
|
59
60
|
$isCarousel={isCarousel}
|
|
60
61
|
$isSingleCard={isSingleCard}
|
|
61
|
-
$
|
|
62
|
+
$hasLink={hasLink}
|
|
62
63
|
>
|
|
63
64
|
{imageLow && (
|
|
64
65
|
<ImageWrapper $isSingleCard={isSingleCard}>
|
|
@@ -86,7 +87,7 @@ const CTACard = ({
|
|
|
86
87
|
<CTA>
|
|
87
88
|
<CTAText>
|
|
88
89
|
{linkLabel}
|
|
89
|
-
<
|
|
90
|
+
<CtaTextUnderline
|
|
90
91
|
src={altCtaUnderline}
|
|
91
92
|
alt=""
|
|
92
93
|
aria-hidden="true"
|
|
@@ -4,6 +4,7 @@ import { breakpointValues } from '../../../../theme/shared/allBreakpoints';
|
|
|
4
4
|
import fontHelper from '../../../../theme/crTheme/fontHelper';
|
|
5
5
|
import defaultBoxShadow from '../../../../theme/shared/boxShadows';
|
|
6
6
|
import { ArrowIconInner, ArrowIconOuter, ArrowIconWrapper } from '../../shared/ctaArrow/CtaArrowCircle.style';
|
|
7
|
+
import { CtaTextUnderline } from '../../shared/ctaText/ctaText.style';
|
|
7
8
|
|
|
8
9
|
const ImageWrapper = styled.div`
|
|
9
10
|
width: 100%;
|
|
@@ -54,25 +55,15 @@ const ImageWrapper = styled.div`
|
|
|
54
55
|
const CTAText = styled.span`
|
|
55
56
|
${({ theme }) => fontHelper(theme, 'span')}
|
|
56
57
|
color: ${({ theme }) => theme.color('red')};
|
|
57
|
-
|
|
58
|
-
@media (min-width: ${breakpointValues.L}px) {
|
|
59
|
-
color: ${({ theme }) => theme.color('grey_4')};
|
|
60
|
-
}
|
|
61
58
|
font-weight: bold;
|
|
62
59
|
text-decoration: none;
|
|
63
60
|
position: relative;
|
|
64
61
|
display: inline-block;
|
|
65
|
-
|
|
62
|
+
transition: color 0.35s;
|
|
66
63
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
position: absolute;
|
|
71
|
-
left: 0;
|
|
72
|
-
bottom: -5px;
|
|
73
|
-
transition: opacity 0.15s 0.1s;
|
|
74
|
-
opacity: 0;
|
|
75
|
-
pointer-events: none;
|
|
64
|
+
@media (min-width: ${breakpointValues.L}px) {
|
|
65
|
+
color: ${({ theme }) => theme.color('grey_4')};
|
|
66
|
+
}
|
|
76
67
|
`;
|
|
77
68
|
|
|
78
69
|
// Card wrapper link - makes entire card clickable
|
|
@@ -84,12 +75,18 @@ const CardLink = styled.a`
|
|
|
84
75
|
flex: 1 1 auto;
|
|
85
76
|
background: transparent;
|
|
86
77
|
border-radius: 1rem;
|
|
78
|
+
transition: box-shadow 0.35s;
|
|
87
79
|
${defaultBoxShadow()}
|
|
88
80
|
text-decoration: none;
|
|
89
81
|
overflow: hidden;
|
|
90
|
-
cursor: ${({ $
|
|
82
|
+
cursor: ${({ $hasLink }) => ($hasLink ? 'pointer' : 'default')};
|
|
91
83
|
box-sizing: border-box;
|
|
92
84
|
|
|
85
|
+
&:hover,
|
|
86
|
+
&:focus {
|
|
87
|
+
${defaultBoxShadow(true)}
|
|
88
|
+
}
|
|
89
|
+
|
|
93
90
|
// Side-by-side layout for single card desktop view
|
|
94
91
|
${({ $isSingleCard }) => $isSingleCard && css`
|
|
95
92
|
@media ${({ theme }) => theme.breakpoints2026('M')} {
|
|
@@ -104,39 +101,58 @@ const CardLink = styled.a`
|
|
|
104
101
|
}
|
|
105
102
|
`}
|
|
106
103
|
|
|
107
|
-
${({ $
|
|
108
|
-
img {
|
|
104
|
+
${({ $hasLink }) => $hasLink && css`
|
|
105
|
+
${ImageWrapper} img {
|
|
109
106
|
${imageZoom({ initialScale: 1 })}
|
|
110
107
|
}
|
|
111
108
|
|
|
112
|
-
// Desktop-only hover effects
|
|
113
109
|
@media ${({ theme }) => theme.allBreakpoints('M')} {
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
110
|
+
&:hover,
|
|
111
|
+
&:focus {
|
|
112
|
+
|
|
113
|
+
${CTAText} {
|
|
114
|
+
color: ${({ theme }) => theme.color('red')};
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
${CtaTextUnderline} {
|
|
118
|
+
opacity: 1;
|
|
119
|
+
}
|
|
117
120
|
|
|
118
|
-
|
|
119
|
-
|
|
121
|
+
${ArrowIconWrapper} {
|
|
122
|
+
@media (min-width: ${breakpointValues.L}px) {
|
|
123
|
+
background: ${({ theme }) => theme.color('red')};
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
${ArrowIconInner} {
|
|
127
|
+
transform: scale(1.2);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
120
132
|
|
|
133
|
+
// Desktop-only hover/focus effects
|
|
134
|
+
@media ${({ theme }) => theme.allBreakpoints('L')} {
|
|
135
|
+
|
|
136
|
+
${bounceUpAnimation(true, 10, 1)};
|
|
137
|
+
/* override the bounceUpAnimation transition, ensuring we don't lose the box-shadow animation */
|
|
138
|
+
transition: transform 0.35s cubic-bezier(0.68, -1.15, 0.265, 2.35), box-shadow 0.35s;
|
|
139
|
+
|
|
140
|
+
&:hover,
|
|
141
|
+
&:focus {
|
|
121
142
|
${ImageWrapper} img {
|
|
122
143
|
${imageZoom({ zoomed: true, finalScale: 1.06 })}
|
|
123
144
|
}
|
|
124
145
|
|
|
125
146
|
${CTAText} {
|
|
126
|
-
|
|
127
|
-
@media (min-width: ${breakpointValues.L}px) {
|
|
128
|
-
color: ${({ theme }) => theme.color('red')};
|
|
129
|
-
}
|
|
147
|
+
color: ${({ theme }) => theme.color('red')};
|
|
130
148
|
}
|
|
131
149
|
|
|
132
|
-
${
|
|
150
|
+
${CtaTextUnderline} {
|
|
133
151
|
opacity: 1;
|
|
134
152
|
}
|
|
135
153
|
|
|
136
154
|
${ArrowIconWrapper} {
|
|
137
|
-
|
|
138
|
-
background: ${({ theme }) => theme.color('red')};
|
|
139
|
-
}
|
|
155
|
+
background: ${({ theme }) => theme.color('red')};
|
|
140
156
|
|
|
141
157
|
${ArrowIconInner} {
|
|
142
158
|
transform: scale(1.2);
|
|
@@ -305,14 +321,13 @@ const CTA = styled.div`
|
|
|
305
321
|
|
|
306
322
|
export {
|
|
307
323
|
CardLink,
|
|
308
|
-
// CardsContainer,
|
|
309
324
|
ImageWrapper,
|
|
310
325
|
CopyAndLinkSection,
|
|
311
326
|
Copy,
|
|
312
327
|
CardLabel,
|
|
313
328
|
CTA,
|
|
314
329
|
CTAText,
|
|
315
|
-
|
|
330
|
+
CtaTextUnderline,
|
|
316
331
|
ArrowIconOuter,
|
|
317
332
|
ArrowIconInner,
|
|
318
333
|
ArrowIconWrapper,
|
|
@@ -61,17 +61,16 @@ const HeroBanner = ({
|
|
|
61
61
|
<CTAWrapper $variant={variant}>
|
|
62
62
|
{(variant !== variants.TEXT_BANNER) ? (
|
|
63
63
|
<>
|
|
64
|
-
<CtaText
|
|
64
|
+
<CtaText>
|
|
65
65
|
{ctaText}
|
|
66
66
|
<CtaTextUnderline
|
|
67
67
|
src={altCtaUnderline}
|
|
68
68
|
alt={ctaText}
|
|
69
|
-
className="cta-text-underline"
|
|
70
69
|
/>
|
|
71
70
|
</CtaText>
|
|
72
71
|
|
|
73
72
|
<CtaIconWrapper>
|
|
74
|
-
<ArrowIconWrapper
|
|
73
|
+
<ArrowIconWrapper>
|
|
75
74
|
<ArrowIconInner>
|
|
76
75
|
<ArrowIcon />
|
|
77
76
|
</ArrowIconInner>
|
|
@@ -4,6 +4,7 @@ import { bounceUpAnimation, playPauseReveal } from '../../../theme/shared/animat
|
|
|
4
4
|
import defaultBoxShadow from '../../../theme/shared/boxShadows';
|
|
5
5
|
import { ArrowIconWrapper, ArrowIconInner } from '../shared/ctaArrow/CtaArrowCircle.style';
|
|
6
6
|
import Picture from '../../Atoms/Picture/Picture';
|
|
7
|
+
import { CtaText, CtaTextUnderline } from '../shared/ctaText/ctaText.style';
|
|
7
8
|
|
|
8
9
|
// Lil helper function to streamline things somewhat:
|
|
9
10
|
const handleVariant = variant => {
|
|
@@ -85,12 +86,13 @@ const MediaWrapper = styled.div`
|
|
|
85
86
|
|
|
86
87
|
// Zoom the image in slightly by default so the 'bounce' animation doesn't cause issues
|
|
87
88
|
transform: scale(1.02);
|
|
88
|
-
transition: transform 0.
|
|
89
|
+
transition: transform 0.35s cubic-bezier(0.68, -1.15, 0.265, 2.35);
|
|
89
90
|
|
|
90
91
|
${({ $variant }) => ($variant === variants.HALF_HEIGHT && 'min-height: 450px;')};
|
|
91
92
|
}
|
|
92
93
|
|
|
93
|
-
&:has(+ div a:hover)
|
|
94
|
+
&:has(+ div a:hover),
|
|
95
|
+
&:has(+ div a:focus) {
|
|
94
96
|
> div > img {
|
|
95
97
|
transform: scale(1.04);
|
|
96
98
|
}
|
|
@@ -196,9 +198,14 @@ const CTAWrapper = styled.div`
|
|
|
196
198
|
${({ $variant }) => ($variant !== variants.TEXT_BANNER && css`
|
|
197
199
|
padding-right: 2.5rem;
|
|
198
200
|
|
|
199
|
-
|
|
201
|
+
${CtaText} {
|
|
200
202
|
font-weight: bold;
|
|
203
|
+
transition: color 0.35s;
|
|
201
204
|
color: ${({ theme }) => theme.color('red')};
|
|
205
|
+
|
|
206
|
+
@media ${({ theme }) => theme.breakpoints2026('L')} {
|
|
207
|
+
color: ${({ theme }) => theme.color('black')};
|
|
208
|
+
}
|
|
202
209
|
}
|
|
203
210
|
`)}
|
|
204
211
|
`;
|
|
@@ -212,10 +219,30 @@ const HeroBannerLink = styled.a`
|
|
|
212
219
|
${defaultBoxShadow()}
|
|
213
220
|
}
|
|
214
221
|
|
|
215
|
-
&:hover
|
|
222
|
+
&:hover,
|
|
223
|
+
&:focus {
|
|
216
224
|
> div {
|
|
217
225
|
${defaultBoxShadow(true)}
|
|
218
226
|
}
|
|
227
|
+
|
|
228
|
+
@media ${({ theme }) => theme.breakpoints2026('L')} {
|
|
229
|
+
${CtaText} {
|
|
230
|
+
color: ${({ theme }) => theme.color('red')};
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
@media ${({ theme }) => theme.allBreakpoints('M')} {
|
|
236
|
+
&:hover,
|
|
237
|
+
&:focus {
|
|
238
|
+
${CtaTextUnderline} {
|
|
239
|
+
opacity: 1;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
${ArrowIconWrapper} ${ArrowIconInner} {
|
|
243
|
+
transform: scale(1.2);
|
|
244
|
+
}
|
|
245
|
+
}
|
|
219
246
|
}
|
|
220
247
|
|
|
221
248
|
@media ${({ theme }) => theme.breakpoints2026('L')} {
|
|
@@ -229,18 +256,10 @@ const HeroBannerLink = styled.a`
|
|
|
229
256
|
width: 100%;
|
|
230
257
|
}
|
|
231
258
|
|
|
232
|
-
|
|
233
|
-
&:
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
@media ${({ theme }) => theme.allBreakpoints('M')} {
|
|
241
|
-
&:hover {
|
|
242
|
-
${ArrowIconWrapper} ${ArrowIconInner} {
|
|
243
|
-
transform: scale(1.2);
|
|
259
|
+
&:hover,
|
|
260
|
+
&:focus {
|
|
261
|
+
${ArrowIconWrapper} {
|
|
262
|
+
background: ${({ theme }) => theme.color('red')};
|
|
244
263
|
}
|
|
245
264
|
}
|
|
246
265
|
}
|
|
@@ -168,10 +168,11 @@ exports[`renders "Full Height Media" Hero Banner correctly 1`] = `
|
|
|
168
168
|
object-position: top center;
|
|
169
169
|
height: 100%;
|
|
170
170
|
transform: scale(1.02);
|
|
171
|
-
transition: transform 0.
|
|
171
|
+
transition: transform 0.35s cubic-bezier(0.68,-1.15,0.265,2.35);
|
|
172
172
|
}
|
|
173
173
|
|
|
174
|
-
.c2:has(+ div a:hover) >div>img
|
|
174
|
+
.c2:has(+ div a:hover) >div>img,
|
|
175
|
+
.c2:has(+ div a:focus) >div>img {
|
|
175
176
|
transform: scale(1.04);
|
|
176
177
|
}
|
|
177
178
|
}
|
|
@@ -441,11 +442,12 @@ exports[`renders "Half Height Media" Hero Banner correctly 1`] = `
|
|
|
441
442
|
object-position: top center;
|
|
442
443
|
height: 100%;
|
|
443
444
|
transform: scale(1.02);
|
|
444
|
-
transition: transform 0.
|
|
445
|
+
transition: transform 0.35s cubic-bezier(0.68,-1.15,0.265,2.35);
|
|
445
446
|
min-height: 450px;
|
|
446
447
|
}
|
|
447
448
|
|
|
448
|
-
.c2:has(+ div a:hover) >div>img
|
|
449
|
+
.c2:has(+ div a:hover) >div>img,
|
|
450
|
+
.c2:has(+ div a:focus) >div>img {
|
|
449
451
|
transform: scale(1.04);
|
|
450
452
|
}
|
|
451
453
|
}
|
|
@@ -960,10 +962,11 @@ exports[`renders "Text Banner" Hero Banner correctly 2`] = `
|
|
|
960
962
|
object-position: top center;
|
|
961
963
|
height: 100%;
|
|
962
964
|
transform: scale(1.02);
|
|
963
|
-
transition: transform 0.
|
|
965
|
+
transition: transform 0.35s cubic-bezier(0.68,-1.15,0.265,2.35);
|
|
964
966
|
}
|
|
965
967
|
|
|
966
|
-
.c2:has(+ div a:hover) >div>img
|
|
968
|
+
.c2:has(+ div a:hover) >div>img,
|
|
969
|
+
.c2:has(+ div a:focus) >div>img {
|
|
967
970
|
transform: scale(1.04);
|
|
968
971
|
}
|
|
969
972
|
}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import styled
|
|
2
|
-
import { breakpointValues } from '../../../../theme/shared/allBreakpoints';
|
|
1
|
+
import styled from 'styled-components';
|
|
3
2
|
|
|
4
3
|
const ArrowIconInner = styled.span`
|
|
5
4
|
display: inline-flex;
|
|
6
5
|
align-items: center;
|
|
7
6
|
justify-content: center;
|
|
8
|
-
transition: transform 0.
|
|
7
|
+
transition: transform 0.35s cubic-bezier(0.65, -0.19, 0.37, 1.16);
|
|
9
8
|
transform: scale(1);
|
|
10
9
|
transform-origin: center;
|
|
11
10
|
`;
|
|
@@ -16,11 +15,9 @@ const ArrowIconWrapper = styled.div`
|
|
|
16
15
|
border-radius: 50%;
|
|
17
16
|
background: ${({ theme }) => theme.color('red')};
|
|
18
17
|
|
|
19
|
-
${({
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
`}
|
|
18
|
+
@media ${({ theme }) => theme.breakpoints2026('L')} {
|
|
19
|
+
background: ${({ theme }) => theme.color('grey_4')};
|
|
20
|
+
}
|
|
24
21
|
|
|
25
22
|
display: flex;
|
|
26
23
|
align-items: center;
|
|
@@ -38,7 +38,7 @@ const StyledPopUp = styled.div`
|
|
|
38
38
|
overflow: hidden;
|
|
39
39
|
max-height: 350px;
|
|
40
40
|
opacity: 1;
|
|
41
|
-
animation: 0.
|
|
41
|
+
animation: 0.35s ${props => props.fadeOpen} ease;
|
|
42
42
|
${props => props.isClosed && css`
|
|
43
43
|
animation: ${closeDuration}s ${props.fadeClose} ease forwards;
|
|
44
44
|
`}
|
|
@@ -31,7 +31,7 @@ const pulseOut = keyframes`
|
|
|
31
31
|
`;
|
|
32
32
|
|
|
33
33
|
const pulseInAnimation = css`
|
|
34
|
-
animation: ${pulseIn} 0.
|
|
34
|
+
animation: ${pulseIn} 0.35s ease-in-out forwards;
|
|
35
35
|
`;
|
|
36
36
|
|
|
37
37
|
const pulseOutAnimation = css`
|
|
@@ -120,7 +120,9 @@ const imageZoom = (params = {}) => {
|
|
|
120
120
|
|
|
121
121
|
return !zoomed ? css`
|
|
122
122
|
transform: scale(${initialScale});
|
|
123
|
-
|
|
123
|
+
// Also including the box-shadow transform so we don't override it on breakpoints this
|
|
124
|
+
// transform is applied to (especially since we're generally using them together):
|
|
125
|
+
transition: transform 0.35s cubic-bezier(0.65, -0.19, 0.37, 1.16), box-shadow 0.35s;
|
|
124
126
|
` : css`
|
|
125
127
|
transform: scale(${finalScale});
|
|
126
128
|
`;
|