@comicrelief/component-library 8.25.8 → 8.27.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 (94) hide show
  1. package/dist/components/Atoms/Button/Button.test.js +62 -1
  2. package/dist/components/Atoms/ButtonWithStates/ButtonWithStates.js +4 -1
  3. package/dist/components/Atoms/Checkbox/Checkbox.js +1 -1
  4. package/dist/components/Atoms/Checkbox/Checkbox.test.js +160 -1
  5. package/dist/components/Atoms/Icons/Arrow.js +1 -1
  6. package/dist/components/Atoms/Icons/Chevron.js +1 -1
  7. package/dist/components/Atoms/Input/Input.js +3 -3
  8. package/dist/components/Atoms/Input/input.test.js +238 -2
  9. package/dist/components/Atoms/Label/Label.js +9 -1
  10. package/dist/components/Atoms/Link/Link.test.js +219 -4
  11. package/dist/components/Atoms/Logo/Logo.test.js +36 -1
  12. package/dist/components/Atoms/Pagination/Item/Item.js +1 -1
  13. package/dist/components/Atoms/Pagination/List/List.js +1 -1
  14. package/dist/components/Atoms/Pagination/Pagination.js +1 -1
  15. package/dist/components/Atoms/Pagination/Pagination.test.js +14 -14
  16. package/dist/components/Atoms/Picture/Picture.js +16 -24
  17. package/dist/components/Atoms/Picture/Picture.md +2 -1
  18. package/dist/components/Atoms/Picture/Picture.test.js +92 -4
  19. package/dist/components/Atoms/RadioButton/RadioButton.test.js +178 -1
  20. package/dist/components/Atoms/RichText/RichText.test.js +14 -1
  21. package/dist/components/Atoms/SocialIcons/Icon/Icon.js +2 -2
  22. package/dist/components/Atoms/SocialIcons/Utils/Links.js +3 -3
  23. package/dist/components/Atoms/Text/Text.js +3 -3
  24. package/dist/components/Atoms/TextArea/TextArea.test.js +90 -1
  25. package/dist/components/Atoms/TextInputWithDropdown/TextInputWithDropdown.js +3 -3
  26. package/dist/components/Molecules/ArticleTeaser/ArticleTeaser.js +1 -1
  27. package/dist/components/Molecules/ArticleTeaser/ArticleTeaser.test.js +479 -2
  28. package/dist/components/Molecules/Card/Card.style.js +1 -1
  29. package/dist/components/Molecules/Card/__snapshots__/Card.test.js.snap +6 -0
  30. package/dist/components/Molecules/CardDs/__snapshots__/CardDs.test.js.snap +28 -0
  31. package/dist/components/Molecules/Chip/Chip.test.js +104 -1
  32. package/dist/components/Molecules/Descriptor/Descriptor.js +1 -1
  33. package/dist/components/Molecules/Descriptor/Descriptor.test.js +216 -1
  34. package/dist/components/Molecules/DoubleCopy/DoubleCopy.test.js +55 -1
  35. package/dist/components/Molecules/PartnerLink/PartnerLink.test.js +148 -1
  36. package/dist/components/Molecules/Promo/_ProgressRing.js +5 -5
  37. package/dist/components/Molecules/Promo/__snapshots__/Promo.test.js.snap +28 -0
  38. package/dist/components/Molecules/SchoolLookup/SchoolLookup.js +1 -1
  39. package/dist/components/Molecules/SearchInput/SearchInput.test.js +190 -1
  40. package/dist/components/Molecules/SearchResult/SearchResult.js +1 -1
  41. package/dist/components/Molecules/SearchResult/__snapshots__/SearchResult.test.js.snap +24 -0
  42. package/dist/components/Molecules/ShareButton/ShareButton.js +3 -3
  43. package/dist/components/Molecules/ShareButton/ShareButton.test.js +112 -1
  44. package/dist/components/Molecules/SimpleSchoolLookup/SimpleSchoolLookup.js +1 -1
  45. package/dist/components/Molecules/SingleMessage/SingleMessage.js +4 -4
  46. package/dist/components/Molecules/SingleMessage/SingleMessage.style.js +2 -2
  47. package/dist/components/Molecules/SingleMessage/__snapshots__/SingleMessage.test.js.snap +78 -0
  48. package/dist/components/Molecules/SingleMessageDS/SingleMessageDs.js +1 -1
  49. package/dist/components/Molecules/SingleMessageDS/SingleMessageDs.style.js +8 -8
  50. package/dist/components/Molecules/SingleMessageDS/__snapshots__/SingleMessageDs.test.js.snap +14 -0
  51. package/dist/components/Molecules/VideoBanner/VideoBanner.test.js +18 -1
  52. package/dist/components/Organisms/CookieBanner/CookieBanner.test.js +181 -1
  53. package/dist/components/Organisms/Donate/Donate.js +1 -1
  54. package/dist/components/Organisms/Donate/Donate.style.js +3 -1
  55. package/dist/components/Organisms/Donate/Form/Form.js +8 -8
  56. package/dist/components/Organisms/Donate/GivingSelector/GivingSelector.js +4 -4
  57. package/dist/components/Organisms/Donate/MoneyBuy/MoneyBuy.js +1 -1
  58. package/dist/components/Organisms/Footer/Footer.js +1 -1
  59. package/dist/components/Organisms/Footer/Nav/Nav.js +1 -1
  60. package/dist/components/Organisms/Header/HeaderNav/HeaderNav.js +2 -2
  61. package/dist/components/Organisms/Header2025/HeaderNav2025/HeaderNav2025.js +1 -1
  62. package/dist/components/Organisms/Header2025/HeaderNav2025/HeaderNavItem2025.js +5 -5
  63. package/dist/components/Organisms/ImpactSlider/ImpactSlider.style.js +1 -1
  64. package/dist/components/Organisms/ImpactSlider/_ImpactMoneybuys.js +1 -1
  65. package/dist/components/Organisms/ImpactSlider/_utils.js +2 -2
  66. package/dist/components/Organisms/MarketingPreferencesDS/_MarketingPreferencesDS.js +5 -5
  67. package/dist/components/Organisms/MarketingPreferencesDS/_OptInCheckbox.js +3 -3
  68. package/dist/components/Organisms/Membership/Form/Form.js +5 -5
  69. package/dist/components/Organisms/Membership/Membership.style.js +1 -1
  70. package/dist/components/Organisms/Membership/Membership.test.js +633 -1
  71. package/dist/components/Organisms/Membership/MoneyBox/MoneyBox.js +1 -1
  72. package/dist/components/Organisms/RichtextCarousel/RichtextCarousel.test.js +208 -1
  73. package/dist/components/Organisms/WYMDCarousel/WYMDCarousel.test.js +341 -1
  74. package/dist/components/Organisms/WYMDCarousel/_utils.js +1 -1
  75. package/dist/theme/crTheme/linkStyles.js +4 -4
  76. package/dist/theme/shared/allBreakpoints.js +1 -1
  77. package/dist/theme/shared/fontFamilies.js +1 -1
  78. package/dist/utils/Membership.js +2 -2
  79. package/dist/utils/ShareButton/sharePopUpHelper.js +1 -1
  80. package/dist/utils/ShareButton/shareUrlHelper.js +2 -2
  81. package/dist/utils/internalLinkHelper.js +1 -1
  82. package/package.json +1 -1
  83. package/src/components/Atoms/Picture/Picture.js +21 -19
  84. package/src/components/Atoms/Picture/Picture.md +2 -1
  85. package/src/components/Atoms/Picture/Picture.test.js +29 -7
  86. package/src/components/Molecules/ArticleTeaser/ArticleTeaser.test.js +28 -0
  87. package/src/components/Molecules/Card/__snapshots__/Card.test.js.snap +6 -0
  88. package/src/components/Molecules/CardDs/__snapshots__/CardDs.test.js.snap +28 -0
  89. package/src/components/Molecules/PartnerLink/PartnerLink.test.js +8 -0
  90. package/src/components/Molecules/Promo/__snapshots__/Promo.test.js.snap +28 -0
  91. package/src/components/Molecules/SearchResult/__snapshots__/SearchResult.test.js.snap +24 -0
  92. package/src/components/Molecules/SingleMessage/__snapshots__/SingleMessage.test.js.snap +78 -0
  93. package/src/components/Molecules/SingleMessageDS/__snapshots__/SingleMessageDs.test.js.snap +14 -0
  94. package/src/components/Organisms/Membership/Membership.test.js +6 -0
@@ -13,5 +13,194 @@ it('renders correctly', () => {
13
13
  },
14
14
  value: ""
15
15
  })).toJSON();
16
- expect(tree).toMatchInlineSnapshot("\n .c6 {\n font-size: 1rem;\n line-height: 1rem;\n text-transform: inherit;\n line-height: normal;\n font-family: 'Montserrat',Helvetica,Arial,sans-serif;\n }\n\n .c4 {\n width: 100%;\n position: relative;\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n -webkit-flex-direction: column;\n -ms-flex-direction: column;\n flex-direction: column;\n color: #5C5C5E;\n }\n\n .c7 {\n border: 0;\n -webkit-clip: rect(0 0 0 0);\n clip: rect(0 0 0 0);\n -webkit-clip-path: inset(50%);\n clip-path: inset(50%);\n height: 1px;\n margin: -1px;\n overflow: hidden;\n padding: 0;\n position: absolute;\n white-space: nowrap;\n width: 1px;\n }\n\n .c8 {\n position: relative;\n font-size: 1.25rem;\n }\n\n .c9 {\n position: relative;\n width: 100%;\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: end;\n -webkit-justify-content: flex-end;\n -ms-flex-pack: end;\n justify-content: flex-end;\n -webkit-align-items: center;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n }\n\n .c10 {\n position: relative;\n box-sizing: border-box;\n width: 100%;\n height: 48px;\n padding: 1rem 2.4rem 1rem 1.5rem;\n background-color: #F4F3F5;\n border: 1px solid;\n border-color: #E1E2E3;\n box-shadow: none;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n color: #000000;\n border-radius: 0.5rem;\n font-size: inherit;\n z-index: 2;\n font-family: 'Montserrat',Helvetica,Arial,sans-serif;\n }\n\n .c10:focus {\n border: 1px solid #666;\n }\n\n .c0 {\n width: 100%;\n max-width: 1440px;\n margin: auto;\n }\n\n .c1 {\n margin: 1rem auto;\n padding: 0 calc((4 * 0.25rem));\n }\n\n .c2 {\n margin: 4rem auto;\n width: 100%;\n border-bottom: 4px solid #E52630;\n overflow: hidden;\n }\n\n .c3 {\n width: 100%;\n padding: 0 0.5rem;\n }\n\n .c5 input {\n padding: 13px 0;\n margin: 0;\n max-width: 100%;\n border: 0;\n outline: #E52630;\n background: none;\n }\n\n .c5 input:focus {\n border: 0;\n }\n\n @media (min-width:740px) {\n\n }\n\n @media (min-width:1024px) {\n\n }\n\n @media (min-width:740px) {\n .c5 input {\n height: 100px;\n font-size: 3rem;\n }\n }\n\n <div\n className=\"c0\"\n >\n <div\n className=\"c1\"\n >\n <div\n className=\"c2\"\n role=\"search\"\n >\n <div\n className=\"c3\"\n >\n <label\n className=\"c4 c5\"\n htmlFor=\"search\"\n >\n <span\n className=\"c6 c7\"\n color=\"inherit\"\n dangerouslySetInnerHTML={\n Object {\n \"__html\": \"Search\",\n }\n }\n size=\"s\"\n />\n <div\n className=\"c8\"\n >\n \n <div\n className=\"c9\"\n >\n <input\n aria-describedby=\"search\"\n className=\"c10\"\n id=\"search\"\n name=\"search\"\n onChange={[Function]}\n placeholder=\"\"\n required={false}\n role=\"searchbox\"\n type=\"text\"\n value=\"\"\n />\n \n </div>\n </div>\n \n </label>\n </div>\n </div>\n </div>\n </div>\n ");
16
+ expect(tree).toMatchInlineSnapshot(`
17
+ .c6 {
18
+ font-size: 1rem;
19
+ line-height: 1rem;
20
+ text-transform: inherit;
21
+ line-height: normal;
22
+ font-family: 'Montserrat',Helvetica,Arial,sans-serif;
23
+ }
24
+
25
+ .c4 {
26
+ width: 100%;
27
+ position: relative;
28
+ display: -webkit-box;
29
+ display: -webkit-flex;
30
+ display: -ms-flexbox;
31
+ display: flex;
32
+ -webkit-flex-direction: column;
33
+ -ms-flex-direction: column;
34
+ flex-direction: column;
35
+ color: #5C5C5E;
36
+ }
37
+
38
+ .c7 {
39
+ border: 0;
40
+ -webkit-clip: rect(0 0 0 0);
41
+ clip: rect(0 0 0 0);
42
+ -webkit-clip-path: inset(50%);
43
+ clip-path: inset(50%);
44
+ height: 1px;
45
+ margin: -1px;
46
+ overflow: hidden;
47
+ padding: 0;
48
+ position: absolute;
49
+ white-space: nowrap;
50
+ width: 1px;
51
+ }
52
+
53
+ .c8 {
54
+ position: relative;
55
+ font-size: 1.25rem;
56
+ }
57
+
58
+ .c9 {
59
+ position: relative;
60
+ width: 100%;
61
+ display: -webkit-box;
62
+ display: -webkit-flex;
63
+ display: -ms-flexbox;
64
+ display: flex;
65
+ -webkit-box-pack: end;
66
+ -webkit-justify-content: flex-end;
67
+ -ms-flex-pack: end;
68
+ justify-content: flex-end;
69
+ -webkit-align-items: center;
70
+ -webkit-box-align: center;
71
+ -ms-flex-align: center;
72
+ align-items: center;
73
+ }
74
+
75
+ .c10 {
76
+ position: relative;
77
+ box-sizing: border-box;
78
+ width: 100%;
79
+ height: 48px;
80
+ padding: 1rem 2.4rem 1rem 1.5rem;
81
+ background-color: #F4F3F5;
82
+ border: 1px solid;
83
+ border-color: #E1E2E3;
84
+ box-shadow: none;
85
+ -webkit-appearance: none;
86
+ -moz-appearance: none;
87
+ appearance: none;
88
+ color: #000000;
89
+ border-radius: 0.5rem;
90
+ font-size: inherit;
91
+ z-index: 2;
92
+ font-family: 'Montserrat',Helvetica,Arial,sans-serif;
93
+ }
94
+
95
+ .c10:focus {
96
+ border: 1px solid #666;
97
+ }
98
+
99
+ .c0 {
100
+ width: 100%;
101
+ max-width: 1440px;
102
+ margin: auto;
103
+ }
104
+
105
+ .c1 {
106
+ margin: 1rem auto;
107
+ padding: 0 calc((4 * 0.25rem));
108
+ }
109
+
110
+ .c2 {
111
+ margin: 4rem auto;
112
+ width: 100%;
113
+ border-bottom: 4px solid #E52630;
114
+ overflow: hidden;
115
+ }
116
+
117
+ .c3 {
118
+ width: 100%;
119
+ padding: 0 0.5rem;
120
+ }
121
+
122
+ .c5 input {
123
+ padding: 13px 0;
124
+ margin: 0;
125
+ max-width: 100%;
126
+ border: 0;
127
+ outline: #E52630;
128
+ background: none;
129
+ }
130
+
131
+ .c5 input:focus {
132
+ border: 0;
133
+ }
134
+
135
+ @media (min-width:740px) {
136
+
137
+ }
138
+
139
+ @media (min-width:1024px) {
140
+
141
+ }
142
+
143
+ @media (min-width:740px) {
144
+ .c5 input {
145
+ height: 100px;
146
+ font-size: 3rem;
147
+ }
148
+ }
149
+
150
+ <div
151
+ className="c0"
152
+ >
153
+ <div
154
+ className="c1"
155
+ >
156
+ <div
157
+ className="c2"
158
+ role="search"
159
+ >
160
+ <div
161
+ className="c3"
162
+ >
163
+ <label
164
+ className="c4 c5"
165
+ htmlFor="search"
166
+ >
167
+ <span
168
+ className="c6 c7"
169
+ color="inherit"
170
+ dangerouslySetInnerHTML={
171
+ Object {
172
+ "__html": "Search",
173
+ }
174
+ }
175
+ size="s"
176
+ />
177
+ <div
178
+ className="c8"
179
+ >
180
+
181
+ <div
182
+ className="c9"
183
+ >
184
+ <input
185
+ aria-describedby="search"
186
+ className="c10"
187
+ id="search"
188
+ name="search"
189
+ onChange={[Function]}
190
+ placeholder=""
191
+ required={false}
192
+ role="searchbox"
193
+ type="text"
194
+ value=""
195
+ />
196
+
197
+ </div>
198
+ </div>
199
+
200
+ </label>
201
+ </div>
202
+ </div>
203
+ </div>
204
+ </div>
205
+ `);
17
206
  });
@@ -95,7 +95,7 @@ const SearchResult = _ref7 => {
95
95
  })), /*#__PURE__*/_react.default.createElement(CopyWrapper, null, /*#__PURE__*/_react.default.createElement(_Text.default, {
96
96
  size: "xs",
97
97
  uppercase: true
98
- }, "".concat(type ? " ".concat(type, " |") : '', " ").concat(date)), /*#__PURE__*/_react.default.createElement(Title, {
98
+ }, `${type ? ` ${type} |` : ''} ${date}`), /*#__PURE__*/_react.default.createElement(Title, {
99
99
  size: "xl",
100
100
  tag: "h3",
101
101
  uppercase: true
@@ -97,6 +97,12 @@ exports[`renders correctly in minimalist form 1`] = `
97
97
  margin: 0;
98
98
  }
99
99
 
100
+ @supports not ((object-fit:cover) or (object-fit:contain)) {
101
+ .c5 {
102
+ visibility: hidden;
103
+ }
104
+ }
105
+
100
106
  @media (min-width:740px) {
101
107
  .c2 {
102
108
  -webkit-flex-direction: row;
@@ -279,6 +285,12 @@ exports[`renders correctly with copy 1`] = `
279
285
  }
280
286
  }
281
287
 
288
+ @supports not ((object-fit:cover) or (object-fit:contain)) {
289
+ .c5 {
290
+ visibility: hidden;
291
+ }
292
+ }
293
+
282
294
  @media (min-width:740px) {
283
295
  .c2 {
284
296
  -webkit-flex-direction: row;
@@ -452,6 +464,12 @@ exports[`renders correctly with date 1`] = `
452
464
  margin: 0;
453
465
  }
454
466
 
467
+ @supports not ((object-fit:cover) or (object-fit:contain)) {
468
+ .c5 {
469
+ visibility: hidden;
470
+ }
471
+ }
472
+
455
473
  @media (min-width:740px) {
456
474
  .c2 {
457
475
  -webkit-flex-direction: row;
@@ -619,6 +637,12 @@ exports[`renders correctly with date and type 1`] = `
619
637
  margin: 0;
620
638
  }
621
639
 
640
+ @supports not ((object-fit:cover) or (object-fit:contain)) {
641
+ .c5 {
642
+ visibility: hidden;
643
+ }
644
+ }
645
+
622
646
  @media (min-width:740px) {
623
647
  .c2 {
624
648
  -webkit-flex-direction: row;
@@ -42,16 +42,16 @@ const ShareButton = _ref => {
42
42
  checkedUrl = urlToShare !== null ? urlToShare : window.location.href;
43
43
  }
44
44
  return /*#__PURE__*/_react.default.createElement(_ShareButton.Wrapper, null, /*#__PURE__*/_react.default.createElement(_ShareButton.Copy, null, copy), /*#__PURE__*/_react.default.createElement(_ShareButton.ShareButtonList, null, Object.keys(_ShareIcons.default).map(shareType => /*#__PURE__*/_react.default.createElement(_ShareButton.ShareButtonItem, {
45
- key: "share-button--".concat(shareType)
45
+ key: `share-button--${shareType}`
46
46
  }, /*#__PURE__*/_react.default.createElement(_Icon.default, Object.assign({
47
47
  onClick: e => handleShare(e, shareType, checkedUrl),
48
48
  icon: _ShareIcons.default[shareType],
49
- title: "Share on ".concat(shareType),
49
+ title: `Share on ${shareType}`,
50
50
  brand: campaign,
51
51
  target: "_blank",
52
52
  role: "button",
53
53
  href: "#",
54
- id: "share-button--".concat(shareType)
54
+ id: `share-button--${shareType}`
55
55
  }, restProps))))));
56
56
  };
57
57
  var _default = exports.default = ShareButton;
@@ -7,5 +7,116 @@ var _shallowWithTheme = _interopRequireDefault(require("../../../../tests/hoc/sh
7
7
  var _ShareButton = _interopRequireDefault(require("./ShareButton"));
8
8
  it('renders correctly', () => {
9
9
  const tree = (0, _shallowWithTheme.default)( /*#__PURE__*/_react.default.createElement(_ShareButton.default, null)).toJSON();
10
- expect(tree).toMatchInlineSnapshot("\n .c4 {\n -webkit-text-decoration: none;\n text-decoration: none;\n cursor: pointer;\n display: block;\n position: relative;\n -webkit-transition: opacity 0.2s;\n transition: opacity 0.2s;\n }\n\n .c4:hover,\n .c4:focus {\n opacity: 0.6;\n }\n\n .c5 {\n width: 100%;\n }\n\n .c0 {\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n -webkit-align-items: center;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -webkit-justify-content: center;\n -ms-flex-pack: center;\n justify-content: center;\n }\n\n .c1 {\n width: auto;\n margin: 0 1rem 0 0;\n }\n\n .c1:first-child {\n margin-bottom: 0;\n }\n\n .c2 {\n width: auto;\n margin: 0;\n padding: 0;\n list-style: none;\n }\n\n .c3 {\n width: 40px;\n height: 40px;\n display: inline-block;\n margin: 0.5rem;\n }\n\n <div\n className=\"c0\"\n >\n <p\n className=\"c1\"\n >\n Share with:\n </p>\n <ul\n className=\"c2\"\n >\n <li\n className=\"c3\"\n >\n <a\n className=\"c4\"\n data-test=\"icon-share-button-facebook\"\n href=\"#\"\n onClick={[Function]}\n rel=\"noopener noreferrer\"\n role=\"button\"\n target=\"__blank\"\n title=\"Share on Facebook\"\n >\n <img\n alt=\"comicrelief\"\n className=\"c5\"\n src=\"mock.asset\"\n />\n </a>\n </li>\n <li\n className=\"c3\"\n >\n <a\n className=\"c4\"\n data-test=\"icon-share-button-twitter\"\n href=\"#\"\n onClick={[Function]}\n rel=\"noopener noreferrer\"\n role=\"button\"\n target=\"__blank\"\n title=\"Share on Twitter\"\n >\n <img\n alt=\"comicrelief\"\n className=\"c5\"\n src=\"mock.asset\"\n />\n </a>\n </li>\n </ul>\n </div>\n ");
10
+ expect(tree).toMatchInlineSnapshot(`
11
+ .c4 {
12
+ -webkit-text-decoration: none;
13
+ text-decoration: none;
14
+ cursor: pointer;
15
+ display: block;
16
+ position: relative;
17
+ -webkit-transition: opacity 0.2s;
18
+ transition: opacity 0.2s;
19
+ }
20
+
21
+ .c4:hover,
22
+ .c4:focus {
23
+ opacity: 0.6;
24
+ }
25
+
26
+ .c5 {
27
+ width: 100%;
28
+ }
29
+
30
+ .c0 {
31
+ display: -webkit-box;
32
+ display: -webkit-flex;
33
+ display: -ms-flexbox;
34
+ display: flex;
35
+ -webkit-align-items: center;
36
+ -webkit-box-align: center;
37
+ -ms-flex-align: center;
38
+ align-items: center;
39
+ -webkit-box-pack: center;
40
+ -webkit-justify-content: center;
41
+ -ms-flex-pack: center;
42
+ justify-content: center;
43
+ }
44
+
45
+ .c1 {
46
+ width: auto;
47
+ margin: 0 1rem 0 0;
48
+ }
49
+
50
+ .c1:first-child {
51
+ margin-bottom: 0;
52
+ }
53
+
54
+ .c2 {
55
+ width: auto;
56
+ margin: 0;
57
+ padding: 0;
58
+ list-style: none;
59
+ }
60
+
61
+ .c3 {
62
+ width: 40px;
63
+ height: 40px;
64
+ display: inline-block;
65
+ margin: 0.5rem;
66
+ }
67
+
68
+ <div
69
+ className="c0"
70
+ >
71
+ <p
72
+ className="c1"
73
+ >
74
+ Share with:
75
+ </p>
76
+ <ul
77
+ className="c2"
78
+ >
79
+ <li
80
+ className="c3"
81
+ >
82
+ <a
83
+ className="c4"
84
+ data-test="icon-share-button-facebook"
85
+ href="#"
86
+ onClick={[Function]}
87
+ rel="noopener noreferrer"
88
+ role="button"
89
+ target="__blank"
90
+ title="Share on Facebook"
91
+ >
92
+ <img
93
+ alt="comicrelief"
94
+ className="c5"
95
+ src="mock.asset"
96
+ />
97
+ </a>
98
+ </li>
99
+ <li
100
+ className="c3"
101
+ >
102
+ <a
103
+ className="c4"
104
+ data-test="icon-share-button-twitter"
105
+ href="#"
106
+ onClick={[Function]}
107
+ rel="noopener noreferrer"
108
+ role="button"
109
+ target="__blank"
110
+ title="Share on Twitter"
111
+ >
112
+ <img
113
+ alt="comicrelief"
114
+ className="c5"
115
+ src="mock.asset"
116
+ />
117
+ </a>
118
+ </li>
119
+ </ul>
120
+ </div>
121
+ `);
11
122
  });
@@ -30,7 +30,7 @@ const schoolFetcher = async query => {
30
30
  throw new Error('Sorry, something unexpected went wrong. Please try again or enter your school manually');
31
31
  }
32
32
  };
33
- const schoolToString = school => "".concat(school.name, ", ").concat(school.post_code);
33
+ const schoolToString = school => `${school.name}, ${school.post_code}`;
34
34
 
35
35
  /**
36
36
  * The component library's school lookup component uses a typeahead/search-as-you-type approach.
@@ -58,7 +58,7 @@ const SingleMessage = _ref => {
58
58
  if (thisRef.current) {
59
59
  const thisID = getID(thisRef.current);
60
60
  if (thisID) {
61
- setUniqueID("".concat(thisID, "__video"));
61
+ setUniqueID(`${thisID}__video`);
62
62
  }
63
63
  }
64
64
  }, [thisRef]);
@@ -98,7 +98,7 @@ const SingleMessage = _ref => {
98
98
  const handlePlay = thisUniqueID => {
99
99
  setOnPlay(true);
100
100
  // Trigger play and update video state
101
- const thisVideoID = "".concat(thisUniqueID, "__video");
101
+ const thisVideoID = `${thisUniqueID}__video`;
102
102
  setTimeout(() => {
103
103
  allPlayers[thisVideoID].playVideo();
104
104
  // Once video is playing, switch state to allow CSS to show/hide relevant layers
@@ -115,12 +115,12 @@ const SingleMessage = _ref => {
115
115
  /*#__PURE__*/
116
116
  // Creates namespaced UUIDs for each row
117
117
  _react.default.createElement(_reactUid.UID, {
118
- name: id => "single-msg__".concat(id)
118
+ name: id => `single-msg__${id}`
119
119
  }, id => /*#__PURE__*/_react.default.createElement(_SingleMessage.Container, {
120
120
  backgroundColor: backgroundColor,
121
121
  copyFirst: copyFirst,
122
122
  vhFull: vhFull,
123
- id: "".concat(id),
123
+ id: `${id}`,
124
124
  isPlaying: isPlaying,
125
125
  hasVideo: hasVideo,
126
126
  landscapeVideo: landscapeVideo,
@@ -161,7 +161,7 @@ const PlayButton = exports.PlayButton = _styledComponents.default.button.withCon
161
161
  let {
162
162
  isBuffering
163
163
  } = _ref25;
164
- return isBuffering === true ? "url(".concat(_loader.default, ")") : "url(".concat(_videoPlayIcon.default, ")");
164
+ return isBuffering === true ? `url(${_loader.default})` : `url(${_videoPlayIcon.default})`;
165
165
  }, _ref26 => {
166
166
  let {
167
167
  copyFirst
@@ -176,7 +176,7 @@ const PlayButton = exports.PlayButton = _styledComponents.default.button.withCon
176
176
  let {
177
177
  isBuffering
178
178
  } = _ref28;
179
- return isBuffering === true ? "url(".concat(_loader.default, ")") : "url(".concat(_videoPlayIcon__hover.default, ")");
179
+ return isBuffering === true ? `url(${_loader.default})` : `url(${_videoPlayIcon__hover.default})`;
180
180
  }, _ref29 => {
181
181
  let {
182
182
  theme
@@ -65,6 +65,20 @@ exports[`renders Single Message with 100% vertical height image correctly 1`] =
65
65
  z-index: 1;
66
66
  }
67
67
 
68
+ @supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {
69
+ .c3 {
70
+ background-image: url(http://images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg);
71
+ background-size: cover;
72
+ background-position: center;
73
+ }
74
+ }
75
+
76
+ @supports not ((object-fit:cover) or (object-fit:contain)) {
77
+ .c4 {
78
+ visibility: hidden;
79
+ }
80
+ }
81
+
68
82
  @media (min-width:740px) {
69
83
  .c0 {
70
84
  -webkit-flex-direction: row;
@@ -278,6 +292,20 @@ exports[`renders Single Message with Image correctly 1`] = `
278
292
  z-index: 1;
279
293
  }
280
294
 
295
+ @supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {
296
+ .c3 {
297
+ background-image: url(http://images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg);
298
+ background-size: cover;
299
+ background-position: center;
300
+ }
301
+ }
302
+
303
+ @supports not ((object-fit:cover) or (object-fit:contain)) {
304
+ .c4 {
305
+ visibility: hidden;
306
+ }
307
+ }
308
+
281
309
  @media (min-width:740px) {
282
310
  .c8 {
283
311
  width: auto;
@@ -482,6 +510,20 @@ exports[`renders Single Message with double image correctly 1`] = `
482
510
  z-index: 1;
483
511
  }
484
512
 
513
+ @supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {
514
+ .c3 {
515
+ background-image: url(http://images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg);
516
+ background-size: cover;
517
+ background-position: center;
518
+ }
519
+ }
520
+
521
+ @supports not ((object-fit:cover) or (object-fit:contain)) {
522
+ .c4 {
523
+ visibility: hidden;
524
+ }
525
+ }
526
+
485
527
  @media (min-width:740px) {
486
528
  .c0 {
487
529
  -webkit-flex-direction: row;
@@ -736,6 +778,20 @@ exports[`renders Single Message with full width correctly 1`] = `
736
778
  z-index: 1;
737
779
  }
738
780
 
781
+ @supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {
782
+ .c3 {
783
+ background-image: url(http://images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg);
784
+ background-size: cover;
785
+ background-position: center;
786
+ }
787
+ }
788
+
789
+ @supports not ((object-fit:cover) or (object-fit:contain)) {
790
+ .c4 {
791
+ visibility: hidden;
792
+ }
793
+ }
794
+
739
795
  @media (min-width:740px) {
740
796
  .c8 {
741
797
  width: auto;
@@ -940,6 +996,20 @@ exports[`renders Single Message with full width image and no text correctly 1`]
940
996
  z-index: 1;
941
997
  }
942
998
 
999
+ @supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {
1000
+ .c3 {
1001
+ background-image: url(http://images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg);
1002
+ background-size: cover;
1003
+ background-position: center;
1004
+ }
1005
+ }
1006
+
1007
+ @supports not ((object-fit:cover) or (object-fit:contain)) {
1008
+ .c4 {
1009
+ visibility: hidden;
1010
+ }
1011
+ }
1012
+
943
1013
  @media (min-width:740px) {
944
1014
 
945
1015
  }
@@ -1066,6 +1136,14 @@ exports[`renders Single Message with no Image correctly 1`] = `
1066
1136
  padding: 1rem;
1067
1137
  }
1068
1138
 
1139
+ @supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {
1140
+
1141
+ }
1142
+
1143
+ @supports not ((object-fit:cover) or (object-fit:contain)) {
1144
+
1145
+ }
1146
+
1069
1147
  @media (min-width:740px) {
1070
1148
 
1071
1149
  }
@@ -145,7 +145,7 @@ const SingleMessageDs = _ref => {
145
145
  }), /*#__PURE__*/_react.default.createElement("iframe", {
146
146
  width: "100%",
147
147
  height: "100%",
148
- src: "https://www.youtube.com/embed/".concat(youTubeId, "?&autoplay=1&enablejsapi=1"),
148
+ src: `https://www.youtube.com/embed/${youTubeId}?&autoplay=1&enablejsapi=1`,
149
149
  frameBorder: "0",
150
150
  allow: "accelerometer; autoplay; clipboard-write; encrypted-media; picture-in-picture",
151
151
  allowFullScreen: true,
@@ -50,7 +50,7 @@ const MediaLink = exports.MediaLink = _styledComponents.default.a.withConfig({
50
50
  let {
51
51
  imageLeft
52
52
  } = _ref5;
53
- return imageLeft ? "margin-right: ".concat((0, _spacing.default)('m')) : "margin-left: ".concat((0, _spacing.default)('m'));
53
+ return imageLeft ? `margin-right: ${(0, _spacing.default)('m')}` : `margin-left: ${(0, _spacing.default)('m')}`;
54
54
  }, _ref6 => {
55
55
  let {
56
56
  theme
@@ -86,7 +86,7 @@ const CTA = exports.CTA = _styledComponents.default.div.withConfig({
86
86
  let {
87
87
  hasImage
88
88
  } = _ref9;
89
- return !hasImage && "bottom: -".concat((0, _spacing.default)('m'), ";");
89
+ return !hasImage && `bottom: -${(0, _spacing.default)('m')};`;
90
90
  });
91
91
  const Copy = exports.Copy = _styledComponents.default.div.withConfig({
92
92
  displayName: "SingleMessageDsstyle__Copy",
@@ -101,12 +101,12 @@ const Copy = exports.Copy = _styledComponents.default.div.withConfig({
101
101
  let {
102
102
  hasLink
103
103
  } = _ref11;
104
- return hasLink && "padding-bottom: calc(".concat((0, _spacing.default)('l'), " + ").concat((0, _spacing.default)('m'), ")");
104
+ return hasLink && `padding-bottom: calc(${(0, _spacing.default)('l')} + ${(0, _spacing.default)('m')})`;
105
105
  }, _ref12 => {
106
106
  let {
107
107
  imageLeft
108
108
  } = _ref12;
109
- return imageLeft ? "margin: -".concat((0, _spacing.default)('m'), " 0 ").concat((0, _spacing.default)('m'), " ").concat((0, _spacing.default)('m'), "; ").concat(CTA, " { right: ").concat((0, _spacing.default)('m'), ";}") : "margin: -".concat((0, _spacing.default)('m'), " ").concat((0, _spacing.default)('m'), " ").concat((0, _spacing.default)('m'), " 0; ").concat(CTA, " { left: ").concat((0, _spacing.default)('m'), ";}");
109
+ return imageLeft ? `margin: -${(0, _spacing.default)('m')} 0 ${(0, _spacing.default)('m')} ${(0, _spacing.default)('m')}; ${CTA} { right: ${(0, _spacing.default)('m')};}` : `margin: -${(0, _spacing.default)('m')} ${(0, _spacing.default)('m')} ${(0, _spacing.default)('m')} 0; ${CTA} { left: ${(0, _spacing.default)('m')};}`;
110
110
  }, _ref13 => {
111
111
  let {
112
112
  theme
@@ -116,12 +116,12 @@ const Copy = exports.Copy = _styledComponents.default.div.withConfig({
116
116
  let {
117
117
  hasLink
118
118
  } = _ref14;
119
- return hasLink && "padding-bottom: calc(".concat((0, _spacing.default)('l'), " + ").concat((0, _spacing.default)('m'), ")");
119
+ return hasLink && `padding-bottom: calc(${(0, _spacing.default)('l')} + ${(0, _spacing.default)('m')})`;
120
120
  }, _ref15 => {
121
121
  let {
122
122
  imageLeft
123
123
  } = _ref15;
124
- return imageLeft ? "margin: ".concat((0, _spacing.default)('l'), " 0 ").concat((0, _spacing.default)('m'), " -").concat((0, _spacing.default)('m')) : "margin: ".concat((0, _spacing.default)('l'), " -").concat((0, _spacing.default)('m'), " ").concat((0, _spacing.default)('m'), " 0");
124
+ return imageLeft ? `margin: ${(0, _spacing.default)('l')} 0 ${(0, _spacing.default)('m')} -${(0, _spacing.default)('m')}` : `margin: ${(0, _spacing.default)('l')} -${(0, _spacing.default)('m')} ${(0, _spacing.default)('m')} 0`;
125
125
  }, _ref16 => {
126
126
  let {
127
127
  theme
@@ -131,10 +131,10 @@ const Copy = exports.Copy = _styledComponents.default.div.withConfig({
131
131
  let {
132
132
  hasLink
133
133
  } = _ref17;
134
- return hasLink && "padding-bottom: calc(".concat((0, _spacing.default)('m'), " * 3)");
134
+ return hasLink && `padding-bottom: calc(${(0, _spacing.default)('m')} * 3)`;
135
135
  }, _ref18 => {
136
136
  let {
137
137
  imageLeft
138
138
  } = _ref18;
139
- return imageLeft ? "".concat((0, _spacing.default)('l'), " 0 ").concat((0, _spacing.default)('m'), " -").concat((0, _spacing.default)('l')) : "".concat((0, _spacing.default)('l'), " -").concat((0, _spacing.default)('l'), " ").concat((0, _spacing.default)('m'), " 0");
139
+ return imageLeft ? `${(0, _spacing.default)('l')} 0 ${(0, _spacing.default)('m')} -${(0, _spacing.default)('l')}` : `${(0, _spacing.default)('l')} -${(0, _spacing.default)('l')} ${(0, _spacing.default)('m')} 0`;
140
140
  });
@@ -153,6 +153,20 @@ exports[`renders correctly 1`] = `
153
153
  right: 1.5rem;
154
154
  }
155
155
 
156
+ @supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {
157
+ .c3 {
158
+ background-image: url(//images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg);
159
+ background-size: cover;
160
+ background-position: center;
161
+ }
162
+ }
163
+
164
+ @supports not ((object-fit:cover) or (object-fit:contain)) {
165
+ .c4 {
166
+ visibility: hidden;
167
+ }
168
+ }
169
+
156
170
  @media (min-width:740px) {
157
171
  .c12 {
158
172
  width: auto;