@comicrelief/component-library 5.4.0 → 5.7.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/.circleci/config.yml +1 -1
- package/dist/components/Atoms/Button/Button.js +3 -1
- package/dist/components/Atoms/ButtonWithStates/ButtonWithStates.js +91 -0
- package/dist/components/Atoms/ButtonWithStates/ButtonWithStates.md +13 -0
- package/dist/components/Atoms/Checkbox/Checkbox.js +5 -3
- package/dist/components/Atoms/ErrorText/ErrorText.js +3 -1
- package/dist/components/Atoms/Icons/Arrow.js +3 -1
- package/dist/components/Atoms/Icons/AtSign.js +2 -1
- package/dist/components/Atoms/Icons/Chevron.js +3 -1
- package/dist/components/Atoms/Icons/Download.js +3 -1
- package/dist/components/Atoms/Icons/External.js +3 -1
- package/dist/components/Atoms/Icons/Favourite.js +3 -1
- package/dist/components/Atoms/Icons/Internal.js +3 -1
- package/dist/components/Atoms/Input/Input.js +6 -4
- package/dist/components/Atoms/Label/Label.js +5 -2
- package/dist/components/Atoms/Link/Link.js +31 -6
- package/dist/components/Atoms/Link/Link.style.js +3 -3
- package/dist/components/Atoms/Pagination/Item/Item.js +3 -1
- package/dist/components/Atoms/Pagination/List/List.js +5 -3
- package/dist/components/Atoms/Pagination/Pagination.js +3 -1
- package/dist/components/Atoms/Picture/Picture.js +3 -1
- package/dist/components/Atoms/RadioButton/RadioButton.js +3 -1
- package/dist/components/Atoms/RichText/RichText.js +4 -2
- package/dist/components/Atoms/Select/Select.js +3 -1
- package/dist/components/Atoms/SocialIcons/Icon/Icon.js +6 -4
- package/dist/components/Atoms/SocialIcons/SocialIcons.js +5 -3
- package/dist/components/Atoms/Text/Text.js +3 -1
- package/dist/components/Atoms/TextArea/TextArea.js +3 -1
- package/dist/components/Atoms/TextInputWithDropdown/TextInputWithDropdown.js +5 -2
- package/dist/components/Molecules/Accordion/Accordion.js +3 -1
- package/dist/components/Molecules/Box/Box.js +3 -1
- package/dist/components/Molecules/Card/Card.js +3 -1
- package/dist/components/Molecules/CardDs/CardDs.js +8 -6
- package/dist/components/Molecules/Countdown/Countdown.style.js +2 -2
- package/dist/components/Molecules/HeroBanner/HeroBanner.js +3 -3
- package/dist/components/Molecules/Lookup/Lookup.js +201 -0
- package/dist/components/Molecules/PartnerLink/PartnerLink.js +3 -1
- package/dist/components/Molecules/Promo/Promo.style.js +4 -4
- package/dist/components/Molecules/SchoolLookup/SchoolLookup.js +3 -1
- package/dist/components/Molecules/SearchInput/SearchInput.js +3 -1
- package/dist/components/Molecules/SearchResult/SearchResult.js +5 -5
- package/dist/components/Molecules/ShareButton/ShareButton.js +3 -1
- package/dist/components/Molecules/SimpleSchoolLookup/SimpleSchoolLookup.js +112 -0
- package/dist/components/Molecules/SimpleSchoolLookup/SimpleSchoolLookup.md +7 -0
- package/dist/components/Molecules/SingleMessage/SingleMessage.js +1 -1
- package/dist/components/Molecules/SingleMessage/__snapshots__/SingleMessage.test.js.snap +8 -0
- package/dist/components/Molecules/SingleMessageDS/SingleMessageDs.js +3 -1
- package/dist/components/Molecules/SingleMessageDS/SingleMessageDs.style.js +9 -9
- package/dist/components/Molecules/Typeahead/Typeahead.js +3 -1
- package/dist/components/Molecules/VideoBanner/VideoBanner.js +1 -1
- package/dist/components/Organisms/CookieBanner/CookieBanner.style.js +4 -4
- package/dist/components/Organisms/Donate/Form/Form.js +3 -1
- package/dist/components/Organisms/Donate/GivingSelector/GivingSelector.js +4 -4
- package/dist/components/Organisms/Donate/MoneyBox/MoneyBox.js +3 -1
- package/dist/components/Organisms/EmailSignUp/EmailSignUp.js +3 -1
- package/dist/components/Organisms/EmailSignUp/EmailSignUp.style.js +7 -7
- package/dist/components/Organisms/Footer/Footer.js +7 -4
- package/dist/components/Organisms/Footer/Footer.md +8 -1
- package/dist/components/Organisms/Footer/Nav/Nav.js +12 -7
- package/dist/components/Organisms/Footer/Nav/Nav.style.js +8 -8
- package/dist/components/Organisms/Footer/__snapshots__/Footer.test.js.snap +31 -6
- package/dist/components/Organisms/Header/Burger/BurgerMenu.style.js +3 -3
- package/dist/components/Organisms/Header/Header.js +3 -1
- package/dist/components/Organisms/Header/Nav/Nav.js +3 -3
- package/dist/components/Organisms/MarketingPreferencesDS/_TextInput.js +3 -1
- package/dist/components/Organisms/Membership/Form/Form.js +3 -1
- package/dist/components/Organisms/Membership/MoneyBox/MoneyBox.js +3 -1
- package/dist/index.js +24 -0
- package/dist/utils/internalLinkHelper.js +27 -5
- package/package.json +14 -13
- package/src/components/Atoms/ButtonWithStates/ButtonWithStates.js +64 -0
- package/src/components/Atoms/ButtonWithStates/ButtonWithStates.md +13 -0
- package/src/components/Atoms/Link/Link.js +23 -8
- package/src/components/Molecules/Lookup/Lookup.js +148 -0
- package/src/components/Molecules/SimpleSchoolLookup/SimpleSchoolLookup.js +63 -0
- package/src/components/Molecules/SimpleSchoolLookup/SimpleSchoolLookup.md +7 -0
- package/src/components/Molecules/SingleMessage/SingleMessage.js +1 -1
- package/src/components/Molecules/SingleMessage/__snapshots__/SingleMessage.test.js.snap +8 -0
- package/src/components/Organisms/Footer/Footer.js +5 -3
- package/src/components/Organisms/Footer/Footer.md +8 -1
- package/src/components/Organisms/Footer/Nav/Nav.js +4 -3
- package/src/components/Organisms/Footer/__snapshots__/Footer.test.js.snap +31 -6
- package/src/components/Organisms/Header/Nav/Nav.js +1 -1
- package/src/index.js +3 -0
- package/src/utils/internalLinkHelper.js +23 -5
|
@@ -24,7 +24,7 @@ var _spacing = _interopRequireDefault(require("../../../theme/shared/spacing"));
|
|
|
24
24
|
*/
|
|
25
25
|
var Wrapper = _styledComponents.default.article.withConfig({
|
|
26
26
|
displayName: "SearchResult__Wrapper",
|
|
27
|
-
componentId: "wp0ln2-0"
|
|
27
|
+
componentId: "sc-wp0ln2-0"
|
|
28
28
|
})(["width:100%;height:100%;background-color:", ";"], function (_ref) {
|
|
29
29
|
var theme = _ref.theme;
|
|
30
30
|
return theme.color('white');
|
|
@@ -32,7 +32,7 @@ var Wrapper = _styledComponents.default.article.withConfig({
|
|
|
32
32
|
|
|
33
33
|
var Item = (0, _styledComponents.default)(_Link.default).withConfig({
|
|
34
34
|
displayName: "SearchResult__Item",
|
|
35
|
-
componentId: "wp0ln2-1"
|
|
35
|
+
componentId: "sc-wp0ln2-1"
|
|
36
36
|
})(["display:flex;height:100%;border:0;flex-direction:column;text-decoration:none;color:inherit;width:100%;@media ", "{flex-direction:row;}:hover{border:0;font-weight:normal;}"], function (_ref2) {
|
|
37
37
|
var theme = _ref2.theme;
|
|
38
38
|
return theme.breakpoint('small');
|
|
@@ -40,7 +40,7 @@ var Item = (0, _styledComponents.default)(_Link.default).withConfig({
|
|
|
40
40
|
|
|
41
41
|
var ImageWrapper = _styledComponents.default.div.withConfig({
|
|
42
42
|
displayName: "SearchResult__ImageWrapper",
|
|
43
|
-
componentId: "wp0ln2-2"
|
|
43
|
+
componentId: "sc-wp0ln2-2"
|
|
44
44
|
})(["height:auto;@media ", "{width:", ";}@media ", "{width:", ";}"], function (_ref3) {
|
|
45
45
|
var theme = _ref3.theme;
|
|
46
46
|
return theme.breakpoint('small');
|
|
@@ -57,12 +57,12 @@ var ImageWrapper = _styledComponents.default.div.withConfig({
|
|
|
57
57
|
|
|
58
58
|
var CopyWrapper = _styledComponents.default.div.withConfig({
|
|
59
59
|
displayName: "SearchResult__CopyWrapper",
|
|
60
|
-
componentId: "wp0ln2-3"
|
|
60
|
+
componentId: "sc-wp0ln2-3"
|
|
61
61
|
})(["display:flex;flex-direction:column;justify-content:center;padding:", ";width:100%;"], (0, _spacing.default)('md'));
|
|
62
62
|
|
|
63
63
|
var Title = (0, _styledComponents.default)(_Text.default).withConfig({
|
|
64
64
|
displayName: "SearchResult__Title",
|
|
65
|
-
componentId: "wp0ln2-4"
|
|
65
|
+
componentId: "sc-wp0ln2-4"
|
|
66
66
|
})(["margin:0;"]);
|
|
67
67
|
/**
|
|
68
68
|
* Search Result component
|
|
@@ -23,6 +23,8 @@ var _ShareIcons = _interopRequireDefault(require("./assets/ShareIcons"));
|
|
|
23
23
|
|
|
24
24
|
var _ShareButton = require("./ShareButton.style");
|
|
25
25
|
|
|
26
|
+
var _excluded = ["campaign", "copy", "urlToShare"];
|
|
27
|
+
|
|
26
28
|
var handleShare = function handleShare(e, typeOfShare, urlToShare) {
|
|
27
29
|
e.preventDefault();
|
|
28
30
|
(0, _shareTracking.default)(typeOfShare.toLowerCase()); // Pass the current page's URL and the type of share to our helper function
|
|
@@ -38,7 +40,7 @@ var ShareButton = function ShareButton(_ref) {
|
|
|
38
40
|
var campaign = _ref.campaign,
|
|
39
41
|
copy = _ref.copy,
|
|
40
42
|
urlToShare = _ref.urlToShare,
|
|
41
|
-
restProps = (0, _objectWithoutProperties2.default)(_ref,
|
|
43
|
+
restProps = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
42
44
|
var checkedUrl = '';
|
|
43
45
|
/* Window obj isn't available during server-side rendering AND we don't have
|
|
44
46
|
* access to componentDidMount etc. in functional components, so add this check first */
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = void 0;
|
|
9
|
+
|
|
10
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
|
|
11
|
+
|
|
12
|
+
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
13
|
+
|
|
14
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/asyncToGenerator"));
|
|
15
|
+
|
|
16
|
+
var _react = _interopRequireDefault(require("react"));
|
|
17
|
+
|
|
18
|
+
var _axios = _interopRequireDefault(require("axios"));
|
|
19
|
+
|
|
20
|
+
var _Lookup = _interopRequireDefault(require("../Lookup/Lookup"));
|
|
21
|
+
|
|
22
|
+
var _excluded = ["onSelect"];
|
|
23
|
+
|
|
24
|
+
var schoolFetcher = /*#__PURE__*/function () {
|
|
25
|
+
var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(query) {
|
|
26
|
+
var res;
|
|
27
|
+
return _regenerator.default.wrap(function _callee$(_context) {
|
|
28
|
+
while (1) {
|
|
29
|
+
switch (_context.prev = _context.next) {
|
|
30
|
+
case 0:
|
|
31
|
+
if (!(!query || !query.trim())) {
|
|
32
|
+
_context.next = 2;
|
|
33
|
+
break;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
throw new Error('Please enter a search query');
|
|
37
|
+
|
|
38
|
+
case 2:
|
|
39
|
+
if (!(query.length < 2)) {
|
|
40
|
+
_context.next = 4;
|
|
41
|
+
break;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
throw new Error('Please enter at least two characters');
|
|
45
|
+
|
|
46
|
+
case 4:
|
|
47
|
+
_context.prev = 4;
|
|
48
|
+
_context.next = 7;
|
|
49
|
+
return _axios.default.get('https://lookups.sls.comicrelief.com/schools/lookup', {
|
|
50
|
+
timeout: 10000,
|
|
51
|
+
params: {
|
|
52
|
+
query: query
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
case 7:
|
|
57
|
+
res = _context.sent;
|
|
58
|
+
return _context.abrupt("return", res.data.data.schools);
|
|
59
|
+
|
|
60
|
+
case 11:
|
|
61
|
+
_context.prev = 11;
|
|
62
|
+
_context.t0 = _context["catch"](4);
|
|
63
|
+
throw new Error('Sorry, something unexpected went wrong. Please try again or enter your school manually');
|
|
64
|
+
|
|
65
|
+
case 14:
|
|
66
|
+
case "end":
|
|
67
|
+
return _context.stop();
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}, _callee, null, [[4, 11]]);
|
|
71
|
+
}));
|
|
72
|
+
|
|
73
|
+
return function schoolFetcher(_x) {
|
|
74
|
+
return _ref.apply(this, arguments);
|
|
75
|
+
};
|
|
76
|
+
}();
|
|
77
|
+
|
|
78
|
+
var schoolToString = function schoolToString(school) {
|
|
79
|
+
return "".concat(school.name, ", ").concat(school.post_code);
|
|
80
|
+
};
|
|
81
|
+
/**
|
|
82
|
+
* The component library's school lookup component uses a typeahead/search-as-you-type approach.
|
|
83
|
+
*
|
|
84
|
+
* Given the API we use is v flaky and can be slow, this isn't really ideal.
|
|
85
|
+
*
|
|
86
|
+
* This version just has a simple input + a button (or you can hit enter) to trigger the search.
|
|
87
|
+
*
|
|
88
|
+
* @param onSelect
|
|
89
|
+
* @param rest
|
|
90
|
+
* @returns {JSX.Element}
|
|
91
|
+
* @constructor
|
|
92
|
+
*/
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
var SimpleSchoolLookup = function SimpleSchoolLookup(_ref2) {
|
|
96
|
+
var onSelect = _ref2.onSelect,
|
|
97
|
+
rest = (0, _objectWithoutProperties2.default)(_ref2, _excluded);
|
|
98
|
+
return /*#__PURE__*/_react.default.createElement(_Lookup.default, Object.assign({
|
|
99
|
+
name: "school_lookup",
|
|
100
|
+
label: "Enter the name or postcode of your organisation",
|
|
101
|
+
placeholder: "Enter name or postcode...",
|
|
102
|
+
buttonText: "Find school",
|
|
103
|
+
dropdownInstruction: "Please select an organisation from the list below",
|
|
104
|
+
noResultsMessage: "Sorry, could not find anything matching your search",
|
|
105
|
+
lookupHandler: schoolFetcher,
|
|
106
|
+
mapOptionToString: schoolToString,
|
|
107
|
+
onSelect: onSelect
|
|
108
|
+
}, rest));
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
var _default = SimpleSchoolLookup;
|
|
112
|
+
exports.default = _default;
|
|
@@ -24,7 +24,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
24
24
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
25
25
|
|
|
26
26
|
var allPlayers = {};
|
|
27
|
-
|
|
27
|
+
/* Single Message is our main component usually to build landing pages */
|
|
28
28
|
|
|
29
29
|
var SingleMessage = function SingleMessage(_ref) {
|
|
30
30
|
var backgroundColor = _ref.backgroundColor,
|
|
@@ -896,6 +896,10 @@ exports[`renders Single Message with full width image and no text correctly 1`]
|
|
|
896
896
|
z-index: 1;
|
|
897
897
|
}
|
|
898
898
|
|
|
899
|
+
@media (min-width:740px) {
|
|
900
|
+
|
|
901
|
+
}
|
|
902
|
+
|
|
899
903
|
@media (min-width:740px) {
|
|
900
904
|
.c0 {
|
|
901
905
|
-webkit-flex-direction: row;
|
|
@@ -1010,6 +1014,10 @@ exports[`renders Single Message with no Image correctly 1`] = `
|
|
|
1010
1014
|
padding: 1rem;
|
|
1011
1015
|
}
|
|
1012
1016
|
|
|
1017
|
+
@media (min-width:740px) {
|
|
1018
|
+
|
|
1019
|
+
}
|
|
1020
|
+
|
|
1013
1021
|
@media (min-width:740px) {
|
|
1014
1022
|
.c0 {
|
|
1015
1023
|
-webkit-flex-direction: row;
|
|
@@ -25,6 +25,8 @@ var _SingleMessageDs = require("./SingleMessageDs.style");
|
|
|
25
25
|
|
|
26
26
|
var _play = _interopRequireDefault(require("./assets/play.png"));
|
|
27
27
|
|
|
28
|
+
var _excluded = ["backgroundColor", "imageLeft", "imageLow", "images", "image", "imageAltText", "height", "width", "subtitle", "children", "link", "linkLabel", "ctaBgColor", "target", "linkIcon", "youTubeId"];
|
|
29
|
+
|
|
28
30
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
29
31
|
|
|
30
32
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -46,7 +48,7 @@ var SingleMessageDs = function SingleMessageDs(_ref) {
|
|
|
46
48
|
target = _ref.target,
|
|
47
49
|
linkIcon = _ref.linkIcon,
|
|
48
50
|
youTubeId = _ref.youTubeId,
|
|
49
|
-
rest = (0, _objectWithoutProperties2.default)(_ref,
|
|
51
|
+
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
50
52
|
|
|
51
53
|
var _useState = (0, _react.useState)(false),
|
|
52
54
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
@@ -19,7 +19,7 @@ var boxShadow = 'box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.15)';
|
|
|
19
19
|
|
|
20
20
|
var Container = _styledComponents.default.div.withConfig({
|
|
21
21
|
displayName: "SingleMessageDsstyle__Container",
|
|
22
|
-
componentId: "s8zd7s-0"
|
|
22
|
+
componentId: "sc-s8zd7s-0"
|
|
23
23
|
})(["display:flex;position:relative;flex-direction:column;justify-content:space-around;background:", ";@media ", "{flex-direction:", ";}"], function (_ref) {
|
|
24
24
|
var theme = _ref.theme,
|
|
25
25
|
backgroundColor = _ref.backgroundColor;
|
|
@@ -35,13 +35,13 @@ var Container = _styledComponents.default.div.withConfig({
|
|
|
35
35
|
exports.Container = Container;
|
|
36
36
|
var Subtitle = (0, _styledComponents.default)(_Text.default).withConfig({
|
|
37
37
|
displayName: "SingleMessageDsstyle__Subtitle",
|
|
38
|
-
componentId: "s8zd7s-1"
|
|
38
|
+
componentId: "sc-s8zd7s-1"
|
|
39
39
|
})(["letter-spacing:0.03em;text-transform:uppercase;"]);
|
|
40
40
|
exports.Subtitle = Subtitle;
|
|
41
41
|
|
|
42
42
|
var Image = _styledComponents.default.div.withConfig({
|
|
43
43
|
displayName: "SingleMessageDsstyle__Image",
|
|
44
|
-
componentId: "s8zd7s-2"
|
|
44
|
+
componentId: "sc-s8zd7s-2"
|
|
45
45
|
})(["height:100%;@media ", "{height:448px;}img{border-radius:1rem;", ";}"], function (_ref4) {
|
|
46
46
|
var theme = _ref4.theme;
|
|
47
47
|
return theme.breakpoint('small');
|
|
@@ -51,7 +51,7 @@ exports.Image = Image;
|
|
|
51
51
|
|
|
52
52
|
var MediaLink = _styledComponents.default.a.withConfig({
|
|
53
53
|
displayName: "SingleMessageDsstyle__MediaLink",
|
|
54
|
-
componentId: "s8zd7s-3"
|
|
54
|
+
componentId: "sc-s8zd7s-3"
|
|
55
55
|
})(["", ";@media ", "{margin:0;height:448px;flex-grow:0;flex-shrink:0;flex-basis:50%;}"], function (_ref5) {
|
|
56
56
|
var imageLeft = _ref5.imageLeft;
|
|
57
57
|
return imageLeft ? "margin-right: ".concat((0, _spacing.default)('m')) : "margin-left: ".concat((0, _spacing.default)('m'));
|
|
@@ -64,28 +64,28 @@ exports.MediaLink = MediaLink;
|
|
|
64
64
|
|
|
65
65
|
var PlayHolder = _styledComponents.default.div.withConfig({
|
|
66
66
|
displayName: "SingleMessageDsstyle__PlayHolder",
|
|
67
|
-
componentId: "s8zd7s-4"
|
|
67
|
+
componentId: "sc-s8zd7s-4"
|
|
68
68
|
})(["position:relative;"]);
|
|
69
69
|
|
|
70
70
|
exports.PlayHolder = PlayHolder;
|
|
71
71
|
|
|
72
72
|
var PlayImage = _styledComponents.default.img.withConfig({
|
|
73
73
|
displayName: "SingleMessageDsstyle__PlayImage",
|
|
74
|
-
componentId: "s8zd7s-5"
|
|
74
|
+
componentId: "sc-s8zd7s-5"
|
|
75
75
|
})(["position:absolute;margin:auto;", ";top:0;right:0;bottom:0;left:0;"], (0, _zIndex.default)('medium'));
|
|
76
76
|
|
|
77
77
|
exports.PlayImage = PlayImage;
|
|
78
78
|
|
|
79
79
|
var CloseButton = _styledComponents.default.button.withConfig({
|
|
80
80
|
displayName: "SingleMessageDsstyle__CloseButton",
|
|
81
|
-
componentId: "s8zd7s-6"
|
|
81
|
+
componentId: "sc-s8zd7s-6"
|
|
82
82
|
})(["position:absolute;z-index:2;top:-45px;right:0px;display:inline-block;width:35px;height:35px;overflow:hidden;border:none;background:transparent;:before{content:'';position:absolute;height:2px;width:100%;top:50%;left:0;margin-top:-1px;background:#fff;border-radius:5px;margin-top:-6px;transform:rotate(45deg);}:after{content:'';position:absolute;height:2px;width:100%;top:50%;left:0;margin-top:-1px;background:#fff;border-radius:5px;margin-top:-6px;transform:rotate(-45deg);}"]);
|
|
83
83
|
|
|
84
84
|
exports.CloseButton = CloseButton;
|
|
85
85
|
|
|
86
86
|
var CTA = _styledComponents.default.div.withConfig({
|
|
87
87
|
displayName: "SingleMessageDsstyle__CTA",
|
|
88
|
-
componentId: "s8zd7s-7"
|
|
88
|
+
componentId: "sc-s8zd7s-7"
|
|
89
89
|
})(["position:absolute;bottom:-", ";", ";a{font-family:", ";}@media ", "{", "}"], (0, _spacing.default)('m'), (0, _zIndex.default)('medium'), function (_ref7) {
|
|
90
90
|
var theme = _ref7.theme;
|
|
91
91
|
return theme.fontFamilies('Montserrat');
|
|
@@ -101,7 +101,7 @@ exports.CTA = CTA;
|
|
|
101
101
|
|
|
102
102
|
var Copy = _styledComponents.default.div.withConfig({
|
|
103
103
|
displayName: "SingleMessageDsstyle__Copy",
|
|
104
|
-
componentId: "s8zd7s-8"
|
|
104
|
+
componentId: "sc-s8zd7s-8"
|
|
105
105
|
})(["position:relative;height:auto;padding:", ";", ";display:flex;flex-direction:column;border-radius:1rem;", ";background:", ";", ";", ";@media ", "{height:448px;width:calc(50% + 1.5rem);flex-grow:0;flex-shrink:0;flex-basis:calc(50% + 1.5rem);padding:", ";", ";", ";}@media ", "{padding:calc(", " * 2);", ";margin:", ";}"], (0, _spacing.default)('m'), (0, _zIndex.default)('low'), boxShadow, function (_ref10) {
|
|
106
106
|
var theme = _ref10.theme,
|
|
107
107
|
backgroundColor = _ref10.backgroundColor;
|
|
@@ -21,6 +21,8 @@ var _lodash = require("lodash");
|
|
|
21
21
|
|
|
22
22
|
var _TextInputWithDropdown = _interopRequireDefault(require("../../Atoms/TextInputWithDropdown/TextInputWithDropdown"));
|
|
23
23
|
|
|
24
|
+
var _excluded = ["optionFetcher", "optionParser", "onSelect", "id", "label", "name", "dropdownInstruction", "notFoundMessage", "fetchErrorHandler"];
|
|
25
|
+
|
|
24
26
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
25
27
|
|
|
26
28
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -39,7 +41,7 @@ var Typeahead = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
|
|
|
39
41
|
dropdownInstruction = _ref.dropdownInstruction,
|
|
40
42
|
notFoundMessage = _ref.notFoundMessage,
|
|
41
43
|
fetchErrorHandler = _ref.fetchErrorHandler,
|
|
42
|
-
rest = (0, _objectWithoutProperties2.default)(_ref,
|
|
44
|
+
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
43
45
|
|
|
44
46
|
var _useState = (0, _react.useState)(''),
|
|
45
47
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
@@ -24,7 +24,7 @@ var Video = _styledComponents.default.video.attrs(function () {
|
|
|
24
24
|
};
|
|
25
25
|
}).withConfig({
|
|
26
26
|
displayName: "VideoBanner__Video",
|
|
27
|
-
componentId: "wxn2ep-0"
|
|
27
|
+
componentId: "sc-wxn2ep-0"
|
|
28
28
|
})(["width:100%;height:100%;"]);
|
|
29
29
|
|
|
30
30
|
var VideoBanner = function VideoBanner(_ref) {
|
|
@@ -19,7 +19,7 @@ var _spacing = _interopRequireDefault(require("../../../theme/shared/spacing"));
|
|
|
19
19
|
|
|
20
20
|
var CookieWrapper = _styledComponents.default.div.withConfig({
|
|
21
21
|
displayName: "CookieBannerstyle__CookieWrapper",
|
|
22
|
-
componentId: "m69qcz-0"
|
|
22
|
+
componentId: "sc-m69qcz-0"
|
|
23
23
|
})(["display:flex;position:relative;padding:", ";background:", ";flex-direction:column;", ";"], (0, _spacing.default)('md'), function (_ref) {
|
|
24
24
|
var theme = _ref.theme;
|
|
25
25
|
return theme.color('deep_violet_dark');
|
|
@@ -28,7 +28,7 @@ var CookieWrapper = _styledComponents.default.div.withConfig({
|
|
|
28
28
|
exports.CookieWrapper = CookieWrapper;
|
|
29
29
|
var CookieText = (0, _styledComponents.default)(_Text.default).withConfig({
|
|
30
30
|
displayName: "CookieBannerstyle__CookieText",
|
|
31
|
-
componentId: "m69qcz-1"
|
|
31
|
+
componentId: "sc-m69qcz-1"
|
|
32
32
|
})(["line-height:1.5;margin:0;&:first-of-type{margin-bottom:", ";}@media ", "{width:75%;margin:", " auto;&:first-of-type{margin-bottom:", ";}}"], (0, _spacing.default)('sm'), function (_ref2) {
|
|
33
33
|
var theme = _ref2.theme;
|
|
34
34
|
return theme.breakpoint('small');
|
|
@@ -36,7 +36,7 @@ var CookieText = (0, _styledComponents.default)(_Text.default).withConfig({
|
|
|
36
36
|
exports.CookieText = CookieText;
|
|
37
37
|
var AcceptCookieBtn = (0, _styledComponents.default)(_Link.default).withConfig({
|
|
38
38
|
displayName: "CookieBannerstyle__AcceptCookieBtn",
|
|
39
|
-
componentId: "m69qcz-2"
|
|
39
|
+
componentId: "sc-m69qcz-2"
|
|
40
40
|
})(["padding:", " ", ";display:block;margin-bottom:10px;@media ", "{margin:0 ", " 0 0;display:inline-block;}"], (0, _spacing.default)('sm'), (0, _spacing.default)('md'), function (_ref3) {
|
|
41
41
|
var theme = _ref3.theme;
|
|
42
42
|
return theme.breakpoint('small');
|
|
@@ -44,7 +44,7 @@ var AcceptCookieBtn = (0, _styledComponents.default)(_Link.default).withConfig({
|
|
|
44
44
|
exports.AcceptCookieBtn = AcceptCookieBtn;
|
|
45
45
|
var LinkStyle = (0, _styledComponents.default)(_Link.default).withConfig({
|
|
46
46
|
displayName: "CookieBannerstyle__LinkStyle",
|
|
47
|
-
componentId: "m69qcz-3"
|
|
47
|
+
componentId: "sc-m69qcz-3"
|
|
48
48
|
})(["color:", ";padding:0 ", " 1px;border-bottom:2px solid;"], function (_ref4) {
|
|
49
49
|
var theme = _ref4.theme;
|
|
50
50
|
return theme.color('white');
|
|
@@ -23,6 +23,8 @@ var _Donate = require("../Donate.style");
|
|
|
23
23
|
|
|
24
24
|
var _GivingSelector = _interopRequireDefault(require("../GivingSelector/GivingSelector"));
|
|
25
25
|
|
|
26
|
+
var _excluded = ["data", "donateLink", "otherDescription", "clientID", "cartID", "mbshipID", "noMoneyBuys"];
|
|
27
|
+
|
|
26
28
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
27
29
|
|
|
28
30
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -37,7 +39,7 @@ var Signup = function Signup(_ref) {
|
|
|
37
39
|
cartID = _ref.cartID,
|
|
38
40
|
mbshipID = _ref.mbshipID,
|
|
39
41
|
noMoneyBuys = _ref.noMoneyBuys,
|
|
40
|
-
rest = (0, _objectWithoutProperties2.default)(_ref,
|
|
42
|
+
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
41
43
|
|
|
42
44
|
var _useState = (0, _react.useState)('single'),
|
|
43
45
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
@@ -21,7 +21,7 @@ var _hideVisually = _interopRequireDefault(require("../../../../theme/shared/hid
|
|
|
21
21
|
|
|
22
22
|
var Switch = _styledComponents.default.span.withConfig({
|
|
23
23
|
displayName: "GivingSelector__Switch",
|
|
24
|
-
componentId: "haox9c-0"
|
|
24
|
+
componentId: "sc-haox9c-0"
|
|
25
25
|
})(["width:50%;height:48px;border-radius:2rem;", ";display:block;position:absolute;transition:left 0.15s ease-out;background-color:", ";left:2px;box-shadow:0px 0px 16px rgba(0,0,0,0.3);"], (0, _zIndex.default)('low'), function (_ref) {
|
|
26
26
|
var theme = _ref.theme;
|
|
27
27
|
return theme.color('blue');
|
|
@@ -29,12 +29,12 @@ var Switch = _styledComponents.default.span.withConfig({
|
|
|
29
29
|
|
|
30
30
|
var Wrapper = _styledComponents.default.div.withConfig({
|
|
31
31
|
displayName: "GivingSelector__Wrapper",
|
|
32
|
-
componentId: "haox9c-1"
|
|
32
|
+
componentId: "sc-haox9c-1"
|
|
33
33
|
})(["display:flex;margin:", " 0;"], (0, _spacing.default)('md'));
|
|
34
34
|
|
|
35
35
|
var MoneyBox = _styledComponents.default.div.withConfig({
|
|
36
36
|
displayName: "GivingSelector__MoneyBox",
|
|
37
|
-
componentId: "haox9c-2"
|
|
37
|
+
componentId: "sc-haox9c-2"
|
|
38
38
|
})(["width:100%;padding:2px;position:relative;display:flex;flex-direction:row;margin:", " 0;border-radius:2rem;background:", ";", "{width:450px;margin:0 auto;}#give-monthly:checked ~ ", "{left:calc(50% - 2px);}input{", "}input:focus:not(:checked) + label{box-shadow:inset 0 0 0 4px ", ";}"], (0, _spacing.default)('md'), function (_ref2) {
|
|
39
39
|
var theme = _ref2.theme;
|
|
40
40
|
return theme.color('blue_light');
|
|
@@ -45,7 +45,7 @@ var MoneyBox = _styledComponents.default.div.withConfig({
|
|
|
45
45
|
|
|
46
46
|
var Label = _styledComponents.default.label.withConfig({
|
|
47
47
|
displayName: "GivingSelector__Label",
|
|
48
|
-
componentId: "haox9c-3"
|
|
48
|
+
componentId: "sc-haox9c-3"
|
|
49
49
|
})(["font-size:", ";font-family:", ";font-weight:bold;min-height:48px;align-items:center;justify-content:center;display:flex;flex-basis:50%;border:none;transition:color 0.15s ease-out;", ";cursor:", ";&:active:focus{box-shadow:none;}&:focus{border:none;outline:none;box-shadow:inset 0 0 0 4px ", ";}&[for='give-once']{border-radius:2rem;color:", ";}&[for='give-monthly']{border-radius:2rem;color:", ";}"], function (_ref4) {
|
|
50
50
|
var theme = _ref4.theme;
|
|
51
51
|
return theme.fontSize('s');
|
|
@@ -19,6 +19,8 @@ var _spacing = _interopRequireDefault(require("../../../../theme/shared/spacing"
|
|
|
19
19
|
|
|
20
20
|
var _size = require("../../../../theme/shared/size");
|
|
21
21
|
|
|
22
|
+
var _excluded = ["setOtherAmount", "amount", "currency", "description"];
|
|
23
|
+
|
|
22
24
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
23
25
|
|
|
24
26
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -60,7 +62,7 @@ var MoneyBuy = function MoneyBuy(_ref10) {
|
|
|
60
62
|
amount = _ref10.amount,
|
|
61
63
|
currency = _ref10.currency,
|
|
62
64
|
description = _ref10.description,
|
|
63
|
-
rest = (0, _objectWithoutProperties2.default)(_ref10,
|
|
65
|
+
rest = (0, _objectWithoutProperties2.default)(_ref10, _excluded);
|
|
64
66
|
return /*#__PURE__*/_react.default.createElement(MoneyBox, Object.assign({}, rest, {
|
|
65
67
|
"aria-label": description,
|
|
66
68
|
value: "".concat(currency, " ").concat(amount),
|
|
@@ -21,6 +21,8 @@ var _EmailSignUp = require("./EmailSignUp.style");
|
|
|
21
21
|
|
|
22
22
|
var _Membership = require("../Membership/Membership.style");
|
|
23
23
|
|
|
24
|
+
var _excluded = ["title", "topCopy", "isSuccess", "isSchools", "schoolsCopy", "selectItems", "successCopy", "errorMsg", "privacyCopy", "subscribe", "validate", "buttonColor", "backgroundColor"];
|
|
25
|
+
|
|
24
26
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
25
27
|
|
|
26
28
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -39,7 +41,7 @@ var EmailSignUp = function EmailSignUp(_ref) {
|
|
|
39
41
|
validate = _ref.validate,
|
|
40
42
|
buttonColor = _ref.buttonColor,
|
|
41
43
|
backgroundColor = _ref.backgroundColor,
|
|
42
|
-
rest = (0, _objectWithoutProperties2.default)(_ref,
|
|
44
|
+
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
43
45
|
|
|
44
46
|
var _useState = (0, _react.useState)(''),
|
|
45
47
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
@@ -17,7 +17,7 @@ var _Text = _interopRequireDefault(require("../../Atoms/Text/Text"));
|
|
|
17
17
|
|
|
18
18
|
var ESUWrapper = _styledComponents.default.div.withConfig({
|
|
19
19
|
displayName: "EmailSignUpstyle__ESUWrapper",
|
|
20
|
-
componentId: "w2b8yk-0"
|
|
20
|
+
componentId: "sc-w2b8yk-0"
|
|
21
21
|
})(["display:flex;flex-direction:column;font-size:", ";color:", ";background-color:", ";"], function (_ref) {
|
|
22
22
|
var theme = _ref.theme;
|
|
23
23
|
return theme.fontSize('s');
|
|
@@ -34,14 +34,14 @@ exports.ESUWrapper = ESUWrapper;
|
|
|
34
34
|
|
|
35
35
|
var TopCopyWrapper = _styledComponents.default.div.withConfig({
|
|
36
36
|
displayName: "EmailSignUpstyle__TopCopyWrapper",
|
|
37
|
-
componentId: "w2b8yk-1"
|
|
37
|
+
componentId: "sc-w2b8yk-1"
|
|
38
38
|
})(["display:flex;margin-bottom:", ";"], (0, _spacing.default)('md'));
|
|
39
39
|
|
|
40
40
|
exports.TopCopyWrapper = TopCopyWrapper;
|
|
41
41
|
|
|
42
42
|
var ButtonWrapper = _styledComponents.default.div.withConfig({
|
|
43
43
|
displayName: "EmailSignUpstyle__ButtonWrapper",
|
|
44
|
-
componentId: "w2b8yk-2"
|
|
44
|
+
componentId: "sc-w2b8yk-2"
|
|
45
45
|
})(["margin-top:", ";input{text-align:center;width:100%;font-size:", ";@media ", "{font-size:", ";max-width:180px;}}"], (0, _spacing.default)('md'), function (_ref4) {
|
|
46
46
|
var theme = _ref4.theme;
|
|
47
47
|
return theme.fontSize('s');
|
|
@@ -57,7 +57,7 @@ exports.ButtonWrapper = ButtonWrapper;
|
|
|
57
57
|
|
|
58
58
|
var PrivacyCopyWrapper = _styledComponents.default.div.withConfig({
|
|
59
59
|
displayName: "EmailSignUpstyle__PrivacyCopyWrapper",
|
|
60
|
-
componentId: "w2b8yk-3"
|
|
60
|
+
componentId: "sc-w2b8yk-3"
|
|
61
61
|
})(["display:flex;flex-direction:column;margin-top:", ";p{font-size:", ";line-height:", ";a{font-size:", ";color:", ";}}"], (0, _spacing.default)('md'), function (_ref7) {
|
|
62
62
|
var theme = _ref7.theme;
|
|
63
63
|
return theme.fontSize('s');
|
|
@@ -76,17 +76,17 @@ exports.PrivacyCopyWrapper = PrivacyCopyWrapper;
|
|
|
76
76
|
|
|
77
77
|
var Form = _styledComponents.default.form.withConfig({
|
|
78
78
|
displayName: "EmailSignUpstyle__Form",
|
|
79
|
-
componentId: "w2b8yk-4"
|
|
79
|
+
componentId: "sc-w2b8yk-4"
|
|
80
80
|
})(["display:flex;flex-direction:column;margin:", " 0;"], (0, _spacing.default)('md'));
|
|
81
81
|
|
|
82
82
|
exports.Form = Form;
|
|
83
83
|
var InputField = (0, _styledComponents.default)(_Input.default).withConfig({
|
|
84
84
|
displayName: "EmailSignUpstyle__InputField",
|
|
85
|
-
componentId: "w2b8yk-5"
|
|
85
|
+
componentId: "sc-w2b8yk-5"
|
|
86
86
|
})(["width:100%;"]);
|
|
87
87
|
exports.InputField = InputField;
|
|
88
88
|
var Title = (0, _styledComponents.default)(_Text.default).withConfig({
|
|
89
89
|
displayName: "EmailSignUpstyle__Title",
|
|
90
|
-
componentId: "w2b8yk-6"
|
|
90
|
+
componentId: "sc-w2b8yk-6"
|
|
91
91
|
})(["margin-bottom:", ";"], (0, _spacing.default)('m'));
|
|
92
92
|
exports.Title = Title;
|
|
@@ -21,11 +21,13 @@ var _SocialIcons = _interopRequireDefault(require("../../Atoms/SocialIcons/Socia
|
|
|
21
21
|
|
|
22
22
|
var _Footer = require("./Footer.style");
|
|
23
23
|
|
|
24
|
+
var _excluded = ["navItems", "footerCopy", "campaign"];
|
|
25
|
+
|
|
24
26
|
var Footer = function Footer(_ref) {
|
|
25
27
|
var navItems = _ref.navItems,
|
|
26
28
|
footerCopy = _ref.footerCopy,
|
|
27
29
|
campaign = _ref.campaign,
|
|
28
|
-
rest = (0, _objectWithoutProperties2.default)(_ref,
|
|
30
|
+
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
29
31
|
// Remove white space between words
|
|
30
32
|
var campaignName = campaign.replace(/\s/g, '').toLowerCase();
|
|
31
33
|
return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_Footer.FooterWrapper, Object.assign({
|
|
@@ -40,9 +42,9 @@ var Footer = function Footer(_ref) {
|
|
|
40
42
|
sizeMd: "72px",
|
|
41
43
|
rotate: false,
|
|
42
44
|
campaign: campaign
|
|
43
|
-
}))), /*#__PURE__*/_react.default.createElement(_Nav.default, {
|
|
45
|
+
}))), /*#__PURE__*/_react.default.createElement(_Nav.default, Object.assign({
|
|
44
46
|
navItems: navItems
|
|
45
|
-
}), /*#__PURE__*/_react.default.createElement(_Footer.FooterCopyright, null, /*#__PURE__*/_react.default.createElement(_Text.default, {
|
|
47
|
+
}, rest)), /*#__PURE__*/_react.default.createElement(_Footer.FooterCopyright, null, /*#__PURE__*/_react.default.createElement(_Text.default, {
|
|
46
48
|
tag: "p",
|
|
47
49
|
color: "grey"
|
|
48
50
|
}, footerCopy)))));
|
|
@@ -51,7 +53,8 @@ var Footer = function Footer(_ref) {
|
|
|
51
53
|
Footer.defaultProps = {
|
|
52
54
|
navItems: {},
|
|
53
55
|
footerCopy: '',
|
|
54
|
-
campaign: 'Comic Relief'
|
|
56
|
+
campaign: 'Comic Relief',
|
|
57
|
+
overrideWhiteList: false
|
|
55
58
|
};
|
|
56
59
|
var _default = Footer;
|
|
57
60
|
exports.default = _default;
|
|
@@ -4,5 +4,12 @@
|
|
|
4
4
|
import data from './data/data';
|
|
5
5
|
import footerCopy from './data/footerCopy';
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
<>
|
|
8
|
+
<p>Standard footer</p>
|
|
9
|
+
<Footer navItems={data} footerCopy={footerCopy.copy} campaign="Comic Relief" />
|
|
10
|
+
|
|
11
|
+
<p>Overrides whitelist functionality for external usage</p>
|
|
12
|
+
<Footer navItems={data} footerCopy={footerCopy.copy} campaign="Comic Relief" overrideWhiteList />
|
|
13
|
+
</>
|
|
14
|
+
|
|
8
15
|
```
|