@comicrelief/component-library 8.1.2 → 8.2.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/.eslintrc +1 -0
- package/dist/components/Atoms/Button/Button.js +3 -7
- package/dist/components/Atoms/ButtonWithStates/ButtonWithStates.js +3 -8
- package/dist/components/Atoms/Checkbox/Checkbox.js +2 -6
- package/dist/components/Atoms/Confetti/Confetti.js +2 -5
- package/dist/components/Atoms/Icons/Arrow.js +4 -10
- package/dist/components/Atoms/Icons/AtSign.js +3 -8
- package/dist/components/Atoms/Icons/Chevron.js +4 -10
- package/dist/components/Atoms/Icons/Download.js +3 -8
- package/dist/components/Atoms/Icons/External.js +3 -8
- package/dist/components/Atoms/Icons/Favourite.js +3 -8
- package/dist/components/Atoms/Icons/Internal.js +3 -8
- package/dist/components/Atoms/Input/Input.js +9 -17
- package/dist/components/Atoms/Label/Label.js +3 -12
- package/dist/components/Atoms/Link/Link.js +9 -18
- package/dist/components/Atoms/Logo/Logo.js +4 -11
- package/dist/components/Atoms/Pagination/Pagination.js +39 -52
- package/dist/components/Atoms/Picture/Picture.js +10 -22
- package/dist/components/Atoms/RichText/RichText.js +2 -6
- package/dist/components/Atoms/Select/Select.js +6 -16
- package/dist/components/Atoms/SocialIcons/SocialIcons.js +2 -3
- package/dist/components/Atoms/Text/Text.js +12 -17
- package/dist/components/Atoms/TextArea/TextArea.js +6 -11
- package/dist/components/Atoms/TextInputWithDropdown/TextInputWithDropdown.js +2 -9
- package/dist/components/Molecules/ArticleTeaser/ArticleTeaser.js +8 -18
- package/dist/components/Molecules/Banner/Banner.js +1 -4
- package/dist/components/Molecules/Box/Box.js +6 -17
- package/dist/components/Molecules/Card/Card.js +11 -24
- package/dist/components/Molecules/CardDs/CardDs.js +11 -24
- package/dist/components/Molecules/Chip/Chip.js +2 -6
- package/dist/components/Molecules/Countdown/Countdown.js +3 -8
- package/dist/components/Molecules/Logos/Logos.js +1 -4
- package/dist/components/Molecules/Lookup/Lookup.js +2 -6
- package/dist/components/Molecules/Promo/Promo.js +17 -36
- package/dist/components/Molecules/SchoolLookup/SchoolLookup.js +4 -10
- package/dist/components/Molecules/SearchInput/SearchInput.js +1 -4
- package/dist/components/Molecules/SearchResult/SearchResult.js +8 -17
- package/dist/components/Molecules/ShareButton/ShareButton.js +3 -8
- package/dist/components/Molecules/SimpleSchoolLookup/SimpleSchoolLookup.js +1 -4
- package/dist/components/Molecules/SingleMessage/SingleMessage.js +15 -32
- package/dist/components/Molecules/SingleMessageDS/SingleMessageDs.js +13 -28
- package/dist/components/Molecules/Typeahead/Typeahead.js +3 -8
- package/dist/components/Molecules/VideoBanner/VideoBanner.js +5 -12
- package/dist/components/Organisms/Donate/Donate.js +31 -65
- package/dist/components/Organisms/Donate/Form/Form.js +6 -19
- package/dist/components/Organisms/Donate/GivingSelector/GivingSelector.js +1 -4
- package/dist/components/Organisms/Donate/MoneyBuy/MoneyBuy.js +3 -8
- package/dist/components/Organisms/EmailSignUp/_EmailSignUp.js +4 -9
- package/dist/components/Organisms/EmailSignUp/_TextInput.js +3 -8
- package/dist/components/Organisms/Footer/Footer.js +6 -11
- package/dist/components/Organisms/Footer/Nav/Nav.js +1 -4
- package/dist/components/Organisms/Header/Header.js +2 -6
- package/dist/components/Organisms/Header/Nav/Nav.js +1 -4
- package/dist/components/Organisms/ImpactSlider/ImpactSlider.js +3 -8
- package/dist/components/Organisms/MarketingPreferencesDS/_CheckAnswer.js +2 -6
- package/dist/components/Organisms/MarketingPreferencesDS/_MarketingPreferencesDS.js +6 -16
- package/dist/components/Organisms/MarketingPreferencesDS/_TextInput.js +3 -8
- package/dist/components/Organisms/Membership/Form/Form.js +1 -5
- package/dist/components/Organisms/Membership/Membership.js +9 -19
- package/dist/components/Organisms/Membership/MoneyBox/MoneyBox.js +3 -8
- package/package.json +1 -1
- package/src/components/Atoms/Button/Button.js +3 -8
- package/src/components/Atoms/ButtonWithStates/ButtonWithStates.js +1 -7
- package/src/components/Atoms/Checkbox/Checkbox.js +1 -6
- package/src/components/Atoms/Confetti/Confetti.js +1 -5
- package/src/components/Atoms/Icons/Arrow.js +1 -8
- package/src/components/Atoms/Icons/AtSign.js +1 -7
- package/src/components/Atoms/Icons/Chevron.js +1 -8
- package/src/components/Atoms/Icons/Download.js +1 -7
- package/src/components/Atoms/Icons/External.js +1 -7
- package/src/components/Atoms/Icons/Favourite.js +1 -7
- package/src/components/Atoms/Icons/Internal.js +1 -7
- package/src/components/Atoms/Input/Input.js +9 -18
- package/src/components/Atoms/Label/Label.js +3 -13
- package/src/components/Atoms/Link/Link.js +9 -19
- package/src/components/Atoms/Logo/Logo.js +1 -8
- package/src/components/Atoms/Pagination/Pagination.js +38 -51
- package/src/components/Atoms/Picture/Picture.js +10 -23
- package/src/components/Atoms/RichText/RichText.js +1 -6
- package/src/components/Atoms/Select/Select.js +6 -17
- package/src/components/Atoms/SocialIcons/SocialIcons.js +2 -5
- package/src/components/Atoms/Text/Text.js +4 -13
- package/src/components/Atoms/TextArea/TextArea.js +2 -9
- package/src/components/Atoms/TextInputWithDropdown/TextInputWithDropdown.js +2 -11
- package/src/components/Molecules/ArticleTeaser/ArticleTeaser.js +8 -19
- package/src/components/Molecules/Banner/Banner.js +1 -5
- package/src/components/Molecules/Box/Box.js +6 -18
- package/src/components/Molecules/Card/Card.js +11 -25
- package/src/components/Molecules/CardDs/CardDs.js +11 -25
- package/src/components/Molecules/Chip/Chip.js +1 -6
- package/src/components/Molecules/Countdown/Countdown.js +1 -7
- package/src/components/Molecules/Logos/Logos.js +1 -5
- package/src/components/Molecules/Lookup/Lookup.js +2 -7
- package/src/components/Molecules/Promo/Promo.js +17 -37
- package/src/components/Molecules/SchoolLookup/SchoolLookup.js +4 -11
- package/src/components/Molecules/SearchInput/SearchInput.js +1 -5
- package/src/components/Molecules/SearchResult/SearchResult.js +8 -18
- package/src/components/Molecules/ShareButton/ShareButton.js +1 -7
- package/src/components/Molecules/SimpleSchoolLookup/SimpleSchoolLookup.js +4 -5
- package/src/components/Molecules/SingleMessage/SingleMessage.js +15 -33
- package/src/components/Molecules/SingleMessageDS/SingleMessageDs.js +13 -29
- package/src/components/Molecules/Typeahead/Typeahead.js +3 -9
- package/src/components/Molecules/VideoBanner/VideoBanner.js +7 -9
- package/src/components/Organisms/Donate/Donate.js +32 -67
- package/src/components/Organisms/Donate/Form/Form.js +6 -22
- package/src/components/Organisms/Donate/GivingSelector/GivingSelector.js +1 -5
- package/src/components/Organisms/Donate/MoneyBuy/MoneyBuy.js +3 -9
- package/src/components/Organisms/EmailSignUp/_EmailSignUp.js +3 -9
- package/src/components/Organisms/EmailSignUp/_TextInput.js +3 -9
- package/src/components/Organisms/Footer/Footer.js +2 -10
- package/src/components/Organisms/Footer/Nav/Nav.js +1 -5
- package/src/components/Organisms/Header/Header.js +1 -6
- package/src/components/Organisms/Header/Nav/Nav.js +1 -5
- package/src/components/Organisms/ImpactSlider/ImpactSlider.js +1 -7
- package/src/components/Organisms/MarketingPreferencesDS/_CheckAnswer.js +1 -6
- package/src/components/Organisms/MarketingPreferencesDS/_MarketingPreferencesDS.js +5 -17
- package/src/components/Organisms/MarketingPreferencesDS/_TextInput.js +1 -7
- package/src/components/Organisms/Membership/Form/Form.js +1 -5
- package/src/components/Organisms/Membership/Membership.js +9 -19
- package/src/components/Organisms/Membership/MoneyBox/MoneyBox.js +3 -9
|
@@ -87,31 +87,26 @@ const BaseText = exports.BaseText = _styledComponents.default.span.withConfig({
|
|
|
87
87
|
*/
|
|
88
88
|
const Text = _ref13 => {
|
|
89
89
|
let {
|
|
90
|
-
tag,
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
90
|
+
tag = 'span',
|
|
91
|
+
size = 's',
|
|
92
|
+
color = 'inherit',
|
|
93
|
+
children = undefined,
|
|
94
|
+
uppercase = false,
|
|
95
|
+
height = undefined,
|
|
96
|
+
weight = undefined,
|
|
97
|
+
family = null,
|
|
98
|
+
mobileColor = null,
|
|
96
99
|
...rest
|
|
97
100
|
} = _ref13;
|
|
98
101
|
return /*#__PURE__*/_react.default.createElement(BaseText, Object.assign({}, rest, {
|
|
99
102
|
as: tag,
|
|
103
|
+
color: color,
|
|
104
|
+
size: size,
|
|
105
|
+
uppercase: uppercase,
|
|
100
106
|
height: height,
|
|
101
107
|
weight: weight,
|
|
102
108
|
family: family,
|
|
103
109
|
mobileColor: mobileColor
|
|
104
110
|
}), children);
|
|
105
111
|
};
|
|
106
|
-
Text.defaultProps = {
|
|
107
|
-
family: null,
|
|
108
|
-
tag: 'span',
|
|
109
|
-
weight: undefined,
|
|
110
|
-
height: undefined,
|
|
111
|
-
uppercase: false,
|
|
112
|
-
size: 's',
|
|
113
|
-
color: 'inherit',
|
|
114
|
-
children: undefined,
|
|
115
|
-
mobileColor: null
|
|
116
|
-
};
|
|
117
112
|
var _default = exports.default = Text;
|
|
@@ -26,10 +26,11 @@ const TextArea = /*#__PURE__*/_react.default.forwardRef((_ref2, ref) => {
|
|
|
26
26
|
let {
|
|
27
27
|
id,
|
|
28
28
|
label,
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
placeholder = '',
|
|
30
|
+
hideLabel = false,
|
|
31
|
+
errorMsg = undefined,
|
|
32
|
+
rows = 4,
|
|
33
|
+
className = '',
|
|
33
34
|
...rest
|
|
34
35
|
} = _ref2;
|
|
35
36
|
return /*#__PURE__*/_react.default.createElement(_Label.default, {
|
|
@@ -39,6 +40,7 @@ const TextArea = /*#__PURE__*/_react.default.forwardRef((_ref2, ref) => {
|
|
|
39
40
|
errorMsg: errorMsg,
|
|
40
41
|
className: className
|
|
41
42
|
}, /*#__PURE__*/_react.default.createElement(StyledTextArea, Object.assign({}, rest, {
|
|
43
|
+
placeholder: placeholder,
|
|
42
44
|
rows: rows,
|
|
43
45
|
error: !!errorMsg,
|
|
44
46
|
"aria-describedby": id,
|
|
@@ -61,11 +63,4 @@ TextArea.propTypes = {
|
|
|
61
63
|
// (as `rest` is not spread on the outermost component)
|
|
62
64
|
className: _propTypes.default.string
|
|
63
65
|
};
|
|
64
|
-
TextArea.defaultProps = {
|
|
65
|
-
rows: 4,
|
|
66
|
-
placeholder: '',
|
|
67
|
-
errorMsg: undefined,
|
|
68
|
-
hideLabel: false,
|
|
69
|
-
className: ''
|
|
70
|
-
};
|
|
71
66
|
var _default = exports.default = TextArea;
|
|
@@ -32,8 +32,8 @@ const TextInputWithDropdown = /*#__PURE__*/_react.default.forwardRef((_ref, ref)
|
|
|
32
32
|
id,
|
|
33
33
|
name,
|
|
34
34
|
label,
|
|
35
|
-
dropdownInstruction,
|
|
36
|
-
className,
|
|
35
|
+
dropdownInstruction = null,
|
|
36
|
+
className = '',
|
|
37
37
|
...otherInputProps
|
|
38
38
|
} = _ref;
|
|
39
39
|
const [activeOption, setActiveOption] = (0, _react.useState)(-1);
|
|
@@ -130,11 +130,4 @@ const Options = _ref2 => {
|
|
|
130
130
|
ref: index === activeOption ? element => element && element.focus() : null
|
|
131
131
|
}, /*#__PURE__*/_react.default.createElement(_Text.default, null, option)))));
|
|
132
132
|
};
|
|
133
|
-
TextInputWithDropdown.defaultProps = {
|
|
134
|
-
dropdownInstruction: null,
|
|
135
|
-
className: ''
|
|
136
|
-
};
|
|
137
|
-
Options.defaultProps = {
|
|
138
|
-
dropdownInstruction: null
|
|
139
|
-
};
|
|
140
133
|
var _default = exports.default = TextInputWithDropdown;
|
|
@@ -141,14 +141,14 @@ const ArticleTeaser = _ref15 => {
|
|
|
141
141
|
href,
|
|
142
142
|
date,
|
|
143
143
|
title,
|
|
144
|
-
imageLow,
|
|
145
|
-
image,
|
|
146
|
-
images,
|
|
147
|
-
alt,
|
|
148
|
-
category,
|
|
149
|
-
logoSize,
|
|
150
|
-
family,
|
|
151
|
-
time
|
|
144
|
+
imageLow = null,
|
|
145
|
+
image = null,
|
|
146
|
+
images = null,
|
|
147
|
+
alt = '',
|
|
148
|
+
category = null,
|
|
149
|
+
logoSize = null,
|
|
150
|
+
family = 'Anton',
|
|
151
|
+
time = null
|
|
152
152
|
} = _ref15;
|
|
153
153
|
return /*#__PURE__*/_react.default.createElement(Wrapper, null, /*#__PURE__*/_react.default.createElement(Link, {
|
|
154
154
|
href: href,
|
|
@@ -184,14 +184,4 @@ const ArticleTeaser = _ref15 => {
|
|
|
184
184
|
color: "grey_dark"
|
|
185
185
|
}, time))));
|
|
186
186
|
};
|
|
187
|
-
ArticleTeaser.defaultProps = {
|
|
188
|
-
imageLow: null,
|
|
189
|
-
image: null,
|
|
190
|
-
images: null,
|
|
191
|
-
category: null,
|
|
192
|
-
logoSize: null,
|
|
193
|
-
time: null,
|
|
194
|
-
alt: '',
|
|
195
|
-
family: 'Anton'
|
|
196
|
-
};
|
|
197
187
|
var _default = exports.default = ArticleTeaser;
|
|
@@ -36,13 +36,10 @@ const Container = _styledComponents.default.div.withConfig({
|
|
|
36
36
|
const Banner = _ref4 => {
|
|
37
37
|
let {
|
|
38
38
|
children,
|
|
39
|
-
backgroundColor
|
|
39
|
+
backgroundColor = 'grey_dark'
|
|
40
40
|
} = _ref4;
|
|
41
41
|
return /*#__PURE__*/_react.default.createElement(Wrapper, {
|
|
42
42
|
backgroundColor: backgroundColor
|
|
43
43
|
}, /*#__PURE__*/_react.default.createElement(Container, null, children));
|
|
44
44
|
};
|
|
45
|
-
Banner.defaultProps = {
|
|
46
|
-
backgroundColor: 'grey_dark'
|
|
47
|
-
};
|
|
48
45
|
var _default = exports.default = Banner;
|
|
@@ -43,14 +43,13 @@ const Copy = _styledComponents.default.div.withConfig({
|
|
|
43
43
|
});
|
|
44
44
|
const Box = _ref5 => {
|
|
45
45
|
let {
|
|
46
|
-
imageLow,
|
|
47
|
-
images,
|
|
48
|
-
image,
|
|
46
|
+
imageLow = null,
|
|
47
|
+
images = null,
|
|
48
|
+
image = null,
|
|
49
49
|
imageAltText,
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
squaredCorners,
|
|
50
|
+
width = '100%',
|
|
51
|
+
children = null,
|
|
52
|
+
squaredCorners = false,
|
|
54
53
|
...rest
|
|
55
54
|
} = _ref5;
|
|
56
55
|
return /*#__PURE__*/_react.default.createElement(Container, rest, imageLow ? /*#__PURE__*/_react.default.createElement(Image, {
|
|
@@ -65,14 +64,4 @@ const Box = _ref5 => {
|
|
|
65
64
|
squaredCorners: squaredCorners
|
|
66
65
|
})) : null, children ? /*#__PURE__*/_react.default.createElement(Copy, null, children) : null);
|
|
67
66
|
};
|
|
68
|
-
Box.defaultProps = {
|
|
69
|
-
children: null,
|
|
70
|
-
imageLow: null,
|
|
71
|
-
images: null,
|
|
72
|
-
image: null,
|
|
73
|
-
imageAltText: '',
|
|
74
|
-
width: '100%',
|
|
75
|
-
height: '100%',
|
|
76
|
-
squaredCorners: false
|
|
77
|
-
};
|
|
78
67
|
var _default = exports.default = Box;
|
|
@@ -10,17 +10,17 @@ var _Picture = _interopRequireDefault(require("../../Atoms/Picture/Picture"));
|
|
|
10
10
|
var _Card = require("./Card.style");
|
|
11
11
|
const Card = _ref => {
|
|
12
12
|
let {
|
|
13
|
-
backgroundColor,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
width,
|
|
20
|
-
|
|
21
|
-
squaredCorners,
|
|
22
|
-
smallBreakpointRowLayout,
|
|
23
|
-
mediumBreakpointRowLayout,
|
|
13
|
+
backgroundColor = 'white',
|
|
14
|
+
children = null,
|
|
15
|
+
imageLow = null,
|
|
16
|
+
images = null,
|
|
17
|
+
image = null,
|
|
18
|
+
imageAltText = '',
|
|
19
|
+
width = '100%',
|
|
20
|
+
height = '100%',
|
|
21
|
+
squaredCorners = false,
|
|
22
|
+
smallBreakpointRowLayout = null,
|
|
23
|
+
mediumBreakpointRowLayout = null,
|
|
24
24
|
...rest
|
|
25
25
|
} = _ref;
|
|
26
26
|
return /*#__PURE__*/_react.default.createElement(_Card.Container, Object.assign({
|
|
@@ -43,17 +43,4 @@ const Card = _ref => {
|
|
|
43
43
|
mediumBreakpointRowLayout: mediumBreakpointRowLayout
|
|
44
44
|
}, children) : null);
|
|
45
45
|
};
|
|
46
|
-
Card.defaultProps = {
|
|
47
|
-
backgroundColor: 'white',
|
|
48
|
-
children: null,
|
|
49
|
-
imageLow: null,
|
|
50
|
-
images: null,
|
|
51
|
-
image: null,
|
|
52
|
-
imageAltText: '',
|
|
53
|
-
width: '100%',
|
|
54
|
-
height: '100%',
|
|
55
|
-
squaredCorners: false,
|
|
56
|
-
smallBreakpointRowLayout: null,
|
|
57
|
-
mediumBreakpointRowLayout: null
|
|
58
|
-
};
|
|
59
46
|
var _default = exports.default = Card;
|
|
@@ -11,18 +11,18 @@ var _Link = _interopRequireDefault(require("../../Atoms/Link/Link"));
|
|
|
11
11
|
var _CardDs = require("./CardDs.style");
|
|
12
12
|
const CardDs = _ref => {
|
|
13
13
|
let {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
14
|
+
backgroundColor = 'white',
|
|
15
|
+
imageLow = null,
|
|
16
|
+
images = null,
|
|
17
|
+
image = null,
|
|
18
|
+
link = null,
|
|
19
|
+
linkLabel = null,
|
|
20
|
+
target = null,
|
|
21
|
+
imageAltText = '',
|
|
22
|
+
width = '100%',
|
|
23
|
+
height = '100%',
|
|
24
|
+
icon = null,
|
|
22
25
|
children,
|
|
23
|
-
link,
|
|
24
|
-
linkLabel,
|
|
25
|
-
target,
|
|
26
26
|
...rest
|
|
27
27
|
} = _ref;
|
|
28
28
|
const Media = /*#__PURE__*/_react.default.createElement(_CardDs.Image, {
|
|
@@ -68,17 +68,4 @@ const CardDs = _ref => {
|
|
|
68
68
|
"data-button-cta-copy": linkLabel
|
|
69
69
|
}, linkLabel)));
|
|
70
70
|
};
|
|
71
|
-
CardDs.defaultProps = {
|
|
72
|
-
backgroundColor: 'white',
|
|
73
|
-
imageLow: null,
|
|
74
|
-
images: null,
|
|
75
|
-
image: null,
|
|
76
|
-
link: null,
|
|
77
|
-
linkLabel: null,
|
|
78
|
-
target: null,
|
|
79
|
-
imageAltText: '',
|
|
80
|
-
width: '100%',
|
|
81
|
-
height: '100%',
|
|
82
|
-
icon: null
|
|
83
|
-
};
|
|
84
71
|
var _default = exports.default = CardDs;
|
|
@@ -11,8 +11,8 @@ const Chip = _ref => {
|
|
|
11
11
|
let {
|
|
12
12
|
category,
|
|
13
13
|
handleToggle,
|
|
14
|
-
color,
|
|
15
|
-
checked
|
|
14
|
+
color = 'purple',
|
|
15
|
+
checked = false
|
|
16
16
|
} = _ref;
|
|
17
17
|
return /*#__PURE__*/_react.default.createElement(_Chip.CheckLabel, null, /*#__PURE__*/_react.default.createElement(_Chip.CheckInput, {
|
|
18
18
|
onChange: handleToggle,
|
|
@@ -22,8 +22,4 @@ const Chip = _ref => {
|
|
|
22
22
|
checked: checked
|
|
23
23
|
}), /*#__PURE__*/_react.default.createElement("span", null), /*#__PURE__*/_react.default.createElement(_Chip.Overlay, null), category);
|
|
24
24
|
};
|
|
25
|
-
Chip.defaultProps = {
|
|
26
|
-
color: 'purple',
|
|
27
|
-
checked: false
|
|
28
|
-
};
|
|
29
25
|
var _default = exports.default = Chip;
|
|
@@ -13,9 +13,9 @@ var _Countdown = require("./Countdown.style");
|
|
|
13
13
|
const Countdown = _ref => {
|
|
14
14
|
let {
|
|
15
15
|
endDate,
|
|
16
|
-
color,
|
|
17
|
-
endMessage,
|
|
18
|
-
introMessage
|
|
16
|
+
color = 'black',
|
|
17
|
+
endMessage = null,
|
|
18
|
+
introMessage = null
|
|
19
19
|
} = _ref;
|
|
20
20
|
const [countdownHasEnded, setCountdownHasEnded] = (0, _react.useState)(false);
|
|
21
21
|
const [countdownTime, setCountdownTime] = (0, _react.useState)({
|
|
@@ -88,9 +88,4 @@ const Countdown = _ref => {
|
|
|
88
88
|
uppercase: true
|
|
89
89
|
}, "seconds"))));
|
|
90
90
|
};
|
|
91
|
-
Countdown.defaultProps = {
|
|
92
|
-
color: 'black',
|
|
93
|
-
endMessage: null,
|
|
94
|
-
introMessage: null
|
|
95
|
-
};
|
|
96
91
|
var _default = exports.default = Countdown;
|
|
@@ -14,7 +14,7 @@ const TitleLabel = _styledComponents.default.span.withConfig({
|
|
|
14
14
|
})(["line-height:0;font-size:0;color:transparent;"]);
|
|
15
15
|
const Logos = _ref => {
|
|
16
16
|
let {
|
|
17
|
-
campaign
|
|
17
|
+
campaign = 'Comic Relief'
|
|
18
18
|
} = _ref;
|
|
19
19
|
if (campaign === 'Sport Relief Gameon') {
|
|
20
20
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("a", {
|
|
@@ -65,7 +65,4 @@ const Logos = _ref => {
|
|
|
65
65
|
title: "Go to Comic Relief homepage"
|
|
66
66
|
}), /*#__PURE__*/_react.default.createElement(TitleLabel, null, "Go to Comic Relief homepage"));
|
|
67
67
|
};
|
|
68
|
-
Logos.defaultProps = {
|
|
69
|
-
campaign: 'Comic Relief'
|
|
70
|
-
};
|
|
71
68
|
var _default = exports.default = Logos;
|
|
@@ -60,8 +60,8 @@ const Lookup = _ref2 => {
|
|
|
60
60
|
lookupHandler,
|
|
61
61
|
mapOptionToString,
|
|
62
62
|
onSelect,
|
|
63
|
-
noResultsMessage,
|
|
64
|
-
dropdownInstruction,
|
|
63
|
+
noResultsMessage = 'Sorry, could not find any results for your search',
|
|
64
|
+
dropdownInstruction = '',
|
|
65
65
|
...rest
|
|
66
66
|
} = _ref2;
|
|
67
67
|
const [query, setQuery] = (0, _react.useState)('');
|
|
@@ -121,10 +121,6 @@ const Lookup = _ref2 => {
|
|
|
121
121
|
loadingText: "Searching"
|
|
122
122
|
}, buttonText));
|
|
123
123
|
};
|
|
124
|
-
Lookup.defaultProps = {
|
|
125
|
-
noResultsMessage: 'Sorry, could not find any results for your search',
|
|
126
|
-
dropdownInstruction: ''
|
|
127
|
-
};
|
|
128
124
|
var _default = exports.default = Lookup;
|
|
129
125
|
var _StyledTextInputWithDropdown = (0, _styledComponents.default)(_TextInputWithDropdown.default).withConfig({
|
|
130
126
|
displayName: "Lookup___StyledTextInputWithDropdown",
|
|
@@ -13,23 +13,23 @@ var _Picture = _interopRequireDefault(require("../../Atoms/Picture/Picture"));
|
|
|
13
13
|
var _Promo = require("./Promo.style");
|
|
14
14
|
const Promo = _ref => {
|
|
15
15
|
let {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
image,
|
|
21
|
-
imageAltText,
|
|
22
|
-
children,
|
|
23
|
-
position,
|
|
24
|
-
autoPlay,
|
|
25
|
-
loop,
|
|
26
|
-
poster,
|
|
27
|
-
mobilePoster,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
behindTextGradient,
|
|
32
|
-
blackPlayButton
|
|
16
|
+
backgroundColor = 'white',
|
|
17
|
+
copyLeft = false,
|
|
18
|
+
imageSet = null,
|
|
19
|
+
imageLow = null,
|
|
20
|
+
image = null,
|
|
21
|
+
imageAltText = '',
|
|
22
|
+
children = null,
|
|
23
|
+
position = 'none',
|
|
24
|
+
autoPlay = true,
|
|
25
|
+
loop = true,
|
|
26
|
+
poster = null,
|
|
27
|
+
mobilePoster = null,
|
|
28
|
+
videoSrc = null,
|
|
29
|
+
mobileVideoSrc = null,
|
|
30
|
+
showPosterAfterPlaying = true,
|
|
31
|
+
behindTextGradient = 'none',
|
|
32
|
+
blackPlayButton = false
|
|
33
33
|
} = _ref;
|
|
34
34
|
// Store the appropriate prop in state, dependent on the breakpoint
|
|
35
35
|
const [thisVideoSrc, setThisVideoSrc] = (0, _react.useState)(null);
|
|
@@ -97,23 +97,4 @@ const Promo = _ref => {
|
|
|
97
97
|
behindTextGradient: behindTextGradient
|
|
98
98
|
}, children))));
|
|
99
99
|
};
|
|
100
|
-
Promo.defaultProps = {
|
|
101
|
-
backgroundColor: 'white',
|
|
102
|
-
copyLeft: false,
|
|
103
|
-
imageSet: null,
|
|
104
|
-
imageLow: null,
|
|
105
|
-
image: null,
|
|
106
|
-
imageAltText: '',
|
|
107
|
-
children: null,
|
|
108
|
-
position: 'none',
|
|
109
|
-
autoPlay: true,
|
|
110
|
-
loop: true,
|
|
111
|
-
poster: null,
|
|
112
|
-
mobilePoster: null,
|
|
113
|
-
videoSrc: null,
|
|
114
|
-
mobileVideoSrc: null,
|
|
115
|
-
showPosterAfterPlaying: true,
|
|
116
|
-
behindTextGradient: 'none',
|
|
117
|
-
blackPlayButton: false
|
|
118
|
-
};
|
|
119
100
|
var _default = exports.default = Promo;
|
|
@@ -20,10 +20,10 @@ const optionFetcher = async query => {
|
|
|
20
20
|
const optionParser = school => "".concat(school.name, ", ").concat(school.post_code);
|
|
21
21
|
const SchoolLookup = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
|
|
22
22
|
let {
|
|
23
|
-
label,
|
|
24
|
-
placeholder,
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
label = 'Enter the name or postcode of your school or nursery',
|
|
24
|
+
placeholder = 'Type to start search',
|
|
25
|
+
dropdownInstruction = 'Please select a school from the list below',
|
|
26
|
+
notFoundMessage = "Sorry, we can't find this school",
|
|
27
27
|
onSelect,
|
|
28
28
|
...rest
|
|
29
29
|
} = _ref;
|
|
@@ -43,10 +43,4 @@ const SchoolLookup = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
|
|
|
43
43
|
ref: ref
|
|
44
44
|
}));
|
|
45
45
|
});
|
|
46
|
-
SchoolLookup.defaultProps = {
|
|
47
|
-
label: 'Enter the name or postcode of your school or nursery',
|
|
48
|
-
placeholder: 'Type to start search',
|
|
49
|
-
dropdownInstruction: 'Please select a school from the list below',
|
|
50
|
-
notFoundMessage: "Sorry, we can't find this school"
|
|
51
|
-
};
|
|
52
46
|
var _default = exports.default = SchoolLookup;
|
|
@@ -10,7 +10,7 @@ var _SearchInput = require("./SearchInput.style");
|
|
|
10
10
|
const SearchInput = _ref => {
|
|
11
11
|
let {
|
|
12
12
|
onChange,
|
|
13
|
-
placeholder,
|
|
13
|
+
placeholder = '',
|
|
14
14
|
value,
|
|
15
15
|
...rest
|
|
16
16
|
} = _ref;
|
|
@@ -29,7 +29,4 @@ const SearchInput = _ref => {
|
|
|
29
29
|
errorMsg: ""
|
|
30
30
|
}, rest))))));
|
|
31
31
|
};
|
|
32
|
-
SearchInput.defaultProps = {
|
|
33
|
-
placeholder: ''
|
|
34
|
-
};
|
|
35
32
|
var _default = exports.default = SearchInput;
|
|
@@ -70,16 +70,16 @@ const Title = (0, _styledComponents.default)(_Text.default).withConfig({
|
|
|
70
70
|
*/
|
|
71
71
|
const SearchResult = _ref7 => {
|
|
72
72
|
let {
|
|
73
|
+
imageLow = null,
|
|
74
|
+
images = null,
|
|
75
|
+
type = '',
|
|
76
|
+
date = '',
|
|
77
|
+
copy = '',
|
|
78
|
+
smallImageWidth = '45%',
|
|
79
|
+
largeImageWidth = '100%',
|
|
73
80
|
href,
|
|
74
|
-
date,
|
|
75
81
|
title,
|
|
76
|
-
|
|
77
|
-
type,
|
|
78
|
-
imageLow,
|
|
79
|
-
images,
|
|
80
|
-
alt,
|
|
81
|
-
smallImageWidth,
|
|
82
|
-
largeImageWidth
|
|
82
|
+
alt
|
|
83
83
|
} = _ref7;
|
|
84
84
|
return /*#__PURE__*/_react.default.createElement(Wrapper, null, /*#__PURE__*/_react.default.createElement(Item, {
|
|
85
85
|
href: href,
|
|
@@ -104,13 +104,4 @@ const SearchResult = _ref7 => {
|
|
|
104
104
|
tag: "p"
|
|
105
105
|
}, copy))));
|
|
106
106
|
};
|
|
107
|
-
SearchResult.defaultProps = {
|
|
108
|
-
imageLow: null,
|
|
109
|
-
images: null,
|
|
110
|
-
type: '',
|
|
111
|
-
date: '',
|
|
112
|
-
copy: '',
|
|
113
|
-
smallImageWidth: '45%',
|
|
114
|
-
largeImageWidth: '100%'
|
|
115
|
-
};
|
|
116
107
|
var _default = exports.default = SearchResult;
|
|
@@ -26,9 +26,9 @@ const handleShare = (e, typeOfShare, urlToShare) => {
|
|
|
26
26
|
/* Share Button component to handle FB and Twitter sharing */
|
|
27
27
|
const ShareButton = _ref => {
|
|
28
28
|
let {
|
|
29
|
-
campaign,
|
|
30
|
-
copy,
|
|
31
|
-
urlToShare,
|
|
29
|
+
campaign = 'comicrelief',
|
|
30
|
+
copy = 'Share with:',
|
|
31
|
+
urlToShare = null,
|
|
32
32
|
...restProps
|
|
33
33
|
} = _ref;
|
|
34
34
|
let checkedUrl = '';
|
|
@@ -53,9 +53,4 @@ const ShareButton = _ref => {
|
|
|
53
53
|
href: "#"
|
|
54
54
|
}, restProps))))));
|
|
55
55
|
};
|
|
56
|
-
ShareButton.defaultProps = {
|
|
57
|
-
campaign: 'comicrelief',
|
|
58
|
-
copy: 'Share with:',
|
|
59
|
-
urlToShare: null
|
|
60
|
-
};
|
|
61
56
|
var _default = exports.default = ShareButton;
|
|
@@ -47,7 +47,7 @@ const schoolToString = school => "".concat(school.name, ", ").concat(school.post
|
|
|
47
47
|
const SimpleSchoolLookup = _ref => {
|
|
48
48
|
let {
|
|
49
49
|
onSelect,
|
|
50
|
-
noResultsMessage,
|
|
50
|
+
noResultsMessage = 'Sorry, we could not find anything matching your search; please use the manual entry option.',
|
|
51
51
|
...rest
|
|
52
52
|
} = _ref;
|
|
53
53
|
return /*#__PURE__*/_react.default.createElement(_Lookup.default, Object.assign({
|
|
@@ -62,7 +62,4 @@ const SimpleSchoolLookup = _ref => {
|
|
|
62
62
|
onSelect: onSelect
|
|
63
63
|
}, rest));
|
|
64
64
|
};
|
|
65
|
-
SimpleSchoolLookup.defaultProps = {
|
|
66
|
-
noResultsMessage: 'Sorry, we could not find anything matching your search; please use the manual entry option.'
|
|
67
|
-
};
|
|
68
65
|
var _default = exports.default = SimpleSchoolLookup;
|
|
@@ -16,21 +16,21 @@ const allPlayers = {};
|
|
|
16
16
|
/* Single Message is our main component usually to build landing pages */
|
|
17
17
|
const SingleMessage = _ref => {
|
|
18
18
|
let {
|
|
19
|
-
backgroundColor,
|
|
20
|
-
copyFirst,
|
|
21
|
-
|
|
22
|
-
imageSet,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
vhFull,
|
|
31
|
-
videoID,
|
|
32
|
-
landscapeVideo,
|
|
33
|
-
paddingOption
|
|
19
|
+
backgroundColor = 'white',
|
|
20
|
+
copyFirst = false,
|
|
21
|
+
fullImage = false,
|
|
22
|
+
imageSet = null,
|
|
23
|
+
imageLow = null,
|
|
24
|
+
image = null,
|
|
25
|
+
imageSet2 = null,
|
|
26
|
+
image2 = null,
|
|
27
|
+
imageAltText = '',
|
|
28
|
+
imageAltText2 = '',
|
|
29
|
+
children = null,
|
|
30
|
+
vhFull = false,
|
|
31
|
+
videoID = null,
|
|
32
|
+
landscapeVideo = false,
|
|
33
|
+
paddingOption = null
|
|
34
34
|
} = _ref;
|
|
35
35
|
const hasImage = imageSet || false;
|
|
36
36
|
const doubleImage = (imageSet || image) && (imageSet2 || image2);
|
|
@@ -172,21 +172,4 @@ const SingleMessage = _ref => {
|
|
|
172
172
|
}, children) : null))
|
|
173
173
|
);
|
|
174
174
|
};
|
|
175
|
-
SingleMessage.defaultProps = {
|
|
176
|
-
backgroundColor: 'white',
|
|
177
|
-
copyFirst: false,
|
|
178
|
-
fullImage: false,
|
|
179
|
-
imageSet: null,
|
|
180
|
-
imageLow: null,
|
|
181
|
-
image: null,
|
|
182
|
-
imageSet2: null,
|
|
183
|
-
image2: null,
|
|
184
|
-
imageAltText: '',
|
|
185
|
-
imageAltText2: '',
|
|
186
|
-
children: null,
|
|
187
|
-
vhFull: false,
|
|
188
|
-
videoID: null,
|
|
189
|
-
landscapeVideo: false,
|
|
190
|
-
paddingOption: null
|
|
191
|
-
};
|
|
192
175
|
var _default = exports.default = SingleMessage;
|
|
@@ -15,22 +15,22 @@ var _SingleMessageDs = require("./SingleMessageDs.style");
|
|
|
15
15
|
var _play = _interopRequireDefault(require("./assets/play.png"));
|
|
16
16
|
const SingleMessageDs = _ref => {
|
|
17
17
|
let {
|
|
18
|
-
backgroundColor,
|
|
18
|
+
backgroundColor = 'white',
|
|
19
|
+
imageLow = null,
|
|
20
|
+
images = null,
|
|
21
|
+
image = null,
|
|
22
|
+
link = null,
|
|
23
|
+
ctaBgColor = 'red',
|
|
24
|
+
linkLabel = null,
|
|
25
|
+
target = null,
|
|
26
|
+
imageAltText = '',
|
|
27
|
+
width = '100%',
|
|
28
|
+
height = '100%',
|
|
29
|
+
linkIcon = null,
|
|
30
|
+
youTubeId = null,
|
|
19
31
|
imageLeft,
|
|
20
|
-
imageLow,
|
|
21
|
-
images,
|
|
22
|
-
image,
|
|
23
|
-
imageAltText,
|
|
24
|
-
height,
|
|
25
|
-
width,
|
|
26
32
|
subtitle,
|
|
27
33
|
children,
|
|
28
|
-
link,
|
|
29
|
-
linkLabel,
|
|
30
|
-
ctaBgColor,
|
|
31
|
-
target,
|
|
32
|
-
linkIcon,
|
|
33
|
-
youTubeId,
|
|
34
34
|
...rest
|
|
35
35
|
} = _ref;
|
|
36
36
|
const [isOpen, setIsOpen] = (0, _react.useState)(false);
|
|
@@ -152,19 +152,4 @@ const SingleMessageDs = _ref => {
|
|
|
152
152
|
title: "Embedded youtube"
|
|
153
153
|
})));
|
|
154
154
|
};
|
|
155
|
-
SingleMessageDs.defaultProps = {
|
|
156
|
-
backgroundColor: 'white',
|
|
157
|
-
imageLow: null,
|
|
158
|
-
images: null,
|
|
159
|
-
image: null,
|
|
160
|
-
link: null,
|
|
161
|
-
ctaBgColor: 'red',
|
|
162
|
-
linkLabel: null,
|
|
163
|
-
target: null,
|
|
164
|
-
imageAltText: '',
|
|
165
|
-
width: '100%',
|
|
166
|
-
height: '100%',
|
|
167
|
-
linkIcon: null,
|
|
168
|
-
youTubeId: null
|
|
169
|
-
};
|
|
170
155
|
var _default = exports.default = SingleMessageDs;
|