@comicrelief/component-library 8.52.3 → 8.53.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/.github/workflows/main.yml +1 -1
- package/dist/components/Organisms/Donate/Donate.js +3 -0
- package/dist/components/Organisms/Donate/Form/Form.js +0 -1
- package/dist/components/Organisms/DonateBanner/DonateBanner.js +132 -0
- package/dist/components/Organisms/DonateBanner/DonateBanner.md +168 -0
- package/dist/components/Organisms/DonateBanner/DonateBanner.style.js +291 -0
- package/dist/components/Organisms/DonateBanner/DonateBanner.test.js +134 -0
- package/dist/components/Organisms/DonateBanner/Form/Form.js +214 -0
- package/dist/components/Organisms/DonateBanner/Form/PopUpComponent.js +70 -0
- package/dist/components/Organisms/DonateBanner/GivingSelector/GivingSelector.js +50 -0
- package/dist/components/Organisms/DonateBanner/GivingSelector/GivingSelector.style.js +73 -0
- package/dist/components/Organisms/DonateBanner/MoneyBuy/MoneyBuy.js +83 -0
- package/dist/components/Organisms/DonateBanner/__snapshots__/DonateBanner.test.js.snap +3170 -0
- package/dist/components/Organisms/DonateBanner/_utils.js +41 -0
- package/dist/components/Organisms/DonateBanner/assets/close.svg +3 -0
- package/dist/components/Organisms/DonateBanner/dev-data/data-high-value.js +33 -0
- package/dist/components/Organisms/DonateBanner/dev-data/data-monthly.js +22 -0
- package/dist/components/Organisms/DonateBanner/dev-data/data-single.js +22 -0
- package/dist/components/Organisms/DonateBanner/dev-data/data.js +33 -0
- package/dist/index.js +7 -0
- package/package.json +1 -1
- package/src/components/Organisms/Donate/Donate.js +5 -0
- package/src/components/Organisms/Donate/Form/Form.js +0 -1
- package/src/components/Organisms/DonateBanner/DonateBanner.js +210 -0
- package/src/components/Organisms/DonateBanner/DonateBanner.md +168 -0
- package/src/components/Organisms/DonateBanner/DonateBanner.style.js +320 -0
- package/src/components/Organisms/DonateBanner/DonateBanner.test.js +151 -0
- package/src/components/Organisms/DonateBanner/Form/Form.js +332 -0
- package/src/components/Organisms/DonateBanner/Form/PopUpComponent.js +110 -0
- package/src/components/Organisms/DonateBanner/GivingSelector/GivingSelector.js +61 -0
- package/src/components/Organisms/DonateBanner/GivingSelector/GivingSelector.style.js +71 -0
- package/src/components/Organisms/DonateBanner/MoneyBuy/MoneyBuy.js +58 -0
- package/src/components/Organisms/DonateBanner/__snapshots__/DonateBanner.test.js.snap +3170 -0
- package/src/components/Organisms/DonateBanner/_utils.js +34 -0
- package/src/components/Organisms/DonateBanner/assets/close.svg +3 -0
- package/src/components/Organisms/DonateBanner/dev-data/data-high-value.js +41 -0
- package/src/components/Organisms/DonateBanner/dev-data/data-monthly.js +23 -0
- package/src/components/Organisms/DonateBanner/dev-data/data-single.js +23 -0
- package/src/components/Organisms/DonateBanner/dev-data/data.js +41 -0
- package/src/index.js +1 -0
|
@@ -14,6 +14,9 @@ var _Picture = _interopRequireDefault(require("../../Atoms/Picture/Picture"));
|
|
|
14
14
|
var _Form = _interopRequireDefault(require("./Form/Form"));
|
|
15
15
|
var _utils = require("./_utils");
|
|
16
16
|
var _Donate = require("./Donate.style");
|
|
17
|
+
// NB this is now our 'old' Donate widget, which is being replaced by the DonateBanner component
|
|
18
|
+
// This component is now deprecated and will be removed in a future release.
|
|
19
|
+
// TODO: Remove this component in a future release.
|
|
17
20
|
const Donate = _ref => {
|
|
18
21
|
let {
|
|
19
22
|
alt = '',
|
|
@@ -36,7 +36,6 @@ const Signup = _ref => {
|
|
|
36
36
|
givingType = null,
|
|
37
37
|
...rest
|
|
38
38
|
} = _ref;
|
|
39
|
-
// const [givingType, setGivingType] = useState();
|
|
40
39
|
const [errorMsg, setErrorMsg] = (0, _react.useState)(false);
|
|
41
40
|
const [amountDonate, setAmountDonate] = (0, _react.useState)(10);
|
|
42
41
|
const [moneyBuyCopy, setMoneyBuyCopy] = (0, _react.useState)(true);
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = void 0;
|
|
9
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
+
var _reactResponsive = require("react-responsive");
|
|
11
|
+
var _allBreakpoints = require("../../../theme/shared/allBreakpoints");
|
|
12
|
+
var _Text = _interopRequireDefault(require("../../Atoms/Text/Text"));
|
|
13
|
+
var _Picture = _interopRequireDefault(require("../../Atoms/Picture/Picture"));
|
|
14
|
+
var _Form = _interopRequireDefault(require("./Form/Form"));
|
|
15
|
+
var _utils = require("./_utils");
|
|
16
|
+
var _DonateBanner = require("./DonateBanner.style");
|
|
17
|
+
const DonateBanner = _ref => {
|
|
18
|
+
let {
|
|
19
|
+
donateWidgetIsTextOnly = false,
|
|
20
|
+
donateOrientation = 'right',
|
|
21
|
+
paddingAbove = '2rem',
|
|
22
|
+
paddingBelow = '2rem',
|
|
23
|
+
pageBackgroundColour = 'transparent',
|
|
24
|
+
componentBackgroundColour = 'white',
|
|
25
|
+
title = null,
|
|
26
|
+
subtitle = '',
|
|
27
|
+
monthlyTitle = '',
|
|
28
|
+
monthlySubtitle = '',
|
|
29
|
+
popUpText = 'Help us deliver long-term impact by converting your single donation into a monthly gift.',
|
|
30
|
+
chooseAmountText = null,
|
|
31
|
+
monthlyChooseAmountText = null,
|
|
32
|
+
otherAmountText = 'will help us fund amazing projects in the UK and around the world.',
|
|
33
|
+
monthlyOtherAmountText = '',
|
|
34
|
+
hideMoneyBuys = false,
|
|
35
|
+
imageL = null,
|
|
36
|
+
imageM = null,
|
|
37
|
+
imageS = null,
|
|
38
|
+
data = {},
|
|
39
|
+
cartID,
|
|
40
|
+
clientID,
|
|
41
|
+
donateLink,
|
|
42
|
+
mbshipID
|
|
43
|
+
} = _ref;
|
|
44
|
+
const isLarge = (0, _reactResponsive.useMediaQuery)({
|
|
45
|
+
query: `(min-width: ${_allBreakpoints.breakpointValues.L}px)`
|
|
46
|
+
});
|
|
47
|
+
const isMedium = (0, _reactResponsive.useMediaQuery)({
|
|
48
|
+
query: `(min-width: ${_allBreakpoints.breakpointValues.M}px)`
|
|
49
|
+
});
|
|
50
|
+
const [givingType, setGivingType] = (0, _react.useState)();
|
|
51
|
+
const {
|
|
52
|
+
showCopy,
|
|
53
|
+
thisTitle,
|
|
54
|
+
thisSubtitle,
|
|
55
|
+
noTitlesAtAll
|
|
56
|
+
} = (0, _utils.handleTitles)(givingType, title, subtitle, monthlyTitle, monthlySubtitle);
|
|
57
|
+
const {
|
|
58
|
+
thisOtherAmountText
|
|
59
|
+
} = (0, _utils.handleOtherAmountText)(givingType, otherAmountText, monthlyOtherAmountText);
|
|
60
|
+
const shouldShowImage = donateWidgetIsTextOnly === false;
|
|
61
|
+
const shouldShowDesktopImage = shouldShowImage && isLarge && imageL && (imageL.images || imageL.image);
|
|
62
|
+
const shouldShowTopImage = shouldShowImage && !isLarge;
|
|
63
|
+
const topImage = isMedium ? imageM : imageS;
|
|
64
|
+
const shouldRenderTopImage = shouldShowTopImage && topImage && (topImage.images || topImage.image);
|
|
65
|
+
|
|
66
|
+
// For text-only variants, we hide the title area on non-desktop widths
|
|
67
|
+
// (M and below), so only the form is shown.
|
|
68
|
+
const shouldShowTitleSection = noTitlesAtAll === false && isLarge && donateWidgetIsTextOnly;
|
|
69
|
+
return /*#__PURE__*/_react.default.createElement(_DonateBanner.Container, {
|
|
70
|
+
paddingAbove: paddingAbove,
|
|
71
|
+
paddingBelow: paddingBelow,
|
|
72
|
+
pageBackgroundColour: pageBackgroundColour,
|
|
73
|
+
id: mbshipID
|
|
74
|
+
}, /*#__PURE__*/_react.default.createElement(_DonateBanner.InnerContainer, {
|
|
75
|
+
componentBackgroundColour: componentBackgroundColour,
|
|
76
|
+
$donateWidgetIsTextOnly: donateWidgetIsTextOnly
|
|
77
|
+
}, shouldRenderTopImage ? /*#__PURE__*/_react.default.createElement(_Picture.default, {
|
|
78
|
+
image: topImage.image,
|
|
79
|
+
images: topImage.images,
|
|
80
|
+
imageLow: topImage.imageLow,
|
|
81
|
+
objectFit: "cover",
|
|
82
|
+
width: "100%",
|
|
83
|
+
height: "100%",
|
|
84
|
+
alt: topImage.alt || ''
|
|
85
|
+
// Force React to re-render with any updated image details
|
|
86
|
+
,
|
|
87
|
+
key: topImage.imageLow
|
|
88
|
+
}) : null, shouldShowDesktopImage ? /*#__PURE__*/_react.default.createElement(_DonateBanner.BgImage, {
|
|
89
|
+
image: imageL.image,
|
|
90
|
+
images: imageL.images,
|
|
91
|
+
imageLow: imageL.imageLow,
|
|
92
|
+
objectFit: "cover",
|
|
93
|
+
width: "100%",
|
|
94
|
+
height: "100%",
|
|
95
|
+
alt: imageL.alt || '',
|
|
96
|
+
isBackgroundImage: true
|
|
97
|
+
}) : null, /*#__PURE__*/_react.default.createElement(_DonateBanner.Wrapper, {
|
|
98
|
+
donateOrientation: donateOrientation,
|
|
99
|
+
"aria-live": "polite",
|
|
100
|
+
noTitlesAtAll: noTitlesAtAll,
|
|
101
|
+
hasTopImage: shouldRenderTopImage,
|
|
102
|
+
shouldShowTitleSection: shouldShowTitleSection
|
|
103
|
+
}, shouldShowTitleSection && /*#__PURE__*/_react.default.createElement(_DonateBanner.TitleWrapperOuter, {
|
|
104
|
+
donateOrientation: donateOrientation
|
|
105
|
+
}, /*#__PURE__*/_react.default.createElement(_DonateBanner.TitleWrapperInner, null, showCopy && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_Text.default, {
|
|
106
|
+
tag: "h2",
|
|
107
|
+
size: "big",
|
|
108
|
+
family: "Anton",
|
|
109
|
+
weight: "normal"
|
|
110
|
+
}, thisTitle), /*#__PURE__*/_react.default.createElement(_Text.default, {
|
|
111
|
+
tag: "p",
|
|
112
|
+
size: "m"
|
|
113
|
+
}, thisSubtitle)))), /*#__PURE__*/_react.default.createElement(_Form.default, {
|
|
114
|
+
data: data,
|
|
115
|
+
otherAmountText: thisOtherAmountText,
|
|
116
|
+
cartID: cartID,
|
|
117
|
+
clientID: clientID,
|
|
118
|
+
mbshipID: mbshipID,
|
|
119
|
+
donateLink: donateLink,
|
|
120
|
+
hideMoneyBuys: hideMoneyBuys,
|
|
121
|
+
popUpText: popUpText,
|
|
122
|
+
chooseAmountText: chooseAmountText,
|
|
123
|
+
monthlyChooseAmountText: monthlyChooseAmountText,
|
|
124
|
+
donateWidgetIsTextOnly: donateWidgetIsTextOnly,
|
|
125
|
+
hasTopImage: shouldRenderTopImage,
|
|
126
|
+
shouldShowTitleSection: shouldShowTitleSection,
|
|
127
|
+
donateOrientation: donateOrientation,
|
|
128
|
+
givingType: givingType,
|
|
129
|
+
changeGivingType: setGivingType
|
|
130
|
+
}))));
|
|
131
|
+
};
|
|
132
|
+
var _default = exports.default = DonateBanner;
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
# DonateBanner
|
|
2
|
+
|
|
3
|
+
## Image banner (widget right), custom padding + background
|
|
4
|
+
|
|
5
|
+
```js
|
|
6
|
+
import data from './dev-data/data';
|
|
7
|
+
const desktopPictures = require('../../../styleguide/data/data').defaultData;
|
|
8
|
+
const mobilePictures = require('../../../styleguide/data/data').mobileImages;
|
|
9
|
+
|
|
10
|
+
const imageL = {
|
|
11
|
+
images: desktopPictures.images,
|
|
12
|
+
imageLow: desktopPictures.imageLow,
|
|
13
|
+
alt: 'Background image'
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
const imageM = {
|
|
17
|
+
images: desktopPictures.images,
|
|
18
|
+
imageLow: desktopPictures.imageLow,
|
|
19
|
+
alt: 'Background image'
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
const imageS = {
|
|
23
|
+
images: mobilePictures.images,
|
|
24
|
+
imageLow: mobilePictures.imageLow,
|
|
25
|
+
alt: 'Background image'
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
<DonateBanner
|
|
29
|
+
pageBackgroundColour="grey_light"
|
|
30
|
+
paddingAbove="0rem"
|
|
31
|
+
paddingBelow="2rem"
|
|
32
|
+
donateOrientation="right"
|
|
33
|
+
imageL={imageL}
|
|
34
|
+
imageM={imageM}
|
|
35
|
+
imageS={imageS}
|
|
36
|
+
data={data}
|
|
37
|
+
mbshipID="mbship-1"
|
|
38
|
+
donateLink="https://donation.comicrelief.com/"
|
|
39
|
+
clientID="donate"
|
|
40
|
+
cartID="default-comicrelief"
|
|
41
|
+
title="Donate Now"
|
|
42
|
+
subtitle="Please help us fund life-changing projects in the UK and around the world."
|
|
43
|
+
/>;
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Image banner (widget left), monthly title/subtitle + choose amount text overrides
|
|
47
|
+
|
|
48
|
+
```js
|
|
49
|
+
import data from './dev-data/data';
|
|
50
|
+
const desktopPictures = require('../../../styleguide/data/data').defaultData;
|
|
51
|
+
const mobilePictures = require('../../../styleguide/data/data').mobileImages;
|
|
52
|
+
|
|
53
|
+
const imageL = {
|
|
54
|
+
images: desktopPictures.images,
|
|
55
|
+
imageLow: desktopPictures.imageLow,
|
|
56
|
+
alt: 'Background image'
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
const imageM = {
|
|
60
|
+
images: desktopPictures.images,
|
|
61
|
+
imageLow: desktopPictures.imageLow,
|
|
62
|
+
alt: 'Background image'
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
const imageS = {
|
|
66
|
+
images: mobilePictures.images,
|
|
67
|
+
imageLow: mobilePictures.imageLow,
|
|
68
|
+
alt: 'Background image'
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
<DonateBanner
|
|
72
|
+
pageBackgroundColour="grey_light"
|
|
73
|
+
paddingAbove="2rem"
|
|
74
|
+
paddingBelow="2rem"
|
|
75
|
+
donateOrientation="left"
|
|
76
|
+
imageL={imageL}
|
|
77
|
+
imageM={imageM}
|
|
78
|
+
imageS={imageS}
|
|
79
|
+
data={data}
|
|
80
|
+
mbshipID="mbship-2"
|
|
81
|
+
donateLink="https://donation.comicrelief.com/"
|
|
82
|
+
clientID="donate"
|
|
83
|
+
cartID="default-comicrelief"
|
|
84
|
+
title="Donate today"
|
|
85
|
+
subtitle="Your support can help people facing the toughest times."
|
|
86
|
+
monthlyTitle="Give monthly"
|
|
87
|
+
monthlySubtitle="A regular gift helps fund long-term impact."
|
|
88
|
+
chooseAmountText="Choose a one-off amount"
|
|
89
|
+
monthlyChooseAmountText="Choose a monthly amount"
|
|
90
|
+
popUpText="Switching to a single gift means less predictable funding."
|
|
91
|
+
/>;
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## Text-only widget (no image), custom widget background + text colour
|
|
95
|
+
|
|
96
|
+
```js
|
|
97
|
+
import data from './dev-data/data-single';
|
|
98
|
+
|
|
99
|
+
<DonateBanner
|
|
100
|
+
donateWidgetIsTextOnly
|
|
101
|
+
pageBackgroundColour="rnd_25_glitzy_grape"
|
|
102
|
+
componentBackgroundColour="deep_violet_dark"
|
|
103
|
+
paddingAbove="2rem"
|
|
104
|
+
paddingBelow="2rem"
|
|
105
|
+
donateOrientation="right"
|
|
106
|
+
data={data}
|
|
107
|
+
mbshipID="mbship-3"
|
|
108
|
+
donateLink="https://donation.comicrelief.com/"
|
|
109
|
+
clientID="donate"
|
|
110
|
+
cartID="default-comicrelief"
|
|
111
|
+
title="Donate now"
|
|
112
|
+
subtitle="Make a difference today."
|
|
113
|
+
chooseAmountText="Enter an amount to give"
|
|
114
|
+
noMoneyBuys
|
|
115
|
+
/>;
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
## Text-only widget (no image), with the usual moneybuys, standard colours
|
|
119
|
+
|
|
120
|
+
```js
|
|
121
|
+
import data from './dev-data/data';
|
|
122
|
+
|
|
123
|
+
<DonateBanner
|
|
124
|
+
donateWidgetIsTextOnly
|
|
125
|
+
pageBackgroundColour="grey_light"
|
|
126
|
+
componentBackgroundColour="white"
|
|
127
|
+
paddingAbove="2rem"
|
|
128
|
+
paddingBelow="2rem"
|
|
129
|
+
donateOrientation="right"
|
|
130
|
+
data={data}
|
|
131
|
+
mbshipID="mbship-3b"
|
|
132
|
+
donateLink="https://donation.comicrelief.com/"
|
|
133
|
+
clientID="donate"
|
|
134
|
+
cartID="default-comicrelief"
|
|
135
|
+
title="Donate now"
|
|
136
|
+
subtitle="Choose an amount or pick a moneybuy."
|
|
137
|
+
/>;
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
## Different “Other amount” copy for single vs monthly
|
|
141
|
+
|
|
142
|
+
```js
|
|
143
|
+
import data from './dev-data/data';
|
|
144
|
+
const desktopPictures = require('../../../styleguide/data/data').defaultData;
|
|
145
|
+
|
|
146
|
+
const imageL = {
|
|
147
|
+
images: desktopPictures.images,
|
|
148
|
+
imageLow: desktopPictures.imageLow,
|
|
149
|
+
alt: 'Background image'
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
<DonateBanner
|
|
153
|
+
pageBackgroundColour="grey_light"
|
|
154
|
+
paddingAbove="0rem"
|
|
155
|
+
paddingBelow="0rem"
|
|
156
|
+
donateOrientation="left"
|
|
157
|
+
imageL={imageL}
|
|
158
|
+
data={data}
|
|
159
|
+
mbshipID="mbship-4"
|
|
160
|
+
donateLink="https://donation.comicrelief.com/"
|
|
161
|
+
clientID="donate"
|
|
162
|
+
cartID="default-comicrelief"
|
|
163
|
+
title="Donate now"
|
|
164
|
+
subtitle="Help fund life-changing work."
|
|
165
|
+
otherAmountText="can help support people in crisis."
|
|
166
|
+
monthlyOtherAmountText="each month can help provide long-term support."
|
|
167
|
+
/>;
|
|
168
|
+
```
|
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.Wrapper = exports.TitleWrapperOuter = exports.TitleWrapperInner = exports.SecondaryTitleText = exports.PrimaryTitleText = exports.OuterFieldset = exports.MoneyBuys = exports.Legend = exports.Label = exports.InnerContainer = exports.FormWrapper = exports.FormFieldset = exports.Form = exports.Error = exports.Copy = exports.Container = exports.Button = exports.BgImage = exports.AmountField = void 0;
|
|
9
|
+
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
10
|
+
var _Input = _interopRequireDefault(require("../../Atoms/Input/Input"));
|
|
11
|
+
var _Text = _interopRequireDefault(require("../../Atoms/Text/Text"));
|
|
12
|
+
var _spacing = _interopRequireDefault(require("../../../theme/shared/spacing"));
|
|
13
|
+
var _Picture = _interopRequireDefault(require("../../Atoms/Picture/Picture"));
|
|
14
|
+
var _zIndex = _interopRequireDefault(require("../../../theme/shared/zIndex"));
|
|
15
|
+
const Container = exports.Container = _styledComponents.default.div.withConfig({
|
|
16
|
+
displayName: "DonateBannerstyle__Container",
|
|
17
|
+
componentId: "sc-a4o3ek-0"
|
|
18
|
+
})(["position:relative;display:flex;flex-direction:column;justify-content:center;align-items:center;height:auto;margin:", ";background-color:", ";width:100%;padding:2rem;"], _ref => {
|
|
19
|
+
let {
|
|
20
|
+
paddingAbove,
|
|
21
|
+
paddingBelow
|
|
22
|
+
} = _ref;
|
|
23
|
+
return `${paddingAbove} 0 ${paddingBelow}`;
|
|
24
|
+
}, _ref2 => {
|
|
25
|
+
let {
|
|
26
|
+
theme,
|
|
27
|
+
pageBackgroundColour
|
|
28
|
+
} = _ref2;
|
|
29
|
+
return theme.color(pageBackgroundColour);
|
|
30
|
+
});
|
|
31
|
+
const InnerContainer = exports.InnerContainer = _styledComponents.default.div.withConfig({
|
|
32
|
+
displayName: "DonateBannerstyle__InnerContainer",
|
|
33
|
+
componentId: "sc-a4o3ek-1"
|
|
34
|
+
})(["position:relative;background-color:", ";border-radius:1rem;overflow:hidden;padding:none;width:100%;box-sizing:border-box;@media ", "{padding:", ";", "}@media ", "{padding-left:", ";padding-right:", ";}max-width:1500px;"], _ref3 => {
|
|
35
|
+
let {
|
|
36
|
+
theme,
|
|
37
|
+
componentBackgroundColour
|
|
38
|
+
} = _ref3;
|
|
39
|
+
return theme.color(componentBackgroundColour);
|
|
40
|
+
}, _ref4 => {
|
|
41
|
+
let {
|
|
42
|
+
theme
|
|
43
|
+
} = _ref4;
|
|
44
|
+
return theme.allBreakpoints('L');
|
|
45
|
+
}, (0, _spacing.default)('l'), _ref5 => {
|
|
46
|
+
let {
|
|
47
|
+
$donateWidgetIsTextOnly
|
|
48
|
+
} = _ref5;
|
|
49
|
+
return $donateWidgetIsTextOnly && (0, _styledComponents.css)(["padding-top:7.5rem;padding-bottom:7.5rem;"]);
|
|
50
|
+
}, _ref6 => {
|
|
51
|
+
let {
|
|
52
|
+
theme
|
|
53
|
+
} = _ref6;
|
|
54
|
+
return theme.allBreakpoints('XL');
|
|
55
|
+
}, (0, _spacing.default)('xxl'), (0, _spacing.default)('xxl'));
|
|
56
|
+
const BgImage = exports.BgImage = (0, _styledComponents.default)(_Picture.default).withConfig({
|
|
57
|
+
displayName: "DonateBannerstyle__BgImage",
|
|
58
|
+
componentId: "sc-a4o3ek-2"
|
|
59
|
+
})(["display:block;position:absolute;bottom:0;left:0;right:0;height:100%;"]);
|
|
60
|
+
const Wrapper = exports.Wrapper = _styledComponents.default.div.withConfig({
|
|
61
|
+
displayName: "DonateBannerstyle__Wrapper",
|
|
62
|
+
componentId: "sc-a4o3ek-3"
|
|
63
|
+
})(["position:relative;text-align:center;align-items:center;display:block;width:100%;", " ", ";@media ", "{display:flex;padding:", " ", ";gap:", ";flex-direction:row;}"], _ref7 => {
|
|
64
|
+
let {
|
|
65
|
+
hasTopImage,
|
|
66
|
+
shouldShowTitleSection
|
|
67
|
+
} = _ref7;
|
|
68
|
+
return hasTopImage && !shouldShowTitleSection && (0, _styledComponents.css)(["padding:0;"]);
|
|
69
|
+
}, _ref8 => {
|
|
70
|
+
let {
|
|
71
|
+
noTitlesAtAll
|
|
72
|
+
} = _ref8;
|
|
73
|
+
return noTitlesAtAll === true && (0, _styledComponents.css)(["justify-content:center;"]);
|
|
74
|
+
}, _ref9 => {
|
|
75
|
+
let {
|
|
76
|
+
theme
|
|
77
|
+
} = _ref9;
|
|
78
|
+
return theme.allBreakpoints('L');
|
|
79
|
+
}, (0, _spacing.default)('l'), (0, _spacing.default)('md'), (0, _spacing.default)('l'));
|
|
80
|
+
const TitleWrapperOuter = exports.TitleWrapperOuter = _styledComponents.default.div.withConfig({
|
|
81
|
+
displayName: "DonateBannerstyle__TitleWrapperOuter",
|
|
82
|
+
componentId: "sc-a4o3ek-4"
|
|
83
|
+
})(["width:100%;display:flex;font-family:", ";padding-bottom:", ";@media ", "{flex:1 1 0;width:auto;padding:0;align-items:center;order:", ";}"], _ref10 => {
|
|
84
|
+
let {
|
|
85
|
+
theme
|
|
86
|
+
} = _ref10;
|
|
87
|
+
return theme.fontFamilies(theme.font.regular);
|
|
88
|
+
}, (0, _spacing.default)('l'), _ref11 => {
|
|
89
|
+
let {
|
|
90
|
+
theme
|
|
91
|
+
} = _ref11;
|
|
92
|
+
return theme.allBreakpoints('L');
|
|
93
|
+
}, _ref12 => {
|
|
94
|
+
let {
|
|
95
|
+
donateOrientation
|
|
96
|
+
} = _ref12;
|
|
97
|
+
return donateOrientation === 'left' ? 2 : 1;
|
|
98
|
+
});
|
|
99
|
+
const TitleWrapperInner = exports.TitleWrapperInner = _styledComponents.default.div.withConfig({
|
|
100
|
+
displayName: "DonateBannerstyle__TitleWrapperInner",
|
|
101
|
+
componentId: "sc-a4o3ek-5"
|
|
102
|
+
})(["position:relative;text-align:left;"]);
|
|
103
|
+
const FormWrapper = exports.FormWrapper = _styledComponents.default.div.withConfig({
|
|
104
|
+
displayName: "DonateBannerstyle__FormWrapper",
|
|
105
|
+
componentId: "sc-a4o3ek-6"
|
|
106
|
+
})(["position:relative;font-family:", ";@media ", "{flex:1 1 0;min-width:0;width:auto;display:flex;justify-content:", ";order:", ";}"], _ref13 => {
|
|
107
|
+
let {
|
|
108
|
+
theme
|
|
109
|
+
} = _ref13;
|
|
110
|
+
return theme.fontFamilies(theme.font.regular);
|
|
111
|
+
}, _ref14 => {
|
|
112
|
+
let {
|
|
113
|
+
theme
|
|
114
|
+
} = _ref14;
|
|
115
|
+
return theme.allBreakpoints('L');
|
|
116
|
+
}, _ref15 => {
|
|
117
|
+
let {
|
|
118
|
+
donateOrientation
|
|
119
|
+
} = _ref15;
|
|
120
|
+
return donateOrientation === 'left' ? 'flex-start' : 'flex-end';
|
|
121
|
+
}, _ref16 => {
|
|
122
|
+
let {
|
|
123
|
+
donateOrientation
|
|
124
|
+
} = _ref16;
|
|
125
|
+
return donateOrientation === 'left' ? 1 : 2;
|
|
126
|
+
});
|
|
127
|
+
const Error = exports.Error = (0, _styledComponents.default)(_Text.default).withConfig({
|
|
128
|
+
displayName: "DonateBannerstyle__Error",
|
|
129
|
+
componentId: "sc-a4o3ek-7"
|
|
130
|
+
})(["color:", ";font-size:", ";font-weight:500;margin-top:", ";"], _ref17 => {
|
|
131
|
+
let {
|
|
132
|
+
theme
|
|
133
|
+
} = _ref17;
|
|
134
|
+
return theme.color('red');
|
|
135
|
+
}, _ref18 => {
|
|
136
|
+
let {
|
|
137
|
+
theme
|
|
138
|
+
} = _ref18;
|
|
139
|
+
return theme.fontSize('s');
|
|
140
|
+
}, (0, _spacing.default)('l'));
|
|
141
|
+
const Form = exports.Form = _styledComponents.default.form.withConfig({
|
|
142
|
+
displayName: "DonateBannerstyle__Form",
|
|
143
|
+
componentId: "sc-a4o3ek-8"
|
|
144
|
+
})(["position:relative;width:100%;background-color:", ";box-shadow:0px 0px 16px rgba(0,0,0,0.15);margin-left:auto;margin-right:auto;", " h3{margin-top:", ";}input{max-width:100%;margin:0;}input[type='submit']{margin:", " 0;}@media ", "{width:100%;margin-right:auto;margin-left:auto;}@media ", "{margin-top:", ";border-radius:0.5rem;max-width:461px;min-width:400px;margin-left:0;margin-right:0;}"], _ref19 => {
|
|
145
|
+
let {
|
|
146
|
+
theme
|
|
147
|
+
} = _ref19;
|
|
148
|
+
return theme.color('white');
|
|
149
|
+
}, _ref20 => {
|
|
150
|
+
let {
|
|
151
|
+
hasTopImage,
|
|
152
|
+
shouldShowTitleSection
|
|
153
|
+
} = _ref20;
|
|
154
|
+
return hasTopImage && !shouldShowTitleSection && (0, _styledComponents.css)(["margin-top:0;"]);
|
|
155
|
+
}, (0, _spacing.default)('md'), (0, _spacing.default)('l'), _ref21 => {
|
|
156
|
+
let {
|
|
157
|
+
theme
|
|
158
|
+
} = _ref21;
|
|
159
|
+
return theme.allBreakpoints('M');
|
|
160
|
+
}, _ref22 => {
|
|
161
|
+
let {
|
|
162
|
+
theme
|
|
163
|
+
} = _ref22;
|
|
164
|
+
return theme.allBreakpoints('L');
|
|
165
|
+
}, (0, _spacing.default)('md'));
|
|
166
|
+
const OuterFieldset = exports.OuterFieldset = _styledComponents.default.fieldset.withConfig({
|
|
167
|
+
displayName: "DonateBannerstyle__OuterFieldset",
|
|
168
|
+
componentId: "sc-a4o3ek-9"
|
|
169
|
+
})(["color:", ";padding:0 ", " ", ";margin:0;border:none;@media ", "{padding:0 ", " ", ";}input[type='submit']{margin-bottom:0;}"], _ref23 => {
|
|
170
|
+
let {
|
|
171
|
+
theme
|
|
172
|
+
} = _ref23;
|
|
173
|
+
return theme.color('black');
|
|
174
|
+
}, (0, _spacing.default)('md'), (0, _spacing.default)('md'), _ref24 => {
|
|
175
|
+
let {
|
|
176
|
+
theme
|
|
177
|
+
} = _ref24;
|
|
178
|
+
return theme.allBreakpoints('M');
|
|
179
|
+
}, (0, _spacing.default)('l'), (0, _spacing.default)('l'));
|
|
180
|
+
const Legend = exports.Legend = _styledComponents.default.legend.withConfig({
|
|
181
|
+
displayName: "DonateBannerstyle__Legend",
|
|
182
|
+
componentId: "sc-a4o3ek-10"
|
|
183
|
+
})(["margin:0;padding:", " ", " 0 ", ";display:block;width:100%;"], (0, _spacing.default)('l'), (0, _spacing.default)('sm'), (0, _spacing.default)('sm'));
|
|
184
|
+
const PrimaryTitleText = exports.PrimaryTitleText = (0, _styledComponents.default)(_Text.default).withConfig({
|
|
185
|
+
displayName: "DonateBannerstyle__PrimaryTitleText",
|
|
186
|
+
componentId: "sc-a4o3ek-11"
|
|
187
|
+
})(["display:block;text-align:left;font-size:", ";font-weight:700;"], _ref25 => {
|
|
188
|
+
let {
|
|
189
|
+
theme
|
|
190
|
+
} = _ref25;
|
|
191
|
+
return theme.fontSize('s');
|
|
192
|
+
});
|
|
193
|
+
const SecondaryTitleText = exports.SecondaryTitleText = (0, _styledComponents.default)(_Text.default).withConfig({
|
|
194
|
+
displayName: "DonateBannerstyle__SecondaryTitleText",
|
|
195
|
+
componentId: "sc-a4o3ek-12"
|
|
196
|
+
})(["display:block;text-align:left;font-size:", ";line-height:1.5;margin-top:", ";"], _ref26 => {
|
|
197
|
+
let {
|
|
198
|
+
theme
|
|
199
|
+
} = _ref26;
|
|
200
|
+
return theme.fontSize('s');
|
|
201
|
+
}, (0, _spacing.default)('sm'));
|
|
202
|
+
const MoneyBuys = exports.MoneyBuys = _styledComponents.default.div.withConfig({
|
|
203
|
+
displayName: "DonateBannerstyle__MoneyBuys",
|
|
204
|
+
componentId: "sc-a4o3ek-13"
|
|
205
|
+
})(["display:flex;justify-content:space-between;flex-direction:column;margin-bottom:", ";@media ", "{flex-direction:row;margin-top:", ";}label{flex:0 0 31%;margin-bottom:", ";@media ", "{margin-bottom:0;}input{cursor:pointer;padding:", " ", ";}}"], (0, _spacing.default)('md'), _ref27 => {
|
|
206
|
+
let {
|
|
207
|
+
theme
|
|
208
|
+
} = _ref27;
|
|
209
|
+
return theme.allBreakpoints('M');
|
|
210
|
+
}, (0, _spacing.default)('m'), (0, _spacing.default)('sm'), _ref28 => {
|
|
211
|
+
let {
|
|
212
|
+
theme
|
|
213
|
+
} = _ref28;
|
|
214
|
+
return theme.allBreakpoints('M');
|
|
215
|
+
}, (0, _spacing.default)('sm'), (0, _spacing.default)('m'));
|
|
216
|
+
const FormFieldset = exports.FormFieldset = _styledComponents.default.div.withConfig({
|
|
217
|
+
displayName: "DonateBannerstyle__FormFieldset",
|
|
218
|
+
componentId: "sc-a4o3ek-14"
|
|
219
|
+
})(["display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;"]);
|
|
220
|
+
const Label = exports.Label = (0, _styledComponents.default)(_Text.default).withConfig({
|
|
221
|
+
displayName: "DonateBannerstyle__Label",
|
|
222
|
+
componentId: "sc-a4o3ek-15"
|
|
223
|
+
})(["margin-bottom:", ";"], (0, _spacing.default)('sm'));
|
|
224
|
+
const AmountField = exports.AmountField = (0, _styledComponents.default)(_Input.default).withConfig({
|
|
225
|
+
displayName: "DonateBannerstyle__AmountField",
|
|
226
|
+
componentId: "sc-a4o3ek-16"
|
|
227
|
+
})(["position:relative;flex-basis:50%;flex-shrink:0;flex-grow:0;font-weight:400;display:block;", " @media ", "{flex-basis:60%;}span{position:absolute;font-size:20px;top:50%;transform:translateY(-50%);left:0px;font-weight:500;padding:0px 15px;", ";}input{height:48px;border:1px solid ", ";background:", ";border-radius:0.5rem;padding:", " ", " ", " ", ";&:focus{outline:none;border:1px solid ", ";}}"], _ref29 => {
|
|
228
|
+
let {
|
|
229
|
+
$noMoneyBuys
|
|
230
|
+
} = _ref29;
|
|
231
|
+
return $noMoneyBuys === true && (0, _styledComponents.css)(["margin-top:", ";"], (0, _spacing.default)('sm'));
|
|
232
|
+
}, _ref30 => {
|
|
233
|
+
let {
|
|
234
|
+
theme
|
|
235
|
+
} = _ref30;
|
|
236
|
+
return theme.allBreakpoints('M');
|
|
237
|
+
}, (0, _zIndex.default)('high'), _ref31 => {
|
|
238
|
+
let {
|
|
239
|
+
theme
|
|
240
|
+
} = _ref31;
|
|
241
|
+
return theme.color('grey');
|
|
242
|
+
}, _ref32 => {
|
|
243
|
+
let {
|
|
244
|
+
theme
|
|
245
|
+
} = _ref32;
|
|
246
|
+
return theme.color('grey_light');
|
|
247
|
+
}, (0, _spacing.default)('sm'), (0, _spacing.default)('md'), (0, _spacing.default)('sm'), (0, _spacing.default)('l'), _ref33 => {
|
|
248
|
+
let {
|
|
249
|
+
theme
|
|
250
|
+
} = _ref33;
|
|
251
|
+
return theme.color('grey');
|
|
252
|
+
});
|
|
253
|
+
const Copy = exports.Copy = _styledComponents.default.p.withConfig({
|
|
254
|
+
displayName: "DonateBannerstyle__Copy",
|
|
255
|
+
componentId: "sc-a4o3ek-17"
|
|
256
|
+
})(["line-height:1.5;margin-top:", ";color:", ";"], (0, _spacing.default)('l'), _ref34 => {
|
|
257
|
+
let {
|
|
258
|
+
theme
|
|
259
|
+
} = _ref34;
|
|
260
|
+
return theme.color('black');
|
|
261
|
+
});
|
|
262
|
+
const Button = exports.Button = _styledComponents.default.button.withConfig({
|
|
263
|
+
displayName: "DonateBannerstyle__Button",
|
|
264
|
+
componentId: "sc-a4o3ek-18"
|
|
265
|
+
})(["width:100%;margin:", " 0 ", ";color:", ";font-size:", ";font-weight:bold;cursor:pointer;min-height:48px;background:", ";text-decoration:none;border-radius:0.5rem;border:none;appearance:none;:active,:focus,:hover{outline:none;background-color:", ";}@media ", "{padding:", " ", ";}"], (0, _spacing.default)('sm'), (0, _spacing.default)('sm'), _ref35 => {
|
|
266
|
+
let {
|
|
267
|
+
theme
|
|
268
|
+
} = _ref35;
|
|
269
|
+
return theme.color('white');
|
|
270
|
+
}, _ref36 => {
|
|
271
|
+
let {
|
|
272
|
+
theme
|
|
273
|
+
} = _ref36;
|
|
274
|
+
return theme.fontSize('s');
|
|
275
|
+
}, _ref37 => {
|
|
276
|
+
let {
|
|
277
|
+
theme,
|
|
278
|
+
color
|
|
279
|
+
} = _ref37;
|
|
280
|
+
return theme.color(color);
|
|
281
|
+
}, _ref38 => {
|
|
282
|
+
let {
|
|
283
|
+
theme
|
|
284
|
+
} = _ref38;
|
|
285
|
+
return theme.color('coral_dark');
|
|
286
|
+
}, _ref39 => {
|
|
287
|
+
let {
|
|
288
|
+
theme
|
|
289
|
+
} = _ref39;
|
|
290
|
+
return theme.allBreakpoints('M');
|
|
291
|
+
}, (0, _spacing.default)('md'), (0, _spacing.default)('l'));
|