@comicrelief/component-library 8.25.8 → 8.27.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 +16 -24
- package/dist/components/Atoms/Picture/Picture.md +2 -1
- package/dist/components/Atoms/Picture/Picture.test.js +92 -4
- 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/Card/__snapshots__/Card.test.js.snap +6 -0
- package/dist/components/Molecules/CardDs/__snapshots__/CardDs.test.js.snap +28 -0
- 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/Promo/__snapshots__/Promo.test.js.snap +28 -0
- 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/SearchResult/__snapshots__/SearchResult.test.js.snap +24 -0
- 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/SingleMessage/__snapshots__/SingleMessage.test.js.snap +78 -0
- package/dist/components/Molecules/SingleMessageDS/SingleMessageDs.js +1 -1
- package/dist/components/Molecules/SingleMessageDS/SingleMessageDs.style.js +8 -8
- package/dist/components/Molecules/SingleMessageDS/__snapshots__/SingleMessageDs.test.js.snap +14 -0
- 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/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.js +21 -19
- package/src/components/Atoms/Picture/Picture.md +2 -1
- package/src/components/Atoms/Picture/Picture.test.js +29 -7
- package/src/components/Molecules/ArticleTeaser/ArticleTeaser.test.js +28 -0
- package/src/components/Molecules/Card/__snapshots__/Card.test.js.snap +6 -0
- package/src/components/Molecules/CardDs/__snapshots__/CardDs.test.js.snap +28 -0
- package/src/components/Molecules/PartnerLink/PartnerLink.test.js +8 -0
- package/src/components/Molecules/Promo/__snapshots__/Promo.test.js.snap +28 -0
- package/src/components/Molecules/SearchResult/__snapshots__/SearchResult.test.js.snap +24 -0
- package/src/components/Molecules/SingleMessage/__snapshots__/SingleMessage.test.js.snap +78 -0
- package/src/components/Molecules/SingleMessageDS/__snapshots__/SingleMessageDs.test.js.snap +14 -0
- package/src/components/Organisms/Membership/Membership.test.js +6 -0
|
@@ -12,5 +12,22 @@ it("renders correctly", () => {
|
|
|
12
12
|
poster: _VideoBannerPosterImage.default,
|
|
13
13
|
video: src
|
|
14
14
|
})).toJSON();
|
|
15
|
-
expect(tree).toMatchInlineSnapshot(
|
|
15
|
+
expect(tree).toMatchInlineSnapshot(`
|
|
16
|
+
.c0 {
|
|
17
|
+
width: 100%;
|
|
18
|
+
height: 100%;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
<video
|
|
22
|
+
className="c0"
|
|
23
|
+
controls={false}
|
|
24
|
+
loop={false}
|
|
25
|
+
muted={true}
|
|
26
|
+
playsInline={true}
|
|
27
|
+
poster="mock.asset"
|
|
28
|
+
src="https://www.comicrelief.com/sites/default/files/downloads/Creativists_Logo_Web_small_V2_0.mp4"
|
|
29
|
+
>
|
|
30
|
+
Your browser does not support video.
|
|
31
|
+
</video>
|
|
32
|
+
`);
|
|
16
33
|
});
|
|
@@ -17,5 +17,185 @@ it('renders correctly', () => {
|
|
|
17
17
|
},
|
|
18
18
|
cookiePolicyUrl: "https://www.comicrelief.com/cookies-policy"
|
|
19
19
|
})).toJSON();
|
|
20
|
-
expect(tree).toMatchInlineSnapshot(
|
|
20
|
+
expect(tree).toMatchInlineSnapshot(`
|
|
21
|
+
.c1 {
|
|
22
|
+
color: #FFFFFF;
|
|
23
|
+
font-size: 1rem;
|
|
24
|
+
line-height: 1rem;
|
|
25
|
+
text-transform: inherit;
|
|
26
|
+
line-height: normal;
|
|
27
|
+
font-family: 'Montserrat',Helvetica,Arial,sans-serif;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.c3 {
|
|
31
|
+
position: relative;
|
|
32
|
+
-webkit-text-decoration: none;
|
|
33
|
+
text-decoration: none;
|
|
34
|
+
display: inline;
|
|
35
|
+
line-height: 1.5rem;
|
|
36
|
+
color: #FFFFFF;
|
|
37
|
+
border-bottom: 2px solid #FFFFFF;
|
|
38
|
+
font-weight: normal;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.c3:hover {
|
|
42
|
+
color: #FFFFFF;
|
|
43
|
+
border-bottom: 2px solid #FFFFFF;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.c5 {
|
|
47
|
+
display: -webkit-inline-box;
|
|
48
|
+
display: -webkit-inline-flex;
|
|
49
|
+
display: -ms-inline-flexbox;
|
|
50
|
+
display: inline-flex;
|
|
51
|
+
position: relative;
|
|
52
|
+
padding: 0.5rem 1.25rem;
|
|
53
|
+
-webkit-text-decoration: none;
|
|
54
|
+
text-decoration: none;
|
|
55
|
+
font-weight: 700;
|
|
56
|
+
font-size: 1rem;
|
|
57
|
+
border-radius: 2rem;
|
|
58
|
+
-webkit-transition: all 0.3s;
|
|
59
|
+
transition: all 0.3s;
|
|
60
|
+
height: 3.125rem;
|
|
61
|
+
width: 100%;
|
|
62
|
+
-webkit-box-pack: center;
|
|
63
|
+
-webkit-justify-content: center;
|
|
64
|
+
-ms-flex-pack: center;
|
|
65
|
+
justify-content: center;
|
|
66
|
+
-webkit-align-items: center;
|
|
67
|
+
-webkit-box-align: center;
|
|
68
|
+
-ms-flex-align: center;
|
|
69
|
+
align-items: center;
|
|
70
|
+
cursor: pointer;
|
|
71
|
+
background-color: #FFFFFF;
|
|
72
|
+
color: #000000;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.c5:hover {
|
|
76
|
+
background-color: #969598;
|
|
77
|
+
color: #000000;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.c0 {
|
|
81
|
+
display: -webkit-box;
|
|
82
|
+
display: -webkit-flex;
|
|
83
|
+
display: -ms-flexbox;
|
|
84
|
+
display: flex;
|
|
85
|
+
position: relative;
|
|
86
|
+
padding: 1rem;
|
|
87
|
+
background: #2C0230;
|
|
88
|
+
-webkit-flex-direction: column;
|
|
89
|
+
-ms-flex-direction: column;
|
|
90
|
+
flex-direction: column;
|
|
91
|
+
z-index: 3;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.c2 {
|
|
95
|
+
line-height: 1.5;
|
|
96
|
+
margin: 0;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.c2:first-of-type {
|
|
100
|
+
margin-bottom: 0.5rem;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.c6 {
|
|
104
|
+
padding: 0.5rem 1rem;
|
|
105
|
+
display: block;
|
|
106
|
+
margin-bottom: 10px;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.c4 {
|
|
110
|
+
color: #FFFFFF;
|
|
111
|
+
padding: 0 0.25rem 1px;
|
|
112
|
+
border-bottom: 2px solid;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
@media (min-width:740px) {
|
|
116
|
+
.c5 {
|
|
117
|
+
width: auto;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
@media (min-width:1024px) {
|
|
122
|
+
.c5 {
|
|
123
|
+
background-color: #FFFFFF;
|
|
124
|
+
color: #000000;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.c5:hover {
|
|
128
|
+
background-color: #969598;
|
|
129
|
+
color: #000000;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
@media (min-width:740px) {
|
|
134
|
+
.c2 {
|
|
135
|
+
width: 75%;
|
|
136
|
+
margin: 0 auto;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.c2:first-of-type {
|
|
140
|
+
margin-bottom: 1rem;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
@media (min-width:740px) {
|
|
145
|
+
.c6 {
|
|
146
|
+
margin: 0 0.25rem 0 0;
|
|
147
|
+
display: inline-block;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
<div
|
|
152
|
+
className="c0"
|
|
153
|
+
>
|
|
154
|
+
<p
|
|
155
|
+
className="c1 c2"
|
|
156
|
+
color="white"
|
|
157
|
+
size="s"
|
|
158
|
+
>
|
|
159
|
+
Hello! Comic Relief uses cookies to help make this website better and improve our services. You can learn more about
|
|
160
|
+
<a
|
|
161
|
+
className="c3 c4"
|
|
162
|
+
color="red"
|
|
163
|
+
href="https://www.comicrelief.com/cookies-policy"
|
|
164
|
+
target="_self"
|
|
165
|
+
type="standard_white"
|
|
166
|
+
>
|
|
167
|
+
our use of cookies
|
|
168
|
+
</a>
|
|
169
|
+
. We also use optional cookies for marketing purposes:
|
|
170
|
+
</p>
|
|
171
|
+
<p
|
|
172
|
+
className="c1 c2"
|
|
173
|
+
color="white"
|
|
174
|
+
size="s"
|
|
175
|
+
>
|
|
176
|
+
<a
|
|
177
|
+
className="c5 c6"
|
|
178
|
+
color="white"
|
|
179
|
+
href="/comic"
|
|
180
|
+
onClick={[Function]}
|
|
181
|
+
target="_self"
|
|
182
|
+
type="button"
|
|
183
|
+
>
|
|
184
|
+
Accept
|
|
185
|
+
</a>
|
|
186
|
+
Or click
|
|
187
|
+
<a
|
|
188
|
+
className="c3 c4"
|
|
189
|
+
color="red"
|
|
190
|
+
href=""
|
|
191
|
+
onClick={[Function]}
|
|
192
|
+
target="_self"
|
|
193
|
+
type="standard_white"
|
|
194
|
+
>
|
|
195
|
+
here
|
|
196
|
+
</a>
|
|
197
|
+
to deny these.
|
|
198
|
+
</p>
|
|
199
|
+
</div>
|
|
200
|
+
`);
|
|
21
201
|
});
|
|
@@ -52,7 +52,7 @@ const Donate = _ref => {
|
|
|
52
52
|
monthlyOtherAmountText: monthlyOther = ''
|
|
53
53
|
} = _ref;
|
|
54
54
|
let isDesktop = (0, _reactResponsive.useMediaQuery)({
|
|
55
|
-
query:
|
|
55
|
+
query: `(min-width: ${_allBreakpoints.breakpointValues.L}px)`
|
|
56
56
|
});
|
|
57
57
|
|
|
58
58
|
// To let us store any updated override, and force a re-render
|
|
@@ -45,7 +45,9 @@ const BgImage = exports.BgImage = (0, _styledComponents.default)(_Picture.defaul
|
|
|
45
45
|
let {
|
|
46
46
|
backgroundColor
|
|
47
47
|
} = _ref4;
|
|
48
|
-
return backgroundColor !== 'transparent' &&
|
|
48
|
+
return backgroundColor !== 'transparent' && `
|
|
49
|
+
opacity: 0.4;
|
|
50
|
+
`;
|
|
49
51
|
});
|
|
50
52
|
const Wrapper = exports.Wrapper = _styledComponents.default.div.withConfig({
|
|
51
53
|
displayName: "Donatestyle__Wrapper",
|
|
@@ -157,9 +157,9 @@ const Signup = _ref => {
|
|
|
157
157
|
return 'Donate';
|
|
158
158
|
}
|
|
159
159
|
if (givingType === 'single') {
|
|
160
|
-
return
|
|
160
|
+
return `Donate £${amountDonate} now`;
|
|
161
161
|
}
|
|
162
|
-
return
|
|
162
|
+
return `Donate £${amountDonate} monthly`;
|
|
163
163
|
};
|
|
164
164
|
const showAdditionalSingleCopy = givingType === 'single' && additionalSingleCopy;
|
|
165
165
|
const showAdditionalMonthlyCopy = givingType === 'monthly' && additionalMonthlyCopy;
|
|
@@ -178,18 +178,18 @@ const Signup = _ref => {
|
|
|
178
178
|
tag: "span",
|
|
179
179
|
size: "l",
|
|
180
180
|
weight: "bold"
|
|
181
|
-
}, chooseAmountText ||
|
|
181
|
+
}, chooseAmountText || `${noMoneyBuys ? 'Enter' : 'Choose'} an amount to give`)), !noMoneyBuys && givingType && /*#__PURE__*/_react.default.createElement(_Donate.MoneyBuys, null, givingData.moneybuys.map((_ref2, index) => {
|
|
182
182
|
let {
|
|
183
183
|
value
|
|
184
184
|
} = _ref2;
|
|
185
185
|
return /*#__PURE__*/_react.default.createElement(_MoneyBuy.default, {
|
|
186
186
|
isSelected: amountDonate === value,
|
|
187
187
|
amount: value.toString(),
|
|
188
|
-
description:
|
|
188
|
+
description: `£${(0, _Membership.amountFormatter)(value)}`,
|
|
189
189
|
setOtherAmount: () => setAmountDonate(value),
|
|
190
190
|
key: value,
|
|
191
|
-
name:
|
|
192
|
-
id:
|
|
191
|
+
name: `${mbshipID}--moneyBuy${index + 1}`,
|
|
192
|
+
id: `${mbshipID}--moneyBuy-box${index + 1}`
|
|
193
193
|
});
|
|
194
194
|
})), /*#__PURE__*/_react.default.createElement(_Donate.FormFieldset, null, !noMoneyBuys && /*#__PURE__*/_react.default.createElement(_Donate.Label, {
|
|
195
195
|
size: "s",
|
|
@@ -201,7 +201,7 @@ const Signup = _ref => {
|
|
|
201
201
|
inputBorderColor: (0, _Membership.isAmountValid)(amountDonate) === false,
|
|
202
202
|
label: "\xA3",
|
|
203
203
|
errorMsg: "",
|
|
204
|
-
id:
|
|
204
|
+
id: `${mbshipID}--MoneyBuy-userInput`,
|
|
205
205
|
showLabel: true
|
|
206
206
|
}, rest, {
|
|
207
207
|
max: "25000",
|
|
@@ -215,7 +215,7 @@ const Signup = _ref => {
|
|
|
215
215
|
ref: amountRef
|
|
216
216
|
}))), amountDonate >= 1 && moneyBuyCopy && /*#__PURE__*/_react.default.createElement(_Donate.Copy, {
|
|
217
217
|
as: "p"
|
|
218
|
-
}, /*#__PURE__*/_react.default.createElement("strong", null,
|
|
218
|
+
}, /*#__PURE__*/_react.default.createElement("strong", null, `£${amountDonate} `), moneyBuyCopy), errorMsg && /*#__PURE__*/_react.default.createElement(_Donate.Error, {
|
|
219
219
|
className: "error--amount",
|
|
220
220
|
tag: "p"
|
|
221
221
|
}, "Please enter an amount between \xA31 and \xA325000 and up to 2 decimal places"), additionalCopy && /*#__PURE__*/_react.default.createElement("p", {
|
|
@@ -24,7 +24,7 @@ const GivingSelector = _ref => {
|
|
|
24
24
|
return /*#__PURE__*/_react.default.createElement(_GivingSelector.Wrapper, null, /*#__PURE__*/_react.default.createElement(_GivingSelector.MoneyBox, null, /*#__PURE__*/_react.default.createElement("input", {
|
|
25
25
|
className: "give-once",
|
|
26
26
|
"aria-label": "Single",
|
|
27
|
-
id:
|
|
27
|
+
id: `give-once--${mbshipID}`,
|
|
28
28
|
value: "Single",
|
|
29
29
|
type: "radio",
|
|
30
30
|
label: "",
|
|
@@ -32,11 +32,11 @@ const GivingSelector = _ref => {
|
|
|
32
32
|
onChange: () => handleGivingTypeChange('single', givingType)
|
|
33
33
|
}), /*#__PURE__*/_react.default.createElement(_GivingSelector.Label, {
|
|
34
34
|
active: givingType === 'single',
|
|
35
|
-
htmlFor:
|
|
35
|
+
htmlFor: `give-once--${mbshipID}`
|
|
36
36
|
}, "Single"), /*#__PURE__*/_react.default.createElement("input", {
|
|
37
37
|
className: "give-monthly",
|
|
38
38
|
"aria-label": "Monthly",
|
|
39
|
-
id:
|
|
39
|
+
id: `give-monthly--${mbshipID}`,
|
|
40
40
|
value: "Monthly",
|
|
41
41
|
type: "radio",
|
|
42
42
|
label: "",
|
|
@@ -44,7 +44,7 @@ const GivingSelector = _ref => {
|
|
|
44
44
|
onChange: () => handleGivingTypeChange('monthly', givingType)
|
|
45
45
|
}), /*#__PURE__*/_react.default.createElement(_GivingSelector.Label, {
|
|
46
46
|
active: givingType === 'monthly',
|
|
47
|
-
htmlFor:
|
|
47
|
+
htmlFor: `give-monthly--${mbshipID}`
|
|
48
48
|
}, "Monthly"), /*#__PURE__*/_react.default.createElement(_GivingSelector.Switch, null)));
|
|
49
49
|
};
|
|
50
50
|
var _default = exports.default = GivingSelector;
|
|
@@ -74,7 +74,7 @@ const MoneyBuy = _ref11 => {
|
|
|
74
74
|
} = _ref11;
|
|
75
75
|
return /*#__PURE__*/_react.default.createElement(MoneyBuyButton, Object.assign({}, rest, {
|
|
76
76
|
"aria-label": description,
|
|
77
|
-
value:
|
|
77
|
+
value: `${currency} ${amount}`,
|
|
78
78
|
type: "button",
|
|
79
79
|
label: "",
|
|
80
80
|
errorMsg: "",
|
|
@@ -33,7 +33,7 @@ const Footer = _ref => {
|
|
|
33
33
|
campaign: campaignName
|
|
34
34
|
})), /*#__PURE__*/_react.default.createElement(_Footer.Brand, {
|
|
35
35
|
href: "/",
|
|
36
|
-
title:
|
|
36
|
+
title: `Go to ${campaign} homepage`
|
|
37
37
|
}, /*#__PURE__*/_react.default.createElement(_Logo.default, {
|
|
38
38
|
sizeSm: "48px",
|
|
39
39
|
sizeMd: "72px",
|
|
@@ -63,7 +63,7 @@ const FooterNav = _ref => {
|
|
|
63
63
|
role: "menubar"
|
|
64
64
|
}, menuGroups.map((group, index) => /*#__PURE__*/_react.default.createElement(_Nav.NavItem, {
|
|
65
65
|
role: "none",
|
|
66
|
-
key:
|
|
66
|
+
key: `${group.id}-${group.title}`,
|
|
67
67
|
index: index,
|
|
68
68
|
isSubMenuOpen: !!isSubMenuOpen[group.id]
|
|
69
69
|
}, !isSmallBreakpoint ? /*#__PURE__*/_react.default.createElement(_Text.default, {
|
|
@@ -102,7 +102,7 @@ const HeaderNav = _ref => {
|
|
|
102
102
|
// on mobile, a clickable LINK on desktop but hover to reveal the submenu
|
|
103
103
|
return /*#__PURE__*/_react.default.createElement(_HeaderNav.NavItem, {
|
|
104
104
|
role: "none",
|
|
105
|
-
key:
|
|
105
|
+
key: `${thisID}-item`,
|
|
106
106
|
index: index,
|
|
107
107
|
isSubMenuOpen: !!isSubMenuOpen[thisID]
|
|
108
108
|
}, isNotDesktop ? /*#__PURE__*/_react.default.createElement(_HeaderNav.NavLink, {
|
|
@@ -114,7 +114,7 @@ const HeaderNav = _ref => {
|
|
|
114
114
|
onClick: hasPopUp ? e => toggleSubMenu(e, thisID) : null,
|
|
115
115
|
onKeyUp: keyPressed(group.title),
|
|
116
116
|
role: "button",
|
|
117
|
-
key:
|
|
117
|
+
key: `${thisID}-link`
|
|
118
118
|
}, thisFirstChild.title, hasSubMenu && /*#__PURE__*/_react.default.createElement(_HeaderNav.ChevronWrapper, null, /*#__PURE__*/_react.default.createElement("img", {
|
|
119
119
|
src: _MenuGroupIcon.default,
|
|
120
120
|
alt: "chevron down icon"
|
|
@@ -144,7 +144,7 @@ const HeaderNav2025 = _ref => {
|
|
|
144
144
|
// on mobile, a clickable LINK on desktop but hover to reveal the submenu:
|
|
145
145
|
return /*#__PURE__*/_react.default.createElement(_HeaderNavItem.default, {
|
|
146
146
|
thisID: thisID,
|
|
147
|
-
key:
|
|
147
|
+
key: `${thisID}--item`,
|
|
148
148
|
index: index,
|
|
149
149
|
hasSubMenu: hasSubMenu,
|
|
150
150
|
openedSubMenu: openedSubMenu,
|
|
@@ -28,7 +28,7 @@ const HeaderNavItem2025 = _ref => {
|
|
|
28
28
|
} = _ref;
|
|
29
29
|
return /*#__PURE__*/_react.default.createElement(_HeaderNav.NavItem, {
|
|
30
30
|
role: "none",
|
|
31
|
-
key:
|
|
31
|
+
key: `${index}-${thisID}--item`,
|
|
32
32
|
index: index,
|
|
33
33
|
isSubMenuOpen: !!openedSubMenu
|
|
34
34
|
}, isNotDesktop ? /*#__PURE__*/_react.default.createElement(_HeaderNav.NavLink, {
|
|
@@ -39,7 +39,7 @@ const HeaderNavItem2025 = _ref => {
|
|
|
39
39
|
"aria-haspopup": hasPopUp,
|
|
40
40
|
onClick: hasPopUp ? e => toggleSubMenu(e, thisID) : null,
|
|
41
41
|
role: "button",
|
|
42
|
-
key:
|
|
42
|
+
key: `${index}-${thisID}--link`,
|
|
43
43
|
isExpanded: !!openedSubMenu[thisID]
|
|
44
44
|
}, thisFirstChild.title, hasSubMenu && /*#__PURE__*/_react.default.createElement(_HeaderNav.ChevronWrapper, null, /*#__PURE__*/_react.default.createElement("img", {
|
|
45
45
|
src: _MenuGroupIcon.default,
|
|
@@ -49,7 +49,7 @@ const HeaderNavItem2025 = _ref => {
|
|
|
49
49
|
inline: true,
|
|
50
50
|
rel: relNoopener,
|
|
51
51
|
"aria-haspopup": hasPopUp,
|
|
52
|
-
key:
|
|
52
|
+
key: `${index}-${thisID}`,
|
|
53
53
|
hasSubMenu: hasSubMenu
|
|
54
54
|
}, rest), thisFirstChild.title, hasSubMenu && /*#__PURE__*/_react.default.createElement(_HeaderNav.ChevronWrapper, null, /*#__PURE__*/_react.default.createElement("img", {
|
|
55
55
|
src: _MenuGroupIcon.default,
|
|
@@ -57,7 +57,7 @@ const HeaderNavItem2025 = _ref => {
|
|
|
57
57
|
})))), hasSubMenu && /*#__PURE__*/_react.default.createElement(_HeaderNav.SubNavMenu, {
|
|
58
58
|
role: "list",
|
|
59
59
|
isSubMenuOpen: !!openedSubMenu[thisID],
|
|
60
|
-
key:
|
|
60
|
+
key: `${index}-${thisID}--sub-item`
|
|
61
61
|
}, group.links.map((child, childIndex) => {
|
|
62
62
|
let thisSubUrl = navHelper(child);
|
|
63
63
|
thisSubUrl = internalLinkHelper(thisSubUrl);
|
|
@@ -68,7 +68,7 @@ const HeaderNavItem2025 = _ref => {
|
|
|
68
68
|
|
|
69
69
|
// Otherwise, render out as usual:
|
|
70
70
|
return /*#__PURE__*/_react.default.createElement(_HeaderNav.SubNavItem, {
|
|
71
|
-
key:
|
|
71
|
+
key: `${index}-${thisSubUrl}`
|
|
72
72
|
}, /*#__PURE__*/_react.default.createElement(_HeaderNav.SubNavLink, {
|
|
73
73
|
href: thisSubUrl,
|
|
74
74
|
inline: true,
|
|
@@ -11,7 +11,7 @@ var _Button = _interopRequireDefault(require("../../Atoms/Button/Button"));
|
|
|
11
11
|
const OuterWrapper = exports.OuterWrapper = _styledComponents.default.div.withConfig({
|
|
12
12
|
displayName: "ImpactSliderstyle__OuterWrapper",
|
|
13
13
|
componentId: "sc-1fpimol-0"
|
|
14
|
-
})(["position:relative;max-width:100%;background-color:", ";padding:32px 16px;@media ", "{padding:50px;}@media ", "{padding:64px 0;}"], props => props.theme.color(
|
|
14
|
+
})(["position:relative;max-width:100%;background-color:", ";padding:32px 16px;@media ", "{padding:50px;}@media ", "{padding:64px 0;}"], props => props.theme.color(`${props.backgroundColour}`), _ref => {
|
|
15
15
|
let {
|
|
16
16
|
theme
|
|
17
17
|
} = _ref;
|
|
@@ -20,7 +20,7 @@ const Moneybuys = _ref => {
|
|
|
20
20
|
key: item.poundsPerItem
|
|
21
21
|
}, /*#__PURE__*/_react.default.createElement(_ImpactMoneybuys.Moneybuy, {
|
|
22
22
|
isInactive: isInactive,
|
|
23
|
-
"data-testid":
|
|
23
|
+
"data-testid": `impact-slider--moneybuy-${index + 1}`
|
|
24
24
|
}, /*#__PURE__*/_react.default.createElement(_ImpactMoneybuys.MoneybuyImage, {
|
|
25
25
|
imageURL: item.imageURL
|
|
26
26
|
}), /*#__PURE__*/_react.default.createElement(_ImpactMoneybuys.MoneybuyAmount, {
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
const getUrlParameter = name => {
|
|
8
8
|
const text = name.replace(/\[]/, '\\[').replace(/[\]]/, '\\]');
|
|
9
|
-
const regex = new RegExp(
|
|
9
|
+
const regex = new RegExp(`[\\?&]${text}=([^&#]*)`);
|
|
10
10
|
const results = regex.exec(window.location.search);
|
|
11
11
|
const param = results === null ? 'generic' : decodeURIComponent(results[1].replace(/\+/g, ' '));
|
|
12
12
|
return param;
|
|
@@ -19,7 +19,7 @@ const handleSubmission = (amount, donateLink, cartID, rowID) => {
|
|
|
19
19
|
const thisMatch = currentpageUrl.match(reg)[0];
|
|
20
20
|
currentpageUrl = currentpageUrl.substring(0, currentpageUrl.indexOf(thisMatch));
|
|
21
21
|
}
|
|
22
|
-
const forwardingUrl =
|
|
22
|
+
const forwardingUrl = `${donateLink}/?cartId=${cartID}&amount=${amount}&clientOverride=donate¤cy=GBP&givingType=single&affiliate=${affiliateValue}&siteurl=${currentpageUrl}&rowID=${rowID}`;
|
|
23
23
|
window.location.href = forwardingUrl;
|
|
24
24
|
};
|
|
25
25
|
var _default = exports.default = handleSubmission;
|
|
@@ -89,7 +89,7 @@ const MarketingPreferencesDS = _ref => {
|
|
|
89
89
|
const showSMSField = !mp_permissionSMS.hideInput && (smsChoice || errors.mp_mobile);
|
|
90
90
|
const showPhoneField = !mp_permissionPhone.hideInput && (phoneChoice || errors.mp_phone);
|
|
91
91
|
const showPostFields = !mp_permissionPost.hideInput && (postChoice || isAddressErroring());
|
|
92
|
-
const customId = id ?
|
|
92
|
+
const customId = id ? `marketing-preferences--${id}` : 'marketing-preferences';
|
|
93
93
|
|
|
94
94
|
// Check for field-specific errors
|
|
95
95
|
const hasEmailError = Boolean(errors.mp_permissionEmail || errors.mp_email);
|
|
@@ -99,7 +99,7 @@ const MarketingPreferencesDS = _ref => {
|
|
|
99
99
|
return /*#__PURE__*/_react.default.createElement(_MarketingPreferencesDS.OuterWrapper, Object.assign({
|
|
100
100
|
id: customId
|
|
101
101
|
}, rest), copyTop && /*#__PURE__*/_react.default.createElement(_MarketingPreferencesDS.TopCopyWrapper, null, copyTop), !mp_permissionEmail.disableOption && /*#__PURE__*/_react.default.createElement(_MarketingPreferencesDS.FormField, {
|
|
102
|
-
className:
|
|
102
|
+
className: `field-email ${emailChoice && 'selected'}`,
|
|
103
103
|
isError: hasEmailError
|
|
104
104
|
}, /*#__PURE__*/_react.default.createElement(_MarketingPreferencesDS.CheckboxWrapper, null, /*#__PURE__*/_react.default.createElement(_OptInCheckbox.default, {
|
|
105
105
|
mpValidationOptions: mpValidationOptions,
|
|
@@ -122,7 +122,7 @@ const MarketingPreferencesDS = _ref => {
|
|
|
122
122
|
id: "mp_email",
|
|
123
123
|
formContext: formContext
|
|
124
124
|
})))), !mp_permissionPost.disableOption && /*#__PURE__*/_react.default.createElement(_MarketingPreferencesDS.FormField, {
|
|
125
|
-
className:
|
|
125
|
+
className: `field-post ${postChoice && 'selected'}`,
|
|
126
126
|
isError: hasPostError
|
|
127
127
|
}, /*#__PURE__*/_react.default.createElement(_MarketingPreferencesDS.CheckboxWrapper, null, /*#__PURE__*/_react.default.createElement(_OptInCheckbox.default, {
|
|
128
128
|
name: "mp_permissionPost",
|
|
@@ -177,7 +177,7 @@ const MarketingPreferencesDS = _ref => {
|
|
|
177
177
|
id: "mp_country",
|
|
178
178
|
formContext: formContext
|
|
179
179
|
})))), !mp_permissionSMS.disableOption && /*#__PURE__*/_react.default.createElement(_MarketingPreferencesDS.FormField, {
|
|
180
|
-
className:
|
|
180
|
+
className: `field-sms ${smsChoice && 'selected'}`,
|
|
181
181
|
isError: hasSMSError
|
|
182
182
|
}, /*#__PURE__*/_react.default.createElement(_MarketingPreferencesDS.CheckboxWrapper, null, /*#__PURE__*/_react.default.createElement(_OptInCheckbox.default, {
|
|
183
183
|
name: "mp_permissionSMS",
|
|
@@ -197,7 +197,7 @@ const MarketingPreferencesDS = _ref => {
|
|
|
197
197
|
id: "mp_mobile",
|
|
198
198
|
formContext: formContext
|
|
199
199
|
})))), !mp_permissionPhone.disableOption && /*#__PURE__*/_react.default.createElement(_MarketingPreferencesDS.FormField, {
|
|
200
|
-
className:
|
|
200
|
+
className: `field-phone ${phoneChoice && 'selected'}`,
|
|
201
201
|
isError: hasPhoneError
|
|
202
202
|
}, /*#__PURE__*/_react.default.createElement(_MarketingPreferencesDS.CheckboxWrapper, null, /*#__PURE__*/_react.default.createElement(_OptInCheckbox.default, {
|
|
203
203
|
name: "mp_permissionPhone",
|
|
@@ -51,14 +51,14 @@ const OptInCheckbox = _ref => {
|
|
|
51
51
|
}
|
|
52
52
|
};
|
|
53
53
|
return /*#__PURE__*/_react.default.createElement(_MarketingPreferencesDS.CheckContainer, null, /*#__PURE__*/_react.default.createElement(_MarketingPreferencesDS.CheckLabel, {
|
|
54
|
-
htmlFor:
|
|
54
|
+
htmlFor: `${name}-yes`,
|
|
55
55
|
userSelection: userSelection
|
|
56
56
|
}, /*#__PURE__*/_react.default.createElement(_MarketingPreferencesDS.AssociatedFieldsName, {
|
|
57
|
-
className:
|
|
57
|
+
className: `icon-${name}`
|
|
58
58
|
}, _AssociatedFields.default[name].label), /*#__PURE__*/_react.default.createElement(_MarketingPreferencesDS.CheckInput, Object.assign({
|
|
59
59
|
type: "checkbox",
|
|
60
60
|
name: name,
|
|
61
|
-
id:
|
|
61
|
+
id: `${name}-yes`,
|
|
62
62
|
value: "yes"
|
|
63
63
|
}, register(name), {
|
|
64
64
|
onChange: onChange
|
|
@@ -82,7 +82,7 @@ const Signup = _ref => {
|
|
|
82
82
|
};
|
|
83
83
|
(0, _react.useEffect)(() => {
|
|
84
84
|
regularGiving.moneybuys.map((moneyBuy, index) => {
|
|
85
|
-
const box =
|
|
85
|
+
const box = `box${index + 1}`;
|
|
86
86
|
// eslint-disable-next-line no-shadow
|
|
87
87
|
setMoneyBoxes(moneyBoxes => ({
|
|
88
88
|
...moneyBoxes,
|
|
@@ -112,11 +112,11 @@ const Signup = _ref => {
|
|
|
112
112
|
boxBorderColor: boxBorderColor,
|
|
113
113
|
isInputMatchBox: value,
|
|
114
114
|
amount: value,
|
|
115
|
-
description:
|
|
115
|
+
description: `£${value}`,
|
|
116
116
|
setOtherAmount: () => selectMoneyBuy(description, value),
|
|
117
117
|
key: value,
|
|
118
|
-
name:
|
|
119
|
-
id:
|
|
118
|
+
name: `${mbshipID}--moneyBuy${index + 1}`,
|
|
119
|
+
id: `${mbshipID}--moneyBuy-box${index + 1}`
|
|
120
120
|
});
|
|
121
121
|
});
|
|
122
122
|
return /*#__PURE__*/_react.default.createElement(_Membership2.FormWrapper, null, /*#__PURE__*/_react.default.createElement(_Membership2.Form, {
|
|
@@ -133,7 +133,7 @@ const Signup = _ref => {
|
|
|
133
133
|
inputBorderColor: inputBorderColor,
|
|
134
134
|
label: "\xA3",
|
|
135
135
|
errorMsg: "",
|
|
136
|
-
id:
|
|
136
|
+
id: `${mbshipID}--MoneyBuy-userInput`,
|
|
137
137
|
showLabel: true
|
|
138
138
|
}, rest, {
|
|
139
139
|
max: "25000",
|
|
@@ -128,7 +128,7 @@ const AmountField = exports.AmountField = (0, _styledComponents.default)(_Input.
|
|
|
128
128
|
inputBorderColor,
|
|
129
129
|
theme
|
|
130
130
|
} = _ref13;
|
|
131
|
-
return inputBorderColor &&
|
|
131
|
+
return inputBorderColor && `border: 2px solid ${theme.color('red')};`;
|
|
132
132
|
}, _ref14 => {
|
|
133
133
|
let {
|
|
134
134
|
theme
|