@comicrelief/component-library 8.26.0 → 8.28.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.
- package/dist/components/Atoms/Button/Button.test.js +62 -1
- package/dist/components/Atoms/ButtonWithStates/ButtonWithStates.js +4 -1
- package/dist/components/Atoms/Checkbox/Checkbox.js +1 -1
- package/dist/components/Atoms/Checkbox/Checkbox.test.js +160 -1
- package/dist/components/Atoms/Icons/Arrow.js +1 -1
- package/dist/components/Atoms/Icons/Chevron.js +1 -1
- package/dist/components/Atoms/Input/Input.js +3 -3
- package/dist/components/Atoms/Input/input.test.js +238 -2
- package/dist/components/Atoms/Label/Label.js +9 -1
- package/dist/components/Atoms/Link/Link.test.js +219 -4
- package/dist/components/Atoms/Logo/Logo.test.js +36 -1
- package/dist/components/Atoms/Pagination/Item/Item.js +1 -1
- package/dist/components/Atoms/Pagination/List/List.js +1 -1
- package/dist/components/Atoms/Pagination/Pagination.js +1 -1
- package/dist/components/Atoms/Pagination/Pagination.test.js +14 -14
- package/dist/components/Atoms/Picture/Picture.js +9 -2
- package/dist/components/Atoms/Picture/Picture.md +2 -1
- package/dist/components/Atoms/Picture/Picture.test.js +90 -2
- package/dist/components/Atoms/RadioButton/RadioButton.test.js +178 -1
- package/dist/components/Atoms/RichText/RichText.test.js +14 -1
- package/dist/components/Atoms/SocialIcons/Icon/Icon.js +2 -2
- package/dist/components/Atoms/SocialIcons/Utils/Links.js +3 -3
- package/dist/components/Atoms/Text/Text.js +3 -3
- package/dist/components/Atoms/TextArea/TextArea.test.js +90 -1
- package/dist/components/Atoms/TextInputWithDropdown/TextInputWithDropdown.js +3 -3
- package/dist/components/Molecules/ArticleTeaser/ArticleTeaser.js +1 -1
- package/dist/components/Molecules/ArticleTeaser/ArticleTeaser.test.js +479 -2
- package/dist/components/Molecules/Card/Card.style.js +1 -1
- package/dist/components/Molecules/Chip/Chip.test.js +104 -1
- package/dist/components/Molecules/Descriptor/Descriptor.js +1 -1
- package/dist/components/Molecules/Descriptor/Descriptor.test.js +216 -1
- package/dist/components/Molecules/DoubleCopy/DoubleCopy.test.js +55 -1
- package/dist/components/Molecules/PartnerLink/PartnerLink.test.js +148 -1
- package/dist/components/Molecules/Promo/_ProgressRing.js +5 -5
- package/dist/components/Molecules/SchoolLookup/SchoolLookup.js +1 -1
- package/dist/components/Molecules/SearchInput/SearchInput.test.js +190 -1
- package/dist/components/Molecules/SearchResult/SearchResult.js +1 -1
- package/dist/components/Molecules/ShareButton/ShareButton.js +3 -3
- package/dist/components/Molecules/ShareButton/ShareButton.test.js +112 -1
- package/dist/components/Molecules/SimpleSchoolLookup/SimpleSchoolLookup.js +1 -1
- package/dist/components/Molecules/SingleMessage/SingleMessage.js +4 -4
- package/dist/components/Molecules/SingleMessage/SingleMessage.style.js +2 -2
- package/dist/components/Molecules/SingleMessageDS/SingleMessageDs.js +1 -1
- package/dist/components/Molecules/SingleMessageDS/SingleMessageDs.style.js +8 -8
- package/dist/components/Molecules/VideoBanner/VideoBanner.test.js +18 -1
- package/dist/components/Organisms/CookieBanner/CookieBanner.test.js +181 -1
- package/dist/components/Organisms/Donate/Donate.js +1 -1
- package/dist/components/Organisms/Donate/Donate.style.js +3 -1
- package/dist/components/Organisms/Donate/Form/Form.js +8 -8
- package/dist/components/Organisms/Donate/GivingSelector/GivingSelector.js +4 -4
- package/dist/components/Organisms/Donate/MoneyBuy/MoneyBuy.js +1 -1
- package/dist/components/Organisms/Footer/Footer.js +1 -1
- package/dist/components/Organisms/Footer/Nav/Nav.js +1 -1
- package/dist/components/Organisms/Header/HeaderNav/HeaderNav.js +2 -2
- package/dist/components/Organisms/Header2025/HeaderNav2025/HeaderNav2025.js +1 -1
- package/dist/components/Organisms/Header2025/HeaderNav2025/HeaderNavItem2025.js +5 -5
- package/dist/components/Organisms/ImpactSlider/ImpactSlider.style.js +1 -1
- package/dist/components/Organisms/ImpactSlider/_ImpactMoneybuys.js +1 -1
- package/dist/components/Organisms/ImpactSlider/_utils.js +2 -2
- package/dist/components/Organisms/MarketingPreferencesDS/_MarketingPreferencesDS.js +5 -5
- package/dist/components/Organisms/MarketingPreferencesDS/_OptInCheckbox.js +3 -3
- package/dist/components/Organisms/Membership/Form/Form.js +5 -5
- package/dist/components/Organisms/Membership/Membership.style.js +1 -1
- package/dist/components/Organisms/Membership/Membership.test.js +633 -1
- package/dist/components/Organisms/Membership/MoneyBox/MoneyBox.js +1 -1
- package/dist/components/Organisms/RichtextCarousel/RichtextCarousel.test.js +208 -1
- package/dist/components/Organisms/WYMDCarousel/WYMDCarousel.test.js +341 -1
- package/dist/components/Organisms/WYMDCarousel/_utils.js +1 -1
- package/dist/theme/crTheme/colors.js +0 -8
- package/dist/theme/crTheme/linkStyles.js +4 -4
- package/dist/theme/shared/allBreakpoints.js +1 -1
- package/dist/theme/shared/fontFamilies.js +1 -1
- package/dist/utils/Membership.js +2 -2
- package/dist/utils/ShareButton/sharePopUpHelper.js +1 -1
- package/dist/utils/ShareButton/shareUrlHelper.js +2 -2
- package/dist/utils/internalLinkHelper.js +1 -1
- package/package.json +1 -1
- package/src/components/Atoms/Picture/Picture.md +2 -1
- package/src/theme/crTheme/colors.js +0 -8
|
@@ -12,5 +12,212 @@ it("renders correctly", () => {
|
|
|
12
12
|
const tree = (0, _shallowWithTheme.default)( /*#__PURE__*/_react.default.createElement(_RichtextCarousel.default, {
|
|
13
13
|
data: RichtextCarouselItems
|
|
14
14
|
})).toJSON();
|
|
15
|
-
expect(tree).toMatchInlineSnapshot(
|
|
15
|
+
expect(tree).toMatchInlineSnapshot(`
|
|
16
|
+
.c1 {
|
|
17
|
+
text-align: center;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.c0 {
|
|
21
|
+
height: 100%;
|
|
22
|
+
background: #FFFFFF;
|
|
23
|
+
max-width: 760px;
|
|
24
|
+
padding: 2.5rem 2rem 3.5rem;
|
|
25
|
+
margin: 0 auto;
|
|
26
|
+
border-radius: 20px;
|
|
27
|
+
box-shadow: 0px 0px 20px rgba(0,0,0,0.15);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.c0 .carousel {
|
|
31
|
+
position: relative;
|
|
32
|
+
margin: 0 auto;
|
|
33
|
+
padding-top: 2rem;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.c0 .carousel button.carousel__back-button,
|
|
37
|
+
.c0 .carousel button.carousel__next-button {
|
|
38
|
+
position: absolute;
|
|
39
|
+
left: 0;
|
|
40
|
+
top: 0;
|
|
41
|
+
width: 33% !important;
|
|
42
|
+
height: 100%;
|
|
43
|
+
padding: 0 !important;
|
|
44
|
+
box-shadow: none;
|
|
45
|
+
text-indent: -9999px;
|
|
46
|
+
background-color: transparent;
|
|
47
|
+
border: none;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.c0 .carousel button.carousel__back-button:after,
|
|
51
|
+
.c0 .carousel button.carousel__next-button:after {
|
|
52
|
+
content: "";
|
|
53
|
+
position: absolute;
|
|
54
|
+
top: 0;
|
|
55
|
+
left: 0;
|
|
56
|
+
width: 50%;
|
|
57
|
+
height: 100%;
|
|
58
|
+
-webkit-transition: opacity 0.2s linear;
|
|
59
|
+
transition: opacity 0.2s linear;
|
|
60
|
+
background: linear-gradient(90deg,#FFFFFF,#FFFFFF7a,#FFFFFF00);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.c0 .carousel button.carousel__back-button:hover:after,
|
|
64
|
+
.c0 .carousel button.carousel__next-button:hover:after {
|
|
65
|
+
opacity: 0.5;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.c0 .carousel button.carousel__next-button {
|
|
69
|
+
left: auto;
|
|
70
|
+
right: 0;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.c0 .carousel button.carousel__next-button:before {
|
|
74
|
+
-webkit-transform: translate(0,-50%) rotate(-90deg);
|
|
75
|
+
-ms-transform: translate(0,-50%) rotate(-90deg);
|
|
76
|
+
transform: translate(0,-50%) rotate(-90deg);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.c0 .carousel button.carousel__next-button:after {
|
|
80
|
+
left: auto;
|
|
81
|
+
right: 0;
|
|
82
|
+
background: linear-gradient(90deg,#FFFFFF00,#FFFFFF7a,#FFFFFF);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.c0 .carousel .richtext-carousel {
|
|
86
|
+
-webkit-transition: -webkit-transform 0.75s;
|
|
87
|
+
-webkit-transition: -webkit-transform 0.75s;
|
|
88
|
+
transition: -webkit-transform 0.75s;
|
|
89
|
+
-o-transition: transform 0.75s;
|
|
90
|
+
-webkit-transition: -webkit-transform 0.75s;
|
|
91
|
+
-webkit-transition: transform 0.75s;
|
|
92
|
+
transition: transform 0.75s;
|
|
93
|
+
-webkit-transform: 0.75s;
|
|
94
|
+
will-change: transform;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.c0 .carousel .richtext-carousel .last-slide .slide-copy-wrapper:after {
|
|
98
|
+
content: none;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.c0 .carousel .richtext-carousel .carousel__slide {
|
|
102
|
+
padding-bottom: 300px !important;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.c0 .carousel .richtext-carousel .carousel__slide .carousel__inner-slide {
|
|
106
|
+
text-align: center;
|
|
107
|
+
display: -webkit-inline-box;
|
|
108
|
+
display: -webkit-inline-flex;
|
|
109
|
+
display: -ms-inline-flexbox;
|
|
110
|
+
display: inline-flex;
|
|
111
|
+
-webkit-align-items: center;
|
|
112
|
+
-webkit-box-align: center;
|
|
113
|
+
-ms-flex-align: center;
|
|
114
|
+
align-items: center;
|
|
115
|
+
-webkit-box-pack: start;
|
|
116
|
+
-webkit-justify-content: flex-start;
|
|
117
|
+
-ms-flex-pack: start;
|
|
118
|
+
justify-content: flex-start;
|
|
119
|
+
-webkit-flex-direction: column;
|
|
120
|
+
-ms-flex-direction: column;
|
|
121
|
+
flex-direction: column;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
@media (min-width:740px) {
|
|
125
|
+
.c0 .carousel button.carousel__back-button,
|
|
126
|
+
.c0 .carousel button.carousel__next-button {
|
|
127
|
+
width: 33.3% !important;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.c0 .carousel button.carousel__back-button:after,
|
|
131
|
+
.c0 .carousel button.carousel__next-button:after {
|
|
132
|
+
width: 100%;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
@media (min-width:740px) {
|
|
137
|
+
.c0 .carousel .richtext-carousel .carousel__slide {
|
|
138
|
+
padding-bottom: 350px !important;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.c0 .carousel .richtext-carousel .carousel__slide .carousel__inner-slide > div:first-child {
|
|
142
|
+
-webkit-transition: -webkit-transform 0.75s ease;
|
|
143
|
+
-webkit-transition: transform 0.75s ease;
|
|
144
|
+
transition: transform 0.75s ease;
|
|
145
|
+
-webkit-transform-origin: center;
|
|
146
|
+
-ms-transform-origin: center;
|
|
147
|
+
transform-origin: center;
|
|
148
|
+
-webkit-transform: scale(0.8);
|
|
149
|
+
-ms-transform: scale(0.8);
|
|
150
|
+
transform: scale(0.8);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.c0 .carousel .richtext-carousel .carousel__slide .carousel__inner-slide > div:first-child:after {
|
|
154
|
+
-webkit-transition: -webkit-transform 0.75s ease,width 0.75s ease,right 0.75s ease;
|
|
155
|
+
-webkit-transition: transform 0.75s ease,width 0.75s ease,right 0.75s ease;
|
|
156
|
+
transition: transform 0.75s ease,width 0.75s ease,right 0.75s ease;
|
|
157
|
+
width: 100%;
|
|
158
|
+
right: calc(-100% - 6px);
|
|
159
|
+
-webkit-transform: scale(1);
|
|
160
|
+
-ms-transform: scale(1);
|
|
161
|
+
transform: scale(1);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.c0 .carousel .richtext-carousel .carousel__slide.carousel__slide--visible .carousel__inner-slide > div:first-child:after {
|
|
165
|
+
width: 33%;
|
|
166
|
+
right: calc(-33% - 3px);
|
|
167
|
+
-webkit-transform: scale(1);
|
|
168
|
+
-ms-transform: scale(1);
|
|
169
|
+
transform: scale(1);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.c0 .carousel .richtext-carousel .carousel__slide.carousel__slide--visible + .carousel__slide--visible .carousel__inner-slide > div:first-child {
|
|
173
|
+
-webkit-transform: scale(1);
|
|
174
|
+
-ms-transform: scale(1);
|
|
175
|
+
transform: scale(1);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.c0 .carousel .richtext-carousel .carousel__slide.carousel__slide--visible + .carousel__slide--visible .carousel__inner-slide > div:first-child:after {
|
|
179
|
+
width: 33%;
|
|
180
|
+
right: calc(-33% + 3px);
|
|
181
|
+
-webkit-transform: scale(0.8);
|
|
182
|
+
-ms-transform: scale(0.8);
|
|
183
|
+
transform: scale(0.8);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.c0 .carousel .richtext-carousel .carousel__slide.carousel__slide--visible + .carousel__slide--visible + .carousel__slide--visible > div > div:first-child {
|
|
187
|
+
-webkit-transform: scale(0.8);
|
|
188
|
+
-ms-transform: scale(0.8);
|
|
189
|
+
transform: scale(0.8);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.c0 .carousel .richtext-carousel .carousel__slide.carousel__slide--visible + .carousel__slide--visible + .carousel__slide--visible > div > div:first-child:after {
|
|
193
|
+
width: 50%;
|
|
194
|
+
right: calc(-50% - 6px);
|
|
195
|
+
-webkit-transform: scale(1);
|
|
196
|
+
-ms-transform: scale(1);
|
|
197
|
+
transform: scale(1);
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
@media (min-width:1024px) {
|
|
202
|
+
.c0 .carousel .richtext-carousel .carousel__slide {
|
|
203
|
+
padding-bottom: 350px !important;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.c0 .carousel .richtext-carousel .carousel__slide.carousel__slide--visible + .carousel__slide--visible + .carousel__slide--visible .carousel__inner-slide > div:first-child:after {
|
|
207
|
+
right: calc(-125% - 5px);
|
|
208
|
+
width: 125%;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
<div
|
|
213
|
+
className="c0 CarouselWrapper"
|
|
214
|
+
id="nqIEHjiYE8Yd2A2a5cI3O"
|
|
215
|
+
>
|
|
216
|
+
<div
|
|
217
|
+
className="c1"
|
|
218
|
+
>
|
|
219
|
+
Some heading copy that will be nicely constructed in-situ
|
|
220
|
+
</div>
|
|
221
|
+
</div>
|
|
222
|
+
`);
|
|
16
223
|
});
|
|
@@ -12,5 +12,345 @@ it("renders correctly", () => {
|
|
|
12
12
|
const tree = (0, _shallowWithTheme.default)( /*#__PURE__*/_react.default.createElement(_WYMDCarousel.default, {
|
|
13
13
|
data: carouselItemsComplete
|
|
14
14
|
})).toJSON();
|
|
15
|
-
expect(tree).toMatchInlineSnapshot("\n .c1 {\n font-size: 1rem;\n line-height: 1rem;\n text-transform: inherit;\n font-weight: bold;\n line-height: normal;\n font-family: 'Montserrat',Helvetica,Arial,sans-serif;\n }\n\n .c3 {\n color: #E52630;\n font-size: 1rem;\n line-height: 1rem;\n text-transform: uppercase;\n font-weight: normal;\n font-family: 'Anton',Impact,sans-serif;\n -webkit-letter-spacing: 0.03rem;\n -moz-letter-spacing: 0.03rem;\n -ms-letter-spacing: 0.03rem;\n letter-spacing: 0.03rem;\n }\n\n .c5 {\n font-size: 1rem;\n line-height: 1rem;\n text-transform: inherit;\n line-height: normal;\n font-family: 'Montserrat',Helvetica,Arial,sans-serif;\n }\n\n .c2 {\n width: 75%;\n margin: 0 auto;\n }\n\n .c2:first-child {\n margin-bottom: 2rem;\n text-align: center;\n font-size: 16px;\n line-height: 19.5px;\n }\n\n .c4 {\n margin-bottom: 2rem;\n text-align: center;\n font-size: 34px;\n line-height: 37px;\n }\n\n .c6 {\n margin-bottom: 0;\n text-align: center;\n font-size: 12px;\n line-height: 14.63px;\n }\n\n .c0 {\n height: 100%;\n background-color: #FFFFFF;\n max-width: 760px;\n padding: 2rem;\n margin: 0 auto;\n border-radius: 20px;\n box-shadow: 0px 0px 20px rgba(0,0,0,0.15);\n }\n\n .c0 .carousel {\n position: relative;\n margin: 0 auto;\n padding-top: 2rem;\n }\n\n .c0 .carousel button.carousel__back-button,\n .c0 .carousel button.carousel__next-button {\n position: absolute;\n left: 0;\n top: 0;\n width: 33% !important;\n height: 100%;\n padding: 0 !important;\n box-shadow: none;\n text-indent: -9999px;\n background-color: transparent;\n border: none;\n }\n\n .c0 .carousel button.carousel__back-button:after,\n .c0 .carousel button.carousel__next-button:after {\n content: \"\";\n position: absolute;\n top: 0;\n left: 0;\n width: 50%;\n height: 100%;\n -webkit-transition: opacity 0.2s linear;\n transition: opacity 0.2s linear;\n background: linear-gradient(90deg,rgba(255,255,255,1),rgba(255,255,255,0.5),rgba(255,255,255,0));\n }\n\n .c0 .carousel button.carousel__back-button:hover:after,\n .c0 .carousel button.carousel__next-button:hover:after {\n opacity: 0.5;\n }\n\n .c0 .carousel button.carousel__next-button {\n left: auto;\n right: 0;\n }\n\n .c0 .carousel button.carousel__next-button:before {\n -webkit-transform: translate(0,-50%) rotate(-90deg);\n -ms-transform: translate(0,-50%) rotate(-90deg);\n transform: translate(0,-50%) rotate(-90deg);\n }\n\n .c0 .carousel button.carousel__next-button:after {\n left: auto;\n right: 0;\n background: linear-gradient(270deg,rgba(255,255,255,1),rgba(255,255,255,0.5),rgba(255,255,255,0));\n }\n\n .c0 .carousel .wymd-carousel {\n -webkit-transition: -webkit-transform 0.75s;\n -webkit-transition: -webkit-transform 0.75s;\n transition: -webkit-transform 0.75s;\n -o-transition: transform 0.75s;\n -webkit-transition: -webkit-transform 0.75s;\n -webkit-transition: transform 0.75s;\n transition: transform 0.75s;\n -webkit-transform: 0.75s;\n will-change: transform;\n }\n\n .c0 .carousel .wymd-carousel .last-slide .image-wrapper:after {\n content: none;\n }\n\n .c0 .carousel .wymd-carousel .carousel__slide {\n padding-bottom: 425px !important;\n }\n\n .c0 .carousel .wymd-carousel .carousel__slide .carousel__inner-slide {\n text-align: center;\n display: -webkit-inline-box;\n display: -webkit-inline-flex;\n display: -ms-inline-flexbox;\n display: inline-flex;\n -webkit-align-items: center;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: start;\n -webkit-justify-content: flex-start;\n -ms-flex-pack: start;\n justify-content: flex-start;\n -webkit-flex-direction: column;\n -ms-flex-direction: column;\n flex-direction: column;\n }\n\n @media (min-width:1024px) {\n .c2:first-child {\n font-size: 20px;\n line-height: 24.38px;\n }\n }\n\n @media (min-width:740px) {\n .c4 {\n font-size: 60px;\n line-height: 60px;\n }\n }\n\n @media (min-width:1024px) {\n .c4 {\n font-size: 64px;\n line-height: 68px;\n }\n }\n\n @media (min-width:740px) {\n .c6 {\n font-size: 17px;\n line-height: 19px;\n }\n }\n\n @media (min-width:1024px) {\n .c0 .carousel {\n padding-top: 2rem;\n }\n }\n\n @media (min-width:740px) {\n .c0 .carousel button.carousel__back-button,\n .c0 .carousel button.carousel__next-button {\n width: 33.3% !important;\n }\n\n .c0 .carousel button.carousel__back-button:after,\n .c0 .carousel button.carousel__next-button:after {\n width: 100%;\n }\n }\n\n @media (min-width:740px) {\n .c0 .carousel .wymd-carousel .carousel__slide {\n padding-bottom: 450px !important;\n }\n\n .c0 .carousel .wymd-carousel .carousel__slide .carousel__inner-slide > div:first-child {\n -webkit-transition: -webkit-transform 0.75s ease;\n -webkit-transition: transform 0.75s ease;\n transition: transform 0.75s ease;\n -webkit-transform: scale(0.5);\n -ms-transform: scale(0.5);\n transform: scale(0.5);\n }\n\n .c0 .carousel .wymd-carousel .carousel__slide .carousel__inner-slide > div:first-child:after {\n -webkit-transition: -webkit-transform 0.75s ease,width 0.75s ease,right 0.75s ease;\n -webkit-transition: transform 0.75s ease,width 0.75s ease,right 0.75s ease;\n transition: transform 0.75s ease,width 0.75s ease,right 0.75s ease;\n right: calc(-300% - 6px);\n -webkit-transform: scale(1);\n -ms-transform: scale(1);\n transform: scale(1);\n width: 300%;\n }\n\n .c0 .carousel .wymd-carousel .carousel__slide .carousel__inner-slide .all-text-wrapper {\n -webkit-transition: -webkit-transform 0.75s ease;\n -webkit-transition: transform 0.75s ease;\n transition: transform 0.75s ease;\n -webkit-transform-origin: top;\n -ms-transform-origin: top;\n transform-origin: top;\n -webkit-transform: translateY(calc(-45px + 5%)) scale(0.5);\n -ms-transform: translateY(calc(-45px + 5%)) scale(0.5);\n transform: translateY(calc(-45px + 5%)) scale(0.5);\n }\n\n .c0 .carousel .wymd-carousel .carousel__slide.carousel__slide--visible .carousel__inner-slide > div:first-child:after {\n right: calc(-300% - 6px);\n -webkit-transform: scale(1);\n -ms-transform: scale(1);\n transform: scale(1);\n width: 300%;\n }\n\n .c0 .carousel .wymd-carousel .carousel__slide.carousel__slide--visible + .carousel__slide--visible .carousel__inner-slide > div:first-child {\n -webkit-transform: scale(1);\n -ms-transform: scale(1);\n transform: scale(1);\n }\n\n .c0 .carousel .wymd-carousel .carousel__slide.carousel__slide--visible + .carousel__slide--visible .carousel__inner-slide > div:first-child:after {\n right: calc(-222% - 6px);\n -webkit-transform: scale(0.5);\n -ms-transform: scale(0.5);\n transform: scale(0.5);\n width: 300%;\n }\n\n .c0 .carousel .wymd-carousel .carousel__slide.carousel__slide--visible + .carousel__slide--visible .all-text-wrapper {\n -webkit-transform: translateY(0) scale(1);\n -ms-transform: translateY(0) scale(1);\n transform: translateY(0) scale(1);\n }\n\n .c0 .carousel .wymd-carousel .carousel__slide.carousel__slide--visible + .carousel__slide--visible + .carousel__slide--visible > div > div:first-child {\n -webkit-transform: scale(0.5);\n -ms-transform: scale(0.5);\n transform: scale(0.5);\n }\n\n .c0 .carousel .wymd-carousel .carousel__slide.carousel__slide--visible + .carousel__slide--visible + .carousel__slide--visible > div > div:first-child:after {\n right: calc(-300% - 6px);\n -webkit-transform: scale(1);\n -ms-transform: scale(1);\n transform: scale(1);\n width: 300%;\n }\n\n .c0 .carousel .wymd-carousel .carousel__slide.carousel__slide--visible + .carousel__slide--visible + .carousel__slide--visible .all-text-wrapper {\n -webkit-transform: translateY(calc(-45px + 5%)) scale(0.5);\n -ms-transform: translateY(calc(-45px + 5%)) scale(0.5);\n transform: translateY(calc(-45px + 5%)) scale(0.5);\n }\n }\n\n @media (min-width:1024px) {\n .c0 .carousel .wymd-carousel .carousel__slide {\n padding-bottom: 475px !important;\n }\n\n .c0 .carousel .wymd-carousel .carousel__slide.carousel__slide--visible .carousel__inner-slide > div:first-child:after {\n right: calc(-250% - 6px);\n width: 250%;\n }\n\n .c0 .carousel .wymd-carousel .carousel__slide.carousel__slide--visible + .carousel__slide--visible .carousel__inner-slide > div:first-child:after {\n right: calc(-187% - 6px);\n width: 250%;\n }\n\n .c0 .carousel .wymd-carousel .carousel__slide.carousel__slide--visible + .carousel__slide--visible + .carousel__slide--visible .carousel__inner-slide > div:first-child:after {\n right: calc(-250% - 6px);\n width: 250%;\n }\n }\n\n <div\n className=\"c0 CarouselWrapper\"\n id=\"7zdR84QkZwrTh9NWx2H926\"\n >\n <p\n className=\"c1 c2\"\n color=\"inherit\"\n size=\"s\"\n >\n Over the past two years, we\u2019ve supported\n </p>\n <h1\n className=\"c3 c4\"\n color=\"red\"\n size=\"s\"\n >\n 11.7 million people\n </h1>\n <p\n className=\"c5 c6\"\n color=\"inherit\"\n size=\"s\"\n >\n including...\n </p>\n </div>\n ");
|
|
15
|
+
expect(tree).toMatchInlineSnapshot(`
|
|
16
|
+
.c1 {
|
|
17
|
+
font-size: 1rem;
|
|
18
|
+
line-height: 1rem;
|
|
19
|
+
text-transform: inherit;
|
|
20
|
+
font-weight: bold;
|
|
21
|
+
line-height: normal;
|
|
22
|
+
font-family: 'Montserrat',Helvetica,Arial,sans-serif;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.c3 {
|
|
26
|
+
color: #E52630;
|
|
27
|
+
font-size: 1rem;
|
|
28
|
+
line-height: 1rem;
|
|
29
|
+
text-transform: uppercase;
|
|
30
|
+
font-weight: normal;
|
|
31
|
+
font-family: 'Anton',Impact,sans-serif;
|
|
32
|
+
-webkit-letter-spacing: 0.03rem;
|
|
33
|
+
-moz-letter-spacing: 0.03rem;
|
|
34
|
+
-ms-letter-spacing: 0.03rem;
|
|
35
|
+
letter-spacing: 0.03rem;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.c5 {
|
|
39
|
+
font-size: 1rem;
|
|
40
|
+
line-height: 1rem;
|
|
41
|
+
text-transform: inherit;
|
|
42
|
+
line-height: normal;
|
|
43
|
+
font-family: 'Montserrat',Helvetica,Arial,sans-serif;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.c2 {
|
|
47
|
+
width: 75%;
|
|
48
|
+
margin: 0 auto;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.c2:first-child {
|
|
52
|
+
margin-bottom: 2rem;
|
|
53
|
+
text-align: center;
|
|
54
|
+
font-size: 16px;
|
|
55
|
+
line-height: 19.5px;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.c4 {
|
|
59
|
+
margin-bottom: 2rem;
|
|
60
|
+
text-align: center;
|
|
61
|
+
font-size: 34px;
|
|
62
|
+
line-height: 37px;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.c6 {
|
|
66
|
+
margin-bottom: 0;
|
|
67
|
+
text-align: center;
|
|
68
|
+
font-size: 12px;
|
|
69
|
+
line-height: 14.63px;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.c0 {
|
|
73
|
+
height: 100%;
|
|
74
|
+
background-color: #FFFFFF;
|
|
75
|
+
max-width: 760px;
|
|
76
|
+
padding: 2rem;
|
|
77
|
+
margin: 0 auto;
|
|
78
|
+
border-radius: 20px;
|
|
79
|
+
box-shadow: 0px 0px 20px rgba(0,0,0,0.15);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.c0 .carousel {
|
|
83
|
+
position: relative;
|
|
84
|
+
margin: 0 auto;
|
|
85
|
+
padding-top: 2rem;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.c0 .carousel button.carousel__back-button,
|
|
89
|
+
.c0 .carousel button.carousel__next-button {
|
|
90
|
+
position: absolute;
|
|
91
|
+
left: 0;
|
|
92
|
+
top: 0;
|
|
93
|
+
width: 33% !important;
|
|
94
|
+
height: 100%;
|
|
95
|
+
padding: 0 !important;
|
|
96
|
+
box-shadow: none;
|
|
97
|
+
text-indent: -9999px;
|
|
98
|
+
background-color: transparent;
|
|
99
|
+
border: none;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.c0 .carousel button.carousel__back-button:after,
|
|
103
|
+
.c0 .carousel button.carousel__next-button:after {
|
|
104
|
+
content: "";
|
|
105
|
+
position: absolute;
|
|
106
|
+
top: 0;
|
|
107
|
+
left: 0;
|
|
108
|
+
width: 50%;
|
|
109
|
+
height: 100%;
|
|
110
|
+
-webkit-transition: opacity 0.2s linear;
|
|
111
|
+
transition: opacity 0.2s linear;
|
|
112
|
+
background: linear-gradient(90deg,rgba(255,255,255,1),rgba(255,255,255,0.5),rgba(255,255,255,0));
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.c0 .carousel button.carousel__back-button:hover:after,
|
|
116
|
+
.c0 .carousel button.carousel__next-button:hover:after {
|
|
117
|
+
opacity: 0.5;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.c0 .carousel button.carousel__next-button {
|
|
121
|
+
left: auto;
|
|
122
|
+
right: 0;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.c0 .carousel button.carousel__next-button:before {
|
|
126
|
+
-webkit-transform: translate(0,-50%) rotate(-90deg);
|
|
127
|
+
-ms-transform: translate(0,-50%) rotate(-90deg);
|
|
128
|
+
transform: translate(0,-50%) rotate(-90deg);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.c0 .carousel button.carousel__next-button:after {
|
|
132
|
+
left: auto;
|
|
133
|
+
right: 0;
|
|
134
|
+
background: linear-gradient(270deg,rgba(255,255,255,1),rgba(255,255,255,0.5),rgba(255,255,255,0));
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.c0 .carousel .wymd-carousel {
|
|
138
|
+
-webkit-transition: -webkit-transform 0.75s;
|
|
139
|
+
-webkit-transition: -webkit-transform 0.75s;
|
|
140
|
+
transition: -webkit-transform 0.75s;
|
|
141
|
+
-o-transition: transform 0.75s;
|
|
142
|
+
-webkit-transition: -webkit-transform 0.75s;
|
|
143
|
+
-webkit-transition: transform 0.75s;
|
|
144
|
+
transition: transform 0.75s;
|
|
145
|
+
-webkit-transform: 0.75s;
|
|
146
|
+
will-change: transform;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.c0 .carousel .wymd-carousel .last-slide .image-wrapper:after {
|
|
150
|
+
content: none;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.c0 .carousel .wymd-carousel .carousel__slide {
|
|
154
|
+
padding-bottom: 425px !important;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.c0 .carousel .wymd-carousel .carousel__slide .carousel__inner-slide {
|
|
158
|
+
text-align: center;
|
|
159
|
+
display: -webkit-inline-box;
|
|
160
|
+
display: -webkit-inline-flex;
|
|
161
|
+
display: -ms-inline-flexbox;
|
|
162
|
+
display: inline-flex;
|
|
163
|
+
-webkit-align-items: center;
|
|
164
|
+
-webkit-box-align: center;
|
|
165
|
+
-ms-flex-align: center;
|
|
166
|
+
align-items: center;
|
|
167
|
+
-webkit-box-pack: start;
|
|
168
|
+
-webkit-justify-content: flex-start;
|
|
169
|
+
-ms-flex-pack: start;
|
|
170
|
+
justify-content: flex-start;
|
|
171
|
+
-webkit-flex-direction: column;
|
|
172
|
+
-ms-flex-direction: column;
|
|
173
|
+
flex-direction: column;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
@media (min-width:1024px) {
|
|
177
|
+
.c2:first-child {
|
|
178
|
+
font-size: 20px;
|
|
179
|
+
line-height: 24.38px;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
@media (min-width:740px) {
|
|
184
|
+
.c4 {
|
|
185
|
+
font-size: 60px;
|
|
186
|
+
line-height: 60px;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
@media (min-width:1024px) {
|
|
191
|
+
.c4 {
|
|
192
|
+
font-size: 64px;
|
|
193
|
+
line-height: 68px;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
@media (min-width:740px) {
|
|
198
|
+
.c6 {
|
|
199
|
+
font-size: 17px;
|
|
200
|
+
line-height: 19px;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
@media (min-width:1024px) {
|
|
205
|
+
.c0 .carousel {
|
|
206
|
+
padding-top: 2rem;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
@media (min-width:740px) {
|
|
211
|
+
.c0 .carousel button.carousel__back-button,
|
|
212
|
+
.c0 .carousel button.carousel__next-button {
|
|
213
|
+
width: 33.3% !important;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.c0 .carousel button.carousel__back-button:after,
|
|
217
|
+
.c0 .carousel button.carousel__next-button:after {
|
|
218
|
+
width: 100%;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
@media (min-width:740px) {
|
|
223
|
+
.c0 .carousel .wymd-carousel .carousel__slide {
|
|
224
|
+
padding-bottom: 450px !important;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.c0 .carousel .wymd-carousel .carousel__slide .carousel__inner-slide > div:first-child {
|
|
228
|
+
-webkit-transition: -webkit-transform 0.75s ease;
|
|
229
|
+
-webkit-transition: transform 0.75s ease;
|
|
230
|
+
transition: transform 0.75s ease;
|
|
231
|
+
-webkit-transform: scale(0.5);
|
|
232
|
+
-ms-transform: scale(0.5);
|
|
233
|
+
transform: scale(0.5);
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
.c0 .carousel .wymd-carousel .carousel__slide .carousel__inner-slide > div:first-child:after {
|
|
237
|
+
-webkit-transition: -webkit-transform 0.75s ease,width 0.75s ease,right 0.75s ease;
|
|
238
|
+
-webkit-transition: transform 0.75s ease,width 0.75s ease,right 0.75s ease;
|
|
239
|
+
transition: transform 0.75s ease,width 0.75s ease,right 0.75s ease;
|
|
240
|
+
right: calc(-300% - 6px);
|
|
241
|
+
-webkit-transform: scale(1);
|
|
242
|
+
-ms-transform: scale(1);
|
|
243
|
+
transform: scale(1);
|
|
244
|
+
width: 300%;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.c0 .carousel .wymd-carousel .carousel__slide .carousel__inner-slide .all-text-wrapper {
|
|
248
|
+
-webkit-transition: -webkit-transform 0.75s ease;
|
|
249
|
+
-webkit-transition: transform 0.75s ease;
|
|
250
|
+
transition: transform 0.75s ease;
|
|
251
|
+
-webkit-transform-origin: top;
|
|
252
|
+
-ms-transform-origin: top;
|
|
253
|
+
transform-origin: top;
|
|
254
|
+
-webkit-transform: translateY(calc(-45px + 5%)) scale(0.5);
|
|
255
|
+
-ms-transform: translateY(calc(-45px + 5%)) scale(0.5);
|
|
256
|
+
transform: translateY(calc(-45px + 5%)) scale(0.5);
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
.c0 .carousel .wymd-carousel .carousel__slide.carousel__slide--visible .carousel__inner-slide > div:first-child:after {
|
|
260
|
+
right: calc(-300% - 6px);
|
|
261
|
+
-webkit-transform: scale(1);
|
|
262
|
+
-ms-transform: scale(1);
|
|
263
|
+
transform: scale(1);
|
|
264
|
+
width: 300%;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
.c0 .carousel .wymd-carousel .carousel__slide.carousel__slide--visible + .carousel__slide--visible .carousel__inner-slide > div:first-child {
|
|
268
|
+
-webkit-transform: scale(1);
|
|
269
|
+
-ms-transform: scale(1);
|
|
270
|
+
transform: scale(1);
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
.c0 .carousel .wymd-carousel .carousel__slide.carousel__slide--visible + .carousel__slide--visible .carousel__inner-slide > div:first-child:after {
|
|
274
|
+
right: calc(-222% - 6px);
|
|
275
|
+
-webkit-transform: scale(0.5);
|
|
276
|
+
-ms-transform: scale(0.5);
|
|
277
|
+
transform: scale(0.5);
|
|
278
|
+
width: 300%;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
.c0 .carousel .wymd-carousel .carousel__slide.carousel__slide--visible + .carousel__slide--visible .all-text-wrapper {
|
|
282
|
+
-webkit-transform: translateY(0) scale(1);
|
|
283
|
+
-ms-transform: translateY(0) scale(1);
|
|
284
|
+
transform: translateY(0) scale(1);
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
.c0 .carousel .wymd-carousel .carousel__slide.carousel__slide--visible + .carousel__slide--visible + .carousel__slide--visible > div > div:first-child {
|
|
288
|
+
-webkit-transform: scale(0.5);
|
|
289
|
+
-ms-transform: scale(0.5);
|
|
290
|
+
transform: scale(0.5);
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
.c0 .carousel .wymd-carousel .carousel__slide.carousel__slide--visible + .carousel__slide--visible + .carousel__slide--visible > div > div:first-child:after {
|
|
294
|
+
right: calc(-300% - 6px);
|
|
295
|
+
-webkit-transform: scale(1);
|
|
296
|
+
-ms-transform: scale(1);
|
|
297
|
+
transform: scale(1);
|
|
298
|
+
width: 300%;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
.c0 .carousel .wymd-carousel .carousel__slide.carousel__slide--visible + .carousel__slide--visible + .carousel__slide--visible .all-text-wrapper {
|
|
302
|
+
-webkit-transform: translateY(calc(-45px + 5%)) scale(0.5);
|
|
303
|
+
-ms-transform: translateY(calc(-45px + 5%)) scale(0.5);
|
|
304
|
+
transform: translateY(calc(-45px + 5%)) scale(0.5);
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
@media (min-width:1024px) {
|
|
309
|
+
.c0 .carousel .wymd-carousel .carousel__slide {
|
|
310
|
+
padding-bottom: 475px !important;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
.c0 .carousel .wymd-carousel .carousel__slide.carousel__slide--visible .carousel__inner-slide > div:first-child:after {
|
|
314
|
+
right: calc(-250% - 6px);
|
|
315
|
+
width: 250%;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
.c0 .carousel .wymd-carousel .carousel__slide.carousel__slide--visible + .carousel__slide--visible .carousel__inner-slide > div:first-child:after {
|
|
319
|
+
right: calc(-187% - 6px);
|
|
320
|
+
width: 250%;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
.c0 .carousel .wymd-carousel .carousel__slide.carousel__slide--visible + .carousel__slide--visible + .carousel__slide--visible .carousel__inner-slide > div:first-child:after {
|
|
324
|
+
right: calc(-250% - 6px);
|
|
325
|
+
width: 250%;
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
<div
|
|
330
|
+
className="c0 CarouselWrapper"
|
|
331
|
+
id="7zdR84QkZwrTh9NWx2H926"
|
|
332
|
+
>
|
|
333
|
+
<p
|
|
334
|
+
className="c1 c2"
|
|
335
|
+
color="inherit"
|
|
336
|
+
size="s"
|
|
337
|
+
>
|
|
338
|
+
Over the past two years, we’ve supported
|
|
339
|
+
</p>
|
|
340
|
+
<h1
|
|
341
|
+
className="c3 c4"
|
|
342
|
+
color="red"
|
|
343
|
+
size="s"
|
|
344
|
+
>
|
|
345
|
+
11.7 million people
|
|
346
|
+
</h1>
|
|
347
|
+
<p
|
|
348
|
+
className="c5 c6"
|
|
349
|
+
color="inherit"
|
|
350
|
+
size="s"
|
|
351
|
+
>
|
|
352
|
+
including...
|
|
353
|
+
</p>
|
|
354
|
+
</div>
|
|
355
|
+
`);
|
|
16
356
|
});
|
|
@@ -19,7 +19,7 @@ const formatItems = thisData => {
|
|
|
19
19
|
for (let i = 1; i <= possibleNumberOfNodes; i += 1) {
|
|
20
20
|
// Create a dynamic key prefix based on the counter, obviously matching
|
|
21
21
|
// the naming convention set at the Content Type level in the CMS
|
|
22
|
-
const thisKeyPrefix =
|
|
22
|
+
const thisKeyPrefix = `node${i}`;
|
|
23
23
|
|
|
24
24
|
// Make an array of objects, each object representing a specific node and its fields:
|
|
25
25
|
const thisNodeContent = theseKeys.filter(key => key.includes(thisKeyPrefix)).reduce((thisObj, thisKey) => {
|
|
@@ -50,14 +50,6 @@ const colors = {
|
|
|
50
50
|
red: '#E52630',
|
|
51
51
|
red_secondary: '#F9723A',
|
|
52
52
|
red_dark: '#890B11',
|
|
53
|
-
rnd_23_teal: '#3EB1AA',
|
|
54
|
-
rnd_23_yellow: '#FFE300',
|
|
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
53
|
rnd_25_ruby_red: '#AE001B',
|
|
62
54
|
rnd_25_glitzy_grape: '#A20C51',
|
|
63
55
|
rnd_25_glitzy_blue: '#0F1953',
|
|
@@ -10,17 +10,17 @@ var _colors = _interopRequireDefault(require("./colors"));
|
|
|
10
10
|
const linkStyles = {
|
|
11
11
|
standard: {
|
|
12
12
|
color: (0, _colors.default)('black'),
|
|
13
|
-
border:
|
|
13
|
+
border: `2px solid ${(0, _colors.default)('black')}`,
|
|
14
14
|
weight: 'normal',
|
|
15
15
|
hoverColor: (0, _colors.default)('black'),
|
|
16
|
-
hoverBorder:
|
|
16
|
+
hoverBorder: `2px solid ${(0, _colors.default)('black')}`
|
|
17
17
|
},
|
|
18
18
|
standard_white: {
|
|
19
19
|
color: (0, _colors.default)('white'),
|
|
20
|
-
border:
|
|
20
|
+
border: `2px solid ${(0, _colors.default)('white')}`,
|
|
21
21
|
weight: 'normal',
|
|
22
22
|
hoverColor: (0, _colors.default)('white'),
|
|
23
|
-
hoverBorder:
|
|
23
|
+
hoverBorder: `2px solid ${(0, _colors.default)('white')}`
|
|
24
24
|
}
|
|
25
25
|
};
|
|
26
26
|
var _default = (styleName, underline) => {
|
|
@@ -29,7 +29,7 @@ const fonts = {
|
|
|
29
29
|
var _default = family => {
|
|
30
30
|
let style = 'inherit';
|
|
31
31
|
if (family) {
|
|
32
|
-
style =
|
|
32
|
+
style = `'${fonts[family].font}', ${fonts[family].fallback}, sans-serif`;
|
|
33
33
|
}
|
|
34
34
|
return style;
|
|
35
35
|
};
|
package/dist/utils/Membership.js
CHANGED
|
@@ -26,7 +26,7 @@ const isAmountValid = input => {
|
|
|
26
26
|
exports.isAmountValid = isAmountValid;
|
|
27
27
|
const getUrlParameter = name => {
|
|
28
28
|
const text = name.replace(/\[]/, '\\[').replace(/[\]]/, '\\]');
|
|
29
|
-
const regex = new RegExp(
|
|
29
|
+
const regex = new RegExp(`[\\?&]${text}=([^&#]*)`);
|
|
30
30
|
const results = regex.exec(window.location.search);
|
|
31
31
|
const param = results === null ? 'generic' : decodeURIComponent(results[1].replace(/\+/g, ' '));
|
|
32
32
|
return param;
|
|
@@ -49,6 +49,6 @@ const handleDonateSubmission = function (amount, clientID, cartID, mbshipID, don
|
|
|
49
49
|
currentpageUrl = currentpageUrl.substring(0, currentpageUrl.indexOf(thisMatch));
|
|
50
50
|
}
|
|
51
51
|
const givingTypeUrl = givingType === 'single' ? 'single' : 'monthly';
|
|
52
|
-
window.location.href =
|
|
52
|
+
window.location.href = `${donateLink}?clientOverride=${clientID}&amount=${amount}¤cy=GBP&givingType=${givingTypeUrl}&cartId=${cartID}&affiliate=${affiliateValue}&siteurl=${currentpageUrl}&rowID=${mbshipID}&popUpShown=${popUpShown}`;
|
|
53
53
|
};
|
|
54
54
|
exports.handleDonateSubmission = handleDonateSubmission;
|