@comicrelief/component-library 7.16.0 → 7.18.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.
Files changed (30) hide show
  1. package/cypress/integration/components/Organisms/Header.spec.js +134 -135
  2. package/dist/components/Atoms/Input/Input.js +1 -1
  3. package/dist/components/Atoms/Logo/Logo.js +6 -1
  4. package/dist/components/Atoms/Logo/assets/CR_LOGO_PRIDE_KEY_RGB.svg +79 -0
  5. package/dist/components/Atoms/Logo/assets/cr-pride-logo.svg +34 -0
  6. package/dist/components/Atoms/TextInputWithDropdown/TextInputWithDropdown.js +3 -5
  7. package/dist/components/Molecules/Logos/Logos.js +10 -0
  8. package/dist/components/Organisms/Donate/Donate.js +3 -2
  9. package/dist/components/Organisms/Donate/Form/Form.js +2 -1
  10. package/dist/components/Organisms/Donate/GivingSelector/GivingSelector.js +0 -2
  11. package/dist/components/Organisms/Donate/__snapshots__/Donate.test.js.snap +0 -4
  12. package/dist/components/Organisms/EmailSignUp/__snapshots__/EmailSignUp.test.js.snap +1 -1
  13. package/dist/components/Organisms/Footer/__snapshots__/Footer.test.js.snap +1 -1
  14. package/dist/components/Organisms/Header/Header.md +19 -0
  15. package/dist/components/Organisms/MarketingPreferencesDS/_MarketingPreferencesDS.js +10 -0
  16. package/package.json +15 -15
  17. package/src/components/Atoms/Input/Input.js +2 -2
  18. package/src/components/Atoms/Logo/Logo.js +4 -1
  19. package/src/components/Atoms/Logo/assets/CR_LOGO_PRIDE_KEY_RGB.svg +79 -0
  20. package/src/components/Atoms/Logo/assets/cr-pride-logo.svg +34 -0
  21. package/src/components/Atoms/TextInputWithDropdown/TextInputWithDropdown.js +1 -4
  22. package/src/components/Molecules/Logos/Logos.js +8 -0
  23. package/src/components/Organisms/Donate/Donate.js +7 -3
  24. package/src/components/Organisms/Donate/Form/Form.js +3 -2
  25. package/src/components/Organisms/Donate/GivingSelector/GivingSelector.js +0 -2
  26. package/src/components/Organisms/Donate/__snapshots__/Donate.test.js.snap +0 -4
  27. package/src/components/Organisms/EmailSignUp/__snapshots__/EmailSignUp.test.js.snap +1 -1
  28. package/src/components/Organisms/Footer/__snapshots__/Footer.test.js.snap +1 -1
  29. package/src/components/Organisms/Header/Header.md +19 -0
  30. package/src/components/Organisms/MarketingPreferencesDS/_MarketingPreferencesDS.js +10 -0
@@ -1,144 +1,143 @@
1
1
  describe('Header component', () => {
2
- before(() => {
3
- // go to header component
4
- cy.visit('/#header');
2
+ before(() => {
3
+ // go to header component
4
+ cy.visit('/#header');
5
+ });
6
+
7
+ describe('props and methods section', () => {
8
+ beforeEach(() => {
9
+ cy.get('[data-testid="Header-container"] button[name="rsg-usage"]')
10
+ .contains('Props & methods')
11
+ .as('propsBtn');
12
+
13
+ cy.get('@propsBtn')
14
+ .closest('[class^=rsg--tabs]')
15
+ .as('container');
5
16
  });
6
17
 
7
- describe('props and methods section', () => {
8
- beforeEach(() => {
9
- cy.get('[data-testid="Header-container"] button[name="rsg-usage"]')
10
- .contains('Props & methods')
11
- .as('propsBtn');
12
-
13
- cy.get('@propsBtn')
14
- .closest('[class^=rsg--tabs]')
15
- .as('container');
16
- });
17
-
18
- it('is present', () => {
19
- cy.get('@propsBtn').should('exist');
20
- });
21
-
22
- it('does not show table initially', () => {
23
- cy.get('@container')
24
- .find('table')
25
- .should('not.exist');
26
- });
27
-
28
- it('shows the table on button click', () => {
29
- cy.get('@propsBtn').click();
30
- cy.get('@container')
31
- .find('table')
32
- .should('contain', 'Prop name');
33
- });
18
+ it('is present', () => {
19
+ cy.get('@propsBtn').should('exist');
34
20
  });
35
21
 
36
- describe('CR Header section', () => {
37
- beforeEach(() => {
38
- cy.get('[data-testid="Header-example-1"]')
39
- .as('container')
40
- .find('[data-preview="Header"]')
41
- .as('preview');
42
-
43
- cy.get('@container')
44
- .find('button')
45
- .contains('View Code')
46
- .as('viewCodeBtn');
47
- });
48
-
49
- it('renders header preview', () => {
50
- //Logo
51
- cy.get('@container')
52
- .find('[title="Go to Comic Relief homepage"]')
53
- .should('exist');
54
-
55
- //fundraising
56
- cy.viewport('macbook-15');
57
- cy.reload();
58
- cy.get('@container')
59
- .find('nav > ul > li:nth-child(1) a')
60
- .should('have.attr', 'href', 'https://www.comicrelief.com/fundraising/pay-in-your-money');
61
-
62
-
63
- //Donate
64
- cy.get('@container')
65
- .find('header[role="banner"] a[href="/donation"]')
66
- .should('exist')
67
- .contains('Donate');
68
- });
69
-
70
- it('has view code button', () => {
71
- cy.get('@viewCodeBtn').should('exist');
72
- });
73
-
74
- it('shows code on click', () => {
75
- cy.get('@viewCodeBtn').click();
76
- cy.get('@container')
77
- .find('textarea')
78
- .should('exist');
79
- });
80
-
81
- it('closes code on click', () => {
82
- cy.get('@viewCodeBtn').click();
83
- });
22
+ it('does not show table initially', () => {
23
+ cy.get('@container')
24
+ .find('table')
25
+ .should('not.exist');
84
26
  });
85
27
 
86
- describe('CR Header with search and ESU section', () => {
87
- beforeEach(() => {
88
- cy.get('[data-testid="Header-example-5"]')
89
- .as('container')
90
- .find('[data-preview="Header"]')
91
- .as('preview');
92
-
93
- cy.get('@container')
94
- .find('button')
95
- .contains('View Code')
96
- .as('viewCodeBtn');
97
- });
98
-
99
- it('renders CR Header with search and ESU preview', () => {
100
- //Logo
101
- cy.get('@container')
102
- .find('[title="Go to Comic Relief homepage"]')
103
- .should('exist');
104
-
105
- //fundraising
106
- cy.viewport('iphone-6');
107
- cy.reload();
108
- cy.get('@container')
109
- .find('nav > ul > li:nth-child(1) a')
110
- .should('have.attr', 'href', '#');
111
-
112
- //Donate
113
- cy.get('@container')
114
- .find('header[role="banner"] a[href="/donation"]')
115
- .should('exist')
116
- .contains('Donate');
117
-
118
- //search
119
- cy.get('@container')
120
- .find('header[role="banner"] a[href="/search"]')
121
- .should('exist');
122
-
123
- //search
124
- cy.get('@container')
125
- .find('[data-test="header-esu-icon"]')
126
- .should('exist');
127
- });
128
-
129
- it('has view code button', () => {
130
- cy.get('@viewCodeBtn').should('exist');
131
- });
132
-
133
- it('shows code on click', () => {
134
- cy.get('@viewCodeBtn').click();
135
- cy.get('@container')
136
- .find('textarea')
137
- .should('exist');
138
- });
139
-
140
- it('closes code on click', () => {
141
- cy.get('@viewCodeBtn').click();
142
- });
28
+ it('shows the table on button click', () => {
29
+ cy.get('@propsBtn').click();
30
+ cy.get('@container')
31
+ .find('table')
32
+ .should('contain', 'Prop name');
143
33
  });
34
+ });
35
+
36
+ describe('CR Header section', () => {
37
+ beforeEach(() => {
38
+ cy.get('[data-testid="Header-example-1"]')
39
+ .as('container')
40
+ .find('[data-preview="Header"]')
41
+ .as('preview');
42
+
43
+ cy.get('@container')
44
+ .find('button')
45
+ .contains('View Code')
46
+ .as('viewCodeBtn');
47
+ });
48
+
49
+ it('renders header preview', () => {
50
+ // Logo
51
+ cy.get('@container')
52
+ .find('[title="Go to Comic Relief homepage"]')
53
+ .should('exist');
54
+
55
+ // fundraising
56
+ cy.viewport('macbook-15');
57
+ cy.reload();
58
+ cy.get('@container')
59
+ .find('nav > ul > li:nth-child(1) a')
60
+ .should('have.attr', 'href', 'https://www.comicrelief.com/fundraising/pay-in-your-money');
61
+
62
+ // Donate
63
+ cy.get('@container')
64
+ .find('header[role="banner"] a[href="/donation"]')
65
+ .should('exist')
66
+ .contains('Donate');
67
+ });
68
+
69
+ it('has view code button', () => {
70
+ cy.get('@viewCodeBtn').should('exist');
71
+ });
72
+
73
+ it('shows code on click', () => {
74
+ cy.get('@viewCodeBtn').click();
75
+ cy.get('@container')
76
+ .find('textarea')
77
+ .should('exist');
78
+ });
79
+
80
+ it('closes code on click', () => {
81
+ cy.get('@viewCodeBtn').click();
82
+ });
83
+ });
84
+
85
+ describe('CR Header with search and ESU section', () => {
86
+ beforeEach(() => {
87
+ cy.get('[data-testid="Header-example-7"]')
88
+ .as('container')
89
+ .find('[data-preview="Header"]')
90
+ .as('preview');
91
+
92
+ cy.get('@container')
93
+ .find('button')
94
+ .contains('View Code')
95
+ .as('viewCodeBtn');
96
+ });
97
+
98
+ it('renders CR Header with search and ESU preview', () => {
99
+ // Logo
100
+ cy.get('@container')
101
+ .find('[title="Go to Comic Relief homepage"]')
102
+ .should('exist');
103
+
104
+ // fundraising
105
+ cy.viewport('iphone-6');
106
+ cy.reload();
107
+ cy.get('@container')
108
+ .find('nav > ul > li:nth-child(1) a')
109
+ .should('have.attr', 'href', '#');
110
+
111
+ // Donate
112
+ cy.get('@container')
113
+ .find('header[role="banner"] a[href="/donation"]')
114
+ .should('exist')
115
+ .contains('Donate');
116
+
117
+ // search
118
+ cy.get('@container')
119
+ .find('header[role="banner"] a[href="/search"]')
120
+ .should('exist');
121
+
122
+ // search
123
+ cy.get('@container')
124
+ .find('[data-test="header-esu-icon"]')
125
+ .should('exist');
126
+ });
127
+
128
+ it('has view code button', () => {
129
+ cy.get('@viewCodeBtn').should('exist');
130
+ });
131
+
132
+ it('shows code on click', () => {
133
+ cy.get('@viewCodeBtn').click();
134
+ cy.get('@container')
135
+ .find('textarea')
136
+ .should('exist');
137
+ });
138
+
139
+ it('closes code on click', () => {
140
+ cy.get('@viewCodeBtn').click();
141
+ });
142
+ });
144
143
  });
@@ -114,7 +114,7 @@ Input.propTypes = {
114
114
 
115
115
  /** text, email, number, date, search, tel, url, password */
116
116
  type: _propTypes.default.string.isRequired,
117
- labelProps: _propTypes.default.objectOf(_propTypes.default.any),
117
+ labelProps: _propTypes.default.objectOf(_propTypes.default.string),
118
118
  // className is needed so that styled(`Input`) will work
119
119
  // (as `rest` is not spread on the outermost component)
120
120
  className: _propTypes.default.string,
@@ -21,6 +21,8 @@ var _srLogo = _interopRequireDefault(require("./assets/sr-logo.svg"));
21
21
 
22
22
  var _srGameonLogo = _interopRequireDefault(require("./assets/sr-gameon-logo.svg"));
23
23
 
24
+ var _CR_LOGO_PRIDE_KEY_RGB = _interopRequireDefault(require("./assets/CR_LOGO_PRIDE_KEY_RGB.svg"));
25
+
24
26
  var Image = _styledComponents.default.img.withConfig({
25
27
  displayName: "Logo__Image",
26
28
  componentId: "sc-18yiye8-0"
@@ -52,6 +54,9 @@ var themeSwitcher = function themeSwitcher(theme) {
52
54
  case 'Sport Relief Gameon':
53
55
  return _srGameonLogo.default;
54
56
 
57
+ case 'Pride':
58
+ return _CR_LOGO_PRIDE_KEY_RGB.default;
59
+
55
60
  default:
56
61
  return _crLogo.default;
57
62
  }
@@ -68,7 +73,7 @@ var Logo = function Logo(_ref2) {
68
73
  sizeMd: sizeMd
69
74
  }, /*#__PURE__*/_react.default.createElement(Image, {
70
75
  src: themeSwitcher(campaign),
71
- alt: campaign === 'Comic Relief' ? 'Comic Relief logo' : 'Sport Relief logo'
76
+ alt: campaign === 'Comic Relief' || campaign === 'Pride' ? 'Comic Relief logo' : 'Sport Relief logo'
72
77
  }));
73
78
  };
74
79
 
@@ -0,0 +1,79 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- Generator: Adobe Illustrator 26.3.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <svg version="1.1" id="Logo_Keyline" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px"
4
+ y="0px" viewBox="0 0 500 500" style="enable-background:new 0 0 500 500;" xml:space="preserve">
5
+ <style type="text/css">
6
+ .st0{filter:url(#Adobe_OpacityMaskFilter);}
7
+ .st1{fill:#FFFFFF;}
8
+ .st2{mask:url(#SVGID_1_);}
9
+ .st3{fill:#E52631;}
10
+ .st4{fill:#FF9144;}
11
+ .st5{fill:#FFE400;}
12
+ .st6{fill:#00C100;}
13
+ .st7{fill:#001B9E;}
14
+ .st8{fill:#82008D;}
15
+ .st9{fill:#010101;}
16
+ .st10{fill:#673608;}
17
+ .st11{fill:#49D9EF;}
18
+ .st12{fill:#FFABC7;}
19
+ .st13{fill:#FCF7F4;}
20
+ </style>
21
+ <defs>
22
+ <filter id="Adobe_OpacityMaskFilter" filterUnits="userSpaceOnUse" x="-246.25" y="-7.5" width="738.91" height="735.56">
23
+ <feColorMatrix type="matrix" values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"/>
24
+ </filter>
25
+ </defs>
26
+ <mask maskUnits="userSpaceOnUse" x="-246.25" y="-7.5" width="738.91" height="735.56" id="SVGID_1_">
27
+ <g class="st0">
28
+ <rect x="13.07" y="16.74" class="st1" width="473.86" height="473.86"/>
29
+ <path id="Path" class="st1" d="M467.67,492.21l-435.34,0c-13.53,0-24.54-11.01-24.54-24.54l0-435.34
30
+ c0-13.53,11.01-24.54,24.54-24.55l435.34,0c13.53,0,24.54,11.01,24.54,24.55l0,435.34C492.21,481.2,481.2,492.21,467.67,492.21"/>
31
+ </g>
32
+ </mask>
33
+ <g class="st2">
34
+ <rect x="13.07" y="6.74" class="st3" width="478.3" height="78.98"/>
35
+ <rect x="13.07" y="85.71" class="st4" width="478.3" height="78.98"/>
36
+ <rect x="13.07" y="164.69" class="st5" width="478.3" height="78.98"/>
37
+ <rect x="13.07" y="243.67" class="st6" width="478.3" height="78.98"/>
38
+ <rect x="13.07" y="322.65" class="st7" width="478.3" height="78.98"/>
39
+ <rect x="13.07" y="401.62" class="st8" width="478.3" height="78.98"/>
40
+
41
+ <rect x="-126.71" y="226.55" transform="matrix(0.7119 0.7023 -0.7023 0.7119 247.1254 -79.8056)" class="st9" width="695.08" height="69.51"/>
42
+
43
+ <rect x="-175.52" y="276.04" transform="matrix(0.7119 0.7023 -0.7023 0.7119 267.8141 -31.2694)" class="st10" width="695.08" height="69.51"/>
44
+
45
+ <rect x="-224.34" y="325.52" transform="matrix(0.7119 0.7023 -0.7023 0.7119 288.5028 17.2668)" class="st11" width="695.08" height="69.51"/>
46
+
47
+ <rect x="-273.15" y="375" transform="matrix(0.7119 0.7023 -0.7023 0.7119 309.1915 65.8031)" class="st12" width="695.08" height="69.51"/>
48
+
49
+ <rect x="-321.96" y="424.49" transform="matrix(0.7119 0.7023 -0.7023 0.7119 329.8802 114.3393)" class="st13" width="695.08" height="69.51"/>
50
+ </g>
51
+ <path id="Keyline" class="st1" d="M467.67,497.5H32.33c-7.96,0-15.44-3.11-21.08-8.74c-5.64-5.64-8.74-13.13-8.74-21.09l0-435.34
52
+ c0-7.96,3.11-15.44,8.74-21.08C16.88,5.6,24.37,2.5,32.33,2.5l435.34,0c16.45,0,29.83,13.38,29.83,29.83l0,435.34
53
+ C497.5,484.12,484.12,497.5,467.67,497.5z M467.67,13.06l-435.34,0c-5.13,0-9.97,2.01-13.61,5.65c-3.64,3.64-5.65,8.48-5.65,13.61
54
+ l0,435.34c0,5.14,2.01,9.97,5.65,13.61c3.64,3.64,8.48,5.65,13.61,5.65h435.34c10.62,0,19.26-8.64,19.26-19.26l0-435.34
55
+ C486.93,21.71,478.29,13.07,467.67,13.06z"/>
56
+ <g id="COMIC_RELIEF_-_optical_tweak_1_">
57
+ <path class="st1" d="M94.57,207.4c0,10.32,1.29,16.95,9.21,16.95s9.21-6.63,9.21-16.95v-12.53h26.34v5.34
58
+ c0,27.08-8.66,46.05-35,46.05c-27.08,0-37.58-18.24-37.58-51.58v-15.84c0-33.34,10.5-51.58,37.58-51.58c26.34,0,35,18.97,35,46.05
59
+ v5.34h-26.34v-12.53c0-10.32-1.29-16.95-9.21-16.95s-9.21,6.63-9.21,16.95V207.4z"/>
60
+ <path class="st1" d="M219.57,193.95c0,33.34-10.5,52.31-37.58,52.31c-27.08,0-37.58-18.97-37.58-52.31v-14.37
61
+ c0-33.34,10.5-52.31,37.58-52.31c27.08,0,37.58,18.97,37.58,52.31V193.95z M172.41,207.03c0,10.32,1.66,17.32,9.58,17.32
62
+ c7.92,0,9.58-7,9.58-17.32v-40.53c0-10.32-1.66-17.32-9.58-17.32c-7.92,0-9.58,7-9.58,17.32V207.03z"/>
63
+ <path class="st1" d="M272.34,187.69h0.74l11.05-58.95h34.08v116.05h-25.05v-66.13h-0.74l-12.71,66.13h-16.95l-13.08-66.13h-0.74
64
+ v66.13h-23.76V128.75H260L272.34,187.69z"/>
65
+ <path class="st1" d="M353.84,128.75v116.05h-27.08V128.75H353.84z"/>
66
+ <path class="st1" d="M388.3,207.4c0,10.32,1.29,16.95,9.21,16.95c7.92,0,9.21-6.63,9.21-16.95v-12.53h26.34v5.34
67
+ c0,27.08-8.66,46.05-35,46.05c-27.08,0-37.58-18.24-37.58-51.58v-15.84c0-33.34,10.5-51.58,37.58-51.58c26.34,0,35,18.97,35,46.05
68
+ v5.34h-26.34v-12.53c0-10.32-1.29-16.95-9.21-16.95c-7.92,0-9.21,6.63-9.21,16.95V207.4z"/>
69
+ <path class="st1" d="M113.17,371.28c-1.47-4.42-1.84-11.24-2.58-25.24c-0.55-11.05-3.32-16.76-11.79-16.76h-3.5v42H68.6V255.23
70
+ h33.34c25.97,0,37.58,13.63,37.58,34.26c0,18.24-8.29,27.26-20.08,29.29c12.16,2.76,16.21,11.42,17.13,25.97
71
+ c0.92,15.29,0.74,21.18,3.32,26.53H113.17z M97.88,307.91c10.87,0,15.1-3.5,15.1-15.29c0-10.5-4.24-15.66-15.1-15.66h-2.58v30.95
72
+ H97.88z"/>
73
+ <path class="st1" d="M204.45,371.28h-58.76V255.23h58.76v22.29h-32.24v23.76h23.95v22.11h-23.95v25.6h32.24V371.28z"/>
74
+ <path class="st1" d="M237.82,255.23v93.76h31.31v22.29h-58.39V255.23H237.82z"/>
75
+ <path class="st1" d="M301.28,255.23v116.05H274.2V255.23H301.28z"/>
76
+ <path class="st1" d="M368.39,371.28h-58.76V255.23h58.76v22.29h-32.24v23.76h23.95v22.11h-23.95v25.6h32.24V371.28z"/>
77
+ <path class="st1" d="M374.68,371.28V255.23h56.55v22.29h-29.47v26.89h21.55v21.92h-21.55v44.95H374.68z"/>
78
+ </g>
79
+ </svg>
@@ -0,0 +1,34 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- Generator: Adobe Illustrator 23.0.3, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
4
+ viewBox="0 0 495 495" style="enable-background:new 0 0 495 495;" xml:space="preserve">
5
+ <style type="text/css">
6
+ .st0{fill:#E52631;}
7
+ .st1{fill:#FFFFFF;}
8
+ </style>
9
+ <path class="st0" d="M473.72,495.5H22.28c-11.98,0-21.78-9.8-21.78-21.78V22.28C0.5,10.3,10.3,0.5,22.28,0.5h451.44
10
+ c11.98,0,21.78,9.8,21.78,21.78v451.44C495.5,485.69,485.7,495.5,473.72,495.5z"/>
11
+ <g id="COMIC_RELIEF_-_optical_tweak">
12
+ <path class="st1" d="M85.69,203.52c0,10.77,1.35,17.7,9.62,17.7s9.62-6.92,9.62-17.7v-13.08h27.5v5.58
13
+ c0,28.27-9.04,48.08-36.54,48.08c-28.27,0-39.24-19.04-39.24-53.85v-16.54c0-34.81,10.96-53.85,39.24-53.85
14
+ c27.5,0,36.54,19.81,36.54,48.08v5.58h-27.5v-13.08c0-10.77-1.35-17.7-9.62-17.7s-9.62,6.92-9.62,17.7V203.52z"/>
15
+ <path class="st1" d="M216.21,189.48c0,34.81-10.96,54.62-39.24,54.62c-28.27,0-39.24-19.81-39.24-54.62v-15
16
+ c0-34.81,10.96-54.62,39.24-54.62c28.27,0,39.24,19.81,39.24,54.62V189.48z M166.97,203.13c0,10.77,1.73,18.08,10,18.08
17
+ s10-7.31,10-18.08v-42.31c0-10.77-1.73-18.08-10-18.08s-10,7.31-10,18.08V203.13z"/>
18
+ <path class="st1" d="M271.32,182.94h0.77l11.54-61.55h35.58v121.17h-26.16v-69.05h-0.77l-13.27,69.05h-17.7l-13.66-69.05h-0.77
19
+ v69.05h-24.81V121.39h36.35L271.32,182.94z"/>
20
+ <path class="st1" d="M356.41,121.39v121.17h-28.27V121.39H356.41z"/>
21
+ <path class="st1" d="M392.39,203.52c0,10.77,1.35,17.7,9.62,17.7c8.27,0,9.62-6.92,9.62-17.7v-13.08h27.5v5.58
22
+ c0,28.27-9.04,48.08-36.54,48.08c-28.27,0-39.24-19.04-39.24-53.85v-16.54c0-34.81,10.96-53.85,39.24-53.85
23
+ c27.5,0,36.54,19.81,36.54,48.08v5.58h-27.5v-13.08c0-10.77-1.35-17.7-9.62-17.7c-8.27,0-9.62,6.92-9.62,17.7V203.52z"/>
24
+ <path class="st1" d="M105.12,374.63c-1.54-4.62-1.92-11.73-2.69-26.35c-0.58-11.54-3.46-17.5-12.31-17.5h-3.65v43.85H58.57V253.46
25
+ h34.81c27.12,0,39.24,14.23,39.24,35.77c0,19.04-8.66,28.47-20.97,30.58c12.69,2.88,16.93,11.92,17.89,27.12
26
+ c0.96,15.96,0.77,22.12,3.46,27.7H105.12z M89.16,308.46c11.35,0,15.77-3.65,15.77-15.96c0-10.96-4.42-16.35-15.77-16.35h-2.69
27
+ v32.31H89.16z"/>
28
+ <path class="st1" d="M200.42,374.63h-61.36V253.46h61.36v23.27h-33.66v24.81h25v23.08h-25v26.74h33.66V374.63z"/>
29
+ <path class="st1" d="M235.27,253.46v97.9h32.7v23.27H207V253.46H235.27z"/>
30
+ <path class="st1" d="M301.53,253.46v121.17h-28.27V253.46H301.53z"/>
31
+ <path class="st1" d="M371.6,374.63h-61.36V253.46h61.36v23.27h-33.66v24.81h25v23.08h-25v26.74h33.66V374.63z"/>
32
+ <path class="st1" d="M378.18,374.63V253.46h59.05v23.27h-30.77v28.08h22.5v22.89h-22.5v46.93H378.18z"/>
33
+ </g>
34
+ </svg>
@@ -21,7 +21,7 @@ var _Text = _interopRequireDefault(require("../Text/Text"));
21
21
 
22
22
  var _TextInputWithDropdown = require("./TextInputWithDropdown.style");
23
23
 
24
- var _excluded = ["value", "options", "onChange", "onSelect", "id", "name", "label", "dropdownInstruction", "className"],
24
+ var _excluded = ["options", "onChange", "onSelect", "id", "name", "label", "dropdownInstruction", "className"],
25
25
  _excluded2 = ["options", "dropdownInstruction", "onSelect", "activeOption", "resetActiveOption"];
26
26
 
27
27
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
@@ -37,14 +37,13 @@ var KEY_CODE_ESCAPE = 27;
37
37
  * This component deals with the visual aspect of a text input with typeahead-style functionality
38
38
  *
39
39
  * API querying and state management (aside from that related to keyboard usage/accessibility) are
40
- * handled by the parent component (via the value, options, onChange and onSelect props)
40
+ * handled by the parent component (options, onChange and onSelect props)
41
41
  *
42
42
  * See the Typeahead and SchoolLookup molecules for the full implementation
43
43
  */
44
44
 
45
45
  var TextInputWithDropdown = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
46
- var value = _ref.value,
47
- options = _ref.options,
46
+ var options = _ref.options,
48
47
  onChange = _ref.onChange,
49
48
  onSelect = _ref.onSelect,
50
49
  id = _ref.id,
@@ -97,7 +96,6 @@ var TextInputWithDropdown = /*#__PURE__*/_react.default.forwardRef(function (_re
97
96
  };
98
97
 
99
98
  var inputProps = (0, _objectSpread2.default)({
100
- value: value,
101
99
  onChange: onChange,
102
100
  id: id,
103
101
  name: name,
@@ -43,6 +43,16 @@ var Logos = function Logos(_ref) {
43
43
  }));
44
44
  }
45
45
 
46
+ if (campaign === 'Pride') {
47
+ return /*#__PURE__*/_react.default.createElement("a", {
48
+ href: "/",
49
+ title: "Go to Comic Relief homepage"
50
+ }, /*#__PURE__*/_react.default.createElement(_Logo.default, {
51
+ rotate: false,
52
+ campaign: "Pride"
53
+ }));
54
+ }
55
+
46
56
  return /*#__PURE__*/_react.default.createElement("a", {
47
57
  href: "/",
48
58
  title: "Go to Comic Relief homepage"
@@ -98,7 +98,7 @@ var Donate = function Donate(_ref) {
98
98
  "aria-live": "polite"
99
99
  }, /*#__PURE__*/_react.default.createElement(_Donate.Header, {
100
100
  formAlignRight: formAlignRight
101
- }, /*#__PURE__*/_react.default.createElement(_Donate.HeaderInner, null, subtitle && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_Text.default, {
101
+ }, /*#__PURE__*/_react.default.createElement(_Donate.HeaderInner, null, Boolean(subtitle) && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, Boolean(title) && /*#__PURE__*/_react.default.createElement(_Text.default, {
102
102
  tag: "h2",
103
103
  color: textColor,
104
104
  size: "big",
@@ -146,7 +146,8 @@ Donate.defaultProps = {
146
146
  PopUpText: 'Help us deliver long-term impact by converting your single donation into a monthly gift.',
147
147
  chooseAmountText: '',
148
148
  isDesktopOverride: null,
149
- otherAmountValue: null
149
+ otherAmountValue: null,
150
+ title: null
150
151
  };
151
152
  var _default = Donate;
152
153
  exports.default = _default;
@@ -252,7 +252,8 @@ var Signup = function Signup(_ref) {
252
252
 
253
253
  Signup.defaultProps = {
254
254
  noMoneyBuys: false,
255
- data: {}
255
+ data: {},
256
+ otherAmountValue: null
256
257
  };
257
258
  var _default = Signup;
258
259
  exports.default = _default;
@@ -32,7 +32,6 @@ var GivingSelector = function GivingSelector(_ref) {
32
32
  value: "Single",
33
33
  type: "radio",
34
34
  label: "",
35
- errormsg: "",
36
35
  checked: givingType === 'single',
37
36
  onClick: function onClick() {
38
37
  return handleGivingTypeChange('single', givingType);
@@ -47,7 +46,6 @@ var GivingSelector = function GivingSelector(_ref) {
47
46
  value: "Monthly",
48
47
  type: "radio",
49
48
  label: "",
50
- errormsg: "",
51
49
  checked: givingType === 'monthly',
52
50
  onClick: function onClick() {
53
51
  return handleGivingTypeChange('monthly', givingType);
@@ -543,7 +543,6 @@ exports[`"Single Giving, No Money Buys, with overridden manual input value" rend
543
543
  aria-label="Single"
544
544
  checked={true}
545
545
  className="give-once"
546
- errormsg=""
547
546
  id="give-once--mship-4"
548
547
  label=""
549
548
  onClick={[Function]}
@@ -560,7 +559,6 @@ exports[`"Single Giving, No Money Buys, with overridden manual input value" rend
560
559
  aria-label="Monthly"
561
560
  checked={false}
562
561
  className="give-monthly"
563
- errormsg=""
564
562
  id="give-monthly--mship-4"
565
563
  label=""
566
564
  onClick={[Function]}
@@ -1286,7 +1284,6 @@ exports[`Monthly donation renders correctly 1`] = `
1286
1284
  aria-label="Single"
1287
1285
  checked={true}
1288
1286
  className="give-once"
1289
- errormsg=""
1290
1287
  id="give-once--mship-1"
1291
1288
  label=""
1292
1289
  onClick={[Function]}
@@ -1303,7 +1300,6 @@ exports[`Monthly donation renders correctly 1`] = `
1303
1300
  aria-label="Monthly"
1304
1301
  checked={false}
1305
1302
  className="give-monthly"
1306
- errormsg=""
1307
1303
  id="give-monthly--mship-1"
1308
1304
  label=""
1309
1305
  onClick={[Function]}
@@ -397,7 +397,7 @@ exports[`renders correctly 1`] = `
397
397
  Subscribe
398
398
  </span>
399
399
  <div
400
- className="ButtonWithStates__LoaderContainer-sc-7gb81g-1"
400
+ className=""
401
401
  />
402
402
  </button>
403
403
  </div>
@@ -563,7 +563,7 @@ exports[`renders correctly 1`] = `
563
563
  className="c2"
564
564
  >
565
565
  <div
566
- className="Footerstyle__SocialIconWrapper-sc-167xaf5-7"
566
+ className=""
567
567
  >
568
568
  <ul
569
569
  className="c3"
@@ -36,6 +36,25 @@ import Link from '../../Atoms/Link/Link';
36
36
  />;
37
37
  ```
38
38
 
39
+ # Pride header
40
+
41
+ ```js
42
+ import data from './data/data';
43
+ import Link from '../../Atoms/Link/Link';
44
+
45
+ <Header
46
+ navItems={data}
47
+ campaign="Pride"
48
+ metaIcons={
49
+ <>
50
+ <Link color="green" type="button" href="/donation">
51
+ Donate
52
+ </Link>
53
+ </>
54
+ }
55
+ />;
56
+ ```
57
+
39
58
  # Comic Relief header with Search
40
59
 
41
60
  ```js
@@ -21,6 +21,8 @@ exports.MarketingPreferencesDS = void 0;
21
21
 
22
22
  var _react = _interopRequireDefault(require("react"));
23
23
 
24
+ var _propTypes = _interopRequireDefault(require("prop-types"));
25
+
24
26
  var _reactHookForm = require("react-hook-form");
25
27
 
26
28
  var _lodash = _interopRequireDefault(require("lodash"));
@@ -221,4 +223,12 @@ MarketingPreferencesDS.defaultProps = {
221
223
  copyBottom: _DefaultCopy.defaultCopyBottom,
222
224
  id: null,
223
225
  formContext: null
226
+ };
227
+ MaybeDisabled.propTypes = {
228
+ children: _propTypes.default.node,
229
+ disabled: _propTypes.default.bool
230
+ };
231
+ MaybeDisabled.defaultProps = {
232
+ children: null,
233
+ disabled: false
224
234
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@comicrelief/component-library",
3
3
  "author": "Comic Relief Engineering Team",
4
- "version": "7.16.0",
4
+ "version": "7.18.0",
5
5
  "main": "dist/index.js",
6
6
  "license": "ISC",
7
7
  "jest": {
@@ -21,29 +21,29 @@
21
21
  "url": "https://github.com/comicrelief/component-library.git"
22
22
  },
23
23
  "dependencies": {
24
- "@babel/cli": "^7.14.8",
24
+ "@babel/cli": "^7.21.5",
25
25
  "@hookform/resolvers": "^1.3.4",
26
26
  "axios": "^0.21.1",
27
27
  "ejs": "^3.1.9",
28
- "jest-styled-components": "^7.0.5",
28
+ "jest-styled-components": "^7.1.1",
29
29
  "lazysizes": "^5.3.2",
30
30
  "lodash": "^4.17.11",
31
31
  "moment": "^2.29.4",
32
- "prop-types": "^15.7.2",
32
+ "prop-types": "^15.8.1",
33
33
  "react": "^17.0.2",
34
- "react-canvas-confetti": "^1.3.0",
35
- "react-currency-format": "^1.0.0",
34
+ "react-canvas-confetti": "^1.4.0",
35
+ "react-currency-format": "^1.1.0",
36
36
  "react-dom": "^17.0.2",
37
37
  "react-hook-form": "^6.3.0",
38
- "react-modal": "^3.14.3",
38
+ "react-modal": "^3.16.1",
39
39
  "react-responsive": "^9.0.2",
40
40
  "react-scripts": "4.0.3",
41
41
  "react-spinners": "^0.11.0",
42
42
  "react-styleguidist": "^11.1.7",
43
43
  "react-test-renderer": "^17.0.2",
44
- "react-uid": "^2.3.2",
45
- "styled-components": "^5.3.1",
46
- "youtube-player": "^5.5.2",
44
+ "react-uid": "^2.3.3",
45
+ "styled-components": "^5.3.11",
46
+ "youtube-player": "^5.6.0",
47
47
  "yup": "^0.32.9"
48
48
  },
49
49
  "resolutions": {
@@ -78,13 +78,13 @@
78
78
  "cypress": "^8.3.0",
79
79
  "eslint": "^7.32.0",
80
80
  "eslint-config-airbnb": "^18.2.0",
81
- "eslint-plugin-import": "^2.24.2",
82
- "eslint-plugin-jsx-a11y": "^6.3.1",
83
- "eslint-plugin-react": "^7.24.0",
84
- "eslint-plugin-react-hooks": "^4.0.5",
81
+ "eslint-plugin-import": "^2.27.5",
82
+ "eslint-plugin-jsx-a11y": "^6.7.1",
83
+ "eslint-plugin-react": "^7.32.2",
84
+ "eslint-plugin-react-hooks": "^4.6.0",
85
85
  "jest": "^26.1.0",
86
86
  "npm-run-all": "^4.1.5",
87
- "prettier": "^2.3.2",
87
+ "prettier": "^2.8.8",
88
88
  "semantic-release": "^17.4.6"
89
89
  }
90
90
  }
@@ -23,7 +23,7 @@ const InputField = styled.input`${({ theme, error, prefixLength }) => css`
23
23
  border-color: ${error ? theme.color('red') : theme.color('grey_medium')};
24
24
  box-shadow: none;
25
25
  appearance: none;
26
- color: ${theme.color('black')};
26
+ color: ${theme.color('black')};
27
27
  border-radius: ${spacing('sm')};
28
28
  font-size: inherit;
29
29
  z-index: 2;
@@ -119,7 +119,7 @@ Input.propTypes = {
119
119
  id: PropTypes.string.isRequired,
120
120
  /** text, email, number, date, search, tel, url, password */
121
121
  type: PropTypes.string.isRequired,
122
- labelProps: PropTypes.objectOf(PropTypes.any),
122
+ labelProps: PropTypes.objectOf(PropTypes.string),
123
123
  // className is needed so that styled(`Input`) will work
124
124
  // (as `rest` is not spread on the outermost component)
125
125
  className: PropTypes.string,
@@ -7,6 +7,7 @@ import spacing from '../../../theme/shared/spacing';
7
7
  import crLogo from './assets/cr-logo.svg';
8
8
  import srLogo from './assets/sr-logo.svg';
9
9
  import srLogoGameOn from './assets/sr-gameon-logo.svg';
10
+ import crLogoPride from './assets/CR_LOGO_PRIDE_KEY_RGB.svg';
10
11
 
11
12
  const Image = styled.img`
12
13
  object-fit: cover;
@@ -37,6 +38,8 @@ const themeSwitcher = theme => {
37
38
  return srLogo;
38
39
  case 'Sport Relief Gameon':
39
40
  return srLogoGameOn;
41
+ case 'Pride':
42
+ return crLogoPride;
40
43
  default:
41
44
  return crLogo;
42
45
  }
@@ -49,7 +52,7 @@ const Logo = ({
49
52
  <Image
50
53
  src={themeSwitcher(campaign)}
51
54
  alt={
52
- campaign === 'Comic Relief'
55
+ campaign === 'Comic Relief' || campaign === 'Pride'
53
56
  ? 'Comic Relief logo'
54
57
  : 'Sport Relief logo'
55
58
  }
@@ -0,0 +1,79 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- Generator: Adobe Illustrator 26.3.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <svg version="1.1" id="Logo_Keyline" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px"
4
+ y="0px" viewBox="0 0 500 500" style="enable-background:new 0 0 500 500;" xml:space="preserve">
5
+ <style type="text/css">
6
+ .st0{filter:url(#Adobe_OpacityMaskFilter);}
7
+ .st1{fill:#FFFFFF;}
8
+ .st2{mask:url(#SVGID_1_);}
9
+ .st3{fill:#E52631;}
10
+ .st4{fill:#FF9144;}
11
+ .st5{fill:#FFE400;}
12
+ .st6{fill:#00C100;}
13
+ .st7{fill:#001B9E;}
14
+ .st8{fill:#82008D;}
15
+ .st9{fill:#010101;}
16
+ .st10{fill:#673608;}
17
+ .st11{fill:#49D9EF;}
18
+ .st12{fill:#FFABC7;}
19
+ .st13{fill:#FCF7F4;}
20
+ </style>
21
+ <defs>
22
+ <filter id="Adobe_OpacityMaskFilter" filterUnits="userSpaceOnUse" x="-246.25" y="-7.5" width="738.91" height="735.56">
23
+ <feColorMatrix type="matrix" values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"/>
24
+ </filter>
25
+ </defs>
26
+ <mask maskUnits="userSpaceOnUse" x="-246.25" y="-7.5" width="738.91" height="735.56" id="SVGID_1_">
27
+ <g class="st0">
28
+ <rect x="13.07" y="16.74" class="st1" width="473.86" height="473.86"/>
29
+ <path id="Path" class="st1" d="M467.67,492.21l-435.34,0c-13.53,0-24.54-11.01-24.54-24.54l0-435.34
30
+ c0-13.53,11.01-24.54,24.54-24.55l435.34,0c13.53,0,24.54,11.01,24.54,24.55l0,435.34C492.21,481.2,481.2,492.21,467.67,492.21"/>
31
+ </g>
32
+ </mask>
33
+ <g class="st2">
34
+ <rect x="13.07" y="6.74" class="st3" width="478.3" height="78.98"/>
35
+ <rect x="13.07" y="85.71" class="st4" width="478.3" height="78.98"/>
36
+ <rect x="13.07" y="164.69" class="st5" width="478.3" height="78.98"/>
37
+ <rect x="13.07" y="243.67" class="st6" width="478.3" height="78.98"/>
38
+ <rect x="13.07" y="322.65" class="st7" width="478.3" height="78.98"/>
39
+ <rect x="13.07" y="401.62" class="st8" width="478.3" height="78.98"/>
40
+
41
+ <rect x="-126.71" y="226.55" transform="matrix(0.7119 0.7023 -0.7023 0.7119 247.1254 -79.8056)" class="st9" width="695.08" height="69.51"/>
42
+
43
+ <rect x="-175.52" y="276.04" transform="matrix(0.7119 0.7023 -0.7023 0.7119 267.8141 -31.2694)" class="st10" width="695.08" height="69.51"/>
44
+
45
+ <rect x="-224.34" y="325.52" transform="matrix(0.7119 0.7023 -0.7023 0.7119 288.5028 17.2668)" class="st11" width="695.08" height="69.51"/>
46
+
47
+ <rect x="-273.15" y="375" transform="matrix(0.7119 0.7023 -0.7023 0.7119 309.1915 65.8031)" class="st12" width="695.08" height="69.51"/>
48
+
49
+ <rect x="-321.96" y="424.49" transform="matrix(0.7119 0.7023 -0.7023 0.7119 329.8802 114.3393)" class="st13" width="695.08" height="69.51"/>
50
+ </g>
51
+ <path id="Keyline" class="st1" d="M467.67,497.5H32.33c-7.96,0-15.44-3.11-21.08-8.74c-5.64-5.64-8.74-13.13-8.74-21.09l0-435.34
52
+ c0-7.96,3.11-15.44,8.74-21.08C16.88,5.6,24.37,2.5,32.33,2.5l435.34,0c16.45,0,29.83,13.38,29.83,29.83l0,435.34
53
+ C497.5,484.12,484.12,497.5,467.67,497.5z M467.67,13.06l-435.34,0c-5.13,0-9.97,2.01-13.61,5.65c-3.64,3.64-5.65,8.48-5.65,13.61
54
+ l0,435.34c0,5.14,2.01,9.97,5.65,13.61c3.64,3.64,8.48,5.65,13.61,5.65h435.34c10.62,0,19.26-8.64,19.26-19.26l0-435.34
55
+ C486.93,21.71,478.29,13.07,467.67,13.06z"/>
56
+ <g id="COMIC_RELIEF_-_optical_tweak_1_">
57
+ <path class="st1" d="M94.57,207.4c0,10.32,1.29,16.95,9.21,16.95s9.21-6.63,9.21-16.95v-12.53h26.34v5.34
58
+ c0,27.08-8.66,46.05-35,46.05c-27.08,0-37.58-18.24-37.58-51.58v-15.84c0-33.34,10.5-51.58,37.58-51.58c26.34,0,35,18.97,35,46.05
59
+ v5.34h-26.34v-12.53c0-10.32-1.29-16.95-9.21-16.95s-9.21,6.63-9.21,16.95V207.4z"/>
60
+ <path class="st1" d="M219.57,193.95c0,33.34-10.5,52.31-37.58,52.31c-27.08,0-37.58-18.97-37.58-52.31v-14.37
61
+ c0-33.34,10.5-52.31,37.58-52.31c27.08,0,37.58,18.97,37.58,52.31V193.95z M172.41,207.03c0,10.32,1.66,17.32,9.58,17.32
62
+ c7.92,0,9.58-7,9.58-17.32v-40.53c0-10.32-1.66-17.32-9.58-17.32c-7.92,0-9.58,7-9.58,17.32V207.03z"/>
63
+ <path class="st1" d="M272.34,187.69h0.74l11.05-58.95h34.08v116.05h-25.05v-66.13h-0.74l-12.71,66.13h-16.95l-13.08-66.13h-0.74
64
+ v66.13h-23.76V128.75H260L272.34,187.69z"/>
65
+ <path class="st1" d="M353.84,128.75v116.05h-27.08V128.75H353.84z"/>
66
+ <path class="st1" d="M388.3,207.4c0,10.32,1.29,16.95,9.21,16.95c7.92,0,9.21-6.63,9.21-16.95v-12.53h26.34v5.34
67
+ c0,27.08-8.66,46.05-35,46.05c-27.08,0-37.58-18.24-37.58-51.58v-15.84c0-33.34,10.5-51.58,37.58-51.58c26.34,0,35,18.97,35,46.05
68
+ v5.34h-26.34v-12.53c0-10.32-1.29-16.95-9.21-16.95c-7.92,0-9.21,6.63-9.21,16.95V207.4z"/>
69
+ <path class="st1" d="M113.17,371.28c-1.47-4.42-1.84-11.24-2.58-25.24c-0.55-11.05-3.32-16.76-11.79-16.76h-3.5v42H68.6V255.23
70
+ h33.34c25.97,0,37.58,13.63,37.58,34.26c0,18.24-8.29,27.26-20.08,29.29c12.16,2.76,16.21,11.42,17.13,25.97
71
+ c0.92,15.29,0.74,21.18,3.32,26.53H113.17z M97.88,307.91c10.87,0,15.1-3.5,15.1-15.29c0-10.5-4.24-15.66-15.1-15.66h-2.58v30.95
72
+ H97.88z"/>
73
+ <path class="st1" d="M204.45,371.28h-58.76V255.23h58.76v22.29h-32.24v23.76h23.95v22.11h-23.95v25.6h32.24V371.28z"/>
74
+ <path class="st1" d="M237.82,255.23v93.76h31.31v22.29h-58.39V255.23H237.82z"/>
75
+ <path class="st1" d="M301.28,255.23v116.05H274.2V255.23H301.28z"/>
76
+ <path class="st1" d="M368.39,371.28h-58.76V255.23h58.76v22.29h-32.24v23.76h23.95v22.11h-23.95v25.6h32.24V371.28z"/>
77
+ <path class="st1" d="M374.68,371.28V255.23h56.55v22.29h-29.47v26.89h21.55v21.92h-21.55v44.95H374.68z"/>
78
+ </g>
79
+ </svg>
@@ -0,0 +1,34 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- Generator: Adobe Illustrator 23.0.3, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
4
+ viewBox="0 0 495 495" style="enable-background:new 0 0 495 495;" xml:space="preserve">
5
+ <style type="text/css">
6
+ .st0{fill:#E52631;}
7
+ .st1{fill:#FFFFFF;}
8
+ </style>
9
+ <path class="st0" d="M473.72,495.5H22.28c-11.98,0-21.78-9.8-21.78-21.78V22.28C0.5,10.3,10.3,0.5,22.28,0.5h451.44
10
+ c11.98,0,21.78,9.8,21.78,21.78v451.44C495.5,485.69,485.7,495.5,473.72,495.5z"/>
11
+ <g id="COMIC_RELIEF_-_optical_tweak">
12
+ <path class="st1" d="M85.69,203.52c0,10.77,1.35,17.7,9.62,17.7s9.62-6.92,9.62-17.7v-13.08h27.5v5.58
13
+ c0,28.27-9.04,48.08-36.54,48.08c-28.27,0-39.24-19.04-39.24-53.85v-16.54c0-34.81,10.96-53.85,39.24-53.85
14
+ c27.5,0,36.54,19.81,36.54,48.08v5.58h-27.5v-13.08c0-10.77-1.35-17.7-9.62-17.7s-9.62,6.92-9.62,17.7V203.52z"/>
15
+ <path class="st1" d="M216.21,189.48c0,34.81-10.96,54.62-39.24,54.62c-28.27,0-39.24-19.81-39.24-54.62v-15
16
+ c0-34.81,10.96-54.62,39.24-54.62c28.27,0,39.24,19.81,39.24,54.62V189.48z M166.97,203.13c0,10.77,1.73,18.08,10,18.08
17
+ s10-7.31,10-18.08v-42.31c0-10.77-1.73-18.08-10-18.08s-10,7.31-10,18.08V203.13z"/>
18
+ <path class="st1" d="M271.32,182.94h0.77l11.54-61.55h35.58v121.17h-26.16v-69.05h-0.77l-13.27,69.05h-17.7l-13.66-69.05h-0.77
19
+ v69.05h-24.81V121.39h36.35L271.32,182.94z"/>
20
+ <path class="st1" d="M356.41,121.39v121.17h-28.27V121.39H356.41z"/>
21
+ <path class="st1" d="M392.39,203.52c0,10.77,1.35,17.7,9.62,17.7c8.27,0,9.62-6.92,9.62-17.7v-13.08h27.5v5.58
22
+ c0,28.27-9.04,48.08-36.54,48.08c-28.27,0-39.24-19.04-39.24-53.85v-16.54c0-34.81,10.96-53.85,39.24-53.85
23
+ c27.5,0,36.54,19.81,36.54,48.08v5.58h-27.5v-13.08c0-10.77-1.35-17.7-9.62-17.7c-8.27,0-9.62,6.92-9.62,17.7V203.52z"/>
24
+ <path class="st1" d="M105.12,374.63c-1.54-4.62-1.92-11.73-2.69-26.35c-0.58-11.54-3.46-17.5-12.31-17.5h-3.65v43.85H58.57V253.46
25
+ h34.81c27.12,0,39.24,14.23,39.24,35.77c0,19.04-8.66,28.47-20.97,30.58c12.69,2.88,16.93,11.92,17.89,27.12
26
+ c0.96,15.96,0.77,22.12,3.46,27.7H105.12z M89.16,308.46c11.35,0,15.77-3.65,15.77-15.96c0-10.96-4.42-16.35-15.77-16.35h-2.69
27
+ v32.31H89.16z"/>
28
+ <path class="st1" d="M200.42,374.63h-61.36V253.46h61.36v23.27h-33.66v24.81h25v23.08h-25v26.74h33.66V374.63z"/>
29
+ <path class="st1" d="M235.27,253.46v97.9h32.7v23.27H207V253.46H235.27z"/>
30
+ <path class="st1" d="M301.53,253.46v121.17h-28.27V253.46H301.53z"/>
31
+ <path class="st1" d="M371.6,374.63h-61.36V253.46h61.36v23.27h-33.66v24.81h25v23.08h-25v26.74h33.66V374.63z"/>
32
+ <path class="st1" d="M378.18,374.63V253.46h59.05v23.27h-30.77v28.08h22.5v22.89h-22.5v46.93H378.18z"/>
33
+ </g>
34
+ </svg>
@@ -22,14 +22,13 @@ const KEY_CODE_ESCAPE = 27;
22
22
  * This component deals with the visual aspect of a text input with typeahead-style functionality
23
23
  *
24
24
  * API querying and state management (aside from that related to keyboard usage/accessibility) are
25
- * handled by the parent component (via the value, options, onChange and onSelect props)
25
+ * handled by the parent component (options, onChange and onSelect props)
26
26
  *
27
27
  * See the Typeahead and SchoolLookup molecules for the full implementation
28
28
  */
29
29
  const TextInputWithDropdown = React.forwardRef(
30
30
  (
31
31
  {
32
- value,
33
32
  options,
34
33
  onChange,
35
34
  onSelect,
@@ -76,7 +75,6 @@ const TextInputWithDropdown = React.forwardRef(
76
75
  };
77
76
 
78
77
  const inputProps = {
79
- value,
80
78
  onChange,
81
79
  id,
82
80
  name,
@@ -178,7 +176,6 @@ const Options = ({
178
176
  };
179
177
 
180
178
  TextInputWithDropdown.propTypes = {
181
- value: PropTypes.string.isRequired,
182
179
  options: PropTypes.arrayOf(PropTypes.string).isRequired,
183
180
  onChange: PropTypes.func.isRequired,
184
181
  onSelect: PropTypes.func.isRequired,
@@ -25,6 +25,14 @@ const Logos = ({ campaign }) => {
25
25
  );
26
26
  }
27
27
 
28
+ if (campaign === 'Pride') {
29
+ return (
30
+ <a href="/" title="Go to Comic Relief homepage">
31
+ <Logo rotate={false} campaign="Pride" />
32
+ </a>
33
+ );
34
+ }
35
+
28
36
  return (
29
37
  <a href="/" title="Go to Comic Relief homepage">
30
38
  <Logo rotate={false} campaign="Comic Relief" />
@@ -92,8 +92,9 @@ const Donate = ({
92
92
  <Wrapper formAlignRight={formAlignRight} aria-live="polite">
93
93
  <Header formAlignRight={formAlignRight}>
94
94
  <HeaderInner>
95
- {subtitle && (
95
+ {Boolean(subtitle) && (
96
96
  <>
97
+ {Boolean(title) && (
97
98
  <Text
98
99
  tag="h2"
99
100
  color={textColor}
@@ -104,6 +105,8 @@ const Donate = ({
104
105
  >
105
106
  {title}
106
107
  </Text>
108
+ )}
109
+
107
110
  <Text tag="p" color={textColor} size="m">
108
111
  {subtitle}
109
112
  </Text>
@@ -136,7 +139,7 @@ Donate.propTypes = {
136
139
  data: PropTypes.objectOf(PropTypes.shape),
137
140
  clientID: PropTypes.string.isRequired,
138
141
  donateLink: PropTypes.string.isRequired,
139
- title: PropTypes.string.isRequired,
142
+ title: PropTypes.string,
140
143
  otherAmountText: PropTypes.string,
141
144
  subtitle: PropTypes.string,
142
145
  formAlignRight: PropTypes.bool,
@@ -182,7 +185,8 @@ Donate.defaultProps = {
182
185
  PopUpText: 'Help us deliver long-term impact by converting your single donation into a monthly gift.',
183
186
  chooseAmountText: '',
184
187
  isDesktopOverride: null,
185
- otherAmountValue: null
188
+ otherAmountValue: null,
189
+ title: null
186
190
  };
187
191
 
188
192
  export default Donate;
@@ -313,12 +313,13 @@ Signup.propTypes = {
313
313
  PopUpText: PropTypes.string.isRequired,
314
314
  chooseAmountText: PropTypes.string.isRequired,
315
315
  submitButtonColor: PropTypes.string.isRequired,
316
- otherAmountValue: PropTypes.number.isRequired
316
+ otherAmountValue: PropTypes.number
317
317
  };
318
318
 
319
319
  Signup.defaultProps = {
320
320
  noMoneyBuys: false,
321
- data: {}
321
+ data: {},
322
+ otherAmountValue: null
322
323
  };
323
324
 
324
325
  export default Signup;
@@ -26,7 +26,6 @@ const GivingSelector = ({
26
26
  value="Single"
27
27
  type="radio"
28
28
  label=""
29
- errormsg=""
30
29
  checked={givingType === 'single'}
31
30
  onClick={() => handleGivingTypeChange('single', givingType)}
32
31
  />
@@ -40,7 +39,6 @@ const GivingSelector = ({
40
39
  value="Monthly"
41
40
  type="radio"
42
41
  label=""
43
- errormsg=""
44
42
  checked={givingType === 'monthly'}
45
43
  onClick={() => handleGivingTypeChange('monthly', givingType)}
46
44
  />
@@ -543,7 +543,6 @@ exports[`"Single Giving, No Money Buys, with overridden manual input value" rend
543
543
  aria-label="Single"
544
544
  checked={true}
545
545
  className="give-once"
546
- errormsg=""
547
546
  id="give-once--mship-4"
548
547
  label=""
549
548
  onClick={[Function]}
@@ -560,7 +559,6 @@ exports[`"Single Giving, No Money Buys, with overridden manual input value" rend
560
559
  aria-label="Monthly"
561
560
  checked={false}
562
561
  className="give-monthly"
563
- errormsg=""
564
562
  id="give-monthly--mship-4"
565
563
  label=""
566
564
  onClick={[Function]}
@@ -1286,7 +1284,6 @@ exports[`Monthly donation renders correctly 1`] = `
1286
1284
  aria-label="Single"
1287
1285
  checked={true}
1288
1286
  className="give-once"
1289
- errormsg=""
1290
1287
  id="give-once--mship-1"
1291
1288
  label=""
1292
1289
  onClick={[Function]}
@@ -1303,7 +1300,6 @@ exports[`Monthly donation renders correctly 1`] = `
1303
1300
  aria-label="Monthly"
1304
1301
  checked={false}
1305
1302
  className="give-monthly"
1306
- errormsg=""
1307
1303
  id="give-monthly--mship-1"
1308
1304
  label=""
1309
1305
  onClick={[Function]}
@@ -397,7 +397,7 @@ exports[`renders correctly 1`] = `
397
397
  Subscribe
398
398
  </span>
399
399
  <div
400
- className="ButtonWithStates__LoaderContainer-sc-7gb81g-1"
400
+ className=""
401
401
  />
402
402
  </button>
403
403
  </div>
@@ -563,7 +563,7 @@ exports[`renders correctly 1`] = `
563
563
  className="c2"
564
564
  >
565
565
  <div
566
- className="Footerstyle__SocialIconWrapper-sc-167xaf5-7"
566
+ className=""
567
567
  >
568
568
  <ul
569
569
  className="c3"
@@ -36,6 +36,25 @@ import Link from '../../Atoms/Link/Link';
36
36
  />;
37
37
  ```
38
38
 
39
+ # Pride header
40
+
41
+ ```js
42
+ import data from './data/data';
43
+ import Link from '../../Atoms/Link/Link';
44
+
45
+ <Header
46
+ navItems={data}
47
+ campaign="Pride"
48
+ metaIcons={
49
+ <>
50
+ <Link color="green" type="button" href="/donation">
51
+ Donate
52
+ </Link>
53
+ </>
54
+ }
55
+ />;
56
+ ```
57
+
39
58
  # Comic Relief header with Search
40
59
 
41
60
  ```js
@@ -263,6 +263,16 @@ MarketingPreferencesDS.defaultProps = {
263
263
  formContext: null
264
264
  };
265
265
 
266
+ MaybeDisabled.propTypes = {
267
+ children: PropTypes.node,
268
+ disabled: PropTypes.bool
269
+ };
270
+
271
+ MaybeDisabled.defaultProps = {
272
+ children: null,
273
+ disabled: false
274
+ };
275
+
266
276
  export {
267
277
  MarketingPreferencesDS, setInitialValues, buildValidationSchema
268
278
  };