@comicrelief/component-library 8.90.0 → 8.91.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/index.cjs.js +681 -627
- package/dist/index.es.js +5103 -4981
- package/package.json +1 -1
- package/src/components/Molecules/PopUp/Icons/CrossRoundedCorners.jsx +43 -0
- package/src/components/Molecules/PopUp/Icons/GiftAidLogo.jsx +43 -0
- package/src/components/Molecules/PopUp/Icons/Padlock.jsx +42 -0
- package/src/components/Molecules/PopUp/PopUpGiftAid/{PopUpGiftAid.js → PopUpGiftAid.jsx} +33 -11
- package/src/components/Molecules/PopUp/PopUpGiftAid/__snapshots__/PopUpGiftAid.test.js.snap +28 -30
- package/src/components/Molecules/PopUp/PopUpSecurePayment/{PopUpSecurePayment.js → PopUpSecurePayment.jsx} +60 -16
- package/src/components/Molecules/PopUp/PopUpSecurePayment/__snapshots__/PopUpSecurePayment.test.js.snap +40 -76
- package/src/components/Molecules/PopUp/PopUpShared.style.js +2 -12
- package/src/components/Organisms/MarketingPreferencesDS/MarketingPreferencesDS.style.js +20 -22
- package/src/theme/crTheme/colors.js +1 -0
|
@@ -2,20 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
exports[`renders coral_light variant 1`] = `
|
|
4
4
|
.c4 {
|
|
5
|
-
font-family: 'Montserrat',Helvetica,Arial,sans-serif;
|
|
6
|
-
font-weight: 400;
|
|
7
|
-
text-transform: inherit;
|
|
8
|
-
letter-spacing: 0;
|
|
9
|
-
font-size: 1rem;
|
|
10
|
-
line-height: 1.25rem;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.c4 span {
|
|
14
|
-
font-size: inherit;
|
|
15
|
-
line-height: inherit;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.c3 {
|
|
19
5
|
fill: #000000;
|
|
20
6
|
}
|
|
21
7
|
|
|
@@ -24,68 +10,64 @@ exports[`renders coral_light variant 1`] = `
|
|
|
24
10
|
width: 100%;
|
|
25
11
|
}
|
|
26
12
|
|
|
27
|
-
.c1 {
|
|
13
|
+
.c1>div {
|
|
28
14
|
visibility: visible;
|
|
29
15
|
}
|
|
30
16
|
|
|
31
17
|
.c2 {
|
|
18
|
+
display: flex;
|
|
19
|
+
justify-content: center;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.c3 {
|
|
32
23
|
display: flex;
|
|
33
24
|
flex-direction: row;
|
|
34
25
|
align-items: center;
|
|
35
26
|
gap: 0.5rem;
|
|
36
|
-
margin: 0 auto;
|
|
37
27
|
padding: 1rem;
|
|
38
28
|
border: none;
|
|
39
29
|
background: none;
|
|
40
30
|
cursor: pointer;
|
|
41
31
|
color: #000000;
|
|
32
|
+
margin: 0;
|
|
42
33
|
}
|
|
43
34
|
|
|
44
|
-
.
|
|
45
|
-
.
|
|
35
|
+
.c3:hover span,
|
|
36
|
+
.c3:focus span {
|
|
46
37
|
text-decoration: underline;
|
|
47
38
|
}
|
|
48
39
|
|
|
49
|
-
|
|
50
|
-
.
|
|
51
|
-
font-size: 1rem;
|
|
52
|
-
line-height: 1.25rem;
|
|
53
|
-
}
|
|
40
|
+
.c5 {
|
|
41
|
+
font-size: 0.75rem;
|
|
54
42
|
}
|
|
55
43
|
|
|
56
44
|
@media (min-width: 1024px) {
|
|
57
45
|
.c4 {
|
|
58
|
-
font-size: 1.125rem;
|
|
59
|
-
line-height: 1.375rem;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
@media (min-width: 1024px) {
|
|
64
|
-
.c3 {
|
|
65
46
|
fill: #000000;
|
|
66
47
|
}
|
|
67
48
|
}
|
|
68
49
|
|
|
69
50
|
<div
|
|
70
51
|
backgroundColor="coral_light"
|
|
71
|
-
className="c0"
|
|
52
|
+
className="c0 c1"
|
|
72
53
|
data-open="false"
|
|
73
|
-
data-testid="
|
|
54
|
+
data-testid="secure-text-popup"
|
|
74
55
|
>
|
|
75
56
|
<div
|
|
76
|
-
className="
|
|
57
|
+
className="c2"
|
|
58
|
+
data-testid="secure-text-trigger-button-wrapper"
|
|
77
59
|
>
|
|
78
60
|
<button
|
|
79
61
|
aria-expanded="false"
|
|
80
|
-
className="
|
|
62
|
+
className="c3"
|
|
81
63
|
onClick={[Function]}
|
|
82
64
|
type="button"
|
|
83
65
|
>
|
|
84
66
|
<svg
|
|
85
|
-
className="
|
|
86
|
-
height={
|
|
67
|
+
className="c4"
|
|
68
|
+
height={13.2}
|
|
87
69
|
viewBox="0 0 10 11"
|
|
88
|
-
width={
|
|
70
|
+
width={12}
|
|
89
71
|
xmlns="http://www.w3.org/2000/svg"
|
|
90
72
|
>
|
|
91
73
|
<path
|
|
@@ -93,7 +75,7 @@ exports[`renders coral_light variant 1`] = `
|
|
|
93
75
|
/>
|
|
94
76
|
</svg>
|
|
95
77
|
<span
|
|
96
|
-
className="
|
|
78
|
+
className="c5"
|
|
97
79
|
>
|
|
98
80
|
Your donation is secure and encrypted
|
|
99
81
|
</span>
|
|
@@ -104,20 +86,6 @@ exports[`renders coral_light variant 1`] = `
|
|
|
104
86
|
|
|
105
87
|
exports[`renders default blue_light variant 1`] = `
|
|
106
88
|
.c4 {
|
|
107
|
-
font-family: 'Montserrat',Helvetica,Arial,sans-serif;
|
|
108
|
-
font-weight: 400;
|
|
109
|
-
text-transform: inherit;
|
|
110
|
-
letter-spacing: 0;
|
|
111
|
-
font-size: 1rem;
|
|
112
|
-
line-height: 1.25rem;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
.c4 span {
|
|
116
|
-
font-size: inherit;
|
|
117
|
-
line-height: inherit;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
.c3 {
|
|
121
89
|
fill: #000000;
|
|
122
90
|
}
|
|
123
91
|
|
|
@@ -126,67 +94,63 @@ exports[`renders default blue_light variant 1`] = `
|
|
|
126
94
|
width: 100%;
|
|
127
95
|
}
|
|
128
96
|
|
|
129
|
-
.c1 {
|
|
97
|
+
.c1>div {
|
|
130
98
|
visibility: visible;
|
|
131
99
|
}
|
|
132
100
|
|
|
133
101
|
.c2 {
|
|
102
|
+
display: flex;
|
|
103
|
+
justify-content: center;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.c3 {
|
|
134
107
|
display: flex;
|
|
135
108
|
flex-direction: row;
|
|
136
109
|
align-items: center;
|
|
137
110
|
gap: 0.5rem;
|
|
138
|
-
margin: 0 auto;
|
|
139
111
|
padding: 1rem;
|
|
140
112
|
border: none;
|
|
141
113
|
background: none;
|
|
142
114
|
cursor: pointer;
|
|
143
115
|
color: #000000;
|
|
116
|
+
margin: 0;
|
|
144
117
|
}
|
|
145
118
|
|
|
146
|
-
.
|
|
147
|
-
.
|
|
119
|
+
.c3:hover span,
|
|
120
|
+
.c3:focus span {
|
|
148
121
|
text-decoration: underline;
|
|
149
122
|
}
|
|
150
123
|
|
|
151
|
-
|
|
152
|
-
.
|
|
153
|
-
font-size: 1rem;
|
|
154
|
-
line-height: 1.25rem;
|
|
155
|
-
}
|
|
124
|
+
.c5 {
|
|
125
|
+
font-size: 0.75rem;
|
|
156
126
|
}
|
|
157
127
|
|
|
158
128
|
@media (min-width: 1024px) {
|
|
159
129
|
.c4 {
|
|
160
|
-
font-size: 1.125rem;
|
|
161
|
-
line-height: 1.375rem;
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
@media (min-width: 1024px) {
|
|
166
|
-
.c3 {
|
|
167
130
|
fill: #000000;
|
|
168
131
|
}
|
|
169
132
|
}
|
|
170
133
|
|
|
171
134
|
<div
|
|
172
|
-
className="c0"
|
|
135
|
+
className="c0 c1"
|
|
173
136
|
data-open="false"
|
|
174
|
-
data-testid="
|
|
137
|
+
data-testid="secure-text-popup"
|
|
175
138
|
>
|
|
176
139
|
<div
|
|
177
|
-
className="
|
|
140
|
+
className="c2"
|
|
141
|
+
data-testid="secure-text-trigger-button-wrapper"
|
|
178
142
|
>
|
|
179
143
|
<button
|
|
180
144
|
aria-expanded="false"
|
|
181
|
-
className="
|
|
145
|
+
className="c3"
|
|
182
146
|
onClick={[Function]}
|
|
183
147
|
type="button"
|
|
184
148
|
>
|
|
185
149
|
<svg
|
|
186
|
-
className="
|
|
187
|
-
height={
|
|
150
|
+
className="c4"
|
|
151
|
+
height={13.2}
|
|
188
152
|
viewBox="0 0 10 11"
|
|
189
|
-
width={
|
|
153
|
+
width={12}
|
|
190
154
|
xmlns="http://www.w3.org/2000/svg"
|
|
191
155
|
>
|
|
192
156
|
<path
|
|
@@ -194,7 +158,7 @@ exports[`renders default blue_light variant 1`] = `
|
|
|
194
158
|
/>
|
|
195
159
|
</svg>
|
|
196
160
|
<span
|
|
197
|
-
className="
|
|
161
|
+
className="c5"
|
|
198
162
|
>
|
|
199
163
|
Your donation is secure and encrypted
|
|
200
164
|
</span>
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import styled, { css, keyframes } from 'styled-components';
|
|
2
|
-
import zIndex from '../../../theme/shared/zIndex';
|
|
3
2
|
import { CLOSE_DURATION } from './PopUpShared.utils';
|
|
4
3
|
|
|
5
4
|
/**
|
|
@@ -83,7 +82,7 @@ const PopUpWindow = styled.div`
|
|
|
83
82
|
position: absolute;
|
|
84
83
|
top: 0;
|
|
85
84
|
left: 0;
|
|
86
|
-
|
|
85
|
+
z-index: 5;
|
|
87
86
|
box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.2);
|
|
88
87
|
animation: ${openOverlay} 250ms ease-out;
|
|
89
88
|
|
|
@@ -115,7 +114,7 @@ const PageOverlay = styled.div`
|
|
|
115
114
|
left: 0;
|
|
116
115
|
background-color: rgba(0, 0, 0, 0.4);
|
|
117
116
|
pointer-events: none;
|
|
118
|
-
|
|
117
|
+
z-index: 4;
|
|
119
118
|
`;
|
|
120
119
|
|
|
121
120
|
const Container = styled.div`
|
|
@@ -123,14 +122,6 @@ const Container = styled.div`
|
|
|
123
122
|
width: 100%;
|
|
124
123
|
`;
|
|
125
124
|
|
|
126
|
-
/**
|
|
127
|
-
* Hidden rather than unmounted when open, so the closed trigger keeps its
|
|
128
|
-
* space and content below the popup doesn't do the janky move around when it overlays/opens
|
|
129
|
-
*/
|
|
130
|
-
const Trigger = styled.div`
|
|
131
|
-
visibility: ${({ $hidden }) => ($hidden ? 'hidden' : 'visible')};
|
|
132
|
-
`;
|
|
133
|
-
|
|
134
125
|
const CloseButton = styled.button`
|
|
135
126
|
align-self: flex-end;
|
|
136
127
|
display: flex;
|
|
@@ -180,7 +171,6 @@ const PopUpBodyText = styled.p`
|
|
|
180
171
|
|
|
181
172
|
export {
|
|
182
173
|
Container,
|
|
183
|
-
Trigger,
|
|
184
174
|
CloseButton,
|
|
185
175
|
PopUpWindow,
|
|
186
176
|
PopUpHeading,
|
|
@@ -18,7 +18,7 @@ const OuterWrapper = styled.div`
|
|
|
18
18
|
`;
|
|
19
19
|
|
|
20
20
|
const TopCopyWrapper = styled.div`
|
|
21
|
-
margin:
|
|
21
|
+
margin: 2rem 0 1.5rem;
|
|
22
22
|
display: flex;
|
|
23
23
|
width: 100%;
|
|
24
24
|
`;
|
|
@@ -63,7 +63,7 @@ const FormField = styled.div`${({ theme, $isErroring }) => css`
|
|
|
63
63
|
width: 100%;
|
|
64
64
|
display: flex;
|
|
65
65
|
flex-direction: column;
|
|
66
|
-
padding: ${spacing('m')};
|
|
66
|
+
padding: ${spacing('md')} ${spacing('m')};
|
|
67
67
|
background-color: ${theme.color('white')};
|
|
68
68
|
border-radius: 0.5rem;
|
|
69
69
|
border: 1px solid ${$isErroring ? theme.color('red') : theme.color('grey')};
|
|
@@ -92,17 +92,6 @@ const FormField = styled.div`${({ theme, $isErroring }) => css`
|
|
|
92
92
|
}
|
|
93
93
|
`}
|
|
94
94
|
|
|
95
|
-
/* All labels; input AND checkbox */
|
|
96
|
-
label {
|
|
97
|
-
position: relative;
|
|
98
|
-
margin-bottom: 0;
|
|
99
|
-
width: 100%;
|
|
100
|
-
color: inherit;
|
|
101
|
-
font-weight: 600;
|
|
102
|
-
display: flex;
|
|
103
|
-
justify-content: space-between;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
95
|
h3 {
|
|
107
96
|
position: relative;
|
|
108
97
|
margin-bottom: ${spacing('md')};
|
|
@@ -128,13 +117,18 @@ const CheckContainer = styled.div`${({ theme }) => css`
|
|
|
128
117
|
|
|
129
118
|
const CheckLabel = styled.label`${({ theme }) => css`
|
|
130
119
|
position: relative;
|
|
120
|
+
height: 32px;
|
|
121
|
+
margin-bottom: 0;
|
|
122
|
+
width: 100%;
|
|
123
|
+
color: inherit;
|
|
124
|
+
font-weight: 700;
|
|
131
125
|
display: flex;
|
|
132
126
|
align-items: center;
|
|
133
|
-
|
|
127
|
+
justify-content: space-between;
|
|
134
128
|
cursor: pointer;
|
|
135
|
-
|
|
129
|
+
font-size: 0.875rem;
|
|
136
130
|
@media ${theme.allBreakpoints('M')} {
|
|
137
|
-
font-size:
|
|
131
|
+
font-size: 1rem;
|
|
138
132
|
}
|
|
139
133
|
`}`;
|
|
140
134
|
|
|
@@ -147,12 +141,12 @@ const CheckInput = styled.input`${({ theme }) => css`
|
|
|
147
141
|
margin: 0;
|
|
148
142
|
|
|
149
143
|
+ span {
|
|
150
|
-
width:
|
|
151
|
-
height:
|
|
144
|
+
width: 24px;
|
|
145
|
+
height: 24px;
|
|
152
146
|
flex-shrink: 0;
|
|
153
147
|
background-color: ${theme.color('white')};
|
|
154
148
|
border: 1px solid ${theme.color('grey')};
|
|
155
|
-
border-radius: 0.
|
|
149
|
+
border-radius: 0.25rem;
|
|
156
150
|
pointer-events: none;
|
|
157
151
|
}
|
|
158
152
|
|
|
@@ -185,7 +179,7 @@ const ShowHideInputWrapper = styled.div`
|
|
|
185
179
|
}
|
|
186
180
|
`;
|
|
187
181
|
|
|
188
|
-
const ExtraInfo = styled.span`
|
|
182
|
+
const ExtraInfo = styled.span`${({ theme }) => css`
|
|
189
183
|
display: block;
|
|
190
184
|
width: 100%;
|
|
191
185
|
font-size: 1rem;
|
|
@@ -196,7 +190,11 @@ const ExtraInfo = styled.span`
|
|
|
196
190
|
margin-bottom: 0rem;
|
|
197
191
|
margin-top: 1rem;
|
|
198
192
|
color: inherit;
|
|
199
|
-
|
|
193
|
+
font-size: 0.875rem;
|
|
194
|
+
@media ${theme.allBreakpoints('M')} {
|
|
195
|
+
font-size: 1rem;
|
|
196
|
+
}
|
|
197
|
+
|
|
200
198
|
+ label {
|
|
201
199
|
margin-top: ${spacing('md')};
|
|
202
200
|
margin-bottom: 0;
|
|
@@ -220,7 +218,7 @@ const ExtraInfo = styled.span`
|
|
|
220
218
|
}
|
|
221
219
|
}
|
|
222
220
|
}
|
|
223
|
-
`;
|
|
221
|
+
`}`;
|
|
224
222
|
|
|
225
223
|
const MPTextInput = styled(TextInput)`${({ theme, $isErroring }) => css`
|
|
226
224
|
color: ${$isErroring ? theme.color('red') : theme.color('black')};
|