@comicrelief/component-library 7.37.0 → 7.38.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 (83) hide show
  1. package/dist/components/Atoms/Button/Button.js +1 -1
  2. package/dist/components/Atoms/Icons/Arrow.js +1 -1
  3. package/dist/components/Atoms/Icons/AtSign.js +1 -1
  4. package/dist/components/Atoms/Icons/Chevron.js +1 -1
  5. package/dist/components/Atoms/Icons/Download.js +1 -1
  6. package/dist/components/Atoms/Icons/External.js +1 -1
  7. package/dist/components/Atoms/Icons/Favourite.js +1 -1
  8. package/dist/components/Atoms/Icons/Internal.js +1 -1
  9. package/dist/components/Atoms/Input/Input.js +1 -1
  10. package/dist/components/Atoms/Link/Link.style.js +3 -3
  11. package/dist/components/Atoms/Logo/Logo.js +1 -1
  12. package/dist/components/Atoms/Select/Select.js +1 -1
  13. package/dist/components/Atoms/SocialIcons/SocialIcons.js +2 -2
  14. package/dist/components/Atoms/Text/Text.js +2 -2
  15. package/dist/components/Molecules/Accordion/Accordion.js +3 -3
  16. package/dist/components/Molecules/ArticleTeaser/ArticleTeaser.js +6 -6
  17. package/dist/components/Molecules/Banner/Banner.js +2 -2
  18. package/dist/components/Molecules/Box/Box.js +4 -4
  19. package/dist/components/Molecules/CardDs/CardDs.style.js +9 -9
  20. package/dist/components/Molecules/DoubleCopy/DoubleCopy.style.js +1 -1
  21. package/dist/components/Molecules/InfoBanner/InfoBanner.js +2 -2
  22. package/dist/components/Molecules/PartnerLink/PartnerLink.style.js +1 -1
  23. package/dist/components/Molecules/Promo/_PromoVideoButton.style.js +1 -1
  24. package/dist/components/Molecules/SearchResult/SearchResult.js +3 -3
  25. package/dist/components/Molecules/SingleMessage/SingleMessage.style.js +4 -4
  26. package/dist/components/Molecules/SingleMessageDS/SingleMessageDs.md +3 -3
  27. package/dist/components/Molecules/SingleMessageDS/SingleMessageDs.style.js +6 -6
  28. package/dist/components/Organisms/CookieBanner/CookieBanner.style.js +2 -2
  29. package/dist/components/Organisms/EmailSignUp/EmailSignUp.style.js +2 -2
  30. package/dist/components/Organisms/Footer/Footer.style.js +4 -4
  31. package/dist/components/Organisms/Footer/Nav/Nav.style.js +8 -8
  32. package/dist/components/Organisms/Header/Burger/BurgerMenu.style.js +1 -1
  33. package/dist/components/Organisms/Header/Header.style.js +3 -3
  34. package/dist/components/Organisms/Header/Nav/Nav.style.js +6 -6
  35. package/dist/components/Organisms/ImpactSlider/ImpactMoneybuys.style.js +6 -6
  36. package/dist/components/Organisms/ImpactSlider/ImpactSlider.style.js +7 -7
  37. package/dist/components/Organisms/MarketingPreferencesDS/MarketingPreferencesDS.style.js +4 -4
  38. package/dist/components/Organisms/Membership/Membership.style.js +2 -2
  39. package/dist/components/Organisms/WYMDCarousel/WYMDCarousel.style.js +10 -10
  40. package/dist/theme/crTheme/theme.js +2 -0
  41. package/dist/theme/shared/allBreakpoints.js +20 -0
  42. package/package.json +1 -1
  43. package/src/components/Atoms/Button/Button.js +1 -1
  44. package/src/components/Atoms/Icons/Arrow.js +1 -1
  45. package/src/components/Atoms/Icons/AtSign.js +1 -1
  46. package/src/components/Atoms/Icons/Chevron.js +1 -1
  47. package/src/components/Atoms/Icons/Download.js +1 -1
  48. package/src/components/Atoms/Icons/External.js +1 -1
  49. package/src/components/Atoms/Icons/Favourite.js +1 -1
  50. package/src/components/Atoms/Icons/Internal.js +1 -1
  51. package/src/components/Atoms/Input/Input.js +1 -1
  52. package/src/components/Atoms/Link/Link.style.js +3 -3
  53. package/src/components/Atoms/Logo/Logo.js +1 -1
  54. package/src/components/Atoms/Select/Select.js +1 -1
  55. package/src/components/Atoms/SocialIcons/SocialIcons.js +2 -2
  56. package/src/components/Atoms/Text/Text.js +3 -3
  57. package/src/components/Molecules/Accordion/Accordion.js +6 -6
  58. package/src/components/Molecules/ArticleTeaser/ArticleTeaser.js +6 -6
  59. package/src/components/Molecules/Banner/Banner.js +2 -2
  60. package/src/components/Molecules/Box/Box.js +4 -4
  61. package/src/components/Molecules/CardDs/CardDs.style.js +9 -9
  62. package/src/components/Molecules/DoubleCopy/DoubleCopy.style.js +1 -1
  63. package/src/components/Molecules/InfoBanner/InfoBanner.js +2 -2
  64. package/src/components/Molecules/PartnerLink/PartnerLink.style.js +1 -1
  65. package/src/components/Molecules/Promo/_PromoVideoButton.style.js +1 -1
  66. package/src/components/Molecules/SearchResult/SearchResult.js +3 -3
  67. package/src/components/Molecules/SingleMessage/SingleMessage.style.js +6 -6
  68. package/src/components/Molecules/SingleMessageDS/SingleMessageDs.md +3 -3
  69. package/src/components/Molecules/SingleMessageDS/SingleMessageDs.style.js +6 -6
  70. package/src/components/Organisms/CookieBanner/CookieBanner.style.js +2 -2
  71. package/src/components/Organisms/EmailSignUp/EmailSignUp.style.js +3 -3
  72. package/src/components/Organisms/Footer/Footer.style.js +4 -4
  73. package/src/components/Organisms/Footer/Nav/Nav.style.js +8 -8
  74. package/src/components/Organisms/Header/Burger/BurgerMenu.style.js +1 -1
  75. package/src/components/Organisms/Header/Header.style.js +3 -3
  76. package/src/components/Organisms/Header/Nav/Nav.style.js +6 -6
  77. package/src/components/Organisms/ImpactSlider/ImpactMoneybuys.style.js +7 -7
  78. package/src/components/Organisms/ImpactSlider/ImpactSlider.style.js +8 -8
  79. package/src/components/Organisms/MarketingPreferencesDS/MarketingPreferencesDS.style.js +4 -4
  80. package/src/components/Organisms/Membership/Membership.style.js +2 -2
  81. package/src/components/Organisms/WYMDCarousel/WYMDCarousel.style.js +21 -21
  82. package/src/theme/crTheme/theme.js +2 -0
  83. package/src/theme/shared/allBreakpoints.js +14 -0
@@ -46,7 +46,7 @@ const SubNavMenu = exports.SubNavMenu = _styledComponents.default.ul.withConfig(
46
46
  let {
47
47
  theme
48
48
  } = _ref4;
49
- return theme.breakpoint('small');
49
+ return theme.allBreakpoints('M');
50
50
  }, _ref5 => {
51
51
  let {
52
52
  column
@@ -64,7 +64,7 @@ const SubNavItem = exports.SubNavItem = _styledComponents.default.li.withConfig(
64
64
  let {
65
65
  theme
66
66
  } = _ref6;
67
- return theme.breakpoint('small');
67
+ return theme.allBreakpoints('M');
68
68
  }, _ref7 => {
69
69
  let {
70
70
  column
@@ -74,7 +74,7 @@ const SubNavItem = exports.SubNavItem = _styledComponents.default.li.withConfig(
74
74
  let {
75
75
  theme
76
76
  } = _ref8;
77
- return theme.breakpoint('medium');
77
+ return theme.allBreakpoints('L');
78
78
  }, _ref9 => {
79
79
  let {
80
80
  column
@@ -100,7 +100,7 @@ const NavMenu = exports.NavMenu = _styledComponents.default.ul.withConfig({
100
100
  let {
101
101
  theme
102
102
  } = _ref10;
103
- return theme.breakpoint('small');
103
+ return theme.allBreakpoints('M');
104
104
  });
105
105
 
106
106
  /**
@@ -121,17 +121,17 @@ const NavItem = exports.NavItem = _styledComponents.default.li.withConfig({
121
121
  let {
122
122
  theme
123
123
  } = _ref11;
124
- return theme.breakpoint('small');
124
+ return theme.allBreakpoints('M');
125
125
  }, _ref12 => {
126
126
  let {
127
127
  theme
128
128
  } = _ref12;
129
- return theme.breakpoint('medium');
129
+ return theme.allBreakpoints('L');
130
130
  }, _ref13 => {
131
131
  let {
132
132
  theme
133
133
  } = _ref13;
134
- return theme.breakpoint('small');
134
+ return theme.allBreakpoints('M');
135
135
  }, _ref14 => {
136
136
  let {
137
137
  theme
@@ -151,5 +151,5 @@ const NavItem = exports.NavItem = _styledComponents.default.li.withConfig({
151
151
  let {
152
152
  theme
153
153
  } = _ref17;
154
- return theme.breakpoint('small');
154
+ return theme.allBreakpoints('M');
155
155
  });
@@ -73,5 +73,5 @@ const BurgerWrapper = exports.BurgerWrapper = (0, _styledComponents.default)(_Li
73
73
  let {
74
74
  theme
75
75
  } = _ref8;
76
- return theme.breakpoint('nav');
76
+ return theme.allBreakpoints('Nav');
77
77
  });
@@ -23,7 +23,7 @@ const HeaderWrapper = exports.HeaderWrapper = _styledComponents.default.header.a
23
23
  let {
24
24
  theme
25
25
  } = _ref2;
26
- return theme.breakpoint('nav');
26
+ return theme.allBreakpoints('Nav');
27
27
  });
28
28
  const InnerWrapper = exports.InnerWrapper = _styledComponents.default.div.withConfig({
29
29
  displayName: "Headerstyle__InnerWrapper",
@@ -32,7 +32,7 @@ const InnerWrapper = exports.InnerWrapper = _styledComponents.default.div.withCo
32
32
  let {
33
33
  theme
34
34
  } = _ref3;
35
- return theme.breakpoint('nav');
35
+ return theme.allBreakpoints('Nav');
36
36
  });
37
37
  const Brand = exports.Brand = _styledComponents.default.div.withConfig({
38
38
  displayName: "Headerstyle__Brand",
@@ -45,7 +45,7 @@ const MetaIcons = exports.MetaIcons = _styledComponents.default.div.withConfig({
45
45
  let {
46
46
  theme
47
47
  } = _ref4;
48
- return theme.breakpoint('nav');
48
+ return theme.allBreakpoints('Nav');
49
49
  }, _ref5 => {
50
50
  let {
51
51
  theme
@@ -40,7 +40,7 @@ const Nav = exports.Nav = _styledComponents.default.nav.withConfig({
40
40
  let {
41
41
  theme
42
42
  } = _ref4;
43
- return theme.breakpoint('nav');
43
+ return theme.allBreakpoints('Nav');
44
44
  }, (0, _zIndex.default)('medium'), _hideVisually.default);
45
45
 
46
46
  /**
@@ -63,7 +63,7 @@ const SubNavMenu = exports.SubNavMenu = _styledComponents.default.ul.withConfig(
63
63
  let {
64
64
  theme
65
65
  } = _ref7;
66
- return theme.breakpoint('nav');
66
+ return theme.allBreakpoints('Nav');
67
67
  }, _ref8 => {
68
68
  let {
69
69
  isKeyPressed
@@ -117,7 +117,7 @@ const SubNavLinkUnderline = exports.SubNavLinkUnderline = (0, _styledComponents.
117
117
  let {
118
118
  theme
119
119
  } = _ref13;
120
- return theme.breakpoint('nav');
120
+ return theme.allBreakpoints('Nav');
121
121
  }, _ref14 => {
122
122
  let {
123
123
  theme
@@ -145,7 +145,7 @@ const NavMenu = exports.NavMenu = _styledComponents.default.ul.withConfig({
145
145
  let {
146
146
  theme
147
147
  } = _ref17;
148
- return theme.breakpoint('nav');
148
+ return theme.allBreakpoints('Nav');
149
149
  }, _ref18 => {
150
150
  let {
151
151
  theme
@@ -168,7 +168,7 @@ const NavLink = exports.NavLink = (0, _styledComponents.default)(NavLinkClass).w
168
168
  let {
169
169
  theme
170
170
  } = _ref20;
171
- return theme.breakpoint('nav');
171
+ return theme.allBreakpoints('Nav');
172
172
  }, SubNavMenu);
173
173
 
174
174
  /**
@@ -186,7 +186,7 @@ const NavItem = exports.NavItem = _styledComponents.default.li.withConfig({
186
186
  let {
187
187
  theme
188
188
  } = _ref22;
189
- return theme.breakpoint('nav');
189
+ return theme.allBreakpoints('Nav');
190
190
  }, SubNavMenu, SubNavMenu, (0, _zIndex.default)('high'), _ref23 => {
191
191
  let {
192
192
  theme
@@ -15,7 +15,7 @@ const MoneybuyWrapper = exports.MoneybuyWrapper = _styledComponents.default.div.
15
15
  let {
16
16
  theme
17
17
  } = _ref;
18
- return theme.breakpoint('medium');
18
+ return theme.allBreakpoints('L');
19
19
  });
20
20
  const Moneybuy = exports.Moneybuy = _styledComponents.default.div.withConfig({
21
21
  displayName: "ImpactMoneybuysstyle__Moneybuy",
@@ -24,12 +24,12 @@ const Moneybuy = exports.Moneybuy = _styledComponents.default.div.withConfig({
24
24
  let {
25
25
  theme
26
26
  } = _ref2;
27
- return theme.breakpoint('small');
27
+ return theme.allBreakpoints('M');
28
28
  }, _ref3 => {
29
29
  let {
30
30
  theme
31
31
  } = _ref3;
32
- return theme.breakpoint('medium');
32
+ return theme.allBreakpoints('L');
33
33
  });
34
34
  const OrLabel = exports.OrLabel = (0, _styledComponents.default)(_Text.default).withConfig({
35
35
  displayName: "ImpactMoneybuysstyle__OrLabel",
@@ -42,7 +42,7 @@ const MoneybuyImage = exports.MoneybuyImage = _styledComponents.default.span.wit
42
42
  let {
43
43
  theme
44
44
  } = _ref4;
45
- return theme.breakpoint('medium');
45
+ return theme.allBreakpoints('L');
46
46
  });
47
47
  const MoneybuyAmount = exports.MoneybuyAmount = (0, _styledComponents.default)(_Text.default).withConfig({
48
48
  displayName: "ImpactMoneybuysstyle__MoneybuyAmount",
@@ -51,7 +51,7 @@ const MoneybuyAmount = exports.MoneybuyAmount = (0, _styledComponents.default)(_
51
51
  let {
52
52
  theme
53
53
  } = _ref5;
54
- return theme.breakpoint('medium');
54
+ return theme.allBreakpoints('L');
55
55
  });
56
56
  const MoneybuyDescription = exports.MoneybuyDescription = (0, _styledComponents.default)(_Text.default).withConfig({
57
57
  displayName: "ImpactMoneybuysstyle__MoneybuyDescription",
@@ -60,5 +60,5 @@ const MoneybuyDescription = exports.MoneybuyDescription = (0, _styledComponents.
60
60
  let {
61
61
  theme
62
62
  } = _ref6;
63
- return theme.breakpoint('medium');
63
+ return theme.allBreakpoints('L');
64
64
  });
@@ -15,12 +15,12 @@ const OuterWrapper = exports.OuterWrapper = _styledComponents.default.div.withCo
15
15
  let {
16
16
  theme
17
17
  } = _ref;
18
- return theme.breakpoint('small');
18
+ return theme.allBreakpoints('M');
19
19
  }, _ref2 => {
20
20
  let {
21
21
  theme
22
22
  } = _ref2;
23
- return theme.breakpoint('medium');
23
+ return theme.allBreakpoints('L');
24
24
  });
25
25
  const InnerWrapper = exports.InnerWrapper = _styledComponents.default.div.withConfig({
26
26
  displayName: "ImpactSliderstyle__InnerWrapper",
@@ -29,7 +29,7 @@ const InnerWrapper = exports.InnerWrapper = _styledComponents.default.div.withCo
29
29
  let {
30
30
  theme
31
31
  } = _ref3;
32
- return theme.breakpoint('medium');
32
+ return theme.allBreakpoints('L');
33
33
  });
34
34
  const Copy = exports.Copy = _styledComponents.default.div.withConfig({
35
35
  displayName: "ImpactSliderstyle__Copy",
@@ -38,7 +38,7 @@ const Copy = exports.Copy = _styledComponents.default.div.withConfig({
38
38
  let {
39
39
  theme
40
40
  } = _ref4;
41
- return theme.breakpoint('medium');
41
+ return theme.allBreakpoints('L');
42
42
  });
43
43
  const CurrentAmountCopy = exports.CurrentAmountCopy = (0, _styledComponents.default)(_Text.default).withConfig({
44
44
  displayName: "ImpactSliderstyle__CurrentAmountCopy",
@@ -47,7 +47,7 @@ const CurrentAmountCopy = exports.CurrentAmountCopy = (0, _styledComponents.defa
47
47
  let {
48
48
  theme
49
49
  } = _ref5;
50
- return theme.breakpoint('medium');
50
+ return theme.allBreakpoints('L');
51
51
  });
52
52
  const SubmitButton = exports.SubmitButton = (0, _styledComponents.default)(_Button.default).withConfig({
53
53
  displayName: "ImpactSliderstyle__SubmitButton",
@@ -61,10 +61,10 @@ const SubmitButton = exports.SubmitButton = (0, _styledComponents.default)(_Butt
61
61
  let {
62
62
  theme
63
63
  } = _ref7;
64
- return theme.breakpoint('small');
64
+ return theme.allBreakpoints('M');
65
65
  }, _ref8 => {
66
66
  let {
67
67
  theme
68
68
  } = _ref8;
69
- return theme.breakpoint('medium');
69
+ return theme.allBreakpoints('L');
70
70
  });
@@ -22,7 +22,7 @@ const TopCopyWrapper = exports.TopCopyWrapper = _styledComponents.default.div.wi
22
22
  let {
23
23
  theme
24
24
  } = _ref;
25
- return theme.breakpoint('small');
25
+ return theme.allBreakpoints('M');
26
26
  });
27
27
  const BottomCopyWrapper = exports.BottomCopyWrapper = _styledComponents.default.div.withConfig({
28
28
  displayName: "MarketingPreferencesDSstyle__BottomCopyWrapper",
@@ -39,7 +39,7 @@ const FormField = exports.FormField = _styledComponents.default.div.withConfig({
39
39
  let {
40
40
  theme
41
41
  } = _ref2;
42
- return (0, _styledComponents.css)(["position:relative;margin-bottom:", ";width:100%;display:flex;flex-direction:column;@media ", "{width:50%;padding:10px;}label{position:relative;margin-bottom:", ";width:100%;color:", ";}h3{position:relative;margin-bottom:", ";&:before{position:absolute;top:0;left:0;width:24px;height:24px;content:'';}}"], (0, _spacing.default)('md'), theme.breakpoint('small'), (0, _spacing.default)('md'), theme.color('grey_dark'), (0, _spacing.default)('md'));
42
+ return (0, _styledComponents.css)(["position:relative;margin-bottom:", ";width:100%;display:flex;flex-direction:column;@media ", "{width:50%;padding:10px;}label{position:relative;margin-bottom:", ";width:100%;color:", ";}h3{position:relative;margin-bottom:", ";&:before{position:absolute;top:0;left:0;width:24px;height:24px;content:'';}}"], (0, _spacing.default)('md'), theme.allBreakpoints('M'), (0, _spacing.default)('md'), theme.color('grey_dark'), (0, _spacing.default)('md'));
43
43
  });
44
44
  const CheckContainer = exports.CheckContainer = _styledComponents.default.div.withConfig({
45
45
  displayName: "MarketingPreferencesDSstyle__CheckContainer",
@@ -57,7 +57,7 @@ const CheckLabel = exports.CheckLabel = _styledComponents.default.label.withConf
57
57
  let {
58
58
  theme
59
59
  } = _ref4;
60
- return (0, _styledComponents.css)(["display:flex;align-items:center;font-size:", ";@media ", "{font-size:", ";}"], theme.fontSize('xs'), theme.breakpoint('small'), theme.fontSize('s'));
60
+ return (0, _styledComponents.css)(["display:flex;align-items:center;font-size:", ";@media ", "{font-size:", ";}"], theme.fontSize('xs'), theme.allBreakpoints('M'), theme.fontSize('s'));
61
61
  });
62
62
  const CheckInput = exports.CheckInput = _styledComponents.default.input.withConfig({
63
63
  displayName: "MarketingPreferencesDSstyle__CheckInput",
@@ -86,7 +86,7 @@ const CheckInput = exports.CheckInput = _styledComponents.default.input.withConf
86
86
  let {
87
87
  theme
88
88
  } = _ref9;
89
- return theme.breakpoint('small');
89
+ return theme.allBreakpoints('M');
90
90
  }, _CR_Tick_black.default, _ref10 => {
91
91
  let {
92
92
  theme
@@ -24,7 +24,7 @@ const Container = exports.Container = _styledComponents.default.div.withConfig({
24
24
  let {
25
25
  theme
26
26
  } = _ref2;
27
- return theme.breakpoint('medium');
27
+ return theme.allBreakpoints('L');
28
28
  }, _ref3 => {
29
29
  let {
30
30
  formAligntRight
@@ -44,7 +44,7 @@ const BgImage = exports.BgImage = (0, _styledComponents.default)(_Picture.defaul
44
44
  let {
45
45
  theme
46
46
  } = _ref5;
47
- return theme.breakpoint('medium');
47
+ return theme.allBreakpoints('L');
48
48
  });
49
49
  const Wrapper = exports.Wrapper = _styledComponents.default.div.withConfig({
50
50
  displayName: "Membershipstyle__Wrapper",
@@ -21,7 +21,7 @@ const ImageWrapper = exports.ImageWrapper = _styledComponents.default.div.withCo
21
21
  let {
22
22
  theme
23
23
  } = _ref;
24
- return theme.breakpoint('medium');
24
+ return theme.allBreakpoints('L');
25
25
  });
26
26
  const AmountWrapper = exports.AmountWrapper = _styledComponents.default.div.withConfig({
27
27
  displayName: "WYMDCarouselstyle__AmountWrapper",
@@ -30,7 +30,7 @@ const AmountWrapper = exports.AmountWrapper = _styledComponents.default.div.with
30
30
  let {
31
31
  theme
32
32
  } = _ref2;
33
- return theme.breakpoint('small');
33
+ return theme.allBreakpoints('M');
34
34
  });
35
35
  const CopyWrapper = exports.CopyWrapper = _styledComponents.default.div.withConfig({
36
36
  displayName: "WYMDCarouselstyle__CopyWrapper",
@@ -53,7 +53,7 @@ const Heading = exports.Heading = (0, _styledComponents.default)(_Text.default).
53
53
  let {
54
54
  theme
55
55
  } = _ref5;
56
- return theme.breakpoint('medium');
56
+ return theme.allBreakpoints('L');
57
57
  });
58
58
  const PeopleHelpedText = exports.PeopleHelpedText = (0, _styledComponents.default)(_Text.default).withConfig({
59
59
  displayName: "WYMDCarouselstyle__PeopleHelpedText",
@@ -62,12 +62,12 @@ const PeopleHelpedText = exports.PeopleHelpedText = (0, _styledComponents.defaul
62
62
  let {
63
63
  theme
64
64
  } = _ref6;
65
- return theme.breakpoint('small');
65
+ return theme.allBreakpoints('M');
66
66
  }, _ref7 => {
67
67
  let {
68
68
  theme
69
69
  } = _ref7;
70
- return theme.breakpoint('medium');
70
+ return theme.allBreakpoints('L');
71
71
  });
72
72
  const Including = exports.Including = (0, _styledComponents.default)(_Text.default).withConfig({
73
73
  displayName: "WYMDCarouselstyle__Including",
@@ -76,7 +76,7 @@ const Including = exports.Including = (0, _styledComponents.default)(_Text.defau
76
76
  let {
77
77
  theme
78
78
  } = _ref8;
79
- return theme.breakpoint('small');
79
+ return theme.allBreakpoints('M');
80
80
  });
81
81
 
82
82
  // Unfortunately having to target plugin-created markup ye olde fashioned way:
@@ -92,20 +92,20 @@ const CarouselWrapper = exports.CarouselWrapper = _styledComponents.default.div.
92
92
  let {
93
93
  theme
94
94
  } = _ref10;
95
- return theme.breakpoint('medium');
95
+ return theme.allBreakpoints('L');
96
96
  }, (0, _spacing.default)('l'), _ref11 => {
97
97
  let {
98
98
  theme
99
99
  } = _ref11;
100
- return theme.breakpoint('small');
100
+ return theme.allBreakpoints('M');
101
101
  }, animationSpeed, animationSpeed, animationSpeed, animationSpeed, props => props.mobileHeight, _ref12 => {
102
102
  let {
103
103
  theme
104
104
  } = _ref12;
105
- return theme.breakpoint('small');
105
+ return theme.allBreakpoints('M');
106
106
  }, props => props.tabletHeight, animationSpeed, animationSpeed, animationSpeed, animationSpeed, animationSpeed, textScaleOffsetA, textScaleOffsetB, textScaleOffsetA, textScaleOffsetB, _ref13 => {
107
107
  let {
108
108
  theme
109
109
  } = _ref13;
110
- return theme.breakpoint('medium');
110
+ return theme.allBreakpoints('L');
111
111
  }, props => props.desktopHeight);
@@ -10,6 +10,7 @@ var _buttonColors = _interopRequireDefault(require("./buttonColors"));
10
10
  var _linkStyles = _interopRequireDefault(require("./linkStyles"));
11
11
  var _fontSizes = _interopRequireDefault(require("./fontSizes"));
12
12
  var _breakpoint = _interopRequireDefault(require("../shared/breakpoint"));
13
+ var _allBreakpoints = _interopRequireDefault(require("../shared/allBreakpoints"));
13
14
  var _fontFamilies = _interopRequireDefault(require("../shared/fontFamilies"));
14
15
  var _default = exports.default = {
15
16
  color: _colors.default,
@@ -17,6 +18,7 @@ var _default = exports.default = {
17
18
  linkStyles: _linkStyles.default,
18
19
  fontSize: _fontSizes.default,
19
20
  breakpoint: _breakpoint.default,
21
+ allBreakpoints: _allBreakpoints.default,
20
22
  fontFamilies: _fontFamilies.default,
21
23
  font: {
22
24
  regular: 'Montserrat',
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.sizes = exports.default = void 0;
7
+ const sizes = exports.sizes = {
8
+ S: 0,
9
+ M: 740,
10
+ L: 1024,
11
+ Nav: 1150,
12
+ XL: 1440
13
+ };
14
+ var _default = size => {
15
+ if (size) {
16
+ return "(min-width: ".concat(sizes[size], "px)");
17
+ }
18
+ return 'inherit';
19
+ };
20
+ exports.default = _default;
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.37.0",
4
+ "version": "7.38.0",
5
5
  "main": "dist/index.js",
6
6
  "license": "ISC",
7
7
  "jest": {
@@ -23,7 +23,7 @@ const StyledButton = styled.button`
23
23
  text-decoration: none;
24
24
  }
25
25
  ${({ color, theme }) => (color ? theme.buttonColors(color) : theme.buttonColors('red'))};
26
- @media ${({ theme }) => theme.breakpoint('small')} {
26
+ @media ${({ theme }) => theme.allBreakpoints('M')} {
27
27
  width: auto;
28
28
  }
29
29
 
@@ -16,7 +16,7 @@ const Icon = styled.svg`
16
16
  fill: ${({ mobileColour, colour, theme }) => (mobileColour ? theme.color(mobileColour) : theme.color(colour))};
17
17
 
18
18
  // Reinstate standard styles for 'desktop', adding a fallback for good measure:
19
- @media ${({ theme }) => theme.breakpoint('medium')} {
19
+ @media ${({ theme }) => theme.allBreakpoints('L')} {
20
20
  fill: ${({ colour, theme }) => (colour ? theme.color(colour) : theme.color('white'))};
21
21
  }
22
22
  `;
@@ -9,7 +9,7 @@ const StyledSVG = styled.svg`
9
9
  fill: ${({ mobileColour, colour, theme }) => (mobileColour ? theme.color(mobileColour) : theme.color(colour))};
10
10
 
11
11
  // Reinstate standard styles for 'desktop', adding a fallback for good measure:
12
- @media ${({ theme }) => theme.breakpoint('medium')} {
12
+ @media ${({ theme }) => theme.allBreakpoints('L')} {
13
13
  fill: ${({ colour, theme }) => (colour ? theme.color(colour) : theme.color('white'))};
14
14
  }
15
15
  `;
@@ -16,7 +16,7 @@ const Icon = styled.svg`
16
16
  fill: ${({ mobileColour, colour, theme }) => (mobileColour ? theme.color(mobileColour) : theme.color(colour))};
17
17
 
18
18
  // Reinstate standard styles for 'desktop', adding a fallback for good measure:
19
- @media ${({ theme }) => theme.breakpoint('medium')} {
19
+ @media ${({ theme }) => theme.allBreakpoints('L')} {
20
20
  fill: ${({ colour, theme }) => (colour ? theme.color(colour) : theme.color('white'))};
21
21
  }
22
22
  `;
@@ -7,7 +7,7 @@ const StyledSVG = styled.svg`
7
7
  fill: ${({ mobileColour, colour, theme }) => (mobileColour ? theme.color(mobileColour) : theme.color(colour))};
8
8
 
9
9
  // Reinstate standard styles for 'desktop', adding a fallback for good measure:
10
- @media ${({ theme }) => theme.breakpoint('medium')} {
10
+ @media ${({ theme }) => theme.allBreakpoints('L')} {
11
11
  fill: ${({ colour, theme }) => (colour ? theme.color(colour) : theme.color('white'))};
12
12
  }
13
13
  `;
@@ -7,7 +7,7 @@ const StyledSVG = styled.svg`
7
7
  fill: ${({ mobileColour, colour, theme }) => (mobileColour ? theme.color(mobileColour) : theme.color(colour))};
8
8
 
9
9
  // Reinstate standard styles for 'desktop', adding a fallback for good measure:
10
- @media ${({ theme }) => theme.breakpoint('medium')} {
10
+ @media ${({ theme }) => theme.allBreakpoints('L')} {
11
11
  fill: ${({ colour, theme }) => (colour ? theme.color(colour) : theme.color('white'))};
12
12
  }
13
13
  `;
@@ -7,7 +7,7 @@ const StyledSVG = styled.svg`
7
7
  fill: ${({ mobileColour, colour, theme }) => (mobileColour ? theme.color(mobileColour) : theme.color(colour))};
8
8
 
9
9
  // Reinstate standard styles for 'desktop', adding a fallback for good measure:
10
- @media ${({ theme }) => theme.breakpoint('medium')} {
10
+ @media ${({ theme }) => theme.allBreakpoints('L')} {
11
11
  fill: ${({ colour, theme }) => (colour ? theme.color(colour) : theme.color('white'))};
12
12
  }
13
13
  `;
@@ -7,7 +7,7 @@ const StyledSVG = styled.svg`
7
7
  fill: ${({ mobileColour, colour, theme }) => (mobileColour ? theme.color(mobileColour) : theme.color(colour))};
8
8
 
9
9
  // Reinstate standard styles for 'desktop', adding a fallback for good measure:
10
- @media ${({ theme }) => theme.breakpoint('medium')} {
10
+ @media ${({ theme }) => theme.allBreakpoints('L')} {
11
11
  fill: ${({ colour, theme }) => (colour ? theme.color(colour) : theme.color('white'))};
12
12
  }
13
13
  `;
@@ -33,7 +33,7 @@ const InputField = styled.input`${({ theme, error, prefixLength }) => css`
33
33
  border: 1px solid ${theme.color('grey_for_forms')};
34
34
  }
35
35
 
36
- @media ${theme.breakpoint('small')} {
36
+ @media ${theme.allBreakpoints('M')} {
37
37
  max-width: 290px;
38
38
  }
39
39
  `}`;
@@ -21,12 +21,12 @@ const buttonStyle = () => css`
21
21
  // Override with mobile-specific colours where available:
22
22
  ${({ mobileColour, theme }) => (mobileColour ? theme.buttonColors(mobileColour) : null)};
23
23
 
24
- @media ${({ theme }) => theme.breakpoint('small')} {
24
+ @media ${({ theme }) => theme.allBreakpoints('M')} {
25
25
  width: auto;
26
26
  }
27
27
 
28
28
  // Reinstate general styles for 'desktop':
29
- @media ${({ theme }) => theme.breakpoint('medium')} {
29
+ @media ${({ theme }) => theme.allBreakpoints('L')} {
30
30
  ${({ color, theme }) => (color ? theme.buttonColors(color) : theme.buttonColors('red'))};
31
31
  }
32
32
  `;
@@ -53,7 +53,7 @@ export const IconWrapper = styled.span`
53
53
  top: 0;
54
54
  bottom: 0;
55
55
  `};
56
- @media ${({ theme }) => theme.breakpoint('small')} {
56
+ @media ${({ theme }) => theme.allBreakpoints('M')} {
57
57
  width: auto;
58
58
  right: auto;
59
59
  position: relative;
@@ -27,7 +27,7 @@ const LogoWrapper = styled.div`
27
27
  width: ${props => props.sizeSm};
28
28
  transform: ${props => (props.rotate ? 'rotate(-14deg)' : 'inherit')};
29
29
  vertical-align: bottom; // height fix
30
- @media ${({ theme }) => theme.breakpoint('nav')} {
30
+ @media ${({ theme }) => theme.allBreakpoints('Nav')} {
31
31
  width: ${props => props.sizeMd};
32
32
  }
33
33
  `;
@@ -32,7 +32,7 @@ const StyledSelect = styled.select`
32
32
  border: 1px solid ${({ theme }) => theme.color('grey_for_forms')};
33
33
  }
34
34
 
35
- @media ${({ theme }) => theme.breakpoint('small')} {
35
+ @media ${({ theme }) => theme.allBreakpoints('M')} {
36
36
  max-width: 290px;
37
37
  }
38
38
  `;
@@ -14,7 +14,7 @@ const StyledList = styled.ul`
14
14
  padding: 0;
15
15
  align-items: center;
16
16
 
17
- @media ${({ theme }) => theme.breakpoint('small')} {
17
+ @media ${({ theme }) => theme.allBreakpoints('M')} {
18
18
  justify-content: start;
19
19
  }
20
20
  `;
@@ -22,7 +22,7 @@ const StyledList = styled.ul`
22
22
  const StyledItem = styled.li`
23
23
  width: 32px;
24
24
  margin-right: ${spacing('m')};
25
- @media ${({ theme }) => theme.breakpoint('small')} {
25
+ @media ${({ theme }) => theme.allBreakpoints('M')} {
26
26
  width: 48px;
27
27
  }
28
28
  `;
@@ -20,12 +20,12 @@ export const BaseText = styled.span`
20
20
  ? css`
21
21
  font-size: ${theme.fontSize('xxl')};
22
22
  line-height: 3rem;
23
- @media ${theme.breakpoint('small')} {
23
+ @media ${theme.allBreakpoints('M')} {
24
24
  font-size: ${theme.fontSize('big')};
25
25
  line-height: ${theme.fontSize('big')};
26
26
  margin-bottom: 2rem;
27
27
  }
28
- @media ${theme.breakpoint('medium')} {
28
+ @media ${theme.allBreakpoints('L')} {
29
29
  font-size: ${theme.fontSize('super')};
30
30
  line-height: ${theme.fontSize('super')};
31
31
  margin-bottom: 2rem;
@@ -40,7 +40,7 @@ export const BaseText = styled.span`
40
40
  ${({ size, theme }) => (size === 'm'
41
41
  ? css`
42
42
  font-size: ${theme.fontSize('s')};
43
- @media ${theme.breakpoint('small')} {
43
+ @media ${theme.allBreakpoints('M')} {
44
44
  font-size: ${theme.fontSize('m')};
45
45
  }
46
46
  `
@@ -27,7 +27,7 @@ const Button = styled.button`
27
27
  transition: bottom 0.1s linear;
28
28
  cursor: pointer;
29
29
  text-align: left;
30
-
30
+
31
31
  &:focus,
32
32
  &:hover {
33
33
  color: inherit; // text was flashing white on focus on safari without this.
@@ -37,9 +37,9 @@ const Button = styled.button`
37
37
  animation-duration: 0.4s;
38
38
  }
39
39
  }
40
-
40
+
41
41
  padding: ${spacing('l')};
42
- @media ${({ theme }) => theme.breakpoint('small')} {
42
+ @media ${({ theme }) => theme.allBreakpoints('M')} {
43
43
  padding: ${spacing('l')} ${spacing('lg')};
44
44
  }
45
45
  `;
@@ -52,11 +52,11 @@ const Icon = styled.div`
52
52
 
53
53
  const Copy = styled.div`
54
54
  overflow: hidden;
55
- height: 0;
55
+ height: 0;
56
56
  visibility: none;
57
57
  transition: all 0.2s cubic-bezier(0.21, 1.7, 0.83, 0.68) 0s;
58
58
  padding: 0 ${spacing('l')};
59
- @media ${({ theme }) => theme.breakpoint('small')} {
59
+ @media ${({ theme }) => theme.allBreakpoints('M')} {
60
60
  padding: 0 ${spacing('lg')};
61
61
  }
62
62
 
@@ -66,7 +66,7 @@ const Copy = styled.div`
66
66
  transition: all 0.2s cubic-bezier(0.21, 1.7, 0.83, 0.68) 0s;
67
67
  padding: 0 ${spacing('l')} ${spacing('l')};
68
68
 
69
- @media ${({ theme }) => theme.breakpoint('small')} {
69
+ @media ${({ theme }) => theme.allBreakpoints('M')} {
70
70
  padding: 0 ${spacing('lg')} ${spacing('l')};
71
71
  }
72
72
  `)}