@comicrelief/component-library 7.38.0 → 7.40.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Atoms/Button/Button.js +9 -5
- package/dist/components/Atoms/Button/Button.test.js +2 -2
- package/dist/components/Atoms/Picture/Picture.js +49 -6
- package/dist/components/Atoms/Picture/Picture.test.js +2 -2
- package/dist/components/Molecules/ArticleTeaser/ArticleTeaser.test.js +2 -2
- package/dist/components/Molecules/Card/Card.js +20 -28
- package/dist/components/Molecules/Card/Card.md +71 -3
- package/dist/components/Molecules/Card/Card.style.js +74 -0
- package/dist/components/Molecules/Card/Card.test.js +10 -0
- package/dist/components/Molecules/Card/__snapshots__/Card.test.js.snap +113 -7
- package/dist/components/Molecules/Chip/Chip.style.js +26 -22
- package/dist/components/Molecules/Chip/Chip.test.js +2 -2
- package/dist/components/Molecules/PartnerLink/PartnerLink.test.js +1 -1
- package/dist/components/Molecules/Promo/Promo.style.js +65 -20
- package/dist/components/Molecules/SearchInput/SearchInput.style.js +7 -3
- package/dist/components/Molecules/SingleMessage/SingleMessage.style.js +89 -59
- package/dist/components/Organisms/Donate/Donate.style.js +96 -42
- package/dist/components/Organisms/Donate/Form/PopUpComponent.js +11 -7
- package/dist/components/Organisms/Donate/GivingSelector/GivingSelector.style.js +17 -13
- package/dist/components/Organisms/Donate/MoneyBuy/MoneyBuy.js +17 -13
- package/dist/components/Organisms/EmailSignUp/__snapshots__/EmailSignUp.test.js.snap +8 -6
- package/dist/components/Organisms/Header/Header.style.js +2 -2
- package/dist/components/Organisms/MarketingPreferencesDS/MarketingPreferencesDS.style.js +35 -26
- package/dist/components/Organisms/Membership/Membership.style.js +43 -24
- package/dist/index.js +7 -0
- package/dist/theme/shared/allContainers.js +12 -0
- package/package.json +1 -1
- package/src/components/Atoms/Button/Button.js +1 -2
- package/src/components/Atoms/Button/Button.test.js +12 -10
- package/src/components/Atoms/Picture/Picture.js +50 -5
- package/src/components/Atoms/Picture/Picture.test.js +12 -8
- package/src/components/Molecules/ArticleTeaser/ArticleTeaser.test.js +7 -7
- package/src/components/Molecules/Card/Card.js +29 -28
- package/src/components/Molecules/Card/Card.md +71 -3
- package/src/components/Molecules/Card/Card.style.js +77 -0
- package/src/components/Molecules/Card/Card.test.js +17 -0
- package/src/components/Molecules/Card/__snapshots__/Card.test.js.snap +113 -7
- package/src/components/Molecules/Chip/Chip.style.js +1 -2
- package/src/components/Molecules/Chip/Chip.test.js +12 -10
- package/src/components/Molecules/PartnerLink/PartnerLink.test.js +12 -8
- package/src/components/Molecules/Promo/Promo.style.js +10 -10
- package/src/components/Molecules/SearchInput/SearchInput.style.js +1 -2
- package/src/components/Molecules/SingleMessage/SingleMessage.style.js +7 -7
- package/src/components/Organisms/Donate/Donate.style.js +11 -12
- package/src/components/Organisms/Donate/Form/PopUpComponent.js +1 -2
- package/src/components/Organisms/Donate/GivingSelector/GivingSelector.style.js +1 -2
- package/src/components/Organisms/Donate/MoneyBuy/MoneyBuy.js +1 -2
- package/src/components/Organisms/EmailSignUp/__snapshots__/EmailSignUp.test.js.snap +8 -6
- package/src/components/Organisms/Header/Header.style.js +1 -1
- package/src/components/Organisms/MarketingPreferencesDS/MarketingPreferencesDS.style.js +2 -3
- package/src/components/Organisms/Membership/Membership.style.js +4 -5
- package/src/index.js +1 -0
- package/src/theme/shared/allContainers.js +7 -0
|
@@ -10,24 +10,28 @@ var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
|
10
10
|
var _Input = _interopRequireDefault(require("../../Atoms/Input/Input"));
|
|
11
11
|
var _Text = _interopRequireDefault(require("../../Atoms/Text/Text"));
|
|
12
12
|
var _spacing = _interopRequireDefault(require("../../../theme/shared/spacing"));
|
|
13
|
-
var _size = require("../../../theme/shared/size");
|
|
14
13
|
var _Picture = _interopRequireDefault(require("../../Atoms/Picture/Picture"));
|
|
15
14
|
var _zIndex = _interopRequireDefault(require("../../../theme/shared/zIndex"));
|
|
16
15
|
var _utils = _interopRequireDefault(require("../../../utils/_utils"));
|
|
17
16
|
const Container = exports.Container = _styledComponents.default.div.withConfig({
|
|
18
17
|
displayName: "Donatestyle__Container",
|
|
19
18
|
componentId: "sc-8rjm3t-0"
|
|
20
|
-
})(["position:relative;display:flex;flex-direction:column;justify-content:center;height:auto;background-color:", "
|
|
19
|
+
})(["position:relative;display:flex;flex-direction:column;justify-content:center;height:auto;background-color:", ";@media ", "{flex-direction:row;align-items:center;justify-content:inherit;background-color:", ";}"], _ref => {
|
|
21
20
|
let {
|
|
22
21
|
theme,
|
|
23
22
|
mobileBackgroundColor
|
|
24
23
|
} = _ref;
|
|
25
24
|
return theme.color(mobileBackgroundColor);
|
|
26
|
-
},
|
|
25
|
+
}, _ref2 => {
|
|
26
|
+
let {
|
|
27
|
+
theme
|
|
28
|
+
} = _ref2;
|
|
29
|
+
return theme.allBreakpoints('L');
|
|
30
|
+
}, _ref3 => {
|
|
27
31
|
let {
|
|
28
32
|
theme,
|
|
29
33
|
desktopOverlayColor
|
|
30
|
-
} =
|
|
34
|
+
} = _ref3;
|
|
31
35
|
return theme.color(desktopOverlayColor);
|
|
32
36
|
});
|
|
33
37
|
const PopUp = exports.PopUp = _styledComponents.default.div.withConfig({
|
|
@@ -37,40 +41,55 @@ const PopUp = exports.PopUp = _styledComponents.default.div.withConfig({
|
|
|
37
41
|
const BgImage = exports.BgImage = (0, _styledComponents.default)(_Picture.default).withConfig({
|
|
38
42
|
displayName: "Donatestyle__BgImage",
|
|
39
43
|
componentId: "sc-8rjm3t-2"
|
|
40
|
-
})(["display:block;position:absolute;bottom:0;left:0;right:0;height:100%;", ""],
|
|
44
|
+
})(["display:block;position:absolute;bottom:0;left:0;right:0;height:100%;", ""], _ref4 => {
|
|
41
45
|
let {
|
|
42
46
|
backgroundColor
|
|
43
|
-
} =
|
|
47
|
+
} = _ref4;
|
|
44
48
|
return backgroundColor !== 'transparent' && "\n opacity: 0.4;\n ";
|
|
45
49
|
});
|
|
46
50
|
const Wrapper = exports.Wrapper = _styledComponents.default.div.withConfig({
|
|
47
51
|
displayName: "Donatestyle__Wrapper",
|
|
48
52
|
componentId: "sc-8rjm3t-3"
|
|
49
|
-
})(["position:relative;text-align:center;padding:", " ", ";flex-direction:row;align-items:center;display:block;width:100%;flex-direction:", ";", "
|
|
53
|
+
})(["position:relative;text-align:center;padding:", " ", ";flex-direction:row;align-items:center;display:block;width:100%;flex-direction:", ";", ";@media ", "{padding:", " ", ";}@media ", "{display:flex;padding:", " 0;", ";}"], (0, _spacing.default)('l'), (0, _spacing.default)('md'), _ref5 => {
|
|
50
54
|
let {
|
|
51
55
|
formAlignRight
|
|
52
|
-
} =
|
|
56
|
+
} = _ref5;
|
|
53
57
|
return formAlignRight === true ? 'row-reverse' : 'row';
|
|
54
|
-
},
|
|
58
|
+
}, _ref6 => {
|
|
55
59
|
let {
|
|
56
60
|
noTitlesAtAll
|
|
57
|
-
} =
|
|
61
|
+
} = _ref6;
|
|
58
62
|
return noTitlesAtAll === true && (0, _styledComponents.css)(["justify-content:center;"]);
|
|
59
|
-
},
|
|
63
|
+
}, _ref7 => {
|
|
64
|
+
let {
|
|
65
|
+
theme
|
|
66
|
+
} = _ref7;
|
|
67
|
+
return theme.allBreakpoints('M');
|
|
68
|
+
}, (0, _spacing.default)('xl'), (0, _spacing.default)('md'), _ref8 => {
|
|
69
|
+
let {
|
|
70
|
+
theme
|
|
71
|
+
} = _ref8;
|
|
72
|
+
return theme.allBreakpoints('L');
|
|
73
|
+
}, (0, _spacing.default)('xl'), _ref9 => {
|
|
60
74
|
let {
|
|
61
75
|
paddingOption
|
|
62
|
-
} =
|
|
76
|
+
} = _ref9;
|
|
63
77
|
return (0, _utils.default)(paddingOption);
|
|
64
78
|
});
|
|
65
79
|
const TitleWrapperOuter = exports.TitleWrapperOuter = _styledComponents.default.div.withConfig({
|
|
66
80
|
displayName: "Donatestyle__TitleWrapperOuter",
|
|
67
81
|
componentId: "sc-8rjm3t-4"
|
|
68
|
-
})(["width:100%;display:flex;font-family:", "
|
|
82
|
+
})(["width:100%;display:flex;font-family:", ";@media ", "{width:50%;padding:", ";align-items:center;}"], _ref10 => {
|
|
69
83
|
let {
|
|
70
84
|
theme
|
|
71
|
-
} =
|
|
85
|
+
} = _ref10;
|
|
72
86
|
return theme.fontFamilies(theme.font.regular);
|
|
73
|
-
},
|
|
87
|
+
}, _ref11 => {
|
|
88
|
+
let {
|
|
89
|
+
theme
|
|
90
|
+
} = _ref11;
|
|
91
|
+
return theme.allBreakpoints('L');
|
|
92
|
+
}, (0, _spacing.default)('xl'));
|
|
74
93
|
const TitleWrapperInner = exports.TitleWrapperInner = _styledComponents.default.div.withConfig({
|
|
75
94
|
displayName: "Donatestyle__TitleWrapperInner",
|
|
76
95
|
componentId: "sc-8rjm3t-5"
|
|
@@ -78,39 +97,54 @@ const TitleWrapperInner = exports.TitleWrapperInner = _styledComponents.default.
|
|
|
78
97
|
const FormWrapper = exports.FormWrapper = _styledComponents.default.div.withConfig({
|
|
79
98
|
displayName: "Donatestyle__FormWrapper",
|
|
80
99
|
componentId: "sc-8rjm3t-6"
|
|
81
|
-
})(["position:relative;font-family:", "
|
|
100
|
+
})(["position:relative;font-family:", ";@media ", "{width:50%;}"], _ref12 => {
|
|
82
101
|
let {
|
|
83
102
|
theme
|
|
84
|
-
} =
|
|
103
|
+
} = _ref12;
|
|
85
104
|
return theme.fontFamilies(theme.font.regular);
|
|
86
|
-
},
|
|
105
|
+
}, _ref13 => {
|
|
106
|
+
let {
|
|
107
|
+
theme
|
|
108
|
+
} = _ref13;
|
|
109
|
+
return theme.allBreakpoints('L');
|
|
110
|
+
});
|
|
87
111
|
const Error = exports.Error = (0, _styledComponents.default)(_Text.default).withConfig({
|
|
88
112
|
displayName: "Donatestyle__Error",
|
|
89
113
|
componentId: "sc-8rjm3t-7"
|
|
90
|
-
})(["color:", ";font-size:", ";font-weight:500;margin-top:", ";"],
|
|
114
|
+
})(["color:", ";font-size:", ";font-weight:500;margin-top:", ";"], _ref14 => {
|
|
91
115
|
let {
|
|
92
116
|
theme
|
|
93
|
-
} =
|
|
117
|
+
} = _ref14;
|
|
94
118
|
return theme.color('red');
|
|
95
|
-
},
|
|
119
|
+
}, _ref15 => {
|
|
96
120
|
let {
|
|
97
121
|
theme
|
|
98
|
-
} =
|
|
122
|
+
} = _ref15;
|
|
99
123
|
return theme.fontSize('s');
|
|
100
124
|
}, (0, _spacing.default)('l'));
|
|
101
125
|
const Form = exports.Form = _styledComponents.default.form.withConfig({
|
|
102
126
|
displayName: "Donatestyle__Form",
|
|
103
127
|
componentId: "sc-8rjm3t-8"
|
|
104
|
-
})(["position:relative;width:100%;background-color:", ";box-shadow:0px 0px 16px rgba(0,0,0,0.15);border-radius:10px;margin-top:", ";h3{margin-top:", ";}input{max-width:100%;margin:0;}input[type='submit']{margin:", " 0;}", "{width:450px;margin-right:auto;margin-left:auto;}"],
|
|
128
|
+
})(["position:relative;width:100%;background-color:", ";box-shadow:0px 0px 16px rgba(0,0,0,0.15);border-radius:10px;margin-top:", ";h3{margin-top:", ";}input{max-width:100%;margin:0;}input[type='submit']{margin:", " 0;}@media ", "{width:450px;margin-right:auto;margin-left:auto;}"], _ref16 => {
|
|
105
129
|
let {
|
|
106
130
|
theme
|
|
107
|
-
} =
|
|
131
|
+
} = _ref16;
|
|
108
132
|
return theme.color('white');
|
|
109
|
-
}, (0, _spacing.default)('md'), (0, _spacing.default)('md'), (0, _spacing.default)('l'),
|
|
133
|
+
}, (0, _spacing.default)('md'), (0, _spacing.default)('md'), (0, _spacing.default)('l'), _ref17 => {
|
|
134
|
+
let {
|
|
135
|
+
theme
|
|
136
|
+
} = _ref17;
|
|
137
|
+
return theme.allBreakpoints('M');
|
|
138
|
+
});
|
|
110
139
|
const OuterFieldset = exports.OuterFieldset = _styledComponents.default.fieldset.withConfig({
|
|
111
140
|
displayName: "Donatestyle__OuterFieldset",
|
|
112
141
|
componentId: "sc-8rjm3t-9"
|
|
113
|
-
})(["padding:0 ", " ", ";margin:0;border:none
|
|
142
|
+
})(["padding:0 ", " ", ";margin:0;border:none;@media ", "{padding:0 ", " ", ";}input[type='submit']{margin-bottom:0;}"], (0, _spacing.default)('md'), (0, _spacing.default)('md'), _ref18 => {
|
|
143
|
+
let {
|
|
144
|
+
theme
|
|
145
|
+
} = _ref18;
|
|
146
|
+
return theme.allBreakpoints('M');
|
|
147
|
+
}, (0, _spacing.default)('l'), (0, _spacing.default)('l'));
|
|
114
148
|
const Legend = exports.Legend = _styledComponents.default.legend.withConfig({
|
|
115
149
|
displayName: "Donatestyle__Legend",
|
|
116
150
|
componentId: "sc-8rjm3t-10"
|
|
@@ -118,7 +152,17 @@ const Legend = exports.Legend = _styledComponents.default.legend.withConfig({
|
|
|
118
152
|
const MoneyBuys = exports.MoneyBuys = _styledComponents.default.div.withConfig({
|
|
119
153
|
displayName: "Donatestyle__MoneyBuys",
|
|
120
154
|
componentId: "sc-8rjm3t-11"
|
|
121
|
-
})(["display:flex;justify-content:space-between;flex-direction:column;margin-bottom:", "
|
|
155
|
+
})(["display:flex;justify-content:space-between;flex-direction:column;margin-bottom:", ";@media ", "{flex-direction:row;}label{flex:0 0 30%;margin-bottom:", ";@media ", "{margin-bottom:0;}input{cursor:pointer;padding:", " ", ";}}"], (0, _spacing.default)('l'), _ref19 => {
|
|
156
|
+
let {
|
|
157
|
+
theme
|
|
158
|
+
} = _ref19;
|
|
159
|
+
return theme.allBreakpoints('M');
|
|
160
|
+
}, (0, _spacing.default)('sm'), _ref20 => {
|
|
161
|
+
let {
|
|
162
|
+
theme
|
|
163
|
+
} = _ref20;
|
|
164
|
+
return theme.allBreakpoints('M');
|
|
165
|
+
}, (0, _spacing.default)('m'), (0, _spacing.default)('sm'));
|
|
122
166
|
const FormFieldset = exports.FormFieldset = _styledComponents.default.div.withConfig({
|
|
123
167
|
displayName: "Donatestyle__FormFieldset",
|
|
124
168
|
componentId: "sc-8rjm3t-12"
|
|
@@ -130,20 +174,25 @@ const Label = exports.Label = (0, _styledComponents.default)(_Text.default).with
|
|
|
130
174
|
const AmountField = exports.AmountField = (0, _styledComponents.default)(_Input.default).withConfig({
|
|
131
175
|
displayName: "Donatestyle__AmountField",
|
|
132
176
|
componentId: "sc-8rjm3t-14"
|
|
133
|
-
})(["position:relative;flex-basis:50%;flex-shrink:0;flex-grow:0;font-weight:400;display:block
|
|
177
|
+
})(["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:2px solid ", ";background:", ";border-radius:10px;padding:", " ", " ", " ", ";&:focus{outline:none;border:2px solid ", ";}}"], _ref21 => {
|
|
134
178
|
let {
|
|
135
179
|
theme
|
|
136
|
-
} =
|
|
180
|
+
} = _ref21;
|
|
181
|
+
return theme.allBreakpoints('M');
|
|
182
|
+
}, (0, _zIndex.default)('high'), _ref22 => {
|
|
183
|
+
let {
|
|
184
|
+
theme
|
|
185
|
+
} = _ref22;
|
|
137
186
|
return theme.color('grey');
|
|
138
|
-
},
|
|
187
|
+
}, _ref23 => {
|
|
139
188
|
let {
|
|
140
189
|
theme
|
|
141
|
-
} =
|
|
190
|
+
} = _ref23;
|
|
142
191
|
return theme.color('grey_light');
|
|
143
|
-
}, (0, _spacing.default)('sm'), (0, _spacing.default)('md'), (0, _spacing.default)('sm'), (0, _spacing.default)('l'),
|
|
192
|
+
}, (0, _spacing.default)('sm'), (0, _spacing.default)('md'), (0, _spacing.default)('sm'), (0, _spacing.default)('l'), _ref24 => {
|
|
144
193
|
let {
|
|
145
194
|
theme
|
|
146
|
-
} =
|
|
195
|
+
} = _ref24;
|
|
147
196
|
return theme.color('grey');
|
|
148
197
|
});
|
|
149
198
|
const Copy = exports.Copy = (0, _styledComponents.default)(_Text.default).withConfig({
|
|
@@ -153,25 +202,30 @@ const Copy = exports.Copy = (0, _styledComponents.default)(_Text.default).withCo
|
|
|
153
202
|
const Button = exports.Button = _styledComponents.default.button.withConfig({
|
|
154
203
|
displayName: "Donatestyle__Button",
|
|
155
204
|
componentId: "sc-8rjm3t-16"
|
|
156
|
-
})(["width:100%;margin:", " 0 ", ";color:", ";font-size:", ";font-weight:bold;cursor:pointer;min-height:48px;background:", ";text-decoration:none;border-radius:2rem;border:none;box-shadow:0px 0px 16px rgba(0,0,0,0.15);appearance:none;:active,:focus,:hover{outline:none;background-color:", ";}", "{padding:", " ", ";}"], (0, _spacing.default)('l'), (0, _spacing.default)('l'),
|
|
205
|
+
})(["width:100%;margin:", " 0 ", ";color:", ";font-size:", ";font-weight:bold;cursor:pointer;min-height:48px;background:", ";text-decoration:none;border-radius:2rem;border:none;box-shadow:0px 0px 16px rgba(0,0,0,0.15);appearance:none;:active,:focus,:hover{outline:none;background-color:", ";}@media ", "{padding:", " ", ";}"], (0, _spacing.default)('l'), (0, _spacing.default)('l'), _ref25 => {
|
|
157
206
|
let {
|
|
158
207
|
theme
|
|
159
|
-
} =
|
|
208
|
+
} = _ref25;
|
|
160
209
|
return theme.color('white');
|
|
161
|
-
},
|
|
210
|
+
}, _ref26 => {
|
|
162
211
|
let {
|
|
163
212
|
theme
|
|
164
|
-
} =
|
|
213
|
+
} = _ref26;
|
|
165
214
|
return theme.fontSize('s');
|
|
166
|
-
},
|
|
215
|
+
}, _ref27 => {
|
|
167
216
|
let {
|
|
168
217
|
theme,
|
|
169
218
|
color
|
|
170
|
-
} =
|
|
219
|
+
} = _ref27;
|
|
171
220
|
return theme.color(color);
|
|
172
|
-
},
|
|
221
|
+
}, _ref28 => {
|
|
173
222
|
let {
|
|
174
223
|
theme
|
|
175
|
-
} =
|
|
224
|
+
} = _ref28;
|
|
176
225
|
return theme.color('coral_dark');
|
|
177
|
-
},
|
|
226
|
+
}, _ref29 => {
|
|
227
|
+
let {
|
|
228
|
+
theme
|
|
229
|
+
} = _ref29;
|
|
230
|
+
return theme.allBreakpoints('M');
|
|
231
|
+
}, (0, _spacing.default)('md'), (0, _spacing.default)('l'));
|
|
@@ -9,7 +9,6 @@ exports.default = void 0;
|
|
|
9
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
10
10
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
11
11
|
var _Text = _interopRequireDefault(require("../../../Atoms/Text/Text"));
|
|
12
|
-
var _size = require("../../../../theme/shared/size");
|
|
13
12
|
var _close = _interopRequireDefault(require("../assets/close.svg"));
|
|
14
13
|
const closeDuration = 0.6;
|
|
15
14
|
const fadeClose = (0, _styledComponents.keyframes)(["0%{opacity:1;max-height:350px;}100%{opacity:0;max-height:0px;display:none;margin-top:-16px;}"]);
|
|
@@ -17,12 +16,17 @@ const fadeOpen = (0, _styledComponents.keyframes)(["0%{opacity:0;max-height:0px;
|
|
|
17
16
|
const StyledPopUp = _styledComponents.default.div.withConfig({
|
|
18
17
|
displayName: "PopUpComponent__StyledPopUp",
|
|
19
18
|
componentId: "sc-1d7imlo-0"
|
|
20
|
-
})(["display:grid;overflow:hidden;max-height:350px;opacity:1;animation:0.4s ", " ease;", " background-color:", ";box-shadow:0px 0px 16px rgba(0,0,0,0.15);border-radius:10px
|
|
19
|
+
})(["display:grid;overflow:hidden;max-height:350px;opacity:1;animation:0.4s ", " ease;", " background-color:", ";box-shadow:0px 0px 16px rgba(0,0,0,0.15);border-radius:10px;@media ", "{width:450px;margin-right:auto;margin-left:auto;}"], props => props.fadeOpen, props => props.isClosed && (0, _styledComponents.css)(["animation:", "s ", " ease forwards;"], closeDuration, props.fadeClose), _ref => {
|
|
21
20
|
let {
|
|
22
21
|
theme
|
|
23
22
|
} = _ref;
|
|
24
23
|
return theme.color('blue_light');
|
|
25
|
-
},
|
|
24
|
+
}, _ref2 => {
|
|
25
|
+
let {
|
|
26
|
+
theme
|
|
27
|
+
} = _ref2;
|
|
28
|
+
return theme.allBreakpoints('M');
|
|
29
|
+
});
|
|
26
30
|
const TextWrapper = _styledComponents.default.div.withConfig({
|
|
27
31
|
displayName: "PopUpComponent__TextWrapper",
|
|
28
32
|
componentId: "sc-1d7imlo-1"
|
|
@@ -30,17 +34,17 @@ const TextWrapper = _styledComponents.default.div.withConfig({
|
|
|
30
34
|
const Button = _styledComponents.default.button.withConfig({
|
|
31
35
|
displayName: "PopUpComponent__Button",
|
|
32
36
|
componentId: "sc-1d7imlo-2"
|
|
33
|
-
})(["justify-self:end;background-color:transparent;border:0;cursor:pointer;width:30px;height:30px;margin:3px;:active,:focus,:hover{outline:none;border:1px solid ", ";}img{width:15px;height:15px;vertical-align:middle;}"],
|
|
37
|
+
})(["justify-self:end;background-color:transparent;border:0;cursor:pointer;width:30px;height:30px;margin:3px;:active,:focus,:hover{outline:none;border:1px solid ", ";}img{width:15px;height:15px;vertical-align:middle;}"], _ref3 => {
|
|
34
38
|
let {
|
|
35
39
|
theme
|
|
36
|
-
} =
|
|
40
|
+
} = _ref3;
|
|
37
41
|
return theme.color('grey');
|
|
38
42
|
});
|
|
39
|
-
const PopUpComponent =
|
|
43
|
+
const PopUpComponent = _ref4 => {
|
|
40
44
|
let {
|
|
41
45
|
PopUpText,
|
|
42
46
|
setPopOpen
|
|
43
|
-
} =
|
|
47
|
+
} = _ref4;
|
|
44
48
|
const [isClosed, setIsClosed] = (0, _react.useState)(false);
|
|
45
49
|
|
|
46
50
|
// Only update centralised state - which renders
|
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.Wrapper = exports.Switch = exports.MoneyBox = exports.Label = void 0;
|
|
8
8
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
|
-
var _size = require("../../../../theme/shared/size");
|
|
10
9
|
var _spacing = _interopRequireDefault(require("../../../../theme/shared/spacing"));
|
|
11
10
|
var _zIndex = _interopRequireDefault(require("../../../../theme/shared/zIndex"));
|
|
12
11
|
var _hideVisually = _interopRequireDefault(require("../../../../theme/shared/hideVisually"));
|
|
@@ -26,44 +25,49 @@ const Wrapper = exports.Wrapper = _styledComponents.default.div.withConfig({
|
|
|
26
25
|
const MoneyBox = exports.MoneyBox = _styledComponents.default.div.withConfig({
|
|
27
26
|
displayName: "GivingSelectorstyle__MoneyBox",
|
|
28
27
|
componentId: "sc-5ktn9c-2"
|
|
29
|
-
})(["width:100%;padding:2px;position:relative;display:flex;flex-direction:row;margin:", " 0;border-radius:2rem;background:", "
|
|
28
|
+
})(["width:100%;padding:2px;position:relative;display:flex;flex-direction:row;margin:", " 0;border-radius:2rem;background:", ";@media ", "{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'), _ref2 => {
|
|
30
29
|
let {
|
|
31
30
|
theme
|
|
32
31
|
} = _ref2;
|
|
33
32
|
return theme.color('blue_light');
|
|
34
|
-
},
|
|
33
|
+
}, _ref3 => {
|
|
35
34
|
let {
|
|
36
35
|
theme
|
|
37
36
|
} = _ref3;
|
|
37
|
+
return theme.allBreakpoints('M');
|
|
38
|
+
}, Switch, _hideVisually.default, _ref4 => {
|
|
39
|
+
let {
|
|
40
|
+
theme
|
|
41
|
+
} = _ref4;
|
|
38
42
|
return theme.color('blue');
|
|
39
43
|
});
|
|
40
44
|
const Label = exports.Label = _styledComponents.default.label.withConfig({
|
|
41
45
|
displayName: "GivingSelectorstyle__Label",
|
|
42
46
|
componentId: "sc-5ktn9c-3"
|
|
43
|
-
})(["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:", ";border-radius:2rem;color:", ";&:active:focus{box-shadow:none;}&:focus{border:none;outline:none;box-shadow:inset 0 0 0 4px ", ";}"],
|
|
47
|
+
})(["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:", ";border-radius:2rem;color:", ";&:active:focus{box-shadow:none;}&:focus{border:none;outline:none;box-shadow:inset 0 0 0 4px ", ";}"], _ref5 => {
|
|
44
48
|
let {
|
|
45
49
|
theme
|
|
46
|
-
} =
|
|
50
|
+
} = _ref5;
|
|
47
51
|
return theme.fontSize('s');
|
|
48
|
-
},
|
|
52
|
+
}, _ref6 => {
|
|
49
53
|
let {
|
|
50
54
|
theme
|
|
51
|
-
} =
|
|
55
|
+
} = _ref6;
|
|
52
56
|
return theme.fontFamilies('Montserrat');
|
|
53
|
-
}, (0, _zIndex.default)('medium'),
|
|
57
|
+
}, (0, _zIndex.default)('medium'), _ref7 => {
|
|
54
58
|
let {
|
|
55
59
|
active
|
|
56
|
-
} =
|
|
60
|
+
} = _ref7;
|
|
57
61
|
return active === true ? 'default' : 'pointer';
|
|
58
|
-
},
|
|
62
|
+
}, _ref8 => {
|
|
59
63
|
let {
|
|
60
64
|
active,
|
|
61
65
|
theme
|
|
62
|
-
} =
|
|
66
|
+
} = _ref8;
|
|
63
67
|
return active === true ? theme.color('white') : theme.color('black');
|
|
64
|
-
},
|
|
68
|
+
}, _ref9 => {
|
|
65
69
|
let {
|
|
66
70
|
theme
|
|
67
|
-
} =
|
|
71
|
+
} = _ref9;
|
|
68
72
|
return theme.color('blue');
|
|
69
73
|
});
|
|
@@ -10,11 +10,10 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
10
10
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
11
11
|
var _Input = _interopRequireDefault(require("../../../Atoms/Input/Input"));
|
|
12
12
|
var _spacing = _interopRequireDefault(require("../../../../theme/shared/spacing"));
|
|
13
|
-
var _size = require("../../../../theme/shared/size");
|
|
14
13
|
const MoneyBuyButton = (0, _styledComponents.default)(_Input.default).withConfig({
|
|
15
14
|
displayName: "MoneyBuy__MoneyBuyButton",
|
|
16
15
|
componentId: "sc-38g5hn-0"
|
|
17
|
-
})(["display:block;input{border:none;background-color:", ";color:", ";font-size:", ";font-family:", ";font-weight:normal;border-radius:10px;padding:", ";box-shadow:0px 0px 16px rgba(0,0,0,0.15);height:auto
|
|
16
|
+
})(["display:block;input{border:none;background-color:", ";color:", ";font-size:", ";font-family:", ";font-weight:normal;border-radius:10px;padding:", ";box-shadow:0px 0px 16px rgba(0,0,0,0.15);height:auto;@media ", "{font-size:", ";padding:", ";}&:focus{border:none;outline:none;box-shadow:inset 0 0 0 4px ", ";}&:active:focus{box-shadow:0px 0px 16px rgba(0,0,0,0.3);}", "}"], _ref => {
|
|
18
17
|
let {
|
|
19
18
|
theme
|
|
20
19
|
} = _ref;
|
|
@@ -34,40 +33,45 @@ const MoneyBuyButton = (0, _styledComponents.default)(_Input.default).withConfig
|
|
|
34
33
|
theme
|
|
35
34
|
} = _ref4;
|
|
36
35
|
return theme.fontFamilies('Anton');
|
|
37
|
-
}, (0, _spacing.default)('s'),
|
|
36
|
+
}, (0, _spacing.default)('s'), _ref5 => {
|
|
38
37
|
let {
|
|
39
38
|
theme
|
|
40
39
|
} = _ref5;
|
|
41
|
-
return theme.
|
|
42
|
-
},
|
|
40
|
+
return theme.allBreakpoints('M');
|
|
41
|
+
}, _ref6 => {
|
|
43
42
|
let {
|
|
44
43
|
theme
|
|
45
44
|
} = _ref6;
|
|
45
|
+
return theme.fontSize('xl');
|
|
46
|
+
}, (0, _spacing.default)('m'), _ref7 => {
|
|
47
|
+
let {
|
|
48
|
+
theme
|
|
49
|
+
} = _ref7;
|
|
46
50
|
return theme.color('blue');
|
|
47
|
-
},
|
|
51
|
+
}, _ref8 => {
|
|
48
52
|
let {
|
|
49
53
|
isSelected
|
|
50
|
-
} =
|
|
51
|
-
return isSelected && (0, _styledComponents.css)(["background-color:", ";box-shadow:0px 0px 16px rgba(0,0,0,0.3);color:", ";&:focus{box-shadow:0px 0px 16px rgba(0,0,0,0.3);}"],
|
|
54
|
+
} = _ref8;
|
|
55
|
+
return isSelected && (0, _styledComponents.css)(["background-color:", ";box-shadow:0px 0px 16px rgba(0,0,0,0.3);color:", ";&:focus{box-shadow:0px 0px 16px rgba(0,0,0,0.3);}"], _ref9 => {
|
|
52
56
|
let {
|
|
53
57
|
theme
|
|
54
|
-
} =
|
|
58
|
+
} = _ref9;
|
|
55
59
|
return theme.color('blue');
|
|
56
|
-
},
|
|
60
|
+
}, _ref10 => {
|
|
57
61
|
let {
|
|
58
62
|
theme
|
|
59
|
-
} =
|
|
63
|
+
} = _ref10;
|
|
60
64
|
return theme.color('white');
|
|
61
65
|
});
|
|
62
66
|
});
|
|
63
|
-
const MoneyBuy =
|
|
67
|
+
const MoneyBuy = _ref11 => {
|
|
64
68
|
let {
|
|
65
69
|
setOtherAmount,
|
|
66
70
|
amount,
|
|
67
71
|
currency,
|
|
68
72
|
description,
|
|
69
73
|
...rest
|
|
70
|
-
} =
|
|
74
|
+
} = _ref11;
|
|
71
75
|
return /*#__PURE__*/_react.default.createElement(MoneyBuyButton, Object.assign({}, rest, {
|
|
72
76
|
"aria-label": description,
|
|
73
77
|
value: "".concat(currency, " ").concat(amount),
|
|
@@ -70,12 +70,6 @@ exports[`renders correctly 1`] = `
|
|
|
70
70
|
color: #FFFFFF;
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
-
.c15 (min-width:1024px) {
|
|
74
|
-
width: auto;
|
|
75
|
-
padding: 1rem 2rem;
|
|
76
|
-
margin: 0 auto 2rem;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
73
|
.c8 {
|
|
80
74
|
position: relative;
|
|
81
75
|
display: -webkit-box;
|
|
@@ -223,6 +217,14 @@ exports[`renders correctly 1`] = `
|
|
|
223
217
|
}
|
|
224
218
|
}
|
|
225
219
|
|
|
220
|
+
@media (min-width:1024px) {
|
|
221
|
+
.c15 {
|
|
222
|
+
width: auto;
|
|
223
|
+
padding: 1rem 2rem;
|
|
224
|
+
margin: 0 auto 2rem;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
|
|
226
228
|
@media (min-width:740px) {
|
|
227
229
|
.c13 {
|
|
228
230
|
max-width: 290px;
|
|
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.MetaIcons = exports.InnerWrapper = exports.HeaderWrapper = exports.Brand = void 0;
|
|
8
8
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
9
|
var _zIndex = _interopRequireDefault(require("../../../theme/shared/zIndex"));
|
|
10
|
-
var
|
|
10
|
+
var _allContainers = _interopRequireDefault(require("../../../theme/shared/allContainers"));
|
|
11
11
|
var _spacing = _interopRequireDefault(require("../../../theme/shared/spacing"));
|
|
12
12
|
const HeaderWrapper = exports.HeaderWrapper = _styledComponents.default.header.attrs(() => ({
|
|
13
13
|
role: 'banner'
|
|
@@ -28,7 +28,7 @@ const HeaderWrapper = exports.HeaderWrapper = _styledComponents.default.header.a
|
|
|
28
28
|
const InnerWrapper = exports.InnerWrapper = _styledComponents.default.div.withConfig({
|
|
29
29
|
displayName: "Headerstyle__InnerWrapper",
|
|
30
30
|
componentId: "sc-11ghppe-1"
|
|
31
|
-
})(["display:flex;align-items:center;height:100%;padding:0 12px;cursor:pointer;max-width:", ";@media ", "{margin:0 auto;}"],
|
|
31
|
+
})(["display:flex;align-items:center;height:100%;padding:0 12px;cursor:pointer;max-width:", ";@media ", "{margin:0 auto;}"], _allContainers.default.large, _ref3 => {
|
|
32
32
|
let {
|
|
33
33
|
theme
|
|
34
34
|
} = _ref3;
|
|
@@ -8,20 +8,24 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.TopCopyWrapper = exports.ShowHideInputWrapper = exports.OuterWrapper = exports.MPTextInput = exports.Head = exports.FormField = exports.ExtraInfo = exports.CheckLabel = exports.CheckInput = exports.CheckContainer = exports.BottomCopyWrapper = void 0;
|
|
9
9
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
10
10
|
var _spacing = _interopRequireDefault(require("../../../theme/shared/spacing"));
|
|
11
|
-
var _size = require("../../../theme/shared/size");
|
|
12
11
|
var _CR_Tick_black = _interopRequireDefault(require("./assets/CR_Tick_black.svg"));
|
|
13
12
|
var _TextInput = _interopRequireDefault(require("./_TextInput"));
|
|
14
13
|
const OuterWrapper = exports.OuterWrapper = _styledComponents.default.div.withConfig({
|
|
15
14
|
displayName: "MarketingPreferencesDSstyle__OuterWrapper",
|
|
16
15
|
componentId: "sc-68n85q-0"
|
|
17
|
-
})(["display:flex;flex-direction:column
|
|
16
|
+
})(["display:flex;flex-direction:column;@media ", "{flex-direction:row;flex-wrap:wrap;}"], _ref => {
|
|
17
|
+
let {
|
|
18
|
+
theme
|
|
19
|
+
} = _ref;
|
|
20
|
+
return theme.allBreakpoints('M');
|
|
21
|
+
});
|
|
18
22
|
const TopCopyWrapper = exports.TopCopyWrapper = _styledComponents.default.div.withConfig({
|
|
19
23
|
displayName: "MarketingPreferencesDSstyle__TopCopyWrapper",
|
|
20
24
|
componentId: "sc-68n85q-1"
|
|
21
|
-
})(["margin:", " 0;display:flex;width:100%;@media ", "{padding:10px;}"], (0, _spacing.default)('l'),
|
|
25
|
+
})(["margin:", " 0;display:flex;width:100%;@media ", "{padding:10px;}"], (0, _spacing.default)('l'), _ref2 => {
|
|
22
26
|
let {
|
|
23
27
|
theme
|
|
24
|
-
} =
|
|
28
|
+
} = _ref2;
|
|
25
29
|
return theme.allBreakpoints('M');
|
|
26
30
|
});
|
|
27
31
|
const BottomCopyWrapper = exports.BottomCopyWrapper = _styledComponents.default.div.withConfig({
|
|
@@ -35,71 +39,71 @@ const Head = exports.Head = _styledComponents.default.div.withConfig({
|
|
|
35
39
|
const FormField = exports.FormField = _styledComponents.default.div.withConfig({
|
|
36
40
|
displayName: "MarketingPreferencesDSstyle__FormField",
|
|
37
41
|
componentId: "sc-68n85q-4"
|
|
38
|
-
})(["", ""],
|
|
42
|
+
})(["", ""], _ref3 => {
|
|
39
43
|
let {
|
|
40
44
|
theme
|
|
41
|
-
} =
|
|
45
|
+
} = _ref3;
|
|
42
46
|
return (0, _styledComponents.css)(["position:relative;margin-bottom:", ";width:100%;display:flex;flex-direction:column;@media ", "{width:50%;padding:10px;}label{position:relative;margin-bottom:", ";width:100%;color:", ";}h3{position:relative;margin-bottom:", ";&:before{position:absolute;top:0;left:0;width:24px;height:24px;content:'';}}"], (0, _spacing.default)('md'), theme.allBreakpoints('M'), (0, _spacing.default)('md'), theme.color('grey_dark'), (0, _spacing.default)('md'));
|
|
43
47
|
});
|
|
44
48
|
const CheckContainer = exports.CheckContainer = _styledComponents.default.div.withConfig({
|
|
45
49
|
displayName: "MarketingPreferencesDSstyle__CheckContainer",
|
|
46
50
|
componentId: "sc-68n85q-5"
|
|
47
|
-
})(["", ""],
|
|
51
|
+
})(["", ""], _ref4 => {
|
|
48
52
|
let {
|
|
49
53
|
theme
|
|
50
|
-
} =
|
|
54
|
+
} = _ref4;
|
|
51
55
|
return (0, _styledComponents.css)(["width:100%;display:flex;justify-content:space-between;font-size:", ";font-family:", ";"], theme.fontSize('md'), theme.fontFamilies(theme.font.regular));
|
|
52
56
|
});
|
|
53
57
|
const CheckLabel = exports.CheckLabel = _styledComponents.default.label.withConfig({
|
|
54
58
|
displayName: "MarketingPreferencesDSstyle__CheckLabel",
|
|
55
59
|
componentId: "sc-68n85q-6"
|
|
56
|
-
})(["", ""],
|
|
60
|
+
})(["", ""], _ref5 => {
|
|
57
61
|
let {
|
|
58
62
|
theme
|
|
59
|
-
} =
|
|
63
|
+
} = _ref5;
|
|
60
64
|
return (0, _styledComponents.css)(["display:flex;align-items:center;font-size:", ";@media ", "{font-size:", ";}"], theme.fontSize('xs'), theme.allBreakpoints('M'), theme.fontSize('s'));
|
|
61
65
|
});
|
|
62
66
|
const CheckInput = exports.CheckInput = _styledComponents.default.input.withConfig({
|
|
63
67
|
displayName: "MarketingPreferencesDSstyle__CheckInput",
|
|
64
68
|
componentId: "sc-68n85q-7"
|
|
65
|
-
})(["font-size:", ";display:block;box-sizing:border-box;opacity:0;position:absolute;width:100%;height:100%;left:0;top:0;margin:0;border:1px solid ", ";+ span{margin-right:10px;width:30px;height:30px;background-color:", ";border:1px solid ", ";float:left;border-radius:8px;@media ", "{margin-right:15px;}}:checked + span{background:url(", ") no-repeat center;background-color:", ";background-size:contain;}"],
|
|
66
|
-
let {
|
|
67
|
-
theme
|
|
68
|
-
} = _ref5;
|
|
69
|
-
return theme.fontSize('sm');
|
|
70
|
-
}, _ref6 => {
|
|
69
|
+
})(["font-size:", ";display:block;box-sizing:border-box;opacity:0;position:absolute;width:100%;height:100%;left:0;top:0;margin:0;border:1px solid ", ";+ span{margin-right:10px;width:30px;height:30px;background-color:", ";border:1px solid ", ";float:left;border-radius:8px;@media ", "{margin-right:15px;}}:checked + span{background:url(", ") no-repeat center;background-color:", ";background-size:contain;}"], _ref6 => {
|
|
71
70
|
let {
|
|
72
71
|
theme
|
|
73
72
|
} = _ref6;
|
|
74
|
-
return theme.
|
|
73
|
+
return theme.fontSize('sm');
|
|
75
74
|
}, _ref7 => {
|
|
76
75
|
let {
|
|
77
76
|
theme
|
|
78
77
|
} = _ref7;
|
|
79
|
-
return theme.color('
|
|
78
|
+
return theme.color('grey_for_forms');
|
|
80
79
|
}, _ref8 => {
|
|
81
80
|
let {
|
|
82
81
|
theme
|
|
83
82
|
} = _ref8;
|
|
84
|
-
return theme.color('
|
|
83
|
+
return theme.color('grey_light');
|
|
85
84
|
}, _ref9 => {
|
|
86
85
|
let {
|
|
87
86
|
theme
|
|
88
87
|
} = _ref9;
|
|
89
|
-
return theme.
|
|
90
|
-
},
|
|
88
|
+
return theme.color('black');
|
|
89
|
+
}, _ref10 => {
|
|
91
90
|
let {
|
|
92
91
|
theme
|
|
93
92
|
} = _ref10;
|
|
93
|
+
return theme.allBreakpoints('M');
|
|
94
|
+
}, _CR_Tick_black.default, _ref11 => {
|
|
95
|
+
let {
|
|
96
|
+
theme
|
|
97
|
+
} = _ref11;
|
|
94
98
|
return theme.color('grey_light');
|
|
95
99
|
});
|
|
96
100
|
const ShowHideInputWrapper = exports.ShowHideInputWrapper = _styledComponents.default.div.withConfig({
|
|
97
101
|
displayName: "MarketingPreferencesDSstyle__ShowHideInputWrapper",
|
|
98
102
|
componentId: "sc-68n85q-8"
|
|
99
|
-
})(["display:", ";width:100%;label{width:100%;border:none;padding:0;}"],
|
|
103
|
+
})(["display:", ";width:100%;label{width:100%;border:none;padding:0;}"], _ref12 => {
|
|
100
104
|
let {
|
|
101
105
|
show
|
|
102
|
-
} =
|
|
106
|
+
} = _ref12;
|
|
103
107
|
return show ? 'block' : 'none';
|
|
104
108
|
});
|
|
105
109
|
const ExtraInfo = exports.ExtraInfo = _styledComponents.default.span.withConfig({
|
|
@@ -109,9 +113,14 @@ const ExtraInfo = exports.ExtraInfo = _styledComponents.default.span.withConfig(
|
|
|
109
113
|
const MPTextInput = exports.MPTextInput = (0, _styledComponents.default)(_TextInput.default).withConfig({
|
|
110
114
|
displayName: "MarketingPreferencesDSstyle__MPTextInput",
|
|
111
115
|
componentId: "sc-68n85q-10"
|
|
112
|
-
})(["input{border:1px solid ", "
|
|
116
|
+
})(["input{border:1px solid ", ";;@media ", "{max-width:none;}}"], _ref13 => {
|
|
113
117
|
let {
|
|
114
118
|
theme
|
|
115
|
-
} =
|
|
119
|
+
} = _ref13;
|
|
116
120
|
return theme.color('black');
|
|
117
|
-
},
|
|
121
|
+
}, _ref14 => {
|
|
122
|
+
let {
|
|
123
|
+
theme
|
|
124
|
+
} = _ref14;
|
|
125
|
+
return theme.allBreakpoints('M');
|
|
126
|
+
});
|