@comicrelief/component-library 8.48.2 → 8.49.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 +15 -42
- package/dist/components/Atoms/Button/Button.md +91 -1
- package/dist/components/Atoms/Button/Button.style.js +47 -0
- package/dist/components/Atoms/Button/Button.test.js +40 -12
- package/dist/components/Atoms/ButtonWithStates/ButtonWithStates.js +1 -1
- package/dist/components/Atoms/Link/Link.js +8 -5
- package/dist/components/Atoms/Link/Link.md +81 -78
- package/dist/components/Atoms/Link/Link.style.js +22 -18
- package/dist/components/Atoms/Link/Link.test.js +20 -19
- package/dist/components/Molecules/CardDs/CardDs.md +3 -3
- package/dist/components/Molecules/CardDs/CardDs.test.js +1 -1
- package/dist/components/Molecules/CardDs/__snapshots__/CardDs.test.js.snap +43 -41
- package/dist/components/Molecules/Lookup/Lookup.js +9 -16
- package/dist/components/Molecules/Promo/__snapshots__/Promo.test.js.snap +42 -40
- package/dist/components/Molecules/SingleMessage/__snapshots__/SingleMessage.test.js.snap +42 -40
- package/dist/components/Molecules/SingleMessageDS/__snapshots__/SingleMessageDs.test.js.snap +20 -19
- package/dist/components/Organisms/CookieBanner/CookieBanner.test.js +21 -20
- package/dist/components/Organisms/EmailSignUp/_EmailSignUp.js +1 -1
- package/dist/components/Organisms/EmailSignUp/__snapshots__/EmailSignUp.test.js.snap +41 -17
- package/dist/components/Organisms/FooterNew/__snapshots__/FooterNew.test.js.snap +39 -12
- package/dist/components/Organisms/Header2025/Header2025.style.js +1 -1
- package/dist/components/Organisms/Header2025/HeaderNav2025/HeaderNav2025.style.js +1 -1
- package/dist/theme/crTheme/buttonColors.js +84 -72
- package/dist/theme/crTheme/buttonTypes.js +12 -0
- package/dist/theme/crTheme/colors.js +13 -1
- package/dist/theme/crTheme/fontConfig.js +3 -4
- package/dist/theme/crTheme/theme.js +2 -0
- package/package.json +1 -1
- package/playwright/components/organisms/emailSignUpForm.spec.js +1 -1
- package/src/components/Atoms/Button/Button.js +18 -36
- package/src/components/Atoms/Button/Button.md +91 -1
- package/src/components/Atoms/Button/Button.style.js +37 -0
- package/src/components/Atoms/Button/Button.test.js +44 -16
- package/src/components/Atoms/ButtonWithStates/ButtonWithStates.js +1 -1
- package/src/components/Atoms/Link/Link.js +15 -5
- package/src/components/Atoms/Link/Link.md +81 -78
- package/src/components/Atoms/Link/Link.style.js +32 -27
- package/src/components/Atoms/Link/Link.test.js +20 -19
- package/src/components/Molecules/CardDs/CardDs.md +3 -3
- package/src/components/Molecules/CardDs/CardDs.test.js +1 -1
- package/src/components/Molecules/CardDs/__snapshots__/CardDs.test.js.snap +43 -41
- package/src/components/Molecules/Lookup/Lookup.js +4 -15
- package/src/components/Molecules/Promo/__snapshots__/Promo.test.js.snap +42 -40
- package/src/components/Molecules/SingleMessage/__snapshots__/SingleMessage.test.js.snap +42 -40
- package/src/components/Molecules/SingleMessageDS/__snapshots__/SingleMessageDs.test.js.snap +20 -19
- package/src/components/Organisms/CookieBanner/CookieBanner.test.js +21 -20
- package/src/components/Organisms/EmailSignUp/_EmailSignUp.js +1 -1
- package/src/components/Organisms/EmailSignUp/__snapshots__/EmailSignUp.test.js.snap +41 -17
- package/src/components/Organisms/FooterNew/__snapshots__/FooterNew.test.js.snap +39 -12
- package/src/components/Organisms/Header2025/Header2025.style.js +2 -1
- package/src/components/Organisms/Header2025/HeaderNav2025/HeaderNav2025.style.js +1 -1
- package/src/theme/crTheme/buttonColors.js +116 -76
- package/src/theme/crTheme/buttonTypes.js +7 -0
- package/src/theme/crTheme/colors.js +14 -1
- package/src/theme/crTheme/fontConfig.js +3 -4
- package/src/theme/crTheme/theme.js +3 -0
|
@@ -49,15 +49,11 @@ exports[`renders correctly 1`] = `
|
|
|
49
49
|
display: -ms-inline-flexbox;
|
|
50
50
|
display: inline-flex;
|
|
51
51
|
position: relative;
|
|
52
|
-
padding: 0.5rem 1.25rem;
|
|
53
52
|
-webkit-text-decoration: none;
|
|
54
53
|
text-decoration: none;
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
-webkit-transition: all 0.3s;
|
|
59
|
-
transition: all 0.3s;
|
|
60
|
-
height: 3.125rem;
|
|
54
|
+
-webkit-transition: all 0.2s;
|
|
55
|
+
transition: all 0.2s;
|
|
56
|
+
min-height: 2.5rem;
|
|
61
57
|
width: 100%;
|
|
62
58
|
-webkit-box-pack: center;
|
|
63
59
|
-webkit-justify-content: center;
|
|
@@ -69,8 +65,19 @@ exports[`renders correctly 1`] = `
|
|
|
69
65
|
align-items: center;
|
|
70
66
|
border: none;
|
|
71
67
|
cursor: pointer;
|
|
68
|
+
padding: 0.6rem 1rem;
|
|
69
|
+
border-radius: 0.5rem;
|
|
72
70
|
background-color: #E52630;
|
|
73
71
|
color: #FFFFFF;
|
|
72
|
+
font-family: 'Montserrat',Helvetica,Arial,sans-serif;
|
|
73
|
+
font-weight: 700;
|
|
74
|
+
text-transform: inherit;
|
|
75
|
+
-webkit-letter-spacing: 0;
|
|
76
|
+
-moz-letter-spacing: 0;
|
|
77
|
+
-ms-letter-spacing: 0;
|
|
78
|
+
letter-spacing: 0;
|
|
79
|
+
font-size: 1rem;
|
|
80
|
+
line-height: 1.25rem;
|
|
74
81
|
}
|
|
75
82
|
|
|
76
83
|
.c15 > a {
|
|
@@ -78,9 +85,17 @@ exports[`renders correctly 1`] = `
|
|
|
78
85
|
text-decoration: none;
|
|
79
86
|
}
|
|
80
87
|
|
|
81
|
-
.c15:hover
|
|
88
|
+
.c15:hover,
|
|
89
|
+
.c15:focus,
|
|
90
|
+
.c15:focus-within,
|
|
91
|
+
.c15:focus-visible {
|
|
82
92
|
background-color: #890B11;
|
|
83
|
-
|
|
93
|
+
outline-offset: 3px;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.c15:disabled {
|
|
97
|
+
cursor: not-allowed;
|
|
98
|
+
opacity: 0.5;
|
|
84
99
|
}
|
|
85
100
|
|
|
86
101
|
.c8 {
|
|
@@ -161,7 +176,7 @@ exports[`renders correctly 1`] = `
|
|
|
161
176
|
|
|
162
177
|
.c16:disabled {
|
|
163
178
|
cursor: not-allowed;
|
|
164
|
-
opacity: 0.
|
|
179
|
+
opacity: 0.5;
|
|
165
180
|
}
|
|
166
181
|
|
|
167
182
|
.c0 {
|
|
@@ -278,6 +293,20 @@ exports[`renders correctly 1`] = `
|
|
|
278
293
|
}
|
|
279
294
|
}
|
|
280
295
|
|
|
296
|
+
@media (min-width:740px) {
|
|
297
|
+
.c15 {
|
|
298
|
+
font-size: 1rem;
|
|
299
|
+
line-height: 1.25rem;
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
@media (min-width:1024px) {
|
|
304
|
+
.c15 {
|
|
305
|
+
font-size: 1.125rem;
|
|
306
|
+
line-height: 1.375rem;
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
|
|
281
310
|
@media (min-width:740px) {
|
|
282
311
|
.c15 {
|
|
283
312
|
width: auto;
|
|
@@ -287,8 +316,6 @@ exports[`renders correctly 1`] = `
|
|
|
287
316
|
@media (min-width:1024px) {
|
|
288
317
|
.c15 {
|
|
289
318
|
width: auto;
|
|
290
|
-
padding: 1rem 2rem;
|
|
291
|
-
margin: 0 auto 2rem;
|
|
292
319
|
}
|
|
293
320
|
}
|
|
294
321
|
|
|
@@ -478,15 +505,12 @@ exports[`renders correctly 1`] = `
|
|
|
478
505
|
>
|
|
479
506
|
<button
|
|
480
507
|
className="c15 c16"
|
|
508
|
+
color="red"
|
|
481
509
|
data-test="subscribe-button"
|
|
482
510
|
disabled={true}
|
|
483
511
|
type="submit"
|
|
484
512
|
>
|
|
485
|
-
|
|
486
|
-
className="c4"
|
|
487
|
-
>
|
|
488
|
-
Subscribe
|
|
489
|
-
</span>
|
|
513
|
+
Subscribe
|
|
490
514
|
<div
|
|
491
515
|
className=""
|
|
492
516
|
/>
|
|
@@ -66,15 +66,11 @@ exports[`renders correctly 1`] = `
|
|
|
66
66
|
display: -ms-inline-flexbox;
|
|
67
67
|
display: inline-flex;
|
|
68
68
|
position: relative;
|
|
69
|
-
padding: 0.5rem 1.25rem;
|
|
70
69
|
-webkit-text-decoration: none;
|
|
71
70
|
text-decoration: none;
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
-webkit-transition: all 0.3s;
|
|
76
|
-
transition: all 0.3s;
|
|
77
|
-
height: 3.125rem;
|
|
71
|
+
-webkit-transition: all 0.2s;
|
|
72
|
+
transition: all 0.2s;
|
|
73
|
+
min-height: 2.5rem;
|
|
78
74
|
width: 100%;
|
|
79
75
|
-webkit-box-pack: center;
|
|
80
76
|
-webkit-justify-content: center;
|
|
@@ -86,8 +82,19 @@ exports[`renders correctly 1`] = `
|
|
|
86
82
|
align-items: center;
|
|
87
83
|
border: none;
|
|
88
84
|
cursor: pointer;
|
|
85
|
+
padding: 0.6rem 1rem;
|
|
86
|
+
border-radius: 0.5rem;
|
|
89
87
|
background-color: #FFFFFF;
|
|
90
88
|
color: #000000;
|
|
89
|
+
font-family: 'Montserrat',Helvetica,Arial,sans-serif;
|
|
90
|
+
font-weight: 700;
|
|
91
|
+
text-transform: inherit;
|
|
92
|
+
-webkit-letter-spacing: 0;
|
|
93
|
+
-moz-letter-spacing: 0;
|
|
94
|
+
-ms-letter-spacing: 0;
|
|
95
|
+
letter-spacing: 0;
|
|
96
|
+
font-size: 1rem;
|
|
97
|
+
line-height: 1.25rem;
|
|
91
98
|
}
|
|
92
99
|
|
|
93
100
|
.c23 > a {
|
|
@@ -95,9 +102,17 @@ exports[`renders correctly 1`] = `
|
|
|
95
102
|
text-decoration: none;
|
|
96
103
|
}
|
|
97
104
|
|
|
98
|
-
.c23:hover
|
|
99
|
-
|
|
100
|
-
|
|
105
|
+
.c23:hover,
|
|
106
|
+
.c23:focus,
|
|
107
|
+
.c23:focus-within,
|
|
108
|
+
.c23:focus-visible {
|
|
109
|
+
background-color: #E1E2E3;
|
|
110
|
+
outline-offset: 3px;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.c23:disabled {
|
|
114
|
+
cursor: not-allowed;
|
|
115
|
+
opacity: 0.5;
|
|
101
116
|
}
|
|
102
117
|
|
|
103
118
|
.c15 {
|
|
@@ -788,6 +803,20 @@ exports[`renders correctly 1`] = `
|
|
|
788
803
|
}
|
|
789
804
|
}
|
|
790
805
|
|
|
806
|
+
@media (min-width:740px) {
|
|
807
|
+
.c23 {
|
|
808
|
+
font-size: 1rem;
|
|
809
|
+
line-height: 1.25rem;
|
|
810
|
+
}
|
|
811
|
+
}
|
|
812
|
+
|
|
813
|
+
@media (min-width:1024px) {
|
|
814
|
+
.c23 {
|
|
815
|
+
font-size: 1.125rem;
|
|
816
|
+
line-height: 1.375rem;
|
|
817
|
+
}
|
|
818
|
+
}
|
|
819
|
+
|
|
791
820
|
@media (min-width:740px) {
|
|
792
821
|
.c23 {
|
|
793
822
|
width: auto;
|
|
@@ -797,8 +826,6 @@ exports[`renders correctly 1`] = `
|
|
|
797
826
|
@media (min-width:1024px) {
|
|
798
827
|
.c23 {
|
|
799
828
|
width: auto;
|
|
800
|
-
padding: 1rem 2rem;
|
|
801
|
-
margin: 0 auto 2rem;
|
|
802
829
|
}
|
|
803
830
|
}
|
|
804
831
|
|
|
@@ -436,7 +436,7 @@ const DonateButtonWrapperBottom = styled.div`
|
|
|
436
436
|
// Donate button
|
|
437
437
|
a {
|
|
438
438
|
width: calc(100% - 10px);
|
|
439
|
-
transition:
|
|
439
|
+
transition: all 0.3s cubic-bezier(0.5, 1.5, 0.5, 0.9);
|
|
440
440
|
|
|
441
441
|
&:hover,
|
|
442
442
|
&:focus {
|
|
@@ -2,161 +2,171 @@ import { css } from 'styled-components';
|
|
|
2
2
|
import color from './colors';
|
|
3
3
|
|
|
4
4
|
const buttonColors = {
|
|
5
|
+
// "Primary - red"
|
|
6
|
+
red: {
|
|
7
|
+
background: color('red'),
|
|
8
|
+
textColour: color('white'),
|
|
9
|
+
hoverBackground: color('red_dark'),
|
|
10
|
+
hovertextColour: color('white')
|
|
11
|
+
},
|
|
12
|
+
// "Primary - black"
|
|
5
13
|
black: {
|
|
6
|
-
background: color('
|
|
7
|
-
|
|
8
|
-
hoverBackground: color('
|
|
9
|
-
|
|
14
|
+
background: color('grey_dark'),
|
|
15
|
+
textColour: color('white'),
|
|
16
|
+
hoverBackground: color('black'),
|
|
17
|
+
hovertextColour: color('white')
|
|
10
18
|
},
|
|
19
|
+
// "Primary - white"
|
|
20
|
+
white: {
|
|
21
|
+
background: color('white'),
|
|
22
|
+
textColour: color('black'),
|
|
23
|
+
hoverBackground: color('grey_medium'),
|
|
24
|
+
hovertextColour: color('black')
|
|
25
|
+
},
|
|
26
|
+
// To be phased out:
|
|
11
27
|
blue: {
|
|
12
28
|
background: color('blue'),
|
|
13
|
-
|
|
29
|
+
textColour: color('white'),
|
|
14
30
|
hoverBackground: color('blue_dark'),
|
|
15
|
-
|
|
31
|
+
hovertextColour: color('white')
|
|
16
32
|
},
|
|
17
33
|
blue_dark: {
|
|
18
34
|
background: '#2042AD',
|
|
19
|
-
|
|
35
|
+
textColour: color('white'),
|
|
20
36
|
hoverBackground: color('blue_dark'),
|
|
21
|
-
|
|
37
|
+
hovertextColour: color('white')
|
|
22
38
|
},
|
|
23
39
|
blue_light: {
|
|
24
40
|
background: color('blue_light'),
|
|
25
|
-
|
|
41
|
+
textColour: color('black'),
|
|
26
42
|
hoverBackground: color('blue_dark'),
|
|
27
|
-
|
|
43
|
+
hovertextColour: color('white')
|
|
28
44
|
},
|
|
29
45
|
coral: {
|
|
30
46
|
background: color('coral'),
|
|
31
|
-
|
|
47
|
+
textColour: color('black'),
|
|
32
48
|
hoverBackground: color('coral_light'),
|
|
33
|
-
|
|
49
|
+
hovertextColour: color('black')
|
|
34
50
|
},
|
|
35
51
|
coral_dark: {
|
|
36
52
|
background: color('coral_dark'),
|
|
37
|
-
|
|
53
|
+
textColour: color('white'),
|
|
38
54
|
hoverBackground: color('coral'),
|
|
39
|
-
|
|
55
|
+
hovertextColour: color('black')
|
|
40
56
|
},
|
|
41
57
|
coral_light: {
|
|
42
58
|
background: color('coral_light'),
|
|
43
|
-
|
|
59
|
+
textColour: color('black'),
|
|
44
60
|
hoverBackground: color('coral_dark'),
|
|
45
|
-
|
|
61
|
+
hovertextColour: color('white')
|
|
46
62
|
},
|
|
47
63
|
green: {
|
|
48
64
|
background: color('green'),
|
|
49
|
-
|
|
65
|
+
textColour: color('black'),
|
|
50
66
|
hoverBackground: color('green_light'),
|
|
51
|
-
|
|
67
|
+
hovertextColour: color('black')
|
|
52
68
|
},
|
|
53
69
|
green_dark: {
|
|
54
70
|
background: color('green_dark'),
|
|
55
|
-
|
|
71
|
+
textColour: color('white'),
|
|
56
72
|
hoverBackground: color('green'),
|
|
57
|
-
|
|
73
|
+
hovertextColour: color('black')
|
|
58
74
|
},
|
|
59
75
|
green_light: {
|
|
60
76
|
background: color('green_light'),
|
|
61
|
-
|
|
77
|
+
textColour: color('black'),
|
|
62
78
|
hoverBackground: color('green_dark'),
|
|
63
|
-
|
|
79
|
+
hovertextColour: color('white')
|
|
64
80
|
},
|
|
65
81
|
grey: {
|
|
66
82
|
background: color('grey'),
|
|
67
|
-
|
|
83
|
+
textColour: color('black'),
|
|
68
84
|
hoverBackground: color('grey_light'),
|
|
69
|
-
|
|
85
|
+
hovertextColour: color('black')
|
|
70
86
|
},
|
|
71
87
|
grey_dark: {
|
|
72
88
|
background: color('grey_dark'),
|
|
73
|
-
|
|
89
|
+
textColour: color('white'),
|
|
74
90
|
hoverBackground: color('grey'),
|
|
75
|
-
|
|
91
|
+
hovertextColour: color('black')
|
|
76
92
|
},
|
|
77
93
|
grey_light: {
|
|
78
94
|
background: color('grey_light'),
|
|
79
|
-
|
|
95
|
+
textColour: color('black'),
|
|
80
96
|
hoverBackground: color('grey_dark'),
|
|
81
|
-
|
|
97
|
+
hovertextColour: color('white')
|
|
82
98
|
},
|
|
83
99
|
magenta: {
|
|
84
100
|
background: color('magenta'),
|
|
85
|
-
|
|
101
|
+
textColour: color('black'),
|
|
86
102
|
hoverBackground: color('magenta_light'),
|
|
87
|
-
|
|
103
|
+
hovertextColour: color('black')
|
|
88
104
|
},
|
|
89
105
|
magenta_dark: {
|
|
90
106
|
background: color('magenta_dark'),
|
|
91
|
-
|
|
107
|
+
textColour: color('white'),
|
|
92
108
|
hoverBackground: color('magenta'),
|
|
93
|
-
|
|
109
|
+
hovertextColour: color('black')
|
|
94
110
|
},
|
|
95
111
|
magenta_light: {
|
|
96
112
|
background: color('magenta_light'),
|
|
97
|
-
|
|
113
|
+
textColour: color('black'),
|
|
98
114
|
hoverBackground: color('magenta_dark'),
|
|
99
|
-
|
|
115
|
+
hovertextColour: color('white')
|
|
100
116
|
},
|
|
101
117
|
orange: {
|
|
102
118
|
background: color('orange'),
|
|
103
|
-
|
|
119
|
+
textColour: color('black'),
|
|
104
120
|
hoverBackground: color('orange_light'),
|
|
105
|
-
|
|
121
|
+
hovertextColour: color('black')
|
|
106
122
|
},
|
|
107
123
|
orange_dark: {
|
|
108
124
|
background: color('orange_dark'),
|
|
109
|
-
|
|
125
|
+
textColour: color('white'),
|
|
110
126
|
hoverBackground: color('orange'),
|
|
111
|
-
|
|
127
|
+
hovertextColour: color('black')
|
|
112
128
|
},
|
|
113
129
|
orange_light: {
|
|
114
130
|
background: color('orange_light'),
|
|
115
|
-
|
|
131
|
+
textColour: color('black'),
|
|
116
132
|
hoverBackground: color('orange_dark'),
|
|
117
|
-
|
|
133
|
+
hovertextColour: color('white')
|
|
118
134
|
},
|
|
119
135
|
purple: {
|
|
120
136
|
background: color('purple'),
|
|
121
|
-
|
|
137
|
+
textColour: color('white'),
|
|
122
138
|
hoverBackground: color('purple_dark'),
|
|
123
|
-
|
|
139
|
+
hovertextColour: color('white')
|
|
124
140
|
},
|
|
125
141
|
purple_dark: {
|
|
126
142
|
background: color('purple_dark'),
|
|
127
|
-
|
|
143
|
+
textColour: color('white'),
|
|
128
144
|
hoverBackground: color('purple'),
|
|
129
|
-
|
|
145
|
+
hovertextColour: color('white')
|
|
130
146
|
},
|
|
131
147
|
purple_light: {
|
|
132
148
|
background: color('purple_light'),
|
|
133
|
-
|
|
149
|
+
textColour: color('black'),
|
|
134
150
|
hoverBackground: color('purple_dark'),
|
|
135
|
-
|
|
136
|
-
},
|
|
137
|
-
red: {
|
|
138
|
-
background: color('red'),
|
|
139
|
-
color: color('white'),
|
|
140
|
-
hoverBackground: color('red_dark'),
|
|
141
|
-
hoverColor: color('white')
|
|
151
|
+
hovertextColour: color('white')
|
|
142
152
|
},
|
|
143
153
|
teal: {
|
|
144
154
|
background: color('teal'),
|
|
145
|
-
|
|
155
|
+
textColour: color('black'),
|
|
146
156
|
hoverBackground: color('teal_light'),
|
|
147
|
-
|
|
157
|
+
hovertextColour: color('black')
|
|
148
158
|
},
|
|
149
159
|
teal_dark: {
|
|
150
160
|
background: color('teal_dark'),
|
|
151
|
-
|
|
161
|
+
textColour: color('white'),
|
|
152
162
|
hoverBackground: color('teal'),
|
|
153
|
-
|
|
163
|
+
hovertextColour: color('black')
|
|
154
164
|
},
|
|
155
165
|
teal_light: {
|
|
156
166
|
background: color('teal_light'),
|
|
157
|
-
|
|
167
|
+
textColour: color('black'),
|
|
158
168
|
hoverBackground: color('teal_dark'),
|
|
159
|
-
|
|
169
|
+
hovertextColour: color('white')
|
|
160
170
|
},
|
|
161
171
|
transparent: {
|
|
162
172
|
background: 'rgba(255, 255, 255, 0.5)',
|
|
@@ -164,42 +174,72 @@ const buttonColors = {
|
|
|
164
174
|
hoverBackground: 'rgba(255, 255, 255, 0.7)',
|
|
165
175
|
hoverColor: 'inherit'
|
|
166
176
|
},
|
|
167
|
-
white: {
|
|
168
|
-
background: color('white'),
|
|
169
|
-
color: color('black'),
|
|
170
|
-
hoverBackground: color('grey'),
|
|
171
|
-
hoverColor: color('black')
|
|
172
|
-
},
|
|
173
177
|
yellow: {
|
|
174
178
|
background: color('yellow'),
|
|
175
|
-
|
|
179
|
+
textColour: color('black'),
|
|
176
180
|
hoverBackground: color('yellow_light'),
|
|
177
|
-
|
|
181
|
+
hovertextColour: color('black')
|
|
178
182
|
},
|
|
179
183
|
yellow_dark: {
|
|
180
184
|
background: color('yellow_dark'),
|
|
181
|
-
|
|
185
|
+
textColour: color('white'),
|
|
182
186
|
hoverBackground: color('yellow'),
|
|
183
|
-
|
|
187
|
+
hovertextColour: color('black')
|
|
184
188
|
},
|
|
185
189
|
yellow_light: {
|
|
186
190
|
background: color('yellow_light'),
|
|
187
|
-
|
|
191
|
+
textColour: color('black'),
|
|
188
192
|
hoverBackground: color('yellow_dark'),
|
|
189
|
-
|
|
193
|
+
hovertextColour: color('white')
|
|
190
194
|
}
|
|
191
195
|
};
|
|
192
196
|
|
|
193
|
-
export default colorName => {
|
|
197
|
+
export default (colorName, buttonType) => {
|
|
194
198
|
let style = 'inherit';
|
|
199
|
+
|
|
200
|
+
// Add a fallback, just in case someone is trying to use a non-existent colour:
|
|
201
|
+
const thisColourName = buttonColors[colorName] ? colorName : 'red';
|
|
202
|
+
|
|
195
203
|
if (colorName) {
|
|
196
204
|
style = css`
|
|
197
|
-
background-color: ${buttonColors[
|
|
198
|
-
color: ${buttonColors[
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
205
|
+
background-color: ${buttonColors[thisColourName].background};
|
|
206
|
+
color: ${buttonColors[thisColourName].textColour};
|
|
207
|
+
|
|
208
|
+
&:hover,
|
|
209
|
+
&:focus,
|
|
210
|
+
&:focus-within,
|
|
211
|
+
&:focus-visible {
|
|
212
|
+
background-color: ${buttonColors[thisColourName].hoverBackground};
|
|
213
|
+
color: ${buttonColors[thisColourName].hoverColor};
|
|
214
|
+
outline-offset: 3px;
|
|
202
215
|
}
|
|
216
|
+
|
|
217
|
+
&:disabled {
|
|
218
|
+
cursor: not-allowed;
|
|
219
|
+
opacity: 0.5;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
// 'Secondary' and 'Tertiary' buttonType tweaks
|
|
223
|
+
${({ theme }) => ((buttonType === theme.buttonTypes.SECONDARY || buttonType === theme.buttonTypes.TERTIARY) && css`
|
|
224
|
+
background-color: transparent;
|
|
225
|
+
color: ${buttonColors[thisColourName].background};
|
|
226
|
+
|
|
227
|
+
${buttonType === theme.buttonTypes.SECONDARY && css`
|
|
228
|
+
box-shadow: 0px 0px 0px 2px ${buttonColors[thisColourName].background} inset;
|
|
229
|
+
`};
|
|
230
|
+
|
|
231
|
+
&:hover,
|
|
232
|
+
&:focus,
|
|
233
|
+
&:focus-within,
|
|
234
|
+
&:focus-visible {
|
|
235
|
+
color: ${buttonColors[thisColourName].hoverBackground};
|
|
236
|
+
background-color: transparent;
|
|
237
|
+
|
|
238
|
+
${buttonType === theme.buttonTypes.SECONDARY && css`
|
|
239
|
+
box-shadow: 0px 0px 0px 2px ${buttonColors[thisColourName].hoverBackground} inset;
|
|
240
|
+
`};
|
|
241
|
+
}
|
|
242
|
+
`)};
|
|
203
243
|
`;
|
|
204
244
|
}
|
|
205
245
|
return style;
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
const colors = {
|
|
12
12
|
|
|
13
|
-
/* CAMPAIGN COLOURS */
|
|
13
|
+
/* RND25 CAMPAIGN COLOURS */
|
|
14
14
|
rnd_25_ruby_red: '#AE001B',
|
|
15
15
|
rnd_25_glitzy_grape: '#A20C51',
|
|
16
16
|
rnd_25_glitzy_blue: '#0F1953',
|
|
@@ -20,6 +20,19 @@ const colors = {
|
|
|
20
20
|
rnd_25_party_blue: '#004EFF',
|
|
21
21
|
rnd_25_party_lilac: '#B07FEA',
|
|
22
22
|
|
|
23
|
+
/* RND26 CAMPAIGN COLOURS */
|
|
24
|
+
rnd_26_dark_purple: '#7953E8',
|
|
25
|
+
rnd_26_deep_indigo: '#341A7E',
|
|
26
|
+
rnd_26_light_purple: '#BA9DFC',
|
|
27
|
+
rnd_26_teal: '#036D7C',
|
|
28
|
+
rnd_26_deep_teal: '#024042',
|
|
29
|
+
rnd_26_green: '#7FFB73',
|
|
30
|
+
rnd_26_magenta: '#A7268C',
|
|
31
|
+
rnd_26_deep_magenta: '#601151',
|
|
32
|
+
rnd_26_yellow: '#F8F440',
|
|
33
|
+
rnd_26_vibrant_pink: '#E948D5',
|
|
34
|
+
rnd_26_light_pink: '#FE80EB',
|
|
35
|
+
|
|
23
36
|
/* GREYSCALE COLOURS */
|
|
24
37
|
black: '#000000',
|
|
25
38
|
white: '#FFFFFF',
|
|
@@ -137,10 +137,9 @@ export default {
|
|
|
137
137
|
lineHeight: '1.375rem'
|
|
138
138
|
}
|
|
139
139
|
},
|
|
140
|
-
// To be used directly (not via fontHelper), but makes sense to keep here:
|
|
141
140
|
button: {
|
|
142
141
|
family: 'Montserrat',
|
|
143
|
-
weight:
|
|
142
|
+
weight: 700,
|
|
144
143
|
transform: 'inherit',
|
|
145
144
|
small: {
|
|
146
145
|
fontSize: '1rem',
|
|
@@ -155,8 +154,8 @@ export default {
|
|
|
155
154
|
lineHeight: '1.375rem'
|
|
156
155
|
}
|
|
157
156
|
},
|
|
158
|
-
// Admittedly, while
|
|
159
|
-
//
|
|
157
|
+
// Admittedly, while these values are identical for each breakpoint,
|
|
158
|
+
// it still made sense to keep it here all here for parity:
|
|
160
159
|
formFieldLabel: {
|
|
161
160
|
family: 'Montserrat',
|
|
162
161
|
weight: 400,
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import color from './colors';
|
|
2
2
|
import buttonColors from './buttonColors';
|
|
3
|
+
import buttonTypes from './buttonTypes';
|
|
4
|
+
|
|
3
5
|
import linkStyles from './linkStyles';
|
|
4
6
|
import fontSize from './fontSizes';
|
|
5
7
|
import allBreakpoints from '../shared/allBreakpoints';
|
|
@@ -10,6 +12,7 @@ import fontFamilies from '../shared/fontFamilies';
|
|
|
10
12
|
export default {
|
|
11
13
|
color,
|
|
12
14
|
buttonColors,
|
|
15
|
+
buttonTypes,
|
|
13
16
|
linkStyles,
|
|
14
17
|
fontSize,
|
|
15
18
|
allBreakpoints,
|