@comicrelief/component-library 8.45.0 → 8.47.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 (62) hide show
  1. package/dist/components/Atoms/Icons/CtaArrow.js +74 -0
  2. package/dist/components/Atoms/Icons/index.js +8 -1
  3. package/dist/components/Atoms/Link/Link.style.js +27 -21
  4. package/dist/components/Atoms/Link/Link.test.js +24 -1
  5. package/dist/components/Molecules/CardDs/__snapshots__/CardDs.test.js.snap +48 -2
  6. package/dist/components/Molecules/HeroBanner/HeroBanner.js +75 -31
  7. package/dist/components/Molecules/HeroBanner/HeroBanner.md +176 -6
  8. package/dist/components/Molecules/HeroBanner/HeroBanner.style.js +232 -0
  9. package/dist/components/Molecules/HeroBanner/HeroBanner.test.js +67 -0
  10. package/dist/components/Molecules/HeroBanner/__snapshots__/HeroBanner.test.js.snap +882 -0
  11. package/dist/components/Molecules/HeroBanner/_variants.js +12 -0
  12. package/dist/components/Molecules/HeroBanner/assets/Pause--black.svg +3 -0
  13. package/dist/components/Molecules/HeroBanner/assets/Pause--white.svg +3 -0
  14. package/dist/components/Molecules/HeroBanner/assets/Play--black.svg +3 -0
  15. package/dist/components/Molecules/HeroBanner/assets/Play--white.svg +3 -0
  16. package/dist/components/Molecules/HeroBanner/assets/alt_cta_underline.svg +3 -0
  17. package/dist/components/Molecules/HeroBanner/assets/arrow-right.svg +3 -0
  18. package/dist/components/Molecules/HeroBanner/assets/loader.svg +1 -0
  19. package/dist/components/Molecules/HeroBanner/assets/video--play-icon.svg +1 -0
  20. package/dist/components/Molecules/HeroBanner/assets/video--play-icon__hover.svg +1 -0
  21. package/dist/components/Molecules/HeroBanner/local-preview-layout-fixes.css +6 -0
  22. package/dist/components/Molecules/Promo/__snapshots__/Promo.test.js.snap +48 -2
  23. package/dist/components/Molecules/SingleMessage/__snapshots__/SingleMessage.test.js.snap +64 -2
  24. package/dist/components/Molecules/SingleMessageDS/__snapshots__/SingleMessageDs.test.js.snap +24 -1
  25. package/dist/components/Organisms/CookieBanner/CookieBanner.test.js +24 -1
  26. package/dist/index.js +1 -1
  27. package/dist/styleguide/assets/PromoLW.jpg +0 -0
  28. package/dist/styleguide/data/data.js +1 -0
  29. package/dist/theme/shared/animations.js +23 -2
  30. package/dist/theme/shared/global.css +1 -1
  31. package/package.json +1 -1
  32. package/src/components/Atoms/Icons/CtaArrow.js +55 -0
  33. package/src/components/Atoms/Icons/index.js +1 -0
  34. package/src/components/Atoms/Link/Link.js +1 -1
  35. package/src/components/Atoms/Link/Link.style.js +8 -1
  36. package/src/components/Atoms/Link/Link.test.js +24 -1
  37. package/src/components/Molecules/CardDs/__snapshots__/CardDs.test.js.snap +48 -2
  38. package/src/components/Molecules/HeroBanner/HeroBanner.js +145 -49
  39. package/src/components/Molecules/HeroBanner/HeroBanner.md +176 -6
  40. package/src/components/Molecules/HeroBanner/HeroBanner.style.js +239 -0
  41. package/src/components/Molecules/HeroBanner/HeroBanner.test.js +89 -0
  42. package/src/components/Molecules/HeroBanner/__snapshots__/HeroBanner.test.js.snap +882 -0
  43. package/src/components/Molecules/HeroBanner/_variants.js +7 -0
  44. package/src/components/Molecules/HeroBanner/assets/Pause--black.svg +3 -0
  45. package/src/components/Molecules/HeroBanner/assets/Pause--white.svg +3 -0
  46. package/src/components/Molecules/HeroBanner/assets/Play--black.svg +3 -0
  47. package/src/components/Molecules/HeroBanner/assets/Play--white.svg +3 -0
  48. package/src/components/Molecules/HeroBanner/assets/alt_cta_underline.svg +3 -0
  49. package/src/components/Molecules/HeroBanner/assets/arrow-right.svg +3 -0
  50. package/src/components/Molecules/HeroBanner/assets/loader.svg +1 -0
  51. package/src/components/Molecules/HeroBanner/assets/video--play-icon.svg +1 -0
  52. package/src/components/Molecules/HeroBanner/assets/video--play-icon__hover.svg +1 -0
  53. package/src/components/Molecules/HeroBanner/local-preview-layout-fixes.css +6 -0
  54. package/src/components/Molecules/Promo/__snapshots__/Promo.test.js.snap +48 -2
  55. package/src/components/Molecules/SingleMessage/__snapshots__/SingleMessage.test.js.snap +64 -2
  56. package/src/components/Molecules/SingleMessageDS/__snapshots__/SingleMessageDs.test.js.snap +24 -1
  57. package/src/components/Organisms/CookieBanner/CookieBanner.test.js +24 -1
  58. package/src/index.js +1 -1
  59. package/src/styleguide/assets/PromoLW.jpg +0 -0
  60. package/src/styleguide/data/data.js +1 -0
  61. package/src/theme/shared/animations.js +29 -1
  62. package/src/theme/shared/global.css +1 -1
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ const variants = {
8
+ FULL_HEIGHT: 'full_height_media',
9
+ HALF_HEIGHT: 'half_height_media',
10
+ TEXT_BANNER: 'text_banner'
11
+ };
12
+ var _default = exports.default = variants;
@@ -0,0 +1,3 @@
1
+ <svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M12 6C10.8954 6 10 6.89543 10 8V40C10 41.1046 10.8954 42 12 42H17C18.1046 42 19 41.1046 19 40V8C19 6.89543 18.1046 6 17 6H12ZM31 6C29.8954 6 29 6.89543 29 8V40C29 41.1046 29.8954 42 31 42H36C37.1046 42 38 41.1046 38 40V8C38 6.89543 37.1046 6 36 6H31Z" fill="#222222"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M12 6C10.8954 6 10 6.89543 10 8V40C10 41.1046 10.8954 42 12 42H17C18.1046 42 19 41.1046 19 40V8C19 6.89543 18.1046 6 17 6H12ZM31 6C29.8954 6 29 6.89543 29 8V40C29 41.1046 29.8954 42 31 42H36C37.1046 42 38 41.1046 38 40V8C38 6.89543 37.1046 6 36 6H31Z" fill="#FFFFFF"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M39.6845 22.5846L11.457 6.22056C10.9505 5.92706 10.326 5.92656 9.819 6.21856C9.3125 6.51056 9 7.05156 9 7.63656V40.3641C9 40.9491 9.3125 41.4901 9.8195 41.7821C10.0725 41.9276 10.3545 42.0001 10.6365 42.0001C10.92 42.0001 11.2035 41.9266 11.4575 41.7796L39.685 25.4161C40.189 25.1231 40.5 24.5836 40.5 24.0001C40.5 23.4166 40.189 22.8771 39.6845 22.5846Z" fill="#222222"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M39.6845 22.5846L11.457 6.22056C10.9505 5.92706 10.326 5.92656 9.819 6.21856C9.3125 6.51056 9 7.05156 9 7.63656V40.3641C9 40.9491 9.3125 41.4901 9.8195 41.7821C10.0725 41.9276 10.3545 42.0001 10.6365 42.0001C10.92 42.0001 11.2035 41.9266 11.4575 41.7796L39.685 25.4161C40.189 25.1231 40.5 24.5836 40.5 24.0001C40.5 23.4166 40.189 22.8771 39.6845 22.5846Z" fill="#FFFFFF"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg width="198" height="4" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M16.8487 0.0995634C18.4146 -0.0553036 21.4342 0.00794268 23.0951 0.0426774C23.1256 0.0432472 23.156 0.0438168 23.1865 0.0443864C23.5807 0.0526142 23.9536 0.0547516 24.3905 0.0570819C25.4322 0.0626388 26.8397 0.0701852 29.7773 0.1689C30.632 0.165263 31.4869 0.163285 32.3416 0.163285C41.572 0.163287 50.8024 0.29205 60.0328 0.446249C60.1494 0.445454 60.268 0.444635 60.3878 0.443808C62.7029 0.427827 65.5737 0.408052 67.3774 0.46456C69.6707 0.536405 71.2283 0.603072 72.5075 0.660609C79.839 0.784683 87.1706 0.895552 94.5021 0.941376C96.7999 0.955737 99.098 0.963592 101.396 0.963593C103.512 0.963593 105.628 0.958676 107.744 0.949433C108.977 0.915729 110.148 0.875687 111.235 0.838591C112.761 0.786463 114.12 0.74017 115.243 0.725063C117.948 0.68867 121.016 0.74611 123.295 0.788785C123.667 0.795759 124.019 0.802363 124.344 0.808073C126.153 0.786935 127.963 0.764306 129.773 0.741177C129.894 0.754045 130.015 0.767463 130.139 0.781217C131.684 0.952869 133.582 0.950669 136.571 0.947479C137.872 0.946091 139.38 0.944586 141.156 0.957001C142.3 0.965001 142.888 1.03306 143.368 1.0886C143.51 1.10493 143.642 1.1202 143.776 1.13254C144.236 1.17481 144.721 1.12913 145.293 1.07517C146.036 1.00516 146.926 0.92108 148.103 0.997041C151.854 1.23908 153.506 1.07487 154.756 0.950654C155.123 0.914216 155.455 0.881293 155.796 0.863005C156.899 0.803725 158.471 0.86246 159.659 0.943085C160.601 1.00702 162.486 0.943636 163.915 0.863005C164.456 0.832517 165.186 0.831751 166.047 0.831022C166.938 0.830269 167.969 0.829583 169.072 0.795377C171.858 0.708937 173.339 0.66704 174.529 0.633509C174.869 0.623949 175.185 0.615244 175.501 0.606165C176.499 0.577475 177.737 0.553839 178.991 0.529991C180.492 0.501453 182.015 0.472475 183.173 0.433798C186.177 0.47473 189.18 0.525369 192.183 0.575891C193.726 0.60212 195.206 0.749846 196.297 0.993379C197.387 1.23711 198 1.55491 198 1.88426C198 2.21363 197.387 2.53141 196.297 2.77515C195.206 3.01868 193.726 3.16665 192.183 3.19288C189.076 3.24516 185.968 3.29747 182.86 3.33913C179.074 3.38986 175.288 3.42482 171.502 3.42482C168.854 3.42482 166.205 3.41697 163.557 3.40285C163.284 3.40139 163.012 3.39979 162.739 3.39821C160.514 3.47931 158.294 3.55307 156.729 3.57936C155.437 3.60107 154.496 3.55779 153.689 3.52077C153.134 3.49529 152.643 3.47275 152.146 3.47634C151.879 3.47826 151.514 3.48327 151.075 3.48928C149.28 3.51382 146.231 3.55547 143.45 3.47634C142.216 3.44122 140.782 3.37201 139.414 3.30592C137.457 3.21143 135.632 3.12335 134.71 3.1504C133.092 3.19794 131.237 3.1577 129.598 3.12208C128.034 3.0881 126.666 3.05843 125.888 3.11329C124.959 3.17888 124.166 3.15214 122.988 3.11256C122.171 3.0851 121.168 3.05159 119.804 3.03809C118.23 3.02252 117.117 2.97657 116.17 2.93751C114.838 2.88252 113.836 2.84119 112.343 2.91724C110.683 3.00174 108.949 3.05551 107.583 3.02882C106.961 3.01666 106.25 3.01961 105.509 3.02271C104.529 3.02682 103.498 3.03106 102.557 3.00074C101.781 2.97575 101.14 2.91181 100.573 2.85523C100.396 2.83758 100.226 2.82073 100.061 2.80591C99.4434 2.80673 98.8255 2.80793 98.2077 2.80982C98.1076 2.82011 98.0025 2.83151 97.8927 2.84327C97.3419 2.90229 96.6646 2.97468 95.8262 3.01075C94.4992 3.06783 93.3347 3.03209 92.1063 2.99415C91.1499 2.96461 90.1548 2.93378 89.014 2.94483C88.2362 2.95237 87.3504 2.97851 86.4724 3.0044C85.1684 3.04286 83.8806 3.0807 82.9859 3.05665C82.6507 3.04763 82.3625 3.00748 82.0773 2.96754C82.076 2.96729 82.0748 2.96705 82.0735 2.9668C82.0541 2.96409 82.0347 2.96145 82.0153 2.95875C79.8363 2.98934 77.6571 3.02307 75.4781 3.0586C75.2893 3.06892 75.0985 3.0791 74.9094 3.08912C73.9854 3.13809 73.0876 3.18565 72.5022 3.25319C71.8678 3.32639 70.2728 3.36896 68.592 3.41383C67.4913 3.44322 66.3532 3.47357 65.4242 3.51418C64.8811 3.53791 64.3659 3.49654 63.8358 3.45387C63.3412 3.41407 62.8334 3.37322 62.2783 3.38332C62.0003 3.38838 61.7 3.40552 61.3795 3.42384C61.0974 3.43998 60.7991 3.45707 60.4867 3.46755C60.1965 3.47725 59.5503 3.45471 58.7216 3.42604C58.2095 3.40832 57.6276 3.38831 57.0168 3.37184C55.4026 3.39762 53.788 3.42235 52.1738 3.44533C51.837 3.4816 51.5448 3.52869 51.3135 3.58913C51.1475 3.6325 51.0062 3.68433 50.8611 3.73733C50.6636 3.80944 50.4592 3.88396 50.1775 3.94339C49.9574 3.98982 49.6977 4.00832 49.5234 3.98904C49.4422 3.98005 49.3799 3.9631 49.3233 3.94778C49.2584 3.93023 49.2006 3.91462 49.1299 3.91506C49.079 3.91542 49.0259 3.92785 48.9607 3.9429C48.8566 3.96693 48.7211 3.99795 48.5151 3.99905C47.7482 4.00315 46.8765 3.99323 46.0226 3.98343C45.073 3.97253 44.1448 3.96196 43.4054 3.97122C42.577 3.9816 41.3966 3.93545 40.2142 3.88943C39.3894 3.85733 38.5633 3.82539 37.8546 3.81228C37.1602 3.79944 36.437 3.82497 35.7367 3.84988C34.8962 3.87978 34.0877 3.90866 33.4006 3.86819C33.2616 3.85997 33.0891 3.80993 32.8726 3.74734C32.7192 3.70297 32.5426 3.65225 32.3416 3.60549C31.467 3.60549 30.5923 3.60343 29.7177 3.59963C29.6869 3.60642 29.6551 3.61333 29.6233 3.62038C29.6228 3.62054 29.6223 3.62071 29.6217 3.62087C28.9034 3.78008 27.9204 3.99786 26.5393 3.86794C26.1883 3.83492 25.9673 3.77392 25.7682 3.71902C25.5726 3.6651 25.3978 3.61685 25.142 3.60671C24.8514 3.59522 24.5084 3.62833 24.1344 3.66433C23.6093 3.71488 23.0228 3.77136 22.4342 3.71877C22.394 3.71518 22.3508 3.71124 22.3058 3.7073C21.8792 3.66989 21.2477 3.61455 20.6192 3.50319C18.7547 3.47346 16.8899 3.43865 15.0254 3.40065C11.9174 3.3373 8.80877 3.26507 5.70108 3.19288C4.18915 3.15735 2.73913 3.0057 1.66999 2.76294C0.600791 2.51984 0 2.20742 0 1.88426C8.923e-05 1.56114 0.600871 1.24891 1.66999 1.00583C2.73913 0.763056 4.18909 0.611426 5.70108 0.575891C8.16655 0.518618 10.6328 0.461263 13.0986 0.408407C13.2278 0.401696 13.3576 0.395205 13.4868 0.389119C14.448 0.343838 15.3399 0.252889 16.2324 0.16182C16.4374 0.140902 16.6428 0.119938 16.8487 0.0995634Z" fill="#E52630"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg width="15" height="14" viewBox="0 0 15 14" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M14.3208 7.46263C14.3183 7.4653 14.3167 7.46863 14.314 7.4713L9.22291 12.8047C9.09865 12.9348 8.9359 13 8.77299 13C8.61007 13 8.44732 12.9348 8.3229 12.8048C8.0744 12.5445 8.0744 12.1223 8.3229 11.862L12.3277 7.66663H1.13638C0.784941 7.66663 0.5 7.36813 0.5 6.99996C0.5 6.63179 0.784941 6.33329 1.13638 6.33329H12.3277L8.3229 2.13809C8.0744 1.87776 8.0744 1.45559 8.3229 1.19525C8.57141 0.934916 8.9744 0.934916 9.22291 1.19525L14.314 6.52862C14.3165 6.53129 14.3183 6.53462 14.3208 6.53729C14.3474 6.56596 14.3719 6.59679 14.3932 6.63012C14.4042 6.64746 14.412 6.66612 14.4212 6.68429C14.4315 6.70446 14.4432 6.72362 14.4516 6.74496C14.4607 6.76779 14.4659 6.79146 14.4723 6.81496C14.4774 6.83312 14.4841 6.85062 14.4877 6.86946C14.5041 6.95579 14.5041 7.04463 14.4877 7.13079C14.4841 7.14963 14.4774 7.16696 14.4723 7.18529C14.4658 7.20879 14.4605 7.23246 14.4516 7.25529C14.4432 7.27663 14.4315 7.29579 14.4212 7.31596C14.4118 7.33413 14.4042 7.35279 14.3932 7.37013C14.3719 7.4033 14.3474 7.43396 14.3208 7.46263Z" fill="white" stroke="white"/>
3
+ </svg>
@@ -0,0 +1 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.0" width="200px" height="200px" viewBox="0 0 128 128" xml:space="preserve"><g><circle cx="16" cy="64" r="16" fill="#000"/><circle cx="16" cy="64" r="16" fill="#555" transform="rotate(45,64,64)"/><circle cx="16" cy="64" r="16" fill="#949494" transform="rotate(90,64,64)"/><circle cx="16" cy="64" r="16" fill="#ccc" transform="rotate(135,64,64)"/><circle cx="16" cy="64" r="16" fill="#e1e1e1" transform="rotate(180,64,64)"/><circle cx="16" cy="64" r="16" fill="#e1e1e1" transform="rotate(225,64,64)"/><circle cx="16" cy="64" r="16" fill="#e1e1e1" transform="rotate(270,64,64)"/><circle cx="16" cy="64" r="16" fill="#e1e1e1" transform="rotate(315,64,64)"/><animateTransform attributeName="transform" type="rotate" values="0 64 64;315 64 64;270 64 64;225 64 64;180 64 64;135 64 64;90 64 64;45 64 64" calcMode="discrete" dur="720ms" repeatCount="indefinite"></animateTransform></g></svg>
@@ -0,0 +1 @@
1
+ <svg id="play_icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><style>.st0{fill:#2c0230}.st1{fill:#fff}</style><circle class="st0" cx="50" cy="50" r="50" id="bg"/><path id="play" class="st1" d="M37 35v30l29-15z"/></svg>
@@ -0,0 +1 @@
1
+ <svg id="play_icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><style>.st0{fill:#fff}.st1{fill:#2c0230}</style><circle class="st0" cx="50" cy="50" r="50" id="bg"/><path class="st1" d="M37 35v30l29-15z" id="play"/></svg>
@@ -0,0 +1,6 @@
1
+ .rsg--content-3 {
2
+ padding: 0;
3
+ div[data-preview="HeroBanner"]{
4
+ padding: 0;
5
+ }
6
+ }
@@ -75,7 +75,6 @@ exports[`renders Promo correctly 1`] = `
75
75
  padding: 0.5rem 1.25rem;
76
76
  -webkit-text-decoration: none;
77
77
  text-decoration: none;
78
- font-weight: 700;
79
78
  font-size: 1rem;
80
79
  border-radius: 2rem;
81
80
  -webkit-transition: all 0.3s;
@@ -91,6 +90,16 @@ exports[`renders Promo correctly 1`] = `
91
90
  -ms-flex-align: center;
92
91
  align-items: center;
93
92
  cursor: pointer;
93
+ font-family: 'Montserrat',Helvetica,Arial,sans-serif;
94
+ font-weight: 400;
95
+ text-transform: inherit;
96
+ -webkit-letter-spacing: 0;
97
+ -moz-letter-spacing: 0;
98
+ -ms-letter-spacing: 0;
99
+ letter-spacing: 0;
100
+ font-size: 1rem;
101
+ line-height: 1.25rem;
102
+ font-weight: 700;
94
103
  background-color: #FFFFFF;
95
104
  color: #000000;
96
105
  }
@@ -208,6 +217,20 @@ exports[`renders Promo correctly 1`] = `
208
217
  }
209
218
  }
210
219
 
220
+ @media (min-width:740px) {
221
+ .c9 {
222
+ font-size: 1rem;
223
+ line-height: 1.25rem;
224
+ }
225
+ }
226
+
227
+ @media (min-width:1024px) {
228
+ .c9 {
229
+ font-size: 1.125rem;
230
+ line-height: 1.375rem;
231
+ }
232
+ }
233
+
211
234
  @media (min-width:740px) {
212
235
  .c9 {
213
236
  width: auto;
@@ -401,7 +424,6 @@ exports[`renders Promo correctly end position 1`] = `
401
424
  padding: 0.5rem 1.25rem;
402
425
  -webkit-text-decoration: none;
403
426
  text-decoration: none;
404
- font-weight: 700;
405
427
  font-size: 1rem;
406
428
  border-radius: 2rem;
407
429
  -webkit-transition: all 0.3s;
@@ -417,6 +439,16 @@ exports[`renders Promo correctly end position 1`] = `
417
439
  -ms-flex-align: center;
418
440
  align-items: center;
419
441
  cursor: pointer;
442
+ font-family: 'Montserrat',Helvetica,Arial,sans-serif;
443
+ font-weight: 400;
444
+ text-transform: inherit;
445
+ -webkit-letter-spacing: 0;
446
+ -moz-letter-spacing: 0;
447
+ -ms-letter-spacing: 0;
448
+ letter-spacing: 0;
449
+ font-size: 1rem;
450
+ line-height: 1.25rem;
451
+ font-weight: 700;
420
452
  background-color: #FFFFFF;
421
453
  color: #000000;
422
454
  }
@@ -537,6 +569,20 @@ exports[`renders Promo correctly end position 1`] = `
537
569
  }
538
570
  }
539
571
 
572
+ @media (min-width:740px) {
573
+ .c9 {
574
+ font-size: 1rem;
575
+ line-height: 1.25rem;
576
+ }
577
+ }
578
+
579
+ @media (min-width:1024px) {
580
+ .c9 {
581
+ font-size: 1.125rem;
582
+ line-height: 1.375rem;
583
+ }
584
+ }
585
+
540
586
  @media (min-width:740px) {
541
587
  .c9 {
542
588
  width: auto;
@@ -267,7 +267,6 @@ exports[`renders Single Message with Image correctly 1`] = `
267
267
  padding: 0.5rem 1.25rem;
268
268
  -webkit-text-decoration: none;
269
269
  text-decoration: none;
270
- font-weight: 700;
271
270
  font-size: 1rem;
272
271
  border-radius: 2rem;
273
272
  -webkit-transition: all 0.3s;
@@ -283,6 +282,16 @@ exports[`renders Single Message with Image correctly 1`] = `
283
282
  -ms-flex-align: center;
284
283
  align-items: center;
285
284
  cursor: pointer;
285
+ font-family: 'Montserrat',Helvetica,Arial,sans-serif;
286
+ font-weight: 400;
287
+ text-transform: inherit;
288
+ -webkit-letter-spacing: 0;
289
+ -moz-letter-spacing: 0;
290
+ -ms-letter-spacing: 0;
291
+ letter-spacing: 0;
292
+ font-size: 1rem;
293
+ line-height: 1.25rem;
294
+ font-weight: 700;
286
295
  background-color: #FFFFFF;
287
296
  color: #000000;
288
297
  }
@@ -361,6 +370,20 @@ exports[`renders Single Message with Image correctly 1`] = `
361
370
  }
362
371
  }
363
372
 
373
+ @media (min-width:740px) {
374
+ .c8 {
375
+ font-size: 1rem;
376
+ line-height: 1.25rem;
377
+ }
378
+ }
379
+
380
+ @media (min-width:1024px) {
381
+ .c8 {
382
+ font-size: 1.125rem;
383
+ line-height: 1.375rem;
384
+ }
385
+ }
386
+
364
387
  @media (min-width:740px) {
365
388
  .c8 {
366
389
  width: auto;
@@ -804,7 +827,6 @@ exports[`renders Single Message with full width correctly 1`] = `
804
827
  padding: 0.5rem 1.25rem;
805
828
  -webkit-text-decoration: none;
806
829
  text-decoration: none;
807
- font-weight: 700;
808
830
  font-size: 1rem;
809
831
  border-radius: 2rem;
810
832
  -webkit-transition: all 0.3s;
@@ -820,6 +842,16 @@ exports[`renders Single Message with full width correctly 1`] = `
820
842
  -ms-flex-align: center;
821
843
  align-items: center;
822
844
  cursor: pointer;
845
+ font-family: 'Montserrat',Helvetica,Arial,sans-serif;
846
+ font-weight: 400;
847
+ text-transform: inherit;
848
+ -webkit-letter-spacing: 0;
849
+ -moz-letter-spacing: 0;
850
+ -ms-letter-spacing: 0;
851
+ letter-spacing: 0;
852
+ font-size: 1rem;
853
+ line-height: 1.25rem;
854
+ font-weight: 700;
823
855
  background-color: #FFFFFF;
824
856
  color: #000000;
825
857
  }
@@ -898,6 +930,20 @@ exports[`renders Single Message with full width correctly 1`] = `
898
930
  }
899
931
  }
900
932
 
933
+ @media (min-width:740px) {
934
+ .c8 {
935
+ font-size: 1rem;
936
+ line-height: 1.25rem;
937
+ }
938
+ }
939
+
940
+ @media (min-width:1024px) {
941
+ .c8 {
942
+ font-size: 1.125rem;
943
+ line-height: 1.375rem;
944
+ }
945
+ }
946
+
901
947
  @media (min-width:740px) {
902
948
  .c8 {
903
949
  width: auto;
@@ -1106,6 +1152,14 @@ exports[`renders Single Message with full width image and no text correctly 1`]
1106
1152
 
1107
1153
  }
1108
1154
 
1155
+ @media (min-width:740px) {
1156
+
1157
+ }
1158
+
1159
+ @media (min-width:1024px) {
1160
+
1161
+ }
1162
+
1109
1163
  @media (min-width:740px) {
1110
1164
  .c0 {
1111
1165
  -webkit-flex-direction: row;
@@ -1260,6 +1314,14 @@ exports[`renders Single Message with no Image correctly 1`] = `
1260
1314
 
1261
1315
  }
1262
1316
 
1317
+ @media (min-width:740px) {
1318
+
1319
+ }
1320
+
1321
+ @media (min-width:1024px) {
1322
+
1323
+ }
1324
+
1263
1325
  @media (min-width:740px) {
1264
1326
  .c0 {
1265
1327
  -webkit-flex-direction: row;
@@ -83,7 +83,6 @@ exports[`renders correctly 1`] = `
83
83
  padding: 0.5rem 1.25rem;
84
84
  -webkit-text-decoration: none;
85
85
  text-decoration: none;
86
- font-weight: 700;
87
86
  font-size: 1rem;
88
87
  border-radius: 2rem;
89
88
  -webkit-transition: all 0.3s;
@@ -99,6 +98,16 @@ exports[`renders correctly 1`] = `
99
98
  -ms-flex-align: center;
100
99
  align-items: center;
101
100
  cursor: pointer;
101
+ font-family: 'Montserrat',Helvetica,Arial,sans-serif;
102
+ font-weight: 400;
103
+ text-transform: inherit;
104
+ -webkit-letter-spacing: 0;
105
+ -moz-letter-spacing: 0;
106
+ -ms-letter-spacing: 0;
107
+ letter-spacing: 0;
108
+ font-size: 1rem;
109
+ line-height: 1.25rem;
110
+ font-weight: 700;
102
111
  background-color: #2042AD;
103
112
  color: #FFFFFF;
104
113
  }
@@ -218,6 +227,20 @@ exports[`renders correctly 1`] = `
218
227
  }
219
228
  }
220
229
 
230
+ @media (min-width:740px) {
231
+ .c11 {
232
+ font-size: 1rem;
233
+ line-height: 1.25rem;
234
+ }
235
+ }
236
+
237
+ @media (min-width:1024px) {
238
+ .c11 {
239
+ font-size: 1.125rem;
240
+ line-height: 1.375rem;
241
+ }
242
+ }
243
+
221
244
  @media (min-width:740px) {
222
245
  .c11 {
223
246
  width: auto;
@@ -62,7 +62,6 @@ it('renders correctly', () => {
62
62
  padding: 0.5rem 1.25rem;
63
63
  -webkit-text-decoration: none;
64
64
  text-decoration: none;
65
- font-weight: 700;
66
65
  font-size: 1rem;
67
66
  border-radius: 2rem;
68
67
  -webkit-transition: all 0.3s;
@@ -78,6 +77,16 @@ it('renders correctly', () => {
78
77
  -ms-flex-align: center;
79
78
  align-items: center;
80
79
  cursor: pointer;
80
+ font-family: 'Montserrat',Helvetica,Arial,sans-serif;
81
+ font-weight: 400;
82
+ text-transform: inherit;
83
+ -webkit-letter-spacing: 0;
84
+ -moz-letter-spacing: 0;
85
+ -ms-letter-spacing: 0;
86
+ letter-spacing: 0;
87
+ font-size: 1rem;
88
+ line-height: 1.25rem;
89
+ font-weight: 700;
81
90
  background-color: #FFFFFF;
82
91
  color: #000000;
83
92
  }
@@ -136,6 +145,20 @@ it('renders correctly', () => {
136
145
  }
137
146
  }
138
147
 
148
+ @media (min-width:740px) {
149
+ .c5 {
150
+ font-size: 1rem;
151
+ line-height: 1.25rem;
152
+ }
153
+ }
154
+
155
+ @media (min-width:1024px) {
156
+ .c5 {
157
+ font-size: 1.125rem;
158
+ line-height: 1.375rem;
159
+ }
160
+ }
161
+
139
162
  @media (min-width:740px) {
140
163
  .c5 {
141
164
  width: auto;
package/dist/index.js CHANGED
@@ -465,7 +465,6 @@ var _ButtonWithStates = _interopRequireDefault(require("./components/Atoms/Butto
465
465
  var _Confetti = _interopRequireDefault(require("./components/Atoms/Confetti/Confetti"));
466
466
  var _External = _interopRequireDefault(require("./components/Atoms/Icons/External"));
467
467
  var _Internal = _interopRequireDefault(require("./components/Atoms/Icons/Internal"));
468
- var _HeroBanner = _interopRequireDefault(require("./components/Molecules/HeroBanner/HeroBanner"));
469
468
  var _InfoBanner = _interopRequireDefault(require("./components/Molecules/InfoBanner/InfoBanner"));
470
469
  var _SingleMessage = _interopRequireDefault(require("./components/Molecules/SingleMessage/SingleMessage"));
471
470
  var _Card = _interopRequireDefault(require("./components/Molecules/Card/Card"));
@@ -496,6 +495,7 @@ var _Descriptor = _interopRequireDefault(require("./components/Molecules/Descrip
496
495
  var _Lookup = _interopRequireDefault(require("./components/Molecules/Lookup/Lookup"));
497
496
  var _SimpleSchoolLookup = _interopRequireDefault(require("./components/Molecules/SimpleSchoolLookup/SimpleSchoolLookup"));
498
497
  var _LogoLinked = _interopRequireDefault(require("./components/Molecules/LogoLinked/LogoLinked"));
498
+ var _HeroBanner = _interopRequireDefault(require("./components/Molecules/HeroBanner/HeroBanner"));
499
499
  var _EmailSignUp = require("./components/Organisms/EmailSignUp/_EmailSignUp");
500
500
  var _CookieBanner = _interopRequireDefault(require("./components/Organisms/CookieBanner/CookieBanner"));
501
501
  var _Membership = _interopRequireDefault(require("./components/Organisms/Membership/Membership"));
@@ -14,6 +14,7 @@ const defaultData = exports.defaultData = {
14
14
  },
15
15
  ctaText: 'Find out how',
16
16
  promoImage: '../promo.jpg',
17
+ heroBannerImage: '../PromoLW.jpg',
17
18
  imageLow: 'http://images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg?w=100&h=50&q=100',
18
19
  image: 'http://images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg',
19
20
  images: '//images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg?w=200&h=150&q=50 200w,//images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg?w=400&h=300&q=50 400w,//images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg?w=800&h=600&q=50 800w,//images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg?w=1200&h=900&q=50 1200w,//images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg?w=1440&h=1080&q=50 1440w'
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.springScaleAnimation = exports.logoRotateAnimation = void 0;
6
+ exports.springScaleAnimation = exports.logoRotateAnimation = exports.bounceUpAnimation = void 0;
7
7
  var _styledComponents = require("styled-components");
8
8
  /**
9
9
  * Logo rotation animation on hover
@@ -43,4 +43,25 @@ const springScaleAnimation = function (animateScale) {
43
43
  const duration = 0.2 + bounceIntensity * 0.1;
44
44
  return (0, _styledComponents.css)(["transition:transform ", "s cubic-bezier(0.68,", ",0.265,", ");transform-origin:center;&:hover,&:focus{transform:scale(", ");}"], duration, pullBack, overshoot, scaleFactor);
45
45
  };
46
- exports.springScaleAnimation = springScaleAnimation;
46
+
47
+ /**
48
+ * bounceUpAnimation animation on hover
49
+ * Applies a smooth spring-like position transition that moves the element up on hover/focus
50
+ * @param {boolean} animateScale - Whether to enable the scale animation
51
+ * @param {number} pixelMovement - Amount of movement to apply on hover
52
+ * @param {number} bounceIntensity - Intensity of the springy bounce effect (0-3, default: 1)
53
+ * @returns {css} template literal for the animation
54
+ */
55
+ exports.springScaleAnimation = springScaleAnimation;
56
+ const bounceUpAnimation = function (animateScale) {
57
+ let pixelMovement = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 10;
58
+ let bounceIntensity = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
59
+ if (!animateScale) {
60
+ return (0, _styledComponents.css)([""]);
61
+ }
62
+ const pullBack = -0.55 - bounceIntensity * 0.3;
63
+ const overshoot = 1.55 + bounceIntensity * 0.4;
64
+ const duration = 0.2 + bounceIntensity * 0.1;
65
+ return (0, _styledComponents.css)(["transition:transform ", "s cubic-bezier(0.68,", ",0.265,", ");transform-origin:center;&:hover,&:focus{transform:translateY(-", "px);}"], duration, pullBack, overshoot, pixelMovement);
66
+ };
67
+ exports.bounceUpAnimation = bounceUpAnimation;
@@ -1,4 +1,4 @@
1
- @import url('https://fonts.googleapis.com/css?family=Anton%7CMontserrat:400,700&display=swap');
1
+ @import url('https://fonts.googleapis.com/css?family=Anton%7CMontserrat:400,500,600,700&display=swap');
2
2
 
3
3
  @font-face {
4
4
  font-family: 'Founders-GroteskXCondensed-Bold';
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": "8.45.0",
4
+ "version": "8.47.0",
5
5
  "main": "dist/index.js",
6
6
  "license": "ISC",
7
7
  "jest": {
@@ -0,0 +1,55 @@
1
+ import React from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import styled, { withTheme } from 'styled-components';
4
+
5
+ const angle = {
6
+ right: '0',
7
+ left: '180deg',
8
+ down: '90deg',
9
+ up: '-90deg'
10
+ };
11
+
12
+ // The size the icon was rendered at, defining the path coordinates:
13
+ const defaultSize = 32;
14
+
15
+ const Icon = styled.svg`
16
+ transform: ${({ direction }) => `rotate(${angle[direction]})`};
17
+
18
+ rect {
19
+ fill: ${({ theme, colour }) => (theme.color(colour))};
20
+ }
21
+
22
+ path {
23
+ fill: ${({ theme }) => (theme.color('white'))};
24
+ stroke: ${({ theme }) => (theme.color('white'))};
25
+ transform: scale(${({ width }) => (width / defaultSize)});
26
+ }
27
+ `;
28
+
29
+ const CtaArrow = ({
30
+ colour = 'red', theme, size = defaultSize, direction = 'right', ...rest
31
+ }) => (
32
+
33
+ <Icon
34
+ width={size}
35
+ height={size}
36
+ viewBox={`0 0 ${size} ${size}`}
37
+ direction={direction}
38
+ colour={colour}
39
+ xmlns="http://www.w3.org/2000/svg"
40
+ defaultSize={defaultSize}
41
+ {...rest}
42
+ >
43
+ <rect width={size} height={size} rx={size / 2} />
44
+ <path d="M22.8208 16.4626C22.8183 16.4653 22.8167 16.4686 22.814 16.4713L17.7229 21.8047C17.5987 21.9348 17.4359 22 17.273 22C17.1101 22 16.9473 21.9348 16.8229 21.8048C16.5744 21.5445 16.5744 21.1223 16.8229 20.862L20.8277 16.6666H9.63638C9.28494 16.6666 9 16.3681 9 16C9 15.6318 9.28494 15.3333 9.63638 15.3333H20.8277L16.8229 11.1381C16.5744 10.8778 16.5744 10.4556 16.8229 10.1953C17.0714 9.93492 17.4744 9.93492 17.7229 10.1953L22.814 15.5286C22.8165 15.5313 22.8183 15.5346 22.8208 15.5373C22.8474 15.566 22.8719 15.5968 22.8932 15.6301C22.9042 15.6475 22.912 15.6661 22.9212 15.6843C22.9315 15.7045 22.9432 15.7236 22.9516 15.745C22.9607 15.7678 22.9659 15.7915 22.9723 15.815C22.9774 15.8331 22.9841 15.8506 22.9877 15.8695C23.0041 15.9558 23.0041 16.0446 22.9877 16.1308C22.9841 16.1496 22.9774 16.167 22.9723 16.1853C22.9658 16.2088 22.9605 16.2325 22.9516 16.2553C22.9432 16.2766 22.9315 16.2958 22.9212 16.316C22.9118 16.3341 22.9042 16.3528 22.8932 16.3701C22.8719 16.4033 22.8474 16.434 22.8208 16.4626Z" />
45
+ </Icon>
46
+ );
47
+
48
+ CtaArrow.propTypes = {
49
+ colour: PropTypes.string,
50
+ size: PropTypes.number,
51
+ direction: PropTypes.oneOf(['up', 'down', 'left', 'right']),
52
+ theme: PropTypes.objectOf(PropTypes.shape).isRequired
53
+ };
54
+
55
+ export default withTheme(CtaArrow);
@@ -5,3 +5,4 @@ export { default as Internal } from './Internal';
5
5
  export { default as Chevron } from './Chevron';
6
6
  export { default as Arrow } from './Arrow';
7
7
  export { default as AtSign } from './AtSign';
8
+ export { default as CtaArrow } from './CtaArrow';
@@ -74,7 +74,7 @@ const Link = ({
74
74
 
75
75
  Link.propTypes = {
76
76
  /** Link styling. See linkStyles in theme. */
77
- type: PropTypes.oneOf(['button', 'standard', 'standard_white']),
77
+ type: PropTypes.oneOf(['button', 'standard', 'standard_white', 'alt']), // TODO: alt styles based on Hero Banner
78
78
  /** Color for button style link. See buttonColors in theme */
79
79
  color: PropTypes.string,
80
80
  mobileColour: PropTypes.string,
@@ -1,13 +1,13 @@
1
1
  import styled, { css } from 'styled-components';
2
2
  import spacing from '../../../theme/shared/spacing';
3
3
  import hideVisually from '../../../theme/shared/hideVisually';
4
+ import fontHelper from '../../../theme/crTheme/fontHelper';
4
5
 
5
6
  const buttonStyle = () => css`
6
7
  display: inline-flex;
7
8
  position: relative;
8
9
  padding: 0.5rem 1.25rem;
9
10
  text-decoration: none;
10
- font-weight: 700;
11
11
  font-size: ${({ theme }) => theme.fontSize('s')};
12
12
  border-radius: 2rem;
13
13
  transition: all 0.3s;
@@ -16,6 +16,13 @@ const buttonStyle = () => css`
16
16
  justify-content: center;
17
17
  align-items: center;
18
18
  cursor: pointer;
19
+
20
+ ${({ theme }) => css`
21
+ ${fontHelper(theme, 'button')}
22
+ `}
23
+
24
+ font-weight: 700;
25
+
19
26
  ${({ color, theme }) => (color ? theme.buttonColors(color) : theme.buttonColors('red'))};
20
27
 
21
28
  // Override with mobile-specific colours where available:
@@ -203,7 +203,6 @@ it('renders link styled as button correctly', () => {
203
203
  padding: 0.5rem 1.25rem;
204
204
  -webkit-text-decoration: none;
205
205
  text-decoration: none;
206
- font-weight: 700;
207
206
  font-size: 1rem;
208
207
  border-radius: 2rem;
209
208
  -webkit-transition: all 0.3s;
@@ -219,6 +218,16 @@ it('renders link styled as button correctly', () => {
219
218
  -ms-flex-align: center;
220
219
  align-items: center;
221
220
  cursor: pointer;
221
+ font-family: 'Montserrat',Helvetica,Arial,sans-serif;
222
+ font-weight: 400;
223
+ text-transform: inherit;
224
+ -webkit-letter-spacing: 0;
225
+ -moz-letter-spacing: 0;
226
+ -ms-letter-spacing: 0;
227
+ letter-spacing: 0;
228
+ font-size: 1rem;
229
+ line-height: 1.25rem;
230
+ font-weight: 700;
222
231
  background-color: #FFE400;
223
232
  color: #000000;
224
233
  }
@@ -228,6 +237,20 @@ it('renders link styled as button correctly', () => {
228
237
  color: #000000;
229
238
  }
230
239
 
240
+ @media (min-width:740px) {
241
+ .c0 {
242
+ font-size: 1rem;
243
+ line-height: 1.25rem;
244
+ }
245
+ }
246
+
247
+ @media (min-width:1024px) {
248
+ .c0 {
249
+ font-size: 1.125rem;
250
+ line-height: 1.375rem;
251
+ }
252
+ }
253
+
231
254
  @media (min-width:740px) {
232
255
  .c0 {
233
256
  width: auto;