@comicrelief/component-library 8.90.1 → 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.
@@ -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
- .c2:hover span,
45
- .c2:focus span {
35
+ .c3:hover span,
36
+ .c3:focus span {
46
37
  text-decoration: underline;
47
38
  }
48
39
 
49
- @media (min-width: 740px) {
50
- .c4 {
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="pop-up-secure-payment"
54
+ data-testid="secure-text-popup"
74
55
  >
75
56
  <div
76
- className="c1"
57
+ className="c2"
58
+ data-testid="secure-text-trigger-button-wrapper"
77
59
  >
78
60
  <button
79
61
  aria-expanded="false"
80
- className="c2"
62
+ className="c3"
81
63
  onClick={[Function]}
82
64
  type="button"
83
65
  >
84
66
  <svg
85
- className="c3"
86
- height={17.6}
67
+ className="c4"
68
+ height={13.2}
87
69
  viewBox="0 0 10 11"
88
- width={16}
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="c4"
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
- .c2:hover span,
147
- .c2:focus span {
119
+ .c3:hover span,
120
+ .c3:focus span {
148
121
  text-decoration: underline;
149
122
  }
150
123
 
151
- @media (min-width: 740px) {
152
- .c4 {
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="pop-up-secure-payment"
137
+ data-testid="secure-text-popup"
175
138
  >
176
139
  <div
177
- className="c1"
140
+ className="c2"
141
+ data-testid="secure-text-trigger-button-wrapper"
178
142
  >
179
143
  <button
180
144
  aria-expanded="false"
181
- className="c2"
145
+ className="c3"
182
146
  onClick={[Function]}
183
147
  type="button"
184
148
  >
185
149
  <svg
186
- className="c3"
187
- height={17.6}
150
+ className="c4"
151
+ height={13.2}
188
152
  viewBox="0 0 10 11"
189
- width={16}
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="c4"
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
- ${zIndex('high')}
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
- ${zIndex('medium')}
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,