@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
|
@@ -42,16 +42,16 @@ const ShareButton = _ref => {
|
|
|
42
42
|
checkedUrl = urlToShare !== null ? urlToShare : window.location.href;
|
|
43
43
|
}
|
|
44
44
|
return /*#__PURE__*/_react.default.createElement(_ShareButton.Wrapper, null, /*#__PURE__*/_react.default.createElement(_ShareButton.Copy, null, copy), /*#__PURE__*/_react.default.createElement(_ShareButton.ShareButtonList, null, Object.keys(_ShareIcons.default).map(shareType => /*#__PURE__*/_react.default.createElement(_ShareButton.ShareButtonItem, {
|
|
45
|
-
key:
|
|
45
|
+
key: `share-button--${shareType}`
|
|
46
46
|
}, /*#__PURE__*/_react.default.createElement(_Icon.default, Object.assign({
|
|
47
47
|
onClick: e => handleShare(e, shareType, checkedUrl),
|
|
48
48
|
icon: _ShareIcons.default[shareType],
|
|
49
|
-
title:
|
|
49
|
+
title: `Share on ${shareType}`,
|
|
50
50
|
brand: campaign,
|
|
51
51
|
target: "_blank",
|
|
52
52
|
role: "button",
|
|
53
53
|
href: "#",
|
|
54
|
-
id:
|
|
54
|
+
id: `share-button--${shareType}`
|
|
55
55
|
}, restProps))))));
|
|
56
56
|
};
|
|
57
57
|
var _default = exports.default = ShareButton;
|
|
@@ -7,5 +7,116 @@ var _shallowWithTheme = _interopRequireDefault(require("../../../../tests/hoc/sh
|
|
|
7
7
|
var _ShareButton = _interopRequireDefault(require("./ShareButton"));
|
|
8
8
|
it('renders correctly', () => {
|
|
9
9
|
const tree = (0, _shallowWithTheme.default)( /*#__PURE__*/_react.default.createElement(_ShareButton.default, null)).toJSON();
|
|
10
|
-
expect(tree).toMatchInlineSnapshot(
|
|
10
|
+
expect(tree).toMatchInlineSnapshot(`
|
|
11
|
+
.c4 {
|
|
12
|
+
-webkit-text-decoration: none;
|
|
13
|
+
text-decoration: none;
|
|
14
|
+
cursor: pointer;
|
|
15
|
+
display: block;
|
|
16
|
+
position: relative;
|
|
17
|
+
-webkit-transition: opacity 0.2s;
|
|
18
|
+
transition: opacity 0.2s;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.c4:hover,
|
|
22
|
+
.c4:focus {
|
|
23
|
+
opacity: 0.6;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.c5 {
|
|
27
|
+
width: 100%;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.c0 {
|
|
31
|
+
display: -webkit-box;
|
|
32
|
+
display: -webkit-flex;
|
|
33
|
+
display: -ms-flexbox;
|
|
34
|
+
display: flex;
|
|
35
|
+
-webkit-align-items: center;
|
|
36
|
+
-webkit-box-align: center;
|
|
37
|
+
-ms-flex-align: center;
|
|
38
|
+
align-items: center;
|
|
39
|
+
-webkit-box-pack: center;
|
|
40
|
+
-webkit-justify-content: center;
|
|
41
|
+
-ms-flex-pack: center;
|
|
42
|
+
justify-content: center;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.c1 {
|
|
46
|
+
width: auto;
|
|
47
|
+
margin: 0 1rem 0 0;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.c1:first-child {
|
|
51
|
+
margin-bottom: 0;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.c2 {
|
|
55
|
+
width: auto;
|
|
56
|
+
margin: 0;
|
|
57
|
+
padding: 0;
|
|
58
|
+
list-style: none;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.c3 {
|
|
62
|
+
width: 40px;
|
|
63
|
+
height: 40px;
|
|
64
|
+
display: inline-block;
|
|
65
|
+
margin: 0.5rem;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
<div
|
|
69
|
+
className="c0"
|
|
70
|
+
>
|
|
71
|
+
<p
|
|
72
|
+
className="c1"
|
|
73
|
+
>
|
|
74
|
+
Share with:
|
|
75
|
+
</p>
|
|
76
|
+
<ul
|
|
77
|
+
className="c2"
|
|
78
|
+
>
|
|
79
|
+
<li
|
|
80
|
+
className="c3"
|
|
81
|
+
>
|
|
82
|
+
<a
|
|
83
|
+
className="c4"
|
|
84
|
+
data-test="icon-share-button-facebook"
|
|
85
|
+
href="#"
|
|
86
|
+
onClick={[Function]}
|
|
87
|
+
rel="noopener noreferrer"
|
|
88
|
+
role="button"
|
|
89
|
+
target="__blank"
|
|
90
|
+
title="Share on Facebook"
|
|
91
|
+
>
|
|
92
|
+
<img
|
|
93
|
+
alt="comicrelief"
|
|
94
|
+
className="c5"
|
|
95
|
+
src="mock.asset"
|
|
96
|
+
/>
|
|
97
|
+
</a>
|
|
98
|
+
</li>
|
|
99
|
+
<li
|
|
100
|
+
className="c3"
|
|
101
|
+
>
|
|
102
|
+
<a
|
|
103
|
+
className="c4"
|
|
104
|
+
data-test="icon-share-button-twitter"
|
|
105
|
+
href="#"
|
|
106
|
+
onClick={[Function]}
|
|
107
|
+
rel="noopener noreferrer"
|
|
108
|
+
role="button"
|
|
109
|
+
target="__blank"
|
|
110
|
+
title="Share on Twitter"
|
|
111
|
+
>
|
|
112
|
+
<img
|
|
113
|
+
alt="comicrelief"
|
|
114
|
+
className="c5"
|
|
115
|
+
src="mock.asset"
|
|
116
|
+
/>
|
|
117
|
+
</a>
|
|
118
|
+
</li>
|
|
119
|
+
</ul>
|
|
120
|
+
</div>
|
|
121
|
+
`);
|
|
11
122
|
});
|
|
@@ -30,7 +30,7 @@ const schoolFetcher = async query => {
|
|
|
30
30
|
throw new Error('Sorry, something unexpected went wrong. Please try again or enter your school manually');
|
|
31
31
|
}
|
|
32
32
|
};
|
|
33
|
-
const schoolToString = school =>
|
|
33
|
+
const schoolToString = school => `${school.name}, ${school.post_code}`;
|
|
34
34
|
|
|
35
35
|
/**
|
|
36
36
|
* The component library's school lookup component uses a typeahead/search-as-you-type approach.
|
|
@@ -58,7 +58,7 @@ const SingleMessage = _ref => {
|
|
|
58
58
|
if (thisRef.current) {
|
|
59
59
|
const thisID = getID(thisRef.current);
|
|
60
60
|
if (thisID) {
|
|
61
|
-
setUniqueID(
|
|
61
|
+
setUniqueID(`${thisID}__video`);
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
}, [thisRef]);
|
|
@@ -98,7 +98,7 @@ const SingleMessage = _ref => {
|
|
|
98
98
|
const handlePlay = thisUniqueID => {
|
|
99
99
|
setOnPlay(true);
|
|
100
100
|
// Trigger play and update video state
|
|
101
|
-
const thisVideoID =
|
|
101
|
+
const thisVideoID = `${thisUniqueID}__video`;
|
|
102
102
|
setTimeout(() => {
|
|
103
103
|
allPlayers[thisVideoID].playVideo();
|
|
104
104
|
// Once video is playing, switch state to allow CSS to show/hide relevant layers
|
|
@@ -115,12 +115,12 @@ const SingleMessage = _ref => {
|
|
|
115
115
|
/*#__PURE__*/
|
|
116
116
|
// Creates namespaced UUIDs for each row
|
|
117
117
|
_react.default.createElement(_reactUid.UID, {
|
|
118
|
-
name: id =>
|
|
118
|
+
name: id => `single-msg__${id}`
|
|
119
119
|
}, id => /*#__PURE__*/_react.default.createElement(_SingleMessage.Container, {
|
|
120
120
|
backgroundColor: backgroundColor,
|
|
121
121
|
copyFirst: copyFirst,
|
|
122
122
|
vhFull: vhFull,
|
|
123
|
-
id:
|
|
123
|
+
id: `${id}`,
|
|
124
124
|
isPlaying: isPlaying,
|
|
125
125
|
hasVideo: hasVideo,
|
|
126
126
|
landscapeVideo: landscapeVideo,
|
|
@@ -161,7 +161,7 @@ const PlayButton = exports.PlayButton = _styledComponents.default.button.withCon
|
|
|
161
161
|
let {
|
|
162
162
|
isBuffering
|
|
163
163
|
} = _ref25;
|
|
164
|
-
return isBuffering === true ?
|
|
164
|
+
return isBuffering === true ? `url(${_loader.default})` : `url(${_videoPlayIcon.default})`;
|
|
165
165
|
}, _ref26 => {
|
|
166
166
|
let {
|
|
167
167
|
copyFirst
|
|
@@ -176,7 +176,7 @@ const PlayButton = exports.PlayButton = _styledComponents.default.button.withCon
|
|
|
176
176
|
let {
|
|
177
177
|
isBuffering
|
|
178
178
|
} = _ref28;
|
|
179
|
-
return isBuffering === true ?
|
|
179
|
+
return isBuffering === true ? `url(${_loader.default})` : `url(${_videoPlayIcon__hover.default})`;
|
|
180
180
|
}, _ref29 => {
|
|
181
181
|
let {
|
|
182
182
|
theme
|
|
@@ -145,7 +145,7 @@ const SingleMessageDs = _ref => {
|
|
|
145
145
|
}), /*#__PURE__*/_react.default.createElement("iframe", {
|
|
146
146
|
width: "100%",
|
|
147
147
|
height: "100%",
|
|
148
|
-
src:
|
|
148
|
+
src: `https://www.youtube.com/embed/${youTubeId}?&autoplay=1&enablejsapi=1`,
|
|
149
149
|
frameBorder: "0",
|
|
150
150
|
allow: "accelerometer; autoplay; clipboard-write; encrypted-media; picture-in-picture",
|
|
151
151
|
allowFullScreen: true,
|
|
@@ -50,7 +50,7 @@ const MediaLink = exports.MediaLink = _styledComponents.default.a.withConfig({
|
|
|
50
50
|
let {
|
|
51
51
|
imageLeft
|
|
52
52
|
} = _ref5;
|
|
53
|
-
return imageLeft ?
|
|
53
|
+
return imageLeft ? `margin-right: ${(0, _spacing.default)('m')}` : `margin-left: ${(0, _spacing.default)('m')}`;
|
|
54
54
|
}, _ref6 => {
|
|
55
55
|
let {
|
|
56
56
|
theme
|
|
@@ -86,7 +86,7 @@ const CTA = exports.CTA = _styledComponents.default.div.withConfig({
|
|
|
86
86
|
let {
|
|
87
87
|
hasImage
|
|
88
88
|
} = _ref9;
|
|
89
|
-
return !hasImage &&
|
|
89
|
+
return !hasImage && `bottom: -${(0, _spacing.default)('m')};`;
|
|
90
90
|
});
|
|
91
91
|
const Copy = exports.Copy = _styledComponents.default.div.withConfig({
|
|
92
92
|
displayName: "SingleMessageDsstyle__Copy",
|
|
@@ -101,12 +101,12 @@ const Copy = exports.Copy = _styledComponents.default.div.withConfig({
|
|
|
101
101
|
let {
|
|
102
102
|
hasLink
|
|
103
103
|
} = _ref11;
|
|
104
|
-
return hasLink &&
|
|
104
|
+
return hasLink && `padding-bottom: calc(${(0, _spacing.default)('l')} + ${(0, _spacing.default)('m')})`;
|
|
105
105
|
}, _ref12 => {
|
|
106
106
|
let {
|
|
107
107
|
imageLeft
|
|
108
108
|
} = _ref12;
|
|
109
|
-
return imageLeft ?
|
|
109
|
+
return imageLeft ? `margin: -${(0, _spacing.default)('m')} 0 ${(0, _spacing.default)('m')} ${(0, _spacing.default)('m')}; ${CTA} { right: ${(0, _spacing.default)('m')};}` : `margin: -${(0, _spacing.default)('m')} ${(0, _spacing.default)('m')} ${(0, _spacing.default)('m')} 0; ${CTA} { left: ${(0, _spacing.default)('m')};}`;
|
|
110
110
|
}, _ref13 => {
|
|
111
111
|
let {
|
|
112
112
|
theme
|
|
@@ -116,12 +116,12 @@ const Copy = exports.Copy = _styledComponents.default.div.withConfig({
|
|
|
116
116
|
let {
|
|
117
117
|
hasLink
|
|
118
118
|
} = _ref14;
|
|
119
|
-
return hasLink &&
|
|
119
|
+
return hasLink && `padding-bottom: calc(${(0, _spacing.default)('l')} + ${(0, _spacing.default)('m')})`;
|
|
120
120
|
}, _ref15 => {
|
|
121
121
|
let {
|
|
122
122
|
imageLeft
|
|
123
123
|
} = _ref15;
|
|
124
|
-
return imageLeft ?
|
|
124
|
+
return imageLeft ? `margin: ${(0, _spacing.default)('l')} 0 ${(0, _spacing.default)('m')} -${(0, _spacing.default)('m')}` : `margin: ${(0, _spacing.default)('l')} -${(0, _spacing.default)('m')} ${(0, _spacing.default)('m')} 0`;
|
|
125
125
|
}, _ref16 => {
|
|
126
126
|
let {
|
|
127
127
|
theme
|
|
@@ -131,10 +131,10 @@ const Copy = exports.Copy = _styledComponents.default.div.withConfig({
|
|
|
131
131
|
let {
|
|
132
132
|
hasLink
|
|
133
133
|
} = _ref17;
|
|
134
|
-
return hasLink &&
|
|
134
|
+
return hasLink && `padding-bottom: calc(${(0, _spacing.default)('m')} * 3)`;
|
|
135
135
|
}, _ref18 => {
|
|
136
136
|
let {
|
|
137
137
|
imageLeft
|
|
138
138
|
} = _ref18;
|
|
139
|
-
return imageLeft ?
|
|
139
|
+
return imageLeft ? `${(0, _spacing.default)('l')} 0 ${(0, _spacing.default)('m')} -${(0, _spacing.default)('l')}` : `${(0, _spacing.default)('l')} -${(0, _spacing.default)('l')} ${(0, _spacing.default)('m')} 0`;
|
|
140
140
|
});
|
|
@@ -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"
|