@comicrelief/component-library 6.10.0 → 7.0.1

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.
Files changed (56) hide show
  1. package/cypress/integration/components/Organisms/Donate.spec.js +13 -13
  2. package/cypress/integration/components/Organisms/EmailSignUp.spec.js +47 -132
  3. package/dist/components/Organisms/Donate/Donate.md +9 -9
  4. package/dist/components/Organisms/Donate/Form/Form.js +2 -1
  5. package/dist/components/Organisms/Donate/GivingSelector/GivingSelector.js +17 -71
  6. package/dist/components/Organisms/Donate/GivingSelector/GivingSelector.style.js +71 -0
  7. package/dist/components/Organisms/Donate/__snapshots__/Donate.test.js.snap +11 -25
  8. package/dist/components/Organisms/EmailSignUp/EmailSignUp.md +8 -123
  9. package/dist/components/Organisms/EmailSignUp/EmailSignUp.style.js +46 -29
  10. package/dist/components/Organisms/EmailSignUp/EmailSignUp.test.js +24 -69
  11. package/dist/components/Organisms/EmailSignUp/EmailSignUpForm.js +92 -0
  12. package/dist/components/Organisms/EmailSignUp/_Confetti.js +116 -0
  13. package/dist/components/Organisms/EmailSignUp/_EmailSignUp.js +107 -0
  14. package/dist/components/Organisms/EmailSignUp/_EmailSignUpConfig.js +51 -0
  15. package/dist/components/Organisms/EmailSignUp/_TextInput.js +51 -0
  16. package/dist/components/Organisms/EmailSignUp/__snapshots__/EmailSignUp.test.js.snap +249 -406
  17. package/dist/components/Organisms/Header/Header.md +1 -13
  18. package/dist/components/Organisms/Membership/Membership.test.js +1 -1
  19. package/dist/index.js +14 -10
  20. package/package.json +2 -1
  21. package/src/components/Organisms/Donate/Donate.md +9 -9
  22. package/src/components/Organisms/Donate/Form/Form.js +1 -0
  23. package/src/components/Organisms/Donate/GivingSelector/GivingSelector.js +15 -85
  24. package/src/components/Organisms/Donate/GivingSelector/GivingSelector.style.js +78 -0
  25. package/src/components/Organisms/Donate/__snapshots__/Donate.test.js.snap +11 -25
  26. package/src/components/Organisms/EmailSignUp/EmailSignUp.md +8 -123
  27. package/src/components/Organisms/EmailSignUp/EmailSignUp.style.js +33 -13
  28. package/src/components/Organisms/EmailSignUp/EmailSignUp.test.js +35 -69
  29. package/src/components/Organisms/EmailSignUp/EmailSignUpForm.js +60 -0
  30. package/src/components/Organisms/EmailSignUp/_Confetti.js +106 -0
  31. package/src/components/Organisms/EmailSignUp/_EmailSignUp.js +138 -0
  32. package/src/components/Organisms/EmailSignUp/_EmailSignUpConfig.js +54 -0
  33. package/src/components/Organisms/EmailSignUp/_TextInput.js +45 -0
  34. package/src/components/Organisms/EmailSignUp/__snapshots__/EmailSignUp.test.js.snap +249 -406
  35. package/src/components/Organisms/Header/Header.md +1 -13
  36. package/src/components/Organisms/Membership/Membership.test.js +33 -33
  37. package/src/index.js +10 -4
  38. package/cypress/integration/components/Molecules/HeaderEsuWithIcon.spec.js +0 -69
  39. package/dist/components/Molecules/HeaderEsuWithIcon/HeaderEsuWithIcon.js +0 -136
  40. package/dist/components/Molecules/HeaderEsuWithIcon/HeaderEsuWithIcon.md +0 -47
  41. package/dist/components/Molecules/HeaderEsuWithIcon/HeaderEsuWithIcon.style.js +0 -52
  42. package/dist/components/Molecules/HeaderEsuWithIcon/HeaderEsuWithIcon.test.js +0 -99
  43. package/dist/components/Molecules/HeaderEsuWithIcon/__snapshots__/HeaderEsuWithIcon.test.js.snap +0 -1211
  44. package/dist/components/Molecules/HeaderEsuWithIcon/assets/HeaderIcons.js +0 -25
  45. package/dist/components/Molecules/HeaderEsuWithIcon/assets/icon--close.svg +0 -5
  46. package/dist/components/Molecules/HeaderEsuWithIcon/assets/icon--email.svg +0 -5
  47. package/dist/components/Organisms/EmailSignUp/EmailSignUp.js +0 -182
  48. package/src/components/Molecules/HeaderEsuWithIcon/HeaderEsuWithIcon.js +0 -135
  49. package/src/components/Molecules/HeaderEsuWithIcon/HeaderEsuWithIcon.md +0 -47
  50. package/src/components/Molecules/HeaderEsuWithIcon/HeaderEsuWithIcon.style.js +0 -60
  51. package/src/components/Molecules/HeaderEsuWithIcon/HeaderEsuWithIcon.test.js +0 -103
  52. package/src/components/Molecules/HeaderEsuWithIcon/__snapshots__/HeaderEsuWithIcon.test.js.snap +0 -1211
  53. package/src/components/Molecules/HeaderEsuWithIcon/assets/HeaderIcons.js +0 -15
  54. package/src/components/Molecules/HeaderEsuWithIcon/assets/icon--close.svg +0 -5
  55. package/src/components/Molecules/HeaderEsuWithIcon/assets/icon--email.svg +0 -5
  56. package/src/components/Organisms/EmailSignUp/EmailSignUp.js +0 -197
@@ -1,1211 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`renders correctly with error message 1`] = `
4
- .c6 {
5
- font-size: 3rem;
6
- line-height: 3rem;
7
- text-transform: uppercase;
8
- font-weight: 400;
9
- font-family: 'Anton',Impact,sans-serif;
10
- -webkit-letter-spacing: 0.03rem;
11
- -moz-letter-spacing: 0.03rem;
12
- -ms-letter-spacing: 0.03rem;
13
- letter-spacing: 0.03rem;
14
- }
15
-
16
- .c13 {
17
- font-size: 1rem;
18
- line-height: 1rem;
19
- text-transform: inherit;
20
- line-height: normal;
21
- font-family: 'Montserrat',Helvetica,Arial,sans-serif;
22
- }
23
-
24
- .c17 {
25
- color: #E52630;
26
- text-transform: inherit;
27
- font-weight: bold;
28
- line-height: normal;
29
- font-family: 'Montserrat',Helvetica,Arial,sans-serif;
30
- }
31
-
32
- .c11 {
33
- position: relative;
34
- display: -webkit-box;
35
- display: -webkit-flex;
36
- display: -ms-flexbox;
37
- display: flex;
38
- -webkit-flex-direction: column;
39
- -ms-flex-direction: column;
40
- flex-direction: column;
41
- color: #5C5C5E;
42
- width: 100%;
43
- }
44
-
45
- .c14 {
46
- border: 0;
47
- -webkit-clip: rect(0 0 0 0);
48
- clip: rect(0 0 0 0);
49
- -webkit-clip-path: inset(50%);
50
- clip-path: inset(50%);
51
- height: 1px;
52
- margin: -1px;
53
- overflow: hidden;
54
- padding: 0;
55
- position: absolute;
56
- white-space: nowrap;
57
- width: 1px;
58
- }
59
-
60
- .c18 {
61
- display: inline-block;
62
- padding: 1.5rem 1rem 1rem;
63
- width: 100%;
64
- z-index: 1;
65
- margin-top: -10px;
66
- background-color: #FAE1E2;
67
- border-radius: 0.5rem;
68
- font-weight: bold;
69
- }
70
-
71
- .c18:before {
72
- position: relative;
73
- content: '';
74
- top: 1px;
75
- margin-right: 3px;
76
- background: url(mock.asset) left 0/100% no-repeat;
77
- width: 18px;
78
- height: 19px;
79
- display: inline-block;
80
- vertical-align: top;
81
- color: #E52630;
82
- }
83
-
84
- .c16 {
85
- position: relative;
86
- box-sizing: border-box;
87
- width: 100%;
88
- height: 48px;
89
- padding: 1rem 1.5rem;
90
- background-color: #F4F3F5;
91
- border: 1px solid;
92
- border-color: #E52630;
93
- box-shadow: none;
94
- -webkit-appearance: none;
95
- -moz-appearance: none;
96
- appearance: none;
97
- color: #000000;
98
- border-radius: 0.5rem;
99
- font-size: inherit;
100
- z-index: 2;
101
- font-family: 'Montserrat',Helvetica,Arial,sans-serif;
102
- }
103
-
104
- .c16:focus {
105
- border: 1px solid #666;
106
- }
107
-
108
- .c15 {
109
- position: relative;
110
- font-size: 1.25rem;
111
- }
112
-
113
- .c9 {
114
- text-align: left;
115
- }
116
-
117
- .c1 {
118
- -webkit-text-decoration: none;
119
- text-decoration: none;
120
- cursor: pointer;
121
- display: block;
122
- -webkit-transition: opacity 0.2s;
123
- transition: opacity 0.2s;
124
- }
125
-
126
- .c1:hover,
127
- .c1:focus {
128
- opacity: 0.6;
129
- }
130
-
131
- .c2 {
132
- width: 100%;
133
- }
134
-
135
- .c23 {
136
- border: 0;
137
- -webkit-clip: rect(0 0 0 0);
138
- clip: rect(0 0 0 0);
139
- -webkit-clip-path: inset(50%);
140
- clip-path: inset(50%);
141
- height: 1px;
142
- margin: -1px;
143
- overflow: hidden;
144
- padding: 0;
145
- position: absolute;
146
- white-space: nowrap;
147
- width: 1px;
148
- }
149
-
150
- .c4 {
151
- display: -webkit-box;
152
- display: -webkit-flex;
153
- display: -ms-flexbox;
154
- display: flex;
155
- -webkit-flex-direction: column;
156
- -ms-flex-direction: column;
157
- flex-direction: column;
158
- font-size: 1rem;
159
- color: #FFFFFF;
160
- background-color: #2C0230;
161
- }
162
-
163
- .c8 {
164
- display: -webkit-box;
165
- display: -webkit-flex;
166
- display: -ms-flexbox;
167
- display: flex;
168
- margin-bottom: 1rem;
169
- }
170
-
171
- .c19 {
172
- margin-top: 1rem;
173
- }
174
-
175
- .c19 input {
176
- text-align: center;
177
- width: 100%;
178
- font-size: 1rem;
179
- }
180
-
181
- .c21 {
182
- display: -webkit-box;
183
- display: -webkit-flex;
184
- display: -ms-flexbox;
185
- display: flex;
186
- -webkit-flex-direction: column;
187
- -ms-flex-direction: column;
188
- flex-direction: column;
189
- margin-top: 1rem;
190
- }
191
-
192
- .c21 p {
193
- font-size: 1rem;
194
- line-height: 2rem;
195
- }
196
-
197
- .c21 p a {
198
- font-size: 1rem;
199
- color: #FFFFFF;
200
- }
201
-
202
- .c10 {
203
- display: -webkit-box;
204
- display: -webkit-flex;
205
- display: -ms-flexbox;
206
- display: flex;
207
- -webkit-flex-direction: column;
208
- -ms-flex-direction: column;
209
- flex-direction: column;
210
- margin: 1rem 0;
211
- }
212
-
213
- .c12 {
214
- width: 100%;
215
- }
216
-
217
- .c7 {
218
- margin-bottom: 1.5rem;
219
- }
220
-
221
- .c20 {
222
- width: 100%;
223
- color: #FFFFFF;
224
- font-size: 1rem;
225
- font-weight: bold;
226
- cursor: pointer;
227
- padding: 1rem 0.5rem;
228
- background: #E52630;
229
- border: none;
230
- border-radius: 100px;
231
- }
232
-
233
- .c20:active,
234
- .c20:focus,
235
- .c20:hover {
236
- background-color: #961D35;
237
- }
238
-
239
- .c0 {
240
- width: 35px;
241
- height: 35px;
242
- display: inline-block;
243
- }
244
-
245
- .c3 {
246
- position: fixed;
247
- width: 100%;
248
- height: 100%;
249
- background-color: rgba(255,255,255,0.5);
250
- z-index: 100;
251
- top: 0;
252
- left: 0;
253
- overflow-y: auto;
254
- display: -webkit-box;
255
- display: -webkit-flex;
256
- display: -ms-flexbox;
257
- display: flex;
258
- -webkit-box-pack: center;
259
- -webkit-justify-content: center;
260
- -ms-flex-pack: center;
261
- justify-content: center;
262
- -webkit-align-items: flex-start;
263
- -webkit-box-align: flex-start;
264
- -ms-flex-align: flex-start;
265
- align-items: flex-start;
266
- }
267
-
268
- .c3 div[aria-modal='true'] {
269
- padding: 2rem;
270
- }
271
-
272
- .c22 {
273
- position: absolute;
274
- top: 0;
275
- right: 0;
276
- width: 40px;
277
- height: 40px;
278
- margin-left: 0;
279
- }
280
-
281
- .c5 {
282
- width: 100%;
283
- }
284
-
285
- .c5 input {
286
- font-size: 1rem;
287
- }
288
-
289
- @media (min-width:740px) {
290
- .c16 {
291
- max-width: 290px;
292
- }
293
- }
294
-
295
- @media (min-width:740px) {
296
- .c19 input {
297
- font-size: 1.25rem;
298
- max-width: 180px;
299
- }
300
- }
301
-
302
- @media (min-width:1024px) {
303
- .c20 {
304
- width: auto;
305
- padding: 1rem 2rem;
306
- margin: 0 auto 2rem;
307
- }
308
- }
309
-
310
- @media (min-width:740px) {
311
- .c22 {
312
- margin: 4rem 0 0;
313
- right: 25%;
314
- }
315
- }
316
-
317
- @media (min-width:740px) {
318
- .c5 {
319
- margin-top: 4rem;
320
- width: 50%;
321
- }
322
-
323
- .c5 input {
324
- font-size: 1.25rem;
325
- }
326
- }
327
-
328
- <div>
329
- <div
330
- className="c0"
331
- data-test="header-esu"
332
- onKeyDown={[Function]}
333
- >
334
- <a
335
- className="c1"
336
- data-test="header-esu-icon"
337
- href="#"
338
- onClick={[Function]}
339
- rel="noopener noreferrer"
340
- role="button"
341
- tabIndex="0"
342
- target="_self"
343
- title="Sign up for emails"
344
- >
345
- <img
346
- alt="Sign up for emails"
347
- className="c2"
348
- src="mock.asset"
349
- />
350
- </a>
351
- <div
352
- className="c3"
353
- >
354
- <div
355
- aria-modal="true"
356
- className="c4 c5"
357
- >
358
- <h2
359
- className="c6 c7"
360
- color="inherit"
361
- size="xxl"
362
- >
363
- Stay in the know!
364
- </h2>
365
- <div
366
- className="c8"
367
- >
368
- <div
369
- className="c9"
370
- dangerouslySetInnerHTML={
371
- Object {
372
- "__html": "<p>Get regular email updates and info on what we're up to!</p>",
373
- }
374
- }
375
- />
376
- </div>
377
- <form
378
- className="c10"
379
- onSubmit={[Function]}
380
- >
381
- <label
382
- className="c11 c12"
383
- htmlFor="email"
384
- >
385
- <span
386
- className="c13 c14"
387
- color="inherit"
388
- dangerouslySetInnerHTML={
389
- Object {
390
- "__html": "email",
391
- }
392
- }
393
- size="s"
394
- />
395
- <div
396
- className="c15"
397
- >
398
-
399
- <input
400
- aria-label="Email address"
401
- className="c16"
402
- id="email"
403
- name="email"
404
- onChange={[Function]}
405
- placeholder="example@youremail.com"
406
- required={false}
407
- type="email"
408
- value=""
409
- />
410
- </div>
411
- <span
412
- className="c17"
413
- color="red"
414
- data-test="error-message"
415
- size="sm"
416
- >
417
- <span
418
- className="c18"
419
- >
420
- invalid email
421
- </span>
422
- </span>
423
- </label>
424
- <div
425
- className="c19"
426
- >
427
- <input
428
- className="c20"
429
- color="red"
430
- data-test="subscribe-button"
431
- onClick={[Function]}
432
- type="submit"
433
- value=" Subscribe"
434
- />
435
- </div>
436
- </form>
437
- <div
438
- className="c21"
439
- >
440
- <div
441
- className="c9"
442
- dangerouslySetInnerHTML={
443
- Object {
444
- "__html": "<p>Our <a class=\\"link link--white inline\\" href=\\"/privacy-notice\\">Privacy Policy</a> describes how we handle and protect your information.<br><br>If you are under 18, please make sure you have your parents’ permission before providing us with any personal details.</p>",
445
- }
446
- }
447
- />
448
- </div>
449
- </div>
450
- <a
451
- className="c1 c22"
452
- data-test="header-esu-icon"
453
- href="#"
454
- onClick={[Function]}
455
- rel="noopener noreferrer"
456
- role="button"
457
- tabIndex="0"
458
- target="_self"
459
- title="Close email sign-up"
460
- >
461
- <img
462
- alt="Close email sign-up"
463
- className="c2"
464
- src="mock.asset"
465
- />
466
- <span
467
- className="c23"
468
- >
469
- (opens in new window)
470
- </span>
471
- </a>
472
- </div>
473
- </div>
474
- </div>
475
- `;
476
-
477
- exports[`renders correctly with modal closed 1`] = `
478
- .c1 {
479
- -webkit-text-decoration: none;
480
- text-decoration: none;
481
- cursor: pointer;
482
- display: block;
483
- -webkit-transition: opacity 0.2s;
484
- transition: opacity 0.2s;
485
- }
486
-
487
- .c1:hover,
488
- .c1:focus {
489
- opacity: 0.6;
490
- }
491
-
492
- .c2 {
493
- width: 100%;
494
- }
495
-
496
- .c0 {
497
- width: 35px;
498
- height: 35px;
499
- display: inline-block;
500
- }
501
-
502
- <div>
503
- <div
504
- className="c0"
505
- data-test="header-esu"
506
- onKeyDown={[Function]}
507
- >
508
- <a
509
- className="c1"
510
- data-test="header-esu-icon"
511
- href="#"
512
- onClick={[Function]}
513
- rel="noopener noreferrer"
514
- role="button"
515
- tabIndex="0"
516
- target="_self"
517
- title="Sign up for emails"
518
- >
519
- <img
520
- alt="Sign up for emails"
521
- className="c2"
522
- src="mock.asset"
523
- />
524
- </a>
525
- </div>
526
- </div>
527
- `;
528
-
529
- exports[`renders correctly with modal open 1`] = `
530
- .c6 {
531
- font-size: 3rem;
532
- line-height: 3rem;
533
- text-transform: uppercase;
534
- font-weight: 400;
535
- font-family: 'Anton',Impact,sans-serif;
536
- -webkit-letter-spacing: 0.03rem;
537
- -moz-letter-spacing: 0.03rem;
538
- -ms-letter-spacing: 0.03rem;
539
- letter-spacing: 0.03rem;
540
- }
541
-
542
- .c13 {
543
- font-size: 1rem;
544
- line-height: 1rem;
545
- text-transform: inherit;
546
- line-height: normal;
547
- font-family: 'Montserrat',Helvetica,Arial,sans-serif;
548
- }
549
-
550
- .c11 {
551
- position: relative;
552
- display: -webkit-box;
553
- display: -webkit-flex;
554
- display: -ms-flexbox;
555
- display: flex;
556
- -webkit-flex-direction: column;
557
- -ms-flex-direction: column;
558
- flex-direction: column;
559
- color: #5C5C5E;
560
- width: 100%;
561
- }
562
-
563
- .c14 {
564
- border: 0;
565
- -webkit-clip: rect(0 0 0 0);
566
- clip: rect(0 0 0 0);
567
- -webkit-clip-path: inset(50%);
568
- clip-path: inset(50%);
569
- height: 1px;
570
- margin: -1px;
571
- overflow: hidden;
572
- padding: 0;
573
- position: absolute;
574
- white-space: nowrap;
575
- width: 1px;
576
- }
577
-
578
- .c16 {
579
- position: relative;
580
- box-sizing: border-box;
581
- width: 100%;
582
- height: 48px;
583
- padding: 1rem 1.5rem;
584
- background-color: #F4F3F5;
585
- border: 1px solid;
586
- border-color: #E1E2E3;
587
- box-shadow: none;
588
- -webkit-appearance: none;
589
- -moz-appearance: none;
590
- appearance: none;
591
- color: #000000;
592
- border-radius: 0.5rem;
593
- font-size: inherit;
594
- z-index: 2;
595
- font-family: 'Montserrat',Helvetica,Arial,sans-serif;
596
- }
597
-
598
- .c16:focus {
599
- border: 1px solid #666;
600
- }
601
-
602
- .c15 {
603
- position: relative;
604
- font-size: 1.25rem;
605
- }
606
-
607
- .c9 {
608
- text-align: left;
609
- }
610
-
611
- .c1 {
612
- -webkit-text-decoration: none;
613
- text-decoration: none;
614
- cursor: pointer;
615
- display: block;
616
- -webkit-transition: opacity 0.2s;
617
- transition: opacity 0.2s;
618
- }
619
-
620
- .c1:hover,
621
- .c1:focus {
622
- opacity: 0.6;
623
- }
624
-
625
- .c2 {
626
- width: 100%;
627
- }
628
-
629
- .c21 {
630
- border: 0;
631
- -webkit-clip: rect(0 0 0 0);
632
- clip: rect(0 0 0 0);
633
- -webkit-clip-path: inset(50%);
634
- clip-path: inset(50%);
635
- height: 1px;
636
- margin: -1px;
637
- overflow: hidden;
638
- padding: 0;
639
- position: absolute;
640
- white-space: nowrap;
641
- width: 1px;
642
- }
643
-
644
- .c4 {
645
- display: -webkit-box;
646
- display: -webkit-flex;
647
- display: -ms-flexbox;
648
- display: flex;
649
- -webkit-flex-direction: column;
650
- -ms-flex-direction: column;
651
- flex-direction: column;
652
- font-size: 1rem;
653
- color: #FFFFFF;
654
- background-color: #2C0230;
655
- }
656
-
657
- .c8 {
658
- display: -webkit-box;
659
- display: -webkit-flex;
660
- display: -ms-flexbox;
661
- display: flex;
662
- margin-bottom: 1rem;
663
- }
664
-
665
- .c17 {
666
- margin-top: 1rem;
667
- }
668
-
669
- .c17 input {
670
- text-align: center;
671
- width: 100%;
672
- font-size: 1rem;
673
- }
674
-
675
- .c19 {
676
- display: -webkit-box;
677
- display: -webkit-flex;
678
- display: -ms-flexbox;
679
- display: flex;
680
- -webkit-flex-direction: column;
681
- -ms-flex-direction: column;
682
- flex-direction: column;
683
- margin-top: 1rem;
684
- }
685
-
686
- .c19 p {
687
- font-size: 1rem;
688
- line-height: 2rem;
689
- }
690
-
691
- .c19 p a {
692
- font-size: 1rem;
693
- color: #FFFFFF;
694
- }
695
-
696
- .c10 {
697
- display: -webkit-box;
698
- display: -webkit-flex;
699
- display: -ms-flexbox;
700
- display: flex;
701
- -webkit-flex-direction: column;
702
- -ms-flex-direction: column;
703
- flex-direction: column;
704
- margin: 1rem 0;
705
- }
706
-
707
- .c12 {
708
- width: 100%;
709
- }
710
-
711
- .c7 {
712
- margin-bottom: 1.5rem;
713
- }
714
-
715
- .c18 {
716
- width: 100%;
717
- color: #FFFFFF;
718
- font-size: 1rem;
719
- font-weight: bold;
720
- cursor: pointer;
721
- padding: 1rem 0.5rem;
722
- background: #E52630;
723
- border: none;
724
- border-radius: 100px;
725
- }
726
-
727
- .c18:active,
728
- .c18:focus,
729
- .c18:hover {
730
- background-color: #961D35;
731
- }
732
-
733
- .c0 {
734
- width: 35px;
735
- height: 35px;
736
- display: inline-block;
737
- }
738
-
739
- .c3 {
740
- position: fixed;
741
- width: 100%;
742
- height: 100%;
743
- background-color: rgba(255,255,255,0.5);
744
- z-index: 100;
745
- top: 0;
746
- left: 0;
747
- overflow-y: auto;
748
- display: -webkit-box;
749
- display: -webkit-flex;
750
- display: -ms-flexbox;
751
- display: flex;
752
- -webkit-box-pack: center;
753
- -webkit-justify-content: center;
754
- -ms-flex-pack: center;
755
- justify-content: center;
756
- -webkit-align-items: flex-start;
757
- -webkit-box-align: flex-start;
758
- -ms-flex-align: flex-start;
759
- align-items: flex-start;
760
- }
761
-
762
- .c3 div[aria-modal='true'] {
763
- padding: 2rem;
764
- }
765
-
766
- .c20 {
767
- position: absolute;
768
- top: 0;
769
- right: 0;
770
- width: 40px;
771
- height: 40px;
772
- margin-left: 0;
773
- }
774
-
775
- .c5 {
776
- width: 100%;
777
- }
778
-
779
- .c5 input {
780
- font-size: 1rem;
781
- }
782
-
783
- @media (min-width:740px) {
784
- .c16 {
785
- max-width: 290px;
786
- }
787
- }
788
-
789
- @media (min-width:740px) {
790
- .c17 input {
791
- font-size: 1.25rem;
792
- max-width: 180px;
793
- }
794
- }
795
-
796
- @media (min-width:1024px) {
797
- .c18 {
798
- width: auto;
799
- padding: 1rem 2rem;
800
- margin: 0 auto 2rem;
801
- }
802
- }
803
-
804
- @media (min-width:740px) {
805
- .c20 {
806
- margin: 4rem 0 0;
807
- right: 25%;
808
- }
809
- }
810
-
811
- @media (min-width:740px) {
812
- .c5 {
813
- margin-top: 4rem;
814
- width: 50%;
815
- }
816
-
817
- .c5 input {
818
- font-size: 1.25rem;
819
- }
820
- }
821
-
822
- <div>
823
- <div
824
- className="c0"
825
- data-test="header-esu"
826
- onKeyDown={[Function]}
827
- >
828
- <a
829
- className="c1"
830
- data-test="header-esu-icon"
831
- href="#"
832
- onClick={[Function]}
833
- rel="noopener noreferrer"
834
- role="button"
835
- tabIndex="0"
836
- target="_self"
837
- title="Sign up for emails"
838
- >
839
- <img
840
- alt="Sign up for emails"
841
- className="c2"
842
- src="mock.asset"
843
- />
844
- </a>
845
- <div
846
- className="c3"
847
- >
848
- <div
849
- aria-modal="true"
850
- className="c4 c5"
851
- >
852
- <h2
853
- className="c6 c7"
854
- color="inherit"
855
- size="xxl"
856
- >
857
- Stay in the know!
858
- </h2>
859
- <div
860
- className="c8"
861
- >
862
- <div
863
- className="c9"
864
- dangerouslySetInnerHTML={
865
- Object {
866
- "__html": "<p>Get regular email updates and info on what we're up to!</p>",
867
- }
868
- }
869
- />
870
- </div>
871
- <form
872
- className="c10"
873
- onSubmit={[Function]}
874
- >
875
- <label
876
- className="c11 c12"
877
- htmlFor="email"
878
- >
879
- <span
880
- className="c13 c14"
881
- color="inherit"
882
- dangerouslySetInnerHTML={
883
- Object {
884
- "__html": "email",
885
- }
886
- }
887
- size="s"
888
- />
889
- <div
890
- className="c15"
891
- >
892
-
893
- <input
894
- aria-label="Email address"
895
- className="c16"
896
- id="email"
897
- name="email"
898
- onChange={[Function]}
899
- placeholder="example@youremail.com"
900
- required={false}
901
- type="email"
902
- value=""
903
- />
904
- </div>
905
-
906
- </label>
907
- <div
908
- className="c17"
909
- >
910
- <input
911
- className="c18"
912
- color="red"
913
- data-test="subscribe-button"
914
- onClick={[Function]}
915
- type="submit"
916
- value=" Subscribe"
917
- />
918
- </div>
919
- </form>
920
- <div
921
- className="c19"
922
- >
923
- <div
924
- className="c9"
925
- dangerouslySetInnerHTML={
926
- Object {
927
- "__html": "<p>Our <a class=\\"link link--white inline\\" href=\\"/privacy-notice\\">Privacy Policy</a> describes how we handle and protect your information.<br><br>If you are under 18, please make sure you have your parents’ permission before providing us with any personal details.</p>",
928
- }
929
- }
930
- />
931
- </div>
932
- </div>
933
- <a
934
- className="c1 c20"
935
- data-test="header-esu-icon"
936
- href="#"
937
- onClick={[Function]}
938
- rel="noopener noreferrer"
939
- role="button"
940
- tabIndex="0"
941
- target="_self"
942
- title="Close email sign-up"
943
- >
944
- <img
945
- alt="Close email sign-up"
946
- className="c2"
947
- src="mock.asset"
948
- />
949
- <span
950
- className="c21"
951
- >
952
- (opens in new window)
953
- </span>
954
- </a>
955
- </div>
956
- </div>
957
- </div>
958
- `;
959
-
960
- exports[`renders correctly with success message 1`] = `
961
- .c6 {
962
- font-size: 3rem;
963
- line-height: 3rem;
964
- text-transform: uppercase;
965
- font-weight: 400;
966
- font-family: 'Anton',Impact,sans-serif;
967
- -webkit-letter-spacing: 0.03rem;
968
- -moz-letter-spacing: 0.03rem;
969
- -ms-letter-spacing: 0.03rem;
970
- letter-spacing: 0.03rem;
971
- }
972
-
973
- .c9 {
974
- text-align: left;
975
- }
976
-
977
- .c1 {
978
- -webkit-text-decoration: none;
979
- text-decoration: none;
980
- cursor: pointer;
981
- display: block;
982
- -webkit-transition: opacity 0.2s;
983
- transition: opacity 0.2s;
984
- }
985
-
986
- .c1:hover,
987
- .c1:focus {
988
- opacity: 0.6;
989
- }
990
-
991
- .c2 {
992
- width: 100%;
993
- }
994
-
995
- .c12 {
996
- border: 0;
997
- -webkit-clip: rect(0 0 0 0);
998
- clip: rect(0 0 0 0);
999
- -webkit-clip-path: inset(50%);
1000
- clip-path: inset(50%);
1001
- height: 1px;
1002
- margin: -1px;
1003
- overflow: hidden;
1004
- padding: 0;
1005
- position: absolute;
1006
- white-space: nowrap;
1007
- width: 1px;
1008
- }
1009
-
1010
- .c4 {
1011
- display: -webkit-box;
1012
- display: -webkit-flex;
1013
- display: -ms-flexbox;
1014
- display: flex;
1015
- -webkit-flex-direction: column;
1016
- -ms-flex-direction: column;
1017
- flex-direction: column;
1018
- font-size: 1rem;
1019
- color: #FFFFFF;
1020
- background-color: #2C0230;
1021
- }
1022
-
1023
- .c8 {
1024
- display: -webkit-box;
1025
- display: -webkit-flex;
1026
- display: -ms-flexbox;
1027
- display: flex;
1028
- margin-bottom: 1rem;
1029
- }
1030
-
1031
- .c10 {
1032
- display: -webkit-box;
1033
- display: -webkit-flex;
1034
- display: -ms-flexbox;
1035
- display: flex;
1036
- -webkit-flex-direction: column;
1037
- -ms-flex-direction: column;
1038
- flex-direction: column;
1039
- margin-top: 1rem;
1040
- }
1041
-
1042
- .c10 p {
1043
- font-size: 1rem;
1044
- line-height: 2rem;
1045
- }
1046
-
1047
- .c10 p a {
1048
- font-size: 1rem;
1049
- color: #FFFFFF;
1050
- }
1051
-
1052
- .c7 {
1053
- margin-bottom: 1.5rem;
1054
- }
1055
-
1056
- .c0 {
1057
- width: 35px;
1058
- height: 35px;
1059
- display: inline-block;
1060
- }
1061
-
1062
- .c3 {
1063
- position: fixed;
1064
- width: 100%;
1065
- height: 100%;
1066
- background-color: rgba(255,255,255,0.5);
1067
- z-index: 100;
1068
- top: 0;
1069
- left: 0;
1070
- overflow-y: auto;
1071
- display: -webkit-box;
1072
- display: -webkit-flex;
1073
- display: -ms-flexbox;
1074
- display: flex;
1075
- -webkit-box-pack: center;
1076
- -webkit-justify-content: center;
1077
- -ms-flex-pack: center;
1078
- justify-content: center;
1079
- -webkit-align-items: flex-start;
1080
- -webkit-box-align: flex-start;
1081
- -ms-flex-align: flex-start;
1082
- align-items: flex-start;
1083
- }
1084
-
1085
- .c3 div[aria-modal='true'] {
1086
- padding: 2rem;
1087
- }
1088
-
1089
- .c11 {
1090
- position: absolute;
1091
- top: 0;
1092
- right: 0;
1093
- width: 40px;
1094
- height: 40px;
1095
- margin-left: 0;
1096
- }
1097
-
1098
- .c5 {
1099
- width: 100%;
1100
- }
1101
-
1102
- .c5 input {
1103
- font-size: 1rem;
1104
- }
1105
-
1106
- @media (min-width:740px) {
1107
- .c11 {
1108
- margin: 4rem 0 0;
1109
- right: 25%;
1110
- }
1111
- }
1112
-
1113
- @media (min-width:740px) {
1114
- .c5 {
1115
- margin-top: 4rem;
1116
- width: 50%;
1117
- }
1118
-
1119
- .c5 input {
1120
- font-size: 1.25rem;
1121
- }
1122
- }
1123
-
1124
- <div>
1125
- <div
1126
- className="c0"
1127
- data-test="header-esu"
1128
- onKeyDown={[Function]}
1129
- >
1130
- <a
1131
- className="c1"
1132
- data-test="header-esu-icon"
1133
- href="#"
1134
- onClick={[Function]}
1135
- rel="noopener noreferrer"
1136
- role="button"
1137
- tabIndex="0"
1138
- target="_self"
1139
- title="Sign up for emails"
1140
- >
1141
- <img
1142
- alt="Sign up for emails"
1143
- className="c2"
1144
- src="mock.asset"
1145
- />
1146
- </a>
1147
- <div
1148
- className="c3"
1149
- >
1150
- <div
1151
- aria-modal="true"
1152
- className="c4 c5"
1153
- >
1154
- <h2
1155
- className="c6 c7"
1156
- color="inherit"
1157
- size="xxl"
1158
- >
1159
- Stay in the know!
1160
- </h2>
1161
- <div
1162
- className="c8"
1163
- >
1164
- <div
1165
- className="c9"
1166
- dangerouslySetInnerHTML={
1167
- Object {
1168
- "__html": "<p>Thanks! Your first email will be with you shortly</p>",
1169
- }
1170
- }
1171
- />
1172
- </div>
1173
- <div
1174
- className="c10"
1175
- >
1176
- <div
1177
- className="c9"
1178
- dangerouslySetInnerHTML={
1179
- Object {
1180
- "__html": "<p>Our <a class=\\"link link--white inline\\" href=\\"/privacy-notice\\">Privacy Policy</a> describes how we handle and protect your information.<br><br>If you are under 18, please make sure you have your parents’ permission before providing us with any personal details.</p>",
1181
- }
1182
- }
1183
- />
1184
- </div>
1185
- </div>
1186
- <a
1187
- className="c1 c11"
1188
- data-test="header-esu-icon"
1189
- href="#"
1190
- onClick={[Function]}
1191
- rel="noopener noreferrer"
1192
- role="button"
1193
- tabIndex="0"
1194
- target="_self"
1195
- title="Close email sign-up"
1196
- >
1197
- <img
1198
- alt="Close email sign-up"
1199
- className="c2"
1200
- src="mock.asset"
1201
- />
1202
- <span
1203
- className="c12"
1204
- >
1205
- (opens in new window)
1206
- </span>
1207
- </a>
1208
- </div>
1209
- </div>
1210
- </div>
1211
- `;