@comicrelief/component-library 8.44.4 → 8.45.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/SocialIcons/Icon/Icon.js +39 -14
- package/dist/components/Atoms/SocialIcons/SocialIcons.js +91 -22
- package/dist/components/Atoms/SocialIcons/Utils/Icons.js +26 -7
- package/dist/components/Atoms/SocialIcons/Utils/Links.js +10 -0
- package/dist/components/Atoms/SocialIcons/__snapshots__/SocialIcons.test.js.snap +63 -48
- package/{src/components/Atoms/SocialIcons/assets → dist/components/Atoms/SocialIcons/assets/circled}/facebook.svg +1 -1
- package/{src/components/Atoms/SocialIcons/assets → dist/components/Atoms/SocialIcons/assets/circled}/twitter.svg +1 -1
- package/dist/components/Atoms/SocialIcons/assets/{youtube.svg → circled/youtube.svg} +1 -1
- package/dist/components/Atoms/SocialIcons/assets/standard/facebook.svg +3 -0
- package/dist/components/Atoms/SocialIcons/assets/standard/instagram.svg +3 -0
- package/dist/components/Atoms/SocialIcons/assets/standard/tiktok.svg +3 -0
- package/dist/components/Atoms/SocialIcons/assets/standard/x.svg +3 -0
- package/dist/components/Atoms/SocialIcons/assets/standard/youtube.svg +3 -0
- package/dist/components/Molecules/EmailSignUp/EmailSignUp.js +38 -0
- package/dist/components/Molecules/EmailSignUp/EmailSignUp.style.js +113 -0
- package/dist/components/Molecules/LogoLinked/LogoLinked.js +6 -6
- package/dist/components/Organisms/Footer/Footer.md +12 -11
- package/dist/components/Organisms/Footer/FundraisingRegulatorLogo/FundraisingRegulatorLogo.js +36 -16
- package/dist/components/Organisms/Footer/Nav/Nav.style.js +8 -8
- package/dist/components/Organisms/Footer/__snapshots__/Footer.test.js.snap +188 -183
- package/dist/components/Organisms/FooterNew/FooterNew.js +136 -0
- package/dist/components/Organisms/FooterNew/FooterNew.md +47 -0
- package/dist/components/Organisms/FooterNew/FooterNew.style.js +312 -0
- package/dist/components/Organisms/FooterNew/FooterNew.test.js +20 -0
- package/dist/components/Organisms/FooterNew/Nav/PrimaryNav.js +32 -0
- package/dist/components/Organisms/FooterNew/Nav/SecondaryNav.js +32 -0
- package/dist/components/Organisms/FooterNew/__snapshots__/FooterNew.test.js.snap +1490 -0
- package/dist/components/Organisms/FooterNew/dev-data/data.js +106 -0
- package/dist/index.js +20 -0
- package/dist/theme/crTheme/colors.js +12 -7
- package/dist/theme/shared/animations.js +46 -0
- package/package.json +1 -1
- package/src/components/Atoms/SocialIcons/Icon/Icon.js +47 -11
- package/src/components/Atoms/SocialIcons/SocialIcons.js +99 -25
- package/src/components/Atoms/SocialIcons/Utils/Icons.js +29 -10
- package/src/components/Atoms/SocialIcons/Utils/Links.js +10 -0
- package/src/components/Atoms/SocialIcons/__snapshots__/SocialIcons.test.js.snap +63 -48
- package/{dist/components/Atoms/SocialIcons/assets → src/components/Atoms/SocialIcons/assets/circled}/facebook.svg +1 -1
- package/{dist/components/Atoms/SocialIcons/assets → src/components/Atoms/SocialIcons/assets/circled}/twitter.svg +1 -1
- package/src/components/Atoms/SocialIcons/assets/{youtube.svg → circled/youtube.svg} +1 -1
- package/src/components/Atoms/SocialIcons/assets/standard/facebook.svg +3 -0
- package/src/components/Atoms/SocialIcons/assets/standard/instagram.svg +3 -0
- package/src/components/Atoms/SocialIcons/assets/standard/tiktok.svg +3 -0
- package/src/components/Atoms/SocialIcons/assets/standard/x.svg +3 -0
- package/src/components/Atoms/SocialIcons/assets/standard/youtube.svg +3 -0
- package/src/components/Molecules/EmailSignUp/EmailSignUp.js +55 -0
- package/src/components/Molecules/EmailSignUp/EmailSignUp.style.js +107 -0
- package/src/components/Molecules/LogoLinked/LogoLinked.js +5 -14
- package/src/components/Organisms/Footer/Footer.md +12 -11
- package/src/components/Organisms/Footer/FundraisingRegulatorLogo/FundraisingRegulatorLogo.js +14 -3
- package/src/components/Organisms/Footer/Nav/Nav.style.js +8 -8
- package/src/components/Organisms/Footer/__snapshots__/Footer.test.js.snap +188 -183
- package/src/components/Organisms/FooterNew/FooterNew.js +211 -0
- package/src/components/Organisms/FooterNew/FooterNew.md +47 -0
- package/src/components/Organisms/FooterNew/FooterNew.style.js +294 -0
- package/src/components/Organisms/FooterNew/FooterNew.test.js +24 -0
- package/src/components/Organisms/FooterNew/Nav/PrimaryNav.js +54 -0
- package/src/components/Organisms/FooterNew/Nav/SecondaryNav.js +54 -0
- package/src/components/Organisms/FooterNew/__snapshots__/FooterNew.test.js.snap +1490 -0
- package/src/components/Organisms/FooterNew/dev-data/data.js +123 -0
- package/src/index.js +2 -0
- package/src/theme/crTheme/colors.js +13 -7
- package/src/theme/shared/animations.js +60 -0
- /package/dist/components/Atoms/SocialIcons/assets/{X-white-Subtract.svg → circled/X-white-Subtract.svg} +0 -0
- /package/dist/components/Atoms/SocialIcons/assets/{instagram.svg → circled/instagram.svg} +0 -0
- /package/src/components/Atoms/SocialIcons/assets/{X-white-Subtract.svg → circled/X-white-Subtract.svg} +0 -0
- /package/src/components/Atoms/SocialIcons/assets/{instagram.svg → circled/instagram.svg} +0 -0
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
export const primaryLinksList = [
|
|
2
|
+
{
|
|
3
|
+
title: 'Contact us',
|
|
4
|
+
path: 'contact-us',
|
|
5
|
+
internal: {
|
|
6
|
+
type: 'ContentfulPageLandingPage'
|
|
7
|
+
}
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
title: 'Update your preferences',
|
|
11
|
+
path: 'https://www.comicrelief.com/update-your-preferences',
|
|
12
|
+
internal: {
|
|
13
|
+
type: 'ContentfulPageLandingPage'
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
title: 'Your Gift Aid',
|
|
18
|
+
path: 'https://giftaid.comicrelief.com/update',
|
|
19
|
+
internal: {
|
|
20
|
+
type: 'ContentfulPageLandingPage'
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
title: 'Reporting complaints and concerns',
|
|
25
|
+
path: 'https://www.comicrelief.com/reporting-complaints',
|
|
26
|
+
internal: {
|
|
27
|
+
type: 'ContentfulPageLandingPage'
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
title: 'FAQs',
|
|
32
|
+
path: 'https://www.comicrelief.com/frequently-asked-questions',
|
|
33
|
+
internal: {
|
|
34
|
+
type: 'ContentfulPageLandingPage'
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
];
|
|
38
|
+
|
|
39
|
+
export const secondaryLinksList = [
|
|
40
|
+
{
|
|
41
|
+
title: 'Terms of use',
|
|
42
|
+
path: 'https://www.comicrelief.com/terms-of-use',
|
|
43
|
+
internal: {
|
|
44
|
+
type: 'ContentfulPageLandingPage'
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
title: 'Privacy notice',
|
|
49
|
+
path: 'https://www.comicrelief.com/privacy-notice',
|
|
50
|
+
internal: {
|
|
51
|
+
type: 'ContentfulPageLandingPage'
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
title: 'Cookies',
|
|
56
|
+
path: 'https://www.comicrelief.com/cookies',
|
|
57
|
+
internal: {
|
|
58
|
+
type: 'ContentfulPageLandingPage'
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
title: 'Text to donate terms',
|
|
63
|
+
path: 'https://www.comicrelief.com/text-to-donate-terms',
|
|
64
|
+
internal: {
|
|
65
|
+
type: 'ContentfulPageLandingPage'
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
title: 'Prize draw terms',
|
|
70
|
+
path: 'https://www.comicrelief.com/prize-draw-terms',
|
|
71
|
+
internal: {
|
|
72
|
+
type: 'ContentfulPageLandingPage'
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
title: 'Modern Slavery and Human Trafficking Statement',
|
|
77
|
+
path: 'https://www.comicrelief.com/modern-slavery-statement',
|
|
78
|
+
internal: {
|
|
79
|
+
type: 'ContentfulPageLandingPage'
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
title: 'Positive Practices',
|
|
84
|
+
path: 'https://www.comicrelief.com/positive-practices',
|
|
85
|
+
internal: {
|
|
86
|
+
type: 'ContentfulPageLandingPage'
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
];
|
|
90
|
+
|
|
91
|
+
export const testPrimaryLinksList = [
|
|
92
|
+
{
|
|
93
|
+
title: 'Contact us',
|
|
94
|
+
path: 'contact-us',
|
|
95
|
+
internal: {
|
|
96
|
+
type: 'ContentfulPageLandingPage'
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
title: 'FAQs',
|
|
101
|
+
path: 'https://www.comicrelief.com/frequently-asked-questions',
|
|
102
|
+
internal: {
|
|
103
|
+
type: 'ContentfulPageLandingPage'
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
];
|
|
107
|
+
|
|
108
|
+
export const testSecondaryLinksList = [
|
|
109
|
+
{
|
|
110
|
+
title: 'Terms of use',
|
|
111
|
+
path: 'https://www.comicrelief.com/terms-of-use',
|
|
112
|
+
internal: {
|
|
113
|
+
type: 'ContentfulPageLandingPage'
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
title: 'Privacy notice',
|
|
118
|
+
path: 'https://www.comicrelief.com/privacy-notice',
|
|
119
|
+
internal: {
|
|
120
|
+
type: 'ContentfulPageLandingPage'
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
];
|
package/src/index.js
CHANGED
|
@@ -9,6 +9,7 @@ export { default as allowListed } from './utils/allowListed';
|
|
|
9
9
|
export { default as spacing } from './theme/shared/spacing';
|
|
10
10
|
export { default as allBreakpoints } from './theme/shared/allBreakpoints';
|
|
11
11
|
export { default as containers } from './theme/shared/containers';
|
|
12
|
+
export { logoRotateAnimation, springScaleAnimation } from './theme/shared/animations';
|
|
12
13
|
|
|
13
14
|
/* Atoms */
|
|
14
15
|
export { default as Text } from './components/Atoms/Text/Text';
|
|
@@ -46,6 +47,7 @@ export { default as Donate } from './components/Organisms/Donate/Donate';
|
|
|
46
47
|
export { default as DoubleCopy } from './components/Molecules/DoubleCopy/DoubleCopy';
|
|
47
48
|
export { default as PartnerLink } from './components/Molecules/PartnerLink/PartnerLink';
|
|
48
49
|
export { default as Footer } from './components/Organisms/Footer/Footer';
|
|
50
|
+
export { default as FooterNew } from './components/Organisms/FooterNew/FooterNew';
|
|
49
51
|
export { default as SearchResult } from './components/Molecules/SearchResult/SearchResult';
|
|
50
52
|
export { default as SearchInput } from './components/Molecules/SearchInput/SearchInput';
|
|
51
53
|
export { default as ShareButton } from './components/Molecules/ShareButton/ShareButton';
|
|
@@ -30,17 +30,23 @@ const colors = {
|
|
|
30
30
|
grey_extra_light: '#f0f0f0',
|
|
31
31
|
grey_for_forms: '#666',
|
|
32
32
|
grey_label: '#5C5C5E',
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
|
|
34
|
+
grey_1: '#FFFFFF',
|
|
35
35
|
grey_light: '#F4F3F5',
|
|
36
|
-
// grey_2
|
|
37
36
|
grey_medium: '#E1E2E3',
|
|
38
|
-
|
|
37
|
+
grey_2: '#E1E2E3',
|
|
38
|
+
// TODO: 'grey' is actually 'grey_3'. It is referenced in many places.
|
|
39
|
+
// We need to rename it to 'grey_3' across all references.
|
|
40
|
+
// Until then, we need to keep both names for backwards compatibility.
|
|
41
|
+
// Same story with 'grey_medium' - it should be grey_2, and
|
|
42
|
+
// grey_dark, should be grey_4.
|
|
43
|
+
// For the time being we need both of each. I will provision a separate PR.
|
|
39
44
|
grey: '#969598',
|
|
40
|
-
|
|
41
|
-
grey_4: '#6E6E6E',
|
|
42
|
-
// grey_5
|
|
45
|
+
grey_3: '#969598',
|
|
43
46
|
grey_dark: '#222222',
|
|
47
|
+
grey_4: '#222222',
|
|
48
|
+
grey_4_hover: '#3A3A3A',
|
|
49
|
+
grey_5: '#18181A',
|
|
44
50
|
|
|
45
51
|
/* GENERAL COLOURS */
|
|
46
52
|
blue: '#0565D1',
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { css } from 'styled-components';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Logo rotation animation on hover
|
|
5
|
+
* Applies a rotation transition that rotates the logo (or whatever else)
|
|
6
|
+
* -14deg on hover/focus
|
|
7
|
+
* @param {boolean} animateRotate - Whether to enable the rotation animation
|
|
8
|
+
* @returns {css} template literal for the animation
|
|
9
|
+
*/
|
|
10
|
+
const logoRotateAnimation = animateRotate => {
|
|
11
|
+
if (!animateRotate) {
|
|
12
|
+
return css``;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
return css`
|
|
16
|
+
img {
|
|
17
|
+
transition: transform 0.6s cubic-bezier(0.41, 1.64, 0.41, 0.8);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
&:hover,
|
|
21
|
+
&:focus {
|
|
22
|
+
img {
|
|
23
|
+
transform: rotate(-14deg);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
`;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Spring scale animation on hover
|
|
31
|
+
* Applies a smooth spring-like scale transition that expands the element on hover/focus
|
|
32
|
+
* @param {boolean} animateScale - Whether to enable the scale animation
|
|
33
|
+
* @param {number} scaleFactor - Scale factor to apply on hover (default 8%)
|
|
34
|
+
* @param {number} bounceIntensity - Intensity of the springy bounce effect (0-3, default: 1)
|
|
35
|
+
* @returns {css} template literal for the animation
|
|
36
|
+
*/
|
|
37
|
+
const springScaleAnimation = (animateScale, scaleFactor = 1.08, bounceIntensity = 1) => {
|
|
38
|
+
if (!animateScale) {
|
|
39
|
+
return css``;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// More negative pull-back and higher overshoot = more bounce
|
|
43
|
+
// Default intensity (1) gives: cubic-bezier(0.68, -0.85, 0.265, 1.95)
|
|
44
|
+
// Higher intensity = more pronounced bounce effect
|
|
45
|
+
const pullBack = -0.55 - (bounceIntensity * 0.3);
|
|
46
|
+
const overshoot = 1.55 + (bounceIntensity * 0.4);
|
|
47
|
+
const duration = 0.2 + (bounceIntensity * 0.1);
|
|
48
|
+
|
|
49
|
+
return css`
|
|
50
|
+
transition: transform ${duration}s cubic-bezier(0.68, ${pullBack}, 0.265, ${overshoot});
|
|
51
|
+
transform-origin: center;
|
|
52
|
+
|
|
53
|
+
&:hover,
|
|
54
|
+
&:focus {
|
|
55
|
+
transform: scale(${scaleFactor});
|
|
56
|
+
}
|
|
57
|
+
`;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export { logoRotateAnimation, springScaleAnimation };
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|